@rfkit/charts 1.2.10 → 1.2.12
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/components/FrequencyAllocation/AllocationInfo/index.d.ts +12 -0
- package/components/FrequencyAllocation/Tooltip/index.d.ts +4 -0
- package/components/FrequencyAllocation/index.d.ts +3 -0
- package/components/FrequencyAllocation/useAllocationFinder.d.ts +10 -0
- package/components/Signal/SegmentContainer.d.ts +16 -7
- package/components/Signal/Switch/index.d.ts +4 -0
- package/components/Signal/index.d.ts +8 -6
- package/components/Signal/tools.d.ts +8 -0
- package/components/Signal/useSignalDataManager.d.ts +12 -0
- package/components/{FrequencyDataBoard → Signal}/useStationFinder.d.ts +3 -3
- package/components/Signal/utils.d.ts +15 -0
- package/config/constants.d.ts +1 -1
- package/hooks/useSpectrumRule.d.ts +2 -1
- package/index.d.ts +2 -1
- package/index.js +587 -626
- package/package.json +1 -1
- package/store/reducer.d.ts +0 -2
- package/types/publish.d.ts +6 -5
- package/types/store.d.ts +6 -6
- package/utils/frequencyCalculation.d.ts +166 -0
- package/utils/index.d.ts +7 -0
- package/components/Signal/useSignal.d.ts +0 -3
- package/components/StationAllocation/SegmentContainer.d.ts +0 -24
- package/components/StationAllocation/Switch/index.d.ts +0 -3
- package/components/StationAllocation/index.d.ts +0 -8
- /package/components/{StationAllocation → Signal}/type.d.ts +0 -0
package/index.js
CHANGED
|
@@ -4,27 +4,153 @@ import * as __WEBPACK_EXTERNAL_MODULE__rfkit_theme_a11ca9cb__ from "@rfkit/theme
|
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__ from "react-dom";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__rfkit_spectrum_analyzer_159ab12b__ from "@rfkit/spectrum-analyzer";
|
|
6
6
|
var __webpack_modules__ = {
|
|
7
|
+
"./src/utils/frequencyCalculation.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
9
|
+
Ce: ()=>calculateFrequencyRange,
|
|
10
|
+
LB: ()=>isInRangeByFrequency,
|
|
11
|
+
R1: ()=>isInRangeByIndex,
|
|
12
|
+
cE: ()=>calculateRoughIndexRange,
|
|
13
|
+
hK: ()=>calculateCursorPosition,
|
|
14
|
+
ih: ()=>ACTIVE_TOLERANCE,
|
|
15
|
+
nq: ()=>isRangeIntersectSegment,
|
|
16
|
+
rM: ()=>calculatePositionFromFrequencyRange
|
|
17
|
+
});
|
|
18
|
+
const SEARCH_RANGE = 5;
|
|
19
|
+
const ACTIVE_TOLERANCE = 2;
|
|
20
|
+
function calculateFrequencyRange(input) {
|
|
21
|
+
if (null != input.frequency && null != input.bandwidth) {
|
|
22
|
+
const bandwidthMHz = input.bandwidth / 1000;
|
|
23
|
+
const halfBandwidth = bandwidthMHz / 2;
|
|
24
|
+
return {
|
|
25
|
+
startFreq: input.frequency - halfBandwidth,
|
|
26
|
+
stopFreq: input.frequency + halfBandwidth
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (null != input.startFrequency && null != input.stopFrequency) return {
|
|
30
|
+
startFreq: Number(input.startFrequency),
|
|
31
|
+
stopFreq: Number(input.stopFrequency)
|
|
32
|
+
};
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
function calculateRoughIndexRange(range, segment) {
|
|
36
|
+
const totalRange = segment.stop - segment.start;
|
|
37
|
+
let startIndex = Math.ceil((range.startFreq - segment.start) / totalRange * segment.point) - 1;
|
|
38
|
+
let stopIndex = Math.floor((range.stopFreq - segment.start) / totalRange * segment.point) - 1;
|
|
39
|
+
startIndex = Math.max(startIndex, 0);
|
|
40
|
+
stopIndex = Math.min(stopIndex, segment.point - 1);
|
|
41
|
+
return {
|
|
42
|
+
startIndex,
|
|
43
|
+
stopIndex
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function findPreciseIndexRange(range, segment, searchRange = SEARCH_RANGE) {
|
|
47
|
+
const rough = calculateRoughIndexRange(range, segment);
|
|
48
|
+
let { startIndex, stopIndex } = rough;
|
|
49
|
+
let bestStartIndex = startIndex;
|
|
50
|
+
let bestStopIndex = stopIndex;
|
|
51
|
+
for(let i = Math.max(0, startIndex - searchRange); i <= Math.min(segment.point - 1, startIndex + searchRange); i++){
|
|
52
|
+
const freq = Number(segment.frequencyCache[i]?.frequency);
|
|
53
|
+
if (freq >= range.startFreq) {
|
|
54
|
+
bestStartIndex = i;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
for(let i = Math.max(0, stopIndex - searchRange); i <= Math.min(segment.point - 1, stopIndex + searchRange); i++){
|
|
59
|
+
const freq = Number(segment.frequencyCache[i]?.frequency);
|
|
60
|
+
if (freq <= range.stopFreq) bestStopIndex = i;
|
|
61
|
+
if (freq > range.stopFreq) break;
|
|
62
|
+
}
|
|
63
|
+
startIndex = Math.max(bestStartIndex, 0);
|
|
64
|
+
stopIndex = Math.min(bestStopIndex, segment.point - 1);
|
|
65
|
+
return {
|
|
66
|
+
startIndex,
|
|
67
|
+
stopIndex
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function calculatePositionFromIndex(indexRange, segment) {
|
|
71
|
+
const width = (indexRange.stopIndex - indexRange.startIndex + 1) / segment.point * 100;
|
|
72
|
+
const left = indexRange.startIndex / segment.point * 100;
|
|
73
|
+
return {
|
|
74
|
+
left,
|
|
75
|
+
width
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function calculatePositionFromFrequencyRange(range, segment) {
|
|
79
|
+
const indexRange = findPreciseIndexRange(range, segment);
|
|
80
|
+
const position = calculatePositionFromIndex(indexRange, segment);
|
|
81
|
+
return {
|
|
82
|
+
...position,
|
|
83
|
+
...indexRange
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function calculateCursorPosition(left, segments) {
|
|
87
|
+
if (!segments?.length) return {
|
|
88
|
+
segmentIndex: -1,
|
|
89
|
+
pointIndex: -1
|
|
90
|
+
};
|
|
91
|
+
const totalSegmentPoints = segments.reduce((sum, s)=>sum + s.point, 0);
|
|
92
|
+
let accumulatedRatio = 0;
|
|
93
|
+
const leftRatio = left / 100;
|
|
94
|
+
for(let i = 0; i < segments.length; i++){
|
|
95
|
+
const segmentRatio = segments[i].point / totalSegmentPoints;
|
|
96
|
+
if (leftRatio >= accumulatedRatio && leftRatio <= accumulatedRatio + segmentRatio) {
|
|
97
|
+
const relativeRatio = (leftRatio - accumulatedRatio) / segmentRatio;
|
|
98
|
+
const pointIndex = Math.floor(relativeRatio * segments[i].point);
|
|
99
|
+
return {
|
|
100
|
+
segmentIndex: i,
|
|
101
|
+
pointIndex
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
accumulatedRatio += segmentRatio;
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
segmentIndex: -1,
|
|
108
|
+
pointIndex: -1
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function isInRangeByIndex(cursorPointIndex, indexRange, tolerance = ACTIVE_TOLERANCE) {
|
|
112
|
+
const rangeStart = cursorPointIndex - tolerance;
|
|
113
|
+
const rangeEnd = cursorPointIndex + tolerance;
|
|
114
|
+
return !(rangeEnd < indexRange.startIndex || rangeStart > indexRange.stopIndex);
|
|
115
|
+
}
|
|
116
|
+
function isInRangeByFrequency(currentFrequency, range) {
|
|
117
|
+
return currentFrequency >= range.startFreq && currentFrequency <= range.stopFreq;
|
|
118
|
+
}
|
|
119
|
+
function isRangeIntersectSegment(range, segment) {
|
|
120
|
+
return !(range.stopFreq < segment.start || range.startFreq > segment.stop);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
7
123
|
"./src/utils/index.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8
124
|
__webpack_require__.d(__webpack_exports__, {
|
|
9
125
|
Ax: ()=>leftSegments2frequency,
|
|
10
126
|
Bp: ()=>isdBm,
|
|
127
|
+
Ce: ()=>_frequencyCalculation__WEBPACK_IMPORTED_MODULE_0__.Ce,
|
|
11
128
|
Fc: ()=>getDateTime,
|
|
12
129
|
IS: ()=>generateFrequencySegments,
|
|
130
|
+
LB: ()=>_frequencyCalculation__WEBPACK_IMPORTED_MODULE_0__.LB,
|
|
13
131
|
P2: ()=>throttle1,
|
|
14
132
|
P9: ()=>convertToTimestampedArrays,
|
|
15
133
|
PM: ()=>mergeObjects,
|
|
134
|
+
R1: ()=>_frequencyCalculation__WEBPACK_IMPORTED_MODULE_0__.R1,
|
|
16
135
|
Ri: ()=>isNumberAlias,
|
|
17
136
|
SF: ()=>createGUID,
|
|
137
|
+
cE: ()=>_frequencyCalculation__WEBPACK_IMPORTED_MODULE_0__.cE,
|
|
138
|
+
hK: ()=>_frequencyCalculation__WEBPACK_IMPORTED_MODULE_0__.hK,
|
|
139
|
+
ih: ()=>_frequencyCalculation__WEBPACK_IMPORTED_MODULE_0__.ih,
|
|
18
140
|
kL: ()=>getDimInfo,
|
|
19
141
|
lj: ()=>getFrequencyToFixed,
|
|
142
|
+
nq: ()=>_frequencyCalculation__WEBPACK_IMPORTED_MODULE_0__.nq,
|
|
20
143
|
or: ()=>leftPoints2frequency,
|
|
21
144
|
pe: ()=>getThemeColor,
|
|
22
145
|
r2: ()=>scopeLeftSegments2bandwidth,
|
|
146
|
+
rM: ()=>_frequencyCalculation__WEBPACK_IMPORTED_MODULE_0__.rM,
|
|
23
147
|
sl: ()=>generateGreatSegments,
|
|
24
148
|
uA: ()=>throttleRequestAnimationFrame,
|
|
149
|
+
uq: ()=>generateNormalizedSegments,
|
|
25
150
|
vY: ()=>getThemeFillStyle,
|
|
26
151
|
wF: ()=>getMidIndex
|
|
27
152
|
});
|
|
153
|
+
var _frequencyCalculation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./src/utils/frequencyCalculation.ts");
|
|
28
154
|
const createGUID = ()=>((1 + Math.random()) * 0x10000 | 0).toString(16).substring(1);
|
|
29
155
|
const getDateTime = (t = Date.now(), sep1 = '-', sep2 = ':', time = false)=>{
|
|
30
156
|
if (!t) return '';
|
|
@@ -278,6 +404,27 @@ var __webpack_modules__ = {
|
|
|
278
404
|
];
|
|
279
405
|
return setTotalPoints(segments, totalPoints);
|
|
280
406
|
};
|
|
407
|
+
const generateNormalizedSegments = (totalPoints)=>{
|
|
408
|
+
const segments = [
|
|
409
|
+
{
|
|
410
|
+
frequency: 0,
|
|
411
|
+
bandwidth: 0,
|
|
412
|
+
step: 1,
|
|
413
|
+
start: 0,
|
|
414
|
+
stop: totalPoints,
|
|
415
|
+
index: 0,
|
|
416
|
+
label: 'Data',
|
|
417
|
+
point: totalPoints,
|
|
418
|
+
percentage: 1,
|
|
419
|
+
progress: [
|
|
420
|
+
0,
|
|
421
|
+
100
|
|
422
|
+
],
|
|
423
|
+
frequencyCache: []
|
|
424
|
+
}
|
|
425
|
+
];
|
|
426
|
+
return setTotalPoints(segments, totalPoints);
|
|
427
|
+
};
|
|
281
428
|
const generateGreatSegments = (prevSegments)=>{
|
|
282
429
|
if (!prevSegments?.length) return [];
|
|
283
430
|
const totalPoints = prevSegments.reduce((sum, { startFrequency, stopFrequency, stepFrequency })=>sum + Math.round((stopFrequency - startFrequency) * 1000 / stepFrequency) + 1, 0);
|
|
@@ -1433,7 +1580,7 @@ var __webpack_modules__ = {
|
|
|
1433
1580
|
};
|
|
1434
1581
|
const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
|
|
1435
1582
|
},
|
|
1436
|
-
"../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/FrequencyAllocation/
|
|
1583
|
+
"../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/FrequencyAllocation/AllocationInfo/styles.module.less": function(module, __webpack_exports__, __webpack_require__) {
|
|
1437
1584
|
__webpack_require__.d(__webpack_exports__, {
|
|
1438
1585
|
Z: ()=>__WEBPACK_DEFAULT_EXPORT__
|
|
1439
1586
|
});
|
|
@@ -1444,44 +1591,76 @@ var __webpack_modules__ = {
|
|
|
1444
1591
|
var ___CSS_LOADER_EXPORT___ = _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
|
|
1445
1592
|
___CSS_LOADER_EXPORT___.push([
|
|
1446
1593
|
module.id,
|
|
1447
|
-
`.
|
|
1448
|
-
background: var(--theme-bg-base);
|
|
1594
|
+
`.allocationInfo-pYvWX8 {
|
|
1449
1595
|
color: var(--theme-color-base);
|
|
1450
|
-
z-index: 1000;
|
|
1451
|
-
pointer-events: none;
|
|
1452
|
-
max-width: 300px;
|
|
1453
|
-
box-shadow: var(--theme-box-shadow-base);
|
|
1454
|
-
border-radius: 4px;
|
|
1455
|
-
border-radius: var(--theme-border-radius-base);
|
|
1456
|
-
border: 1px solid var(--theme-border-base);
|
|
1457
|
-
padding: 8px 12px;
|
|
1458
1596
|
font-size: 12px;
|
|
1459
|
-
|
|
1597
|
+
line-height: 1.5;
|
|
1460
1598
|
}
|
|
1461
1599
|
|
|
1462
|
-
.
|
|
1600
|
+
.allocationInfo-pYvWX8 .title-Llelns {
|
|
1463
1601
|
margin-bottom: 4px;
|
|
1464
1602
|
font-weight: bold;
|
|
1465
1603
|
}
|
|
1466
1604
|
|
|
1467
|
-
.
|
|
1605
|
+
.allocationInfo-pYvWX8 .frequency-v_Ugpt {
|
|
1468
1606
|
color: var(--theme-color-primary);
|
|
1469
1607
|
margin-bottom: 4px;
|
|
1470
1608
|
}
|
|
1471
1609
|
|
|
1472
|
-
.
|
|
1610
|
+
.allocationInfo-pYvWX8 .frequency-v_Ugpt div {
|
|
1611
|
+
margin: 2px 0;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
.allocationInfo-pYvWX8 .description-c1lRnF {
|
|
1473
1615
|
color: var(--theme-color-base);
|
|
1474
1616
|
opacity: .85;
|
|
1475
1617
|
line-height: 1.5;
|
|
1476
1618
|
}
|
|
1619
|
+
|
|
1620
|
+
.allocationInfo-pYvWX8.withDivider-r541Xe {
|
|
1621
|
+
border-top: 1px dashed var(--theme-border-base);
|
|
1622
|
+
margin-top: calc(var(--size-gap-base) / 2);
|
|
1623
|
+
padding-top: calc(var(--size-gap-base) / 2);
|
|
1624
|
+
}
|
|
1477
1625
|
`,
|
|
1478
1626
|
""
|
|
1479
1627
|
]);
|
|
1480
1628
|
___CSS_LOADER_EXPORT___.locals = {
|
|
1481
|
-
|
|
1482
|
-
title: "title-
|
|
1483
|
-
frequency: "frequency-
|
|
1484
|
-
description: "description-
|
|
1629
|
+
allocationInfo: "allocationInfo-pYvWX8",
|
|
1630
|
+
title: "title-Llelns",
|
|
1631
|
+
frequency: "frequency-v_Ugpt",
|
|
1632
|
+
description: "description-c1lRnF",
|
|
1633
|
+
withDivider: "withDivider-r541Xe"
|
|
1634
|
+
};
|
|
1635
|
+
const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
|
|
1636
|
+
},
|
|
1637
|
+
"../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/FrequencyAllocation/Tooltip/styles.module.less": function(module, __webpack_exports__, __webpack_require__) {
|
|
1638
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
1639
|
+
Z: ()=>__WEBPACK_DEFAULT_EXPORT__
|
|
1640
|
+
});
|
|
1641
|
+
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
|
|
1642
|
+
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
1643
|
+
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/api.js");
|
|
1644
|
+
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
1645
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
|
|
1646
|
+
___CSS_LOADER_EXPORT___.push([
|
|
1647
|
+
module.id,
|
|
1648
|
+
`.tooltip-lMYK0i {
|
|
1649
|
+
background: var(--theme-bg-base);
|
|
1650
|
+
border-radius: var(--theme-border-radius-base);
|
|
1651
|
+
z-index: 1000;
|
|
1652
|
+
pointer-events: none;
|
|
1653
|
+
max-width: 300px;
|
|
1654
|
+
box-shadow: var(--theme-box-shadow-base);
|
|
1655
|
+
border: 1px solid var(--theme-border-base);
|
|
1656
|
+
padding: calc(var(--size-gap-base));
|
|
1657
|
+
position: fixed;
|
|
1658
|
+
}
|
|
1659
|
+
`,
|
|
1660
|
+
""
|
|
1661
|
+
]);
|
|
1662
|
+
___CSS_LOADER_EXPORT___.locals = {
|
|
1663
|
+
tooltip: "tooltip-lMYK0i"
|
|
1485
1664
|
};
|
|
1486
1665
|
const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
|
|
1487
1666
|
},
|
|
@@ -2602,93 +2781,6 @@ var __webpack_modules__ = {
|
|
|
2602
2781
|
___CSS_LOADER_EXPORT___.push([
|
|
2603
2782
|
module.id,
|
|
2604
2783
|
`.signal-hEReWZ {
|
|
2605
|
-
z-index: 5;
|
|
2606
|
-
pointer-events: none;
|
|
2607
|
-
width: 100%;
|
|
2608
|
-
height: 100%;
|
|
2609
|
-
position: absolute;
|
|
2610
|
-
bottom: 0;
|
|
2611
|
-
left: 0;
|
|
2612
|
-
}
|
|
2613
|
-
|
|
2614
|
-
.signal-hEReWZ .segmentContainer-P_hPRM {
|
|
2615
|
-
box-sizing: border-box;
|
|
2616
|
-
height: 100%;
|
|
2617
|
-
position: absolute;
|
|
2618
|
-
}
|
|
2619
|
-
|
|
2620
|
-
.signal-hEReWZ .segmentContainer-P_hPRM .signalItem-steV4d {
|
|
2621
|
-
box-sizing: border-box;
|
|
2622
|
-
opacity: .32;
|
|
2623
|
-
border-top: 1px dashed #0000;
|
|
2624
|
-
border-bottom: 1px dashed #0000;
|
|
2625
|
-
height: 100%;
|
|
2626
|
-
transition: opacity .2s;
|
|
2627
|
-
position: absolute;
|
|
2628
|
-
}
|
|
2629
|
-
|
|
2630
|
-
.signal-hEReWZ .segmentContainer-P_hPRM .signalItem-steV4d.active-zf78pN {
|
|
2631
|
-
opacity: .68;
|
|
2632
|
-
border-top: 1px dashed var(--theme-color-base);
|
|
2633
|
-
border-bottom: 1px dashed var(--theme-color-base);
|
|
2634
|
-
}
|
|
2635
|
-
`,
|
|
2636
|
-
""
|
|
2637
|
-
]);
|
|
2638
|
-
___CSS_LOADER_EXPORT___.locals = {
|
|
2639
|
-
signal: "signal-hEReWZ",
|
|
2640
|
-
segmentContainer: "segmentContainer-P_hPRM",
|
|
2641
|
-
signalItem: "signalItem-steV4d",
|
|
2642
|
-
active: "active-zf78pN"
|
|
2643
|
-
};
|
|
2644
|
-
const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
|
|
2645
|
-
},
|
|
2646
|
-
"../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/Square/styles.module.less": function(module, __webpack_exports__, __webpack_require__) {
|
|
2647
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
2648
|
-
Z: ()=>__WEBPACK_DEFAULT_EXPORT__
|
|
2649
|
-
});
|
|
2650
|
-
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
|
|
2651
|
-
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
2652
|
-
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/api.js");
|
|
2653
|
-
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
2654
|
-
var ___CSS_LOADER_EXPORT___ = _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
|
|
2655
|
-
___CSS_LOADER_EXPORT___.push([
|
|
2656
|
-
module.id,
|
|
2657
|
-
`.square-BrwfUY {
|
|
2658
|
-
justify-content: center;
|
|
2659
|
-
align-items: center;
|
|
2660
|
-
width: 100%;
|
|
2661
|
-
height: 100%;
|
|
2662
|
-
display: flex;
|
|
2663
|
-
}
|
|
2664
|
-
|
|
2665
|
-
.square-BrwfUY .squarebox-KQqniE {
|
|
2666
|
-
box-sizing: border-box;
|
|
2667
|
-
justify-content: center;
|
|
2668
|
-
align-items: center;
|
|
2669
|
-
display: flex;
|
|
2670
|
-
}
|
|
2671
|
-
`,
|
|
2672
|
-
""
|
|
2673
|
-
]);
|
|
2674
|
-
___CSS_LOADER_EXPORT___.locals = {
|
|
2675
|
-
square: "square-BrwfUY",
|
|
2676
|
-
squarebox: "squarebox-KQqniE"
|
|
2677
|
-
};
|
|
2678
|
-
const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
|
|
2679
|
-
},
|
|
2680
|
-
"../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/StationAllocation/styles.module.less": function(module, __webpack_exports__, __webpack_require__) {
|
|
2681
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
2682
|
-
Z: ()=>__WEBPACK_DEFAULT_EXPORT__
|
|
2683
|
-
});
|
|
2684
|
-
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
|
|
2685
|
-
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
2686
|
-
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/api.js");
|
|
2687
|
-
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
2688
|
-
var ___CSS_LOADER_EXPORT___ = _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
|
|
2689
|
-
___CSS_LOADER_EXPORT___.push([
|
|
2690
|
-
module.id,
|
|
2691
|
-
`.StationAllocation-VSm21x {
|
|
2692
2784
|
z-index: 4;
|
|
2693
2785
|
pointer-events: none;
|
|
2694
2786
|
-webkit-user-select: none;
|
|
@@ -2705,7 +2797,7 @@ var __webpack_modules__ = {
|
|
|
2705
2797
|
overflow: hidden;
|
|
2706
2798
|
}
|
|
2707
2799
|
|
|
2708
|
-
.
|
|
2800
|
+
.signal-hEReWZ .con-GoLqQF {
|
|
2709
2801
|
box-sizing: border-box;
|
|
2710
2802
|
width: 100%;
|
|
2711
2803
|
height: 100%;
|
|
@@ -2715,20 +2807,19 @@ var __webpack_modules__ = {
|
|
|
2715
2807
|
right: 0;
|
|
2716
2808
|
}
|
|
2717
2809
|
|
|
2718
|
-
.segmentContainer-
|
|
2810
|
+
.segmentContainer-P_hPRM {
|
|
2719
2811
|
box-sizing: border-box;
|
|
2720
2812
|
height: 100%;
|
|
2721
2813
|
position: absolute;
|
|
2722
2814
|
}
|
|
2723
2815
|
|
|
2724
|
-
.segmentContainer-
|
|
2816
|
+
.segmentContainer-P_hPRM .item-MCHNyr {
|
|
2725
2817
|
box-sizing: border-box;
|
|
2726
2818
|
white-space: nowrap;
|
|
2727
2819
|
text-overflow: ellipsis;
|
|
2728
2820
|
text-align: center;
|
|
2729
2821
|
height: 8px;
|
|
2730
2822
|
color: var(--theme-color-base);
|
|
2731
|
-
opacity: .68;
|
|
2732
2823
|
pointer-events: none;
|
|
2733
2824
|
justify-content: center;
|
|
2734
2825
|
align-items: center;
|
|
@@ -2740,9 +2831,9 @@ var __webpack_modules__ = {
|
|
|
2740
2831
|
overflow: hidden;
|
|
2741
2832
|
}
|
|
2742
2833
|
|
|
2743
|
-
.segmentContainer-
|
|
2834
|
+
.segmentContainer-P_hPRM .item-MCHNyr:after {
|
|
2744
2835
|
content: "";
|
|
2745
|
-
opacity: .
|
|
2836
|
+
opacity: .68;
|
|
2746
2837
|
background: var(--station-bg-color, var(--theme-color-base));
|
|
2747
2838
|
pointer-events: none;
|
|
2748
2839
|
width: 100%;
|
|
@@ -2753,12 +2844,12 @@ var __webpack_modules__ = {
|
|
|
2753
2844
|
left: 0;
|
|
2754
2845
|
}
|
|
2755
2846
|
|
|
2756
|
-
.segmentContainer-
|
|
2847
|
+
.segmentContainer-P_hPRM .item-MCHNyr.active-zf78pN {
|
|
2757
2848
|
opacity: 1;
|
|
2758
2849
|
height: 100%;
|
|
2759
2850
|
}
|
|
2760
2851
|
|
|
2761
|
-
.segmentContainer-
|
|
2852
|
+
.segmentContainer-P_hPRM .item-MCHNyr.active-zf78pN:after {
|
|
2762
2853
|
opacity: 1;
|
|
2763
2854
|
background: var(--station-bg-color, var(--theme-color-primary));
|
|
2764
2855
|
}
|
|
@@ -2766,12 +2857,45 @@ var __webpack_modules__ = {
|
|
|
2766
2857
|
""
|
|
2767
2858
|
]);
|
|
2768
2859
|
___CSS_LOADER_EXPORT___.locals = {
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2860
|
+
signal: "signal-hEReWZ",
|
|
2861
|
+
con: "con-GoLqQF",
|
|
2862
|
+
segmentContainer: "segmentContainer-P_hPRM",
|
|
2863
|
+
item: "item-MCHNyr",
|
|
2864
|
+
active: "active-zf78pN"
|
|
2865
|
+
};
|
|
2866
|
+
const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
|
|
2867
|
+
},
|
|
2868
|
+
"../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/Square/styles.module.less": function(module, __webpack_exports__, __webpack_require__) {
|
|
2869
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
2870
|
+
Z: ()=>__WEBPACK_DEFAULT_EXPORT__
|
|
2871
|
+
});
|
|
2872
|
+
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
|
|
2873
|
+
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
2874
|
+
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/api.js");
|
|
2875
|
+
var _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
2876
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_pnpm_rsbuild_core_1_3_18_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
|
|
2877
|
+
___CSS_LOADER_EXPORT___.push([
|
|
2878
|
+
module.id,
|
|
2879
|
+
`.square-BrwfUY {
|
|
2880
|
+
justify-content: center;
|
|
2881
|
+
align-items: center;
|
|
2882
|
+
width: 100%;
|
|
2883
|
+
height: 100%;
|
|
2884
|
+
display: flex;
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2887
|
+
.square-BrwfUY .squarebox-KQqniE {
|
|
2888
|
+
box-sizing: border-box;
|
|
2889
|
+
justify-content: center;
|
|
2890
|
+
align-items: center;
|
|
2891
|
+
display: flex;
|
|
2892
|
+
}
|
|
2893
|
+
`,
|
|
2894
|
+
""
|
|
2895
|
+
]);
|
|
2896
|
+
___CSS_LOADER_EXPORT___.locals = {
|
|
2897
|
+
square: "square-BrwfUY",
|
|
2898
|
+
squarebox: "squarebox-KQqniE"
|
|
2775
2899
|
};
|
|
2776
2900
|
const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
|
|
2777
2901
|
},
|
|
@@ -3551,7 +3675,7 @@ function __webpack_require__(moduleId) {
|
|
|
3551
3675
|
__webpack_require__.nc = void 0;
|
|
3552
3676
|
})();
|
|
3553
3677
|
const STORAGE_KEY = 'rfkit-charts-frequency-allocation';
|
|
3554
|
-
const
|
|
3678
|
+
const tools_getFrequencyAllocationFromCache = ()=>{
|
|
3555
3679
|
const cached = localStorage.getItem(STORAGE_KEY);
|
|
3556
3680
|
if (!cached) return null;
|
|
3557
3681
|
const data = JSON.parse(cached);
|
|
@@ -3760,7 +3884,7 @@ var constants_ModuleType = /*#__PURE__*/ function(ModuleType) {
|
|
|
3760
3884
|
var constants_PSType = /*#__PURE__*/ function(PSType) {
|
|
3761
3885
|
PSType["Spectrum"] = "spectrum";
|
|
3762
3886
|
PSType["AntennaFactor"] = "antennaFactor";
|
|
3763
|
-
PSType["
|
|
3887
|
+
PSType["Signal"] = "signal";
|
|
3764
3888
|
PSType["Occupancy"] = "occupancy";
|
|
3765
3889
|
PSType["LevelStream"] = "levelStream";
|
|
3766
3890
|
PSType["Heatmap"] = "heatmap";
|
|
@@ -4011,6 +4135,11 @@ var store_HeatmapCaptureType = /*#__PURE__*/ function(HeatmapCaptureType) {
|
|
|
4011
4135
|
HeatmapCaptureType["RowIndex"] = "rowIndex";
|
|
4012
4136
|
return HeatmapCaptureType;
|
|
4013
4137
|
}({});
|
|
4138
|
+
var store_SignalDataType = /*#__PURE__*/ function(SignalDataType) {
|
|
4139
|
+
SignalDataType["Station"] = "station";
|
|
4140
|
+
SignalDataType["Simple"] = "simple";
|
|
4141
|
+
return SignalDataType;
|
|
4142
|
+
}({});
|
|
4014
4143
|
const restrictList = {
|
|
4015
4144
|
dBm: [
|
|
4016
4145
|
-300,
|
|
@@ -4219,10 +4348,6 @@ function defaultState_createParams() {
|
|
|
4219
4348
|
cacheTime: 20000,
|
|
4220
4349
|
granularity: 1
|
|
4221
4350
|
},
|
|
4222
|
-
stationInfo: {
|
|
4223
|
-
show: true,
|
|
4224
|
-
data: []
|
|
4225
|
-
},
|
|
4226
4351
|
fluorescence: {
|
|
4227
4352
|
show: false,
|
|
4228
4353
|
display: false
|
|
@@ -4389,8 +4514,7 @@ const Params_Params = (props)=>{
|
|
|
4389
4514
|
'gauge',
|
|
4390
4515
|
'band',
|
|
4391
4516
|
'levelStream',
|
|
4392
|
-
'onChannelChange'
|
|
4393
|
-
'stationInfo'
|
|
4517
|
+
'onChannelChange'
|
|
4394
4518
|
];
|
|
4395
4519
|
paramNames.forEach((name)=>{
|
|
4396
4520
|
useParamEffect(name, props[name], state, dispatch);
|
|
@@ -4486,7 +4610,8 @@ const Store = (props)=>{
|
|
|
4486
4610
|
state,
|
|
4487
4611
|
dispatch
|
|
4488
4612
|
}), [
|
|
4489
|
-
state
|
|
4613
|
+
state,
|
|
4614
|
+
dispatch
|
|
4490
4615
|
]);
|
|
4491
4616
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(store_context.Provider, {
|
|
4492
4617
|
value: value,
|
|
@@ -7434,6 +7559,90 @@ const ZoomOffsetContainer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.
|
|
|
7434
7559
|
});
|
|
7435
7560
|
});
|
|
7436
7561
|
const Zoom_ZoomOffsetContainer = ZoomOffsetContainer;
|
|
7562
|
+
const STORAGE_KEY_PREFIX = 'rfkit-charts-stationData';
|
|
7563
|
+
function getStationDataFromStorage(globalID) {
|
|
7564
|
+
try {
|
|
7565
|
+
const stored = sessionStorage.getItem(`${STORAGE_KEY_PREFIX}-${globalID}`);
|
|
7566
|
+
if (stored) return JSON.parse(stored);
|
|
7567
|
+
} catch (error) {
|
|
7568
|
+
console.error("\u8BFB\u53D6\u53F0\u7AD9\u6570\u636E\u5931\u8D25:", error);
|
|
7569
|
+
}
|
|
7570
|
+
return [];
|
|
7571
|
+
}
|
|
7572
|
+
function saveStationDataToStorage(globalID, data) {
|
|
7573
|
+
try {
|
|
7574
|
+
sessionStorage.setItem(`${STORAGE_KEY_PREFIX}-${globalID}`, JSON.stringify(data));
|
|
7575
|
+
} catch (error) {
|
|
7576
|
+
console.error("\u4FDD\u5B58\u53F0\u7AD9\u6570\u636E\u5931\u8D25:", error);
|
|
7577
|
+
}
|
|
7578
|
+
}
|
|
7579
|
+
const STATION_DATA = (globalID, data)=>{
|
|
7580
|
+
if (void 0 !== data) {
|
|
7581
|
+
subscription_openData(`stationData-${globalID}`, data, []);
|
|
7582
|
+
saveStationDataToStorage(globalID, data);
|
|
7583
|
+
return data;
|
|
7584
|
+
}
|
|
7585
|
+
const openDataResult = subscription_openData(`stationData-${globalID}`, void 0, null);
|
|
7586
|
+
if (openDataResult && openDataResult.length > 0) return openDataResult;
|
|
7587
|
+
const storedData = getStationDataFromStorage(globalID);
|
|
7588
|
+
if (storedData.length > 0) {
|
|
7589
|
+
subscription_openData(`stationData-${globalID}`, storedData, []);
|
|
7590
|
+
return storedData;
|
|
7591
|
+
}
|
|
7592
|
+
return [];
|
|
7593
|
+
};
|
|
7594
|
+
function isStationInfo(item) {
|
|
7595
|
+
return 'signalName' in item && 'orgName' in item;
|
|
7596
|
+
}
|
|
7597
|
+
function toFrequencyRangeInput(item) {
|
|
7598
|
+
return {
|
|
7599
|
+
frequency: null != item.frequency ? Number(item.frequency) : void 0,
|
|
7600
|
+
bandwidth: null != item.bandwidth ? Number(item.bandwidth) : void 0,
|
|
7601
|
+
startFrequency: null != item.startFrequency ? Number(item.startFrequency) : void 0,
|
|
7602
|
+
stopFrequency: null != item.stopFrequency ? Number(item.stopFrequency) : void 0
|
|
7603
|
+
};
|
|
7604
|
+
}
|
|
7605
|
+
function useStationFinder({ frequency }) {
|
|
7606
|
+
const { state: { globalID, cursor: { coord: { left } }, segments, signal } } = useStore_useStore();
|
|
7607
|
+
const allSignals = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
7608
|
+
const stationData = STATION_DATA(globalID);
|
|
7609
|
+
const signalData = signal.data || [];
|
|
7610
|
+
return [
|
|
7611
|
+
...stationData,
|
|
7612
|
+
...signalData
|
|
7613
|
+
];
|
|
7614
|
+
}, [
|
|
7615
|
+
globalID,
|
|
7616
|
+
signal.data
|
|
7617
|
+
]);
|
|
7618
|
+
const currentPosition = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>(0, utils.hK)(left, segments), [
|
|
7619
|
+
left,
|
|
7620
|
+
segments
|
|
7621
|
+
]);
|
|
7622
|
+
const station = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
7623
|
+
if (!left || !allSignals.length || !segments?.length) return;
|
|
7624
|
+
const currentSegment = segments[currentPosition.segmentIndex];
|
|
7625
|
+
if (!currentSegment) return;
|
|
7626
|
+
const currentFreq = Number(frequency);
|
|
7627
|
+
const matchedSignal = allSignals.find((item)=>{
|
|
7628
|
+
const range = (0, utils.Ce)(toFrequencyRangeInput(item));
|
|
7629
|
+
if (!range) return false;
|
|
7630
|
+
if (!(0, utils.nq)(range, currentSegment)) return false;
|
|
7631
|
+
const indexRange = (0, utils.cE)(range, currentSegment);
|
|
7632
|
+
const isMatchByIndex = (0, utils.R1)(currentPosition.pointIndex, indexRange, utils.ih);
|
|
7633
|
+
const isMatchByFrequency = (0, utils.LB)(currentFreq, range);
|
|
7634
|
+
return isMatchByIndex || isMatchByFrequency;
|
|
7635
|
+
});
|
|
7636
|
+
return matchedSignal && isStationInfo(matchedSignal) ? matchedSignal : void 0;
|
|
7637
|
+
}, [
|
|
7638
|
+
frequency,
|
|
7639
|
+
allSignals,
|
|
7640
|
+
segments,
|
|
7641
|
+
currentPosition,
|
|
7642
|
+
left
|
|
7643
|
+
]);
|
|
7644
|
+
return station;
|
|
7645
|
+
}
|
|
7437
7646
|
const events_SeriesEventName = {
|
|
7438
7647
|
UPDATED: 'series:updated',
|
|
7439
7648
|
ADDED: 'series:added',
|
|
@@ -7821,7 +8030,7 @@ function getStableOrder(globalID, currentNames) {
|
|
|
7821
8030
|
}
|
|
7822
8031
|
return stored;
|
|
7823
8032
|
}
|
|
7824
|
-
function
|
|
8033
|
+
function useFilteredSeries_useFilteredSeries(globalID, filter) {
|
|
7825
8034
|
const { series } = useSeriesManager(globalID);
|
|
7826
8035
|
const { state: { series: { legendExternal } } } = useStore_useStore();
|
|
7827
8036
|
const filteredData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
@@ -7962,75 +8171,9 @@ FrequencyDataBoard_styles_module_options.domAPI = styleDomAPI_default();
|
|
|
7962
8171
|
FrequencyDataBoard_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
7963
8172
|
injectStylesIntoStyleTag_default()(FrequencyDataBoard_styles_module.Z, FrequencyDataBoard_styles_module_options);
|
|
7964
8173
|
const components_FrequencyDataBoard_styles_module = FrequencyDataBoard_styles_module.Z && FrequencyDataBoard_styles_module.Z.locals ? FrequencyDataBoard_styles_module.Z.locals : void 0;
|
|
7965
|
-
function useStationFinder({ frequency }) {
|
|
7966
|
-
const { state: { cursor: { coord: { left } }, segments, stationInfo } } = useStore_useStore();
|
|
7967
|
-
const stationData = stationInfo.data;
|
|
7968
|
-
const totalSegmentPoints = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>segments?.reduce((sum, s)=>sum + s.point, 0) || 0, [
|
|
7969
|
-
segments
|
|
7970
|
-
]);
|
|
7971
|
-
const currentPosition = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
7972
|
-
if (!segments?.length || !totalSegmentPoints) return {
|
|
7973
|
-
segmentIndex: -1,
|
|
7974
|
-
pointIndex: -1
|
|
7975
|
-
};
|
|
7976
|
-
let totalPoints = 0;
|
|
7977
|
-
const mousePositionRatio = left / 100;
|
|
7978
|
-
for(let i = 0; i < segments.length; i++){
|
|
7979
|
-
const segmentRatio = segments[i].point / totalSegmentPoints;
|
|
7980
|
-
if (mousePositionRatio >= totalPoints && mousePositionRatio <= totalPoints + segmentRatio) {
|
|
7981
|
-
const relativeRatio = (mousePositionRatio - totalPoints) / segmentRatio;
|
|
7982
|
-
const pointIndex = Math.floor(relativeRatio * segments[i].point);
|
|
7983
|
-
return {
|
|
7984
|
-
segmentIndex: i,
|
|
7985
|
-
pointIndex
|
|
7986
|
-
};
|
|
7987
|
-
}
|
|
7988
|
-
totalPoints += segmentRatio;
|
|
7989
|
-
}
|
|
7990
|
-
return {
|
|
7991
|
-
segmentIndex: -1,
|
|
7992
|
-
pointIndex: -1
|
|
7993
|
-
};
|
|
7994
|
-
}, [
|
|
7995
|
-
segments,
|
|
7996
|
-
totalSegmentPoints,
|
|
7997
|
-
left
|
|
7998
|
-
]);
|
|
7999
|
-
const station = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
8000
|
-
if (!left || !stationData.length || !segments?.length) return;
|
|
8001
|
-
const currentSegment = segments[currentPosition.segmentIndex];
|
|
8002
|
-
if (!currentSegment) return;
|
|
8003
|
-
const f = Number(frequency);
|
|
8004
|
-
const TOLERANCE = 2;
|
|
8005
|
-
const rangeStart = currentPosition.pointIndex - TOLERANCE;
|
|
8006
|
-
const rangeEnd = currentPosition.pointIndex + TOLERANCE;
|
|
8007
|
-
const totalRange = currentSegment.stop - currentSegment.start;
|
|
8008
|
-
const matchedStation = stationData.find((i)=>{
|
|
8009
|
-
const yian = i.bandwidth / 2 / 1000;
|
|
8010
|
-
const startFrequency = i.frequency - yian;
|
|
8011
|
-
const endFrequency = i.frequency + yian;
|
|
8012
|
-
if (endFrequency < currentSegment.start || startFrequency > currentSegment.stop) return false;
|
|
8013
|
-
let startIndex = Math.ceil((startFrequency - currentSegment.start) / totalRange * currentSegment.point) - 1;
|
|
8014
|
-
let stopIndex = Math.floor((endFrequency - currentSegment.start) / totalRange * currentSegment.point) - 1;
|
|
8015
|
-
startIndex = Math.max(startIndex, 0);
|
|
8016
|
-
stopIndex = Math.min(stopIndex, currentSegment.point - 1);
|
|
8017
|
-
const isMatchByIndex = !(rangeEnd < startIndex || rangeStart > stopIndex);
|
|
8018
|
-
const isMatchByFrequency = f >= startFrequency && f <= endFrequency;
|
|
8019
|
-
return isMatchByIndex || isMatchByFrequency;
|
|
8020
|
-
});
|
|
8021
|
-
return matchedStation;
|
|
8022
|
-
}, [
|
|
8023
|
-
frequency,
|
|
8024
|
-
stationData,
|
|
8025
|
-
segments,
|
|
8026
|
-
currentPosition,
|
|
8027
|
-
left
|
|
8028
|
-
]);
|
|
8029
|
-
return station;
|
|
8030
|
-
}
|
|
8031
8174
|
const FrequencyDataBoard_FrequencyDataBoard = ({ left, updateKey, onChange })=>{
|
|
8032
8175
|
const { state: { axisY, axisX: { frequencyFormat, unit }, globalID } } = useStore_useStore();
|
|
8033
|
-
const filteredSeries =
|
|
8176
|
+
const filteredSeries = useFilteredSeries_useFilteredSeries(globalID);
|
|
8034
8177
|
const index = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(Number.NaN);
|
|
8035
8178
|
const calculateIndex = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((data, n, series)=>{
|
|
8036
8179
|
const values = data[n] || [];
|
|
@@ -8718,7 +8861,7 @@ Area_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
|
8718
8861
|
injectStylesIntoStyleTag_default()(Area_styles_module.Z, Area_styles_module_options);
|
|
8719
8862
|
const HeatmapCapture_Area_styles_module = Area_styles_module.Z && Area_styles_module.Z.locals ? Area_styles_module.Z.locals : void 0;
|
|
8720
8863
|
const Area_COMPONENT_KEY = constants_ToolType.HeatmapCapture;
|
|
8721
|
-
const
|
|
8864
|
+
const Area = (props)=>{
|
|
8722
8865
|
const { state: { heatmapCapture, segments, axisX: { frequencyFormat, unit }, system, globalID } } = useStore_useStore();
|
|
8723
8866
|
const { id } = props;
|
|
8724
8867
|
const { type, show, sync, onChange } = heatmapCapture;
|
|
@@ -8885,7 +9028,7 @@ const Area_Area = (props)=>{
|
|
|
8885
9028
|
]
|
|
8886
9029
|
});
|
|
8887
9030
|
};
|
|
8888
|
-
const
|
|
9031
|
+
const HeatmapCapture_Area = Area;
|
|
8889
9032
|
var RowIndex_styles_module = __webpack_require__("../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/HeatmapCapture/RowIndex/styles.module.less");
|
|
8890
9033
|
var RowIndex_styles_module_options = {};
|
|
8891
9034
|
RowIndex_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
@@ -9269,7 +9412,7 @@ const HeatmapCapture_HeatmapCapture = (props)=>{
|
|
|
9269
9412
|
...props
|
|
9270
9413
|
}) : type === store_HeatmapCaptureType.RowIndex ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(HeatmapCapture_RowIndex, {
|
|
9271
9414
|
...props
|
|
9272
|
-
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
9415
|
+
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(HeatmapCapture_Area, {
|
|
9273
9416
|
...props
|
|
9274
9417
|
});
|
|
9275
9418
|
};
|
|
@@ -11002,69 +11145,38 @@ const Markers_Switch_Switch = ()=>{
|
|
|
11002
11145
|
const Markers_Switch = Markers_Switch_Switch;
|
|
11003
11146
|
const Signal_Switch_Switch = ()=>{
|
|
11004
11147
|
const { state: { signal }, dispatch } = useStore_useStore();
|
|
11005
|
-
const
|
|
11006
|
-
const
|
|
11148
|
+
const isActive = signal.display;
|
|
11149
|
+
const shouldShow = signal.show;
|
|
11150
|
+
const setActive = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((active)=>{
|
|
11007
11151
|
dispatch({
|
|
11008
11152
|
payload: {
|
|
11009
11153
|
signal: {
|
|
11010
11154
|
...signal,
|
|
11011
|
-
display:
|
|
11012
|
-
}
|
|
11013
|
-
}
|
|
11014
|
-
});
|
|
11015
|
-
}, [
|
|
11016
|
-
signal
|
|
11017
|
-
]);
|
|
11018
|
-
if (!show) return null;
|
|
11019
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToolsBar_IconBox, {
|
|
11020
|
-
onClick: ()=>{
|
|
11021
|
-
setActive(!display);
|
|
11022
|
-
},
|
|
11023
|
-
title: `\u{4FE1}\u{53F7}\u{6807}\u{6CE8}-${!display ? "\u5DF2\u9690\u85CF" : "\u5DF2\u663E\u793A"}`,
|
|
11024
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", {
|
|
11025
|
-
viewBox: "0 0 1024 1024",
|
|
11026
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11027
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
|
|
11028
|
-
fill: display ? 'var(--theme-color-primary)' : 'var(--theme-color-base)',
|
|
11029
|
-
d: "M144 768v64H64v-64h80m64-64H0v192h208V704zM416 576v256h-80V576h80m64-64H272v384h208V512zM688 352v480h-80V352h80m64-64H544v608h208V288zM960 192v640h-80V192h80m64-64H816v768h208V128z"
|
|
11030
|
-
})
|
|
11031
|
-
})
|
|
11032
|
-
});
|
|
11033
|
-
};
|
|
11034
|
-
const Signal_Switch = Signal_Switch_Switch;
|
|
11035
|
-
const StationAllocationSwitch = ()=>{
|
|
11036
|
-
const { state: { stationInfo }, dispatch } = useStore_useStore();
|
|
11037
|
-
const { show } = stationInfo;
|
|
11038
|
-
const setActive = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
11039
|
-
dispatch({
|
|
11040
|
-
payload: {
|
|
11041
|
-
stationInfo: {
|
|
11042
|
-
...stationInfo,
|
|
11043
|
-
show: !!e
|
|
11155
|
+
display: active
|
|
11044
11156
|
}
|
|
11045
11157
|
}
|
|
11046
11158
|
});
|
|
11047
11159
|
}, [
|
|
11048
|
-
|
|
11160
|
+
signal,
|
|
11049
11161
|
dispatch
|
|
11050
11162
|
]);
|
|
11163
|
+
if (!shouldShow) return null;
|
|
11051
11164
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToolsBar_IconBox, {
|
|
11052
11165
|
onClick: ()=>{
|
|
11053
|
-
setActive(!
|
|
11166
|
+
setActive(!isActive);
|
|
11054
11167
|
},
|
|
11055
|
-
title: `\u{4FE1}\u{53F7}\u{6807}\u{6CE8}-\u{5DF2}${
|
|
11168
|
+
title: `\u{4FE1}\u{53F7}\u{6807}\u{6CE8}-\u{5DF2}${isActive ? "\u663E\u793A" : "\u9690\u85CF"}`,
|
|
11056
11169
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", {
|
|
11057
11170
|
viewBox: "0 0 1024 1024",
|
|
11058
11171
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11059
11172
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
|
|
11060
|
-
fill:
|
|
11061
|
-
d: "M563.072 376.48a79.456 79.456 0 0 0 28.928-61.12 80 80 0 1 0-160 0c0 24.672 11.392 46.432 28.928 61.12l-202.88 540.256a32 32 0 1 0 59.904 22.496l49.28-131.264h289.504l49.28 131.264a32.064 32.064 0 0 0 41.248 18.752c16.544-6.208 24.896-24.672 18.72-41.216l-202.912-540.288z m-1.312 178.624h-99.552L512 422.56l49.76 132.544z m-170.464 188.896l46.912-124.896h147.616l46.912 124.896h-241.44zM662.464 417.408a32 32 0 1 0 53.12 35.648 254.72 254.72 0 0 0 43.136-142.304 255.04 255.04 0 0 0-43.136-142.304 32 32 0 1 0-53.12 35.68 190.944 190.944 0 0 1 32.288 106.624 190.816 190.816 0 0 1-32.288 106.656zM289.888 453.024a32 32 0 1 0 53.184-35.616 191.36 191.36 0 0 1-32.32-106.656 191.328 191.328 0 0 1 32.32-106.656 32.064 32.064 0 0 0-8.768-44.416 32.096 32.096 0 0 0-44.416 8.768 254.976 254.976 0 0 0-43.136 142.304 254.976 254.976 0 0 0 43.136 142.272zM210.656 117.12A32 32 0 1 0 157.44 81.536a420.032 420.032 0 0 0-70.848 233.824 419.744 419.744 0 0 0 70.88 233.856 31.936 31.936 0 0 0 44.416 8.768 32 32 0 0 0 8.768-44.416 355.168 355.168 0 0 1-60.032-198.24A355.36 355.36 0 0 1 210.656 117.12zM896.224 154.304a416.96 416.96 0 0 0-38.912-72.768 32 32 0 1 0-53.184 35.584 354.912 354.912 0 0 1 60.064 198.24 355.2 355.2 0 0 1-60.064 198.208 32.032 32.032 0 0 0 53.184 35.648 418.816 418.816 0 0 0 70.88-233.856c0-55.68-10.752-109.856-31.968-161.056z"
|
|
11062
|
-
"p-id": "11215"
|
|
11173
|
+
fill: isActive ? 'var(--theme-color-primary)' : 'var(--theme-color-base)',
|
|
11174
|
+
d: "M563.072 376.48a79.456 79.456 0 0 0 28.928-61.12 80 80 0 1 0-160 0c0 24.672 11.392 46.432 28.928 61.12l-202.88 540.256a32 32 0 1 0 59.904 22.496l49.28-131.264h289.504l49.28 131.264a32.064 32.064 0 0 0 41.248 18.752c16.544-6.208 24.896-24.672 18.72-41.216l-202.912-540.288z m-1.312 178.624h-99.552L512 422.56l49.76 132.544z m-170.464 188.896l46.912-124.896h147.616l46.912 124.896h-241.44zM662.464 417.408a32 32 0 1 0 53.12 35.648 254.72 254.72 0 0 0 43.136-142.304 255.04 255.04 0 0 0-43.136-142.304 32 32 0 1 0-53.12 35.68 190.944 190.944 0 0 1 32.288 106.624 190.816 190.816 0 0 1-32.288 106.656zM289.888 453.024a32 32 0 1 0 53.184-35.616 191.36 191.36 0 0 1-32.32-106.656 191.328 191.328 0 0 1 32.32-106.656 32.064 32.064 0 0 0-8.768-44.416 32.096 32.096 0 0 0-44.416 8.768 254.976 254.976 0 0 0-43.136 142.304 254.976 254.976 0 0 0 43.136 142.272zM210.656 117.12A32 32 0 1 0 157.44 81.536a420.032 420.032 0 0 0-70.848 233.824 419.744 419.744 0 0 0 70.88 233.856 31.936 31.936 0 0 0 44.416 8.768 32 32 0 0 0 8.768-44.416 355.168 355.168 0 0 1-60.032-198.24A355.36 355.36 0 0 1 210.656 117.12zM896.224 154.304a416.96 416.96 0 0 0-38.912-72.768 32 32 0 1 0-53.184 35.584 354.912 354.912 0 0 1 60.064 198.24 355.2 355.2 0 0 1-60.064 198.208 32.032 32.032 0 0 0 53.184 35.648 418.816 418.816 0 0 0 70.88-233.856c0-55.68-10.752-109.856-31.968-161.056z"
|
|
11063
11175
|
})
|
|
11064
11176
|
})
|
|
11065
11177
|
});
|
|
11066
11178
|
};
|
|
11067
|
-
const
|
|
11179
|
+
const Signal_Switch = Signal_Switch_Switch;
|
|
11068
11180
|
const MIN_TIME = 500;
|
|
11069
11181
|
const MAX_TIME = 5000;
|
|
11070
11182
|
const STEP = 100;
|
|
@@ -11362,7 +11474,7 @@ function useSegments() {
|
|
|
11362
11474
|
];
|
|
11363
11475
|
}
|
|
11364
11476
|
const SET_SEGMENTS_DISPLAY = (globalID, func)=>subscription_createSubscriptionManager(`SET_SEGMENTS_DISPLAY-${globalID}`, '0', func);
|
|
11365
|
-
function useSpectrumRule() {
|
|
11477
|
+
function useSpectrumRule(type) {
|
|
11366
11478
|
const { state: { zoom, globalID }, dispatch } = useStore_useStore();
|
|
11367
11479
|
const [segments, setSegments] = useSegments();
|
|
11368
11480
|
const updateSegments = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
@@ -11442,9 +11554,12 @@ function useSpectrumRule() {
|
|
|
11442
11554
|
if (newPoints && newPoints !== pointsRef.current) {
|
|
11443
11555
|
pointsRef.current = newPoints;
|
|
11444
11556
|
generateSegmentsFromPoints(newPoints);
|
|
11557
|
+
if (type === constants_ChartType.LiteNormalized) setSegments((0, utils.uq)(newPoints));
|
|
11445
11558
|
}
|
|
11446
11559
|
}, [
|
|
11447
|
-
generateSegmentsFromPoints
|
|
11560
|
+
generateSegmentsFromPoints,
|
|
11561
|
+
setSegments,
|
|
11562
|
+
type
|
|
11448
11563
|
]);
|
|
11449
11564
|
useChannel();
|
|
11450
11565
|
const handleSpectrumRule = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
@@ -11641,7 +11756,7 @@ injectStylesIntoStyleTag_default()(SeriesDisplayControl_styles_module.Z, SeriesD
|
|
|
11641
11756
|
const ToolsBar_SeriesDisplayControl_styles_module = SeriesDisplayControl_styles_module.Z && SeriesDisplayControl_styles_module.Z.locals ? SeriesDisplayControl_styles_module.Z.locals : void 0;
|
|
11642
11757
|
const SeriesDisplayControl = ()=>{
|
|
11643
11758
|
const { state: { globalID, series: seriesConfig } } = useStore_useStore();
|
|
11644
|
-
const filteredSeries =
|
|
11759
|
+
const filteredSeries = useFilteredSeries_useFilteredSeries(globalID);
|
|
11645
11760
|
const { forceUpdate } = useSeriesForComponent(globalID);
|
|
11646
11761
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
11647
11762
|
if (!globalID || !seriesConfig?.forceDisplay) return;
|
|
@@ -11820,7 +11935,7 @@ const TOOL_CONFIGS = [
|
|
|
11820
11935
|
]
|
|
11821
11936
|
},
|
|
11822
11937
|
{
|
|
11823
|
-
component:
|
|
11938
|
+
component: Signal_Switch,
|
|
11824
11939
|
toolType: constants_ToolsBarItemType.StationAllocationSwitch,
|
|
11825
11940
|
supportedCharts: [
|
|
11826
11941
|
constants_ChartType.SingleFrequency,
|
|
@@ -11850,21 +11965,14 @@ const TOOL_CONFIGS = [
|
|
|
11850
11965
|
constants_ChartType.LiteNormalized
|
|
11851
11966
|
]
|
|
11852
11967
|
},
|
|
11853
|
-
{
|
|
11854
|
-
component: Signal_Switch,
|
|
11855
|
-
toolType: constants_ToolsBarItemType.SignalSwitch,
|
|
11856
|
-
supportedCharts: [
|
|
11857
|
-
constants_ChartType.SingleFrequency,
|
|
11858
|
-
constants_ChartType.Scan
|
|
11859
|
-
]
|
|
11860
|
-
},
|
|
11861
11968
|
{
|
|
11862
11969
|
component: Zoom_Switch,
|
|
11863
11970
|
toolType: constants_ToolsBarItemType.ZoomSwitch,
|
|
11864
11971
|
supportedCharts: [
|
|
11865
11972
|
constants_ChartType.SingleFrequency,
|
|
11866
11973
|
constants_ChartType.Scan,
|
|
11867
|
-
constants_ChartType.MScan
|
|
11974
|
+
constants_ChartType.MScan,
|
|
11975
|
+
constants_ChartType.LiteNormalized
|
|
11868
11976
|
]
|
|
11869
11977
|
},
|
|
11870
11978
|
{
|
|
@@ -12651,6 +12759,74 @@ const DragFrame = ({ id })=>{
|
|
|
12651
12759
|
});
|
|
12652
12760
|
};
|
|
12653
12761
|
const components_DragFrame = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(DragFrame);
|
|
12762
|
+
var AllocationInfo_styles_module = __webpack_require__("../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/FrequencyAllocation/AllocationInfo/styles.module.less");
|
|
12763
|
+
var AllocationInfo_styles_module_options = {};
|
|
12764
|
+
AllocationInfo_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
12765
|
+
AllocationInfo_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
12766
|
+
AllocationInfo_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
12767
|
+
AllocationInfo_styles_module_options.domAPI = styleDomAPI_default();
|
|
12768
|
+
AllocationInfo_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
12769
|
+
injectStylesIntoStyleTag_default()(AllocationInfo_styles_module.Z, AllocationInfo_styles_module_options);
|
|
12770
|
+
const FrequencyAllocation_AllocationInfo_styles_module = AllocationInfo_styles_module.Z && AllocationInfo_styles_module.Z.locals ? AllocationInfo_styles_module.Z.locals : void 0;
|
|
12771
|
+
const AllocationInfo_AllocationInfo = ({ allocationInfo, variant = 'default' })=>{
|
|
12772
|
+
if (!allocationInfo) return null;
|
|
12773
|
+
const { title, description, startFrequency, stopFrequency, centerFrequency, stepFrequency, bandwidth, modulation } = allocationInfo;
|
|
12774
|
+
const className = 'board' === variant ? `${FrequencyAllocation_AllocationInfo_styles_module.allocationInfo} ${FrequencyAllocation_AllocationInfo_styles_module.withDivider}` : FrequencyAllocation_AllocationInfo_styles_module.allocationInfo;
|
|
12775
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
12776
|
+
className: className,
|
|
12777
|
+
children: [
|
|
12778
|
+
title && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
12779
|
+
className: FrequencyAllocation_AllocationInfo_styles_module.title,
|
|
12780
|
+
children: title
|
|
12781
|
+
}),
|
|
12782
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
12783
|
+
className: FrequencyAllocation_AllocationInfo_styles_module.frequency,
|
|
12784
|
+
children: [
|
|
12785
|
+
startFrequency && stopFrequency && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
12786
|
+
children: [
|
|
12787
|
+
"\u9891\u7387\u8303\u56F4\uFF1A",
|
|
12788
|
+
startFrequency,
|
|
12789
|
+
" - ",
|
|
12790
|
+
stopFrequency
|
|
12791
|
+
]
|
|
12792
|
+
}),
|
|
12793
|
+
centerFrequency && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
12794
|
+
children: [
|
|
12795
|
+
"\u4E2D\u5FC3\u9891\u7387\uFF1A",
|
|
12796
|
+
centerFrequency,
|
|
12797
|
+
" MHz"
|
|
12798
|
+
]
|
|
12799
|
+
}),
|
|
12800
|
+
stepFrequency && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
12801
|
+
children: [
|
|
12802
|
+
"\u6B65\u8FDB\uFF1A",
|
|
12803
|
+
stepFrequency,
|
|
12804
|
+
" kHz"
|
|
12805
|
+
]
|
|
12806
|
+
}),
|
|
12807
|
+
bandwidth && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
12808
|
+
children: [
|
|
12809
|
+
"\u5E26\u5BBD\uFF1A",
|
|
12810
|
+
bandwidth,
|
|
12811
|
+
" MHz"
|
|
12812
|
+
]
|
|
12813
|
+
}),
|
|
12814
|
+
modulation && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
12815
|
+
children: [
|
|
12816
|
+
"\u8C03\u5236\u65B9\u5F0F\uFF1A",
|
|
12817
|
+
modulation
|
|
12818
|
+
]
|
|
12819
|
+
})
|
|
12820
|
+
]
|
|
12821
|
+
}),
|
|
12822
|
+
description && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
12823
|
+
className: FrequencyAllocation_AllocationInfo_styles_module.description,
|
|
12824
|
+
children: description
|
|
12825
|
+
})
|
|
12826
|
+
]
|
|
12827
|
+
});
|
|
12828
|
+
};
|
|
12829
|
+
const AllocationInfo = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(AllocationInfo_AllocationInfo);
|
|
12654
12830
|
const originalColors = [
|
|
12655
12831
|
'#B22222',
|
|
12656
12832
|
'#CD5C5C',
|
|
@@ -12735,7 +12911,7 @@ const sortedColors = [
|
|
|
12735
12911
|
if (Math.abs(a.hsl.h - b.hsl.h) > 10) return a.hsl.h - b.hsl.h;
|
|
12736
12912
|
return a.hsl.l - b.hsl.l;
|
|
12737
12913
|
}).map((item)=>item.color);
|
|
12738
|
-
function
|
|
12914
|
+
function color_sortAndRecolorFrequencyAllocationData(data) {
|
|
12739
12915
|
const sortedData = [
|
|
12740
12916
|
...data
|
|
12741
12917
|
].sort((a, b)=>Number(a.startFrequency) - Number(b.startFrequency));
|
|
@@ -13280,51 +13456,33 @@ const FrequencyAllocation_Tooltip_Tooltip = ({ title, description, visible, x, y
|
|
|
13280
13456
|
visible
|
|
13281
13457
|
]);
|
|
13282
13458
|
if (!visible) return null;
|
|
13283
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.
|
|
13459
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
13284
13460
|
ref: tooltipRef,
|
|
13285
13461
|
className: components_FrequencyAllocation_Tooltip_styles_module.tooltip,
|
|
13286
13462
|
style: {
|
|
13287
13463
|
left: position.x,
|
|
13288
13464
|
top: position.y
|
|
13289
13465
|
},
|
|
13290
|
-
children:
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13300
|
-
|
|
13301
|
-
|
|
13302
|
-
children: `\u{4E2D}\u{5FC3}\u{9891}\u{7387}: ${centerFrequency} MHz`
|
|
13303
|
-
}),
|
|
13304
|
-
stepFrequency && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
13305
|
-
children: `\u{6B65}\u{8FDB}: ${stepFrequency} kHz`
|
|
13306
|
-
}),
|
|
13307
|
-
bandwidth && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
13308
|
-
children: `\u{5E26}\u{5BBD}: ${bandwidth} MHz`
|
|
13309
|
-
}),
|
|
13310
|
-
modulation && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
13311
|
-
children: `\u{8C03}\u{5236}\u{65B9}\u{5F0F}: ${modulation}`
|
|
13312
|
-
})
|
|
13313
|
-
]
|
|
13314
|
-
}),
|
|
13315
|
-
description && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
13316
|
-
className: components_FrequencyAllocation_Tooltip_styles_module.description,
|
|
13317
|
-
children: description
|
|
13318
|
-
})
|
|
13319
|
-
]
|
|
13466
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AllocationInfo, {
|
|
13467
|
+
allocationInfo: {
|
|
13468
|
+
title,
|
|
13469
|
+
description,
|
|
13470
|
+
startFrequency,
|
|
13471
|
+
stopFrequency,
|
|
13472
|
+
centerFrequency,
|
|
13473
|
+
stepFrequency,
|
|
13474
|
+
bandwidth,
|
|
13475
|
+
modulation
|
|
13476
|
+
}
|
|
13477
|
+
})
|
|
13320
13478
|
});
|
|
13321
13479
|
};
|
|
13322
13480
|
const FrequencyAllocation_Tooltip = FrequencyAllocation_Tooltip_Tooltip;
|
|
13323
13481
|
const FrequencyAllocation_FrequencyAllocation = ()=>{
|
|
13324
13482
|
const { state: { axisX: { unit }, segments, frequencyAllocation: { display, show, data }, zoom: { style: zoomOffStyle } } } = useStore_useStore();
|
|
13325
13483
|
const frequencyAllocationData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
13326
|
-
const cachedData =
|
|
13327
|
-
return
|
|
13484
|
+
const cachedData = tools_getFrequencyAllocationFromCache();
|
|
13485
|
+
return color_sortAndRecolorFrequencyAllocationData(cachedData?.length > 0 ? cachedData : data?.length > 0 ? data : FrequencyAllocation_data);
|
|
13328
13486
|
}, [
|
|
13329
13487
|
data
|
|
13330
13488
|
]);
|
|
@@ -13334,24 +13492,25 @@ const FrequencyAllocation_FrequencyAllocation = ()=>{
|
|
|
13334
13492
|
y: 0
|
|
13335
13493
|
});
|
|
13336
13494
|
const getFrequencyRange = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((band)=>{
|
|
13495
|
+
const range = (0, utils.Ce)({
|
|
13496
|
+
frequency: null != band.centerFrequency ? Number(band.centerFrequency) : void 0,
|
|
13497
|
+
bandwidth: null != band.bandwidth ? Number(band.bandwidth) : void 0,
|
|
13498
|
+
startFrequency: null != band.startFrequency ? Number(band.startFrequency) : void 0,
|
|
13499
|
+
stopFrequency: null != band.stopFrequency ? Number(band.stopFrequency) : void 0
|
|
13500
|
+
});
|
|
13501
|
+
if (!range) return null;
|
|
13337
13502
|
if (null != band.startFrequency && null != band.stopFrequency) return {
|
|
13338
|
-
start:
|
|
13339
|
-
stop:
|
|
13503
|
+
start: range.startFreq,
|
|
13504
|
+
stop: range.stopFreq,
|
|
13340
13505
|
type: 'range'
|
|
13341
13506
|
};
|
|
13342
|
-
if (null != band.centerFrequency && null != band.bandwidth) {
|
|
13343
|
-
|
|
13344
|
-
|
|
13345
|
-
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13349
|
-
stop: segment.stop,
|
|
13350
|
-
frequency: Number(band.centerFrequency),
|
|
13351
|
-
bandwidth: Number(band.bandwidth),
|
|
13352
|
-
type: 'centerBandwidth'
|
|
13353
|
-
};
|
|
13354
|
-
}
|
|
13507
|
+
if (null != band.centerFrequency && null != band.bandwidth) return {
|
|
13508
|
+
start: range.startFreq,
|
|
13509
|
+
stop: range.stopFreq,
|
|
13510
|
+
frequency: Number(band.centerFrequency),
|
|
13511
|
+
bandwidth: Number(band.bandwidth),
|
|
13512
|
+
type: 'centerBandwidth'
|
|
13513
|
+
};
|
|
13355
13514
|
return null;
|
|
13356
13515
|
}, []);
|
|
13357
13516
|
const segmentData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
@@ -13368,40 +13527,10 @@ const FrequencyAllocation_FrequencyAllocation = ()=>{
|
|
|
13368
13527
|
}).filter(Boolean);
|
|
13369
13528
|
const bandPositions = segmentBands.map((e)=>{
|
|
13370
13529
|
const { band, range } = e;
|
|
13371
|
-
const
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
|
|
13375
|
-
const halfBandwidth = range.bandwidth / 2;
|
|
13376
|
-
start = range.frequency - halfBandwidth;
|
|
13377
|
-
stop = range.frequency + halfBandwidth;
|
|
13378
|
-
} else {
|
|
13379
|
-
start = range.start;
|
|
13380
|
-
stop = range.stop;
|
|
13381
|
-
}
|
|
13382
|
-
let startIndex = Math.ceil((start - segment.start) / totalRange * segment.point) - 1;
|
|
13383
|
-
let stopIndex = Math.floor((stop - segment.start) / totalRange * segment.point) - 1;
|
|
13384
|
-
startIndex = Math.max(startIndex, 0);
|
|
13385
|
-
stopIndex = Math.min(stopIndex, segment.point - 1);
|
|
13386
|
-
let bestStartIndex = startIndex;
|
|
13387
|
-
let bestStopIndex = stopIndex;
|
|
13388
|
-
const searchRange = 5;
|
|
13389
|
-
for(let i = Math.max(0, startIndex - searchRange); i <= Math.min(segment.point - 1, startIndex + searchRange); i++){
|
|
13390
|
-
const freq = Number(segment.frequencyCache[i]?.frequency);
|
|
13391
|
-
if (freq >= start) {
|
|
13392
|
-
bestStartIndex = i;
|
|
13393
|
-
break;
|
|
13394
|
-
}
|
|
13395
|
-
}
|
|
13396
|
-
for(let i = Math.max(0, stopIndex - searchRange); i <= Math.min(segment.point - 1, stopIndex + searchRange); i++){
|
|
13397
|
-
const freq = Number(segment.frequencyCache[i]?.frequency);
|
|
13398
|
-
if (freq <= stop) bestStopIndex = i;
|
|
13399
|
-
if (freq > stop) break;
|
|
13400
|
-
}
|
|
13401
|
-
startIndex = Math.max(bestStartIndex, 0);
|
|
13402
|
-
stopIndex = Math.min(bestStopIndex, segment.point - 1);
|
|
13403
|
-
const width = (stopIndex - startIndex + 1) / segment.point * 100;
|
|
13404
|
-
const left = startIndex / segment.point * 100;
|
|
13530
|
+
const { left, width } = (0, utils.rM)({
|
|
13531
|
+
startFreq: range.start,
|
|
13532
|
+
stopFreq: range.stop
|
|
13533
|
+
}, segment);
|
|
13405
13534
|
return {
|
|
13406
13535
|
band,
|
|
13407
13536
|
range,
|
|
@@ -14529,21 +14658,23 @@ injectStylesIntoStyleTag_default()(Scope_styles_module.Z, Scope_styles_module_op
|
|
|
14529
14658
|
const components_Scope_styles_module = Scope_styles_module.Z && Scope_styles_module.Z.locals ? Scope_styles_module.Z.locals : void 0;
|
|
14530
14659
|
const infoSegments2Scope = ({ segments, index, frequency, bandwidth })=>{
|
|
14531
14660
|
const cannot = !frequency || !bandwidth;
|
|
14532
|
-
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
const
|
|
14537
|
-
const
|
|
14538
|
-
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14543
|
-
|
|
14661
|
+
if (cannot || !segments || !segments[index]) return {
|
|
14662
|
+
left: 0,
|
|
14663
|
+
width: 0
|
|
14664
|
+
};
|
|
14665
|
+
const segment = segments[index];
|
|
14666
|
+
const totalSegmentPoints = segments.reduce((sum, s)=>sum + s.point, 0);
|
|
14667
|
+
const { left: segmentLeft, width: segmentWidth } = (0, utils.rM)({
|
|
14668
|
+
startFreq: frequency - bandwidth / 2000,
|
|
14669
|
+
stopFreq: frequency + bandwidth / 2000
|
|
14670
|
+
}, segment);
|
|
14671
|
+
const segmentStartLeft = segments.slice(0, index).reduce((sum, s)=>sum + s.point / totalSegmentPoints * 100, 0);
|
|
14672
|
+
const segmentTotalWidth = segment.point / totalSegmentPoints * 100;
|
|
14673
|
+
const globalLeft = segmentStartLeft + segmentLeft / 100 * segmentTotalWidth;
|
|
14674
|
+
const globalWidth = segmentWidth / 100 * segmentTotalWidth;
|
|
14544
14675
|
return {
|
|
14545
|
-
left,
|
|
14546
|
-
width
|
|
14676
|
+
left: globalLeft,
|
|
14677
|
+
width: globalWidth
|
|
14547
14678
|
};
|
|
14548
14679
|
};
|
|
14549
14680
|
function useScope() {
|
|
@@ -14593,278 +14724,99 @@ Signal_styles_module_options.domAPI = styleDomAPI_default();
|
|
|
14593
14724
|
Signal_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
14594
14725
|
injectStylesIntoStyleTag_default()(Signal_styles_module.Z, Signal_styles_module_options);
|
|
14595
14726
|
const components_Signal_styles_module = Signal_styles_module.Z && Signal_styles_module.Z.locals ? Signal_styles_module.Z.locals : void 0;
|
|
14596
|
-
const SegmentContainer_SegmentContainer = ({ style, signalPositions, currentFrequency, segmentIndex, isCurrentSegment })
|
|
14597
|
-
const isSignalActive = (signalData)=>{
|
|
14598
|
-
if (!isCurrentSegment || !currentFrequency) return false;
|
|
14599
|
-
let startFreq;
|
|
14600
|
-
let stopFreq;
|
|
14601
|
-
if (void 0 !== signalData.startFrequency && void 0 !== signalData.stopFrequency) {
|
|
14602
|
-
startFreq = Number(signalData.startFrequency);
|
|
14603
|
-
stopFreq = Number(signalData.stopFrequency);
|
|
14604
|
-
} else {
|
|
14605
|
-
if (void 0 === signalData.frequency || void 0 === signalData.bandwidth) return false;
|
|
14606
|
-
const centerFreq = Number(signalData.frequency);
|
|
14607
|
-
const bandwidth = Number(signalData.bandwidth) / 1000;
|
|
14608
|
-
startFreq = centerFreq - bandwidth / 2;
|
|
14609
|
-
stopFreq = centerFreq + bandwidth / 2;
|
|
14610
|
-
}
|
|
14611
|
-
return currentFrequency >= startFreq && currentFrequency <= stopFreq;
|
|
14612
|
-
};
|
|
14613
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
14727
|
+
const SegmentContainer_SegmentContainer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(({ style, signalPositions, currentFrequency, segmentIndex, isCurrentSegment, currentPointIndex })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
14614
14728
|
className: components_Signal_styles_module.segmentContainer,
|
|
14615
14729
|
style: style,
|
|
14616
|
-
children: signalPositions.map((position,
|
|
14617
|
-
const
|
|
14618
|
-
|
|
14619
|
-
|
|
14620
|
-
|
|
14621
|
-
|
|
14622
|
-
|
|
14623
|
-
|
|
14624
|
-
|
|
14625
|
-
}
|
|
14626
|
-
}, `${segmentIndex}-${keyValue}`);
|
|
14627
|
-
})
|
|
14628
|
-
});
|
|
14629
|
-
};
|
|
14630
|
-
const Signal_SegmentContainer = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(SegmentContainer_SegmentContainer);
|
|
14631
|
-
const useSignal_useSignal = ()=>{
|
|
14632
|
-
const { state: { signal }, dispatch } = useStore_useStore();
|
|
14633
|
-
const setSignal = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
14634
|
-
const { data } = e;
|
|
14635
|
-
if (data) signal.data = data;
|
|
14636
|
-
dispatch({
|
|
14637
|
-
payload: {
|
|
14638
|
-
signal: {
|
|
14639
|
-
...signal
|
|
14640
|
-
}
|
|
14641
|
-
}
|
|
14642
|
-
});
|
|
14643
|
-
}, [
|
|
14644
|
-
signal
|
|
14645
|
-
]);
|
|
14646
|
-
return setSignal;
|
|
14647
|
-
};
|
|
14648
|
-
const useSignal = useSignal_useSignal;
|
|
14649
|
-
const Signal = ()=>{
|
|
14650
|
-
const { state } = useStore_useStore();
|
|
14651
|
-
const { signal, cursor, segments } = state;
|
|
14652
|
-
const { currentFrequency, currentSegmentIndex } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
14653
|
-
if (!cursor.coord.left || 0 === segments.length) return {
|
|
14654
|
-
currentFrequency: 0,
|
|
14655
|
-
currentSegmentIndex: -1
|
|
14656
|
-
};
|
|
14657
|
-
let accumulatedWidth = 0;
|
|
14658
|
-
let segmentIndex = -1;
|
|
14659
|
-
let frequency = 0;
|
|
14660
|
-
for(let i = 0; i < segments.length; i++){
|
|
14661
|
-
const segment = segments[i];
|
|
14662
|
-
const segmentWidthPercent = 100 * segment.percentage;
|
|
14663
|
-
if (cursor.coord.left >= accumulatedWidth && cursor.coord.left <= accumulatedWidth + segmentWidthPercent) {
|
|
14664
|
-
segmentIndex = i;
|
|
14665
|
-
const relativePosition = (cursor.coord.left - accumulatedWidth) / segmentWidthPercent;
|
|
14666
|
-
frequency = segment.start + (segment.stop - segment.start) * relativePosition;
|
|
14667
|
-
break;
|
|
14668
|
-
}
|
|
14669
|
-
accumulatedWidth += segmentWidthPercent;
|
|
14670
|
-
}
|
|
14671
|
-
return {
|
|
14672
|
-
currentFrequency: frequency,
|
|
14673
|
-
currentSegmentIndex: segmentIndex
|
|
14674
|
-
};
|
|
14675
|
-
}, [
|
|
14676
|
-
cursor.coord.left,
|
|
14677
|
-
segments
|
|
14678
|
-
]);
|
|
14679
|
-
const segmentsData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>segments.map((segment, segmentIndex)=>{
|
|
14680
|
-
const signalPositions = [];
|
|
14681
|
-
signal.data.forEach((signalData)=>{
|
|
14682
|
-
let startFreq;
|
|
14683
|
-
let stopFreq;
|
|
14684
|
-
if (void 0 !== signalData.startFrequency && void 0 !== signalData.stopFrequency) {
|
|
14685
|
-
startFreq = Number(signalData.startFrequency);
|
|
14686
|
-
stopFreq = Number(signalData.stopFrequency);
|
|
14687
|
-
} else {
|
|
14688
|
-
if (void 0 === signalData.frequency || void 0 === signalData.bandwidth) return;
|
|
14689
|
-
const centerFreq = Number(signalData.frequency);
|
|
14690
|
-
const bandwidth = Number(signalData.bandwidth) / 1000;
|
|
14691
|
-
startFreq = centerFreq - bandwidth / 2;
|
|
14692
|
-
stopFreq = centerFreq + bandwidth / 2;
|
|
14693
|
-
}
|
|
14694
|
-
if (stopFreq < segment.start || startFreq > segment.stop) return;
|
|
14695
|
-
const clampedStart = Math.max(startFreq, segment.start);
|
|
14696
|
-
const clampedStop = Math.min(stopFreq, segment.stop);
|
|
14697
|
-
const segmentRange = segment.stop - segment.start;
|
|
14698
|
-
const left = (clampedStart - segment.start) / segmentRange * 100;
|
|
14699
|
-
const width = (clampedStop - clampedStart) / segmentRange * 100;
|
|
14700
|
-
if (width > 0) signalPositions.push({
|
|
14701
|
-
left,
|
|
14702
|
-
width,
|
|
14703
|
-
color: signalData.color || 'var(--theme-color-primary)',
|
|
14704
|
-
data: signalData
|
|
14705
|
-
});
|
|
14730
|
+
children: signalPositions.map(({ item, position, color, tooltip, startIndex, stopIndex })=>{
|
|
14731
|
+
const isActiveByIndex = isCurrentSegment && (0, utils.R1)(currentPointIndex, {
|
|
14732
|
+
startIndex,
|
|
14733
|
+
stopIndex
|
|
14734
|
+
}, utils.ih);
|
|
14735
|
+
let isActiveByFrequency = false;
|
|
14736
|
+
if (isStationInfo(item)) isActiveByFrequency = isCurrentSegment && (0, utils.LB)(currentFrequency, {
|
|
14737
|
+
startFreq: item.startFrequency,
|
|
14738
|
+
stopFreq: item.stopFrequency
|
|
14706
14739
|
});
|
|
14707
|
-
return {
|
|
14708
|
-
segment,
|
|
14709
|
-
segmentIndex,
|
|
14710
|
-
signalPositions,
|
|
14711
|
-
style: {
|
|
14712
|
-
left: `${segment.progress[0]}%`,
|
|
14713
|
-
width: `${100 * segment.percentage}%`
|
|
14714
|
-
}
|
|
14715
|
-
};
|
|
14716
|
-
}), [
|
|
14717
|
-
signal.data,
|
|
14718
|
-
segments
|
|
14719
|
-
]);
|
|
14720
|
-
if (!signal.show || !signal.display) return null;
|
|
14721
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomOffsetContainer, {
|
|
14722
|
-
className: components_Signal_styles_module.signal,
|
|
14723
|
-
children: segmentsData.map((segmentData)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Signal_SegmentContainer, {
|
|
14724
|
-
style: segmentData.style,
|
|
14725
|
-
signalPositions: segmentData.signalPositions,
|
|
14726
|
-
currentFrequency: currentFrequency,
|
|
14727
|
-
segmentIndex: segmentData.segmentIndex,
|
|
14728
|
-
isCurrentSegment: segmentData.segmentIndex === currentSegmentIndex
|
|
14729
|
-
}, segmentData.segmentIndex))
|
|
14730
|
-
});
|
|
14731
|
-
};
|
|
14732
|
-
const components_Signal = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(Signal);
|
|
14733
|
-
var StationAllocation_styles_module = __webpack_require__("../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/StationAllocation/styles.module.less");
|
|
14734
|
-
var StationAllocation_styles_module_options = {};
|
|
14735
|
-
StationAllocation_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
14736
|
-
StationAllocation_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
14737
|
-
StationAllocation_styles_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
14738
|
-
StationAllocation_styles_module_options.domAPI = styleDomAPI_default();
|
|
14739
|
-
StationAllocation_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
14740
|
-
injectStylesIntoStyleTag_default()(StationAllocation_styles_module.Z, StationAllocation_styles_module_options);
|
|
14741
|
-
const components_StationAllocation_styles_module = StationAllocation_styles_module.Z && StationAllocation_styles_module.Z.locals ? StationAllocation_styles_module.Z.locals : void 0;
|
|
14742
|
-
const StationAllocation_SegmentContainer_SegmentContainer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(({ style, stationPositions, currentFrequency, segmentIndex, isCurrentSegment, currentPointIndex })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
14743
|
-
className: components_StationAllocation_styles_module.segmentContainer,
|
|
14744
|
-
style: style,
|
|
14745
|
-
children: stationPositions.map(({ station, position, signalColor, tooltip, startIndex, stopIndex }, index)=>{
|
|
14746
|
-
const TOLERANCE = 2;
|
|
14747
|
-
const rangeStart = currentPointIndex - TOLERANCE;
|
|
14748
|
-
const rangeEnd = currentPointIndex + TOLERANCE;
|
|
14749
|
-
const isActiveByIndex = isCurrentSegment && !(rangeEnd < startIndex || rangeStart > stopIndex);
|
|
14750
|
-
const isActiveByFrequency = isCurrentSegment && currentFrequency >= station.startFrequency && currentFrequency <= station.stopFrequency;
|
|
14751
14740
|
const isActive = isActiveByIndex || isActiveByFrequency;
|
|
14752
|
-
const className = `${
|
|
14741
|
+
const className = `${components_Signal_styles_module.item}${isActive ? ` ${components_Signal_styles_module.active}` : ''}`;
|
|
14742
|
+
let keyValue;
|
|
14743
|
+
keyValue = isStationInfo(item) ? `${item.signalName}-${item.frequency}` : null != item.startFrequency ? `${item.startFrequency}-${item.stopFrequency}` : `${item.frequency}-${item.bandwidth}`;
|
|
14753
14744
|
const itemStyle = {
|
|
14754
14745
|
left: position.left,
|
|
14755
14746
|
width: position.width,
|
|
14756
|
-
|
|
14757
|
-
'--station-bg-color': signalColor
|
|
14758
|
-
}
|
|
14747
|
+
'--station-bg-color': color
|
|
14759
14748
|
};
|
|
14760
14749
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
14761
14750
|
className: className,
|
|
14762
14751
|
style: itemStyle,
|
|
14763
14752
|
title: tooltip
|
|
14764
|
-
}, `segment-${segmentIndex}-
|
|
14753
|
+
}, `segment-${segmentIndex}-signal-${keyValue}`);
|
|
14765
14754
|
})
|
|
14766
14755
|
}));
|
|
14767
|
-
const
|
|
14768
|
-
const
|
|
14769
|
-
const { state: { segments, axisX: { frequencyFormat }, zoom: { style: zoomOffStyle }, cursor: { coord: { left } },
|
|
14770
|
-
const
|
|
14771
|
-
|
|
14756
|
+
const Signal_SegmentContainer = SegmentContainer_SegmentContainer;
|
|
14757
|
+
const Signal = ({ show = true, display = true })=>{
|
|
14758
|
+
const { state: { globalID, segments, axisX: { frequencyFormat }, zoom: { style: zoomOffStyle }, cursor: { coord: { left } }, signal } } = useStore_useStore();
|
|
14759
|
+
const allSignals = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
14760
|
+
if (!signal.show || !signal.display) return [];
|
|
14761
|
+
const stationData = STATION_DATA(globalID);
|
|
14762
|
+
const signalData = signal.data || [];
|
|
14763
|
+
return [
|
|
14764
|
+
...stationData,
|
|
14765
|
+
...signalData
|
|
14766
|
+
];
|
|
14767
|
+
}, [
|
|
14768
|
+
globalID,
|
|
14769
|
+
signal.data,
|
|
14770
|
+
signal.show,
|
|
14771
|
+
signal.display
|
|
14772
|
+
]);
|
|
14773
|
+
const shouldDisplay = signal.show && signal.display && display;
|
|
14772
14774
|
const currentFrequency = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>Number(frequencyFormat(left)), [
|
|
14773
14775
|
left,
|
|
14774
14776
|
frequencyFormat
|
|
14775
14777
|
]);
|
|
14776
|
-
const currentPosition = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>
|
|
14777
|
-
if (!segments?.length) return {
|
|
14778
|
-
segmentIndex: -1,
|
|
14779
|
-
pointIndex: -1
|
|
14780
|
-
};
|
|
14781
|
-
let totalPoints = 0;
|
|
14782
|
-
const totalSegmentPoints = segments.reduce((sum, s)=>sum + s.point, 0);
|
|
14783
|
-
const mousePositionRatio = left / 100;
|
|
14784
|
-
for(let i = 0; i < segments.length; i++){
|
|
14785
|
-
const segmentRatio = segments[i].point / totalSegmentPoints;
|
|
14786
|
-
if (mousePositionRatio >= totalPoints && mousePositionRatio <= totalPoints + segmentRatio) {
|
|
14787
|
-
const relativeRatio = (mousePositionRatio - totalPoints) / segmentRatio;
|
|
14788
|
-
const pointIndex = Math.floor(relativeRatio * segments[i].point);
|
|
14789
|
-
return {
|
|
14790
|
-
segmentIndex: i,
|
|
14791
|
-
pointIndex
|
|
14792
|
-
};
|
|
14793
|
-
}
|
|
14794
|
-
totalPoints += segmentRatio;
|
|
14795
|
-
}
|
|
14796
|
-
return {
|
|
14797
|
-
segmentIndex: -1,
|
|
14798
|
-
pointIndex: -1
|
|
14799
|
-
};
|
|
14800
|
-
}, [
|
|
14778
|
+
const currentPosition = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>(0, utils.hK)(left, segments), [
|
|
14801
14779
|
segments,
|
|
14802
14780
|
left
|
|
14803
14781
|
]);
|
|
14804
14782
|
const segmentData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
14805
|
-
if (!segments?.length
|
|
14783
|
+
if (!segments?.length) return [];
|
|
14806
14784
|
const totalSegmentPoints = segments.reduce((sum, s)=>sum + s.point, 0);
|
|
14807
14785
|
return segments.map((segment, segmentIndex)=>{
|
|
14808
|
-
const
|
|
14809
|
-
const
|
|
14810
|
-
|
|
14811
|
-
const startFreq = station.frequency - yian;
|
|
14812
|
-
const stopFreq = station.frequency + yian;
|
|
14813
|
-
return !(stopFreq < segment.start || startFreq > segment.stop);
|
|
14786
|
+
const segmentSignals = allSignals.filter((item)=>{
|
|
14787
|
+
const range = (0, utils.Ce)(toFrequencyRangeInput(item));
|
|
14788
|
+
return range && (0, utils.nq)(range, segment);
|
|
14814
14789
|
});
|
|
14815
|
-
const
|
|
14816
|
-
const
|
|
14817
|
-
|
|
14818
|
-
const
|
|
14819
|
-
|
|
14820
|
-
|
|
14821
|
-
|
|
14822
|
-
|
|
14823
|
-
|
|
14824
|
-
|
|
14825
|
-
|
|
14826
|
-
|
|
14827
|
-
|
|
14828
|
-
|
|
14829
|
-
|
|
14830
|
-
|
|
14831
|
-
|
|
14832
|
-
|
|
14833
|
-
|
|
14834
|
-
|
|
14835
|
-
for(let i = Math.max(0, stopIndex - searchRange); i <= Math.min(segment.point - 1, stopIndex + searchRange); i++){
|
|
14836
|
-
const freq = Number(segment.frequencyCache[i]?.frequency);
|
|
14837
|
-
if (freq <= stopFreq) bestStopIndex = i;
|
|
14838
|
-
if (freq > stopFreq) break;
|
|
14790
|
+
const signalPositions = segmentSignals.map((item)=>{
|
|
14791
|
+
const range = (0, utils.Ce)(toFrequencyRangeInput(item));
|
|
14792
|
+
if (!range) return null;
|
|
14793
|
+
const { left: leftPos, width: calculatedWidth, startIndex, stopIndex } = (0, utils.rM)(range, segment);
|
|
14794
|
+
let color;
|
|
14795
|
+
let tooltip;
|
|
14796
|
+
if (isStationInfo(item)) {
|
|
14797
|
+
const signalType = item.signalType;
|
|
14798
|
+
const signalTypeInfo = SIGNAL_TYPE_MAP[signalType];
|
|
14799
|
+
color = signalTypeInfo?.color || 'var(--theme-color-primary)';
|
|
14800
|
+
const signalTypeName = signalTypeInfo?.name || item.signalType;
|
|
14801
|
+
tooltip = [
|
|
14802
|
+
item.signalName,
|
|
14803
|
+
`${item.frequency}MHz`,
|
|
14804
|
+
item.orgName && `\u{5355}\u{4F4D}: ${item.orgName}`,
|
|
14805
|
+
signalTypeName && `\u{7C7B}\u{578B}: ${signalTypeName}`
|
|
14806
|
+
].filter(Boolean).join(' | ');
|
|
14807
|
+
} else {
|
|
14808
|
+
color = item.color || 'var(--theme-color-primary)';
|
|
14809
|
+
tooltip = void 0;
|
|
14839
14810
|
}
|
|
14840
|
-
startIndex = Math.max(bestStartIndex, 0);
|
|
14841
|
-
stopIndex = Math.min(bestStopIndex, segment.point - 1);
|
|
14842
|
-
const calculatedWidth = (stopIndex - startIndex + 1) / segment.point * 100;
|
|
14843
|
-
const leftPos = startIndex / segment.point * 100;
|
|
14844
|
-
const signalType = station.signalType;
|
|
14845
|
-
const signalTypeInfo = SIGNAL_TYPE_MAP[signalType];
|
|
14846
|
-
const signalColor = signalTypeInfo?.color;
|
|
14847
|
-
const signalTypeName = signalTypeInfo?.name || station.signalType;
|
|
14848
|
-
const tooltip = [
|
|
14849
|
-
station.signalName,
|
|
14850
|
-
`${station.frequency}MHz`,
|
|
14851
|
-
station.orgName && `\u{5355}\u{4F4D}: ${station.orgName}`,
|
|
14852
|
-
signalTypeName && `\u{7C7B}\u{578B}: ${signalTypeName}`
|
|
14853
|
-
].filter(Boolean).join(' | ');
|
|
14854
14811
|
return {
|
|
14855
|
-
|
|
14856
|
-
...station,
|
|
14857
|
-
startFrequency: startFreq,
|
|
14858
|
-
stopFrequency: stopFreq
|
|
14859
|
-
},
|
|
14812
|
+
item,
|
|
14860
14813
|
position: {
|
|
14861
14814
|
left: `${leftPos}%`,
|
|
14862
14815
|
width: `${calculatedWidth}%`
|
|
14863
14816
|
},
|
|
14864
14817
|
startIndex,
|
|
14865
14818
|
stopIndex,
|
|
14866
|
-
|
|
14867
|
-
signalTypeName,
|
|
14819
|
+
color,
|
|
14868
14820
|
tooltip
|
|
14869
14821
|
};
|
|
14870
14822
|
});
|
|
@@ -14873,7 +14825,7 @@ const StationAllocation_StationAllocation = ({ show = true, display = true })=>{
|
|
|
14873
14825
|
return {
|
|
14874
14826
|
segment,
|
|
14875
14827
|
segmentIndex,
|
|
14876
|
-
|
|
14828
|
+
signalPositions,
|
|
14877
14829
|
style: {
|
|
14878
14830
|
left: `${segmentLeft}%`,
|
|
14879
14831
|
width: `${segmentWidth}%`
|
|
@@ -14882,17 +14834,17 @@ const StationAllocation_StationAllocation = ({ show = true, display = true })=>{
|
|
|
14882
14834
|
});
|
|
14883
14835
|
}, [
|
|
14884
14836
|
segments,
|
|
14885
|
-
|
|
14837
|
+
allSignals
|
|
14886
14838
|
]);
|
|
14887
14839
|
if (!show || !shouldDisplay) return null;
|
|
14888
14840
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
14889
|
-
className:
|
|
14841
|
+
className: components_Signal_styles_module.signal,
|
|
14890
14842
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
14891
|
-
className:
|
|
14843
|
+
className: components_Signal_styles_module.con,
|
|
14892
14844
|
style: zoomOffStyle,
|
|
14893
|
-
children: segmentData.map(({ segmentIndex,
|
|
14845
|
+
children: segmentData.map(({ segmentIndex, signalPositions, style })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Signal_SegmentContainer, {
|
|
14894
14846
|
style: style,
|
|
14895
|
-
|
|
14847
|
+
signalPositions: signalPositions,
|
|
14896
14848
|
currentFrequency: currentFrequency,
|
|
14897
14849
|
segmentIndex: segmentIndex,
|
|
14898
14850
|
isCurrentSegment: currentPosition.segmentIndex === segmentIndex,
|
|
@@ -14901,7 +14853,7 @@ const StationAllocation_StationAllocation = ({ show = true, display = true })=>{
|
|
|
14901
14853
|
})
|
|
14902
14854
|
});
|
|
14903
14855
|
};
|
|
14904
|
-
const
|
|
14856
|
+
const components_Signal = Signal;
|
|
14905
14857
|
var Stripe_styles_module = __webpack_require__("../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/Stripe/styles.module.less");
|
|
14906
14858
|
var Stripe_styles_module_options = {};
|
|
14907
14859
|
Stripe_styles_module_options.styleTagTransform = styleTagTransform_default();
|
|
@@ -15064,7 +15016,6 @@ const Spectrum_Spectrum = (props)=>{
|
|
|
15064
15016
|
});
|
|
15065
15017
|
useZoomEvent(id, constants_ModuleType.Spectrum);
|
|
15066
15018
|
const setBand = useBand();
|
|
15067
|
-
const setSignal = useSignal();
|
|
15068
15019
|
const setScope = useScope();
|
|
15069
15020
|
const setPoints = usePoints();
|
|
15070
15021
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
@@ -15105,9 +15056,6 @@ const Spectrum_Spectrum = (props)=>{
|
|
|
15105
15056
|
case 'band':
|
|
15106
15057
|
setBand(d);
|
|
15107
15058
|
break;
|
|
15108
|
-
case 'signal':
|
|
15109
|
-
setSignal(d);
|
|
15110
|
-
break;
|
|
15111
15059
|
case 'scope':
|
|
15112
15060
|
setScope(d);
|
|
15113
15061
|
break;
|
|
@@ -15145,9 +15093,7 @@ const Spectrum_Spectrum = (props)=>{
|
|
|
15145
15093
|
id: id,
|
|
15146
15094
|
type: constants_ModuleType.Spectrum
|
|
15147
15095
|
}),
|
|
15148
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Signal, {
|
|
15149
|
-
id: id
|
|
15150
|
-
}),
|
|
15096
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Signal, {}),
|
|
15151
15097
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_DragFrame, {
|
|
15152
15098
|
id: id
|
|
15153
15099
|
}),
|
|
@@ -15159,8 +15105,7 @@ const Spectrum_Spectrum = (props)=>{
|
|
|
15159
15105
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyTagLine, {
|
|
15160
15106
|
id: id
|
|
15161
15107
|
}),
|
|
15162
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyAllocation, {})
|
|
15163
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(StationAllocation, {})
|
|
15108
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyAllocation, {})
|
|
15164
15109
|
]
|
|
15165
15110
|
})
|
|
15166
15111
|
]
|
|
@@ -15775,6 +15720,30 @@ const useMarkerPublish_useMarkerPublish = ({ globalID })=>{
|
|
|
15775
15720
|
};
|
|
15776
15721
|
};
|
|
15777
15722
|
const useMarkerPublish = useMarkerPublish_useMarkerPublish;
|
|
15723
|
+
function useSignalDataManager() {
|
|
15724
|
+
const { state, dispatch } = useStore_useStore();
|
|
15725
|
+
const globalID = state.globalID;
|
|
15726
|
+
const updateSignalData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((params)=>{
|
|
15727
|
+
const { type, data } = params;
|
|
15728
|
+
if (!data || !Array.isArray(data) || 0 === data.length) return;
|
|
15729
|
+
if ('station' === type) STATION_DATA(globalID, data);
|
|
15730
|
+
else if ('simple' === type) dispatch({
|
|
15731
|
+
payload: {
|
|
15732
|
+
signal: {
|
|
15733
|
+
...state.signal,
|
|
15734
|
+
data: data
|
|
15735
|
+
}
|
|
15736
|
+
}
|
|
15737
|
+
});
|
|
15738
|
+
}, [
|
|
15739
|
+
dispatch,
|
|
15740
|
+
state.signal,
|
|
15741
|
+
globalID
|
|
15742
|
+
]);
|
|
15743
|
+
return {
|
|
15744
|
+
updateSignalData
|
|
15745
|
+
};
|
|
15746
|
+
}
|
|
15778
15747
|
function useTemplateComparison() {
|
|
15779
15748
|
const { state: { globalID, axisX: { frequencyFormat }, signal: { onChange } } } = useStore_useStore();
|
|
15780
15749
|
const frequencyFormatRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(frequencyFormat);
|
|
@@ -15822,24 +15791,12 @@ function useTemplateComparison() {
|
|
|
15822
15791
|
};
|
|
15823
15792
|
}
|
|
15824
15793
|
function useSpectrumAnalyzer(props) {
|
|
15825
|
-
const { state: { globalID, series: { enableMetrics, enableWaterfall }, fluorescence: { show: enableFluorescence }, axisY: { unit }, zoom: { interval }, heatmapCapture: { display: heatmapCaptureDisplay }, system: { width }
|
|
15794
|
+
const { state: { globalID, series: { enableMetrics, enableWaterfall }, fluorescence: { show: enableFluorescence }, axisY: { unit }, zoom: { interval }, heatmapCapture: { display: heatmapCaptureDisplay }, system: { width } } } = useStore_useStore();
|
|
15826
15795
|
const analyzer = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
15827
15796
|
const globalIDRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(globalID);
|
|
15828
15797
|
const intervalRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(interval);
|
|
15829
15798
|
const totalOccupancyData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(0);
|
|
15830
|
-
const
|
|
15831
|
-
if (!data) return;
|
|
15832
|
-
if (globalIDRef.current) dispatch({
|
|
15833
|
-
payload: {
|
|
15834
|
-
stationInfo: {
|
|
15835
|
-
...stationInfo,
|
|
15836
|
-
data: data
|
|
15837
|
-
}
|
|
15838
|
-
}
|
|
15839
|
-
});
|
|
15840
|
-
}, [
|
|
15841
|
-
stationInfo
|
|
15842
|
-
]);
|
|
15799
|
+
const { updateSignalData } = useSignalDataManager();
|
|
15843
15800
|
const heatmapCaptureDisplayRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(heatmapCaptureDisplay);
|
|
15844
15801
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
15845
15802
|
heatmapCaptureDisplayRef.current = heatmapCaptureDisplay;
|
|
@@ -15951,8 +15908,11 @@ function useSpectrumAnalyzer(props) {
|
|
|
15951
15908
|
case constants_PSType.AntennaFactor:
|
|
15952
15909
|
analyzer.current.setAntennaFactor(e.data);
|
|
15953
15910
|
break;
|
|
15954
|
-
case constants_PSType.
|
|
15955
|
-
|
|
15911
|
+
case constants_PSType.Signal:
|
|
15912
|
+
updateSignalData({
|
|
15913
|
+
type: e.type,
|
|
15914
|
+
data: e.data
|
|
15915
|
+
});
|
|
15956
15916
|
break;
|
|
15957
15917
|
case constants_PSType.Spectrum:
|
|
15958
15918
|
if (e.data) analyzer.current.process(e);
|
|
@@ -15999,7 +15959,7 @@ function useSpectrumAnalyzer(props) {
|
|
|
15999
15959
|
break;
|
|
16000
15960
|
}
|
|
16001
15961
|
}, [
|
|
16002
|
-
|
|
15962
|
+
updateSignalData,
|
|
16003
15963
|
updateSeries,
|
|
16004
15964
|
resetAll
|
|
16005
15965
|
]);
|
|
@@ -16045,6 +16005,7 @@ function useSpectrumChartType({ type, heatmapElementID }) {
|
|
|
16045
16005
|
1
|
|
16046
16006
|
];
|
|
16047
16007
|
axisY.unitDisabled = false;
|
|
16008
|
+
frequencyAllocation.show = false;
|
|
16048
16009
|
}
|
|
16049
16010
|
if (type === constants_ChartType.MScan) {
|
|
16050
16011
|
limit.show = false;
|
|
@@ -16295,7 +16256,7 @@ const Spectrum_Chart_Chart = (props)=>{
|
|
|
16295
16256
|
enableMetrics
|
|
16296
16257
|
}
|
|
16297
16258
|
});
|
|
16298
|
-
const handleSpectrumRule = useSpectrumRule();
|
|
16259
|
+
const handleSpectrumRule = useSpectrumRule(type);
|
|
16299
16260
|
const { handleMarkerPublish } = useMarkerPublish({
|
|
16300
16261
|
globalID
|
|
16301
16262
|
});
|
|
@@ -16357,4 +16318,4 @@ const SpectrumChart = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react
|
|
|
16357
16318
|
});
|
|
16358
16319
|
const lib_Spectrum_Spectrum = withChartPublisher(SpectrumChart, 'Spectrum');
|
|
16359
16320
|
const lib_Spectrum = lib_Spectrum_Spectrum;
|
|
16360
|
-
export { constants_ChartType as ChartType, lib_Dial as Dial, lib_Gauge as Gauge, lib_Heatmap as Heatmap, store_HeatmapCaptureType as HeatmapCaptureType, lib_IQ as IQ, LevelStream, constants_MarkerEventType as MarkerEventType, store_MarkerMode as MarkerMode, lib_Occupancy as Occupancy, constants_OptionKey as OptionKey, constants_PSType as PSType, constants_SegmentsEvent as SegmentsEvent, constants_SeriesType as SeriesType, lib_Spectrum as Spectrum, constants_ToolsBarItemType as ToolsBarItemType, setFrequencyAllocationToCache, useSafePublish };
|
|
16321
|
+
export { constants_ChartType as ChartType, lib_Dial as Dial, lib_Gauge as Gauge, lib_Heatmap as Heatmap, store_HeatmapCaptureType as HeatmapCaptureType, lib_IQ as IQ, LevelStream, constants_MarkerEventType as MarkerEventType, store_MarkerMode as MarkerMode, lib_Occupancy as Occupancy, constants_OptionKey as OptionKey, constants_PSType as PSType, constants_SegmentsEvent as SegmentsEvent, constants_SeriesType as SeriesType, store_SignalDataType as SignalDataType, lib_Spectrum as Spectrum, constants_ToolsBarItemType as ToolsBarItemType, setFrequencyAllocationToCache, useSafePublish };
|