@voplus/morpho-csp 4.0.19 → 4.0.20
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/es/components/CurrencyView/index.js +1 -180
- package/es/components/CurrencyView/index.js.map +1 -1
- package/es/components/CurrencyView/state.d.ts +0 -1
- package/es/components/CurrencyView/state.js +0 -180
- package/es/components/CurrencyView/state.js.map +1 -1
- package/es/components/DragTableRow/index.d.ts +5 -2
- package/es/components/DragTableRow/index.js +25 -34
- package/es/components/DragTableRow/index.js.map +1 -1
- package/es/data/CLDA/store.d.ts +1 -1
- package/es/data/CLDA/store.js +3 -2
- package/es/data/CLDA/store.js.map +1 -1
- package/es/data/clda-form/interfaces.d.ts +10 -0
- package/es/data/clda-form/types.d.ts +10 -0
- package/es/modules/corporate/clda/controls/CLDAMenu/items/GenerateLegalEnvelope.js +9 -2
- package/es/modules/corporate/clda/controls/CLDAMenu/items/GenerateLegalEnvelope.js.map +1 -1
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItems/TableDragCell.js +1 -1
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItems/index.js +41 -30
- package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItems/index.js.map +1 -1
- package/es/modules/corporate/share-options-register/components/ShareOptionItems/TableDragCell.js +1 -1
- package/es/modules/corporate/share-options-register/components/ShareOptionItems/index.js +36 -25
- package/es/modules/corporate/share-options-register/components/ShareOptionItems/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.js +2 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/state.d.ts +0 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/state.js +0 -188
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/state.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.d.ts +8 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.js +79 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.less +37 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/state.d.ts +15 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/state.js +42 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/state.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.js +2 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnItem/index.d.ts +10 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnItem/index.js +70 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnItem/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnItem/index.less +50 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnList/index.d.ts +7 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnList/index.js +46 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/DivideColumnList/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/index.js +29 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/index.js.map +1 -1
- package/es/obsolete/order/components/OrderItems/index.js +37 -31
- package/es/obsolete/order/components/OrderItems/index.js.map +1 -1
- package/es/obsolete/order/controls/OrderLabel/index.js +3 -3
- package/es/obsolete/order/controls/OrderLabel/index.js.map +1 -1
- package/es/obsolete/order/controls/OrderLabel/state.d.ts +0 -1
- package/es/obsolete/order/controls/OrderLabel/state.js +0 -180
- package/es/obsolete/order/controls/OrderLabel/state.js.map +1 -1
- package/package.json +1 -1
- package/es/components/TableDragRow/FormRowContext.d.ts +0 -4
- package/es/components/TableDragRow/FormRowContext.js +0 -5
- package/es/components/TableDragRow/FormRowContext.js.map +0 -1
- package/es/components/TableDragRow/index.d.ts +0 -3
- package/es/components/TableDragRow/index.js +0 -41
- package/es/components/TableDragRow/index.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./index.less";
|
|
2
2
|
import { InlineEdit, observe } from "@voplus/morpho-ui";
|
|
3
3
|
import React, { useState } from "react";
|
|
4
|
-
import { State
|
|
4
|
+
import { State } from "./state";
|
|
5
|
+
import CurrencySelect from "@voplus/morpho-ui/es/controls/CurrencySelect";
|
|
5
6
|
import DateInputEditor from "@voplus/morpho-ui/es/controls/InlineEdit/editors/DateInputEditor";
|
|
6
|
-
import { Select } from "antd";
|
|
7
7
|
import classnames from "classnames";
|
|
8
8
|
import moment from "moment";
|
|
9
9
|
import { runInAction } from "mobx";
|
|
@@ -18,7 +18,7 @@ const OrderLabel = (props) => {
|
|
|
18
18
|
React.createElement(InlineEdit, { editable: !order.readonly, defaultValue: order.number, content: (v) => (React.createElement("div", { className: classnames({ nothing: !v.store.value && !order.number }) }, v.store.value || order.number || "Quotation Number")), onSave: (v) => (v ? onEdit(order.number, v, { Number: v }) : null) })),
|
|
19
19
|
React.createElement("div", null,
|
|
20
20
|
React.createElement("div", { className: "bold" }, "Currency"),
|
|
21
|
-
state.currencyEdit ? (React.createElement(
|
|
21
|
+
state.currencyEdit ? (React.createElement(CurrencySelect, { open: state.currencyEdit, currency: order.currency, onChange: changeCurrency, onBlur: () => runInAction(() => (state.currencyEdit = false)) })) : (React.createElement("div", { onClick: () => !order.readonly && runInAction(() => (state.currencyEdit = true)) }, order.currency))),
|
|
22
22
|
React.createElement("div", null,
|
|
23
23
|
React.createElement("div", { className: "bold" }, "Date"),
|
|
24
24
|
React.createElement(InlineEdit, { editor: DateInputEditor, editable: !order.readonly, defaultValue: moment(order.date), content: (v) => (React.createElement("div", null, v.store.value ? moment(v.store.value).format("YYYY-MM-DD") : "Add Date")), onSave: (v) => v
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/obsolete/order/controls/OrderLabel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/obsolete/order/controls/OrderLabel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,cAAc,MAAM,8CAA8C,CAAC;AAI1E,OAAO,eAAe,MAAM,kEAAkE,CAAC;AAE/F,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,UAAU,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC5C,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC;IAE9B,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BAAK,SAAS,E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([
|
|
|
35
35
|
__decorate([
|
|
36
36
|
observable
|
|
37
37
|
], State.prototype, "dateEdit", void 0);
|
|
38
|
-
export const currencyList = [
|
|
39
|
-
"AFN",
|
|
40
|
-
"EUR",
|
|
41
|
-
"ALL",
|
|
42
|
-
"DZD",
|
|
43
|
-
"USD",
|
|
44
|
-
"AOA",
|
|
45
|
-
"XCD",
|
|
46
|
-
"ARS",
|
|
47
|
-
"AMD",
|
|
48
|
-
"AWG",
|
|
49
|
-
"AUD",
|
|
50
|
-
"AZN",
|
|
51
|
-
"BSD",
|
|
52
|
-
"BHD",
|
|
53
|
-
"BDT",
|
|
54
|
-
"BBD",
|
|
55
|
-
"BYN",
|
|
56
|
-
"BZD",
|
|
57
|
-
"BMD",
|
|
58
|
-
"INR",
|
|
59
|
-
"BTN",
|
|
60
|
-
"BOB",
|
|
61
|
-
"BOV",
|
|
62
|
-
"BAM",
|
|
63
|
-
"BWP",
|
|
64
|
-
"NOK",
|
|
65
|
-
"BRL",
|
|
66
|
-
"BND",
|
|
67
|
-
"BGN",
|
|
68
|
-
"XOF",
|
|
69
|
-
"BIF",
|
|
70
|
-
"CVE",
|
|
71
|
-
"KHR",
|
|
72
|
-
"XAF",
|
|
73
|
-
"CAD",
|
|
74
|
-
"KYD",
|
|
75
|
-
"CLP",
|
|
76
|
-
"CLF",
|
|
77
|
-
"CNY",
|
|
78
|
-
"COP",
|
|
79
|
-
"COU",
|
|
80
|
-
"KMF",
|
|
81
|
-
"CDF",
|
|
82
|
-
"NZD",
|
|
83
|
-
"CRC",
|
|
84
|
-
"HRK",
|
|
85
|
-
"CUP",
|
|
86
|
-
"CUC",
|
|
87
|
-
"ANG",
|
|
88
|
-
"CZK",
|
|
89
|
-
"DKK",
|
|
90
|
-
"DJF",
|
|
91
|
-
"DOP",
|
|
92
|
-
"EGP",
|
|
93
|
-
"SVC",
|
|
94
|
-
"ERN",
|
|
95
|
-
"ETB",
|
|
96
|
-
"FKP",
|
|
97
|
-
"FJD",
|
|
98
|
-
"XPF",
|
|
99
|
-
"GMD",
|
|
100
|
-
"GEL",
|
|
101
|
-
"GHS",
|
|
102
|
-
"GIP",
|
|
103
|
-
"GTQ",
|
|
104
|
-
"GBP",
|
|
105
|
-
"GNF",
|
|
106
|
-
"GYD",
|
|
107
|
-
"HTG",
|
|
108
|
-
"HNL",
|
|
109
|
-
"HKD",
|
|
110
|
-
"HUF",
|
|
111
|
-
"ISK",
|
|
112
|
-
"IDR",
|
|
113
|
-
"XDR",
|
|
114
|
-
"IRR",
|
|
115
|
-
"IQD",
|
|
116
|
-
"ILS",
|
|
117
|
-
"JMD",
|
|
118
|
-
"JPY",
|
|
119
|
-
"JOD",
|
|
120
|
-
"KZT",
|
|
121
|
-
"KES",
|
|
122
|
-
"KPW",
|
|
123
|
-
"KRW",
|
|
124
|
-
"KWD",
|
|
125
|
-
"KGS",
|
|
126
|
-
"LAK",
|
|
127
|
-
"LBP",
|
|
128
|
-
"LSL",
|
|
129
|
-
"ZAR",
|
|
130
|
-
"LRD",
|
|
131
|
-
"LYD",
|
|
132
|
-
"CHF",
|
|
133
|
-
"MOP",
|
|
134
|
-
"MKD",
|
|
135
|
-
"MGA",
|
|
136
|
-
"MWK",
|
|
137
|
-
"MYR",
|
|
138
|
-
"MVR",
|
|
139
|
-
"MRU",
|
|
140
|
-
"MUR",
|
|
141
|
-
"XUA",
|
|
142
|
-
"MXN",
|
|
143
|
-
"MXV",
|
|
144
|
-
"MDL",
|
|
145
|
-
"MNT",
|
|
146
|
-
"MAD",
|
|
147
|
-
"MZN",
|
|
148
|
-
"MMK",
|
|
149
|
-
"NAD",
|
|
150
|
-
"NPR",
|
|
151
|
-
"NIO",
|
|
152
|
-
"NGN",
|
|
153
|
-
"OMR",
|
|
154
|
-
"PKR",
|
|
155
|
-
"PAB",
|
|
156
|
-
"PGK",
|
|
157
|
-
"PYG",
|
|
158
|
-
"PEN",
|
|
159
|
-
"PHP",
|
|
160
|
-
"PLN",
|
|
161
|
-
"QAR",
|
|
162
|
-
"RON",
|
|
163
|
-
"RUB",
|
|
164
|
-
"RWF",
|
|
165
|
-
"SHP",
|
|
166
|
-
"WST",
|
|
167
|
-
"STN",
|
|
168
|
-
"SAR",
|
|
169
|
-
"RSD",
|
|
170
|
-
"SCR",
|
|
171
|
-
"SLL",
|
|
172
|
-
"SGD",
|
|
173
|
-
"XSU",
|
|
174
|
-
"SBD",
|
|
175
|
-
"SOS",
|
|
176
|
-
"SSP",
|
|
177
|
-
"LKR",
|
|
178
|
-
"SDG",
|
|
179
|
-
"SRD",
|
|
180
|
-
"SZL",
|
|
181
|
-
"SEK",
|
|
182
|
-
"CHE",
|
|
183
|
-
"CHW",
|
|
184
|
-
"SYP",
|
|
185
|
-
"TWD",
|
|
186
|
-
"TJS",
|
|
187
|
-
"THB",
|
|
188
|
-
"TOP",
|
|
189
|
-
"TTD",
|
|
190
|
-
"TND",
|
|
191
|
-
"TRY",
|
|
192
|
-
"TMT",
|
|
193
|
-
"UGX",
|
|
194
|
-
"UAH",
|
|
195
|
-
"AED",
|
|
196
|
-
"USN",
|
|
197
|
-
"UYU",
|
|
198
|
-
"UYI",
|
|
199
|
-
"UYW",
|
|
200
|
-
"UZS",
|
|
201
|
-
"VUV",
|
|
202
|
-
"VES",
|
|
203
|
-
"VND",
|
|
204
|
-
"YER",
|
|
205
|
-
"ZMW",
|
|
206
|
-
"ZWL",
|
|
207
|
-
"XBA",
|
|
208
|
-
"XBB",
|
|
209
|
-
"XBC",
|
|
210
|
-
"XBD",
|
|
211
|
-
"XTS",
|
|
212
|
-
"XXX",
|
|
213
|
-
"XAU",
|
|
214
|
-
"XPD",
|
|
215
|
-
"XPT",
|
|
216
|
-
"XAG",
|
|
217
|
-
];
|
|
218
38
|
//# sourceMappingURL=state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/obsolete/order/controls/OrderLabel/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEtD,MAAM,OAAO,KAAK;IAQjB;QAPA,4BAA4B;QAChB;;;;mBAAqB,KAAK;WAAC;QACvC,4BAA4B;QAChB;;;;mBAAsB,KAAK;WAAC;QACxC,8BAA8B;QAClB;;;;mBAAkB,KAAK;WAAC;QAGnC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACD;AATY;IAAX,UAAU;0CAA4B;AAE3B;IAAX,UAAU;2CAA6B;AAE5B;IAAX,UAAU;uCAAyB
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/obsolete/order/controls/OrderLabel/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEtD,MAAM,OAAO,KAAK;IAQjB;QAPA,4BAA4B;QAChB;;;;mBAAqB,KAAK;WAAC;QACvC,4BAA4B;QAChB;;;;mBAAsB,KAAK;WAAC;QACxC,8BAA8B;QAClB;;;;mBAAkB,KAAK;WAAC;QAGnC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACD;AATY;IAAX,UAAU;0CAA4B;AAE3B;IAAX,UAAU;2CAA6B;AAE5B;IAAX,UAAU;uCAAyB"}
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from "react";
|
|
2
|
-
export const FormRowContext = createContext(null);
|
|
3
|
-
/** React hook to retrieve the nearest FormRowContext. */
|
|
4
|
-
export const useFormRowContext = () => useContext(FormRowContext);
|
|
5
|
-
//# sourceMappingURL=FormRowContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormRowContext.js","sourceRoot":"","sources":["../../../src/components/TableDragRow/FormRowContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,IAAW,CAAC,CAAC;AAEzD,yDAAyD;AACzD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare const DragTableRow: import("react-dnd").DndComponentClass<import("react-dnd").DndComponentClass<(props: any) => JSX.Element, import("react-dnd").Omit<any, "connectDragSource" | "connectDragPreview">>, import("react-dnd").Omit<import("react-dnd").Omit<any, "connectDragSource" | "connectDragPreview">, "isOver" | "connectDropTarget">>;
|
|
3
|
-
export default DragTableRow;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { DragSource, DropTarget } from "react-dnd";
|
|
2
|
-
import { Form } from "antd";
|
|
3
|
-
import { FormRowContext } from "./FormRowContext";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { observe } from "@voplus/morpho-ui";
|
|
6
|
-
const TableRow = (props) => {
|
|
7
|
-
const { isOver, connectDragSource, connectDropTarget, connectDragPreview, moveAfter, ...restProps } = props;
|
|
8
|
-
const opacity = isOver ? 0 : 1;
|
|
9
|
-
const [form] = Form.useForm();
|
|
10
|
-
return observe(() => (React.createElement(Form, { form: form, component: false },
|
|
11
|
-
React.createElement(FormRowContext.Provider, { value: { form, connectDragSource } }, connectDropTarget(connectDragPreview(React.createElement("tr", { ...restProps, style: { ...restProps.style, opacity } })))))));
|
|
12
|
-
};
|
|
13
|
-
let dragIndex = -1;
|
|
14
|
-
const rowSource = {
|
|
15
|
-
beginDrag(props) {
|
|
16
|
-
dragIndex = props.index;
|
|
17
|
-
return {
|
|
18
|
-
index: props.index,
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
const rowTarget = {
|
|
23
|
-
drop(props, monitor) {
|
|
24
|
-
const dragIndex = monitor.getItem().index;
|
|
25
|
-
const hoverIndex = props.index;
|
|
26
|
-
if (dragIndex === hoverIndex) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
props.moveAfter(dragIndex, hoverIndex);
|
|
30
|
-
monitor.getItem().index = hoverIndex;
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
const DragTableRow = DropTarget("row", rowTarget, (connect, monitor) => ({
|
|
34
|
-
connectDropTarget: connect.dropTarget(),
|
|
35
|
-
isOver: monitor.isOver(),
|
|
36
|
-
}))(DragSource("row", rowSource, (connect) => ({
|
|
37
|
-
connectDragSource: connect.dragSource(),
|
|
38
|
-
connectDragPreview: connect.dragPreview(),
|
|
39
|
-
}))(TableRow));
|
|
40
|
-
export default DragTableRow;
|
|
41
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/TableDragRow/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,EAAE;IAC/B,MAAM,EACL,MAAM,EACN,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,GAAG,SAAS,EACZ,GAAG,KAAK,CAAC;IACV,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/B,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC9B,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK;QAC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