@plait/core 0.52.0 → 0.54.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/constants/cursor.d.ts +1 -0
- package/constants/selection.d.ts +1 -0
- package/esm2022/board/board.component.mjs +8 -6
- package/esm2022/constants/cursor.mjs +2 -1
- package/esm2022/constants/selection.mjs +2 -1
- package/esm2022/interfaces/board.mjs +5 -1
- package/esm2022/interfaces/path.mjs +2 -2
- package/esm2022/interfaces/rectangle-client.mjs +4 -1
- package/esm2022/interfaces/selection.mjs +2 -2
- package/esm2022/plugins/create-board.mjs +9 -6
- package/esm2022/plugins/with-hotkey.mjs +3 -3
- package/esm2022/plugins/with-moving.mjs +41 -21
- package/esm2022/plugins/with-related-fragment.mjs +20 -0
- package/esm2022/plugins/with-selection.mjs +37 -101
- package/esm2022/public-api.mjs +2 -1
- package/esm2022/transforms/element.mjs +2 -2
- package/esm2022/transforms/group.mjs +47 -0
- package/esm2022/transforms/index.mjs +2 -1
- package/esm2022/utils/angle.mjs +114 -0
- package/esm2022/utils/common.mjs +3 -2
- package/esm2022/utils/debug.mjs +91 -0
- package/esm2022/utils/element.mjs +17 -5
- package/esm2022/utils/fragment.mjs +5 -0
- package/esm2022/utils/group.mjs +88 -87
- package/esm2022/utils/helper.mjs +10 -1
- package/esm2022/utils/index.mjs +3 -1
- package/esm2022/utils/math.mjs +11 -1
- package/esm2022/utils/moving-snap.mjs +372 -0
- package/esm2022/utils/selection.mjs +90 -5
- package/esm2022/utils/touch.mjs +15 -4
- package/esm2022/utils/weak-maps.mjs +2 -1
- package/fesm2022/plait-core.mjs +587 -251
- package/fesm2022/plait-core.mjs.map +1 -1
- package/interfaces/board.d.ts +5 -2
- package/interfaces/rectangle-client.d.ts +1 -0
- package/interfaces/selection.d.ts +1 -1
- package/package.json +1 -1
- package/plugins/with-moving.d.ts +1 -1
- package/plugins/with-related-fragment.d.ts +2 -0
- package/public-api.d.ts +1 -0
- package/transforms/group.d.ts +7 -0
- package/transforms/index.d.ts +1 -0
- package/utils/angle.d.ts +18 -0
- package/utils/debug.d.ts +14 -0
- package/utils/fragment.d.ts +2 -0
- package/utils/group.d.ts +16 -16
- package/utils/helper.d.ts +2 -0
- package/utils/index.d.ts +2 -0
- package/utils/math.d.ts +8 -0
- package/utils/{reaction-manager.d.ts → moving-snap.d.ts} +3 -3
- package/utils/selection.d.ts +7 -4
- package/utils/touch.d.ts +1 -1
- package/utils/weak-maps.d.ts +1 -0
- package/esm2022/plugins/with-group.mjs +0 -27
- package/esm2022/utils/reaction-manager.mjs +0 -371
- package/plugins/with-group.d.ts +0 -2
package/interfaces/board.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export interface PlaitBoard {
|
|
|
29
29
|
apply: (operation: PlaitOperation) => void;
|
|
30
30
|
onChange: () => void;
|
|
31
31
|
afterChange: () => void;
|
|
32
|
+
drawActiveRectangle: () => SVGGElement | null;
|
|
32
33
|
mousedown: (event: MouseEvent) => void;
|
|
33
34
|
mousemove: (event: MouseEvent) => void;
|
|
34
35
|
mouseleave: (event: MouseEvent) => void;
|
|
@@ -40,9 +41,9 @@ export interface PlaitBoard {
|
|
|
40
41
|
keyUp: (event: KeyboardEvent) => void;
|
|
41
42
|
setFragment: (data: DataTransfer | null, clipboardContext: WritableClipboardContext | null, rectangle: RectangleClient | null, type: 'copy' | 'cut') => void;
|
|
42
43
|
insertFragment: (data: DataTransfer | null, clipboardData: ClipboardData | null, targetPoint: Point) => void;
|
|
43
|
-
deleteFragment: (data:
|
|
44
|
+
deleteFragment: (data: PlaitElement[]) => void;
|
|
44
45
|
getDeletedFragment: (data: PlaitElement[]) => PlaitElement[];
|
|
45
|
-
getRelatedFragment: (data: PlaitElement[]) => PlaitElement[];
|
|
46
|
+
getRelatedFragment: (data: PlaitElement[], originData?: PlaitElement[]) => PlaitElement[];
|
|
46
47
|
dblClick: (event: MouseEvent) => void;
|
|
47
48
|
drawElement: (context: PlaitPluginElementContext) => SVGGElement[] | ComponentType<PlaitPluginElementComponent>;
|
|
48
49
|
redrawElement: (context: PlaitPluginElementContext, previousContext?: PlaitPluginElementContext) => SVGGElement[] | void;
|
|
@@ -59,6 +60,7 @@ export interface PlaitBoard {
|
|
|
59
60
|
applyTheme: (element: PlaitElement) => void;
|
|
60
61
|
isAlign: (element: PlaitElement) => boolean;
|
|
61
62
|
isImageBindingAllowed: (element: PlaitElement) => boolean;
|
|
63
|
+
canAddToGroup: (element: PlaitElement) => boolean;
|
|
62
64
|
pointerDown: (pointer: PointerEvent) => void;
|
|
63
65
|
pointerMove: (pointer: PointerEvent) => void;
|
|
64
66
|
pointerUp: (pointer: PointerEvent) => void;
|
|
@@ -87,6 +89,7 @@ export interface PlaitBoardMove {
|
|
|
87
89
|
}
|
|
88
90
|
export declare const PlaitBoard: {
|
|
89
91
|
isBoard(value: any): value is PlaitBoard;
|
|
92
|
+
isAlive(board: PlaitBoard): boolean;
|
|
90
93
|
findPath(board: PlaitBoard, node: PlaitNode): Path;
|
|
91
94
|
getHost(board: PlaitBoard): SVGSVGElement;
|
|
92
95
|
getElementHost(board: PlaitBoard): SVGSVGElement;
|
|
@@ -34,6 +34,7 @@ export declare const RectangleClient: {
|
|
|
34
34
|
isEqual: (rectangle: RectangleClient, otherRectangle: RectangleClient) => boolean;
|
|
35
35
|
getCornerPoints: (rectangle: RectangleClient) => [Point, Point, Point, Point];
|
|
36
36
|
getCenterPoint: (rectangle: RectangleClient) => Point;
|
|
37
|
+
getCenterPointByPoints: (points: Point[]) => Point;
|
|
37
38
|
getEdgeCenterPoints: (rectangle: RectangleClient) => [Point, Point, Point, Point];
|
|
38
39
|
getConnectionPoint: (rectangle: RectangleClient, point: PointOfRectangle) => Point;
|
|
39
40
|
expand(rectangle: RectangleClient, left: number, top?: number, right?: number, bottom?: number): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Point } from './point';
|
|
2
2
|
export declare const SELECTION_BORDER_COLOR = "#6698FF";
|
|
3
|
-
export declare const SELECTION_FILL_COLOR = "#
|
|
3
|
+
export declare const SELECTION_FILL_COLOR = "#6698FF25";
|
|
4
4
|
export interface Selection {
|
|
5
5
|
anchor: Point;
|
|
6
6
|
focus: Point;
|
package/package.json
CHANGED
package/plugins/with-moving.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import { PlaitBoard } from '../interfaces/board';
|
|
|
2
2
|
import { PlaitElement } from '../interfaces/element';
|
|
3
3
|
export declare function withMoving(board: PlaitBoard): PlaitBoard;
|
|
4
4
|
export declare function withArrowMoving(board: PlaitBoard): PlaitBoard;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function getSelectedTargetElements(board: PlaitBoard): PlaitElement[];
|
|
6
6
|
export declare function updatePoints(board: PlaitBoard, targetElements: PlaitElement[], offsetX: number, offsetY: number): PlaitElement[];
|
package/public-api.d.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PlaitBoard, PlaitElement } from '../interfaces';
|
|
2
|
+
export declare const addGroup: (board: PlaitBoard, elements?: PlaitElement[]) => void;
|
|
3
|
+
export declare const removeGroup: (board: PlaitBoard, elements?: PlaitElement[]) => void;
|
|
4
|
+
export declare const GroupTransforms: {
|
|
5
|
+
addGroup: (board: PlaitBoard, elements?: PlaitElement[]) => void;
|
|
6
|
+
removeGroup: (board: PlaitBoard, elements?: PlaitElement[]) => void;
|
|
7
|
+
};
|
package/transforms/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ import { SelectionTransforms } from './selection';
|
|
|
4
4
|
import { ViewportTransforms } from './viewport';
|
|
5
5
|
export { BoardTransforms } from './board';
|
|
6
6
|
export { CoreTransforms } from './element';
|
|
7
|
+
export { GroupTransforms } from './group';
|
|
7
8
|
export declare const Transforms: GeneralTransforms & ViewportTransforms & SelectionTransforms & NodeTransforms;
|
package/utils/angle.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PlaitBoard, PlaitElement, Point, RectangleClient } from '../interfaces';
|
|
2
|
+
export declare const rotatePoints: <T>(points: T, centerPoint: Point, angle: number) => T;
|
|
3
|
+
export declare const getSelectionAngle: (elements: PlaitElement[]) => any;
|
|
4
|
+
export declare const hasSameAngle: (elements: PlaitElement[]) => boolean;
|
|
5
|
+
export declare const getRotatedBoundingRectangle: (rectanglesCornerPoints: [Point, Point, Point, Point][], angle: number) => RectangleClient;
|
|
6
|
+
export declare const getOffsetAfterRotate: (rectangle: RectangleClient, rotateCenterPoint: Point, angle: number) => {
|
|
7
|
+
offsetX: number;
|
|
8
|
+
offsetY: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const rotatedDataPoints: (points: Point[], rotateCenterPoint: Point, angle: number) => Point[];
|
|
11
|
+
export declare const hasValidAngle: (node: PlaitElement) => any;
|
|
12
|
+
export declare const rotatePointsByElement: <T>(points: T, element: PlaitElement) => T | null;
|
|
13
|
+
export declare const rotateAntiPointsByElement: <T>(points: T, element: PlaitElement) => T | null;
|
|
14
|
+
export declare const getRectangleByAngle: (rectangle: RectangleClient, angle: number) => RectangleClient | null;
|
|
15
|
+
export declare const isAxisChangedByAngle: (angle: number) => boolean;
|
|
16
|
+
export declare function degreesToRadians(d: number): number;
|
|
17
|
+
export declare function radiansToDegrees(r: number): number;
|
|
18
|
+
export declare function rotateElements(board: PlaitBoard, elements: PlaitElement[], angle: number): void;
|
package/utils/debug.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Options } from 'roughjs/bin/core';
|
|
2
|
+
import { PlaitBoard, Point, RectangleClient } from '../interfaces';
|
|
3
|
+
export declare class DebugGenerator {
|
|
4
|
+
private debugKey;
|
|
5
|
+
constructor(debugKey: string);
|
|
6
|
+
isDebug(): boolean;
|
|
7
|
+
clear(): void;
|
|
8
|
+
drawPolygon(board: PlaitBoard, points: Point[], options?: Options): SVGGElement | undefined;
|
|
9
|
+
drawLine(board: PlaitBoard, points: Point[], options?: Options): SVGGElement | undefined;
|
|
10
|
+
drawRectangle(board: PlaitBoard, data: Point[] | RectangleClient, options?: Options): SVGGElement | undefined;
|
|
11
|
+
drawCircles(board: PlaitBoard, points: Point[], diameter?: number, isCumulativeDiameter?: boolean, options?: Options): SVGGElement[] | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare const createDebugGenerator: (debugKey: string) => DebugGenerator;
|
|
14
|
+
export declare const isDebug: (key?: string) => boolean;
|
package/utils/group.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { PlaitBoard, PlaitElement } from '../interfaces';
|
|
2
|
-
import { PlaitGroup } from '../interfaces/group';
|
|
1
|
+
import { PlaitBoard, PlaitElement, PlaitGroup, RectangleClient } from '../interfaces';
|
|
3
2
|
export declare const getElementsInGroup: (board: PlaitBoard, group: PlaitGroup, recursion?: boolean, includeGroup?: boolean) => PlaitElement[];
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
3
|
+
export declare const getAllElementsInGroup: (board: PlaitBoard, group: PlaitGroup, recursion?: boolean, includeGroup?: boolean) => PlaitElement[];
|
|
4
|
+
export declare const getRectangleByGroup: (board: PlaitBoard, group: PlaitGroup, recursion?: boolean) => RectangleClient;
|
|
5
|
+
export declare const getGroupByElement: (board: PlaitBoard, element: PlaitElement, recursion?: boolean, source?: PlaitElement[]) => PlaitGroup | PlaitGroup[] | null;
|
|
6
6
|
export declare const getHighestGroup: (board: PlaitBoard, element: PlaitElement) => PlaitGroup | null;
|
|
7
7
|
export declare const getElementsInGroupByElement: (board: PlaitBoard, element: PlaitElement) => PlaitElement[];
|
|
8
|
-
export declare const isSelectedElementOrGroup: (board: PlaitBoard, element: PlaitElement) => boolean;
|
|
9
|
-
export declare const isSelectedAllElementsInGroup: (board: PlaitBoard, group: PlaitGroup) => boolean;
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
8
|
+
export declare const isSelectedElementOrGroup: (board: PlaitBoard, element: PlaitElement, elements?: PlaitElement[]) => boolean;
|
|
9
|
+
export declare const isSelectedAllElementsInGroup: (board: PlaitBoard, group: PlaitGroup, elements?: PlaitElement[]) => boolean;
|
|
10
|
+
export declare const filterSelectedGroups: (board: PlaitBoard, groups: PlaitGroup[], elements?: PlaitElement[]) => PlaitGroup[];
|
|
11
|
+
export declare const getSelectedGroups: (board: PlaitBoard, elements?: PlaitElement[]) => PlaitGroup[];
|
|
12
|
+
export declare const getHighestSelectedGroup: (board: PlaitBoard, element: PlaitElement, elements?: PlaitElement[]) => PlaitGroup | null;
|
|
13
|
+
export declare const getHighestSelectedGroups: (board: PlaitBoard, elements?: PlaitElement[]) => PlaitGroup[];
|
|
14
|
+
export declare const getSelectedIsolatedElements: (board: PlaitBoard, elements?: PlaitElement[]) => PlaitElement[];
|
|
15
|
+
export declare const getSelectedIsolatedElementsCanAddToGroup: (board: PlaitBoard, elements?: PlaitElement[]) => PlaitElement[];
|
|
16
|
+
export declare const getHighestSelectedElements: (board: PlaitBoard, elements?: PlaitElement[]) => PlaitElement[];
|
|
15
17
|
export declare const createGroupRectangleG: (board: PlaitBoard, elements: PlaitElement[]) => SVGGElement | null;
|
|
16
|
-
export declare const createGroup: () => PlaitGroup;
|
|
18
|
+
export declare const createGroup: (groupId?: string) => PlaitGroup;
|
|
17
19
|
export declare const nonGroupInHighestSelectedElements: (elements: PlaitElement[]) => boolean;
|
|
18
20
|
export declare const hasSelectedElementsInSameGroup: (elements: PlaitElement[]) => boolean;
|
|
19
|
-
export declare const canAddGroup: (
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const canRemoveGroup: (board: PlaitBoard, selectedGroups: PlaitGroup[]) => boolean;
|
|
22
|
-
export declare const removeGroup: (board: PlaitBoard) => void;
|
|
21
|
+
export declare const canAddGroup: (board: PlaitBoard, elements?: PlaitElement[]) => boolean;
|
|
22
|
+
export declare const canRemoveGroup: (board: PlaitBoard, elements?: PlaitElement[]) => boolean;
|
package/utils/helper.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PlaitElement } from "../interfaces";
|
|
1
2
|
export declare function isNullOrUndefined(value: any): boolean;
|
|
2
3
|
/**
|
|
3
4
|
* get {x,y} point
|
|
@@ -10,3 +11,4 @@ export declare function normalizePoint(point: number[]): {
|
|
|
10
11
|
};
|
|
11
12
|
export declare const RgbaToHEX: (Rgb: string, opacity: number) => string;
|
|
12
13
|
export declare function isContextmenu(event: MouseEvent): boolean;
|
|
14
|
+
export declare function uniqueById(elements: PlaitElement[]): any[];
|
package/utils/index.d.ts
CHANGED
package/utils/math.d.ts
CHANGED
|
@@ -27,3 +27,11 @@ export declare function getVectorFromPointAndSlope(x: number, y: number, slope:
|
|
|
27
27
|
*/
|
|
28
28
|
export declare function toDomPrecision(v: number): number;
|
|
29
29
|
export declare function toFixed(v: number): number;
|
|
30
|
+
/**
|
|
31
|
+
* Whether two numbers numbers a and b are approximately equal.
|
|
32
|
+
*
|
|
33
|
+
* @param a - The first point.
|
|
34
|
+
* @param b - The second point.
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export declare function approximately(a: number, b: number, precision?: number): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlaitBoard } from '../interfaces/board';
|
|
2
2
|
import { PlaitElement } from '../interfaces/element';
|
|
3
3
|
import { Point, RectangleClient } from '../interfaces';
|
|
4
|
-
export interface
|
|
4
|
+
export interface SnapRef {
|
|
5
5
|
deltaX: number;
|
|
6
6
|
deltaY: number;
|
|
7
7
|
g: SVGGElement;
|
|
@@ -16,14 +16,14 @@ export interface DistributeRef {
|
|
|
16
16
|
index: number;
|
|
17
17
|
}[];
|
|
18
18
|
}
|
|
19
|
-
export declare class
|
|
19
|
+
export declare class MovingSnapReaction {
|
|
20
20
|
private board;
|
|
21
21
|
private activeElements;
|
|
22
22
|
private activeRectangle;
|
|
23
23
|
alignRectangles: RectangleClient[];
|
|
24
24
|
constructor(board: PlaitBoard, activeElements: PlaitElement[], activeRectangle: RectangleClient);
|
|
25
25
|
getAlignRectangle(): RectangleClient[];
|
|
26
|
-
|
|
26
|
+
handleSnapping(): SnapRef;
|
|
27
27
|
calculateClosestDistances(activeRectangle: RectangleClient, alignRectangle: RectangleClient): {
|
|
28
28
|
absXDistance: number;
|
|
29
29
|
xDistance: number;
|
package/utils/selection.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { PlaitBoard } from '../interfaces';
|
|
1
|
+
import { PlaitBoard, PlaitElement, PlaitGroup } from '../interfaces';
|
|
2
2
|
export declare function isSelectionMoving(board: PlaitBoard): boolean;
|
|
3
3
|
export declare function setSelectionMoving(board: PlaitBoard): void;
|
|
4
4
|
export declare function clearSelectionMoving(board: PlaitBoard): void;
|
|
5
5
|
export declare function isHandleSelection(board: PlaitBoard): boolean;
|
|
6
6
|
export declare function isSetSelectionOperation(board: PlaitBoard): boolean;
|
|
7
|
-
export declare function getTemporaryElements(board: PlaitBoard):
|
|
7
|
+
export declare function getTemporaryElements(board: PlaitBoard): PlaitElement[] | undefined;
|
|
8
8
|
export declare function getTemporaryRef(board: PlaitBoard): {
|
|
9
|
-
elements:
|
|
9
|
+
elements: PlaitElement[];
|
|
10
10
|
timeoutId: any;
|
|
11
11
|
} | undefined;
|
|
12
12
|
export declare function deleteTemporaryElements(board: PlaitBoard): void;
|
|
13
|
-
export declare function
|
|
13
|
+
export declare function drawEntireActiveRectangleG(board: PlaitBoard): SVGGElement | null;
|
|
14
|
+
export declare function setSelectedElementsWithGroup(board: PlaitBoard, elements: PlaitElement[], isShift: boolean): void;
|
|
15
|
+
export declare function cacheSelectedElementsWithGroupOnShift(board: PlaitBoard, elements: PlaitElement[], isSelectGroupElement: boolean, elementsInHighestGroup: PlaitElement[]): void;
|
|
16
|
+
export declare function cacheSelectedElementsWithGroup(board: PlaitBoard, elements: PlaitElement[], isSelectGroupElement: boolean, hitElementGroups: PlaitGroup[]): void;
|
package/utils/touch.d.ts
CHANGED
package/utils/weak-maps.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare const BOARD_TO_AFTER_CHANGE: WeakMap<PlaitBoard, () => void>;
|
|
|
15
15
|
export declare const BOARD_TO_COMPONENT: WeakMap<PlaitBoard, BoardComponentInterface>;
|
|
16
16
|
export declare const BOARD_TO_ROUGH_SVG: WeakMap<PlaitBoard, RoughSVG>;
|
|
17
17
|
export declare const BOARD_TO_HOST: WeakMap<PlaitBoard, SVGSVGElement>;
|
|
18
|
+
export declare const IS_BOARD_ALIVE: WeakMap<PlaitBoard, boolean>;
|
|
18
19
|
export declare const BOARD_TO_ELEMENT_HOST: WeakMap<PlaitBoard, {
|
|
19
20
|
host: SVGGElement;
|
|
20
21
|
upperHost: SVGGElement;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { PlaitBoard, Selection } from '../interfaces';
|
|
2
|
-
import { createGroupRectangleG, toViewBoxPoint, toHostPoint, getHitElementsBySelection } from '../utils';
|
|
3
|
-
export function withGroup(board) {
|
|
4
|
-
const { pointerMove, globalPointerUp } = board;
|
|
5
|
-
let groupRectangleG;
|
|
6
|
-
board.pointerMove = (event) => {
|
|
7
|
-
groupRectangleG?.remove();
|
|
8
|
-
const point = toViewBoxPoint(board, toHostPoint(board, event.x, event.y));
|
|
9
|
-
let selection = { anchor: point, focus: point };
|
|
10
|
-
if (board.selection && !Selection.isCollapsed(board.selection)) {
|
|
11
|
-
selection = board.selection;
|
|
12
|
-
}
|
|
13
|
-
const hitElements = getHitElementsBySelection(board, selection);
|
|
14
|
-
if (hitElements.length) {
|
|
15
|
-
groupRectangleG = createGroupRectangleG(board, hitElements);
|
|
16
|
-
groupRectangleG && PlaitBoard.getElementActiveHost(board).append(groupRectangleG);
|
|
17
|
-
}
|
|
18
|
-
pointerMove(event);
|
|
19
|
-
};
|
|
20
|
-
board.globalPointerUp = (event) => {
|
|
21
|
-
groupRectangleG?.remove();
|
|
22
|
-
groupRectangleG = null;
|
|
23
|
-
globalPointerUp(event);
|
|
24
|
-
};
|
|
25
|
-
return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