@richhtmleditor/math 1.1.1 → 1.1.3
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.
- package/README.md +87 -87
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -37
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
# @richhtmleditor/math
|
|
2
|
-
|
|
3
|
-
LaTeX and MathML equation plugin for Rich HTML Editor. Adds an **Insert Math** toolbar tool with a formula editor and live preview rendering for inline and display math blocks. Built on [`@richhtmleditor/core`](https://www.npmjs.com/package/@richhtmleditor/core).
|
|
4
|
-
|
|
5
|
-
**Current release: 1.1.
|
|
6
|
-
|
|
7
|
-
**Repository:** [github.com/rajkishorsahu89/richhtmleditor](https://github.com/rajkishorsahu89/richhtmleditor)
|
|
8
|
-
|
|
9
|
-
**Demo:** [richhtmleditor.vercel.app](https://richhtmleditor.vercel.app/) — [demo](https://richhtmleditor.vercel.app/demo) · [guide](https://richhtmleditor.vercel.app/guide) · [API](https://richhtmleditor.vercel.app/api)
|
|
10
|
-
|
|
11
|
-
### What's in 1.1.
|
|
12
|
-
|
|
13
|
-
- **`createMathPlugin`** — registers the `insertMath` toolbar tool
|
|
14
|
-
- **LaTeX input** — type LaTeX expressions with live rendered preview
|
|
15
|
-
- **MathML support** — renders MathML for standards-compliant output
|
|
16
|
-
- **Inline & display modes** — insert equations inline or as centered display blocks
|
|
17
|
-
- **Dark mode** — math editor respects editor dark mode tokens
|
|
18
|
-
|
|
19
|
-
> Community feature — no enterprise licence required.
|
|
20
|
-
|
|
21
|
-
**Keywords:** `richhtmleditor` `math` `latex` `mathml` `equations` `wysiwyg`
|
|
22
|
-
|
|
23
|
-
## Install
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npm install @richhtmleditor/math
|
|
27
|
-
# Requires @richhtmleditor/core (via framework wrapper or direct install).
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Usage
|
|
31
|
-
|
|
32
|
-
```ts
|
|
33
|
-
import { createEditor } from "@richhtmleditor/core";
|
|
34
|
-
import { createMathPlugin } from "@richhtmleditor/math";
|
|
35
|
-
|
|
36
|
-
const editor = createEditor({
|
|
37
|
-
element: host,
|
|
38
|
-
toolbar: { preset: "full" },
|
|
39
|
-
plugins: [createMathPlugin()]
|
|
40
|
-
});
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Angular
|
|
44
|
-
|
|
45
|
-
```ts
|
|
46
|
-
import { createMathPlugin } from "@richhtmleditor/math";
|
|
47
|
-
|
|
48
|
-
plugins = [createMathPlugin()];
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
```html
|
|
52
|
-
<richhtmleditor [plugins]="plugins" [toolbar]="{ preset: 'full' }" />
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### React
|
|
56
|
-
|
|
57
|
-
```tsx
|
|
58
|
-
import { RichHtmlEditor } from "@richhtmleditor/react";
|
|
59
|
-
import { createMathPlugin } from "@richhtmleditor/math";
|
|
60
|
-
|
|
61
|
-
const plugins = [createMathPlugin()];
|
|
62
|
-
|
|
63
|
-
<RichHtmlEditor toolbar={{ preset: "full" }} plugins={plugins} />
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## API
|
|
67
|
-
|
|
68
|
-
### `createMathPlugin(options?)`
|
|
69
|
-
|
|
70
|
-
Returns an `EditorPlugin` that registers the `insertMath` toolbar tool.
|
|
71
|
-
|
|
72
|
-
| Option | Type | Description |
|
|
73
|
-
| --- | --- | --- |
|
|
74
|
-
| `defaultMode` | `"inline" \| "display"` | Default math block mode (default: `"display"`). |
|
|
75
|
-
|
|
76
|
-
## Related packages
|
|
77
|
-
|
|
78
|
-
- [`@richhtmleditor/core`](https://www.npmjs.com/package/@richhtmleditor/core) — editor engine and plugins API.
|
|
79
|
-
- [`@richhtmleditor/themes`](https://www.npmjs.com/package/@richhtmleditor/themes) — shared CSS.
|
|
80
|
-
- [`@richhtmleditor/diagrams`](https://www.npmjs.com/package/@richhtmleditor/diagrams) — Mermaid diagrams plugin.
|
|
81
|
-
- [`@richhtmleditor/export`](https://www.npmjs.com/package/@richhtmleditor/export) — DOCX/PDF export plugin.
|
|
82
|
-
- [`@richhtmleditor/angular`](https://www.npmjs.com/package/@richhtmleditor/angular) — Angular wrapper.
|
|
83
|
-
- [`@richhtmleditor/react`](https://www.npmjs.com/package/@richhtmleditor/react) — React wrapper.
|
|
84
|
-
|
|
85
|
-
## License
|
|
86
|
-
|
|
87
|
-
[MIT](./LICENSE)
|
|
1
|
+
# @richhtmleditor/math
|
|
2
|
+
|
|
3
|
+
LaTeX and MathML equation plugin for Rich HTML Editor. Adds an **Insert Math** toolbar tool with a formula editor and live preview rendering for inline and display math blocks. Built on [`@richhtmleditor/core`](https://www.npmjs.com/package/@richhtmleditor/core).
|
|
4
|
+
|
|
5
|
+
**Current release: 1.1.3** — Depends on `@richhtmleditor/core` **^1.1.3**.
|
|
6
|
+
|
|
7
|
+
**Repository:** [github.com/rajkishorsahu89/richhtmleditor](https://github.com/rajkishorsahu89/richhtmleditor)
|
|
8
|
+
|
|
9
|
+
**Demo:** [richhtmleditor.vercel.app](https://richhtmleditor.vercel.app/) — [demo](https://richhtmleditor.vercel.app/demo) · [guide](https://richhtmleditor.vercel.app/guide) · [API](https://richhtmleditor.vercel.app/api)
|
|
10
|
+
|
|
11
|
+
### What's in 1.1.3
|
|
12
|
+
|
|
13
|
+
- **`createMathPlugin`** — registers the `insertMath` toolbar tool
|
|
14
|
+
- **LaTeX input** — type LaTeX expressions with live rendered preview
|
|
15
|
+
- **MathML support** — renders MathML for standards-compliant output
|
|
16
|
+
- **Inline & display modes** — insert equations inline or as centered display blocks
|
|
17
|
+
- **Dark mode** — math editor respects editor dark mode tokens
|
|
18
|
+
|
|
19
|
+
> Community feature — no enterprise licence required.
|
|
20
|
+
|
|
21
|
+
**Keywords:** `richhtmleditor` `math` `latex` `mathml` `equations` `wysiwyg`
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install @richhtmleditor/math
|
|
27
|
+
# Requires @richhtmleditor/core (via framework wrapper or direct install).
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { createEditor } from "@richhtmleditor/core";
|
|
34
|
+
import { createMathPlugin } from "@richhtmleditor/math";
|
|
35
|
+
|
|
36
|
+
const editor = createEditor({
|
|
37
|
+
element: host,
|
|
38
|
+
toolbar: { preset: "full" },
|
|
39
|
+
plugins: [createMathPlugin()]
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Angular
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import { createMathPlugin } from "@richhtmleditor/math";
|
|
47
|
+
|
|
48
|
+
plugins = [createMathPlugin()];
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<richhtmleditor [plugins]="plugins" [toolbar]="{ preset: 'full' }" />
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### React
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
import { RichHtmlEditor } from "@richhtmleditor/react";
|
|
59
|
+
import { createMathPlugin } from "@richhtmleditor/math";
|
|
60
|
+
|
|
61
|
+
const plugins = [createMathPlugin()];
|
|
62
|
+
|
|
63
|
+
<RichHtmlEditor toolbar={{ preset: "full" }} plugins={plugins} />
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## API
|
|
67
|
+
|
|
68
|
+
### `createMathPlugin(options?)`
|
|
69
|
+
|
|
70
|
+
Returns an `EditorPlugin` that registers the `insertMath` toolbar tool.
|
|
71
|
+
|
|
72
|
+
| Option | Type | Description |
|
|
73
|
+
| --- | --- | --- |
|
|
74
|
+
| `defaultMode` | `"inline" \| "display"` | Default math block mode (default: `"display"`). |
|
|
75
|
+
|
|
76
|
+
## Related packages
|
|
77
|
+
|
|
78
|
+
- [`@richhtmleditor/core`](https://www.npmjs.com/package/@richhtmleditor/core) — editor engine and plugins API.
|
|
79
|
+
- [`@richhtmleditor/themes`](https://www.npmjs.com/package/@richhtmleditor/themes) — shared CSS.
|
|
80
|
+
- [`@richhtmleditor/diagrams`](https://www.npmjs.com/package/@richhtmleditor/diagrams) — Mermaid diagrams plugin.
|
|
81
|
+
- [`@richhtmleditor/export`](https://www.npmjs.com/package/@richhtmleditor/export) — DOCX/PDF export plugin.
|
|
82
|
+
- [`@richhtmleditor/angular`](https://www.npmjs.com/package/@richhtmleditor/angular) — Angular wrapper.
|
|
83
|
+
- [`@richhtmleditor/react`](https://www.npmjs.com/package/@richhtmleditor/react) — React wrapper.
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
[MIT](./LICENSE)
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,YAAY,EAAyB,MAAM,sBAAsB,CAAC;AAEhG,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,KAAK,MAAM,CAAC;IAC7D,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAiGF;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,iBAAsB,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,YAAY,EAAyB,MAAM,sBAAsB,CAAC;AAEhG,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,KAAK,MAAM,CAAC;IAC7D,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAiGF;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,iBAAsB,GAAG,YAAY,CAkE9E;AAED,4FAA4F;AAC5F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,KAAK,MAAM,GAAG,MAAM,CASlH"}
|
package/dist/index.js
CHANGED
|
@@ -11,46 +11,45 @@ function buildPreviewHtml(latex, displayMode, renderer) {
|
|
|
11
11
|
return renderer(latex, displayMode);
|
|
12
12
|
}
|
|
13
13
|
catch (e) {
|
|
14
|
-
return `<span
|
|
14
|
+
return `<span class="${MATH_FIGURE_CLASS}__error">Render error: ${escapeHtml(String(e))}</span>`;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
const tag = displayMode ? "div" : "span";
|
|
18
|
-
return `<${tag} class="
|
|
18
|
+
return `<${tag} class="${MATH_FIGURE_CLASS}__fallback">${escapeHtml(latex)}</${tag}>`;
|
|
19
19
|
}
|
|
20
20
|
function buildFigureHtml(latex, displayMode, renderer) {
|
|
21
21
|
const preview = buildPreviewHtml(latex, displayMode, renderer);
|
|
22
22
|
const display = displayMode ? "block" : "inline";
|
|
23
23
|
return `<figure class="${MATH_FIGURE_CLASS} ${MATH_FIGURE_CLASS}--${display}" data-latex="${escapeHtml(latex)}" data-display="${display}" contenteditable="false">${preview}</figure>`;
|
|
24
24
|
}
|
|
25
|
-
function openMathModal(host, options, initialLatex, initialDisplay, onConfirm) {
|
|
25
|
+
function openMathModal(host, options, initialLatex, initialDisplay, confirmLabel, onConfirm) {
|
|
26
26
|
const backdrop = document.createElement("div");
|
|
27
27
|
backdrop.className = `${MODAL_CLASS}__backdrop`;
|
|
28
|
-
backdrop.style.cssText = "position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:9999;display:flex;align-items:center;justify-content:center;";
|
|
29
28
|
const panel = document.createElement("div");
|
|
30
29
|
panel.className = MODAL_CLASS;
|
|
31
30
|
panel.setAttribute("role", "dialog");
|
|
32
31
|
panel.setAttribute("aria-modal", "true");
|
|
33
|
-
panel.setAttribute("aria-label",
|
|
34
|
-
panel.style.cssText = "background:var(--de-toolbar-bg,#fff);border-radius:12px;padding:20px;min-width:380px;max-width:560px;width:90vw;box-shadow:0 16px 48px rgba(0,0,0,.2);display:flex;flex-direction:column;gap:12px;";
|
|
32
|
+
panel.setAttribute("aria-label", `${confirmLabel} equation`);
|
|
35
33
|
panel.innerHTML = `
|
|
36
|
-
<h3
|
|
37
|
-
<div
|
|
38
|
-
<label
|
|
34
|
+
<h3 class="${MODAL_CLASS}__title">${confirmLabel} equation</h3>
|
|
35
|
+
<div class="${MODAL_CLASS}__modes">
|
|
36
|
+
<label class="${MODAL_CLASS}__mode">
|
|
39
37
|
<input type="radio" name="de-math-mode" value="inline" ${initialDisplay === "inline" ? "checked" : ""}> Inline
|
|
40
38
|
</label>
|
|
41
|
-
<label
|
|
39
|
+
<label class="${MODAL_CLASS}__mode">
|
|
42
40
|
<input type="radio" name="de-math-mode" value="block" ${initialDisplay === "block" ? "checked" : ""}> Block (display)
|
|
43
41
|
</label>
|
|
44
42
|
</div>
|
|
45
|
-
<textarea class="${MODAL_CLASS}__input" rows="3" placeholder="${escapeHtml(options.placeholder ?? "x^2 + y^2 = z^2")}"
|
|
46
|
-
<div class="${MODAL_CLASS}__preview"
|
|
47
|
-
<div
|
|
48
|
-
<button type="button" class="${MODAL_CLASS}__cancel"
|
|
49
|
-
<button type="button" class="${MODAL_CLASS}__confirm"
|
|
43
|
+
<textarea class="${MODAL_CLASS}__input" rows="3" placeholder="${escapeHtml(options.placeholder ?? "x^2 + y^2 = z^2")}">${escapeHtml(initialLatex)}</textarea>
|
|
44
|
+
<div class="${MODAL_CLASS}__preview" aria-live="polite"></div>
|
|
45
|
+
<div class="${MODAL_CLASS}__actions">
|
|
46
|
+
<button type="button" class="${MODAL_CLASS}__cancel">Cancel</button>
|
|
47
|
+
<button type="button" class="${MODAL_CLASS}__confirm">${confirmLabel}</button>
|
|
50
48
|
</div>
|
|
51
49
|
`;
|
|
50
|
+
// Append to host so the modal inherits the editor's CSS custom properties (dark mode, etc.)
|
|
52
51
|
backdrop.appendChild(panel);
|
|
53
|
-
|
|
52
|
+
host.appendChild(backdrop);
|
|
54
53
|
const textarea = panel.querySelector(`.${MODAL_CLASS}__input`);
|
|
55
54
|
const preview = panel.querySelector(`.${MODAL_CLASS}__preview`);
|
|
56
55
|
const cancelBtn = panel.querySelector(`.${MODAL_CLASS}__cancel`);
|
|
@@ -105,11 +104,9 @@ export function createMathPlugin(options = {}) {
|
|
|
105
104
|
attach: (editor) => {
|
|
106
105
|
const host = editor.element;
|
|
107
106
|
const insertEquation = (latex, display) => {
|
|
108
|
-
|
|
109
|
-
const current = editor.getHTML();
|
|
110
|
-
editor.setContent(`${current}<p>${figHtml}</p>`);
|
|
107
|
+
editor.commands.insertRawHtmlBlock(buildFigureHtml(latex, display === "block", options.renderMath));
|
|
111
108
|
};
|
|
112
|
-
// Re-render all existing math figures when the content changes
|
|
109
|
+
// Re-render all existing math figures when the content changes
|
|
113
110
|
const rerenderAll = () => {
|
|
114
111
|
if (!options.renderMath)
|
|
115
112
|
return;
|
|
@@ -121,37 +118,28 @@ export function createMathPlugin(options = {}) {
|
|
|
121
118
|
fig.innerHTML = buildPreviewHtml(latex, displayMode, options.renderMath);
|
|
122
119
|
}
|
|
123
120
|
};
|
|
124
|
-
// Click on a figure to edit it
|
|
121
|
+
// Click on a figure to edit it — find its block index via data-de-block
|
|
125
122
|
const onFigureClick = (e) => {
|
|
126
123
|
const fig = e.target.closest(`figure.${MATH_FIGURE_CLASS}`);
|
|
127
124
|
if (!fig)
|
|
128
125
|
return;
|
|
129
126
|
e.preventDefault();
|
|
127
|
+
const blockEl = fig.closest("[data-de-block]");
|
|
128
|
+
const blockIndex = blockEl ? Number(blockEl.dataset.deBlock) : -1;
|
|
130
129
|
const latex = fig.dataset.latex ?? "";
|
|
131
130
|
const display = fig.dataset.display === "block" ? "block" : "inline";
|
|
132
|
-
openMathModal(host, options, latex, display, (newLatex, newDisplay) => {
|
|
133
|
-
|
|
131
|
+
openMathModal(host, options, latex, display, "Update", (newLatex, newDisplay) => {
|
|
132
|
+
if (blockIndex >= 0) {
|
|
133
|
+
editor.commands.replaceRawHtmlBlock(blockIndex, buildFigureHtml(newLatex, newDisplay === "block", options.renderMath));
|
|
134
|
+
}
|
|
134
135
|
});
|
|
135
136
|
};
|
|
136
137
|
// Patch insertMath tool onClick
|
|
137
138
|
tool.onClick = () => {
|
|
138
|
-
openMathModal(host, options, "", "block", insertEquation);
|
|
139
|
+
openMathModal(host, options, "", "block", "Insert", insertEquation);
|
|
139
140
|
};
|
|
140
141
|
const offChange = editor.on("change", rerenderAll);
|
|
141
142
|
host.addEventListener("click", onFigureClick);
|
|
142
|
-
// Inject CSS
|
|
143
|
-
const styleId = "de-math-styles";
|
|
144
|
-
if (!document.getElementById(styleId)) {
|
|
145
|
-
const style = document.createElement("style");
|
|
146
|
-
style.id = styleId;
|
|
147
|
-
style.textContent = `
|
|
148
|
-
figure.de-math{display:inline-block;vertical-align:middle;margin:.25em 2px;}
|
|
149
|
-
figure.de-math--block{display:block;text-align:center;margin:1rem auto;}
|
|
150
|
-
figure.de-math[contenteditable="false"]{cursor:pointer;outline:none;}
|
|
151
|
-
figure.de-math[contenteditable="false"]:hover{outline:2px solid var(--de-primary,#2563eb);border-radius:4px;}
|
|
152
|
-
`.trim();
|
|
153
|
-
document.head.appendChild(style);
|
|
154
|
-
}
|
|
155
143
|
return () => {
|
|
156
144
|
offChange();
|
|
157
145
|
host.removeEventListener("click", onFigureClick);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkBA,MAAM,iBAAiB,GAAG,SAAS,CAAC;AACpC,MAAM,WAAW,GAAG,eAAe,CAAC;AAEpC,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACtG,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAE,WAAoB,EAAE,QAA4C;IACzG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IAC7B,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,CAAC;YAAC,OAAO,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAAC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkBA,MAAM,iBAAiB,GAAG,SAAS,CAAC;AACpC,MAAM,WAAW,GAAG,eAAe,CAAC;AAEpC,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACtG,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAE,WAAoB,EAAE,QAA4C;IACzG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE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