@363045841yyt/klinechart 0.2.12 → 0.3.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/README.md +28 -25
- package/dist/index.cjs +8 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.js +1010 -947
- package/dist/klinechart.css +1 -1
- package/dist/{api → src/api}/data/baostock.d.ts +1 -1
- package/dist/{api → src/api}/data/kLine.d.ts +1 -1
- package/dist/{api → src/api}/data/types.d.ts +1 -1
- package/dist/{api → src/api}/data/unified.d.ts +1 -1
- package/dist/{components → src/components}/KLineChart.vue.d.ts +2 -2
- package/dist/{components → src/components}/KLineTooltip.vue.d.ts +1 -1
- package/dist/{components → src/components}/MarkerTooltip.vue.d.ts +1 -1
- package/dist/{core → src/core}/chart.d.ts +11 -7
- package/dist/{core → src/core}/controller/interaction.d.ts +3 -1
- package/dist/{core → src/core}/layout/pane.d.ts +4 -4
- package/dist/{core → src/core}/renderers/Indicator/boll.d.ts +2 -2
- package/dist/{core → src/core}/renderers/Indicator/cci.d.ts +2 -2
- package/dist/{core → src/core}/renderers/Indicator/ene.d.ts +2 -2
- package/dist/{core → src/core}/renderers/Indicator/expma.d.ts +2 -2
- package/dist/{core → src/core}/renderers/Indicator/fastk.d.ts +2 -2
- package/dist/{core → src/core}/renderers/Indicator/index.d.ts +1 -1
- package/dist/{core → src/core}/renderers/Indicator/kst.d.ts +2 -2
- package/dist/{core → src/core}/renderers/Indicator/ma.d.ts +1 -1
- package/dist/{core → src/core}/renderers/Indicator/macd.d.ts +2 -2
- package/dist/{core → src/core}/renderers/Indicator/macdLegend.d.ts +1 -1
- package/dist/{core → src/core}/renderers/Indicator/mainIndicatorLegend.d.ts +1 -1
- package/dist/{core → src/core}/renderers/Indicator/mom.d.ts +2 -2
- package/dist/{core → src/core}/renderers/Indicator/rsi.d.ts +2 -2
- package/dist/{core → src/core}/renderers/Indicator/stoch.d.ts +2 -2
- package/dist/{core → src/core}/renderers/Indicator/wmsr.d.ts +2 -2
- package/dist/{core → src/core}/renderers/candle.d.ts +5 -4
- package/dist/{core → src/core}/renderers/crosshair.d.ts +3 -1
- package/dist/{core → src/core}/renderers/customMarkers.d.ts +1 -1
- package/dist/{core → src/core}/renderers/extremaMarkers.d.ts +1 -1
- package/dist/{core → src/core}/renderers/gridLines.d.ts +1 -1
- package/dist/{core → src/core}/renderers/lastPrice.d.ts +1 -1
- package/dist/{core → src/core}/renderers/paneTitle.d.ts +1 -1
- package/dist/{core → src/core}/renderers/subVolume.d.ts +1 -1
- package/dist/{core → src/core}/renderers/timeAxis.d.ts +1 -1
- package/dist/{core → src/core}/renderers/yAxis.d.ts +5 -1
- package/dist/{core → src/core}/theme/colors.d.ts +2 -2
- package/dist/{core → src/core}/viewport/viewport.d.ts +2 -2
- package/dist/src/index.d.ts +8 -0
- package/dist/{plugin → src/plugin}/rendererPluginManager.d.ts +0 -1
- package/dist/{plugin → src/plugin}/types.d.ts +1 -0
- package/dist/{semantic → src/semantic}/controller.d.ts +5 -1
- package/dist/{utils → src/utils}/kLineDraw/MA.d.ts +1 -1
- package/dist/{utils → src/utils}/kLineDraw/axis.d.ts +3 -3
- package/dist/{utils → src/utils}/kLineDraw/grid.d.ts +1 -1
- package/dist/{utils → src/utils}/kLineDraw/kLine.d.ts +1 -1
- package/dist/{utils → src/utils}/kline/format.d.ts +2 -2
- package/dist/{utils → src/utils}/kline/ma.d.ts +1 -1
- package/dist/{utils → src/utils}/kline/viewport.d.ts +1 -1
- package/dist/{utils → src/utils}/mock/genRandomPriceData.d.ts +1 -1
- package/dist/{utils → src/utils}/volumePrice.d.ts +2 -2
- package/package.json +14 -14
- /package/dist/{App.vue.d.ts → src/App.vue.d.ts} +0 -0
- /package/dist/{api → src/api}/data/baostock.test.d.ts +0 -0
- /package/dist/{api → src/api}/data/index.d.ts +0 -0
- /package/dist/{components → src/components}/IndicatorParams.vue.d.ts +0 -0
- /package/dist/{components → src/components}/IndicatorSelector.vue.d.ts +0 -0
- /package/dist/{components → src/components}/index.d.ts +0 -0
- /package/dist/{core → src/core}/draw/pixelAlign.d.ts +0 -0
- /package/dist/{core → src/core}/marker/registry.d.ts +0 -0
- /package/dist/{core → src/core}/paneRenderer.d.ts +0 -0
- /package/dist/{core → src/core}/scale/price.d.ts +0 -0
- /package/dist/{core → src/core}/scale/priceScale.d.ts +0 -0
- /package/dist/{core → src/core}/utils/klineConfig.d.ts +0 -0
- /package/dist/{core → src/core}/utils/tickCount.d.ts +0 -0
- /package/dist/{main.d.ts → src/main.d.ts} +0 -0
- /package/dist/{plugin → src/plugin}/ConfigManager.d.ts +0 -0
- /package/dist/{plugin → src/plugin}/EventBus.d.ts +0 -0
- /package/dist/{plugin → src/plugin}/HookSystem.d.ts +0 -0
- /package/dist/{plugin → src/plugin}/PluginHost.d.ts +0 -0
- /package/dist/{plugin → src/plugin}/PluginRegistry.d.ts +0 -0
- /package/dist/{plugin → src/plugin}/index.d.ts +0 -0
- /package/dist/{semantic → src/semantic}/drawShape.d.ts +0 -0
- /package/dist/{semantic → src/semantic}/index.d.ts +0 -0
- /package/dist/{semantic → src/semantic}/types.d.ts +0 -0
- /package/dist/{semantic → src/semantic}/validator.d.ts +0 -0
- /package/dist/{types → src/types}/kLine.d.ts +0 -0
- /package/dist/{types → src/types}/price.d.ts +0 -0
- /package/dist/{types → src/types}/volumePrice.d.ts +0 -0
- /package/dist/{utils → src/utils}/cache.d.ts +0 -0
- /package/dist/{utils → src/utils}/dateFormat.d.ts +0 -0
- /package/dist/{utils → src/utils}/logger.d.ts +0 -0
- /package/dist/{utils → src/utils}/priceToY.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, nextTick as d, normalizeClass as f, normalizeStyle as p, onMounted as m, onUnmounted as h, openBlock as g, ref as _, renderList as v, shallowRef as y, toDisplayString as b, unref as x, watch as S, withCtx as C, withModifiers as w } from "vue";
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
|
-
var T = Object.create, E = Object.defineProperty, D = Object.getOwnPropertyDescriptor, O = Object.getOwnPropertyNames, k = Object.getPrototypeOf, A = Object.prototype.hasOwnProperty, j = (e, t) => () => (e && (t = e(e = 0)), t), M = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), N = (e, t) => {
|
|
3
|
+
var T = Object.create, E = Object.defineProperty, D = Object.getOwnPropertyDescriptor, O = Object.getOwnPropertyNames, k = Object.getPrototypeOf, A = Object.prototype.hasOwnProperty, j = (e, t) => () => (e && (t = e(e = 0)), t), M = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), N = (e, t) => {
|
|
4
4
|
let n = {};
|
|
5
5
|
for (var r in e) E(n, r, {
|
|
6
6
|
get: e[r],
|
|
@@ -49,14 +49,14 @@ var T = Object.create, E = Object.defineProperty, D = Object.getOwnPropertyDescr
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
//#endregion
|
|
52
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
52
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/bind.js
|
|
53
53
|
function ne(e, t) {
|
|
54
54
|
return function() {
|
|
55
55
|
return e.apply(t, arguments);
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
59
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/utils.js
|
|
60
60
|
var { toString: re } = Object.prototype, { getPrototypeOf: ie } = Object, { iterator: ae, toStringTag: I } = Symbol, oe = ((e) => (t) => {
|
|
61
61
|
let n = re.call(t);
|
|
62
62
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
@@ -85,8 +85,12 @@ function we() {
|
|
|
85
85
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
86
86
|
}
|
|
87
87
|
var Te = we(), Ee = Te.FormData === void 0 ? void 0 : Te.FormData, De = (e) => {
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
if (!e) return !1;
|
|
89
|
+
if (Ee && e instanceof Ee) return !0;
|
|
90
|
+
let t = ie(e);
|
|
91
|
+
if (!t || t === Object.prototype || !B(e.append)) return !1;
|
|
92
|
+
let n = oe(e);
|
|
93
|
+
return n === "formdata" || n === "object" && B(e.toString) && e.toString() === "[object FormData]";
|
|
90
94
|
}, Oe = L("URLSearchParams"), [ke, Ae, je, Me] = [
|
|
91
95
|
"ReadableStream",
|
|
92
96
|
"Request",
|
|
@@ -316,9 +320,9 @@ var it = (e) => {
|
|
|
316
320
|
};
|
|
317
321
|
}
|
|
318
322
|
};
|
|
319
|
-
H.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE", H.ERR_BAD_OPTION = "ERR_BAD_OPTION", H.ECONNABORTED = "ECONNABORTED", H.ETIMEDOUT = "ETIMEDOUT", H.ERR_NETWORK = "ERR_NETWORK", H.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS", H.ERR_DEPRECATED = "ERR_DEPRECATED", H.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE", H.ERR_BAD_REQUEST = "ERR_BAD_REQUEST", H.ERR_CANCELED = "ERR_CANCELED", H.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT", H.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
323
|
+
H.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE", H.ERR_BAD_OPTION = "ERR_BAD_OPTION", H.ECONNABORTED = "ECONNABORTED", H.ETIMEDOUT = "ETIMEDOUT", H.ERR_NETWORK = "ERR_NETWORK", H.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS", H.ERR_DEPRECATED = "ERR_DEPRECATED", H.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE", H.ERR_BAD_REQUEST = "ERR_BAD_REQUEST", H.ERR_CANCELED = "ERR_CANCELED", H.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT", H.ERR_INVALID_URL = "ERR_INVALID_URL", H.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
320
324
|
//#endregion
|
|
321
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
325
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/toFormData.js
|
|
322
326
|
function ct(e) {
|
|
323
327
|
return V.isPlainObject(e) || V.isArray(e);
|
|
324
328
|
}
|
|
@@ -345,44 +349,45 @@ function pt(e, t, n) {
|
|
|
345
349
|
}, !1, function(e, t) {
|
|
346
350
|
return !V.isUndefined(t[e]);
|
|
347
351
|
});
|
|
348
|
-
let r = n.metaTokens, i = n.visitor ||
|
|
352
|
+
let r = n.metaTokens, i = n.visitor || d, a = n.dots, o = n.indexes, s = n.Blob || typeof Blob < "u" && Blob, c = n.maxDepth === void 0 ? 100 : n.maxDepth, l = s && V.isSpecCompliantForm(t);
|
|
349
353
|
if (!V.isFunction(i)) throw TypeError("visitor must be a function");
|
|
350
|
-
function
|
|
354
|
+
function u(e) {
|
|
351
355
|
if (e === null) return "";
|
|
352
356
|
if (V.isDate(e)) return e.toISOString();
|
|
353
357
|
if (V.isBoolean(e)) return e.toString();
|
|
354
|
-
if (!
|
|
355
|
-
return V.isArrayBuffer(e) || V.isTypedArray(e) ?
|
|
358
|
+
if (!l && V.isBlob(e)) throw new H("Blob is not supported. Use a Buffer instead.");
|
|
359
|
+
return V.isArrayBuffer(e) || V.isTypedArray(e) ? l && typeof Blob == "function" ? new Blob([e]) : Buffer.from(e) : e;
|
|
356
360
|
}
|
|
357
|
-
function
|
|
361
|
+
function d(e, n, i) {
|
|
358
362
|
let s = e;
|
|
359
|
-
if (V.isReactNative(t) && V.isReactNativeBlob(e)) return t.append(ut(i, n, a),
|
|
363
|
+
if (V.isReactNative(t) && V.isReactNativeBlob(e)) return t.append(ut(i, n, a), u(e)), !1;
|
|
360
364
|
if (e && !i && typeof e == "object") {
|
|
361
365
|
if (V.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e);
|
|
362
366
|
else if (V.isArray(e) && dt(e) || (V.isFileList(e) || V.endsWith(n, "[]")) && (s = V.toArray(e))) return n = lt(n), s.forEach(function(e, r) {
|
|
363
|
-
!(V.isUndefined(e) || e === null) && t.append(o === !0 ? ut([n], r, a) : o === null ? n : n + "[]",
|
|
367
|
+
!(V.isUndefined(e) || e === null) && t.append(o === !0 ? ut([n], r, a) : o === null ? n : n + "[]", u(e));
|
|
364
368
|
}), !1;
|
|
365
369
|
}
|
|
366
|
-
return ct(e) ? !0 : (t.append(ut(i, n, a),
|
|
370
|
+
return ct(e) ? !0 : (t.append(ut(i, n, a), u(e)), !1);
|
|
367
371
|
}
|
|
368
|
-
let
|
|
369
|
-
defaultVisitor:
|
|
370
|
-
convertValue:
|
|
372
|
+
let f = [], p = Object.assign(ft, {
|
|
373
|
+
defaultVisitor: d,
|
|
374
|
+
convertValue: u,
|
|
371
375
|
isVisitable: ct
|
|
372
376
|
});
|
|
373
|
-
function
|
|
377
|
+
function m(e, n, r = 0) {
|
|
374
378
|
if (!V.isUndefined(e)) {
|
|
375
|
-
if (
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
+
if (r > c) throw new H("Object is too deeply nested (" + r + " levels). Max depth: " + c, H.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
380
|
+
if (f.indexOf(e) !== -1) throw Error("Circular reference detected in " + n.join("."));
|
|
381
|
+
f.push(e), V.forEach(e, function(e, a) {
|
|
382
|
+
(!(V.isUndefined(e) || e === null) && i.call(t, e, V.isString(a) ? a.trim() : a, n, p)) === !0 && m(e, n ? n.concat(a) : [a], r + 1);
|
|
383
|
+
}), f.pop();
|
|
379
384
|
}
|
|
380
385
|
}
|
|
381
386
|
if (!V.isObject(e)) throw TypeError("data must be an object");
|
|
382
|
-
return
|
|
387
|
+
return m(e), t;
|
|
383
388
|
}
|
|
384
389
|
//#endregion
|
|
385
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
390
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
386
391
|
function mt(e) {
|
|
387
392
|
let t = {
|
|
388
393
|
"!": "%21",
|
|
@@ -390,10 +395,9 @@ function mt(e) {
|
|
|
390
395
|
"(": "%28",
|
|
391
396
|
")": "%29",
|
|
392
397
|
"~": "%7E",
|
|
393
|
-
"%20": "+"
|
|
394
|
-
"%00": "\0"
|
|
398
|
+
"%20": "+"
|
|
395
399
|
};
|
|
396
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20
|
|
400
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20/g, function(e) {
|
|
397
401
|
return t[e];
|
|
398
402
|
});
|
|
399
403
|
}
|
|
@@ -412,7 +416,7 @@ gt.append = function(e, t) {
|
|
|
412
416
|
}, "").join("&");
|
|
413
417
|
};
|
|
414
418
|
//#endregion
|
|
415
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
419
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/buildURL.js
|
|
416
420
|
function _t(e) {
|
|
417
421
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
418
422
|
}
|
|
@@ -426,7 +430,7 @@ function vt(e, t, n) {
|
|
|
426
430
|
return e;
|
|
427
431
|
}
|
|
428
432
|
//#endregion
|
|
429
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
433
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/InterceptorManager.js
|
|
430
434
|
var yt = class {
|
|
431
435
|
constructor() {
|
|
432
436
|
this.handlers = [];
|
|
@@ -485,7 +489,7 @@ var yt = class {
|
|
|
485
489
|
...xt
|
|
486
490
|
};
|
|
487
491
|
//#endregion
|
|
488
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
492
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
489
493
|
function Ot(e, t) {
|
|
490
494
|
return pt(e, new U.classes.URLSearchParams(), {
|
|
491
495
|
visitor: function(e, t, n, r) {
|
|
@@ -495,7 +499,7 @@ function Ot(e, t) {
|
|
|
495
499
|
});
|
|
496
500
|
}
|
|
497
501
|
//#endregion
|
|
498
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
502
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
499
503
|
function kt(e) {
|
|
500
504
|
return V.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
501
505
|
}
|
|
@@ -509,7 +513,7 @@ function jt(e) {
|
|
|
509
513
|
let a = e[i++];
|
|
510
514
|
if (a === "__proto__") return !0;
|
|
511
515
|
let o = Number.isFinite(+a), s = i >= e.length;
|
|
512
|
-
return a = !a && V.isArray(r) ? r.length : a, s ? (V.hasOwnProp(r, a) ? r[a] = [r[a], n] : r[a] = n, !o) : ((!r[a] || !V.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && V.isArray(r[a]) && (r[a] = At(r[a])), !o);
|
|
516
|
+
return a = !a && V.isArray(r) ? r.length : a, s ? (V.hasOwnProp(r, a) ? r[a] = V.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!r[a] || !V.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && V.isArray(r[a]) && (r[a] = At(r[a])), !o);
|
|
513
517
|
}
|
|
514
518
|
if (V.isFormData(e) && V.isFunction(e.entries)) {
|
|
515
519
|
let n = {};
|
|
@@ -520,8 +524,9 @@ function jt(e) {
|
|
|
520
524
|
return null;
|
|
521
525
|
}
|
|
522
526
|
//#endregion
|
|
523
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
524
|
-
|
|
527
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/defaults/index.js
|
|
528
|
+
var Mt = (e, t) => e != null && V.hasOwnProp(e, t) ? e[t] : void 0;
|
|
529
|
+
function Nt(e, t, n) {
|
|
525
530
|
if (V.isString(e)) try {
|
|
526
531
|
return (t || JSON.parse)(e), V.trim(e);
|
|
527
532
|
} catch (e) {
|
|
@@ -529,7 +534,7 @@ function Mt(e, t, n) {
|
|
|
529
534
|
}
|
|
530
535
|
return (n || JSON.stringify)(e);
|
|
531
536
|
}
|
|
532
|
-
var
|
|
537
|
+
var Pt = {
|
|
533
538
|
transitional: bt,
|
|
534
539
|
adapter: [
|
|
535
540
|
"xhr",
|
|
@@ -544,23 +549,24 @@ var Nt = {
|
|
|
544
549
|
if (V.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
545
550
|
let a;
|
|
546
551
|
if (i) {
|
|
547
|
-
|
|
552
|
+
let t = Mt(this, "formSerializer");
|
|
553
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1) return Ot(e, t).toString();
|
|
548
554
|
if ((a = V.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
549
|
-
let
|
|
550
|
-
return pt(a ? { "files[]": e } : e,
|
|
555
|
+
let n = Mt(this, "env"), r = n && n.FormData;
|
|
556
|
+
return pt(a ? { "files[]": e } : e, r && new r(), t);
|
|
551
557
|
}
|
|
552
558
|
}
|
|
553
|
-
return i || r ? (t.setContentType("application/json", !1),
|
|
559
|
+
return i || r ? (t.setContentType("application/json", !1), Nt(e)) : e;
|
|
554
560
|
}],
|
|
555
561
|
transformResponse: [function(e) {
|
|
556
|
-
let t = this
|
|
562
|
+
let t = Mt(this, "transitional") || Pt.transitional, n = t && t.forcedJSONParsing, r = Mt(this, "responseType"), i = r === "json";
|
|
557
563
|
if (V.isResponse(e) || V.isReadableStream(e)) return e;
|
|
558
|
-
if (e && V.isString(e) && (n && !
|
|
559
|
-
let n = !(t && t.silentJSONParsing) &&
|
|
564
|
+
if (e && V.isString(e) && (n && !r || i)) {
|
|
565
|
+
let n = !(t && t.silentJSONParsing) && i;
|
|
560
566
|
try {
|
|
561
|
-
return JSON.parse(e, this
|
|
567
|
+
return JSON.parse(e, Mt(this, "parseReviver"));
|
|
562
568
|
} catch (e) {
|
|
563
|
-
if (n) throw e.name === "SyntaxError" ? H.from(e, H.ERR_BAD_RESPONSE, this, null, this
|
|
569
|
+
if (n) throw e.name === "SyntaxError" ? H.from(e, H.ERR_BAD_RESPONSE, this, null, Mt(this, "response")) : e;
|
|
564
570
|
}
|
|
565
571
|
}
|
|
566
572
|
return e;
|
|
@@ -590,11 +596,11 @@ V.forEach([
|
|
|
590
596
|
"put",
|
|
591
597
|
"patch"
|
|
592
598
|
], (e) => {
|
|
593
|
-
|
|
599
|
+
Pt.headers[e] = {};
|
|
594
600
|
});
|
|
595
601
|
//#endregion
|
|
596
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
597
|
-
var
|
|
602
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/parseHeaders.js
|
|
603
|
+
var Ft = V.toObjectSet([
|
|
598
604
|
"age",
|
|
599
605
|
"authorization",
|
|
600
606
|
"content-length",
|
|
@@ -612,53 +618,52 @@ var Pt = V.toObjectSet([
|
|
|
612
618
|
"referer",
|
|
613
619
|
"retry-after",
|
|
614
620
|
"user-agent"
|
|
615
|
-
]),
|
|
621
|
+
]), It = (e) => {
|
|
616
622
|
let t = {}, n, r, i;
|
|
617
623
|
return e && e.split("\n").forEach(function(e) {
|
|
618
|
-
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] &&
|
|
624
|
+
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] && Ft[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
619
625
|
}), t;
|
|
620
|
-
},
|
|
621
|
-
function Rt(e, t) {
|
|
622
|
-
if (!(e === !1 || e == null)) {
|
|
623
|
-
if (V.isArray(e)) {
|
|
624
|
-
e.forEach((e) => Rt(e, t));
|
|
625
|
-
return;
|
|
626
|
-
}
|
|
627
|
-
if (!Lt(String(e))) throw Error(`Invalid character in header content ["${t}"]`);
|
|
628
|
-
}
|
|
629
|
-
}
|
|
626
|
+
}, Lt = Symbol("internals"), Rt = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
630
627
|
function zt(e) {
|
|
631
|
-
|
|
628
|
+
let t = 0, n = e.length;
|
|
629
|
+
for (; t < n;) {
|
|
630
|
+
let n = e.charCodeAt(t);
|
|
631
|
+
if (n !== 9 && n !== 32) break;
|
|
632
|
+
t += 1;
|
|
633
|
+
}
|
|
634
|
+
for (; n > t;) {
|
|
635
|
+
let t = e.charCodeAt(n - 1);
|
|
636
|
+
if (t !== 9 && t !== 32) break;
|
|
637
|
+
--n;
|
|
638
|
+
}
|
|
639
|
+
return t === 0 && n === e.length ? e : e.slice(t, n);
|
|
632
640
|
}
|
|
633
641
|
function Bt(e) {
|
|
634
|
-
|
|
635
|
-
for (; t > 0;) {
|
|
636
|
-
let n = e.charCodeAt(t - 1);
|
|
637
|
-
if (n !== 10 && n !== 13) break;
|
|
638
|
-
--t;
|
|
639
|
-
}
|
|
640
|
-
return t === e.length ? e : e.slice(0, t);
|
|
642
|
+
return e && String(e).trim().toLowerCase();
|
|
641
643
|
}
|
|
642
644
|
function Vt(e) {
|
|
643
|
-
return
|
|
645
|
+
return zt(e.replace(Rt, ""));
|
|
644
646
|
}
|
|
645
647
|
function Ht(e) {
|
|
648
|
+
return e === !1 || e == null ? e : V.isArray(e) ? e.map(Ht) : Vt(String(e));
|
|
649
|
+
}
|
|
650
|
+
function Ut(e) {
|
|
646
651
|
let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
|
|
647
652
|
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
648
653
|
return t;
|
|
649
654
|
}
|
|
650
|
-
var
|
|
651
|
-
function
|
|
655
|
+
var Wt = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
656
|
+
function Gt(e, t, n, r, i) {
|
|
652
657
|
if (V.isFunction(r)) return r.call(this, t, n);
|
|
653
658
|
if (i && (t = n), V.isString(t)) {
|
|
654
659
|
if (V.isString(r)) return t.indexOf(r) !== -1;
|
|
655
660
|
if (V.isRegExp(r)) return r.test(t);
|
|
656
661
|
}
|
|
657
662
|
}
|
|
658
|
-
function
|
|
663
|
+
function Kt(e) {
|
|
659
664
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
660
665
|
}
|
|
661
|
-
function
|
|
666
|
+
function qt(e, t) {
|
|
662
667
|
let n = V.toCamelCase(" " + t);
|
|
663
668
|
[
|
|
664
669
|
"get",
|
|
@@ -680,14 +685,14 @@ var W = class {
|
|
|
680
685
|
set(e, t, n) {
|
|
681
686
|
let r = this;
|
|
682
687
|
function i(e, t, n) {
|
|
683
|
-
let i =
|
|
688
|
+
let i = Bt(t);
|
|
684
689
|
if (!i) throw Error("header name must be a non-empty string");
|
|
685
690
|
let a = V.findKey(r, i);
|
|
686
|
-
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (
|
|
691
|
+
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] = Ht(e));
|
|
687
692
|
}
|
|
688
693
|
let a = (e, t) => V.forEach(e, (e, n) => i(e, n, t));
|
|
689
694
|
if (V.isPlainObject(e) || e instanceof this.constructor) a(e, t);
|
|
690
|
-
else if (V.isString(e) && (e = e.trim()) && !
|
|
695
|
+
else if (V.isString(e) && (e = e.trim()) && !Wt(e)) a(It(e), t);
|
|
691
696
|
else if (V.isObject(e) && V.isIterable(e)) {
|
|
692
697
|
let n = {}, r, i;
|
|
693
698
|
for (let t of e) {
|
|
@@ -699,12 +704,12 @@ var W = class {
|
|
|
699
704
|
return this;
|
|
700
705
|
}
|
|
701
706
|
get(e, t) {
|
|
702
|
-
if (e =
|
|
707
|
+
if (e = Bt(e), e) {
|
|
703
708
|
let n = V.findKey(this, e);
|
|
704
709
|
if (n) {
|
|
705
710
|
let e = this[n];
|
|
706
711
|
if (!t) return e;
|
|
707
|
-
if (t === !0) return
|
|
712
|
+
if (t === !0) return Ut(e);
|
|
708
713
|
if (V.isFunction(t)) return t.call(this, e, n);
|
|
709
714
|
if (V.isRegExp(t)) return t.exec(e);
|
|
710
715
|
throw TypeError("parser must be boolean|regexp|function");
|
|
@@ -712,18 +717,18 @@ var W = class {
|
|
|
712
717
|
}
|
|
713
718
|
}
|
|
714
719
|
has(e, t) {
|
|
715
|
-
if (e =
|
|
720
|
+
if (e = Bt(e), e) {
|
|
716
721
|
let n = V.findKey(this, e);
|
|
717
|
-
return !!(n && this[n] !== void 0 && (!t ||
|
|
722
|
+
return !!(n && this[n] !== void 0 && (!t || Gt(this, this[n], n, t)));
|
|
718
723
|
}
|
|
719
724
|
return !1;
|
|
720
725
|
}
|
|
721
726
|
delete(e, t) {
|
|
722
727
|
let n = this, r = !1;
|
|
723
728
|
function i(e) {
|
|
724
|
-
if (e =
|
|
729
|
+
if (e = Bt(e), e) {
|
|
725
730
|
let i = V.findKey(n, e);
|
|
726
|
-
i && (!t ||
|
|
731
|
+
i && (!t || Gt(n, n[i], i, t)) && (delete n[i], r = !0);
|
|
727
732
|
}
|
|
728
733
|
}
|
|
729
734
|
return V.isArray(e) ? e.forEach(i) : i(e), r;
|
|
@@ -732,7 +737,7 @@ var W = class {
|
|
|
732
737
|
let t = Object.keys(this), n = t.length, r = !1;
|
|
733
738
|
for (; n--;) {
|
|
734
739
|
let i = t[n];
|
|
735
|
-
(!e ||
|
|
740
|
+
(!e || Gt(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
736
741
|
}
|
|
737
742
|
return r;
|
|
738
743
|
}
|
|
@@ -741,11 +746,11 @@ var W = class {
|
|
|
741
746
|
return V.forEach(this, (r, i) => {
|
|
742
747
|
let a = V.findKey(n, i);
|
|
743
748
|
if (a) {
|
|
744
|
-
t[a] =
|
|
749
|
+
t[a] = Ht(r), delete t[i];
|
|
745
750
|
return;
|
|
746
751
|
}
|
|
747
|
-
let o = e ?
|
|
748
|
-
o !== i && delete t[i], t[o] =
|
|
752
|
+
let o = e ? Kt(i) : String(i).trim();
|
|
753
|
+
o !== i && delete t[i], t[o] = Ht(r), n[o] = !0;
|
|
749
754
|
}), this;
|
|
750
755
|
}
|
|
751
756
|
concat(...e) {
|
|
@@ -777,10 +782,10 @@ var W = class {
|
|
|
777
782
|
return t.forEach((e) => n.set(e)), n;
|
|
778
783
|
}
|
|
779
784
|
static accessor(e) {
|
|
780
|
-
let t = (this[
|
|
785
|
+
let t = (this[Lt] = this[Lt] = { accessors: {} }).accessors, n = this.prototype;
|
|
781
786
|
function r(e) {
|
|
782
|
-
let r =
|
|
783
|
-
t[r] || (
|
|
787
|
+
let r = Bt(e);
|
|
788
|
+
t[r] || (qt(n, e), t[r] = !0);
|
|
784
789
|
}
|
|
785
790
|
return V.isArray(e) ? e.forEach(r) : r(e), this;
|
|
786
791
|
}
|
|
@@ -802,40 +807,40 @@ W.accessor([
|
|
|
802
807
|
};
|
|
803
808
|
}), V.freezeMethods(W);
|
|
804
809
|
//#endregion
|
|
805
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
806
|
-
function
|
|
807
|
-
let n = this ||
|
|
810
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/transformData.js
|
|
811
|
+
function Jt(e, t) {
|
|
812
|
+
let n = this || Pt, r = t || n, i = W.from(r.headers), a = r.data;
|
|
808
813
|
return V.forEach(e, function(e) {
|
|
809
814
|
a = e.call(n, a, i.normalize(), t ? t.status : void 0);
|
|
810
815
|
}), i.normalize(), a;
|
|
811
816
|
}
|
|
812
817
|
//#endregion
|
|
813
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
814
|
-
function
|
|
818
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/cancel/isCancel.js
|
|
819
|
+
function Yt(e) {
|
|
815
820
|
return !!(e && e.__CANCEL__);
|
|
816
821
|
}
|
|
817
822
|
//#endregion
|
|
818
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
819
|
-
var
|
|
823
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/cancel/CanceledError.js
|
|
824
|
+
var Xt = class extends H {
|
|
820
825
|
constructor(e, t, n) {
|
|
821
826
|
super(e ?? "canceled", H.ERR_CANCELED, t, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
822
827
|
}
|
|
823
828
|
};
|
|
824
829
|
//#endregion
|
|
825
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
826
|
-
function
|
|
830
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/settle.js
|
|
831
|
+
function Zt(e, t, n) {
|
|
827
832
|
let r = n.config.validateStatus;
|
|
828
833
|
!n.status || !r || r(n.status) ? e(n) : t(new H("Request failed with status code " + n.status, [H.ERR_BAD_REQUEST, H.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n));
|
|
829
834
|
}
|
|
830
835
|
//#endregion
|
|
831
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
832
|
-
function
|
|
836
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/parseProtocol.js
|
|
837
|
+
function Qt(e) {
|
|
833
838
|
let t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
834
839
|
return t && t[1] || "";
|
|
835
840
|
}
|
|
836
841
|
//#endregion
|
|
837
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
838
|
-
function
|
|
842
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/speedometer.js
|
|
843
|
+
function $t(e, t) {
|
|
839
844
|
e ||= 10;
|
|
840
845
|
let n = Array(e), r = Array(e), i = 0, a = 0, o;
|
|
841
846
|
return t = t === void 0 ? 1e3 : t, function(s) {
|
|
@@ -849,8 +854,8 @@ function Qt(e, t) {
|
|
|
849
854
|
};
|
|
850
855
|
}
|
|
851
856
|
//#endregion
|
|
852
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
853
|
-
function
|
|
857
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/throttle.js
|
|
858
|
+
function en(e, t) {
|
|
854
859
|
let n = 0, r = 1e3 / t, i, a, o = (t, r = Date.now()) => {
|
|
855
860
|
n = r, i = null, a &&= (clearTimeout(a), null), e(...t);
|
|
856
861
|
};
|
|
@@ -862,31 +867,31 @@ function $t(e, t) {
|
|
|
862
867
|
}, () => i && o(i)];
|
|
863
868
|
}
|
|
864
869
|
//#endregion
|
|
865
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
866
|
-
var
|
|
867
|
-
let r = 0, i =
|
|
868
|
-
return
|
|
869
|
-
let a = n.loaded, o = n.lengthComputable ? n.total : void 0, s = a
|
|
870
|
-
r =
|
|
871
|
-
loaded:
|
|
870
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/progressEventReducer.js
|
|
871
|
+
var tn = (e, t, n = 3) => {
|
|
872
|
+
let r = 0, i = $t(50, 250);
|
|
873
|
+
return en((n) => {
|
|
874
|
+
let a = n.loaded, o = n.lengthComputable ? n.total : void 0, s = o == null ? a : Math.min(a, o), c = Math.max(0, s - r), l = i(c);
|
|
875
|
+
r = Math.max(r, s), e({
|
|
876
|
+
loaded: s,
|
|
872
877
|
total: o,
|
|
873
|
-
progress: o ?
|
|
874
|
-
bytes:
|
|
875
|
-
rate:
|
|
876
|
-
estimated:
|
|
878
|
+
progress: o ? s / o : void 0,
|
|
879
|
+
bytes: c,
|
|
880
|
+
rate: l || void 0,
|
|
881
|
+
estimated: l && o ? (o - s) / l : void 0,
|
|
877
882
|
event: n,
|
|
878
883
|
lengthComputable: o != null,
|
|
879
884
|
[t ? "download" : "upload"]: !0
|
|
880
885
|
});
|
|
881
886
|
}, n);
|
|
882
|
-
},
|
|
887
|
+
}, nn = (e, t) => {
|
|
883
888
|
let n = e != null;
|
|
884
889
|
return [(r) => t[0]({
|
|
885
890
|
lengthComputable: n,
|
|
886
891
|
total: e,
|
|
887
892
|
loaded: r
|
|
888
893
|
}), t[1]];
|
|
889
|
-
},
|
|
894
|
+
}, rn = (e) => (...t) => V.asap(() => e(...t)), an = U.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, U.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(U.origin), U.navigator && /(msie|trident)/i.test(U.navigator.userAgent)) : () => !0, on = U.hasStandardBrowserEnv ? {
|
|
890
895
|
write(e, t, n, r, i, a, o) {
|
|
891
896
|
if (typeof document > "u") return;
|
|
892
897
|
let s = [`${e}=${encodeURIComponent(t)}`];
|
|
@@ -908,27 +913,33 @@ var en = (e, t, n = 3) => {
|
|
|
908
913
|
remove() {}
|
|
909
914
|
};
|
|
910
915
|
//#endregion
|
|
911
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
912
|
-
function
|
|
916
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
917
|
+
function sn(e) {
|
|
913
918
|
return typeof e == "string" ? /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) : !1;
|
|
914
919
|
}
|
|
915
920
|
//#endregion
|
|
916
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
917
|
-
function
|
|
921
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/combineURLs.js
|
|
922
|
+
function cn(e, t) {
|
|
918
923
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
919
924
|
}
|
|
920
925
|
//#endregion
|
|
921
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
922
|
-
function
|
|
923
|
-
let r = !
|
|
924
|
-
return e && (r || n
|
|
926
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/buildFullPath.js
|
|
927
|
+
function ln(e, t, n) {
|
|
928
|
+
let r = !sn(t);
|
|
929
|
+
return e && (r || n === !1) ? cn(e, t) : t;
|
|
925
930
|
}
|
|
926
931
|
//#endregion
|
|
927
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
928
|
-
var
|
|
929
|
-
function
|
|
932
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/mergeConfig.js
|
|
933
|
+
var un = (e) => e instanceof W ? { ...e } : e;
|
|
934
|
+
function dn(e, t) {
|
|
930
935
|
t ||= {};
|
|
931
|
-
let n =
|
|
936
|
+
let n = Object.create(null);
|
|
937
|
+
Object.defineProperty(n, "hasOwnProperty", {
|
|
938
|
+
value: Object.prototype.hasOwnProperty,
|
|
939
|
+
enumerable: !1,
|
|
940
|
+
writable: !0,
|
|
941
|
+
configurable: !0
|
|
942
|
+
});
|
|
932
943
|
function r(e, t, n, r) {
|
|
933
944
|
return V.isPlainObject(e) && V.isPlainObject(t) ? V.merge.call({ caseless: r }, e, t) : V.isPlainObject(t) ? V.merge({}, t) : V.isArray(t) ? t.slice() : t;
|
|
934
945
|
}
|
|
@@ -944,8 +955,8 @@ function un(e, t) {
|
|
|
944
955
|
if (!V.isUndefined(e)) return r(void 0, e);
|
|
945
956
|
}
|
|
946
957
|
function s(n, i, a) {
|
|
947
|
-
if (a
|
|
948
|
-
if (a
|
|
958
|
+
if (V.hasOwnProp(t, a)) return r(n, i);
|
|
959
|
+
if (V.hasOwnProp(e, a)) return r(void 0, n);
|
|
949
960
|
}
|
|
950
961
|
let c = {
|
|
951
962
|
url: a,
|
|
@@ -974,40 +985,41 @@ function un(e, t) {
|
|
|
974
985
|
httpsAgent: o,
|
|
975
986
|
cancelToken: o,
|
|
976
987
|
socketPath: o,
|
|
988
|
+
allowedSocketPaths: o,
|
|
977
989
|
responseEncoding: o,
|
|
978
990
|
validateStatus: s,
|
|
979
|
-
headers: (e, t, n) => i(
|
|
991
|
+
headers: (e, t, n) => i(un(e), un(t), n, !0)
|
|
980
992
|
};
|
|
981
993
|
return V.forEach(Object.keys({
|
|
982
994
|
...e,
|
|
983
995
|
...t
|
|
984
996
|
}), function(r) {
|
|
985
997
|
if (r === "__proto__" || r === "constructor" || r === "prototype") return;
|
|
986
|
-
let a = V.hasOwnProp(c, r) ? c[r] : i, o = a(e[r], t[r], r);
|
|
998
|
+
let a = V.hasOwnProp(c, r) ? c[r] : i, o = a(V.hasOwnProp(e, r) ? e[r] : void 0, V.hasOwnProp(t, r) ? t[r] : void 0, r);
|
|
987
999
|
V.isUndefined(o) && a !== s || (n[r] = o);
|
|
988
1000
|
}), n;
|
|
989
1001
|
}
|
|
990
1002
|
//#endregion
|
|
991
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
992
|
-
var
|
|
993
|
-
let t =
|
|
994
|
-
if (t.headers =
|
|
995
|
-
if (U.hasStandardBrowserEnv || U.hasStandardBrowserWebWorkerEnv)
|
|
996
|
-
else if (V.isFunction(
|
|
997
|
-
let e =
|
|
1003
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/resolveConfig.js
|
|
1004
|
+
var fn = (e) => {
|
|
1005
|
+
let t = dn({}, e), n = (e) => V.hasOwnProp(t, e) ? t[e] : void 0, r = n("data"), i = n("withXSRFToken"), a = n("xsrfHeaderName"), o = n("xsrfCookieName"), s = n("headers"), c = n("auth"), l = n("baseURL"), u = n("allowAbsoluteUrls"), d = n("url");
|
|
1006
|
+
if (t.headers = s = W.from(s), t.url = vt(ln(l, d, u), e.params, e.paramsSerializer), c && s.set("Authorization", "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))), V.isFormData(r)) {
|
|
1007
|
+
if (U.hasStandardBrowserEnv || U.hasStandardBrowserWebWorkerEnv) s.setContentType(void 0);
|
|
1008
|
+
else if (V.isFunction(r.getHeaders)) {
|
|
1009
|
+
let e = r.getHeaders(), t = ["content-type", "content-length"];
|
|
998
1010
|
Object.entries(e).forEach(([e, n]) => {
|
|
999
|
-
t.includes(e.toLowerCase()) &&
|
|
1011
|
+
t.includes(e.toLowerCase()) && s.set(e, n);
|
|
1000
1012
|
});
|
|
1001
1013
|
}
|
|
1002
1014
|
}
|
|
1003
|
-
if (U.hasStandardBrowserEnv && (
|
|
1004
|
-
let e =
|
|
1005
|
-
e &&
|
|
1015
|
+
if (U.hasStandardBrowserEnv && (V.isFunction(i) && (i = i(t)), i === !0 || i == null && an(t.url))) {
|
|
1016
|
+
let e = a && o && on.read(o);
|
|
1017
|
+
e && s.set(a, e);
|
|
1006
1018
|
}
|
|
1007
1019
|
return t;
|
|
1008
|
-
},
|
|
1020
|
+
}, pn = typeof XMLHttpRequest < "u" && function(e) {
|
|
1009
1021
|
return new Promise(function(t, n) {
|
|
1010
|
-
let r =
|
|
1022
|
+
let r = fn(e), i = r.data, a = W.from(r.headers).normalize(), { responseType: o, onUploadProgress: s, onDownloadProgress: c } = r, l, u, d, f, p;
|
|
1011
1023
|
function m() {
|
|
1012
1024
|
f && f(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1013
1025
|
}
|
|
@@ -1016,7 +1028,7 @@ var dn = (e) => {
|
|
|
1016
1028
|
function g() {
|
|
1017
1029
|
if (!h) return;
|
|
1018
1030
|
let r = W.from("getAllResponseHeaders" in h && h.getAllResponseHeaders());
|
|
1019
|
-
|
|
1031
|
+
Zt(function(e) {
|
|
1020
1032
|
t(e), m();
|
|
1021
1033
|
}, function(e) {
|
|
1022
1034
|
n(e), m();
|
|
@@ -1041,24 +1053,24 @@ var dn = (e) => {
|
|
|
1041
1053
|
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new H(t, i.clarifyTimeoutError ? H.ETIMEDOUT : H.ECONNABORTED, e, h)), h = null;
|
|
1042
1054
|
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h && V.forEach(a.toJSON(), function(e, t) {
|
|
1043
1055
|
h.setRequestHeader(t, e);
|
|
1044
|
-
}), V.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] =
|
|
1045
|
-
h &&= (n(!t || t.type ? new
|
|
1056
|
+
}), V.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] = tn(c, !0), h.addEventListener("progress", d)), s && h.upload && ([u, f] = tn(s), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (t) => {
|
|
1057
|
+
h &&= (n(!t || t.type ? new Xt(null, e, h) : t), h.abort(), null);
|
|
1046
1058
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1047
|
-
let _ =
|
|
1059
|
+
let _ = Qt(r.url);
|
|
1048
1060
|
if (_ && U.protocols.indexOf(_) === -1) {
|
|
1049
1061
|
n(new H("Unsupported protocol " + _ + ":", H.ERR_BAD_REQUEST, e));
|
|
1050
1062
|
return;
|
|
1051
1063
|
}
|
|
1052
1064
|
h.send(i || null);
|
|
1053
1065
|
});
|
|
1054
|
-
},
|
|
1066
|
+
}, mn = (e, t) => {
|
|
1055
1067
|
let { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1056
1068
|
if (t || n) {
|
|
1057
1069
|
let n = new AbortController(), r, i = function(e) {
|
|
1058
1070
|
if (!r) {
|
|
1059
1071
|
r = !0, o();
|
|
1060
1072
|
let t = e instanceof Error ? e : this.reason;
|
|
1061
|
-
n.abort(t instanceof H ? t : new
|
|
1073
|
+
n.abort(t instanceof H ? t : new Xt(t instanceof Error ? t.message : t));
|
|
1062
1074
|
}
|
|
1063
1075
|
}, a = t && setTimeout(() => {
|
|
1064
1076
|
a = null, i(new H(`timeout of ${t}ms exceeded`, H.ETIMEDOUT));
|
|
@@ -1071,7 +1083,7 @@ var dn = (e) => {
|
|
|
1071
1083
|
let { signal: s } = n;
|
|
1072
1084
|
return s.unsubscribe = () => V.asap(o), s;
|
|
1073
1085
|
}
|
|
1074
|
-
},
|
|
1086
|
+
}, hn = function* (e, t) {
|
|
1075
1087
|
let n = e.byteLength;
|
|
1076
1088
|
if (!t || n < t) {
|
|
1077
1089
|
yield e;
|
|
@@ -1079,9 +1091,9 @@ var dn = (e) => {
|
|
|
1079
1091
|
}
|
|
1080
1092
|
let r = 0, i;
|
|
1081
1093
|
for (; r < n;) i = r + t, yield e.slice(r, i), r = i;
|
|
1082
|
-
},
|
|
1083
|
-
for await (let n of
|
|
1084
|
-
},
|
|
1094
|
+
}, gn = async function* (e, t) {
|
|
1095
|
+
for await (let n of _n(e)) yield* hn(n, t);
|
|
1096
|
+
}, _n = async function* (e) {
|
|
1085
1097
|
if (e[Symbol.asyncIterator]) {
|
|
1086
1098
|
yield* e;
|
|
1087
1099
|
return;
|
|
@@ -1096,8 +1108,8 @@ var dn = (e) => {
|
|
|
1096
1108
|
} finally {
|
|
1097
1109
|
await t.cancel();
|
|
1098
1110
|
}
|
|
1099
|
-
},
|
|
1100
|
-
let i =
|
|
1111
|
+
}, vn = (e, t, n, r) => {
|
|
1112
|
+
let i = gn(e, t), a = 0, o, s = (e) => {
|
|
1101
1113
|
o || (o = !0, r && r(e));
|
|
1102
1114
|
};
|
|
1103
1115
|
return new ReadableStream({
|
|
@@ -1118,29 +1130,29 @@ var dn = (e) => {
|
|
|
1118
1130
|
return s(e), i.return();
|
|
1119
1131
|
}
|
|
1120
1132
|
}, { highWaterMark: 2 });
|
|
1121
|
-
},
|
|
1133
|
+
}, yn = 64 * 1024, { isFunction: bn } = V, xn = (({ Request: e, Response: t }) => ({
|
|
1122
1134
|
Request: e,
|
|
1123
1135
|
Response: t
|
|
1124
|
-
}))(V.global), { ReadableStream:
|
|
1136
|
+
}))(V.global), { ReadableStream: Sn, TextEncoder: Cn } = V.global, wn = (e, ...t) => {
|
|
1125
1137
|
try {
|
|
1126
1138
|
return !!e(...t);
|
|
1127
1139
|
} catch {
|
|
1128
1140
|
return !1;
|
|
1129
1141
|
}
|
|
1130
|
-
},
|
|
1131
|
-
e = V.merge.call({ skipUndefined: !0 },
|
|
1132
|
-
let { fetch: t, Request: n, Response: r } = e, i = t ?
|
|
1142
|
+
}, Tn = (e) => {
|
|
1143
|
+
e = V.merge.call({ skipUndefined: !0 }, xn, e);
|
|
1144
|
+
let { fetch: t, Request: n, Response: r } = e, i = t ? bn(t) : typeof fetch == "function", a = bn(n), o = bn(r);
|
|
1133
1145
|
if (!i) return !1;
|
|
1134
|
-
let s = i &&
|
|
1135
|
-
let e = !1, t = new
|
|
1136
|
-
body:
|
|
1146
|
+
let s = i && bn(Sn), c = i && (typeof Cn == "function" ? ((e) => (t) => e.encode(t))(new Cn()) : async (e) => new Uint8Array(await new n(e).arrayBuffer())), l = a && s && wn(() => {
|
|
1147
|
+
let e = !1, t = new n(U.origin, {
|
|
1148
|
+
body: new Sn(),
|
|
1137
1149
|
method: "POST",
|
|
1138
1150
|
get duplex() {
|
|
1139
1151
|
return e = !0, "half";
|
|
1140
1152
|
}
|
|
1141
|
-
}).headers.has("Content-Type");
|
|
1142
|
-
return t.cancel(), e && !r;
|
|
1143
|
-
}), u = o && s &&
|
|
1153
|
+
}), r = t.headers.has("Content-Type");
|
|
1154
|
+
return t.body != null && t.body.cancel(), e && !r;
|
|
1155
|
+
}), u = o && s && wn(() => V.isReadableStream(new r("").body)), d = { stream: u && ((e) => e.body) };
|
|
1144
1156
|
i && [
|
|
1145
1157
|
"text",
|
|
1146
1158
|
"arrayBuffer",
|
|
@@ -1165,9 +1177,9 @@ var dn = (e) => {
|
|
|
1165
1177
|
if (V.isURLSearchParams(e) && (e += ""), V.isString(e)) return (await c(e)).byteLength;
|
|
1166
1178
|
}, p = async (e, t) => V.toFiniteNumber(e.getContentLength()) ?? f(t);
|
|
1167
1179
|
return async (e) => {
|
|
1168
|
-
let { url: i, method: o, data: s, signal: c, cancelToken: f, timeout: m, onDownloadProgress: h, onUploadProgress: g, responseType: _, headers: v, withCredentials: y = "same-origin", fetchOptions: b } =
|
|
1180
|
+
let { url: i, method: o, data: s, signal: c, cancelToken: f, timeout: m, onDownloadProgress: h, onUploadProgress: g, responseType: _, headers: v, withCredentials: y = "same-origin", fetchOptions: b } = fn(e), x = t || fetch;
|
|
1169
1181
|
_ = _ ? (_ + "").toLowerCase() : "text";
|
|
1170
|
-
let S =
|
|
1182
|
+
let S = mn([c, f && f.toAbortSignal()], m), C = null, w = S && S.unsubscribe && (() => {
|
|
1171
1183
|
S.unsubscribe();
|
|
1172
1184
|
}), T;
|
|
1173
1185
|
try {
|
|
@@ -1178,12 +1190,17 @@ var dn = (e) => {
|
|
|
1178
1190
|
duplex: "half"
|
|
1179
1191
|
}), t;
|
|
1180
1192
|
if (V.isFormData(s) && (t = e.headers.get("content-type")) && v.setContentType(t), e.body) {
|
|
1181
|
-
let [t, n] =
|
|
1182
|
-
s =
|
|
1193
|
+
let [t, n] = nn(T, tn(rn(g)));
|
|
1194
|
+
s = vn(e.body, yn, t, n);
|
|
1183
1195
|
}
|
|
1184
1196
|
}
|
|
1185
1197
|
V.isString(y) || (y = y ? "include" : "omit");
|
|
1186
|
-
let t = a && "credentials" in n.prototype
|
|
1198
|
+
let t = a && "credentials" in n.prototype;
|
|
1199
|
+
if (V.isFormData(s)) {
|
|
1200
|
+
let e = v.getContentType();
|
|
1201
|
+
e && /^multipart\/form-data/i.test(e) && !/boundary=/i.test(e) && v.delete("content-type");
|
|
1202
|
+
}
|
|
1203
|
+
let c = {
|
|
1187
1204
|
...b,
|
|
1188
1205
|
signal: S,
|
|
1189
1206
|
method: o.toUpperCase(),
|
|
@@ -1203,15 +1220,15 @@ var dn = (e) => {
|
|
|
1203
1220
|
].forEach((t) => {
|
|
1204
1221
|
e[t] = f[t];
|
|
1205
1222
|
});
|
|
1206
|
-
let t = V.toFiniteNumber(f.headers.get("content-length")), [n, i] = h &&
|
|
1207
|
-
f = new r(
|
|
1223
|
+
let t = V.toFiniteNumber(f.headers.get("content-length")), [n, i] = h && nn(t, tn(rn(h), !0)) || [];
|
|
1224
|
+
f = new r(vn(f.body, yn, n, () => {
|
|
1208
1225
|
i && i(), w && w();
|
|
1209
1226
|
}), e);
|
|
1210
1227
|
}
|
|
1211
1228
|
_ ||= "text";
|
|
1212
1229
|
let E = await d[V.findKey(d, _) || "text"](f, e);
|
|
1213
1230
|
return !m && w && w(), await new Promise((t, n) => {
|
|
1214
|
-
|
|
1231
|
+
Zt(t, n, {
|
|
1215
1232
|
data: E,
|
|
1216
1233
|
headers: W.from(f.headers),
|
|
1217
1234
|
status: f.status,
|
|
@@ -1224,24 +1241,24 @@ var dn = (e) => {
|
|
|
1224
1241
|
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new H("Network Error", H.ERR_NETWORK, e, C, t && t.response), { cause: t.cause || t }) : H.from(t, t && t.code, e, C, t && t.response);
|
|
1225
1242
|
}
|
|
1226
1243
|
};
|
|
1227
|
-
},
|
|
1244
|
+
}, En = /* @__PURE__ */ new Map(), Dn = (e) => {
|
|
1228
1245
|
let t = e && e.env || {}, { fetch: n, Request: r, Response: i } = t, a = [
|
|
1229
1246
|
r,
|
|
1230
1247
|
i,
|
|
1231
1248
|
n
|
|
1232
|
-
], o = a.length, s, c, l =
|
|
1233
|
-
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() :
|
|
1249
|
+
], o = a.length, s, c, l = En;
|
|
1250
|
+
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() : Tn(t)), l = c;
|
|
1234
1251
|
return c;
|
|
1235
1252
|
};
|
|
1236
|
-
|
|
1253
|
+
Dn();
|
|
1237
1254
|
//#endregion
|
|
1238
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
1239
|
-
var
|
|
1255
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/adapters/adapters.js
|
|
1256
|
+
var On = {
|
|
1240
1257
|
http: null,
|
|
1241
|
-
xhr:
|
|
1242
|
-
fetch: { get:
|
|
1258
|
+
xhr: pn,
|
|
1259
|
+
fetch: { get: Dn }
|
|
1243
1260
|
};
|
|
1244
|
-
V.forEach(
|
|
1261
|
+
V.forEach(On, (e, t) => {
|
|
1245
1262
|
if (e) {
|
|
1246
1263
|
try {
|
|
1247
1264
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1249,46 +1266,46 @@ V.forEach(Dn, (e, t) => {
|
|
|
1249
1266
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1250
1267
|
}
|
|
1251
1268
|
});
|
|
1252
|
-
var
|
|
1253
|
-
function
|
|
1269
|
+
var kn = (e) => `- ${e}`, An = (e) => V.isFunction(e) || e === null || e === !1;
|
|
1270
|
+
function jn(e, t) {
|
|
1254
1271
|
e = V.isArray(e) ? e : [e];
|
|
1255
1272
|
let { length: n } = e, r, i, a = {};
|
|
1256
1273
|
for (let o = 0; o < n; o++) {
|
|
1257
1274
|
r = e[o];
|
|
1258
1275
|
let n;
|
|
1259
|
-
if (i = r, !
|
|
1276
|
+
if (i = r, !An(r) && (i = On[(n = String(r)).toLowerCase()], i === void 0)) throw new H(`Unknown adapter '${n}'`);
|
|
1260
1277
|
if (i && (V.isFunction(i) || (i = i.get(t)))) break;
|
|
1261
1278
|
a[n || "#" + o] = i;
|
|
1262
1279
|
}
|
|
1263
1280
|
if (!i) {
|
|
1264
1281
|
let e = Object.entries(a).map(([e, t]) => `adapter ${e} ` + (t === !1 ? "is not supported by the environment" : "is not available in the build"));
|
|
1265
|
-
throw new H("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(
|
|
1282
|
+
throw new H("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(kn).join("\n") : " " + kn(e[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
1266
1283
|
}
|
|
1267
1284
|
return i;
|
|
1268
1285
|
}
|
|
1269
|
-
var
|
|
1270
|
-
getAdapter:
|
|
1271
|
-
adapters:
|
|
1286
|
+
var Mn = {
|
|
1287
|
+
getAdapter: jn,
|
|
1288
|
+
adapters: On
|
|
1272
1289
|
};
|
|
1273
1290
|
//#endregion
|
|
1274
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
1275
|
-
function Mn(e) {
|
|
1276
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Yt(null, e);
|
|
1277
|
-
}
|
|
1291
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/dispatchRequest.js
|
|
1278
1292
|
function Nn(e) {
|
|
1279
|
-
|
|
1293
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Xt(null, e);
|
|
1294
|
+
}
|
|
1295
|
+
function Pn(e) {
|
|
1296
|
+
return Nn(e), e.headers = W.from(e.headers), e.data = Jt.call(e, e.transformRequest), [
|
|
1280
1297
|
"post",
|
|
1281
1298
|
"put",
|
|
1282
1299
|
"patch"
|
|
1283
|
-
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1284
|
-
return
|
|
1300
|
+
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Mn.getAdapter(e.adapter || Pt.adapter, e)(e).then(function(t) {
|
|
1301
|
+
return Nn(e), t.data = Jt.call(e, e.transformResponse, t), t.headers = W.from(t.headers), t;
|
|
1285
1302
|
}, function(t) {
|
|
1286
|
-
return
|
|
1303
|
+
return Yt(t) || (Nn(e), t && t.response && (t.response.data = Jt.call(e, e.transformResponse, t.response), t.response.headers = W.from(t.response.headers))), Promise.reject(t);
|
|
1287
1304
|
});
|
|
1288
1305
|
}
|
|
1289
1306
|
//#endregion
|
|
1290
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
1291
|
-
var
|
|
1307
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/env/data.js
|
|
1308
|
+
var Fn = "1.15.2", In = {};
|
|
1292
1309
|
[
|
|
1293
1310
|
"object",
|
|
1294
1311
|
"boolean",
|
|
@@ -1297,27 +1314,27 @@ var Pn = "1.15.0", Fn = {};
|
|
|
1297
1314
|
"string",
|
|
1298
1315
|
"symbol"
|
|
1299
1316
|
].forEach((e, t) => {
|
|
1300
|
-
|
|
1317
|
+
In[e] = function(n) {
|
|
1301
1318
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1302
1319
|
};
|
|
1303
1320
|
});
|
|
1304
|
-
var
|
|
1305
|
-
|
|
1321
|
+
var Ln = {};
|
|
1322
|
+
In.transitional = function(e, t, n) {
|
|
1306
1323
|
function r(e, t) {
|
|
1307
|
-
return "[Axios v" +
|
|
1324
|
+
return "[Axios v" + Fn + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
|
|
1308
1325
|
}
|
|
1309
1326
|
return (n, i, a) => {
|
|
1310
1327
|
if (e === !1) throw new H(r(i, " has been removed" + (t ? " in " + t : "")), H.ERR_DEPRECATED);
|
|
1311
|
-
return t && !
|
|
1328
|
+
return t && !Ln[i] && (Ln[i] = !0, console.warn(r(i, " has been deprecated since v" + t + " and will be removed in the near future"))), e ? e(n, i, a) : !0;
|
|
1312
1329
|
};
|
|
1313
|
-
},
|
|
1330
|
+
}, In.spelling = function(e) {
|
|
1314
1331
|
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1315
1332
|
};
|
|
1316
|
-
function
|
|
1333
|
+
function Rn(e, t, n) {
|
|
1317
1334
|
if (typeof e != "object") throw new H("options must be an object", H.ERR_BAD_OPTION_VALUE);
|
|
1318
1335
|
let r = Object.keys(e), i = r.length;
|
|
1319
1336
|
for (; i-- > 0;) {
|
|
1320
|
-
let a = r[i], o = t[a];
|
|
1337
|
+
let a = r[i], o = Object.prototype.hasOwnProperty.call(t, a) ? t[a] : void 0;
|
|
1321
1338
|
if (o) {
|
|
1322
1339
|
let t = e[a], n = t === void 0 || o(t, a, e);
|
|
1323
1340
|
if (n !== !0) throw new H("option " + a + " must be " + n, H.ERR_BAD_OPTION_VALUE);
|
|
@@ -1326,10 +1343,10 @@ function Ln(e, t, n) {
|
|
|
1326
1343
|
if (n !== !0) throw new H("Unknown option " + a, H.ERR_BAD_OPTION);
|
|
1327
1344
|
}
|
|
1328
1345
|
}
|
|
1329
|
-
var
|
|
1330
|
-
assertOptions:
|
|
1331
|
-
validators:
|
|
1332
|
-
}, G =
|
|
1346
|
+
var zn = {
|
|
1347
|
+
assertOptions: Rn,
|
|
1348
|
+
validators: In
|
|
1349
|
+
}, G = zn.validators, Bn = class {
|
|
1333
1350
|
constructor(e) {
|
|
1334
1351
|
this.defaults = e || {}, this.interceptors = {
|
|
1335
1352
|
request: new yt(),
|
|
@@ -1360,17 +1377,17 @@ var Rn = {
|
|
|
1360
1377
|
}
|
|
1361
1378
|
}
|
|
1362
1379
|
_request(e, t) {
|
|
1363
|
-
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t =
|
|
1380
|
+
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t = dn(this.defaults, t);
|
|
1364
1381
|
let { transitional: n, paramsSerializer: r, headers: i } = t;
|
|
1365
|
-
n !== void 0 &&
|
|
1382
|
+
n !== void 0 && zn.assertOptions(n, {
|
|
1366
1383
|
silentJSONParsing: G.transitional(G.boolean),
|
|
1367
1384
|
forcedJSONParsing: G.transitional(G.boolean),
|
|
1368
1385
|
clarifyTimeoutError: G.transitional(G.boolean),
|
|
1369
1386
|
legacyInterceptorReqResOrdering: G.transitional(G.boolean)
|
|
1370
|
-
}, !1), r != null && (V.isFunction(r) ? t.paramsSerializer = { serialize: r } :
|
|
1387
|
+
}, !1), r != null && (V.isFunction(r) ? t.paramsSerializer = { serialize: r } : zn.assertOptions(r, {
|
|
1371
1388
|
encode: G.function,
|
|
1372
1389
|
serialize: G.function
|
|
1373
|
-
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls),
|
|
1390
|
+
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), zn.assertOptions(t, {
|
|
1374
1391
|
baseUrl: G.spelling("baseURL"),
|
|
1375
1392
|
withXsrfToken: G.spelling("withXSRFToken")
|
|
1376
1393
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1399,7 +1416,7 @@ var Rn = {
|
|
|
1399
1416
|
});
|
|
1400
1417
|
let l, u = 0, d;
|
|
1401
1418
|
if (!s) {
|
|
1402
|
-
let e = [
|
|
1419
|
+
let e = [Pn.bind(this), void 0];
|
|
1403
1420
|
for (e.unshift(...o), e.push(...c), d = e.length, l = Promise.resolve(t); u < d;) l = l.then(e[u++], e[u++]);
|
|
1404
1421
|
return l;
|
|
1405
1422
|
}
|
|
@@ -1415,7 +1432,7 @@ var Rn = {
|
|
|
1415
1432
|
}
|
|
1416
1433
|
}
|
|
1417
1434
|
try {
|
|
1418
|
-
l =
|
|
1435
|
+
l = Pn.call(this, f);
|
|
1419
1436
|
} catch (e) {
|
|
1420
1437
|
return Promise.reject(e);
|
|
1421
1438
|
}
|
|
@@ -1423,7 +1440,7 @@ var Rn = {
|
|
|
1423
1440
|
return l;
|
|
1424
1441
|
}
|
|
1425
1442
|
getUri(e) {
|
|
1426
|
-
return e =
|
|
1443
|
+
return e = dn(this.defaults, e), vt(ln(e.baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
|
|
1427
1444
|
}
|
|
1428
1445
|
};
|
|
1429
1446
|
V.forEach([
|
|
@@ -1432,8 +1449,8 @@ V.forEach([
|
|
|
1432
1449
|
"head",
|
|
1433
1450
|
"options"
|
|
1434
1451
|
], function(e) {
|
|
1435
|
-
|
|
1436
|
-
return this.request(
|
|
1452
|
+
Bn.prototype[e] = function(t, n) {
|
|
1453
|
+
return this.request(dn(n || {}, {
|
|
1437
1454
|
method: e,
|
|
1438
1455
|
url: t,
|
|
1439
1456
|
data: (n || {}).data
|
|
@@ -1446,7 +1463,7 @@ V.forEach([
|
|
|
1446
1463
|
], function(e) {
|
|
1447
1464
|
function t(t) {
|
|
1448
1465
|
return function(n, r, i) {
|
|
1449
|
-
return this.request(
|
|
1466
|
+
return this.request(dn(i || {}, {
|
|
1450
1467
|
method: e,
|
|
1451
1468
|
headers: t ? { "Content-Type": "multipart/form-data" } : {},
|
|
1452
1469
|
url: n,
|
|
@@ -1454,11 +1471,11 @@ V.forEach([
|
|
|
1454
1471
|
}));
|
|
1455
1472
|
};
|
|
1456
1473
|
}
|
|
1457
|
-
|
|
1474
|
+
Bn.prototype[e] = t(), Bn.prototype[e + "Form"] = t(!0);
|
|
1458
1475
|
});
|
|
1459
1476
|
//#endregion
|
|
1460
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
1461
|
-
var
|
|
1477
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/cancel/CancelToken.js
|
|
1478
|
+
var Vn = class e {
|
|
1462
1479
|
constructor(e) {
|
|
1463
1480
|
if (typeof e != "function") throw TypeError("executor must be a function.");
|
|
1464
1481
|
let t;
|
|
@@ -1479,7 +1496,7 @@ var Bn = class e {
|
|
|
1479
1496
|
n.unsubscribe(t);
|
|
1480
1497
|
}, r;
|
|
1481
1498
|
}, e(function(e, r, i) {
|
|
1482
|
-
n.reason || (n.reason = new
|
|
1499
|
+
n.reason || (n.reason = new Xt(e, r, i), t(n.reason));
|
|
1483
1500
|
});
|
|
1484
1501
|
}
|
|
1485
1502
|
throwIfRequested() {
|
|
@@ -1514,20 +1531,20 @@ var Bn = class e {
|
|
|
1514
1531
|
}
|
|
1515
1532
|
};
|
|
1516
1533
|
//#endregion
|
|
1517
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
1518
|
-
function
|
|
1534
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/spread.js
|
|
1535
|
+
function Hn(e) {
|
|
1519
1536
|
return function(t) {
|
|
1520
1537
|
return e.apply(null, t);
|
|
1521
1538
|
};
|
|
1522
1539
|
}
|
|
1523
1540
|
//#endregion
|
|
1524
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
1525
|
-
function
|
|
1541
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/isAxiosError.js
|
|
1542
|
+
function Un(e) {
|
|
1526
1543
|
return V.isObject(e) && e.isAxiosError === !0;
|
|
1527
1544
|
}
|
|
1528
1545
|
//#endregion
|
|
1529
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
1530
|
-
var
|
|
1546
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
1547
|
+
var Wn = {
|
|
1531
1548
|
Continue: 100,
|
|
1532
1549
|
SwitchingProtocols: 101,
|
|
1533
1550
|
Processing: 102,
|
|
@@ -1598,37 +1615,37 @@ var Un = {
|
|
|
1598
1615
|
SslHandshakeFailed: 525,
|
|
1599
1616
|
InvalidSslCertificate: 526
|
|
1600
1617
|
};
|
|
1601
|
-
Object.entries(
|
|
1602
|
-
|
|
1618
|
+
Object.entries(Wn).forEach(([e, t]) => {
|
|
1619
|
+
Wn[t] = e;
|
|
1603
1620
|
});
|
|
1604
1621
|
//#endregion
|
|
1605
|
-
//#region node_modules/.pnpm/axios@1.15.
|
|
1606
|
-
function
|
|
1607
|
-
let t = new
|
|
1608
|
-
return V.extend(n,
|
|
1609
|
-
return
|
|
1622
|
+
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/axios.js
|
|
1623
|
+
function Gn(e) {
|
|
1624
|
+
let t = new Bn(e), n = ne(Bn.prototype.request, t);
|
|
1625
|
+
return V.extend(n, Bn.prototype, t, { allOwnKeys: !0 }), V.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(t) {
|
|
1626
|
+
return Gn(dn(e, t));
|
|
1610
1627
|
}, n;
|
|
1611
1628
|
}
|
|
1612
|
-
var K =
|
|
1613
|
-
K.Axios =
|
|
1629
|
+
var K = Gn(Pt);
|
|
1630
|
+
K.Axios = Bn, K.CanceledError = Xt, K.CancelToken = Vn, K.isCancel = Yt, K.VERSION = Fn, K.toFormData = pt, K.AxiosError = H, K.Cancel = K.CanceledError, K.all = function(e) {
|
|
1614
1631
|
return Promise.all(e);
|
|
1615
|
-
}, K.spread =
|
|
1632
|
+
}, K.spread = Hn, K.isAxiosError = Un, K.mergeConfig = dn, K.AxiosHeaders = W, K.formToJSON = (e) => jt(V.isHTMLForm(e) ? new FormData(e) : e), K.getAdapter = Mn.getAdapter, K.HttpStatusCode = Wn, K.default = K;
|
|
1616
1633
|
//#endregion
|
|
1617
1634
|
//#region src/api/data/baostock.ts
|
|
1618
|
-
function
|
|
1635
|
+
function Kn(e) {
|
|
1619
1636
|
if (/^\d{8}$/.test(e)) return `${e.slice(0, 4)}-${e.slice(4, 6)}-${e.slice(6, 8)}`;
|
|
1620
1637
|
if (/^\d{4}-\d{2}-\d{2}T/.test(e)) return e.slice(0, 10);
|
|
1621
1638
|
if (/^\d{4}-\d{2}-\d{2}$/.test(e)) return e;
|
|
1622
1639
|
let t = new Date(e);
|
|
1623
1640
|
return Number.isNaN(t.getTime()) ? e : t.toISOString().slice(0, 10);
|
|
1624
1641
|
}
|
|
1625
|
-
function
|
|
1642
|
+
function qn(e) {
|
|
1626
1643
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
|
|
1627
1644
|
if (!t) throw Error(`无法解析日期: ${e}`);
|
|
1628
1645
|
let n = Number(t[1]), r = Number(t[2]), i = Number(t[3]);
|
|
1629
1646
|
return Date.UTC(n, r - 1, i, -8, 0, 0, 0);
|
|
1630
1647
|
}
|
|
1631
|
-
function
|
|
1648
|
+
function Jn(e) {
|
|
1632
1649
|
return e && {
|
|
1633
1650
|
daily: "d",
|
|
1634
1651
|
weekly: "w",
|
|
@@ -1639,20 +1656,20 @@ function qn(e) {
|
|
|
1639
1656
|
60: "60"
|
|
1640
1657
|
}[e] || "d";
|
|
1641
1658
|
}
|
|
1642
|
-
function
|
|
1659
|
+
function Yn(e) {
|
|
1643
1660
|
return e && {
|
|
1644
1661
|
qfq: "2",
|
|
1645
1662
|
hfq: "1",
|
|
1646
1663
|
none: "3"
|
|
1647
1664
|
}[e] || "3";
|
|
1648
1665
|
}
|
|
1649
|
-
function
|
|
1650
|
-
let t =
|
|
1666
|
+
function Xn(e) {
|
|
1667
|
+
let t = Kn(e.date), n = (e) => {
|
|
1651
1668
|
let t = parseFloat(e);
|
|
1652
1669
|
return Number.isNaN(t) ? 0 : t;
|
|
1653
1670
|
};
|
|
1654
1671
|
return {
|
|
1655
|
-
timestamp:
|
|
1672
|
+
timestamp: qn(t),
|
|
1656
1673
|
stockCode: e.code,
|
|
1657
1674
|
open: n(e.open),
|
|
1658
1675
|
high: n(e.high),
|
|
@@ -1664,14 +1681,14 @@ function Yn(e) {
|
|
|
1664
1681
|
turnoverRate: n(e.turn)
|
|
1665
1682
|
};
|
|
1666
1683
|
}
|
|
1667
|
-
var
|
|
1668
|
-
async function
|
|
1669
|
-
let { timeout: t, ...n } = e, r = `${
|
|
1684
|
+
var Zn = "", Qn = "/api/stock/kdata";
|
|
1685
|
+
async function $n(e) {
|
|
1686
|
+
let { timeout: t, ...n } = e, r = `${Zn}${Qn}`, i = {
|
|
1670
1687
|
stock_code: n.symbol,
|
|
1671
1688
|
start_date: n.start_date,
|
|
1672
1689
|
end_date: n.end_date,
|
|
1673
|
-
frequency:
|
|
1674
|
-
adjustflag:
|
|
1690
|
+
frequency: Jn(n.period),
|
|
1691
|
+
adjustflag: Yn(n.adjust),
|
|
1675
1692
|
timeout: t
|
|
1676
1693
|
};
|
|
1677
1694
|
try {
|
|
@@ -1680,14 +1697,14 @@ async function Qn(e) {
|
|
|
1680
1697
|
timeout: t ? t * 1e3 : void 0
|
|
1681
1698
|
})).data;
|
|
1682
1699
|
if (!e.success) throw Error(`获取K线数据失败: ${e.error_msg || "未知错误"} (code: ${e.error_code})`);
|
|
1683
|
-
return !e.data || e.data.length === 0 ? [] : e.data.map(
|
|
1700
|
+
return !e.data || e.data.length === 0 ? [] : e.data.map(Xn).sort((e, t) => e.timestamp - t.timestamp);
|
|
1684
1701
|
} catch (e) {
|
|
1685
1702
|
throw K.isAxiosError(e) ? Error(`获取K线数据失败: ${e.message}`) : e;
|
|
1686
1703
|
}
|
|
1687
1704
|
}
|
|
1688
1705
|
//#endregion
|
|
1689
1706
|
//#region src/types/price.ts
|
|
1690
|
-
function
|
|
1707
|
+
function er(e) {
|
|
1691
1708
|
return e.map((e) => ({
|
|
1692
1709
|
timestamp: e.timestamp,
|
|
1693
1710
|
open: e.open,
|
|
@@ -1705,23 +1722,23 @@ function $n(e) {
|
|
|
1705
1722
|
}
|
|
1706
1723
|
//#endregion
|
|
1707
1724
|
//#region src/api/data/kLine.ts
|
|
1708
|
-
var
|
|
1709
|
-
function
|
|
1725
|
+
var tr = "/api/public/stock_zh_a_hist";
|
|
1726
|
+
function nr(e) {
|
|
1710
1727
|
if (/^\d{8}$/.test(e)) return `${e.slice(0, 4)}-${e.slice(4, 6)}-${e.slice(6, 8)}`;
|
|
1711
1728
|
if (/^\d{4}-\d{2}-\d{2}T/.test(e)) return e.slice(0, 10);
|
|
1712
1729
|
if (/^\d{4}-\d{2}-\d{2}$/.test(e)) return e;
|
|
1713
1730
|
let t = new Date(e);
|
|
1714
1731
|
return Number.isNaN(t.getTime()) ? e : t.toISOString().slice(0, 10);
|
|
1715
1732
|
}
|
|
1716
|
-
function
|
|
1733
|
+
function rr(e) {
|
|
1717
1734
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
|
|
1718
1735
|
if (!t) throw Error(`无法解析日期: ${e}`);
|
|
1719
1736
|
let n = Number(t[1]), r = Number(t[2]), i = Number(t[3]);
|
|
1720
1737
|
return Date.UTC(n, r - 1, i, -8, 0, 0, 0);
|
|
1721
1738
|
}
|
|
1722
|
-
function
|
|
1739
|
+
function ir(e) {
|
|
1723
1740
|
return {
|
|
1724
|
-
timestamp: nr(
|
|
1741
|
+
timestamp: rr(nr(e.日期)),
|
|
1725
1742
|
stockCode: e.股票代码,
|
|
1726
1743
|
open: e.开盘,
|
|
1727
1744
|
close: e.收盘,
|
|
@@ -1735,23 +1752,23 @@ function rr(e) {
|
|
|
1735
1752
|
turnoverRate: e.换手率
|
|
1736
1753
|
};
|
|
1737
1754
|
}
|
|
1738
|
-
async function
|
|
1755
|
+
async function ar(e) {
|
|
1739
1756
|
try {
|
|
1740
1757
|
let { timeout: t, ...n } = e;
|
|
1741
|
-
return (await K.get(
|
|
1758
|
+
return (await K.get(tr, {
|
|
1742
1759
|
params: n,
|
|
1743
1760
|
timeout: t ? t * 1e3 : void 0
|
|
1744
|
-
})).data.map(
|
|
1761
|
+
})).data.map(ir);
|
|
1745
1762
|
} catch (e) {
|
|
1746
1763
|
throw K.isAxiosError(e) ? Error(`获取K线数据失败: ${e.message}`) : e;
|
|
1747
1764
|
}
|
|
1748
1765
|
}
|
|
1749
1766
|
//#endregion
|
|
1750
1767
|
//#region src/api/data/unified.ts
|
|
1751
|
-
var
|
|
1768
|
+
var or = class {
|
|
1752
1769
|
name = "baostock";
|
|
1753
1770
|
async fetchKLineData(e) {
|
|
1754
|
-
return
|
|
1771
|
+
return $n({
|
|
1755
1772
|
symbol: this.addMarketPrefix(e.symbol),
|
|
1756
1773
|
start_date: e.startDate,
|
|
1757
1774
|
end_date: e.endDate,
|
|
@@ -1771,7 +1788,7 @@ var ar = class {
|
|
|
1771
1788
|
addMarketPrefix(e) {
|
|
1772
1789
|
return /^(6|68)\d{5}$/.test(e) ? `sh.${e}` : /^(0|3)\d{5}$/.test(e) ? `sz.${e}` : e;
|
|
1773
1790
|
}
|
|
1774
|
-
},
|
|
1791
|
+
}, sr = class {
|
|
1775
1792
|
name = "dongcai";
|
|
1776
1793
|
async fetchKLineData(e) {
|
|
1777
1794
|
let t = e.startDate.replace(/-/g, ""), n = e.endDate.replace(/-/g, ""), r = {
|
|
@@ -1780,7 +1797,7 @@ var ar = class {
|
|
|
1780
1797
|
monthly: "monthly"
|
|
1781
1798
|
}[e.period];
|
|
1782
1799
|
if (!r) throw Error(`东财数据源不支持周期: ${e.period}`);
|
|
1783
|
-
return
|
|
1800
|
+
return er(await ar({
|
|
1784
1801
|
symbol: e.symbol,
|
|
1785
1802
|
start_date: t,
|
|
1786
1803
|
end_date: n,
|
|
@@ -1789,27 +1806,27 @@ var ar = class {
|
|
|
1789
1806
|
timeout: e.timeout
|
|
1790
1807
|
}));
|
|
1791
1808
|
}
|
|
1792
|
-
},
|
|
1809
|
+
}, cr = class {
|
|
1793
1810
|
static instances = /* @__PURE__ */ new Map();
|
|
1794
1811
|
static create(e) {
|
|
1795
1812
|
if (!this.instances.has(e)) switch (e) {
|
|
1796
1813
|
case "baostock":
|
|
1797
|
-
this.instances.set(e, new
|
|
1814
|
+
this.instances.set(e, new or());
|
|
1798
1815
|
break;
|
|
1799
1816
|
case "dongcai":
|
|
1800
|
-
this.instances.set(e, new
|
|
1817
|
+
this.instances.set(e, new sr());
|
|
1801
1818
|
break;
|
|
1802
1819
|
default: throw Error(`未知的数据源类型: ${e}`);
|
|
1803
1820
|
}
|
|
1804
1821
|
return this.instances.get(e);
|
|
1805
1822
|
}
|
|
1806
1823
|
};
|
|
1807
|
-
async function
|
|
1808
|
-
return
|
|
1824
|
+
async function lr(e, t) {
|
|
1825
|
+
return cr.create(e).fetchKLineData(t);
|
|
1809
1826
|
}
|
|
1810
1827
|
//#endregion
|
|
1811
|
-
//#region node_modules/.pnpm/ajv@8.
|
|
1812
|
-
var
|
|
1828
|
+
//#region node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js
|
|
1829
|
+
var ur = /* @__PURE__ */ M(((e) => {
|
|
1813
1830
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.regexpCode = e.getEsmExportName = e.getProperty = e.safeStringify = e.stringify = e.strConcat = e.addCodeArg = e.str = e._ = e.nil = e._Code = e.Name = e.IDENTIFIER = e._CodeOrName = void 0;
|
|
1814
1831
|
var t = class {};
|
|
1815
1832
|
e._CodeOrName = t, e.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
@@ -1914,9 +1931,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
1914
1931
|
return new r(e.toString());
|
|
1915
1932
|
}
|
|
1916
1933
|
e.regexpCode = g;
|
|
1917
|
-
})),
|
|
1934
|
+
})), dr = /* @__PURE__ */ M(((e) => {
|
|
1918
1935
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ValueScope = e.ValueScopeName = e.Scope = e.varKinds = e.UsedValueState = void 0;
|
|
1919
|
-
var t =
|
|
1936
|
+
var t = ur(), n = class extends Error {
|
|
1920
1937
|
constructor(e) {
|
|
1921
1938
|
super(`CodeGen: "code" for ${e} not defined`), this.value = e.value;
|
|
1922
1939
|
}
|
|
@@ -2027,7 +2044,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
2027
2044
|
};
|
|
2028
2045
|
})), q = /* @__PURE__ */ M(((e) => {
|
|
2029
2046
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.or = e.and = e.not = e.CodeGen = e.operators = e.varKinds = e.ValueScopeName = e.ValueScope = e.Scope = e.Name = e.regexpCode = e.stringify = e.getProperty = e.nil = e.strConcat = e.str = e._ = void 0;
|
|
2030
|
-
var t =
|
|
2047
|
+
var t = ur(), n = dr(), r = ur();
|
|
2031
2048
|
Object.defineProperty(e, "_", {
|
|
2032
2049
|
enumerable: !0,
|
|
2033
2050
|
get: function() {
|
|
@@ -2069,7 +2086,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
2069
2086
|
return r.Name;
|
|
2070
2087
|
}
|
|
2071
2088
|
});
|
|
2072
|
-
var i =
|
|
2089
|
+
var i = dr();
|
|
2073
2090
|
Object.defineProperty(e, "Scope", {
|
|
2074
2091
|
enumerable: !0,
|
|
2075
2092
|
get: function() {
|
|
@@ -2542,7 +2559,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
2542
2559
|
}
|
|
2543
2560
|
})), J = /* @__PURE__ */ M(((e) => {
|
|
2544
2561
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.checkStrictMode = e.getErrorPath = e.Type = e.useFunc = e.setEvaluated = e.evaluatedPropsToName = e.mergeEvaluated = e.eachItem = e.unescapeJsonPointer = e.escapeJsonPointer = e.escapeFragment = e.unescapeFragment = e.schemaRefOrVal = e.schemaHasRulesButRef = e.schemaHasRules = e.checkUnknownRules = e.alwaysValidSchema = e.toHash = void 0;
|
|
2545
|
-
var t = q(), n =
|
|
2562
|
+
var t = q(), n = ur();
|
|
2546
2563
|
function r(e) {
|
|
2547
2564
|
let t = {};
|
|
2548
2565
|
for (let n of e) t[n] = !0;
|
|
@@ -2665,7 +2682,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
2665
2682
|
}
|
|
2666
2683
|
}
|
|
2667
2684
|
e.checkStrictMode = x;
|
|
2668
|
-
})),
|
|
2685
|
+
})), fr = /* @__PURE__ */ M(((e) => {
|
|
2669
2686
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
2670
2687
|
var t = q();
|
|
2671
2688
|
e.default = {
|
|
@@ -2686,9 +2703,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
2686
2703
|
jsonLen: new t.Name("jsonLen"),
|
|
2687
2704
|
jsonPart: new t.Name("jsonPart")
|
|
2688
2705
|
};
|
|
2689
|
-
})),
|
|
2706
|
+
})), pr = /* @__PURE__ */ M(((e) => {
|
|
2690
2707
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.extendErrors = e.resetErrorsCount = e.reportExtraError = e.reportError = e.keyword$DataError = e.keywordError = void 0;
|
|
2691
|
-
var t = q(), n = J(), r =
|
|
2708
|
+
var t = q(), n = J(), r = fr();
|
|
2692
2709
|
e.keywordError = { message: ({ keyword: e }) => (0, t.str)`must pass "${e}" keyword validation` }, e.keyword$DataError = { message: ({ keyword: e, schemaType: n }) => n ? (0, t.str)`"${e}" keyword must be ${n} ($data)` : (0, t.str)`"${e}" keyword is invalid ($data)` };
|
|
2693
2710
|
function i(n, r = e.keywordError, i, a) {
|
|
2694
2711
|
let { it: o } = n, { gen: s, compositeRule: u, allErrors: f } = o, p = d(n, r, i);
|
|
@@ -2750,9 +2767,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
2750
2767
|
let { keyword: o, data: s, schemaValue: c, it: l } = e, { opts: d, propertyName: f, topSchemaRef: p, schemaPath: m } = l;
|
|
2751
2768
|
a.push([u.keyword, o], [u.params, typeof n == "function" ? n(e) : n || (0, t._)`{}`]), d.messages && a.push([u.message, typeof i == "function" ? i(e) : i]), d.verbose && a.push([u.schema, c], [u.parentSchema, (0, t._)`${p}${m}`], [r.default.data, s]), f && a.push([u.propertyName, f]);
|
|
2752
2769
|
}
|
|
2753
|
-
})),
|
|
2770
|
+
})), mr = /* @__PURE__ */ M(((e) => {
|
|
2754
2771
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.boolOrEmptySchema = e.topBoolOrEmptySchema = void 0;
|
|
2755
|
-
var t =
|
|
2772
|
+
var t = pr(), n = q(), r = fr(), i = { message: "boolean schema is false" };
|
|
2756
2773
|
function a(e) {
|
|
2757
2774
|
let { gen: t, schema: i, validateName: a } = e;
|
|
2758
2775
|
i === !1 ? s(e, !1) : typeof i == "object" && i.$async === !0 ? t.return(r.default.data) : (t.assign((0, n._)`${a}.errors`, null), t.return(!0));
|
|
@@ -2776,7 +2793,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
2776
2793
|
};
|
|
2777
2794
|
(0, t.reportError)(o, i, void 0, n);
|
|
2778
2795
|
}
|
|
2779
|
-
})),
|
|
2796
|
+
})), hr = /* @__PURE__ */ M(((e) => {
|
|
2780
2797
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getRules = e.isJSONType = void 0;
|
|
2781
2798
|
var t = new Set([
|
|
2782
2799
|
"string",
|
|
@@ -2830,7 +2847,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
2830
2847
|
};
|
|
2831
2848
|
}
|
|
2832
2849
|
e.getRules = r;
|
|
2833
|
-
})),
|
|
2850
|
+
})), gr = /* @__PURE__ */ M(((e) => {
|
|
2834
2851
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.shouldUseRule = e.shouldUseGroup = e.schemaHasRulesForType = void 0;
|
|
2835
2852
|
function t({ schema: e, self: t }, r) {
|
|
2836
2853
|
let i = t.RULES.types[r];
|
|
@@ -2845,9 +2862,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
2845
2862
|
return e[t.keyword] !== void 0 || t.definition.implements?.some((t) => e[t] !== void 0);
|
|
2846
2863
|
}
|
|
2847
2864
|
e.shouldUseRule = r;
|
|
2848
|
-
})),
|
|
2865
|
+
})), _r = /* @__PURE__ */ M(((e) => {
|
|
2849
2866
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.reportTypeError = e.checkDataTypes = e.checkDataType = e.coerceAndCheckDataType = e.getJSONTypes = e.getSchemaTypes = e.DataType = void 0;
|
|
2850
|
-
var t =
|
|
2867
|
+
var t = hr(), n = gr(), r = pr(), i = q(), a = J(), o;
|
|
2851
2868
|
(function(e) {
|
|
2852
2869
|
e[e.Correct = 0] = "Correct", e[e.Wrong = 1] = "Wrong";
|
|
2853
2870
|
})(o || (e.DataType = o = {}));
|
|
@@ -2982,7 +2999,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
2982
2999
|
it: e
|
|
2983
3000
|
};
|
|
2984
3001
|
}
|
|
2985
|
-
})),
|
|
3002
|
+
})), vr = /* @__PURE__ */ M(((e) => {
|
|
2986
3003
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.assignDefaults = void 0;
|
|
2987
3004
|
var t = q(), n = J();
|
|
2988
3005
|
function r(e, t) {
|
|
@@ -3002,9 +3019,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
3002
3019
|
let u = (0, t._)`${l} === undefined`;
|
|
3003
3020
|
c.useDefaults === "empty" && (u = (0, t._)`${u} || ${l} === null || ${l} === ""`), a.if(u, (0, t._)`${l} = ${(0, t.stringify)(i)}`);
|
|
3004
3021
|
}
|
|
3005
|
-
})),
|
|
3022
|
+
})), yr = /* @__PURE__ */ M(((e) => {
|
|
3006
3023
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateUnion = e.validateArray = e.usePattern = e.callValidateCode = e.schemaProperties = e.allSchemaProperties = e.noPropertyInData = e.propertyInData = e.isOwnProperty = e.hasPropFunc = e.reportMissingProp = e.checkMissingProp = e.checkReportMissingProp = void 0;
|
|
3007
|
-
var t = q(), n = J(), r =
|
|
3024
|
+
var t = q(), n = J(), r = fr(), i = J();
|
|
3008
3025
|
function a(e, n) {
|
|
3009
3026
|
let { gen: r, data: i, it: a } = e;
|
|
3010
3027
|
r.if(d(r, i, n, a.opts.ownProperties), () => {
|
|
@@ -3106,9 +3123,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
3106
3123
|
})), e.result(s, () => e.reset(), () => e.error(!0));
|
|
3107
3124
|
}
|
|
3108
3125
|
e.validateUnion = v;
|
|
3109
|
-
})),
|
|
3126
|
+
})), br = /* @__PURE__ */ M(((e) => {
|
|
3110
3127
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateKeywordUsage = e.validSchemaType = e.funcKeywordCode = e.macroKeywordCode = void 0;
|
|
3111
|
-
var t = q(), n =
|
|
3128
|
+
var t = q(), n = fr(), r = yr(), i = pr();
|
|
3112
3129
|
function a(e, n) {
|
|
3113
3130
|
let { gen: r, keyword: i, schema: a, parentSchema: o, it: s } = e, c = n.macro.call(s.self, a, o, s), l = u(r, i, c);
|
|
3114
3131
|
s.opts.validateSchema !== !1 && s.self.validateSchema(c, !0);
|
|
@@ -3187,7 +3204,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
3187
3204
|
}
|
|
3188
3205
|
}
|
|
3189
3206
|
e.validateKeywordUsage = f;
|
|
3190
|
-
})),
|
|
3207
|
+
})), xr = /* @__PURE__ */ M(((e) => {
|
|
3191
3208
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.extendSubschemaMode = e.extendSubschemaData = e.getSubschema = void 0;
|
|
3192
3209
|
var t = q(), n = J();
|
|
3193
3210
|
function r(e, { keyword: r, schemaProp: i, schema: a, schemaPath: o, errSchemaPath: s, topSchemaRef: c }) {
|
|
@@ -3233,7 +3250,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
3233
3250
|
r !== void 0 && (e.compositeRule = r), i !== void 0 && (e.createErrors = i), a !== void 0 && (e.allErrors = a), e.jtdDiscriminator = t, e.jtdMetadata = n;
|
|
3234
3251
|
}
|
|
3235
3252
|
e.extendSubschemaMode = a;
|
|
3236
|
-
})),
|
|
3253
|
+
})), Sr = /* @__PURE__ */ M(((e, t) => {
|
|
3237
3254
|
t.exports = function e(t, n) {
|
|
3238
3255
|
if (t === n) return !0;
|
|
3239
3256
|
if (t && n && typeof t == "object" && typeof n == "object") {
|
|
@@ -3257,7 +3274,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
3257
3274
|
}
|
|
3258
3275
|
return t !== t && n !== n;
|
|
3259
3276
|
};
|
|
3260
|
-
})),
|
|
3277
|
+
})), Cr = /* @__PURE__ */ M(((e, t) => {
|
|
3261
3278
|
var n = t.exports = function(e, t, n) {
|
|
3262
3279
|
typeof t == "function" && (n = t, t = {}), n = t.cb || n;
|
|
3263
3280
|
var i = typeof n == "function" ? n : n.pre || function() {}, a = n.post || function() {};
|
|
@@ -3320,9 +3337,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
3320
3337
|
function i(e) {
|
|
3321
3338
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
3322
3339
|
}
|
|
3323
|
-
})),
|
|
3340
|
+
})), wr = /* @__PURE__ */ M(((e) => {
|
|
3324
3341
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getSchemaRefs = e.resolveUrl = e.normalizeId = e._getFullPath = e.getFullPath = e.inlineRef = void 0;
|
|
3325
|
-
var t = J(), n =
|
|
3342
|
+
var t = J(), n = Sr(), r = Cr(), i = new Set([
|
|
3326
3343
|
"type",
|
|
3327
3344
|
"format",
|
|
3328
3345
|
"pattern",
|
|
@@ -3411,9 +3428,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
3411
3428
|
}
|
|
3412
3429
|
}
|
|
3413
3430
|
e.getSchemaRefs = h;
|
|
3414
|
-
})),
|
|
3431
|
+
})), Tr = /* @__PURE__ */ M(((e) => {
|
|
3415
3432
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getData = e.KeywordCxt = e.validateFunctionCode = void 0;
|
|
3416
|
-
var t =
|
|
3433
|
+
var t = mr(), n = _r(), r = gr(), i = _r(), a = vr(), o = br(), s = xr(), c = q(), l = fr(), u = wr(), d = J(), f = pr();
|
|
3417
3434
|
function p(e) {
|
|
3418
3435
|
if (S(e) && (w(e), x(e))) {
|
|
3419
3436
|
_(e);
|
|
@@ -3703,23 +3720,23 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
3703
3720
|
}
|
|
3704
3721
|
}
|
|
3705
3722
|
e.getData = le;
|
|
3706
|
-
})),
|
|
3723
|
+
})), Er = /* @__PURE__ */ M(((e) => {
|
|
3707
3724
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = class extends Error {
|
|
3708
3725
|
constructor(e) {
|
|
3709
3726
|
super("validation failed"), this.errors = e, this.ajv = this.validation = !0;
|
|
3710
3727
|
}
|
|
3711
3728
|
};
|
|
3712
|
-
})),
|
|
3729
|
+
})), Dr = /* @__PURE__ */ M(((e) => {
|
|
3713
3730
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
3714
|
-
var t =
|
|
3731
|
+
var t = wr();
|
|
3715
3732
|
e.default = class extends Error {
|
|
3716
3733
|
constructor(e, n, r, i) {
|
|
3717
3734
|
super(i || `can't resolve reference ${r} from id ${n}`), this.missingRef = (0, t.resolveUrl)(e, n, r), this.missingSchema = (0, t.normalizeId)((0, t.getFullPath)(e, this.missingRef));
|
|
3718
3735
|
}
|
|
3719
3736
|
};
|
|
3720
|
-
})),
|
|
3737
|
+
})), Or = /* @__PURE__ */ M(((e) => {
|
|
3721
3738
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resolveSchema = e.getCompilingSchema = e.resolveRef = e.compileSchema = e.SchemaEnv = void 0;
|
|
3722
|
-
var t = q(), n =
|
|
3739
|
+
var t = q(), n = Er(), r = fr(), i = wr(), a = J(), o = Tr(), s = class {
|
|
3723
3740
|
constructor(e) {
|
|
3724
3741
|
this.refs = {}, this.dynamicAnchors = {};
|
|
3725
3742
|
let t;
|
|
@@ -3878,27 +3895,27 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
3878
3895
|
baseId: t
|
|
3879
3896
|
}), o.schema !== o.root.schema) return o;
|
|
3880
3897
|
}
|
|
3881
|
-
})),
|
|
3882
|
-
$id: () =>
|
|
3898
|
+
})), kr = /* @__PURE__ */ N({
|
|
3899
|
+
$id: () => Ar,
|
|
3883
3900
|
additionalProperties: () => !1,
|
|
3884
|
-
default: () =>
|
|
3885
|
-
description: () =>
|
|
3886
|
-
properties: () =>
|
|
3887
|
-
required: () =>
|
|
3888
|
-
type: () =>
|
|
3889
|
-
}),
|
|
3890
|
-
|
|
3901
|
+
default: () => Fr,
|
|
3902
|
+
description: () => jr,
|
|
3903
|
+
properties: () => Pr,
|
|
3904
|
+
required: () => Nr,
|
|
3905
|
+
type: () => Mr
|
|
3906
|
+
}), Ar, jr, Mr, Nr, Pr, Fr, Ir = j((() => {
|
|
3907
|
+
Ar = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", jr = "Meta-schema for $data reference (JSON AnySchema extension proposal)", Mr = "object", Nr = ["$data"], Pr = { $data: {
|
|
3891
3908
|
type: "string",
|
|
3892
3909
|
anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }]
|
|
3893
|
-
} },
|
|
3894
|
-
$id:
|
|
3895
|
-
description:
|
|
3896
|
-
type:
|
|
3897
|
-
required:
|
|
3898
|
-
properties:
|
|
3910
|
+
} }, Fr = {
|
|
3911
|
+
$id: Ar,
|
|
3912
|
+
description: jr,
|
|
3913
|
+
type: Mr,
|
|
3914
|
+
required: Nr,
|
|
3915
|
+
properties: Pr,
|
|
3899
3916
|
additionalProperties: !1
|
|
3900
3917
|
};
|
|
3901
|
-
})),
|
|
3918
|
+
})), Lr = /* @__PURE__ */ M(((e, t) => {
|
|
3902
3919
|
var n = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu), r = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
3903
3920
|
function i(e) {
|
|
3904
3921
|
let t = "", n = 0, r = 0;
|
|
@@ -4055,8 +4072,8 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4055
4072
|
normalizeIPv6: l,
|
|
4056
4073
|
stringArrayToHexStripped: i
|
|
4057
4074
|
};
|
|
4058
|
-
})),
|
|
4059
|
-
var { isUUID: n } =
|
|
4075
|
+
})), Rr = /* @__PURE__ */ M(((e, t) => {
|
|
4076
|
+
var { isUUID: n } = Lr(), r = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu, i = [
|
|
4060
4077
|
"http",
|
|
4061
4078
|
"https",
|
|
4062
4079
|
"ws",
|
|
@@ -4161,8 +4178,8 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4161
4178
|
isValidSchemeName: a,
|
|
4162
4179
|
getSchemeHandler: y
|
|
4163
4180
|
};
|
|
4164
|
-
})),
|
|
4165
|
-
var { normalizeIPv6: n, removeDotSegments: r, recomposeAuthority: i, normalizeComponentEncoding: a, isIPv4: o, nonSimpleDomain: s } =
|
|
4181
|
+
})), zr = /* @__PURE__ */ M(((e, t) => {
|
|
4182
|
+
var { normalizeIPv6: n, removeDotSegments: r, recomposeAuthority: i, normalizeComponentEncoding: a, isIPv4: o, nonSimpleDomain: s } = Lr(), { SCHEMES: c, getSchemeHandler: l } = Rr();
|
|
4166
4183
|
function u(e, t) {
|
|
4167
4184
|
return typeof e == "string" ? e = m(g(e, t), t) : typeof e == "object" && (e = g(m(e, t), t)), e;
|
|
4168
4185
|
}
|
|
@@ -4253,13 +4270,13 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4253
4270
|
parse: g
|
|
4254
4271
|
};
|
|
4255
4272
|
t.exports = _, t.exports.default = _, t.exports.fastUri = _;
|
|
4256
|
-
})),
|
|
4273
|
+
})), Br = /* @__PURE__ */ M(((e) => {
|
|
4257
4274
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4258
|
-
var t =
|
|
4275
|
+
var t = zr();
|
|
4259
4276
|
t.code = "require(\"ajv/dist/runtime/uri\").default", e.default = t;
|
|
4260
|
-
})),
|
|
4277
|
+
})), Vr = /* @__PURE__ */ M(((e) => {
|
|
4261
4278
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = void 0;
|
|
4262
|
-
var t =
|
|
4279
|
+
var t = Tr();
|
|
4263
4280
|
Object.defineProperty(e, "KeywordCxt", {
|
|
4264
4281
|
enumerable: !0,
|
|
4265
4282
|
get: function() {
|
|
@@ -4298,7 +4315,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4298
4315
|
return n.CodeGen;
|
|
4299
4316
|
}
|
|
4300
4317
|
});
|
|
4301
|
-
var r =
|
|
4318
|
+
var r = Er(), i = Dr(), a = hr(), o = Or(), s = q(), c = wr(), l = _r(), u = J(), d = (Ir(), P(kr).default), f = Br(), p = (e, t) => new RegExp(e, t);
|
|
4302
4319
|
p.code = "new RegExp";
|
|
4303
4320
|
var m = [
|
|
4304
4321
|
"removeAdditional",
|
|
@@ -4371,7 +4388,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4371
4388
|
}
|
|
4372
4389
|
var b = class {
|
|
4373
4390
|
constructor(e = {}) {
|
|
4374
|
-
this.schemas = {}, this.refs = {}, this.formats =
|
|
4391
|
+
this.schemas = {}, this.refs = {}, this.formats = Object.create(null), this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), e = this.opts = {
|
|
4375
4392
|
...e,
|
|
4376
4393
|
...y(e)
|
|
4377
4394
|
};
|
|
@@ -4684,16 +4701,16 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4684
4701
|
function te(e) {
|
|
4685
4702
|
return { anyOf: [e, ee] };
|
|
4686
4703
|
}
|
|
4687
|
-
})),
|
|
4704
|
+
})), Hr = /* @__PURE__ */ M(((e) => {
|
|
4688
4705
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = {
|
|
4689
4706
|
keyword: "id",
|
|
4690
4707
|
code() {
|
|
4691
4708
|
throw Error("NOT SUPPORTED: keyword \"id\", use \"$id\" for schema ID");
|
|
4692
4709
|
}
|
|
4693
4710
|
};
|
|
4694
|
-
})),
|
|
4711
|
+
})), Ur = /* @__PURE__ */ M(((e) => {
|
|
4695
4712
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.callRef = e.getValidate = void 0;
|
|
4696
|
-
var t =
|
|
4713
|
+
var t = Dr(), n = yr(), r = q(), i = fr(), a = Or(), o = J(), s = {
|
|
4697
4714
|
keyword: "$ref",
|
|
4698
4715
|
schemaType: "string",
|
|
4699
4716
|
code(e) {
|
|
@@ -4766,9 +4783,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4766
4783
|
}
|
|
4767
4784
|
}
|
|
4768
4785
|
e.callRef = l, e.default = s;
|
|
4769
|
-
})),
|
|
4786
|
+
})), Wr = /* @__PURE__ */ M(((e) => {
|
|
4770
4787
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4771
|
-
var t =
|
|
4788
|
+
var t = Hr(), n = Ur();
|
|
4772
4789
|
e.default = [
|
|
4773
4790
|
"$schema",
|
|
4774
4791
|
"$id",
|
|
@@ -4779,7 +4796,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4779
4796
|
t.default,
|
|
4780
4797
|
n.default
|
|
4781
4798
|
];
|
|
4782
|
-
})),
|
|
4799
|
+
})), Gr = /* @__PURE__ */ M(((e) => {
|
|
4783
4800
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4784
4801
|
var t = q(), n = t.operators, r = {
|
|
4785
4802
|
maximum: {
|
|
@@ -4817,7 +4834,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4817
4834
|
e.fail$data((0, t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`);
|
|
4818
4835
|
}
|
|
4819
4836
|
};
|
|
4820
|
-
})),
|
|
4837
|
+
})), Kr = /* @__PURE__ */ M(((e) => {
|
|
4821
4838
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4822
4839
|
var t = q();
|
|
4823
4840
|
e.default = {
|
|
@@ -4834,7 +4851,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4834
4851
|
e.fail$data((0, t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`);
|
|
4835
4852
|
}
|
|
4836
4853
|
};
|
|
4837
|
-
})),
|
|
4854
|
+
})), qr = /* @__PURE__ */ M(((e) => {
|
|
4838
4855
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4839
4856
|
function t(e) {
|
|
4840
4857
|
let t = e.length, n = 0, r = 0, i;
|
|
@@ -4842,9 +4859,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4842
4859
|
return n;
|
|
4843
4860
|
}
|
|
4844
4861
|
e.default = t, t.code = "require(\"ajv/dist/runtime/ucs2length\").default";
|
|
4845
|
-
})),
|
|
4862
|
+
})), Jr = /* @__PURE__ */ M(((e) => {
|
|
4846
4863
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4847
|
-
var t = q(), n = J(), r =
|
|
4864
|
+
var t = q(), n = J(), r = qr();
|
|
4848
4865
|
e.default = {
|
|
4849
4866
|
keyword: ["maxLength", "minLength"],
|
|
4850
4867
|
type: "string",
|
|
@@ -4862,9 +4879,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4862
4879
|
e.fail$data((0, t._)`${l} ${c} ${o}`);
|
|
4863
4880
|
}
|
|
4864
4881
|
};
|
|
4865
|
-
})),
|
|
4882
|
+
})), Yr = /* @__PURE__ */ M(((e) => {
|
|
4866
4883
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4867
|
-
var t =
|
|
4884
|
+
var t = yr(), n = J(), r = q();
|
|
4868
4885
|
e.default = {
|
|
4869
4886
|
keyword: "pattern",
|
|
4870
4887
|
type: "string",
|
|
@@ -4885,7 +4902,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4885
4902
|
}
|
|
4886
4903
|
}
|
|
4887
4904
|
};
|
|
4888
|
-
})),
|
|
4905
|
+
})), Xr = /* @__PURE__ */ M(((e) => {
|
|
4889
4906
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4890
4907
|
var t = q();
|
|
4891
4908
|
e.default = {
|
|
@@ -4905,9 +4922,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4905
4922
|
e.fail$data((0, t._)`Object.keys(${r}).length ${a} ${i}`);
|
|
4906
4923
|
}
|
|
4907
4924
|
};
|
|
4908
|
-
})),
|
|
4925
|
+
})), Zr = /* @__PURE__ */ M(((e) => {
|
|
4909
4926
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4910
|
-
var t =
|
|
4927
|
+
var t = yr(), n = q(), r = J();
|
|
4911
4928
|
e.default = {
|
|
4912
4929
|
keyword: "required",
|
|
4913
4930
|
type: "object",
|
|
@@ -4953,7 +4970,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4953
4970
|
}
|
|
4954
4971
|
}
|
|
4955
4972
|
};
|
|
4956
|
-
})),
|
|
4973
|
+
})), Qr = /* @__PURE__ */ M(((e) => {
|
|
4957
4974
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4958
4975
|
var t = q();
|
|
4959
4976
|
e.default = {
|
|
@@ -4973,13 +4990,13 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
4973
4990
|
e.fail$data((0, t._)`${r}.length ${a} ${i}`);
|
|
4974
4991
|
}
|
|
4975
4992
|
};
|
|
4976
|
-
})),
|
|
4993
|
+
})), $r = /* @__PURE__ */ M(((e) => {
|
|
4977
4994
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4978
|
-
var t =
|
|
4995
|
+
var t = Sr();
|
|
4979
4996
|
t.code = "require(\"ajv/dist/runtime/equal\").default", e.default = t;
|
|
4980
|
-
})),
|
|
4997
|
+
})), ei = /* @__PURE__ */ M(((e) => {
|
|
4981
4998
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4982
|
-
var t =
|
|
4999
|
+
var t = _r(), n = q(), r = J(), i = $r();
|
|
4983
5000
|
e.default = {
|
|
4984
5001
|
keyword: "uniqueItems",
|
|
4985
5002
|
type: "array",
|
|
@@ -5020,9 +5037,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5020
5037
|
}
|
|
5021
5038
|
}
|
|
5022
5039
|
};
|
|
5023
|
-
})),
|
|
5040
|
+
})), ti = /* @__PURE__ */ M(((e) => {
|
|
5024
5041
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5025
|
-
var t = q(), n = J(), r =
|
|
5042
|
+
var t = q(), n = J(), r = $r();
|
|
5026
5043
|
e.default = {
|
|
5027
5044
|
keyword: "const",
|
|
5028
5045
|
$data: !0,
|
|
@@ -5035,9 +5052,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5035
5052
|
o || c && typeof c == "object" ? e.fail$data((0, t._)`!${(0, n.useFunc)(i, r.default)}(${a}, ${s})`) : e.fail((0, t._)`${c} !== ${a}`);
|
|
5036
5053
|
}
|
|
5037
5054
|
};
|
|
5038
|
-
})),
|
|
5055
|
+
})), ni = /* @__PURE__ */ M(((e) => {
|
|
5039
5056
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5040
|
-
var t = q(), n = J(), r =
|
|
5057
|
+
var t = q(), n = J(), r = $r();
|
|
5041
5058
|
e.default = {
|
|
5042
5059
|
keyword: "enum",
|
|
5043
5060
|
schemaType: "array",
|
|
@@ -5067,9 +5084,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5067
5084
|
}
|
|
5068
5085
|
}
|
|
5069
5086
|
};
|
|
5070
|
-
})),
|
|
5087
|
+
})), ri = /* @__PURE__ */ M(((e) => {
|
|
5071
5088
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5072
|
-
var t =
|
|
5089
|
+
var t = Gr(), n = Kr(), r = Jr(), i = Yr(), a = Xr(), o = Zr(), s = Qr(), c = ei(), l = ti(), u = ni();
|
|
5073
5090
|
e.default = [
|
|
5074
5091
|
t.default,
|
|
5075
5092
|
n.default,
|
|
@@ -5090,7 +5107,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5090
5107
|
l.default,
|
|
5091
5108
|
u.default
|
|
5092
5109
|
];
|
|
5093
|
-
})),
|
|
5110
|
+
})), ii = /* @__PURE__ */ M(((e) => {
|
|
5094
5111
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateAdditionalItems = void 0;
|
|
5095
5112
|
var t = q(), n = J(), r = {
|
|
5096
5113
|
keyword: "additionalItems",
|
|
@@ -5130,9 +5147,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5130
5147
|
}
|
|
5131
5148
|
}
|
|
5132
5149
|
e.validateAdditionalItems = i, e.default = r;
|
|
5133
|
-
})),
|
|
5150
|
+
})), ai = /* @__PURE__ */ M(((e) => {
|
|
5134
5151
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateTuple = void 0;
|
|
5135
|
-
var t = q(), n = J(), r =
|
|
5152
|
+
var t = q(), n = J(), r = yr(), i = {
|
|
5136
5153
|
keyword: "items",
|
|
5137
5154
|
type: "array",
|
|
5138
5155
|
schemaType: [
|
|
@@ -5167,9 +5184,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5167
5184
|
}
|
|
5168
5185
|
}
|
|
5169
5186
|
e.validateTuple = a, e.default = i;
|
|
5170
|
-
})),
|
|
5187
|
+
})), oi = /* @__PURE__ */ M(((e) => {
|
|
5171
5188
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5172
|
-
var t =
|
|
5189
|
+
var t = ai();
|
|
5173
5190
|
e.default = {
|
|
5174
5191
|
keyword: "prefixItems",
|
|
5175
5192
|
type: "array",
|
|
@@ -5177,9 +5194,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5177
5194
|
before: "uniqueItems",
|
|
5178
5195
|
code: (e) => (0, t.validateTuple)(e, "items")
|
|
5179
5196
|
};
|
|
5180
|
-
})),
|
|
5197
|
+
})), si = /* @__PURE__ */ M(((e) => {
|
|
5181
5198
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5182
|
-
var t = q(), n = J(), r =
|
|
5199
|
+
var t = q(), n = J(), r = yr(), i = ii();
|
|
5183
5200
|
e.default = {
|
|
5184
5201
|
keyword: "items",
|
|
5185
5202
|
type: "array",
|
|
@@ -5194,7 +5211,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5194
5211
|
o.items = !0, !(0, n.alwaysValidSchema)(o, t) && (s ? (0, i.validateAdditionalItems)(e, s) : e.ok((0, r.validateArray)(e)));
|
|
5195
5212
|
}
|
|
5196
5213
|
};
|
|
5197
|
-
})),
|
|
5214
|
+
})), ci = /* @__PURE__ */ M(((e) => {
|
|
5198
5215
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5199
5216
|
var t = q(), n = J();
|
|
5200
5217
|
e.default = {
|
|
@@ -5249,9 +5266,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5249
5266
|
}
|
|
5250
5267
|
}
|
|
5251
5268
|
};
|
|
5252
|
-
})),
|
|
5269
|
+
})), li = /* @__PURE__ */ M(((e) => {
|
|
5253
5270
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
|
|
5254
|
-
var t = q(), n = J(), r =
|
|
5271
|
+
var t = q(), n = J(), r = yr();
|
|
5255
5272
|
e.error = {
|
|
5256
5273
|
message: ({ params: { property: e, depsCount: n, deps: r } }) => {
|
|
5257
5274
|
let i = n === 1 ? "property" : "properties";
|
|
@@ -5310,7 +5327,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5310
5327
|
}, () => i.var(c, !0)), e.ok(c));
|
|
5311
5328
|
}
|
|
5312
5329
|
e.validateSchemaDeps = s, e.default = i;
|
|
5313
|
-
})),
|
|
5330
|
+
})), ui = /* @__PURE__ */ M(((e) => {
|
|
5314
5331
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5315
5332
|
var t = q(), n = J();
|
|
5316
5333
|
e.default = {
|
|
@@ -5338,9 +5355,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5338
5355
|
}), e.ok(s);
|
|
5339
5356
|
}
|
|
5340
5357
|
};
|
|
5341
|
-
})),
|
|
5358
|
+
})), di = /* @__PURE__ */ M(((e) => {
|
|
5342
5359
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5343
|
-
var t =
|
|
5360
|
+
var t = yr(), n = q(), r = fr(), i = J();
|
|
5344
5361
|
e.default = {
|
|
5345
5362
|
keyword: "additionalProperties",
|
|
5346
5363
|
type: ["object"],
|
|
@@ -5405,9 +5422,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5405
5422
|
}
|
|
5406
5423
|
}
|
|
5407
5424
|
};
|
|
5408
|
-
})),
|
|
5425
|
+
})), fi = /* @__PURE__ */ M(((e) => {
|
|
5409
5426
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5410
|
-
var t =
|
|
5427
|
+
var t = Tr(), n = yr(), r = J(), i = di();
|
|
5411
5428
|
e.default = {
|
|
5412
5429
|
keyword: "properties",
|
|
5413
5430
|
type: "object",
|
|
@@ -5434,9 +5451,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5434
5451
|
}
|
|
5435
5452
|
}
|
|
5436
5453
|
};
|
|
5437
|
-
})),
|
|
5454
|
+
})), pi = /* @__PURE__ */ M(((e) => {
|
|
5438
5455
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5439
|
-
var t =
|
|
5456
|
+
var t = yr(), n = q(), r = J(), i = J();
|
|
5440
5457
|
e.default = {
|
|
5441
5458
|
keyword: "patternProperties",
|
|
5442
5459
|
type: "object",
|
|
@@ -5469,7 +5486,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5469
5486
|
}
|
|
5470
5487
|
}
|
|
5471
5488
|
};
|
|
5472
|
-
})),
|
|
5489
|
+
})), mi = /* @__PURE__ */ M(((e) => {
|
|
5473
5490
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5474
5491
|
var t = J();
|
|
5475
5492
|
e.default = {
|
|
@@ -5492,15 +5509,15 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5492
5509
|
},
|
|
5493
5510
|
error: { message: "must NOT be valid" }
|
|
5494
5511
|
};
|
|
5495
|
-
})),
|
|
5512
|
+
})), hi = /* @__PURE__ */ M(((e) => {
|
|
5496
5513
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = {
|
|
5497
5514
|
keyword: "anyOf",
|
|
5498
5515
|
schemaType: "array",
|
|
5499
5516
|
trackErrors: !0,
|
|
5500
|
-
code:
|
|
5517
|
+
code: yr().validateUnion,
|
|
5501
5518
|
error: { message: "must match a schema in anyOf" }
|
|
5502
5519
|
};
|
|
5503
|
-
})),
|
|
5520
|
+
})), gi = /* @__PURE__ */ M(((e) => {
|
|
5504
5521
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5505
5522
|
var t = q(), n = J();
|
|
5506
5523
|
e.default = {
|
|
@@ -5532,7 +5549,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5532
5549
|
}
|
|
5533
5550
|
}
|
|
5534
5551
|
};
|
|
5535
|
-
})),
|
|
5552
|
+
})), _i = /* @__PURE__ */ M(((e) => {
|
|
5536
5553
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5537
5554
|
var t = J();
|
|
5538
5555
|
e.default = {
|
|
@@ -5553,7 +5570,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5553
5570
|
});
|
|
5554
5571
|
}
|
|
5555
5572
|
};
|
|
5556
|
-
})),
|
|
5573
|
+
})), vi = /* @__PURE__ */ M(((e) => {
|
|
5557
5574
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5558
5575
|
var t = q(), n = J(), r = {
|
|
5559
5576
|
keyword: "if",
|
|
@@ -5596,7 +5613,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5596
5613
|
return r !== void 0 && !(0, n.alwaysValidSchema)(e, r);
|
|
5597
5614
|
}
|
|
5598
5615
|
e.default = r;
|
|
5599
|
-
})),
|
|
5616
|
+
})), yi = /* @__PURE__ */ M(((e) => {
|
|
5600
5617
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5601
5618
|
var t = J();
|
|
5602
5619
|
e.default = {
|
|
@@ -5606,9 +5623,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5606
5623
|
n.if === void 0 && (0, t.checkStrictMode)(r, `"${e}" without "if" is ignored`);
|
|
5607
5624
|
}
|
|
5608
5625
|
};
|
|
5609
|
-
})),
|
|
5626
|
+
})), bi = /* @__PURE__ */ M(((e) => {
|
|
5610
5627
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5611
|
-
var t =
|
|
5628
|
+
var t = ii(), n = oi(), r = ai(), i = si(), a = ci(), o = li(), s = ui(), c = di(), l = fi(), u = pi(), d = mi(), f = hi(), p = gi(), m = _i(), h = vi(), g = yi();
|
|
5612
5629
|
function _(e = !1) {
|
|
5613
5630
|
let _ = [
|
|
5614
5631
|
d.default,
|
|
@@ -5626,7 +5643,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5626
5643
|
return e ? _.push(n.default, i.default) : _.push(t.default, r.default), _.push(a.default), _;
|
|
5627
5644
|
}
|
|
5628
5645
|
e.default = _;
|
|
5629
|
-
})),
|
|
5646
|
+
})), xi = /* @__PURE__ */ M(((e) => {
|
|
5630
5647
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5631
5648
|
var t = q();
|
|
5632
5649
|
e.default = {
|
|
@@ -5701,9 +5718,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5701
5718
|
}
|
|
5702
5719
|
}
|
|
5703
5720
|
};
|
|
5704
|
-
})), xi = /* @__PURE__ */ M(((e) => {
|
|
5705
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = [bi().default];
|
|
5706
5721
|
})), Si = /* @__PURE__ */ M(((e) => {
|
|
5722
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = [xi().default];
|
|
5723
|
+
})), Ci = /* @__PURE__ */ M(((e) => {
|
|
5707
5724
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.contentVocabulary = e.metadataVocabulary = void 0, e.metadataVocabulary = [
|
|
5708
5725
|
"title",
|
|
5709
5726
|
"description",
|
|
@@ -5717,9 +5734,9 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5717
5734
|
"contentEncoding",
|
|
5718
5735
|
"contentSchema"
|
|
5719
5736
|
];
|
|
5720
|
-
})),
|
|
5737
|
+
})), wi = /* @__PURE__ */ M(((e) => {
|
|
5721
5738
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5722
|
-
var t =
|
|
5739
|
+
var t = Wr(), n = ri(), r = bi(), i = Si(), a = Ci();
|
|
5723
5740
|
e.default = [
|
|
5724
5741
|
t.default,
|
|
5725
5742
|
n.default,
|
|
@@ -5728,15 +5745,15 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5728
5745
|
a.metadataVocabulary,
|
|
5729
5746
|
a.contentVocabulary
|
|
5730
5747
|
];
|
|
5731
|
-
})),
|
|
5748
|
+
})), Ti = /* @__PURE__ */ M(((e) => {
|
|
5732
5749
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.DiscrError = void 0;
|
|
5733
5750
|
var t;
|
|
5734
5751
|
(function(e) {
|
|
5735
5752
|
e.Tag = "tag", e.Mapping = "mapping";
|
|
5736
5753
|
})(t || (e.DiscrError = t = {}));
|
|
5737
|
-
})),
|
|
5754
|
+
})), Ei = /* @__PURE__ */ M(((e) => {
|
|
5738
5755
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5739
|
-
var t = q(), n =
|
|
5756
|
+
var t = q(), n = Ti(), r = Or(), i = Dr(), a = J();
|
|
5740
5757
|
e.default = {
|
|
5741
5758
|
keyword: "discriminator",
|
|
5742
5759
|
type: "object",
|
|
@@ -5804,16 +5821,16 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5804
5821
|
}
|
|
5805
5822
|
}
|
|
5806
5823
|
};
|
|
5807
|
-
})),
|
|
5808
|
-
$id: () =>
|
|
5809
|
-
$schema: () =>
|
|
5810
|
-
default: () =>
|
|
5811
|
-
definitions: () =>
|
|
5812
|
-
properties: () =>
|
|
5813
|
-
title: () =>
|
|
5814
|
-
type: () =>
|
|
5815
|
-
}),
|
|
5816
|
-
|
|
5824
|
+
})), Di = /* @__PURE__ */ N({
|
|
5825
|
+
$id: () => ki,
|
|
5826
|
+
$schema: () => Oi,
|
|
5827
|
+
default: () => Pi,
|
|
5828
|
+
definitions: () => ji,
|
|
5829
|
+
properties: () => Ni,
|
|
5830
|
+
title: () => Ai,
|
|
5831
|
+
type: () => Mi
|
|
5832
|
+
}), Oi, ki, Ai, ji, Mi, Ni, Pi, Fi = j((() => {
|
|
5833
|
+
Oi = "http://json-schema.org/draft-07/schema#", ki = "http://json-schema.org/draft-07/schema#", Ai = "Core schema meta-schema", ji = {
|
|
5817
5834
|
schemaArray: {
|
|
5818
5835
|
type: "array",
|
|
5819
5836
|
minItems: 1,
|
|
@@ -5839,7 +5856,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5839
5856
|
uniqueItems: !0,
|
|
5840
5857
|
default: []
|
|
5841
5858
|
}
|
|
5842
|
-
},
|
|
5859
|
+
}, Mi = ["object", "boolean"], Ni = {
|
|
5843
5860
|
$id: {
|
|
5844
5861
|
type: "string",
|
|
5845
5862
|
format: "uri-reference"
|
|
@@ -5938,18 +5955,18 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5938
5955
|
anyOf: { $ref: "#/definitions/schemaArray" },
|
|
5939
5956
|
oneOf: { $ref: "#/definitions/schemaArray" },
|
|
5940
5957
|
not: { $ref: "#" }
|
|
5941
|
-
},
|
|
5942
|
-
$schema:
|
|
5943
|
-
$id:
|
|
5944
|
-
title:
|
|
5945
|
-
definitions:
|
|
5946
|
-
type:
|
|
5947
|
-
properties:
|
|
5958
|
+
}, Pi = {
|
|
5959
|
+
$schema: Oi,
|
|
5960
|
+
$id: ki,
|
|
5961
|
+
title: Ai,
|
|
5962
|
+
definitions: ji,
|
|
5963
|
+
type: Mi,
|
|
5964
|
+
properties: Ni,
|
|
5948
5965
|
default: !0
|
|
5949
5966
|
};
|
|
5950
|
-
})),
|
|
5967
|
+
})), Ii = /* @__PURE__ */ te((/* @__PURE__ */ M(((e, t) => {
|
|
5951
5968
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.MissingRefError = e.ValidationError = e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = e.Ajv = void 0;
|
|
5952
|
-
var n =
|
|
5969
|
+
var n = Vr(), r = wi(), i = Ei(), a = (Fi(), P(Di).default), o = ["/properties"], s = "http://json-schema.org/draft-07/schema", c = class extends n.default {
|
|
5953
5970
|
_addVocabularies() {
|
|
5954
5971
|
super._addVocabularies(), r.default.forEach((e) => this.addVocabulary(e)), this.opts.discriminator && this.addKeyword(i.default);
|
|
5955
5972
|
}
|
|
@@ -5963,7 +5980,7 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
5963
5980
|
}
|
|
5964
5981
|
};
|
|
5965
5982
|
e.Ajv = c, t.exports = e = c, t.exports.Ajv = c, Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
5966
|
-
var l =
|
|
5983
|
+
var l = Tr();
|
|
5967
5984
|
Object.defineProperty(e, "KeywordCxt", {
|
|
5968
5985
|
enumerable: !0,
|
|
5969
5986
|
get: function() {
|
|
@@ -6002,21 +6019,21 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
6002
6019
|
return u.CodeGen;
|
|
6003
6020
|
}
|
|
6004
6021
|
});
|
|
6005
|
-
var d =
|
|
6022
|
+
var d = Er();
|
|
6006
6023
|
Object.defineProperty(e, "ValidationError", {
|
|
6007
6024
|
enumerable: !0,
|
|
6008
6025
|
get: function() {
|
|
6009
6026
|
return d.default;
|
|
6010
6027
|
}
|
|
6011
6028
|
});
|
|
6012
|
-
var f =
|
|
6029
|
+
var f = Dr();
|
|
6013
6030
|
Object.defineProperty(e, "MissingRefError", {
|
|
6014
6031
|
enumerable: !0,
|
|
6015
6032
|
get: function() {
|
|
6016
6033
|
return f.default;
|
|
6017
6034
|
}
|
|
6018
6035
|
});
|
|
6019
|
-
})))(), 1),
|
|
6036
|
+
})))(), 1), Li = {
|
|
6020
6037
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
6021
6038
|
$id: "https://kmap.dev/schemas/semantic-chart-config/1.0.0",
|
|
6022
6039
|
title: "SemanticChartConfig",
|
|
@@ -6449,16 +6466,16 @@ var lr = /* @__PURE__ */ M(((e) => {
|
|
|
6449
6466
|
}
|
|
6450
6467
|
}
|
|
6451
6468
|
}
|
|
6452
|
-
},
|
|
6469
|
+
}, Ri = [
|
|
6453
6470
|
"__proto__",
|
|
6454
6471
|
"constructor",
|
|
6455
6472
|
"prototype"
|
|
6456
|
-
],
|
|
6473
|
+
], zi = /^(#[0-9a-fA-F]{3,8}|rgb\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*\)|rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*[\d.]+\s*\))$/, Bi = {
|
|
6457
6474
|
SH: /^(600|601|603|605|688)\d{3}$/,
|
|
6458
6475
|
SZ: /^(000|001|002|003|300|301)\d{3}$/,
|
|
6459
6476
|
BJ: /^(83|87|43|82)\d{4}$/
|
|
6460
6477
|
};
|
|
6461
|
-
function
|
|
6478
|
+
function Vi(e) {
|
|
6462
6479
|
return {
|
|
6463
6480
|
"5min": 30,
|
|
6464
6481
|
"15min": 60,
|
|
@@ -6469,17 +6486,17 @@ function Bi(e) {
|
|
|
6469
6486
|
monthly: 365 * 10
|
|
6470
6487
|
}[e] ?? 365;
|
|
6471
6488
|
}
|
|
6472
|
-
var
|
|
6489
|
+
var Hi = (typeof document < "u" ? document.createElement("canvas") : null)?.getContext("2d") ?? null, Ui = class e {
|
|
6473
6490
|
ajv;
|
|
6474
6491
|
limits;
|
|
6475
6492
|
constructor() {
|
|
6476
|
-
this.ajv = new
|
|
6493
|
+
this.ajv = new Ii.default({
|
|
6477
6494
|
allErrors: !0,
|
|
6478
6495
|
allowUnionTypes: !0
|
|
6479
6496
|
}), this.ajv.addFormat("date", {
|
|
6480
6497
|
type: "string",
|
|
6481
6498
|
validate: (e) => /^\d{4}-\d{2}-\d{2}$/.test(e)
|
|
6482
|
-
}), this.ajv.addSchema(
|
|
6499
|
+
}), this.ajv.addSchema(Li), this.limits = {
|
|
6483
6500
|
maxJsonSize: 64 * 1024,
|
|
6484
6501
|
maxIndicators: 10,
|
|
6485
6502
|
maxCustomMarkers: 100
|
|
@@ -6522,7 +6539,7 @@ var Vi = (typeof document < "u" ? document.createElement("canvas") : null)?.getC
|
|
|
6522
6539
|
checkPrototypePollution(e, t = "") {
|
|
6523
6540
|
if (!e || typeof e != "object") return { valid: !0 };
|
|
6524
6541
|
let n = [];
|
|
6525
|
-
for (let r of Object.keys(e))
|
|
6542
|
+
for (let r of Object.keys(e)) Ri.includes(r) && n.push(`Forbidden key "${r}" found at ${t}`);
|
|
6526
6543
|
return n.length > 0 ? {
|
|
6527
6544
|
valid: !1,
|
|
6528
6545
|
errors: n
|
|
@@ -6534,7 +6551,7 @@ var Vi = (typeof document < "u" ? document.createElement("canvas") : null)?.getC
|
|
|
6534
6551
|
valid: !1,
|
|
6535
6552
|
errors: t
|
|
6536
6553
|
};
|
|
6537
|
-
let i =
|
|
6554
|
+
let i = Vi(e.period), a = Math.ceil((r.getTime() - n.getTime()) / (1e3 * 60 * 60 * 24));
|
|
6538
6555
|
return a > i && t.push(`Date range exceeds maximum for period "${e.period}" (max ${i} days, got ${a})`), a < 0 && t.push("endDate must be after startDate"), t.length > 0 ? {
|
|
6539
6556
|
valid: !1,
|
|
6540
6557
|
errors: t
|
|
@@ -6543,11 +6560,11 @@ var Vi = (typeof document < "u" ? document.createElement("canvas") : null)?.getC
|
|
|
6543
6560
|
checkSymbol(e) {
|
|
6544
6561
|
let { symbol: t, exchange: n } = e;
|
|
6545
6562
|
if (n) {
|
|
6546
|
-
if (!
|
|
6563
|
+
if (!Bi[n].test(t)) return {
|
|
6547
6564
|
valid: !1,
|
|
6548
6565
|
errors: [`Invalid symbol "${t}" for exchange "${n}"`]
|
|
6549
6566
|
};
|
|
6550
|
-
} else if (!Object.values(
|
|
6567
|
+
} else if (!Object.values(Bi).some((e) => e.test(t))) return {
|
|
6551
6568
|
valid: !1,
|
|
6552
6569
|
errors: [`Invalid symbol format: "${t}"`]
|
|
6553
6570
|
};
|
|
@@ -6561,11 +6578,11 @@ var Vi = (typeof document < "u" ? document.createElement("canvas") : null)?.getC
|
|
|
6561
6578
|
];
|
|
6562
6579
|
for (let i of r) {
|
|
6563
6580
|
let r = e[i];
|
|
6564
|
-
typeof r == "string" && !
|
|
6581
|
+
typeof r == "string" && !zi.test(r) && n.push(`Invalid ${i} in marker "${t}": ${r}`);
|
|
6565
6582
|
}
|
|
6566
|
-
if (
|
|
6583
|
+
if (Hi) for (let i of r) {
|
|
6567
6584
|
let r = e[i];
|
|
6568
|
-
typeof r == "string" && (
|
|
6585
|
+
typeof r == "string" && (Hi.fillStyle = "#000000", Hi.fillStyle = r, Hi.fillStyle === "#000000" && r !== "#000000" && !r.startsWith("#000") && n.push(`Potentially unsafe ${i} in marker "${t}": ${r}`));
|
|
6569
6586
|
}
|
|
6570
6587
|
return n;
|
|
6571
6588
|
}
|
|
@@ -6581,12 +6598,12 @@ var Vi = (typeof document < "u" ? document.createElement("canvas") : null)?.getC
|
|
|
6581
6598
|
}
|
|
6582
6599
|
return isNaN(a.getTime()) && r.push(`Invalid date value in marker "${n}": ${t}`), r;
|
|
6583
6600
|
}
|
|
6584
|
-
},
|
|
6601
|
+
}, Wi = class {
|
|
6585
6602
|
chart;
|
|
6586
6603
|
validator;
|
|
6587
6604
|
events;
|
|
6588
6605
|
constructor(e) {
|
|
6589
|
-
this.chart = e, this.validator = new
|
|
6606
|
+
this.chart = e, this.validator = new Ui(), this.events = new F();
|
|
6590
6607
|
}
|
|
6591
6608
|
async applyConfig(e) {
|
|
6592
6609
|
let t = this.validator.validate(e);
|
|
@@ -6617,7 +6634,7 @@ var Vi = (typeof document < "u" ? document.createElement("canvas") : null)?.getC
|
|
|
6617
6634
|
}
|
|
6618
6635
|
async doApplyConfig(e) {
|
|
6619
6636
|
console.log("[Semantic] doApplyConfig start, data config:", e.data);
|
|
6620
|
-
let t = await
|
|
6637
|
+
let t = await lr(e.data.source, {
|
|
6621
6638
|
symbol: e.data.symbol,
|
|
6622
6639
|
startDate: e.data.startDate,
|
|
6623
6640
|
endDate: e.data.endDate,
|
|
@@ -6690,7 +6707,7 @@ var Vi = (typeof document < "u" ? document.createElement("canvas") : null)?.getC
|
|
|
6690
6707
|
let n = e.map((e) => ({
|
|
6691
6708
|
id: e.id,
|
|
6692
6709
|
date: e.date,
|
|
6693
|
-
timestamp:
|
|
6710
|
+
timestamp: Gi(e.date, t || "daily"),
|
|
6694
6711
|
shape: e.shape,
|
|
6695
6712
|
groupKey: e.groupKey,
|
|
6696
6713
|
offset: e.offset,
|
|
@@ -6704,7 +6721,7 @@ var Vi = (typeof document < "u" ? document.createElement("canvas") : null)?.getC
|
|
|
6704
6721
|
e.autoScrollToRight;
|
|
6705
6722
|
}
|
|
6706
6723
|
};
|
|
6707
|
-
function
|
|
6724
|
+
function Gi(e, t) {
|
|
6708
6725
|
if (e.includes(" ")) {
|
|
6709
6726
|
let [t, n] = e.split(" "), r = t.split("-").map(Number), i = r[0], a = r[1], o = r[2], s = n.split(":").map(Number), c = s[0], l = s[1];
|
|
6710
6727
|
return Date.UTC(i, a - 1, o, c - 8, l, 0, 0);
|
|
@@ -6715,7 +6732,7 @@ function Wi(e, t) {
|
|
|
6715
6732
|
}
|
|
6716
6733
|
//#endregion
|
|
6717
6734
|
//#region src/semantic/drawShape.ts
|
|
6718
|
-
var
|
|
6735
|
+
var Ki = {
|
|
6719
6736
|
arrow_up: 16,
|
|
6720
6737
|
arrow_down: 16,
|
|
6721
6738
|
flag: 14,
|
|
@@ -6723,55 +6740,55 @@ var Gi = {
|
|
|
6723
6740
|
rectangle: 14,
|
|
6724
6741
|
diamond: 12
|
|
6725
6742
|
};
|
|
6726
|
-
function
|
|
6727
|
-
let o = a.fillColor || "#000000", s = a.strokeColor || o, c = i ||
|
|
6743
|
+
function qi(e, t, n, r, i, a) {
|
|
6744
|
+
let o = a.fillColor || "#000000", s = a.strokeColor || o, c = i || Ki[t];
|
|
6728
6745
|
switch (e.fillStyle = o, e.strokeStyle = s, e.lineWidth = a.lineWidth || 1, a.opacity !== void 0 && (e.globalAlpha = a.opacity), t) {
|
|
6729
6746
|
case "arrow_up":
|
|
6730
|
-
|
|
6747
|
+
Qi(e, n, r, c);
|
|
6731
6748
|
break;
|
|
6732
6749
|
case "arrow_down":
|
|
6733
|
-
|
|
6750
|
+
$i(e, n, r, c);
|
|
6734
6751
|
break;
|
|
6735
6752
|
case "circle":
|
|
6736
|
-
|
|
6753
|
+
ea(e, n, r, c);
|
|
6737
6754
|
break;
|
|
6738
6755
|
case "rectangle":
|
|
6739
|
-
|
|
6756
|
+
ta(e, n, r, c);
|
|
6740
6757
|
break;
|
|
6741
6758
|
case "diamond":
|
|
6742
|
-
|
|
6759
|
+
na(e, n, r, c);
|
|
6743
6760
|
break;
|
|
6744
6761
|
case "flag":
|
|
6745
|
-
|
|
6762
|
+
ra(e, n, r, c);
|
|
6746
6763
|
break;
|
|
6747
6764
|
}
|
|
6748
6765
|
e.globalAlpha = 1;
|
|
6749
6766
|
}
|
|
6750
|
-
var
|
|
6751
|
-
function
|
|
6767
|
+
var Ji = 2.5, Yi = 4;
|
|
6768
|
+
function Xi(e, t, n, r, i, a, o = !1) {
|
|
6752
6769
|
let s = t.fontSize || 12, c = a.textColor || "#333333", l = i / 2;
|
|
6753
6770
|
e.font = `${s}px sans-serif`, e.fillStyle = c, e.textBaseline = "middle";
|
|
6754
|
-
let u = i *
|
|
6771
|
+
let u = i * Ji, d = Zi(e, t.text, u), f = e.measureText(d).width, p = n, m = r;
|
|
6755
6772
|
switch (t.position) {
|
|
6756
6773
|
case "left":
|
|
6757
|
-
p = n - l - f / 2 -
|
|
6774
|
+
p = n - l - f / 2 - Yi;
|
|
6758
6775
|
break;
|
|
6759
6776
|
case "right":
|
|
6760
|
-
p = n + l + f / 2 +
|
|
6777
|
+
p = n + l + f / 2 + Yi;
|
|
6761
6778
|
break;
|
|
6762
6779
|
case "top":
|
|
6763
|
-
m = r - l - s / 2 -
|
|
6780
|
+
m = r - l - s / 2 - Yi;
|
|
6764
6781
|
break;
|
|
6765
6782
|
case "bottom":
|
|
6766
|
-
m = r + l + s / 2 +
|
|
6783
|
+
m = r + l + s / 2 + Yi;
|
|
6767
6784
|
break;
|
|
6768
6785
|
default:
|
|
6769
|
-
m = o ? r - l - s / 2 -
|
|
6786
|
+
m = o ? r - l - s / 2 - Yi : r + l + s / 2 + Yi;
|
|
6770
6787
|
break;
|
|
6771
6788
|
}
|
|
6772
6789
|
t.offset && (p += t.offset.x || 0, m += t.offset.y || 0), e.textAlign = t.align || "center", e.fillText(d, p, m);
|
|
6773
6790
|
}
|
|
6774
|
-
function
|
|
6791
|
+
function Zi(e, t, n) {
|
|
6775
6792
|
if (e.measureText(t).width <= n) return t;
|
|
6776
6793
|
let r = e.measureText("…").width, i = 0, a = t.length;
|
|
6777
6794
|
for (; i < a;) {
|
|
@@ -6780,25 +6797,25 @@ function Xi(e, t, n) {
|
|
|
6780
6797
|
}
|
|
6781
6798
|
return t.slice(0, i) + "…";
|
|
6782
6799
|
}
|
|
6783
|
-
function
|
|
6800
|
+
function Qi(e, t, n, r) {
|
|
6784
6801
|
e.beginPath(), e.moveTo(t, n - r / 2), e.lineTo(t - r / 2, n + r / 2), e.lineTo(t + r / 2, n + r / 2), e.closePath(), e.fill();
|
|
6785
6802
|
}
|
|
6786
|
-
function
|
|
6803
|
+
function $i(e, t, n, r) {
|
|
6787
6804
|
e.beginPath(), e.moveTo(t, n + r / 2), e.lineTo(t - r / 2, n - r / 2), e.lineTo(t + r / 2, n - r / 2), e.closePath(), e.fill();
|
|
6788
6805
|
}
|
|
6789
|
-
function
|
|
6806
|
+
function ea(e, t, n, r) {
|
|
6790
6807
|
e.beginPath(), e.arc(t, n, r / 2, 0, Math.PI * 2), e.fill();
|
|
6791
6808
|
}
|
|
6792
|
-
function
|
|
6809
|
+
function ta(e, t, n, r) {
|
|
6793
6810
|
e.fillRect(t - r / 2, n - r / 2, r, r);
|
|
6794
6811
|
}
|
|
6795
|
-
function
|
|
6812
|
+
function na(e, t, n, r) {
|
|
6796
6813
|
e.beginPath(), e.moveTo(t, n - r / 2), e.lineTo(t + r / 2, n), e.lineTo(t, n + r / 2), e.lineTo(t - r / 2, n), e.closePath(), e.fill();
|
|
6797
6814
|
}
|
|
6798
|
-
function
|
|
6815
|
+
function ra(e, t, n, r) {
|
|
6799
6816
|
e.beginPath(), e.moveTo(t - r / 4, n + r / 2), e.lineTo(t - r / 4, n - r / 2), e.stroke(), e.beginPath(), e.moveTo(t - r / 4, n - r / 2), e.lineTo(t + r / 2, n - r / 4), e.lineTo(t - r / 4, n), e.closePath(), e.fill();
|
|
6800
6817
|
}
|
|
6801
|
-
function
|
|
6818
|
+
function ia(e, t, n, r, i, a) {
|
|
6802
6819
|
let o = a / 2;
|
|
6803
6820
|
switch (n) {
|
|
6804
6821
|
case "circle":
|
|
@@ -6809,10 +6826,10 @@ function ra(e, t, n, r, i, a) {
|
|
|
6809
6826
|
}
|
|
6810
6827
|
//#endregion
|
|
6811
6828
|
//#region src/plugin/types.ts
|
|
6812
|
-
var
|
|
6829
|
+
var aa = /* @__PURE__ */ function(e) {
|
|
6813
6830
|
return e.Registered = "registered", e.Installed = "installed", e.Error = "error", e;
|
|
6814
6831
|
}({});
|
|
6815
|
-
function
|
|
6832
|
+
function oa(e) {
|
|
6816
6833
|
return {
|
|
6817
6834
|
id: e.id,
|
|
6818
6835
|
top: e.top,
|
|
@@ -6821,12 +6838,13 @@ function aa(e) {
|
|
|
6821
6838
|
priceToY: (t) => e.yAxis.priceToY(t),
|
|
6822
6839
|
yToPrice: (t) => e.yAxis.yToPrice(t),
|
|
6823
6840
|
getPaddingTop: () => e.yAxis.getPaddingTop(),
|
|
6824
|
-
getPaddingBottom: () => e.yAxis.getPaddingBottom()
|
|
6841
|
+
getPaddingBottom: () => e.yAxis.getPaddingBottom(),
|
|
6842
|
+
getPriceOffset: () => e.yAxis.getPriceOffset()
|
|
6825
6843
|
},
|
|
6826
6844
|
priceRange: e.priceRange
|
|
6827
6845
|
};
|
|
6828
6846
|
}
|
|
6829
|
-
var
|
|
6847
|
+
var sa = Symbol("global-pane"), Y = {
|
|
6830
6848
|
SYSTEM_YAXIS: -20,
|
|
6831
6849
|
SYSTEM_XAXIS: -20,
|
|
6832
6850
|
BACKGROUND: 0,
|
|
@@ -6837,7 +6855,7 @@ var oa = Symbol("global-pane"), Y = {
|
|
|
6837
6855
|
FOREGROUND: 100,
|
|
6838
6856
|
SYSTEM_BORDER: 120,
|
|
6839
6857
|
SYSTEM_CROSSHAIR: 150
|
|
6840
|
-
},
|
|
6858
|
+
}, ca = class {
|
|
6841
6859
|
plugins = /* @__PURE__ */ new Map();
|
|
6842
6860
|
register(e, t) {
|
|
6843
6861
|
if (this.plugins.has(e.name)) throw Error(`Plugin "${e.name}" is already registered`);
|
|
@@ -6877,7 +6895,7 @@ var oa = Symbol("global-pane"), Y = {
|
|
|
6877
6895
|
clear() {
|
|
6878
6896
|
this.plugins.clear();
|
|
6879
6897
|
}
|
|
6880
|
-
},
|
|
6898
|
+
}, la = class {
|
|
6881
6899
|
hooks = /* @__PURE__ */ new Map();
|
|
6882
6900
|
tap(e, t, n = 0) {
|
|
6883
6901
|
this.hooks.has(e) || this.hooks.set(e, []);
|
|
@@ -6925,7 +6943,7 @@ var oa = Symbol("global-pane"), Y = {
|
|
|
6925
6943
|
hookCount(e) {
|
|
6926
6944
|
return this.hooks.get(e)?.length ?? 0;
|
|
6927
6945
|
}
|
|
6928
|
-
},
|
|
6946
|
+
}, ua = class {
|
|
6929
6947
|
configs = /* @__PURE__ */ new Map();
|
|
6930
6948
|
defaults = /* @__PURE__ */ new Map();
|
|
6931
6949
|
registerDefaults(e, t) {
|
|
@@ -6955,14 +6973,14 @@ var oa = Symbol("global-pane"), Y = {
|
|
|
6955
6973
|
clear(e) {
|
|
6956
6974
|
e ? this.configs.delete(e) : this.configs.clear();
|
|
6957
6975
|
}
|
|
6958
|
-
},
|
|
6976
|
+
}, da = class {
|
|
6959
6977
|
registry;
|
|
6960
6978
|
eventBus;
|
|
6961
6979
|
hookSystem;
|
|
6962
6980
|
configManager;
|
|
6963
6981
|
isDestroyed = !1;
|
|
6964
6982
|
constructor() {
|
|
6965
|
-
this.registry = new
|
|
6983
|
+
this.registry = new ca(), this.eventBus = new F(), this.hookSystem = new la(), this.configManager = new ua();
|
|
6966
6984
|
}
|
|
6967
6985
|
events = {
|
|
6968
6986
|
on: (e, t) => {
|
|
@@ -7046,12 +7064,12 @@ var oa = Symbol("global-pane"), Y = {
|
|
|
7046
7064
|
if (this.isDestroyed) throw Error("PluginHost has been destroyed");
|
|
7047
7065
|
}
|
|
7048
7066
|
};
|
|
7049
|
-
function
|
|
7050
|
-
return new
|
|
7067
|
+
function fa() {
|
|
7068
|
+
return new da();
|
|
7051
7069
|
}
|
|
7052
7070
|
//#endregion
|
|
7053
7071
|
//#region src/plugin/rendererPluginManager.ts
|
|
7054
|
-
var
|
|
7072
|
+
var pa = Symbol("renderer:global-cache"), ma = class {
|
|
7055
7073
|
plugins = /* @__PURE__ */ new Map();
|
|
7056
7074
|
pluginHost = null;
|
|
7057
7075
|
enabledState = /* @__PURE__ */ new Map();
|
|
@@ -7121,21 +7139,21 @@ var fa = Symbol("renderer:global-cache"), pa = class {
|
|
|
7121
7139
|
if (!this.cacheInvalid) return;
|
|
7122
7140
|
this.groupCache.clear(), this.mergedCache.clear();
|
|
7123
7141
|
for (let e of this.plugins.values()) {
|
|
7124
|
-
let t = typeof e.paneId == "symbol" ?
|
|
7142
|
+
let t = typeof e.paneId == "symbol" ? pa : e.paneId;
|
|
7125
7143
|
this.groupCache.has(t) || this.groupCache.set(t, []), this.groupCache.get(t).push(e);
|
|
7126
7144
|
}
|
|
7127
7145
|
for (let [, e] of this.groupCache) e.sort((e, t) => e.priority - t.priority);
|
|
7128
|
-
let e = this.groupCache.get(
|
|
7146
|
+
let e = this.groupCache.get(pa) ?? [];
|
|
7129
7147
|
for (let t of this.knownPaneIds) {
|
|
7130
7148
|
let n = this.groupCache.get(t) ?? [], r = this.mergeSorted(n, e);
|
|
7131
7149
|
this.mergedCache.set(t, r);
|
|
7132
7150
|
}
|
|
7133
|
-
this.mergedCache.set(
|
|
7151
|
+
this.mergedCache.set(pa, [...e]), this.cacheInvalid = !1;
|
|
7134
7152
|
}
|
|
7135
7153
|
getRenderers(e) {
|
|
7136
7154
|
this.rebuildCache();
|
|
7137
7155
|
let t = this.mergedCache.get(e);
|
|
7138
|
-
return t || (t = this.mergedCache.get(
|
|
7156
|
+
return t || (t = this.mergedCache.get(pa) ?? [], this.mergedCache.set(e, t)), t.filter((e) => {
|
|
7139
7157
|
if (e.isSystem) return !1;
|
|
7140
7158
|
let t = this.enabledState.get(e.name);
|
|
7141
7159
|
return t === void 0 ? e.enabled !== !1 : t;
|
|
@@ -7213,15 +7231,15 @@ var fa = Symbol("renderer:global-cache"), pa = class {
|
|
|
7213
7231
|
console.error(`[RendererPlugin] ${e.name} onResize error:`, t);
|
|
7214
7232
|
}
|
|
7215
7233
|
}
|
|
7216
|
-
},
|
|
7217
|
-
function
|
|
7234
|
+
}, ha = 1.2, ga = 24, _a = 6;
|
|
7235
|
+
function va(e) {
|
|
7218
7236
|
switch (e) {
|
|
7219
7237
|
case "arrow_up":
|
|
7220
7238
|
case "flag": return !0;
|
|
7221
7239
|
default: return !1;
|
|
7222
7240
|
}
|
|
7223
7241
|
}
|
|
7224
|
-
function
|
|
7242
|
+
function ya() {
|
|
7225
7243
|
return {
|
|
7226
7244
|
name: "customMarkers",
|
|
7227
7245
|
version: "1.0.0",
|
|
@@ -7238,25 +7256,25 @@ function va() {
|
|
|
7238
7256
|
if (u.length && n.id === "main") {
|
|
7239
7257
|
t.save(), t.translate(-a, 0);
|
|
7240
7258
|
for (let e of l) {
|
|
7241
|
-
let r =
|
|
7259
|
+
let r = xa(u, e.timestamp);
|
|
7242
7260
|
if (r === -1 || r < i.start || r >= i.end) continue;
|
|
7243
7261
|
let l = r - i.start;
|
|
7244
7262
|
if (l < 0 || l >= s.length) continue;
|
|
7245
|
-
let d = s[l] + o / 2, f = u[r], p = e.style?.size, m =
|
|
7263
|
+
let d = s[l] + o / 2, f = u[r], p = e.style?.size, m = ba(o, p), h = (e.offset?.y ?? 0) < 0 ? !0 : (e.offset?.y ?? 0) > 0 ? !1 : va(e.shape), g;
|
|
7246
7264
|
g = h ? n.yAxis.priceToY(f.high) - m / 2 - 4 + (e.offset?.y ?? 0) : n.yAxis.priceToY(f.low) + m / 2 + 4 + (e.offset?.y ?? 0);
|
|
7247
7265
|
let _ = d + (e.offset?.x ?? 0), v = g;
|
|
7248
|
-
|
|
7266
|
+
qi(t, e.shape, _, v, m, e.style || {}), e.label && Xi(t, e.label, _, v, m, e.style || {}, h), c.setCustomMarkerPosition(e.id, _ - a, v, m, e.shape);
|
|
7249
7267
|
}
|
|
7250
7268
|
t.restore();
|
|
7251
7269
|
}
|
|
7252
7270
|
}
|
|
7253
7271
|
};
|
|
7254
7272
|
}
|
|
7255
|
-
function ya(e, t) {
|
|
7256
|
-
let n = e * ma;
|
|
7257
|
-
return Math.max(ga, Math.min(n, t ?? ha));
|
|
7258
|
-
}
|
|
7259
7273
|
function ba(e, t) {
|
|
7274
|
+
let n = e * ha;
|
|
7275
|
+
return Math.max(_a, Math.min(n, t ?? ga));
|
|
7276
|
+
}
|
|
7277
|
+
function xa(e, t) {
|
|
7260
7278
|
let n = 0, r = e.length - 1;
|
|
7261
7279
|
for (; n <= r;) {
|
|
7262
7280
|
let i = Math.floor((n + r) / 2), a = e[i]?.timestamp;
|
|
@@ -7268,7 +7286,7 @@ function ba(e, t) {
|
|
|
7268
7286
|
}
|
|
7269
7287
|
//#endregion
|
|
7270
7288
|
//#region src/utils/dateFormat.ts
|
|
7271
|
-
function
|
|
7289
|
+
function Sa(e) {
|
|
7272
7290
|
let t = new Intl.DateTimeFormat("zh-CN", {
|
|
7273
7291
|
timeZone: "Asia/Shanghai",
|
|
7274
7292
|
year: "numeric",
|
|
@@ -7277,7 +7295,7 @@ function xa(e) {
|
|
|
7277
7295
|
}).formatToParts(new Date(e)).reduce((e, t) => (t.type !== "literal" && (e[t.type] = t.value), e), {});
|
|
7278
7296
|
return `${t.year}-${t.month}-${t.day}`;
|
|
7279
7297
|
}
|
|
7280
|
-
function
|
|
7298
|
+
function Ca(e) {
|
|
7281
7299
|
let t = new Date(e), n = t.getFullYear(), r = t.getMonth() + 1;
|
|
7282
7300
|
return r === 1 ? {
|
|
7283
7301
|
text: String(n),
|
|
@@ -7287,25 +7305,25 @@ function Sa(e) {
|
|
|
7287
7305
|
isYear: !1
|
|
7288
7306
|
};
|
|
7289
7307
|
}
|
|
7290
|
-
function
|
|
7308
|
+
function wa(e) {
|
|
7291
7309
|
let t = new Date(e);
|
|
7292
7310
|
return `${t.getFullYear()}-${t.getMonth()}`;
|
|
7293
7311
|
}
|
|
7294
|
-
var
|
|
7295
|
-
function
|
|
7312
|
+
var Ta = Sa, Ea = Sa;
|
|
7313
|
+
function Da(e) {
|
|
7296
7314
|
if (e.length === 0) return [];
|
|
7297
|
-
let t = [0], n =
|
|
7315
|
+
let t = [0], n = wa(e[0].timestamp);
|
|
7298
7316
|
for (let r = 1; r < e.length; r++) {
|
|
7299
7317
|
let i = e[r];
|
|
7300
7318
|
if (!i) continue;
|
|
7301
|
-
let a =
|
|
7319
|
+
let a = wa(i.timestamp);
|
|
7302
7320
|
a !== n && (t.push(r), n = a);
|
|
7303
7321
|
}
|
|
7304
7322
|
return t;
|
|
7305
7323
|
}
|
|
7306
7324
|
//#endregion
|
|
7307
7325
|
//#region src/core/theme/colors.ts
|
|
7308
|
-
var
|
|
7326
|
+
var Oa = {
|
|
7309
7327
|
PRIMARY: "hsl(210, 9%, 31%)",
|
|
7310
7328
|
SECONDARY: "hsl(210, 9%, 35%)",
|
|
7311
7329
|
TERTIARY: "hsl(210, 8%, 50%)",
|
|
@@ -7320,7 +7338,7 @@ var Da = {
|
|
|
7320
7338
|
DOWN_TICK: "hsl(150, 30%, 60%)",
|
|
7321
7339
|
NEUTRAL: "rgba(0, 0, 0, 0.78)",
|
|
7322
7340
|
LAST_PRICE: "rgb(183, 22, 22)"
|
|
7323
|
-
},
|
|
7341
|
+
}, ka = {
|
|
7324
7342
|
WHITE: "rgb(255, 255, 255)",
|
|
7325
7343
|
LIGHT_GRAY: "rgba(255, 255, 255, 0.92)",
|
|
7326
7344
|
PURE_WHITE: "#ffffff",
|
|
@@ -7328,115 +7346,115 @@ var Da = {
|
|
|
7328
7346
|
ACTIVE: "#1890ff",
|
|
7329
7347
|
ACTIVE_HOVER: "#40a9ff",
|
|
7330
7348
|
HOVER: "#f0f0f0"
|
|
7331
|
-
},
|
|
7349
|
+
}, Aa = {
|
|
7332
7350
|
DARK: "rgba(0, 0, 0, 0.12)",
|
|
7333
7351
|
MEDIUM: "rgba(0, 0, 0, 0.10)",
|
|
7334
7352
|
LIGHT: "rgba(0, 0, 0, 0.08)",
|
|
7335
7353
|
SEPARATOR: "rgba(0, 0, 0, 0.10)",
|
|
7336
7354
|
BUTTON: "#d0d0d0"
|
|
7337
|
-
},
|
|
7355
|
+
}, ja = {
|
|
7338
7356
|
HORIZONTAL: "rgba(0, 0, 0, 0.06)",
|
|
7339
7357
|
VERTICAL: "rgba(0, 0, 0, 0.12)"
|
|
7340
|
-
},
|
|
7358
|
+
}, Ma = {
|
|
7341
7359
|
MA5: "rgba(255, 193, 37, 1)",
|
|
7342
7360
|
MA10: "rgba(190, 131, 12, 1)",
|
|
7343
7361
|
MA20: "rgba(69, 112, 249, 1)",
|
|
7344
7362
|
MA30: "rgba(76, 175, 80, 1)",
|
|
7345
7363
|
MA60: "rgba(156, 39, 176, 1)"
|
|
7346
|
-
},
|
|
7364
|
+
}, Na = {
|
|
7347
7365
|
UPPER: "rgba(178, 34, 34, 1)",
|
|
7348
7366
|
MIDDLE: "rgba(69, 112, 249, 1)",
|
|
7349
7367
|
LOWER: "rgba(34, 139, 34, 1)",
|
|
7350
7368
|
BAND_FILL: "rgba(100, 149, 237, 0.1)"
|
|
7351
|
-
},
|
|
7369
|
+
}, Pa = {
|
|
7352
7370
|
DIF: "rgba(69, 112, 249, 1)",
|
|
7353
7371
|
DEA: "rgba(255, 152, 0, 1)",
|
|
7354
7372
|
BAR_UP: "#ff5252",
|
|
7355
7373
|
BAR_UP_LIGHT: "#fccbcd",
|
|
7356
7374
|
BAR_DOWN: "#22ab94",
|
|
7357
7375
|
BAR_DOWN_LIGHT: "#ace5dc"
|
|
7358
|
-
},
|
|
7376
|
+
}, Fa = {
|
|
7359
7377
|
RSI1: "rgba(69, 112, 249, 1)",
|
|
7360
7378
|
RSI2: "rgba(255, 152, 0, 1)",
|
|
7361
7379
|
RSI3: "rgba(156, 39, 176, 1)"
|
|
7362
|
-
},
|
|
7380
|
+
}, Ia = {
|
|
7363
7381
|
CCI: "rgba(69, 112, 249, 1)",
|
|
7364
7382
|
OVERBOUGHT: "rgba(214, 10, 34, 0.5)",
|
|
7365
7383
|
OVERSOLD: "rgba(3, 123, 102, 0.5)"
|
|
7366
|
-
},
|
|
7384
|
+
}, La = {
|
|
7367
7385
|
K: "rgba(69, 112, 249, 1)",
|
|
7368
7386
|
D: "rgba(255, 152, 0, 1)",
|
|
7369
7387
|
J: "rgba(156, 39, 176, 1)"
|
|
7370
|
-
},
|
|
7388
|
+
}, Ra = {
|
|
7371
7389
|
MOM: "rgba(69, 112, 249, 1)",
|
|
7372
7390
|
ZERO: "rgba(0, 0, 0, 0.2)"
|
|
7373
|
-
},
|
|
7391
|
+
}, za = {
|
|
7374
7392
|
WMSR: "rgba(69, 112, 249, 1)",
|
|
7375
7393
|
OVERBOUGHT: "rgba(214, 10, 34, 0.5)",
|
|
7376
7394
|
OVERSOLD: "rgba(3, 123, 102, 0.5)"
|
|
7377
|
-
},
|
|
7395
|
+
}, Ba = {
|
|
7378
7396
|
KST: "rgba(69, 112, 249, 1)",
|
|
7379
7397
|
SIGNAL: "rgba(255, 152, 0, 1)"
|
|
7380
|
-
}, Ba = {
|
|
7381
|
-
FAST: "#FFD700",
|
|
7382
|
-
SLOW: "rgba(69, 112, 249, 1)"
|
|
7383
7398
|
}, Va = {
|
|
7399
|
+
FAST: "rgba(255, 152, 0, 1)",
|
|
7400
|
+
SLOW: "rgba(69, 112, 249, 1)"
|
|
7401
|
+
}, Ha = {
|
|
7384
7402
|
UPPER: "rgba(214, 10, 34, 1)",
|
|
7385
7403
|
MIDDLE: "rgba(69, 112, 249, 1)",
|
|
7386
7404
|
LOWER: "rgba(3, 123, 102, 1)",
|
|
7387
7405
|
BAND_FILL: "rgba(69, 112, 249, 0.08)"
|
|
7388
|
-
},
|
|
7406
|
+
}, Ua = {
|
|
7389
7407
|
LINE: "rgba(0, 0, 0, 0.28)",
|
|
7390
7408
|
LABEL_BG: "rgb(0, 0, 0)",
|
|
7391
7409
|
LABEL_TEXT: "rgba(255, 255, 255, 0.92)"
|
|
7392
|
-
},
|
|
7393
|
-
function
|
|
7394
|
-
return e > 0 ?
|
|
7410
|
+
}, Wa = X.UP, Ga = X.DOWN, Ka = X.NEUTRAL;
|
|
7411
|
+
function qa(e) {
|
|
7412
|
+
return e > 0 ? Wa : e < 0 ? Ga : Ka;
|
|
7395
7413
|
}
|
|
7396
|
-
function
|
|
7414
|
+
function Ja(e, t = 2) {
|
|
7397
7415
|
let n = Math.abs(e);
|
|
7398
7416
|
return n >= 1e8 ? `${(e / 1e8).toFixed(t)}亿` : n >= 1e4 ? `${(e / 1e4).toFixed(t)}万` : `${Math.round(e)}`;
|
|
7399
7417
|
}
|
|
7400
|
-
function
|
|
7418
|
+
function Ya(e, t = 2) {
|
|
7401
7419
|
return `${e > 0 ? "+" : ""}${e.toFixed(t)}`;
|
|
7402
7420
|
}
|
|
7403
|
-
function
|
|
7421
|
+
function Xa(e, t = 2) {
|
|
7404
7422
|
return `${e.toFixed(t)}%`;
|
|
7405
7423
|
}
|
|
7406
|
-
function
|
|
7424
|
+
function Za(e, t = 2) {
|
|
7407
7425
|
return `${e > 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
7408
7426
|
}
|
|
7409
|
-
function
|
|
7427
|
+
function Qa(e, t) {
|
|
7410
7428
|
let n = t?.close ?? e.open;
|
|
7411
|
-
return
|
|
7412
|
-
}
|
|
7413
|
-
function Qa(e) {
|
|
7414
|
-
return Ka(e.close - e.open);
|
|
7429
|
+
return qa(e.open - n);
|
|
7415
7430
|
}
|
|
7416
7431
|
function $a(e) {
|
|
7417
|
-
return
|
|
7432
|
+
return qa(e.close - e.open);
|
|
7433
|
+
}
|
|
7434
|
+
function eo(e) {
|
|
7435
|
+
return typeof e.changePercent == "number" ? qa(e.changePercent) : typeof e.changeAmount == "number" ? qa(e.changeAmount) : Ka;
|
|
7418
7436
|
}
|
|
7419
7437
|
//#endregion
|
|
7420
7438
|
//#region src/components/KLineTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
7421
|
-
var
|
|
7439
|
+
var to = { class: "kline-tooltip__title" }, no = { key: 0 }, ro = { class: "kline-tooltip__grid" }, io = { class: "row" }, ao = { class: "row" }, oo = { class: "row" }, so = { class: "row" }, co = {
|
|
7422
7440
|
key: 0,
|
|
7423
7441
|
class: "row"
|
|
7424
|
-
},
|
|
7442
|
+
}, lo = {
|
|
7425
7443
|
key: 1,
|
|
7426
7444
|
class: "row"
|
|
7427
|
-
},
|
|
7445
|
+
}, uo = {
|
|
7428
7446
|
key: 2,
|
|
7429
7447
|
class: "row"
|
|
7430
|
-
},
|
|
7448
|
+
}, fo = {
|
|
7431
7449
|
key: 3,
|
|
7432
7450
|
class: "row"
|
|
7433
|
-
},
|
|
7451
|
+
}, po = {
|
|
7434
7452
|
key: 4,
|
|
7435
7453
|
class: "row"
|
|
7436
|
-
},
|
|
7454
|
+
}, mo = {
|
|
7437
7455
|
key: 5,
|
|
7438
7456
|
class: "row"
|
|
7439
|
-
},
|
|
7457
|
+
}, ho = /* @__PURE__ */ u({
|
|
7440
7458
|
__name: "KLineTooltip",
|
|
7441
7459
|
props: {
|
|
7442
7460
|
k: {},
|
|
@@ -7452,15 +7470,15 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7452
7470
|
}
|
|
7453
7471
|
let i = r(() => {
|
|
7454
7472
|
let e = t.k;
|
|
7455
|
-
if (!e) return
|
|
7473
|
+
if (!e) return Ka;
|
|
7456
7474
|
let n = t.index;
|
|
7457
|
-
return
|
|
7475
|
+
return Qa(e, typeof n == "number" && n > 0 ? t.data[n - 1] : void 0);
|
|
7458
7476
|
}), c = r(() => {
|
|
7459
7477
|
let e = t.k;
|
|
7460
|
-
return e ?
|
|
7478
|
+
return e ? $a(e) : Ka;
|
|
7461
7479
|
}), l = r(() => {
|
|
7462
7480
|
let e = t.k;
|
|
7463
|
-
return e ?
|
|
7481
|
+
return e ? eo(e) : Ka;
|
|
7464
7482
|
});
|
|
7465
7483
|
return (t, r) => e.k ? (g(), o("div", {
|
|
7466
7484
|
key: 0,
|
|
@@ -7470,29 +7488,29 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7470
7488
|
left: `${e.pos.x}px`,
|
|
7471
7489
|
top: `${e.pos.y}px`
|
|
7472
7490
|
})
|
|
7473
|
-
}, [s("div",
|
|
7474
|
-
s("div",
|
|
7475
|
-
s("div",
|
|
7476
|
-
s("div",
|
|
7477
|
-
s("div",
|
|
7478
|
-
typeof e.k.volume == "number" ? (g(), o("div",
|
|
7479
|
-
typeof e.k.turnover == "number" ? (g(), o("div",
|
|
7480
|
-
typeof e.k.amplitude == "number" ? (g(), o("div",
|
|
7481
|
-
typeof e.k.changePercent == "number" ? (g(), o("div",
|
|
7482
|
-
typeof e.k.changeAmount == "number" ? (g(), o("div",
|
|
7483
|
-
typeof e.k.turnoverRate == "number" ? (g(), o("div",
|
|
7491
|
+
}, [s("div", to, [e.k.stockCode ? (g(), o("span", no, b(e.k.stockCode), 1)) : a("", !0), s("span", null, b(x(Ta)(e.k.timestamp)), 1)]), s("div", ro, [
|
|
7492
|
+
s("div", io, [r[0] ||= s("span", null, "开", -1), s("span", { style: p({ color: i.value }) }, b(e.k.open.toFixed(2)), 5)]),
|
|
7493
|
+
s("div", ao, [r[1] ||= s("span", null, "高", -1), s("span", null, b(e.k.high.toFixed(2)), 1)]),
|
|
7494
|
+
s("div", oo, [r[2] ||= s("span", null, "低", -1), s("span", null, b(e.k.low.toFixed(2)), 1)]),
|
|
7495
|
+
s("div", so, [r[3] ||= s("span", null, "收", -1), s("span", { style: p({ color: c.value }) }, b(e.k.close.toFixed(2)), 5)]),
|
|
7496
|
+
typeof e.k.volume == "number" ? (g(), o("div", co, [r[4] ||= s("span", null, "成交量", -1), s("span", null, b(x(Ja)(e.k.volume)), 1)])) : a("", !0),
|
|
7497
|
+
typeof e.k.turnover == "number" ? (g(), o("div", lo, [r[5] ||= s("span", null, "成交额", -1), s("span", null, b(x(Ja)(e.k.turnover)), 1)])) : a("", !0),
|
|
7498
|
+
typeof e.k.amplitude == "number" ? (g(), o("div", uo, [r[6] ||= s("span", null, "振幅", -1), s("span", null, b(e.k.amplitude) + "%", 1)])) : a("", !0),
|
|
7499
|
+
typeof e.k.changePercent == "number" ? (g(), o("div", fo, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: p({ color: l.value }) }, b(x(Za)(e.k.changePercent)), 5)])) : a("", !0),
|
|
7500
|
+
typeof e.k.changeAmount == "number" ? (g(), o("div", po, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: p({ color: l.value }) }, b(x(Ya)(e.k.changeAmount)), 5)])) : a("", !0),
|
|
7501
|
+
typeof e.k.turnoverRate == "number" ? (g(), o("div", mo, [r[9] ||= s("span", null, "换手率", -1), s("span", null, b(x(Xa)(e.k.turnoverRate)), 1)])) : a("", !0)
|
|
7484
7502
|
])], 4)) : a("", !0);
|
|
7485
7503
|
}
|
|
7486
|
-
}),
|
|
7504
|
+
}), go = (e, t) => {
|
|
7487
7505
|
let n = e.__vccOpts || e;
|
|
7488
7506
|
for (let [e, r] of t) n[e] = r;
|
|
7489
7507
|
return n;
|
|
7490
|
-
},
|
|
7508
|
+
}, _o = /* @__PURE__ */ go(ho, [["__scopeId", "data-v-95daa55c"]]), vo = {
|
|
7491
7509
|
RISE_WITH_VOLUME: "量价齐升",
|
|
7492
7510
|
RISE_WITHOUT_VOLUME: "量缩价升",
|
|
7493
7511
|
FALL_WITH_VOLUME: "量价齐缩",
|
|
7494
7512
|
FALL_WITHOUT_VOLUME: "量升价缩"
|
|
7495
|
-
},
|
|
7513
|
+
}, yo = class {
|
|
7496
7514
|
markers = /* @__PURE__ */ new Map();
|
|
7497
7515
|
hoveredMarkerId = null;
|
|
7498
7516
|
lastHoveredId = null;
|
|
@@ -7550,14 +7568,14 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7550
7568
|
hitTestCustomMarker(e, t) {
|
|
7551
7569
|
for (let n of this.customMarkers.values()) {
|
|
7552
7570
|
let r = this.customMarkerPositions.get(n.id);
|
|
7553
|
-
if (r &&
|
|
7571
|
+
if (r && ia(e, t, r.shape, r.x, r.y, r.size)) return n;
|
|
7554
7572
|
}
|
|
7555
7573
|
return null;
|
|
7556
7574
|
}
|
|
7557
|
-
},
|
|
7575
|
+
}, bo = { class: "marker-tooltip__title" }, xo = {
|
|
7558
7576
|
key: 0,
|
|
7559
7577
|
class: "marker-tooltip__content"
|
|
7560
|
-
},
|
|
7578
|
+
}, So = /* @__PURE__ */ go(/* @__PURE__ */ u({
|
|
7561
7579
|
__name: "MarkerTooltip",
|
|
7562
7580
|
props: {
|
|
7563
7581
|
marker: {},
|
|
@@ -7571,7 +7589,7 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7571
7589
|
return e.label?.text || e.shape;
|
|
7572
7590
|
}
|
|
7573
7591
|
let e = n.marker;
|
|
7574
|
-
return
|
|
7592
|
+
return vo[e.markerType] || e.markerType;
|
|
7575
7593
|
}), l = r(() => {
|
|
7576
7594
|
if (!n.marker) return {};
|
|
7577
7595
|
if (i.value) {
|
|
@@ -7593,27 +7611,27 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7593
7611
|
left: `${t.pos.x + 12}px`,
|
|
7594
7612
|
top: `${t.pos.y + 12}px`
|
|
7595
7613
|
})
|
|
7596
|
-
}, [s("div",
|
|
7614
|
+
}, [s("div", bo, b(c.value), 1), u.value ? (g(), o("div", xo, [(g(!0), o(e, null, v(l.value, (e, t) => (g(), o("div", {
|
|
7597
7615
|
key: t,
|
|
7598
7616
|
class: "row"
|
|
7599
7617
|
}, [s("span", null, b(t), 1), s("span", null, b(d(e)), 1)]))), 128))])) : a("", !0)], 4)) : a("", !0);
|
|
7600
7618
|
}
|
|
7601
|
-
}), [["__scopeId", "data-v-dd43da4f"]]),
|
|
7619
|
+
}), [["__scopeId", "data-v-dd43da4f"]]), Co = { class: "params-header" }, wo = { class: "header-left" }, To = { class: "params-title" }, Eo = { class: "header-right" }, Do = {
|
|
7602
7620
|
key: 0,
|
|
7603
7621
|
class: "indicator-description"
|
|
7604
|
-
},
|
|
7622
|
+
}, Oo = { class: "params-body" }, ko = { class: "param-header" }, Ao = { class: "param-label" }, jo = { class: "param-label-text" }, Mo = {
|
|
7605
7623
|
key: 0,
|
|
7606
7624
|
class: "param-range"
|
|
7607
|
-
},
|
|
7625
|
+
}, No = { class: "input-wrapper" }, Po = ["disabled", "onClick"], Fo = [
|
|
7608
7626
|
"value",
|
|
7609
7627
|
"min",
|
|
7610
7628
|
"max",
|
|
7611
7629
|
"step",
|
|
7612
7630
|
"onInput"
|
|
7613
|
-
],
|
|
7631
|
+
], Io = ["disabled", "onClick"], Lo = {
|
|
7614
7632
|
key: 0,
|
|
7615
7633
|
class: "param-description"
|
|
7616
|
-
},
|
|
7634
|
+
}, Ro = { class: "params-footer" }, zo = { class: "footer-right" }, Bo = /* @__PURE__ */ go(/* @__PURE__ */ u({
|
|
7617
7635
|
__name: "IndicatorParams",
|
|
7618
7636
|
props: {
|
|
7619
7637
|
visible: { type: Boolean },
|
|
@@ -7661,7 +7679,7 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7661
7679
|
class: "indicator-params",
|
|
7662
7680
|
onClick: d[3] ||= w(() => {}, ["stop"])
|
|
7663
7681
|
}, [
|
|
7664
|
-
s("div",
|
|
7682
|
+
s("div", Co, [s("div", wo, [s("span", To, b(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", Eo, [s("button", {
|
|
7665
7683
|
class: f(["toggle-desc-btn", { active: h.value }]),
|
|
7666
7684
|
onClick: d[0] ||= (e) => h.value = !h.value,
|
|
7667
7685
|
title: "显示/隐藏说明"
|
|
@@ -7678,18 +7696,18 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7678
7696
|
"stroke-width": "2"
|
|
7679
7697
|
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
7680
7698
|
l(n, { name: "slide" }, {
|
|
7681
|
-
default: C(() => [h.value && r.indicatorDescription ? (g(), o("div",
|
|
7699
|
+
default: C(() => [h.value && r.indicatorDescription ? (g(), o("div", Do, [s("p", null, b(r.indicatorDescription), 1)])) : a("", !0)]),
|
|
7682
7700
|
_: 1
|
|
7683
7701
|
}),
|
|
7684
|
-
s("div",
|
|
7702
|
+
s("div", Oo, [(g(!0), o(e, null, v(r.params, (e) => (g(), o("div", {
|
|
7685
7703
|
key: e.key,
|
|
7686
7704
|
class: f(["param-item", { "has-desc": h.value && e.description }])
|
|
7687
|
-
}, [s("div",
|
|
7705
|
+
}, [s("div", ko, [s("label", Ao, [s("span", jo, b(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (g(), o("span", Mo, b(e.min ?? "-∞") + " ~ " + b(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", No, [
|
|
7688
7706
|
s("button", {
|
|
7689
7707
|
class: "stepper-btn",
|
|
7690
7708
|
disabled: e.min !== void 0 && (m.value[e.key] ?? 0) <= e.min,
|
|
7691
7709
|
onClick: (t) => x(e, -1)
|
|
7692
|
-
}, " − ", 8,
|
|
7710
|
+
}, " − ", 8, Po),
|
|
7693
7711
|
e.type === "number" ? (g(), o("input", {
|
|
7694
7712
|
key: 0,
|
|
7695
7713
|
type: "number",
|
|
@@ -7699,17 +7717,17 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7699
7717
|
max: e.max,
|
|
7700
7718
|
step: e.step || 1,
|
|
7701
7719
|
onInput: (t) => y(e.key, t)
|
|
7702
|
-
}, null, 40,
|
|
7720
|
+
}, null, 40, Fo)) : a("", !0),
|
|
7703
7721
|
s("button", {
|
|
7704
7722
|
class: "stepper-btn",
|
|
7705
7723
|
disabled: e.max !== void 0 && (m.value[e.key] ?? 0) >= e.max,
|
|
7706
7724
|
onClick: (t) => x(e, 1)
|
|
7707
|
-
}, " + ", 8,
|
|
7725
|
+
}, " + ", 8, Io)
|
|
7708
7726
|
])]), l(n, { name: "slide" }, {
|
|
7709
|
-
default: C(() => [h.value && e.description ? (g(), o("div",
|
|
7727
|
+
default: C(() => [h.value && e.description ? (g(), o("div", Lo, b(e.description), 1)) : a("", !0)]),
|
|
7710
7728
|
_: 2
|
|
7711
7729
|
}, 1024)], 2))), 128))]),
|
|
7712
|
-
s("div",
|
|
7730
|
+
s("div", Ro, [s("button", {
|
|
7713
7731
|
class: "params-btn reset",
|
|
7714
7732
|
onClick: T
|
|
7715
7733
|
}, [...d[8] ||= [s("svg", {
|
|
@@ -7717,7 +7735,7 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7717
7735
|
fill: "none",
|
|
7718
7736
|
stroke: "currentColor",
|
|
7719
7737
|
"stroke-width": "2"
|
|
7720
|
-
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div",
|
|
7738
|
+
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div", zo, [s("button", {
|
|
7721
7739
|
class: "params-btn cancel",
|
|
7722
7740
|
onClick: d[2] ||= (e) => u.$emit("close")
|
|
7723
7741
|
}, "取消"), s("button", {
|
|
@@ -7735,28 +7753,28 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7735
7753
|
_: 1
|
|
7736
7754
|
})]));
|
|
7737
7755
|
}
|
|
7738
|
-
}), [["__scopeId", "data-v-730f2212"]]),
|
|
7756
|
+
}), [["__scopeId", "data-v-730f2212"]]), Vo = { class: "indicator-selector" }, Ho = { class: "indicator-scroll-container" }, Uo = { class: "indicator-list" }, Wo = ["onMouseenter"], Go = { class: "btn-content" }, Ko = {
|
|
7739
7757
|
key: 0,
|
|
7740
7758
|
class: "param-hint"
|
|
7741
|
-
},
|
|
7759
|
+
}, qo = {
|
|
7742
7760
|
key: 0,
|
|
7743
7761
|
class: "hover-overlay"
|
|
7744
|
-
},
|
|
7762
|
+
}, Jo = ["onClick"], Yo = {
|
|
7745
7763
|
key: 1,
|
|
7746
7764
|
class: "divider"
|
|
7747
|
-
},
|
|
7765
|
+
}, Xo = ["onClick"], Zo = { class: "indicator-item" }, Qo = { class: "menu-section" }, $o = { class: "menu-items" }, es = ["disabled", "onClick"], ts = {
|
|
7748
7766
|
key: 0,
|
|
7749
7767
|
class: "param-hint"
|
|
7750
|
-
},
|
|
7768
|
+
}, ns = {
|
|
7751
7769
|
key: 1,
|
|
7752
7770
|
class: "active-tag"
|
|
7753
|
-
},
|
|
7771
|
+
}, rs = { class: "menu-section" }, is = { class: "menu-items" }, as = ["disabled", "onClick"], os = {
|
|
7754
7772
|
key: 0,
|
|
7755
7773
|
class: "param-hint"
|
|
7756
|
-
},
|
|
7774
|
+
}, ss = {
|
|
7757
7775
|
key: 1,
|
|
7758
7776
|
class: "active-tag"
|
|
7759
|
-
},
|
|
7777
|
+
}, cs = /* @__PURE__ */ go(/* @__PURE__ */ u({
|
|
7760
7778
|
__name: "IndicatorSelector",
|
|
7761
7779
|
props: {
|
|
7762
7780
|
activeIndicators: {},
|
|
@@ -8135,8 +8153,8 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
8135
8153
|
document.addEventListener("click", se), window.addEventListener("resize", ce);
|
|
8136
8154
|
}), h(() => {
|
|
8137
8155
|
document.removeEventListener("click", se), window.removeEventListener("resize", ce);
|
|
8138
|
-
}), (r, u) => (g(), o("div",
|
|
8139
|
-
s("div",
|
|
8156
|
+
}), (r, u) => (g(), o("div", Vo, [
|
|
8157
|
+
s("div", Ho, [s("div", Uo, [(g(!0), o(e, null, v(te.value, (e) => (g(), o("div", {
|
|
8140
8158
|
key: e.id,
|
|
8141
8159
|
class: "indicator-item"
|
|
8142
8160
|
}, [s("div", {
|
|
@@ -8146,8 +8164,8 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
8146
8164
|
}, [s("button", { class: f(["indicator-btn", {
|
|
8147
8165
|
active: !0,
|
|
8148
8166
|
hovering: M.value === e.id
|
|
8149
|
-
}]) }, [s("span",
|
|
8150
|
-
default: C(() => [M.value === e.id ? (g(), o("div",
|
|
8167
|
+
}]) }, [s("span", Go, [c(b(e.label) + " ", 1), e.params ? (g(), o("span", Ko, " (" + b(I(e)) + ") ", 1)) : a("", !0)]), l(n, { name: "fade" }, {
|
|
8168
|
+
default: C(() => [M.value === e.id ? (g(), o("div", qo, [
|
|
8151
8169
|
e.params ? (g(), o("button", {
|
|
8152
8170
|
key: 0,
|
|
8153
8171
|
class: "action-btn settings-btn",
|
|
@@ -8158,8 +8176,8 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
8158
8176
|
width: "14",
|
|
8159
8177
|
height: "14",
|
|
8160
8178
|
fill: "currentColor"
|
|
8161
|
-
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8,
|
|
8162
|
-
e.params ? (g(), o("span",
|
|
8179
|
+
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, Jo)) : a("", !0),
|
|
8180
|
+
e.params ? (g(), o("span", Yo)) : a("", !0),
|
|
8163
8181
|
s("button", {
|
|
8164
8182
|
class: "action-btn remove-btn",
|
|
8165
8183
|
onClick: w((t) => re(e.id), ["stop"]),
|
|
@@ -8169,10 +8187,10 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
8169
8187
|
width: "14",
|
|
8170
8188
|
height: "14",
|
|
8171
8189
|
fill: "currentColor"
|
|
8172
|
-
}, [s("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]], 8,
|
|
8190
|
+
}, [s("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]], 8, Xo)
|
|
8173
8191
|
])) : a("", !0)]),
|
|
8174
8192
|
_: 2
|
|
8175
|
-
}, 1024)], 2)], 40,
|
|
8193
|
+
}, 1024)], 2)], 40, Wo)]))), 128)), s("div", Zo, [s("button", {
|
|
8176
8194
|
ref_key: "addBtnRef",
|
|
8177
8195
|
ref: O,
|
|
8178
8196
|
class: "add-btn",
|
|
@@ -8191,38 +8209,38 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
8191
8209
|
ref_key: "addMenuRef",
|
|
8192
8210
|
ref: k,
|
|
8193
8211
|
style: p(ee.value)
|
|
8194
|
-
}, [s("div",
|
|
8212
|
+
}, [s("div", Qo, [u[6] ||= s("div", { class: "menu-title" }, "主图指标", -1), s("div", $o, [(g(!0), o(e, null, v(x(S), (e) => (g(), o("button", {
|
|
8195
8213
|
key: e.id,
|
|
8196
8214
|
class: f(["menu-item", { disabled: F(e.id) }]),
|
|
8197
8215
|
disabled: F(e.id),
|
|
8198
8216
|
onClick: (t) => ne(e.id)
|
|
8199
8217
|
}, [
|
|
8200
8218
|
c(b(e.label) + " ", 1),
|
|
8201
|
-
e.params ? (g(), o("span",
|
|
8202
|
-
F(e.id) ? (g(), o("span",
|
|
8219
|
+
e.params ? (g(), o("span", ts, " (" + b(e.name) + ") ", 1)) : a("", !0),
|
|
8220
|
+
F(e.id) ? (g(), o("span", ns, [...u[5] ||= [s("svg", {
|
|
8203
8221
|
viewBox: "0 0 24 24",
|
|
8204
8222
|
width: "14",
|
|
8205
8223
|
height: "14",
|
|
8206
8224
|
fill: "currentColor"
|
|
8207
8225
|
}, [s("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })], -1)]])) : a("", !0)
|
|
8208
|
-
], 10,
|
|
8226
|
+
], 10, es))), 128))])]), s("div", rs, [u[8] ||= s("div", { class: "menu-title" }, "副图指标", -1), s("div", is, [(g(!0), o(e, null, v(x(T), (e) => (g(), o("button", {
|
|
8209
8227
|
key: e.id,
|
|
8210
8228
|
class: f(["menu-item", { disabled: F(e.id) }]),
|
|
8211
8229
|
disabled: F(e.id),
|
|
8212
8230
|
onClick: (t) => ne(e.id)
|
|
8213
8231
|
}, [
|
|
8214
8232
|
c(b(e.label) + " ", 1),
|
|
8215
|
-
e.params ? (g(), o("span",
|
|
8216
|
-
F(e.id) ? (g(), o("span",
|
|
8233
|
+
e.params ? (g(), o("span", os, " (" + b(e.name) + ") ", 1)) : a("", !0),
|
|
8234
|
+
F(e.id) ? (g(), o("span", ss, [...u[7] ||= [s("svg", {
|
|
8217
8235
|
viewBox: "0 0 24 24",
|
|
8218
8236
|
width: "14",
|
|
8219
8237
|
height: "14",
|
|
8220
8238
|
fill: "currentColor"
|
|
8221
8239
|
}, [s("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })], -1)]])) : a("", !0)
|
|
8222
|
-
], 10,
|
|
8240
|
+
], 10, as))), 128))])])], 4)) : a("", !0)]),
|
|
8223
8241
|
_: 1
|
|
8224
8242
|
})])),
|
|
8225
|
-
P.value ? (g(), i(
|
|
8243
|
+
P.value ? (g(), i(Bo, {
|
|
8226
8244
|
key: 0,
|
|
8227
8245
|
visible: A.value,
|
|
8228
8246
|
"indicator-id": P.value.id,
|
|
@@ -8245,12 +8263,12 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
8245
8263
|
}), [["__scopeId", "data-v-aad3b750"]]);
|
|
8246
8264
|
//#endregion
|
|
8247
8265
|
//#region src/core/utils/klineConfig.ts
|
|
8248
|
-
function
|
|
8266
|
+
function ls(e, t) {
|
|
8249
8267
|
let n = Math.round(e * t);
|
|
8250
8268
|
return n % 2 == 0 && (n += 1), Math.max(1, n);
|
|
8251
8269
|
}
|
|
8252
|
-
function
|
|
8253
|
-
let r =
|
|
8270
|
+
function us(e, t, n) {
|
|
8271
|
+
let r = ls(e, n), i = Math.round(t * n), a = r + i, o = i;
|
|
8254
8272
|
return {
|
|
8255
8273
|
kWidthPx: r,
|
|
8256
8274
|
kGapPx: i,
|
|
@@ -8264,14 +8282,14 @@ function ls(e, t, n) {
|
|
|
8264
8282
|
}
|
|
8265
8283
|
//#endregion
|
|
8266
8284
|
//#region src/core/viewport/viewport.ts
|
|
8267
|
-
function
|
|
8268
|
-
let { unitPx: o, startXPx: s } =
|
|
8285
|
+
function ds(e, t, n, r, i, a = 1) {
|
|
8286
|
+
let { unitPx: o, startXPx: s } = us(n, r, a), c = e * a, l = t * a;
|
|
8269
8287
|
return {
|
|
8270
8288
|
start: Math.max(0, Math.floor((c - s) / o) - 1),
|
|
8271
8289
|
end: Math.min(i, Math.ceil((c + l - s) / o) + 1)
|
|
8272
8290
|
};
|
|
8273
8291
|
}
|
|
8274
|
-
function
|
|
8292
|
+
function fs(e, t, n) {
|
|
8275
8293
|
let r = -Infinity, i = Infinity;
|
|
8276
8294
|
for (let a = t; a < n && a < e.length; a++) {
|
|
8277
8295
|
let t = e[a];
|
|
@@ -8287,7 +8305,7 @@ function ds(e, t, n) {
|
|
|
8287
8305
|
}
|
|
8288
8306
|
//#endregion
|
|
8289
8307
|
//#region src/core/scale/priceScale.ts
|
|
8290
|
-
var
|
|
8308
|
+
var ps = class {
|
|
8291
8309
|
range = {
|
|
8292
8310
|
maxPrice: 100,
|
|
8293
8311
|
minPrice: 0
|
|
@@ -8334,7 +8352,7 @@ var fs = class {
|
|
|
8334
8352
|
deltaYToPriceOffset(e) {
|
|
8335
8353
|
return e * ((this.range.maxPrice - this.range.minPrice || 1) / Math.max(1, this.height - this.paddingTop - this.paddingBottom));
|
|
8336
8354
|
}
|
|
8337
|
-
},
|
|
8355
|
+
}, ms = class {
|
|
8338
8356
|
id;
|
|
8339
8357
|
top = 0;
|
|
8340
8358
|
height = 0;
|
|
@@ -8342,7 +8360,7 @@ var fs = class {
|
|
|
8342
8360
|
maxPrice: 100,
|
|
8343
8361
|
minPrice: 0
|
|
8344
8362
|
};
|
|
8345
|
-
yAxis = new
|
|
8363
|
+
yAxis = new ps();
|
|
8346
8364
|
renderers = [];
|
|
8347
8365
|
constructor(e) {
|
|
8348
8366
|
this.id = e;
|
|
@@ -8357,9 +8375,9 @@ var fs = class {
|
|
|
8357
8375
|
this.renderers.push(e);
|
|
8358
8376
|
}
|
|
8359
8377
|
updateRange(e, t) {
|
|
8360
|
-
this.priceRange =
|
|
8378
|
+
this.priceRange = fs(e, t.start, t.end), this.yAxis.setRange(this.priceRange);
|
|
8361
8379
|
}
|
|
8362
|
-
},
|
|
8380
|
+
}, hs = class {
|
|
8363
8381
|
chart;
|
|
8364
8382
|
isDragging = !1;
|
|
8365
8383
|
dragStartX = 0;
|
|
@@ -8369,6 +8387,7 @@ var fs = class {
|
|
|
8369
8387
|
isTouchSession = !1;
|
|
8370
8388
|
crosshairPos = null;
|
|
8371
8389
|
crosshairIndex = null;
|
|
8390
|
+
crosshairPrice = null;
|
|
8372
8391
|
hoveredIndex = null;
|
|
8373
8392
|
activePaneId = null;
|
|
8374
8393
|
tooltipPos = {
|
|
@@ -8487,7 +8506,7 @@ var fs = class {
|
|
|
8487
8506
|
this.onCustomMarkerClickCallback = e;
|
|
8488
8507
|
}
|
|
8489
8508
|
clearHover() {
|
|
8490
|
-
this.crosshairPos = null, this.crosshairIndex = null, this.hoveredIndex = null, this.activePaneId = null, this.hoveredMarkerId !== null && (this.hoveredMarkerId = null, this.onMarkerHoverCallback && this.onMarkerHoverCallback(null)), this.hoveredCustomMarker !== null && (this.hoveredCustomMarker = null, this.onCustomMarkerHoverCallback && this.onCustomMarkerHoverCallback(null));
|
|
8509
|
+
this.crosshairPos = null, this.crosshairIndex = null, this.crosshairPrice = null, this.hoveredIndex = null, this.activePaneId = null, this.hoveredMarkerId !== null && (this.hoveredMarkerId = null, this.onMarkerHoverCallback && this.onMarkerHoverCallback(null)), this.hoveredCustomMarker !== null && (this.hoveredCustomMarker = null, this.onCustomMarkerHoverCallback && this.onCustomMarkerHoverCallback(null));
|
|
8491
8510
|
}
|
|
8492
8511
|
updateHover(e) {
|
|
8493
8512
|
this.updateHoverFromPoint(e.clientX, e.clientY);
|
|
@@ -8529,11 +8548,14 @@ var fs = class {
|
|
|
8529
8548
|
if (this.activePaneId = C?.id || null, x >= 0 && x < (S?.length ?? 0)) {
|
|
8530
8549
|
this.crosshairIndex = x;
|
|
8531
8550
|
let e = this.kLinePositions[b] + (this.kWidthPx - 1) / 2 / f - d;
|
|
8532
|
-
this.crosshairPos = {
|
|
8551
|
+
if (this.crosshairPos = {
|
|
8533
8552
|
x: Math.min(Math.max(e, 0), l),
|
|
8534
8553
|
y: Math.min(Math.max(a, 0), u)
|
|
8535
|
-
}
|
|
8536
|
-
|
|
8554
|
+
}, C) {
|
|
8555
|
+
let e = a - C.top;
|
|
8556
|
+
this.crosshairPrice = C.yAxis.yToPrice(e);
|
|
8557
|
+
} else this.crosshairPrice = null;
|
|
8558
|
+
} else this.crosshairIndex = null, this.crosshairPos = null, this.crosshairPrice = null;
|
|
8537
8559
|
let w = typeof this.crosshairIndex == "number" ? S[this.crosshairIndex] : void 0;
|
|
8538
8560
|
if (!w || !C || C.id !== "main") {
|
|
8539
8561
|
this.hoveredIndex = null;
|
|
@@ -8552,9 +8574,9 @@ var fs = class {
|
|
|
8552
8574
|
};
|
|
8553
8575
|
}
|
|
8554
8576
|
reset() {
|
|
8555
|
-
this.isDragging = !1, this.dragStartX = 0, this.dragStartY = 0, this.scrollStartX = 0, this.activePaneIdOnDrag = null, this.isTouchSession = !1, this.crosshairPos = null, this.crosshairIndex = null, this.hoveredIndex = null, this.activePaneId = null, this.hoveredMarkerId = null, this.clickedMarkerId = null, this.hoveredMarkerData = null, this.clickedMarkerData = null, this.kLinePositions = null, this.visibleRange = null, this.kWidthPx = null;
|
|
8577
|
+
this.isDragging = !1, this.dragStartX = 0, this.dragStartY = 0, this.scrollStartX = 0, this.activePaneIdOnDrag = null, this.isTouchSession = !1, this.crosshairPos = null, this.crosshairIndex = null, this.crosshairPrice = null, this.hoveredIndex = null, this.activePaneId = null, this.hoveredMarkerId = null, this.clickedMarkerId = null, this.hoveredMarkerData = null, this.clickedMarkerData = null, this.kLinePositions = null, this.visibleRange = null, this.kWidthPx = null;
|
|
8556
8578
|
}
|
|
8557
|
-
},
|
|
8579
|
+
}, gs = class {
|
|
8558
8580
|
dom;
|
|
8559
8581
|
pane;
|
|
8560
8582
|
opt;
|
|
@@ -8572,15 +8594,15 @@ var fs = class {
|
|
|
8572
8594
|
}
|
|
8573
8595
|
resize(e, t, n) {
|
|
8574
8596
|
let r = this.dom.plotCanvas, i = this.dom.yAxisCanvas;
|
|
8575
|
-
r.style.width = `${e}px`, r.style.height = `${t}px`, r.width = Math.
|
|
8597
|
+
r.style.width = `${e}px`, r.style.height = `${t}px`, r.width = Math.round(e * n), r.height = Math.round(t * n);
|
|
8576
8598
|
let a = this.opt.rightAxisWidth + (this.opt.priceLabelWidth || 60);
|
|
8577
|
-
i.style.width = `${a}px`, i.style.height = `${t}px`, i.width = Math.
|
|
8599
|
+
i.style.width = `${a}px`, i.style.height = `${t}px`, i.width = Math.round(a * n), i.height = Math.round(t * n);
|
|
8578
8600
|
}
|
|
8579
8601
|
destroy() {}
|
|
8580
8602
|
};
|
|
8581
8603
|
//#endregion
|
|
8582
8604
|
//#region src/core/renderers/subVolume.ts
|
|
8583
|
-
function
|
|
8605
|
+
function _s(e = {}) {
|
|
8584
8606
|
let { paneId: t = "sub" } = e;
|
|
8585
8607
|
return {
|
|
8586
8608
|
name: `volume_${t}`,
|
|
@@ -8599,21 +8621,21 @@ function gs(e = {}) {
|
|
|
8599
8621
|
if (!r) continue;
|
|
8600
8622
|
let i = r.volume;
|
|
8601
8623
|
if (!i) continue;
|
|
8602
|
-
let a =
|
|
8603
|
-
d &&
|
|
8624
|
+
let a = ys(r), d = c[e - u];
|
|
8625
|
+
d && vs(t, d, a, i, f, o, s, n.height);
|
|
8604
8626
|
}
|
|
8605
8627
|
t.restore();
|
|
8606
8628
|
}
|
|
8607
8629
|
};
|
|
8608
8630
|
}
|
|
8609
|
-
function
|
|
8610
|
-
let c =
|
|
8631
|
+
function vs(e, t, n, r, i, a, o, s) {
|
|
8632
|
+
let c = bs(r, i, s), l = a;
|
|
8611
8633
|
e.fillStyle = n, e.fillRect(t, c, l, s - c);
|
|
8612
8634
|
}
|
|
8613
|
-
function
|
|
8635
|
+
function ys(e) {
|
|
8614
8636
|
return e.close > e.open ? X.UP : e.close < e.open ? X.DOWN : X.NEUTRAL;
|
|
8615
8637
|
}
|
|
8616
|
-
function
|
|
8638
|
+
function bs(e, t, n) {
|
|
8617
8639
|
return n - n / t * e;
|
|
8618
8640
|
}
|
|
8619
8641
|
//#endregion
|
|
@@ -8624,7 +8646,7 @@ function Z(e, t) {
|
|
|
8624
8646
|
function Q(e, t) {
|
|
8625
8647
|
return (Math.floor(e * t) + .5) / t;
|
|
8626
8648
|
}
|
|
8627
|
-
function
|
|
8649
|
+
function xs(e, t, n, r) {
|
|
8628
8650
|
if (t === n) return null;
|
|
8629
8651
|
let i = Math.min(t, n), a = Math.max(t, n), o = Math.round(e * r), s = Math.round(i * r), c = Math.round(a * r);
|
|
8630
8652
|
return {
|
|
@@ -8634,7 +8656,7 @@ function bs(e, t, n, r) {
|
|
|
8634
8656
|
height: Math.max(1, c - s) / r
|
|
8635
8657
|
};
|
|
8636
8658
|
}
|
|
8637
|
-
function
|
|
8659
|
+
function Ss(e, t, n, r) {
|
|
8638
8660
|
if (e === t) return null;
|
|
8639
8661
|
let i = Math.min(e, t), a = Math.max(e, t), o = Math.round(i * r), s = Math.round(a * r), c = Math.round(n * r);
|
|
8640
8662
|
return {
|
|
@@ -8644,7 +8666,7 @@ function xs(e, t, n, r) {
|
|
|
8644
8666
|
height: 1 / r
|
|
8645
8667
|
};
|
|
8646
8668
|
}
|
|
8647
|
-
function
|
|
8669
|
+
function Cs(e, t, n, r, i) {
|
|
8648
8670
|
let a = e + n, o = n, s = Math.round(t * i), c = Math.round((t + r) * i), l = Math.max(1, c - s), u = e + (n - 1) / 2, d = u, f = o % 2 == 1;
|
|
8649
8671
|
return {
|
|
8650
8672
|
bodyRect: {
|
|
@@ -8667,7 +8689,7 @@ function Ss(e, t, n, r, i) {
|
|
|
8667
8689
|
}
|
|
8668
8690
|
//#endregion
|
|
8669
8691
|
//#region src/core/renderers/Indicator/ma.ts
|
|
8670
|
-
function
|
|
8692
|
+
function ws(e, t) {
|
|
8671
8693
|
let n = Array(e.length);
|
|
8672
8694
|
if (e.length < t) return n;
|
|
8673
8695
|
let r = 0;
|
|
@@ -8683,7 +8705,7 @@ function Cs(e, t) {
|
|
|
8683
8705
|
}
|
|
8684
8706
|
return n;
|
|
8685
8707
|
}
|
|
8686
|
-
function
|
|
8708
|
+
function Ts(e = {}) {
|
|
8687
8709
|
let t = {
|
|
8688
8710
|
ma5: !0,
|
|
8689
8711
|
ma10: !0,
|
|
@@ -8695,7 +8717,7 @@ function ws(e = {}) {
|
|
|
8695
8717
|
function i(e, t) {
|
|
8696
8718
|
let i = n.get(t);
|
|
8697
8719
|
if (i && r === e) return i.values;
|
|
8698
|
-
let a =
|
|
8720
|
+
let a = ws(e, t);
|
|
8699
8721
|
return n.set(t, {
|
|
8700
8722
|
period: t,
|
|
8701
8723
|
values: a
|
|
@@ -8722,7 +8744,7 @@ function ws(e = {}) {
|
|
|
8722
8744
|
priority: Y.INDICATOR,
|
|
8723
8745
|
draw(e) {
|
|
8724
8746
|
let { ctx: n, data: r, scrollLeft: o } = e, s = r;
|
|
8725
|
-
s.length && (n.save(), n.translate(-o, 0), t.ma5 && a(n, i(s, 5), e,
|
|
8747
|
+
s.length && (n.save(), n.translate(-o, 0), t.ma5 && a(n, i(s, 5), e, Ma.MA5), t.ma10 && a(n, i(s, 10), e, Ma.MA10), t.ma20 && a(n, i(s, 20), e, Ma.MA20), t.ma30 && a(n, i(s, 30), e, Ma.MA30), t.ma60 && a(n, i(s, 60), e, Ma.MA60), n.restore());
|
|
8726
8748
|
},
|
|
8727
8749
|
onDataUpdate() {
|
|
8728
8750
|
r = null, n.clear();
|
|
@@ -8737,7 +8759,7 @@ function ws(e = {}) {
|
|
|
8737
8759
|
}
|
|
8738
8760
|
//#endregion
|
|
8739
8761
|
//#region src/core/renderers/Indicator/boll.ts
|
|
8740
|
-
function
|
|
8762
|
+
function Es(e, t, n) {
|
|
8741
8763
|
let r = Array(e.length);
|
|
8742
8764
|
if (e.length < t) return r;
|
|
8743
8765
|
let i = 0, a = [];
|
|
@@ -8770,7 +8792,7 @@ function Ts(e, t, n) {
|
|
|
8770
8792
|
}
|
|
8771
8793
|
return r;
|
|
8772
8794
|
}
|
|
8773
|
-
function
|
|
8795
|
+
function Ds(e = {}) {
|
|
8774
8796
|
let t = {
|
|
8775
8797
|
period: 20,
|
|
8776
8798
|
multiplier: 2,
|
|
@@ -8781,7 +8803,7 @@ function Es(e = {}) {
|
|
|
8781
8803
|
...e
|
|
8782
8804
|
}, n = null, r = 0, i = 0, a = [];
|
|
8783
8805
|
function o(e) {
|
|
8784
|
-
return (n !== e || r !== t.period || i !== t.multiplier) && (a =
|
|
8806
|
+
return (n !== e || r !== t.period || i !== t.multiplier) && (a = Es(e, t.period, t.multiplier), n = e, r = t.period, i = t.multiplier), a;
|
|
8785
8807
|
}
|
|
8786
8808
|
return {
|
|
8787
8809
|
name: "boll",
|
|
@@ -8797,7 +8819,7 @@ function Es(e = {}) {
|
|
|
8797
8819
|
n.save(), n.translate(-s, 0);
|
|
8798
8820
|
let p = Math.max(a.start, t.period - 1), m = Math.min(a.end, d.length);
|
|
8799
8821
|
if (t.showBand) {
|
|
8800
|
-
n.fillStyle =
|
|
8822
|
+
n.fillStyle = Na.BAND_FILL, n.beginPath();
|
|
8801
8823
|
let e = !0;
|
|
8802
8824
|
for (let t = p; t < m; t++) {
|
|
8803
8825
|
let i = f[t];
|
|
@@ -8825,7 +8847,7 @@ function Es(e = {}) {
|
|
|
8825
8847
|
}
|
|
8826
8848
|
n.stroke();
|
|
8827
8849
|
};
|
|
8828
|
-
t.showUpper && h("upper",
|
|
8850
|
+
t.showUpper && h("upper", Na.UPPER), t.showMiddle && h("middle", Na.MIDDLE), t.showLower && h("lower", Na.LOWER), n.restore();
|
|
8829
8851
|
},
|
|
8830
8852
|
onDataUpdate() {
|
|
8831
8853
|
n = null;
|
|
@@ -8838,7 +8860,7 @@ function Es(e = {}) {
|
|
|
8838
8860
|
}
|
|
8839
8861
|
};
|
|
8840
8862
|
}
|
|
8841
|
-
function
|
|
8863
|
+
function Os(e, t, n = 20, r = 2) {
|
|
8842
8864
|
if (t < n - 1 || t >= e.length) return null;
|
|
8843
8865
|
let i = 0;
|
|
8844
8866
|
for (let r = 0; r < n; r++) {
|
|
@@ -8861,7 +8883,7 @@ function Ds(e, t, n = 20, r = 2) {
|
|
|
8861
8883
|
}
|
|
8862
8884
|
//#endregion
|
|
8863
8885
|
//#region src/core/renderers/Indicator/expma.ts
|
|
8864
|
-
function
|
|
8886
|
+
function ks(e, t, n) {
|
|
8865
8887
|
let r = Array(e.length);
|
|
8866
8888
|
if (e.length === 0) return r;
|
|
8867
8889
|
let i = 2 / (t + 1), a = 2 / (n + 1), o = e[0].close, s = o, c = o;
|
|
@@ -8878,7 +8900,7 @@ function Os(e, t, n) {
|
|
|
8878
8900
|
}
|
|
8879
8901
|
return r;
|
|
8880
8902
|
}
|
|
8881
|
-
function
|
|
8903
|
+
function As(e, t, n = 12, r = 50) {
|
|
8882
8904
|
if (t < 0 || t >= e.length) return null;
|
|
8883
8905
|
let i = 2 / (n + 1), a = 2 / (r + 1), o = e[0].close, s = o, c = o;
|
|
8884
8906
|
for (let n = 1; n <= t; n++) {
|
|
@@ -8890,14 +8912,14 @@ function ks(e, t, n = 12, r = 50) {
|
|
|
8890
8912
|
slow: c
|
|
8891
8913
|
};
|
|
8892
8914
|
}
|
|
8893
|
-
function
|
|
8915
|
+
function js(e = {}) {
|
|
8894
8916
|
let t = {
|
|
8895
8917
|
fastPeriod: 12,
|
|
8896
8918
|
slowPeriod: 50,
|
|
8897
8919
|
...e
|
|
8898
8920
|
}, n = null, r = 0, i = 0, a = [];
|
|
8899
8921
|
function o(e) {
|
|
8900
|
-
return (n !== e || r !== t.fastPeriod || i !== t.slowPeriod) && (a =
|
|
8922
|
+
return (n !== e || r !== t.fastPeriod || i !== t.slowPeriod) && (a = ks(e, t.fastPeriod, t.slowPeriod), n = e, r = t.fastPeriod, i = t.slowPeriod), a;
|
|
8901
8923
|
}
|
|
8902
8924
|
return {
|
|
8903
8925
|
name: "expma",
|
|
@@ -8911,7 +8933,7 @@ function As(e = {}) {
|
|
|
8911
8933
|
if (u.length < 2) return;
|
|
8912
8934
|
let d = o(u);
|
|
8913
8935
|
t.save(), t.translate(-a, 0);
|
|
8914
|
-
let f = i.start, p = Math.min(i.end, u.length), m = (e, r) => {
|
|
8936
|
+
let f = i.start, p = Math.min(i.end, u.length), m = Va.FAST, h = Va.SLOW, g = (e, r) => {
|
|
8915
8937
|
t.strokeStyle = r, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
8916
8938
|
let a = !0;
|
|
8917
8939
|
for (let r = f; r < p; r++) {
|
|
@@ -8922,7 +8944,7 @@ function As(e = {}) {
|
|
|
8922
8944
|
}
|
|
8923
8945
|
t.stroke();
|
|
8924
8946
|
};
|
|
8925
|
-
|
|
8947
|
+
g("fast", m), g("slow", h), t.restore();
|
|
8926
8948
|
},
|
|
8927
8949
|
onDataUpdate() {
|
|
8928
8950
|
n = null;
|
|
@@ -8937,7 +8959,7 @@ function As(e = {}) {
|
|
|
8937
8959
|
}
|
|
8938
8960
|
//#endregion
|
|
8939
8961
|
//#region src/core/renderers/Indicator/ene.ts
|
|
8940
|
-
function
|
|
8962
|
+
function Ms(e, t, n) {
|
|
8941
8963
|
let r = Array(e.length);
|
|
8942
8964
|
if (e.length < t) return r;
|
|
8943
8965
|
let i = 0;
|
|
@@ -8965,7 +8987,7 @@ function js(e, t, n) {
|
|
|
8965
8987
|
}
|
|
8966
8988
|
return r;
|
|
8967
8989
|
}
|
|
8968
|
-
function
|
|
8990
|
+
function Ns(e, t, n = 10, r = 11) {
|
|
8969
8991
|
if (t < n - 1 || t >= e.length) return null;
|
|
8970
8992
|
let i = 0;
|
|
8971
8993
|
for (let r = 0; r < n; r++) {
|
|
@@ -8980,14 +9002,14 @@ function Ms(e, t, n = 10, r = 11) {
|
|
|
8980
9002
|
lower: a * (1 - o)
|
|
8981
9003
|
};
|
|
8982
9004
|
}
|
|
8983
|
-
function
|
|
9005
|
+
function Ps(e = {}) {
|
|
8984
9006
|
let t = {
|
|
8985
9007
|
period: 10,
|
|
8986
9008
|
deviation: 11,
|
|
8987
9009
|
...e
|
|
8988
9010
|
}, n = null, r = 0, i = 0, a = [];
|
|
8989
9011
|
function o(e) {
|
|
8990
|
-
return (n !== e || r !== t.period || i !== t.deviation) && (a =
|
|
9012
|
+
return (n !== e || r !== t.period || i !== t.deviation) && (a = Ms(e, t.period, t.deviation), n = e, r = t.period, i = t.deviation), a;
|
|
8991
9013
|
}
|
|
8992
9014
|
return {
|
|
8993
9015
|
name: "ene",
|
|
@@ -9043,7 +9065,7 @@ function Ns(e = {}) {
|
|
|
9043
9065
|
}
|
|
9044
9066
|
//#endregion
|
|
9045
9067
|
//#region src/utils/kline/ma.ts
|
|
9046
|
-
function
|
|
9068
|
+
function Fs(e, t, n) {
|
|
9047
9069
|
if (t < n - 1) return;
|
|
9048
9070
|
let r = 0;
|
|
9049
9071
|
for (let i = 0; i < n; i++) {
|
|
@@ -9055,7 +9077,7 @@ function Ps(e, t, n) {
|
|
|
9055
9077
|
}
|
|
9056
9078
|
//#endregion
|
|
9057
9079
|
//#region src/core/renderers/Indicator/mainIndicatorLegend.ts
|
|
9058
|
-
function
|
|
9080
|
+
function Is(e) {
|
|
9059
9081
|
let t = {
|
|
9060
9082
|
yPaddingPx: e.yPaddingPx,
|
|
9061
9083
|
indicators: {
|
|
@@ -9105,32 +9127,32 @@ function Fs(e) {
|
|
|
9105
9127
|
let t = `MA${e}`;
|
|
9106
9128
|
r.push({
|
|
9107
9129
|
label: `MA${e}`,
|
|
9108
|
-
color:
|
|
9109
|
-
value:
|
|
9130
|
+
color: Ma[t] || Ma.MA5,
|
|
9131
|
+
value: Fs(a, o, e)
|
|
9110
9132
|
});
|
|
9111
9133
|
}) : r.push({
|
|
9112
9134
|
label: "MA5",
|
|
9113
|
-
color:
|
|
9114
|
-
value:
|
|
9135
|
+
color: Ma.MA5,
|
|
9136
|
+
value: Fs(a, o, 5)
|
|
9115
9137
|
}, {
|
|
9116
9138
|
label: "MA10",
|
|
9117
|
-
color:
|
|
9118
|
-
value:
|
|
9139
|
+
color: Ma.MA10,
|
|
9140
|
+
value: Fs(a, o, 10)
|
|
9119
9141
|
}, {
|
|
9120
9142
|
label: "MA20",
|
|
9121
|
-
color:
|
|
9122
|
-
value:
|
|
9143
|
+
color: Ma.MA20,
|
|
9144
|
+
value: Fs(a, o, 20)
|
|
9123
9145
|
}, {
|
|
9124
9146
|
label: "MA30",
|
|
9125
|
-
color:
|
|
9126
|
-
value:
|
|
9147
|
+
color: Ma.MA30,
|
|
9148
|
+
value: Fs(a, o, 30)
|
|
9127
9149
|
}, {
|
|
9128
9150
|
label: "MA60",
|
|
9129
|
-
color:
|
|
9130
|
-
value:
|
|
9151
|
+
color: Ma.MA60,
|
|
9152
|
+
value: Fs(a, o, 60)
|
|
9131
9153
|
}), r.length > 0) {
|
|
9132
9154
|
let i = 12, a = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9133
|
-
n.fillStyle = X.NEUTRAL, n.fillText("
|
|
9155
|
+
n.fillStyle = X.NEUTRAL, n.fillText("MA", i, a), i += n.measureText("MA").width + 10;
|
|
9134
9156
|
for (let e of r) {
|
|
9135
9157
|
let t = typeof e.value == "number" ? ` ${e.value.toFixed(2)}` : "", r = `${e.label}${t}`;
|
|
9136
9158
|
n.fillStyle = e.color, n.fillText(r, i, a), i += n.measureText(r).width + 10;
|
|
@@ -9139,18 +9161,18 @@ function Fs(e) {
|
|
|
9139
9161
|
} });
|
|
9140
9162
|
let l = t.indicators.BOLL;
|
|
9141
9163
|
l?.enabled && s.push({ draw: (e) => {
|
|
9142
|
-
let r = l.params.period ?? 20, i = l.params.multiplier ?? 2, s =
|
|
9143
|
-
n.fillStyle = X.NEUTRAL, n.fillText(`BOLL(${r},${i})`, c, u), c += n.measureText(`BOLL(${r},${i})`).width + 10, s && (n.fillStyle =
|
|
9164
|
+
let r = l.params.period ?? 20, i = l.params.multiplier ?? 2, s = Os(a, o, r, i), c = 12, u = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9165
|
+
n.fillStyle = X.NEUTRAL, n.fillText(`BOLL(${r},${i})`, c, u), c += n.measureText(`BOLL(${r},${i})`).width + 10, s && (n.fillStyle = Na.UPPER, n.fillText(`上轨:${s.upper.toFixed(2)}`, c, u), c += n.measureText(`上轨:${s.upper.toFixed(2)}`).width + 10, n.fillStyle = Na.MIDDLE, n.fillText(`中轨:${s.middle.toFixed(2)}`, c, u), c += n.measureText(`中轨:${s.middle.toFixed(2)}`).width + 10, n.fillStyle = Na.LOWER, n.fillText(`下轨:${s.lower.toFixed(2)}`, c, u));
|
|
9144
9166
|
} });
|
|
9145
9167
|
let u = t.indicators.EXPMA;
|
|
9146
9168
|
u?.enabled && s.push({ draw: (e) => {
|
|
9147
|
-
let r = u.params.fastPeriod ?? 12, i = u.params.slowPeriod ?? 50, s =
|
|
9148
|
-
n.fillStyle = X.NEUTRAL, n.fillText(`EXPMA(${r},${i})`, c, l), c += n.measureText(`EXPMA(${r},${i})`).width + 10, s && (n.fillStyle =
|
|
9169
|
+
let r = u.params.fastPeriod ?? 12, i = u.params.slowPeriod ?? 50, s = As(a, o, r, i), c = 12, l = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9170
|
+
n.fillStyle = X.NEUTRAL, n.fillText(`EXPMA(${r},${i})`, c, l), c += n.measureText(`EXPMA(${r},${i})`).width + 10, s && (n.fillStyle = Va.FAST, n.fillText(`快:${s.fast.toFixed(2)}`, c, l), c += n.measureText(`快:${s.fast.toFixed(2)}`).width + 10, n.fillStyle = Va.SLOW, n.fillText(`慢:${s.slow.toFixed(2)}`, c, l));
|
|
9149
9171
|
} });
|
|
9150
9172
|
let d = t.indicators.ENE;
|
|
9151
9173
|
d?.enabled && s.push({ draw: (e) => {
|
|
9152
|
-
let r = d.params.period ?? 10, i = d.params.deviation ?? 11, s =
|
|
9153
|
-
n.fillStyle = X.NEUTRAL, n.fillText(`ENE(${r},${i})`, c, l), c += n.measureText(`ENE(${r},${i})`).width + 10, s && (n.fillStyle =
|
|
9174
|
+
let r = d.params.period ?? 10, i = d.params.deviation ?? 11, s = Ns(a, o, r, i), c = 12, l = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9175
|
+
n.fillStyle = X.NEUTRAL, n.fillText(`ENE(${r},${i})`, c, l), c += n.measureText(`ENE(${r},${i})`).width + 10, s && (n.fillStyle = Ha.UPPER, n.fillText(`上轨:${s.upper.toFixed(2)}`, c, l), c += n.measureText(`上轨:${s.upper.toFixed(2)}`).width + 10, n.fillStyle = Ha.MIDDLE, n.fillText(`中轨:${s.middle.toFixed(2)}`, c, l), c += n.measureText(`中轨:${s.middle.toFixed(2)}`).width + 10, n.fillStyle = Ha.LOWER, n.fillText(`下轨:${s.lower.toFixed(2)}`, c, l));
|
|
9154
9176
|
} }), s.forEach((e, t) => e.draw(t)), n.restore();
|
|
9155
9177
|
},
|
|
9156
9178
|
getConfig() {
|
|
@@ -9169,7 +9191,7 @@ function Fs(e) {
|
|
|
9169
9191
|
}
|
|
9170
9192
|
//#endregion
|
|
9171
9193
|
//#region src/core/renderers/Indicator/macd.ts
|
|
9172
|
-
function
|
|
9194
|
+
function Ls(e, t) {
|
|
9173
9195
|
let n = Array(e.length), r = 2 / (t + 1);
|
|
9174
9196
|
if (e.length === 0) return n;
|
|
9175
9197
|
n[0] = e[0].close;
|
|
@@ -9179,7 +9201,7 @@ function Is(e, t) {
|
|
|
9179
9201
|
}
|
|
9180
9202
|
return n;
|
|
9181
9203
|
}
|
|
9182
|
-
function
|
|
9204
|
+
function Rs(e, t) {
|
|
9183
9205
|
let n = Array(e.length), r = 2 / (t + 1), i = e.findIndex((e) => e !== void 0);
|
|
9184
9206
|
if (i === -1) return n;
|
|
9185
9207
|
n[i] = e[i];
|
|
@@ -9189,15 +9211,15 @@ function Ls(e, t) {
|
|
|
9189
9211
|
}
|
|
9190
9212
|
return n;
|
|
9191
9213
|
}
|
|
9192
|
-
function
|
|
9214
|
+
function zs(e, t, n, r) {
|
|
9193
9215
|
let i = Array(e.length);
|
|
9194
9216
|
if (e.length < n) return i;
|
|
9195
|
-
let a =
|
|
9217
|
+
let a = Ls(e, t), o = Ls(e, n), s = Array(e.length);
|
|
9196
9218
|
for (let t = 0; t < e.length; t++) {
|
|
9197
9219
|
let e = a[t], n = o[t];
|
|
9198
9220
|
e !== void 0 && n !== void 0 && (s[t] = e - n);
|
|
9199
9221
|
}
|
|
9200
|
-
let c =
|
|
9222
|
+
let c = Rs(s, r);
|
|
9201
9223
|
for (let t = 0; t < e.length; t++) {
|
|
9202
9224
|
let e = s[t], n = c[t];
|
|
9203
9225
|
e !== void 0 && n !== void 0 && (i[t] = {
|
|
@@ -9208,7 +9230,7 @@ function Rs(e, t, n, r) {
|
|
|
9208
9230
|
}
|
|
9209
9231
|
return i;
|
|
9210
9232
|
}
|
|
9211
|
-
function
|
|
9233
|
+
function Bs(e = {}) {
|
|
9212
9234
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9213
9235
|
fastPeriod: 12,
|
|
9214
9236
|
slowPeriod: 26,
|
|
@@ -9219,7 +9241,7 @@ function zs(e = {}) {
|
|
|
9219
9241
|
...n
|
|
9220
9242
|
}, i = null, a = 0, o = 0, s = 0, c = [];
|
|
9221
9243
|
function l(e) {
|
|
9222
|
-
return (i !== e || a !== r.fastPeriod || o !== r.slowPeriod || s !== r.signalPeriod) && (c =
|
|
9244
|
+
return (i !== e || a !== r.fastPeriod || o !== r.slowPeriod || s !== r.signalPeriod) && (c = zs(e, r.fastPeriod, r.slowPeriod, r.signalPeriod), i = e, a = r.fastPeriod, o = r.slowPeriod, s = r.signalPeriod), c;
|
|
9223
9245
|
}
|
|
9224
9246
|
return {
|
|
9225
9247
|
name: `macd_${t}`,
|
|
@@ -9250,11 +9272,11 @@ function zs(e = {}) {
|
|
|
9250
9272
|
let c = o + (s - e) / 2, l = n.height - (i.macd - _) / v * n.height, u = i.macd >= 0, f = r > 0 ? p[r - 1] : null, m;
|
|
9251
9273
|
m = f ? i.macd >= f.macd : !0;
|
|
9252
9274
|
let h;
|
|
9253
|
-
h = u ? m ?
|
|
9275
|
+
h = u ? m ? Pa.BAR_UP : Pa.BAR_UP_LIGHT : m ? Pa.BAR_DOWN_LIGHT : Pa.BAR_DOWN, t.fillStyle = h, u ? t.fillRect(c, l, e, y - l) : t.fillRect(c, y, e, l - y);
|
|
9254
9276
|
}
|
|
9255
9277
|
}
|
|
9256
9278
|
if (r.showDIF) {
|
|
9257
|
-
t.strokeStyle =
|
|
9279
|
+
t.strokeStyle = Pa.DIF, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9258
9280
|
let e = !0;
|
|
9259
9281
|
for (let r = b; r < x; r++) {
|
|
9260
9282
|
let i = p[r];
|
|
@@ -9267,7 +9289,7 @@ function zs(e = {}) {
|
|
|
9267
9289
|
t.stroke();
|
|
9268
9290
|
}
|
|
9269
9291
|
if (r.showDEA) {
|
|
9270
|
-
t.strokeStyle =
|
|
9292
|
+
t.strokeStyle = Pa.DEA, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9271
9293
|
let e = !0;
|
|
9272
9294
|
for (let r = b; r < x; r++) {
|
|
9273
9295
|
let i = p[r];
|
|
@@ -9292,11 +9314,11 @@ function zs(e = {}) {
|
|
|
9292
9314
|
}
|
|
9293
9315
|
};
|
|
9294
9316
|
}
|
|
9295
|
-
function Bs(e, t, n = 12, r = 26, i = 9) {
|
|
9296
|
-
return t < r || t >= e.length ? null : Rs(e, n, r, i)[t] ?? null;
|
|
9297
|
-
}
|
|
9298
9317
|
function Vs(e, t, n = 12, r = 26, i = 9) {
|
|
9299
|
-
|
|
9318
|
+
return t < r || t >= e.length ? null : zs(e, n, r, i)[t] ?? null;
|
|
9319
|
+
}
|
|
9320
|
+
function Hs(e, t, n = 12, r = 26, i = 9) {
|
|
9321
|
+
let a = Vs(e, t, n, r, i);
|
|
9300
9322
|
return a ? {
|
|
9301
9323
|
name: "MACD",
|
|
9302
9324
|
params: [
|
|
@@ -9308,24 +9330,24 @@ function Vs(e, t, n = 12, r = 26, i = 9) {
|
|
|
9308
9330
|
{
|
|
9309
9331
|
label: "DIF",
|
|
9310
9332
|
value: a.dif,
|
|
9311
|
-
color:
|
|
9333
|
+
color: Pa.DIF
|
|
9312
9334
|
},
|
|
9313
9335
|
{
|
|
9314
9336
|
label: "DEA",
|
|
9315
9337
|
value: a.dea,
|
|
9316
|
-
color:
|
|
9338
|
+
color: Pa.DEA
|
|
9317
9339
|
},
|
|
9318
9340
|
{
|
|
9319
9341
|
label: "MACD",
|
|
9320
9342
|
value: a.macd,
|
|
9321
|
-
color: a.macd >= 0 ?
|
|
9343
|
+
color: a.macd >= 0 ? Pa.BAR_UP : Pa.BAR_DOWN
|
|
9322
9344
|
}
|
|
9323
9345
|
]
|
|
9324
9346
|
} : null;
|
|
9325
9347
|
}
|
|
9326
9348
|
//#endregion
|
|
9327
9349
|
//#region src/core/renderers/Indicator/rsi.ts
|
|
9328
|
-
function
|
|
9350
|
+
function Us(e, t) {
|
|
9329
9351
|
let n = Array(e.length);
|
|
9330
9352
|
if (e.length < t + 1) return n;
|
|
9331
9353
|
let r = [];
|
|
@@ -9347,7 +9369,7 @@ function Hs(e, t) {
|
|
|
9347
9369
|
}
|
|
9348
9370
|
return n;
|
|
9349
9371
|
}
|
|
9350
|
-
function
|
|
9372
|
+
function Ws(e = {}) {
|
|
9351
9373
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9352
9374
|
period1: 6,
|
|
9353
9375
|
period2: 12,
|
|
@@ -9358,7 +9380,7 @@ function Us(e = {}) {
|
|
|
9358
9380
|
...n
|
|
9359
9381
|
}, i = null, a = 0, o = 0, s = 0, c = [], l = [], u = [];
|
|
9360
9382
|
function d(e) {
|
|
9361
|
-
return (i !== e || a !== r.period1 || o !== r.period2 || s !== r.period3) && (c =
|
|
9383
|
+
return (i !== e || a !== r.period1 || o !== r.period2 || s !== r.period3) && (c = Us(e, r.period1), l = Us(e, r.period2), u = Us(e, r.period3), i = e, a = r.period1, o = r.period2, s = r.period3), {
|
|
9362
9384
|
rsi1: c,
|
|
9363
9385
|
rsi2: l,
|
|
9364
9386
|
rsi3: u
|
|
@@ -9391,7 +9413,7 @@ function Us(e = {}) {
|
|
|
9391
9413
|
}
|
|
9392
9414
|
t.stroke();
|
|
9393
9415
|
};
|
|
9394
|
-
r.showRSI1 && S(f,
|
|
9416
|
+
r.showRSI1 && S(f, Fa.RSI1), r.showRSI2 && S(p, Fa.RSI2), r.showRSI3 && S(m, Fa.RSI3), t.restore();
|
|
9395
9417
|
},
|
|
9396
9418
|
onDataUpdate() {
|
|
9397
9419
|
i = null;
|
|
@@ -9404,21 +9426,21 @@ function Us(e = {}) {
|
|
|
9404
9426
|
}
|
|
9405
9427
|
};
|
|
9406
9428
|
}
|
|
9407
|
-
function
|
|
9429
|
+
function Gs(e, t, n = 6, r = 12, i = 24) {
|
|
9408
9430
|
if (t < n + 1 || t >= e.length) return null;
|
|
9409
|
-
let a =
|
|
9431
|
+
let a = Us(e, n)[t], o = Us(e, r)[t], s = Us(e, i)[t], c = [];
|
|
9410
9432
|
return a !== void 0 && c.push({
|
|
9411
9433
|
label: `RSI${n}`,
|
|
9412
9434
|
value: a,
|
|
9413
|
-
color:
|
|
9435
|
+
color: Fa.RSI1
|
|
9414
9436
|
}), o !== void 0 && c.push({
|
|
9415
9437
|
label: `RSI${r}`,
|
|
9416
9438
|
value: o,
|
|
9417
|
-
color:
|
|
9439
|
+
color: Fa.RSI2
|
|
9418
9440
|
}), s !== void 0 && c.push({
|
|
9419
9441
|
label: `RSI${i}`,
|
|
9420
9442
|
value: s,
|
|
9421
|
-
color:
|
|
9443
|
+
color: Fa.RSI3
|
|
9422
9444
|
}), c.length === 0 ? null : {
|
|
9423
9445
|
name: "RSI",
|
|
9424
9446
|
params: [
|
|
@@ -9431,7 +9453,7 @@ function Ws(e, t, n = 6, r = 12, i = 24) {
|
|
|
9431
9453
|
}
|
|
9432
9454
|
//#endregion
|
|
9433
9455
|
//#region src/core/renderers/Indicator/cci.ts
|
|
9434
|
-
function
|
|
9456
|
+
function Ks(e, t) {
|
|
9435
9457
|
let n = Array(e.length);
|
|
9436
9458
|
if (e.length < t) return n;
|
|
9437
9459
|
let r = e.map((e) => (e.high + e.low + e.close) / 3);
|
|
@@ -9445,14 +9467,14 @@ function Gs(e, t) {
|
|
|
9445
9467
|
}
|
|
9446
9468
|
return n;
|
|
9447
9469
|
}
|
|
9448
|
-
function
|
|
9470
|
+
function qs(e = {}) {
|
|
9449
9471
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9450
9472
|
period: 14,
|
|
9451
9473
|
showCCI: !0,
|
|
9452
9474
|
...n
|
|
9453
9475
|
}, i = null, a = 0, o = [];
|
|
9454
9476
|
function s(e) {
|
|
9455
|
-
return (i !== e || a !== r.period) && (o =
|
|
9477
|
+
return (i !== e || a !== r.period) && (o = Ks(e, r.period), i = e, a = r.period), o;
|
|
9456
9478
|
}
|
|
9457
9479
|
return {
|
|
9458
9480
|
name: `cci_${t}`,
|
|
@@ -9474,10 +9496,10 @@ function Ks(e = {}) {
|
|
|
9474
9496
|
let h = p - m || 1, g = n.height - (0 - m) / h * n.height;
|
|
9475
9497
|
t.save(), t.translate(-o, 0);
|
|
9476
9498
|
let _ = n.height - (100 - m) / h * n.height, v = n.height - (-100 - m) / h * n.height, y = o, b = o + e.paneWidth;
|
|
9477
|
-
t.strokeStyle =
|
|
9499
|
+
t.strokeStyle = Ia.OVERBOUGHT, t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(y, _), t.lineTo(b, _), t.stroke(), t.strokeStyle = Ia.OVERSOLD, t.beginPath(), t.moveTo(y, v), t.lineTo(b, v), t.stroke(), t.strokeStyle = "rgba(0, 0, 0, 0.1)", t.beginPath(), t.moveTo(y, g), t.lineTo(b, g), t.stroke(), t.setLineDash([]);
|
|
9478
9500
|
let x = Math.max(a.start, r.period - 1), S = Math.min(a.end, d.length);
|
|
9479
9501
|
if (r.showCCI) {
|
|
9480
|
-
t.strokeStyle =
|
|
9502
|
+
t.strokeStyle = Ia.CCI, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9481
9503
|
let e = !0;
|
|
9482
9504
|
for (let r = x; r < S; r++) {
|
|
9483
9505
|
let i = f[r];
|
|
@@ -9502,25 +9524,25 @@ function Ks(e = {}) {
|
|
|
9502
9524
|
}
|
|
9503
9525
|
};
|
|
9504
9526
|
}
|
|
9505
|
-
function
|
|
9506
|
-
return
|
|
9527
|
+
function Js(e, t, n) {
|
|
9528
|
+
return Ks(e, n)[t];
|
|
9507
9529
|
}
|
|
9508
|
-
function
|
|
9530
|
+
function Ys(e, t, n = 14) {
|
|
9509
9531
|
if (t < n || t >= e.length) return null;
|
|
9510
|
-
let r =
|
|
9532
|
+
let r = Js(e, t, n);
|
|
9511
9533
|
return r === void 0 ? null : {
|
|
9512
9534
|
name: "CCI",
|
|
9513
9535
|
params: [n],
|
|
9514
9536
|
values: [{
|
|
9515
9537
|
label: "CCI",
|
|
9516
9538
|
value: r,
|
|
9517
|
-
color:
|
|
9539
|
+
color: Ia.CCI
|
|
9518
9540
|
}]
|
|
9519
9541
|
};
|
|
9520
9542
|
}
|
|
9521
9543
|
//#endregion
|
|
9522
9544
|
//#region src/core/renderers/Indicator/stoch.ts
|
|
9523
|
-
function
|
|
9545
|
+
function Xs(e, t, n) {
|
|
9524
9546
|
let r = Array(e.length);
|
|
9525
9547
|
if (e.length < t) return r;
|
|
9526
9548
|
let i = Array(e.length);
|
|
@@ -9548,7 +9570,7 @@ function Ys(e, t, n) {
|
|
|
9548
9570
|
}
|
|
9549
9571
|
return r;
|
|
9550
9572
|
}
|
|
9551
|
-
function
|
|
9573
|
+
function Zs(e = {}) {
|
|
9552
9574
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9553
9575
|
n: 9,
|
|
9554
9576
|
m: 3,
|
|
@@ -9557,7 +9579,7 @@ function Xs(e = {}) {
|
|
|
9557
9579
|
...n
|
|
9558
9580
|
}, i = null, a = 0, o = 0, s = [];
|
|
9559
9581
|
function c(e) {
|
|
9560
|
-
return (i !== e || a !== r.n || o !== r.m) && (s =
|
|
9582
|
+
return (i !== e || a !== r.n || o !== r.m) && (s = Xs(e, r.n, r.m), i = e, a = r.n, o = r.m), s;
|
|
9561
9583
|
}
|
|
9562
9584
|
return {
|
|
9563
9585
|
name: `stoch_${t}`,
|
|
@@ -9575,7 +9597,7 @@ function Xs(e = {}) {
|
|
|
9575
9597
|
t.strokeStyle = "rgba(0, 0, 0, 0.1)", t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(h, p), t.lineTo(g, p), t.moveTo(h, m), t.lineTo(g, m), t.stroke(), t.setLineDash([]);
|
|
9576
9598
|
let _ = Math.max(a.start, r.n + r.m - 2), v = Math.min(a.end, d.length);
|
|
9577
9599
|
if (r.showK) {
|
|
9578
|
-
t.strokeStyle =
|
|
9600
|
+
t.strokeStyle = La.K, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9579
9601
|
let e = !0;
|
|
9580
9602
|
for (let r = _; r < v; r++) {
|
|
9581
9603
|
let i = f[r];
|
|
@@ -9588,7 +9610,7 @@ function Xs(e = {}) {
|
|
|
9588
9610
|
t.stroke();
|
|
9589
9611
|
}
|
|
9590
9612
|
if (r.showD) {
|
|
9591
|
-
t.strokeStyle =
|
|
9613
|
+
t.strokeStyle = La.D, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9592
9614
|
let e = !0;
|
|
9593
9615
|
for (let r = _; r < v; r++) {
|
|
9594
9616
|
let i = f[r];
|
|
@@ -9613,29 +9635,29 @@ function Xs(e = {}) {
|
|
|
9613
9635
|
}
|
|
9614
9636
|
};
|
|
9615
9637
|
}
|
|
9616
|
-
function
|
|
9617
|
-
return
|
|
9638
|
+
function Qs(e, t, n, r) {
|
|
9639
|
+
return Xs(e, n, r)[t];
|
|
9618
9640
|
}
|
|
9619
|
-
function
|
|
9641
|
+
function $s(e, t, n = 9, r = 3) {
|
|
9620
9642
|
if (t < n + r - 1 || t >= e.length) return null;
|
|
9621
|
-
let i =
|
|
9643
|
+
let i = Qs(e, t, n, r);
|
|
9622
9644
|
return i ? {
|
|
9623
9645
|
name: "STOCH",
|
|
9624
9646
|
params: [n, r],
|
|
9625
9647
|
values: [{
|
|
9626
9648
|
label: "K",
|
|
9627
9649
|
value: i.k,
|
|
9628
|
-
color:
|
|
9650
|
+
color: La.K
|
|
9629
9651
|
}, {
|
|
9630
9652
|
label: "D",
|
|
9631
9653
|
value: i.d,
|
|
9632
|
-
color:
|
|
9654
|
+
color: La.D
|
|
9633
9655
|
}]
|
|
9634
9656
|
} : null;
|
|
9635
9657
|
}
|
|
9636
9658
|
//#endregion
|
|
9637
9659
|
//#region src/core/renderers/Indicator/mom.ts
|
|
9638
|
-
function
|
|
9660
|
+
function ec(e, t) {
|
|
9639
9661
|
let n = Array(e.length);
|
|
9640
9662
|
if (e.length < t + 1) return n;
|
|
9641
9663
|
for (let r = t; r < e.length; r++) {
|
|
@@ -9644,14 +9666,14 @@ function $s(e, t) {
|
|
|
9644
9666
|
}
|
|
9645
9667
|
return n;
|
|
9646
9668
|
}
|
|
9647
|
-
function
|
|
9669
|
+
function tc(e = {}) {
|
|
9648
9670
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9649
9671
|
period: 10,
|
|
9650
9672
|
showMOM: !0,
|
|
9651
9673
|
...n
|
|
9652
9674
|
}, i = null, a = 0, o = [];
|
|
9653
9675
|
function s(e) {
|
|
9654
|
-
return (i !== e || a !== r.period) && (o =
|
|
9676
|
+
return (i !== e || a !== r.period) && (o = ec(e, r.period), i = e, a = r.period), o;
|
|
9655
9677
|
}
|
|
9656
9678
|
return {
|
|
9657
9679
|
name: `mom_${t}`,
|
|
@@ -9674,10 +9696,10 @@ function ec(e = {}) {
|
|
|
9674
9696
|
let g = p - m || 1, _ = n.height - (0 - m) / g * n.height;
|
|
9675
9697
|
t.save(), t.translate(-o, 0);
|
|
9676
9698
|
let v = o, y = o + e.paneWidth;
|
|
9677
|
-
t.strokeStyle =
|
|
9699
|
+
t.strokeStyle = Ra.ZERO, t.lineWidth = 1, t.beginPath(), t.moveTo(v, _), t.lineTo(y, _), t.stroke();
|
|
9678
9700
|
let b = Math.max(a.start, r.period), x = Math.min(a.end, d.length);
|
|
9679
9701
|
if (r.showMOM) {
|
|
9680
|
-
t.strokeStyle =
|
|
9702
|
+
t.strokeStyle = Ra.MOM, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9681
9703
|
let e = !0;
|
|
9682
9704
|
for (let r = b; r < x; r++) {
|
|
9683
9705
|
let i = f[r];
|
|
@@ -9702,25 +9724,25 @@ function ec(e = {}) {
|
|
|
9702
9724
|
}
|
|
9703
9725
|
};
|
|
9704
9726
|
}
|
|
9705
|
-
function
|
|
9706
|
-
return
|
|
9727
|
+
function nc(e, t, n) {
|
|
9728
|
+
return ec(e, n)[t];
|
|
9707
9729
|
}
|
|
9708
|
-
function
|
|
9730
|
+
function rc(e, t, n = 10) {
|
|
9709
9731
|
if (t < n || t >= e.length) return null;
|
|
9710
|
-
let r =
|
|
9732
|
+
let r = nc(e, t, n);
|
|
9711
9733
|
return r === void 0 ? null : {
|
|
9712
9734
|
name: "MOM",
|
|
9713
9735
|
params: [n],
|
|
9714
9736
|
values: [{
|
|
9715
9737
|
label: "MOM",
|
|
9716
9738
|
value: r,
|
|
9717
|
-
color:
|
|
9739
|
+
color: Ra.MOM
|
|
9718
9740
|
}]
|
|
9719
9741
|
};
|
|
9720
9742
|
}
|
|
9721
9743
|
//#endregion
|
|
9722
9744
|
//#region src/core/renderers/Indicator/wmsr.ts
|
|
9723
|
-
function
|
|
9745
|
+
function ic(e, t) {
|
|
9724
9746
|
let n = Array(e.length);
|
|
9725
9747
|
if (e.length < t) return n;
|
|
9726
9748
|
for (let r = t - 1; r < e.length; r++) {
|
|
@@ -9734,14 +9756,14 @@ function rc(e, t) {
|
|
|
9734
9756
|
}
|
|
9735
9757
|
return n;
|
|
9736
9758
|
}
|
|
9737
|
-
function
|
|
9759
|
+
function ac(e = {}) {
|
|
9738
9760
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9739
9761
|
period: 14,
|
|
9740
9762
|
showWMSR: !0,
|
|
9741
9763
|
...n
|
|
9742
9764
|
}, i = null, a = 0, o = [];
|
|
9743
9765
|
function s(e) {
|
|
9744
|
-
return (i !== e || a !== r.period) && (o =
|
|
9766
|
+
return (i !== e || a !== r.period) && (o = ic(e, r.period), i = e, a = r.period), o;
|
|
9745
9767
|
}
|
|
9746
9768
|
return {
|
|
9747
9769
|
name: `wmsr_${t}`,
|
|
@@ -9756,10 +9778,10 @@ function ic(e = {}) {
|
|
|
9756
9778
|
let f = s(d), p = -100;
|
|
9757
9779
|
0 - p, t.save(), t.translate(-o, 0);
|
|
9758
9780
|
let m = n.height - (-20 - p) / 100 * n.height, h = n.height - (-80 - p) / 100 * n.height, g = n.height - (-50 - p) / 100 * n.height, _ = o, v = o + e.paneWidth;
|
|
9759
|
-
t.strokeStyle =
|
|
9781
|
+
t.strokeStyle = za.OVERBOUGHT, t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(_, m), t.lineTo(v, m), t.stroke(), t.strokeStyle = za.OVERSOLD, t.beginPath(), t.moveTo(_, h), t.lineTo(v, h), t.stroke(), t.strokeStyle = "rgba(0, 0, 0, 0.1)", t.beginPath(), t.moveTo(_, g), t.lineTo(v, g), t.stroke(), t.setLineDash([]);
|
|
9760
9782
|
let y = Math.max(a.start, r.period - 1), b = Math.min(a.end, d.length);
|
|
9761
9783
|
if (r.showWMSR) {
|
|
9762
|
-
t.strokeStyle =
|
|
9784
|
+
t.strokeStyle = za.WMSR, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9763
9785
|
let e = !0;
|
|
9764
9786
|
for (let r = y; r < b; r++) {
|
|
9765
9787
|
let i = f[r];
|
|
@@ -9784,25 +9806,25 @@ function ic(e = {}) {
|
|
|
9784
9806
|
}
|
|
9785
9807
|
};
|
|
9786
9808
|
}
|
|
9787
|
-
function
|
|
9788
|
-
return
|
|
9809
|
+
function oc(e, t, n) {
|
|
9810
|
+
return ic(e, n)[t];
|
|
9789
9811
|
}
|
|
9790
|
-
function
|
|
9812
|
+
function sc(e, t, n = 14) {
|
|
9791
9813
|
if (t < n || t >= e.length) return null;
|
|
9792
|
-
let r =
|
|
9814
|
+
let r = oc(e, t, n);
|
|
9793
9815
|
return r === void 0 ? null : {
|
|
9794
9816
|
name: "WMSR",
|
|
9795
9817
|
params: [n],
|
|
9796
9818
|
values: [{
|
|
9797
9819
|
label: "WMSR",
|
|
9798
9820
|
value: r,
|
|
9799
|
-
color:
|
|
9821
|
+
color: za.WMSR
|
|
9800
9822
|
}]
|
|
9801
9823
|
};
|
|
9802
9824
|
}
|
|
9803
9825
|
//#endregion
|
|
9804
9826
|
//#region src/core/renderers/Indicator/kst.ts
|
|
9805
|
-
function
|
|
9827
|
+
function cc(e, t) {
|
|
9806
9828
|
let n = Array(e.length);
|
|
9807
9829
|
if (e.length < t + 1) return n;
|
|
9808
9830
|
for (let r = t; r < e.length; r++) {
|
|
@@ -9811,7 +9833,7 @@ function sc(e, t) {
|
|
|
9811
9833
|
}
|
|
9812
9834
|
return n;
|
|
9813
9835
|
}
|
|
9814
|
-
function
|
|
9836
|
+
function lc(e, t) {
|
|
9815
9837
|
let n = Array(e.length), r = 0, i = 0;
|
|
9816
9838
|
for (let a = 0; a < e.length; a++) {
|
|
9817
9839
|
let o = e[a];
|
|
@@ -9825,13 +9847,13 @@ function cc(e, t) {
|
|
|
9825
9847
|
}
|
|
9826
9848
|
return n;
|
|
9827
9849
|
}
|
|
9828
|
-
function
|
|
9829
|
-
let o = Array(e.length), s =
|
|
9850
|
+
function uc(e, t, n, r, i, a) {
|
|
9851
|
+
let o = Array(e.length), s = cc(e, t), c = cc(e, n), l = cc(e, r), u = cc(e, i), d = lc(s, 10), f = lc(c, 10), p = lc(l, 10), m = lc(u, 15), h = Array(e.length);
|
|
9830
9852
|
for (let t = 0; t < e.length; t++) {
|
|
9831
9853
|
let e = d[t], n = f[t], r = p[t], i = m[t];
|
|
9832
9854
|
e !== void 0 && n !== void 0 && r !== void 0 && i !== void 0 && (h[t] = e * 1 + n * 2 + r * 3 + i * 4);
|
|
9833
9855
|
}
|
|
9834
|
-
let g =
|
|
9856
|
+
let g = lc(h, a);
|
|
9835
9857
|
for (let t = 0; t < e.length; t++) {
|
|
9836
9858
|
let e = h[t], n = g[t];
|
|
9837
9859
|
e !== void 0 && n !== void 0 && (o[t] = {
|
|
@@ -9841,7 +9863,7 @@ function lc(e, t, n, r, i, a) {
|
|
|
9841
9863
|
}
|
|
9842
9864
|
return o;
|
|
9843
9865
|
}
|
|
9844
|
-
function
|
|
9866
|
+
function dc(e = {}) {
|
|
9845
9867
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9846
9868
|
roc1: 10,
|
|
9847
9869
|
roc2: 15,
|
|
@@ -9854,7 +9876,7 @@ function uc(e = {}) {
|
|
|
9854
9876
|
}, i = null, a = "", o = [];
|
|
9855
9877
|
function s(e) {
|
|
9856
9878
|
let t = `${r.roc1}-${r.roc2}-${r.roc3}-${r.roc4}-${r.signalPeriod}`;
|
|
9857
|
-
return (i !== e || a !== t) && (o =
|
|
9879
|
+
return (i !== e || a !== t) && (o = uc(e, r.roc1, r.roc2, r.roc3, r.roc4, r.signalPeriod), i = e, a = t), o;
|
|
9858
9880
|
}
|
|
9859
9881
|
return {
|
|
9860
9882
|
name: `kst_${t}`,
|
|
@@ -9880,7 +9902,7 @@ function uc(e = {}) {
|
|
|
9880
9902
|
t.strokeStyle = "rgba(0, 0, 0, 0.1)", t.lineWidth = 1, t.beginPath(), t.moveTo(v, _), t.lineTo(y, _), t.stroke();
|
|
9881
9903
|
let b = Math.max(a.start, r.roc4 + 15 + r.signalPeriod - 1), x = Math.min(a.end, d.length);
|
|
9882
9904
|
if (r.showKST) {
|
|
9883
|
-
t.strokeStyle =
|
|
9905
|
+
t.strokeStyle = Ba.KST, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9884
9906
|
let e = !0;
|
|
9885
9907
|
for (let r = b; r < x; r++) {
|
|
9886
9908
|
let i = f[r];
|
|
@@ -9893,7 +9915,7 @@ function uc(e = {}) {
|
|
|
9893
9915
|
t.stroke();
|
|
9894
9916
|
}
|
|
9895
9917
|
if (r.showSignal) {
|
|
9896
|
-
t.strokeStyle =
|
|
9918
|
+
t.strokeStyle = Ba.SIGNAL, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9897
9919
|
let e = !0;
|
|
9898
9920
|
for (let r = b; r < x; r++) {
|
|
9899
9921
|
let i = f[r];
|
|
@@ -9918,12 +9940,12 @@ function uc(e = {}) {
|
|
|
9918
9940
|
}
|
|
9919
9941
|
};
|
|
9920
9942
|
}
|
|
9921
|
-
function
|
|
9922
|
-
return
|
|
9943
|
+
function fc(e, t, n, r, i, a, o) {
|
|
9944
|
+
return uc(e, n, r, i, a, o)[t];
|
|
9923
9945
|
}
|
|
9924
|
-
function
|
|
9946
|
+
function pc(e, t, n = 10, r = 15, i = 20, a = 30, o = 9) {
|
|
9925
9947
|
if (t < a + 15 + o || t >= e.length) return null;
|
|
9926
|
-
let s =
|
|
9948
|
+
let s = fc(e, t, n, r, i, a, o);
|
|
9927
9949
|
return s ? {
|
|
9928
9950
|
name: "KST",
|
|
9929
9951
|
params: [
|
|
@@ -9936,17 +9958,17 @@ function fc(e, t, n = 10, r = 15, i = 20, a = 30, o = 9) {
|
|
|
9936
9958
|
values: [{
|
|
9937
9959
|
label: "KST",
|
|
9938
9960
|
value: s.kst,
|
|
9939
|
-
color:
|
|
9961
|
+
color: Ba.KST
|
|
9940
9962
|
}, {
|
|
9941
9963
|
label: "Signal",
|
|
9942
9964
|
value: s.signal,
|
|
9943
|
-
color:
|
|
9965
|
+
color: Ba.SIGNAL
|
|
9944
9966
|
}]
|
|
9945
9967
|
} : null;
|
|
9946
9968
|
}
|
|
9947
9969
|
//#endregion
|
|
9948
9970
|
//#region src/core/renderers/Indicator/fastk.ts
|
|
9949
|
-
function
|
|
9971
|
+
function mc(e, t) {
|
|
9950
9972
|
let n = Array(e.length);
|
|
9951
9973
|
if (e.length < t) return n;
|
|
9952
9974
|
for (let r = t - 1; r < e.length; r++) {
|
|
@@ -9960,14 +9982,14 @@ function pc(e, t) {
|
|
|
9960
9982
|
}
|
|
9961
9983
|
return n;
|
|
9962
9984
|
}
|
|
9963
|
-
function
|
|
9985
|
+
function hc(e = {}) {
|
|
9964
9986
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9965
9987
|
period: 9,
|
|
9966
9988
|
showFASTK: !0,
|
|
9967
9989
|
...n
|
|
9968
9990
|
}, i = null, a = 0, o = [];
|
|
9969
9991
|
function s(e) {
|
|
9970
|
-
return (i !== e || a !== r.period) && (o =
|
|
9992
|
+
return (i !== e || a !== r.period) && (o = mc(e, r.period), i = e, a = r.period), o;
|
|
9971
9993
|
}
|
|
9972
9994
|
return {
|
|
9973
9995
|
name: `fastk_${t}`,
|
|
@@ -9985,7 +10007,7 @@ function mc(e = {}) {
|
|
|
9985
10007
|
t.strokeStyle = "rgba(0, 0, 0, 0.1)", t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(h, p), t.lineTo(g, p), t.moveTo(h, m), t.lineTo(g, m), t.stroke(), t.setLineDash([]);
|
|
9986
10008
|
let _ = Math.max(a.start, r.period - 1), v = Math.min(a.end, d.length);
|
|
9987
10009
|
if (r.showFASTK) {
|
|
9988
|
-
t.strokeStyle =
|
|
10010
|
+
t.strokeStyle = La.K, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9989
10011
|
let e = !0;
|
|
9990
10012
|
for (let r = _; r < v; r++) {
|
|
9991
10013
|
let i = f[r];
|
|
@@ -10010,42 +10032,42 @@ function mc(e = {}) {
|
|
|
10010
10032
|
}
|
|
10011
10033
|
};
|
|
10012
10034
|
}
|
|
10013
|
-
function
|
|
10014
|
-
return
|
|
10035
|
+
function gc(e, t, n) {
|
|
10036
|
+
return mc(e, n)[t];
|
|
10015
10037
|
}
|
|
10016
|
-
function
|
|
10038
|
+
function _c(e, t, n = 9) {
|
|
10017
10039
|
if (t < n || t >= e.length) return null;
|
|
10018
|
-
let r =
|
|
10040
|
+
let r = gc(e, t, n);
|
|
10019
10041
|
return r === void 0 ? null : {
|
|
10020
10042
|
name: "FASTK",
|
|
10021
10043
|
params: [n],
|
|
10022
10044
|
values: [{
|
|
10023
10045
|
label: "FASTK",
|
|
10024
10046
|
value: r,
|
|
10025
|
-
color:
|
|
10047
|
+
color: La.K
|
|
10026
10048
|
}]
|
|
10027
10049
|
};
|
|
10028
10050
|
}
|
|
10029
10051
|
//#endregion
|
|
10030
10052
|
//#region src/core/renderers/Indicator/index.ts
|
|
10031
|
-
function
|
|
10053
|
+
function vc(e) {
|
|
10032
10054
|
let { indicatorId: t, paneId: n } = e;
|
|
10033
10055
|
switch (t) {
|
|
10034
|
-
case "VOLUME": return
|
|
10035
|
-
case "MACD": return
|
|
10036
|
-
case "RSI": return
|
|
10037
|
-
case "CCI": return
|
|
10038
|
-
case "STOCH": return
|
|
10039
|
-
case "MOM": return
|
|
10040
|
-
case "WMSR": return
|
|
10041
|
-
case "KST": return
|
|
10042
|
-
case "FASTK": return
|
|
10056
|
+
case "VOLUME": return _s({ paneId: n });
|
|
10057
|
+
case "MACD": return Bs({ paneId: n });
|
|
10058
|
+
case "RSI": return Ws({ paneId: n });
|
|
10059
|
+
case "CCI": return qs({ paneId: n });
|
|
10060
|
+
case "STOCH": return Zs({ paneId: n });
|
|
10061
|
+
case "MOM": return tc({ paneId: n });
|
|
10062
|
+
case "WMSR": return ac({ paneId: n });
|
|
10063
|
+
case "KST": return dc({ paneId: n });
|
|
10064
|
+
case "FASTK": return hc({ paneId: n });
|
|
10043
10065
|
default: throw Error(`Unknown indicator: ${t}`);
|
|
10044
10066
|
}
|
|
10045
10067
|
}
|
|
10046
10068
|
//#endregion
|
|
10047
10069
|
//#region src/core/chart.ts
|
|
10048
|
-
var
|
|
10070
|
+
var yc = class e {
|
|
10049
10071
|
dom;
|
|
10050
10072
|
opt;
|
|
10051
10073
|
data = [];
|
|
@@ -10056,8 +10078,21 @@ var vc = class e {
|
|
|
10056
10078
|
interaction;
|
|
10057
10079
|
pluginHost;
|
|
10058
10080
|
rendererPluginManager;
|
|
10081
|
+
preciseDpr = 0;
|
|
10082
|
+
dprObserver;
|
|
10059
10083
|
constructor(e, t) {
|
|
10060
|
-
this.dom = e, this.opt = t, this.interaction = new
|
|
10084
|
+
if (this.dom = e, this.opt = t, this.interaction = new hs(this), this.markerManager = new yo(), this.pluginHost = fa(), this.rendererPluginManager = new ma(), this.rendererPluginManager.setPluginHost(this.pluginHost), this.rendererPluginManager.setInvalidateCallback(() => this.scheduleDraw()), this.initPanes(), typeof ResizeObserver < "u" && "devicePixelContentBoxSize" in ResizeObserverEntry.prototype) {
|
|
10085
|
+
let e = this.dom.canvasLayer;
|
|
10086
|
+
e && (this.dprObserver = new ResizeObserver((e) => {
|
|
10087
|
+
let t = e[0];
|
|
10088
|
+
if (!t) return;
|
|
10089
|
+
let n = t.devicePixelContentBoxSize?.[0], r = t.contentBoxSize?.[0];
|
|
10090
|
+
if (n && r) {
|
|
10091
|
+
let e = n.inlineSize / r.inlineSize;
|
|
10092
|
+
this.preciseDpr = Math.round(e * 64) / 64;
|
|
10093
|
+
}
|
|
10094
|
+
}), this.dprObserver.observe(e));
|
|
10095
|
+
}
|
|
10061
10096
|
}
|
|
10062
10097
|
get plugin() {
|
|
10063
10098
|
return this.pluginHost;
|
|
@@ -10083,18 +10118,11 @@ var vc = class e {
|
|
|
10083
10118
|
draw() {
|
|
10084
10119
|
this.markerManager.clear();
|
|
10085
10120
|
let e = this.computeViewport();
|
|
10086
|
-
if (!e)
|
|
10087
|
-
|
|
10088
|
-
return;
|
|
10089
|
-
}
|
|
10090
|
-
if (this.data.length === 0) {
|
|
10091
|
-
console.log("[Chart] draw aborted: no data");
|
|
10092
|
-
return;
|
|
10093
|
-
}
|
|
10094
|
-
let { start: t, end: n } = us(e.scrollLeft, e.plotWidth, this.opt.kWidth, this.opt.kGap, this.data.length, e.dpr), r = {
|
|
10121
|
+
if (!e || this.data.length === 0) return;
|
|
10122
|
+
let { start: t, end: n } = ds(e.scrollLeft, e.plotWidth, this.opt.kWidth, this.opt.kGap, this.data.length, e.dpr), r = {
|
|
10095
10123
|
start: t,
|
|
10096
10124
|
end: n
|
|
10097
|
-
}, i = this.calcKLinePositions(r), { kWidthPx: a } =
|
|
10125
|
+
}, i = this.calcKLinePositions(r), { kWidthPx: a } = us(this.opt.kWidth, this.opt.kGap, e.dpr);
|
|
10098
10126
|
this.interaction.setKLinePositions(i, r, a);
|
|
10099
10127
|
for (let t of this.paneRenderers) {
|
|
10100
10128
|
let n = t.getPane(), a = t.getDom().plotCanvas.getContext("2d"), o = t.getDom().yAxisCanvas.getContext("2d");
|
|
@@ -10103,7 +10131,7 @@ var vc = class e {
|
|
|
10103
10131
|
o && (o.setTransform(1, 0, 0, 1, 0, 0), o.scale(e.dpr, e.dpr), o.clearRect(0, 0, s, n.height + 2 / e.dpr));
|
|
10104
10132
|
let c = {
|
|
10105
10133
|
ctx: a,
|
|
10106
|
-
pane:
|
|
10134
|
+
pane: oa(n),
|
|
10107
10135
|
data: this.data,
|
|
10108
10136
|
range: r,
|
|
10109
10137
|
scrollLeft: e.scrollLeft,
|
|
@@ -10136,7 +10164,8 @@ var vc = class e {
|
|
|
10136
10164
|
priceToY: () => 0,
|
|
10137
10165
|
yToPrice: () => 0,
|
|
10138
10166
|
getPaddingTop: () => 0,
|
|
10139
|
-
getPaddingBottom: () => 0
|
|
10167
|
+
getPaddingBottom: () => 0,
|
|
10168
|
+
getPriceOffset: () => 0
|
|
10140
10169
|
},
|
|
10141
10170
|
priceRange: {
|
|
10142
10171
|
maxPrice: 0,
|
|
@@ -10209,7 +10238,7 @@ var vc = class e {
|
|
|
10209
10238
|
calcKLinePositions(e) {
|
|
10210
10239
|
let { start: t, end: n } = e, r = n - t;
|
|
10211
10240
|
if (r <= 0) return [];
|
|
10212
|
-
let i = this.viewport?.dpr || window.devicePixelRatio || 1, { unitPx: a, startXPx: o } =
|
|
10241
|
+
let i = this.viewport?.dpr || window.devicePixelRatio || 1, { unitPx: a, startXPx: o } = us(this.opt.kWidth, this.opt.kGap, i), s = Array(r);
|
|
10213
10242
|
for (let e = 0; e < r; e++) s[e] = (o + (t + e) * a) / i;
|
|
10214
10243
|
return s;
|
|
10215
10244
|
}
|
|
@@ -10227,9 +10256,9 @@ var vc = class e {
|
|
|
10227
10256
|
console.warn(`Pane "${e}" already exists`);
|
|
10228
10257
|
return;
|
|
10229
10258
|
}
|
|
10230
|
-
let t = new
|
|
10259
|
+
let t = new ms(e), n = document.createElement("canvas"), r = document.createElement("canvas"), i = e === "main";
|
|
10231
10260
|
n.id = `${e}-plot`, n.className = i ? "plot-canvas main" : "plot-canvas sub", n.style.position = "absolute", n.style.left = "0", n.style.top = "0", r.id = `${e}-yAxis`, r.className = "right-axis", r.style.position = "absolute", r.style.right = "0";
|
|
10232
|
-
let a = new
|
|
10261
|
+
let a = new gs({
|
|
10233
10262
|
plotCanvas: n,
|
|
10234
10263
|
yAxisCanvas: r
|
|
10235
10264
|
}, t, {
|
|
@@ -10260,7 +10289,7 @@ var vc = class e {
|
|
|
10260
10289
|
return n && this.updateRendererConfig(e, n), !0;
|
|
10261
10290
|
}
|
|
10262
10291
|
this.addPane(r);
|
|
10263
|
-
let i =
|
|
10292
|
+
let i = vc({
|
|
10264
10293
|
indicatorId: t,
|
|
10265
10294
|
paneId: r
|
|
10266
10295
|
});
|
|
@@ -10289,23 +10318,20 @@ var vc = class e {
|
|
|
10289
10318
|
r.yAxis.setPriceOffset(a + i), this.scheduleDraw();
|
|
10290
10319
|
}
|
|
10291
10320
|
updateData(e) {
|
|
10292
|
-
|
|
10321
|
+
this.data = e ?? [];
|
|
10293
10322
|
let t = this.dom.container;
|
|
10294
10323
|
if (t) {
|
|
10295
10324
|
let e = this.getContentWidth(), n = Math.max(0, e - t.clientWidth);
|
|
10296
10325
|
t.scrollLeft > n && (t.scrollLeft = n);
|
|
10297
10326
|
}
|
|
10298
|
-
this.
|
|
10299
|
-
start: 0,
|
|
10300
|
-
end: this.data.length
|
|
10301
|
-
}), this.interaction.reset(), this.scheduleDraw();
|
|
10327
|
+
this.interaction.reset(), this.scheduleDraw();
|
|
10302
10328
|
}
|
|
10303
10329
|
getData() {
|
|
10304
10330
|
return this.data;
|
|
10305
10331
|
}
|
|
10306
10332
|
getContentWidth() {
|
|
10307
|
-
let e = this.data?.length ?? 0, t = this.viewport?.dpr || window.devicePixelRatio || 1, { startXPx: n, unitPx: r } =
|
|
10308
|
-
return (n + e * r) / t
|
|
10333
|
+
let e = this.data?.length ?? 0, t = this.viewport?.dpr || window.devicePixelRatio || 1, { startXPx: n, unitPx: r } = us(this.opt.kWidth, this.opt.kGap, t);
|
|
10334
|
+
return (n + e * r) / t;
|
|
10309
10335
|
}
|
|
10310
10336
|
resize() {
|
|
10311
10337
|
let e = this.computeViewport();
|
|
@@ -10317,12 +10343,12 @@ var vc = class e {
|
|
|
10317
10343
|
});
|
|
10318
10344
|
}
|
|
10319
10345
|
async destroy() {
|
|
10320
|
-
this.raf != null && cancelAnimationFrame(this.raf), this.raf = null, this.viewport = null, this.paneRenderers.forEach((e) => e.destroy()), this.paneRenderers = [], this.rendererPluginManager.clear(), this.onZoomChange = void 0, await this.pluginHost.destroy();
|
|
10346
|
+
this.raf != null && cancelAnimationFrame(this.raf), this.raf = null, this.dprObserver?.disconnect(), this.dprObserver = void 0, this.preciseDpr = 0, this.viewport = null, this.paneRenderers.forEach((e) => e.destroy()), this.paneRenderers = [], this.rendererPluginManager.clear(), this.onZoomChange = void 0, await this.pluginHost.destroy();
|
|
10321
10347
|
}
|
|
10322
10348
|
initPanes() {
|
|
10323
10349
|
this.paneRenderers = this.opt.panes.map((e) => {
|
|
10324
|
-
let t = new
|
|
10325
|
-
return n.id = `${e.id}-plot`, n.className = i ? "plot-canvas main" : "plot-canvas sub", n.style.position = "absolute", n.style.left = "0", n.style.top = "0", r.id = `${e.id}-yAxis`, r.className = "right-axis", r.style.position = "absolute", r.style.right = "0", new
|
|
10350
|
+
let t = new ms(e.id), n = document.createElement("canvas"), r = document.createElement("canvas"), i = e.id === "main";
|
|
10351
|
+
return n.id = `${e.id}-plot`, n.className = i ? "plot-canvas main" : "plot-canvas sub", n.style.position = "absolute", n.style.left = "0", n.style.top = "0", r.id = `${e.id}-yAxis`, r.className = "right-axis", r.style.position = "absolute", r.style.right = "0", new gs({
|
|
10326
10352
|
plotCanvas: n,
|
|
10327
10353
|
yAxisCanvas: r
|
|
10328
10354
|
}, t, {
|
|
@@ -10356,33 +10382,37 @@ var vc = class e {
|
|
|
10356
10382
|
computeViewport() {
|
|
10357
10383
|
let e = this.dom.container;
|
|
10358
10384
|
if (!e) return null;
|
|
10359
|
-
let t = Math.max(1, Math.
|
|
10360
|
-
|
|
10385
|
+
let t = Math.max(1, Math.round(e.clientWidth)), n = Math.max(1, Math.round(e.clientHeight)), r = this.opt.rightAxisWidth + (this.opt.priceLabelWidth || 60), i = Math.round(t - r), a = Math.round(n - this.opt.bottomAxisHeight), o = this.preciseDpr > 0 ? this.preciseDpr : Math.round((window.devicePixelRatio || 1) * 64) / 64;
|
|
10386
|
+
o < 1 && (o = 1);
|
|
10387
|
+
let s = 16 * 1024 * 1024;
|
|
10388
|
+
t * o * (n * o) > s && (o = Math.sqrt(s / (t * n)));
|
|
10389
|
+
let c = Math.round(e.scrollLeft * o) / o;
|
|
10390
|
+
this.dom.canvasLayer.style.width = `${t}px`, this.dom.canvasLayer.style.height = `${n}px`, this.dom.xAxisCanvas.style.width = `${i}px`, this.dom.xAxisCanvas.style.height = `${this.opt.bottomAxisHeight}px`, this.dom.xAxisCanvas.width = Math.round(i * o), this.dom.xAxisCanvas.height = Math.round(this.opt.bottomAxisHeight * o);
|
|
10361
10391
|
let l = {
|
|
10362
10392
|
viewWidth: t,
|
|
10363
10393
|
viewHeight: n,
|
|
10364
|
-
plotWidth:
|
|
10365
|
-
plotHeight:
|
|
10366
|
-
scrollLeft:
|
|
10367
|
-
dpr:
|
|
10394
|
+
plotWidth: i,
|
|
10395
|
+
plotHeight: a,
|
|
10396
|
+
scrollLeft: c,
|
|
10397
|
+
dpr: o
|
|
10368
10398
|
};
|
|
10369
10399
|
return this.viewport = l, l;
|
|
10370
10400
|
}
|
|
10371
10401
|
};
|
|
10372
10402
|
//#endregion
|
|
10373
10403
|
//#region src/types/kLine.ts
|
|
10374
|
-
function
|
|
10404
|
+
function bc(e) {
|
|
10375
10405
|
return e.open > e.close ? "down" : e.open < e.close ? "up" : "flat";
|
|
10376
10406
|
}
|
|
10377
10407
|
//#endregion
|
|
10378
10408
|
//#region src/types/volumePrice.ts
|
|
10379
10409
|
var $ = /* @__PURE__ */ function(e) {
|
|
10380
10410
|
return e.RISE_WITH_VOLUME = "rise_with_volume", e.RISE_WITHOUT_VOLUME = "rise_without_volume", e.FALL_WITH_VOLUME = "fall_with_volume", e.FALL_WITHOUT_VOLUME = "fall_without_volume", e.OTHERS = "others", e;
|
|
10381
|
-
}({}),
|
|
10411
|
+
}({}), xc = {
|
|
10382
10412
|
volumeAmplifyThreshold: 1.5,
|
|
10383
10413
|
volumeShrinkThreshold: .8,
|
|
10384
10414
|
avgPeriod: 20
|
|
10385
|
-
},
|
|
10415
|
+
}, Sc = class {
|
|
10386
10416
|
prefixSum = [];
|
|
10387
10417
|
dataLength = 0;
|
|
10388
10418
|
build(e) {
|
|
@@ -10407,8 +10437,8 @@ var $ = /* @__PURE__ */ function(e) {
|
|
|
10407
10437
|
return this.dataLength;
|
|
10408
10438
|
}
|
|
10409
10439
|
};
|
|
10410
|
-
function
|
|
10411
|
-
let i = new
|
|
10440
|
+
function Cc(e, t, n, r = xc) {
|
|
10441
|
+
let i = new Sc();
|
|
10412
10442
|
i.build(e);
|
|
10413
10443
|
let a = [], { volumeAmplifyThreshold: o, volumeShrinkThreshold: s, avgPeriod: c } = r;
|
|
10414
10444
|
for (let r = t; r < n && r < e.length; r++) {
|
|
@@ -10429,7 +10459,7 @@ function Sc(e, t, n, r = bc) {
|
|
|
10429
10459
|
}
|
|
10430
10460
|
//#endregion
|
|
10431
10461
|
//#region src/core/renderers/candle.ts
|
|
10432
|
-
function
|
|
10462
|
+
function wc() {
|
|
10433
10463
|
return {
|
|
10434
10464
|
name: "candle",
|
|
10435
10465
|
version: "1.0.0",
|
|
@@ -10440,128 +10470,130 @@ function Cc() {
|
|
|
10440
10470
|
draw(e) {
|
|
10441
10471
|
let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, kGap: s, dpr: c, kLinePositions: l, markerManager: u } = e, d = r;
|
|
10442
10472
|
if (!d.length) return;
|
|
10443
|
-
let { kWidthPx: f } =
|
|
10473
|
+
let { kWidthPx: f } = us(o, s, c);
|
|
10444
10474
|
t.save(), t.translate(-a, 0);
|
|
10445
|
-
let p = l || [], m =
|
|
10475
|
+
let p = l || [], m = Cc(d, i.start, i.end, xc);
|
|
10446
10476
|
for (let e = i.start; e < i.end && e < d.length; e++) {
|
|
10447
10477
|
let r = d[e];
|
|
10448
10478
|
if (!r) continue;
|
|
10449
|
-
let a = n.yAxis.priceToY(r.open), s = n.yAxis.priceToY(r.close), l = n.yAxis.priceToY(r.high), h = n.yAxis.priceToY(r.low), g =
|
|
10450
|
-
if (!
|
|
10451
|
-
let
|
|
10452
|
-
t.fillStyle =
|
|
10453
|
-
let
|
|
10454
|
-
if (r.high >
|
|
10455
|
-
let e =
|
|
10456
|
-
e && t.fillRect(e.x, e.y,
|
|
10479
|
+
let a = n.yAxis.priceToY(r.open), s = n.yAxis.priceToY(r.close), l = n.yAxis.priceToY(r.high), h = n.yAxis.priceToY(r.low), g = p[e - i.start];
|
|
10480
|
+
if (!g) continue;
|
|
10481
|
+
let _ = (e) => Math.round(e * c) / c, v = _(a), y = _(s), b = _(l), x = _(h), S = Math.min(v, y), C = Math.max(Math.abs(v - y), 1), w = Cs(Math.round(g * c), S, f, C, c);
|
|
10482
|
+
t.fillStyle = bc(r) === "up" ? X.UP : X.DOWN, t.fillRect(w.bodyRect.x, w.bodyRect.y, w.bodyRect.width, w.bodyRect.height);
|
|
10483
|
+
let T = w.wickRect.width, E = w.wickRect.x, D = w.bodyRect.y, O = w.bodyRect.y + w.bodyRect.height, k = Math.max(r.open, r.close), A = Math.min(r.open, r.close);
|
|
10484
|
+
if (r.high > k) {
|
|
10485
|
+
let e = xs(E, b, D, c);
|
|
10486
|
+
e && t.fillRect(e.x, e.y, T, e.height);
|
|
10457
10487
|
}
|
|
10458
|
-
if (r.low <
|
|
10459
|
-
let e =
|
|
10460
|
-
e && t.fillRect(e.x, e.y,
|
|
10488
|
+
if (r.low < A) {
|
|
10489
|
+
let e = xs(E, O, x, c);
|
|
10490
|
+
e && t.fillRect(e.x, e.y, T, e.height);
|
|
10461
10491
|
}
|
|
10462
|
-
let
|
|
10463
|
-
if (
|
|
10464
|
-
let n =
|
|
10465
|
-
|
|
10492
|
+
let j = m[e - i.start];
|
|
10493
|
+
if (j !== $.OTHERS && u) {
|
|
10494
|
+
let n = j === $.RISE_WITH_VOLUME || j === $.RISE_WITHOUT_VOLUME ? b - 15 : x + 15;
|
|
10495
|
+
Tc(t, w.bodyRect.x + w.bodyRect.width / 2, n, j, e, o, 4, u, c);
|
|
10466
10496
|
}
|
|
10467
10497
|
}
|
|
10468
10498
|
t.restore();
|
|
10469
10499
|
}
|
|
10470
10500
|
};
|
|
10471
10501
|
}
|
|
10472
|
-
function
|
|
10473
|
-
let
|
|
10502
|
+
function Tc(e, t, n, r, i, a, o = 4, s, c) {
|
|
10503
|
+
let l = (e) => Math.round(e * c) / c;
|
|
10504
|
+
t = l(t), n = l(n);
|
|
10505
|
+
let u = Math.min(a, 20), d = u * Math.sqrt(3) / 2, f, p;
|
|
10474
10506
|
switch (r) {
|
|
10475
10507
|
case $.RISE_WITH_VOLUME:
|
|
10476
|
-
|
|
10508
|
+
f = "#FF4444", p = !0;
|
|
10477
10509
|
break;
|
|
10478
10510
|
case $.RISE_WITHOUT_VOLUME:
|
|
10479
|
-
|
|
10511
|
+
f = "#00C853", p = !0;
|
|
10480
10512
|
break;
|
|
10481
10513
|
case $.FALL_WITH_VOLUME:
|
|
10482
|
-
|
|
10514
|
+
f = "#FF4444", p = !1;
|
|
10483
10515
|
break;
|
|
10484
10516
|
case $.FALL_WITHOUT_VOLUME:
|
|
10485
|
-
|
|
10517
|
+
f = "#00C853", p = !1;
|
|
10486
10518
|
break;
|
|
10487
10519
|
default: return;
|
|
10488
10520
|
}
|
|
10489
|
-
if (e.save(), e.beginPath(),
|
|
10490
|
-
let r = n - o, i = r -
|
|
10491
|
-
e.moveTo(t, i), e.lineTo(t -
|
|
10521
|
+
if (e.save(), e.beginPath(), p) {
|
|
10522
|
+
let r = l(n - o), i = l(r - d);
|
|
10523
|
+
e.moveTo(t, i), e.lineTo(l(t - u / 2), r), e.lineTo(l(t + u / 2), r);
|
|
10492
10524
|
} else {
|
|
10493
|
-
let r = n + o, i = r +
|
|
10494
|
-
e.moveTo(t, i), e.lineTo(t -
|
|
10495
|
-
}
|
|
10496
|
-
e.closePath(), e.fillStyle =
|
|
10497
|
-
let
|
|
10498
|
-
if (
|
|
10499
|
-
let e = n - o -
|
|
10500
|
-
|
|
10525
|
+
let r = l(n + o), i = l(r + d);
|
|
10526
|
+
e.moveTo(t, i), e.lineTo(l(t - u / 2), r), e.lineTo(l(t + u / 2), r);
|
|
10527
|
+
}
|
|
10528
|
+
e.closePath(), e.fillStyle = f, e.fill(), e.restore();
|
|
10529
|
+
let m, h;
|
|
10530
|
+
if (p) {
|
|
10531
|
+
let e = l(l(n - o) - d);
|
|
10532
|
+
m = l(t - u / 2), h = e;
|
|
10501
10533
|
} else {
|
|
10502
|
-
let e = n + o;
|
|
10503
|
-
e +
|
|
10534
|
+
let e = l(n + o);
|
|
10535
|
+
l(e + d), m = l(t - u / 2), h = e;
|
|
10504
10536
|
}
|
|
10505
|
-
let
|
|
10537
|
+
let g;
|
|
10506
10538
|
switch (r) {
|
|
10507
10539
|
case $.RISE_WITH_VOLUME:
|
|
10508
|
-
|
|
10540
|
+
g = "RISE_WITH_VOLUME";
|
|
10509
10541
|
break;
|
|
10510
10542
|
case $.RISE_WITHOUT_VOLUME:
|
|
10511
|
-
|
|
10543
|
+
g = "RISE_WITHOUT_VOLUME";
|
|
10512
10544
|
break;
|
|
10513
10545
|
case $.FALL_WITH_VOLUME:
|
|
10514
|
-
|
|
10546
|
+
g = "FALL_WITH_VOLUME";
|
|
10515
10547
|
break;
|
|
10516
10548
|
case $.FALL_WITHOUT_VOLUME:
|
|
10517
|
-
|
|
10549
|
+
g = "FALL_WITHOUT_VOLUME";
|
|
10518
10550
|
break;
|
|
10519
10551
|
default: return;
|
|
10520
10552
|
}
|
|
10521
|
-
let
|
|
10553
|
+
let _ = `mk_price-volume_${i}`;
|
|
10522
10554
|
s.register({
|
|
10523
|
-
id:
|
|
10555
|
+
id: _,
|
|
10524
10556
|
type: "triangle",
|
|
10525
|
-
markerType:
|
|
10526
|
-
x:
|
|
10527
|
-
y:
|
|
10528
|
-
width:
|
|
10529
|
-
height:
|
|
10557
|
+
markerType: g,
|
|
10558
|
+
x: m,
|
|
10559
|
+
y: h,
|
|
10560
|
+
width: u,
|
|
10561
|
+
height: d,
|
|
10530
10562
|
dataIndex: i,
|
|
10531
10563
|
metadata: { relation: r }
|
|
10532
10564
|
});
|
|
10533
10565
|
}
|
|
10534
10566
|
//#endregion
|
|
10535
10567
|
//#region src/core/utils/tickCount.ts
|
|
10536
|
-
function
|
|
10568
|
+
function Ec(e, t) {
|
|
10537
10569
|
return t ? Math.max(4, Math.min(8, Math.round(e / 80))) : 2;
|
|
10538
10570
|
}
|
|
10539
10571
|
//#endregion
|
|
10540
10572
|
//#region src/core/renderers/gridLines.ts
|
|
10541
|
-
function
|
|
10573
|
+
function Dc() {
|
|
10542
10574
|
return {
|
|
10543
10575
|
name: "gridLines",
|
|
10544
10576
|
version: "1.0.0",
|
|
10545
10577
|
description: "网格线渲染器",
|
|
10546
10578
|
debugName: "网格线",
|
|
10547
|
-
paneId:
|
|
10579
|
+
paneId: sa,
|
|
10548
10580
|
priority: Y.GRID,
|
|
10549
10581
|
draw(e) {
|
|
10550
10582
|
let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, dpr: s, kLinePositions: c } = e, l = r;
|
|
10551
10583
|
if (!l.length) return;
|
|
10552
|
-
let u =
|
|
10553
|
-
t.save(), t.fillStyle =
|
|
10584
|
+
let u = Ec(n.height, n.id === "main");
|
|
10585
|
+
t.save(), t.fillStyle = ja.HORIZONTAL, t.translate(-a, 0);
|
|
10554
10586
|
let d = t.canvas.width / s, f = a, p = a + d, m = n.yAxis.getPaddingTop(), h = n.yAxis.getPaddingBottom(), g = m, _ = Math.max(m, n.height - h), v = Math.max(0, _ - g);
|
|
10555
10587
|
for (let e = 0; e < u; e++) {
|
|
10556
|
-
let n = u <= 1 ? 0 : e / (u - 1), r =
|
|
10588
|
+
let n = u <= 1 ? 0 : e / (u - 1), r = Ss(f, p, Math.round(g + n * v), s);
|
|
10557
10589
|
r && t.fillRect(r.x, r.y, r.width, r.height);
|
|
10558
10590
|
}
|
|
10559
|
-
let y =
|
|
10591
|
+
let y = Da(l);
|
|
10560
10592
|
for (let e of y) {
|
|
10561
10593
|
if (e < i.start || e >= i.end || e >= l.length) continue;
|
|
10562
10594
|
let r = e - i.start;
|
|
10563
10595
|
if (r < 0 || r >= c.length) continue;
|
|
10564
|
-
let a =
|
|
10596
|
+
let a = xs(c[r] + o / 2, 0, n.height, s);
|
|
10565
10597
|
a && t.fillRect(a.x, a.y, a.width, a.height);
|
|
10566
10598
|
}
|
|
10567
10599
|
t.restore();
|
|
@@ -10570,7 +10602,7 @@ function Ec() {
|
|
|
10570
10602
|
}
|
|
10571
10603
|
//#endregion
|
|
10572
10604
|
//#region src/core/renderers/lastPrice.ts
|
|
10573
|
-
function
|
|
10605
|
+
function Oc() {
|
|
10574
10606
|
return {
|
|
10575
10607
|
name: "lastPriceLine",
|
|
10576
10608
|
version: "1.0.0",
|
|
@@ -10591,7 +10623,7 @@ function Dc() {
|
|
|
10591
10623
|
}
|
|
10592
10624
|
//#endregion
|
|
10593
10625
|
//#region src/core/renderers/extremaMarkers.ts
|
|
10594
|
-
function
|
|
10626
|
+
function kc() {
|
|
10595
10627
|
return {
|
|
10596
10628
|
name: "extremaMarkers",
|
|
10597
10629
|
version: "1.0.0",
|
|
@@ -10614,75 +10646,90 @@ function Oc() {
|
|
|
10614
10646
|
let t = e - i.start;
|
|
10615
10647
|
return t < 0 || t >= l.length ? 0 : l[t] + o / 2;
|
|
10616
10648
|
};
|
|
10617
|
-
t.save(), t.translate(-a, 0),
|
|
10649
|
+
t.save(), t.translate(-a, 0), Ac(t, _(h), n.yAxis.priceToY(p), p, s, c, a), Ac(t, _(g), n.yAxis.priceToY(m), m, s, c, a), t.restore();
|
|
10618
10650
|
}
|
|
10619
10651
|
};
|
|
10620
10652
|
}
|
|
10621
|
-
function
|
|
10653
|
+
function Ac(e, t, n, r, i, a, o) {
|
|
10622
10654
|
let s = r.toFixed(2);
|
|
10623
10655
|
e.font = "12px Arial";
|
|
10624
10656
|
let c = e.measureText(s).width, l = t - o + 30 + 4 + c > a, u = t, d = l ? t - 30 : t + 30;
|
|
10625
10657
|
u > d && ([u, d] = [d, u]);
|
|
10626
|
-
let f =
|
|
10627
|
-
f && (e.fillStyle =
|
|
10658
|
+
let f = Ss(u, d, n, i);
|
|
10659
|
+
f && (e.fillStyle = Oa.WEAK, e.fillRect(f.x, f.y, f.width, f.height));
|
|
10628
10660
|
let p = Z(d, i), m = Z(n, i);
|
|
10629
|
-
e.fillStyle =
|
|
10661
|
+
e.fillStyle = Oa.WEAK, e.beginPath(), e.arc(p, m, 2, 0, Math.PI * 2), e.fill(), e.font = "12px Arial", e.textBaseline = "middle", e.fillStyle = X.NEUTRAL, l ? (e.textAlign = "right", e.fillText(s, Z(t - 30 - 4, i), Z(n, i))) : (e.textAlign = "left", e.fillText(s, Z(t + 30 + 4, i), Z(n, i)));
|
|
10630
10662
|
}
|
|
10631
10663
|
//#endregion
|
|
10632
10664
|
//#region src/utils/priceToY.ts
|
|
10633
|
-
function
|
|
10665
|
+
function jc(e, t, n, r, i, a) {
|
|
10634
10666
|
let o = t - n || 1, s = (e - n) / o;
|
|
10635
10667
|
return i + Math.max(1, r - i - a) * (1 - s);
|
|
10636
10668
|
}
|
|
10669
|
+
function Mc(e, t, n, r, i, a) {
|
|
10670
|
+
let o = t - n || 1, s = Math.max(1, r - i - a);
|
|
10671
|
+
return n + (1 - (Math.min(Math.max(e, i), i + s) - i) / s) * o;
|
|
10672
|
+
}
|
|
10637
10673
|
//#endregion
|
|
10638
10674
|
//#region src/utils/kLineDraw/axis.ts
|
|
10639
|
-
function
|
|
10640
|
-
let { x: n, y: r, width: i, height: a, priceRange: o, yPaddingPx: s = 0, dpr: c, ticks: l = 10, bgColor: u =
|
|
10641
|
-
e.fillStyle = u, e.fillRect(n, r, i, a),
|
|
10642
|
-
let S = n +
|
|
10675
|
+
function Nc(e, t) {
|
|
10676
|
+
let { x: n, y: r, width: i, height: a, priceRange: o, yPaddingPx: s = 0, dpr: c, ticks: l = 10, bgColor: u = ka.TRANSPARENT, textColor: d = Oa.SECONDARY, lineColor: f = Aa.DARK, fontSize: p = 16, drawLeftBorder: m = !0, drawTickLines: h = !0, priceOffset: g = 0 } = t, _ = Math.max(0, Math.min(s, Math.floor(a / 2) - 1)), { maxPrice: v, minPrice: y } = o, b = v - y, x = b === 0 ? 0 : b / (Math.max(2, l) - 1);
|
|
10677
|
+
e.fillStyle = u, e.fillRect(n, r, i, a), m && (e.strokeStyle = f, e.lineWidth = 1, e.beginPath(), e.moveTo(Q(n, c), r), e.lineTo(Q(n, c), r + a), e.stroke()), e.font = `${p}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "center";
|
|
10678
|
+
let S = n + i / 2;
|
|
10643
10679
|
for (let t = 0; t < Math.max(2, l); t++) {
|
|
10644
|
-
let i = b === 0 ? v : v - x * t, o = Math.round(
|
|
10645
|
-
if (
|
|
10680
|
+
let i = b === 0 ? v : v - x * t, o = Math.round(jc(i, v, y, a, _, _) + r);
|
|
10681
|
+
if (h) {
|
|
10646
10682
|
e.strokeStyle = f, e.beginPath();
|
|
10647
10683
|
let t = Q(o, c);
|
|
10648
10684
|
e.moveTo(n, t), e.lineTo(n + 4, t), e.stroke();
|
|
10649
10685
|
}
|
|
10650
|
-
|
|
10686
|
+
let s = i + g;
|
|
10687
|
+
e.fillStyle = d, e.fillText(s.toFixed(2), Z(S, c), Z(o, c));
|
|
10651
10688
|
}
|
|
10652
10689
|
}
|
|
10653
|
-
function
|
|
10654
|
-
let { x: n, y: r, width: i, height: a, crosshairX: o, timestamp: s, dpr: c,
|
|
10655
|
-
e.save(), e.font = `${
|
|
10656
|
-
let
|
|
10657
|
-
|
|
10690
|
+
function Pc(e, t) {
|
|
10691
|
+
let { x: n, y: r, width: i, height: a, crosshairX: o, timestamp: s, dpr: c, fontSize: l = 16, paddingX: u = 8 } = t, d = Ea(s);
|
|
10692
|
+
e.save(), e.font = `${l}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "center";
|
|
10693
|
+
let f = Math.round(e.measureText(d).width), p = Math.min(i, f + u * 2), m = a, h = Math.min(Math.max(o, n + p / 2), n + i - p / 2), g = r + a / 2, _ = h - p / 2, v = r;
|
|
10694
|
+
e.fillStyle = "rgba(0, 0, 0, 0.8)", e.fillRect(Z(_, c), Z(v, c), Z(p, c), Z(m, c)), e.fillStyle = "#ffffff", e.fillText(d, Z(h, c), Z(g, c)), e.restore();
|
|
10658
10695
|
}
|
|
10659
|
-
function
|
|
10660
|
-
let { x: n, y: r, width: i, height: a,
|
|
10696
|
+
function Fc(e, t) {
|
|
10697
|
+
let { x: n, y: r, width: i, height: a, crosshairY: o, priceRange: s, yPaddingPx: c = 0, dpr: l, fontSize: u = 16 } = t, d = Math.max(0, Math.min(c, Math.floor(a / 2) - 1)), { maxPrice: f, minPrice: p } = s, m = Mc(o - r, f, p, a, d, d).toFixed(2);
|
|
10698
|
+
e.save(), e.font = `${u}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "center";
|
|
10699
|
+
let h = u + 4, g = i, _ = Math.min(Math.max(o, r + h / 2), r + a - h / 2), v = _ - h / 2;
|
|
10700
|
+
e.fillStyle = "rgba(0, 0, 0, 0.8)";
|
|
10701
|
+
let y = Z(n, l), b = Z(v, l), x = Z(g, l), S = Z(h, l);
|
|
10702
|
+
e.fillRect(y, b, x, S);
|
|
10703
|
+
let C = n + i / 2;
|
|
10704
|
+
e.fillStyle = "#ffffff", e.fillText(m, Z(C, l), Z(_, l)), e.restore();
|
|
10705
|
+
}
|
|
10706
|
+
function Ic(e, t) {
|
|
10707
|
+
let { x: n, y: r, width: i, height: a, data: o, scrollLeft: s, kWidth: c, kGap: l, startIndex: u, endIndex: d, dpr: f, bgColor: p = ka.TRANSPARENT, textColor: m = Oa.SECONDARY, lineColor: h = Aa.DARK, fontSize: g = 12, paddingX: _ = 8, drawTopBorder: v = !0, drawBottomBorder: y = !0 } = t, b = Math.round(c * f), x = b % 2 == 0 ? b + 1 : b, S = Math.round(l * f), C = x + S, w = S, T = C / f, E = w / f, D = x / f;
|
|
10661
10708
|
e.fillStyle = p, e.fillRect(n, r, i, a), v && (e.strokeStyle = h, e.lineWidth = 1, e.beginPath(), e.moveTo(n, Q(r, f)), e.lineTo(n + i, Q(r, f)), e.stroke()), y && (e.strokeStyle = h, e.lineWidth = 1, e.beginPath(), e.moveTo(n, Q(r + a, f)), e.lineTo(n + i, Q(r + a, f)), e.stroke()), e.textAlign = "center", e.textBaseline = "middle";
|
|
10662
|
-
let O = r + a / 2, k =
|
|
10709
|
+
let O = r + a / 2 + 1, k = Da(o).filter((e) => e >= u && e < d);
|
|
10663
10710
|
for (let t of k) {
|
|
10664
10711
|
let n = o[t];
|
|
10665
10712
|
if (!n) continue;
|
|
10666
10713
|
let r = E + t * T + D / 2 - s, a = _, c = Math.max(_, i - _);
|
|
10667
10714
|
if (r >= a && r <= c) {
|
|
10668
|
-
let t = Math.min(Math.max(r, a), c), { text: i, isYear: o } =
|
|
10715
|
+
let t = Math.min(Math.max(r, a), c), { text: i, isYear: o } = Ca(n.timestamp);
|
|
10669
10716
|
e.fillStyle = m, e.font = `${o ? "bold " : ""}${g}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.fillText(i, Z(t, f), Z(O, f));
|
|
10670
10717
|
}
|
|
10671
10718
|
}
|
|
10672
10719
|
}
|
|
10673
10720
|
//#endregion
|
|
10674
10721
|
//#region src/core/renderers/yAxis.ts
|
|
10675
|
-
function
|
|
10722
|
+
function Lc(e) {
|
|
10676
10723
|
return {
|
|
10677
10724
|
name: "yAxis",
|
|
10678
10725
|
version: "1.0.0",
|
|
10679
10726
|
description: "Y轴价格刻度渲染器",
|
|
10680
10727
|
debugName: "Y轴",
|
|
10681
|
-
paneId:
|
|
10728
|
+
paneId: sa,
|
|
10682
10729
|
priority: Y.SYSTEM_YAXIS,
|
|
10683
10730
|
draw(t) {
|
|
10684
|
-
let { ctx: n, pane: r, dpr: i, yAxisCtx: a } = t, o = a || n, s =
|
|
10685
|
-
|
|
10731
|
+
let { ctx: n, pane: r, dpr: i, yAxisCtx: a } = t, o = a || n, s = Ec(r.height, r.id === "main");
|
|
10732
|
+
Nc(o, {
|
|
10686
10733
|
x: 0,
|
|
10687
10734
|
y: r.top,
|
|
10688
10735
|
width: e.axisWidth,
|
|
@@ -10692,26 +10739,40 @@ function Pc(e) {
|
|
|
10692
10739
|
dpr: i,
|
|
10693
10740
|
ticks: s,
|
|
10694
10741
|
drawLeftBorder: !1,
|
|
10695
|
-
drawTickLines: !1
|
|
10742
|
+
drawTickLines: !1,
|
|
10743
|
+
priceOffset: r.yAxis.getPriceOffset(),
|
|
10744
|
+
fontSize: 12
|
|
10745
|
+
});
|
|
10746
|
+
let c = e.getCrosshair?.();
|
|
10747
|
+
c && c.price !== null && Fc(o, {
|
|
10748
|
+
x: 0,
|
|
10749
|
+
y: r.top,
|
|
10750
|
+
width: e.axisWidth,
|
|
10751
|
+
height: r.height,
|
|
10752
|
+
crosshairY: c.y,
|
|
10753
|
+
priceRange: r.priceRange,
|
|
10754
|
+
yPaddingPx: e.yPaddingPx,
|
|
10755
|
+
dpr: i,
|
|
10756
|
+
fontSize: 12
|
|
10696
10757
|
});
|
|
10697
10758
|
}
|
|
10698
10759
|
};
|
|
10699
10760
|
}
|
|
10700
10761
|
//#endregion
|
|
10701
10762
|
//#region src/core/renderers/timeAxis.ts
|
|
10702
|
-
var
|
|
10703
|
-
function
|
|
10763
|
+
var Rc = Symbol("time-axis");
|
|
10764
|
+
function zc(e) {
|
|
10704
10765
|
return {
|
|
10705
10766
|
name: "timeAxis",
|
|
10706
10767
|
version: "1.0.0",
|
|
10707
10768
|
description: "时间轴渲染器",
|
|
10708
10769
|
debugName: "时间轴",
|
|
10709
|
-
paneId:
|
|
10770
|
+
paneId: Rc,
|
|
10710
10771
|
priority: Y.SYSTEM_XAXIS,
|
|
10711
10772
|
isSystem: !0,
|
|
10712
10773
|
draw(t) {
|
|
10713
10774
|
let { ctx: n, data: r, range: i, scrollLeft: a, kWidth: o, kGap: s, dpr: c, paneWidth: l } = t, u = r, d = n, f = l, p = e.height;
|
|
10714
|
-
d.setTransform(1, 0, 0, 1, 0, 0), d.scale(c, c), d.clearRect(0, 0, f, p),
|
|
10775
|
+
d.setTransform(1, 0, 0, 1, 0, 0), d.scale(c, c), d.clearRect(0, 0, f, p), Ic(d, {
|
|
10715
10776
|
x: 0,
|
|
10716
10777
|
y: 0,
|
|
10717
10778
|
width: f,
|
|
@@ -10729,14 +10790,15 @@ function Ic(e) {
|
|
|
10729
10790
|
let m = e.getCrosshair?.();
|
|
10730
10791
|
if (m && typeof m.index == "number") {
|
|
10731
10792
|
let e = u[m.index];
|
|
10732
|
-
e &&
|
|
10793
|
+
e && Pc(d, {
|
|
10733
10794
|
x: 0,
|
|
10734
10795
|
y: 0,
|
|
10735
10796
|
width: f,
|
|
10736
10797
|
height: p,
|
|
10737
10798
|
crosshairX: m.x,
|
|
10738
10799
|
timestamp: e.timestamp,
|
|
10739
|
-
dpr: c
|
|
10800
|
+
dpr: c,
|
|
10801
|
+
fontSize: 12
|
|
10740
10802
|
});
|
|
10741
10803
|
}
|
|
10742
10804
|
}
|
|
@@ -10744,22 +10806,22 @@ function Ic(e) {
|
|
|
10744
10806
|
}
|
|
10745
10807
|
//#endregion
|
|
10746
10808
|
//#region src/core/renderers/crosshair.ts
|
|
10747
|
-
function
|
|
10809
|
+
function Bc(e) {
|
|
10748
10810
|
return {
|
|
10749
10811
|
name: "crosshair",
|
|
10750
10812
|
version: "1.0.0",
|
|
10751
10813
|
description: "十字线渲染器",
|
|
10752
10814
|
debugName: "十字线",
|
|
10753
|
-
paneId:
|
|
10815
|
+
paneId: sa,
|
|
10754
10816
|
priority: Y.SYSTEM_CROSSHAIR,
|
|
10755
10817
|
draw(t) {
|
|
10756
10818
|
let { ctx: n, pane: r, dpr: i, paneWidth: a } = t, o = e.getCrosshairState();
|
|
10757
10819
|
if (o.isDragging || !o.pos) return;
|
|
10758
|
-
let { x: s
|
|
10759
|
-
n.save(), n.beginPath(), n.rect(0, 0, a, r.height), n.clip(), n.fillStyle =
|
|
10760
|
-
let
|
|
10761
|
-
if (
|
|
10762
|
-
let e =
|
|
10820
|
+
let { x: s } = o.pos, c = r.id === o.activePaneId, l = -1;
|
|
10821
|
+
c && o.price !== null && (l = r.yAxis.priceToY(o.price)), n.save(), n.beginPath(), n.rect(0, 0, a, r.height), n.clip(), n.fillStyle = Ua.LINE;
|
|
10822
|
+
let u = xs(s, 0, r.height, i);
|
|
10823
|
+
if (u && n.fillRect(u.x, u.y, u.width, u.height), c && l >= 0) {
|
|
10824
|
+
let e = Ss(0, a, Math.min(l, r.height - 1 / i), i);
|
|
10763
10825
|
e && n.fillRect(e.x, e.y, e.width, e.height);
|
|
10764
10826
|
}
|
|
10765
10827
|
n.restore();
|
|
@@ -10768,7 +10830,7 @@ function Lc(e) {
|
|
|
10768
10830
|
}
|
|
10769
10831
|
//#endregion
|
|
10770
10832
|
//#region src/core/renderers/paneTitle.ts
|
|
10771
|
-
function
|
|
10833
|
+
function Vc(e) {
|
|
10772
10834
|
let t = { ...e };
|
|
10773
10835
|
return {
|
|
10774
10836
|
name: `paneTitle_${e.paneId}`,
|
|
@@ -10785,17 +10847,17 @@ function Rc(e) {
|
|
|
10785
10847
|
let a = t.getTitleInfo?.();
|
|
10786
10848
|
if (a) {
|
|
10787
10849
|
let e = 12;
|
|
10788
|
-
if (n.fillStyle =
|
|
10850
|
+
if (n.fillStyle = Oa.PRIMARY, n.fillText(a.name, e, i), e += n.measureText(a.name).width, a.params && a.params.length > 0) {
|
|
10789
10851
|
let t = `(${a.params.join(",")})`;
|
|
10790
|
-
n.fillStyle =
|
|
10852
|
+
n.fillStyle = Oa.TERTIARY, n.fillText(t, e, i), e += n.measureText(t).width + 8;
|
|
10791
10853
|
} else e += 8;
|
|
10792
10854
|
if (a.values && a.values.length > 0) for (let t of a.values) {
|
|
10793
10855
|
let r = `${t.label} ${t.value.toFixed(3)}`;
|
|
10794
10856
|
n.fillStyle = t.color, n.fillText(r, e, i), e += n.measureText(r).width + 8;
|
|
10795
10857
|
}
|
|
10796
|
-
} else if (n.fillStyle =
|
|
10858
|
+
} else if (n.fillStyle = Oa.PRIMARY, n.fillText(t.title, 12, i), t.description) {
|
|
10797
10859
|
let e = n.measureText(t.title).width;
|
|
10798
|
-
n.fillStyle =
|
|
10860
|
+
n.fillStyle = Oa.WEAK, n.fillText(` - ${t.description}`, 12 + e, i);
|
|
10799
10861
|
}
|
|
10800
10862
|
n.restore();
|
|
10801
10863
|
},
|
|
@@ -10809,7 +10871,7 @@ function Rc(e) {
|
|
|
10809
10871
|
}
|
|
10810
10872
|
//#endregion
|
|
10811
10873
|
//#region src/components/KLineChart.vue?vue&type=script&setup=true&lang.ts
|
|
10812
|
-
var
|
|
10874
|
+
var Hc = { class: "chart-wrapper" }, Uc = 4, Wc = /* @__PURE__ */ go(/* @__PURE__ */ u({
|
|
10813
10875
|
__name: "KLineChart",
|
|
10814
10876
|
props: {
|
|
10815
10877
|
semanticConfig: {},
|
|
@@ -10950,11 +11012,11 @@ var zc = { class: "chart-wrapper" }, Bc = 4, Vc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
10950
11012
|
}
|
|
10951
11013
|
}
|
|
10952
11014
|
function pe(e = "VOLUME", t) {
|
|
10953
|
-
if (z.value.length >=
|
|
11015
|
+
if (z.value.length >= Uc) return !1;
|
|
10954
11016
|
let n = `sub_${e}`;
|
|
10955
11017
|
if (z.value.some((e) => e.id === n)) return !0;
|
|
10956
11018
|
if (!C.value?.createSubPane(e, t ?? fe(e))) return !1;
|
|
10957
|
-
let r =
|
|
11019
|
+
let r = Vc({
|
|
10958
11020
|
paneId: n,
|
|
10959
11021
|
title: e,
|
|
10960
11022
|
getTitleInfo: () => ye(n)
|
|
@@ -11006,7 +11068,7 @@ var zc = { class: "chart-wrapper" }, Bc = 4, Vc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11006
11068
|
let e = C.value?.getSubPaneIndicators() ?? [];
|
|
11007
11069
|
z.value = [];
|
|
11008
11070
|
for (let t of e) {
|
|
11009
|
-
let e = `sub_${t}`, n =
|
|
11071
|
+
let e = `sub_${t}`, n = Vc({
|
|
11010
11072
|
paneId: e,
|
|
11011
11073
|
title: t,
|
|
11012
11074
|
getTitleInfo: () => ye(e)
|
|
@@ -11025,7 +11087,7 @@ var zc = { class: "chart-wrapper" }, Bc = 4, Vc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11025
11087
|
if (!n) return;
|
|
11026
11088
|
let r = n.indicatorId;
|
|
11027
11089
|
C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(r), C.value?.createSubPane(t, fe(t));
|
|
11028
|
-
let i = `sub_${t}`, a =
|
|
11090
|
+
let i = `sub_${t}`, a = Vc({
|
|
11029
11091
|
paneId: i,
|
|
11030
11092
|
title: t,
|
|
11031
11093
|
getTitleInfo: () => ye(i)
|
|
@@ -11054,14 +11116,14 @@ var zc = { class: "chart-wrapper" }, Bc = 4, Vc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11054
11116
|
let i = N.value;
|
|
11055
11117
|
if (i === null) return null;
|
|
11056
11118
|
switch (t.indicatorId) {
|
|
11057
|
-
case "MACD": return
|
|
11058
|
-
case "RSI": return
|
|
11059
|
-
case "CCI": return
|
|
11060
|
-
case "STOCH": return
|
|
11061
|
-
case "MOM": return
|
|
11062
|
-
case "WMSR": return
|
|
11063
|
-
case "KST": return
|
|
11064
|
-
case "FASTK": return
|
|
11119
|
+
case "MACD": return Hs(n, i, r.fastPeriod ?? 12, r.slowPeriod ?? 26, r.signalPeriod ?? 9);
|
|
11120
|
+
case "RSI": return Gs(n, i, r.period1 ?? 6, r.period2 ?? 12, r.period3 ?? 24);
|
|
11121
|
+
case "CCI": return Ys(n, i, r.period ?? 14);
|
|
11122
|
+
case "STOCH": return $s(n, i, r.n ?? 9, r.m ?? 3);
|
|
11123
|
+
case "MOM": return rc(n, i, r.period ?? 10);
|
|
11124
|
+
case "WMSR": return sc(n, i, r.period ?? 14);
|
|
11125
|
+
case "KST": return pc(n, i, r.roc1 ?? 10, r.roc2 ?? 15, r.roc3 ?? 20, r.roc4 ?? 30, r.signalPeriod ?? 9);
|
|
11126
|
+
case "FASTK": return _c(n, i, r.period ?? 9);
|
|
11065
11127
|
default: return null;
|
|
11066
11128
|
}
|
|
11067
11129
|
}
|
|
@@ -11091,7 +11153,7 @@ var zc = { class: "chart-wrapper" }, Bc = 4, Vc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11091
11153
|
}), E();
|
|
11092
11154
|
}
|
|
11093
11155
|
let Se = r(() => {
|
|
11094
|
-
let e = T.value, t = window.devicePixelRatio || 1, { startXPx: r, unitPx: i } =
|
|
11156
|
+
let e = T.value, t = window.devicePixelRatio || 1, { startXPx: r, unitPx: i } = us(b.value, x.value, t);
|
|
11095
11157
|
return (r + e * i) / t + (n.rightAxisWidth + n.priceLabelWidth);
|
|
11096
11158
|
});
|
|
11097
11159
|
function Ce() {
|
|
@@ -11115,7 +11177,7 @@ var zc = { class: "chart-wrapper" }, Bc = 4, Vc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11115
11177
|
C.value?.interaction.onWheel(e), I();
|
|
11116
11178
|
};
|
|
11117
11179
|
e.addEventListener("wheel", i, { passive: !1 });
|
|
11118
|
-
let a = new
|
|
11180
|
+
let a = new yc({
|
|
11119
11181
|
container: e,
|
|
11120
11182
|
canvasLayer: t,
|
|
11121
11183
|
xAxisCanvas: r
|
|
@@ -11140,29 +11202,37 @@ var zc = { class: "chart-wrapper" }, Bc = 4, Vc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11140
11202
|
if (!r) return;
|
|
11141
11203
|
let i = Math.max(0, r.scrollWidth - r.clientWidth);
|
|
11142
11204
|
r.scrollLeft = Math.min(Math.max(0, n), i), a.applyZoom(e, t);
|
|
11143
|
-
}), a.useRenderer(
|
|
11205
|
+
}), a.useRenderer(Dc()), a.useRenderer(kc()), a.useRenderer(Ts({
|
|
11144
11206
|
ma5: !0,
|
|
11145
11207
|
ma10: !0,
|
|
11146
11208
|
ma20: !0,
|
|
11147
11209
|
ma30: !0,
|
|
11148
11210
|
ma60: !0
|
|
11149
|
-
})), a.useRenderer(
|
|
11150
|
-
axisWidth: n.rightAxisWidth,
|
|
11151
|
-
yPaddingPx: n.yPaddingPx
|
|
11152
|
-
|
|
11211
|
+
})), a.useRenderer(Ds()), a.setRendererEnabled("boll", !1), a.useRenderer(js()), a.setRendererEnabled("expma", !1), a.useRenderer(Ps()), a.setRendererEnabled("ene", !1), a.useRenderer(wc()), a.useRenderer(Oc()), a.useRenderer(ya()), a.useRenderer(Lc({
|
|
11212
|
+
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11213
|
+
yPaddingPx: n.yPaddingPx,
|
|
11214
|
+
getCrosshair: () => {
|
|
11215
|
+
let e = a.interaction.crosshairPos, t = a.interaction.crosshairPrice;
|
|
11216
|
+
return e && t !== null ? {
|
|
11217
|
+
y: e.y,
|
|
11218
|
+
price: t
|
|
11219
|
+
} : null;
|
|
11220
|
+
}
|
|
11221
|
+
})), a.useRenderer(Is({ yPaddingPx: n.yPaddingPx })), a.useRenderer(Bc({ getCrosshairState: () => ({
|
|
11153
11222
|
pos: a.interaction.crosshairPos,
|
|
11154
11223
|
activePaneId: a.interaction.activePaneId,
|
|
11155
|
-
isDragging: a.interaction.isDraggingState()
|
|
11156
|
-
|
|
11224
|
+
isDragging: a.interaction.isDraggingState(),
|
|
11225
|
+
price: a.interaction.crosshairPrice
|
|
11226
|
+
}) })), a.useRenderer(zc({
|
|
11157
11227
|
height: n.bottomAxisHeight,
|
|
11158
11228
|
getCrosshair: () => {
|
|
11159
|
-
let e = a.interaction.crosshairPos, t = a.interaction.
|
|
11229
|
+
let e = a.interaction.crosshairPos, t = a.interaction.crosshairIndex;
|
|
11160
11230
|
return e && t !== null ? {
|
|
11161
11231
|
x: e.x,
|
|
11162
11232
|
index: t
|
|
11163
11233
|
} : null;
|
|
11164
11234
|
}
|
|
11165
|
-
})), C.value = a, a.resize(), w.value = new
|
|
11235
|
+
})), C.value = a, a.resize(), w.value = new Wi(a), w.value.on("config:error", (e) => {
|
|
11166
11236
|
console.error("Semantic config error:", e);
|
|
11167
11237
|
}), w.value.on("config:ready", () => {
|
|
11168
11238
|
T.value = a.getData()?.length ?? 0, ie(), ge(), _e(), d(() => Ce());
|
|
@@ -11200,7 +11270,7 @@ var zc = { class: "chart-wrapper" }, Bc = 4, Vc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11200
11270
|
let t = await w.value?.applyConfig(e);
|
|
11201
11271
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
11202
11272
|
}
|
|
11203
|
-
}, { deep: !0 }), (e, t) => (g(), o("div",
|
|
11273
|
+
}, { deep: !0 }), (e, t) => (g(), o("div", Hc, [s("div", {
|
|
11204
11274
|
class: f(["chart-container", { "is-dragging": j.value }]),
|
|
11205
11275
|
ref_key: "containerRef",
|
|
11206
11276
|
ref: v,
|
|
@@ -11218,18 +11288,11 @@ var zc = { class: "chart-wrapper" }, Bc = 4, Vc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11218
11288
|
ref: u
|
|
11219
11289
|
}, [
|
|
11220
11290
|
s("canvas", {
|
|
11221
|
-
class: "x-axis-canvas
|
|
11291
|
+
class: "x-axis-canvas",
|
|
11222
11292
|
ref_key: "xAxisCanvasRef",
|
|
11223
11293
|
ref: c
|
|
11224
11294
|
}, null, 512),
|
|
11225
|
-
|
|
11226
|
-
class: "x-axis-corner right-axis-corner",
|
|
11227
|
-
style: p({
|
|
11228
|
-
height: n.bottomAxisHeight + "px",
|
|
11229
|
-
width: n.rightAxisWidth + n.priceLabelWidth + "px"
|
|
11230
|
-
})
|
|
11231
|
-
}, null, 4),
|
|
11232
|
-
P.value ? (g(), i(go, {
|
|
11295
|
+
P.value ? (g(), i(_o, {
|
|
11233
11296
|
key: 0,
|
|
11234
11297
|
k: P.value,
|
|
11235
11298
|
index: F.value,
|
|
@@ -11242,20 +11305,20 @@ var zc = { class: "chart-wrapper" }, Bc = 4, Vc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11242
11305
|
"data",
|
|
11243
11306
|
"pos"
|
|
11244
11307
|
])) : a("", !0),
|
|
11245
|
-
O.value || k.value ? (g(), i(
|
|
11308
|
+
O.value || k.value ? (g(), i(So, {
|
|
11246
11309
|
key: 1,
|
|
11247
11310
|
marker: O.value || k.value,
|
|
11248
11311
|
pos: A.value
|
|
11249
11312
|
}, null, 8, ["marker", "pos"])) : a("", !0)
|
|
11250
|
-
], 512)], 4)], 34), l(
|
|
11313
|
+
], 512)], 4)], 34), l(cs, {
|
|
11251
11314
|
"active-indicators": R.value,
|
|
11252
11315
|
"indicator-params": de.value,
|
|
11253
11316
|
onToggle: be,
|
|
11254
11317
|
onUpdateParams: xe
|
|
11255
11318
|
}, null, 8, ["active-indicators", "indicator-params"])]));
|
|
11256
11319
|
}
|
|
11257
|
-
}), [["__scopeId", "data-v-
|
|
11258
|
-
e.component("KLineChart",
|
|
11320
|
+
}), [["__scopeId", "data-v-c5290a39"]]), Gc = { install(e) {
|
|
11321
|
+
e.component("KLineChart", Wc);
|
|
11259
11322
|
} };
|
|
11260
11323
|
//#endregion
|
|
11261
|
-
export {
|
|
11324
|
+
export { ua as ConfigManager, F as EventBus, sa as GLOBAL_PANE_ID, la as HookSystem, Wc as KLineChart, Gc as KMapPlugin, da as PluginHostImpl, ca as PluginRegistry, aa as PluginState, Y as RENDERER_PRIORITY, ma as RendererPluginManager, fa as createPluginHost, oa as wrapPaneInfo };
|