@burdenoff/microfe-support 2026.819.3 → 2026.819.5

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 (82) hide show
  1. package/dist/microfe-support.css +1 -1
  2. package/dist/node_modules/@tiptap/core/dist/index.js +3453 -0
  3. package/dist/node_modules/@tiptap/core/dist/index.js.map +1 -0
  4. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +21 -0
  5. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +1 -0
  6. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +76 -0
  7. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +1 -0
  8. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +74 -0
  9. package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +1 -0
  10. package/dist/node_modules/@tiptap/extension-code/dist/index.js +68 -0
  11. package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +1 -0
  12. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +160 -0
  13. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +1 -0
  14. package/dist/node_modules/@tiptap/extension-document/dist/index.js +12 -0
  15. package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +1 -0
  16. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +51 -0
  17. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +1 -0
  18. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +68 -0
  19. package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +1 -0
  20. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +50 -0
  21. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +1 -0
  22. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +71 -0
  23. package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +1 -0
  24. package/dist/node_modules/@tiptap/extension-link/dist/index.js +373 -0
  25. package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +1 -0
  26. package/dist/node_modules/@tiptap/extension-list/dist/index.js +964 -0
  27. package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +1 -0
  28. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +46 -0
  29. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +1 -0
  30. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +7 -0
  31. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +1 -0
  32. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +56 -0
  33. package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +1 -0
  34. package/dist/node_modules/@tiptap/extension-text/dist/index.js +15 -0
  35. package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +1 -0
  36. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +63 -0
  37. package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +1 -0
  38. package/dist/node_modules/@tiptap/extensions/dist/index.js +459 -0
  39. package/dist/node_modules/@tiptap/extensions/dist/index.js.map +1 -0
  40. package/dist/node_modules/@tiptap/react/dist/index.js +316 -0
  41. package/dist/node_modules/@tiptap/react/dist/index.js.map +1 -0
  42. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +29 -0
  43. package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +1 -0
  44. package/dist/node_modules/fast-equals/dist/es/index.js +267 -0
  45. package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -0
  46. package/dist/node_modules/linkifyjs/dist/linkify.js +514 -0
  47. package/dist/node_modules/linkifyjs/dist/linkify.js.map +1 -0
  48. package/dist/node_modules/orderedmap/dist/index.js +69 -0
  49. package/dist/node_modules/orderedmap/dist/index.js.map +1 -0
  50. package/dist/node_modules/prosemirror-commands/dist/index.js +335 -0
  51. package/dist/node_modules/prosemirror-commands/dist/index.js.map +1 -0
  52. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +113 -0
  53. package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +1 -0
  54. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +173 -0
  55. package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +1 -0
  56. package/dist/node_modules/prosemirror-history/dist/index.js +214 -0
  57. package/dist/node_modules/prosemirror-history/dist/index.js.map +1 -0
  58. package/dist/node_modules/prosemirror-keymap/dist/index.js +52 -0
  59. package/dist/node_modules/prosemirror-keymap/dist/index.js.map +1 -0
  60. package/dist/node_modules/prosemirror-model/dist/index.js +1786 -0
  61. package/dist/node_modules/prosemirror-model/dist/index.js.map +1 -0
  62. package/dist/node_modules/prosemirror-schema-list/dist/index.js +75 -0
  63. package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +1 -0
  64. package/dist/node_modules/prosemirror-state/dist/index.js +527 -0
  65. package/dist/node_modules/prosemirror-state/dist/index.js.map +1 -0
  66. package/dist/node_modules/prosemirror-transform/dist/index.js +1153 -0
  67. package/dist/node_modules/prosemirror-transform/dist/index.js.map +1 -0
  68. package/dist/node_modules/prosemirror-view/dist/index.js +3296 -0
  69. package/dist/node_modules/prosemirror-view/dist/index.js.map +1 -0
  70. package/dist/node_modules/rope-sequence/dist/index.js +85 -0
  71. package/dist/node_modules/rope-sequence/dist/index.js.map +1 -0
  72. package/dist/node_modules/w3c-keyname/index.js +90 -0
  73. package/dist/node_modules/w3c-keyname/index.js.map +1 -0
  74. package/dist/support/components/careers/RichTextEditor.d.ts +16 -0
  75. package/dist/support/components/careers/RichTextEditor.js +87 -0
  76. package/dist/support/components/careers/RichTextEditor.js.map +1 -0
  77. package/dist/support/pages/JobApplicationDetailPage.d.ts +1 -0
  78. package/dist/support/pages/JobApplicationDetailPage.js +338 -336
  79. package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
  80. package/dist/support/pages/JobPostingDetailPage.js +310 -303
  81. package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
  82. package/package.json +4 -1
