mimo-reasonix 0.1.0 → 0.1.1

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 (1239) hide show
  1. package/dist/cli/package.json +1 -1
  2. package/node_modules/@alcalzone/ansi-tokenize/LICENSE +21 -0
  3. package/node_modules/@alcalzone/ansi-tokenize/README.md +278 -0
  4. package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.d.ts +7 -0
  5. package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js +57 -0
  6. package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js.map +1 -0
  7. package/node_modules/@alcalzone/ansi-tokenize/build/consts.d.ts +17 -0
  8. package/node_modules/@alcalzone/ansi-tokenize/build/consts.js +28 -0
  9. package/node_modules/@alcalzone/ansi-tokenize/build/consts.js.map +1 -0
  10. package/node_modules/@alcalzone/ansi-tokenize/build/diff.d.ts +6 -0
  11. package/node_modules/@alcalzone/ansi-tokenize/build/diff.js +26 -0
  12. package/node_modules/@alcalzone/ansi-tokenize/build/diff.js.map +1 -0
  13. package/node_modules/@alcalzone/ansi-tokenize/build/index.d.ts +6 -0
  14. package/node_modules/@alcalzone/ansi-tokenize/build/index.js +7 -0
  15. package/node_modules/@alcalzone/ansi-tokenize/build/index.js.map +1 -0
  16. package/node_modules/@alcalzone/ansi-tokenize/build/reduce.d.ts +5 -0
  17. package/node_modules/@alcalzone/ansi-tokenize/build/reduce.js +37 -0
  18. package/node_modules/@alcalzone/ansi-tokenize/build/reduce.js.map +1 -0
  19. package/node_modules/@alcalzone/ansi-tokenize/build/styledChars.d.ts +6 -0
  20. package/node_modules/@alcalzone/ansi-tokenize/build/styledChars.js +38 -0
  21. package/node_modules/@alcalzone/ansi-tokenize/build/styledChars.js.map +1 -0
  22. package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.d.ts +16 -0
  23. package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js +194 -0
  24. package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js.map +1 -0
  25. package/node_modules/@alcalzone/ansi-tokenize/build/undo.d.ts +3 -0
  26. package/node_modules/@alcalzone/ansi-tokenize/build/undo.js +11 -0
  27. package/node_modules/@alcalzone/ansi-tokenize/build/undo.js.map +1 -0
  28. package/node_modules/@alcalzone/ansi-tokenize/package.json +55 -0
  29. package/node_modules/ansi-regex/index.d.ts +33 -0
  30. package/node_modules/ansi-regex/index.js +14 -0
  31. package/node_modules/ansi-regex/license +9 -0
  32. package/node_modules/ansi-regex/package.json +61 -0
  33. package/node_modules/ansi-regex/readme.md +66 -0
  34. package/node_modules/ansi-styles/index.d.ts +236 -0
  35. package/node_modules/ansi-styles/index.js +223 -0
  36. package/node_modules/ansi-styles/license +9 -0
  37. package/node_modules/ansi-styles/package.json +54 -0
  38. package/node_modules/ansi-styles/readme.md +173 -0
  39. package/node_modules/auto-bind/index.d.ts +50 -0
  40. package/node_modules/auto-bind/index.js +41 -0
  41. package/node_modules/auto-bind/license +9 -0
  42. package/node_modules/auto-bind/package.json +51 -0
  43. package/node_modules/auto-bind/react.d.ts +26 -0
  44. package/node_modules/auto-bind/react.js +28 -0
  45. package/node_modules/auto-bind/readme.md +92 -0
  46. package/node_modules/bidi-js/LICENSE.txt +22 -0
  47. package/node_modules/bidi-js/README.md +133 -0
  48. package/node_modules/bidi-js/dist/bidi.js +1010 -0
  49. package/node_modules/bidi-js/dist/bidi.min.js +1 -0
  50. package/node_modules/bidi-js/dist/bidi.min.mjs +1 -0
  51. package/node_modules/bidi-js/dist/bidi.mjs +1002 -0
  52. package/node_modules/bidi-js/package.json +39 -0
  53. package/node_modules/bidi-js/src/brackets.js +30 -0
  54. package/node_modules/bidi-js/src/charTypes.js +66 -0
  55. package/node_modules/bidi-js/src/data/bidiBrackets.data.js +5 -0
  56. package/node_modules/bidi-js/src/data/bidiCharTypes.data.js +25 -0
  57. package/node_modules/bidi-js/src/data/bidiMirroring.data.js +2 -0
  58. package/node_modules/bidi-js/src/embeddingLevels.js +690 -0
  59. package/node_modules/bidi-js/src/index.js +5 -0
  60. package/node_modules/bidi-js/src/mirroring.js +48 -0
  61. package/node_modules/bidi-js/src/reordering.js +99 -0
  62. package/node_modules/bidi-js/src/util/parseCharacterMap.js +30 -0
  63. package/node_modules/chalk/license +9 -0
  64. package/node_modules/chalk/package.json +83 -0
  65. package/node_modules/chalk/readme.md +297 -0
  66. package/node_modules/chalk/source/index.d.ts +325 -0
  67. package/node_modules/chalk/source/index.js +225 -0
  68. package/node_modules/chalk/source/utilities.js +33 -0
  69. package/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  70. package/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  71. package/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  72. package/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
  73. package/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  74. package/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
  75. package/node_modules/cli-boxes/boxes.json +82 -0
  76. package/node_modules/cli-boxes/index.d.ts +122 -0
  77. package/node_modules/cli-boxes/index.js +3 -0
  78. package/node_modules/cli-boxes/license +9 -0
  79. package/node_modules/cli-boxes/package.json +49 -0
  80. package/node_modules/cli-boxes/readme.md +103 -0
  81. package/node_modules/code-excerpt/dist/index.d.ts +9 -0
  82. package/node_modules/code-excerpt/dist/index.js +27 -0
  83. package/node_modules/code-excerpt/license +21 -0
  84. package/node_modules/code-excerpt/package.json +43 -0
  85. package/node_modules/code-excerpt/readme.md +65 -0
  86. package/node_modules/convert-to-spaces/dist/index.d.ts +2 -0
  87. package/node_modules/convert-to-spaces/dist/index.js +4 -0
  88. package/node_modules/convert-to-spaces/license +21 -0
  89. package/node_modules/convert-to-spaces/package.json +40 -0
  90. package/node_modules/convert-to-spaces/readme.md +39 -0
  91. package/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  92. package/node_modules/emoji-regex/README.md +107 -0
  93. package/node_modules/emoji-regex/index.d.ts +3 -0
  94. package/node_modules/emoji-regex/index.js +4 -0
  95. package/node_modules/emoji-regex/index.mjs +4 -0
  96. package/node_modules/emoji-regex/package.json +45 -0
  97. package/node_modules/escape-string-regexp/index.d.ts +18 -0
  98. package/node_modules/escape-string-regexp/index.js +11 -0
  99. package/node_modules/escape-string-regexp/license +9 -0
  100. package/node_modules/escape-string-regexp/package.json +43 -0
  101. package/node_modules/escape-string-regexp/readme.md +29 -0
  102. package/node_modules/get-east-asian-width/index.d.ts +60 -0
  103. package/node_modules/get-east-asian-width/index.js +30 -0
  104. package/node_modules/get-east-asian-width/license +9 -0
  105. package/node_modules/get-east-asian-width/lookup-data.js +18 -0
  106. package/node_modules/get-east-asian-width/lookup.js +135 -0
  107. package/node_modules/get-east-asian-width/package.json +71 -0
  108. package/node_modules/get-east-asian-width/readme.md +65 -0
  109. package/node_modules/get-east-asian-width/utilities.js +24 -0
  110. package/node_modules/indent-string/index.d.ts +38 -0
  111. package/node_modules/indent-string/index.js +38 -0
  112. package/node_modules/indent-string/license +9 -0
  113. package/node_modules/indent-string/package.json +40 -0
  114. package/node_modules/indent-string/readme.md +73 -0
  115. package/node_modules/ink/LICENSE +30 -0
  116. package/node_modules/ink/package.json +53 -0
  117. package/node_modules/ink/src/Ansi.tsx +254 -0
  118. package/node_modules/ink/src/_internal/debug.ts +27 -0
  119. package/node_modules/ink/src/_internal/earlyInput.ts +7 -0
  120. package/node_modules/ink/src/_internal/env.ts +38 -0
  121. package/node_modules/ink/src/_internal/envUtils.ts +13 -0
  122. package/node_modules/ink/src/_internal/execFileNoThrow.ts +58 -0
  123. package/node_modules/ink/src/_internal/fullscreen.ts +9 -0
  124. package/node_modules/ink/src/_internal/intl.ts +13 -0
  125. package/node_modules/ink/src/_internal/iter-lines.ts +14 -0
  126. package/node_modules/ink/src/_internal/log.ts +15 -0
  127. package/node_modules/ink/src/_internal/semver.ts +12 -0
  128. package/node_modules/ink/src/_internal/sliceAnsi.ts +6 -0
  129. package/node_modules/ink/src/_internal/state.ts +22 -0
  130. package/node_modules/ink/src/_internal/yoga-layout.ts +23 -0
  131. package/node_modules/ink/src/ambient.d.ts +47 -0
  132. package/node_modules/ink/src/bidi.ts +110 -0
  133. package/node_modules/ink/src/clearTerminal.ts +53 -0
  134. package/node_modules/ink/src/colorize.ts +129 -0
  135. package/node_modules/ink/src/components/AlternateScreen.tsx +49 -0
  136. package/node_modules/ink/src/components/App.tsx +700 -0
  137. package/node_modules/ink/src/components/AppContext.ts +17 -0
  138. package/node_modules/ink/src/components/Box.tsx +105 -0
  139. package/node_modules/ink/src/components/Button.tsx +96 -0
  140. package/node_modules/ink/src/components/ClockContext.tsx +94 -0
  141. package/node_modules/ink/src/components/CursorDeclarationContext.ts +23 -0
  142. package/node_modules/ink/src/components/ErrorOverview.tsx +116 -0
  143. package/node_modules/ink/src/components/Link.tsx +27 -0
  144. package/node_modules/ink/src/components/Newline.tsx +11 -0
  145. package/node_modules/ink/src/components/NoSelect.tsx +16 -0
  146. package/node_modules/ink/src/components/RawAnsi.tsx +18 -0
  147. package/node_modules/ink/src/components/ScrollBox.tsx +209 -0
  148. package/node_modules/ink/src/components/Spacer.tsx +6 -0
  149. package/node_modules/ink/src/components/StdinContext.ts +35 -0
  150. package/node_modules/ink/src/components/TerminalFocusContext.tsx +37 -0
  151. package/node_modules/ink/src/components/TerminalSizeContext.tsx +9 -0
  152. package/node_modules/ink/src/components/Text.tsx +85 -0
  153. package/node_modules/ink/src/components/TextInput.tsx +140 -0
  154. package/node_modules/ink/src/constants.ts +2 -0
  155. package/node_modules/ink/src/cursor.ts +6 -0
  156. package/node_modules/ink/src/devtools.ts +2 -0
  157. package/node_modules/ink/src/dom.ts +451 -0
  158. package/node_modules/ink/src/events/click-event.ts +19 -0
  159. package/node_modules/ink/src/events/dispatcher.ts +185 -0
  160. package/node_modules/ink/src/events/emitter.ts +37 -0
  161. package/node_modules/ink/src/events/event-handlers.ts +60 -0
  162. package/node_modules/ink/src/events/event.ts +12 -0
  163. package/node_modules/ink/src/events/focus-event.ts +13 -0
  164. package/node_modules/ink/src/events/input-event.ts +212 -0
  165. package/node_modules/ink/src/events/keyboard-event.ts +41 -0
  166. package/node_modules/ink/src/events/paste-event.ts +11 -0
  167. package/node_modules/ink/src/events/resize-event.ts +13 -0
  168. package/node_modules/ink/src/events/terminal-event.ts +99 -0
  169. package/node_modules/ink/src/events/terminal-focus-event.ts +13 -0
  170. package/node_modules/ink/src/focus.ts +159 -0
  171. package/node_modules/ink/src/frame.ts +105 -0
  172. package/node_modules/ink/src/get-max-width.ts +10 -0
  173. package/node_modules/ink/src/hit-test.ts +107 -0
  174. package/node_modules/ink/src/hooks/use-animation-frame.ts +33 -0
  175. package/node_modules/ink/src/hooks/use-app.ts +6 -0
  176. package/node_modules/ink/src/hooks/use-declared-cursor.ts +59 -0
  177. package/node_modules/ink/src/hooks/use-input.ts +57 -0
  178. package/node_modules/ink/src/hooks/use-interval.ts +53 -0
  179. package/node_modules/ink/src/hooks/use-search-highlight.ts +41 -0
  180. package/node_modules/ink/src/hooks/use-selection.ts +86 -0
  181. package/node_modules/ink/src/hooks/use-stdin.ts +6 -0
  182. package/node_modules/ink/src/hooks/use-tab-status.ts +68 -0
  183. package/node_modules/ink/src/hooks/use-terminal-focus.ts +8 -0
  184. package/node_modules/ink/src/hooks/use-terminal-title.ts +21 -0
  185. package/node_modules/ink/src/hooks/use-terminal-viewport.ts +77 -0
  186. package/node_modules/ink/src/index.ts +150 -0
  187. package/node_modules/ink/src/ink.tsx +1499 -0
  188. package/node_modules/ink/src/instances.ts +5 -0
  189. package/node_modules/ink/src/layout/engine.ts +10 -0
  190. package/node_modules/ink/src/layout/geometry.ts +116 -0
  191. package/node_modules/ink/src/layout/node.ts +178 -0
  192. package/node_modules/ink/src/layout/yoga.ts +316 -0
  193. package/node_modules/ink/src/line-width-cache.ts +19 -0
  194. package/node_modules/ink/src/log-update.ts +777 -0
  195. package/node_modules/ink/src/measure-element.ts +14 -0
  196. package/node_modules/ink/src/measure-text.ts +29 -0
  197. package/node_modules/ink/src/node-cache.ts +58 -0
  198. package/node_modules/ink/src/optimizer.ts +65 -0
  199. package/node_modules/ink/src/output.ts +730 -0
  200. package/node_modules/ink/src/parse-keypress.ts +751 -0
  201. package/node_modules/ink/src/react-jsx-aug.d.ts +14 -0
  202. package/node_modules/ink/src/reconciler.ts +508 -0
  203. package/node_modules/ink/src/render-border.ts +230 -0
  204. package/node_modules/ink/src/render-node-to-output.ts +1477 -0
  205. package/node_modules/ink/src/render-to-screen.ts +201 -0
  206. package/node_modules/ink/src/renderer.ts +183 -0
  207. package/node_modules/ink/src/root.ts +148 -0
  208. package/node_modules/ink/src/screen.ts +1301 -0
  209. package/node_modules/ink/src/searchHighlight.ts +68 -0
  210. package/node_modules/ink/src/selection.ts +742 -0
  211. package/node_modules/ink/src/squash-text-nodes.ts +70 -0
  212. package/node_modules/ink/src/stringWidth.ts +222 -0
  213. package/node_modules/ink/src/styles.ts +603 -0
  214. package/node_modules/ink/src/supports-hyperlinks.ts +41 -0
  215. package/node_modules/ink/src/tabstops.ts +39 -0
  216. package/node_modules/ink/src/terminal-focus-state.ts +46 -0
  217. package/node_modules/ink/src/terminal-querier.ts +143 -0
  218. package/node_modules/ink/src/terminal.ts +220 -0
  219. package/node_modules/ink/src/termio/ansi.ts +66 -0
  220. package/node_modules/ink/src/termio/csi.ts +290 -0
  221. package/node_modules/ink/src/termio/dec.ts +52 -0
  222. package/node_modules/ink/src/termio/esc.ts +63 -0
  223. package/node_modules/ink/src/termio/osc.ts +364 -0
  224. package/node_modules/ink/src/termio/parser.ts +383 -0
  225. package/node_modules/ink/src/termio/sgr.ts +331 -0
  226. package/node_modules/ink/src/termio/tokenize.ts +311 -0
  227. package/node_modules/ink/src/termio/types.ts +225 -0
  228. package/node_modules/ink/src/termio.ts +20 -0
  229. package/node_modules/ink/src/useTerminalNotification.ts +124 -0
  230. package/node_modules/ink/src/warn.ts +10 -0
  231. package/node_modules/ink/src/widest-line.ts +12 -0
  232. package/node_modules/ink/src/wrap-text.ts +55 -0
  233. package/node_modules/ink/src/wrapAnsi.ts +15 -0
  234. package/node_modules/ink/tsconfig.json +26 -0
  235. package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  236. package/node_modules/is-fullwidth-code-point/index.js +12 -0
  237. package/node_modules/is-fullwidth-code-point/license +9 -0
  238. package/node_modules/is-fullwidth-code-point/package.json +53 -0
  239. package/node_modules/is-fullwidth-code-point/readme.md +31 -0
  240. package/node_modules/lodash-es/LICENSE +47 -0
  241. package/node_modules/lodash-es/README.md +10 -0
  242. package/node_modules/lodash-es/_DataView.js +7 -0
  243. package/node_modules/lodash-es/_Hash.js +32 -0
  244. package/node_modules/lodash-es/_LazyWrapper.js +28 -0
  245. package/node_modules/lodash-es/_ListCache.js +32 -0
  246. package/node_modules/lodash-es/_LodashWrapper.js +22 -0
  247. package/node_modules/lodash-es/_Map.js +7 -0
  248. package/node_modules/lodash-es/_MapCache.js +32 -0
  249. package/node_modules/lodash-es/_Promise.js +7 -0
  250. package/node_modules/lodash-es/_Set.js +7 -0
  251. package/node_modules/lodash-es/_SetCache.js +27 -0
  252. package/node_modules/lodash-es/_Stack.js +27 -0
  253. package/node_modules/lodash-es/_Symbol.js +6 -0
  254. package/node_modules/lodash-es/_Uint8Array.js +6 -0
  255. package/node_modules/lodash-es/_WeakMap.js +7 -0
  256. package/node_modules/lodash-es/_addMapEntry.js +15 -0
  257. package/node_modules/lodash-es/_addSetEntry.js +15 -0
  258. package/node_modules/lodash-es/_apply.js +21 -0
  259. package/node_modules/lodash-es/_arrayAggregator.js +22 -0
  260. package/node_modules/lodash-es/_arrayEach.js +22 -0
  261. package/node_modules/lodash-es/_arrayEachRight.js +21 -0
  262. package/node_modules/lodash-es/_arrayEvery.js +23 -0
  263. package/node_modules/lodash-es/_arrayFilter.js +25 -0
  264. package/node_modules/lodash-es/_arrayIncludes.js +17 -0
  265. package/node_modules/lodash-es/_arrayIncludesWith.js +22 -0
  266. package/node_modules/lodash-es/_arrayLikeKeys.js +49 -0
  267. package/node_modules/lodash-es/_arrayMap.js +21 -0
  268. package/node_modules/lodash-es/_arrayPush.js +20 -0
  269. package/node_modules/lodash-es/_arrayReduce.js +26 -0
  270. package/node_modules/lodash-es/_arrayReduceRight.js +24 -0
  271. package/node_modules/lodash-es/_arraySample.js +15 -0
  272. package/node_modules/lodash-es/_arraySampleSize.js +17 -0
  273. package/node_modules/lodash-es/_arrayShuffle.js +15 -0
  274. package/node_modules/lodash-es/_arraySome.js +23 -0
  275. package/node_modules/lodash-es/_asciiSize.js +12 -0
  276. package/node_modules/lodash-es/_asciiToArray.js +12 -0
  277. package/node_modules/lodash-es/_asciiWords.js +15 -0
  278. package/node_modules/lodash-es/_assignMergeValue.js +20 -0
  279. package/node_modules/lodash-es/_assignValue.js +28 -0
  280. package/node_modules/lodash-es/_assocIndexOf.js +21 -0
  281. package/node_modules/lodash-es/_baseAggregator.js +21 -0
  282. package/node_modules/lodash-es/_baseAssign.js +17 -0
  283. package/node_modules/lodash-es/_baseAssignIn.js +17 -0
  284. package/node_modules/lodash-es/_baseAssignValue.js +25 -0
  285. package/node_modules/lodash-es/_baseAt.js +23 -0
  286. package/node_modules/lodash-es/_baseClamp.js +22 -0
  287. package/node_modules/lodash-es/_baseClone.js +166 -0
  288. package/node_modules/lodash-es/_baseConforms.js +18 -0
  289. package/node_modules/lodash-es/_baseConformsTo.js +27 -0
  290. package/node_modules/lodash-es/_baseCreate.js +30 -0
  291. package/node_modules/lodash-es/_baseDelay.js +21 -0
  292. package/node_modules/lodash-es/_baseDifference.js +67 -0
  293. package/node_modules/lodash-es/_baseEach.js +14 -0
  294. package/node_modules/lodash-es/_baseEachRight.js +14 -0
  295. package/node_modules/lodash-es/_baseEvery.js +21 -0
  296. package/node_modules/lodash-es/_baseExtremum.js +32 -0
  297. package/node_modules/lodash-es/_baseFill.js +32 -0
  298. package/node_modules/lodash-es/_baseFilter.js +21 -0
  299. package/node_modules/lodash-es/_baseFindIndex.js +24 -0
  300. package/node_modules/lodash-es/_baseFindKey.js +23 -0
  301. package/node_modules/lodash-es/_baseFlatten.js +38 -0
  302. package/node_modules/lodash-es/_baseFor.js +16 -0
  303. package/node_modules/lodash-es/_baseForOwn.js +16 -0
  304. package/node_modules/lodash-es/_baseForOwnRight.js +16 -0
  305. package/node_modules/lodash-es/_baseForRight.js +15 -0
  306. package/node_modules/lodash-es/_baseFunctions.js +19 -0
  307. package/node_modules/lodash-es/_baseGet.js +24 -0
  308. package/node_modules/lodash-es/_baseGetAllKeys.js +20 -0
  309. package/node_modules/lodash-es/_baseGetTag.js +28 -0
  310. package/node_modules/lodash-es/_baseGt.js +14 -0
  311. package/node_modules/lodash-es/_baseHas.js +19 -0
  312. package/node_modules/lodash-es/_baseHasIn.js +13 -0
  313. package/node_modules/lodash-es/_baseInRange.js +18 -0
  314. package/node_modules/lodash-es/_baseIndexOf.js +20 -0
  315. package/node_modules/lodash-es/_baseIndexOfWith.js +23 -0
  316. package/node_modules/lodash-es/_baseIntersection.js +74 -0
  317. package/node_modules/lodash-es/_baseInverter.js +21 -0
  318. package/node_modules/lodash-es/_baseInvoke.js +24 -0
  319. package/node_modules/lodash-es/_baseIsArguments.js +18 -0
  320. package/node_modules/lodash-es/_baseIsArrayBuffer.js +17 -0
  321. package/node_modules/lodash-es/_baseIsDate.js +18 -0
  322. package/node_modules/lodash-es/_baseIsEqual.js +28 -0
  323. package/node_modules/lodash-es/_baseIsEqualDeep.js +83 -0
  324. package/node_modules/lodash-es/_baseIsMap.js +18 -0
  325. package/node_modules/lodash-es/_baseIsMatch.js +62 -0
  326. package/node_modules/lodash-es/_baseIsNaN.js +12 -0
  327. package/node_modules/lodash-es/_baseIsNative.js +47 -0
  328. package/node_modules/lodash-es/_baseIsRegExp.js +18 -0
  329. package/node_modules/lodash-es/_baseIsSet.js +18 -0
  330. package/node_modules/lodash-es/_baseIsTypedArray.js +60 -0
  331. package/node_modules/lodash-es/_baseIteratee.js +31 -0
  332. package/node_modules/lodash-es/_baseKeys.js +30 -0
  333. package/node_modules/lodash-es/_baseKeysIn.js +33 -0
  334. package/node_modules/lodash-es/_baseLodash.js +10 -0
  335. package/node_modules/lodash-es/_baseLt.js +14 -0
  336. package/node_modules/lodash-es/_baseMap.js +22 -0
  337. package/node_modules/lodash-es/_baseMatches.js +22 -0
  338. package/node_modules/lodash-es/_baseMatchesProperty.js +33 -0
  339. package/node_modules/lodash-es/_baseMean.js +20 -0
  340. package/node_modules/lodash-es/_baseMerge.js +42 -0
  341. package/node_modules/lodash-es/_baseMergeDeep.js +94 -0
  342. package/node_modules/lodash-es/_baseNth.js +20 -0
  343. package/node_modules/lodash-es/_baseOrderBy.js +49 -0
  344. package/node_modules/lodash-es/_basePick.js +19 -0
  345. package/node_modules/lodash-es/_basePickBy.js +30 -0
  346. package/node_modules/lodash-es/_baseProperty.js +14 -0
  347. package/node_modules/lodash-es/_basePropertyDeep.js +16 -0
  348. package/node_modules/lodash-es/_basePropertyOf.js +14 -0
  349. package/node_modules/lodash-es/_basePullAll.js +51 -0
  350. package/node_modules/lodash-es/_basePullAt.js +37 -0
  351. package/node_modules/lodash-es/_baseRandom.js +18 -0
  352. package/node_modules/lodash-es/_baseRange.js +28 -0
  353. package/node_modules/lodash-es/_baseReduce.js +23 -0
  354. package/node_modules/lodash-es/_baseRepeat.js +35 -0
  355. package/node_modules/lodash-es/_baseRest.js +17 -0
  356. package/node_modules/lodash-es/_baseSample.js +15 -0
  357. package/node_modules/lodash-es/_baseSampleSize.js +18 -0
  358. package/node_modules/lodash-es/_baseSet.js +51 -0
  359. package/node_modules/lodash-es/_baseSetData.js +17 -0
  360. package/node_modules/lodash-es/_baseSetToString.js +22 -0
  361. package/node_modules/lodash-es/_baseShuffle.js +15 -0
  362. package/node_modules/lodash-es/_baseSlice.js +31 -0
  363. package/node_modules/lodash-es/_baseSome.js +22 -0
  364. package/node_modules/lodash-es/_baseSortBy.js +21 -0
  365. package/node_modules/lodash-es/_baseSortedIndex.js +42 -0
  366. package/node_modules/lodash-es/_baseSortedIndexBy.js +67 -0
  367. package/node_modules/lodash-es/_baseSortedUniq.js +30 -0
  368. package/node_modules/lodash-es/_baseSum.js +24 -0
  369. package/node_modules/lodash-es/_baseTimes.js +20 -0
  370. package/node_modules/lodash-es/_baseToNumber.js +24 -0
  371. package/node_modules/lodash-es/_baseToPairs.js +18 -0
  372. package/node_modules/lodash-es/_baseToString.js +37 -0
  373. package/node_modules/lodash-es/_baseTrim.js +19 -0
  374. package/node_modules/lodash-es/_baseUnary.js +14 -0
  375. package/node_modules/lodash-es/_baseUniq.js +72 -0
  376. package/node_modules/lodash-es/_baseUnset.js +52 -0
  377. package/node_modules/lodash-es/_baseUpdate.js +18 -0
  378. package/node_modules/lodash-es/_baseValues.js +19 -0
  379. package/node_modules/lodash-es/_baseWhile.js +26 -0
  380. package/node_modules/lodash-es/_baseWrapperValue.js +25 -0
  381. package/node_modules/lodash-es/_baseXor.js +36 -0
  382. package/node_modules/lodash-es/_baseZipObject.js +23 -0
  383. package/node_modules/lodash-es/_cacheHas.js +13 -0
  384. package/node_modules/lodash-es/_castArrayLikeObject.js +14 -0
  385. package/node_modules/lodash-es/_castFunction.js +14 -0
  386. package/node_modules/lodash-es/_castPath.js +21 -0
  387. package/node_modules/lodash-es/_castRest.js +14 -0
  388. package/node_modules/lodash-es/_castSlice.js +18 -0
  389. package/node_modules/lodash-es/_charsEndIndex.js +19 -0
  390. package/node_modules/lodash-es/_charsStartIndex.js +20 -0
  391. package/node_modules/lodash-es/_cloneArrayBuffer.js +16 -0
  392. package/node_modules/lodash-es/_cloneBuffer.js +35 -0
  393. package/node_modules/lodash-es/_cloneDataView.js +16 -0
  394. package/node_modules/lodash-es/_cloneMap.js +22 -0
  395. package/node_modules/lodash-es/_cloneRegExp.js +17 -0
  396. package/node_modules/lodash-es/_cloneSet.js +22 -0
  397. package/node_modules/lodash-es/_cloneSymbol.js +18 -0
  398. package/node_modules/lodash-es/_cloneTypedArray.js +16 -0
  399. package/node_modules/lodash-es/_compareAscending.js +41 -0
  400. package/node_modules/lodash-es/_compareMultiple.js +44 -0
  401. package/node_modules/lodash-es/_composeArgs.js +39 -0
  402. package/node_modules/lodash-es/_composeArgsRight.js +41 -0
  403. package/node_modules/lodash-es/_copyArray.js +20 -0
  404. package/node_modules/lodash-es/_copyObject.js +40 -0
  405. package/node_modules/lodash-es/_copySymbols.js +16 -0
  406. package/node_modules/lodash-es/_copySymbolsIn.js +16 -0
  407. package/node_modules/lodash-es/_coreJsData.js +6 -0
  408. package/node_modules/lodash-es/_countHolders.js +21 -0
  409. package/node_modules/lodash-es/_createAggregator.js +23 -0
  410. package/node_modules/lodash-es/_createAssigner.js +37 -0
  411. package/node_modules/lodash-es/_createBaseEach.js +32 -0
  412. package/node_modules/lodash-es/_createBaseFor.js +25 -0
  413. package/node_modules/lodash-es/_createBind.js +28 -0
  414. package/node_modules/lodash-es/_createCaseFirst.js +33 -0
  415. package/node_modules/lodash-es/_createCompounder.js +24 -0
  416. package/node_modules/lodash-es/_createCtor.js +37 -0
  417. package/node_modules/lodash-es/_createCurry.js +46 -0
  418. package/node_modules/lodash-es/_createFind.js +25 -0
  419. package/node_modules/lodash-es/_createFlow.js +78 -0
  420. package/node_modules/lodash-es/_createHybrid.js +92 -0
  421. package/node_modules/lodash-es/_createInverter.js +17 -0
  422. package/node_modules/lodash-es/_createMathOperation.js +38 -0
  423. package/node_modules/lodash-es/_createOver.js +27 -0
  424. package/node_modules/lodash-es/_createPadding.js +33 -0
  425. package/node_modules/lodash-es/_createPartial.js +43 -0
  426. package/node_modules/lodash-es/_createRange.js +30 -0
  427. package/node_modules/lodash-es/_createRecurry.js +56 -0
  428. package/node_modules/lodash-es/_createRelationalOperation.js +20 -0
  429. package/node_modules/lodash-es/_createRound.js +35 -0
  430. package/node_modules/lodash-es/_createSet.js +19 -0
  431. package/node_modules/lodash-es/_createToPairs.js +30 -0
  432. package/node_modules/lodash-es/_createWrap.js +106 -0
  433. package/node_modules/lodash-es/_customDefaultsAssignIn.js +29 -0
  434. package/node_modules/lodash-es/_customDefaultsMerge.js +28 -0
  435. package/node_modules/lodash-es/_customOmitClone.js +16 -0
  436. package/node_modules/lodash-es/_deburrLetter.js +71 -0
  437. package/node_modules/lodash-es/_defineProperty.js +11 -0
  438. package/node_modules/lodash-es/_equalArrays.js +84 -0
  439. package/node_modules/lodash-es/_equalByTag.js +112 -0
  440. package/node_modules/lodash-es/_equalObjects.js +90 -0
  441. package/node_modules/lodash-es/_escapeHtmlChar.js +21 -0
  442. package/node_modules/lodash-es/_escapeStringChar.js +22 -0
  443. package/node_modules/lodash-es/_flatRest.js +16 -0
  444. package/node_modules/lodash-es/_freeGlobal.js +4 -0
  445. package/node_modules/lodash-es/_getAllKeys.js +16 -0
  446. package/node_modules/lodash-es/_getAllKeysIn.js +17 -0
  447. package/node_modules/lodash-es/_getData.js +15 -0
  448. package/node_modules/lodash-es/_getFuncName.js +31 -0
  449. package/node_modules/lodash-es/_getHolder.js +13 -0
  450. package/node_modules/lodash-es/_getMapData.js +18 -0
  451. package/node_modules/lodash-es/_getMatchData.js +24 -0
  452. package/node_modules/lodash-es/_getNative.js +17 -0
  453. package/node_modules/lodash-es/_getPrototype.js +6 -0
  454. package/node_modules/lodash-es/_getRawTag.js +46 -0
  455. package/node_modules/lodash-es/_getSymbols.js +30 -0
  456. package/node_modules/lodash-es/_getSymbolsIn.js +25 -0
  457. package/node_modules/lodash-es/_getTag.js +58 -0
  458. package/node_modules/lodash-es/_getValue.js +13 -0
  459. package/node_modules/lodash-es/_getView.js +33 -0
  460. package/node_modules/lodash-es/_getWrapDetails.js +17 -0
  461. package/node_modules/lodash-es/_hasPath.js +39 -0
  462. package/node_modules/lodash-es/_hasUnicode.js +26 -0
  463. package/node_modules/lodash-es/_hasUnicodeWord.js +15 -0
  464. package/node_modules/lodash-es/_hashClear.js +15 -0
  465. package/node_modules/lodash-es/_hashDelete.js +17 -0
  466. package/node_modules/lodash-es/_hashGet.js +30 -0
  467. package/node_modules/lodash-es/_hashHas.js +23 -0
  468. package/node_modules/lodash-es/_hashSet.js +23 -0
  469. package/node_modules/lodash-es/_initCloneArray.js +26 -0
  470. package/node_modules/lodash-es/_initCloneByTag.js +77 -0
  471. package/node_modules/lodash-es/_initCloneObject.js +18 -0
  472. package/node_modules/lodash-es/_insertWrapDetails.js +23 -0
  473. package/node_modules/lodash-es/_isFlattenable.js +20 -0
  474. package/node_modules/lodash-es/_isIndex.js +25 -0
  475. package/node_modules/lodash-es/_isIterateeCall.js +30 -0
  476. package/node_modules/lodash-es/_isKey.js +29 -0
  477. package/node_modules/lodash-es/_isKeyable.js +15 -0
  478. package/node_modules/lodash-es/_isLaziable.js +28 -0
  479. package/node_modules/lodash-es/_isMaskable.js +14 -0
  480. package/node_modules/lodash-es/_isMasked.js +20 -0
  481. package/node_modules/lodash-es/_isPrototype.js +18 -0
  482. package/node_modules/lodash-es/_isStrictComparable.js +15 -0
  483. package/node_modules/lodash-es/_iteratorToArray.js +18 -0
  484. package/node_modules/lodash-es/_lazyClone.js +23 -0
  485. package/node_modules/lodash-es/_lazyReverse.js +23 -0
  486. package/node_modules/lodash-es/_lazyValue.js +69 -0
  487. package/node_modules/lodash-es/_listCacheClear.js +13 -0
  488. package/node_modules/lodash-es/_listCacheDelete.js +35 -0
  489. package/node_modules/lodash-es/_listCacheGet.js +19 -0
  490. package/node_modules/lodash-es/_listCacheHas.js +16 -0
  491. package/node_modules/lodash-es/_listCacheSet.js +26 -0
  492. package/node_modules/lodash-es/_mapCacheClear.js +21 -0
  493. package/node_modules/lodash-es/_mapCacheDelete.js +18 -0
  494. package/node_modules/lodash-es/_mapCacheGet.js +16 -0
  495. package/node_modules/lodash-es/_mapCacheHas.js +16 -0
  496. package/node_modules/lodash-es/_mapCacheSet.js +22 -0
  497. package/node_modules/lodash-es/_mapToArray.js +18 -0
  498. package/node_modules/lodash-es/_matchesStrictComparable.js +20 -0
  499. package/node_modules/lodash-es/_memoizeCapped.js +26 -0
  500. package/node_modules/lodash-es/_mergeData.js +90 -0
  501. package/node_modules/lodash-es/_metaMap.js +6 -0
  502. package/node_modules/lodash-es/_nativeCreate.js +6 -0
  503. package/node_modules/lodash-es/_nativeKeys.js +6 -0
  504. package/node_modules/lodash-es/_nativeKeysIn.js +20 -0
  505. package/node_modules/lodash-es/_nodeUtil.js +30 -0
  506. package/node_modules/lodash-es/_objectToString.js +22 -0
  507. package/node_modules/lodash-es/_overArg.js +15 -0
  508. package/node_modules/lodash-es/_overRest.js +36 -0
  509. package/node_modules/lodash-es/_parent.js +16 -0
  510. package/node_modules/lodash-es/_reEscape.js +4 -0
  511. package/node_modules/lodash-es/_reEvaluate.js +4 -0
  512. package/node_modules/lodash-es/_reInterpolate.js +4 -0
  513. package/node_modules/lodash-es/_realNames.js +4 -0
  514. package/node_modules/lodash-es/_reorder.js +29 -0
  515. package/node_modules/lodash-es/_replaceHolders.js +29 -0
  516. package/node_modules/lodash-es/_root.js +9 -0
  517. package/node_modules/lodash-es/_safeGet.js +21 -0
  518. package/node_modules/lodash-es/_setCacheAdd.js +19 -0
  519. package/node_modules/lodash-es/_setCacheHas.js +14 -0
  520. package/node_modules/lodash-es/_setData.js +20 -0
  521. package/node_modules/lodash-es/_setToArray.js +18 -0
  522. package/node_modules/lodash-es/_setToPairs.js +18 -0
  523. package/node_modules/lodash-es/_setToString.js +14 -0
  524. package/node_modules/lodash-es/_setWrapToString.js +21 -0
  525. package/node_modules/lodash-es/_shortOut.js +37 -0
  526. package/node_modules/lodash-es/_shuffleSelf.js +28 -0
  527. package/node_modules/lodash-es/_stackClear.js +15 -0
  528. package/node_modules/lodash-es/_stackDelete.js +18 -0
  529. package/node_modules/lodash-es/_stackGet.js +14 -0
  530. package/node_modules/lodash-es/_stackHas.js +14 -0
  531. package/node_modules/lodash-es/_stackSet.js +34 -0
  532. package/node_modules/lodash-es/_strictIndexOf.js +23 -0
  533. package/node_modules/lodash-es/_strictLastIndexOf.js +21 -0
  534. package/node_modules/lodash-es/_stringSize.js +18 -0
  535. package/node_modules/lodash-es/_stringToArray.js +18 -0
  536. package/node_modules/lodash-es/_stringToPath.js +27 -0
  537. package/node_modules/lodash-es/_toKey.js +21 -0
  538. package/node_modules/lodash-es/_toSource.js +26 -0
  539. package/node_modules/lodash-es/_trimmedEndIndex.js +19 -0
  540. package/node_modules/lodash-es/_unescapeHtmlChar.js +21 -0
  541. package/node_modules/lodash-es/_unicodeSize.js +44 -0
  542. package/node_modules/lodash-es/_unicodeToArray.js +40 -0
  543. package/node_modules/lodash-es/_unicodeWords.js +69 -0
  544. package/node_modules/lodash-es/_updateWrapDetails.js +46 -0
  545. package/node_modules/lodash-es/_wrapperClone.js +23 -0
  546. package/node_modules/lodash-es/add.js +22 -0
  547. package/node_modules/lodash-es/after.js +42 -0
  548. package/node_modules/lodash-es/array.default.js +81 -0
  549. package/node_modules/lodash-es/array.js +66 -0
  550. package/node_modules/lodash-es/ary.js +29 -0
  551. package/node_modules/lodash-es/assign.js +58 -0
  552. package/node_modules/lodash-es/assignIn.js +40 -0
  553. package/node_modules/lodash-es/assignInWith.js +38 -0
  554. package/node_modules/lodash-es/assignWith.js +37 -0
  555. package/node_modules/lodash-es/at.js +23 -0
  556. package/node_modules/lodash-es/attempt.js +35 -0
  557. package/node_modules/lodash-es/before.js +40 -0
  558. package/node_modules/lodash-es/bind.js +57 -0
  559. package/node_modules/lodash-es/bindAll.js +41 -0
  560. package/node_modules/lodash-es/bindKey.js +68 -0
  561. package/node_modules/lodash-es/camelCase.js +29 -0
  562. package/node_modules/lodash-es/capitalize.js +23 -0
  563. package/node_modules/lodash-es/castArray.js +44 -0
  564. package/node_modules/lodash-es/ceil.js +26 -0
  565. package/node_modules/lodash-es/chain.js +38 -0
  566. package/node_modules/lodash-es/chunk.js +50 -0
  567. package/node_modules/lodash-es/clamp.js +39 -0
  568. package/node_modules/lodash-es/clone.js +36 -0
  569. package/node_modules/lodash-es/cloneDeep.js +29 -0
  570. package/node_modules/lodash-es/cloneDeepWith.js +40 -0
  571. package/node_modules/lodash-es/cloneWith.js +42 -0
  572. package/node_modules/lodash-es/collection.default.js +37 -0
  573. package/node_modules/lodash-es/collection.js +29 -0
  574. package/node_modules/lodash-es/commit.js +33 -0
  575. package/node_modules/lodash-es/compact.js +31 -0
  576. package/node_modules/lodash-es/concat.js +43 -0
  577. package/node_modules/lodash-es/cond.js +60 -0
  578. package/node_modules/lodash-es/conforms.js +35 -0
  579. package/node_modules/lodash-es/conformsTo.js +32 -0
  580. package/node_modules/lodash-es/constant.js +26 -0
  581. package/node_modules/lodash-es/countBy.js +40 -0
  582. package/node_modules/lodash-es/create.js +43 -0
  583. package/node_modules/lodash-es/curry.js +57 -0
  584. package/node_modules/lodash-es/curryRight.js +54 -0
  585. package/node_modules/lodash-es/date.default.js +5 -0
  586. package/node_modules/lodash-es/date.js +2 -0
  587. package/node_modules/lodash-es/debounce.js +191 -0
  588. package/node_modules/lodash-es/deburr.js +45 -0
  589. package/node_modules/lodash-es/defaultTo.js +25 -0
  590. package/node_modules/lodash-es/defaults.js +64 -0
  591. package/node_modules/lodash-es/defaultsDeep.js +30 -0
  592. package/node_modules/lodash-es/defer.js +26 -0
  593. package/node_modules/lodash-es/delay.js +28 -0
  594. package/node_modules/lodash-es/difference.js +33 -0
  595. package/node_modules/lodash-es/differenceBy.js +44 -0
  596. package/node_modules/lodash-es/differenceWith.js +40 -0
  597. package/node_modules/lodash-es/divide.js +22 -0
  598. package/node_modules/lodash-es/drop.js +38 -0
  599. package/node_modules/lodash-es/dropRight.js +39 -0
  600. package/node_modules/lodash-es/dropRightWhile.js +45 -0
  601. package/node_modules/lodash-es/dropWhile.js +45 -0
  602. package/node_modules/lodash-es/each.js +1 -0
  603. package/node_modules/lodash-es/eachRight.js +1 -0
  604. package/node_modules/lodash-es/endsWith.js +43 -0
  605. package/node_modules/lodash-es/entries.js +1 -0
  606. package/node_modules/lodash-es/entriesIn.js +1 -0
  607. package/node_modules/lodash-es/eq.js +37 -0
  608. package/node_modules/lodash-es/escape.js +43 -0
  609. package/node_modules/lodash-es/escapeRegExp.js +32 -0
  610. package/node_modules/lodash-es/every.js +56 -0
  611. package/node_modules/lodash-es/extend.js +1 -0
  612. package/node_modules/lodash-es/extendWith.js +1 -0
  613. package/node_modules/lodash-es/fill.js +45 -0
  614. package/node_modules/lodash-es/filter.js +52 -0
  615. package/node_modules/lodash-es/find.js +42 -0
  616. package/node_modules/lodash-es/findIndex.js +55 -0
  617. package/node_modules/lodash-es/findKey.js +44 -0
  618. package/node_modules/lodash-es/findLast.js +25 -0
  619. package/node_modules/lodash-es/findLastIndex.js +59 -0
  620. package/node_modules/lodash-es/findLastKey.js +44 -0
  621. package/node_modules/lodash-es/first.js +1 -0
  622. package/node_modules/lodash-es/flatMap.js +29 -0
  623. package/node_modules/lodash-es/flatMapDeep.js +31 -0
  624. package/node_modules/lodash-es/flatMapDepth.js +31 -0
  625. package/node_modules/lodash-es/flatten.js +22 -0
  626. package/node_modules/lodash-es/flattenDeep.js +25 -0
  627. package/node_modules/lodash-es/flattenDepth.js +33 -0
  628. package/node_modules/lodash-es/flip.js +28 -0
  629. package/node_modules/lodash-es/floor.js +26 -0
  630. package/node_modules/lodash-es/flow.js +27 -0
  631. package/node_modules/lodash-es/flowRight.js +26 -0
  632. package/node_modules/lodash-es/forEach.js +41 -0
  633. package/node_modules/lodash-es/forEachRight.js +31 -0
  634. package/node_modules/lodash-es/forIn.js +39 -0
  635. package/node_modules/lodash-es/forInRight.js +37 -0
  636. package/node_modules/lodash-es/forOwn.js +36 -0
  637. package/node_modules/lodash-es/forOwnRight.js +34 -0
  638. package/node_modules/lodash-es/fromPairs.js +30 -0
  639. package/node_modules/lodash-es/function.default.js +31 -0
  640. package/node_modules/lodash-es/function.js +24 -0
  641. package/node_modules/lodash-es/functions.js +31 -0
  642. package/node_modules/lodash-es/functionsIn.js +31 -0
  643. package/node_modules/lodash-es/get.js +33 -0
  644. package/node_modules/lodash-es/groupBy.js +41 -0
  645. package/node_modules/lodash-es/gt.js +29 -0
  646. package/node_modules/lodash-es/gte.js +30 -0
  647. package/node_modules/lodash-es/has.js +35 -0
  648. package/node_modules/lodash-es/hasIn.js +34 -0
  649. package/node_modules/lodash-es/head.js +23 -0
  650. package/node_modules/lodash-es/identity.js +21 -0
  651. package/node_modules/lodash-es/inRange.js +55 -0
  652. package/node_modules/lodash-es/includes.js +53 -0
  653. package/node_modules/lodash-es/indexOf.js +42 -0
  654. package/node_modules/lodash-es/initial.js +22 -0
  655. package/node_modules/lodash-es/intersection.js +30 -0
  656. package/node_modules/lodash-es/intersectionBy.js +45 -0
  657. package/node_modules/lodash-es/intersectionWith.js +41 -0
  658. package/node_modules/lodash-es/invert.js +42 -0
  659. package/node_modules/lodash-es/invertBy.js +56 -0
  660. package/node_modules/lodash-es/invoke.js +24 -0
  661. package/node_modules/lodash-es/invokeMap.js +41 -0
  662. package/node_modules/lodash-es/isArguments.js +36 -0
  663. package/node_modules/lodash-es/isArray.js +26 -0
  664. package/node_modules/lodash-es/isArrayBuffer.js +27 -0
  665. package/node_modules/lodash-es/isArrayLike.js +33 -0
  666. package/node_modules/lodash-es/isArrayLikeObject.js +33 -0
  667. package/node_modules/lodash-es/isBoolean.js +29 -0
  668. package/node_modules/lodash-es/isBuffer.js +38 -0
  669. package/node_modules/lodash-es/isDate.js +27 -0
  670. package/node_modules/lodash-es/isElement.js +25 -0
  671. package/node_modules/lodash-es/isEmpty.js +77 -0
  672. package/node_modules/lodash-es/isEqual.js +35 -0
  673. package/node_modules/lodash-es/isEqualWith.js +41 -0
  674. package/node_modules/lodash-es/isError.js +36 -0
  675. package/node_modules/lodash-es/isFinite.js +36 -0
  676. package/node_modules/lodash-es/isFunction.js +37 -0
  677. package/node_modules/lodash-es/isInteger.js +33 -0
  678. package/node_modules/lodash-es/isLength.js +35 -0
  679. package/node_modules/lodash-es/isMap.js +27 -0
  680. package/node_modules/lodash-es/isMatch.js +36 -0
  681. package/node_modules/lodash-es/isMatchWith.js +41 -0
  682. package/node_modules/lodash-es/isNaN.js +38 -0
  683. package/node_modules/lodash-es/isNative.js +40 -0
  684. package/node_modules/lodash-es/isNil.js +25 -0
  685. package/node_modules/lodash-es/isNull.js +22 -0
  686. package/node_modules/lodash-es/isNumber.js +38 -0
  687. package/node_modules/lodash-es/isObject.js +31 -0
  688. package/node_modules/lodash-es/isObjectLike.js +29 -0
  689. package/node_modules/lodash-es/isPlainObject.js +62 -0
  690. package/node_modules/lodash-es/isRegExp.js +27 -0
  691. package/node_modules/lodash-es/isSafeInteger.js +37 -0
  692. package/node_modules/lodash-es/isSet.js +27 -0
  693. package/node_modules/lodash-es/isString.js +30 -0
  694. package/node_modules/lodash-es/isSymbol.js +29 -0
  695. package/node_modules/lodash-es/isTypedArray.js +27 -0
  696. package/node_modules/lodash-es/isUndefined.js +22 -0
  697. package/node_modules/lodash-es/isWeakMap.js +28 -0
  698. package/node_modules/lodash-es/isWeakSet.js +28 -0
  699. package/node_modules/lodash-es/iteratee.js +53 -0
  700. package/node_modules/lodash-es/join.js +26 -0
  701. package/node_modules/lodash-es/kebabCase.js +28 -0
  702. package/node_modules/lodash-es/keyBy.js +36 -0
  703. package/node_modules/lodash-es/keys.js +37 -0
  704. package/node_modules/lodash-es/keysIn.js +32 -0
  705. package/node_modules/lodash-es/lang.default.js +71 -0
  706. package/node_modules/lodash-es/lang.js +57 -0
  707. package/node_modules/lodash-es/last.js +20 -0
  708. package/node_modules/lodash-es/lastIndexOf.js +46 -0
  709. package/node_modules/lodash-es/lodash.default.js +643 -0
  710. package/node_modules/lodash-es/lodash.js +331 -0
  711. package/node_modules/lodash-es/lowerCase.js +27 -0
  712. package/node_modules/lodash-es/lowerFirst.js +22 -0
  713. package/node_modules/lodash-es/lt.js +29 -0
  714. package/node_modules/lodash-es/lte.js +30 -0
  715. package/node_modules/lodash-es/map.js +53 -0
  716. package/node_modules/lodash-es/mapKeys.js +36 -0
  717. package/node_modules/lodash-es/mapValues.js +43 -0
  718. package/node_modules/lodash-es/matches.js +46 -0
  719. package/node_modules/lodash-es/matchesProperty.js +44 -0
  720. package/node_modules/lodash-es/math.default.js +21 -0
  721. package/node_modules/lodash-es/math.js +16 -0
  722. package/node_modules/lodash-es/max.js +29 -0
  723. package/node_modules/lodash-es/maxBy.js +34 -0
  724. package/node_modules/lodash-es/mean.js +22 -0
  725. package/node_modules/lodash-es/meanBy.js +31 -0
  726. package/node_modules/lodash-es/memoize.js +73 -0
  727. package/node_modules/lodash-es/merge.js +39 -0
  728. package/node_modules/lodash-es/mergeWith.js +39 -0
  729. package/node_modules/lodash-es/method.js +34 -0
  730. package/node_modules/lodash-es/methodOf.js +33 -0
  731. package/node_modules/lodash-es/min.js +29 -0
  732. package/node_modules/lodash-es/minBy.js +34 -0
  733. package/node_modules/lodash-es/mixin.js +74 -0
  734. package/node_modules/lodash-es/multiply.js +22 -0
  735. package/node_modules/lodash-es/negate.js +40 -0
  736. package/node_modules/lodash-es/next.js +35 -0
  737. package/node_modules/lodash-es/noop.js +17 -0
  738. package/node_modules/lodash-es/now.js +23 -0
  739. package/node_modules/lodash-es/nth.js +29 -0
  740. package/node_modules/lodash-es/nthArg.js +32 -0
  741. package/node_modules/lodash-es/number.default.js +7 -0
  742. package/node_modules/lodash-es/number.js +4 -0
  743. package/node_modules/lodash-es/object.default.js +60 -0
  744. package/node_modules/lodash-es/object.js +48 -0
  745. package/node_modules/lodash-es/omit.js +57 -0
  746. package/node_modules/lodash-es/omitBy.js +29 -0
  747. package/node_modules/lodash-es/once.js +25 -0
  748. package/node_modules/lodash-es/orderBy.js +47 -0
  749. package/node_modules/lodash-es/over.js +24 -0
  750. package/node_modules/lodash-es/overArgs.js +61 -0
  751. package/node_modules/lodash-es/overEvery.js +34 -0
  752. package/node_modules/lodash-es/overSome.js +37 -0
  753. package/node_modules/lodash-es/package.json +23 -0
  754. package/node_modules/lodash-es/pad.js +49 -0
  755. package/node_modules/lodash-es/padEnd.js +39 -0
  756. package/node_modules/lodash-es/padStart.js +39 -0
  757. package/node_modules/lodash-es/parseInt.js +43 -0
  758. package/node_modules/lodash-es/partial.js +50 -0
  759. package/node_modules/lodash-es/partialRight.js +49 -0
  760. package/node_modules/lodash-es/partition.js +43 -0
  761. package/node_modules/lodash-es/pick.js +25 -0
  762. package/node_modules/lodash-es/pickBy.js +37 -0
  763. package/node_modules/lodash-es/plant.js +48 -0
  764. package/node_modules/lodash-es/property.js +32 -0
  765. package/node_modules/lodash-es/propertyOf.js +30 -0
  766. package/node_modules/lodash-es/pull.js +29 -0
  767. package/node_modules/lodash-es/pullAll.js +29 -0
  768. package/node_modules/lodash-es/pullAllBy.js +33 -0
  769. package/node_modules/lodash-es/pullAllWith.js +32 -0
  770. package/node_modules/lodash-es/pullAt.js +43 -0
  771. package/node_modules/lodash-es/random.js +91 -0
  772. package/node_modules/lodash-es/range.js +46 -0
  773. package/node_modules/lodash-es/rangeRight.js +41 -0
  774. package/node_modules/lodash-es/rearg.js +33 -0
  775. package/node_modules/lodash-es/reduce.js +51 -0
  776. package/node_modules/lodash-es/reduceRight.js +36 -0
  777. package/node_modules/lodash-es/reject.js +46 -0
  778. package/node_modules/lodash-es/remove.js +53 -0
  779. package/node_modules/lodash-es/repeat.js +37 -0
  780. package/node_modules/lodash-es/replace.js +29 -0
  781. package/node_modules/lodash-es/rest.js +40 -0
  782. package/node_modules/lodash-es/result.js +56 -0
  783. package/node_modules/lodash-es/reverse.js +34 -0
  784. package/node_modules/lodash-es/round.js +26 -0
  785. package/node_modules/lodash-es/sample.js +24 -0
  786. package/node_modules/lodash-es/sampleSize.js +37 -0
  787. package/node_modules/lodash-es/seq.default.js +20 -0
  788. package/node_modules/lodash-es/seq.js +15 -0
  789. package/node_modules/lodash-es/set.js +35 -0
  790. package/node_modules/lodash-es/setWith.js +32 -0
  791. package/node_modules/lodash-es/shuffle.js +25 -0
  792. package/node_modules/lodash-es/size.js +46 -0
  793. package/node_modules/lodash-es/slice.js +37 -0
  794. package/node_modules/lodash-es/snakeCase.js +28 -0
  795. package/node_modules/lodash-es/some.js +51 -0
  796. package/node_modules/lodash-es/sortBy.js +48 -0
  797. package/node_modules/lodash-es/sortedIndex.js +24 -0
  798. package/node_modules/lodash-es/sortedIndexBy.js +33 -0
  799. package/node_modules/lodash-es/sortedIndexOf.js +31 -0
  800. package/node_modules/lodash-es/sortedLastIndex.js +25 -0
  801. package/node_modules/lodash-es/sortedLastIndexBy.js +33 -0
  802. package/node_modules/lodash-es/sortedLastIndexOf.js +31 -0
  803. package/node_modules/lodash-es/sortedUniq.js +24 -0
  804. package/node_modules/lodash-es/sortedUniqBy.js +26 -0
  805. package/node_modules/lodash-es/split.js +52 -0
  806. package/node_modules/lodash-es/spread.js +63 -0
  807. package/node_modules/lodash-es/startCase.js +29 -0
  808. package/node_modules/lodash-es/startsWith.js +39 -0
  809. package/node_modules/lodash-es/string.default.js +41 -0
  810. package/node_modules/lodash-es/string.js +32 -0
  811. package/node_modules/lodash-es/stubArray.js +23 -0
  812. package/node_modules/lodash-es/stubFalse.js +18 -0
  813. package/node_modules/lodash-es/stubObject.js +23 -0
  814. package/node_modules/lodash-es/stubString.js +18 -0
  815. package/node_modules/lodash-es/stubTrue.js +18 -0
  816. package/node_modules/lodash-es/subtract.js +22 -0
  817. package/node_modules/lodash-es/sum.js +24 -0
  818. package/node_modules/lodash-es/sumBy.js +33 -0
  819. package/node_modules/lodash-es/tail.js +22 -0
  820. package/node_modules/lodash-es/take.js +37 -0
  821. package/node_modules/lodash-es/takeRight.js +39 -0
  822. package/node_modules/lodash-es/takeRightWhile.js +45 -0
  823. package/node_modules/lodash-es/takeWhile.js +45 -0
  824. package/node_modules/lodash-es/tap.js +29 -0
  825. package/node_modules/lodash-es/template.js +284 -0
  826. package/node_modules/lodash-es/templateSettings.js +71 -0
  827. package/node_modules/lodash-es/throttle.js +69 -0
  828. package/node_modules/lodash-es/thru.js +28 -0
  829. package/node_modules/lodash-es/times.js +51 -0
  830. package/node_modules/lodash-es/toArray.js +58 -0
  831. package/node_modules/lodash-es/toFinite.js +42 -0
  832. package/node_modules/lodash-es/toInteger.js +36 -0
  833. package/node_modules/lodash-es/toIterator.js +23 -0
  834. package/node_modules/lodash-es/toJSON.js +1 -0
  835. package/node_modules/lodash-es/toLength.js +38 -0
  836. package/node_modules/lodash-es/toLower.js +28 -0
  837. package/node_modules/lodash-es/toNumber.js +64 -0
  838. package/node_modules/lodash-es/toPairs.js +30 -0
  839. package/node_modules/lodash-es/toPairsIn.js +30 -0
  840. package/node_modules/lodash-es/toPath.js +33 -0
  841. package/node_modules/lodash-es/toPlainObject.js +32 -0
  842. package/node_modules/lodash-es/toSafeInteger.js +37 -0
  843. package/node_modules/lodash-es/toString.js +28 -0
  844. package/node_modules/lodash-es/toUpper.js +28 -0
  845. package/node_modules/lodash-es/transform.js +65 -0
  846. package/node_modules/lodash-es/trim.js +47 -0
  847. package/node_modules/lodash-es/trimEnd.js +41 -0
  848. package/node_modules/lodash-es/trimStart.js +43 -0
  849. package/node_modules/lodash-es/truncate.js +111 -0
  850. package/node_modules/lodash-es/unary.js +22 -0
  851. package/node_modules/lodash-es/unescape.js +34 -0
  852. package/node_modules/lodash-es/union.js +26 -0
  853. package/node_modules/lodash-es/unionBy.js +39 -0
  854. package/node_modules/lodash-es/unionWith.js +34 -0
  855. package/node_modules/lodash-es/uniq.js +25 -0
  856. package/node_modules/lodash-es/uniqBy.js +31 -0
  857. package/node_modules/lodash-es/uniqWith.js +28 -0
  858. package/node_modules/lodash-es/uniqueId.js +28 -0
  859. package/node_modules/lodash-es/unset.js +34 -0
  860. package/node_modules/lodash-es/unzip.js +45 -0
  861. package/node_modules/lodash-es/unzipWith.js +39 -0
  862. package/node_modules/lodash-es/update.js +35 -0
  863. package/node_modules/lodash-es/updateWith.js +33 -0
  864. package/node_modules/lodash-es/upperCase.js +27 -0
  865. package/node_modules/lodash-es/upperFirst.js +22 -0
  866. package/node_modules/lodash-es/util.default.js +42 -0
  867. package/node_modules/lodash-es/util.js +33 -0
  868. package/node_modules/lodash-es/value.js +1 -0
  869. package/node_modules/lodash-es/valueOf.js +1 -0
  870. package/node_modules/lodash-es/values.js +34 -0
  871. package/node_modules/lodash-es/valuesIn.js +32 -0
  872. package/node_modules/lodash-es/without.js +31 -0
  873. package/node_modules/lodash-es/words.js +35 -0
  874. package/node_modules/lodash-es/wrap.js +30 -0
  875. package/node_modules/lodash-es/wrapperAt.js +48 -0
  876. package/node_modules/lodash-es/wrapperChain.js +34 -0
  877. package/node_modules/lodash-es/wrapperLodash.js +147 -0
  878. package/node_modules/lodash-es/wrapperReverse.js +44 -0
  879. package/node_modules/lodash-es/wrapperValue.js +21 -0
  880. package/node_modules/lodash-es/xor.js +28 -0
  881. package/node_modules/lodash-es/xorBy.js +39 -0
  882. package/node_modules/lodash-es/xorWith.js +34 -0
  883. package/node_modules/lodash-es/zip.js +22 -0
  884. package/node_modules/lodash-es/zipObject.js +24 -0
  885. package/node_modules/lodash-es/zipObjectDeep.js +23 -0
  886. package/node_modules/lodash-es/zipWith.js +32 -0
  887. package/node_modules/lodash.debounce/LICENSE +47 -0
  888. package/node_modules/lodash.debounce/README.md +18 -0
  889. package/node_modules/lodash.debounce/index.js +377 -0
  890. package/node_modules/lodash.debounce/package.json +17 -0
  891. package/node_modules/require-from-string/index.js +34 -0
  892. package/node_modules/require-from-string/license +21 -0
  893. package/node_modules/require-from-string/package.json +28 -0
  894. package/node_modules/require-from-string/readme.md +56 -0
  895. package/node_modules/semver/LICENSE +15 -0
  896. package/node_modules/semver/README.md +665 -0
  897. package/node_modules/semver/bin/semver.js +191 -0
  898. package/node_modules/semver/classes/comparator.js +143 -0
  899. package/node_modules/semver/classes/index.js +7 -0
  900. package/node_modules/semver/classes/range.js +557 -0
  901. package/node_modules/semver/classes/semver.js +333 -0
  902. package/node_modules/semver/functions/clean.js +8 -0
  903. package/node_modules/semver/functions/cmp.js +54 -0
  904. package/node_modules/semver/functions/coerce.js +62 -0
  905. package/node_modules/semver/functions/compare-build.js +9 -0
  906. package/node_modules/semver/functions/compare-loose.js +5 -0
  907. package/node_modules/semver/functions/compare.js +7 -0
  908. package/node_modules/semver/functions/diff.js +60 -0
  909. package/node_modules/semver/functions/eq.js +5 -0
  910. package/node_modules/semver/functions/gt.js +5 -0
  911. package/node_modules/semver/functions/gte.js +5 -0
  912. package/node_modules/semver/functions/inc.js +21 -0
  913. package/node_modules/semver/functions/lt.js +5 -0
  914. package/node_modules/semver/functions/lte.js +5 -0
  915. package/node_modules/semver/functions/major.js +5 -0
  916. package/node_modules/semver/functions/minor.js +5 -0
  917. package/node_modules/semver/functions/neq.js +5 -0
  918. package/node_modules/semver/functions/parse.js +18 -0
  919. package/node_modules/semver/functions/patch.js +5 -0
  920. package/node_modules/semver/functions/prerelease.js +8 -0
  921. package/node_modules/semver/functions/rcompare.js +5 -0
  922. package/node_modules/semver/functions/rsort.js +5 -0
  923. package/node_modules/semver/functions/satisfies.js +12 -0
  924. package/node_modules/semver/functions/sort.js +5 -0
  925. package/node_modules/semver/functions/valid.js +8 -0
  926. package/node_modules/semver/index.js +91 -0
  927. package/node_modules/semver/internal/constants.js +37 -0
  928. package/node_modules/semver/internal/debug.js +11 -0
  929. package/node_modules/semver/internal/identifiers.js +29 -0
  930. package/node_modules/semver/internal/lrucache.js +42 -0
  931. package/node_modules/semver/internal/parse-options.js +17 -0
  932. package/node_modules/semver/internal/re.js +223 -0
  933. package/node_modules/semver/package.json +78 -0
  934. package/node_modules/semver/preload.js +4 -0
  935. package/node_modules/semver/range.bnf +16 -0
  936. package/node_modules/semver/ranges/gtr.js +6 -0
  937. package/node_modules/semver/ranges/intersects.js +9 -0
  938. package/node_modules/semver/ranges/ltr.js +6 -0
  939. package/node_modules/semver/ranges/max-satisfying.js +27 -0
  940. package/node_modules/semver/ranges/min-satisfying.js +26 -0
  941. package/node_modules/semver/ranges/min-version.js +63 -0
  942. package/node_modules/semver/ranges/outside.js +82 -0
  943. package/node_modules/semver/ranges/simplify.js +49 -0
  944. package/node_modules/semver/ranges/subset.js +249 -0
  945. package/node_modules/semver/ranges/to-comparators.js +10 -0
  946. package/node_modules/semver/ranges/valid.js +13 -0
  947. package/node_modules/signal-exit/LICENSE.txt +16 -0
  948. package/node_modules/signal-exit/README.md +74 -0
  949. package/node_modules/signal-exit/dist/cjs/browser.d.ts +12 -0
  950. package/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
  951. package/node_modules/signal-exit/dist/cjs/browser.js +10 -0
  952. package/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
  953. package/node_modules/signal-exit/dist/cjs/index.d.ts +48 -0
  954. package/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
  955. package/node_modules/signal-exit/dist/cjs/index.js +279 -0
  956. package/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
  957. package/node_modules/signal-exit/dist/cjs/package.json +3 -0
  958. package/node_modules/signal-exit/dist/cjs/signals.d.ts +29 -0
  959. package/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
  960. package/node_modules/signal-exit/dist/cjs/signals.js +42 -0
  961. package/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
  962. package/node_modules/signal-exit/dist/mjs/browser.d.ts +12 -0
  963. package/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
  964. package/node_modules/signal-exit/dist/mjs/browser.js +4 -0
  965. package/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
  966. package/node_modules/signal-exit/dist/mjs/index.d.ts +48 -0
  967. package/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
  968. package/node_modules/signal-exit/dist/mjs/index.js +275 -0
  969. package/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
  970. package/node_modules/signal-exit/dist/mjs/package.json +3 -0
  971. package/node_modules/signal-exit/dist/mjs/signals.d.ts +29 -0
  972. package/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
  973. package/node_modules/signal-exit/dist/mjs/signals.js +39 -0
  974. package/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
  975. package/node_modules/signal-exit/package.json +106 -0
  976. package/node_modules/slice-ansi/index.d.ts +19 -0
  977. package/node_modules/slice-ansi/index.js +169 -0
  978. package/node_modules/slice-ansi/license +10 -0
  979. package/node_modules/slice-ansi/package.json +58 -0
  980. package/node_modules/slice-ansi/readme.md +54 -0
  981. package/node_modules/stack-utils/LICENSE.md +21 -0
  982. package/node_modules/stack-utils/index.js +344 -0
  983. package/node_modules/stack-utils/package.json +39 -0
  984. package/node_modules/stack-utils/readme.md +143 -0
  985. package/node_modules/string-width/index.d.ts +39 -0
  986. package/node_modules/string-width/index.js +82 -0
  987. package/node_modules/string-width/license +9 -0
  988. package/node_modules/string-width/package.json +64 -0
  989. package/node_modules/string-width/readme.md +66 -0
  990. package/node_modules/strip-ansi/index.d.ts +15 -0
  991. package/node_modules/strip-ansi/index.js +19 -0
  992. package/node_modules/strip-ansi/license +9 -0
  993. package/node_modules/strip-ansi/package.json +59 -0
  994. package/node_modules/strip-ansi/readme.md +37 -0
  995. package/node_modules/supports-hyperlinks/browser.js +10 -0
  996. package/node_modules/supports-hyperlinks/index.d.ts +25 -0
  997. package/node_modules/supports-hyperlinks/index.js +157 -0
  998. package/node_modules/supports-hyperlinks/license +10 -0
  999. package/node_modules/supports-hyperlinks/node_modules/has-flag/index.d.ts +39 -0
  1000. package/node_modules/supports-hyperlinks/node_modules/has-flag/index.js +8 -0
  1001. package/node_modules/supports-hyperlinks/node_modules/has-flag/license +9 -0
  1002. package/node_modules/supports-hyperlinks/node_modules/has-flag/package.json +49 -0
  1003. package/node_modules/supports-hyperlinks/node_modules/has-flag/readme.md +74 -0
  1004. package/node_modules/supports-hyperlinks/node_modules/supports-color/browser.d.ts +1 -0
  1005. package/node_modules/supports-hyperlinks/node_modules/supports-color/browser.js +35 -0
  1006. package/node_modules/supports-hyperlinks/node_modules/supports-color/index.d.ts +55 -0
  1007. package/node_modules/supports-hyperlinks/node_modules/supports-color/index.js +202 -0
  1008. package/node_modules/supports-hyperlinks/node_modules/supports-color/license +9 -0
  1009. package/node_modules/supports-hyperlinks/node_modules/supports-color/package.json +64 -0
  1010. package/node_modules/supports-hyperlinks/node_modules/supports-color/readme.md +75 -0
  1011. package/node_modules/supports-hyperlinks/package.json +47 -0
  1012. package/node_modules/supports-hyperlinks/readme.md +39 -0
  1013. package/node_modules/tagged-tag/index.d.ts +3 -0
  1014. package/node_modules/tagged-tag/license +9 -0
  1015. package/node_modules/tagged-tag/package.json +36 -0
  1016. package/node_modules/tagged-tag/readme.md +5 -0
  1017. package/node_modules/type-fest/index.d.ts +221 -0
  1018. package/node_modules/type-fest/license-cc0 +121 -0
  1019. package/node_modules/type-fest/license-mit +9 -0
  1020. package/node_modules/type-fest/package.json +75 -0
  1021. package/node_modules/type-fest/readme.md +1077 -0
  1022. package/node_modules/type-fest/source/absolute.d.ts +52 -0
  1023. package/node_modules/type-fest/source/all-extend.d.ts +119 -0
  1024. package/node_modules/type-fest/source/all-union-fields.d.ts +91 -0
  1025. package/node_modules/type-fest/source/and-all.d.ts +76 -0
  1026. package/node_modules/type-fest/source/and.d.ts +82 -0
  1027. package/node_modules/type-fest/source/array-element.d.ts +46 -0
  1028. package/node_modules/type-fest/source/array-indices.d.ts +25 -0
  1029. package/node_modules/type-fest/source/array-length.d.ts +36 -0
  1030. package/node_modules/type-fest/source/array-reverse.d.ts +84 -0
  1031. package/node_modules/type-fest/source/array-slice.d.ts +132 -0
  1032. package/node_modules/type-fest/source/array-splice.d.ts +104 -0
  1033. package/node_modules/type-fest/source/array-tail.d.ts +70 -0
  1034. package/node_modules/type-fest/source/array-values.d.ts +24 -0
  1035. package/node_modules/type-fest/source/arrayable.d.ts +31 -0
  1036. package/node_modules/type-fest/source/async-return-type.d.ts +28 -0
  1037. package/node_modules/type-fest/source/asyncify.d.ts +25 -0
  1038. package/node_modules/type-fest/source/basic.d.ts +38 -0
  1039. package/node_modules/type-fest/source/camel-case.d.ts +125 -0
  1040. package/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +106 -0
  1041. package/node_modules/type-fest/source/camel-cased-properties.d.ts +49 -0
  1042. package/node_modules/type-fest/source/characters.d.ts +67 -0
  1043. package/node_modules/type-fest/source/conditional-except.d.ts +47 -0
  1044. package/node_modules/type-fest/source/conditional-keys.d.ts +63 -0
  1045. package/node_modules/type-fest/source/conditional-pick-deep.d.ts +122 -0
  1046. package/node_modules/type-fest/source/conditional-pick.d.ts +48 -0
  1047. package/node_modules/type-fest/source/conditional-simplify-deep.d.ts +73 -0
  1048. package/node_modules/type-fest/source/conditional-simplify.d.ts +50 -0
  1049. package/node_modules/type-fest/source/delimiter-case.d.ts +78 -0
  1050. package/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +115 -0
  1051. package/node_modules/type-fest/source/delimiter-cased-properties.d.ts +52 -0
  1052. package/node_modules/type-fest/source/distributed-omit.d.ts +96 -0
  1053. package/node_modules/type-fest/source/distributed-pick.d.ts +92 -0
  1054. package/node_modules/type-fest/source/empty-object.d.ts +51 -0
  1055. package/node_modules/type-fest/source/entries.d.ts +64 -0
  1056. package/node_modules/type-fest/source/entry.d.ts +67 -0
  1057. package/node_modules/type-fest/source/exact.d.ts +73 -0
  1058. package/node_modules/type-fest/source/except.d.ts +112 -0
  1059. package/node_modules/type-fest/source/exclude-exactly.d.ts +57 -0
  1060. package/node_modules/type-fest/source/exclude-rest-element.d.ts +40 -0
  1061. package/node_modules/type-fest/source/exclude-strict.d.ts +51 -0
  1062. package/node_modules/type-fest/source/exclusify-union.d.ts +147 -0
  1063. package/node_modules/type-fest/source/extends-strict.d.ts +44 -0
  1064. package/node_modules/type-fest/source/extract-rest-element.d.ts +30 -0
  1065. package/node_modules/type-fest/source/extract-strict.d.ts +51 -0
  1066. package/node_modules/type-fest/source/find-global-type.d.ts +68 -0
  1067. package/node_modules/type-fest/source/fixed-length-array.d.ts +97 -0
  1068. package/node_modules/type-fest/source/get.d.ts +227 -0
  1069. package/node_modules/type-fest/source/global-this.d.ts +24 -0
  1070. package/node_modules/type-fest/source/globals/index.d.ts +3 -0
  1071. package/node_modules/type-fest/source/globals/observable-like.d.ts +78 -0
  1072. package/node_modules/type-fest/source/greater-than-or-equal.d.ts +63 -0
  1073. package/node_modules/type-fest/source/greater-than.d.ts +92 -0
  1074. package/node_modules/type-fest/source/has-optional-keys.d.ts +23 -0
  1075. package/node_modules/type-fest/source/has-readonly-keys.d.ts +23 -0
  1076. package/node_modules/type-fest/source/has-required-keys.d.ts +61 -0
  1077. package/node_modules/type-fest/source/has-writable-keys.d.ts +23 -0
  1078. package/node_modules/type-fest/source/if-any.d.ts +28 -0
  1079. package/node_modules/type-fest/source/if-empty-object.d.ts +30 -0
  1080. package/node_modules/type-fest/source/if-never.d.ts +28 -0
  1081. package/node_modules/type-fest/source/if-null.d.ts +28 -0
  1082. package/node_modules/type-fest/source/if-unknown.d.ts +28 -0
  1083. package/node_modules/type-fest/source/if.d.ts +102 -0
  1084. package/node_modules/type-fest/source/includes.d.ts +24 -0
  1085. package/node_modules/type-fest/source/int-closed-range.d.ts +45 -0
  1086. package/node_modules/type-fest/source/int-range.d.ts +67 -0
  1087. package/node_modules/type-fest/source/internal/array.d.ts +144 -0
  1088. package/node_modules/type-fest/source/internal/characters.d.ts +65 -0
  1089. package/node_modules/type-fest/source/internal/enforce-optional.d.ts +49 -0
  1090. package/node_modules/type-fest/source/internal/index.d.ts +11 -0
  1091. package/node_modules/type-fest/source/internal/keys.d.ts +100 -0
  1092. package/node_modules/type-fest/source/internal/numeric.d.ts +141 -0
  1093. package/node_modules/type-fest/source/internal/object.d.ts +292 -0
  1094. package/node_modules/type-fest/source/internal/string.d.ts +202 -0
  1095. package/node_modules/type-fest/source/internal/tuple.d.ts +79 -0
  1096. package/node_modules/type-fest/source/internal/type.d.ts +165 -0
  1097. package/node_modules/type-fest/source/invariant-of.d.ts +85 -0
  1098. package/node_modules/type-fest/source/is-any.d.ts +31 -0
  1099. package/node_modules/type-fest/source/is-equal.d.ts +41 -0
  1100. package/node_modules/type-fest/source/is-float.d.ts +43 -0
  1101. package/node_modules/type-fest/source/is-integer.d.ts +60 -0
  1102. package/node_modules/type-fest/source/is-literal.d.ts +315 -0
  1103. package/node_modules/type-fest/source/is-lowercase.d.ts +38 -0
  1104. package/node_modules/type-fest/source/is-never.d.ts +56 -0
  1105. package/node_modules/type-fest/source/is-null.d.ts +22 -0
  1106. package/node_modules/type-fest/source/is-nullable.d.ts +30 -0
  1107. package/node_modules/type-fest/source/is-optional-key-of.d.ts +51 -0
  1108. package/node_modules/type-fest/source/is-optional.d.ts +28 -0
  1109. package/node_modules/type-fest/source/is-readonly-key-of.d.ts +55 -0
  1110. package/node_modules/type-fest/source/is-required-key-of.d.ts +51 -0
  1111. package/node_modules/type-fest/source/is-tuple.d.ts +92 -0
  1112. package/node_modules/type-fest/source/is-undefined.d.ts +22 -0
  1113. package/node_modules/type-fest/source/is-union.d.ts +40 -0
  1114. package/node_modules/type-fest/source/is-unknown.d.ts +43 -0
  1115. package/node_modules/type-fest/source/is-uppercase.d.ts +38 -0
  1116. package/node_modules/type-fest/source/is-writable-key-of.d.ts +51 -0
  1117. package/node_modules/type-fest/source/iterable-element.d.ts +66 -0
  1118. package/node_modules/type-fest/source/join.d.ts +79 -0
  1119. package/node_modules/type-fest/source/json-value.d.ts +33 -0
  1120. package/node_modules/type-fest/source/jsonifiable.d.ts +37 -0
  1121. package/node_modules/type-fest/source/jsonify.d.ts +127 -0
  1122. package/node_modules/type-fest/source/kebab-case.d.ts +47 -0
  1123. package/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +72 -0
  1124. package/node_modules/type-fest/source/kebab-cased-properties.d.ts +46 -0
  1125. package/node_modules/type-fest/source/key-as-string.d.ts +27 -0
  1126. package/node_modules/type-fest/source/keys-of-union.d.ts +44 -0
  1127. package/node_modules/type-fest/source/last-array-element.d.ts +36 -0
  1128. package/node_modules/type-fest/source/less-than-or-equal.d.ts +60 -0
  1129. package/node_modules/type-fest/source/less-than.d.ts +60 -0
  1130. package/node_modules/type-fest/source/literal-to-primitive-deep.d.ts +71 -0
  1131. package/node_modules/type-fest/source/literal-to-primitive.d.ts +38 -0
  1132. package/node_modules/type-fest/source/literal-union.d.ts +39 -0
  1133. package/node_modules/type-fest/source/merge-deep.d.ts +495 -0
  1134. package/node_modules/type-fest/source/merge-exclusive.d.ts +45 -0
  1135. package/node_modules/type-fest/source/merge.d.ts +87 -0
  1136. package/node_modules/type-fest/source/multidimensional-array.d.ts +38 -0
  1137. package/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +38 -0
  1138. package/node_modules/type-fest/source/non-empty-object.d.ts +38 -0
  1139. package/node_modules/type-fest/source/non-empty-string.d.ts +32 -0
  1140. package/node_modules/type-fest/source/non-empty-tuple.d.ts +24 -0
  1141. package/node_modules/type-fest/source/non-nullable-deep.d.ts +102 -0
  1142. package/node_modules/type-fest/source/numeric.d.ts +226 -0
  1143. package/node_modules/type-fest/source/object-merge.d.ts +194 -0
  1144. package/node_modules/type-fest/source/omit-deep.d.ts +153 -0
  1145. package/node_modules/type-fest/source/omit-index-signature.d.ts +98 -0
  1146. package/node_modules/type-fest/source/opaque.d.ts +3 -0
  1147. package/node_modules/type-fest/source/optional-keys-of.d.ts +46 -0
  1148. package/node_modules/type-fest/source/optional.d.ts +31 -0
  1149. package/node_modules/type-fest/source/or-all.d.ts +73 -0
  1150. package/node_modules/type-fest/source/or.d.ts +82 -0
  1151. package/node_modules/type-fest/source/override-properties.d.ts +43 -0
  1152. package/node_modules/type-fest/source/package-json.d.ts +710 -0
  1153. package/node_modules/type-fest/source/partial-deep.d.ts +157 -0
  1154. package/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +81 -0
  1155. package/node_modules/type-fest/source/pascal-case.d.ts +52 -0
  1156. package/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +79 -0
  1157. package/node_modules/type-fest/source/pascal-cased-properties.d.ts +46 -0
  1158. package/node_modules/type-fest/source/paths.d.ts +241 -0
  1159. package/node_modules/type-fest/source/pick-deep.d.ts +139 -0
  1160. package/node_modules/type-fest/source/pick-index-signature.d.ts +52 -0
  1161. package/node_modules/type-fest/source/primitive.d.ts +15 -0
  1162. package/node_modules/type-fest/source/promisable.d.ts +27 -0
  1163. package/node_modules/type-fest/source/readonly-deep.d.ts +118 -0
  1164. package/node_modules/type-fest/source/readonly-keys-of.d.ts +38 -0
  1165. package/node_modules/type-fest/source/readonly-tuple.d.ts +34 -0
  1166. package/node_modules/type-fest/source/remove-prefix.d.ts +132 -0
  1167. package/node_modules/type-fest/source/replace.d.ts +87 -0
  1168. package/node_modules/type-fest/source/require-all-or-none.d.ts +54 -0
  1169. package/node_modules/type-fest/source/require-at-least-one.d.ts +48 -0
  1170. package/node_modules/type-fest/source/require-exactly-one.d.ts +48 -0
  1171. package/node_modules/type-fest/source/require-one-or-none.d.ts +49 -0
  1172. package/node_modules/type-fest/source/required-deep.d.ts +78 -0
  1173. package/node_modules/type-fest/source/required-keys-of.d.ts +38 -0
  1174. package/node_modules/type-fest/source/schema.d.ts +119 -0
  1175. package/node_modules/type-fest/source/screaming-snake-case.d.ts +31 -0
  1176. package/node_modules/type-fest/source/set-field-type.d.ts +67 -0
  1177. package/node_modules/type-fest/source/set-non-nullable-deep.d.ts +88 -0
  1178. package/node_modules/type-fest/source/set-non-nullable.d.ts +34 -0
  1179. package/node_modules/type-fest/source/set-optional.d.ts +42 -0
  1180. package/node_modules/type-fest/source/set-parameter-type.d.ts +125 -0
  1181. package/node_modules/type-fest/source/set-readonly.d.ts +40 -0
  1182. package/node_modules/type-fest/source/set-required-deep.d.ts +64 -0
  1183. package/node_modules/type-fest/source/set-required.d.ts +75 -0
  1184. package/node_modules/type-fest/source/set-return-type.d.ts +31 -0
  1185. package/node_modules/type-fest/source/shared-union-fields-deep.d.ts +180 -0
  1186. package/node_modules/type-fest/source/shared-union-fields.d.ts +79 -0
  1187. package/node_modules/type-fest/source/simplify-deep.d.ts +117 -0
  1188. package/node_modules/type-fest/source/simplify.d.ts +61 -0
  1189. package/node_modules/type-fest/source/single-key-object.d.ts +28 -0
  1190. package/node_modules/type-fest/source/snake-case.d.ts +48 -0
  1191. package/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +72 -0
  1192. package/node_modules/type-fest/source/snake-cased-properties.d.ts +46 -0
  1193. package/node_modules/type-fest/source/some-extend.d.ts +113 -0
  1194. package/node_modules/type-fest/source/split-on-rest-element.d.ts +106 -0
  1195. package/node_modules/type-fest/source/split.d.ts +90 -0
  1196. package/node_modules/type-fest/source/spread.d.ts +78 -0
  1197. package/node_modules/type-fest/source/string-repeat.d.ts +49 -0
  1198. package/node_modules/type-fest/source/string-slice.d.ts +39 -0
  1199. package/node_modules/type-fest/source/stringified.d.ts +25 -0
  1200. package/node_modules/type-fest/source/structured-cloneable.d.ts +89 -0
  1201. package/node_modules/type-fest/source/subtract.d.ts +87 -0
  1202. package/node_modules/type-fest/source/sum.d.ts +82 -0
  1203. package/node_modules/type-fest/source/tagged-union.d.ts +53 -0
  1204. package/node_modules/type-fest/source/tagged.d.ts +261 -0
  1205. package/node_modules/type-fest/source/trim.d.ts +29 -0
  1206. package/node_modules/type-fest/source/tsconfig-json.d.ts +1356 -0
  1207. package/node_modules/type-fest/source/tuple-of.d.ts +80 -0
  1208. package/node_modules/type-fest/source/tuple-to-object.d.ts +47 -0
  1209. package/node_modules/type-fest/source/tuple-to-union.d.ts +54 -0
  1210. package/node_modules/type-fest/source/typed-array.d.ts +19 -0
  1211. package/node_modules/type-fest/source/undefined-on-partial-deep.d.ts +83 -0
  1212. package/node_modules/type-fest/source/union-length.d.ts +27 -0
  1213. package/node_modules/type-fest/source/union-member.d.ts +65 -0
  1214. package/node_modules/type-fest/source/union-to-intersection.d.ts +35 -0
  1215. package/node_modules/type-fest/source/union-to-tuple.d.ts +49 -0
  1216. package/node_modules/type-fest/source/unknown-array.d.ts +27 -0
  1217. package/node_modules/type-fest/source/unknown-map.d.ts +26 -0
  1218. package/node_modules/type-fest/source/unknown-record.d.ts +33 -0
  1219. package/node_modules/type-fest/source/unknown-set.d.ts +26 -0
  1220. package/node_modules/type-fest/source/unwrap-partial.d.ts +33 -0
  1221. package/node_modules/type-fest/source/value-of.d.ts +24 -0
  1222. package/node_modules/type-fest/source/words.d.ts +148 -0
  1223. package/node_modules/type-fest/source/writable-deep.d.ts +84 -0
  1224. package/node_modules/type-fest/source/writable-keys-of.d.ts +34 -0
  1225. package/node_modules/type-fest/source/writable.d.ts +68 -0
  1226. package/node_modules/type-fest/source/xor.d.ts +83 -0
  1227. package/node_modules/usehooks-ts/LICENSE +22 -0
  1228. package/node_modules/usehooks-ts/README.md +473 -0
  1229. package/node_modules/usehooks-ts/dist/index.cjs +1084 -0
  1230. package/node_modules/usehooks-ts/dist/index.d.cts +953 -0
  1231. package/node_modules/usehooks-ts/dist/index.d.ts +953 -0
  1232. package/node_modules/usehooks-ts/dist/index.js +1046 -0
  1233. package/node_modules/usehooks-ts/package.json +74 -0
  1234. package/node_modules/wrap-ansi/index.d.ts +41 -0
  1235. package/node_modules/wrap-ansi/index.js +222 -0
  1236. package/node_modules/wrap-ansi/license +9 -0
  1237. package/node_modules/wrap-ansi/package.json +69 -0
  1238. package/node_modules/wrap-ansi/readme.md +75 -0
  1239. package/package.json +3 -2
