@rfkit/charts 1.2.9 → 1.2.11

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/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/Tooltip/styles.module.less": function(module, __webpack_exports__, __webpack_require__) {
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
- `.tooltip-lMYK0i {
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
- position: fixed;
1597
+ line-height: 1.5;
1460
1598
  }
1461
1599
 
1462
- .tooltip-lMYK0i .title-CqKjMF {
1600
+ .allocationInfo-pYvWX8 .title-Llelns {
1463
1601
  margin-bottom: 4px;
1464
1602
  font-weight: bold;
1465
1603
  }
1466
1604
 
1467
- .tooltip-lMYK0i .frequency-_0M8JT {
1605
+ .allocationInfo-pYvWX8 .frequency-v_Ugpt {
1468
1606
  color: var(--theme-color-primary);
1469
1607
  margin-bottom: 4px;
1470
1608
  }
1471
1609
 
1472
- .tooltip-lMYK0i .description-R2LWD_ {
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
+ }
1625
+ `,
1626
+ ""
1627
+ ]);
1628
+ ___CSS_LOADER_EXPORT___.locals = {
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
+ }
1477
1659
  `,
1478
1660
  ""
1479
1661
  ]);
1480
1662
  ___CSS_LOADER_EXPORT___.locals = {
1481
- tooltip: "tooltip-lMYK0i",
1482
- title: "title-CqKjMF",
1483
- frequency: "frequency-_0M8JT",
1484
- description: "description-R2LWD_"
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
- .StationAllocation-VSm21x .con-oUd5ja {
2800
+ .signal-hEReWZ .con-GoLqQF {
2709
2801
  box-sizing: border-box;
2710
2802
  width: 100%;
2711
2803
  height: 100%;
@@ -2715,25 +2807,23 @@ var __webpack_modules__ = {
2715
2807
  right: 0;
2716
2808
  }
2717
2809
 
2718
- .segmentContainer-gDwnhB {
2810
+ .segmentContainer-P_hPRM {
2719
2811
  box-sizing: border-box;
2720
2812
  height: 100%;
2721
2813
  position: absolute;
2722
2814
  }
2723
2815
 
2724
- .segmentContainer-gDwnhB .item-ybDTIt {
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
- height: 100%;
2821
+ height: 8px;
2730
2822
  color: var(--theme-color-base);
2731
- opacity: .68;
2732
- pointer-events: auto;
2823
+ pointer-events: none;
2733
2824
  justify-content: center;
2734
2825
  align-items: center;
2735
2826
  min-width: 1px;
2736
- height: 8px;
2737
2827
  font-size: 12px;
2738
2828
  display: flex;
2739
2829
  position: absolute;
@@ -2741,40 +2831,71 @@ var __webpack_modules__ = {
2741
2831
  overflow: hidden;
2742
2832
  }
2743
2833
 
2744
- .segmentContainer-gDwnhB .item-ybDTIt:after {
2834
+ .segmentContainer-P_hPRM .item-MCHNyr:after {
2745
2835
  content: "";
2746
- opacity: .32;
2836
+ opacity: .68;
2747
2837
  background: var(--station-bg-color, var(--theme-color-base));
2838
+ pointer-events: none;
2748
2839
  width: 100%;
2840
+ min-width: 1px;
2749
2841
  height: 100%;
2750
2842
  position: absolute;
2751
2843
  top: 0;
2752
2844
  left: 0;
2753
2845
  }
2754
2846
 
2755
- .segmentContainer-gDwnhB .item-ybDTIt.active-qDPFJm {
2847
+ .segmentContainer-P_hPRM .item-MCHNyr.active-zf78pN {
2756
2848
  opacity: 1;
2757
2849
  height: 100%;
2758
2850
  }
2759
2851
 
2760
- .segmentContainer-gDwnhB .item-ybDTIt.active-qDPFJm:after {
2761
- opacity: .68;
2852
+ .segmentContainer-P_hPRM .item-MCHNyr.active-zf78pN:after {
2853
+ opacity: 1;
2762
2854
  background: var(--station-bg-color, var(--theme-color-primary));
2763
2855
  }
2856
+ `,
2857
+ ""
2858
+ ]);
2859
+ ___CSS_LOADER_EXPORT___.locals = {
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
+ }
2764
2886
 
