lightweight-charts-indicators 0.21.0 → 0.22.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/dist/helpers.mjs +56 -17
- package/dist/index.cjs +57 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +57 -19
- package/dist/live-run.d.ts.map +1 -1
- package/dist/packed-series.d.ts +11 -6
- package/dist/packed-series.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/helpers.mjs
CHANGED
|
@@ -874,26 +874,62 @@ function packedFromColumns(c) {
|
|
|
874
874
|
cols.extra = c.extra;
|
|
875
875
|
return view(cols);
|
|
876
876
|
}
|
|
877
|
-
|
|
877
|
+
var RUN_FIELDS = /* @__PURE__ */ new Set(["series", "lists"]);
|
|
878
|
+
function packLists(s, lists, pick) {
|
|
878
879
|
const own = s;
|
|
879
|
-
const
|
|
880
|
+
const places = /* @__PURE__ */ new Map();
|
|
881
|
+
const reached = /* @__PURE__ */ new Set();
|
|
882
|
+
const at = (list, holder, key) => {
|
|
883
|
+
const p = places.get(list);
|
|
884
|
+
if (p)
|
|
885
|
+
p.push([holder, key]);
|
|
886
|
+
else
|
|
887
|
+
places.set(list, [[holder, key]]);
|
|
888
|
+
};
|
|
889
|
+
const holders = /* @__PURE__ */ new Set();
|
|
880
890
|
for (const k of Object.keys(own)) {
|
|
881
|
-
|
|
891
|
+
const v = own[k];
|
|
892
|
+
if (!Array.isArray(v))
|
|
882
893
|
continue;
|
|
883
|
-
const
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
894
|
+
const study = !RUN_FIELDS.has(k);
|
|
895
|
+
at(v, own, k);
|
|
896
|
+
if (study)
|
|
897
|
+
reached.add(v);
|
|
898
|
+
if (isPackedSeries(v))
|
|
899
|
+
continue;
|
|
900
|
+
if (study) {
|
|
901
|
+
for (const item of v)
|
|
902
|
+
if (Array.isArray(item))
|
|
903
|
+
reached.add(item);
|
|
904
|
+
}
|
|
905
|
+
if (holders.has(v))
|
|
906
|
+
continue;
|
|
907
|
+
holders.add(v);
|
|
908
|
+
for (let j = 0; j < v.length; j++)
|
|
909
|
+
if (Array.isArray(v[j]))
|
|
910
|
+
at(v[j], v, j);
|
|
888
911
|
}
|
|
889
|
-
|
|
890
|
-
const
|
|
891
|
-
if (!
|
|
892
|
-
|
|
912
|
+
for (let j = 0; j < lists.length; j++) {
|
|
913
|
+
const list = lists[j];
|
|
914
|
+
if (!Array.isArray(list) || !reached.has(list) || isPackedSeries(list) || !pick(list))
|
|
915
|
+
continue;
|
|
893
916
|
const p = packedSeries(list);
|
|
894
|
-
for (const
|
|
895
|
-
|
|
896
|
-
|
|
917
|
+
for (const [holder, key] of places.get(list) ?? [])
|
|
918
|
+
holder[key] = p;
|
|
919
|
+
if (lists[j] !== p)
|
|
920
|
+
lists[j] = p;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
function packRunState(s) {
|
|
924
|
+
packLists(s, s.series, () => true);
|
|
925
|
+
return s;
|
|
926
|
+
}
|
|
927
|
+
function packPointLists(s) {
|
|
928
|
+
packLists(s, s.lists, (list) => {
|
|
929
|
+
for (const x of list)
|
|
930
|
+
if (x !== void 0)
|
|
931
|
+
return isPoint(x);
|
|
932
|
+
return false;
|
|
897
933
|
});
|
|
898
934
|
return s;
|
|
899
935
|
}
|
|
@@ -994,8 +1030,6 @@ function createBarRun(study, chart = {}) {
|
|
|
994
1030
|
if (limits)
|
|
995
1031
|
resetDrawings(limits);
|
|
996
1032
|
state = study.init(bars, next);
|
|
997
|
-
if (packed2)
|
|
998
|
-
packRunState(state);
|
|
999
1033
|
confirmed = 0;
|
|
1000
1034
|
}
|
|
1001
1035
|
const s = state;
|
|
@@ -1019,6 +1053,10 @@ function createBarRun(study, chart = {}) {
|
|
|
1019
1053
|
}
|
|
1020
1054
|
for (const out of s.series)
|
|
1021
1055
|
out.length = n;
|
|
1056
|
+
if (packed2 && from === 0) {
|
|
1057
|
+
packRunState(s);
|
|
1058
|
+
packPointLists(s);
|
|
1059
|
+
}
|
|
1022
1060
|
copy = copyBars(bars, confirmed, copy, Math.min(from, confirmed));
|
|
1023
1061
|
return Object.assign(study.result(s, bars, next), { from });
|
|
1024
1062
|
} catch (e) {
|
|
@@ -1503,6 +1541,7 @@ export {
|
|
|
1503
1541
|
mintickOf,
|
|
1504
1542
|
nowOf,
|
|
1505
1543
|
otherSymbolChart,
|
|
1544
|
+
packPointLists,
|
|
1506
1545
|
packRunState,
|
|
1507
1546
|
packedColumns,
|
|
1508
1547
|
packedFromColumns,
|
package/dist/index.cjs
CHANGED
|
@@ -3857,26 +3857,62 @@ function packedFromColumns(c4) {
|
|
|
3857
3857
|
cols.extra = c4.extra;
|
|
3858
3858
|
return view(cols);
|
|
3859
3859
|
}
|
|
3860
|
-
|
|
3860
|
+
var RUN_FIELDS = /* @__PURE__ */ new Set(["series", "lists"]);
|
|
3861
|
+
function packLists(s, lists, pick2) {
|
|
3861
3862
|
const own = s;
|
|
3862
|
-
const
|
|
3863
|
+
const places = /* @__PURE__ */ new Map();
|
|
3864
|
+
const reached = /* @__PURE__ */ new Set();
|
|
3865
|
+
const at6 = (list, holder, key2) => {
|
|
3866
|
+
const p = places.get(list);
|
|
3867
|
+
if (p)
|
|
3868
|
+
p.push([holder, key2]);
|
|
3869
|
+
else
|
|
3870
|
+
places.set(list, [[holder, key2]]);
|
|
3871
|
+
};
|
|
3872
|
+
const holders = /* @__PURE__ */ new Set();
|
|
3863
3873
|
for (const k of Object.keys(own)) {
|
|
3864
|
-
|
|
3874
|
+
const v = own[k];
|
|
3875
|
+
if (!Array.isArray(v))
|
|
3876
|
+
continue;
|
|
3877
|
+
const study1286 = !RUN_FIELDS.has(k);
|
|
3878
|
+
at6(v, own, k);
|
|
3879
|
+
if (study1286)
|
|
3880
|
+
reached.add(v);
|
|
3881
|
+
if (isPackedSeries(v))
|
|
3882
|
+
continue;
|
|
3883
|
+
if (study1286) {
|
|
3884
|
+
for (const item of v)
|
|
3885
|
+
if (Array.isArray(item))
|
|
3886
|
+
reached.add(item);
|
|
3887
|
+
}
|
|
3888
|
+
if (holders.has(v))
|
|
3889
|
+
continue;
|
|
3890
|
+
holders.add(v);
|
|
3891
|
+
for (let j = 0; j < v.length; j++)
|
|
3892
|
+
if (Array.isArray(v[j]))
|
|
3893
|
+
at6(v[j], v, j);
|
|
3894
|
+
}
|
|
3895
|
+
for (let j = 0; j < lists.length; j++) {
|
|
3896
|
+
const list = lists[j];
|
|
3897
|
+
if (!Array.isArray(list) || !reached.has(list) || isPackedSeries(list) || !pick2(list))
|
|
3865
3898
|
continue;
|
|
3866
|
-
const names = fields.get(own[k]);
|
|
3867
|
-
if (names)
|
|
3868
|
-
names.push(k);
|
|
3869
|
-
else
|
|
3870
|
-
fields.set(own[k], [k]);
|
|
3871
|
-
}
|
|
3872
|
-
s.series = s.series.map((list) => {
|
|
3873
|
-
const names = fields.get(list);
|
|
3874
|
-
if (!names || isPackedSeries(list))
|
|
3875
|
-
return list;
|
|
3876
3899
|
const p = packedSeries(list);
|
|
3877
|
-
for (const
|
|
3878
|
-
|
|
3879
|
-
|
|
3900
|
+
for (const [holder, key2] of places.get(list) ?? [])
|
|
3901
|
+
holder[key2] = p;
|
|
3902
|
+
if (lists[j] !== p)
|
|
3903
|
+
lists[j] = p;
|
|
3904
|
+
}
|
|
3905
|
+
}
|
|
3906
|
+
function packRunState(s) {
|
|
3907
|
+
packLists(s, s.series, () => true);
|
|
3908
|
+
return s;
|
|
3909
|
+
}
|
|
3910
|
+
function packPointLists(s) {
|
|
3911
|
+
packLists(s, s.lists, (list) => {
|
|
3912
|
+
for (const x of list)
|
|
3913
|
+
if (x !== void 0)
|
|
3914
|
+
return isPoint(x);
|
|
3915
|
+
return false;
|
|
3880
3916
|
});
|
|
3881
3917
|
return s;
|
|
3882
3918
|
}
|
|
@@ -3981,8 +4017,6 @@ function createBarRun(study1286, chart = {}) {
|
|
|
3981
4017
|
if (limits)
|
|
3982
4018
|
(0, import_oakscriptjs.resetDrawings)(limits);
|
|
3983
4019
|
state = study1286.init(bars, next);
|
|
3984
|
-
if (packed2)
|
|
3985
|
-
packRunState(state);
|
|
3986
4020
|
confirmed = 0;
|
|
3987
4021
|
}
|
|
3988
4022
|
const s = state;
|
|
@@ -4006,6 +4040,10 @@ function createBarRun(study1286, chart = {}) {
|
|
|
4006
4040
|
}
|
|
4007
4041
|
for (const out of s.series)
|
|
4008
4042
|
out.length = n;
|
|
4043
|
+
if (packed2 && from === 0) {
|
|
4044
|
+
packRunState(s);
|
|
4045
|
+
packPointLists(s);
|
|
4046
|
+
}
|
|
4009
4047
|
copy = copyBars(bars, confirmed, copy, Math.min(from, confirmed));
|
|
4010
4048
|
return Object.assign(study1286.result(s, bars, next), { from });
|
|
4011
4049
|
} catch (e) {
|
|
@@ -462832,4 +462870,4 @@ var registryPart12 = [
|
|
|
462832
462870
|
}
|
|
462833
462871
|
];
|
|
462834
462872
|
var indicatorRegistry = [...registryPart1, ...registryPart11, ...registryPart2, ...registryPart3, ...registryPart4, ...registryPart5, ...registryPart6, ...registryPart7, ...registryPart8, ...registryPart9, ...registryPart10, ...registryPart12].map(withReferenceNames).map(withValueFormat).map(withStyleOutputs).map(withAlertConditions);
|
|
462835
|
-
var version = "0.
|
|
462873
|
+
var version = "0.22.0";
|
package/dist/index.d.ts
CHANGED
|
@@ -3725,5 +3725,5 @@ export type { ChartContext, VisibleRange, SymbolRequest, SymbolInfo } from './ch
|
|
|
3725
3725
|
export { MissingSymbolDataError, symbolBarsOf } from './chart-context';
|
|
3726
3726
|
export { mintickOf, timezoneOf, tickeridOf, tickerOf, symbolTypeOf, currencyOf, basecurrencyOf, rootOf, foregroundColorOf, backgroundColorOf, lastBarConfirmedOf, nowOf, visibleRangeOf, } from './chart-context';
|
|
3727
3727
|
export { securityOther, securityOtherValues, securityLowerTf, otherSymbolChart, spreadSymbols, spreadBars, spreadOptions, type OtherSymbolOptions, type OtherSymbolChart, type SymbolCalendar, } from './other-symbol';
|
|
3728
|
-
export declare const version = "0.
|
|
3728
|
+
export declare const version = "0.22.0";
|
|
3729
3729
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.mjs
CHANGED
|
@@ -258,26 +258,62 @@ function packedFromColumns(c4) {
|
|
|
258
258
|
cols.extra = c4.extra;
|
|
259
259
|
return view(cols);
|
|
260
260
|
}
|
|
261
|
-
|
|
261
|
+
var RUN_FIELDS = /* @__PURE__ */ new Set(["series", "lists"]);
|
|
262
|
+
function packLists(s, lists, pick2) {
|
|
262
263
|
const own = s;
|
|
263
|
-
const
|
|
264
|
+
const places = /* @__PURE__ */ new Map();
|
|
265
|
+
const reached = /* @__PURE__ */ new Set();
|
|
266
|
+
const at6 = (list, holder, key2) => {
|
|
267
|
+
const p = places.get(list);
|
|
268
|
+
if (p)
|
|
269
|
+
p.push([holder, key2]);
|
|
270
|
+
else
|
|
271
|
+
places.set(list, [[holder, key2]]);
|
|
272
|
+
};
|
|
273
|
+
const holders = /* @__PURE__ */ new Set();
|
|
264
274
|
for (const k of Object.keys(own)) {
|
|
265
|
-
|
|
275
|
+
const v = own[k];
|
|
276
|
+
if (!Array.isArray(v))
|
|
277
|
+
continue;
|
|
278
|
+
const study1286 = !RUN_FIELDS.has(k);
|
|
279
|
+
at6(v, own, k);
|
|
280
|
+
if (study1286)
|
|
281
|
+
reached.add(v);
|
|
282
|
+
if (isPackedSeries(v))
|
|
283
|
+
continue;
|
|
284
|
+
if (study1286) {
|
|
285
|
+
for (const item of v)
|
|
286
|
+
if (Array.isArray(item))
|
|
287
|
+
reached.add(item);
|
|
288
|
+
}
|
|
289
|
+
if (holders.has(v))
|
|
290
|
+
continue;
|
|
291
|
+
holders.add(v);
|
|
292
|
+
for (let j = 0; j < v.length; j++)
|
|
293
|
+
if (Array.isArray(v[j]))
|
|
294
|
+
at6(v[j], v, j);
|
|
295
|
+
}
|
|
296
|
+
for (let j = 0; j < lists.length; j++) {
|
|
297
|
+
const list = lists[j];
|
|
298
|
+
if (!Array.isArray(list) || !reached.has(list) || isPackedSeries(list) || !pick2(list))
|
|
266
299
|
continue;
|
|
267
|
-
const names = fields.get(own[k]);
|
|
268
|
-
if (names)
|
|
269
|
-
names.push(k);
|
|
270
|
-
else
|
|
271
|
-
fields.set(own[k], [k]);
|
|
272
|
-
}
|
|
273
|
-
s.series = s.series.map((list) => {
|
|
274
|
-
const names = fields.get(list);
|
|
275
|
-
if (!names || isPackedSeries(list))
|
|
276
|
-
return list;
|
|
277
300
|
const p = packedSeries(list);
|
|
278
|
-
for (const
|
|
279
|
-
|
|
280
|
-
|
|
301
|
+
for (const [holder, key2] of places.get(list) ?? [])
|
|
302
|
+
holder[key2] = p;
|
|
303
|
+
if (lists[j] !== p)
|
|
304
|
+
lists[j] = p;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
function packRunState(s) {
|
|
308
|
+
packLists(s, s.series, () => true);
|
|
309
|
+
return s;
|
|
310
|
+
}
|
|
311
|
+
function packPointLists(s) {
|
|
312
|
+
packLists(s, s.lists, (list) => {
|
|
313
|
+
for (const x of list)
|
|
314
|
+
if (x !== void 0)
|
|
315
|
+
return isPoint(x);
|
|
316
|
+
return false;
|
|
281
317
|
});
|
|
282
318
|
return s;
|
|
283
319
|
}
|
|
@@ -388,8 +424,6 @@ function createBarRun(study1286, chart = {}) {
|
|
|
388
424
|
if (limits)
|
|
389
425
|
resetDrawings(limits);
|
|
390
426
|
state = study1286.init(bars, next);
|
|
391
|
-
if (packed2)
|
|
392
|
-
packRunState(state);
|
|
393
427
|
confirmed = 0;
|
|
394
428
|
}
|
|
395
429
|
const s = state;
|
|
@@ -413,6 +447,10 @@ function createBarRun(study1286, chart = {}) {
|
|
|
413
447
|
}
|
|
414
448
|
for (const out of s.series)
|
|
415
449
|
out.length = n;
|
|
450
|
+
if (packed2 && from === 0) {
|
|
451
|
+
packRunState(s);
|
|
452
|
+
packPointLists(s);
|
|
453
|
+
}
|
|
416
454
|
copy = copyBars(bars, confirmed, copy, Math.min(from, confirmed));
|
|
417
455
|
return Object.assign(study1286.result(s, bars, next), { from });
|
|
418
456
|
} catch (e) {
|
|
@@ -463041,7 +463079,7 @@ var registryPart12 = [
|
|
|
463041
463079
|
}
|
|
463042
463080
|
];
|
|
463043
463081
|
var indicatorRegistry = [...registryPart1, ...registryPart11, ...registryPart2, ...registryPart3, ...registryPart4, ...registryPart5, ...registryPart6, ...registryPart7, ...registryPart8, ...registryPart9, ...registryPart10, ...registryPart12].map(withReferenceNames).map(withValueFormat).map(withStyleOutputs).map(withAlertConditions);
|
|
463044
|
-
var version = "0.
|
|
463082
|
+
var version = "0.22.0";
|
|
463045
463083
|
export {
|
|
463046
463084
|
ADR,
|
|
463047
463085
|
ADX,
|
package/dist/live-run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-run.d.ts","sourceRoot":"","sources":["../src/live-run.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACkF,KAAK,GAAG,EAC/F,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,gHAAgH;AAChH,MAAM,WAAW,WAAW;IAC1B,MAAM,IAAI,IAAI,CAAC;CAChB;AAED,iEAAiE;AACjE,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,GAAG;IACnC;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,CAAC,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,gFAAgF;IAChF,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACrE,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,KAAK,E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B,OAAO,CAAC,OAAO,CAAO;IACtB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;gBAEnB,MAAM,EAAE,MAAM,EAAmB,MAAM,SAAI;IAgBvD,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAuB3B,MAAM,IAAI,IAAI;CASf"}
|
package/dist/packed-series.d.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Packed series (#29): the per-bar outputs of a live run held as numbers. A run keeps one `{ time, value }` object per
|
|
3
3
|
* bar and per plot in `s.series`; a host that keeps runs alive between updates holds them all. In packed mode (off by
|
|
4
4
|
* default, set by the host with {@link setPackedSeries} before it makes a run) the lists of `s.series` the study writes
|
|
5
|
-
* through
|
|
5
|
+
* through its state, and the lists of points it keeps in `s.lists`, are packed lists: packed at the end of a full run
|
|
6
|
+
* (its bars written to plain lists, at full speed), so the next updates write their few bars in them.
|
|
6
7
|
*
|
|
7
8
|
* A packed list reads and writes as the array it stands for (`Array.isArray`, length, index, `push`, the Array
|
|
8
9
|
* methods, iteration). It holds plot points (`{ time, value, ... }`: time and value in two Float64Arrays, the other
|
|
@@ -35,13 +36,17 @@ export declare function packedColumns(v: unknown): PackedColumns | null;
|
|
|
35
36
|
export declare const isPackedSeries: (v: unknown) => boolean;
|
|
36
37
|
/** A packed list of points over columns (sent from another thread). */
|
|
37
38
|
export declare function packedFromColumns<T = Point>(c: PackedColumns): T[];
|
|
38
|
-
/**
|
|
39
|
-
* The run state `s` with its per-bar outputs packed: the lists of `s.series` that are also a field of the state (the
|
|
40
|
-
* study writes through it) replaced by packed lists, in both places. A list reached otherwise (inside another field)
|
|
41
|
-
* is left as it is: the study's writes would not reach a replacement.
|
|
42
|
-
*/
|
|
39
|
+
/** The run state `s` with its per-bar outputs (the lists of `s.series`) packed, when it is made. */
|
|
43
40
|
export declare function packRunState<S extends {
|
|
44
41
|
series: unknown[][];
|
|
45
42
|
}>(s: S): S;
|
|
43
|
+
/**
|
|
44
|
+
* The lists of `s.lists` that hold plot points packed (once calculated: they are empty when the state is made). A
|
|
45
|
+
* study keeps there the points it draws away from their bar (a plot with an offset); its lists of numbers, read back
|
|
46
|
+
* on each bar, are left as they are.
|
|
47
|
+
*/
|
|
48
|
+
export declare function packPointLists<S extends {
|
|
49
|
+
lists: unknown[][];
|
|
50
|
+
}>(s: S): S;
|
|
46
51
|
export {};
|
|
47
52
|
//# sourceMappingURL=packed-series.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packed-series.d.ts","sourceRoot":"","sources":["../src/packed-series.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"packed-series.d.ts","sourceRoot":"","sources":["../src/packed-series.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAEvE,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,YAAY,CAAC;IACpB,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;CAClC;AAmND,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAEjD;AAED,2BAA2B;AAC3B,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,IAAI,GAAE,SAAS,OAAO,EAAO,GAAG,CAAC,EAAE,CAK1E;AAED,wEAAw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