matterbridge 1.3.13 → 1.4.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/CHANGELOG.md +29 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +10 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/dist/matterbridge.d.ts +157 -261
- package/dist/matterbridge.d.ts.map +1 -1
- package/dist/matterbridge.js +1411 -1627
- package/dist/matterbridge.js.map +1 -1
- package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -1
- package/dist/matterbridgeAccessoryPlatform.js +1 -0
- package/dist/matterbridgeAccessoryPlatform.js.map +1 -1
- package/dist/matterbridgeDevice.d.ts.map +1 -1
- package/dist/matterbridgeDevice.js +2 -1
- package/dist/matterbridgeDevice.js.map +1 -1
- package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -1
- package/dist/matterbridgeDynamicPlatform.js +1 -0
- package/dist/matterbridgeDynamicPlatform.js.map +1 -1
- package/dist/matterbridgeTypes.d.ts +111 -0
- package/dist/matterbridgeTypes.d.ts.map +1 -0
- package/dist/matterbridgeTypes.js +2 -0
- package/dist/matterbridgeTypes.js.map +1 -0
- package/dist/plugins.d.ts +102 -0
- package/dist/plugins.d.ts.map +1 -0
- package/dist/plugins.js +674 -0
- package/dist/plugins.js.map +1 -0
- package/dist/utils/export.d.ts +3 -0
- package/dist/utils/export.d.ts.map +1 -0
- package/dist/utils/export.js +3 -0
- package/dist/utils/export.js.map +1 -0
- package/dist/utils/utils.d.ts +37 -2
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +79 -7
- package/dist/utils/utils.js.map +1 -1
- package/frontend/build/asset-manifest.json +6 -6
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/css/{main.b4d28450.css → main.df840158.css} +2 -2
- package/frontend/build/static/css/main.df840158.css.map +1 -0
- package/frontend/build/static/js/{main.42130514.js → main.2a46688a.js} +3 -3
- package/frontend/build/static/js/main.2a46688a.js.map +1 -0
- package/package.json +25 -20
- package/__mocks__/@project-chip/matter-node.js/util.js +0 -41
- package/dist/utils.d.ts +0 -94
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -291
- package/dist/utils.js.map +0 -1
- package/frontend/build/static/css/main.b4d28450.css.map +0 -1
- package/frontend/build/static/js/main.42130514.js.map +0 -1
- /package/frontend/build/static/js/{main.42130514.js.LICENSE.txt → main.2a46688a.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Matterbridge plugin manager for Matter",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,9 @@
|
|
|
35
35
|
"siri",
|
|
36
36
|
"google-home",
|
|
37
37
|
"alexa",
|
|
38
|
-
"homeassistant"
|
|
38
|
+
"homeassistant",
|
|
39
|
+
"smartthings",
|
|
40
|
+
"ewelink"
|
|
39
41
|
],
|
|
40
42
|
"type": "module",
|
|
41
43
|
"main": "dist/index.js",
|
|
@@ -51,14 +53,14 @@
|
|
|
51
53
|
"import": "./dist/index.js",
|
|
52
54
|
"types": "./dist/index.d.ts"
|
|
53
55
|
},
|
|
54
|
-
"./utils/*": {
|
|
55
|
-
"import": "./dist/utils/*.js",
|
|
56
|
-
"types": "./dist/utils/*.d.ts"
|
|
57
|
-
},
|
|
58
56
|
"./cluster/*": {
|
|
59
57
|
"import": "./dist/cluster/*.js",
|
|
60
58
|
"types": "./dist/cluster/*.d.ts"
|
|
61
59
|
},
|
|
60
|
+
"./utils": {
|
|
61
|
+
"import": "./dist/utils/export.js",
|
|
62
|
+
"types": "./dist/utils/export.d.ts"
|
|
63
|
+
},
|
|
62
64
|
"./history": {
|
|
63
65
|
"import": "./dist/history/export.js",
|
|
64
66
|
"types": "./dist/history/export.d.ts"
|
|
@@ -80,13 +82,16 @@
|
|
|
80
82
|
"start:childbridge": "node ./dist/cli.js -childbridge",
|
|
81
83
|
"start:controller": "node ./dist/cli.js -controller",
|
|
82
84
|
"start:help": "node ./dist/cli.js -help",
|
|
83
|
-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
84
|
-
"test:
|
|
85
|
-
"test:
|
|
86
|
-
"test:
|
|
87
|
-
"test:
|
|
88
|
-
"test:
|
|
89
|
-
"test:
|
|
85
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand --verbose",
|
|
86
|
+
"test:coverage": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand --verbose --coverage",
|
|
87
|
+
"test:verbose": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand --verbose",
|
|
88
|
+
"test:watch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand --watch",
|
|
89
|
+
"test:matterbridge": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand --verbose matterbridge.test.ts",
|
|
90
|
+
"test:bridgemode": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand --verbose matterbridge.bridge.test.ts",
|
|
91
|
+
"test:device": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand --verbose matterbridgeDevice.test.ts",
|
|
92
|
+
"test:platform": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand --verbose matterbridgePlatform.test.ts matterbridgeAccessoryPlatform.test.ts matterbridgeDynamicPlatform.test.ts",
|
|
93
|
+
"test:plugins": "node --experimental-vm-modules node_modules/jest/bin/jest.js --verbose --coverage plugins.test.ts",
|
|
94
|
+
"test:utils": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand --verbose utils.test.ts",
|
|
90
95
|
"lint": "eslint --max-warnings=0 .",
|
|
91
96
|
"lint:fix": "eslint --fix --max-warnings=0 .",
|
|
92
97
|
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
|
|
@@ -126,20 +131,20 @@
|
|
|
126
131
|
"ws": "^8.18.0"
|
|
127
132
|
},
|
|
128
133
|
"devDependencies": {
|
|
129
|
-
"@eslint/js": "^9.
|
|
134
|
+
"@eslint/js": "^9.7.0",
|
|
130
135
|
"@types/eslint__js": "^8.42.3",
|
|
131
136
|
"@types/express": "^4.17.21",
|
|
132
137
|
"@types/jest": "^29.5.12",
|
|
133
|
-
"@types/node": "^20.14.
|
|
134
|
-
"@types/ws": "^8.5.
|
|
138
|
+
"@types/node": "^20.14.11",
|
|
139
|
+
"@types/ws": "^8.5.11",
|
|
135
140
|
"eslint-config-prettier": "^9.1.0",
|
|
136
141
|
"eslint-plugin-jest": "^28.6.0",
|
|
137
142
|
"eslint-plugin-prettier": "^5.1.3",
|
|
138
143
|
"jest": "^29.7.0",
|
|
139
|
-
"prettier": "^3.3.
|
|
140
|
-
"rimraf": "^6.0.
|
|
141
|
-
"ts-jest": "^29.2.
|
|
144
|
+
"prettier": "^3.3.3",
|
|
145
|
+
"rimraf": "^6.0.1",
|
|
146
|
+
"ts-jest": "^29.2.2",
|
|
142
147
|
"typescript": "^5.5.3",
|
|
143
|
-
"typescript-eslint": "^7.16.
|
|
148
|
+
"typescript-eslint": "^7.16.1"
|
|
144
149
|
}
|
|
145
150
|
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022-2024 Matter.js Authors
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { ValidationError } from '@project-chip/matter.js/common';
|
|
7
|
-
import { execSync } from 'child_process';
|
|
8
|
-
function getParameter(name) {
|
|
9
|
-
const commandArguments = process.argv.slice(2);
|
|
10
|
-
let markerIndex = commandArguments.indexOf(`-${name}`);
|
|
11
|
-
if (markerIndex === -1) markerIndex = commandArguments.indexOf(`--${name}`);
|
|
12
|
-
if (markerIndex === -1 || markerIndex + 1 === commandArguments.length) return void 0;
|
|
13
|
-
return commandArguments[markerIndex + 1];
|
|
14
|
-
}
|
|
15
|
-
function hasParameter(name) {
|
|
16
|
-
const commandArguments = process.argv.slice(2);
|
|
17
|
-
let markerIncluded = commandArguments.includes(`-${name}`);
|
|
18
|
-
if (!markerIncluded) markerIncluded = commandArguments.includes(`--${name}`);
|
|
19
|
-
return markerIncluded;
|
|
20
|
-
}
|
|
21
|
-
function getIntParameter(name) {
|
|
22
|
-
const value = getParameter(name);
|
|
23
|
-
if (value === void 0) return void 0;
|
|
24
|
-
const intValue = parseInt(value, 10);
|
|
25
|
-
if (isNaN(intValue)) throw new ValidationError(`Invalid value for parameter ${name}: ${value} is not a number`);
|
|
26
|
-
return intValue;
|
|
27
|
-
}
|
|
28
|
-
function commandExecutor(scriptParamName) {
|
|
29
|
-
const script = getParameter(scriptParamName);
|
|
30
|
-
if (script === void 0) return void 0;
|
|
31
|
-
// eslint-disable-next-line no-console
|
|
32
|
-
return () => console.log(`${scriptParamName}: ${execSync(script).toString().slice(0, -1)}`);
|
|
33
|
-
}
|
|
34
|
-
function requireMinNodeVersion(minVersion) {
|
|
35
|
-
const version = process.versions.node;
|
|
36
|
-
const versionMajor = parseInt(version.split('.')[0]);
|
|
37
|
-
if (versionMajor < minVersion) throw new MatterError(`Node version ${versionMajor} is not supported. Please upgrade to ${minVersion} or above.`);
|
|
38
|
-
}
|
|
39
|
-
export { commandExecutor, getIntParameter, getParameter, hasParameter, requireMinNodeVersion };
|
|
40
|
-
export * from '@project-chip/matter.js/util';
|
|
41
|
-
// # sourceMappingURL=CommandLine.js.map
|
package/dist/utils.d.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file contains the deepEqual function.
|
|
3
|
-
*
|
|
4
|
-
* @file utils.ts
|
|
5
|
-
* @author Luca Liguori
|
|
6
|
-
* @date 2024-02-17
|
|
7
|
-
* @version 1.2.5
|
|
8
|
-
*
|
|
9
|
-
* Copyright 2024 Luca Liguori.
|
|
10
|
-
*
|
|
11
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
-
* you may not use this file except in compliance with the License.
|
|
13
|
-
* You may obtain a copy of the License at
|
|
14
|
-
*
|
|
15
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
-
*
|
|
17
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
-
* See the License for the specific language governing permissions and
|
|
21
|
-
* limitations under the License. *
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Performs a deep comparison between two values to determine if they are equivalent.
|
|
25
|
-
* This comparison includes primitive types, arrays, and objects, allowing for optional
|
|
26
|
-
* exclusion of specific properties from the comparison in objects.
|
|
27
|
-
*
|
|
28
|
-
* @param {any} a The first value to compare.
|
|
29
|
-
* @param {any} b The second value to compare.
|
|
30
|
-
* @param {string[]} [excludeProperties=[]] An array of property names to exclude from the comparison in objects.
|
|
31
|
-
* @returns {boolean} True if the values are deeply equal, excluding any specified properties; otherwise, false.
|
|
32
|
-
*
|
|
33
|
-
* Note: This function utilizes recursion for deep comparison of nested structures and includes a debugging
|
|
34
|
-
* mechanism that can be toggled on or off for detailed comparison logging. It is important to ensure that
|
|
35
|
-
* objects do not contain circular references when enabling debug logging to avoid infinite loops.
|
|
36
|
-
*
|
|
37
|
-
* Example usage:
|
|
38
|
-
* ```
|
|
39
|
-
* const obj1 = { a: 1, b: { c: 2 } };
|
|
40
|
-
* const obj2 = { a: 1, b: { c: 2 } };
|
|
41
|
-
* console.log(deepEqual(obj1, obj2)); // true
|
|
42
|
-
*
|
|
43
|
-
* const arr1 = [1, 2, [3, 4]];
|
|
44
|
-
* const arr2 = [1, 2, [3, 4]];
|
|
45
|
-
* console.log(deepEqual(arr1, arr2)); // true
|
|
46
|
-
*
|
|
47
|
-
* const obj3 = { a: 1, b: { c: 2, d: 3 } };
|
|
48
|
-
* const obj4 = { a: 1, b: { c: 2 } };
|
|
49
|
-
* console.log(deepEqual(obj3, obj4, ['d'])); // true, excluding property 'd' from comparison
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
export declare function deepEqual(a: any, b: any, excludeProperties?: string[]): boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Creates a deep copy of the given value.
|
|
55
|
-
*
|
|
56
|
-
* @template T - The type of the value being copied.
|
|
57
|
-
* @param {T} value - The value to be copied.
|
|
58
|
-
* @returns {T} - The deep copy of the value.
|
|
59
|
-
*/
|
|
60
|
-
export declare function deepCopy<T>(value: T): T;
|
|
61
|
-
/**
|
|
62
|
-
* Retrieves the IPv4 address of the first non-internal network interface.
|
|
63
|
-
* @returns {string | undefined} The IPv4 address of the selected network interface, or undefined if not found.
|
|
64
|
-
*/
|
|
65
|
-
export declare function getIpv4InterfaceAddress(): string | undefined;
|
|
66
|
-
/**
|
|
67
|
-
* Retrieves the IPv6 address of the first non-internal network interface.
|
|
68
|
-
* @returns {string | undefined} The IPv4 address of the selected network interface, or undefined if not found.
|
|
69
|
-
*/
|
|
70
|
-
export declare function getIpv6InterfaceAddress(): string | undefined;
|
|
71
|
-
/**
|
|
72
|
-
* Logs the available network interfaces and their details.
|
|
73
|
-
* @returns The number of network interfaces logged.
|
|
74
|
-
*/
|
|
75
|
-
export declare function logInterfaces(): number;
|
|
76
|
-
/**
|
|
77
|
-
* Checks if a given string is a valid IPv4 address.
|
|
78
|
-
*
|
|
79
|
-
* @param {string} ipv4Address - The string to be checked.
|
|
80
|
-
* @returns {boolean} - Returns true if the string is a valid IPv4 address, otherwise returns false.
|
|
81
|
-
*/
|
|
82
|
-
export declare function isValidIpv4Address(ipv4Address: string): boolean;
|
|
83
|
-
/**
|
|
84
|
-
* Asynchronous waiter function that resolves when a condition is met or rejects on timeout.
|
|
85
|
-
* @param name - The name of the waiter.
|
|
86
|
-
* @param check - A function that checks the condition. Should return a boolean.
|
|
87
|
-
* @param exitWithReject - Optional. If true, the promise will be rejected on timeout. Default is false.
|
|
88
|
-
* @param resolveTimeout - Optional. The timeout duration in milliseconds. Default is 5000ms.
|
|
89
|
-
* @param resolveInterval - Optional. The interval duration in milliseconds between condition checks. Default is 500ms.
|
|
90
|
-
* @param debug - Optional. If true, debug messages will be logged to the console. Default is false.
|
|
91
|
-
* @returns A promise that resolves to true when the condition is met, or false on timeout.
|
|
92
|
-
*/
|
|
93
|
-
export declare function waiter(name: string, check: () => boolean, exitWithReject?: boolean, resolveTimeout?: number, resolveInterval?: number, debug?: boolean): Promise<boolean>;
|
|
94
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,iBAAiB,GAAE,MAAM,EAAO,GAAG,OAAO,CA6EnF;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAuCvC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,SAAS,CAmB5D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,SAAS,CAmB5D;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAgBtC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAG/D;AAED;;;;;;;;;GASG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,OAAO,EAAE,cAAc,UAAQ,EAAE,cAAc,SAAO,EAAE,eAAe,SAAM,EAAE,KAAK,UAAQ,oBAuBnJ"}
|
package/dist/utils.js
DELETED
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file contains the deepEqual function.
|
|
3
|
-
*
|
|
4
|
-
* @file utils.ts
|
|
5
|
-
* @author Luca Liguori
|
|
6
|
-
* @date 2024-02-17
|
|
7
|
-
* @version 1.2.5
|
|
8
|
-
*
|
|
9
|
-
* Copyright 2024 Luca Liguori.
|
|
10
|
-
*
|
|
11
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
-
* you may not use this file except in compliance with the License.
|
|
13
|
-
* You may obtain a copy of the License at
|
|
14
|
-
*
|
|
15
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
-
*
|
|
17
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
-
* See the License for the specific language governing permissions and
|
|
21
|
-
* limitations under the License. *
|
|
22
|
-
*/
|
|
23
|
-
import os from 'os';
|
|
24
|
-
/**
|
|
25
|
-
* Performs a deep comparison between two values to determine if they are equivalent.
|
|
26
|
-
* This comparison includes primitive types, arrays, and objects, allowing for optional
|
|
27
|
-
* exclusion of specific properties from the comparison in objects.
|
|
28
|
-
*
|
|
29
|
-
* @param {any} a The first value to compare.
|
|
30
|
-
* @param {any} b The second value to compare.
|
|
31
|
-
* @param {string[]} [excludeProperties=[]] An array of property names to exclude from the comparison in objects.
|
|
32
|
-
* @returns {boolean} True if the values are deeply equal, excluding any specified properties; otherwise, false.
|
|
33
|
-
*
|
|
34
|
-
* Note: This function utilizes recursion for deep comparison of nested structures and includes a debugging
|
|
35
|
-
* mechanism that can be toggled on or off for detailed comparison logging. It is important to ensure that
|
|
36
|
-
* objects do not contain circular references when enabling debug logging to avoid infinite loops.
|
|
37
|
-
*
|
|
38
|
-
* Example usage:
|
|
39
|
-
* ```
|
|
40
|
-
* const obj1 = { a: 1, b: { c: 2 } };
|
|
41
|
-
* const obj2 = { a: 1, b: { c: 2 } };
|
|
42
|
-
* console.log(deepEqual(obj1, obj2)); // true
|
|
43
|
-
*
|
|
44
|
-
* const arr1 = [1, 2, [3, 4]];
|
|
45
|
-
* const arr2 = [1, 2, [3, 4]];
|
|
46
|
-
* console.log(deepEqual(arr1, arr2)); // true
|
|
47
|
-
*
|
|
48
|
-
* const obj3 = { a: 1, b: { c: 2, d: 3 } };
|
|
49
|
-
* const obj4 = { a: 1, b: { c: 2 } };
|
|
50
|
-
* console.log(deepEqual(obj3, obj4, ['d'])); // true, excluding property 'd' from comparison
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
|
-
export function deepEqual(a, b, excludeProperties = []) {
|
|
55
|
-
// Toggle debugging on or off easily
|
|
56
|
-
const debug = false;
|
|
57
|
-
// Helper function for conditional logging
|
|
58
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
59
|
-
const debugLog = (...messages) => {
|
|
60
|
-
if (debug) {
|
|
61
|
-
// eslint-disable-next-line no-console
|
|
62
|
-
console.log(...messages);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
// If both are the same instance, return true (handles primitives and same object references)
|
|
66
|
-
if (a === b) {
|
|
67
|
-
return true;
|
|
68
|
-
}
|
|
69
|
-
// If types are different, return false
|
|
70
|
-
if (typeof a !== typeof b) {
|
|
71
|
-
debugLog(`deepEqual false for typeof a: ${typeof a} typeof b: ${typeof b}`);
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
// If one of them is null (and we know they are not equal from the first check), return false
|
|
75
|
-
if (a == null || b == null) {
|
|
76
|
-
debugLog('deepEqual false for == null');
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
// Handle Arrays
|
|
80
|
-
if (Array.isArray(a) && Array.isArray(b)) {
|
|
81
|
-
if (a.length !== b.length) {
|
|
82
|
-
debugLog(`deepEqual false for array a.length(${a.length}) !== b.length(${b.length})`);
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
for (let i = 0; i < a.length; i++) {
|
|
86
|
-
if (!deepEqual(a[i], b[i], excludeProperties)) {
|
|
87
|
-
debugLog('deepEqual false for array !deepEqual(a[i], b[i])');
|
|
88
|
-
debugLog(`- aProps.length(${a[i]}):`, a[i]);
|
|
89
|
-
debugLog(`- bProps.length(${b[i]}):`, b[i]);
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return true;
|
|
94
|
-
}
|
|
95
|
-
// Handle Objects (and exclude null, functions, and arrays)
|
|
96
|
-
if (typeof a === 'object' && typeof b === 'object') {
|
|
97
|
-
const aProps = Object.getOwnPropertyNames(a).filter((prop) => !excludeProperties.includes(prop));
|
|
98
|
-
const bProps = Object.getOwnPropertyNames(b).filter((prop) => !excludeProperties.includes(prop));
|
|
99
|
-
// If their property lengths are different, they're different objects
|
|
100
|
-
if (aProps.length !== bProps.length) {
|
|
101
|
-
debugLog(`deepEqual false for aProps.length(${aProps.length}) !== bProps.length(${bProps.length})`);
|
|
102
|
-
debugLog(`- aProps.length(${aProps.length}):`, aProps);
|
|
103
|
-
debugLog(`- bProps.length(${bProps.length}):`, bProps);
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
// Check each property in 'a' to see if it's in 'b' and if it's equal (deep check)
|
|
107
|
-
for (const prop of aProps) {
|
|
108
|
-
if (!Object.prototype.hasOwnProperty.call(b, prop)) {
|
|
109
|
-
debugLog(`deepEqual false for !b.hasOwnProperty(${prop})`);
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
if (!deepEqual(a[prop], b[prop], excludeProperties)) {
|
|
113
|
-
debugLog(`deepEqual false for !deepEqual(a[${prop}], b[${prop}])` /* , a[prop], b[prop]*/);
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return true;
|
|
118
|
-
}
|
|
119
|
-
// If none of the above, the objects are not equal
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Creates a deep copy of the given value.
|
|
124
|
-
*
|
|
125
|
-
* @template T - The type of the value being copied.
|
|
126
|
-
* @param {T} value - The value to be copied.
|
|
127
|
-
* @returns {T} - The deep copy of the value.
|
|
128
|
-
*/
|
|
129
|
-
export function deepCopy(value) {
|
|
130
|
-
if (typeof value !== 'object' || value === null) {
|
|
131
|
-
// Primitive value (string, number, boolean, bigint, undefined, symbol) or null
|
|
132
|
-
return value;
|
|
133
|
-
}
|
|
134
|
-
else if (Array.isArray(value)) {
|
|
135
|
-
// Array: Recursively copy each element
|
|
136
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
137
|
-
return value.map((item) => deepCopy(item));
|
|
138
|
-
}
|
|
139
|
-
else if (value instanceof Date) {
|
|
140
|
-
// Date objects
|
|
141
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
142
|
-
return new Date(value.getTime());
|
|
143
|
-
}
|
|
144
|
-
else if (value instanceof Map) {
|
|
145
|
-
// Maps
|
|
146
|
-
const mapCopy = new Map();
|
|
147
|
-
value.forEach((val, key) => {
|
|
148
|
-
mapCopy.set(key, deepCopy(val));
|
|
149
|
-
});
|
|
150
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
151
|
-
return mapCopy;
|
|
152
|
-
}
|
|
153
|
-
else if (value instanceof Set) {
|
|
154
|
-
// Sets
|
|
155
|
-
const setCopy = new Set();
|
|
156
|
-
value.forEach((item) => {
|
|
157
|
-
setCopy.add(deepCopy(item));
|
|
158
|
-
});
|
|
159
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
160
|
-
return setCopy;
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
// Objects: Create a copy with the same prototype as the original
|
|
164
|
-
const proto = Object.getPrototypeOf(value);
|
|
165
|
-
const copy = Object.create(proto);
|
|
166
|
-
for (const key in value) {
|
|
167
|
-
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
|
168
|
-
copy[key] = deepCopy(value[key]);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return copy;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Retrieves the IPv4 address of the first non-internal network interface.
|
|
176
|
-
* @returns {string | undefined} The IPv4 address of the selected network interface, or undefined if not found.
|
|
177
|
-
*/
|
|
178
|
-
export function getIpv4InterfaceAddress() {
|
|
179
|
-
let ipv4Address;
|
|
180
|
-
const networkInterfaces = os.networkInterfaces();
|
|
181
|
-
// console.log('Available Network Interfaces:', networkInterfaces);
|
|
182
|
-
for (const interfaceDetails of Object.values(networkInterfaces)) {
|
|
183
|
-
if (!interfaceDetails) {
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
for (const detail of interfaceDetails) {
|
|
187
|
-
if (detail.family === 'IPv4' && !detail.internal && ipv4Address === undefined) {
|
|
188
|
-
ipv4Address = detail.address;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
if (ipv4Address !== undefined) {
|
|
192
|
-
break;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
// console.log('Selected Network Interfaces:', ipv4Address);
|
|
196
|
-
return ipv4Address;
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Retrieves the IPv6 address of the first non-internal network interface.
|
|
200
|
-
* @returns {string | undefined} The IPv4 address of the selected network interface, or undefined if not found.
|
|
201
|
-
*/
|
|
202
|
-
export function getIpv6InterfaceAddress() {
|
|
203
|
-
let ipv6Address;
|
|
204
|
-
const networkInterfaces = os.networkInterfaces();
|
|
205
|
-
// console.log('Available Network Interfaces:', networkInterfaces);
|
|
206
|
-
for (const interfaceDetails of Object.values(networkInterfaces)) {
|
|
207
|
-
if (!interfaceDetails) {
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
for (const detail of interfaceDetails) {
|
|
211
|
-
if (detail.family === 'IPv6' && !detail.internal && ipv6Address === undefined) {
|
|
212
|
-
ipv6Address = detail.address;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
if (ipv6Address !== undefined) {
|
|
216
|
-
break;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
// console.log('Selected Network Interfaces:', ipv6Address);
|
|
220
|
-
return ipv6Address;
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Logs the available network interfaces and their details.
|
|
224
|
-
* @returns The number of network interfaces logged.
|
|
225
|
-
*/
|
|
226
|
-
export function logInterfaces() {
|
|
227
|
-
let count = 0;
|
|
228
|
-
const networkInterfaces = os.networkInterfaces();
|
|
229
|
-
// eslint-disable-next-line no-console
|
|
230
|
-
console.log('Available Network Interfaces:', networkInterfaces);
|
|
231
|
-
for (const interfaceDetails of Object.values(networkInterfaces)) {
|
|
232
|
-
count++;
|
|
233
|
-
if (!interfaceDetails) {
|
|
234
|
-
break;
|
|
235
|
-
}
|
|
236
|
-
for (const detail of interfaceDetails) {
|
|
237
|
-
// eslint-disable-next-line no-console
|
|
238
|
-
console.log('Details:', detail);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
return count;
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Checks if a given string is a valid IPv4 address.
|
|
245
|
-
*
|
|
246
|
-
* @param {string} ipv4Address - The string to be checked.
|
|
247
|
-
* @returns {boolean} - Returns true if the string is a valid IPv4 address, otherwise returns false.
|
|
248
|
-
*/
|
|
249
|
-
export function isValidIpv4Address(ipv4Address) {
|
|
250
|
-
const ipv4Regex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
|
|
251
|
-
return ipv4Regex.test(ipv4Address);
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Asynchronous waiter function that resolves when a condition is met or rejects on timeout.
|
|
255
|
-
* @param name - The name of the waiter.
|
|
256
|
-
* @param check - A function that checks the condition. Should return a boolean.
|
|
257
|
-
* @param exitWithReject - Optional. If true, the promise will be rejected on timeout. Default is false.
|
|
258
|
-
* @param resolveTimeout - Optional. The timeout duration in milliseconds. Default is 5000ms.
|
|
259
|
-
* @param resolveInterval - Optional. The interval duration in milliseconds between condition checks. Default is 500ms.
|
|
260
|
-
* @param debug - Optional. If true, debug messages will be logged to the console. Default is false.
|
|
261
|
-
* @returns A promise that resolves to true when the condition is met, or false on timeout.
|
|
262
|
-
*/
|
|
263
|
-
export async function waiter(name, check, exitWithReject = false, resolveTimeout = 5000, resolveInterval = 500, debug = false) {
|
|
264
|
-
// eslint-disable-next-line no-console
|
|
265
|
-
if (debug)
|
|
266
|
-
console.log(`**Waiter ${name} started...`);
|
|
267
|
-
return new Promise((resolve, reject) => {
|
|
268
|
-
const timeoutId = setTimeout(() => {
|
|
269
|
-
// eslint-disable-next-line no-console
|
|
270
|
-
if (debug)
|
|
271
|
-
console.log(`****Waiter ${name} exited for timeout...`);
|
|
272
|
-
clearTimeout(timeoutId);
|
|
273
|
-
clearInterval(intervalId);
|
|
274
|
-
if (exitWithReject)
|
|
275
|
-
reject(new Error(`Waiter ${name} exited due to timeout`));
|
|
276
|
-
else
|
|
277
|
-
resolve(false);
|
|
278
|
-
}, resolveTimeout);
|
|
279
|
-
const intervalId = setInterval(() => {
|
|
280
|
-
if (check()) {
|
|
281
|
-
// eslint-disable-next-line no-console
|
|
282
|
-
if (debug)
|
|
283
|
-
console.log(`**Waiter ${name} exited for true condition...`);
|
|
284
|
-
clearTimeout(timeoutId);
|
|
285
|
-
clearInterval(intervalId);
|
|
286
|
-
resolve(true);
|
|
287
|
-
}
|
|
288
|
-
}, resolveInterval);
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
//# sourceMappingURL=utils.js.map
|
package/dist/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,8DAA8D;AAC9D,MAAM,UAAU,SAAS,CAAC,CAAM,EAAE,CAAM,EAAE,oBAA8B,EAAE;IACxE,oCAAoC;IACpC,MAAM,KAAK,GAAG,KAAK,CAAC;IAEpB,0CAA0C;IAC1C,8DAA8D;IAC9D,MAAM,QAAQ,GAAG,CAAC,GAAG,QAAe,EAAE,EAAE;QACtC,IAAI,KAAK,EAAE,CAAC;YACV,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC;IAEF,6FAA6F;IAC7F,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,uCAAuC;IACvC,IAAI,OAAO,CAAC,KAAK,OAAO,CAAC,EAAE,CAAC;QAC1B,QAAQ,CAAC,iCAAiC,OAAO,CAAC,cAAc,OAAO,CAAC,EAAE,CAAC,CAAC;QAC5E,OAAO,KAAK,CAAC;IACf,CAAC;IAED,6FAA6F;IAC7F,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC3B,QAAQ,CAAC,6BAA6B,CAAC,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,gBAAgB;IAChB,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,O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CAVE,kBAAmB,CADnB,cAAe,CAKf,QAeF,CATA,iBAKE,UAAY,CADZ,WAAY,CADZ,sBAAuB,CAKvB,mBACF,CAGA,qBACE,UAAY,CACZ,eAAiB,CACjB,QAAW,CAGX,gBACF,CAGA,qBAGE,aAAc,CADd,qBAAsB,CAItB,cAA0B,CAF1B,UAKF,CAGA,uCAXE,YAAa,CAMb,KAAQ,CAFR,QAAW,CAGX,aAcF,CAVA,kBAGE,aAAc,CADd,kBAAmB,CAEnB,WAAY,CAGZ,SAGF,CAGA,WAQE,wBAAyB,CAPzB,YAAa,CACb,qBAAsB,CAGtB,QAAS,CADT,yBAA0B,CAE1B,QAAS,CACT,YAAa,CAJb,wBAMF,CAGA,0BACE,WAEE,YAAa,CADb,YAEF,CACF","sources":["index.css","App.css"],"sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n","/* App.css */\r\n\r\n/* Tooltip style */\r\n.tooltip-container {\r\n position: relative;\r\n display: inline-block;\r\n}\r\n\r\n/*\r\nwidth: 120px;\r\n*/\r\n.tooltip-text {\r\n visibility: hidden;\r\n background-color: #555;\r\n color: #fff;\r\n text-align: center;\r\n padding: 5px 5px;\r\n border-radius: 6px;\r\n\r\n position: absolute;\r\n z-index: 1;\r\n bottom: calc(100% + 10px);\r\n left: 50%;\r\n margin-left: -60px;\r\n\r\n opacity: 0;\r\n transition: opacity 0.3s;\r\n font-size: 12px;\r\n}\r\n\r\n.tooltip-container:hover {\r\n cursor: pointer;\r\n}\r\n\r\n.tooltip-container:hover .tooltip-text {\r\n visibility: visible;\r\n opacity: 1;\r\n}\r\n\r\n/* StatusIndicator style */\r\n.status-enabled {\r\n background-color: green;\r\n color: white;\r\n padding: 0.2rem;\r\n border-radius: 0.25rem;\r\n text-align: center;\r\n font-size: 12px;\r\n cursor: pointer;\r\n box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.status-disabled {\r\n background-color: red;\r\n color: white;\r\n padding: 0.2rem;\r\n border-radius: 0.25rem;\r\n text-align: center;\r\n font-size: 12px;\r\n cursor: pointer;\r\n box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.status-information {\r\n background-color: #9e9e9e;\r\n color: white;\r\n padding-left: 10px;\r\n padding-right: 10px;\r\n padding-bottom: 2px;\r\n padding-top: 2px;\r\n border-radius: 0.25rem;\r\n text-align: center;\r\n font-size: 12px;\r\n cursor: pointer;\r\n box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.status-warning {\r\n background-color: #e9db18;\r\n color: black;\r\n padding-left: 10px;\r\n padding-right: 10px;\r\n padding-bottom: 2px;\r\n padding-top: 2px;\r\n border-radius: 0.25rem;\r\n text-align: center;\r\n font-size: 12px;\r\n cursor: pointer;\r\n box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.status-sponsor {\r\n background-color: #b6409c;\r\n color: white;\r\n padding-left: 10px;\r\n padding-right: 10px;\r\n padding-bottom: 2px;\r\n padding-top: 2px;\r\n border-radius: 0.25rem;\r\n text-align: center;\r\n font-size: 12px;\r\n cursor: pointer;\r\n box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.status-blue {\r\n background-color: #5f8c9e;\r\n color: white;\r\n padding: 0.2rem;\r\n border-radius: 0.25rem;\r\n text-align: center;\r\n font-size: 12px;\r\n cursor: pointer;\r\n box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n/* Home page style */\r\n\r\n.PluginsIconButton {\r\n color: #000000;\r\n padding: 0;\r\n gap: 0;\r\n}\r\n\r\n.HeaderButton {\r\n color: #4CAF50;\r\n}\r\n\r\n/* Table header style */\r\n.main-background {\r\n background-color: #c4c2c2;\r\n}\r\n\r\n/* Header style */\r\n.header {\r\n display: flex;\r\n align-items: center;\r\n justify-content: flex-start;\r\n gap: 20px;\r\n margin: 0;\r\n padding: 0;\r\n height: 40px;\r\n}\r\n\r\n/* Navigation style */\r\nnav {\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n/* Navigation in Header.js style */\r\n.nav-link {\r\n margin: 0 10px;\r\n font-size: 20px;\r\n text-decoration: none;\r\n color: #333;\r\n transition: color 0.3s ease;\r\n}\r\n\r\n.nav-link:hover {\r\n color: #007BFF;\r\n}\r\n\r\n/* Table style */\r\ntable {\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\nthead {\r\n position: sticky;\r\n top: 0;\r\n border: 1px solid #ddd;\r\n z-index: auto;\r\n}\r\n\r\nthead th {\r\n border: 1px solid #ddd;\r\n padding: 5px;\r\n padding-right: 10px;\r\n padding-left: 10px;\r\n color: white;\r\n background: #4CAF50;\r\n text-align: left;\r\n}\r\n\r\ntbody td {\r\n border: 1px solid #ddd;\r\n margin: 0;\r\n padding: 5px;\r\n padding-right: 10px;\r\n padding-left: 10px;\r\n text-align: left;\r\n font-size: 14px;\r\n}\r\n\r\n.table-content-even {\r\n background-color: #bdbdbd;\r\n}\r\n\r\n.table-content-odd {\r\n background-color: #9e9e9e;\r\n}\r\n\r\n.table-content-selected {\r\n background-color: #5f8c9e;\r\n}\r\n\r\nh3 {\r\n margin: 0;\r\n}\r\n\r\n/* Mbf table content style \r\n.MbfWindowDiv table,\r\n.MbfWindowDiv table thead,\r\n.MbfWindowDiv table tbody,\r\n.MbfWindowDiv table tr,\r\n.MbfWindowDiv table th,\r\n.MbfWindowDiv table td {\r\n border: none;\r\n box-shadow: none;\r\n}\r\n*/\r\n\r\n/* Define the style for the main page element */\r\n.MbfPageDiv {\r\n display: flex;\r\n flex-direction: column;\r\n height: calc(100% - 60px);\r\n width: 100%;\r\n margin: 0px;\r\n padding: 0px;\r\n gap: 20px;\r\n}\r\n\r\n/* Define the style for the main div element */\r\n.MbfWindowDiv {\r\n display: flex;\r\n flex-direction: column;\r\n box-shadow: 5px 5px 10px #888;\r\n border: 1px solid #ddd;\r\n box-sizing: border-box;\r\n background-color: #9e9e9e;\r\n}\r\n\r\n/* Define the style for the main div element */\r\n.MbfWindowDivTable {\r\n display: flex;\r\n flex-direction: column;\r\n flex: 1 1 auto;\r\n margin: -1px;\r\n padding: 0;\r\n gap: 0;\r\n overflow: auto;\r\n display: block;\r\n}\r\n\r\n/* Define the style for the header element */\r\n.MbfWindowHeader {\r\n display: 'flex';\r\n align-items: center;\r\n width: 100%;\r\n border-bottom: 1px solid #ddd;\r\n background-color: #4CAF50;\r\n margin: 0px;\r\n padding: 0px;\r\n box-sizing: border-box;\r\n}\r\n\r\n/* Define the style for the header element */\r\n.MbfWindowFooter {\r\n display: 'flex';\r\n align-items: center;\r\n justify-content: center;\r\n height: 40px;\r\n color: black;\r\n margin: 0px;\r\n padding: 10px;\r\n padding-top: 0px;\r\n}\r\n\r\n/* Define the style for the header text element */\r\n.MbfWindowHeaderText {\r\n color: white;\r\n font-weight: bold;\r\n margin: 0px;\r\n padding: 5px;\r\n padding-right: 10px;\r\n padding-left: 10px;\r\n}\r\n\r\n/* Define the style for the body element width: 100%;*/\r\n.MbfWindowBodyColumn {\r\n display: flex;\r\n flex-direction: column;\r\n flex: 1 1 auto;\r\n width: 100%;\r\n margin: 0px;\r\n padding: 10px 0px 10px 0px;\r\n gap: 0px;\r\n overflow: auto;\r\n}\r\n\r\n/* Define the style for the body element */\r\n.MbfWindowBodyRow {\r\n display: flex;\r\n flex-direction: row;\r\n flex: 1 1 auto;\r\n height: 100%;\r\n padding: 0px 10px 0px 10px;\r\n margin: 0px;\r\n padding: 0px;\r\n gap: 0px;\r\n overflow: auto;\r\n}\r\n\r\n/* Table header style */\r\n.MbfScreen {\r\n display: flex;\r\n flex-direction: column;\r\n width: calc(100vw - 40px);\r\n height: calc(100vh - 40px);\r\n gap: 20px;\r\n margin: 0;\r\n padding: 20px;\r\n background-color: #c4c2c2;\r\n}\r\n\r\n/* Styles for mobile screens */\r\n@media (max-width: 1600px) {\r\n .MbfScreen {\r\n width: 1600px;\r\n height: 800px;\r\n }\r\n}"],"names":[],"sourceRoot":""}
|