@opentiny/tiny-robot 0.2.0-alpha.1 → 0.2.0-alpha.3

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 (427) hide show
  1. package/dist/_plugin-vue_export-helper.js +9 -0
  2. package/dist/action-group/index.js +142 -0
  3. package/dist/bubble/index.js +3211 -0
  4. package/dist/{node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/close.js → close.js} +9 -9
  5. package/dist/container/index.js +60 -0
  6. package/dist/conversations/index.js +14 -0
  7. package/dist/feedback/index.js +192 -0
  8. package/dist/history/index.js +228 -0
  9. package/dist/icon-button/index.js +31 -0
  10. package/dist/index.d.ts +2190 -26
  11. package/dist/index.js +35 -43
  12. package/dist/index2.js +376 -0
  13. package/dist/index3.js +3895 -0
  14. package/dist/index4.js +637 -0
  15. package/dist/index5.js +3237 -0
  16. package/dist/index6.js +4623 -0
  17. package/dist/prompts/index.js +83 -0
  18. package/dist/question/index.js +375 -0
  19. package/dist/sender/index.js +683 -0
  20. package/dist/style.css +1 -1
  21. package/dist/suggestion/index.js +497 -0
  22. package/dist/{packages/svgs/dist/tiny-robot-svgs.js → tiny-robot-svgs.js} +100 -100
  23. package/dist/welcome/index.js +38 -0
  24. package/package.json +7 -3
  25. package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
  26. package/dist/action-group/ActionGroup.vue.d.ts +0 -26
  27. package/dist/action-group/ActionGroupItem.vue.d.ts +0 -18
  28. package/dist/action-group/index.d.ts +0 -12
  29. package/dist/action-group/index.type.d.ts +0 -16
  30. package/dist/bubble/bubble-list.vue.d.ts +0 -5
  31. package/dist/bubble/components/actions/copy.vue.d.ts +0 -10
  32. package/dist/bubble/components/actions/index.d.ts +0 -2
  33. package/dist/bubble/components/actions/refresh.vue.d.ts +0 -2
  34. package/dist/bubble/index.d.ts +0 -12
  35. package/dist/bubble/index.type.d.ts +0 -53
  36. package/dist/bubble/useScroll.d.ts +0 -4
  37. package/dist/container/index.d.ts +0 -7
  38. package/dist/container/index.type.d.ts +0 -16
  39. package/dist/container/index.vue.d.ts +0 -26
  40. package/dist/conversations/index.d.ts +0 -7
  41. package/dist/conversations/index.vue.d.ts +0 -2
  42. package/dist/feedback/components/SourceList.vue.d.ts +0 -11
  43. package/dist/feedback/components/index.d.ts +0 -1
  44. package/dist/feedback/index.d.ts +0 -7
  45. package/dist/feedback/index.type.d.ts +0 -25
  46. package/dist/feedback/index.vue.d.ts +0 -13
  47. package/dist/history/components/index.d.ts +0 -2
  48. package/dist/history/components/item-tag.vue.d.ts +0 -5
  49. package/dist/history/components/search-empty.vue.d.ts +0 -7
  50. package/dist/history/composables/index.d.ts +0 -1
  51. package/dist/history/composables/useEditItemTitle.d.ts +0 -12
  52. package/dist/history/index.d.ts +0 -6
  53. package/dist/history/index.type.d.ts +0 -43
  54. package/dist/history/index.vue.d.ts +0 -2
  55. package/dist/icon-button/index.d.ts +0 -7
  56. package/dist/icon-button/index.type.d.ts +0 -7
  57. package/dist/icon-button/index.vue.d.ts +0 -6
  58. package/dist/node_modules/.pnpm/@opentiny_utils@1.0.0/node_modules/@opentiny/utils/dist/opentiny-utils.es.js +0 -832
  59. package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +0 -2116
  60. package/dist/node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/index.js +0 -113
  61. package/dist/node_modules/.pnpm/@opentiny_vue-button@3.21.0/node_modules/@opentiny/vue-button/lib/pc.js +0 -93
  62. package/dist/node_modules/.pnpm/@opentiny_vue-common@3.21.0/node_modules/@opentiny/vue-common/lib/index.js +0 -727
  63. package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +0 -710
  64. package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.21.0/node_modules/@opentiny/vue-dialog-box/lib/index.js +0 -198
  65. package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.21.0/node_modules/@opentiny/vue-dialog-box/lib/pc.js +0 -204
  66. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useEventListener.js +0 -10
  67. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useInstanceSlots.js +0 -14
  68. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useRelation.js +0 -54
  69. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +0 -85
  70. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/close.js +0 -29
  71. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/eyeclose.js +0 -42
  72. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/eyeopen.js +0 -43
  73. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/finish.js +0 -34
  74. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/fullscreen.js +0 -30
  75. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/loading-shadow.js +0 -77
  76. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/minscreen.js +0 -30
  77. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-after.js +0 -24
  78. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-before.js +0 -24
  79. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-after.js +0 -24
  80. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-before.js +0 -24
  81. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-center.js +0 -24
  82. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-left.js +0 -24
  83. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-right.js +0 -24
  84. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-bold.js +0 -24
  85. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-block.js +0 -24
  86. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-view.js +0 -24
  87. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-color.js +0 -24
  88. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-column.js +0 -24
  89. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-row.js +0 -24
  90. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-table.js +0 -24
  91. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-font-size.js +0 -24
  92. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-format-clear.js +0 -24
  93. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h1.js +0 -24
  94. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h2.js +0 -24
  95. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h3.js +0 -24
  96. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h4.js +0 -24
  97. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h5.js +0 -24
  98. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-h6.js +0 -24
  99. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-heading.js +0 -24
  100. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-high-light.js +0 -24
  101. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-image.js +0 -24
  102. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-italic.js +0 -24
  103. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-line-height.js +0 -24
  104. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-link-unlink.js +0 -24
  105. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-link.js +0 -24
  106. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-ordered.js +0 -24
  107. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-unordered.js +0 -24
  108. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells-vertical.js +0 -24
  109. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells.js +0 -24
  110. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-node-delete.js +0 -24
  111. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-paragraph.js +0 -24
  112. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-quote-text.js +0 -24
  113. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-redo.js +0 -24
  114. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-horizontal.js +0 -24
  115. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-vertical.js +0 -24
  116. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-strike-through.js +0 -24
  117. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-subscript.js +0 -24
  118. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-superscript.js +0 -24
  119. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-table.js +0 -24
  120. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-task-list.js +0 -24
  121. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-underline.js +0 -24
  122. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/rich-text-undo.js +0 -24
  123. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/sub-script.js +0 -29
  124. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/warn.js +0 -26
  125. package/dist/node_modules/.pnpm/@opentiny_vue-input@3.21.0/node_modules/@opentiny/vue-input/lib/index.js +0 -196
  126. package/dist/node_modules/.pnpm/@opentiny_vue-input@3.21.0/node_modules/@opentiny/vue-input/lib/pc.js +0 -568
  127. package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.21.0/node_modules/@opentiny/vue-locale/lib/index.js +0 -1783
  128. package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.22.0/node_modules/@opentiny/vue-locale/lib/index.js +0 -1783
  129. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/button/index.js +0 -13
  130. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/button/vue.js +0 -34
  131. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/chunk-G2ADBYYC.js +0 -12
  132. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/browser.js +0 -36
  133. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/clickoutside.js +0 -47
  134. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/debounce.js +0 -7
  135. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/dom.js +0 -45
  136. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popper.js +0 -320
  137. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popup-manager.js +0 -118
  138. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/throttle.js +0 -23
  139. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useEventListener.js +0 -9
  140. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useInstanceSlots.js +0 -14
  141. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useRelation.js +0 -54
  142. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popper.js +0 -84
  143. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popup.js +0 -73
  144. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/event.js +0 -13
  145. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/function.js +0 -5
  146. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/index.js +0 -11
  147. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/object.js +0 -84
  148. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/string.js +0 -28
  149. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/type.js +0 -28
  150. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/index.js +0 -136
  151. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/vue.js +0 -148
  152. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/input/index.js +0 -228
  153. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/input/vue.js +0 -263
  154. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/index.js +0 -63
  155. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/vue-storage-box.js +0 -16
  156. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tall-storage/vue.js +0 -23
  157. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/index.js +0 -78
  158. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
  159. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/index.js +0 -77
  160. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
  161. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.21.0/node_modules/@opentiny/vue-tooltip/lib/index.js +0 -173
  162. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.21.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +0 -248
  163. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js +0 -176
  164. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +0 -248
  165. package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js +0 -190
  166. package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +0 -53
  167. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js +0 -277
  168. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js +0 -46
  169. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -7
  170. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -7
  171. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.js +0 -187
  172. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.js +0 -19
  173. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.js +0 -67
  174. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.js +0 -5
  175. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.js +0 -164
  176. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.js +0 -8
  177. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.js +0 -44
  178. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.js +0 -21
  179. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.js +0 -37
  180. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.js +0 -112
  181. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.js +0 -63
  182. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.js +0 -34
  183. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.js +0 -96
  184. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.js +0 -78
  185. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.js +0 -40
  186. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.js +0 -59
  187. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.js +0 -127
  188. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.js +0 -95
  189. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.js +0 -59
  190. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.js +0 -23
  191. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.js +0 -30
  192. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.js +0 -28
  193. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.js +0 -27
  194. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.js +0 -37
  195. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.js +0 -43
  196. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.js +0 -110
  197. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.js +0 -25
  198. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.js +0 -95
  199. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.js +0 -84
  200. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.js +0 -99
  201. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.js +0 -7
  202. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.js +0 -10
  203. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.js +0 -57
  204. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.js +0 -9
  205. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.js +0 -31
  206. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.js +0 -80
  207. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.js +0 -8
  208. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.js +0 -16
  209. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.js +0 -46
  210. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.js +0 -31
  211. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +0 -34
  212. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.js +0 -57
  213. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.js +0 -33
  214. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.js +0 -32
  215. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.js +0 -10
  216. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.js +0 -32
  217. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.js +0 -48
  218. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.js +0 -40
  219. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.js +0 -28
  220. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.js +0 -23
  221. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.js +0 -27
  222. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.js +0 -54
  223. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.js +0 -39
  224. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.js +0 -31
  225. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.js +0 -10
  226. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.js +0 -61
  227. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.js +0 -48
  228. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.js +0 -7
  229. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.js +0 -74
  230. package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js +0 -139
  231. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.js +0 -4
  232. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.js +0 -4
  233. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.js +0 -4
  234. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.js +0 -4
  235. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.js +0 -4
  236. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.js +0 -14
  237. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.js +0 -4
  238. package/dist/packages/components/src/action-group/ActionGroup.vue.js +0 -7
  239. package/dist/packages/components/src/action-group/ActionGroup.vue2.js +0 -97
  240. package/dist/packages/components/src/action-group/ActionGroupItem.vue.js +0 -14
  241. package/dist/packages/components/src/action-group/ActionGroupItem.vue2.js +0 -4
  242. package/dist/packages/components/src/action-group/index.js +0 -17
  243. package/dist/packages/components/src/assets/icons/accessory.svg.js +0 -4
  244. package/dist/packages/components/src/assets/icons/loading-speech.svg.js +0 -4
  245. package/dist/packages/components/src/assets/icons/loading.svg.js +0 -4
  246. package/dist/packages/components/src/assets/icons/send.svg.js +0 -4
  247. package/dist/packages/components/src/assets/icons/voice.svg.js +0 -4
  248. package/dist/packages/components/src/bubble/bubble-list.vue.js +0 -7
  249. package/dist/packages/components/src/bubble/bubble-list.vue2.js +0 -37
  250. package/dist/packages/components/src/bubble/bubble.vue.js +0 -7
  251. package/dist/packages/components/src/bubble/bubble.vue2.js +0 -118
  252. package/dist/packages/components/src/bubble/components/actions/copy.vue.js +0 -7
  253. package/dist/packages/components/src/bubble/components/actions/copy.vue2.js +0 -35
  254. package/dist/packages/components/src/bubble/components/actions/refresh.vue.js +0 -7
  255. package/dist/packages/components/src/bubble/components/actions/refresh.vue2.js +0 -16
  256. package/dist/packages/components/src/bubble/index.js +0 -18
  257. package/dist/packages/components/src/bubble/useScroll.js +0 -13
  258. package/dist/packages/components/src/container/index.js +0 -9
  259. package/dist/packages/components/src/container/index.vue.js +0 -7
  260. package/dist/packages/components/src/container/index.vue2.js +0 -55
  261. package/dist/packages/components/src/conversations/index.js +0 -9
  262. package/dist/packages/components/src/conversations/index.vue.js +0 -9
  263. package/dist/packages/components/src/feedback/components/SourceList.vue.js +0 -7
  264. package/dist/packages/components/src/feedback/components/SourceList.vue2.js +0 -52
  265. package/dist/packages/components/src/feedback/index.js +0 -9
  266. package/dist/packages/components/src/feedback/index.vue.js +0 -7
  267. package/dist/packages/components/src/feedback/index.vue2.js +0 -142
  268. package/dist/packages/components/src/history/components/item-tag.vue.js +0 -7
  269. package/dist/packages/components/src/history/components/item-tag.vue2.js +0 -21
  270. package/dist/packages/components/src/history/components/search-empty.vue.js +0 -7
  271. package/dist/packages/components/src/history/components/search-empty.vue2.js +0 -20
  272. package/dist/packages/components/src/history/composables/useEditItemTitle.js +0 -43
  273. package/dist/packages/components/src/history/index.js +0 -11
  274. package/dist/packages/components/src/history/index.vue.js +0 -7
  275. package/dist/packages/components/src/history/index.vue2.js +0 -130
  276. package/dist/packages/components/src/icon-button/index.js +0 -9
  277. package/dist/packages/components/src/icon-button/index.vue.js +0 -7
  278. package/dist/packages/components/src/icon-button/index.vue2.js +0 -40
  279. package/dist/packages/components/src/prompts/index.js +0 -18
  280. package/dist/packages/components/src/prompts/prompt.vue.js +0 -7
  281. package/dist/packages/components/src/prompts/prompt.vue2.js +0 -39
  282. package/dist/packages/components/src/prompts/prompts.vue.js +0 -7
  283. package/dist/packages/components/src/prompts/prompts.vue2.js +0 -36
  284. package/dist/packages/components/src/question/components/CommonQuestions.vue.js +0 -89
  285. package/dist/packages/components/src/question/components/CommonQuestions.vue2.js +0 -4
  286. package/dist/packages/components/src/question/components/HotQuestions.vue.js +0 -140
  287. package/dist/packages/components/src/question/components/HotQuestions.vue2.js +0 -4
  288. package/dist/packages/components/src/question/composables/useQuestions.js +0 -48
  289. package/dist/packages/components/src/question/index.js +0 -9
  290. package/dist/packages/components/src/question/index.vue.js +0 -113
  291. package/dist/packages/components/src/question/index.vue2.js +0 -4
  292. package/dist/packages/components/src/sender/components/ActionButtons.vue.js +0 -143
  293. package/dist/packages/components/src/sender/components/ActionButtons.vue2.js +0 -4
  294. package/dist/packages/components/src/sender/components/TemplateEditor.vue.js +0 -7
  295. package/dist/packages/components/src/sender/components/TemplateEditor.vue2.js +0 -121
  296. package/dist/packages/components/src/sender/composables/useInputHandler.js +0 -38
  297. package/dist/packages/components/src/sender/composables/useKeyboardHandler.js +0 -31
  298. package/dist/packages/components/src/sender/composables/useSpeechHandler.js +0 -67
  299. package/dist/packages/components/src/sender/index.js +0 -9
  300. package/dist/packages/components/src/sender/index.vue.js +0 -255
  301. package/dist/packages/components/src/sender/index.vue2.js +0 -4
  302. package/dist/packages/components/src/suggestion/components/CategoryNav.vue.js +0 -38
  303. package/dist/packages/components/src/suggestion/components/CategoryNav.vue2.js +0 -4
  304. package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue.js +0 -107
  305. package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue2.js +0 -4
  306. package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue.js +0 -123
  307. package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue2.js +0 -4
  308. package/dist/packages/components/src/suggestion/composables/useKeyboardNavigation.js +0 -45
  309. package/dist/packages/components/src/suggestion/composables/useTriggerDetection.js +0 -17
  310. package/dist/packages/components/src/suggestion/index.js +0 -9
  311. package/dist/packages/components/src/suggestion/index.vue.js +0 -179
  312. package/dist/packages/components/src/suggestion/index.vue2.js +0 -4
  313. package/dist/packages/components/src/suggestion/utils/dom.js +0 -18
  314. package/dist/packages/components/src/welcome/index.js +0 -9
  315. package/dist/packages/components/src/welcome/index.vue.js +0 -7
  316. package/dist/packages/components/src/welcome/index.vue2.js +0 -32
  317. package/dist/prompts/index.d.ts +0 -12
  318. package/dist/prompts/index.type.d.ts +0 -55
  319. package/dist/prompts/prompt.vue.d.ts +0 -3
  320. package/dist/prompts/prompts.vue.d.ts +0 -20
  321. package/dist/question/components/CommonQuestions.vue.d.ts +0 -32
  322. package/dist/question/components/HotQuestions.vue.d.ts +0 -89
  323. package/dist/question/composables/useQuestions.d.ts +0 -17
  324. package/dist/question/index.d.ts +0 -7
  325. package/dist/question/index.type.d.ts +0 -74
  326. package/dist/question/index.vue.d.ts +0 -46
  327. package/dist/sender/components/ActionButtons.vue.d.ts +0 -25
  328. package/dist/sender/components/TemplateEditor.vue.d.ts +0 -18
  329. package/dist/sender/composables/useInputHandler.d.ts +0 -17
  330. package/dist/sender/composables/useKeyboardHandler.d.ts +0 -18
  331. package/dist/sender/composables/useSpeechHandler.d.ts +0 -8
  332. package/dist/sender/index.d.ts +0 -7
  333. package/dist/sender/index.type.d.ts +0 -137
  334. package/dist/sender/index.vue.d.ts +0 -1012
  335. package/dist/suggestion/components/CategoryNav.vue.d.ts +0 -45
  336. package/dist/suggestion/components/SuggestionCapsule.vue.d.ts +0 -32
  337. package/dist/suggestion/components/SuggestionPanel.vue.d.ts +0 -84
  338. package/dist/suggestion/composables/useKeyboardNavigation.d.ts +0 -18
  339. package/dist/suggestion/composables/useSuggestionFilter.d.ts +0 -10
  340. package/dist/suggestion/composables/useTriggerDetection.d.ts +0 -11
  341. package/dist/suggestion/index.d.ts +0 -7
  342. package/dist/suggestion/index.type.d.ts +0 -94
  343. package/dist/suggestion/index.vue.d.ts +0 -343
  344. package/dist/suggestion/utils/dom.d.ts +0 -20
  345. package/dist/welcome/index.d.ts +0 -7
  346. package/dist/welcome/index.type.d.ts +0 -10
  347. package/dist/welcome/index.vue.d.ts +0 -18
  348. package/src/action-group/ActionGroup.vue +0 -232
  349. package/src/action-group/ActionGroupItem.vue +0 -9
  350. package/src/action-group/index.ts +0 -25
  351. package/src/action-group/index.type.ts +0 -20
  352. package/src/assets/icons/accessory.svg +0 -12
  353. package/src/assets/icons/loading-speech.svg +0 -16
  354. package/src/assets/icons/loading.svg +0 -17
  355. package/src/assets/icons/send.svg +0 -21
  356. package/src/assets/icons/voice.svg +0 -22
  357. package/src/bubble/bubble-list.vue +0 -42
  358. package/src/bubble/bubble.vue +0 -237
  359. package/src/bubble/components/actions/copy.vue +0 -54
  360. package/src/bubble/components/actions/index.ts +0 -2
  361. package/src/bubble/components/actions/refresh.vue +0 -31
  362. package/src/bubble/index.ts +0 -23
  363. package/src/bubble/index.type.ts +0 -63
  364. package/src/bubble/useScroll.ts +0 -14
  365. package/src/container/index.ts +0 -12
  366. package/src/container/index.type.ts +0 -17
  367. package/src/container/index.vue +0 -134
  368. package/src/conversations/index.ts +0 -12
  369. package/src/conversations/index.vue +0 -3
  370. package/src/feedback/components/SourceList.vue +0 -112
  371. package/src/feedback/components/index.ts +0 -1
  372. package/src/feedback/index.ts +0 -12
  373. package/src/feedback/index.type.ts +0 -27
  374. package/src/feedback/index.vue +0 -166
  375. package/src/history/components/index.ts +0 -2
  376. package/src/history/components/item-tag.vue +0 -49
  377. package/src/history/components/search-empty.vue +0 -38
  378. package/src/history/composables/index.ts +0 -1
  379. package/src/history/composables/useEditItemTitle.ts +0 -75
  380. package/src/history/index.ts +0 -12
  381. package/src/history/index.type.ts +0 -50
  382. package/src/history/index.vue +0 -292
  383. package/src/icon-button/index.ts +0 -12
  384. package/src/icon-button/index.type.ts +0 -8
  385. package/src/icon-button/index.vue +0 -52
  386. package/src/index.ts +0 -76
  387. package/src/prompts/index.ts +0 -25
  388. package/src/prompts/index.type.ts +0 -59
  389. package/src/prompts/prompt.vue +0 -101
  390. package/src/prompts/prompts.vue +0 -50
  391. package/src/question/components/CommonQuestions.vue +0 -146
  392. package/src/question/components/HotQuestions.vue +0 -148
  393. package/src/question/composables/useQuestions.ts +0 -106
  394. package/src/question/index.less +0 -447
  395. package/src/question/index.ts +0 -12
  396. package/src/question/index.type.ts +0 -86
  397. package/src/question/index.vue +0 -140
  398. package/src/question/vars.less +0 -135
  399. package/src/sender/components/ActionButtons.vue +0 -168
  400. package/src/sender/components/TemplateEditor.vue +0 -274
  401. package/src/sender/composables/useInputHandler.ts +0 -74
  402. package/src/sender/composables/useKeyboardHandler.ts +0 -101
  403. package/src/sender/composables/useSpeechHandler.ts +0 -122
  404. package/src/sender/index.less +0 -352
  405. package/src/sender/index.ts +0 -12
  406. package/src/sender/index.type.ts +0 -162
  407. package/src/sender/index.vue +0 -338
  408. package/src/sender/vars.less +0 -84
  409. package/src/suggestion/components/CategoryNav.vue +0 -38
  410. package/src/suggestion/components/SuggestionCapsule.vue +0 -183
  411. package/src/suggestion/components/SuggestionPanel.vue +0 -147
  412. package/src/suggestion/composables/useKeyboardNavigation.ts +0 -101
  413. package/src/suggestion/composables/useSuggestionFilter.ts +0 -34
  414. package/src/suggestion/composables/useTriggerDetection.ts +0 -46
  415. package/src/suggestion/index.less +0 -497
  416. package/src/suggestion/index.ts +0 -12
  417. package/src/suggestion/index.type.ts +0 -101
  418. package/src/suggestion/index.vue +0 -338
  419. package/src/suggestion/utils/dom.ts +0 -66
  420. package/src/suggestion/vars.less +0 -141
  421. package/src/vite-env.d.ts +0 -1
  422. package/src/welcome/index.ts +0 -12
  423. package/src/welcome/index.type.ts +0 -12
  424. package/src/welcome/index.vue +0 -69
  425. package/tsconfig.json +0 -37
  426. package/tsconfig.node.json +0 -10
  427. package/vite.config.ts +0 -53
