@pixerate/editor 0.126.0 → 0.128.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 (125) hide show
  1. package/dist/agent/index.cjs +2 -2
  2. package/dist/agent/index.d.cts +3 -3
  3. package/dist/agent/index.d.ts +3 -3
  4. package/dist/agent/index.js +1 -1
  5. package/dist/animation/index.d.cts +2 -3
  6. package/dist/animation/index.d.ts +2 -3
  7. package/dist/animation-editor/index.cjs +63 -63
  8. package/dist/animation-editor/index.cjs.map +1 -1
  9. package/dist/animation-editor/index.d.cts +7 -9
  10. package/dist/animation-editor/index.d.ts +7 -9
  11. package/dist/animation-editor/index.js +10 -10
  12. package/dist/{arrange-BlfgJ_wt.d.ts → arrange-BUREmgD9.d.ts} +1 -1
  13. package/dist/{arrange-CD6Gh-pd.d.cts → arrange-CKXK_hf7.d.cts} +1 -1
  14. package/dist/{bezier-CWv6LQal.d.ts → bezier-CvgQiYRg.d.cts} +23 -3
  15. package/dist/{bezier-CBzKKDjl.d.cts → bezier-DP4NnJp3.d.ts} +23 -3
  16. package/dist/{brushTypes-IG7ZZjIN.d.cts → brushTypes-C7N3EBK7.d.cts} +56 -1
  17. package/dist/{brushTypes-IG7ZZjIN.d.ts → brushTypes-C7N3EBK7.d.ts} +56 -1
  18. package/dist/{brushstrokeRender-EELTV7U4.cjs → brushstrokeRender-JNHVEUFG.cjs} +29 -10
  19. package/dist/brushstrokeRender-JNHVEUFG.cjs.map +1 -0
  20. package/dist/{brushstrokeRender-LRV7GXGD.js → brushstrokeRender-SII6MG4R.js} +25 -6
  21. package/dist/brushstrokeRender-SII6MG4R.js.map +1 -0
  22. package/dist/{builtins-DMIsnNst.d.cts → builtins-Cc-bH-3U.d.cts} +3 -2
  23. package/dist/{builtins-B5-ipm5u.d.ts → builtins-ZU1GJnUA.d.ts} +3 -2
  24. package/dist/canvas/index.cjs +435 -38
  25. package/dist/canvas/index.cjs.map +1 -1
  26. package/dist/canvas/index.d.cts +206 -16
  27. package/dist/canvas/index.d.ts +206 -16
  28. package/dist/canvas/index.js +408 -11
  29. package/dist/canvas/index.js.map +1 -1
  30. package/dist/{chunk-MPQAO33O.js → chunk-A6KHMKI4.js} +3 -3
  31. package/dist/{chunk-V5YGPRCZ.cjs → chunk-BEGEWQHD.cjs} +41 -41
  32. package/dist/{chunk-V5YGPRCZ.cjs.map → chunk-BEGEWQHD.cjs.map} +1 -1
  33. package/dist/{chunk-N3FVUOZD.cjs → chunk-BJTCSLF6.cjs} +7 -7
  34. package/dist/{chunk-N3FVUOZD.cjs.map → chunk-BJTCSLF6.cjs.map} +1 -1
  35. package/dist/{chunk-7LQO6OHH.cjs → chunk-DDSO4HS7.cjs} +9 -5
  36. package/dist/chunk-DDSO4HS7.cjs.map +1 -0
  37. package/dist/{chunk-AKU2KQ47.cjs → chunk-DFSZO2B5.cjs} +70 -3
  38. package/dist/chunk-DFSZO2B5.cjs.map +1 -0
  39. package/dist/{chunk-WUDPFWAN.js → chunk-F7Q2NE2Y.js} +3 -3
  40. package/dist/{chunk-GUZ47CJM.cjs → chunk-IZ4WRXZA.cjs} +1 -1
  41. package/dist/{chunk-GUZ47CJM.cjs.map → chunk-IZ4WRXZA.cjs.map} +1 -1
  42. package/dist/{chunk-GLWZXQ4Q.js → chunk-KHNZ6MOU.js} +1 -1
  43. package/dist/chunk-KHNZ6MOU.js.map +1 -0
  44. package/dist/{chunk-GCJWMEYW.cjs → chunk-KSJLDRHK.cjs} +46 -46
  45. package/dist/{chunk-GCJWMEYW.cjs.map → chunk-KSJLDRHK.cjs.map} +1 -1
  46. package/dist/{chunk-2SDGZAJR.js → chunk-LSXXAJG3.js} +70 -3
  47. package/dist/chunk-LSXXAJG3.js.map +1 -0
  48. package/dist/{chunk-QQKTOA4U.cjs → chunk-ORE334I6.cjs} +132 -132
  49. package/dist/{chunk-QQKTOA4U.cjs.map → chunk-ORE334I6.cjs.map} +1 -1
  50. package/dist/{chunk-X6KTSFAE.js → chunk-Q4NBEVV5.js} +2 -2
  51. package/dist/{chunk-FPRIUR4T.js → chunk-ROZFX4QI.js} +3 -3
  52. package/dist/{chunk-J67OLQUQ.js → chunk-SVYE5HIM.js} +7 -3
  53. package/dist/chunk-SVYE5HIM.js.map +1 -0
  54. package/dist/{chunk-O5RVCDEC.cjs → chunk-XLUYXUBD.cjs} +88 -88
  55. package/dist/{chunk-O5RVCDEC.cjs.map → chunk-XLUYXUBD.cjs.map} +1 -1
  56. package/dist/{chunk-FG274FYT.js → chunk-YGJIER2R.js} +2 -2
  57. package/dist/commands/index.cjs +2 -2
  58. package/dist/commands/index.d.cts +3 -3
  59. package/dist/commands/index.d.ts +3 -3
  60. package/dist/commands/index.js +1 -1
  61. package/dist/effects/index.d.cts +6 -38
  62. package/dist/effects/index.d.ts +6 -38
  63. package/dist/evaluate-BbCeF6pt.d.ts +114 -0
  64. package/dist/evaluate-BsxYieLN.d.cts +114 -0
  65. package/dist/{export-Bp7ji2r4.d.cts → export-BkYQvV56.d.cts} +4 -4
  66. package/dist/{export-DVl4fWy5.d.cts → export-Cbr9IqpJ.d.cts} +1 -1
  67. package/dist/{export-C1s4eolZ.d.ts → export-ClPKUB-v.d.ts} +1 -1
  68. package/dist/{export-DAyPY94f.d.ts → export-DHrFJ8r_.d.ts} +4 -4
  69. package/dist/{helpers-i95Ob6Vi.d.cts → helpers-C5aAd44p.d.cts} +67 -4
  70. package/dist/{helpers-BBLlekuM.d.ts → helpers-CPWcK504.d.ts} +67 -4
  71. package/dist/image-editor/index.cjs +606 -606
  72. package/dist/image-editor/index.cjs.map +1 -1
  73. package/dist/image-editor/index.d.cts +12 -14
  74. package/dist/image-editor/index.d.ts +12 -14
  75. package/dist/image-editor/index.js +4 -4
  76. package/dist/{opentype-D80AVmMu.d.cts → opentype-BOewaGQx.d.cts} +1 -1
  77. package/dist/{opentype-14PDI5D2.d.ts → opentype-sQrF3Ry1.d.ts} +1 -1
  78. package/dist/paint/index.d.cts +2 -2
  79. package/dist/paint/index.d.ts +2 -2
  80. package/dist/paint-editor/index.cjs +9 -9
  81. package/dist/paint-editor/index.cjs.map +1 -1
  82. package/dist/paint-editor/index.d.cts +9 -11
  83. package/dist/paint-editor/index.d.ts +9 -11
  84. package/dist/paint-editor/index.js +4 -4
  85. package/dist/{pathfinder-DjISxkUv.d.ts → pathfinder-BwJx0_zM.d.ts} +2 -2
  86. package/dist/{pathfinder-C0UoFypx.d.cts → pathfinder-CnkW7zLI.d.cts} +2 -2
  87. package/dist/{player-cGLrngL_.d.ts → player-BK2kKbfd.d.ts} +1 -1
  88. package/dist/{player-CBtEoU2x.d.cts → player-CmbY3218.d.cts} +1 -1
  89. package/dist/pool-C7GtrL34.d.cts +34 -0
  90. package/dist/pool-CTrtciaN.d.ts +34 -0
  91. package/dist/{rand-CfinE-1c.d.cts → rand-DTXAssW1.d.cts} +4 -4
  92. package/dist/{rand-DtazXGOB.d.ts → rand-pQQ2sJTk.d.ts} +4 -4
  93. package/dist/{svg-DJKriJ4A.d.ts → svg-C4LlFnEw.d.cts} +2 -3
  94. package/dist/{svg-BkRL-fZJ.d.cts → svg-CUzZa0EO.d.ts} +2 -3
  95. package/dist/{tools-CM8Oe8F3.d.ts → tools-AugT22z3.d.ts} +1 -1
  96. package/dist/{tools-DZCv2kX1.d.cts → tools-BpCmUNxb.d.cts} +1 -1
  97. package/dist/vector/index.cjs +918 -918
  98. package/dist/vector/index.cjs.map +1 -1
  99. package/dist/vector/index.d.cts +11 -13
  100. package/dist/vector/index.d.ts +11 -13
  101. package/dist/vector/index.js +11 -11
  102. package/dist/video-editor/index.d.cts +6 -8
  103. package/dist/video-editor/index.d.ts +6 -8
  104. package/dist/{warp-k_PdtXOG.d.ts → warp-CIsO617e.d.ts} +1 -1
  105. package/dist/{warp-CH9MM435.d.cts → warp-D62N_5VK.d.cts} +1 -1
  106. package/package.json +1 -1
  107. package/skills/pixerate-canvas/SKILL.md +30 -2
  108. package/dist/behavior-Ymbld6jL.d.cts +0 -60
  109. package/dist/behavior-Ymbld6jL.d.ts +0 -60
  110. package/dist/brushstrokeRender-EELTV7U4.cjs.map +0 -1
  111. package/dist/brushstrokeRender-LRV7GXGD.js.map +0 -1
  112. package/dist/chunk-2SDGZAJR.js.map +0 -1
  113. package/dist/chunk-7LQO6OHH.cjs.map +0 -1
  114. package/dist/chunk-AKU2KQ47.cjs.map +0 -1
  115. package/dist/chunk-GLWZXQ4Q.js.map +0 -1
  116. package/dist/chunk-J67OLQUQ.js.map +0 -1
  117. package/dist/evaluate-2S3vSPLy.d.cts +0 -55
  118. package/dist/evaluate-CfmT6xA3.d.ts +0 -55
  119. package/dist/gradient-KDfCvhuj.d.cts +0 -66
  120. package/dist/gradient-KDfCvhuj.d.ts +0 -66
  121. /package/dist/{chunk-MPQAO33O.js.map → chunk-A6KHMKI4.js.map} +0 -0
  122. /package/dist/{chunk-WUDPFWAN.js.map → chunk-F7Q2NE2Y.js.map} +0 -0
  123. /package/dist/{chunk-X6KTSFAE.js.map → chunk-Q4NBEVV5.js.map} +0 -0
  124. /package/dist/{chunk-FPRIUR4T.js.map → chunk-ROZFX4QI.js.map} +0 -0
  125. /package/dist/{chunk-FG274FYT.js.map → chunk-YGJIER2R.js.map} +0 -0
