@opentiny/tiny-robot 0.1.0-alpha.0

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 (260) hide show
  1. package/.vscode/extensions.json +3 -0
  2. package/README.md +1 -0
  3. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  4. package/dist/bubble-item/components/actions/copy.vue.d.ts +10 -0
  5. package/dist/bubble-item/components/actions/index.d.ts +2 -0
  6. package/dist/bubble-item/components/actions/refresh.vue.d.ts +2 -0
  7. package/dist/bubble-item/components/icons/ai.vue.d.ts +2 -0
  8. package/dist/bubble-item/components/icons/index.d.ts +2 -0
  9. package/dist/bubble-item/components/icons/user.vue.d.ts +2 -0
  10. package/dist/bubble-item/index.d.ts +7 -0
  11. package/dist/bubble-list/bubble-list.vue.d.ts +5 -0
  12. package/dist/bubble-list/index.d.ts +8 -0
  13. package/dist/bubble-list/index.type.d.ts +55 -0
  14. package/dist/conversations/index.d.ts +7 -0
  15. package/dist/conversations/index.vue.d.ts +2 -0
  16. package/dist/index.d.ts +12 -0
  17. package/dist/index.js +29 -0
  18. package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +2202 -0
  19. package/dist/node_modules/.pnpm/@opentiny_vue-button@3.22.0/node_modules/@opentiny/vue-button/lib/index.js +113 -0
  20. package/dist/node_modules/.pnpm/@opentiny_vue-button@3.22.0/node_modules/@opentiny/vue-button/lib/pc.js +93 -0
  21. package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +725 -0
  22. package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.22.0/node_modules/@opentiny/vue-dialog-box/lib/index.js +198 -0
  23. package/dist/node_modules/.pnpm/@opentiny_vue-dialog-box@3.22.0/node_modules/@opentiny/vue-dialog-box/lib/pc.js +204 -0
  24. package/dist/node_modules/.pnpm/@opentiny_vue-directive@3.22.0/node_modules/@opentiny/vue-directive/index.js +57 -0
  25. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useEventListener.js +10 -0
  26. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useInstanceSlots.js +14 -0
  27. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/useRelation.js +54 -0
  28. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +85 -0
  29. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popup.js +69 -0
  30. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/close.js +29 -0
  31. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/eyeclose.js +42 -0
  32. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/eyeopen.js +43 -0
  33. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/finish.js +34 -0
  34. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/fullscreen.js +30 -0
  35. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/loading-shadow.js +78 -0
  36. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/minscreen.js +30 -0
  37. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-after.js +24 -0
  38. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-before.js +24 -0
  39. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-after.js +24 -0
  40. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-before.js +24 -0
  41. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-center.js +24 -0
  42. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-left.js +24 -0
  43. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-align-right.js +24 -0
  44. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-bold.js +24 -0
  45. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-block.js +24 -0
  46. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-code-view.js +24 -0
  47. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-color.js +24 -0
  48. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-column.js +24 -0
  49. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-row.js +24 -0
  50. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-delete-table.js +24 -0
  51. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-font-size.js +24 -0
  52. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-format-clear.js +24 -0
  53. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-h1.js +24 -0
  54. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-h2.js +24 -0
  55. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-h3.js +24 -0
  56. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-h4.js +24 -0
  57. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-h5.js +24 -0
  58. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-h6.js +24 -0
  59. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-heading.js +24 -0
  60. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-high-light.js +24 -0
  61. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-image.js +24 -0
  62. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-italic.js +24 -0
  63. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-line-height.js +24 -0
  64. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-link-unlink.js +24 -0
  65. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-link.js +24 -0
  66. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-ordered.js +24 -0
  67. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-list-unordered.js +24 -0
  68. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells-vertical.js +24 -0
  69. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells.js +24 -0
  70. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-node-delete.js +24 -0
  71. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-paragraph.js +24 -0
  72. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-quote-text.js +24 -0
  73. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-redo.js +24 -0
  74. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-horizontal.js +24 -0
  75. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-vertical.js +24 -0
  76. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-strike-through.js +24 -0
  77. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-subscript.js +24 -0
  78. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-superscript.js +24 -0
  79. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-table.js +24 -0
  80. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-task-list.js +24 -0
  81. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-underline.js +24 -0
  82. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/rich-text-undo.js +24 -0
  83. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/sub-script.js +29 -0
  84. package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.22.0/node_modules/@opentiny/vue-icon/lib/warn.js +26 -0
  85. package/dist/node_modules/.pnpm/@opentiny_vue-input@3.22.0/node_modules/@opentiny/vue-input/lib/index.js +196 -0
  86. package/dist/node_modules/.pnpm/@opentiny_vue-input@3.22.0/node_modules/@opentiny/vue-input/lib/pc.js +568 -0
  87. package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.22.0/node_modules/@opentiny/vue-locale/lib/index.js +1783 -0
  88. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/button/index.js +13 -0
  89. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/button/vue.js +34 -0
  90. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/chunk-G2ADBYYC.js +12 -0
  91. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/dialog-box/index.js +135 -0
  92. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/dialog-box/vue.js +149 -0
  93. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/input/index.js +228 -0
  94. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/input/vue.js +263 -0
  95. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tall-storage/index.js +63 -0
  96. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tall-storage/vue-storage-box.js +16 -0
  97. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tall-storage/vue.js +23 -0
  98. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/index.js +77 -0
  99. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +90 -0
  100. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js +176 -0
  101. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +248 -0
  102. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js +277 -0
  103. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js +46 -0
  104. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
  105. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
  106. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.js +187 -0
  107. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.js +19 -0
  108. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +5 -0
  109. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +10 -0
  110. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js +8 -0
  111. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +4 -0
  112. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +15 -0
  113. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +7 -0
  114. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +5 -0
  115. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js +9 -0
  116. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js +54 -0
  117. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +7 -0
  118. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js +6 -0
  119. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js +9 -0
  120. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js +7 -0
  121. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js +22 -0
  122. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.js +67 -0
  123. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.js +5 -0
  124. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.js +164 -0
  125. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.js +8 -0
  126. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.js +44 -0
  127. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.js +21 -0
  128. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.js +37 -0
  129. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.js +112 -0
  130. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.js +63 -0
  131. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.js +34 -0
  132. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.js +96 -0
  133. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.js +78 -0
  134. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.js +40 -0
  135. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.js +59 -0
  136. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.js +127 -0
  137. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.js +95 -0
  138. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.js +59 -0
  139. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.js +23 -0
  140. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.js +30 -0
  141. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.js +28 -0
  142. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.js +27 -0
  143. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.js +37 -0
  144. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.js +43 -0
  145. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.js +110 -0
  146. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.js +25 -0
  147. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.js +95 -0
  148. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.js +84 -0
  149. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.js +99 -0
  150. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.js +7 -0
  151. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.js +10 -0
  152. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.js +57 -0
  153. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.js +9 -0
  154. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.js +31 -0
  155. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.js +80 -0
  156. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.js +8 -0
  157. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.js +16 -0
  158. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.js +46 -0
  159. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.js +31 -0
  160. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +34 -0
  161. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.js +57 -0
  162. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.js +33 -0
  163. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.js +32 -0
  164. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.js +10 -0
  165. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.js +32 -0
  166. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.js +48 -0
  167. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.js +40 -0
  168. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.js +28 -0
  169. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.js +23 -0
  170. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.js +27 -0
  171. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.js +54 -0
  172. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.js +39 -0
  173. package/dist/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.js +31 -0
  174. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.js +10 -0
  175. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.js +61 -0
  176. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.js +48 -0
  177. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.js +7 -0
  178. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.js +74 -0
  179. package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js +139 -0
  180. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.js +4 -0
  181. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.js +4 -0
  182. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.js +4 -0
  183. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.js +4 -0
  184. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.js +4 -0
  185. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.js +14 -0
  186. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.js +4 -0
  187. package/dist/packages/components/src/assets/icons/accessory.svg.js +4 -0
  188. package/dist/packages/components/src/assets/icons/loading-speech.svg.js +4 -0
  189. package/dist/packages/components/src/assets/icons/loading.svg.js +4 -0
  190. package/dist/packages/components/src/assets/icons/send.svg.js +4 -0
  191. package/dist/packages/components/src/assets/icons/voice.svg.js +4 -0
  192. package/dist/packages/components/src/bubble-item/bubble-item.vue.js +7 -0
  193. package/dist/packages/components/src/bubble-item/bubble-item.vue2.js +111 -0
  194. package/dist/packages/components/src/bubble-item/components/actions/copy.vue.js +46 -0
  195. package/dist/packages/components/src/bubble-item/components/actions/copy.vue2.js +4 -0
  196. package/dist/packages/components/src/bubble-item/components/actions/refresh.vue.js +12 -0
  197. package/dist/packages/components/src/bubble-item/components/icons/ai.vue.js +45 -0
  198. package/dist/packages/components/src/bubble-item/components/icons/user.vue.js +63 -0
  199. package/dist/packages/components/src/bubble-item/index.js +9 -0
  200. package/dist/packages/components/src/bubble-list/bubble-list.vue.js +7 -0
  201. package/dist/packages/components/src/bubble-list/bubble-list.vue2.js +52 -0
  202. package/dist/packages/components/src/bubble-list/index.js +9 -0
  203. package/dist/packages/components/src/conversations/index.js +9 -0
  204. package/dist/packages/components/src/conversations/index.vue.js +9 -0
  205. package/dist/packages/components/src/sender/components/ActionButtons.vue.js +161 -0
  206. package/dist/packages/components/src/sender/components/ActionButtons.vue2.js +4 -0
  207. package/dist/packages/components/src/sender/composables/useInputHandler.js +34 -0
  208. package/dist/packages/components/src/sender/composables/useKeyboardHandler.js +31 -0
  209. package/dist/packages/components/src/sender/composables/useSpeechHandler.js +67 -0
  210. package/dist/packages/components/src/sender/index.js +9 -0
  211. package/dist/packages/components/src/sender/index.vue.js +233 -0
  212. package/dist/packages/components/src/sender/index.vue2.js +4 -0
  213. package/dist/packages/components/src/welcome/index.js +9 -0
  214. package/dist/packages/components/src/welcome/index.vue.js +9 -0
  215. package/dist/sender/components/ActionButtons.vue.d.ts +23 -0
  216. package/dist/sender/composables/useInputHandler.d.ts +17 -0
  217. package/dist/sender/composables/useKeyboardHandler.d.ts +18 -0
  218. package/dist/sender/composables/useSpeechHandler.d.ts +14 -0
  219. package/dist/sender/index.d.ts +7 -0
  220. package/dist/sender/index.type.d.ts +90 -0
  221. package/dist/sender/index.vue.d.ts +948 -0
  222. package/dist/style.css +1 -0
  223. package/dist/welcome/index.d.ts +7 -0
  224. package/dist/welcome/index.vue.d.ts +2 -0
  225. package/package.json +42 -0
  226. package/src/assets/icons/accessory.svg +12 -0
  227. package/src/assets/icons/loading-speech.svg +16 -0
  228. package/src/assets/icons/loading.svg +17 -0
  229. package/src/assets/icons/send.svg +21 -0
  230. package/src/assets/icons/voice.svg +22 -0
  231. package/src/bubble-item/bubble-item.vue +264 -0
  232. package/src/bubble-item/components/actions/copy.vue +47 -0
  233. package/src/bubble-item/components/actions/index.ts +2 -0
  234. package/src/bubble-item/components/actions/refresh.vue +27 -0
  235. package/src/bubble-item/components/icons/ai.vue +30 -0
  236. package/src/bubble-item/components/icons/index.ts +2 -0
  237. package/src/bubble-item/components/icons/user.vue +78 -0
  238. package/src/bubble-item/index.ts +12 -0
  239. package/src/bubble-list/bubble-list.vue +53 -0
  240. package/src/bubble-list/index.ts +14 -0
  241. package/src/bubble-list/index.type.ts +65 -0
  242. package/src/conversations/index.ts +12 -0
  243. package/src/conversations/index.vue +3 -0
  244. package/src/index.ts +30 -0
  245. package/src/sender/components/ActionButtons.vue +165 -0
  246. package/src/sender/composables/useInputHandler.ts +69 -0
  247. package/src/sender/composables/useKeyboardHandler.ts +99 -0
  248. package/src/sender/composables/useSpeechHandler.ts +128 -0
  249. package/src/sender/global.d.ts +44 -0
  250. package/src/sender/index.less +344 -0
  251. package/src/sender/index.ts +12 -0
  252. package/src/sender/index.type.ts +111 -0
  253. package/src/sender/index.vue +289 -0
  254. package/src/sender/vars.less +84 -0
  255. package/src/vite-env.d.ts +1 -0
  256. package/src/welcome/index.ts +12 -0
  257. package/src/welcome/index.vue +3 -0
  258. package/tsconfig.json +37 -0
  259. package/tsconfig.node.json +10 -0
  260. package/vite.config.ts +53 -0
