superdoc 0.20.0-next.13

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 (712) hide show
  1. package/README.md +113 -0
  2. package/dist/chunks/PdfViewer-Cdw_Rxtl.cjs +507 -0
  3. package/dist/chunks/PdfViewer-UKMeGyCc.es.js +507 -0
  4. package/dist/chunks/blank-docx-CPqX9RF5.cjs +3 -0
  5. package/dist/chunks/blank-docx-iwdyG9RH.es.js +4 -0
  6. package/dist/chunks/eventemitter3-B_kO1Pxm.cjs +168 -0
  7. package/dist/chunks/eventemitter3-CZv6vEhA.es.js +169 -0
  8. package/dist/chunks/index-ByynlgNA.es.js +18649 -0
  9. package/dist/chunks/index-QAHP9Hp3.cjs +18664 -0
  10. package/dist/chunks/jszip-B8KIZSNe.es.js +1774 -0
  11. package/dist/chunks/jszip-b7l8QkfH.cjs +1773 -0
  12. package/dist/chunks/super-editor.es-BFcP4oFS.cjs +83013 -0
  13. package/dist/chunks/super-editor.es-D9-ZMXnA.es.js +82998 -0
  14. package/dist/chunks/uuid-CQzaMNgL.cjs +36 -0
  15. package/dist/chunks/uuid-DIIKH5Zc.es.js +37 -0
  16. package/dist/chunks/vue-CXxsqYcP.es.js +9743 -0
  17. package/dist/chunks/vue-DWle4Cai.cjs +9742 -0
  18. package/dist/chunks/xml-js-CX8FH0He.cjs +3 -0
  19. package/dist/chunks/xml-js-D0tLGmKu.es.js +2 -0
  20. package/dist/components/CommentsLayer/comment-schemas.d.ts +17 -0
  21. package/dist/components/CommentsLayer/comment-schemas.d.ts.map +1 -0
  22. package/dist/components/CommentsLayer/commentsList/super-comments-list.d.ts +21 -0
  23. package/dist/components/CommentsLayer/commentsList/super-comments-list.d.ts.map +1 -0
  24. package/dist/components/CommentsLayer/helpers.d.ts +8 -0
  25. package/dist/components/CommentsLayer/helpers.d.ts.map +1 -0
  26. package/dist/components/CommentsLayer/use-comment.d.ts +8 -0
  27. package/dist/components/CommentsLayer/use-comment.d.ts.map +1 -0
  28. package/dist/components/CommentsLayer/use-conversation.d.ts +23 -0
  29. package/dist/components/CommentsLayer/use-conversation.d.ts.map +1 -0
  30. package/dist/components/CommentsLayer/use-floating-comment.d.ts +12 -0
  31. package/dist/components/CommentsLayer/use-floating-comment.d.ts.map +1 -0
  32. package/dist/components/PdfViewer/helpers/range.d.ts +2 -0
  33. package/dist/components/PdfViewer/helpers/range.d.ts.map +1 -0
  34. package/dist/components/PdfViewer/helpers/read-file.d.ts +2 -0
  35. package/dist/components/PdfViewer/helpers/read-file.d.ts.map +1 -0
  36. package/dist/components/PdfViewer/pdf/pdf-adapter.d.ts +115 -0
  37. package/dist/components/PdfViewer/pdf/pdf-adapter.d.ts.map +1 -0
  38. package/dist/composables/use-ai.d.ts +11 -0
  39. package/dist/composables/use-ai.d.ts.map +1 -0
  40. package/dist/composables/use-document.d.ts +29 -0
  41. package/dist/composables/use-document.d.ts.map +1 -0
  42. package/dist/composables/use-field.d.ts +34 -0
  43. package/dist/composables/use-field.d.ts.map +1 -0
  44. package/dist/composables/use-high-contrast-mode.d.ts +5 -0
  45. package/dist/composables/use-high-contrast-mode.d.ts.map +1 -0
  46. package/dist/composables/use-selected-text.d.ts +8 -0
  47. package/dist/composables/use-selected-text.d.ts.map +1 -0
  48. package/dist/core/SuperDoc.d.ts +803 -0
  49. package/dist/core/SuperDoc.d.ts.map +1 -0
  50. package/dist/core/collaboration/collaboration-comments.d.ts +5 -0
  51. package/dist/core/collaboration/collaboration-comments.d.ts.map +1 -0
  52. package/dist/core/collaboration/collaboration.d.ts +18 -0
  53. package/dist/core/collaboration/collaboration.d.ts.map +1 -0
  54. package/dist/core/collaboration/helpers.d.ts +5 -0
  55. package/dist/core/collaboration/helpers.d.ts.map +1 -0
  56. package/dist/core/collaboration/permissions.d.ts +14 -0
  57. package/dist/core/collaboration/permissions.d.ts.map +1 -0
  58. package/dist/core/create-app.d.ts +2 -0
  59. package/dist/core/create-app.d.ts.map +1 -0
  60. package/dist/core/helpers/export.d.ts +3 -0
  61. package/dist/core/helpers/export.d.ts.map +1 -0
  62. package/dist/core/helpers/file.d.ts +44 -0
  63. package/dist/core/helpers/file.d.ts.map +1 -0
  64. package/dist/core/index.d.ts +2 -0
  65. package/dist/core/index.d.ts.map +1 -0
  66. package/dist/helpers/floor.d.ts +2 -0
  67. package/dist/helpers/floor.d.ts.map +1 -0
  68. package/dist/helpers/group-changes.d.ts +2 -0
  69. package/dist/helpers/group-changes.d.ts.map +1 -0
  70. package/dist/helpers/use-selection.d.ts +18 -0
  71. package/dist/helpers/use-selection.d.ts.map +1 -0
  72. package/dist/icons.d.ts +11 -0
  73. package/dist/icons.d.ts.map +1 -0
  74. package/dist/images/altText_add.svg +3 -0
  75. package/dist/images/altText_done.svg +3 -0
  76. package/dist/images/annotation-check.svg +11 -0
  77. package/dist/images/annotation-comment.svg +16 -0
  78. package/dist/images/annotation-help.svg +26 -0
  79. package/dist/images/annotation-insert.svg +10 -0
  80. package/dist/images/annotation-key.svg +11 -0
  81. package/dist/images/annotation-newparagraph.svg +11 -0
  82. package/dist/images/annotation-noicon.svg +7 -0
  83. package/dist/images/annotation-note.svg +42 -0
  84. package/dist/images/annotation-paperclip.svg +6 -0
  85. package/dist/images/annotation-paragraph.svg +16 -0
  86. package/dist/images/annotation-pushpin.svg +7 -0
  87. package/dist/images/cursor-editorFreeHighlight.svg +6 -0
  88. package/dist/images/cursor-editorFreeText.svg +3 -0
  89. package/dist/images/cursor-editorInk.svg +4 -0
  90. package/dist/images/cursor-editorTextHighlight.svg +8 -0
  91. package/dist/images/editor-toolbar-delete.svg +5 -0
  92. package/dist/images/loading-icon.gif +0 -0
  93. package/dist/images/toolbarButton-editorHighlight.svg +6 -0
  94. package/dist/images/toolbarButton-menuArrow.svg +3 -0
  95. package/dist/index.d.ts +19 -0
  96. package/dist/index.d.ts.map +1 -0
  97. package/dist/main.d.ts +2 -0
  98. package/dist/main.d.ts.map +1 -0
  99. package/dist/stores/comments-store.d.ts +245 -0
  100. package/dist/stores/comments-store.d.ts.map +1 -0
  101. package/dist/stores/hrbr-fields-store.d.ts +44 -0
  102. package/dist/stores/hrbr-fields-store.d.ts.map +1 -0
  103. package/dist/stores/superdoc-store.d.ts +146 -0
  104. package/dist/stores/superdoc-store.d.ts.map +1 -0
  105. package/dist/style.css +5290 -0
  106. package/dist/super-editor/ai-writer.es.js +523 -0
  107. package/dist/super-editor/chunks/converter-Brf9NxwA.js +32437 -0
  108. package/dist/super-editor/chunks/docx-zipper-Dld3TtPb.js +2552 -0
  109. package/dist/super-editor/chunks/editor-27QWXfk-.js +33078 -0
  110. package/dist/super-editor/chunks/toolbar-BPRbNqgL.js +10168 -0
  111. package/dist/super-editor/converter.es.js +5 -0
  112. package/dist/super-editor/docx-zipper.es.js +5 -0
  113. package/dist/super-editor/editor.es.js +6 -0
  114. package/dist/super-editor/file-zipper.es.js +12 -0
  115. package/dist/super-editor/postcss.config.d.cts +1 -0
  116. package/dist/super-editor/src/components/cursor-helpers.d.ts +24 -0
  117. package/dist/super-editor/src/components/pagination-helpers.d.ts +8 -0
  118. package/dist/super-editor/src/components/slash-menu/constants.d.ts +67 -0
  119. package/dist/super-editor/src/components/slash-menu/menuItems.d.ts +36 -0
  120. package/dist/super-editor/src/components/slash-menu/utils.d.ts +9 -0
  121. package/dist/super-editor/src/components/toolbar/ai-helpers.d.ts +76 -0
  122. package/dist/super-editor/src/components/toolbar/color-dropdown-helpers.d.ts +14 -0
  123. package/dist/super-editor/src/components/toolbar/constants.d.ts +18 -0
  124. package/dist/super-editor/src/components/toolbar/defaultItems.d.ts +6 -0
  125. package/dist/super-editor/src/components/toolbar/helpers.d.ts +5 -0
  126. package/dist/super-editor/src/components/toolbar/scroll-helpers.d.ts +4 -0
  127. package/dist/super-editor/src/components/toolbar/super-toolbar.d.ts +506 -0
  128. package/dist/super-editor/src/components/toolbar/toolbarIcons.d.ts +61 -0
  129. package/dist/super-editor/src/components/toolbar/toolbarTexts.d.ts +52 -0
  130. package/dist/super-editor/src/components/toolbar/use-toolbar-item.d.ts +45 -0
  131. package/dist/super-editor/src/composables/use-high-contrast-mode.d.ts +4 -0
  132. package/dist/super-editor/src/core/Attribute.d.ts +79 -0
  133. package/dist/super-editor/src/core/CommandService.d.ts +63 -0
  134. package/dist/super-editor/src/core/DocxZipper.d.ts +61 -0
  135. package/dist/super-editor/src/core/Editor.d.ts +828 -0
  136. package/dist/super-editor/src/core/EventEmitter.d.ts +39 -0
  137. package/dist/super-editor/src/core/Extension.d.ts +18 -0
  138. package/dist/super-editor/src/core/ExtensionService.d.ts +59 -0
  139. package/dist/super-editor/src/core/InputRule.d.ts +60 -0
  140. package/dist/super-editor/src/core/Mark.d.ts +19 -0
  141. package/dist/super-editor/src/core/Node.d.ts +29 -0
  142. package/dist/super-editor/src/core/OxmlNode.d.ts +19 -0
  143. package/dist/super-editor/src/core/Schema.d.ts +33 -0
  144. package/dist/super-editor/src/core/child-editor/child-editor.d.ts +2 -0
  145. package/dist/super-editor/src/core/child-editor/index.d.ts +1 -0
  146. package/dist/super-editor/src/core/commands/backspaceNextToList.d.ts +5 -0
  147. package/dist/super-editor/src/core/commands/clearNodes.d.ts +5 -0
  148. package/dist/super-editor/src/core/commands/command.d.ts +1 -0
  149. package/dist/super-editor/src/core/commands/createParagraphNear.d.ts +4 -0
  150. package/dist/super-editor/src/core/commands/decreaseListIndent.d.ts +1 -0
  151. package/dist/super-editor/src/core/commands/deleteListItem.d.ts +1 -0
  152. package/dist/super-editor/src/core/commands/deleteNextToList.d.ts +14 -0
  153. package/dist/super-editor/src/core/commands/deleteSelection.d.ts +5 -0
  154. package/dist/super-editor/src/core/commands/exitCode.d.ts +4 -0
  155. package/dist/super-editor/src/core/commands/first.d.ts +1 -0
  156. package/dist/super-editor/src/core/commands/increaseListIndent.d.ts +4 -0
  157. package/dist/super-editor/src/core/commands/index.d.ts +43 -0
  158. package/dist/super-editor/src/core/commands/insertContent.d.ts +4 -0
  159. package/dist/super-editor/src/core/commands/insertContentAt.d.ts +8 -0
  160. package/dist/super-editor/src/core/commands/insertTabChar.d.ts +3 -0
  161. package/dist/super-editor/src/core/commands/insertTabNode.d.ts +10 -0
  162. package/dist/super-editor/src/core/commands/joinBackward.d.ts +4 -0
  163. package/dist/super-editor/src/core/commands/joinDown.d.ts +4 -0
  164. package/dist/super-editor/src/core/commands/joinForward.d.ts +4 -0
  165. package/dist/super-editor/src/core/commands/joinUp.d.ts +4 -0
  166. package/dist/super-editor/src/core/commands/liftEmptyBlock.d.ts +4 -0
  167. package/dist/super-editor/src/core/commands/liftListItem.d.ts +4 -0
  168. package/dist/super-editor/src/core/commands/list-helpers/find-node-position.d.ts +1 -0
  169. package/dist/super-editor/src/core/commands/list-helpers/index.d.ts +2 -0
  170. package/dist/super-editor/src/core/commands/list-helpers/is-list.d.ts +1 -0
  171. package/dist/super-editor/src/core/commands/list-helpers/test-helpers.d.ts +126 -0
  172. package/dist/super-editor/src/core/commands/newlineInCode.d.ts +4 -0
  173. package/dist/super-editor/src/core/commands/resetAttributes.d.ts +5 -0
  174. package/dist/super-editor/src/core/commands/restoreSelection.d.ts +5 -0
  175. package/dist/super-editor/src/core/commands/selectAll.d.ts +4 -0
  176. package/dist/super-editor/src/core/commands/selectNodeBackward.d.ts +4 -0
  177. package/dist/super-editor/src/core/commands/selectNodeForward.d.ts +4 -0
  178. package/dist/super-editor/src/core/commands/selectTextblockEnd.d.ts +4 -0
  179. package/dist/super-editor/src/core/commands/selectTextblockStart.d.ts +4 -0
  180. package/dist/super-editor/src/core/commands/setMark.d.ts +6 -0
  181. package/dist/super-editor/src/core/commands/setMeta.d.ts +3 -0
  182. package/dist/super-editor/src/core/commands/setNode.d.ts +5 -0
  183. package/dist/super-editor/src/core/commands/sinkListItem.d.ts +4 -0
  184. package/dist/super-editor/src/core/commands/splitBlock.d.ts +3 -0
  185. package/dist/super-editor/src/core/commands/splitListItem.d.ts +1 -0
  186. package/dist/super-editor/src/core/commands/toggleList.d.ts +56 -0
  187. package/dist/super-editor/src/core/commands/toggleMark.d.ts +4 -0
  188. package/dist/super-editor/src/core/commands/toggleNode.d.ts +4 -0
  189. package/dist/super-editor/src/core/commands/types/index.d.ts +61 -0
  190. package/dist/super-editor/src/core/commands/undoInputRule.d.ts +4 -0
  191. package/dist/super-editor/src/core/commands/unsetAllMarks.d.ts +5 -0
  192. package/dist/super-editor/src/core/commands/unsetMark.d.ts +6 -0
  193. package/dist/super-editor/src/core/commands/updateAttributes.d.ts +5 -0
  194. package/dist/super-editor/src/core/commands/wrapInList.d.ts +4 -0
  195. package/dist/super-editor/src/core/encoding-helpers.d.ts +27 -0
  196. package/dist/super-editor/src/core/extensions/commands.d.ts +2 -0
  197. package/dist/super-editor/src/core/extensions/editable.d.ts +2 -0
  198. package/dist/super-editor/src/core/extensions/editorFocus.d.ts +6 -0
  199. package/dist/super-editor/src/core/extensions/index.d.ts +4 -0
  200. package/dist/super-editor/src/core/extensions/keymap.d.ts +9 -0
  201. package/dist/super-editor/src/core/helpers/ErrorWithDetails.d.ts +20 -0
  202. package/dist/super-editor/src/core/helpers/annotator.d.ts +51 -0
  203. package/dist/super-editor/src/core/helpers/baseListDefinitions.d.ts +443 -0
  204. package/dist/super-editor/src/core/helpers/chainableEditorState.d.ts +8 -0
  205. package/dist/super-editor/src/core/helpers/cleanSchemaItem.d.ts +8 -0
  206. package/dist/super-editor/src/core/helpers/contentProcessor.d.ts +13 -0
  207. package/dist/super-editor/src/core/helpers/createDocument.d.ts +10 -0
  208. package/dist/super-editor/src/core/helpers/createNodeFromContent.d.ts +2 -0
  209. package/dist/super-editor/src/core/helpers/defaultBlockAt.d.ts +8 -0
  210. package/dist/super-editor/src/core/helpers/findChildren.d.ts +7 -0
  211. package/dist/super-editor/src/core/helpers/findMark.d.ts +1 -0
  212. package/dist/super-editor/src/core/helpers/findParentNode.d.ts +2 -0
  213. package/dist/super-editor/src/core/helpers/findParentNodeClosestToPos.d.ts +19 -0
  214. package/dist/super-editor/src/core/helpers/findWordBounds.d.ts +4 -0
  215. package/dist/super-editor/src/core/helpers/generateDocxListAttributes.d.ts +34 -0
  216. package/dist/super-editor/src/core/helpers/generateDocxRandomId.d.ts +6 -0
  217. package/dist/super-editor/src/core/helpers/getActiveFormatting.d.ts +4 -0
  218. package/dist/super-editor/src/core/helpers/getExtensionConfigField.d.ts +8 -0
  219. package/dist/super-editor/src/core/helpers/getHTMLFromFragment.d.ts +1 -0
  220. package/dist/super-editor/src/core/helpers/getMarkRange.d.ts +8 -0
  221. package/dist/super-editor/src/core/helpers/getMarkType.d.ts +7 -0
  222. package/dist/super-editor/src/core/helpers/getMarksBetween.d.ts +1 -0
  223. package/dist/super-editor/src/core/helpers/getMarksFromSelection.d.ts +1 -0
  224. package/dist/super-editor/src/core/helpers/getNodeType.d.ts +7 -0
  225. package/dist/super-editor/src/core/helpers/getSchemaTypeByName.d.ts +7 -0
  226. package/dist/super-editor/src/core/helpers/getSchemaTypeNameByName.d.ts +7 -0
  227. package/dist/super-editor/src/core/helpers/getTextContentFromNodes.d.ts +1 -0
  228. package/dist/super-editor/src/core/helpers/htmlSanitizer.d.ts +8 -0
  229. package/dist/super-editor/src/core/helpers/importHtml.d.ts +8 -0
  230. package/dist/super-editor/src/core/helpers/importMarkdown.d.ts +14 -0
  231. package/dist/super-editor/src/core/helpers/index.d.ts +30 -0
  232. package/dist/super-editor/src/core/helpers/isActive.d.ts +8 -0
  233. package/dist/super-editor/src/core/helpers/isExtentionRulesEnabled.d.ts +1 -0
  234. package/dist/super-editor/src/core/helpers/isInTable.d.ts +1 -0
  235. package/dist/super-editor/src/core/helpers/isList.d.ts +1 -0
  236. package/dist/super-editor/src/core/helpers/isMarkActive.d.ts +8 -0
  237. package/dist/super-editor/src/core/helpers/isNodeActive.d.ts +8 -0
  238. package/dist/super-editor/src/core/helpers/isTextSelection.d.ts +1 -0
  239. package/dist/super-editor/src/core/helpers/list-numbering-helpers.d.ts +98 -0
  240. package/dist/super-editor/src/core/helpers/orderedListUtils.d.ts +7 -0
  241. package/dist/super-editor/src/core/helpers/pasteListHelpers.d.ts +8 -0
  242. package/dist/super-editor/src/core/helpers/posToDOMRect.d.ts +20 -0
  243. package/dist/super-editor/src/core/helpers/selectionToInsertionEnd.d.ts +1 -0
  244. package/dist/super-editor/src/core/helpers/setImageNodeSelection.d.ts +1 -0
  245. package/dist/super-editor/src/core/helpers/setWordSelection.d.ts +1 -0
  246. package/dist/super-editor/src/core/helpers/updateDOMAttributes.d.ts +1 -0
  247. package/dist/super-editor/src/core/index.d.ts +13 -0
  248. package/dist/super-editor/src/core/inputRules/docx-paste/docx-paste.d.ts +2 -0
  249. package/dist/super-editor/src/core/inputRules/google-docs-paste/google-docs-paste.d.ts +1 -0
  250. package/dist/super-editor/src/core/inputRules/html/html-helpers.d.ts +21 -0
  251. package/dist/super-editor/src/core/inputRules/html/transform-copied-lists.d.ts +3 -0
  252. package/dist/super-editor/src/core/inputRules/wrappingInputRule.d.ts +8 -0
  253. package/dist/super-editor/src/core/migrations/0.14-listsv2/listsv2migration.d.ts +2 -0
  254. package/dist/super-editor/src/core/migrations/index.d.ts +1 -0
  255. package/dist/super-editor/src/core/migrations/migration_after_0_4_14.d.ts +1 -0
  256. package/dist/super-editor/src/core/super-converter/SuperConverter.d.ts +143 -0
  257. package/dist/super-editor/src/core/super-converter/constants.d.ts +3 -0
  258. package/dist/super-editor/src/core/super-converter/docx-helpers/document-rels.d.ts +8 -0
  259. package/dist/super-editor/src/core/super-converter/docx-helpers/docx-constants.d.ts +5 -0
  260. package/dist/super-editor/src/core/super-converter/docx-helpers/docx-helpers.d.ts +8 -0
  261. package/dist/super-editor/src/core/super-converter/docx-helpers/get-default-style-definition.d.ts +1 -0
  262. package/dist/super-editor/src/core/super-converter/docx-helpers/index.d.ts +3 -0
  263. package/dist/super-editor/src/core/super-converter/export-helpers/pre-process-vertical-merge-cells.d.ts +6 -0
  264. package/dist/super-editor/src/core/super-converter/exporter-docx-defs.d.ts +934 -0
  265. package/dist/super-editor/src/core/super-converter/exporter.d.ts +171 -0
  266. package/dist/super-editor/src/core/super-converter/helpers/mediaHelpers.d.ts +2 -0
  267. package/dist/super-editor/src/core/super-converter/helpers.d.ts +35 -0
  268. package/dist/super-editor/src/core/super-converter/types.d.ts +3 -0
  269. package/dist/super-editor/src/core/super-converter/v2/docxHelper.d.ts +12 -0
  270. package/dist/super-editor/src/core/super-converter/v2/exporter/commentsExporter.d.ts +23 -0
  271. package/dist/super-editor/src/core/super-converter/v2/exporter/helpers/base-list.definitions.d.ts +443 -0
  272. package/dist/super-editor/src/core/super-converter/v2/exporter/helpers/index.d.ts +2 -0
  273. package/dist/super-editor/src/core/super-converter/v2/exporter/helpers/translateChildNodes.d.ts +7 -0
  274. package/dist/super-editor/src/core/super-converter/v2/exporter/index.d.ts +1 -0
  275. package/dist/super-editor/src/core/super-converter/v2/importer/alternateChoiceImporter.d.ts +4 -0
  276. package/dist/super-editor/src/core/super-converter/v2/importer/autoPageNumberImporter.d.ts +8 -0
  277. package/dist/super-editor/src/core/super-converter/v2/importer/bookmarkEndImporter.d.ts +6 -0
  278. package/dist/super-editor/src/core/super-converter/v2/importer/bookmarkNodeImporter.d.ts +13 -0
  279. package/dist/super-editor/src/core/super-converter/v2/importer/bookmarkStartImporter.d.ts +6 -0
  280. package/dist/super-editor/src/core/super-converter/v2/importer/documentCommentsImporter.d.ts +17 -0
  281. package/dist/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts +67 -0
  282. package/dist/super-editor/src/core/super-converter/v2/importer/hyperlinkImporter.d.ts +4 -0
  283. package/dist/super-editor/src/core/super-converter/v2/importer/ignoredNodes.d.ts +2 -0
  284. package/dist/super-editor/src/core/super-converter/v2/importer/imageImporter.d.ts +9 -0
  285. package/dist/super-editor/src/core/super-converter/v2/importer/importerHelpers.d.ts +24 -0
  286. package/dist/super-editor/src/core/super-converter/v2/importer/index.d.ts +2 -0
  287. package/dist/super-editor/src/core/super-converter/v2/importer/lineBreakImporter.d.ts +6 -0
  288. package/dist/super-editor/src/core/super-converter/v2/importer/listImporter.d.ts +119 -0
  289. package/dist/super-editor/src/core/super-converter/v2/importer/markImporter.d.ts +19 -0
  290. package/dist/super-editor/src/core/super-converter/v2/importer/mergeTextNodes.d.ts +1 -0
  291. package/dist/super-editor/src/core/super-converter/v2/importer/paragraphNodeImporter.d.ts +6 -0
  292. package/dist/super-editor/src/core/super-converter/v2/importer/pictNodeImporter.d.ts +116 -0
  293. package/dist/super-editor/src/core/super-converter/v2/importer/runNodeImporter.d.ts +8 -0
  294. package/dist/super-editor/src/core/super-converter/v2/importer/sdtNodeImporter.d.ts +8 -0
  295. package/dist/super-editor/src/core/super-converter/v2/importer/standardNodeImporter.d.ts +8 -0
  296. package/dist/super-editor/src/core/super-converter/v2/importer/tabImporter.d.ts +5 -0
  297. package/dist/super-editor/src/core/super-converter/v2/importer/tableImporter.d.ts +18 -0
  298. package/dist/super-editor/src/core/super-converter/v2/importer/textNodeImporter.d.ts +8 -0
  299. package/dist/super-editor/src/core/super-converter/v2/importer/trackChangesImporter.d.ts +8 -0
  300. package/dist/super-editor/src/core/super-converter/v2/importer/types/index.d.ts +73 -0
  301. package/dist/super-editor/src/core/super-converter/v2/types/index.d.ts +8 -0
  302. package/dist/super-editor/src/core/super-converter/v3/handlers/index.d.ts +13 -0
  303. package/dist/super-editor/src/core/super-converter/v3/handlers/types/index.d.ts +1 -0
  304. package/dist/super-editor/src/core/super-converter/v3/handlers/utils.d.ts +45 -0
  305. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bidiVisual/bidiVisual-translator.d.ts +6 -0
  306. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bidiVisual/index.d.ts +1 -0
  307. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-end/attributes/index.d.ts +2 -0
  308. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-end/attributes/w-displaced-by-custom-xml.d.ts +4 -0
  309. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-end/attributes/w-id.d.ts +4 -0
  310. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-end/bookmark-end-translator.d.ts +7 -0
  311. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-end/index.d.ts +1 -0
  312. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-start/attributes/index.d.ts +2 -0
  313. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-start/attributes/w-col-first.d.ts +4 -0
  314. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-start/attributes/w-col-last.d.ts +4 -0
  315. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-start/attributes/w-displaced-by-custom-xml.d.ts +4 -0
  316. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-start/attributes/w-id.d.ts +4 -0
  317. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-start/attributes/w-name.d.ts +4 -0
  318. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-start/bookmark-start-translator.d.ts +7 -0
  319. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bookmark-start/index.d.ts +1 -0
  320. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bottom/bottom-translator.d.ts +6 -0
  321. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bottom/index.d.ts +2 -0
  322. package/dist/super-editor/src/core/super-converter/v3/handlers/w/bottom/marginBottom-translator.d.ts +6 -0
  323. package/dist/super-editor/src/core/super-converter/v3/handlers/w/br/attributes/index.d.ts +2 -0
  324. package/dist/super-editor/src/core/super-converter/v3/handlers/w/br/attributes/w-clear.d.ts +4 -0
  325. package/dist/super-editor/src/core/super-converter/v3/handlers/w/br/attributes/w-line-break-type.d.ts +4 -0
  326. package/dist/super-editor/src/core/super-converter/v3/handlers/w/br/br-translator.d.ts +7 -0
  327. package/dist/super-editor/src/core/super-converter/v3/handlers/w/br/index.d.ts +1 -0
  328. package/dist/super-editor/src/core/super-converter/v3/handlers/w/cantSplit/cantSplit-translator.d.ts +6 -0
  329. package/dist/super-editor/src/core/super-converter/v3/handlers/w/cantSplit/index.d.ts +1 -0
  330. package/dist/super-editor/src/core/super-converter/v3/handlers/w/cnfStyle/cnfStyle-translator.d.ts +7 -0
  331. package/dist/super-editor/src/core/super-converter/v3/handlers/w/cnfStyle/index.d.ts +1 -0
  332. package/dist/super-editor/src/core/super-converter/v3/handlers/w/divId/divId-translator.d.ts +6 -0
  333. package/dist/super-editor/src/core/super-converter/v3/handlers/w/divId/index.d.ts +1 -0
  334. package/dist/super-editor/src/core/super-converter/v3/handlers/w/drawing/drawing-translator.d.ts +6 -0
  335. package/dist/super-editor/src/core/super-converter/v3/handlers/w/drawing/index.d.ts +1 -0
  336. package/dist/super-editor/src/core/super-converter/v3/handlers/w/end/end-translator.d.ts +6 -0
  337. package/dist/super-editor/src/core/super-converter/v3/handlers/w/end/index.d.ts +2 -0
  338. package/dist/super-editor/src/core/super-converter/v3/handlers/w/end/marginEnd-translator.d.ts +6 -0
  339. package/dist/super-editor/src/core/super-converter/v3/handlers/w/gridAfter/gridAfter-translator.d.ts +6 -0
  340. package/dist/super-editor/src/core/super-converter/v3/handlers/w/gridAfter/index.d.ts +1 -0
  341. package/dist/super-editor/src/core/super-converter/v3/handlers/w/gridBefore/gridBefore-translator.d.ts +6 -0
  342. package/dist/super-editor/src/core/super-converter/v3/handlers/w/gridBefore/index.d.ts +1 -0
  343. package/dist/super-editor/src/core/super-converter/v3/handlers/w/gridCol/gridCol-translator.d.ts +6 -0
  344. package/dist/super-editor/src/core/super-converter/v3/handlers/w/gridCol/index.d.ts +1 -0
  345. package/dist/super-editor/src/core/super-converter/v3/handlers/w/hidden/hidden-translator.d.ts +6 -0
  346. package/dist/super-editor/src/core/super-converter/v3/handlers/w/hidden/index.d.ts +1 -0
  347. package/dist/super-editor/src/core/super-converter/v3/handlers/w/hyperlink/hyperlink-translator.d.ts +7 -0
  348. package/dist/super-editor/src/core/super-converter/v3/handlers/w/hyperlink/index.d.ts +1 -0
  349. package/dist/super-editor/src/core/super-converter/v3/handlers/w/insideH/index.d.ts +1 -0
  350. package/dist/super-editor/src/core/super-converter/v3/handlers/w/insideH/insideH-translator.d.ts +6 -0
  351. package/dist/super-editor/src/core/super-converter/v3/handlers/w/insideV/index.d.ts +1 -0
  352. package/dist/super-editor/src/core/super-converter/v3/handlers/w/insideV/insideV-translator.d.ts +6 -0
  353. package/dist/super-editor/src/core/super-converter/v3/handlers/w/jc/index.d.ts +1 -0
  354. package/dist/super-editor/src/core/super-converter/v3/handlers/w/jc/jc-translator.d.ts +6 -0
  355. package/dist/super-editor/src/core/super-converter/v3/handlers/w/left/index.d.ts +2 -0
  356. package/dist/super-editor/src/core/super-converter/v3/handlers/w/left/left-translator.d.ts +6 -0
  357. package/dist/super-editor/src/core/super-converter/v3/handlers/w/left/marginLeft-translator.d.ts +6 -0
  358. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/index.d.ts +2 -0
  359. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w-rsid-del.d.ts +4 -0
  360. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w-rsid-p.d.ts +4 -0
  361. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w-rsid-r-default.d.ts +4 -0
  362. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w-rsid-r-pr.d.ts +4 -0
  363. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w-rsid-r.d.ts +4 -0
  364. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w14-para-id.d.ts +4 -0
  365. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w14-text-id.d.ts +4 -0
  366. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/index.d.ts +1 -0
  367. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/legacy-handle-paragraph-node.d.ts +1 -0
  368. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/w-p-helpers.d.ts +6 -0
  369. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/index.d.ts +1 -0
  370. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/p-translator.d.ts +7 -0
  371. package/dist/super-editor/src/core/super-converter/v3/handlers/w/right/index.d.ts +2 -0
  372. package/dist/super-editor/src/core/super-converter/v3/handlers/w/right/marginRight-translator.d.ts +6 -0
  373. package/dist/super-editor/src/core/super-converter/v3/handlers/w/right/right-translator.d.ts +6 -0
  374. package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/handle-annotation-node.d.ts +22 -0
  375. package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/handle-doc-part-obj.d.ts +6 -0
  376. package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/handle-document-section-node.d.ts +6 -0
  377. package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/handle-structured-content-node.d.ts +5 -0
  378. package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/parse-tag-value-json.d.ts +5 -0
  379. package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/sdt-node-type-strategy.d.ts +9 -0
  380. package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/translate-document-section.d.ts +7 -0
  381. package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/translate-field-annotation.d.ts +80 -0
  382. package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/translate-structured-content.d.ts +5 -0
  383. package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/index.d.ts +1 -0
  384. package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/sdt-translator.d.ts +6 -0
  385. package/dist/super-editor/src/core/super-converter/v3/handlers/w/shd/index.d.ts +1 -0
  386. package/dist/super-editor/src/core/super-converter/v3/handlers/w/shd/shd-translator.d.ts +6 -0
  387. package/dist/super-editor/src/core/super-converter/v3/handlers/w/start/index.d.ts +2 -0
  388. package/dist/super-editor/src/core/super-converter/v3/handlers/w/start/marginStart-translator.d.ts +6 -0
  389. package/dist/super-editor/src/core/super-converter/v3/handlers/w/start/start-translator.d.ts +6 -0
  390. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/index.d.ts +2 -0
  391. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/w-tab-leader.d.ts +4 -0
  392. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/w-tab-pos.d.ts +4 -0
  393. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/w-tab-size.d.ts +4 -0
  394. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tab/index.d.ts +1 -0
  395. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tab/tab-translator.d.ts +7 -0
  396. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tbl/index.d.ts +1 -0
  397. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tbl/tbl-translator.d.ts +28 -0
  398. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblBorders/index.d.ts +1 -0
  399. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblBorders/tblBorders-translator.d.ts +6 -0
  400. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblCaption/index.d.ts +1 -0
  401. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblCaption/tblCaption-translator.d.ts +6 -0
  402. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblCellMar/index.d.ts +1 -0
  403. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblCellMar/tblCellMar-translator.d.ts +2 -0
  404. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblCellSpacing/index.d.ts +1 -0
  405. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblCellSpacing/tblCellSpacing-translator.d.ts +6 -0
  406. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblDescription/index.d.ts +1 -0
  407. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblDescription/tblDescription-translator.d.ts +6 -0
  408. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblGrid/index.d.ts +1 -0
  409. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblGrid/tblGrid-helpers.d.ts +5 -0
  410. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblGrid/tblGrid-translator.d.ts +5 -0
  411. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblHeader/index.d.ts +1 -0
  412. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblHeader/tblHeader-translator.d.ts +6 -0
  413. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblInd/index.d.ts +1 -0
  414. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblInd/tblInd-translator.d.ts +6 -0
  415. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblLayout/index.d.ts +1 -0
  416. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblLayout/tblLayout-translator.d.ts +6 -0
  417. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblLook/index.d.ts +1 -0
  418. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblLook/tblLook-translator.d.ts +6 -0
  419. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblOverlap/index.d.ts +1 -0
  420. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblOverlap/tblOverlap-translator.d.ts +6 -0
  421. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblPr/index.d.ts +1 -0
  422. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblPr/tblPr-translator.d.ts +5 -0
  423. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblStyle/index.d.ts +1 -0
  424. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblStyle/tblStyle-translator.d.ts +6 -0
  425. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblStyleColBandSize/index.d.ts +1 -0
  426. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblStyleColBandSize/tblStyleColBandSize-translator.d.ts +6 -0
  427. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblStyleRowBandSize/index.d.ts +1 -0
  428. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblStyleRowBandSize/tblStyleRowBandSize-translator.d.ts +6 -0
  429. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblW/index.d.ts +1 -0
  430. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblW/tblW-translator.d.ts +6 -0
  431. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblpPr/index.d.ts +1 -0
  432. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblpPr/tblpPr-translator.d.ts +6 -0
  433. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tc/helpers/legacy-handle-table-cell-node.d.ts +9 -0
  434. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tc/helpers/translate-table-cell.d.ts +17 -0
  435. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tc/index.d.ts +1 -0
  436. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tc/tc-translator.d.ts +6 -0
  437. package/dist/super-editor/src/core/super-converter/v3/handlers/w/top/index.d.ts +2 -0
  438. package/dist/super-editor/src/core/super-converter/v3/handlers/w/top/marginTop-translator.d.ts +6 -0
  439. package/dist/super-editor/src/core/super-converter/v3/handlers/w/top/top-translator.d.ts +6 -0
  440. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tr/index.d.ts +1 -0
  441. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tr/tr-translator.d.ts +7 -0
  442. package/dist/super-editor/src/core/super-converter/v3/handlers/w/trHeight/index.d.ts +1 -0
  443. package/dist/super-editor/src/core/super-converter/v3/handlers/w/trHeight/trHeight-translator.d.ts +6 -0
  444. package/dist/super-editor/src/core/super-converter/v3/handlers/w/trPr/index.d.ts +1 -0
  445. package/dist/super-editor/src/core/super-converter/v3/handlers/w/trPr/trPr-translator.d.ts +5 -0
  446. package/dist/super-editor/src/core/super-converter/v3/handlers/w/wAfter/index.d.ts +1 -0
  447. package/dist/super-editor/src/core/super-converter/v3/handlers/w/wAfter/wAfter-translator.d.ts +6 -0
  448. package/dist/super-editor/src/core/super-converter/v3/handlers/w/wBefore/index.d.ts +1 -0
  449. package/dist/super-editor/src/core/super-converter/v3/handlers/w/wBefore/wBefore-translator.d.ts +6 -0
  450. package/dist/super-editor/src/core/super-converter/v3/handlers/wp/anchor/anchor-translator.d.ts +6 -0
  451. package/dist/super-editor/src/core/super-converter/v3/handlers/wp/anchor/helpers/handle-anchor-node.d.ts +6 -0
  452. package/dist/super-editor/src/core/super-converter/v3/handlers/wp/anchor/helpers/translate-anchor-node.d.ts +6 -0
  453. package/dist/super-editor/src/core/super-converter/v3/handlers/wp/anchor/index.d.ts +1 -0
  454. package/dist/super-editor/src/core/super-converter/v3/handlers/wp/helpers/decode-image-node-helpers.d.ts +18 -0
  455. package/dist/super-editor/src/core/super-converter/v3/handlers/wp/helpers/encode-image-node-helpers.d.ts +6 -0
  456. package/dist/super-editor/src/core/super-converter/v3/handlers/wp/inline/helpers/handle-inline-node.d.ts +6 -0
  457. package/dist/super-editor/src/core/super-converter/v3/handlers/wp/inline/helpers/translate-inline-node.d.ts +6 -0
  458. package/dist/super-editor/src/core/super-converter/v3/handlers/wp/inline/index.d.ts +1 -0
  459. package/dist/super-editor/src/core/super-converter/v3/handlers/wp/inline/inline-translator.d.ts +6 -0
  460. package/dist/super-editor/src/core/super-converter/v3/node-translator/index.d.ts +1 -0
  461. package/dist/super-editor/src/core/super-converter/v3/node-translator/node-translator.d.ts +215 -0
  462. package/dist/super-editor/src/core/super-converter/zipper.d.ts +7 -0
  463. package/dist/super-editor/src/core/super-validator/index.d.ts +1 -0
  464. package/dist/super-editor/src/core/super-validator/logger/index.d.ts +1 -0
  465. package/dist/super-editor/src/core/super-validator/logger/logger.d.ts +7 -0
  466. package/dist/super-editor/src/core/super-validator/super-validator.d.ts +58 -0
  467. package/dist/super-editor/src/core/super-validator/types.d.ts +61 -0
  468. package/dist/super-editor/src/core/super-validator/validators/state/index.d.ts +16 -0
  469. package/dist/super-editor/src/core/super-validator/validators/state/nodes/image/image-validator.d.ts +26 -0
  470. package/dist/super-editor/src/core/super-validator/validators/state/nodes/image/index.d.ts +1 -0
  471. package/dist/super-editor/src/core/super-validator/validators/state/nodes/image/rules/image-rid.d.ts +22 -0
  472. package/dist/super-editor/src/core/super-validator/validators/state/nodes/image/rules/index.d.ts +1 -0
  473. package/dist/super-editor/src/core/super-validator/validators/state/nodes/link/index.d.ts +1 -0
  474. package/dist/super-editor/src/core/super-validator/validators/state/nodes/link/link-validator.d.ts +24 -0
  475. package/dist/super-editor/src/core/super-validator/validators/state/nodes/link/rules/index.d.ts +1 -0
  476. package/dist/super-editor/src/core/super-validator/validators/state/nodes/link/rules/link-rid.d.ts +24 -0
  477. package/dist/super-editor/src/core/super-validator/validators/xml/index.d.ts +12 -0
  478. package/dist/super-editor/src/core/super-validator/validators/xml/numbering/numbering-validator.d.ts +13 -0
  479. package/dist/super-editor/src/core/super-validator/validators/xml/relationships/relationships-validator.d.ts +31 -0
  480. package/dist/super-editor/src/core/types/index.d.ts +128 -0
  481. package/dist/super-editor/src/core/utilities/callOrGet.d.ts +8 -0
  482. package/dist/super-editor/src/core/utilities/carbonCopy.d.ts +1 -0
  483. package/dist/super-editor/src/core/utilities/clipboardUtils.d.ts +16 -0
  484. package/dist/super-editor/src/core/utilities/createStyleTag.d.ts +6 -0
  485. package/dist/super-editor/src/core/utilities/deleteProps.d.ts +6 -0
  486. package/dist/super-editor/src/core/utilities/imageBlobs.d.ts +1 -0
  487. package/dist/super-editor/src/core/utilities/index.d.ts +10 -0
  488. package/dist/super-editor/src/core/utilities/isEmptyObject.d.ts +5 -0
  489. package/dist/super-editor/src/core/utilities/isIOS.d.ts +1 -0
  490. package/dist/super-editor/src/core/utilities/isMacOS.d.ts +1 -0
  491. package/dist/super-editor/src/core/utilities/isRegExp.d.ts +1 -0
  492. package/dist/super-editor/src/core/utilities/minMax.d.ts +1 -0
  493. package/dist/super-editor/src/core/utilities/objectIncludes.d.ts +8 -0
  494. package/dist/super-editor/src/core/utilities/parseSizeUnit.d.ts +6 -0
  495. package/dist/super-editor/src/extensions/ai/ai-constants.d.ts +3 -0
  496. package/dist/super-editor/src/extensions/ai/ai-marks.d.ts +3 -0
  497. package/dist/super-editor/src/extensions/ai/ai-nodes.d.ts +2 -0
  498. package/dist/super-editor/src/extensions/ai/ai-plugin.d.ts +4 -0
  499. package/dist/super-editor/src/extensions/ai/index.d.ts +4 -0
  500. package/dist/super-editor/src/extensions/block-node/block-node.d.ts +56 -0
  501. package/dist/super-editor/src/extensions/block-node/index.d.ts +1 -0
  502. package/dist/super-editor/src/extensions/bold/bold.d.ts +29 -0
  503. package/dist/super-editor/src/extensions/bold/index.d.ts +1 -0
  504. package/dist/super-editor/src/extensions/bookmarks/bookmark-end.d.ts +6 -0
  505. package/dist/super-editor/src/extensions/bookmarks/bookmark-start.d.ts +26 -0
  506. package/dist/super-editor/src/extensions/bookmarks/index.d.ts +2 -0
  507. package/dist/super-editor/src/extensions/bullet-list/bullet-list.d.ts +14 -0
  508. package/dist/super-editor/src/extensions/bullet-list/index.d.ts +1 -0
  509. package/dist/super-editor/src/extensions/collaboration/collaboration-helpers.d.ts +1 -0
  510. package/dist/super-editor/src/extensions/collaboration/collaboration.d.ts +7 -0
  511. package/dist/super-editor/src/extensions/collaboration/index.d.ts +1 -0
  512. package/dist/super-editor/src/extensions/collaboration-cursor/collaboration-cursor.d.ts +2 -0
  513. package/dist/super-editor/src/extensions/collaboration-cursor/index.d.ts +1 -0
  514. package/dist/super-editor/src/extensions/color/color.d.ts +42 -0
  515. package/dist/super-editor/src/extensions/color/index.d.ts +1 -0
  516. package/dist/super-editor/src/extensions/comment/comment.d.ts +4 -0
  517. package/dist/super-editor/src/extensions/comment/comments-constants.d.ts +1 -0
  518. package/dist/super-editor/src/extensions/comment/comments-helpers.d.ts +14 -0
  519. package/dist/super-editor/src/extensions/comment/comments-marks.d.ts +2 -0
  520. package/dist/super-editor/src/extensions/comment/comments-plugin.d.ts +4 -0
  521. package/dist/super-editor/src/extensions/comment/index.d.ts +3 -0
  522. package/dist/super-editor/src/extensions/content-block/content-block.d.ts +90 -0
  523. package/dist/super-editor/src/extensions/content-block/index.d.ts +1 -0
  524. package/dist/super-editor/src/extensions/custom-selection/custom-selection.d.ts +53 -0
  525. package/dist/super-editor/src/extensions/custom-selection/index.d.ts +1 -0
  526. package/dist/super-editor/src/extensions/document/document.d.ts +33 -0
  527. package/dist/super-editor/src/extensions/document/index.d.ts +1 -0
  528. package/dist/super-editor/src/extensions/dropcursor/dropcursor.d.ts +33 -0
  529. package/dist/super-editor/src/extensions/dropcursor/index.d.ts +1 -0
  530. package/dist/super-editor/src/extensions/field-annotation/FieldAnnotationPlugin.d.ts +2 -0
  531. package/dist/super-editor/src/extensions/field-annotation/FieldAnnotationView.d.ts +32 -0
  532. package/dist/super-editor/src/extensions/field-annotation/cleanup-commands/cleanUpListsWithAnnotations.d.ts +1 -0
  533. package/dist/super-editor/src/extensions/field-annotation/cleanup-commands/cleanUpParagraphWithAnnotations.d.ts +1 -0
  534. package/dist/super-editor/src/extensions/field-annotation/cleanup-commands/index.d.ts +6 -0
  535. package/dist/super-editor/src/extensions/field-annotation/field-annotation.d.ts +5 -0
  536. package/dist/super-editor/src/extensions/field-annotation/fieldAnnotationHelpers/findFieldAnnotations.d.ts +1 -0
  537. package/dist/super-editor/src/extensions/field-annotation/fieldAnnotationHelpers/findFieldAnnotationsBetween.d.ts +8 -0
  538. package/dist/super-editor/src/extensions/field-annotation/fieldAnnotationHelpers/findFieldAnnotationsByFieldId.d.ts +7 -0
  539. package/dist/super-editor/src/extensions/field-annotation/fieldAnnotationHelpers/findFirstFieldAnnotationByFieldId.d.ts +7 -0
  540. package/dist/super-editor/src/extensions/field-annotation/fieldAnnotationHelpers/findHeaderFooterAnnotationsByFieldId.d.ts +7 -0
  541. package/dist/super-editor/src/extensions/field-annotation/fieldAnnotationHelpers/findRemovedFieldAnnotations.d.ts +1 -0
  542. package/dist/super-editor/src/extensions/field-annotation/fieldAnnotationHelpers/getAllFieldAnnotations.d.ts +6 -0
  543. package/dist/super-editor/src/extensions/field-annotation/fieldAnnotationHelpers/getAllFieldAnnotationsWithRect.d.ts +30 -0
  544. package/dist/super-editor/src/extensions/field-annotation/fieldAnnotationHelpers/getHeaderFooterAnnotations.d.ts +1 -0
  545. package/dist/super-editor/src/extensions/field-annotation/fieldAnnotationHelpers/index.d.ts +10 -0
  546. package/dist/super-editor/src/extensions/field-annotation/fieldAnnotationHelpers/trackFieldAnnotationsDeletion.d.ts +1 -0
  547. package/dist/super-editor/src/extensions/field-annotation/index.d.ts +2 -0
  548. package/dist/super-editor/src/extensions/font-family/font-family.d.ts +45 -0
  549. package/dist/super-editor/src/extensions/font-family/index.d.ts +1 -0
  550. package/dist/super-editor/src/extensions/font-size/font-size.d.ts +73 -0
  551. package/dist/super-editor/src/extensions/font-size/index.d.ts +1 -0
  552. package/dist/super-editor/src/extensions/format-commands/format-commands.d.ts +36 -0
  553. package/dist/super-editor/src/extensions/format-commands/index.d.ts +1 -0
  554. package/dist/super-editor/src/extensions/gapcursor/gapcursor.d.ts +16 -0
  555. package/dist/super-editor/src/extensions/gapcursor/index.d.ts +1 -0
  556. package/dist/super-editor/src/extensions/heading/heading.d.ts +33 -0
  557. package/dist/super-editor/src/extensions/heading/index.d.ts +1 -0
  558. package/dist/super-editor/src/extensions/highlight/highlight.d.ts +28 -0
  559. package/dist/super-editor/src/extensions/highlight/index.d.ts +1 -0
  560. package/dist/super-editor/src/extensions/history/history.d.ts +21 -0
  561. package/dist/super-editor/src/extensions/history/index.d.ts +1 -0
  562. package/dist/super-editor/src/extensions/image/image.d.ts +85 -0
  563. package/dist/super-editor/src/extensions/image/imageHelpers/fileNameUtils.d.ts +3 -0
  564. package/dist/super-editor/src/extensions/image/imageHelpers/getFileOpener.d.ts +1 -0
  565. package/dist/super-editor/src/extensions/image/imageHelpers/handleBase64.d.ts +1 -0
  566. package/dist/super-editor/src/extensions/image/imageHelpers/handleImageUpload.d.ts +1 -0
  567. package/dist/super-editor/src/extensions/image/imageHelpers/handleUrl.d.ts +2 -0
  568. package/dist/super-editor/src/extensions/image/imageHelpers/imagePositionPlugin.d.ts +4 -0
  569. package/dist/super-editor/src/extensions/image/imageHelpers/imageRegistrationPlugin.d.ts +11 -0
  570. package/dist/super-editor/src/extensions/image/imageHelpers/index.d.ts +8 -0
  571. package/dist/super-editor/src/extensions/image/imageHelpers/processUploadedImage.d.ts +2 -0
  572. package/dist/super-editor/src/extensions/image/imageHelpers/rotation.d.ts +4 -0
  573. package/dist/super-editor/src/extensions/image/imageHelpers/startImageUpload.d.ts +22 -0
  574. package/dist/super-editor/src/extensions/image/index.d.ts +2 -0
  575. package/dist/super-editor/src/extensions/index.d.ts +66 -0
  576. package/dist/super-editor/src/extensions/italic/index.d.ts +1 -0
  577. package/dist/super-editor/src/extensions/italic/italic.d.ts +19 -0
  578. package/dist/super-editor/src/extensions/line-break/index.d.ts +1 -0
  579. package/dist/super-editor/src/extensions/line-break/line-break.d.ts +56 -0
  580. package/dist/super-editor/src/extensions/line-height/index.d.ts +1 -0
  581. package/dist/super-editor/src/extensions/line-height/line-height.d.ts +38 -0
  582. package/dist/super-editor/src/extensions/link/index.d.ts +1 -0
  583. package/dist/super-editor/src/extensions/link/link.d.ts +69 -0
  584. package/dist/super-editor/src/extensions/linked-styles/helpers.d.ts +7 -0
  585. package/dist/super-editor/src/extensions/linked-styles/index.d.ts +3 -0
  586. package/dist/super-editor/src/extensions/linked-styles/linked-styles.d.ts +40 -0
  587. package/dist/super-editor/src/extensions/linked-styles/plugin.d.ts +6 -0
  588. package/dist/super-editor/src/extensions/list-item/ListItemNodeView.d.ts +36 -0
  589. package/dist/super-editor/src/extensions/list-item/helpers/styledListMarkerPlugin.d.ts +3 -0
  590. package/dist/super-editor/src/extensions/list-item/index.d.ts +1 -0
  591. package/dist/super-editor/src/extensions/list-item/list-item.d.ts +50 -0
  592. package/dist/super-editor/src/extensions/mention/index.d.ts +1 -0
  593. package/dist/super-editor/src/extensions/mention/mention.d.ts +28 -0
  594. package/dist/super-editor/src/extensions/noderesizer/index.d.ts +1 -0
  595. package/dist/super-editor/src/extensions/noderesizer/noderesizer.d.ts +18 -0
  596. package/dist/super-editor/src/extensions/ordered-list/helpers/orderedListMarkerPlugin.d.ts +2 -0
  597. package/dist/super-editor/src/extensions/ordered-list/helpers/orderedListSyncPlugin.d.ts +5 -0
  598. package/dist/super-editor/src/extensions/ordered-list/index.d.ts +1 -0
  599. package/dist/super-editor/src/extensions/ordered-list/ordered-list.d.ts +37 -0
  600. package/dist/super-editor/src/extensions/page-number/index.d.ts +1 -0
  601. package/dist/super-editor/src/extensions/page-number/page-number.d.ts +65 -0
  602. package/dist/super-editor/src/extensions/pagination/index.d.ts +1 -0
  603. package/dist/super-editor/src/extensions/pagination/pagination-helpers.d.ts +25 -0
  604. package/dist/super-editor/src/extensions/pagination/pagination.d.ts +2 -0
  605. package/dist/super-editor/src/extensions/paragraph/helpers/getDefaultSpacing.d.ts +6 -0
  606. package/dist/super-editor/src/extensions/paragraph/index.d.ts +1 -0
  607. package/dist/super-editor/src/extensions/paragraph/paragraph.d.ts +51 -0
  608. package/dist/super-editor/src/extensions/placeholder/index.d.ts +1 -0
  609. package/dist/super-editor/src/extensions/placeholder/placeholder.d.ts +17 -0
  610. package/dist/super-editor/src/extensions/popover-plugin/index.d.ts +1 -0
  611. package/dist/super-editor/src/extensions/popover-plugin/popover-plugin.d.ts +11 -0
  612. package/dist/super-editor/src/extensions/run-item/index.d.ts +1 -0
  613. package/dist/super-editor/src/extensions/run-item/run-item.d.ts +26 -0
  614. package/dist/super-editor/src/extensions/search/index.d.ts +1 -0
  615. package/dist/super-editor/src/extensions/search/search.d.ts +45 -0
  616. package/dist/super-editor/src/extensions/shape-container/index.d.ts +1 -0
  617. package/dist/super-editor/src/extensions/shape-container/shape-container.d.ts +31 -0
  618. package/dist/super-editor/src/extensions/shape-textbox/index.d.ts +1 -0
  619. package/dist/super-editor/src/extensions/shape-textbox/shape-textbox.d.ts +28 -0
  620. package/dist/super-editor/src/extensions/slash-menu/index.d.ts +1 -0
  621. package/dist/super-editor/src/extensions/slash-menu/slash-menu.d.ts +13 -0
  622. package/dist/super-editor/src/extensions/strike/index.d.ts +1 -0
  623. package/dist/super-editor/src/extensions/strike/strike.d.ts +18 -0
  624. package/dist/super-editor/src/extensions/structured-content/StructuredContentBlockView.d.ts +9 -0
  625. package/dist/super-editor/src/extensions/structured-content/StructuredContentInlineView.d.ts +9 -0
  626. package/dist/super-editor/src/extensions/structured-content/StructuredContentViewBase.d.ts +24 -0
  627. package/dist/super-editor/src/extensions/structured-content/document-section/DocumentSectionView.d.ts +15 -0
  628. package/dist/super-editor/src/extensions/structured-content/document-section/helpers.d.ts +11 -0
  629. package/dist/super-editor/src/extensions/structured-content/document-section/index.d.ts +2 -0
  630. package/dist/super-editor/src/extensions/structured-content/document-section.d.ts +105 -0
  631. package/dist/super-editor/src/extensions/structured-content/index.d.ts +3 -0
  632. package/dist/super-editor/src/extensions/structured-content/structured-content-block.d.ts +30 -0
  633. package/dist/super-editor/src/extensions/structured-content/structured-content.d.ts +30 -0
  634. package/dist/super-editor/src/extensions/tab/index.d.ts +1 -0
  635. package/dist/super-editor/src/extensions/tab/tab.d.ts +27 -0
  636. package/dist/super-editor/src/extensions/table/TableView.d.ts +16 -0
  637. package/dist/super-editor/src/extensions/table/index.d.ts +2 -0
  638. package/dist/super-editor/src/extensions/table/table.d.ts +459 -0
  639. package/dist/super-editor/src/extensions/table/tableHelpers/cellAround.d.ts +1 -0
  640. package/dist/super-editor/src/extensions/table/tableHelpers/cellWrapping.d.ts +1 -0
  641. package/dist/super-editor/src/extensions/table/tableHelpers/createCell.d.ts +1 -0
  642. package/dist/super-editor/src/extensions/table/tableHelpers/createColGroup.d.ts +11 -0
  643. package/dist/super-editor/src/extensions/table/tableHelpers/createTable.d.ts +1 -0
  644. package/dist/super-editor/src/extensions/table/tableHelpers/createTableBorders.d.ts +60 -0
  645. package/dist/super-editor/src/extensions/table/tableHelpers/deleteTableWhenSelected.d.ts +3 -0
  646. package/dist/super-editor/src/extensions/table/tableHelpers/getColStyleDeclaration.d.ts +1 -0
  647. package/dist/super-editor/src/extensions/table/tableHelpers/index.d.ts +6 -0
  648. package/dist/super-editor/src/extensions/table/tableHelpers/isCellSelection.d.ts +1 -0
  649. package/dist/super-editor/src/extensions/table-cell/helpers/createCellBorders.d.ts +42 -0
  650. package/dist/super-editor/src/extensions/table-cell/index.d.ts +1 -0
  651. package/dist/super-editor/src/extensions/table-cell/table-cell.d.ts +78 -0
  652. package/dist/super-editor/src/extensions/table-header/index.d.ts +1 -0
  653. package/dist/super-editor/src/extensions/table-header/table-header.d.ts +29 -0
  654. package/dist/super-editor/src/extensions/table-row/index.d.ts +1 -0
  655. package/dist/super-editor/src/extensions/table-row/table-row.d.ts +184 -0
  656. package/dist/super-editor/src/extensions/text/index.d.ts +1 -0
  657. package/dist/super-editor/src/extensions/text/text.d.ts +16 -0
  658. package/dist/super-editor/src/extensions/text-align/index.d.ts +1 -0
  659. package/dist/super-editor/src/extensions/text-align/text-align.d.ts +33 -0
  660. package/dist/super-editor/src/extensions/text-indent/index.d.ts +1 -0
  661. package/dist/super-editor/src/extensions/text-indent/text-indent.d.ts +30 -0
  662. package/dist/super-editor/src/extensions/text-style/index.d.ts +1 -0
  663. package/dist/super-editor/src/extensions/text-style/text-style.d.ts +27 -0
  664. package/dist/super-editor/src/extensions/text-transform/index.d.ts +1 -0
  665. package/dist/super-editor/src/extensions/text-transform/text-transform.d.ts +27 -0
  666. package/dist/super-editor/src/extensions/track-changes/constants.d.ts +3 -0
  667. package/dist/super-editor/src/extensions/track-changes/index.d.ts +6 -0
  668. package/dist/super-editor/src/extensions/track-changes/plugins/index.d.ts +1 -0
  669. package/dist/super-editor/src/extensions/track-changes/plugins/trackChangesBasePlugin.d.ts +10 -0
  670. package/dist/super-editor/src/extensions/track-changes/track-changes.d.ts +2 -0
  671. package/dist/super-editor/src/extensions/track-changes/track-delete.d.ts +2 -0
  672. package/dist/super-editor/src/extensions/track-changes/track-format.d.ts +2 -0
  673. package/dist/super-editor/src/extensions/track-changes/track-insert.d.ts +2 -0
  674. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/addMarkStep.d.ts +1 -0
  675. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/documentHelpers.d.ts +8 -0
  676. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/findTrackedMarkBetween.d.ts +8 -0
  677. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/getTrackChanges.d.ts +1 -0
  678. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/index.d.ts +12 -0
  679. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/markDeletion.d.ts +1 -0
  680. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/markInsertion.d.ts +1 -0
  681. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/markWrapping.d.ts +1 -0
  682. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/parseFormatList.d.ts +1 -0
  683. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/removeMarkStep.d.ts +1 -0
  684. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/replaceAroundStep.d.ts +1 -0
  685. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/replaceStep.d.ts +1 -0
  686. package/dist/super-editor/src/extensions/track-changes/trackChangesHelpers/trackedTransaction.d.ts +1 -0
  687. package/dist/super-editor/src/extensions/underline/index.d.ts +1 -0
  688. package/dist/super-editor/src/extensions/underline/underline.d.ts +43 -0
  689. package/dist/super-editor/src/index.d.ts +32 -0
  690. package/dist/super-editor/src/main.d.ts +1 -0
  691. package/dist/super-editor/src/tests/data/annotations_doc_content.d.ts +429 -0
  692. package/dist/super-editor/src/tests/editor/data/imageBase64.d.ts +1 -0
  693. package/dist/super-editor/src/tests/export/data/comments/basic-resolved-comment.d.ts +32 -0
  694. package/dist/super-editor/src/tests/export/export-helpers/export-helpers.d.ts +8 -0
  695. package/dist/super-editor/src/tests/export/export-helpers/index.d.ts +2 -0
  696. package/dist/super-editor/src/tests/export/export-helpers/list-export-helpers.d.ts +23 -0
  697. package/dist/super-editor/src/tests/helpers/editor-test-utils.d.ts +14 -0
  698. package/dist/super-editor/src/tests/helpers/helpers.d.ts +6 -0
  699. package/dist/super-editor/src/tests/import/testUtils.d.ts +1 -0
  700. package/dist/super-editor/style.css +1897 -0
  701. package/dist/super-editor/super-editor.es.js +4653 -0
  702. package/dist/super-editor/toolbar.es.js +6 -0
  703. package/dist/super-editor/vite.config.d.ts +2 -0
  704. package/dist/super-editor.cjs +29 -0
  705. package/dist/super-editor.d.ts +5 -0
  706. package/dist/super-editor.d.ts.map +1 -0
  707. package/dist/super-editor.es.js +29 -0
  708. package/dist/superdoc.cjs +25 -0
  709. package/dist/superdoc.es.js +25 -0
  710. package/dist/superdoc.umd.js +108866 -0
  711. package/dist/superdoc.umd.js.map +1 -0
  712. package/package.json +86 -0
