@streamlayer/react 1.23.1 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app/masters.d.ts +0 -1
- package/lib/cjs/Question.js +1 -1
- package/lib/cjs/advertisement.js +33 -53
- package/lib/cjs/analytics.js +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/feature.js +1 -1
- package/lib/cjs/hooks-n9ax4LRT.js +1 -0
- package/lib/cjs/index-ByUNFvMk.js +5 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index10.js +1 -1
- package/lib/cjs/index11.js +1 -4
- package/lib/cjs/index12.js +1 -1
- package/lib/cjs/index13.js +1 -1
- package/lib/cjs/index14.js +4 -1
- package/lib/cjs/index15.js +1 -1
- package/lib/cjs/index16.js +2 -2
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/index4.js +3 -3
- package/lib/cjs/index5.js +1 -1
- package/lib/cjs/index6.js +1 -1
- package/lib/cjs/index7.js +1 -1
- package/lib/cjs/index8.js +1 -1
- package/lib/cjs/index9.js +7 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +5 -10
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/polymarket.js +4 -9
- package/lib/cjs/sl-types.js +1 -15
- package/lib/cjs/storage.js +1 -1
- package/lib/cjs/theme.js +1 -17
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +15 -15
- package/lib/cjs/utils.js +8 -8
- package/lib/classic/app/masters.d.ts +0 -1
- package/lib/classic/cjs/Question.js +1 -1
- package/lib/classic/cjs/advertisement.js +33 -53
- package/lib/classic/cjs/analytics.js +1 -1
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/bet-pack.js +3 -3
- package/lib/classic/cjs/feature.js +1 -1
- package/lib/classic/cjs/hooks-n9ax4LRT.js +1 -0
- package/lib/classic/cjs/index-ByUNFvMk.js +5 -0
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index10.js +1 -1
- package/lib/classic/cjs/index11.js +1 -1
- package/lib/classic/cjs/index12.js +1 -1
- package/lib/classic/cjs/index13.js +3 -3
- package/lib/classic/cjs/index2.js +2 -2
- package/lib/classic/cjs/index3.js +1 -1
- package/lib/classic/cjs/index4.js +1 -1
- package/lib/classic/cjs/index5.js +1 -1
- package/lib/classic/cjs/index6.js +1 -1
- package/lib/classic/cjs/index7.js +7 -1
- package/lib/classic/cjs/index8.js +1 -1
- package/lib/classic/cjs/index9.js +1 -1
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/notification2.js +1 -1
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/polymarket.js +4 -9
- package/lib/classic/cjs/sl-types.js +1 -15
- package/lib/classic/cjs/useStreamLayerApp.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +15 -15
- package/lib/classic/cjs/utils.js +8 -8
- package/lib/classic/es/Question.js +216 -220
- package/lib/classic/es/advertisement.js +14665 -15122
- package/lib/classic/es/analytics.js +9 -9
- package/lib/classic/es/auth.js +1 -1
- package/lib/classic/es/bet-pack.js +637 -650
- package/lib/classic/es/feature.js +29 -33
- package/lib/classic/es/hooks-n9ax4LRT.js +97 -0
- package/lib/classic/es/index-ByUNFvMk.js +3775 -0
- package/lib/classic/es/index.js +13 -16
- package/lib/classic/es/index10.js +2587 -82
- package/lib/classic/es/index11.js +306 -2344
- package/lib/classic/es/index12.js +103 -101
- package/lib/classic/es/index13.js +449 -464
- package/lib/classic/es/index2.js +1244 -1268
- package/lib/classic/es/index3.js +10 -10
- package/lib/classic/es/index4.js +4 -283
- package/lib/classic/es/index5.js +4 -5
- package/lib/classic/es/index6.js +285 -5
- package/lib/classic/es/index7.js +179 -5
- package/lib/classic/es/index8.js +5 -9
- package/lib/classic/es/index9.js +7 -315
- package/lib/classic/es/insight.js +39 -41
- package/lib/classic/es/notification.js +3 -3
- package/lib/classic/es/notification2.js +513 -528
- package/lib/classic/es/pause-ad.js +116 -116
- package/lib/classic/es/points.js +33 -34
- package/lib/classic/es/polymarket.js +1049 -1102
- package/lib/classic/es/sl-types.js +115 -217
- package/lib/classic/es/useStreamLayerApp.js +1 -1
- package/lib/classic/es/useStreamLayerApp2.js +6485 -6405
- package/lib/classic/es/utils.js +6 -6
- package/lib/classic/source.css +110 -0
- package/lib/dist/cjs/index-ByUNFvMk.js +5 -0
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +34 -42
- package/lib/dist/es/index-ByUNFvMk.js +3775 -0
- package/lib/dist/es/index.js +7 -11
- package/lib/dist/es/masters.js +13506 -12760
- package/lib/dist/index.d.ts +5 -5
- package/lib/dist/source.css +64 -0
- package/lib/es/Question.js +99 -101
- package/lib/es/advertisement.js +14665 -15122
- package/lib/es/analytics.js +29 -29
- package/lib/es/auth.js +1 -1
- package/lib/es/bet-pack.js +12 -11
- package/lib/es/feature.js +29 -33
- package/lib/es/hooks-n9ax4LRT.js +97 -0
- package/lib/es/index-ByUNFvMk.js +3775 -0
- package/lib/es/index.js +13 -16
- package/lib/es/index10.js +7 -263
- package/lib/es/index11.js +172 -822
- package/lib/es/index12.js +2587 -178
- package/lib/es/index13.js +248 -302
- package/lib/es/index14.js +815 -82
- package/lib/es/index15.js +306 -2344
- package/lib/es/index16.js +451 -454
- package/lib/es/index2.js +737 -757
- package/lib/es/index4.js +626 -639
- package/lib/es/index5.js +10 -10
- package/lib/es/index6.js +5 -285
- package/lib/es/index7.js +7 -5
- package/lib/es/index8.js +283 -5
- package/lib/es/index9.js +179 -8
- package/lib/es/insight.js +39 -41
- package/lib/es/masters.js +4 -5
- package/lib/es/masters2.js +408 -441
- package/lib/es/notification.js +469 -484
- package/lib/es/pause-ad.js +116 -116
- package/lib/es/points.js +42 -43
- package/lib/es/polymarket.js +1049 -1102
- package/lib/es/sl-types.js +114 -235
- package/lib/es/storage.js +22 -22
- package/lib/es/theme.js +3 -44
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/es/useStreamLayerApp2.js +6485 -6405
- package/lib/es/utils.js +6 -6
- package/lib/source.css +120 -0
- package/lib/style.css +1 -1
- package/package.json +15 -15
- package/lib/cjs/hooks-WfHlJH12.js +0 -1
- package/lib/cjs/index-eShKGO10.js +0 -5
- package/lib/classic/cjs/hooks-WfHlJH12.js +0 -1
- package/lib/classic/cjs/index-eShKGO10.js +0 -5
- package/lib/classic/es/hooks-WfHlJH12.js +0 -98
- package/lib/classic/es/index-eShKGO10.js +0 -3757
- package/lib/dist/cjs/index-eShKGO10.js +0 -5
- package/lib/dist/es/index-eShKGO10.js +0 -3757
- package/lib/dist/style.css +0 -1
- package/lib/es/hooks-WfHlJH12.js +0 -98
- package/lib/es/index-eShKGO10.js +0 -3757
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as K, jsx as
|
|
2
|
-
import { h as
|
|
3
|
-
import { s as
|
|
4
|
-
import {
|
|
5
|
-
import { useRef as
|
|
6
|
-
import "./
|
|
7
|
-
function
|
|
1
|
+
import { jsxs as K, jsx as E } from "react/jsx-runtime";
|
|
2
|
+
import { h as fs } from "./index8.js";
|
|
3
|
+
import { s as k, u as js, c as Vs } from "./sl-types.js";
|
|
4
|
+
import { q as ds, Y as ms, _ as ps } from "./hooks-n9ax4LRT.js";
|
|
5
|
+
import { useRef as Ds, useEffect as Ks } from "react";
|
|
6
|
+
import "./index5.js";
|
|
7
|
+
function _(h) {
|
|
8
8
|
var t = h.width, i = h.height;
|
|
9
9
|
if (t < 0)
|
|
10
10
|
throw new Error("Negative width is not allowed for Size");
|
|
@@ -18,9 +18,9 @@ function S(h) {
|
|
|
18
18
|
function A(h, t) {
|
|
19
19
|
return h.width === t.width && h.height === t.height;
|
|
20
20
|
}
|
|
21
|
-
var
|
|
21
|
+
var Os = (
|
|
22
22
|
/** @class */
|
|
23
|
-
function() {
|
|
23
|
+
(function() {
|
|
24
24
|
function h(t) {
|
|
25
25
|
var i = this;
|
|
26
26
|
this._resolutionListener = function() {
|
|
@@ -59,22 +59,22 @@ var Ks = (
|
|
|
59
59
|
return i.next(t._window.devicePixelRatio);
|
|
60
60
|
}), this._reinstallResolutionListener();
|
|
61
61
|
}, h;
|
|
62
|
-
}()
|
|
62
|
+
})()
|
|
63
63
|
);
|
|
64
|
-
function
|
|
65
|
-
return new
|
|
64
|
+
function As(h) {
|
|
65
|
+
return new Os(h);
|
|
66
66
|
}
|
|
67
|
-
var
|
|
67
|
+
var Ys = (
|
|
68
68
|
/** @class */
|
|
69
|
-
function() {
|
|
69
|
+
(function() {
|
|
70
70
|
function h(t, i, s) {
|
|
71
71
|
var e;
|
|
72
|
-
this._canvasElement = null, this._bitmapSizeChangedListeners = [], this._suggestedBitmapSize = null, this._suggestedBitmapSizeChangedListeners = [], this._devicePixelRatioObservable = null, this._canvasElementResizeObserver = null, this._canvasElement = t, this._canvasElementClientSize =
|
|
72
|
+
this._canvasElement = null, this._bitmapSizeChangedListeners = [], this._suggestedBitmapSize = null, this._suggestedBitmapSizeChangedListeners = [], this._devicePixelRatioObservable = null, this._canvasElementResizeObserver = null, this._canvasElement = t, this._canvasElementClientSize = _({
|
|
73
73
|
width: this._canvasElement.clientWidth,
|
|
74
74
|
height: this._canvasElement.clientHeight
|
|
75
|
-
}), this._transformBitmapSize = i ?? function(n) {
|
|
75
|
+
}), this._transformBitmapSize = i ?? (function(n) {
|
|
76
76
|
return n;
|
|
77
|
-
}, this._allowResizeObserver = (e = s
|
|
77
|
+
}), this._allowResizeObserver = (e = s?.allowResizeObserver) !== null && e !== void 0 ? e : !0, this._chooseAndInitObserver();
|
|
78
78
|
}
|
|
79
79
|
return h.prototype.dispose = function() {
|
|
80
80
|
var t, i;
|
|
@@ -97,7 +97,7 @@ var As = (
|
|
|
97
97
|
configurable: !0
|
|
98
98
|
}), Object.defineProperty(h.prototype, "bitmapSize", {
|
|
99
99
|
get: function() {
|
|
100
|
-
return
|
|
100
|
+
return _({
|
|
101
101
|
width: this.canvasElement.width,
|
|
102
102
|
height: this.canvasElement.height
|
|
103
103
|
});
|
|
@@ -105,7 +105,7 @@ var As = (
|
|
|
105
105
|
enumerable: !1,
|
|
106
106
|
configurable: !0
|
|
107
107
|
}), h.prototype.resizeCanvasElement = function(t) {
|
|
108
|
-
this._canvasElementClientSize =
|
|
108
|
+
this._canvasElementClientSize = _(t), this.canvasElement.style.width = "".concat(this._canvasElementClientSize.width, "px"), this.canvasElement.style.height = "".concat(this._canvasElementClientSize.height, "px"), this._invalidateBitmapSize();
|
|
109
109
|
}, h.prototype.subscribeBitmapSizeChanged = function(t) {
|
|
110
110
|
this._bitmapSizeChangedListeners.push(t);
|
|
111
111
|
}, h.prototype.unsubscribeBitmapSizeChanged = function(t) {
|
|
@@ -138,7 +138,7 @@ var As = (
|
|
|
138
138
|
return e.call(s, t, i);
|
|
139
139
|
});
|
|
140
140
|
}, h.prototype._suggestNewBitmapSize = function(t) {
|
|
141
|
-
var i = this._suggestedBitmapSize, s =
|
|
141
|
+
var i = this._suggestedBitmapSize, s = _(this._transformBitmapSize(t, this._canvasElementClientSize)), e = A(this.bitmapSize, s) ? null : s;
|
|
142
142
|
i === null && e === null || i !== null && e !== null && A(i, e) || (this._suggestedBitmapSize = e, this._emitSuggestedBitmapSizeChanged(i, e));
|
|
143
143
|
}, h.prototype._emitSuggestedBitmapSizeChanged = function(t, i) {
|
|
144
144
|
var s = this;
|
|
@@ -151,27 +151,27 @@ var As = (
|
|
|
151
151
|
this._initDevicePixelRatioObservable();
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
-
|
|
154
|
+
$s().then(function(i) {
|
|
155
155
|
return i ? t._initResizeObserver() : t._initDevicePixelRatioObservable();
|
|
156
156
|
});
|
|
157
157
|
}, h.prototype._initDevicePixelRatioObservable = function() {
|
|
158
158
|
var t = this;
|
|
159
159
|
if (this._canvasElement !== null) {
|
|
160
|
-
var i =
|
|
160
|
+
var i = vi(this._canvasElement);
|
|
161
161
|
if (i === null)
|
|
162
162
|
throw new Error("No window is associated with the canvas");
|
|
163
|
-
this._devicePixelRatioObservable =
|
|
163
|
+
this._devicePixelRatioObservable = As(i), this._devicePixelRatioObservable.subscribe(function() {
|
|
164
164
|
return t._invalidateBitmapSize();
|
|
165
165
|
}), this._invalidateBitmapSize();
|
|
166
166
|
}
|
|
167
167
|
}, h.prototype._invalidateBitmapSize = function() {
|
|
168
168
|
var t, i;
|
|
169
169
|
if (this._canvasElement !== null) {
|
|
170
|
-
var s =
|
|
170
|
+
var s = vi(this._canvasElement);
|
|
171
171
|
if (s !== null) {
|
|
172
172
|
var e = (i = (t = this._devicePixelRatioObservable) === null || t === void 0 ? void 0 : t.value) !== null && i !== void 0 ? i : s.devicePixelRatio, n = this._canvasElement.getClientRects(), r = (
|
|
173
173
|
// eslint-disable-next-line no-negated-condition
|
|
174
|
-
n[0] !== void 0 ?
|
|
174
|
+
n[0] !== void 0 ? Us(n[0], e) : _({
|
|
175
175
|
width: this._canvasElementClientSize.width * e,
|
|
176
176
|
height: this._canvasElementClientSize.height * e
|
|
177
177
|
})
|
|
@@ -186,7 +186,7 @@ var As = (
|
|
|
186
186
|
return r.target === t._canvasElement;
|
|
187
187
|
});
|
|
188
188
|
if (!(!s || !s.devicePixelContentBoxSize || !s.devicePixelContentBoxSize[0])) {
|
|
189
|
-
var e = s.devicePixelContentBoxSize[0], n =
|
|
189
|
+
var e = s.devicePixelContentBoxSize[0], n = _({
|
|
190
190
|
width: e.inlineSize,
|
|
191
191
|
height: e.blockSize
|
|
192
192
|
});
|
|
@@ -194,17 +194,15 @@ var As = (
|
|
|
194
194
|
}
|
|
195
195
|
}), this._canvasElementResizeObserver.observe(this._canvasElement, { box: "device-pixel-content-box" }));
|
|
196
196
|
}, h;
|
|
197
|
-
}()
|
|
197
|
+
})()
|
|
198
198
|
);
|
|
199
199
|
function Js(h, t) {
|
|
200
|
-
|
|
201
|
-
return new As(h, t.transform, t.options);
|
|
202
|
-
throw new Error("Unsupported binding target");
|
|
200
|
+
return new Ys(h, t.transform, t.options);
|
|
203
201
|
}
|
|
204
|
-
function
|
|
202
|
+
function vi(h) {
|
|
205
203
|
return h.ownerDocument.defaultView;
|
|
206
204
|
}
|
|
207
|
-
function
|
|
205
|
+
function $s() {
|
|
208
206
|
return new Promise(function(h) {
|
|
209
207
|
var t = new ResizeObserver(function(i) {
|
|
210
208
|
h(i.every(function(s) {
|
|
@@ -216,15 +214,15 @@ function Ys() {
|
|
|
216
214
|
return !1;
|
|
217
215
|
});
|
|
218
216
|
}
|
|
219
|
-
function
|
|
220
|
-
return
|
|
217
|
+
function Us(h, t) {
|
|
218
|
+
return _({
|
|
221
219
|
width: Math.round(h.left * t + h.width * t) - Math.round(h.left * t),
|
|
222
220
|
height: Math.round(h.top * t + h.height * t) - Math.round(h.top * t)
|
|
223
221
|
});
|
|
224
222
|
}
|
|
225
|
-
var
|
|
223
|
+
var Xs = (
|
|
226
224
|
/** @class */
|
|
227
|
-
function() {
|
|
225
|
+
(function() {
|
|
228
226
|
function h(t, i, s) {
|
|
229
227
|
if (i.width === 0 || i.height === 0)
|
|
230
228
|
throw new TypeError("Rendering target could only be created on a media with positive width and height");
|
|
@@ -266,9 +264,9 @@ var Us = (
|
|
|
266
264
|
enumerable: !1,
|
|
267
265
|
configurable: !0
|
|
268
266
|
}), h;
|
|
269
|
-
}()
|
|
267
|
+
})()
|
|
270
268
|
);
|
|
271
|
-
function
|
|
269
|
+
function Y(h, t) {
|
|
272
270
|
var i = h.canvasElementClientSize;
|
|
273
271
|
if (i.width === 0 || i.height === 0)
|
|
274
272
|
return null;
|
|
@@ -276,17 +274,11 @@ function J(h, t) {
|
|
|
276
274
|
if (s.width === 0 || s.height === 0)
|
|
277
275
|
return null;
|
|
278
276
|
var e = h.canvasElement.getContext("2d", t);
|
|
279
|
-
return e === null ? null : new
|
|
280
|
-
}
|
|
281
|
-
/*!
|
|
282
|
-
* @license
|
|
283
|
-
* TradingView Lightweight Charts™ v5.1.0
|
|
284
|
-
* Copyright (c) 2025 TradingView, Inc.
|
|
285
|
-
* Licensed under Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0
|
|
286
|
-
*/
|
|
277
|
+
return e === null ? null : new Xs(e, i, s);
|
|
278
|
+
}
|
|
287
279
|
const gs = { title: "", visible: !0, lastValueVisible: !0, priceLineVisible: !0, priceLineSource: 0, priceLineWidth: 1, priceLineColor: "", priceLineStyle: 2, baseLineVisible: !0, baseLineWidth: 1, baseLineColor: "#B2B5BE", baseLineStyle: 0, priceFormat: { type: "price", precision: 2, minMove: 0.01 } };
|
|
288
|
-
var
|
|
289
|
-
function
|
|
280
|
+
var wi, ii;
|
|
281
|
+
function J(h, t) {
|
|
290
282
|
const i = { 0: [], 1: [h.lineWidth, h.lineWidth], 2: [2 * h.lineWidth, 2 * h.lineWidth], 3: [6 * h.lineWidth, 6 * h.lineWidth], 4: [h.lineWidth, 4 * h.lineWidth] }[t];
|
|
291
283
|
h.setLineDash(i);
|
|
292
284
|
}
|
|
@@ -295,10 +287,10 @@ function vs(h, t, i, s) {
|
|
|
295
287
|
const e = h.lineWidth % 2 ? 0.5 : 0;
|
|
296
288
|
h.moveTo(i, t + e), h.lineTo(s, t + e), h.stroke();
|
|
297
289
|
}
|
|
298
|
-
function
|
|
290
|
+
function C(h, t) {
|
|
299
291
|
if (!h) throw new Error("Assertion failed" + (t ? ": " + t : ""));
|
|
300
292
|
}
|
|
301
|
-
function
|
|
293
|
+
function T(h) {
|
|
302
294
|
if (h === void 0) throw new Error("Value is undefined");
|
|
303
295
|
return h;
|
|
304
296
|
}
|
|
@@ -307,14 +299,14 @@ function p(h) {
|
|
|
307
299
|
return h;
|
|
308
300
|
}
|
|
309
301
|
function D(h) {
|
|
310
|
-
return p(
|
|
302
|
+
return p(T(h));
|
|
311
303
|
}
|
|
312
304
|
(function(h) {
|
|
313
305
|
h[h.Simple = 0] = "Simple", h[h.WithSteps = 1] = "WithSteps", h[h.Curved = 2] = "Curved";
|
|
314
|
-
})(
|
|
306
|
+
})(wi || (wi = {})), (function(h) {
|
|
315
307
|
h[h.Solid = 0] = "Solid", h[h.Dotted = 1] = "Dotted", h[h.Dashed = 2] = "Dashed", h[h.LargeDashed = 3] = "LargeDashed", h[h.SparseDotted = 4] = "SparseDotted";
|
|
316
|
-
}(ii || (ii = {}));
|
|
317
|
-
let
|
|
308
|
+
})(ii || (ii = {}));
|
|
309
|
+
let S = class {
|
|
318
310
|
constructor() {
|
|
319
311
|
this.t = [];
|
|
320
312
|
}
|
|
@@ -323,15 +315,15 @@ let P = class {
|
|
|
323
315
|
this.t.push(e);
|
|
324
316
|
}
|
|
325
317
|
_(t) {
|
|
326
|
-
const i = this.t.findIndex((s) => t === s.h);
|
|
318
|
+
const i = this.t.findIndex(((s) => t === s.h));
|
|
327
319
|
i > -1 && this.t.splice(i, 1);
|
|
328
320
|
}
|
|
329
321
|
u(t) {
|
|
330
|
-
this.t = this.t.filter((i) => i.l !== t);
|
|
322
|
+
this.t = this.t.filter(((i) => i.l !== t));
|
|
331
323
|
}
|
|
332
324
|
p(t, i, s) {
|
|
333
325
|
const e = [...this.t];
|
|
334
|
-
this.t = this.t.filter((n) => !n.o), e.forEach((n) => n.h(t, i, s));
|
|
326
|
+
this.t = this.t.filter(((n) => !n.o)), e.forEach(((n) => n.h(t, i, s)));
|
|
335
327
|
}
|
|
336
328
|
v() {
|
|
337
329
|
return this.t.length > 0;
|
|
@@ -340,8 +332,8 @@ let P = class {
|
|
|
340
332
|
this.t = [];
|
|
341
333
|
}
|
|
342
334
|
};
|
|
343
|
-
function
|
|
344
|
-
for (const i of t) for (const s in i) i[s] !== void 0 && Object.prototype.hasOwnProperty.call(i, s) && !["__proto__", "constructor", "prototype"].includes(s) && (typeof i[s] != "object" || h[s] === void 0 || Array.isArray(i[s]) ? h[s] = i[s] :
|
|
335
|
+
function R(h, ...t) {
|
|
336
|
+
for (const i of t) for (const s in i) i[s] !== void 0 && Object.prototype.hasOwnProperty.call(i, s) && !["__proto__", "constructor", "prototype"].includes(s) && (typeof i[s] != "object" || h[s] === void 0 || Array.isArray(i[s]) ? h[s] = i[s] : R(h[s], i[s]));
|
|
345
337
|
return h;
|
|
346
338
|
}
|
|
347
339
|
function Z(h) {
|
|
@@ -353,17 +345,17 @@ function ut(h) {
|
|
|
353
345
|
function ct(h) {
|
|
354
346
|
return typeof h == "string";
|
|
355
347
|
}
|
|
356
|
-
function
|
|
348
|
+
function dt(h) {
|
|
357
349
|
return typeof h == "boolean";
|
|
358
350
|
}
|
|
359
|
-
function
|
|
351
|
+
function W(h) {
|
|
360
352
|
const t = h;
|
|
361
353
|
if (!t || typeof t != "object") return t;
|
|
362
354
|
let i, s, e;
|
|
363
|
-
for (s in i = Array.isArray(t) ? [] : {}, t) t.hasOwnProperty(s) && (e = t[s], i[s] = e && typeof e == "object" ?
|
|
355
|
+
for (s in i = Array.isArray(t) ? [] : {}, t) t.hasOwnProperty(s) && (e = t[s], i[s] = e && typeof e == "object" ? W(e) : e);
|
|
364
356
|
return i;
|
|
365
357
|
}
|
|
366
|
-
function
|
|
358
|
+
function bi(h) {
|
|
367
359
|
return h !== null;
|
|
368
360
|
}
|
|
369
361
|
function si(h) {
|
|
@@ -373,7 +365,7 @@ const ws = "-apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, s
|
|
|
373
365
|
function St(h, t, i) {
|
|
374
366
|
return t === void 0 && (t = ws), `${i = i !== void 0 ? `${i} ` : ""}${h}px ${t}`;
|
|
375
367
|
}
|
|
376
|
-
class
|
|
368
|
+
class Gs {
|
|
377
369
|
constructor(t) {
|
|
378
370
|
this.M = { S: 1, C: 5, k: NaN, P: "", T: "", R: "", D: "", I: 0, V: 0, B: 0, A: 0, L: 0 }, this.O = t;
|
|
379
371
|
}
|
|
@@ -394,13 +386,13 @@ class Xs {
|
|
|
394
386
|
return this.O.N().layout.fontFamily;
|
|
395
387
|
}
|
|
396
388
|
}
|
|
397
|
-
function
|
|
389
|
+
function jt(h) {
|
|
398
390
|
return h < 0 ? 0 : h > 255 ? 255 : Math.round(h) || 0;
|
|
399
391
|
}
|
|
400
|
-
function
|
|
392
|
+
function Mi(h) {
|
|
401
393
|
return 0.199 * h[0] + 0.687 * h[1] + 0.114 * h[2];
|
|
402
394
|
}
|
|
403
|
-
let
|
|
395
|
+
let Hs = class {
|
|
404
396
|
constructor(t, i) {
|
|
405
397
|
this.q = /* @__PURE__ */ new Map(), this.j = t, i && (this.q = i);
|
|
406
398
|
}
|
|
@@ -411,25 +403,25 @@ let Gs = class {
|
|
|
411
403
|
}
|
|
412
404
|
Z(t) {
|
|
413
405
|
const i = this.K(t);
|
|
414
|
-
return { G: `rgb(${i[0]}, ${i[1]}, ${i[2]})`, X:
|
|
406
|
+
return { G: `rgb(${i[0]}, ${i[1]}, ${i[2]})`, X: Mi(i) > 160 ? "black" : "white" };
|
|
415
407
|
}
|
|
416
408
|
J(t) {
|
|
417
|
-
return
|
|
409
|
+
return Mi(this.K(t));
|
|
418
410
|
}
|
|
419
411
|
tt(t, i, s) {
|
|
420
|
-
const [e, n, r, o] = this.K(t), [l, a, u, c] = this.K(i),
|
|
421
|
-
var
|
|
422
|
-
return `rgba(${
|
|
412
|
+
const [e, n, r, o] = this.K(t), [l, a, u, c] = this.K(i), f = [jt(e + s * (l - e)), jt(n + s * (a - n)), jt(r + s * (u - r)), (d = o + s * (c - o), d <= 0 || d > 1 ? Math.min(Math.max(d, 0), 1) : Math.round(1e4 * d) / 1e4)];
|
|
413
|
+
var d;
|
|
414
|
+
return `rgba(${f[0]}, ${f[1]}, ${f[2]}, ${f[3]})`;
|
|
423
415
|
}
|
|
424
416
|
K(t) {
|
|
425
417
|
const i = this.q.get(t);
|
|
426
418
|
if (i) return i;
|
|
427
|
-
const s = function(r) {
|
|
419
|
+
const s = (function(r) {
|
|
428
420
|
const o = document.createElement("div");
|
|
429
421
|
o.style.display = "none", document.body.appendChild(o), o.style.color = r;
|
|
430
422
|
const l = window.getComputedStyle(o).color;
|
|
431
423
|
return document.body.removeChild(o), l;
|
|
432
|
-
}(t), e = s.match(/^rgba?\s*\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)$/);
|
|
424
|
+
})(t), e = s.match(/^rgba?\s*\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)$/);
|
|
433
425
|
if (!e) {
|
|
434
426
|
if (this.j.length) for (const r of this.j) {
|
|
435
427
|
const o = r(t);
|
|
@@ -441,7 +433,7 @@ let Gs = class {
|
|
|
441
433
|
return this.q.set(t, n), n;
|
|
442
434
|
}
|
|
443
435
|
};
|
|
444
|
-
class
|
|
436
|
+
class Qs {
|
|
445
437
|
constructor() {
|
|
446
438
|
this.it = [];
|
|
447
439
|
}
|
|
@@ -449,17 +441,17 @@ class Hs {
|
|
|
449
441
|
this.it = t;
|
|
450
442
|
}
|
|
451
443
|
nt(t, i, s) {
|
|
452
|
-
this.it.forEach((e) => {
|
|
444
|
+
this.it.forEach(((e) => {
|
|
453
445
|
e.nt(t, i, s);
|
|
454
|
-
});
|
|
446
|
+
}));
|
|
455
447
|
}
|
|
456
448
|
}
|
|
457
449
|
class st {
|
|
458
450
|
nt(t, i, s) {
|
|
459
|
-
t.useBitmapCoordinateSpace((e) => this.et(e, i, s));
|
|
451
|
+
t.useBitmapCoordinateSpace(((e) => this.et(e, i, s)));
|
|
460
452
|
}
|
|
461
453
|
}
|
|
462
|
-
|
|
454
|
+
class qs extends st {
|
|
463
455
|
constructor() {
|
|
464
456
|
super(...arguments), this.rt = null;
|
|
465
457
|
}
|
|
@@ -471,21 +463,21 @@ let Qs = class extends st {
|
|
|
471
463
|
const e = this.rt.lt, n = this.rt, r = Math.max(1, Math.floor(i)) % 2 / 2, o = (l) => {
|
|
472
464
|
t.beginPath();
|
|
473
465
|
for (let a = e.to - 1; a >= e.from; --a) {
|
|
474
|
-
const u = n.ot[a], c = Math.round(u._t * i) + r,
|
|
475
|
-
t.moveTo(c,
|
|
466
|
+
const u = n.ot[a], c = Math.round(u._t * i) + r, f = u.ut * s, d = l * s + r;
|
|
467
|
+
t.moveTo(c, f), t.arc(c, f, d, 0, 2 * Math.PI);
|
|
476
468
|
}
|
|
477
469
|
t.fill();
|
|
478
470
|
};
|
|
479
471
|
n.ct > 0 && (t.fillStyle = n.dt, o(n.ft + n.ct)), t.fillStyle = n.vt, o(n.ft);
|
|
480
472
|
}
|
|
481
|
-
}
|
|
482
|
-
function
|
|
473
|
+
}
|
|
474
|
+
function Zs() {
|
|
483
475
|
return { ot: [{ _t: 0, ut: 0, wt: 0, gt: 0 }], vt: "", dt: "", ft: 0, ct: 0, lt: null };
|
|
484
476
|
}
|
|
485
|
-
const
|
|
486
|
-
class
|
|
477
|
+
const te = { from: 0, to: 1 };
|
|
478
|
+
class ie {
|
|
487
479
|
constructor(t, i, s) {
|
|
488
|
-
this.Mt = new
|
|
480
|
+
this.Mt = new Qs(), this.bt = [], this.St = [], this.xt = !0, this.O = t, this.Ct = i, this.yt = s, this.Mt.st(this.bt);
|
|
489
481
|
}
|
|
490
482
|
kt(t) {
|
|
491
483
|
this.Pt(), this.xt = !0;
|
|
@@ -495,20 +487,20 @@ class te {
|
|
|
495
487
|
}
|
|
496
488
|
Pt() {
|
|
497
489
|
const t = this.yt.Dt();
|
|
498
|
-
t.length !== this.bt.length && (this.St = t.map(
|
|
499
|
-
const s = new
|
|
490
|
+
t.length !== this.bt.length && (this.St = t.map(Zs), this.bt = this.St.map(((i) => {
|
|
491
|
+
const s = new qs();
|
|
500
492
|
return s.ht(i), s;
|
|
501
|
-
}), this.Mt.st(this.bt));
|
|
493
|
+
})), this.Mt.st(this.bt));
|
|
502
494
|
}
|
|
503
495
|
Rt() {
|
|
504
496
|
const t = this.Ct.N().mode === 2 || !this.Ct.It(), i = this.yt.Vt(), s = this.Ct.Bt(), e = this.O.Et();
|
|
505
|
-
this.Pt(), i.forEach((n, r) => {
|
|
497
|
+
this.Pt(), i.forEach(((n, r) => {
|
|
506
498
|
const o = this.St[r], l = n.At(s), a = n.Lt();
|
|
507
|
-
!t && l !== null && n.It() && a !== null ? (o.vt = l.zt, o.ft = l.ft, o.ct = l.Ot, o.ot[0].gt = l.gt, o.ot[0].ut = n.Ft().Nt(l.gt, a.Wt), o.dt = l.Ht ?? this.O.Ut(o.ot[0].ut / n.Ft().$t()), o.ot[0].wt = s, o.ot[0]._t = e.qt(s), o.lt =
|
|
508
|
-
});
|
|
499
|
+
!t && l !== null && n.It() && a !== null ? (o.vt = l.zt, o.ft = l.ft, o.ct = l.Ot, o.ot[0].gt = l.gt, o.ot[0].ut = n.Ft().Nt(l.gt, a.Wt), o.dt = l.Ht ?? this.O.Ut(o.ot[0].ut / n.Ft().$t()), o.ot[0].wt = s, o.ot[0]._t = e.qt(s), o.lt = te) : o.lt = null;
|
|
500
|
+
}));
|
|
509
501
|
}
|
|
510
502
|
}
|
|
511
|
-
class
|
|
503
|
+
class se extends st {
|
|
512
504
|
constructor(t) {
|
|
513
505
|
super(), this.jt = t;
|
|
514
506
|
}
|
|
@@ -517,16 +509,16 @@ class ie extends st {
|
|
|
517
509
|
const n = this.jt.Yt.It, r = this.jt.Kt.It;
|
|
518
510
|
if (!n && !r) return;
|
|
519
511
|
const o = Math.round(this.jt._t * s), l = Math.round(this.jt.ut * e);
|
|
520
|
-
t.lineCap = "butt", n && o >= 0 && (t.lineWidth = Math.floor(this.jt.Yt.ct * s), t.strokeStyle = this.jt.Yt.R, t.fillStyle = this.jt.Yt.R,
|
|
512
|
+
t.lineCap = "butt", n && o >= 0 && (t.lineWidth = Math.floor(this.jt.Yt.ct * s), t.strokeStyle = this.jt.Yt.R, t.fillStyle = this.jt.Yt.R, J(t, this.jt.Yt.Zt), (function(a, u, c, f) {
|
|
521
513
|
a.beginPath();
|
|
522
|
-
const
|
|
523
|
-
a.moveTo(u +
|
|
524
|
-
}(t, o, 0, i.height)), r && l >= 0 && (t.lineWidth = Math.floor(this.jt.Kt.ct * e), t.strokeStyle = this.jt.Kt.R, t.fillStyle = this.jt.Kt.R,
|
|
514
|
+
const d = a.lineWidth % 2 ? 0.5 : 0;
|
|
515
|
+
a.moveTo(u + d, c), a.lineTo(u + d, f), a.stroke();
|
|
516
|
+
})(t, o, 0, i.height)), r && l >= 0 && (t.lineWidth = Math.floor(this.jt.Kt.ct * e), t.strokeStyle = this.jt.Kt.R, t.fillStyle = this.jt.Kt.R, J(t, this.jt.Kt.Zt), vs(t, l, 0, i.width));
|
|
525
517
|
}
|
|
526
518
|
}
|
|
527
|
-
let
|
|
519
|
+
let ee = class {
|
|
528
520
|
constructor(t, i) {
|
|
529
|
-
this.xt = !0, this.Gt = { Yt: { ct: 1, Zt: 0, R: "", It: !1 }, Kt: { ct: 1, Zt: 0, R: "", It: !1 }, _t: 0, ut: 0 }, this.Xt = new
|
|
521
|
+
this.xt = !0, this.Gt = { Yt: { ct: 1, Zt: 0, R: "", It: !1 }, Kt: { ct: 1, Zt: 0, R: "", It: !1 }, _t: 0, ut: 0 }, this.Xt = new se(this.Gt), this.Jt = t, this.yt = i;
|
|
530
522
|
}
|
|
531
523
|
kt() {
|
|
532
524
|
this.xt = !0;
|
|
@@ -543,21 +535,21 @@ let se = class {
|
|
|
543
535
|
function Nt(h, t, i, s, e, n) {
|
|
544
536
|
h.save(), h.globalCompositeOperation = "copy", h.fillStyle = n, h.fillRect(t, i, s, e), h.restore();
|
|
545
537
|
}
|
|
546
|
-
function
|
|
538
|
+
function yi(h, t, i, s, e, n) {
|
|
547
539
|
h.beginPath(), h.roundRect ? h.roundRect(t, i, s, e, n) : (h.lineTo(t + s - n[1], i), n[1] !== 0 && h.arcTo(t + s, i, t + s, i + n[1], n[1]), h.lineTo(t + s, i + e - n[2]), n[2] !== 0 && h.arcTo(t + s, i + e, t + s - n[2], i + e, n[2]), h.lineTo(t + n[3], i + e), n[3] !== 0 && h.arcTo(t, i + e, t, i + e - n[3], n[3]), h.lineTo(t, i + n[0]), n[0] !== 0 && h.arcTo(t, i, t + n[0], i, n[0]));
|
|
548
540
|
}
|
|
549
|
-
function
|
|
550
|
-
if (h.save(), !r || !l || l === n) return
|
|
541
|
+
function _i(h, t, i, s, e, n, r = 0, o = [0, 0, 0, 0], l = "") {
|
|
542
|
+
if (h.save(), !r || !l || l === n) return yi(h, t, i, s, e, o), h.fillStyle = n, h.fill(), void h.restore();
|
|
551
543
|
const a = r / 2;
|
|
552
544
|
var u;
|
|
553
|
-
|
|
545
|
+
yi(h, t + a, i + a, s - r, e - r, (u = -a, o.map(((c) => c === 0 ? c : c + u)))), n !== "transparent" && (h.fillStyle = n, h.fill()), l !== "transparent" && (h.lineWidth = r, h.strokeStyle = l, h.closePath(), h.stroke()), h.restore();
|
|
554
546
|
}
|
|
555
547
|
function bs(h, t, i, s, e, n, r) {
|
|
556
548
|
h.save(), h.globalCompositeOperation = "copy";
|
|
557
549
|
const o = h.createLinearGradient(0, 0, 0, e);
|
|
558
550
|
o.addColorStop(0, n), o.addColorStop(1, r), h.fillStyle = o, h.fillRect(t, i, s, e), h.restore();
|
|
559
551
|
}
|
|
560
|
-
class
|
|
552
|
+
let Si = class {
|
|
561
553
|
constructor(t, i) {
|
|
562
554
|
this.ht(t, i);
|
|
563
555
|
}
|
|
@@ -569,29 +561,29 @@ class _i {
|
|
|
569
561
|
}
|
|
570
562
|
nt(t, i, s, e) {
|
|
571
563
|
if (!this.jt.It || this.jt.ri.length === 0) return;
|
|
572
|
-
const n = this.jt.R, r = this.ei.G, o = t.useBitmapCoordinateSpace((l) => {
|
|
564
|
+
const n = this.jt.R, r = this.ei.G, o = t.useBitmapCoordinateSpace(((l) => {
|
|
573
565
|
const a = l.context;
|
|
574
566
|
a.font = i.P;
|
|
575
567
|
const u = this.hi(l, i, s, e), c = u.ai;
|
|
576
|
-
return u.li ?
|
|
577
|
-
});
|
|
578
|
-
t.useMediaCoordinateSpace(({ context: l }) => {
|
|
568
|
+
return u.li ? _i(a, c.oi, c._i, c.ui, c.ci, r, c.di, [c.ft, 0, 0, c.ft], r) : _i(a, c.fi, c._i, c.ui, c.ci, r, c.di, [0, c.ft, c.ft, 0], r), this.jt.pi && (a.fillStyle = n, a.fillRect(c.fi, c.mi, c.wi - c.fi, c.gi)), this.jt.Mi && (a.fillStyle = i.D, a.fillRect(u.li ? c.bi - c.di : 0, c._i, c.di, c.Si - c._i)), u;
|
|
569
|
+
}));
|
|
570
|
+
t.useMediaCoordinateSpace((({ context: l }) => {
|
|
579
571
|
const a = o.xi;
|
|
580
572
|
l.font = i.P, l.textAlign = o.li ? "right" : "left", l.textBaseline = "middle", l.fillStyle = n, l.fillText(this.jt.ri, a.Ci, (a._i + a.Si) / 2 + a.yi);
|
|
581
|
-
});
|
|
573
|
+
}));
|
|
582
574
|
}
|
|
583
575
|
hi(t, i, s, e) {
|
|
584
|
-
const { context: n, bitmapSize: r, mediaSize: o, horizontalPixelRatio: l, verticalPixelRatio: a } = t, u = this.jt.pi || !this.jt.ki ? i.C : 0, c = this.jt.Pi ? i.S : 0,
|
|
585
|
-
let
|
|
586
|
-
|
|
587
|
-
const
|
|
576
|
+
const { context: n, bitmapSize: r, mediaSize: o, horizontalPixelRatio: l, verticalPixelRatio: a } = t, u = this.jt.pi || !this.jt.ki ? i.C : 0, c = this.jt.Pi ? i.S : 0, f = i.A + this.ei.Ti, d = i.I + this.ei.Ri, m = i.V, w = i.B, v = this.jt.ri, g = i.k, b = s.Di(n, v), M = Math.ceil(s.Ii(n, v)), y = g + f + d, x = i.S + m + w + M + u, L = Math.max(1, Math.floor(a));
|
|
577
|
+
let P = Math.round(y * a);
|
|
578
|
+
P % 2 != L % 2 && (P += 1);
|
|
579
|
+
const F = c > 0 ? Math.max(1, Math.floor(c * l)) : 0, j = Math.round(x * l), et = Math.round(u * l), Bs = this.ei.Vi ?? this.ei.Bi ?? this.ei.Ei, mi = Math.round(Bs * a) - Math.floor(0.5 * a), It = Math.floor(mi + L / 2 - P / 2), pi = It + P, ft = e === "right", gi = ft ? o.width - c : c, ht = ft ? r.width - F : F;
|
|
588
580
|
let Ft, Wt, Bt;
|
|
589
|
-
return
|
|
581
|
+
return ft ? (Ft = ht - j, Wt = ht - et, Bt = gi - u - m - c) : (Ft = ht + j, Wt = ht + et, Bt = gi + u + m), { li: ft, ai: { _i: It, mi, Si: pi, ui: j, ci: P, ft: 2 * l, di: F, oi: Ft, fi: ht, wi: Wt, gi: L, bi: r.width }, xi: { _i: It / a, Si: pi / a, Ci: Bt, yi: b } };
|
|
590
582
|
}
|
|
591
|
-
}
|
|
583
|
+
};
|
|
592
584
|
class kt {
|
|
593
585
|
constructor(t) {
|
|
594
|
-
this.Ai = { Ei: 0, G: "#000", Ri: 0, Ti: 0 }, this.Li = { ri: "", It: !1, pi: !0, ki: !1, Ht: "", R: "#FFF", Mi: !1, Pi: !1 }, this.zi = { ri: "", It: !1, pi: !1, ki: !0, Ht: "", R: "#FFF", Mi: !0, Pi: !0 }, this.xt = !0, this.Oi = new (t ||
|
|
586
|
+
this.Ai = { Ei: 0, G: "#000", Ri: 0, Ti: 0 }, this.Li = { ri: "", It: !1, pi: !0, ki: !1, Ht: "", R: "#FFF", Mi: !1, Pi: !1 }, this.zi = { ri: "", It: !1, pi: !1, ki: !0, Ht: "", R: "#FFF", Mi: !0, Pi: !0 }, this.xt = !0, this.Oi = new (t || Si)(this.Li, this.Ai), this.Ni = new (t || Si)(this.zi, this.Ai);
|
|
595
587
|
}
|
|
596
588
|
ri() {
|
|
597
589
|
return this.Fi(), this.Li.ri;
|
|
@@ -630,7 +622,7 @@ class kt {
|
|
|
630
622
|
this.xt && (this.Li.pi = !0, this.zi.pi = !1, this.Yi(this.Li, this.zi, this.Ai));
|
|
631
623
|
}
|
|
632
624
|
}
|
|
633
|
-
class
|
|
625
|
+
class he extends kt {
|
|
634
626
|
constructor(t, i, s) {
|
|
635
627
|
super(), this.Jt = t, this.Ki = i, this.Zi = s;
|
|
636
628
|
}
|
|
@@ -648,7 +640,7 @@ class ee extends kt {
|
|
|
648
640
|
s.Ei = l.Ei, t.ri = this.Ki.Ji(l.gt, n), t.It = !0;
|
|
649
641
|
}
|
|
650
642
|
}
|
|
651
|
-
const
|
|
643
|
+
const ne = /[1-9]/g;
|
|
652
644
|
class Ms {
|
|
653
645
|
constructor() {
|
|
654
646
|
this.jt = null;
|
|
@@ -658,31 +650,31 @@ class Ms {
|
|
|
658
650
|
}
|
|
659
651
|
nt(t, i) {
|
|
660
652
|
if (this.jt === null || this.jt.It === !1 || this.jt.ri.length === 0) return;
|
|
661
|
-
const s = t.useMediaCoordinateSpace(({ context:
|
|
653
|
+
const s = t.useMediaCoordinateSpace((({ context: f }) => (f.font = i.P, Math.round(i.Qi.Ii(f, p(this.jt).ri, ne)))));
|
|
662
654
|
if (s <= 0) return;
|
|
663
655
|
const e = i.ts, n = s + 2 * e, r = n / 2, o = this.jt.ss;
|
|
664
656
|
let l = this.jt.Ei, a = Math.floor(l - r) + 0.5;
|
|
665
657
|
a < 0 ? (l += Math.abs(0 - a), a = Math.floor(l - r) + 0.5) : a + n > o && (l -= Math.abs(o - (a + n)), a = Math.floor(l - r) + 0.5);
|
|
666
658
|
const u = a + n, c = Math.ceil(0 + i.S + i.C + i.A + i.k + i.I);
|
|
667
|
-
t.useBitmapCoordinateSpace(({ context:
|
|
668
|
-
const
|
|
669
|
-
|
|
670
|
-
const
|
|
671
|
-
if (
|
|
672
|
-
const
|
|
673
|
-
|
|
674
|
-
const
|
|
675
|
-
|
|
659
|
+
t.useBitmapCoordinateSpace((({ context: f, horizontalPixelRatio: d, verticalPixelRatio: m }) => {
|
|
660
|
+
const w = p(this.jt);
|
|
661
|
+
f.fillStyle = w.G;
|
|
662
|
+
const v = Math.round(a * d), g = Math.round(0 * m), b = Math.round(u * d), M = Math.round(c * m), y = Math.round(2 * d);
|
|
663
|
+
if (f.beginPath(), f.moveTo(v, g), f.lineTo(v, M - y), f.arcTo(v, M, v + y, M, y), f.lineTo(b - y, M), f.arcTo(b, M, b, M - y, y), f.lineTo(b, g), f.fill(), w.pi) {
|
|
664
|
+
const x = Math.round(w.Ei * d), L = g, P = Math.round((L + i.C) * m);
|
|
665
|
+
f.fillStyle = w.R;
|
|
666
|
+
const F = Math.max(1, Math.floor(d)), j = Math.floor(0.5 * d);
|
|
667
|
+
f.fillRect(x - j, L, F, P - L);
|
|
676
668
|
}
|
|
677
|
-
}), t.useMediaCoordinateSpace(({ context:
|
|
678
|
-
const
|
|
679
|
-
|
|
680
|
-
const
|
|
681
|
-
|
|
682
|
-
});
|
|
669
|
+
})), t.useMediaCoordinateSpace((({ context: f }) => {
|
|
670
|
+
const d = p(this.jt), m = 0 + i.S + i.C + i.A + i.k / 2;
|
|
671
|
+
f.font = i.P, f.textAlign = "left", f.textBaseline = "middle", f.fillStyle = d.R;
|
|
672
|
+
const w = i.Qi.Di(f, "Apr0");
|
|
673
|
+
f.translate(a + e, m + w), f.fillText(d.ri, 0, 0);
|
|
674
|
+
}));
|
|
683
675
|
}
|
|
684
676
|
}
|
|
685
|
-
class
|
|
677
|
+
class re {
|
|
686
678
|
constructor(t, i, s) {
|
|
687
679
|
this.xt = !0, this.Xt = new Ms(), this.Gt = { It: !1, G: "#4c525e", R: "white", ri: "", ss: 0, Ei: NaN, pi: !0 }, this.Ct = t, this.ns = i, this.Zi = s;
|
|
688
680
|
}
|
|
@@ -735,11 +727,11 @@ class ys {
|
|
|
735
727
|
return !0;
|
|
736
728
|
}
|
|
737
729
|
}
|
|
738
|
-
var
|
|
730
|
+
var xi;
|
|
739
731
|
(function(h) {
|
|
740
732
|
h[h.Normal = 0] = "Normal", h[h.Magnet = 1] = "Magnet", h[h.Hidden = 2] = "Hidden", h[h.MagnetOHLC = 3] = "MagnetOHLC";
|
|
741
|
-
})(
|
|
742
|
-
class
|
|
733
|
+
})(xi || (xi = {}));
|
|
734
|
+
let oe = class extends ys {
|
|
743
735
|
constructor(t, i) {
|
|
744
736
|
super(), this.yt = null, this.ps = NaN, this.vs = 0, this.ws = !1, this.gs = /* @__PURE__ */ new Map(), this.Ms = !1, this.bs = /* @__PURE__ */ new WeakMap(), this.Ss = /* @__PURE__ */ new WeakMap(), this.xs = NaN, this.Cs = NaN, this.ys = NaN, this.ks = NaN, this.ns = t, this.Ps = i, this.Ts = /* @__PURE__ */ ((e, n) => (r) => {
|
|
745
737
|
const o = n(), l = e();
|
|
@@ -748,12 +740,12 @@ class re extends ys {
|
|
|
748
740
|
const a = p(r.Lt());
|
|
749
741
|
return { gt: r.Ds(o, a), Ei: o };
|
|
750
742
|
}
|
|
751
|
-
})(() => this.ps, () => this.Cs);
|
|
743
|
+
})((() => this.ps), (() => this.Cs));
|
|
752
744
|
const s = /* @__PURE__ */ ((e, n) => () => {
|
|
753
745
|
const r = this.ns.Et().Is(e()), o = n();
|
|
754
746
|
return r && Number.isFinite(o) ? { wt: r, Ei: o } : null;
|
|
755
|
-
})(() => this.vs, () => this.si());
|
|
756
|
-
this.Vs = new
|
|
747
|
+
})((() => this.vs), (() => this.si()));
|
|
748
|
+
this.Vs = new re(this, t, s);
|
|
757
749
|
}
|
|
758
750
|
N() {
|
|
759
751
|
return this.Ps;
|
|
@@ -804,16 +796,16 @@ class re extends ys {
|
|
|
804
796
|
(n === null || c.js < n) && (n = c.js);
|
|
805
797
|
}
|
|
806
798
|
}
|
|
807
|
-
const r = [e, n].filter(
|
|
799
|
+
const r = [e, n].filter(bi);
|
|
808
800
|
if (r.length === 0) return t;
|
|
809
|
-
const o = s.qt(t), l = r.map((a) => Math.abs(o - s.qt(a)));
|
|
801
|
+
const o = s.qt(t), l = r.map(((a) => Math.abs(o - s.qt(a))));
|
|
810
802
|
return r[l.indexOf(Math.min(...l))];
|
|
811
803
|
}
|
|
812
804
|
Ys(t) {
|
|
813
805
|
let i = this.bs.get(t);
|
|
814
|
-
i || (i = new
|
|
806
|
+
i || (i = new ee(this, t), this.bs.set(t, i));
|
|
815
807
|
let s = this.Ss.get(t);
|
|
816
|
-
return s || (s = new
|
|
808
|
+
return s || (s = new ie(this.ns, this, t), this.Ss.set(t, s)), [i, s];
|
|
817
809
|
}
|
|
818
810
|
ti(t) {
|
|
819
811
|
return t === this.yt && this.Ps.horzLine.visible;
|
|
@@ -833,10 +825,9 @@ class re extends ys {
|
|
|
833
825
|
return this.yt;
|
|
834
826
|
}
|
|
835
827
|
Ws() {
|
|
836
|
-
this.ns.Xs().forEach((t) => {
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
}), this.gs.forEach((t) => t.kt()), this.Vs.kt();
|
|
828
|
+
this.ns.Xs().forEach(((t) => {
|
|
829
|
+
this.bs.get(t)?.kt(), this.Ss.get(t)?.kt();
|
|
830
|
+
})), this.gs.forEach(((t) => t.kt())), this.Vs.kt();
|
|
840
831
|
}
|
|
841
832
|
Js(t) {
|
|
842
833
|
return t && !t.Rs().Gi() ? t.Rs() : null;
|
|
@@ -851,25 +842,25 @@ class re extends ys {
|
|
|
851
842
|
return a !== null && u !== null ? (this.ps = i, this.Cs = a.Nt(i, u)) : (this.ps = NaN, this.Cs = NaN), e !== this.xs || n !== this.Cs || o !== this.vs || r !== this.ps || l !== this.yt;
|
|
852
843
|
}
|
|
853
844
|
Fs() {
|
|
854
|
-
const t = this.ns.tn().map((s) => s.qs().sn()).filter(
|
|
845
|
+
const t = this.ns.tn().map(((s) => s.qs().sn())).filter(bi), i = t.length === 0 ? null : Math.max(...t);
|
|
855
846
|
this.vs = i !== null ? i : NaN;
|
|
856
847
|
}
|
|
857
848
|
Zs(t, i, s) {
|
|
858
849
|
let e = t.get(i);
|
|
859
|
-
return e === void 0 && (e = new
|
|
850
|
+
return e === void 0 && (e = new he(this, i, s), t.set(i, e)), e;
|
|
860
851
|
}
|
|
861
|
-
}
|
|
852
|
+
};
|
|
862
853
|
function Lt(h) {
|
|
863
854
|
return h === "left" || h === "right";
|
|
864
855
|
}
|
|
865
|
-
class
|
|
856
|
+
let z = class ei {
|
|
866
857
|
constructor(t) {
|
|
867
858
|
this.nn = /* @__PURE__ */ new Map(), this.en = [], this.rn = t;
|
|
868
859
|
}
|
|
869
860
|
hn(t, i) {
|
|
870
|
-
const s = function(e, n) {
|
|
861
|
+
const s = (function(e, n) {
|
|
871
862
|
return e === void 0 ? n : { an: Math.max(e.an, n.an), ln: e.ln || n.ln };
|
|
872
|
-
}(this.nn.get(t), i);
|
|
863
|
+
})(this.nn.get(t), i);
|
|
873
864
|
this.nn.set(t, s);
|
|
874
865
|
}
|
|
875
866
|
_n() {
|
|
@@ -905,15 +896,15 @@ class E {
|
|
|
905
896
|
}
|
|
906
897
|
Sn(t) {
|
|
907
898
|
for (const i of t.en) this.xn(i);
|
|
908
|
-
this.rn = Math.max(this.rn, t.rn), t.nn.forEach((i, s) => {
|
|
899
|
+
this.rn = Math.max(this.rn, t.rn), t.nn.forEach(((i, s) => {
|
|
909
900
|
this.hn(s, i);
|
|
910
|
-
});
|
|
901
|
+
}));
|
|
911
902
|
}
|
|
912
903
|
static Cn() {
|
|
913
|
-
return new
|
|
904
|
+
return new ei(2);
|
|
914
905
|
}
|
|
915
906
|
static yn() {
|
|
916
|
-
return new
|
|
907
|
+
return new ei(3);
|
|
917
908
|
}
|
|
918
909
|
xn(t) {
|
|
919
910
|
switch (t.fn) {
|
|
@@ -940,17 +931,17 @@ class E {
|
|
|
940
931
|
}
|
|
941
932
|
}
|
|
942
933
|
mn() {
|
|
943
|
-
const t = this.en.findIndex((i) => i.fn === 5);
|
|
934
|
+
const t = this.en.findIndex(((i) => i.fn === 5));
|
|
944
935
|
t !== -1 && this.en.splice(t, 1);
|
|
945
936
|
}
|
|
946
|
-
}
|
|
947
|
-
|
|
937
|
+
};
|
|
938
|
+
class _s {
|
|
948
939
|
formatTickmarks(t) {
|
|
949
|
-
return t.map((i) => this.format(i));
|
|
940
|
+
return t.map(((i) => this.format(i)));
|
|
950
941
|
}
|
|
951
|
-
}
|
|
952
|
-
const
|
|
953
|
-
function
|
|
942
|
+
}
|
|
943
|
+
const Ci = ".";
|
|
944
|
+
function B(h, t) {
|
|
954
945
|
if (!Z(h)) return "n/a";
|
|
955
946
|
if (!ut(t)) throw new TypeError("invalid length");
|
|
956
947
|
if (t < 0 || t > 16) throw new TypeError("invalid length");
|
|
@@ -977,8 +968,8 @@ class zt extends _s {
|
|
|
977
968
|
const n = this.Rn !== void 0 ? this.Rn : NaN;
|
|
978
969
|
if (i > 1) {
|
|
979
970
|
let r = +(Math.round(t * i) - s * i).toFixed(this.Rn);
|
|
980
|
-
r >= i && (r -= i, s += 1), e =
|
|
981
|
-
} else s = Math.round(s * i) / i, n > 0 && (e =
|
|
971
|
+
r >= i && (r -= i, s += 1), e = Ci + B(+r.toFixed(this.Rn) * this.kn, n);
|
|
972
|
+
} else s = Math.round(s * i) / i, n > 0 && (e = Ci + B(0, n));
|
|
982
973
|
return s.toFixed(0) + e;
|
|
983
974
|
}
|
|
984
975
|
}
|
|
@@ -990,7 +981,7 @@ class Ss extends zt {
|
|
|
990
981
|
return `${super.format(t)}%`;
|
|
991
982
|
}
|
|
992
983
|
}
|
|
993
|
-
class
|
|
984
|
+
class le extends _s {
|
|
994
985
|
constructor(t) {
|
|
995
986
|
super(), this.Dn = t;
|
|
996
987
|
}
|
|
@@ -1001,10 +992,10 @@ class oe extends _s {
|
|
|
1001
992
|
In(t) {
|
|
1002
993
|
let i;
|
|
1003
994
|
const s = Math.pow(10, this.Dn);
|
|
1004
|
-
return i = (t = Math.round(t * s) / s) >= 1e-15 && t < 1 ? t.toFixed(this.Dn).replace(/\.?0+$/, "") : String(t), i.replace(/(\.[1-9]*)0+$/, (e, n) => n);
|
|
995
|
+
return i = (t = Math.round(t * s) / s) >= 1e-15 && t < 1 ? t.toFixed(this.Dn).replace(/\.?0+$/, "") : String(t), i.replace(/(\.[1-9]*)0+$/, ((e, n) => n));
|
|
1005
996
|
}
|
|
1006
997
|
}
|
|
1007
|
-
const
|
|
998
|
+
const ae = /[2-9]/g;
|
|
1008
999
|
class xt {
|
|
1009
1000
|
constructor(t = 50) {
|
|
1010
1001
|
this.Vn = 0, this.Bn = 1, this.En = 1, this.An = {}, this.Ln = /* @__PURE__ */ new Map(), this.zn = t;
|
|
@@ -1020,8 +1011,8 @@ class xt {
|
|
|
1020
1011
|
return ((e.actualBoundingBoxAscent || 0) - (e.actualBoundingBoxDescent || 0)) / 2;
|
|
1021
1012
|
}
|
|
1022
1013
|
Nn(t, i, s) {
|
|
1023
|
-
const e = s ||
|
|
1024
|
-
if (this.Ln.has(n)) return
|
|
1014
|
+
const e = s || ae, n = String(i).replace(e, "0");
|
|
1015
|
+
if (this.Ln.has(n)) return T(this.Ln.get(n)).Fn;
|
|
1025
1016
|
if (this.Vn === this.zn) {
|
|
1026
1017
|
const o = this.An[this.En];
|
|
1027
1018
|
delete this.An[this.En], this.Ln.delete(o), this.En++, this.Vn--;
|
|
@@ -1031,7 +1022,7 @@ class xt {
|
|
|
1031
1022
|
return t.restore(), r.width === 0 && i.length || (this.Ln.set(n, { Fn: r, Wn: this.Bn }), this.An[this.Bn] = n, this.Vn++, this.Bn++), r;
|
|
1032
1023
|
}
|
|
1033
1024
|
}
|
|
1034
|
-
class
|
|
1025
|
+
class ue {
|
|
1035
1026
|
constructor(t) {
|
|
1036
1027
|
this.Hn = null, this.M = null, this.Un = "right", this.$n = t;
|
|
1037
1028
|
}
|
|
@@ -1044,7 +1035,7 @@ class ae {
|
|
|
1044
1035
|
}
|
|
1045
1036
|
class xs {
|
|
1046
1037
|
constructor(t, i, s) {
|
|
1047
|
-
this.jn = t, this.$n = new xt(50), this.Yn = i, this.O = s, this.F = -1, this.Xt = new
|
|
1038
|
+
this.jn = t, this.$n = new xt(50), this.Yn = i, this.O = s, this.F = -1, this.Xt = new ue(this.$n);
|
|
1048
1039
|
}
|
|
1049
1040
|
Tt() {
|
|
1050
1041
|
const t = this.O.Kn(this.Yn);
|
|
@@ -1057,7 +1048,7 @@ class xs {
|
|
|
1057
1048
|
return e.k !== this.F && (this.F = e.k, this.$n.On()), this.Xt.qn(this.jn.ji(), e, s), this.Xt;
|
|
1058
1049
|
}
|
|
1059
1050
|
}
|
|
1060
|
-
class
|
|
1051
|
+
class ce extends st {
|
|
1061
1052
|
constructor() {
|
|
1062
1053
|
super(...arguments), this.jt = null;
|
|
1063
1054
|
}
|
|
@@ -1065,20 +1056,19 @@ class ue extends st {
|
|
|
1065
1056
|
this.jt = t;
|
|
1066
1057
|
}
|
|
1067
1058
|
Qn(t, i) {
|
|
1068
|
-
|
|
1069
|
-
if (!((r = this.jt) != null && r.It)) return null;
|
|
1059
|
+
if (!this.jt?.It) return null;
|
|
1070
1060
|
const { ut: s, ct: e, te: n } = this.jt;
|
|
1071
1061
|
return i >= s - e - 7 && i <= s + e + 7 ? { ie: this.jt, te: n } : null;
|
|
1072
1062
|
}
|
|
1073
1063
|
et({ context: t, bitmapSize: i, horizontalPixelRatio: s, verticalPixelRatio: e }) {
|
|
1074
1064
|
if (this.jt === null || this.jt.It === !1) return;
|
|
1075
1065
|
const n = Math.round(this.jt.ut * e);
|
|
1076
|
-
n < 0 || n > i.height || (t.lineCap = "butt", t.strokeStyle = this.jt.R, t.lineWidth = Math.floor(this.jt.ct * s),
|
|
1066
|
+
n < 0 || n > i.height || (t.lineCap = "butt", t.strokeStyle = this.jt.R, t.lineWidth = Math.floor(this.jt.ct * s), J(t, this.jt.Zt), vs(t, n, 0, i.width));
|
|
1077
1067
|
}
|
|
1078
1068
|
}
|
|
1079
|
-
class
|
|
1069
|
+
class ai {
|
|
1080
1070
|
constructor(t) {
|
|
1081
|
-
this.se = { ut: 0, R: "rgba(0, 0, 0, 0)", ct: 1, Zt: 0, It: !1 }, this.ne = new
|
|
1071
|
+
this.se = { ut: 0, R: "rgba(0, 0, 0, 0)", ct: 1, Zt: 0, It: !1 }, this.ne = new ce(), this.xt = !0, this.ee = t, this.re = t.Qt(), this.ne.ht(this.se);
|
|
1082
1072
|
}
|
|
1083
1073
|
kt() {
|
|
1084
1074
|
this.xt = !0;
|
|
@@ -1087,7 +1077,7 @@ class li {
|
|
|
1087
1077
|
return this.ee.It() ? (this.xt && (this.he(), this.xt = !1), this.ne) : null;
|
|
1088
1078
|
}
|
|
1089
1079
|
}
|
|
1090
|
-
class
|
|
1080
|
+
class fe extends ai {
|
|
1091
1081
|
constructor(t) {
|
|
1092
1082
|
super(t);
|
|
1093
1083
|
}
|
|
@@ -1120,8 +1110,8 @@ class de extends st {
|
|
|
1120
1110
|
t.arc(o, l, a, 0, 2 * Math.PI, !1), t.fill(), t.fillStyle = e.ce, t.beginPath(), t.arc(o, l, e.ft * i, 0, 2 * Math.PI, !1), t.fill(), t.lineWidth = n, t.strokeStyle = e.de, t.beginPath(), t.arc(o, l, e.ft * i + n / 2, 0, 2 * Math.PI, !1), t.stroke();
|
|
1121
1111
|
}
|
|
1122
1112
|
}
|
|
1123
|
-
const
|
|
1124
|
-
class
|
|
1113
|
+
const me = [{ fe: 0, pe: 0.25, ve: 4, me: 10, we: 0.25, ge: 0, Me: 0.4, be: 0.8 }, { fe: 0.25, pe: 0.525, ve: 10, me: 14, we: 0, ge: 0, Me: 0.8, be: 0 }, { fe: 0.525, pe: 1, ve: 14, me: 14, we: 0, ge: 0, Me: 0, be: 0 }];
|
|
1114
|
+
class pe {
|
|
1125
1115
|
constructor(t) {
|
|
1126
1116
|
this.Xt = new de(), this.xt = !0, this.Se = !0, this.xe = performance.now(), this.Ce = this.xe - 1, this.ye = t;
|
|
1127
1117
|
}
|
|
@@ -1183,17 +1173,17 @@ class me {
|
|
|
1183
1173
|
Ae(t, i) {
|
|
1184
1174
|
const s = t % 2600 / 2600;
|
|
1185
1175
|
let e;
|
|
1186
|
-
for (const a of
|
|
1176
|
+
for (const a of me) if (s >= a.fe && s <= a.pe) {
|
|
1187
1177
|
e = a;
|
|
1188
1178
|
break;
|
|
1189
1179
|
}
|
|
1190
|
-
|
|
1180
|
+
C(e !== void 0, "Last price animation internal logic error");
|
|
1191
1181
|
const n = (s - e.fe) / (e.pe - e.fe);
|
|
1192
1182
|
return { ce: this.ze(i, n, e.we, e.ge), de: this.ze(i, n, e.Me, e.be), ft: (r = n, o = e.ve, l = e.me, o + (l - o) * r) };
|
|
1193
1183
|
var r, o, l;
|
|
1194
1184
|
}
|
|
1195
1185
|
}
|
|
1196
|
-
class
|
|
1186
|
+
class ge extends ai {
|
|
1197
1187
|
constructor(t) {
|
|
1198
1188
|
super(t);
|
|
1199
1189
|
}
|
|
@@ -1206,7 +1196,7 @@ class pe extends li {
|
|
|
1206
1196
|
s.Be || (t.It = !0, t.ut = s.Ei, t.R = this.ee.Oe(s.R), t.ct = i.priceLineWidth, t.Zt = i.priceLineStyle);
|
|
1207
1197
|
}
|
|
1208
1198
|
}
|
|
1209
|
-
class
|
|
1199
|
+
class ve extends kt {
|
|
1210
1200
|
constructor(t) {
|
|
1211
1201
|
super(), this.Jt = t;
|
|
1212
1202
|
}
|
|
@@ -1229,11 +1219,11 @@ class ge extends kt {
|
|
|
1229
1219
|
return i ? s ? this.Jt.Ft().He() ? t.$e : t.Ue : t.ri : "";
|
|
1230
1220
|
}
|
|
1231
1221
|
}
|
|
1232
|
-
function
|
|
1222
|
+
function Pi(h, t, i, s) {
|
|
1233
1223
|
const e = Number.isFinite(t), n = Number.isFinite(i);
|
|
1234
1224
|
return e && n ? h(t, i) : e || n ? e ? t : i : s;
|
|
1235
1225
|
}
|
|
1236
|
-
class
|
|
1226
|
+
class N {
|
|
1237
1227
|
constructor(t, i) {
|
|
1238
1228
|
this.qe = t, this.je = i;
|
|
1239
1229
|
}
|
|
@@ -1241,7 +1231,7 @@ class z {
|
|
|
1241
1231
|
return t !== null && this.qe === t.qe && this.je === t.je;
|
|
1242
1232
|
}
|
|
1243
1233
|
Ke() {
|
|
1244
|
-
return new
|
|
1234
|
+
return new N(this.qe, this.je);
|
|
1245
1235
|
}
|
|
1246
1236
|
Ze() {
|
|
1247
1237
|
return this.qe;
|
|
@@ -1256,7 +1246,7 @@ class z {
|
|
|
1256
1246
|
return this.je === this.qe || Number.isNaN(this.je) || Number.isNaN(this.qe);
|
|
1257
1247
|
}
|
|
1258
1248
|
Sn(t) {
|
|
1259
|
-
return t === null ? this : new
|
|
1249
|
+
return t === null ? this : new N(Pi(Math.min, this.Ze(), t.Ze(), -1 / 0), Pi(Math.max, this.Ge(), t.Ge(), 1 / 0));
|
|
1260
1250
|
}
|
|
1261
1251
|
Je(t) {
|
|
1262
1252
|
if (!Z(t) || this.je - this.qe === 0) return;
|
|
@@ -1271,7 +1261,7 @@ class z {
|
|
|
1271
1261
|
return { minValue: this.qe, maxValue: this.je };
|
|
1272
1262
|
}
|
|
1273
1263
|
static ir(t) {
|
|
1274
|
-
return t === null ? null : new
|
|
1264
|
+
return t === null ? null : new N(t.minValue, t.maxValue);
|
|
1275
1265
|
}
|
|
1276
1266
|
}
|
|
1277
1267
|
class Ct {
|
|
@@ -1288,11 +1278,11 @@ class Ct {
|
|
|
1288
1278
|
return { priceRange: this.sr === null ? null : this.sr.tr(), margins: this.nr || void 0 };
|
|
1289
1279
|
}
|
|
1290
1280
|
static ir(t) {
|
|
1291
|
-
return t === null ? null : new Ct(
|
|
1281
|
+
return t === null ? null : new Ct(N.ir(t.priceRange), t.margins);
|
|
1292
1282
|
}
|
|
1293
1283
|
}
|
|
1294
|
-
const
|
|
1295
|
-
class
|
|
1284
|
+
const we = [2, 4, 8, 16, 32, 64, 128, 256, 512], be = "Custom series with conflation reducer must have a priceValueBuilder method";
|
|
1285
|
+
class Me extends ai {
|
|
1296
1286
|
constructor(t, i) {
|
|
1297
1287
|
super(t), this.hr = i;
|
|
1298
1288
|
}
|
|
@@ -1305,7 +1295,7 @@ class be extends li {
|
|
|
1305
1295
|
s !== null && (t.It = !0, t.ut = s, t.R = i.color, t.ct = i.lineWidth, t.Zt = i.lineStyle, t.te = this.hr.N().id);
|
|
1306
1296
|
}
|
|
1307
1297
|
}
|
|
1308
|
-
class
|
|
1298
|
+
class ye extends kt {
|
|
1309
1299
|
constructor(t, i) {
|
|
1310
1300
|
super(), this.ye = t, this.hr = i;
|
|
1311
1301
|
}
|
|
@@ -1326,12 +1316,12 @@ class Me extends kt {
|
|
|
1326
1316
|
return i === null ? "" : this.ye.Ft().Ji(t, i.Wt);
|
|
1327
1317
|
}
|
|
1328
1318
|
}
|
|
1329
|
-
class
|
|
1319
|
+
class _e {
|
|
1330
1320
|
constructor(t, i) {
|
|
1331
|
-
this.ye = t, this.Ps = i, this._r = new
|
|
1321
|
+
this.ye = t, this.Ps = i, this._r = new Me(t, this), this.jn = new ye(t, this), this.ur = new xs(this.jn, t, t.Qt());
|
|
1332
1322
|
}
|
|
1333
1323
|
cr(t) {
|
|
1334
|
-
|
|
1324
|
+
R(this.Ps, t), this.kt(), this.ye.Qt().dr();
|
|
1335
1325
|
}
|
|
1336
1326
|
N() {
|
|
1337
1327
|
return this.Ps;
|
|
@@ -1355,7 +1345,7 @@ class ye {
|
|
|
1355
1345
|
return s === null ? null : i.Nt(this.Ps.price, s.Wt);
|
|
1356
1346
|
}
|
|
1357
1347
|
}
|
|
1358
|
-
class
|
|
1348
|
+
class Se {
|
|
1359
1349
|
constructor() {
|
|
1360
1350
|
this.wr = /* @__PURE__ */ new WeakMap();
|
|
1361
1351
|
}
|
|
@@ -1382,7 +1372,7 @@ class _e {
|
|
|
1382
1372
|
}
|
|
1383
1373
|
br(t) {
|
|
1384
1374
|
if (t <= 2) return 2;
|
|
1385
|
-
for (const i of
|
|
1375
|
+
for (const i of we) if (t <= i) return i;
|
|
1386
1376
|
return 512;
|
|
1387
1377
|
}
|
|
1388
1378
|
Tr(t) {
|
|
@@ -1438,9 +1428,9 @@ class _e {
|
|
|
1438
1428
|
if (s - i == 1) return this.Ar(a, !0);
|
|
1439
1429
|
const u = i + 1 === e ? n : t[i + 1];
|
|
1440
1430
|
let c = this.Br(a, u, r, o, l);
|
|
1441
|
-
for (let
|
|
1442
|
-
const
|
|
1443
|
-
c = this.Lr(c,
|
|
1431
|
+
for (let f = i + 2; f < s; f++) {
|
|
1432
|
+
const d = f === e ? n : t[f];
|
|
1433
|
+
c = this.Lr(c, d, r, o, l);
|
|
1444
1434
|
}
|
|
1445
1435
|
return c;
|
|
1446
1436
|
}
|
|
@@ -1453,7 +1443,7 @@ class _e {
|
|
|
1453
1443
|
return { js: t.Or, wt: t.Fr, Gr: t.Fr, Wt: [s ? t.qr : t.Hr, t.Ur, t.$r, t.qr], jr: t.jr, le: s ? e ? t.Yr : { wt: t.Fr } : void 0 };
|
|
1454
1444
|
}
|
|
1455
1445
|
Vr(t, i = !1) {
|
|
1456
|
-
return t.map((s) => this.Xr(s, i));
|
|
1446
|
+
return t.map(((s) => this.Xr(s, i)));
|
|
1457
1447
|
}
|
|
1458
1448
|
Pr(t, i, s, e, n = !1, r, o) {
|
|
1459
1449
|
if (e.length === 0) return e;
|
|
@@ -1465,8 +1455,8 @@ class _e {
|
|
|
1465
1455
|
if (Math.floor((l - 1) / s) === Math.floor(l / s) || e.length === 1) {
|
|
1466
1456
|
const u = Math.min(a + s, t.length), c = u - a;
|
|
1467
1457
|
if (c <= 0) return e;
|
|
1468
|
-
const
|
|
1469
|
-
return e[e.length - 1] = this.Xr(
|
|
1458
|
+
const f = c === 1 ? this.Ar(a === l ? i : t[a], !0) : this.Zr(t, a, u, l, i, r, n, o);
|
|
1459
|
+
return e[e.length - 1] = this.Xr(f, n), e;
|
|
1470
1460
|
}
|
|
1471
1461
|
{
|
|
1472
1462
|
const u = t.slice();
|
|
@@ -1485,7 +1475,7 @@ class _e {
|
|
|
1485
1475
|
return i === void 0 && (i = { Qr: this.Tr(t), Cr: /* @__PURE__ */ new Map() }, this.wr.set(t, i)), i;
|
|
1486
1476
|
}
|
|
1487
1477
|
}
|
|
1488
|
-
class
|
|
1478
|
+
class xe extends ys {
|
|
1489
1479
|
constructor(t) {
|
|
1490
1480
|
super(), this.ns = t;
|
|
1491
1481
|
}
|
|
@@ -1493,7 +1483,7 @@ class Se extends ys {
|
|
|
1493
1483
|
return this.ns;
|
|
1494
1484
|
}
|
|
1495
1485
|
}
|
|
1496
|
-
const
|
|
1486
|
+
const Ce = { Bar: (h, t, i, s) => {
|
|
1497
1487
|
const e = t.upColor, n = t.downColor, r = p(h(i, s)), o = D(r.Wt[0]) <= D(r.Wt[3]);
|
|
1498
1488
|
return { th: r.R ?? (o ? e : n) };
|
|
1499
1489
|
}, Candlestick: (h, t, i, s) => {
|
|
@@ -1509,9 +1499,9 @@ const xe = { Bar: (h, t, i, s) => {
|
|
|
1509
1499
|
const e = p(h(i, s));
|
|
1510
1500
|
return { th: e.R ?? t.color, vt: e.R ?? t.color };
|
|
1511
1501
|
}, Histogram: (h, t, i, s) => ({ th: p(h(i, s)).R ?? t.color }) };
|
|
1512
|
-
class
|
|
1502
|
+
class Pe {
|
|
1513
1503
|
constructor(t) {
|
|
1514
|
-
this.fh = (i, s) => s !== void 0 ? s.Wt : this.ye.qs().ph(i), this.ye = t, this.mh =
|
|
1504
|
+
this.fh = (i, s) => s !== void 0 ? s.Wt : this.ye.qs().ph(i), this.ye = t, this.mh = Ce[t.wh()];
|
|
1515
1505
|
}
|
|
1516
1506
|
gh(t, i) {
|
|
1517
1507
|
return this.mh(this.fh, this.ye.N(), t, i);
|
|
@@ -1526,12 +1516,12 @@ function Cs(h, t, i, s, e = 0, n = t.length) {
|
|
|
1526
1516
|
return e;
|
|
1527
1517
|
}
|
|
1528
1518
|
const tt = Cs.bind(null, !0), Ps = Cs.bind(null, !1);
|
|
1529
|
-
var
|
|
1519
|
+
var Ei;
|
|
1530
1520
|
(function(h) {
|
|
1531
1521
|
h[h.NearestLeft = -1] = "NearestLeft", h[h.None = 0] = "None", h[h.NearestRight = 1] = "NearestRight";
|
|
1532
|
-
})(
|
|
1533
|
-
const
|
|
1534
|
-
class
|
|
1522
|
+
})(Ei || (Ei = {}));
|
|
1523
|
+
const V = 30;
|
|
1524
|
+
class Ee {
|
|
1535
1525
|
constructor() {
|
|
1536
1526
|
this.Mh = [], this.bh = /* @__PURE__ */ new Map(), this.Sh = /* @__PURE__ */ new Map(), this.xh = [];
|
|
1537
1527
|
}
|
|
@@ -1571,7 +1561,7 @@ class Pe {
|
|
|
1571
1561
|
return e;
|
|
1572
1562
|
}
|
|
1573
1563
|
ht(t) {
|
|
1574
|
-
this.Sh.clear(), this.bh.clear(), this.Mh = t, this.xh = t.map((i) => i.js);
|
|
1564
|
+
this.Sh.clear(), this.bh.clear(), this.Mh = t, this.xh = t.map(((i) => i.js));
|
|
1575
1565
|
}
|
|
1576
1566
|
Bh() {
|
|
1577
1567
|
return this.xh;
|
|
@@ -1607,10 +1597,10 @@ class Pe {
|
|
|
1607
1597
|
return i === this.Mh.length || t < this.Mh[i].js ? null : i;
|
|
1608
1598
|
}
|
|
1609
1599
|
zh(t) {
|
|
1610
|
-
return tt(this.Mh, t, (i, s) => i.js < s);
|
|
1600
|
+
return tt(this.Mh, t, ((i, s) => i.js < s));
|
|
1611
1601
|
}
|
|
1612
1602
|
Oh(t) {
|
|
1613
|
-
return Ps(this.Mh, t, (i, s) => i.js > s);
|
|
1603
|
+
return Ps(this.Mh, t, ((i, s) => i.js > s));
|
|
1614
1604
|
}
|
|
1615
1605
|
Nh(t, i, s) {
|
|
1616
1606
|
let e = null;
|
|
@@ -1623,25 +1613,25 @@ class Pe {
|
|
|
1623
1613
|
Vh(t, i, s) {
|
|
1624
1614
|
if (this.Gi()) return null;
|
|
1625
1615
|
let e = null;
|
|
1626
|
-
const n = p(this.kh()), r = p(this.sn()), o = Math.max(t, n), l = Math.min(i, r), a = Math.ceil(o /
|
|
1616
|
+
const n = p(this.kh()), r = p(this.sn()), o = Math.max(t, n), l = Math.min(i, r), a = Math.ceil(o / V) * V, u = Math.max(a, Math.floor(l / V) * V);
|
|
1627
1617
|
{
|
|
1628
|
-
const
|
|
1629
|
-
e = mt(e, this.Nh(
|
|
1618
|
+
const f = this.zh(o), d = this.Oh(Math.min(l, a, i));
|
|
1619
|
+
e = mt(e, this.Nh(f, d, s));
|
|
1630
1620
|
}
|
|
1631
1621
|
let c = this.bh.get(s);
|
|
1632
1622
|
c === void 0 && (c = /* @__PURE__ */ new Map(), this.bh.set(s, c));
|
|
1633
|
-
for (let
|
|
1634
|
-
const
|
|
1635
|
-
let m = c.get(
|
|
1623
|
+
for (let f = Math.max(a + 1, o); f < u; f += V) {
|
|
1624
|
+
const d = Math.floor(f / V);
|
|
1625
|
+
let m = c.get(d);
|
|
1636
1626
|
if (m === void 0) {
|
|
1637
|
-
const
|
|
1638
|
-
m = this.Nh(
|
|
1627
|
+
const w = this.zh(d * V), v = this.Oh((d + 1) * V - 1);
|
|
1628
|
+
m = this.Nh(w, v, s), c.set(d, m);
|
|
1639
1629
|
}
|
|
1640
1630
|
e = mt(e, m);
|
|
1641
1631
|
}
|
|
1642
1632
|
{
|
|
1643
|
-
const
|
|
1644
|
-
e = mt(e, this.Nh(
|
|
1633
|
+
const f = this.zh(u), d = this.Oh(l);
|
|
1634
|
+
e = mt(e, this.Nh(f, d, s));
|
|
1645
1635
|
}
|
|
1646
1636
|
return e;
|
|
1647
1637
|
}
|
|
@@ -1649,11 +1639,11 @@ class Pe {
|
|
|
1649
1639
|
function mt(h, t) {
|
|
1650
1640
|
return h === null ? t : t === null ? h : { Fh: Math.min(h.Fh, t.Fh), Wh: Math.max(h.Wh, t.Wh) };
|
|
1651
1641
|
}
|
|
1652
|
-
function
|
|
1653
|
-
return new
|
|
1642
|
+
function Vt() {
|
|
1643
|
+
return new Ee();
|
|
1654
1644
|
}
|
|
1655
|
-
const Pt = { setLineStyle:
|
|
1656
|
-
class
|
|
1645
|
+
const Pt = { setLineStyle: J };
|
|
1646
|
+
class Ne {
|
|
1657
1647
|
constructor(t) {
|
|
1658
1648
|
this.Hh = t;
|
|
1659
1649
|
}
|
|
@@ -1661,25 +1651,22 @@ class Ee {
|
|
|
1661
1651
|
this.Hh.draw(t, Pt);
|
|
1662
1652
|
}
|
|
1663
1653
|
Uh(t, i, s) {
|
|
1664
|
-
|
|
1665
|
-
(n = (e = this.Hh).drawBackground) == null || n.call(e, t, Pt);
|
|
1654
|
+
this.Hh.drawBackground?.(t, Pt);
|
|
1666
1655
|
}
|
|
1667
1656
|
}
|
|
1668
|
-
class
|
|
1657
|
+
class ke {
|
|
1669
1658
|
constructor(t) {
|
|
1670
1659
|
this.Ln = null, this.$h = t;
|
|
1671
1660
|
}
|
|
1672
1661
|
Tt() {
|
|
1673
|
-
var s;
|
|
1674
1662
|
const t = this.$h.renderer();
|
|
1675
1663
|
if (t === null) return null;
|
|
1676
|
-
if (
|
|
1677
|
-
const i = new
|
|
1664
|
+
if (this.Ln?.qh === t) return this.Ln.jh;
|
|
1665
|
+
const i = new Ne(t);
|
|
1678
1666
|
return this.Ln = { qh: t, jh: i }, i;
|
|
1679
1667
|
}
|
|
1680
1668
|
Yh() {
|
|
1681
|
-
|
|
1682
|
-
return ((i = (t = this.$h).zOrder) == null ? void 0 : i.call(t)) ?? "normal";
|
|
1669
|
+
return this.$h.zOrder?.() ?? "normal";
|
|
1683
1670
|
}
|
|
1684
1671
|
}
|
|
1685
1672
|
class Es {
|
|
@@ -1690,27 +1677,24 @@ class Es {
|
|
|
1690
1677
|
return this.Zh;
|
|
1691
1678
|
}
|
|
1692
1679
|
Ws() {
|
|
1693
|
-
|
|
1694
|
-
(i = (t = this.Zh).updateAllViews) == null || i.call(t);
|
|
1680
|
+
this.Zh.updateAllViews?.();
|
|
1695
1681
|
}
|
|
1696
1682
|
Ys() {
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
const i = t.map((r) => new Ne(r));
|
|
1683
|
+
const t = this.Zh.paneViews?.() ?? [];
|
|
1684
|
+
if (this.Kh?.qh === t) return this.Kh.jh;
|
|
1685
|
+
const i = t.map(((s) => new ke(s)));
|
|
1701
1686
|
return this.Kh = { qh: t, jh: i }, i;
|
|
1702
1687
|
}
|
|
1703
1688
|
Qn(t, i) {
|
|
1704
|
-
|
|
1705
|
-
return ((e = (s = this.Zh).hitTest) == null ? void 0 : e.call(s, t, i)) ?? null;
|
|
1689
|
+
return this.Zh.hitTest?.(t, i) ?? null;
|
|
1706
1690
|
}
|
|
1707
1691
|
}
|
|
1708
|
-
let
|
|
1692
|
+
let Le = class extends Es {
|
|
1709
1693
|
ds() {
|
|
1710
1694
|
return [];
|
|
1711
1695
|
}
|
|
1712
1696
|
};
|
|
1713
|
-
class
|
|
1697
|
+
class ze {
|
|
1714
1698
|
constructor(t) {
|
|
1715
1699
|
this.Hh = t;
|
|
1716
1700
|
}
|
|
@@ -1718,32 +1702,28 @@ class Le {
|
|
|
1718
1702
|
this.Hh.draw(t, Pt);
|
|
1719
1703
|
}
|
|
1720
1704
|
Uh(t, i, s) {
|
|
1721
|
-
|
|
1722
|
-
(n = (e = this.Hh).drawBackground) == null || n.call(e, t, Pt);
|
|
1705
|
+
this.Hh.drawBackground?.(t, Pt);
|
|
1723
1706
|
}
|
|
1724
1707
|
}
|
|
1725
|
-
class
|
|
1708
|
+
class Ni {
|
|
1726
1709
|
constructor(t) {
|
|
1727
1710
|
this.Ln = null, this.$h = t;
|
|
1728
1711
|
}
|
|
1729
1712
|
Tt() {
|
|
1730
|
-
var s;
|
|
1731
1713
|
const t = this.$h.renderer();
|
|
1732
1714
|
if (t === null) return null;
|
|
1733
|
-
if (
|
|
1734
|
-
const i = new
|
|
1715
|
+
if (this.Ln?.qh === t) return this.Ln.jh;
|
|
1716
|
+
const i = new ze(t);
|
|
1735
1717
|
return this.Ln = { qh: t, jh: i }, i;
|
|
1736
1718
|
}
|
|
1737
1719
|
Yh() {
|
|
1738
|
-
|
|
1739
|
-
return ((i = (t = this.$h).zOrder) == null ? void 0 : i.call(t)) ?? "normal";
|
|
1720
|
+
return this.$h.zOrder?.() ?? "normal";
|
|
1740
1721
|
}
|
|
1741
1722
|
}
|
|
1742
1723
|
function Ns(h) {
|
|
1743
|
-
|
|
1744
|
-
return { ri: h.text(), Ei: h.coordinate(), Vi: (t = h.fixedCoordinate) == null ? void 0 : t.call(h), R: h.textColor(), G: h.backColor(), It: ((i = h.visible) == null ? void 0 : i.call(h)) ?? !0, pi: ((s = h.tickVisible) == null ? void 0 : s.call(h)) ?? !0 };
|
|
1724
|
+
return { ri: h.text(), Ei: h.coordinate(), Vi: h.fixedCoordinate?.(), R: h.textColor(), G: h.backColor(), It: h.visible?.() ?? !0, pi: h.tickVisible?.() ?? !0 };
|
|
1745
1725
|
}
|
|
1746
|
-
class
|
|
1726
|
+
class Te {
|
|
1747
1727
|
constructor(t, i) {
|
|
1748
1728
|
this.Xt = new Ms(), this.Xh = t, this.Jh = i;
|
|
1749
1729
|
}
|
|
@@ -1751,7 +1731,7 @@ class ze {
|
|
|
1751
1731
|
return this.Xt.ht({ ss: this.Jh.ss(), ...Ns(this.Xh) }), this.Xt;
|
|
1752
1732
|
}
|
|
1753
1733
|
}
|
|
1754
|
-
class
|
|
1734
|
+
class Re extends kt {
|
|
1755
1735
|
constructor(t, i) {
|
|
1756
1736
|
super(), this.Xh = t, this.Ki = i;
|
|
1757
1737
|
}
|
|
@@ -1762,65 +1742,60 @@ class Te extends kt {
|
|
|
1762
1742
|
s.Ti = n, s.Ri = n, s.Ei = e.Ei, s.Vi = e.Vi, t.ri = e.ri, t.It = e.It, t.pi = e.pi;
|
|
1763
1743
|
}
|
|
1764
1744
|
}
|
|
1765
|
-
class
|
|
1745
|
+
class Ie extends Es {
|
|
1766
1746
|
constructor(t, i) {
|
|
1767
1747
|
super(t), this.Qh = null, this.ta = null, this.ia = null, this.sa = null, this.ye = i;
|
|
1768
1748
|
}
|
|
1769
1749
|
fs() {
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
const i = this.ye.Qt().Et(), s = t.map((o) => new ze(o, i));
|
|
1750
|
+
const t = this.Zh.timeAxisViews?.() ?? [];
|
|
1751
|
+
if (this.Qh?.qh === t) return this.Qh.jh;
|
|
1752
|
+
const i = this.ye.Qt().Et(), s = t.map(((e) => new Te(e, i)));
|
|
1774
1753
|
return this.Qh = { qh: t, jh: s }, s;
|
|
1775
1754
|
}
|
|
1776
1755
|
Ks() {
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
const i = this.ye.Ft(), s = t.map((o) => new Te(o, i));
|
|
1756
|
+
const t = this.Zh.priceAxisViews?.() ?? [];
|
|
1757
|
+
if (this.ta?.qh === t) return this.ta.jh;
|
|
1758
|
+
const i = this.ye.Ft(), s = t.map(((e) => new Re(e, i)));
|
|
1781
1759
|
return this.ta = { qh: t, jh: s }, s;
|
|
1782
1760
|
}
|
|
1783
1761
|
na() {
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
const i = t.map((r) => new Ei(r));
|
|
1762
|
+
const t = this.Zh.priceAxisPaneViews?.() ?? [];
|
|
1763
|
+
if (this.ia?.qh === t) return this.ia.jh;
|
|
1764
|
+
const i = t.map(((s) => new Ni(s)));
|
|
1788
1765
|
return this.ia = { qh: t, jh: i }, i;
|
|
1789
1766
|
}
|
|
1790
1767
|
ea() {
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
const i = t.map((r) => new Ei(r));
|
|
1768
|
+
const t = this.Zh.timeAxisPaneViews?.() ?? [];
|
|
1769
|
+
if (this.sa?.qh === t) return this.sa.jh;
|
|
1770
|
+
const i = t.map(((s) => new Ni(s)));
|
|
1795
1771
|
return this.sa = { qh: t, jh: i }, i;
|
|
1796
1772
|
}
|
|
1797
1773
|
ra(t, i) {
|
|
1798
|
-
|
|
1799
|
-
return ((e = (s = this.Zh).autoscaleInfo) == null ? void 0 : e.call(s, t, i)) ?? null;
|
|
1774
|
+
return this.Zh.autoscaleInfo?.(t, i) ?? null;
|
|
1800
1775
|
}
|
|
1801
1776
|
}
|
|
1802
1777
|
function Dt(h, t, i, s) {
|
|
1803
|
-
h.forEach((e) => {
|
|
1804
|
-
t(e).forEach((n) => {
|
|
1778
|
+
h.forEach(((e) => {
|
|
1779
|
+
t(e).forEach(((n) => {
|
|
1805
1780
|
n.Yh() === i && s.push(n);
|
|
1806
|
-
});
|
|
1807
|
-
});
|
|
1781
|
+
}));
|
|
1782
|
+
}));
|
|
1808
1783
|
}
|
|
1809
1784
|
function Kt(h) {
|
|
1810
1785
|
return h.Ys();
|
|
1811
1786
|
}
|
|
1812
|
-
function
|
|
1787
|
+
function Fe(h) {
|
|
1813
1788
|
return h.na();
|
|
1814
1789
|
}
|
|
1815
|
-
function
|
|
1790
|
+
function We(h) {
|
|
1816
1791
|
return h.ea();
|
|
1817
1792
|
}
|
|
1818
|
-
const
|
|
1819
|
-
class Tt extends
|
|
1793
|
+
const Be = ["Area", "Line", "Baseline"];
|
|
1794
|
+
class Tt extends xe {
|
|
1820
1795
|
constructor(t, i, s, e, n) {
|
|
1821
|
-
super(t), this.jt =
|
|
1822
|
-
const r = new
|
|
1823
|
-
if (this.gs = [r], this.ur = new xs(r, this, t),
|
|
1796
|
+
super(t), this.jt = Vt(), this._r = new ge(this), this.ha = [], this.aa = new fe(this), this.la = null, this.oa = null, this._a = null, this.ua = [], this.ca = new Se(), this.da = /* @__PURE__ */ new Map(), this.fa = null, this.Ps = s, this.pa = i;
|
|
1797
|
+
const r = new ve(this);
|
|
1798
|
+
if (this.gs = [r], this.ur = new xs(r, this, t), Be.includes(this.pa) && (this.la = new pe(this)), this.va(), this.$h = e(this, this.Qt(), n), this.pa === "Custom") {
|
|
1824
1799
|
const o = this.$h;
|
|
1825
1800
|
o.ma && this.wa(o.ma);
|
|
1826
1801
|
}
|
|
@@ -1850,7 +1825,7 @@ class Tt extends Se {
|
|
|
1850
1825
|
return { Be: !1, gt: l, ri: s.Ji(l, n.Wt), Ue: s.Ma(l), $e: s.ba(l, n.Wt), R: a.th, Ei: u, js: o };
|
|
1851
1826
|
}
|
|
1852
1827
|
ga() {
|
|
1853
|
-
return this.oa !== null || (this.oa = new
|
|
1828
|
+
return this.oa !== null || (this.oa = new Pe(this)), this.oa;
|
|
1854
1829
|
}
|
|
1855
1830
|
N() {
|
|
1856
1831
|
return this.Ps;
|
|
@@ -1859,7 +1834,7 @@ class Tt extends Se {
|
|
|
1859
1834
|
const i = this.Qt(), { priceScaleId: s, visible: e, priceFormat: n } = t;
|
|
1860
1835
|
s !== void 0 && s !== this.Ps.priceScaleId && i.Sa(this, s), e !== void 0 && e !== this.Ps.visible && i.xa();
|
|
1861
1836
|
const r = t.conflationThresholdFactor !== void 0;
|
|
1862
|
-
|
|
1837
|
+
R(this.Ps, t), r && (this.da.clear(), this.Qt().dr()), n !== void 0 && (this.va(), i.Ca()), i.ya(this), i.ka(), this.$h.kt("options");
|
|
1863
1838
|
}
|
|
1864
1839
|
ht(t, i) {
|
|
1865
1840
|
this.jt.ht(t), this.da.clear();
|
|
@@ -1869,7 +1844,7 @@ class Tt extends Se {
|
|
|
1869
1844
|
this.Qt().Ra(e), this.Qt().ya(this), this.Qt().ka(), this.Qt().dr();
|
|
1870
1845
|
}
|
|
1871
1846
|
Da(t) {
|
|
1872
|
-
const i = new
|
|
1847
|
+
const i = new _e(this, t);
|
|
1873
1848
|
return this.ha.push(i), this.Qt().ya(this), i;
|
|
1874
1849
|
}
|
|
1875
1850
|
Ia(t) {
|
|
@@ -1908,7 +1883,7 @@ class Tt extends Se {
|
|
|
1908
1883
|
const s = this.pa === "Custom", e = s && this.fa || void 0, n = s && this.$h.Oa ? (l) => {
|
|
1909
1884
|
const a = l, u = this.$h.Oa(a);
|
|
1910
1885
|
return Array.isArray(u) ? u : [typeof u == "number" ? u : 0];
|
|
1911
|
-
} : void 0, r = this.ca.kr(this.jt.Dh(), t, i, e, s, n), o =
|
|
1886
|
+
} : void 0, r = this.ca.kr(this.jt.Dh(), t, i, e, s, n), o = Vt();
|
|
1912
1887
|
o.ht(r), this.da.set(i, o);
|
|
1913
1888
|
}
|
|
1914
1889
|
Na() {
|
|
@@ -1926,51 +1901,51 @@ class Tt extends Se {
|
|
|
1926
1901
|
const i = [];
|
|
1927
1902
|
Dt(this.ua, Kt, "top", i);
|
|
1928
1903
|
const s = this.la;
|
|
1929
|
-
return s !== null && s.It() && (this._a === null && s.Re() && (this._a = setTimeout(() => {
|
|
1904
|
+
return s !== null && s.It() && (this._a === null && s.Re() && (this._a = setTimeout((() => {
|
|
1930
1905
|
this._a = null, this.Qt().Ua();
|
|
1931
|
-
}, 0)), s.Te(), i.unshift(s)), i;
|
|
1906
|
+
}), 0)), s.Te(), i.unshift(s)), i;
|
|
1932
1907
|
}
|
|
1933
1908
|
Ys() {
|
|
1934
1909
|
const t = [];
|
|
1935
1910
|
this.$a() || t.push(this.aa), t.push(this.$h, this._r);
|
|
1936
|
-
const i = this.ha.map((s) => s.pr());
|
|
1911
|
+
const i = this.ha.map(((s) => s.pr()));
|
|
1937
1912
|
return t.push(...i), Dt(this.ua, Kt, "normal", t), t;
|
|
1938
1913
|
}
|
|
1939
1914
|
qa() {
|
|
1940
1915
|
return this.ja(Kt, "bottom");
|
|
1941
1916
|
}
|
|
1942
1917
|
Ya(t) {
|
|
1943
|
-
return this.ja(
|
|
1918
|
+
return this.ja(Fe, t);
|
|
1944
1919
|
}
|
|
1945
1920
|
Ka(t) {
|
|
1946
|
-
return this.ja(
|
|
1921
|
+
return this.ja(We, t);
|
|
1947
1922
|
}
|
|
1948
1923
|
Za(t, i) {
|
|
1949
|
-
return this.ua.map((s) => s.Qn(t, i)).filter((s) => s !== null);
|
|
1924
|
+
return this.ua.map(((s) => s.Qn(t, i))).filter(((s) => s !== null));
|
|
1950
1925
|
}
|
|
1951
1926
|
ds() {
|
|
1952
|
-
return [this.ur, ...this.ha.map((t) => t.vr())];
|
|
1927
|
+
return [this.ur, ...this.ha.map(((t) => t.vr()))];
|
|
1953
1928
|
}
|
|
1954
1929
|
Ks(t, i) {
|
|
1955
1930
|
if (i !== this.hs && !this.$a()) return [];
|
|
1956
1931
|
const s = [...this.gs];
|
|
1957
1932
|
for (const e of this.ha) s.push(e.mr());
|
|
1958
|
-
return this.ua.forEach((e) => {
|
|
1933
|
+
return this.ua.forEach(((e) => {
|
|
1959
1934
|
s.push(...e.Ks());
|
|
1960
|
-
}), s;
|
|
1935
|
+
})), s;
|
|
1961
1936
|
}
|
|
1962
1937
|
fs() {
|
|
1963
1938
|
const t = [];
|
|
1964
|
-
return this.ua.forEach((i) => {
|
|
1939
|
+
return this.ua.forEach(((i) => {
|
|
1965
1940
|
t.push(...i.fs());
|
|
1966
|
-
}), t;
|
|
1941
|
+
})), t;
|
|
1967
1942
|
}
|
|
1968
1943
|
ra(t, i) {
|
|
1969
1944
|
if (this.Ps.autoscaleInfoProvider !== void 0) {
|
|
1970
|
-
const s = this.Ps.autoscaleInfoProvider(() => {
|
|
1945
|
+
const s = this.Ps.autoscaleInfoProvider((() => {
|
|
1971
1946
|
const e = this.Ga(t, i);
|
|
1972
1947
|
return e === null ? null : e.tr();
|
|
1973
|
-
});
|
|
1948
|
+
}));
|
|
1974
1949
|
return Ct.ir(s);
|
|
1975
1950
|
}
|
|
1976
1951
|
return this.Ga(t, i);
|
|
@@ -1983,11 +1958,10 @@ class Tt extends Se {
|
|
|
1983
1958
|
return this.Ja;
|
|
1984
1959
|
}
|
|
1985
1960
|
Ws() {
|
|
1986
|
-
var t;
|
|
1987
1961
|
this.$h.kt();
|
|
1988
|
-
for (const
|
|
1989
|
-
for (const
|
|
1990
|
-
this._r.kt(), this.aa.kt(),
|
|
1962
|
+
for (const t of this.gs) t.kt();
|
|
1963
|
+
for (const t of this.ha) t.kt();
|
|
1964
|
+
this._r.kt(), this.aa.kt(), this.la?.kt(), this.ua.forEach(((t) => t.Ws()));
|
|
1991
1965
|
}
|
|
1992
1966
|
Ft() {
|
|
1993
1967
|
return p(super.Ft());
|
|
@@ -2004,10 +1978,10 @@ class Tt extends Se {
|
|
|
2004
1978
|
return this.Ps.visible;
|
|
2005
1979
|
}
|
|
2006
1980
|
nl(t) {
|
|
2007
|
-
this.ua.push(new
|
|
1981
|
+
this.ua.push(new Ie(t, this));
|
|
2008
1982
|
}
|
|
2009
1983
|
el(t) {
|
|
2010
|
-
this.ua = this.ua.filter((i) => i.Gh() !== t);
|
|
1984
|
+
this.ua = this.ua.filter(((i) => i.Gh() !== t));
|
|
2011
1985
|
}
|
|
2012
1986
|
rl() {
|
|
2013
1987
|
if (this.pa === "Custom") return (t) => this.$h.Oa(t);
|
|
@@ -2024,19 +1998,19 @@ class Tt extends Se {
|
|
|
2024
1998
|
Ga(t, i) {
|
|
2025
1999
|
if (!ut(t) || !ut(i) || this.jt.Gi()) return null;
|
|
2026
2000
|
const s = this.pa === "Line" || this.pa === "Area" || this.pa === "Baseline" || this.pa === "Histogram" ? [3] : [2, 1], e = this.jt.Ih(t, i, s);
|
|
2027
|
-
let n = e !== null ? new
|
|
2001
|
+
let n = e !== null ? new N(e.Fh, e.Wh) : null, r = null;
|
|
2028
2002
|
if (this.wh() === "Histogram") {
|
|
2029
|
-
const o = this.Ps.base, l = new
|
|
2003
|
+
const o = this.Ps.base, l = new N(o, o);
|
|
2030
2004
|
n = n !== null ? n.Sn(l) : l;
|
|
2031
2005
|
}
|
|
2032
|
-
return this.ua.forEach((o) => {
|
|
2006
|
+
return this.ua.forEach(((o) => {
|
|
2033
2007
|
const l = o.ra(t, i);
|
|
2034
|
-
if (l
|
|
2035
|
-
const a = new
|
|
2008
|
+
if (l?.priceRange) {
|
|
2009
|
+
const a = new N(l.priceRange.minValue, l.priceRange.maxValue);
|
|
2036
2010
|
n = n !== null ? n.Sn(a) : a;
|
|
2037
2011
|
}
|
|
2038
|
-
l
|
|
2039
|
-
}), new Ct(n, r);
|
|
2012
|
+
l?.margins && (r = l.margins);
|
|
2013
|
+
})), new Ct(n, r);
|
|
2040
2014
|
}
|
|
2041
2015
|
Qa() {
|
|
2042
2016
|
switch (this.pa) {
|
|
@@ -2086,7 +2060,7 @@ class Tt extends Se {
|
|
|
2086
2060
|
break;
|
|
2087
2061
|
}
|
|
2088
2062
|
case "volume":
|
|
2089
|
-
this.Ja = new
|
|
2063
|
+
this.Ja = new le(this.Ps.priceFormat.precision);
|
|
2090
2064
|
break;
|
|
2091
2065
|
case "percent":
|
|
2092
2066
|
this.Ja = new Ss(this.Ps.priceFormat.precision);
|
|
@@ -2115,10 +2089,10 @@ class Tt extends Se {
|
|
|
2115
2089
|
let s;
|
|
2116
2090
|
if (this.pa === "Custom" && this.fa !== null) {
|
|
2117
2091
|
const n = this.rl();
|
|
2118
|
-
if (!n) throw new Error(
|
|
2119
|
-
s = this.ca.Mr(i, t, this.fa, !0, (r) => n(r));
|
|
2092
|
+
if (!n) throw new Error(be);
|
|
2093
|
+
s = this.ca.Mr(i, t, this.fa, !0, ((r) => n(r)));
|
|
2120
2094
|
} else s = this.ca.Mr(i, t);
|
|
2121
|
-
const e =
|
|
2095
|
+
const e = Vt();
|
|
2122
2096
|
return e.ht(s), e;
|
|
2123
2097
|
}
|
|
2124
2098
|
Fa(t) {
|
|
@@ -2126,17 +2100,16 @@ class Tt extends Se {
|
|
|
2126
2100
|
this.da.set(t, i);
|
|
2127
2101
|
}
|
|
2128
2102
|
Pa(t) {
|
|
2129
|
-
var s;
|
|
2130
2103
|
if (this.pa === "Custom" && (this.fa === null || !this.rl())) return;
|
|
2131
2104
|
this.da.clear();
|
|
2132
2105
|
const i = this.Qt().Et().vl();
|
|
2133
|
-
for (const
|
|
2134
|
-
const
|
|
2135
|
-
this.ml(
|
|
2136
|
-
},
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
}, { Ml: t }) : Promise.resolve().then(() =>
|
|
2106
|
+
for (const s of i) {
|
|
2107
|
+
const e = () => {
|
|
2108
|
+
this.ml(s);
|
|
2109
|
+
}, n = typeof window == "object" && window || typeof self == "object" && self;
|
|
2110
|
+
n?.gl?.wl ? n.gl.wl((() => {
|
|
2111
|
+
e();
|
|
2112
|
+
}), { Ml: t }) : Promise.resolve().then((() => e()));
|
|
2140
2113
|
}
|
|
2141
2114
|
}
|
|
2142
2115
|
ml(t) {
|
|
@@ -2145,8 +2118,8 @@ class Tt extends Se {
|
|
|
2145
2118
|
this.da.set(t, i);
|
|
2146
2119
|
}
|
|
2147
2120
|
}
|
|
2148
|
-
const
|
|
2149
|
-
class
|
|
2121
|
+
const je = [3], Ve = [0, 1, 2, 3];
|
|
2122
|
+
class De {
|
|
2150
2123
|
constructor(t) {
|
|
2151
2124
|
this.Ps = t;
|
|
2152
2125
|
}
|
|
@@ -2155,17 +2128,17 @@ class je {
|
|
|
2155
2128
|
if (this.Ps.mode === 0) return e;
|
|
2156
2129
|
const n = s.Rs(), r = n.Lt();
|
|
2157
2130
|
if (r === null) return e;
|
|
2158
|
-
const o = n.Nt(t, r), l = s.Sl().filter((u) => u instanceof Tt).reduce((u, c) => {
|
|
2131
|
+
const o = n.Nt(t, r), l = s.Sl().filter(((u) => u instanceof Tt)).reduce(((u, c) => {
|
|
2159
2132
|
if (s.Zn(c) || !c.It()) return u;
|
|
2160
|
-
const
|
|
2161
|
-
if (
|
|
2162
|
-
const m =
|
|
2133
|
+
const f = c.Ft(), d = c.qs();
|
|
2134
|
+
if (f.Gi() || !d.Ee(i)) return u;
|
|
2135
|
+
const m = d.ph(i);
|
|
2163
2136
|
if (m === null) return u;
|
|
2164
|
-
const
|
|
2165
|
-
return u.concat(
|
|
2166
|
-
}, []);
|
|
2137
|
+
const w = D(c.Lt()), v = this.Ps.mode === 3 ? Ve : je;
|
|
2138
|
+
return u.concat(v.map(((g) => f.Nt(m.Wt[g], w.Wt))));
|
|
2139
|
+
}), []);
|
|
2167
2140
|
if (l.length === 0) return e;
|
|
2168
|
-
l.sort((u, c) => Math.abs(u - o) - Math.abs(c - o));
|
|
2141
|
+
l.sort(((u, c) => Math.abs(u - o) - Math.abs(c - o)));
|
|
2169
2142
|
const a = l[0];
|
|
2170
2143
|
return e = n.Ds(a, r), e;
|
|
2171
2144
|
}
|
|
@@ -2176,7 +2149,7 @@ function rt(h, t, i) {
|
|
|
2176
2149
|
function pt(h, t, i) {
|
|
2177
2150
|
return t - h <= i;
|
|
2178
2151
|
}
|
|
2179
|
-
class
|
|
2152
|
+
class Ke extends st {
|
|
2180
2153
|
constructor() {
|
|
2181
2154
|
super(...arguments), this.jt = null;
|
|
2182
2155
|
}
|
|
@@ -2186,12 +2159,12 @@ class De extends st {
|
|
|
2186
2159
|
et({ context: t, bitmapSize: i, horizontalPixelRatio: s, verticalPixelRatio: e }) {
|
|
2187
2160
|
if (this.jt === null) return;
|
|
2188
2161
|
const n = Math.max(1, Math.floor(s));
|
|
2189
|
-
t.lineWidth = n, function(r, o) {
|
|
2162
|
+
t.lineWidth = n, (function(r, o) {
|
|
2190
2163
|
r.save(), r.lineWidth % 2 && r.translate(0.5, 0.5), o(), r.restore();
|
|
2191
|
-
}(t, () => {
|
|
2164
|
+
})(t, (() => {
|
|
2192
2165
|
const r = p(this.jt);
|
|
2193
2166
|
if (r.xl) {
|
|
2194
|
-
t.strokeStyle = r.Cl,
|
|
2167
|
+
t.strokeStyle = r.Cl, J(t, r.yl), t.beginPath();
|
|
2195
2168
|
for (const o of r.kl) {
|
|
2196
2169
|
const l = Math.round(o.Pl * s);
|
|
2197
2170
|
t.moveTo(l, -n), t.lineTo(l, i.height + n);
|
|
@@ -2199,34 +2172,34 @@ class De extends st {
|
|
|
2199
2172
|
t.stroke();
|
|
2200
2173
|
}
|
|
2201
2174
|
if (r.Tl) {
|
|
2202
|
-
t.strokeStyle = r.Rl,
|
|
2175
|
+
t.strokeStyle = r.Rl, J(t, r.Dl), t.beginPath();
|
|
2203
2176
|
for (const o of r.Il) {
|
|
2204
2177
|
const l = Math.round(o.Pl * e);
|
|
2205
2178
|
t.moveTo(-n, l), t.lineTo(i.width + n, l);
|
|
2206
2179
|
}
|
|
2207
2180
|
t.stroke();
|
|
2208
2181
|
}
|
|
2209
|
-
});
|
|
2182
|
+
}));
|
|
2210
2183
|
}
|
|
2211
2184
|
}
|
|
2212
|
-
class
|
|
2185
|
+
class Oe {
|
|
2213
2186
|
constructor(t) {
|
|
2214
|
-
this.Xt = new
|
|
2187
|
+
this.Xt = new Ke(), this.xt = !0, this.yt = t;
|
|
2215
2188
|
}
|
|
2216
2189
|
kt() {
|
|
2217
2190
|
this.xt = !0;
|
|
2218
2191
|
}
|
|
2219
2192
|
Tt() {
|
|
2220
2193
|
if (this.xt) {
|
|
2221
|
-
const t = this.yt.Qt().N().grid, i = { Tl: t.horzLines.visible, xl: t.vertLines.visible, Rl: t.horzLines.color, Cl: t.vertLines.color, Dl: t.horzLines.style, yl: t.vertLines.style, Il: this.yt.Rs().Vl(), kl: (this.yt.Qt().Et().Vl() || []).map((s) => ({ Pl: s.coord })) };
|
|
2194
|
+
const t = this.yt.Qt().N().grid, i = { Tl: t.horzLines.visible, xl: t.vertLines.visible, Rl: t.horzLines.color, Cl: t.vertLines.color, Dl: t.horzLines.style, yl: t.vertLines.style, Il: this.yt.Rs().Vl(), kl: (this.yt.Qt().Et().Vl() || []).map(((s) => ({ Pl: s.coord }))) };
|
|
2222
2195
|
this.Xt.ht(i), this.xt = !1;
|
|
2223
2196
|
}
|
|
2224
2197
|
return this.Xt;
|
|
2225
2198
|
}
|
|
2226
2199
|
}
|
|
2227
|
-
class
|
|
2200
|
+
class Ae {
|
|
2228
2201
|
constructor(t) {
|
|
2229
|
-
this.$h = new
|
|
2202
|
+
this.$h = new Oe(t);
|
|
2230
2203
|
}
|
|
2231
2204
|
pr() {
|
|
2232
2205
|
return this.$h;
|
|
@@ -2237,9 +2210,9 @@ function H(h, t) {
|
|
|
2237
2210
|
const i = 100 * (h - t) / t;
|
|
2238
2211
|
return t < 0 ? -i : i;
|
|
2239
2212
|
}
|
|
2240
|
-
function
|
|
2213
|
+
function Ye(h, t) {
|
|
2241
2214
|
const i = H(h.Ze(), t), s = H(h.Ge(), t);
|
|
2242
|
-
return new
|
|
2215
|
+
return new N(i, s);
|
|
2243
2216
|
}
|
|
2244
2217
|
function ot(h, t) {
|
|
2245
2218
|
const i = 100 * (h - t) / t + 100;
|
|
@@ -2247,7 +2220,7 @@ function ot(h, t) {
|
|
|
2247
2220
|
}
|
|
2248
2221
|
function Je(h, t) {
|
|
2249
2222
|
const i = ot(h.Ze(), t), s = ot(h.Ge(), t);
|
|
2250
|
-
return new
|
|
2223
|
+
return new N(i, s);
|
|
2251
2224
|
}
|
|
2252
2225
|
function Et(h, t) {
|
|
2253
2226
|
const i = Math.abs(h);
|
|
@@ -2264,12 +2237,12 @@ function lt(h, t) {
|
|
|
2264
2237
|
function nt(h, t) {
|
|
2265
2238
|
if (h === null) return null;
|
|
2266
2239
|
const i = Et(h.Ze(), t), s = Et(h.Ge(), t);
|
|
2267
|
-
return new
|
|
2240
|
+
return new N(i, s);
|
|
2268
2241
|
}
|
|
2269
2242
|
function Q(h, t) {
|
|
2270
2243
|
if (h === null) return null;
|
|
2271
2244
|
const i = lt(h.Ze(), t), s = lt(h.Ge(), t);
|
|
2272
|
-
return new
|
|
2245
|
+
return new N(i, s);
|
|
2273
2246
|
}
|
|
2274
2247
|
function At(h) {
|
|
2275
2248
|
if (h === null) return Ot;
|
|
@@ -2278,14 +2251,14 @@ function At(h) {
|
|
|
2278
2251
|
const i = Math.ceil(Math.abs(Math.log10(t))), s = Ot.Bl + i;
|
|
2279
2252
|
return { Bl: s, El: 1 / Math.pow(10, s) };
|
|
2280
2253
|
}
|
|
2281
|
-
class
|
|
2254
|
+
class Yt {
|
|
2282
2255
|
constructor(t, i) {
|
|
2283
|
-
if (this.Al = t, this.Ll = i, function(s) {
|
|
2256
|
+
if (this.Al = t, this.Ll = i, (function(s) {
|
|
2284
2257
|
if (s < 0) return !1;
|
|
2285
2258
|
if (s > 1e18) return !0;
|
|
2286
2259
|
for (let e = s; e > 1; e /= 10) if (e % 10 != 0) return !1;
|
|
2287
2260
|
return !0;
|
|
2288
|
-
}(this.Al)) this.zl = [2, 2.5, 2];
|
|
2261
|
+
})(this.Al)) this.zl = [2, 2.5, 2];
|
|
2289
2262
|
else {
|
|
2290
2263
|
this.zl = [];
|
|
2291
2264
|
for (let s = this.Al; s !== 1; ) {
|
|
@@ -2302,8 +2275,8 @@ class Jt {
|
|
|
2302
2275
|
const e = this.Al === 0 ? 0 : 1 / this.Al;
|
|
2303
2276
|
let n = Math.pow(10, Math.max(0, Math.ceil(Math.log10(t - i)))), r = 0, o = this.Ll[0];
|
|
2304
2277
|
for (; ; ) {
|
|
2305
|
-
const c = pt(n, e, 1e-14) && n > e + 1e-14,
|
|
2306
|
-
if (!(c &&
|
|
2278
|
+
const c = pt(n, e, 1e-14) && n > e + 1e-14, f = pt(n, s * o, 1e-14), d = pt(n, 1, 1e-14);
|
|
2279
|
+
if (!(c && f && d)) break;
|
|
2307
2280
|
n /= o, o = this.Ll[++r % this.Ll.length];
|
|
2308
2281
|
}
|
|
2309
2282
|
if (n <= e + 1e-14 && (n = e), n = Math.max(1, n), this.zl.length > 0 && (l = n, a = 1, u = 1e-14, Math.abs(l - a) < u)) for (r = 0, o = this.zl[0]; pt(n, s * o, 1e-14) && n > e + 1e-14; ) n /= o, o = this.zl[++r % this.zl.length];
|
|
@@ -2311,19 +2284,19 @@ class Jt {
|
|
|
2311
2284
|
return n;
|
|
2312
2285
|
}
|
|
2313
2286
|
}
|
|
2314
|
-
class
|
|
2287
|
+
class ki {
|
|
2315
2288
|
constructor(t, i, s, e) {
|
|
2316
2289
|
this.Nl = [], this.Ki = t, this.Al = i, this.Fl = s, this.Wl = e;
|
|
2317
2290
|
}
|
|
2318
2291
|
Ol(t, i) {
|
|
2319
2292
|
if (t < i) throw new Error("high < low");
|
|
2320
|
-
const s = this.Ki.$t(), e = (t - i) * this.Hl() / s, n = new
|
|
2321
|
-
return l.push(n.Ol(t, i, e), r.Ol(t, i, e), o.Ol(t, i, e)), function(a) {
|
|
2293
|
+
const s = this.Ki.$t(), e = (t - i) * this.Hl() / s, n = new Yt(this.Al, [2, 2.5, 2]), r = new Yt(this.Al, [2, 2, 2.5]), o = new Yt(this.Al, [2.5, 2, 2]), l = [];
|
|
2294
|
+
return l.push(n.Ol(t, i, e), r.Ol(t, i, e), o.Ol(t, i, e)), (function(a) {
|
|
2322
2295
|
if (a.length < 1) throw Error("array is empty");
|
|
2323
2296
|
let u = a[0];
|
|
2324
2297
|
for (let c = 1; c < a.length; ++c) a[c] < u && (u = a[c]);
|
|
2325
2298
|
return u;
|
|
2326
|
-
}(l);
|
|
2299
|
+
})(l);
|
|
2327
2300
|
}
|
|
2328
2301
|
Ul() {
|
|
2329
2302
|
const t = this.Ki, i = t.Lt();
|
|
@@ -2335,8 +2308,8 @@ class Ni {
|
|
|
2335
2308
|
const m = this.Ki.Kl();
|
|
2336
2309
|
this.Zl(i, c, o, l, m, 2 * m);
|
|
2337
2310
|
}
|
|
2338
|
-
const
|
|
2339
|
-
for (let m = 0; m < this.Nl.length; m++) this.Nl[m].Jl =
|
|
2311
|
+
const f = this.Nl.map(((m) => m.Gl)), d = this.Ki.Xl(f);
|
|
2312
|
+
for (let m = 0; m < this.Nl.length; m++) this.Nl[m].Jl = d[m];
|
|
2340
2313
|
}
|
|
2341
2314
|
Vl() {
|
|
2342
2315
|
return this.Nl;
|
|
@@ -2352,20 +2325,20 @@ class Ni {
|
|
|
2352
2325
|
let a = s % i;
|
|
2353
2326
|
a += a < 0 ? i : 0;
|
|
2354
2327
|
const u = s >= e ? 1 : -1;
|
|
2355
|
-
let c = null,
|
|
2356
|
-
for (let
|
|
2357
|
-
const m = this.Wl(
|
|
2358
|
-
c !== null && Math.abs(m - c) < this.Hl() || m < n || m > r || (
|
|
2328
|
+
let c = null, f = 0;
|
|
2329
|
+
for (let d = s - a; d > e; d -= i) {
|
|
2330
|
+
const m = this.Wl(d, t, !0);
|
|
2331
|
+
c !== null && Math.abs(m - c) < this.Hl() || m < n || m > r || (f < o.length ? (o[f].Pl = m, o[f].Jl = l.Ql(d), o[f].Gl = d) : o.push({ Pl: m, Jl: l.Ql(d), Gl: d }), f++, c = m, l.io() && (i = this.Ol(d * u, e)));
|
|
2359
2332
|
}
|
|
2360
|
-
o.length =
|
|
2333
|
+
o.length = f;
|
|
2361
2334
|
}
|
|
2362
2335
|
Zl(t, i, s, e, n, r) {
|
|
2363
2336
|
const o = this.Nl, l = this.so(t, s, n, r), a = this.so(t, e, -r, -n), u = this.Wl(0, t, !0) - this.Wl(i, t, !0);
|
|
2364
2337
|
o.length > 0 && o[0].Pl - l.Pl < u / 2 && o.shift(), o.length > 0 && a.Pl - o[o.length - 1].Pl < u / 2 && o.pop(), o.unshift(l), o.push(a);
|
|
2365
2338
|
}
|
|
2366
2339
|
so(t, i, s, e) {
|
|
2367
|
-
const n = (s + e) / 2, r = this.Fl(i + s, t), o = this.Fl(i + e, t), l = Math.min(r, o), a = Math.max(r, o), u = Math.max(0.1, this.Ol(a, l)), c = this.Fl(i + n, t),
|
|
2368
|
-
return { Jl: this.Ki.Ql(
|
|
2340
|
+
const n = (s + e) / 2, r = this.Fl(i + s, t), o = this.Fl(i + e, t), l = Math.min(r, o), a = Math.max(r, o), u = Math.max(0.1, this.Ol(a, l)), c = this.Fl(i + n, t), f = c - c % u, d = this.Wl(f, t, !0);
|
|
2341
|
+
return { Jl: this.Ki.Ql(f), Pl: d, Gl: f };
|
|
2369
2342
|
}
|
|
2370
2343
|
Yl(t, i, s) {
|
|
2371
2344
|
let e = D(this.Ki.er());
|
|
@@ -2373,16 +2346,16 @@ class Ni {
|
|
|
2373
2346
|
}
|
|
2374
2347
|
}
|
|
2375
2348
|
function ks(h) {
|
|
2376
|
-
return h.slice().sort((t, i) => p(t._s()) - p(i._s()));
|
|
2349
|
+
return h.slice().sort(((t, i) => p(t._s()) - p(i._s())));
|
|
2377
2350
|
}
|
|
2378
|
-
var
|
|
2351
|
+
var Li;
|
|
2379
2352
|
(function(h) {
|
|
2380
2353
|
h[h.Normal = 0] = "Normal", h[h.Logarithmic = 1] = "Logarithmic", h[h.Percentage = 2] = "Percentage", h[h.IndexedTo100 = 3] = "IndexedTo100";
|
|
2381
|
-
})(
|
|
2382
|
-
const
|
|
2383
|
-
class
|
|
2354
|
+
})(Li || (Li = {}));
|
|
2355
|
+
const zi = new Ss(), Ti = new zt(100, 1);
|
|
2356
|
+
class $e {
|
|
2384
2357
|
constructor(t, i, s, e, n) {
|
|
2385
|
-
this.eo = 0, this.ro = null, this.sr = null, this.ho = null, this.ao = { lo: !1, oo: null }, this._o = !1, this.uo = 0, this.co = 0, this.do = new
|
|
2358
|
+
this.eo = 0, this.ro = null, this.sr = null, this.ho = null, this.ao = { lo: !1, oo: null }, this._o = !1, this.uo = 0, this.co = 0, this.do = new S(), this.fo = new S(), this.po = [], this.vo = null, this.mo = null, this.wo = null, this.Mo = null, this.bo = null, this.Ja = Ti, this.So = At(null), this.xo = t, this.Ps = i, this.Co = s, this.yo = e, this.ko = n, this.Po = new ki(this, 100, this.To.bind(this), this.Ro.bind(this));
|
|
2386
2359
|
}
|
|
2387
2360
|
ol() {
|
|
2388
2361
|
return this.xo;
|
|
@@ -2391,8 +2364,8 @@ class Ye {
|
|
|
2391
2364
|
return this.Ps;
|
|
2392
2365
|
}
|
|
2393
2366
|
cr(t) {
|
|
2394
|
-
if (
|
|
2395
|
-
const i =
|
|
2367
|
+
if (R(this.Ps, t), this._l(), t.mode !== void 0 && this.Do({ ae: t.mode }), t.scaleMargins !== void 0) {
|
|
2368
|
+
const i = T(t.scaleMargins.top), s = T(t.scaleMargins.bottom);
|
|
2396
2369
|
if (i < 0 || i > 1) throw new Error(`Invalid top margin - expect value between 0 and 1, given=${i}`);
|
|
2397
2370
|
if (s < 0 || s > 1) throw new Error(`Invalid bottom margin - expect value between 0 and 1, given=${s}`);
|
|
2398
2371
|
if (i + s > 1) throw new Error(`Invalid margins - sum of margins must be less than 1, given=${i + s}`);
|
|
@@ -2423,11 +2396,11 @@ class Ye {
|
|
|
2423
2396
|
Do(t) {
|
|
2424
2397
|
const i = this.ae();
|
|
2425
2398
|
let s = null;
|
|
2426
|
-
t.ln !== void 0 && (this.Ps.autoScale = t.ln), t.ae !== void 0 && (this.Ps.mode = t.ae, t.ae !== 2 && t.ae !== 3 || (this.Ps.autoScale = !0), this.ao.lo = !1), i.ae === 1 && t.ae !== i.ae && (function(n, r) {
|
|
2399
|
+
t.ln !== void 0 && (this.Ps.autoScale = t.ln), t.ae !== void 0 && (this.Ps.mode = t.ae, t.ae !== 2 && t.ae !== 3 || (this.Ps.autoScale = !0), this.ao.lo = !1), i.ae === 1 && t.ae !== i.ae && ((function(n, r) {
|
|
2427
2400
|
if (n === null) return !1;
|
|
2428
2401
|
const o = lt(n.Ze(), r), l = lt(n.Ge(), r);
|
|
2429
2402
|
return isFinite(o) && isFinite(l);
|
|
2430
|
-
}(this.sr, this.So) ? (s = Q(this.sr, this.So), s !== null && this.Lo(s)) : this.Ps.autoScale = !0), t.ae === 1 && t.ae !== i.ae && (s = nt(this.sr, this.So), s !== null && this.Lo(s));
|
|
2403
|
+
})(this.sr, this.So) ? (s = Q(this.sr, this.So), s !== null && this.Lo(s)) : this.Ps.autoScale = !0), t.ae === 1 && t.ae !== i.ae && (s = nt(this.sr, this.So), s !== null && this.Lo(s));
|
|
2431
2404
|
const e = i.ae !== this.Ps.mode;
|
|
2432
2405
|
e && (i.ae === 2 || this.He()) && this._l(), e && (i.ae === 3 || this.Eo()) && this._l(), t.Ao !== void 0 && i.Ao !== t.Ao && (this.Ps.invertScale = t.Ao, this.zo()), this.fo.p(i, this.ae());
|
|
2433
2406
|
}
|
|
@@ -2469,25 +2442,25 @@ class Ye {
|
|
|
2469
2442
|
}
|
|
2470
2443
|
Yo(t, i, s) {
|
|
2471
2444
|
this.Uo();
|
|
2472
|
-
const e = this.Ho(), n = p(this.er()), r = n.Ze(), o = n.Ge(), l = this.Fo() - 1, a = this.Ao(), u = l / (o - r), c = s === void 0 ? 0 : s.from,
|
|
2473
|
-
for (let m = c; m <
|
|
2474
|
-
const
|
|
2475
|
-
if (isNaN(
|
|
2476
|
-
let
|
|
2477
|
-
|
|
2478
|
-
const
|
|
2479
|
-
|
|
2445
|
+
const e = this.Ho(), n = p(this.er()), r = n.Ze(), o = n.Ge(), l = this.Fo() - 1, a = this.Ao(), u = l / (o - r), c = s === void 0 ? 0 : s.from, f = s === void 0 ? t.length : s.to, d = this.Ko();
|
|
2446
|
+
for (let m = c; m < f; m++) {
|
|
2447
|
+
const w = t[m], v = w.gt;
|
|
2448
|
+
if (isNaN(v)) continue;
|
|
2449
|
+
let g = v;
|
|
2450
|
+
d !== null && (g = d(w.gt, i));
|
|
2451
|
+
const b = e + u * (g - r), M = a ? b : this.eo - 1 - b;
|
|
2452
|
+
w.ut = M;
|
|
2480
2453
|
}
|
|
2481
2454
|
}
|
|
2482
2455
|
Zo(t, i, s) {
|
|
2483
2456
|
this.Uo();
|
|
2484
|
-
const e = this.Ho(), n = p(this.er()), r = n.Ze(), o = n.Ge(), l = this.Fo() - 1, a = this.Ao(), u = l / (o - r), c = s === void 0 ? 0 : s.from,
|
|
2485
|
-
for (let m = c; m <
|
|
2486
|
-
const
|
|
2487
|
-
let
|
|
2488
|
-
|
|
2489
|
-
let y = e + u * (
|
|
2490
|
-
|
|
2457
|
+
const e = this.Ho(), n = p(this.er()), r = n.Ze(), o = n.Ge(), l = this.Fo() - 1, a = this.Ao(), u = l / (o - r), c = s === void 0 ? 0 : s.from, f = s === void 0 ? t.length : s.to, d = this.Ko();
|
|
2458
|
+
for (let m = c; m < f; m++) {
|
|
2459
|
+
const w = t[m];
|
|
2460
|
+
let v = w.Hr, g = w.Ur, b = w.$r, M = w.qr;
|
|
2461
|
+
d !== null && (v = d(w.Hr, i), g = d(w.Ur, i), b = d(w.$r, i), M = d(w.qr, i));
|
|
2462
|
+
let y = e + u * (v - r), x = a ? y : this.eo - 1 - y;
|
|
2463
|
+
w.Go = x, y = e + u * (g - r), x = a ? y : this.eo - 1 - y, w.Xo = x, y = e + u * (b - r), x = a ? y : this.eo - 1 - y, w.Jo = x, y = e + u * (M - r), x = a ? y : this.eo - 1 - y, w.Qo = x;
|
|
2491
2464
|
}
|
|
2492
2465
|
}
|
|
2493
2466
|
Ds(t, i) {
|
|
@@ -2496,11 +2469,11 @@ class Ye {
|
|
|
2496
2469
|
}
|
|
2497
2470
|
t_(t, i) {
|
|
2498
2471
|
let s = t;
|
|
2499
|
-
return this.He() ? s = function(e, n) {
|
|
2472
|
+
return this.He() ? s = (function(e, n) {
|
|
2500
2473
|
return n < 0 && (e = -e), e / 100 * n + n;
|
|
2501
|
-
}(s, i) : this.Eo() && (s = function(e, n) {
|
|
2474
|
+
})(s, i) : this.Eo() && (s = (function(e, n) {
|
|
2502
2475
|
return e -= 100, n < 0 && (e = -e), e / 100 * n + n;
|
|
2503
|
-
}(s, i)), s;
|
|
2476
|
+
})(s, i)), s;
|
|
2504
2477
|
}
|
|
2505
2478
|
Sl() {
|
|
2506
2479
|
return this.po;
|
|
@@ -2601,7 +2574,7 @@ class Ye {
|
|
|
2601
2574
|
return this.lr(t, p(this.vo).Xa());
|
|
2602
2575
|
}
|
|
2603
2576
|
ba(t, i) {
|
|
2604
|
-
return t = H(t, i), this.c_(t,
|
|
2577
|
+
return t = H(t, i), this.c_(t, zi);
|
|
2605
2578
|
}
|
|
2606
2579
|
p_() {
|
|
2607
2580
|
return this.po;
|
|
@@ -2610,7 +2583,7 @@ class Ye {
|
|
|
2610
2583
|
this.ao = { oo: t, lo: !1 };
|
|
2611
2584
|
}
|
|
2612
2585
|
Ws() {
|
|
2613
|
-
this.po.forEach((t) => t.Ws());
|
|
2586
|
+
this.po.forEach(((t) => t.Ws()));
|
|
2614
2587
|
}
|
|
2615
2588
|
jl() {
|
|
2616
2589
|
return this.Ps.ensureEdgeTickMarksVisible && this.Vo();
|
|
@@ -2624,7 +2597,7 @@ class Ye {
|
|
|
2624
2597
|
this.vo = null;
|
|
2625
2598
|
for (const s of this.po) s._s() < t && (t = s._s(), this.vo = s);
|
|
2626
2599
|
let i = 100;
|
|
2627
|
-
this.vo !== null && (i = Math.round(this.vo.qh())), this.Ja =
|
|
2600
|
+
this.vo !== null && (i = Math.round(this.vo.qh())), this.Ja = Ti, this.He() ? (this.Ja = zi, i = 100) : this.Eo() ? (this.Ja = new zt(100, 1), i = 100) : this.vo !== null && (this.Ja = this.vo.Xa()), this.Po = new ki(this, i, this.To.bind(this), this.Ro.bind(this)), this.Po.Ul();
|
|
2628
2601
|
}
|
|
2629
2602
|
s_() {
|
|
2630
2603
|
this.mo = null;
|
|
@@ -2683,21 +2656,21 @@ class Ye {
|
|
|
2683
2656
|
c = nt(c, this.So);
|
|
2684
2657
|
break;
|
|
2685
2658
|
case 2:
|
|
2686
|
-
c =
|
|
2659
|
+
c = Ye(c, a.Wt);
|
|
2687
2660
|
break;
|
|
2688
2661
|
case 3:
|
|
2689
2662
|
c = Je(c, a.Wt);
|
|
2690
2663
|
}
|
|
2691
2664
|
if (i = i === null ? c : i.Sn(p(c)), u !== null) {
|
|
2692
|
-
const
|
|
2693
|
-
|
|
2665
|
+
const f = u.rr();
|
|
2666
|
+
f !== null && (e = Math.max(e, f.above), n = Math.max(n, f.below));
|
|
2694
2667
|
}
|
|
2695
2668
|
}
|
|
2696
2669
|
}
|
|
2697
2670
|
if (this.jl() && (e = Math.max(e, this.Kl()), n = Math.max(n, this.Kl())), e === this.uo && n === this.co || (this.uo = e, this.co = n, this.wo = null, this.Io()), i !== null) {
|
|
2698
2671
|
if (i.Ze() === i.Ge()) {
|
|
2699
2672
|
const l = 5 * this.m_();
|
|
2700
|
-
this.io() && (i = Q(i, this.So)), i = new
|
|
2673
|
+
this.io() && (i = Q(i, this.So)), i = new N(i.Ze() - l, i.Ge() + l), this.io() && (i = nt(i, this.So));
|
|
2701
2674
|
}
|
|
2702
2675
|
if (this.io()) {
|
|
2703
2676
|
const l = Q(i, this.So), a = At(l);
|
|
@@ -2707,7 +2680,7 @@ class Ye {
|
|
|
2707
2680
|
}
|
|
2708
2681
|
}
|
|
2709
2682
|
this.Lo(i);
|
|
2710
|
-
} else this.sr === null && (this.Lo(new
|
|
2683
|
+
} else this.sr === null && (this.Lo(new N(-0.5, 0.5)), this.So = At(null));
|
|
2711
2684
|
var r, o;
|
|
2712
2685
|
}
|
|
2713
2686
|
Ko() {
|
|
@@ -2734,12 +2707,12 @@ class Ye {
|
|
|
2734
2707
|
return this.M_(t, this.yo.tickmarksPercentageFormatter ?? (s ? (e) => e.map(s) : void 0), i);
|
|
2735
2708
|
}
|
|
2736
2709
|
}
|
|
2737
|
-
function
|
|
2710
|
+
function Ri(h) {
|
|
2738
2711
|
return h instanceof Tt;
|
|
2739
2712
|
}
|
|
2740
|
-
class
|
|
2713
|
+
class Ii {
|
|
2741
2714
|
constructor(t, i) {
|
|
2742
|
-
this.po = [], this.b_ = /* @__PURE__ */ new Map(), this.eo = 0, this.S_ = 0, this.x_ = 1, this.mo = null, this.C_ = !1, this.y_ = new
|
|
2715
|
+
this.po = [], this.b_ = /* @__PURE__ */ new Map(), this.eo = 0, this.S_ = 0, this.x_ = 1, this.mo = null, this.C_ = !1, this.y_ = new S(), this.ua = [], this.Jh = t, this.ns = i, this.k_ = new Ae(this);
|
|
2743
2716
|
const s = i.N();
|
|
2744
2717
|
this.P_ = this.T_("left", s.leftPriceScale), this.R_ = this.T_("right", s.rightPriceScale), this.P_.Oo().i(this.D_.bind(this, this.P_), this), this.R_.Oo().i(this.D_.bind(this, this.R_), this), this.I_(s);
|
|
2745
2718
|
}
|
|
@@ -2759,15 +2732,15 @@ class Ri {
|
|
|
2759
2732
|
case "right":
|
|
2760
2733
|
return this.R_;
|
|
2761
2734
|
}
|
|
2762
|
-
return this.b_.has(t) ?
|
|
2735
|
+
return this.b_.has(t) ? T(this.b_.get(t))[0].Ft() : null;
|
|
2763
2736
|
}
|
|
2764
2737
|
m() {
|
|
2765
|
-
this.Qt().B_().u(this), this.P_.Oo().u(this), this.R_.Oo().u(this), this.po.forEach((t) => {
|
|
2738
|
+
this.Qt().B_().u(this), this.P_.Oo().u(this), this.R_.Oo().u(this), this.po.forEach(((t) => {
|
|
2766
2739
|
t.m && t.m();
|
|
2767
|
-
}), this.ua = this.ua.filter((t) => {
|
|
2740
|
+
})), this.ua = this.ua.filter(((t) => {
|
|
2768
2741
|
const i = t.Gh();
|
|
2769
2742
|
return i.detached && i.detached(), !1;
|
|
2770
|
-
}), this.y_.p();
|
|
2743
|
+
})), this.y_.p();
|
|
2771
2744
|
}
|
|
2772
2745
|
E_() {
|
|
2773
2746
|
return this.x_;
|
|
@@ -2788,12 +2761,12 @@ class Ri {
|
|
|
2788
2761
|
this.S_ = t, this.z_();
|
|
2789
2762
|
}
|
|
2790
2763
|
No(t) {
|
|
2791
|
-
this.eo = t, this.P_.No(t), this.R_.No(t), this.po.forEach((i) => {
|
|
2764
|
+
this.eo = t, this.P_.No(t), this.R_.No(t), this.po.forEach(((i) => {
|
|
2792
2765
|
if (this.Zn(i)) {
|
|
2793
2766
|
const s = i.Ft();
|
|
2794
2767
|
s !== null && s.No(t);
|
|
2795
2768
|
}
|
|
2796
|
-
}), this.z_();
|
|
2769
|
+
})), this.z_();
|
|
2797
2770
|
}
|
|
2798
2771
|
O_(t) {
|
|
2799
2772
|
this.C_ = t;
|
|
@@ -2802,7 +2775,7 @@ class Ri {
|
|
|
2802
2775
|
return this.C_;
|
|
2803
2776
|
}
|
|
2804
2777
|
F_() {
|
|
2805
|
-
return this.po.filter(
|
|
2778
|
+
return this.po.filter(Ri);
|
|
2806
2779
|
}
|
|
2807
2780
|
Sl() {
|
|
2808
2781
|
return this.po;
|
|
@@ -2816,10 +2789,10 @@ class Ri {
|
|
|
2816
2789
|
}
|
|
2817
2790
|
n_(t, i) {
|
|
2818
2791
|
const s = this.po.indexOf(t);
|
|
2819
|
-
|
|
2792
|
+
C(s !== -1, "removeDataSource: invalid data source"), this.po.splice(s, 1), i || this.po.forEach(((r, o) => r.us(o)));
|
|
2820
2793
|
const e = p(t.Ft()).ol();
|
|
2821
2794
|
if (this.b_.has(e)) {
|
|
2822
|
-
const r =
|
|
2795
|
+
const r = T(this.b_.get(e)), o = r.indexOf(t);
|
|
2823
2796
|
o !== -1 && (r.splice(o, 1), r.length === 0 && this.b_.delete(e));
|
|
2824
2797
|
}
|
|
2825
2798
|
const n = t.Ft();
|
|
@@ -2853,9 +2826,9 @@ class Ri {
|
|
|
2853
2826
|
t.u_();
|
|
2854
2827
|
}
|
|
2855
2828
|
z_() {
|
|
2856
|
-
this.po.forEach((t) => {
|
|
2829
|
+
this.po.forEach(((t) => {
|
|
2857
2830
|
t.Ws();
|
|
2858
|
-
});
|
|
2831
|
+
}));
|
|
2859
2832
|
}
|
|
2860
2833
|
Rs() {
|
|
2861
2834
|
let t = null;
|
|
@@ -2876,9 +2849,9 @@ class Ri {
|
|
|
2876
2849
|
this.J_(this.P_), this.J_(this.R_);
|
|
2877
2850
|
}
|
|
2878
2851
|
iu() {
|
|
2879
|
-
this.H_(this.P_), this.H_(this.R_), this.po.forEach((t) => {
|
|
2852
|
+
this.H_(this.P_), this.H_(this.R_), this.po.forEach(((t) => {
|
|
2880
2853
|
this.Zn(t) && this.H_(t.Ft());
|
|
2881
|
-
}), this.z_(), this.ns.dr();
|
|
2854
|
+
})), this.z_(), this.ns.dr();
|
|
2882
2855
|
}
|
|
2883
2856
|
Dt() {
|
|
2884
2857
|
return this.mo === null && (this.mo = ks(this.po)), this.mo;
|
|
@@ -2886,12 +2859,12 @@ class Ri {
|
|
|
2886
2859
|
su(t, i) {
|
|
2887
2860
|
i = rt(i, 0, this.po.length - 1);
|
|
2888
2861
|
const s = this.po.indexOf(t);
|
|
2889
|
-
|
|
2862
|
+
C(s !== -1, "setSeriesOrder: invalid data source"), this.po.splice(s, 1), this.po.splice(i, 0, t), this.po.forEach(((e, n) => e.us(n))), this.mo = null;
|
|
2890
2863
|
for (const e of [this.P_, this.R_]) e.s_(), e._l();
|
|
2891
2864
|
this.ns.dr();
|
|
2892
2865
|
}
|
|
2893
2866
|
Vt() {
|
|
2894
|
-
return this.Dt().filter(
|
|
2867
|
+
return this.Dt().filter(Ri);
|
|
2895
2868
|
}
|
|
2896
2869
|
nu() {
|
|
2897
2870
|
return this.y_;
|
|
@@ -2900,16 +2873,16 @@ class Ri {
|
|
|
2900
2873
|
return this.k_;
|
|
2901
2874
|
}
|
|
2902
2875
|
nl(t) {
|
|
2903
|
-
this.ua.push(new
|
|
2876
|
+
this.ua.push(new Le(t));
|
|
2904
2877
|
}
|
|
2905
2878
|
el(t) {
|
|
2906
|
-
this.ua = this.ua.filter((i) => i.Gh() !== t), t.detached && t.detached(), this.ns.dr();
|
|
2879
|
+
this.ua = this.ua.filter(((i) => i.Gh() !== t)), t.detached && t.detached(), this.ns.dr();
|
|
2907
2880
|
}
|
|
2908
2881
|
ru() {
|
|
2909
2882
|
return this.ua;
|
|
2910
2883
|
}
|
|
2911
2884
|
Za(t, i) {
|
|
2912
|
-
return this.ua.map((s) => s.Qn(t, i)).filter((s) => s !== null);
|
|
2885
|
+
return this.ua.map(((s) => s.Qn(t, i))).filter(((s) => s !== null));
|
|
2913
2886
|
}
|
|
2914
2887
|
J_(t) {
|
|
2915
2888
|
const i = t.p_();
|
|
@@ -2931,14 +2904,14 @@ class Ri {
|
|
|
2931
2904
|
i.ae !== s.ae && this.J_(t);
|
|
2932
2905
|
}
|
|
2933
2906
|
T_(t, i) {
|
|
2934
|
-
const s = { visible: !0, autoScale: !0, ...
|
|
2907
|
+
const s = { visible: !0, autoScale: !0, ...W(i) }, e = new $e(t, s, this.ns.N().layout, this.ns.N().localization, this.ns.Xi());
|
|
2935
2908
|
return e.No(this.$t()), e;
|
|
2936
2909
|
}
|
|
2937
2910
|
}
|
|
2938
2911
|
function gt(h) {
|
|
2939
2912
|
return { hu: h.hu, au: { te: h.lu.externalId }, ou: h.lu.cursorStyle };
|
|
2940
2913
|
}
|
|
2941
|
-
function
|
|
2914
|
+
function Ue(h, t, i, s) {
|
|
2942
2915
|
for (const e of h) {
|
|
2943
2916
|
const n = e.Tt(s);
|
|
2944
2917
|
if (n !== null && n.Qn) {
|
|
@@ -2948,32 +2921,31 @@ function $e(h, t, i, s) {
|
|
|
2948
2921
|
}
|
|
2949
2922
|
return null;
|
|
2950
2923
|
}
|
|
2951
|
-
function
|
|
2924
|
+
function Xe(h) {
|
|
2952
2925
|
return h.Ys !== void 0;
|
|
2953
2926
|
}
|
|
2954
2927
|
function Ls(h, t, i) {
|
|
2955
|
-
const s = [h, ...h.Dt()], e = function(n, r, o) {
|
|
2956
|
-
var d;
|
|
2928
|
+
const s = [h, ...h.Dt()], e = (function(n, r, o) {
|
|
2957
2929
|
let l, a;
|
|
2958
2930
|
for (const f of n) {
|
|
2959
|
-
const
|
|
2960
|
-
for (const
|
|
2931
|
+
const d = f.Za?.(r, o) ?? [];
|
|
2932
|
+
for (const m of d) u = m.zOrder, c = l?.zOrder, (!c || u === "top" && c !== "top" || u === "normal" && c === "bottom") && (l = m, a = f);
|
|
2961
2933
|
}
|
|
2962
2934
|
var u, c;
|
|
2963
2935
|
return l && a ? { lu: l, hu: a } : null;
|
|
2964
|
-
}(s, t, i);
|
|
2965
|
-
if (
|
|
2936
|
+
})(s, t, i);
|
|
2937
|
+
if (e?.lu.zOrder === "top") return gt(e);
|
|
2966
2938
|
for (const n of s) {
|
|
2967
2939
|
if (e && e.hu === n && e.lu.zOrder !== "bottom" && !e.lu.isBackground) return gt(e);
|
|
2968
|
-
if (
|
|
2969
|
-
const r =
|
|
2940
|
+
if (Xe(n)) {
|
|
2941
|
+
const r = Ue(n.Ys(h), t, i, h);
|
|
2970
2942
|
if (r !== null) return { hu: n, _u: r._u, au: r.au };
|
|
2971
2943
|
}
|
|
2972
2944
|
if (e && e.hu === n && e.lu.zOrder !== "bottom" && e.lu.isBackground) return gt(e);
|
|
2973
2945
|
}
|
|
2974
|
-
return e
|
|
2946
|
+
return e?.lu ? gt(e) : null;
|
|
2975
2947
|
}
|
|
2976
|
-
class
|
|
2948
|
+
class Ge {
|
|
2977
2949
|
constructor(t, i, s = 50) {
|
|
2978
2950
|
this.Vn = 0, this.Bn = 1, this.En = 1, this.Ln = /* @__PURE__ */ new Map(), this.An = /* @__PURE__ */ new Map(), this.uu = t, this.cu = i, this.zn = s;
|
|
2979
2951
|
}
|
|
@@ -2982,7 +2954,7 @@ class Xe {
|
|
|
2982
2954
|
if (e !== void 0) return e.fu;
|
|
2983
2955
|
if (this.Vn === this.zn) {
|
|
2984
2956
|
const r = this.An.get(this.En);
|
|
2985
|
-
this.An.delete(this.En), this.Ln.delete(
|
|
2957
|
+
this.An.delete(this.En), this.Ln.delete(T(r)), this.En++, this.Vn--;
|
|
2986
2958
|
}
|
|
2987
2959
|
const n = this.uu(t);
|
|
2988
2960
|
return this.Ln.set(s, { fu: n, Wn: this.Bn }), this.An.set(this.Bn, s), this.Vn++, this.Bn++, n;
|
|
@@ -2990,7 +2962,7 @@ class Xe {
|
|
|
2990
2962
|
}
|
|
2991
2963
|
class at {
|
|
2992
2964
|
constructor(t, i) {
|
|
2993
|
-
|
|
2965
|
+
C(t <= i, "right should be >= left"), this.pu = t, this.vu = i;
|
|
2994
2966
|
}
|
|
2995
2967
|
Aa() {
|
|
2996
2968
|
return this.pu;
|
|
@@ -3008,10 +2980,10 @@ class at {
|
|
|
3008
2980
|
return this.pu === t.Aa() && this.vu === t.bi();
|
|
3009
2981
|
}
|
|
3010
2982
|
}
|
|
3011
|
-
function
|
|
2983
|
+
function Fi(h, t) {
|
|
3012
2984
|
return h === null || t === null ? h === t : h.Ye(t);
|
|
3013
2985
|
}
|
|
3014
|
-
class
|
|
2986
|
+
class He {
|
|
3015
2987
|
constructor() {
|
|
3016
2988
|
this.wu = /* @__PURE__ */ new Map(), this.Ln = null, this.gu = !1;
|
|
3017
2989
|
}
|
|
@@ -3033,33 +3005,33 @@ class Ge {
|
|
|
3033
3005
|
Su(t) {
|
|
3034
3006
|
if (t === 0) return void this.wu.clear();
|
|
3035
3007
|
const i = [];
|
|
3036
|
-
this.wu.forEach((s, e) => {
|
|
3037
|
-
t <= s[0].index ? i.push(e) : s.splice(tt(s, t, (n) => n.index < t), 1 / 0);
|
|
3038
|
-
});
|
|
3008
|
+
this.wu.forEach(((s, e) => {
|
|
3009
|
+
t <= s[0].index ? i.push(e) : s.splice(tt(s, t, ((n) => n.index < t)), 1 / 0);
|
|
3010
|
+
}));
|
|
3039
3011
|
for (const s of i) this.wu.delete(s);
|
|
3040
3012
|
}
|
|
3041
3013
|
Pu(t, i, s) {
|
|
3042
3014
|
let e = [];
|
|
3043
3015
|
const n = (r) => !i || s.has(r.index);
|
|
3044
|
-
for (const r of Array.from(this.wu.keys()).sort((o, l) => l - o)) {
|
|
3016
|
+
for (const r of Array.from(this.wu.keys()).sort(((o, l) => l - o))) {
|
|
3045
3017
|
if (!this.wu.get(r)) continue;
|
|
3046
3018
|
const o = e;
|
|
3047
3019
|
e = [];
|
|
3048
3020
|
const l = o.length;
|
|
3049
3021
|
let a = 0;
|
|
3050
|
-
const u =
|
|
3051
|
-
let
|
|
3022
|
+
const u = T(this.wu.get(r)), c = u.length;
|
|
3023
|
+
let f = 1 / 0, d = -1 / 0;
|
|
3052
3024
|
for (let m = 0; m < c; m++) {
|
|
3053
|
-
const
|
|
3025
|
+
const w = u[m], v = w.index;
|
|
3054
3026
|
for (; a < l; ) {
|
|
3055
|
-
const
|
|
3056
|
-
if (!(
|
|
3057
|
-
|
|
3027
|
+
const g = o[a], b = g.index;
|
|
3028
|
+
if (!(b < v && n(g))) {
|
|
3029
|
+
f = b;
|
|
3058
3030
|
break;
|
|
3059
3031
|
}
|
|
3060
|
-
a++, e.push(
|
|
3032
|
+
a++, e.push(g), d = b, f = 1 / 0;
|
|
3061
3033
|
}
|
|
3062
|
-
if (
|
|
3034
|
+
if (f - v >= t && v - d >= t && n(w)) e.push(w), d = v;
|
|
3063
3035
|
else if (this.gu) return o;
|
|
3064
3036
|
}
|
|
3065
3037
|
for (; a < l; a++) n(o[a]) && e.push(o[a]);
|
|
@@ -3081,25 +3053,24 @@ class q {
|
|
|
3081
3053
|
return new q(null);
|
|
3082
3054
|
}
|
|
3083
3055
|
}
|
|
3084
|
-
function
|
|
3056
|
+
function Qe(h, t) {
|
|
3085
3057
|
return h.weight > t.weight ? h : t;
|
|
3086
3058
|
}
|
|
3087
|
-
class
|
|
3059
|
+
class qe {
|
|
3088
3060
|
constructor(t, i, s, e) {
|
|
3089
|
-
this.S_ = 0, this.Vu = null, this.Bu = [], this.bo = null, this.Mo = null, this.Eu = new
|
|
3061
|
+
this.S_ = 0, this.Vu = null, this.Bu = [], this.bo = null, this.Mo = null, this.Eu = new He(), this.Au = /* @__PURE__ */ new Map(), this.Lu = q.Iu(), this.zu = !0, this.Ou = new S(), this.Nu = new S(), this.Fu = new S(), this.Wu = null, this.Hu = null, this.Uu = /* @__PURE__ */ new Map(), this.$u = -1, this.qu = [], this.ju = 1, this.Ps = i, this.yo = s, this.Yu = i.rightOffset, this.Ku = i.barSpacing, this.ns = t, this.Zu(i), this.cu = e, this.Gu(), this.Eu.Mu(i.uniformDistribution), this.Xu(), this.Ju();
|
|
3090
3062
|
}
|
|
3091
3063
|
N() {
|
|
3092
3064
|
return this.Ps;
|
|
3093
3065
|
}
|
|
3094
3066
|
Qu(t) {
|
|
3095
|
-
|
|
3067
|
+
R(this.yo, t), this.tc(), this.Gu();
|
|
3096
3068
|
}
|
|
3097
3069
|
cr(t, i) {
|
|
3098
|
-
|
|
3070
|
+
R(this.Ps, t), this.Ps.fixLeftEdge && this.sc(), this.Ps.fixRightEdge && this.nc(), t.barSpacing !== void 0 && this.ns.gn(t.barSpacing), t.rightOffset !== void 0 && this.ns.Mn(t.rightOffset), this.Zu(t), t.minBarSpacing === void 0 && t.maxBarSpacing === void 0 || this.ns.gn(t.barSpacing ?? this.Ku), t.ignoreWhitespaceIndices !== void 0 && t.ignoreWhitespaceIndices !== this.Ps.ignoreWhitespaceIndices && this.Ju(), this.tc(), this.Gu(), t.enableConflation === void 0 && t.conflationThresholdFactor === void 0 || this.Xu(), this.Fu.p();
|
|
3099
3071
|
}
|
|
3100
3072
|
Is(t) {
|
|
3101
|
-
|
|
3102
|
-
return ((i = this.Bu[t]) == null ? void 0 : i.time) ?? null;
|
|
3073
|
+
return this.Bu[t]?.time ?? null;
|
|
3103
3074
|
}
|
|
3104
3075
|
es(t) {
|
|
3105
3076
|
return this.Bu[t] ?? null;
|
|
@@ -3107,7 +3078,7 @@ class Qe {
|
|
|
3107
3078
|
ec(t, i) {
|
|
3108
3079
|
if (this.Bu.length < 1) return null;
|
|
3109
3080
|
if (this.cu.key(t) > this.cu.key(this.Bu[this.Bu.length - 1].time)) return i ? this.Bu.length - 1 : null;
|
|
3110
|
-
const s = tt(this.Bu, this.cu.key(t), (e, n) => this.cu.key(e.time) < n);
|
|
3081
|
+
const s = tt(this.Bu, this.cu.key(t), ((e, n) => this.cu.key(e.time) < n));
|
|
3111
3082
|
return this.cu.key(t) < this.cu.key(this.Bu[s].time) ? i ? s : null : s;
|
|
3112
3083
|
}
|
|
3113
3084
|
Gi() {
|
|
@@ -3187,14 +3158,14 @@ class Qe {
|
|
|
3187
3158
|
Vl() {
|
|
3188
3159
|
if (this.Gi()) return null;
|
|
3189
3160
|
if (this.Hu !== null) return this.Hu;
|
|
3190
|
-
const t = this.Ku, i = 5 * (this.ns.N().layout.fontSize + 4) / 8 * (this.Ps.tickMarkMaxCharacterLength || 8), s = Math.round(i / t), e = p(this.Ie()), n = Math.max(e.Aa(), e.Aa() - s), r = Math.max(e.bi(), e.bi() - s), o = this.Eu.xu(t, i, this.Ps.ignoreWhitespaceIndices, this.Uu, this.$u), l = this._c() + s, a = this.uc() - s, u = this.yc(), c = this.Ps.fixLeftEdge || u,
|
|
3191
|
-
let
|
|
3161
|
+
const t = this.Ku, i = 5 * (this.ns.N().layout.fontSize + 4) / 8 * (this.Ps.tickMarkMaxCharacterLength || 8), s = Math.round(i / t), e = p(this.Ie()), n = Math.max(e.Aa(), e.Aa() - s), r = Math.max(e.bi(), e.bi() - s), o = this.Eu.xu(t, i, this.Ps.ignoreWhitespaceIndices, this.Uu, this.$u), l = this._c() + s, a = this.uc() - s, u = this.yc(), c = this.Ps.fixLeftEdge || u, f = this.Ps.fixRightEdge || u;
|
|
3162
|
+
let d = 0;
|
|
3192
3163
|
for (const m of o) {
|
|
3193
3164
|
if (!(n <= m.index && m.index <= r)) continue;
|
|
3194
|
-
let
|
|
3195
|
-
|
|
3165
|
+
let w;
|
|
3166
|
+
d < this.qu.length ? (w = this.qu[d], w.coord = this.qt(m.index), w.label = this.kc(m), w.weight = m.weight) : (w = { needAlignCoordinate: !1, coord: this.qt(m.index), label: this.kc(m), weight: m.weight }, this.qu.push(w)), this.Ku > i / 2 && !u ? w.needAlignCoordinate = !1 : w.needAlignCoordinate = c && m.index <= l || f && m.index >= a, d++;
|
|
3196
3167
|
}
|
|
3197
|
-
return this.qu.length =
|
|
3168
|
+
return this.qu.length = d, this.Hu = this.qu, this.qu;
|
|
3198
3169
|
}
|
|
3199
3170
|
Pc() {
|
|
3200
3171
|
let t;
|
|
@@ -3357,14 +3328,14 @@ class Qe {
|
|
|
3357
3328
|
}
|
|
3358
3329
|
kc(t) {
|
|
3359
3330
|
let i = this.Au.get(t.weight);
|
|
3360
|
-
return i === void 0 && (i = new
|
|
3331
|
+
return i === void 0 && (i = new Ge(((s) => this.Gc(s)), this.cu), this.Au.set(t.weight, i)), i.du(t);
|
|
3361
3332
|
}
|
|
3362
3333
|
Gc(t) {
|
|
3363
3334
|
return this.cu.formatTickmark(t, this.yo);
|
|
3364
3335
|
}
|
|
3365
3336
|
qc(t) {
|
|
3366
3337
|
const i = this.Lu;
|
|
3367
|
-
this.Lu = t,
|
|
3338
|
+
this.Lu = t, Fi(i.Ru(), this.Lu.Ru()) || this.Ou.p(), Fi(i.Du(), this.Lu.Du()) || this.Nu.p(), this.$c();
|
|
3368
3339
|
}
|
|
3369
3340
|
$c() {
|
|
3370
3341
|
this.Hu = null;
|
|
@@ -3395,11 +3366,11 @@ class Qe {
|
|
|
3395
3366
|
return !this.Ps.ignoreWhitespaceIndices || this.Uu.get(t) || !1;
|
|
3396
3367
|
}
|
|
3397
3368
|
bc(t) {
|
|
3398
|
-
const i = function* (e) {
|
|
3369
|
+
const i = (function* (e) {
|
|
3399
3370
|
const n = Math.round(e), r = n < e;
|
|
3400
3371
|
let o = 1;
|
|
3401
3372
|
for (; ; ) r ? (yield n + o, yield n - o) : (yield n - o, yield n + o), o++;
|
|
3402
|
-
}(t), s = this.uc();
|
|
3373
|
+
})(t), s = this.uc();
|
|
3403
3374
|
for (; s; ) {
|
|
3404
3375
|
const e = i.next().value;
|
|
3405
3376
|
if (this.Uu.get(e)) return e;
|
|
@@ -3414,22 +3385,22 @@ class Qe {
|
|
|
3414
3385
|
}
|
|
3415
3386
|
}
|
|
3416
3387
|
}
|
|
3417
|
-
var
|
|
3388
|
+
var Wi, Bi, ji, hi, Vi;
|
|
3418
3389
|
(function(h) {
|
|
3419
3390
|
h[h.OnTouchEnd = 0] = "OnTouchEnd", h[h.OnNextTap = 1] = "OnNextTap";
|
|
3420
|
-
})(
|
|
3421
|
-
class
|
|
3391
|
+
})(Wi || (Wi = {}));
|
|
3392
|
+
class Ze {
|
|
3422
3393
|
constructor(t, i, s) {
|
|
3423
|
-
this.Xc = [], this.Jc = [], this.Qc = null, this.S_ = 0, this.td = null, this.sd = new
|
|
3394
|
+
this.Xc = [], this.Jc = [], this.Qc = null, this.S_ = 0, this.td = null, this.sd = new S(), this.nd = new S(), this.ed = null, this.rd = t, this.Ps = i, this.cu = s, this.ko = new Hs(this.Ps.layout.colorParsers), this.hd = new Gs(this), this.Jh = new qe(this, i.timeScale, this.Ps.localization, s), this.Ct = new oe(this, i.crosshair), this.ad = new De(i.crosshair), i.addDefaultPane && (this.ld(0), this.Xc[0].A_(2)), this.od = this._d(0), this.ud = this._d(1);
|
|
3424
3395
|
}
|
|
3425
3396
|
Ca() {
|
|
3426
|
-
this.dd(
|
|
3397
|
+
this.dd(z.yn());
|
|
3427
3398
|
}
|
|
3428
3399
|
dr() {
|
|
3429
|
-
this.dd(
|
|
3400
|
+
this.dd(z.Cn());
|
|
3430
3401
|
}
|
|
3431
3402
|
Ua() {
|
|
3432
|
-
this.dd(new
|
|
3403
|
+
this.dd(new z(1));
|
|
3433
3404
|
}
|
|
3434
3405
|
ya(t) {
|
|
3435
3406
|
const i = this.fd(t);
|
|
@@ -3439,22 +3410,21 @@ class qe {
|
|
|
3439
3410
|
return this.td;
|
|
3440
3411
|
}
|
|
3441
3412
|
vd(t) {
|
|
3442
|
-
|
|
3443
|
-
if (((s = this.td) == null ? void 0 : s.hu) === (t == null ? void 0 : t.hu) && ((n = (e = this.td) == null ? void 0 : e.au) == null ? void 0 : n.te) === ((r = t == null ? void 0 : t.au) == null ? void 0 : r.te)) return;
|
|
3413
|
+
if (this.td?.hu === t?.hu && this.td?.au?.te === t?.au?.te) return;
|
|
3444
3414
|
const i = this.td;
|
|
3445
|
-
this.td = t, i !== null && this.ya(i.hu), t !== null && t.hu !==
|
|
3415
|
+
this.td = t, i !== null && this.ya(i.hu), t !== null && t.hu !== i?.hu && this.ya(t.hu);
|
|
3446
3416
|
}
|
|
3447
3417
|
N() {
|
|
3448
3418
|
return this.Ps;
|
|
3449
3419
|
}
|
|
3450
3420
|
cr(t) {
|
|
3451
|
-
|
|
3421
|
+
R(this.Ps, t), this.Xc.forEach(((i) => i.I_(t))), t.timeScale !== void 0 && this.Jh.cr(t.timeScale), t.localization !== void 0 && this.Jh.Qu(t.localization), (t.leftPriceScale || t.rightPriceScale) && this.sd.p(), this.od = this._d(0), this.ud = this._d(1), this.Ca();
|
|
3452
3422
|
}
|
|
3453
3423
|
md(t, i, s = 0) {
|
|
3454
3424
|
const e = this.Xc[s];
|
|
3455
3425
|
if (e === void 0) return;
|
|
3456
|
-
if (t === "left") return
|
|
3457
|
-
if (t === "right") return
|
|
3426
|
+
if (t === "left") return R(this.Ps, { leftPriceScale: i }), e.I_({ leftPriceScale: i }), this.sd.p(), void this.Ca();
|
|
3427
|
+
if (t === "right") return R(this.Ps, { rightPriceScale: i }), e.I_({ rightPriceScale: i }), this.sd.p(), void this.Ca();
|
|
3458
3428
|
const n = this.wd(t, s);
|
|
3459
3429
|
n !== null && (n.Ft.cr(i), this.sd.p());
|
|
3460
3430
|
}
|
|
@@ -3480,34 +3450,34 @@ class qe {
|
|
|
3480
3450
|
t.No(i), this.Sc();
|
|
3481
3451
|
}
|
|
3482
3452
|
L_(t) {
|
|
3483
|
-
this.S_ = t, this.Jh.L_(this.S_), this.Xc.forEach((i) => i.L_(t)), this.Sc();
|
|
3453
|
+
this.S_ = t, this.Jh.L_(this.S_), this.Xc.forEach(((i) => i.L_(t))), this.Sc();
|
|
3484
3454
|
}
|
|
3485
3455
|
Sd(t) {
|
|
3486
|
-
this.Xc.length !== 1 && (
|
|
3456
|
+
this.Xc.length !== 1 && (C(t >= 0 && t < this.Xc.length, "Invalid pane index"), this.Xc.splice(t, 1), this.Ca());
|
|
3487
3457
|
}
|
|
3488
3458
|
xd(t, i) {
|
|
3489
3459
|
if (this.Xc.length < 2) return;
|
|
3490
|
-
|
|
3491
|
-
const s = this.Xc[t], e = this.Xc.reduce((c,
|
|
3460
|
+
C(t >= 0 && t < this.Xc.length, "Invalid pane index");
|
|
3461
|
+
const s = this.Xc[t], e = this.Xc.reduce(((c, f) => c + f.E_()), 0), n = this.Xc.reduce(((c, f) => c + f.$t()), 0), r = n - 30 * (this.Xc.length - 1);
|
|
3492
3462
|
i = Math.min(r, Math.max(30, i));
|
|
3493
3463
|
const o = e / n, l = s.$t();
|
|
3494
3464
|
s.A_(i * o);
|
|
3495
3465
|
let a = i - l, u = this.Xc.length - 1;
|
|
3496
3466
|
for (const c of this.Xc) if (c !== s) {
|
|
3497
|
-
const
|
|
3498
|
-
a -= c.$t() -
|
|
3499
|
-
const
|
|
3500
|
-
c.A_(
|
|
3467
|
+
const f = Math.min(r, Math.max(30, c.$t() - a / u));
|
|
3468
|
+
a -= c.$t() - f, u -= 1;
|
|
3469
|
+
const d = f * o;
|
|
3470
|
+
c.A_(d);
|
|
3501
3471
|
}
|
|
3502
3472
|
this.Ca();
|
|
3503
3473
|
}
|
|
3504
3474
|
Cd(t, i) {
|
|
3505
|
-
|
|
3475
|
+
C(t >= 0 && t < this.Xc.length && i >= 0 && i < this.Xc.length, "Invalid pane index");
|
|
3506
3476
|
const s = this.Xc[t], e = this.Xc[i];
|
|
3507
3477
|
this.Xc[t] = e, this.Xc[i] = s, this.Ca();
|
|
3508
3478
|
}
|
|
3509
3479
|
yd(t, i) {
|
|
3510
|
-
if (
|
|
3480
|
+
if (C(t >= 0 && t < this.Xc.length && i >= 0 && i < this.Xc.length, "Invalid pane index"), t === i) return;
|
|
3511
3481
|
const [s] = this.Xc.splice(t, 1);
|
|
3512
3482
|
this.Xc.splice(i, 0, s), this.Ca();
|
|
3513
3483
|
}
|
|
@@ -3563,7 +3533,7 @@ class qe {
|
|
|
3563
3533
|
return this.Jc;
|
|
3564
3534
|
}
|
|
3565
3535
|
Us() {
|
|
3566
|
-
return this.Qc === null && (this.Qc = this.Jc.filter((t) => t.It())), this.Qc;
|
|
3536
|
+
return this.Qc === null && (this.Qc = this.Jc.filter(((t) => t.It()))), this.Qc;
|
|
3567
3537
|
}
|
|
3568
3538
|
xa() {
|
|
3569
3539
|
this.Qc = null;
|
|
@@ -3599,10 +3569,10 @@ class qe {
|
|
|
3599
3569
|
i !== void 0 && s !== void 0 && this.Jh.kt(i, s);
|
|
3600
3570
|
const n = this.Jh.Is(0), r = this.Jh.vc(), o = this.Jh.Ie();
|
|
3601
3571
|
if (o !== null && e !== null && n !== null) {
|
|
3602
|
-
const l = o.Ee(r), a = this.cu.key(e) > this.cu.key(n), u = t !== null && t > r && !a, c = this.Jh.N().allowShiftVisibleRangeOnWhitespaceReplacement,
|
|
3603
|
-
if (u && !
|
|
3604
|
-
const
|
|
3605
|
-
this.Jh.Mn(this.Jh.Cc() -
|
|
3572
|
+
const l = o.Ee(r), a = this.cu.key(e) > this.cu.key(n), u = t !== null && t > r && !a, c = this.Jh.N().allowShiftVisibleRangeOnWhitespaceReplacement, f = l && (s !== void 0 || c) && this.Jh.N().shiftVisibleRangeOnNewBar;
|
|
3573
|
+
if (u && !f) {
|
|
3574
|
+
const d = t - r;
|
|
3575
|
+
this.Jh.Mn(this.Jh.Cc() - d);
|
|
3606
3576
|
}
|
|
3607
3577
|
}
|
|
3608
3578
|
this.Jh.Tc(t);
|
|
@@ -3611,17 +3581,17 @@ class qe {
|
|
|
3611
3581
|
t !== null && t.iu();
|
|
3612
3582
|
}
|
|
3613
3583
|
Kn(t) {
|
|
3614
|
-
if (function(s) {
|
|
3615
|
-
return s instanceof
|
|
3616
|
-
}(t)) return t;
|
|
3617
|
-
const i = this.Xc.find((s) => s.Dt().includes(t));
|
|
3584
|
+
if ((function(s) {
|
|
3585
|
+
return s instanceof Ii;
|
|
3586
|
+
})(t)) return t;
|
|
3587
|
+
const i = this.Xc.find(((s) => s.Dt().includes(t)));
|
|
3618
3588
|
return i === void 0 ? null : i;
|
|
3619
3589
|
}
|
|
3620
3590
|
Sc() {
|
|
3621
|
-
this.Xc.forEach((t) => t.iu()), this.ka();
|
|
3591
|
+
this.Xc.forEach(((t) => t.iu())), this.ka();
|
|
3622
3592
|
}
|
|
3623
3593
|
m() {
|
|
3624
|
-
this.Xc.forEach((t) => t.m()), this.Xc.length = 0, this.Ps.localization.priceFormatter = void 0, this.Ps.localization.percentageFormatter = void 0, this.Ps.localization.timeFormatter = void 0;
|
|
3594
|
+
this.Xc.forEach(((t) => t.m())), this.Xc.length = 0, this.Ps.localization.priceFormatter = void 0, this.Ps.localization.percentageFormatter = void 0, this.Ps.localization.timeFormatter = void 0;
|
|
3625
3595
|
}
|
|
3626
3596
|
Nd() {
|
|
3627
3597
|
return this.hd;
|
|
@@ -3638,7 +3608,7 @@ class qe {
|
|
|
3638
3608
|
}
|
|
3639
3609
|
Hd(t) {
|
|
3640
3610
|
const i = this.Kn(t), s = this.Jc.indexOf(t);
|
|
3641
|
-
|
|
3611
|
+
C(s !== -1, "Series not found");
|
|
3642
3612
|
const e = p(i);
|
|
3643
3613
|
this.Jc.splice(s, 1), e.n_(t), t.m && t.m(), this.xa(), this.Jh.Ju(), this.Ud(e);
|
|
3644
3614
|
}
|
|
@@ -3647,38 +3617,38 @@ class qe {
|
|
|
3647
3617
|
s.n_(t, !0), s.i_(t, i, !0);
|
|
3648
3618
|
}
|
|
3649
3619
|
Fc() {
|
|
3650
|
-
const t =
|
|
3620
|
+
const t = z.Cn();
|
|
3651
3621
|
t.cn(), this.dd(t);
|
|
3652
3622
|
}
|
|
3653
3623
|
$d(t) {
|
|
3654
|
-
const i =
|
|
3624
|
+
const i = z.Cn();
|
|
3655
3625
|
i.pn(t), this.dd(i);
|
|
3656
3626
|
}
|
|
3657
3627
|
wn() {
|
|
3658
|
-
const t =
|
|
3628
|
+
const t = z.Cn();
|
|
3659
3629
|
t.wn(), this.dd(t);
|
|
3660
3630
|
}
|
|
3661
3631
|
gn(t) {
|
|
3662
|
-
const i =
|
|
3632
|
+
const i = z.Cn();
|
|
3663
3633
|
i.gn(t), this.dd(i);
|
|
3664
3634
|
}
|
|
3665
3635
|
Mn(t) {
|
|
3666
|
-
const i =
|
|
3636
|
+
const i = z.Cn();
|
|
3667
3637
|
i.Mn(t), this.dd(i);
|
|
3668
3638
|
}
|
|
3669
3639
|
vn(t) {
|
|
3670
|
-
const i =
|
|
3640
|
+
const i = z.Cn();
|
|
3671
3641
|
i.vn(t), this.dd(i);
|
|
3672
3642
|
}
|
|
3673
3643
|
dn() {
|
|
3674
|
-
const t =
|
|
3644
|
+
const t = z.Cn();
|
|
3675
3645
|
t.dn(), this.dd(t);
|
|
3676
3646
|
}
|
|
3677
3647
|
qd() {
|
|
3678
3648
|
return this.Ps.rightPriceScale.visible ? "right" : "left";
|
|
3679
3649
|
}
|
|
3680
3650
|
jd(t, i) {
|
|
3681
|
-
if (
|
|
3651
|
+
if (C(i >= 0, "Index should be greater or equal to 0"), i === this.Yd(t)) return;
|
|
3682
3652
|
const s = p(this.Kn(t));
|
|
3683
3653
|
s.n_(t);
|
|
3684
3654
|
const e = this.ld(i);
|
|
@@ -3711,19 +3681,19 @@ class qe {
|
|
|
3711
3681
|
return this.Jd();
|
|
3712
3682
|
}
|
|
3713
3683
|
Jd(t) {
|
|
3714
|
-
const i = new
|
|
3684
|
+
const i = new Ii(this.Jh, this);
|
|
3715
3685
|
this.Xc.push(i);
|
|
3716
|
-
const s = t ?? this.Xc.length - 1, e =
|
|
3686
|
+
const s = t ?? this.Xc.length - 1, e = z.yn();
|
|
3717
3687
|
return e.hn(s, { an: 0, ln: !0 }), this.dd(e), i;
|
|
3718
3688
|
}
|
|
3719
3689
|
ld(t) {
|
|
3720
|
-
return
|
|
3690
|
+
return C(t >= 0, "Index should be greater or equal to 0"), (t = Math.min(this.Xc.length, t)) < this.Xc.length ? this.Xc[t] : this.Jd(t);
|
|
3721
3691
|
}
|
|
3722
3692
|
Yd(t) {
|
|
3723
|
-
return this.Xc.findIndex((i) => i.F_().includes(t));
|
|
3693
|
+
return this.Xc.findIndex(((i) => i.F_().includes(t)));
|
|
3724
3694
|
}
|
|
3725
3695
|
kd(t, i) {
|
|
3726
|
-
const s = new
|
|
3696
|
+
const s = new z(i);
|
|
3727
3697
|
if (t !== null) {
|
|
3728
3698
|
const e = this.Xc.indexOf(t);
|
|
3729
3699
|
s.hn(e, { an: i });
|
|
@@ -3734,7 +3704,7 @@ class qe {
|
|
|
3734
3704
|
return i === void 0 && (i = 2), this.kd(this.Kn(t), i);
|
|
3735
3705
|
}
|
|
3736
3706
|
dd(t) {
|
|
3737
|
-
this.rd && this.rd(t), this.Xc.forEach((i) => i.eu().pr().kt());
|
|
3707
|
+
this.rd && this.rd(t), this.Xc.forEach(((i) => i.eu().pr().kt()));
|
|
3738
3708
|
}
|
|
3739
3709
|
Wd(t, i) {
|
|
3740
3710
|
const s = t.N().priceScaleId, e = s !== void 0 ? s : this.qd();
|
|
@@ -3758,7 +3728,7 @@ function zs(h) {
|
|
|
3758
3728
|
}
|
|
3759
3729
|
return t;
|
|
3760
3730
|
}
|
|
3761
|
-
function
|
|
3731
|
+
function ni(h) {
|
|
3762
3732
|
return !Z(h) && !ct(h);
|
|
3763
3733
|
}
|
|
3764
3734
|
function Ts(h) {
|
|
@@ -3766,38 +3736,38 @@ function Ts(h) {
|
|
|
3766
3736
|
}
|
|
3767
3737
|
(function(h) {
|
|
3768
3738
|
h[h.Disabled = 0] = "Disabled", h[h.Continuous = 1] = "Continuous", h[h.OnDataUpdate = 2] = "OnDataUpdate";
|
|
3769
|
-
})(
|
|
3739
|
+
})(Bi || (Bi = {})), (function(h) {
|
|
3770
3740
|
h[h.LastBar = 0] = "LastBar", h[h.LastVisible = 1] = "LastVisible";
|
|
3771
|
-
}(
|
|
3741
|
+
})(ji || (ji = {})), (function(h) {
|
|
3772
3742
|
h.Solid = "solid", h.VerticalGradient = "gradient";
|
|
3773
|
-
}(
|
|
3743
|
+
})(hi || (hi = {})), (function(h) {
|
|
3774
3744
|
h[h.Year = 0] = "Year", h[h.Month = 1] = "Month", h[h.DayOfMonth = 2] = "DayOfMonth", h[h.Time = 3] = "Time", h[h.TimeWithSeconds = 4] = "TimeWithSeconds";
|
|
3775
|
-
}(Vi || (Vi = {}));
|
|
3776
|
-
const
|
|
3777
|
-
function
|
|
3778
|
-
return t.replace(/yyyy/g, ((s) =>
|
|
3745
|
+
})(Vi || (Vi = {}));
|
|
3746
|
+
const Di = (h) => h.getUTCFullYear();
|
|
3747
|
+
function th(h, t, i) {
|
|
3748
|
+
return t.replace(/yyyy/g, ((s) => B(Di(s), 4))(h)).replace(/yy/g, ((s) => B(Di(s) % 100, 2))(h)).replace(/MMMM/g, ((s, e) => new Date(s.getUTCFullYear(), s.getUTCMonth(), 1).toLocaleString(e, { month: "long" }))(h, i)).replace(/MMM/g, ((s, e) => new Date(s.getUTCFullYear(), s.getUTCMonth(), 1).toLocaleString(e, { month: "short" }))(h, i)).replace(/MM/g, ((s) => B(((e) => e.getUTCMonth() + 1)(s), 2))(h)).replace(/dd/g, ((s) => B(((e) => e.getUTCDate())(s), 2))(h));
|
|
3779
3749
|
}
|
|
3780
3750
|
class Rs {
|
|
3781
3751
|
constructor(t = "yyyy-MM-dd", i = "default") {
|
|
3782
3752
|
this.Qd = t, this.tf = i;
|
|
3783
3753
|
}
|
|
3784
3754
|
du(t) {
|
|
3785
|
-
return
|
|
3755
|
+
return th(t, this.Qd, this.tf);
|
|
3786
3756
|
}
|
|
3787
3757
|
}
|
|
3788
|
-
class
|
|
3758
|
+
class ih {
|
|
3789
3759
|
constructor(t) {
|
|
3790
3760
|
this.if = t || "%h:%m:%s";
|
|
3791
3761
|
}
|
|
3792
3762
|
du(t) {
|
|
3793
|
-
return this.if.replace("%h",
|
|
3763
|
+
return this.if.replace("%h", B(t.getUTCHours(), 2)).replace("%m", B(t.getUTCMinutes(), 2)).replace("%s", B(t.getUTCSeconds(), 2));
|
|
3794
3764
|
}
|
|
3795
3765
|
}
|
|
3796
|
-
const
|
|
3797
|
-
class
|
|
3766
|
+
const sh = { sf: "yyyy-MM-dd", nf: "%h:%m:%s", ef: " ", rf: "default" };
|
|
3767
|
+
class eh {
|
|
3798
3768
|
constructor(t = {}) {
|
|
3799
|
-
const i = { ...
|
|
3800
|
-
this.hf = new Rs(i.sf, i.rf), this.af = new
|
|
3769
|
+
const i = { ...sh, ...t };
|
|
3770
|
+
this.hf = new Rs(i.sf, i.rf), this.af = new ih(i.nf), this.lf = i.ef;
|
|
3801
3771
|
}
|
|
3802
3772
|
du(t) {
|
|
3803
3773
|
return `${this.hf.du(t)}${this.lf}${this.af.du(t)}`;
|
|
@@ -3806,12 +3776,12 @@ class sh {
|
|
|
3806
3776
|
function vt(h) {
|
|
3807
3777
|
return 60 * h * 60 * 1e3;
|
|
3808
3778
|
}
|
|
3809
|
-
function
|
|
3779
|
+
function Jt(h) {
|
|
3810
3780
|
return 60 * h * 1e3;
|
|
3811
3781
|
}
|
|
3812
|
-
const wt = [{ _f: (
|
|
3813
|
-
var
|
|
3814
|
-
function
|
|
3782
|
+
const wt = [{ _f: (Ki = 1, 1e3 * Ki), uf: 10 }, { _f: Jt(1), uf: 20 }, { _f: Jt(5), uf: 21 }, { _f: Jt(30), uf: 22 }, { _f: vt(1), uf: 30 }, { _f: vt(3), uf: 31 }, { _f: vt(6), uf: 32 }, { _f: vt(12), uf: 33 }];
|
|
3783
|
+
var Ki;
|
|
3784
|
+
function Oi(h, t) {
|
|
3815
3785
|
if (h.getUTCFullYear() !== t.getUTCFullYear()) return 70;
|
|
3816
3786
|
if (h.getUTCMonth() !== t.getUTCMonth()) return 60;
|
|
3817
3787
|
if (h.getUTCDate() !== t.getUTCDate()) return 50;
|
|
@@ -3820,21 +3790,21 @@ function Ki(h, t) {
|
|
|
3820
3790
|
}
|
|
3821
3791
|
function $t(h) {
|
|
3822
3792
|
let t = h;
|
|
3823
|
-
if (ct(h) && (t =
|
|
3793
|
+
if (ct(h) && (t = ui(h)), !ni(t)) throw new Error("time must be of type BusinessDay");
|
|
3824
3794
|
const i = new Date(Date.UTC(t.year, t.month - 1, t.day, 0, 0, 0, 0));
|
|
3825
3795
|
return { cf: Math.round(i.getTime() / 1e3), df: t };
|
|
3826
3796
|
}
|
|
3827
|
-
function
|
|
3797
|
+
function Ai(h) {
|
|
3828
3798
|
if (!Ts(h)) throw new Error("time must be of type isUTCTimestamp");
|
|
3829
3799
|
return { cf: h };
|
|
3830
3800
|
}
|
|
3831
|
-
function
|
|
3801
|
+
function ui(h) {
|
|
3832
3802
|
const t = new Date(h);
|
|
3833
3803
|
if (isNaN(t.getTime())) throw new Error(`Invalid date string=${h}, expected format=yyyy-mm-dd`);
|
|
3834
3804
|
return { day: t.getUTCDate(), month: t.getUTCMonth() + 1, year: t.getUTCFullYear() };
|
|
3835
3805
|
}
|
|
3836
|
-
function
|
|
3837
|
-
ct(h.time) && (h.time =
|
|
3806
|
+
function Yi(h) {
|
|
3807
|
+
ct(h.time) && (h.time = ui(h.time));
|
|
3838
3808
|
}
|
|
3839
3809
|
class Ji {
|
|
3840
3810
|
options() {
|
|
@@ -3844,14 +3814,14 @@ class Ji {
|
|
|
3844
3814
|
this.Ps = t, this.updateFormatter(t.localization);
|
|
3845
3815
|
}
|
|
3846
3816
|
preprocessData(t) {
|
|
3847
|
-
Array.isArray(t) ? function(i) {
|
|
3848
|
-
i.forEach(
|
|
3849
|
-
}(t) :
|
|
3817
|
+
Array.isArray(t) ? (function(i) {
|
|
3818
|
+
i.forEach(Yi);
|
|
3819
|
+
})(t) : Yi(t);
|
|
3850
3820
|
}
|
|
3851
3821
|
createConverterToInternalObj(t) {
|
|
3852
|
-
return p(function(i) {
|
|
3853
|
-
return i.length === 0 ? null :
|
|
3854
|
-
}(t));
|
|
3822
|
+
return p((function(i) {
|
|
3823
|
+
return i.length === 0 ? null : ni(i[0].time) || ct(i[0].time) ? $t : Ai;
|
|
3824
|
+
})(t));
|
|
3855
3825
|
}
|
|
3856
3826
|
key(t) {
|
|
3857
3827
|
return typeof t == "object" && "cf" in t ? t.cf : this.key(this.convertHorzItemToInternal(t));
|
|
@@ -3861,20 +3831,20 @@ class Ji {
|
|
|
3861
3831
|
return i.df === void 0 ? new Date(1e3 * i.cf).getTime() : new Date(Date.UTC(i.df.year, i.df.month - 1, i.df.day)).getTime();
|
|
3862
3832
|
}
|
|
3863
3833
|
convertHorzItemToInternal(t) {
|
|
3864
|
-
return Ts(i = t) ?
|
|
3834
|
+
return Ts(i = t) ? Ai(i) : ni(i) ? $t(i) : $t(ui(i));
|
|
3865
3835
|
var i;
|
|
3866
3836
|
}
|
|
3867
3837
|
updateFormatter(t) {
|
|
3868
3838
|
if (!this.Ps) return;
|
|
3869
3839
|
const i = t.dateFormat;
|
|
3870
|
-
this.Ps.timeScale.timeVisible ? this.ff = new
|
|
3840
|
+
this.Ps.timeScale.timeVisible ? this.ff = new eh({ sf: i, nf: this.Ps.timeScale.secondsVisible ? "%h:%m:%s" : "%h:%m", ef: " ", rf: t.locale }) : this.ff = new Rs(i, t.locale);
|
|
3871
3841
|
}
|
|
3872
3842
|
formatHorzItem(t) {
|
|
3873
3843
|
const i = t;
|
|
3874
3844
|
return this.ff.du(new Date(1e3 * i.cf));
|
|
3875
3845
|
}
|
|
3876
3846
|
formatTickmark(t, i) {
|
|
3877
|
-
const s = function(n, r, o) {
|
|
3847
|
+
const s = (function(n, r, o) {
|
|
3878
3848
|
switch (n) {
|
|
3879
3849
|
case 0:
|
|
3880
3850
|
case 10:
|
|
@@ -3894,12 +3864,12 @@ class Ji {
|
|
|
3894
3864
|
case 70:
|
|
3895
3865
|
return 0;
|
|
3896
3866
|
}
|
|
3897
|
-
}(t.weight, this.Ps.timeScale.timeVisible, this.Ps.timeScale.secondsVisible), e = this.Ps.timeScale;
|
|
3867
|
+
})(t.weight, this.Ps.timeScale.timeVisible, this.Ps.timeScale.secondsVisible), e = this.Ps.timeScale;
|
|
3898
3868
|
if (e.tickMarkFormatter !== void 0) {
|
|
3899
3869
|
const n = e.tickMarkFormatter(t.originalTime, s, i.locale);
|
|
3900
3870
|
if (n !== null) return n;
|
|
3901
3871
|
}
|
|
3902
|
-
return function(n, r, o) {
|
|
3872
|
+
return (function(n, r, o) {
|
|
3903
3873
|
const l = {};
|
|
3904
3874
|
switch (r) {
|
|
3905
3875
|
case 0:
|
|
@@ -3919,10 +3889,10 @@ class Ji {
|
|
|
3919
3889
|
}
|
|
3920
3890
|
const a = n.df === void 0 ? new Date(1e3 * n.cf) : new Date(Date.UTC(n.df.year, n.df.month - 1, n.df.day));
|
|
3921
3891
|
return new Date(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate(), a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()).toLocaleString(o, l);
|
|
3922
|
-
}(t.time, s, i.locale);
|
|
3892
|
+
})(t.time, s, i.locale);
|
|
3923
3893
|
}
|
|
3924
3894
|
maxTickMarkWeight(t) {
|
|
3925
|
-
let i = t.reduce(
|
|
3895
|
+
let i = t.reduce(Qe, t[0]).weight;
|
|
3926
3896
|
return i > 30 && i < 50 && (i = 30), i;
|
|
3927
3897
|
}
|
|
3928
3898
|
fillWeightsForPoints(t, i) {
|
|
@@ -3931,32 +3901,32 @@ class Ji {
|
|
|
3931
3901
|
let n = e === 0 ? null : s[e - 1].time.cf, r = n !== null ? new Date(1e3 * n) : null, o = 0;
|
|
3932
3902
|
for (let l = e; l < s.length; ++l) {
|
|
3933
3903
|
const a = s[l], u = new Date(1e3 * a.time.cf);
|
|
3934
|
-
r !== null && (a.timeWeight =
|
|
3904
|
+
r !== null && (a.timeWeight = Oi(u, r)), o += a.time.cf - (n || a.time.cf), n = a.time.cf, r = u;
|
|
3935
3905
|
}
|
|
3936
3906
|
if (e === 0 && s.length > 1) {
|
|
3937
3907
|
const l = Math.ceil(o / (s.length - 1)), a = new Date(1e3 * (s[0].time.cf - l));
|
|
3938
|
-
s[0].timeWeight =
|
|
3908
|
+
s[0].timeWeight = Oi(new Date(1e3 * s[0].time.cf), a);
|
|
3939
3909
|
}
|
|
3940
3910
|
})(t, i);
|
|
3941
3911
|
}
|
|
3942
3912
|
static pf(t) {
|
|
3943
|
-
return
|
|
3913
|
+
return R({ localization: { dateFormat: "dd MMM 'yy" } }, t ?? {});
|
|
3944
3914
|
}
|
|
3945
3915
|
}
|
|
3946
3916
|
const it = typeof window < "u";
|
|
3947
|
-
function
|
|
3917
|
+
function $i() {
|
|
3948
3918
|
return !!it && window.navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
|
|
3949
3919
|
}
|
|
3950
3920
|
function Ut() {
|
|
3951
3921
|
return !!it && /iPhone|iPad|iPod/.test(window.navigator.platform);
|
|
3952
3922
|
}
|
|
3953
|
-
function
|
|
3923
|
+
function ri(h) {
|
|
3954
3924
|
return h + h % 2;
|
|
3955
3925
|
}
|
|
3956
|
-
function
|
|
3957
|
-
it && window.chrome !== void 0 && h.addEventListener("mousedown", (t) => {
|
|
3926
|
+
function hh(h) {
|
|
3927
|
+
it && window.chrome !== void 0 && h.addEventListener("mousedown", ((t) => {
|
|
3958
3928
|
if (t.button === 1) return t.preventDefault(), !1;
|
|
3959
|
-
});
|
|
3929
|
+
}));
|
|
3960
3930
|
}
|
|
3961
3931
|
class Rt {
|
|
3962
3932
|
constructor(t, i, s) {
|
|
@@ -3966,13 +3936,13 @@ class Rt {
|
|
|
3966
3936
|
if (this.jf(e)) {
|
|
3967
3937
|
const n = this.Yf(e);
|
|
3968
3938
|
if (++this.gf, this.Mf && this.gf > 1) {
|
|
3969
|
-
const { Kf: r } = this.Zf(
|
|
3939
|
+
const { Kf: r } = this.Zf(I(e), this.bf);
|
|
3970
3940
|
r < 30 && !this.Tf && this.Gf(n, this.Jf.Xf), this.Qf();
|
|
3971
3941
|
}
|
|
3972
3942
|
} else {
|
|
3973
3943
|
const n = this.Yf(e);
|
|
3974
3944
|
if (++this.vf, this.mf && this.vf > 1) {
|
|
3975
|
-
const { Kf: r } = this.Zf(
|
|
3945
|
+
const { Kf: r } = this.Zf(I(e), this.wf);
|
|
3976
3946
|
r < 5 && !this.Pf && this.tp(n, this.Jf.ip), this.sp();
|
|
3977
3947
|
}
|
|
3978
3948
|
}
|
|
@@ -4005,7 +3975,7 @@ class Rt {
|
|
|
4005
3975
|
const i = Xt(t.changedTouches, p(this.Wf));
|
|
4006
3976
|
if (i === null || (this.Ff = bt(t), this.Af !== null) || this.Of) return;
|
|
4007
3977
|
this.zf = !0;
|
|
4008
|
-
const s = this.Zf(
|
|
3978
|
+
const s = this.Zf(I(i), p(this.yf)), { up: e, cp: n, Kf: r } = s;
|
|
4009
3979
|
if (this.kf || !(r < 5)) {
|
|
4010
3980
|
if (!this.kf) {
|
|
4011
3981
|
const o = 0.5 * e, l = n >= o && !this.Ps.dp(), a = o > n && !this.Ps.fp();
|
|
@@ -4019,7 +3989,7 @@ class Rt {
|
|
|
4019
3989
|
}
|
|
4020
3990
|
vp(t) {
|
|
4021
3991
|
if (t.button !== 0) return;
|
|
4022
|
-
const i = this.Zf(
|
|
3992
|
+
const i = this.Zf(I(t), p(this.Cf)), { Kf: s } = i;
|
|
4023
3993
|
if (s >= 5 && (this.Pf = !0, this.sp()), this.Pf) {
|
|
4024
3994
|
const e = this.Yf(t);
|
|
4025
3995
|
this.tp(e, this.Jf.mp);
|
|
@@ -4035,7 +4005,7 @@ class Rt {
|
|
|
4035
4005
|
this.Wf = null, this.Ff = bt(t), this.rp(), this.yf = null, this.Ef && (this.Ef(), this.Ef = null);
|
|
4036
4006
|
const s = this.Yf(t, i);
|
|
4037
4007
|
if (this.Gf(s, this.Jf.gp), ++this.gf, this.Mf && this.gf > 1) {
|
|
4038
|
-
const { Kf: e } = this.Zf(
|
|
4008
|
+
const { Kf: e } = this.Zf(I(i), this.bf);
|
|
4039
4009
|
e < 30 && !this.Tf && this.Gf(s, this.Jf.Xf), this.Qf();
|
|
4040
4010
|
} else this.Tf || (this.Gf(s, this.Jf.Mp), this.Jf.Mp && X(t));
|
|
4041
4011
|
this.gf === 0 && X(t), t.touches.length === 0 && this.xf && (this.xf = !1, X(t));
|
|
@@ -4043,8 +4013,8 @@ class Rt {
|
|
|
4043
4013
|
$f(t) {
|
|
4044
4014
|
if (t.button !== 0) return;
|
|
4045
4015
|
const i = this.Yf(t);
|
|
4046
|
-
if (this.Cf = null, this.Nf = !1, this.Bf && (this.Bf(), this.Bf = null),
|
|
4047
|
-
const { Kf: s } = this.Zf(
|
|
4016
|
+
if (this.Cf = null, this.Nf = !1, this.Bf && (this.Bf(), this.Bf = null), $i() && this.np.ownerDocument.documentElement.removeEventListener("mouseleave", this.Uf), !this.jf(t)) if (this.tp(i, this.Jf.bp), ++this.vf, this.mf && this.vf > 1) {
|
|
4017
|
+
const { Kf: s } = this.Zf(I(t), this.wf);
|
|
4048
4018
|
s < 5 && !this.Pf && this.tp(i, this.Jf.ip), this.sp();
|
|
4049
4019
|
} else this.Pf || this.tp(i, this.Jf.Sp);
|
|
4050
4020
|
}
|
|
@@ -4056,7 +4026,7 @@ class Rt {
|
|
|
4056
4026
|
const i = t.changedTouches[0];
|
|
4057
4027
|
this.Wf = i.identifier, this.Ff = bt(t);
|
|
4058
4028
|
const s = this.np.ownerDocument.documentElement;
|
|
4059
|
-
this.Tf = !1, this.kf = !1, this.Of = !1, this.yf =
|
|
4029
|
+
this.Tf = !1, this.kf = !1, this.Of = !1, this.yf = I(i), this.Ef && (this.Ef(), this.Ef = null);
|
|
4060
4030
|
{
|
|
4061
4031
|
const n = this._p.bind(this), r = this.wp.bind(this);
|
|
4062
4032
|
this.Ef = () => {
|
|
@@ -4064,12 +4034,12 @@ class Rt {
|
|
|
4064
4034
|
}, s.addEventListener("touchmove", n, { passive: !1 }), s.addEventListener("touchend", r, { passive: !1 }), this.rp(), this.Sf = setTimeout(this.Cp.bind(this, t), 240);
|
|
4065
4035
|
}
|
|
4066
4036
|
const e = this.Yf(t, i);
|
|
4067
|
-
this.Gf(e, this.Jf.yp), this.Mf || (this.gf = 0, this.Mf = setTimeout(this.Qf.bind(this), 500), this.bf =
|
|
4037
|
+
this.Gf(e, this.Jf.yp), this.Mf || (this.gf = 0, this.Mf = setTimeout(this.Qf.bind(this), 500), this.bf = I(i));
|
|
4068
4038
|
}
|
|
4069
4039
|
kp(t) {
|
|
4070
4040
|
if (t.button !== 0) return;
|
|
4071
4041
|
const i = this.np.ownerDocument.documentElement;
|
|
4072
|
-
|
|
4042
|
+
$i() && i.addEventListener("mouseleave", this.Uf), this.Pf = !1, this.Cf = I(t), this.Bf && (this.Bf(), this.Bf = null);
|
|
4073
4043
|
{
|
|
4074
4044
|
const e = this.vp.bind(this), n = this.$f.bind(this);
|
|
4075
4045
|
this.Bf = () => {
|
|
@@ -4078,7 +4048,7 @@ class Rt {
|
|
|
4078
4048
|
}
|
|
4079
4049
|
if (this.Nf = !0, this.jf(t)) return;
|
|
4080
4050
|
const s = this.Yf(t);
|
|
4081
|
-
this.tp(s, this.Jf.Pp), this.mf || (this.vf = 0, this.mf = setTimeout(this.sp.bind(this), 500), this.wf =
|
|
4051
|
+
this.tp(s, this.Jf.Pp), this.mf || (this.vf = 0, this.mf = setTimeout(this.sp.bind(this), 500), this.wf = I(t));
|
|
4082
4052
|
}
|
|
4083
4053
|
ep() {
|
|
4084
4054
|
this.np.addEventListener("mouseenter", this.hp.bind(this)), this.np.addEventListener("touchcancel", this.rp.bind(this));
|
|
@@ -4094,25 +4064,25 @@ class Rt {
|
|
|
4094
4064
|
}
|
|
4095
4065
|
Ut() && (this.If = () => {
|
|
4096
4066
|
this.np.removeEventListener("dblclick", this.qf);
|
|
4097
|
-
}, this.np.addEventListener("dblclick", this.qf)), this.np.addEventListener("mouseleave", this.Rp.bind(this)), this.np.addEventListener("touchstart", this.xp.bind(this), { passive: !0 }),
|
|
4098
|
-
}, { passive: !1 });
|
|
4067
|
+
}, this.np.addEventListener("dblclick", this.qf)), this.np.addEventListener("mouseleave", this.Rp.bind(this)), this.np.addEventListener("touchstart", this.xp.bind(this), { passive: !0 }), hh(this.np), this.np.addEventListener("mousedown", this.kp.bind(this)), this.Dp(), this.np.addEventListener("touchmove", (() => {
|
|
4068
|
+
}), { passive: !1 });
|
|
4099
4069
|
}
|
|
4100
4070
|
Dp() {
|
|
4101
|
-
this.Jf.Ip === void 0 && this.Jf.Vp === void 0 && this.Jf.Bp === void 0 || (this.np.addEventListener("touchstart", (t) => this.Ep(t.touches), { passive: !0 }), this.np.addEventListener("touchmove", (t) => {
|
|
4071
|
+
this.Jf.Ip === void 0 && this.Jf.Vp === void 0 && this.Jf.Bp === void 0 || (this.np.addEventListener("touchstart", ((t) => this.Ep(t.touches)), { passive: !0 }), this.np.addEventListener("touchmove", ((t) => {
|
|
4102
4072
|
if (t.touches.length === 2 && this.Af !== null && this.Jf.Vp !== void 0) {
|
|
4103
|
-
const i =
|
|
4073
|
+
const i = Ui(t.touches[0], t.touches[1]) / this.Lf;
|
|
4104
4074
|
this.Jf.Vp(this.Af, i), X(t);
|
|
4105
4075
|
}
|
|
4106
|
-
}, { passive: !1 }), this.np.addEventListener("touchend", (t) => {
|
|
4076
|
+
}), { passive: !1 }), this.np.addEventListener("touchend", ((t) => {
|
|
4107
4077
|
this.Ep(t.touches);
|
|
4108
|
-
}));
|
|
4078
|
+
})));
|
|
4109
4079
|
}
|
|
4110
4080
|
Ep(t) {
|
|
4111
4081
|
t.length === 1 && (this.zf = !1), t.length !== 2 || this.zf || this.xf ? this.Ap() : this.Lp(t);
|
|
4112
4082
|
}
|
|
4113
4083
|
Lp(t) {
|
|
4114
4084
|
const i = this.np.getBoundingClientRect() || { left: 0, top: 0 };
|
|
4115
|
-
this.Af = { _t: (t[0].clientX - i.left + (t[1].clientX - i.left)) / 2, ut: (t[0].clientY - i.top + (t[1].clientY - i.top)) / 2 }, this.Lf =
|
|
4085
|
+
this.Af = { _t: (t[0].clientX - i.left + (t[1].clientX - i.left)) / 2, ut: (t[0].clientY - i.top + (t[1].clientY - i.top)) / 2 }, this.Lf = Ui(t[0], t[1]), this.Jf.Ip !== void 0 && this.Jf.Ip(), this.rp();
|
|
4116
4086
|
}
|
|
4117
4087
|
Ap() {
|
|
4118
4088
|
this.Af !== null && (this.Af = null, this.Jf.Bp !== void 0 && this.Jf.Bp());
|
|
@@ -4144,14 +4114,14 @@ class Rt {
|
|
|
4144
4114
|
} };
|
|
4145
4115
|
}
|
|
4146
4116
|
}
|
|
4147
|
-
function
|
|
4117
|
+
function Ui(h, t) {
|
|
4148
4118
|
const i = h.clientX - t.clientX, s = h.clientY - t.clientY;
|
|
4149
4119
|
return Math.sqrt(i * i + s * s);
|
|
4150
4120
|
}
|
|
4151
4121
|
function X(h) {
|
|
4152
4122
|
h.cancelable && h.preventDefault();
|
|
4153
4123
|
}
|
|
4154
|
-
function
|
|
4124
|
+
function I(h) {
|
|
4155
4125
|
return { _t: h.pageX, ut: h.pageY };
|
|
4156
4126
|
}
|
|
4157
4127
|
function bt(h) {
|
|
@@ -4161,7 +4131,7 @@ function Xt(h, t) {
|
|
|
4161
4131
|
for (let i = 0; i < h.length; ++i) if (h[i].identifier === t) return h[i];
|
|
4162
4132
|
return null;
|
|
4163
4133
|
}
|
|
4164
|
-
class
|
|
4134
|
+
class nh {
|
|
4165
4135
|
constructor(t, i, s) {
|
|
4166
4136
|
this.Up = null, this.$p = null, this.qp = !0, this.jp = null, this.Yp = t, this.Kp = t.Zp()[i], this.Gp = t.Zp()[s], this.Xp = document.createElement("tr"), this.Xp.style.height = "1px", this.Jp = document.createElement("td"), this.Jp.style.position = "relative", this.Jp.style.padding = "0", this.Jp.style.margin = "0", this.Jp.setAttribute("colspan", "3"), this.Qp(), this.Xp.appendChild(this.Jp), this.qp = this.Yp.N().layout.panes.enableResize, this.qp ? this.tv() : (this.Up = null, this.$p = null);
|
|
4167
4137
|
}
|
|
@@ -4172,10 +4142,10 @@ class hh {
|
|
|
4172
4142
|
return this.Xp;
|
|
4173
4143
|
}
|
|
4174
4144
|
sv() {
|
|
4175
|
-
return
|
|
4145
|
+
return _({ width: this.Kp.sv().width, height: 1 });
|
|
4176
4146
|
}
|
|
4177
4147
|
nv() {
|
|
4178
|
-
return
|
|
4148
|
+
return _({ width: this.Kp.nv().width, height: 1 * window.devicePixelRatio });
|
|
4179
4149
|
}
|
|
4180
4150
|
ev(t, i, s) {
|
|
4181
4151
|
const e = this.nv();
|
|
@@ -4223,7 +4193,7 @@ function Ht(h, t, i) {
|
|
|
4223
4193
|
const s = (h.gv - t.gv) / (h.wt - t.wt);
|
|
4224
4194
|
return Math.sign(s) * Math.min(Math.abs(s), i);
|
|
4225
4195
|
}
|
|
4226
|
-
class
|
|
4196
|
+
class rh {
|
|
4227
4197
|
constructor(t, i, s, e) {
|
|
4228
4198
|
this.Mv = null, this.bv = null, this.Sv = null, this.xv = null, this.Cv = null, this.yv = 0, this.kv = 0, this.Pv = t, this.Tv = i, this.Rv = s, this.kn = e;
|
|
4229
4199
|
}
|
|
@@ -4245,18 +4215,18 @@ class nh {
|
|
|
4245
4215
|
if (r.push(a), o.push(u), s += u, this.xv !== null) {
|
|
4246
4216
|
const c = Ht(this.Sv, this.xv, this.Tv);
|
|
4247
4217
|
if (Math.sign(c) === Math.sign(e)) {
|
|
4248
|
-
const
|
|
4249
|
-
r.push(c), o.push(
|
|
4218
|
+
const f = Gt(this.Sv, this.xv);
|
|
4219
|
+
r.push(c), o.push(f), s += f;
|
|
4250
4220
|
}
|
|
4251
4221
|
}
|
|
4252
4222
|
}
|
|
4253
4223
|
}
|
|
4254
4224
|
let l = 0;
|
|
4255
4225
|
for (let a = 0; a < r.length; ++a) l += o[a] / s * r[a];
|
|
4256
|
-
Math.abs(l) < this.Pv || (this.Cv = { gv: t, wt: i }, this.kv = l, this.yv = function(a, u) {
|
|
4226
|
+
Math.abs(l) < this.Pv || (this.Cv = { gv: t, wt: i }, this.kv = l, this.yv = (function(a, u) {
|
|
4257
4227
|
const c = Math.log(u);
|
|
4258
4228
|
return Math.log(1 * c / -a) / c;
|
|
4259
|
-
}(Math.abs(l), this.Rv));
|
|
4229
|
+
})(Math.abs(l), this.Rv));
|
|
4260
4230
|
}
|
|
4261
4231
|
Ac(t) {
|
|
4262
4232
|
const i = p(this.Cv), s = t - i.wt;
|
|
@@ -4270,7 +4240,7 @@ class nh {
|
|
|
4270
4240
|
return Math.min(i, this.yv);
|
|
4271
4241
|
}
|
|
4272
4242
|
}
|
|
4273
|
-
class
|
|
4243
|
+
class oh {
|
|
4274
4244
|
constructor(t, i) {
|
|
4275
4245
|
this.Vv = void 0, this.Bv = void 0, this.Ev = void 0, this.ws = !1, this.Av = t, this.Lv = i, this.zv();
|
|
4276
4246
|
}
|
|
@@ -4300,20 +4270,19 @@ class rh {
|
|
|
4300
4270
|
function $(h, t) {
|
|
4301
4271
|
const i = p(h.ownerDocument).createElement("canvas");
|
|
4302
4272
|
h.appendChild(i);
|
|
4303
|
-
const s = Js(i, {
|
|
4273
|
+
const s = Js(i, { options: { allowResizeObserver: !0 }, transform: (e, n) => ({ width: Math.max(e.width, n.width), height: Math.max(e.height, n.height) }) });
|
|
4304
4274
|
return s.resizeCanvasElement(t), s;
|
|
4305
4275
|
}
|
|
4306
4276
|
function U(h) {
|
|
4307
|
-
|
|
4308
|
-
h.width = 1, h.height = 1, (t = h.getContext("2d")) == null || t.clearRect(0, 0, 1, 1);
|
|
4277
|
+
h.width = 1, h.height = 1, h.getContext("2d")?.clearRect(0, 0, 1, 1);
|
|
4309
4278
|
}
|
|
4310
|
-
function
|
|
4279
|
+
function oi(h, t, i, s) {
|
|
4311
4280
|
h.Uh && h.Uh(t, i, s);
|
|
4312
4281
|
}
|
|
4313
4282
|
function yt(h, t, i, s) {
|
|
4314
4283
|
h.nt(t, i, s);
|
|
4315
4284
|
}
|
|
4316
|
-
function
|
|
4285
|
+
function li(h, t, i, s) {
|
|
4317
4286
|
const e = h(i, s);
|
|
4318
4287
|
for (const n of e) {
|
|
4319
4288
|
const r = n.Tt(s);
|
|
@@ -4321,42 +4290,39 @@ function oi(h, t, i, s) {
|
|
|
4321
4290
|
}
|
|
4322
4291
|
}
|
|
4323
4292
|
function Qt(h, t) {
|
|
4324
|
-
return (i) => {
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
return n.Ft !== void 0;
|
|
4328
|
-
}(i) ? (((s = i.Ft()) == null ? void 0 : s.ol()) ?? "") !== t ? [] : ((e = i.Ya) == null ? void 0 : e.call(i, h)) ?? [] : [];
|
|
4329
|
-
};
|
|
4293
|
+
return (i) => (function(s) {
|
|
4294
|
+
return s.Ft !== void 0;
|
|
4295
|
+
})(i) ? (i.Ft()?.ol() ?? "") !== t ? [] : i.Ya?.(h) ?? [] : [];
|
|
4330
4296
|
}
|
|
4331
|
-
function
|
|
4297
|
+
function Xi(h, t, i, s) {
|
|
4332
4298
|
if (!h.length) return;
|
|
4333
4299
|
let e = 0;
|
|
4334
4300
|
const n = h[0].$t(s, !0);
|
|
4335
4301
|
let r = t === 1 ? i / 2 - (h[0].Hi() - n / 2) : h[0].Hi() - n / 2 - i / 2;
|
|
4336
4302
|
r = Math.max(0, r);
|
|
4337
4303
|
for (let o = 1; o < h.length; o++) {
|
|
4338
|
-
const l = h[o], a = h[o - 1], u = a.$t(s, !1), c = l.Hi(),
|
|
4339
|
-
if (t === 1 ? c >
|
|
4340
|
-
const
|
|
4341
|
-
l.Ui(
|
|
4342
|
-
const m =
|
|
4304
|
+
const l = h[o], a = h[o - 1], u = a.$t(s, !1), c = l.Hi(), f = a.Hi();
|
|
4305
|
+
if (t === 1 ? c > f - u : c < f + u) {
|
|
4306
|
+
const d = f - u * t;
|
|
4307
|
+
l.Ui(d);
|
|
4308
|
+
const m = d - t * u / 2;
|
|
4343
4309
|
if ((t === 1 ? m < 0 : m > i) && r > 0) {
|
|
4344
|
-
const
|
|
4345
|
-
for (let
|
|
4346
|
-
r -=
|
|
4310
|
+
const w = t === 1 ? -1 - m : m - i, v = Math.min(w, r);
|
|
4311
|
+
for (let g = e; g < h.length; g++) h[g].Ui(h[g].Hi() + t * v);
|
|
4312
|
+
r -= v;
|
|
4347
4313
|
}
|
|
4348
|
-
} else e = o, r = t === 1 ?
|
|
4314
|
+
} else e = o, r = t === 1 ? f - u - c : c - (f + u);
|
|
4349
4315
|
}
|
|
4350
4316
|
}
|
|
4351
|
-
class
|
|
4317
|
+
class Gi {
|
|
4352
4318
|
constructor(t, i, s, e) {
|
|
4353
4319
|
this.Ki = null, this.Uv = null, this.$v = !1, this.qv = new xt(200), this.jv = null, this.Yv = 0, this.Kv = !1, this.Zv = () => {
|
|
4354
4320
|
this.Kv || this.yt.Gv().Qt().dr();
|
|
4355
4321
|
}, this.Xv = () => {
|
|
4356
4322
|
this.Kv || this.yt.Gv().Qt().dr();
|
|
4357
|
-
}, this.yt = t, this.Ps = i, this.Co = i.layout, this.hd = s, this.Jv = e === "left", this.Qv = Qt("normal", e), this.tm = Qt("top", e), this.im = Qt("bottom", e), this.Jp = document.createElement("div"), this.Jp.style.height = "100%", this.Jp.style.overflow = "hidden", this.Jp.style.width = "25px", this.Jp.style.left = "0", this.Jp.style.position = "relative", this.sm = $(this.Jp,
|
|
4323
|
+
}, this.yt = t, this.Ps = i, this.Co = i.layout, this.hd = s, this.Jv = e === "left", this.Qv = Qt("normal", e), this.tm = Qt("top", e), this.im = Qt("bottom", e), this.Jp = document.createElement("div"), this.Jp.style.height = "100%", this.Jp.style.overflow = "hidden", this.Jp.style.width = "25px", this.Jp.style.left = "0", this.Jp.style.position = "relative", this.sm = $(this.Jp, _({ width: 16, height: 16 })), this.sm.subscribeSuggestedBitmapSizeChanged(this.Zv);
|
|
4358
4324
|
const n = this.sm.canvasElement;
|
|
4359
|
-
n.style.position = "absolute", n.style.zIndex = "1", n.style.left = "0", n.style.top = "0", this.nm = $(this.Jp,
|
|
4325
|
+
n.style.position = "absolute", n.style.zIndex = "1", n.style.left = "0", n.style.top = "0", this.nm = $(this.Jp, _({ width: 16, height: 16 })), this.nm.subscribeSuggestedBitmapSizeChanged(this.Xv);
|
|
4360
4326
|
const r = this.nm.canvasElement;
|
|
4361
4327
|
r.style.position = "absolute", r.style.zIndex = "2", r.style.left = "0", r.style.top = "0";
|
|
4362
4328
|
const o = { Pp: this.ov.bind(this), yp: this.ov.bind(this), mp: this._v.bind(this), pp: this._v.bind(this), Tp: this.rm.bind(this), bp: this.uv.bind(this), gp: this.uv.bind(this), ip: this.hm.bind(this), Xf: this.hm.bind(this), lp: this.am.bind(this), zp: this.lv.bind(this) };
|
|
@@ -4395,7 +4361,7 @@ class Xi {
|
|
|
4395
4361
|
var o;
|
|
4396
4362
|
s.restore();
|
|
4397
4363
|
const l = t || 34;
|
|
4398
|
-
return
|
|
4364
|
+
return ri(Math.ceil(i.S + i.C + i.V + i.B + 5 + l));
|
|
4399
4365
|
}
|
|
4400
4366
|
dm(t) {
|
|
4401
4367
|
this.Uv !== null && A(this.Uv, t) || (this.Uv = t, this.Kv = !0, this.sm.resizeCanvasElement(t), this.nm.resizeCanvasElement(t), this.Kv = !1, this.Jp.style.width = `${t.width}px`, this.Jp.style.height = `${t.height}px`);
|
|
@@ -4418,16 +4384,16 @@ class Xi {
|
|
|
4418
4384
|
const i = { colorSpace: this.yt.Gv().N().layout.colorSpace };
|
|
4419
4385
|
if (t !== 1) {
|
|
4420
4386
|
this.vm(), this.sm.applySuggestedBitmapSize();
|
|
4421
|
-
const e =
|
|
4422
|
-
e !== null && (e.useBitmapCoordinateSpace((n) => {
|
|
4387
|
+
const e = Y(this.sm, i);
|
|
4388
|
+
e !== null && (e.useBitmapCoordinateSpace(((n) => {
|
|
4423
4389
|
this.wm(n), this.gm(n);
|
|
4424
|
-
}), this.yt.Mm(e, this.im), this.bm(e), this.yt.Mm(e, this.Qv), this.Sm(e));
|
|
4390
|
+
})), this.yt.Mm(e, this.im), this.bm(e), this.yt.Mm(e, this.Qv), this.Sm(e));
|
|
4425
4391
|
}
|
|
4426
4392
|
this.nm.applySuggestedBitmapSize();
|
|
4427
|
-
const s =
|
|
4428
|
-
s !== null && (s.useBitmapCoordinateSpace(({ context: e, bitmapSize: n }) => {
|
|
4393
|
+
const s = Y(this.nm, i);
|
|
4394
|
+
s !== null && (s.useBitmapCoordinateSpace((({ context: e, bitmapSize: n }) => {
|
|
4429
4395
|
e.clearRect(0, 0, n.width, n.height);
|
|
4430
|
-
}), this.xm(s), this.yt.Mm(s, this.tm));
|
|
4396
|
+
})), this.xm(s), this.yt.Mm(s, this.tm));
|
|
4431
4397
|
}
|
|
4432
4398
|
nv() {
|
|
4433
4399
|
return this.sm.bitmapSize;
|
|
@@ -4440,8 +4406,7 @@ class Xi {
|
|
|
4440
4406
|
}
|
|
4441
4407
|
}
|
|
4442
4408
|
kt() {
|
|
4443
|
-
|
|
4444
|
-
(t = this.Ki) == null || t.Vl();
|
|
4409
|
+
this.Ki?.Vl();
|
|
4445
4410
|
}
|
|
4446
4411
|
ov(t) {
|
|
4447
4412
|
if (this.Ki === null || this.Ki.Gi() || !this.Ps.handleScale.axisPressedMouseMove.price) return;
|
|
@@ -4495,63 +4460,63 @@ class Xi {
|
|
|
4495
4460
|
bm(t) {
|
|
4496
4461
|
if (this.Uv === null || this.Ki === null) return;
|
|
4497
4462
|
const i = this.Ki.Vl(), s = this.Ki.N(), e = this.lm(), n = this.Jv ? this.Uv.width - e.C : 0;
|
|
4498
|
-
s.borderVisible && s.ticksVisible && t.useBitmapCoordinateSpace(({ context: r, horizontalPixelRatio: o, verticalPixelRatio: l }) => {
|
|
4463
|
+
s.borderVisible && s.ticksVisible && t.useBitmapCoordinateSpace((({ context: r, horizontalPixelRatio: o, verticalPixelRatio: l }) => {
|
|
4499
4464
|
r.fillStyle = s.borderColor;
|
|
4500
4465
|
const a = Math.max(1, Math.floor(l)), u = Math.floor(0.5 * l), c = Math.round(e.C * o);
|
|
4501
4466
|
r.beginPath();
|
|
4502
|
-
for (const
|
|
4467
|
+
for (const f of i) r.rect(Math.floor(n * o), Math.round(f.Pl * l) - u, c, a);
|
|
4503
4468
|
r.fill();
|
|
4504
|
-
}), t.useMediaCoordinateSpace(({ context: r }) => {
|
|
4469
|
+
})), t.useMediaCoordinateSpace((({ context: r }) => {
|
|
4505
4470
|
r.font = this._m(), r.fillStyle = s.textColor ?? this.Co.textColor, r.textAlign = this.Jv ? "right" : "left", r.textBaseline = "middle";
|
|
4506
|
-
const o = this.Jv ? Math.round(n - e.V) : Math.round(n + e.C + e.V), l = i.map((a) => this.qv.Di(r, a.Jl));
|
|
4471
|
+
const o = this.Jv ? Math.round(n - e.V) : Math.round(n + e.C + e.V), l = i.map(((a) => this.qv.Di(r, a.Jl)));
|
|
4507
4472
|
for (let a = i.length; a--; ) {
|
|
4508
4473
|
const u = i[a];
|
|
4509
4474
|
r.fillText(u.Jl, o, u.Pl + l[a]);
|
|
4510
4475
|
}
|
|
4511
|
-
});
|
|
4476
|
+
}));
|
|
4512
4477
|
}
|
|
4513
4478
|
vm() {
|
|
4514
4479
|
if (this.Uv === null || this.Ki === null) return;
|
|
4515
4480
|
let t = this.Uv.height / 2;
|
|
4516
4481
|
const i = [], s = this.Ki.Dt().slice(), e = this.yt.cv(), n = this.lm();
|
|
4517
|
-
this.Ki === e.Gn() && this.yt.cv().Dt().forEach((l) => {
|
|
4482
|
+
this.Ki === e.Gn() && this.yt.cv().Dt().forEach(((l) => {
|
|
4518
4483
|
e.Zn(l) && s.push(l);
|
|
4519
|
-
});
|
|
4484
|
+
}));
|
|
4520
4485
|
const r = this.Ki.Sl()[0], o = this.Ki;
|
|
4521
|
-
s.forEach((l) => {
|
|
4486
|
+
s.forEach(((l) => {
|
|
4522
4487
|
const a = l.Ks(e, o);
|
|
4523
|
-
a.forEach((u) => {
|
|
4488
|
+
a.forEach(((u) => {
|
|
4524
4489
|
u.$i() && u.Wi() === null && (u.Ui(null), i.push(u));
|
|
4525
|
-
}), r === l && a.length > 0 && (t = a[0].Ei());
|
|
4526
|
-
}), this.Ki.N().alignLabels && this.ym(i, n, t);
|
|
4490
|
+
})), r === l && a.length > 0 && (t = a[0].Ei());
|
|
4491
|
+
})), this.Ki.N().alignLabels && this.ym(i, n, t);
|
|
4527
4492
|
}
|
|
4528
4493
|
ym(t, i, s) {
|
|
4529
4494
|
if (this.Uv === null) return;
|
|
4530
|
-
const e = t.filter((r) => r.Ei() <= s), n = t.filter((r) => r.Ei() > s);
|
|
4531
|
-
e.sort((r, o) => o.Ei() - r.Ei()), e.length && n.length && n.push(e[0]), n.sort((r, o) => r.Ei() - o.Ei());
|
|
4495
|
+
const e = t.filter(((r) => r.Ei() <= s)), n = t.filter(((r) => r.Ei() > s));
|
|
4496
|
+
e.sort(((r, o) => o.Ei() - r.Ei())), e.length && n.length && n.push(e[0]), n.sort(((r, o) => r.Ei() - o.Ei()));
|
|
4532
4497
|
for (const r of t) {
|
|
4533
4498
|
const o = Math.floor(r.$t(i) / 2), l = r.Ei();
|
|
4534
4499
|
l > -o && l < o && r.Ui(o), l > this.Uv.height - o && l < this.Uv.height + o && r.Ui(this.Uv.height - o);
|
|
4535
4500
|
}
|
|
4536
|
-
|
|
4501
|
+
Xi(e, 1, this.Uv.height, i), Xi(n, -1, this.Uv.height, i);
|
|
4537
4502
|
}
|
|
4538
4503
|
Sm(t) {
|
|
4539
4504
|
if (this.Uv === null) return;
|
|
4540
4505
|
const i = this.um(), s = this.lm(), e = this.Jv ? "right" : "left";
|
|
4541
|
-
i.forEach((n) => {
|
|
4506
|
+
i.forEach(((n) => {
|
|
4542
4507
|
n.qi() && n.Tt(p(this.Ki)).nt(t, s, this.qv, e);
|
|
4543
|
-
});
|
|
4508
|
+
}));
|
|
4544
4509
|
}
|
|
4545
4510
|
xm(t) {
|
|
4546
4511
|
if (this.Uv === null || this.Ki === null) return;
|
|
4547
4512
|
const i = this.yt.Gv().Qt(), s = [], e = this.yt.cv(), n = i.gd().Ks(e, this.Ki);
|
|
4548
4513
|
n.length && s.push(n);
|
|
4549
4514
|
const r = this.lm(), o = this.Jv ? "right" : "left";
|
|
4550
|
-
s.forEach((l) => {
|
|
4551
|
-
l.forEach((a) => {
|
|
4515
|
+
s.forEach(((l) => {
|
|
4516
|
+
l.forEach(((a) => {
|
|
4552
4517
|
a.Tt(p(this.Ki)).nt(t, r, this.qv, o);
|
|
4553
|
-
});
|
|
4554
|
-
});
|
|
4518
|
+
}));
|
|
4519
|
+
}));
|
|
4555
4520
|
}
|
|
4556
4521
|
Cm(t) {
|
|
4557
4522
|
this.Jp.style.cursor = t === 1 ? "ns-resize" : "default";
|
|
@@ -4564,33 +4529,29 @@ class Xi {
|
|
|
4564
4529
|
return St(this.Co.fontSize, this.Co.fontFamily);
|
|
4565
4530
|
}
|
|
4566
4531
|
}
|
|
4567
|
-
function
|
|
4568
|
-
|
|
4569
|
-
return ((i = h.qa) == null ? void 0 : i.call(h, t)) ?? [];
|
|
4570
|
-
}
|
|
4571
|
-
function Gi(h, t) {
|
|
4572
|
-
var i;
|
|
4573
|
-
return ((i = h.Ys) == null ? void 0 : i.call(h, t)) ?? [];
|
|
4532
|
+
function lh(h, t) {
|
|
4533
|
+
return h.qa?.(t) ?? [];
|
|
4574
4534
|
}
|
|
4575
4535
|
function Hi(h, t) {
|
|
4576
|
-
|
|
4577
|
-
return ((i = h.ds) == null ? void 0 : i.call(h, t)) ?? [];
|
|
4536
|
+
return h.Ys?.(t) ?? [];
|
|
4578
4537
|
}
|
|
4579
|
-
function
|
|
4580
|
-
|
|
4581
|
-
|
|
4538
|
+
function Qi(h, t) {
|
|
4539
|
+
return h.ds?.(t) ?? [];
|
|
4540
|
+
}
|
|
4541
|
+
function ah(h, t) {
|
|
4542
|
+
return h.Ha?.(t) ?? [];
|
|
4582
4543
|
}
|
|
4583
|
-
class
|
|
4544
|
+
class ci {
|
|
4584
4545
|
constructor(t, i) {
|
|
4585
|
-
this.Uv =
|
|
4546
|
+
this.Uv = _({ width: 0, height: 0 }), this.km = null, this.Pm = null, this.Tm = null, this.Rm = null, this.Dm = !1, this.Im = new S(), this.Vm = new S(), this.Bm = 0, this.Em = !1, this.Am = null, this.Lm = !1, this.zm = null, this.Om = null, this.Kv = !1, this.Zv = () => {
|
|
4586
4547
|
this.Kv || this.Nm === null || this.ns().dr();
|
|
4587
4548
|
}, this.Xv = () => {
|
|
4588
4549
|
this.Kv || this.Nm === null || this.ns().dr();
|
|
4589
4550
|
}, this.Lv = t, this.Nm = i, this.Nm.nu().i(this.Fm.bind(this), this, !0), this.Wm = document.createElement("td"), this.Wm.style.padding = "0", this.Wm.style.position = "relative";
|
|
4590
4551
|
const s = document.createElement("div");
|
|
4591
|
-
s.style.width = "100%", s.style.height = "100%", s.style.position = "relative", s.style.overflow = "hidden", this.Hm = document.createElement("td"), this.Hm.style.padding = "0", this.Um = document.createElement("td"), this.Um.style.padding = "0", this.Wm.appendChild(s), this.sm = $(s,
|
|
4552
|
+
s.style.width = "100%", s.style.height = "100%", s.style.position = "relative", s.style.overflow = "hidden", this.Hm = document.createElement("td"), this.Hm.style.padding = "0", this.Um = document.createElement("td"), this.Um.style.padding = "0", this.Wm.appendChild(s), this.sm = $(s, _({ width: 16, height: 16 })), this.sm.subscribeSuggestedBitmapSizeChanged(this.Zv);
|
|
4592
4553
|
const e = this.sm.canvasElement;
|
|
4593
|
-
e.style.position = "absolute", e.style.zIndex = "1", e.style.left = "0", e.style.top = "0", this.nm = $(s,
|
|
4554
|
+
e.style.position = "absolute", e.style.zIndex = "1", e.style.left = "0", e.style.top = "0", this.nm = $(s, _({ width: 16, height: 16 })), this.nm.subscribeSuggestedBitmapSizeChanged(this.Xv);
|
|
4594
4555
|
const n = this.nm.canvasElement;
|
|
4595
4556
|
n.style.position = "absolute", n.style.zIndex = "2", n.style.left = "0", n.style.top = "0", this.Xp = document.createElement("tr"), this.Xp.appendChild(this.Hm), this.Xp.appendChild(this.Wm), this.Xp.appendChild(this.Um), this.$m(), this.$p = new Rt(this.nm.canvasElement, this, { dp: () => this.Am === null && !this.Lv.N().handleScroll.vertTouchDrag, fp: () => this.Am === null && !this.Lv.N().handleScroll.horzTouchDrag });
|
|
4596
4557
|
}
|
|
@@ -4601,8 +4562,7 @@ class ui {
|
|
|
4601
4562
|
return p(this.Nm);
|
|
4602
4563
|
}
|
|
4603
4564
|
qm(t) {
|
|
4604
|
-
|
|
4605
|
-
this.Nm !== null && this.Nm.nu().u(this), this.Nm = t, this.Nm !== null && this.Nm.nu().i(ui.prototype.Fm.bind(this), this, !0), this.$m(), this.Lv.Zp().indexOf(this) === this.Lv.Zp().length - 1 ? (this.Tm = this.Tm ?? new rh(this.Wm, this.Lv), this.Tm.kt()) : ((i = this.Tm) == null || i.Ov(), this.Tm = null);
|
|
4565
|
+
this.Nm !== null && this.Nm.nu().u(this), this.Nm = t, this.Nm !== null && this.Nm.nu().i(ci.prototype.Fm.bind(this), this, !0), this.$m(), this.Lv.Zp().indexOf(this) === this.Lv.Zp().length - 1 ? (this.Tm = this.Tm ?? new oh(this.Wm, this.Lv), this.Tm.kt()) : (this.Tm?.Ov(), this.Tm = null);
|
|
4606
4566
|
}
|
|
4607
4567
|
Gv() {
|
|
4608
4568
|
return this.Lv;
|
|
@@ -4710,7 +4670,7 @@ class ui {
|
|
|
4710
4670
|
return s === null ? null : Ls(s, t, i);
|
|
4711
4671
|
}
|
|
4712
4672
|
hw(t, i) {
|
|
4713
|
-
p(i === "left" ? this.km : this.Pm).dm(
|
|
4673
|
+
p(i === "left" ? this.km : this.Pm).dm(_({ width: t, height: this.Uv.height }));
|
|
4714
4674
|
}
|
|
4715
4675
|
sv() {
|
|
4716
4676
|
return this.Uv;
|
|
@@ -4743,16 +4703,16 @@ class ui {
|
|
|
4743
4703
|
const i = { colorSpace: this.Lv.N().layout.colorSpace };
|
|
4744
4704
|
if (t !== 1) {
|
|
4745
4705
|
this.sm.applySuggestedBitmapSize();
|
|
4746
|
-
const e =
|
|
4747
|
-
e !== null && (e.useBitmapCoordinateSpace((n) => {
|
|
4706
|
+
const e = Y(this.sm, i);
|
|
4707
|
+
e !== null && (e.useBitmapCoordinateSpace(((n) => {
|
|
4748
4708
|
this.wm(n);
|
|
4749
|
-
}), this.Nm && (this.lw(e,
|
|
4709
|
+
})), this.Nm && (this.lw(e, lh), this.ow(e), this.lw(e, Hi), this.lw(e, Qi)));
|
|
4750
4710
|
}
|
|
4751
4711
|
this.nm.applySuggestedBitmapSize();
|
|
4752
|
-
const s =
|
|
4753
|
-
s !== null && (s.useBitmapCoordinateSpace(({ context: e, bitmapSize: n }) => {
|
|
4712
|
+
const s = Y(this.nm, i);
|
|
4713
|
+
s !== null && (s.useBitmapCoordinateSpace((({ context: e, bitmapSize: n }) => {
|
|
4754
4714
|
e.clearRect(0, 0, n.width, n.height);
|
|
4755
|
-
}), this._w(s), this.lw(s,
|
|
4715
|
+
})), this._w(s), this.lw(s, ah), this.lw(s, Qi));
|
|
4756
4716
|
}
|
|
4757
4717
|
uw() {
|
|
4758
4718
|
return this.km;
|
|
@@ -4782,25 +4742,25 @@ class ui {
|
|
|
4782
4742
|
s !== null && s.nt(t, !1);
|
|
4783
4743
|
}
|
|
4784
4744
|
_w(t) {
|
|
4785
|
-
this.dw(t,
|
|
4745
|
+
this.dw(t, Hi, yt, this.ns().gd());
|
|
4786
4746
|
}
|
|
4787
4747
|
lw(t, i) {
|
|
4788
4748
|
const s = p(this.Nm), e = s.Dt(), n = s.ru();
|
|
4789
|
-
for (const r of n) this.dw(t, i,
|
|
4790
|
-
for (const r of e) this.dw(t, i,
|
|
4749
|
+
for (const r of n) this.dw(t, i, oi, r);
|
|
4750
|
+
for (const r of e) this.dw(t, i, oi, r);
|
|
4791
4751
|
for (const r of n) this.dw(t, i, yt, r);
|
|
4792
4752
|
for (const r of e) this.dw(t, i, yt, r);
|
|
4793
4753
|
}
|
|
4794
4754
|
dw(t, i, s, e) {
|
|
4795
4755
|
const n = p(this.Nm), r = n.Qt().pd(), o = r !== null && r.hu === e, l = r !== null && o && r.au !== void 0 ? r.au.ie : void 0;
|
|
4796
|
-
|
|
4756
|
+
li(i, ((a) => s(a, t, o, l)), e, n);
|
|
4797
4757
|
}
|
|
4798
4758
|
jm() {
|
|
4799
4759
|
if (this.Nm === null) return;
|
|
4800
4760
|
const t = this.Lv, i = this.Nm.U_().N().visible, s = this.Nm.q_().N().visible;
|
|
4801
4761
|
i || this.km === null || (this.Hm.removeChild(this.km.iv()), this.km.m(), this.km = null), s || this.Pm === null || (this.Um.removeChild(this.Pm.iv()), this.Pm.m(), this.Pm = null);
|
|
4802
4762
|
const e = t.Qt().Nd();
|
|
4803
|
-
i && this.km === null && (this.km = new
|
|
4763
|
+
i && this.km === null && (this.km = new Gi(this, t.N(), e, "left"), this.Hm.appendChild(this.km.iv())), s && this.Pm === null && (this.Pm = new Gi(this, t.N(), e, "right"), this.Um.appendChild(this.Pm.iv()));
|
|
4804
4764
|
}
|
|
4805
4765
|
fw(t) {
|
|
4806
4766
|
return t.Np && this.Em || this.Am !== null;
|
|
@@ -4853,16 +4813,16 @@ class ui {
|
|
|
4853
4813
|
if (this.Rm !== null || this.fw(t) || (this.Rm = { x: t.clientX, y: t.clientY, cf: l, pw: t.localX, mw: t.localY }), this.Rm !== null && !this.Dm && (this.Rm.x !== t.clientX || this.Rm.y !== t.clientY)) {
|
|
4854
4814
|
if (t.Np && r.touch || !t.Np && r.mouse) {
|
|
4855
4815
|
const a = s.ul();
|
|
4856
|
-
this.Om = new
|
|
4816
|
+
this.Om = new rh(0.2 / a, 7 / a, 0.997, 15 / a), this.Om.Dv(s.Cc(), this.Rm.cf);
|
|
4857
4817
|
} else this.Om = null;
|
|
4858
4818
|
o.Gi() || i.Z_(this.Nm, o, t.localY), i.Dd(t.localX), this.Dm = !0;
|
|
4859
4819
|
}
|
|
4860
4820
|
this.Dm && (o.Gi() || i.G_(this.Nm, o, t.localY), i.Id(t.localX), this.Om !== null && this.Om.Dv(s.Cc(), l));
|
|
4861
4821
|
}
|
|
4862
4822
|
}
|
|
4863
|
-
class
|
|
4823
|
+
class qi {
|
|
4864
4824
|
constructor(t, i, s, e, n) {
|
|
4865
|
-
this.xt = !0, this.Uv =
|
|
4825
|
+
this.xt = !0, this.Uv = _({ width: 0, height: 0 }), this.Zv = () => this.pm(3), this.Jv = t === "left", this.hd = s.Nd, this.Ps = i, this.ww = e, this.gw = n, this.Jp = document.createElement("div"), this.Jp.style.width = "25px", this.Jp.style.height = "100%", this.Jp.style.overflow = "hidden", this.sm = $(this.Jp, _({ width: 16, height: 16 })), this.sm.subscribeSuggestedBitmapSizeChanged(this.Zv);
|
|
4866
4826
|
}
|
|
4867
4827
|
m() {
|
|
4868
4828
|
this.sm.unsubscribeSuggestedBitmapSizeChanged(this.Zv), U(this.sm.canvasElement), this.sm.dispose();
|
|
@@ -4879,10 +4839,10 @@ class Qi {
|
|
|
4879
4839
|
pm(t) {
|
|
4880
4840
|
if (t < 3 && !this.xt || this.Uv.width === 0 || this.Uv.height === 0) return;
|
|
4881
4841
|
this.xt = !1, this.sm.applySuggestedBitmapSize();
|
|
4882
|
-
const i =
|
|
4883
|
-
i !== null && i.useBitmapCoordinateSpace((s) => {
|
|
4842
|
+
const i = Y(this.sm, { colorSpace: this.Ps.layout.colorSpace });
|
|
4843
|
+
i !== null && i.useBitmapCoordinateSpace(((s) => {
|
|
4884
4844
|
this.wm(s), this.gm(s);
|
|
4885
|
-
});
|
|
4845
|
+
}));
|
|
4886
4846
|
}
|
|
4887
4847
|
nv() {
|
|
4888
4848
|
return this.sm.bitmapSize;
|
|
@@ -4901,22 +4861,19 @@ class Qi {
|
|
|
4901
4861
|
Nt(t, 0, 0, i.width, i.height, this.gw());
|
|
4902
4862
|
}
|
|
4903
4863
|
}
|
|
4904
|
-
function
|
|
4905
|
-
return (t) =>
|
|
4906
|
-
var i;
|
|
4907
|
-
return ((i = t.Ka) == null ? void 0 : i.call(t, h)) ?? [];
|
|
4908
|
-
};
|
|
4864
|
+
function fi(h) {
|
|
4865
|
+
return (t) => t.Ka?.(h) ?? [];
|
|
4909
4866
|
}
|
|
4910
|
-
const
|
|
4867
|
+
const uh = fi("normal"), ch = fi("top"), fh = fi("bottom");
|
|
4911
4868
|
class dh {
|
|
4912
4869
|
constructor(t, i) {
|
|
4913
|
-
this.Mw = null, this.bw = null, this.M = null, this.Sw = !1, this.Uv =
|
|
4870
|
+
this.Mw = null, this.bw = null, this.M = null, this.Sw = !1, this.Uv = _({ width: 0, height: 0 }), this.xw = new S(), this.qv = new xt(5), this.Kv = !1, this.Zv = () => {
|
|
4914
4871
|
this.Kv || this.Lv.Qt().dr();
|
|
4915
4872
|
}, this.Xv = () => {
|
|
4916
4873
|
this.Kv || this.Lv.Qt().dr();
|
|
4917
|
-
}, this.Lv = t, this.cu = i, this.Ps = t.N().layout, this.Vv = document.createElement("tr"), this.Cw = document.createElement("td"), this.Cw.style.padding = "0", this.yw = document.createElement("td"), this.yw.style.padding = "0", this.Jp = document.createElement("td"), this.Jp.style.height = "25px", this.Jp.style.padding = "0", this.kw = document.createElement("div"), this.kw.style.width = "100%", this.kw.style.height = "100%", this.kw.style.position = "relative", this.kw.style.overflow = "hidden", this.Jp.appendChild(this.kw), this.sm = $(this.kw,
|
|
4874
|
+
}, this.Lv = t, this.cu = i, this.Ps = t.N().layout, this.Vv = document.createElement("tr"), this.Cw = document.createElement("td"), this.Cw.style.padding = "0", this.yw = document.createElement("td"), this.yw.style.padding = "0", this.Jp = document.createElement("td"), this.Jp.style.height = "25px", this.Jp.style.padding = "0", this.kw = document.createElement("div"), this.kw.style.width = "100%", this.kw.style.height = "100%", this.kw.style.position = "relative", this.kw.style.overflow = "hidden", this.Jp.appendChild(this.kw), this.sm = $(this.kw, _({ width: 16, height: 16 })), this.sm.subscribeSuggestedBitmapSizeChanged(this.Zv);
|
|
4918
4875
|
const s = this.sm.canvasElement;
|
|
4919
|
-
s.style.position = "absolute", s.style.zIndex = "1", s.style.left = "0", s.style.top = "0", this.nm = $(this.kw,
|
|
4876
|
+
s.style.position = "absolute", s.style.zIndex = "1", s.style.left = "0", s.style.top = "0", this.nm = $(this.kw, _({ width: 16, height: 16 })), this.nm.subscribeSuggestedBitmapSizeChanged(this.Xv);
|
|
4920
4877
|
const e = this.nm.canvasElement;
|
|
4921
4878
|
e.style.position = "absolute", e.style.zIndex = "2", e.style.left = "0", e.style.top = "0", this.Vv.appendChild(this.Cw), this.Vv.appendChild(this.Jp), this.Vv.appendChild(this.yw), this.Pw(), this.Lv.Qt().B_().i(this.Pw.bind(this), this), this.$p = new Rt(this.nm.canvasElement, this, { dp: () => !0, fp: () => !this.Lv.N().handleScroll.horzTouchDrag });
|
|
4922
4879
|
}
|
|
@@ -4979,7 +4936,7 @@ class dh {
|
|
|
4979
4936
|
return this.xw;
|
|
4980
4937
|
}
|
|
4981
4938
|
Iw(t, i, s) {
|
|
4982
|
-
A(this.Uv, t) || (this.Uv = t, this.Kv = !0, this.sm.resizeCanvasElement(t), this.nm.resizeCanvasElement(t), this.Kv = !1, this.Jp.style.width = `${t.width}px`, this.Jp.style.height = `${t.height}px`, this.xw.p(t)), this.Mw !== null && this.Mw.dm(
|
|
4939
|
+
A(this.Uv, t) || (this.Uv = t, this.Kv = !0, this.sm.resizeCanvasElement(t), this.nm.resizeCanvasElement(t), this.Kv = !1, this.Jp.style.width = `${t.width}px`, this.Jp.style.height = `${t.height}px`, this.xw.p(t)), this.Mw !== null && this.Mw.dm(_({ width: i, height: t.height })), this.bw !== null && this.bw.dm(_({ width: s, height: t.height }));
|
|
4983
4940
|
}
|
|
4984
4941
|
Vw() {
|
|
4985
4942
|
const t = this.Bw();
|
|
@@ -5003,21 +4960,21 @@ class dh {
|
|
|
5003
4960
|
const i = { colorSpace: this.Ps.colorSpace };
|
|
5004
4961
|
if (t !== 1) {
|
|
5005
4962
|
this.sm.applySuggestedBitmapSize();
|
|
5006
|
-
const e =
|
|
5007
|
-
e !== null && (e.useBitmapCoordinateSpace((n) => {
|
|
5008
|
-
this.wm(n), this.gm(n), this.Aw(e,
|
|
5009
|
-
}), this.bm(e), this.Aw(e,
|
|
4963
|
+
const e = Y(this.sm, i);
|
|
4964
|
+
e !== null && (e.useBitmapCoordinateSpace(((n) => {
|
|
4965
|
+
this.wm(n), this.gm(n), this.Aw(e, fh);
|
|
4966
|
+
})), this.bm(e), this.Aw(e, uh)), this.Mw !== null && this.Mw.pm(t), this.bw !== null && this.bw.pm(t);
|
|
5010
4967
|
}
|
|
5011
4968
|
this.nm.applySuggestedBitmapSize();
|
|
5012
|
-
const s =
|
|
5013
|
-
s !== null && (s.useBitmapCoordinateSpace(({ context: e, bitmapSize: n }) => {
|
|
4969
|
+
const s = Y(this.nm, i);
|
|
4970
|
+
s !== null && (s.useBitmapCoordinateSpace((({ context: e, bitmapSize: n }) => {
|
|
5014
4971
|
e.clearRect(0, 0, n.width, n.height);
|
|
5015
|
-
}), this.Lw([...this.Lv.Qt().tn(), this.Lv.Qt().gd()], s), this.Aw(s,
|
|
4972
|
+
})), this.Lw([...this.Lv.Qt().tn(), this.Lv.Qt().gd()], s), this.Aw(s, ch));
|
|
5016
4973
|
}
|
|
5017
4974
|
Aw(t, i) {
|
|
5018
4975
|
const s = this.Lv.Qt().tn();
|
|
5019
|
-
for (const e of s)
|
|
5020
|
-
for (const e of s)
|
|
4976
|
+
for (const e of s) li(i, ((n) => oi(n, t, !1, void 0)), e, void 0);
|
|
4977
|
+
for (const e of s) li(i, ((n) => yt(n, t, !1, void 0)), e, void 0);
|
|
5021
4978
|
}
|
|
5022
4979
|
wm({ context: t, bitmapSize: i }) {
|
|
5023
4980
|
Nt(t, 0, 0, i.width, i.height, this.Lv.Qt().Kd());
|
|
@@ -5033,17 +4990,17 @@ class dh {
|
|
|
5033
4990
|
const i = this.Lv.Qt().Et(), s = i.Vl();
|
|
5034
4991
|
if (!s || s.length === 0) return;
|
|
5035
4992
|
const e = this.cu.maxTickMarkWeight(s), n = this.Bw(), r = i.N();
|
|
5036
|
-
r.borderVisible && r.ticksVisible && t.useBitmapCoordinateSpace(({ context: o, horizontalPixelRatio: l, verticalPixelRatio: a }) => {
|
|
4993
|
+
r.borderVisible && r.ticksVisible && t.useBitmapCoordinateSpace((({ context: o, horizontalPixelRatio: l, verticalPixelRatio: a }) => {
|
|
5037
4994
|
o.strokeStyle = this.zw(), o.fillStyle = this.zw();
|
|
5038
4995
|
const u = Math.max(1, Math.floor(l)), c = Math.floor(0.5 * l);
|
|
5039
4996
|
o.beginPath();
|
|
5040
|
-
const
|
|
5041
|
-
for (let
|
|
5042
|
-
const m = Math.round(s[
|
|
5043
|
-
o.rect(m - c, 0, u,
|
|
4997
|
+
const f = Math.round(n.C * a);
|
|
4998
|
+
for (let d = s.length; d--; ) {
|
|
4999
|
+
const m = Math.round(s[d].coord * l);
|
|
5000
|
+
o.rect(m - c, 0, u, f);
|
|
5044
5001
|
}
|
|
5045
5002
|
o.fill();
|
|
5046
|
-
}), t.useMediaCoordinateSpace(({ context: o }) => {
|
|
5003
|
+
})), t.useMediaCoordinateSpace((({ context: o }) => {
|
|
5047
5004
|
const l = n.S + n.C + n.A + n.k / 2;
|
|
5048
5005
|
o.textAlign = "center", o.textBaseline = "middle", o.fillStyle = this.H(), o.font = this._m();
|
|
5049
5006
|
for (const a of s) if (a.weight < e) {
|
|
@@ -5055,7 +5012,7 @@ class dh {
|
|
|
5055
5012
|
const u = a.needAlignCoordinate ? this.Ow(o, a.coord, a.label) : a.coord;
|
|
5056
5013
|
o.fillText(a.label, u, l);
|
|
5057
5014
|
}
|
|
5058
|
-
});
|
|
5015
|
+
}));
|
|
5059
5016
|
}
|
|
5060
5017
|
Ow(t, i, s) {
|
|
5061
5018
|
const e = this.qv.Ii(t, s), n = e / 2, r = Math.floor(i - n) + 0.5;
|
|
@@ -5096,15 +5053,14 @@ class dh {
|
|
|
5096
5053
|
const t = this.Lv.Qt(), i = t.N();
|
|
5097
5054
|
i.leftPriceScale.visible || this.Mw === null || (this.Cw.removeChild(this.Mw.iv()), this.Mw.m(), this.Mw = null), i.rightPriceScale.visible || this.bw === null || (this.yw.removeChild(this.bw.iv()), this.bw.m(), this.bw = null);
|
|
5098
5055
|
const s = { Nd: this.Lv.Qt().Nd() }, e = () => i.leftPriceScale.borderVisible && t.Et().N().borderVisible, n = () => t.Kd();
|
|
5099
|
-
i.leftPriceScale.visible && this.Mw === null && (this.Mw = new
|
|
5056
|
+
i.leftPriceScale.visible && this.Mw === null && (this.Mw = new qi("left", i, s, e, n), this.Cw.appendChild(this.Mw.iv())), i.rightPriceScale.visible && this.bw === null && (this.bw = new qi("right", i, s, e, n), this.yw.appendChild(this.bw.iv()));
|
|
5100
5057
|
}
|
|
5101
5058
|
}
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
class mh {
|
|
5059
|
+
const mh = !!it && !!navigator.userAgentData && navigator.userAgentData.brands.some(((h) => h.brand.includes("Chromium"))) && !!it && (navigator?.userAgentData?.platform ? navigator.userAgentData.platform === "Windows" : navigator.userAgent.toLowerCase().indexOf("win") >= 0);
|
|
5060
|
+
class ph {
|
|
5105
5061
|
constructor(t, i, s) {
|
|
5106
5062
|
var e;
|
|
5107
|
-
this.Fw = [], this.Ww = [], this.Hw = 0, this.eo = 0, this.S_ = 0, this.Uw = 0, this.$w = 0, this.qw = null, this.jw = !1, this.Im = new
|
|
5063
|
+
this.Fw = [], this.Ww = [], this.Hw = 0, this.eo = 0, this.S_ = 0, this.Uw = 0, this.$w = 0, this.qw = null, this.jw = !1, this.Im = new S(), this.Vm = new S(), this.nd = new S(), this.Yw = null, this.Kw = null, this.Av = t, this.Ps = i, this.cu = s, this.Vv = document.createElement("div"), this.Vv.classList.add("tv-lightweight-charts"), this.Vv.style.overflow = "hidden", this.Vv.style.direction = "ltr", this.Vv.style.width = "100%", this.Vv.style.height = "100%", (e = this.Vv).style.userSelect = "none", e.style.webkitUserSelect = "none", e.style.msUserSelect = "none", e.style.MozUserSelect = "none", e.style.webkitTapHighlightColor = "transparent", this.Zw = document.createElement("table"), this.Zw.setAttribute("cellspacing", "0"), this.Vv.appendChild(this.Zw), this.Gw = this.Xw.bind(this), qt(this.Ps) && this.Jw(!0), this.ns = new Ze(this.rd.bind(this), this.Ps, s), this.Qt().Md().i(this.Qw.bind(this), this), this.tg = new dh(this, this.cu), this.Zw.appendChild(this.tg.iv());
|
|
5108
5064
|
const n = i.autoSize && this.ig();
|
|
5109
5065
|
let r = this.Ps.width, o = this.Ps.height;
|
|
5110
5066
|
if (n || r === 0 || o === 0) {
|
|
@@ -5134,25 +5090,24 @@ class mh {
|
|
|
5134
5090
|
}
|
|
5135
5091
|
sg(t, i, s = !1) {
|
|
5136
5092
|
if (this.eo === i && this.S_ === t) return;
|
|
5137
|
-
const e = function(o) {
|
|
5093
|
+
const e = (function(o) {
|
|
5138
5094
|
const l = Math.floor(o.width), a = Math.floor(o.height);
|
|
5139
|
-
return
|
|
5140
|
-
}(
|
|
5095
|
+
return _({ width: l - l % 2, height: a - a % 2 });
|
|
5096
|
+
})(_({ width: t, height: i }));
|
|
5141
5097
|
this.eo = e.height, this.S_ = e.width;
|
|
5142
5098
|
const n = this.eo + "px", r = this.S_ + "px";
|
|
5143
|
-
p(this.Vv).style.height = n, p(this.Vv).style.width = r, this.Zw.style.height = n, this.Zw.style.width = r, s ? this.lg(
|
|
5099
|
+
p(this.Vv).style.height = n, p(this.Vv).style.width = r, this.Zw.style.height = n, this.Zw.style.width = r, s ? this.lg(z.yn(), performance.now()) : this.ns.Ca();
|
|
5144
5100
|
}
|
|
5145
5101
|
pm(t) {
|
|
5146
|
-
t === void 0 && (t =
|
|
5102
|
+
t === void 0 && (t = z.yn());
|
|
5147
5103
|
for (let i = 0; i < this.Fw.length; i++) this.Fw[i].pm(t.un(i).an);
|
|
5148
5104
|
this.Ps.timeScale.visible && this.tg.pm(t._n());
|
|
5149
5105
|
}
|
|
5150
5106
|
cr(t) {
|
|
5151
|
-
var e;
|
|
5152
5107
|
const i = qt(this.Ps);
|
|
5153
5108
|
this.ns.cr(t);
|
|
5154
5109
|
const s = qt(this.Ps);
|
|
5155
|
-
s !== i && this.Jw(s),
|
|
5110
|
+
s !== i && this.Jw(s), t.layout?.panes && this.og(), this.eg(), this._g(t);
|
|
5156
5111
|
}
|
|
5157
5112
|
nw() {
|
|
5158
5113
|
return this.Im;
|
|
@@ -5186,12 +5141,12 @@ class mh {
|
|
|
5186
5141
|
return this.Kw;
|
|
5187
5142
|
}
|
|
5188
5143
|
gg(t) {
|
|
5189
|
-
return
|
|
5144
|
+
return T(this.Fw[t]).sv();
|
|
5190
5145
|
}
|
|
5191
5146
|
og() {
|
|
5192
|
-
this.Ww.forEach((t) => {
|
|
5147
|
+
this.Ww.forEach(((t) => {
|
|
5193
5148
|
t.kt();
|
|
5194
|
-
});
|
|
5149
|
+
}));
|
|
5195
5150
|
}
|
|
5196
5151
|
_g(t) {
|
|
5197
5152
|
(t.autoSize !== void 0 || !this.Yw || t.width === void 0 && t.height === void 0) && (t.autoSize && !this.Yw && this.ig(), t.autoSize === !1 && this.Yw !== null && this.ag(), t.autoSize || t.width === void 0 && t.height === void 0 || this.sg(t.width || this.S_, t.height || this.eo));
|
|
@@ -5201,10 +5156,10 @@ class mh {
|
|
|
5201
5156
|
const n = this.Fw[0], r = (l, a) => {
|
|
5202
5157
|
let u = 0;
|
|
5203
5158
|
for (let c = 0; c < this.Fw.length; c++) {
|
|
5204
|
-
const
|
|
5205
|
-
if (t !== null &&
|
|
5206
|
-
const
|
|
5207
|
-
t !== null &&
|
|
5159
|
+
const f = this.Fw[c], d = p(l === "left" ? f.uw() : f.cw()), m = d.nv();
|
|
5160
|
+
if (t !== null && d.ev(t, a, u, i), u += m.height, c < this.Fw.length - 1) {
|
|
5161
|
+
const w = this.Ww[c], v = w.nv();
|
|
5162
|
+
t !== null && w.ev(t, a, u), u += v.height;
|
|
5208
5163
|
}
|
|
5209
5164
|
}
|
|
5210
5165
|
};
|
|
@@ -5212,8 +5167,8 @@ class mh {
|
|
|
5212
5167
|
for (let l = 0; l < this.Fw.length; l++) {
|
|
5213
5168
|
const a = this.Fw[l], u = a.nv();
|
|
5214
5169
|
if (t !== null && a.ev(t, s, e, i), e += u.height, l < this.Fw.length - 1) {
|
|
5215
|
-
const c = this.Ww[l],
|
|
5216
|
-
t !== null && c.ev(t, s, e), e +=
|
|
5170
|
+
const c = this.Ww[l], f = c.nv();
|
|
5171
|
+
t !== null && c.ev(t, s, e), e += f.height;
|
|
5217
5172
|
}
|
|
5218
5173
|
}
|
|
5219
5174
|
s += n.nv().width, this.pg() && (r("right", s), s += p(n.cw()).nv().width);
|
|
@@ -5228,26 +5183,26 @@ class mh {
|
|
|
5228
5183
|
}
|
|
5229
5184
|
e += l.height;
|
|
5230
5185
|
}
|
|
5231
|
-
return
|
|
5186
|
+
return _({ width: s, height: e });
|
|
5232
5187
|
}
|
|
5233
5188
|
Mg() {
|
|
5234
5189
|
let t = 0, i = 0, s = 0;
|
|
5235
|
-
for (const
|
|
5236
|
-
i =
|
|
5190
|
+
for (const v of this.Fw) this.fg() && (i = Math.max(i, p(v.uw()).om(), this.Ps.leftPriceScale.minimumWidth)), this.pg() && (s = Math.max(s, p(v.cw()).om(), this.Ps.rightPriceScale.minimumWidth)), t += v.E_();
|
|
5191
|
+
i = ri(i), s = ri(s);
|
|
5237
5192
|
const e = this.S_, n = this.eo, r = Math.max(e - i - s, 0), o = 1 * this.Ww.length, l = this.Ps.timeScale.visible;
|
|
5238
5193
|
let a = l ? Math.max(this.tg.Vw(), this.Ps.timeScale.minimumHeight) : 0;
|
|
5239
5194
|
var u;
|
|
5240
5195
|
a = (u = a) + u % 2;
|
|
5241
|
-
const c = o + a,
|
|
5196
|
+
const c = o + a, f = n < c ? 0 : n - c, d = f / t;
|
|
5242
5197
|
let m = 0;
|
|
5243
|
-
const
|
|
5244
|
-
for (let
|
|
5245
|
-
const
|
|
5246
|
-
|
|
5247
|
-
let
|
|
5248
|
-
M =
|
|
5198
|
+
const w = window.devicePixelRatio || 1;
|
|
5199
|
+
for (let v = 0; v < this.Fw.length; ++v) {
|
|
5200
|
+
const g = this.Fw[v];
|
|
5201
|
+
g.qm(this.ns.Xs()[v]);
|
|
5202
|
+
let b = 0, M = 0;
|
|
5203
|
+
M = v === this.Fw.length - 1 ? Math.ceil((f - m) * w) / w : Math.round(g.E_() * d * w) / w, b = Math.max(M, 2), m += b, g.dm(_({ width: r, height: b })), this.fg() && g.hw(i, "left"), this.pg() && g.hw(s, "right"), g.cv() && this.ns.bd(g.cv(), b);
|
|
5249
5204
|
}
|
|
5250
|
-
this.tg.Iw(
|
|
5205
|
+
this.tg.Iw(_({ width: l ? r : 0, height: a }), l ? i : 0, l ? s : 0), this.ns.L_(r), this.Uw !== i && (this.Uw = i), this.$w !== s && (this.$w = s);
|
|
5251
5206
|
}
|
|
5252
5207
|
Jw(t) {
|
|
5253
5208
|
t ? this.Vv.addEventListener("wheel", this.Gw, { passive: !1 }) : this.Vv.removeEventListener("wheel", this.Gw);
|
|
@@ -5259,7 +5214,7 @@ class mh {
|
|
|
5259
5214
|
case t.DOM_DELTA_LINE:
|
|
5260
5215
|
return 32;
|
|
5261
5216
|
}
|
|
5262
|
-
return
|
|
5217
|
+
return mh ? 1 / window.devicePixelRatio : 1;
|
|
5263
5218
|
}
|
|
5264
5219
|
Xw(t) {
|
|
5265
5220
|
if (!(t.deltaX !== 0 && this.Ps.handleScroll.mouseWheel || t.deltaY !== 0 && this.Ps.handleScale.mouseWheel)) return;
|
|
@@ -5271,11 +5226,10 @@ class mh {
|
|
|
5271
5226
|
s !== 0 && this.Ps.handleScroll.mouseWheel && this.Qt().Rd(-80 * s);
|
|
5272
5227
|
}
|
|
5273
5228
|
lg(t, i) {
|
|
5274
|
-
var e;
|
|
5275
5229
|
const s = t._n();
|
|
5276
|
-
s === 3 && this.Sg(), s !== 3 && s !== 2 || (this.xg(t), this.Cg(t, i), this.tg.kt(), this.Fw.forEach((
|
|
5277
|
-
|
|
5278
|
-
}),
|
|
5230
|
+
s === 3 && this.Sg(), s !== 3 && s !== 2 || (this.xg(t), this.Cg(t, i), this.tg.kt(), this.Fw.forEach(((e) => {
|
|
5231
|
+
e.Ym();
|
|
5232
|
+
})), this.qw?._n() === 3 && (this.qw.Sn(t), this.Sg(), this.xg(this.qw), this.Cg(this.qw, i), t = this.qw, this.qw = null)), this.pm(t);
|
|
5279
5233
|
}
|
|
5280
5234
|
Cg(t, i) {
|
|
5281
5235
|
for (const s of t.bn()) this.xn(s, i);
|
|
@@ -5307,7 +5261,7 @@ class mh {
|
|
|
5307
5261
|
}
|
|
5308
5262
|
}
|
|
5309
5263
|
rd(t) {
|
|
5310
|
-
this.qw !== null ? this.qw.Sn(t) : this.qw = t, this.jw || (this.jw = !0, this.Hw = window.requestAnimationFrame((i) => {
|
|
5264
|
+
this.qw !== null ? this.qw.Sn(t) : this.qw = t, this.jw || (this.jw = !0, this.Hw = window.requestAnimationFrame(((i) => {
|
|
5311
5265
|
if (this.jw = !1, this.Hw = 0, this.qw !== null) {
|
|
5312
5266
|
const s = this.qw;
|
|
5313
5267
|
this.qw = null, this.lg(s, i);
|
|
@@ -5316,7 +5270,7 @@ class mh {
|
|
|
5316
5270
|
break;
|
|
5317
5271
|
}
|
|
5318
5272
|
}
|
|
5319
|
-
}));
|
|
5273
|
+
})));
|
|
5320
5274
|
}
|
|
5321
5275
|
Sg() {
|
|
5322
5276
|
this.ng();
|
|
@@ -5327,15 +5281,15 @@ class mh {
|
|
|
5327
5281
|
ng() {
|
|
5328
5282
|
const t = this.ns.Xs(), i = t.length, s = this.Fw.length;
|
|
5329
5283
|
for (let e = i; e < s; e++) {
|
|
5330
|
-
const n =
|
|
5284
|
+
const n = T(this.Fw.pop());
|
|
5331
5285
|
this.Zw.removeChild(n.iv()), n.nw().u(this), n.ew().u(this), n.m();
|
|
5332
5286
|
const r = this.Ww.pop();
|
|
5333
5287
|
r !== void 0 && this.hg(r);
|
|
5334
5288
|
}
|
|
5335
5289
|
for (let e = s; e < i; e++) {
|
|
5336
|
-
const n = new
|
|
5290
|
+
const n = new ci(this, t[e]);
|
|
5337
5291
|
if (n.nw().i(this.yg.bind(this, n), this), n.ew().i(this.kg.bind(this, n), this), this.Fw.push(n), e > 0) {
|
|
5338
|
-
const r = new
|
|
5292
|
+
const r = new nh(this, e - 1, e);
|
|
5339
5293
|
this.Ww.push(r), this.Zw.insertBefore(r.iv(), this.tg.iv());
|
|
5340
5294
|
}
|
|
5341
5295
|
this.Zw.insertBefore(n.iv(), this.tg.iv());
|
|
@@ -5347,16 +5301,15 @@ class mh {
|
|
|
5347
5301
|
this.eg(), this.Mg();
|
|
5348
5302
|
}
|
|
5349
5303
|
Pg(t, i, s, e) {
|
|
5350
|
-
var c;
|
|
5351
5304
|
const n = /* @__PURE__ */ new Map();
|
|
5352
|
-
t !== null && this.ns.tn().forEach((
|
|
5353
|
-
const f =
|
|
5354
|
-
f !== null && n.set(
|
|
5355
|
-
});
|
|
5305
|
+
t !== null && this.ns.tn().forEach(((c) => {
|
|
5306
|
+
const f = c.qs().$s(t);
|
|
5307
|
+
f !== null && n.set(c, f);
|
|
5308
|
+
}));
|
|
5356
5309
|
let r;
|
|
5357
5310
|
if (t !== null) {
|
|
5358
|
-
const
|
|
5359
|
-
|
|
5311
|
+
const c = this.ns.Et().es(t)?.originalTime;
|
|
5312
|
+
c !== void 0 && (r = c);
|
|
5360
5313
|
}
|
|
5361
5314
|
const o = this.Qt().pd(), l = o !== null && o.hu instanceof Tt ? o.hu : void 0, a = o !== null && o.au !== void 0 ? o.au.te : void 0, u = this.Tg(e);
|
|
5362
5315
|
return { Gr: r, js: t ?? void 0, Rg: i ?? void 0, Dg: u !== -1 ? u : void 0, Ig: l, Vg: n, Bg: a, Eg: s ?? void 0 };
|
|
@@ -5371,14 +5324,13 @@ class mh {
|
|
|
5371
5324
|
return i;
|
|
5372
5325
|
}
|
|
5373
5326
|
yg(t, i, s, e) {
|
|
5374
|
-
this.Im.p(() => this.Pg(i, s, e, t));
|
|
5327
|
+
this.Im.p((() => this.Pg(i, s, e, t)));
|
|
5375
5328
|
}
|
|
5376
5329
|
kg(t, i, s, e) {
|
|
5377
|
-
this.Vm.p(() => this.Pg(i, s, e, t));
|
|
5330
|
+
this.Vm.p((() => this.Pg(i, s, e, t)));
|
|
5378
5331
|
}
|
|
5379
5332
|
Qw(t, i, s) {
|
|
5380
|
-
|
|
5381
|
-
this.mg(((e = this.Qt().pd()) == null ? void 0 : e.ou) ?? null), this.nd.p(() => this.Pg(t, i, s));
|
|
5333
|
+
this.mg(this.Qt().pd()?.ou ?? null), this.nd.p((() => this.Pg(t, i, s)));
|
|
5382
5334
|
}
|
|
5383
5335
|
eg() {
|
|
5384
5336
|
const t = this.Ps.timeScale.visible ? "" : "none";
|
|
@@ -5391,10 +5343,10 @@ class mh {
|
|
|
5391
5343
|
return this.Fw[0].cv().q_().N().visible;
|
|
5392
5344
|
}
|
|
5393
5345
|
ig() {
|
|
5394
|
-
return "ResizeObserver" in window && (this.Yw = new ResizeObserver((t) => {
|
|
5346
|
+
return "ResizeObserver" in window && (this.Yw = new ResizeObserver(((t) => {
|
|
5395
5347
|
const i = t[t.length - 1];
|
|
5396
5348
|
i && this.sg(i.contentRect.width, i.contentRect.height);
|
|
5397
|
-
}), this.Yw.observe(this.Av, { box: "border-box" }), !0);
|
|
5349
|
+
})), this.Yw.observe(this.Av, { box: "border-box" }), !0);
|
|
5398
5350
|
}
|
|
5399
5351
|
ag() {
|
|
5400
5352
|
this.Yw !== null && this.Yw.disconnect(), this.Yw = null;
|
|
@@ -5403,67 +5355,67 @@ class mh {
|
|
|
5403
5355
|
function qt(h) {
|
|
5404
5356
|
return !!(h.handleScroll.mouseWheel || h.handleScale.mouseWheel);
|
|
5405
5357
|
}
|
|
5406
|
-
function
|
|
5358
|
+
function gh(h) {
|
|
5407
5359
|
return h.open === void 0 && h.value === void 0;
|
|
5408
5360
|
}
|
|
5409
|
-
function
|
|
5410
|
-
return function(t) {
|
|
5361
|
+
function vh(h) {
|
|
5362
|
+
return (function(t) {
|
|
5411
5363
|
return t.open !== void 0;
|
|
5412
|
-
}(h) || function(t) {
|
|
5364
|
+
})(h) || (function(t) {
|
|
5413
5365
|
return t.value !== void 0;
|
|
5414
|
-
}(h);
|
|
5366
|
+
})(h);
|
|
5415
5367
|
}
|
|
5416
|
-
function
|
|
5368
|
+
function Zi(h, t, i, s) {
|
|
5417
5369
|
const e = i.value, n = { js: t, wt: h, Wt: [e, e, e, e], Gr: s };
|
|
5418
5370
|
return i.color !== void 0 && (n.R = i.color), n;
|
|
5419
5371
|
}
|
|
5420
|
-
function
|
|
5372
|
+
function wh(h, t, i, s) {
|
|
5421
5373
|
const e = i.value, n = { js: t, wt: h, Wt: [e, e, e, e], Gr: s };
|
|
5422
5374
|
return i.lineColor !== void 0 && (n.vt = i.lineColor), i.topColor !== void 0 && (n.eh = i.topColor), i.bottomColor !== void 0 && (n.rh = i.bottomColor), n;
|
|
5423
5375
|
}
|
|
5424
|
-
function
|
|
5376
|
+
function bh(h, t, i, s) {
|
|
5425
5377
|
const e = i.value, n = { js: t, wt: h, Wt: [e, e, e, e], Gr: s };
|
|
5426
5378
|
return i.topLineColor !== void 0 && (n.hh = i.topLineColor), i.bottomLineColor !== void 0 && (n.ah = i.bottomLineColor), i.topFillColor1 !== void 0 && (n.oh = i.topFillColor1), i.topFillColor2 !== void 0 && (n._h = i.topFillColor2), i.bottomFillColor1 !== void 0 && (n.uh = i.bottomFillColor1), i.bottomFillColor2 !== void 0 && (n.dh = i.bottomFillColor2), n;
|
|
5427
5379
|
}
|
|
5428
|
-
function
|
|
5380
|
+
function Mh(h, t, i, s) {
|
|
5429
5381
|
const e = { js: t, wt: h, Wt: [i.open, i.high, i.low, i.close], Gr: s };
|
|
5430
5382
|
return i.color !== void 0 && (e.R = i.color), e;
|
|
5431
5383
|
}
|
|
5432
|
-
function
|
|
5384
|
+
function yh(h, t, i, s) {
|
|
5433
5385
|
const e = { js: t, wt: h, Wt: [i.open, i.high, i.low, i.close], Gr: s };
|
|
5434
5386
|
return i.color !== void 0 && (e.R = i.color), i.borderColor !== void 0 && (e.Ht = i.borderColor), i.wickColor !== void 0 && (e.nh = i.wickColor), e;
|
|
5435
5387
|
}
|
|
5436
|
-
function
|
|
5437
|
-
const n =
|
|
5438
|
-
return { js: t, wt: h, Wt: a, Gr: s, le:
|
|
5388
|
+
function _h(h, t, i, s, e) {
|
|
5389
|
+
const n = T(e)(i), r = Math.max(...n), o = Math.min(...n), l = n[n.length - 1], a = [l, r, o, l], { time: u, color: c, ...f } = i;
|
|
5390
|
+
return { js: t, wt: h, Wt: a, Gr: s, le: f, R: c };
|
|
5439
5391
|
}
|
|
5440
5392
|
function G(h) {
|
|
5441
5393
|
return h.Wt !== void 0;
|
|
5442
5394
|
}
|
|
5443
|
-
function
|
|
5395
|
+
function ts(h, t) {
|
|
5444
5396
|
return t.customValues !== void 0 && (h.Ag = t.customValues), h;
|
|
5445
5397
|
}
|
|
5446
5398
|
function O(h) {
|
|
5447
|
-
return (t, i, s, e, n, r) => function(o, l) {
|
|
5448
|
-
return l ? l(o) :
|
|
5449
|
-
}(s, r) ?
|
|
5450
|
-
}
|
|
5451
|
-
function ts(h) {
|
|
5452
|
-
return { Candlestick: O(Mh), Bar: O(bh), Area: O(vh), Baseline: O(wh), Histogram: O(qi), Line: O(qi), Custom: O(yh) }[h];
|
|
5399
|
+
return (t, i, s, e, n, r) => (function(o, l) {
|
|
5400
|
+
return l ? l(o) : gh(o);
|
|
5401
|
+
})(s, r) ? ts({ wt: t, js: i, Gr: e }, s) : ts(h(t, i, s, e, n), s);
|
|
5453
5402
|
}
|
|
5454
5403
|
function is(h) {
|
|
5404
|
+
return { Candlestick: O(yh), Bar: O(Mh), Area: O(wh), Baseline: O(bh), Histogram: O(Zi), Line: O(Zi), Custom: O(_h) }[h];
|
|
5405
|
+
}
|
|
5406
|
+
function ss(h) {
|
|
5455
5407
|
return { js: 0, Lg: /* @__PURE__ */ new Map(), Ea: h };
|
|
5456
5408
|
}
|
|
5457
|
-
function
|
|
5409
|
+
function es(h, t) {
|
|
5458
5410
|
if (h !== void 0 && h.length !== 0) return { zg: t.key(h[0].wt), Og: t.key(h[h.length - 1].wt) };
|
|
5459
5411
|
}
|
|
5460
|
-
function
|
|
5412
|
+
function hs(h) {
|
|
5461
5413
|
let t;
|
|
5462
|
-
return h.forEach((i) => {
|
|
5414
|
+
return h.forEach(((i) => {
|
|
5463
5415
|
t === void 0 && (t = i.Gr);
|
|
5464
|
-
}),
|
|
5416
|
+
})), T(t);
|
|
5465
5417
|
}
|
|
5466
|
-
class
|
|
5418
|
+
class Sh {
|
|
5467
5419
|
constructor(t) {
|
|
5468
5420
|
this.Ng = /* @__PURE__ */ new Map(), this.Fg = /* @__PURE__ */ new Map(), this.Wg = /* @__PURE__ */ new Map(), this.Hg = [], this.cu = t;
|
|
5469
5421
|
}
|
|
@@ -5477,27 +5429,27 @@ class _h {
|
|
|
5477
5429
|
else for (const l of this.Hg) l.pointData.Lg.delete(t) && (e = !0);
|
|
5478
5430
|
let r = [];
|
|
5479
5431
|
if (i.length !== 0) {
|
|
5480
|
-
const l = i.map((
|
|
5481
|
-
r = i.map((
|
|
5482
|
-
const
|
|
5483
|
-
let
|
|
5484
|
-
|
|
5485
|
-
const
|
|
5486
|
-
return
|
|
5487
|
-
});
|
|
5432
|
+
const l = i.map(((d) => d.time)), a = this.cu.createConverterToInternalObj(i), u = is(t.wh()), c = t.rl(), f = t.hl();
|
|
5433
|
+
r = i.map(((d, m) => {
|
|
5434
|
+
const w = a(d.time), v = this.cu.key(w);
|
|
5435
|
+
let g = this.Ng.get(v);
|
|
5436
|
+
g === void 0 && (g = ss(w), this.Ng.set(v, g), e = !0);
|
|
5437
|
+
const b = u(w, g.js, d, l[m], c, f);
|
|
5438
|
+
return g.Lg.set(t, b), b;
|
|
5439
|
+
}));
|
|
5488
5440
|
}
|
|
5489
5441
|
s && this.$g(), this.qg(t, r);
|
|
5490
5442
|
let o = -1;
|
|
5491
5443
|
if (e) {
|
|
5492
5444
|
const l = [];
|
|
5493
|
-
this.Ng.forEach((a) => {
|
|
5494
|
-
l.push({ timeWeight: 0, time: a.Ea, pointData: a, originalTime:
|
|
5495
|
-
}), l.sort((a, u) => this.cu.key(a.time) - this.cu.key(u.time)), o = this.jg(l);
|
|
5445
|
+
this.Ng.forEach(((a) => {
|
|
5446
|
+
l.push({ timeWeight: 0, time: a.Ea, pointData: a, originalTime: hs(a.Lg) });
|
|
5447
|
+
})), l.sort(((a, u) => this.cu.key(a.time) - this.cu.key(u.time))), o = this.jg(l);
|
|
5496
5448
|
}
|
|
5497
|
-
return this.Yg(t, o, function(l, a, u) {
|
|
5498
|
-
const c =
|
|
5499
|
-
if (c !== void 0 &&
|
|
5500
|
-
}(this.Fg.get(t), n, this.cu));
|
|
5449
|
+
return this.Yg(t, o, (function(l, a, u) {
|
|
5450
|
+
const c = es(l, u), f = es(a, u);
|
|
5451
|
+
if (c !== void 0 && f !== void 0) return { Kg: !1, Ta: c.Og >= f.Og && c.zg >= f.zg };
|
|
5452
|
+
})(this.Fg.get(t), n, this.cu));
|
|
5501
5453
|
}
|
|
5502
5454
|
Hd(t) {
|
|
5503
5455
|
return this.Ug(t, []);
|
|
@@ -5505,23 +5457,23 @@ class _h {
|
|
|
5505
5457
|
Zg(t, i, s) {
|
|
5506
5458
|
if (s && t.La()) throw new Error("Historical updates are not supported when conflation is enabled. Conflation requires data to be processed in order.");
|
|
5507
5459
|
const e = i;
|
|
5508
|
-
(function(
|
|
5509
|
-
|
|
5460
|
+
(function(g) {
|
|
5461
|
+
g.Gr === void 0 && (g.Gr = g.time);
|
|
5510
5462
|
})(e), this.cu.preprocessData(i);
|
|
5511
5463
|
const n = this.cu.createConverterToInternalObj([i])(i.time), r = this.Wg.get(t);
|
|
5512
5464
|
if (!s && r !== void 0 && this.cu.key(n) < this.cu.key(r)) throw new Error(`Cannot update oldest data, last time=${r}, new time=${n}`);
|
|
5513
5465
|
let o = this.Ng.get(this.cu.key(n));
|
|
5514
5466
|
if (s && o === void 0) throw new Error("Cannot update non-existing data point when historicalUpdate is true");
|
|
5515
5467
|
const l = o === void 0;
|
|
5516
|
-
o === void 0 && (o =
|
|
5517
|
-
const a =
|
|
5518
|
-
o.Lg.set(t,
|
|
5519
|
-
const m = { Ta: G(
|
|
5468
|
+
o === void 0 && (o = ss(n), this.Ng.set(this.cu.key(n), o));
|
|
5469
|
+
const a = is(t.wh()), u = t.rl(), c = t.hl(), f = a(n, o.js, i, e.Gr, u, c), d = !s && !l && r !== void 0 && this.cu.key(n) === this.cu.key(r);
|
|
5470
|
+
o.Lg.set(t, f), s ? this.Gg(t, f, o.js) : d && t.La() && G(f) ? (t.kr(f), this.Xg(t, f)) : this.Xg(t, f);
|
|
5471
|
+
const m = { Ta: G(f), Kg: s };
|
|
5520
5472
|
if (!l) return this.Yg(t, -1, m);
|
|
5521
|
-
const
|
|
5522
|
-
this.Hg.splice(
|
|
5523
|
-
for (let
|
|
5524
|
-
return this.cu.fillWeightsForPoints(this.Hg,
|
|
5473
|
+
const w = { timeWeight: 0, time: o.Ea, pointData: o, originalTime: hs(o.Lg) }, v = tt(this.Hg, this.cu.key(w.time), ((g, b) => this.cu.key(g.time) < b));
|
|
5474
|
+
this.Hg.splice(v, 0, w);
|
|
5475
|
+
for (let g = v; g < this.Hg.length; ++g) Mt(this.Hg[g].pointData, g);
|
|
5476
|
+
return this.cu.fillWeightsForPoints(this.Hg, v), this.Yg(t, v, m);
|
|
5525
5477
|
}
|
|
5526
5478
|
Jg(t, i) {
|
|
5527
5479
|
const s = this.Fg.get(t);
|
|
@@ -5547,7 +5499,7 @@ class _h {
|
|
|
5547
5499
|
Gg(t, i, s) {
|
|
5548
5500
|
const e = this.Fg.get(t);
|
|
5549
5501
|
if (e === void 0) return;
|
|
5550
|
-
const n = tt(e, s, (r, o) => r.js < o);
|
|
5502
|
+
const n = tt(e, s, ((r, o) => r.js < o));
|
|
5551
5503
|
G(i) ? e[n] = i : e.splice(n, 1);
|
|
5552
5504
|
}
|
|
5553
5505
|
qg(t, i) {
|
|
@@ -5573,15 +5525,15 @@ class _h {
|
|
|
5573
5525
|
tM() {
|
|
5574
5526
|
if (this.Fg.size === 0) return null;
|
|
5575
5527
|
let t = 0;
|
|
5576
|
-
return this.Fg.forEach((i) => {
|
|
5528
|
+
return this.Fg.forEach(((i) => {
|
|
5577
5529
|
i.length !== 0 && (t = Math.max(t, i[i.length - 1].js));
|
|
5578
|
-
}), t;
|
|
5530
|
+
})), t;
|
|
5579
5531
|
}
|
|
5580
5532
|
Yg(t, i, s) {
|
|
5581
5533
|
const e = this.Qg();
|
|
5582
|
-
if (i !== -1) this.Fg.forEach((n, r) => {
|
|
5534
|
+
if (i !== -1) this.Fg.forEach(((n, r) => {
|
|
5583
5535
|
e.F_.set(r, { le: n, iM: r === t ? s : void 0 });
|
|
5584
|
-
}), this.Fg.has(t) || e.F_.set(t, { le: [], iM: s }), e.Et.sM = this.Hg, e.Et.nM = i;
|
|
5536
|
+
})), this.Fg.has(t) || e.F_.set(t, { le: [], iM: s }), e.Et.sM = this.Hg, e.Et.nM = i;
|
|
5585
5537
|
else {
|
|
5586
5538
|
const n = this.Fg.get(t);
|
|
5587
5539
|
e.F_.set(t, { le: n || [], iM: s });
|
|
@@ -5593,18 +5545,18 @@ class _h {
|
|
|
5593
5545
|
}
|
|
5594
5546
|
}
|
|
5595
5547
|
function Mt(h, t) {
|
|
5596
|
-
h.js = t, h.Lg.forEach((i) => {
|
|
5548
|
+
h.js = t, h.Lg.forEach(((i) => {
|
|
5597
5549
|
i.js = t;
|
|
5598
|
-
});
|
|
5550
|
+
}));
|
|
5599
5551
|
}
|
|
5600
|
-
function
|
|
5552
|
+
function xh(h, t) {
|
|
5601
5553
|
return h.wt < t;
|
|
5602
5554
|
}
|
|
5603
|
-
function
|
|
5555
|
+
function Ch(h, t) {
|
|
5604
5556
|
return t < h.wt;
|
|
5605
5557
|
}
|
|
5606
|
-
function
|
|
5607
|
-
const s = t.Aa(), e = t.bi(), n = tt(h, s,
|
|
5558
|
+
function Ph(h, t, i) {
|
|
5559
|
+
const s = t.Aa(), e = t.bi(), n = tt(h, s, xh), r = Ps(h, e, Ch);
|
|
5608
5560
|
if (!i) return { from: n, to: r };
|
|
5609
5561
|
let o = n, l = r;
|
|
5610
5562
|
return n > 0 && n < h.length && h[n].wt >= s && (o = n - 1), r > 0 && r < h.length && h[r - 1].wt <= e && (l = r + 1), { from: o, to: l };
|
|
@@ -5620,7 +5572,7 @@ class Is {
|
|
|
5620
5572
|
return this.ee.It() ? (this.uM(), this.lM === null ? null : this.cM) : null;
|
|
5621
5573
|
}
|
|
5622
5574
|
dM() {
|
|
5623
|
-
this.aM = this.aM.map((t) => ({ ...t, ...this.ee.ga().gh(t.wt) }));
|
|
5575
|
+
this.aM = this.aM.map(((t) => ({ ...t, ...this.ee.ga().gh(t.wt) })));
|
|
5624
5576
|
}
|
|
5625
5577
|
fM() {
|
|
5626
5578
|
this.lM = null;
|
|
@@ -5635,10 +5587,10 @@ class Is {
|
|
|
5635
5587
|
const s = i.Ie();
|
|
5636
5588
|
if (s === null || this.ee.qs().yh() === 0) return;
|
|
5637
5589
|
const e = this.ee.Lt();
|
|
5638
|
-
e !== null && (this.lM =
|
|
5590
|
+
e !== null && (this.lM = Ph(this.aM, s, this._M), this.mM(t, i, e.Wt), this.wM());
|
|
5639
5591
|
}
|
|
5640
5592
|
}
|
|
5641
|
-
class
|
|
5593
|
+
class Eh {
|
|
5642
5594
|
constructor(t, i) {
|
|
5643
5595
|
this.gM = t, this.Ki = i;
|
|
5644
5596
|
}
|
|
@@ -5646,12 +5598,12 @@ class Ph {
|
|
|
5646
5598
|
this.gM.draw(t, this.Ki, i, s);
|
|
5647
5599
|
}
|
|
5648
5600
|
}
|
|
5649
|
-
class
|
|
5601
|
+
class Nh extends Is {
|
|
5650
5602
|
constructor(t, i, s) {
|
|
5651
|
-
super(t, i, !1), this.$h = s, this.cM = new
|
|
5603
|
+
super(t, i, !1), this.$h = s, this.cM = new Eh(this.$h.renderer(), ((e) => {
|
|
5652
5604
|
const n = t.Lt();
|
|
5653
5605
|
return n === null ? null : t.Ft().Nt(e, n.Wt);
|
|
5654
|
-
});
|
|
5606
|
+
}));
|
|
5655
5607
|
}
|
|
5656
5608
|
get ma() {
|
|
5657
5609
|
return this.$h.conflationReducer;
|
|
@@ -5664,35 +5616,35 @@ class Eh extends Is {
|
|
|
5664
5616
|
}
|
|
5665
5617
|
pM() {
|
|
5666
5618
|
const t = this.ee.ga();
|
|
5667
|
-
this.aM = this.ee.Na().Dh().map((i) => ({ wt: i.js, _t: NaN, ...t.gh(i.js), MM: i.le }));
|
|
5619
|
+
this.aM = this.ee.Na().Dh().map(((i) => ({ wt: i.js, _t: NaN, ...t.gh(i.js), MM: i.le })));
|
|
5668
5620
|
}
|
|
5669
5621
|
mM(t, i) {
|
|
5670
5622
|
i.mc(this.aM, si(this.lM));
|
|
5671
5623
|
}
|
|
5672
5624
|
wM() {
|
|
5673
|
-
this.$h.update({ bars: this.aM.map(
|
|
5625
|
+
this.$h.update({ bars: this.aM.map(kh), barSpacing: this.re.Et().ul(), visibleRange: this.lM, conflationFactor: this.re.Et().Hc() }, this.ee.N());
|
|
5674
5626
|
}
|
|
5675
5627
|
}
|
|
5676
|
-
function
|
|
5628
|
+
function kh(h) {
|
|
5677
5629
|
return { x: h._t, time: h.wt, originalData: h.MM, barColor: h.th };
|
|
5678
5630
|
}
|
|
5679
|
-
const
|
|
5631
|
+
const Lh = { color: "#2196f3" }, zh = (h, t, i) => {
|
|
5680
5632
|
const s = D(i);
|
|
5681
|
-
return new
|
|
5633
|
+
return new Nh(h, t, s);
|
|
5682
5634
|
};
|
|
5683
5635
|
function di(h) {
|
|
5684
5636
|
const t = { value: h.Wt[3], time: h.Gr };
|
|
5685
5637
|
return h.Ag !== void 0 && (t.customValues = h.Ag), t;
|
|
5686
5638
|
}
|
|
5687
|
-
function
|
|
5639
|
+
function ns(h) {
|
|
5688
5640
|
const t = di(h);
|
|
5689
5641
|
return h.R !== void 0 && (t.color = h.R), t;
|
|
5690
5642
|
}
|
|
5691
|
-
function
|
|
5643
|
+
function Th(h) {
|
|
5692
5644
|
const t = di(h);
|
|
5693
5645
|
return h.vt !== void 0 && (t.lineColor = h.vt), h.eh !== void 0 && (t.topColor = h.eh), h.rh !== void 0 && (t.bottomColor = h.rh), t;
|
|
5694
5646
|
}
|
|
5695
|
-
function
|
|
5647
|
+
function Rh(h) {
|
|
5696
5648
|
const t = di(h);
|
|
5697
5649
|
return h.hh !== void 0 && (t.topLineColor = h.hh), h.ah !== void 0 && (t.bottomLineColor = h.ah), h.oh !== void 0 && (t.topFillColor1 = h.oh), h._h !== void 0 && (t.topFillColor2 = h._h), h.uh !== void 0 && (t.bottomFillColor1 = h.uh), h.dh !== void 0 && (t.bottomFillColor2 = h.dh), t;
|
|
5698
5650
|
}
|
|
@@ -5700,24 +5652,24 @@ function Fs(h) {
|
|
|
5700
5652
|
const t = { open: h.Wt[0], high: h.Wt[1], low: h.Wt[2], close: h.Wt[3], time: h.Gr };
|
|
5701
5653
|
return h.Ag !== void 0 && (t.customValues = h.Ag), t;
|
|
5702
5654
|
}
|
|
5703
|
-
function
|
|
5655
|
+
function Ih(h) {
|
|
5704
5656
|
const t = Fs(h);
|
|
5705
5657
|
return h.R !== void 0 && (t.color = h.R), t;
|
|
5706
5658
|
}
|
|
5707
|
-
function
|
|
5659
|
+
function Fh(h) {
|
|
5708
5660
|
const t = Fs(h), { R: i, Ht: s, nh: e } = h;
|
|
5709
5661
|
return i !== void 0 && (t.color = i), s !== void 0 && (t.borderColor = s), e !== void 0 && (t.wickColor = e), t;
|
|
5710
5662
|
}
|
|
5711
5663
|
function _t(h) {
|
|
5712
|
-
return { Area:
|
|
5664
|
+
return { Area: Th, Line: ns, Baseline: Rh, Histogram: ns, Bar: Ih, Candlestick: Fh, Custom: Wh }[h];
|
|
5713
5665
|
}
|
|
5714
|
-
function
|
|
5666
|
+
function Wh(h) {
|
|
5715
5667
|
const t = h.Gr;
|
|
5716
5668
|
return { ...h.le, time: t };
|
|
5717
5669
|
}
|
|
5718
|
-
const
|
|
5719
|
-
function
|
|
5720
|
-
return { addDefaultPane: !0, width: 0, height: 0, autoSize: !1, layout: Vh, crosshair:
|
|
5670
|
+
const Bh = { vertLine: { color: "#9598A1", width: 1, style: 3, visible: !0, labelVisible: !0, labelBackgroundColor: "#131722" }, horzLine: { color: "#9598A1", width: 1, style: 3, visible: !0, labelVisible: !0, labelBackgroundColor: "#131722" }, mode: 1, doNotSnapToHiddenSeriesIndices: !1 }, jh = { vertLines: { color: "#D6DCDE", style: 0, visible: !0 }, horzLines: { color: "#D6DCDE", style: 0, visible: !0 } }, Vh = { background: { type: "solid", color: "#FFFFFF" }, textColor: "#191919", fontSize: 12, fontFamily: ws, panes: { enableResize: !0, separatorColor: "#E0E3EB", separatorHoverColor: "rgba(178, 181, 189, 0.2)" }, attributionLogo: !0, colorSpace: "srgb", colorParsers: [] }, Zt = { autoScale: !0, mode: 0, invertScale: !1, alignLabels: !0, borderVisible: !0, borderColor: "#2B2B43", entireTextOnly: !1, visible: !1, ticksVisible: !1, scaleMargins: { bottom: 0.1, top: 0.2 }, minimumWidth: 0, ensureEdgeTickMarksVisible: !1 }, Dh = { rightOffset: 0, barSpacing: 6, minBarSpacing: 0.5, maxBarSpacing: 0, fixLeftEdge: !1, fixRightEdge: !1, lockVisibleTimeRangeOnResize: !1, rightBarStaysOnScroll: !1, borderVisible: !0, borderColor: "#2B2B43", visible: !0, timeVisible: !1, secondsVisible: !0, shiftVisibleRangeOnNewBar: !0, allowShiftVisibleRangeOnWhitespaceReplacement: !1, ticksVisible: !1, uniformDistribution: !1, minimumHeight: 0, allowBoldLabels: !0, ignoreWhitespaceIndices: !1, enableConflation: !1, conflationThresholdFactor: 1, precomputeConflationOnInit: !1, precomputeConflationPriority: "background" };
|
|
5671
|
+
function rs() {
|
|
5672
|
+
return { addDefaultPane: !0, width: 0, height: 0, autoSize: !1, layout: Vh, crosshair: Bh, grid: jh, overlayPriceScales: { ...Zt }, leftPriceScale: { ...Zt, visible: !1 }, rightPriceScale: { ...Zt, visible: !0 }, timeScale: Dh, localization: { locale: it ? navigator.language : "", dateFormat: "dd MMM 'yy" }, handleScroll: { mouseWheel: !0, pressedMouseMove: !0, horzTouchDrag: !0, vertTouchDrag: !0 }, handleScale: { axisPressedMouseMove: { time: !0, price: !0 }, axisDoubleClickReset: { time: !0, price: !0 }, mouseWheel: !0, pinch: !0 }, kineticScroll: { mouse: !1, touch: !0 }, trackingMode: { exitMode: 1 } };
|
|
5721
5673
|
}
|
|
5722
5674
|
class Ws {
|
|
5723
5675
|
constructor(t, i, s) {
|
|
@@ -5733,7 +5685,7 @@ class Ws {
|
|
|
5733
5685
|
return Lt(this.bM) ? this.Yp.dg(this.bM) : 0;
|
|
5734
5686
|
}
|
|
5735
5687
|
setVisibleRange(t) {
|
|
5736
|
-
this.setAutoScale(!1), this.Ki().$o(new
|
|
5688
|
+
this.setAutoScale(!1), this.Ki().$o(new N(t.from, t.to));
|
|
5737
5689
|
}
|
|
5738
5690
|
getVisibleRange() {
|
|
5739
5691
|
let t, i, s = this.Ki().er();
|
|
@@ -5751,7 +5703,7 @@ class Ws {
|
|
|
5751
5703
|
return p(this.Yp.Qt().wd(this.bM, this.SM)).Ft;
|
|
5752
5704
|
}
|
|
5753
5705
|
}
|
|
5754
|
-
class
|
|
5706
|
+
class Kh {
|
|
5755
5707
|
constructor(t, i, s, e) {
|
|
5756
5708
|
this.Yp = t, this.yt = s, this.xM = i, this.CM = e;
|
|
5757
5709
|
}
|
|
@@ -5773,10 +5725,10 @@ class Dh {
|
|
|
5773
5725
|
}
|
|
5774
5726
|
moveTo(t) {
|
|
5775
5727
|
const i = this.paneIndex();
|
|
5776
|
-
i !== t && (
|
|
5728
|
+
i !== t && (C(t >= 0 && t < this.Yp.Zp().length, "Invalid pane index"), this.Yp.Qt().yd(i, t));
|
|
5777
5729
|
}
|
|
5778
5730
|
getSeries() {
|
|
5779
|
-
return this.yt.F_().map((t) => this.xM(t)) ?? [];
|
|
5731
|
+
return this.yt.F_().map(((t) => this.xM(t))) ?? [];
|
|
5780
5732
|
}
|
|
5781
5733
|
getHTMLElement() {
|
|
5782
5734
|
const t = this.Yp.Zp();
|
|
@@ -5805,8 +5757,8 @@ class Dh {
|
|
|
5805
5757
|
return this.CM.addSeries(t, i, this.paneIndex());
|
|
5806
5758
|
}
|
|
5807
5759
|
}
|
|
5808
|
-
const
|
|
5809
|
-
class
|
|
5760
|
+
const Oh = { color: "#FF0000", price: 0, lineStyle: 2, lineWidth: 1, lineVisible: !0, axisLabelVisible: !0, title: "", axisLabelColor: "", axisLabelTextColor: "" };
|
|
5761
|
+
class os {
|
|
5810
5762
|
constructor(t) {
|
|
5811
5763
|
this.hr = t;
|
|
5812
5764
|
}
|
|
@@ -5820,9 +5772,9 @@ class rs {
|
|
|
5820
5772
|
return this.hr;
|
|
5821
5773
|
}
|
|
5822
5774
|
}
|
|
5823
|
-
class
|
|
5775
|
+
class Ah {
|
|
5824
5776
|
constructor(t, i, s, e, n, r) {
|
|
5825
|
-
this.kM = new
|
|
5777
|
+
this.kM = new S(), this.ee = t, this.PM = i, this.TM = s, this.cu = n, this.CM = e, this.RM = r;
|
|
5826
5778
|
}
|
|
5827
5779
|
m() {
|
|
5828
5780
|
this.kM.m();
|
|
@@ -5857,7 +5809,7 @@ class Oh {
|
|
|
5857
5809
|
const i = this.PM.BM(this.ee, t);
|
|
5858
5810
|
i.length !== 0 && this.IM("update");
|
|
5859
5811
|
const s = _t(this.seriesType());
|
|
5860
|
-
return i.map((e) => s(e));
|
|
5812
|
+
return i.map(((e) => s(e)));
|
|
5861
5813
|
}
|
|
5862
5814
|
dataByIndex(t, i) {
|
|
5863
5815
|
const s = this.ee.qs().$s(t, i);
|
|
@@ -5865,7 +5817,7 @@ class Oh {
|
|
|
5865
5817
|
}
|
|
5866
5818
|
data() {
|
|
5867
5819
|
const t = _t(this.seriesType());
|
|
5868
|
-
return this.ee.qs().Dh().map((i) => t(i));
|
|
5820
|
+
return this.ee.qs().Dh().map(((i) => t(i)));
|
|
5869
5821
|
}
|
|
5870
5822
|
subscribeDataChanged(t) {
|
|
5871
5823
|
this.kM.i(t);
|
|
@@ -5877,20 +5829,20 @@ class Oh {
|
|
|
5877
5829
|
this.ee.cr(t);
|
|
5878
5830
|
}
|
|
5879
5831
|
options() {
|
|
5880
|
-
return
|
|
5832
|
+
return W(this.ee.N());
|
|
5881
5833
|
}
|
|
5882
5834
|
priceScale() {
|
|
5883
5835
|
return this.TM.priceScale(this.ee.Ft().ol(), this.getPane().paneIndex());
|
|
5884
5836
|
}
|
|
5885
5837
|
createPriceLine(t) {
|
|
5886
|
-
const i =
|
|
5887
|
-
return new
|
|
5838
|
+
const i = R(W(Oh), t), s = this.ee.Da(i);
|
|
5839
|
+
return new os(s);
|
|
5888
5840
|
}
|
|
5889
5841
|
removePriceLine(t) {
|
|
5890
5842
|
this.ee.Ia(t.yM());
|
|
5891
5843
|
}
|
|
5892
5844
|
priceLines() {
|
|
5893
|
-
return this.ee.Va().map((t) => new
|
|
5845
|
+
return this.ee.Va().map(((t) => new os(t)));
|
|
5894
5846
|
}
|
|
5895
5847
|
seriesType() {
|
|
5896
5848
|
return this.ee.wh();
|
|
@@ -5924,9 +5876,9 @@ class Oh {
|
|
|
5924
5876
|
this.kM.v() && this.kM.p(t);
|
|
5925
5877
|
}
|
|
5926
5878
|
}
|
|
5927
|
-
class
|
|
5879
|
+
class Yh {
|
|
5928
5880
|
constructor(t, i, s) {
|
|
5929
|
-
this.EM = new
|
|
5881
|
+
this.EM = new S(), this.Nu = new S(), this.xw = new S(), this.ns = t, this.Jh = t.Et(), this.tg = i, this.Jh.Lc().i(this.AM.bind(this)), this.Jh.zc().i(this.LM.bind(this)), this.tg.Dw().i(this.zM.bind(this)), this.cu = s;
|
|
5930
5882
|
}
|
|
5931
5883
|
m() {
|
|
5932
5884
|
this.Jh.Lc().u(this), this.Jh.zc().u(this), this.tg.Dw().u(this), this.EM.m(), this.Nu.m(), this.xw.m();
|
|
@@ -5953,7 +5905,7 @@ class Ah {
|
|
|
5953
5905
|
return t === null ? null : { from: t.Aa(), to: t.bi() };
|
|
5954
5906
|
}
|
|
5955
5907
|
setVisibleLogicalRange(t) {
|
|
5956
|
-
|
|
5908
|
+
C(t.from <= t.to, "The from index cannot be after the to index."), this.ns.$d(t);
|
|
5957
5909
|
}
|
|
5958
5910
|
resetTimeScale() {
|
|
5959
5911
|
this.ns.wn();
|
|
@@ -6008,7 +5960,7 @@ class Ah {
|
|
|
6008
5960
|
this.Jh.cr(t);
|
|
6009
5961
|
}
|
|
6010
5962
|
options() {
|
|
6011
|
-
return { ...
|
|
5963
|
+
return { ...W(this.Jh.N()), barSpacing: this.Jh.ul() };
|
|
6012
5964
|
}
|
|
6013
5965
|
AM() {
|
|
6014
5966
|
this.EM.v() && this.EM.p(this.getVisibleRange());
|
|
@@ -6020,32 +5972,32 @@ class Ah {
|
|
|
6020
5972
|
this.xw.p(t.width, t.height);
|
|
6021
5973
|
}
|
|
6022
5974
|
}
|
|
6023
|
-
function
|
|
6024
|
-
return function(t) {
|
|
6025
|
-
if (
|
|
5975
|
+
function ls(h) {
|
|
5976
|
+
return (function(t) {
|
|
5977
|
+
if (dt(t.handleScale)) {
|
|
6026
5978
|
const s = t.handleScale;
|
|
6027
5979
|
t.handleScale = { axisDoubleClickReset: { time: s, price: s }, axisPressedMouseMove: { time: s, price: s }, mouseWheel: s, pinch: s };
|
|
6028
5980
|
} else if (t.handleScale !== void 0) {
|
|
6029
5981
|
const { axisPressedMouseMove: s, axisDoubleClickReset: e } = t.handleScale;
|
|
6030
|
-
|
|
5982
|
+
dt(s) && (t.handleScale.axisPressedMouseMove = { time: s, price: s }), dt(e) && (t.handleScale.axisDoubleClickReset = { time: e, price: e });
|
|
6031
5983
|
}
|
|
6032
5984
|
const i = t.handleScroll;
|
|
6033
|
-
|
|
6034
|
-
}(h), h;
|
|
5985
|
+
dt(i) && (t.handleScroll = { horzTouchDrag: i, vertTouchDrag: i, mouseWheel: i, pressedMouseMove: i });
|
|
5986
|
+
})(h), h;
|
|
6035
5987
|
}
|
|
6036
5988
|
class Jh {
|
|
6037
5989
|
constructor(t, i, s) {
|
|
6038
|
-
this.OM = /* @__PURE__ */ new Map(), this.NM = /* @__PURE__ */ new Map(), this.FM = new
|
|
6039
|
-
const e = s === void 0 ?
|
|
6040
|
-
this.$M = i, this.Yp = new
|
|
5990
|
+
this.OM = /* @__PURE__ */ new Map(), this.NM = /* @__PURE__ */ new Map(), this.FM = new S(), this.WM = new S(), this.HM = new S(), this.Xc = /* @__PURE__ */ new WeakMap(), this.UM = new Sh(i);
|
|
5991
|
+
const e = s === void 0 ? W(rs()) : R(W(rs()), ls(s));
|
|
5992
|
+
this.$M = i, this.Yp = new ph(t, e, i), this.Yp.nw().i(((r) => {
|
|
6041
5993
|
this.FM.v() && this.FM.p(this.qM(r()));
|
|
6042
|
-
}, this), this.Yp.ew().i((r) => {
|
|
5994
|
+
}), this), this.Yp.ew().i(((r) => {
|
|
6043
5995
|
this.WM.v() && this.WM.p(this.qM(r()));
|
|
6044
|
-
}, this), this.Yp.Md().i((r) => {
|
|
5996
|
+
}), this), this.Yp.Md().i(((r) => {
|
|
6045
5997
|
this.HM.v() && this.HM.p(this.qM(r()));
|
|
6046
|
-
}, this);
|
|
5998
|
+
}), this);
|
|
6047
5999
|
const n = this.Yp.Qt();
|
|
6048
|
-
this.jM = new
|
|
6000
|
+
this.jM = new Yh(n, this.Yp.rg(), this.$M);
|
|
6049
6001
|
}
|
|
6050
6002
|
remove() {
|
|
6051
6003
|
this.Yp.nw().u(this), this.Yp.ew().u(this), this.Yp.Md().u(this), this.jM.m(), this.Yp.m(), this.OM.clear(), this.NM.clear(), this.FM.m(), this.WM.m(), this.HM.m(), this.UM.m();
|
|
@@ -6054,14 +6006,14 @@ class Jh {
|
|
|
6054
6006
|
this.autoSizeActive() || this.Yp.sg(t, i, s);
|
|
6055
6007
|
}
|
|
6056
6008
|
addCustomSeries(t, i = {}, s = 0) {
|
|
6057
|
-
const e = ((n) => ({ type: "Custom", isBuiltIn: !1, defaultOptions: { ...
|
|
6009
|
+
const e = ((n) => ({ type: "Custom", isBuiltIn: !1, defaultOptions: { ...Lh, ...n.defaultOptions() }, YM: zh, KM: n }))(D(t));
|
|
6058
6010
|
return this.ZM(e, i, s);
|
|
6059
6011
|
}
|
|
6060
6012
|
addSeries(t, i = {}, s = 0) {
|
|
6061
6013
|
return this.ZM(t, i, s);
|
|
6062
6014
|
}
|
|
6063
6015
|
removeSeries(t) {
|
|
6064
|
-
const i =
|
|
6016
|
+
const i = T(this.OM.get(t)), s = this.UM.Hd(i);
|
|
6065
6017
|
this.Yp.Qt().Hd(i), this.GM(s), this.OM.delete(t), this.NM.delete(i);
|
|
6066
6018
|
}
|
|
6067
6019
|
DM(t, i) {
|
|
@@ -6099,7 +6051,7 @@ class Jh {
|
|
|
6099
6051
|
return this.jM;
|
|
6100
6052
|
}
|
|
6101
6053
|
applyOptions(t) {
|
|
6102
|
-
this.Yp.cr(
|
|
6054
|
+
this.Yp.cr(ls(t));
|
|
6103
6055
|
}
|
|
6104
6056
|
options() {
|
|
6105
6057
|
return this.Yp.N();
|
|
@@ -6130,7 +6082,7 @@ class Jh {
|
|
|
6130
6082
|
return this.Yp.hv();
|
|
6131
6083
|
}
|
|
6132
6084
|
panes() {
|
|
6133
|
-
return this.Yp.Qt().Xs().map((t) => this.XM(t));
|
|
6085
|
+
return this.Yp.Qt().Xs().map(((t) => this.XM(t)));
|
|
6134
6086
|
}
|
|
6135
6087
|
paneSize(t = 0) {
|
|
6136
6088
|
const i = this.Yp.gg(t);
|
|
@@ -6149,59 +6101,59 @@ class Jh {
|
|
|
6149
6101
|
return this.$M;
|
|
6150
6102
|
}
|
|
6151
6103
|
ZM(t, i = {}, s = 0) {
|
|
6152
|
-
|
|
6104
|
+
C(t.YM !== void 0), (function(l) {
|
|
6153
6105
|
if (l === void 0 || l.type === "custom") return;
|
|
6154
6106
|
const a = l;
|
|
6155
6107
|
a.minMove !== void 0 && a.precision === void 0 && (a.precision = zs(a.minMove));
|
|
6156
|
-
}(i.priceFormat), t.type === "Candlestick" && function(l) {
|
|
6108
|
+
})(i.priceFormat), t.type === "Candlestick" && (function(l) {
|
|
6157
6109
|
l.borderColor !== void 0 && (l.borderUpColor = l.borderColor, l.borderDownColor = l.borderColor), l.wickColor !== void 0 && (l.wickUpColor = l.wickColor, l.wickDownColor = l.wickColor);
|
|
6158
|
-
}(i);
|
|
6159
|
-
const e =
|
|
6110
|
+
})(i);
|
|
6111
|
+
const e = R(W(gs), W(t.defaultOptions), i), n = t.YM, r = new Tt(this.Yp.Qt(), t.type, e, n, t.KM);
|
|
6160
6112
|
this.Yp.Qt().Fd(r, s);
|
|
6161
|
-
const o = new
|
|
6113
|
+
const o = new Ah(r, this, this, this, this.$M, ((l) => this.XM(l)));
|
|
6162
6114
|
return this.OM.set(o, r), this.NM.set(r, o), o;
|
|
6163
6115
|
}
|
|
6164
6116
|
GM(t) {
|
|
6165
6117
|
const i = this.Yp.Qt();
|
|
6166
|
-
i.Od(t.Et.vc, t.Et.sM, t.Et.nM), t.F_.forEach((s, e) => e.ht(s.le, s.iM)), i.Et().Ju(), i.Sc();
|
|
6118
|
+
i.Od(t.Et.vc, t.Et.sM, t.Et.nM), t.F_.forEach(((s, e) => e.ht(s.le, s.iM))), i.Et().Ju(), i.Sc();
|
|
6167
6119
|
}
|
|
6168
6120
|
JM(t) {
|
|
6169
|
-
return
|
|
6121
|
+
return T(this.NM.get(t));
|
|
6170
6122
|
}
|
|
6171
6123
|
qM(t) {
|
|
6172
6124
|
const i = /* @__PURE__ */ new Map();
|
|
6173
|
-
t.Vg.forEach((e, n) => {
|
|
6125
|
+
t.Vg.forEach(((e, n) => {
|
|
6174
6126
|
const r = n.wh(), o = _t(r)(e);
|
|
6175
|
-
if (r !== "Custom")
|
|
6127
|
+
if (r !== "Custom") C(vh(o));
|
|
6176
6128
|
else {
|
|
6177
6129
|
const l = n.hl();
|
|
6178
|
-
|
|
6130
|
+
C(!l || l(o) === !1);
|
|
6179
6131
|
}
|
|
6180
6132
|
i.set(this.JM(n), o);
|
|
6181
|
-
});
|
|
6133
|
+
}));
|
|
6182
6134
|
const s = t.Ig !== void 0 && this.NM.has(t.Ig) ? this.JM(t.Ig) : void 0;
|
|
6183
6135
|
return { time: t.Gr, logical: t.js, point: t.Rg, paneIndex: t.Dg, hoveredSeries: s, hoveredObjectId: t.Bg, seriesData: i, sourceEvent: t.Eg };
|
|
6184
6136
|
}
|
|
6185
6137
|
XM(t) {
|
|
6186
6138
|
let i = this.Xc.get(t);
|
|
6187
|
-
return i || (i = new
|
|
6139
|
+
return i || (i = new Kh(this.Yp, ((s) => this.JM(s)), t, this), this.Xc.set(t, i)), i;
|
|
6188
6140
|
}
|
|
6189
6141
|
}
|
|
6190
|
-
function
|
|
6142
|
+
function $h(h) {
|
|
6191
6143
|
if (ct(h)) {
|
|
6192
6144
|
const t = document.getElementById(h);
|
|
6193
|
-
return
|
|
6145
|
+
return C(t !== null, `Cannot find element in DOM with id=${h}`), t;
|
|
6194
6146
|
}
|
|
6195
6147
|
return h;
|
|
6196
6148
|
}
|
|
6197
|
-
function
|
|
6198
|
-
const s =
|
|
6149
|
+
function Uh(h, t, i) {
|
|
6150
|
+
const s = $h(h), e = new Jh(s, t, i);
|
|
6199
6151
|
return t.setOptions(e.options()), e;
|
|
6200
6152
|
}
|
|
6201
|
-
function
|
|
6202
|
-
return
|
|
6153
|
+
function Xh(h, t) {
|
|
6154
|
+
return Uh(h, new Ji(), Ji.pf(t));
|
|
6203
6155
|
}
|
|
6204
|
-
class
|
|
6156
|
+
class Gh extends Is {
|
|
6205
6157
|
constructor(t, i) {
|
|
6206
6158
|
super(t, i, !0);
|
|
6207
6159
|
}
|
|
@@ -6213,69 +6165,69 @@ class Xh extends Is {
|
|
|
6213
6165
|
}
|
|
6214
6166
|
pM() {
|
|
6215
6167
|
const t = this.ee.ga();
|
|
6216
|
-
this.aM = this.ee.Na().Dh().map((i) => {
|
|
6168
|
+
this.aM = this.ee.Na().Dh().map(((i) => {
|
|
6217
6169
|
let s;
|
|
6218
6170
|
if ((i.jr ?? 1) > 1) {
|
|
6219
6171
|
const e = i.Wt[1], n = i.Wt[2], r = i.Wt[3];
|
|
6220
6172
|
s = Math.abs(e - r) > Math.abs(n - r) ? e : n;
|
|
6221
6173
|
} else s = i.Wt[3];
|
|
6222
6174
|
return this.tb(i.js, s, t);
|
|
6223
|
-
});
|
|
6175
|
+
}));
|
|
6224
6176
|
}
|
|
6225
6177
|
}
|
|
6226
|
-
function
|
|
6178
|
+
function Hh(h, t, i, s, e, n, r) {
|
|
6227
6179
|
if (t.length === 0 || s.from >= t.length || s.to <= 0) return;
|
|
6228
6180
|
const { context: o, horizontalPixelRatio: l, verticalPixelRatio: a } = h, u = t[s.from];
|
|
6229
|
-
let c = n(h, u),
|
|
6181
|
+
let c = n(h, u), f = u;
|
|
6230
6182
|
if (s.to - s.from < 2) {
|
|
6231
|
-
const
|
|
6183
|
+
const d = e / 2;
|
|
6232
6184
|
o.beginPath();
|
|
6233
|
-
const m = { _t: u._t -
|
|
6234
|
-
o.moveTo(m._t * l, m.ut * a), o.lineTo(
|
|
6185
|
+
const m = { _t: u._t - d, ut: u.ut }, w = { _t: u._t + d, ut: u.ut };
|
|
6186
|
+
o.moveTo(m._t * l, m.ut * a), o.lineTo(w._t * l, w.ut * a), r(h, c, m, w);
|
|
6235
6187
|
} else {
|
|
6236
|
-
const
|
|
6237
|
-
r(h, c,
|
|
6188
|
+
const d = (w, v) => {
|
|
6189
|
+
r(h, c, f, v), o.beginPath(), c = w, f = v;
|
|
6238
6190
|
};
|
|
6239
|
-
let m =
|
|
6191
|
+
let m = f;
|
|
6240
6192
|
o.beginPath(), o.moveTo(u._t * l, u.ut * a);
|
|
6241
|
-
for (let
|
|
6242
|
-
m = t[
|
|
6243
|
-
const
|
|
6193
|
+
for (let w = s.from + 1; w < s.to; ++w) {
|
|
6194
|
+
m = t[w];
|
|
6195
|
+
const v = n(h, m);
|
|
6244
6196
|
switch (i) {
|
|
6245
6197
|
case 0:
|
|
6246
6198
|
o.lineTo(m._t * l, m.ut * a);
|
|
6247
6199
|
break;
|
|
6248
6200
|
case 1:
|
|
6249
|
-
o.lineTo(m._t * l, t[
|
|
6201
|
+
o.lineTo(m._t * l, t[w - 1].ut * a), v !== c && (d(v, m), o.lineTo(m._t * l, t[w - 1].ut * a)), o.lineTo(m._t * l, m.ut * a);
|
|
6250
6202
|
break;
|
|
6251
6203
|
case 2: {
|
|
6252
|
-
const [
|
|
6253
|
-
o.bezierCurveTo(
|
|
6204
|
+
const [g, b] = Qh(t, w - 1, w);
|
|
6205
|
+
o.bezierCurveTo(g._t * l, g.ut * a, b._t * l, b.ut * a, m._t * l, m.ut * a);
|
|
6254
6206
|
break;
|
|
6255
6207
|
}
|
|
6256
6208
|
}
|
|
6257
|
-
i !== 1 &&
|
|
6209
|
+
i !== 1 && v !== c && (d(v, m), o.moveTo(m._t * l, m.ut * a));
|
|
6258
6210
|
}
|
|
6259
|
-
(
|
|
6211
|
+
(f !== m || f === m && i === 1) && r(h, c, f, m);
|
|
6260
6212
|
}
|
|
6261
6213
|
}
|
|
6262
|
-
const
|
|
6214
|
+
const as = 6;
|
|
6263
6215
|
function ti(h, t) {
|
|
6264
6216
|
return { _t: h._t - t._t, ut: h.ut - t.ut };
|
|
6265
6217
|
}
|
|
6266
|
-
function
|
|
6218
|
+
function us(h, t) {
|
|
6267
6219
|
return { _t: h._t / t, ut: h.ut / t };
|
|
6268
6220
|
}
|
|
6269
|
-
function
|
|
6221
|
+
function Qh(h, t, i) {
|
|
6270
6222
|
const s = Math.max(0, t - 1), e = Math.min(h.length - 1, i + 1);
|
|
6271
6223
|
var n, r;
|
|
6272
|
-
return [(n = h[t], r =
|
|
6224
|
+
return [(n = h[t], r = us(ti(h[i], h[s]), as), { _t: n._t + r._t, ut: n.ut + r.ut }), ti(h[i], us(ti(h[e], h[t]), as))];
|
|
6273
6225
|
}
|
|
6274
|
-
function
|
|
6226
|
+
function qh(h, t) {
|
|
6275
6227
|
const i = h.context;
|
|
6276
6228
|
i.strokeStyle = t, i.stroke();
|
|
6277
6229
|
}
|
|
6278
|
-
class
|
|
6230
|
+
class Zh extends st {
|
|
6279
6231
|
constructor() {
|
|
6280
6232
|
super(...arguments), this.rt = null;
|
|
6281
6233
|
}
|
|
@@ -6287,34 +6239,34 @@ class qh extends st {
|
|
|
6287
6239
|
const { ot: i, lt: s, ib: e, sb: n, ct: r, Zt: o, nb: l } = this.rt;
|
|
6288
6240
|
if (s === null) return;
|
|
6289
6241
|
const a = t.context;
|
|
6290
|
-
a.lineCap = "butt", a.lineWidth = r * t.verticalPixelRatio,
|
|
6242
|
+
a.lineCap = "butt", a.lineWidth = r * t.verticalPixelRatio, J(a, o), a.lineJoin = "round";
|
|
6291
6243
|
const u = this.eb.bind(this);
|
|
6292
|
-
n !== void 0 &&
|
|
6244
|
+
n !== void 0 && Hh(t, i, n, s, e, u, qh), l && (function(c, f, d, m, w) {
|
|
6293
6245
|
if (m.to - m.from <= 0) return;
|
|
6294
|
-
const { horizontalPixelRatio:
|
|
6246
|
+
const { horizontalPixelRatio: v, verticalPixelRatio: g, context: b } = c;
|
|
6295
6247
|
let M = null;
|
|
6296
|
-
const y = Math.max(1, Math.floor(
|
|
6297
|
-
for (let
|
|
6298
|
-
const
|
|
6299
|
-
if (
|
|
6300
|
-
const
|
|
6301
|
-
|
|
6302
|
-
const
|
|
6303
|
-
|
|
6248
|
+
const y = Math.max(1, Math.floor(v)) % 2 / 2, x = d * g + y;
|
|
6249
|
+
for (let L = m.to - 1; L >= m.from; --L) {
|
|
6250
|
+
const P = f[L];
|
|
6251
|
+
if (P) {
|
|
6252
|
+
const F = w(c, P);
|
|
6253
|
+
F !== M && (b.beginPath(), M !== null && b.fill(), b.fillStyle = F, M = F);
|
|
6254
|
+
const j = Math.round(P._t * v) + y, et = P.ut * g;
|
|
6255
|
+
b.moveTo(j, et), b.arc(j, et, x, 0, 2 * Math.PI);
|
|
6304
6256
|
}
|
|
6305
6257
|
}
|
|
6306
|
-
|
|
6307
|
-
}(t, i, l, s, u);
|
|
6258
|
+
b.fill();
|
|
6259
|
+
})(t, i, l, s, u);
|
|
6308
6260
|
}
|
|
6309
6261
|
}
|
|
6310
|
-
class
|
|
6262
|
+
class tn extends Zh {
|
|
6311
6263
|
eb(t, i) {
|
|
6312
6264
|
return i.vt;
|
|
6313
6265
|
}
|
|
6314
6266
|
}
|
|
6315
|
-
class
|
|
6267
|
+
class sn extends Gh {
|
|
6316
6268
|
constructor() {
|
|
6317
|
-
super(...arguments), this.cM = new
|
|
6269
|
+
super(...arguments), this.cM = new tn();
|
|
6318
6270
|
}
|
|
6319
6271
|
tb(t, i, s) {
|
|
6320
6272
|
return { ...this.QM(t, i), ...s.gh(t) };
|
|
@@ -6324,61 +6276,61 @@ class tn extends Xh {
|
|
|
6324
6276
|
this.cM.ht(i);
|
|
6325
6277
|
}
|
|
6326
6278
|
}
|
|
6327
|
-
const
|
|
6279
|
+
const en = { type: "Line", isBuiltIn: !0, defaultOptions: { color: "#2196f3", lineStyle: 0, lineWidth: 3, lineType: 0, lineVisible: !0, crosshairMarkerVisible: !0, crosshairMarkerRadius: 4, crosshairMarkerBorderColor: "", crosshairMarkerBorderWidth: 2, crosshairMarkerBackgroundColor: "", lastPriceAnimation: 0, pointMarkersVisible: !1 }, YM: (h, t) => new sn(h, t) };
|
|
6328
6280
|
({ ...gs });
|
|
6329
|
-
const
|
|
6281
|
+
const hn = /* @__PURE__ */ k("div")({
|
|
6330
6282
|
name: "Container",
|
|
6331
6283
|
class: "c16uapq7",
|
|
6332
6284
|
propsAsIs: !1
|
|
6333
|
-
}),
|
|
6285
|
+
}), nn = /* @__PURE__ */ k("div")({
|
|
6334
6286
|
name: "Header",
|
|
6335
6287
|
class: "h1bkiv31",
|
|
6336
6288
|
propsAsIs: !1
|
|
6337
|
-
}),
|
|
6289
|
+
}), rn = /* @__PURE__ */ k("img")({
|
|
6338
6290
|
name: "Logo",
|
|
6339
6291
|
class: "l58x1zx",
|
|
6340
6292
|
propsAsIs: !1
|
|
6341
|
-
}),
|
|
6293
|
+
}), on = /* @__PURE__ */ k("span")({
|
|
6342
6294
|
name: "AdTitle",
|
|
6343
6295
|
class: "aje8tdj",
|
|
6344
6296
|
propsAsIs: !1
|
|
6345
|
-
}),
|
|
6297
|
+
}), ln = /* @__PURE__ */ k("div")({
|
|
6346
6298
|
name: "Vol",
|
|
6347
6299
|
class: "v1b9hkhr",
|
|
6348
6300
|
propsAsIs: !1
|
|
6349
|
-
}),
|
|
6301
|
+
}), an = /* @__PURE__ */ k("div")({
|
|
6350
6302
|
name: "Teams",
|
|
6351
6303
|
class: "t103i3ll",
|
|
6352
6304
|
propsAsIs: !1
|
|
6353
|
-
}),
|
|
6305
|
+
}), un = /* @__PURE__ */ k("div")({
|
|
6354
6306
|
name: "Team",
|
|
6355
6307
|
class: "tv6559o",
|
|
6356
6308
|
propsAsIs: !1
|
|
6357
|
-
}),
|
|
6309
|
+
}), cn = /* @__PURE__ */ k("img")({
|
|
6358
6310
|
name: "TeamLogo",
|
|
6359
6311
|
class: "td9fhm",
|
|
6360
6312
|
propsAsIs: !1
|
|
6361
|
-
}),
|
|
6313
|
+
}), fn = /* @__PURE__ */ k("span")({
|
|
6362
6314
|
name: "TeamName",
|
|
6363
6315
|
class: "t1bg0qru",
|
|
6364
6316
|
propsAsIs: !1
|
|
6365
|
-
}), dn = /* @__PURE__ */
|
|
6317
|
+
}), dn = /* @__PURE__ */ k("span")({
|
|
6366
6318
|
name: "TeamPercentage",
|
|
6367
6319
|
class: "t1k3nqya",
|
|
6368
6320
|
propsAsIs: !1
|
|
6369
|
-
}),
|
|
6321
|
+
}), mn = /* @__PURE__ */ k("div")({
|
|
6370
6322
|
name: "Draw",
|
|
6371
6323
|
class: "du878ld",
|
|
6372
6324
|
propsAsIs: !1
|
|
6373
|
-
}),
|
|
6325
|
+
}), pn = /* @__PURE__ */ k("span")({
|
|
6374
6326
|
name: "DrawPercentage",
|
|
6375
6327
|
class: "d11m2h7g",
|
|
6376
6328
|
propsAsIs: !1
|
|
6377
|
-
}),
|
|
6329
|
+
}), gn = /* @__PURE__ */ k("div")({
|
|
6378
6330
|
name: "Chart",
|
|
6379
6331
|
class: "cpgwa9e",
|
|
6380
6332
|
propsAsIs: !1
|
|
6381
|
-
}),
|
|
6333
|
+
}), vn = (h) => `${(h / 1e3).toFixed(1)}`, cs = (h) => h && !h.startsWith("#") ? `#${h}` : h ?? "#fff", wn = ({
|
|
6382
6334
|
logo: h,
|
|
6383
6335
|
volume: t,
|
|
6384
6336
|
drawProbabilityPct: i,
|
|
@@ -6386,29 +6338,27 @@ const en = /* @__PURE__ */ T("div")({
|
|
|
6386
6338
|
drawColor: e,
|
|
6387
6339
|
chartData: n
|
|
6388
6340
|
}) => {
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
const a = o.current;
|
|
6394
|
-
if (!a || !n || n.length === 0)
|
|
6341
|
+
const r = Ds(null);
|
|
6342
|
+
return Ks(() => {
|
|
6343
|
+
const o = r.current;
|
|
6344
|
+
if (!o || !n || n.length === 0)
|
|
6395
6345
|
return;
|
|
6396
|
-
let
|
|
6346
|
+
let l = 0;
|
|
6397
6347
|
n.forEach((v) => {
|
|
6398
|
-
v.points.forEach((
|
|
6399
|
-
const
|
|
6400
|
-
|
|
6348
|
+
v.points.forEach((g) => {
|
|
6349
|
+
const b = g.p * 100;
|
|
6350
|
+
b > l && (l = b);
|
|
6401
6351
|
});
|
|
6402
6352
|
});
|
|
6403
|
-
const
|
|
6404
|
-
let
|
|
6405
|
-
if (
|
|
6406
|
-
const v = new Date(
|
|
6407
|
-
|
|
6353
|
+
const a = Math.floor(l / 10) * 10, u = 0, c = n[0]?.points || [];
|
|
6354
|
+
let f = "day";
|
|
6355
|
+
if (c.length >= 2) {
|
|
6356
|
+
const v = new Date(c[0].t).getTime() / 1e3, g = new Date(c[1].t).getTime() / 1e3 - v;
|
|
6357
|
+
g >= 1200 * 60 ? f = "day" : g >= 3600 ? f = "hour" : f = "minute";
|
|
6408
6358
|
}
|
|
6409
|
-
const
|
|
6359
|
+
const d = Xh(o, {
|
|
6410
6360
|
layout: {
|
|
6411
|
-
background: { type:
|
|
6361
|
+
background: { type: hi.Solid, color: "transparent" },
|
|
6412
6362
|
textColor: "rgba(255, 255, 255, 0.5)",
|
|
6413
6363
|
fontSize: 12
|
|
6414
6364
|
},
|
|
@@ -6430,22 +6380,22 @@ const en = /* @__PURE__ */ T("div")({
|
|
|
6430
6380
|
labelVisible: !1
|
|
6431
6381
|
}
|
|
6432
6382
|
},
|
|
6433
|
-
width:
|
|
6383
|
+
width: o.clientWidth,
|
|
6434
6384
|
handleScroll: !1,
|
|
6435
6385
|
handleScale: !1,
|
|
6436
6386
|
height: 300,
|
|
6437
6387
|
localization: {
|
|
6438
6388
|
timeFormatter: (v) => {
|
|
6439
|
-
const
|
|
6440
|
-
if (
|
|
6441
|
-
const
|
|
6442
|
-
return `${
|
|
6389
|
+
const g = new Date(v * 1e3);
|
|
6390
|
+
if (f === "day") {
|
|
6391
|
+
const b = g.getUTCDate(), M = g.toLocaleDateString("en-US", { month: "short", timeZone: "UTC" });
|
|
6392
|
+
return `${b} ${M}`;
|
|
6443
6393
|
} else {
|
|
6444
|
-
if (
|
|
6445
|
-
return `${
|
|
6394
|
+
if (f === "hour")
|
|
6395
|
+
return `${g.getUTCHours()}h`;
|
|
6446
6396
|
{
|
|
6447
|
-
const
|
|
6448
|
-
return `${
|
|
6397
|
+
const b = g.getUTCHours(), M = g.getUTCMinutes(), y = b >= 12 ? "pm" : "am";
|
|
6398
|
+
return `${b % 12 || 12}:${M.toString().padStart(2, "0")}${y}`;
|
|
6449
6399
|
}
|
|
6450
6400
|
}
|
|
6451
6401
|
}
|
|
@@ -6461,18 +6411,18 @@ const en = /* @__PURE__ */ T("div")({
|
|
|
6461
6411
|
fixLeftEdge: !0,
|
|
6462
6412
|
fixRightEdge: !0,
|
|
6463
6413
|
tickMarkFormatter: (v) => {
|
|
6464
|
-
const
|
|
6465
|
-
if (!
|
|
6414
|
+
const g = new Date(v * 1e3);
|
|
6415
|
+
if (!c.slice(-4).map((b) => Math.floor(new Date(b.t).getTime() / 1e3)).includes(v))
|
|
6466
6416
|
return "";
|
|
6467
|
-
if (
|
|
6468
|
-
const
|
|
6469
|
-
return `${
|
|
6417
|
+
if (f === "day") {
|
|
6418
|
+
const b = g.getUTCDate(), M = g.toLocaleDateString("en-US", { month: "short", timeZone: "UTC" });
|
|
6419
|
+
return `${b} ${M}`;
|
|
6470
6420
|
} else {
|
|
6471
|
-
if (
|
|
6472
|
-
return `${
|
|
6421
|
+
if (f === "hour")
|
|
6422
|
+
return `${g.getUTCHours()}h`;
|
|
6473
6423
|
{
|
|
6474
|
-
const
|
|
6475
|
-
return `${
|
|
6424
|
+
const b = g.getUTCHours(), M = g.getUTCMinutes(), y = b >= 12 ? "pm" : "am";
|
|
6425
|
+
return `${b % 12 || 12}:${M.toString().padStart(2, "0")}${y}`;
|
|
6476
6426
|
}
|
|
6477
6427
|
}
|
|
6478
6428
|
}
|
|
@@ -6485,107 +6435,103 @@ const en = /* @__PURE__ */ T("div")({
|
|
|
6485
6435
|
leftPriceScale: {
|
|
6486
6436
|
visible: !1
|
|
6487
6437
|
}
|
|
6488
|
-
}),
|
|
6438
|
+
}), m = [];
|
|
6489
6439
|
if (n.forEach((v) => {
|
|
6490
|
-
|
|
6491
|
-
const y = g.addSeries(sn, {
|
|
6440
|
+
const g = d.addSeries(en, {
|
|
6492
6441
|
color: v.color,
|
|
6493
6442
|
lineWidth: 4,
|
|
6494
6443
|
lastValueVisible: !1,
|
|
6495
6444
|
priceLineVisible: !1,
|
|
6496
6445
|
priceFormat: {
|
|
6497
6446
|
type: "custom",
|
|
6498
|
-
formatter: (
|
|
6447
|
+
formatter: (M) => `${Math.round(M)}%`
|
|
6499
6448
|
},
|
|
6500
6449
|
autoscaleInfoProvider: () => ({
|
|
6501
6450
|
priceRange: {
|
|
6502
|
-
minValue:
|
|
6503
|
-
maxValue:
|
|
6451
|
+
minValue: u,
|
|
6452
|
+
maxValue: a
|
|
6504
6453
|
}
|
|
6505
6454
|
})
|
|
6506
|
-
}),
|
|
6507
|
-
time: Math.floor(new Date(
|
|
6508
|
-
value:
|
|
6509
|
-
}))
|
|
6510
|
-
(
|
|
6455
|
+
}), b = v.points?.map((M) => ({
|
|
6456
|
+
time: Math.floor(new Date(M.t).getTime() / 1e3),
|
|
6457
|
+
value: M.p * 100
|
|
6458
|
+
}))?.filter(
|
|
6459
|
+
(M, y, x) => y === 0 || M.time !== x[y - 1].time
|
|
6511
6460
|
);
|
|
6512
|
-
|
|
6513
|
-
series:
|
|
6514
|
-
lastPoint:
|
|
6461
|
+
g.setData(b), b.length > 0 && m.push({
|
|
6462
|
+
series: g,
|
|
6463
|
+
lastPoint: b[b.length - 1],
|
|
6515
6464
|
color: v.color
|
|
6516
6465
|
});
|
|
6517
|
-
}),
|
|
6518
|
-
const v =
|
|
6519
|
-
|
|
6520
|
-
from:
|
|
6521
|
-
to:
|
|
6466
|
+
}), c.length >= 4) {
|
|
6467
|
+
const v = c.slice(-4), g = Math.floor(new Date(v[0].t).getTime() / 1e3), b = Math.floor(new Date(v[3].t).getTime() / 1e3), M = b - g, y = M * 0.02, x = M * 0.03;
|
|
6468
|
+
d.timeScale().setVisibleRange({
|
|
6469
|
+
from: g - y,
|
|
6470
|
+
to: b + x
|
|
6522
6471
|
});
|
|
6523
6472
|
} else
|
|
6524
|
-
|
|
6473
|
+
d.timeScale().fitContent();
|
|
6525
6474
|
setTimeout(() => {
|
|
6526
|
-
const v =
|
|
6475
|
+
const v = o.querySelector(".tv-lightweight-charts");
|
|
6527
6476
|
if (!v)
|
|
6528
6477
|
return;
|
|
6529
6478
|
v.style.position = "relative";
|
|
6530
|
-
const
|
|
6531
|
-
|
|
6532
|
-
const
|
|
6533
|
-
if (
|
|
6534
|
-
const
|
|
6535
|
-
|
|
6479
|
+
const g = v.querySelector("table");
|
|
6480
|
+
g && (g.style.position = "relative", g.style.zIndex = "1", g.style.pointerEvents = "none"), m.forEach(({ series: b, lastPoint: M, color: y }) => {
|
|
6481
|
+
const x = b.priceToCoordinate(M.value), L = d.timeScale().timeToCoordinate(M.time);
|
|
6482
|
+
if (x !== null && L !== null) {
|
|
6483
|
+
const P = document.createElement("div");
|
|
6484
|
+
P.style.cssText = `
|
|
6536
6485
|
position: absolute !important;
|
|
6537
6486
|
width: 40px !important;
|
|
6538
6487
|
height: 40px !important;
|
|
6539
6488
|
border-radius: 50% !important;
|
|
6540
|
-
background-color: ${
|
|
6489
|
+
background-color: ${y} !important;
|
|
6541
6490
|
border: 10px solid rgba(26, 26, 26, 0.75) !important;
|
|
6542
6491
|
left: ${L - 20}px !important;
|
|
6543
|
-
top: ${
|
|
6492
|
+
top: ${x - 20}px !important;
|
|
6544
6493
|
pointer-events: none !important;
|
|
6545
6494
|
display: block !important;
|
|
6546
6495
|
visibility: visible !important;
|
|
6547
6496
|
opacity: 1 !important;
|
|
6548
|
-
`,
|
|
6497
|
+
`, P.className = "chart-endpoint-marker", v.appendChild(P);
|
|
6549
6498
|
}
|
|
6550
6499
|
});
|
|
6551
6500
|
}, 100);
|
|
6552
|
-
const
|
|
6553
|
-
|
|
6501
|
+
const w = () => {
|
|
6502
|
+
o && d.applyOptions({ width: o.clientWidth });
|
|
6554
6503
|
};
|
|
6555
|
-
return window.addEventListener("resize",
|
|
6556
|
-
window.removeEventListener("resize",
|
|
6557
|
-
const v =
|
|
6558
|
-
v && v.querySelectorAll(".chart-endpoint-marker").forEach((
|
|
6504
|
+
return window.addEventListener("resize", w), () => {
|
|
6505
|
+
window.removeEventListener("resize", w);
|
|
6506
|
+
const v = o.querySelector(".tv-lightweight-charts");
|
|
6507
|
+
v && v.querySelectorAll(".chart-endpoint-marker").forEach((g) => g.remove()), d.remove();
|
|
6559
6508
|
};
|
|
6560
|
-
}, [n]), /* @__PURE__ */ K(
|
|
6561
|
-
/* @__PURE__ */ K(
|
|
6562
|
-
/* @__PURE__ */
|
|
6563
|
-
/* @__PURE__ */
|
|
6509
|
+
}, [n]), /* @__PURE__ */ K(hn, { children: [
|
|
6510
|
+
/* @__PURE__ */ K(nn, { children: [
|
|
6511
|
+
/* @__PURE__ */ E(rn, { src: h }),
|
|
6512
|
+
/* @__PURE__ */ E(on, { children: "Ad" })
|
|
6564
6513
|
] }),
|
|
6565
|
-
/* @__PURE__ */ K(
|
|
6514
|
+
/* @__PURE__ */ K(ln, { children: [
|
|
6566
6515
|
"$",
|
|
6567
|
-
|
|
6516
|
+
vn(t),
|
|
6568
6517
|
"k Vol."
|
|
6569
6518
|
] }),
|
|
6570
|
-
/* @__PURE__ */
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
] }, a);
|
|
6580
|
-
}) }),
|
|
6581
|
-
/* @__PURE__ */ K(fn, { children: [
|
|
6519
|
+
/* @__PURE__ */ E(an, { children: s?.map(({ teamLogo: o, teamName: l, probabilityPct: a, teamColor: u }, c) => /* @__PURE__ */ K(un, { children: [
|
|
6520
|
+
/* @__PURE__ */ E(cn, { src: o }),
|
|
6521
|
+
/* @__PURE__ */ E(fn, { children: l }),
|
|
6522
|
+
/* @__PURE__ */ K(dn, { style: { color: u ? cs(u) : n?.[c]?.color ?? "#fff" }, children: [
|
|
6523
|
+
Math.round(a),
|
|
6524
|
+
"%"
|
|
6525
|
+
] })
|
|
6526
|
+
] }, l)) }),
|
|
6527
|
+
/* @__PURE__ */ K(mn, { children: [
|
|
6582
6528
|
"Draw",
|
|
6583
6529
|
" ",
|
|
6584
6530
|
/* @__PURE__ */ K(
|
|
6585
|
-
|
|
6531
|
+
pn,
|
|
6586
6532
|
{
|
|
6587
6533
|
style: {
|
|
6588
|
-
color: e ?
|
|
6534
|
+
color: e ? cs(e) : n?.[s?.length ?? 0]?.color ?? "#fff"
|
|
6589
6535
|
},
|
|
6590
6536
|
children: [
|
|
6591
6537
|
Math.round(i),
|
|
@@ -6594,77 +6540,78 @@ const en = /* @__PURE__ */ T("div")({
|
|
|
6594
6540
|
}
|
|
6595
6541
|
)
|
|
6596
6542
|
] }),
|
|
6597
|
-
/* @__PURE__ */
|
|
6543
|
+
/* @__PURE__ */ E(gn, { ref: r })
|
|
6598
6544
|
] });
|
|
6599
|
-
},
|
|
6545
|
+
}, bn = /* @__PURE__ */ k("div")({
|
|
6600
6546
|
name: "Container",
|
|
6601
6547
|
class: "claeaeg",
|
|
6602
6548
|
propsAsIs: !1
|
|
6603
|
-
}),
|
|
6549
|
+
}), Mn = /* @__PURE__ */ k("button")({
|
|
6604
6550
|
name: "Button",
|
|
6605
6551
|
class: "bi136qd",
|
|
6606
6552
|
propsAsIs: !1
|
|
6607
|
-
}),
|
|
6553
|
+
}), yn = ({
|
|
6608
6554
|
sdk: h
|
|
6609
6555
|
}) => {
|
|
6610
|
-
const t =
|
|
6611
|
-
return /* @__PURE__ */
|
|
6556
|
+
const t = ds();
|
|
6557
|
+
return /* @__PURE__ */ E(Mn, {
|
|
6612
6558
|
className: "SLPolymarketButton",
|
|
6613
6559
|
onClick: () => t.polymarket ? h.uiHandlers.disablePolymarket() : h.uiHandlers.enablePolymarket()
|
|
6614
6560
|
});
|
|
6615
|
-
},
|
|
6616
|
-
sdk: h
|
|
6561
|
+
}, _n = ({
|
|
6562
|
+
sdk: h,
|
|
6563
|
+
webos: t
|
|
6617
6564
|
}) => {
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
return /* @__PURE__ */ k("i", {
|
|
6565
|
+
const i = js(h.polymarket.marketWithSeries);
|
|
6566
|
+
if (!i.data && !i.loading)
|
|
6567
|
+
return /* @__PURE__ */ E("i", {
|
|
6622
6568
|
children: "no polymarket data"
|
|
6623
6569
|
});
|
|
6624
|
-
const
|
|
6625
|
-
teams:
|
|
6626
|
-
chartData:
|
|
6627
|
-
} =
|
|
6628
|
-
const
|
|
6629
|
-
return
|
|
6630
|
-
teamName:
|
|
6631
|
-
probabilityPct:
|
|
6632
|
-
teamColor:
|
|
6633
|
-
teamLogo:
|
|
6634
|
-
isDraw:
|
|
6635
|
-
}),
|
|
6636
|
-
label:
|
|
6637
|
-
color:
|
|
6638
|
-
points:
|
|
6639
|
-
}),
|
|
6570
|
+
const s = i.data?.outcomes ?? [], {
|
|
6571
|
+
teams: e,
|
|
6572
|
+
chartData: n
|
|
6573
|
+
} = s.reduce((l, a) => {
|
|
6574
|
+
const u = a.points[a.points.length - 1], c = u ? u.p * 100 : a.probabilityPct;
|
|
6575
|
+
return l.teams.push({
|
|
6576
|
+
teamName: a.label,
|
|
6577
|
+
probabilityPct: c,
|
|
6578
|
+
teamColor: a.color ?? "",
|
|
6579
|
+
teamLogo: a.rawMetadata.teamLogo ?? "",
|
|
6580
|
+
isDraw: a.type === 2
|
|
6581
|
+
}), l.chartData.push({
|
|
6582
|
+
label: a.label,
|
|
6583
|
+
color: a.rawMetadata.teamColor ?? `#${a.color ?? ""}`,
|
|
6584
|
+
points: a.points
|
|
6585
|
+
}), l;
|
|
6640
6586
|
}, {
|
|
6641
6587
|
teams: [],
|
|
6642
6588
|
chartData: []
|
|
6643
6589
|
}), {
|
|
6644
|
-
drawTeam:
|
|
6645
|
-
teamsWithoutDraw:
|
|
6646
|
-
} =
|
|
6590
|
+
drawTeam: r,
|
|
6591
|
+
teamsWithoutDraw: o
|
|
6592
|
+
} = e.reduce((l, a) => (a.isDraw ? l.drawTeam = a : l.teamsWithoutDraw.push(a), l), {
|
|
6647
6593
|
drawTeam: void 0,
|
|
6648
6594
|
teamsWithoutDraw: []
|
|
6649
6595
|
});
|
|
6650
|
-
return /* @__PURE__ */
|
|
6651
|
-
|
|
6596
|
+
return /* @__PURE__ */ E(bn, {
|
|
6597
|
+
className: Vs(t && "SL-CardWebOs"),
|
|
6598
|
+
children: /* @__PURE__ */ E(wn, {
|
|
6652
6599
|
logo: "https://cdn.streamlayer.io/sdk-web/polymarket.png",
|
|
6653
|
-
volume:
|
|
6654
|
-
drawProbabilityPct:
|
|
6655
|
-
drawColor:
|
|
6656
|
-
teams:
|
|
6657
|
-
chartData:
|
|
6600
|
+
volume: i.data?.volume ?? 0,
|
|
6601
|
+
drawProbabilityPct: r?.probabilityPct ?? 0,
|
|
6602
|
+
drawColor: r?.teamColor ?? "",
|
|
6603
|
+
teams: o,
|
|
6604
|
+
chartData: n
|
|
6658
6605
|
})
|
|
6659
6606
|
});
|
|
6660
|
-
}, Rn = ({ theme: h }) => {
|
|
6661
|
-
const t = ms(), i = ps();
|
|
6662
|
-
return t ? /* @__PURE__ */ k("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ k(ds, { customTheme: h ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ k(Mn, { sdk: t }) }) }) : null;
|
|
6663
6607
|
}, In = ({ theme: h }) => {
|
|
6664
|
-
const t = ms(), i = ps()
|
|
6665
|
-
return
|
|
6608
|
+
const t = ms(), i = ps();
|
|
6609
|
+
return t ? /* @__PURE__ */ E("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ E(fs, { customTheme: h ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ E(yn, { sdk: t }) }) }) : null;
|
|
6610
|
+
}, Fn = ({ theme: h }) => {
|
|
6611
|
+
const t = ms(), i = ps(), s = ds();
|
|
6612
|
+
return !t || !s.polymarket ? null : /* @__PURE__ */ E("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ E(fs, { customTheme: h ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ E(_n, { sdk: t }) }) });
|
|
6666
6613
|
};
|
|
6667
6614
|
export {
|
|
6668
|
-
|
|
6669
|
-
|
|
6615
|
+
Fn as StreamLayerSDKPolymarket,
|
|
6616
|
+
In as StreamLayerSDKPolymarketButton
|
|
6670
6617
|
};
|