reactjs-tiptap-editor 0.3.31 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/README.md +8 -2
  2. package/lib/{ActionMenuButton-BCgqJsST.cjs → ActionMenuButton-CYdM1xx5.cjs} +1 -1
  3. package/lib/{ActionMenuButton-D97K0UWT.js → ActionMenuButton-DKRF6oa0.js} +1 -1
  4. package/lib/Attachment.cjs +2 -2
  5. package/lib/Attachment.d.cts +25 -29
  6. package/lib/Attachment.d.ts +25 -29
  7. package/lib/Attachment.js +7 -6
  8. package/lib/BaseKit.cjs +3 -0
  9. package/lib/BaseKit.d.cts +481 -0
  10. package/lib/BaseKit.d.ts +481 -0
  11. package/lib/BaseKit.js +132 -0
  12. package/lib/Blockquote.cjs +5 -1
  13. package/lib/Blockquote.d.cts +25 -29
  14. package/lib/Blockquote.d.ts +25 -29
  15. package/lib/Blockquote.js +33 -17
  16. package/lib/Bold.cjs +1 -1
  17. package/lib/Bold.d.cts +25 -29
  18. package/lib/Bold.d.ts +25 -29
  19. package/lib/Bold.js +23 -16
  20. package/lib/BulletList.cjs +1 -1
  21. package/lib/BulletList.d.cts +26 -30
  22. package/lib/BulletList.d.ts +26 -30
  23. package/lib/BulletList.js +11 -57
  24. package/lib/Clear.cjs +1 -1
  25. package/lib/Clear.d.cts +25 -29
  26. package/lib/Clear.d.ts +25 -29
  27. package/lib/Clear.js +4 -2
  28. package/lib/Code.cjs +1 -1
  29. package/lib/Code.d.cts +25 -29
  30. package/lib/Code.d.ts +25 -29
  31. package/lib/Code.js +29 -25
  32. package/lib/CodeBlock.cjs +2 -2
  33. package/lib/CodeBlock.d.cts +25 -29
  34. package/lib/CodeBlock.d.ts +25 -29
  35. package/lib/CodeBlock.js +3 -3
  36. package/lib/CodeView.cjs +1 -1
  37. package/lib/CodeView.d.cts +25 -29
  38. package/lib/CodeView.d.ts +25 -29
  39. package/lib/CodeView.js +3 -2
  40. package/lib/Color.cjs +1 -1
  41. package/lib/Color.d.cts +26 -30
  42. package/lib/Color.d.ts +26 -30
  43. package/lib/Color.js +42 -74
  44. package/lib/Document.cjs +1 -1
  45. package/lib/Document.d.cts +25 -29
  46. package/lib/Document.d.ts +25 -29
  47. package/lib/Document.js +4 -8
  48. package/lib/{Drawer-BHkje8ys.js → Drawer-CaAfmqNo.js} +37 -35
  49. package/lib/{Drawer-5Q_-WRhc.cjs → Drawer-CdvCMSzN.cjs} +1 -1
  50. package/lib/Drawer.cjs +1 -1
  51. package/lib/Drawer.d.cts +25 -29
  52. package/lib/Drawer.d.ts +25 -29
  53. package/lib/Drawer.js +4 -4
  54. package/lib/Emoji.cjs +1 -1
  55. package/lib/Emoji.d.cts +28 -30
  56. package/lib/Emoji.d.ts +28 -30
  57. package/lib/Emoji.js +19795 -184
  58. package/lib/{Excalidraw-GUVW-IqC.cjs → Excalidraw-BbMQhNvs.cjs} +1 -1
  59. package/lib/{Excalidraw-CG498239.js → Excalidraw-CVWz2Vyn.js} +20 -20
  60. package/lib/Excalidraw.cjs +1 -1
  61. package/lib/Excalidraw.d.cts +25 -29
  62. package/lib/Excalidraw.d.ts +25 -29
  63. package/lib/Excalidraw.js +3 -3
  64. package/lib/ExportPdf.cjs +1 -1
  65. package/lib/ExportPdf.d.cts +25 -29
  66. package/lib/ExportPdf.d.ts +25 -29
  67. package/lib/ExportPdf.js +4 -2
  68. package/lib/ExportWord.cjs +1 -1
  69. package/lib/ExportWord.d.cts +25 -29
  70. package/lib/ExportWord.d.ts +25 -29
  71. package/lib/ExportWord.js +22 -51
  72. package/lib/FontFamily.cjs +1 -1
  73. package/lib/FontFamily.d.cts +26 -30
  74. package/lib/FontFamily.d.ts +26 -30
  75. package/lib/FontFamily.js +44 -73
  76. package/lib/FontSize.cjs +1 -1
  77. package/lib/FontSize.d.cts +25 -29
  78. package/lib/FontSize.d.ts +25 -29
  79. package/lib/FontSize.js +7 -5
  80. package/lib/FormatPainter.cjs +1 -1
  81. package/lib/FormatPainter.d.cts +25 -29
  82. package/lib/FormatPainter.d.ts +25 -29
  83. package/lib/FormatPainter.js +4 -2
  84. package/lib/Heading.cjs +1 -1
  85. package/lib/Heading.d.cts +25 -29
  86. package/lib/Heading.d.ts +25 -29
  87. package/lib/Heading.js +71 -60
  88. package/lib/Highlight.cjs +1 -1
  89. package/lib/Highlight.d.cts +25 -29
  90. package/lib/Highlight.d.ts +25 -29
  91. package/lib/Highlight.js +5 -4
  92. package/lib/History.cjs +1 -1
  93. package/lib/History.d.cts +27 -31
  94. package/lib/History.d.ts +27 -31
  95. package/lib/History.js +39 -403
  96. package/lib/HorizontalRule.cjs +1 -1
  97. package/lib/HorizontalRule.d.cts +25 -29
  98. package/lib/HorizontalRule.d.ts +25 -29
  99. package/lib/HorizontalRule.js +16 -65
  100. package/lib/Iframe.cjs +1 -1
  101. package/lib/Iframe.d.cts +25 -29
  102. package/lib/Iframe.d.ts +25 -29
  103. package/lib/Iframe.js +4 -4
  104. package/lib/Image.cjs +1 -1
  105. package/lib/Image.d.cts +25 -29
  106. package/lib/Image.d.ts +25 -29
  107. package/lib/Image.js +3 -3
  108. package/lib/ImageGif.cjs +1 -1
  109. package/lib/ImageGif.d.cts +25 -29
  110. package/lib/ImageGif.d.ts +25 -29
  111. package/lib/ImageGif.js +5 -5
  112. package/lib/ImportWord.cjs +72 -72
  113. package/lib/ImportWord.d.cts +25 -29
  114. package/lib/ImportWord.d.ts +25 -29
  115. package/lib/ImportWord.js +5652 -5615
  116. package/lib/Indent.cjs +1 -1
  117. package/lib/Indent.d.cts +25 -29
  118. package/lib/Indent.d.ts +25 -29
  119. package/lib/Indent.js +4 -2
  120. package/lib/Italic.cjs +1 -1
  121. package/lib/Italic.d.cts +25 -29
  122. package/lib/Italic.d.ts +25 -29
  123. package/lib/Italic.js +20 -14
  124. package/lib/Katex.cjs +1 -1
  125. package/lib/Katex.d.cts +25 -29
  126. package/lib/Katex.d.ts +25 -29
  127. package/lib/Katex.js +12 -12
  128. package/lib/LineHeight.cjs +1 -1
  129. package/lib/LineHeight.d.cts +25 -29
  130. package/lib/LineHeight.d.ts +25 -29
  131. package/lib/LineHeight.js +5 -3
  132. package/lib/Link.cjs +1 -1
  133. package/lib/Link.d.cts +25 -29
  134. package/lib/Link.d.ts +25 -29
  135. package/lib/Link.js +4 -4
  136. package/lib/ListItem.cjs +1 -1
  137. package/lib/ListItem.d.cts +30 -30
  138. package/lib/ListItem.d.ts +30 -30
  139. package/lib/ListItem.js +4 -30
  140. package/lib/Mention.cjs +1 -1
  141. package/lib/Mention.d.cts +25 -29
  142. package/lib/Mention.d.ts +25 -29
  143. package/lib/Mention.js +161 -132
  144. package/lib/Mermaid.cjs +2 -2
  145. package/lib/Mermaid.d.cts +25 -29
  146. package/lib/Mermaid.d.ts +25 -29
  147. package/lib/Mermaid.js +50 -48
  148. package/lib/MoreMark.cjs +1 -1
  149. package/lib/MoreMark.d.cts +25 -29
  150. package/lib/MoreMark.d.ts +25 -29
  151. package/lib/MoreMark.js +5 -3
  152. package/lib/MultiColumn.cjs +1 -1
  153. package/lib/MultiColumn.d.cts +25 -29
  154. package/lib/MultiColumn.d.ts +25 -29
  155. package/lib/MultiColumn.js +2 -2
  156. package/lib/OrderedList.cjs +1 -1
  157. package/lib/OrderedList.d.cts +26 -30
  158. package/lib/OrderedList.d.ts +26 -30
  159. package/lib/OrderedList.js +11 -75
  160. package/lib/RichTextEditor-CxvwGvQG.cjs +142 -0
  161. package/lib/RichTextEditor-DGcKEUGr.js +22166 -0
  162. package/lib/SearchAndReplace.cjs +1 -1
  163. package/lib/SearchAndReplace.d.cts +38 -112
  164. package/lib/SearchAndReplace.d.ts +38 -112
  165. package/lib/SearchAndReplace.js +204 -192
  166. package/lib/Selection.cjs +1 -1
  167. package/lib/Selection.d.cts +25 -29
  168. package/lib/Selection.d.ts +25 -29
  169. package/lib/Selection.js +1 -1
  170. package/lib/SlashCommand.cjs +1 -1
  171. package/lib/SlashCommand.d.cts +25 -29
  172. package/lib/SlashCommand.d.ts +25 -29
  173. package/lib/SlashCommand.js +178 -223
  174. package/lib/Strike.cjs +1 -1
  175. package/lib/Strike.d.cts +25 -29
  176. package/lib/Strike.d.ts +25 -29
  177. package/lib/Strike.js +20 -14
  178. package/lib/SubAndSuperScript.cjs +1 -1
  179. package/lib/SubAndSuperScript.d.cts +25 -29
  180. package/lib/SubAndSuperScript.d.ts +25 -29
  181. package/lib/SubAndSuperScript.js +5 -3
  182. package/lib/Table.cjs +8 -10
  183. package/lib/Table.d.cts +28 -32
  184. package/lib/Table.d.ts +28 -32
  185. package/lib/Table.js +382 -2022
  186. package/lib/TableOfContent.cjs +1 -1
  187. package/lib/TableOfContent.d.cts +25 -29
  188. package/lib/TableOfContent.d.ts +25 -29
  189. package/lib/TableOfContent.js +5 -5
  190. package/lib/TaskList.cjs +1 -1
  191. package/lib/TaskList.d.cts +27 -31
  192. package/lib/TaskList.d.ts +27 -31
  193. package/lib/TaskList.js +12 -154
  194. package/lib/TextAlign.cjs +1 -1
  195. package/lib/TextAlign.d.cts +25 -29
  196. package/lib/TextAlign.d.ts +25 -29
  197. package/lib/TextAlign.js +11 -9
  198. package/lib/TextBubble.cjs +1 -1
  199. package/lib/TextBubble.d.cts +25 -29
  200. package/lib/TextBubble.d.ts +25 -29
  201. package/lib/TextBubble.js +5 -3
  202. package/lib/TextDirection.cjs +1 -1
  203. package/lib/TextDirection.d.cts +25 -29
  204. package/lib/TextDirection.d.ts +25 -29
  205. package/lib/TextDirection.js +2 -3
  206. package/lib/TextUnderline.cjs +1 -1
  207. package/lib/TextUnderline.d.cts +25 -29
  208. package/lib/TextUnderline.d.ts +25 -29
  209. package/lib/TextUnderline.js +40 -12
  210. package/lib/TrailingNode.cjs +1 -1
  211. package/lib/TrailingNode.d.cts +25 -29
  212. package/lib/TrailingNode.d.ts +25 -29
  213. package/lib/TrailingNode.js +1 -1
  214. package/lib/Twitter-BFULyqdR.js +1628 -0
  215. package/lib/Twitter-Cutpkh3h.cjs +1 -0
  216. package/lib/Twitter.cjs +1 -1
  217. package/lib/Twitter.d.cts +25 -29
  218. package/lib/Twitter.d.ts +25 -29
  219. package/lib/Twitter.js +3 -3
  220. package/lib/Video.cjs +1 -1
  221. package/lib/Video.d.cts +25 -29
  222. package/lib/Video.d.ts +25 -29
  223. package/lib/Video.js +3 -3
  224. package/lib/bubble-extra.cjs +2 -2
  225. package/lib/bubble-extra.d.cts +25 -29
  226. package/lib/bubble-extra.d.ts +25 -29
  227. package/lib/bubble-extra.js +200 -192
  228. package/lib/dom-dataset-_6-diIRQ.cjs +33 -0
  229. package/lib/dom-dataset-lYeH6gfI.js +2361 -0
  230. package/lib/index-5iBZLua9.cjs +12 -0
  231. package/lib/index-6D1J-A-o.cjs +1 -0
  232. package/lib/index-B96Cclrj.cjs +3 -0
  233. package/lib/index-BBz7Nmv9.js +55 -0
  234. package/lib/index-BeCTd5v2.cjs +1 -0
  235. package/lib/index-ByurDDMv.js +237 -0
  236. package/lib/index-CUogRI7j.cjs +1 -0
  237. package/lib/index-Ch6dBBad.js +709 -0
  238. package/lib/index-DF2Lp4HZ.cjs +100 -0
  239. package/lib/{index-LUL9mqY4.js → index-D_L6n8O8.js} +4 -4
  240. package/lib/index-Dbvi-Bvh.cjs +1 -0
  241. package/lib/index-DpCrt7xs.cjs +1 -0
  242. package/lib/index-DsAX1Vq8.cjs +1 -0
  243. package/lib/index-Dy4DlW9o.js +12 -0
  244. package/lib/index-J3jHHZ4d.js +200 -0
  245. package/lib/{index-CsK90iVd.js → index-LmrOdnen.js} +302 -389
  246. package/lib/index-VvXaaKe3.js +898 -0
  247. package/lib/index-kbO3iWqL.js +13432 -0
  248. package/lib/index.cjs +1 -2
  249. package/lib/index.d.cts +26 -229
  250. package/lib/index.d.ts +26 -229
  251. package/lib/index.js +2 -588
  252. package/lib/jsx-runtime-CT7Pcg-t.js +13 -0
  253. package/lib/jsx-runtime-C_NLcKys.cjs +1 -0
  254. package/lib/locale-bundle.cjs +1 -1
  255. package/lib/locale-bundle.d.cts +25 -29
  256. package/lib/locale-bundle.d.ts +25 -29
  257. package/lib/locale-bundle.js +1 -1
  258. package/lib/style.css +1 -1
  259. package/lib/{textarea-DdH64g04.cjs → textarea-DFo_aXnj.cjs} +1 -1
  260. package/lib/{textarea-CktfkXNe.js → textarea-aPtytkDx.js} +1 -1
  261. package/package.json +76 -70
  262. package/lib/RichTextEditor-DWlLqTl9.cjs +0 -140
  263. package/lib/RichTextEditor-KP2Rgcqe.js +0 -12751
  264. package/lib/Twitter-99ivY5qv.js +0 -1744
  265. package/lib/Twitter-BvfvUtNT.cjs +0 -17
  266. package/lib/dom-dataset-Byuf1YmW.cjs +0 -33
  267. package/lib/dom-dataset-Di3tIRrR.js +0 -1031
  268. package/lib/index-BI-IcZcN.cjs +0 -1
  269. package/lib/index-ByRfqzMr.cjs +0 -89
  270. package/lib/index-C1fzuXpN.js +0 -46
  271. package/lib/index-CbQQFj2T.js +0 -133
  272. package/lib/index-DI9T3iLd.js +0 -12354
  273. package/lib/index-D_A0TBRA.cjs +0 -1
  274. package/lib/index-DclQSrIx.cjs +0 -1
  275. package/lib/index-Z4b9rzn-.cjs +0 -1