@@ -16,7 +16,7 @@ import {
16
16
  solveMonotone,
17
17
  subSegment,
18
18
  windingNumber
19
- } from "./chunk-FG274FYT.js";
19
+ } from "./chunk-YGJIER2R.js";
20
20
 
21
21
  // src/canvas/pathops/planar.ts
22
22
  var twin = (h) => h ^ 1;
@@ -734,4 +734,4 @@ export {
734
734
  PATHFINDER_OPERATIONS,
735
735
  pathfinder
736
736
  };
737
- //# sourceMappingURL=chunk-X6KTSFAE.js.map
737
+ //# sourceMappingURL=chunk-Q4NBEVV5.js.map
@@ -27,14 +27,14 @@ import {
27
27
  transformBezierPath,
28
28
  trimSegments,
29
29
  windingNumber
30
- } from "./chunk-FG274FYT.js";
30
+ } from "./chunk-YGJIER2R.js";
31
31
  import {
32
32
  angleToSvgLinearCoords,
33
33
  fitCubicRun,
34
34
  fitCubics,
35
35
  formatNumber,
36
36
  isStraightCubic
37
- } from "./chunk-GLWZXQ4Q.js";
37
+ } from "./chunk-KHNZ6MOU.js";
38
38
  import {
39
39
  oklabToRgb,
40
40
  rgbToOklab
@@ -10037,4 +10037,4 @@ export {
10037
10037
  lineSubpath,
10038
10038
  roundSubpaths
10039
10039
  };
10040
- //# sourceMappingURL=chunk-FPRIUR4T.js.map
10040
+ //# sourceMappingURL=chunk-ROZFX4QI.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseSvgPath
3
- } from "./chunk-GLWZXQ4Q.js";
3
+ } from "./chunk-KHNZ6MOU.js";
4
4
 
