@tencentcloud/ai-desk-customer-vue 0.1.2 → 0.1.4

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 (225) hide show
  1. package/components/CustomerServiceChat/index-web.vue +7 -14
  2. package/components/CustomerServiceChat/message-input/index-web.vue +17 -16
  3. package/components/CustomerServiceChat/message-input/message-input-editor-web.vue +3 -6
  4. package/components/CustomerServiceChat/message-input/message-input-quote/index.vue +3 -14
  5. package/components/CustomerServiceChat/message-input-toolbar/emoji-dialog-mobile/emoji-dialog-mobile.vue +2 -5
  6. package/components/CustomerServiceChat/message-input-toolbar/emoji-picker/emoji-picker-dialog.vue +8 -15
  7. package/components/CustomerServiceChat/message-input-toolbar/file-upload/index.vue +3 -7
  8. package/components/CustomerServiceChat/message-input-toolbar/image-upload/index.vue +6 -44
  9. package/components/CustomerServiceChat/message-input-toolbar/index-web.vue +1 -14
  10. package/components/CustomerServiceChat/message-input-toolbar/style/uni.scss +0 -56
  11. package/components/CustomerServiceChat/message-input-toolbar/toolbar-item-container/index.vue +4 -7
  12. package/components/CustomerServiceChat/message-input-toolbar/toolbar-item-container/style/index.scss +0 -1
  13. package/components/CustomerServiceChat/message-input-toolbar/video-upload/index.vue +7 -50
  14. package/components/CustomerServiceChat/message-list/index-web.vue +3 -7
  15. package/components/CustomerServiceChat/message-list/message-elements/{plugins/plugin-components → message-desk}/index.ts +1 -1
  16. package/components/{customer-icon.vue → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/customer-icon.vue} +0 -9
  17. package/components/CustomerServiceChat/message-list/message-elements/{plugins/plugin-components/message-customer → message-desk/message-desk-elements}/index.ts +1 -1
  18. package/components/{message-branch.vue → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-branch.vue} +4 -4
  19. package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-desk.vue +126 -0
  20. package/components/{message-multi-branch → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-branch}/branch-pc.vue +1 -1
  21. package/components/{message-multi-branch → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-branch}/index.vue +2 -3
  22. package/components/{message-multi-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form}/component-mobile/form-popup.vue +2 -3
  23. package/components/{message-multi-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form}/component-mobile/input-mobile.vue +1 -1
  24. package/components/{message-multi-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form}/component-mobile/radios-mobile.vue +7 -7
  25. package/components/{message-multi-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form}/component-pc/input-pc.vue +1 -1
  26. package/components/{message-multi-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form}/component-pc/radio-pc.vue +4 -5
  27. package/components/{message-multi-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form}/form-mobile.vue +8 -7
  28. package/components/{message-multi-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form}/form-pc.vue +5 -5
  29. package/components/{message-multi-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form}/index.vue +3 -3
  30. package/components/{message-product-card.vue → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-product-card.vue} +2 -2
  31. package/components/{message-rating → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-rating}/index.vue +4 -4
  32. package/components/{message-rating → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-rating}/message-rating-number.vue +3 -3
  33. package/components/{message-rating → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-rating}/message-rating-star.vue +5 -5
  34. package/components/{message-rich-text.vue → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-rich-text.vue} +5 -17
  35. package/components/{message-robot-welcome.vue → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-robot-welcome.vue} +7 -7
  36. package/components/{message-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-single-form}/form-input.vue +5 -5
  37. package/components/{message-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-single-form}/index.vue +1 -1
  38. package/components/{message-stream.vue → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-stream.vue} +2 -2
  39. package/{styles → components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/styles}/common.scss +1 -1
  40. package/components/CustomerServiceChat/message-list/message-elements/{plugins/plugin-components → message-desk}/message-plugin-layout-web.vue +2 -9
  41. package/components/CustomerServiceChat/message-list/message-elements/{plugins/plugin-components → message-desk}/message-plugin-web.vue +5 -5
  42. package/components/CustomerServiceChat/message-list/message-elements/message-quote/index-web.vue +2 -4
  43. package/components/CustomerServiceChat/message-list/message-elements/message-record/index.vue +3 -6
  44. package/components/CustomerServiceChat/message-list/message-elements/simple-message-list/index.vue +3 -29
  45. package/components/CustomerServiceChat/style/h5.scss +2 -1
  46. package/components/CustomerServiceChat/style/index.scss +0 -2
  47. package/components/common/Avatar/index.vue +2 -23
  48. package/components/common/BottomPopup/index.vue +2 -3
  49. package/components/common/Dialog/index.vue +2 -2
  50. package/components/common/ImagePreviewer/index-web.vue +2 -84
  51. package/components/common/ProgressMessage/index.vue +0 -8
  52. package/index.ts +4 -13
  53. package/index.vue +1 -60
  54. package/package.json +4 -5
  55. package/server.ts +3 -32
  56. package/utils/chatStorage.ts +2 -11
  57. package/utils/index.ts +2 -1
  58. package/assets/audio-before-delete.svg +0 -4
  59. package/assets/audio-blue.png +0 -0
  60. package/assets/audio-bubble-blue.svg +0 -3
  61. package/assets/audio-bubble-red.svg +0 -3
  62. package/assets/audio-delete.svg +0 -10
  63. package/assets/audio.svg +0 -6
  64. package/assets/camera-uni.png +0 -0
  65. package/assets/face-uni.png +0 -0
  66. package/assets/more-uni.png +0 -0
  67. package/assets/translate.svg +0 -12
  68. package/assets/video-uni.png +0 -0
  69. package/components/CustomerServiceChat/message-input-toolbar/toolbar-item-container/style/uni.scss +0 -36
  70. package/components/CustomerServiceChat/message-list/link/index.ts +0 -23
  71. package/components/CustomerServiceChat/message-list/message-elements/plugins/plugin-components/message-customer/message-customer-service.vue +0 -22
  72. package/components/CustomerServiceChat/style/uni.scss +0 -12
  73. package/components/CustomerServiceChat/style/wx.scss +0 -5
  74. package/components/common/RichText/LICENSE +0 -21
  75. package/components/common/RichText/README.md +0 -244
  76. package/components/common/RichText/dist/mp-alipay/index.acss +0 -1
  77. package/components/common/RichText/dist/mp-alipay/index.axml +0 -1
  78. package/components/common/RichText/dist/mp-alipay/index.js +0 -8
  79. package/components/common/RichText/dist/mp-alipay/index.json +0 -1
  80. package/components/common/RichText/dist/mp-alipay/node/node.acss +0 -1
  81. package/components/common/RichText/dist/mp-alipay/node/node.axml +0 -1
  82. package/components/common/RichText/dist/mp-alipay/node/node.js +0 -1
  83. package/components/common/RichText/dist/mp-alipay/node/node.json +0 -1
  84. package/components/common/RichText/dist/mp-alipay/parser.js +0 -1
  85. package/components/common/RichText/dist/mp-baidu/index.css +0 -1
  86. package/components/common/RichText/dist/mp-baidu/index.js +0 -8
  87. package/components/common/RichText/dist/mp-baidu/index.json +0 -1
  88. package/components/common/RichText/dist/mp-baidu/index.swan +0 -1
  89. package/components/common/RichText/dist/mp-baidu/node/node.css +0 -1
  90. package/components/common/RichText/dist/mp-baidu/node/node.js +0 -1
  91. package/components/common/RichText/dist/mp-baidu/node/node.json +0 -1
  92. package/components/common/RichText/dist/mp-baidu/node/node.swan +0 -1
  93. package/components/common/RichText/dist/mp-baidu/parser.js +0 -1
  94. package/components/common/RichText/dist/mp-qq/index.js +0 -8
  95. package/components/common/RichText/dist/mp-qq/index.json +0 -1
  96. package/components/common/RichText/dist/mp-qq/index.qml +0 -1
  97. package/components/common/RichText/dist/mp-qq/index.qss +0 -1
  98. package/components/common/RichText/dist/mp-qq/node/node.js +0 -1
  99. package/components/common/RichText/dist/mp-qq/node/node.json +0 -1
  100. package/components/common/RichText/dist/mp-qq/node/node.qml +0 -1
  101. package/components/common/RichText/dist/mp-qq/node/node.qss +0 -1
  102. package/components/common/RichText/dist/mp-qq/parser.js +0 -1
  103. package/components/common/RichText/dist/mp-toutiao/index.js +0 -8
  104. package/components/common/RichText/dist/mp-toutiao/index.json +0 -1
  105. package/components/common/RichText/dist/mp-toutiao/index.ttml +0 -1
  106. package/components/common/RichText/dist/mp-toutiao/index.ttss +0 -1
  107. package/components/common/RichText/dist/mp-toutiao/node/node.js +0 -1
  108. package/components/common/RichText/dist/mp-toutiao/node/node.json +0 -1
  109. package/components/common/RichText/dist/mp-toutiao/node/node.ttml +0 -1
  110. package/components/common/RichText/dist/mp-toutiao/node/node.ttss +0 -1
  111. package/components/common/RichText/dist/mp-toutiao/parser.js +0 -1
  112. package/components/common/RichText/dist/mp-weixin/index.js +0 -8
  113. package/components/common/RichText/dist/mp-weixin/index.json +0 -1
  114. package/components/common/RichText/dist/mp-weixin/index.wxml +0 -1
  115. package/components/common/RichText/dist/mp-weixin/index.wxss +0 -1
  116. package/components/common/RichText/dist/mp-weixin/node/node.js +0 -1
  117. package/components/common/RichText/dist/mp-weixin/node/node.json +0 -1
  118. package/components/common/RichText/dist/mp-weixin/node/node.wxml +0 -1
  119. package/components/common/RichText/dist/mp-weixin/node/node.wxss +0 -1
  120. package/components/common/RichText/dist/mp-weixin/parser.js +0 -1
  121. package/components/common/RichText/dist/uni-app/components/mp-html/mp-html.vue +0 -498
  122. package/components/common/RichText/dist/uni-app/components/mp-html/node/node.vue +0 -587
  123. package/components/common/RichText/dist/uni-app/components/mp-html/parser.js +0 -1393
  124. package/components/common/RichText/dist/uni-app/static/app-plus/mp-html/js/handler.js +0 -1
  125. package/components/common/RichText/dist/uni-app/static/app-plus/mp-html/js/uni.webview.min.js +0 -1
  126. package/components/common/RichText/dist/uni-app/static/app-plus/mp-html/local.html +0 -1
  127. package/components/common/RichText/docs/.nojekyll +0 -0
  128. package/components/common/RichText/docs/index.html +0 -50
  129. package/components/common/RichText/docs/lib/docsify.min.js +0 -1
  130. package/components/common/RichText/docs/lib/prism-bash.min.js +0 -1
  131. package/components/common/RichText/docs/lib/search.min.js +0 -1
  132. package/components/common/RichText/docs/lib/vue.css +0 -858
  133. package/components/common/RichText/gulpfile.js +0 -113
  134. package/components/common/RichText/lint.js +0 -63
  135. package/components/common/RichText/package.json +0 -74
  136. package/components/common/RichText/plugins/README.md +0 -2
  137. package/components/common/RichText/plugins/audio/README.md +0 -25
  138. package/components/common/RichText/plugins/audio/build.js +0 -11
  139. package/components/common/RichText/plugins/audio/context.js +0 -7
  140. package/components/common/RichText/plugins/audio/index.js +0 -34
  141. package/components/common/RichText/plugins/audio/miniprogram/audio.js +0 -189
  142. package/components/common/RichText/plugins/audio/miniprogram/audio.json +0 -3
  143. package/components/common/RichText/plugins/audio/miniprogram/audio.wxml +0 -17
  144. package/components/common/RichText/plugins/audio/miniprogram/audio.wxss +0 -127
  145. package/components/common/RichText/plugins/audio/miniprogram/build.js +0 -3
  146. package/components/common/RichText/plugins/audio/uni-app/audio.vue +0 -269
  147. package/components/common/RichText/plugins/audio/uni-app/build.js +0 -3
  148. package/components/common/RichText/plugins/card/README.md +0 -30
  149. package/components/common/RichText/plugins/card/build.js +0 -14
  150. package/components/common/RichText/plugins/card/index.js +0 -7
  151. package/components/common/RichText/plugins/card/miniprogram/build.js +0 -3
  152. package/components/common/RichText/plugins/card/miniprogram/card.js +0 -26
  153. package/components/common/RichText/plugins/card/miniprogram/card.json +0 -3
  154. package/components/common/RichText/plugins/card/miniprogram/card.wxml +0 -9
  155. package/components/common/RichText/plugins/card/miniprogram/card.wxss +0 -55
  156. package/components/common/RichText/plugins/card/uni-app/build.js +0 -3
  157. package/components/common/RichText/plugins/card/uni-app/card.vue +0 -122
  158. package/components/common/RichText/plugins/editable/README.md +0 -137
  159. package/components/common/RichText/plugins/editable/config.js +0 -15
  160. package/components/common/RichText/plugins/editable/miniprogram/build.js +0 -813
  161. package/components/common/RichText/plugins/editable/miniprogram/index.js +0 -551
  162. package/components/common/RichText/plugins/editable/uni-app/build.js +0 -744
  163. package/components/common/RichText/plugins/editable/uni-app/index.js +0 -553
  164. package/components/common/RichText/plugins/emoji/README.md +0 -15
  165. package/components/common/RichText/plugins/emoji/index.js +0 -203
  166. package/components/common/RichText/plugins/highlight/README.md +0 -26
  167. package/components/common/RichText/plugins/highlight/config.js +0 -5
  168. package/components/common/RichText/plugins/highlight/index.js +0 -96
  169. package/components/common/RichText/plugins/highlight/miniprogram/build.js +0 -88
  170. package/components/common/RichText/plugins/highlight/prism.css +0 -125
  171. package/components/common/RichText/plugins/highlight/prism.min.js +0 -7
  172. package/components/common/RichText/plugins/highlight/uni-app/build.js +0 -88
  173. package/components/common/RichText/plugins/img-cache/README.md +0 -24
  174. package/components/common/RichText/plugins/img-cache/build.js +0 -16
  175. package/components/common/RichText/plugins/img-cache/index.js +0 -138
  176. package/components/common/RichText/plugins/latex/README.md +0 -16
  177. package/components/common/RichText/plugins/latex/build.js +0 -14
  178. package/components/common/RichText/plugins/latex/index.js +0 -77
  179. package/components/common/RichText/plugins/latex/katex.css +0 -1070
  180. package/components/common/RichText/plugins/latex/katex.min.js +0 -1
  181. package/components/common/RichText/plugins/markdown/README.md +0 -17
  182. package/components/common/RichText/plugins/markdown/index.js +0 -34
  183. package/components/common/RichText/plugins/markdown/marked.min.js +0 -6
  184. package/components/common/RichText/plugins/markdown/miniprogram/build.js +0 -70
  185. package/components/common/RichText/plugins/markdown/uni-app/build.js +0 -68
  186. package/components/common/RichText/plugins/search/README.md +0 -46
  187. package/components/common/RichText/plugins/search/miniprogram/index.js +0 -137
  188. package/components/common/RichText/plugins/search/uni-app/index.js +0 -132
  189. package/components/common/RichText/plugins/style/README.md +0 -30
  190. package/components/common/RichText/plugins/style/index.js +0 -129
  191. package/components/common/RichText/plugins/style/parser.js +0 -175
  192. package/components/common/RichText/plugins/template/README.md +0 -2
  193. package/components/common/RichText/plugins/template/build.js +0 -65
  194. package/components/common/RichText/plugins/template/index.js +0 -67
  195. package/components/common/RichText/plugins/txv-video/README.md +0 -18
  196. package/components/common/RichText/plugins/txv-video/build.js +0 -3
  197. package/components/common/RichText/plugins/txv-video/index.js +0 -46
  198. package/components/common/RichText/plugins/txv-video/miniprogram/build.js +0 -6
  199. package/components/common/RichText/plugins/txv-video/uni-app/build.js +0 -3
  200. package/components/common/RichText/src/miniprogram/index.js +0 -396
  201. package/components/common/RichText/src/miniprogram/index.json +0 -6
  202. package/components/common/RichText/src/miniprogram/index.wxml +0 -7
  203. package/components/common/RichText/src/miniprogram/index.wxss +0 -13
  204. package/components/common/RichText/src/miniprogram/node/node.js +0 -247
  205. package/components/common/RichText/src/miniprogram/node/node.json +0 -6
  206. package/components/common/RichText/src/miniprogram/node/node.wxml +0 -112
  207. package/components/common/RichText/src/miniprogram/node/node.wxss +0 -164
  208. package/components/common/RichText/src/miniprogram/parser.js +0 -1269
  209. package/components/common/RichText/src/uni-app/components/mp-html/mp-html.vue +0 -498
  210. package/components/common/RichText/src/uni-app/components/mp-html/node/node.vue +0 -585
  211. package/components/common/RichText/src/uni-app/components/mp-html/parser.js +0 -1393
  212. package/components/common/RichText/src/uni-app/static/app-plus/mp-html/js/handler.js +0 -254
  213. package/components/common/RichText/src/uni-app/static/app-plus/mp-html/js/uni.webview.min.js +0 -1
  214. package/components/common/RichText/src/uni-app/static/app-plus/mp-html/local.html +0 -33
  215. package/components/common/RichText/tools/config.js +0 -82
  216. package/components/common/RichText/tools/converter.js +0 -205
  217. package/components/common/RichText/tools/ifdef.js +0 -115
  218. package/components/common/RichText/tools/minifier.js +0 -40
  219. package/components/common/RichText/tools/plugin.js +0 -248
  220. package/components/message-customer-service.vue +0 -114
  221. package/script/fileCopy.js +0 -60
  222. package/script/syncVersion.js +0 -35
  223. /package/components/{message-multi-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form}/component-mobile/label-mobile.vue +0 -0
  224. /package/components/{message-multi-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form}/component-pc/label-pc.vue +0 -0
  225. /package/components/{message-form → CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-single-form}/form-branch.vue +0 -0
