@pixerate/editor-react 0.16.0 → 0.17.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.
Files changed (46) hide show
  1. package/README.md +2 -2
  2. package/dist/canvas/index.cjs +406 -142
  3. package/dist/canvas/index.cjs.map +1 -1
  4. package/dist/canvas/index.d.cts +66 -3
  5. package/dist/canvas/index.d.ts +66 -3
  6. package/dist/canvas/index.js +277 -0
  7. package/dist/canvas/index.js.map +1 -1
  8. package/dist/chunk-I3E4KSA2.js +515 -0
  9. package/dist/chunk-I3E4KSA2.js.map +1 -0
  10. package/dist/chunk-JR5ZBDR7.js +2012 -0
  11. package/dist/chunk-JR5ZBDR7.js.map +1 -0
  12. package/dist/{chunk-XTFR3IMK.js → chunk-ZU54BMDC.js} +473 -160
  13. package/dist/chunk-ZU54BMDC.js.map +1 -0
  14. package/dist/generation/index.cjs +290 -0
  15. package/dist/generation/index.cjs.map +1 -1
  16. package/dist/generation/index.d.cts +66 -2
  17. package/dist/generation/index.d.ts +66 -2
  18. package/dist/generation/index.js +7 -1
  19. package/dist/image-editor/index.cjs +490 -187
  20. package/dist/image-editor/index.cjs.map +1 -1
  21. package/dist/image-editor/index.d.cts +34 -2
  22. package/dist/image-editor/index.d.ts +34 -2
  23. package/dist/image-editor/index.js +5 -1
  24. package/dist/index.cjs +2372 -731
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +88 -6
  27. package/dist/index.d.ts +88 -6
  28. package/dist/index.js +334 -96
  29. package/dist/index.js.map +1 -1
  30. package/dist/spreadsheet/index.cjs +943 -112
  31. package/dist/spreadsheet/index.cjs.map +1 -1
  32. package/dist/spreadsheet/index.d.cts +119 -7
  33. package/dist/spreadsheet/index.d.ts +119 -7
  34. package/dist/spreadsheet/index.js +11 -1
  35. package/dist/tokens/index.cjs +395 -0
  36. package/dist/tokens/index.cjs.map +1 -0
  37. package/dist/tokens/index.d.cts +54 -0
  38. package/dist/tokens/index.d.ts +54 -0
  39. package/dist/tokens/index.js +375 -0
  40. package/dist/tokens/index.js.map +1 -0
  41. package/package.json +10 -2
  42. package/dist/chunk-7SPRQZ6H.js +0 -216
  43. package/dist/chunk-7SPRQZ6H.js.map +0 -1
  44. package/dist/chunk-FYIPXHAE.js +0 -1169
  45. package/dist/chunk-FYIPXHAE.js.map +0 -1
  46. package/dist/chunk-XTFR3IMK.js.map +0 -1