2765
- .segmentContainer-gDwnhB .item-ybDTIt:hover {
2766
- opacity: 1;
2887
+ .square-BrwfUY .squarebox-KQqniE {
2888
+ box-sizing: border-box;
2889
+ justify-content: center;
2890
+ align-items: center;
2891
+ display: flex;
2767
2892
  }
2768
2893
  `,
2769
2894
  ""
2770
2895
  ]);
2771
2896
  ___CSS_LOADER_EXPORT___.locals = {
2772
- StationAllocation: "StationAllocation-VSm21x",
2773
- stationAllocation: "StationAllocation-VSm21x",
2774
- con: "con-oUd5ja",
2775
- segmentContainer: "segmentContainer-gDwnhB",
2776
- item: "item-ybDTIt",
2777
- active: "active-qDPFJm"
2897
+ square: "square-BrwfUY",
2898
+ squarebox: "squarebox-KQqniE"
2778
2899
  };
2779
2900
  const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
2780
2901
  },
@@ -3554,7 +3675,7 @@ function __webpack_require__(moduleId) {
3554
3675
  __webpack_require__.nc = void 0;
3555
3676
  })();
3556
3677
  const STORAGE_KEY = 'rfkit-charts-frequency-allocation';
3557
- const getFrequencyAllocationFromCache = ()=>{
3678
+ const tools_getFrequencyAllocationFromCache = ()=>{
3558
3679
  const cached = localStorage.getItem(STORAGE_KEY);
3559
3680
  if (!cached) return null;
3560
3681
  const data = JSON.parse(cached);
@@ -3763,7 +3884,7 @@ var constants_ModuleType = /*#__PURE__*/ function(ModuleType) {
3763
3884
  var constants_PSType = /*#__PURE__*/ function(PSType) {
3764
3885
  PSType["Spectrum"] = "spectrum";
3765
3886
  PSType["AntennaFactor"] = "antennaFactor";
3766
- PSType["StationInfo"] = "stationInfo";
3887
+ PSType["Signal"] = "signal";
3767
3888
  PSType["Occupancy"] = "occupancy";
3768
3889
  PSType["LevelStream"] = "levelStream";
3769
3890
  PSType["Heatmap"] = "heatmap";
@@ -4014,6 +4135,11 @@ var store_HeatmapCaptureType = /*#__PURE__*/ function(HeatmapCaptureType) {
4014
4135
  HeatmapCaptureType["RowIndex"] = "rowIndex";
4015
4136
  return HeatmapCaptureType;
4016
4137
  }({});
4138
+ var store_SignalDataType = /*#__PURE__*/ function(SignalDataType) {
4139
+ SignalDataType["Station"] = "station";
4140
+ SignalDataType["Simple"] = "simple";
4141
+ return SignalDataType;
4142
+ }({});
4017
4143
  const restrictList = {
4018
4144
  dBm: [
4019
4145
  -300,
@@ -4222,10 +4348,6 @@ function defaultState_createParams() {
4222
4348
  cacheTime: 20000,
4223
4349
  granularity: 1
4224
4350
  },
4225
- stationInfo: {
4226
- show: true,
4227
- data: []
4228
- },
4229
4351
  fluorescence: {
4230
4352
  show: false,
4231
4353
  display: false
@@ -4392,8 +4514,7 @@ const Params_Params = (props)=>{
4392
4514
  'gauge',
4393
4515
  'band',
4394
4516
  'levelStream',
4395
- 'onChannelChange',
4396
- 'stationInfo'
4517
+ 'onChannelChange'
4397
4518
  ];
4398
4519
  paramNames.forEach((name)=>{
4399
4520
  useParamEffect(name, props[name], state, dispatch);
@@ -4489,7 +4610,8 @@ const Store = (props)=>{
4489
4610
  state,
4490
4611
  dispatch
4491
4612
  }), [
4492
- state
4613
+ state,
4614
+ dispatch
4493
4615
  ]);
4494
4616
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(store_context.Provider, {
4495
4617
  value: value,
@@ -7437,6 +7559,90 @@ const ZoomOffsetContainer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.
7437
7559
  });
7438
7560
  });
7439
7561
  const Zoom_ZoomOffsetContainer = ZoomOffsetContainer;
7562
+ const tools_STORAGE_KEY = 'rfkit-charts-stationData';
7563
+ function getStationDataFromStorage() {
7564
+ try {
7565
+ const stored = localStorage.getItem(tools_STORAGE_KEY);
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(data) {
7573
+ try {
7574
+ localStorage.setItem(tools_STORAGE_KEY, 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(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();
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
+ }
7440
7646
  const events_SeriesEventName = {
7441
7647
  UPDATED: 'series:updated',
7442
7648
  ADDED: 'series:added',
@@ -7824,7 +8030,7 @@ function getStableOrder(globalID, currentNames) {
7824
8030
  }
7825
8031
  return stored;
7826
8032
  }
7827
- function useFilteredSeries(globalID, filter) {
8033
+ function useFilteredSeries_useFilteredSeries(globalID, filter) {
7828
8034
  const { series } = useSeriesManager(globalID);
7829
8035
  const { state: { series: { legendExternal } } } = useStore_useStore();
7830
8036
  const filteredData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
@@ -7965,13 +8171,13 @@ FrequencyDataBoard_styles_module_options.domAPI = styleDomAPI_default();
7965
8171
  FrequencyDataBoard_styles_module_options.insertStyleElement = insertStyleElement_default();
7966
8172
  injectStylesIntoStyleTag_default()(FrequencyDataBoard_styles_module.Z, FrequencyDataBoard_styles_module_options);
7967
8173
  const components_FrequencyDataBoard_styles_module = FrequencyDataBoard_styles_module.Z && FrequencyDataBoard_styles_module.Z.locals ? FrequencyDataBoard_styles_module.Z.locals : void 0;
7968
- const FrequencyDataBoard = ({ left, updateKey, onChange })=>{
7969
- const { state: { axisY, axisX: { frequencyFormat, unit }, globalID, stationInfo } } = useStore_useStore();
7970
- const filteredSeries = useFilteredSeries(globalID);
8174
+ const FrequencyDataBoard_FrequencyDataBoard = ({ left, updateKey, onChange })=>{
8175
+ const { state: { axisY, axisX: { frequencyFormat, unit }, globalID } } = useStore_useStore();
8176
+ const filteredSeries = useFilteredSeries_useFilteredSeries(globalID);
7971
8177
  const index = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(Number.NaN);
7972
8178
  const calculateIndex = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((data, n, series)=>{
7973
8179
  const values = data[n] || [];
7974
- if (0 === values.length) return null;
8180
+ if (!values || 0 === values.length) return null;
7975
8181
  index.current = Math.max(0, Math.ceil(values.length * left / 100) - 1);
7976
8182
  const level = getVirtualLevel(axisY.unit, values[index.current])?.toFixed(1);
7977
8183
  if (!(0, utils.Ri)(level)) return null;
@@ -8040,22 +8246,9 @@ const FrequencyDataBoard = ({ left, updateKey, onChange })=>{
8040
8246
  frequency,
8041
8247
  onChange
8042
8248
  ]);
8043
- const sf = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
8044
- if (left && stationInfo.data.length > 0) {
8045
- const f = Number(frequency);
8046
- const item = stationInfo.data.find((i)=>{
8047
- const yian = i.bandwidth / 2 / 1000;
8048
- const startFrequency = i.frequency - yian;
8049
- const endFrequency = i.frequency + yian;
8050
- return f >= startFrequency && f <= endFrequency;
8051
- });
8052
- return item;
8053
- }
8054
- return '';
8055
- }, [
8056
- frequency,
8057
- stationInfo
8058
- ]);
8249
+ const matchedStation = useStationFinder({
8250
+ frequency
8251
+ });
8059
8252
  const hasValue = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>value && (Array.isArray(value) ? value.length > 0 : true), [
8060
8253
  value
8061
8254
  ]);
@@ -8072,12 +8265,12 @@ const FrequencyDataBoard = ({ left, updateKey, onChange })=>{
8072
8265
  }),
8073
8266
  value,
8074
8267
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(StationInfo, {
8075
- stationInfo: sf
8268
+ stationInfo: matchedStation
8076
8269
  })
8077
8270
  ]
8078
8271
  });
8079
8272
  };
8080
- const components_FrequencyDataBoard = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(FrequencyDataBoard);
8273
+ const FrequencyDataBoard = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(FrequencyDataBoard_FrequencyDataBoard);
8081
8274
  const useUpdateKey = (key, id)=>{
8082
8275
  const [updateKey, setUpdateKey] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(0);
8083
8276
  (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
@@ -8100,7 +8293,7 @@ const FrequencyDisplay = ({ frequency, unit })=>frequency ? /*#__PURE__*/ (0, __
8100
8293
  const SpectrumPopover = ({ id })=>{
8101
8294
  const { state: { cursor: { coord: { left } } } } = useStore_useStore();
8102
8295
  const updateKey = useUpdateKey('SpectrumPopover', id);
8103
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_FrequencyDataBoard, {
8296
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyDataBoard, {
8104
8297
  left: left,
8105
8298
  updateKey: updateKey
8106
8299
  });
@@ -8668,7 +8861,7 @@ Area_styles_module_options.insertStyleElement = insertStyleElement_default();
8668
8861
  injectStylesIntoStyleTag_default()(Area_styles_module.Z, Area_styles_module_options);
8669
8862
  const HeatmapCapture_Area_styles_module = Area_styles_module.Z && Area_styles_module.Z.locals ? Area_styles_module.Z.locals : void 0;
8670
8863
  const Area_COMPONENT_KEY = constants_ToolType.HeatmapCapture;
8671
- const Area_Area = (props)=>{
8864
+ const Area = (props)=>{
8672
8865
  const { state: { heatmapCapture, segments, axisX: { frequencyFormat, unit }, system, globalID } } = useStore_useStore();
8673
8866
  const { id } = props;
8674
8867
  const { type, show, sync, onChange } = heatmapCapture;
@@ -8835,7 +9028,7 @@ const Area_Area = (props)=>{
8835
9028
  ]
8836
9029
  });
8837
9030
  };
8838
- const Area = Area_Area;
9031
+ const HeatmapCapture_Area = Area;
8839
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");
8840
9033
  var RowIndex_styles_module_options = {};
8841
9034
  RowIndex_styles_module_options.styleTagTransform = styleTagTransform_default();
@@ -9219,7 +9412,7 @@ const HeatmapCapture_HeatmapCapture = (props)=>{
9219
9412
  ...props
9220
9413
  }) : type === store_HeatmapCaptureType.RowIndex ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(HeatmapCapture_RowIndex, {
9221
9414
  ...props
9222
- }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Area, {
9415
+ }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(HeatmapCapture_Area, {
9223
9416
  ...props
9224
9417
  });
9225
9418
  };
@@ -10952,69 +11145,38 @@ const Markers_Switch_Switch = ()=>{
10952
11145
  const Markers_Switch = Markers_Switch_Switch;
10953
11146
  const Signal_Switch_Switch = ()=>{
10954
11147
  const { state: { signal }, dispatch } = useStore_useStore();
10955
- const { display, show } = signal;
10956
- const setActive = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
11148
+ const isActive = signal.display;
11149
+ const shouldShow = signal.show;
11150
+ const setActive = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((active)=>{
10957
11151
  dispatch({
10958
11152
  payload: {
10959
11153
  signal: {
10960
11154
  ...signal,
10961
- display: !!e
11155
+ display: active
10962
11156
  }
10963
11157
  }
10964
11158
  });
10965
11159
  }, [
10966
- signal
10967
- ]);
10968
- if (!show) return null;
10969
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToolsBar_IconBox, {
10970
- onClick: ()=>{
10971
- setActive(!display);
10972
- },
10973
- title: `\u{4FE1}\u{53F7}\u{6807}\u{6CE8}-${!display ? "\u5DF2\u9690\u85CF" : "\u5DF2\u663E\u793A"}`,
10974
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", {
10975
- viewBox: "0 0 1024 1024",
10976
- xmlns: "http://www.w3.org/2000/svg",
10977
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
10978
- fill: display ? 'var(--theme-color-primary)' : 'var(--theme-color-base)',
10979
- d: "M144 768v64H64v-64h80m64-64H0v192h208V704zM416 576v256h-80V576h80m64-64H272v384h208V512zM688 352v480h-80V352h80m64-64H544v608h208V288zM960 192v640h-80V192h80m64-64H816v768h208V128z"
10980
- })
10981
- })
10982
- });
10983
- };
10984
- const Signal_Switch = Signal_Switch_Switch;
10985
- const StationAllocationSwitch = ()=>{
10986
- const { state: { stationInfo }, dispatch } = useStore_useStore();
10987
- const { show } = stationInfo;
10988
- const setActive = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
10989
- dispatch({
10990
- payload: {
10991
- stationInfo: {
10992
- ...stationInfo,
10993
- show: !!e
10994
- }
10995
- }
10996
- });
10997
- }, [
10998
- stationInfo,
11160
+ signal,
10999
11161
  dispatch
11000
11162
  ]);
11163
+ if (!shouldShow) return null;
11001
11164
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToolsBar_IconBox, {
11002
11165
  onClick: ()=>{
11003
- setActive(!show);
11166
+ setActive(!isActive);
11004
11167
  },
11005
- title: `\u{4FE1}\u{53F7}\u{6807}\u{6CE8}-\u{5DF2}${show ? "\u663E\u793A" : "\u9690\u85CF"}`,
11168
+ title: `\u{4FE1}\u{53F7}\u{6807}\u{6CE8}-\u{5DF2}${isActive ? "\u663E\u793A" : "\u9690\u85CF"}`,
11006
11169
  children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", {
11007
11170
  viewBox: "0 0 1024 1024",
11008
11171
  xmlns: "http://www.w3.org/2000/svg",
11009
11172
  children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
11010
- fill: show ? 'var(--theme-color-primary)' : 'var(--theme-color-base)',
11011
- 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",
11012
- "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"
11013
11175
  })
11014
11176
  })
11015
11177
  });
11016
11178
  };
11017
- const StationAllocation_Switch = StationAllocationSwitch;
11179
+ const Signal_Switch = Signal_Switch_Switch;
11018
11180
  const MIN_TIME = 500;
11019
11181
  const MAX_TIME = 5000;
11020
11182
  const STEP = 100;
@@ -11312,7 +11474,7 @@ function useSegments() {
11312
11474
  ];
11313
11475
  }
11314
11476
  const SET_SEGMENTS_DISPLAY = (globalID, func)=>subscription_createSubscriptionManager(`SET_SEGMENTS_DISPLAY-${globalID}`, '0', func);
11315
- function useSpectrumRule() {
11477
+ function useSpectrumRule(type) {
11316
11478
  const { state: { zoom, globalID }, dispatch } = useStore_useStore();
11317
11479
  const [segments, setSegments] = useSegments();
11318
11480
  const updateSegments = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
@@ -11392,9 +11554,12 @@ function useSpectrumRule() {
11392
11554
  if (newPoints && newPoints !== pointsRef.current) {
11393
11555
  pointsRef.current = newPoints;
11394
11556
  generateSegmentsFromPoints(newPoints);
11557
+ if (type === constants_ChartType.LiteNormalized) setSegments((0, utils.uq)(newPoints));
11395
11558
  }
11396
11559
  }, [
11397
- generateSegmentsFromPoints
11560
+ generateSegmentsFromPoints,
11561
+ setSegments,
11562
+ type
11398
11563
  ]);
11399
11564
  useChannel();
11400
11565
  const handleSpectrumRule = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
@@ -11591,7 +11756,7 @@ injectStylesIntoStyleTag_default()(SeriesDisplayControl_styles_module.Z, SeriesD
11591
11756
  const ToolsBar_SeriesDisplayControl_styles_module = SeriesDisplayControl_styles_module.Z && SeriesDisplayControl_styles_module.Z.locals ? SeriesDisplayControl_styles_module.Z.locals : void 0;
11592
11757
  const SeriesDisplayControl = ()=>{
11593
11758
  const { state: { globalID, series: seriesConfig } } = useStore_useStore();
11594
- const filteredSeries = useFilteredSeries(globalID);
11759
+ const filteredSeries = useFilteredSeries_useFilteredSeries(globalID);
11595
11760
  const { forceUpdate } = useSeriesForComponent(globalID);
11596
11761
  (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
11597
11762
  if (!globalID || !seriesConfig?.forceDisplay) return;
@@ -11770,7 +11935,7 @@ const TOOL_CONFIGS = [
11770
11935
  ]
11771
11936
  },
11772
11937
  {
11773
- component: StationAllocation_Switch,
11938
+ component: Signal_Switch,
11774
11939
  toolType: constants_ToolsBarItemType.StationAllocationSwitch,
11775
11940
  supportedCharts: [
11776
11941
  constants_ChartType.SingleFrequency,
@@ -11800,21 +11965,14 @@ const TOOL_CONFIGS = [
11800
11965
  constants_ChartType.LiteNormalized
11801
11966
  ]
11802
11967
  },
11803
- {
11804
- component: Signal_Switch,
11805
- toolType: constants_ToolsBarItemType.SignalSwitch,
11806
- supportedCharts: [
11807
- constants_ChartType.SingleFrequency,
11808
- constants_ChartType.Scan
11809
- ]
11810
- },
11811
11968
  {
11812
11969
  component: Zoom_Switch,
11813
11970
  toolType: constants_ToolsBarItemType.ZoomSwitch,
11814
11971
  supportedCharts: [
11815
11972
  constants_ChartType.SingleFrequency,
11816
11973
  constants_ChartType.Scan,
11817
- constants_ChartType.MScan
11974
+ constants_ChartType.MScan,
11975
+ constants_ChartType.LiteNormalized
11818
11976
  ]
11819
11977
  },
11820
11978
  {
@@ -12601,6 +12759,74 @@ const DragFrame = ({ id })=>{
12601
12759
  });
12602
12760
  };
12603
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);
12604
12830
  const originalColors = [
12605
12831
  '#B22222',
12606
12832
  '#CD5C5C',
@@ -12685,7 +12911,7 @@ const sortedColors = [
12685
12911
  if (Math.abs(a.hsl.h - b.hsl.h) > 10) return a.hsl.h - b.hsl.h;
12686
12912
  return a.hsl.l - b.hsl.l;
12687
12913
  }).map((item)=>item.color);
12688
- function sortAndRecolorFrequencyAllocationData(data) {
12914
+ function color_sortAndRecolorFrequencyAllocationData(data) {
12689
12915
  const sortedData = [
12690
12916
  ...data
12691
12917
  ].sort((a, b)=>Number(a.startFrequency) - Number(b.startFrequency));
@@ -13230,51 +13456,33 @@ const FrequencyAllocation_Tooltip_Tooltip = ({ title, description, visible, x, y
13230
13456
  visible
13231
13457
  ]);
13232
13458
  if (!visible) return null;
13233
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
13459
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
13234
13460
  ref: tooltipRef,
13235
13461
  className: components_FrequencyAllocation_Tooltip_styles_module.tooltip,
13236
13462
  style: {
13237
13463
  left: position.x,
13238
13464
  top: position.y
13239
13465
  },
13240
- children: [
13241
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
13242
- className: components_FrequencyAllocation_Tooltip_styles_module.title,
13243
- children: title
13244
- }),
13245
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
13246
- className: components_FrequencyAllocation_Tooltip_styles_module.frequency,
13247
- children: [
13248
- startFrequency && stopFrequency && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
13249
- children: `\u{9891}\u{7387}\u{8303}\u{56F4}: ${startFrequency} - ${stopFrequency}`
13250
- }),
13251
- centerFrequency && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
13252
- children: `\u{4E2D}\u{5FC3}\u{9891}\u{7387}: ${centerFrequency} MHz`
13253
- }),
13254
- stepFrequency && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
13255
- children: `\u{6B65}\u{8FDB}: ${stepFrequency} kHz`
13256
- }),
13257
- bandwidth && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
13258
- children: `\u{5E26}\u{5BBD}: ${bandwidth} MHz`
13259
- }),
13260
- modulation && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
13261
- children: `\u{8C03}\u{5236}\u{65B9}\u{5F0F}: ${modulation}`
13262
- })
13263
- ]
13264
- }),
13265
- description && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
13266
- className: components_FrequencyAllocation_Tooltip_styles_module.description,
13267
- children: description
13268
- })
13269
- ]
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
+ })
13270
13478
  });
13271
13479
  };
13272
13480
  const FrequencyAllocation_Tooltip = FrequencyAllocation_Tooltip_Tooltip;
13273
13481
  const FrequencyAllocation_FrequencyAllocation = ()=>{
13274
13482
  const { state: { axisX: { unit }, segments, frequencyAllocation: { display, show, data }, zoom: { style: zoomOffStyle } } } = useStore_useStore();
13275
13483
  const frequencyAllocationData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
13276
- const cachedData = getFrequencyAllocationFromCache();
13277
- return sortAndRecolorFrequencyAllocationData(cachedData?.length > 0 ? cachedData : data?.length > 0 ? data : FrequencyAllocation_data);
13484
+ const cachedData = tools_getFrequencyAllocationFromCache();
13485
+ return color_sortAndRecolorFrequencyAllocationData(cachedData?.length > 0 ? cachedData : data?.length > 0 ? data : FrequencyAllocation_data);
13278
13486
  }, [
13279
13487
  data
13280
13488
  ]);
@@ -13284,24 +13492,25 @@ const FrequencyAllocation_FrequencyAllocation = ()=>{
13284
13492
  y: 0
13285
13493
  });
13286
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;
13287
13502
  if (null != band.startFrequency && null != band.stopFrequency) return {
13288
- start: Number(band.startFrequency),
13289
- stop: Number(band.stopFrequency),
13503
+ start: range.startFreq,
13504
+ stop: range.stopFreq,
13290
13505
  type: 'range'
13291
13506
  };
13292
- if (null != band.centerFrequency && null != band.bandwidth) {
13293
- const [segment] = (0, utils.IS)({
13294
- frequency: band.centerFrequency,
13295
- bandwidth: band.bandwidth
13296
- });
13297
- return {
13298
- start: segment.start,
13299
- stop: segment.stop,
13300
- frequency: Number(band.centerFrequency),
13301
- bandwidth: Number(band.bandwidth),
13302
- type: 'centerBandwidth'
13303
- };
13304
- }
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
+ };
13305
13514
  return null;
13306
13515
  }, []);
13307
13516
  const segmentData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
@@ -13318,40 +13527,10 @@ const FrequencyAllocation_FrequencyAllocation = ()=>{
13318
13527
  }).filter(Boolean);
13319
13528
  const bandPositions = segmentBands.map((e)=>{
13320
13529
  const { band, range } = e;
13321
- const totalRange = segment.stop - segment.start;
13322
- let start = 0;
13323
- let stop = 0;
13324
- if ('centerBandwidth' === range.type && null != range.frequency && null != range.bandwidth) {
13325
- const halfBandwidth = range.bandwidth / 2;
13326
- start = range.frequency - halfBandwidth;
13327
- stop = range.frequency + halfBandwidth;
13328
- } else {
13329
- start = range.start;
13330
- stop = range.stop;
13331
- }
13332
- let startIndex = Math.ceil((start - segment.start) / totalRange * segment.point) - 1;
13333
- let stopIndex = Math.floor((stop - segment.start) / totalRange * segment.point) - 1;
13334
- startIndex = Math.max(startIndex, 0);
13335
- stopIndex = Math.min(stopIndex, segment.point - 1);
13336
- let bestStartIndex = startIndex;
13337
- let bestStopIndex = stopIndex;
13338
- const searchRange = 5;
13339
- for(let i = Math.max(0, startIndex - searchRange); i <= Math.min(segment.point - 1, startIndex + searchRange); i++){
13340
- const freq = Number(segment.frequencyCache[i]?.frequency);
13341
- if (freq >= start) {
13342
- bestStartIndex = i;
13343
- break;
13344
- }
13345
- }
13346
- for(let i = Math.max(0, stopIndex - searchRange); i <= Math.min(segment.point - 1, stopIndex + searchRange); i++){
13347
- const freq = Number(segment.frequencyCache[i]?.frequency);
13348
- if (freq <= stop) bestStopIndex = i;
13349
- if (freq > stop) break;
13350
- }
13351
- startIndex = Math.max(bestStartIndex, 0);
13352
- stopIndex = Math.min(bestStopIndex, segment.point - 1);
13353
- const width = (stopIndex - startIndex + 1) / segment.point * 100;
13354
- const left = startIndex / segment.point * 100;
13530
+ const { left, width } = (0, utils.rM)({
13531
+ startFreq: range.start,
13532
+ stopFreq: range.stop
13533
+ }, segment);
13355
13534
  return {
13356
13535
  band,
13357
13536
  range,
@@ -13475,7 +13654,7 @@ const Board_Board = ({ id })=>{
13475
13654
  if (!show || !display) return null;
13476
13655
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
13477
13656
  className: FrequencyTagLine_Board_styles_module.board,
13478
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_FrequencyDataBoard, {
13657
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyDataBoard, {
13479
13658
  left: left,
13480
13659
  updateKey: updateKey,
13481
13660
  onChange: handleChange
@@ -14479,21 +14658,23 @@ injectStylesIntoStyleTag_default()(Scope_styles_module.Z, Scope_styles_module_op
14479
14658
  const components_Scope_styles_module = Scope_styles_module.Z && Scope_styles_module.Z.locals ? Scope_styles_module.Z.locals : void 0;
14480
14659
  const infoSegments2Scope = ({ segments, index, frequency, bandwidth })=>{
14481
14660
  const cannot = !frequency || !bandwidth;
14482
- let left = 0;
14483
- let width = 0;
14484
- const { totalPoints } = segments;
14485
- const { start, stop, point } = segments[index] || {};
14486
- const half = bandwidth / 2000;
14487
- const s1 = frequency - half;
14488
- if (!cannot) {
14489
- const ratio = 100 * point / totalPoints;
14490
- const thisWidth = stop - start;
14491
- left = (s1 - start) * ratio / thisWidth;
14492
- width = 2 * half * ratio / thisWidth;
14493
- }
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;
14494
14675
  return {
14495
- left,
14496
- width
14676
+ left: globalLeft,
14677
+ width: globalWidth
14497
14678
  };
14498
14679
  };
14499
14680
  function useScope() {
@@ -14543,291 +14724,108 @@ Signal_styles_module_options.domAPI = styleDomAPI_default();
14543
14724
  Signal_styles_module_options.insertStyleElement = insertStyleElement_default();
14544
14725
  injectStylesIntoStyleTag_default()(Signal_styles_module.Z, Signal_styles_module_options);
14545
14726
  const components_Signal_styles_module = Signal_styles_module.Z && Signal_styles_module.Z.locals ? Signal_styles_module.Z.locals : void 0;
14546
- const SegmentContainer_SegmentContainer = ({ style, signalPositions, currentFrequency, segmentIndex, isCurrentSegment })=>{
14547
- const isSignalActive = (signalData)=>{
14548
- if (!isCurrentSegment || !currentFrequency) return false;
14549
- let startFreq;
14550
- let stopFreq;
14551
- if (void 0 !== signalData.startFrequency && void 0 !== signalData.stopFrequency) {
14552
- startFreq = Number(signalData.startFrequency);
14553
- stopFreq = Number(signalData.stopFrequency);
14554
- } else {
14555
- if (void 0 === signalData.frequency || void 0 === signalData.bandwidth) return false;
14556
- const centerFreq = Number(signalData.frequency);
14557
- const bandwidth = Number(signalData.bandwidth) / 1000;
14558
- startFreq = centerFreq - bandwidth / 2;
14559
- stopFreq = centerFreq + bandwidth / 2;
14560
- }
14561
- return currentFrequency >= startFreq && currentFrequency <= stopFreq;
14562
- };
14563
- 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", {
14564
14728
  className: components_Signal_styles_module.segmentContainer,
14565
14729
  style: style,
14566
- children: signalPositions.map((position, index)=>{
14567
- const isActive = isSignalActive(position.data);
14568
- const keyValue = position.data.frequency || `${position.data.startFrequency}-${position.data.stopFrequency}` || `signal-${index}`;
14569
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
14570
- className: `${components_Signal_styles_module.signalItem} ${isActive ? components_Signal_styles_module.active : ''}`,
14571
- style: {
14572
- left: `${position.left}%`,
14573
- width: `${position.width}%`,
14574
- backgroundColor: position.color
14575
- }
14576
- }, `${segmentIndex}-${keyValue}`);
14577
- })
14578
- });
14579
- };
14580
- const Signal_SegmentContainer = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(SegmentContainer_SegmentContainer);
14581
- const useSignal_useSignal = ()=>{
14582
- const { state: { signal }, dispatch } = useStore_useStore();
14583
- const setSignal = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
14584
- const { data } = e;
14585
- if (data) signal.data = data;
14586
- dispatch({
14587
- payload: {
14588
- signal: {
14589
- ...signal
14590
- }
14591
- }
14592
- });
14593
- }, [
14594
- signal
14595
- ]);
14596
- return setSignal;
14597
- };
14598
- const useSignal = useSignal_useSignal;
14599
- const Signal = ()=>{
14600
- const { state } = useStore_useStore();
14601
- const { signal, cursor, segments } = state;
14602
- const { currentFrequency, currentSegmentIndex } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
14603
- if (!cursor.coord.left || 0 === segments.length) return {
14604
- currentFrequency: 0,
14605
- currentSegmentIndex: -1
14606
- };
14607
- let accumulatedWidth = 0;
14608
- let segmentIndex = -1;
14609
- let frequency = 0;
14610
- for(let i = 0; i < segments.length; i++){
14611
- const segment = segments[i];
14612
- const segmentWidthPercent = 100 * segment.percentage;
14613
- if (cursor.coord.left >= accumulatedWidth && cursor.coord.left <= accumulatedWidth + segmentWidthPercent) {
14614
- segmentIndex = i;
14615
- const relativePosition = (cursor.coord.left - accumulatedWidth) / segmentWidthPercent;
14616
- frequency = segment.start + (segment.stop - segment.start) * relativePosition;
14617
- break;
14618
- }
14619
- accumulatedWidth += segmentWidthPercent;
14620
- }
14621
- return {
14622
- currentFrequency: frequency,
14623
- currentSegmentIndex: segmentIndex
14624
- };
14625
- }, [
14626
- cursor.coord.left,
14627
- segments
14628
- ]);
14629
- const segmentsData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>segments.map((segment, segmentIndex)=>{
14630
- const signalPositions = [];
14631
- signal.data.forEach((signalData)=>{
14632
- let startFreq;
14633
- let stopFreq;
14634
- if (void 0 !== signalData.startFrequency && void 0 !== signalData.stopFrequency) {
14635
- startFreq = Number(signalData.startFrequency);
14636
- stopFreq = Number(signalData.stopFrequency);
14637
- } else {
14638
- if (void 0 === signalData.frequency || void 0 === signalData.bandwidth) return;
14639
- const centerFreq = Number(signalData.frequency);
14640
- const bandwidth = Number(signalData.bandwidth) / 1000;
14641
- startFreq = centerFreq - bandwidth / 2;
14642
- stopFreq = centerFreq + bandwidth / 2;
14643
- }
14644
- if (stopFreq < segment.start || startFreq > segment.stop) return;
14645
- const clampedStart = Math.max(startFreq, segment.start);
14646
- const clampedStop = Math.min(stopFreq, segment.stop);
14647
- const segmentRange = segment.stop - segment.start;
14648
- const left = (clampedStart - segment.start) / segmentRange * 100;
14649
- const width = (clampedStop - clampedStart) / segmentRange * 100;
14650
- if (width > 0) signalPositions.push({
14651
- left,
14652
- width,
14653
- color: signalData.color || 'var(--theme-color-primary)',
14654
- data: signalData
14655
- });
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
14656
14739
  });
14657
- return {
14658
- segment,
14659
- segmentIndex,
14660
- signalPositions,
14661
- style: {
14662
- left: `${segment.progress[0]}%`,
14663
- width: `${100 * segment.percentage}%`
14664
- }
14665
- };
14666
- }), [
14667
- signal.data,
14668
- segments
14669
- ]);
14670
- if (!signal.show || !signal.display) return null;
14671
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomOffsetContainer, {
14672
- className: components_Signal_styles_module.signal,
14673
- children: segmentsData.map((segmentData)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Signal_SegmentContainer, {
14674
- style: segmentData.style,
14675
- signalPositions: segmentData.signalPositions,
14676
- currentFrequency: currentFrequency,
14677
- segmentIndex: segmentData.segmentIndex,
14678
- isCurrentSegment: segmentData.segmentIndex === currentSegmentIndex
14679
- }, segmentData.segmentIndex))
14680
- });
14681
- };
14682
- const components_Signal = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(Signal);
14683
- 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");
14684
- var StationAllocation_styles_module_options = {};
14685
- StationAllocation_styles_module_options.styleTagTransform = styleTagTransform_default();
14686
- StationAllocation_styles_module_options.setAttributes = setAttributesWithoutAttributes_default();
14687
- StationAllocation_styles_module_options.insert = insertBySelector_default().bind(null, "head");
14688
- StationAllocation_styles_module_options.domAPI = styleDomAPI_default();
14689
- StationAllocation_styles_module_options.insertStyleElement = insertStyleElement_default();
14690
- injectStylesIntoStyleTag_default()(StationAllocation_styles_module.Z, StationAllocation_styles_module_options);
14691
- const components_StationAllocation_styles_module = StationAllocation_styles_module.Z && StationAllocation_styles_module.Z.locals ? StationAllocation_styles_module.Z.locals : void 0;
14692
- const StationAllocation_SegmentContainer_SegmentContainer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(({ style, stationPositions, currentFrequency, segmentIndex, isCurrentSegment, onStationMouseEnter, onStationMouseLeave, isStationInHoverRange })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
14693
- className: components_StationAllocation_styles_module.segmentContainer,
14694
- style: style,
14695
- children: stationPositions.map(({ station, position, signalColor, tooltip }, index)=>{
14696
- const isActive = isCurrentSegment && currentFrequency >= station.startFrequency && currentFrequency <= station.stopFrequency;
14697
- const isHovered = isStationInHoverRange(station);
14698
- const className = `${components_StationAllocation_styles_module.item}${isActive ? ` ${components_StationAllocation_styles_module.active}` : ''}${isHovered ? ` ${components_StationAllocation_styles_module.hovered}` : ''}`;
14740
+ const isActive = isActiveByIndex || isActiveByFrequency;
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}`;
14699
14744
  const itemStyle = {
14700
14745
  left: position.left,
14701
14746
  width: position.width,
14702
- ...signalColor && {
14703
- '--station-bg-color': signalColor
14704
- }
14747
+ '--station-bg-color': color
14705
14748
  };
14706
14749
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
14707
14750
  className: className,
14708
14751
  style: itemStyle,
14709
- title: tooltip,
14710
- onMouseEnter: ()=>onStationMouseEnter(station),
14711
- onMouseLeave: onStationMouseLeave
14712
- }, `segment-${segmentIndex}-station-${station.signalName}-${station.frequency}-${index}`);
14752
+ title: tooltip
14753
+ }, `segment-${segmentIndex}-signal-${keyValue}`);
14713
14754
  })