package/utils/index.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { customerServicePayloadType, IMessageModel } from '../interface';
1
+ import { customerServicePayloadType } from '../interface';
2
2
  import { CUSTOM_MESSAGE_SRC, TYPES } from '../constant';
3
+ import { IMessageModel } from '@tencentcloud/chat-uikit-engine';
3
4
 
4
5
  // Determine if it is a JSON string
5
6
  export function isJSON(str: string): boolean {
@@ -1,4 +0,0 @@
1
- <svg width="54" height="55" viewBox="0 0 54 55" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <circle opacity="0.3" cx="27" cy="27.5" r="27" fill="#99A2B2"/>
3
- <path d="M25.6347 28.9628L21.0461 35.516L22.6844 36.6632L27.273 30.1099L33.8262 34.6985L34.9734 33.0602L28.4202 28.4716L33.0088 21.9184L31.3705 20.7713L26.7819 27.3245L20.2287 22.7359L19.0815 24.3742L25.6347 28.9628Z" fill="white"/>
4
- </svg>
Binary file
@@ -1,3 +0,0 @@
1
- <svg width="160" height="75" viewBox="0 0 160 75" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path id="&#229;&#189;&#162;&#231;&#138;&#182;&#231;&#187;&#147;&#229;&#144;&#136;" fill-rule="evenodd" clip-rule="evenodd" d="M10 0.5C4.47715 0.5 0 4.97716 0 10.5V58.11C0 63.6329 4.47715 68.11 10 68.11H73.5714L78.4852 73.8099C79.283 74.7354 80.717 74.7354 81.5148 73.8099L86.4286 68.11H150C155.523 68.11 160 63.6329 160 58.11V10.5C160 4.97715 155.523 0.5 150 0.5H10Z" fill="#147AFF"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg width="160" height="75" viewBox="0 0 160 75" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path id="&#229;&#189;&#162;&#231;&#138;&#182;&#231;&#187;&#147;&#229;&#144;&#136;" fill-rule="evenodd" clip-rule="evenodd" d="M10 0.5C4.47715 0.5 0 4.97716 0 10.5V58.11C0 63.6329 4.47715 68.11 10 68.11H73.5714L78.4852 73.8099C79.283 74.7354 80.717 74.7354 81.5148 73.8099L86.4286 68.11H150C155.523 68.11 160 63.6329 160 58.11V10.5C160 4.97715 155.523 0.5 150 0.5H10Z" fill="#E54545"/>
3
- </svg>
@@ -1,10 +0,0 @@
1
- <svg width="54" height="55" viewBox="0 0 54 55" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="&#231;&#188;&#150;&#231;&#187;&#132; 3">
3
- <circle id="&#230;&#164;&#173;&#229;&#156;&#134;&#229;&#189;&#162;" opacity="0.3" cx="27" cy="27.5" r="27" fill="#22262E"/>
4
- <g id="Group 48097222">
5
- <g id="Group 48097514">
6
- <path id="Union" d="M25.4869 28.7281L19.8301 34.3849L21.2443 35.7991L26.9011 30.1423L32.558 35.7991L33.9722 34.3849L28.3154 28.7281L33.9722 23.0712L32.558 21.657L26.9011 27.3138L21.2443 21.657L19.8301 23.0712L25.4869 28.7281Z" fill="white"/>
7
- </g>
8
- </g>
9
- </g>
10
- </svg>
package/assets/audio.svg DELETED
@@ -1,6 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 56 57" class="design-iconfont">
2
- <g fill="none" fill-rule="evenodd">
3
- <path stroke="#444" stroke-width="4" d="M28 2A26 26 0 1 0 28 54A26 26 0 1 0 28 2Z" transform="translate(0 .853448)"/>
4
- <path d="M3.22061856,17.5880403 C3.66244636,17.5880403 4.02061856,17.9462125 4.02061856,18.3880403 L4.02061856,18.6926914 C4.02061856,24.8806658 8.93625507,29.8970101 15,29.8970101 C20.967495,29.8970101 25.8230402,25.0386509 25.975681,18.9864559 L25.9793814,18.6926914 L25.9793814,18.3880403 C25.9793814,17.9462125 26.3375536,17.5880403 26.7793814,17.5880403 L29.2,17.5880403 C29.6418278,17.5880403 30,17.9462125 30,18.3880403 L30,18.6926914 C30,27.1466845 23.2842712,34 15,34 C6.82193736,34 0.172455987,27.3212841 0.00330065692,19.0170447 L0,18.6926914 L0,18.3880403 C-1.65130603e-16,17.9462125 0.3581722,17.5880403 0.8,17.5880403 L3.22061856,17.5880403 Z M15.1965847,0 C19.4037284,0 22.8142432,3.57961711 22.8142432,7.9953621 L22.8142432,18.3119584 C22.7872128,22.7074732 19.3846075,26.2557375 15.1965847,26.2557375 L14.8034153,26.2557375 C10.5962716,26.2557375 7.18575682,22.6760398 7.18575682,18.2603754 L7.18575682,7.94377912 C7.21278722,3.54818373 10.6153925,0 14.8034153,0 L15.1965847,0 Z M15.1965847,4.10298992 L14.8034153,4.10298992 C12.9144516,4.10298992 11.325224,5.69669854 11.2126654,7.73818076 L11.2063754,7.94377912 L11.2063754,18.2603754 C11.2063754,20.365303 12.7386643,22.0414789 14.614709,22.1474289 L14.8034153,22.1527476 L15.1965847,22.1527476 C17.0855164,22.1527476 18.6747739,20.5589954 18.7873345,18.5175525 L18.7936246,18.3119584 L18.7936246,7.9953621 C18.7936246,5.89038947 17.2613666,4.21425569 15.385294,4.10830842 L15.1965847,4.10298992 Z" transform="translate(13 12)" fill="#444" fill-rule="nonzero"/>
5
- </g>
6
- </svg>
Binary file
Binary file
Binary file
@@ -1,12 +0,0 @@
1
- <svg width="19" height="18" viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <mask id="path-1-inside-1_313_82772" fill="white">
3
- <rect x="7" y="7.62939e-06" width="12" height="12" rx="0.5"/>
4
- </mask>
5
- <rect x="7" y="7.62939e-06" width="12" height="12" rx="0.5" fill="#444444" stroke="#CCCCCC" stroke-width="4" mask="url(#path-1-inside-1_313_82772)"/>
6
- <path d="M12.7426 3.61601H12.6745L12.6496 3.67939L10.9636 7.96339L10.9098 8.10001H11.0566H11.5846H11.6536L11.6781 8.03553L12.1096 6.90001H13.9397L14.3712 8.03553L14.3957 8.10001H14.4646H14.9986H15.1455L15.0917 7.96339L13.4057 3.67939L13.3808 3.61601H13.3126H12.7426ZM13.7079 6.28601H12.3421L13.03 4.49341L13.7079 6.28601Z" fill="#CCCCCC" stroke="#CCCCCC" stroke-width="0.2"/>
7
- <mask id="path-3-inside-2_313_82772" fill="white">
8
- <rect y="6.00001" width="12" height="12" rx="0.5"/>
9
- </mask>
10
- <rect y="6.00001" width="12" height="12" rx="0.5" fill="#444444" stroke="#CCCCCC" stroke-width="4" mask="url(#path-3-inside-2_313_82772)"/>
11
- <path d="M5.77801 8.97401H5.67801V9.07401V10.054H3.63H3.53V10.154V12.974V13.074H3.63H4.062H4.162V12.974V12.696H5.67801V14.642V14.742H5.77801H6.222H6.322V14.642V12.696H7.84401V12.974V13.074H7.94401H8.37601H8.47601V12.974V10.154V10.054H8.37601H6.322V9.07401V8.97401H6.222H5.77801ZM4.162 12.076V10.674H5.67801V12.076H4.162ZM6.322 12.076V10.674H7.84401V12.076H6.322Z" fill="#CCCCCC" stroke="#CCCCCC" stroke-width="0.2"/>
12
- </svg>
Binary file
@@ -1,36 +0,0 @@
1
- .toolbar-item-container-uni {
2
- width: 100%;
3
- height: 100%;
4
- display: flex;
5
- flex-direction: column;
6
- justify-content: center;
7
- align-items: center;
8
- position: static;
9
-
10
- &-icon {
11
- background: #fff;
12
- border-radius: 15px;
13
- width: 60px;
14
- height: 60px;
15
- padding: 0;
16
- display: flex;
17
- justify-content: center;
18
- align-items: center;
19
- }
20
-
21
- &-title {
22
- font-size: 14px;
23
- color: #8F959D;
24
- }
25
-
26
- &-dialog{
27
- position: absolute !important;
28
- background: transparent;
29
- left: -10px;
30
- bottom: -5px;
31
-
32
- .toolbar-bottom-popup{
33
- position: sticky;
34
- }
35
- }
36
- }
@@ -1,23 +0,0 @@
1
- const Link = {
2
- product: {
3
- label: '产品文档',
4
- url: 'https://cloud.tencent.com/document/product/269/1499#.E7.BE.A4.E7.BB.84.E5.8A.9F.E8.83.BD',
5
- },
6
- customMessage: {
7
- label: '自定义消息',
8
- url: 'https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html#createCustomMessage',
9
- },
10
- complaint: {
11
- label: '点此投诉',
12
- url: 'https://cloud.tencent.com/apply/p/xc3oaubi98g',
13
- },
14
- implement: {
15
- label: '集成TUICallKit',
16
- url: 'https://cloud.tencent.com/document/product/269/79861',
17
- },
18
- purchase: {
19
- label: '开通腾讯实时音视频服务',
20
- url: 'https://cloud.tencent.com/document/product/1640/79968',
21
- },
22
- };
23
- export default Link;
@@ -1,22 +0,0 @@
1
- <template>
2
- <TUICustomerServicePlugin :message="props.message" @showFormPopup="handleShowFormPopup"/>
3
- </template>
4
- <script setup lang="ts">
5
- import { IMessageModel } from '@tencentcloud/chat-uikit-engine';
6
- import TUICustomerServicePlugin from '../../../../../../../index.vue';
7
- interface IProps {
8
- message: IMessageModel;
9
- }
10
- const props = withDefaults(defineProps<IProps>(), {
11
- message: () => ({} as IMessageModel),
12
- });
13
- const emits = defineEmits([
14
- 'showFormPopup'
15
- ]);
16
- function handleShowFormPopup(data: any) {
17
- emits('showFormPopup', data);
18
- }
19
- </script>
20
- <style lang="scss" scoped>
21
- /* stylelint-disable-next-line no-empty-source */
22
- </style>
@@ -1,12 +0,0 @@
1
- .tui-chat-uni {
2
- &-message-input {
3
- max-height: 70px;
4
- }
5
- &-message-input-hide{
6
- display: none;
7
- }
8
-
9
- &-message-input-toolbar {
10
- z-index: 100;
11
- }
12
- }
@@ -1,5 +0,0 @@
1
- .tui-chat-wx {
2
- &-message-input {
3
- padding: 0;
4
- }
5
- }
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2019-present Jin Yufeng
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,244 +0,0 @@
1
- # mp-html
2
-
3
- > 一个强大的小程序富文本组件
4
-
5
- ![star](https://img.shields.io/github/stars/jin-yufeng/mp-html)
6
- ![forks](https://img.shields.io/github/forks/jin-yufeng/mp-html)
7
- [![npm](https://img.shields.io/npm/v/mp-html)](https://www.npmjs.com/package/mp-html)
8
- ![downloads](https://img.shields.io/npm/dt/mp-html)
9
- [![Coverage Status](https://coveralls.io/repos/github/jin-yufeng/mp-html/badge.svg?branch=master)](https://coveralls.io/github/jin-yufeng/mp-html?branch=master)
10
- ![license](https://img.shields.io/github/license/jin-yufeng/mp-html)
11
- [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
12
-
13
- ## 功能介绍
14
- - 支持在多个主流的小程序平台和 `uni-app` 中使用
15
- - 支持丰富的标签(包括 `table`、`video`、`svg` 等)
16
- - 支持丰富的事件效果(自动预览图片、链接处理等)
17
- - 支持设置占位图(加载中、出错时、预览时)
18
- - 支持锚点跳转、长按复制等丰富功能
19
- - 支持大部分 *html* 实体
20
- - 丰富的插件(关键词搜索、内容编辑、`latex` 公式等)
21
- - 效率高、容错性强且轻量化(`≈25KB`,`9KB gzipped`)
22
-
23
- 查看 [功能介绍](https://jin-yufeng.gitee.io/mp-html/#/overview/feature) 了解更多
24
-
25
- ## 使用方法
26
- ### 原生平台
27
- - `npm` 方式
28
- 1. 在项目目录下安装组件包
29
-
30
- ```bash
31
- npm install mp-html
32
- ```
33
- 2. 开发者工具中勾选 `使用 npm 模块`(若没有此选项则不需要)并点击 `工具 - 构建 npm`
34
- 3. 在需要使用页面的 `json` 文件中添加
35
-
36
- ```json
37
- {
38
- "usingComponents": {
39
- "mp-html": "mp-html"
40
- }
41
- }
42
- ```
43
- 4. 在需要使用页面的 `wxml` 文件中添加
44
-
45
- ```html
46
- <mp-html content="{{html}}" />
47
- ```
48
- 5. 在需要使用页面的 `js` 文件中添加
49
-
50
- ```javascript
51
- Page({
52
- onLoad () {
53
- this.setData({
54
- html: '<div>Hello World!</div>'
55
- })
56
- }
57
- })
58
- ```
59
- - 源码方式
60
- 1. 将源码中对应平台的代码包(`dist/platform`)拷贝到 `components` 目录下,更名为 `mp-html`
61
- 2. 在需要使用页面的 `json` 文件中添加
62
-
63
- ```json
64
- {
65
- "usingComponents": {
66
- "mp-html": "/components/mp-html/index"
67
- }
68
- }
69
- ```
70
-
71
- 后续步骤同上
72
-
73
- 查看 [快速开始](https://jin-yufeng.gitee.io/mp-html/#/overview/quickstart) 了解更多
74
-
75
- ### uni-app
76
- - 源码方式
77
- 1. 将源码中 `dist/uni-app` 内的内容拷贝到项目根目录下
78
- 可以直接通过 [插件市场](https://ext.dcloud.net.cn/plugin?id=805) 引入
79
- 2. 在需要使用页面的 `vue` 文件中添加
80
-
81
- ```vue
82
- <template>
83
- <view>
84
- <mp-html :content="html" />
85
- </view>
86
- </template>
87
- <script>
88
- import mpHtml from '@/components/mp-html/mp-html'
89
- export default {
90
- // HBuilderX 2.5.5+ 可以通过 easycom 自动引入
91
- components: {
92
- mpHtml
93
- },
94
- data () {
95
- return {
96
- html: '<div>Hello World!</div>'
97
- }
98
- }
99
- }
100
- </script>
101
- ```
102
- - `npm` 方式
103
- 1. 在项目目录下安装组件包
104
-
105
- ```bash
106
- npm install mp-html
107
- ```
108
- 2. 在需要使用页面的 `vue` 文件中添加
109
-
110
- ```vue
111
- <template>
112
- <view>
113
- <mp-html :content="html" />
114
- </view>
115
- </template>
116
- <script>
117
- import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html'
118
- export default {
119
- // 不可省略
120
- components: {
121
- mpHtml
122
- },
123
- data () {
124
- return {
125
- html: '<div>Hello World!</div>'
126
- }
127
- }
128
- }
129
- </script>
130
- ```
131
-
132
- 使用 `cli` 方式运行的项目,通过 `npm` 方式引入时,需要在 `vue.config.js` 中配置 `transpileDependencies`,详情可见 [#330](https://github.com/jin-yufeng/mp-html/issues/330#issuecomment-913617687)
133
- 如果在 `nvue` 中使用还要将 `dist/uni-app/static` 目录下的内容拷贝到项目的 `static` 目录下,否则无法运行
134
-
135
- 查看 [快速开始](https://jin-yufeng.gitee.io/mp-html/#/overview/quickstart) 了解更多
136
-
137
- ## 组件属性
138
-
139
- | 属性 | 类型 | 默认值 | 说明 |
140
- |:---:|:---:|:---:|---|
141
- | container-style | String | | 容器的样式([2.1.0+](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog#v210)) |
142
- | content | String | | 用于渲染的 html 字符串 |
143
- | copy-link | Boolean | true | 是否允许外部链接被点击时自动复制 |
144
- | domain | String | | 主域名(用于链接拼接) |
145
- | error-img | String | | 图片出错时的占位图链接 |
146
- | lazy-load | Boolean | false | 是否开启图片懒加载 |
147
- | loading-img | String | | 图片加载过程中的占位图链接 |
148
- | pause-video | Boolean | true | 是否在播放一个视频时自动暂停其他视频 |
149
- | preview-img | Boolean | true | 是否允许图片被点击时自动预览 |
150
- | scroll-table | Boolean | false | 是否给每个表格添加一个滚动层使其能单独横向滚动 |
151
- | selectable | Boolean | false | 是否开启文本长按复制 |
152
- | set-title | Boolean | true | 是否将 title 标签的内容设置到页面标题 |
153
- | show-img-menu | Boolean | true | 是否允许图片被长按时显示菜单 |
154
- | tag-style | Object | | 设置标签的默认样式 |
155
- | use-anchor | Boolean | false | 是否使用锚点链接 |
156
-
157
- 查看 [属性](https://jin-yufeng.gitee.io/mp-html/#/basic/prop) 了解更多
158
-
159
- ## 组件事件
160
-
161
- | 名称 | 触发时机 |
162
- |:---:|---|
163
- | load | dom 树加载完毕时 |
164
- | ready | 图片加载完毕时 |
165
- | error | 发生渲染错误时 |
166
- | imgtap | 图片被点击时 |
167
- | linktap | 链接被点击时 |
168
-
169
- 查看 [事件](https://jin-yufeng.gitee.io/mp-html/#/basic/event) 了解更多
170
-
171
- ## api
172
- 组件实例上提供了一些 `api` 方法可供调用
173
-
174
- | 名称 | 作用 |
175
- |:---:|---|
176
- | in | 将锚点跳转的范围限定在一个 scroll-view 内 |
177
- | navigateTo | 锚点跳转 |
178
- | getText | 获取文本内容 |
179
- | getRect | 获取富文本内容的位置和大小 |
180
- | setContent | 设置富文本内容 |
181
- | imgList | 获取所有图片的数组 |
182
- | pauseMedia | 暂停播放音视频([2.2.2+](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog#v222)) |
183
- | setPlaybackRate | 设置音视频播放速率([2.4.0+](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog#v240)) |
184
-
185
- 查看 [api](https://jin-yufeng.gitee.io/mp-html/#/advanced/api) 了解更多
186
-
187
- ## 插件扩展
188
- 除基本功能外,本组件还提供了丰富的扩展,可按照需要选用
189
-
190
- | 名称 | 作用 |
191
- |:---:|---|
192
- | audio | 音乐播放器 |
193
- | editable | 富文本编辑 |
194
- | emoji | 解析 emoji |
195
- | highlight | 代码块高亮显示 |
196
- | markdown | 渲染 markdown |
197
- | search | 关键词搜索 |
198
- | style | 匹配 style 标签中的样式 |
199
- | txv-video | 使用腾讯视频 |
200
- | img-cache | 图片缓存 by [@PentaTea](https://github.com/PentaTea) |
201
- | latex | 渲染 latex 公式 by [@Zeng-J](https://github.com/Zeng-J) |
202
- | card | 卡片展示 by [@whoooami](https://github.com/whoooami) |
203
-
204
- 查看 [插件](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin) 了解更多
205
-
206
- ## 许可与支持
207
- - 许可
208
- 您可以免费的使用(包括商用)、复制或修改本组件 [MIT License](https://github.com/jin-yufeng/mp-html/blob/master/LICENSE)
209
- 在用于生产环境前务必经过充分测试,由插件 `bug` 带来的损失概不负责(可以自行修改源码)
210
-
211
- - 联系
212
- 欢迎加入 `QQ` 交流群:
213
- 群1(已满):`699734691`
214
- 群2(已满):`778239129`
215
- 群3:`960265313`
216
-
217
- ## 更新日志
218
- - v2.5.0 (20240422)
219
- 1. `U` `play` 事件增加返回 `src` 等信息 [详细](https://github.com/jin-yufeng/mp-html/issues/526)
220
- 2. `U` `preview-img` 属性支持设置为 `all` 开启 `base64` 图片预览 [详细](https://github.com/jin-yufeng/mp-html/issues/536)
221
- 3. `U` `editable` 插件增加简易模式(点击文字直接编辑)
222
- 4. `U` `latex` 插件支持块级公式 [详细](https://github.com/jin-yufeng/mp-html/issues/582)
223
- 5. `F` 修复了表格部分情况下背景丢失的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/587)
224
- 6. `F` 修复了部分 `svg` 无法显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/591)
225
- 7. `F` 修复了 `uni-app` 包 `h5` 和 `app` 端部分情况下样式无法识别的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/518)
226
- 8. `F` 修复了 `latex` 插件部分情况下显示不正确的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/580)
227
- 9. `F` 修复了 `editable` 插件表格无法删除的问题
228
- 10. `F` 修复了 `editable` 插件 `uni-app` 包 `vue3` `h5` 端点击图片报错的问题
229
- 11. `F` 修复了 `editable` 插件 `uni-app` 包点击表格没有菜单栏的问题
230
-
231
- - v2.4.3 (20240121)
232
- 1. `A` 增加 [card](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#card) 插件 [详细](https://github.com/jin-yufeng/mp-html/pull/533) by [@whoooami](https://github.com/whoooami)
233
- 2. `F` 修复了 `svg` 中包含 `foreignobject` 可能不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/523)
234
- 3. `F` 修复了合并单元格的表格部分情况下显示不正确的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/561)
235
- 4. `F` 修复了 `img` 标签设置 `object-fit` 无效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/567)
236
- 5. `F` 修复了 `latex` 插件公式会换行的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/540)
237
- 6. `F` 修复了 `uni-app` 包 `editable` 和 `audio` 插件共用时点击 `audio` 无法编辑的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/529) by [@whoooami](https://github.com/whoooami)
238
- 7. `F` 修复了支付宝小程序设置了宽高的图片可能显示不正常的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/544)
239
- 8. `F` 修复了 `uni-app` 包微信小程序部分情况下图片会报错 `replace of undefined` 的问题
240
- 9. `F` 修复了 `uni-app` 包快手小程序图片不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/571)
241
-
242
- 从 `1.x` 的升级方法可见 [更新指南](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog?id=v200)
243
-
244
- 查看 [更新日志](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog) 了解更多
@@ -1 +0,0 @@
1
- ._root{padding:1px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}._select{-webkit-user-select:text;user-select:text}
@@ -1 +0,0 @@
1
- <view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot a:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]}}" onAdd="_add"/></view>
@@ -1,8 +0,0 @@
1
- "use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}/*!
2
- * mp-html v2.5.0
3
- * https://github.com/jin-yufeng/mp-html
4
- *
5
- * Released under the MIT license
6
- * Author: Jin Yufeng
7
- */
8
- var t=require("./parser"),n=[];Component({data:{nodes:[]},props:{containerStyle:"",content:"",copyLink:!0,domain:"",errorImg:"",lazyLoad:!1,loadingImg:"",pauseVideo:!0,previewImg:!0,scrollTable:!1,setTitle:!0,showImgMenu:!0,tagStyle:{}},didMount:function(){this.plugins=[];for(var e=n.length;e--;)this.plugins.push(new n[e](this));this.props.content&&this.setContent(this.props.content)},didUpdate:function(e){e.content!==this.props.content&&this.setContent(this.props.content)},didUnmount:function(){this._hook("onDetached")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(t,n){var i=this;return new Promise(function(o,r){if(!i.props.useAnchor)return void r(Error("Anchor is disabled"));var s=my.createSelectorQuery().select((i._in?i._in.selector:"._root")+(t?"".concat(" ","#").concat(t):"")).boundingClientRect();i._in?s.select(i._in.selector).scrollOffset().select(i._in.selector).boundingClientRect():s.selectViewport().scrollOffset(),s.exec(function(t){if(!t[0])return void r(Error("Label not found"));var s=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+(n||parseInt(i.props.useAnchor)||0);i._in?i._in.page.setData(e({},i._in.scrollTop,s)):my.pageScrollTo({scrollTop:s,duration:300}),o()})})},getText:function(e){var t="";return function e(n){for(var i=0;i<n.length;i++){var o=n[i];if("text"===o.type)t+=o.text.replace(/&amp;/g,"&");else if("br"===o.name)t+="\n";else{var r="p"===o.name||"div"===o.name||"tr"===o.name||"li"===o.name||"h"===o.name[0]&&o.name[1]>"0"&&o.name[1]<"7";r&&t&&"\n"!==t[t.length-1]&&(t+="\n"),o.children&&e(o.children),r&&"\n"!==t[t.length-1]?t+="\n":"td"!==o.name&&"th"!==o.name||(t+="\t")}}}(e||this.data.nodes),t},getRect:function(){return new Promise(function(e,t){my.createSelectorQuery().select("._root").boundingClientRect().exec(function(n){return n[0]?e(n[0]):t(Error("Root label not found"))})})},pauseMedia:function(){for(var e=(this._videos||[]).length;e--;)this._videos[e].pause()},setPlaybackRate:function(e){this.playbackRate=e;for(var t=(this._videos||[]).length;t--;)this._videos[t].playbackRate(e)},setContent:function(e,n){var i=this;this.imgList&&n||(this.imgList=[]),this._videos=[];var o={},r=new t(this).parse(e);if(n)for(var s=this.data.nodes.length,a=r.length;a--;)o["nodes[".concat(s+a,"]")]=r[a];else o.nodes=r;if(this.setData(o,function(){i._hook("onLoad"),i.props.onLoad&&i.props.onLoad()}),this.props.lazyLoad||this.imgList._unloadimgs<this.imgList.length/2){var l=0,c=function e(t){t&&t.height||(t={}),t.height===l?i.props.onReady&&i.props.onReady(t):(l=t.height,setTimeout(function(){i.getRect().then(e).catch(e)},350))};this.getRect().then(c).catch(c)}else this.imgList._unloadimgs||this.getRect().then(function(e){i.props.onReady&&i.props.onReady(e)}).catch(function(){i.props.onReady&&i.props.onReady({})})},_hook:function(e){for(var t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()},_add:function(e){e.root=this}}});
@@ -1 +0,0 @@
1
- {"component":true,"usingComponents":{"node":"./node/node"}}
@@ -1 +0,0 @@
1
- ._a{padding:1.5px 0 1.5px 0;color:#366092;word-break:break-all}._hover{text-decoration:underline;opacity:.7}._img{max-width:100%;-webkit-touch-callout:none}._b,._strong{font-weight:700}._code{font-family:monospace}._del{text-decoration:line-through}._em,._i{font-style:italic}._h1{font-size:2em}._h2{font-size:1.5em}._h3{font-size:1.17em}._h5{font-size:.83em}._h6{font-size:.67em}._h1,._h2,._h3,._h4,._h5,._h6{display:block;font-weight:700}._ins{text-decoration:underline}._li{display:list-item}._ol{list-style-type:decimal}._ol,._ul{display:block;padding-left:40px;margin:1em 0}._q::before{content:'"'}._q::after{content:'"'}._sub{font-size:smaller;vertical-align:sub}._sup{font-size:smaller;vertical-align:super}._tbody,._tfoot,._thead{display:table-row-group}._tr{display:table-row}._td,._th{display:table-cell;vertical-align:middle}._th{font-weight:700;text-align:center}._ul{list-style-type:disc}._ul ._ul{margin:0;list-style-type:circle}._ul ._ul ._ul{list-style-type:square}._abbr,._b,._code,._del,._em,._i,._ins,._label,._q,._span,._strong,._sub,._sup{display:inline}
@@ -1 +0,0 @@
1
- <template name="el"><block a:if="{{n.name==='img'}}"><rich-text a:if="{{n.t}}" style="display:{{n.t}}" nodes="<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>" data-i="{{i}}" catchTap="imgTap"/><block a:else><image a:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))}}" lazy-load="{{opts[0]}}" data-i="{{i}}" onLoad="imgLoad" onError="mediaError" catchTap="imgTap" onLongTap="noop"/></block></block><text a:elif="{{n.name==='br'}}">\n</text><view a:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchTap="linkTap"><template is="node" data="{{childs:n.children,path:i+'_',opts:opts,ctrl:ctrl}}"></template></view><video a:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" object-fit="{{n.attrs['object-fit']}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" onPlay="play" onError="mediaError"/><audio a:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" onPlay="play" onError="mediaError"/><rich-text a:else id="{{n.attrs.id}}" style="display:inline;{{n.f}}" nodes="{{[n]}}"/></template><template name="node"><block a:for="{{childs}}" a:for-item="n" a:for-index="i" a:key="i"><template a:if="{{!n.c}}" is="el" data="{{n:n,i:path+i,opts:opts,ctrl:ctrl}}"/><view a:else id="{{n.attrs.id}}" class="_{{n.name}} {{n.attrs.class}}" style="{{n.attrs.style}}"><template is="node" data="{{childs:n.children,path:path+i+'_',opts:opts,ctrl:ctrl}}"></template></view></block></template><template is="node" data="{{childs:childs,path:'',opts:opts,ctrl:ctrl}}"></template>
@@ -1 +0,0 @@
1
- "use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function e(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(Object(o),!0).forEach(function(t){r(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Component({data:{ctrl:{}},props:{childs:[],opts:[]},options:{addGlobalClass:!0},didMount:function(){this.props.onAdd(this)},methods:{noop:function(){},getNode:function(t){try{for(var e=t.split("_"),r=this.props.childs[e[0]],i=1;i<e.length;i++)r=r.children[e[i]];return r}catch(t){return{text:"",attrs:{},children:[]}}},play:function(t){var r=t.target.dataset.i,i=this.getNode(r);if(this.root.props.onPlay&&this.root.props.onPlay({source:i.name,attrs:e(e({},i.attrs),{},{src:i.src[this.data.ctrl[r]||0]})}),this.root.props.pauseVideo){for(var o=!1,a=t.target.id,s=this.root._videos.length;s--;)this.root._videos[s].id===a?o=!0:this.root._videos[s].pause();if(!o){var n=my.createVideoContext(a,this);n.id=a,this.root.playbackRate&&n.playbackRate(this.root.playbackRate),this.root._videos.push(n)}}},imgTap:function(t){var e=this.getNode(t.target.dataset.i);if(e.a)return this.linkTap(e.a);if(!e.attrs.ignore&&(this.root.props.onImgtap&&this.root.props.onImgtap(e.attrs),this.root.props.previewImg)){var r=e.i;my.previewImage({enablesavephoto:this.root.props.showImgMenu,enableShowPhotoDownload:this.root.props.showImgMenu,current:r,urls:this.root.imgList})}},imgLoad:function(t){var e,i=t.target.dataset.i,o=this.getNode(i);o.w?(this.props.opts[1]&&!this.data.ctrl[i]||-1===this.data.ctrl[i])&&(e=1):e=t.detail.width,e&&this.setData(r({},"ctrl."+i,e)),this.checkReady()},checkReady:function(){var t=this;this.root.props.lazyLoad||(this.root.imgList._unloadimgs-=1,this.root.imgList._unloadimgs||setTimeout(function(){t.root.getRect().then(function(e){t.root.props.onReady&&t.root.props.onReady(e)}).catch(function(){t.root.props.onReady&&t.root.props.onReady({})})},350))},linkTap:function(t){var e=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},r=e.attrs||t,i=r.href;this.root.props.onLinktap&&this.root.props.onLinktap(Object.assign({innerText:this.root.getText(e.children||[])},r)),i&&("#"===i[0]?this.root.navigateTo(i.substring(1)).catch(function(){}):i.split("?")[0].includes("://")?this.root.props.copyLink&&my.setClipboard({text:i,success:function(){return my.showToast({content:"链接已复制"})}}):my.navigateTo({url:i,fail:function(){my.switchTab({url:i,fail:function(){}})}}))},mediaError:function(t){var e=t.target.dataset.i,i=this.getNode(e);if("video"===i.name||"audio"===i.name){var o=(this.data.ctrl[e]||0)+1;if(o>i.src.length&&(o=0),o<i.src.length)return this.setData(r({},"ctrl."+e,o))}else"img"===i.name&&(this.props.opts[2]&&this.setData(r({},"ctrl."+e,-1)),this.checkReady());this.root&&this.root.props.onError&&this.root.props.onError({source:i.name,attrs:i.attrs,errMsg:t.detail.errMsg})}}});
@@ -1 +0,0 @@
1
- {"component":true,"usingComponents":{"node":"./node"}}
@@ -1 +0,0 @@
1
- "use strict";function t(t,e){var s;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(s=i(t))||e&&t&&"number"==typeof t.length){s&&(t=s);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,l=!1;return{s:function(){s=t[Symbol.iterator]()},n:function(){var t=s.next();return o=t.done,t},e:function(t){l=!0,r=t},f:function(){try{o||null==s.return||s.return()}finally{if(l)throw r}}}}function i(t,i){if(t){if("string"==typeof t)return e(t,i);var s=Object.prototype.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?e(t,i):void 0}}function e(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,s=new Array(i);e<i;e++)s[e]=t[e];return s}function s(t){for(var i=Object.create(null),e=t.split(","),s=e.length;s--;)i[e[s]]=!0;return i}function n(t,i){for(var e=t.indexOf("&");-1!==e;){var s=t.indexOf(";",e+3),n=void 0;if(-1===s)break;"#"===t[e+1]?(n=parseInt(("x"===t[e+2]?"0":"")+t.substring(e+2,s)),isNaN(n)||(t=t.substr(0,e)+String.fromCharCode(n)+t.substr(s+1))):(n=t.substring(e+1,s),(l.entities[n]||"amp"===n&&i)&&(t=t.substr(0,e)+(l.entities[n]||"&")+t.substr(s+1))),e=t.indexOf("&",e+1)}return t}function a(t){for(var i=t.length-1,e=i;e>=-1;e--)(-1===e||t[e].c||!t[e].name||"div"!==t[e].name&&"p"!==t[e].name&&"h"!==t[e].name[0]||(t[e].attrs.style||"").includes("inline"))&&(i-e>=5&&t.splice(e+1,i-e,{name:"div",attrs:{},children:t.slice(e+1,i+1)}),i=e-1)}function r(t){this.options=t.props||{},this.tagStyle=Object.assign({},l.tagStyle,this.options.tagStyle),this.imgList=t.imgList||[],this.imgList._unloadimgs=0,this.plugins=t.plugins||[],this.attrs=Object.create(null),this.stack=[],this.nodes=[],this.pre=(this.options.containerStyle||"").includes("white-space")&&this.options.containerStyle.includes("pre")?2:0}function o(t){this.handler=t}var l={trustTags:s("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"),blockTags:s("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),ignoreTags:s("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"),voidTags:s("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),entities:{lt:"<",gt:">",quot:'"',apos:"'",ensp:" ",emsp:" ",nbsp:" ",semi:";",ndash:"–",mdash:"—",middot:"·",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",hellip:"…",larr:"←",uarr:"↑",rarr:"→",darr:"↓"},tagStyle:{address:"font-style:italic",big:"display:inline;font-size:1.2em",caption:"display:table-caption;text-align:center",center:"text-align:center",cite:"font-style:italic",dd:"margin-left:40px",mark:"background-color:yellow",pre:"font-family:monospace;white-space:pre",s:"text-decoration:line-through",small:"display:inline;font-size:0.8em",strike:"text-decoration:line-through",u:"text-decoration:underline"},svgDict:{animatetransform:"animateTransform",lineargradient:"linearGradient",viewbox:"viewBox",attributename:"attributeName",repeatcount:"repeatCount",repeatdur:"repeatDur",foreignobject:"foreignObject"}},h={},c=my.getSystemInfoSync(),d=c.windowWidth,p=s(" ,\r,\n,\t,\f"),u=0;r.prototype.parse=function(t){for(var i=this.plugins.length;i--;)this.plugins[i].onUpdate&&(t=this.plugins[i].onUpdate(t,l)||t);for(new o(this).parse(t);this.stack.length;)this.popNode();return this.nodes.length>50&&a(this.nodes),this.nodes},r.prototype.expose=function(){for(var t=this.stack.length;t--;){var i=this.stack[t];if(i.c||"a"===i.name||"video"===i.name||"audio"===i.name)return;i.c=1}},r.prototype.hook=function(t){for(var i=this.plugins.length;i--;)if(this.plugins[i].onParse&&!1===this.plugins[i].onParse(t,this))return!1;return!0},r.prototype.getUrl=function(t){var i=this.options.domain;return"/"===t[0]?"/"===t[1]?t=(i?i.split("://")[0]:"http")+":"+t:i&&(t=i+t):!i||t.includes("data:")||t.includes("://")||(t=i+"/"+t),t},r.prototype.parseStyle=function(t){var i=t.attrs,e=(this.tagStyle[t.name]||"").split(";").concat((i.style||"").split(";")),s={},n="";i.id&&!this.xml&&(this.options.useAnchor?this.expose():"img"!==t.name&&"a"!==t.name&&"video"!==t.name&&"audio"!==t.name&&(i.id=void 0)),i.width&&(s.width=parseFloat(i.width)+(i.width.includes("%")?"%":"px"),i.width=void 0),i.height&&(s.height=parseFloat(i.height)+(i.height.includes("%")?"%":"px"),i.height=void 0);for(var a=0,r=e.length;a<r;a++){var o=e[a].split(":");if(!(o.length<2)){var l=o.shift().trim().toLowerCase(),h=o.join(":").trim();if("-"===h[0]&&h.lastIndexOf("-")>0||h.includes("safe"))n+=";".concat(l,":").concat(h);else if(!s[l]||h.includes("import")||!s[l].includes("import")){if(h.includes("url")){var c=h.indexOf("(")+1;if(c){for(;'"'===h[c]||"'"===h[c]||p[h[c]];)c++;h=h.substr(0,c)+this.getUrl(h.substr(c))}}else h.includes("rpx")&&(h=h.replace(/[0-9.]+\s*rpx/g,function(t){return parseFloat(t)*d/750+"px"}));s[l]=h}}}return t.attrs.style=n,s},r.prototype.onTagName=function(t){this.tagName=this.xml?t:t.toLowerCase(),"svg"===this.tagName&&(this.xml=(this.xml||0)+1,l.ignoreTags.style=void 0)},r.prototype.onAttrName=function(t){t=this.xml?t:t.toLowerCase(),"data-"===t.substr(0,5)?"data-src"!==t||this.attrs.src?"img"===this.tagName||"a"===this.tagName?this.attrName=t:this.attrName=void 0:this.attrName="src":(this.attrName=t,this.attrs[t]="T")},r.prototype.onAttrVal=function(t){var i=this.attrName||"";"style"===i||"href"===i?this.attrs[i]=n(t,!0):i.includes("src")?this.attrs[i]=this.getUrl(n(t,!0)):i&&(this.attrs[i]=t)},r.prototype.onOpenTag=function(t){var i=Object.create(null);i.name=this.tagName,i.attrs=this.attrs,this.attrs=Object.create(null);var e=i.attrs,s=this.stack[this.stack.length-1],n=s?s.children:this.nodes,a=this.xml?t:l.voidTags[i.name];if(h[i.name]&&(e.class=h[i.name]+(e.class?" "+e.class:"")),"embed"===i.name){var r=e.src||"";r.includes(".mp4")||r.includes(".3gp")||r.includes(".m3u8")||(e.type||"").includes("video")?i.name="video":(r.includes(".mp3")||r.includes(".wav")||r.includes(".aac")||r.includes(".m4a")||(e.type||"").includes("audio"))&&(i.name="audio"),e.autostart&&(e.autoplay="T"),e.controls="T"}if("video"!==i.name&&"audio"!==i.name||("video"!==i.name||e.id||(e.id="v"+u++),e.controls||e.autoplay||(e.controls="T"),i.src=[],e.src&&(i.src.push(e.src),e.src=void 0),this.expose()),a){if(!this.hook(i)||l.ignoreTags[i.name])return void("base"!==i.name||this.options.domain?"source"===i.name&&s&&("video"===s.name||"audio"===s.name)&&e.src&&s.src.push(e.src):this.options.domain=e.href);var o=this.parseStyle(i);if("img"===i.name){if(e.src&&(e.src.includes("webp")&&(i.webp="T"),e.src.includes("data:")&&"all"!==this.options.previewImg&&!e["original-src"]&&(e.ignore="T"),!e.ignore||i.webp||e.src.includes("cloud://"))){for(var c=this.stack.length;c--;){var p=this.stack[c];"table"!==p.name||i.webp||e.src.includes("cloud://")||(!o.display||o.display.includes("inline")?i.t="inline-block":i.t=o.display,o.display=void 0);var f=p.attrs.style||"";if(!f.includes("flex:")||f.includes("flex:0")||f.includes("flex: 0")||o.width&&!(parseInt(o.width)>100))if(f.includes("flex")&&"100%"===o.width)for(var g=c+1;g<this.stack.length;g++){var m=this.stack[g].attrs.style||"";if(!m.includes(";width")&&!m.includes(" width")&&0!==m.indexOf("width")){o.width="";break}}else f.includes("inline-block")&&(o.width&&"%"===o.width[o.width.length-1]?(p.attrs.style+=";max-width:"+o.width,o.width=""):p.attrs.style+=";max-width:100%");else{o.width="100% !important",o.height="";for(var v=c+1;v<this.stack.length;v++)this.stack[v].attrs.style=(this.stack[v].attrs.style||"").replace("inline-","")}"a"===p.name?i.a=p.attrs:p.c=1}i.i=this.imgList.length;var y=e["original-src"]||e.src;this.imgList.push(y),i.t||(this.imgList._unloadimgs+=1)}"inline"===o.display&&(o.display=""),e.ignore&&(o["max-width"]=o["max-width"]||"100%",e.style+=";-webkit-touch-callout:none"),parseInt(o.width)>d&&(o.height=void 0),isNaN(parseInt(o.width))||(i.w="T"),!isNaN(parseInt(o.height))&&(!o.height.includes("%")||s&&(s.attrs.style||"").includes("height"))&&(i.h="T"),i.w&&i.h&&o["object-fit"]&&("contain"===o["object-fit"]?i.m="aspectFit":"cover"===o["object-fit"]&&(i.m="aspectFill"))}else if("svg"===i.name)return n.push(i),this.stack.push(i),void this.popNode();for(var b in o)o[b]&&(e.style+=";".concat(b,":").concat(o[b].replace(" !important","")));e.style=e.style.substr(1)||void 0}else("pre"===i.name||(e.style||"").includes("white-space")&&e.style.includes("pre"))&&2!==this.pre&&(this.pre=i.pre=1),i.children=[],this.stack.push(i);n.push(i)},r.prototype.onCloseTag=function(t){t=this.xml?t:t.toLowerCase();var i;for(i=this.stack.length;i--&&this.stack[i].name!==t;);if(-1!==i)for(;this.stack.length>i;)this.popNode();else if("p"===t||"br"===t){var e=this.stack.length?this.stack[this.stack.length-1].children:this.nodes;e.push({name:t,attrs:{class:h[t],style:this.tagStyle[t]}})}},r.prototype.popNode=function(){var i=this.stack.pop(),e=i.attrs,s=i.children,n=this.stack[this.stack.length-1],r=n?n.children:this.nodes;if(!this.hook(i)||l.ignoreTags[i.name])return"title"===i.name&&s.length&&"text"===s[0].type&&this.options.setTitle&&my.setNavigationBar({title:s[0].text}),void r.pop();if(i.pre&&2!==this.pre){this.pre=i.pre=void 0;for(var o=this.stack.length;o--;)this.stack[o].pre&&(this.pre=1)}if("svg"===i.name){if(this.xml>1)return void this.xml--;var h="",c=e.style;return e.style="",e.xmlns="http://www.w3.org/2000/svg",function i(e){if("text"===e.type)return void(h+=e.text);var s=l.svgDict[e.name]||e.name;if("foreignObject"===s){var n,a=t(e.children||[]);try{for(a.s();!(n=a.n()).done;){var r=n.value;if(r.attrs&&!r.attrs.xmlns){r.attrs.xmlns="http://www.w3.org/1999/xhtml";break}}}catch(t){a.e(t)}finally{a.f()}}h+="<"+s;for(var o in e.attrs){var c=e.attrs[o];c&&(h+=" ".concat(l.svgDict[o]||o,'="').concat(c.replace(/"/g,""),'"'))}if(e.children){h+=">";for(var d=0;d<e.children.length;d++)i(e.children[d]);h+="</"+s+">"}else h+="/>"}(i),i.name="img",i.attrs={src:"data:image/svg+xml;utf8,"+h.replace(/#/g,"%23"),style:c,ignore:"T"},i.children=void 0,this.xml=!1,void(l.ignoreTags.style=!0)}var p={};if(e.align&&("table"===i.name?"center"===e.align?p["margin-inline-start"]=p["margin-inline-end"]="auto":p.float=e.align:p["text-align"]=e.align,e.align=void 0),e.dir&&(p.direction=e.dir,e.dir=void 0),"font"===i.name&&(e.color&&(p.color=e.color,e.color=void 0),e.face&&(p["font-family"]=e.face,e.face=void 0),e.size)){var u=parseInt(e.size);isNaN(u)||(u<1?u=1:u>7&&(u=7),p["font-size"]=["x-small","small","medium","large","x-large","xx-large","xxx-large"][u-1]),e.size=void 0}if((e.class||"").includes("align-center")&&(p["text-align"]="center"),Object.assign(p,this.parseStyle(i)),"table"!==i.name&&parseInt(p.width)>d&&(p["max-width"]="100%",p["box-sizing"]="border-box"),l.blockTags[i.name])i.name="div";else if(l.trustTags[i.name]||this.xml)if("a"===i.name||"ad"===i.name)this.expose();else if("video"===i.name||"audio"===i.name)(p.height||"").includes("auto")&&(p.height=void 0),i.children=void 0;else if("ul"!==i.name&&"ol"!==i.name||!i.c)if("table"===i.name){var f=parseFloat(e.cellpadding),g=parseFloat(e.cellspacing),m=parseFloat(e.border),v=p["border-color"],y=p["border-style"];if(i.c&&(isNaN(f)&&(f=2),isNaN(g)&&(g=2)),m&&(e.style+=";border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray")),i.flag&&i.c){i.flag=void 0,p.display="grid","collapse"===p["border-collapse"]&&(p["border-collapse"]=void 0,g=0),g?(p["grid-gap"]=g+"px",p.padding=g+"px"):m&&(e.style+=";border-left:0;border-top:0");var b=[],x=[],w=[],k={};!function i(e){for(var s=0;s<e.length;s++)if("tr"===e[s].name)x.push(e[s]);else if("colgroup"===e[s].name){var n,a=1,r=t(e[s].children||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;if("col"===o.name){var l=o.attrs.style||"",h=l.indexOf("width")?l.indexOf(";width"):0;if(-1!==h){var c=l.indexOf(";",h+6);-1===c&&(c=l.length),b[a]=l.substring(h?h+7:6,c)}a+=1}}}catch(t){r.e(t)}finally{r.f()}}else i(e[s].children||[])}(s);for(var N=1;N<=x.length;N++){for(var T=1,O=0;O<x[N-1].children.length;O++){var j=x[N-1].children[O];if("td"===j.name||"th"===j.name){for(;k[N+"."+T];)T++;j.c=1;var S=j.attrs.style||"",A=S.indexOf("width")?S.indexOf(";width"):0;if(-1!==A){var C=S.indexOf(";",A+6);-1===C&&(C=S.length),j.attrs.colspan||(b[T]=S.substring(A?A+7:6,C)),S=S.substr(0,A)+S.substr(C)}if(S+=";display:flex;flex-direction:column",-1!==(A=S.indexOf("vertical-align"))){var I=S.substr(A+15,10);I.includes("middle")?S+=";justify-content:center":I.includes("bottom")&&(S+=";justify-content:flex-end")}else S+=";justify-content:center";if(-1!==(A=S.indexOf("text-align"))){var z=S.substr(A+11,10);z.includes("center")?S+=";justify-content: center":z.includes("right")&&(S+=";justify-content: right")}if(S=(m?";border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray")+(g?"":";border-right:0;border-bottom:0"):"")+(f?";padding:".concat(f,"px"):"")+";"+S,j.attrs.colspan&&(S+=";grid-column-start:".concat(T,";grid-column-end:").concat(T+parseInt(j.attrs.colspan)),j.attrs.rowspan||(S+=";grid-row-start:".concat(N,";grid-row-end:").concat(N+1)),T+=parseInt(j.attrs.colspan)-1),j.attrs.rowspan){S+=";grid-row-start:".concat(N,";grid-row-end:").concat(N+parseInt(j.attrs.rowspan)),j.attrs.colspan||(S+=";grid-column-start:".concat(T,";grid-column-end:").concat(T+1));for(var L=1;L<j.attrs.rowspan;L++)for(var F=0;F<(j.attrs.colspan||1);F++)k[N+L+"."+(T-F)]=1}S&&(j.attrs.style=S),w.push(j),T++}}if(1===N){for(var q="",U=1;U<T;U++)q+=(b[U]?b[U]:"auto")+" ";p["grid-template-columns"]=q}}i.children=w}else i.c&&(p.display="table"),isNaN(g)||(p["border-spacing"]=g+"px"),(m||f||i.c)&&function t(e){for(var s=0;s<e.length;s++){var n=e[s];i.c&&(n.c=1),"th"===n.name||"td"===n.name?(m&&(n.attrs.style="border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray",";").concat(n.attrs.style||"")),f&&(n.attrs.style="padding:".concat(f,"px;").concat(n.attrs.style||""))):n.children&&t(n.children)}}(s);if(this.options.scrollTable&&!(e.style||"").includes("inline")){var V=Object.assign({},i);i.name="div",i.attrs={style:"overflow-x:auto;padding:1px"},i.children=[V],e=V.attrs}}else if(("tbody"===i.name||"tr"===i.name)&&i.flag&&i.c)i.flag=void 0,function t(i){for(var e=0;e<i.length;e++)if("td"===i[e].name)for(var s=0,n=["color","background","background-color"];s<n.length;s++){var a=n[s];p[a]&&(i[e].attrs.style=a+":"+p[a]+";"+(i[e].attrs.style||""))}else t(i[e].children||[])}(s);else if("td"!==i.name&&"th"!==i.name||!e.colspan&&!e.rowspan){if("ruby"===i.name){i.name="span";for(var D=0;D<s.length-1;D++)"text"===s[D].type&&"rt"===s[D+1].name&&(s[D]={name:"span",attrs:{style:"display:inline-block;text-align:center"},children:[{name:"div",attrs:{style:"font-size:50%;"+(s[D+1].attrs.style||"")},children:s[D+1].children},s[D]]},s.splice(D+1,1))}}else for(var B=this.stack.length;B--;)"table"!==this.stack[B].name&&"tbody"!==this.stack[B].name&&"tr"!==this.stack[B].name||(this.stack[B].flag=1);else{var P={a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman"};P[e.type]&&(e.style+=";list-style-type:"+P[e.type],e.type=void 0),i.c=1;for(var Z=s.length;Z--;)"li"===s[Z].name&&(s[Z].c=1)}else i.name="span";if((p.display||"").includes("flex")&&!i.c)for(var _=s.length;_--;){var E=s[_];E.f&&(E.attrs.style=(E.attrs.style||"")+E.f,E.f=void 0)}var G=n&&((n.attrs.style||"").includes("flex")||(n.attrs.style||"").includes("grid"))&&!i.c;G&&(i.f=";max-width:100%"),s.length>=50&&i.c&&!(p.display||"").includes("flex")&&a(s);for(var M in p)if(p[M]){var W=";".concat(M,":").concat(p[M].replace(" !important",""));G&&(M.includes("flex")&&"flex-direction"!==M||"align-self"===M||M.includes("grid")||"-"===p[M][0]||M.includes("width")&&W.includes("%"))?(i.f+=W,"width"===M&&(e.style+=";width:100%")):e.style+=W}e.style=e.style.substr(1)||void 0},r.prototype.onText=function(t){if(!this.pre){for(var i,e="",s=0,a=t.length;s<a;s++)p[t[s]]?(" "!==e[e.length-1]&&(e+=" "),"\n"!==t[s]||i||(i=!0)):e+=t[s];if(" "===e&&i)return;t=e}var r=Object.create(null);if(r.type="text",r.text=n(t),this.hook(r)){(this.stack.length?this.stack[this.stack.length-1].children:this.nodes).push(r)}},o.prototype.parse=function(t){this.content=t||"",this.i=0,this.start=0,this.state=this.text;for(var i=this.content.length;-1!==this.i&&this.i<i;)this.state()},o.prototype.checkClose=function(t){var i="/"===this.content[this.i];return!!(">"===this.content[this.i]||i&&">"===this.content[this.i+1])&&(t&&this.handler[t](this.content.substring(this.start,this.i)),this.i+=i?2:1,this.start=this.i,this.handler.onOpenTag(i),"script"===this.handler.tagName?(this.i=this.content.indexOf("</",this.i),-1!==this.i&&(this.i+=2,this.start=this.i),this.state=this.endTag):this.state=this.text,!0)},o.prototype.text=function(){if(this.i=this.content.indexOf("<",this.i),-1===this.i)return void(this.start<this.content.length&&this.handler.onText(this.content.substring(this.start,this.content.length)));var t=this.content[this.i+1];if(t>="a"&&t<="z"||t>="A"&&t<="Z")this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i)),this.start=++this.i,this.state=this.tagName;else if("/"===t||"!"===t||"?"===t){this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i));var i=this.content[this.i+2];if("/"===t&&(i>="a"&&i<="z"||i>="A"&&i<="Z"))return this.i+=2,this.start=this.i,void(this.state=this.endTag);var e="--\x3e";"!"===t&&"-"===this.content[this.i+2]&&"-"===this.content[this.i+3]||(e=">"),this.i=this.content.indexOf(e,this.i),-1!==this.i&&(this.i+=e.length,this.start=this.i)}else this.i++},o.prototype.tagName=function(){if(p[this.content[this.i]]){for(this.handler.onTagName(this.content.substring(this.start,this.i));p[this.content[++this.i]];);this.i<this.content.length&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)}else this.checkClose("onTagName")||this.i++},o.prototype.attrName=function(){var t=this.content[this.i];if(p[t]||"="===t){this.handler.onAttrName(this.content.substring(this.start,this.i));for(var i="="===t,e=this.content.length;++this.i<e;)if(t=this.content[this.i],!p[t]){if(this.checkClose())return;if(i)return this.start=this.i,void(this.state=this.attrVal);if("="!==this.content[this.i])return this.start=this.i,void(this.state=this.attrName);i=!0}}else this.checkClose("onAttrName")||this.i++},o.prototype.attrVal=function(){var t=this.content[this.i],i=this.content.length;if('"'===t||"'"===t){if(this.start=++this.i,this.i=this.content.indexOf(t,this.i),-1===this.i)return;this.handler.onAttrVal(this.content.substring(this.start,this.i))}else for(;this.i<i;this.i++){if(p[this.content[this.i]]){this.handler.onAttrVal(this.content.substring(this.start,this.i));break}if(this.checkClose("onAttrVal"))return}for(;p[this.content[++this.i]];);this.i<i&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)},o.prototype.endTag=function(){var t=this.content[this.i];if(p[t]||">"===t||"/"===t){if(this.handler.onCloseTag(this.content.substring(this.start,this.i)),">"!==t&&(this.i=this.content.indexOf(">",this.i),-1===this.i))return;this.start=++this.i,this.state=this.text}else this.i++},module.exports=r;
@@ -1 +0,0 @@
1
- ._root{padding:1px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}._select{-webkit-user-select:text;user-select:text}
@@ -1,8 +0,0 @@
1
- "use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}/*!
2
- * mp-html v2.5.0
3
- * https://github.com/jin-yufeng/mp-html
4
- *
5
- * Released under the MIT license
6
- * Author: Jin Yufeng
7
- */
8
- var t=require("./parser"),n=[];Component({data:{nodes:[]},properties:{containerStyle:String,content:{type:String,value:"",observer:function(e){this.setContent(e)}},copyLink:{type:Boolean,value:!0},domain:String,errorImg:String,lazyLoad:Boolean,loadingImg:String,pauseVideo:{type:Boolean,value:!0},previewImg:{type:null,value:!0},scrollTable:Boolean,selectable:null,setTitle:{type:Boolean,value:!0},showImgMenu:{type:Boolean,value:!0},tagStyle:Object,useAnchor:null},created:function(){this.plugins=[];for(var e=n.length;e--;)this.plugins.push(new n[e](this))},detached:function(){this._hook("onDetached")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(t,n){var i=this;return new Promise(function(o,r){if(!i.data.useAnchor)return void r(Error("Anchor is disabled"));var a=swan.createSelectorQuery().in(i._in?i._in.page:i).select((i._in?i._in.selector:"._root")+(t?"".concat(" ","#").concat(t):"")).boundingClientRect();i._in?a.select(i._in.selector).scrollOffset().select(i._in.selector).boundingClientRect():a.selectViewport().scrollOffset(),a.exec(function(t){if(!t[0])return void r(Error("Label not found"));var a=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+(n||parseInt(i.data.useAnchor)||0);i._in?i._in.page.setData(e({},i._in.scrollTop,a)):swan.pageScrollTo({scrollTop:a,duration:300}),o()})})},getText:function(e){var t="";return function e(n){for(var i=0;i<n.length;i++){var o=n[i];if("text"===o.type)t+=o.text.replace(/&amp;/g,"&");else if("br"===o.name)t+="\n";else{var r="p"===o.name||"div"===o.name||"tr"===o.name||"li"===o.name||"h"===o.name[0]&&o.name[1]>"0"&&o.name[1]<"7";r&&t&&"\n"!==t[t.length-1]&&(t+="\n"),o.children&&e(o.children),r&&"\n"!==t[t.length-1]?t+="\n":"td"!==o.name&&"th"!==o.name||(t+="\t")}}}(e||this.data.nodes),t},getRect:function(){var e=this;return new Promise(function(t,n){swan.createSelectorQuery().in(e).select("._root").boundingClientRect().exec(function(e){return e[0]?t(e[0]):n(Error("Root label not found"))})})},pauseMedia:function(){for(var e=(this._videos||[]).length;e--;)this._videos[e].pause()},setPlaybackRate:function(e){this.playbackRate=e;for(var t=(this._videos||[]).length;t--;)this._videos[t].playbackRate(e)},setContent:function(e,n){var i=this;this.imgList&&n||(this.imgList=[]),this._videos=[];var o={},r=new t(this).parse(e);if(n)for(var a=this.data.nodes.length,s=r.length;s--;)o["nodes[".concat(a+s,"]")]=r[s];else o.nodes=r;if(this.setData(o,function(){i._hook("onLoad"),i.triggerEvent("load")}),this.data.lazyLoad||this.imgList._unloadimgs<this.imgList.length/2){var l=0,c=function e(t){t&&t.height||(t={}),t.height===l?i.triggerEvent("ready",t):(l=t.height,setTimeout(function(){i.getRect().then(e).catch(e)},350))};this.getRect().then(c).catch(c)}else this.imgList._unloadimgs||this.getRect().then(function(e){i.triggerEvent("ready",e)}).catch(function(){i.triggerEvent("ready",{})})},_hook:function(e){for(var t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()},_add:function(e){e.detail.root=this}}});
@@ -1 +0,0 @@
1
- {"component":true,"usingComponents":{"node":"./node/node"}}
@@ -1 +0,0 @@
1
- <view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot s-if="!nodes[0]"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]}}" catchadd="_add"/></view>
@@ -1 +0,0 @@
1
- ._a{padding:1.5px 0 1.5px 0;color:#366092;word-break:break-all}._hover{text-decoration:underline;opacity:.7}._img{max-width:100%;-webkit-touch-callout:none}._b,._strong{font-weight:700}._code{font-family:monospace}._del{text-decoration:line-through}._em,._i{font-style:italic}._h1{font-size:2em}._h2{font-size:1.5em}._h3{font-size:1.17em}._h5{font-size:.83em}._h6{font-size:.67em}._h1,._h2,._h3,._h4,._h5,._h6{display:block;font-weight:700}._ins{text-decoration:underline}._li{display:list-item}._ol{list-style-type:decimal}._ol,._ul{display:block;padding-left:40px;margin:1em 0}._q::before{content:'"'}._q::after{content:'"'}._sub{font-size:smaller;vertical-align:sub}._sup{font-size:smaller;vertical-align:super}._tbody,._tfoot,._thead{display:table-row-group}._tr{display:table-row}._td,._th{display:table-cell;vertical-align:middle}._th{font-weight:700;text-align:center}._ul{list-style-type:disc}._ul ._ul{margin:0;list-style-type:circle}._ul ._ul ._ul{list-style-type:square}._abbr,._b,._code,._del,._em,._i,._ins,._label,._q,._span,._strong,._sub,._sup{display:inline}._blockquote,._div,._p{display:block}
@@ -1 +0,0 @@
1
- "use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function e(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(Object(o),!0).forEach(function(t){r(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Component({data:{ctrl:{}},properties:{childs:Array,opts:Array},options:{addGlobalClass:!0},attached:function(){this.triggerEvent("add",this,{bubbles:!0,composed:!0})},methods:{noop:function(){},getNode:function(t){try{for(var e=t.split("_"),r=this.data.childs[e[0]],i=1;i<e.length;i++)r=r.children[e[i]];return r}catch(t){return{text:"",attrs:{},children:[]}}},play:function(t){var r=t.target.dataset.i,i=this.getNode(r);if(this.root.triggerEvent("play",{source:i.name,attrs:e(e({},i.attrs),{},{src:i.src[this.data.ctrl[r]||0]})}),this.root.data.pauseVideo){for(var o=!1,a=t.target.id,s=this.root._videos.length;s--;)this.root._videos[s].id===a?o=!0:this.root._videos[s].pause();if(!o){var n=swan.createVideoContext(a);n.id=a,this.root.playbackRate&&n.playbackRate(this.root.playbackRate),this.root._videos.push(n)}}},imgTap:function(t){var e=this.getNode(t.target.dataset.i);if(e.a)return this.linkTap(e.a);if(!e.attrs.ignore&&(this.root.triggerEvent("imgtap",e.attrs),this.root.data.previewImg)){var r=this.root.imgList[e.i];swan.previewImage({current:r,urls:this.root.imgList})}},imgLoad:function(t){var e,i=t.target.dataset.i,o=this.getNode(i);o.w?(this.data.opts[1]&&!this.data.ctrl[i]||-1===this.data.ctrl[i])&&(e=1):e=t.detail.width,e&&this.setData(r({},"ctrl."+i,e)),this.checkReady()},checkReady:function(){var t=this;this.root.data.lazyLoad||(this.root.imgList._unloadimgs-=1,this.root.imgList._unloadimgs||setTimeout(function(){t.root.getRect().then(function(e){t.root.triggerEvent("ready",e)}).catch(function(){t.root.triggerEvent("ready",{})})},350))},linkTap:function(t){var e=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},r=e.attrs||t,i=r.href;this.root.triggerEvent("linktap",Object.assign({innerText:this.root.getText(e.children||[])},r)),i&&("#"===i[0]?this.root.navigateTo(i.substring(1)).catch(function(){}):i.split("?")[0].includes("://")?this.root.data.copyLink&&swan.setClipboardData({data:i,success:function(){return swan.showToast({title:"链接已复制"})}}):swan.navigateTo({url:i,fail:function(){swan.switchTab({url:i,fail:function(){}})}}))},mediaError:function(t){var e=t.target.dataset.i,i=this.getNode(e);if("video"===i.name||"audio"===i.name){var o=(this.data.ctrl[e]||0)+1;if(o>i.src.length&&(o=0),o<i.src.length)return this.setData(r({},"ctrl."+e,o))}else"img"===i.name&&(this.data.opts[2]&&this.setData(r({},"ctrl."+e,-1)),this.checkReady());this.root&&this.root.triggerEvent("error",{source:i.name,attrs:i.attrs,errMsg:t.detail.errMsg})}}});
@@ -1 +0,0 @@
1
- {"component":true,"usingComponents":{"node":"./node"}}
@@ -1 +0,0 @@
1
- <template name="el"><block s-if="n.name==='img'"><rich-text s-if="n.t" style="display:{{n.t}}" nodes="<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>" data-i="{{i}}" catchtap="imgTap"/><block s-else><image s-if="(opts[1]&&!ctrl[i])||ctrl[i]<0" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))}}" lazy-load="{{opts[0]}}" webp="{{n.webp}}" image-menu-prevent="{{!opts[3]||n.attrs.ignore}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="imgTap" bindlongpress="noop"/></block></block><text s-elif="{{n.name==='br'}}">\n</text><view s-elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><block s-for="n.children" s-key="index"><template is="el" data="{{{n:item,i:i+'_'+index,opts:opts,ctrl:ctrl}}}"></template></block></view><video s-elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" object-fit="{{n.attrs['object-fit']}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><audio s-elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><rich-text s-else id="{{n.attrs.id}}" style="{{n.f}}" selectable="{{opts[4]}}" nodes="{{[n]}}"/></template><block s-for="childs" s-for-item="n1" s-for-index="i1" s-key="i1"><template s-if="!n1.c" is="el" data="{{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}}"/><view s-else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}"><block s-for="n1.children" s-for-item="n2" s-for-index="i2" s-key="i2"><template s-if="!n2.c" is="el" data="{{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}}"/><view s-else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}"><block s-for="n2.children" s-for-item="n3" s-for-index="i3" s-key="i3"><template s-if="!n3.c" is="el" data="{{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}}"/><view s-else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}"><block s-for="n3.children" s-for-item="n4" s-for-index="i4" s-key="i4"><template s-if="!n4.c" is="el" data="{{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}}"/><view s-else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}"><block s-for="n4.children" s-for-item="n5" s-for-index="i5" s-key="i5"><template s-if="!n5.c" is="el" data="{{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}}"/><node s-else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}"/></block></view></block></view></block></view></block></view></block>