@@ -1,216 +0,0 @@
1
- // src/generation/useGenerationPlan.ts
2
- import { useEffect, useMemo, useState } from "react";
3
- import {
4
- estimateJobProgress,
5
- planGenerationRequest
6
- } from "@pixerate/editor/generation";
7
- function useGenerationPlan(request, capabilities, options = {}) {
8
- const key = JSON.stringify([request, capabilities, options]);
9
- return useMemo(() => planGenerationRequest(request, capabilities, options), [key]);
10
- }
11
- function useJobProgress(options) {
12
- const { startedAt, expectedMs, done, now, intervalMs = 1e3 } = options;
13
- const [tick, setTick] = useState(() => Date.now());
14
- const ticking = !done && now === void 0;
15
- useEffect(() => {
16
- if (!ticking) return;
17
- setTick(Date.now());
18
- const id = setInterval(() => setTick(Date.now()), Math.max(16, intervalMs));
19
- return () => clearInterval(id);
20
- }, [ticking, intervalMs]);
21
- return estimateJobProgress({ startedAt, expectedMs, done, now: now ?? tick });
22
- }
23
-
24
- // src/generation/GenerationSettings.tsx
25
- import { useId, useMemo as useMemo2 } from "react";
26
- import {
27
- getGenerationControls,
28
- getReferenceSlots,
29
- getRequestValue,
30
- parseControlValue,
31
- removeReference,
32
- setRequestValue
33
- } from "@pixerate/editor/generation";
34
- import { jsx, jsxs } from "react/jsx-runtime";
35
- var inputClass = "w-full rounded-md border border-border bg-background px-2 py-1 text-sm outline-none focus:ring-1 focus:ring-ring";
36
- function Control({
37
- control,
38
- value,
39
- id,
40
- onValue
41
- }) {
42
- const shown = value ?? control.defaultValue;
43
- if (control.kind === "checkbox") {
44
- return /* @__PURE__ */ jsx(
45
- "input",
46
- {
47
- id,
48
- type: "checkbox",
49
- "data-field": control.key,
50
- checked: Boolean(shown),
51
- onChange: (e) => onValue(parseControlValue(control, e.target.checked))
52
- }
53
- );
54
- }
55
- if (control.kind === "select") {
56
- return /* @__PURE__ */ jsxs(
57
- "select",
58
- {
59
- id,
60
- "data-field": control.key,
61
- className: inputClass,
62
- value: shown === void 0 ? "" : String(shown),
63
- onChange: (e) => onValue(parseControlValue(control, e.target.value)),
64
- children: [
65
- shown === void 0 && /* @__PURE__ */ jsx("option", { value: "", children: "Default" }),
66
- control.options.map((option) => /* @__PURE__ */ jsx("option", { value: String(option.value), children: option.label }, String(option.value)))
67
- ]
68
- }
69
- );
70
- }
71
- if (control.kind === "textarea") {
72
- return /* @__PURE__ */ jsx(
73
- "textarea",
74
- {
75
- id,
76
- "data-field": control.key,
77
- className: inputClass,
78
- rows: 2,
79
- maxLength: control.maxLength,
80
- value: typeof value === "string" ? value : "",
81
- onChange: (e) => onValue(parseControlValue(control, e.target.value))
82
- }
83
- );
84
- }
85
- const numeric = typeof shown === "number" ? shown : void 0;
86
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
87
- /* @__PURE__ */ jsx(
88
- "input",
89
- {
90
- id,
91
- type: control.kind === "range" ? "range" : "number",
92
- "data-field": control.key,
93
- className: control.kind === "range" ? "flex-1" : inputClass,
94
- min: control.min,
95
- max: control.max,
96
- step: control.step ?? "any",
97
- value: numeric ?? (control.kind === "range" ? control.min ?? 0 : ""),
98
- onChange: (e) => onValue(parseControlValue(control, e.target.value))
99
- }
100
- ),
101
- control.kind === "range" && /* @__PURE__ */ jsx("span", { className: "w-10 text-right tabular-nums text-muted-foreground", "data-field-value": "", children: numeric ?? "\u2013" })
102
- ] });
103
- }
104
- var GenerationSettings = ({
105
- capabilities,
106
- value,
107
- onChange,
108
- plan: planProp,
109
- strategy,
110
- showAdjustments = true,
111
- onAddReference,
112
- renderReference,
113
- className = ""
114
- }) => {
115
- const baseId = useId();
116
- const controls = useMemo2(() => getGenerationControls(capabilities), [capabilities]);
117
- const computed = useGenerationPlan(value, capabilities, { strategy });
118
- const plan = planProp ?? computed;
119
- const slots = getReferenceSlots(capabilities, value);
120
- return /* @__PURE__ */ jsxs("div", { className: `flex flex-col gap-3 text-sm ${className}`, "data-generation-settings": "", "data-model": capabilities.id, children: [
121
- controls.map((control) => {
122
- const id = `${baseId}-${control.key}`;
123
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", "data-control": control.key, children: [
124
- /* @__PURE__ */ jsx("label", { htmlFor: id, className: "text-xs font-medium text-muted-foreground", title: control.description, children: control.label }),
125
- /* @__PURE__ */ jsx(
126
- Control,
127
- {
128
- control,
129
- id,
130
- value: getRequestValue(value, control.key),
131
- onValue: (next) => onChange(setRequestValue(value, control.key, next))
132
- }
133
- )
134
- ] }, control.key);
135
- }),
136
- slots.map((slot) => /* @__PURE__ */ jsxs("fieldset", { className: "flex flex-col gap-1", "data-reference-role": slot.role, children: [
137
- /* @__PURE__ */ jsxs("legend", { className: "text-xs font-medium text-muted-foreground", title: slot.description, children: [
138
- slot.label,
139
- " ",
140
- /* @__PURE__ */ jsxs("span", { className: "tabular-nums", "data-reference-count": "", children: [
141
- "(",
142
- slot.references.length,
143
- "/",
144
- slot.max,
145
- ")"
146
- ] }),
147
- slot.min > 0 && /* @__PURE__ */ jsx("span", { className: "text-destructive", children: " *" })
148
- ] }),
149
- /* @__PURE__ */ jsxs("ul", { className: "flex flex-wrap gap-1", children: [
150
- slot.references.map((ref) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-1 rounded border border-border px-1.5 py-0.5", "data-reference-id": ref.id, children: [
151
- renderReference ? renderReference(ref) : /* @__PURE__ */ jsx("span", { className: "max-w-[10rem] truncate", children: ref.id }),
152
- /* @__PURE__ */ jsx(
153
- "button",
154
- {
155
- type: "button",
156
- "aria-label": `Remove ${slot.label} ${ref.id}`,
157
- className: "text-muted-foreground hover:text-foreground",
158
- onClick: () => onChange(removeReference(value, slot.role, ref.id)),
159
- children: "\xD7"
160
- }
161
- )
162
- ] }, ref.id)),
163
- onAddReference && slot.canAdd && /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
164
- "button",
165
- {
166
- type: "button",
167
- className: "rounded border border-dashed border-border px-1.5 py-0.5 text-muted-foreground hover:text-foreground",
168
- onClick: () => onAddReference(slot.role),
169
- children: "Add"
170
- }
171
- ) })
172
- ] })
173
- ] }, slot.role)),
174
- showAdjustments && plan.adjustments.length > 0 && /* @__PURE__ */ jsx("ul", { role: "status", className: "flex flex-col gap-0.5 text-xs text-muted-foreground", "data-generation-adjustments": "", children: plan.adjustments.map((adjustment, index) => /* @__PURE__ */ jsx("li", { "data-adjustment-field": adjustment.field, "data-adjustment-kind": adjustment.kind, children: adjustment.reason }, index)) }),
175
- showAdjustments && plan.errors.length > 0 && /* @__PURE__ */ jsx("ul", { role: "alert", className: "flex flex-col gap-0.5 text-xs text-destructive", "data-generation-errors": "", children: plan.errors.map((error, index) => /* @__PURE__ */ jsx("li", { "data-error-field": error.field, children: error.message }, index)) })
176
- ] });
177
- };
178
-
179
- // src/generation/JobProgress.tsx
180
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
181
- var JobProgress = ({ title, className = "", ...options }) => {
182
- const progress = useJobProgress(options);
183
- return /* @__PURE__ */ jsxs2("div", { className: `flex flex-col gap-1 text-sm ${className}`, "data-job-progress": "", "data-done": options.done ? "" : void 0, children: [
184
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between gap-2 text-muted-foreground", children: [
185
- title && /* @__PURE__ */ jsx2("span", { className: "truncate text-foreground", children: title }),
186
- /* @__PURE__ */ jsx2("span", { "data-job-progress-label": "", "aria-live": "polite", children: progress.label })
187
- ] }),
188
- /* @__PURE__ */ jsx2(
189
- "div",
190
- {
191
- role: "progressbar",
192
- "aria-label": title ?? "Generation progress",
193
- "aria-valuemin": 0,
194
- "aria-valuemax": 100,
195
- "aria-valuenow": progress.percent,
196
- "aria-valuetext": `${progress.percent}%, ${progress.label}`,
197
- className: "h-1.5 w-full overflow-hidden rounded-full bg-muted",
198
- children: /* @__PURE__ */ jsx2(
199
- "div",
200
- {
201
- className: "h-full rounded-full bg-primary transition-[width] duration-500",
202
- style: { width: `${progress.percent}%`, background: "var(--primary, currentColor)" }
203
- }
204
- )
205
- }
206
- )
207
- ] });
208
- };
209
-
210
- export {
211
- useGenerationPlan,
212
- useJobProgress,
213
- GenerationSettings,
214
- JobProgress
215
- };
216
- //# sourceMappingURL=chunk-7SPRQZ6H.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/generation/useGenerationPlan.ts","../src/generation/GenerationSettings.tsx","../src/generation/JobProgress.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport {\n estimateJobProgress,\n planGenerationRequest,\n type GenerationPlan,\n type GenerationRequest,\n type JobProgressEstimate,\n type ModelCapabilities,\n type PlanOptions,\n} from '@pixerate/editor/generation';\n\n/**\n * Plans `request` against `capabilities` (see `planGenerationRequest`) and\n * returns the adjusted request, adjustments and errors. Recomputed only when\n * the request, capabilities or options change by value, so inline objects are fine.\n */\nexport function useGenerationPlan(\n request: GenerationRequest,\n capabilities: ModelCapabilities,\n options: PlanOptions = {},\n): GenerationPlan {\n const key = JSON.stringify([request, capabilities, options]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useMemo(() => planGenerationRequest(request, capabilities, options), [key]);\n}\n\nexport interface UseJobProgressOptions {\n startedAt: number | Date | string;\n expectedMs?: number;\n done?: boolean;\n /** Fixed current time (disables ticking; useful for SSR and tests). */\n now?: number | Date | string;\n /** Re-render interval while running in ms (default 1000). */\n intervalMs?: number;\n}\n\n/** Ticking `estimateJobProgress` for a running job; stops ticking when `done`. */\nexport function useJobProgress(options: UseJobProgressOptions): JobProgressEstimate {\n const { startedAt, expectedMs, done, now, intervalMs = 1000 } = options;\n const [tick, setTick] = useState(() => Date.now());\n const ticking = !done && now === undefined;\n useEffect(() => {\n if (!ticking) return;\n setTick(Date.now());\n const id = setInterval(() => setTick(Date.now()), Math.max(16, intervalMs));\n return () => clearInterval(id);\n }, [ticking, intervalMs]);\n return estimateJobProgress({ startedAt, expectedMs, done, now: now ?? tick });\n}\n","import React, { useId, useMemo } from 'react';\nimport {\n getGenerationControls,\n getReferenceSlots,\n getRequestValue,\n parseControlValue,\n removeReference,\n setRequestValue,\n type GenerationControl,\n type GenerationPlan,\n type GenerationReference,\n type GenerationRequest,\n type ModelCapabilities,\n type PlanStrategy,\n type ReferenceRole,\n} from '@pixerate/editor/generation';\nimport { useGenerationPlan } from './useGenerationPlan';\n\nexport interface GenerationSettingsProps {\n capabilities: ModelCapabilities;\n /** The request being edited (controlled). */\n value: GenerationRequest;\n onChange: (next: GenerationRequest) => void;\n /** A plan computed elsewhere; otherwise one is computed with `strategy`. */\n plan?: GenerationPlan;\n /** Strategy for the built-in plan (default `nearest`). */\n strategy?: PlanStrategy;\n /** List plan adjustments and errors under the controls (default `true`). */\n showAdjustments?: boolean;\n /** Shows an \"Add\" button per reference role; you pick the asset and call `onChange`. */\n onAddReference?: (role: ReferenceRole) => void;\n /** Custom rendering of a reference chip (default: its id). */\n renderReference?: (reference: GenerationReference) => React.ReactNode;\n className?: string;\n}\n\nconst inputClass =\n 'w-full rounded-md border border-border bg-background px-2 py-1 text-sm outline-none focus:ring-1 focus:ring-ring';\n\nfunction Control({\n control,\n value,\n id,\n onValue,\n}: {\n control: GenerationControl;\n value: unknown;\n id: string;\n onValue: (value: unknown) => void;\n}) {\n const shown = value ?? control.defaultValue;\n if (control.kind === 'checkbox') {\n return (\n <input\n id={id}\n type=\"checkbox\"\n data-field={control.key}\n checked={Boolean(shown)}\n onChange={(e) => onValue(parseControlValue(control, e.target.checked))}\n />\n );\n }\n if (control.kind === 'select') {\n return (\n <select\n id={id}\n data-field={control.key}\n className={inputClass}\n value={shown === undefined ? '' : String(shown)}\n onChange={(e) => onValue(parseControlValue(control, e.target.value))}\n >\n {shown === undefined && <option value=\"\">Default</option>}\n {control.options!.map((option) => (\n <option key={String(option.value)} value={String(option.value)}>\n {option.label}\n </option>\n ))}\n </select>\n );\n }\n if (control.kind === 'textarea') {\n return (\n <textarea\n id={id}\n data-field={control.key}\n className={inputClass}\n rows={2}\n maxLength={control.maxLength}\n value={typeof value === 'string' ? value : ''}\n onChange={(e) => onValue(parseControlValue(control, e.target.value))}\n />\n );\n }\n const numeric = typeof shown === 'number' ? shown : undefined;\n return (\n <div className=\"flex items-center gap-2\">\n <input\n id={id}\n type={control.kind === 'range' ? 'range' : 'number'}\n data-field={control.key}\n className={control.kind === 'range' ? 'flex-1' : inputClass}\n min={control.min}\n max={control.max}\n step={control.step ?? 'any'}\n value={numeric ?? (control.kind === 'range' ? (control.min ?? 0) : '')}\n onChange={(e) => onValue(parseControlValue(control, e.target.value))}\n />\n {control.kind === 'range' && (\n <span className=\"w-10 text-right tabular-nums text-muted-foreground\" data-field-value=\"\">\n {numeric ?? '–'}\n </span>\n )}\n </div>\n );\n}\n\n/**\n * Headless-styled settings form generated from a model's capabilities:\n * selects for choices, sliders/number inputs for ranges, text areas for\n * negative/system prompts, checkboxes for boolean params, reference slots by\n * role, and the plan's adjustments and errors. Controlled via `value` / `onChange`.\n */\nexport const GenerationSettings: React.FC<GenerationSettingsProps> = ({\n capabilities,\n value,\n onChange,\n plan: planProp,\n strategy,\n showAdjustments = true,\n onAddReference,\n renderReference,\n className = '',\n}) => {\n const baseId = useId();\n const controls = useMemo(() => getGenerationControls(capabilities), [capabilities]);\n const computed = useGenerationPlan(value, capabilities, { strategy });\n const plan = planProp ?? computed;\n const slots = getReferenceSlots(capabilities, value);\n\n return (\n <div className={`flex flex-col gap-3 text-sm ${className}`} data-generation-settings=\"\" data-model={capabilities.id}>\n {controls.map((control) => {\n const id = `${baseId}-${control.key}`;\n return (\n <div key={control.key} className=\"flex flex-col gap-1\" data-control={control.key}>\n <label htmlFor={id} className=\"text-xs font-medium text-muted-foreground\" title={control.description}>\n {control.label}\n </label>\n <Control\n control={control}\n id={id}\n value={getRequestValue(value, control.key)}\n onValue={(next) => onChange(setRequestValue(value, control.key, next))}\n />\n </div>\n );\n })}\n\n {slots.map((slot) => (\n <fieldset key={slot.role} className=\"flex flex-col gap-1\" data-reference-role={slot.role}>\n <legend className=\"text-xs font-medium text-muted-foreground\" title={slot.description}>\n {slot.label}{' '}\n <span className=\"tabular-nums\" data-reference-count=\"\">\n ({slot.references.length}/{slot.max})\n </span>\n {slot.min > 0 && <span className=\"text-destructive\"> *</span>}\n </legend>\n <ul className=\"flex flex-wrap gap-1\">\n {slot.references.map((ref) => (\n <li key={ref.id} className=\"flex items-center gap-1 rounded border border-border px-1.5 py-0.5\" data-reference-id={ref.id}>\n {renderReference ? renderReference(ref) : <span className=\"max-w-[10rem] truncate\">{ref.id}</span>}\n <button\n type=\"button\"\n aria-label={`Remove ${slot.label} ${ref.id}`}\n className=\"text-muted-foreground hover:text-foreground\"\n onClick={() => onChange(removeReference(value, slot.role, ref.id))}\n >\n ×\n </button>\n </li>\n ))}\n {onAddReference && slot.canAdd && (\n <li>\n <button\n type=\"button\"\n className=\"rounded border border-dashed border-border px-1.5 py-0.5 text-muted-foreground hover:text-foreground\"\n onClick={() => onAddReference(slot.role)}\n >\n Add\n </button>\n </li>\n )}\n </ul>\n </fieldset>\n ))}\n\n {showAdjustments && plan.adjustments.length > 0 && (\n <ul role=\"status\" className=\"flex flex-col gap-0.5 text-xs text-muted-foreground\" data-generation-adjustments=\"\">\n {plan.adjustments.map((adjustment, index) => (\n <li key={index} data-adjustment-field={adjustment.field} data-adjustment-kind={adjustment.kind}>\n {adjustment.reason}\n </li>\n ))}\n </ul>\n )}\n {showAdjustments && plan.errors.length > 0 && (\n <ul role=\"alert\" className=\"flex flex-col gap-0.5 text-xs text-destructive\" data-generation-errors=\"\">\n {plan.errors.map((error, index) => (\n <li key={index} data-error-field={error.field}>\n {error.message}\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n};\n","import React from 'react';\nimport { useJobProgress, type UseJobProgressOptions } from './useGenerationPlan';\n\nexport interface JobProgressProps extends UseJobProgressOptions {\n /** Text shown before the time label, e.g. the model name. */\n title?: string;\n /** Extra classes for the root. */\n className?: string;\n}\n\n/**\n * Headless-styled progress bar for a generation job that reports no progress\n * of its own: time-based percent (held at 95% until `done`) with a\n * \"~2m left\" / \"Almost done…\" label. Exposes `role=\"progressbar\"`.\n */\nexport const JobProgress: React.FC<JobProgressProps> = ({ title, className = '', ...options }) => {\n const progress = useJobProgress(options);\n return (\n <div className={`flex flex-col gap-1 text-sm ${className}`} data-job-progress=\"\" data-done={options.done ? '' : undefined}>\n <div className=\"flex items-center justify-between gap-2 text-muted-foreground\">\n {title && <span className=\"truncate text-foreground\">{title}</span>}\n <span data-job-progress-label=\"\" aria-live=\"polite\">\n {progress.label}\n </span>\n </div>\n <div\n role=\"progressbar\"\n aria-label={title ?? 'Generation progress'}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={progress.percent}\n aria-valuetext={`${progress.percent}%, ${progress.label}`}\n className=\"h-1.5 w-full overflow-hidden rounded-full bg-muted\"\n >\n <div\n className=\"h-full rounded-full bg-primary transition-[width] duration-500\"\n style={{ width: `${progress.percent}%`, background: 'var(--primary, currentColor)' }}\n />\n </div>\n </div>\n );\n};\n"],"mappings":";AAAA,SAAS,WAAW,SAAS,gBAAgB;AAC7C;AAAA,EACE;AAAA,EACA;AAAA,OAMK;AAOA,SAAS,kBACd,SACA,cACA,UAAuB,CAAC,GACR;AAChB,QAAM,MAAM,KAAK,UAAU,CAAC,SAAS,cAAc,OAAO,CAAC;AAE3D,SAAO,QAAQ,MAAM,sBAAsB,SAAS,cAAc,OAAO,GAAG,CAAC,GAAG,CAAC;AACnF;AAaO,SAAS,eAAe,SAAqD;AAClF,QAAM,EAAE,WAAW,YAAY,MAAM,KAAK,aAAa,IAAK,IAAI;AAChE,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,MAAM,KAAK,IAAI,CAAC;AACjD,QAAM,UAAU,CAAC,QAAQ,QAAQ;AACj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