14714
14755
  }));
14715
- const StationAllocation_SegmentContainer = StationAllocation_SegmentContainer_SegmentContainer;
14716
- const StationAllocation_StationAllocation = ({ show = true, display = true })=>{
14717
- const [hoveredFrequencyRange, setHoveredFrequencyRange] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(null);
14718
- const { state: { segments, axisX: { frequencyFormat }, zoom: { style: zoomOffStyle }, cursor: { coord: { left } }, stationInfo, system: { width: containerWidth } } } = useStore_useStore();
14719
- const stationData = stationInfo.data;
14720
- const shouldDisplay = stationInfo.show && display;
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;
14721
14774
  const currentFrequency = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>Number(frequencyFormat(left)), [
14722
14775
  left,
14723
14776
  frequencyFormat
14724
14777
  ]);
14725
- const handleStationMouseEnter = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((station)=>{
14726
- const yian = station.bandwidth / 2 / 1000;
14727
- const startFreq = station.frequency - yian;
14728
- const stopFreq = station.frequency + yian;
14729
- setHoveredFrequencyRange({
14730
- start: startFreq,
14731
- stop: stopFreq
14732
- });
14733
- }, []);
14734
- const handleStationMouseLeave = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
14735
- setHoveredFrequencyRange(null);
14736
- }, []);
14737
- const isStationInHoverRange = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((station)=>{
14738
- if (!hoveredFrequencyRange) return false;
14739
- const yian = station.bandwidth / 2 / 1000;
14740
- const startFreq = station.frequency - yian;
14741
- const stopFreq = station.frequency + yian;
14742
- return !(stopFreq < hoveredFrequencyRange.start || startFreq > hoveredFrequencyRange.stop);
14743
- }, [
14744
- hoveredFrequencyRange
14745
- ]);
14746
- const currentSegmentIndex = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
14747
- if (!segments?.length) return -1;
14748
- let totalPoints = 0;
14749
- const totalSegmentPoints = segments.reduce((sum, s)=>sum + s.point, 0);
14750
- const mousePositionRatio = left / 100;
14751
- for(let i = 0; i < segments.length; i++){
14752
- const segmentRatio = segments[i].point / totalSegmentPoints;
14753
- if (mousePositionRatio >= totalPoints && mousePositionRatio <= totalPoints + segmentRatio) return i;
14754
- totalPoints += segmentRatio;
14755
- }
14756
- return -1;
14757
- }, [
14778
+ const currentPosition = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>(0, utils.hK)(left, segments), [
14758
14779
  segments,
14759
14780
  left
14760
14781
  ]);