@@ -0,0 +1,176 @@
1
+ import { defineComponent as l, $setup as f, $prefix as i, $props as p } from "../../../../../@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js";
2
+ import o from "./pc.js";
3
+ function a() {
4
+ return a = Object.assign ? Object.assign.bind() : function(e) {
5
+ for (var t = 1; t < arguments.length; t++) {
6
+ var n = arguments[t];
7
+ for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
8
+ }
9
+ return e;
10
+ }, a.apply(null, arguments);
11
+ }
12
+ var d = function(t) {
13
+ var n, r = typeof process == "object" ? (n = process.env) == null ? void 0 : n.TINY_MODE : null;
14
+ return (r || t) === "pc" ? o : (r || t) === "mobile-first" ? o : o;
15
+ }, c = a({}, p, {
16
+ visible: {
17
+ type: String,
18
+ default: function() {
19
+ return "always";
20
+ },
21
+ validator: function(t) {
22
+ return ["always", "auto"].includes(t);
23
+ }
24
+ },
25
+ adjustArrow: {
26
+ type: Boolean,
27
+ default: function() {
28
+ return !1;
29
+ }
30
+ },
31
+ appendToBody: {
32
+ type: Boolean,
33
+ default: function() {
34
+ return !0;
35
+ }
36
+ },
37
+ arrowOffset: {
38
+ type: Number,
39
+ default: function() {
40
+ return 0;
41
+ }
42
+ },
43
+ content: {
44
+ type: [String, Object]
45
+ },
46
+ disabled: {
47
+ type: Boolean
48
+ },
49
+ enterable: {
50
+ type: Boolean,
51
+ default: function() {
52
+ return !0;
53
+ }
54
+ },
55
+ hideAfter: {
56
+ type: Number,
57
+ default: function() {
58
+ return 0;
59
+ }
60
+ },
61
+ manual: {
62
+ type: Boolean
63
+ },
64
+ modelValue: {
65
+ type: Boolean
66
+ },
67
+ offset: {
68
+ default: function() {
69
+ return 0;
70
+ }
71
+ },
72
+ effect: {
73
+ type: String,
74
+ default: function() {
75
+ return "";
76
+ }
77
+ },
78
+ openDelay: {
79
+ type: Number,
80
+ default: function() {
81
+ return 0;
82
+ }
83
+ },
84
+ closeDelay: {
85
+ type: Number,
86
+ default: function() {
87
+ return 100;
88
+ }
89
+ },
90
+ placement: {
91
+ type: String,
92
+ default: function() {
93
+ return "bottom";
94
+ }
95
+ },
96
+ popper: {},
97
+ popperClass: {
98
+ type: String
99
+ },
100
+ popperOptions: {
101
+ default: function() {
102
+ return {};
103
+ }
104
+ },
105
+ pre: {
106
+ type: Boolean
107
+ },
108
+ reference: {},
109
+ renderContent: {
110
+ type: Function
111
+ },
112
+ tabindex: {
113
+ type: Number,
114
+ default: function() {
115
+ return 0;
116
+ }
117
+ },
118
+ transition: {
119
+ type: String,
120
+ default: function() {
121
+ return "tiny-fade-in-linear";
122
+ }
123
+ },
124
+ type: {
125
+ type: String,
126
+ validator: function(t) {
127
+ return !!~["normal", "warning", "error", "info", "success"].indexOf(t);
128
+ }
129
+ },
130
+ visibleArrow: {
131
+ type: Boolean,
132
+ default: function() {
133
+ return !0;
134
+ }
135
+ },
136
+ genArrowByHtml: {
137
+ type: Boolean,
138
+ default: function() {
139
+ return !0;
140
+ }
141
+ },
142
+ zIndex: {
143
+ type: String,
144
+ default: function() {
145
+ return "next";
146
+ }
147
+ },
148
+ contentMaxHeight: {
149
+ type: String,
150
+ default: function() {
151
+ return "80vh";
152
+ }
153
+ }
154
+ }), u = l({
155
+ name: i + "Tooltip",
156
+ componentName: "Tooltip",
157
+ props: c,
158
+ setup: function(t, n) {
159
+ return f({
160
+ props: t,
161
+ context: n,
162
+ template: d
163
+ });
164
+ }
165
+ }), s = "3.undefined";
166
+ u.model = {
167
+ prop: "modelValue",
168
+ event: "update:modelValue"
169
+ };
170
+ u.install = function(e) {
171
+ e.component(u.name, u);
172
+ };
173
+ u.version = s;
174
+ export {
175
+ u as default
176
+ };
@@ -0,0 +1,248 @@
1
+ import * as y from "vue";
2
+ import { withDirectives as h, createVNode as m, vShow as C } from "vue";
3
+ import { renderless as w, api as x } from "../../../../../@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js";
4
+ import { defineComponent as S, createComponent as B, h as f, deduplicateCssClass as M, stringifyCssClass as O, setup as N, $prefix as P, parseVnode as E, isEmptyVnode as A, $props as D } from "../../../../../@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js";
5
+ /* empty css */
6
+ function d() {
7
+ return d = Object.assign ? Object.assign.bind() : function(t) {
8
+ for (var e = 1; e < arguments.length; e++) {
9
+ var u = arguments[e];
10
+ for (var a in u) ({}).hasOwnProperty.call(u, a) && (t[a] = u[a]);
11
+ }
12
+ return t;
13
+ }, d.apply(null, arguments);
14
+ }
15
+ var F = /* @__PURE__ */ S({
16
+ name: P + "Tooltip",
17
+ componentName: "Tooltip",
18
+ props: d({}, D, {
19
+ visible: {
20
+ type: String,
21
+ default: function() {
22
+ return "always";
23
+ },
24
+ validator: function(e) {
25
+ return ["always", "auto"].includes(e);
26
+ }
27
+ },
28
+ adjustArrow: {
29
+ type: Boolean,
30
+ default: function() {
31
+ return !1;
32
+ }
33
+ },
34
+ appendToBody: {
35
+ type: Boolean,
36
+ default: function() {
37
+ return !0;
38
+ }
39
+ },
40
+ arrowOffset: {
41
+ type: Number,
42
+ default: function() {
43
+ return 0;
44
+ }
45
+ },
46
+ boundariesPadding: {
47
+ type: Number,
48
+ default: function() {
49
+ return 5;
50
+ }
51
+ },
52
+ closeDelay: {
53
+ type: Number,
54
+ default: function() {
55
+ return 300;
56
+ }
57
+ },
58
+ content: {
59
+ type: [String, Object]
60
+ },
61
+ disabled: {
62
+ type: Boolean
63
+ },
64
+ effect: {
65
+ type: String,
66
+ default: function() {
67
+ return "dark";
68
+ }
69
+ },
70
+ enterable: {
71
+ type: Boolean,
72
+ default: function() {
73
+ return !0;
74
+ }
75
+ },
76
+ hideAfter: {
77
+ type: Number,
78
+ default: function() {
79
+ return 0;
80
+ }
81
+ },
82
+ manual: {
83
+ type: Boolean
84
+ },
85
+ modelValue: {
86
+ type: Boolean
87
+ },
88
+ offset: {
89
+ default: function() {
90
+ return 0;
91
+ }
92
+ },
93
+ openDelay: {
94
+ type: Number,
95
+ default: function() {
96
+ return 0;
97
+ }
98
+ },
99
+ placement: {
100
+ type: String,
101
+ default: function() {
102
+ return "bottom";
103
+ }
104
+ },
105
+ popper: {},
106
+ popperClass: {
107
+ type: String
108
+ },
109
+ popperOptions: {
110
+ default: function() {
111
+ return {
112
+ gpuAcceleration: !1,
113
+ boundariesPadding: 10
114
+ };
115
+ }
116
+ },
117
+ pre: {
118
+ type: Boolean
119
+ },
120
+ reference: {},
121
+ renderContent: {
122
+ type: Function
123
+ },
124
+ tabindex: {
125
+ type: Number,
126
+ default: function() {
127
+ return 0;
128
+ }
129
+ },
130
+ transition: {
131
+ type: String,
132
+ default: function() {
133
+ return "tiny-fade-in-linear";
134
+ }
135
+ },
136
+ type: {
137
+ type: String,
138
+ validator: function(e) {
139
+ return !!~["normal", "warning", "error", "info", "success"].indexOf(e);
140
+ }
141
+ },
142
+ visibleArrow: {
143
+ type: Boolean,
144
+ default: function() {
145
+ return !0;
146
+ }
147
+ },
148
+ zIndex: {
149
+ type: String,
150
+ default: function() {
151
+ return "next";
152
+ }
153
+ },
154
+ contentMaxHeight: {
155
+ type: String
156
+ }
157
+ }),
158
+ setup: function(e, u) {
159
+ return N({
160
+ props: e,
161
+ context: u,
162
+ renderless: w,
163
+ api: x
164
+ });
165
+ },
166
+ render: function() {
167
+ var e = this, u = function(n) {
168
+ var r = n.slots.content && n.slots.content();
169
+ if (r && (!y.Comment || r[0].type !== y.Comment))
170
+ return r;
171
+ var o;
172
+ return n.renderContent ? o = n.renderContent(f, n.content) : n.pre ? o = n.content ? f("pre", n.content) : null : o = n.content, o;
173
+ };
174
+ if (!Object.prototype.hasOwnProperty.call(this, "popperVM")) {
175
+ var a = {
176
+ value: null
177
+ };
178
+ this.d({
179
+ popperVM: {
180
+ get: function() {
181
+ return a.value || (a.value = B({
182
+ el: document.createElement("div"),
183
+ propsData: null,
184
+ component: {
185
+ render: function() {
186
+ var r = u(e), o = typeof r == "string", i = {
187
+ attrs: {
188
+ name: e.transition
189
+ },
190
+ on: {
191
+ "after-leave": e.doDestroy
192
+ }
193
+ }, g = "is-" + (e.type || e.effect || "dark"), b = function() {
194
+ return e.setExpectedState(!0);
195
+ }, _ = function() {
196
+ e.setExpectedState(!1), e.debounceClose();
197
+ };
198
+ return e.$nextTick(function() {
199
+ !e.disabled && e.state.showPopper && r && e.updatePopper();
200
+ }), f("transition", i, [h(m("div", {
201
+ ref: "popper",
202
+ id: e.state.tooltipId,
203
+ class: ["tiny-tooltip", "tiny-tooltip__popper", g, e.popperClass, {
204
+ "tiny-tooltip__show-tips": e.state.showContent
205
+ }],
206
+ style: "max-width:" + e.state.tipsMaxWidth + "px",
207
+ role: "tooltip",
208
+ "aria-hidden": e.disabled || !e.state.showPopper ? "true" : "false",
209
+ onMouseenter: function() {
210
+ return b();
211
+ },
212
+ onMouseleave: function() {
213
+ return _();
214
+ }
215
+ }, [o ? m("div", {
216
+ class: "tiny-tooltip__content-wrapper",
217
+ style: "max-height:" + e.contentMaxHeight
218
+ }, [r]) : r]), [[C, !e.disabled && e.state.showPopper && r]])]);
219
+ }
220
+ }
221
+ })), a.value;
222
+ },
223
+ set: function(n) {
224
+ return a.value = n;
225
+ }
226
+ }
227
+ });
228
+ }
229
+ var v = function() {
230
+ var n = e.slots.default && e.slots.default();
231
+ if (!Array.isArray(n)) return null;
232
+ for (var r = null, o = 0; o < n.length; o++) {
233
+ var i = E(n[o]);
234
+ if (!A(i)) {
235
+ r = i;
236
+ break;
237
+ }
238
+ }
239
+ return r;
240
+ }, l = v();
241
+ if (!l) return null;
242
+ var c = l.data || l.props || (l.props = {});
243
+ return c.class = M("tiny-tooltip " + O(c.class)), l;
244
+ }
245
+ });
246
+ export {
247
+ F as default
248
+ };
@@ -0,0 +1,277 @@
1
+ import L from "./generated/decode-data-html.js";
2
+ import R from "./generated/decode-data-xml.js";
3
+ import { fromCodePoint as _, replaceCodePoint as A } from "./decode_codepoint.js";
4
+ var c;
5
+ (function(t) {
6
+ t[t.NUM = 35] = "NUM", t[t.SEMI = 59] = "SEMI", t[t.EQUALS = 61] = "EQUALS", t[t.ZERO = 48] = "ZERO", t[t.NINE = 57] = "NINE", t[t.LOWER_A = 97] = "LOWER_A", t[t.LOWER_F = 102] = "LOWER_F", t[t.LOWER_X = 120] = "LOWER_X", t[t.LOWER_Z = 122] = "LOWER_Z", t[t.UPPER_A = 65] = "UPPER_A", t[t.UPPER_F = 70] = "UPPER_F", t[t.UPPER_Z = 90] = "UPPER_Z";
7
+ })(c || (c = {}));
8
+ const x = 32;
9
+ var N;
10
+ (function(t) {
11
+ t[t.VALUE_LENGTH = 49152] = "VALUE_LENGTH", t[t.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", t[t.JUMP_TABLE = 127] = "JUMP_TABLE";
12
+ })(N || (N = {}));
13
+ function d(t) {
14
+ return t >= c.ZERO && t <= c.NINE;
15
+ }
16
+ function P(t) {
17
+ return t >= c.UPPER_A && t <= c.UPPER_F || t >= c.LOWER_A && t <= c.LOWER_F;
18
+ }
19
+ function I(t) {
20
+ return t >= c.UPPER_A && t <= c.UPPER_Z || t >= c.LOWER_A && t <= c.LOWER_Z || d(t);
21
+ }
22
+ function U(t) {
23
+ return t === c.EQUALS || I(t);
24
+ }
25
+ var s;
26
+ (function(t) {
27
+ t[t.EntityStart = 0] = "EntityStart", t[t.NumericStart = 1] = "NumericStart", t[t.NumericDecimal = 2] = "NumericDecimal", t[t.NumericHex = 3] = "NumericHex", t[t.NamedEntity = 4] = "NamedEntity";
28
+ })(s || (s = {}));
29
+ var E;
30
+ (function(t) {
31
+ t[t.Legacy = 0] = "Legacy", t[t.Strict = 1] = "Strict", t[t.Attribute = 2] = "Attribute";
32
+ })(E || (E = {}));
33
+ class y {
34
+ constructor(e, i, r) {
35
+ this.decodeTree = e, this.emitCodePoint = i, this.errors = r, this.state = s.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = E.Strict;
36
+ }
37
+ /** Resets the instance to make it reusable. */
38
+ startEntity(e) {
39
+ this.decodeMode = e, this.state = s.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
40
+ }
41
+ /**
42
+ * Write an entity to the decoder. This can be called multiple times with partial entities.
43
+ * If the entity is incomplete, the decoder will return -1.
44
+ *
45
+ * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
46
+ * entity is incomplete, and resume when the next string is written.
47
+ *
48
+ * @param string The string containing the entity (or a continuation of the entity).
49
+ * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
50
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
51
+ */
52
+ write(e, i) {
53
+ switch (this.state) {
54
+ case s.EntityStart:
55
+ return e.charCodeAt(i) === c.NUM ? (this.state = s.NumericStart, this.consumed += 1, this.stateNumericStart(e, i + 1)) : (this.state = s.NamedEntity, this.stateNamedEntity(e, i));
56
+ case s.NumericStart:
57
+ return this.stateNumericStart(e, i);
58
+ case s.NumericDecimal:
59
+ return this.stateNumericDecimal(e, i);
60
+ case s.NumericHex:
61
+ return this.stateNumericHex(e, i);
62
+ case s.NamedEntity:
63
+ return this.stateNamedEntity(e, i);
64
+ }
65
+ }
66
+ /**
67
+ * Switches between the numeric decimal and hexadecimal states.
68
+ *
69
+ * Equivalent to the `Numeric character reference state` in the HTML spec.
70
+ *
71
+ * @param str The string containing the entity (or a continuation of the entity).
72
+ * @param offset The current offset.
73
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
74
+ */
75
+ stateNumericStart(e, i) {
76
+ return i >= e.length ? -1 : (e.charCodeAt(i) | x) === c.LOWER_X ? (this.state = s.NumericHex, this.consumed += 1, this.stateNumericHex(e, i + 1)) : (this.state = s.NumericDecimal, this.stateNumericDecimal(e, i));
77
+ }
78
+ addToNumericResult(e, i, r, n) {
79
+ if (i !== r) {
80
+ const u = r - i;
81
+ this.result = this.result * Math.pow(n, u) + parseInt(e.substr(i, u), n), this.consumed += u;
82
+ }
83
+ }
84
+ /**
85
+ * Parses a hexadecimal numeric entity.
86
+ *
87
+ * Equivalent to the `Hexademical character reference state` in the HTML spec.
88
+ *
89
+ * @param str The string containing the entity (or a continuation of the entity).
90
+ * @param offset The current offset.
91
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
92
+ */
93
+ stateNumericHex(e, i) {
94
+ const r = i;
95
+ for (; i < e.length; ) {
96
+ const n = e.charCodeAt(i);
97
+ if (d(n) || P(n))
98
+ i += 1;
99
+ else
100
+ return this.addToNumericResult(e, r, i, 16), this.emitNumericEntity(n, 3);
101
+ }
102
+ return this.addToNumericResult(e, r, i, 16), -1;
103
+ }
104
+ /**
105
+ * Parses a decimal numeric entity.
106
+ *
107
+ * Equivalent to the `Decimal character reference state` in the HTML spec.
108
+ *
109
+ * @param str The string containing the entity (or a continuation of the entity).
110
+ * @param offset The current offset.
111
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
112
+ */
113
+ stateNumericDecimal(e, i) {
114
+ const r = i;
115
+ for (; i < e.length; ) {
116
+ const n = e.charCodeAt(i);
117
+ if (d(n))
118
+ i += 1;
119
+ else
120
+ return this.addToNumericResult(e, r, i, 10), this.emitNumericEntity(n, 2);
121
+ }
122
+ return this.addToNumericResult(e, r, i, 10), -1;
123
+ }
124
+ /**
125
+ * Validate and emit a numeric entity.
126
+ *
127
+ * Implements the logic from the `Hexademical character reference start
128
+ * state` and `Numeric character reference end state` in the HTML spec.
129
+ *
130
+ * @param lastCp The last code point of the entity. Used to see if the
131
+ * entity was terminated with a semicolon.
132
+ * @param expectedLength The minimum number of characters that should be
133
+ * consumed. Used to validate that at least one digit
134
+ * was consumed.
135
+ * @returns The number of characters that were consumed.
136
+ */
137
+ emitNumericEntity(e, i) {
138
+ var r;
139
+ if (this.consumed <= i)
140
+ return (r = this.errors) === null || r === void 0 || r.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
141
+ if (e === c.SEMI)
142
+ this.consumed += 1;
143
+ else if (this.decodeMode === E.Strict)
144
+ return 0;
145
+ return this.emitCodePoint(A(this.result), this.consumed), this.errors && (e !== c.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
146
+ }
147
+ /**
148
+ * Parses a named entity.
149
+ *
150
+ * Equivalent to the `Named character reference state` in the HTML spec.
151
+ *
152
+ * @param str The string containing the entity (or a continuation of the entity).
153
+ * @param offset The current offset.
154
+ * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
155
+ */
156
+ stateNamedEntity(e, i) {
157
+ const { decodeTree: r } = this;
158
+ let n = r[this.treeIndex], u = (n & N.VALUE_LENGTH) >> 14;
159
+ for (; i < e.length; i++, this.excess++) {
160
+ const m = e.charCodeAt(i);
161
+ if (this.treeIndex = T(r, n, this.treeIndex + Math.max(1, u), m), this.treeIndex < 0)
162
+ return this.result === 0 || // If we are parsing an attribute
163
+ this.decodeMode === E.Attribute && // We shouldn't have consumed any characters after the entity,
164
+ (u === 0 || // And there should be no invalid characters.
165
+ U(m)) ? 0 : this.emitNotTerminatedNamedEntity();
166
+ if (n = r[this.treeIndex], u = (n & N.VALUE_LENGTH) >> 14, u !== 0) {
167
+ if (m === c.SEMI)
168
+ return this.emitNamedEntityData(this.treeIndex, u, this.consumed + this.excess);
169
+ this.decodeMode !== E.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
170
+ }
171
+ }
172
+ return -1;
173
+ }
174
+ /**
175
+ * Emit a named entity that was not terminated with a semicolon.
176
+ *
177
+ * @returns The number of characters consumed.
178
+ */
179
+ emitNotTerminatedNamedEntity() {
180
+ var e;
181
+ const { result: i, decodeTree: r } = this, n = (r[i] & N.VALUE_LENGTH) >> 14;
182
+ return this.emitNamedEntityData(i, n, this.consumed), (e = this.errors) === null || e === void 0 || e.missingSemicolonAfterCharacterReference(), this.consumed;
183
+ }
184
+ /**
185
+ * Emit a named entity.
186
+ *
187
+ * @param result The index of the entity in the decode tree.
188
+ * @param valueLength The number of bytes in the entity.
189
+ * @param consumed The number of characters consumed.
190
+ *
191
+ * @returns The number of characters consumed.
192
+ */
193
+ emitNamedEntityData(e, i, r) {
194
+ const { decodeTree: n } = this;
195
+ return this.emitCodePoint(i === 1 ? n[e] & ~N.VALUE_LENGTH : n[e + 1], r), i === 3 && this.emitCodePoint(n[e + 2], r), r;
196
+ }
197
+ /**
198
+ * Signal to the parser that the end of the input was reached.
199
+ *
200
+ * Remaining data will be emitted and relevant errors will be produced.
201
+ *
202
+ * @returns The number of characters consumed.
203
+ */
204
+ end() {
205
+ var e;
206
+ switch (this.state) {
207
+ case s.NamedEntity:
208
+ return this.result !== 0 && (this.decodeMode !== E.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
209
+ case s.NumericDecimal:
210
+ return this.emitNumericEntity(0, 2);
211
+ case s.NumericHex:
212
+ return this.emitNumericEntity(0, 3);
213
+ case s.NumericStart:
214
+ return (e = this.errors) === null || e === void 0 || e.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
215
+ case s.EntityStart:
216
+ return 0;
217
+ }
218
+ }
219
+ }
220
+ function o(t) {
221
+ let e = "";
222
+ const i = new y(t, (r) => e += _(r));
223
+ return function(n, u) {
224
+ let m = 0, h = 0;
225
+ for (; (h = n.indexOf("&", h)) >= 0; ) {
226
+ e += n.slice(m, h), i.startEntity(u);
227
+ const l = i.write(
228
+ n,
229
+ // Skip the "&"
230
+ h + 1
231
+ );
232
+ if (l < 0) {
233
+ m = h + i.end();
234
+ break;
235
+ }
236
+ m = h + l, h = l === 0 ? m + 1 : m;
237
+ }
238
+ const a = e + n.slice(m);
239
+ return e = "", a;
240
+ };
241
+ }
242
+ function T(t, e, i, r) {
243
+ const n = (e & N.BRANCH_LENGTH) >> 7, u = e & N.JUMP_TABLE;
244
+ if (n === 0)
245
+ return u !== 0 && r === u ? i : -1;
246
+ if (u) {
247
+ const a = r - u;
248
+ return a < 0 || a >= n ? -1 : t[i + a] - 1;
249
+ }
250
+ let m = i, h = m + n - 1;
251
+ for (; m <= h; ) {
252
+ const a = m + h >>> 1, l = t[a];
253
+ if (l < r)
254
+ m = a + 1;
255
+ else if (l > r)
256
+ h = a - 1;
257
+ else
258
+ return t[a + n];
259
+ }
260
+ return -1;
261
+ }
262
+ const H = o(L);
263
+ o(R);
264
+ function M(t, e = E.Legacy) {
265
+ return H(t, e);
266
+ }
267
+ export {
268
+ N as BinTrieFlags,
269
+ E as DecodingMode,
270
+ y as EntityDecoder,
271
+ M as decodeHTML,
272
+ T as determineBranch,
273
+ _ as fromCodePoint,
274
+ L as htmlDecodeTree,
275
+ A as replaceCodePoint,
276
+ R as xmlDecodeTree
277
+ };