@@ -1,57 +0,0 @@
1
- function i(o, t) {
2
- const c = o.pos, n = o.src.charCodeAt(c);
3
- if (t || n !== 95 && n !== 42)
4
- return !1;
5
- const e = o.scanDelims(o.pos, n === 42);
6
- for (let k = 0; k < e.length; k++) {
7
- const s = o.push("text", "", 0);
8
- s.content = String.fromCharCode(n), o.delimiters.push({
9
- // Char code of the starting marker (number).
10
- //
11
- marker: n,
12
- // Total length of these series of delimiters.
13
- //
14
- length: e.length,
15
- // A position of the token this delimiter corresponds to.
16
- //
17
- token: o.tokens.length - 1,
18
- // If this delimiter is matched as a valid opener, `end` will be
19
- // equal to its position, otherwise it's `-1`.
20
- //
21
- end: -1,
22
- // Boolean flags that determine if this delimiter could open or close
23
- // an emphasis.
24
- //
25
- open: e.can_open,
26
- close: e.can_close
27
- });
28
- }
29
- return o.pos += e.length, !0;
30
- }
31
- function g(o, t) {
32
- const c = t.length;
33
- for (let n = c - 1; n >= 0; n--) {
34
- const e = t[n];
35
- if (e.marker !== 95 && e.marker !== 42 || e.end === -1)
36
- continue;
37
- const k = t[e.end], s = n > 0 && t[n - 1].end === e.end + 1 && // check that first two markers match and adjacent
38
- t[n - 1].marker === e.marker && t[n - 1].token === e.token - 1 && // check that last two markers are adjacent (we can safely assume they match)
39
- t[e.end + 1].token === k.token + 1, r = String.fromCharCode(e.marker), m = o.tokens[e.token];
40
- m.type = s ? "strong_open" : "em_open", m.tag = s ? "strong" : "em", m.nesting = 1, m.markup = s ? r + r : r, m.content = "";
41
- const p = o.tokens[k.token];
42
- p.type = s ? "strong_close" : "em_close", p.tag = s ? "strong" : "em", p.nesting = -1, p.markup = s ? r + r : r, p.content = "", s && (o.tokens[t[n - 1].token].content = "", o.tokens[t[e.end + 1].token].content = "", n--);
43
- }
44
- }
45
- function a(o) {
46
- const t = o.tokens_meta, c = o.tokens_meta.length;
47
- g(o, o.delimiters);
48
- for (let n = 0; n < c; n++)
49
- t[n] && t[n].delimiters && g(o, t[n].delimiters);
50
- }
51
- const f = {
52
- tokenize: i,
53
- postProcess: a
54
- };
55
- export {
56
- f as default
57
- };
@@ -1,33 +0,0 @@
1
- import { fromCodePoint as i, isValidEntityCode as f } from "../common/utils.js";
2
- import { decodeHTML as p } from "../../../../../entities@4.5.0/node_modules/entities/lib/esm/decode.js";
3
- const a = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, u = /^&([a-z][a-z0-9]{1,31});/i;
4
- function m(c, r) {
5
- const t = c.pos, s = c.posMax;
6
- if (c.src.charCodeAt(t) !== 38 || t + 1 >= s) return !1;
7
- if (c.src.charCodeAt(t + 1) === 35) {
8
- const o = c.src.slice(t).match(a);
9
- if (o) {
10
- if (!r) {
11
- const e = o[1][0].toLowerCase() === "x" ? parseInt(o[1].slice(1), 16) : parseInt(o[1], 10), n = c.push("text_special", "", 0);
12
- n.content = f(e) ? i(e) : i(65533), n.markup = o[0], n.info = "entity";
13
- }
14
- return c.pos += o[0].length, !0;
15
- }
16
- } else {
17
- const o = c.src.slice(t).match(u);
18
- if (o) {
19
- const e = p(o[0]);
20
- if (e !== o[0]) {
21
- if (!r) {
22
- const n = c.push("text_special", "", 0);
23
- n.content = e, n.markup = o[0], n.info = "entity";
24
- }
25
- return c.pos += o[0].length, !0;
26
- }
27
- }
28
- }
29
- return !1;
30
- }
31
- export {
32
- m as default
33
- };
@@ -1,32 +0,0 @@
1
- import { isSpace as h } from "../common/utils.js";
2
- const n = [];
3
- for (let r = 0; r < 256; r++)
4
- n.push(0);
5
- "\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(r) {
6
- n[r.charCodeAt(0)] = 1;
7
- });
8
- function t(r, p) {
9
- let c = r.pos;
10
- const f = r.posMax;
11
- if (r.src.charCodeAt(c) !== 92 || (c++, c >= f)) return !1;
12
- let o = r.src.charCodeAt(c);
13
- if (o === 10) {
14
- for (p || r.push("hardbreak", "br", 0), c++; c < f && (o = r.src.charCodeAt(c), !!h(o)); )
15
- c++;
16
- return r.pos = c, !0;
17
- }
18
- let i = r.src[c];
19
- if (o >= 55296 && o <= 56319 && c + 1 < f) {
20
- const e = r.src.charCodeAt(c + 1);
21
- e >= 56320 && e <= 57343 && (i += r.src[c + 1], c++);
22
- }
23
- const s = "\\" + i;
24
- if (!p) {
25
- const e = r.push("text_special", "", 0);
26
- o < 256 && n[o] !== 0 ? e.content = i : e.content = s, e.markup = s, e.info = "escape";
27
- }
28
- return r.pos = c + 1, !0;
29
- }
30
- export {
31
- t as default
32
- };
@@ -1,10 +0,0 @@
1
- function f(l) {
2
- let t, n, o = 0;
3
- const e = l.tokens, s = l.tokens.length;
4
- for (t = n = 0; t < s; t++)
5
- e[t].nesting < 0 && o--, e[t].level = o, e[t].nesting > 0 && o++, e[t].type === "text" && t + 1 < s && e[t + 1].type === "text" ? e[t + 1].content = e[t].content + e[t + 1].content : (t !== n && (e[n] = e[t]), n++);
6
- t !== n && (e.length = n);
7
- }
8
- export {
9
- f as default
10
- };
@@ -1,32 +0,0 @@
1
- import { HTML_TAG_RE as s } from "../common/html_re.js";
2
- function l(n) {
3
- return /^<a[>\s]/i.test(n);
4
- }
5
- function f(n) {
6
- return /^<\/a\s*>/i.test(n);
7
- }
8
- function u(n) {
9
- const i = n | 32;
10
- return i >= 97 && i <= 122;
11
- }
12
- function x(n, i) {
13
- if (!n.md.options.html)
14
- return !1;
15
- const c = n.posMax, e = n.pos;
16
- if (n.src.charCodeAt(e) !== 60 || e + 2 >= c)
17
- return !1;
18
- const o = n.src.charCodeAt(e + 1);
19
- if (o !== 33 && o !== 63 && o !== 47 && !u(o))
20
- return !1;
21
- const r = n.src.slice(e).match(s);
22
- if (!r)
23
- return !1;
24
- if (!i) {
25
- const t = n.push("html_inline", "", 0);
26
- t.content = r[0], l(t.content) && n.linkLevel++, f(t.content) && n.linkLevel--;
27
- }
28
- return n.pos += r[0].length, !0;
29
- }
30
- export {
31
- x as default
32
- };
@@ -1,48 +0,0 @@
1
- import { isSpace as u, normalizeReference as C } from "../common/utils.js";
2
- function v(r, b) {
3
- let o, h, p, e, d, n, c, f, s = "";
4
- const x = r.pos, i = r.posMax;
5
- if (r.src.charCodeAt(r.pos) !== 33 || r.src.charCodeAt(r.pos + 1) !== 91)
6
- return !1;
7
- const k = r.pos + 2, l = r.md.helpers.parseLinkLabel(r, r.pos + 1, !1);
8
- if (l < 0)
9
- return !1;
10
- if (e = l + 1, e < i && r.src.charCodeAt(e) === 40) {
11
- for (e++; e < i && (o = r.src.charCodeAt(e), !(!u(o) && o !== 10)); e++)
12
- ;
13
- if (e >= i)
14
- return !1;
15
- for (f = e, n = r.md.helpers.parseLinkDestination(r.src, e, r.posMax), n.ok && (s = r.md.normalizeLink(n.str), r.md.validateLink(s) ? e = n.pos : s = ""), f = e; e < i && (o = r.src.charCodeAt(e), !(!u(o) && o !== 10)); e++)
16
- ;
17
- if (n = r.md.helpers.parseLinkTitle(r.src, e, r.posMax), e < i && f !== e && n.ok)
18
- for (c = n.str, e = n.pos; e < i && (o = r.src.charCodeAt(e), !(!u(o) && o !== 10)); e++)
19
- ;
20
- else
21
- c = "";
22
- if (e >= i || r.src.charCodeAt(e) !== 41)
23
- return r.pos = x, !1;
24
- e++;
25
- } else {
26
- if (typeof r.env.references > "u")
27
- return !1;
28
- if (e < i && r.src.charCodeAt(e) === 91 ? (f = e + 1, e = r.md.helpers.parseLinkLabel(r, e), e >= 0 ? p = r.src.slice(f, e++) : e = l + 1) : e = l + 1, p || (p = r.src.slice(k, l)), d = r.env.references[C(p)], !d)
29
- return r.pos = x, !1;
30
- s = d.href, c = d.title;
31
- }
32
- if (!b) {
33
- h = r.src.slice(k, l);
34
- const a = [];
35
- r.md.inline.parse(
36
- h,
37
- r.md,
38
- r.env,
39
- a
40
- );
41
- const m = r.push("image", "img", 0), A = [["src", s], ["alt", ""]];
42
- m.attrs = A, m.children = a, m.content = h, c && A.push(["title", c]);
43
- }
44
- return r.pos = e, r.posMax = i, !0;
45
- }
46
- export {
47
- v as default
48
- };
@@ -1,40 +0,0 @@
1
- import { isSpace as h, normalizeReference as b } from "../common/utils.js";
2
- function C(r, m) {
3
- let o, p, l, s, f = "", d = "", c = r.pos, k = !0;
4
- if (r.src.charCodeAt(r.pos) !== 91)
5
- return !1;
6
- const A = r.pos, i = r.posMax, u = r.pos + 1, n = r.md.helpers.parseLinkLabel(r, r.pos, !0);
7
- if (n < 0)
8
- return !1;
9
- let e = n + 1;
10
- if (e < i && r.src.charCodeAt(e) === 40) {
11
- for (k = !1, e++; e < i && (o = r.src.charCodeAt(e), !(!h(o) && o !== 10)); e++)
12
- ;
13
- if (e >= i)
14
- return !1;
15
- if (c = e, l = r.md.helpers.parseLinkDestination(r.src, e, r.posMax), l.ok) {
16
- for (f = r.md.normalizeLink(l.str), r.md.validateLink(f) ? e = l.pos : f = "", c = e; e < i && (o = r.src.charCodeAt(e), !(!h(o) && o !== 10)); e++)
17
- ;
18
- if (l = r.md.helpers.parseLinkTitle(r.src, e, r.posMax), e < i && c !== e && l.ok)
19
- for (d = l.str, e = l.pos; e < i && (o = r.src.charCodeAt(e), !(!h(o) && o !== 10)); e++)
20
- ;
21
- }
22
- (e >= i || r.src.charCodeAt(e) !== 41) && (k = !0), e++;
23
- }
24
- if (k) {
25
- if (typeof r.env.references > "u")
26
- return !1;
27
- if (e < i && r.src.charCodeAt(e) === 91 ? (c = e + 1, e = r.md.helpers.parseLinkLabel(r, e), e >= 0 ? p = r.src.slice(c, e++) : e = n + 1) : e = n + 1, p || (p = r.src.slice(u, n)), s = r.env.references[b(p)], !s)
28
- return r.pos = A, !1;
29
- f = s.href, d = s.title;
30
- }
31
- if (!m) {
32
- r.pos = u, r.posMax = n;
33
- const L = r.push("link_open", "a", 1), x = [["href", f]];
34
- L.attrs = x, d && x.push(["title", d]), r.linkLevel++, r.md.inline.tokenize(r), r.linkLevel--, r.push("link_close", "a", -1);
35
- }
36
- return r.pos = e, r.posMax = i, !0;
37
- }
38
- export {
39
- C as default
40
- };
@@ -1,28 +0,0 @@
1
- const k = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;
2
- function p(n, t) {
3
- if (!n.md.options.linkify || n.linkLevel > 0) return !1;
4
- const i = n.pos, s = n.posMax;
5
- if (i + 3 > s || n.src.charCodeAt(i) !== 58 || n.src.charCodeAt(i + 1) !== 47 || n.src.charCodeAt(i + 2) !== 47) return !1;
6
- const o = n.pending.match(k);
7
- if (!o) return !1;
8
- const l = o[1], f = n.md.linkify.matchAtStart(n.src.slice(i - l.length));
9
- if (!f) return !1;
10
- let r = f.url;
11
- if (r.length <= l.length) return !1;
12
- r = r.replace(/\*+$/, "");
13
- const c = n.md.normalizeLink(r);
14
- if (!n.md.validateLink(c)) return !1;
15
- if (!t) {
16
- n.pending = n.pending.slice(0, -l.length);
17
- const e = n.push("link_open", "a", 1);
18
- e.attrs = [["href", c]], e.markup = "linkify", e.info = "auto";
19
- const a = n.push("text", "", 0);
20
- a.content = n.md.normalizeLinkText(r);
21
- const u = n.push("link_close", "a", -1);
22
- u.markup = "linkify", u.info = "auto";
23
- }
24
- return n.pos += r.length - l.length, !0;
25
- }
26
- export {
27
- p as default
28
- };
@@ -1,23 +0,0 @@
1
- import { isSpace as d } from "../common/utils.js";
2
- function h(n, p) {
3
- let r = n.pos;
4
- if (n.src.charCodeAt(r) !== 10)
5
- return !1;
6
- const e = n.pending.length - 1, o = n.posMax;
7
- if (!p)
8
- if (e >= 0 && n.pending.charCodeAt(e) === 32)
9
- if (e >= 1 && n.pending.charCodeAt(e - 1) === 32) {
10
- let i = e - 1;
11
- for (; i >= 1 && n.pending.charCodeAt(i - 1) === 32; ) i--;
12
- n.pending = n.pending.slice(0, i), n.push("hardbreak", "br", 0);
13
- } else
14
- n.pending = n.pending.slice(0, -1), n.push("softbreak", "br", 0);
15
- else
16
- n.push("softbreak", "br", 0);
17
- for (r++; r < o && d(n.src.charCodeAt(r)); )
18
- r++;
19
- return n.pos = r, !0;
20
- }
21
- export {
22
- h as default
23
- };
@@ -1,27 +0,0 @@
1
- import p from "../token.js";
2
- import { isWhiteSpace as k, isMdAsciiPunct as f, isPunctChar as g } from "../common/utils.js";
3
- function o(t, i, e, s) {
4
- this.src = t, this.env = e, this.md = i, this.tokens = s, this.tokens_meta = Array(s.length), this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = [], this._prev_delimiters = [], this.backticks = {}, this.backticksScanned = !1, this.linkLevel = 0;
5
- }
6
- o.prototype.pushPending = function() {
7
- const t = new p("text", "", 0);
8
- return t.content = this.pending, t.level = this.pendingLevel, this.tokens.push(t), this.pending = "", t;
9
- };
10
- o.prototype.push = function(t, i, e) {
11
- this.pending && this.pushPending();
12
- const s = new p(t, i, e);
13
- let n = null;
14
- return e < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), s.level = this.level, e > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], n = { delimiters: this.delimiters }), this.pendingLevel = this.level, this.tokens.push(s), this.tokens_meta.push(n), s;
15
- };
16
- o.prototype.scanDelims = function(t, i) {
17
- const e = this.posMax, s = this.src.charCodeAt(t), n = t > 0 ? this.src.charCodeAt(t - 1) : 32;
18
- let h = t;
19
- for (; h < e && this.src.charCodeAt(h) === s; )
20
- h++;
21
- const v = h - t, c = h < e ? this.src.charCodeAt(h) : 32, r = f(n) || g(String.fromCharCode(n)), l = f(c) || g(String.fromCharCode(c)), a = k(n), d = k(c), m = !d && (!l || a || r), u = !a && (!r || d || l);
22
- return { can_open: m && (i || !u || r), can_close: u && (i || !m || l), length: v };
23
- };
24
- o.prototype.Token = p;
25
- export {
26
- o as default
27
- };
@@ -1,54 +0,0 @@
1
- function h(n, r) {
2
- const e = n.pos, t = n.src.charCodeAt(e);
3
- if (r || t !== 126)
4
- return !1;
5
- const i = n.scanDelims(n.pos, !0);
6
- let s = i.length;
7
- const o = String.fromCharCode(t);
8
- if (s < 2)
9
- return !1;
10
- let c;
11
- s % 2 && (c = n.push("text", "", 0), c.content = o, s--);
12
- for (let k = 0; k < s; k += 2)
13
- c = n.push("text", "", 0), c.content = o + o, n.delimiters.push({
14
- marker: t,
15
- length: 0,
16
- // disable "rule of 3" length checks meant for emphasis
17
- token: n.tokens.length - 1,
18
- end: -1,
19
- open: i.can_open,
20
- close: i.can_close
21
- });
22
- return n.pos += i.length, !0;
23
- }
24
- function l(n, r) {
25
- let e;
26
- const t = [], i = r.length;
27
- for (let s = 0; s < i; s++) {
28
- const o = r[s];
29
- if (o.marker !== 126 || o.end === -1)
30
- continue;
31
- const c = r[o.end];
32
- e = n.tokens[o.token], e.type = "s_open", e.tag = "s", e.nesting = 1, e.markup = "~~", e.content = "", e = n.tokens[c.token], e.type = "s_close", e.tag = "s", e.nesting = -1, e.markup = "~~", e.content = "", n.tokens[c.token - 1].type === "text" && n.tokens[c.token - 1].content === "~" && t.push(c.token - 1);
33
- }
34
- for (; t.length; ) {
35
- const s = t.pop();
36
- let o = s + 1;
37
- for (; o < n.tokens.length && n.tokens[o].type === "s_close"; )
38
- o++;
39
- o--, s !== o && (e = n.tokens[o], n.tokens[o] = n.tokens[s], n.tokens[s] = e);
40
- }
41
- }
42
- function p(n) {
43
- const r = n.tokens_meta, e = n.tokens_meta.length;
44
- l(n, n.delimiters);
45
- for (let t = 0; t < e; t++)
46
- r[t] && r[t].delimiters && l(n, r[t].delimiters);
47
- }
48
- const u = {
49
- tokenize: h,
50
- postProcess: p
51
- };
52
- export {
53
- u as default
54
- };
@@ -1,39 +0,0 @@
1
- function x(e) {
2
- switch (e) {
3
- case 10:
4
- case 33:
5
- case 35:
6
- case 36:
7
- case 37:
8
- case 38:
9
- case 42:
10
- case 43:
11
- case 45:
12
- case 58:
13
- case 60:
14
- case 61:
15
- case 62:
16
- case 64:
17
- case 91:
18
- case 92:
19
- case 93:
20
- case 94:
21
- case 95:
22
- case 96:
23
- case 123:
24
- case 125:
25
- case 126:
26
- return !0;
27
- default:
28
- return !1;
29
- }
30
- }
31
- function a(e, s) {
32
- let c = e.pos;
33
- for (; c < e.posMax && !x(e.src.charCodeAt(c)); )
34
- c++;
35
- return c === e.pos ? !1 : (s || (e.pending += e.src.slice(e.pos, c)), e.pos = c, !0);
36
- }
37
- export {
38
- a as default
39
- };
@@ -1,31 +0,0 @@
1
- function n(r, t, i) {
2
- this.type = r, this.tag = t, this.attrs = null, this.map = null, this.nesting = i, this.level = 0, this.children = null, this.content = "", this.markup = "", this.info = "", this.meta = null, this.block = !1, this.hidden = !1;
3
- }
4
- n.prototype.attrIndex = function(t) {
5
- if (!this.attrs)
6
- return -1;
7
- const i = this.attrs;
8
- for (let s = 0, e = i.length; s < e; s++)
9
- if (i[s][0] === t)
10
- return s;
11
- return -1;
12
- };
13
- n.prototype.attrPush = function(t) {
14
- this.attrs ? this.attrs.push(t) : this.attrs = [t];
15
- };
16
- n.prototype.attrSet = function(t, i) {
17
- const s = this.attrIndex(t), e = [t, i];
18
- s < 0 ? this.attrPush(e) : this.attrs[s] = e;
19
- };
20
- n.prototype.attrGet = function(t) {
21
- const i = this.attrIndex(t);
22
- let s = null;
23
- return i >= 0 && (s = this.attrs[i][1]), s;
24
- };
25
- n.prototype.attrJoin = function(t, i) {
26
- const s = this.attrIndex(t);
27
- s < 0 ? this.attrPush([t, i]) : this.attrs[s][1] = this.attrs[s][1] + " " + i;
28
- };
29
- export {
30
- n as default
31
- };
@@ -1,10 +0,0 @@
1
- import { default as a } from "./lib/decode.js";
2
- import { default as f } from "./lib/encode.js";
3
- import { default as d } from "./lib/format.js";
4
- import { default as p } from "./lib/parse.js";
5
- export {
6
- a as decode,
7
- f as encode,
8
- d as format,
9
- p as parse
10
- };
@@ -1,61 +0,0 @@
1
- const h = {};
2
- function l(s) {
3
- let n = h[s];
4
- if (n)
5
- return n;
6
- n = h[s] = [];
7
- for (let e = 0; e < 128; e++) {
8
- const t = String.fromCharCode(e);
9
- n.push(t);
10
- }
11
- for (let e = 0; e < s.length; e++) {
12
- const t = s.charCodeAt(e);
13
- n[t] = "%" + ("0" + t.toString(16).toUpperCase()).slice(-2);
14
- }
15
- return n;
16
- }
17
- function u(s, n) {
18
- typeof n != "string" && (n = u.defaultChars);
19
- const e = l(n);
20
- return s.replace(/(%[a-f0-9]{2})+/gi, function(t) {
21
- let r = "";
22
- for (let f = 0, a = t.length; f < a; f += 3) {
23
- const o = parseInt(t.slice(f + 1, f + 3), 16);
24
- if (o < 128) {
25
- r += e[o];
26
- continue;
27
- }
28
- if ((o & 224) === 192 && f + 3 < a) {
29
- const c = parseInt(t.slice(f + 4, f + 6), 16);
30
- if ((c & 192) === 128) {
31
- const i = o << 6 & 1984 | c & 63;
32
- i < 128 ? r += "��" : r += String.fromCharCode(i), f += 3;
33
- continue;
34
- }
35
- }
36
- if ((o & 240) === 224 && f + 6 < a) {
37
- const c = parseInt(t.slice(f + 4, f + 6), 16), i = parseInt(t.slice(f + 7, f + 9), 16);
38
- if ((c & 192) === 128 && (i & 192) === 128) {
39
- const x = o << 12 & 61440 | c << 6 & 4032 | i & 63;
40
- x < 2048 || x >= 55296 && x <= 57343 ? r += "���" : r += String.fromCharCode(x), f += 6;
41
- continue;
42
- }
43
- }
44
- if ((o & 248) === 240 && f + 9 < a) {
45
- const c = parseInt(t.slice(f + 4, f + 6), 16), i = parseInt(t.slice(f + 7, f + 9), 16), x = parseInt(t.slice(f + 10, f + 12), 16);
46
- if ((c & 192) === 128 && (i & 192) === 128 && (x & 192) === 128) {
47
- let C = o << 18 & 1835008 | c << 12 & 258048 | i << 6 & 4032 | x & 63;
48
- C < 65536 || C > 1114111 ? r += "����" : (C -= 65536, r += String.fromCharCode(55296 + (C >> 10), 56320 + (C & 1023))), f += 9;
49
- continue;
50
- }
51
- }
52
- r += "�";
53
- }
54
- return r;
55
- });
56
- }
57
- u.defaultChars = ";/?:@&=+$,#";
58
- u.componentChars = "";
59
- export {
60
- u as default
61
- };
@@ -1,48 +0,0 @@
1
- const C = {};
2
- function s(o) {
3
- let n = C[o];
4
- if (n)
5
- return n;
6
- n = C[o] = [];
7
- for (let e = 0; e < 128; e++) {
8
- const i = String.fromCharCode(e);
9
- /^[0-9a-z]$/i.test(i) ? n.push(i) : n.push("%" + ("0" + e.toString(16).toUpperCase()).slice(-2));
10
- }
11
- for (let e = 0; e < o.length; e++)
12
- n[o.charCodeAt(e)] = o[e];
13
- return n;
14
- }
15
- function h(o, n, e) {
16
- typeof n != "string" && (e = n, n = h.defaultChars), typeof e > "u" && (e = !0);
17
- const i = s(n);
18
- let c = "";
19
- for (let t = 0, r = o.length; t < r; t++) {
20
- const f = o.charCodeAt(t);
21
- if (e && f === 37 && t + 2 < r && /^[0-9a-f]{2}$/i.test(o.slice(t + 1, t + 3))) {
22
- c += o.slice(t, t + 3), t += 2;
23
- continue;
24
- }
25
- if (f < 128) {
26
- c += i[f];
27
- continue;
28
- }
29
- if (f >= 55296 && f <= 57343) {
30
- if (f >= 55296 && f <= 56319 && t + 1 < r) {
31
- const a = o.charCodeAt(t + 1);
32
- if (a >= 56320 && a <= 57343) {
33
- c += encodeURIComponent(o[t] + o[t + 1]), t++;
34
- continue;
35
- }
36
- }
37
- c += "%EF%BF%BD";
38
- continue;
39
- }
40
- c += encodeURIComponent(o[t]);
41
- }
42
- return c;
43
- }
44
- h.defaultChars = ";/?:@&=+$,-_.!~*'()#";
45
- h.componentChars = "-_.!~*'()";
46
- export {
47
- h as default
48
- };
@@ -1,7 +0,0 @@
1
- function a(t) {
2
- let e = "";
3
- return e += t.protocol || "", e += t.slashes ? "//" : "", e += t.auth ? t.auth + "@" : "", t.hostname && t.hostname.indexOf(":") !== -1 ? e += "[" + t.hostname + "]" : e += t.hostname || "", e += t.port ? ":" + t.port : "", e += t.pathname || "", e += t.search || "", e += t.hash || "", e;
4
- }
5
- export {
6
- a as default
7
- };
@@ -1,74 +0,0 @@
1
- function p() {
2
- this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
3
- }
4
- const A = /^([a-z0-9.+-]+:)/i, E = /:[0-9]*$/, k = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, y = ["<", ">", '"', "`", " ", "\r", `
5
- `, " "], I = ["{", "}", "|", "\\", "^", "`"].concat(y), L = ["'"].concat(I), j = ["%", "/", "?", ";", "#"].concat(L), w = ["/", "?", "#"], S = 255, v = /^[+a-z0-9A-Z_-]{0,63}$/, Z = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, C = {
6
- javascript: !0,
7
- "javascript:": !0
8
- }, H = {
9
- http: !0,
10
- https: !0,
11
- ftp: !0,
12
- gopher: !0,
13
- file: !0,
14
- "http:": !0,
15
- "https:": !0,
16
- "ftp:": !0,
17
- "gopher:": !0,
18
- "file:": !0
19
- };
20
- function _(e, h) {
21
- if (e && e instanceof p) return e;
22
- const l = new p();
23
- return l.parse(e, h), l;
24
- }
25
- p.prototype.parse = function(e, h) {
26
- let l, o, m, t = e;
27
- if (t = t.trim(), !h && e.split("#").length === 1) {
28
- const s = k.exec(t);
29
- if (s)
30
- return this.pathname = s[1], s[2] && (this.search = s[2]), this;
31
- }
32
- let n = A.exec(t);
33
- if (n && (n = n[0], l = n.toLowerCase(), this.protocol = n, t = t.substr(n.length)), (h || n || t.match(/^\/\/[^@\/]+@[^@\/]+/)) && (m = t.substr(0, 2) === "//", m && !(n && C[n]) && (t = t.substr(2), this.slashes = !0)), !C[n] && (m || n && !H[n])) {
34
- let s = -1;
35
- for (let i = 0; i < w.length; i++)
36
- o = t.indexOf(w[i]), o !== -1 && (s === -1 || o < s) && (s = o);
37
- let b, c;
38
- s === -1 ? c = t.lastIndexOf("@") : c = t.lastIndexOf("@", s), c !== -1 && (b = t.slice(0, c), t = t.slice(c + 1), this.auth = b), s = -1;
39
- for (let i = 0; i < j.length; i++)
40
- o = t.indexOf(j[i]), o !== -1 && (s === -1 || o < s) && (s = o);
41
- s === -1 && (s = t.length), t[s - 1] === ":" && s--;
42
- const $ = t.slice(0, s);
43
- t = t.slice(s), this.parseHost($), this.hostname = this.hostname || "";
44
- const O = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
45
- if (!O) {
46
- const i = this.hostname.split(/\./);
47
- for (let f = 0, z = i.length; f < z; f++) {
48
- const r = i[f];
49
- if (r && !r.match(v)) {
50
- let P = "";
51
- for (let a = 0, u = r.length; a < u; a++)
52
- r.charCodeAt(a) > 127 ? P += "x" : P += r[a];
53
- if (!P.match(v)) {
54
- const a = i.slice(0, f), u = i.slice(f + 1), x = r.match(Z);
55
- x && (a.push(x[1]), u.unshift(x[2])), u.length && (t = u.join(".") + t), this.hostname = a.join(".");
56
- break;
57
- }
58
- }
59
- }
60
- }
61
- this.hostname.length > S && (this.hostname = ""), O && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
62
- }
63
- const g = t.indexOf("#");
64
- g !== -1 && (this.hash = t.substr(g), t = t.slice(0, g));
65
- const d = t.indexOf("?");
66
- return d !== -1 && (this.search = t.substr(d), t = t.slice(0, d)), t && (this.pathname = t), H[l] && this.hostname && !this.pathname && (this.pathname = ""), this;
67
- };
68
- p.prototype.parseHost = function(e) {
69
- let h = E.exec(e);
70
- h && (h = h[0], h !== ":" && (this.port = h.substr(1)), e = e.substr(0, e.length - h.length)), e && (this.hostname = e);
71
- };
72
- export {
73
- _ as default
74
- };