14761
14782
  const segmentData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
14762
- if (!segments?.length || !stationData.length) return [];
14763
- const MIN_WIDTH_THRESHOLD = 1 / containerWidth * 100;
14783
+ if (!segments?.length) return [];
14784
+ const totalSegmentPoints = segments.reduce((sum, s)=>sum + s.point, 0);
14764
14785
  return segments.map((segment, segmentIndex)=>{
14765
- const segmentStations = stationData.filter((station)=>{
14766
- const yian = station.bandwidth / 2 / 1000;
14767
- const startFreq = station.frequency - yian;
14768
- const stopFreq = station.frequency + yian;
14769
- 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);
14770
14789
  });
14771
- const stationPositions = segmentStations.map((station)=>{
14772
- const totalRange = segment.stop - segment.start;
14773
- const yian = station.bandwidth / 2 / 1000;
14774
- const startFreq = station.frequency - yian;
14775
- const stopFreq = station.frequency + yian;
14776
- let startIndex = Math.ceil((startFreq - segment.start) / totalRange * segment.point) - 1;
14777
- let stopIndex = Math.floor((stopFreq - segment.start) / totalRange * segment.point) - 1;
14778
- startIndex = Math.max(startIndex, 0);
14779
- stopIndex = Math.min(stopIndex, segment.point - 1);
14780
- let bestStartIndex = startIndex;
14781
- let bestStopIndex = stopIndex;
14782
- const searchRange = 5;
14783
- for(let i = Math.max(0, startIndex - searchRange); i <= Math.min(segment.point - 1, startIndex + searchRange); i++){
14784
- const freq = Number(segment.frequencyCache[i]?.frequency);
14785
- if (freq >= startFreq) {
14786
- bestStartIndex = i;
14787
- break;
14788
- }
14789
- }
14790
- for(let i = Math.max(0, stopIndex - searchRange); i <= Math.min(segment.point - 1, stopIndex + searchRange); i++){
14791
- const freq = Number(segment.frequencyCache[i]?.frequency);
14792
- if (freq <= stopFreq) bestStopIndex = i;
14793
- 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;
14794
14810
  }
14795
- startIndex = Math.max(bestStartIndex, 0);
14796
- stopIndex = Math.min(bestStopIndex, segment.point - 1);
14797
- const calculatedWidth = (stopIndex - startIndex + 1) / segment.point * 100;
14798
- const leftPos = startIndex / segment.point * 100;
14799
- const width = calculatedWidth < MIN_WIDTH_THRESHOLD ? '1px' : `${calculatedWidth}%`;
14800
- const signalType = station.signalType;
14801
- const signalTypeInfo = SIGNAL_TYPE_MAP[signalType];
14802
- const signalColor = signalTypeInfo?.color;
14803
- const signalTypeName = signalTypeInfo?.name || station.signalType;
14804
- const tooltip = [
14805
- station.signalName,
14806
- `${station.frequency}MHz`,
14807
- station.orgName && `\u{5355}\u{4F4D}: ${station.orgName}`,
14808
- signalTypeName && `\u{7C7B}\u{578B}: ${signalTypeName}`
14809
- ].filter(Boolean).join(' | ');
14810
14811
  return {
14811
- station: {
14812
- ...station,
14813
- startFrequency: startFreq,
14814
- stopFrequency: stopFreq
14815
- },
14812
+ item,
14816
14813
  position: {
14817
14814
  left: `${leftPos}%`,
14818
- width
14815
+ width: `${calculatedWidth}%`
14819
14816
  },
14820
- signalColor,
14821
- signalTypeName,
14817
+ startIndex,
14818
+ stopIndex,
14819
+ color,
14822
14820
  tooltip
14823
14821
  };
14824
14822
  });
14825
- const segmentWidth = segment.point / segments.reduce((sum, s)=>sum + s.point, 0) * 100;
14826
- const segmentLeft = segments.slice(0, segmentIndex).reduce((sum, s)=>sum + s.point / segments.reduce((total, seg)=>total + seg.point, 0) * 100, 0);
14823
+ const segmentWidth = segment.point / totalSegmentPoints * 100;
14824
+ const segmentLeft = segments.slice(0, segmentIndex).reduce((sum, s)=>sum + s.point / totalSegmentPoints * 100, 0);
14827
14825
  return {
14828
14826
  segment,
14829
14827
  segmentIndex,
14830
- stationPositions,
14828
+ signalPositions,
14831
14829
  style: {
14832
14830
  left: `${segmentLeft}%`,
14833
14831
  width: `${segmentWidth}%`
@@ -14836,29 +14834,26 @@ const StationAllocation_StationAllocation = ({ show = true, display = true })=>{
14836
14834
  });
14837
14835
  }, [
14838
14836
  segments,
14839
- stationData,
14840
- containerWidth
14837
+ allSignals
14841
14838
  ]);
