node-opcua-numeric-range 2.97.0 → 2.98.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/package.json +7 -7
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -21
- package/dist/index.js.map +0 -1
- package/dist/numeric_range.d.ts +0 -101
- package/dist/numeric_range.js +0 -644
- package/dist/numeric_range.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-numeric-range",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.98.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module -numeric-range",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"node-opcua-assert": "2.88.0",
|
|
18
|
-
"node-opcua-basic-types": "2.
|
|
19
|
-
"node-opcua-binary-stream": "2.
|
|
20
|
-
"node-opcua-factory": "2.
|
|
21
|
-
"node-opcua-status-code": "2.
|
|
18
|
+
"node-opcua-basic-types": "2.98.0",
|
|
19
|
+
"node-opcua-binary-stream": "2.98.0",
|
|
20
|
+
"node-opcua-factory": "2.98.0",
|
|
21
|
+
"node-opcua-status-code": "2.98.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"node-opcua-packet-analyzer": "2.
|
|
24
|
+
"node-opcua-packet-analyzer": "2.98.0",
|
|
25
25
|
"node-opcua-test-helpers": "2.88.0",
|
|
26
26
|
"should": "^13.2.3"
|
|
27
27
|
},
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"internet of things"
|
|
39
39
|
],
|
|
40
40
|
"homepage": "http://node-opcua.github.io/",
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "07dcdd8e8c7f2b55544c6e23023093e35674829c"
|
|
42
42
|
}
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
/**
|
|
18
|
-
* @module node-opcua-numeric-range
|
|
19
|
-
*/
|
|
20
|
-
__exportStar(require("./numeric_range"), exports);
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,kDAAgC"}
|
package/dist/numeric_range.d.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { UAString } from "node-opcua-basic-types";
|
|
3
|
-
import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
|
|
4
|
-
import { StatusCode } from "node-opcua-status-code";
|
|
5
|
-
export declare const schemaNumericRange: {
|
|
6
|
-
name: string;
|
|
7
|
-
subType: string;
|
|
8
|
-
defaultValue: () => NumericRange;
|
|
9
|
-
encode: typeof encodeNumericRange;
|
|
10
|
-
decode: typeof decodeNumericRange;
|
|
11
|
-
random: () => NumericRange;
|
|
12
|
-
coerce: typeof coerceNumericRange;
|
|
13
|
-
};
|
|
14
|
-
export declare enum NumericRangeType {
|
|
15
|
-
Empty = 0,
|
|
16
|
-
SingleValue = 1,
|
|
17
|
-
ArrayRange = 2,
|
|
18
|
-
MatrixRange = 3,
|
|
19
|
-
InvalidRange = 4
|
|
20
|
-
}
|
|
21
|
-
type NumericalRangeValueType = null | number | string | number[] | number[][];
|
|
22
|
-
export interface NumericalRangeSingleValue {
|
|
23
|
-
type: NumericRangeType.SingleValue;
|
|
24
|
-
value: number;
|
|
25
|
-
}
|
|
26
|
-
export interface NumericalRangeArrayRange {
|
|
27
|
-
type: NumericRangeType.ArrayRange;
|
|
28
|
-
value: number[];
|
|
29
|
-
}
|
|
30
|
-
export interface NumericalRangeMatrixRange {
|
|
31
|
-
type: NumericRangeType.MatrixRange;
|
|
32
|
-
value: number[][];
|
|
33
|
-
}
|
|
34
|
-
export interface NumericalRangeEmpty {
|
|
35
|
-
type: NumericRangeType.Empty;
|
|
36
|
-
value: null;
|
|
37
|
-
}
|
|
38
|
-
export interface NumericalRangeInvalid {
|
|
39
|
-
type: NumericRangeType.InvalidRange;
|
|
40
|
-
value: string;
|
|
41
|
-
}
|
|
42
|
-
export type NumericalRange0 = NumericalRangeSingleValue | NumericalRangeArrayRange | NumericalRangeMatrixRange | NumericalRangeEmpty | NumericalRangeInvalid;
|
|
43
|
-
export interface NumericalRange1 {
|
|
44
|
-
type: NumericRangeType;
|
|
45
|
-
value: NumericalRangeValueType;
|
|
46
|
-
}
|
|
47
|
-
export declare class NumericRange implements NumericalRange1 {
|
|
48
|
-
static coerce: typeof coerceNumericRange;
|
|
49
|
-
static schema: {
|
|
50
|
-
name: string;
|
|
51
|
-
subType: string;
|
|
52
|
-
defaultValue: () => NumericRange;
|
|
53
|
-
encode: typeof encodeNumericRange;
|
|
54
|
-
decode: typeof decodeNumericRange;
|
|
55
|
-
random: () => NumericRange;
|
|
56
|
-
coerce: typeof coerceNumericRange;
|
|
57
|
-
};
|
|
58
|
-
static NumericRangeType: typeof NumericRangeType;
|
|
59
|
-
static readonly empty: NumericalRange0;
|
|
60
|
-
static overlap(nr1?: NumericalRange0, nr2?: NumericalRange0): boolean;
|
|
61
|
-
type: NumericRangeType;
|
|
62
|
-
value: NumericalRangeValueType;
|
|
63
|
-
constructor();
|
|
64
|
-
constructor(value: string | null);
|
|
65
|
-
constructor(value: number, secondValue?: number);
|
|
66
|
-
constructor(value: number[]);
|
|
67
|
-
constructor(value: number[], secondValue: number[]);
|
|
68
|
-
isValid(): boolean;
|
|
69
|
-
isEmpty(): boolean;
|
|
70
|
-
isDefined(): boolean;
|
|
71
|
-
toString(): string;
|
|
72
|
-
toJSON(): string;
|
|
73
|
-
toEncodeableString(): UAString;
|
|
74
|
-
/**
|
|
75
|
-
* @method extract_values
|
|
76
|
-
* @param array flat array containing values or string
|
|
77
|
-
* @param dimensions: of the matrix if data is a matrix
|
|
78
|
-
* @return {*}
|
|
79
|
-
*/
|
|
80
|
-
extract_values<U, T extends ArrayLike<U>>(array: T, dimensions?: number[]): ExtractResult<T>;
|
|
81
|
-
set_values_matrix(sourceToAlter: {
|
|
82
|
-
matrix: Buffer | [];
|
|
83
|
-
dimensions: number[];
|
|
84
|
-
}, newMatrix: Buffer | []): {
|
|
85
|
-
matrix: Buffer | [];
|
|
86
|
-
statusCode: StatusCode;
|
|
87
|
-
};
|
|
88
|
-
set_values(arrayToAlter: Buffer | [], newValues: Buffer | []): {
|
|
89
|
-
array: Buffer | [] | null;
|
|
90
|
-
statusCode: StatusCode;
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
export interface ExtractResult<T> {
|
|
94
|
-
array?: T | null;
|
|
95
|
-
statusCode: StatusCode;
|
|
96
|
-
dimensions?: number[];
|
|
97
|
-
}
|
|
98
|
-
export declare function encodeNumericRange(numericRange: NumericRange, stream: OutputBinaryStream): void;
|
|
99
|
-
export declare function decodeNumericRange(stream: BinaryStream, _value?: NumericRange): NumericRange;
|
|
100
|
-
declare function coerceNumericRange(value: any | string | NumericRange | null | number[]): NumericRange;
|
|
101
|
-
export {};
|
package/dist/numeric_range.js
DELETED
|
@@ -1,644 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeNumericRange = exports.encodeNumericRange = exports.NumericRange = exports.NumericRangeType = exports.schemaNumericRange = void 0;
|
|
4
|
-
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
5
|
-
const node_opcua_basic_types_1 = require("node-opcua-basic-types");
|
|
6
|
-
const node_opcua_factory_1 = require("node-opcua-factory");
|
|
7
|
-
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
8
|
-
// OPC.UA Part 4 7.21 Numerical Range
|
|
9
|
-
// The syntax for the string contains one of the following two constructs. The first construct is the string
|
|
10
|
-
// representation of an individual integer. For example, '6' is valid, but '6.0' and '3.2' are not. The
|
|
11
|
-
// minimum and maximum values that can be expressed are defined by the use of this parameter and
|
|
12
|
-
// not by this parameter type definition. The second construct is a range represented by two integers
|
|
13
|
-
// separated by the colon (':') character. The first integer shall always have a lower value than the
|
|
14
|
-
// second. For example, '5:7' is valid, while '7:5' and '5:5' are not. The minimum and maximum values
|
|
15
|
-
// that can be expressed by these integers are defined by the use of this parameter , and not by this
|
|
16
|
-
// parameter type definition. No other characters, including white - space characters, are permitted.
|
|
17
|
-
// Multi- dimensional arrays can be indexed by specifying a range for each dimension separated by a ','.
|
|
18
|
-
//
|
|
19
|
-
// For example, a 2x2 block in a 4x4 matrix could be selected with the range '1:2,0:1'. A single element
|
|
20
|
-
// in a multi - dimensional array can be selected by specifying a single number instead of a range.
|
|
21
|
-
// For example, '1,1' specifies selects the [1,1] element in a two dimensional array.
|
|
22
|
-
// Dimensions are specified in the order that they appear in the ArrayDimensions Attribute.
|
|
23
|
-
// All dimensions shall be specified for a NumericRange to be valid.
|
|
24
|
-
//
|
|
25
|
-
// All indexes start with 0. The maximum value for any index is one less than the length of the
|
|
26
|
-
// dimension.
|
|
27
|
-
const NUMERIC_RANGE_EMPTY_STRING = "NumericRange:<Empty>";
|
|
28
|
-
// BNF of NumericRange
|
|
29
|
-
// The following BNF describes the syntax of the NumericRange parameter type.
|
|
30
|
-
// <numeric-range> ::= <dimension> [',' <dimension>]
|
|
31
|
-
// <dimension> ::= <index> [':' <index>]
|
|
32
|
-
// <index> ::= <digit> [<digit>]
|
|
33
|
-
// <digit> ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' |9'
|
|
34
|
-
//
|
|
35
|
-
// tslint:disable:object-literal-shorthand
|
|
36
|
-
// tslint:disable:only-arrow-functions
|
|
37
|
-
exports.schemaNumericRange = {
|
|
38
|
-
name: "NumericRange",
|
|
39
|
-
subType: "String",
|
|
40
|
-
defaultValue: () => {
|
|
41
|
-
return new NumericRange();
|
|
42
|
-
},
|
|
43
|
-
encode: encodeNumericRange,
|
|
44
|
-
decode: decodeNumericRange,
|
|
45
|
-
random: () => {
|
|
46
|
-
function r() {
|
|
47
|
-
return Math.ceil(Math.random() * 100);
|
|
48
|
-
}
|
|
49
|
-
const start = r();
|
|
50
|
-
const end = start + r();
|
|
51
|
-
return new NumericRange(start, end);
|
|
52
|
-
},
|
|
53
|
-
coerce: coerceNumericRange
|
|
54
|
-
};
|
|
55
|
-
(0, node_opcua_factory_1.registerBasicType)(exports.schemaNumericRange);
|
|
56
|
-
var NumericRangeType;
|
|
57
|
-
(function (NumericRangeType) {
|
|
58
|
-
NumericRangeType[NumericRangeType["Empty"] = 0] = "Empty";
|
|
59
|
-
NumericRangeType[NumericRangeType["SingleValue"] = 1] = "SingleValue";
|
|
60
|
-
NumericRangeType[NumericRangeType["ArrayRange"] = 2] = "ArrayRange";
|
|
61
|
-
NumericRangeType[NumericRangeType["MatrixRange"] = 3] = "MatrixRange";
|
|
62
|
-
NumericRangeType[NumericRangeType["InvalidRange"] = 4] = "InvalidRange";
|
|
63
|
-
})(NumericRangeType = exports.NumericRangeType || (exports.NumericRangeType = {}));
|
|
64
|
-
// new Enum(["Empty", "SingleValue", "ArrayRange", "MatrixRange", "InvalidRange"]);
|
|
65
|
-
const regexNumericRange = /^[0-9:,]*$/;
|
|
66
|
-
function _valid_range(low, high) {
|
|
67
|
-
return !(low >= high || low < 0 || high < 0);
|
|
68
|
-
}
|
|
69
|
-
function construct_numeric_range_bit_from_string(str) {
|
|
70
|
-
const values = str.split(":");
|
|
71
|
-
if (values.length === 1) {
|
|
72
|
-
return {
|
|
73
|
-
type: NumericRangeType.SingleValue,
|
|
74
|
-
value: parseInt(values[0], 10)
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
else if (values.length === 2) {
|
|
78
|
-
const array = values.map((a) => parseInt(a, 10));
|
|
79
|
-
if (!_valid_range(array[0], array[1])) {
|
|
80
|
-
return {
|
|
81
|
-
type: NumericRangeType.InvalidRange,
|
|
82
|
-
value: str
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
return {
|
|
86
|
-
type: NumericRangeType.ArrayRange,
|
|
87
|
-
value: array
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
return {
|
|
92
|
-
type: NumericRangeType.InvalidRange,
|
|
93
|
-
value: str
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function _normalize(e) {
|
|
98
|
-
if (e.type === NumericRangeType.SingleValue) {
|
|
99
|
-
const ee = e;
|
|
100
|
-
return [ee.value, ee.value];
|
|
101
|
-
}
|
|
102
|
-
return e.value;
|
|
103
|
-
}
|
|
104
|
-
function construct_numeric_range_from_string(str) {
|
|
105
|
-
if (!regexNumericRange.test(str)) {
|
|
106
|
-
return {
|
|
107
|
-
type: NumericRangeType.InvalidRange,
|
|
108
|
-
value: str
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
/* detect multi dim range*/
|
|
112
|
-
const values = str.split(",");
|
|
113
|
-
if (values.length === 1) {
|
|
114
|
-
return construct_numeric_range_bit_from_string(values[0]);
|
|
115
|
-
}
|
|
116
|
-
else if (values.length === 2) {
|
|
117
|
-
const elements = values.map(construct_numeric_range_bit_from_string);
|
|
118
|
-
let rowRange = elements[0];
|
|
119
|
-
let colRange = elements[1];
|
|
120
|
-
if (rowRange.type === NumericRangeType.InvalidRange || colRange.type === NumericRangeType.InvalidRange) {
|
|
121
|
-
return { type: NumericRangeType.InvalidRange, value: str };
|
|
122
|
-
}
|
|
123
|
-
rowRange = _normalize(rowRange);
|
|
124
|
-
colRange = _normalize(colRange);
|
|
125
|
-
return {
|
|
126
|
-
type: NumericRangeType.MatrixRange,
|
|
127
|
-
value: [rowRange, colRange]
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
// not supported yet
|
|
132
|
-
return { type: NumericRangeType.InvalidRange, value: str };
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
function construct_from_string(value) {
|
|
136
|
-
return construct_numeric_range_from_string(value);
|
|
137
|
-
}
|
|
138
|
-
function _set_single_value(value) {
|
|
139
|
-
if (value === null || value < 0 || !isFinite(value)) {
|
|
140
|
-
return {
|
|
141
|
-
type: NumericRangeType.InvalidRange,
|
|
142
|
-
value: "" + (value === null || value === void 0 ? void 0 : value.toString())
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
return {
|
|
147
|
-
type: NumericRangeType.SingleValue,
|
|
148
|
-
value: value
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
function _check_range(numericalRange) {
|
|
153
|
-
switch (numericalRange.type) {
|
|
154
|
-
case NumericRangeType.ArrayRange:
|
|
155
|
-
return _valid_range(numericalRange.value[0], numericalRange.value[1]);
|
|
156
|
-
}
|
|
157
|
-
// istanbul ignore next
|
|
158
|
-
throw new Error("unsupported case");
|
|
159
|
-
}
|
|
160
|
-
function _set_range_value(low, high) {
|
|
161
|
-
if (low === high) {
|
|
162
|
-
return {
|
|
163
|
-
type: NumericRangeType.SingleValue,
|
|
164
|
-
value: low
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
const numericalRange = {
|
|
168
|
-
type: NumericRangeType.ArrayRange,
|
|
169
|
-
value: [low, high]
|
|
170
|
-
};
|
|
171
|
-
if (!_check_range(numericalRange)) {
|
|
172
|
-
return {
|
|
173
|
-
type: NumericRangeType.InvalidRange,
|
|
174
|
-
value: ""
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
return numericalRange;
|
|
178
|
-
}
|
|
179
|
-
function construct_from_values(value, secondValue) {
|
|
180
|
-
if (secondValue === undefined) {
|
|
181
|
-
return _set_single_value(value);
|
|
182
|
-
}
|
|
183
|
-
else {
|
|
184
|
-
if (!isFinite(secondValue)) {
|
|
185
|
-
throw new Error(" invalid second argument, expecting a number");
|
|
186
|
-
}
|
|
187
|
-
return _set_range_value(value, secondValue);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
function _construct_from_array(value, value2) {
|
|
191
|
-
(0, node_opcua_assert_1.assert)(value.length === 2);
|
|
192
|
-
// istanbul ignore next
|
|
193
|
-
if (!isFinite(value[0]) || !isFinite(value[1])) {
|
|
194
|
-
return { type: NumericRangeType.InvalidRange, value: "" + value };
|
|
195
|
-
}
|
|
196
|
-
let range1 = _set_range_value(value[0], value[1]);
|
|
197
|
-
if (!value2) {
|
|
198
|
-
return range1;
|
|
199
|
-
}
|
|
200
|
-
// we have a matrix
|
|
201
|
-
const nr2 = new NumericRange(value2);
|
|
202
|
-
// istanbul ignore next
|
|
203
|
-
if (nr2.type === NumericRangeType.InvalidRange ||
|
|
204
|
-
nr2.type === NumericRangeType.MatrixRange ||
|
|
205
|
-
nr2.type === NumericRangeType.Empty) {
|
|
206
|
-
return { type: NumericRangeType.InvalidRange, value: "" + value };
|
|
207
|
-
}
|
|
208
|
-
if (range1.type === NumericRangeType.SingleValue) {
|
|
209
|
-
range1 = {
|
|
210
|
-
type: NumericRangeType.ArrayRange,
|
|
211
|
-
value: [range1.value, range1.value]
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
if (nr2.type === NumericRangeType.SingleValue) {
|
|
215
|
-
nr2.type = NumericRangeType.ArrayRange;
|
|
216
|
-
nr2.value = [nr2.value, nr2.value];
|
|
217
|
-
}
|
|
218
|
-
// istanbul ignore next
|
|
219
|
-
return {
|
|
220
|
-
type: NumericRangeType.MatrixRange,
|
|
221
|
-
value: [range1.value, nr2.value]
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
class NumericRange {
|
|
225
|
-
static overlap(nr1, nr2) {
|
|
226
|
-
nr1 = nr1 || NumericRange.empty;
|
|
227
|
-
nr2 = nr2 || NumericRange.empty;
|
|
228
|
-
if (NumericRangeType.Empty === nr1.type || NumericRangeType.Empty === nr2.type) {
|
|
229
|
-
return true;
|
|
230
|
-
}
|
|
231
|
-
if (NumericRangeType.SingleValue === nr1.type && NumericRangeType.SingleValue === nr2.type) {
|
|
232
|
-
return nr1.value === nr2.value;
|
|
233
|
-
}
|
|
234
|
-
if (NumericRangeType.ArrayRange === nr1.type && NumericRangeType.ArrayRange === nr2.type) {
|
|
235
|
-
// +-----+ +------+ +---+ +------+
|
|
236
|
-
// +----+ +---+ +--------+ +---+
|
|
237
|
-
const l1 = nr1.value[0];
|
|
238
|
-
const h1 = nr1.value[1];
|
|
239
|
-
const l2 = nr2.value[0];
|
|
240
|
-
const h2 = nr2.value[1];
|
|
241
|
-
return _overlap(l1, h1, l2, h2);
|
|
242
|
-
}
|
|
243
|
-
// istanbul ignore next
|
|
244
|
-
(0, node_opcua_assert_1.assert)(false, "NumericalRange#overlap : case not implemented yet "); // TODO
|
|
245
|
-
// istanbul ignore next
|
|
246
|
-
return false;
|
|
247
|
-
}
|
|
248
|
-
constructor(value, secondValue) {
|
|
249
|
-
this.type = NumericRangeType.InvalidRange;
|
|
250
|
-
this.value = null;
|
|
251
|
-
(0, node_opcua_assert_1.assert)(!value || !(value instanceof NumericRange), "use coerce to create a NumericRange");
|
|
252
|
-
(0, node_opcua_assert_1.assert)(!secondValue || typeof secondValue === "number" || Array.isArray(secondValue));
|
|
253
|
-
if (typeof value === "string") {
|
|
254
|
-
const a = construct_from_string(value);
|
|
255
|
-
this.type = a.type;
|
|
256
|
-
this.value = a.value;
|
|
257
|
-
}
|
|
258
|
-
else if (typeof value === "number" &&
|
|
259
|
-
isFinite(value) &&
|
|
260
|
-
(secondValue === undefined || (typeof secondValue === "number" && isFinite(secondValue)))) {
|
|
261
|
-
const a = construct_from_values(value, secondValue);
|
|
262
|
-
this.type = a.type;
|
|
263
|
-
this.value = a.value;
|
|
264
|
-
}
|
|
265
|
-
else if (Array.isArray(value)) {
|
|
266
|
-
const a = _construct_from_array(value, secondValue);
|
|
267
|
-
this.type = a.type;
|
|
268
|
-
this.value = a.value;
|
|
269
|
-
}
|
|
270
|
-
else {
|
|
271
|
-
this.value = "<invalid>";
|
|
272
|
-
this.type = NumericRangeType.Empty;
|
|
273
|
-
}
|
|
274
|
-
// xx assert((this.type !== NumericRangeType.ArrayRange) || Array.isArray(this.value));
|
|
275
|
-
}
|
|
276
|
-
isValid() {
|
|
277
|
-
if (this.type === NumericRangeType.ArrayRange) {
|
|
278
|
-
const value = this.value;
|
|
279
|
-
if (value[0] < 0 || value[1] < 0) {
|
|
280
|
-
return false;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
if (this.type === NumericRangeType.SingleValue) {
|
|
284
|
-
const value = this.value;
|
|
285
|
-
// istanbul ignore next
|
|
286
|
-
if (value < 0) {
|
|
287
|
-
return false;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
return this.type !== NumericRangeType.InvalidRange;
|
|
291
|
-
}
|
|
292
|
-
isEmpty() {
|
|
293
|
-
return this.type === NumericRangeType.Empty;
|
|
294
|
-
}
|
|
295
|
-
isDefined() {
|
|
296
|
-
return this.type !== NumericRangeType.Empty && this.type !== NumericRangeType.InvalidRange;
|
|
297
|
-
}
|
|
298
|
-
toString() {
|
|
299
|
-
function array_range_to_string(values) {
|
|
300
|
-
(0, node_opcua_assert_1.assert)(Array.isArray(values));
|
|
301
|
-
if (values.length === 2 && values[0] === values[1]) {
|
|
302
|
-
return values[0].toString();
|
|
303
|
-
}
|
|
304
|
-
return values.map((value) => value.toString(10)).join(":");
|
|
305
|
-
}
|
|
306
|
-
function matrix_range_to_string(values) {
|
|
307
|
-
return values
|
|
308
|
-
.map((value) => {
|
|
309
|
-
return Array.isArray(value) ? array_range_to_string(value) : value.toString(10);
|
|
310
|
-
})
|
|
311
|
-
.join(",");
|
|
312
|
-
}
|
|
313
|
-
switch (this.type) {
|
|
314
|
-
case NumericRangeType.SingleValue:
|
|
315
|
-
return this.value.toString(10);
|
|
316
|
-
case NumericRangeType.ArrayRange:
|
|
317
|
-
return array_range_to_string(this.value);
|
|
318
|
-
case NumericRangeType.Empty:
|
|
319
|
-
return NUMERIC_RANGE_EMPTY_STRING;
|
|
320
|
-
case NumericRangeType.MatrixRange:
|
|
321
|
-
return matrix_range_to_string(this.value);
|
|
322
|
-
default:
|
|
323
|
-
(0, node_opcua_assert_1.assert)(this.type === NumericRangeType.InvalidRange);
|
|
324
|
-
return "NumericRange:<Invalid>";
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
toJSON() {
|
|
328
|
-
return this.toString();
|
|
329
|
-
}
|
|
330
|
-
toEncodeableString() {
|
|
331
|
-
switch (this.type) {
|
|
332
|
-
case NumericRangeType.SingleValue:
|
|
333
|
-
case NumericRangeType.ArrayRange:
|
|
334
|
-
case NumericRangeType.MatrixRange:
|
|
335
|
-
return this.toString();
|
|
336
|
-
case NumericRangeType.InvalidRange:
|
|
337
|
-
// istanbul ignore next
|
|
338
|
-
if (!(typeof this.value === "string")) {
|
|
339
|
-
throw new Error("Internal Error");
|
|
340
|
-
}
|
|
341
|
-
return this.value; // value contains the original strings which was detected invalid
|
|
342
|
-
default:
|
|
343
|
-
return null;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* @method extract_values
|
|
348
|
-
* @param array flat array containing values or string
|
|
349
|
-
* @param dimensions: of the matrix if data is a matrix
|
|
350
|
-
* @return {*}
|
|
351
|
-
*/
|
|
352
|
-
extract_values(array, dimensions) {
|
|
353
|
-
const self = this;
|
|
354
|
-
if (!array) {
|
|
355
|
-
return {
|
|
356
|
-
array,
|
|
357
|
-
statusCode: this.type === NumericRangeType.Empty ? node_opcua_status_code_1.StatusCodes.Good : node_opcua_status_code_1.StatusCodes.BadIndexRangeNoData
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
let index;
|
|
361
|
-
let low_index;
|
|
362
|
-
let high_index;
|
|
363
|
-
let rowRange;
|
|
364
|
-
let colRange;
|
|
365
|
-
switch (self.type) {
|
|
366
|
-
case NumericRangeType.Empty:
|
|
367
|
-
return extract_empty(array, dimensions);
|
|
368
|
-
case NumericRangeType.SingleValue:
|
|
369
|
-
index = self.value;
|
|
370
|
-
return extract_single_value(array, index);
|
|
371
|
-
case NumericRangeType.ArrayRange:
|
|
372
|
-
low_index = self.value[0];
|
|
373
|
-
high_index = self.value[1];
|
|
374
|
-
return extract_array_range(array, low_index, high_index);
|
|
375
|
-
case NumericRangeType.MatrixRange:
|
|
376
|
-
rowRange = self.value[0];
|
|
377
|
-
colRange = self.value[1];
|
|
378
|
-
return extract_matrix_range(array, rowRange, colRange, dimensions);
|
|
379
|
-
default:
|
|
380
|
-
return { statusCode: node_opcua_status_code_1.StatusCodes.BadIndexRangeInvalid };
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
set_values_matrix(sourceToAlter, newMatrix) {
|
|
384
|
-
const { matrix, dimensions } = sourceToAlter;
|
|
385
|
-
const self = this;
|
|
386
|
-
(0, node_opcua_assert_1.assert)(dimensions, "expecting valid dimensions here");
|
|
387
|
-
if (self.type !== NumericRangeType.MatrixRange) {
|
|
388
|
-
// istanbul ignore next
|
|
389
|
-
return { matrix, statusCode: node_opcua_status_code_1.StatusCodes.BadTypeMismatch };
|
|
390
|
-
}
|
|
391
|
-
(0, node_opcua_assert_1.assert)(dimensions.length === 2);
|
|
392
|
-
const nbRows = dimensions[0];
|
|
393
|
-
const nbCols = dimensions[1];
|
|
394
|
-
(0, node_opcua_assert_1.assert)(sourceToAlter.matrix.length === nbRows * nbCols);
|
|
395
|
-
const [rowStart, rowEnd] = self.value[0];
|
|
396
|
-
const [colStart, colEnd] = self.value[1];
|
|
397
|
-
const nbRowInNew = rowEnd - rowStart + 1;
|
|
398
|
-
const nbColInNew = colEnd - colStart + 1;
|
|
399
|
-
if (nbRowInNew * nbColInNew !== newMatrix.length) {
|
|
400
|
-
return { matrix, statusCode: node_opcua_status_code_1.StatusCodes.BadTypeMismatch };
|
|
401
|
-
}
|
|
402
|
-
// check if the sub-matrix is in th range of the initial matrix
|
|
403
|
-
if (rowEnd >= nbRows || colEnd >= nbCols) {
|
|
404
|
-
// debugLog("out of band range => ", { rowEnd, nbRows, colEnd, nbCols });
|
|
405
|
-
return { matrix, statusCode: node_opcua_status_code_1.StatusCodes.BadTypeMismatch };
|
|
406
|
-
}
|
|
407
|
-
for (let row = rowStart; row <= rowEnd; row++) {
|
|
408
|
-
const ri = row - rowStart;
|
|
409
|
-
for (let col = colStart; col <= colEnd; col++) {
|
|
410
|
-
const ci = col - colStart;
|
|
411
|
-
matrix[row * nbCols + col] = newMatrix[ri * nbColInNew + ci];
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
return {
|
|
415
|
-
matrix,
|
|
416
|
-
statusCode: node_opcua_status_code_1.StatusCodes.Good
|
|
417
|
-
};
|
|
418
|
-
}
|
|
419
|
-
set_values(arrayToAlter, newValues) {
|
|
420
|
-
assert_array_or_buffer(arrayToAlter);
|
|
421
|
-
assert_array_or_buffer(newValues);
|
|
422
|
-
const self = this;
|
|
423
|
-
let low_index;
|
|
424
|
-
let high_index;
|
|
425
|
-
switch (self.type) {
|
|
426
|
-
case NumericRangeType.Empty:
|
|
427
|
-
low_index = 0;
|
|
428
|
-
high_index = arrayToAlter.length - 1;
|
|
429
|
-
break;
|
|
430
|
-
case NumericRangeType.SingleValue:
|
|
431
|
-
low_index = self.value;
|
|
432
|
-
high_index = self.value;
|
|
433
|
-
break;
|
|
434
|
-
case NumericRangeType.ArrayRange:
|
|
435
|
-
low_index = self.value[0];
|
|
436
|
-
high_index = self.value[1];
|
|
437
|
-
break;
|
|
438
|
-
case NumericRangeType.MatrixRange:
|
|
439
|
-
// for the time being MatrixRange is not supported
|
|
440
|
-
return { array: arrayToAlter, statusCode: node_opcua_status_code_1.StatusCodes.BadIndexRangeNoData };
|
|
441
|
-
default:
|
|
442
|
-
return { array: null, statusCode: node_opcua_status_code_1.StatusCodes.BadIndexRangeInvalid };
|
|
443
|
-
}
|
|
444
|
-
if (high_index >= arrayToAlter.length || low_index >= arrayToAlter.length) {
|
|
445
|
-
return { array: null, statusCode: node_opcua_status_code_1.StatusCodes.BadIndexRangeNoData };
|
|
446
|
-
}
|
|
447
|
-
if (this.type !== NumericRangeType.Empty && newValues.length !== high_index - low_index + 1) {
|
|
448
|
-
return { array: null, statusCode: node_opcua_status_code_1.StatusCodes.BadIndexRangeInvalid };
|
|
449
|
-
}
|
|
450
|
-
const insertInPlace = Array.isArray(arrayToAlter)
|
|
451
|
-
? insertInPlaceStandardArray
|
|
452
|
-
: arrayToAlter instanceof Buffer
|
|
453
|
-
? insertInPlaceBuffer
|
|
454
|
-
: insertInPlaceTypedArray;
|
|
455
|
-
return {
|
|
456
|
-
array: insertInPlace(arrayToAlter, low_index, high_index, newValues),
|
|
457
|
-
statusCode: node_opcua_status_code_1.StatusCodes.Good
|
|
458
|
-
};
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
exports.NumericRange = NumericRange;
|
|
462
|
-
NumericRange.coerce = coerceNumericRange;
|
|
463
|
-
NumericRange.schema = exports.schemaNumericRange;
|
|
464
|
-
// tslint:disable:variable-name
|
|
465
|
-
NumericRange.NumericRangeType = NumericRangeType;
|
|
466
|
-
NumericRange.empty = new NumericRange();
|
|
467
|
-
function slice(arr, start, end) {
|
|
468
|
-
if (start === 0 && end === arr.length) {
|
|
469
|
-
return arr;
|
|
470
|
-
}
|
|
471
|
-
let res;
|
|
472
|
-
if (arr.buffer instanceof ArrayBuffer) {
|
|
473
|
-
res = arr.subarray(start, end);
|
|
474
|
-
}
|
|
475
|
-
else if (arr instanceof Buffer) {
|
|
476
|
-
res = arr.subarray(start, end);
|
|
477
|
-
}
|
|
478
|
-
else {
|
|
479
|
-
(0, node_opcua_assert_1.assert)(typeof arr.slice === "function");
|
|
480
|
-
(0, node_opcua_assert_1.assert)(arr instanceof Buffer || arr instanceof Array || typeof arr === "string");
|
|
481
|
-
res = arr.slice(start, end);
|
|
482
|
-
}
|
|
483
|
-
if (res instanceof Uint8Array && arr instanceof Buffer) {
|
|
484
|
-
// note in io-js 3.00 onward standard Buffer are implemented differently and
|
|
485
|
-
// provides a buffer member and a subarray method, in fact in io-js 3.0
|
|
486
|
-
// it seems that Buffer acts as a Uint8Array. in this very special case
|
|
487
|
-
// we need to make sure that we end up with a Buffer object and not a Uint8Array.
|
|
488
|
-
res = Buffer.from(res);
|
|
489
|
-
}
|
|
490
|
-
return res;
|
|
491
|
-
}
|
|
492
|
-
function extract_empty(array, dimensions) {
|
|
493
|
-
return {
|
|
494
|
-
array: slice(array, 0, array.length),
|
|
495
|
-
dimensions,
|
|
496
|
-
statusCode: node_opcua_status_code_1.StatusCodes.Good
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
function extract_single_value(array, index) {
|
|
500
|
-
if (index >= array.length) {
|
|
501
|
-
if (typeof array === "string") {
|
|
502
|
-
return { array: "", statusCode: node_opcua_status_code_1.StatusCodes.BadIndexRangeNoData };
|
|
503
|
-
}
|
|
504
|
-
return { array: null, statusCode: node_opcua_status_code_1.StatusCodes.BadIndexRangeNoData };
|
|
505
|
-
}
|
|
506
|
-
return {
|
|
507
|
-
array: slice(array, index, index + 1),
|
|
508
|
-
statusCode: node_opcua_status_code_1.StatusCodes.Good
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
|
-
function extract_array_range(array, low_index, high_index) {
|
|
512
|
-
(0, node_opcua_assert_1.assert)(isFinite(low_index) && isFinite(high_index));
|
|
513
|
-
(0, node_opcua_assert_1.assert)(low_index >= 0);
|
|
514
|
-
(0, node_opcua_assert_1.assert)(low_index <= high_index);
|
|
515
|
-
if (low_index >= array.length) {
|
|
516
|
-
if (typeof array === "string") {
|
|
517
|
-
return { array: "", statusCode: node_opcua_status_code_1.StatusCodes.BadIndexRangeNoData };
|
|
518
|
-
}
|
|
519
|
-
return { array: null, statusCode: node_opcua_status_code_1.StatusCodes.BadIndexRangeNoData };
|
|
520
|
-
}
|
|
521
|
-
// clamp high index
|
|
522
|
-
high_index = Math.min(high_index, array.length - 1);
|
|
523
|
-
return {
|
|
524
|
-
array: slice(array, low_index, high_index + 1),
|
|
525
|
-
statusCode: node_opcua_status_code_1.StatusCodes.Good
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
|
-
function isArrayLike(value) {
|
|
529
|
-
return typeof value.length === "number" || Object.prototype.hasOwnProperty.call(value, "length");
|
|
530
|
-
}
|
|
531
|
-
function extract_matrix_range(array, rowRange, colRange, dimension) {
|
|
532
|
-
(0, node_opcua_assert_1.assert)(Array.isArray(rowRange) && Array.isArray(colRange));
|
|
533
|
-
if (array.length === 0) {
|
|
534
|
-
return {
|
|
535
|
-
array: null,
|
|
536
|
-
statusCode: node_opcua_status_code_1.StatusCodes.BadIndexRangeNoData
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
if (isArrayLike(array[0]) && !dimension) {
|
|
540
|
-
// like extracting data from a one dimensional array of strings or byteStrings...
|
|
541
|
-
const result = extract_array_range(array, rowRange[0], rowRange[1]);
|
|
542
|
-
for (let i = 0; i < result.array.length; i++) {
|
|
543
|
-
const e = result.array[i];
|
|
544
|
-
result.array[i] = extract_array_range(e, colRange[0], colRange[1]).array;
|
|
545
|
-
}
|
|
546
|
-
return result;
|
|
547
|
-
}
|
|
548
|
-
if (!dimension) {
|
|
549
|
-
return {
|
|
550
|
-
array: null,
|
|
551
|
-
statusCode: node_opcua_status_code_1.StatusCodes.BadIndexRangeNoData
|
|
552
|
-
};
|
|
553
|
-
}
|
|
554
|
-
(0, node_opcua_assert_1.assert)(dimension, "expecting dimension to know the shape of the matrix represented by the flat array");
|
|
555
|
-
//
|
|
556
|
-
const rowLow = rowRange[0];
|
|
557
|
-
const rowHigh = rowRange[1];
|
|
558
|
-
const colLow = colRange[0];
|
|
559
|
-
const colHigh = colRange[1];
|
|
560
|
-
const nbRow = dimension[0];
|
|
561
|
-
const nbCol = dimension[1];
|
|
562
|
-
const nbRowDest = rowHigh - rowLow + 1;
|
|
563
|
-
const nbColDest = colHigh - colLow + 1;
|
|
564
|
-
// construct an array of the same type with the appropriate length to
|
|
565
|
-
// store the extracted matrix.
|
|
566
|
-
const tmp = new array.constructor(nbColDest * nbRowDest);
|
|
567
|
-
let row;
|
|
568
|
-
let col;
|
|
569
|
-
let r;
|
|
570
|
-
let c;
|
|
571
|
-
r = 0;
|
|
572
|
-
for (row = rowLow; row <= rowHigh; row++) {
|
|
573
|
-
c = 0;
|
|
574
|
-
for (col = colLow; col <= colHigh; col++) {
|
|
575
|
-
const srcIndex = row * nbCol + col;
|
|
576
|
-
const destIndex = r * nbColDest + c;
|
|
577
|
-
tmp[destIndex] = array[srcIndex];
|
|
578
|
-
c++;
|
|
579
|
-
}
|
|
580
|
-
r += 1;
|
|
581
|
-
}
|
|
582
|
-
return {
|
|
583
|
-
array: tmp,
|
|
584
|
-
dimensions: [nbRowDest, nbColDest],
|
|
585
|
-
statusCode: node_opcua_status_code_1.StatusCodes.Good
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
function assert_array_or_buffer(array) {
|
|
589
|
-
(0, node_opcua_assert_1.assert)(Array.isArray(array) || array.buffer instanceof ArrayBuffer || array instanceof Buffer);
|
|
590
|
-
}
|
|
591
|
-
function insertInPlaceStandardArray(arrayToAlter, low, high, newValues) {
|
|
592
|
-
const args = [low, high - low + 1].concat(newValues);
|
|
593
|
-
arrayToAlter.splice(...args);
|
|
594
|
-
return arrayToAlter;
|
|
595
|
-
}
|
|
596
|
-
function insertInPlaceTypedArray(arrayToAlter, low, high, newValues) {
|
|
597
|
-
if (low === 0 && high === arrayToAlter.length - 1) {
|
|
598
|
-
return new arrayToAlter.constructor(newValues);
|
|
599
|
-
}
|
|
600
|
-
(0, node_opcua_assert_1.assert)(newValues.length === high - low + 1);
|
|
601
|
-
arrayToAlter.subarray(low, high + 1).set(newValues);
|
|
602
|
-
return arrayToAlter;
|
|
603
|
-
}
|
|
604
|
-
function insertInPlaceBuffer(bufferToAlter, low, high, newValues) {
|
|
605
|
-
// insertInPlaceBuffer with buffer is not really possible as existing Buffer cannot be resized
|
|
606
|
-
if (!(bufferToAlter instanceof Buffer))
|
|
607
|
-
throw new Error("expecting a buffer");
|
|
608
|
-
if (low === 0 && high === bufferToAlter.length - 1) {
|
|
609
|
-
bufferToAlter = Buffer.from(newValues);
|
|
610
|
-
return bufferToAlter;
|
|
611
|
-
}
|
|
612
|
-
(0, node_opcua_assert_1.assert)(newValues.length === high - low + 1);
|
|
613
|
-
for (let i = 0; i < newValues.length; i++) {
|
|
614
|
-
bufferToAlter[i + low] = newValues[i];
|
|
615
|
-
}
|
|
616
|
-
return bufferToAlter;
|
|
617
|
-
}
|
|
618
|
-
function _overlap(l1, h1, l2, h2) {
|
|
619
|
-
return Math.max(l1, l2) <= Math.min(h1, h2);
|
|
620
|
-
}
|
|
621
|
-
function encodeNumericRange(numericRange, stream) {
|
|
622
|
-
(0, node_opcua_assert_1.assert)(numericRange instanceof NumericRange);
|
|
623
|
-
(0, node_opcua_basic_types_1.encodeString)(numericRange.toEncodeableString(), stream);
|
|
624
|
-
}
|
|
625
|
-
exports.encodeNumericRange = encodeNumericRange;
|
|
626
|
-
function decodeNumericRange(stream, _value) {
|
|
627
|
-
const str = (0, node_opcua_basic_types_1.decodeString)(stream);
|
|
628
|
-
return new NumericRange(str);
|
|
629
|
-
}
|
|
630
|
-
exports.decodeNumericRange = decodeNumericRange;
|
|
631
|
-
function coerceNumericRange(value) {
|
|
632
|
-
if (value instanceof NumericRange) {
|
|
633
|
-
return value;
|
|
634
|
-
}
|
|
635
|
-
if (value === null || value === undefined) {
|
|
636
|
-
return new NumericRange();
|
|
637
|
-
}
|
|
638
|
-
if (value === NUMERIC_RANGE_EMPTY_STRING) {
|
|
639
|
-
return new NumericRange();
|
|
640
|
-
}
|
|
641
|
-
(0, node_opcua_assert_1.assert)(typeof value === "string" || Array.isArray(value));
|
|
642
|
-
return new NumericRange(value);
|
|
643
|
-
}
|
|
644
|
-
//# sourceMappingURL=numeric_range.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"numeric_range.js","sourceRoot":"","sources":["../source/numeric_range.ts"],"names":[],"mappings":";;;AAIA,yDAA2C;AAE3C,mEAAqF;AAErF,2DAAuD;AACvD,mEAAiE;AAEjE,qCAAqC;AACrC,4GAA4G;AAC5G,yGAAyG;AACzG,gGAAgG;AAChG,qGAAqG;AACrG,uGAAuG;AACvG,qGAAqG;AACrG,qGAAqG;AACrG,qGAAqG;AACrG,wGAAwG;AACxG,EAAE;AACF,0GAA0G;AAC1G,mGAAmG;AACnG,qFAAqF;AACrF,4FAA4F;AAC5F,sEAAsE;AACtE,EAAE;AACF,+FAA+F;AAC/F,aAAa;AAEb,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAE1D,sBAAsB;AACtB,6EAA6E;AAC7E,uDAAuD;AACvD,+CAA+C;AAC/C,2CAA2C;AAC3C,iFAAiF;AACjF,EAAE;AACF,0CAA0C;AAC1C,sCAAsC;AACzB,QAAA,kBAAkB,G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