@collabchron/notiq 0.2.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +230 -39
  3. package/dist/CodeActionMenuPlugin-EINOY4U4.mjs +15 -0
  4. package/dist/DynamicBlockComponent-NRQJ4WW4.mjs +161 -0
  5. package/dist/EquationComponent-CB6DFIHV.mjs +154 -0
  6. package/dist/ExcalidrawComponent-XW6646OH.mjs +528 -0
  7. package/dist/ExcalidrawPlugin-ZFHT62IF.mjs +14 -0
  8. package/dist/ExportPlugin-V2RLM63S.mjs +11 -0
  9. package/dist/FloatingLinkEditorPlugin-TRTCMSP4.mjs +12 -0
  10. package/dist/FloatingTextFormatToolbarPlugin-F2GY6LMI.mjs +30 -0
  11. package/dist/HintComponet-BRL6EAMS.mjs +217 -0
  12. package/dist/InlineImageComponent-UWIUWBHI.mjs +453 -0
  13. package/dist/MobileToolbar-BOOZAMQE.mjs +268 -0
  14. package/dist/SlashCommand-GMT5JI33.mjs +28 -0
  15. package/dist/StoryBuilderComponent-JGDBM5JU.mjs +562 -0
  16. package/{src/components/editor/plugins/TableCellActionMenuPlugin/index.tsx → dist/TableCellActionMenuPlugin-PGK2K3VG.mjs} +667 -759
  17. package/{src/components/editor/plugins/TableHoverActionsPlugin/index.tsx → dist/TableHoverActionsPlugin-GJVE6VRW.mjs} +258 -314
  18. package/dist/TemplatePlugin-ZD3QEVTI.mjs +9 -0
  19. package/dist/ToolbarPlugin-7TOZRD2R.mjs +1547 -0
  20. package/dist/babel-JZ2EV6AX.mjs +7233 -0
  21. package/dist/background-color-XZTYLGO2.mjs +362 -0
  22. package/dist/block-format-YJCV2DIY.mjs +15 -0
  23. package/dist/chunk-2FNEAMSP.mjs +127 -0
  24. package/dist/chunk-3CPBODXA.mjs +84 -0
  25. package/dist/chunk-3G37YKTV.mjs +83 -0
  26. package/dist/chunk-3JVFG7ER.mjs +184 -0
  27. package/dist/chunk-456TN7IM.mjs +110 -0
  28. package/dist/chunk-4EXYCTGJ.mjs +27 -0
  29. package/{src/utils/getSelectedNode.ts → dist/chunk-4HBCVSE6.mjs} +26 -27
  30. package/dist/chunk-4MEDW3T6.mjs +125 -0
  31. package/dist/chunk-4VWFVWYP.mjs +36 -0
  32. package/dist/chunk-5BAKY5KN.mjs +84 -0
  33. package/dist/chunk-5QSNIVIG.mjs +333 -0
  34. package/dist/chunk-64Z3FI7T.mjs +37 -0
  35. package/{src/components/editor/nodes/Stepper/index.tsx → dist/chunk-6RNZQOH2.mjs} +214 -260
  36. package/dist/chunk-77KXU36M.mjs +64 -0
  37. package/dist/chunk-77UA6HYR.mjs +165 -0
  38. package/dist/chunk-7NZAPJ4G.mjs +102 -0
  39. package/dist/chunk-7VUMHWWL.mjs +152 -0
  40. package/dist/chunk-AMMKBSST.mjs +1256 -0
  41. package/dist/chunk-BIU7WTLX.mjs +95 -0
  42. package/dist/chunk-EGMI62PP.mjs +83 -0
  43. package/dist/chunk-EHNQD5KO.mjs +88 -0
  44. package/dist/chunk-FSM26655.mjs +37 -0
  45. package/{src/components/editor/nodes/Hint/index.tsx → dist/chunk-G53GLEAY.mjs} +158 -190
  46. package/dist/chunk-GK35L7UY.mjs +28 -0
  47. package/dist/chunk-GXYD4VZM.mjs +193 -0
  48. package/dist/chunk-GYIOYVCN.mjs +538 -0
  49. package/dist/chunk-GZPNVR7L.mjs +157 -0
  50. package/dist/chunk-JXDPPUJI.mjs +52 -0
  51. package/dist/chunk-K36V4SIW.mjs +141 -0
  52. package/dist/chunk-KJ6AJ44Q.mjs +128 -0
  53. package/dist/chunk-KJV3FAZ7.mjs +142 -0
  54. package/{src/components/editor/plugins/ImagesPlugin/index.tsx → dist/chunk-LGG4IUIA.mjs} +189 -222
  55. package/dist/chunk-LQN3CMKV.mjs +1906 -0
  56. package/dist/chunk-N3WN46VL.mjs +236 -0
  57. package/dist/chunk-PBD6LMLC.mjs +366 -0
  58. package/dist/chunk-POGRR73N.mjs +33 -0
  59. package/{src/components/editor/utils/editorFormatting.ts → dist/chunk-PZSUSXQG.mjs} +238 -282
  60. package/dist/chunk-QEIFVK5M.mjs +29 -0
  61. package/dist/chunk-QHIQKMVN.mjs +427 -0
  62. package/dist/chunk-TCYK7DM7.mjs +36 -0
  63. package/dist/chunk-TTHQCW5F.mjs +47 -0
  64. package/dist/chunk-U47ABU5Z.mjs +53 -0
  65. package/dist/chunk-WDG7J2DY.mjs +116 -0
  66. package/dist/chunk-WJRHXI2C.mjs +733 -0
  67. package/dist/chunk-XLER2DHM.mjs +357 -0
  68. package/dist/chunk-XWC4TK2N.mjs +315 -0
  69. package/dist/chunk-YHPNOWFH.mjs +15 -0
  70. package/dist/chunk-YKC3SO4Z.mjs +32 -0
  71. package/dist/chunk-YMBXLRW5.mjs +374 -0
  72. package/dist/chunk-YPHOEJ46.mjs +64 -0
  73. package/dist/chunk-YUDCJRJM.mjs +25 -0
  74. package/dist/chunk-Z4EWP7BI.mjs +65 -0
  75. package/dist/chunk-ZB5LZQKC.mjs +191 -0
  76. package/dist/chunk-ZJRKATOJ.mjs +65 -0
  77. package/dist/color-BPKOPQKN.mjs +12 -0
  78. package/dist/estree-XC56IUFX.mjs +4414 -0
  79. package/dist/font-FEZ3GKSF.mjs +13 -0
  80. package/dist/font-size-EK775WRH.mjs +15 -0
  81. package/dist/html-S3ACX7NI.mjs +2738 -0
  82. package/dist/image-2PJIAYAT.mjs +993 -0
  83. package/dist/index.d.mts +145 -0
  84. package/dist/index.d.ts +145 -0
  85. package/dist/index.js +57855 -0
  86. package/dist/index.mjs +1790 -0
  87. package/dist/insert-gif-SAIDYURE.mjs +100 -0
  88. package/dist/insert-image-U3RJN3OW.mjs +259 -0
  89. package/dist/insert-node-5P2CRJ7S.mjs +201 -0
  90. package/dist/insert-poll-HCPM7MO6.mjs +33 -0
  91. package/dist/insert-table-24XYUS2W.mjs +66 -0
  92. package/dist/markdown-SNVBOSRA.mjs +3487 -0
  93. package/dist/poll-component-2R4MDLHS.mjs +303 -0
  94. package/dist/postcss-ONF3VDIM.mjs +5051 -0
  95. package/dist/standalone-EOIALU3M.mjs +2373 -0
  96. package/dist/stepper-FSARL6X6.mjs +304 -0
  97. package/dist/styles/notiq.css +1149 -0
  98. package/dist/text-align-VLECWO4H.mjs +118 -0
  99. package/dist/text-format-BG5WOOPZ.mjs +16 -0
  100. package/dist/typescript-AMPI6OVS.mjs +13135 -0
  101. package/package.json +94 -10
  102. package/src/styles/notiq.css +1149 -0
  103. package/src/styles/tailwind-plugin.ts +134 -0
  104. package/components.json +0 -21
  105. package/eslint.config.mjs +0 -16
  106. package/next.config.ts +0 -12
  107. package/postcss.config.mjs +0 -5
  108. package/public/file.svg +0 -1
  109. package/public/globe.svg +0 -1
  110. package/public/images/icons/plus.svg +0 -10
  111. package/public/next.svg +0 -1
  112. package/public/vercel.svg +0 -1
  113. package/public/window.svg +0 -1
  114. package/src/app/actions.ts +0 -2
  115. package/src/app/api/ai/route.ts +0 -175
  116. package/src/app/api/edgestore/[...edgestore]/route.ts +0 -28
  117. package/src/app/favicon.ico +0 -0
  118. package/src/app/globals.css +0 -205
  119. package/src/app/layout.tsx +0 -38
  120. package/src/app/page.tsx +0 -12
  121. package/src/components/editor/Core.tsx +0 -220
  122. package/src/components/editor/hooks/instructions-messages.ts +0 -300
  123. package/src/components/editor/hooks/use-mobile.ts +0 -19
  124. package/src/components/editor/hooks/useReport.ts +0 -67
  125. package/src/components/editor/hooks/useResizeObservert.ts +0 -22
  126. package/src/components/editor/index.tsx +0 -39
  127. package/src/components/editor/lexical-on-change.tsx +0 -28
  128. package/src/components/editor/nodes/CollapsibleNode/CollapsibleContainerNode.ts +0 -92
  129. package/src/components/editor/nodes/CollapsibleNode/CollapsibleContentNode.ts +0 -65
  130. package/src/components/editor/nodes/CollapsibleNode/CollapsibleTitleNode.ts +0 -105
  131. package/src/components/editor/nodes/EquationNode/EquationComponent.tsx +0 -143
  132. package/src/components/editor/nodes/EquationNode/EquationNode.tsx +0 -170
  133. package/src/components/editor/nodes/ExcalidrawNode/ExcalidrawComponent.tsx +0 -228
  134. package/src/components/editor/nodes/ExcalidrawNode/ExcalidrawImage.tsx +0 -137
  135. package/src/components/editor/nodes/ExcalidrawNode/ImageResizer.tsx +0 -317
  136. package/src/components/editor/nodes/ExcalidrawNode/index.tsx +0 -204
  137. package/src/components/editor/nodes/FigmaNode/FigmaNode.tsx +0 -134
  138. package/src/components/editor/nodes/Hint/HintComponet.tsx +0 -221
  139. package/src/components/editor/nodes/ImageNode/index.tsx +0 -328
  140. package/src/components/editor/nodes/InlineImageNode/InlineImageComponent.tsx +0 -383
  141. package/src/components/editor/nodes/InlineImageNode/InlineImageNode.css +0 -94
  142. package/src/components/editor/nodes/InlineImageNode/InlineImageNode.tsx +0 -309
  143. package/src/components/editor/nodes/LayoutNode/LayoutContainerNode.ts +0 -146
  144. package/src/components/editor/nodes/LayoutNode/LayoutItemNode.ts +0 -79
  145. package/src/components/editor/nodes/PollNode/index.tsx +0 -204
  146. package/src/components/editor/nodes/TweetNode/index.tsx +0 -214
  147. package/src/components/editor/nodes/index.ts +0 -81
  148. package/src/components/editor/plugins/AutoEmbedPlugin/index.tsx +0 -350
  149. package/src/components/editor/plugins/AutoLinkPlugin/index.tsx +0 -56
  150. package/src/components/editor/plugins/CodeActionMenuPlugin/components/CopyButton.tsx +0 -70
  151. package/src/components/editor/plugins/CodeActionMenuPlugin/components/PrettierButton.tsx +0 -192
  152. package/src/components/editor/plugins/CodeActionMenuPlugin/index.tsx +0 -217
  153. package/src/components/editor/plugins/CodeActionMenuPlugin/utils.ts +0 -26
  154. package/src/components/editor/plugins/CodeHighlightPlugin/index.ts +0 -21
  155. package/src/components/editor/plugins/CollapsiblePlugin/Collapsible.css +0 -76
  156. package/src/components/editor/plugins/CollapsiblePlugin/index.ts +0 -228
  157. package/src/components/editor/plugins/DragDropPastePlugin/index.tsx +0 -44
  158. package/src/components/editor/plugins/DraggableBlockPlugin/index.tsx +0 -52
  159. package/src/components/editor/plugins/EquationsPlugin/index.tsx +0 -85
  160. package/src/components/editor/plugins/ExcalidrawPlugin/index.tsx +0 -98
  161. package/src/components/editor/plugins/FigmaPlugin/index.tsx +0 -42
  162. package/src/components/editor/plugins/FloatingLinkEditorPlugin/index.tsx +0 -445
  163. package/src/components/editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx +0 -275
  164. package/src/components/editor/plugins/InlineImagePlugin/index.tsx +0 -351
  165. package/src/components/editor/plugins/LayoutPlugin/index.tsx +0 -238
  166. package/src/components/editor/plugins/LinkPlugin/index.tsx +0 -36
  167. package/src/components/editor/plugins/LinkWithMetaData/index.tsx +0 -271
  168. package/src/components/editor/plugins/MarkdownShortcutPlugin/index.tsx +0 -11
  169. package/src/components/editor/plugins/MarkdownTransformers/index.tsx +0 -304
  170. package/src/components/editor/plugins/PollPlugin/index.tsx +0 -49
  171. package/src/components/editor/plugins/ShortcutsPlugin/index.tsx +0 -180
  172. package/src/components/editor/plugins/ShortcutsPlugin/shortcuts.ts +0 -253
  173. package/src/components/editor/plugins/SlashCommand/index.tsx +0 -621
  174. package/src/components/editor/plugins/SpeechToTextPlugin/index.ts +0 -127
  175. package/src/components/editor/plugins/TabFocusPlugin/index.ts +0 -58
  176. package/src/components/editor/plugins/TableCellResizer/index.tsx +0 -438
  177. package/src/components/editor/plugins/TablePlugin/index.tsx +0 -99
  178. package/src/components/editor/plugins/ToolbarPlugin/index.tsx +0 -522
  179. package/src/components/editor/plugins/TwitterPlugin/index.ts +0 -35
  180. package/src/components/editor/plugins/YouTubeNode/index.tsx +0 -179
  181. package/src/components/editor/plugins/YouTubePlugin/index.ts +0 -41
  182. package/src/components/editor/themes/editor-theme.ts +0 -113
  183. package/src/components/editor/themes/theme.css +0 -377
  184. package/src/components/editor/utils/ai.ts +0 -291
  185. package/src/components/editor/utils/canUseDOM.ts +0 -12
  186. package/src/components/editor/utils/environment.ts +0 -50
  187. package/src/components/editor/utils/extract-data.ts +0 -166
  188. package/src/components/editor/utils/getAllLexicalChildren.ts +0 -13
  189. package/src/components/editor/utils/getDOMRangeRect.ts +0 -27
  190. package/src/components/editor/utils/getSelectedNode.ts +0 -27
  191. package/src/components/editor/utils/gif.ts +0 -29
  192. package/src/components/editor/utils/invariant.ts +0 -15
  193. package/src/components/editor/utils/setFloatingElemPosition.ts +0 -51
  194. package/src/components/editor/utils/setFloatingElemPositionForLinkEditor.ts +0 -40
  195. package/src/components/editor/utils/setNodePlaceholderFromSelection/getNodePlaceholder.ts +0 -51
  196. package/src/components/editor/utils/setNodePlaceholderFromSelection/setNodePlaceholderFromSelection.ts +0 -15
  197. package/src/components/editor/utils/setNodePlaceholderFromSelection/setPlaceholderOnSelection.ts +0 -114
  198. package/src/components/editor/utils/setNodePlaceholderFromSelection/styles.css +0 -6
  199. package/src/components/editor/utils/url.ts +0 -109
  200. package/src/components/editor/utils/useLayoutEffect.ts +0 -13
  201. package/src/components/providers/QueryProvider.tsx +0 -15
  202. package/src/components/providers/SharedHistoryContext.tsx +0 -28
  203. package/src/components/providers/ToolbarContext.tsx +0 -123
  204. package/src/components/providers/theme-provider.tsx +0 -11
  205. package/src/components/theme/ModeToggle.tsx +0 -40
  206. package/src/components/ui/FileInput.tsx +0 -40
  207. package/src/components/ui/Input.css +0 -32
  208. package/src/components/ui/Select.css +0 -42
  209. package/src/components/ui/Select.tsx +0 -36
  210. package/src/components/ui/TextInput.tsx +0 -48
  211. package/src/components/ui/ai/ai-button.tsx +0 -574
  212. package/src/components/ui/ai/border.tsx +0 -99
  213. package/src/components/ui/ai/placeholder-input-vanish.tsx +0 -282
  214. package/src/components/ui/button.tsx +0 -89
  215. package/src/components/ui/card.tsx +0 -76
  216. package/src/components/ui/checkbox.tsx +0 -30
  217. package/src/components/ui/command.tsx +0 -153
  218. package/src/components/ui/dialog/Dialog.css +0 -25
  219. package/src/components/ui/dialog/Dialog.tsx +0 -34
  220. package/src/components/ui/dialog.tsx +0 -122
  221. package/src/components/ui/drop-downs/background-color.tsx +0 -183
  222. package/src/components/ui/drop-downs/block-format.tsx +0 -159
  223. package/src/components/ui/drop-downs/code.tsx +0 -42
  224. package/src/components/ui/drop-downs/color.tsx +0 -177
  225. package/src/components/ui/drop-downs/font-size.tsx +0 -138
  226. package/src/components/ui/drop-downs/font.tsx +0 -155
  227. package/src/components/ui/drop-downs/index.tsx +0 -122
  228. package/src/components/ui/drop-downs/insert-node.tsx +0 -213
  229. package/src/components/ui/drop-downs/text-align.tsx +0 -123
  230. package/src/components/ui/drop-downs/text-format.tsx +0 -104
  231. package/src/components/ui/dropdown-menu.tsx +0 -201
  232. package/src/components/ui/equation/EquationEditor.css +0 -38
  233. package/src/components/ui/equation/EquationEditor.tsx +0 -56
  234. package/src/components/ui/equation/KatexEquationAlterer.css +0 -41
  235. package/src/components/ui/equation/KatexEquationAlterer.tsx +0 -83
  236. package/src/components/ui/equation/KatexRenderer.tsx +0 -66
  237. package/src/components/ui/excalidraw/ExcalidrawModal.css +0 -64
  238. package/src/components/ui/excalidraw/ExcalidrawModal.tsx +0 -234
  239. package/src/components/ui/excalidraw/Modal.css +0 -62
  240. package/src/components/ui/excalidraw/Modal.tsx +0 -110
  241. package/src/components/ui/hover-card.tsx +0 -29
  242. package/src/components/ui/image/error-image.tsx +0 -17
  243. package/src/components/ui/image/file-upload.tsx +0 -240
  244. package/src/components/ui/image/image-resizer.tsx +0 -297
  245. package/src/components/ui/image/image-toolbar.tsx +0 -264
  246. package/src/components/ui/image/index.tsx +0 -408
  247. package/src/components/ui/image/lazy-image.tsx +0 -68
  248. package/src/components/ui/image/lazy-video.tsx +0 -71
  249. package/src/components/ui/input.tsx +0 -22
  250. package/src/components/ui/models/custom-dialog.tsx +0 -320
  251. package/src/components/ui/models/insert-gif.tsx +0 -90
  252. package/src/components/ui/models/insert-image.tsx +0 -52
  253. package/src/components/ui/models/insert-poll.tsx +0 -29
  254. package/src/components/ui/models/insert-table.tsx +0 -62
  255. package/src/components/ui/models/use-model.tsx +0 -91
  256. package/src/components/ui/poll/poll-component.tsx +0 -304
  257. package/src/components/ui/popover.tsx +0 -33
  258. package/src/components/ui/progress.tsx +0 -28
  259. package/src/components/ui/scroll-area.tsx +0 -48
  260. package/src/components/ui/separator.tsx +0 -31
  261. package/src/components/ui/skeleton.tsx +0 -15
  262. package/src/components/ui/sonner.tsx +0 -31
  263. package/src/components/ui/stepper/step.tsx +0 -179
  264. package/src/components/ui/stepper/stepper.tsx +0 -89
  265. package/src/components/ui/textarea.tsx +0 -22
  266. package/src/components/ui/toggle.tsx +0 -71
  267. package/src/components/ui/tooltip.tsx +0 -32
  268. package/src/components/ui/write/text-format-floting-toolbar.tsx +0 -346
  269. package/src/lib/edgestore.ts +0 -9
  270. package/src/lib/pinecone-client.ts +0 -0
  271. package/src/lib/utils.ts +0 -6
  272. package/src/utils/docSerialization.ts +0 -77
  273. package/src/utils/emoji-list.ts +0 -16615
  274. package/src/utils/getDOMRangeRect.ts +0 -27
  275. package/src/utils/getThemeSelector.ts +0 -25
  276. package/src/utils/isMobileWidth.ts +0 -7
  277. package/src/utils/joinClasses.ts +0 -13
  278. package/src/utils/setFloatingElemPosition.ts +0 -74
  279. package/src/utils/setFloatingElemPositionForLinkEditor.ts +0 -46
  280. package/src/utils/swipe.ts +0 -127
  281. package/src/utils/url.ts +0 -38
  282. package/tsconfig.json +0 -27