14842
14839
  if (!show || !shouldDisplay) return null;
14843
14840
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
14844
- className: components_StationAllocation_styles_module.StationAllocation,
14841
+ className: components_Signal_styles_module.signal,
14845
14842
  children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
14846
- className: components_StationAllocation_styles_module.con,
14843
+ className: components_Signal_styles_module.con,
14847
14844
  style: zoomOffStyle,
14848
- children: segmentData.map(({ segmentIndex, stationPositions, style })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(StationAllocation_SegmentContainer, {
14845
+ children: segmentData.map(({ segmentIndex, signalPositions, style })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Signal_SegmentContainer, {
14849
14846
  style: style,
14850
- stationPositions: stationPositions,
14847
+ signalPositions: signalPositions,
14851
14848
  currentFrequency: currentFrequency,
14852
14849
  segmentIndex: segmentIndex,
14853
- isCurrentSegment: currentSegmentIndex === segmentIndex,
14854
- onStationMouseEnter: handleStationMouseEnter,
14855
- onStationMouseLeave: handleStationMouseLeave,
14856
- isStationInHoverRange: isStationInHoverRange
14850
+ isCurrentSegment: currentPosition.segmentIndex === segmentIndex,
14851
+ currentPointIndex: currentPosition.pointIndex
14857
14852
  }, `segment-${segmentIndex}`))
14858
14853
  })