@@ -0,0 +1,459 @@
1
+ import { Plugin as e, PluginKey as t } from "../../../prosemirror-state/dist/index.js";
2
+ import { Decoration as n, DecorationSet as r } from "../../../prosemirror-view/dist/index.js";
3
+ import { Extension as i, callOrReturn as a, getChangedRanges as o, getExtensionField as s, isNodeEmpty as c, isNodeSelection as l } from "../../core/dist/index.js";
4
+ import { dropCursor as u } from "../../../prosemirror-dropcursor/dist/index.js";
5
+ import { gapCursor as d } from "../../../prosemirror-gapcursor/dist/index.js";
6
+ import { history as f, redo as p, undo as m } from "../../../prosemirror-history/dist/index.js";
7
+ i.create({
8
+ name: "characterCount",
9
+ addOptions() {
10
+ return {
11
+ limit: null,
12
+ autoTrim: !0,
13
+ mode: "textSize",
14
+ textCounter: (e) => e.length,
15
+ wordCounter: (e) => e.split(" ").filter((e) => e !== "").length
16
+ };
17
+ },
18
+ addStorage() {
19
+ return {
20
+ characters: () => 0,
21
+ words: () => 0
22
+ };
23
+ },
24
+ onBeforeCreate() {
25
+ this.storage.characters = (e) => {
26
+ let t = e?.node || this.editor.state.doc;
27
+ if ((e?.mode || this.options.mode) === "textSize") {
28
+ let e = t.textBetween(0, t.content.size, void 0, " ");
29
+ return this.options.textCounter(e);
30
+ }
31
+ return t.nodeSize;
32
+ }, this.storage.words = (e) => {
33
+ let t = e?.node || this.editor.state.doc, n = t.textBetween(0, t.content.size, " ", " ");
34
+ return this.options.wordCounter(n);
35
+ };
36
+ },
37
+ addProseMirrorPlugins() {
38
+ let n = !1;
39
+ return [new e({
40
+ key: new t("characterCount"),
41
+ appendTransaction: (e, t, r) => {
42
+ if (n) return;
43
+ let i = this.options.limit, a = this.options.autoTrim;
44
+ if (i == null || i === 0 || a === !1) {
45
+ n = !0;
46
+ return;
47
+ }
48
+ let o = this.storage.characters({ node: r.doc });
49
+ if (o > i) {
50
+ let e = o - i;
51
+ console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);
52
+ let t = r.tr.deleteRange(0, e);
53
+ return n = !0, t;
54
+ }
55
+ n = !0;
56
+ },
57
+ filterTransaction: (e, t) => {
58
+ let n = this.options.limit;
59
+ if (!e.docChanged || n === 0 || n == null) return !0;
60
+ let r = this.storage.characters({ node: t.doc }), i = this.storage.characters({ node: e.doc });
61
+ if (i <= n || r > n && i > n && i <= r) return !0;
62
+ if (r > n && i > n && i > r || !e.getMeta("paste")) return !1;
63
+ let a = e.selection.$head.pos, o = a - (i - n), s = a;
64
+ return e.deleteRange(o, s), !(this.storage.characters({ node: e.doc }) > n);
65
+ }
66
+ })];
67
+ }
68
+ });
69
+ var h = i.create({
70
+ name: "dropCursor",
71
+ addOptions() {
72
+ return {
73
+ color: "currentColor",
74
+ width: 1,
75
+ class: void 0
76
+ };
77
+ },
78
+ addProseMirrorPlugins() {
79
+ return [u(this.options)];
80
+ }
81
+ });
82
+ i.create({
83
+ name: "focus",
84
+ addOptions() {
85
+ return {
86
+ className: "has-focus",
87
+ mode: "all"
88
+ };
89
+ },
90
+ addProseMirrorPlugins() {
91
+ return [new e({
92
+ key: new t("focus"),
93
+ props: { decorations: ({ doc: e, selection: t }) => {
94
+ let { isEditable: i, isFocused: a } = this.editor, { anchor: o } = t, s = [];
95
+ if (!i || !a) return r.create(e, []);
96
+ let c = 0;
97
+ this.options.mode === "deepest" && e.descendants((e, t) => {
98
+ if (!e.isText) {
99
+ if (!(o >= t && o <= t + e.nodeSize - 1)) return !1;
100
+ c += 1;
101
+ }
102
+ });
103
+ let l = 0;
104
+ return e.descendants((e, t) => {
105
+ if (e.isText || !(o >= t && o <= t + e.nodeSize - 1)) return !1;
106
+ if (l += 1, this.options.mode === "deepest" && c - l > 0 || this.options.mode === "shallowest" && l > 1) return this.options.mode === "deepest";
107
+ s.push(n.node(t, t + e.nodeSize, { class: this.options.className }));
108
+ }), r.create(e, s);
109
+ } }
110
+ })];
111
+ }
112
+ });
113
+ var g = i.create({
114
+ name: "gapCursor",
115
+ addProseMirrorPlugins() {
116
+ return [d()];
117
+ },
118
+ extendNodeSchema(e) {
119
+ let t = {
120
+ name: e.name,
121
+ options: e.options,
122
+ storage: e.storage
123
+ };
124
+ return { allowGapCursor: a(s(e, "allowGapCursor", t)) ?? null };
125
+ }
126
+ }), _ = "placeholder", v = new t("tiptap__placeholder");
127
+ function y(e) {
128
+ let { editor: t, placeholder: r, dataAttribute: i, pos: a, node: o, isEmptyDoc: s, hasAnchor: c, classes: { emptyNode: l, emptyEditor: u } } = e, d = [l];
129
+ return s && d.push(u), n.node(a, a + o.nodeSize, {
130
+ class: d.join(" "),
131
+ [i]: typeof r == "function" ? r({
132
+ editor: t,
133
+ node: o,
134
+ pos: a,
135
+ hasAnchor: c
136
+ }) : r
137
+ });
138
+ }
139
+ function b(e, t) {
140
+ return typeof e == "function" ? e(t) : e;
141
+ }
142
+ function x({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, from: a, to: o }) {
143
+ let { anchor: s } = i, l = [], u = e.isEmpty;
144
+ return r.nodesBetween(a, o, (r, i) => {
145
+ let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf && c(r);
146
+ return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && l.push(y({
147
+ editor: e,
148
+ isEmptyDoc: u,
149
+ dataAttribute: n,
150
+ hasAnchor: a,
151
+ placeholder: t.placeholder,
152
+ classes: {
153
+ emptyEditor: t.emptyEditorClass,
154
+ emptyNode: b(t.emptyNodeClass, {
155
+ editor: e,
156
+ node: r,
157
+ pos: i,
158
+ hasAnchor: a
159
+ })
160
+ },
161
+ node: r,
162
+ pos: i
163
+ })), t.includeChildren;
164
+ }), l;
165
+ }
166
+ function S({ editor: e, options: t, dataAttribute: n, doc: i, selection: a }) {
167
+ if (!(e.isEditable || !t.showOnlyWhenEditable)) return null;
168
+ let { anchor: o } = a, s = [], l = e.isEmpty;
169
+ if (t.showOnlyCurrent && !t.includeChildren) {
170
+ let r = i.resolve(o), a = r.depth > 0 ? r.node(1) : r.nodeAfter, u = r.depth > 0 ? r.before(1) : o;
171
+ if (a && a.type.isTextblock && c(a)) {
172
+ let r = o >= u && o <= u + a.nodeSize;
173
+ s.push(y({
174
+ editor: e,
175
+ isEmptyDoc: l,
176
+ dataAttribute: n,
177
+ hasAnchor: r,
178
+ placeholder: t.placeholder,
179
+ classes: {
180
+ emptyEditor: t.emptyEditorClass,
181
+ emptyNode: b(t.emptyNodeClass, {
182
+ editor: e,
183
+ node: a,
184
+ pos: u,
185
+ hasAnchor: r
186
+ })
187
+ },
188
+ node: a,
189
+ pos: u
190
+ }));
191
+ }
192
+ } else s.push(...x({
193
+ editor: e,
194
+ options: t,
195
+ dataAttribute: n,
196
+ doc: i,
197
+ selection: a,
198
+ from: 0,
199
+ to: i.content.size
200
+ }));
201
+ return r.create(i, s);
202
+ }
203
+ function C(e, t) {
204
+ let n = e.resolve(t);
205
+ if (n.depth === 0) {
206
+ let e = n.nodeAfter ?? n.nodeBefore;
207
+ if (!e) return {
208
+ from: t,
209
+ to: t
210
+ };
211
+ let r = n.nodeAfter ? t : t - e.nodeSize;
212
+ return {
213
+ from: r,
214
+ to: r + e.nodeSize
215
+ };
216
+ }
217
+ let r = n.before(1);
218
+ return {
219
+ from: r,
220
+ to: r + n.node(1).nodeSize
221
+ };
222
+ }
223
+ function w(e, t) {
224
+ return {
225
+ from: Math.max(0, t.from - 1),
226
+ to: Math.min(e.content.size, t.to - 1)
227
+ };
228
+ }
229
+ function T(e, t, n) {
230
+ let r = [];
231
+ return e.forEach((e, i) => {
232
+ let a = i, o = a + e.nodeSize, s = a + 1, c = o + 1;
233
+ s < n && c > t && r.push({
234
+ from: a,
235
+ to: o
236
+ });
237
+ }), r;
238
+ }
239
+ function E(e) {
240
+ if (e.length === 0) return [];
241
+ let t = [...e].sort((e, t) => e.from - t.from), n = [{ ...t[0] }];
242
+ for (let e = 1; e < t.length; e += 1) {
243
+ let r = n[n.length - 1], i = t[e];
244
+ i.from <= r.to ? r.to = Math.max(r.to, i.to) : n.push({ ...i });
245
+ }
246
+ return n;
247
+ }
248
+ function D(e, t) {
249
+ let n = T(e, t.from, t.to);
250
+ return n.push(w(e, C(e, t.from))), t.to > t.from ? n.push(w(e, C(e, Math.min(t.to, e.content.size + 1) - 1))) : t.from < e.content.size + 1 && n.push(w(e, C(e, Math.min(t.from + 1, e.content.size)))), n;
251
+ }
252
+ function O(e, t, n) {
253
+ let r = [];
254
+ if (e.docChanged) {
255
+ let t = o(e);
256
+ for (let e of t) r.push(...D(n.doc, e.newRange));
257
+ }
258
+ return e.selectionSet && (r.push(w(n.doc, C(n.doc, e.mapping.map(t.selection.anchor)))), r.push(w(n.doc, C(n.doc, n.selection.anchor)))), E(r);
259
+ }
260
+ function k(e, t, n) {
261
+ let r = Math.max(0, Math.min(e, n.content.size));
262
+ return {
263
+ from: r,
264
+ to: Math.max(r, Math.min(t, n.content.size))
265
+ };
266
+ }
267
+ function A({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i, doc: a, selection: o }) {
268
+ let s = e;
269
+ for (let e of t) {
270
+ let { from: t, to: c } = k(e.from, e.to, a), l = s.find(t, c).filter((e) => e.from >= t && e.to <= c);
271
+ l.length && (s = s.remove(l));
272
+ let u = x({
273
+ editor: n,
274
+ options: r,
275
+ dataAttribute: i,
276
+ doc: a,
277
+ selection: o,
278
+ from: t,
279
+ to: c
280
+ });
281
+ u.length && (s = s.add(a, u));
282
+ }
283
+ return s;
284
+ }
285
+ function j({ editor: e, options: t, dataAttribute: n }) {
286
+ return {
287
+ init(i, a) {
288
+ return S({
289
+ editor: e,
290
+ options: t,
291
+ dataAttribute: n,
292
+ doc: a.doc,
293
+ selection: a.selection
294
+ }) ?? r.empty;
295
+ },
296
+ apply(r, i, a, o) {
297
+ return !r.docChanged && !r.selectionSet ? i : A({
298
+ decorations: i.map(r.mapping, r.doc),
299
+ ranges: O(r, a, o),
300
+ editor: e,
301
+ options: t,
302
+ dataAttribute: n,
303
+ doc: o.doc,
304
+ selection: o.selection
305
+ });
306
+ }
307
+ };
308
+ }
309
+ function M(e) {
310
+ return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
311
+ }
312
+ function N({ editor: t, options: n }) {
313
+ let i = n.dataAttribute ? `data-${M(n.dataAttribute)}` : `data-${_}`, a = n.showOnlyCurrent && !n.includeChildren;
314
+ return new e({
315
+ key: v,
316
+ ...a ? {} : { state: j({
317
+ editor: t,
318
+ options: n,
319
+ dataAttribute: i
320
+ }) },
321
+ props: { decorations: a ? ({ doc: e, selection: r }) => S({
322
+ editor: t,
323
+ options: n,
324
+ dataAttribute: i,
325
+ doc: e,
326
+ selection: r
327
+ }) : (e) => n.showOnlyWhenEditable && !t.isEditable ? r.empty : v.getState(e) ?? r.empty }
328
+ });
329
+ }
330
+ var P = i.create({
331
+ name: "placeholder",
332
+ addOptions() {
333
+ return {
334
+ emptyEditorClass: "is-editor-empty",
335
+ emptyNodeClass: "is-empty",
336
+ dataAttribute: _,
337
+ placeholder: "Write something …",
338
+ showOnlyWhenEditable: !0,
339
+ showOnlyCurrent: !0,
340
+ includeChildren: !1
341
+ };
342
+ },
343
+ addProseMirrorPlugins() {
344
+ return [N({
345
+ editor: this.editor,
346
+ options: this.options
347
+ })];
348
+ }
349
+ });
350
+ function F(e, t) {
351
+ return !e.selection.empty && !l(e.selection) && t.isEditable;
352
+ }
353
+ function I(e, t) {
354
+ return F(e, t) && !t.isFocused && !t.view.dragging;
355
+ }
356
+ function L() {
357
+ var e;
358
+ (e = window.getSelection()) == null || e.removeAllRanges();
359
+ }
360
+ function R(e) {
361
+ e.focus();
362
+ }
363
+ i.create({
364
+ name: "selection",
365
+ addOptions() {
366
+ return { className: "selection" };
367
+ },
368
+ addProseMirrorPlugins() {
369
+ let { editor: i, options: a } = this;
370
+ return [new e({
371
+ key: new t("selection"),
372
+ props: {
373
+ decorations(e) {
374
+ return I(e, i) ? r.create(e.doc, [n.inline(e.selection.from, e.selection.to, { class: a.className })]) : null;
375
+ },
376
+ handleDOMEvents: {
377
+ blur(e) {
378
+ return F(e.state, i) && L(), !1;
379
+ },
380
+ focus(e) {
381
+ return F(e.state, i) && requestAnimationFrame(() => {
382
+ !i.isDestroyed && e.hasFocus() && R(e);
383
+ }), !1;
384
+ }
385
+ }
386
+ }
387
+ })];
388
+ }
389
+ });
390
+ var z = "skipTrailingNode";
391
+ function B({ types: e, node: t }) {
392
+ return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
393
+ }
394
+ var V = i.create({
395
+ name: "trailingNode",
396
+ addOptions() {
397
+ return {
398
+ node: void 0,
399
+ notAfter: []
400
+ };
401
+ },
402
+ addProseMirrorPlugins() {
403
+ let n = new t(this.name), r = this.options.node || this.editor.schema.topNodeType.contentMatch.defaultType?.name || "paragraph", i = Object.entries(this.editor.schema.nodes).map(([, e]) => e).filter((e) => (this.options.notAfter || []).concat(r).includes(e.name));
404
+ return [new e({
405
+ key: n,
406
+ appendTransaction: (e, t, i) => {
407
+ let { doc: a, tr: o, schema: s } = i, c = n.getState(i), l = a.content.size, u = s.nodes[r];
408
+ if (!e.some((e) => e.getMeta("skipTrailingNode")) && c) return o.insert(l, u.create());
409
+ },
410
+ state: {
411
+ init: (e, t) => {
412
+ let n = t.tr.doc.lastChild;
413
+ return !B({
414
+ node: n,
415
+ types: i
416
+ });
417
+ },
418
+ apply: (e, t) => {
419
+ if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
420
+ let n = e.doc.lastChild;
421
+ return !B({
422
+ node: n,
423
+ types: i
424
+ });
425
+ }
426
+ }
427
+ })];
428
+ }
429
+ }), H = i.create({
430
+ name: "undoRedo",
431
+ addOptions() {
432
+ return {
433
+ depth: 100,
434
+ newGroupDelay: 500
435
+ };
436
+ },
437
+ addCommands() {
438
+ return {
439
+ undo: () => ({ state: e, dispatch: t }) => m(e, t),
440
+ redo: () => ({ state: e, dispatch: t }) => p(e, t)
441
+ };
442
+ },
443
+ addProseMirrorPlugins() {
444
+ return [f(this.options)];
445
+ },
446
+ addKeyboardShortcuts() {
447
+ return {
448
+ "Mod-z": () => this.editor.commands.undo(),
449
+ "Shift-Mod-z": () => this.editor.commands.redo(),
450
+ "Mod-y": () => this.editor.commands.redo(),
451
+ "Mod-я": () => this.editor.commands.undo(),
452
+ "Shift-Mod-я": () => this.editor.commands.redo()
453
+ };
454
+ }
455
+ });
456
+ //#endregion
457
+ export { _ as DEFAULT_DATA_ATTRIBUTE, h as Dropcursor, g as Gapcursor, v as PLUGIN_KEY, P as Placeholder, V as TrailingNode, H as UndoRedo, M as preparePlaceholderAttribute, z as skipTrailingNodeMeta };
458
+
459
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Extension2","Extension3","Plugin2","PluginKey2","Extension4","PluginKey3","Decoration2","DecorationSet2","DecorationSet3","Plugin3","DecorationSet4","Extension5","Extension6","Plugin4","PluginKey4","DecorationSet5","Decoration3","Extension7","PluginKey5","Plugin5","Extension8"],"sources":["../../../../../node_modules/@tiptap/extensions/dist/index.js"],"sourcesContent":["// src/character-count/character-count.ts\nimport { Extension } from \"@tiptap/core\";\nimport { Plugin, PluginKey } from \"@tiptap/pm/state\";\nvar CharacterCount = Extension.create({\n name: \"characterCount\",\n addOptions() {\n return {\n limit: null,\n autoTrim: true,\n mode: \"textSize\",\n textCounter: (text) => text.length,\n wordCounter: (text) => text.split(\" \").filter((word) => word !== \"\").length\n };\n },\n addStorage() {\n return {\n characters: () => 0,\n words: () => 0\n };\n },\n onBeforeCreate() {\n this.storage.characters = (options) => {\n const node = (options == null ? void 0 : options.node) || this.editor.state.doc;\n const mode = (options == null ? void 0 : options.mode) || this.options.mode;\n if (mode === \"textSize\") {\n const text = node.textBetween(0, node.content.size, void 0, \" \");\n return this.options.textCounter(text);\n }\n return node.nodeSize;\n };\n this.storage.words = (options) => {\n const node = (options == null ? void 0 : options.node) || this.editor.state.doc;\n const text = node.textBetween(0, node.content.size, \" \", \" \");\n return this.options.wordCounter(text);\n };\n },\n addProseMirrorPlugins() {\n let initialEvaluationDone = false;\n return [\n new Plugin({\n key: new PluginKey(\"characterCount\"),\n appendTransaction: (transactions, oldState, newState) => {\n if (initialEvaluationDone) {\n return;\n }\n const limit = this.options.limit;\n const autoTrim = this.options.autoTrim;\n if (limit === null || limit === void 0 || limit === 0 || autoTrim === false) {\n initialEvaluationDone = true;\n return;\n }\n const initialContentSize = this.storage.characters({ node: newState.doc });\n if (initialContentSize > limit) {\n const over = initialContentSize - limit;\n const from = 0;\n const to = over;\n console.warn(\n `[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`\n );\n const tr = newState.tr.deleteRange(from, to);\n initialEvaluationDone = true;\n return tr;\n }\n initialEvaluationDone = true;\n },\n filterTransaction: (transaction, state) => {\n const limit = this.options.limit;\n if (!transaction.docChanged || limit === 0 || limit === null || limit === void 0) {\n return true;\n }\n const oldSize = this.storage.characters({ node: state.doc });\n const newSize = this.storage.characters({ node: transaction.doc });\n if (newSize <= limit) {\n return true;\n }\n if (oldSize > limit && newSize > limit && newSize <= oldSize) {\n return true;\n }\n if (oldSize > limit && newSize > limit && newSize > oldSize) {\n return false;\n }\n const isPaste = transaction.getMeta(\"paste\");\n if (!isPaste) {\n return false;\n }\n const pos = transaction.selection.$head.pos;\n const over = newSize - limit;\n const from = pos - over;\n const to = pos;\n transaction.deleteRange(from, to);\n const updatedSize = this.storage.characters({ node: transaction.doc });\n if (updatedSize > limit) {\n return false;\n }\n return true;\n }\n })\n ];\n }\n});\n\n// src/drop-cursor/drop-cursor.ts\nimport { Extension as Extension2 } from \"@tiptap/core\";\nimport { dropCursor } from \"@tiptap/pm/dropcursor\";\nvar Dropcursor = Extension2.create({\n name: \"dropCursor\",\n addOptions() {\n return {\n color: \"currentColor\",\n width: 1,\n class: void 0\n };\n },\n addProseMirrorPlugins() {\n return [dropCursor(this.options)];\n }\n});\n\n// src/focus/focus.ts\nimport { Extension as Extension3 } from \"@tiptap/core\";\nimport { Plugin as Plugin2, PluginKey as PluginKey2 } from \"@tiptap/pm/state\";\nimport { Decoration, DecorationSet } from \"@tiptap/pm/view\";\nvar Focus = Extension3.create({\n name: \"focus\",\n addOptions() {\n return {\n className: \"has-focus\",\n mode: \"all\"\n };\n },\n addProseMirrorPlugins() {\n return [\n new Plugin2({\n key: new PluginKey2(\"focus\"),\n props: {\n decorations: ({ doc, selection }) => {\n const { isEditable, isFocused } = this.editor;\n const { anchor } = selection;\n const decorations = [];\n if (!isEditable || !isFocused) {\n return DecorationSet.create(doc, []);\n }\n let maxLevels = 0;\n if (this.options.mode === \"deepest\") {\n doc.descendants((node, pos) => {\n if (node.isText) {\n return;\n }\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1;\n if (!isCurrent) {\n return false;\n }\n maxLevels += 1;\n });\n }\n let currentLevel = 0;\n doc.descendants((node, pos) => {\n if (node.isText) {\n return false;\n }\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1;\n if (!isCurrent) {\n return false;\n }\n currentLevel += 1;\n const outOfScope = this.options.mode === \"deepest\" && maxLevels - currentLevel > 0 || this.options.mode === \"shallowest\" && currentLevel > 1;\n if (outOfScope) {\n return this.options.mode === \"deepest\";\n }\n decorations.push(\n Decoration.node(pos, pos + node.nodeSize, {\n class: this.options.className\n })\n );\n });\n return DecorationSet.create(doc, decorations);\n }\n }\n })\n ];\n }\n});\n\n// src/gap-cursor/gap-cursor.ts\nimport { callOrReturn, Extension as Extension4, getExtensionField } from \"@tiptap/core\";\nimport { gapCursor } from \"@tiptap/pm/gapcursor\";\nvar Gapcursor = Extension4.create({\n name: \"gapCursor\",\n addProseMirrorPlugins() {\n return [gapCursor()];\n },\n extendNodeSchema(extension) {\n var _a;\n const context = {\n name: extension.name,\n options: extension.options,\n storage: extension.storage\n };\n return {\n allowGapCursor: (_a = callOrReturn(getExtensionField(extension, \"allowGapCursor\", context))) != null ? _a : null\n };\n }\n});\n\n// src/placeholder/constants.ts\nimport { PluginKey as PluginKey3 } from \"@tiptap/pm/state\";\nvar DEFAULT_DATA_ATTRIBUTE = \"placeholder\";\nvar PLUGIN_KEY = new PluginKey3(\"tiptap__placeholder\");\n\n// src/placeholder/placeholder.ts\nimport { Extension as Extension5 } from \"@tiptap/core\";\n\n// src/placeholder/plugins/PlaceholderPlugin.ts\nimport { Plugin as Plugin3 } from \"@tiptap/pm/state\";\nimport { DecorationSet as DecorationSet4 } from \"@tiptap/pm/view\";\n\n// src/placeholder/utils/buildPlaceholderDecorations.ts\nimport { isNodeEmpty } from \"@tiptap/core\";\nimport { DecorationSet as DecorationSet2 } from \"@tiptap/pm/view\";\n\n// src/placeholder/utils/createPlaceholderDecoration.ts\nimport { Decoration as Decoration2 } from \"@tiptap/pm/view\";\nfunction createPlaceholderDecoration(options) {\n const {\n editor,\n placeholder,\n dataAttribute,\n pos,\n node,\n isEmptyDoc,\n hasAnchor,\n classes: { emptyNode, emptyEditor }\n } = options;\n const classes = [emptyNode];\n if (isEmptyDoc) {\n classes.push(emptyEditor);\n }\n return Decoration2.node(pos, pos + node.nodeSize, {\n class: classes.join(\" \"),\n [dataAttribute]: typeof placeholder === \"function\" ? placeholder({\n editor,\n node,\n pos,\n hasAnchor\n }) : placeholder\n });\n}\n\n// src/placeholder/utils/buildPlaceholderDecorations.ts\nfunction resolveEmptyNodeClass(emptyNodeClass, props) {\n return typeof emptyNodeClass === \"function\" ? emptyNodeClass(props) : emptyNodeClass;\n}\nfunction scanRangeForDecorations({\n editor,\n options,\n dataAttribute,\n doc,\n selection,\n from,\n to\n}) {\n const { anchor } = selection;\n const decorations = [];\n const isEmptyDoc = editor.isEmpty;\n doc.nodesBetween(from, to, (node, pos) => {\n const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;\n const isEmpty = !node.isLeaf && isNodeEmpty(node);\n if (!node.type.isTextblock) {\n return options.includeChildren;\n }\n if ((hasAnchor || !options.showOnlyCurrent) && isEmpty) {\n decorations.push(\n createPlaceholderDecoration({\n editor,\n isEmptyDoc,\n dataAttribute,\n hasAnchor,\n placeholder: options.placeholder,\n classes: {\n emptyEditor: options.emptyEditorClass,\n emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n editor,\n node,\n pos,\n hasAnchor\n })\n },\n node,\n pos\n })\n );\n }\n return options.includeChildren;\n });\n return decorations;\n}\nfunction buildPlaceholderDecorations({\n editor,\n options,\n dataAttribute,\n doc,\n selection\n}) {\n const active = editor.isEditable || !options.showOnlyWhenEditable;\n if (!active) {\n return null;\n }\n const { anchor } = selection;\n const decorations = [];\n const isEmptyDoc = editor.isEmpty;\n const useResolvedPath = options.showOnlyCurrent && !options.includeChildren;\n if (useResolvedPath) {\n const resolved = doc.resolve(anchor);\n const node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter;\n const nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor;\n if (node && node.type.isTextblock && isNodeEmpty(node)) {\n const hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize;\n decorations.push(\n createPlaceholderDecoration({\n editor,\n isEmptyDoc,\n dataAttribute,\n hasAnchor,\n placeholder: options.placeholder,\n classes: {\n emptyEditor: options.emptyEditorClass,\n emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n editor,\n node,\n pos: nodeStart,\n hasAnchor\n })\n },\n node,\n pos: nodeStart\n })\n );\n }\n } else {\n decorations.push(\n ...scanRangeForDecorations({\n editor,\n options,\n dataAttribute,\n doc,\n selection,\n from: 0,\n to: doc.content.size\n })\n );\n }\n return DecorationSet2.create(doc, decorations);\n}\n\n// src/placeholder/utils/placeholderStateField.ts\nimport { getChangedRanges } from \"@tiptap/core\";\nimport { DecorationSet as DecorationSet3 } from \"@tiptap/pm/view\";\n\n// src/placeholder/utils/resolveTopLevelRange.ts\nfunction resolveTopLevelRange(doc, pos) {\n var _a;\n const resolved = doc.resolve(pos);\n if (resolved.depth === 0) {\n const node2 = (_a = resolved.nodeAfter) != null ? _a : resolved.nodeBefore;\n if (!node2) {\n return { from: pos, to: pos };\n }\n const nodePos = resolved.nodeAfter ? pos : pos - node2.nodeSize;\n return { from: nodePos, to: nodePos + node2.nodeSize };\n }\n const topLevelPos = resolved.before(1);\n const node = resolved.node(1);\n return { from: topLevelPos, to: topLevelPos + node.nodeSize };\n}\nfunction toContentRelativeRange(doc, range) {\n return {\n from: Math.max(0, range.from - 1),\n to: Math.min(doc.content.size, range.to - 1)\n };\n}\nfunction getTopLevelBlocksInRange(doc, from, to) {\n const ranges = [];\n doc.forEach((node, offset) => {\n const nodeStart = offset;\n const nodeEnd = nodeStart + node.nodeSize;\n const absNodeStart = nodeStart + 1;\n const absNodeEnd = nodeEnd + 1;\n if (absNodeStart < to && absNodeEnd > from) {\n ranges.push({ from: nodeStart, to: nodeEnd });\n }\n });\n return ranges;\n}\nfunction mergeRanges(ranges) {\n if (ranges.length === 0) {\n return [];\n }\n const sorted = [...ranges].sort((a, b) => a.from - b.from);\n const merged = [{ ...sorted[0] }];\n for (let i = 1; i < sorted.length; i += 1) {\n const last = merged[merged.length - 1];\n const current = sorted[i];\n if (current.from <= last.to) {\n last.to = Math.max(last.to, current.to);\n } else {\n merged.push({ ...current });\n }\n }\n return merged;\n}\n\n// src/placeholder/utils/placeholderStateField.ts\nfunction collectBlocksForChange(doc, change) {\n const ranges = getTopLevelBlocksInRange(doc, change.from, change.to);\n ranges.push(toContentRelativeRange(doc, resolveTopLevelRange(doc, change.from)));\n if (change.to > change.from) {\n ranges.push(\n toContentRelativeRange(\n doc,\n resolveTopLevelRange(doc, Math.min(change.to, doc.content.size + 1) - 1)\n )\n );\n } else if (change.from < doc.content.size + 1) {\n ranges.push(\n toContentRelativeRange(\n doc,\n resolveTopLevelRange(doc, Math.min(change.from + 1, doc.content.size))\n )\n );\n }\n return ranges;\n}\nfunction collectRescanRanges(tr, oldState, newState) {\n const ranges = [];\n if (tr.docChanged) {\n const changes = getChangedRanges(tr);\n for (const change of changes) {\n ranges.push(...collectBlocksForChange(newState.doc, change.newRange));\n }\n }\n if (tr.selectionSet) {\n ranges.push(\n toContentRelativeRange(\n newState.doc,\n resolveTopLevelRange(newState.doc, tr.mapping.map(oldState.selection.anchor))\n )\n );\n ranges.push(\n toContentRelativeRange(\n newState.doc,\n resolveTopLevelRange(newState.doc, newState.selection.anchor)\n )\n );\n }\n return mergeRanges(ranges);\n}\nfunction clampRange(from, to, doc) {\n const clampedFrom = Math.max(0, Math.min(from, doc.content.size));\n const clampedTo = Math.max(clampedFrom, Math.min(to, doc.content.size));\n return { from: clampedFrom, to: clampedTo };\n}\nfunction updateDecorationsInRanges({\n decorations,\n ranges,\n editor,\n options,\n dataAttribute,\n doc,\n selection\n}) {\n let next = decorations;\n for (const range of ranges) {\n const { from, to } = clampRange(range.from, range.to, doc);\n const existing = next.find(from, to).filter((decoration) => decoration.from >= from && decoration.to <= to);\n if (existing.length) {\n next = next.remove(existing);\n }\n const newDecos = scanRangeForDecorations({\n editor,\n options,\n dataAttribute,\n doc,\n selection,\n from,\n to\n });\n if (newDecos.length) {\n next = next.add(doc, newDecos);\n }\n }\n return next;\n}\nfunction createPlaceholderStateField({\n editor,\n options,\n dataAttribute\n}) {\n return {\n init(_config, state) {\n const decorations = buildPlaceholderDecorations({\n editor,\n options,\n dataAttribute,\n doc: state.doc,\n selection: state.selection\n });\n return decorations != null ? decorations : DecorationSet3.empty;\n },\n apply(tr, prev, oldState, newState) {\n if (!tr.docChanged && !tr.selectionSet) {\n return prev;\n }\n const mapped = prev.map(tr.mapping, tr.doc);\n const ranges = collectRescanRanges(tr, oldState, newState);\n return updateDecorationsInRanges({\n decorations: mapped,\n ranges,\n editor,\n options,\n dataAttribute,\n doc: newState.doc,\n selection: newState.selection\n });\n }\n };\n}\n\n// src/placeholder/utils/preparePlaceholderAttribute.ts\nfunction preparePlaceholderAttribute(attr) {\n return attr.replace(/\\s+/g, \"-\").replace(/[^a-zA-Z0-9-]/g, \"\").replace(/^[0-9-]+/, \"\").replace(/^-+/, \"\").toLowerCase();\n}\n\n// src/placeholder/plugins/PlaceholderPlugin.ts\nfunction createPlaceholderPlugin({ editor, options }) {\n const dataAttribute = options.dataAttribute ? `data-${preparePlaceholderAttribute(options.dataAttribute)}` : `data-${DEFAULT_DATA_ATTRIBUTE}`;\n const useResolvedPath = options.showOnlyCurrent && !options.includeChildren;\n return new Plugin3({\n key: PLUGIN_KEY,\n ...useResolvedPath ? {} : {\n state: createPlaceholderStateField({ editor, options, dataAttribute })\n },\n props: {\n decorations: useResolvedPath ? ({ doc, selection }) => buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }) : (state) => {\n var _a;\n if (options.showOnlyWhenEditable && !editor.isEditable) {\n return DecorationSet4.empty;\n }\n return (_a = PLUGIN_KEY.getState(state)) != null ? _a : DecorationSet4.empty;\n }\n }\n });\n}\n\n// src/placeholder/placeholder.ts\nvar Placeholder = Extension5.create({\n name: \"placeholder\",\n addOptions() {\n return {\n emptyEditorClass: \"is-editor-empty\",\n emptyNodeClass: \"is-empty\",\n dataAttribute: DEFAULT_DATA_ATTRIBUTE,\n placeholder: \"Write something \\u2026\",\n showOnlyWhenEditable: true,\n showOnlyCurrent: true,\n includeChildren: false\n };\n },\n addProseMirrorPlugins() {\n return [createPlaceholderPlugin({ editor: this.editor, options: this.options })];\n }\n});\n\n// src/selection/selection.ts\nimport { Extension as Extension6, isNodeSelection } from \"@tiptap/core\";\nimport { Plugin as Plugin4, PluginKey as PluginKey4 } from \"@tiptap/pm/state\";\nimport { Decoration as Decoration3, DecorationSet as DecorationSet5 } from \"@tiptap/pm/view\";\nfunction shouldSyncDomSelection(state, editor) {\n return !state.selection.empty && !isNodeSelection(state.selection) && editor.isEditable;\n}\nfunction shouldPreserveSelection(state, editor) {\n return shouldSyncDomSelection(state, editor) && !editor.isFocused && !editor.view.dragging;\n}\nfunction clearDomSelection() {\n var _a;\n (_a = window.getSelection()) == null ? void 0 : _a.removeAllRanges();\n}\nfunction restoreDomSelection(view) {\n view.focus();\n}\nvar Selection = Extension6.create({\n name: \"selection\",\n addOptions() {\n return {\n className: \"selection\"\n };\n },\n addProseMirrorPlugins() {\n const { editor, options } = this;\n return [\n new Plugin4({\n key: new PluginKey4(\"selection\"),\n props: {\n decorations(state) {\n if (!shouldPreserveSelection(state, editor)) {\n return null;\n }\n return DecorationSet5.create(state.doc, [\n Decoration3.inline(state.selection.from, state.selection.to, {\n class: options.className\n })\n ]);\n },\n handleDOMEvents: {\n blur(view) {\n if (!shouldSyncDomSelection(view.state, editor)) {\n return false;\n }\n clearDomSelection();\n return false;\n },\n focus(view) {\n if (!shouldSyncDomSelection(view.state, editor)) {\n return false;\n }\n requestAnimationFrame(() => {\n if (!editor.isDestroyed && view.hasFocus()) {\n restoreDomSelection(view);\n }\n });\n return false;\n }\n }\n }\n })\n ];\n }\n});\n\n// src/trailing-node/trailing-node.ts\nimport { Extension as Extension7 } from \"@tiptap/core\";\nimport { Plugin as Plugin5, PluginKey as PluginKey5 } from \"@tiptap/pm/state\";\nvar skipTrailingNodeMeta = \"skipTrailingNode\";\nfunction nodeEqualsType({\n types,\n node\n}) {\n return node && Array.isArray(types) && types.includes(node.type) || (node == null ? void 0 : node.type) === types;\n}\nvar TrailingNode = Extension7.create({\n name: \"trailingNode\",\n addOptions() {\n return {\n node: void 0,\n notAfter: []\n };\n },\n addProseMirrorPlugins() {\n var _a;\n const plugin = new PluginKey5(this.name);\n const defaultNode = this.options.node || ((_a = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : _a.name) || \"paragraph\";\n const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name));\n return [\n new Plugin5({\n key: plugin,\n appendTransaction: (transactions, __, state) => {\n const { doc, tr, schema } = state;\n const shouldInsertNodeAtEnd = plugin.getState(state);\n const endPosition = doc.content.size;\n const type = schema.nodes[defaultNode];\n if (transactions.some((transaction) => transaction.getMeta(skipTrailingNodeMeta))) {\n return;\n }\n if (!shouldInsertNodeAtEnd) {\n return;\n }\n return tr.insert(endPosition, type.create());\n },\n state: {\n init: (_, state) => {\n const lastNode = state.tr.doc.lastChild;\n return !nodeEqualsType({ node: lastNode, types: disabledNodes });\n },\n apply: (tr, value) => {\n if (!tr.docChanged) {\n return value;\n }\n if (tr.getMeta(\"__uniqueIDTransaction\")) {\n return value;\n }\n const lastNode = tr.doc.lastChild;\n return !nodeEqualsType({ node: lastNode, types: disabledNodes });\n }\n }\n })\n ];\n }\n});\n\n// src/undo-redo/undo-redo.ts\nimport { Extension as Extension8 } from \"@tiptap/core\";\nimport { history, redo, undo } from \"@tiptap/pm/history\";\nvar UndoRedo = Extension8.create({\n name: \"undoRedo\",\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500\n };\n },\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch);\n },\n redo: () => ({ state, dispatch }) => {\n return redo(state, dispatch);\n }\n };\n },\n addProseMirrorPlugins() {\n return [history(this.options)];\n },\n addKeyboardShortcuts() {\n return {\n \"Mod-z\": () => this.editor.commands.undo(),\n \"Shift-Mod-z\": () => this.editor.commands.redo(),\n \"Mod-y\": () => this.editor.commands.redo(),\n // Russian keyboard layouts\n \"Mod-\\u044F\": () => this.editor.commands.undo(),\n \"Shift-Mod-\\u044F\": () => this.editor.commands.redo()\n };\n }\n});\nexport {\n CharacterCount,\n DEFAULT_DATA_ATTRIBUTE,\n Dropcursor,\n Focus,\n Gapcursor,\n PLUGIN_KEY,\n Placeholder,\n Selection,\n TrailingNode,\n UndoRedo,\n preparePlaceholderAttribute,\n skipTrailingNodeMeta\n};\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;AAGqB,EAAU,OAAO;CACpC,MAAM;CACN,aAAa;EACX,OAAO;GACL,OAAO;GACP,UAAU;GACV,MAAM;GACN,cAAc,MAAS,EAAK;GAC5B,cAAc,MAAS,EAAK,MAAM,GAAG,CAAC,CAAC,QAAQ,MAAS,MAAS,EAAE,CAAC,CAAC;EACvE;CACF;CACA,aAAa;EACX,OAAO;GACL,kBA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