5
5
  // src/canvas/brushstroke.ts
6
6
  function isBrushedShape(shape) {
@@ -74,7 +74,7 @@ function profileAlongPolyline(points, values, count = 32) {
74
74
  var round3 = (v) => Math.round(v * 1e3) / 1e3;
75
75
  var loading = null;
76
76
  function loadCanvasBrushstrokeRenderer() {
77
- loading ??= import("./brushstrokeRender-LRV7GXGD.js").catch((error) => {
77
+ loading ??= import("./brushstrokeRender-SII6MG4R.js").catch((error) => {
78
78
  loading = null;
79
79
  throw error;
80
80
  });
@@ -86,6 +86,9 @@ async function listCanvasBrushes() {
86
86
  async function validateCanvasBrush(brush) {
87
87
  (await loadCanvasBrushstrokeRenderer()).resolveCanvasBrush(brush, 1);
88
88
  }
89
+ async function validateCanvasBrushPaint(paint) {
90
+ (await loadCanvasBrushstrokeRenderer()).resolveCanvasPaint(paint);
91
+ }
89
92
  async function renderShapeBrushstroke(shape, options = {}) {
90
93
  if (!isBrushedShape(shape)) return null;
91
94
  return (await loadCanvasBrushstrokeRenderer()).renderShapeBrushstrokeNow(shape, options.scale ?? 1);
@@ -102,7 +105,8 @@ export {
102
105
  loadCanvasBrushstrokeRenderer,
103
106
  listCanvasBrushes,
104
107
  validateCanvasBrush,
108
+ validateCanvasBrushPaint,
105
109
  renderShapeBrushstroke,
106
110
  getBrushedShapeSvg
107
111
  };
108
- //# sourceMappingURL=chunk-J67OLQUQ.js.map
112
+ //# sourceMappingURL=chunk-SVYE5HIM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/canvas/brushstroke.ts"],"sourcesContent":["/**\n * Brushed freehand strokes: a path shape with a `brush` keeps its path (selection, editing, eraser\n * hit-testing, grouping and export work as for any path) and is drawn with the paint engine's\n * dry brushstroke renderer instead of an SVG stroke. The renderer, the paint presets and the colour\n * parser live in a separate chunk, loaded the first time a brushed stroke is drawn, so canvases\n * without brushes never load the paint engine.\n */\nimport { brushstrokeScaleBucket } from '../paint/brushstroke-scale.js';\nimport { parseSvgPath, type PathShape, type ShapeDescription, type ShapeSize } from './shapeGeometry.js';\nimport type { Point } from './types.js';\nimport type { CanvasBrush, CanvasBrushPaint, CanvasBrushPreset, CanvasBrushstroke } from './brushTypes.js';\n\nexport type { CanvasBrush, CanvasBrushPaint, CanvasBrushPaintMapping, CanvasBrushPaintStop, CanvasBrushPreset, CanvasBrushSettings, CanvasBrushstroke } from './brushTypes.js';\n\nexport { brushstrokeScaleBucket };\n\n/** A brushed stroke's image, placed in the path's coordinates (the shape's view box). */\nexport interface CanvasBrushstrokeImage {\n\t/** PNG data URL. */\n\thref: string;\n\tx: number;\n\ty: number;\n\twidth: number;\n\theight: number;\n\t/** Image pixels per path unit. */\n\tscale: number;\n}\n\n/** A path shape with a brush. */\nexport type BrushedPathShape = PathShape & { brush: CanvasBrushstroke };\n\n/** Whether a shape is a brushed stroke. */\nexport function isBrushedShape(shape: ShapeDescription | null | undefined): shape is BrushedPathShape {\n\treturn !!shape && shape.kind === 'path' && !!shape.brush && typeof shape.brush === 'object' && shape.brush.brush != null;\n}\n\n/**\n * The open polyline of a path's first subpath, in path coordinates: lines kept, curves sampled\n * every `step` units or so. Brushed strokes are drawn along it.\n */\nexport function pathDataToPolyline(d: string, step = 2): Point[] {\n\tconst out: Point[] = [];\n\tlet x = 0;\n\tlet y = 0;\n\tlet started = false;\n\tconst push = (px: number, py: number) => {\n\t\tconst last = out[out.length - 1];\n\t\tif (!last || last[0] !== px || last[1] !== py) out.push([px, py]);\n\t};\n\tfor (const c of parseSvgPath(d)) {\n\t\tif (c.type === 'M') {\n\t\t\tif (started) break;\n\t\t\tstarted = true;\n\t\t\tx = c.x;\n\t\t\ty = c.y;\n\t\t\tpush(x, y);\n\t\t} else if (c.type === 'Z') {\n\t\t\tif (out.length) push(out[0][0], out[0][1]);\n\t\t\tbreak;\n\t\t} else if (c.type === 'C' || c.type === 'Q') {\n\t\t\tconst pts = c.type === 'C' ? [[x, y], [c.x1, c.y1], [c.x2, c.y2], [c.x, c.y]] : [[x, y], [c.x1, c.y1], [c.x, c.y]];\n\t\t\tlet hull = 0;\n\t\t\tfor (let i = 1; i < pts.length; i++) hull += Math.hypot(pts[i][0] - pts[i - 1][0], pts[i][1] - pts[i - 1][1]);\n\t\t\tconst n = Math.max(1, Math.min(256, Math.ceil(hull / Math.max(0.25, step))));\n\t\t\tfor (let k = 1; k <= n; k++) {\n\t\t\t\tconst t = k / n;\n\t\t\t\tconst u = 1 - t;\n\t\t\t\tif (c.type === 'C') {\n\t\t\t\t\tpush(\n\t\t\t\t\t\tu * u * u * x + 3 * u * u * t * c.x1 + 3 * u * t * t * c.x2 + t * t * t * c.x,\n\t\t\t\t\t\tu * u * u * y + 3 * u * u * t * c.y1 + 3 * u * t * t * c.y2 + t * t * t * c.y\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tpush(u * u * x + 2 * u * t * c.x1 + t * t * c.x, u * u * y + 2 * u * t * c.y1 + t * t * c.y);\n\t\t\t\t}\n\t\t\t}\n\t\t\tx = c.x;\n\t\t\ty = c.y;\n\t\t} else {\n\t\t\t// Lines, and arcs as their chords (freehand paths have none).\n\t\t\tx = c.x;\n\t\t\ty = c.y;\n\t\t\tpush(x, y);\n\t\t}\n\t}\n\treturn out;\n}\n\n/**\n * Resamples per-point values into `count` values spread evenly along the polyline's length (the\n * profile a brushed stroke stores). Values are rounded to three decimals.\n */\nexport function profileAlongPolyline(points: readonly Point[], values: readonly number[], count = 32): number[] {\n\tconst n = Math.min(points.length, values.length);\n\tif (n === 0) return [];\n\tif (n === 1) return [round3(values[0])];\n\tconst lengths = [0];\n\tfor (let i = 1; i < n; i++) lengths.push(lengths[i - 1] + Math.hypot(points[i][0] - points[i - 1][0], points[i][1] - points[i - 1][1]));\n\tconst total = lengths[n - 1];\n\tconst m = Math.max(2, Math.min(count, n));\n\tconst out: number[] = [];\n\tlet j = 0;\n\tfor (let k = 0; k < m; k++) {\n\t\tconst at = total > 0 ? (total * k) / (m - 1) : 0;\n\t\twhile (j < n - 2 && lengths[j + 1] < at) j++;\n\t\tconst span = lengths[j + 1] - lengths[j];\n\t\tconst f = span > 0 ? Math.min(1, Math.max(0, (at - lengths[j]) / span)) : 0;\n\t\tout.push(round3(values[j] + (values[j + 1] - values[j]) * f));\n\t}\n\treturn out;\n}\n\nconst round3 = (v: number) => Math.round(v * 1000) / 1000;\n\n// ---------------------------------------------------------------------------\n// The lazily loaded renderer\n// ---------------------------------------------------------------------------\n\n/** The renderer chunk (`./brushstrokeRender.ts`). */\nexport interface CanvasBrushstrokeRenderer {\n\tlistCanvasBrushes(): CanvasBrushPreset[];\n\t/** Throws for an unknown or non-dry brush; the result is the paint engine's brush. */\n\tresolveCanvasBrush(brush: CanvasBrush, width: number): unknown;\n\t/** Throws for paint that is not a colour or gradient paint a canvas stroke can use; the result is the paint engine's `PaintSource`. */\n\tresolveCanvasPaint(paint: unknown): unknown;\n\trenderShapeBrushstrokeNow(shape: BrushedPathShape, scale: number): CanvasBrushstrokeImage | null;\n\tbrushedShapeSvgNow(shape: BrushedPathShape, size: ShapeSize, scale: number): string;\n}\n\nlet loading: Promise<CanvasBrushstrokeRenderer> | null = null;\n\n/**\n * Loads the brushstroke renderer (the paint engine's dry brushes, the paint presets and a CSS\n * colour parser). Called for you by the functions below; call it early to warm up.\n */\nexport function loadCanvasBrushstrokeRenderer(): Promise<CanvasBrushstrokeRenderer> {\n\tloading ??= (import('./brushstrokeRender.js') as Promise<CanvasBrushstrokeRenderer>).catch((error) => {\n\t\tloading = null;\n\t\tthrow error;\n\t});\n\treturn loading;\n}\n\n/** The dry paint presets a freehand stroke can use (wet, mixer, blender, smudge and eraser presets are left out). */\nexport async function listCanvasBrushes(): Promise<CanvasBrushPreset[]> {\n\treturn (await loadCanvasBrushstrokeRenderer()).listCanvasBrushes();\n}\n\n/**\n * Checks a brush: an unknown preset id, a wet (or other non-dry) preset, or settings that are not\n * an object throw an error saying which presets can be used.\n */\nexport async function validateCanvasBrush(brush: CanvasBrush): Promise<void> {\n\t(await loadCanvasBrushstrokeRenderer()).resolveCanvasBrush(brush, 1);\n}\n\n/**\n * Checks a brushed stroke's `paint` (a colour or gradient paint): bad stops, an unknown mapping,\n * or a mapping that needs timed samples (`velocity`, `time`) throw an error saying what to use.\n */\nexport async function validateCanvasBrushPaint(paint: CanvasBrushPaint): Promise<void> {\n\t(await loadCanvasBrushstrokeRenderer()).resolveCanvasPaint(paint);\n}\n\nexport interface RenderShapeBrushstrokeOptions {\n\t/** Image pixels per path unit; pass `brushstrokeScaleBucket(zoom × node scale, devicePixelRatio)` (default 1). */\n\tscale?: number;\n}\n\n/**\n * Renders a brushed path shape to a cached PNG placed in path coordinates, or null for a shape\n * without a brush or an empty path. Throws for an unknown or non-dry brush.\n */\nexport async function renderShapeBrushstroke(shape: ShapeDescription, options: RenderShapeBrushstrokeOptions = {}): Promise<CanvasBrushstrokeImage | null> {\n\tif (!isBrushedShape(shape)) return null;\n\treturn (await loadCanvasBrushstrokeRenderer()).renderShapeBrushstrokeNow(shape, options.scale ?? 1);\n}\n\n/**\n * The brushed stroke as a standalone SVG document of `size` (the node box), with the image\n * embedded as a PNG data URL: what an SVG export writes for the node. Shapes without a brush give\n * null (export them as paths).\n */\nexport async function getBrushedShapeSvg(shape: ShapeDescription, size: ShapeSize, options: RenderShapeBrushstrokeOptions = {}): Promise<string | null> {\n\tif (!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