14859
14854
  });
14860
14855
  };
14861
- const StationAllocation = StationAllocation_StationAllocation;
14856
+ const components_Signal = Signal;
14862
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");
14863
14858
  var Stripe_styles_module_options = {};
14864
14859
  Stripe_styles_module_options.styleTagTransform = styleTagTransform_default();
@@ -15021,7 +15016,6 @@ const Spectrum_Spectrum = (props)=>{
15021
15016
  });
15022
15017
  useZoomEvent(id, constants_ModuleType.Spectrum);
15023
15018
  const setBand = useBand();
15024
- const setSignal = useSignal();
15025
15019
  const setScope = useScope();
15026
15020
  const setPoints = usePoints();
15027
15021
  (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
@@ -15062,9 +15056,6 @@ const Spectrum_Spectrum = (props)=>{
15062
15056
  case 'band':
15063
15057
  setBand(d);
15064
15058
  break;
15065
- case 'signal':
15066
- setSignal(d);
15067
- break;
15068
15059
  case 'scope':
15069
15060
  setScope(d);
15070
15061
  break;
@@ -15102,9 +15093,7 @@ const Spectrum_Spectrum = (props)=>{
15102
15093
  id: id,
15103
15094
  type: constants_ModuleType.Spectrum
15104
15095
  }),
15105
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Signal, {
15106
- id: id
15107
- }),
15096
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_Signal, {}),
15108
15097
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_DragFrame, {
15109
15098
  id: id
15110
15099
  }),
