costy-plus 1.1.48-0 → 1.1.49-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,17 +9,17 @@ import u from "../MagnifierWave/index.js";
9
9
  import f from "../ParallelRuler/index2.js";
10
10
  import g from "../BackgroundGrid/index2.js";
11
11
  import w from "./method.js";
12
- var v = Object.defineProperty, C = Object.getOwnPropertyDescriptor, r = (e, a, s, n) => {
13
- for (var o = n > 1 ? void 0 : n ? C(a, s) : a, h = e.length - 1, l; h >= 0; h--)
14
- (l = e[h]) && (o = (n ? l(a, s, o) : l(o)) || o);
15
- return n && o && v(a, s, o), o;
12
+ var v = Object.defineProperty, C = Object.getOwnPropertyDescriptor, r = (e, a, n, s) => {
13
+ for (var o = s > 1 ? void 0 : s ? C(a, n) : a, h = e.length - 1, l; h >= 0; h--)
14
+ (l = e[h]) && (o = (s ? l(a, n, o) : l(o)) || o);
15
+ return s && o && v(a, n, o), o;
16
16
  };
17
17
  let t = class extends m(w) {
18
18
  constructor() {
19
19
  super(...arguments), this.repaintTimer = null, this.refreshFrame = null;
20
20
  }
21
21
  watchVuescrollConfig() {
22
- this.repaint();
22
+ this.repaint(), this.$nextTick(() => this.bindScrollEnd());
23
23
  }
24
24
  watchAnalyseValues() {
25
25
  this.nearestHeartInfo = {
@@ -67,8 +67,8 @@ let t = class extends m(w) {
67
67
  return;
68
68
  }
69
69
  this.repaintTimer && clearTimeout(this.repaintTimer), this.repaintTimer = setTimeout(() => {
70
- var a, s;
71
- this.repaintTimer = null, e && ((a = this.sceneIns) == null || a.clear(), (s = this.sceneIns) == null || s.resize({
70
+ var a, n;
71
+ this.repaintTimer = null, e && ((a = this.sceneIns) == null || a.clear(), (n = this.sceneIns) == null || n.resize({
72
72
  width: this.canvasContainer.width,
73
73
  height: this.canvasContainer.height
74
74
  }), this.initCreatedConfig()), this.combinationDrawing(e);
@@ -78,7 +78,7 @@ let t = class extends m(w) {
78
78
  this.initCreatedConfig();
79
79
  }
80
80
  mounted() {
81
- this.init();
81
+ this.init(), this.$nextTick(() => this.bindScrollEnd());
82
82
  }
83
83
  };
84
84
  r([
@@ -160,6 +160,13 @@ export default class Methods extends Vue {
160
160
  protected sceneIsMouseDownX: number;
161
161
  protected lastScrollPointIdx: number;
162
162
  protected lastScrollLeft: number;
163
+ protected latestScrollPointIdx: {
164
+ slidIdxs: number;
165
+ scrollLeft: number;
166
+ } | null;
167
+ protected scrollEndTarget: HTMLElement | null;
168
+ protected scrollEndTimer: ReturnType<typeof setTimeout> | null;
169
+ protected usesScrollEnd: boolean;
163
170
  /** 滚动到未加载区间时暂存目标,数据到齐后再切换视图 */
164
171
  protected pendingScrollPointIdx: number | null;
165
172
  /** 实际画布容器大小 */
@@ -286,6 +293,11 @@ export default class Methods extends Vue {
286
293
  protected onContextmenu(e: ElementEvent, type: 'single' | 'rowAndCol' | 'add'): void;
287
294
  /** 波形点击事件,双击放大波形 */
288
295
  protected onDbClickWaveFrom(e: ElementEvent, type: 'single' | 'rowAndCol' | 'add'): void;
296
+ protected getScrollEndTarget(): HTMLElement | null;
297
+ protected emitScrollPointIdx(): void;
298
+ protected scheduleScrollEndFallback(): void;
299
+ protected handleScrollEnd: () => void;
300
+ protected bindScrollEnd(): void;
289
301
  /** 原生滚动条事件 */
290
302
  protected nativeScrollFunc(event: Event): void;
291
303
  /** 自定义滚动事件监听 */
@@ -1,30 +1,30 @@
1
- var E = Object.defineProperty, Q = Object.defineProperties;
1
+ var K = Object.defineProperty, Q = Object.defineProperties;
2
2
  var U = Object.getOwnPropertyDescriptors;
3
3
  var $ = Object.getOwnPropertySymbols;
4
4
  var Z = Object.prototype.hasOwnProperty, J = Object.prototype.propertyIsEnumerable;
5
- var Y = (e, t, i) => t in e ? E(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, b = (e, t) => {
5
+ var j = (e, t, i) => t in e ? K(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, D = (e, t) => {
6
6
  for (var i in t || (t = {}))
7
- Z.call(t, i) && Y(e, i, t[i]);
7
+ Z.call(t, i) && j(e, i, t[i]);
8
8
  if ($)
9
9
  for (var i of $(t))
10
- J.call(t, i) && Y(e, i, t[i]);
10
+ J.call(t, i) && j(e, i, t[i]);
11
11
  return e;
12
- }, X = (e, t) => Q(e, U(t));
12
+ }, E = (e, t) => Q(e, U(t));
13
13
  import ee from "vue";
14
14
  import te from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
15
15
  import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js";
16
16
  import { Prop as m } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js";
17
17
  import { flattenDeep as ie, max as se, min as ae, cloneDeep as q } from "lodash";
18
- import { getStepForSpeed as B, getPrintLengthToPx as ne, getPointIdxForPx as G, getSens as k, getDataLenTimes as _, getActualY as T, calcMs as oe, calcBpm as le } from "@costy-plus/utils";
19
- import { debounceDecorator as K } from "../utils/tool.js";
18
+ import { getStepForSpeed as B, getPrintLengthToPx as ne, getPointIdxForPx as G, getSens as k, getDataLenTimes as X, getActualY as O, calcMs as oe, calcBpm as le } from "@costy-plus/utils";
19
+ import { debounceDecorator as Y } from "../utils/tool.js";
20
20
  import * as de from "zrender";
21
- import { Group as P, Polyline as z, Line as j, Text as F, Rect as re, util as he } from "zrender";
22
- var fe = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, w = (e, t, i, s) => {
23
- for (var a = s > 1 ? void 0 : s ? pe(t, i) : t, n = e.length - 1, o; n >= 0; n--)
21
+ import { Group as F, Polyline as z, Line as _, Text as A, Rect as re, util as he } from "zrender";
22
+ var fe = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, w = (e, t, i, s) => {
23
+ for (var a = s > 1 ? void 0 : s ? ce(t, i) : t, n = e.length - 1, o; n >= 0; n--)
24
24
  (o = e[n]) && (a = (s ? o(t, i, a) : o(a)) || a);
25
25
  return s && a && fe(t, i, a), a;
26
26
  };
27
- let c = class extends ee {
27
+ let p = class extends ee {
28
28
  constructor() {
29
29
  super(...arguments), this.AssistCtx = Object.freeze(null), this.sceneIns = Object.freeze(null), this.layerBgGroup = Object.freeze(null), this.leadHeadGroup = Object.freeze(null), this.splitLineGroup = Object.freeze(null), this.rowAndColwaveFromGroup = Object.freeze(null), this.singleWaveFromGroup = Object.freeze(null), this.addwaveFromGroup = Object.freeze(null), this.leadHeadNameGroup = Object.freeze(null), this.leadHeadOffAndDelGroup = Object.freeze(null), this.rulerGroup = Object.freeze(null), this.arrowGroup = Object.freeze(null), this.arrowHeartGroup = Object.freeze(null), this.heardBeatLineGroup = Object.freeze(null), this.bottomAreaHeight = Object.freeze(10), this.totalRows = Object.freeze(0), this.rulerStep = Object.freeze(0), this.drawLoopArrowStartPosIdx = Object.freeze(0), this.dbClickWaveFromTime = Object.freeze(0), this.timersCopy = Object.freeze(0), this.nearestHeartInfo = Object.freeze({
30
30
  analyseValue: null,
@@ -44,7 +44,15 @@ let c = class extends ee {
44
44
  }), this.vuescrollWH = {
45
45
  width: 0,
46
46
  height: 0
47
- }, this.waveDataCopy = [], this.addWaveDataCopy = [], this.singleWaveDataCopy = [], this.leadNameList = [], this.activeLeadIdx = Object.freeze(-1), this.publicStep = Object.freeze(0), this.sceneIsMouseDown = Object.freeze(!1), this.sceneIsMouseDownX = Object.freeze(0), this.lastScrollPointIdx = -1, this.lastScrollLeft = -1, this.pendingScrollPointIdx = null;
47
+ }, this.waveDataCopy = [], this.addWaveDataCopy = [], this.singleWaveDataCopy = [], this.leadNameList = [], this.activeLeadIdx = Object.freeze(-1), this.publicStep = Object.freeze(0), this.sceneIsMouseDown = Object.freeze(!1), this.sceneIsMouseDownX = Object.freeze(0), this.lastScrollPointIdx = -1, this.lastScrollLeft = -1, this.latestScrollPointIdx = null, this.scrollEndTarget = null, this.scrollEndTimer = null, this.usesScrollEnd = !1, this.pendingScrollPointIdx = null, this.handleScrollEnd = () => {
48
+ var t;
49
+ const e = (t = this.scrollEndTarget) == null ? void 0 : t.scrollLeft;
50
+ if (typeof e == "number" && e !== this.lastScrollLeft) {
51
+ this.scrollCommon(e);
52
+ return;
53
+ }
54
+ this.emitScrollPointIdx();
55
+ };
48
56
  }
49
57
  get canvasContainer() {
50
58
  var e;
@@ -55,7 +63,7 @@ let c = class extends ee {
55
63
  }
56
64
  destroyed() {
57
65
  var e, t, i, s, a, n, o, r, l, d, h, f;
58
- this.sceneInsEventOff(), (e = this.rowAndColwaveFromGroup) == null || e.removeAll(), (t = this.singleWaveFromGroup) == null || t.removeAll(), (i = this.addwaveFromGroup) == null || i.removeAll(), (s = this.leadHeadGroup) == null || s.removeAll(), (a = this.splitLineGroup) == null || a.removeAll(), (n = this.leadHeadNameGroup) == null || n.removeAll(), (o = this.leadHeadOffAndDelGroup) == null || o.removeAll(), (r = this.rulerGroup) == null || r.removeAll(), (l = this.arrowGroup) == null || l.removeAll(), (d = this.arrowHeartGroup) == null || d.removeAll(), (h = this.heardBeatLineGroup) == null || h.removeAll(), (f = this.sceneIns) == null || f.dispose();
66
+ this.scrollEndTarget && this.usesScrollEnd && this.scrollEndTarget.removeEventListener("scrollend", this.handleScrollEnd), this.scrollEndTimer && clearTimeout(this.scrollEndTimer), this.scrollEndTarget = null, this.scrollEndTimer = null, this.latestScrollPointIdx = null, this.sceneInsEventOff(), (e = this.rowAndColwaveFromGroup) == null || e.removeAll(), (t = this.singleWaveFromGroup) == null || t.removeAll(), (i = this.addwaveFromGroup) == null || i.removeAll(), (s = this.leadHeadGroup) == null || s.removeAll(), (a = this.splitLineGroup) == null || a.removeAll(), (n = this.leadHeadNameGroup) == null || n.removeAll(), (o = this.leadHeadOffAndDelGroup) == null || o.removeAll(), (r = this.rulerGroup) == null || r.removeAll(), (l = this.arrowGroup) == null || l.removeAll(), (d = this.arrowHeartGroup) == null || d.removeAll(), (h = this.heardBeatLineGroup) == null || h.removeAll(), (f = this.sceneIns) == null || f.dispose();
59
67
  }
60
68
  initCreatedConfig() {
61
69
  this.vuescrollWH.width = this.width, this.vuescrollWH.height = this.height, this.calcHeartBeatPositions(), this.initConfig();
@@ -144,27 +152,27 @@ let c = class extends ee {
144
152
  }
145
153
  initConfig() {
146
154
  var t;
147
- this.rowAndColwaveFromGroup = new P({
155
+ this.rowAndColwaveFromGroup = new F({
148
156
  name: "rowAndColwaveFrom"
149
- }), this.singleWaveFromGroup = new P({
157
+ }), this.singleWaveFromGroup = new F({
150
158
  name: "singleWaveFrom"
151
- }), this.addwaveFromGroup = new P({
159
+ }), this.addwaveFromGroup = new F({
152
160
  name: "addwaveFrom"
153
- }), this.leadHeadGroup = new P({
161
+ }), this.leadHeadGroup = new F({
154
162
  name: "leadHead"
155
- }), this.splitLineGroup = new P({
163
+ }), this.splitLineGroup = new F({
156
164
  name: "splitLine"
157
- }), this.leadHeadNameGroup = new P({
165
+ }), this.leadHeadNameGroup = new F({
158
166
  name: "leadHeadName"
159
- }), this.leadHeadOffAndDelGroup = new P({
167
+ }), this.leadHeadOffAndDelGroup = new F({
160
168
  name: "leadHeadOffAndDel"
161
- }), this.rulerGroup = new P({
169
+ }), this.rulerGroup = new F({
162
170
  name: "ruler"
163
- }), this.arrowGroup = new P({
171
+ }), this.arrowGroup = new F({
164
172
  name: "arrowLoop"
165
- }), this.arrowHeartGroup = new P({
173
+ }), this.arrowHeartGroup = new F({
166
174
  name: "arrowHeart"
167
- }), this.heardBeatLineGroup = new P({
175
+ }), this.heardBeatLineGroup = new F({
168
176
  name: "heardBeatLine"
169
177
  });
170
178
  let e = this.canvasContainer.width;
@@ -220,18 +228,18 @@ let c = class extends ee {
220
228
  return;
221
229
  const a = 0.15 * this.waveConfigs[this.heartFight.showIdxPai].sampleRate;
222
230
  let n = null, o = -1, r = 1 / 0;
223
- for (let g = 0; g < this.analyseValues.length; g++) {
224
- const W = this.analyseValues[g], I = g !== 1 ? W.filter((L, H) => {
231
+ for (let u = 0; u < this.analyseValues.length; u++) {
232
+ const W = this.analyseValues[u], I = u !== 1 ? W.filter((L, x) => {
225
233
  var v;
226
- return H === 0 || ((v = L.KeyPosByBeat) == null ? void 0 : v.Rpoint) !== 0;
234
+ return x === 0 || ((v = L.KeyPosByBeat) == null ? void 0 : v.Rpoint) !== 0;
227
235
  }) : W;
228
- let y = 0, u = I.length - 1;
229
- for (; y <= u; ) {
230
- const L = Math.floor((y + u) / 2), H = I[L], v = (l = H.KeyPosByBeat) == null ? void 0 : l.Rpoint;
236
+ let y = 0, g = I.length - 1;
237
+ for (; y <= g; ) {
238
+ const L = Math.floor((y + g) / 2), x = I[L], v = (l = x.KeyPosByBeat) == null ? void 0 : l.Rpoint;
231
239
  if (v === void 0)
232
240
  break;
233
241
  const C = Math.abs(s - v);
234
- C <= a && C < r && (r = C, n = H, o = g), v < s ? y = L + 1 : u = L - 1;
242
+ C <= a && C < r && (r = C, n = x, o = u), v < s ? y = L + 1 : g = L - 1;
235
243
  }
236
244
  }
237
245
  if (n)
@@ -240,21 +248,21 @@ let c = class extends ee {
240
248
  insertInfo: null
241
249
  };
242
250
  else {
243
- let g = -1, W = 1 / 0, I = -1, y = -1;
244
- for (let u = 0; u < this.analyseValues.length; u++) {
245
- const L = this.analyseValues[u];
246
- for (let H = 0; H < L.length; H++) {
247
- const v = L[H];
248
- if (u !== 1 && H > 0 && ((d = v.KeyPosByBeat) == null ? void 0 : d.Rpoint) === 0)
251
+ let u = -1, W = 1 / 0, I = -1, y = -1;
252
+ for (let g = 0; g < this.analyseValues.length; g++) {
253
+ const L = this.analyseValues[g];
254
+ for (let x = 0; x < L.length; x++) {
255
+ const v = L[x];
256
+ if (g !== 1 && x > 0 && ((d = v.KeyPosByBeat) == null ? void 0 : d.Rpoint) === 0)
249
257
  continue;
250
258
  const C = (h = v.KeyPosByBeat) == null ? void 0 : h.Rpoint;
251
259
  if (C === void 0)
252
260
  continue;
253
- const p = Math.abs(s - C);
254
- p < W && (W = p, y = u, s < C ? I = H : u !== 1 && ((f = v.KeyPosByBeat) == null ? void 0 : f.Rpoint) === 0 && H === 0 ? I = 1 : I = H + 1);
261
+ const c = Math.abs(s - C);
262
+ c < W && (W = c, y = g, s < C ? I = x : g !== 1 && ((f = v.KeyPosByBeat) == null ? void 0 : f.Rpoint) === 0 && x === 0 ? I = 1 : I = x + 1);
255
263
  }
256
264
  }
257
- y !== -1 && (o = y, g = I, this.nearestHeartInfo = {
265
+ y !== -1 && (o = y, u = I, this.nearestHeartInfo = {
258
266
  analyseValue: {
259
267
  AnabyBeat: {
260
268
  QTd: 0,
@@ -304,7 +312,7 @@ let c = class extends ee {
304
312
  },
305
313
  insertInfo: {
306
314
  listIndex: o,
307
- insertIndex: g,
315
+ insertIndex: u,
308
316
  pointIdx: s,
309
317
  distanceToNearest: W
310
318
  }
@@ -425,11 +433,11 @@ let c = class extends ee {
425
433
  this.waveConfigs[this.singleModeConfig.defaultSelect].speed,
426
434
  this.gridConfig.cellMg,
427
435
  this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate
428
- ), f = _(
436
+ ), f = X(
429
437
  Math.ceil(this.splitPoint / (h || 1)) || 0,
430
438
  this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0
431
- ), g = parseInt(`${f / 1e3 % 60}`, 10);
432
- this.splitPoint = g * (this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0) * (h || 0);
439
+ ), u = parseInt(`${f / 1e3 % 60}`, 10);
440
+ this.splitPoint = u * (this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0) * (h || 0);
433
441
  }
434
442
  let t = 0, i = 0, s = 0, a = 0;
435
443
  for (let h = 1; h <= this.leadModel.column - 1; h++) {
@@ -459,7 +467,7 @@ let c = class extends ee {
459
467
  (d = this.sceneIns) == null || d.add(this.splitLineGroup);
460
468
  }
461
469
  creatSplitLine(e, t, i, s) {
462
- return new j({
470
+ return new _({
463
471
  cursor: "",
464
472
  shape: {
465
473
  x1: 0 + e,
@@ -481,15 +489,15 @@ let c = class extends ee {
481
489
  fill: "#FF0080",
482
490
  fontSize: 13,
483
491
  fontFamily: this.fontFamily
484
- }, t = new F({
492
+ }, t = new A({
485
493
  cursor: "",
486
- style: b({
494
+ style: D({
487
495
  text: "(s)",
488
496
  x: this.leadHeadConfig.leadHedeWidth / 2 - 8,
489
497
  y: this.canvasContainer.height - 25
490
498
  }, e)
491
- }), i = new F({
492
- style: b({
499
+ }), i = new A({
500
+ style: D({
493
501
  text: this.rulerConfig.renderText || `${this.rulerConfig.gainName} ${this.rulerConfig.speedName}`,
494
502
  x: this.leadHeadConfig.leadHedeWidth / 2 + 20,
495
503
  y: this.canvasContainer.height - this.ruleH
@@ -498,7 +506,7 @@ let c = class extends ee {
498
506
  (s = this.sceneIns) == null || s.add(i), (a = this.sceneIns) == null || a.add(t);
499
507
  }
500
508
  drawRuler(e = 0) {
501
- var f, g, W, I, y;
509
+ var f, u, W, I, y;
502
510
  if (this.timersCopy = e, (f = this.rulerGroup) == null || f.removeAll(), !this.rulerConfig.isShow)
503
511
  return;
504
512
  const t = this.canvasContainer.height;
@@ -506,25 +514,25 @@ let c = class extends ee {
506
514
  const a = B(this.rulerConfig.speed, this.gridConfig.cellMg, this.rulerConfig.sampleRate), n = this.rulerStep || 1, o = Math.max(0, this.drawArea.width - this.leadHeadConfig.leadHedeWidth), l = Math.ceil(o / n) * 0.1, d = this.dataTotalTimes * 2;
507
515
  let h = e + l;
508
516
  if (d > 0) {
509
- const u = this.leadModel.isContinuous ? d * 1.1 : d;
510
- h = Math.min(h, u);
517
+ const g = this.leadModel.isContinuous ? d * 1.1 : d;
518
+ h = Math.min(h, g);
511
519
  }
512
520
  if (!this.leadModel.add && a) {
513
- const u = G(this.splitPoint * (this.leadModel.column || 1), a), L = _(u, this.rulerConfig.sampleRate || 0) / 1e3;
521
+ const g = G(this.splitPoint * (this.leadModel.column || 1), a), L = X(g, this.rulerConfig.sampleRate || 0) / 1e3;
514
522
  L > 0 && (h = Math.min(h, e + L));
515
523
  }
516
- for (let u = e; u <= h; u = +(u + 0.1).toFixed(1))
517
- u !== e && (i += this.rulerStep), u % 1 === 0 ? (s = t - 10, (g = this.rulerGroup) == null || g.add(new F({
524
+ for (let g = e; g <= h; g = +(g + 0.1).toFixed(1))
525
+ g !== e && (i += this.rulerStep), g % 1 === 0 ? (s = t - 10, (u = this.rulerGroup) == null || u.add(new A({
518
526
  cursor: "",
519
527
  style: {
520
528
  x: i,
521
529
  y: s - 15,
522
- text: u + "",
530
+ text: g + "",
523
531
  fontSize: 13,
524
532
  fontFamily: this.fontFamily,
525
533
  fill: "#FF0080"
526
534
  }
527
- }))) : s = t - 5, (W = this.rulerGroup) == null || W.add(new j({
535
+ }))) : s = t - 5, (W = this.rulerGroup) == null || W.add(new _({
528
536
  cursor: "",
529
537
  shape: {
530
538
  x1: i,
@@ -619,7 +627,7 @@ let c = class extends ee {
619
627
  endInd: a,
620
628
  step: n,
621
629
  sens: o,
622
- data: i.slice(s, a).map((f, g) => this.waveConfigs[this.singleModeConfig.defaultSelect].gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName) ? T(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity, f, o / 2) : T(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity, f, o)).map((f, g) => [g * (n || 0), -f])
630
+ data: i.slice(s, a).map((f, u) => this.waveConfigs[this.singleModeConfig.defaultSelect].gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName) ? O(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity, f, o / 2) : O(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity, f, o)).map((f, u) => [u * (n || 0), -f])
623
631
  });
624
632
  }
625
633
  return r;
@@ -627,7 +635,7 @@ let c = class extends ee {
627
635
  createSingleWaveFrom() {
628
636
  var o, r, l;
629
637
  (o = this.singleWaveFromGroup) == null || o.removeAll();
630
- let e = this.getRednerSinglePoints(), t = _(this.slidingWindowInfo.points || 0, this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0);
638
+ let e = this.getRednerSinglePoints(), t = X(this.slidingWindowInfo.points || 0, this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0);
631
639
  const i = t;
632
640
  let s = 0, a = 0, n = 0;
633
641
  for (let d = 0; d < e.length && !(e[d].pos[1] > this.drawArea.height + this.bottomAreaHeight); d++)
@@ -636,7 +644,7 @@ let c = class extends ee {
636
644
  name: this.singleModeConfig.defaultSelect + "_" + d,
637
645
  sens: e[d].sens,
638
646
  shape: {
639
- points: e[d].data.map(([h, f], g) => isNaN(f) ? (n === 0 && (n = g - 1, n = n < 0 ? 0 : n), [
647
+ points: e[d].data.map(([h, f], u) => isNaN(f) ? (n === 0 && (n = u - 1, n = n < 0 ? 0 : n), [
640
648
  e[d].data[n][0] + e[d].pos[0],
641
649
  e[d].data[n][1] + e[d].pos[1]
642
650
  ]) : (n = 0, [
@@ -654,7 +662,7 @@ let c = class extends ee {
654
662
  oncontextmenu: (h) => {
655
663
  this.onContextmenu(h, "single");
656
664
  }
657
- })), t / 1e3 < this.dataTotalTimes && ((l = this.singleWaveFromGroup) == null || l.add(new F({
665
+ })), t / 1e3 < this.dataTotalTimes && ((l = this.singleWaveFromGroup) == null || l.add(new A({
658
666
  cursor: "",
659
667
  style: {
660
668
  x: e[d].pos[0],
@@ -673,7 +681,7 @@ let c = class extends ee {
673
681
  this.singleWaveDataCopy = e, e = null;
674
682
  }
675
683
  drawHeartReact(e = 0) {
676
- var a, n, o, r, l, d, h, f, g, W, I;
684
+ var a, n, o, r, l, d, h, f, u, W, I;
677
685
  if ((a = this.arrowHeartGroup) == null || a.removeAll(), !this.heartFight.isShow)
678
686
  return;
679
687
  if (this.leadModel.line !== 12 && this.leadModel.column !== 1) {
@@ -694,7 +702,7 @@ let c = class extends ee {
694
702
  const s = (((o = (n = this.nearestHeartInfo.analyseValue) == null ? void 0 : n.KeyPosByBeat) == null ? void 0 : o.Rpoint) || 0) - e;
695
703
  if (!(e > (((l = (r = this.nearestHeartInfo.analyseValue) == null ? void 0 : r.KeyPosByBeat) == null ? void 0 : l.Rpoint) || 0)) && !(!this.leadModel.isContinuous && !this.leadModel.add && s > (this.slidingWindowInfo.points || 0)) && !(this.leadModel.isSingleMode && s > (this.slidingWindowInfo.points || 0)) && !((((h = (d = this.nearestHeartInfo.analyseValue) == null ? void 0 : d.KeyPosByBeat) == null ? void 0 : h.Rpoint) || 0) - this.addSlidingWindowInfo.startInd > (this.addSlidingWindowInfo.points || 0))) {
696
704
  if (this.nearestHeartInfo.insertInfo)
697
- i = (s || 0) * t + this.leadHeadConfig.leadHedeWidth, (g = this.arrowHeartGroup) == null || g.add(new j({
705
+ i = (s || 0) * t + this.leadHeadConfig.leadHedeWidth, (u = this.arrowHeartGroup) == null || u.add(new _({
698
706
  name: "draw_heart_line",
699
707
  cursor: "",
700
708
  shape: {
@@ -711,7 +719,7 @@ let c = class extends ee {
711
719
  else {
712
720
  const y = 0.1 * this.waveConfigs[this.heartFight.showIdxPai].sampleRate;
713
721
  i = ((s || 0) - y / 2) * t + this.leadHeadConfig.leadHedeWidth;
714
- const u = (y * 2 + 1) * t;
722
+ const g = (y * 2 + 1) * t;
715
723
  (f = this.arrowHeartGroup) == null || f.add(new re({
716
724
  name: "draw_heart_rect",
717
725
  style: {
@@ -721,7 +729,7 @@ let c = class extends ee {
721
729
  shape: {
722
730
  x: i,
723
731
  y: 0,
724
- width: u,
732
+ width: g,
725
733
  height: this.canvasContainer.height - 2
726
734
  },
727
735
  cursor: ""
@@ -731,7 +739,7 @@ let c = class extends ee {
731
739
  }
732
740
  }
733
741
  drawLoopArrow(e = 0) {
734
- var f, g, W, I, y, u, L, H, v, C, p, A, V;
742
+ var f, u, W, I, y, g, L, x, v, C, c, P, V;
735
743
  if (this.drawLoopArrowStartPosIdx = e, !this.heartFight.isShow)
736
744
  return;
737
745
  (f = this.arrowGroup) == null || f.removeAll(), this.heartFight.mode && this.currentHeardBeat.heardBeat === null && (this.currentHeardBeat.heardBeat = this.heartBeatPosition[this.heartFight.showIdxPai][this.heartFight.defaultSelect] || null, this.drawHeardBeatLine());
@@ -755,39 +763,39 @@ let c = class extends ee {
755
763
  );
756
764
  let d = 0, h = 0;
757
765
  for (let R = 0; R < (this.heartBeatPosition[this.heartFight.showIdxPai] || []).length; R++) {
758
- const M = this.heartBeatPosition[this.heartFight.showIdxPai][R];
759
- if (d = ((M == null ? void 0 : M.position) || 0) - e, e > ((M == null ? void 0 : M.position) || 0) || !this.leadModel.isContinuous && !this.leadModel.add && d > (this.slidingWindowInfo.points || 0) || this.leadModel.isSingleMode && d > (this.slidingWindowInfo.points || 0))
766
+ const H = this.heartBeatPosition[this.heartFight.showIdxPai][R];
767
+ if (d = ((H == null ? void 0 : H.position) || 0) - e, e > ((H == null ? void 0 : H.position) || 0) || !this.leadModel.isContinuous && !this.leadModel.add && d > (this.slidingWindowInfo.points || 0) || this.leadModel.isSingleMode && d > (this.slidingWindowInfo.points || 0))
760
768
  continue;
761
- if (((M == null ? void 0 : M.position) || 0) - this.addSlidingWindowInfo.startInd > (this.addSlidingWindowInfo.points || 0))
769
+ if (((H == null ? void 0 : H.position) || 0) - this.addSlidingWindowInfo.startInd > (this.addSlidingWindowInfo.points || 0))
762
770
  break;
763
- s = ((g = this.AssistCtx) == null ? void 0 : g.measureText(`${(M == null ? void 0 : M.heart_style) || ""}`).width) || 0, t = d * (l || 0) + this.leadHeadConfig.leadHedeWidth - 0, a = 0, (W = this.arrowGroup) == null || W.add(new F({
771
+ s = ((u = this.AssistCtx) == null ? void 0 : u.measureText(`${(H == null ? void 0 : H.heart_style) || ""}`).width) || 0, t = d * (l || 0) + this.leadHeadConfig.leadHedeWidth - 0, a = 0, (W = this.arrowGroup) == null || W.add(new A({
764
772
  name: "arrow_box",
765
773
  cursor: "",
766
- style: X(b({
774
+ style: E(D({
767
775
  x: t,
768
776
  y: i + 10,
769
- text: `${(M == null ? void 0 : M.heart_style) || ""}`
777
+ text: `${(H == null ? void 0 : H.heart_style) || ""}`
770
778
  }, n), {
771
779
  fill: "#333"
772
780
  }),
773
- onclick: (x) => {
781
+ onclick: (M) => {
774
782
  !this.heartFight.mode && this.heartFight.isClickArrow;
775
783
  },
776
- oncontextmenu: (x) => {
777
- x.event.preventDefault(), !this.heartFight.mode && this.heartFight.isClickArrow;
784
+ oncontextmenu: (M) => {
785
+ M.event.preventDefault(), !this.heartFight.mode && this.heartFight.isClickArrow;
778
786
  }
779
787
  }));
780
- let D = t, O = 0;
788
+ let b = t, N = 0;
781
789
  const S = this.heartBeatPosition[this.heartFight.showIdxPai][R + 1] || null;
782
790
  if (this.heartFight.isHeartRateCalculatedBasedOnInterval)
783
791
  if (R > 0) {
784
- const x = this.heartBeatPosition[this.heartFight.showIdxPai][R - 1];
785
- if (x) {
786
- const N = (x.position || 0) - e;
787
- if (!this.leadModel.isContinuous && !this.leadModel.add && N > (this.slidingWindowInfo.points || 0))
792
+ const M = this.heartBeatPosition[this.heartFight.showIdxPai][R - 1];
793
+ if (M) {
794
+ const T = (M.position || 0) - e;
795
+ if (!this.leadModel.isContinuous && !this.leadModel.add && T > (this.slidingWindowInfo.points || 0))
788
796
  continue;
789
- D = N * (l || 0) + this.leadHeadConfig.leadHedeWidth, O = t, r = oe(
790
- Math.abs(((M == null ? void 0 : M.position) || 0) - (x.position || 0)) * (l || 0),
797
+ b = T * (l || 0) + this.leadHeadConfig.leadHedeWidth, N = t, r = oe(
798
+ Math.abs(((H == null ? void 0 : H.position) || 0) - (M.position || 0)) * (l || 0),
791
799
  this.waveConfigs[this.heartFight.showIdxPai].speed,
792
800
  this.gridConfig.cellMg,
793
801
  1
@@ -800,67 +808,67 @@ let c = class extends ee {
800
808
  continue;
801
809
  if (((S == null ? void 0 : S.position) || 0) - this.addSlidingWindowInfo.startInd > (this.addSlidingWindowInfo.points || 0))
802
810
  break;
803
- D = t, O = h * (l || 0) + this.leadHeadConfig.leadHedeWidth, o = (S == null ? void 0 : S.heartrate) || 0;
811
+ b = t, N = h * (l || 0) + this.leadHeadConfig.leadHedeWidth, o = (S == null ? void 0 : S.heartrate) || 0;
804
812
  }
805
813
  if (a = 0, this.heartFight.heartrate) {
806
814
  s = ((I = this.AssistCtx) == null ? void 0 : I.measureText(`${o || ""}`).width) || 0;
807
- const x = (O - D) / 2 - s / 2 + D;
808
- (y = this.arrowGroup) == null || y.add(new F({
815
+ const M = (N - b) / 2 - s / 2 + b;
816
+ (y = this.arrowGroup) == null || y.add(new A({
809
817
  cursor: "",
810
- style: b({
811
- x,
818
+ style: D({
819
+ x: M,
812
820
  y: a + i + 5,
813
821
  text: `${o || ""}`
814
822
  }, n)
815
823
  })), a += 12;
816
824
  }
817
825
  if (this.heartFight.interval) {
818
- let x = `${(S == null ? void 0 : S.interval) || ""}`;
819
- this.heartFight.isIntervalCalculatedBasedOnHeartRate && (x = `${Math.round(6e4 / o)}`), s = ((u = this.AssistCtx) == null ? void 0 : u.measureText(x).width) || 0;
820
- const N = (O - D) / 2 - s / 2 + D;
821
- (L = this.arrowGroup) == null || L.add(new F({
826
+ let M = `${(S == null ? void 0 : S.interval) || ""}`;
827
+ this.heartFight.isIntervalCalculatedBasedOnHeartRate && (M = `${Math.round(6e4 / o)}`), s = ((g = this.AssistCtx) == null ? void 0 : g.measureText(M).width) || 0;
828
+ const T = (N - b) / 2 - s / 2 + b;
829
+ (L = this.arrowGroup) == null || L.add(new A({
822
830
  cursor: "",
823
- style: b({
824
- x: N,
831
+ style: D({
832
+ x: T,
825
833
  y: a + i + 5,
826
- text: x
834
+ text: M
827
835
  }, n)
828
836
  })), a += 12;
829
837
  }
830
838
  if (this.heartFight.qrstCompany) {
831
- const x = (S == null ? void 0 : S.qrstCompany) || "";
832
- s = ((H = this.AssistCtx) == null ? void 0 : H.measureText(x).width) || 0;
833
- const N = (O - D) / 2 - s / 2 + D;
834
- (v = this.arrowGroup) == null || v.add(new F({
839
+ const M = (S == null ? void 0 : S.qrstCompany) || "";
840
+ s = ((x = this.AssistCtx) == null ? void 0 : x.measureText(M).width) || 0;
841
+ const T = (N - b) / 2 - s / 2 + b;
842
+ (v = this.arrowGroup) == null || v.add(new A({
835
843
  cursor: "",
836
- style: b({
837
- x: N,
844
+ style: D({
845
+ x: T,
838
846
  y: a + i + 5,
839
- text: x
847
+ text: M
840
848
  }, n)
841
849
  })), a += 12;
842
850
  }
843
851
  if (this.heartFight.telectricalaxis) {
844
- const x = `${(S == null ? void 0 : S.telectricalaxis) || ""}`;
845
- s = ((C = this.AssistCtx) == null ? void 0 : C.measureText(x).width) || 0;
846
- const N = (O - D) / 2 - s / 2 + D;
847
- (p = this.arrowGroup) == null || p.add(new F({
852
+ const M = `${(S == null ? void 0 : S.telectricalaxis) || ""}`;
853
+ s = ((C = this.AssistCtx) == null ? void 0 : C.measureText(M).width) || 0;
854
+ const T = (N - b) / 2 - s / 2 + b;
855
+ (c = this.arrowGroup) == null || c.add(new A({
848
856
  cursor: "",
849
- style: b({
850
- x: N,
857
+ style: D({
858
+ x: T,
851
859
  y: a + i + 5,
852
- text: x
860
+ text: M
853
861
  }, n)
854
862
  }));
855
863
  }
856
864
  }
857
- (A = this.arrowGroup) != null && A.__zr || (V = this.sceneIns) == null || V.add(this.arrowGroup);
865
+ (P = this.arrowGroup) != null && P.__zr || (V = this.sceneIns) == null || V.add(this.arrowGroup);
858
866
  }
859
867
  arrowLoopClick(e, t) {
860
868
  this.$emit("notifyHeardBeat", he.clone(e)), this.currentHeardBeat.heardBeat = e, this.currentHeardBeat.ele = t, this.drawHeardBeatLine();
861
869
  }
862
870
  drawHeardBeatLine(e = 0) {
863
- var a, n, o, r, l, d, h, f, g, W, I, y, u, L, H;
871
+ var a, n, o, r, l, d, h, f, u, W, I, y, g, L, x;
864
872
  if (!this.currentHeardBeat.heardBeat)
865
873
  return;
866
874
  (a = this.heardBeatLineGroup) == null || a.removeAll();
@@ -874,19 +882,19 @@ let c = class extends ee {
874
882
  if ((n = this.analyseValues[this.singleModeConfig.defaultSelect]) != null && n[this.currentHeardBeat.heardBeat.index])
875
883
  t = ((l = (r = this.analyseValues[this.singleModeConfig.defaultSelect]) == null ? void 0 : r[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : l.KeyPosByBeat) || t;
876
884
  else {
877
- let p = this.analyseValues.find((A) => {
885
+ let c = this.analyseValues.find((P) => {
878
886
  var V;
879
- return (V = A[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : V.KeyPosByBeat;
887
+ return (V = P[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : V.KeyPosByBeat;
880
888
  });
881
- if (!p)
889
+ if (!c)
882
890
  break e;
883
- p && (t = (o = p[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : o.KeyPosByBeat), p = null;
891
+ c && (t = (o = c[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : o.KeyPosByBeat), c = null;
884
892
  }
885
- for (const p in t)
886
- if (this.heardBeatLineKeys.includes(p)) {
887
- if (i = (t[p] - this.slidingWindowInfo.startInd) * (v[C].step || 0), this.isLeadOff(C) || this.isLeadDel(C))
893
+ for (const c in t)
894
+ if (this.heardBeatLineKeys.includes(c)) {
895
+ if (i = (t[c] - this.slidingWindowInfo.startInd) * (v[C].step || 0), this.isLeadOff(C) || this.isLeadDel(C))
888
896
  continue;
889
- if (!this.leadModel.isContinuous && t[p] - this.slidingWindowInfo.startInd > (this.slidingWindowInfo.points || 0))
897
+ if (!this.leadModel.isContinuous && t[c] - this.slidingWindowInfo.startInd > (this.slidingWindowInfo.points || 0))
890
898
  break e;
891
899
  s = v[C], (d = this.heardBeatLineGroup) == null || d.add(this.createHeardBeatLine(s.pos[0] + i, s.pos[1], this.singleModeConfig.defaultSelect + "_" + C, "single"));
892
900
  }
@@ -895,36 +903,36 @@ let c = class extends ee {
895
903
  } else {
896
904
  let v = this.getRednerPoints(), C = this.getAddRednerPoints();
897
905
  e:
898
- for (let p = 0; p < v.length; p++) {
899
- t = ((f = (h = this.analyseValues[p]) == null ? void 0 : h[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : f.KeyPosByBeat) || t;
900
- for (const A in t)
901
- if (this.heardBeatLineKeys.includes(A) && Object.prototype.hasOwnProperty.call(t, A)) {
902
- if (i = (t[A] - this.slidingWindowInfo.startInd) * (v[p].step || 0), this.isLeadOff(p) || this.isLeadDel(p))
906
+ for (let c = 0; c < v.length; c++) {
907
+ t = ((f = (h = this.analyseValues[c]) == null ? void 0 : h[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : f.KeyPosByBeat) || t;
908
+ for (const P in t)
909
+ if (this.heardBeatLineKeys.includes(P) && Object.prototype.hasOwnProperty.call(t, P)) {
910
+ if (i = (t[P] - this.slidingWindowInfo.startInd) * (v[c].step || 0), this.isLeadOff(c) || this.isLeadDel(c))
903
911
  continue;
904
- if (e > t[A] || !this.leadModel.isContinuous && t[A] - this.slidingWindowInfo.startInd > (this.slidingWindowInfo.points || 0) || (s = v[p], this.leadModel.isContinuous && p > this.leadModel.line - 1))
912
+ if (e > t[P] || !this.leadModel.isContinuous && t[P] - this.slidingWindowInfo.startInd > (this.slidingWindowInfo.points || 0) || (s = v[c], this.leadModel.isContinuous && c > this.leadModel.line - 1))
905
913
  break e;
906
- (g = this.heardBeatLineGroup) == null || g.add(this.createHeardBeatLine(s.pos[0] + i, s.pos[1], p + "_" + p, "rowAndCol"));
914
+ (u = this.heardBeatLineGroup) == null || u.add(this.createHeardBeatLine(s.pos[0] + i, s.pos[1], c + "_" + c, "rowAndCol"));
907
915
  }
908
916
  }
909
917
  e:
910
- for (let p = 0; p < C.length; p++)
911
- if (!!((W = this.analyseValues[p]) != null && W[this.currentHeardBeat.heardBeat.index])) {
912
- t = ((y = (I = this.analyseValues[p]) == null ? void 0 : I[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : y.KeyPosByBeat) || t;
913
- for (const A in t)
914
- if (this.heardBeatLineKeys.includes(A)) {
915
- if (i = (t[A] - this.slidingWindowInfo.startInd) * (C[p].step || 0), this.isLeadOff(this.longLeadConfig.leadIdxs[p]) && this.isLeadDel(this.longLeadConfig.leadIdxs[p]))
918
+ for (let c = 0; c < C.length; c++)
919
+ if (!!((W = this.analyseValues[c]) != null && W[this.currentHeardBeat.heardBeat.index])) {
920
+ t = ((y = (I = this.analyseValues[c]) == null ? void 0 : I[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : y.KeyPosByBeat) || t;
921
+ for (const P in t)
922
+ if (this.heardBeatLineKeys.includes(P)) {
923
+ if (i = (t[P] - this.slidingWindowInfo.startInd) * (C[c].step || 0), this.isLeadOff(this.longLeadConfig.leadIdxs[c]) && this.isLeadDel(this.longLeadConfig.leadIdxs[c]))
916
924
  continue;
917
- if (e > t[A])
925
+ if (e > t[P])
918
926
  break e;
919
- s = C[p], (u = this.heardBeatLineGroup) == null || u.add(this.createHeardBeatLine(s.pos[0] + i, s.pos[1], this.longLeadConfig.leadIdxs[p] + "_" + p, "add"));
927
+ s = C[c], (g = this.heardBeatLineGroup) == null || g.add(this.createHeardBeatLine(s.pos[0] + i, s.pos[1], this.longLeadConfig.leadIdxs[c] + "_" + c, "add"));
920
928
  }
921
929
  }
922
930
  v = null, C = null;
923
931
  }
924
- (L = this.heardBeatLineGroup) != null && L.__zr || (H = this.sceneIns) == null || H.add(this.heardBeatLineGroup), t = null;
932
+ (L = this.heardBeatLineGroup) != null && L.__zr || (x = this.sceneIns) == null || x.add(this.heardBeatLineGroup), t = null;
925
933
  }
926
934
  createHeardBeatLine(e, t, i, s) {
927
- return new j({
935
+ return new _({
928
936
  name: i,
929
937
  cursor: "",
930
938
  shape: {
@@ -954,7 +962,7 @@ let c = class extends ee {
954
962
  pos: [t, i],
955
963
  startInd: this.addSlidingWindowInfo.startInd || 0,
956
964
  endInd: this.addSlidingWindowInfo.endInd || 0,
957
- data: a.slice(this.addSlidingWindowInfo.startInd, this.addSlidingWindowInfo.endInd).map((l, d) => this.waveConfigs[s].gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[s].leadName) ? T(this.waveConfigs[s].sensitivity, l, o / 2) : T(this.waveConfigs[s].sensitivity, l, o)).map((l, d) => [d * (n || 0), -l]),
965
+ data: a.slice(this.addSlidingWindowInfo.startInd, this.addSlidingWindowInfo.endInd).map((l, d) => this.waveConfigs[s].gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[s].leadName) ? O(this.waveConfigs[s].sensitivity, l, o / 2) : O(this.waveConfigs[s].sensitivity, l, o)).map((l, d) => [d * (n || 0), -l]),
958
966
  sens: o,
959
967
  step: n
960
968
  }));
@@ -1003,7 +1011,7 @@ let c = class extends ee {
1003
1011
  endInd: r,
1004
1012
  sens: n,
1005
1013
  step: a,
1006
- data: s.slice(o, r).map((f, g) => this.waveConfigs[i].gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[i].leadName) ? T(this.waveConfigs[i].sensitivity, f, n / 2) : T(this.waveConfigs[i].sensitivity, f, n)).map((f, g) => [g * (a || 0), -f])
1014
+ data: s.slice(o, r).map((f, u) => this.waveConfigs[i].gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[i].leadName) ? O(this.waveConfigs[i].sensitivity, f, n / 2) : O(this.waveConfigs[i].sensitivity, f, n)).map((f, u) => [u * (a || 0), -f])
1007
1015
  }), i++);
1008
1016
  }
1009
1017
  return l;
@@ -1042,7 +1050,7 @@ let c = class extends ee {
1042
1050
  createLeadSensNams(e, t, i) {
1043
1051
  var a;
1044
1052
  let s = t;
1045
- this.leadHeadConfig.isShowLeadCalibration === !1 && (this.leadModel.isSingleMode ? s = t - this.leadHeadConfig.leadHedeWidth + 12 : s = t - this.leadHeadConfig.leadHedeWidth + 5), this.leadHeadConfig.isShowLeadCalibration && this.leadHeadConfig.isCalibrationDisplayedBelow && (t <= this.leadHeadConfig.leadHedeWidth && (this.leadModel.isSingleMode ? s = t - this.leadHeadConfig.leadHedeWidth + 12 : s = t - this.leadHeadConfig.leadHedeWidth + 5), i = i + 40), (a = this.leadHeadNameGroup) == null || a.add(new F({
1053
+ this.leadHeadConfig.isShowLeadCalibration === !1 && (this.leadModel.isSingleMode ? s = t - this.leadHeadConfig.leadHedeWidth + 12 : s = t - this.leadHeadConfig.leadHedeWidth + 5), this.leadHeadConfig.isShowLeadCalibration && this.leadHeadConfig.isCalibrationDisplayedBelow && (t <= this.leadHeadConfig.leadHedeWidth && (this.leadModel.isSingleMode ? s = t - this.leadHeadConfig.leadHedeWidth + 12 : s = t - this.leadHeadConfig.leadHedeWidth + 5), i = i + 40), (a = this.leadHeadNameGroup) == null || a.add(new A({
1046
1054
  style: {
1047
1055
  x: s,
1048
1056
  y: i,
@@ -1056,7 +1064,7 @@ let c = class extends ee {
1056
1064
  createLeadName(e, t, i, s = !1) {
1057
1065
  var n;
1058
1066
  let a = t;
1059
- this.leadHeadConfig.isShowLeadCalibration === !1 && (this.leadModel.isSingleMode ? a = t - this.leadHeadConfig.leadHedeWidth + 12 : a = t - this.leadHeadConfig.leadHedeWidth + 5), this.leadHeadConfig.isShowLeadCalibration && this.leadHeadConfig.isCalibrationDisplayedBelow && (t <= this.leadHeadConfig.leadHedeWidth && (this.leadModel.isSingleMode ? a = t - this.leadHeadConfig.leadHedeWidth + 12 : a = t - this.leadHeadConfig.leadHedeWidth + 5), i = i + 20), (n = this.leadHeadNameGroup) == null || n.add(new F({
1067
+ this.leadHeadConfig.isShowLeadCalibration === !1 && (this.leadModel.isSingleMode ? a = t - this.leadHeadConfig.leadHedeWidth + 12 : a = t - this.leadHeadConfig.leadHedeWidth + 5), this.leadHeadConfig.isShowLeadCalibration && this.leadHeadConfig.isCalibrationDisplayedBelow && (t <= this.leadHeadConfig.leadHedeWidth && (this.leadModel.isSingleMode ? a = t - this.leadHeadConfig.leadHedeWidth + 12 : a = t - this.leadHeadConfig.leadHedeWidth + 5), i = i + 20), (n = this.leadHeadNameGroup) == null || n.add(new A({
1060
1068
  style: {
1061
1069
  x: a,
1062
1070
  y: i,
@@ -1067,7 +1075,7 @@ let c = class extends ee {
1067
1075
  },
1068
1076
  oncontextmenu: (o) => {
1069
1077
  o.event.preventDefault(), this.$emit("notiifyLeadName", {
1070
- event: X(b({}, o), {
1078
+ event: E(D({}, o), {
1071
1079
  name: this.leadNames[e],
1072
1080
  idx: e
1073
1081
  }),
@@ -1076,7 +1084,7 @@ let c = class extends ee {
1076
1084
  },
1077
1085
  onclick: (o) => {
1078
1086
  this.$emit("notiifyLeadName", {
1079
- event: X(b({}, o), {
1087
+ event: E(D({}, o), {
1080
1088
  name: this.leadNames[e],
1081
1089
  idx: e
1082
1090
  }),
@@ -1087,7 +1095,7 @@ let c = class extends ee {
1087
1095
  }
1088
1096
  createLeadOffAndDel(e, t, i) {
1089
1097
  var s;
1090
- (this.isLeadOff(e) || this.isLeadDel(e)) && ((s = this.leadHeadOffAndDelGroup) == null || s.add(new F({
1098
+ (this.isLeadOff(e) || this.isLeadDel(e)) && ((s = this.leadHeadOffAndDelGroup) == null || s.add(new A({
1091
1099
  cursor: "",
1092
1100
  style: {
1093
1101
  x: t,
@@ -1130,6 +1138,26 @@ let c = class extends ee {
1130
1138
  };
1131
1139
  i - this.dbClickWaveFromTime < 400 ? (this.dbClickWaveFromTime = 0, s()) : this.dbClickWaveFromTime = i;
1132
1140
  }
1141
+ getScrollEndTarget() {
1142
+ var t;
1143
+ if (this.scrollConfig.isNativeScroll)
1144
+ return this.$refs[this.prefixId + "nativeScroll"];
1145
+ const e = this.$refs[this.prefixId + "vueScroll"];
1146
+ return ((t = e == null ? void 0 : e.$el) == null ? void 0 : t.querySelector(".__panel")) || null;
1147
+ }
1148
+ emitScrollPointIdx() {
1149
+ !this.latestScrollPointIdx || this.$emit("notifyScrollPointIdx", this.latestScrollPointIdx);
1150
+ }
1151
+ scheduleScrollEndFallback() {
1152
+ this.usesScrollEnd || (this.scrollEndTimer && clearTimeout(this.scrollEndTimer), this.scrollEndTimer = setTimeout(() => {
1153
+ this.scrollEndTimer = null, this.emitScrollPointIdx();
1154
+ }, 100));
1155
+ }
1156
+ bindScrollEnd() {
1157
+ this.scrollEndTarget && this.usesScrollEnd && this.scrollEndTarget.removeEventListener("scrollend", this.handleScrollEnd);
1158
+ const e = this.getScrollEndTarget();
1159
+ this.scrollEndTarget = e, this.usesScrollEnd = Boolean(e && "onscrollend" in e), this.usesScrollEnd && e && e.addEventListener("scrollend", this.handleScrollEnd);
1160
+ }
1133
1161
  nativeScrollFunc(e) {
1134
1162
  this.scrollCommon(e.target.scrollLeft || 0);
1135
1163
  }
@@ -1138,10 +1166,10 @@ let c = class extends ee {
1138
1166
  }
1139
1167
  scrollCommon(e) {
1140
1168
  const t = Math.max(0, e || 0), i = G(t, this.publicStep || 1);
1141
- i !== this.lastScrollPointIdx && (this.lastScrollPointIdx = i, this.lastScrollLeft = t, this.isWaveRangeLoaded(i) ? (this.pendingScrollPointIdx = null, this.scrollWaveFrom(i), this.scrollRuler(i), this.scrollArrow(i)) : this.pendingScrollPointIdx = i, this.$emit("notifyScrollPointIdx", {
1169
+ i !== this.lastScrollPointIdx && (this.lastScrollPointIdx = i, this.lastScrollLeft = t, this.isWaveRangeLoaded(i) ? (this.pendingScrollPointIdx = null, this.scrollWaveFrom(i), this.scrollRuler(i), this.scrollArrow(i)) : this.pendingScrollPointIdx = i, this.latestScrollPointIdx = {
1142
1170
  slidIdxs: i,
1143
1171
  scrollLeft: t
1144
- }));
1172
+ }, this.scheduleScrollEndFallback());
1145
1173
  }
1146
1174
  scrollWaveFrom(e) {
1147
1175
  this.slidingWindowInfo.startInd = e, this.slidingWindowInfo.endInd = e + (this.slidingWindowInfo.points || 0), this.addSlidingWindowInfo.startInd = e, this.addSlidingWindowInfo.endInd = e + (this.addSlidingWindowInfo.points || 0);
@@ -1149,7 +1177,7 @@ let c = class extends ee {
1149
1177
  this.waveDataCopy = t, this.addWaveDataCopy = i, this.updateWaveGroupPoints(this.rowAndColwaveFromGroup, t), this.updateWaveGroupPoints(this.addwaveFromGroup, i);
1150
1178
  }
1151
1179
  scrollRuler(e) {
1152
- const t = _(this.leadModel.isSingleMode ? 0 : e, this.leadModel.publicSampleRate || 0) / 1e3;
1180
+ const t = X(this.leadModel.isSingleMode ? 0 : e, this.leadModel.publicSampleRate || 0) / 1e3;
1153
1181
  this.drawRuler(t);
1154
1182
  }
1155
1183
  scrollArrow(e) {
@@ -1160,47 +1188,47 @@ w([
1160
1188
  m({
1161
1189
  default: () => ["Pstart", "Pend", "QRSstart", "QRSend", "Tstart", "Tend"]
1162
1190
  })
1163
- ], c.prototype, "heardBeatLineKeys", 2);
1191
+ ], p.prototype, "heardBeatLineKeys", 2);
1164
1192
  w([
1165
1193
  m({
1166
1194
  required: !0,
1167
1195
  type: Number,
1168
1196
  validator: (e) => typeof e == "number"
1169
1197
  })
1170
- ], c.prototype, "width", 2);
1198
+ ], p.prototype, "width", 2);
1171
1199
  w([
1172
1200
  m({
1173
1201
  required: !0,
1174
1202
  type: Number,
1175
1203
  validator: (e) => typeof e == "number"
1176
1204
  })
1177
- ], c.prototype, "height", 2);
1205
+ ], p.prototype, "height", 2);
1178
1206
  w([
1179
1207
  m({
1180
1208
  default: () => []
1181
1209
  })
1182
- ], c.prototype, "waveConfigs", 2);
1210
+ ], p.prototype, "waveConfigs", 2);
1183
1211
  w([
1184
1212
  m({
1185
1213
  default: () => []
1186
1214
  })
1187
- ], c.prototype, "waveLists", 2);
1215
+ ], p.prototype, "waveLists", 2);
1188
1216
  w([
1189
1217
  m({
1190
1218
  default: () => 0,
1191
1219
  type: Number
1192
1220
  })
1193
- ], c.prototype, "waveDataVersion", 2);
1221
+ ], p.prototype, "waveDataVersion", 2);
1194
1222
  w([
1195
1223
  m({
1196
1224
  default: () => []
1197
1225
  })
1198
- ], c.prototype, "leadNames", 2);
1226
+ ], p.prototype, "leadNames", 2);
1199
1227
  w([
1200
1228
  m({
1201
1229
  default: () => []
1202
1230
  })
1203
- ], c.prototype, "analyseValues", 2);
1231
+ ], p.prototype, "analyseValues", 2);
1204
1232
  w([
1205
1233
  m({
1206
1234
  default: () => ({
@@ -1209,12 +1237,12 @@ w([
1209
1237
  leadHedeLineWidth: 2
1210
1238
  })
1211
1239
  })
1212
- ], c.prototype, "leadHeadConfig", 2);
1240
+ ], p.prototype, "leadHeadConfig", 2);
1213
1241
  w([
1214
1242
  m({
1215
1243
  required: !0
1216
1244
  })
1217
- ], c.prototype, "leadModel", 2);
1245
+ ], p.prototype, "leadModel", 2);
1218
1246
  w([
1219
1247
  m({
1220
1248
  default: () => ({
@@ -1223,7 +1251,7 @@ w([
1223
1251
  speedName: ""
1224
1252
  })
1225
1253
  })
1226
- ], c.prototype, "rulerConfig", 2);
1254
+ ], p.prototype, "rulerConfig", 2);
1227
1255
  w([
1228
1256
  m({
1229
1257
  default: () => ({
@@ -1233,12 +1261,12 @@ w([
1233
1261
  fontSize: 15
1234
1262
  })
1235
1263
  })
1236
- ], c.prototype, "leadConfig", 2);
1264
+ ], p.prototype, "leadConfig", 2);
1237
1265
  w([
1238
1266
  m({
1239
1267
  required: !0
1240
1268
  })
1241
- ], c.prototype, "gridConfig", 2);
1269
+ ], p.prototype, "gridConfig", 2);
1242
1270
  w([
1243
1271
  m({
1244
1272
  default: () => ({
@@ -1247,7 +1275,7 @@ w([
1247
1275
  sens: 0
1248
1276
  })
1249
1277
  })
1250
- ], c.prototype, "measurRulerConfig", 2);
1278
+ ], p.prototype, "measurRulerConfig", 2);
1251
1279
  w([
1252
1280
  m({
1253
1281
  default: () => ({
@@ -1257,7 +1285,7 @@ w([
1257
1285
  sens: 0
1258
1286
  })
1259
1287
  })
1260
- ], c.prototype, "paralleRulerConfig", 2);
1288
+ ], p.prototype, "paralleRulerConfig", 2);
1261
1289
  w([
1262
1290
  m({
1263
1291
  default: () => ({
@@ -1265,7 +1293,7 @@ w([
1265
1293
  speed: 0
1266
1294
  })
1267
1295
  })
1268
- ], c.prototype, "magnifierRulerConfig", 2);
1296
+ ], p.prototype, "magnifierRulerConfig", 2);
1269
1297
  w([
1270
1298
  m({
1271
1299
  default: () => ({
@@ -1280,7 +1308,7 @@ w([
1280
1308
  showIdxPai: 0
1281
1309
  })
1282
1310
  })
1283
- ], c.prototype, "heartFight", 2);
1311
+ ], p.prototype, "heartFight", 2);
1284
1312
  w([
1285
1313
  m({
1286
1314
  default: () => ({
@@ -1288,14 +1316,14 @@ w([
1288
1316
  leadNames: [1, 6, 10]
1289
1317
  })
1290
1318
  })
1291
- ], c.prototype, "longLeadConfig", 2);
1319
+ ], p.prototype, "longLeadConfig", 2);
1292
1320
  w([
1293
1321
  m({
1294
1322
  default: () => ({
1295
1323
  defaultSelect: 1
1296
1324
  })
1297
1325
  })
1298
- ], c.prototype, "singleModeConfig", 2);
1326
+ ], p.prototype, "singleModeConfig", 2);
1299
1327
  w([
1300
1328
  m({
1301
1329
  default: () => ({
@@ -1310,38 +1338,38 @@ w([
1310
1338
  }
1311
1339
  })
1312
1340
  })
1313
- ], c.prototype, "scrollConfig", 2);
1341
+ ], p.prototype, "scrollConfig", 2);
1314
1342
  w([
1315
1343
  m({
1316
1344
  default: () => 0
1317
1345
  })
1318
- ], c.prototype, "dataTotalTimes", 2);
1346
+ ], p.prototype, "dataTotalTimes", 2);
1319
1347
  w([
1320
1348
  m({
1321
1349
  default: () => 0
1322
1350
  })
1323
- ], c.prototype, "dataTotalLength", 2);
1351
+ ], p.prototype, "dataTotalLength", 2);
1324
1352
  w([
1325
1353
  m({
1326
1354
  default: () => ""
1327
1355
  })
1328
- ], c.prototype, "prefixId", 2);
1356
+ ], p.prototype, "prefixId", 2);
1329
1357
  w([
1330
1358
  m({
1331
1359
  default: () => 0
1332
1360
  })
1333
- ], c.prototype, "posStart", 2);
1361
+ ], p.prototype, "posStart", 2);
1334
1362
  w([
1335
- K(100, { leading: !0, trailing: !0 })
1336
- ], c.prototype, "nativeScrollFunc", 1);
1363
+ Y(100, { leading: !0, trailing: !0 })
1364
+ ], p.prototype, "nativeScrollFunc", 1);
1337
1365
  w([
1338
- K(100, { leading: !0, trailing: !0 })
1339
- ], c.prototype, "handleScroll", 1);
1340
- c = w([
1366
+ Y(100, { leading: !0, trailing: !0 })
1367
+ ], p.prototype, "handleScroll", 1);
1368
+ p = w([
1341
1369
  te({
1342
1370
  name: "Methods"
1343
1371
  })
1344
- ], c);
1372
+ ], p);
1345
1373
  export {
1346
- c as default
1374
+ p as default
1347
1375
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./style/index.css");require("vue");const u=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const a=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js"),d=require("../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.7.16/node_modules/vuescroll/dist/vuescroll-native.js"),h=require("../MeasuringRuler/index2.js"),c=require("../MagnifierWave/index.js"),p=require("../ParallelRuler/index2.js"),m=require("../BackgroundGrid/index2.js"),f=require("./method.js");var v=Object.defineProperty,g=Object.getOwnPropertyDescriptor,t=(e,r,s,o)=>{for(var i=o>1?void 0:o?g(r,s):r,n=e.length-1,l;n>=0;n--)(l=e[n])&&(i=(o?l(r,s,i):l(i))||i);return o&&i&&v(r,s,i),i};exports.default=class extends u.mixins(f.default){constructor(){super(...arguments),this.repaintTimer=null,this.refreshFrame=null}watchVuescrollConfig(){this.repaint()}watchAnalyseValues(){this.nearestHeartInfo={analyseValue:null,insertInfo:null},this.repaint()}watchsingleModeConfig(){this.repaint()}watchWaveConfigs(){this.repaint()}watchWaveDataVersion(){this.refreshFrame===null&&(this.refreshFrame=requestAnimationFrame(()=>{this.refreshFrame=null,this.refreshVisibleWaveData()}))}watchLeadHeadConfig(){var e,r;(e=this.leadHeadGroup)==null||e.removeAll(),(r=this.sceneIns)==null||r.remove(this.leadHeadGroup),this.drawLeadHead()}watchLeadModel(){this.repaint()}watchWidth(){this.repaint()}watchHeight(){this.repaint()}watchLongLeadConfig(){var e;(e=this.sceneIns)==null||e.clear(),this.init()}watchPosStart(){this.registPostStart()}destroyed(){this.repaintTimer&&clearTimeout(this.repaintTimer),this.repaintTimer=null,this.refreshFrame!==null&&cancelAnimationFrame(this.refreshFrame),this.refreshFrame=null}repaint(e=!0){if(!e){this.combinationDrawing(e);return}this.repaintTimer&&clearTimeout(this.repaintTimer),this.repaintTimer=setTimeout(()=>{var r,s;this.repaintTimer=null,e&&((r=this.sceneIns)==null||r.clear(),(s=this.sceneIns)==null||s.resize({width:this.canvasContainer.width,height:this.canvasContainer.height}),this.initCreatedConfig()),this.combinationDrawing(e)},200)}created(){this.initCreatedConfig()}mounted(){this.init()}};t([a.Watch("vuescrollConfig",{deep:!0})],exports.default.prototype,"watchVuescrollConfig",1);t([a.Watch("analyseValues",{deep:!0})],exports.default.prototype,"watchAnalyseValues",1);t([a.Watch("singleModeConfig",{deep:!0})],exports.default.prototype,"watchsingleModeConfig",1);t([a.Watch("waveConfigs",{deep:!0})],exports.default.prototype,"watchWaveConfigs",1);t([a.Watch("waveDataVersion")],exports.default.prototype,"watchWaveDataVersion",1);t([a.Watch("leadHeadConfig",{deep:!0})],exports.default.prototype,"watchLeadHeadConfig",1);t([a.Watch("leadModel",{deep:!0})],exports.default.prototype,"watchLeadModel",1);t([a.Watch("width")],exports.default.prototype,"watchWidth",1);t([a.Watch("height")],exports.default.prototype,"watchHeight",1);t([a.Watch("longLeadConfig",{deep:!0})],exports.default.prototype,"watchLongLeadConfig",1);t([a.Watch("posStart")],exports.default.prototype,"watchPosStart",1);exports.default=t([u.default({name:"CommonWaveForm",components:{vueScroll:d.default,MXBackgroundGrid:m.default,MXMeasuringRuler:h.default,MXParallelRuler:p.default,MXMagnifierWave:c.default}})],exports.default);
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./style/index.css");require("vue");const u=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const r=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js"),d=require("../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.7.16/node_modules/vuescroll/dist/vuescroll-native.js"),h=require("../MeasuringRuler/index2.js"),c=require("../MagnifierWave/index.js"),p=require("../ParallelRuler/index2.js"),m=require("../BackgroundGrid/index2.js"),f=require("./method.js");var v=Object.defineProperty,g=Object.getOwnPropertyDescriptor,t=(e,a,s,o)=>{for(var i=o>1?void 0:o?g(a,s):a,n=e.length-1,l;n>=0;n--)(l=e[n])&&(i=(o?l(a,s,i):l(i))||i);return o&&i&&v(a,s,i),i};exports.default=class extends u.mixins(f.default){constructor(){super(...arguments),this.repaintTimer=null,this.refreshFrame=null}watchVuescrollConfig(){this.repaint(),this.$nextTick(()=>this.bindScrollEnd())}watchAnalyseValues(){this.nearestHeartInfo={analyseValue:null,insertInfo:null},this.repaint()}watchsingleModeConfig(){this.repaint()}watchWaveConfigs(){this.repaint()}watchWaveDataVersion(){this.refreshFrame===null&&(this.refreshFrame=requestAnimationFrame(()=>{this.refreshFrame=null,this.refreshVisibleWaveData()}))}watchLeadHeadConfig(){var e,a;(e=this.leadHeadGroup)==null||e.removeAll(),(a=this.sceneIns)==null||a.remove(this.leadHeadGroup),this.drawLeadHead()}watchLeadModel(){this.repaint()}watchWidth(){this.repaint()}watchHeight(){this.repaint()}watchLongLeadConfig(){var e;(e=this.sceneIns)==null||e.clear(),this.init()}watchPosStart(){this.registPostStart()}destroyed(){this.repaintTimer&&clearTimeout(this.repaintTimer),this.repaintTimer=null,this.refreshFrame!==null&&cancelAnimationFrame(this.refreshFrame),this.refreshFrame=null}repaint(e=!0){if(!e){this.combinationDrawing(e);return}this.repaintTimer&&clearTimeout(this.repaintTimer),this.repaintTimer=setTimeout(()=>{var a,s;this.repaintTimer=null,e&&((a=this.sceneIns)==null||a.clear(),(s=this.sceneIns)==null||s.resize({width:this.canvasContainer.width,height:this.canvasContainer.height}),this.initCreatedConfig()),this.combinationDrawing(e)},200)}created(){this.initCreatedConfig()}mounted(){this.init(),this.$nextTick(()=>this.bindScrollEnd())}};t([r.Watch("vuescrollConfig",{deep:!0})],exports.default.prototype,"watchVuescrollConfig",1);t([r.Watch("analyseValues",{deep:!0})],exports.default.prototype,"watchAnalyseValues",1);t([r.Watch("singleModeConfig",{deep:!0})],exports.default.prototype,"watchsingleModeConfig",1);t([r.Watch("waveConfigs",{deep:!0})],exports.default.prototype,"watchWaveConfigs",1);t([r.Watch("waveDataVersion")],exports.default.prototype,"watchWaveDataVersion",1);t([r.Watch("leadHeadConfig",{deep:!0})],exports.default.prototype,"watchLeadHeadConfig",1);t([r.Watch("leadModel",{deep:!0})],exports.default.prototype,"watchLeadModel",1);t([r.Watch("width")],exports.default.prototype,"watchWidth",1);t([r.Watch("height")],exports.default.prototype,"watchHeight",1);t([r.Watch("longLeadConfig",{deep:!0})],exports.default.prototype,"watchLongLeadConfig",1);t([r.Watch("posStart")],exports.default.prototype,"watchPosStart",1);exports.default=t([u.default({name:"CommonWaveForm",components:{vueScroll:d.default,MXBackgroundGrid:m.default,MXMeasuringRuler:h.default,MXParallelRuler:p.default,MXMagnifierWave:c.default}})],exports.default);
@@ -160,6 +160,13 @@ export default class Methods extends Vue {
160
160
  protected sceneIsMouseDownX: number;
161
161
  protected lastScrollPointIdx: number;
162
162
  protected lastScrollLeft: number;
163
+ protected latestScrollPointIdx: {
164
+ slidIdxs: number;
165
+ scrollLeft: number;
166
+ } | null;
167
+ protected scrollEndTarget: HTMLElement | null;
168
+ protected scrollEndTimer: ReturnType<typeof setTimeout> | null;
169
+ protected usesScrollEnd: boolean;
163
170
  /** 滚动到未加载区间时暂存目标,数据到齐后再切换视图 */
164
171
  protected pendingScrollPointIdx: number | null;
165
172
  /** 实际画布容器大小 */
@@ -286,6 +293,11 @@ export default class Methods extends Vue {
286
293
  protected onContextmenu(e: ElementEvent, type: 'single' | 'rowAndCol' | 'add'): void;
287
294
  /** 波形点击事件,双击放大波形 */
288
295
  protected onDbClickWaveFrom(e: ElementEvent, type: 'single' | 'rowAndCol' | 'add'): void;
296
+ protected getScrollEndTarget(): HTMLElement | null;
297
+ protected emitScrollPointIdx(): void;
298
+ protected scheduleScrollEndFallback(): void;
299
+ protected handleScrollEnd: () => void;
300
+ protected bindScrollEnd(): void;
289
301
  /** 原生滚动条事件 */
290
302
  protected nativeScrollFunc(event: Event): void;
291
303
  /** 自定义滚动事件监听 */
@@ -1 +1 @@
1
- "use strict";var V=Object.defineProperty,z=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var X=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var k=(e,t,i)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,b=(e,t)=>{for(var i in t||(t={}))X.call(t,i)&&k(e,i,t[i]);if(N)for(var i of N(t))$.call(t,i)&&k(e,i,t[i]);return e},T=(e,t)=>z(e,j(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const q=require("vue"),Y=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const v=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),O=require("lodash"),u=require("@costy-plus/utils"),_=require("../utils/tool.js"),g=require("zrender"),K=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function E(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const Q=K(q),U=E(g);var Z=Object.defineProperty,J=Object.getOwnPropertyDescriptor,C=(e,t,i,s)=>{for(var a=s>1?void 0:s?J(t,i):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(a=(s?o(t,i,a):o(a))||a);return s&&a&&Z(t,i,a),a};exports.default=class extends Q.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.layerBgGroup=Object.freeze(null),this.leadHeadGroup=Object.freeze(null),this.splitLineGroup=Object.freeze(null),this.rowAndColwaveFromGroup=Object.freeze(null),this.singleWaveFromGroup=Object.freeze(null),this.addwaveFromGroup=Object.freeze(null),this.leadHeadNameGroup=Object.freeze(null),this.leadHeadOffAndDelGroup=Object.freeze(null),this.rulerGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.arrowHeartGroup=Object.freeze(null),this.heardBeatLineGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(10),this.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.timersCopy=Object.freeze(0),this.nearestHeartInfo=Object.freeze({analyseValue:null,insertInfo:null}),this.range=Object.freeze(5e3),this.heartBeatPosition=[],this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.ruleH=Object.freeze(40),this.splitBlockHeight=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({maxPoints:0,minPoints:0}),this.drawArea=Object.freeze({width:0,height:0}),this.vuescrollWH={width:0,height:0},this.waveDataCopy=[],this.addWaveDataCopy=[],this.singleWaveDataCopy=[],this.leadNameList=[],this.activeLeadIdx=Object.freeze(-1),this.publicStep=Object.freeze(0),this.sceneIsMouseDown=Object.freeze(!1),this.sceneIsMouseDownX=Object.freeze(0),this.lastScrollPointIdx=-1,this.lastScrollLeft=-1,this.pendingScrollPointIdx=null}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.scrollConfig.isShow&&parseInt(`${(e=this.scrollConfig.bar)==null?void 0:e.size}`)||0)||0}}destroyed(){var e,t,i,s,a,n,o,r,l,d,h,f;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(i=this.addwaveFromGroup)==null||i.removeAll(),(s=this.leadHeadGroup)==null||s.removeAll(),(a=this.splitLineGroup)==null||a.removeAll(),(n=this.leadHeadNameGroup)==null||n.removeAll(),(o=this.leadHeadOffAndDelGroup)==null||o.removeAll(),(r=this.rulerGroup)==null||r.removeAll(),(l=this.arrowGroup)==null||l.removeAll(),(d=this.arrowHeartGroup)==null||d.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(f=this.sceneIns)==null||f.dispose()}initCreatedConfig(){this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height,this.calcHeartBeatPositions(),this.initConfig()}init(){this.calcHeartBeatPositions(),this.initWaveFormPeer(),this.combinationDrawing(),this.registPostStart()}registPostStart(){this.posStart!==void 0&&this.posStart!==null&&(this.scrollConfig.isShow?this.$nextTick(()=>{var e;this.scrollConfig.isNativeScroll?(e=this.$refs[this.prefixId+"nativeScroll"])==null||e.scrollBy({left:(this.posStart||0)*(this.publicStep||1),top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({x:(this.posStart||0)*(this.publicStep||1)})}):(this.scrollWaveFrom(this.posStart),this.scrollRuler(this.posStart),this.scrollArrow(this.posStart)))}resetScroll(e=0){this.scrollConfig.isShow?this.$nextTick(()=>{var t;this.scrollConfig.isNativeScroll?(t=this.$refs[this.prefixId+"nativeScroll"])==null||t.scrollBy({left:e,top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({x:e})}):(this.scrollWaveFrom(e),this.scrollRuler(e),this.scrollArrow(e))}handleNotifyMeasurintRectPostion(e){let t=null;this.leadModel.isSingleMode&&this.singleWaveFromGroup?t=(this.singleWaveFromGroup._children||[]).find(i=>i.rectContain(e.x,e.y)||i.rectContain(e.x,e.yEnd)):(t=(this.rowAndColwaveFromGroup._children||[]).find(i=>i.rectContain(e.x,e.y)||i.rectContain(e.x,e.yEnd)),t||(t=(this.addwaveFromGroup._children||[]).find(i=>i.rectContain(e.x,e.y)||i.rectContain(e.x,e.yEnd)))),t&&this.$emit("notifyMeasurintConfig",t.sens)}combinationDrawing(e=!0){e&&(this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes()),this.drawWaveFrom()}calcHeartBeatPositions(){this.heartBeatPosition=[];let e=[],t=0;for(let i=0;i<this.analyseValues.length;i++){for(let s=1;s<this.analyseValues[i].length;s++)i!==1&&this.analyseValues[i][s].KeyPosByBeat.Rpoint===0||(this.analyseValues[i][s].AnabyBeat.VentricularRate===0||this.analyseValues[i][s].AnabyBeat.AtrialRate===0?t=0:t=Math.round(60/(this.analyseValues[i][s].AnabyBeat.VentricularRate||this.analyseValues[i][s].AnabyBeat.AtrialRate)*1e3),e.push({index:this.analyseValues[i][s].BeatID,position:this.analyseValues[i][s].KeyPosByBeat.Rpoint,heartrate:this.analyseValues[i][s].AnabyBeat.VentricularRate||this.analyseValues[i][s].AnabyBeat.AtrialRate,interval:t,telectricalaxis:this.analyseValues[i][s].AnabyBeat.TAxis===9999?this.range:this.analyseValues[i][s].AnabyBeat.TAxis,qrstCompany:(this.analyseValues[i][s].AnabyBeat.QRS_T===9999?this.range:this.analyseValues[i][s].AnabyBeat.QRS_T)+"\xB0",heart_style:this.analyseValues[i][s].heart_style}));this.heartBeatPosition.push(e)}e=null}initSlidingWindowInfo(){const e=this.publicStep||0,t=Math.ceil(this.splitPoint/e);if(this.slidingWindowInfo={points:this.slidingWindowInfo.points!==t||this.leadModel.isSingleMode?t:this.slidingWindowInfo.points,startInd:this.slidingWindowInfo.startInd||0,endInd:(this.slidingWindowInfo.startInd||0)+t},this.slidingWindowInfo.endInd>this.dataTotalLength&&(this.slidingWindowInfo.endInd=this.dataTotalLength),this.scrollConfig.isShow&&!this.leadModel.isSingleMode){const s=u.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),a=this.dataTotalLength*s;this.vuescrollWH.width=this.canvasContainer.width+(a||0)-this.splitPoint}const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:this.addSlidingWindowInfo.points!==i||this.leadModel.isSingleMode?i:this.addSlidingWindowInfo.points,startInd:this.addSlidingWindowInfo.startInd||0,endInd:(this.addSlidingWindowInfo.endInd||0)+i},this.addSlidingWindowInfo.endInd>this.dataTotalLength&&(this.addSlidingWindowInfo.endInd=this.dataTotalLength)}calcHighestAndLowestPoint(){const e=O.flattenDeep(this.waveLists);return{maxPoints:O.max(e)||0,minPoints:O.min(e)||0}}isLeadOff(e){return!!this.waveConfigs[e].isLeadOff}isLeadDel(e){return!!this.waveConfigs[e].isLeadDelete}initConfig(){var t;this.rowAndColwaveFromGroup=new g.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new g.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new g.Group({name:"addwaveFrom"}),this.leadHeadGroup=new g.Group({name:"leadHead"}),this.splitLineGroup=new g.Group({name:"splitLine"}),this.leadHeadNameGroup=new g.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new g.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new g.Group({name:"ruler"}),this.arrowGroup=new g.Group({name:"arrowLoop"}),this.arrowHeartGroup=new g.Group({name:"arrowHeart"}),this.heardBeatLineGroup=new g.Group({name:"heardBeatLine"});let e=this.canvasContainer.width;if(this.leadModel.ecgareawidth===1){const i=u.getPrintLengthToPx(((t=this.waveConfigs[0])==null?void 0:t.sampleRate)||0)+this.leadHeadConfig.leadHedeWidth;i<=e&&(e=i)}else if(this.leadModel.isContinuous){const i=u.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),s=this.dataTotalLength*i;!this.leadModel.isSingleMode&&(s||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(s||0)+this.leadHeadConfig.leadHedeWidth)}this.drawArea={width:e,height:this.canvasContainer.height-this.bottomAreaHeight-30},this.slidingWindowInfo={points:this.slidingWindowInfo.points||0,startInd:this.slidingWindowInfo.startInd||0,endInd:this.slidingWindowInfo.endInd||0},this.addSlidingWindowInfo={points:this.addSlidingWindowInfo.points||0,startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0},this.loopArrowY={add:0,rowAndCol:0},this.currentHeardBeat={heardBeat:null,ele:null},this.leadNameList=this.leadNames.map((i,s)=>s)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=this.calcHighestAndLowestPoint(),this.leadModel.isSingleMode?(this.splitBlockHeight=Math.abs(this.highestAndLowestPoint.maxPoints)+Math.abs(this.highestAndLowestPoint.minPoints)+22,this.splitBlockHeight>this.drawArea.height&&(this.splitBlockHeight=this.drawArea.height/6)):this.splitBlockHeight=this.drawArea.height/this.totalRows,this.publicStep=u.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),this.rulerStep=(this.publicStep||1)*(this.leadModel.publicSampleRate||1)/(this.gridConfig.cellMg*2+2)}initWaveFormPeer(){var i;(i=this.sceneIns)==null||i.dispose(),this.AssistCtx=null;const e=document.getElementById(`${this.prefixId}wave-from-box`);this.sceneIns=U.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:1});const t=document.getElementById(`${this.prefixId}MXGrid`);this.AssistCtx=t.getContext("2d"),this.sceneInsEventOff(),this.sceneIns.on("mousemove",this.sceneInsMousemove),this.sceneIns.on("mousedown",this.sceneInsMouseDown),this.sceneIns.on("mouseup",this.sceneInsMouseUp),this.sceneIns.on("click",this.sceneInsClick),this.sceneIns.on("contextmenu",this.sceneInsContextmenu)}sceneInsClick(e){var l,d,h,f;if(!this.heartFight.isShow||!this.heartFight.isClickArrow)return;this.nearestHeartInfo={analyseValue:null,insertInfo:null};const t=e.offsetX-this.waveDataCopy[0].pos[0],i=this.waveDataCopy[0].startInd||0;let s=u.getPointIdxForPx(t,this.waveDataCopy[0].step||1);if(s+=i,s<=0)return;const a=.15*this.waveConfigs[this.heartFight.showIdxPai].sampleRate;let n=null,o=-1,r=1/0;for(let c=0;c<this.analyseValues.length;c++){const x=this.analyseValues[c],y=c!==1?x.filter((L,P)=>{var I;return P===0||((I=L.KeyPosByBeat)==null?void 0:I.Rpoint)!==0}):x;let S=0,w=y.length-1;for(;S<=w;){const L=Math.floor((S+w)/2),P=y[L],I=(l=P.KeyPosByBeat)==null?void 0:l.Rpoint;if(I===void 0)break;const m=Math.abs(s-I);m<=a&&m<r&&(r=m,n=P,o=c),I<s?S=L+1:w=L-1}}if(n)this.nearestHeartInfo={analyseValue:n,insertInfo:null};else{let c=-1,x=1/0,y=-1,S=-1;for(let w=0;w<this.analyseValues.length;w++){const L=this.analyseValues[w];for(let P=0;P<L.length;P++){const I=L[P];if(w!==1&&P>0&&((d=I.KeyPosByBeat)==null?void 0:d.Rpoint)===0)continue;const m=(h=I.KeyPosByBeat)==null?void 0:h.Rpoint;if(m===void 0)continue;const p=Math.abs(s-m);p<x&&(x=p,S=w,s<m?y=P:w!==1&&((f=I.KeyPosByBeat)==null?void 0:f.Rpoint)===0&&P===0?y=1:y=P+1)}}S!==-1&&(o=S,c=y,this.nearestHeartInfo={analyseValue:{AnabyBeat:{QTd:0,QTc:0,SV3Amp:0,PR:0,QTcd:0,BeatType:-1,SV1Amp:0,QT:0,QRSAxis:0,SV5Amp:0,TAxis:0,AtrialRate:0,Td:0,RV5Amp:0,VentricularRate:0,Pd:0,QRSd:0,RV3Amp:0,PAxis:0,RV1Amp:0,QTdr:0,QRS_T:0},KeyPosByBeat:{Rpoint:s,PPpeak:0,Tend:0,PPstart:0,Tpeak:0,TPpeak:0,QRSend:0,Pend:0,Tstart:0,Ppeak:0,SPpoint:0,PPend:0,TPend:0,QRSstart:0,Pstart:0,TPstart:0},ecg_info_detail:[],BeatID:-1,heart_style:""},insertInfo:{listIndex:o,insertIndex:c,pointIdx:s,distanceToNearest:x}})}this.$emit("notifySceneClick",{event:e,offsetX:e.offsetX,offsetY:e.offsetY,nearestHeartInfo:O.cloneDeep(this.nearestHeartInfo)}),this.drawHeartReact(this.drawLoopArrowStartPosIdx)}sceneInsContextmenu(e){e.event.preventDefault(),this.$emit("notifySceneContextmenu",{event:e,offsetX:e.offsetX,offsetY:e.offsetY,nearestHeartInfo:O.cloneDeep(this.nearestHeartInfo)})}sceneInsMousemove(e){var t;this.sceneIsMouseDown&&(this.scrollConfig.isNativeScroll?(t=this.$refs[`${this.prefixId}nativeScroll`])==null||t.scrollBy({left:e.offsetX-this.sceneIsMouseDownX,top:0}):this.$refs[`${this.prefixId}vueScroll`].scrollBy({dx:e.offsetX-this.sceneIsMouseDownX}))}sceneInsMouseDown(e){this.sceneIsMouseDown=!0,this.sceneIsMouseDownX=e.offsetX}sceneInsMouseUp(e){this.sceneIsMouseDown=!1}sceneInsEventOff(){var e,t,i,s,a;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(i=this.sceneIns)==null||i.off("mouseup",this.sceneInsMouseUp),(s=this.sceneIns)==null||s.off("click",this.sceneInsClick),(a=this.sceneIns)==null||a.off("contextmenu",this.sceneInsContextmenu)}drawLeadHead(){var i,s,a,n,o,r;(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.remove(this.leadHeadGroup);let e="",t=!1;e:for(let l=1;l<=this.totalRows;l++){if(t=!1,!(this.waveConfigs||[])[l-1])break e;if(!!this.waveConfigs[l-1].isShowLeadHead){if(l<=this.leadModel.line)e=(this.leadNames||[])[l-1]||"",this.waveConfigs[l-1].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),this.leadHeadConfig.isShowLeadCalibration!==!1&&((a=this.leadHeadGroup)==null||a.add(this.createLeadHead(0,this.waveConfigs[l-1].posY||l*this.splitBlockHeight,u.getSens(this.waveConfigs[l-1].isFixedSquareWaveSize?this.waveConfigs[l-1].fixedSquareWaveSizeGain:this.waveConfigs[l-1].gain,this.gridConfig.cellMg),t)));else if(l>this.leadModel.line&&l-this.leadModel.line<=this.leadModel.add){if(!this.waveConfigs[this.longLeadConfig.leadIdxs[l-this.leadModel.line-1]])continue;e=this.leadNames[this.longLeadConfig.leadNames[this.longLeadConfig.leadNames[l-this.leadModel.line-1]]],this.waveConfigs[this.longLeadConfig.leadIdxs[l-this.leadModel.line-1]].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),this.leadHeadConfig.isShowLeadCalibration!==!1&&((o=this.leadHeadGroup)==null||o.add(this.createLeadHead(0,((n=this.waveConfigs[this.longLeadConfig.leadIdxs[l-this.leadModel.line-1]])==null?void 0:n.posY)||l*this.splitBlockHeight,u.getSens(this.waveConfigs[this.longLeadConfig.leadIdxs[l-this.leadModel.line-1]].isFixedSquareWaveSize?this.waveConfigs[this.longLeadConfig.leadIdxs[l-this.leadModel.line-1]].fixedSquareWaveSizeGain:this.waveConfigs[this.longLeadConfig.leadIdxs[l-this.leadModel.line-1]].gain,this.gridConfig.cellMg),t)))}}}(r=this.sceneIns)==null||r.add(this.leadHeadGroup)}createLeadHead(e,t,i,s){const a=this.leadHeadConfig.leadHedeWidth/4;return i=s?i/2:i,new g.Polyline({cursor:"",shape:{points:[[0+e,0+t],[a+e,0+t],[a+e,-i+t],[3*a+e,-i+t],[3*a+e,0+t],[4*a+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawColSplitLine(){var n,o,r,l,d;(n=this.splitLineGroup)==null||n.removeAll(),(o=this.sceneIns)==null||o.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/(this.leadModel.column||1);if(this.splitPoint=e,this.leadModel.isSingleMode){const h=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),f=u.getDataLenTimes(Math.ceil(this.splitPoint/(h||1))||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0),c=parseInt(`${f/1e3%60}`,10);this.splitPoint=c*(this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0)*(h||0)}let t=0,i=0,s=0,a=0;for(let h=1;h<=this.leadModel.column-1;h++){t=h*e+this.leadHeadConfig.leadHedeWidth,i=h*this.leadModel.line;e:for(let f=1;f<=this.leadModel.line;f++){if(!(this.waveConfigs||[])[f-1+i])break e;if((this.waveConfigs||[])[f-1+i].posX!==void 0&&(t=(this.waveConfigs||[])[f-1+i].posX),s=(this.waveConfigs||[])[f-1+i].leadIdx,s===void 0)break;a=u.getSens((this.waveConfigs||[])[f-1+i].isFixedSquareWaveSize?(this.waveConfigs||[])[f-1+i].fixedSquareWaveSizeGain:(this.waveConfigs||[])[f-1+i].gain,this.gridConfig.cellMg),(this.waveConfigs||[])[f-1+i].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.leadNames[s])?(r=this.splitLineGroup)==null||r.add(this.creatSplitLine(t,((this.waveConfigs||[])[f-1+i].posY||f*this.splitBlockHeight)-(a||0)/2*.5,a,!0)):(l=this.splitLineGroup)==null||l.add(this.creatSplitLine(t,((this.waveConfigs||[])[f-1+i].posY||f*this.splitBlockHeight)-(a||0)*.5,a))}}(d=this.sceneIns)==null||d.add(this.splitLineGroup)}creatSplitLine(e,t,i,s){return new g.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(s?(i||0)/2:i||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawRulerNotes(){var s,a;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new g.Text({cursor:"",style:b({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new g.Text({style:b({text:this.rulerConfig.renderText||`${this.rulerConfig.gainName} ${this.rulerConfig.speedName}`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.canvasContainer.height-this.ruleH},e)});(s=this.sceneIns)==null||s.add(i),(a=this.sceneIns)==null||a.add(t)}drawRuler(e=0){var f,c,x,y,S;if(this.timersCopy=e,(f=this.rulerGroup)==null||f.removeAll(),!this.rulerConfig.isShow)return;const t=this.canvasContainer.height;let i=this.leadHeadConfig.leadHedeWidth,s=0;const a=u.getStepForSpeed(this.rulerConfig.speed,this.gridConfig.cellMg,this.rulerConfig.sampleRate),n=this.rulerStep||1,o=Math.max(0,this.drawArea.width-this.leadHeadConfig.leadHedeWidth),l=Math.ceil(o/n)*.1,d=this.dataTotalTimes*2;let h=e+l;if(d>0){const w=this.leadModel.isContinuous?d*1.1:d;h=Math.min(h,w)}if(!this.leadModel.add&&a){const w=u.getPointIdxForPx(this.splitPoint*(this.leadModel.column||1),a),L=u.getDataLenTimes(w,this.rulerConfig.sampleRate||0)/1e3;L>0&&(h=Math.min(h,e+L))}for(let w=e;w<=h;w=+(w+.1).toFixed(1))w!==e&&(i+=this.rulerStep),w%1===0?(s=t-10,(c=this.rulerGroup)==null||c.add(new g.Text({cursor:"",style:{x:i,y:s-15,text:w+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=t-5,(x=this.rulerGroup)==null||x.add(new g.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:t},style:{stroke:"#FF0080",lineWidth:2}}));(y=this.rulerGroup)!=null&&y.__zr||(S=this.sceneIns)==null||S.add(this.rulerGroup)}getWavePoints(e){let t=0;return e.data.map(([i,s],a)=>{if(isNaN(s)){t===0&&(t=Math.max(a-1,0));const n=e.data[t]||[0,0];return[n[0]+e.pos[0],n[1]+e.pos[1]]}return t=0,[i+e.pos[0],s+e.pos[1]]})}updateWaveGroupPoints(e,t){e==null||e.eachChild((i,s)=>{if(!(i instanceof g.Polyline))return;const a=t[s||0];!(a!=null&&a.data)||i.attr({shape:{points:this.getWavePoints(a)}})})}refreshVisibleWaveData(){if(!this.waveConfigs.length||!this.waveLists.length)return;if(this.pendingScrollPointIdx!==null){const s=this.pendingScrollPointIdx;if(!this.isWaveRangeLoaded(s))return;this.pendingScrollPointIdx=null,this.scrollWaveFrom(s),this.scrollRuler(s),this.scrollArrow(s);return}const e=this.slidingWindowInfo.startInd||0;if(!this.isWaveRangeLoaded(e))return;if(this.leadModel.isSingleMode){const s=this.getRednerSinglePoints();this.singleWaveDataCopy=s,this.updateWaveGroupPoints(this.singleWaveFromGroup,s);return}const t=this.getRednerPoints(),i=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=i,this.updateWaveGroupPoints(this.rowAndColwaveFromGroup,t),this.updateWaveGroupPoints(this.addwaveFromGroup,i)}isWaveRangeLoaded(e){const t=this.waveLists[0];if(!(t!=null&&t.length))return!1;const i=this.dataTotalLength||t.length,s=Math.max(0,Math.min(e,i)),a=Math.max(this.slidingWindowInfo.points||0,this.addSlidingWindowInfo.points||0,1),n=Math.min(i,s+a);for(let o=s;o<n;o++)if(isNaN(t[o]))return!1;return!0}drawWaveFrom(){var e,t,i,s,a;(e=this.leadHeadNameGroup)==null||e.removeAll(),(t=this.leadHeadOffAndDelGroup)==null||t.removeAll(),this.leadModel.isSingleMode?(this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(i=this.sceneIns)==null||i.add(this.singleWaveFromGroup)):(this.singleWaveDataCopy=[],this.createAddWaveFrom(),this.createRowAndColWaveFrom(),(s=this.sceneIns)==null||s.add(this.rowAndColwaveFromGroup),(a=this.sceneIns)==null||a.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(this.timersCopy),this.drawLoopArrow(this.drawLoopArrowStartPosIdx),this.drawHeartReact(this.drawLoopArrowStartPosIdx)}getRednerSinglePoints(){let e=0,t=0;const i=this.waveLists[this.singleModeConfig.defaultSelect]||[];let s=this.slidingWindowInfo.startInd||0,a=this.slidingWindowInfo.endInd||0;const n=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),o=u.getSens(this.waveConfigs[this.singleModeConfig.defaultSelect].gain,this.gridConfig.cellMg),r=[],l=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let d=0;d<1;d++){e=d*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let h=1;h<=l;h++)t=h*this.splitBlockHeight,h>1&&(t*=.8,s=a,a=s+(this.slidingWindowInfo.points||0)),h===1&&(this.loopArrowY.rowAndCol=t),r.push({pos:[e,t],startInd:s,endInd:a,step:n,sens:o,data:i.slice(s,a).map((f,c)=>this.waveConfigs[this.singleModeConfig.defaultSelect].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName)?u.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,f,o/2):u.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,f,o)).map((f,c)=>[c*(n||0),-f])})}return r}createSingleWaveFrom(){var o,r,l;(o=this.singleWaveFromGroup)==null||o.removeAll();let e=this.getRednerSinglePoints(),t=u.getDataLenTimes(this.slidingWindowInfo.points||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0);const i=t;let s=0,a=0,n=0;for(let d=0;d<e.length&&!(e[d].pos[1]>this.drawArea.height+this.bottomAreaHeight);d++)this.isLeadDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx)||(s=parseInt(`${t/1e3/60}`,10),a=parseInt(`${t/1e3%60}`,10),s=a===60?s+=1:s,s=s===0?"00":s<10?`0${s}`:s,a=a===0||a===60?"00":a<10?`0${a}`:a,(r=this.singleWaveFromGroup)==null||r.add(new g.Polyline({cursor:"",name:this.singleModeConfig.defaultSelect+"_"+d,sens:e[d].sens,shape:{points:e[d].data.map(([h,f],c)=>isNaN(f)?(n===0&&(n=c-1,n=n<0?0:n),[e[d].data[n][0]+e[d].pos[0],e[d].data[n][1]+e[d].pos[1]]):(n=0,[h+e[d].pos[0],f+e[d].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:h=>{this.onDbClickWaveFrom(h,"single")},oncontextmenu:h=>{this.onContextmenu(h,"single")}})),t/1e3<this.dataTotalTimes&&((l=this.singleWaveFromGroup)==null||l.add(new g.Text({cursor:"",style:{x:e[d].pos[0],y:e[d].pos[1]-(e[d].sens||0)/2,text:d===0?"00:00 \u5FC3\u7387":`${s}:${a} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}}))),d>0&&(t+=i)),this.createLeadName(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,e[0].pos[0]-10,e[0].pos[1]+10),this.createLeadOffAndDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,e[0].pos[0]-5,e[0].pos[1]-(e[d].sens||0)/2-15),this.waveConfigs[this.singleModeConfig.defaultSelect].squareWaveSens&&this.createLeadSensNams(this.waveConfigs[this.singleModeConfig.defaultSelect].squareWaveSens,e[0].pos[0]-10,e[0].pos[1]+10);this.singleWaveDataCopy=e,e=null}drawHeartReact(e=0){var a,n,o,r,l,d,h,f,c,x,y;if((a=this.arrowHeartGroup)==null||a.removeAll(),!this.heartFight.isShow)return;if(this.leadModel.line!==12&&this.leadModel.column!==1){this.nearestHeartInfo={analyseValue:null,insertInfo:null};return}if(!this.nearestHeartInfo.analyseValue)return;const t=u.getStepForSpeed(this.waveConfigs[this.heartFight.showIdxPai].speed,this.gridConfig.cellMg,this.waveConfigs[this.heartFight.showIdxPai].sampleRate);let i=0;const s=(((o=(n=this.nearestHeartInfo.analyseValue)==null?void 0:n.KeyPosByBeat)==null?void 0:o.Rpoint)||0)-e;if(!(e>(((l=(r=this.nearestHeartInfo.analyseValue)==null?void 0:r.KeyPosByBeat)==null?void 0:l.Rpoint)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&s>(this.slidingWindowInfo.points||0))&&!(this.leadModel.isSingleMode&&s>(this.slidingWindowInfo.points||0))&&!((((h=(d=this.nearestHeartInfo.analyseValue)==null?void 0:d.KeyPosByBeat)==null?void 0:h.Rpoint)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))){if(this.nearestHeartInfo.insertInfo)i=(s||0)*t+this.leadHeadConfig.leadHedeWidth,(c=this.arrowHeartGroup)==null||c.add(new g.Line({name:"draw_heart_line",cursor:"",shape:{x1:i,y1:0,x2:i,y2:this.canvasContainer.height-2},style:{stroke:"#E07F26",lineWidth:2}}));else{const S=.1*this.waveConfigs[this.heartFight.showIdxPai].sampleRate;i=((s||0)-S/2)*t+this.leadHeadConfig.leadHedeWidth;const w=(S*2+1)*t;(f=this.arrowHeartGroup)==null||f.add(new g.Rect({name:"draw_heart_rect",style:{fill:"#FF87E5",opacity:.64},shape:{x:i,y:0,width:w,height:this.canvasContainer.height-2},cursor:""}))}(x=this.arrowHeartGroup)!=null&&x.__zr||(y=this.sceneIns)==null||y.add(this.arrowHeartGroup)}}drawLoopArrow(e=0){var f,c,x,y,S,w,L,P,I,m,p,F,R;if(this.drawLoopArrowStartPosIdx=e,!this.heartFight.isShow)return;(f=this.arrowGroup)==null||f.removeAll(),this.heartFight.mode&&this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=this.heartBeatPosition[this.heartFight.showIdxPai][this.heartFight.defaultSelect]||null,this.drawHeardBeatLine());let t=0,i=0;if(this.leadModel.add){const D=u.getSens(this.waveConfigs[this.longLeadConfig.leadIdxs[0]].gain,this.gridConfig.cellMg);i=this.loopArrowY.add-(D||0)-this.splitBlockHeight/3.5}else this.leadModel.column===1?i=0:i=20;let s=0,a=0;const n={fontSize:12,fill:"#FF0000",fontFamily:this.fontFamily};let o=0,r=0;const l=u.getStepForSpeed(this.waveConfigs[this.heartFight.showIdxPai].speed,this.gridConfig.cellMg,this.waveConfigs[this.heartFight.showIdxPai].sampleRate);let d=0,h=0;for(let D=0;D<(this.heartBeatPosition[this.heartFight.showIdxPai]||[]).length;D++){const H=this.heartBeatPosition[this.heartFight.showIdxPai][D];if(d=((H==null?void 0:H.position)||0)-e,e>((H==null?void 0:H.position)||0)||!this.leadModel.isContinuous&&!this.leadModel.add&&d>(this.slidingWindowInfo.points||0)||this.leadModel.isSingleMode&&d>(this.slidingWindowInfo.points||0))continue;if(((H==null?void 0:H.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;s=((c=this.AssistCtx)==null?void 0:c.measureText(`${(H==null?void 0:H.heart_style)||""}`).width)||0,t=d*(l||0)+this.leadHeadConfig.leadHedeWidth-0,a=0,(x=this.arrowGroup)==null||x.add(new g.Text({name:"arrow_box",cursor:"",style:T(b({x:t,y:i+10,text:`${(H==null?void 0:H.heart_style)||""}`},n),{fill:"#333"}),onclick:M=>{!this.heartFight.mode&&this.heartFight.isClickArrow},oncontextmenu:M=>{M.event.preventDefault(),!this.heartFight.mode&&this.heartFight.isClickArrow}}));let A=t,G=0;const W=this.heartBeatPosition[this.heartFight.showIdxPai][D+1]||null;if(this.heartFight.isHeartRateCalculatedBasedOnInterval)if(D>0){const M=this.heartBeatPosition[this.heartFight.showIdxPai][D-1];if(M){const B=(M.position||0)-e;if(!this.leadModel.isContinuous&&!this.leadModel.add&&B>(this.slidingWindowInfo.points||0))continue;A=B*(l||0)+this.leadHeadConfig.leadHedeWidth,G=t,r=u.calcMs(Math.abs(((H==null?void 0:H.position)||0)-(M.position||0))*(l||0),this.waveConfigs[this.heartFight.showIdxPai].speed,this.gridConfig.cellMg,1),o=r!==0&&u.calcBpm(r)||0}}else continue;else{if(!W||(h=((W==null?void 0:W.position)||0)-e,!this.leadModel.isContinuous&&!this.leadModel.add&&h>(this.slidingWindowInfo.points||0))||this.leadModel.isSingleMode&&h>(this.slidingWindowInfo.points||0))continue;if(((W==null?void 0:W.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;A=t,G=h*(l||0)+this.leadHeadConfig.leadHedeWidth,o=(W==null?void 0:W.heartrate)||0}if(a=0,this.heartFight.heartrate){s=((y=this.AssistCtx)==null?void 0:y.measureText(`${o||""}`).width)||0;const M=(G-A)/2-s/2+A;(S=this.arrowGroup)==null||S.add(new g.Text({cursor:"",style:b({x:M,y:a+i+5,text:`${o||""}`},n)})),a+=12}if(this.heartFight.interval){let M=`${(W==null?void 0:W.interval)||""}`;this.heartFight.isIntervalCalculatedBasedOnHeartRate&&(M=`${Math.round(6e4/o)}`),s=((w=this.AssistCtx)==null?void 0:w.measureText(M).width)||0;const B=(G-A)/2-s/2+A;(L=this.arrowGroup)==null||L.add(new g.Text({cursor:"",style:b({x:B,y:a+i+5,text:M},n)})),a+=12}if(this.heartFight.qrstCompany){const M=(W==null?void 0:W.qrstCompany)||"";s=((P=this.AssistCtx)==null?void 0:P.measureText(M).width)||0;const B=(G-A)/2-s/2+A;(I=this.arrowGroup)==null||I.add(new g.Text({cursor:"",style:b({x:B,y:a+i+5,text:M},n)})),a+=12}if(this.heartFight.telectricalaxis){const M=`${(W==null?void 0:W.telectricalaxis)||""}`;s=((m=this.AssistCtx)==null?void 0:m.measureText(M).width)||0;const B=(G-A)/2-s/2+A;(p=this.arrowGroup)==null||p.add(new g.Text({cursor:"",style:b({x:B,y:a+i+5,text:M},n)}))}}(F=this.arrowGroup)!=null&&F.__zr||(R=this.sceneIns)==null||R.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",g.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var a,n,o,r,l,d,h,f,c,x,y,S,w,L,P;if(!this.currentHeardBeat.heardBeat)return;(a=this.heardBeatLineGroup)==null||a.removeAll();let t={},i=0,s;if(this.leadModel.isSingleMode){let I=this.getRednerSinglePoints();e:for(let m=0;m<I.length;m++){if(m>=1||this.leadNames[this.singleModeConfig.defaultSelect]==="M")break e;if((n=this.analyseValues[this.singleModeConfig.defaultSelect])!=null&&n[this.currentHeardBeat.heardBeat.index])t=((l=(r=this.analyseValues[this.singleModeConfig.defaultSelect])==null?void 0:r[this.currentHeardBeat.heardBeat.index])==null?void 0:l.KeyPosByBeat)||t;else{let p=this.analyseValues.find(F=>{var R;return(R=F[this.currentHeardBeat.heardBeat.index])==null?void 0:R.KeyPosByBeat});if(!p)break e;p&&(t=(o=p[this.currentHeardBeat.heardBeat.index])==null?void 0:o.KeyPosByBeat),p=null}for(const p in t)if(this.heardBeatLineKeys.includes(p)){if(i=(t[p]-this.slidingWindowInfo.startInd)*(I[m].step||0),this.isLeadOff(m)||this.isLeadDel(m))continue;if(!this.leadModel.isContinuous&&t[p]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0))break e;s=I[m],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(s.pos[0]+i,s.pos[1],this.singleModeConfig.defaultSelect+"_"+m,"single"))}}I=null}else{let I=this.getRednerPoints(),m=this.getAddRednerPoints();e:for(let p=0;p<I.length;p++){t=((f=(h=this.analyseValues[p])==null?void 0:h[this.currentHeardBeat.heardBeat.index])==null?void 0:f.KeyPosByBeat)||t;for(const F in t)if(this.heardBeatLineKeys.includes(F)&&Object.prototype.hasOwnProperty.call(t,F)){if(i=(t[F]-this.slidingWindowInfo.startInd)*(I[p].step||0),this.isLeadOff(p)||this.isLeadDel(p))continue;if(e>t[F]||!this.leadModel.isContinuous&&t[F]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(s=I[p],this.leadModel.isContinuous&&p>this.leadModel.line-1))break e;(c=this.heardBeatLineGroup)==null||c.add(this.createHeardBeatLine(s.pos[0]+i,s.pos[1],p+"_"+p,"rowAndCol"))}}e:for(let p=0;p<m.length;p++)if(!!((x=this.analyseValues[p])!=null&&x[this.currentHeardBeat.heardBeat.index])){t=((S=(y=this.analyseValues[p])==null?void 0:y[this.currentHeardBeat.heardBeat.index])==null?void 0:S.KeyPosByBeat)||t;for(const F in t)if(this.heardBeatLineKeys.includes(F)){if(i=(t[F]-this.slidingWindowInfo.startInd)*(m[p].step||0),this.isLeadOff(this.longLeadConfig.leadIdxs[p])&&this.isLeadDel(this.longLeadConfig.leadIdxs[p]))continue;if(e>t[F])break e;s=m[p],(w=this.heardBeatLineGroup)==null||w.add(this.createHeardBeatLine(s.pos[0]+i,s.pos[1],this.longLeadConfig.leadIdxs[p]+"_"+p,"add"))}}I=null,m=null}(L=this.heardBeatLineGroup)!=null&&L.__zr||(P=this.sceneIns)==null||P.add(this.heardBeatLineGroup),t=null}createHeardBeatLine(e,t,i,s){return new g.Line({name:i,cursor:"",shape:{x1:e,y1:t-15,x2:e,y2:t+15},style:{stroke:"blue",lineWidth:1},oncontextmenu:a=>{this.onContextmenu(a,s)}})}drawLeadHeadNameAndOffOrDel(){var e,t;(e=this.sceneIns)==null||e.add(this.leadHeadNameGroup),(t=this.sceneIns)==null||t.add(this.leadHeadOffAndDelGroup)}getAddRednerPoints(){const e=[];let t=this.leadHeadConfig.leadHedeWidth,i=0,s=0,a=[],n=0,o=0;for(let r=0;r<this.leadModel.add;r++)s=this.longLeadConfig.leadIdxs[r],this.waveConfigs[s]&&(t=this.waveConfigs[s].addPosX||t,n=u.getStepForSpeed(this.waveConfigs[s].speed,this.gridConfig.cellMg,this.waveConfigs[s].sampleRate),o=u.getSens(this.waveConfigs[s].gain,this.gridConfig.cellMg),i=this.waveConfigs[s].addPosY||(r+this.leadModel.line+1)*this.splitBlockHeight,a=this.waveLists[s]||[],r===0&&(this.loopArrowY.add=i),e.push({pos:[t,i],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:a.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((l,d)=>this.waveConfigs[s].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[s].leadName)?u.getActualY(this.waveConfigs[s].sensitivity,l,o/2):u.getActualY(this.waveConfigs[s].sensitivity,l,o)).map((l,d)=>[d*(n||0),-l]),sens:o,step:n}));return e}createAddWaveFrom(){var i,s;(i=this.addwaveFromGroup)==null||i.removeAll();let e=this.getAddRednerPoints(),t=0;for(let a=0;a<e.length;a++)this.isLeadDel(this.longLeadConfig.leadIdxs[a])||((s=this.addwaveFromGroup)==null||s.add(new g.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[a]+"_"+a,sens:e[a].sens,shape:{points:e[a].data.map(([n,o],r)=>isNaN(o)?(t===0&&(t=r-1,t=t<0?0:t),[e[a].data[t][0]+e[a].pos[0],e[a].data[t][1]+e[a].pos[1]]):(t=0,[n+e[a].pos[0],o+e[a].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:n=>{this.onDbClickWaveFrom(n,"add")},oncontextmenu:n=>{this.onContextmenu(n,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[a],e[a].pos[0],e[a].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[a],e[a].pos[0]-5,e[a].pos[1]-(e[a].sens||0)/2-15),this.waveConfigs[this.longLeadConfig.leadIdxs[a]].squareWaveSens&&this.createLeadSensNams(this.waveConfigs[this.longLeadConfig.leadIdxs[a]].squareWaveSens,e[a].pos[0],e[a].pos[1]-15));this.addWaveDataCopy=e,e=null}getRednerPoints(){let e=0,t=0,i=0,s=[],a=0,n=0,o=this.slidingWindowInfo.startInd||0,r=this.slidingWindowInfo.endInd||0;const l=[];for(let d=0;d<this.leadModel.column;d++){e=d*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&d>0&&(o=r,r=o+(this.slidingWindowInfo.points||0));for(let h=1;h<=this.leadModel.line&&(t=h*this.splitBlockHeight,!(i>(this.waveLists||[]).length-1));h++)e=this.waveConfigs[i].posX||e,t=this.waveConfigs[i].posY||t,a=u.getStepForSpeed(this.waveConfigs[i].speed,this.gridConfig.cellMg,this.waveConfigs[i].sampleRate),n=u.getSens(this.waveConfigs[i].gain,this.gridConfig.cellMg),s=this.waveLists[i]||[],this.waveConfigs[i]&&(h===1&&(this.loopArrowY.rowAndCol=t),l.push({pos:[e,t],startInd:o,endInd:r,sens:n,step:a,data:s.slice(o,r).map((f,c)=>this.waveConfigs[i].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[i].leadName)?u.getActualY(this.waveConfigs[i].sensitivity,f,n/2):u.getActualY(this.waveConfigs[i].sensitivity,f,n)).map((f,c)=>[c*(a||0),-f])}),i++)}return l}createRowAndColWaveFrom(){var s,a;(s=this.rowAndColwaveFromGroup)==null||s.removeAll();let e=this.getRednerPoints(),t=0,i=0;for(let n=0;n<e.length;n++)t=this.waveConfigs[n].leadIdx||0,this.isLeadDel(t)||(a=this.rowAndColwaveFromGroup)==null||a.add(new g.Polyline({cursor:"",name:n+"_"+n,sens:e[n].sens,shape:{points:e[n].data.map(([o,r],l)=>isNaN(r)?(i===0&&(i=l-1,i=i<0?0:i),[e[n].data[i][0]+e[n].pos[0],e[n].data[i][1]+e[n].pos[1]]):(i=0,[o+e[n].pos[0],r+e[n].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:o=>{this.onDbClickWaveFrom(o,"rowAndCol")},oncontextmenu:o=>{this.onContextmenu(o,"rowAndCol")}})),n<this.leadModel.line?(this.createLeadName(t,e[n].pos[0],e[n].pos[1]-15),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(e[n].sens||0)/2-15),this.waveConfigs[n].squareWaveSens&&this.createLeadSensNams(this.waveConfigs[n].squareWaveSens,e[n].pos[0],e[n].pos[1]-15)):(this.createLeadName(t,e[n].pos[0]+5,e[n].pos[1]-40),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(e[n].sens||0)/2+9),this.waveConfigs[n].squareWaveSens&&this.createLeadSensNams(this.waveConfigs[n].squareWaveSens,e[n].pos[0],e[n].pos[1]-15));this.waveDataCopy=e,e=null}createLeadSensNams(e,t,i){var a;let s=t;this.leadHeadConfig.isShowLeadCalibration===!1&&(this.leadModel.isSingleMode?s=t-this.leadHeadConfig.leadHedeWidth+12:s=t-this.leadHeadConfig.leadHedeWidth+5),this.leadHeadConfig.isShowLeadCalibration&&this.leadHeadConfig.isCalibrationDisplayedBelow&&(t<=this.leadHeadConfig.leadHedeWidth&&(this.leadModel.isSingleMode?s=t-this.leadHeadConfig.leadHedeWidth+12:s=t-this.leadHeadConfig.leadHedeWidth+5),i=i+40),(a=this.leadHeadNameGroup)==null||a.add(new g.Text({style:{x:s,y:i,text:e,fontSize:this.leadConfig.squareWaveSensFontSize||this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}))}createLeadName(e,t,i,s=!1){var n;let a=t;this.leadHeadConfig.isShowLeadCalibration===!1&&(this.leadModel.isSingleMode?a=t-this.leadHeadConfig.leadHedeWidth+12:a=t-this.leadHeadConfig.leadHedeWidth+5),this.leadHeadConfig.isShowLeadCalibration&&this.leadHeadConfig.isCalibrationDisplayedBelow&&(t<=this.leadHeadConfig.leadHedeWidth&&(this.leadModel.isSingleMode?a=t-this.leadHeadConfig.leadHedeWidth+12:a=t-this.leadHeadConfig.leadHedeWidth+5),i=i+20),(n=this.leadHeadNameGroup)==null||n.add(new g.Text({style:{x:a,y:i,text:this.leadNames[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:T(b({},o),{name:this.leadNames[e],idx:e}),isAdd:s})},onclick:o=>{this.$emit("notiifyLeadName",{event:T(b({},o),{name:this.leadNames[e],idx:e}),isAdd:s})}}))}createLeadOffAndDel(e,t,i){var s;(this.isLeadOff(e)||this.isLeadDel(e))&&((s=this.leadHeadOffAndDelGroup)==null||s.add(new g.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}onContextmenu(e,t){e.event.preventDefault(),e.event.stopPropagation();const i=e.target.name.split("_"),s=+i[1];let a=0,n=0,o=0,r=0,l=0;t==="single"?(a=e.offsetX-this.singleWaveDataCopy[s].pos[0],n=this.singleWaveDataCopy[s].startInd,o=u.getPointIdxForPx(a,this.singleWaveDataCopy[s].step||1),r=this.singleWaveDataCopy[s].sens,l=this.singleWaveDataCopy[s].step):t==="rowAndCol"?(a=e.offsetX-this.waveDataCopy[s].pos[0],n=this.waveDataCopy[s].startInd||0,o=u.getPointIdxForPx(a,this.waveDataCopy[s].step||1),r=this.waveDataCopy[s].sens,l=this.waveDataCopy[s].step):t==="add"&&(a=e.offsetX-this.addWaveDataCopy[s].pos[0],n=this.addWaveDataCopy[s].startInd||0,o=u.getPointIdxForPx(a,this.addWaveDataCopy[s].step||1),r=this.addWaveDataCopy[s].sens,l=this.addWaveDataCopy[s].step),o+=n,this.$emit("notifyOnContextmenu",{sens:r,step:l,activeLeadIdx:+i[0],pointIdx:o,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.event.pageX,pageY:e.event.pageY})}onDbClickWaveFrom(e,t){const i=Date.now(),s=()=>{const a=e.target.name.split("_");this.activeLeadIdx=+a[0];const n=+a[1];let o=0,r=0,l=0,d=0,h=0;t==="single"?(o=e.offsetX-this.singleWaveDataCopy[n].pos[0],r=this.singleWaveDataCopy[n].startInd,l=u.getPointIdxForPx(o,this.singleWaveDataCopy[n].step||1),d=this.singleWaveDataCopy[n].sens,h=this.singleWaveDataCopy[n].step):t==="rowAndCol"?(o=e.offsetX-this.waveDataCopy[n].pos[0],r=this.waveDataCopy[n].startInd||0,l=u.getPointIdxForPx(o,this.waveDataCopy[n].step||1),d=this.waveDataCopy[n].sens,h=this.waveDataCopy[n].step):t==="add"&&(o=e.offsetX-this.addWaveDataCopy[n].pos[0],r=this.addWaveDataCopy[n].startInd||0,l=u.getPointIdxForPx(o,this.addWaveDataCopy[n].step||1),d=this.addWaveDataCopy[n].sens,h=this.addWaveDataCopy[n].step),l+=r,this.$emit("notifyActiveEnlargr",{sens:d,step:h,activeLeadIdx:this.activeLeadIdx,pointIdx:l})};i-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,s()):this.dbClickWaveFromTime=i}nativeScrollFunc(e){this.scrollCommon(e.target.scrollLeft||0)}handleScroll(e,t,i){t.type==="horizontal"&&(t.scrollLeft=t.scrollLeft||0,this.scrollCommon(t.scrollLeft))}scrollCommon(e){const t=Math.max(0,e||0),i=u.getPointIdxForPx(t,this.publicStep||1);i!==this.lastScrollPointIdx&&(this.lastScrollPointIdx=i,this.lastScrollLeft=t,this.isWaveRangeLoaded(i)?(this.pendingScrollPointIdx=null,this.scrollWaveFrom(i),this.scrollRuler(i),this.scrollArrow(i)):this.pendingScrollPointIdx=i,this.$emit("notifyScrollPointIdx",{slidIdxs:i,scrollLeft:t}))}scrollWaveFrom(e){this.slidingWindowInfo.startInd=e,this.slidingWindowInfo.endInd=e+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=e,this.addSlidingWindowInfo.endInd=e+(this.addSlidingWindowInfo.points||0);const t=this.getRednerPoints(),i=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=i,this.updateWaveGroupPoints(this.rowAndColwaveFromGroup,t),this.updateWaveGroupPoints(this.addwaveFromGroup,i)}scrollRuler(e){const t=u.getDataLenTimes(this.leadModel.isSingleMode?0:e,this.leadModel.publicSampleRate||0)/1e3;this.drawRuler(t)}scrollArrow(e){this.drawLoopArrow(e),this.drawHeardBeatLine(e),this.drawHeartReact(e)}};C([v.Prop({default:()=>["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"]})],exports.default.prototype,"heardBeatLineKeys",2);C([v.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);C([v.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);C([v.Prop({default:()=>[]})],exports.default.prototype,"waveConfigs",2);C([v.Prop({default:()=>[]})],exports.default.prototype,"waveLists",2);C([v.Prop({default:()=>0,type:Number})],exports.default.prototype,"waveDataVersion",2);C([v.Prop({default:()=>[]})],exports.default.prototype,"leadNames",2);C([v.Prop({default:()=>[]})],exports.default.prototype,"analyseValues",2);C([v.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);C([v.Prop({required:!0})],exports.default.prototype,"leadModel",2);C([v.Prop({default:()=>({isShow:!1,gainName:"",speedName:""})})],exports.default.prototype,"rulerConfig",2);C([v.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);C([v.Prop({required:!0})],exports.default.prototype,"gridConfig",2);C([v.Prop({default:()=>({isShow:!1,speed:0,sens:0})})],exports.default.prototype,"measurRulerConfig",2);C([v.Prop({default:()=>({isShow:!1,heartRate:60,speed:0,sens:0})})],exports.default.prototype,"paralleRulerConfig",2);C([v.Prop({default:()=>({isShow:!1,speed:0})})],exports.default.prototype,"magnifierRulerConfig",2);C([v.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1,isClickArrow:!1,showIdxPai:0})})],exports.default.prototype,"heartFight",2);C([v.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);C([v.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeConfig",2);C([v.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);C([v.Prop({default:()=>0})],exports.default.prototype,"dataTotalTimes",2);C([v.Prop({default:()=>0})],exports.default.prototype,"dataTotalLength",2);C([v.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);C([v.Prop({default:()=>0})],exports.default.prototype,"posStart",2);C([_.debounceDecorator(100,{leading:!0,trailing:!0})],exports.default.prototype,"nativeScrollFunc",1);C([_.debounceDecorator(100,{leading:!0,trailing:!0})],exports.default.prototype,"handleScroll",1);exports.default=C([Y.default({name:"Methods"})],exports.default);
1
+ "use strict";var V=Object.defineProperty,z=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var N=(e,t,i)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,b=(e,t)=>{for(var i in t||(t={}))j.call(t,i)&&N(e,i,t[i]);if(k)for(var i of k(t))X.call(t,i)&&N(e,i,t[i]);return e},O=(e,t)=>z(e,E(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const $=require("vue"),q=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const v=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),T=require("lodash"),u=require("@costy-plus/utils"),_=require("../utils/tool.js"),p=require("zrender"),Y=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function K(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const Q=Y($),U=K(p);var Z=Object.defineProperty,J=Object.getOwnPropertyDescriptor,C=(e,t,i,s)=>{for(var a=s>1?void 0:s?J(t,i):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(a=(s?o(t,i,a):o(a))||a);return s&&a&&Z(t,i,a),a};exports.default=class extends Q.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.layerBgGroup=Object.freeze(null),this.leadHeadGroup=Object.freeze(null),this.splitLineGroup=Object.freeze(null),this.rowAndColwaveFromGroup=Object.freeze(null),this.singleWaveFromGroup=Object.freeze(null),this.addwaveFromGroup=Object.freeze(null),this.leadHeadNameGroup=Object.freeze(null),this.leadHeadOffAndDelGroup=Object.freeze(null),this.rulerGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.arrowHeartGroup=Object.freeze(null),this.heardBeatLineGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(10),this.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.timersCopy=Object.freeze(0),this.nearestHeartInfo=Object.freeze({analyseValue:null,insertInfo:null}),this.range=Object.freeze(5e3),this.heartBeatPosition=[],this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.ruleH=Object.freeze(40),this.splitBlockHeight=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({maxPoints:0,minPoints:0}),this.drawArea=Object.freeze({width:0,height:0}),this.vuescrollWH={width:0,height:0},this.waveDataCopy=[],this.addWaveDataCopy=[],this.singleWaveDataCopy=[],this.leadNameList=[],this.activeLeadIdx=Object.freeze(-1),this.publicStep=Object.freeze(0),this.sceneIsMouseDown=Object.freeze(!1),this.sceneIsMouseDownX=Object.freeze(0),this.lastScrollPointIdx=-1,this.lastScrollLeft=-1,this.latestScrollPointIdx=null,this.scrollEndTarget=null,this.scrollEndTimer=null,this.usesScrollEnd=!1,this.pendingScrollPointIdx=null,this.handleScrollEnd=()=>{var t;const e=(t=this.scrollEndTarget)==null?void 0:t.scrollLeft;if(typeof e=="number"&&e!==this.lastScrollLeft){this.scrollCommon(e);return}this.emitScrollPointIdx()}}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.scrollConfig.isShow&&parseInt(`${(e=this.scrollConfig.bar)==null?void 0:e.size}`)||0)||0}}destroyed(){var e,t,i,s,a,n,o,r,l,d,h,f;this.scrollEndTarget&&this.usesScrollEnd&&this.scrollEndTarget.removeEventListener("scrollend",this.handleScrollEnd),this.scrollEndTimer&&clearTimeout(this.scrollEndTimer),this.scrollEndTarget=null,this.scrollEndTimer=null,this.latestScrollPointIdx=null,this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(i=this.addwaveFromGroup)==null||i.removeAll(),(s=this.leadHeadGroup)==null||s.removeAll(),(a=this.splitLineGroup)==null||a.removeAll(),(n=this.leadHeadNameGroup)==null||n.removeAll(),(o=this.leadHeadOffAndDelGroup)==null||o.removeAll(),(r=this.rulerGroup)==null||r.removeAll(),(l=this.arrowGroup)==null||l.removeAll(),(d=this.arrowHeartGroup)==null||d.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(f=this.sceneIns)==null||f.dispose()}initCreatedConfig(){this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height,this.calcHeartBeatPositions(),this.initConfig()}init(){this.calcHeartBeatPositions(),this.initWaveFormPeer(),this.combinationDrawing(),this.registPostStart()}registPostStart(){this.posStart!==void 0&&this.posStart!==null&&(this.scrollConfig.isShow?this.$nextTick(()=>{var e;this.scrollConfig.isNativeScroll?(e=this.$refs[this.prefixId+"nativeScroll"])==null||e.scrollBy({left:(this.posStart||0)*(this.publicStep||1),top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({x:(this.posStart||0)*(this.publicStep||1)})}):(this.scrollWaveFrom(this.posStart),this.scrollRuler(this.posStart),this.scrollArrow(this.posStart)))}resetScroll(e=0){this.scrollConfig.isShow?this.$nextTick(()=>{var t;this.scrollConfig.isNativeScroll?(t=this.$refs[this.prefixId+"nativeScroll"])==null||t.scrollBy({left:e,top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({x:e})}):(this.scrollWaveFrom(e),this.scrollRuler(e),this.scrollArrow(e))}handleNotifyMeasurintRectPostion(e){let t=null;this.leadModel.isSingleMode&&this.singleWaveFromGroup?t=(this.singleWaveFromGroup._children||[]).find(i=>i.rectContain(e.x,e.y)||i.rectContain(e.x,e.yEnd)):(t=(this.rowAndColwaveFromGroup._children||[]).find(i=>i.rectContain(e.x,e.y)||i.rectContain(e.x,e.yEnd)),t||(t=(this.addwaveFromGroup._children||[]).find(i=>i.rectContain(e.x,e.y)||i.rectContain(e.x,e.yEnd)))),t&&this.$emit("notifyMeasurintConfig",t.sens)}combinationDrawing(e=!0){e&&(this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes()),this.drawWaveFrom()}calcHeartBeatPositions(){this.heartBeatPosition=[];let e=[],t=0;for(let i=0;i<this.analyseValues.length;i++){for(let s=1;s<this.analyseValues[i].length;s++)i!==1&&this.analyseValues[i][s].KeyPosByBeat.Rpoint===0||(this.analyseValues[i][s].AnabyBeat.VentricularRate===0||this.analyseValues[i][s].AnabyBeat.AtrialRate===0?t=0:t=Math.round(60/(this.analyseValues[i][s].AnabyBeat.VentricularRate||this.analyseValues[i][s].AnabyBeat.AtrialRate)*1e3),e.push({index:this.analyseValues[i][s].BeatID,position:this.analyseValues[i][s].KeyPosByBeat.Rpoint,heartrate:this.analyseValues[i][s].AnabyBeat.VentricularRate||this.analyseValues[i][s].AnabyBeat.AtrialRate,interval:t,telectricalaxis:this.analyseValues[i][s].AnabyBeat.TAxis===9999?this.range:this.analyseValues[i][s].AnabyBeat.TAxis,qrstCompany:(this.analyseValues[i][s].AnabyBeat.QRS_T===9999?this.range:this.analyseValues[i][s].AnabyBeat.QRS_T)+"\xB0",heart_style:this.analyseValues[i][s].heart_style}));this.heartBeatPosition.push(e)}e=null}initSlidingWindowInfo(){const e=this.publicStep||0,t=Math.ceil(this.splitPoint/e);if(this.slidingWindowInfo={points:this.slidingWindowInfo.points!==t||this.leadModel.isSingleMode?t:this.slidingWindowInfo.points,startInd:this.slidingWindowInfo.startInd||0,endInd:(this.slidingWindowInfo.startInd||0)+t},this.slidingWindowInfo.endInd>this.dataTotalLength&&(this.slidingWindowInfo.endInd=this.dataTotalLength),this.scrollConfig.isShow&&!this.leadModel.isSingleMode){const s=u.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),a=this.dataTotalLength*s;this.vuescrollWH.width=this.canvasContainer.width+(a||0)-this.splitPoint}const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:this.addSlidingWindowInfo.points!==i||this.leadModel.isSingleMode?i:this.addSlidingWindowInfo.points,startInd:this.addSlidingWindowInfo.startInd||0,endInd:(this.addSlidingWindowInfo.endInd||0)+i},this.addSlidingWindowInfo.endInd>this.dataTotalLength&&(this.addSlidingWindowInfo.endInd=this.dataTotalLength)}calcHighestAndLowestPoint(){const e=T.flattenDeep(this.waveLists);return{maxPoints:T.max(e)||0,minPoints:T.min(e)||0}}isLeadOff(e){return!!this.waveConfigs[e].isLeadOff}isLeadDel(e){return!!this.waveConfigs[e].isLeadDelete}initConfig(){var t;this.rowAndColwaveFromGroup=new p.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new p.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new p.Group({name:"addwaveFrom"}),this.leadHeadGroup=new p.Group({name:"leadHead"}),this.splitLineGroup=new p.Group({name:"splitLine"}),this.leadHeadNameGroup=new p.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new p.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new p.Group({name:"ruler"}),this.arrowGroup=new p.Group({name:"arrowLoop"}),this.arrowHeartGroup=new p.Group({name:"arrowHeart"}),this.heardBeatLineGroup=new p.Group({name:"heardBeatLine"});let e=this.canvasContainer.width;if(this.leadModel.ecgareawidth===1){const i=u.getPrintLengthToPx(((t=this.waveConfigs[0])==null?void 0:t.sampleRate)||0)+this.leadHeadConfig.leadHedeWidth;i<=e&&(e=i)}else if(this.leadModel.isContinuous){const i=u.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),s=this.dataTotalLength*i;!this.leadModel.isSingleMode&&(s||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(s||0)+this.leadHeadConfig.leadHedeWidth)}this.drawArea={width:e,height:this.canvasContainer.height-this.bottomAreaHeight-30},this.slidingWindowInfo={points:this.slidingWindowInfo.points||0,startInd:this.slidingWindowInfo.startInd||0,endInd:this.slidingWindowInfo.endInd||0},this.addSlidingWindowInfo={points:this.addSlidingWindowInfo.points||0,startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0},this.loopArrowY={add:0,rowAndCol:0},this.currentHeardBeat={heardBeat:null,ele:null},this.leadNameList=this.leadNames.map((i,s)=>s)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=this.calcHighestAndLowestPoint(),this.leadModel.isSingleMode?(this.splitBlockHeight=Math.abs(this.highestAndLowestPoint.maxPoints)+Math.abs(this.highestAndLowestPoint.minPoints)+22,this.splitBlockHeight>this.drawArea.height&&(this.splitBlockHeight=this.drawArea.height/6)):this.splitBlockHeight=this.drawArea.height/this.totalRows,this.publicStep=u.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),this.rulerStep=(this.publicStep||1)*(this.leadModel.publicSampleRate||1)/(this.gridConfig.cellMg*2+2)}initWaveFormPeer(){var i;(i=this.sceneIns)==null||i.dispose(),this.AssistCtx=null;const e=document.getElementById(`${this.prefixId}wave-from-box`);this.sceneIns=U.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:1});const t=document.getElementById(`${this.prefixId}MXGrid`);this.AssistCtx=t.getContext("2d"),this.sceneInsEventOff(),this.sceneIns.on("mousemove",this.sceneInsMousemove),this.sceneIns.on("mousedown",this.sceneInsMouseDown),this.sceneIns.on("mouseup",this.sceneInsMouseUp),this.sceneIns.on("click",this.sceneInsClick),this.sceneIns.on("contextmenu",this.sceneInsContextmenu)}sceneInsClick(e){var l,d,h,f;if(!this.heartFight.isShow||!this.heartFight.isClickArrow)return;this.nearestHeartInfo={analyseValue:null,insertInfo:null};const t=e.offsetX-this.waveDataCopy[0].pos[0],i=this.waveDataCopy[0].startInd||0;let s=u.getPointIdxForPx(t,this.waveDataCopy[0].step||1);if(s+=i,s<=0)return;const a=.15*this.waveConfigs[this.heartFight.showIdxPai].sampleRate;let n=null,o=-1,r=1/0;for(let g=0;g<this.analyseValues.length;g++){const x=this.analyseValues[g],S=g!==1?x.filter((L,P)=>{var I;return P===0||((I=L.KeyPosByBeat)==null?void 0:I.Rpoint)!==0}):x;let y=0,w=S.length-1;for(;y<=w;){const L=Math.floor((y+w)/2),P=S[L],I=(l=P.KeyPosByBeat)==null?void 0:l.Rpoint;if(I===void 0)break;const m=Math.abs(s-I);m<=a&&m<r&&(r=m,n=P,o=g),I<s?y=L+1:w=L-1}}if(n)this.nearestHeartInfo={analyseValue:n,insertInfo:null};else{let g=-1,x=1/0,S=-1,y=-1;for(let w=0;w<this.analyseValues.length;w++){const L=this.analyseValues[w];for(let P=0;P<L.length;P++){const I=L[P];if(w!==1&&P>0&&((d=I.KeyPosByBeat)==null?void 0:d.Rpoint)===0)continue;const m=(h=I.KeyPosByBeat)==null?void 0:h.Rpoint;if(m===void 0)continue;const c=Math.abs(s-m);c<x&&(x=c,y=w,s<m?S=P:w!==1&&((f=I.KeyPosByBeat)==null?void 0:f.Rpoint)===0&&P===0?S=1:S=P+1)}}y!==-1&&(o=y,g=S,this.nearestHeartInfo={analyseValue:{AnabyBeat:{QTd:0,QTc:0,SV3Amp:0,PR:0,QTcd:0,BeatType:-1,SV1Amp:0,QT:0,QRSAxis:0,SV5Amp:0,TAxis:0,AtrialRate:0,Td:0,RV5Amp:0,VentricularRate:0,Pd:0,QRSd:0,RV3Amp:0,PAxis:0,RV1Amp:0,QTdr:0,QRS_T:0},KeyPosByBeat:{Rpoint:s,PPpeak:0,Tend:0,PPstart:0,Tpeak:0,TPpeak:0,QRSend:0,Pend:0,Tstart:0,Ppeak:0,SPpoint:0,PPend:0,TPend:0,QRSstart:0,Pstart:0,TPstart:0},ecg_info_detail:[],BeatID:-1,heart_style:""},insertInfo:{listIndex:o,insertIndex:g,pointIdx:s,distanceToNearest:x}})}this.$emit("notifySceneClick",{event:e,offsetX:e.offsetX,offsetY:e.offsetY,nearestHeartInfo:T.cloneDeep(this.nearestHeartInfo)}),this.drawHeartReact(this.drawLoopArrowStartPosIdx)}sceneInsContextmenu(e){e.event.preventDefault(),this.$emit("notifySceneContextmenu",{event:e,offsetX:e.offsetX,offsetY:e.offsetY,nearestHeartInfo:T.cloneDeep(this.nearestHeartInfo)})}sceneInsMousemove(e){var t;this.sceneIsMouseDown&&(this.scrollConfig.isNativeScroll?(t=this.$refs[`${this.prefixId}nativeScroll`])==null||t.scrollBy({left:e.offsetX-this.sceneIsMouseDownX,top:0}):this.$refs[`${this.prefixId}vueScroll`].scrollBy({dx:e.offsetX-this.sceneIsMouseDownX}))}sceneInsMouseDown(e){this.sceneIsMouseDown=!0,this.sceneIsMouseDownX=e.offsetX}sceneInsMouseUp(e){this.sceneIsMouseDown=!1}sceneInsEventOff(){var e,t,i,s,a;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(i=this.sceneIns)==null||i.off("mouseup",this.sceneInsMouseUp),(s=this.sceneIns)==null||s.off("click",this.sceneInsClick),(a=this.sceneIns)==null||a.off("contextmenu",this.sceneInsContextmenu)}drawLeadHead(){var i,s,a,n,o,r;(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.remove(this.leadHeadGroup);let e="",t=!1;e:for(let l=1;l<=this.totalRows;l++){if(t=!1,!(this.waveConfigs||[])[l-1])break e;if(!!this.waveConfigs[l-1].isShowLeadHead){if(l<=this.leadModel.line)e=(this.leadNames||[])[l-1]||"",this.waveConfigs[l-1].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),this.leadHeadConfig.isShowLeadCalibration!==!1&&((a=this.leadHeadGroup)==null||a.add(this.createLeadHead(0,this.waveConfigs[l-1].posY||l*this.splitBlockHeight,u.getSens(this.waveConfigs[l-1].isFixedSquareWaveSize?this.waveConfigs[l-1].fixedSquareWaveSizeGain:this.waveConfigs[l-1].gain,this.gridConfig.cellMg),t)));else if(l>this.leadModel.line&&l-this.leadModel.line<=this.leadModel.add){if(!this.waveConfigs[this.longLeadConfig.leadIdxs[l-this.leadModel.line-1]])continue;e=this.leadNames[this.longLeadConfig.leadNames[this.longLeadConfig.leadNames[l-this.leadModel.line-1]]],this.waveConfigs[this.longLeadConfig.leadIdxs[l-this.leadModel.line-1]].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),this.leadHeadConfig.isShowLeadCalibration!==!1&&((o=this.leadHeadGroup)==null||o.add(this.createLeadHead(0,((n=this.waveConfigs[this.longLeadConfig.leadIdxs[l-this.leadModel.line-1]])==null?void 0:n.posY)||l*this.splitBlockHeight,u.getSens(this.waveConfigs[this.longLeadConfig.leadIdxs[l-this.leadModel.line-1]].isFixedSquareWaveSize?this.waveConfigs[this.longLeadConfig.leadIdxs[l-this.leadModel.line-1]].fixedSquareWaveSizeGain:this.waveConfigs[this.longLeadConfig.leadIdxs[l-this.leadModel.line-1]].gain,this.gridConfig.cellMg),t)))}}}(r=this.sceneIns)==null||r.add(this.leadHeadGroup)}createLeadHead(e,t,i,s){const a=this.leadHeadConfig.leadHedeWidth/4;return i=s?i/2:i,new p.Polyline({cursor:"",shape:{points:[[0+e,0+t],[a+e,0+t],[a+e,-i+t],[3*a+e,-i+t],[3*a+e,0+t],[4*a+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawColSplitLine(){var n,o,r,l,d;(n=this.splitLineGroup)==null||n.removeAll(),(o=this.sceneIns)==null||o.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/(this.leadModel.column||1);if(this.splitPoint=e,this.leadModel.isSingleMode){const h=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),f=u.getDataLenTimes(Math.ceil(this.splitPoint/(h||1))||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0),g=parseInt(`${f/1e3%60}`,10);this.splitPoint=g*(this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0)*(h||0)}let t=0,i=0,s=0,a=0;for(let h=1;h<=this.leadModel.column-1;h++){t=h*e+this.leadHeadConfig.leadHedeWidth,i=h*this.leadModel.line;e:for(let f=1;f<=this.leadModel.line;f++){if(!(this.waveConfigs||[])[f-1+i])break e;if((this.waveConfigs||[])[f-1+i].posX!==void 0&&(t=(this.waveConfigs||[])[f-1+i].posX),s=(this.waveConfigs||[])[f-1+i].leadIdx,s===void 0)break;a=u.getSens((this.waveConfigs||[])[f-1+i].isFixedSquareWaveSize?(this.waveConfigs||[])[f-1+i].fixedSquareWaveSizeGain:(this.waveConfigs||[])[f-1+i].gain,this.gridConfig.cellMg),(this.waveConfigs||[])[f-1+i].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.leadNames[s])?(r=this.splitLineGroup)==null||r.add(this.creatSplitLine(t,((this.waveConfigs||[])[f-1+i].posY||f*this.splitBlockHeight)-(a||0)/2*.5,a,!0)):(l=this.splitLineGroup)==null||l.add(this.creatSplitLine(t,((this.waveConfigs||[])[f-1+i].posY||f*this.splitBlockHeight)-(a||0)*.5,a))}}(d=this.sceneIns)==null||d.add(this.splitLineGroup)}creatSplitLine(e,t,i,s){return new p.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(s?(i||0)/2:i||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawRulerNotes(){var s,a;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new p.Text({cursor:"",style:b({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new p.Text({style:b({text:this.rulerConfig.renderText||`${this.rulerConfig.gainName} ${this.rulerConfig.speedName}`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.canvasContainer.height-this.ruleH},e)});(s=this.sceneIns)==null||s.add(i),(a=this.sceneIns)==null||a.add(t)}drawRuler(e=0){var f,g,x,S,y;if(this.timersCopy=e,(f=this.rulerGroup)==null||f.removeAll(),!this.rulerConfig.isShow)return;const t=this.canvasContainer.height;let i=this.leadHeadConfig.leadHedeWidth,s=0;const a=u.getStepForSpeed(this.rulerConfig.speed,this.gridConfig.cellMg,this.rulerConfig.sampleRate),n=this.rulerStep||1,o=Math.max(0,this.drawArea.width-this.leadHeadConfig.leadHedeWidth),l=Math.ceil(o/n)*.1,d=this.dataTotalTimes*2;let h=e+l;if(d>0){const w=this.leadModel.isContinuous?d*1.1:d;h=Math.min(h,w)}if(!this.leadModel.add&&a){const w=u.getPointIdxForPx(this.splitPoint*(this.leadModel.column||1),a),L=u.getDataLenTimes(w,this.rulerConfig.sampleRate||0)/1e3;L>0&&(h=Math.min(h,e+L))}for(let w=e;w<=h;w=+(w+.1).toFixed(1))w!==e&&(i+=this.rulerStep),w%1===0?(s=t-10,(g=this.rulerGroup)==null||g.add(new p.Text({cursor:"",style:{x:i,y:s-15,text:w+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=t-5,(x=this.rulerGroup)==null||x.add(new p.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:t},style:{stroke:"#FF0080",lineWidth:2}}));(S=this.rulerGroup)!=null&&S.__zr||(y=this.sceneIns)==null||y.add(this.rulerGroup)}getWavePoints(e){let t=0;return e.data.map(([i,s],a)=>{if(isNaN(s)){t===0&&(t=Math.max(a-1,0));const n=e.data[t]||[0,0];return[n[0]+e.pos[0],n[1]+e.pos[1]]}return t=0,[i+e.pos[0],s+e.pos[1]]})}updateWaveGroupPoints(e,t){e==null||e.eachChild((i,s)=>{if(!(i instanceof p.Polyline))return;const a=t[s||0];!(a!=null&&a.data)||i.attr({shape:{points:this.getWavePoints(a)}})})}refreshVisibleWaveData(){if(!this.waveConfigs.length||!this.waveLists.length)return;if(this.pendingScrollPointIdx!==null){const s=this.pendingScrollPointIdx;if(!this.isWaveRangeLoaded(s))return;this.pendingScrollPointIdx=null,this.scrollWaveFrom(s),this.scrollRuler(s),this.scrollArrow(s);return}const e=this.slidingWindowInfo.startInd||0;if(!this.isWaveRangeLoaded(e))return;if(this.leadModel.isSingleMode){const s=this.getRednerSinglePoints();this.singleWaveDataCopy=s,this.updateWaveGroupPoints(this.singleWaveFromGroup,s);return}const t=this.getRednerPoints(),i=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=i,this.updateWaveGroupPoints(this.rowAndColwaveFromGroup,t),this.updateWaveGroupPoints(this.addwaveFromGroup,i)}isWaveRangeLoaded(e){const t=this.waveLists[0];if(!(t!=null&&t.length))return!1;const i=this.dataTotalLength||t.length,s=Math.max(0,Math.min(e,i)),a=Math.max(this.slidingWindowInfo.points||0,this.addSlidingWindowInfo.points||0,1),n=Math.min(i,s+a);for(let o=s;o<n;o++)if(isNaN(t[o]))return!1;return!0}drawWaveFrom(){var e,t,i,s,a;(e=this.leadHeadNameGroup)==null||e.removeAll(),(t=this.leadHeadOffAndDelGroup)==null||t.removeAll(),this.leadModel.isSingleMode?(this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(i=this.sceneIns)==null||i.add(this.singleWaveFromGroup)):(this.singleWaveDataCopy=[],this.createAddWaveFrom(),this.createRowAndColWaveFrom(),(s=this.sceneIns)==null||s.add(this.rowAndColwaveFromGroup),(a=this.sceneIns)==null||a.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(this.timersCopy),this.drawLoopArrow(this.drawLoopArrowStartPosIdx),this.drawHeartReact(this.drawLoopArrowStartPosIdx)}getRednerSinglePoints(){let e=0,t=0;const i=this.waveLists[this.singleModeConfig.defaultSelect]||[];let s=this.slidingWindowInfo.startInd||0,a=this.slidingWindowInfo.endInd||0;const n=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),o=u.getSens(this.waveConfigs[this.singleModeConfig.defaultSelect].gain,this.gridConfig.cellMg),r=[],l=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let d=0;d<1;d++){e=d*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let h=1;h<=l;h++)t=h*this.splitBlockHeight,h>1&&(t*=.8,s=a,a=s+(this.slidingWindowInfo.points||0)),h===1&&(this.loopArrowY.rowAndCol=t),r.push({pos:[e,t],startInd:s,endInd:a,step:n,sens:o,data:i.slice(s,a).map((f,g)=>this.waveConfigs[this.singleModeConfig.defaultSelect].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName)?u.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,f,o/2):u.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,f,o)).map((f,g)=>[g*(n||0),-f])})}return r}createSingleWaveFrom(){var o,r,l;(o=this.singleWaveFromGroup)==null||o.removeAll();let e=this.getRednerSinglePoints(),t=u.getDataLenTimes(this.slidingWindowInfo.points||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0);const i=t;let s=0,a=0,n=0;for(let d=0;d<e.length&&!(e[d].pos[1]>this.drawArea.height+this.bottomAreaHeight);d++)this.isLeadDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx)||(s=parseInt(`${t/1e3/60}`,10),a=parseInt(`${t/1e3%60}`,10),s=a===60?s+=1:s,s=s===0?"00":s<10?`0${s}`:s,a=a===0||a===60?"00":a<10?`0${a}`:a,(r=this.singleWaveFromGroup)==null||r.add(new p.Polyline({cursor:"",name:this.singleModeConfig.defaultSelect+"_"+d,sens:e[d].sens,shape:{points:e[d].data.map(([h,f],g)=>isNaN(f)?(n===0&&(n=g-1,n=n<0?0:n),[e[d].data[n][0]+e[d].pos[0],e[d].data[n][1]+e[d].pos[1]]):(n=0,[h+e[d].pos[0],f+e[d].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:h=>{this.onDbClickWaveFrom(h,"single")},oncontextmenu:h=>{this.onContextmenu(h,"single")}})),t/1e3<this.dataTotalTimes&&((l=this.singleWaveFromGroup)==null||l.add(new p.Text({cursor:"",style:{x:e[d].pos[0],y:e[d].pos[1]-(e[d].sens||0)/2,text:d===0?"00:00 \u5FC3\u7387":`${s}:${a} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}}))),d>0&&(t+=i)),this.createLeadName(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,e[0].pos[0]-10,e[0].pos[1]+10),this.createLeadOffAndDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,e[0].pos[0]-5,e[0].pos[1]-(e[d].sens||0)/2-15),this.waveConfigs[this.singleModeConfig.defaultSelect].squareWaveSens&&this.createLeadSensNams(this.waveConfigs[this.singleModeConfig.defaultSelect].squareWaveSens,e[0].pos[0]-10,e[0].pos[1]+10);this.singleWaveDataCopy=e,e=null}drawHeartReact(e=0){var a,n,o,r,l,d,h,f,g,x,S;if((a=this.arrowHeartGroup)==null||a.removeAll(),!this.heartFight.isShow)return;if(this.leadModel.line!==12&&this.leadModel.column!==1){this.nearestHeartInfo={analyseValue:null,insertInfo:null};return}if(!this.nearestHeartInfo.analyseValue)return;const t=u.getStepForSpeed(this.waveConfigs[this.heartFight.showIdxPai].speed,this.gridConfig.cellMg,this.waveConfigs[this.heartFight.showIdxPai].sampleRate);let i=0;const s=(((o=(n=this.nearestHeartInfo.analyseValue)==null?void 0:n.KeyPosByBeat)==null?void 0:o.Rpoint)||0)-e;if(!(e>(((l=(r=this.nearestHeartInfo.analyseValue)==null?void 0:r.KeyPosByBeat)==null?void 0:l.Rpoint)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&s>(this.slidingWindowInfo.points||0))&&!(this.leadModel.isSingleMode&&s>(this.slidingWindowInfo.points||0))&&!((((h=(d=this.nearestHeartInfo.analyseValue)==null?void 0:d.KeyPosByBeat)==null?void 0:h.Rpoint)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))){if(this.nearestHeartInfo.insertInfo)i=(s||0)*t+this.leadHeadConfig.leadHedeWidth,(g=this.arrowHeartGroup)==null||g.add(new p.Line({name:"draw_heart_line",cursor:"",shape:{x1:i,y1:0,x2:i,y2:this.canvasContainer.height-2},style:{stroke:"#E07F26",lineWidth:2}}));else{const y=.1*this.waveConfigs[this.heartFight.showIdxPai].sampleRate;i=((s||0)-y/2)*t+this.leadHeadConfig.leadHedeWidth;const w=(y*2+1)*t;(f=this.arrowHeartGroup)==null||f.add(new p.Rect({name:"draw_heart_rect",style:{fill:"#FF87E5",opacity:.64},shape:{x:i,y:0,width:w,height:this.canvasContainer.height-2},cursor:""}))}(x=this.arrowHeartGroup)!=null&&x.__zr||(S=this.sceneIns)==null||S.add(this.arrowHeartGroup)}}drawLoopArrow(e=0){var f,g,x,S,y,w,L,P,I,m,c,F,R;if(this.drawLoopArrowStartPosIdx=e,!this.heartFight.isShow)return;(f=this.arrowGroup)==null||f.removeAll(),this.heartFight.mode&&this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=this.heartBeatPosition[this.heartFight.showIdxPai][this.heartFight.defaultSelect]||null,this.drawHeardBeatLine());let t=0,i=0;if(this.leadModel.add){const D=u.getSens(this.waveConfigs[this.longLeadConfig.leadIdxs[0]].gain,this.gridConfig.cellMg);i=this.loopArrowY.add-(D||0)-this.splitBlockHeight/3.5}else this.leadModel.column===1?i=0:i=20;let s=0,a=0;const n={fontSize:12,fill:"#FF0000",fontFamily:this.fontFamily};let o=0,r=0;const l=u.getStepForSpeed(this.waveConfigs[this.heartFight.showIdxPai].speed,this.gridConfig.cellMg,this.waveConfigs[this.heartFight.showIdxPai].sampleRate);let d=0,h=0;for(let D=0;D<(this.heartBeatPosition[this.heartFight.showIdxPai]||[]).length;D++){const H=this.heartBeatPosition[this.heartFight.showIdxPai][D];if(d=((H==null?void 0:H.position)||0)-e,e>((H==null?void 0:H.position)||0)||!this.leadModel.isContinuous&&!this.leadModel.add&&d>(this.slidingWindowInfo.points||0)||this.leadModel.isSingleMode&&d>(this.slidingWindowInfo.points||0))continue;if(((H==null?void 0:H.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;s=((g=this.AssistCtx)==null?void 0:g.measureText(`${(H==null?void 0:H.heart_style)||""}`).width)||0,t=d*(l||0)+this.leadHeadConfig.leadHedeWidth-0,a=0,(x=this.arrowGroup)==null||x.add(new p.Text({name:"arrow_box",cursor:"",style:O(b({x:t,y:i+10,text:`${(H==null?void 0:H.heart_style)||""}`},n),{fill:"#333"}),onclick:M=>{!this.heartFight.mode&&this.heartFight.isClickArrow},oncontextmenu:M=>{M.event.preventDefault(),!this.heartFight.mode&&this.heartFight.isClickArrow}}));let A=t,G=0;const W=this.heartBeatPosition[this.heartFight.showIdxPai][D+1]||null;if(this.heartFight.isHeartRateCalculatedBasedOnInterval)if(D>0){const M=this.heartBeatPosition[this.heartFight.showIdxPai][D-1];if(M){const B=(M.position||0)-e;if(!this.leadModel.isContinuous&&!this.leadModel.add&&B>(this.slidingWindowInfo.points||0))continue;A=B*(l||0)+this.leadHeadConfig.leadHedeWidth,G=t,r=u.calcMs(Math.abs(((H==null?void 0:H.position)||0)-(M.position||0))*(l||0),this.waveConfigs[this.heartFight.showIdxPai].speed,this.gridConfig.cellMg,1),o=r!==0&&u.calcBpm(r)||0}}else continue;else{if(!W||(h=((W==null?void 0:W.position)||0)-e,!this.leadModel.isContinuous&&!this.leadModel.add&&h>(this.slidingWindowInfo.points||0))||this.leadModel.isSingleMode&&h>(this.slidingWindowInfo.points||0))continue;if(((W==null?void 0:W.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;A=t,G=h*(l||0)+this.leadHeadConfig.leadHedeWidth,o=(W==null?void 0:W.heartrate)||0}if(a=0,this.heartFight.heartrate){s=((S=this.AssistCtx)==null?void 0:S.measureText(`${o||""}`).width)||0;const M=(G-A)/2-s/2+A;(y=this.arrowGroup)==null||y.add(new p.Text({cursor:"",style:b({x:M,y:a+i+5,text:`${o||""}`},n)})),a+=12}if(this.heartFight.interval){let M=`${(W==null?void 0:W.interval)||""}`;this.heartFight.isIntervalCalculatedBasedOnHeartRate&&(M=`${Math.round(6e4/o)}`),s=((w=this.AssistCtx)==null?void 0:w.measureText(M).width)||0;const B=(G-A)/2-s/2+A;(L=this.arrowGroup)==null||L.add(new p.Text({cursor:"",style:b({x:B,y:a+i+5,text:M},n)})),a+=12}if(this.heartFight.qrstCompany){const M=(W==null?void 0:W.qrstCompany)||"";s=((P=this.AssistCtx)==null?void 0:P.measureText(M).width)||0;const B=(G-A)/2-s/2+A;(I=this.arrowGroup)==null||I.add(new p.Text({cursor:"",style:b({x:B,y:a+i+5,text:M},n)})),a+=12}if(this.heartFight.telectricalaxis){const M=`${(W==null?void 0:W.telectricalaxis)||""}`;s=((m=this.AssistCtx)==null?void 0:m.measureText(M).width)||0;const B=(G-A)/2-s/2+A;(c=this.arrowGroup)==null||c.add(new p.Text({cursor:"",style:b({x:B,y:a+i+5,text:M},n)}))}}(F=this.arrowGroup)!=null&&F.__zr||(R=this.sceneIns)==null||R.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",p.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var a,n,o,r,l,d,h,f,g,x,S,y,w,L,P;if(!this.currentHeardBeat.heardBeat)return;(a=this.heardBeatLineGroup)==null||a.removeAll();let t={},i=0,s;if(this.leadModel.isSingleMode){let I=this.getRednerSinglePoints();e:for(let m=0;m<I.length;m++){if(m>=1||this.leadNames[this.singleModeConfig.defaultSelect]==="M")break e;if((n=this.analyseValues[this.singleModeConfig.defaultSelect])!=null&&n[this.currentHeardBeat.heardBeat.index])t=((l=(r=this.analyseValues[this.singleModeConfig.defaultSelect])==null?void 0:r[this.currentHeardBeat.heardBeat.index])==null?void 0:l.KeyPosByBeat)||t;else{let c=this.analyseValues.find(F=>{var R;return(R=F[this.currentHeardBeat.heardBeat.index])==null?void 0:R.KeyPosByBeat});if(!c)break e;c&&(t=(o=c[this.currentHeardBeat.heardBeat.index])==null?void 0:o.KeyPosByBeat),c=null}for(const c in t)if(this.heardBeatLineKeys.includes(c)){if(i=(t[c]-this.slidingWindowInfo.startInd)*(I[m].step||0),this.isLeadOff(m)||this.isLeadDel(m))continue;if(!this.leadModel.isContinuous&&t[c]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0))break e;s=I[m],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(s.pos[0]+i,s.pos[1],this.singleModeConfig.defaultSelect+"_"+m,"single"))}}I=null}else{let I=this.getRednerPoints(),m=this.getAddRednerPoints();e:for(let c=0;c<I.length;c++){t=((f=(h=this.analyseValues[c])==null?void 0:h[this.currentHeardBeat.heardBeat.index])==null?void 0:f.KeyPosByBeat)||t;for(const F in t)if(this.heardBeatLineKeys.includes(F)&&Object.prototype.hasOwnProperty.call(t,F)){if(i=(t[F]-this.slidingWindowInfo.startInd)*(I[c].step||0),this.isLeadOff(c)||this.isLeadDel(c))continue;if(e>t[F]||!this.leadModel.isContinuous&&t[F]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(s=I[c],this.leadModel.isContinuous&&c>this.leadModel.line-1))break e;(g=this.heardBeatLineGroup)==null||g.add(this.createHeardBeatLine(s.pos[0]+i,s.pos[1],c+"_"+c,"rowAndCol"))}}e:for(let c=0;c<m.length;c++)if(!!((x=this.analyseValues[c])!=null&&x[this.currentHeardBeat.heardBeat.index])){t=((y=(S=this.analyseValues[c])==null?void 0:S[this.currentHeardBeat.heardBeat.index])==null?void 0:y.KeyPosByBeat)||t;for(const F in t)if(this.heardBeatLineKeys.includes(F)){if(i=(t[F]-this.slidingWindowInfo.startInd)*(m[c].step||0),this.isLeadOff(this.longLeadConfig.leadIdxs[c])&&this.isLeadDel(this.longLeadConfig.leadIdxs[c]))continue;if(e>t[F])break e;s=m[c],(w=this.heardBeatLineGroup)==null||w.add(this.createHeardBeatLine(s.pos[0]+i,s.pos[1],this.longLeadConfig.leadIdxs[c]+"_"+c,"add"))}}I=null,m=null}(L=this.heardBeatLineGroup)!=null&&L.__zr||(P=this.sceneIns)==null||P.add(this.heardBeatLineGroup),t=null}createHeardBeatLine(e,t,i,s){return new p.Line({name:i,cursor:"",shape:{x1:e,y1:t-15,x2:e,y2:t+15},style:{stroke:"blue",lineWidth:1},oncontextmenu:a=>{this.onContextmenu(a,s)}})}drawLeadHeadNameAndOffOrDel(){var e,t;(e=this.sceneIns)==null||e.add(this.leadHeadNameGroup),(t=this.sceneIns)==null||t.add(this.leadHeadOffAndDelGroup)}getAddRednerPoints(){const e=[];let t=this.leadHeadConfig.leadHedeWidth,i=0,s=0,a=[],n=0,o=0;for(let r=0;r<this.leadModel.add;r++)s=this.longLeadConfig.leadIdxs[r],this.waveConfigs[s]&&(t=this.waveConfigs[s].addPosX||t,n=u.getStepForSpeed(this.waveConfigs[s].speed,this.gridConfig.cellMg,this.waveConfigs[s].sampleRate),o=u.getSens(this.waveConfigs[s].gain,this.gridConfig.cellMg),i=this.waveConfigs[s].addPosY||(r+this.leadModel.line+1)*this.splitBlockHeight,a=this.waveLists[s]||[],r===0&&(this.loopArrowY.add=i),e.push({pos:[t,i],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:a.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((l,d)=>this.waveConfigs[s].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[s].leadName)?u.getActualY(this.waveConfigs[s].sensitivity,l,o/2):u.getActualY(this.waveConfigs[s].sensitivity,l,o)).map((l,d)=>[d*(n||0),-l]),sens:o,step:n}));return e}createAddWaveFrom(){var i,s;(i=this.addwaveFromGroup)==null||i.removeAll();let e=this.getAddRednerPoints(),t=0;for(let a=0;a<e.length;a++)this.isLeadDel(this.longLeadConfig.leadIdxs[a])||((s=this.addwaveFromGroup)==null||s.add(new p.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[a]+"_"+a,sens:e[a].sens,shape:{points:e[a].data.map(([n,o],r)=>isNaN(o)?(t===0&&(t=r-1,t=t<0?0:t),[e[a].data[t][0]+e[a].pos[0],e[a].data[t][1]+e[a].pos[1]]):(t=0,[n+e[a].pos[0],o+e[a].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:n=>{this.onDbClickWaveFrom(n,"add")},oncontextmenu:n=>{this.onContextmenu(n,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[a],e[a].pos[0],e[a].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[a],e[a].pos[0]-5,e[a].pos[1]-(e[a].sens||0)/2-15),this.waveConfigs[this.longLeadConfig.leadIdxs[a]].squareWaveSens&&this.createLeadSensNams(this.waveConfigs[this.longLeadConfig.leadIdxs[a]].squareWaveSens,e[a].pos[0],e[a].pos[1]-15));this.addWaveDataCopy=e,e=null}getRednerPoints(){let e=0,t=0,i=0,s=[],a=0,n=0,o=this.slidingWindowInfo.startInd||0,r=this.slidingWindowInfo.endInd||0;const l=[];for(let d=0;d<this.leadModel.column;d++){e=d*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&d>0&&(o=r,r=o+(this.slidingWindowInfo.points||0));for(let h=1;h<=this.leadModel.line&&(t=h*this.splitBlockHeight,!(i>(this.waveLists||[]).length-1));h++)e=this.waveConfigs[i].posX||e,t=this.waveConfigs[i].posY||t,a=u.getStepForSpeed(this.waveConfigs[i].speed,this.gridConfig.cellMg,this.waveConfigs[i].sampleRate),n=u.getSens(this.waveConfigs[i].gain,this.gridConfig.cellMg),s=this.waveLists[i]||[],this.waveConfigs[i]&&(h===1&&(this.loopArrowY.rowAndCol=t),l.push({pos:[e,t],startInd:o,endInd:r,sens:n,step:a,data:s.slice(o,r).map((f,g)=>this.waveConfigs[i].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[i].leadName)?u.getActualY(this.waveConfigs[i].sensitivity,f,n/2):u.getActualY(this.waveConfigs[i].sensitivity,f,n)).map((f,g)=>[g*(a||0),-f])}),i++)}return l}createRowAndColWaveFrom(){var s,a;(s=this.rowAndColwaveFromGroup)==null||s.removeAll();let e=this.getRednerPoints(),t=0,i=0;for(let n=0;n<e.length;n++)t=this.waveConfigs[n].leadIdx||0,this.isLeadDel(t)||(a=this.rowAndColwaveFromGroup)==null||a.add(new p.Polyline({cursor:"",name:n+"_"+n,sens:e[n].sens,shape:{points:e[n].data.map(([o,r],l)=>isNaN(r)?(i===0&&(i=l-1,i=i<0?0:i),[e[n].data[i][0]+e[n].pos[0],e[n].data[i][1]+e[n].pos[1]]):(i=0,[o+e[n].pos[0],r+e[n].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:o=>{this.onDbClickWaveFrom(o,"rowAndCol")},oncontextmenu:o=>{this.onContextmenu(o,"rowAndCol")}})),n<this.leadModel.line?(this.createLeadName(t,e[n].pos[0],e[n].pos[1]-15),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(e[n].sens||0)/2-15),this.waveConfigs[n].squareWaveSens&&this.createLeadSensNams(this.waveConfigs[n].squareWaveSens,e[n].pos[0],e[n].pos[1]-15)):(this.createLeadName(t,e[n].pos[0]+5,e[n].pos[1]-40),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(e[n].sens||0)/2+9),this.waveConfigs[n].squareWaveSens&&this.createLeadSensNams(this.waveConfigs[n].squareWaveSens,e[n].pos[0],e[n].pos[1]-15));this.waveDataCopy=e,e=null}createLeadSensNams(e,t,i){var a;let s=t;this.leadHeadConfig.isShowLeadCalibration===!1&&(this.leadModel.isSingleMode?s=t-this.leadHeadConfig.leadHedeWidth+12:s=t-this.leadHeadConfig.leadHedeWidth+5),this.leadHeadConfig.isShowLeadCalibration&&this.leadHeadConfig.isCalibrationDisplayedBelow&&(t<=this.leadHeadConfig.leadHedeWidth&&(this.leadModel.isSingleMode?s=t-this.leadHeadConfig.leadHedeWidth+12:s=t-this.leadHeadConfig.leadHedeWidth+5),i=i+40),(a=this.leadHeadNameGroup)==null||a.add(new p.Text({style:{x:s,y:i,text:e,fontSize:this.leadConfig.squareWaveSensFontSize||this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}))}createLeadName(e,t,i,s=!1){var n;let a=t;this.leadHeadConfig.isShowLeadCalibration===!1&&(this.leadModel.isSingleMode?a=t-this.leadHeadConfig.leadHedeWidth+12:a=t-this.leadHeadConfig.leadHedeWidth+5),this.leadHeadConfig.isShowLeadCalibration&&this.leadHeadConfig.isCalibrationDisplayedBelow&&(t<=this.leadHeadConfig.leadHedeWidth&&(this.leadModel.isSingleMode?a=t-this.leadHeadConfig.leadHedeWidth+12:a=t-this.leadHeadConfig.leadHedeWidth+5),i=i+20),(n=this.leadHeadNameGroup)==null||n.add(new p.Text({style:{x:a,y:i,text:this.leadNames[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:O(b({},o),{name:this.leadNames[e],idx:e}),isAdd:s})},onclick:o=>{this.$emit("notiifyLeadName",{event:O(b({},o),{name:this.leadNames[e],idx:e}),isAdd:s})}}))}createLeadOffAndDel(e,t,i){var s;(this.isLeadOff(e)||this.isLeadDel(e))&&((s=this.leadHeadOffAndDelGroup)==null||s.add(new p.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}onContextmenu(e,t){e.event.preventDefault(),e.event.stopPropagation();const i=e.target.name.split("_"),s=+i[1];let a=0,n=0,o=0,r=0,l=0;t==="single"?(a=e.offsetX-this.singleWaveDataCopy[s].pos[0],n=this.singleWaveDataCopy[s].startInd,o=u.getPointIdxForPx(a,this.singleWaveDataCopy[s].step||1),r=this.singleWaveDataCopy[s].sens,l=this.singleWaveDataCopy[s].step):t==="rowAndCol"?(a=e.offsetX-this.waveDataCopy[s].pos[0],n=this.waveDataCopy[s].startInd||0,o=u.getPointIdxForPx(a,this.waveDataCopy[s].step||1),r=this.waveDataCopy[s].sens,l=this.waveDataCopy[s].step):t==="add"&&(a=e.offsetX-this.addWaveDataCopy[s].pos[0],n=this.addWaveDataCopy[s].startInd||0,o=u.getPointIdxForPx(a,this.addWaveDataCopy[s].step||1),r=this.addWaveDataCopy[s].sens,l=this.addWaveDataCopy[s].step),o+=n,this.$emit("notifyOnContextmenu",{sens:r,step:l,activeLeadIdx:+i[0],pointIdx:o,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.event.pageX,pageY:e.event.pageY})}onDbClickWaveFrom(e,t){const i=Date.now(),s=()=>{const a=e.target.name.split("_");this.activeLeadIdx=+a[0];const n=+a[1];let o=0,r=0,l=0,d=0,h=0;t==="single"?(o=e.offsetX-this.singleWaveDataCopy[n].pos[0],r=this.singleWaveDataCopy[n].startInd,l=u.getPointIdxForPx(o,this.singleWaveDataCopy[n].step||1),d=this.singleWaveDataCopy[n].sens,h=this.singleWaveDataCopy[n].step):t==="rowAndCol"?(o=e.offsetX-this.waveDataCopy[n].pos[0],r=this.waveDataCopy[n].startInd||0,l=u.getPointIdxForPx(o,this.waveDataCopy[n].step||1),d=this.waveDataCopy[n].sens,h=this.waveDataCopy[n].step):t==="add"&&(o=e.offsetX-this.addWaveDataCopy[n].pos[0],r=this.addWaveDataCopy[n].startInd||0,l=u.getPointIdxForPx(o,this.addWaveDataCopy[n].step||1),d=this.addWaveDataCopy[n].sens,h=this.addWaveDataCopy[n].step),l+=r,this.$emit("notifyActiveEnlargr",{sens:d,step:h,activeLeadIdx:this.activeLeadIdx,pointIdx:l})};i-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,s()):this.dbClickWaveFromTime=i}getScrollEndTarget(){var t;if(this.scrollConfig.isNativeScroll)return this.$refs[this.prefixId+"nativeScroll"];const e=this.$refs[this.prefixId+"vueScroll"];return((t=e==null?void 0:e.$el)==null?void 0:t.querySelector(".__panel"))||null}emitScrollPointIdx(){!this.latestScrollPointIdx||this.$emit("notifyScrollPointIdx",this.latestScrollPointIdx)}scheduleScrollEndFallback(){this.usesScrollEnd||(this.scrollEndTimer&&clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(()=>{this.scrollEndTimer=null,this.emitScrollPointIdx()},100))}bindScrollEnd(){this.scrollEndTarget&&this.usesScrollEnd&&this.scrollEndTarget.removeEventListener("scrollend",this.handleScrollEnd);const e=this.getScrollEndTarget();this.scrollEndTarget=e,this.usesScrollEnd=Boolean(e&&"onscrollend"in e),this.usesScrollEnd&&e&&e.addEventListener("scrollend",this.handleScrollEnd)}nativeScrollFunc(e){this.scrollCommon(e.target.scrollLeft||0)}handleScroll(e,t,i){t.type==="horizontal"&&(t.scrollLeft=t.scrollLeft||0,this.scrollCommon(t.scrollLeft))}scrollCommon(e){const t=Math.max(0,e||0),i=u.getPointIdxForPx(t,this.publicStep||1);i!==this.lastScrollPointIdx&&(this.lastScrollPointIdx=i,this.lastScrollLeft=t,this.isWaveRangeLoaded(i)?(this.pendingScrollPointIdx=null,this.scrollWaveFrom(i),this.scrollRuler(i),this.scrollArrow(i)):this.pendingScrollPointIdx=i,this.latestScrollPointIdx={slidIdxs:i,scrollLeft:t},this.scheduleScrollEndFallback())}scrollWaveFrom(e){this.slidingWindowInfo.startInd=e,this.slidingWindowInfo.endInd=e+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=e,this.addSlidingWindowInfo.endInd=e+(this.addSlidingWindowInfo.points||0);const t=this.getRednerPoints(),i=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=i,this.updateWaveGroupPoints(this.rowAndColwaveFromGroup,t),this.updateWaveGroupPoints(this.addwaveFromGroup,i)}scrollRuler(e){const t=u.getDataLenTimes(this.leadModel.isSingleMode?0:e,this.leadModel.publicSampleRate||0)/1e3;this.drawRuler(t)}scrollArrow(e){this.drawLoopArrow(e),this.drawHeardBeatLine(e),this.drawHeartReact(e)}};C([v.Prop({default:()=>["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"]})],exports.default.prototype,"heardBeatLineKeys",2);C([v.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);C([v.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);C([v.Prop({default:()=>[]})],exports.default.prototype,"waveConfigs",2);C([v.Prop({default:()=>[]})],exports.default.prototype,"waveLists",2);C([v.Prop({default:()=>0,type:Number})],exports.default.prototype,"waveDataVersion",2);C([v.Prop({default:()=>[]})],exports.default.prototype,"leadNames",2);C([v.Prop({default:()=>[]})],exports.default.prototype,"analyseValues",2);C([v.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);C([v.Prop({required:!0})],exports.default.prototype,"leadModel",2);C([v.Prop({default:()=>({isShow:!1,gainName:"",speedName:""})})],exports.default.prototype,"rulerConfig",2);C([v.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);C([v.Prop({required:!0})],exports.default.prototype,"gridConfig",2);C([v.Prop({default:()=>({isShow:!1,speed:0,sens:0})})],exports.default.prototype,"measurRulerConfig",2);C([v.Prop({default:()=>({isShow:!1,heartRate:60,speed:0,sens:0})})],exports.default.prototype,"paralleRulerConfig",2);C([v.Prop({default:()=>({isShow:!1,speed:0})})],exports.default.prototype,"magnifierRulerConfig",2);C([v.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1,isClickArrow:!1,showIdxPai:0})})],exports.default.prototype,"heartFight",2);C([v.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);C([v.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeConfig",2);C([v.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);C([v.Prop({default:()=>0})],exports.default.prototype,"dataTotalTimes",2);C([v.Prop({default:()=>0})],exports.default.prototype,"dataTotalLength",2);C([v.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);C([v.Prop({default:()=>0})],exports.default.prototype,"posStart",2);C([_.debounceDecorator(100,{leading:!0,trailing:!0})],exports.default.prototype,"nativeScrollFunc",1);C([_.debounceDecorator(100,{leading:!0,trailing:!0})],exports.default.prototype,"handleScroll",1);exports.default=C([q.default({name:"Methods"})],exports.default);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "costy-plus",
3
- "version": "1.1.48-0",
3
+ "version": "1.1.49-0",
4
4
  "main": "dist/lib/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",