@363045841yyt/klinechart 0.2.13 → 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 +946 -923
- 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 +1 -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 +1 -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 +1 -1
- package/dist/{core → src/core}/viewport/viewport.d.ts +2 -2
- package/dist/src/index.d.ts +8 -0
- package/dist/{semantic → src/semantic}/controller.d.ts +1 -1
- package/dist/{utils → src/utils}/kLineDraw/MA.d.ts +1 -1
- package/dist/{utils → src/utils}/kLineDraw/axis.d.ts +1 -1
- 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}/theme/colors.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/{plugin → src/plugin}/rendererPluginManager.d.ts +0 -0
- /package/dist/{plugin → src/plugin}/types.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,
|
|
@@ -6827,7 +6844,7 @@ function aa(e) {
|
|
|
6827
6844
|
priceRange: e.priceRange
|
|
6828
6845
|
};
|
|
6829
6846
|
}
|
|
6830
|
-
var
|
|
6847
|
+
var sa = Symbol("global-pane"), Y = {
|
|
6831
6848
|
SYSTEM_YAXIS: -20,
|
|
6832
6849
|
SYSTEM_XAXIS: -20,
|
|
6833
6850
|
BACKGROUND: 0,
|
|
@@ -6838,7 +6855,7 @@ var oa = Symbol("global-pane"), Y = {
|
|
|
6838
6855
|
FOREGROUND: 100,
|
|
6839
6856
|
SYSTEM_BORDER: 120,
|
|
6840
6857
|
SYSTEM_CROSSHAIR: 150
|
|
6841
|
-
},
|
|
6858
|
+
}, ca = class {
|
|
6842
6859
|
plugins = /* @__PURE__ */ new Map();
|
|
6843
6860
|
register(e, t) {
|
|
6844
6861
|
if (this.plugins.has(e.name)) throw Error(`Plugin "${e.name}" is already registered`);
|
|
@@ -6878,7 +6895,7 @@ var oa = Symbol("global-pane"), Y = {
|
|
|
6878
6895
|
clear() {
|
|
6879
6896
|
this.plugins.clear();
|
|
6880
6897
|
}
|
|
6881
|
-
},
|
|
6898
|
+
}, la = class {
|
|
6882
6899
|
hooks = /* @__PURE__ */ new Map();
|
|
6883
6900
|
tap(e, t, n = 0) {
|
|
6884
6901
|
this.hooks.has(e) || this.hooks.set(e, []);
|
|
@@ -6926,7 +6943,7 @@ var oa = Symbol("global-pane"), Y = {
|
|
|
6926
6943
|
hookCount(e) {
|
|
6927
6944
|
return this.hooks.get(e)?.length ?? 0;
|
|
6928
6945
|
}
|
|
6929
|
-
},
|
|
6946
|
+
}, ua = class {
|
|
6930
6947
|
configs = /* @__PURE__ */ new Map();
|
|
6931
6948
|
defaults = /* @__PURE__ */ new Map();
|
|
6932
6949
|
registerDefaults(e, t) {
|
|
@@ -6956,14 +6973,14 @@ var oa = Symbol("global-pane"), Y = {
|
|
|
6956
6973
|
clear(e) {
|
|
6957
6974
|
e ? this.configs.delete(e) : this.configs.clear();
|
|
6958
6975
|
}
|
|
6959
|
-
},
|
|
6976
|
+
}, da = class {
|
|
6960
6977
|
registry;
|
|
6961
6978
|
eventBus;
|
|
6962
6979
|
hookSystem;
|
|
6963
6980
|
configManager;
|
|
6964
6981
|
isDestroyed = !1;
|
|
6965
6982
|
constructor() {
|
|
6966
|
-
this.registry = new
|
|
6983
|
+
this.registry = new ca(), this.eventBus = new F(), this.hookSystem = new la(), this.configManager = new ua();
|
|
6967
6984
|
}
|
|
6968
6985
|
events = {
|
|
6969
6986
|
on: (e, t) => {
|
|
@@ -7047,12 +7064,12 @@ var oa = Symbol("global-pane"), Y = {
|
|
|
7047
7064
|
if (this.isDestroyed) throw Error("PluginHost has been destroyed");
|
|
7048
7065
|
}
|
|
7049
7066
|
};
|
|
7050
|
-
function
|
|
7051
|
-
return new
|
|
7067
|
+
function fa() {
|
|
7068
|
+
return new da();
|
|
7052
7069
|
}
|
|
7053
7070
|
//#endregion
|
|
7054
7071
|
//#region src/plugin/rendererPluginManager.ts
|
|
7055
|
-
var
|
|
7072
|
+
var pa = Symbol("renderer:global-cache"), ma = class {
|
|
7056
7073
|
plugins = /* @__PURE__ */ new Map();
|
|
7057
7074
|
pluginHost = null;
|
|
7058
7075
|
enabledState = /* @__PURE__ */ new Map();
|
|
@@ -7122,21 +7139,21 @@ var fa = Symbol("renderer:global-cache"), pa = class {
|
|
|
7122
7139
|
if (!this.cacheInvalid) return;
|
|
7123
7140
|
this.groupCache.clear(), this.mergedCache.clear();
|
|
7124
7141
|
for (let e of this.plugins.values()) {
|
|
7125
|
-
let t = typeof e.paneId == "symbol" ?
|
|
7142
|
+
let t = typeof e.paneId == "symbol" ? pa : e.paneId;
|
|
7126
7143
|
this.groupCache.has(t) || this.groupCache.set(t, []), this.groupCache.get(t).push(e);
|
|
7127
7144
|
}
|
|
7128
7145
|
for (let [, e] of this.groupCache) e.sort((e, t) => e.priority - t.priority);
|
|
7129
|
-
let e = this.groupCache.get(
|
|
7146
|
+
let e = this.groupCache.get(pa) ?? [];
|
|
7130
7147
|
for (let t of this.knownPaneIds) {
|
|
7131
7148
|
let n = this.groupCache.get(t) ?? [], r = this.mergeSorted(n, e);
|
|
7132
7149
|
this.mergedCache.set(t, r);
|
|
7133
7150
|
}
|
|
7134
|
-
this.mergedCache.set(
|
|
7151
|
+
this.mergedCache.set(pa, [...e]), this.cacheInvalid = !1;
|
|
7135
7152
|
}
|
|
7136
7153
|
getRenderers(e) {
|
|
7137
7154
|
this.rebuildCache();
|
|
7138
7155
|
let t = this.mergedCache.get(e);
|
|
7139
|
-
return t || (t = this.mergedCache.get(
|
|
7156
|
+
return t || (t = this.mergedCache.get(pa) ?? [], this.mergedCache.set(e, t)), t.filter((e) => {
|
|
7140
7157
|
if (e.isSystem) return !1;
|
|
7141
7158
|
let t = this.enabledState.get(e.name);
|
|
7142
7159
|
return t === void 0 ? e.enabled !== !1 : t;
|
|
@@ -7214,15 +7231,15 @@ var fa = Symbol("renderer:global-cache"), pa = class {
|
|
|
7214
7231
|
console.error(`[RendererPlugin] ${e.name} onResize error:`, t);
|
|
7215
7232
|
}
|
|
7216
7233
|
}
|
|
7217
|
-
},
|
|
7218
|
-
function
|
|
7234
|
+
}, ha = 1.2, ga = 24, _a = 6;
|
|
7235
|
+
function va(e) {
|
|
7219
7236
|
switch (e) {
|
|
7220
7237
|
case "arrow_up":
|
|
7221
7238
|
case "flag": return !0;
|
|
7222
7239
|
default: return !1;
|
|
7223
7240
|
}
|
|
7224
7241
|
}
|
|
7225
|
-
function
|
|
7242
|
+
function ya() {
|
|
7226
7243
|
return {
|
|
7227
7244
|
name: "customMarkers",
|
|
7228
7245
|
version: "1.0.0",
|
|
@@ -7239,25 +7256,25 @@ function va() {
|
|
|
7239
7256
|
if (u.length && n.id === "main") {
|
|
7240
7257
|
t.save(), t.translate(-a, 0);
|
|
7241
7258
|
for (let e of l) {
|
|
7242
|
-
let r =
|
|
7259
|
+
let r = xa(u, e.timestamp);
|
|
7243
7260
|
if (r === -1 || r < i.start || r >= i.end) continue;
|
|
7244
7261
|
let l = r - i.start;
|
|
7245
7262
|
if (l < 0 || l >= s.length) continue;
|
|
7246
|
-
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;
|
|
7247
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);
|
|
7248
7265
|
let _ = d + (e.offset?.x ?? 0), v = g;
|
|
7249
|
-
|
|
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);
|
|
7250
7267
|
}
|
|
7251
7268
|
t.restore();
|
|
7252
7269
|
}
|
|
7253
7270
|
}
|
|
7254
7271
|
};
|
|
7255
7272
|
}
|
|
7256
|
-
function ya(e, t) {
|
|
7257
|
-
let n = e * ma;
|
|
7258
|
-
return Math.max(ga, Math.min(n, t ?? ha));
|
|
7259
|
-
}
|
|
7260
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) {
|
|
7261
7278
|
let n = 0, r = e.length - 1;
|
|
7262
7279
|
for (; n <= r;) {
|
|
7263
7280
|
let i = Math.floor((n + r) / 2), a = e[i]?.timestamp;
|
|
@@ -7269,7 +7286,7 @@ function ba(e, t) {
|
|
|
7269
7286
|
}
|
|
7270
7287
|
//#endregion
|
|
7271
7288
|
//#region src/utils/dateFormat.ts
|
|
7272
|
-
function
|
|
7289
|
+
function Sa(e) {
|
|
7273
7290
|
let t = new Intl.DateTimeFormat("zh-CN", {
|
|
7274
7291
|
timeZone: "Asia/Shanghai",
|
|
7275
7292
|
year: "numeric",
|
|
@@ -7278,7 +7295,7 @@ function xa(e) {
|
|
|
7278
7295
|
}).formatToParts(new Date(e)).reduce((e, t) => (t.type !== "literal" && (e[t.type] = t.value), e), {});
|
|
7279
7296
|
return `${t.year}-${t.month}-${t.day}`;
|
|
7280
7297
|
}
|
|
7281
|
-
function
|
|
7298
|
+
function Ca(e) {
|
|
7282
7299
|
let t = new Date(e), n = t.getFullYear(), r = t.getMonth() + 1;
|
|
7283
7300
|
return r === 1 ? {
|
|
7284
7301
|
text: String(n),
|
|
@@ -7288,25 +7305,25 @@ function Sa(e) {
|
|
|
7288
7305
|
isYear: !1
|
|
7289
7306
|
};
|
|
7290
7307
|
}
|
|
7291
|
-
function
|
|
7308
|
+
function wa(e) {
|
|
7292
7309
|
let t = new Date(e);
|
|
7293
7310
|
return `${t.getFullYear()}-${t.getMonth()}`;
|
|
7294
7311
|
}
|
|
7295
|
-
var
|
|
7296
|
-
function
|
|
7312
|
+
var Ta = Sa, Ea = Sa;
|
|
7313
|
+
function Da(e) {
|
|
7297
7314
|
if (e.length === 0) return [];
|
|
7298
|
-
let t = [0], n =
|
|
7315
|
+
let t = [0], n = wa(e[0].timestamp);
|
|
7299
7316
|
for (let r = 1; r < e.length; r++) {
|
|
7300
7317
|
let i = e[r];
|
|
7301
7318
|
if (!i) continue;
|
|
7302
|
-
let a =
|
|
7319
|
+
let a = wa(i.timestamp);
|
|
7303
7320
|
a !== n && (t.push(r), n = a);
|
|
7304
7321
|
}
|
|
7305
7322
|
return t;
|
|
7306
7323
|
}
|
|
7307
7324
|
//#endregion
|
|
7308
7325
|
//#region src/core/theme/colors.ts
|
|
7309
|
-
var
|
|
7326
|
+
var Oa = {
|
|
7310
7327
|
PRIMARY: "hsl(210, 9%, 31%)",
|
|
7311
7328
|
SECONDARY: "hsl(210, 9%, 35%)",
|
|
7312
7329
|
TERTIARY: "hsl(210, 8%, 50%)",
|
|
@@ -7321,7 +7338,7 @@ var Da = {
|
|
|
7321
7338
|
DOWN_TICK: "hsl(150, 30%, 60%)",
|
|
7322
7339
|
NEUTRAL: "rgba(0, 0, 0, 0.78)",
|
|
7323
7340
|
LAST_PRICE: "rgb(183, 22, 22)"
|
|
7324
|
-
},
|
|
7341
|
+
}, ka = {
|
|
7325
7342
|
WHITE: "rgb(255, 255, 255)",
|
|
7326
7343
|
LIGHT_GRAY: "rgba(255, 255, 255, 0.92)",
|
|
7327
7344
|
PURE_WHITE: "#ffffff",
|
|
@@ -7329,115 +7346,115 @@ var Da = {
|
|
|
7329
7346
|
ACTIVE: "#1890ff",
|
|
7330
7347
|
ACTIVE_HOVER: "#40a9ff",
|
|
7331
7348
|
HOVER: "#f0f0f0"
|
|
7332
|
-
},
|
|
7349
|
+
}, Aa = {
|
|
7333
7350
|
DARK: "rgba(0, 0, 0, 0.12)",
|
|
7334
7351
|
MEDIUM: "rgba(0, 0, 0, 0.10)",
|
|
7335
7352
|
LIGHT: "rgba(0, 0, 0, 0.08)",
|
|
7336
7353
|
SEPARATOR: "rgba(0, 0, 0, 0.10)",
|
|
7337
7354
|
BUTTON: "#d0d0d0"
|
|
7338
|
-
},
|
|
7355
|
+
}, ja = {
|
|
7339
7356
|
HORIZONTAL: "rgba(0, 0, 0, 0.06)",
|
|
7340
7357
|
VERTICAL: "rgba(0, 0, 0, 0.12)"
|
|
7341
|
-
},
|
|
7358
|
+
}, Ma = {
|
|
7342
7359
|
MA5: "rgba(255, 193, 37, 1)",
|
|
7343
7360
|
MA10: "rgba(190, 131, 12, 1)",
|
|
7344
7361
|
MA20: "rgba(69, 112, 249, 1)",
|
|
7345
7362
|
MA30: "rgba(76, 175, 80, 1)",
|
|
7346
7363
|
MA60: "rgba(156, 39, 176, 1)"
|
|
7347
|
-
},
|
|
7364
|
+
}, Na = {
|
|
7348
7365
|
UPPER: "rgba(178, 34, 34, 1)",
|
|
7349
7366
|
MIDDLE: "rgba(69, 112, 249, 1)",
|
|
7350
7367
|
LOWER: "rgba(34, 139, 34, 1)",
|
|
7351
7368
|
BAND_FILL: "rgba(100, 149, 237, 0.1)"
|
|
7352
|
-
},
|
|
7369
|
+
}, Pa = {
|
|
7353
7370
|
DIF: "rgba(69, 112, 249, 1)",
|
|
7354
7371
|
DEA: "rgba(255, 152, 0, 1)",
|
|
7355
7372
|
BAR_UP: "#ff5252",
|
|
7356
7373
|
BAR_UP_LIGHT: "#fccbcd",
|
|
7357
7374
|
BAR_DOWN: "#22ab94",
|
|
7358
7375
|
BAR_DOWN_LIGHT: "#ace5dc"
|
|
7359
|
-
},
|
|
7376
|
+
}, Fa = {
|
|
7360
7377
|
RSI1: "rgba(69, 112, 249, 1)",
|
|
7361
7378
|
RSI2: "rgba(255, 152, 0, 1)",
|
|
7362
7379
|
RSI3: "rgba(156, 39, 176, 1)"
|
|
7363
|
-
},
|
|
7380
|
+
}, Ia = {
|
|
7364
7381
|
CCI: "rgba(69, 112, 249, 1)",
|
|
7365
7382
|
OVERBOUGHT: "rgba(214, 10, 34, 0.5)",
|
|
7366
7383
|
OVERSOLD: "rgba(3, 123, 102, 0.5)"
|
|
7367
|
-
},
|
|
7384
|
+
}, La = {
|
|
7368
7385
|
K: "rgba(69, 112, 249, 1)",
|
|
7369
7386
|
D: "rgba(255, 152, 0, 1)",
|
|
7370
7387
|
J: "rgba(156, 39, 176, 1)"
|
|
7371
|
-
},
|
|
7388
|
+
}, Ra = {
|
|
7372
7389
|
MOM: "rgba(69, 112, 249, 1)",
|
|
7373
7390
|
ZERO: "rgba(0, 0, 0, 0.2)"
|
|
7374
|
-
},
|
|
7391
|
+
}, za = {
|
|
7375
7392
|
WMSR: "rgba(69, 112, 249, 1)",
|
|
7376
7393
|
OVERBOUGHT: "rgba(214, 10, 34, 0.5)",
|
|
7377
7394
|
OVERSOLD: "rgba(3, 123, 102, 0.5)"
|
|
7378
|
-
},
|
|
7395
|
+
}, Ba = {
|
|
7379
7396
|
KST: "rgba(69, 112, 249, 1)",
|
|
7380
7397
|
SIGNAL: "rgba(255, 152, 0, 1)"
|
|
7381
|
-
},
|
|
7398
|
+
}, Va = {
|
|
7382
7399
|
FAST: "rgba(255, 152, 0, 1)",
|
|
7383
7400
|
SLOW: "rgba(69, 112, 249, 1)"
|
|
7384
|
-
},
|
|
7401
|
+
}, Ha = {
|
|
7385
7402
|
UPPER: "rgba(214, 10, 34, 1)",
|
|
7386
7403
|
MIDDLE: "rgba(69, 112, 249, 1)",
|
|
7387
7404
|
LOWER: "rgba(3, 123, 102, 1)",
|
|
7388
7405
|
BAND_FILL: "rgba(69, 112, 249, 0.08)"
|
|
7389
|
-
},
|
|
7406
|
+
}, Ua = {
|
|
7390
7407
|
LINE: "rgba(0, 0, 0, 0.28)",
|
|
7391
7408
|
LABEL_BG: "rgb(0, 0, 0)",
|
|
7392
7409
|
LABEL_TEXT: "rgba(255, 255, 255, 0.92)"
|
|
7393
|
-
},
|
|
7394
|
-
function
|
|
7395
|
-
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;
|
|
7396
7413
|
}
|
|
7397
|
-
function
|
|
7414
|
+
function Ja(e, t = 2) {
|
|
7398
7415
|
let n = Math.abs(e);
|
|
7399
7416
|
return n >= 1e8 ? `${(e / 1e8).toFixed(t)}亿` : n >= 1e4 ? `${(e / 1e4).toFixed(t)}万` : `${Math.round(e)}`;
|
|
7400
7417
|
}
|
|
7401
|
-
function
|
|
7418
|
+
function Ya(e, t = 2) {
|
|
7402
7419
|
return `${e > 0 ? "+" : ""}${e.toFixed(t)}`;
|
|
7403
7420
|
}
|
|
7404
|
-
function
|
|
7421
|
+
function Xa(e, t = 2) {
|
|
7405
7422
|
return `${e.toFixed(t)}%`;
|
|
7406
7423
|
}
|
|
7407
|
-
function
|
|
7424
|
+
function Za(e, t = 2) {
|
|
7408
7425
|
return `${e > 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
7409
7426
|
}
|
|
7410
|
-
function
|
|
7427
|
+
function Qa(e, t) {
|
|
7411
7428
|
let n = t?.close ?? e.open;
|
|
7412
|
-
return
|
|
7413
|
-
}
|
|
7414
|
-
function Qa(e) {
|
|
7415
|
-
return Ka(e.close - e.open);
|
|
7429
|
+
return qa(e.open - n);
|
|
7416
7430
|
}
|
|
7417
7431
|
function $a(e) {
|
|
7418
|
-
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;
|
|
7419
7436
|
}
|
|
7420
7437
|
//#endregion
|
|
7421
7438
|
//#region src/components/KLineTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
7422
|
-
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 = {
|
|
7423
7440
|
key: 0,
|
|
7424
7441
|
class: "row"
|
|
7425
|
-
},
|
|
7442
|
+
}, lo = {
|
|
7426
7443
|
key: 1,
|
|
7427
7444
|
class: "row"
|
|
7428
|
-
},
|
|
7445
|
+
}, uo = {
|
|
7429
7446
|
key: 2,
|
|
7430
7447
|
class: "row"
|
|
7431
|
-
},
|
|
7448
|
+
}, fo = {
|
|
7432
7449
|
key: 3,
|
|
7433
7450
|
class: "row"
|
|
7434
|
-
},
|
|
7451
|
+
}, po = {
|
|
7435
7452
|
key: 4,
|
|
7436
7453
|
class: "row"
|
|
7437
|
-
},
|
|
7454
|
+
}, mo = {
|
|
7438
7455
|
key: 5,
|
|
7439
7456
|
class: "row"
|
|
7440
|
-
},
|
|
7457
|
+
}, ho = /* @__PURE__ */ u({
|
|
7441
7458
|
__name: "KLineTooltip",
|
|
7442
7459
|
props: {
|
|
7443
7460
|
k: {},
|
|
@@ -7453,15 +7470,15 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7453
7470
|
}
|
|
7454
7471
|
let i = r(() => {
|
|
7455
7472
|
let e = t.k;
|
|
7456
|
-
if (!e) return
|
|
7473
|
+
if (!e) return Ka;
|
|
7457
7474
|
let n = t.index;
|
|
7458
|
-
return
|
|
7475
|
+
return Qa(e, typeof n == "number" && n > 0 ? t.data[n - 1] : void 0);
|
|
7459
7476
|
}), c = r(() => {
|
|
7460
7477
|
let e = t.k;
|
|
7461
|
-
return e ?
|
|
7478
|
+
return e ? $a(e) : Ka;
|
|
7462
7479
|
}), l = r(() => {
|
|
7463
7480
|
let e = t.k;
|
|
7464
|
-
return e ?
|
|
7481
|
+
return e ? eo(e) : Ka;
|
|
7465
7482
|
});
|
|
7466
7483
|
return (t, r) => e.k ? (g(), o("div", {
|
|
7467
7484
|
key: 0,
|
|
@@ -7471,29 +7488,29 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7471
7488
|
left: `${e.pos.x}px`,
|
|
7472
7489
|
top: `${e.pos.y}px`
|
|
7473
7490
|
})
|
|
7474
|
-
}, [s("div",
|
|
7475
|
-
s("div",
|
|
7476
|
-
s("div",
|
|
7477
|
-
s("div",
|
|
7478
|
-
s("div",
|
|
7479
|
-
typeof e.k.volume == "number" ? (g(), o("div",
|
|
7480
|
-
typeof e.k.turnover == "number" ? (g(), o("div",
|
|
7481
|
-
typeof e.k.amplitude == "number" ? (g(), o("div",
|
|
7482
|
-
typeof e.k.changePercent == "number" ? (g(), o("div",
|
|
7483
|
-
typeof e.k.changeAmount == "number" ? (g(), o("div",
|
|
7484
|
-
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)
|
|
7485
7502
|
])], 4)) : a("", !0);
|
|
7486
7503
|
}
|
|
7487
|
-
}),
|
|
7504
|
+
}), go = (e, t) => {
|
|
7488
7505
|
let n = e.__vccOpts || e;
|
|
7489
7506
|
for (let [e, r] of t) n[e] = r;
|
|
7490
7507
|
return n;
|
|
7491
|
-
},
|
|
7508
|
+
}, _o = /* @__PURE__ */ go(ho, [["__scopeId", "data-v-95daa55c"]]), vo = {
|
|
7492
7509
|
RISE_WITH_VOLUME: "量价齐升",
|
|
7493
7510
|
RISE_WITHOUT_VOLUME: "量缩价升",
|
|
7494
7511
|
FALL_WITH_VOLUME: "量价齐缩",
|
|
7495
7512
|
FALL_WITHOUT_VOLUME: "量升价缩"
|
|
7496
|
-
},
|
|
7513
|
+
}, yo = class {
|
|
7497
7514
|
markers = /* @__PURE__ */ new Map();
|
|
7498
7515
|
hoveredMarkerId = null;
|
|
7499
7516
|
lastHoveredId = null;
|
|
@@ -7551,14 +7568,14 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7551
7568
|
hitTestCustomMarker(e, t) {
|
|
7552
7569
|
for (let n of this.customMarkers.values()) {
|
|
7553
7570
|
let r = this.customMarkerPositions.get(n.id);
|
|
7554
|
-
if (r &&
|
|
7571
|
+
if (r && ia(e, t, r.shape, r.x, r.y, r.size)) return n;
|
|
7555
7572
|
}
|
|
7556
7573
|
return null;
|
|
7557
7574
|
}
|
|
7558
|
-
},
|
|
7575
|
+
}, bo = { class: "marker-tooltip__title" }, xo = {
|
|
7559
7576
|
key: 0,
|
|
7560
7577
|
class: "marker-tooltip__content"
|
|
7561
|
-
},
|
|
7578
|
+
}, So = /* @__PURE__ */ go(/* @__PURE__ */ u({
|
|
7562
7579
|
__name: "MarkerTooltip",
|
|
7563
7580
|
props: {
|
|
7564
7581
|
marker: {},
|
|
@@ -7572,7 +7589,7 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7572
7589
|
return e.label?.text || e.shape;
|
|
7573
7590
|
}
|
|
7574
7591
|
let e = n.marker;
|
|
7575
|
-
return
|
|
7592
|
+
return vo[e.markerType] || e.markerType;
|
|
7576
7593
|
}), l = r(() => {
|
|
7577
7594
|
if (!n.marker) return {};
|
|
7578
7595
|
if (i.value) {
|
|
@@ -7594,27 +7611,27 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7594
7611
|
left: `${t.pos.x + 12}px`,
|
|
7595
7612
|
top: `${t.pos.y + 12}px`
|
|
7596
7613
|
})
|
|
7597
|
-
}, [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", {
|
|
7598
7615
|
key: t,
|
|
7599
7616
|
class: "row"
|
|
7600
7617
|
}, [s("span", null, b(t), 1), s("span", null, b(d(e)), 1)]))), 128))])) : a("", !0)], 4)) : a("", !0);
|
|
7601
7618
|
}
|
|
7602
|
-
}), [["__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 = {
|
|
7603
7620
|
key: 0,
|
|
7604
7621
|
class: "indicator-description"
|
|
7605
|
-
},
|
|
7622
|
+
}, Oo = { class: "params-body" }, ko = { class: "param-header" }, Ao = { class: "param-label" }, jo = { class: "param-label-text" }, Mo = {
|
|
7606
7623
|
key: 0,
|
|
7607
7624
|
class: "param-range"
|
|
7608
|
-
},
|
|
7625
|
+
}, No = { class: "input-wrapper" }, Po = ["disabled", "onClick"], Fo = [
|
|
7609
7626
|
"value",
|
|
7610
7627
|
"min",
|
|
7611
7628
|
"max",
|
|
7612
7629
|
"step",
|
|
7613
7630
|
"onInput"
|
|
7614
|
-
],
|
|
7631
|
+
], Io = ["disabled", "onClick"], Lo = {
|
|
7615
7632
|
key: 0,
|
|
7616
7633
|
class: "param-description"
|
|
7617
|
-
},
|
|
7634
|
+
}, Ro = { class: "params-footer" }, zo = { class: "footer-right" }, Bo = /* @__PURE__ */ go(/* @__PURE__ */ u({
|
|
7618
7635
|
__name: "IndicatorParams",
|
|
7619
7636
|
props: {
|
|
7620
7637
|
visible: { type: Boolean },
|
|
@@ -7662,7 +7679,7 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7662
7679
|
class: "indicator-params",
|
|
7663
7680
|
onClick: d[3] ||= w(() => {}, ["stop"])
|
|
7664
7681
|
}, [
|
|
7665
|
-
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", {
|
|
7666
7683
|
class: f(["toggle-desc-btn", { active: h.value }]),
|
|
7667
7684
|
onClick: d[0] ||= (e) => h.value = !h.value,
|
|
7668
7685
|
title: "显示/隐藏说明"
|
|
@@ -7679,18 +7696,18 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7679
7696
|
"stroke-width": "2"
|
|
7680
7697
|
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
7681
7698
|
l(n, { name: "slide" }, {
|
|
7682
|
-
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)]),
|
|
7683
7700
|
_: 1
|
|
7684
7701
|
}),
|
|
7685
|
-
s("div",
|
|
7702
|
+
s("div", Oo, [(g(!0), o(e, null, v(r.params, (e) => (g(), o("div", {
|
|
7686
7703
|
key: e.key,
|
|
7687
7704
|
class: f(["param-item", { "has-desc": h.value && e.description }])
|
|
7688
|
-
}, [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, [
|
|
7689
7706
|
s("button", {
|
|
7690
7707
|
class: "stepper-btn",
|
|
7691
7708
|
disabled: e.min !== void 0 && (m.value[e.key] ?? 0) <= e.min,
|
|
7692
7709
|
onClick: (t) => x(e, -1)
|
|
7693
|
-
}, " − ", 8,
|
|
7710
|
+
}, " − ", 8, Po),
|
|
7694
7711
|
e.type === "number" ? (g(), o("input", {
|
|
7695
7712
|
key: 0,
|
|
7696
7713
|
type: "number",
|
|
@@ -7700,17 +7717,17 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7700
7717
|
max: e.max,
|
|
7701
7718
|
step: e.step || 1,
|
|
7702
7719
|
onInput: (t) => y(e.key, t)
|
|
7703
|
-
}, null, 40,
|
|
7720
|
+
}, null, 40, Fo)) : a("", !0),
|
|
7704
7721
|
s("button", {
|
|
7705
7722
|
class: "stepper-btn",
|
|
7706
7723
|
disabled: e.max !== void 0 && (m.value[e.key] ?? 0) >= e.max,
|
|
7707
7724
|
onClick: (t) => x(e, 1)
|
|
7708
|
-
}, " + ", 8,
|
|
7725
|
+
}, " + ", 8, Io)
|
|
7709
7726
|
])]), l(n, { name: "slide" }, {
|
|
7710
|
-
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)]),
|
|
7711
7728
|
_: 2
|
|
7712
7729
|
}, 1024)], 2))), 128))]),
|
|
7713
|
-
s("div",
|
|
7730
|
+
s("div", Ro, [s("button", {
|
|
7714
7731
|
class: "params-btn reset",
|
|
7715
7732
|
onClick: T
|
|
7716
7733
|
}, [...d[8] ||= [s("svg", {
|
|
@@ -7718,7 +7735,7 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7718
7735
|
fill: "none",
|
|
7719
7736
|
stroke: "currentColor",
|
|
7720
7737
|
"stroke-width": "2"
|
|
7721
|
-
}, [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", {
|
|
7722
7739
|
class: "params-btn cancel",
|
|
7723
7740
|
onClick: d[2] ||= (e) => u.$emit("close")
|
|
7724
7741
|
}, "取消"), s("button", {
|
|
@@ -7736,28 +7753,28 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
7736
7753
|
_: 1
|
|
7737
7754
|
})]));
|
|
7738
7755
|
}
|
|
7739
|
-
}), [["__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 = {
|
|
7740
7757
|
key: 0,
|
|
7741
7758
|
class: "param-hint"
|
|
7742
|
-
},
|
|
7759
|
+
}, qo = {
|
|
7743
7760
|
key: 0,
|
|
7744
7761
|
class: "hover-overlay"
|
|
7745
|
-
},
|
|
7762
|
+
}, Jo = ["onClick"], Yo = {
|
|
7746
7763
|
key: 1,
|
|
7747
7764
|
class: "divider"
|
|
7748
|
-
},
|
|
7765
|
+
}, Xo = ["onClick"], Zo = { class: "indicator-item" }, Qo = { class: "menu-section" }, $o = { class: "menu-items" }, es = ["disabled", "onClick"], ts = {
|
|
7749
7766
|
key: 0,
|
|
7750
7767
|
class: "param-hint"
|
|
7751
|
-
},
|
|
7768
|
+
}, ns = {
|
|
7752
7769
|
key: 1,
|
|
7753
7770
|
class: "active-tag"
|
|
7754
|
-
},
|
|
7771
|
+
}, rs = { class: "menu-section" }, is = { class: "menu-items" }, as = ["disabled", "onClick"], os = {
|
|
7755
7772
|
key: 0,
|
|
7756
7773
|
class: "param-hint"
|
|
7757
|
-
},
|
|
7774
|
+
}, ss = {
|
|
7758
7775
|
key: 1,
|
|
7759
7776
|
class: "active-tag"
|
|
7760
|
-
},
|
|
7777
|
+
}, cs = /* @__PURE__ */ go(/* @__PURE__ */ u({
|
|
7761
7778
|
__name: "IndicatorSelector",
|
|
7762
7779
|
props: {
|
|
7763
7780
|
activeIndicators: {},
|
|
@@ -8136,8 +8153,8 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
8136
8153
|
document.addEventListener("click", se), window.addEventListener("resize", ce);
|
|
8137
8154
|
}), h(() => {
|
|
8138
8155
|
document.removeEventListener("click", se), window.removeEventListener("resize", ce);
|
|
8139
|
-
}), (r, u) => (g(), o("div",
|
|
8140
|
-
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", {
|
|
8141
8158
|
key: e.id,
|
|
8142
8159
|
class: "indicator-item"
|
|
8143
8160
|
}, [s("div", {
|
|
@@ -8147,8 +8164,8 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
8147
8164
|
}, [s("button", { class: f(["indicator-btn", {
|
|
8148
8165
|
active: !0,
|
|
8149
8166
|
hovering: M.value === e.id
|
|
8150
|
-
}]) }, [s("span",
|
|
8151
|
-
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, [
|
|
8152
8169
|
e.params ? (g(), o("button", {
|
|
8153
8170
|
key: 0,
|
|
8154
8171
|
class: "action-btn settings-btn",
|
|
@@ -8159,8 +8176,8 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
8159
8176
|
width: "14",
|
|
8160
8177
|
height: "14",
|
|
8161
8178
|
fill: "currentColor"
|
|
8162
|
-
}, [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,
|
|
8163
|
-
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),
|
|
8164
8181
|
s("button", {
|
|
8165
8182
|
class: "action-btn remove-btn",
|
|
8166
8183
|
onClick: w((t) => re(e.id), ["stop"]),
|
|
@@ -8170,10 +8187,10 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
8170
8187
|
width: "14",
|
|
8171
8188
|
height: "14",
|
|
8172
8189
|
fill: "currentColor"
|
|
8173
|
-
}, [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)
|
|
8174
8191
|
])) : a("", !0)]),
|
|
8175
8192
|
_: 2
|
|
8176
|
-
}, 1024)], 2)], 40,
|
|
8193
|
+
}, 1024)], 2)], 40, Wo)]))), 128)), s("div", Zo, [s("button", {
|
|
8177
8194
|
ref_key: "addBtnRef",
|
|
8178
8195
|
ref: O,
|
|
8179
8196
|
class: "add-btn",
|
|
@@ -8192,38 +8209,38 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
8192
8209
|
ref_key: "addMenuRef",
|
|
8193
8210
|
ref: k,
|
|
8194
8211
|
style: p(ee.value)
|
|
8195
|
-
}, [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", {
|
|
8196
8213
|
key: e.id,
|
|
8197
8214
|
class: f(["menu-item", { disabled: F(e.id) }]),
|
|
8198
8215
|
disabled: F(e.id),
|
|
8199
8216
|
onClick: (t) => ne(e.id)
|
|
8200
8217
|
}, [
|
|
8201
8218
|
c(b(e.label) + " ", 1),
|
|
8202
|
-
e.params ? (g(), o("span",
|
|
8203
|
-
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", {
|
|
8204
8221
|
viewBox: "0 0 24 24",
|
|
8205
8222
|
width: "14",
|
|
8206
8223
|
height: "14",
|
|
8207
8224
|
fill: "currentColor"
|
|
8208
8225
|
}, [s("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })], -1)]])) : a("", !0)
|
|
8209
|
-
], 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", {
|
|
8210
8227
|
key: e.id,
|
|
8211
8228
|
class: f(["menu-item", { disabled: F(e.id) }]),
|
|
8212
8229
|
disabled: F(e.id),
|
|
8213
8230
|
onClick: (t) => ne(e.id)
|
|
8214
8231
|
}, [
|
|
8215
8232
|
c(b(e.label) + " ", 1),
|
|
8216
|
-
e.params ? (g(), o("span",
|
|
8217
|
-
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", {
|
|
8218
8235
|
viewBox: "0 0 24 24",
|
|
8219
8236
|
width: "14",
|
|
8220
8237
|
height: "14",
|
|
8221
8238
|
fill: "currentColor"
|
|
8222
8239
|
}, [s("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })], -1)]])) : a("", !0)
|
|
8223
|
-
], 10,
|
|
8240
|
+
], 10, as))), 128))])])], 4)) : a("", !0)]),
|
|
8224
8241
|
_: 1
|
|
8225
8242
|
})])),
|
|
8226
|
-
P.value ? (g(), i(
|
|
8243
|
+
P.value ? (g(), i(Bo, {
|
|
8227
8244
|
key: 0,
|
|
8228
8245
|
visible: A.value,
|
|
8229
8246
|
"indicator-id": P.value.id,
|
|
@@ -8246,12 +8263,12 @@ var eo = { class: "kline-tooltip__title" }, to = { key: 0 }, no = { class: "klin
|
|
|
8246
8263
|
}), [["__scopeId", "data-v-aad3b750"]]);
|
|
8247
8264
|
//#endregion
|
|
8248
8265
|
//#region src/core/utils/klineConfig.ts
|
|
8249
|
-
function
|
|
8266
|
+
function ls(e, t) {
|
|
8250
8267
|
let n = Math.round(e * t);
|
|
8251
8268
|
return n % 2 == 0 && (n += 1), Math.max(1, n);
|
|
8252
8269
|
}
|
|
8253
|
-
function
|
|
8254
|
-
let r =
|
|
8270
|
+
function us(e, t, n) {
|
|
8271
|
+
let r = ls(e, n), i = Math.round(t * n), a = r + i, o = i;
|
|
8255
8272
|
return {
|
|
8256
8273
|
kWidthPx: r,
|
|
8257
8274
|
kGapPx: i,
|
|
@@ -8265,14 +8282,14 @@ function ls(e, t, n) {
|
|
|
8265
8282
|
}
|
|
8266
8283
|
//#endregion
|
|
8267
8284
|
//#region src/core/viewport/viewport.ts
|
|
8268
|
-
function
|
|
8269
|
-
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;
|
|
8270
8287
|
return {
|
|
8271
8288
|
start: Math.max(0, Math.floor((c - s) / o) - 1),
|
|
8272
8289
|
end: Math.min(i, Math.ceil((c + l - s) / o) + 1)
|
|
8273
8290
|
};
|
|
8274
8291
|
}
|
|
8275
|
-
function
|
|
8292
|
+
function fs(e, t, n) {
|
|
8276
8293
|
let r = -Infinity, i = Infinity;
|
|
8277
8294
|
for (let a = t; a < n && a < e.length; a++) {
|
|
8278
8295
|
let t = e[a];
|
|
@@ -8288,7 +8305,7 @@ function ds(e, t, n) {
|
|
|
8288
8305
|
}
|
|
8289
8306
|
//#endregion
|
|
8290
8307
|
//#region src/core/scale/priceScale.ts
|
|
8291
|
-
var
|
|
8308
|
+
var ps = class {
|
|
8292
8309
|
range = {
|
|
8293
8310
|
maxPrice: 100,
|
|
8294
8311
|
minPrice: 0
|
|
@@ -8335,7 +8352,7 @@ var fs = class {
|
|
|
8335
8352
|
deltaYToPriceOffset(e) {
|
|
8336
8353
|
return e * ((this.range.maxPrice - this.range.minPrice || 1) / Math.max(1, this.height - this.paddingTop - this.paddingBottom));
|
|
8337
8354
|
}
|
|
8338
|
-
},
|
|
8355
|
+
}, ms = class {
|
|
8339
8356
|
id;
|
|
8340
8357
|
top = 0;
|
|
8341
8358
|
height = 0;
|
|
@@ -8343,7 +8360,7 @@ var fs = class {
|
|
|
8343
8360
|
maxPrice: 100,
|
|
8344
8361
|
minPrice: 0
|
|
8345
8362
|
};
|
|
8346
|
-
yAxis = new
|
|
8363
|
+
yAxis = new ps();
|
|
8347
8364
|
renderers = [];
|
|
8348
8365
|
constructor(e) {
|
|
8349
8366
|
this.id = e;
|
|
@@ -8358,9 +8375,9 @@ var fs = class {
|
|
|
8358
8375
|
this.renderers.push(e);
|
|
8359
8376
|
}
|
|
8360
8377
|
updateRange(e, t) {
|
|
8361
|
-
this.priceRange =
|
|
8378
|
+
this.priceRange = fs(e, t.start, t.end), this.yAxis.setRange(this.priceRange);
|
|
8362
8379
|
}
|
|
8363
|
-
},
|
|
8380
|
+
}, hs = class {
|
|
8364
8381
|
chart;
|
|
8365
8382
|
isDragging = !1;
|
|
8366
8383
|
dragStartX = 0;
|
|
@@ -8559,7 +8576,7 @@ var fs = class {
|
|
|
8559
8576
|
reset() {
|
|
8560
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;
|
|
8561
8578
|
}
|
|
8562
|
-
},
|
|
8579
|
+
}, gs = class {
|
|
8563
8580
|
dom;
|
|
8564
8581
|
pane;
|
|
8565
8582
|
opt;
|
|
@@ -8577,15 +8594,15 @@ var fs = class {
|
|
|
8577
8594
|
}
|
|
8578
8595
|
resize(e, t, n) {
|
|
8579
8596
|
let r = this.dom.plotCanvas, i = this.dom.yAxisCanvas;
|
|
8580
|
-
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);
|
|
8581
8598
|
let a = this.opt.rightAxisWidth + (this.opt.priceLabelWidth || 60);
|
|
8582
|
-
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);
|
|
8583
8600
|
}
|
|
8584
8601
|
destroy() {}
|
|
8585
8602
|
};
|
|
8586
8603
|
//#endregion
|
|
8587
8604
|
//#region src/core/renderers/subVolume.ts
|
|
8588
|
-
function
|
|
8605
|
+
function _s(e = {}) {
|
|
8589
8606
|
let { paneId: t = "sub" } = e;
|
|
8590
8607
|
return {
|
|
8591
8608
|
name: `volume_${t}`,
|
|
@@ -8604,21 +8621,21 @@ function gs(e = {}) {
|
|
|
8604
8621
|
if (!r) continue;
|
|
8605
8622
|
let i = r.volume;
|
|
8606
8623
|
if (!i) continue;
|
|
8607
|
-
let a =
|
|
8608
|
-
d &&
|
|
8624
|
+
let a = ys(r), d = c[e - u];
|
|
8625
|
+
d && vs(t, d, a, i, f, o, s, n.height);
|
|
8609
8626
|
}
|
|
8610
8627
|
t.restore();
|
|
8611
8628
|
}
|
|
8612
8629
|
};
|
|
8613
8630
|
}
|
|
8614
|
-
function
|
|
8615
|
-
let c =
|
|
8631
|
+
function vs(e, t, n, r, i, a, o, s) {
|
|
8632
|
+
let c = bs(r, i, s), l = a;
|
|
8616
8633
|
e.fillStyle = n, e.fillRect(t, c, l, s - c);
|
|
8617
8634
|
}
|
|
8618
|
-
function
|
|
8635
|
+
function ys(e) {
|
|
8619
8636
|
return e.close > e.open ? X.UP : e.close < e.open ? X.DOWN : X.NEUTRAL;
|
|
8620
8637
|
}
|
|
8621
|
-
function
|
|
8638
|
+
function bs(e, t, n) {
|
|
8622
8639
|
return n - n / t * e;
|
|
8623
8640
|
}
|
|
8624
8641
|
//#endregion
|
|
@@ -8629,7 +8646,7 @@ function Z(e, t) {
|
|
|
8629
8646
|
function Q(e, t) {
|
|
8630
8647
|
return (Math.floor(e * t) + .5) / t;
|
|
8631
8648
|
}
|
|
8632
|
-
function
|
|
8649
|
+
function xs(e, t, n, r) {
|
|
8633
8650
|
if (t === n) return null;
|
|
8634
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);
|
|
8635
8652
|
return {
|
|
@@ -8639,7 +8656,7 @@ function bs(e, t, n, r) {
|
|
|
8639
8656
|
height: Math.max(1, c - s) / r
|
|
8640
8657
|
};
|
|
8641
8658
|
}
|
|
8642
|
-
function
|
|
8659
|
+
function Ss(e, t, n, r) {
|
|
8643
8660
|
if (e === t) return null;
|
|
8644
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);
|
|
8645
8662
|
return {
|
|
@@ -8649,7 +8666,7 @@ function xs(e, t, n, r) {
|
|
|
8649
8666
|
height: 1 / r
|
|
8650
8667
|
};
|
|
8651
8668
|
}
|
|
8652
|
-
function
|
|
8669
|
+
function Cs(e, t, n, r, i) {
|
|
8653
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;
|
|
8654
8671
|
return {
|
|
8655
8672
|
bodyRect: {
|
|
@@ -8672,7 +8689,7 @@ function Ss(e, t, n, r, i) {
|
|
|
8672
8689
|
}
|
|
8673
8690
|
//#endregion
|
|
8674
8691
|
//#region src/core/renderers/Indicator/ma.ts
|
|
8675
|
-
function
|
|
8692
|
+
function ws(e, t) {
|
|
8676
8693
|
let n = Array(e.length);
|
|
8677
8694
|
if (e.length < t) return n;
|
|
8678
8695
|
let r = 0;
|
|
@@ -8688,7 +8705,7 @@ function Cs(e, t) {
|
|
|
8688
8705
|
}
|
|
8689
8706
|
return n;
|
|
8690
8707
|
}
|
|
8691
|
-
function
|
|
8708
|
+
function Ts(e = {}) {
|
|
8692
8709
|
let t = {
|
|
8693
8710
|
ma5: !0,
|
|
8694
8711
|
ma10: !0,
|
|
@@ -8700,7 +8717,7 @@ function ws(e = {}) {
|
|
|
8700
8717
|
function i(e, t) {
|
|
8701
8718
|
let i = n.get(t);
|
|
8702
8719
|
if (i && r === e) return i.values;
|
|
8703
|
-
let a =
|
|
8720
|
+
let a = ws(e, t);
|
|
8704
8721
|
return n.set(t, {
|
|
8705
8722
|
period: t,
|
|
8706
8723
|
values: a
|
|
@@ -8727,7 +8744,7 @@ function ws(e = {}) {
|
|
|
8727
8744
|
priority: Y.INDICATOR,
|
|
8728
8745
|
draw(e) {
|
|
8729
8746
|
let { ctx: n, data: r, scrollLeft: o } = e, s = r;
|
|
8730
|
-
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());
|
|
8731
8748
|
},
|
|
8732
8749
|
onDataUpdate() {
|
|
8733
8750
|
r = null, n.clear();
|
|
@@ -8742,7 +8759,7 @@ function ws(e = {}) {
|
|
|
8742
8759
|
}
|
|
8743
8760
|
//#endregion
|
|
8744
8761
|
//#region src/core/renderers/Indicator/boll.ts
|
|
8745
|
-
function
|
|
8762
|
+
function Es(e, t, n) {
|
|
8746
8763
|
let r = Array(e.length);
|
|
8747
8764
|
if (e.length < t) return r;
|
|
8748
8765
|
let i = 0, a = [];
|
|
@@ -8775,7 +8792,7 @@ function Ts(e, t, n) {
|
|
|
8775
8792
|
}
|
|
8776
8793
|
return r;
|
|
8777
8794
|
}
|
|
8778
|
-
function
|
|
8795
|
+
function Ds(e = {}) {
|
|
8779
8796
|
let t = {
|
|
8780
8797
|
period: 20,
|
|
8781
8798
|
multiplier: 2,
|
|
@@ -8786,7 +8803,7 @@ function Es(e = {}) {
|
|
|
8786
8803
|
...e
|
|
8787
8804
|
}, n = null, r = 0, i = 0, a = [];
|
|
8788
8805
|
function o(e) {
|
|
8789
|
-
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;
|
|
8790
8807
|
}
|
|
8791
8808
|
return {
|
|
8792
8809
|
name: "boll",
|
|
@@ -8802,7 +8819,7 @@ function Es(e = {}) {
|
|
|
8802
8819
|
n.save(), n.translate(-s, 0);
|
|
8803
8820
|
let p = Math.max(a.start, t.period - 1), m = Math.min(a.end, d.length);
|
|
8804
8821
|
if (t.showBand) {
|
|
8805
|
-
n.fillStyle =
|
|
8822
|
+
n.fillStyle = Na.BAND_FILL, n.beginPath();
|
|
8806
8823
|
let e = !0;
|
|
8807
8824
|
for (let t = p; t < m; t++) {
|
|
8808
8825
|
let i = f[t];
|
|
@@ -8830,7 +8847,7 @@ function Es(e = {}) {
|
|
|
8830
8847
|
}
|
|
8831
8848
|
n.stroke();
|
|
8832
8849
|
};
|
|
8833
|
-
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();
|
|
8834
8851
|
},
|
|
8835
8852
|
onDataUpdate() {
|
|
8836
8853
|
n = null;
|
|
@@ -8843,7 +8860,7 @@ function Es(e = {}) {
|
|
|
8843
8860
|
}
|
|
8844
8861
|
};
|
|
8845
8862
|
}
|
|
8846
|
-
function
|
|
8863
|
+
function Os(e, t, n = 20, r = 2) {
|
|
8847
8864
|
if (t < n - 1 || t >= e.length) return null;
|
|
8848
8865
|
let i = 0;
|
|
8849
8866
|
for (let r = 0; r < n; r++) {
|
|
@@ -8866,7 +8883,7 @@ function Ds(e, t, n = 20, r = 2) {
|
|
|
8866
8883
|
}
|
|
8867
8884
|
//#endregion
|
|
8868
8885
|
//#region src/core/renderers/Indicator/expma.ts
|
|
8869
|
-
function
|
|
8886
|
+
function ks(e, t, n) {
|
|
8870
8887
|
let r = Array(e.length);
|
|
8871
8888
|
if (e.length === 0) return r;
|
|
8872
8889
|
let i = 2 / (t + 1), a = 2 / (n + 1), o = e[0].close, s = o, c = o;
|
|
@@ -8883,7 +8900,7 @@ function Os(e, t, n) {
|
|
|
8883
8900
|
}
|
|
8884
8901
|
return r;
|
|
8885
8902
|
}
|
|
8886
|
-
function
|
|
8903
|
+
function As(e, t, n = 12, r = 50) {
|
|
8887
8904
|
if (t < 0 || t >= e.length) return null;
|
|
8888
8905
|
let i = 2 / (n + 1), a = 2 / (r + 1), o = e[0].close, s = o, c = o;
|
|
8889
8906
|
for (let n = 1; n <= t; n++) {
|
|
@@ -8895,14 +8912,14 @@ function ks(e, t, n = 12, r = 50) {
|
|
|
8895
8912
|
slow: c
|
|
8896
8913
|
};
|
|
8897
8914
|
}
|
|
8898
|
-
function
|
|
8915
|
+
function js(e = {}) {
|
|
8899
8916
|
let t = {
|
|
8900
8917
|
fastPeriod: 12,
|
|
8901
8918
|
slowPeriod: 50,
|
|
8902
8919
|
...e
|
|
8903
8920
|
}, n = null, r = 0, i = 0, a = [];
|
|
8904
8921
|
function o(e) {
|
|
8905
|
-
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;
|
|
8906
8923
|
}
|
|
8907
8924
|
return {
|
|
8908
8925
|
name: "expma",
|
|
@@ -8916,7 +8933,7 @@ function As(e = {}) {
|
|
|
8916
8933
|
if (u.length < 2) return;
|
|
8917
8934
|
let d = o(u);
|
|
8918
8935
|
t.save(), t.translate(-a, 0);
|
|
8919
|
-
let f = i.start, p = Math.min(i.end, u.length), m =
|
|
8936
|
+
let f = i.start, p = Math.min(i.end, u.length), m = Va.FAST, h = Va.SLOW, g = (e, r) => {
|
|
8920
8937
|
t.strokeStyle = r, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
8921
8938
|
let a = !0;
|
|
8922
8939
|
for (let r = f; r < p; r++) {
|
|
@@ -8942,7 +8959,7 @@ function As(e = {}) {
|
|
|
8942
8959
|
}
|
|
8943
8960
|
//#endregion
|
|
8944
8961
|
//#region src/core/renderers/Indicator/ene.ts
|
|
8945
|
-
function
|
|
8962
|
+
function Ms(e, t, n) {
|
|
8946
8963
|
let r = Array(e.length);
|
|
8947
8964
|
if (e.length < t) return r;
|
|
8948
8965
|
let i = 0;
|
|
@@ -8970,7 +8987,7 @@ function js(e, t, n) {
|
|
|
8970
8987
|
}
|
|
8971
8988
|
return r;
|
|
8972
8989
|
}
|
|
8973
|
-
function
|
|
8990
|
+
function Ns(e, t, n = 10, r = 11) {
|
|
8974
8991
|
if (t < n - 1 || t >= e.length) return null;
|
|
8975
8992
|
let i = 0;
|
|
8976
8993
|
for (let r = 0; r < n; r++) {
|
|
@@ -8985,14 +9002,14 @@ function Ms(e, t, n = 10, r = 11) {
|
|
|
8985
9002
|
lower: a * (1 - o)
|
|
8986
9003
|
};
|
|
8987
9004
|
}
|
|
8988
|
-
function
|
|
9005
|
+
function Ps(e = {}) {
|
|
8989
9006
|
let t = {
|
|
8990
9007
|
period: 10,
|
|
8991
9008
|
deviation: 11,
|
|
8992
9009
|
...e
|
|
8993
9010
|
}, n = null, r = 0, i = 0, a = [];
|
|
8994
9011
|
function o(e) {
|
|
8995
|
-
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;
|
|
8996
9013
|
}
|
|
8997
9014
|
return {
|
|
8998
9015
|
name: "ene",
|
|
@@ -9048,7 +9065,7 @@ function Ns(e = {}) {
|
|
|
9048
9065
|
}
|
|
9049
9066
|
//#endregion
|
|
9050
9067
|
//#region src/utils/kline/ma.ts
|
|
9051
|
-
function
|
|
9068
|
+
function Fs(e, t, n) {
|
|
9052
9069
|
if (t < n - 1) return;
|
|
9053
9070
|
let r = 0;
|
|
9054
9071
|
for (let i = 0; i < n; i++) {
|
|
@@ -9060,7 +9077,7 @@ function Ps(e, t, n) {
|
|
|
9060
9077
|
}
|
|
9061
9078
|
//#endregion
|
|
9062
9079
|
//#region src/core/renderers/Indicator/mainIndicatorLegend.ts
|
|
9063
|
-
function
|
|
9080
|
+
function Is(e) {
|
|
9064
9081
|
let t = {
|
|
9065
9082
|
yPaddingPx: e.yPaddingPx,
|
|
9066
9083
|
indicators: {
|
|
@@ -9110,29 +9127,29 @@ function Fs(e) {
|
|
|
9110
9127
|
let t = `MA${e}`;
|
|
9111
9128
|
r.push({
|
|
9112
9129
|
label: `MA${e}`,
|
|
9113
|
-
color:
|
|
9114
|
-
value:
|
|
9130
|
+
color: Ma[t] || Ma.MA5,
|
|
9131
|
+
value: Fs(a, o, e)
|
|
9115
9132
|
});
|
|
9116
9133
|
}) : r.push({
|
|
9117
9134
|
label: "MA5",
|
|
9118
|
-
color:
|
|
9119
|
-
value:
|
|
9135
|
+
color: Ma.MA5,
|
|
9136
|
+
value: Fs(a, o, 5)
|
|
9120
9137
|
}, {
|
|
9121
9138
|
label: "MA10",
|
|
9122
|
-
color:
|
|
9123
|
-
value:
|
|
9139
|
+
color: Ma.MA10,
|
|
9140
|
+
value: Fs(a, o, 10)
|
|
9124
9141
|
}, {
|
|
9125
9142
|
label: "MA20",
|
|
9126
|
-
color:
|
|
9127
|
-
value:
|
|
9143
|
+
color: Ma.MA20,
|
|
9144
|
+
value: Fs(a, o, 20)
|
|
9128
9145
|
}, {
|
|
9129
9146
|
label: "MA30",
|
|
9130
|
-
color:
|
|
9131
|
-
value:
|
|
9147
|
+
color: Ma.MA30,
|
|
9148
|
+
value: Fs(a, o, 30)
|
|
9132
9149
|
}, {
|
|
9133
9150
|
label: "MA60",
|
|
9134
|
-
color:
|
|
9135
|
-
value:
|
|
9151
|
+
color: Ma.MA60,
|
|
9152
|
+
value: Fs(a, o, 60)
|
|
9136
9153
|
}), r.length > 0) {
|
|
9137
9154
|
let i = 12, a = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9138
9155
|
n.fillStyle = X.NEUTRAL, n.fillText("MA", i, a), i += n.measureText("MA").width + 10;
|
|
@@ -9144,18 +9161,18 @@ function Fs(e) {
|
|
|
9144
9161
|
} });
|
|
9145
9162
|
let l = t.indicators.BOLL;
|
|
9146
9163
|
l?.enabled && s.push({ draw: (e) => {
|
|
9147
|
-
let r = l.params.period ?? 20, i = l.params.multiplier ?? 2, s =
|
|
9148
|
-
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));
|
|
9149
9166
|
} });
|
|
9150
9167
|
let u = t.indicators.EXPMA;
|
|
9151
9168
|
u?.enabled && s.push({ draw: (e) => {
|
|
9152
|
-
let r = u.params.fastPeriod ?? 12, i = u.params.slowPeriod ?? 50, s =
|
|
9153
|
-
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));
|
|
9154
9171
|
} });
|
|
9155
9172
|
let d = t.indicators.ENE;
|
|
9156
9173
|
d?.enabled && s.push({ draw: (e) => {
|
|
9157
|
-
let r = d.params.period ?? 10, i = d.params.deviation ?? 11, s =
|
|
9158
|
-
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));
|
|
9159
9176
|
} }), s.forEach((e, t) => e.draw(t)), n.restore();
|
|
9160
9177
|
},
|
|
9161
9178
|
getConfig() {
|
|
@@ -9174,7 +9191,7 @@ function Fs(e) {
|
|
|
9174
9191
|
}
|
|
9175
9192
|
//#endregion
|
|
9176
9193
|
//#region src/core/renderers/Indicator/macd.ts
|
|
9177
|
-
function
|
|
9194
|
+
function Ls(e, t) {
|
|
9178
9195
|
let n = Array(e.length), r = 2 / (t + 1);
|
|
9179
9196
|
if (e.length === 0) return n;
|
|
9180
9197
|
n[0] = e[0].close;
|
|
@@ -9184,7 +9201,7 @@ function Is(e, t) {
|
|
|
9184
9201
|
}
|
|
9185
9202
|
return n;
|
|
9186
9203
|
}
|
|
9187
|
-
function
|
|
9204
|
+
function Rs(e, t) {
|
|
9188
9205
|
let n = Array(e.length), r = 2 / (t + 1), i = e.findIndex((e) => e !== void 0);
|
|
9189
9206
|
if (i === -1) return n;
|
|
9190
9207
|
n[i] = e[i];
|
|
@@ -9194,15 +9211,15 @@ function Ls(e, t) {
|
|
|
9194
9211
|
}
|
|
9195
9212
|
return n;
|
|
9196
9213
|
}
|
|
9197
|
-
function
|
|
9214
|
+
function zs(e, t, n, r) {
|
|
9198
9215
|
let i = Array(e.length);
|
|
9199
9216
|
if (e.length < n) return i;
|
|
9200
|
-
let a =
|
|
9217
|
+
let a = Ls(e, t), o = Ls(e, n), s = Array(e.length);
|
|
9201
9218
|
for (let t = 0; t < e.length; t++) {
|
|
9202
9219
|
let e = a[t], n = o[t];
|
|
9203
9220
|
e !== void 0 && n !== void 0 && (s[t] = e - n);
|
|
9204
9221
|
}
|
|
9205
|
-
let c =
|
|
9222
|
+
let c = Rs(s, r);
|
|
9206
9223
|
for (let t = 0; t < e.length; t++) {
|
|
9207
9224
|
let e = s[t], n = c[t];
|
|
9208
9225
|
e !== void 0 && n !== void 0 && (i[t] = {
|
|
@@ -9213,7 +9230,7 @@ function Rs(e, t, n, r) {
|
|
|
9213
9230
|
}
|
|
9214
9231
|
return i;
|
|
9215
9232
|
}
|
|
9216
|
-
function
|
|
9233
|
+
function Bs(e = {}) {
|
|
9217
9234
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9218
9235
|
fastPeriod: 12,
|
|
9219
9236
|
slowPeriod: 26,
|
|
@@ -9224,7 +9241,7 @@ function zs(e = {}) {
|
|
|
9224
9241
|
...n
|
|
9225
9242
|
}, i = null, a = 0, o = 0, s = 0, c = [];
|
|
9226
9243
|
function l(e) {
|
|
9227
|
-
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;
|
|
9228
9245
|
}
|
|
9229
9246
|
return {
|
|
9230
9247
|
name: `macd_${t}`,
|
|
@@ -9255,11 +9272,11 @@ function zs(e = {}) {
|
|
|
9255
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;
|
|
9256
9273
|
m = f ? i.macd >= f.macd : !0;
|
|
9257
9274
|
let h;
|
|
9258
|
-
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);
|
|
9259
9276
|
}
|
|
9260
9277
|
}
|
|
9261
9278
|
if (r.showDIF) {
|
|
9262
|
-
t.strokeStyle =
|
|
9279
|
+
t.strokeStyle = Pa.DIF, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9263
9280
|
let e = !0;
|
|
9264
9281
|
for (let r = b; r < x; r++) {
|
|
9265
9282
|
let i = p[r];
|
|
@@ -9272,7 +9289,7 @@ function zs(e = {}) {
|
|
|
9272
9289
|
t.stroke();
|
|
9273
9290
|
}
|
|
9274
9291
|
if (r.showDEA) {
|
|
9275
|
-
t.strokeStyle =
|
|
9292
|
+
t.strokeStyle = Pa.DEA, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9276
9293
|
let e = !0;
|
|
9277
9294
|
for (let r = b; r < x; r++) {
|
|
9278
9295
|
let i = p[r];
|
|
@@ -9297,11 +9314,11 @@ function zs(e = {}) {
|
|
|
9297
9314
|
}
|
|
9298
9315
|
};
|
|
9299
9316
|
}
|
|
9300
|
-
function Bs(e, t, n = 12, r = 26, i = 9) {
|
|
9301
|
-
return t < r || t >= e.length ? null : Rs(e, n, r, i)[t] ?? null;
|
|
9302
|
-
}
|
|
9303
9317
|
function Vs(e, t, n = 12, r = 26, i = 9) {
|
|
9304
|
-
|
|
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);
|
|
9305
9322
|
return a ? {
|
|
9306
9323
|
name: "MACD",
|
|
9307
9324
|
params: [
|
|
@@ -9313,24 +9330,24 @@ function Vs(e, t, n = 12, r = 26, i = 9) {
|
|
|
9313
9330
|
{
|
|
9314
9331
|
label: "DIF",
|
|
9315
9332
|
value: a.dif,
|
|
9316
|
-
color:
|
|
9333
|
+
color: Pa.DIF
|
|
9317
9334
|
},
|
|
9318
9335
|
{
|
|
9319
9336
|
label: "DEA",
|
|
9320
9337
|
value: a.dea,
|
|
9321
|
-
color:
|
|
9338
|
+
color: Pa.DEA
|
|
9322
9339
|
},
|
|
9323
9340
|
{
|
|
9324
9341
|
label: "MACD",
|
|
9325
9342
|
value: a.macd,
|
|
9326
|
-
color: a.macd >= 0 ?
|
|
9343
|
+
color: a.macd >= 0 ? Pa.BAR_UP : Pa.BAR_DOWN
|
|
9327
9344
|
}
|
|
9328
9345
|
]
|
|
9329
9346
|
} : null;
|
|
9330
9347
|
}
|
|
9331
9348
|
//#endregion
|
|
9332
9349
|
//#region src/core/renderers/Indicator/rsi.ts
|
|
9333
|
-
function
|
|
9350
|
+
function Us(e, t) {
|
|
9334
9351
|
let n = Array(e.length);
|
|
9335
9352
|
if (e.length < t + 1) return n;
|
|
9336
9353
|
let r = [];
|
|
@@ -9352,7 +9369,7 @@ function Hs(e, t) {
|
|
|
9352
9369
|
}
|
|
9353
9370
|
return n;
|
|
9354
9371
|
}
|
|
9355
|
-
function
|
|
9372
|
+
function Ws(e = {}) {
|
|
9356
9373
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9357
9374
|
period1: 6,
|
|
9358
9375
|
period2: 12,
|
|
@@ -9363,7 +9380,7 @@ function Us(e = {}) {
|
|
|
9363
9380
|
...n
|
|
9364
9381
|
}, i = null, a = 0, o = 0, s = 0, c = [], l = [], u = [];
|
|
9365
9382
|
function d(e) {
|
|
9366
|
-
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), {
|
|
9367
9384
|
rsi1: c,
|
|
9368
9385
|
rsi2: l,
|
|
9369
9386
|
rsi3: u
|
|
@@ -9396,7 +9413,7 @@ function Us(e = {}) {
|
|
|
9396
9413
|
}
|
|
9397
9414
|
t.stroke();
|
|
9398
9415
|
};
|
|
9399
|
-
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();
|
|
9400
9417
|
},
|
|
9401
9418
|
onDataUpdate() {
|
|
9402
9419
|
i = null;
|
|
@@ -9409,21 +9426,21 @@ function Us(e = {}) {
|
|
|
9409
9426
|
}
|
|
9410
9427
|
};
|
|
9411
9428
|
}
|
|
9412
|
-
function
|
|
9429
|
+
function Gs(e, t, n = 6, r = 12, i = 24) {
|
|
9413
9430
|
if (t < n + 1 || t >= e.length) return null;
|
|
9414
|
-
let a =
|
|
9431
|
+
let a = Us(e, n)[t], o = Us(e, r)[t], s = Us(e, i)[t], c = [];
|
|
9415
9432
|
return a !== void 0 && c.push({
|
|
9416
9433
|
label: `RSI${n}`,
|
|
9417
9434
|
value: a,
|
|
9418
|
-
color:
|
|
9435
|
+
color: Fa.RSI1
|
|
9419
9436
|
}), o !== void 0 && c.push({
|
|
9420
9437
|
label: `RSI${r}`,
|
|
9421
9438
|
value: o,
|
|
9422
|
-
color:
|
|
9439
|
+
color: Fa.RSI2
|
|
9423
9440
|
}), s !== void 0 && c.push({
|
|
9424
9441
|
label: `RSI${i}`,
|
|
9425
9442
|
value: s,
|
|
9426
|
-
color:
|
|
9443
|
+
color: Fa.RSI3
|
|
9427
9444
|
}), c.length === 0 ? null : {
|
|
9428
9445
|
name: "RSI",
|
|
9429
9446
|
params: [
|
|
@@ -9436,7 +9453,7 @@ function Ws(e, t, n = 6, r = 12, i = 24) {
|
|
|
9436
9453
|
}
|
|
9437
9454
|
//#endregion
|
|
9438
9455
|
//#region src/core/renderers/Indicator/cci.ts
|
|
9439
|
-
function
|
|
9456
|
+
function Ks(e, t) {
|
|
9440
9457
|
let n = Array(e.length);
|
|
9441
9458
|
if (e.length < t) return n;
|
|
9442
9459
|
let r = e.map((e) => (e.high + e.low + e.close) / 3);
|
|
@@ -9450,14 +9467,14 @@ function Gs(e, t) {
|
|
|
9450
9467
|
}
|
|
9451
9468
|
return n;
|
|
9452
9469
|
}
|
|
9453
|
-
function
|
|
9470
|
+
function qs(e = {}) {
|
|
9454
9471
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9455
9472
|
period: 14,
|
|
9456
9473
|
showCCI: !0,
|
|
9457
9474
|
...n
|
|
9458
9475
|
}, i = null, a = 0, o = [];
|
|
9459
9476
|
function s(e) {
|
|
9460
|
-
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;
|
|
9461
9478
|
}
|
|
9462
9479
|
return {
|
|
9463
9480
|
name: `cci_${t}`,
|
|
@@ -9479,10 +9496,10 @@ function Ks(e = {}) {
|
|
|
9479
9496
|
let h = p - m || 1, g = n.height - (0 - m) / h * n.height;
|
|
9480
9497
|
t.save(), t.translate(-o, 0);
|
|
9481
9498
|
let _ = n.height - (100 - m) / h * n.height, v = n.height - (-100 - m) / h * n.height, y = o, b = o + e.paneWidth;
|
|
9482
|
-
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([]);
|
|
9483
9500
|
let x = Math.max(a.start, r.period - 1), S = Math.min(a.end, d.length);
|
|
9484
9501
|
if (r.showCCI) {
|
|
9485
|
-
t.strokeStyle =
|
|
9502
|
+
t.strokeStyle = Ia.CCI, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9486
9503
|
let e = !0;
|
|
9487
9504
|
for (let r = x; r < S; r++) {
|
|
9488
9505
|
let i = f[r];
|
|
@@ -9507,25 +9524,25 @@ function Ks(e = {}) {
|
|
|
9507
9524
|
}
|
|
9508
9525
|
};
|
|
9509
9526
|
}
|
|
9510
|
-
function
|
|
9511
|
-
return
|
|
9527
|
+
function Js(e, t, n) {
|
|
9528
|
+
return Ks(e, n)[t];
|
|
9512
9529
|
}
|
|
9513
|
-
function
|
|
9530
|
+
function Ys(e, t, n = 14) {
|
|
9514
9531
|
if (t < n || t >= e.length) return null;
|
|
9515
|
-
let r =
|
|
9532
|
+
let r = Js(e, t, n);
|
|
9516
9533
|
return r === void 0 ? null : {
|
|
9517
9534
|
name: "CCI",
|
|
9518
9535
|
params: [n],
|
|
9519
9536
|
values: [{
|
|
9520
9537
|
label: "CCI",
|
|
9521
9538
|
value: r,
|
|
9522
|
-
color:
|
|
9539
|
+
color: Ia.CCI
|
|
9523
9540
|
}]
|
|
9524
9541
|
};
|
|
9525
9542
|
}
|
|
9526
9543
|
//#endregion
|
|
9527
9544
|
//#region src/core/renderers/Indicator/stoch.ts
|
|
9528
|
-
function
|
|
9545
|
+
function Xs(e, t, n) {
|
|
9529
9546
|
let r = Array(e.length);
|
|
9530
9547
|
if (e.length < t) return r;
|
|
9531
9548
|
let i = Array(e.length);
|
|
@@ -9553,7 +9570,7 @@ function Ys(e, t, n) {
|
|
|
9553
9570
|
}
|
|
9554
9571
|
return r;
|
|
9555
9572
|
}
|
|
9556
|
-
function
|
|
9573
|
+
function Zs(e = {}) {
|
|
9557
9574
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9558
9575
|
n: 9,
|
|
9559
9576
|
m: 3,
|
|
@@ -9562,7 +9579,7 @@ function Xs(e = {}) {
|
|
|
9562
9579
|
...n
|
|
9563
9580
|
}, i = null, a = 0, o = 0, s = [];
|
|
9564
9581
|
function c(e) {
|
|
9565
|
-
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;
|
|
9566
9583
|
}
|
|
9567
9584
|
return {
|
|
9568
9585
|
name: `stoch_${t}`,
|
|
@@ -9580,7 +9597,7 @@ function Xs(e = {}) {
|
|
|
9580
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([]);
|
|
9581
9598
|
let _ = Math.max(a.start, r.n + r.m - 2), v = Math.min(a.end, d.length);
|
|
9582
9599
|
if (r.showK) {
|
|
9583
|
-
t.strokeStyle =
|
|
9600
|
+
t.strokeStyle = La.K, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9584
9601
|
let e = !0;
|
|
9585
9602
|
for (let r = _; r < v; r++) {
|
|
9586
9603
|
let i = f[r];
|
|
@@ -9593,7 +9610,7 @@ function Xs(e = {}) {
|
|
|
9593
9610
|
t.stroke();
|
|
9594
9611
|
}
|
|
9595
9612
|
if (r.showD) {
|
|
9596
|
-
t.strokeStyle =
|
|
9613
|
+
t.strokeStyle = La.D, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9597
9614
|
let e = !0;
|
|
9598
9615
|
for (let r = _; r < v; r++) {
|
|
9599
9616
|
let i = f[r];
|
|
@@ -9618,29 +9635,29 @@ function Xs(e = {}) {
|
|
|
9618
9635
|
}
|
|
9619
9636
|
};
|
|
9620
9637
|
}
|
|
9621
|
-
function
|
|
9622
|
-
return
|
|
9638
|
+
function Qs(e, t, n, r) {
|
|
9639
|
+
return Xs(e, n, r)[t];
|
|
9623
9640
|
}
|
|
9624
|
-
function
|
|
9641
|
+
function $s(e, t, n = 9, r = 3) {
|
|
9625
9642
|
if (t < n + r - 1 || t >= e.length) return null;
|
|
9626
|
-
let i =
|
|
9643
|
+
let i = Qs(e, t, n, r);
|
|
9627
9644
|
return i ? {
|
|
9628
9645
|
name: "STOCH",
|
|
9629
9646
|
params: [n, r],
|
|
9630
9647
|
values: [{
|
|
9631
9648
|
label: "K",
|
|
9632
9649
|
value: i.k,
|
|
9633
|
-
color:
|
|
9650
|
+
color: La.K
|
|
9634
9651
|
}, {
|
|
9635
9652
|
label: "D",
|
|
9636
9653
|
value: i.d,
|
|
9637
|
-
color:
|
|
9654
|
+
color: La.D
|
|
9638
9655
|
}]
|
|
9639
9656
|
} : null;
|
|
9640
9657
|
}
|
|
9641
9658
|
//#endregion
|
|
9642
9659
|
//#region src/core/renderers/Indicator/mom.ts
|
|
9643
|
-
function
|
|
9660
|
+
function ec(e, t) {
|
|
9644
9661
|
let n = Array(e.length);
|
|
9645
9662
|
if (e.length < t + 1) return n;
|
|
9646
9663
|
for (let r = t; r < e.length; r++) {
|
|
@@ -9649,14 +9666,14 @@ function $s(e, t) {
|
|
|
9649
9666
|
}
|
|
9650
9667
|
return n;
|
|
9651
9668
|
}
|
|
9652
|
-
function
|
|
9669
|
+
function tc(e = {}) {
|
|
9653
9670
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9654
9671
|
period: 10,
|
|
9655
9672
|
showMOM: !0,
|
|
9656
9673
|
...n
|
|
9657
9674
|
}, i = null, a = 0, o = [];
|
|
9658
9675
|
function s(e) {
|
|
9659
|
-
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;
|
|
9660
9677
|
}
|
|
9661
9678
|
return {
|
|
9662
9679
|
name: `mom_${t}`,
|
|
@@ -9679,10 +9696,10 @@ function ec(e = {}) {
|
|
|
9679
9696
|
let g = p - m || 1, _ = n.height - (0 - m) / g * n.height;
|
|
9680
9697
|
t.save(), t.translate(-o, 0);
|
|
9681
9698
|
let v = o, y = o + e.paneWidth;
|
|
9682
|
-
t.strokeStyle =
|
|
9699
|
+
t.strokeStyle = Ra.ZERO, t.lineWidth = 1, t.beginPath(), t.moveTo(v, _), t.lineTo(y, _), t.stroke();
|
|
9683
9700
|
let b = Math.max(a.start, r.period), x = Math.min(a.end, d.length);
|
|
9684
9701
|
if (r.showMOM) {
|
|
9685
|
-
t.strokeStyle =
|
|
9702
|
+
t.strokeStyle = Ra.MOM, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9686
9703
|
let e = !0;
|
|
9687
9704
|
for (let r = b; r < x; r++) {
|
|
9688
9705
|
let i = f[r];
|
|
@@ -9707,25 +9724,25 @@ function ec(e = {}) {
|
|
|
9707
9724
|
}
|
|
9708
9725
|
};
|
|
9709
9726
|
}
|
|
9710
|
-
function
|
|
9711
|
-
return
|
|
9727
|
+
function nc(e, t, n) {
|
|
9728
|
+
return ec(e, n)[t];
|
|
9712
9729
|
}
|
|
9713
|
-
function
|
|
9730
|
+
function rc(e, t, n = 10) {
|
|
9714
9731
|
if (t < n || t >= e.length) return null;
|
|
9715
|
-
let r =
|
|
9732
|
+
let r = nc(e, t, n);
|
|
9716
9733
|
return r === void 0 ? null : {
|
|
9717
9734
|
name: "MOM",
|
|
9718
9735
|
params: [n],
|
|
9719
9736
|
values: [{
|
|
9720
9737
|
label: "MOM",
|
|
9721
9738
|
value: r,
|
|
9722
|
-
color:
|
|
9739
|
+
color: Ra.MOM
|
|
9723
9740
|
}]
|
|
9724
9741
|
};
|
|
9725
9742
|
}
|
|
9726
9743
|
//#endregion
|
|
9727
9744
|
//#region src/core/renderers/Indicator/wmsr.ts
|
|
9728
|
-
function
|
|
9745
|
+
function ic(e, t) {
|
|
9729
9746
|
let n = Array(e.length);
|
|
9730
9747
|
if (e.length < t) return n;
|
|
9731
9748
|
for (let r = t - 1; r < e.length; r++) {
|
|
@@ -9739,14 +9756,14 @@ function rc(e, t) {
|
|
|
9739
9756
|
}
|
|
9740
9757
|
return n;
|
|
9741
9758
|
}
|
|
9742
|
-
function
|
|
9759
|
+
function ac(e = {}) {
|
|
9743
9760
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9744
9761
|
period: 14,
|
|
9745
9762
|
showWMSR: !0,
|
|
9746
9763
|
...n
|
|
9747
9764
|
}, i = null, a = 0, o = [];
|
|
9748
9765
|
function s(e) {
|
|
9749
|
-
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;
|
|
9750
9767
|
}
|
|
9751
9768
|
return {
|
|
9752
9769
|
name: `wmsr_${t}`,
|
|
@@ -9761,10 +9778,10 @@ function ic(e = {}) {
|
|
|
9761
9778
|
let f = s(d), p = -100;
|
|
9762
9779
|
0 - p, t.save(), t.translate(-o, 0);
|
|
9763
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;
|
|
9764
|
-
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([]);
|
|
9765
9782
|
let y = Math.max(a.start, r.period - 1), b = Math.min(a.end, d.length);
|
|
9766
9783
|
if (r.showWMSR) {
|
|
9767
|
-
t.strokeStyle =
|
|
9784
|
+
t.strokeStyle = za.WMSR, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9768
9785
|
let e = !0;
|
|
9769
9786
|
for (let r = y; r < b; r++) {
|
|
9770
9787
|
let i = f[r];
|
|
@@ -9789,25 +9806,25 @@ function ic(e = {}) {
|
|
|
9789
9806
|
}
|
|
9790
9807
|
};
|
|
9791
9808
|
}
|
|
9792
|
-
function
|
|
9793
|
-
return
|
|
9809
|
+
function oc(e, t, n) {
|
|
9810
|
+
return ic(e, n)[t];
|
|
9794
9811
|
}
|
|
9795
|
-
function
|
|
9812
|
+
function sc(e, t, n = 14) {
|
|
9796
9813
|
if (t < n || t >= e.length) return null;
|
|
9797
|
-
let r =
|
|
9814
|
+
let r = oc(e, t, n);
|
|
9798
9815
|
return r === void 0 ? null : {
|
|
9799
9816
|
name: "WMSR",
|
|
9800
9817
|
params: [n],
|
|
9801
9818
|
values: [{
|
|
9802
9819
|
label: "WMSR",
|
|
9803
9820
|
value: r,
|
|
9804
|
-
color:
|
|
9821
|
+
color: za.WMSR
|
|
9805
9822
|
}]
|
|
9806
9823
|
};
|
|
9807
9824
|
}
|
|
9808
9825
|
//#endregion
|
|
9809
9826
|
//#region src/core/renderers/Indicator/kst.ts
|
|
9810
|
-
function
|
|
9827
|
+
function cc(e, t) {
|
|
9811
9828
|
let n = Array(e.length);
|
|
9812
9829
|
if (e.length < t + 1) return n;
|
|
9813
9830
|
for (let r = t; r < e.length; r++) {
|
|
@@ -9816,7 +9833,7 @@ function sc(e, t) {
|
|
|
9816
9833
|
}
|
|
9817
9834
|
return n;
|
|
9818
9835
|
}
|
|
9819
|
-
function
|
|
9836
|
+
function lc(e, t) {
|
|
9820
9837
|
let n = Array(e.length), r = 0, i = 0;
|
|
9821
9838
|
for (let a = 0; a < e.length; a++) {
|
|
9822
9839
|
let o = e[a];
|
|
@@ -9830,13 +9847,13 @@ function cc(e, t) {
|
|
|
9830
9847
|
}
|
|
9831
9848
|
return n;
|
|
9832
9849
|
}
|
|
9833
|
-
function
|
|
9834
|
-
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);
|
|
9835
9852
|
for (let t = 0; t < e.length; t++) {
|
|
9836
9853
|
let e = d[t], n = f[t], r = p[t], i = m[t];
|
|
9837
9854
|
e !== void 0 && n !== void 0 && r !== void 0 && i !== void 0 && (h[t] = e * 1 + n * 2 + r * 3 + i * 4);
|
|
9838
9855
|
}
|
|
9839
|
-
let g =
|
|
9856
|
+
let g = lc(h, a);
|
|
9840
9857
|
for (let t = 0; t < e.length; t++) {
|
|
9841
9858
|
let e = h[t], n = g[t];
|
|
9842
9859
|
e !== void 0 && n !== void 0 && (o[t] = {
|
|
@@ -9846,7 +9863,7 @@ function lc(e, t, n, r, i, a) {
|
|
|
9846
9863
|
}
|
|
9847
9864
|
return o;
|
|
9848
9865
|
}
|
|
9849
|
-
function
|
|
9866
|
+
function dc(e = {}) {
|
|
9850
9867
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9851
9868
|
roc1: 10,
|
|
9852
9869
|
roc2: 15,
|
|
@@ -9859,7 +9876,7 @@ function uc(e = {}) {
|
|
|
9859
9876
|
}, i = null, a = "", o = [];
|
|
9860
9877
|
function s(e) {
|
|
9861
9878
|
let t = `${r.roc1}-${r.roc2}-${r.roc3}-${r.roc4}-${r.signalPeriod}`;
|
|
9862
|
-
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;
|
|
9863
9880
|
}
|
|
9864
9881
|
return {
|
|
9865
9882
|
name: `kst_${t}`,
|
|
@@ -9885,7 +9902,7 @@ function uc(e = {}) {
|
|
|
9885
9902
|
t.strokeStyle = "rgba(0, 0, 0, 0.1)", t.lineWidth = 1, t.beginPath(), t.moveTo(v, _), t.lineTo(y, _), t.stroke();
|
|
9886
9903
|
let b = Math.max(a.start, r.roc4 + 15 + r.signalPeriod - 1), x = Math.min(a.end, d.length);
|
|
9887
9904
|
if (r.showKST) {
|
|
9888
|
-
t.strokeStyle =
|
|
9905
|
+
t.strokeStyle = Ba.KST, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9889
9906
|
let e = !0;
|
|
9890
9907
|
for (let r = b; r < x; r++) {
|
|
9891
9908
|
let i = f[r];
|
|
@@ -9898,7 +9915,7 @@ function uc(e = {}) {
|
|
|
9898
9915
|
t.stroke();
|
|
9899
9916
|
}
|
|
9900
9917
|
if (r.showSignal) {
|
|
9901
|
-
t.strokeStyle =
|
|
9918
|
+
t.strokeStyle = Ba.SIGNAL, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9902
9919
|
let e = !0;
|
|
9903
9920
|
for (let r = b; r < x; r++) {
|
|
9904
9921
|
let i = f[r];
|
|
@@ -9923,12 +9940,12 @@ function uc(e = {}) {
|
|
|
9923
9940
|
}
|
|
9924
9941
|
};
|
|
9925
9942
|
}
|
|
9926
|
-
function
|
|
9927
|
-
return
|
|
9943
|
+
function fc(e, t, n, r, i, a, o) {
|
|
9944
|
+
return uc(e, n, r, i, a, o)[t];
|
|
9928
9945
|
}
|
|
9929
|
-
function
|
|
9946
|
+
function pc(e, t, n = 10, r = 15, i = 20, a = 30, o = 9) {
|
|
9930
9947
|
if (t < a + 15 + o || t >= e.length) return null;
|
|
9931
|
-
let s =
|
|
9948
|
+
let s = fc(e, t, n, r, i, a, o);
|
|
9932
9949
|
return s ? {
|
|
9933
9950
|
name: "KST",
|
|
9934
9951
|
params: [
|
|
@@ -9941,17 +9958,17 @@ function fc(e, t, n = 10, r = 15, i = 20, a = 30, o = 9) {
|
|
|
9941
9958
|
values: [{
|
|
9942
9959
|
label: "KST",
|
|
9943
9960
|
value: s.kst,
|
|
9944
|
-
color:
|
|
9961
|
+
color: Ba.KST
|
|
9945
9962
|
}, {
|
|
9946
9963
|
label: "Signal",
|
|
9947
9964
|
value: s.signal,
|
|
9948
|
-
color:
|
|
9965
|
+
color: Ba.SIGNAL
|
|
9949
9966
|
}]
|
|
9950
9967
|
} : null;
|
|
9951
9968
|
}
|
|
9952
9969
|
//#endregion
|
|
9953
9970
|
//#region src/core/renderers/Indicator/fastk.ts
|
|
9954
|
-
function
|
|
9971
|
+
function mc(e, t) {
|
|
9955
9972
|
let n = Array(e.length);
|
|
9956
9973
|
if (e.length < t) return n;
|
|
9957
9974
|
for (let r = t - 1; r < e.length; r++) {
|
|
@@ -9965,14 +9982,14 @@ function pc(e, t) {
|
|
|
9965
9982
|
}
|
|
9966
9983
|
return n;
|
|
9967
9984
|
}
|
|
9968
|
-
function
|
|
9985
|
+
function hc(e = {}) {
|
|
9969
9986
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9970
9987
|
period: 9,
|
|
9971
9988
|
showFASTK: !0,
|
|
9972
9989
|
...n
|
|
9973
9990
|
}, i = null, a = 0, o = [];
|
|
9974
9991
|
function s(e) {
|
|
9975
|
-
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;
|
|
9976
9993
|
}
|
|
9977
9994
|
return {
|
|
9978
9995
|
name: `fastk_${t}`,
|
|
@@ -9990,7 +10007,7 @@ function mc(e = {}) {
|
|
|
9990
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([]);
|
|
9991
10008
|
let _ = Math.max(a.start, r.period - 1), v = Math.min(a.end, d.length);
|
|
9992
10009
|
if (r.showFASTK) {
|
|
9993
|
-
t.strokeStyle =
|
|
10010
|
+
t.strokeStyle = La.K, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
|
|
9994
10011
|
let e = !0;
|
|
9995
10012
|
for (let r = _; r < v; r++) {
|
|
9996
10013
|
let i = f[r];
|
|
@@ -10015,42 +10032,42 @@ function mc(e = {}) {
|
|
|
10015
10032
|
}
|
|
10016
10033
|
};
|
|
10017
10034
|
}
|
|
10018
|
-
function
|
|
10019
|
-
return
|
|
10035
|
+
function gc(e, t, n) {
|
|
10036
|
+
return mc(e, n)[t];
|
|
10020
10037
|
}
|
|
10021
|
-
function
|
|
10038
|
+
function _c(e, t, n = 9) {
|
|
10022
10039
|
if (t < n || t >= e.length) return null;
|
|
10023
|
-
let r =
|
|
10040
|
+
let r = gc(e, t, n);
|
|
10024
10041
|
return r === void 0 ? null : {
|
|
10025
10042
|
name: "FASTK",
|
|
10026
10043
|
params: [n],
|
|
10027
10044
|
values: [{
|
|
10028
10045
|
label: "FASTK",
|
|
10029
10046
|
value: r,
|
|
10030
|
-
color:
|
|
10047
|
+
color: La.K
|
|
10031
10048
|
}]
|
|
10032
10049
|
};
|
|
10033
10050
|
}
|
|
10034
10051
|
//#endregion
|
|
10035
10052
|
//#region src/core/renderers/Indicator/index.ts
|
|
10036
|
-
function
|
|
10053
|
+
function vc(e) {
|
|
10037
10054
|
let { indicatorId: t, paneId: n } = e;
|
|
10038
10055
|
switch (t) {
|
|
10039
|
-
case "VOLUME": return
|
|
10040
|
-
case "MACD": return
|
|
10041
|
-
case "RSI": return
|
|
10042
|
-
case "CCI": return
|
|
10043
|
-
case "STOCH": return
|
|
10044
|
-
case "MOM": return
|
|
10045
|
-
case "WMSR": return
|
|
10046
|
-
case "KST": return
|
|
10047
|
-
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 });
|
|
10048
10065
|
default: throw Error(`Unknown indicator: ${t}`);
|
|
10049
10066
|
}
|
|
10050
10067
|
}
|
|
10051
10068
|
//#endregion
|
|
10052
10069
|
//#region src/core/chart.ts
|
|
10053
|
-
var
|
|
10070
|
+
var yc = class e {
|
|
10054
10071
|
dom;
|
|
10055
10072
|
opt;
|
|
10056
10073
|
data = [];
|
|
@@ -10061,8 +10078,21 @@ var vc = class e {
|
|
|
10061
10078
|
interaction;
|
|
10062
10079
|
pluginHost;
|
|
10063
10080
|
rendererPluginManager;
|
|
10081
|
+
preciseDpr = 0;
|
|
10082
|
+
dprObserver;
|
|
10064
10083
|
constructor(e, t) {
|
|
10065
|
-
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
|
+
}
|
|
10066
10096
|
}
|
|
10067
10097
|
get plugin() {
|
|
10068
10098
|
return this.pluginHost;
|
|
@@ -10088,18 +10118,11 @@ var vc = class e {
|
|
|
10088
10118
|
draw() {
|
|
10089
10119
|
this.markerManager.clear();
|
|
10090
10120
|
let e = this.computeViewport();
|
|
10091
|
-
if (!e)
|
|
10092
|
-
|
|
10093
|
-
return;
|
|
10094
|
-
}
|
|
10095
|
-
if (this.data.length === 0) {
|
|
10096
|
-
console.log("[Chart] draw aborted: no data");
|
|
10097
|
-
return;
|
|
10098
|
-
}
|
|
10099
|
-
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 = {
|
|
10100
10123
|
start: t,
|
|
10101
10124
|
end: n
|
|
10102
|
-
}, i = this.calcKLinePositions(r), { kWidthPx: a } =
|
|
10125
|
+
}, i = this.calcKLinePositions(r), { kWidthPx: a } = us(this.opt.kWidth, this.opt.kGap, e.dpr);
|
|
10103
10126
|
this.interaction.setKLinePositions(i, r, a);
|
|
10104
10127
|
for (let t of this.paneRenderers) {
|
|
10105
10128
|
let n = t.getPane(), a = t.getDom().plotCanvas.getContext("2d"), o = t.getDom().yAxisCanvas.getContext("2d");
|
|
@@ -10108,7 +10131,7 @@ var vc = class e {
|
|
|
10108
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));
|
|
10109
10132
|
let c = {
|
|
10110
10133
|
ctx: a,
|
|
10111
|
-
pane:
|
|
10134
|
+
pane: oa(n),
|
|
10112
10135
|
data: this.data,
|
|
10113
10136
|
range: r,
|
|
10114
10137
|
scrollLeft: e.scrollLeft,
|
|
@@ -10141,7 +10164,8 @@ var vc = class e {
|
|
|
10141
10164
|
priceToY: () => 0,
|
|
10142
10165
|
yToPrice: () => 0,
|
|
10143
10166
|
getPaddingTop: () => 0,
|
|
10144
|
-
getPaddingBottom: () => 0
|
|
10167
|
+
getPaddingBottom: () => 0,
|
|
10168
|
+
getPriceOffset: () => 0
|
|
10145
10169
|
},
|
|
10146
10170
|
priceRange: {
|
|
10147
10171
|
maxPrice: 0,
|
|
@@ -10214,7 +10238,7 @@ var vc = class e {
|
|
|
10214
10238
|
calcKLinePositions(e) {
|
|
10215
10239
|
let { start: t, end: n } = e, r = n - t;
|
|
10216
10240
|
if (r <= 0) return [];
|
|
10217
|
-
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);
|
|
10218
10242
|
for (let e = 0; e < r; e++) s[e] = (o + (t + e) * a) / i;
|
|
10219
10243
|
return s;
|
|
10220
10244
|
}
|
|
@@ -10232,9 +10256,9 @@ var vc = class e {
|
|
|
10232
10256
|
console.warn(`Pane "${e}" already exists`);
|
|
10233
10257
|
return;
|
|
10234
10258
|
}
|
|
10235
|
-
let t = new
|
|
10259
|
+
let t = new ms(e), n = document.createElement("canvas"), r = document.createElement("canvas"), i = e === "main";
|
|
10236
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";
|
|
10237
|
-
let a = new
|
|
10261
|
+
let a = new gs({
|
|
10238
10262
|
plotCanvas: n,
|
|
10239
10263
|
yAxisCanvas: r
|
|
10240
10264
|
}, t, {
|
|
@@ -10265,7 +10289,7 @@ var vc = class e {
|
|
|
10265
10289
|
return n && this.updateRendererConfig(e, n), !0;
|
|
10266
10290
|
}
|
|
10267
10291
|
this.addPane(r);
|
|
10268
|
-
let i =
|
|
10292
|
+
let i = vc({
|
|
10269
10293
|
indicatorId: t,
|
|
10270
10294
|
paneId: r
|
|
10271
10295
|
});
|
|
@@ -10294,7 +10318,7 @@ var vc = class e {
|
|
|
10294
10318
|
r.yAxis.setPriceOffset(a + i), this.scheduleDraw();
|
|
10295
10319
|
}
|
|
10296
10320
|
updateData(e) {
|
|
10297
|
-
|
|
10321
|
+
this.data = e ?? [];
|
|
10298
10322
|
let t = this.dom.container;
|
|
10299
10323
|
if (t) {
|
|
10300
10324
|
let e = this.getContentWidth(), n = Math.max(0, e - t.clientWidth);
|
|
@@ -10306,7 +10330,7 @@ var vc = class e {
|
|
|
10306
10330
|
return this.data;
|
|
10307
10331
|
}
|
|
10308
10332
|
getContentWidth() {
|
|
10309
|
-
let e = this.data?.length ?? 0, t = this.viewport?.dpr || window.devicePixelRatio || 1, { startXPx: n, unitPx: r } =
|
|
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);
|
|
10310
10334
|
return (n + e * r) / t;
|
|
10311
10335
|
}
|
|
10312
10336
|
resize() {
|
|
@@ -10319,12 +10343,12 @@ var vc = class e {
|
|
|
10319
10343
|
});
|
|
10320
10344
|
}
|
|
10321
10345
|
async destroy() {
|
|
10322
|
-
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();
|
|
10323
10347
|
}
|
|
10324
10348
|
initPanes() {
|
|
10325
10349
|
this.paneRenderers = this.opt.panes.map((e) => {
|
|
10326
|
-
let t = new
|
|
10327
|
-
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({
|
|
10328
10352
|
plotCanvas: n,
|
|
10329
10353
|
yAxisCanvas: r
|
|
10330
10354
|
}, t, {
|
|
@@ -10358,33 +10382,37 @@ var vc = class e {
|
|
|
10358
10382
|
computeViewport() {
|
|
10359
10383
|
let e = this.dom.container;
|
|
10360
10384
|
if (!e) return null;
|
|
10361
|
-
let t = Math.max(1, Math.
|
|
10362
|
-
|
|
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);
|
|
10363
10391
|
let l = {
|
|
10364
10392
|
viewWidth: t,
|
|
10365
10393
|
viewHeight: n,
|
|
10366
|
-
plotWidth:
|
|
10367
|
-
plotHeight:
|
|
10368
|
-
scrollLeft:
|
|
10369
|
-
dpr:
|
|
10394
|
+
plotWidth: i,
|
|
10395
|
+
plotHeight: a,
|
|
10396
|
+
scrollLeft: c,
|
|
10397
|
+
dpr: o
|
|
10370
10398
|
};
|
|
10371
10399
|
return this.viewport = l, l;
|
|
10372
10400
|
}
|
|
10373
10401
|
};
|
|
10374
10402
|
//#endregion
|
|
10375
10403
|
//#region src/types/kLine.ts
|
|
10376
|
-
function
|
|
10404
|
+
function bc(e) {
|
|
10377
10405
|
return e.open > e.close ? "down" : e.open < e.close ? "up" : "flat";
|
|
10378
10406
|
}
|
|
10379
10407
|
//#endregion
|
|
10380
10408
|
//#region src/types/volumePrice.ts
|
|
10381
10409
|
var $ = /* @__PURE__ */ function(e) {
|
|
10382
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;
|
|
10383
|
-
}({}),
|
|
10411
|
+
}({}), xc = {
|
|
10384
10412
|
volumeAmplifyThreshold: 1.5,
|
|
10385
10413
|
volumeShrinkThreshold: .8,
|
|
10386
10414
|
avgPeriod: 20
|
|
10387
|
-
},
|
|
10415
|
+
}, Sc = class {
|
|
10388
10416
|
prefixSum = [];
|
|
10389
10417
|
dataLength = 0;
|
|
10390
10418
|
build(e) {
|
|
@@ -10409,8 +10437,8 @@ var $ = /* @__PURE__ */ function(e) {
|
|
|
10409
10437
|
return this.dataLength;
|
|
10410
10438
|
}
|
|
10411
10439
|
};
|
|
10412
|
-
function
|
|
10413
|
-
let i = new
|
|
10440
|
+
function Cc(e, t, n, r = xc) {
|
|
10441
|
+
let i = new Sc();
|
|
10414
10442
|
i.build(e);
|
|
10415
10443
|
let a = [], { volumeAmplifyThreshold: o, volumeShrinkThreshold: s, avgPeriod: c } = r;
|
|
10416
10444
|
for (let r = t; r < n && r < e.length; r++) {
|
|
@@ -10431,7 +10459,7 @@ function Sc(e, t, n, r = bc) {
|
|
|
10431
10459
|
}
|
|
10432
10460
|
//#endregion
|
|
10433
10461
|
//#region src/core/renderers/candle.ts
|
|
10434
|
-
function
|
|
10462
|
+
function wc() {
|
|
10435
10463
|
return {
|
|
10436
10464
|
name: "candle",
|
|
10437
10465
|
version: "1.0.0",
|
|
@@ -10442,128 +10470,130 @@ function Cc() {
|
|
|
10442
10470
|
draw(e) {
|
|
10443
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;
|
|
10444
10472
|
if (!d.length) return;
|
|
10445
|
-
let { kWidthPx: f } =
|
|
10473
|
+
let { kWidthPx: f } = us(o, s, c);
|
|
10446
10474
|
t.save(), t.translate(-a, 0);
|
|
10447
|
-
let p = l || [], m =
|
|
10475
|
+
let p = l || [], m = Cc(d, i.start, i.end, xc);
|
|
10448
10476
|
for (let e = i.start; e < i.end && e < d.length; e++) {
|
|
10449
10477
|
let r = d[e];
|
|
10450
10478
|
if (!r) continue;
|
|
10451
|
-
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 =
|
|
10452
|
-
if (!
|
|
10453
|
-
let
|
|
10454
|
-
t.fillStyle =
|
|
10455
|
-
let
|
|
10456
|
-
if (r.high >
|
|
10457
|
-
let e =
|
|
10458
|
-
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);
|
|
10459
10487
|
}
|
|
10460
|
-
if (r.low <
|
|
10461
|
-
let e =
|
|
10462
|
-
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);
|
|
10463
10491
|
}
|
|
10464
|
-
let
|
|
10465
|
-
if (
|
|
10466
|
-
let n =
|
|
10467
|
-
|
|
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);
|
|
10468
10496
|
}
|
|
10469
10497
|
}
|
|
10470
10498
|
t.restore();
|
|
10471
10499
|
}
|
|
10472
10500
|
};
|
|
10473
10501
|
}
|
|
10474
|
-
function
|
|
10475
|
-
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;
|
|
10476
10506
|
switch (r) {
|
|
10477
10507
|
case $.RISE_WITH_VOLUME:
|
|
10478
|
-
|
|
10508
|
+
f = "#FF4444", p = !0;
|
|
10479
10509
|
break;
|
|
10480
10510
|
case $.RISE_WITHOUT_VOLUME:
|
|
10481
|
-
|
|
10511
|
+
f = "#00C853", p = !0;
|
|
10482
10512
|
break;
|
|
10483
10513
|
case $.FALL_WITH_VOLUME:
|
|
10484
|
-
|
|
10514
|
+
f = "#FF4444", p = !1;
|
|
10485
10515
|
break;
|
|
10486
10516
|
case $.FALL_WITHOUT_VOLUME:
|
|
10487
|
-
|
|
10517
|
+
f = "#00C853", p = !1;
|
|
10488
10518
|
break;
|
|
10489
10519
|
default: return;
|
|
10490
10520
|
}
|
|
10491
|
-
if (e.save(), e.beginPath(),
|
|
10492
|
-
let r = n - o, i = r -
|
|
10493
|
-
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);
|
|
10494
10524
|
} else {
|
|
10495
|
-
let r = n + o, i = r +
|
|
10496
|
-
e.moveTo(t, i), e.lineTo(t -
|
|
10497
|
-
}
|
|
10498
|
-
e.closePath(), e.fillStyle =
|
|
10499
|
-
let
|
|
10500
|
-
if (
|
|
10501
|
-
let e = n - o -
|
|
10502
|
-
|
|
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;
|
|
10503
10533
|
} else {
|
|
10504
|
-
let e = n + o;
|
|
10505
|
-
e +
|
|
10534
|
+
let e = l(n + o);
|
|
10535
|
+
l(e + d), m = l(t - u / 2), h = e;
|
|
10506
10536
|
}
|
|
10507
|
-
let
|
|
10537
|
+
let g;
|
|
10508
10538
|
switch (r) {
|
|
10509
10539
|
case $.RISE_WITH_VOLUME:
|
|
10510
|
-
|
|
10540
|
+
g = "RISE_WITH_VOLUME";
|
|
10511
10541
|
break;
|
|
10512
10542
|
case $.RISE_WITHOUT_VOLUME:
|
|
10513
|
-
|
|
10543
|
+
g = "RISE_WITHOUT_VOLUME";
|
|
10514
10544
|
break;
|
|
10515
10545
|
case $.FALL_WITH_VOLUME:
|
|
10516
|
-
|
|
10546
|
+
g = "FALL_WITH_VOLUME";
|
|
10517
10547
|
break;
|
|
10518
10548
|
case $.FALL_WITHOUT_VOLUME:
|
|
10519
|
-
|
|
10549
|
+
g = "FALL_WITHOUT_VOLUME";
|
|
10520
10550
|
break;
|
|
10521
10551
|
default: return;
|
|
10522
10552
|
}
|
|
10523
|
-
let
|
|
10553
|
+
let _ = `mk_price-volume_${i}`;
|
|
10524
10554
|
s.register({
|
|
10525
|
-
id:
|
|
10555
|
+
id: _,
|
|
10526
10556
|
type: "triangle",
|
|
10527
|
-
markerType:
|
|
10528
|
-
x:
|
|
10529
|
-
y:
|
|
10530
|
-
width:
|
|
10531
|
-
height:
|
|
10557
|
+
markerType: g,
|
|
10558
|
+
x: m,
|
|
10559
|
+
y: h,
|
|
10560
|
+
width: u,
|
|
10561
|
+
height: d,
|
|
10532
10562
|
dataIndex: i,
|
|
10533
10563
|
metadata: { relation: r }
|
|
10534
10564
|
});
|
|
10535
10565
|
}
|
|
10536
10566
|
//#endregion
|
|
10537
10567
|
//#region src/core/utils/tickCount.ts
|
|
10538
|
-
function
|
|
10568
|
+
function Ec(e, t) {
|
|
10539
10569
|
return t ? Math.max(4, Math.min(8, Math.round(e / 80))) : 2;
|
|
10540
10570
|
}
|
|
10541
10571
|
//#endregion
|
|
10542
10572
|
//#region src/core/renderers/gridLines.ts
|
|
10543
|
-
function
|
|
10573
|
+
function Dc() {
|
|
10544
10574
|
return {
|
|
10545
10575
|
name: "gridLines",
|
|
10546
10576
|
version: "1.0.0",
|
|
10547
10577
|
description: "网格线渲染器",
|
|
10548
10578
|
debugName: "网格线",
|
|
10549
|
-
paneId:
|
|
10579
|
+
paneId: sa,
|
|
10550
10580
|
priority: Y.GRID,
|
|
10551
10581
|
draw(e) {
|
|
10552
10582
|
let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, dpr: s, kLinePositions: c } = e, l = r;
|
|
10553
10583
|
if (!l.length) return;
|
|
10554
|
-
let u =
|
|
10555
|
-
t.save(), t.fillStyle =
|
|
10584
|
+
let u = Ec(n.height, n.id === "main");
|
|
10585
|
+
t.save(), t.fillStyle = ja.HORIZONTAL, t.translate(-a, 0);
|
|
10556
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);
|
|
10557
10587
|
for (let e = 0; e < u; e++) {
|
|
10558
|
-
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);
|
|
10559
10589
|
r && t.fillRect(r.x, r.y, r.width, r.height);
|
|
10560
10590
|
}
|
|
10561
|
-
let y =
|
|
10591
|
+
let y = Da(l);
|
|
10562
10592
|
for (let e of y) {
|
|
10563
10593
|
if (e < i.start || e >= i.end || e >= l.length) continue;
|
|
10564
10594
|
let r = e - i.start;
|
|
10565
10595
|
if (r < 0 || r >= c.length) continue;
|
|
10566
|
-
let a =
|
|
10596
|
+
let a = xs(c[r] + o / 2, 0, n.height, s);
|
|
10567
10597
|
a && t.fillRect(a.x, a.y, a.width, a.height);
|
|
10568
10598
|
}
|
|
10569
10599
|
t.restore();
|
|
@@ -10572,7 +10602,7 @@ function Ec() {
|
|
|
10572
10602
|
}
|
|
10573
10603
|
//#endregion
|
|
10574
10604
|
//#region src/core/renderers/lastPrice.ts
|
|
10575
|
-
function
|
|
10605
|
+
function Oc() {
|
|
10576
10606
|
return {
|
|
10577
10607
|
name: "lastPriceLine",
|
|
10578
10608
|
version: "1.0.0",
|
|
@@ -10593,7 +10623,7 @@ function Dc() {
|
|
|
10593
10623
|
}
|
|
10594
10624
|
//#endregion
|
|
10595
10625
|
//#region src/core/renderers/extremaMarkers.ts
|
|
10596
|
-
function
|
|
10626
|
+
function kc() {
|
|
10597
10627
|
return {
|
|
10598
10628
|
name: "extremaMarkers",
|
|
10599
10629
|
version: "1.0.0",
|
|
@@ -10616,38 +10646,38 @@ function Oc() {
|
|
|
10616
10646
|
let t = e - i.start;
|
|
10617
10647
|
return t < 0 || t >= l.length ? 0 : l[t] + o / 2;
|
|
10618
10648
|
};
|
|
10619
|
-
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();
|
|
10620
10650
|
}
|
|
10621
10651
|
};
|
|
10622
10652
|
}
|
|
10623
|
-
function
|
|
10653
|
+
function Ac(e, t, n, r, i, a, o) {
|
|
10624
10654
|
let s = r.toFixed(2);
|
|
10625
10655
|
e.font = "12px Arial";
|
|
10626
10656
|
let c = e.measureText(s).width, l = t - o + 30 + 4 + c > a, u = t, d = l ? t - 30 : t + 30;
|
|
10627
10657
|
u > d && ([u, d] = [d, u]);
|
|
10628
|
-
let f =
|
|
10629
|
-
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));
|
|
10630
10660
|
let p = Z(d, i), m = Z(n, i);
|
|
10631
|
-
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)));
|
|
10632
10662
|
}
|
|
10633
10663
|
//#endregion
|
|
10634
10664
|
//#region src/utils/priceToY.ts
|
|
10635
|
-
function
|
|
10665
|
+
function jc(e, t, n, r, i, a) {
|
|
10636
10666
|
let o = t - n || 1, s = (e - n) / o;
|
|
10637
10667
|
return i + Math.max(1, r - i - a) * (1 - s);
|
|
10638
10668
|
}
|
|
10639
|
-
function
|
|
10669
|
+
function Mc(e, t, n, r, i, a) {
|
|
10640
10670
|
let o = t - n || 1, s = Math.max(1, r - i - a);
|
|
10641
10671
|
return n + (1 - (Math.min(Math.max(e, i), i + s) - i) / s) * o;
|
|
10642
10672
|
}
|
|
10643
10673
|
//#endregion
|
|
10644
10674
|
//#region src/utils/kLineDraw/axis.ts
|
|
10645
|
-
function
|
|
10646
|
-
let { x: n, y: r, width: i, height: a, priceRange: o, yPaddingPx: s = 0, dpr: c, ticks: l = 10, bgColor: u =
|
|
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);
|
|
10647
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";
|
|
10648
10678
|
let S = n + i / 2;
|
|
10649
10679
|
for (let t = 0; t < Math.max(2, l); t++) {
|
|
10650
|
-
let i = b === 0 ? v : v - x * t, o = Math.round(
|
|
10680
|
+
let i = b === 0 ? v : v - x * t, o = Math.round(jc(i, v, y, a, _, _) + r);
|
|
10651
10681
|
if (h) {
|
|
10652
10682
|
e.strokeStyle = f, e.beginPath();
|
|
10653
10683
|
let t = Q(o, c);
|
|
@@ -10657,14 +10687,14 @@ function Mc(e, t) {
|
|
|
10657
10687
|
e.fillStyle = d, e.fillText(s.toFixed(2), Z(S, c), Z(o, c));
|
|
10658
10688
|
}
|
|
10659
10689
|
}
|
|
10660
|
-
function
|
|
10661
|
-
let { x: n, y: r, width: i, height: a, crosshairX: o, timestamp: s, dpr: c, fontSize: l = 16, paddingX: u = 8 } = t, d =
|
|
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);
|
|
10662
10692
|
e.save(), e.font = `${l}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "center";
|
|
10663
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;
|
|
10664
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();
|
|
10665
10695
|
}
|
|
10666
|
-
function
|
|
10667
|
-
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 =
|
|
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);
|
|
10668
10698
|
e.save(), e.font = `${u}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "center";
|
|
10669
10699
|
let h = u + 4, g = i, _ = Math.min(Math.max(o, r + h / 2), r + a - h / 2), v = _ - h / 2;
|
|
10670
10700
|
e.fillStyle = "rgba(0, 0, 0, 0.8)";
|
|
@@ -10673,33 +10703,33 @@ function Pc(e, t) {
|
|
|
10673
10703
|
let C = n + i / 2;
|
|
10674
10704
|
e.fillStyle = "#ffffff", e.fillText(m, Z(C, l), Z(_, l)), e.restore();
|
|
10675
10705
|
}
|
|
10676
|
-
function
|
|
10677
|
-
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 =
|
|
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;
|
|
10678
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";
|
|
10679
|
-
let O = r + a / 2 + 1, k =
|
|
10709
|
+
let O = r + a / 2 + 1, k = Da(o).filter((e) => e >= u && e < d);
|
|
10680
10710
|
for (let t of k) {
|
|
10681
10711
|
let n = o[t];
|
|
10682
10712
|
if (!n) continue;
|
|
10683
10713
|
let r = E + t * T + D / 2 - s, a = _, c = Math.max(_, i - _);
|
|
10684
10714
|
if (r >= a && r <= c) {
|
|
10685
|
-
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);
|
|
10686
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));
|
|
10687
10717
|
}
|
|
10688
10718
|
}
|
|
10689
10719
|
}
|
|
10690
10720
|
//#endregion
|
|
10691
10721
|
//#region src/core/renderers/yAxis.ts
|
|
10692
|
-
function
|
|
10722
|
+
function Lc(e) {
|
|
10693
10723
|
return {
|
|
10694
10724
|
name: "yAxis",
|
|
10695
10725
|
version: "1.0.0",
|
|
10696
10726
|
description: "Y轴价格刻度渲染器",
|
|
10697
10727
|
debugName: "Y轴",
|
|
10698
|
-
paneId:
|
|
10728
|
+
paneId: sa,
|
|
10699
10729
|
priority: Y.SYSTEM_YAXIS,
|
|
10700
10730
|
draw(t) {
|
|
10701
|
-
let { ctx: n, pane: r, dpr: i, yAxisCtx: a } = t, o = a || n, s =
|
|
10702
|
-
|
|
10731
|
+
let { ctx: n, pane: r, dpr: i, yAxisCtx: a } = t, o = a || n, s = Ec(r.height, r.id === "main");
|
|
10732
|
+
Nc(o, {
|
|
10703
10733
|
x: 0,
|
|
10704
10734
|
y: r.top,
|
|
10705
10735
|
width: e.axisWidth,
|
|
@@ -10714,8 +10744,8 @@ function Ic(e) {
|
|
|
10714
10744
|
fontSize: 12
|
|
10715
10745
|
});
|
|
10716
10746
|
let c = e.getCrosshair?.();
|
|
10717
|
-
c && c.price !== null &&
|
|
10718
|
-
x:
|
|
10747
|
+
c && c.price !== null && Fc(o, {
|
|
10748
|
+
x: 0,
|
|
10719
10749
|
y: r.top,
|
|
10720
10750
|
width: e.axisWidth,
|
|
10721
10751
|
height: r.height,
|
|
@@ -10730,19 +10760,19 @@ function Ic(e) {
|
|
|
10730
10760
|
}
|
|
10731
10761
|
//#endregion
|
|
10732
10762
|
//#region src/core/renderers/timeAxis.ts
|
|
10733
|
-
var
|
|
10734
|
-
function
|
|
10763
|
+
var Rc = Symbol("time-axis");
|
|
10764
|
+
function zc(e) {
|
|
10735
10765
|
return {
|
|
10736
10766
|
name: "timeAxis",
|
|
10737
10767
|
version: "1.0.0",
|
|
10738
10768
|
description: "时间轴渲染器",
|
|
10739
10769
|
debugName: "时间轴",
|
|
10740
|
-
paneId:
|
|
10770
|
+
paneId: Rc,
|
|
10741
10771
|
priority: Y.SYSTEM_XAXIS,
|
|
10742
10772
|
isSystem: !0,
|
|
10743
10773
|
draw(t) {
|
|
10744
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;
|
|
10745
|
-
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, {
|
|
10746
10776
|
x: 0,
|
|
10747
10777
|
y: 0,
|
|
10748
10778
|
width: f,
|
|
@@ -10760,7 +10790,7 @@ function Rc(e) {
|
|
|
10760
10790
|
let m = e.getCrosshair?.();
|
|
10761
10791
|
if (m && typeof m.index == "number") {
|
|
10762
10792
|
let e = u[m.index];
|
|
10763
|
-
e &&
|
|
10793
|
+
e && Pc(d, {
|
|
10764
10794
|
x: 0,
|
|
10765
10795
|
y: 0,
|
|
10766
10796
|
width: f,
|
|
@@ -10776,22 +10806,22 @@ function Rc(e) {
|
|
|
10776
10806
|
}
|
|
10777
10807
|
//#endregion
|
|
10778
10808
|
//#region src/core/renderers/crosshair.ts
|
|
10779
|
-
function
|
|
10809
|
+
function Bc(e) {
|
|
10780
10810
|
return {
|
|
10781
10811
|
name: "crosshair",
|
|
10782
10812
|
version: "1.0.0",
|
|
10783
10813
|
description: "十字线渲染器",
|
|
10784
10814
|
debugName: "十字线",
|
|
10785
|
-
paneId:
|
|
10815
|
+
paneId: sa,
|
|
10786
10816
|
priority: Y.SYSTEM_CROSSHAIR,
|
|
10787
10817
|
draw(t) {
|
|
10788
10818
|
let { ctx: n, pane: r, dpr: i, paneWidth: a } = t, o = e.getCrosshairState();
|
|
10789
10819
|
if (o.isDragging || !o.pos) return;
|
|
10790
10820
|
let { x: s } = o.pos, c = r.id === o.activePaneId, l = -1;
|
|
10791
|
-
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 =
|
|
10792
|
-
let u =
|
|
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);
|
|
10793
10823
|
if (u && n.fillRect(u.x, u.y, u.width, u.height), c && l >= 0) {
|
|
10794
|
-
let e =
|
|
10824
|
+
let e = Ss(0, a, Math.min(l, r.height - 1 / i), i);
|
|
10795
10825
|
e && n.fillRect(e.x, e.y, e.width, e.height);
|
|
10796
10826
|
}
|
|
10797
10827
|
n.restore();
|
|
@@ -10800,7 +10830,7 @@ function zc(e) {
|
|
|
10800
10830
|
}
|
|
10801
10831
|
//#endregion
|
|
10802
10832
|
//#region src/core/renderers/paneTitle.ts
|
|
10803
|
-
function
|
|
10833
|
+
function Vc(e) {
|
|
10804
10834
|
let t = { ...e };
|
|
10805
10835
|
return {
|
|
10806
10836
|
name: `paneTitle_${e.paneId}`,
|
|
@@ -10817,17 +10847,17 @@ function Bc(e) {
|
|
|
10817
10847
|
let a = t.getTitleInfo?.();
|
|
10818
10848
|
if (a) {
|
|
10819
10849
|
let e = 12;
|
|
10820
|
-
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) {
|
|
10821
10851
|
let t = `(${a.params.join(",")})`;
|
|
10822
|
-
n.fillStyle =
|
|
10852
|
+
n.fillStyle = Oa.TERTIARY, n.fillText(t, e, i), e += n.measureText(t).width + 8;
|
|
10823
10853
|
} else e += 8;
|
|
10824
10854
|
if (a.values && a.values.length > 0) for (let t of a.values) {
|
|
10825
10855
|
let r = `${t.label} ${t.value.toFixed(3)}`;
|
|
10826
10856
|
n.fillStyle = t.color, n.fillText(r, e, i), e += n.measureText(r).width + 8;
|
|
10827
10857
|
}
|
|
10828
|
-
} else if (n.fillStyle =
|
|
10858
|
+
} else if (n.fillStyle = Oa.PRIMARY, n.fillText(t.title, 12, i), t.description) {
|
|
10829
10859
|
let e = n.measureText(t.title).width;
|
|
10830
|
-
n.fillStyle =
|
|
10860
|
+
n.fillStyle = Oa.WEAK, n.fillText(` - ${t.description}`, 12 + e, i);
|
|
10831
10861
|
}
|
|
10832
10862
|
n.restore();
|
|
10833
10863
|
},
|
|
@@ -10841,7 +10871,7 @@ function Bc(e) {
|
|
|
10841
10871
|
}
|
|
10842
10872
|
//#endregion
|
|
10843
10873
|
//#region src/components/KLineChart.vue?vue&type=script&setup=true&lang.ts
|
|
10844
|
-
var
|
|
10874
|
+
var Hc = { class: "chart-wrapper" }, Uc = 4, Wc = /* @__PURE__ */ go(/* @__PURE__ */ u({
|
|
10845
10875
|
__name: "KLineChart",
|
|
10846
10876
|
props: {
|
|
10847
10877
|
semanticConfig: {},
|
|
@@ -10982,11 +11012,11 @@ var Vc = { class: "chart-wrapper" }, Hc = 4, Uc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
10982
11012
|
}
|
|
10983
11013
|
}
|
|
10984
11014
|
function pe(e = "VOLUME", t) {
|
|
10985
|
-
if (z.value.length >=
|
|
11015
|
+
if (z.value.length >= Uc) return !1;
|
|
10986
11016
|
let n = `sub_${e}`;
|
|
10987
11017
|
if (z.value.some((e) => e.id === n)) return !0;
|
|
10988
11018
|
if (!C.value?.createSubPane(e, t ?? fe(e))) return !1;
|
|
10989
|
-
let r =
|
|
11019
|
+
let r = Vc({
|
|
10990
11020
|
paneId: n,
|
|
10991
11021
|
title: e,
|
|
10992
11022
|
getTitleInfo: () => ye(n)
|
|
@@ -11038,7 +11068,7 @@ var Vc = { class: "chart-wrapper" }, Hc = 4, Uc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11038
11068
|
let e = C.value?.getSubPaneIndicators() ?? [];
|
|
11039
11069
|
z.value = [];
|
|
11040
11070
|
for (let t of e) {
|
|
11041
|
-
let e = `sub_${t}`, n =
|
|
11071
|
+
let e = `sub_${t}`, n = Vc({
|
|
11042
11072
|
paneId: e,
|
|
11043
11073
|
title: t,
|
|
11044
11074
|
getTitleInfo: () => ye(e)
|
|
@@ -11057,7 +11087,7 @@ var Vc = { class: "chart-wrapper" }, Hc = 4, Uc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11057
11087
|
if (!n) return;
|
|
11058
11088
|
let r = n.indicatorId;
|
|
11059
11089
|
C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(r), C.value?.createSubPane(t, fe(t));
|
|
11060
|
-
let i = `sub_${t}`, a =
|
|
11090
|
+
let i = `sub_${t}`, a = Vc({
|
|
11061
11091
|
paneId: i,
|
|
11062
11092
|
title: t,
|
|
11063
11093
|
getTitleInfo: () => ye(i)
|
|
@@ -11086,14 +11116,14 @@ var Vc = { class: "chart-wrapper" }, Hc = 4, Uc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11086
11116
|
let i = N.value;
|
|
11087
11117
|
if (i === null) return null;
|
|
11088
11118
|
switch (t.indicatorId) {
|
|
11089
|
-
case "MACD": return
|
|
11090
|
-
case "RSI": return
|
|
11091
|
-
case "CCI": return
|
|
11092
|
-
case "STOCH": return
|
|
11093
|
-
case "MOM": return
|
|
11094
|
-
case "WMSR": return
|
|
11095
|
-
case "KST": return
|
|
11096
|
-
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);
|
|
11097
11127
|
default: return null;
|
|
11098
11128
|
}
|
|
11099
11129
|
}
|
|
@@ -11123,7 +11153,7 @@ var Vc = { class: "chart-wrapper" }, Hc = 4, Uc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11123
11153
|
}), E();
|
|
11124
11154
|
}
|
|
11125
11155
|
let Se = r(() => {
|
|
11126
|
-
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);
|
|
11127
11157
|
return (r + e * i) / t + (n.rightAxisWidth + n.priceLabelWidth);
|
|
11128
11158
|
});
|
|
11129
11159
|
function Ce() {
|
|
@@ -11147,7 +11177,7 @@ var Vc = { class: "chart-wrapper" }, Hc = 4, Uc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11147
11177
|
C.value?.interaction.onWheel(e), I();
|
|
11148
11178
|
};
|
|
11149
11179
|
e.addEventListener("wheel", i, { passive: !1 });
|
|
11150
|
-
let a = new
|
|
11180
|
+
let a = new yc({
|
|
11151
11181
|
container: e,
|
|
11152
11182
|
canvasLayer: t,
|
|
11153
11183
|
xAxisCanvas: r
|
|
@@ -11172,13 +11202,13 @@ var Vc = { class: "chart-wrapper" }, Hc = 4, Uc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11172
11202
|
if (!r) return;
|
|
11173
11203
|
let i = Math.max(0, r.scrollWidth - r.clientWidth);
|
|
11174
11204
|
r.scrollLeft = Math.min(Math.max(0, n), i), a.applyZoom(e, t);
|
|
11175
|
-
}), a.useRenderer(
|
|
11205
|
+
}), a.useRenderer(Dc()), a.useRenderer(kc()), a.useRenderer(Ts({
|
|
11176
11206
|
ma5: !0,
|
|
11177
11207
|
ma10: !0,
|
|
11178
11208
|
ma20: !0,
|
|
11179
11209
|
ma30: !0,
|
|
11180
11210
|
ma60: !0
|
|
11181
|
-
})), a.useRenderer(
|
|
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({
|
|
11182
11212
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11183
11213
|
yPaddingPx: n.yPaddingPx,
|
|
11184
11214
|
getCrosshair: () => {
|
|
@@ -11188,12 +11218,12 @@ var Vc = { class: "chart-wrapper" }, Hc = 4, Uc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11188
11218
|
price: t
|
|
11189
11219
|
} : null;
|
|
11190
11220
|
}
|
|
11191
|
-
})), a.useRenderer(
|
|
11221
|
+
})), a.useRenderer(Is({ yPaddingPx: n.yPaddingPx })), a.useRenderer(Bc({ getCrosshairState: () => ({
|
|
11192
11222
|
pos: a.interaction.crosshairPos,
|
|
11193
11223
|
activePaneId: a.interaction.activePaneId,
|
|
11194
11224
|
isDragging: a.interaction.isDraggingState(),
|
|
11195
11225
|
price: a.interaction.crosshairPrice
|
|
11196
|
-
}) })), a.useRenderer(
|
|
11226
|
+
}) })), a.useRenderer(zc({
|
|
11197
11227
|
height: n.bottomAxisHeight,
|
|
11198
11228
|
getCrosshair: () => {
|
|
11199
11229
|
let e = a.interaction.crosshairPos, t = a.interaction.crosshairIndex;
|
|
@@ -11202,7 +11232,7 @@ var Vc = { class: "chart-wrapper" }, Hc = 4, Uc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11202
11232
|
index: t
|
|
11203
11233
|
} : null;
|
|
11204
11234
|
}
|
|
11205
|
-
})), 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) => {
|
|
11206
11236
|
console.error("Semantic config error:", e);
|
|
11207
11237
|
}), w.value.on("config:ready", () => {
|
|
11208
11238
|
T.value = a.getData()?.length ?? 0, ie(), ge(), _e(), d(() => Ce());
|
|
@@ -11240,7 +11270,7 @@ var Vc = { class: "chart-wrapper" }, Hc = 4, Uc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11240
11270
|
let t = await w.value?.applyConfig(e);
|
|
11241
11271
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
11242
11272
|
}
|
|
11243
|
-
}, { deep: !0 }), (e, t) => (g(), o("div",
|
|
11273
|
+
}, { deep: !0 }), (e, t) => (g(), o("div", Hc, [s("div", {
|
|
11244
11274
|
class: f(["chart-container", { "is-dragging": j.value }]),
|
|
11245
11275
|
ref_key: "containerRef",
|
|
11246
11276
|
ref: v,
|
|
@@ -11258,18 +11288,11 @@ var Vc = { class: "chart-wrapper" }, Hc = 4, Uc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11258
11288
|
ref: u
|
|
11259
11289
|
}, [
|
|
11260
11290
|
s("canvas", {
|
|
11261
|
-
class: "x-axis-canvas
|
|
11291
|
+
class: "x-axis-canvas",
|
|
11262
11292
|
ref_key: "xAxisCanvasRef",
|
|
11263
11293
|
ref: c
|
|
11264
11294
|
}, null, 512),
|
|
11265
|
-
|
|
11266
|
-
class: "x-axis-corner right-axis-corner",
|
|
11267
|
-
style: p({
|
|
11268
|
-
height: n.bottomAxisHeight + "px",
|
|
11269
|
-
width: n.rightAxisWidth + n.priceLabelWidth - 1 + "px"
|
|
11270
|
-
})
|
|
11271
|
-
}, null, 4),
|
|
11272
|
-
P.value ? (g(), i(go, {
|
|
11295
|
+
P.value ? (g(), i(_o, {
|
|
11273
11296
|
key: 0,
|
|
11274
11297
|
k: P.value,
|
|
11275
11298
|
index: F.value,
|
|
@@ -11282,20 +11305,20 @@ var Vc = { class: "chart-wrapper" }, Hc = 4, Uc = /* @__PURE__ */ ho(/* @__PURE_
|
|
|
11282
11305
|
"data",
|
|
11283
11306
|
"pos"
|
|
11284
11307
|
])) : a("", !0),
|
|
11285
|
-
O.value || k.value ? (g(), i(
|
|
11308
|
+
O.value || k.value ? (g(), i(So, {
|
|
11286
11309
|
key: 1,
|
|
11287
11310
|
marker: O.value || k.value,
|
|
11288
11311
|
pos: A.value
|
|
11289
11312
|
}, null, 8, ["marker", "pos"])) : a("", !0)
|
|
11290
|
-
], 512)], 4)], 34), l(
|
|
11313
|
+
], 512)], 4)], 34), l(cs, {
|
|
11291
11314
|
"active-indicators": R.value,
|
|
11292
11315
|
"indicator-params": de.value,
|
|
11293
11316
|
onToggle: be,
|
|
11294
11317
|
onUpdateParams: xe
|
|
11295
11318
|
}, null, 8, ["active-indicators", "indicator-params"])]));
|
|
11296
11319
|
}
|
|
11297
|
-
}), [["__scopeId", "data-v-
|
|
11298
|
-
e.component("KLineChart",
|
|
11320
|
+
}), [["__scopeId", "data-v-c5290a39"]]), Gc = { install(e) {
|
|
11321
|
+
e.component("KLineChart", Wc);
|
|
11299
11322
|
} };
|
|
11300
11323
|
//#endregion
|
|
11301
|
-
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 };
|