package/lib/Code.d.ts CHANGED
@@ -120,18 +120,6 @@ declare module '@tiptap/core' {
120
120
  }
121
121
 
122
122
 
123
- declare module '@tiptap/core' {
124
- interface Commands<ReturnType> {
125
- emoji: {
126
- setEmoji: (emoji: {
127
- name: string;
128
- emoji: string;
129
- }) => ReturnType;
130
- };
131
- }
132
- }
133
-
134
-
135
123
  declare module '@tiptap/core' {
136
124
  interface Commands<ReturnType> {
137
125
  excalidraw: {
@@ -223,19 +211,15 @@ declare module '@tiptap/core' {
223
211
 
224
212
  declare module '@tiptap/core' {
225
213
  interface Commands<ReturnType> {
226
- imageGifUpload: {
227
- /**
228
- * Add an image gif
229
- */
230
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
214
+ indent: {
231
215
  /**
232
- * Update an image gif
216
+ * Set the indent attribute
233
217
  */
234
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
218
+ indent: () => ReturnType;
235
219
  /**
236
- * Set image alignment
220
+ * Set the outdent attribute
237
221
  */
238
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
222
+ outdent: () => ReturnType;
239
223
  };
240
224
  }
241
225
  }
@@ -243,15 +227,19 @@ declare module '@tiptap/core' {
243
227
 
244
228
  declare module '@tiptap/core' {
245
229
  interface Commands<ReturnType> {
246
- indent: {
230
+ imageGifUpload: {
247
231
  /**
248
- * Set the indent attribute
232
+ * Add an image gif
249
233
  */
250
- indent: () => ReturnType;
234
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
251
235
  /**
252
- * Set the outdent attribute
236
+ * Update an image gif
253
237
  */
254
- outdent: () => ReturnType;
238
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
239
+ /**
240
+ * Set image alignment
241
+ */
242
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
255
243
  };
256
244
  }
257
245
  }
@@ -305,16 +293,24 @@ declare module '@tiptap/core' {
305
293
  search: {
306
294
  setSearchTerm: (searchTerm: string) => ReturnType;
307
295
  setReplaceTerm: (replaceTerm: string) => ReturnType;
296
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
297
+ resetIndex: () => ReturnType;
298
+ nextSearchResult: () => ReturnType;
299
+ previousSearchResult: () => ReturnType;
308
300
  replace: () => ReturnType;
309
301
  replaceAll: () => ReturnType;
310
- goToPrevSearchResult: () => void;
311
- goToNextSearchResult: () => void;
312
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
313
302
  };
314
303
  }
315
304
  }
316
305
 
317
306
 
307
+ declare module '@tiptap/core' {
308
+ interface Storage {
309
+ searchAndReplace: SearchAndReplaceStorage;
310
+ }
311
+ }
312
+
313
+
318
314
  declare module '@tiptap/core' {
319
315
  interface Commands<ReturnType> {
320
316
  tableOfContents: {
package/lib/Code.js CHANGED
@@ -1,6 +1,6 @@
1
- import { M as s, c as n, d, m as a } from "./index-DI9T3iLd.js";
2
- import { A as i } from "./RichTextEditor-KP2Rgcqe.js";
3
- const u = /(^|[^`])`([^`]+)`(?!`)/, c = /(^|[^`])`([^`]+)`(?!`)/g, p = s.create({
1
+ import { M as n, l as a, o as d, m as s } from "./index-kbO3iWqL.js";
2
+ import { A as u } from "./RichTextEditor-DGcKEUGr.js";
3
+ var i = /(^|[^`])`([^`]+)`(?!`)$/, p = /(^|[^`])`([^`]+)`(?!`)/g, c = n.create({
4
4
  name: "code",
5
5
  addOptions() {
6
6
  return {
@@ -11,18 +11,19 @@ const u = /(^|[^`])`([^`]+)`(?!`)/, c = /(^|[^`])`([^`]+)`(?!`)/g, p = s.create(
11
11
  code: !0,
12
12
  exitable: !0,
13
13
  parseHTML() {
14
- return [
15
- { tag: "code" }
16
- ];
14
+ return [{ tag: "code" }];
17
15
  },
18
- renderHTML({ HTMLAttributes: t }) {
19
- return ["code", a(this.options.HTMLAttributes, t), 0];
16
+ renderHTML({ HTMLAttributes: e }) {
17
+ return ["code", s(this.options.HTMLAttributes, e), 0];
20
18
  },
19
+ markdownTokenName: "codespan",
20
+ parseMarkdown: (e, t) => t.applyMark("code", [{ type: "text", text: e.text || "" }]),
21
+ renderMarkdown: (e, t) => e.content ? `\`${t.renderChildren(e.content)}\`` : "",
21
22
  addCommands() {
22
23
  return {
23
- setCode: () => ({ commands: t }) => t.setMark(this.name),
24
- toggleCode: () => ({ commands: t }) => t.toggleMark(this.name),
25
- unsetCode: () => ({ commands: t }) => t.unsetMark(this.name)
24
+ setCode: () => ({ commands: e }) => e.setMark(this.name),
25
+ toggleCode: () => ({ commands: e }) => e.toggleMark(this.name),
26
+ unsetCode: () => ({ commands: e }) => e.unsetMark(this.name)
26
27
  };
27
28
  },
28
29
  addKeyboardShortcuts() {
@@ -33,38 +34,41 @@ const u = /(^|[^`])`([^`]+)`(?!`)/, c = /(^|[^`])`([^`]+)`(?!`)/g, p = s.create(
33
34
  addInputRules() {
34
35
  return [
35
36
  d({
36
- find: u,
37
+ find: i,
37
38
  type: this.type
38
39
  })
39
40
  ];
40
41
  },
41
42
  addPasteRules() {
42
43
  return [
43
- n({
44
- find: c,
44
+ a({
45
+ find: p,
45
46
  type: this.type
46
47
  })
47
48
  ];
48
49
  }
49
- }), l = /* @__PURE__ */ p.extend({
50
+ });
51
+ const g = /* @__PURE__ */ c.extend({
52
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
53
+ //@ts-expect-error
50
54
  addOptions() {
51
- var t;
55
+ var e;
52
56
  return {
53
- ...(t = this.parent) == null ? void 0 : t.call(this),
54
- button: ({ editor: e, t: o, extension: r }) => ({
55
- component: i,
57
+ ...(e = this.parent) == null ? void 0 : e.call(this),
58
+ button: ({ editor: t, t: r, extension: o }) => ({
59
+ component: u,
56
60
  componentProps: {
57
- action: () => e.commands.toggleCode(),
58
- isActive: () => e.isActive("code") || !1,
59
- disabled: !e.can().toggleCode(),
61
+ action: () => t.commands.toggleCode(),
62
+ isActive: () => t.isActive("code") || !1,
63
+ disabled: !t.can().toggleCode(),
60
64
  icon: "Code",
61
- shortcutKeys: r.options.shortcutKeys ?? ["mod", "E"],
62
- tooltip: o("editor.code.tooltip")
65
+ shortcutKeys: o.options.shortcutKeys ?? ["mod", "E"],
66
+ tooltip: r("editor.code.tooltip")
63
67
  }
64
68
  })
65
69
  };
66
70
  }
67
71
  });
68
72
  export {
69
- l as Code
73
+ g as Code
70
74
  };
package/lib/CodeBlock.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Le=require("./index-ByRfqzMr.cjs"),ge=require("./dom-dataset-Byuf1YmW.cjs"),S=require("react/jsx-runtime"),G=require("./RichTextEditor-DWlLqTl9.cjs"),ae=require("react"),sa=require("@radix-ui/react-select"),et=require("lucide-react");function Sn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const pe=Sn(ae),F=Sn(sa),Gt=F.Root,oa=F.Value,gt=pe.forwardRef(({className:e,children:t,...n},i)=>S.jsxs(F.Trigger,{ref:i,className:G.cn("richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1",e),...n,children:[t,S.jsx(F.Icon,{asChild:!0,children:S.jsx(et.ChevronDown,{className:"richtext-h-4 richtext-w-4 richtext-opacity-50"})})]}));gt.displayName=F.Trigger.displayName;const kn=pe.forwardRef(({className:e,...t},n)=>S.jsx(F.ScrollUpButton,{ref:n,className:G.cn("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",e),...t,children:S.jsx(et.ChevronUp,{className:"richtext-h-4 richtext-w-4"})}));kn.displayName=F.ScrollUpButton.displayName;const Tn=pe.forwardRef(({className:e,...t},n)=>S.jsx(F.ScrollDownButton,{ref:n,className:G.cn("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",e),...t,children:S.jsx(et.ChevronDown,{className:"richtext-h-4 richtext-w-4"})}));Tn.displayName=F.ScrollDownButton.displayName;const mt=pe.forwardRef(({className:e,children:t,position:n="popper",...i},l)=>S.jsx(F.Portal,{children:S.jsxs(F.Content,{ref:l,className:G.cn("richtext-relative richtext-z-50 richtext-max-h-60 richtext-overflow-y-auto richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md richtext-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",e),position:n,...i,children:[S.jsx(kn,{}),S.jsx(F.Viewport,{className:G.cn("richtext-p-1",n==="popper"&&"richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"),children:t}),S.jsx(Tn,{})]})}));mt.displayName=F.Content.displayName;const la=pe.forwardRef(({className:e,...t},n)=>S.jsx(F.Label,{ref:n,className:G.cn("richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold",e),...t}));la.displayName=F.Label.displayName;const ht=pe.forwardRef(({className:e,children:t,...n},i)=>S.jsxs(F.Item,{ref:i,className:G.cn("richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",e),...n,children:[S.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:S.jsx(F.ItemIndicator,{children:S.jsx(et.Check,{className:"richtext-h-4 richtext-w-4"})})}),S.jsx(F.ItemText,{children:t})]}));ht.displayName=F.Item.displayName;const ca=pe.forwardRef(({className:e,...t},n)=>S.jsx(F.Separator,{ref:n,className:G.cn("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",e),...t}));ca.displayName=F.Separator.displayName;function da({action:e,...t}){return S.jsx(G.ActionButton,{action:e,disabled:t==null?void 0:t.disabled,icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,tooltipOptions:t==null?void 0:t.tooltipOptions})}var Ce={},X=Symbol(),te=Symbol(),Ct=e=>typeof e=="string"?_[e]:e,_={plain:Ce,plaintext:Ce,text:Ce,txt:Ce},Ne=(e,t)=>(t[te]||Oe)(e,t),Oe=(e,t)=>{for(var n=[e],i,l=[],u=0;i=Ct(t[X]);)delete t[X],Object.assign(t,i);for(Ln(e,t,n,0);l[u++]=n[0],n=n[1];);return l},zt="</span>",Me="",Ae="",Nn=e=>{for(var t="",n=e.length,i=0;i<n;)t+=On(e[i++]);return t},On=e=>{if(e instanceof me){var{type:t,alias:n,content:i}=e,l=Me,u=Ae,f=`<span class="token ${t+(n?" "+n:"")+(t=="keyword"&&typeof i=="string"?" keyword-"+i:"")}">`;Ae+=zt,Me+=f;var E=On(i);return Me=l,Ae=u,f+E+zt}return typeof e!="string"?Nn(e):(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;"),Ae&&e.includes(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Le=require("./index-DF2Lp4HZ.cjs"),ge=require("./dom-dataset-_6-diIRQ.cjs"),S=require("react/jsx-runtime"),G=require("./RichTextEditor-CxvwGvQG.cjs"),ae=require("react"),sa=require("@radix-ui/react-select"),et=require("lucide-react");function Sn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const pe=Sn(ae),F=Sn(sa),Gt=F.Root,oa=F.Value,gt=pe.forwardRef(({className:e,children:t,...n},i)=>S.jsxs(F.Trigger,{ref:i,className:G.cn("richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1",e),...n,children:[t,S.jsx(F.Icon,{asChild:!0,children:S.jsx(et.ChevronDown,{className:"richtext-h-4 richtext-w-4 richtext-opacity-50"})})]}));gt.displayName=F.Trigger.displayName;const kn=pe.forwardRef(({className:e,...t},n)=>S.jsx(F.ScrollUpButton,{ref:n,className:G.cn("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",e),...t,children:S.jsx(et.ChevronUp,{className:"richtext-h-4 richtext-w-4"})}));kn.displayName=F.ScrollUpButton.displayName;const Tn=pe.forwardRef(({className:e,...t},n)=>S.jsx(F.ScrollDownButton,{ref:n,className:G.cn("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",e),...t,children:S.jsx(et.ChevronDown,{className:"richtext-h-4 richtext-w-4"})}));Tn.displayName=F.ScrollDownButton.displayName;const mt=pe.forwardRef(({className:e,children:t,position:n="popper",...i},l)=>S.jsx(F.Portal,{children:S.jsxs(F.Content,{ref:l,className:G.cn("richtext-relative richtext-z-50 richtext-max-h-60 richtext-overflow-y-auto richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md richtext-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",e),position:n,...i,children:[S.jsx(kn,{}),S.jsx(F.Viewport,{className:G.cn("richtext-p-1",n==="popper"&&"richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"),children:t}),S.jsx(Tn,{})]})}));mt.displayName=F.Content.displayName;const la=pe.forwardRef(({className:e,...t},n)=>S.jsx(F.Label,{ref:n,className:G.cn("richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold",e),...t}));la.displayName=F.Label.displayName;const ht=pe.forwardRef(({className:e,children:t,...n},i)=>S.jsxs(F.Item,{ref:i,className:G.cn("richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",e),...n,children:[S.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:S.jsx(F.ItemIndicator,{children:S.jsx(et.Check,{className:"richtext-h-4 richtext-w-4"})})}),S.jsx(F.ItemText,{children:t})]}));ht.displayName=F.Item.displayName;const ca=pe.forwardRef(({className:e,...t},n)=>S.jsx(F.Separator,{ref:n,className:G.cn("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",e),...t}));ca.displayName=F.Separator.displayName;function da({action:e,...t}){return S.jsx(G.ActionButton,{action:e,disabled:t==null?void 0:t.disabled,icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,tooltipOptions:t==null?void 0:t.tooltipOptions})}var Ce={},X=Symbol(),te=Symbol(),Ct=e=>typeof e=="string"?_[e]:e,_={plain:Ce,plaintext:Ce,text:Ce,txt:Ce},Ne=(e,t)=>(t[te]||Oe)(e,t),Oe=(e,t)=>{for(var n=[e],i,l=[],u=0;i=Ct(t[X]);)delete t[X],Object.assign(t,i);for(Ln(e,t,n,0);l[u++]=n[0],n=n[1];);return l},zt="</span>",Me="",Ae="",Nn=e=>{for(var t="",n=e.length,i=0;i<n;)t+=On(e[i++]);return t},On=e=>{if(e instanceof me){var{type:t,alias:n,content:i}=e,l=Me,u=Ae,f=`<span class="token ${t+(n?" "+n:"")+(t=="keyword"&&typeof i=="string"?" keyword-"+i:"")}">`;Ae+=zt,Me+=f;var E=On(i);return Me=l,Ae=u,f+E+zt}return typeof e!="string"?Nn(e):(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;"),Ae&&e.includes(`
2
2
  `)?e.replace(/\n/g,Ae+`
3
3
  `+Me):e)},Ln=(e,t,n,i,l)=>{for(var u in t)if(t[u])for(var f=0,E=t[u],y=Array.isArray(E)?E:[E];f<y.length;++f){if(l&&l[0]==u&&l[1]==f)return;for(var w=y[f],m=w.pattern||w,p=Ct(w.inside),c=w.lookbehind,b=w.greedy&&m.global,g=w.alias,a=n,r=i;a&&(!l||r<l[2]);r+=a[0].length,a=a[1]){var d=a[0],o=0,s,h;if(!(d instanceof me)){if(m.lastIndex=b?r:0,s=m.exec(b?e:d),s&&c&&s[1]&&(h=s[1].length,s.index+=h,s[0]=s[0].slice(h)),b){if(!s)break;if(s[0]){for(var k=s.index,R=k+s[0].length,A;k>=r+(A=a[0].length);a=a[1],r+=A);if(a[0]instanceof me)continue;for(var v=a,E=r;(E+=v[0].length)<R;v=v[1],o++);d=e.slice(r,E),s.index-=r}}if(s&&s[0]){for(var k=s.index,N=s[0],T=d.slice(k+N.length),L=r+d.length,P=new me(u,p?Ne(N,p):N,N,g),M=a,Z=0,H;M=M[1],Z++<o;);T&&(!M||M[0]instanceof me?M=[T,M]:M[0]=T+M[0]),r+=k,a[0]=k?d.slice(0,k):P,k?a=a[1]=[P,M]:a[1]=M,o&&(Ln(e,t,a,r,H=[u,f,L]),L=H[2]),l&&L>l[2]&&(l[2]=L)}}}}};function me(e,t,n,i){this.type=e,this.content=t,this.alias=i,this.length=n.length}var Ve="\\b(?:BASH(?:OPTS|_ALIASES|_ARG[CV]|_CMDS|_COMPLETION_COMPAT_DIR|_LINENO|_REMATCH|_SOURCE|_VERSINFO|_VERSION)?|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|E?UID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_(?:ADDRESS|ALL|IDENTIFICATION|MEASUREMENT|MONETARY|NAME|NUMERIC|PAPER|TELEPHONE|TIME)|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS[1-4]|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_(?:CONFIG_DIRS|CURRENT_DESKTOP|DATA_DIRS|GREETER_DATA_DIR|MENU_PREFIX|RUNTIME_DIR|SEAT|SEAT_PATH|SESSION_DESKTOP|SESSION_ID|SESSION_PATH|SESSION_TYPE|VTNR)|XMODIFIERS)\\b",_t={pattern:/(^(["']?)\w+\2)[ ]+\S.*/,lookbehind:!0,alias:"punctuation"},Cn={variable:/^\$\(|^`|\)$|`$/},Pe={bash:_t,environment:{pattern:RegExp("\\$"+Ve),alias:"constant"},variable:[{pattern:/\$?\(\([^]*?\)\)/g,greedy:!0,inside:{variable:[{pattern:/(^\$[^]+)../,lookbehind:!0},/^\$\(\(/],number:/\b0x[a-fA-F\d]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|&&|\|\||(?:\*\*|<<|>>|[%&|^!=<>/*+-])=?|[?:~]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:[^()]|\([^)]*\))*\)|`[^`]+`/g,greedy:!0,inside:Cn},{pattern:/\$\{[^}]*\}/g,greedy:!0,inside:{operator:/:[?=+-]?|[!/]|##?|%%?|\^\^?|,,?/,punctuation:/[[\]]/,environment:{pattern:RegExp("(\\{)"+Ve),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[a-fA-F\d]{8}|u[a-fA-F\d]{4}|x[a-fA-F\d]{1,2})/},ua=_t.inside=_.sh=_.shell=_.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,lookbehind:!0,alias:"variable"},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,lookbehind:!0,alias:"variable",inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+Ve),lookbehind:!0,alias:"constant"}}},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?![^\s=])/,lookbehind:!0,alias:"variable"},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[^]*?\n\2/g,lookbehind:!0,greedy:!0,inside:Pe},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[^]*?\n\3/g,lookbehind:!0,greedy:!0,inside:{bash:_t}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[^]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^\\"`$])*"/g,lookbehind:!0,greedy:!0,inside:Pe},{pattern:/(^|[^$\\])'[^']*'/g,lookbehind:!0,greedy:!0},{pattern:/\$'(?:\\[^]|[^\\'])*'/g,greedy:!0,inside:{entity:Pe.entity}}],environment:{pattern:RegExp("\\$?"+Ve),alias:"constant"},variable:Pe.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|c?fdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cron|crontab|c?split|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff3?|dig|dircolors|dirname|dirs?|dmesg|docker|docker-compose|du|[ef]?grep|eject|env|ethtool|expand|expect|expr|fdformat|fg|file|find|fmt|fold|format|free|fsck|fuser|g?awk|git|g?parted|groupadd|groupdel|groupmod|groups|grub-mkconfig|halt|head|hg|history|host|hostname|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|killall|less|link|ln|logname|logrotate|look|lpc|lprint[dq]?|lprm?|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mm?v|more|most|mtools|m?tr|mutt|nano|nc|netstat|nice|nl|node|nohup|notify-send|nslookup|op|open|passwd|paste|pathchk|ping|p?kill|p?npm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ra[mr]|reboot|remsync|rename|renice|rev|rmdir|rp?m|r?sync|[sr]?cp|screen|sdiff|se[dq]|sendmail|service|s?ftp|shellcheck|shuf|shutdown|sleep|s?locate|[sz]?sh|stat|strace|sudo|sum?|suspend|swapon|sysctl|tac|tail|tar|tee|time|timeout|h?top|touch|traceroute|t?sort|tty|u?mount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vim?|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|g?zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|[ls]et|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[[\]{};\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"].forEach(e=>Cn[e]=ua[e]);var Mn=/(?:"(?:\\[^]|[^\\\n"])*"|'(?:\\[^]|[^\\\n'])*')/g,$e=Mn.source,jt={rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^)]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}};jt[X]=_.css={comment:/\/\*[^]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|${$e})*?(?:;|(?=\\s*\\{))`),inside:jt},url:{pattern:RegExp(`\\burl\\((?:${$e}|(?:[^\\\\
4
4
  "')=]|\\\\[^])*)\\)`,"gi"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+$e+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|${$e})*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:Mn,greedy:!0},property:{pattern:/(^|[^-\w\xa0-\uffff])(?!\d)(?:(?!\s)[-\w\xa0-\uffff])+(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z\d])[-a-z\d]+(?=\()/i,lookbehind:!0},punctuation:/[(){},:;]/};var Be=(e,t)=>{if(t.has(e))return t.get(e);var n=e,i=pa.call(e).slice(8,-1);if(i=="Object"){t.set(e,n={});for(var l in e)n[l]=Be(e[l],t);e[X]&&(n[X]=Be(e[X],t)),e[te]&&(n[te]=e[te])}else if(i=="Array"){t.set(e,n=[]);for(var u=0,f=e.length;u<f;u++)n[u]=Be(e[u],t)}return n},tt=e=>Be(e,new Map),se=(e,t)=>Object.assign(tt(_[e]),t),$=(e,t,n)=>{var i={};for(var l in e)i[l]=e[l],delete e[l];for(var l in i)l==t&&Object.assign(e,n),n.hasOwnProperty(l)||(e[l]=i[l])},pa={}.toString,Ze=_.css,Ht={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},Vt={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};Ze.selector.inside=Ze.atrule.inside["selector-function-argument"].inside={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:/\[(?:[^[\]"']|(["'])(?:\\[^]|(?!\1)[^\\\n])*\1)*\]/g,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xa0-\uffff])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xa0-\uffff])+/,lookbehind:!0},"attr-value":{pattern:/(=\s*)(?:(?!\s)[-\w\xa0-\uffff])+(?=\s*$)|(["'])(?:\\[^]|(?!\2)[^\\\n])*\2/,lookbehind:!0},operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/};$(Ze,"property",{variable:{pattern:/(^|[^-\w\xa0-\uffff])--(?!\d)(?:(?!\s)[-\w\xa0-\uffff])*/i,lookbehind:!0}});$(Ze,"function",{operator:{pattern:/(\s)[/*+-](?!\S)/,lookbehind:!0},hexcode:{pattern:/\B#[a-f\d]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:(?:alice|cadet|cornflower|deepsky|dodger|midnight|powder|royal|sky|steel)blue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blueviolet|brown|burlywood|chartreuse|chocolate|coral|cornsilk|crimson|(?:dark)?(?:blue|cyan|goldenrod|gr[ae]y|green|khaki|magenta|olivegreen|orange|orchid|red|salmon|seagreen|slateblue|slategr[ae]y|turquoise|violet)|deeppink|dimgr[ae]y|firebrick|floralwhite|(?:forest|lawn|lime|pale|spring)green|fuchsia|gainsboro|ghostwhite|gold|greenyellow|honeydew|hotpink|indianred|indigo|ivory|lavender|lavenderblush|lemonchiffon|light(?:blue|coral|cyan|goldenrodyellow|gr[ae]y|green|pink|salmon|seagreen|skyblue|slategr[ae]y|steelblue|yellow)|lime|linen|maroon|medium(?:aquamarine|blue|orchid|purple|seagreen|slateblue|springgreen|turquoise|violetred)|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orangered|palegoldenrod|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|purple|rebeccapurple|rosybrown|saddlebrown|sandybrown|seashell|sienna|silver|snow|tan|teal|thistle|tomato|transparent|wheat|white|whitesmoke|yellow|yellowgreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{function:/^[^(]+/,unit:Ht,number:Vt,punctuation:/[(),]/}}],entity:/\\[a-f\d]{1,8}/i,unit:Ht,number:Vt});_.ini={comment:{pattern:/(^[ \f \v]*)[#;].*/m,lookbehind:!0},section:{pattern:/(^[ \f \v]*)\[[^\n\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f \v]*)[^ \f \v\]]+(?:[ \f \v]+[^ \f \v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/[[\]]/}},key:{pattern:/(^[ \f \v]*)[^ \f\n \v=]+(?:[ \f \v]+[^ \f\n \v=]+)*(?=[ \f \v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f \v]*)[^ \f\n \v]+(?:[ \f \v]+[^ \f\n \v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^(["']).+(?=\1$)/,lookbehind:!0}}},punctuation:/=/};var oe=()=>({pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0}),Mt=()=>({pattern:/(["'])(?:\\[^]|(?!\1)[^\\\n])*\1/g,greedy:!0}),Pn=/\b0x[a-f\d]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,re=/[()[\]{}.,:;]/,K=/\b(?:false|true)\b/,st={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[^]+/}};st.expression.inside=_.kts=_.kt=_.kotlin={"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:st},string:/[^]+/}},{pattern:/"(?:\\.|[^\\\n"$]|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\\\)*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:st},string:/[^]+/}}],char:{pattern:/'(?:[^\\\n']|\\(?:.|u[a-fA-F\d]{0,4}))'/g,greedy:!0},comment:oe(),annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"},keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},boolean:K,label:{pattern:/\b\w+@|@\w+/,alias:"symbol"},function:{pattern:/(?:`[^\n`]+`|\b\w+)(?=\s*\()|(\.)(?:`[^\n`]+`|\w+)(?=\s*\{)/g,lookbehind:!0,greedy:!0},number:/\b(?:0[xX][a-fA-F\d]+(?:_[a-fA-F\d]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/--|\+\+|&&|\|\||->|[!=]==|!!|[%!=<>/*+-]=?|[?:]:?|\.\.|\b(?:and|inv|shl|u?shr|x?or)\b/,punctuation:re};var $n=[{pattern:/&[a-z\d]{1,8};/i,alias:"named-entity"},/&#x?[a-f\d]{1,8};/i],ba={pattern:/<\/?(?!\d)[^\s/=>$<%]+(?:\s(?:\s*[^\s/=>]+(?:\s*=\s*(?!\s)(?:"[^"]*"|'[^']*'|[^\s"'=>]+(?=[\s>]))?|(?=[\s/>])))+)?\s*\/?>/g,greedy:!0,inside:{punctuation:/^<\/?|\/?>$/,tag:{pattern:/^\S+/,inside:{namespace:/^[^:]+:/}},"attr-value":[{pattern:/(=\s*)(?:"[^"]*"|'[^']*'|[^\s"'=>]+)/g,lookbehind:!0,greedy:!0,inside:{punctuation:/^["']|["']$/,entity:$n}}],"attr-equals":/=/,"attr-name":{pattern:/\S+/,inside:{namespace:/^[^:]+:/}}}};_.rss=_.atom=_.ssml=_.xml={comment:{pattern:/<!--(?:(?!<!--)[^])*?-->/g,greedy:!0},prolog:{pattern:/<\?[^]+?\?>/g,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/gi,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[^]+(?=\]\s*>$)/,lookbehind:!0,inside:"xml"},string:/"[^"]*"|'[^']*'/,punctuation:/^<!|[>[\]]/,"doctype-tag":/^DOCTYPE/i,name:/\S+/}},cdata:{pattern:/<!\[CDATA\[[^]*?\]\]>/gi,greedy:!0},tag:ba,entity:$n,"markup-bracket":{pattern:/[()[\]{}]/,alias:"punctuation"}};var Et=(e,t)=>(e["language-"+t]={pattern:/[^]+/,inside:t},e),Zt=(e,t)=>({pattern:RegExp(`(<${e}[^>]*>)(?!</${e}>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])+?(?=</${e}>)`,"gi"),lookbehind:!0,greedy:!0,inside:Et({"included-cdata":{pattern:/<!\[CDATA\[[^]*?\]\]>/i,inside:Et({cdata:/^<!\[CDATA\[|\]\]>$/i},t)}},t)}),qt=(e,t)=>({pattern:RegExp(`((?:^|["'\\s])(?:${e})\\s*=\\s*)(?:"[^"]*"|'[^']*'|[^\\s"'=>]+)`,"gi"),lookbehind:!0,greedy:!0,inside:Et({punctuation:/^["']|["']$/},t)}),Dn=_.svg=_.mathml=_.html=_.markup=tt(_.xml);Dn.tag.inside["attr-value"].unshift(qt("style","css"),qt("on[a-z]+","javascript"));$(Dn,"cdata",{style:Zt("style","css"),script:Zt("script","javascript")});_.r={comment:/#.*/,string:{pattern:/(["'])(?:\\.|(?!\1)[^\\\n])*\1/g,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[a-fA-F\d]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->>?|<=|<<?-|[!=<>]=?|::?|&&?|\|\|?|[~^$@/*+-]/,punctuation:/[()[\]{},;]/};_.basic={comment:{pattern:/(?:!|rem\b).+/i,inside:{keyword:/^rem/i}},string:{pattern:/"(?:""|[#$%&'().,:;\w ?^!=<>/*+-])*"/g,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,keyword:/\b(?:as|beep|bload|bsave|call absolute|call|case|chain|chdir|clear|close|cls|com|common|const|data|declare|def(?: fn| seg|dbl|int|[ls]ng|str)|dim|do|double|else|elseif|environ|erase|error|exit|field|files|for|function|get|gosub|goto|if|input|integer|ioctl|key|kill|line input|locate|lock|long|loop|[lr]set|mkdir|name|next|off|on(?: com| error| key| timer)?|open|option base|[op]ut|poke|read|redim|rem|restore|resume|return|rmdir|run|select case|shared|shell|single|sleep|static|step|stop|string|sub|swap|system|then|timer|to|troff|tron|type|unlock|until|using|view print|wait|w?end|while|write)(?:\$|\b)/i,function:/\b(?:abs|access|a?cos|angle|area|arithmetic|array|a?sin|ask|atn?|base|begin|break|cause|ceil|chr|clip|collate|color|co[nst]|cosh|csc|date|datum|debug|decimal|de[fgt]|degrees|delete|device|display|dot|elapsed|eps|erasable|exline|exp|external|extype|filetype|fixed|fp|go|graph|handler|idn|image|int?|internal|ip|is|keyed|[lu]bound|[lu]case|left|le[nt]|length|lines?|log2?|log10|[lr]trim|margin|ma[tx]|maxnum|mi[dn]|missing|mod|native|nul|numeric|of|option|ord|organization|outin|output|pi|pointer|points?|pos|print|program|prompt|rad|radians|randomize|record|recsize|rectype|relative|remainder|repeat|rest|retry|rewrite|right|rnd|round|same|se[ct]|select|sequential|setter|sgn|sinh|size|skip|s[qt]r|standard|status|stream|style|tab|tanh?|template|text|there|time|timeout|trace|transform|truncate|use|val|variable|viewport|when|window|with|zer|zonewidth)(?:\$|\b)/i,operator:/<=|<>|>=|[&^=<>/*+-]|\b(?:and|eqv|imp|not|x?or)\b/i,punctuation:/[(),:;]/};_.vbnet=se("basic",{comment:{pattern:/(?:!|'|rem\b).*/i,inside:{keyword:/^rem/i}},string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/g,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:addhandler|addressof|alias|and|andalso|as|beep|bload|boolean|bsave|byref|byval|call absolute|call|case|catch|cbool|c?byte|cc?har|c?date|cdbl|cdec|chain|chdir|cu?int|class|clear|close|cls|cobj|com|common|const|continue|c?sbyte|c?u?short|c?sng|cstr|c?type|cu?lng|data|decimal|declare|def(?: fn| seg|dbl|int|lng|sng|str)|default|delegate|dim|directcast|do|double|else|elseif|enum|environ|erase|error|event|exit|false|true|field|files|finally|for each|for|friend|function|[gls]et|gettype|getxmlnamespace|global|gosub|goto|handles|i[fns]|implements|imports|inherits|input|interface|ioctl|isnot|key|kill|lib|like|line input|locate|lock|loop|[lr]set|me|mkdir|mod|module|mustinherit|mustoverride|mybase|myclass|name|namespace|narrowing|new|next|not|nothing|notinheritable|notoverridable|object|off?|on (?:com|error|key|timer)|on|open|operator|option base|option|optional|orelse|out|overloads|overridable|overrides|paramarray|partial|poke|private|property|protected|public|put|raiseevent|read|readonly|redim|removehandler|restore|resume|return|rmdir|run|select case|select|shadows|shared|shell|single|sleep|static|step|stop|string|structure|sub|swap|synclock|system|[tw]hen|throw|timer|to|troff|tron|try|trycast|typeof|u?integer|u?long|unlock|until|using|view print|wait|w?end|while|widening|with|withevents|write|writeonly|x?or)|\B#(?:const|else|elseif|end|if))(?:\$|\b)/i,punctuation:/[(){},:;]/});var Kt={pattern:/'(?:\\[^]|[^\\\n']){0,32}'/g,greedy:!0},Wt={pattern:/\/\/(?:[^\\\n]|\\\n?)*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},Yt={pattern:/"(?:\\[^]|[^\\\n"])*"/g,greedy:!0},Xt={pattern:/\S[^]*/};Xt.inside=_.c={comment:Wt,char:Kt,macro:{pattern:/(^[ ]*)#\s*[a-z](?:[^\\\n/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\[^])*/img,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Yt],char:Kt,comment:Wt,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=\n)/,expression:Xt}},string:Yt,"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([^]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[a-f\d]+(?:\.[a-f\d]*)?|\.[a-f\d]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/->|([&|:+-])\1|[?:~]|>>=?|<<=?|[%&|^!=<>/*+-]=?/,punctuation:re};$(_.opencl=se("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[a-f\d]+(?:\.[a-f\d]*)?|\.[a-f\d]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:K,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN2|LN10|LOG2E?|LOG10E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),"class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|u?intptr_t)\b/,alias:"keyword"}});var yt={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:[2348]|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|RA?|READ_(?:ONLY|WRITE)_CACHE|RG|RGB[Ax]?|RG?x|RUNNING|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_5[56]5|VERSION_(?:1_[012]|2_[01])|s?BGRA|sRGB[Ax]?)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image[23]D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};$(_.c,"keyword",yt);_.cpp&&(yt["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image(?:[123]D|[12]DArray|1DBuffer|[23]DGL|Format|GL)?|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTrait(?:Atomic|Coarse|Fine|ReadOnly|ReadWrite|WriteOnly)|Sampler|UserEvent)\b/,alias:"keyword"},$(_.cpp,"keyword",yt));var fa=_.diff={coord:/^(?:\*{3}|-{3}|\+{3}|\d).*$|^@@.*@@$/m},ot={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};for(var be in ot){var lt=be.split("-")[0];fa[be]={pattern:RegExp("^(?:["+ot[be]+`].*$
@@ -41,4 +41,4 @@
41
41
  `+k,A,v,d+N,o+N),m()}else if(h==2&&!Ye)return y.scrollBy(0,Fa(y,"lineHeight")*(a?1:-1)),!0};j(n,"keydown",a=>{var R;const r=ke(a),d=a.keyCode,[o,s,h]=E();if(r==de&&(d==221||d==219))g(d==219,...ne(n.value,o,s),o,s,...w()),m(),z(a);else if(r==(Ye?10:2)&&d==77)Ua(!Lt),z(a);else if(d==191&&r==de||d==65&&r==9){const A=n.value,v=r==9,k=v?o:Qe(A,o),N=pt[bt(n,k)]||{},{line:T,block:L}=((R=N.getComments)==null?void 0:R.call(N,n,k,A))||N.comments||{},[P,M,Z]=ne(A,o,s),H=P.length-1;if(v){if(L){const[B,D]=L,Q=A.slice(o,s),x=A.slice(0,o).search(Re(B)+" ?$"),I=RegExp("^ ?"+Re(D)).test(A.slice(s));x+1&&I?V(n,Q,x,s+ +(A[s]==" ")+D.length,x,x+s-o):V(n,`${B} ${Q} ${D}`,o,s,o+B.length+1,s+B.length+1),m(),z(a)}}else if(T){const B=Re(T),D=RegExp(`^\\s*(${B} ?|$)`),Q=RegExp(B+" ?"),x=!/\S/.test(A.slice(M,Z)),I=P.map(P.every(C=>D.test(C))&&!x?C=>C.replace(Q,""):C=>x||/\S/.test(C)?C.replace(/^\s*/,`$&${T} `):C);b(P,I,M,Z,o,s),m(),z(a)}else if(L){const[B,D]=L,Q=ce(P[0]),x=P[0].startsWith(B,Q)&&P[H].endsWith(D),I=P.slice();I[0]=P[0].replace(x?RegExp(Re(B)+" ?"):/(?=\S)|$/,x?"":B+" ");let C=I[0].length-P[0].length;I[H]=x?I[H].replace(RegExp(`( ?${Re(D)})?$`),""):I[H]+" "+D;let q=I.join(`
42
42
  `),J=Q+M,W=J>o?o:Math.max(o+C,J),xe=J>s-(o!=s)?s:Math.min(Math.max(J,s+C),M+q.length);V(n,q,M,Z,W,Math.max(W,xe)),m(),z(a)}}else if(r==8+de&&d==75){const A=n.value,[v,k,N]=ne(A,o,s),T=h>"f"?s-N+v.pop().length:o-k,L=it(A,N+1)-N-1;V(n,"",k-!!k,N+!k,k+Math.min(T,L)),m(),z(a)}}),["copy","cut","paste"].forEach(a=>j(n,a,r=>{const[d,o]=E();if(d==o&&An){const[[s],h,R]=ne(n.value,d,o);a=="paste"?r.clipboardData.getData("text/plain")==l&&(V(n,l+`
43
43
  `,h,h,d+l.length+1),m(),z(r)):(An.writeText(l=s),a=="cut"&&(V(n,"",h,R+1),m()),z(r))}}))},Ga=(e=999)=>{let t=0,n,i,l=!1,u,f,E,y,w,m;const p=[],c=a=>{a>=e&&(a--,p.shift()),p.splice(t=a,e,[n.value,m(),m()])},b=a=>{var r;p[a]&&(w.value=p[a][0],w.setSelectionRange(...p[a][a<t?2:1]),n.update(),(r=n.extensions.cursor)==null||r.scrollIntoView(),t=a,i=!1)},g=(a,r)=>{a.extensions.history=g,n=a,m=a.getSelection,w||c(0),w=a.textarea,a.addListener("selectionChange",()=>{i=l,l=!1}),j(a,"beforeinput",d=>{let o=d.data,s=d.inputType,h=d.timeStamp;/history/.test(s)?(b(t+(s[7]=="U"?-1:1)),z(d)):(y=i&&(u==s||h-E<99&&s.slice(-4)=="Drop")&&!Ee&&(o!=" "||f==o))||(p[t][2]=Ee||m()),l=!0,f=o,E=h,u=s}),j(a,"input",()=>c(t+!y)),j(a,"keydown",d=>{if(!r.readOnly){const o=ke(d),s=d.keyCode,h=o==de&&s==90,R=o==de+8&&s==90||!Ye&&o==de&&s==89;h?(b(t-1),z(d)):R&&(b(t+1),z(d))}})};return g.clear=()=>{c(0),i=!1},g.has=a=>t+a in p,g.go=a=>b(t+a),g},za=rt("<div style=position:absolute;top:0;opacity:0;padding:inherit> <span><span></span> "),ja=()=>{let e,t=" ",n=" ";const i=za(),[l,u]=i.childNodes,[f,E]=u.childNodes,y=p=>{let{value:c,activeLine:b}=e,g=p[p[2]<"f"?0:1],a=Ot(c,g),r=c.slice(g,it(c,g));!a&&!r&&(r=" "),t!=a&&(l.data=t=a),n!=r&&(E.data=n=r),i.parentNode!=b&&b.prepend(i)},w=()=>$a(e,f),m=p=>{p.addListener("selectionChange",y),e=p,p.extensions.cursor=m,j(p,"input",c=>{/history/.test(c.inputType)&&w()}),p.activeLine&&y(p.getSelection())};return m.getPosition=()=>{const p=f.getBoundingClientRect(),c=e.overlays.getBoundingClientRect();return{top:p.y-c.y,bottom:c.bottom-p.bottom,left:p.x-c.x,right:c.right-p.x,height:p.height}},m.scrollIntoView=w,m.element=f,m},Ha=rt("<div class=guide-indents style=left:var(--padding-left);bottom:auto;right:auto> "),Va=rt("<div style=width:1px;position:absolute;background:var(--bg-guide-indent)>"),Za=()=>{let e,t=0,n,i=-1,l;const u=[],f=[],E=Ha(),y=[],w=b=>{n=[];const g=p(b.split(`
44
- `)),a=g.length;for(let r=0,d=[],o=g[0];o;r++){const s=(u[r]||(u[r]=Va())).style,[h,R,A]=o,v=f[r];o=g[r+1],h!=(v==null?void 0:v[0])&&(s.top=h+"00%"),R!=(v==null?void 0:v[1])&&(s.height=R+"00%"),A!=(v==null?void 0:v[2])&&(s.left=A*100+"%");const k=d[0]!=h&&(o==null?void 0:o[0])!=h,N=d[0]+d[1]!=h+R&&(o==null?void 0:o[0])+(o==null?void 0:o[1])!=h+R;for(let T=-k,L=R+N;T<L;T++)n[T+h]=r;d=f[r]=g[r]}for(let r=t;r>a;)u[--r].remove();E.append(...u.slice(t,t=a))},m=()=>{const b=n[l.activeLineNumber-1]??-1;b!=i&&(i>-1&&(u[i].className=""),b>-1&&(u[b].className="active")),i=b},p=b=>{const g=b.length,a=[],r=[];for(let d=0,o=-1,s=0,h=0;;s++){const R=s==g,A=R?0:y[s]=c(b[s]);if(A<0)o<0&&(o=s);else{for(let v=A;v<d;v++)a[v][1]=(o<0||v==A&&!R?s:o)-a[v][0];for(let v=d;v<A;)r[h++]=a[v]=[o<0||v>d?s:o,0,v++*e];o=-1,d=A}if(R)break}return y.length=g,r},c=b=>{let g=b.search(/\S/),a=0;if(g<0)return g;for(let r=0;r<g;)a+=b[r++]==" "?e-a%e:1;return Math.ceil(a/e)};return{lines:E.children,indentLevels:y,update(b,g){l||(l=b,b.extensions.indentGuides=this,b.overlays.append(E),b.addListener("update",w),b.addListener("selectionChange",m)),E.style.display=g.wordWrap?"none":"",e!=(e=g.tabSize||2)&&(w(b.value),m())}}},qa=()=>e=>{let t,n,i,l=-1,u=[],f=()=>{n||(n=e.extensions.matchBrackets);let[w,m]=e.getSelection(),p=w==m&&e.focused&&n&&E(m)||-1;if(p!=l){if(y(),p+1){let c=t[i[p]],b=t[p];u=[c,b].map(g=>Je(e,".punctuation",0,-1,g[1])),u[0]!=u[1]&&c[1]+c[3].length==b[1]&&(u[0].textContent+=u[1].textContent,u[1].textContent="",u[1]=u[0]),y(!0)}else u=[];l=p}},E=w=>{var m;({brackets:t,pairs:i}=n);for(let p=0,c;c=t[++p];)if(!c[4]&&c[5]>=w&&((m=t[i[p]])==null?void 0:m[1])<=w)return p},y=w=>u.forEach(m=>m.classList.toggle("active-bracket",!!w));j(e,"focus",f),j(e,"blur",f),e.addListener("selectionChange",f),e.addListener("update",()=>{y(),l=-1})},Ka=(e=!0,t="([{",n=")]}")=>{let i,l;const u=[],f=p=>{p.extensions.matchBrackets=f,p.addListener("tokenize",w),e&&p.tokens[0]?p.update():w(p.tokens)},E=f.brackets=[],y=f.pairs=[],w=p=>{if(y.length=E.length=l=i=0,m(p,0),e)for(let c=0,b;b=E[c];){let g=b[0].alias;b[0].alias=(g?g+" ":"")+`bracket-${c++in y?"level-"+b[2]%12:"error"}`}},m=(p,c)=>{let b,g=0;for(;b=p[g++];){let a=b.length;if(typeof b!="string"){let r=b.content;if(Array.isArray(r))m(r,c);else if((b.alias||b.type)=="punctuation"){let d=In(r,t,a-1),o=d||In(r,n,a-1);if(o){if(E[i]=[b,c,0,r,!!d,c+a],d)u[l++]=[i,d];else for(let s=l;s;){let[h,R]=u[--s];o==R&&(y[y[i]=h]=i,E[i][2]=E[h][2]=l=s,s=0)}i++}}}c+=a}};return f},In=(e,t,n)=>t.indexOf(e[0])+1||n&&t.indexOf(e[n])+1,Wa="xml,rss,atom,jsx,tsx,xquery,actionscript".split(","),Ya=/^(?:area|base|w?br|col|embed|hr|img|input|link|meta|source|track)$/i,Xa=e=>{let t=[],n,i=[],l,u,f=[],E=(w,m,p)=>{n=p,i.length=t.length=l=u=0,y(w,m,0)},y=(w,m,p)=>{let c=Wa.includes(m),b=0,g=w.length;for(;b<g;){const a=w[b++],r=a.content,d=a.length;if(Array.isArray(r))if(a.type=="tag"&&n[p]=="<"){const o=r[0].length,s=r[2]?n.substr(p+o,r[1].length):"",h=r[r.length-1].length<2&&(c||!Ya.test(s));if(r[2]&&c&&y(r,m,p),h)if(o>1)for(let R=u;R;)s==f[--R][1]&&(t[t[l]=f[u=R][0]]=l,R=0);else f[u++]=[l,s];i[l++]=[a,p,p+d,s,o>1,h]}else{let o=a.alias||a.type;y(r,o.slice(0,9)=="language-"?o.slice(9):m,p)}p+=d}};return e.addListener("tokenize",E),E(e.tokens,e.options.language,e.value),{tags:i,pairs:t}},Qa=(e,t)=>{for(let n=0,i=t.length;n<i;n++)if(t[n][1]<=e&&t[n][2]>=e)return n},Ja=()=>e=>{var t;let n,i;const{tags:l,pairs:u}=(t=e.extensions).matchTags||(t.matchTags=Xa(e)),f=E=>[n,i].forEach(y=>{y&&y.classList.toggle("active-tagname",!E)});e.addListener("selectionChange",([E,y])=>{let w,m,p;E==y&&e.focused&&(p=Qa(E,l),p+1&&(p=u[p],p+1&&(w=Je(e,".tag>.tag"))&&(m=Je(e,".tag>.tag",2,0,l[p][1])))),n!=w&&(f(!0),n=w,i=m,f())})},er="_wrap_1x3wi_1",tr="_blockInfoEditable_1x3wi_30",Rn={wrap:er,blockInfoEditable:tr},Ue=[{value:"plaintext",label:"plaintext"},{value:"javascript",label:"JavaScript"},{value:"typescript",label:"TypeScript"},{value:"html",label:"HTML"},{value:"css",label:"CSS"},{value:"python",label:"Python"},{value:"java",label:"Java"},{value:"cpp",label:"C++"},{value:"go",label:"Go"},{value:"rust",label:"Rust"},{value:"sql",label:"SQL"},{value:"json",label:"JSON"},{value:"yaml",label:"YAML"},{value:"markdown",label:"Markdown"},{value:"bash",label:"Bash"},{value:"php",label:"PHP"}],ft=[2,4,8];function nr(e){const t=G.useEditableEditor(),n=ae.useRef(null),i=ae.useCallback(()=>G.deleteNode(ia.name,e==null?void 0:e.editor),[e==null?void 0:e.editor]),l=ae.useRef(null),u=e.node.attrs.code||e.node.textContent||"",f=ae.useCallback(c=>{c==null||c.stopPropagation(),setTimeout(()=>{var b,g,a;(a=(g=(b=l.current)==null?void 0:b.textarea)==null?void 0:g.focus)==null||a.call(g)},0)},[]),E=async()=>{if(u)try{if(navigator.clipboard)await navigator.clipboard.writeText(u),console.log("Copy Success");else{const c=document.createElement("textarea");c.value=u,document.body.appendChild(c),c.select(),document.execCommand("copy"),document.body.removeChild(c),console.log("Copy Success (fallback)")}}catch(c){console.error("Error:",c)}finally{f()}},y=()=>{e.updateAttributes({lineNumbers:!e.node.attrs.lineNumbers}),f()},w=()=>{e.updateAttributes({wordWrap:!e.node.attrs.wordWrap}),f()},m=c=>{const b={...c};return b.language&&!Ue.some(g=>g.value===b.language)&&(b.language="plaintext",e.updateAttributes({language:"plaintext"})),b},p=ae.useCallback(c=>{f(c)},[f]);return ae.useEffect(()=>{if(n.current){const c=m(e.node.attrs);l.current=Ca(n.current,{readOnly:!e.editor.isEditable,language:c.language||"plaintext",tabSize:c.tabSize??2,lineNumbers:c.lineNumbers??!0,wordWrap:c.wordWrap??!1,value:u,rtl:!1,onUpdate(b){queueMicrotask(()=>{e.updateAttributes({code:b})})}}),l.current.addExtensions(Ka(),Ja(),Za(),qa(),ja(),Ba(),Ga()),e.node.attrs.shouldFocus&&setTimeout(()=>{f(),e.updateAttributes({shouldFocus:!1})},0)}return()=>{var c,b;(c=l.current)!=null&&c.remove&&((b=l.current)==null||b.remove())}},[n]),ae.useEffect(()=>{var c,b;if((c=l.current)!=null&&c.setOptions){const g=m(e.node.attrs);(b=l.current)==null||b.setOptions(g)}},[l,e.node.attrs]),S.jsx(ge.NodeViewWrapper,{className:ge.clsx(Rn.wrap,"render-wrapper"),children:S.jsx("div",{onClick:p,ref:n,className:ge.clsx("richtext-node-container richtext-hover-shadow richtext-select-outline richtext-node-code-block !richtext-my-[10px]",{[Rn.blockInfoEditable]:!t}),children:S.jsxs("div",{className:"richtext-code-block-toolbar",children:[S.jsx("div",{children:S.jsxs(Gt,{defaultValue:e.node.attrs.language,disabled:!t,onValueChange:c=>{e.updateAttributes({language:c}),f()},children:[S.jsx(gt,{className:"richtext-h-7 richtext-w-[160px] richtext-border-none richtext-text-sm richtext-outline-none hover:richtext-bg-[#5a5d5e4f]",children:S.jsx(oa,{placeholder:"Select language"})}),S.jsx(mt,{className:"richtext-border-[#3a3f4b] richtext-bg-[#21252b] richtext-text-[#ccc]",onCloseAutoFocus:c=>c.preventDefault(),children:Ue==null?void 0:Ue.map(c=>S.jsx(ht,{value:c.value,children:c.label},c.value))})]})}),S.jsx("div",{className:"toolbar-divider"}),S.jsx("div",{className:"richtext-flex richtext-size-7 richtext-cursor-pointer richtext-items-center richtext-justify-center richtext-rounded-sm hover:richtext-bg-[#5a5d5e4f]",onClick:E,children:S.jsx(G.IconComponent,{className:"richtext-size-4",name:"Copy"})}),S.jsx("div",{className:"toolbar-divider"}),S.jsx("div",{onClick:y,className:ge.clsx("richtext-flex richtext-size-7 richtext-cursor-pointer richtext-items-center richtext-justify-center richtext-rounded-sm hover:richtext-bg-[#5a5d5e4f]",{"richtext-bg-[#5a5d5e4f]":e==null?void 0:e.node.attrs.lineNumbers}),children:S.jsx(G.IconComponent,{className:"richtext-size-4",name:"List"})}),S.jsx("div",{className:"toolbar-divider"}),S.jsx("div",{onClick:w,className:ge.clsx("richtext-flex richtext-size-7 richtext-cursor-pointer richtext-items-center richtext-justify-center richtext-rounded-sm hover:richtext-bg-[#5a5d5e4f]",{"richtext-bg-[#5a5d5e4f]":e==null?void 0:e.node.attrs.wordWrap}),children:S.jsx(G.IconComponent,{className:"richtext-size-4",name:"WrapText"})}),S.jsx("div",{className:"toolbar-divider"}),S.jsx("div",{children:S.jsxs(Gt,{defaultValue:e.node.attrs.tabSize,disabled:!t,onValueChange:c=>{e.updateAttributes({tabSize:c}),f()},children:[S.jsx(gt,{className:"richtext-h-7 richtext-w-[60px] richtext-border-none richtext-text-sm richtext-outline-none hover:richtext-bg-[#5a5d5e4f]",children:S.jsx(G.IconComponent,{className:"richtext-size-4",name:"IndentIncrease"})}),S.jsx(mt,{className:"richtext-border-[#3a3f4b] richtext-bg-[#21252b] richtext-text-[#ccc]",onCloseAutoFocus:c=>c.preventDefault(),children:ft==null?void 0:ft.map(c=>S.jsx(ht,{value:c,children:c},c))})]})}),S.jsx("div",{className:"toolbar-divider"}),S.jsx("div",{className:"richtext-flex richtext-size-7 richtext-cursor-pointer richtext-items-center richtext-justify-center richtext-rounded-sm hover:richtext-bg-[#5a5d5e4f]",onClick:i,children:S.jsx(G.IconComponent,{className:"richtext-size-4",name:"Trash2"})})]})})})}const aa=/^`{3}([a-z]+)?\s$/,ra=/^~{3}([a-z]+)?\s$/,ia=Le.Node.create({name:"codeBlock",group:"block",atom:!0,content:"text*",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),languages:[],button:({editor:t,t:n})=>({component:da,componentProps:{action:()=>t.commands.setCodeBlock({}),isActive:()=>t.isActive("codeBlock")||!1,disabled:!1,icon:"Code2",tooltip:n("editor.codeblock.tooltip")}})}},addAttributes(){return{code:{default:"",parseHTML:e=>e.textContent||""},language:{default:"plaintext"},lineNumbers:{default:!0},wordWrap:{default:!1},tabSize:{default:2},shouldFocus:{default:!0,parseHTML:()=>!1,renderHTML:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({code:e.textContent||""})},{tag:"pre code",preserveWhitespace:"full",getAttrs:e=>({code:e.textContent||""})}]},renderHTML({HTMLAttributes:e,node:t}){var i;const n=t.attrs.code||((i=t.content.firstChild)==null?void 0:i.text)||"";return["pre",Le.mergeAttributes(this.options.HTMLAttributes,e),["code",{},n]]},addNodeView(){return ge.ReactNodeViewRenderer(nr)},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{...e,shouldFocus:!0}})}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.setCodeBlock({})}},addInputRules(){return[Le.textblockTypeInputRule({find:aa,type:this.type,getAttributes:e=>({language:e[1]})}),Le.textblockTypeInputRule({find:ra,type:this.type,getAttributes:e=>({language:e[1]})})]}});exports.CodeBlock=ia;exports.backtickInputRegex=aa;exports.tildeInputRegex=ra;
44
+ `)),a=g.length;for(let r=0,d=[],o=g[0];o;r++){const s=(u[r]||(u[r]=Va())).style,[h,R,A]=o,v=f[r];o=g[r+1],h!=(v==null?void 0:v[0])&&(s.top=h+"00%"),R!=(v==null?void 0:v[1])&&(s.height=R+"00%"),A!=(v==null?void 0:v[2])&&(s.left=A*100+"%");const k=d[0]!=h&&(o==null?void 0:o[0])!=h,N=d[0]+d[1]!=h+R&&(o==null?void 0:o[0])+(o==null?void 0:o[1])!=h+R;for(let T=-k,L=R+N;T<L;T++)n[T+h]=r;d=f[r]=g[r]}for(let r=t;r>a;)u[--r].remove();E.append(...u.slice(t,t=a))},m=()=>{const b=n[l.activeLineNumber-1]??-1;b!=i&&(i>-1&&(u[i].className=""),b>-1&&(u[b].className="active")),i=b},p=b=>{const g=b.length,a=[],r=[];for(let d=0,o=-1,s=0,h=0;;s++){const R=s==g,A=R?0:y[s]=c(b[s]);if(A<0)o<0&&(o=s);else{for(let v=A;v<d;v++)a[v][1]=(o<0||v==A&&!R?s:o)-a[v][0];for(let v=d;v<A;)r[h++]=a[v]=[o<0||v>d?s:o,0,v++*e];o=-1,d=A}if(R)break}return y.length=g,r},c=b=>{let g=b.search(/\S/),a=0;if(g<0)return g;for(let r=0;r<g;)a+=b[r++]==" "?e-a%e:1;return Math.ceil(a/e)};return{lines:E.children,indentLevels:y,update(b,g){l||(l=b,b.extensions.indentGuides=this,b.overlays.append(E),b.addListener("update",w),b.addListener("selectionChange",m)),E.style.display=g.wordWrap?"none":"",e!=(e=g.tabSize||2)&&(w(b.value),m())}}},qa=()=>e=>{let t,n,i,l=-1,u=[],f=()=>{n||(n=e.extensions.matchBrackets);let[w,m]=e.getSelection(),p=w==m&&e.focused&&n&&E(m)||-1;if(p!=l){if(y(),p+1){let c=t[i[p]],b=t[p];u=[c,b].map(g=>Je(e,".punctuation",0,-1,g[1])),u[0]!=u[1]&&c[1]+c[3].length==b[1]&&(u[0].textContent+=u[1].textContent,u[1].textContent="",u[1]=u[0]),y(!0)}else u=[];l=p}},E=w=>{var m;({brackets:t,pairs:i}=n);for(let p=0,c;c=t[++p];)if(!c[4]&&c[5]>=w&&((m=t[i[p]])==null?void 0:m[1])<=w)return p},y=w=>u.forEach(m=>m.classList.toggle("active-bracket",!!w));j(e,"focus",f),j(e,"blur",f),e.addListener("selectionChange",f),e.addListener("update",()=>{y(),l=-1})},Ka=(e=!0,t="([{",n=")]}")=>{let i,l;const u=[],f=p=>{p.extensions.matchBrackets=f,p.addListener("tokenize",w),e&&p.tokens[0]?p.update():w(p.tokens)},E=f.brackets=[],y=f.pairs=[],w=p=>{if(y.length=E.length=l=i=0,m(p,0),e)for(let c=0,b;b=E[c];){let g=b[0].alias;b[0].alias=(g?g+" ":"")+`bracket-${c++in y?"level-"+b[2]%12:"error"}`}},m=(p,c)=>{let b,g=0;for(;b=p[g++];){let a=b.length;if(typeof b!="string"){let r=b.content;if(Array.isArray(r))m(r,c);else if((b.alias||b.type)=="punctuation"){let d=In(r,t,a-1),o=d||In(r,n,a-1);if(o){if(E[i]=[b,c,0,r,!!d,c+a],d)u[l++]=[i,d];else for(let s=l;s;){let[h,R]=u[--s];o==R&&(y[y[i]=h]=i,E[i][2]=E[h][2]=l=s,s=0)}i++}}}c+=a}};return f},In=(e,t,n)=>t.indexOf(e[0])+1||n&&t.indexOf(e[n])+1,Wa="xml,rss,atom,jsx,tsx,xquery,actionscript".split(","),Ya=/^(?:area|base|w?br|col|embed|hr|img|input|link|meta|source|track)$/i,Xa=e=>{let t=[],n,i=[],l,u,f=[],E=(w,m,p)=>{n=p,i.length=t.length=l=u=0,y(w,m,0)},y=(w,m,p)=>{let c=Wa.includes(m),b=0,g=w.length;for(;b<g;){const a=w[b++],r=a.content,d=a.length;if(Array.isArray(r))if(a.type=="tag"&&n[p]=="<"){const o=r[0].length,s=r[2]?n.substr(p+o,r[1].length):"",h=r[r.length-1].length<2&&(c||!Ya.test(s));if(r[2]&&c&&y(r,m,p),h)if(o>1)for(let R=u;R;)s==f[--R][1]&&(t[t[l]=f[u=R][0]]=l,R=0);else f[u++]=[l,s];i[l++]=[a,p,p+d,s,o>1,h]}else{let o=a.alias||a.type;y(r,o.slice(0,9)=="language-"?o.slice(9):m,p)}p+=d}};return e.addListener("tokenize",E),E(e.tokens,e.options.language,e.value),{tags:i,pairs:t}},Qa=(e,t)=>{for(let n=0,i=t.length;n<i;n++)if(t[n][1]<=e&&t[n][2]>=e)return n},Ja=()=>e=>{var t;let n,i;const{tags:l,pairs:u}=(t=e.extensions).matchTags||(t.matchTags=Xa(e)),f=E=>[n,i].forEach(y=>{y&&y.classList.toggle("active-tagname",!E)});e.addListener("selectionChange",([E,y])=>{let w,m,p;E==y&&e.focused&&(p=Qa(E,l),p+1&&(p=u[p],p+1&&(w=Je(e,".tag>.tag"))&&(m=Je(e,".tag>.tag",2,0,l[p][1])))),n!=w&&(f(!0),n=w,i=m,f())})},er="_wrap_1x3wi_1",tr="_blockInfoEditable_1x3wi_30",Rn={wrap:er,blockInfoEditable:tr},Ue=[{value:"plaintext",label:"plaintext"},{value:"javascript",label:"JavaScript"},{value:"typescript",label:"TypeScript"},{value:"html",label:"HTML"},{value:"css",label:"CSS"},{value:"python",label:"Python"},{value:"java",label:"Java"},{value:"cpp",label:"C++"},{value:"go",label:"Go"},{value:"rust",label:"Rust"},{value:"sql",label:"SQL"},{value:"json",label:"JSON"},{value:"yaml",label:"YAML"},{value:"markdown",label:"Markdown"},{value:"bash",label:"Bash"},{value:"php",label:"PHP"}],ft=[2,4,8];function nr(e){const t=G.useEditableEditor(),n=ae.useRef(null),i=ae.useCallback(()=>G.deleteNode(ia.name,e==null?void 0:e.editor),[e==null?void 0:e.editor]),l=ae.useRef(null),u=e.node.attrs.code||e.node.textContent||"",f=ae.useCallback(c=>{c==null||c.stopPropagation(),setTimeout(()=>{var b,g,a;(a=(g=(b=l.current)==null?void 0:b.textarea)==null?void 0:g.focus)==null||a.call(g)},0)},[]),E=async()=>{if(u)try{if(navigator.clipboard)await navigator.clipboard.writeText(u),console.log("Copy Success");else{const c=document.createElement("textarea");c.value=u,document.body.appendChild(c),c.select(),document.execCommand("copy"),document.body.removeChild(c),console.log("Copy Success (fallback)")}}catch(c){console.error("Error:",c)}finally{f()}},y=()=>{e.updateAttributes({lineNumbers:!e.node.attrs.lineNumbers}),f()},w=()=>{e.updateAttributes({wordWrap:!e.node.attrs.wordWrap}),f()},m=c=>{const b={...c};return b.language&&!Ue.some(g=>g.value===b.language)&&(b.language="plaintext",e.updateAttributes({language:"plaintext"})),b},p=ae.useCallback(c=>{f(c)},[f]);return ae.useEffect(()=>{if(n.current){const c=m(e.node.attrs);l.current=Ca(n.current,{readOnly:!e.editor.isEditable,language:c.language||"plaintext",tabSize:c.tabSize??2,lineNumbers:c.lineNumbers??!0,wordWrap:c.wordWrap??!1,value:u,rtl:!1,onUpdate(b){queueMicrotask(()=>{e.updateAttributes({code:b})})}}),l.current.addExtensions(Ka(),Ja(),Za(),qa(),ja(),Ba(),Ga()),e.node.attrs.shouldFocus&&setTimeout(()=>{f(),e.updateAttributes({shouldFocus:!1})},0)}return()=>{var c,b;(c=l.current)!=null&&c.remove&&((b=l.current)==null||b.remove())}},[n]),ae.useEffect(()=>{var c,b;if((c=l.current)!=null&&c.setOptions){const g=m(e.node.attrs);(b=l.current)==null||b.setOptions(g)}},[l,e.node.attrs]),S.jsx(ge.NodeViewWrapper,{className:ge.clsx(Rn.wrap,"render-wrapper"),children:S.jsx("div",{onClick:p,ref:n,className:ge.clsx("richtext-node-container richtext-hover-shadow richtext-select-outline richtext-node-code-block !richtext-my-[10px]",{[Rn.blockInfoEditable]:!t}),children:S.jsxs("div",{className:"richtext-code-block-toolbar",children:[S.jsx("div",{children:S.jsxs(Gt,{defaultValue:e.node.attrs.language,disabled:!t,onValueChange:c=>{e.updateAttributes({language:c}),f()},children:[S.jsx(gt,{className:"richtext-h-7 richtext-w-[160px] richtext-border-none richtext-text-sm richtext-outline-none hover:richtext-bg-[#5a5d5e4f]",children:S.jsx(oa,{placeholder:"Select language"})}),S.jsx(mt,{className:"richtext-border-[#3a3f4b] richtext-bg-[#21252b] richtext-text-[#ccc]",onCloseAutoFocus:c=>c.preventDefault(),children:Ue==null?void 0:Ue.map(c=>S.jsx(ht,{value:c.value,children:c.label},c.value))})]})}),S.jsx("div",{className:"toolbar-divider"}),S.jsx("div",{className:"richtext-flex richtext-size-7 richtext-cursor-pointer richtext-items-center richtext-justify-center richtext-rounded-sm hover:richtext-bg-[#5a5d5e4f]",onClick:E,children:S.jsx(G.IconComponent,{className:"richtext-size-4",name:"Copy"})}),S.jsx("div",{className:"toolbar-divider"}),S.jsx("div",{onClick:y,className:ge.clsx("richtext-flex richtext-size-7 richtext-cursor-pointer richtext-items-center richtext-justify-center richtext-rounded-sm hover:richtext-bg-[#5a5d5e4f]",{"richtext-bg-[#5a5d5e4f]":e==null?void 0:e.node.attrs.lineNumbers}),children:S.jsx(G.IconComponent,{className:"richtext-size-4",name:"List"})}),S.jsx("div",{className:"toolbar-divider"}),S.jsx("div",{onClick:w,className:ge.clsx("richtext-flex richtext-size-7 richtext-cursor-pointer richtext-items-center richtext-justify-center richtext-rounded-sm hover:richtext-bg-[#5a5d5e4f]",{"richtext-bg-[#5a5d5e4f]":e==null?void 0:e.node.attrs.wordWrap}),children:S.jsx(G.IconComponent,{className:"richtext-size-4",name:"WrapText"})}),S.jsx("div",{className:"toolbar-divider"}),S.jsx("div",{children:S.jsxs(Gt,{defaultValue:e.node.attrs.tabSize,disabled:!t,onValueChange:c=>{e.updateAttributes({tabSize:c}),f()},children:[S.jsx(gt,{className:"richtext-h-7 richtext-w-[60px] richtext-border-none richtext-text-sm richtext-outline-none hover:richtext-bg-[#5a5d5e4f]",children:S.jsx(G.IconComponent,{className:"richtext-size-4",name:"IndentIncrease"})}),S.jsx(mt,{className:"richtext-border-[#3a3f4b] richtext-bg-[#21252b] richtext-text-[#ccc]",onCloseAutoFocus:c=>c.preventDefault(),children:ft==null?void 0:ft.map(c=>S.jsx(ht,{value:c,children:c},c))})]})}),S.jsx("div",{className:"toolbar-divider"}),S.jsx("div",{className:"richtext-flex richtext-size-7 richtext-cursor-pointer richtext-items-center richtext-justify-center richtext-rounded-sm hover:richtext-bg-[#5a5d5e4f]",onClick:i,children:S.jsx(G.IconComponent,{className:"richtext-size-4",name:"Trash2"})})]})})})}const aa=/^`{3}([a-z]+)?\s$/,ra=/^~{3}([a-z]+)?\s$/,ia=Le.Node3.create({name:"codeBlock",group:"block",atom:!0,content:"text*",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),languages:[],button:({editor:t,t:n})=>({component:da,componentProps:{action:()=>t.commands.setCodeBlock({}),isActive:()=>t.isActive("codeBlock")||!1,disabled:!1,icon:"Code2",tooltip:n("editor.codeblock.tooltip")}})}},addAttributes(){return{code:{default:"",parseHTML:e=>e.textContent||""},language:{default:"plaintext"},lineNumbers:{default:!0},wordWrap:{default:!1},tabSize:{default:2},shouldFocus:{default:!0,parseHTML:()=>!1,renderHTML:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({code:e.textContent||""})},{tag:"pre code",preserveWhitespace:"full",getAttrs:e=>({code:e.textContent||""})}]},renderHTML({HTMLAttributes:e,node:t}){var i;const n=t.attrs.code||((i=t.content.firstChild)==null?void 0:i.text)||"";return["pre",Le.mergeAttributes(this.options.HTMLAttributes,e),["code",{},n]]},addNodeView(){return ge.ReactNodeViewRenderer(nr)},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{...e,shouldFocus:!0}})}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.setCodeBlock({})}},addInputRules(){return[Le.textblockTypeInputRule({find:aa,type:this.type,getAttributes:e=>({language:e[1]})}),Le.textblockTypeInputRule({find:ra,type:this.type,getAttributes:e=>({language:e[1]})})]}});exports.CodeBlock=ia;exports.backtickInputRegex=aa;exports.tildeInputRegex=ra;
@@ -129,18 +129,6 @@ declare module '@tiptap/core' {
129
129
  }
130
130
 
131
131
 
132
- declare module '@tiptap/core' {
133
- interface Commands<ReturnType> {
134
- emoji: {
135
- setEmoji: (emoji: {
136
- name: string;
137
- emoji: string;
138
- }) => ReturnType;
139
- };
140
- }
141
- }
142
-
143
-
144
132
  declare module '@tiptap/core' {
145
133
  interface Commands<ReturnType> {
146
134
  excalidraw: {
@@ -232,19 +220,15 @@ declare module '@tiptap/core' {
232
220
 
233
221
  declare module '@tiptap/core' {
234
222
  interface Commands<ReturnType> {
235
- imageGifUpload: {
236
- /**
237
- * Add an image gif
238
- */
239
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
223
+ indent: {
240
224
  /**
241
- * Update an image gif
225
+ * Set the indent attribute
242
226
  */
243
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
227
+ indent: () => ReturnType;
244
228
  /**
245
- * Set image alignment
229
+ * Set the outdent attribute
246
230
  */
247
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
231
+ outdent: () => ReturnType;
248
232
  };
249
233
  }
250
234
  }
@@ -252,15 +236,19 @@ declare module '@tiptap/core' {
252
236
 
253
237
  declare module '@tiptap/core' {
254
238
  interface Commands<ReturnType> {
255
- indent: {
239
+ imageGifUpload: {
256
240
  /**
257
- * Set the indent attribute
241
+ * Add an image gif
258
242
  */
259
- indent: () => ReturnType;
243
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
260
244
  /**
261
- * Set the outdent attribute
245
+ * Update an image gif
262
246
  */
263
- outdent: () => ReturnType;
247
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
248
+ /**
249
+ * Set image alignment
250
+ */
251
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
264
252
  };
265
253
  }
266
254
  }
@@ -314,16 +302,24 @@ declare module '@tiptap/core' {
314
302
  search: {
315
303
  setSearchTerm: (searchTerm: string) => ReturnType;
316
304
  setReplaceTerm: (replaceTerm: string) => ReturnType;
305
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
306
+ resetIndex: () => ReturnType;
307
+ nextSearchResult: () => ReturnType;
308
+ previousSearchResult: () => ReturnType;
317
309
  replace: () => ReturnType;
318
310
  replaceAll: () => ReturnType;
319
- goToPrevSearchResult: () => void;
320
- goToNextSearchResult: () => void;
321
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
322
311
  };
323
312
  }
324
313
  }
325
314
 
326
315
 
316
+ declare module '@tiptap/core' {
317
+ interface Storage {
318
+ searchAndReplace: SearchAndReplaceStorage;
319
+ }
320
+ }
321
+
322
+
327
323
  declare module '@tiptap/core' {
328
324
  interface Commands<ReturnType> {
329
325
  tableOfContents: {
@@ -129,18 +129,6 @@ declare module '@tiptap/core' {
129
129
  }
130
130
 
131
131
 
132
- declare module '@tiptap/core' {
133
- interface Commands<ReturnType> {
134
- emoji: {
135
- setEmoji: (emoji: {
136
- name: string;
137
- emoji: string;
138
- }) => ReturnType;
139
- };
140
- }
141
- }
142
-
143
-
144
132
  declare module '@tiptap/core' {
145
133
  interface Commands<ReturnType> {
146
134
  excalidraw: {
@@ -232,19 +220,15 @@ declare module '@tiptap/core' {
232
220
 
233
221
  declare module '@tiptap/core' {
234
222
  interface Commands<ReturnType> {
235
- imageGifUpload: {
236
- /**
237
- * Add an image gif
238
- */
239
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
223
+ indent: {
240
224
  /**
241
- * Update an image gif
225
+ * Set the indent attribute
242
226
  */
243
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
227
+ indent: () => ReturnType;
244
228
  /**
245
- * Set image alignment
229
+ * Set the outdent attribute
246
230
  */
247
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
231
+ outdent: () => ReturnType;
248
232
  };
249
233
  }
250
234
  }
@@ -252,15 +236,19 @@ declare module '@tiptap/core' {
252
236
 
253
237
  declare module '@tiptap/core' {
254
238
  interface Commands<ReturnType> {
255
- indent: {
239
+ imageGifUpload: {
256
240
  /**
257
- * Set the indent attribute
241
+ * Add an image gif
258
242
  */
259
- indent: () => ReturnType;
243
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
260
244
  /**
261
- * Set the outdent attribute
245
+ * Update an image gif
262
246
  */
263
- outdent: () => ReturnType;
247
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
248
+ /**
249
+ * Set image alignment
250
+ */
251
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
264
252
  };
265
253
  }
266
254
  }
@@ -314,16 +302,24 @@ declare module '@tiptap/core' {
314
302
  search: {
315
303
  setSearchTerm: (searchTerm: string) => ReturnType;
316
304
  setReplaceTerm: (replaceTerm: string) => ReturnType;
305
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
306
+ resetIndex: () => ReturnType;
307
+ nextSearchResult: () => ReturnType;
308
+ previousSearchResult: () => ReturnType;
317
309
  replace: () => ReturnType;
318
310
  replaceAll: () => ReturnType;
319
- goToPrevSearchResult: () => void;
320
- goToNextSearchResult: () => void;
321
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
322
311
  };
323
312
  }
324
313
  }
325
314
 
326
315
 
316
+ declare module '@tiptap/core' {
317
+ interface Storage {
318
+ searchAndReplace: SearchAndReplaceStorage;
319
+ }
320
+ }
321
+
322
+
327
323
  declare module '@tiptap/core' {
328
324
  interface Commands<ReturnType> {
329
325
  tableOfContents: {
package/lib/CodeBlock.js CHANGED
@@ -1,7 +1,7 @@
1
- import { N as sa, t as Gt, m as oa } from "./index-DI9T3iLd.js";
2
- import { N as la, c as Le, R as ca } from "./dom-dataset-Di3tIRrR.js";
1
+ import { N as sa, t as Gt, m as oa } from "./index-kbO3iWqL.js";
2
+ import { N as la, c as Le, R as ca } from "./dom-dataset-lYeH6gfI.js";
3
3
  import { jsxs as _e, jsx as k } from "react/jsx-runtime";
4
- import { d as ne, A as da, Z as ua, a3 as pa, k as xe } from "./RichTextEditor-KP2Rgcqe.js";
4
+ import { d as ne, A as da, _ as ua, am as pa, f as xe } from "./RichTextEditor-DGcKEUGr.js";
5
5
  import * as ue from "react";
6
6
  import { useRef as zt, useCallback as it, useEffect as Ht } from "react";
7
7
  import * as F from "@radix-ui/react-select";
package/lib/CodeView.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-ByRfqzMr.cjs"),c=require("./RichTextEditor-DWlLqTl9.cjs"),s=i.Extension.create({name:"codeView",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:o}){return{component:c.ActionButton,componentProps:{action:()=>{t.commands.toggleCodeView()},isActive:()=>t.storage.codeView.isActive||!1,disabled:!1,icon:"CodeView",tooltip:o("editor.codeView.tooltip")||"View HTML Code",customClass:"tiptap-code-view-button"}}}}},addStorage(){return{isActive:!1,originalContent:""}},addCommands(){return{toggleCodeView:()=>({editor:e})=>{const t=e.storage.codeView.isActive;if(t)e.commands.setContent(e.getText());else{const o=e.getHTML();e.storage.codeView.originalContent=o;const n=o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");e.commands.setContent(`<div class="tiptap-code-view-wrapper">${n}</div>`)}return e.storage.codeView.isActive=!t,!0}}}});exports.CodeView=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-DF2Lp4HZ.cjs"),c=require("./RichTextEditor-CxvwGvQG.cjs"),s=i.Extension.create({name:"codeView",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:o}){return{component:c.ActionButton,componentProps:{action:()=>{t.commands.toggleCodeView()},isActive:()=>t.storage.codeView.isActive||!1,disabled:!1,icon:"CodeView",tooltip:o("editor.codeView.tooltip")||"View HTML Code",customClass:"tiptap-code-view-button"}}}}},addStorage(){return{isActive:!1,originalContent:""}},addCommands(){return{toggleCodeView:()=>({editor:e})=>{const t=e.storage.codeView.isActive;if(t)e.commands.setContent(e.getText());else{const o=e.getHTML();e.storage.codeView.originalContent=o;const n=o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");e.commands.setContent(`<div class="tiptap-code-view-wrapper">${n}</div>`)}return e.storage.codeView.isActive=!t,!0}}}});exports.CodeView=s;