@bemedev/decompose 2.0.3 → 2.2.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/lib/constants/index.cjs +9 -14
- package/lib/constants/index.js +3 -3
- package/lib/constants/objects.cjs +10 -9
- package/lib/constants/objects.cjs.map +1 -1
- package/lib/constants/objects.js +9 -7
- package/lib/constants/objects.js.map +1 -1
- package/lib/constants/strings.cjs +9 -8
- package/lib/constants/strings.cjs.map +1 -1
- package/lib/constants/strings.js +8 -6
- package/lib/constants/strings.js.map +1 -1
- package/lib/contexts/assign.cjs +34 -43
- package/lib/contexts/assign.cjs.map +1 -1
- package/lib/contexts/assign.js +33 -41
- package/lib/contexts/assign.js.map +1 -1
- package/lib/contexts/constants.cjs +8 -7
- package/lib/contexts/constants.cjs.map +1 -1
- package/lib/contexts/constants.js +7 -5
- package/lib/contexts/constants.js.map +1 -1
- package/lib/contexts/get.cjs +20 -22
- package/lib/contexts/get.cjs.map +1 -1
- package/lib/contexts/get.js +19 -20
- package/lib/contexts/get.js.map +1 -1
- package/lib/contexts/index.cjs +5 -10
- package/lib/contexts/index.js +3 -3
- package/lib/decompose.cjs +53 -65
- package/lib/decompose.cjs.map +1 -1
- package/lib/decompose.js +52 -63
- package/lib/decompose.js.map +1 -1
- package/lib/decomposeKeys.cjs +27 -33
- package/lib/decomposeKeys.cjs.map +1 -1
- package/lib/decomposeKeys.js +25 -30
- package/lib/decomposeKeys.js.map +1 -1
- package/lib/decomposeSV.cjs +25 -28
- package/lib/decomposeSV.cjs.map +1 -1
- package/lib/decomposeSV.js +22 -24
- package/lib/decomposeSV.js.map +1 -1
- package/lib/flatByKey.cjs +26 -22
- package/lib/flatByKey.cjs.map +1 -1
- package/lib/flatByKey.js +25 -20
- package/lib/flatByKey.js.map +1 -1
- package/lib/helpers.cjs +10 -13
- package/lib/helpers.cjs.map +1 -1
- package/lib/helpers.js +9 -11
- package/lib/helpers.js.map +1 -1
- package/lib/index.cjs +27 -31
- package/lib/index.js +12 -11
- package/lib/recompose.cjs +43 -51
- package/lib/recompose.cjs.map +1 -1
- package/lib/recompose.js +42 -49
- package/lib/recompose.js.map +1 -1
- package/lib/sortMap.cjs +6 -5
- package/lib/sortMap.cjs.map +1 -1
- package/lib/sortMap.js +5 -3
- package/lib/sortMap.js.map +1 -1
- package/lib/types.types.d.ts +8 -9
- package/lib/types.types.d.ts.map +1 -1
- package/package.json +41 -33
- package/lib/constants/index.cjs.map +0 -1
- package/lib/constants/index.js.map +0 -1
- package/lib/contexts/index.cjs.map +0 -1
- package/lib/contexts/index.js.map +0 -1
- package/lib/index.cjs.map +0 -1
- package/lib/index.js.map +0 -1
package/lib/decomposeSV.js
CHANGED
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DELIMITER } from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
function ddecompose(val, prev =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
output.push(...keys.map(key => ddecompose(val[key], `${_prev}${key}`)).flat());
|
|
16
|
-
}
|
|
17
|
-
return output;
|
|
1
|
+
import { sortMap } from "./sortMap.js";
|
|
2
|
+
import { DELIMITER } from "./constants/strings.js";
|
|
3
|
+
import { castings } from "@bemedev/types";
|
|
4
|
+
//#region src/decomposeSV.ts
|
|
5
|
+
function ddecompose(val, prev = "") {
|
|
6
|
+
const output = [];
|
|
7
|
+
const _prev = prev ? prev + DELIMITER : "";
|
|
8
|
+
if (prev !== "") output.push(prev);
|
|
9
|
+
if (typeof val === "string") output.push(`${_prev}${val}`);
|
|
10
|
+
else {
|
|
11
|
+
const keys = Object.keys(val);
|
|
12
|
+
output.push(...keys.map((key) => ddecompose(val[key], `${_prev}${key}`)).flat());
|
|
13
|
+
}
|
|
14
|
+
return output;
|
|
18
15
|
}
|
|
19
16
|
const _decomposeSV = (val, sorter = sortMap) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
const output1 = ddecompose(val, "");
|
|
18
|
+
output1.sort(sorter);
|
|
19
|
+
const regex = new RegExp(DELIMITER, "g");
|
|
20
|
+
return output1.map((value) => value.replace(regex, "."));
|
|
24
21
|
};
|
|
25
22
|
/* v8 ignore next 3 */
|
|
26
23
|
const decomposeSV = (val, sorter) => {
|
|
27
|
-
|
|
24
|
+
return castings.commons.any(_decomposeSV(val, sorter));
|
|
28
25
|
};
|
|
29
26
|
decomposeSV.low = _decomposeSV;
|
|
30
27
|
decomposeSV.strict = castings.commons.unknown(_decomposeSV);
|
|
31
|
-
|
|
28
|
+
//#endregion
|
|
32
29
|
export { decomposeSV };
|
|
33
|
-
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=decomposeSV.js.map
|
package/lib/decomposeSV.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decomposeSV.js","sources":["../src/decomposeSV.ts"],"sourcesContent":["import { castings } from '@bemedev/types';\nimport { DELIMITER } from './constants/strings';\nimport { sortMap } from './sortMap';\nimport type { StateMatching, StateValue } from './types.types';\n\nfunction ddecompose(val: StateValue, prev = '') {\n const output: string[] = [];\n\n const _prev = prev ? prev + DELIMITER : '';\n if (prev !== '') output.push(prev);\n\n if (typeof val === 'string') {\n output.push(`${_prev}${val}`);\n } else {\n const keys = Object.keys(val);\n output.push(\n ...keys.map(key => ddecompose(val[key], `${_prev}${key}`)).flat(),\n );\n }\n\n return output;\n}\n\ntype DecomposeSV_F = <T extends StateValue>(\n val: T,\n sorter?: typeof sortMap,\n) => StateMatching<T>[];\n\ntype _DecomposeSV_F = (val: any, sorter?: typeof sortMap) => string[];\n\nexport type DecomposeSV = DecomposeSV_F & {\n strict: DecomposeSV_F;\n low: _DecomposeSV_F;\n};\n\nconst _decomposeSV: _DecomposeSV_F = (val, sorter = sortMap) => {\n const output1 = ddecompose(val, '');\n output1.sort(sorter);\n const regex = new RegExp(DELIMITER, 'g');\n return output1.map(value => value.replace(regex, '.'));\n};\n\n/* v8 ignore next 3 */\nexport const decomposeSV: DecomposeSV = (val, sorter) => {\n return castings.commons.any(_decomposeSV(val, sorter));\n};\ndecomposeSV.low = _decomposeSV;\ndecomposeSV.strict = castings.commons.unknown<DecomposeSV_F>(_decomposeSV);\n"],"
|
|
1
|
+
{"version":3,"file":"decomposeSV.js","names":[],"sources":["../src/decomposeSV.ts"],"sourcesContent":["import { castings } from '@bemedev/types';\nimport { DELIMITER } from './constants/strings';\nimport { sortMap } from './sortMap';\nimport type { StateMatching, StateValue } from './types.types';\n\nfunction ddecompose(val: StateValue, prev = '') {\n const output: string[] = [];\n\n const _prev = prev ? prev + DELIMITER : '';\n if (prev !== '') output.push(prev);\n\n if (typeof val === 'string') {\n output.push(`${_prev}${val}`);\n } else {\n const keys = Object.keys(val);\n output.push(\n ...keys.map(key => ddecompose(val[key], `${_prev}${key}`)).flat(),\n );\n }\n\n return output;\n}\n\ntype DecomposeSV_F = <T extends StateValue>(\n val: T,\n sorter?: typeof sortMap,\n) => StateMatching<T>[];\n\ntype _DecomposeSV_F = (val: any, sorter?: typeof sortMap) => string[];\n\nexport type DecomposeSV = DecomposeSV_F & {\n strict: DecomposeSV_F;\n low: _DecomposeSV_F;\n};\n\nconst _decomposeSV: _DecomposeSV_F = (val, sorter = sortMap) => {\n const output1 = ddecompose(val, '');\n output1.sort(sorter);\n const regex = new RegExp(DELIMITER, 'g');\n return output1.map(value => value.replace(regex, '.'));\n};\n\n/* v8 ignore next 3 */\nexport const decomposeSV: DecomposeSV = (val, sorter) => {\n return castings.commons.any(_decomposeSV(val, sorter));\n};\ndecomposeSV.low = _decomposeSV;\ndecomposeSV.strict = castings.commons.unknown<DecomposeSV_F>(_decomposeSV);\n"],"mappings":";;;;AAKA,SAAS,WAAW,KAAiB,OAAO,IAAI;CAC9C,MAAM,SAAmB,EAAE;CAE3B,MAAM,QAAQ,OAAO,OAAO,YAAY;AACxC,KAAI,SAAS,GAAI,QAAO,KAAK,KAAK;AAElC,KAAI,OAAO,QAAQ,SACjB,QAAO,KAAK,GAAG,QAAQ,MAAM;MACxB;EACL,MAAM,OAAO,OAAO,KAAK,IAAI;AAC7B,SAAO,KACL,GAAG,KAAK,KAAI,QAAO,WAAW,IAAI,MAAM,GAAG,QAAQ,MAAM,CAAC,CAAC,MAAM,CAClE;;AAGH,QAAO;;AAeT,MAAM,gBAAgC,KAAK,SAAS,YAAY;CAC9D,MAAM,UAAU,WAAW,KAAK,GAAG;AACnC,SAAQ,KAAK,OAAO;CACpB,MAAM,QAAQ,IAAI,OAAO,WAAW,IAAI;AACxC,QAAO,QAAQ,KAAI,UAAS,MAAM,QAAQ,OAAO,IAAI,CAAC;;;AAIxD,MAAa,eAA4B,KAAK,WAAW;AACvD,QAAO,SAAS,QAAQ,IAAI,aAAa,KAAK,OAAO,CAAC;;AAExD,YAAY,MAAM;AAClB,YAAY,SAAS,SAAS,QAAQ,QAAuB,aAAa"}
|
package/lib/flatByKey.cjs
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_constants_objects = require("./constants/objects.cjs");
|
|
3
|
+
//#region src/flatByKey.ts
|
|
4
|
+
const _flat = (val, omitKey, options, path = "") => {
|
|
5
|
+
const _options = {
|
|
6
|
+
...require_constants_objects.DEFAULT_FLAT_OPTIONS,
|
|
7
|
+
...options
|
|
8
|
+
};
|
|
9
|
+
const { [omitKey]: recursives, ...rest } = val;
|
|
10
|
+
const check = _options.children;
|
|
11
|
+
let out = {};
|
|
12
|
+
out[path === "" ? _options.sep : path] = check ? val : rest;
|
|
13
|
+
if (recursives) {
|
|
14
|
+
for (const key in recursives) if (Object.prototype.hasOwnProperty.call(recursives, key)) {
|
|
15
|
+
const element = recursives[key];
|
|
16
|
+
const inner = _flat(element, omitKey, options, `${path}${_options.sep}${key}`);
|
|
17
|
+
out = {
|
|
18
|
+
...out,
|
|
19
|
+
...inner
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return out;
|
|
21
24
|
};
|
|
22
25
|
const flatByKey = (val, key, options) => _flat(val, key, options);
|
|
23
26
|
flatByKey.low = _flat;
|
|
24
27
|
flatByKey.strict = _flat;
|
|
25
|
-
|
|
28
|
+
//#endregion
|
|
26
29
|
exports.flatByKey = flatByKey;
|
|
27
|
-
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=flatByKey.cjs.map
|
package/lib/flatByKey.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flatByKey.cjs","sources":["../src/flatByKey.ts"],"sourcesContent":["import type { types } from '@bemedev/types';\nimport { DEFAULT_FLAT_OPTIONS } from './constants';\nimport type { FlatByKey, FlatOptions } from './types.types';\n\ntype Flat_F = <\n T extends types.Ru,\n omit extends types.PickKeysBy<T, object> & string,\n>(\n val: T,\n omitKey: omit,\n options?: FlatOptions,\n) => FlatByKey<T, omit, FlatOptions>;\n\ntype _Flat_F = (\n val: any,\n omitKey: string,\n options?: FlatOptions,\n path?: string,\n) => any;\n\nexport type Flat = _Flat_F & {\n strict: Flat_F;\n low: _Flat_F;\n};\n\nconst _flat: _Flat_F = (val, omitKey, options, path = '') => {\n const _options = { ...DEFAULT_FLAT_OPTIONS, ...options };\n const { [omitKey]: recursives, ...rest } = val;\n\n const check = _options.children;\n\n let out: any = {};\n out[path === '' ? _options.sep : path] = check ? val : rest;\n\n if (recursives) {\n for (const key in recursives) {\n if (Object.prototype.hasOwnProperty.call(recursives, key)) {\n const element = recursives[key];\n const inner = _flat(\n element,\n omitKey,\n options,\n `${path}${_options.sep}${key}`,\n );\n out = { ...out, ...inner };\n }\n }\n }\n\n return out;\n};\n\nexport const flatByKey: Flat = (val, key, options) =>\n _flat(val, key, options);\nflatByKey.low = _flat;\nflatByKey.strict = _flat;\n"],"
|
|
1
|
+
{"version":3,"file":"flatByKey.cjs","names":["DEFAULT_FLAT_OPTIONS"],"sources":["../src/flatByKey.ts"],"sourcesContent":["import type { types } from '@bemedev/types';\nimport { DEFAULT_FLAT_OPTIONS } from './constants';\nimport type { FlatByKey, FlatOptions } from './types.types';\n\ntype Flat_F = <\n T extends types.Ru,\n omit extends types.PickKeysBy<T, object> & string,\n>(\n val: T,\n omitKey: omit,\n options?: FlatOptions,\n) => FlatByKey<T, omit, FlatOptions>;\n\ntype _Flat_F = (\n val: any,\n omitKey: string,\n options?: FlatOptions,\n path?: string,\n) => any;\n\nexport type Flat = _Flat_F & {\n strict: Flat_F;\n low: _Flat_F;\n};\n\nconst _flat: _Flat_F = (val, omitKey, options, path = '') => {\n const _options = { ...DEFAULT_FLAT_OPTIONS, ...options };\n const { [omitKey]: recursives, ...rest } = val;\n\n const check = _options.children;\n\n let out: any = {};\n out[path === '' ? _options.sep : path] = check ? val : rest;\n\n if (recursives) {\n for (const key in recursives) {\n if (Object.prototype.hasOwnProperty.call(recursives, key)) {\n const element = recursives[key];\n const inner = _flat(\n element,\n omitKey,\n options,\n `${path}${_options.sep}${key}`,\n );\n out = { ...out, ...inner };\n }\n }\n }\n\n return out;\n};\n\nexport const flatByKey: Flat = (val, key, options) =>\n _flat(val, key, options);\nflatByKey.low = _flat;\nflatByKey.strict = _flat;\n"],"mappings":";;;AAyBA,MAAM,SAAkB,KAAK,SAAS,SAAS,OAAO,OAAO;CAC3D,MAAM,WAAW;EAAE,GAAGA,0BAAAA;EAAsB,GAAG;EAAS;CACxD,MAAM,GAAG,UAAU,YAAY,GAAG,SAAS;CAE3C,MAAM,QAAQ,SAAS;CAEvB,IAAI,MAAW,EAAE;AACjB,KAAI,SAAS,KAAK,SAAS,MAAM,QAAQ,QAAQ,MAAM;AAEvD,KAAI;OACG,MAAM,OAAO,WAChB,KAAI,OAAO,UAAU,eAAe,KAAK,YAAY,IAAI,EAAE;GACzD,MAAM,UAAU,WAAW;GAC3B,MAAM,QAAQ,MACZ,SACA,SACA,SACA,GAAG,OAAO,SAAS,MAAM,MAC1B;AACD,SAAM;IAAE,GAAG;IAAK,GAAG;IAAO;;;AAKhC,QAAO;;AAGT,MAAa,aAAmB,KAAK,KAAK,YACxC,MAAM,KAAK,KAAK,QAAQ;AAC1B,UAAU,MAAM;AAChB,UAAU,SAAS"}
|
package/lib/flatByKey.js
CHANGED
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import { DEFAULT_FLAT_OPTIONS } from
|
|
2
|
-
|
|
3
|
-
const _flat = (val, omitKey, options, path =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { DEFAULT_FLAT_OPTIONS } from "./constants/objects.js";
|
|
2
|
+
//#region src/flatByKey.ts
|
|
3
|
+
const _flat = (val, omitKey, options, path = "") => {
|
|
4
|
+
const _options = {
|
|
5
|
+
...DEFAULT_FLAT_OPTIONS,
|
|
6
|
+
...options
|
|
7
|
+
};
|
|
8
|
+
const { [omitKey]: recursives, ...rest } = val;
|
|
9
|
+
const check = _options.children;
|
|
10
|
+
let out = {};
|
|
11
|
+
out[path === "" ? _options.sep : path] = check ? val : rest;
|
|
12
|
+
if (recursives) {
|
|
13
|
+
for (const key in recursives) if (Object.prototype.hasOwnProperty.call(recursives, key)) {
|
|
14
|
+
const element = recursives[key];
|
|
15
|
+
const inner = _flat(element, omitKey, options, `${path}${_options.sep}${key}`);
|
|
16
|
+
out = {
|
|
17
|
+
...out,
|
|
18
|
+
...inner
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return out;
|
|
19
23
|
};
|
|
20
24
|
const flatByKey = (val, key, options) => _flat(val, key, options);
|
|
21
25
|
flatByKey.low = _flat;
|
|
22
26
|
flatByKey.strict = _flat;
|
|
23
|
-
|
|
27
|
+
//#endregion
|
|
24
28
|
export { flatByKey };
|
|
25
|
-
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=flatByKey.js.map
|
package/lib/flatByKey.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flatByKey.js","sources":["../src/flatByKey.ts"],"sourcesContent":["import type { types } from '@bemedev/types';\nimport { DEFAULT_FLAT_OPTIONS } from './constants';\nimport type { FlatByKey, FlatOptions } from './types.types';\n\ntype Flat_F = <\n T extends types.Ru,\n omit extends types.PickKeysBy<T, object> & string,\n>(\n val: T,\n omitKey: omit,\n options?: FlatOptions,\n) => FlatByKey<T, omit, FlatOptions>;\n\ntype _Flat_F = (\n val: any,\n omitKey: string,\n options?: FlatOptions,\n path?: string,\n) => any;\n\nexport type Flat = _Flat_F & {\n strict: Flat_F;\n low: _Flat_F;\n};\n\nconst _flat: _Flat_F = (val, omitKey, options, path = '') => {\n const _options = { ...DEFAULT_FLAT_OPTIONS, ...options };\n const { [omitKey]: recursives, ...rest } = val;\n\n const check = _options.children;\n\n let out: any = {};\n out[path === '' ? _options.sep : path] = check ? val : rest;\n\n if (recursives) {\n for (const key in recursives) {\n if (Object.prototype.hasOwnProperty.call(recursives, key)) {\n const element = recursives[key];\n const inner = _flat(\n element,\n omitKey,\n options,\n `${path}${_options.sep}${key}`,\n );\n out = { ...out, ...inner };\n }\n }\n }\n\n return out;\n};\n\nexport const flatByKey: Flat = (val, key, options) =>\n _flat(val, key, options);\nflatByKey.low = _flat;\nflatByKey.strict = _flat;\n"],"
|
|
1
|
+
{"version":3,"file":"flatByKey.js","names":[],"sources":["../src/flatByKey.ts"],"sourcesContent":["import type { types } from '@bemedev/types';\nimport { DEFAULT_FLAT_OPTIONS } from './constants';\nimport type { FlatByKey, FlatOptions } from './types.types';\n\ntype Flat_F = <\n T extends types.Ru,\n omit extends types.PickKeysBy<T, object> & string,\n>(\n val: T,\n omitKey: omit,\n options?: FlatOptions,\n) => FlatByKey<T, omit, FlatOptions>;\n\ntype _Flat_F = (\n val: any,\n omitKey: string,\n options?: FlatOptions,\n path?: string,\n) => any;\n\nexport type Flat = _Flat_F & {\n strict: Flat_F;\n low: _Flat_F;\n};\n\nconst _flat: _Flat_F = (val, omitKey, options, path = '') => {\n const _options = { ...DEFAULT_FLAT_OPTIONS, ...options };\n const { [omitKey]: recursives, ...rest } = val;\n\n const check = _options.children;\n\n let out: any = {};\n out[path === '' ? _options.sep : path] = check ? val : rest;\n\n if (recursives) {\n for (const key in recursives) {\n if (Object.prototype.hasOwnProperty.call(recursives, key)) {\n const element = recursives[key];\n const inner = _flat(\n element,\n omitKey,\n options,\n `${path}${_options.sep}${key}`,\n );\n out = { ...out, ...inner };\n }\n }\n }\n\n return out;\n};\n\nexport const flatByKey: Flat = (val, key, options) =>\n _flat(val, key, options);\nflatByKey.low = _flat;\nflatByKey.strict = _flat;\n"],"mappings":";;AAyBA,MAAM,SAAkB,KAAK,SAAS,SAAS,OAAO,OAAO;CAC3D,MAAM,WAAW;EAAE,GAAG;EAAsB,GAAG;EAAS;CACxD,MAAM,GAAG,UAAU,YAAY,GAAG,SAAS;CAE3C,MAAM,QAAQ,SAAS;CAEvB,IAAI,MAAW,EAAE;AACjB,KAAI,SAAS,KAAK,SAAS,MAAM,QAAQ,QAAQ,MAAM;AAEvD,KAAI;OACG,MAAM,OAAO,WAChB,KAAI,OAAO,UAAU,eAAe,KAAK,YAAY,IAAI,EAAE;GACzD,MAAM,UAAU,WAAW;GAC3B,MAAM,QAAQ,MACZ,SACA,SACA,SACA,GAAG,OAAO,SAAS,MAAM,MAC1B;AACD,SAAM;IAAE,GAAG;IAAK,GAAG;IAAO;;;AAKhC,QAAO;;AAGT,MAAa,aAAmB,KAAK,KAAK,YACxC,MAAM,KAAK,KAAK,QAAQ;AAC1B,UAAU,MAAM;AAChB,UAAU,SAAS"}
|
package/lib/helpers.cjs
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/helpers.ts
|
|
3
3
|
function isPrimitive(arg) {
|
|
4
|
-
|
|
5
|
-
typeof arg === 'string' ||
|
|
6
|
-
typeof arg === 'boolean' ||
|
|
7
|
-
arg === undefined ||
|
|
8
|
-
arg === null);
|
|
4
|
+
return typeof arg === "number" || typeof arg === "string" || typeof arg === "boolean" || arg === void 0 || arg === null;
|
|
9
5
|
}
|
|
10
6
|
const isArrayIndex = (segment) => {
|
|
11
|
-
|
|
7
|
+
return /^\[\d+\]$/.test(segment);
|
|
12
8
|
};
|
|
13
9
|
const parseIndex = (segment) => {
|
|
14
|
-
|
|
10
|
+
return parseInt(segment.slice(1, -1), 10);
|
|
15
11
|
};
|
|
16
12
|
const splitKey = (key) => {
|
|
17
|
-
|
|
13
|
+
return key.split(".").filter((s) => s !== "");
|
|
18
14
|
};
|
|
19
15
|
const nextDefault = (segment) => {
|
|
20
|
-
|
|
16
|
+
return isArrayIndex(segment) ? [] : {};
|
|
21
17
|
};
|
|
22
|
-
|
|
18
|
+
//#endregion
|
|
23
19
|
exports.isArrayIndex = isArrayIndex;
|
|
24
20
|
exports.isPrimitive = isPrimitive;
|
|
25
21
|
exports.nextDefault = nextDefault;
|
|
26
22
|
exports.parseIndex = parseIndex;
|
|
27
23
|
exports.splitKey = splitKey;
|
|
28
|
-
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=helpers.cjs.map
|
package/lib/helpers.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.cjs","sources":["../src/helpers.ts"],"sourcesContent":["type Primitive = string | number | boolean | null | undefined;\n\nexport function isPrimitive(arg: unknown): arg is Primitive {\n return (\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'boolean' ||\n arg === undefined ||\n arg === null\n );\n}\n\nexport const isArrayIndex = (segment: string): boolean => {\n return /^\\[\\d+\\]$/.test(segment);\n};\n\nexport const parseIndex = (segment: string): number => {\n return parseInt(segment.slice(1, -1), 10);\n};\n\nexport const splitKey = (key: string): string[] => {\n return key.split('.').filter(s => s !== '');\n};\n\nexport const nextDefault = (segment: string): any => {\n return isArrayIndex(segment) ? [] : {};\n};\n"],"
|
|
1
|
+
{"version":3,"file":"helpers.cjs","names":[],"sources":["../src/helpers.ts"],"sourcesContent":["type Primitive = string | number | boolean | null | undefined;\n\nexport function isPrimitive(arg: unknown): arg is Primitive {\n return (\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'boolean' ||\n arg === undefined ||\n arg === null\n );\n}\n\nexport const isArrayIndex = (segment: string): boolean => {\n return /^\\[\\d+\\]$/.test(segment);\n};\n\nexport const parseIndex = (segment: string): number => {\n return parseInt(segment.slice(1, -1), 10);\n};\n\nexport const splitKey = (key: string): string[] => {\n return key.split('.').filter(s => s !== '');\n};\n\nexport const nextDefault = (segment: string): any => {\n return isArrayIndex(segment) ? [] : {};\n};\n"],"mappings":";;AAEA,SAAgB,YAAY,KAAgC;AAC1D,QACE,OAAO,QAAQ,YACf,OAAO,QAAQ,YACf,OAAO,QAAQ,aACf,QAAQ,KAAA,KACR,QAAQ;;AAIZ,MAAa,gBAAgB,YAA6B;AACxD,QAAO,YAAY,KAAK,QAAQ;;AAGlC,MAAa,cAAc,YAA4B;AACrD,QAAO,SAAS,QAAQ,MAAM,GAAG,GAAG,EAAE,GAAG;;AAG3C,MAAa,YAAY,QAA0B;AACjD,QAAO,IAAI,MAAM,IAAI,CAAC,QAAO,MAAK,MAAM,GAAG;;AAG7C,MAAa,eAAe,YAAyB;AACnD,QAAO,aAAa,QAAQ,GAAG,EAAE,GAAG,EAAE"}
|
package/lib/helpers.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
|
+
//#region src/helpers.ts
|
|
1
2
|
function isPrimitive(arg) {
|
|
2
|
-
|
|
3
|
-
typeof arg === 'string' ||
|
|
4
|
-
typeof arg === 'boolean' ||
|
|
5
|
-
arg === undefined ||
|
|
6
|
-
arg === null);
|
|
3
|
+
return typeof arg === "number" || typeof arg === "string" || typeof arg === "boolean" || arg === void 0 || arg === null;
|
|
7
4
|
}
|
|
8
5
|
const isArrayIndex = (segment) => {
|
|
9
|
-
|
|
6
|
+
return /^\[\d+\]$/.test(segment);
|
|
10
7
|
};
|
|
11
8
|
const parseIndex = (segment) => {
|
|
12
|
-
|
|
9
|
+
return parseInt(segment.slice(1, -1), 10);
|
|
13
10
|
};
|
|
14
11
|
const splitKey = (key) => {
|
|
15
|
-
|
|
12
|
+
return key.split(".").filter((s) => s !== "");
|
|
16
13
|
};
|
|
17
14
|
const nextDefault = (segment) => {
|
|
18
|
-
|
|
15
|
+
return isArrayIndex(segment) ? [] : {};
|
|
19
16
|
};
|
|
20
|
-
|
|
17
|
+
//#endregion
|
|
21
18
|
export { isArrayIndex, isPrimitive, nextDefault, parseIndex, splitKey };
|
|
22
|
-
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=helpers.js.map
|
package/lib/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../src/helpers.ts"],"sourcesContent":["type Primitive = string | number | boolean | null | undefined;\n\nexport function isPrimitive(arg: unknown): arg is Primitive {\n return (\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'boolean' ||\n arg === undefined ||\n arg === null\n );\n}\n\nexport const isArrayIndex = (segment: string): boolean => {\n return /^\\[\\d+\\]$/.test(segment);\n};\n\nexport const parseIndex = (segment: string): number => {\n return parseInt(segment.slice(1, -1), 10);\n};\n\nexport const splitKey = (key: string): string[] => {\n return key.split('.').filter(s => s !== '');\n};\n\nexport const nextDefault = (segment: string): any => {\n return isArrayIndex(segment) ? [] : {};\n};\n"],"
|
|
1
|
+
{"version":3,"file":"helpers.js","names":[],"sources":["../src/helpers.ts"],"sourcesContent":["type Primitive = string | number | boolean | null | undefined;\n\nexport function isPrimitive(arg: unknown): arg is Primitive {\n return (\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'boolean' ||\n arg === undefined ||\n arg === null\n );\n}\n\nexport const isArrayIndex = (segment: string): boolean => {\n return /^\\[\\d+\\]$/.test(segment);\n};\n\nexport const parseIndex = (segment: string): number => {\n return parseInt(segment.slice(1, -1), 10);\n};\n\nexport const splitKey = (key: string): string[] => {\n return key.split('.').filter(s => s !== '');\n};\n\nexport const nextDefault = (segment: string): any => {\n return isArrayIndex(segment) ? [] : {};\n};\n"],"mappings":";AAEA,SAAgB,YAAY,KAAgC;AAC1D,QACE,OAAO,QAAQ,YACf,OAAO,QAAQ,YACf,OAAO,QAAQ,aACf,QAAQ,KAAA,KACR,QAAQ;;AAIZ,MAAa,gBAAgB,YAA6B;AACxD,QAAO,YAAY,KAAK,QAAQ;;AAGlC,MAAa,cAAc,YAA4B;AACrD,QAAO,SAAS,QAAQ,MAAM,GAAG,GAAG,EAAE,GAAG;;AAG3C,MAAa,YAAY,QAA0B;AACjD,QAAO,IAAI,MAAM,IAAI,CAAC,QAAO,MAAK,MAAM,GAAG;;AAG7C,MAAa,eAAe,YAAyB;AACnD,QAAO,aAAa,QAAQ,GAAG,EAAE,GAAG,EAAE"}
|
package/lib/index.cjs
CHANGED
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.getByKey =
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.LEFT_BRACKET = constants_strings.LEFT_BRACKET;
|
|
29
|
-
exports.RIGHT_BRACKET = constants_strings.RIGHT_BRACKET;
|
|
30
|
-
exports.SEPARATOR = constants_strings.SEPARATOR;
|
|
31
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_sortMap = require("./sortMap.cjs");
|
|
3
|
+
const require_constants_strings = require("./constants/strings.cjs");
|
|
4
|
+
const require_recompose = require("./recompose.cjs");
|
|
5
|
+
const require_constants_objects = require("./constants/objects.cjs");
|
|
6
|
+
const require_decompose = require("./decompose.cjs");
|
|
7
|
+
const require_decomposeKeys = require("./decomposeKeys.cjs");
|
|
8
|
+
const require_decomposeSV = require("./decomposeSV.cjs");
|
|
9
|
+
const require_flatByKey = require("./flatByKey.cjs");
|
|
10
|
+
const require_contexts_assign = require("./contexts/assign.cjs");
|
|
11
|
+
const require_contexts_get = require("./contexts/get.cjs");
|
|
12
|
+
require("./contexts/index.cjs");
|
|
13
|
+
exports.DEFAULT_DECOMPOSE_OPTIONS = require_constants_objects.DEFAULT_DECOMPOSE_OPTIONS;
|
|
14
|
+
exports.DEFAULT_FLAT_OPTIONS = require_constants_objects.DEFAULT_FLAT_OPTIONS;
|
|
15
|
+
exports.DELIMITER = require_constants_strings.DELIMITER;
|
|
16
|
+
exports.LEFT_BRACKET = require_constants_strings.LEFT_BRACKET;
|
|
17
|
+
exports.RIGHT_BRACKET = require_constants_strings.RIGHT_BRACKET;
|
|
18
|
+
exports.SEPARATOR = require_constants_strings.SEPARATOR;
|
|
19
|
+
exports.assignByKey = require_contexts_assign.assignByKey;
|
|
20
|
+
exports.decompose = require_decompose.decompose;
|
|
21
|
+
exports.decomposeKeys = require_decomposeKeys.decomposeKeys;
|
|
22
|
+
exports.decomposeSV = require_decomposeSV.decomposeSV;
|
|
23
|
+
exports.flatByKey = require_flatByKey.flatByKey;
|
|
24
|
+
exports.getByKey = require_contexts_get.getByKey;
|
|
25
|
+
exports.recompose = require_recompose.recompose;
|
|
26
|
+
exports.recomposeObjectUrl = require_recompose.recomposeObjectUrl;
|
|
27
|
+
exports.sortMap = require_sortMap.sortMap;
|
package/lib/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { sortMap } from "./sortMap.js";
|
|
2
|
+
import { DELIMITER, LEFT_BRACKET, RIGHT_BRACKET, SEPARATOR } from "./constants/strings.js";
|
|
3
|
+
import { recompose, recomposeObjectUrl } from "./recompose.js";
|
|
4
|
+
import { DEFAULT_DECOMPOSE_OPTIONS, DEFAULT_FLAT_OPTIONS } from "./constants/objects.js";
|
|
5
|
+
import { decompose } from "./decompose.js";
|
|
6
|
+
import { decomposeKeys } from "./decomposeKeys.js";
|
|
7
|
+
import { decomposeSV } from "./decomposeSV.js";
|
|
8
|
+
import { flatByKey } from "./flatByKey.js";
|
|
9
|
+
import { assignByKey } from "./contexts/assign.js";
|
|
10
|
+
import { getByKey } from "./contexts/get.js";
|
|
11
|
+
import "./contexts/index.js";
|
|
12
|
+
export { DEFAULT_DECOMPOSE_OPTIONS, DEFAULT_FLAT_OPTIONS, DELIMITER, LEFT_BRACKET, RIGHT_BRACKET, SEPARATOR, assignByKey, decompose, decomposeKeys, decomposeSV, flatByKey, getByKey, recompose, recomposeObjectUrl, sortMap };
|
package/lib/recompose.cjs
CHANGED
|
@@ -1,59 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("./constants/strings.cjs");
|
|
3
|
+
let ts_deepmerge = require("ts-deepmerge");
|
|
4
|
+
//#region src/recompose.ts
|
|
6
5
|
function recomposeObjectUrl(shape, value) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
return obj;
|
|
6
|
+
const obj = {};
|
|
7
|
+
if (shape.length <= 0) return obj;
|
|
8
|
+
const keys = shape.split(".");
|
|
9
|
+
if (keys.length === 1) {
|
|
10
|
+
const key = keys.shift();
|
|
11
|
+
obj[key] = value;
|
|
12
|
+
} else {
|
|
13
|
+
const key = keys.shift();
|
|
14
|
+
obj[key] = recomposeObjectUrl(keys.join("."), value);
|
|
15
|
+
}
|
|
16
|
+
return obj;
|
|
20
17
|
}
|
|
21
|
-
const _recompose = shape => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return _recompose2(tsDeepmerge.merge(...arr));
|
|
18
|
+
const _recompose = (shape) => {
|
|
19
|
+
const entries = Object.entries(shape);
|
|
20
|
+
if (entries.length === 0) return {};
|
|
21
|
+
const arr = [];
|
|
22
|
+
entries.forEach(([key, value]) => {
|
|
23
|
+
arr.push(recomposeObjectUrl(key, value));
|
|
24
|
+
});
|
|
25
|
+
return _recompose2((0, ts_deepmerge.merge)(...arr));
|
|
30
26
|
};
|
|
31
|
-
const _recompose2 = shape => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
return entries.reduce((acc, [key, value]) => {
|
|
49
|
-
acc[key] = _recompose2(value);
|
|
50
|
-
return acc;
|
|
51
|
-
}, {});
|
|
27
|
+
const _recompose2 = (shape) => {
|
|
28
|
+
if (Array.isArray(shape) || typeof shape !== "object" || shape === null) return shape;
|
|
29
|
+
const entries = Object.entries(shape).sort(([a], [b]) => a.localeCompare(b));
|
|
30
|
+
if (entries.length === 0) return {};
|
|
31
|
+
if (entries.every(([key]) => key.startsWith("[") && key.endsWith("]"))) {
|
|
32
|
+
const arr = [];
|
|
33
|
+
entries.forEach(([key, value]) => {
|
|
34
|
+
const index = parseInt(key.slice(1, -1), 10);
|
|
35
|
+
arr[index] = _recompose2(value);
|
|
36
|
+
});
|
|
37
|
+
return arr;
|
|
38
|
+
}
|
|
39
|
+
return entries.reduce((acc, [key, value]) => {
|
|
40
|
+
acc[key] = _recompose2(value);
|
|
41
|
+
return acc;
|
|
42
|
+
}, {});
|
|
52
43
|
};
|
|
53
|
-
const recompose = shape => _recompose(shape);
|
|
44
|
+
const recompose = (shape) => _recompose(shape);
|
|
54
45
|
recompose.low = _recompose;
|
|
55
46
|
recompose.strict = _recompose;
|
|
56
|
-
|
|
47
|
+
//#endregion
|
|
57
48
|
exports.recompose = recompose;
|
|
58
49
|
exports.recomposeObjectUrl = recomposeObjectUrl;
|
|
59
|
-
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=recompose.cjs.map
|
package/lib/recompose.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recompose.cjs","sources":["../src/recompose.ts"],"sourcesContent":["import { merge } from 'ts-deepmerge';\nimport { SEPARATOR } from './constants/strings';\nimport type { Recompose, Ru } from './types.types';\n\nexport function recomposeObjectUrl<T>(shape: string, value: T) {\n const obj: Ru = {};\n if (shape.length <= 0) return obj;\n\n const keys = shape.split(SEPARATOR);\n if (keys.length === 1) {\n const key = keys.shift();\n obj[key!] = value;\n } else {\n const key = keys.shift();\n obj[key!] = recomposeObjectUrl(keys.join(SEPARATOR), value);\n }\n\n return obj;\n}\n\n/**\n * Recompose a flatten object \n * @example\n * \n * { 'data.age': 10, 'human.login': 'login' }\n * will become\n * {\n data: {\n age: 10,\n },\n human: {\n login: 'login',\n },\n }\n * @remark \n * The generated typescript type takes too much ressources\n\n * @todo\n Add type to the return\n */\ntype Recompose_F = <const T extends Ru>(shape: T) => Recompose<T>;\ntype _Recompose_F = (shape: any) => any;\ntype _Recompose2_F = <T extends Ru>(shape: T) => Recompose<T>;\n\nexport type Recomposer = _Recompose2_F & {\n strict: Recompose_F;\n low: _Recompose_F;\n};\n\nconst _recompose: _Recompose_F = shape => {\n const entries = Object.entries(shape);\n if (entries.length === 0) return {};\n const arr: any[] = [];\n entries.forEach(([key, value]) => {\n arr.push(recomposeObjectUrl(key, value));\n });\n return _recompose2(merge(...arr));\n};\n\nconst _recompose2: _Recompose_F = shape => {\n const mustReturn =\n Array.isArray(shape) || typeof shape !== 'object' || shape === null;\n if (mustReturn) return shape;\n\n const entries = Object.entries(shape).sort(([a], [b]) =>\n a.localeCompare(b),\n );\n\n const isEmpty = entries.length === 0;\n if (isEmpty) return {};\n\n const isArray = entries.every(\n ([key]) => key.startsWith('[') && key.endsWith(']'),\n );\n if (isArray) {\n const arr: any[] = [];\n entries.forEach(([key, value]) => {\n const index = parseInt(key.slice(1, -1), 10);\n arr[index] = _recompose2(value);\n });\n return arr;\n }\n\n return entries.reduce((acc, [key, value]) => {\n acc[key] = _recompose2(value);\n return acc;\n }, {} as any);\n};\n\nexport const recompose: Recomposer = shape => _recompose(shape);\nrecompose.low = _recompose;\nrecompose.strict = _recompose;\n"],"
|
|
1
|
+
{"version":3,"file":"recompose.cjs","names":[],"sources":["../src/recompose.ts"],"sourcesContent":["import { merge } from 'ts-deepmerge';\nimport { SEPARATOR } from './constants/strings';\nimport type { Recompose, Ru } from './types.types';\n\nexport function recomposeObjectUrl<T>(shape: string, value: T) {\n const obj: Ru = {};\n if (shape.length <= 0) return obj;\n\n const keys = shape.split(SEPARATOR);\n if (keys.length === 1) {\n const key = keys.shift();\n obj[key!] = value;\n } else {\n const key = keys.shift();\n obj[key!] = recomposeObjectUrl(keys.join(SEPARATOR), value);\n }\n\n return obj;\n}\n\n/**\n * Recompose a flatten object \n * @example\n * \n * { 'data.age': 10, 'human.login': 'login' }\n * will become\n * {\n data: {\n age: 10,\n },\n human: {\n login: 'login',\n },\n }\n * @remark \n * The generated typescript type takes too much ressources\n\n * @todo\n Add type to the return\n */\ntype Recompose_F = <const T extends Ru>(shape: T) => Recompose<T>;\ntype _Recompose_F = (shape: any) => any;\ntype _Recompose2_F = <T extends Ru>(shape: T) => Recompose<T>;\n\nexport type Recomposer = _Recompose2_F & {\n strict: Recompose_F;\n low: _Recompose_F;\n};\n\nconst _recompose: _Recompose_F = shape => {\n const entries = Object.entries(shape);\n if (entries.length === 0) return {};\n const arr: any[] = [];\n entries.forEach(([key, value]) => {\n arr.push(recomposeObjectUrl(key, value));\n });\n return _recompose2(merge(...arr));\n};\n\nconst _recompose2: _Recompose_F = shape => {\n const mustReturn =\n Array.isArray(shape) || typeof shape !== 'object' || shape === null;\n if (mustReturn) return shape;\n\n const entries = Object.entries(shape).sort(([a], [b]) =>\n a.localeCompare(b),\n );\n\n const isEmpty = entries.length === 0;\n if (isEmpty) return {};\n\n const isArray = entries.every(\n ([key]) => key.startsWith('[') && key.endsWith(']'),\n );\n if (isArray) {\n const arr: any[] = [];\n entries.forEach(([key, value]) => {\n const index = parseInt(key.slice(1, -1), 10);\n arr[index] = _recompose2(value);\n });\n return arr;\n }\n\n return entries.reduce((acc, [key, value]) => {\n acc[key] = _recompose2(value);\n return acc;\n }, {} as any);\n};\n\nexport const recompose: Recomposer = shape => _recompose(shape);\nrecompose.low = _recompose;\nrecompose.strict = _recompose;\n"],"mappings":";;;;AAIA,SAAgB,mBAAsB,OAAe,OAAU;CAC7D,MAAM,MAAU,EAAE;AAClB,KAAI,MAAM,UAAU,EAAG,QAAO;CAE9B,MAAM,OAAO,MAAM,MAAA,IAAgB;AACnC,KAAI,KAAK,WAAW,GAAG;EACrB,MAAM,MAAM,KAAK,OAAO;AACxB,MAAI,OAAQ;QACP;EACL,MAAM,MAAM,KAAK,OAAO;AACxB,MAAI,OAAQ,mBAAmB,KAAK,KAAA,IAAe,EAAE,MAAM;;AAG7D,QAAO;;AAgCT,MAAM,cAA2B,UAAS;CACxC,MAAM,UAAU,OAAO,QAAQ,MAAM;AACrC,KAAI,QAAQ,WAAW,EAAG,QAAO,EAAE;CACnC,MAAM,MAAa,EAAE;AACrB,SAAQ,SAAS,CAAC,KAAK,WAAW;AAChC,MAAI,KAAK,mBAAmB,KAAK,MAAM,CAAC;GACxC;AACF,QAAO,aAAA,GAAA,aAAA,OAAkB,GAAG,IAAI,CAAC;;AAGnC,MAAM,eAA4B,UAAS;AAGzC,KADE,MAAM,QAAQ,MAAM,IAAI,OAAO,UAAU,YAAY,UAAU,KACjD,QAAO;CAEvB,MAAM,UAAU,OAAO,QAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAChD,EAAE,cAAc,EAAE,CACnB;AAGD,KADgB,QAAQ,WAAW,EACtB,QAAO,EAAE;AAKtB,KAHgB,QAAQ,OACrB,CAAC,SAAS,IAAI,WAAW,IAAI,IAAI,IAAI,SAAS,IAAI,CACpD,EACY;EACX,MAAM,MAAa,EAAE;AACrB,UAAQ,SAAS,CAAC,KAAK,WAAW;GAChC,MAAM,QAAQ,SAAS,IAAI,MAAM,GAAG,GAAG,EAAE,GAAG;AAC5C,OAAI,SAAS,YAAY,MAAM;IAC/B;AACF,SAAO;;AAGT,QAAO,QAAQ,QAAQ,KAAK,CAAC,KAAK,WAAW;AAC3C,MAAI,OAAO,YAAY,MAAM;AAC7B,SAAO;IACN,EAAE,CAAQ;;AAGf,MAAa,aAAwB,UAAS,WAAW,MAAM;AAC/D,UAAU,MAAM;AAChB,UAAU,SAAS"}
|