@@ -0,0 +1,1477 @@
1
+
2
+ import indentString from 'indent-string'
3
+ import { applyTextStyles } from './colorize.js'
4
+ import type { DOMElement } from './dom.js'
5
+ import getMaxWidth from './get-max-width.js'
6
+ import type { Rectangle } from './layout/geometry.js'
7
+ import { LayoutDisplay, LayoutEdge, type LayoutNode } from './layout/node.js'
8
+ import { nodeCache, pendingClears } from './node-cache.js'
9
+ import type Output from './output.js'
10
+ import renderBorder from './render-border.js'
11
+ import type { Screen } from './screen.js'
12
+ import {
13
+ type StyledSegment,
14
+ squashTextNodesToSegments,
15
+ } from './squash-text-nodes.js'
16
+ import type { Color } from './styles.js'
17
+ import { isXtermJs } from './terminal.js'
18
+ import { widestLine } from './widest-line.js'
19
+ import wrapText from './wrap-text.js'
20
+
21
+ // Must match `detectXtermJsWheel()` in `ScrollKeybindingHandler.tsx` —
22
+ // the scroll curve and the drain logic both make decisions from this
23
+ // flag, and any disagreement produces visible glitches at the scroll
24
+ // boundary. `TERM_PROGRAM === 'vscode'` is the synchronous fallback we
25
+ // can answer with at module load; once `isXtermJs()` returns a real
26
+ // answer from the XTVERSION probe, that wins.
27
+ function isXtermJsHost(): boolean {
28
+ return process.env.TERM_PROGRAM === 'vscode' || isXtermJs()
29
+ }
30
+
31
+ // Per-frame scratch flag. Set whenever a node's Yoga position or size
32
+ // differs from the cached values, or when a child was removed. Read by
33
+ // `ink.tsx` to decide whether this frame needs the full-damage
34
+ // sledgehammer (every cell forced through diff) or whether we can keep
35
+ // the narrow damage bounds.
36
+ //
37
+ // This applies in both alt-screen and main-screen modes. Most idle
38
+ // frames (spinner tick, clock tick, an append into a fixed-height box)
39
+ // do not shift any layout, so the flag stays false and diff stays
40
+ // O(changed cells) instead of degrading to O(rows × cols).
41
+ let layoutShifted = false
42
+
43
+ export function resetLayoutShifted(): void {
44
+ layoutShifted = false
45
+ }
46
+
47
+ export function didLayoutShift(): boolean {
48
+ return layoutShifted
49
+ }
50
+
51
+ // DECSTBM fast-path hint. When a ScrollBox is the only thing that
52
+ // changed between frames — its `scrollTop` moved but no surrounding
53
+ // layout shifted — `log-update.ts` can express the difference as a
54
+ // hardware scroll (DECSTBM + `CSI n S` or `CSI n T`) instead of
55
+ // re-emitting every row in the viewport.
56
+ //
57
+ // `top`/`bottom` are 0-indexed inclusive screen rows; `delta > 0` means
58
+ // content moved up (`scrollTop` increased, the wire op is `CSI n S`).
59
+ export type ScrollHint = { top: number; bottom: number; delta: number }
60
+ let scrollHint: ScrollHint | null = null
61
+
62
+ // Rectangles of position:absolute nodes recorded in the *previous*
63
+ // frame. Consumed by ScrollBox's blit+shift third-pass repair (see
64
+ // usage site for the full algorithm). Rectangles are captured from
65
+ // three different code paths — the full-render nodeCache.set, the
66
+ // node-level blit early-return, and `blitEscapingAbsoluteDescendants`
67
+ // — so consecutive scrolls that re-use the clean overlay still find
68
+ // the rect on the next frame.
69
+ let absoluteRectsPrev: Rectangle[] = []
70
+ let absoluteRectsCur: Rectangle[] = []
71
+
72
+ export function resetScrollHint(): void {
73
+ scrollHint = null
74
+ absoluteRectsPrev = absoluteRectsCur
75
+ absoluteRectsCur = []
76
+ }
77
+
78
+ export function getScrollHint(): ScrollHint | null {
79
+ return scrollHint
80
+ }
81
+
82
+ // ScrollBox node (at most one) that still has `pendingScrollDelta`
83
+ // after this frame's drain step. `renderer.ts` calls `markDirty` on it
84
+ // post-render so the next frame's root-level blit short-circuit fails
85
+ // and the recursion is forced to descend through the scrollbox again
86
+ // to keep draining. Without this hand-off the dirty flag clears
87
+ // internally, the next frame blits the root, the scrollbox is never
88
+ // visited, and the drain animation stalls mid-animation.
89
+ let scrollDrainNode: DOMElement | null = null
90
+
91
+ export function resetScrollDrainNode(): void {
92
+ scrollDrainNode = null
93
+ }
94
+
95
+ export function getScrollDrainNode(): DOMElement | null {
96
+ return scrollDrainNode
97
+ }
98
+
99
+ // Follow-scroll event raised when streaming content pushes the
100
+ // viewport past its bottom. The ScrollBox records the row delta and
101
+ // viewport bounds; `ink.tsx` consumes it after render to translate any
102
+ // active text selection by `-delta`. The translation keeps the
103
+ // highlight glued to the underlying text rather than to fixed screen
104
+ // coordinates, matching how a native terminal's selection walks up the
105
+ // screen as content scrolls and eventually clips at the top.
106
+ //
107
+ // At the moment of consumption, `frontFrame` still holds the old screen
108
+ // content. `captureScrolledRows` reads from it before the front/back
109
+ // swap, which is how scrolled-off text remains available for copy.
110
+ export type FollowScroll = {
111
+ delta: number
112
+ viewportTop: number
113
+ viewportBottom: number
114
+ }
115
+ let followScroll: FollowScroll | null = null
116
+
117
+ export function consumeFollowScroll(): FollowScroll | null {
118
+ const f = followScroll
119
+ followScroll = null
120
+ return f
121
+ }
122
+
123
+ // ── Native terminal drain (iTerm2, Ghostty, … — proportional wheels) ──
124
+ // Minimum rows applied per frame. Anything above this floor uses a
125
+ // proportional rate (~3/4 of the remaining delta), which makes large
126
+ // bursts catch up in log₄ frames while the tail decelerates smoothly.
127
+ // The hard cap is `innerHeight - 1` so the DECSTBM scroll hint can
128
+ // still fire on the same frame.
129
+ const SCROLL_MIN_PER_FRAME = 4
130
+
131
+ // ── xterm.js (VS Code) smooth drain ──
132
+ // xterm.js fires very small wheel deltas in rapid succession, so we
133
+ // shape the drain rate by pending size:
134
+ // - ≤ INSTANT (5): drain the whole pending in one frame. A slow wheel
135
+ // click should produce one visible jump, not five one-row stutters.
136
+ // - INSTANT < pending < HIGH: small fixed step (`SCROLL_STEP_MED`) so
137
+ // the catch-up animation feels smooth rather than jumpy.
138
+ // - ≥ HIGH (12): faster step (`SCROLL_STEP_HIGH`) for sustained flicks.
139
+ // Anything beyond the cap snaps the excess in one go.
140
+ const SCROLL_INSTANT_THRESHOLD = 5 // ≤ this: drain all at once
141
+ const SCROLL_HIGH_PENDING = 12 // threshold for HIGH step
142
+ const SCROLL_STEP_MED = 2 // pending (INSTANT, HIGH): catch-up
143
+ const SCROLL_STEP_HIGH = 3 // pending ≥ HIGH: fast flick
144
+ const SCROLL_MAX_PENDING = 30 // snap excess beyond this
145
+
146
+ // xterm.js adaptive drain. Returns rows applied; mutates pendingScrollDelta.
147
+ function drainAdaptive(
148
+ node: DOMElement,
149
+ pending: number,
150
+ innerHeight: number,
151
+ ): number {
152
+ const sign = pending > 0 ? 1 : -1
153
+ let abs = Math.abs(pending)
154
+ let applied = 0
155
+ // Snap excess beyond animation window so big flicks don't coast.
156
+ if (abs > SCROLL_MAX_PENDING) {
157
+ applied += sign * (abs - SCROLL_MAX_PENDING)
158
+ abs = SCROLL_MAX_PENDING
159
+ }
160
+ // ≤5: drain all (slow click = instant). Above: small fixed step.
161
+ const step =
162
+ abs <= SCROLL_INSTANT_THRESHOLD
163
+ ? abs
164
+ : abs < SCROLL_HIGH_PENDING
165
+ ? SCROLL_STEP_MED
166
+ : SCROLL_STEP_HIGH
167
+ applied += sign * step
168
+ const rem = abs - step
169
+ // Cap total at innerHeight-1 so DECSTBM blit+shift fast path fires
170
+ // (matches drainProportional). Excess stays in pendingScrollDelta.
171
+ const cap = Math.max(1, innerHeight - 1)
172
+ const totalAbs = Math.abs(applied)
173
+ if (totalAbs > cap) {
174
+ const excess = totalAbs - cap
175
+ node.pendingScrollDelta = sign * (rem + excess)
176
+ return sign * cap
177
+ }
178
+ node.pendingScrollDelta = rem > 0 ? sign * rem : undefined
179
+ return applied
180
+ }
181
+
182
+ // Native proportional drain. step = max(MIN, floor(abs*3/4)), capped at
183
+ // innerHeight-1 so DECSTBM + blit+shift fast path fire.
184
+ function drainProportional(
185
+ node: DOMElement,
186
+ pending: number,
187
+ innerHeight: number,
188
+ ): number {
189
+ const abs = Math.abs(pending)
190
+ const cap = Math.max(1, innerHeight - 1)
191
+ const step = Math.min(cap, Math.max(SCROLL_MIN_PER_FRAME, (abs * 3) >> 2))
192
+ if (abs <= step) {
193
+ node.pendingScrollDelta = undefined
194
+ return pending
195
+ }
196
+ const applied = pending > 0 ? step : -step
197
+ node.pendingScrollDelta = pending - applied
198
+ return applied
199
+ }
200
+
201
+ // OSC 8 hyperlink wrapping. We deliberately emit empty params (`;;`)
202
+ // because that is the exact prefix `ansi-tokenize` recognises. The
203
+ // `id=` parameter, which groups wrapped lines into a single hover
204
+ // region, is added later at terminal-output time inside
205
+ // `termio/osc.ts:link()` where the line-id assignment lives.
206
+ const OSC = '\u001B]'
207
+ const BEL = '\u0007'
208
+
209
+ function wrapWithOsc8Link(text: string, url: string): string {
210
+ return `${OSC}8;;${url}${BEL}${text}${OSC}8;;${BEL}`
211
+ }
212
+
213
+ /** Build a mapping from each character position in the plain text to its segment index. */
214
+ function buildCharToSegmentMap(segments: StyledSegment[]): number[] {
215
+ const map: number[] = []
216
+ for (let i = 0; i < segments.length; i++) {
217
+ const len = segments[i]!.text.length
218
+ for (let j = 0; j < len; j++) {
219
+ map.push(i)
220
+ }
221
+ }
222
+ return map
223
+ }
224
+
225
+ /** Apply styles to wrapped text by mapping each character back to its original segment. */
226
+ function applyStylesToWrappedText(
227
+ wrappedPlain: string,
228
+ segments: StyledSegment[],
229
+ charToSegment: number[],
230
+ originalPlain: string,
231
+ trimEnabled: boolean = false,
232
+ ): string {
233
+ const lines = wrappedPlain.split('\n')
234
+ const resultLines: string[] = []
235
+
236
+ let charIndex = 0
237
+ for (let lineIdx = 0; lineIdx < lines.length; lineIdx++) {
238
+ const line = lines[lineIdx]!
239
+
240
+ // In trim mode, skip leading whitespace that was trimmed from this line.
241
+ // Only skip if the original has whitespace but the output line doesn't start
242
+ // with whitespace (meaning it was trimmed). If both have whitespace, the
243
+ // whitespace was preserved and we shouldn't skip.
244
+ if (trimEnabled && line.length > 0) {
245
+ const lineStartsWithWhitespace = /\s/.test(line[0]!)
246
+ const originalHasWhitespace =
247
+ charIndex < originalPlain.length && /\s/.test(originalPlain[charIndex]!)
248
+
249
+ // Only skip if original has whitespace but line doesn't
250
+ if (originalHasWhitespace && !lineStartsWithWhitespace) {
251
+ while (
252
+ charIndex < originalPlain.length &&
253
+ /\s/.test(originalPlain[charIndex]!)
254
+ ) {
255
+ charIndex++
256
+ }
257
+ }
258
+ }
259
+
260
+ let styledLine = ''
261
+ let runStart = 0
262
+ let runSegmentIndex = charToSegment[charIndex] ?? 0
263
+
264
+ for (let i = 0; i < line.length; i++) {
265
+ const currentSegmentIndex = charToSegment[charIndex] ?? runSegmentIndex
266
+
267
+ if (currentSegmentIndex !== runSegmentIndex) {
268
+ // Flush the current run
269
+ const runText = line.slice(runStart, i)
270
+ const segment = segments[runSegmentIndex]
271
+ if (segment) {
272
+ let styled = applyTextStyles(runText, segment.styles)
273
+ if (segment.hyperlink) {
274
+ styled = wrapWithOsc8Link(styled, segment.hyperlink)
275
+ }
276
+ styledLine += styled
277
+ } else {
278
+ styledLine += runText
279
+ }
280
+ runStart = i
281
+ runSegmentIndex = currentSegmentIndex
282
+ }
283
+
284
+ charIndex++
285
+ }
286
+
287
+ // Flush the final run
288
+ const runText = line.slice(runStart)
289
+ const segment = segments[runSegmentIndex]
290
+ if (segment) {
291
+ let styled = applyTextStyles(runText, segment.styles)
292
+ if (segment.hyperlink) {
293
+ styled = wrapWithOsc8Link(styled, segment.hyperlink)
294
+ }
295
+ styledLine += styled
296
+ } else {
297
+ styledLine += runText
298
+ }
299
+
300
+ resultLines.push(styledLine)
301
+
302
+ // Skip newline character in original that corresponds to this line break.
303
+ // This is needed when the original text contains actual newlines (not just
304
+ // wrapping-inserted newlines). Without this, charIndex gets out of sync
305
+ // because the newline is in originalPlain/charToSegment but not in the
306
+ // split lines.
307
+ if (charIndex < originalPlain.length && originalPlain[charIndex] === '\n') {
308
+ charIndex++
309
+ }
310
+
311
+ // In trim mode, skip whitespace that was replaced by newline when wrapping.
312
+ // We skip whitespace in the original until we reach a character that matches
313
+ // the first character of the next line. This handles cases like:
314
+ // - "AB \tD" wrapped to "AB\n\tD" - skip spaces until we hit the tab
315
+ // In non-trim mode, whitespace is preserved so no skipping is needed.
316
+ if (trimEnabled && lineIdx < lines.length - 1) {
317
+ const nextLine = lines[lineIdx + 1]!
318
+ const nextLineFirstChar = nextLine.length > 0 ? nextLine[0] : null
319
+
320
+ // Skip whitespace until we hit a char that matches the next line's first char
321
+ while (
322
+ charIndex < originalPlain.length &&
323
+ /\s/.test(originalPlain[charIndex]!)
324
+ ) {
325
+ // Stop if we found the character that starts the next line
326
+ if (
327
+ nextLineFirstChar !== null &&
328
+ originalPlain[charIndex] === nextLineFirstChar
329
+ ) {
330
+ break
331
+ }
332
+ charIndex++
333
+ }
334
+ }
335
+ }
336
+
337
+ return resultLines.join('\n')
338
+ }
339
+
340
+ function wrapWithSoftWrap(
341
+ plainText: string,
342
+ maxWidth: number,
343
+ textWrap: Parameters<typeof wrapText>[2],
344
+ ): { wrapped: string; softWrap: boolean[] | undefined } {
345
+ if (textWrap !== 'wrap' && textWrap !== 'wrap-trim') {
346
+ return {
347
+ wrapped: wrapText(plainText, maxWidth, textWrap),
348
+ softWrap: undefined,
349
+ }
350
+ }
351
+ const origLines = plainText.split('\n')
352
+ const outLines: string[] = []
353
+ const softWrap: boolean[] = []
354
+ for (const orig of origLines) {
355
+ const pieces = wrapText(orig, maxWidth, textWrap).split('\n')
356
+ for (let i = 0; i < pieces.length; i++) {
357
+ outLines.push(pieces[i]!)
358
+ softWrap.push(i > 0)
359
+ }
360
+ }
361
+ return { wrapped: outLines.join('\n'), softWrap }
362
+ }
363
+
364
+ // If parent container is `<Box>`, text nodes will be treated as separate nodes in
365
+ // the tree and will have their own coordinates in the layout.
366
+ // To ensure text nodes are aligned correctly, take X and Y of the first text node
367
+ // and use it as offset for the rest of the nodes
368
+ // Only first node is taken into account, because other text nodes can't have margin or padding,
369
+ // so their coordinates will be relative to the first node anyway
370
+ function applyPaddingToText(
371
+ node: DOMElement,
372
+ text: string,
373
+ softWrap?: boolean[],
374
+ ): string {
375
+ const yogaNode = node.childNodes[0]?.yogaNode
376
+
377
+ if (yogaNode) {
378
+ const offsetX = yogaNode.getComputedLeft()
379
+ const offsetY = yogaNode.getComputedTop()
380
+ text = '\n'.repeat(offsetY) + indentString(text, offsetX)
381
+ if (softWrap && offsetY > 0) {
382
+ // Prepend `false` for each padding line so indices stay aligned
383
+ // with text.split('\n'). Mutate in place — caller owns the array.
384
+ softWrap.unshift(...Array<boolean>(offsetY).fill(false))
385
+ }
386
+ }
387
+
388
+ return text
389
+ }
390
+
391
+ // After nodes are laid out, render each to output object, which later gets rendered to terminal
392
+ function renderNodeToOutput(
393
+ node: DOMElement,
394
+ output: Output,
395
+ {
396
+ offsetX = 0,
397
+ offsetY = 0,
398
+ prevScreen,
399
+ skipSelfBlit = false,
400
+ inheritedBackgroundColor,
401
+ }: {
402
+ offsetX?: number
403
+ offsetY?: number
404
+ prevScreen: Screen | undefined
405
+ // Force this node to descend instead of blitting its own rect, while
406
+ // still passing prevScreen to children. Used for non-opaque absolute
407
+ // overlays over a dirty clipped region: the overlay's full rect has
408
+ // transparent gaps (stale underlying content in prevScreen), but its
409
+ // opaque descendants' narrower rects are safe to blit.
410
+ skipSelfBlit?: boolean
411
+ inheritedBackgroundColor?: Color
412
+ },
413
+ ): void {
414
+ const { yogaNode } = node
415
+
416
+ if (yogaNode) {
417
+ if (yogaNode.getDisplay() === LayoutDisplay.None) {
418
+ // Clear old position if node was visible before becoming hidden
419
+ if (node.dirty) {
420
+ const cached = nodeCache.get(node)
421
+ if (cached) {
422
+ output.clear({
423
+ x: Math.floor(cached.x),
424
+ y: Math.floor(cached.y),
425
+ width: Math.floor(cached.width),
426
+ height: Math.floor(cached.height),
427
+ })
428
+ // Drop descendants' cache too — hideInstance's markDirty walks UP
429
+ // only, so descendants' .dirty stays false. Their nodeCache entries
430
+ // survive with pre-hide rects. On unhide, if position didn't shift,
431
+ // the blit check at line ~432 passes and copies EMPTY cells from
432
+ // prevScreen (cleared here) → content vanishes.
433
+ dropSubtreeCache(node)
434
+ layoutShifted = true
435
+ }
436
+ }
437
+ return
438
+ }
439
+
440
+ // Left and top positions in Yoga are relative to their parent node
441
+ const x = offsetX + yogaNode.getComputedLeft()
442
+ const yogaTop = yogaNode.getComputedTop()
443
+ let y = offsetY + yogaTop
444
+ const width = yogaNode.getComputedWidth()
445
+ const height = yogaNode.getComputedHeight()
446
+
447
+ // Absolute-positioned overlays (e.g. autocomplete menus with bottom='100%')
448
+ // can compute negative screen y when they extend above the viewport. Without
449
+ // clamping, setCellAt drops cells at y<0, clipping the TOP of the content
450
+ // (best matches in an autocomplete). By clamping to 0, we shift the element
451
+ // down so the top rows are visible and the bottom overflows below — the
452
+ // opaque prop ensures it paints over whatever is underneath.
453
+ if (y < 0 && node.style.position === 'absolute') {
454
+ y = 0
455
+ }
456
+
457
+ // Check if we can skip this subtree (clean node with unchanged layout).
458
+ // Blit cells from previous screen instead of re-rendering.
459
+ const cached = nodeCache.get(node)
460
+ if (
461
+ !node.dirty &&
462
+ !skipSelfBlit &&
463
+ node.pendingScrollDelta === undefined &&
464
+ cached &&
465
+ cached.x === x &&
466
+ cached.y === y &&
467
+ cached.width === width &&
468
+ cached.height === height &&
469
+ prevScreen
470
+ ) {
471
+ const fx = Math.floor(x)
472
+ const fy = Math.floor(y)
473
+ const fw = Math.floor(width)
474
+ const fh = Math.floor(height)
475
+ output.blit(prevScreen, fx, fy, fw, fh)
476
+ if (node.style.position === 'absolute') {
477
+ absoluteRectsCur.push(cached)
478
+ }
479
+ // Absolute descendants can paint outside this node's layout bounds
480
+ // (e.g. a slash menu with position='absolute' bottom='100%' floats
481
+ // above). If a dirty clipped sibling re-rendered and overwrote those
482
+ // cells, the blit above only restored this node's own rect — the
483
+ // absolute descendants' cells are lost. Re-blit them from prevScreen
484
+ // so the overlays survive.
485
+ blitEscapingAbsoluteDescendants(node, output, prevScreen, fx, fy, fw, fh)
486
+ return
487
+ }
488
+
489
+ // Clear stale content from the old position when re-rendering.
490
+ // Dirty: content changed. Moved: position/size changed (e.g., sibling
491
+ // above changed height), old cells still on the terminal.
492
+ const positionChanged =
493
+ cached !== undefined &&
494
+ (cached.x !== x ||
495
+ cached.y !== y ||
496
+ cached.width !== width ||
497
+ cached.height !== height)
498
+ if (positionChanged) {
499
+ layoutShifted = true
500
+ }
501
+ if (cached && (node.dirty || positionChanged)) {
502
+ output.clear(
503
+ {
504
+ x: Math.floor(cached.x),
505
+ y: Math.floor(cached.y),
506
+ width: Math.floor(cached.width),
507
+ height: Math.floor(cached.height),
508
+ },
509
+ node.style.position === 'absolute',
510
+ )
511
+ }
512
+
513
+ // Read before deleting — hasRemovedChild disables prevScreen blitting
514
+ // for siblings to prevent stale overflow content from being restored.
515
+ const clears = pendingClears.get(node)
516
+ const hasRemovedChild = clears !== undefined
517
+ if (hasRemovedChild) {
518
+ layoutShifted = true
519
+ for (const rect of clears) {
520
+ output.clear({
521
+ x: Math.floor(rect.x),
522
+ y: Math.floor(rect.y),
523
+ width: Math.floor(rect.width),
524
+ height: Math.floor(rect.height),
525
+ })
526
+ }
527
+ pendingClears.delete(node)
528
+ }
529
+
530
+ // Yoga squeezed this node to zero height (overflow in a height-constrained
531
+ // parent) AND a sibling lands at the same y. Skip rendering — both would
532
+ // write to the same row; if the sibling's content is shorter, this node's
533
+ // tail chars ghost (e.g. "false" + "true" = "truee"). The clear above
534
+ // already handled the visible→squeezed transition.
535
+ //
536
+ // The sibling-overlap check is load-bearing: Yoga's pixel-grid rounding
537
+ // can give a box h=0 while still leaving a row for it (next sibling at
538
+ // y+1, not y). HelpV2's third shortcuts column hits this — skipping
539
+ // unconditionally drops "ctrl + z to suspend" from /help output.
540
+ if (height === 0 && siblingSharesY(node, yogaNode)) {
541
+ nodeCache.set(node, { x, y, width, height, top: yogaTop })
542
+ node.dirty = false
543
+ return
544
+ }
545
+
546
+ if (node.nodeName === 'ink-raw-ansi') {
547
+ // Pre-rendered ANSI content. The producer already wrapped to width and
548
+ // emitted terminal-ready escape codes. Skip squash, measure, wrap, and
549
+ // style re-application — output.write() parses ANSI directly into cells.
550
+ const text = node.attributes['rawText'] as string
551
+ if (text) {
552
+ output.write(x, y, text)
553
+ }
554
+ } else if (node.nodeName === 'ink-text') {
555
+ const segments = squashTextNodesToSegments(
556
+ node,
557
+ inheritedBackgroundColor
558
+ ? { backgroundColor: inheritedBackgroundColor }
559
+ : undefined,
560
+ )
561
+
562
+ // First, get plain text to check if wrapping is needed
563
+ const plainText = segments.map(s => s.text).join('')
564
+
565
+ if (plainText.length > 0) {
566
+ // `getMaxWidth(yogaNode)` returns the AtMost-pass width, which can
567
+ // exceed the actual on-screen width (see the getMaxWidth docstring).
568
+ // The node's *height* already reflects the constrained Exactly pass,
569
+ // so wrapping at the unclamped width and rendering with the real
570
+ // height would produce a different line count than layout expected:
571
+ // characters past the screen edge get silently dropped by setCellAt's
572
+ // bounds check, and the gap between line count and reserved rows
573
+ // shows up as torn rendering. Clamping here keeps the two in sync.
574
+ const maxWidth = Math.min(getMaxWidth(yogaNode), output.width - x)
575
+ const textWrap = node.style.textWrap ?? 'wrap'
576
+
577
+ // Check if wrapping is needed
578
+ const needsWrapping = widestLine(plainText) > maxWidth
579
+
580
+ let text: string
581
+ let softWrap: boolean[] | undefined
582
+ if (needsWrapping && segments.length === 1) {
583
+ // Single segment: wrap plain text first, then apply styles to each line
584
+ const segment = segments[0]!
585
+ const w = wrapWithSoftWrap(plainText, maxWidth, textWrap)
586
+ softWrap = w.softWrap
587
+ text = w.wrapped
588
+ .split('\n')
589
+ .map(line => {
590
+ let styled = applyTextStyles(line, segment.styles)
591
+ // Apply OSC 8 hyperlink per-line so each line is independently
592
+ // clickable. output.ts splits on newlines and tokenizes each
593
+ // line separately, so a single wrapper around the whole block
594
+ // would only apply the hyperlink to the first line.
595
+ if (segment.hyperlink) {
596
+ styled = wrapWithOsc8Link(styled, segment.hyperlink)
597
+ }
598
+ return styled
599
+ })
600
+ .join('\n')
601
+ } else if (needsWrapping) {
602
+ // Multiple segments with wrapping: wrap plain text first, then re-apply
603
+ // each segment's styles based on character positions. This preserves
604
+ // per-segment styles even when text wraps across lines.
605
+ const w = wrapWithSoftWrap(plainText, maxWidth, textWrap)
606
+ softWrap = w.softWrap
607
+ const charToSegment = buildCharToSegmentMap(segments)
608
+ text = applyStylesToWrappedText(
609
+ w.wrapped,
610
+ segments,
611
+ charToSegment,
612
+ plainText,
613
+ textWrap === 'wrap-trim',
614
+ )
615
+ // Hyperlinks are handled per-run in applyStylesToWrappedText via
616
+ // wrapWithOsc8Link, similar to how styles are applied per-run.
617
+ } else {
618
+ // No wrapping needed: apply styles directly
619
+ text = segments
620
+ .map(segment => {
621
+ let styledText = applyTextStyles(segment.text, segment.styles)
622
+ if (segment.hyperlink) {
623
+ styledText = wrapWithOsc8Link(styledText, segment.hyperlink)
624
+ }
625
+ return styledText
626
+ })
627
+ .join('')
628
+ }
629
+
630
+ text = applyPaddingToText(node, text, softWrap)
631
+
632
+ output.write(x, y, text, softWrap)
633
+ }
634
+ } else if (node.nodeName === 'ink-box') {
635
+ const boxBackgroundColor =
636
+ node.style.backgroundColor ?? inheritedBackgroundColor
637
+
638
+ // Mark this box's region as non-selectable (fullscreen text
639
+ // selection). noSelect ops are applied AFTER blits/writes in
640
+ // output.get(), so this wins regardless of what's rendered into
641
+ // the region — including blits from prevScreen when the box is
642
+ // clean (the op is emitted on both the dirty-render path here
643
+ // AND on the blit fast-path at line ~235 since blitRegion copies
644
+ // the noSelect bitmap alongside cells).
645
+ //
646
+ // 'from-left-edge' extends the exclusion from col 0 so any
647
+ // upstream indentation (tool prefix, tree lines) is covered too
648
+ // — a multi-row drag over a diff gutter shouldn't pick up the
649
+ // ` ⎿ ` prefix on row 0 or the blank cells under it on row 1+.
650
+ if (node.style.noSelect) {
651
+ const boxX = Math.floor(x)
652
+ const fromEdge = node.style.noSelect === 'from-left-edge'
653
+ output.noSelect({
654
+ x: fromEdge ? 0 : boxX,
655
+ y: Math.floor(y),
656
+ width: fromEdge ? boxX + Math.floor(width) : Math.floor(width),
657
+ height: Math.floor(height),
658
+ })
659
+ }
660
+
661
+ const overflowX = node.style.overflowX ?? node.style.overflow
662
+ const overflowY = node.style.overflowY ?? node.style.overflow
663
+ const clipHorizontally = overflowX === 'hidden' || overflowX === 'scroll'
664
+ const clipVertically = overflowY === 'hidden' || overflowY === 'scroll'
665
+ const isScrollY = overflowY === 'scroll'
666
+
667
+ const needsClip = clipHorizontally || clipVertically
668
+ let y1: number | undefined
669
+ let y2: number | undefined
670
+ if (needsClip) {
671
+ const x1 = clipHorizontally
672
+ ? x + yogaNode.getComputedBorder(LayoutEdge.Left)
673
+ : undefined
674
+
675
+ const x2 = clipHorizontally
676
+ ? x +
677
+ yogaNode.getComputedWidth() -
678
+ yogaNode.getComputedBorder(LayoutEdge.Right)
679
+ : undefined
680
+
681
+ y1 = clipVertically
682
+ ? y + yogaNode.getComputedBorder(LayoutEdge.Top)
683
+ : undefined
684
+
685
+ y2 = clipVertically
686
+ ? y +
687
+ yogaNode.getComputedHeight() -
688
+ yogaNode.getComputedBorder(LayoutEdge.Bottom)
689
+ : undefined
690
+
691
+ output.clip({ x1, x2, y1, y2 })
692
+ }
693
+
694
+ if (isScrollY) {
695
+ // Scroll containers follow the ScrollBox component structure:
696
+ // a single content-wrapper child with flexShrink:0 (doesn't shrink
697
+ // to fit), whose children are the scrollable items. scrollHeight
698
+ // comes from the wrapper's intrinsic Yoga height. The wrapper is
699
+ // rendered with its Y translated by -scrollTop; its children are
700
+ // culled against the visible window.
701
+ const padTop = yogaNode.getComputedPadding(LayoutEdge.Top)
702
+ const innerHeight = Math.max(
703
+ 0,
704
+ (y2 ?? y + height) -
705
+ (y1 ?? y) -
706
+ padTop -
707
+ yogaNode.getComputedPadding(LayoutEdge.Bottom),
708
+ )
709
+
710
+ const content = node.childNodes.find(c => (c as DOMElement).yogaNode) as
711
+ | DOMElement
712
+ | undefined
713
+ const contentYoga = content?.yogaNode
714
+ // scrollHeight is the intrinsic height of the content wrapper.
715
+ // Do NOT add getComputedTop() — that's the wrapper's offset
716
+ // within the viewport (equal to the scroll container's
717
+ // paddingTop), and innerHeight already subtracts padding, so
718
+ // including it double-counts padding and inflates maxScroll.
719
+ const scrollHeight = contentYoga?.getComputedHeight() ?? 0
720
+ // Capture previous scroll bounds BEFORE overwriting — the at-bottom
721
+ // follow check compares against last frame's max.
722
+ const prevScrollHeight = node.scrollHeight ?? scrollHeight
723
+ const prevInnerHeight = node.scrollViewportHeight ?? innerHeight
724
+ node.scrollHeight = scrollHeight
725
+ node.scrollViewportHeight = innerHeight
726
+ // Absolute screen-buffer row where the scrollable area (inside
727
+ // padding) begins. Exposed via ScrollBoxHandle.getViewportTop() so
728
+ // drag-to-scroll can detect when the drag leaves the scroll viewport.
729
+ node.scrollViewportTop = (y1 ?? y) + padTop
730
+
731
+ const maxScroll = Math.max(0, scrollHeight - innerHeight)
732
+ // scrollAnchor: scroll so the anchored element's top is at the
733
+ // viewport top (plus offset). Yoga is FRESH — same calculateLayout
734
+ // pass that just produced scrollHeight. Deterministic alternative
735
+ // to scrollTo(N) which bakes a number that's stale by the throttled
736
+ // render; the element ref defers the read to now. One-shot snap.
737
+ // A prior eased-seek version (proportional drain over ~5 frames)
738
+ // moved scrollTop without firing React's notify → parent's quantized
739
+ // store snapshot never updated → StickyTracker got stale range props
740
+ // → firstVisible wrong. Also: SCROLL_MIN_PER_FRAME=4 with snap-at-1
741
+ // ping-ponged forever at delta=2. Smooth needs drain-end notify
742
+ // plumbing; shipping instant first. stickyScroll overrides.
743
+ if (node.scrollAnchor) {
744
+ const anchorTop = node.scrollAnchor.el.yogaNode?.getComputedTop()
745
+ if (anchorTop != null) {
746
+ node.scrollTop = anchorTop + node.scrollAnchor.offset
747
+ node.pendingScrollDelta = undefined
748
+ }
749
+ node.scrollAnchor = undefined
750
+ }
751
+ // At-bottom follow. Positional: if scrollTop was at (or past) the
752
+ // previous max, pin to the new max. Scroll away → stop following;
753
+ // scroll back (or scrollToBottom/sticky attr) → resume. The sticky
754
+ // flag is OR'd in for cold start (scrollTop=0 before first layout)
755
+ // and scrollToBottom-from-far-away (flag set before scrollTop moves)
756
+ // — the imperative field takes precedence over the attribute so
757
+ // scrollTo/scrollBy can break stickiness. pendingDelta<0 guard:
758
+ // don't cancel an in-flight scroll-up when content races in.
759
+ // Capture scrollTop before follow so ink.tsx can translate any
760
+ // active text selection by the same delta (native terminal behavior:
761
+ // view keeps scrolling, highlight walks up with the text).
762
+ const scrollTopBeforeFollow = node.scrollTop ?? 0
763
+ const sticky =
764
+ node.stickyScroll ?? Boolean(node.attributes['stickyScroll'])
765
+ const prevMaxScroll = Math.max(0, prevScrollHeight - prevInnerHeight)
766
+ // Positional check only valid when content grew — virtualization can
767
+ // transiently SHRINK scrollHeight (tail unmount + stale heightCache
768
+ // spacer) making scrollTop >= prevMaxScroll true by artifact, not
769
+ // because the user was at bottom.
770
+ const grew = scrollHeight >= prevScrollHeight
771
+ const atBottom =
772
+ sticky || (grew && scrollTopBeforeFollow >= prevMaxScroll)
773
+ if (atBottom && (node.pendingScrollDelta ?? 0) >= 0) {
774
+ node.scrollTop = maxScroll
775
+ node.pendingScrollDelta = undefined
776
+ // Sync flag so useVirtualScroll's isSticky() agrees with positional
777
+ // state — sticky-broken-but-at-bottom (wheel tremor, click-select
778
+ // at max) otherwise leaves useVirtualScroll's clamp holding the
779
+ // viewport short of new streaming content. scrollTo/scrollBy set
780
+ // false; this restores true, same as scrollToBottom() would.
781
+ // Only restore when (a) positionally at bottom and (b) the flag
782
+ // was explicitly broken (===false) by scrollTo/scrollBy. When
783
+ // undefined (never set by user action) leave it alone — setting it
784
+ // would make the sticky flag sticky-by-default and lock out
785
+ // direct scrollTop writes (e.g. the alt-screen-perf test).
786
+ if (
787
+ node.stickyScroll === false &&
788
+ scrollTopBeforeFollow >= prevMaxScroll
789
+ ) {
790
+ node.stickyScroll = true
791
+ }
792
+ }
793
+ const followDelta = (node.scrollTop ?? 0) - scrollTopBeforeFollow
794
+ if (followDelta > 0) {
795
+ const vpTop = node.scrollViewportTop ?? 0
796
+ followScroll = {
797
+ delta: followDelta,
798
+ viewportTop: vpTop,
799
+ viewportBottom: vpTop + innerHeight - 1,
800
+ }
801
+ }
802
+ // Drain pendingScrollDelta. Native terminals (proportional burst
803
+ // events) use proportional drain; xterm.js (VS Code, sparse events +
804
+ // app-side accel curve) uses adaptive small-step drain. isXtermJs()
805
+ // depends on the async XTVERSION probe, but by the time this runs
806
+ // (pendingScrollDelta is only set by wheel events, >>50ms after
807
+ // startup) the probe has resolved — same timing guarantee the
808
+ // wheel-accel curve relies on.
809
+ let cur = node.scrollTop ?? 0
810
+ const pending = node.pendingScrollDelta
811
+ const cMin = node.scrollClampMin
812
+ const cMax = node.scrollClampMax
813
+ const haveClamp = cMin !== undefined && cMax !== undefined
814
+ if (pending !== undefined && pending !== 0) {
815
+ // Drain continues even past the clamp — the render-clamp below
816
+ // holds the VISUAL at the mounted edge regardless. Hard-stopping
817
+ // here caused stop-start jutter: drain hits edge → pause → React
818
+ // commits → clamp widens → drain resumes → edge again. Letting
819
+ // scrollTop advance smoothly while the clamp lags gives continuous
820
+ // visual scroll at React's commit rate (the clamp catches up each
821
+ // commit). But THROTTLE the drain when already past the clamp so
822
+ // scrollTop doesn't race 5000 rows ahead of the mounted range
823
+ // (slide-cap would then take 200 commits to catch up = long
824
+ // perceived stall at the edge). Past-clamp drain caps at ~4 rows/
825
+ // frame, roughly matching React's slide rate so the gap stays
826
+ // bounded and catch-up is quick once input stops.
827
+ const pastClamp =
828
+ haveClamp &&
829
+ ((pending < 0 && cur < cMin) || (pending > 0 && cur > cMax))
830
+ const eff = pastClamp ? Math.min(4, innerHeight >> 3) : innerHeight
831
+ cur += isXtermJsHost()
832
+ ? drainAdaptive(node, pending, eff)
833
+ : drainProportional(node, pending, eff)
834
+ } else if (pending === 0) {
835
+ // Opposite scrollBy calls cancelled to zero — clear so we don't
836
+ // schedule an infinite loop of no-op drain frames.
837
+ node.pendingScrollDelta = undefined
838
+ }
839
+ let scrollTop = Math.max(0, Math.min(cur, maxScroll))
840
+ // Virtual-scroll clamp: if scrollTop raced past the currently-mounted
841
+ // range (burst PageUp before React re-renders), render at the EDGE of
842
+ // the mounted children instead of blank spacer. Do NOT write back to
843
+ // node.scrollTop — the clamped value is for this paint only; the real
844
+ // scrollTop stays so React's next commit sees the target and mounts
845
+ // the right range. Not scheduling scrollDrainNode here keeps the
846
+ // clamp passive — React's commit → resetAfterCommit → onRender will
847
+ // paint again with fresh bounds.
848
+ const clamped = haveClamp
849
+ ? Math.max(cMin, Math.min(scrollTop, cMax))
850
+ : scrollTop
851
+ node.scrollTop = scrollTop
852
+ // Clamp hitting top/bottom consumes any remainder. Set drainPending
853
+ // only after clamp so a wasted no-op frame isn't scheduled.
854
+ if (scrollTop !== cur) node.pendingScrollDelta = undefined
855
+ if (node.pendingScrollDelta !== undefined) scrollDrainNode = node
856
+ scrollTop = clamped
857
+
858
+ if (content && contentYoga) {
859
+ // Compute content wrapper's absolute render position with scroll
860
+ // offset applied, then render its children with culling.
861
+ const contentX = x + contentYoga.getComputedLeft()
862
+ const contentY = y + contentYoga.getComputedTop() - scrollTop
863
+ // layoutShifted detection gap: when scrollTop moves by >= viewport
864
+ // height (batched PageUps, fast wheel), every visible child gets
865
+ // culled (cache dropped) and every newly-visible child has no
866
+ // cache — so the children's positionChanged check can't fire.
867
+ // The content wrapper's cached y (which encodes -scrollTop) is
868
+ // the only node that survives to witness the scroll.
869
+ const contentCached = nodeCache.get(content)
870
+ let hint: ScrollHint | null = null
871
+ if (contentCached && contentCached.y !== contentY) {
872
+ // delta = newScrollTop - oldScrollTop (positive = scrolled down).
873
+ // Capture a DECSTBM hint if the container itself didn't move
874
+ // and the shift fits within the viewport — otherwise the full
875
+ // rewrite is needed anyway, and layoutShifted stays the fallback.
876
+ const delta = contentCached.y - contentY
877
+ const regionTop = Math.floor(y + contentYoga.getComputedTop())
878
+ const regionBottom = regionTop + innerHeight - 1
879
+ if (
880
+ cached?.y === y &&
881
+ cached.height === height &&
882
+ innerHeight > 0 &&
883
+ Math.abs(delta) < innerHeight
884
+ ) {
885
+ hint = { top: regionTop, bottom: regionBottom, delta }
886
+ scrollHint = hint
887
+ } else {
888
+ layoutShifted = true
889
+ }
890
+ }
891
+ // Fast path: scroll (hint captured) with usable prevScreen.
892
+ // Blit prevScreen's scroll region into next.screen, shift in-place
893
+ // by delta (mirrors DECSTBM), then render ONLY the edge rows. The
894
+ // nested clip keeps child writes out of stable rows — a tall child
895
+ // that spans edge+stable still renders but stable cells are
896
+ // clipped, preserving the blit. Avoids re-rendering every visible
897
+ // child (expensive for long syntax-highlighted transcripts).
898
+ //
899
+ // When content.dirty (e.g. streaming text at the bottom of the
900
+ // scroll), we still use the fast path — the dirty child is almost
901
+ // always in the edge rows (the bottom, where new content appears).
902
+ // After edge rendering, any dirty children in stable rows are
903
+ // re-rendered in a second pass to avoid showing stale blitted
904
+ // content.
905
+ //
906
+ // Guard: the fast path only handles pure scroll or bottom-append.
907
+ // Child removal/insertion changes the content height in a way that
908
+ // doesn't match the scroll delta — fall back to the full path so
909
+ // removed children don't leave stale cells and shifted siblings
910
+ // render at their new positions.
911
+ const scrollHeight = contentYoga.getComputedHeight()
912
+ const prevHeight = contentCached?.height ?? scrollHeight
913
+ const heightDelta = scrollHeight - prevHeight
914
+ const safeForFastPath =
915
+ !hint ||
916
+ heightDelta === 0 ||
917
+ (hint.delta > 0 && heightDelta === hint.delta)
918
+ // scrollHint is set above when hint is captured. If safeForFastPath
919
+ // is false the full path renders a next.screen that doesn't match
920
+ // the DECSTBM shift — emitting DECSTBM leaves stale rows (seen as
921
+ // content bleeding through during scroll-up + streaming). Clear it.
922
+ if (!safeForFastPath) scrollHint = null
923
+ if (hint && prevScreen && safeForFastPath) {
924
+ const { top, bottom, delta } = hint
925
+ const w = Math.floor(width)
926
+ output.blit(prevScreen, Math.floor(x), top, w, bottom - top + 1)
927
+ output.shift(top, bottom, delta)
928
+ // Edge rows: new content entering the viewport.
929
+ const edgeTop = delta > 0 ? bottom - delta + 1 : top
930
+ const edgeBottom = delta > 0 ? bottom : top - delta - 1
931
+ output.clear({
932
+ x: Math.floor(x),
933
+ y: edgeTop,
934
+ width: w,
935
+ height: edgeBottom - edgeTop + 1,
936
+ })
937
+ output.clip({
938
+ x1: undefined,
939
+ x2: undefined,
940
+ y1: edgeTop,
941
+ y2: edgeBottom + 1,
942
+ })
943
+ // Snapshot dirty children before the first pass — the first
944
+ // pass clears dirty flags, and edge-spanning children would be
945
+ // missed by the second pass without this snapshot.
946
+ const dirtyChildren = content.dirty
947
+ ? new Set(content.childNodes.filter(c => (c as DOMElement).dirty))
948
+ : null
949
+ renderScrolledChildren(
950
+ content,
951
+ output,
952
+ contentX,
953
+ contentY,
954
+ hasRemovedChild,
955
+ undefined,
956
+ // Cull to edge in child-local coords (inverse of contentY offset).
957
+ edgeTop - contentY,
958
+ edgeBottom + 1 - contentY,
959
+ boxBackgroundColor,
960
+ true,
961
+ )
962
+ output.unclip()
963
+
964
+ // Second pass: re-render children in stable rows whose screen
965
+ // position doesn't match where the shift put their old pixels.
966
+ // Covers TWO cases:
967
+ // 1. Dirty children — their content changed, blitted pixels are
968
+ // stale regardless of position.
969
+ // 2. Clean children BELOW a middle-growth point — when a dirty
970
+ // sibling above them grows, their yogaTop increases but
971
+ // scrollTop increases by the same amount (sticky), so their
972
+ // screenY is CONSTANT. The shift moved their old pixels to
973
+ // screenY-delta (wrong); they should stay at screenY. Without
974
+ // this, the spinner/tmux-monitor ghost at shifted positions
975
+ // during streaming (e.g. triple spinner, pill duplication).
976
+ // For bottom-append (the common case), all clean children are
977
+ // ABOVE the growth point; their screenY decreased by delta and
978
+ // the shift put them at the right place — skipped here, fast
979
+ // path preserved.
980
+ if (dirtyChildren) {
981
+ const edgeTopLocal = edgeTop - contentY
982
+ const edgeBottomLocal = edgeBottom + 1 - contentY
983
+ const spaces = ' '.repeat(w)
984
+ // Track cumulative height change of children iterated so far.
985
+ // A clean child's yogaTop is unchanged iff this is zero (no
986
+ // sibling above it grew/shrank/mounted). When zero, the skip
987
+ // check cached.y−delta === screenY reduces to delta === delta
988
+ // (tautology) → skip without yoga reads. Restores O(dirty)
989
+ // that #24536 traded away: for bottom-append the dirty child
990
+ // is last (all clean children skip); for virtual-scroll range
991
+ // shift the topSpacer shrink + new-item heights self-balance
992
+ // to zero before reaching the clean block. Middle-growth
993
+ // leaves shift non-zero → clean children after the growth
994
+ // point fall through to yoga + the fine-grained check below,
995
+ // preserving the ghost-box fix.
996
+ let cumHeightShift = 0
997
+ for (const childNode of content.childNodes) {
998
+ const childElem = childNode as DOMElement
999
+ const isDirty = dirtyChildren.has(childNode)
1000
+ if (!isDirty && cumHeightShift === 0) {
1001
+ if (nodeCache.has(childElem)) continue
1002
+ // Uncached = culled last frame, now re-entering. blit
1003
+ // never painted it → fall through to yoga + render.
1004
+ // Height unchanged (clean), so cumHeightShift stays 0.
1005
+ }
1006
+ const cy = childElem.yogaNode
1007
+ if (!cy) continue
1008
+ const childTop = cy.getComputedTop()
1009
+ const childH = cy.getComputedHeight()
1010
+ const childBottom = childTop + childH
1011
+ if (isDirty) {
1012
+ const prev = nodeCache.get(childElem)
1013
+ cumHeightShift += childH - (prev ? prev.height : 0)
1014
+ }
1015
+ // Skip culled children (outside viewport)
1016
+ if (
1017
+ childBottom <= scrollTop ||
1018
+ childTop >= scrollTop + innerHeight
1019
+ )
1020
+ continue
1021
+ // Skip children entirely within edge rows (already rendered)
1022
+ if (childTop >= edgeTopLocal && childBottom <= edgeBottomLocal)
1023
+ continue
1024
+ const screenY = Math.floor(contentY + childTop)
1025
+ // Clean children reaching here have cumHeightShift ≠ 0 OR
1026
+ // no cache. Re-check precisely: cached.y − delta is where
1027
+ // the shift left old pixels; if it equals new screenY the
1028
+ // blit is correct (shift re-balanced at this child, or
1029
+ // yogaTop happens to net out). No cache → blit never
1030
+ // painted it → render.
1031
+ if (!isDirty) {
1032
+ const childCached = nodeCache.get(childElem)
1033
+ if (
1034
+ childCached &&
1035
+ Math.floor(childCached.y) - delta === screenY
1036
+ ) {
1037
+ continue
1038
+ }
1039
+ }
1040
+ // Wipe this child's region with spaces to overwrite stale
1041
+ // blitted content — output.clear() only expands damage and
1042
+ // cannot zero cells that the blit already wrote.
1043
+ const screenBottom = Math.min(
1044
+ Math.floor(contentY + childBottom),
1045
+ Math.floor((y1 ?? y) + padTop + innerHeight),
1046
+ )
1047
+ if (screenY < screenBottom) {
1048
+ const fill = Array(screenBottom - screenY)
1049
+ .fill(spaces)
1050
+ .join('\n')
1051
+ output.write(Math.floor(x), screenY, fill)
1052
+ output.clip({
1053
+ x1: undefined,
1054
+ x2: undefined,
1055
+ y1: screenY,
1056
+ y2: screenBottom,
1057
+ })
1058
+ renderNodeToOutput(childElem, output, {
1059
+ offsetX: contentX,
1060
+ offsetY: contentY,
1061
+ prevScreen: undefined,
1062
+ inheritedBackgroundColor: boxBackgroundColor,
1063
+ })
1064
+ output.unclip()
1065
+ }
1066
+ }
1067
+ }
1068
+
1069
+ // Third pass: repair rows where shifted copies of absolute
1070
+ // overlays landed. The blit copied prevScreen cells INCLUDING
1071
+ // overlay pixels (overlays render AFTER this ScrollBox so they
1072
+ // painted into prevScreen's scroll region). After shift, those
1073
+ // pixels sit at (rect.y - delta) — neither edge render nor the
1074
+ // overlay's own re-render covers them. Wipe and re-render
1075
+ // ScrollBox content so the diff writes correct cells.
1076
+ const spaces = absoluteRectsPrev.length ? ' '.repeat(w) : ''
1077
+ for (const r of absoluteRectsPrev) {
1078
+ if (r.y >= bottom + 1 || r.y + r.height <= top) continue
1079
+ const shiftedTop = Math.max(top, Math.floor(r.y) - delta)
1080
+ const shiftedBottom = Math.min(
1081
+ bottom + 1,
1082
+ Math.floor(r.y + r.height) - delta,
1083
+ )
1084
+ // Skip if entirely within edge rows (already rendered).
1085
+ if (shiftedTop >= edgeTop && shiftedBottom <= edgeBottom + 1)
1086
+ continue
1087
+ if (shiftedTop >= shiftedBottom) continue
1088
+ const fill = Array(shiftedBottom - shiftedTop)
1089
+ .fill(spaces)
1090
+ .join('\n')
1091
+ output.write(Math.floor(x), shiftedTop, fill)
1092
+ output.clip({
1093
+ x1: undefined,
1094
+ x2: undefined,
1095
+ y1: shiftedTop,
1096
+ y2: shiftedBottom,
1097
+ })
1098
+ renderScrolledChildren(
1099
+ content,
1100
+ output,
1101
+ contentX,
1102
+ contentY,
1103
+ hasRemovedChild,
1104
+ undefined,
1105
+ shiftedTop - contentY,
1106
+ shiftedBottom - contentY,
1107
+ boxBackgroundColor,
1108
+ true,
1109
+ )
1110
+ output.unclip()
1111
+ }
1112
+ } else {
1113
+ // Full path. Two sub-cases:
1114
+ //
1115
+ // Scrolled without a usable hint (big jump, container moved):
1116
+ // child positions in prevScreen are stale. Clear the viewport
1117
+ // and disable blit so children don't restore shifted content.
1118
+ //
1119
+ // No scroll (spinner tick, content edit): child positions in
1120
+ // prevScreen are still valid. Skip the viewport clear and pass
1121
+ // prevScreen so unchanged children blit. Dirty children already
1122
+ // self-clear via their own cached-rect clear. Without this, a
1123
+ // spinner inside ScrollBox forces a full-content rewrite every
1124
+ // frame — on wide terminals over tmux (no BSU/ESU) the
1125
+ // bandwidth crosses the chunk boundary and the frame tears.
1126
+ const scrolled = contentCached && contentCached.y !== contentY
1127
+ if (scrolled && y1 !== undefined && y2 !== undefined) {
1128
+ output.clear({
1129
+ x: Math.floor(x),
1130
+ y: Math.floor(y1),
1131
+ width: Math.floor(width),
1132
+ height: Math.floor(y2 - y1),
1133
+ })
1134
+ }
1135
+ // positionChanged (ScrollBox height shrunk — pill mount) means a
1136
+ // child spanning the old bottom edge would blit its full cached
1137
+ // rect past the new clip. output.ts clips blits now, but also
1138
+ // disable prevScreen here so the partial-row child re-renders at
1139
+ // correct bounds instead of blitting a clipped (truncated) old
1140
+ // rect.
1141
+ renderScrolledChildren(
1142
+ content,
1143
+ output,
1144
+ contentX,
1145
+ contentY,
1146
+ hasRemovedChild,
1147
+ scrolled || positionChanged ? undefined : prevScreen,
1148
+ scrollTop,
1149
+ scrollTop + innerHeight,
1150
+ boxBackgroundColor,
1151
+ )
1152
+ }
1153
+ nodeCache.set(content, {
1154
+ x: contentX,
1155
+ y: contentY,
1156
+ width: contentYoga.getComputedWidth(),
1157
+ height: contentYoga.getComputedHeight(),
1158
+ })
1159
+ content.dirty = false
1160
+ }
1161
+ } else {
1162
+ // Fill interior with background color before rendering children.
1163
+ // This covers padding areas and empty space; child text inherits
1164
+ // the color via inheritedBackgroundColor so written cells also
1165
+ // get the background.
1166
+ // Disable prevScreen for children: the fill overwrites the entire
1167
+ // interior each render, so child blits from prevScreen would restore
1168
+ // stale cells (wrong bg if it changed) on top of the fresh fill.
1169
+ const ownBackgroundColor = node.style.backgroundColor
1170
+ if (ownBackgroundColor || node.style.opaque) {
1171
+ const borderLeft = yogaNode.getComputedBorder(LayoutEdge.Left)
1172
+ const borderRight = yogaNode.getComputedBorder(LayoutEdge.Right)
1173
+ const borderTop = yogaNode.getComputedBorder(LayoutEdge.Top)
1174
+ const borderBottom = yogaNode.getComputedBorder(LayoutEdge.Bottom)
1175
+ const innerWidth = Math.floor(width) - borderLeft - borderRight
1176
+ const innerHeight = Math.floor(height) - borderTop - borderBottom
1177
+ if (innerWidth > 0 && innerHeight > 0) {
1178
+ const spaces = ' '.repeat(innerWidth)
1179
+ const fillLine = ownBackgroundColor
1180
+ ? applyTextStyles(spaces, { backgroundColor: ownBackgroundColor })
1181
+ : spaces
1182
+ const fill = Array(innerHeight).fill(fillLine).join('\n')
1183
+ output.write(x + borderLeft, y + borderTop, fill)
1184
+ }
1185
+ }
1186
+
1187
+ renderChildren(
1188
+ node,
1189
+ output,
1190
+ x,
1191
+ y,
1192
+ hasRemovedChild,
1193
+ // backgroundColor and opaque both disable child blit: the fill
1194
+ // overwrites the entire interior each render, so any child whose
1195
+ // layout position shifted would blit stale cells from prevScreen
1196
+ // on top of the fresh fill. Previously opaque kept blit enabled
1197
+ // on the assumption that plain-space fill + unchanged children =
1198
+ // valid composite, but children CAN reposition (ScrollBox remeasure
1199
+ // on re-render → /permissions body blanked on Down arrow, #25436).
1200
+ ownBackgroundColor || node.style.opaque ? undefined : prevScreen,
1201
+ boxBackgroundColor,
1202
+ )
1203
+ }
1204
+
1205
+ if (needsClip) {
1206
+ output.unclip()
1207
+ }
1208
+
1209
+ // Render border AFTER children to ensure it's not overwritten by child
1210
+ // clearing operations. When a child shrinks, it clears its old area,
1211
+ // which may overlap with where the parent's border now is.
1212
+ renderBorder(x, y, node, output)
1213
+ } else if (node.nodeName === 'ink-root') {
1214
+ renderChildren(
1215
+ node,
1216
+ output,
1217
+ x,
1218
+ y,
1219
+ hasRemovedChild,
1220
+ prevScreen,
1221
+ inheritedBackgroundColor,
1222
+ )
1223
+ }
1224
+
1225
+ // Cache layout bounds for dirty tracking
1226
+ const rect = { x, y, width, height, top: yogaTop }
1227
+ nodeCache.set(node, rect)
1228
+ if (node.style.position === 'absolute') {
1229
+ absoluteRectsCur.push(rect)
1230
+ }
1231
+ node.dirty = false
1232
+ }
1233
+ }
1234
+
1235
+ // Overflow contamination: content overflows right/down, so clean siblings
1236
+ // AFTER a dirty/removed sibling can contain stale overflow in prevScreen.
1237
+ // Disable blit for siblings after a dirty child — but still pass prevScreen
1238
+ // TO the dirty child itself so its clean descendants can blit. The dirty
1239
+ // child's own blit check already fails (node.dirty=true at line 216), so
1240
+ // passing prevScreen only benefits its subtree.
1241
+ // For removed children we don't know their original position, so
1242
+ // conservatively disable blit for all.
1243
+ //
1244
+ // Clipped children (overflow hidden/scroll on both axes) cannot overflow
1245
+ // onto later siblings — their content is confined to their layout bounds.
1246
+ // Skip the contamination guard for them so later siblings can still blit.
1247
+ // Without this, a spinner inside a ScrollBox dirties the wrapper on every
1248
+ // tick and the bottom prompt section never blits → 100% writes every frame.
1249
+ //
1250
+ // Exception: absolute-positioned clipped children may have layout bounds
1251
+ // that overlap arbitrary siblings, so the clipping does not help.
1252
+ //
1253
+ // Overlap contamination (seenDirtyClipped): a later ABSOLUTE sibling whose
1254
+ // rect sits inside a dirty clipped child's bounds would blit stale cells
1255
+ // from prevScreen — the clipped child just rewrote those cells this frame.
1256
+ // The clipsBothAxes skip only protects against OVERFLOW (clipped child
1257
+ // painting outside its bounds), not overlap (absolute sibling painting
1258
+ // inside them). For non-opaque absolute siblings, skipSelfBlit forces
1259
+ // descent (the full-width rect has transparent gaps → stale blit) while
1260
+ // still passing prevScreen so opaque descendants can blit their narrower
1261
+ // rects (NewMessagesPill's inner Text with backgroundColor). Opaque
1262
+ // absolute siblings fill their entire rect — direct blit is safe.
1263
+ function renderChildren(
1264
+ node: DOMElement,
1265
+ output: Output,
1266
+ offsetX: number,
1267
+ offsetY: number,
1268
+ hasRemovedChild: boolean,
1269
+ prevScreen: Screen | undefined,
1270
+ inheritedBackgroundColor: Color | undefined,
1271
+ ): void {
1272
+ let seenDirtyChild = false
1273
+ let seenDirtyClipped = false
1274
+ for (const childNode of node.childNodes) {
1275
+ const childElem = childNode as DOMElement
1276
+ // Capture dirty before rendering — renderNodeToOutput clears the flag
1277
+ const wasDirty = childElem.dirty
1278
+ const isAbsolute = childElem.style.position === 'absolute'
1279
+ renderNodeToOutput(childElem, output, {
1280
+ offsetX,
1281
+ offsetY,
1282
+ prevScreen: hasRemovedChild || seenDirtyChild ? undefined : prevScreen,
1283
+ // Short-circuits on seenDirtyClipped (false in the common case) so
1284
+ // the opaque/bg reads don't happen per-child per-frame.
1285
+ skipSelfBlit:
1286
+ seenDirtyClipped &&
1287
+ isAbsolute &&
1288
+ !childElem.style.opaque &&
1289
+ childElem.style.backgroundColor === undefined,
1290
+ inheritedBackgroundColor,
1291
+ })
1292
+ if (wasDirty && !seenDirtyChild) {
1293
+ if (!clipsBothAxes(childElem) || isAbsolute) {
1294
+ seenDirtyChild = true
1295
+ } else {
1296
+ seenDirtyClipped = true
1297
+ }
1298
+ }
1299
+ }
1300
+ }
1301
+
1302
+ function clipsBothAxes(node: DOMElement): boolean {
1303
+ const ox = node.style.overflowX ?? node.style.overflow
1304
+ const oy = node.style.overflowY ?? node.style.overflow
1305
+ return (
1306
+ (ox === 'hidden' || ox === 'scroll') && (oy === 'hidden' || oy === 'scroll')
1307
+ )
1308
+ }
1309
+
1310
+ // When Yoga squeezes a box to h=0, the ghost only happens if a sibling
1311
+ // lands at the same computed top — then both write to that row and the
1312
+ // shorter content leaves the longer's tail visible. Yoga's pixel-grid
1313
+ // rounding can give h=0 while still advancing the next sibling's top
1314
+ // (HelpV2's third shortcuts column), so h=0 alone isn't sufficient.
1315
+ function siblingSharesY(node: DOMElement, yogaNode: LayoutNode): boolean {
1316
+ const parent = node.parentNode
1317
+ if (!parent) return false
1318
+ const myTop = yogaNode.getComputedTop()
1319
+ const siblings = parent.childNodes
1320
+ const idx = siblings.indexOf(node)
1321
+ for (let i = idx + 1; i < siblings.length; i++) {
1322
+ const sib = (siblings[i] as DOMElement).yogaNode
1323
+ if (!sib) continue
1324
+ return sib.getComputedTop() === myTop
1325
+ }
1326
+ // No next sibling with a yoga node — check previous. A run of h=0 boxes
1327
+ // at the tail would all share y with each other.
1328
+ for (let i = idx - 1; i >= 0; i--) {
1329
+ const sib = (siblings[i] as DOMElement).yogaNode
1330
+ if (!sib) continue
1331
+ return sib.getComputedTop() === myTop
1332
+ }
1333
+ return false
1334
+ }
1335
+
1336
+ // When a node blits, its absolute-positioned descendants that paint outside
1337
+ // the node's layout bounds are NOT covered by the blit (which only copies
1338
+ // the node's own rect). If a dirty sibling re-rendered and overwrote those
1339
+ // cells, we must re-blit them from prevScreen so the overlays survive.
1340
+ // Example: PromptInputFooter's slash menu uses position='absolute' bottom='100%'
1341
+ // to float above the prompt; a spinner tick in the ScrollBox above re-renders
1342
+ // and overwrites those cells. Without this, the menu vanishes on the next frame.
1343
+ function blitEscapingAbsoluteDescendants(
1344
+ node: DOMElement,
1345
+ output: Output,
1346
+ prevScreen: Screen,
1347
+ px: number,
1348
+ py: number,
1349
+ pw: number,
1350
+ ph: number,
1351
+ ): void {
1352
+ const pr = px + pw
1353
+ const pb = py + ph
1354
+ for (const child of node.childNodes) {
1355
+ if (child.nodeName === '#text') continue
1356
+ const elem = child as DOMElement
1357
+ if (elem.style.position === 'absolute') {
1358
+ const cached = nodeCache.get(elem)
1359
+ if (cached) {
1360
+ absoluteRectsCur.push(cached)
1361
+ const cx = Math.floor(cached.x)
1362
+ const cy = Math.floor(cached.y)
1363
+ const cw = Math.floor(cached.width)
1364
+ const ch = Math.floor(cached.height)
1365
+ // Only blit rects that extend outside the parent's layout bounds —
1366
+ // cells within the parent rect are already covered by the parent blit.
1367
+ if (cx < px || cy < py || cx + cw > pr || cy + ch > pb) {
1368
+ output.blit(prevScreen, cx, cy, cw, ch)
1369
+ }
1370
+ }
1371
+ }
1372
+ // Recurse — absolute descendants can be nested arbitrarily deep
1373
+ blitEscapingAbsoluteDescendants(elem, output, prevScreen, px, py, pw, ph)
1374
+ }
1375
+ }
1376
+
1377
+ // Render children of a scroll container with viewport culling.
1378
+ // scrollTopY..scrollBottomY are the visible window in CHILD-LOCAL Yoga coords
1379
+ // (i.e. what getComputedTop() returns). Children entirely outside this window
1380
+ // are skipped; their nodeCache entry is deleted so if they re-enter the
1381
+ // viewport later they don't emit a stale clear for a position now occupied
1382
+ // by a sibling.
1383
+ function renderScrolledChildren(
1384
+ node: DOMElement,
1385
+ output: Output,
1386
+ offsetX: number,
1387
+ offsetY: number,
1388
+ hasRemovedChild: boolean,
1389
+ prevScreen: Screen | undefined,
1390
+ scrollTopY: number,
1391
+ scrollBottomY: number,
1392
+ inheritedBackgroundColor: Color | undefined,
1393
+ // Set on the DECSTBM fast path. When true, children we cull from the
1394
+ // visible window keep their cached subtree state instead of having it
1395
+ // dropped. The blit-and-shift already put the right cells in
1396
+ // `next.screen`, so nothing will look at the stale cache; preserving
1397
+ // it avoids an O(total_children × subtree_depth) walk per frame.
1398
+ preserveCulledCache = false,
1399
+ ): void {
1400
+ let seenDirtyChild = false
1401
+ // Running total of the height changes contributed by dirty children
1402
+ // visited so far. While this stays at zero, every subsequent clean
1403
+ // child's Yoga-computed top equals the cached one — nothing above it
1404
+ // has grown or shrunk — so we can answer the cull check from cache
1405
+ // without touching Yoga.
1406
+ //
1407
+ // This is what makes bottom-append cheap: the dirty child is the last
1408
+ // one in the list, so every clean child preceding it stays a cache
1409
+ // hit and we end up O(dirty) instead of O(mounted). Middle-growth
1410
+ // leaves the shift non-zero after the dirty child, which correctly
1411
+ // forces a Yoga read for everything below — their tops genuinely
1412
+ // moved and a cached cull check would mis-fire.
1413
+ let cumHeightShift = 0
1414
+ for (const childNode of node.childNodes) {
1415
+ const childElem = childNode as DOMElement
1416
+ const cy = childElem.yogaNode
1417
+ if (cy) {
1418
+ const cached = nodeCache.get(childElem)
1419
+ let top: number
1420
+ let height: number
1421
+ if (
1422
+ cached?.top !== undefined &&
1423
+ !childElem.dirty &&
1424
+ cumHeightShift === 0
1425
+ ) {
1426
+ top = cached.top
1427
+ height = cached.height
1428
+ } else {
1429
+ top = cy.getComputedTop()
1430
+ height = cy.getComputedHeight()
1431
+ if (childElem.dirty) {
1432
+ cumHeightShift += height - (cached ? cached.height : 0)
1433
+ }
1434
+ // Refresh cached top so next frame's cumShift===0 path stays
1435
+ // correct. For culled children with preserveCulledCache=true this
1436
+ // is the ONLY refresh point — without it, a middle-growth frame
1437
+ // leaves stale tops that misfire next frame.
1438
+ if (cached) cached.top = top
1439
+ }
1440
+ const bottom = top + height
1441
+ if (bottom <= scrollTopY || top >= scrollBottomY) {
1442
+ // This child is fully outside the visible window. Drop any
1443
+ // cached subtree state because the next time it re-enters the
1444
+ // viewport its position will almost certainly differ; without
1445
+ // this we would emit clears at positions now occupied by
1446
+ // siblings. The visible-area repaint is already handled by the
1447
+ // viewport-clear that fires whenever `scrollTop` changes.
1448
+ if (!preserveCulledCache) dropSubtreeCache(childElem)
1449
+ continue
1450
+ }
1451
+ }
1452
+ const wasDirty = childElem.dirty
1453
+ renderNodeToOutput(childElem, output, {
1454
+ offsetX,
1455
+ offsetY,
1456
+ prevScreen: hasRemovedChild || seenDirtyChild ? undefined : prevScreen,
1457
+ inheritedBackgroundColor,
1458
+ })
1459
+ if (wasDirty) {
1460
+ seenDirtyChild = true
1461
+ }
1462
+ }
1463
+ }
1464
+
1465
+ function dropSubtreeCache(node: DOMElement): void {
1466
+ nodeCache.delete(node)
1467
+ for (const child of node.childNodes) {
1468
+ if (child.nodeName !== '#text') {
1469
+ dropSubtreeCache(child as DOMElement)
1470
+ }
1471
+ }
1472
+ }
1473
+
1474
+ // Exported for testing
1475
+ export { buildCharToSegmentMap, applyStylesToWrappedText }
1476
+
1477
+ export default renderNodeToOutput