@formulaxjs/renderer-kity 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +35 -0
- package/README.md +46 -0
- package/dist/KF_AMS_BB-5QF7FUSO.woff +0 -0
- package/dist/KF_AMS_CAL-NXRNLAZN.woff +0 -0
- package/dist/KF_AMS_FRAK-CO33WWN4.woff +0 -0
- package/dist/KF_AMS_MAIN-25QJVAWY.woff +0 -0
- package/dist/KF_AMS_ROMAN-243BR7HH.woff +0 -0
- package/dist/btn-5DANP6JY.png +0 -0
- package/dist/editor-JT5KLVXX.css +3 -0
- package/dist/index.cjs +188 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.global.js +24351 -0
- package/dist/index.global.js.map +1 -0
- package/dist/index.js +162 -0
- package/dist/index.js.map +1 -0
- package/dist/other-OMWJFGL5.png +0 -0
- package/package.json +41 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 FormulaX Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Legacy KityFormula Code
|
|
26
|
+
|
|
27
|
+
Portions of FormulaX, specifically within the `@formulaxjs/kity-runtime` package,
|
|
28
|
+
contain code adapted from [KityFormula](https://github.com/BaiduFE/kityformula)
|
|
29
|
+
by Baidu FEX Team, originally released under the MIT License.
|
|
30
|
+
|
|
31
|
+
KityFormula-related code in FormulaX is retained under the same MIT License
|
|
32
|
+
and is subject to the copyright notice above.
|
|
33
|
+
|
|
34
|
+
For details on the original KityFormula project, see:
|
|
35
|
+
https://github.com/BaiduFE/kityformula
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @formulaxjs/renderer-kity
|
|
2
|
+
|
|
3
|
+
Kity-based read-only renderer for FormulaX.
|
|
4
|
+
|
|
5
|
+
`@formulaxjs/renderer-kity` turns LaTeX into inline SVG markup by using the legacy Kity runtime behind the shared `@formulaxjs/renderer` contract. It is the current concrete renderer package for adapters that want runtime SVG output without depending on editor UI helpers.
|
|
6
|
+
|
|
7
|
+
> Status: experimental. Public APIs may change before the first stable release.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @formulaxjs/renderer-kity
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Highlights
|
|
16
|
+
|
|
17
|
+
- `createKityFormulaRenderer`
|
|
18
|
+
- `renderLatexToSvgMarkup`
|
|
19
|
+
- `serializeKityFormulaFromRoot`
|
|
20
|
+
- `waitForKityFormulaSvgLayout`
|
|
21
|
+
- cache-safe asset overrides through `assetsVersion`
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { createKityFormulaRenderer } from '@formulaxjs/renderer-kity';
|
|
27
|
+
|
|
28
|
+
const renderer = createKityFormulaRenderer({
|
|
29
|
+
fontSize: 40,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const result = await renderer.renderLatex('\\frac{a}{b}');
|
|
33
|
+
|
|
34
|
+
console.log(result.engine); // kity
|
|
35
|
+
console.log(result.html); // inline SVG markup
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If you pass custom runtime asset overrides and want caching to stay enabled, also pass an `assetsVersion` string so different asset sets do not share the same cache entry.
|
|
39
|
+
|
|
40
|
+
## Package role
|
|
41
|
+
|
|
42
|
+
Use this package when you want a concrete FormulaX renderer implementation today.
|
|
43
|
+
|
|
44
|
+
- It depends on `@formulaxjs/renderer` for shared renderer contracts and SVG helpers.
|
|
45
|
+
- It depends on `@formulaxjs/kity-runtime` for the legacy Kity backend.
|
|
46
|
+
- It does not depend on `@formulaxjs/editor`.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
createKityFormulaRenderer: () => createKityFormulaRenderer,
|
|
24
|
+
findKityFormulaSvg: () => findKityFormulaSvg,
|
|
25
|
+
renderLatexToSvgMarkup: () => renderLatexToSvgMarkup,
|
|
26
|
+
serializeKityFormulaFromRoot: () => serializeKityFormulaFromRoot,
|
|
27
|
+
waitForKityFormulaSvgLayout: () => waitForKityFormulaSvgLayout
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(index_exports);
|
|
30
|
+
|
|
31
|
+
// src/renderer.ts
|
|
32
|
+
var import_renderer2 = require("@formulaxjs/renderer");
|
|
33
|
+
var import_kity_runtime = require("@formulaxjs/kity-runtime");
|
|
34
|
+
|
|
35
|
+
// src/dom.ts
|
|
36
|
+
function createHiddenRenderHost(doc = document) {
|
|
37
|
+
const host = doc.createElement("div");
|
|
38
|
+
host.style.position = "fixed";
|
|
39
|
+
host.style.left = "-100000px";
|
|
40
|
+
host.style.top = "0";
|
|
41
|
+
host.style.width = "1px";
|
|
42
|
+
host.style.height = "1px";
|
|
43
|
+
host.style.opacity = "0";
|
|
44
|
+
host.style.pointerEvents = "none";
|
|
45
|
+
host.setAttribute("aria-hidden", "true");
|
|
46
|
+
doc.body.appendChild(host);
|
|
47
|
+
return host;
|
|
48
|
+
}
|
|
49
|
+
async function waitForDocumentFonts(doc) {
|
|
50
|
+
if (!doc.fonts?.ready) return;
|
|
51
|
+
try {
|
|
52
|
+
await doc.fonts.ready;
|
|
53
|
+
} catch {
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function waitForAnimationFrame(view) {
|
|
57
|
+
return new Promise((resolve) => {
|
|
58
|
+
view.requestAnimationFrame(() => resolve());
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// src/serialize.ts
|
|
63
|
+
var import_renderer = require("@formulaxjs/renderer");
|
|
64
|
+
function findKityFormulaSvg(root) {
|
|
65
|
+
return root.querySelector(
|
|
66
|
+
".kf-editor-edit-area svg, .kf-editor-canvas-container svg, svg"
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
function serializeKityFormulaFromRoot(root) {
|
|
70
|
+
const svg = findKityFormulaSvg(root);
|
|
71
|
+
if (!svg) {
|
|
72
|
+
return "";
|
|
73
|
+
}
|
|
74
|
+
return (0, import_renderer.serializeSvgForInsertion)(svg);
|
|
75
|
+
}
|
|
76
|
+
async function waitForKityFormulaSvgLayout(root) {
|
|
77
|
+
const doc = root.ownerDocument ?? document;
|
|
78
|
+
const view = doc.defaultView ?? window;
|
|
79
|
+
await waitForDocumentFonts(doc);
|
|
80
|
+
let previous = readRenderedFormulaBox(root);
|
|
81
|
+
for (let attempt = 0; attempt < 4; attempt += 1) {
|
|
82
|
+
await waitForAnimationFrame(view);
|
|
83
|
+
const current = readRenderedFormulaBox(root);
|
|
84
|
+
if (previous && current && areSvgBoxesClose(previous, current)) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
previous = current;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function readRenderedFormulaBox(root) {
|
|
91
|
+
const svg = findKityFormulaSvg(root);
|
|
92
|
+
if (!svg) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
return (0, import_renderer.readRenderedFormulaSvgBox)(svg);
|
|
96
|
+
}
|
|
97
|
+
function areSvgBoxesClose(left, right) {
|
|
98
|
+
return Math.abs(left.x - right.x) < 0.01 && Math.abs(left.y - right.y) < 0.01 && Math.abs(left.width - right.width) < 0.01 && Math.abs(left.height - right.height) < 0.01;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// src/renderer.ts
|
|
102
|
+
var renderCache = /* @__PURE__ */ new Map();
|
|
103
|
+
function hasCustomAssetOverrides(assets) {
|
|
104
|
+
return Boolean(assets && Object.keys(assets).length > 0);
|
|
105
|
+
}
|
|
106
|
+
function createKityFormulaRenderer(defaults = {}) {
|
|
107
|
+
return {
|
|
108
|
+
renderLatex(latex, options = {}) {
|
|
109
|
+
return renderLatexToSvgMarkup(latex, {
|
|
110
|
+
...defaults,
|
|
111
|
+
...options
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function renderLatexToSvgMarkup(latex, options = {}) {
|
|
117
|
+
const normalizedLatex = latex.trim();
|
|
118
|
+
const shouldUseCache = options.cache !== false && !(hasCustomAssetOverrides(options.assets) && !options.assetsVersion);
|
|
119
|
+
if (!normalizedLatex) {
|
|
120
|
+
return Promise.resolve({
|
|
121
|
+
engine: "kity",
|
|
122
|
+
output: "svg",
|
|
123
|
+
latex: normalizedLatex,
|
|
124
|
+
html: ""
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
const cacheKey = (0, import_renderer2.createFormulaRenderCacheKey)({
|
|
128
|
+
engine: "kity",
|
|
129
|
+
latex: normalizedLatex,
|
|
130
|
+
output: "svg",
|
|
131
|
+
fontSize: options.fontSize,
|
|
132
|
+
displayMode: options.displayMode,
|
|
133
|
+
className: options.className,
|
|
134
|
+
assetsVersion: options.assetsVersion
|
|
135
|
+
});
|
|
136
|
+
if (shouldUseCache) {
|
|
137
|
+
const cached = renderCache.get(cacheKey);
|
|
138
|
+
if (cached) {
|
|
139
|
+
return cached;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const pending = renderLatexToSvgMarkupUncached(normalizedLatex, options);
|
|
143
|
+
if (shouldUseCache) {
|
|
144
|
+
renderCache.set(cacheKey, pending);
|
|
145
|
+
pending.catch(() => {
|
|
146
|
+
if (renderCache.get(cacheKey) === pending) {
|
|
147
|
+
renderCache.delete(cacheKey);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
return pending;
|
|
152
|
+
}
|
|
153
|
+
async function renderLatexToSvgMarkupUncached(latex, options) {
|
|
154
|
+
if (typeof document === "undefined") {
|
|
155
|
+
throw new Error("Kity renderer requires a browser document.");
|
|
156
|
+
}
|
|
157
|
+
const host = createHiddenRenderHost(document);
|
|
158
|
+
const handle = await (0, import_kity_runtime.mountKityEditor)(host, {
|
|
159
|
+
initialLatex: latex,
|
|
160
|
+
height: options.height ?? "100%",
|
|
161
|
+
autofocus: false,
|
|
162
|
+
assets: options.assets,
|
|
163
|
+
render: {
|
|
164
|
+
fontsize: options.fontSize ?? 40
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
try {
|
|
168
|
+
await waitForKityFormulaSvgLayout(host);
|
|
169
|
+
return {
|
|
170
|
+
engine: "kity",
|
|
171
|
+
output: "svg",
|
|
172
|
+
latex,
|
|
173
|
+
html: serializeKityFormulaFromRoot(host)
|
|
174
|
+
};
|
|
175
|
+
} finally {
|
|
176
|
+
handle.destroy();
|
|
177
|
+
host.remove();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
181
|
+
0 && (module.exports = {
|
|
182
|
+
createKityFormulaRenderer,
|
|
183
|
+
findKityFormulaSvg,
|
|
184
|
+
renderLatexToSvgMarkup,
|
|
185
|
+
serializeKityFormulaFromRoot,
|
|
186
|
+
waitForKityFormulaSvgLayout
|
|
187
|
+
});
|
|
188
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/renderer.ts","../src/dom.ts","../src/serialize.ts"],"sourcesContent":["export type { KityFormulaRenderOptions } from './types';\n\nexport {\n createKityFormulaRenderer,\n renderLatexToSvgMarkup,\n} from './renderer';\n\nexport {\n findKityFormulaSvg,\n serializeKityFormulaFromRoot,\n waitForKityFormulaSvgLayout,\n} from './serialize';\n","import {\n createFormulaRenderCacheKey,\n type FormulaRenderer,\n type FormulaRenderResult,\n} from '@formulaxjs/renderer';\nimport { mountKityEditor, type KityEditorAssets } from '@formulaxjs/kity-runtime';\nimport { createHiddenRenderHost } from './dom';\nimport {\n serializeKityFormulaFromRoot,\n waitForKityFormulaSvgLayout,\n} from './serialize';\nimport type { KityFormulaRenderOptions } from './types';\n\nconst renderCache = new Map<string, Promise<FormulaRenderResult>>();\n\nfunction hasCustomAssetOverrides(assets?: Partial<KityEditorAssets>): boolean {\n return Boolean(assets && Object.keys(assets).length > 0);\n}\n\nexport function createKityFormulaRenderer(\n defaults: KityFormulaRenderOptions = {},\n): FormulaRenderer {\n return {\n renderLatex(latex, options = {}) {\n return renderLatexToSvgMarkup(latex, {\n ...defaults,\n ...options,\n });\n },\n };\n}\n\nexport function renderLatexToSvgMarkup(\n latex: string,\n options: KityFormulaRenderOptions = {},\n): Promise<FormulaRenderResult> {\n const normalizedLatex = latex.trim();\n const shouldUseCache = options.cache !== false\n && !(hasCustomAssetOverrides(options.assets) && !options.assetsVersion);\n\n if (!normalizedLatex) {\n return Promise.resolve({\n engine: 'kity',\n output: 'svg',\n latex: normalizedLatex,\n html: '',\n });\n }\n\n const cacheKey = createFormulaRenderCacheKey({\n engine: 'kity',\n latex: normalizedLatex,\n output: 'svg',\n fontSize: options.fontSize,\n displayMode: options.displayMode,\n className: options.className,\n assetsVersion: options.assetsVersion,\n });\n\n if (shouldUseCache) {\n const cached = renderCache.get(cacheKey);\n if (cached) {\n return cached;\n }\n }\n\n const pending = renderLatexToSvgMarkupUncached(normalizedLatex, options);\n\n if (shouldUseCache) {\n renderCache.set(cacheKey, pending);\n pending.catch(() => {\n if (renderCache.get(cacheKey) === pending) {\n renderCache.delete(cacheKey);\n }\n });\n }\n\n return pending;\n}\n\nasync function renderLatexToSvgMarkupUncached(\n latex: string,\n options: KityFormulaRenderOptions,\n): Promise<FormulaRenderResult> {\n if (typeof document === 'undefined') {\n throw new Error('Kity renderer requires a browser document.');\n }\n\n const host = createHiddenRenderHost(document);\n const handle = await mountKityEditor(host, {\n initialLatex: latex,\n height: options.height ?? '100%',\n autofocus: false,\n assets: options.assets,\n render: {\n fontsize: options.fontSize ?? 40,\n },\n });\n\n try {\n await waitForKityFormulaSvgLayout(host);\n\n return {\n engine: 'kity',\n output: 'svg',\n latex,\n html: serializeKityFormulaFromRoot(host),\n };\n } finally {\n handle.destroy();\n host.remove();\n }\n}\n","export function createHiddenRenderHost(doc: Document = document): HTMLElement {\n const host = doc.createElement('div');\n\n host.style.position = 'fixed';\n host.style.left = '-100000px';\n host.style.top = '0';\n host.style.width = '1px';\n host.style.height = '1px';\n host.style.opacity = '0';\n host.style.pointerEvents = 'none';\n host.setAttribute('aria-hidden', 'true');\n\n doc.body.appendChild(host);\n\n return host;\n}\n\nexport async function waitForDocumentFonts(doc: Document): Promise<void> {\n if (!doc.fonts?.ready) return;\n\n try {\n await doc.fonts.ready;\n } catch {\n // Ignore font readiness failures and fall back to frame-based settling.\n }\n}\n\nexport function waitForAnimationFrame(view: Window): Promise<void> {\n return new Promise((resolve) => {\n view.requestAnimationFrame(() => resolve());\n });\n}\n","import {\n readRenderedFormulaSvgBox,\n serializeSvgForInsertion,\n type SvgBox,\n} from '@formulaxjs/renderer';\nimport { waitForAnimationFrame, waitForDocumentFonts } from './dom';\n\nexport function findKityFormulaSvg(root: HTMLElement): SVGSVGElement | null {\n return root.querySelector<SVGSVGElement>(\n '.kf-editor-edit-area svg, .kf-editor-canvas-container svg, svg',\n );\n}\n\nexport function serializeKityFormulaFromRoot(root: HTMLElement): string {\n const svg = findKityFormulaSvg(root);\n\n if (!svg) {\n return '';\n }\n\n return serializeSvgForInsertion(svg);\n}\n\nexport async function waitForKityFormulaSvgLayout(root: HTMLElement): Promise<void> {\n const doc = root.ownerDocument ?? document;\n const view = doc.defaultView ?? window;\n\n await waitForDocumentFonts(doc);\n\n let previous = readRenderedFormulaBox(root);\n\n for (let attempt = 0; attempt < 4; attempt += 1) {\n await waitForAnimationFrame(view);\n const current = readRenderedFormulaBox(root);\n\n if (previous && current && areSvgBoxesClose(previous, current)) {\n return;\n }\n\n previous = current;\n }\n}\n\nfunction readRenderedFormulaBox(root: HTMLElement): SvgBox | null {\n const svg = findKityFormulaSvg(root);\n\n if (!svg) {\n return null;\n }\n\n return readRenderedFormulaSvgBox(svg);\n}\n\nfunction areSvgBoxesClose(left: SvgBox, right: SvgBox): boolean {\n return Math.abs(left.x - right.x) < 0.01\n && Math.abs(left.y - right.y) < 0.01\n && Math.abs(left.width - right.width) < 0.01\n && Math.abs(left.height - right.height) < 0.01;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,mBAIO;AACP,0BAAuD;;;ACLhD,SAAS,uBAAuB,MAAgB,UAAuB;AAC5E,QAAM,OAAO,IAAI,cAAc,KAAK;AAEpC,OAAK,MAAM,WAAW;AACtB,OAAK,MAAM,OAAO;AAClB,OAAK,MAAM,MAAM;AACjB,OAAK,MAAM,QAAQ;AACnB,OAAK,MAAM,SAAS;AACpB,OAAK,MAAM,UAAU;AACrB,OAAK,MAAM,gBAAgB;AAC3B,OAAK,aAAa,eAAe,MAAM;AAEvC,MAAI,KAAK,YAAY,IAAI;AAEzB,SAAO;AACT;AAEA,eAAsB,qBAAqB,KAA8B;AACvE,MAAI,CAAC,IAAI,OAAO,MAAO;AAEvB,MAAI;AACF,UAAM,IAAI,MAAM;AAAA,EAClB,QAAQ;AAAA,EAER;AACF;AAEO,SAAS,sBAAsB,MAA6B;AACjE,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,SAAK,sBAAsB,MAAM,QAAQ,CAAC;AAAA,EAC5C,CAAC;AACH;;;AC/BA,sBAIO;AAGA,SAAS,mBAAmB,MAAyC;AAC1E,SAAO,KAAK;AAAA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