@voplus/morpho-csp 6.1.46 → 6.1.48

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 (51) hide show
  1. package/es/components/CorporateUnitSelectDialog/index.js +18 -4
  2. package/es/components/CorporateUnitSelectDialog/index.js.map +1 -1
  3. package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileMenu/items/ImportRelative.js +1 -1
  4. package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileMenu/items/ImportRelative.js.map +1 -1
  5. package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileMenu/items/Search.js +1 -1
  6. package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileMenu/items/Search.js.map +1 -1
  7. package/es/modules/corporate/background-investigation/risk-profile/pages/RiskProfileDefaultView/index.less +0 -11
  8. package/es/modules/corporate/clda/controls/CLDAMenu/items/DownloadLegal.js +1 -1
  9. package/es/modules/corporate/clda/controls/CLDAMenu/items/DownloadLegal.js.map +1 -1
  10. package/es/modules/corporate/clda/controls/CLDAMenu/items/GenerateLegalEnvelope.js +1 -1
  11. package/es/modules/corporate/clda/controls/CLDAMenu/items/GenerateLegalEnvelope.js.map +1 -1
  12. package/es/modules/corporate/filing-record/filing-year/controls/FilingYearMenu/items/DownloadFiles.js +1 -1
  13. package/es/modules/corporate/filing-record/filing-year/controls/FilingYearMenu/items/DownloadFiles.js.map +1 -1
  14. package/es/modules/corporate/filing-record/filing-year/pages/FilingYearDefaultView/index.less +0 -12
  15. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/Download.js +1 -1
  16. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/Download.js.map +1 -1
  17. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToShareholder.js +1 -1
  18. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToShareholder.js.map +1 -1
  19. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToSignee.js +1 -1
  20. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToSignee.js.map +1 -1
  21. package/es/modules/corporate/share-certificate/pages/ShareCertificateDefaultView/index.less +0 -18
  22. package/es/modules/self-registration/incorporation-clda/pages/CLDADefaultView/index.less +0 -16
  23. package/package.json +1 -1
  24. package/es/components/CorporateUnitSortableTree/index.d.ts +0 -10
  25. package/es/components/CorporateUnitSortableTree/index.js +0 -87
  26. package/es/components/CorporateUnitSortableTree/index.js.map +0 -1
  27. package/es/components/CorporateUnitSortableTree/state.d.ts +0 -62
  28. package/es/components/CorporateUnitSortableTree/state.js +0 -223
  29. package/es/components/CorporateUnitSortableTree/state.js.map +0 -1
  30. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.d.ts +0 -3
  31. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.js +0 -22
  32. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.js.map +0 -1
  33. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.d.ts +0 -4
  34. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js +0 -84
  35. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js.map +0 -1
  36. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.less +0 -342
  37. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.d.ts +0 -3
  38. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js +0 -21
  39. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js.map +0 -1
  40. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.less +0 -4
  41. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.d.ts +0 -4
  42. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.js +0 -23
  43. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.js.map +0 -1
  44. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.d.ts +0 -3
  45. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js +0 -58
  46. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js.map +0 -1
  47. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.less +0 -45
  48. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.d.ts +0 -3
  49. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js +0 -73
  50. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js.map +0 -1
  51. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.less +0 -12