@@ -0,0 +1,1773 @@
1
+ "use strict";
2
+ require("./vue-DWle4Cai.cjs");
3
+ var buffer = {};
4
+ var base64Js = {};
5
+ base64Js.byteLength = byteLength;
6
+ base64Js.toByteArray = toByteArray;
7
+ base64Js.fromByteArray = fromByteArray;
8
+ var lookup = [];
9
+ var revLookup = [];
10
+ var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
11
+ var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
12
+ for (var i = 0, len = code.length; i < len; ++i) {
13
+ lookup[i] = code[i];
14
+ revLookup[code.charCodeAt(i)] = i;
15
+ }
16
+ revLookup["-".charCodeAt(0)] = 62;
17
+ revLookup["_".charCodeAt(0)] = 63;
18
+ function getLens(b64) {
19
+ var len = b64.length;
20
+ if (len % 4 > 0) {
21
+ throw new Error("Invalid string. Length must be a multiple of 4");
22
+ }
23
+ var validLen = b64.indexOf("=");
24
+ if (validLen === -1) validLen = len;
25
+ var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
26
+ return [validLen, placeHoldersLen];
27
+ }
28
+ function byteLength(b64) {
29
+ var lens = getLens(b64);
30
+ var validLen = lens[0];
31
+ var placeHoldersLen = lens[1];
32
+ return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
33
+ }
34
+ function _byteLength(b64, validLen, placeHoldersLen) {
35
+ return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
36
+ }
37
+ function toByteArray(b64) {
38
+ var tmp;
39
+ var lens = getLens(b64);
40
+ var validLen = lens[0];
41
+ var placeHoldersLen = lens[1];
42
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
43
+ var curByte = 0;
44
+ var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
45
+ var i;
46
+ for (i = 0; i < len; i += 4) {
47
+ tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
48
+ arr[curByte++] = tmp >> 16 & 255;
49
+ arr[curByte++] = tmp >> 8 & 255;
50
+ arr[curByte++] = tmp & 255;
51
+ }
52
+ if (placeHoldersLen === 2) {
53
+ tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
54
+ arr[curByte++] = tmp & 255;
55
+ }
56
+ if (placeHoldersLen === 1) {
57
+ tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
58
+ arr[curByte++] = tmp >> 8 & 255;
59
+ arr[curByte++] = tmp & 255;
60
+ }
61
+ return arr;
62
+ }
63
+ function tripletToBase64(num) {
64
+ return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
65
+ }
66
+ function encodeChunk(uint8, start, end) {
67
+ var tmp;
68
+ var output = [];
69
+ for (var i = start; i < end; i += 3) {
70
+ tmp = (uint8[i] << 16 & 16711680) + (uint8[i + 1] << 8 & 65280) + (uint8[i + 2] & 255);
71
+ output.push(tripletToBase64(tmp));
72
+ }
73
+ return output.join("");
74
+ }
75
+ function fromByteArray(uint8) {
76
+ var tmp;
77
+ var len = uint8.length;
78
+ var extraBytes = len % 3;
79
+ var parts = [];
80
+ var maxChunkLength = 16383;
81
+ for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
82
+ parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
83
+ }
84
+ if (extraBytes === 1) {
85
+ tmp = uint8[len - 1];
86
+ parts.push(
87
+ lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
88
+ );
89
+ } else if (extraBytes === 2) {
90
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1];
91
+ parts.push(
92
+ lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
93
+ );
94
+ }
95
+ return parts.join("");
96
+ }
97
+ var ieee754 = {};
98
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
99
+ ieee754.read = function(buffer2, offset, isLE, mLen, nBytes) {
100
+ var e, m;
101
+ var eLen = nBytes * 8 - mLen - 1;
102
+ var eMax = (1 << eLen) - 1;
103
+ var eBias = eMax >> 1;
104
+ var nBits = -7;
105
+ var i = isLE ? nBytes - 1 : 0;
106
+ var d = isLE ? -1 : 1;
107
+ var s = buffer2[offset + i];
108
+ i += d;
109
+ e = s & (1 << -nBits) - 1;
110
+ s >>= -nBits;
111
+ nBits += eLen;
112
+ for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d, nBits -= 8) {
113
+ }
114
+ m = e & (1 << -nBits) - 1;
115
+ e >>= -nBits;
116
+ nBits += mLen;
117
+ for (; nBits > 0; m = m * 256 + buffer2[offset + i], i += d, nBits -= 8) {
118
+ }
119
+ if (e === 0) {
120
+ e = 1 - eBias;
121
+ } else if (e === eMax) {
122
+ return m ? NaN : (s ? -1 : 1) * Infinity;
123
+ } else {
124
+ m = m + Math.pow(2, mLen);
125
+ e = e - eBias;
126
+ }
127
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
128
+ };
129
+ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
130
+ var e, m, c;
131
+ var eLen = nBytes * 8 - mLen - 1;
132
+ var eMax = (1 << eLen) - 1;
133
+ var eBias = eMax >> 1;
134
+ var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
135
+ var i = isLE ? 0 : nBytes - 1;
136
+ var d = isLE ? 1 : -1;
137
+ var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
138
+ value = Math.abs(value);
139
+ if (isNaN(value) || value === Infinity) {
140
+ m = isNaN(value) ? 1 : 0;
141
+ e = eMax;
142
+ } else {
143
+ e = Math.floor(Math.log(value) / Math.LN2);
144
+ if (value * (c = Math.pow(2, -e)) < 1) {
145
+ e--;
146
+ c *= 2;
147
+ }
148
+ if (e + eBias >= 1) {
149
+ value += rt / c;
150
+ } else {
151
+ value += rt * Math.pow(2, 1 - eBias);
152
+ }
153
+ if (value * c >= 2) {
154
+ e++;
155
+ c /= 2;
156
+ }
157
+ if (e + eBias >= eMax) {
158
+ m = 0;
159
+ e = eMax;
160
+ } else if (e + eBias >= 1) {
161
+ m = (value * c - 1) * Math.pow(2, mLen);
162
+ e = e + eBias;
163
+ } else {
164
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
165
+ e = 0;
166
+ }
167
+ }
168
+ for (; mLen >= 8; buffer2[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) {
169
+ }
170
+ e = e << mLen | m;
171
+ eLen += mLen;
172
+ for (; eLen > 0; buffer2[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
173
+ }
174
+ buffer2[offset + i - d] |= s * 128;
175
+ };
176
+ /*!
177
+ * The buffer module from node.js, for the browser.
178
+ *
179
+ * @author Feross Aboukhadijeh <https://feross.org>
180
+ * @license MIT
181
+ */
182
+ (function(exports2) {
183
+ const base64 = base64Js;
184
+ const ieee754$1 = ieee754;
185
+ const customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
186
+ exports2.Buffer = Buffer2;
187
+ exports2.SlowBuffer = SlowBuffer;
188
+ exports2.INSPECT_MAX_BYTES = 50;
189
+ const K_MAX_LENGTH = 2147483647;
190
+ exports2.kMaxLength = K_MAX_LENGTH;
191
+ const { Uint8Array: GlobalUint8Array, ArrayBuffer: GlobalArrayBuffer, SharedArrayBuffer: GlobalSharedArrayBuffer } = globalThis;
192
+ Buffer2.TYPED_ARRAY_SUPPORT = typedArraySupport();
193
+ if (!Buffer2.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
194
+ console.error(
195
+ "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
196
+ );
197
+ }
198
+ function typedArraySupport() {
199
+ try {
200
+ const arr = new GlobalUint8Array(1);
201
+ const proto = { foo: function() {
202
+ return 42;
203
+ } };
204
+ Object.setPrototypeOf(proto, GlobalUint8Array.prototype);
205
+ Object.setPrototypeOf(arr, proto);
206
+ return arr.foo() === 42;
207
+ } catch (e) {
208
+ return false;
209
+ }
210
+ }
211
+ Object.defineProperty(Buffer2.prototype, "parent", {
212
+ enumerable: true,
213
+ get: function() {
214
+ if (!Buffer2.isBuffer(this)) return void 0;
215
+ return this.buffer;
216
+ }
217
+ });
218
+ Object.defineProperty(Buffer2.prototype, "offset", {
219
+ enumerable: true,
220
+ get: function() {
221
+ if (!Buffer2.isBuffer(this)) return void 0;
222
+ return this.byteOffset;
223
+ }
224
+ });
225
+ function createBuffer(length) {
226
+ if (length > K_MAX_LENGTH) {
227
+ throw new RangeError('The value "' + length + '" is invalid for option "size"');
228
+ }
229
+ const buf = new GlobalUint8Array(length);
230
+ Object.setPrototypeOf(buf, Buffer2.prototype);
231
+ return buf;
232
+ }
233
+ function Buffer2(arg, encodingOrOffset, length) {
234
+ if (typeof arg === "number") {
235
+ if (typeof encodingOrOffset === "string") {
236
+ throw new TypeError(
237
+ 'The "string" argument must be of type string. Received type number'
238
+ );
239
+ }
240
+ return allocUnsafe(arg);
241
+ }
242
+ return from(arg, encodingOrOffset, length);
243
+ }
244
+ Buffer2.poolSize = 8192;
245
+ function from(value, encodingOrOffset, length) {
246
+ if (typeof value === "string") {
247
+ return fromString(value, encodingOrOffset);
248
+ }
249
+ if (GlobalArrayBuffer.isView(value)) {
250
+ return fromArrayView(value);
251
+ }
252
+ if (value == null) {
253
+ throw new TypeError(
254
+ "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
255
+ );
256
+ }
257
+ if (isInstance(value, GlobalArrayBuffer) || value && isInstance(value.buffer, GlobalArrayBuffer)) {
258
+ return fromArrayBuffer(value, encodingOrOffset, length);
259
+ }
260
+ if (typeof GlobalSharedArrayBuffer !== "undefined" && (isInstance(value, GlobalSharedArrayBuffer) || value && isInstance(value.buffer, GlobalSharedArrayBuffer))) {
261
+ return fromArrayBuffer(value, encodingOrOffset, length);
262
+ }
263
+ if (typeof value === "number") {
264
+ throw new TypeError(
265
+ 'The "value" argument must not be of type number. Received type number'
266
+ );
267
+ }
268
+ const valueOf = value.valueOf && value.valueOf();
269
+ if (valueOf != null && valueOf !== value) {
270
+ return Buffer2.from(valueOf, encodingOrOffset, length);
271
+ }
272
+ const b = fromObject(value);
273
+ if (b) return b;
274
+ if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
275
+ return Buffer2.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
276
+ }
277
+ throw new TypeError(
278
+ "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
279
+ );
280
+ }
281
+ Buffer2.from = function(value, encodingOrOffset, length) {
282
+ return from(value, encodingOrOffset, length);
283
+ };
284
+ Object.setPrototypeOf(Buffer2.prototype, GlobalUint8Array.prototype);
285
+ Object.setPrototypeOf(Buffer2, GlobalUint8Array);
286
+ function assertSize(size) {
287
+ if (typeof size !== "number") {
288
+ throw new TypeError('"size" argument must be of type number');
289
+ } else if (size < 0) {
290
+ throw new RangeError('The value "' + size + '" is invalid for option "size"');
291
+ }
292
+ }
293
+ function alloc(size, fill, encoding) {
294
+ assertSize(size);
295
+ if (size <= 0) {
296
+ return createBuffer(size);
297
+ }
298
+ if (fill !== void 0) {
299
+ return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
300
+ }
301
+ return createBuffer(size);
302
+ }
303
+ Buffer2.alloc = function(size, fill, encoding) {
304
+ return alloc(size, fill, encoding);
305
+ };
306
+ function allocUnsafe(size) {
307
+ assertSize(size);
308
+ return createBuffer(size < 0 ? 0 : checked(size) | 0);
309
+ }
310
+ Buffer2.allocUnsafe = function(size) {
311
+ return allocUnsafe(size);
312
+ };
313
+ Buffer2.allocUnsafeSlow = function(size) {
314
+ return allocUnsafe(size);
315
+ };
316
+ function fromString(string, encoding) {
317
+ if (typeof encoding !== "string" || encoding === "") {
318
+ encoding = "utf8";
319
+ }
320
+ if (!Buffer2.isEncoding(encoding)) {
321
+ throw new TypeError("Unknown encoding: " + encoding);
322
+ }
323
+ const length = byteLength2(string, encoding) | 0;
324
+ let buf = createBuffer(length);
325
+ const actual = buf.write(string, encoding);
326
+ if (actual !== length) {
327
+ buf = buf.slice(0, actual);
328
+ }
329
+ return buf;
330
+ }
331
+ function fromArrayLike(array) {
332
+ const length = array.length < 0 ? 0 : checked(array.length) | 0;
333
+ const buf = createBuffer(length);
334
+ for (let i = 0; i < length; i += 1) {
335
+ buf[i] = array[i] & 255;
336
+ }
337
+ return buf;
338
+ }
339
+ function fromArrayView(arrayView) {
340
+ if (isInstance(arrayView, GlobalUint8Array)) {
341
+ const copy = new GlobalUint8Array(arrayView);
342
+ return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
343
+ }
344
+ return fromArrayLike(arrayView);
345
+ }
346
+ function fromArrayBuffer(array, byteOffset, length) {
347
+ if (byteOffset < 0 || array.byteLength < byteOffset) {
348
+ throw new RangeError('"offset" is outside of buffer bounds');
349
+ }
350
+ if (array.byteLength < byteOffset + (length || 0)) {
351
+ throw new RangeError('"length" is outside of buffer bounds');
352
+ }
353
+ let buf;
354
+ if (byteOffset === void 0 && length === void 0) {
355
+ buf = new GlobalUint8Array(array);
356
+ } else if (length === void 0) {
357
+ buf = new GlobalUint8Array(array, byteOffset);
358
+ } else {
359
+ buf = new GlobalUint8Array(array, byteOffset, length);
360
+ }
361
+ Object.setPrototypeOf(buf, Buffer2.prototype);
362
+ return buf;
363
+ }
364
+ function fromObject(obj) {
365
+ if (Buffer2.isBuffer(obj)) {
366
+ const len = checked(obj.length) | 0;
367
+ const buf = createBuffer(len);
368
+ if (buf.length === 0) {
369
+ return buf;
370
+ }
371
+ obj.copy(buf, 0, 0, len);
372
+ return buf;
373
+ }
374
+ if (obj.length !== void 0) {
375
+ if (typeof obj.length !== "number" || numberIsNaN(obj.length)) {
376
+ return createBuffer(0);
377
+ }
378
+ return fromArrayLike(obj);
379
+ }
380
+ if (obj.type === "Buffer" && Array.isArray(obj.data)) {
381
+ return fromArrayLike(obj.data);
382
+ }
383
+ }
384
+ function checked(length) {
385
+ if (length >= K_MAX_LENGTH) {
386
+ throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes");
387
+ }
388
+ return length | 0;
389
+ }
390
+ function SlowBuffer(length) {
391
+ if (+length != length) {
392
+ length = 0;
393
+ }
394
+ return Buffer2.alloc(+length);
395
+ }
396
+ Buffer2.isBuffer = function isBuffer(b) {
397
+ return b != null && b._isBuffer === true && b !== Buffer2.prototype;
398
+ };
399
+ Buffer2.compare = function compare(a, b) {
400
+ if (isInstance(a, GlobalUint8Array)) a = Buffer2.from(a, a.offset, a.byteLength);
401
+ if (isInstance(b, GlobalUint8Array)) b = Buffer2.from(b, b.offset, b.byteLength);
402
+ if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) {
403
+ throw new TypeError(
404
+ 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
405
+ );
406
+ }
407
+ if (a === b) return 0;
408
+ let x = a.length;
409
+ let y = b.length;
410
+ for (let i = 0, len = Math.min(x, y); i < len; ++i) {
411
+ if (a[i] !== b[i]) {
412
+ x = a[i];
413
+ y = b[i];
414
+ break;
415
+ }
416
+ }
417
+ if (x < y) return -1;
418
+ if (y < x) return 1;
419
+ return 0;
420
+ };
421
+ Buffer2.isEncoding = function isEncoding(encoding) {
422
+ switch (String(encoding).toLowerCase()) {
423
+ case "hex":
424
+ case "utf8":
425
+ case "utf-8":
426
+ case "ascii":
427
+ case "latin1":
428
+ case "binary":
429
+ case "base64":
430
+ case "ucs2":
431
+ case "ucs-2":
432
+ case "utf16le":
433
+ case "utf-16le":
434
+ return true;
435
+ default:
436
+ return false;
437
+ }
438
+ };
439
+ Buffer2.concat = function concat(list, length) {
440
+ if (!Array.isArray(list)) {
441
+ throw new TypeError('"list" argument must be an Array of Buffers');
442
+ }
443
+ if (list.length === 0) {
444
+ return Buffer2.alloc(0);
445
+ }
446
+ let i;
447
+ if (length === void 0) {
448
+ length = 0;
449
+ for (i = 0; i < list.length; ++i) {
450
+ length += list[i].length;
451
+ }
452
+ }
453
+ const buffer2 = Buffer2.allocUnsafe(length);
454
+ let pos = 0;
455
+ for (i = 0; i < list.length; ++i) {
456
+ let buf = list[i];
457
+ if (isInstance(buf, GlobalUint8Array)) {
458
+ if (pos + buf.length > buffer2.length) {
459
+ if (!Buffer2.isBuffer(buf)) buf = Buffer2.from(buf);
460
+ buf.copy(buffer2, pos);
461
+ } else {
462
+ GlobalUint8Array.prototype.set.call(
463
+ buffer2,
464
+ buf,
465
+ pos
466
+ );
467
+ }
468
+ } else if (!Buffer2.isBuffer(buf)) {
469
+ throw new TypeError('"list" argument must be an Array of Buffers');
470
+ } else {
471
+ buf.copy(buffer2, pos);
472
+ }
473
+ pos += buf.length;
474
+ }
475
+ return buffer2;
476
+ };
477
+ function byteLength2(string, encoding) {
478
+ if (Buffer2.isBuffer(string)) {
479
+ return string.length;
480
+ }
481
+ if (GlobalArrayBuffer.isView(string) || isInstance(string, GlobalArrayBuffer)) {
482
+ return string.byteLength;
483
+ }
484
+ if (typeof string !== "string") {
485
+ throw new TypeError(
486
+ 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string
487
+ );
488
+ }
489
+ const len = string.length;
490
+ const mustMatch = arguments.length > 2 && arguments[2] === true;
491
+ if (!mustMatch && len === 0) return 0;
492
+ let loweredCase = false;
493
+ for (; ; ) {
494
+ switch (encoding) {
495
+ case "ascii":
496
+ case "latin1":
497
+ case "binary":
498
+ return len;
499
+ case "utf8":
500
+ case "utf-8":
501
+ return utf8ToBytes(string).length;
502
+ case "ucs2":
503
+ case "ucs-2":
504
+ case "utf16le":
505
+ case "utf-16le":
506
+ return len * 2;
507
+ case "hex":
508
+ return len >>> 1;
509
+ case "base64":
510
+ return base64ToBytes(string).length;
511
+ default:
512
+ if (loweredCase) {
513
+ return mustMatch ? -1 : utf8ToBytes(string).length;
514
+ }
515
+ encoding = ("" + encoding).toLowerCase();
516
+ loweredCase = true;
517
+ }
518
+ }
519
+ }
520
+ Buffer2.byteLength = byteLength2;
521
+ function slowToString(encoding, start, end) {
522
+ let loweredCase = false;
523
+ if (start === void 0 || start < 0) {
524
+ start = 0;
525
+ }
526
+ if (start > this.length) {
527
+ return "";
528
+ }
529
+ if (end === void 0 || end > this.length) {
530
+ end = this.length;
531
+ }
532
+ if (end <= 0) {
533
+ return "";
534
+ }
535
+ end >>>= 0;
536
+ start >>>= 0;
537
+ if (end <= start) {
538
+ return "";
539
+ }
540
+ if (!encoding) encoding = "utf8";
541
+ while (true) {
542
+ switch (encoding) {
543
+ case "hex":
544
+ return hexSlice(this, start, end);
545
+ case "utf8":
546
+ case "utf-8":
547
+ return utf8Slice(this, start, end);
548
+ case "ascii":
549
+ return asciiSlice(this, start, end);
550
+ case "latin1":
551
+ case "binary":
552
+ return latin1Slice(this, start, end);
553
+ case "base64":
554
+ return base64Slice(this, start, end);
555
+ case "ucs2":
556
+ case "ucs-2":
557
+ case "utf16le":
558
+ case "utf-16le":
559
+ return utf16leSlice(this, start, end);
560
+ default:
561
+ if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
562
+ encoding = (encoding + "").toLowerCase();
563
+ loweredCase = true;
564
+ }
565
+ }
566
+ }
567
+ Buffer2.prototype._isBuffer = true;
568
+ function swap(b, n, m) {
569
+ const i = b[n];
570
+ b[n] = b[m];
571
+ b[m] = i;
572
+ }
573
+ Buffer2.prototype.swap16 = function swap16() {
574
+ const len = this.length;
575
+ if (len % 2 !== 0) {
576
+ throw new RangeError("Buffer size must be a multiple of 16-bits");
577
+ }
578
+ for (let i = 0; i < len; i += 2) {
579
+ swap(this, i, i + 1);
580
+ }
581
+ return this;
582
+ };
583
+ Buffer2.prototype.swap32 = function swap32() {
584
+ const len = this.length;
585
+ if (len % 4 !== 0) {
586
+ throw new RangeError("Buffer size must be a multiple of 32-bits");
587
+ }
588
+ for (let i = 0; i < len; i += 4) {
589
+ swap(this, i, i + 3);
590
+ swap(this, i + 1, i + 2);
591
+ }
592
+ return this;
593
+ };
594
+ Buffer2.prototype.swap64 = function swap64() {
595
+ const len = this.length;
596
+ if (len % 8 !== 0) {
597
+ throw new RangeError("Buffer size must be a multiple of 64-bits");
598
+ }
599
+ for (let i = 0; i < len; i += 8) {
600
+ swap(this, i, i + 7);
601
+ swap(this, i + 1, i + 6);
602
+ swap(this, i + 2, i + 5);
603
+ swap(this, i + 3, i + 4);
604
+ }
605
+ return this;
606
+ };
607
+ Buffer2.prototype.toString = function toString() {
608
+ const length = this.length;
609
+ if (length === 0) return "";
610
+ if (arguments.length === 0) return utf8Slice(this, 0, length);
611
+ return slowToString.apply(this, arguments);
612
+ };
613
+ Buffer2.prototype.toLocaleString = Buffer2.prototype.toString;
614
+ Buffer2.prototype.equals = function equals(b) {
615
+ if (!Buffer2.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
616
+ if (this === b) return true;
617
+ return Buffer2.compare(this, b) === 0;
618
+ };
619
+ Buffer2.prototype.inspect = function inspect() {
620
+ let str = "";
621
+ const max = exports2.INSPECT_MAX_BYTES;
622
+ str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
623
+ if (this.length > max) str += " ... ";
624
+ return "<Buffer " + str + ">";
625
+ };
626
+ if (customInspectSymbol) {
627
+ Buffer2.prototype[customInspectSymbol] = Buffer2.prototype.inspect;
628
+ }
629
+ Buffer2.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
630
+ if (isInstance(target, GlobalUint8Array)) {
631
+ target = Buffer2.from(target, target.offset, target.byteLength);
632
+ }
633
+ if (!Buffer2.isBuffer(target)) {
634
+ throw new TypeError(
635
+ 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target
636
+ );
637
+ }
638
+ if (start === void 0) {
639
+ start = 0;
640
+ }
641
+ if (end === void 0) {
642
+ end = target ? target.length : 0;
643
+ }
644
+ if (thisStart === void 0) {
645
+ thisStart = 0;
646
+ }
647
+ if (thisEnd === void 0) {
648
+ thisEnd = this.length;
649
+ }
650
+ if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
651
+ throw new RangeError("out of range index");
652
+ }
653
+ if (thisStart >= thisEnd && start >= end) {
654
+ return 0;
655
+ }
656
+ if (thisStart >= thisEnd) {
657
+ return -1;
658
+ }
659
+ if (start >= end) {
660
+ return 1;
661
+ }
662
+ start >>>= 0;
663
+ end >>>= 0;
664
+ thisStart >>>= 0;
665
+ thisEnd >>>= 0;
666
+ if (this === target) return 0;
667
+ let x = thisEnd - thisStart;
668
+ let y = end - start;
669
+ const len = Math.min(x, y);
670
+ const thisCopy = this.slice(thisStart, thisEnd);
671
+ const targetCopy = target.slice(start, end);
672
+ for (let i = 0; i < len; ++i) {
673
+ if (thisCopy[i] !== targetCopy[i]) {
674
+ x = thisCopy[i];
675
+ y = targetCopy[i];
676
+ break;
677
+ }
678
+ }
679
+ if (x < y) return -1;
680
+ if (y < x) return 1;
681
+ return 0;
682
+ };
683
+ function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
684
+ if (buffer2.length === 0) return -1;
685
+ if (typeof byteOffset === "string") {
686
+ encoding = byteOffset;
687
+ byteOffset = 0;
688
+ } else if (byteOffset > 2147483647) {
689
+ byteOffset = 2147483647;
690
+ } else if (byteOffset < -2147483648) {
691
+ byteOffset = -2147483648;
692
+ }
693
+ byteOffset = +byteOffset;
694
+ if (numberIsNaN(byteOffset)) {
695
+ byteOffset = dir ? 0 : buffer2.length - 1;
696
+ }
697
+ if (byteOffset < 0) byteOffset = buffer2.length + byteOffset;
698
+ if (byteOffset >= buffer2.length) {
699
+ if (dir) return -1;
700
+ else byteOffset = buffer2.length - 1;
701
+ } else if (byteOffset < 0) {
702
+ if (dir) byteOffset = 0;
703
+ else return -1;
704
+ }
705
+ if (typeof val === "string") {
706
+ val = Buffer2.from(val, encoding);
707
+ }
708
+ if (Buffer2.isBuffer(val)) {
709
+ if (val.length === 0) {
710
+ return -1;
711
+ }
712
+ return arrayIndexOf(buffer2, val, byteOffset, encoding, dir);
713
+ } else if (typeof val === "number") {
714
+ val = val & 255;
715
+ if (typeof GlobalUint8Array.prototype.indexOf === "function") {
716
+ if (dir) {
717
+ return GlobalUint8Array.prototype.indexOf.call(buffer2, val, byteOffset);
718
+ } else {
719
+ return GlobalUint8Array.prototype.lastIndexOf.call(buffer2, val, byteOffset);
720
+ }
721
+ }
722
+ return arrayIndexOf(buffer2, [val], byteOffset, encoding, dir);
723
+ }
724
+ throw new TypeError("val must be string, number or Buffer");
725
+ }
726
+ function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
727
+ let indexSize = 1;
728
+ let arrLength = arr.length;
729
+ let valLength = val.length;
730
+ if (encoding !== void 0) {
731
+ encoding = String(encoding).toLowerCase();
732
+ if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") {
733
+ if (arr.length < 2 || val.length < 2) {
734
+ return -1;
735
+ }
736
+ indexSize = 2;
737
+ arrLength /= 2;
738
+ valLength /= 2;
739
+ byteOffset /= 2;
740
+ }
741
+ }
742
+ function read(buf, i2) {
743
+ if (indexSize === 1) {
744
+ return buf[i2];
745
+ } else {
746
+ return buf.readUInt16BE(i2 * indexSize);
747
+ }
748
+ }
749
+ let i;
750
+ if (dir) {
751
+ let foundIndex = -1;
752
+ for (i = byteOffset; i < arrLength; i++) {
753
+ if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
754
+ if (foundIndex === -1) foundIndex = i;
755
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
756
+ } else {
757
+ if (foundIndex !== -1) i -= i - foundIndex;
758
+ foundIndex = -1;
759
+ }
760
+ }
761
+ } else {
762
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
763
+ for (i = byteOffset; i >= 0; i--) {
764
+ let found = true;
765
+ for (let j = 0; j < valLength; j++) {
766
+ if (read(arr, i + j) !== read(val, j)) {
767
+ found = false;
768
+ break;
769
+ }
770
+ }
771
+ if (found) return i;
772
+ }
773
+ }
774
+ return -1;
775
+ }
776
+ Buffer2.prototype.includes = function includes(val, byteOffset, encoding) {
777
+ return this.indexOf(val, byteOffset, encoding) !== -1;
778
+ };
779
+ Buffer2.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
780
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
781
+ };
782
+ Buffer2.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
783
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
784
+ };
785
+ function hexWrite(buf, string, offset, length) {
786
+ offset = Number(offset) || 0;
787
+ const remaining = buf.length - offset;
788
+ if (!length) {
789
+ length = remaining;
790
+ } else {
791
+ length = Number(length);
792
+ if (length > remaining) {
793
+ length = remaining;
794
+ }
795
+ }
796
+ const strLen = string.length;
797
+ if (length > strLen / 2) {
798
+ length = strLen / 2;
799
+ }
800
+ let i;
801
+ for (i = 0; i < length; ++i) {
802
+ const parsed = parseInt(string.substr(i * 2, 2), 16);
803
+ if (numberIsNaN(parsed)) return i;
804
+ buf[offset + i] = parsed;
805
+ }
806
+ return i;
807
+ }
808
+ function utf8Write(buf, string, offset, length) {
809
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
810
+ }
811
+ function asciiWrite(buf, string, offset, length) {
812
+ return blitBuffer(asciiToBytes(string), buf, offset, length);
813
+ }
814
+ function base64Write(buf, string, offset, length) {
815
+ return blitBuffer(base64ToBytes(string), buf, offset, length);
816
+ }
817
+ function ucs2Write(buf, string, offset, length) {
818
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
819
+ }
820
+ Buffer2.prototype.write = function write(string, offset, length, encoding) {
821
+ if (offset === void 0) {
822
+ encoding = "utf8";
823
+ length = this.length;
824
+ offset = 0;
825
+ } else if (length === void 0 && typeof offset === "string") {
826
+ encoding = offset;
827
+ length = this.length;
828
+ offset = 0;
829
+ } else if (isFinite(offset)) {
830
+ offset = offset >>> 0;
831
+ if (isFinite(length)) {
832
+ length = length >>> 0;
833
+ if (encoding === void 0) encoding = "utf8";
834
+ } else {
835
+ encoding = length;
836
+ length = void 0;
837
+ }
838
+ } else {
839
+ throw new Error(
840
+ "Buffer.write(string, encoding, offset[, length]) is no longer supported"
841
+ );
842
+ }
843
+ const remaining = this.length - offset;
844
+ if (length === void 0 || length > remaining) length = remaining;
845
+ if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
846
+ throw new RangeError("Attempt to write outside buffer bounds");
847
+ }
848
+ if (!encoding) encoding = "utf8";
849
+ let loweredCase = false;
850
+ for (; ; ) {
851
+ switch (encoding) {
852
+ case "hex":
853
+ return hexWrite(this, string, offset, length);
854
+ case "utf8":
855
+ case "utf-8":
856
+ return utf8Write(this, string, offset, length);
857
+ case "ascii":
858
+ case "latin1":
859
+ case "binary":
860
+ return asciiWrite(this, string, offset, length);
861
+ case "base64":
862
+ return base64Write(this, string, offset, length);
863
+ case "ucs2":
864
+ case "ucs-2":
865
+ case "utf16le":
866
+ case "utf-16le":
867
+ return ucs2Write(this, string, offset, length);
868
+ default:
869
+ if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
870
+ encoding = ("" + encoding).toLowerCase();
871
+ loweredCase = true;
872
+ }
873
+ }
874
+ };
875
+ Buffer2.prototype.toJSON = function toJSON() {
876
+ return {
877
+ type: "Buffer",
878
+ data: Array.prototype.slice.call(this._arr || this, 0)
879
+ };
880
+ };
881
+ function base64Slice(buf, start, end) {
882
+ if (start === 0 && end === buf.length) {
883
+ return base64.fromByteArray(buf);
884
+ } else {
885
+ return base64.fromByteArray(buf.slice(start, end));
886
+ }
887
+ }
888
+ function utf8Slice(buf, start, end) {
889
+ end = Math.min(buf.length, end);
890
+ const res = [];
891
+ let i = start;
892
+ while (i < end) {
893
+ const firstByte = buf[i];
894
+ let codePoint = null;
895
+ let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
896
+ if (i + bytesPerSequence <= end) {
897
+ let secondByte, thirdByte, fourthByte, tempCodePoint;
898
+ switch (bytesPerSequence) {
899
+ case 1:
900
+ if (firstByte < 128) {
901
+ codePoint = firstByte;
902
+ }
903
+ break;
904
+ case 2:
905
+ secondByte = buf[i + 1];
906
+ if ((secondByte & 192) === 128) {
907
+ tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
908
+ if (tempCodePoint > 127) {
909
+ codePoint = tempCodePoint;
910
+ }
911
+ }
912
+ break;
913
+ case 3:
914
+ secondByte = buf[i + 1];
915
+ thirdByte = buf[i + 2];
916
+ if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
917
+ tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
918
+ if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
919
+ codePoint = tempCodePoint;
920
+ }
921
+ }
922
+ break;
923
+ case 4:
924
+ secondByte = buf[i + 1];
925
+ thirdByte = buf[i + 2];
926
+ fourthByte = buf[i + 3];
927
+ if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
928
+ tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
929
+ if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
930
+ codePoint = tempCodePoint;
931
+ }
932
+ }
933
+ }
934
+ }
935
+ if (codePoint === null) {
936
+ codePoint = 65533;
937
+ bytesPerSequence = 1;
938
+ } else if (codePoint > 65535) {
939
+ codePoint -= 65536;
940
+ res.push(codePoint >>> 10 & 1023 | 55296);
941
+ codePoint = 56320 | codePoint & 1023;
942
+ }
943
+ res.push(codePoint);
944
+ i += bytesPerSequence;
945
+ }
946
+ return decodeCodePointsArray(res);
947
+ }
948
+ const MAX_ARGUMENTS_LENGTH = 4096;
949
+ function decodeCodePointsArray(codePoints) {
950
+ const len = codePoints.length;
951
+ if (len <= MAX_ARGUMENTS_LENGTH) {
952
+ return String.fromCharCode.apply(String, codePoints);
953
+ }
954
+ let res = "";
955
+ let i = 0;
956
+ while (i < len) {
957
+ res += String.fromCharCode.apply(
958
+ String,
959
+ codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
960
+ );
961
+ }
962
+ return res;
963
+ }
964
+ function asciiSlice(buf, start, end) {
965
+ let ret = "";
966
+ end = Math.min(buf.length, end);
967
+ for (let i = start; i < end; ++i) {
968
+ ret += String.fromCharCode(buf[i] & 127);
969
+ }
970
+ return ret;
971
+ }
972
+ function latin1Slice(buf, start, end) {
973
+ let ret = "";
974
+ end = Math.min(buf.length, end);
975
+ for (let i = start; i < end; ++i) {
976
+ ret += String.fromCharCode(buf[i]);
977
+ }
978
+ return ret;
979
+ }
980
+ function hexSlice(buf, start, end) {
981
+ const len = buf.length;
982
+ if (!start || start < 0) start = 0;
983
+ if (!end || end < 0 || end > len) end = len;
984
+ let out = "";
985
+ for (let i = start; i < end; ++i) {
986
+ out += hexSliceLookupTable[buf[i]];
987
+ }
988
+ return out;
989
+ }
990
+ function utf16leSlice(buf, start, end) {
991
+ const bytes = buf.slice(start, end);
992
+ let res = "";
993
+ for (let i = 0; i < bytes.length - 1; i += 2) {
994
+ res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
995
+ }
996
+ return res;
997
+ }
998
+ Buffer2.prototype.slice = function slice(start, end) {
999
+ const len = this.length;
1000
+ start = ~~start;
1001
+ end = end === void 0 ? len : ~~end;
1002
+ if (start < 0) {
1003
+ start += len;
1004
+ if (start < 0) start = 0;
1005
+ } else if (start > len) {
1006
+ start = len;
1007
+ }
1008
+ if (end < 0) {
1009
+ end += len;
1010
+ if (end < 0) end = 0;
1011
+ } else if (end > len) {
1012
+ end = len;
1013
+ }
1014
+ if (end < start) end = start;
1015
+ const newBuf = this.subarray(start, end);
1016
+ Object.setPrototypeOf(newBuf, Buffer2.prototype);
1017
+ return newBuf;
1018
+ };
1019
+ function checkOffset(offset, ext, length) {
1020
+ if (offset % 1 !== 0 || offset < 0) throw new RangeError("offset is not uint");
1021
+ if (offset + ext > length) throw new RangeError("Trying to access beyond buffer length");
1022
+ }
1023
+ Buffer2.prototype.readUintLE = Buffer2.prototype.readUIntLE = function readUIntLE(offset, byteLength3, noAssert) {
1024
+ offset = offset >>> 0;
1025
+ byteLength3 = byteLength3 >>> 0;
1026
+ if (!noAssert) checkOffset(offset, byteLength3, this.length);
1027
+ let val = this[offset];
1028
+ let mul = 1;
1029
+ let i = 0;
1030
+ while (++i < byteLength3 && (mul *= 256)) {
1031
+ val += this[offset + i] * mul;
1032
+ }
1033
+ return val;
1034
+ };
1035
+ Buffer2.prototype.readUintBE = Buffer2.prototype.readUIntBE = function readUIntBE(offset, byteLength3, noAssert) {
1036
+ offset = offset >>> 0;
1037
+ byteLength3 = byteLength3 >>> 0;
1038
+ if (!noAssert) {
1039
+ checkOffset(offset, byteLength3, this.length);
1040
+ }
1041
+ let val = this[offset + --byteLength3];
1042
+ let mul = 1;
1043
+ while (byteLength3 > 0 && (mul *= 256)) {
1044
+ val += this[offset + --byteLength3] * mul;
1045
+ }
1046
+ return val;
1047
+ };
1048
+ Buffer2.prototype.readUint8 = Buffer2.prototype.readUInt8 = function readUInt8(offset, noAssert) {
1049
+ offset = offset >>> 0;
1050
+ if (!noAssert) checkOffset(offset, 1, this.length);
1051
+ return this[offset];
1052
+ };
1053
+ Buffer2.prototype.readUint16LE = Buffer2.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
1054
+ offset = offset >>> 0;
1055
+ if (!noAssert) checkOffset(offset, 2, this.length);
1056
+ return this[offset] | this[offset + 1] << 8;
1057
+ };
1058
+ Buffer2.prototype.readUint16BE = Buffer2.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
1059
+ offset = offset >>> 0;
1060
+ if (!noAssert) checkOffset(offset, 2, this.length);
1061
+ return this[offset] << 8 | this[offset + 1];
1062
+ };
1063
+ Buffer2.prototype.readUint32LE = Buffer2.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
1064
+ offset = offset >>> 0;
1065
+ if (!noAssert) checkOffset(offset, 4, this.length);
1066
+ return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
1067
+ };
1068
+ Buffer2.prototype.readUint32BE = Buffer2.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
1069
+ offset = offset >>> 0;
1070
+ if (!noAssert) checkOffset(offset, 4, this.length);
1071
+ return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
1072
+ };
1073
+ Buffer2.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
1074
+ offset = offset >>> 0;
1075
+ validateNumber(offset, "offset");
1076
+ const first = this[offset];
1077
+ const last = this[offset + 7];
1078
+ if (first === void 0 || last === void 0) {
1079
+ boundsError(offset, this.length - 8);
1080
+ }
1081
+ const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;
1082
+ const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;
1083
+ return BigInt(lo) + (BigInt(hi) << BigInt(32));
1084
+ });
1085
+ Buffer2.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {
1086
+ offset = offset >>> 0;
1087
+ validateNumber(offset, "offset");
1088
+ const first = this[offset];
1089
+ const last = this[offset + 7];
1090
+ if (first === void 0 || last === void 0) {
1091
+ boundsError(offset, this.length - 8);
1092
+ }
1093
+ const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
1094
+ const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
1095
+ return (BigInt(hi) << BigInt(32)) + BigInt(lo);
1096
+ });
1097
+ Buffer2.prototype.readIntLE = function readIntLE(offset, byteLength3, noAssert) {
1098
+ offset = offset >>> 0;
1099
+ byteLength3 = byteLength3 >>> 0;
1100
+ if (!noAssert) checkOffset(offset, byteLength3, this.length);
1101
+ let val = this[offset];
1102
+ let mul = 1;
1103
+ let i = 0;
1104
+ while (++i < byteLength3 && (mul *= 256)) {
1105
+ val += this[offset + i] * mul;
1106
+ }
1107
+ mul *= 128;
1108
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength3);
1109
+ return val;
1110
+ };
1111
+ Buffer2.prototype.readIntBE = function readIntBE(offset, byteLength3, noAssert) {
1112
+ offset = offset >>> 0;
1113
+ byteLength3 = byteLength3 >>> 0;
1114
+ if (!noAssert) checkOffset(offset, byteLength3, this.length);
1115
+ let i = byteLength3;
1116
+ let mul = 1;
1117
+ let val = this[offset + --i];
1118
+ while (i > 0 && (mul *= 256)) {
1119
+ val += this[offset + --i] * mul;
1120
+ }
1121
+ mul *= 128;
1122
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength3);
1123
+ return val;
1124
+ };
1125
+ Buffer2.prototype.readInt8 = function readInt8(offset, noAssert) {
1126
+ offset = offset >>> 0;
1127
+ if (!noAssert) checkOffset(offset, 1, this.length);
1128
+ if (!(this[offset] & 128)) return this[offset];
1129
+ return (255 - this[offset] + 1) * -1;
1130
+ };
1131
+ Buffer2.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
1132
+ offset = offset >>> 0;
1133
+ if (!noAssert) checkOffset(offset, 2, this.length);
1134
+ const val = this[offset] | this[offset + 1] << 8;
1135
+ return val & 32768 ? val | 4294901760 : val;
1136
+ };
1137
+ Buffer2.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
1138
+ offset = offset >>> 0;
1139
+ if (!noAssert) checkOffset(offset, 2, this.length);
1140
+ const val = this[offset + 1] | this[offset] << 8;
1141
+ return val & 32768 ? val | 4294901760 : val;
1142
+ };
1143
+ Buffer2.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
1144
+ offset = offset >>> 0;
1145
+ if (!noAssert) checkOffset(offset, 4, this.length);
1146
+ return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
1147
+ };
1148
+ Buffer2.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
1149
+ offset = offset >>> 0;
1150
+ if (!noAssert) checkOffset(offset, 4, this.length);
1151
+ return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
1152
+ };
1153
+ Buffer2.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
1154
+ offset = offset >>> 0;
1155
+ validateNumber(offset, "offset");
1156
+ const first = this[offset];
1157
+ const last = this[offset + 7];
1158
+ if (first === void 0 || last === void 0) {
1159
+ boundsError(offset, this.length - 8);
1160
+ }
1161
+ const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);
1162
+ return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);
1163
+ });
1164
+ Buffer2.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {
1165
+ offset = offset >>> 0;
1166
+ validateNumber(offset, "offset");
1167
+ const first = this[offset];
1168
+ const last = this[offset + 7];
1169
+ if (first === void 0 || last === void 0) {
1170
+ boundsError(offset, this.length - 8);
1171
+ }
1172
+ const val = (first << 24) + // Overflow
1173
+ this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
1174
+ return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);
1175
+ });
1176
+ Buffer2.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
1177
+ offset = offset >>> 0;
1178
+ if (!noAssert) checkOffset(offset, 4, this.length);
1179
+ return ieee754$1.read(this, offset, true, 23, 4);
1180
+ };
1181
+ Buffer2.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
1182
+ offset = offset >>> 0;
1183
+ if (!noAssert) checkOffset(offset, 4, this.length);
1184
+ return ieee754$1.read(this, offset, false, 23, 4);
1185
+ };
1186
+ Buffer2.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
1187
+ offset = offset >>> 0;
1188
+ if (!noAssert) checkOffset(offset, 8, this.length);
1189
+ return ieee754$1.read(this, offset, true, 52, 8);
1190
+ };
1191
+ Buffer2.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
1192
+ offset = offset >>> 0;
1193
+ if (!noAssert) checkOffset(offset, 8, this.length);
1194
+ return ieee754$1.read(this, offset, false, 52, 8);
1195
+ };
1196
+ function checkInt(buf, value, offset, ext, max, min) {
1197
+ if (!Buffer2.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
1198
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
1199
+ if (offset + ext > buf.length) throw new RangeError("Index out of range");
1200
+ }
1201
+ Buffer2.prototype.writeUintLE = Buffer2.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength3, noAssert) {
1202
+ value = +value;
1203
+ offset = offset >>> 0;
1204
+ byteLength3 = byteLength3 >>> 0;
1205
+ if (!noAssert) {
1206
+ const maxBytes = Math.pow(2, 8 * byteLength3) - 1;
1207
+ checkInt(this, value, offset, byteLength3, maxBytes, 0);
1208
+ }
1209
+ let mul = 1;
1210
+ let i = 0;
1211
+ this[offset] = value & 255;
1212
+ while (++i < byteLength3 && (mul *= 256)) {
1213
+ this[offset + i] = value / mul & 255;
1214
+ }
1215
+ return offset + byteLength3;
1216
+ };
1217
+ Buffer2.prototype.writeUintBE = Buffer2.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength3, noAssert) {
1218
+ value = +value;
1219
+ offset = offset >>> 0;
1220
+ byteLength3 = byteLength3 >>> 0;
1221
+ if (!noAssert) {
1222
+ const maxBytes = Math.pow(2, 8 * byteLength3) - 1;
1223
+ checkInt(this, value, offset, byteLength3, maxBytes, 0);
1224
+ }
1225
+ let i = byteLength3 - 1;
1226
+ let mul = 1;
1227
+ this[offset + i] = value & 255;
1228
+ while (--i >= 0 && (mul *= 256)) {
1229
+ this[offset + i] = value / mul & 255;
1230
+ }
1231
+ return offset + byteLength3;
1232
+ };
1233
+ Buffer2.prototype.writeUint8 = Buffer2.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
1234
+ value = +value;
1235
+ offset = offset >>> 0;
1236
+ if (!noAssert) checkInt(this, value, offset, 1, 255, 0);
1237
+ this[offset] = value & 255;
1238
+ return offset + 1;
1239
+ };
1240
+ Buffer2.prototype.writeUint16LE = Buffer2.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
1241
+ value = +value;
1242
+ offset = offset >>> 0;
1243
+ if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
1244
+ this[offset] = value & 255;
1245
+ this[offset + 1] = value >>> 8;
1246
+ return offset + 2;
1247
+ };
1248
+ Buffer2.prototype.writeUint16BE = Buffer2.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
1249
+ value = +value;
1250
+ offset = offset >>> 0;
1251
+ if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
1252
+ this[offset] = value >>> 8;
1253
+ this[offset + 1] = value & 255;
1254
+ return offset + 2;
1255
+ };
1256
+ Buffer2.prototype.writeUint32LE = Buffer2.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
1257
+ value = +value;
1258
+ offset = offset >>> 0;
1259
+ if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
1260
+ this[offset + 3] = value >>> 24;
1261
+ this[offset + 2] = value >>> 16;
1262
+ this[offset + 1] = value >>> 8;
1263
+ this[offset] = value & 255;
1264
+ return offset + 4;
1265
+ };
1266
+ Buffer2.prototype.writeUint32BE = Buffer2.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
1267
+ value = +value;
1268
+ offset = offset >>> 0;
1269
+ if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
1270
+ this[offset] = value >>> 24;
1271
+ this[offset + 1] = value >>> 16;
1272
+ this[offset + 2] = value >>> 8;
1273
+ this[offset + 3] = value & 255;
1274
+ return offset + 4;
1275
+ };
1276
+ function wrtBigUInt64LE(buf, value, offset, min, max) {
1277
+ checkIntBI(value, min, max, buf, offset, 7);
1278
+ let lo = Number(value & BigInt(4294967295));
1279
+ buf[offset++] = lo;
1280
+ lo = lo >> 8;
1281
+ buf[offset++] = lo;
1282
+ lo = lo >> 8;
1283
+ buf[offset++] = lo;
1284
+ lo = lo >> 8;
1285
+ buf[offset++] = lo;
1286
+ let hi = Number(value >> BigInt(32) & BigInt(4294967295));
1287
+ buf[offset++] = hi;
1288
+ hi = hi >> 8;
1289
+ buf[offset++] = hi;
1290
+ hi = hi >> 8;
1291
+ buf[offset++] = hi;
1292
+ hi = hi >> 8;
1293
+ buf[offset++] = hi;
1294
+ return offset;
1295
+ }
1296
+ function wrtBigUInt64BE(buf, value, offset, min, max) {
1297
+ checkIntBI(value, min, max, buf, offset, 7);
1298
+ let lo = Number(value & BigInt(4294967295));
1299
+ buf[offset + 7] = lo;
1300
+ lo = lo >> 8;
1301
+ buf[offset + 6] = lo;
1302
+ lo = lo >> 8;
1303
+ buf[offset + 5] = lo;
1304
+ lo = lo >> 8;
1305
+ buf[offset + 4] = lo;
1306
+ let hi = Number(value >> BigInt(32) & BigInt(4294967295));
1307
+ buf[offset + 3] = hi;
1308
+ hi = hi >> 8;
1309
+ buf[offset + 2] = hi;
1310
+ hi = hi >> 8;
1311
+ buf[offset + 1] = hi;
1312
+ hi = hi >> 8;
1313
+ buf[offset] = hi;
1314
+ return offset + 8;
1315
+ }
1316
+ Buffer2.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {
1317
+ return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
1318
+ });
1319
+ Buffer2.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {
1320
+ return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
1321
+ });
1322
+ Buffer2.prototype.writeIntLE = function writeIntLE(value, offset, byteLength3, noAssert) {
1323
+ value = +value;
1324
+ offset = offset >>> 0;
1325
+ if (!noAssert) {
1326
+ const limit = Math.pow(2, 8 * byteLength3 - 1);
1327
+ checkInt(this, value, offset, byteLength3, limit - 1, -limit);
1328
+ }
1329
+ let i = 0;
1330
+ let mul = 1;
1331
+ let sub = 0;
1332
+ this[offset] = value & 255;
1333
+ while (++i < byteLength3 && (mul *= 256)) {
1334
+ if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
1335
+ sub = 1;
1336
+ }
1337
+ this[offset + i] = (value / mul >> 0) - sub & 255;
1338
+ }
1339
+ return offset + byteLength3;
1340
+ };
1341
+ Buffer2.prototype.writeIntBE = function writeIntBE(value, offset, byteLength3, noAssert) {
1342
+ value = +value;
1343
+ offset = offset >>> 0;
1344
+ if (!noAssert) {
1345
+ const limit = Math.pow(2, 8 * byteLength3 - 1);
1346
+ checkInt(this, value, offset, byteLength3, limit - 1, -limit);
1347
+ }
1348
+ let i = byteLength3 - 1;
1349
+ let mul = 1;
1350
+ let sub = 0;
1351
+ this[offset + i] = value & 255;
1352
+ while (--i >= 0 && (mul *= 256)) {
1353
+ if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
1354
+ sub = 1;
1355
+ }
1356
+ this[offset + i] = (value / mul >> 0) - sub & 255;
1357
+ }
1358
+ return offset + byteLength3;
1359
+ };
1360
+ Buffer2.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
1361
+ value = +value;
1362
+ offset = offset >>> 0;
1363
+ if (!noAssert) checkInt(this, value, offset, 1, 127, -128);
1364
+ if (value < 0) value = 255 + value + 1;
1365
+ this[offset] = value & 255;
1366
+ return offset + 1;
1367
+ };
1368
+ Buffer2.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
1369
+ value = +value;
1370
+ offset = offset >>> 0;
1371
+ if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
1372
+ this[offset] = value & 255;
1373
+ this[offset + 1] = value >>> 8;
1374
+ return offset + 2;
1375
+ };
1376
+ Buffer2.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
1377
+ value = +value;
1378
+ offset = offset >>> 0;
1379
+ if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
1380
+ this[offset] = value >>> 8;
1381
+ this[offset + 1] = value & 255;
1382
+ return offset + 2;
1383
+ };
1384
+ Buffer2.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
1385
+ value = +value;
1386
+ offset = offset >>> 0;
1387
+ if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
1388
+ this[offset] = value & 255;
1389
+ this[offset + 1] = value >>> 8;
1390
+ this[offset + 2] = value >>> 16;
1391
+ this[offset + 3] = value >>> 24;
1392
+ return offset + 4;
1393
+ };
1394
+ Buffer2.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
1395
+ value = +value;
1396
+ offset = offset >>> 0;
1397
+ if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
1398
+ if (value < 0) value = 4294967295 + value + 1;
1399
+ this[offset] = value >>> 24;
1400
+ this[offset + 1] = value >>> 16;
1401
+ this[offset + 2] = value >>> 8;
1402
+ this[offset + 3] = value & 255;
1403
+ return offset + 4;
1404
+ };
1405
+ Buffer2.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {
1406
+ return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1407
+ });
1408
+ Buffer2.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {
1409
+ return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1410
+ });
1411
+ function checkIEEE754(buf, value, offset, ext, max, min) {
1412
+ if (offset + ext > buf.length) throw new RangeError("Index out of range");
1413
+ if (offset < 0) throw new RangeError("Index out of range");
1414
+ }
1415
+ function writeFloat(buf, value, offset, littleEndian, noAssert) {
1416
+ value = +value;
1417
+ offset = offset >>> 0;
1418
+ if (!noAssert) {
1419
+ checkIEEE754(buf, value, offset, 4);
1420
+ }
1421
+ ieee754$1.write(buf, value, offset, littleEndian, 23, 4);
1422
+ return offset + 4;
1423
+ }
1424
+ Buffer2.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
1425
+ return writeFloat(this, value, offset, true, noAssert);
1426
+ };
1427
+ Buffer2.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
1428
+ return writeFloat(this, value, offset, false, noAssert);
1429
+ };
1430
+ function writeDouble(buf, value, offset, littleEndian, noAssert) {
1431
+ value = +value;
1432
+ offset = offset >>> 0;
1433
+ if (!noAssert) {
1434
+ checkIEEE754(buf, value, offset, 8);
1435
+ }
1436
+ ieee754$1.write(buf, value, offset, littleEndian, 52, 8);
1437
+ return offset + 8;
1438
+ }
1439
+ Buffer2.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
1440
+ return writeDouble(this, value, offset, true, noAssert);
1441
+ };
1442
+ Buffer2.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
1443
+ return writeDouble(this, value, offset, false, noAssert);
1444
+ };
1445
+ Buffer2.prototype.copy = function copy(target, targetStart, start, end) {
1446
+ if (!Buffer2.isBuffer(target)) throw new TypeError("argument should be a Buffer");
1447
+ if (!start) start = 0;
1448
+ if (!end && end !== 0) end = this.length;
1449
+ if (targetStart >= target.length) targetStart = target.length;
1450
+ if (!targetStart) targetStart = 0;
1451
+ if (end > 0 && end < start) end = start;
1452
+ if (end === start) return 0;
1453
+ if (target.length === 0 || this.length === 0) return 0;
1454
+ if (targetStart < 0) {
1455
+ throw new RangeError("targetStart out of bounds");
1456
+ }
1457
+ if (start < 0 || start >= this.length) throw new RangeError("Index out of range");
1458
+ if (end < 0) throw new RangeError("sourceEnd out of bounds");
1459
+ if (end > this.length) end = this.length;
1460
+ if (target.length - targetStart < end - start) {
1461
+ end = target.length - targetStart + start;
1462
+ }
1463
+ const len = end - start;
1464
+ if (this === target && typeof GlobalUint8Array.prototype.copyWithin === "function") {
1465
+ this.copyWithin(targetStart, start, end);
1466
+ } else {
1467
+ GlobalUint8Array.prototype.set.call(
1468
+ target,
1469
+ this.subarray(start, end),
1470
+ targetStart
1471
+ );
1472
+ }
1473
+ return len;
1474
+ };
1475
+ Buffer2.prototype.fill = function fill(val, start, end, encoding) {
1476
+ if (typeof val === "string") {
1477
+ if (typeof start === "string") {
1478
+ encoding = start;
1479
+ start = 0;
1480
+ end = this.length;
1481
+ } else if (typeof end === "string") {
1482
+ encoding = end;
1483
+ end = this.length;
1484
+ }
1485
+ if (encoding !== void 0 && typeof encoding !== "string") {
1486
+ throw new TypeError("encoding must be a string");
1487
+ }
1488
+ if (typeof encoding === "string" && !Buffer2.isEncoding(encoding)) {
1489
+ throw new TypeError("Unknown encoding: " + encoding);
1490
+ }
1491
+ if (val.length === 1) {
1492
+ const code2 = val.charCodeAt(0);
1493
+ if (encoding === "utf8" && code2 < 128 || encoding === "latin1") {
1494
+ val = code2;
1495
+ }
1496
+ }
1497
+ } else if (typeof val === "number") {
1498
+ val = val & 255;
1499
+ } else if (typeof val === "boolean") {
1500
+ val = Number(val);
1501
+ }
1502
+ if (start < 0 || this.length < start || this.length < end) {
1503
+ throw new RangeError("Out of range index");
1504
+ }
1505
+ if (end <= start) {
1506
+ return this;
1507
+ }
1508
+ start = start >>> 0;
1509
+ end = end === void 0 ? this.length : end >>> 0;
1510
+ if (!val) val = 0;
1511
+ let i;
1512
+ if (typeof val === "number") {
1513
+ for (i = start; i < end; ++i) {
1514
+ this[i] = val;
1515
+ }
1516
+ } else {
1517
+ const bytes = Buffer2.isBuffer(val) ? val : Buffer2.from(val, encoding);
1518
+ const len = bytes.length;
1519
+ if (len === 0) {
1520
+ throw new TypeError('The value "' + val + '" is invalid for argument "value"');
1521
+ }
1522
+ for (i = 0; i < end - start; ++i) {
1523
+ this[i + start] = bytes[i % len];
1524
+ }
1525
+ }
1526
+ return this;
1527
+ };
1528
+ const errors = {};
1529
+ function E(sym, getMessage, Base) {
1530
+ errors[sym] = class NodeError extends Base {
1531
+ constructor() {
1532
+ super();
1533
+ Object.defineProperty(this, "message", {
1534
+ value: getMessage.apply(this, arguments),
1535
+ writable: true,
1536
+ configurable: true
1537
+ });
1538
+ this.name = `${this.name} [${sym}]`;
1539
+ this.stack;
1540
+ delete this.name;
1541
+ }
1542
+ get code() {
1543
+ return sym;
1544
+ }
1545
+ set code(value) {
1546
+ Object.defineProperty(this, "code", {
1547
+ configurable: true,
1548
+ enumerable: true,
1549
+ value,
1550
+ writable: true
1551
+ });
1552
+ }
1553
+ toString() {
1554
+ return `${this.name} [${sym}]: ${this.message}`;
1555
+ }
1556
+ };
1557
+ }
1558
+ E(
1559
+ "ERR_BUFFER_OUT_OF_BOUNDS",
1560
+ function(name) {
1561
+ if (name) {
1562
+ return `${name} is outside of buffer bounds`;
1563
+ }
1564
+ return "Attempt to access memory outside buffer bounds";
1565
+ },
1566
+ RangeError
1567
+ );
1568
+ E(
1569
+ "ERR_INVALID_ARG_TYPE",
1570
+ function(name, actual) {
1571
+ return `The "${name}" argument must be of type number. Received type ${typeof actual}`;
1572
+ },
1573
+ TypeError
1574
+ );
1575
+ E(
1576
+ "ERR_OUT_OF_RANGE",
1577
+ function(str, range, input) {
1578
+ let msg = `The value of "${str}" is out of range.`;
1579
+ let received = input;
1580
+ if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
1581
+ received = addNumericalSeparator(String(input));
1582
+ } else if (typeof input === "bigint") {
1583
+ received = String(input);
1584
+ if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
1585
+ received = addNumericalSeparator(received);
1586
+ }
1587
+ received += "n";
1588
+ }
1589
+ msg += ` It must be ${range}. Received ${received}`;
1590
+ return msg;
1591
+ },
1592
+ RangeError
1593
+ );
1594
+ function addNumericalSeparator(val) {
1595
+ let res = "";
1596
+ let i = val.length;
1597
+ const start = val[0] === "-" ? 1 : 0;
1598
+ for (; i >= start + 4; i -= 3) {
1599
+ res = `_${val.slice(i - 3, i)}${res}`;
1600
+ }
1601
+ return `${val.slice(0, i)}${res}`;
1602
+ }
1603
+ function checkBounds(buf, offset, byteLength3) {
1604
+ validateNumber(offset, "offset");
1605
+ if (buf[offset] === void 0 || buf[offset + byteLength3] === void 0) {
1606
+ boundsError(offset, buf.length - (byteLength3 + 1));
1607
+ }
1608
+ }
1609
+ function checkIntBI(value, min, max, buf, offset, byteLength3) {
1610
+ if (value > max || value < min) {
1611
+ const n = typeof min === "bigint" ? "n" : "";
1612
+ let range;
1613
+ {
1614
+ if (min === 0 || min === BigInt(0)) {
1615
+ range = `>= 0${n} and < 2${n} ** ${(byteLength3 + 1) * 8}${n}`;
1616
+ } else {
1617
+ range = `>= -(2${n} ** ${(byteLength3 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength3 + 1) * 8 - 1}${n}`;
1618
+ }
1619
+ }
1620
+ throw new errors.ERR_OUT_OF_RANGE("value", range, value);
1621
+ }
1622
+ checkBounds(buf, offset, byteLength3);
1623
+ }
1624
+ function validateNumber(value, name) {
1625
+ if (typeof value !== "number") {
1626
+ throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value);
1627
+ }
1628
+ }
1629
+ function boundsError(value, length, type) {
1630
+ if (Math.floor(value) !== value) {
1631
+ validateNumber(value, type);
1632
+ throw new errors.ERR_OUT_OF_RANGE("offset", "an integer", value);
1633
+ }
1634
+ if (length < 0) {
1635
+ throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
1636
+ }
1637
+ throw new errors.ERR_OUT_OF_RANGE(
1638
+ "offset",
1639
+ `>= ${0} and <= ${length}`,
1640
+ value
1641
+ );
1642
+ }
1643
+ const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
1644
+ function base64clean(str) {
1645
+ str = str.split("=")[0];
1646
+ str = str.trim().replace(INVALID_BASE64_RE, "");
1647
+ if (str.length < 2) return "";
1648
+ while (str.length % 4 !== 0) {
1649
+ str = str + "=";
1650
+ }
1651
+ return str;
1652
+ }
1653
+ function utf8ToBytes(string, units) {
1654
+ units = units || Infinity;
1655
+ let codePoint;
1656
+ const length = string.length;
1657
+ let leadSurrogate = null;
1658
+ const bytes = [];
1659
+ for (let i = 0; i < length; ++i) {
1660
+ codePoint = string.charCodeAt(i);
1661
+ if (codePoint > 55295 && codePoint < 57344) {
1662
+ if (!leadSurrogate) {
1663
+ if (codePoint > 56319) {
1664
+ if ((units -= 3) > -1) bytes.push(239, 191, 189);
1665
+ continue;
1666
+ } else if (i + 1 === length) {
1667
+ if ((units -= 3) > -1) bytes.push(239, 191, 189);
1668
+ continue;
1669
+ }
1670
+ leadSurrogate = codePoint;
1671
+ continue;
1672
+ }
1673
+ if (codePoint < 56320) {
1674
+ if ((units -= 3) > -1) bytes.push(239, 191, 189);
1675
+ leadSurrogate = codePoint;
1676
+ continue;
1677
+ }
1678
+ codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
1679
+ } else if (leadSurrogate) {
1680
+ if ((units -= 3) > -1) bytes.push(239, 191, 189);
1681
+ }
1682
+ leadSurrogate = null;
1683
+ if (codePoint < 128) {
1684
+ if ((units -= 1) < 0) break;
1685
+ bytes.push(codePoint);
1686
+ } else if (codePoint < 2048) {
1687
+ if ((units -= 2) < 0) break;
1688
+ bytes.push(
1689
+ codePoint >> 6 | 192,
1690
+ codePoint & 63 | 128
1691
+ );
1692
+ } else if (codePoint < 65536) {
1693
+ if ((units -= 3) < 0) break;
1694
+ bytes.push(
1695
+ codePoint >> 12 | 224,
1696
+ codePoint >> 6 & 63 | 128,
1697
+ codePoint & 63 | 128
1698
+ );
1699
+ } else if (codePoint < 1114112) {
1700
+ if ((units -= 4) < 0) break;
1701
+ bytes.push(
1702
+ codePoint >> 18 | 240,
1703
+ codePoint >> 12 & 63 | 128,
1704
+ codePoint >> 6 & 63 | 128,
1705
+ codePoint & 63 | 128
1706
+ );
1707
+ } else {
1708
+ throw new Error("Invalid code point");
1709
+ }
1710
+ }
1711
+ return bytes;
1712
+ }
1713
+ function asciiToBytes(str) {
1714
+ const byteArray = [];
1715
+ for (let i = 0; i < str.length; ++i) {
1716
+ byteArray.push(str.charCodeAt(i) & 255);
1717
+ }
1718
+ return byteArray;
1719
+ }
1720
+ function utf16leToBytes(str, units) {
1721
+ let c, hi, lo;
1722
+ const byteArray = [];
1723
+ for (let i = 0; i < str.length; ++i) {
1724
+ if ((units -= 2) < 0) break;
1725
+ c = str.charCodeAt(i);
1726
+ hi = c >> 8;
1727
+ lo = c % 256;
1728
+ byteArray.push(lo);
1729
+ byteArray.push(hi);
1730
+ }
1731
+ return byteArray;
1732
+ }
1733
+ function base64ToBytes(str) {
1734
+ return base64.toByteArray(base64clean(str));
1735
+ }
1736
+ function blitBuffer(src, dst, offset, length) {
1737
+ let i;
1738
+ for (i = 0; i < length; ++i) {
1739
+ if (i + offset >= dst.length || i >= src.length) break;
1740
+ dst[i + offset] = src[i];
1741
+ }
1742
+ return i;
1743
+ }
1744
+ function isInstance(obj, type) {
1745
+ return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
1746
+ }
1747
+ function numberIsNaN(obj) {
1748
+ return obj !== obj;
1749
+ }
1750
+ const hexSliceLookupTable = (function() {
1751
+ const alphabet = "0123456789abcdef";
1752
+ const table = new Array(256);
1753
+ for (let i = 0; i < 16; ++i) {
1754
+ const i16 = i * 16;
1755
+ for (let j = 0; j < 16; ++j) {
1756
+ table[i16 + j] = alphabet[i] + alphabet[j];
1757
+ }
1758
+ }
1759
+ return table;
1760
+ })();
1761
+ function defineBigIntMethod(fn) {
1762
+ return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
1763
+ }
1764
+ function BufferBigIntNotDefined() {
1765
+ throw new Error("BigInt not supported");
1766
+ }
1767
+ })(buffer);
1768
+ const Buffer = buffer.Buffer;
1769
+ function getDefaultExportFromCjs(x) {
1770
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1771
+ }
1772
+ exports.Buffer = Buffer;
1773
+ exports.getDefaultExportFromCjs = getDefaultExportFromCjs;