@pexelize/react-editor 1.0.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +574 -64
- package/dist/index.d.ts +201 -215
- package/dist/index.esm.js +110 -270
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +108 -269
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
package/dist/index.esm.js
CHANGED
|
@@ -1,318 +1,158 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { forwardRef, useRef, useState,
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, useRef, useEffect, useState, useCallback, useImperativeHandle } from 'react';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
// SDK CDN Configuration
|
|
6
|
-
// ============================================================================
|
|
7
|
-
/**
|
|
8
|
-
* Use Cloudflare CDN for SDK.
|
|
9
|
-
* You can use https://sdk.pexelize.com/latest/pexelize-sdk.min.js directly.
|
|
10
|
-
* No need to add a trailing slash or extra path—just use as shown.
|
|
11
|
-
*/
|
|
12
|
-
const SDK_CDN_URL = 'https://sdk.pexelize.com/latest/pexelize-sdk.min.js';
|
|
13
|
-
// Global SDK reference (loaded from CDN)
|
|
4
|
+
const SDK_CDN_URL = "https://sdk.pexelize.com/latest/pexelize-sdk.min.js";
|
|
14
5
|
let sdkLoadPromise = null;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
function loadSDKFromCDN(url) {
|
|
19
|
-
if (sdkLoadPromise && window.pexelize) {
|
|
6
|
+
function loadSDK() {
|
|
7
|
+
if (sdkLoadPromise)
|
|
20
8
|
return sdkLoadPromise;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (window.pexelize) {
|
|
24
|
-
return Promise.resolve();
|
|
9
|
+
if (typeof window !== "undefined" && window.pexelize) {
|
|
10
|
+
return Promise.resolve(window.pexelize);
|
|
25
11
|
}
|
|
26
12
|
sdkLoadPromise = new Promise((resolve, reject) => {
|
|
27
|
-
const script = document.createElement(
|
|
28
|
-
script.src =
|
|
13
|
+
const script = document.createElement("script");
|
|
14
|
+
script.src = SDK_CDN_URL;
|
|
29
15
|
script.async = true;
|
|
30
16
|
script.onload = () => {
|
|
31
17
|
if (window.pexelize) {
|
|
32
|
-
|
|
33
|
-
resolve();
|
|
18
|
+
resolve(window.pexelize);
|
|
34
19
|
}
|
|
35
20
|
else {
|
|
36
|
-
|
|
21
|
+
sdkLoadPromise = null;
|
|
22
|
+
reject(new Error("Failed to load Pexelize SDK"));
|
|
37
23
|
}
|
|
38
24
|
};
|
|
39
25
|
script.onerror = () => {
|
|
40
26
|
sdkLoadPromise = null;
|
|
41
|
-
reject(new Error(
|
|
27
|
+
reject(new Error("Failed to load Pexelize SDK"));
|
|
42
28
|
};
|
|
43
29
|
document.head.appendChild(script);
|
|
44
30
|
});
|
|
45
31
|
return sdkLoadPromise;
|
|
46
32
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Get SDK instance from global
|
|
49
|
-
*/
|
|
50
|
-
function getSDK() {
|
|
51
|
-
return window.pexelize;
|
|
52
|
-
}
|
|
53
|
-
// ============================================================================
|
|
54
|
-
// Component
|
|
55
|
-
// ============================================================================
|
|
56
|
-
/**
|
|
57
|
-
* PexelizeEditor React Component
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```tsx
|
|
61
|
-
* import { PexelizeEditor, PexelizeEditorRef } from '@pexelize/react-editor';
|
|
62
|
-
*
|
|
63
|
-
* function MyEditor() {
|
|
64
|
-
* const editorRef = useRef<PexelizeEditorRef>(null);
|
|
65
|
-
*
|
|
66
|
-
* const handleSave = () => {
|
|
67
|
-
* editorRef.current?.saveDesign((design) => {
|
|
68
|
-
* console.log('Design:', design);
|
|
69
|
-
* });
|
|
70
|
-
* };
|
|
71
|
-
*
|
|
72
|
-
* return (
|
|
73
|
-
* <div>
|
|
74
|
-
* <button onClick={handleSave}>Save</button>
|
|
75
|
-
* <PexelizeEditor
|
|
76
|
-
* ref={editorRef}
|
|
77
|
-
* editorMode="email"
|
|
78
|
-
* onReady={() => console.log('Ready!')}
|
|
79
|
-
* onChange={({ design }) => console.log('Changed:', design)}
|
|
80
|
-
* />
|
|
81
|
-
* </div>
|
|
82
|
-
* );
|
|
83
|
-
* }
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
33
|
const PexelizeEditor = forwardRef((props, ref) => {
|
|
87
|
-
const {
|
|
34
|
+
const { editorId, apiKey, templateId, design, editorMode, contentType, ai, height, options = {}, className, style, minHeight = "600px", onReady, onLoad, onChange, onError, } = props;
|
|
88
35
|
const containerRef = useRef(null);
|
|
89
|
-
const
|
|
36
|
+
const editorInstanceRef = useRef(null);
|
|
90
37
|
const containerId = useRef(`pexelize-editor-${Math.random().toString(36).substr(2, 9)}`);
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
|
|
38
|
+
const eventUnsubscribersRef = useRef([]);
|
|
39
|
+
const onReadyRef = useRef(onReady);
|
|
40
|
+
const onLoadRef = useRef(onLoad);
|
|
41
|
+
const onChangeRef = useRef(onChange);
|
|
42
|
+
const onErrorRef = useRef(onError);
|
|
95
43
|
useEffect(() => {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
loadSDKFromCDN(url)
|
|
99
|
-
.then(() => setSdkLoaded(true))
|
|
100
|
-
.catch((err) => setError(err.message));
|
|
101
|
-
}, [props.sdkUrl]);
|
|
102
|
-
// Initialize SDK once loaded
|
|
44
|
+
onReadyRef.current = onReady;
|
|
45
|
+
}, [onReady]);
|
|
103
46
|
useEffect(() => {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
47
|
+
onLoadRef.current = onLoad;
|
|
48
|
+
}, [onLoad]);
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
onChangeRef.current = onChange;
|
|
51
|
+
}, [onChange]);
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
onErrorRef.current = onError;
|
|
54
|
+
}, [onError]);
|
|
55
|
+
const [isEditorReady, setIsEditorReady] = useState(false);
|
|
56
|
+
const handleReady = useCallback(() => {
|
|
57
|
+
setIsEditorReady(true);
|
|
58
|
+
if (editorInstanceRef.current) {
|
|
59
|
+
onReadyRef.current?.(editorInstanceRef.current);
|
|
110
60
|
}
|
|
111
|
-
|
|
112
|
-
sdkRef.current = pexelize;
|
|
113
|
-
// Initialize
|
|
114
|
-
pexelize.init({
|
|
115
|
-
id: containerId.current,
|
|
116
|
-
editorMode: editorMode || displayMode || 'email',
|
|
117
|
-
...config,
|
|
118
|
-
});
|
|
119
|
-
// Clean up on unmount
|
|
120
|
-
return () => {
|
|
121
|
-
pexelize.destroy();
|
|
122
|
-
sdkRef.current = null;
|
|
123
|
-
setIsEditorReady(false);
|
|
124
|
-
};
|
|
125
|
-
}, [sdkLoaded]);
|
|
126
|
-
// Handle ready event
|
|
61
|
+
}, []);
|
|
127
62
|
useEffect(() => {
|
|
128
|
-
|
|
129
|
-
if (!sdk)
|
|
63
|
+
if (!containerRef.current)
|
|
130
64
|
return;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
65
|
+
let mounted = true;
|
|
66
|
+
const initEditor = async () => {
|
|
67
|
+
try {
|
|
68
|
+
const pexelize = await loadSDK();
|
|
69
|
+
if (!mounted)
|
|
70
|
+
return;
|
|
71
|
+
const editorConfig = contentType === "module"
|
|
72
|
+
? { ...options.editor, contentType, minRows: 1, maxRows: 1 }
|
|
73
|
+
: options.editor;
|
|
74
|
+
const config = {
|
|
75
|
+
containerId: containerId.current,
|
|
76
|
+
editorId,
|
|
77
|
+
apiKey,
|
|
78
|
+
...options,
|
|
79
|
+
...(templateId !== undefined && { templateId }),
|
|
80
|
+
...(design !== undefined && { design }),
|
|
81
|
+
...(editorMode !== undefined && { editorMode }),
|
|
82
|
+
...(ai !== undefined && { ai }),
|
|
83
|
+
...(editorConfig && { editor: editorConfig }),
|
|
84
|
+
};
|
|
85
|
+
pexelize.init(config);
|
|
86
|
+
editorInstanceRef.current = pexelize;
|
|
87
|
+
const unsubscribeReady = pexelize.addEventListener("editor:ready", handleReady);
|
|
88
|
+
eventUnsubscribersRef.current.push(unsubscribeReady);
|
|
89
|
+
const unsubscribeLoad = pexelize.addEventListener("design:loaded", () => onLoadRef.current?.());
|
|
90
|
+
eventUnsubscribersRef.current.push(unsubscribeLoad);
|
|
91
|
+
const unsubscribeChange = pexelize.addEventListener("design:updated", (data) => onChangeRef.current?.(data));
|
|
92
|
+
eventUnsubscribersRef.current.push(unsubscribeChange);
|
|
140
93
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
94
|
+
catch (err) {
|
|
95
|
+
if (!mounted)
|
|
96
|
+
return;
|
|
97
|
+
const error = err instanceof Error ? err : new Error(String(err));
|
|
98
|
+
onErrorRef.current?.(error);
|
|
144
99
|
}
|
|
145
|
-
// Call onReady callback
|
|
146
|
-
onReady?.();
|
|
147
100
|
};
|
|
148
|
-
|
|
149
|
-
return unsubscribe;
|
|
150
|
-
}, [sdkLoaded, design, mergeTags, displayConditions, onReady]);
|
|
151
|
-
// Handle design loaded event
|
|
152
|
-
useEffect(() => {
|
|
153
|
-
const sdk = sdkRef.current;
|
|
154
|
-
if (!sdk || !onLoad)
|
|
155
|
-
return;
|
|
156
|
-
const unsubscribe = sdk.addEventListener('design:loaded', onLoad);
|
|
157
|
-
return unsubscribe;
|
|
158
|
-
}, [sdkLoaded, onLoad]);
|
|
159
|
-
// Handle design updated event
|
|
160
|
-
useEffect(() => {
|
|
161
|
-
const sdk = sdkRef.current;
|
|
162
|
-
if (!sdk || !onChange)
|
|
163
|
-
return;
|
|
164
|
-
const unsubscribe = sdk.addEventListener('design:updated', onChange);
|
|
165
|
-
return unsubscribe;
|
|
166
|
-
}, [sdkLoaded, onChange]);
|
|
167
|
-
// Handle content modified event
|
|
168
|
-
useEffect(() => {
|
|
169
|
-
const sdk = sdkRef.current;
|
|
170
|
-
if (!sdk || !onContentModified)
|
|
171
|
-
return;
|
|
172
|
-
const unsubscribe = sdk.addEventListener('content:modified', onContentModified);
|
|
173
|
-
return unsubscribe;
|
|
174
|
-
}, [sdkLoaded, onContentModified]);
|
|
175
|
-
// Handle element selected event
|
|
176
|
-
useEffect(() => {
|
|
177
|
-
const sdk = sdkRef.current;
|
|
178
|
-
if (!sdk || !onSelect)
|
|
179
|
-
return;
|
|
180
|
-
const unsubscribe = sdk.addEventListener('element:selected', onSelect);
|
|
181
|
-
return unsubscribe;
|
|
182
|
-
}, [sdkLoaded, onSelect]);
|
|
183
|
-
// Handle element deselected event
|
|
184
|
-
useEffect(() => {
|
|
185
|
-
const sdk = sdkRef.current;
|
|
186
|
-
if (!sdk || !onDeselect)
|
|
187
|
-
return;
|
|
188
|
-
const unsubscribe = sdk.addEventListener('element:deselected', onDeselect);
|
|
189
|
-
return unsubscribe;
|
|
190
|
-
}, [sdkLoaded, onDeselect]);
|
|
191
|
-
// Register callbacks
|
|
192
|
-
useEffect(() => {
|
|
193
|
-
const sdk = sdkRef.current;
|
|
194
|
-
if (!sdk)
|
|
195
|
-
return;
|
|
196
|
-
if (onImage) {
|
|
197
|
-
sdk.registerCallback('image', onImage);
|
|
198
|
-
}
|
|
199
|
-
if (onLinkClick) {
|
|
200
|
-
sdk.registerCallback('linkClick', onLinkClick);
|
|
201
|
-
}
|
|
202
|
-
if (onSave) {
|
|
203
|
-
sdk.registerCallback('save', onSave);
|
|
204
|
-
}
|
|
101
|
+
initEditor();
|
|
205
102
|
return () => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
103
|
+
mounted = false;
|
|
104
|
+
eventUnsubscribersRef.current.forEach((unsub) => {
|
|
105
|
+
try {
|
|
106
|
+
unsub();
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
// ignore
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
eventUnsubscribersRef.current = [];
|
|
113
|
+
try {
|
|
114
|
+
editorInstanceRef.current?.destroy();
|
|
210
115
|
}
|
|
116
|
+
catch {
|
|
117
|
+
// ignore
|
|
118
|
+
}
|
|
119
|
+
editorInstanceRef.current = null;
|
|
120
|
+
setIsEditorReady(false);
|
|
211
121
|
};
|
|
212
|
-
}, [
|
|
213
|
-
// Expose SDK methods via ref
|
|
122
|
+
}, [editorId, apiKey, handleReady]);
|
|
214
123
|
useImperativeHandle(ref, () => ({
|
|
215
|
-
|
|
216
|
-
loadBlank: () => sdkRef.current?.loadBlank(),
|
|
217
|
-
saveDesign: (callback) => sdkRef.current?.saveDesign(callback),
|
|
218
|
-
getDesign: () => sdkRef.current?.getDesign(),
|
|
219
|
-
exportHtml: (callback) => sdkRef.current?.exportHtml(callback),
|
|
220
|
-
exportHtmlAsync: () => sdkRef.current?.exportHtmlAsync(),
|
|
221
|
-
save: () => sdkRef.current?.save(),
|
|
222
|
-
undo: () => sdkRef.current?.undo(),
|
|
223
|
-
redo: () => sdkRef.current?.redo(),
|
|
224
|
-
getState: () => sdkRef.current?.getState(),
|
|
124
|
+
editor: editorInstanceRef.current,
|
|
225
125
|
isReady: () => isEditorReady,
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
// Compute styles
|
|
126
|
+
}), [isEditorReady]);
|
|
127
|
+
const effectiveHeight = height ?? minHeight;
|
|
229
128
|
const containerStyle = {
|
|
230
|
-
width:
|
|
231
|
-
height: typeof
|
|
129
|
+
width: "100%",
|
|
130
|
+
height: typeof effectiveHeight === "number"
|
|
131
|
+
? `${effectiveHeight}px`
|
|
132
|
+
: effectiveHeight,
|
|
232
133
|
...style,
|
|
233
134
|
};
|
|
234
|
-
|
|
235
|
-
if (error) {
|
|
236
|
-
return (jsx("div", { style: { ...containerStyle, display: 'flex', alignItems: 'center', justifyContent: 'center', backgroundColor: '#fee', color: '#c00' }, children: jsxs("div", { style: { textAlign: 'center' }, children: [jsx("div", { style: { fontSize: '24px', marginBottom: '8px' }, children: "\u26A0\uFE0F" }), jsx("div", { children: "Failed to load Pexelize Editor" }), jsx("div", { style: { fontSize: '12px', marginTop: '4px' }, children: error })] }) }));
|
|
237
|
-
}
|
|
238
|
-
// Show loading state
|
|
239
|
-
if (!sdkLoaded) {
|
|
240
|
-
return (jsx("div", { style: { ...containerStyle, display: 'flex', alignItems: 'center', justifyContent: 'center', backgroundColor: '#f5f5f5' }, children: jsxs("div", { style: { textAlign: 'center' }, children: [jsx("div", { style: { fontSize: '24px', marginBottom: '8px' }, children: "\u23F3" }), jsx("div", { children: "Loading Pexelize Editor..." })] }) }));
|
|
241
|
-
}
|
|
242
|
-
return (jsx("div", { id: containerId.current, ref: containerRef, className: className, style: containerStyle }));
|
|
135
|
+
return (jsx("div", { className: className, style: containerStyle, children: jsx("div", { id: containerId.current, ref: containerRef, style: { width: "100%", height: "100%" } }) }));
|
|
243
136
|
});
|
|
244
|
-
PexelizeEditor.displayName =
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
*
|
|
248
|
-
* @example
|
|
249
|
-
* ```tsx
|
|
250
|
-
* function MyComponent() {
|
|
251
|
-
* const { sdk, isReady, error } = usePexelizeSDK({
|
|
252
|
-
* containerId: 'my-editor',
|
|
253
|
-
* editorMode: 'email',
|
|
254
|
-
* });
|
|
255
|
-
*
|
|
256
|
-
* const handleExport = () => {
|
|
257
|
-
* if (isReady && sdk) {
|
|
258
|
-
* sdk.exportHtml((data) => console.log(data.html));
|
|
259
|
-
* }
|
|
260
|
-
* };
|
|
261
|
-
*
|
|
262
|
-
* return (
|
|
263
|
-
* <div>
|
|
264
|
-
* <div id="my-editor" style={{ height: '600px' }} />
|
|
265
|
-
* <button onClick={handleExport} disabled={!isReady}>Export</button>
|
|
266
|
-
* </div>
|
|
267
|
-
* );
|
|
268
|
-
* }
|
|
269
|
-
* ```
|
|
270
|
-
*/
|
|
271
|
-
function usePexelizeSDK(config) {
|
|
272
|
-
const sdkRef = useRef(null);
|
|
137
|
+
PexelizeEditor.displayName = "PexelizeEditor";
|
|
138
|
+
function usePexelizeEditor() {
|
|
139
|
+
const ref = useRef(null);
|
|
273
140
|
const [isReady, setIsReady] = useState(false);
|
|
274
|
-
const [sdkLoaded, setSdkLoaded] = useState(false);
|
|
275
|
-
const [error, setError] = useState(null);
|
|
276
|
-
// Load SDK from CDN
|
|
277
141
|
useEffect(() => {
|
|
278
|
-
|
|
279
|
-
.
|
|
280
|
-
|
|
281
|
-
}, []);
|
|
282
|
-
// Initialize SDK
|
|
283
|
-
useEffect(() => {
|
|
284
|
-
if (!sdkLoaded)
|
|
285
|
-
return;
|
|
286
|
-
const pexelize = getSDK();
|
|
287
|
-
if (!pexelize) {
|
|
288
|
-
setError('Pexelize SDK not found');
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
sdkRef.current = pexelize;
|
|
292
|
-
pexelize.init({
|
|
293
|
-
id: config.containerId,
|
|
294
|
-
editorMode: config.editorMode || config.displayMode || 'email',
|
|
295
|
-
...config,
|
|
296
|
-
});
|
|
297
|
-
const unsubscribe = pexelize.addEventListener('editor:ready', () => {
|
|
298
|
-
setIsReady(true);
|
|
299
|
-
});
|
|
300
|
-
return () => {
|
|
301
|
-
unsubscribe();
|
|
302
|
-
pexelize.destroy();
|
|
303
|
-
sdkRef.current = null;
|
|
304
|
-
setIsReady(false);
|
|
142
|
+
const checkReady = () => {
|
|
143
|
+
const ready = ref.current?.isReady() ?? false;
|
|
144
|
+
setIsReady(ready);
|
|
305
145
|
};
|
|
306
|
-
|
|
146
|
+
checkReady();
|
|
147
|
+
const interval = setInterval(checkReady, 100);
|
|
148
|
+
return () => clearInterval(interval);
|
|
149
|
+
}, []);
|
|
307
150
|
return {
|
|
308
|
-
|
|
151
|
+
ref,
|
|
152
|
+
editor: ref.current?.editor ?? null,
|
|
309
153
|
isReady,
|
|
310
|
-
isLoading: !sdkLoaded && !error,
|
|
311
|
-
error,
|
|
312
154
|
};
|
|
313
155
|
}
|
|
314
|
-
// Export SDK CDN URL for reference
|
|
315
|
-
const PEXELIZE_SDK_CDN = SDK_CDN_URL;
|
|
316
156
|
|
|
317
|
-
export {
|
|
157
|
+
export { PexelizeEditor, PexelizeEditor as default, usePexelizeEditor };
|
|
318
158
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/index.tsx"],"sourcesContent":[null],"names":["_jsx"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/index.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;AAwDA,MAAM,WAAW,GAAG,qDAAqD;AAEzE,IAAI,cAAc,GAAgC,IAAI;AAEtD,SAAS,OAAO,GAAA;AACd,IAAA,IAAI,cAAc;AAAE,QAAA,OAAO,cAAc;IACzC,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,QAAQ,EAAE;QACpD,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC;IACzC;IAEA,cAAc,GAAG,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;QAC/C,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;AAC/C,QAAA,MAAM,CAAC,GAAG,GAAG,WAAW;AACxB,QAAA,MAAM,CAAC,KAAK,GAAG,IAAI;AAEnB,QAAA,MAAM,CAAC,MAAM,GAAG,MAAK;AACnB,YAAA,IAAI,MAAM,CAAC,QAAQ,EAAE;AACnB,gBAAA,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC;YAC1B;iBAAO;gBACL,cAAc,GAAG,IAAI;AACrB,gBAAA,MAAM,CAAC,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;YAClD;AACF,QAAA,CAAC;AAED,QAAA,MAAM,CAAC,OAAO,GAAG,MAAK;YACpB,cAAc,GAAG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