@@ -1,223 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { action, computed, makeObservable, observable } from "mobx";
3
- export class State {
4
- constructor(_store) {
5
- Object.defineProperty(this, "_store", {
6
- enumerable: true,
7
- configurable: true,
8
- writable: true,
9
- value: _store
10
- });
11
- Object.defineProperty(this, "id", {
12
- enumerable: true,
13
- configurable: true,
14
- writable: true,
15
- value: ""
16
- }); //加载时id
17
- /** 如果effect 是null就不执行 useUnitListEffect*/
18
- Object.defineProperty(this, "effect", {
19
- enumerable: true,
20
- configurable: true,
21
- writable: true,
22
- value: null
23
- });
24
- Object.defineProperty(this, "treeNodeChildren", {
25
- enumerable: true,
26
- configurable: true,
27
- writable: true,
28
- value: void 0
29
- });
30
- /** dummy placeholder data */
31
- Object.defineProperty(this, "treeChildren", {
32
- enumerable: true,
33
- configurable: true,
34
- writable: true,
35
- value: [
36
- {
37
- id: "",
38
- containerId: "11",
39
- name: "dummy placeholder data",
40
- type: "Organization",
41
- isGroup: false,
42
- address: { country: "", line1: "" },
43
- primaryLegalIdentity: { number: "", name: "", type: "IdentityCard", country: "" },
44
- stereoTypes: [],
45
- nodeType: "",
46
- p: [],
47
- },
48
- ]
49
- });
50
- /** 沒load之前, 看看現在這個文件有沒有子文件, 有的話要放個 dummy placeholder data 在children里, */
51
- Object.defineProperty(this, "treeData", {
52
- enumerable: true,
53
- configurable: true,
54
- writable: true,
55
- value: []
56
- });
57
- /** filter type for unit */
58
- Object.defineProperty(this, "filterType", {
59
- enumerable: true,
60
- configurable: true,
61
- writable: true,
62
- value: void 0
63
- });
64
- /** onDragStateChanged 在拖动开始或结束时调用。拖动开始时为true,拖动结束时为false */
65
- Object.defineProperty(this, "isDragging", {
66
- enumerable: true,
67
- configurable: true,
68
- writable: true,
69
- value: void 0
70
- });
71
- /** update useUnitListEffect */
72
- Object.defineProperty(this, "updateNodes", {
73
- enumerable: true,
74
- configurable: true,
75
- writable: true,
76
- value: (list) => {
77
- if (this.treeNodeChildren && this.treeNodeChildren.childrenListLoading) {
78
- const docList = list;
79
- docList.map((item) => {
80
- // if (item.documents > 0) {
81
- item.children = this.treeChildren;
82
- // }
83
- });
84
- this.treeNodeChildren.children = docList || [];
85
- this.treeNodeChildren.childrenListLoading = false;
86
- this.treeData = [...this.treeData];
87
- }
88
- }
89
- });
90
- makeObservable(this);
91
- }
92
- /** 根据path查找文件 */
93
- findFiles(path) {
94
- var _a;
95
- let list;
96
- for (let i = 0; i < path.length; i++) {
97
- if (i == 0) {
98
- list = this.treeData.filter((item) => item.id === path[i]);
99
- }
100
- else {
101
- list = (_a = list[0].children) === null || _a === void 0 ? void 0 : _a.filter((item) => item.id === path[i]);
102
- }
103
- }
104
- return (list === null || list === void 0 ? void 0 : list.length) ? list[0] : null;
105
- }
106
- /** 接收@treeData state.treeData
107
- * @id 找id 文件 */
108
- editTreeData(treeData, id) {
109
- for (let i = 0, len = treeData.length; i < len; i++) {
110
- if (treeData[i].children) {
111
- this.editTreeData(treeData[i].children, id);
112
- }
113
- if (treeData[i].id === id) {
114
- this.treeNodeChildren = treeData[i];
115
- }
116
- }
117
- return;
118
- }
119
- /** 更新 TreeData */
120
- updateTreeData(val) {
121
- this.treeData = val;
122
- }
123
- /**在子节点折叠或者展开后调用*/
124
- onVisibilityToggle(val) {
125
- /** 如果是已展开 或者 已经加载过,不用再重新去加载 */
126
- if (!val.expanded || val.node.children[0].id !== "")
127
- return;
128
- this.id = val.path[val.path.length - 1];
129
- this.treeNodeChildren = this.findFiles(val.path);
130
- /** 加载中 */
131
- this.treeNodeChildren.childrenListLoading = true;
132
- this.treeNodeChildren.children = [];
133
- this.effect = this.updateNodes;
134
- }
135
- /** 在节点移动操作之后调用 */
136
- async onMoveNode(val) {
137
- const id = val.nextPath[val.nextPath.length - 1];
138
- const leg = val.nextParentNode.children.indexOf(val.node);
139
- const afterId = leg - 1 >= 0 ? val.nextParentNode.children[leg - 1].id : "";
140
- const nextParent = this.findFiles(val.nextPath.slice(0, -1));
141
- const prevParent = this.findFiles(val.prevPath.slice(0, -1));
142
- /** 判断下一个父级 与 上一个父级 是不是同一个 */
143
- if (nextParent.id === prevParent.id) {
144
- this._store.moveAfter(id, afterId);
145
- }
146
- else {
147
- await this._store.move([id], nextParent.id);
148
- if (afterId !== "") {
149
- this._store.moveAfter(id, afterId);
150
- }
151
- }
152
- }
153
- /**
154
- * 确定节点是否可以具有子级的功能,对于在canDrop有条件时防止悬停预览很有用。默认设置为返回的函数true。函数应为类型(node): bool
155
- */
156
- toHaveChildren(node) {
157
- const isLoaded = node.loaded ? node.loaded : false;
158
- if (node.documents !== 0 && !isLoaded) {
159
- return false;
160
- }
161
- return true;
162
- }
163
- /**
164
- * unit filters
165
- * @return unit filters
166
- */
167
- get filters() {
168
- const filters = [];
169
- if (this.id) {
170
- filters.push({ c: "ParentNodeId", o: "=", l: "And", v1: this.id });
171
- }
172
- if (this.filterType) {
173
- filters.push(this.filterType);
174
- }
175
- return filters;
176
- }
177
- }
178
- __decorate([
179
- observable
180
- ], State.prototype, "id", void 0);
181
- __decorate([
182
- observable
183
- ], State.prototype, "effect", void 0);
184
- __decorate([
185
- observable
186
- ], State.prototype, "treeNodeChildren", void 0);
187
- __decorate([
188
- observable
189
- ], State.prototype, "treeChildren", void 0);
190
- __decorate([
191
- observable
192
- ], State.prototype, "treeData", void 0);
193
- __decorate([
194
- observable
195
- ], State.prototype, "filterType", void 0);
196
- __decorate([
197
- observable
198
- ], State.prototype, "isDragging", void 0);
199
- __decorate([
200
- action
201
- ], State.prototype, "findFiles", null);
202
- __decorate([
203
- action
204
- ], State.prototype, "editTreeData", null);
205
- __decorate([
206
- action
207
- ], State.prototype, "updateTreeData", null);
208
- __decorate([
209
- action
210
- ], State.prototype, "updateNodes", void 0);
211
- __decorate([
212
- action
213
- ], State.prototype, "onVisibilityToggle", null);
214
- __decorate([
215
- action
216
- ], State.prototype, "onMoveNode", null);
217
- __decorate([
218
- action
219
- ], State.prototype, "toHaveChildren", null);
220
- __decorate([
221
- computed
222
- ], State.prototype, "filters", null);
223
- //# sourceMappingURL=state.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/CorporateUnitSortableTree/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AA4BpE,MAAM,OAAO,KAAK;IACjB,YAA2B,MAAiB;QAAzB;;;;mBAAQ,MAAM;WAAW;QAGzB;;;;mBAAK,EAAE;WAAC,CAAC,OAAO;QACnC,0CAA0C;QACvB;;;;mBAAS,IAAiD;WAAC;QAC3D;;;;;WAAsB;QACzC,8BAA8B;QACX;;;;mBAAgC;gBAClD;oBACC,EAAE,EAAE,EAAE;oBACN,WAAW,EAAE,IAAI;oBACjB,IAAI,EAAE,wBAAwB;oBAC9B,IAAI,EAAE,cAAc;oBACpB,OAAO,EAAE,KAAK;oBACd,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;oBACnC,oBAAoB,EAAE,E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CAWN;AAKM;IADN,MAAM;yCAWN;AAIM;IADN,MAAM;2CAGN;AAIM;IADN,MAAM;0CAaL;AAIK;IADN,MAAM;+CAUN;AAIY;IADZ,MAAM;uCAgBN;AAMM;IADN,MAAM;2CAON;AAOD;IADC,QAAQ;oCAUR"}
@@ -1,3 +0,0 @@
1
- import { ThemeProps } from "@voplus/react-sortable-tree";
2
- declare const FileExplorerTheme: ThemeProps;
3
- export default FileExplorerTheme;
@@ -1,22 +0,0 @@
1
- // Can override the following:
2
- //
3
- // style: PropTypes.shape({}),
4
- // innerStyle: PropTypes.shape({}),
5
- // reactVirtualizedListProps: PropTypes.shape({}),
6
- // scaffoldBlockPxWidth: PropTypes.number,
7
- // slideRegionSize: PropTypes.number,
8
- // rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
9
- // treeNodeRenderer: PropTypes.func,
10
- // nodeContentRenderer: PropTypes.func,
11
- // placeholderRenderer: PropTypes.func,
12
- import nodeContentRenderer from "./node-content-renderer";
13
- import treeNodeRenderer from "./tree-node-renderer";
14
- const FileExplorerTheme = {
15
- nodeContentRenderer,
16
- treeNodeRenderer,
17
- scaffoldBlockPxWidth: 25,
18
- rowHeight: 30,
19
- slideRegionSize: 50,
20
- };
21
- export default FileExplorerTheme;
22
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,8BAA8B;AAC9B,mCAAmC;AACnC,kDAAkD;AAClD,0CAA0C;AAC1C,qCAAqC;AACrC,sEAAsE;AACtE,oCAAoC;AACpC,uCAAuC;AACvC,uCAAuC;AAGvC,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,MAAM,iBAAiB,GAAe;IACrC,mBAAmB;IACnB,gBAAgB;IAChB,oBAAoB,EAAE,EAAE;IACxB,SAAS,EAAE,EAAE;IACb,eAAe,EAAE,EAAE;CACnB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,4 +0,0 @@
1
- import "./node-content-renderer.less";
2
- import { NodeRenderer } from "@voplus/react-sortable-tree";
3
- declare const FileThemeNodeContentRenderer: NodeRenderer;
4
- export default FileThemeNodeContentRenderer;
@@ -1,84 +0,0 @@
1
- import "./node-content-renderer.less";
2
- import { faChevronRight, faUser, faUsers, faUserVneck, faUserTag, } from "@fortawesome/pro-light-svg-icons";
3
- import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
4
- import React from "react";
5
- import { Spin } from "antd";
6
- import UnitIcon from "@voplus/morpho-org/es/components/UnitIcon";
7
- import classnames from "classnames";
8
- import { useUnitContext } from "@voplus/morpho-org/es/data/UnitContext";
9
- function isDescendant(older, younger) {
10
- return (!!older.children &&
11
- typeof older.children !== "function" &&
12
- older.children.some((child) => child === younger || isDescendant(child, younger)));
13
- }
14
- const FileThemeNodeContentRenderer = (props) => {
15
- const { scaffoldBlockPxWidth, toggleChildrenVisibility, connectDragPreview, connectDragSource, isDragging, canDrop, canDrag, node, title, draggedNode, path, treeIndex, isSearchMatch, isSearchFocus, icons, buttons, className, style, didDrop, lowerSiblingCounts, listIndex, swapFrom, swapLength, swapDepth, treeId, // Not needed, but preserved for other renderers
16
- isOver, // Not needed, but preserved for other renderers
17
- parentNode, // Needed for dndManager
18
- rowDirection, ...otherProps } = props;
19
- const store = useUnitContext();
20
- const isDraggedDescendant = draggedNode && isDescendant(draggedNode, node);
21
- const isLandingPadActive = !didDrop && isDragging;
22
- /** 比較一下id是否active, 加上active css (点击当前id时,显示active背景色) */
23
- const active = store.active === node.id;
24
- // Construct the scaffold representing the structure of the tree
25
- const scaffold = [];
26
- lowerSiblingCounts.forEach((lowerSiblingCount, i) => {
27
- scaffold.push(React.createElement("div", { key: `pre_${1 + i}`, style: { width: scaffoldBlockPxWidth }, className: "lineBlock" }));
28
- if (treeIndex !== listIndex && i === swapDepth) {
29
- // This row has been shifted, and is at the depth of
30
- // the line pointing to the new destination
31
- let highlightLineClass = "";
32
- if (listIndex === swapFrom + swapLength - 1) {
33
- // This block is on the bottom (target) line
34
- // This block points at the target block (where the row will go when released)
35
- highlightLineClass = "highlightBottomLeftCorner";
36
- }
37
- else if (treeIndex === swapFrom) {
38
- // This block is on the top (source) line
39
- highlightLineClass = "highlightTopLeftCorner";
40
- }
41
- else {
42
- // This block is between the bottom and top
43
- highlightLineClass = "highlightLineVertical";
44
- }
45
- scaffold.push(React.createElement("div", { key: `highlight_${1 + i}`, style: {
46
- width: scaffoldBlockPxWidth,
47
- left: scaffoldBlockPxWidth * i,
48
- }, className: classnames("absoluteLineBlock", "highlightLineClass") }));
49
- }
50
- });
51
- const nodeContent = (React.createElement("div", { className: classnames("explorer-theme-node", { active: active }), ...otherProps },
52
- toggleChildrenVisibility && node.children && node.children.length > 0 && (React.createElement("button", { type: "button", className: node.expanded ? "collapseButton" : "expandButton", style: {
53
- left: (lowerSiblingCounts.length - 0.7) * scaffoldBlockPxWidth,
54
- }, onClick: () => toggleChildrenVisibility({
55
- node,
56
- path,
57
- treeIndex,
58
- }) },
59
- React.createElement("span", { className: "arrows" },
60
- React.createElement(FAIcon, { icon: faChevronRight })))),
61
- node.childrenListLoading && node.expanded && (React.createElement("div", { className: "doc-spin", style: {
62
- left: (lowerSiblingCounts.length - 0.7) * scaffoldBlockPxWidth,
63
- } },
64
- React.createElement(Spin, { size: "small" }))),
65
- React.createElement("div", { className: classnames("rowWrapper", !canDrag ? "rowWrapperDragDisabled" : "") }, connectDragPreview(React.createElement("div", { style: { display: "flex" } },
66
- scaffold,
67
- React.createElement("div", { className: classnames("row", {
68
- rowLandingPad: isLandingPadActive,
69
- rowCancelPad: isLandingPadActive && !canDrop,
70
- rowSearchMatch: isSearchMatch,
71
- rowSearchFocus: isSearchFocus,
72
- }, className), style: {
73
- opacity: isDraggedDescendant ? 0.5 : 1,
74
- ...style,
75
- } },
76
- React.createElement("div", { className: classnames("rowContents", { rowContentsDragDisabled: !canDrag }) },
77
- React.createElement("div", { className: "rowLabel" },
78
- React.createElement("div", { className: "file-document-name", onClick: () => { var _a; return (_a = store.onUnitSelected) === null || _a === void 0 ? void 0 : _a.call(store, node.id); } },
79
- React.createElement("div", { className: "file-type" }, node.id === "" ? (React.createElement(FAIcon, { icon: faUser })) : node.id === "c896a84e-b31a-4d10-a181-5d34a21b172d" ? (React.createElement(FAIcon, { icon: faUsers })) : node.id === "members" ? (React.createElement(FAIcon, { icon: faUserVneck })) : node.id === "officers" ? (React.createElement(FAIcon, { icon: faUserTag })) : (React.createElement(UnitIcon, { type: node.type }))),
80
- React.createElement("div", { className: "file-name" }, node.name))))))))));
81
- return canDrag ? connectDragSource(nodeContent, { dropEffect: "copy" }) : nodeContent;
82
- };
83
- export default FileThemeNodeContentRenderer;
84
- //# sourceMappingURL=node-content-renderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"node-content-renderer.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAGtC,OAAO,EACN,cAAc,EACd,MAAM,EACN,OAAO,EACP,WAAW,EACX,SAAS,GACT,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,QAAQ,MAAM,2CAA2C,CAAC;AACjE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExE,SAAS,YAAY,CAAC,KAAU,EAAE,OAAY;IAC7C,OAAO,CACN,CAAC,CAAC,KAAK,CAAC,QAAQ;QAChB,OAAO,KA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