@@ -15116,8 +15105,7 @@ const Spectrum_Spectrum = (props)=>{
15116
15105
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyTagLine, {
15117
15106
  id: id
15118
15107
  }),
15119
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyAllocation, {}),
15120
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(StationAllocation, {})
15108
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyAllocation, {})
15121
15109
  ]
15122
15110
  })
15123
15111
  ]
@@ -15537,7 +15525,7 @@ const AxisXTicks = ({ type })=>{
15537
15525
  });
15538
15526
  };
15539
15527
  const AxisX_Ticks = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(AxisXTicks);
15540
- const AxisX_AxisX = ({ type })=>{
15528
+ const AxisX = ({ type })=>{
15541
15529
  const { state: { axisX } } = useStore_useStore();
15542
15530
  const { children, unit, ticks } = axisX;
15543
15531
  const { width, pluginBoxWidth } = useAxisYWidth_useAxisYWidth();
@@ -15575,7 +15563,7 @@ const AxisX_AxisX = ({ type })=>{
15575
15563
  })
15576
15564
  });
15577
15565
  };
15578
- const AxisX = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(AxisX_AxisX);
15566
+ const components_AxisX = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(AxisX);
15579
15567
  var Blaze_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/Blaze/styles.module.less");
15580
15568
  var Blaze_styles_module_options = {};