@@ -0,0 +1,2373 @@
1
+ import {
2
+ __objRest,
3
+ __publicField,
4
+ __spreadProps,
5
+ __spreadValues,
6
+ init_react_shim
7
+ } from "./chunk-77KXU36M.mjs";
8
+
9
+ // node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/standalone.mjs
10
+ init_react_shim();
11
+ var Fu = Object.create;
12
+ var pt = Object.defineProperty;
13
+ var pu = Object.getOwnPropertyDescriptor;
14
+ var du = Object.getOwnPropertyNames;
15
+ var mu = Object.getPrototypeOf;
16
+ var Eu = Object.prototype.hasOwnProperty;
17
+ var er = (e) => {
18
+ throw TypeError(e);
19
+ };
20
+ var Cu = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
21
+ var dt = (e, t) => {
22
+ for (var r in t) pt(e, r, { get: t[r], enumerable: true });
23
+ };
24
+ var hu = (e, t, r, n) => {
25
+ if (t && typeof t == "object" || typeof t == "function") for (let u of du(t)) !Eu.call(e, u) && u !== r && pt(e, u, { get: () => t[u], enumerable: !(n = pu(t, u)) || n.enumerable });
26
+ return e;
27
+ };
28
+ var gu = (e, t, r) => (r = e != null ? Fu(mu(e)) : {}, hu(t || !e || !e.__esModule ? pt(r, "default", { value: e, enumerable: true }) : r, e));
29
+ var yu = (e, t, r) => t.has(e) || er("Cannot " + r);
30
+ var tr = (e, t, r) => t.has(e) ? er("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r);
31
+ var fe = (e, t, r) => (yu(e, t, "access private method"), r);
32
+ var Pn = Cu((Mt) => {
33
+ "use strict";
34
+ Object.defineProperty(Mt, "__esModule", { value: true });
35
+ function Co() {
36
+ return new Proxy({}, { get: () => (e) => e });
37
+ }
38
+ var On = /\r\n|[\n\r\u2028\u2029]/;
39
+ function ho(e, t, r) {
40
+ let n = Object.assign({ column: 0, line: -1 }, e.start), u = Object.assign({}, n, e.end), { linesAbove: o = 2, linesBelow: i = 3 } = r || {}, s = n.line, a = n.column, c = u.line, D = u.column, p = Math.max(s - (o + 1), 0), l = Math.min(t.length, c + i);
41
+ s === -1 && (p = 0), c === -1 && (l = t.length);
42
+ let F = c - s, f = {};
43
+ if (F) for (let d = 0; d <= F; d++) {
44
+ let m = d + s;
45
+ if (!a) f[m] = true;
46
+ else if (d === 0) {
47
+ let C = t[m - 1].length;
48
+ f[m] = [a, C - a + 1];
49
+ } else if (d === F) f[m] = [0, D];
50
+ else {
51
+ let C = t[m - d].length;
52
+ f[m] = [0, C];
53
+ }
54
+ }
55
+ else a === D ? a ? f[s] = [a, 0] : f[s] = true : f[s] = [a, D - a];
56
+ return { start: p, end: l, markerLines: f };
57
+ }
58
+ function go(e, t, r = {}) {
59
+ let u = Co(false), o = e.split(On), { start: i, end: s, markerLines: a } = ho(t, o, r), c = t.start && typeof t.start.column == "number", D = String(s).length, l = e.split(On, s).slice(i, s).map((F, f) => {
60
+ let d = i + 1 + f, C = ` ${` ${d}`.slice(-D)} |`, E = a[d], h = !a[d + 1];
61
+ if (E) {
62
+ let x = "";
63
+ if (Array.isArray(E)) {
64
+ let A = F.slice(0, Math.max(E[0] - 1, 0)).replace(/[^\t]/g, " "), $ = E[1] || 1;
65
+ x = [`
66
+ `, u.gutter(C.replace(/\d/g, " ")), " ", A, u.marker("^").repeat($)].join(""), h && r.message && (x += " " + u.message(r.message));
67
+ }
68
+ return [u.marker(">"), u.gutter(C), F.length > 0 ? ` ${F}` : "", x].join("");
69
+ } else return ` ${u.gutter(C)}${F.length > 0 ? ` ${F}` : ""}`;
70
+ }).join(`
71
+ `);
72
+ return r.message && !c && (l = `${" ".repeat(D + 1)}${r.message}
73
+ ${l}`), l;
74
+ }
75
+ Mt.codeFrameColumns = go;
76
+ });
77
+ var Zt = {};
78
+ dt(Zt, { __debug: () => ui, check: () => ri, doc: () => qt, format: () => fu, formatWithCursor: () => cu, getSupportInfo: () => ni, util: () => Qt, version: () => tu });
79
+ var Au = (e, t, r, n) => {
80
+ if (!(e && t == null)) return t.replaceAll ? t.replaceAll(r, n) : r.global ? t.replace(r, n) : t.split(r).join(n);
81
+ };
82
+ var te = Au;
83
+ var _e = class {
84
+ diff(t, r, n = {}) {
85
+ let u;
86
+ typeof n == "function" ? (u = n, n = {}) : "callback" in n && (u = n.callback);
87
+ let o = this.castInput(t, n), i = this.castInput(r, n), s = this.removeEmpty(this.tokenize(o, n)), a = this.removeEmpty(this.tokenize(i, n));
88
+ return this.diffWithOptionsObj(s, a, n, u);
89
+ }
90
+ diffWithOptionsObj(t, r, n, u) {
91
+ var o;
92
+ let i = (E) => {
93
+ if (E = this.postProcess(E, n), u) {
94
+ setTimeout(function() {
95
+ u(E);
96
+ }, 0);
97
+ return;
98
+ } else return E;
99
+ }, s = r.length, a = t.length, c = 1, D = s + a;
100
+ n.maxEditLength != null && (D = Math.min(D, n.maxEditLength));
101
+ let p = (o = n.timeout) !== null && o !== void 0 ? o : 1 / 0, l = Date.now() + p, F = [{ oldPos: -1, lastComponent: void 0 }], f = this.extractCommon(F[0], r, t, 0, n);
102
+ if (F[0].oldPos + 1 >= a && f + 1 >= s) return i(this.buildValues(F[0].lastComponent, r, t));
103
+ let d = -1 / 0, m = 1 / 0, C = () => {
104
+ for (let E = Math.max(d, -c); E <= Math.min(m, c); E += 2) {
105
+ let h, x = F[E - 1], A = F[E + 1];
106
+ x && (F[E - 1] = void 0);
107
+ let $ = false;
108
+ if (A) {
109
+ let Be = A.oldPos - E;
110
+ $ = A && 0 <= Be && Be < s;
111
+ }
112
+ let ue = x && x.oldPos + 1 < a;
113
+ if (!$ && !ue) {
114
+ F[E] = void 0;
115
+ continue;
116
+ }
117
+ if (!ue || $ && x.oldPos < A.oldPos ? h = this.addToPath(A, true, false, 0, n) : h = this.addToPath(x, false, true, 1, n), f = this.extractCommon(h, r, t, E, n), h.oldPos + 1 >= a && f + 1 >= s) return i(this.buildValues(h.lastComponent, r, t)) || true;
118
+ F[E] = h, h.oldPos + 1 >= a && (m = Math.min(m, E - 1)), f + 1 >= s && (d = Math.max(d, E + 1));
119
+ }
120
+ c++;
121
+ };
122
+ if (u) (function E() {
123
+ setTimeout(function() {
124
+ if (c > D || Date.now() > l) return u(void 0);
125
+ C() || E();
126
+ }, 0);
127
+ })();
128
+ else for (; c <= D && Date.now() <= l; ) {
129
+ let E = C();
130
+ if (E) return E;
131
+ }
132
+ }
133
+ addToPath(t, r, n, u, o) {
134
+ let i = t.lastComponent;
135
+ return i && !o.oneChangePerToken && i.added === r && i.removed === n ? { oldPos: t.oldPos + u, lastComponent: { count: i.count + 1, added: r, removed: n, previousComponent: i.previousComponent } } : { oldPos: t.oldPos + u, lastComponent: { count: 1, added: r, removed: n, previousComponent: i } };
136
+ }
137
+ extractCommon(t, r, n, u, o) {
138
+ let i = r.length, s = n.length, a = t.oldPos, c = a - u, D = 0;
139
+ for (; c + 1 < i && a + 1 < s && this.equals(n[a + 1], r[c + 1], o); ) c++, a++, D++, o.oneChangePerToken && (t.lastComponent = { count: 1, previousComponent: t.lastComponent, added: false, removed: false });
140
+ return D && !o.oneChangePerToken && (t.lastComponent = { count: D, previousComponent: t.lastComponent, added: false, removed: false }), t.oldPos = a, c;
141
+ }
142
+ equals(t, r, n) {
143
+ return n.comparator ? n.comparator(t, r) : t === r || !!n.ignoreCase && t.toLowerCase() === r.toLowerCase();
144
+ }
145
+ removeEmpty(t) {
146
+ let r = [];
147
+ for (let n = 0; n < t.length; n++) t[n] && r.push(t[n]);
148
+ return r;
149
+ }
150
+ castInput(t, r) {
151
+ return t;
152
+ }
153
+ tokenize(t, r) {
154
+ return Array.from(t);
155
+ }
156
+ join(t) {
157
+ return t.join("");
158
+ }
159
+ postProcess(t, r) {
160
+ return t;
161
+ }
162
+ get useLongestToken() {
163
+ return false;
164
+ }
165
+ buildValues(t, r, n) {
166
+ let u = [], o;
167
+ for (; t; ) u.push(t), o = t.previousComponent, delete t.previousComponent, t = o;
168
+ u.reverse();
169
+ let i = u.length, s = 0, a = 0, c = 0;
170
+ for (; s < i; s++) {
171
+ let D = u[s];
172
+ if (D.removed) D.value = this.join(n.slice(c, c + D.count)), c += D.count;
173
+ else {
174
+ if (!D.added && this.useLongestToken) {
175
+ let p = r.slice(a, a + D.count);
176
+ p = p.map(function(l, F) {
177
+ let f = n[c + F];
178
+ return f.length > l.length ? f : l;
179
+ }), D.value = this.join(p);
180
+ } else D.value = this.join(r.slice(a, a + D.count));
181
+ a += D.count, D.added || (c += D.count);
182
+ }
183
+ }
184
+ return u;
185
+ }
186
+ };
187
+ var mt = class extends _e {
188
+ tokenize(t) {
189
+ return t.slice();
190
+ }
191
+ join(t) {
192
+ return t;
193
+ }
194
+ removeEmpty(t) {
195
+ return t;
196
+ }
197
+ };
198
+ var rr = new mt();
199
+ function Et(e, t, r) {
200
+ return rr.diff(e, t, r);
201
+ }
202
+ function nr(e) {
203
+ let t = e.indexOf("\r");
204
+ return t !== -1 ? e.charAt(t + 1) === `
205
+ ` ? "crlf" : "cr" : "lf";
206
+ }
207
+ function xe(e) {
208
+ switch (e) {
209
+ case "cr":
210
+ return "\r";
211
+ case "crlf":
212
+ return `\r
213
+ `;
214
+ default:
215
+ return `
216
+ `;
217
+ }
218
+ }
219
+ function Ct(e, t) {
220
+ let r;
221
+ switch (t) {
222
+ case `
223
+ `:
224
+ r = /\n/gu;
225
+ break;
226
+ case "\r":
227
+ r = /\r/gu;
228
+ break;
229
+ case `\r
230
+ `:
231
+ r = /\r\n/gu;
232
+ break;
233
+ default:
234
+ throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`);
235
+ }
236
+ let n = e.match(r);
237
+ return n ? n.length : 0;
238
+ }
239
+ function ur(e) {
240
+ return te(false, e, /\r\n?/gu, `
241
+ `);
242
+ }
243
+ var W = "string";
244
+ var Y = "array";
245
+ var j = "cursor";
246
+ var N = "indent";
247
+ var O = "align";
248
+ var P = "trim";
249
+ var B = "group";
250
+ var k = "fill";
251
+ var _ = "if-break";
252
+ var v = "indent-if-break";
253
+ var L = "line-suffix";
254
+ var I = "line-suffix-boundary";
255
+ var g = "line";
256
+ var S = "label";
257
+ var w = "break-parent";
258
+ var Ue = /* @__PURE__ */ new Set([j, N, O, P, B, k, _, v, L, I, g, S, w]);
259
+ var Bu = (e, t, r) => {
260
+ if (!(e && t == null)) return Array.isArray(t) || typeof t == "string" ? t[r < 0 ? t.length + r : r] : t.at(r);
261
+ };
262
+ var y = Bu;
263
+ function or(e) {
264
+ let t = e.length;
265
+ for (; t > 0 && (e[t - 1] === "\r" || e[t - 1] === `
266
+ `); ) t--;
267
+ return t < e.length ? e.slice(0, t) : e;
268
+ }
269
+ function _u(e) {
270
+ if (typeof e == "string") return W;
271
+ if (Array.isArray(e)) return Y;
272
+ if (!e) return;
273
+ let { type: t } = e;
274
+ if (Ue.has(t)) return t;
275
+ }
276
+ var M = _u;
277
+ var xu = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
278
+ function wu(e) {
279
+ let t = e === null ? "null" : typeof e;
280
+ if (t !== "string" && t !== "object") return `Unexpected doc '${t}',
281
+ Expected it to be 'string' or 'object'.`;
282
+ if (M(e)) throw new Error("doc is valid.");
283
+ let r = Object.prototype.toString.call(e);
284
+ if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
285
+ let n = xu([...Ue].map((u) => `'${u}'`));
286
+ return `Unexpected doc.type '${e.type}'.
287
+ Expected it to be ${n}.`;
288
+ }
289
+ var ht = class extends Error {
290
+ constructor(t) {
291
+ super(wu(t));
292
+ __publicField(this, "name", "InvalidDocError");
293
+ this.doc = t;
294
+ }
295
+ };
296
+ var q = ht;
297
+ var ir = {};
298
+ function bu(e, t, r, n) {
299
+ let u = [e];
300
+ for (; u.length > 0; ) {
301
+ let o = u.pop();
302
+ if (o === ir) {
303
+ r(u.pop());
304
+ continue;
305
+ }
306
+ r && u.push(o, ir);
307
+ let i = M(o);
308
+ if (!i) throw new q(o);
309
+ if ((t == null ? void 0 : t(o)) !== false) switch (i) {
310
+ case Y:
311
+ case k: {
312
+ let s = i === Y ? o : o.parts;
313
+ for (let a = s.length, c = a - 1; c >= 0; --c) u.push(s[c]);
314
+ break;
315
+ }
316
+ case _:
317
+ u.push(o.flatContents, o.breakContents);
318
+ break;
319
+ case B:
320
+ if (n && o.expandedStates) for (let s = o.expandedStates.length, a = s - 1; a >= 0; --a) u.push(o.expandedStates[a]);
321
+ else u.push(o.contents);
322
+ break;
323
+ case O:
324
+ case N:
325
+ case v:
326
+ case S:
327
+ case L:
328
+ u.push(o.contents);
329
+ break;
330
+ case W:
331
+ case j:
332
+ case P:
333
+ case I:
334
+ case g:
335
+ case w:
336
+ break;
337
+ default:
338
+ throw new q(o);
339
+ }
340
+ }
341
+ }
342
+ var le = bu;
343
+ function be(e, t) {
344
+ if (typeof e == "string") return t(e);
345
+ let r = /* @__PURE__ */ new Map();
346
+ return n(e);
347
+ function n(o) {
348
+ if (r.has(o)) return r.get(o);
349
+ let i = u(o);
350
+ return r.set(o, i), i;
351
+ }
352
+ function u(o) {
353
+ switch (M(o)) {
354
+ case Y:
355
+ return t(o.map(n));
356
+ case k:
357
+ return t(__spreadProps(__spreadValues({}, o), { parts: o.parts.map(n) }));
358
+ case _:
359
+ return t(__spreadProps(__spreadValues({}, o), { breakContents: n(o.breakContents), flatContents: n(o.flatContents) }));
360
+ case B: {
361
+ let { expandedStates: i, contents: s } = o;
362
+ return i ? (i = i.map(n), s = i[0]) : s = n(s), t(__spreadProps(__spreadValues({}, o), { contents: s, expandedStates: i }));
363
+ }
364
+ case O:
365
+ case N:
366
+ case v:
367
+ case S:
368
+ case L:
369
+ return t(__spreadProps(__spreadValues({}, o), { contents: n(o.contents) }));
370
+ case W:
371
+ case j:
372
+ case P:
373
+ case I:
374
+ case g:
375
+ case w:
376
+ return t(o);
377
+ default:
378
+ throw new q(o);
379
+ }
380
+ }
381
+ }
382
+ function Ve(e, t, r) {
383
+ let n = r, u = false;
384
+ function o(i) {
385
+ if (u) return false;
386
+ let s = t(i);
387
+ s !== void 0 && (u = true, n = s);
388
+ }
389
+ return le(e, o), n;
390
+ }
391
+ function ku(e) {
392
+ if (e.type === B && e.break || e.type === g && e.hard || e.type === w) return true;
393
+ }
394
+ function Dr(e) {
395
+ return Ve(e, ku, false);
396
+ }
397
+ function sr(e) {
398
+ if (e.length > 0) {
399
+ let t = y(false, e, -1);
400
+ !t.expandedStates && !t.break && (t.break = "propagated");
401
+ }
402
+ return null;
403
+ }
404
+ function cr(e) {
405
+ let t = /* @__PURE__ */ new Set(), r = [];
406
+ function n(o) {
407
+ if (o.type === w && sr(r), o.type === B) {
408
+ if (r.push(o), t.has(o)) return false;
409
+ t.add(o);
410
+ }
411
+ }
412
+ function u(o) {
413
+ o.type === B && r.pop().break && sr(r);
414
+ }
415
+ le(e, n, u, true);
416
+ }
417
+ function Su(e) {
418
+ return e.type === g && !e.hard ? e.soft ? "" : " " : e.type === _ ? e.flatContents : e;
419
+ }
420
+ function fr(e) {
421
+ return be(e, Su);
422
+ }
423
+ function ar(e) {
424
+ for (e = [...e]; e.length >= 2 && y(false, e, -2).type === g && y(false, e, -1).type === w; ) e.length -= 2;
425
+ if (e.length > 0) {
426
+ let t = we(y(false, e, -1));
427
+ e[e.length - 1] = t;
428
+ }
429
+ return e;
430
+ }
431
+ function we(e) {
432
+ switch (M(e)) {
433
+ case N:
434
+ case v:
435
+ case B:
436
+ case L:
437
+ case S: {
438
+ let t = we(e.contents);
439
+ return __spreadProps(__spreadValues({}, e), { contents: t });
440
+ }
441
+ case _:
442
+ return __spreadProps(__spreadValues({}, e), { breakContents: we(e.breakContents), flatContents: we(e.flatContents) });
443
+ case k:
444
+ return __spreadProps(__spreadValues({}, e), { parts: ar(e.parts) });
445
+ case Y:
446
+ return ar(e);
447
+ case W:
448
+ return or(e);
449
+ case O:
450
+ case j:
451
+ case P:
452
+ case I:
453
+ case g:
454
+ case w:
455
+ break;
456
+ default:
457
+ throw new q(e);
458
+ }
459
+ return e;
460
+ }
461
+ function $e(e) {
462
+ return we(Nu(e));
463
+ }
464
+ function Tu(e) {
465
+ switch (M(e)) {
466
+ case k:
467
+ if (e.parts.every((t) => t === "")) return "";
468
+ break;
469
+ case B:
470
+ if (!e.contents && !e.id && !e.break && !e.expandedStates) return "";
471
+ if (e.contents.type === B && e.contents.id === e.id && e.contents.break === e.break && e.contents.expandedStates === e.expandedStates) return e.contents;
472
+ break;
473
+ case O:
474
+ case N:
475
+ case v:
476
+ case L:
477
+ if (!e.contents) return "";
478
+ break;
479
+ case _:
480
+ if (!e.flatContents && !e.breakContents) return "";
481
+ break;
482
+ case Y: {
483
+ let t = [];
484
+ for (let r of e) {
485
+ if (!r) continue;
486
+ let [n, ...u] = Array.isArray(r) ? r : [r];
487
+ typeof n == "string" && typeof y(false, t, -1) == "string" ? t[t.length - 1] += n : t.push(n), t.push(...u);
488
+ }
489
+ return t.length === 0 ? "" : t.length === 1 ? t[0] : t;
490
+ }
491
+ case W:
492
+ case j:
493
+ case P:
494
+ case I:
495
+ case g:
496
+ case S:
497
+ case w:
498
+ break;
499
+ default:
500
+ throw new q(e);
501
+ }
502
+ return e;
503
+ }
504
+ function Nu(e) {
505
+ return be(e, (t) => Tu(t));
506
+ }
507
+ function lr(e, t = We) {
508
+ return be(e, (r) => typeof r == "string" ? ke(t, r.split(`
509
+ `)) : r);
510
+ }
511
+ function Ou(e) {
512
+ if (e.type === g) return true;
513
+ }
514
+ function Fr(e) {
515
+ return Ve(e, Ou, false);
516
+ }
517
+ function Fe(e, t) {
518
+ return e.type === S ? __spreadProps(__spreadValues({}, e), { contents: t(e.contents) }) : t(e);
519
+ }
520
+ var gt = () => {
521
+ };
522
+ var K = gt;
523
+ var yt = gt;
524
+ var pr = gt;
525
+ function ie(e) {
526
+ return K(e), { type: N, contents: e };
527
+ }
528
+ function oe(e, t) {
529
+ return K(t), { type: O, contents: t, n: e };
530
+ }
531
+ function At(e, t = {}) {
532
+ return K(e), yt(t.expandedStates, true), { type: B, id: t.id, contents: e, break: !!t.shouldBreak, expandedStates: t.expandedStates };
533
+ }
534
+ function dr(e) {
535
+ return oe(Number.NEGATIVE_INFINITY, e);
536
+ }
537
+ function mr(e) {
538
+ return oe({ type: "root" }, e);
539
+ }
540
+ function Er(e) {
541
+ return oe(-1, e);
542
+ }
543
+ function Cr(e, t) {
544
+ return At(e[0], __spreadProps(__spreadValues({}, t), { expandedStates: e }));
545
+ }
546
+ function hr(e) {
547
+ return pr(e), { type: k, parts: e };
548
+ }
549
+ function gr(e, t = "", r = {}) {
550
+ return K(e), t !== "" && K(t), { type: _, breakContents: e, flatContents: t, groupId: r.groupId };
551
+ }
552
+ function yr(e, t) {
553
+ return K(e), { type: v, contents: e, groupId: t.groupId, negate: t.negate };
554
+ }
555
+ function Se(e) {
556
+ return K(e), { type: L, contents: e };
557
+ }
558
+ var Ar = { type: I };
559
+ var pe = { type: w };
560
+ var Br = { type: P };
561
+ var Te = { type: g, hard: true };
562
+ var Bt = { type: g, hard: true, literal: true };
563
+ var Me = { type: g };
564
+ var _r = { type: g, soft: true };
565
+ var z = [Te, pe];
566
+ var We = [Bt, pe];
567
+ var X = { type: j };
568
+ function ke(e, t) {
569
+ K(e), yt(t);
570
+ let r = [];
571
+ for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]);
572
+ return r;
573
+ }
574
+ function Ge(e, t, r) {
575
+ K(e);
576
+ let n = e;
577
+ if (t > 0) {
578
+ for (let u = 0; u < Math.floor(t / r); ++u) n = ie(n);
579
+ n = oe(t % r, n), n = oe(Number.NEGATIVE_INFINITY, n);
580
+ }
581
+ return n;
582
+ }
583
+ function xr(e, t) {
584
+ return K(t), e ? { type: S, label: e, contents: t } : t;
585
+ }
586
+ function Q(e) {
587
+ var t;
588
+ if (!e) return "";
589
+ if (Array.isArray(e)) {
590
+ let r = [];
591
+ for (let n of e) if (Array.isArray(n)) r.push(...Q(n));
592
+ else {
593
+ let u = Q(n);
594
+ u !== "" && r.push(u);
595
+ }
596
+ return r;
597
+ }
598
+ return e.type === _ ? __spreadProps(__spreadValues({}, e), { breakContents: Q(e.breakContents), flatContents: Q(e.flatContents) }) : e.type === B ? __spreadProps(__spreadValues({}, e), { contents: Q(e.contents), expandedStates: (t = e.expandedStates) == null ? void 0 : t.map(Q) }) : e.type === k ? { type: "fill", parts: e.parts.map(Q) } : e.contents ? __spreadProps(__spreadValues({}, e), { contents: Q(e.contents) }) : e;
599
+ }
600
+ function wr(e) {
601
+ let t = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ new Set();
602
+ return n(Q(e));
603
+ function n(o, i, s) {
604
+ var a, c;
605
+ if (typeof o == "string") return JSON.stringify(o);
606
+ if (Array.isArray(o)) {
607
+ let D = o.map(n).filter(Boolean);
608
+ return D.length === 1 ? D[0] : `[${D.join(", ")}]`;
609
+ }
610
+ if (o.type === g) {
611
+ let D = ((a = s == null ? void 0 : s[i + 1]) == null ? void 0 : a.type) === w;
612
+ return o.literal ? D ? "literalline" : "literallineWithoutBreakParent" : o.hard ? D ? "hardline" : "hardlineWithoutBreakParent" : o.soft ? "softline" : "line";
613
+ }
614
+ if (o.type === w) return ((c = s == null ? void 0 : s[i - 1]) == null ? void 0 : c.type) === g && s[i - 1].hard ? void 0 : "breakParent";
615
+ if (o.type === P) return "trim";
616
+ if (o.type === N) return "indent(" + n(o.contents) + ")";
617
+ if (o.type === O) return o.n === Number.NEGATIVE_INFINITY ? "dedentToRoot(" + n(o.contents) + ")" : o.n < 0 ? "dedent(" + n(o.contents) + ")" : o.n.type === "root" ? "markAsRoot(" + n(o.contents) + ")" : "align(" + JSON.stringify(o.n) + ", " + n(o.contents) + ")";
618
+ if (o.type === _) return "ifBreak(" + n(o.breakContents) + (o.flatContents ? ", " + n(o.flatContents) : "") + (o.groupId ? (o.flatContents ? "" : ', ""') + `, { groupId: ${u(o.groupId)} }` : "") + ")";
619
+ if (o.type === v) {
620
+ let D = [];
621
+ o.negate && D.push("negate: true"), o.groupId && D.push(`groupId: ${u(o.groupId)}`);
622
+ let p = D.length > 0 ? `, { ${D.join(", ")} }` : "";
623
+ return `indentIfBreak(${n(o.contents)}${p})`;
624
+ }
625
+ if (o.type === B) {
626
+ let D = [];
627
+ o.break && o.break !== "propagated" && D.push("shouldBreak: true"), o.id && D.push(`id: ${u(o.id)}`);
628
+ let p = D.length > 0 ? `, { ${D.join(", ")} }` : "";
629
+ return o.expandedStates ? `conditionalGroup([${o.expandedStates.map((l) => n(l)).join(",")}]${p})` : `group(${n(o.contents)}${p})`;
630
+ }
631
+ if (o.type === k) return `fill([${o.parts.map((D) => n(D)).join(", ")}])`;
632
+ if (o.type === L) return "lineSuffix(" + n(o.contents) + ")";
633
+ if (o.type === I) return "lineSuffixBoundary";
634
+ if (o.type === S) return `label(${JSON.stringify(o.label)}, ${n(o.contents)})`;
635
+ if (o.type === j) return "cursor";
636
+ throw new Error("Unknown doc type " + o.type);
637
+ }
638
+ function u(o) {
639
+ if (typeof o != "symbol") return JSON.stringify(String(o));
640
+ if (o in t) return t[o];
641
+ let i = o.description || "symbol";
642
+ for (let s = 0; ; s++) {
643
+ let a = i + (s > 0 ? ` #${s}` : "");
644
+ if (!r.has(a)) return r.add(a), t[o] = `Symbol.for(${JSON.stringify(a)})`;
645
+ }
646
+ }
647
+ }
648
+ var br = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
649
+ function kr(e) {
650
+ return e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
651
+ }
652
+ function Sr(e) {
653
+ return e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9776 && e <= 9783 || e >= 9800 && e <= 9811 || e === 9855 || e >= 9866 && e <= 9871 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12773 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101631 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e >= 119552 && e <= 119638 || e >= 119648 && e <= 119670 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129673 || e >= 129679 && e <= 129734 || e >= 129742 && e <= 129756 || e >= 129759 && e <= 129769 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141;
654
+ }
655
+ var Tr = (e) => !(kr(e) || Sr(e));
656
+ var Pu = /[^\x20-\x7F]/u;
657
+ function vu(e) {
658
+ if (!e) return 0;
659
+ if (!Pu.test(e)) return e.length;
660
+ e = e.replace(br(), " ");
661
+ let t = 0;
662
+ for (let r of e) {
663
+ let n = r.codePointAt(0);
664
+ n <= 31 || n >= 127 && n <= 159 || n >= 768 && n <= 879 || (t += Tr(n) ? 1 : 2);
665
+ }
666
+ return t;
667
+ }
668
+ var Ne = vu;
669
+ var R = /* @__PURE__ */ Symbol("MODE_BREAK");
670
+ var H = /* @__PURE__ */ Symbol("MODE_FLAT");
671
+ var de = /* @__PURE__ */ Symbol("cursor");
672
+ var _t = /* @__PURE__ */ Symbol("DOC_FILL_PRINTED_LENGTH");
673
+ function Nr() {
674
+ return { value: "", length: 0, queue: [] };
675
+ }
676
+ function Lu(e, t) {
677
+ return xt(e, { type: "indent" }, t);
678
+ }
679
+ function Iu(e, t, r) {
680
+ return t === Number.NEGATIVE_INFINITY ? e.root || Nr() : t < 0 ? xt(e, { type: "dedent" }, r) : t ? t.type === "root" ? __spreadProps(__spreadValues({}, e), { root: e }) : xt(e, { type: typeof t == "string" ? "stringAlign" : "numberAlign", n: t }, r) : e;
681
+ }
682
+ function xt(e, t, r) {
683
+ let n = t.type === "dedent" ? e.queue.slice(0, -1) : [...e.queue, t], u = "", o = 0, i = 0, s = 0;
684
+ for (let f of n) switch (f.type) {
685
+ case "indent":
686
+ D(), r.useTabs ? a(1) : c(r.tabWidth);
687
+ break;
688
+ case "stringAlign":
689
+ D(), u += f.n, o += f.n.length;
690
+ break;
691
+ case "numberAlign":
692
+ i += 1, s += f.n;
693
+ break;
694
+ default:
695
+ throw new Error(`Unexpected type '${f.type}'`);
696
+ }
697
+ return l(), __spreadProps(__spreadValues({}, e), { value: u, length: o, queue: n });
698
+ function a(f) {
699
+ u += " ".repeat(f), o += r.tabWidth * f;
700
+ }
701
+ function c(f) {
702
+ u += " ".repeat(f), o += f;
703
+ }
704
+ function D() {
705
+ r.useTabs ? p() : l();
706
+ }
707
+ function p() {
708
+ i > 0 && a(i), F();
709
+ }
710
+ function l() {
711
+ s > 0 && c(s), F();
712
+ }
713
+ function F() {
714
+ i = 0, s = 0;
715
+ }
716
+ }
717
+ function wt(e) {
718
+ let t = 0, r = 0, n = e.length;
719
+ e: for (; n--; ) {
720
+ let u = e[n];
721
+ if (u === de) {
722
+ r++;
723
+ continue;
724
+ }
725
+ for (let o = u.length - 1; o >= 0; o--) {
726
+ let i = u[o];
727
+ if (i === " " || i === " ") t++;
728
+ else {
729
+ e[n] = u.slice(0, o + 1);
730
+ break e;
731
+ }
732
+ }
733
+ }
734
+ if (t > 0 || r > 0) for (e.length = n + 1; r-- > 0; ) e.push(de);
735
+ return t;
736
+ }
737
+ function Ke(e, t, r, n, u, o) {
738
+ var _a;
739
+ if (r === Number.POSITIVE_INFINITY) return true;
740
+ let i = t.length, s = [e], a = [];
741
+ for (; r >= 0; ) {
742
+ if (s.length === 0) {
743
+ if (i === 0) return true;
744
+ s.push(t[--i]);
745
+ continue;
746
+ }
747
+ let { mode: c, doc: D } = s.pop(), p = M(D);
748
+ switch (p) {
749
+ case W:
750
+ a.push(D), r -= Ne(D);
751
+ break;
752
+ case Y:
753
+ case k: {
754
+ let l = p === Y ? D : D.parts, F = (_a = D[_t]) != null ? _a : 0;
755
+ for (let f = l.length - 1; f >= F; f--) s.push({ mode: c, doc: l[f] });
756
+ break;
757
+ }
758
+ case N:
759
+ case O:
760
+ case v:
761
+ case S:
762
+ s.push({ mode: c, doc: D.contents });
763
+ break;
764
+ case P:
765
+ r += wt(a);
766
+ break;
767
+ case B: {
768
+ if (o && D.break) return false;
769
+ let l = D.break ? R : c, F = D.expandedStates && l === R ? y(false, D.expandedStates, -1) : D.contents;
770
+ s.push({ mode: l, doc: F });
771
+ break;
772
+ }
773
+ case _: {
774
+ let F = (D.groupId ? u[D.groupId] || H : c) === R ? D.breakContents : D.flatContents;
775
+ F && s.push({ mode: c, doc: F });
776
+ break;
777
+ }
778
+ case g:
779
+ if (c === R || D.hard) return true;
780
+ D.soft || (a.push(" "), r--);
781
+ break;
782
+ case L:
783
+ n = true;
784
+ break;
785
+ case I:
786
+ if (n) return false;
787
+ break;
788
+ }
789
+ }
790
+ return false;
791
+ }
792
+ function me(e, t) {
793
+ var _a;
794
+ let r = {}, n = t.printWidth, u = xe(t.endOfLine), o = 0, i = [{ ind: Nr(), mode: R, doc: e }], s = [], a = false, c = [], D = 0;
795
+ for (cr(e); i.length > 0; ) {
796
+ let { ind: l, mode: F, doc: f } = i.pop();
797
+ switch (M(f)) {
798
+ case W: {
799
+ let d = u !== `
800
+ ` ? te(false, f, `
801
+ `, u) : f;
802
+ s.push(d), i.length > 0 && (o += Ne(d));
803
+ break;
804
+ }
805
+ case Y:
806
+ for (let d = f.length - 1; d >= 0; d--) i.push({ ind: l, mode: F, doc: f[d] });
807
+ break;
808
+ case j:
809
+ if (D >= 2) throw new Error("There are too many 'cursor' in doc.");
810
+ s.push(de), D++;
811
+ break;
812
+ case N:
813
+ i.push({ ind: Lu(l, t), mode: F, doc: f.contents });
814
+ break;
815
+ case O:
816
+ i.push({ ind: Iu(l, f.n, t), mode: F, doc: f.contents });
817
+ break;
818
+ case P:
819
+ o -= wt(s);
820
+ break;
821
+ case B:
822
+ switch (F) {
823
+ case H:
824
+ if (!a) {
825
+ i.push({ ind: l, mode: f.break ? R : H, doc: f.contents });
826
+ break;
827
+ }
828
+ case R: {
829
+ a = false;
830
+ let d = { ind: l, mode: H, doc: f.contents }, m = n - o, C = c.length > 0;
831
+ if (!f.break && Ke(d, i, m, C, r)) i.push(d);
832
+ else if (f.expandedStates) {
833
+ let E = y(false, f.expandedStates, -1);
834
+ if (f.break) {
835
+ i.push({ ind: l, mode: R, doc: E });
836
+ break;
837
+ } else for (let h = 1; h < f.expandedStates.length + 1; h++) if (h >= f.expandedStates.length) {
838
+ i.push({ ind: l, mode: R, doc: E });
839
+ break;
840
+ } else {
841
+ let x = f.expandedStates[h], A = { ind: l, mode: H, doc: x };
842
+ if (Ke(A, i, m, C, r)) {
843
+ i.push(A);
844
+ break;
845
+ }
846
+ }
847
+ } else i.push({ ind: l, mode: R, doc: f.contents });
848
+ break;
849
+ }
850
+ }
851
+ f.id && (r[f.id] = y(false, i, -1).mode);
852
+ break;
853
+ case k: {
854
+ let d = n - o, m = (_a = f[_t]) != null ? _a : 0, { parts: C } = f, E = C.length - m;
855
+ if (E === 0) break;
856
+ let h = C[m + 0], x = C[m + 1], A = { ind: l, mode: H, doc: h }, $ = { ind: l, mode: R, doc: h }, ue = Ke(A, [], d, c.length > 0, r, true);
857
+ if (E === 1) {
858
+ ue ? i.push(A) : i.push($);
859
+ break;
860
+ }
861
+ let Be = { ind: l, mode: H, doc: x }, lt = { ind: l, mode: R, doc: x };
862
+ if (E === 2) {
863
+ ue ? i.push(Be, A) : i.push(lt, $);
864
+ break;
865
+ }
866
+ let lu = C[m + 2], Ft = { ind: l, mode: F, doc: __spreadProps(__spreadValues({}, f), { [_t]: m + 2 }) };
867
+ Ke({ ind: l, mode: H, doc: [h, x, lu] }, [], d, c.length > 0, r, true) ? i.push(Ft, Be, A) : ue ? i.push(Ft, lt, A) : i.push(Ft, lt, $);
868
+ break;
869
+ }
870
+ case _:
871
+ case v: {
872
+ let d = f.groupId ? r[f.groupId] : F;
873
+ if (d === R) {
874
+ let m = f.type === _ ? f.breakContents : f.negate ? f.contents : ie(f.contents);
875
+ m && i.push({ ind: l, mode: F, doc: m });
876
+ }
877
+ if (d === H) {
878
+ let m = f.type === _ ? f.flatContents : f.negate ? ie(f.contents) : f.contents;
879
+ m && i.push({ ind: l, mode: F, doc: m });
880
+ }
881
+ break;
882
+ }
883
+ case L:
884
+ c.push({ ind: l, mode: F, doc: f.contents });
885
+ break;
886
+ case I:
887
+ c.length > 0 && i.push({ ind: l, mode: F, doc: Te });
888
+ break;
889
+ case g:
890
+ switch (F) {
891
+ case H:
892
+ if (f.hard) a = true;
893
+ else {
894
+ f.soft || (s.push(" "), o += 1);
895
+ break;
896
+ }
897
+ case R:
898
+ if (c.length > 0) {
899
+ i.push({ ind: l, mode: F, doc: f }, ...c.reverse()), c.length = 0;
900
+ break;
901
+ }
902
+ f.literal ? l.root ? (s.push(u, l.root.value), o = l.root.length) : (s.push(u), o = 0) : (o -= wt(s), s.push(u + l.value), o = l.length);
903
+ break;
904
+ }
905
+ break;
906
+ case S:
907
+ i.push({ ind: l, mode: F, doc: f.contents });
908
+ break;
909
+ case w:
910
+ break;
911
+ default:
912
+ throw new q(f);
913
+ }
914
+ i.length === 0 && c.length > 0 && (i.push(...c.reverse()), c.length = 0);
915
+ }
916
+ let p = s.indexOf(de);
917
+ if (p !== -1) {
918
+ let l = s.indexOf(de, p + 1);
919
+ if (l === -1) return { formatted: s.filter((m) => m !== de).join("") };
920
+ let F = s.slice(0, p).join(""), f = s.slice(p + 1, l).join(""), d = s.slice(l + 1).join("");
921
+ return { formatted: F + f + d, cursorNodeStart: F.length, cursorNodeText: f };
922
+ }
923
+ return { formatted: s.join("") };
924
+ }
925
+ function Ru(e, t, r = 0) {
926
+ let n = 0;
927
+ for (let u = r; u < e.length; ++u) e[u] === " " ? n = n + t - n % t : n++;
928
+ return n;
929
+ }
930
+ var Ee = Ru;
931
+ var Z;
932
+ var kt;
933
+ var ze;
934
+ var bt = class {
935
+ constructor(t) {
936
+ tr(this, Z);
937
+ this.stack = [t];
938
+ }
939
+ get key() {
940
+ var _a;
941
+ let { stack: t, siblings: r } = this;
942
+ return (_a = y(false, t, r === null ? -2 : -4)) != null ? _a : null;
943
+ }
944
+ get index() {
945
+ return this.siblings === null ? null : y(false, this.stack, -2);
946
+ }
947
+ get node() {
948
+ return y(false, this.stack, -1);
949
+ }
950
+ get parent() {
951
+ return this.getNode(1);
952
+ }
953
+ get grandparent() {
954
+ return this.getNode(2);
955
+ }
956
+ get isInArray() {
957
+ return this.siblings !== null;
958
+ }
959
+ get siblings() {
960
+ let { stack: t } = this, r = y(false, t, -3);
961
+ return Array.isArray(r) ? r : null;
962
+ }
963
+ get next() {
964
+ let { siblings: t } = this;
965
+ return t === null ? null : t[this.index + 1];
966
+ }
967
+ get previous() {
968
+ let { siblings: t } = this;
969
+ return t === null ? null : t[this.index - 1];
970
+ }
971
+ get isFirst() {
972
+ return this.index === 0;
973
+ }
974
+ get isLast() {
975
+ let { siblings: t, index: r } = this;
976
+ return t !== null && r === t.length - 1;
977
+ }
978
+ get isRoot() {
979
+ return this.stack.length === 1;
980
+ }
981
+ get root() {
982
+ return this.stack[0];
983
+ }
984
+ get ancestors() {
985
+ return [...fe(this, Z, ze).call(this)];
986
+ }
987
+ getName() {
988
+ let { stack: t } = this, { length: r } = t;
989
+ return r > 1 ? y(false, t, -2) : null;
990
+ }
991
+ getValue() {
992
+ return y(false, this.stack, -1);
993
+ }
994
+ getNode(t = 0) {
995
+ let r = fe(this, Z, kt).call(this, t);
996
+ return r === -1 ? null : this.stack[r];
997
+ }
998
+ getParentNode(t = 0) {
999
+ return this.getNode(t + 1);
1000
+ }
1001
+ call(t, ...r) {
1002
+ let { stack: n } = this, { length: u } = n, o = y(false, n, -1);
1003
+ for (let i of r) o = o[i], n.push(i, o);
1004
+ try {
1005
+ return t(this);
1006
+ } finally {
1007
+ n.length = u;
1008
+ }
1009
+ }
1010
+ callParent(t, r = 0) {
1011
+ let n = fe(this, Z, kt).call(this, r + 1), u = this.stack.splice(n + 1);
1012
+ try {
1013
+ return t(this);
1014
+ } finally {
1015
+ this.stack.push(...u);
1016
+ }
1017
+ }
1018
+ each(t, ...r) {
1019
+ let { stack: n } = this, { length: u } = n, o = y(false, n, -1);
1020
+ for (let i of r) o = o[i], n.push(i, o);
1021
+ try {
1022
+ for (let i = 0; i < o.length; ++i) n.push(i, o[i]), t(this, i, o), n.length -= 2;
1023
+ } finally {
1024
+ n.length = u;
1025
+ }
1026
+ }
1027
+ map(t, ...r) {
1028
+ let n = [];
1029
+ return this.each((u, o, i) => {
1030
+ n[o] = t(u, o, i);
1031
+ }, ...r), n;
1032
+ }
1033
+ match(...t) {
1034
+ let r = this.stack.length - 1, n = null, u = this.stack[r--];
1035
+ for (let o of t) {
1036
+ if (u === void 0) return false;
1037
+ let i = null;
1038
+ if (typeof n == "number" && (i = n, n = this.stack[r--], u = this.stack[r--]), o && !o(u, n, i)) return false;
1039
+ n = this.stack[r--], u = this.stack[r--];
1040
+ }
1041
+ return true;
1042
+ }
1043
+ findAncestor(t) {
1044
+ for (let r of fe(this, Z, ze).call(this)) if (t(r)) return r;
1045
+ }
1046
+ hasAncestor(t) {
1047
+ for (let r of fe(this, Z, ze).call(this)) if (t(r)) return true;
1048
+ return false;
1049
+ }
1050
+ };
1051
+ Z = /* @__PURE__ */ new WeakSet(), kt = function(t) {
1052
+ let { stack: r } = this;
1053
+ for (let n = r.length - 1; n >= 0; n -= 2) if (!Array.isArray(r[n]) && --t < 0) return n;
1054
+ return -1;
1055
+ }, ze = function* () {
1056
+ let { stack: t } = this;
1057
+ for (let r = t.length - 3; r >= 0; r -= 2) {
1058
+ let n = t[r];
1059
+ Array.isArray(n) || (yield n);
1060
+ }
1061
+ };
1062
+ var Or = bt;
1063
+ var Pr = new Proxy(() => {
1064
+ }, { get: () => Pr });
1065
+ var Oe = Pr;
1066
+ function Yu(e) {
1067
+ return e !== null && typeof e == "object";
1068
+ }
1069
+ var vr = Yu;
1070
+ function* Ce(e, t) {
1071
+ let { getVisitorKeys: r, filter: n = () => true } = t, u = (o) => vr(o) && n(o);
1072
+ for (let o of r(e)) {
1073
+ let i = e[o];
1074
+ if (Array.isArray(i)) for (let s of i) u(s) && (yield s);
1075
+ else u(i) && (yield i);
1076
+ }
1077
+ }
1078
+ function* Lr(e, t) {
1079
+ let r = [e];
1080
+ for (let n = 0; n < r.length; n++) {
1081
+ let u = r[n];
1082
+ for (let o of Ce(u, t)) yield o, r.push(o);
1083
+ }
1084
+ }
1085
+ function Ir(e, t) {
1086
+ return Ce(e, t).next().done;
1087
+ }
1088
+ function he(e) {
1089
+ return (t, r, n) => {
1090
+ let u = !!(n != null && n.backwards);
1091
+ if (r === false) return false;
1092
+ let { length: o } = t, i = r;
1093
+ for (; i >= 0 && i < o; ) {
1094
+ let s = t.charAt(i);
1095
+ if (e instanceof RegExp) {
1096
+ if (!e.test(s)) return i;
1097
+ } else if (!e.includes(s)) return i;
1098
+ u ? i-- : i++;
1099
+ }
1100
+ return i === -1 || i === o ? i : false;
1101
+ };
1102
+ }
1103
+ var Rr = he(/\s/u);
1104
+ var T = he(" ");
1105
+ var He = he(",; ");
1106
+ var Je = he(/[^\n\r]/u);
1107
+ function ju(e, t, r) {
1108
+ let n = !!(r != null && r.backwards);
1109
+ if (t === false) return false;
1110
+ let u = e.charAt(t);
1111
+ if (n) {
1112
+ if (e.charAt(t - 1) === "\r" && u === `
1113
+ `) return t - 2;
1114
+ if (u === `
1115
+ ` || u === "\r" || u === "\u2028" || u === "\u2029") return t - 1;
1116
+ } else {
1117
+ if (u === "\r" && e.charAt(t + 1) === `
1118
+ `) return t + 2;
1119
+ if (u === `
1120
+ ` || u === "\r" || u === "\u2028" || u === "\u2029") return t + 1;
1121
+ }
1122
+ return t;
1123
+ }
1124
+ var U = ju;
1125
+ function Uu(e, t, r = {}) {
1126
+ let n = T(e, r.backwards ? t - 1 : t, r), u = U(e, n, r);
1127
+ return n !== u;
1128
+ }
1129
+ var G = Uu;
1130
+ function Vu(e) {
1131
+ return Array.isArray(e) && e.length > 0;
1132
+ }
1133
+ var qe = Vu;
1134
+ var Yr = /* @__PURE__ */ new Set(["tokens", "comments", "parent", "enclosingNode", "precedingNode", "followingNode"]);
1135
+ var $u = (e) => Object.keys(e).filter((t) => !Yr.has(t));
1136
+ function Wu(e) {
1137
+ return e ? (t) => e(t, Yr) : $u;
1138
+ }
1139
+ var J = Wu;
1140
+ function Mu(e) {
1141
+ let t = e.type || e.kind || "(unknown type)", r = String(e.name || e.id && (typeof e.id == "object" ? e.id.name : e.id) || e.key && (typeof e.key == "object" ? e.key.name : e.key) || e.value && (typeof e.value == "object" ? "" : String(e.value)) || e.operator || "");
1142
+ return r.length > 20 && (r = r.slice(0, 19) + "\u2026"), t + (r ? " " + r : "");
1143
+ }
1144
+ function St(e, t) {
1145
+ var _a;
1146
+ ((_a = e.comments) != null ? _a : e.comments = []).push(t), t.printed = false, t.nodeDescription = Mu(e);
1147
+ }
1148
+ function se(e, t) {
1149
+ t.leading = true, t.trailing = false, St(e, t);
1150
+ }
1151
+ function ee(e, t, r) {
1152
+ t.leading = false, t.trailing = false, r && (t.marker = r), St(e, t);
1153
+ }
1154
+ function ae(e, t) {
1155
+ t.leading = false, t.trailing = true, St(e, t);
1156
+ }
1157
+ var Tt = /* @__PURE__ */ new WeakMap();
1158
+ function Xe(e, t) {
1159
+ var _a;
1160
+ if (Tt.has(e)) return Tt.get(e);
1161
+ let { printer: { getCommentChildNodes: r, canAttachComment: n, getVisitorKeys: u }, locStart: o, locEnd: i } = t;
1162
+ if (!n) return [];
1163
+ let s = ((_a = r == null ? void 0 : r(e, t)) != null ? _a : [...Ce(e, { getVisitorKeys: J(u) })]).flatMap((a) => n(a) ? [a] : Xe(a, t));
1164
+ return s.sort((a, c) => o(a) - o(c) || i(a) - i(c)), Tt.set(e, s), s;
1165
+ }
1166
+ function Ur(e, t, r, n) {
1167
+ let { locStart: u, locEnd: o } = r, i = u(t), s = o(t), a = Xe(e, r), c, D, p = 0, l = a.length;
1168
+ for (; p < l; ) {
1169
+ let F = p + l >> 1, f = a[F], d = u(f), m = o(f);
1170
+ if (d <= i && s <= m) return Ur(f, t, r, f);
1171
+ if (m <= i) {
1172
+ c = f, p = F + 1;
1173
+ continue;
1174
+ }
1175
+ if (s <= d) {
1176
+ D = f, l = F;
1177
+ continue;
1178
+ }
1179
+ throw new Error("Comment location overlaps with node location");
1180
+ }
1181
+ if ((n == null ? void 0 : n.type) === "TemplateLiteral") {
1182
+ let { quasis: F } = n, f = Ot(F, t, r);
1183
+ c && Ot(F, c, r) !== f && (c = null), D && Ot(F, D, r) !== f && (D = null);
1184
+ }
1185
+ return { enclosingNode: n, precedingNode: c, followingNode: D };
1186
+ }
1187
+ var Nt = () => false;
1188
+ function Vr(e, t) {
1189
+ let { comments: r } = e;
1190
+ if (delete e.comments, !qe(r) || !t.printer.canAttachComment) return;
1191
+ let n = [], { printer: { experimentalFeatures: { avoidAstMutation: u = false } = {}, handleComments: o = {} }, originalText: i } = t, { ownLine: s = Nt, endOfLine: a = Nt, remaining: c = Nt } = o, D = r.map((p, l) => __spreadProps(__spreadValues({}, Ur(e, p, t)), { comment: p, text: i, options: t, ast: e, isLastComment: r.length - 1 === l }));
1192
+ for (let [p, l] of D.entries()) {
1193
+ let { comment: F, precedingNode: f, enclosingNode: d, followingNode: m, text: C, options: E, ast: h, isLastComment: x } = l, A;
1194
+ if (u ? A = [l] : (F.enclosingNode = d, F.precedingNode = f, F.followingNode = m, A = [F, C, E, h, x]), Gu(C, E, D, p)) F.placement = "ownLine", s(...A) || (m ? se(m, F) : f ? ae(f, F) : d ? ee(d, F) : ee(h, F));
1195
+ else if (Ku(C, E, D, p)) F.placement = "endOfLine", a(...A) || (f ? ae(f, F) : m ? se(m, F) : d ? ee(d, F) : ee(h, F));
1196
+ else if (F.placement = "remaining", !c(...A)) if (f && m) {
1197
+ let $ = n.length;
1198
+ $ > 0 && n[$ - 1].followingNode !== m && jr(n, E), n.push(l);
1199
+ } else f ? ae(f, F) : m ? se(m, F) : d ? ee(d, F) : ee(h, F);
1200
+ }
1201
+ if (jr(n, t), !u) for (let p of r) delete p.precedingNode, delete p.enclosingNode, delete p.followingNode;
1202
+ }
1203
+ var $r = (e) => !/[\S\n\u2028\u2029]/u.test(e);
1204
+ function Gu(e, t, r, n) {
1205
+ let { comment: u, precedingNode: o } = r[n], { locStart: i, locEnd: s } = t, a = i(u);
1206
+ if (o) for (let c = n - 1; c >= 0; c--) {
1207
+ let { comment: D, precedingNode: p } = r[c];
1208
+ if (p !== o || !$r(e.slice(s(D), a))) break;
1209
+ a = i(D);
1210
+ }
1211
+ return G(e, a, { backwards: true });
1212
+ }
1213
+ function Ku(e, t, r, n) {
1214
+ let { comment: u, followingNode: o } = r[n], { locStart: i, locEnd: s } = t, a = s(u);
1215
+ if (o) for (let c = n + 1; c < r.length; c++) {
1216
+ let { comment: D, followingNode: p } = r[c];
1217
+ if (p !== o || !$r(e.slice(a, i(D)))) break;
1218
+ a = s(D);
1219
+ }
1220
+ return G(e, a);
1221
+ }
1222
+ function jr(e, t) {
1223
+ var _a;
1224
+ var s, a;
1225
+ let r = e.length;
1226
+ if (r === 0) return;
1227
+ let { precedingNode: n, followingNode: u } = e[0], o = t.locStart(u), i;
1228
+ for (i = r; i > 0; --i) {
1229
+ let { comment: c, precedingNode: D, followingNode: p } = e[i - 1];
1230
+ Oe.strictEqual(D, n), Oe.strictEqual(p, u);
1231
+ let l = t.originalText.slice(t.locEnd(c), o);
1232
+ if ((_a = (a = (s = t.printer).isGap) == null ? void 0 : a.call(s, l, t)) != null ? _a : /^[\s(]*$/u.test(l)) o = t.locStart(c);
1233
+ else break;
1234
+ }
1235
+ for (let [c, { comment: D }] of e.entries()) c < i ? ae(n, D) : se(u, D);
1236
+ for (let c of [n, u]) c.comments && c.comments.length > 1 && c.comments.sort((D, p) => t.locStart(D) - t.locStart(p));
1237
+ e.length = 0;
1238
+ }
1239
+ function Ot(e, t, r) {
1240
+ let n = r.locStart(t) - 1;
1241
+ for (let u = 1; u < e.length; ++u) if (n < r.locStart(e[u])) return u - 1;
1242
+ return 0;
1243
+ }
1244
+ function zu(e, t) {
1245
+ let r = t - 1;
1246
+ r = T(e, r, { backwards: true }), r = U(e, r, { backwards: true }), r = T(e, r, { backwards: true });
1247
+ let n = U(e, r, { backwards: true });
1248
+ return r !== n;
1249
+ }
1250
+ var Pe = zu;
1251
+ function Wr(e, t) {
1252
+ let r = e.node;
1253
+ return r.printed = true, t.printer.printComment(e, t);
1254
+ }
1255
+ function Hu(e, t) {
1256
+ var D;
1257
+ let r = e.node, n = [Wr(e, t)], { printer: u, originalText: o, locStart: i, locEnd: s } = t;
1258
+ if ((D = u.isBlockComment) == null ? void 0 : D.call(u, r)) {
1259
+ let p = G(o, s(r)) ? G(o, i(r), { backwards: true }) ? z : Me : " ";
1260
+ n.push(p);
1261
+ } else n.push(z);
1262
+ let c = U(o, T(o, s(r)));
1263
+ return c !== false && G(o, c) && n.push(z), n;
1264
+ }
1265
+ function Ju(e, t, r) {
1266
+ var c;
1267
+ let n = e.node, u = Wr(e, t), { printer: o, originalText: i, locStart: s } = t, a = (c = o.isBlockComment) == null ? void 0 : c.call(o, n);
1268
+ if (r != null && r.hasLineSuffix && !(r != null && r.isBlock) || G(i, s(n), { backwards: true })) {
1269
+ let D = Pe(i, s(n));
1270
+ return { doc: Se([z, D ? z : "", u]), isBlock: a, hasLineSuffix: true };
1271
+ }
1272
+ return !a || r != null && r.hasLineSuffix ? { doc: [Se([" ", u]), pe], isBlock: a, hasLineSuffix: true } : { doc: [" ", u], isBlock: a, hasLineSuffix: false };
1273
+ }
1274
+ function qu(e, t) {
1275
+ let r = e.node;
1276
+ if (!r) return {};
1277
+ let n = t[/* @__PURE__ */ Symbol.for("printedComments")];
1278
+ if ((r.comments || []).filter((a) => !n.has(a)).length === 0) return { leading: "", trailing: "" };
1279
+ let o = [], i = [], s;
1280
+ return e.each(() => {
1281
+ let a = e.node;
1282
+ if (n != null && n.has(a)) return;
1283
+ let { leading: c, trailing: D } = a;
1284
+ c ? o.push(Hu(e, t)) : D && (s = Ju(e, t, s), i.push(s.doc));
1285
+ }, "comments"), { leading: o, trailing: i };
1286
+ }
1287
+ function Mr(e, t, r) {
1288
+ let { leading: n, trailing: u } = qu(e, r);
1289
+ return !n && !u ? t : Fe(t, (o) => [n, o, u]);
1290
+ }
1291
+ function Gr(e) {
1292
+ let { [/* @__PURE__ */ Symbol.for("comments")]: t, [/* @__PURE__ */ Symbol.for("printedComments")]: r } = e;
1293
+ for (let n of t) {
1294
+ if (!n.printed && !r.has(n)) throw new Error('Comment "' + n.value.trim() + '" was not printed. Please report this error!');
1295
+ delete n.printed;
1296
+ }
1297
+ }
1298
+ function Xu(e) {
1299
+ return () => {
1300
+ };
1301
+ }
1302
+ var Kr = Xu;
1303
+ var ve = class extends Error {
1304
+ constructor() {
1305
+ super(...arguments);
1306
+ __publicField(this, "name", "ConfigError");
1307
+ }
1308
+ };
1309
+ var Le = class extends Error {
1310
+ constructor() {
1311
+ super(...arguments);
1312
+ __publicField(this, "name", "UndefinedParserError");
1313
+ }
1314
+ };
1315
+ var zr = { checkIgnorePragma: { category: "Special", type: "boolean", default: false, description: "Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.", cliCategory: "Other" }, cursorOffset: { category: "Special", type: "int", default: -1, range: { start: -1, end: 1 / 0, step: 1 }, description: "Print (to stderr) where a cursor at the given position would move to after formatting.", cliCategory: "Editor" }, endOfLine: { category: "Global", type: "choice", default: "lf", description: "Which end of line characters to apply.", choices: [{ value: "lf", description: "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" }, { value: "crlf", description: "Carriage Return + Line Feed characters (\\r\\n), common on Windows" }, { value: "cr", description: "Carriage Return character only (\\r), used very rarely" }, { value: "auto", description: `Maintain existing
1316
+ (mixed values within one file are normalised by looking at what's used after the first line)` }] }, filepath: { category: "Special", type: "path", description: "Specify the input filepath. This will be used to do parser inference.", cliName: "stdin-filepath", cliCategory: "Other", cliDescription: "Path to the file to pretend that stdin comes from." }, insertPragma: { category: "Special", type: "boolean", default: false, description: "Insert @format pragma into file's first docblock comment.", cliCategory: "Other" }, parser: { category: "Global", type: "choice", default: void 0, description: "Which parser to use.", exception: (e) => typeof e == "string" || typeof e == "function", choices: [{ value: "flow", description: "Flow" }, { value: "babel", description: "JavaScript" }, { value: "babel-flow", description: "Flow" }, { value: "babel-ts", description: "TypeScript" }, { value: "typescript", description: "TypeScript" }, { value: "acorn", description: "JavaScript" }, { value: "espree", description: "JavaScript" }, { value: "meriyah", description: "JavaScript" }, { value: "css", description: "CSS" }, { value: "less", description: "Less" }, { value: "scss", description: "SCSS" }, { value: "json", description: "JSON" }, { value: "json5", description: "JSON5" }, { value: "jsonc", description: "JSON with Comments" }, { value: "json-stringify", description: "JSON.stringify" }, { value: "graphql", description: "GraphQL" }, { value: "markdown", description: "Markdown" }, { value: "mdx", description: "MDX" }, { value: "vue", description: "Vue" }, { value: "yaml", description: "YAML" }, { value: "glimmer", description: "Ember / Handlebars" }, { value: "html", description: "HTML" }, { value: "angular", description: "Angular" }, { value: "lwc", description: "Lightning Web Components" }, { value: "mjml", description: "MJML" }] }, plugins: { type: "path", array: true, default: [{ value: [] }], category: "Global", description: "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", exception: (e) => typeof e == "string" || typeof e == "object", cliName: "plugin", cliCategory: "Config" }, printWidth: { category: "Global", type: "int", default: 80, description: "The line length where Prettier will try wrap.", range: { start: 0, end: 1 / 0, step: 1 } }, rangeEnd: { category: "Special", type: "int", default: 1 / 0, range: { start: 0, end: 1 / 0, step: 1 }, description: `Format code ending at a given character offset (exclusive).
1317
+ The range will extend forwards to the end of the selected statement.`, cliCategory: "Editor" }, rangeStart: { category: "Special", type: "int", default: 0, range: { start: 0, end: 1 / 0, step: 1 }, description: `Format code starting at a given character offset.
1318
+ The range will extend backwards to the start of the first line containing the selected statement.`, cliCategory: "Editor" }, requirePragma: { category: "Special", type: "boolean", default: false, description: "Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.", cliCategory: "Other" }, tabWidth: { type: "int", category: "Global", default: 2, description: "Number of spaces per indentation level.", range: { start: 0, end: 1 / 0, step: 1 } }, useTabs: { category: "Global", type: "boolean", default: false, description: "Indent with tabs instead of spaces." }, embeddedLanguageFormatting: { category: "Global", type: "choice", default: "auto", description: "Control how Prettier formats quoted code embedded in the file.", choices: [{ value: "auto", description: "Format embedded code if Prettier can automatically identify it." }, { value: "off", description: "Never automatically format embedded code." }] } };
1319
+ function Qe({ plugins: e = [], showDeprecated: t = false } = {}) {
1320
+ let r = e.flatMap((u) => {
1321
+ var _a;
1322
+ return (_a = u.languages) != null ? _a : [];
1323
+ }), n = [];
1324
+ for (let u of Zu(Object.assign({}, ...e.map(({ options: o }) => o), zr))) !t && u.deprecated || (Array.isArray(u.choices) && (t || (u.choices = u.choices.filter((o) => !o.deprecated)), u.name === "parser" && (u.choices = [...u.choices, ...Qu(u.choices, r, e)])), u.pluginDefaults = Object.fromEntries(e.filter((o) => {
1325
+ var i;
1326
+ return ((i = o.defaultOptions) == null ? void 0 : i[u.name]) !== void 0;
1327
+ }).map((o) => [o.name, o.defaultOptions[u.name]])), n.push(u));
1328
+ return { languages: r, options: n };
1329
+ }
1330
+ function* Qu(e, t, r) {
1331
+ let n = new Set(e.map((u) => u.value));
1332
+ for (let u of t) if (u.parsers) {
1333
+ for (let o of u.parsers) if (!n.has(o)) {
1334
+ n.add(o);
1335
+ let i = r.find((a) => a.parsers && Object.prototype.hasOwnProperty.call(a.parsers, o)), s = u.name;
1336
+ i != null && i.name && (s += ` (plugin: ${i.name})`), yield { value: o, description: s };
1337
+ }
1338
+ }
1339
+ }
1340
+ function Zu(e) {
1341
+ let t = [];
1342
+ for (let [r, n] of Object.entries(e)) {
1343
+ let u = __spreadValues({ name: r }, n);
1344
+ Array.isArray(u.default) && (u.default = y(false, u.default, -1).value), t.push(u);
1345
+ }
1346
+ return t;
1347
+ }
1348
+ var eo = (e, t) => {
1349
+ if (!(e && t == null)) return t.toReversed || !Array.isArray(t) ? t.toReversed() : [...t].reverse();
1350
+ };
1351
+ var Hr = eo;
1352
+ var Jr;
1353
+ var qr;
1354
+ var Xr;
1355
+ var Qr;
1356
+ var Zr;
1357
+ var to = ((Jr = globalThis.Deno) == null ? void 0 : Jr.build.os) === "windows" || ((Xr = (qr = globalThis.navigator) == null ? void 0 : qr.platform) == null ? void 0 : Xr.startsWith("Win")) || ((Zr = (Qr = globalThis.process) == null ? void 0 : Qr.platform) == null ? void 0 : Zr.startsWith("win")) || false;
1358
+ function en(e) {
1359
+ if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
1360
+ return e;
1361
+ }
1362
+ function ro(e) {
1363
+ return e = en(e), decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
1364
+ }
1365
+ function no(e) {
1366
+ e = en(e);
1367
+ let t = decodeURIComponent(e.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
1368
+ return e.hostname !== "" && (t = `\\\\${e.hostname}${t}`), t;
1369
+ }
1370
+ function tn(e) {
1371
+ return to ? no(e) : ro(e);
1372
+ }
1373
+ var rn = tn;
1374
+ var uo = (e) => String(e).split(/[/\\]/u).pop();
1375
+ function nn(e, t) {
1376
+ var _a;
1377
+ if (!t) return;
1378
+ let r = uo(t).toLowerCase();
1379
+ return (_a = e.find(({ filenames: n }) => n == null ? void 0 : n.some((u) => u.toLowerCase() === r))) != null ? _a : e.find(({ extensions: n }) => n == null ? void 0 : n.some((u) => r.endsWith(u)));
1380
+ }
1381
+ function oo(e, t) {
1382
+ var _a, _b;
1383
+ if (t) return (_b = (_a = e.find(({ name: r }) => r.toLowerCase() === t)) != null ? _a : e.find(({ aliases: r }) => r == null ? void 0 : r.includes(t))) != null ? _b : e.find(({ extensions: r }) => r == null ? void 0 : r.includes(`.${t}`));
1384
+ }
1385
+ function un(e, t) {
1386
+ if (t) {
1387
+ if (String(t).startsWith("file:")) try {
1388
+ t = rn(t);
1389
+ } catch (e2) {
1390
+ return;
1391
+ }
1392
+ if (typeof t == "string") return e.find(({ isSupported: r }) => r == null ? void 0 : r({ filepath: t }));
1393
+ }
1394
+ }
1395
+ function io(e, t) {
1396
+ var _a, _b, _c, _d, _e2;
1397
+ let r = Hr(false, e.plugins).flatMap((u) => {
1398
+ var _a2;
1399
+ return (_a2 = u.languages) != null ? _a2 : [];
1400
+ }), n = (_e2 = (_d = (_c = (_b = (_a = oo(r, t.language)) != null ? _a : nn(r, t.physicalFile)) != null ? _b : nn(r, t.file)) != null ? _c : un(r, t.physicalFile)) != null ? _d : un(r, t.file)) != null ? _e2 : (t.physicalFile, void 0);
1401
+ return n == null ? void 0 : n.parsers[0];
1402
+ }
1403
+ var on = io;
1404
+ var re = { key: (e) => /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e) ? e : JSON.stringify(e), value(e) {
1405
+ if (e === null || typeof e != "object") return JSON.stringify(e);
1406
+ if (Array.isArray(e)) return `[${e.map((r) => re.value(r)).join(", ")}]`;
1407
+ let t = Object.keys(e);
1408
+ return t.length === 0 ? "{}" : `{ ${t.map((r) => `${re.key(r)}: ${re.value(e[r])}`).join(", ")} }`;
1409
+ }, pair: ({ key: e, value: t }) => re.value({ [e]: t }) };
1410
+ var sn = new Proxy(String, { get: () => sn });
1411
+ var V = sn;
1412
+ var an = (e, t, { descriptor: r }) => {
1413
+ let n = [`${V.yellow(typeof e == "string" ? r.key(e) : r.pair(e))} is deprecated`];
1414
+ return t && n.push(`we now treat it as ${V.blue(typeof t == "string" ? r.key(t) : r.pair(t))}`), n.join("; ") + ".";
1415
+ };
1416
+ var Ze = /* @__PURE__ */ Symbol.for("vnopts.VALUE_NOT_EXIST");
1417
+ var ge = /* @__PURE__ */ Symbol.for("vnopts.VALUE_UNCHANGED");
1418
+ var Dn = " ".repeat(2);
1419
+ var fn = (e, t, r) => {
1420
+ let { text: n, list: u } = r.normalizeExpectedResult(r.schemas[e].expected(r)), o = [];
1421
+ return n && o.push(cn(e, t, n, r.descriptor)), u && o.push([cn(e, t, u.title, r.descriptor)].concat(u.values.map((i) => ln(i, r.loggerPrintWidth))).join(`
1422
+ `)), Fn(o, r.loggerPrintWidth);
1423
+ };
1424
+ function cn(e, t, r, n) {
1425
+ return [`Invalid ${V.red(n.key(e))} value.`, `Expected ${V.blue(r)},`, `but received ${t === Ze ? V.gray("nothing") : V.red(n.value(t))}.`].join(" ");
1426
+ }
1427
+ function ln({ text: e, list: t }, r) {
1428
+ let n = [];
1429
+ return e && n.push(`- ${V.blue(e)}`), t && n.push([`- ${V.blue(t.title)}:`].concat(t.values.map((u) => ln(u, r - Dn.length).replace(/^|\n/g, `$&${Dn}`))).join(`
1430
+ `)), Fn(n, r);
1431
+ }
1432
+ function Fn(e, t) {
1433
+ if (e.length === 1) return e[0];
1434
+ let [r, n] = e, [u, o] = e.map((i) => i.split(`
1435
+ `, 1)[0].length);
1436
+ return u > t && u > o ? n : r;
1437
+ }
1438
+ var Pt = [];
1439
+ var pn = [];
1440
+ function vt(e, t) {
1441
+ if (e === t) return 0;
1442
+ let r = e;
1443
+ e.length > t.length && (e = t, t = r);
1444
+ let n = e.length, u = t.length;
1445
+ for (; n > 0 && e.charCodeAt(~-n) === t.charCodeAt(~-u); ) n--, u--;
1446
+ let o = 0;
1447
+ for (; o < n && e.charCodeAt(o) === t.charCodeAt(o); ) o++;
1448
+ if (n -= o, u -= o, n === 0) return u;
1449
+ let i, s, a, c, D = 0, p = 0;
1450
+ for (; D < n; ) pn[D] = e.charCodeAt(o + D), Pt[D] = ++D;
1451
+ for (; p < u; ) for (i = t.charCodeAt(o + p), a = p++, s = p, D = 0; D < n; D++) c = i === pn[D] ? a : a + 1, a = Pt[D], s = Pt[D] = a > s ? c > s ? s + 1 : c : c > a ? a + 1 : c;
1452
+ return s;
1453
+ }
1454
+ var et = (e, t, { descriptor: r, logger: n, schemas: u }) => {
1455
+ let o = [`Ignored unknown option ${V.yellow(r.pair({ key: e, value: t }))}.`], i = Object.keys(u).sort().find((s) => vt(e, s) < 3);
1456
+ i && o.push(`Did you mean ${V.blue(r.key(i))}?`), n.warn(o.join(" "));
1457
+ };
1458
+ var so = ["default", "expected", "validate", "deprecated", "forward", "redirect", "overlap", "preprocess", "postprocess"];
1459
+ function ao(e, t) {
1460
+ let r = new e(t), n = Object.create(r);
1461
+ for (let u of so) u in t && (n[u] = Do(t[u], r, b.prototype[u].length));
1462
+ return n;
1463
+ }
1464
+ var b = class {
1465
+ static create(t) {
1466
+ return ao(this, t);
1467
+ }
1468
+ constructor(t) {
1469
+ this.name = t.name;
1470
+ }
1471
+ default(t) {
1472
+ }
1473
+ expected(t) {
1474
+ return "nothing";
1475
+ }
1476
+ validate(t, r) {
1477
+ return false;
1478
+ }
1479
+ deprecated(t, r) {
1480
+ return false;
1481
+ }
1482
+ forward(t, r) {
1483
+ }
1484
+ redirect(t, r) {
1485
+ }
1486
+ overlap(t, r, n) {
1487
+ return t;
1488
+ }
1489
+ preprocess(t, r) {
1490
+ return t;
1491
+ }
1492
+ postprocess(t, r) {
1493
+ return ge;
1494
+ }
1495
+ };
1496
+ function Do(e, t, r) {
1497
+ return typeof e == "function" ? (...n) => e(...n.slice(0, r - 1), t, ...n.slice(r - 1)) : () => e;
1498
+ }
1499
+ var tt = class extends b {
1500
+ constructor(t) {
1501
+ super(t), this._sourceName = t.sourceName;
1502
+ }
1503
+ expected(t) {
1504
+ return t.schemas[this._sourceName].expected(t);
1505
+ }
1506
+ validate(t, r) {
1507
+ return r.schemas[this._sourceName].validate(t, r);
1508
+ }
1509
+ redirect(t, r) {
1510
+ return this._sourceName;
1511
+ }
1512
+ };
1513
+ var rt = class extends b {
1514
+ expected() {
1515
+ return "anything";
1516
+ }
1517
+ validate() {
1518
+ return true;
1519
+ }
1520
+ };
1521
+ var nt = class extends b {
1522
+ constructor(_a) {
1523
+ var _b = _a, { valueSchema: t, name: r = t.name } = _b, n = __objRest(_b, ["valueSchema", "name"]);
1524
+ super(__spreadProps(__spreadValues({}, n), { name: r })), this._valueSchema = t;
1525
+ }
1526
+ expected(t) {
1527
+ let { text: r, list: n } = t.normalizeExpectedResult(this._valueSchema.expected(t));
1528
+ return { text: r && `an array of ${r}`, list: n && { title: "an array of the following values", values: [{ list: n }] } };
1529
+ }
1530
+ validate(t, r) {
1531
+ if (!Array.isArray(t)) return false;
1532
+ let n = [];
1533
+ for (let u of t) {
1534
+ let o = r.normalizeValidateResult(this._valueSchema.validate(u, r), u);
1535
+ o !== true && n.push(o.value);
1536
+ }
1537
+ return n.length === 0 ? true : { value: n };
1538
+ }
1539
+ deprecated(t, r) {
1540
+ let n = [];
1541
+ for (let u of t) {
1542
+ let o = r.normalizeDeprecatedResult(this._valueSchema.deprecated(u, r), u);
1543
+ o !== false && n.push(...o.map(({ value: i }) => ({ value: [i] })));
1544
+ }
1545
+ return n;
1546
+ }
1547
+ forward(t, r) {
1548
+ let n = [];
1549
+ for (let u of t) {
1550
+ let o = r.normalizeForwardResult(this._valueSchema.forward(u, r), u);
1551
+ n.push(...o.map(dn));
1552
+ }
1553
+ return n;
1554
+ }
1555
+ redirect(t, r) {
1556
+ let n = [], u = [];
1557
+ for (let o of t) {
1558
+ let i = r.normalizeRedirectResult(this._valueSchema.redirect(o, r), o);
1559
+ "remain" in i && n.push(i.remain), u.push(...i.redirect.map(dn));
1560
+ }
1561
+ return n.length === 0 ? { redirect: u } : { redirect: u, remain: n };
1562
+ }
1563
+ overlap(t, r) {
1564
+ return t.concat(r);
1565
+ }
1566
+ };
1567
+ function dn({ from: e, to: t }) {
1568
+ return { from: [e], to: t };
1569
+ }
1570
+ var ut = class extends b {
1571
+ expected() {
1572
+ return "true or false";
1573
+ }
1574
+ validate(t) {
1575
+ return typeof t == "boolean";
1576
+ }
1577
+ };
1578
+ function En(e, t) {
1579
+ let r = /* @__PURE__ */ Object.create(null);
1580
+ for (let n of e) {
1581
+ let u = n[t];
1582
+ if (r[u]) throw new Error(`Duplicate ${t} ${JSON.stringify(u)}`);
1583
+ r[u] = n;
1584
+ }
1585
+ return r;
1586
+ }
1587
+ function Cn(e, t) {
1588
+ let r = /* @__PURE__ */ new Map();
1589
+ for (let n of e) {
1590
+ let u = n[t];
1591
+ if (r.has(u)) throw new Error(`Duplicate ${t} ${JSON.stringify(u)}`);
1592
+ r.set(u, n);
1593
+ }
1594
+ return r;
1595
+ }
1596
+ function hn() {
1597
+ let e = /* @__PURE__ */ Object.create(null);
1598
+ return (t) => {
1599
+ let r = JSON.stringify(t);
1600
+ return e[r] ? true : (e[r] = true, false);
1601
+ };
1602
+ }
1603
+ function gn(e, t) {
1604
+ let r = [], n = [];
1605
+ for (let u of e) t(u) ? r.push(u) : n.push(u);
1606
+ return [r, n];
1607
+ }
1608
+ function yn(e) {
1609
+ return e === Math.floor(e);
1610
+ }
1611
+ function An(e, t) {
1612
+ if (e === t) return 0;
1613
+ let r = typeof e, n = typeof t, u = ["undefined", "object", "boolean", "number", "string"];
1614
+ return r !== n ? u.indexOf(r) - u.indexOf(n) : r !== "string" ? Number(e) - Number(t) : e.localeCompare(t);
1615
+ }
1616
+ function Bn(e) {
1617
+ return (...t) => {
1618
+ let r = e(...t);
1619
+ return typeof r == "string" ? new Error(r) : r;
1620
+ };
1621
+ }
1622
+ function Lt(e) {
1623
+ return e === void 0 ? {} : e;
1624
+ }
1625
+ function It(e) {
1626
+ if (typeof e == "string") return { text: e };
1627
+ let { text: t, list: r } = e;
1628
+ return co((t || r) !== void 0, "Unexpected `expected` result, there should be at least one field."), r ? { text: t, list: { title: r.title, values: r.values.map(It) } } : { text: t };
1629
+ }
1630
+ function Rt(e, t) {
1631
+ return e === true ? true : e === false ? { value: t } : e;
1632
+ }
1633
+ function Yt(e, t, r = false) {
1634
+ return e === false ? false : e === true ? r ? true : [{ value: t }] : "value" in e ? [e] : e.length === 0 ? false : e;
1635
+ }
1636
+ function mn(e, t) {
1637
+ return typeof e == "string" || "key" in e ? { from: t, to: e } : "from" in e ? { from: e.from, to: e.to } : { from: t, to: e.to };
1638
+ }
1639
+ function ot(e, t) {
1640
+ return e === void 0 ? [] : Array.isArray(e) ? e.map((r) => mn(r, t)) : [mn(e, t)];
1641
+ }
1642
+ function jt(e, t) {
1643
+ let r = ot(typeof e == "object" && "redirect" in e ? e.redirect : e, t);
1644
+ return r.length === 0 ? { remain: t, redirect: r } : typeof e == "object" && "remain" in e ? { remain: e.remain, redirect: r } : { redirect: r };
1645
+ }
1646
+ function co(e, t) {
1647
+ if (!e) throw new Error(t);
1648
+ }
1649
+ var it = class extends b {
1650
+ constructor(t) {
1651
+ super(t), this._choices = Cn(t.choices.map((r) => r && typeof r == "object" ? r : { value: r }), "value");
1652
+ }
1653
+ expected({ descriptor: t }) {
1654
+ let r = Array.from(this._choices.keys()).map((i) => this._choices.get(i)).filter(({ hidden: i }) => !i).map((i) => i.value).sort(An).map(t.value), n = r.slice(0, -2), u = r.slice(-2);
1655
+ return { text: n.concat(u.join(" or ")).join(", "), list: { title: "one of the following values", values: r } };
1656
+ }
1657
+ validate(t) {
1658
+ return this._choices.has(t);
1659
+ }
1660
+ deprecated(t) {
1661
+ let r = this._choices.get(t);
1662
+ return r && r.deprecated ? { value: t } : false;
1663
+ }
1664
+ forward(t) {
1665
+ let r = this._choices.get(t);
1666
+ return r ? r.forward : void 0;
1667
+ }
1668
+ redirect(t) {
1669
+ let r = this._choices.get(t);
1670
+ return r ? r.redirect : void 0;
1671
+ }
1672
+ };
1673
+ var st = class extends b {
1674
+ expected() {
1675
+ return "a number";
1676
+ }
1677
+ validate(t, r) {
1678
+ return typeof t == "number";
1679
+ }
1680
+ };
1681
+ var at = class extends st {
1682
+ expected() {
1683
+ return "an integer";
1684
+ }
1685
+ validate(t, r) {
1686
+ return r.normalizeValidateResult(super.validate(t, r), t) === true && yn(t);
1687
+ }
1688
+ };
1689
+ var Ie = class extends b {
1690
+ expected() {
1691
+ return "a string";
1692
+ }
1693
+ validate(t) {
1694
+ return typeof t == "string";
1695
+ }
1696
+ };
1697
+ var _n = re;
1698
+ var xn = et;
1699
+ var wn = fn;
1700
+ var bn = an;
1701
+ var Dt = class {
1702
+ constructor(t, r) {
1703
+ let { logger: n = console, loggerPrintWidth: u = 80, descriptor: o = _n, unknown: i = xn, invalid: s = wn, deprecated: a = bn, missing: c = () => false, required: D = () => false, preprocess: p = (F) => F, postprocess: l = () => ge } = r || {};
1704
+ this._utils = { descriptor: o, logger: n || { warn: () => {
1705
+ } }, loggerPrintWidth: u, schemas: En(t, "name"), normalizeDefaultResult: Lt, normalizeExpectedResult: It, normalizeDeprecatedResult: Yt, normalizeForwardResult: ot, normalizeRedirectResult: jt, normalizeValidateResult: Rt }, this._unknownHandler = i, this._invalidHandler = Bn(s), this._deprecatedHandler = a, this._identifyMissing = (F, f) => !(F in f) || c(F, f), this._identifyRequired = D, this._preprocess = p, this._postprocess = l, this.cleanHistory();
1706
+ }
1707
+ cleanHistory() {
1708
+ this._hasDeprecationWarned = hn();
1709
+ }
1710
+ normalize(t) {
1711
+ let r = {}, u = [this._preprocess(t, this._utils)], o = () => {
1712
+ for (; u.length !== 0; ) {
1713
+ let i = u.shift(), s = this._applyNormalization(i, r);
1714
+ u.push(...s);
1715
+ }
1716
+ };
1717
+ o();
1718
+ for (let i of Object.keys(this._utils.schemas)) {
1719
+ let s = this._utils.schemas[i];
1720
+ if (!(i in r)) {
1721
+ let a = Lt(s.default(this._utils));
1722
+ "value" in a && u.push({ [i]: a.value });
1723
+ }
1724
+ }
1725
+ o();
1726
+ for (let i of Object.keys(this._utils.schemas)) {
1727
+ if (!(i in r)) continue;
1728
+ let s = this._utils.schemas[i], a = r[i], c = s.postprocess(a, this._utils);
1729
+ c !== ge && (this._applyValidation(c, i, s), r[i] = c);
1730
+ }
1731
+ return this._applyPostprocess(r), this._applyRequiredCheck(r), r;
1732
+ }
1733
+ _applyNormalization(t, r) {
1734
+ let n = [], { knownKeys: u, unknownKeys: o } = this._partitionOptionKeys(t);
1735
+ for (let i of u) {
1736
+ let s = this._utils.schemas[i], a = s.preprocess(t[i], this._utils);
1737
+ this._applyValidation(a, i, s);
1738
+ let c = ({ from: F, to: f }) => {
1739
+ n.push(typeof f == "string" ? { [f]: F } : { [f.key]: f.value });
1740
+ }, D = ({ value: F, redirectTo: f }) => {
1741
+ let d = Yt(s.deprecated(F, this._utils), a, true);
1742
+ if (d !== false) if (d === true) this._hasDeprecationWarned(i) || this._utils.logger.warn(this._deprecatedHandler(i, f, this._utils));
1743
+ else for (let { value: m } of d) {
1744
+ let C = { key: i, value: m };
1745
+ if (!this._hasDeprecationWarned(C)) {
1746
+ let E = typeof f == "string" ? { key: f, value: m } : f;
1747
+ this._utils.logger.warn(this._deprecatedHandler(C, E, this._utils));
1748
+ }
1749
+ }
1750
+ };
1751
+ ot(s.forward(a, this._utils), a).forEach(c);
1752
+ let l = jt(s.redirect(a, this._utils), a);
1753
+ if (l.redirect.forEach(c), "remain" in l) {
1754
+ let F = l.remain;
1755
+ r[i] = i in r ? s.overlap(r[i], F, this._utils) : F, D({ value: F });
1756
+ }
1757
+ for (let { from: F, to: f } of l.redirect) D({ value: F, redirectTo: f });
1758
+ }
1759
+ for (let i of o) {
1760
+ let s = t[i];
1761
+ this._applyUnknownHandler(i, s, r, (a, c) => {
1762
+ n.push({ [a]: c });
1763
+ });
1764
+ }
1765
+ return n;
1766
+ }
1767
+ _applyRequiredCheck(t) {
1768
+ for (let r of Object.keys(this._utils.schemas)) if (this._identifyMissing(r, t) && this._identifyRequired(r)) throw this._invalidHandler(r, Ze, this._utils);
1769
+ }
1770
+ _partitionOptionKeys(t) {
1771
+ let [r, n] = gn(Object.keys(t).filter((u) => !this._identifyMissing(u, t)), (u) => u in this._utils.schemas);
1772
+ return { knownKeys: r, unknownKeys: n };
1773
+ }
1774
+ _applyValidation(t, r, n) {
1775
+ let u = Rt(n.validate(t, this._utils), t);
1776
+ if (u !== true) throw this._invalidHandler(r, u.value, this._utils);
1777
+ }
1778
+ _applyUnknownHandler(t, r, n, u) {
1779
+ let o = this._unknownHandler(t, r, this._utils);
1780
+ if (o) for (let i of Object.keys(o)) {
1781
+ if (this._identifyMissing(i, o)) continue;
1782
+ let s = o[i];
1783
+ i in this._utils.schemas ? u(i, s) : n[i] = s;
1784
+ }
1785
+ }
1786
+ _applyPostprocess(t) {
1787
+ let r = this._postprocess(t, this._utils);
1788
+ if (r !== ge) {
1789
+ if (r.delete) for (let n of r.delete) delete t[n];
1790
+ if (r.override) {
1791
+ let { knownKeys: n, unknownKeys: u } = this._partitionOptionKeys(r.override);
1792
+ for (let o of n) {
1793
+ let i = r.override[o];
1794
+ this._applyValidation(i, o, this._utils.schemas[o]), t[o] = i;
1795
+ }
1796
+ for (let o of u) {
1797
+ let i = r.override[o];
1798
+ this._applyUnknownHandler(o, i, t, (s, a) => {
1799
+ let c = this._utils.schemas[s];
1800
+ this._applyValidation(a, s, c), t[s] = a;
1801
+ });
1802
+ }
1803
+ }
1804
+ }
1805
+ }
1806
+ };
1807
+ var Ut;
1808
+ function lo(e, t, { logger: r = false, isCLI: n = false, passThrough: u = false, FlagSchema: o, descriptor: i } = {}) {
1809
+ if (n) {
1810
+ if (!o) throw new Error("'FlagSchema' option is required.");
1811
+ if (!i) throw new Error("'descriptor' option is required.");
1812
+ } else i = re;
1813
+ let s = u ? Array.isArray(u) ? (l, F) => u.includes(l) ? { [l]: F } : void 0 : (l, F) => ({ [l]: F }) : (l, F, f) => {
1814
+ let _a = f.schemas, { _: d } = _a, m = __objRest(_a, ["_"]);
1815
+ return et(l, F, __spreadProps(__spreadValues({}, f), { schemas: m }));
1816
+ }, a = Fo(t, { isCLI: n, FlagSchema: o }), c = new Dt(a, { logger: r, unknown: s, descriptor: i }), D = r !== false;
1817
+ D && Ut && (c._hasDeprecationWarned = Ut);
1818
+ let p = c.normalize(e);
1819
+ return D && (Ut = c._hasDeprecationWarned), p;
1820
+ }
1821
+ function Fo(e, { isCLI: t, FlagSchema: r }) {
1822
+ let n = [];
1823
+ t && n.push(rt.create({ name: "_" }));
1824
+ for (let u of e) n.push(po(u, { isCLI: t, optionInfos: e, FlagSchema: r })), u.alias && t && n.push(tt.create({ name: u.alias, sourceName: u.name }));
1825
+ return n;
1826
+ }
1827
+ function po(e, { isCLI: t, optionInfos: r, FlagSchema: n }) {
1828
+ let { name: u } = e, o = { name: u }, i, s = {};
1829
+ switch (e.type) {
1830
+ case "int":
1831
+ i = at, t && (o.preprocess = Number);
1832
+ break;
1833
+ case "string":
1834
+ i = Ie;
1835
+ break;
1836
+ case "choice":
1837
+ i = it, o.choices = e.choices.map((a) => a != null && a.redirect ? __spreadProps(__spreadValues({}, a), { redirect: { to: { key: e.name, value: a.redirect } } }) : a);
1838
+ break;
1839
+ case "boolean":
1840
+ i = ut;
1841
+ break;
1842
+ case "flag":
1843
+ i = n, o.flags = r.flatMap((a) => [a.alias, a.description && a.name, a.oppositeDescription && `no-${a.name}`].filter(Boolean));
1844
+ break;
1845
+ case "path":
1846
+ i = Ie;
1847
+ break;
1848
+ default:
1849
+ throw new Error(`Unexpected type ${e.type}`);
1850
+ }
1851
+ if (e.exception ? o.validate = (a, c, D) => e.exception(a) || c.validate(a, D) : o.validate = (a, c, D) => a === void 0 || c.validate(a, D), e.redirect && (s.redirect = (a) => a ? { to: typeof e.redirect == "string" ? e.redirect : { key: e.redirect.option, value: e.redirect.value } } : void 0), e.deprecated && (s.deprecated = true), t && !e.array) {
1852
+ let a = o.preprocess || ((c) => c);
1853
+ o.preprocess = (c, D, p) => D.preprocess(a(Array.isArray(c) ? y(false, c, -1) : c), p);
1854
+ }
1855
+ return e.array ? nt.create(__spreadProps(__spreadValues(__spreadValues({}, t ? { preprocess: (a) => Array.isArray(a) ? a : [a] } : {}), s), { valueSchema: i.create(o) })) : i.create(__spreadValues(__spreadValues({}, o), s));
1856
+ }
1857
+ var kn = lo;
1858
+ var mo = (e, t, r) => {
1859
+ if (!(e && t == null)) {
1860
+ if (t.findLast) return t.findLast(r);
1861
+ for (let n = t.length - 1; n >= 0; n--) {
1862
+ let u = t[n];
1863
+ if (r(u, n, t)) return u;
1864
+ }
1865
+ }
1866
+ };
1867
+ var Vt = mo;
1868
+ function $t(e, t) {
1869
+ if (!t) throw new Error("parserName is required.");
1870
+ let r = Vt(false, e, (u) => u.parsers && Object.prototype.hasOwnProperty.call(u.parsers, t));
1871
+ if (r) return r;
1872
+ let n = `Couldn't resolve parser "${t}".`;
1873
+ throw n += " Plugins must be explicitly added to the standalone bundle.", new ve(n);
1874
+ }
1875
+ function Sn(e, t) {
1876
+ if (!t) throw new Error("astFormat is required.");
1877
+ let r = Vt(false, e, (u) => u.printers && Object.prototype.hasOwnProperty.call(u.printers, t));
1878
+ if (r) return r;
1879
+ let n = `Couldn't find plugin for AST format "${t}".`;
1880
+ throw n += " Plugins must be explicitly added to the standalone bundle.", new ve(n);
1881
+ }
1882
+ function Re({ plugins: e, parser: t }) {
1883
+ let r = $t(e, t);
1884
+ return Wt(r, t);
1885
+ }
1886
+ function Wt(e, t) {
1887
+ let r = e.parsers[t];
1888
+ return typeof r == "function" ? r() : r;
1889
+ }
1890
+ function Tn(e, t) {
1891
+ let r = e.printers[t];
1892
+ return typeof r == "function" ? r() : r;
1893
+ }
1894
+ var Nn = { astFormat: "estree", printer: {}, originalText: void 0, locStart: null, locEnd: null };
1895
+ async function Eo(e, t = {}) {
1896
+ var p;
1897
+ let r = __spreadValues({}, e);
1898
+ if (!r.parser) if (r.filepath) {
1899
+ if (r.parser = on(r, { physicalFile: r.filepath }), !r.parser) throw new Le(`No parser could be inferred for file "${r.filepath}".`);
1900
+ } else throw new Le("No parser and no file path given, couldn't infer a parser.");
1901
+ let n = Qe({ plugins: e.plugins, showDeprecated: true }).options, u = __spreadValues(__spreadValues({}, Nn), Object.fromEntries(n.filter((l) => l.default !== void 0).map((l) => [l.name, l.default]))), o = $t(r.plugins, r.parser), i = await Wt(o, r.parser);
1902
+ r.astFormat = i.astFormat, r.locEnd = i.locEnd, r.locStart = i.locStart;
1903
+ let s = (p = o.printers) != null && p[i.astFormat] ? o : Sn(r.plugins, i.astFormat), a = await Tn(s, i.astFormat);
1904
+ r.printer = a;
1905
+ let c = s.defaultOptions ? Object.fromEntries(Object.entries(s.defaultOptions).filter(([, l]) => l !== void 0)) : {}, D = __spreadValues(__spreadValues({}, u), c);
1906
+ for (let [l, F] of Object.entries(D)) (r[l] === null || r[l] === void 0) && (r[l] = F);
1907
+ return r.parser === "json" && (r.trailingComma = "none"), kn(r, n, __spreadValues({ passThrough: Object.keys(Nn) }, t));
1908
+ }
1909
+ var ne = Eo;
1910
+ var vn = gu(Pn(), 1);
1911
+ async function yo(e, t) {
1912
+ let r = await Re(t), n = r.preprocess ? r.preprocess(e, t) : e;
1913
+ t.originalText = n;
1914
+ let u;
1915
+ try {
1916
+ u = await r.parse(n, t, t);
1917
+ } catch (o) {
1918
+ Ao(o, e);
1919
+ }
1920
+ return { text: n, ast: u };
1921
+ }
1922
+ function Ao(e, t) {
1923
+ let { loc: r } = e;
1924
+ if (r) {
1925
+ let n = (0, vn.codeFrameColumns)(t, r, { highlightCode: true });
1926
+ throw e.message += `
1927
+ ` + n, e.codeFrame = n, e;
1928
+ }
1929
+ throw e;
1930
+ }
1931
+ var De = yo;
1932
+ async function Ln(e, t, r, n, u) {
1933
+ var _a;
1934
+ let { embeddedLanguageFormatting: o, printer: { embed: i, hasPrettierIgnore: s = () => false, getVisitorKeys: a } } = r;
1935
+ if (!i || o !== "auto") return;
1936
+ if (i.length > 2) throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");
1937
+ let c = J((_a = i.getVisitorKeys) != null ? _a : a), D = [];
1938
+ F();
1939
+ let p = e.stack;
1940
+ for (let { print: f, node: d, pathStack: m } of D) try {
1941
+ e.stack = m;
1942
+ let C = await f(l, t, e, r);
1943
+ C && u.set(d, C);
1944
+ } catch (C) {
1945
+ if (globalThis.PRETTIER_DEBUG) throw C;
1946
+ }
1947
+ e.stack = p;
1948
+ function l(f, d) {
1949
+ return Bo(f, d, r, n);
1950
+ }
1951
+ function F() {
1952
+ let { node: f } = e;
1953
+ if (f === null || typeof f != "object" || s(e)) return;
1954
+ for (let m of c(f)) Array.isArray(f[m]) ? e.each(F, m) : e.call(F, m);
1955
+ let d = i(e, r);
1956
+ if (d) {
1957
+ if (typeof d == "function") {
1958
+ D.push({ print: d, node: f, pathStack: [...e.stack] });
1959
+ return;
1960
+ }
1961
+ u.set(f, d);
1962
+ }
1963
+ }
1964
+ }
1965
+ async function Bo(e, t, r, n) {
1966
+ let u = await ne(__spreadProps(__spreadValues(__spreadValues({}, r), t), { parentParser: r.parser, originalText: e, cursorOffset: void 0, rangeStart: void 0, rangeEnd: void 0 }), { passThrough: true }), { ast: o } = await De(e, u), i = await n(o, u);
1967
+ return $e(i);
1968
+ }
1969
+ function _o(e, t) {
1970
+ let { originalText: r, [/* @__PURE__ */ Symbol.for("comments")]: n, locStart: u, locEnd: o, [/* @__PURE__ */ Symbol.for("printedComments")]: i } = t, { node: s } = e, a = u(s), c = o(s);
1971
+ for (let D of n) u(D) >= a && o(D) <= c && i.add(D);
1972
+ return r.slice(a, c);
1973
+ }
1974
+ var In = _o;
1975
+ async function Ye(e, t) {
1976
+ ({ ast: e } = await Gt(e, t));
1977
+ let r = /* @__PURE__ */ new Map(), n = new Or(e), u = Kr(t), o = /* @__PURE__ */ new Map();
1978
+ await Ln(n, s, t, Ye, o);
1979
+ let i = await Rn(n, t, s, void 0, o);
1980
+ if (Gr(t), t.cursorOffset >= 0) {
1981
+ if (t.nodeAfterCursor && !t.nodeBeforeCursor) return [X, i];
1982
+ if (t.nodeBeforeCursor && !t.nodeAfterCursor) return [i, X];
1983
+ }
1984
+ return i;
1985
+ function s(c, D) {
1986
+ return c === void 0 || c === n ? a(D) : Array.isArray(c) ? n.call(() => a(D), ...c) : n.call(() => a(D), c);
1987
+ }
1988
+ function a(c) {
1989
+ u(n);
1990
+ let D = n.node;
1991
+ if (D == null) return "";
1992
+ let p = D && typeof D == "object" && c === void 0;
1993
+ if (p && r.has(D)) return r.get(D);
1994
+ let l = Rn(n, t, s, c, o);
1995
+ return p && r.set(D, l), l;
1996
+ }
1997
+ }
1998
+ function Rn(e, t, r, n, u) {
1999
+ var a;
2000
+ let { node: o } = e, { printer: i } = t, s;
2001
+ switch ((a = i.hasPrettierIgnore) != null && a.call(i, e) ? s = In(e, t) : u.has(o) ? s = u.get(o) : s = i.print(e, t, r, n), o) {
2002
+ case t.cursorNode:
2003
+ s = Fe(s, (c) => [X, c, X]);
2004
+ break;
2005
+ case t.nodeBeforeCursor:
2006
+ s = Fe(s, (c) => [c, X]);
2007
+ break;
2008
+ case t.nodeAfterCursor:
2009
+ s = Fe(s, (c) => [X, c]);
2010
+ break;
2011
+ }
2012
+ return i.printComment && (!i.willPrintOwnComments || !i.willPrintOwnComments(e, t)) && (s = Mr(e, s, t)), s;
2013
+ }
2014
+ async function Gt(e, t) {
2015
+ var _a;
2016
+ let r = (_a = e.comments) != null ? _a : [];
2017
+ t[/* @__PURE__ */ Symbol.for("comments")] = r, t[/* @__PURE__ */ Symbol.for("printedComments")] = /* @__PURE__ */ new Set(), Vr(e, t);
2018
+ let { printer: { preprocess: n } } = t;
2019
+ return e = n ? await n(e, t) : e, { ast: e, comments: r };
2020
+ }
2021
+ function xo(e, t) {
2022
+ let { cursorOffset: r, locStart: n, locEnd: u } = t, o = J(t.printer.getVisitorKeys), i = (F) => n(F) <= r && u(F) >= r, s = e, a = [e];
2023
+ for (let F of Lr(e, { getVisitorKeys: o, filter: i })) a.push(F), s = F;
2024
+ if (Ir(s, { getVisitorKeys: o })) return { cursorNode: s };
2025
+ let c, D, p = -1, l = Number.POSITIVE_INFINITY;
2026
+ for (; a.length > 0 && (c === void 0 || D === void 0); ) {
2027
+ s = a.pop();
2028
+ let F = c !== void 0, f = D !== void 0;
2029
+ for (let d of Ce(s, { getVisitorKeys: o })) {
2030
+ if (!F) {
2031
+ let m = u(d);
2032
+ m <= r && m > p && (c = d, p = m);
2033
+ }
2034
+ if (!f) {
2035
+ let m = n(d);
2036
+ m >= r && m < l && (D = d, l = m);
2037
+ }
2038
+ }
2039
+ }
2040
+ return { nodeBeforeCursor: c, nodeAfterCursor: D };
2041
+ }
2042
+ var Kt = xo;
2043
+ function wo(e, t) {
2044
+ var _a;
2045
+ let { printer: { massageAstNode: r, getVisitorKeys: n } } = t;
2046
+ if (!r) return e;
2047
+ let u = J(n), o = (_a = r.ignoredProperties) != null ? _a : /* @__PURE__ */ new Set();
2048
+ return i(e);
2049
+ function i(s, a) {
2050
+ if (!(s !== null && typeof s == "object")) return s;
2051
+ if (Array.isArray(s)) return s.map((l) => i(l, a)).filter(Boolean);
2052
+ let c = {}, D = new Set(u(s));
2053
+ for (let l in s) !Object.prototype.hasOwnProperty.call(s, l) || o.has(l) || (D.has(l) ? c[l] = i(s[l], s) : c[l] = s[l]);
2054
+ let p = r(s, c, a);
2055
+ if (p !== null) return p != null ? p : c;
2056
+ }
2057
+ }
2058
+ var Yn = wo;
2059
+ var bo = (e, t, r) => {
2060
+ if (!(e && t == null)) {
2061
+ if (t.findLastIndex) return t.findLastIndex(r);
2062
+ for (let n = t.length - 1; n >= 0; n--) {
2063
+ let u = t[n];
2064
+ if (r(u, n, t)) return n;
2065
+ }
2066
+ return -1;
2067
+ }
2068
+ };
2069
+ var jn = bo;
2070
+ var ko = ({ parser: e }) => e === "json" || e === "json5" || e === "jsonc" || e === "json-stringify";
2071
+ function So(e, t) {
2072
+ let r = [e.node, ...e.parentNodes], n = /* @__PURE__ */ new Set([t.node, ...t.parentNodes]);
2073
+ return r.find((u) => $n.has(u.type) && n.has(u));
2074
+ }
2075
+ function Un(e) {
2076
+ let t = jn(false, e, (r) => r.type !== "Program" && r.type !== "File");
2077
+ return t === -1 ? e : e.slice(0, t + 1);
2078
+ }
2079
+ function To(e, t, { locStart: r, locEnd: n }) {
2080
+ let u = e.node, o = t.node;
2081
+ if (u === o) return { startNode: u, endNode: o };
2082
+ let i = r(e.node);
2083
+ for (let a of Un(t.parentNodes)) if (r(a) >= i) o = a;
2084
+ else break;
2085
+ let s = n(t.node);
2086
+ for (let a of Un(e.parentNodes)) {
2087
+ if (n(a) <= s) u = a;
2088
+ else break;
2089
+ if (u === o) break;
2090
+ }
2091
+ return { startNode: u, endNode: o };
2092
+ }
2093
+ function zt(e, t, r, n, u = [], o) {
2094
+ let { locStart: i, locEnd: s } = r, a = i(e), c = s(e);
2095
+ if (!(t > c || t < a || o === "rangeEnd" && t === a || o === "rangeStart" && t === c)) {
2096
+ for (let D of Xe(e, r)) {
2097
+ let p = zt(D, t, r, n, [e, ...u], o);
2098
+ if (p) return p;
2099
+ }
2100
+ if (!n || n(e, u[0])) return { node: e, parentNodes: u };
2101
+ }
2102
+ }
2103
+ function No(e, t) {
2104
+ return t !== "DeclareExportDeclaration" && e !== "TypeParameterDeclaration" && (e === "Directive" || e === "TypeAlias" || e === "TSExportAssignment" || e.startsWith("Declare") || e.startsWith("TSDeclare") || e.endsWith("Statement") || e.endsWith("Declaration"));
2105
+ }
2106
+ var $n = /* @__PURE__ */ new Set(["JsonRoot", "ObjectExpression", "ArrayExpression", "StringLiteral", "NumericLiteral", "BooleanLiteral", "NullLiteral", "UnaryExpression", "TemplateLiteral"]);
2107
+ var Oo = /* @__PURE__ */ new Set(["OperationDefinition", "FragmentDefinition", "VariableDefinition", "TypeExtensionDefinition", "ObjectTypeDefinition", "FieldDefinition", "DirectiveDefinition", "EnumTypeDefinition", "EnumValueDefinition", "InputValueDefinition", "InputObjectTypeDefinition", "SchemaDefinition", "OperationTypeDefinition", "InterfaceTypeDefinition", "UnionTypeDefinition", "ScalarTypeDefinition"]);
2108
+ function Vn(e, t, r) {
2109
+ if (!t) return false;
2110
+ switch (e.parser) {
2111
+ case "flow":
2112
+ case "hermes":
2113
+ case "babel":
2114
+ case "babel-flow":
2115
+ case "babel-ts":
2116
+ case "typescript":
2117
+ case "acorn":
2118
+ case "espree":
2119
+ case "meriyah":
2120
+ case "oxc":
2121
+ case "oxc-ts":
2122
+ case "__babel_estree":
2123
+ return No(t.type, r == null ? void 0 : r.type);
2124
+ case "json":
2125
+ case "json5":
2126
+ case "jsonc":
2127
+ case "json-stringify":
2128
+ return $n.has(t.type);
2129
+ case "graphql":
2130
+ return Oo.has(t.kind);
2131
+ case "vue":
2132
+ return t.tag !== "root";
2133
+ }
2134
+ return false;
2135
+ }
2136
+ function Wn(e, t, r) {
2137
+ let { rangeStart: n, rangeEnd: u, locStart: o, locEnd: i } = t;
2138
+ Oe.ok(u > n);
2139
+ let s = e.slice(n, u).search(/\S/u), a = s === -1;
2140
+ if (!a) for (n += s; u > n && !/\S/u.test(e[u - 1]); --u) ;
2141
+ let c = zt(r, n, t, (F, f) => Vn(t, F, f), [], "rangeStart"), D = a ? c : zt(r, u, t, (F) => Vn(t, F), [], "rangeEnd");
2142
+ if (!c || !D) return { rangeStart: 0, rangeEnd: 0 };
2143
+ let p, l;
2144
+ if (ko(t)) {
2145
+ let F = So(c, D);
2146
+ p = F, l = F;
2147
+ } else ({ startNode: p, endNode: l } = To(c, D, t));
2148
+ return { rangeStart: Math.min(o(p), o(l)), rangeEnd: Math.max(i(p), i(l)) };
2149
+ }
2150
+ var zn = "\uFEFF";
2151
+ var Mn = /* @__PURE__ */ Symbol("cursor");
2152
+ async function Hn(e, t, r = 0) {
2153
+ if (!e || e.trim().length === 0) return { formatted: "", cursorOffset: -1, comments: [] };
2154
+ let { ast: n, text: u } = await De(e, t);
2155
+ t.cursorOffset >= 0 && (t = __spreadValues(__spreadValues({}, t), Kt(n, t)));
2156
+ let o = await Ye(n, t, r);
2157
+ r > 0 && (o = Ge([z, o], r, t.tabWidth));
2158
+ let i = me(o, t);
2159
+ if (r > 0) {
2160
+ let a = i.formatted.trim();
2161
+ i.cursorNodeStart !== void 0 && (i.cursorNodeStart -= i.formatted.indexOf(a), i.cursorNodeStart < 0 && (i.cursorNodeStart = 0, i.cursorNodeText = i.cursorNodeText.trimStart()), i.cursorNodeStart + i.cursorNodeText.length > a.length && (i.cursorNodeText = i.cursorNodeText.trimEnd())), i.formatted = a + xe(t.endOfLine);
2162
+ }
2163
+ let s = t[/* @__PURE__ */ Symbol.for("comments")];
2164
+ if (t.cursorOffset >= 0) {
2165
+ let a, c, D, p;
2166
+ if ((t.cursorNode || t.nodeBeforeCursor || t.nodeAfterCursor) && i.cursorNodeText) if (D = i.cursorNodeStart, p = i.cursorNodeText, t.cursorNode) a = t.locStart(t.cursorNode), c = u.slice(a, t.locEnd(t.cursorNode));
2167
+ else {
2168
+ if (!t.nodeBeforeCursor && !t.nodeAfterCursor) throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");
2169
+ a = t.nodeBeforeCursor ? t.locEnd(t.nodeBeforeCursor) : 0;
2170
+ let C = t.nodeAfterCursor ? t.locStart(t.nodeAfterCursor) : u.length;
2171
+ c = u.slice(a, C);
2172
+ }
2173
+ else a = 0, c = u, D = 0, p = i.formatted;
2174
+ let l = t.cursorOffset - a;
2175
+ if (c === p) return { formatted: i.formatted, cursorOffset: D + l, comments: s };
2176
+ let F = c.split("");
2177
+ F.splice(l, 0, Mn);
2178
+ let f = p.split(""), d = Et(F, f), m = D;
2179
+ for (let C of d) if (C.removed) {
2180
+ if (C.value.includes(Mn)) break;
2181
+ } else m += C.count;
2182
+ return { formatted: i.formatted, cursorOffset: m, comments: s };
2183
+ }
2184
+ return { formatted: i.formatted, cursorOffset: -1, comments: s };
2185
+ }
2186
+ async function Po(e, t) {
2187
+ let { ast: r, text: n } = await De(e, t), { rangeStart: u, rangeEnd: o } = Wn(n, t, r), i = n.slice(u, o), s = Math.min(u, n.lastIndexOf(`
2188
+ `, u) + 1), a = n.slice(s, u).match(/^\s*/u)[0], c = Ee(a, t.tabWidth), D = await Hn(i, __spreadProps(__spreadValues({}, t), { rangeStart: 0, rangeEnd: Number.POSITIVE_INFINITY, cursorOffset: t.cursorOffset > u && t.cursorOffset <= o ? t.cursorOffset - u : -1, endOfLine: "lf" }), c), p = D.formatted.trimEnd(), { cursorOffset: l } = t;
2189
+ l > o ? l += p.length - i.length : D.cursorOffset >= 0 && (l = D.cursorOffset + u);
2190
+ let F = n.slice(0, u) + p + n.slice(o);
2191
+ if (t.endOfLine !== "lf") {
2192
+ let f = xe(t.endOfLine);
2193
+ l >= 0 && f === `\r
2194
+ ` && (l += Ct(F.slice(0, l), `
2195
+ `)), F = te(false, F, `
2196
+ `, f);
2197
+ }
2198
+ return { formatted: F, cursorOffset: l, comments: D.comments };
2199
+ }
2200
+ function Ht(e, t, r) {
2201
+ return typeof t != "number" || Number.isNaN(t) || t < 0 || t > e.length ? r : t;
2202
+ }
2203
+ function Gn(e, t) {
2204
+ let { cursorOffset: r, rangeStart: n, rangeEnd: u } = t;
2205
+ return r = Ht(e, r, -1), n = Ht(e, n, 0), u = Ht(e, u, e.length), __spreadProps(__spreadValues({}, t), { cursorOffset: r, rangeStart: n, rangeEnd: u });
2206
+ }
2207
+ function Jn(e, t) {
2208
+ let { cursorOffset: r, rangeStart: n, rangeEnd: u, endOfLine: o } = Gn(e, t), i = e.charAt(0) === zn;
2209
+ if (i && (e = e.slice(1), r--, n--, u--), o === "auto" && (o = nr(e)), e.includes("\r")) {
2210
+ let s = (a) => Ct(e.slice(0, Math.max(a, 0)), `\r
2211
+ `);
2212
+ r -= s(r), n -= s(n), u -= s(u), e = ur(e);
2213
+ }
2214
+ return { hasBOM: i, text: e, options: Gn(e, __spreadProps(__spreadValues({}, t), { cursorOffset: r, rangeStart: n, rangeEnd: u, endOfLine: o })) };
2215
+ }
2216
+ async function Kn(e, t) {
2217
+ let r = await Re(t);
2218
+ return !r.hasPragma || r.hasPragma(e);
2219
+ }
2220
+ async function vo(e, t) {
2221
+ var n;
2222
+ let r = await Re(t);
2223
+ return (n = r.hasIgnorePragma) == null ? void 0 : n.call(r, e);
2224
+ }
2225
+ async function Jt(e, t) {
2226
+ let { hasBOM: r, text: n, options: u } = Jn(e, await ne(t));
2227
+ if (u.rangeStart >= u.rangeEnd && n !== "" || u.requirePragma && !await Kn(n, u) || u.checkIgnorePragma && await vo(n, u)) return { formatted: e, cursorOffset: t.cursorOffset, comments: [] };
2228
+ let o;
2229
+ return u.rangeStart > 0 || u.rangeEnd < n.length ? o = await Po(n, u) : (!u.requirePragma && u.insertPragma && u.printer.insertPragma && !await Kn(n, u) && (n = u.printer.insertPragma(n)), o = await Hn(n, u)), r && (o.formatted = zn + o.formatted, o.cursorOffset >= 0 && o.cursorOffset++), o;
2230
+ }
2231
+ async function qn(e, t, r) {
2232
+ let { text: n, options: u } = Jn(e, await ne(t)), o = await De(n, u);
2233
+ return r && (r.preprocessForPrint && (o.ast = await Gt(o.ast, u)), r.massage && (o.ast = Yn(o.ast, u))), o;
2234
+ }
2235
+ async function Xn(e, t) {
2236
+ t = await ne(t);
2237
+ let r = await Ye(e, t);
2238
+ return me(r, t);
2239
+ }
2240
+ async function Qn(e, t) {
2241
+ let r = wr(e), { formatted: n } = await Jt(r, __spreadProps(__spreadValues({}, t), { parser: "__js_expression" }));
2242
+ return n;
2243
+ }
2244
+ async function Zn(e, t) {
2245
+ t = await ne(t);
2246
+ let { ast: r } = await De(e, t);
2247
+ return t.cursorOffset >= 0 && (t = __spreadValues(__spreadValues({}, t), Kt(r, t))), Ye(r, t);
2248
+ }
2249
+ async function eu(e, t) {
2250
+ return me(e, await ne(t));
2251
+ }
2252
+ var qt = {};
2253
+ dt(qt, { builders: () => Io, printer: () => Ro, utils: () => Yo });
2254
+ var Io = { join: ke, line: Me, softline: _r, hardline: z, literalline: We, group: At, conditionalGroup: Cr, fill: hr, lineSuffix: Se, lineSuffixBoundary: Ar, cursor: X, breakParent: pe, ifBreak: gr, trim: Br, indent: ie, indentIfBreak: yr, align: oe, addAlignmentToDoc: Ge, markAsRoot: mr, dedentToRoot: dr, dedent: Er, hardlineWithoutBreakParent: Te, literallineWithoutBreakParent: Bt, label: xr, concat: (e) => e };
2255
+ var Ro = { printDocToString: me };
2256
+ var Yo = { willBreak: Dr, traverseDoc: le, findInDoc: Ve, mapDoc: be, removeLines: fr, stripTrailingHardline: $e, replaceEndOfLine: lr, canBreak: Fr };
2257
+ var tu = "3.6.2";
2258
+ var Qt = {};
2259
+ dt(Qt, { addDanglingComment: () => ee, addLeadingComment: () => se, addTrailingComment: () => ae, getAlignmentSize: () => Ee, getIndentSize: () => ru, getMaxContinuousCount: () => nu, getNextNonSpaceNonCommentCharacter: () => uu, getNextNonSpaceNonCommentCharacterIndex: () => Xo, getPreferredQuote: () => iu, getStringWidth: () => Ne, hasNewline: () => G, hasNewlineInRange: () => su, hasSpaces: () => au, isNextLineEmpty: () => ti, isNextLineEmptyAfterIndex: () => ct, isPreviousLineEmpty: () => Zo, makeString: () => Du, skip: () => he, skipEverythingButNewLine: () => Je, skipInlineComment: () => ye, skipNewline: () => U, skipSpaces: () => T, skipToLineEnd: () => He, skipTrailingComment: () => Ae, skipWhitespace: () => Rr });
2260
+ function jo(e, t) {
2261
+ if (t === false) return false;
2262
+ if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
2263
+ for (let r = t + 2; r < e.length; ++r) if (e.charAt(r) === "*" && e.charAt(r + 1) === "/") return r + 2;
2264
+ }
2265
+ return t;
2266
+ }
2267
+ var ye = jo;
2268
+ function Uo(e, t) {
2269
+ return t === false ? false : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? Je(e, t) : t;
2270
+ }
2271
+ var Ae = Uo;
2272
+ function Vo(e, t) {
2273
+ let r = null, n = t;
2274
+ for (; n !== r; ) r = n, n = T(e, n), n = ye(e, n), n = Ae(e, n), n = U(e, n);
2275
+ return n;
2276
+ }
2277
+ var je = Vo;
2278
+ function $o(e, t) {
2279
+ let r = null, n = t;
2280
+ for (; n !== r; ) r = n, n = He(e, n), n = ye(e, n), n = T(e, n);
2281
+ return n = Ae(e, n), n = U(e, n), n !== false && G(e, n);
2282
+ }
2283
+ var ct = $o;
2284
+ function Wo(e, t) {
2285
+ let r = e.lastIndexOf(`
2286
+ `);
2287
+ return r === -1 ? 0 : Ee(e.slice(r + 1).match(/^[\t ]*/u)[0], t);
2288
+ }
2289
+ var ru = Wo;
2290
+ function Xt(e) {
2291
+ if (typeof e != "string") throw new TypeError("Expected a string");
2292
+ return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
2293
+ }
2294
+ function Mo(e, t) {
2295
+ let r = e.match(new RegExp(`(${Xt(t)})+`, "gu"));
2296
+ return r === null ? 0 : r.reduce((n, u) => Math.max(n, u.length / t.length), 0);
2297
+ }
2298
+ var nu = Mo;
2299
+ function Go(e, t) {
2300
+ let r = je(e, t);
2301
+ return r === false ? "" : e.charAt(r);
2302
+ }
2303
+ var uu = Go;
2304
+ var ft = "'";
2305
+ var ou = '"';
2306
+ function Ko(e, t) {
2307
+ let r = t === true || t === ft ? ft : ou, n = r === ft ? ou : ft, u = 0, o = 0;
2308
+ for (let i of e) i === r ? u++ : i === n && o++;
2309
+ return u > o ? n : r;
2310
+ }
2311
+ var iu = Ko;
2312
+ function zo(e, t, r) {
2313
+ for (let n = t; n < r; ++n) if (e.charAt(n) === `
2314
+ `) return true;
2315
+ return false;
2316
+ }
2317
+ var su = zo;
2318
+ function Ho(e, t, r = {}) {
2319
+ return T(e, r.backwards ? t - 1 : t, r) !== t;
2320
+ }
2321
+ var au = Ho;
2322
+ function Jo(e, t, r) {
2323
+ let n = t === '"' ? "'" : '"', o = te(false, e, new RegExp(`\\\\(.)|(["'])`, "gsu"), (i, s, a) => s === n ? s : a === t ? "\\" + a : a || (r && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(s) ? s : "\\" + s));
2324
+ return t + o + t;
2325
+ }
2326
+ var Du = Jo;
2327
+ function qo(e, t, r) {
2328
+ return je(e, r(t));
2329
+ }
2330
+ function Xo(e, t) {
2331
+ return arguments.length === 2 || typeof t == "number" ? je(e, t) : qo(...arguments);
2332
+ }
2333
+ function Qo(e, t, r) {
2334
+ return Pe(e, r(t));
2335
+ }
2336
+ function Zo(e, t) {
2337
+ return arguments.length === 2 || typeof t == "number" ? Pe(e, t) : Qo(...arguments);
2338
+ }
2339
+ function ei(e, t, r) {
2340
+ return ct(e, r(t));
2341
+ }
2342
+ function ti(e, t) {
2343
+ return arguments.length === 2 || typeof t == "number" ? ct(e, t) : ei(...arguments);
2344
+ }
2345
+ function ce(e, t = 1) {
2346
+ return async (...r) => {
2347
+ var _a, _b;
2348
+ let n = (_a = r[t]) != null ? _a : {}, u = (_b = n.plugins) != null ? _b : [];
2349
+ return r[t] = __spreadProps(__spreadValues({}, n), { plugins: Array.isArray(u) ? u : Object.values(u) }), e(...r);
2350
+ };
2351
+ }
2352
+ var cu = ce(Jt);
2353
+ async function fu(e, t) {
2354
+ let { formatted: r } = await cu(e, __spreadProps(__spreadValues({}, t), { cursorOffset: -1 }));
2355
+ return r;
2356
+ }
2357
+ async function ri(e, t) {
2358
+ return await fu(e, t) === e;
2359
+ }
2360
+ var ni = ce(Qe, 0);
2361
+ var ui = { parse: ce(qn), formatAST: ce(Xn), formatDoc: ce(Qn), printToDoc: ce(Zn), printDocToString: ce(eu) };
2362
+ var xf = Zt;
2363
+ export {
2364
+ ui as __debug,
2365
+ ri as check,
2366
+ xf as default,
2367
+ qt as doc,
2368
+ fu as format,
2369
+ cu as formatWithCursor,
2370
+ ni as getSupportInfo,
2371
+ Qt as util,
2372
+ tu as version
2373
+ };