15581
15569
  Blaze_styles_module_options.styleTagTransform = styleTagTransform_default();
@@ -15732,6 +15720,30 @@ const useMarkerPublish_useMarkerPublish = ({ globalID })=>{
15732
15720
  };
15733
15721
  };
15734
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
+ }
15735
15747
  function useTemplateComparison() {
15736
15748
  const { state: { globalID, axisX: { frequencyFormat }, signal: { onChange } } } = useStore_useStore();
15737
15749
  const frequencyFormatRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(frequencyFormat);
@@ -15779,24 +15791,12 @@ function useTemplateComparison() {
15779
15791
  };
15780
15792
  }
15781
15793
  function useSpectrumAnalyzer(props) {
15782
- const { state: { globalID, series: { enableMetrics, enableWaterfall }, fluorescence: { show: enableFluorescence }, axisY: { unit }, zoom: { interval }, heatmapCapture: { display: heatmapCaptureDisplay }, system: { width }, stationInfo }, dispatch } = useStore_useStore();
15794
+ const { state: { globalID, series: { enableMetrics, enableWaterfall }, fluorescence: { show: enableFluorescence }, axisY: { unit }, zoom: { interval }, heatmapCapture: { display: heatmapCaptureDisplay }, system: { width } } } = useStore_useStore();
15783
15795
  const analyzer = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
15784
15796
  const globalIDRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(globalID);
15785
15797
  const intervalRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(interval);
15786
15798
  const totalOccupancyData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(0);
15787
- const updateStationInfo = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((data)=>{
15788
- if (!data) return;
15789
- if (globalIDRef.current) dispatch({
15790
- payload: {
15791
- stationInfo: {
15792
- ...stationInfo,
15793
- data: data
15794
- }
15795
- }
15796
- });
15797
- }, [
15798
- stationInfo
15799
- ]);
15799
+ const { updateSignalData } = useSignalDataManager();
15800
15800
  const heatmapCaptureDisplayRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(heatmapCaptureDisplay);
15801
15801
  (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
15802
15802
  heatmapCaptureDisplayRef.current = heatmapCaptureDisplay;
@@ -15908,8 +15908,11 @@ function useSpectrumAnalyzer(props) {
15908
15908
  case constants_PSType.AntennaFactor:
15909
15909
  analyzer.current.setAntennaFactor(e.data);
15910
15910
  break;
15911
- case constants_PSType.StationInfo:
15912
- updateStationInfo(e.data);
15911
+ case constants_PSType.Signal:
15912
+ updateSignalData({
15913
+ type: e.type,
15914
+ data: e.data
15915
+ });
15913
15916
  break;
15914
15917
  case constants_PSType.Spectrum:
15915
15918
  if (e.data) analyzer.current.process(e);
@@ -15956,7 +15959,7 @@ function useSpectrumAnalyzer(props) {
15956
15959
  break;
15957
15960
  }
15958
15961
  }, [
15959
- updateStationInfo,
15962
+ updateSignalData,
15960
15963
  updateSeries,
15961
15964
  resetAll
15962
15965
  ]);
@@ -16002,6 +16005,7 @@ function useSpectrumChartType({ type, heatmapElementID }) {
16002
16005
  1
16003
16006
  ];
16004
16007
  axisY.unitDisabled = false;
16008
+ frequencyAllocation.show = false;
16005
16009
  }
16006
16010
  if (type === constants_ChartType.MScan) {
16007
16011
  limit.show = false;
@@ -16213,7 +16217,7 @@ const HeatmapPortal_Chart = (props)=>{
16213
16217
  type: constants_ChartType.Heatmap
16214
16218
  }),
16215
16219
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Heatmap, {}),
16216
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
16220
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_AxisX, {
16217
16221
  type: type
16218
16222
  })
16219
16223
  ]
@@ -16231,7 +16235,7 @@ const OccupancyPortal_Chart = (props)=>{
16231
16235
  type: constants_ChartType.Occupancy
16232
16236
  }),
16233
16237
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Occupancy, {}),
16234
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
16238
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_AxisX, {
16235
16239
  type: type
16236
16240
  })
16237
16241
  ]
@@ -16252,7 +16256,7 @@ const Spectrum_Chart_Chart = (props)=>{
16252
16256
  enableMetrics
16253
16257
  }
16254
16258
  });
16255
- const handleSpectrumRule = useSpectrumRule();
16259
+ const handleSpectrumRule = useSpectrumRule(type);
16256
16260
  const { handleMarkerPublish } = useMarkerPublish({
16257
16261
  globalID
16258
16262
  });
@@ -16299,7 +16303,7 @@ const Spectrum_Chart_Chart = (props)=>{
16299
16303
  })
16300
16304
  ]
16301
16305
  }),
16302
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
16306
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_AxisX, {
16303
16307
  type: type
16304
16308
  })
16305
16309
  ]
@@ -16314,4 +16318,4 @@ const SpectrumChart = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react
16314
16318
  });
16315
16319
  const lib_Spectrum_Spectrum = withChartPublisher(SpectrumChart, 'Spectrum');
16316
16320
  const lib_Spectrum = lib_Spectrum_Spectrum;
16317
- 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 };