@iccandle/news 0.0.10 → 0.0.12
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/dist/news-widget.cjs +7 -7
- package/dist/news-widget.d.ts +1 -0
- package/dist/news-widget.js +1288 -1276
- package/package.json +1 -1
package/dist/news-widget.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.cta-loader__overlay{background-color:var(--iccandle-background);position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.cta-loader__content{position:relative;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:9rem;padding-left:1.5rem;padding-right:1.5rem}.cta-loader__video{height:100%;max-height:18rem;width:100%;object-fit:contain}@media(min-width:768px){.cta-loader__video{max-height:20rem}}.cta-loader__bar-wrapper{width:100%;max-width:24rem}.cta-loader__bar-track{position:relative;height:.25rem;overflow:hidden;border-radius:9999px;background-color:var( --iccandle-background-secondary, rgba(128, 128, 128, .7) )}.cta-loader__bar-fill{position:absolute;top:0;bottom:0;left:0;width:100%;transform-origin:left;border-radius:9999px;background-color:var(--iccandle-primary, #ffffff);will-change:transform}.news-widget_detail_page__container{background:var(--iccandle-background);display:flex;height:100%;width:100%}.news-widget_detail_page__right_border{display:flex;flex:1;flex-direction:column;min-width:50%;border-right-style:solid;border-right-color:var(--iccandle-border);border-right-width:1px}.news-widget_detail_page__event_details{height:calc(100% - 57px)}.news-widget_detail_page__title_container{display:flex;height:57px;width:100%;align-items:center;justify-content:space-between;border-bottom-style:solid;border-bottom-color:var(--iccandle-border);border-bottom-width:1px}.news-widget_detail_page__title_padding{display:flex;align-items:center;gap:8px;padding:16px}.news-widget_detail_page__title_text{font-size:18px;line-height:calc(1.75 / 1.125);font-weight:600;color:var(--iccandle-title)}.news-widget_detail_page__back_button{height:2.25rem;width:2.25rem;border:none}.news-widget_detail_page__back_icon{color:var(--iccandle-text);height:1.25rem;width:1.25rem}.news-widget_event_details__container{background-color:var(--iccandle-background);box-sizing:border-box;display:flex;min-height:100%;width:100%;min-width:50%;flex:1;flex-direction:column;overflow:auto;gap:16px;padding:16px}.news-widget_event_details__container_sm{height:50%}@media(min-width:40rem){.news-widget_event_details__container_sm{height:100%}}.news-widget_event_details__ghost_button{background-color:var(--iccandle-background);position:absolute;right:50%;bottom:-8px;height:12px;width:24px;color:var(--iccandle-text);border-radius:calc(infinity * 1px);border-style:solid;border-width:1px;border-color:var(--iccandle-border);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.news-widget_event_details__ghost_button_open{rotate:180deg}.news-widget_event_details__icon{height:16px;width:16px}.news-widget_event_details__chart_wrapper{position:relative;height:100%;min-height:500px}.news-widget_event_details__chart{height:100%;min-height:500px;overflow:hidden;border-radius:.75rem;border-style:solid;border-width:1px;border-color:var(--iccandle-border)}.news-widget_event_details_card__container{background-color:var(--iccandle-background);position:relative;border-radius:1rem;border-style:solid;border-width:1px;border-color:var(--iccandle-border);padding:.75rem}@media(min-width:40rem){.news-widget_event_details_card__container{min-height:170px;padding:1rem}}.news-widget_event_details_card__text{font-weight:600;color:var(--iccandle-news-details-title)}.news-widget_event_details_card__event_name{line-height:1.25;font-weight:700;font-size:1rem;color:var(--iccandle-title)}@media(min-width:40rem){.news-widget_event_details_card__event_name{font-size:1.125rem;line-height:1.75rem}}.news-widget_event_details_card__status_container{display:flex;align-items:center;gap:.25rem;font-size:.75rem;line-height:calc(1 / .75);text-wrap:nowrap;color:var(--iccandle-title)}.news-widget_event_details_card__status{height:.5rem;width:.5rem;border-radius:calc(infinity * 1px)}.news-widget_event_details_card__collapsible{display:grid;width:100%;overflow:hidden;transition:grid-template-rows .5s ease-in-out,opacity .5s ease-in-out}.news-widget_event_details_card__collapsible--open{grid-template-rows:1fr;opacity:1}.news-widget_event_details_card__collapsible--closed{grid-template-rows:0fr;opacity:0}.news-widget_event_details_card__text_bold{font-size:.875rem;line-height:1.25rem;font-weight:700}.news-widget_event_details_card__body{display:flex;height:100%;flex-direction:column;align-items:stretch;justify-content:space-between;gap:.75rem}@media(min-width:40rem){.news-widget_event_details_card__body{flex-direction:row;gap:.25rem}}.news-widget_event_details_card__left{display:flex;width:100%;flex-direction:column;gap:.5rem;border-bottom:1px solid var(--iccandle-border);padding-bottom:.75rem}@media(min-width:40rem){.news-widget_event_details_card__left{border-bottom:none;border-right:1px solid var(--iccandle-border);padding-bottom:0;padding-right:1rem}}.news-widget_event_details_card__header_row{display:flex;width:100%;align-items:flex-start;gap:.5rem}@media(min-width:40rem){.news-widget_event_details_card__header_row{align-items:center;gap:.75rem}}.news-widget_event_details_card__header_inner{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:.5rem}.news-widget_event_details_card__timestamp_row{display:flex;width:100%;align-items:center;justify-content:space-between;gap:.5rem}.news-widget_event_details_card__timestamp{font-size:.875rem;color:var(--iccandle-gray)}.news-widget_event_details_card__currency_row{display:flex;width:100%;align-items:center;gap:.5rem}@media(min-width:40rem){.news-widget_event_details_card__currency_row{max-height:2.25rem;gap:.75rem}}.news-widget_event_details_card__currency_icon{width:1.75rem;height:1.75rem;flex-shrink:0}@media(min-width:40rem){.news-widget_event_details_card__currency_icon{width:2.25rem;height:2.25rem}}.news-widget_event_details_card__currency_img{height:100%;width:100%;border-radius:9999px;object-fit:cover}.news-widget_event_details_card__speech_icon{width:1.25rem;height:1.25rem;flex-shrink:0}@media(min-width:40rem){.news-widget_event_details_card__speech_icon{width:1.75rem;height:1.75rem}}.news-widget_event_details_card__values_row{display:flex;width:100%;flex-direction:column;gap:.5rem}@media(min-width:40rem){.news-widget_event_details_card__values_row{flex-direction:row;justify-content:space-between}}.news-widget_event_details_card__values_group{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.5rem}@media(min-width:40rem){.news-widget_event_details_card__values_group{align-items:center;gap:.75rem}}.news-widget_event_details_card__label{font-size:.75rem;font-weight:500;color:var(--iccandle-dark-gray)}.news-widget_event_details_card__fomc_source{margin-top:.5rem;font-size:.75rem;color:var(--iccandle-news-details-title)}@media(min-width:40rem){.news-widget_event_details_card__fomc_source{font-size:.875rem}}.news-widget_event_details_card__fomc_link{word-break:break-all;color:#3b82f6;text-decoration:underline}.news-widget_event_details_card__right{display:flex;width:100%;flex:1;flex-direction:column;align-items:flex-end;justify-content:center;gap:.75rem;padding-left:.25rem}@media(min-width:40rem){.news-widget_event_details_card__right{min-width:40%;padding-left:1rem}}.news-widget_event_details_card__description{font-size:.75rem;color:var(--iccandle-dark-gray);text-align:start;overflow-wrap:break-word;line-height:var(1 / .75)}.news-widget_event_details_card__collapsible_inner{display:flex;min-height:0;flex-direction:column;gap:1rem;overflow:hidden;padding-top:1rem;text-align:left}.news-widget_event_details_card__previous_events_list{display:flex;gap:.75rem;overflow-x:auto;padding-bottom:.75rem}.news-widget_event_details_card__info{display:flex;flex-direction:column;border-radius:.375rem;border-style:solid;border-width:1px;border-color:color-mix(in oklab,var(--iccandle-muted) 50%,transparent);padding-inline:.5rem;padding-block:.25rem;box-shadow:0 1px 2px #0000000d;text-align:left}.news-widget_news_card__container{background:var(--iccandle-background);width:220px;flex-shrink:0;border-radius:.75rem;border-style:solid;border-width:1px;border-color:var(--iccandle-border);padding:.75rem}.news-widget_news_card__title{color:var(--iccandle-news-card-title);font-size:.875rem;line-height:1.25;font-weight:600;text-align:left}.news-widget_news_card__info_card{background:color-mix(in oklab,var(--iccandle-muted) 50%,transparent);flex:1;padding:.25rem;text-align:center;border-radius:.5rem}.news-widget_news_card__font_semibold{font-weight:600}.news-widget_news_card__info_row{display:flex;align-items:stretch;gap:.25rem;font-size:.75rem;line-height:1rem}.news-widget_news_card__label{color:var(--iccandle-gray);margin-bottom:.25rem}.news-widget_news_card__header{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:.75rem}.news-widget_news_card__currency_icon{width:1.75rem;height:1.75rem;flex-shrink:0}.news-widget_news_card__currency_img{height:100%;width:100%;border-radius:9999px;object-fit:cover}.news-widget_news_card__meta{min-width:0}.news-widget_news_card__date{color:var(--iccandle-gray);margin-bottom:.125rem;font-size:.75rem;line-height:1rem}.news-widget_main__container{display:flex;height:100%;width:100%;flex-direction:column;overflow-y:auto}@media(min-width:1024px){.news-widget_main__container--lg{flex-direction:row;overflow-y:unset}}.news-widget_main__iframe_full{height:100%;width:100%;border:none}.news-widget_main__iframe_half{width:100%;height:100%;border:none;flex-shrink:0}@media(min-width:1024px){.news-widget_main__container--lg .news-widget_main__iframe_half{width:50%;height:100%;flex-shrink:1}}.news-widget_main__left{width:100%;height:100%;flex-shrink:0;display:flex;flex-direction:column}@media(min-width:1024px){.news-widget_main__container--lg .news-widget_main__left{width:50%;height:100%;flex-shrink:1}}.news-widget__button{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;color:var(--iccandle-text);transition:color .15s,background-color .15s}.news-widget__button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--iccandle-background),0 0 0 4px var(--iccandle-primary)}.news-widget__button:disabled{pointer-events:none;opacity:.5}.news-widget__button svg{pointer-events:none;width:16px;height:16px;flex-shrink:0}.news-widget__button--ghost{background:transparent}.news-widget__button--ghost:hover{background-color:var(--iccandle-secondary)}.news-widget__button--icon{height:40px;width:40px;padding:0}.news-widget,.news-widget *:before,.news-widget *:after{margin:0;padding:0;border:0 solid}.news-widget,.news-widget *,.news-widget *:before,.news-widget *:after{box-sizing:border-box;letter-spacing:normal}.news-widget{line-height:1.5;tab-size:4;--iccandle-primary: #00dfb9;--iccandle-primary-gradient-end: #ffb84d;--iccandle-background: #ffffff;--iccandle-border: #d1d5dc;--iccandle-text: #000000;--iccandle-secondary: oklch( from var(--iccandle-background) clamp(.92, calc(l - .06) , .98) c h / .92 );--iccandle-green: #22c55e;--iccandle-gray: #667085;--iccandle-dark-gray: #667085;--iccandle-orange: #ffb84d;--iccandle-red: #ef4444;--iccandle-title: #000;--iccandle-news-card-title: #0a0a0a;--iccandle-news-details-title: #344054;--iccandle-muted: hsl(0 0% 96.1%);font-family:var( --iccandle-font, "Inter Tight", ui-sans-serif, system-ui, sans-serif );position:relative;height:100%}.dark{--iccandle-primary: #00dfb9;--iccandle-primary-gradient-end: #ffb84d;--iccandle-background: #1a1a1a;--iccandle-border: rgba(255, 255, 255, .2);--iccandle-text: #ffffff;--iccandle-secondary: oklch( from var(--iccandle-background) clamp(.22, calc(l + .22) , .34) c h / .92 );--iccandle-green: #22c55e;--iccandle-gray: #a3a3a3;--iccandle-dark-gray: #6a7282;--iccandle-orange: #ffb84d;--iccandle-red: #ef4444;--iccandle-title: #fff;--iccandle-news-card-title: #fafafa;--iccandle-news-details-title: #d1d5dc;--iccandle-muted: hsl(0 0% 14.9%)}.news-widget__container{height:100%;width:100%}.news-widget__red{color:var(--iccandle-red)}.news-widget__green{color:var(--iccandle-green)}.news-widget__gray{color:var(--iccandle-gray)}.news-widget__orange{color:var(--iccandle-orange)}.news-widget__bg_green{background:var(--iccandle-green)}.news-widget__bg_gray{background:var(--iccandle-gray)}.news-widget__bg_orange{background:var(--iccandle-orange)}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
-
import Te, { createContext as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
2
|
+
import Te, { createContext as Gt, useContext as Jt, useState as de, useRef as me, useCallback as He, useEffect as _e, useMemo as ve, forwardRef as Xt, createElement as Ze } from "react";
|
|
3
|
+
var Fe = { exports: {} }, De = {};
|
|
4
|
+
var _t;
|
|
5
5
|
function En() {
|
|
6
|
-
if (
|
|
7
|
-
|
|
6
|
+
if (_t) return De;
|
|
7
|
+
_t = 1;
|
|
8
8
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
9
|
function n(s, r, i) {
|
|
10
10
|
var o = null;
|
|
@@ -21,276 +21,275 @@ function En() {
|
|
|
21
21
|
props: i
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return De.Fragment = t, De.jsx = n, De.jsxs = n, De;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return
|
|
30
|
-
function e(
|
|
31
|
-
if (
|
|
32
|
-
if (typeof
|
|
33
|
-
return
|
|
34
|
-
if (typeof
|
|
35
|
-
switch (
|
|
36
|
-
case
|
|
26
|
+
var Ae = {};
|
|
27
|
+
var ht;
|
|
28
|
+
function Dn() {
|
|
29
|
+
return ht || (ht = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
|
+
function e(l) {
|
|
31
|
+
if (l == null) return null;
|
|
32
|
+
if (typeof l == "function")
|
|
33
|
+
return l.$$typeof === Q ? null : l.displayName || l.name || null;
|
|
34
|
+
if (typeof l == "string") return l;
|
|
35
|
+
switch (l) {
|
|
36
|
+
case _:
|
|
37
37
|
return "Fragment";
|
|
38
|
-
case
|
|
38
|
+
case P:
|
|
39
39
|
return "Profiler";
|
|
40
|
-
case
|
|
40
|
+
case D:
|
|
41
41
|
return "StrictMode";
|
|
42
|
-
case
|
|
42
|
+
case V:
|
|
43
43
|
return "Suspense";
|
|
44
|
-
case
|
|
44
|
+
case N:
|
|
45
45
|
return "SuspenseList";
|
|
46
|
-
case
|
|
46
|
+
case k:
|
|
47
47
|
return "Activity";
|
|
48
48
|
}
|
|
49
|
-
if (typeof
|
|
50
|
-
switch (typeof
|
|
49
|
+
if (typeof l == "object")
|
|
50
|
+
switch (typeof l.tag == "number" && console.error(
|
|
51
51
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
52
|
-
),
|
|
52
|
+
), l.$$typeof) {
|
|
53
53
|
case w:
|
|
54
54
|
return "Portal";
|
|
55
|
+
case x:
|
|
56
|
+
return l.displayName || "Context";
|
|
55
57
|
case L:
|
|
56
|
-
return
|
|
57
|
-
case
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return
|
|
62
|
-
case ne:
|
|
63
|
-
return y = u.displayName || null, y !== null ? y : e(u.type) || "Memo";
|
|
58
|
+
return (l._context.displayName || "Context") + ".Consumer";
|
|
59
|
+
case B:
|
|
60
|
+
var y = l.render;
|
|
61
|
+
return l = l.displayName, l || (l = y.displayName || y.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
62
|
+
case ae:
|
|
63
|
+
return y = l.displayName || null, y !== null ? y : e(l.type) || "Memo";
|
|
64
64
|
case W:
|
|
65
|
-
y =
|
|
65
|
+
y = l._payload, l = l._init;
|
|
66
66
|
try {
|
|
67
|
-
return e(
|
|
67
|
+
return e(l(y));
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
|
-
function t(
|
|
74
|
-
return "" +
|
|
73
|
+
function t(l) {
|
|
74
|
+
return "" + l;
|
|
75
75
|
}
|
|
76
|
-
function n(
|
|
76
|
+
function n(l) {
|
|
77
77
|
try {
|
|
78
|
-
t(
|
|
78
|
+
t(l);
|
|
79
79
|
var y = !1;
|
|
80
80
|
} catch {
|
|
81
81
|
y = !0;
|
|
82
82
|
}
|
|
83
83
|
if (y) {
|
|
84
84
|
y = console;
|
|
85
|
-
var
|
|
86
|
-
return
|
|
85
|
+
var A = y.error, T = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
86
|
+
return A.call(
|
|
87
87
|
y,
|
|
88
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
-
|
|
90
|
-
), t(
|
|
89
|
+
T
|
|
90
|
+
), t(l);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
function s(
|
|
94
|
-
if (
|
|
95
|
-
if (typeof
|
|
93
|
+
function s(l) {
|
|
94
|
+
if (l === _) return "<>";
|
|
95
|
+
if (typeof l == "object" && l !== null && l.$$typeof === W)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
98
|
-
var y = e(
|
|
98
|
+
var y = e(l);
|
|
99
99
|
return y ? "<" + y + ">" : "<...>";
|
|
100
100
|
} catch {
|
|
101
101
|
return "<...>";
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
function r() {
|
|
105
|
-
var
|
|
106
|
-
return
|
|
105
|
+
var l = Y.A;
|
|
106
|
+
return l === null ? null : l.getOwner();
|
|
107
107
|
}
|
|
108
108
|
function i() {
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
|
-
function o(
|
|
112
|
-
if (
|
|
113
|
-
var y = Object.getOwnPropertyDescriptor(
|
|
111
|
+
function o(l) {
|
|
112
|
+
if (Z.call(l, "key")) {
|
|
113
|
+
var y = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
114
114
|
if (y && y.isReactWarning) return !1;
|
|
115
115
|
}
|
|
116
|
-
return
|
|
116
|
+
return l.key !== void 0;
|
|
117
117
|
}
|
|
118
|
-
function a(
|
|
119
|
-
function
|
|
120
|
-
|
|
118
|
+
function a(l, y) {
|
|
119
|
+
function A() {
|
|
120
|
+
U || (U = !0, console.error(
|
|
121
121
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
122
122
|
y
|
|
123
123
|
));
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
get:
|
|
125
|
+
A.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
126
|
+
get: A,
|
|
127
127
|
configurable: !0
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
function f() {
|
|
131
|
-
var
|
|
132
|
-
return
|
|
131
|
+
var l = e(this.type);
|
|
132
|
+
return ne[l] || (ne[l] = !0, console.error(
|
|
133
133
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
134
|
-
)),
|
|
134
|
+
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
var
|
|
138
|
-
return
|
|
136
|
+
function u(l, y, A, T, F, J) {
|
|
137
|
+
var S = A.ref;
|
|
138
|
+
return l = {
|
|
139
139
|
$$typeof: p,
|
|
140
|
-
type:
|
|
140
|
+
type: l,
|
|
141
141
|
key: y,
|
|
142
|
-
props:
|
|
143
|
-
_owner:
|
|
144
|
-
}, (
|
|
142
|
+
props: A,
|
|
143
|
+
_owner: T
|
|
144
|
+
}, (S !== void 0 ? S : null) !== null ? Object.defineProperty(l, "ref", {
|
|
145
145
|
enumerable: !1,
|
|
146
146
|
get: f
|
|
147
|
-
}) : Object.defineProperty(
|
|
147
|
+
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
148
148
|
configurable: !1,
|
|
149
149
|
enumerable: !1,
|
|
150
150
|
writable: !0,
|
|
151
151
|
value: 0
|
|
152
|
-
}), Object.defineProperty(
|
|
152
|
+
}), Object.defineProperty(l, "_debugInfo", {
|
|
153
153
|
configurable: !1,
|
|
154
154
|
enumerable: !1,
|
|
155
155
|
writable: !0,
|
|
156
156
|
value: null
|
|
157
|
-
}), Object.defineProperty(
|
|
157
|
+
}), Object.defineProperty(l, "_debugStack", {
|
|
158
158
|
configurable: !1,
|
|
159
159
|
enumerable: !1,
|
|
160
160
|
writable: !0,
|
|
161
|
-
value:
|
|
162
|
-
}), Object.defineProperty(
|
|
161
|
+
value: F
|
|
162
|
+
}), Object.defineProperty(l, "_debugTask", {
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
writable: !0,
|
|
166
|
-
value:
|
|
167
|
-
}), Object.freeze && (Object.freeze(
|
|
166
|
+
value: J
|
|
167
|
+
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
168
168
|
}
|
|
169
|
-
function l
|
|
170
|
-
var
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
for (
|
|
175
|
-
|
|
176
|
-
Object.freeze && Object.freeze(
|
|
169
|
+
function d(l, y, A, T, F, J) {
|
|
170
|
+
var S = y.children;
|
|
171
|
+
if (S !== void 0)
|
|
172
|
+
if (T)
|
|
173
|
+
if (E(S)) {
|
|
174
|
+
for (T = 0; T < S.length; T++)
|
|
175
|
+
h(S[T]);
|
|
176
|
+
Object.freeze && Object.freeze(S);
|
|
177
177
|
} else
|
|
178
178
|
console.error(
|
|
179
179
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
180
180
|
);
|
|
181
|
-
else
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
var
|
|
185
|
-
return
|
|
181
|
+
else h(S);
|
|
182
|
+
if (Z.call(y, "key")) {
|
|
183
|
+
S = e(l);
|
|
184
|
+
var X = Object.keys(y).filter(function(v) {
|
|
185
|
+
return v !== "key";
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
T = 0 < X.length ? "{key: someKey, " + X.join(": ..., ") + ": ...}" : "{key: someKey}", G[S + T] || (X = 0 < X.length ? "{" + X.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
189
189
|
let props = %s;
|
|
190
190
|
<%s {...props} />
|
|
191
191
|
React keys must be passed directly to JSX without using spread:
|
|
192
192
|
let props = %s;
|
|
193
193
|
<%s key={someKey} {...props} />`,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
),
|
|
194
|
+
T,
|
|
195
|
+
S,
|
|
196
|
+
X,
|
|
197
|
+
S
|
|
198
|
+
), G[S + T] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
for (var
|
|
203
|
-
|
|
204
|
-
} else
|
|
205
|
-
return
|
|
206
|
-
|
|
207
|
-
typeof
|
|
208
|
-
),
|
|
209
|
-
|
|
200
|
+
if (S = null, A !== void 0 && (n(A), S = "" + A), o(y) && (n(y.key), S = "" + y.key), "key" in y) {
|
|
201
|
+
A = {};
|
|
202
|
+
for (var M in y)
|
|
203
|
+
M !== "key" && (A[M] = y[M]);
|
|
204
|
+
} else A = y;
|
|
205
|
+
return S && a(
|
|
206
|
+
A,
|
|
207
|
+
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
208
|
+
), u(
|
|
209
|
+
l,
|
|
210
|
+
S,
|
|
210
211
|
A,
|
|
211
|
-
U,
|
|
212
212
|
r(),
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
F,
|
|
214
|
+
J
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
|
|
217
|
+
function h(l) {
|
|
218
|
+
g(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === W && (l._payload.status === "fulfilled" ? g(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return typeof
|
|
220
|
+
function g(l) {
|
|
221
|
+
return typeof l == "object" && l !== null && l.$$typeof === p;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var R = Te, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), _ = /* @__PURE__ */ Symbol.for("react.fragment"), D = /* @__PURE__ */ Symbol.for("react.strict_mode"), P = /* @__PURE__ */ Symbol.for("react.profiler"), L = /* @__PURE__ */ Symbol.for("react.consumer"), x = /* @__PURE__ */ Symbol.for("react.context"), B = /* @__PURE__ */ Symbol.for("react.forward_ref"), V = /* @__PURE__ */ Symbol.for("react.suspense"), N = /* @__PURE__ */ Symbol.for("react.suspense_list"), ae = /* @__PURE__ */ Symbol.for("react.memo"), W = /* @__PURE__ */ Symbol.for("react.lazy"), k = /* @__PURE__ */ Symbol.for("react.activity"), Q = /* @__PURE__ */ Symbol.for("react.client.reference"), Y = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, E = Array.isArray, I = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
|
-
|
|
227
|
-
react_stack_bottom_frame: function(
|
|
228
|
-
return
|
|
226
|
+
R = {
|
|
227
|
+
react_stack_bottom_frame: function(l) {
|
|
228
|
+
return l();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var
|
|
232
|
-
|
|
231
|
+
var U, ne = {}, $ = R.react_stack_bottom_frame.bind(
|
|
232
|
+
R,
|
|
233
233
|
i
|
|
234
|
-
)(),
|
|
235
|
-
|
|
236
|
-
var
|
|
237
|
-
return
|
|
238
|
-
|
|
234
|
+
)(), b = I(s(i)), G = {};
|
|
235
|
+
Ae.Fragment = _, Ae.jsx = function(l, y, A) {
|
|
236
|
+
var T = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
237
|
+
return d(
|
|
238
|
+
l,
|
|
239
239
|
y,
|
|
240
|
-
|
|
240
|
+
A,
|
|
241
241
|
!1,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
T ? Error("react-stack-top-frame") : $,
|
|
243
|
+
T ? I(s(l)) : b
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var
|
|
247
|
-
return
|
|
248
|
-
|
|
245
|
+
}, Ae.jsxs = function(l, y, A) {
|
|
246
|
+
var T = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
247
|
+
return d(
|
|
248
|
+
l,
|
|
249
249
|
y,
|
|
250
|
-
|
|
250
|
+
A,
|
|
251
251
|
!0,
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
T ? Error("react-stack-top-frame") : $,
|
|
253
|
+
T ? I(s(l)) : b
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), Ae;
|
|
257
257
|
}
|
|
258
|
-
var
|
|
259
|
-
function Dn() {
|
|
260
|
-
return ht || (ht = 1, process.env.NODE_ENV === "production" ? ke.exports = En() : ke.exports = Sn()), ke.exports;
|
|
261
|
-
}
|
|
262
|
-
var m = Dn();
|
|
263
|
-
const Xt = $t(null);
|
|
258
|
+
var wt;
|
|
264
259
|
function An() {
|
|
265
|
-
|
|
260
|
+
return wt || (wt = 1, process.env.NODE_ENV === "production" ? Fe.exports = En() : Fe.exports = Dn()), Fe.exports;
|
|
261
|
+
}
|
|
262
|
+
var m = An();
|
|
263
|
+
const qt = Gt(null);
|
|
264
|
+
function Un() {
|
|
265
|
+
const e = Jt(qt);
|
|
266
266
|
if (!e)
|
|
267
267
|
throw new Error("useCtaLoader must be used within CtaLoaderProvider");
|
|
268
268
|
return e;
|
|
269
269
|
}
|
|
270
|
-
const
|
|
270
|
+
const yt = 1100, Nn = 180;
|
|
271
271
|
function Tn({
|
|
272
|
-
children: e
|
|
273
|
-
theme: t
|
|
272
|
+
children: e
|
|
274
273
|
}) {
|
|
275
|
-
const [
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
},
|
|
279
|
-
}, []),
|
|
280
|
-
|
|
281
|
-
() => requestAnimationFrame(() =>
|
|
282
|
-
),
|
|
283
|
-
|
|
284
|
-
},
|
|
285
|
-
}, [
|
|
286
|
-
|
|
287
|
-
const
|
|
288
|
-
() => ({ start:
|
|
289
|
-
[
|
|
290
|
-
)
|
|
291
|
-
return /* @__PURE__ */ m.jsxs(
|
|
274
|
+
const [t, n] = de(!1), [s, r] = de(!1), [i, o] = de(0), a = me(null), f = me(null), u = He(() => {
|
|
275
|
+
a.current && window.clearTimeout(a.current), a.current = null, f.current && window.clearTimeout(f.current), f.current = null, f.current = window.setTimeout(() => {
|
|
276
|
+
f.current = null, n(!1), r(!1);
|
|
277
|
+
}, Nn);
|
|
278
|
+
}, []), d = He(() => {
|
|
279
|
+
a.current && window.clearTimeout(a.current), a.current = null, f.current && window.clearTimeout(f.current), f.current = null, o((R) => R + 1), r(!1), n(!0), requestAnimationFrame(
|
|
280
|
+
() => requestAnimationFrame(() => r(!0))
|
|
281
|
+
), a.current = window.setTimeout(() => {
|
|
282
|
+
a.current = null, u();
|
|
283
|
+
}, yt);
|
|
284
|
+
}, [u]);
|
|
285
|
+
_e(() => u, [u]);
|
|
286
|
+
const h = ve(
|
|
287
|
+
() => ({ start: d, stop: u, visible: t }),
|
|
288
|
+
[d, u, t]
|
|
289
|
+
);
|
|
290
|
+
return /* @__PURE__ */ m.jsxs(qt.Provider, { value: h, children: [
|
|
292
291
|
e,
|
|
293
|
-
|
|
292
|
+
t && /* @__PURE__ */ m.jsx("div", { className: "cta-loader__overlay", children: /* @__PURE__ */ m.jsxs("div", { className: "cta-loader__content", children: [
|
|
294
293
|
/* @__PURE__ */ m.jsx(
|
|
295
294
|
"video",
|
|
296
295
|
{
|
|
@@ -300,7 +299,7 @@ function Tn({
|
|
|
300
299
|
playsInline: !0,
|
|
301
300
|
preload: "auto",
|
|
302
301
|
className: "cta-loader__video",
|
|
303
|
-
children: /* @__PURE__ */ m.jsx("source", { src:
|
|
302
|
+
children: /* @__PURE__ */ m.jsx("source", { src: "https://icc-web-assets.s3.ap-southeast-1.amazonaws.com/loader/ai-loader.webm", type: "video/webm" })
|
|
304
303
|
}
|
|
305
304
|
),
|
|
306
305
|
/* @__PURE__ */ m.jsx("div", { className: "cta-loader__bar-wrapper", children: /* @__PURE__ */ m.jsx("div", { className: "cta-loader__bar-track", children: /* @__PURE__ */ m.jsx(
|
|
@@ -308,56 +307,56 @@ function Tn({
|
|
|
308
307
|
{
|
|
309
308
|
className: "cta-loader__bar-fill",
|
|
310
309
|
style: {
|
|
311
|
-
transform:
|
|
312
|
-
transition: `transform ${
|
|
310
|
+
transform: s ? "scaleX(1)" : "scaleX(0)",
|
|
311
|
+
transition: `transform ${yt}ms linear`
|
|
313
312
|
}
|
|
314
313
|
},
|
|
315
|
-
|
|
314
|
+
i
|
|
316
315
|
) }) })
|
|
317
316
|
] }) })
|
|
318
317
|
] });
|
|
319
318
|
}
|
|
320
|
-
function
|
|
319
|
+
function Vt(e, t) {
|
|
321
320
|
return function() {
|
|
322
321
|
return e.apply(t, arguments);
|
|
323
322
|
};
|
|
324
323
|
}
|
|
325
|
-
const { toString:
|
|
326
|
-
const n =
|
|
324
|
+
const { toString: vn } = Object.prototype, { getPrototypeOf: ot } = Object, { iterator: $e, toStringTag: Kt } = Symbol, Ge = /* @__PURE__ */ ((e) => (t) => {
|
|
325
|
+
const n = vn.call(t);
|
|
327
326
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
328
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
329
|
-
function
|
|
330
|
-
return e !== null && !
|
|
327
|
+
})(/* @__PURE__ */ Object.create(null)), he = (e) => (e = e.toLowerCase(), (t) => Ge(t) === e), Je = (e) => (t) => typeof t === e, { isArray: Ee } = Array, Se = Je("undefined");
|
|
328
|
+
function xe(e) {
|
|
329
|
+
return e !== null && !Se(e) && e.constructor !== null && !Se(e.constructor) && ie(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
331
330
|
}
|
|
332
|
-
const
|
|
333
|
-
function
|
|
331
|
+
const zt = he("ArrayBuffer");
|
|
332
|
+
function xn(e) {
|
|
334
333
|
let t;
|
|
335
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
334
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && zt(e.buffer), t;
|
|
336
335
|
}
|
|
337
|
-
const
|
|
338
|
-
if (
|
|
336
|
+
const Ln = Je("string"), ie = Je("function"), Zt = Je("number"), Le = (e) => e !== null && typeof e == "object", On = (e) => e === !0 || e === !1, Be = (e) => {
|
|
337
|
+
if (Ge(e) !== "object")
|
|
339
338
|
return !1;
|
|
340
|
-
const t =
|
|
341
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
339
|
+
const t = ot(e);
|
|
340
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Kt in e) && !($e in e);
|
|
342
341
|
}, Pn = (e) => {
|
|
343
|
-
if (!
|
|
342
|
+
if (!Le(e) || xe(e))
|
|
344
343
|
return !1;
|
|
345
344
|
try {
|
|
346
345
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
347
346
|
} catch {
|
|
348
347
|
return !1;
|
|
349
348
|
}
|
|
350
|
-
},
|
|
349
|
+
}, kn = he("Date"), Fn = he("File"), jn = he("Blob"), Bn = he("FileList"), Yn = (e) => Le(e) && ie(e.pipe), Mn = (e) => {
|
|
351
350
|
let t;
|
|
352
|
-
return e && (typeof FormData == "function" && e instanceof FormData || ie(e.append) && ((t =
|
|
351
|
+
return e && (typeof FormData == "function" && e instanceof FormData || ie(e.append) && ((t = Ge(e)) === "formdata" || // detect form-data instance
|
|
353
352
|
t === "object" && ie(e.toString) && e.toString() === "[object FormData]"));
|
|
354
|
-
},
|
|
353
|
+
}, Hn = he("URLSearchParams"), [In, $n, Gn, Jn] = [
|
|
355
354
|
"ReadableStream",
|
|
356
355
|
"Request",
|
|
357
356
|
"Response",
|
|
358
357
|
"Headers"
|
|
359
|
-
].map(
|
|
360
|
-
function
|
|
358
|
+
].map(he), Xn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
359
|
+
function Oe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
361
360
|
if (e === null || typeof e > "u")
|
|
362
361
|
return;
|
|
363
362
|
let s, r;
|
|
@@ -365,7 +364,7 @@ function Le(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
365
364
|
for (s = 0, r = e.length; s < r; s++)
|
|
366
365
|
t.call(null, e[s], s, e);
|
|
367
366
|
else {
|
|
368
|
-
if (
|
|
367
|
+
if (xe(e))
|
|
369
368
|
return;
|
|
370
369
|
const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
371
370
|
let a;
|
|
@@ -373,8 +372,8 @@ function Le(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
373
372
|
a = i[s], t.call(null, e[a], a, e);
|
|
374
373
|
}
|
|
375
374
|
}
|
|
376
|
-
function
|
|
377
|
-
if (
|
|
375
|
+
function Wt(e, t) {
|
|
376
|
+
if (xe(e))
|
|
378
377
|
return null;
|
|
379
378
|
t = t.toLowerCase();
|
|
380
379
|
const n = Object.keys(e);
|
|
@@ -384,23 +383,23 @@ function Zt(e, t) {
|
|
|
384
383
|
return r;
|
|
385
384
|
return null;
|
|
386
385
|
}
|
|
387
|
-
const
|
|
388
|
-
function
|
|
389
|
-
const { caseless: e, skipUndefined: t } =
|
|
386
|
+
const ye = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Qt = (e) => !Se(e) && e !== ye;
|
|
387
|
+
function We() {
|
|
388
|
+
const { caseless: e, skipUndefined: t } = Qt(this) && this || {}, n = {}, s = (r, i) => {
|
|
390
389
|
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
391
390
|
return;
|
|
392
|
-
const o = e &&
|
|
393
|
-
|
|
391
|
+
const o = e && Wt(n, i) || i;
|
|
392
|
+
Be(n[o]) && Be(r) ? n[o] = We(n[o], r) : Be(r) ? n[o] = We({}, r) : Ee(r) ? n[o] = r.slice() : (!t || !Se(r)) && (n[o] = r);
|
|
394
393
|
};
|
|
395
394
|
for (let r = 0, i = arguments.length; r < i; r++)
|
|
396
|
-
arguments[r] &&
|
|
395
|
+
arguments[r] && Oe(arguments[r], s);
|
|
397
396
|
return n;
|
|
398
397
|
}
|
|
399
|
-
const
|
|
398
|
+
const qn = (e, t, n, { allOwnKeys: s } = {}) => (Oe(
|
|
400
399
|
t,
|
|
401
400
|
(r, i) => {
|
|
402
401
|
n && ie(r) ? Object.defineProperty(e, i, {
|
|
403
|
-
value:
|
|
402
|
+
value: Vt(r, n),
|
|
404
403
|
writable: !0,
|
|
405
404
|
enumerable: !0,
|
|
406
405
|
configurable: !0
|
|
@@ -412,7 +411,7 @@ const Xn = (e, t, n, { allOwnKeys: s } = {}) => (Le(
|
|
|
412
411
|
});
|
|
413
412
|
},
|
|
414
413
|
{ allOwnKeys: s }
|
|
415
|
-
), e),
|
|
414
|
+
), e), Vn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Kn = (e, t, n, s) => {
|
|
416
415
|
e.prototype = Object.create(
|
|
417
416
|
t.prototype,
|
|
418
417
|
s
|
|
@@ -424,52 +423,52 @@ const Xn = (e, t, n, { allOwnKeys: s } = {}) => (Le(
|
|
|
424
423
|
}), Object.defineProperty(e, "super", {
|
|
425
424
|
value: t.prototype
|
|
426
425
|
}), n && Object.assign(e.prototype, n);
|
|
427
|
-
},
|
|
426
|
+
}, zn = (e, t, n, s) => {
|
|
428
427
|
let r, i, o;
|
|
429
428
|
const a = {};
|
|
430
429
|
if (t = t || {}, e == null) return t;
|
|
431
430
|
do {
|
|
432
431
|
for (r = Object.getOwnPropertyNames(e), i = r.length; i-- > 0; )
|
|
433
432
|
o = r[i], (!s || s(o, e, t)) && !a[o] && (t[o] = e[o], a[o] = !0);
|
|
434
|
-
e = n !== !1 &&
|
|
433
|
+
e = n !== !1 && ot(e);
|
|
435
434
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
436
435
|
return t;
|
|
437
|
-
},
|
|
436
|
+
}, Zn = (e, t, n) => {
|
|
438
437
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
439
438
|
const s = e.indexOf(t, n);
|
|
440
439
|
return s !== -1 && s === n;
|
|
441
|
-
},
|
|
440
|
+
}, Wn = (e) => {
|
|
442
441
|
if (!e) return null;
|
|
443
442
|
if (Ee(e)) return e;
|
|
444
443
|
let t = e.length;
|
|
445
|
-
if (!
|
|
444
|
+
if (!Zt(t)) return null;
|
|
446
445
|
const n = new Array(t);
|
|
447
446
|
for (; t-- > 0; )
|
|
448
447
|
n[t] = e[t];
|
|
449
448
|
return n;
|
|
450
|
-
},
|
|
451
|
-
const s = (e && e[
|
|
449
|
+
}, Qn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ot(Uint8Array)), es = (e, t) => {
|
|
450
|
+
const s = (e && e[$e]).call(e);
|
|
452
451
|
let r;
|
|
453
452
|
for (; (r = s.next()) && !r.done; ) {
|
|
454
453
|
const i = r.value;
|
|
455
454
|
t.call(e, i[0], i[1]);
|
|
456
455
|
}
|
|
457
|
-
},
|
|
456
|
+
}, ts = (e, t) => {
|
|
458
457
|
let n;
|
|
459
458
|
const s = [];
|
|
460
459
|
for (; (n = e.exec(t)) !== null; )
|
|
461
460
|
s.push(n);
|
|
462
461
|
return s;
|
|
463
|
-
},
|
|
462
|
+
}, ns = he("HTMLFormElement"), ss = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, s, r) {
|
|
464
463
|
return s.toUpperCase() + r;
|
|
465
|
-
}),
|
|
464
|
+
}), gt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), rs = he("RegExp"), en = (e, t) => {
|
|
466
465
|
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
467
|
-
|
|
466
|
+
Oe(n, (r, i) => {
|
|
468
467
|
let o;
|
|
469
468
|
(o = t(r, i, e)) !== !1 && (s[i] = o || r);
|
|
470
469
|
}), Object.defineProperties(e, s);
|
|
471
|
-
},
|
|
472
|
-
|
|
470
|
+
}, is = (e) => {
|
|
471
|
+
en(e, (t, n) => {
|
|
473
472
|
if (ie(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
474
473
|
return !1;
|
|
475
474
|
const s = e[n];
|
|
@@ -483,108 +482,108 @@ const Xn = (e, t, n, { allOwnKeys: s } = {}) => (Le(
|
|
|
483
482
|
});
|
|
484
483
|
}
|
|
485
484
|
});
|
|
486
|
-
},
|
|
485
|
+
}, os = (e, t) => {
|
|
487
486
|
const n = {}, s = (r) => {
|
|
488
487
|
r.forEach((i) => {
|
|
489
488
|
n[i] = !0;
|
|
490
489
|
});
|
|
491
490
|
};
|
|
492
491
|
return Ee(e) ? s(e) : s(String(e).split(t)), n;
|
|
493
|
-
},
|
|
494
|
-
},
|
|
495
|
-
function
|
|
496
|
-
return !!(e && ie(e.append) && e[
|
|
492
|
+
}, as = () => {
|
|
493
|
+
}, cs = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
494
|
+
function ls(e) {
|
|
495
|
+
return !!(e && ie(e.append) && e[Kt] === "FormData" && e[$e]);
|
|
497
496
|
}
|
|
498
|
-
const
|
|
497
|
+
const ds = (e) => {
|
|
499
498
|
const t = new Array(10), n = (s, r) => {
|
|
500
|
-
if (
|
|
499
|
+
if (Le(s)) {
|
|
501
500
|
if (t.indexOf(s) >= 0)
|
|
502
501
|
return;
|
|
503
|
-
if (
|
|
502
|
+
if (xe(s))
|
|
504
503
|
return s;
|
|
505
504
|
if (!("toJSON" in s)) {
|
|
506
505
|
t[r] = s;
|
|
507
506
|
const i = Ee(s) ? [] : {};
|
|
508
|
-
return
|
|
507
|
+
return Oe(s, (o, a) => {
|
|
509
508
|
const f = n(o, r + 1);
|
|
510
|
-
!
|
|
509
|
+
!Se(f) && (i[a] = f);
|
|
511
510
|
}), t[r] = void 0, i;
|
|
512
511
|
}
|
|
513
512
|
}
|
|
514
513
|
return s;
|
|
515
514
|
};
|
|
516
515
|
return n(e, 0);
|
|
517
|
-
},
|
|
516
|
+
}, us = he("AsyncFunction"), ps = (e) => e && (Le(e) || ie(e)) && ie(e.then) && ie(e.catch), tn = ((e, t) => e ? setImmediate : t ? ((n, s) => (ye.addEventListener(
|
|
518
517
|
"message",
|
|
519
518
|
({ source: r, data: i }) => {
|
|
520
|
-
r ===
|
|
519
|
+
r === ye && i === n && s.length && s.shift()();
|
|
521
520
|
},
|
|
522
521
|
!1
|
|
523
522
|
), (r) => {
|
|
524
|
-
s.push(r),
|
|
525
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", ie(
|
|
523
|
+
s.push(r), ye.postMessage(n, "*");
|
|
524
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", ie(ye.postMessage)), fs = typeof queueMicrotask < "u" ? queueMicrotask.bind(ye) : typeof process < "u" && process.nextTick || tn, ms = (e) => e != null && ie(e[$e]), c = {
|
|
526
525
|
isArray: Ee,
|
|
527
|
-
isArrayBuffer:
|
|
528
|
-
isBuffer:
|
|
529
|
-
isFormData:
|
|
530
|
-
isArrayBufferView:
|
|
531
|
-
isString:
|
|
532
|
-
isNumber:
|
|
533
|
-
isBoolean:
|
|
534
|
-
isObject:
|
|
535
|
-
isPlainObject:
|
|
526
|
+
isArrayBuffer: zt,
|
|
527
|
+
isBuffer: xe,
|
|
528
|
+
isFormData: Mn,
|
|
529
|
+
isArrayBufferView: xn,
|
|
530
|
+
isString: Ln,
|
|
531
|
+
isNumber: Zt,
|
|
532
|
+
isBoolean: On,
|
|
533
|
+
isObject: Le,
|
|
534
|
+
isPlainObject: Be,
|
|
536
535
|
isEmptyObject: Pn,
|
|
537
|
-
isReadableStream:
|
|
538
|
-
isRequest:
|
|
539
|
-
isResponse:
|
|
540
|
-
isHeaders:
|
|
541
|
-
isUndefined:
|
|
542
|
-
isDate:
|
|
543
|
-
isFile:
|
|
544
|
-
isBlob:
|
|
545
|
-
isRegExp:
|
|
536
|
+
isReadableStream: In,
|
|
537
|
+
isRequest: $n,
|
|
538
|
+
isResponse: Gn,
|
|
539
|
+
isHeaders: Jn,
|
|
540
|
+
isUndefined: Se,
|
|
541
|
+
isDate: kn,
|
|
542
|
+
isFile: Fn,
|
|
543
|
+
isBlob: jn,
|
|
544
|
+
isRegExp: rs,
|
|
546
545
|
isFunction: ie,
|
|
547
|
-
isStream:
|
|
548
|
-
isURLSearchParams:
|
|
549
|
-
isTypedArray:
|
|
550
|
-
isFileList:
|
|
551
|
-
forEach:
|
|
552
|
-
merge:
|
|
553
|
-
extend:
|
|
554
|
-
trim:
|
|
555
|
-
stripBOM:
|
|
556
|
-
inherits:
|
|
557
|
-
toFlatObject:
|
|
558
|
-
kindOf:
|
|
559
|
-
kindOfTest:
|
|
560
|
-
endsWith:
|
|
561
|
-
toArray:
|
|
562
|
-
forEachEntry:
|
|
563
|
-
matchAll:
|
|
564
|
-
isHTMLForm:
|
|
565
|
-
hasOwnProperty:
|
|
566
|
-
hasOwnProp:
|
|
546
|
+
isStream: Yn,
|
|
547
|
+
isURLSearchParams: Hn,
|
|
548
|
+
isTypedArray: Qn,
|
|
549
|
+
isFileList: Bn,
|
|
550
|
+
forEach: Oe,
|
|
551
|
+
merge: We,
|
|
552
|
+
extend: qn,
|
|
553
|
+
trim: Xn,
|
|
554
|
+
stripBOM: Vn,
|
|
555
|
+
inherits: Kn,
|
|
556
|
+
toFlatObject: zn,
|
|
557
|
+
kindOf: Ge,
|
|
558
|
+
kindOfTest: he,
|
|
559
|
+
endsWith: Zn,
|
|
560
|
+
toArray: Wn,
|
|
561
|
+
forEachEntry: es,
|
|
562
|
+
matchAll: ts,
|
|
563
|
+
isHTMLForm: ns,
|
|
564
|
+
hasOwnProperty: gt,
|
|
565
|
+
hasOwnProp: gt,
|
|
567
566
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
568
|
-
reduceDescriptors:
|
|
569
|
-
freezeMethods:
|
|
570
|
-
toObjectSet:
|
|
571
|
-
toCamelCase:
|
|
572
|
-
noop:
|
|
573
|
-
toFiniteNumber:
|
|
574
|
-
findKey:
|
|
575
|
-
global:
|
|
576
|
-
isContextDefined:
|
|
577
|
-
isSpecCompliantForm:
|
|
578
|
-
toJSONObject:
|
|
579
|
-
isAsyncFn:
|
|
580
|
-
isThenable:
|
|
581
|
-
setImmediate:
|
|
582
|
-
asap:
|
|
583
|
-
isIterable:
|
|
567
|
+
reduceDescriptors: en,
|
|
568
|
+
freezeMethods: is,
|
|
569
|
+
toObjectSet: os,
|
|
570
|
+
toCamelCase: ss,
|
|
571
|
+
noop: as,
|
|
572
|
+
toFiniteNumber: cs,
|
|
573
|
+
findKey: Wt,
|
|
574
|
+
global: ye,
|
|
575
|
+
isContextDefined: Qt,
|
|
576
|
+
isSpecCompliantForm: ls,
|
|
577
|
+
toJSONObject: ds,
|
|
578
|
+
isAsyncFn: us,
|
|
579
|
+
isThenable: ps,
|
|
580
|
+
setImmediate: tn,
|
|
581
|
+
asap: fs,
|
|
582
|
+
isIterable: ms
|
|
584
583
|
};
|
|
585
|
-
let
|
|
584
|
+
let C = class nn extends Error {
|
|
586
585
|
static from(t, n, s, r, i, o) {
|
|
587
|
-
const a = new
|
|
586
|
+
const a = new nn(t.message, n || t.code, s, r, i);
|
|
588
587
|
return a.cause = t, a.name = t.name, o && Object.assign(a, o), a;
|
|
589
588
|
}
|
|
590
589
|
/**
|
|
@@ -621,100 +620,100 @@ let b = class tn extends Error {
|
|
|
621
620
|
};
|
|
622
621
|
}
|
|
623
622
|
};
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
const
|
|
637
|
-
function
|
|
623
|
+
C.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
624
|
+
C.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
625
|
+
C.ECONNABORTED = "ECONNABORTED";
|
|
626
|
+
C.ETIMEDOUT = "ETIMEDOUT";
|
|
627
|
+
C.ERR_NETWORK = "ERR_NETWORK";
|
|
628
|
+
C.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
629
|
+
C.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
630
|
+
C.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
631
|
+
C.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
632
|
+
C.ERR_CANCELED = "ERR_CANCELED";
|
|
633
|
+
C.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
634
|
+
C.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
635
|
+
const _s = null;
|
|
636
|
+
function Qe(e) {
|
|
638
637
|
return c.isPlainObject(e) || c.isArray(e);
|
|
639
638
|
}
|
|
640
|
-
function
|
|
639
|
+
function sn(e) {
|
|
641
640
|
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
642
641
|
}
|
|
643
|
-
function
|
|
642
|
+
function Ct(e, t, n) {
|
|
644
643
|
return e ? e.concat(t).map(function(r, i) {
|
|
645
|
-
return r =
|
|
644
|
+
return r = sn(r), !n && i ? "[" + r + "]" : r;
|
|
646
645
|
}).join(n ? "." : "") : t;
|
|
647
646
|
}
|
|
648
|
-
function
|
|
649
|
-
return c.isArray(e) && !e.some(
|
|
647
|
+
function hs(e) {
|
|
648
|
+
return c.isArray(e) && !e.some(Qe);
|
|
650
649
|
}
|
|
651
|
-
const
|
|
650
|
+
const ws = c.toFlatObject(c, {}, null, function(t) {
|
|
652
651
|
return /^is[A-Z]/.test(t);
|
|
653
652
|
});
|
|
654
|
-
function
|
|
653
|
+
function Xe(e, t, n) {
|
|
655
654
|
if (!c.isObject(e))
|
|
656
655
|
throw new TypeError("target must be an object");
|
|
657
656
|
t = t || new FormData(), n = c.toFlatObject(n, {
|
|
658
657
|
metaTokens: !0,
|
|
659
658
|
dots: !1,
|
|
660
659
|
indexes: !1
|
|
661
|
-
}, !1, function(w,
|
|
662
|
-
return !c.isUndefined(
|
|
660
|
+
}, !1, function(w, _) {
|
|
661
|
+
return !c.isUndefined(_[w]);
|
|
663
662
|
});
|
|
664
|
-
const s = n.metaTokens, r = n.visitor ||
|
|
663
|
+
const s = n.metaTokens, r = n.visitor || d, i = n.dots, o = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
665
664
|
if (!c.isFunction(r))
|
|
666
665
|
throw new TypeError("visitor must be a function");
|
|
667
|
-
function
|
|
666
|
+
function u(p) {
|
|
668
667
|
if (p === null) return "";
|
|
669
668
|
if (c.isDate(p))
|
|
670
669
|
return p.toISOString();
|
|
671
670
|
if (c.isBoolean(p))
|
|
672
671
|
return p.toString();
|
|
673
672
|
if (!f && c.isBlob(p))
|
|
674
|
-
throw new
|
|
673
|
+
throw new C("Blob is not supported. Use a Buffer instead.");
|
|
675
674
|
return c.isArrayBuffer(p) || c.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
676
675
|
}
|
|
677
|
-
function
|
|
678
|
-
let
|
|
679
|
-
if (p && !
|
|
676
|
+
function d(p, w, _) {
|
|
677
|
+
let D = p;
|
|
678
|
+
if (p && !_ && typeof p == "object") {
|
|
680
679
|
if (c.endsWith(w, "{}"))
|
|
681
680
|
w = s ? w : w.slice(0, -2), p = JSON.stringify(p);
|
|
682
|
-
else if (c.isArray(p) &&
|
|
683
|
-
return w =
|
|
684
|
-
!(c.isUndefined(
|
|
681
|
+
else if (c.isArray(p) && hs(p) || (c.isFileList(p) || c.endsWith(w, "[]")) && (D = c.toArray(p)))
|
|
682
|
+
return w = sn(w), D.forEach(function(L, x) {
|
|
683
|
+
!(c.isUndefined(L) || L === null) && t.append(
|
|
685
684
|
// eslint-disable-next-line no-nested-ternary
|
|
686
|
-
o === !0 ?
|
|
687
|
-
|
|
685
|
+
o === !0 ? Ct([w], x, i) : o === null ? w : w + "[]",
|
|
686
|
+
u(L)
|
|
688
687
|
);
|
|
689
688
|
}), !1;
|
|
690
689
|
}
|
|
691
|
-
return
|
|
690
|
+
return Qe(p) ? !0 : (t.append(Ct(_, w, i), u(p)), !1);
|
|
692
691
|
}
|
|
693
|
-
const
|
|
694
|
-
defaultVisitor:
|
|
695
|
-
convertValue:
|
|
696
|
-
isVisitable:
|
|
692
|
+
const h = [], g = Object.assign(ws, {
|
|
693
|
+
defaultVisitor: d,
|
|
694
|
+
convertValue: u,
|
|
695
|
+
isVisitable: Qe
|
|
697
696
|
});
|
|
698
|
-
function
|
|
697
|
+
function R(p, w) {
|
|
699
698
|
if (!c.isUndefined(p)) {
|
|
700
|
-
if (
|
|
699
|
+
if (h.indexOf(p) !== -1)
|
|
701
700
|
throw Error("Circular reference detected in " + w.join("."));
|
|
702
|
-
|
|
703
|
-
(!(c.isUndefined(
|
|
701
|
+
h.push(p), c.forEach(p, function(D, P) {
|
|
702
|
+
(!(c.isUndefined(D) || D === null) && r.call(
|
|
704
703
|
t,
|
|
705
|
-
|
|
706
|
-
c.isString(
|
|
704
|
+
D,
|
|
705
|
+
c.isString(P) ? P.trim() : P,
|
|
707
706
|
w,
|
|
708
|
-
|
|
709
|
-
)) === !0 &&
|
|
710
|
-
}),
|
|
707
|
+
g
|
|
708
|
+
)) === !0 && R(D, w ? w.concat(P) : [P]);
|
|
709
|
+
}), h.pop();
|
|
711
710
|
}
|
|
712
711
|
}
|
|
713
712
|
if (!c.isObject(e))
|
|
714
713
|
throw new TypeError("data must be an object");
|
|
715
|
-
return
|
|
714
|
+
return R(e), t;
|
|
716
715
|
}
|
|
717
|
-
function
|
|
716
|
+
function bt(e) {
|
|
718
717
|
const t = {
|
|
719
718
|
"!": "%21",
|
|
720
719
|
"'": "%27",
|
|
@@ -728,38 +727,38 @@ function Ct(e) {
|
|
|
728
727
|
return t[s];
|
|
729
728
|
});
|
|
730
729
|
}
|
|
731
|
-
function
|
|
732
|
-
this._pairs = [], e &&
|
|
730
|
+
function at(e, t) {
|
|
731
|
+
this._pairs = [], e && Xe(e, this, t);
|
|
733
732
|
}
|
|
734
|
-
const
|
|
735
|
-
|
|
733
|
+
const rn = at.prototype;
|
|
734
|
+
rn.append = function(t, n) {
|
|
736
735
|
this._pairs.push([t, n]);
|
|
737
736
|
};
|
|
738
|
-
|
|
737
|
+
rn.toString = function(t) {
|
|
739
738
|
const n = t ? function(s) {
|
|
740
|
-
return t.call(this, s,
|
|
741
|
-
} :
|
|
739
|
+
return t.call(this, s, bt);
|
|
740
|
+
} : bt;
|
|
742
741
|
return this._pairs.map(function(r) {
|
|
743
742
|
return n(r[0]) + "=" + n(r[1]);
|
|
744
743
|
}, "").join("&");
|
|
745
744
|
};
|
|
746
|
-
function
|
|
745
|
+
function ys(e) {
|
|
747
746
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
748
747
|
}
|
|
749
|
-
function
|
|
748
|
+
function on(e, t, n) {
|
|
750
749
|
if (!t)
|
|
751
750
|
return e;
|
|
752
|
-
const s = n && n.encode ||
|
|
751
|
+
const s = n && n.encode || ys, r = c.isFunction(n) ? {
|
|
753
752
|
serialize: n
|
|
754
753
|
} : n, i = r && r.serialize;
|
|
755
754
|
let o;
|
|
756
|
-
if (i ? o = i(t, r) : o = c.isURLSearchParams(t) ? t.toString() : new
|
|
755
|
+
if (i ? o = i(t, r) : o = c.isURLSearchParams(t) ? t.toString() : new at(t, r).toString(s), o) {
|
|
757
756
|
const a = e.indexOf("#");
|
|
758
757
|
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
759
758
|
}
|
|
760
759
|
return e;
|
|
761
760
|
}
|
|
762
|
-
class
|
|
761
|
+
class Rt {
|
|
763
762
|
constructor() {
|
|
764
763
|
this.handlers = [];
|
|
765
764
|
}
|
|
@@ -814,40 +813,40 @@ class bt {
|
|
|
814
813
|
});
|
|
815
814
|
}
|
|
816
815
|
}
|
|
817
|
-
const
|
|
816
|
+
const ct = {
|
|
818
817
|
silentJSONParsing: !0,
|
|
819
818
|
forcedJSONParsing: !0,
|
|
820
819
|
clarifyTimeoutError: !1,
|
|
821
820
|
legacyInterceptorReqResOrdering: !0
|
|
822
|
-
},
|
|
821
|
+
}, gs = typeof URLSearchParams < "u" ? URLSearchParams : at, Cs = typeof FormData < "u" ? FormData : null, bs = typeof Blob < "u" ? Blob : null, Rs = {
|
|
823
822
|
isBrowser: !0,
|
|
824
823
|
classes: {
|
|
825
|
-
URLSearchParams:
|
|
826
|
-
FormData:
|
|
827
|
-
Blob:
|
|
824
|
+
URLSearchParams: gs,
|
|
825
|
+
FormData: Cs,
|
|
826
|
+
Blob: bs
|
|
828
827
|
},
|
|
829
828
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
830
|
-
},
|
|
831
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
829
|
+
}, lt = typeof window < "u" && typeof document < "u", et = typeof navigator == "object" && navigator || void 0, Ss = lt && (!et || ["ReactNative", "NativeScript", "NS"].indexOf(et.product) < 0), Es = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
830
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ds = lt && window.location.href || "http://localhost", As = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
832
831
|
__proto__: null,
|
|
833
|
-
hasBrowserEnv:
|
|
834
|
-
hasStandardBrowserEnv:
|
|
832
|
+
hasBrowserEnv: lt,
|
|
833
|
+
hasStandardBrowserEnv: Ss,
|
|
835
834
|
hasStandardBrowserWebWorkerEnv: Es,
|
|
836
|
-
navigator:
|
|
837
|
-
origin:
|
|
838
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
839
|
-
...
|
|
840
|
-
...
|
|
835
|
+
navigator: et,
|
|
836
|
+
origin: Ds
|
|
837
|
+
}, Symbol.toStringTag, { value: "Module" })), se = {
|
|
838
|
+
...As,
|
|
839
|
+
...Rs
|
|
841
840
|
};
|
|
842
|
-
function
|
|
843
|
-
return
|
|
841
|
+
function Us(e, t) {
|
|
842
|
+
return Xe(e, new se.classes.URLSearchParams(), {
|
|
844
843
|
visitor: function(n, s, r, i) {
|
|
845
|
-
return
|
|
844
|
+
return se.isNode && c.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
846
845
|
},
|
|
847
846
|
...t
|
|
848
847
|
});
|
|
849
848
|
}
|
|
850
|
-
function
|
|
849
|
+
function Ns(e) {
|
|
851
850
|
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
852
851
|
}
|
|
853
852
|
function Ts(e) {
|
|
@@ -859,7 +858,7 @@ function Ts(e) {
|
|
|
859
858
|
i = n[s], t[i] = e[i];
|
|
860
859
|
return t;
|
|
861
860
|
}
|
|
862
|
-
function
|
|
861
|
+
function an(e) {
|
|
863
862
|
function t(n, s, r, i) {
|
|
864
863
|
let o = n[i++];
|
|
865
864
|
if (o === "__proto__") return !0;
|
|
@@ -869,12 +868,12 @@ function on(e) {
|
|
|
869
868
|
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
870
869
|
const n = {};
|
|
871
870
|
return c.forEachEntry(e, (s, r) => {
|
|
872
|
-
t(
|
|
871
|
+
t(Ns(s), r, n, 0);
|
|
873
872
|
}), n;
|
|
874
873
|
}
|
|
875
874
|
return null;
|
|
876
875
|
}
|
|
877
|
-
function
|
|
876
|
+
function vs(e, t, n) {
|
|
878
877
|
if (c.isString(e))
|
|
879
878
|
try {
|
|
880
879
|
return (t || JSON.parse)(e), c.trim(e);
|
|
@@ -885,12 +884,12 @@ function Ns(e, t, n) {
|
|
|
885
884
|
return (n || JSON.stringify)(e);
|
|
886
885
|
}
|
|
887
886
|
const Pe = {
|
|
888
|
-
transitional:
|
|
887
|
+
transitional: ct,
|
|
889
888
|
adapter: ["xhr", "http", "fetch"],
|
|
890
889
|
transformRequest: [function(t, n) {
|
|
891
890
|
const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, i = c.isObject(t);
|
|
892
891
|
if (i && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
|
|
893
|
-
return r ? JSON.stringify(
|
|
892
|
+
return r ? JSON.stringify(an(t)) : t;
|
|
894
893
|
if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
|
|
895
894
|
return t;
|
|
896
895
|
if (c.isArrayBufferView(t))
|
|
@@ -900,17 +899,17 @@ const Pe = {
|
|
|
900
899
|
let a;
|
|
901
900
|
if (i) {
|
|
902
901
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
903
|
-
return
|
|
902
|
+
return Us(t, this.formSerializer).toString();
|
|
904
903
|
if ((a = c.isFileList(t)) || s.indexOf("multipart/form-data") > -1) {
|
|
905
904
|
const f = this.env && this.env.FormData;
|
|
906
|
-
return
|
|
905
|
+
return Xe(
|
|
907
906
|
a ? { "files[]": t } : t,
|
|
908
907
|
f && new f(),
|
|
909
908
|
this.formSerializer
|
|
910
909
|
);
|
|
911
910
|
}
|
|
912
911
|
}
|
|
913
|
-
return i || r ? (n.setContentType("application/json", !1),
|
|
912
|
+
return i || r ? (n.setContentType("application/json", !1), vs(t)) : t;
|
|
914
913
|
}],
|
|
915
914
|
transformResponse: [function(t) {
|
|
916
915
|
const n = this.transitional || Pe.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
|
|
@@ -922,7 +921,7 @@ const Pe = {
|
|
|
922
921
|
return JSON.parse(t, this.parseReviver);
|
|
923
922
|
} catch (a) {
|
|
924
923
|
if (o)
|
|
925
|
-
throw a.name === "SyntaxError" ?
|
|
924
|
+
throw a.name === "SyntaxError" ? C.from(a, C.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
926
925
|
}
|
|
927
926
|
}
|
|
928
927
|
return t;
|
|
@@ -937,8 +936,8 @@ const Pe = {
|
|
|
937
936
|
maxContentLength: -1,
|
|
938
937
|
maxBodyLength: -1,
|
|
939
938
|
env: {
|
|
940
|
-
FormData:
|
|
941
|
-
Blob:
|
|
939
|
+
FormData: se.classes.FormData,
|
|
940
|
+
Blob: se.classes.Blob
|
|
942
941
|
},
|
|
943
942
|
validateStatus: function(t) {
|
|
944
943
|
return t >= 200 && t < 300;
|
|
@@ -953,7 +952,7 @@ const Pe = {
|
|
|
953
952
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
954
953
|
Pe.headers[e] = {};
|
|
955
954
|
});
|
|
956
|
-
const
|
|
955
|
+
const xs = c.toObjectSet([
|
|
957
956
|
"age",
|
|
958
957
|
"authorization",
|
|
959
958
|
"content-length",
|
|
@@ -971,21 +970,21 @@ const vs = c.toObjectSet([
|
|
|
971
970
|
"referer",
|
|
972
971
|
"retry-after",
|
|
973
972
|
"user-agent"
|
|
974
|
-
]),
|
|
973
|
+
]), Ls = (e) => {
|
|
975
974
|
const t = {};
|
|
976
975
|
let n, s, r;
|
|
977
976
|
return e && e.split(`
|
|
978
977
|
`).forEach(function(o) {
|
|
979
|
-
r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!n || t[n] &&
|
|
978
|
+
r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!n || t[n] && xs[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s);
|
|
980
979
|
}), t;
|
|
981
|
-
},
|
|
982
|
-
function
|
|
980
|
+
}, St = /* @__PURE__ */ Symbol("internals");
|
|
981
|
+
function Ue(e) {
|
|
983
982
|
return e && String(e).trim().toLowerCase();
|
|
984
983
|
}
|
|
985
|
-
function
|
|
986
|
-
return e === !1 || e == null ? e : c.isArray(e) ? e.map(
|
|
984
|
+
function Ye(e) {
|
|
985
|
+
return e === !1 || e == null ? e : c.isArray(e) ? e.map(Ye) : String(e);
|
|
987
986
|
}
|
|
988
|
-
function
|
|
987
|
+
function Os(e) {
|
|
989
988
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
990
989
|
let s;
|
|
991
990
|
for (; s = n.exec(e); )
|
|
@@ -993,7 +992,7 @@ function Ls(e) {
|
|
|
993
992
|
return t;
|
|
994
993
|
}
|
|
995
994
|
const Ps = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
996
|
-
function
|
|
995
|
+
function Ve(e, t, n, s, r) {
|
|
997
996
|
if (c.isFunction(s))
|
|
998
997
|
return s.call(this, t, n);
|
|
999
998
|
if (r && (t = n), !!c.isString(t)) {
|
|
@@ -1003,10 +1002,10 @@ function qe(e, t, n, s, r) {
|
|
|
1003
1002
|
return s.test(t);
|
|
1004
1003
|
}
|
|
1005
1004
|
}
|
|
1006
|
-
function
|
|
1005
|
+
function ks(e) {
|
|
1007
1006
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s);
|
|
1008
1007
|
}
|
|
1009
|
-
function
|
|
1008
|
+
function Fs(e, t) {
|
|
1010
1009
|
const n = c.toCamelCase(" " + t);
|
|
1011
1010
|
["get", "set", "has"].forEach((s) => {
|
|
1012
1011
|
Object.defineProperty(e, s + n, {
|
|
@@ -1023,24 +1022,24 @@ let oe = class {
|
|
|
1023
1022
|
}
|
|
1024
1023
|
set(t, n, s) {
|
|
1025
1024
|
const r = this;
|
|
1026
|
-
function i(a, f,
|
|
1027
|
-
const
|
|
1028
|
-
if (!
|
|
1025
|
+
function i(a, f, u) {
|
|
1026
|
+
const d = Ue(f);
|
|
1027
|
+
if (!d)
|
|
1029
1028
|
throw new Error("header name must be a non-empty string");
|
|
1030
|
-
const
|
|
1031
|
-
(!
|
|
1029
|
+
const h = c.findKey(r, d);
|
|
1030
|
+
(!h || r[h] === void 0 || u === !0 || u === void 0 && r[h] !== !1) && (r[h || f] = Ye(a));
|
|
1032
1031
|
}
|
|
1033
|
-
const o = (a, f) => c.forEach(a, (
|
|
1032
|
+
const o = (a, f) => c.forEach(a, (u, d) => i(u, d, f));
|
|
1034
1033
|
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
1035
1034
|
o(t, n);
|
|
1036
1035
|
else if (c.isString(t) && (t = t.trim()) && !Ps(t))
|
|
1037
|
-
o(
|
|
1036
|
+
o(Ls(t), n);
|
|
1038
1037
|
else if (c.isObject(t) && c.isIterable(t)) {
|
|
1039
|
-
let a = {}, f,
|
|
1040
|
-
for (const
|
|
1041
|
-
if (!c.isArray(
|
|
1038
|
+
let a = {}, f, u;
|
|
1039
|
+
for (const d of t) {
|
|
1040
|
+
if (!c.isArray(d))
|
|
1042
1041
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1043
|
-
a[
|
|
1042
|
+
a[u = d[0]] = (f = a[u]) ? c.isArray(f) ? [...f, d[1]] : [f, d[1]] : d[1];
|
|
1044
1043
|
}
|
|
1045
1044
|
o(a, n);
|
|
1046
1045
|
} else
|
|
@@ -1048,14 +1047,14 @@ let oe = class {
|
|
|
1048
1047
|
return this;
|
|
1049
1048
|
}
|
|
1050
1049
|
get(t, n) {
|
|
1051
|
-
if (t =
|
|
1050
|
+
if (t = Ue(t), t) {
|
|
1052
1051
|
const s = c.findKey(this, t);
|
|
1053
1052
|
if (s) {
|
|
1054
1053
|
const r = this[s];
|
|
1055
1054
|
if (!n)
|
|
1056
1055
|
return r;
|
|
1057
1056
|
if (n === !0)
|
|
1058
|
-
return
|
|
1057
|
+
return Os(r);
|
|
1059
1058
|
if (c.isFunction(n))
|
|
1060
1059
|
return n.call(this, r, s);
|
|
1061
1060
|
if (c.isRegExp(n))
|
|
@@ -1065,9 +1064,9 @@ let oe = class {
|
|
|
1065
1064
|
}
|
|
1066
1065
|
}
|
|
1067
1066
|
has(t, n) {
|
|
1068
|
-
if (t =
|
|
1067
|
+
if (t = Ue(t), t) {
|
|
1069
1068
|
const s = c.findKey(this, t);
|
|
1070
|
-
return !!(s && this[s] !== void 0 && (!n ||
|
|
1069
|
+
return !!(s && this[s] !== void 0 && (!n || Ve(this, this[s], s, n)));
|
|
1071
1070
|
}
|
|
1072
1071
|
return !1;
|
|
1073
1072
|
}
|
|
@@ -1075,9 +1074,9 @@ let oe = class {
|
|
|
1075
1074
|
const s = this;
|
|
1076
1075
|
let r = !1;
|
|
1077
1076
|
function i(o) {
|
|
1078
|
-
if (o =
|
|
1077
|
+
if (o = Ue(o), o) {
|
|
1079
1078
|
const a = c.findKey(s, o);
|
|
1080
|
-
a && (!n ||
|
|
1079
|
+
a && (!n || Ve(s, s[a], a, n)) && (delete s[a], r = !0);
|
|
1081
1080
|
}
|
|
1082
1081
|
}
|
|
1083
1082
|
return c.isArray(t) ? t.forEach(i) : i(t), r;
|
|
@@ -1087,7 +1086,7 @@ let oe = class {
|
|
|
1087
1086
|
let s = n.length, r = !1;
|
|
1088
1087
|
for (; s--; ) {
|
|
1089
1088
|
const i = n[s];
|
|
1090
|
-
(!t ||
|
|
1089
|
+
(!t || Ve(this, this[i], i, t, !0)) && (delete this[i], r = !0);
|
|
1091
1090
|
}
|
|
1092
1091
|
return r;
|
|
1093
1092
|
}
|
|
@@ -1096,11 +1095,11 @@ let oe = class {
|
|
|
1096
1095
|
return c.forEach(this, (r, i) => {
|
|
1097
1096
|
const o = c.findKey(s, i);
|
|
1098
1097
|
if (o) {
|
|
1099
|
-
n[o] =
|
|
1098
|
+
n[o] = Ye(r), delete n[i];
|
|
1100
1099
|
return;
|
|
1101
1100
|
}
|
|
1102
|
-
const a = t ?
|
|
1103
|
-
a !== i && delete n[i], n[a] =
|
|
1101
|
+
const a = t ? ks(i) : String(i).trim();
|
|
1102
|
+
a !== i && delete n[i], n[a] = Ye(r), s[a] = !0;
|
|
1104
1103
|
}), this;
|
|
1105
1104
|
}
|
|
1106
1105
|
concat(...t) {
|
|
@@ -1133,12 +1132,12 @@ let oe = class {
|
|
|
1133
1132
|
return n.forEach((r) => s.set(r)), s;
|
|
1134
1133
|
}
|
|
1135
1134
|
static accessor(t) {
|
|
1136
|
-
const s = (this[
|
|
1135
|
+
const s = (this[St] = this[St] = {
|
|
1137
1136
|
accessors: {}
|
|
1138
1137
|
}).accessors, r = this.prototype;
|
|
1139
1138
|
function i(o) {
|
|
1140
|
-
const a =
|
|
1141
|
-
s[a] || (
|
|
1139
|
+
const a = Ue(o);
|
|
1140
|
+
s[a] || (Fs(r, o), s[a] = !0);
|
|
1142
1141
|
}
|
|
1143
1142
|
return c.isArray(t) ? t.forEach(i) : i(t), this;
|
|
1144
1143
|
}
|
|
@@ -1154,17 +1153,17 @@ c.reduceDescriptors(oe.prototype, ({ value: e }, t) => {
|
|
|
1154
1153
|
};
|
|
1155
1154
|
});
|
|
1156
1155
|
c.freezeMethods(oe);
|
|
1157
|
-
function
|
|
1156
|
+
function Ke(e, t) {
|
|
1158
1157
|
const n = this || Pe, s = t || n, r = oe.from(s.headers);
|
|
1159
1158
|
let i = s.data;
|
|
1160
1159
|
return c.forEach(e, function(a) {
|
|
1161
1160
|
i = a.call(n, i, r.normalize(), t ? t.status : void 0);
|
|
1162
1161
|
}), r.normalize(), i;
|
|
1163
1162
|
}
|
|
1164
|
-
function
|
|
1163
|
+
function cn(e) {
|
|
1165
1164
|
return !!(e && e.__CANCEL__);
|
|
1166
1165
|
}
|
|
1167
|
-
let
|
|
1166
|
+
let ke = class extends C {
|
|
1168
1167
|
/**
|
|
1169
1168
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1170
1169
|
*
|
|
@@ -1175,69 +1174,69 @@ let Oe = class extends b {
|
|
|
1175
1174
|
* @returns {CanceledError} The created error.
|
|
1176
1175
|
*/
|
|
1177
1176
|
constructor(t, n, s) {
|
|
1178
|
-
super(t ?? "canceled",
|
|
1177
|
+
super(t ?? "canceled", C.ERR_CANCELED, n, s), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1179
1178
|
}
|
|
1180
1179
|
};
|
|
1181
|
-
function
|
|
1180
|
+
function ln(e, t, n) {
|
|
1182
1181
|
const s = n.config.validateStatus;
|
|
1183
|
-
!n.status || !s || s(n.status) ? e(n) : t(new
|
|
1182
|
+
!n.status || !s || s(n.status) ? e(n) : t(new C(
|
|
1184
1183
|
"Request failed with status code " + n.status,
|
|
1185
|
-
[
|
|
1184
|
+
[C.ERR_BAD_REQUEST, C.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1186
1185
|
n.config,
|
|
1187
1186
|
n.request,
|
|
1188
1187
|
n
|
|
1189
1188
|
));
|
|
1190
1189
|
}
|
|
1191
|
-
function
|
|
1190
|
+
function js(e) {
|
|
1192
1191
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1193
1192
|
return t && t[1] || "";
|
|
1194
1193
|
}
|
|
1195
|
-
function
|
|
1194
|
+
function Bs(e, t) {
|
|
1196
1195
|
e = e || 10;
|
|
1197
1196
|
const n = new Array(e), s = new Array(e);
|
|
1198
1197
|
let r = 0, i = 0, o;
|
|
1199
1198
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
1200
|
-
const
|
|
1201
|
-
o || (o =
|
|
1202
|
-
let
|
|
1203
|
-
for (;
|
|
1204
|
-
|
|
1205
|
-
if (r = (r + 1) % e, r === i && (i = (i + 1) % e),
|
|
1199
|
+
const u = Date.now(), d = s[i];
|
|
1200
|
+
o || (o = u), n[r] = f, s[r] = u;
|
|
1201
|
+
let h = i, g = 0;
|
|
1202
|
+
for (; h !== r; )
|
|
1203
|
+
g += n[h++], h = h % e;
|
|
1204
|
+
if (r = (r + 1) % e, r === i && (i = (i + 1) % e), u - o < t)
|
|
1206
1205
|
return;
|
|
1207
|
-
const
|
|
1208
|
-
return
|
|
1206
|
+
const R = d && u - d;
|
|
1207
|
+
return R ? Math.round(g * 1e3 / R) : void 0;
|
|
1209
1208
|
};
|
|
1210
1209
|
}
|
|
1211
|
-
function
|
|
1210
|
+
function Ys(e, t) {
|
|
1212
1211
|
let n = 0, s = 1e3 / t, r, i;
|
|
1213
|
-
const o = (
|
|
1214
|
-
n =
|
|
1212
|
+
const o = (u, d = Date.now()) => {
|
|
1213
|
+
n = d, r = null, i && (clearTimeout(i), i = null), e(...u);
|
|
1215
1214
|
};
|
|
1216
|
-
return [(...
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1215
|
+
return [(...u) => {
|
|
1216
|
+
const d = Date.now(), h = d - n;
|
|
1217
|
+
h >= s ? o(u, d) : (r = u, i || (i = setTimeout(() => {
|
|
1219
1218
|
i = null, o(r);
|
|
1220
|
-
}, s -
|
|
1219
|
+
}, s - h)));
|
|
1221
1220
|
}, () => r && o(r)];
|
|
1222
1221
|
}
|
|
1223
|
-
const
|
|
1222
|
+
const Ie = (e, t, n = 3) => {
|
|
1224
1223
|
let s = 0;
|
|
1225
|
-
const r =
|
|
1226
|
-
return
|
|
1227
|
-
const o = i.loaded, a = i.lengthComputable ? i.total : void 0, f = o - s,
|
|
1224
|
+
const r = Bs(50, 250);
|
|
1225
|
+
return Ys((i) => {
|
|
1226
|
+
const o = i.loaded, a = i.lengthComputable ? i.total : void 0, f = o - s, u = r(f), d = o <= a;
|
|
1228
1227
|
s = o;
|
|
1229
|
-
const
|
|
1228
|
+
const h = {
|
|
1230
1229
|
loaded: o,
|
|
1231
1230
|
total: a,
|
|
1232
1231
|
progress: a ? o / a : void 0,
|
|
1233
1232
|
bytes: f,
|
|
1234
|
-
rate:
|
|
1235
|
-
estimated:
|
|
1233
|
+
rate: u || void 0,
|
|
1234
|
+
estimated: u && a && d ? (a - o) / u : void 0,
|
|
1236
1235
|
event: i,
|
|
1237
1236
|
lengthComputable: a != null,
|
|
1238
1237
|
[t ? "download" : "upload"]: !0
|
|
1239
1238
|
};
|
|
1240
|
-
e(
|
|
1239
|
+
e(h);
|
|
1241
1240
|
}, n);
|
|
1242
1241
|
}, Et = (e, t) => {
|
|
1243
1242
|
const n = e != null;
|
|
@@ -1246,10 +1245,10 @@ const He = (e, t, n = 3) => {
|
|
|
1246
1245
|
total: e,
|
|
1247
1246
|
loaded: s
|
|
1248
1247
|
}), t[1]];
|
|
1249
|
-
},
|
|
1250
|
-
new URL(
|
|
1251
|
-
|
|
1252
|
-
) : () => !0,
|
|
1248
|
+
}, Dt = (e) => (...t) => c.asap(() => e(...t)), Ms = se.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, se.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1249
|
+
new URL(se.origin),
|
|
1250
|
+
se.navigator && /(msie|trident)/i.test(se.navigator.userAgent)
|
|
1251
|
+
) : () => !0, Hs = se.hasStandardBrowserEnv ? (
|
|
1253
1252
|
// Standard browser envs support document.cookie
|
|
1254
1253
|
{
|
|
1255
1254
|
write(e, t, n, s, r, i, o) {
|
|
@@ -1278,45 +1277,45 @@ const He = (e, t, n = 3) => {
|
|
|
1278
1277
|
}
|
|
1279
1278
|
}
|
|
1280
1279
|
);
|
|
1281
|
-
function
|
|
1280
|
+
function Is(e) {
|
|
1282
1281
|
return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1283
1282
|
}
|
|
1284
|
-
function
|
|
1283
|
+
function $s(e, t) {
|
|
1285
1284
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1286
1285
|
}
|
|
1287
|
-
function
|
|
1288
|
-
let s = !
|
|
1289
|
-
return e && (s || n == !1) ?
|
|
1286
|
+
function dn(e, t, n) {
|
|
1287
|
+
let s = !Is(t);
|
|
1288
|
+
return e && (s || n == !1) ? $s(e, t) : t;
|
|
1290
1289
|
}
|
|
1291
|
-
const
|
|
1292
|
-
function
|
|
1290
|
+
const At = (e) => e instanceof oe ? { ...e } : e;
|
|
1291
|
+
function be(e, t) {
|
|
1293
1292
|
t = t || {};
|
|
1294
1293
|
const n = {};
|
|
1295
|
-
function s(
|
|
1296
|
-
return c.isPlainObject(
|
|
1297
|
-
}
|
|
1298
|
-
function r(
|
|
1299
|
-
if (c.isUndefined(
|
|
1300
|
-
if (!c.isUndefined(
|
|
1301
|
-
return s(void 0,
|
|
1302
|
-
} else return s(
|
|
1303
|
-
}
|
|
1304
|
-
function i(
|
|
1305
|
-
if (!c.isUndefined(
|
|
1306
|
-
return s(void 0, l);
|
|
1307
|
-
}
|
|
1308
|
-
function o(d, l) {
|
|
1309
|
-
if (c.isUndefined(l)) {
|
|
1310
|
-
if (!c.isUndefined(d))
|
|
1311
|
-
return s(void 0, d);
|
|
1312
|
-
} else return s(void 0, l);
|
|
1313
|
-
}
|
|
1314
|
-
function a(d, l, _) {
|
|
1315
|
-
if (_ in t)
|
|
1316
|
-
return s(d, l);
|
|
1317
|
-
if (_ in e)
|
|
1294
|
+
function s(u, d, h, g) {
|
|
1295
|
+
return c.isPlainObject(u) && c.isPlainObject(d) ? c.merge.call({ caseless: g }, u, d) : c.isPlainObject(d) ? c.merge({}, d) : c.isArray(d) ? d.slice() : d;
|
|
1296
|
+
}
|
|
1297
|
+
function r(u, d, h, g) {
|
|
1298
|
+
if (c.isUndefined(d)) {
|
|
1299
|
+
if (!c.isUndefined(u))
|
|
1300
|
+
return s(void 0, u, h, g);
|
|
1301
|
+
} else return s(u, d, h, g);
|
|
1302
|
+
}
|
|
1303
|
+
function i(u, d) {
|
|
1304
|
+
if (!c.isUndefined(d))
|
|
1318
1305
|
return s(void 0, d);
|
|
1319
1306
|
}
|
|
1307
|
+
function o(u, d) {
|
|
1308
|
+
if (c.isUndefined(d)) {
|
|
1309
|
+
if (!c.isUndefined(u))
|
|
1310
|
+
return s(void 0, u);
|
|
1311
|
+
} else return s(void 0, d);
|
|
1312
|
+
}
|
|
1313
|
+
function a(u, d, h) {
|
|
1314
|
+
if (h in t)
|
|
1315
|
+
return s(u, d);
|
|
1316
|
+
if (h in e)
|
|
1317
|
+
return s(void 0, u);
|
|
1318
|
+
}
|
|
1320
1319
|
const f = {
|
|
1321
1320
|
url: i,
|
|
1322
1321
|
method: i,
|
|
@@ -1346,121 +1345,121 @@ function Ce(e, t) {
|
|
|
1346
1345
|
socketPath: o,
|
|
1347
1346
|
responseEncoding: o,
|
|
1348
1347
|
validateStatus: a,
|
|
1349
|
-
headers: (
|
|
1348
|
+
headers: (u, d, h) => r(At(u), At(d), h, !0)
|
|
1350
1349
|
};
|
|
1351
1350
|
return c.forEach(
|
|
1352
1351
|
Object.keys({ ...e, ...t }),
|
|
1353
|
-
function(
|
|
1354
|
-
if (
|
|
1352
|
+
function(d) {
|
|
1353
|
+
if (d === "__proto__" || d === "constructor" || d === "prototype")
|
|
1355
1354
|
return;
|
|
1356
|
-
const
|
|
1357
|
-
c.isUndefined(
|
|
1355
|
+
const h = c.hasOwnProp(f, d) ? f[d] : r, g = h(e[d], t[d], d);
|
|
1356
|
+
c.isUndefined(g) && h !== a || (n[d] = g);
|
|
1358
1357
|
}
|
|
1359
1358
|
), n;
|
|
1360
1359
|
}
|
|
1361
|
-
const
|
|
1362
|
-
const t =
|
|
1360
|
+
const un = (e) => {
|
|
1361
|
+
const t = be({}, e);
|
|
1363
1362
|
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: i, headers: o, auth: a } = t;
|
|
1364
|
-
if (t.headers = o = oe.from(o), t.url =
|
|
1363
|
+
if (t.headers = o = oe.from(o), t.url = on(dn(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && o.set(
|
|
1365
1364
|
"Authorization",
|
|
1366
1365
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1367
1366
|
), c.isFormData(n)) {
|
|
1368
|
-
if (
|
|
1367
|
+
if (se.hasStandardBrowserEnv || se.hasStandardBrowserWebWorkerEnv)
|
|
1369
1368
|
o.setContentType(void 0);
|
|
1370
1369
|
else if (c.isFunction(n.getHeaders)) {
|
|
1371
|
-
const f = n.getHeaders(),
|
|
1372
|
-
Object.entries(f).forEach(([
|
|
1373
|
-
|
|
1370
|
+
const f = n.getHeaders(), u = ["content-type", "content-length"];
|
|
1371
|
+
Object.entries(f).forEach(([d, h]) => {
|
|
1372
|
+
u.includes(d.toLowerCase()) && o.set(d, h);
|
|
1374
1373
|
});
|
|
1375
1374
|
}
|
|
1376
1375
|
}
|
|
1377
|
-
if (
|
|
1378
|
-
const f = r && i &&
|
|
1376
|
+
if (se.hasStandardBrowserEnv && (s && c.isFunction(s) && (s = s(t)), s || s !== !1 && Ms(t.url))) {
|
|
1377
|
+
const f = r && i && Hs.read(i);
|
|
1379
1378
|
f && o.set(r, f);
|
|
1380
1379
|
}
|
|
1381
1380
|
return t;
|
|
1382
|
-
},
|
|
1381
|
+
}, Gs = typeof XMLHttpRequest < "u", Js = Gs && function(e) {
|
|
1383
1382
|
return new Promise(function(n, s) {
|
|
1384
|
-
const r =
|
|
1383
|
+
const r = un(e);
|
|
1385
1384
|
let i = r.data;
|
|
1386
1385
|
const o = oe.from(r.headers).normalize();
|
|
1387
|
-
let { responseType: a, onUploadProgress: f, onDownloadProgress:
|
|
1386
|
+
let { responseType: a, onUploadProgress: f, onDownloadProgress: u } = r, d, h, g, R, p;
|
|
1388
1387
|
function w() {
|
|
1389
|
-
|
|
1388
|
+
R && R(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(d), r.signal && r.signal.removeEventListener("abort", d);
|
|
1390
1389
|
}
|
|
1391
|
-
let
|
|
1392
|
-
|
|
1393
|
-
function
|
|
1394
|
-
if (!
|
|
1390
|
+
let _ = new XMLHttpRequest();
|
|
1391
|
+
_.open(r.method.toUpperCase(), r.url, !0), _.timeout = r.timeout;
|
|
1392
|
+
function D() {
|
|
1393
|
+
if (!_)
|
|
1395
1394
|
return;
|
|
1396
|
-
const
|
|
1397
|
-
"getAllResponseHeaders" in
|
|
1398
|
-
),
|
|
1399
|
-
data: !a || a === "text" || a === "json" ?
|
|
1400
|
-
status:
|
|
1401
|
-
statusText:
|
|
1402
|
-
headers:
|
|
1395
|
+
const L = oe.from(
|
|
1396
|
+
"getAllResponseHeaders" in _ && _.getAllResponseHeaders()
|
|
1397
|
+
), B = {
|
|
1398
|
+
data: !a || a === "text" || a === "json" ? _.responseText : _.response,
|
|
1399
|
+
status: _.status,
|
|
1400
|
+
statusText: _.statusText,
|
|
1401
|
+
headers: L,
|
|
1403
1402
|
config: e,
|
|
1404
|
-
request:
|
|
1403
|
+
request: _
|
|
1405
1404
|
};
|
|
1406
|
-
|
|
1407
|
-
n(
|
|
1408
|
-
}, function(
|
|
1409
|
-
s(
|
|
1410
|
-
},
|
|
1405
|
+
ln(function(N) {
|
|
1406
|
+
n(N), w();
|
|
1407
|
+
}, function(N) {
|
|
1408
|
+
s(N), w();
|
|
1409
|
+
}, B), _ = null;
|
|
1411
1410
|
}
|
|
1412
|
-
"onloadend" in
|
|
1413
|
-
!
|
|
1414
|
-
},
|
|
1415
|
-
|
|
1416
|
-
},
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1419
|
-
},
|
|
1420
|
-
let
|
|
1421
|
-
const
|
|
1422
|
-
r.timeoutErrorMessage && (
|
|
1423
|
-
|
|
1424
|
-
|
|
1411
|
+
"onloadend" in _ ? _.onloadend = D : _.onreadystatechange = function() {
|
|
1412
|
+
!_ || _.readyState !== 4 || _.status === 0 && !(_.responseURL && _.responseURL.indexOf("file:") === 0) || setTimeout(D);
|
|
1413
|
+
}, _.onabort = function() {
|
|
1414
|
+
_ && (s(new C("Request aborted", C.ECONNABORTED, e, _)), _ = null);
|
|
1415
|
+
}, _.onerror = function(x) {
|
|
1416
|
+
const B = x && x.message ? x.message : "Network Error", V = new C(B, C.ERR_NETWORK, e, _);
|
|
1417
|
+
V.event = x || null, s(V), _ = null;
|
|
1418
|
+
}, _.ontimeout = function() {
|
|
1419
|
+
let x = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
1420
|
+
const B = r.transitional || ct;
|
|
1421
|
+
r.timeoutErrorMessage && (x = r.timeoutErrorMessage), s(new C(
|
|
1422
|
+
x,
|
|
1423
|
+
B.clarifyTimeoutError ? C.ETIMEDOUT : C.ECONNABORTED,
|
|
1425
1424
|
e,
|
|
1426
|
-
|
|
1427
|
-
)),
|
|
1428
|
-
}, i === void 0 && o.setContentType(null), "setRequestHeader" in
|
|
1429
|
-
|
|
1430
|
-
}), c.isUndefined(r.withCredentials) || (
|
|
1431
|
-
|
|
1432
|
-
}, r.cancelToken && r.cancelToken.subscribe(
|
|
1433
|
-
const
|
|
1434
|
-
if (
|
|
1435
|
-
s(new
|
|
1425
|
+
_
|
|
1426
|
+
)), _ = null;
|
|
1427
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in _ && c.forEach(o.toJSON(), function(x, B) {
|
|
1428
|
+
_.setRequestHeader(B, x);
|
|
1429
|
+
}), c.isUndefined(r.withCredentials) || (_.withCredentials = !!r.withCredentials), a && a !== "json" && (_.responseType = r.responseType), u && ([g, p] = Ie(u, !0), _.addEventListener("progress", g)), f && _.upload && ([h, R] = Ie(f), _.upload.addEventListener("progress", h), _.upload.addEventListener("loadend", R)), (r.cancelToken || r.signal) && (d = (L) => {
|
|
1430
|
+
_ && (s(!L || L.type ? new ke(null, e, _) : L), _.abort(), _ = null);
|
|
1431
|
+
}, r.cancelToken && r.cancelToken.subscribe(d), r.signal && (r.signal.aborted ? d() : r.signal.addEventListener("abort", d)));
|
|
1432
|
+
const P = js(r.url);
|
|
1433
|
+
if (P && se.protocols.indexOf(P) === -1) {
|
|
1434
|
+
s(new C("Unsupported protocol " + P + ":", C.ERR_BAD_REQUEST, e));
|
|
1436
1435
|
return;
|
|
1437
1436
|
}
|
|
1438
|
-
|
|
1437
|
+
_.send(i || null);
|
|
1439
1438
|
});
|
|
1440
|
-
},
|
|
1439
|
+
}, Xs = (e, t) => {
|
|
1441
1440
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1442
1441
|
if (t || n) {
|
|
1443
1442
|
let s = new AbortController(), r;
|
|
1444
|
-
const i = function(
|
|
1443
|
+
const i = function(u) {
|
|
1445
1444
|
if (!r) {
|
|
1446
1445
|
r = !0, a();
|
|
1447
|
-
const
|
|
1448
|
-
s.abort(
|
|
1446
|
+
const d = u instanceof Error ? u : this.reason;
|
|
1447
|
+
s.abort(d instanceof C ? d : new ke(d instanceof Error ? d.message : d));
|
|
1449
1448
|
}
|
|
1450
1449
|
};
|
|
1451
1450
|
let o = t && setTimeout(() => {
|
|
1452
|
-
o = null, i(new
|
|
1451
|
+
o = null, i(new C(`timeout of ${t}ms exceeded`, C.ETIMEDOUT));
|
|
1453
1452
|
}, t);
|
|
1454
1453
|
const a = () => {
|
|
1455
|
-
e && (o && clearTimeout(o), o = null, e.forEach((
|
|
1456
|
-
|
|
1454
|
+
e && (o && clearTimeout(o), o = null, e.forEach((u) => {
|
|
1455
|
+
u.unsubscribe ? u.unsubscribe(i) : u.removeEventListener("abort", i);
|
|
1457
1456
|
}), e = null);
|
|
1458
1457
|
};
|
|
1459
|
-
e.forEach((
|
|
1458
|
+
e.forEach((u) => u.addEventListener("abort", i));
|
|
1460
1459
|
const { signal: f } = s;
|
|
1461
1460
|
return f.unsubscribe = () => c.asap(a), f;
|
|
1462
1461
|
}
|
|
1463
|
-
},
|
|
1462
|
+
}, qs = function* (e, t) {
|
|
1464
1463
|
let n = e.byteLength;
|
|
1465
1464
|
if (n < t) {
|
|
1466
1465
|
yield e;
|
|
@@ -1469,10 +1468,10 @@ const dn = (e) => {
|
|
|
1469
1468
|
let s = 0, r;
|
|
1470
1469
|
for (; s < n; )
|
|
1471
1470
|
r = s + t, yield e.slice(s, r), s = r;
|
|
1472
|
-
},
|
|
1473
|
-
for await (const n of
|
|
1474
|
-
yield*
|
|
1475
|
-
},
|
|
1471
|
+
}, Vs = async function* (e, t) {
|
|
1472
|
+
for await (const n of Ks(e))
|
|
1473
|
+
yield* qs(n, t);
|
|
1474
|
+
}, Ks = async function* (e) {
|
|
1476
1475
|
if (e[Symbol.asyncIterator]) {
|
|
1477
1476
|
yield* e;
|
|
1478
1477
|
return;
|
|
@@ -1488,27 +1487,27 @@ const dn = (e) => {
|
|
|
1488
1487
|
} finally {
|
|
1489
1488
|
await t.cancel();
|
|
1490
1489
|
}
|
|
1491
|
-
},
|
|
1492
|
-
const r =
|
|
1490
|
+
}, Ut = (e, t, n, s) => {
|
|
1491
|
+
const r = Vs(e, t);
|
|
1493
1492
|
let i = 0, o, a = (f) => {
|
|
1494
1493
|
o || (o = !0, s && s(f));
|
|
1495
1494
|
};
|
|
1496
1495
|
return new ReadableStream({
|
|
1497
1496
|
async pull(f) {
|
|
1498
1497
|
try {
|
|
1499
|
-
const { done:
|
|
1500
|
-
if (
|
|
1498
|
+
const { done: u, value: d } = await r.next();
|
|
1499
|
+
if (u) {
|
|
1501
1500
|
a(), f.close();
|
|
1502
1501
|
return;
|
|
1503
1502
|
}
|
|
1504
|
-
let
|
|
1503
|
+
let h = d.byteLength;
|
|
1505
1504
|
if (n) {
|
|
1506
|
-
let
|
|
1507
|
-
n(
|
|
1505
|
+
let g = i += h;
|
|
1506
|
+
n(g);
|
|
1508
1507
|
}
|
|
1509
|
-
f.enqueue(new Uint8Array(
|
|
1510
|
-
} catch (
|
|
1511
|
-
throw a(
|
|
1508
|
+
f.enqueue(new Uint8Array(d));
|
|
1509
|
+
} catch (u) {
|
|
1510
|
+
throw a(u), u;
|
|
1512
1511
|
}
|
|
1513
1512
|
},
|
|
1514
1513
|
cancel(f) {
|
|
@@ -1517,28 +1516,28 @@ const dn = (e) => {
|
|
|
1517
1516
|
}, {
|
|
1518
1517
|
highWaterMark: 2
|
|
1519
1518
|
});
|
|
1520
|
-
},
|
|
1519
|
+
}, Nt = 64 * 1024, { isFunction: je } = c, zs = (({ Request: e, Response: t }) => ({
|
|
1521
1520
|
Request: e,
|
|
1522
1521
|
Response: t
|
|
1523
1522
|
}))(c.global), {
|
|
1524
1523
|
ReadableStream: Tt,
|
|
1525
|
-
TextEncoder:
|
|
1526
|
-
} = c.global,
|
|
1524
|
+
TextEncoder: vt
|
|
1525
|
+
} = c.global, xt = (e, ...t) => {
|
|
1527
1526
|
try {
|
|
1528
1527
|
return !!e(...t);
|
|
1529
1528
|
} catch {
|
|
1530
1529
|
return !1;
|
|
1531
1530
|
}
|
|
1532
|
-
},
|
|
1531
|
+
}, Zs = (e) => {
|
|
1533
1532
|
e = c.merge.call({
|
|
1534
1533
|
skipUndefined: !0
|
|
1535
|
-
},
|
|
1536
|
-
const { fetch: t, Request: n, Response: s } = e, r = t ?
|
|
1534
|
+
}, zs, e);
|
|
1535
|
+
const { fetch: t, Request: n, Response: s } = e, r = t ? je(t) : typeof fetch == "function", i = je(n), o = je(s);
|
|
1537
1536
|
if (!r)
|
|
1538
1537
|
return !1;
|
|
1539
|
-
const a = r &&
|
|
1538
|
+
const a = r && je(Tt), f = r && (typeof vt == "function" ? /* @__PURE__ */ ((p) => (w) => p.encode(w))(new vt()) : async (p) => new Uint8Array(await new n(p).arrayBuffer())), u = i && a && xt(() => {
|
|
1540
1539
|
let p = !1;
|
|
1541
|
-
const w = new n(
|
|
1540
|
+
const w = new n(se.origin, {
|
|
1542
1541
|
body: new Tt(),
|
|
1543
1542
|
method: "POST",
|
|
1544
1543
|
get duplex() {
|
|
@@ -1546,24 +1545,24 @@ const dn = (e) => {
|
|
|
1546
1545
|
}
|
|
1547
1546
|
}).headers.has("Content-Type");
|
|
1548
1547
|
return p && !w;
|
|
1549
|
-
}),
|
|
1550
|
-
stream:
|
|
1548
|
+
}), d = o && a && xt(() => c.isReadableStream(new s("").body)), h = {
|
|
1549
|
+
stream: d && ((p) => p.body)
|
|
1551
1550
|
};
|
|
1552
1551
|
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
1553
|
-
!
|
|
1554
|
-
let
|
|
1555
|
-
if (
|
|
1556
|
-
return
|
|
1557
|
-
throw new
|
|
1552
|
+
!h[p] && (h[p] = (w, _) => {
|
|
1553
|
+
let D = w && w[p];
|
|
1554
|
+
if (D)
|
|
1555
|
+
return D.call(w);
|
|
1556
|
+
throw new C(`Response type '${p}' is not supported`, C.ERR_NOT_SUPPORT, _);
|
|
1558
1557
|
});
|
|
1559
1558
|
});
|
|
1560
|
-
const
|
|
1559
|
+
const g = async (p) => {
|
|
1561
1560
|
if (p == null)
|
|
1562
1561
|
return 0;
|
|
1563
1562
|
if (c.isBlob(p))
|
|
1564
1563
|
return p.size;
|
|
1565
1564
|
if (c.isSpecCompliantForm(p))
|
|
1566
|
-
return (await new n(
|
|
1565
|
+
return (await new n(se.origin, {
|
|
1567
1566
|
method: "POST",
|
|
1568
1567
|
body: p
|
|
1569
1568
|
}).arrayBuffer()).byteLength;
|
|
@@ -1571,117 +1570,117 @@ const dn = (e) => {
|
|
|
1571
1570
|
return p.byteLength;
|
|
1572
1571
|
if (c.isURLSearchParams(p) && (p = p + ""), c.isString(p))
|
|
1573
1572
|
return (await f(p)).byteLength;
|
|
1574
|
-
},
|
|
1575
|
-
const
|
|
1576
|
-
return
|
|
1573
|
+
}, R = async (p, w) => {
|
|
1574
|
+
const _ = c.toFiniteNumber(p.getContentLength());
|
|
1575
|
+
return _ ?? g(w);
|
|
1577
1576
|
};
|
|
1578
1577
|
return async (p) => {
|
|
1579
1578
|
let {
|
|
1580
1579
|
url: w,
|
|
1581
|
-
method:
|
|
1582
|
-
data:
|
|
1583
|
-
signal:
|
|
1584
|
-
cancelToken:
|
|
1585
|
-
timeout:
|
|
1586
|
-
onDownloadProgress:
|
|
1587
|
-
onUploadProgress:
|
|
1588
|
-
responseType:
|
|
1589
|
-
headers:
|
|
1580
|
+
method: _,
|
|
1581
|
+
data: D,
|
|
1582
|
+
signal: P,
|
|
1583
|
+
cancelToken: L,
|
|
1584
|
+
timeout: x,
|
|
1585
|
+
onDownloadProgress: B,
|
|
1586
|
+
onUploadProgress: V,
|
|
1587
|
+
responseType: N,
|
|
1588
|
+
headers: ae,
|
|
1590
1589
|
withCredentials: W = "same-origin",
|
|
1591
|
-
fetchOptions:
|
|
1592
|
-
} =
|
|
1593
|
-
|
|
1594
|
-
let
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1590
|
+
fetchOptions: k
|
|
1591
|
+
} = un(p), Q = t || fetch;
|
|
1592
|
+
N = N ? (N + "").toLowerCase() : "text";
|
|
1593
|
+
let Y = Xs([P, L && L.toAbortSignal()], x), Z = null;
|
|
1594
|
+
const E = Y && Y.unsubscribe && (() => {
|
|
1595
|
+
Y.unsubscribe();
|
|
1597
1596
|
});
|
|
1598
|
-
let
|
|
1597
|
+
let I;
|
|
1599
1598
|
try {
|
|
1600
|
-
if (
|
|
1601
|
-
let
|
|
1599
|
+
if (V && u && _ !== "get" && _ !== "head" && (I = await R(ae, D)) !== 0) {
|
|
1600
|
+
let l = new n(w, {
|
|
1602
1601
|
method: "POST",
|
|
1603
|
-
body:
|
|
1602
|
+
body: D,
|
|
1604
1603
|
duplex: "half"
|
|
1605
1604
|
}), y;
|
|
1606
|
-
if (c.isFormData(
|
|
1607
|
-
const [
|
|
1608
|
-
|
|
1609
|
-
|
|
1605
|
+
if (c.isFormData(D) && (y = l.headers.get("content-type")) && ae.setContentType(y), l.body) {
|
|
1606
|
+
const [A, T] = Et(
|
|
1607
|
+
I,
|
|
1608
|
+
Ie(Dt(V))
|
|
1610
1609
|
);
|
|
1611
|
-
|
|
1610
|
+
D = Ut(l.body, Nt, A, T);
|
|
1612
1611
|
}
|
|
1613
1612
|
}
|
|
1614
1613
|
c.isString(W) || (W = W ? "include" : "omit");
|
|
1615
|
-
const
|
|
1616
|
-
...
|
|
1617
|
-
signal:
|
|
1618
|
-
method:
|
|
1619
|
-
headers:
|
|
1620
|
-
body:
|
|
1614
|
+
const U = i && "credentials" in n.prototype, ne = {
|
|
1615
|
+
...k,
|
|
1616
|
+
signal: Y,
|
|
1617
|
+
method: _.toUpperCase(),
|
|
1618
|
+
headers: ae.normalize().toJSON(),
|
|
1619
|
+
body: D,
|
|
1621
1620
|
duplex: "half",
|
|
1622
|
-
credentials:
|
|
1621
|
+
credentials: U ? W : void 0
|
|
1623
1622
|
};
|
|
1624
|
-
|
|
1625
|
-
let
|
|
1626
|
-
const
|
|
1627
|
-
if (
|
|
1628
|
-
const
|
|
1629
|
-
["status", "statusText", "headers"].forEach((
|
|
1630
|
-
|
|
1623
|
+
Z = i && new n(w, ne);
|
|
1624
|
+
let $ = await (i ? Q(Z, k) : Q(w, ne));
|
|
1625
|
+
const b = d && (N === "stream" || N === "response");
|
|
1626
|
+
if (d && (B || b && E)) {
|
|
1627
|
+
const l = {};
|
|
1628
|
+
["status", "statusText", "headers"].forEach((F) => {
|
|
1629
|
+
l[F] = $[F];
|
|
1631
1630
|
});
|
|
1632
|
-
const y = c.toFiniteNumber(
|
|
1631
|
+
const y = c.toFiniteNumber($.headers.get("content-length")), [A, T] = B && Et(
|
|
1633
1632
|
y,
|
|
1634
|
-
|
|
1633
|
+
Ie(Dt(B), !0)
|
|
1635
1634
|
) || [];
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1635
|
+
$ = new s(
|
|
1636
|
+
Ut($.body, Nt, A, () => {
|
|
1637
|
+
T && T(), E && E();
|
|
1639
1638
|
}),
|
|
1640
|
-
|
|
1639
|
+
l
|
|
1641
1640
|
);
|
|
1642
1641
|
}
|
|
1643
|
-
|
|
1644
|
-
let
|
|
1645
|
-
return !
|
|
1646
|
-
|
|
1647
|
-
data:
|
|
1648
|
-
headers: oe.from(
|
|
1649
|
-
status:
|
|
1650
|
-
statusText:
|
|
1642
|
+
N = N || "text";
|
|
1643
|
+
let G = await h[c.findKey(h, N) || "text"]($, p);
|
|
1644
|
+
return !b && E && E(), await new Promise((l, y) => {
|
|
1645
|
+
ln(l, y, {
|
|
1646
|
+
data: G,
|
|
1647
|
+
headers: oe.from($.headers),
|
|
1648
|
+
status: $.status,
|
|
1649
|
+
statusText: $.statusText,
|
|
1651
1650
|
config: p,
|
|
1652
|
-
request:
|
|
1651
|
+
request: Z
|
|
1653
1652
|
});
|
|
1654
1653
|
});
|
|
1655
|
-
} catch (
|
|
1656
|
-
throw
|
|
1657
|
-
new
|
|
1654
|
+
} catch (U) {
|
|
1655
|
+
throw E && E(), U && U.name === "TypeError" && /Load failed|fetch/i.test(U.message) ? Object.assign(
|
|
1656
|
+
new C("Network Error", C.ERR_NETWORK, p, Z, U && U.response),
|
|
1658
1657
|
{
|
|
1659
|
-
cause:
|
|
1658
|
+
cause: U.cause || U
|
|
1660
1659
|
}
|
|
1661
|
-
) :
|
|
1660
|
+
) : C.from(U, U && U.code, p, Z, U && U.response);
|
|
1662
1661
|
}
|
|
1663
1662
|
};
|
|
1664
|
-
},
|
|
1663
|
+
}, Ws = /* @__PURE__ */ new Map(), pn = (e) => {
|
|
1665
1664
|
let t = e && e.env || {};
|
|
1666
1665
|
const { fetch: n, Request: s, Response: r } = t, i = [
|
|
1667
1666
|
s,
|
|
1668
1667
|
r,
|
|
1669
1668
|
n
|
|
1670
1669
|
];
|
|
1671
|
-
let o = i.length, a = o, f,
|
|
1670
|
+
let o = i.length, a = o, f, u, d = Ws;
|
|
1672
1671
|
for (; a--; )
|
|
1673
|
-
f = i[a],
|
|
1674
|
-
return
|
|
1672
|
+
f = i[a], u = d.get(f), u === void 0 && d.set(f, u = a ? /* @__PURE__ */ new Map() : Zs(t)), d = u;
|
|
1673
|
+
return u;
|
|
1675
1674
|
};
|
|
1676
|
-
|
|
1677
|
-
const
|
|
1678
|
-
http:
|
|
1679
|
-
xhr:
|
|
1675
|
+
pn();
|
|
1676
|
+
const dt = {
|
|
1677
|
+
http: _s,
|
|
1678
|
+
xhr: Js,
|
|
1680
1679
|
fetch: {
|
|
1681
|
-
get:
|
|
1680
|
+
get: pn
|
|
1682
1681
|
}
|
|
1683
1682
|
};
|
|
1684
|
-
c.forEach(
|
|
1683
|
+
c.forEach(dt, (e, t) => {
|
|
1685
1684
|
if (e) {
|
|
1686
1685
|
try {
|
|
1687
1686
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1690,8 +1689,8 @@ c.forEach(lt, (e, t) => {
|
|
|
1690
1689
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1691
1690
|
}
|
|
1692
1691
|
});
|
|
1693
|
-
const
|
|
1694
|
-
function
|
|
1692
|
+
const Lt = (e) => `- ${e}`, Qs = (e) => c.isFunction(e) || e === null || e === !1;
|
|
1693
|
+
function er(e, t) {
|
|
1695
1694
|
e = c.isArray(e) ? e : [e];
|
|
1696
1695
|
const { length: n } = e;
|
|
1697
1696
|
let s, r;
|
|
@@ -1699,76 +1698,76 @@ function Qs(e, t) {
|
|
|
1699
1698
|
for (let o = 0; o < n; o++) {
|
|
1700
1699
|
s = e[o];
|
|
1701
1700
|
let a;
|
|
1702
|
-
if (r = s, !
|
|
1703
|
-
throw new
|
|
1701
|
+
if (r = s, !Qs(s) && (r = dt[(a = String(s)).toLowerCase()], r === void 0))
|
|
1702
|
+
throw new C(`Unknown adapter '${a}'`);
|
|
1704
1703
|
if (r && (c.isFunction(r) || (r = r.get(t))))
|
|
1705
1704
|
break;
|
|
1706
1705
|
i[a || "#" + o] = r;
|
|
1707
1706
|
}
|
|
1708
1707
|
if (!r) {
|
|
1709
1708
|
const o = Object.entries(i).map(
|
|
1710
|
-
([f,
|
|
1709
|
+
([f, u]) => `adapter ${f} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1711
1710
|
);
|
|
1712
1711
|
let a = n ? o.length > 1 ? `since :
|
|
1713
|
-
` + o.map(
|
|
1714
|
-
`) : " " +
|
|
1715
|
-
throw new
|
|
1712
|
+
` + o.map(Lt).join(`
|
|
1713
|
+
`) : " " + Lt(o[0]) : "as no adapter specified";
|
|
1714
|
+
throw new C(
|
|
1716
1715
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1717
1716
|
"ERR_NOT_SUPPORT"
|
|
1718
1717
|
);
|
|
1719
1718
|
}
|
|
1720
1719
|
return r;
|
|
1721
1720
|
}
|
|
1722
|
-
const
|
|
1721
|
+
const fn = {
|
|
1723
1722
|
/**
|
|
1724
1723
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1725
1724
|
* @type {Function}
|
|
1726
1725
|
*/
|
|
1727
|
-
getAdapter:
|
|
1726
|
+
getAdapter: er,
|
|
1728
1727
|
/**
|
|
1729
1728
|
* Exposes all known adapters
|
|
1730
1729
|
* @type {Object<string, Function|Object>}
|
|
1731
1730
|
*/
|
|
1732
|
-
adapters:
|
|
1731
|
+
adapters: dt
|
|
1733
1732
|
};
|
|
1734
|
-
function
|
|
1733
|
+
function ze(e) {
|
|
1735
1734
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1736
|
-
throw new
|
|
1735
|
+
throw new ke(null, e);
|
|
1737
1736
|
}
|
|
1738
|
-
function
|
|
1739
|
-
return
|
|
1737
|
+
function Ot(e) {
|
|
1738
|
+
return ze(e), e.headers = oe.from(e.headers), e.data = Ke.call(
|
|
1740
1739
|
e,
|
|
1741
1740
|
e.transformRequest
|
|
1742
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1743
|
-
return
|
|
1741
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), fn.getAdapter(e.adapter || Pe.adapter, e)(e).then(function(s) {
|
|
1742
|
+
return ze(e), s.data = Ke.call(
|
|
1744
1743
|
e,
|
|
1745
1744
|
e.transformResponse,
|
|
1746
1745
|
s
|
|
1747
1746
|
), s.headers = oe.from(s.headers), s;
|
|
1748
1747
|
}, function(s) {
|
|
1749
|
-
return
|
|
1748
|
+
return cn(s) || (ze(e), s && s.response && (s.response.data = Ke.call(
|
|
1750
1749
|
e,
|
|
1751
1750
|
e.transformResponse,
|
|
1752
1751
|
s.response
|
|
1753
1752
|
), s.response.headers = oe.from(s.response.headers))), Promise.reject(s);
|
|
1754
1753
|
});
|
|
1755
1754
|
}
|
|
1756
|
-
const
|
|
1755
|
+
const mn = "1.13.5", qe = {};
|
|
1757
1756
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1758
|
-
|
|
1757
|
+
qe[e] = function(s) {
|
|
1759
1758
|
return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1760
1759
|
};
|
|
1761
1760
|
});
|
|
1762
1761
|
const Pt = {};
|
|
1763
|
-
|
|
1762
|
+
qe.transitional = function(t, n, s) {
|
|
1764
1763
|
function r(i, o) {
|
|
1765
|
-
return "[Axios v" +
|
|
1764
|
+
return "[Axios v" + mn + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
|
1766
1765
|
}
|
|
1767
1766
|
return (i, o, a) => {
|
|
1768
1767
|
if (t === !1)
|
|
1769
|
-
throw new
|
|
1768
|
+
throw new C(
|
|
1770
1769
|
r(o, " has been removed" + (n ? " in " + n : "")),
|
|
1771
|
-
|
|
1770
|
+
C.ERR_DEPRECATED
|
|
1772
1771
|
);
|
|
1773
1772
|
return n && !Pt[o] && (Pt[o] = !0, console.warn(
|
|
1774
1773
|
r(
|
|
@@ -1778,12 +1777,12 @@ Xe.transitional = function(t, n, s) {
|
|
|
1778
1777
|
)), t ? t(i, o, a) : !0;
|
|
1779
1778
|
};
|
|
1780
1779
|
};
|
|
1781
|
-
|
|
1780
|
+
qe.spelling = function(t) {
|
|
1782
1781
|
return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0);
|
|
1783
1782
|
};
|
|
1784
|
-
function
|
|
1783
|
+
function tr(e, t, n) {
|
|
1785
1784
|
if (typeof e != "object")
|
|
1786
|
-
throw new
|
|
1785
|
+
throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE);
|
|
1787
1786
|
const s = Object.keys(e);
|
|
1788
1787
|
let r = s.length;
|
|
1789
1788
|
for (; r-- > 0; ) {
|
|
@@ -1791,22 +1790,22 @@ function er(e, t, n) {
|
|
|
1791
1790
|
if (o) {
|
|
1792
1791
|
const a = e[i], f = a === void 0 || o(a, i, e);
|
|
1793
1792
|
if (f !== !0)
|
|
1794
|
-
throw new
|
|
1793
|
+
throw new C("option " + i + " must be " + f, C.ERR_BAD_OPTION_VALUE);
|
|
1795
1794
|
continue;
|
|
1796
1795
|
}
|
|
1797
1796
|
if (n !== !0)
|
|
1798
|
-
throw new
|
|
1797
|
+
throw new C("Unknown option " + i, C.ERR_BAD_OPTION);
|
|
1799
1798
|
}
|
|
1800
1799
|
}
|
|
1801
|
-
const
|
|
1802
|
-
assertOptions:
|
|
1803
|
-
validators:
|
|
1804
|
-
},
|
|
1805
|
-
let
|
|
1800
|
+
const Me = {
|
|
1801
|
+
assertOptions: tr,
|
|
1802
|
+
validators: qe
|
|
1803
|
+
}, pe = Me.validators;
|
|
1804
|
+
let ge = class {
|
|
1806
1805
|
constructor(t) {
|
|
1807
1806
|
this.defaults = t || {}, this.interceptors = {
|
|
1808
|
-
request: new
|
|
1809
|
-
response: new
|
|
1807
|
+
request: new Rt(),
|
|
1808
|
+
response: new Rt()
|
|
1810
1809
|
};
|
|
1811
1810
|
}
|
|
1812
1811
|
/**
|
|
@@ -1835,21 +1834,21 @@ let ye = class {
|
|
|
1835
1834
|
}
|
|
1836
1835
|
}
|
|
1837
1836
|
_request(t, n) {
|
|
1838
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1837
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = be(this.defaults, n);
|
|
1839
1838
|
const { transitional: s, paramsSerializer: r, headers: i } = n;
|
|
1840
|
-
s !== void 0 &&
|
|
1841
|
-
silentJSONParsing:
|
|
1842
|
-
forcedJSONParsing:
|
|
1843
|
-
clarifyTimeoutError:
|
|
1844
|
-
legacyInterceptorReqResOrdering:
|
|
1839
|
+
s !== void 0 && Me.assertOptions(s, {
|
|
1840
|
+
silentJSONParsing: pe.transitional(pe.boolean),
|
|
1841
|
+
forcedJSONParsing: pe.transitional(pe.boolean),
|
|
1842
|
+
clarifyTimeoutError: pe.transitional(pe.boolean),
|
|
1843
|
+
legacyInterceptorReqResOrdering: pe.transitional(pe.boolean)
|
|
1845
1844
|
}, !1), r != null && (c.isFunction(r) ? n.paramsSerializer = {
|
|
1846
1845
|
serialize: r
|
|
1847
|
-
} :
|
|
1848
|
-
encode:
|
|
1849
|
-
serialize:
|
|
1850
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1851
|
-
baseUrl:
|
|
1852
|
-
withXsrfToken:
|
|
1846
|
+
} : Me.assertOptions(r, {
|
|
1847
|
+
encode: pe.function,
|
|
1848
|
+
serialize: pe.function
|
|
1849
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Me.assertOptions(n, {
|
|
1850
|
+
baseUrl: pe.spelling("baseURL"),
|
|
1851
|
+
withXsrfToken: pe.spelling("withXSRFToken")
|
|
1853
1852
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1854
1853
|
let o = i && c.merge(
|
|
1855
1854
|
i.common,
|
|
@@ -1867,49 +1866,49 @@ let ye = class {
|
|
|
1867
1866
|
if (typeof w.runWhen == "function" && w.runWhen(n) === !1)
|
|
1868
1867
|
return;
|
|
1869
1868
|
f = f && w.synchronous;
|
|
1870
|
-
const
|
|
1871
|
-
|
|
1869
|
+
const _ = n.transitional || ct;
|
|
1870
|
+
_ && _.legacyInterceptorReqResOrdering ? a.unshift(w.fulfilled, w.rejected) : a.push(w.fulfilled, w.rejected);
|
|
1872
1871
|
});
|
|
1873
|
-
const
|
|
1872
|
+
const u = [];
|
|
1874
1873
|
this.interceptors.response.forEach(function(w) {
|
|
1875
|
-
|
|
1874
|
+
u.push(w.fulfilled, w.rejected);
|
|
1876
1875
|
});
|
|
1877
|
-
let
|
|
1876
|
+
let d, h = 0, g;
|
|
1878
1877
|
if (!f) {
|
|
1879
|
-
const p = [
|
|
1880
|
-
for (p.unshift(...a), p.push(...
|
|
1881
|
-
|
|
1882
|
-
return
|
|
1878
|
+
const p = [Ot.bind(this), void 0];
|
|
1879
|
+
for (p.unshift(...a), p.push(...u), g = p.length, d = Promise.resolve(n); h < g; )
|
|
1880
|
+
d = d.then(p[h++], p[h++]);
|
|
1881
|
+
return d;
|
|
1883
1882
|
}
|
|
1884
|
-
|
|
1885
|
-
let
|
|
1886
|
-
for (;
|
|
1887
|
-
const p = a[
|
|
1883
|
+
g = a.length;
|
|
1884
|
+
let R = n;
|
|
1885
|
+
for (; h < g; ) {
|
|
1886
|
+
const p = a[h++], w = a[h++];
|
|
1888
1887
|
try {
|
|
1889
|
-
|
|
1890
|
-
} catch (
|
|
1891
|
-
w.call(this,
|
|
1888
|
+
R = p(R);
|
|
1889
|
+
} catch (_) {
|
|
1890
|
+
w.call(this, _);
|
|
1892
1891
|
break;
|
|
1893
1892
|
}
|
|
1894
1893
|
}
|
|
1895
1894
|
try {
|
|
1896
|
-
|
|
1895
|
+
d = Ot.call(this, R);
|
|
1897
1896
|
} catch (p) {
|
|
1898
1897
|
return Promise.reject(p);
|
|
1899
1898
|
}
|
|
1900
|
-
for (
|
|
1901
|
-
|
|
1902
|
-
return
|
|
1899
|
+
for (h = 0, g = u.length; h < g; )
|
|
1900
|
+
d = d.then(u[h++], u[h++]);
|
|
1901
|
+
return d;
|
|
1903
1902
|
}
|
|
1904
1903
|
getUri(t) {
|
|
1905
|
-
t =
|
|
1906
|
-
const n =
|
|
1907
|
-
return
|
|
1904
|
+
t = be(this.defaults, t);
|
|
1905
|
+
const n = dn(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1906
|
+
return on(n, t.params, t.paramsSerializer);
|
|
1908
1907
|
}
|
|
1909
1908
|
};
|
|
1910
1909
|
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1911
|
-
|
|
1912
|
-
return this.request(
|
|
1910
|
+
ge.prototype[t] = function(n, s) {
|
|
1911
|
+
return this.request(be(s || {}, {
|
|
1913
1912
|
method: t,
|
|
1914
1913
|
url: n,
|
|
1915
1914
|
data: (s || {}).data
|
|
@@ -1919,7 +1918,7 @@ c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1919
1918
|
c.forEach(["post", "put", "patch"], function(t) {
|
|
1920
1919
|
function n(s) {
|
|
1921
1920
|
return function(i, o, a) {
|
|
1922
|
-
return this.request(
|
|
1921
|
+
return this.request(be(a || {}, {
|
|
1923
1922
|
method: t,
|
|
1924
1923
|
headers: s ? {
|
|
1925
1924
|
"Content-Type": "multipart/form-data"
|
|
@@ -1929,9 +1928,9 @@ c.forEach(["post", "put", "patch"], function(t) {
|
|
|
1929
1928
|
}));
|
|
1930
1929
|
};
|
|
1931
1930
|
}
|
|
1932
|
-
|
|
1931
|
+
ge.prototype[t] = n(), ge.prototype[t + "Form"] = n(!0);
|
|
1933
1932
|
});
|
|
1934
|
-
let
|
|
1933
|
+
let nr = class _n {
|
|
1935
1934
|
constructor(t) {
|
|
1936
1935
|
if (typeof t != "function")
|
|
1937
1936
|
throw new TypeError("executor must be a function.");
|
|
@@ -1955,7 +1954,7 @@ let tr = class mn {
|
|
|
1955
1954
|
s.unsubscribe(i);
|
|
1956
1955
|
}, o;
|
|
1957
1956
|
}, t(function(i, o, a) {
|
|
1958
|
-
s.reason || (s.reason = new
|
|
1957
|
+
s.reason || (s.reason = new ke(i, o, a), n(s.reason));
|
|
1959
1958
|
});
|
|
1960
1959
|
}
|
|
1961
1960
|
/**
|
|
@@ -1997,22 +1996,22 @@ let tr = class mn {
|
|
|
1997
1996
|
static source() {
|
|
1998
1997
|
let t;
|
|
1999
1998
|
return {
|
|
2000
|
-
token: new
|
|
1999
|
+
token: new _n(function(r) {
|
|
2001
2000
|
t = r;
|
|
2002
2001
|
}),
|
|
2003
2002
|
cancel: t
|
|
2004
2003
|
};
|
|
2005
2004
|
}
|
|
2006
2005
|
};
|
|
2007
|
-
function
|
|
2006
|
+
function sr(e) {
|
|
2008
2007
|
return function(n) {
|
|
2009
2008
|
return e.apply(null, n);
|
|
2010
2009
|
};
|
|
2011
2010
|
}
|
|
2012
|
-
function
|
|
2011
|
+
function rr(e) {
|
|
2013
2012
|
return c.isObject(e) && e.isAxiosError === !0;
|
|
2014
2013
|
}
|
|
2015
|
-
const
|
|
2014
|
+
const tt = {
|
|
2016
2015
|
Continue: 100,
|
|
2017
2016
|
SwitchingProtocols: 101,
|
|
2018
2017
|
Processing: 102,
|
|
@@ -2083,64 +2082,64 @@ const et = {
|
|
|
2083
2082
|
SslHandshakeFailed: 525,
|
|
2084
2083
|
InvalidSslCertificate: 526
|
|
2085
2084
|
};
|
|
2086
|
-
Object.entries(
|
|
2087
|
-
|
|
2085
|
+
Object.entries(tt).forEach(([e, t]) => {
|
|
2086
|
+
tt[t] = e;
|
|
2088
2087
|
});
|
|
2089
|
-
function
|
|
2090
|
-
const t = new
|
|
2091
|
-
return c.extend(n,
|
|
2092
|
-
return
|
|
2088
|
+
function hn(e) {
|
|
2089
|
+
const t = new ge(e), n = Vt(ge.prototype.request, t);
|
|
2090
|
+
return c.extend(n, ge.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
|
|
2091
|
+
return hn(be(e, r));
|
|
2093
2092
|
}, n;
|
|
2094
2093
|
}
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2094
|
+
const j = hn(Pe);
|
|
2095
|
+
j.Axios = ge;
|
|
2096
|
+
j.CanceledError = ke;
|
|
2097
|
+
j.CancelToken = nr;
|
|
2098
|
+
j.isCancel = cn;
|
|
2099
|
+
j.VERSION = mn;
|
|
2100
|
+
j.toFormData = Xe;
|
|
2101
|
+
j.AxiosError = C;
|
|
2102
|
+
j.Cancel = j.CanceledError;
|
|
2103
|
+
j.all = function(t) {
|
|
2105
2104
|
return Promise.all(t);
|
|
2106
2105
|
};
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2106
|
+
j.spread = sr;
|
|
2107
|
+
j.isAxiosError = rr;
|
|
2108
|
+
j.mergeConfig = be;
|
|
2109
|
+
j.AxiosHeaders = oe;
|
|
2110
|
+
j.formToJSON = (e) => an(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
2111
|
+
j.getAdapter = fn.getAdapter;
|
|
2112
|
+
j.HttpStatusCode = tt;
|
|
2113
|
+
j.default = j;
|
|
2115
2114
|
const {
|
|
2116
|
-
Axios:
|
|
2117
|
-
AxiosError:
|
|
2118
|
-
CanceledError:
|
|
2119
|
-
isCancel:
|
|
2120
|
-
CancelToken:
|
|
2121
|
-
VERSION:
|
|
2122
|
-
all:
|
|
2123
|
-
Cancel:
|
|
2124
|
-
isAxiosError:
|
|
2125
|
-
spread:
|
|
2126
|
-
toFormData:
|
|
2127
|
-
AxiosHeaders:
|
|
2128
|
-
HttpStatusCode:
|
|
2129
|
-
formToJSON:
|
|
2130
|
-
getAdapter:
|
|
2131
|
-
mergeConfig:
|
|
2132
|
-
} =
|
|
2115
|
+
Axios: Jr,
|
|
2116
|
+
AxiosError: Xr,
|
|
2117
|
+
CanceledError: qr,
|
|
2118
|
+
isCancel: Vr,
|
|
2119
|
+
CancelToken: Kr,
|
|
2120
|
+
VERSION: zr,
|
|
2121
|
+
all: Zr,
|
|
2122
|
+
Cancel: Wr,
|
|
2123
|
+
isAxiosError: Qr,
|
|
2124
|
+
spread: ei,
|
|
2125
|
+
toFormData: ti,
|
|
2126
|
+
AxiosHeaders: ni,
|
|
2127
|
+
HttpStatusCode: si,
|
|
2128
|
+
formToJSON: ri,
|
|
2129
|
+
getAdapter: ii,
|
|
2130
|
+
mergeConfig: oi
|
|
2131
|
+
} = j, kt = (e) => {
|
|
2133
2132
|
let t;
|
|
2134
|
-
const n = /* @__PURE__ */ new Set(), s = (
|
|
2135
|
-
const
|
|
2136
|
-
if (!Object.is(
|
|
2137
|
-
const
|
|
2138
|
-
t =
|
|
2133
|
+
const n = /* @__PURE__ */ new Set(), s = (u, d) => {
|
|
2134
|
+
const h = typeof u == "function" ? u(t) : u;
|
|
2135
|
+
if (!Object.is(h, t)) {
|
|
2136
|
+
const g = t;
|
|
2137
|
+
t = d ?? (typeof h != "object" || h === null) ? h : Object.assign({}, t, h), n.forEach((R) => R(t, g));
|
|
2139
2138
|
}
|
|
2140
|
-
}, r = () => t, a = { setState: s, getState: r, getInitialState: () => f, subscribe: (
|
|
2139
|
+
}, r = () => t, a = { setState: s, getState: r, getInitialState: () => f, subscribe: (u) => (n.add(u), () => n.delete(u)) }, f = t = e(s, r, a);
|
|
2141
2140
|
return a;
|
|
2142
|
-
},
|
|
2143
|
-
function
|
|
2141
|
+
}, ir = ((e) => e ? kt(e) : kt), or = (e) => e;
|
|
2142
|
+
function ar(e, t = or) {
|
|
2144
2143
|
const n = Te.useSyncExternalStore(
|
|
2145
2144
|
e.subscribe,
|
|
2146
2145
|
Te.useCallback(() => t(e.getState()), [e, t]),
|
|
@@ -2148,10 +2147,10 @@ function or(e, t = ir) {
|
|
|
2148
2147
|
);
|
|
2149
2148
|
return Te.useDebugValue(n), n;
|
|
2150
2149
|
}
|
|
2151
|
-
const
|
|
2152
|
-
const t =
|
|
2150
|
+
const Ft = (e) => {
|
|
2151
|
+
const t = ir(e), n = (s) => ar(t, s);
|
|
2153
2152
|
return Object.assign(n, t), n;
|
|
2154
|
-
},
|
|
2153
|
+
}, cr = ((e) => e ? Ft(e) : Ft), Re = cr((e) => ({
|
|
2155
2154
|
newsSelectedCandles: null,
|
|
2156
2155
|
newsPlayEndTimestamp: null,
|
|
2157
2156
|
newsTargetCandle: null,
|
|
@@ -2162,7 +2161,7 @@ const kt = (e) => {
|
|
|
2162
2161
|
setNewsTargetCandle: (t) => e({ newsTargetCandle: t }),
|
|
2163
2162
|
setGapCount: (t) => e({ gapCount: t }),
|
|
2164
2163
|
setReplayMode: (t) => e({ isReplayMode: t })
|
|
2165
|
-
})),
|
|
2164
|
+
})), lr = {
|
|
2166
2165
|
"1D": "D1",
|
|
2167
2166
|
D: "D1",
|
|
2168
2167
|
240: "H4",
|
|
@@ -2172,7 +2171,7 @@ const kt = (e) => {
|
|
|
2172
2171
|
15: "M15",
|
|
2173
2172
|
5: "M5",
|
|
2174
2173
|
1: "M1"
|
|
2175
|
-
},
|
|
2174
|
+
}, nt = (e) => ({
|
|
2176
2175
|
1: 60,
|
|
2177
2176
|
5: 300,
|
|
2178
2177
|
// 5 minutes
|
|
@@ -2182,19 +2181,19 @@ const kt = (e) => {
|
|
|
2182
2181
|
// 30 minutes
|
|
2183
2182
|
60: 3600
|
|
2184
2183
|
// 60 minutes (1 hour)
|
|
2185
|
-
})[e] || 3600,
|
|
2186
|
-
const e =
|
|
2184
|
+
})[e] || 3600, wn = [10, 15, 20, 25, 30, 35, 40, 45, 50], yn = Gt(null), dr = () => {
|
|
2185
|
+
const e = Jt(yn);
|
|
2187
2186
|
if (!e)
|
|
2188
2187
|
throw new Error("useWidgetContext must be used inside WidgetProvider");
|
|
2189
2188
|
return e;
|
|
2190
|
-
},
|
|
2189
|
+
}, ur = ({
|
|
2191
2190
|
children: e,
|
|
2192
2191
|
selectedTimeframe: t,
|
|
2193
2192
|
setSelectedTimeframe: n,
|
|
2194
2193
|
currentSymbol: s,
|
|
2195
2194
|
setCurrentSymbol: r
|
|
2196
2195
|
}) => /* @__PURE__ */ m.jsx(
|
|
2197
|
-
|
|
2196
|
+
yn.Provider,
|
|
2198
2197
|
{
|
|
2199
2198
|
value: {
|
|
2200
2199
|
currentSymbol: s,
|
|
@@ -2205,17 +2204,17 @@ const kt = (e) => {
|
|
|
2205
2204
|
children: e
|
|
2206
2205
|
}
|
|
2207
2206
|
);
|
|
2208
|
-
const
|
|
2209
|
-
const
|
|
2210
|
-
const
|
|
2207
|
+
const gn = (...e) => e.filter((t, n, s) => !!t && t.trim() !== "" && s.indexOf(t) === n).join(" ").trim();
|
|
2208
|
+
const pr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2209
|
+
const fr = (e) => e.replace(
|
|
2211
2210
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2212
2211
|
(t, n, s) => s ? s.toUpperCase() : n.toLowerCase()
|
|
2213
2212
|
);
|
|
2214
|
-
const
|
|
2215
|
-
const t =
|
|
2213
|
+
const jt = (e) => {
|
|
2214
|
+
const t = fr(e);
|
|
2216
2215
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2217
2216
|
};
|
|
2218
|
-
var
|
|
2217
|
+
var mr = {
|
|
2219
2218
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2220
2219
|
width: 24,
|
|
2221
2220
|
height: 24,
|
|
@@ -2226,13 +2225,13 @@ var fr = {
|
|
|
2226
2225
|
strokeLinecap: "round",
|
|
2227
2226
|
strokeLinejoin: "round"
|
|
2228
2227
|
};
|
|
2229
|
-
const
|
|
2228
|
+
const _r = (e) => {
|
|
2230
2229
|
for (const t in e)
|
|
2231
2230
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
2232
2231
|
return !0;
|
|
2233
2232
|
return !1;
|
|
2234
2233
|
};
|
|
2235
|
-
const
|
|
2234
|
+
const hr = Xt(
|
|
2236
2235
|
({
|
|
2237
2236
|
color: e = "currentColor",
|
|
2238
2237
|
size: t = 24,
|
|
@@ -2242,43 +2241,43 @@ const _r = Jt(
|
|
|
2242
2241
|
children: i,
|
|
2243
2242
|
iconNode: o,
|
|
2244
2243
|
...a
|
|
2245
|
-
}, f) =>
|
|
2244
|
+
}, f) => Ze(
|
|
2246
2245
|
"svg",
|
|
2247
2246
|
{
|
|
2248
2247
|
ref: f,
|
|
2249
|
-
...
|
|
2248
|
+
...mr,
|
|
2250
2249
|
width: t,
|
|
2251
2250
|
height: t,
|
|
2252
2251
|
stroke: e,
|
|
2253
2252
|
strokeWidth: s ? Number(n) * 24 / Number(t) : n,
|
|
2254
|
-
className:
|
|
2255
|
-
...!i && !
|
|
2253
|
+
className: gn("lucide", r),
|
|
2254
|
+
...!i && !_r(a) && { "aria-hidden": "true" },
|
|
2256
2255
|
...a
|
|
2257
2256
|
},
|
|
2258
2257
|
[
|
|
2259
|
-
...o.map(([
|
|
2258
|
+
...o.map(([u, d]) => Ze(u, d)),
|
|
2260
2259
|
...Array.isArray(i) ? i : [i]
|
|
2261
2260
|
]
|
|
2262
2261
|
)
|
|
2263
2262
|
);
|
|
2264
|
-
const
|
|
2265
|
-
const n =
|
|
2266
|
-
({ className: s, ...r }, i) =>
|
|
2263
|
+
const ut = (e, t) => {
|
|
2264
|
+
const n = Xt(
|
|
2265
|
+
({ className: s, ...r }, i) => Ze(hr, {
|
|
2267
2266
|
ref: i,
|
|
2268
2267
|
iconNode: t,
|
|
2269
|
-
className:
|
|
2270
|
-
`lucide-${
|
|
2268
|
+
className: gn(
|
|
2269
|
+
`lucide-${pr(jt(e))}`,
|
|
2271
2270
|
`lucide-${e}`,
|
|
2272
2271
|
s
|
|
2273
2272
|
),
|
|
2274
2273
|
...r
|
|
2275
2274
|
})
|
|
2276
2275
|
);
|
|
2277
|
-
return n.displayName =
|
|
2276
|
+
return n.displayName = jt(e), n;
|
|
2278
2277
|
};
|
|
2279
|
-
const
|
|
2280
|
-
const
|
|
2281
|
-
const
|
|
2278
|
+
const wr = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], yr = ut("chevron-down", wr);
|
|
2279
|
+
const gr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Cr = ut("chevron-left", gr);
|
|
2280
|
+
const br = [
|
|
2282
2281
|
[
|
|
2283
2282
|
"path",
|
|
2284
2283
|
{
|
|
@@ -2288,20 +2287,20 @@ const Cr = [
|
|
|
2288
2287
|
],
|
|
2289
2288
|
["path", { d: "M19.8 17.8a7.5 7.5 0 0 0 .003-10.603", key: "yol142" }],
|
|
2290
2289
|
["path", { d: "M17 15a3.5 3.5 0 0 0-.025-4.975", key: "ssbmkc" }]
|
|
2291
|
-
],
|
|
2290
|
+
], Rr = ut("speech", br), st = (e, t) => {
|
|
2292
2291
|
if (!e || e === "-" || e.trim() === "" || !t || t === "-" || t.trim() === "")
|
|
2293
2292
|
return "news-widget__orange";
|
|
2294
2293
|
const n = e.trim().replace(/[kKmMbB%]/g, "").replace(/[^\d.-]/g, ""), s = t.trim().replace(/[kKmMbB%]/g, "").replace(/[^\d.-]/g, ""), r = parseFloat(n) || 0, i = parseFloat(s) || 0;
|
|
2295
2294
|
return r > i ? "news-widget__green" : r === i ? "news-widget__orange" : "news-widget__red";
|
|
2296
|
-
},
|
|
2295
|
+
}, Bt = (e) => e.trim().replaceAll(" ", "").replaceAll("_", ""), Sr = new Intl.DateTimeFormat("en-US", {
|
|
2297
2296
|
year: "numeric",
|
|
2298
2297
|
month: "long",
|
|
2299
2298
|
day: "2-digit",
|
|
2300
2299
|
hour: "2-digit",
|
|
2301
2300
|
minute: "2-digit",
|
|
2302
2301
|
hour12: !1
|
|
2303
|
-
}),
|
|
2304
|
-
const t =
|
|
2302
|
+
}), Cn = (e) => {
|
|
2303
|
+
const t = Sr.formatToParts(e), n = (s) => t.find((r) => r.type === s)?.value ?? "";
|
|
2305
2304
|
return `${n("year")} ${n("month")} ${n("day")}, ${n("hour")}:${n("minute")}`;
|
|
2306
2305
|
}, Er = ({
|
|
2307
2306
|
currency: e,
|
|
@@ -2315,7 +2314,7 @@ const Cr = [
|
|
|
2315
2314
|
width: t,
|
|
2316
2315
|
height: t
|
|
2317
2316
|
}
|
|
2318
|
-
),
|
|
2317
|
+
), Dr = ({
|
|
2319
2318
|
title: e,
|
|
2320
2319
|
date: t,
|
|
2321
2320
|
forecast: n,
|
|
@@ -2325,7 +2324,7 @@ const Cr = [
|
|
|
2325
2324
|
/* @__PURE__ */ m.jsxs("div", { className: "news-widget_news_card__header", children: [
|
|
2326
2325
|
r && /* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__currency_icon", children: /* @__PURE__ */ m.jsx(Er, { currency: r }) }),
|
|
2327
2326
|
/* @__PURE__ */ m.jsxs("div", { className: "news-widget_news_card__meta", children: [
|
|
2328
|
-
/* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__date", children:
|
|
2327
|
+
/* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__date", children: Cn(new Date(t ?? 0)) }),
|
|
2329
2328
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__title", children: e })
|
|
2330
2329
|
] })
|
|
2331
2330
|
] }),
|
|
@@ -2335,7 +2334,7 @@ const Cr = [
|
|
|
2335
2334
|
/* @__PURE__ */ m.jsx(
|
|
2336
2335
|
"div",
|
|
2337
2336
|
{
|
|
2338
|
-
className: `news-widget_news_card__font_semibold ${
|
|
2337
|
+
className: `news-widget_news_card__font_semibold ${st(String(s), String(n))}`,
|
|
2339
2338
|
children: s || "-"
|
|
2340
2339
|
}
|
|
2341
2340
|
)
|
|
@@ -2346,7 +2345,7 @@ const Cr = [
|
|
|
2346
2345
|
] })
|
|
2347
2346
|
] })
|
|
2348
2347
|
] });
|
|
2349
|
-
function
|
|
2348
|
+
function Ar(e) {
|
|
2350
2349
|
switch (e) {
|
|
2351
2350
|
case "post":
|
|
2352
2351
|
return "news-widget__bg_green";
|
|
@@ -2356,7 +2355,7 @@ function Dr(e) {
|
|
|
2356
2355
|
return "news-widget__bg_orange";
|
|
2357
2356
|
}
|
|
2358
2357
|
}
|
|
2359
|
-
const
|
|
2358
|
+
const Ur = ({
|
|
2360
2359
|
eventData: e,
|
|
2361
2360
|
showStatus: t = !0,
|
|
2362
2361
|
showPreviousValues: n = !1,
|
|
@@ -2368,7 +2367,7 @@ const Ar = ({
|
|
|
2368
2367
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_event_details_card__header_row", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details_card__header_inner", children: [
|
|
2369
2368
|
/* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details_card__timestamp_row", children: [
|
|
2370
2369
|
/* @__PURE__ */ m.jsxs("p", { className: "news-widget_event_details_card__timestamp", children: [
|
|
2371
|
-
e?.timestamp &&
|
|
2370
|
+
e?.timestamp && Cn(
|
|
2372
2371
|
new Date(e?.timestamp ?? 0)
|
|
2373
2372
|
),
|
|
2374
2373
|
" "
|
|
@@ -2378,7 +2377,7 @@ const Ar = ({
|
|
|
2378
2377
|
/* @__PURE__ */ m.jsx(
|
|
2379
2378
|
"div",
|
|
2380
2379
|
{
|
|
2381
|
-
className: `news-widget_event_details_card__status ${
|
|
2380
|
+
className: `news-widget_event_details_card__status ${Ar(e.status)}`
|
|
2382
2381
|
}
|
|
2383
2382
|
),
|
|
2384
2383
|
e.status === "post" && "Actual Released",
|
|
@@ -2404,7 +2403,7 @@ const Ar = ({
|
|
|
2404
2403
|
e?.event_time && ` ${e?.event_time}`
|
|
2405
2404
|
] }),
|
|
2406
2405
|
e?.slug == "FOMC" && /* @__PURE__ */ m.jsx(
|
|
2407
|
-
|
|
2406
|
+
Rr,
|
|
2408
2407
|
{
|
|
2409
2408
|
stroke: "url(#gradient)",
|
|
2410
2409
|
className: "news-widget_event_details_card__speech_icon"
|
|
@@ -2419,7 +2418,7 @@ const Ar = ({
|
|
|
2419
2418
|
/* @__PURE__ */ m.jsx(
|
|
2420
2419
|
"span",
|
|
2421
2420
|
{
|
|
2422
|
-
className: `news-widget_event_details_card__text_bold ${
|
|
2421
|
+
className: `news-widget_event_details_card__text_bold ${st(e?.actual, e?.forecast)}`,
|
|
2423
2422
|
children: e?.actual || "Soon"
|
|
2424
2423
|
}
|
|
2425
2424
|
)
|
|
@@ -2435,7 +2434,7 @@ const Ar = ({
|
|
|
2435
2434
|
/* @__PURE__ */ m.jsx(
|
|
2436
2435
|
"span",
|
|
2437
2436
|
{
|
|
2438
|
-
className: `news-widget_event_details_card__text_bold ${
|
|
2437
|
+
className: `news-widget_event_details_card__text_bold ${st(
|
|
2439
2438
|
e?.similar?.referenceEvent?.previous_actual,
|
|
2440
2439
|
e?.similar?.referenceEvent?.previous_forecast
|
|
2441
2440
|
)}`,
|
|
@@ -2477,7 +2476,7 @@ const Ar = ({
|
|
|
2477
2476
|
] }),
|
|
2478
2477
|
e?.similar?.referenceEvent?.previousEvents.length > 0 && /* @__PURE__ */ m.jsx("div", { className: "news-widget_event_details_card__previous_events_list", children: e?.similar?.referenceEvent?.previousEvents?.map(
|
|
2479
2478
|
(i, o) => /* @__PURE__ */ m.jsx(
|
|
2480
|
-
|
|
2479
|
+
Dr,
|
|
2481
2480
|
{
|
|
2482
2481
|
title: i.event_name,
|
|
2483
2482
|
date: new Date(i.timestamp),
|
|
@@ -2491,16 +2490,16 @@ const Ar = ({
|
|
|
2491
2490
|
] })
|
|
2492
2491
|
}
|
|
2493
2492
|
)
|
|
2494
|
-
] }),
|
|
2493
|
+
] }), Nr = ({
|
|
2495
2494
|
newsDetail: e,
|
|
2496
2495
|
children: t,
|
|
2497
2496
|
isCompared: n
|
|
2498
2497
|
}) => {
|
|
2499
|
-
const [s, r] =
|
|
2498
|
+
const [s, r] = de(!1);
|
|
2500
2499
|
return /* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details__container news-widget_event_details__container_sm", children: [
|
|
2501
2500
|
e && /* @__PURE__ */ m.jsxs("div", { style: { position: "relative" }, children: [
|
|
2502
2501
|
/* @__PURE__ */ m.jsx(
|
|
2503
|
-
|
|
2502
|
+
Ur,
|
|
2504
2503
|
{
|
|
2505
2504
|
eventData: e.event,
|
|
2506
2505
|
showPreviousValues: !n,
|
|
@@ -2514,7 +2513,7 @@ const Ar = ({
|
|
|
2514
2513
|
type: "button",
|
|
2515
2514
|
className: `news-widget__button news-widget_event_details__ghost_button ${s ? "news-widget_event_details__ghost_button_open" : ""}`,
|
|
2516
2515
|
onClick: () => r(!s),
|
|
2517
|
-
children: /* @__PURE__ */ m.jsx(
|
|
2516
|
+
children: /* @__PURE__ */ m.jsx(yr, { className: "news-widget_event_details__icon" })
|
|
2518
2517
|
}
|
|
2519
2518
|
)
|
|
2520
2519
|
] }),
|
|
@@ -2651,79 +2650,79 @@ const Ar = ({
|
|
|
2651
2650
|
{ name: "BCO_USD", type: "CFD", pipLocation: -2 },
|
|
2652
2651
|
{ name: "AUD_JPY", type: "CURRENCY", pipLocation: -2 }
|
|
2653
2652
|
];
|
|
2654
|
-
function
|
|
2653
|
+
function vr(e, t, n = 1) {
|
|
2655
2654
|
if (t === 0 || !isFinite(t)) return n;
|
|
2656
2655
|
const s = e / t;
|
|
2657
2656
|
return isFinite(s) ? s : n;
|
|
2658
2657
|
}
|
|
2659
|
-
function
|
|
2658
|
+
function Yt(e) {
|
|
2660
2659
|
if (e.length === 0) return 0;
|
|
2661
2660
|
const t = [...e].sort((s, r) => s - r), n = Math.floor(t.length / 2);
|
|
2662
2661
|
return t.length % 2 !== 0 ? t[n] : (t[n - 1] + t[n]) / 2;
|
|
2663
2662
|
}
|
|
2664
|
-
function
|
|
2663
|
+
function xr(e, t, n = []) {
|
|
2665
2664
|
if (e.length === 0) return [];
|
|
2666
|
-
const s = n.map((
|
|
2667
|
-
return e.map((
|
|
2668
|
-
const
|
|
2665
|
+
const s = n.map((d) => Math.abs(d.c - d.o)), r = e.map((d) => Math.abs(d.c - d.o)), i = Yt(r), o = Yt(s), a = vr(o, i), f = e[0].o, u = t.c;
|
|
2666
|
+
return e.map((d) => {
|
|
2667
|
+
const h = (d.o - f) * a + u, g = (d.h - f) * a + u, R = (d.l - f) * a + u, p = (d.c - f) * a + u;
|
|
2669
2668
|
return {
|
|
2670
|
-
o:
|
|
2671
|
-
h: Math.max(
|
|
2672
|
-
l: Math.min(
|
|
2669
|
+
o: h,
|
|
2670
|
+
h: Math.max(g, h, p),
|
|
2671
|
+
l: Math.min(R, h, p),
|
|
2673
2672
|
c: p
|
|
2674
2673
|
};
|
|
2675
2674
|
});
|
|
2676
2675
|
}
|
|
2677
|
-
const
|
|
2678
|
-
const t = new Date(e +
|
|
2679
|
-
return n === 0 ? !1 : n === 1 ? s >=
|
|
2680
|
-
},
|
|
2681
|
-
const t = new Date(e +
|
|
2682
|
-
if (n === 0 || n === 1 && s <
|
|
2676
|
+
const Ce = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 : parseInt(e, 10) * 60, rt = 8, bn = 4, it = 5, Rn = (e) => {
|
|
2677
|
+
const t = new Date(e + rt * 60 * 60 * 1e3), n = t.getUTCDay(), s = t.getUTCHours();
|
|
2678
|
+
return n === 0 ? !1 : n === 1 ? s >= it : n === 6 ? s <= bn : !0;
|
|
2679
|
+
}, Sn = (e) => {
|
|
2680
|
+
const t = new Date(e + rt * 60 * 60 * 1e3), n = t.getUTCDay(), s = t.getUTCHours();
|
|
2681
|
+
if (n === 0 || n === 1 && s < it || n === 6 && s >= bn) {
|
|
2683
2682
|
const r = (8 - n) % 7;
|
|
2684
|
-
return t.setUTCDate(t.getUTCDate() + r), t.setUTCHours(
|
|
2683
|
+
return t.setUTCDate(t.getUTCDate() + r), t.setUTCHours(it, 0, 0, 0), t.getTime() - rt * 60 * 60 * 1e3;
|
|
2685
2684
|
}
|
|
2686
2685
|
return e;
|
|
2687
|
-
},
|
|
2688
|
-
const s =
|
|
2686
|
+
}, Lr = (e, t, n) => {
|
|
2687
|
+
const s = Ce(t) * 1e3, r = [];
|
|
2689
2688
|
let i = e;
|
|
2690
2689
|
for (let o = 0; o < n; o++)
|
|
2691
|
-
i += s,
|
|
2690
|
+
i += s, Rn(i) || (i = Sn(i)), r.push(i);
|
|
2692
2691
|
return r;
|
|
2693
|
-
},
|
|
2692
|
+
}, Mt = (e, t, n, s) => {
|
|
2694
2693
|
if (n <= 0) return [];
|
|
2695
2694
|
if (s === "24x7") {
|
|
2696
|
-
const i =
|
|
2695
|
+
const i = Ce(t) * 1e3;
|
|
2697
2696
|
return Array.from(
|
|
2698
2697
|
{ length: n },
|
|
2699
2698
|
(o, a) => e + (a + 1) * i
|
|
2700
2699
|
);
|
|
2701
2700
|
}
|
|
2702
2701
|
if (s === "1700-1700")
|
|
2703
|
-
return
|
|
2704
|
-
const r =
|
|
2702
|
+
return Lr(e, t, n);
|
|
2703
|
+
const r = Ce(t) * 1e3;
|
|
2705
2704
|
return Array.from(
|
|
2706
2705
|
{ length: n },
|
|
2707
2706
|
(i, o) => e + (o + 1) * r
|
|
2708
2707
|
);
|
|
2709
|
-
},
|
|
2708
|
+
}, Or = (e, t, n, s) => {
|
|
2710
2709
|
if (s === "24x7") {
|
|
2711
|
-
const i =
|
|
2710
|
+
const i = Ce(n) * 1e3;
|
|
2712
2711
|
return Math.max(
|
|
2713
2712
|
0,
|
|
2714
2713
|
Math.floor((t - e) / i)
|
|
2715
2714
|
);
|
|
2716
2715
|
}
|
|
2717
2716
|
if (s === "1700-1700") {
|
|
2718
|
-
const i =
|
|
2717
|
+
const i = Ce(n) * 1e3;
|
|
2719
2718
|
let o = 0, a = e;
|
|
2720
2719
|
for (; a < t; )
|
|
2721
|
-
a += i,
|
|
2720
|
+
a += i, Rn(a) || (a = Sn(a)), a <= t && o++;
|
|
2722
2721
|
return o;
|
|
2723
2722
|
}
|
|
2724
|
-
const r =
|
|
2723
|
+
const r = Ce(n) * 1e3;
|
|
2725
2724
|
return Math.max(0, Math.floor((t - e) / r));
|
|
2726
|
-
},
|
|
2725
|
+
}, pt = [
|
|
2727
2726
|
{
|
|
2728
2727
|
ticker: "EUR_JPY",
|
|
2729
2728
|
display_name: "EURJPY",
|
|
@@ -3135,23 +3134,23 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3135
3134
|
symbol: o,
|
|
3136
3135
|
resolvedTheme: a
|
|
3137
3136
|
}) => {
|
|
3138
|
-
const f =
|
|
3137
|
+
const f = Re(
|
|
3139
3138
|
(p) => p.newsSelectedCandles
|
|
3140
|
-
),
|
|
3139
|
+
), u = Re((p) => p.newsTargetCandle), d = Re(
|
|
3141
3140
|
(p) => p.newsPlayEndTimestamp
|
|
3142
|
-
),
|
|
3143
|
-
return
|
|
3141
|
+
), h = Re((p) => p.gapCount), g = me(f), R = me(null);
|
|
3142
|
+
return _e(() => {
|
|
3144
3143
|
const p = {
|
|
3145
3144
|
current: null
|
|
3146
3145
|
};
|
|
3147
|
-
let w = null,
|
|
3146
|
+
let w = null, _ = !1;
|
|
3148
3147
|
return (async () => {
|
|
3149
|
-
if (!
|
|
3150
|
-
if (f?.length &&
|
|
3151
|
-
if (
|
|
3148
|
+
if (!_) {
|
|
3149
|
+
if (f?.length && u !== null) {
|
|
3150
|
+
if (R.current === f) return;
|
|
3152
3151
|
t.current = [];
|
|
3153
|
-
const
|
|
3154
|
-
if (
|
|
3152
|
+
const D = d != null;
|
|
3153
|
+
if (g.current || D)
|
|
3155
3154
|
try {
|
|
3156
3155
|
s?.current?.resetCache(), s?.current?.activeChart().resetData();
|
|
3157
3156
|
} catch {
|
|
@@ -3160,85 +3159,85 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3160
3159
|
s?.current?.activeChart().executeActionById("timeScaleReset");
|
|
3161
3160
|
} catch {
|
|
3162
3161
|
}
|
|
3163
|
-
const
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
),
|
|
3168
|
-
(
|
|
3169
|
-
)?.session || "24x7",
|
|
3170
|
-
|
|
3162
|
+
const L = [...f].slice(-50 - (h || 0)), x = xr(
|
|
3163
|
+
L,
|
|
3164
|
+
u[u.length - 1],
|
|
3165
|
+
u
|
|
3166
|
+
), V = pt.find(
|
|
3167
|
+
(E) => E.ticker === o || E.display_name === o
|
|
3168
|
+
)?.session || "24x7", N = Mt(
|
|
3169
|
+
u[u.length - 1].timestamp,
|
|
3171
3170
|
i,
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
),
|
|
3175
|
-
|
|
3171
|
+
h || 0,
|
|
3172
|
+
V
|
|
3173
|
+
), ae = Mt(
|
|
3174
|
+
h ? N[N.length - 1] : u[u.length - 1].timestamp,
|
|
3176
3175
|
i,
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
),
|
|
3180
|
-
(
|
|
3181
|
-
open:
|
|
3182
|
-
high:
|
|
3183
|
-
low:
|
|
3184
|
-
close:
|
|
3185
|
-
time:
|
|
3176
|
+
x.length,
|
|
3177
|
+
V
|
|
3178
|
+
), k = x.map(
|
|
3179
|
+
(E, I) => ({
|
|
3180
|
+
open: E.o,
|
|
3181
|
+
high: E.h,
|
|
3182
|
+
low: E.l,
|
|
3183
|
+
close: E.c,
|
|
3184
|
+
time: ae[I]
|
|
3186
3185
|
})
|
|
3187
|
-
).sort((
|
|
3188
|
-
n.current =
|
|
3189
|
-
let
|
|
3190
|
-
const
|
|
3191
|
-
p.current && (clearInterval(p.current), p.current = null),
|
|
3186
|
+
).sort((E, I) => E.time - I.time);
|
|
3187
|
+
n.current = k.slice(-50);
|
|
3188
|
+
let Q = 0, Y = 0;
|
|
3189
|
+
const Z = async () => {
|
|
3190
|
+
p.current && (clearInterval(p.current), p.current = null), R.current = f;
|
|
3192
3191
|
try {
|
|
3193
|
-
f &&
|
|
3194
|
-
} catch (
|
|
3195
|
-
console.error("Error setting visible range:",
|
|
3192
|
+
f && k.length > 0;
|
|
3193
|
+
} catch (E) {
|
|
3194
|
+
console.error("Error setting visible range:", E);
|
|
3196
3195
|
}
|
|
3197
3196
|
};
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
if (
|
|
3201
|
-
if (r(e,
|
|
3202
|
-
t.current =
|
|
3203
|
-
else if (
|
|
3204
|
-
t.current = [...
|
|
3197
|
+
k.length === 0 ? (t.current = [], await Z()) : w = setTimeout(() => {
|
|
3198
|
+
_ || (p.current = setInterval(() => {
|
|
3199
|
+
if (Q < k.length) {
|
|
3200
|
+
if (r(e, k[Q]))
|
|
3201
|
+
t.current = k.slice(0, Q + 1), Q++, Y = 0, Q === k.length && (t.current = k, Z());
|
|
3202
|
+
else if (Y++, Y >= 10) {
|
|
3203
|
+
t.current = [...k];
|
|
3205
3204
|
try {
|
|
3206
3205
|
s?.current?.activeChart().resetData();
|
|
3207
3206
|
} catch {
|
|
3208
3207
|
}
|
|
3209
|
-
|
|
3208
|
+
Z();
|
|
3210
3209
|
}
|
|
3211
3210
|
}
|
|
3212
3211
|
}, 150));
|
|
3213
3212
|
}, 700);
|
|
3214
3213
|
} else {
|
|
3215
|
-
if (t.current = [],
|
|
3214
|
+
if (t.current = [], g.current)
|
|
3216
3215
|
try {
|
|
3217
3216
|
s?.current?.resetCache(), s?.current?.activeChart().resetData();
|
|
3218
3217
|
} catch {
|
|
3219
3218
|
}
|
|
3220
|
-
|
|
3219
|
+
R.current = null;
|
|
3221
3220
|
}
|
|
3222
|
-
|
|
3221
|
+
g.current = f;
|
|
3223
3222
|
}
|
|
3224
3223
|
})(), () => {
|
|
3225
|
-
|
|
3224
|
+
_ = !0, w && clearTimeout(w), p.current && (t.current = [], clearInterval(p.current));
|
|
3226
3225
|
};
|
|
3227
3226
|
}, [
|
|
3228
3227
|
r,
|
|
3229
3228
|
t,
|
|
3230
3229
|
n,
|
|
3231
|
-
l,
|
|
3232
|
-
f,
|
|
3233
3230
|
d,
|
|
3231
|
+
f,
|
|
3232
|
+
u,
|
|
3234
3233
|
e,
|
|
3235
3234
|
i,
|
|
3236
3235
|
o,
|
|
3237
3236
|
s,
|
|
3238
|
-
|
|
3239
|
-
]),
|
|
3237
|
+
h
|
|
3238
|
+
]), _e(() => {
|
|
3240
3239
|
f === null && (n.current = []);
|
|
3241
|
-
}, [n, f]), /* @__PURE__ */ m.jsx(m.Fragment, { children:
|
|
3240
|
+
}, [n, f]), /* @__PURE__ */ m.jsx(m.Fragment, { children: h > 900 && /* @__PURE__ */ m.jsx("div", { className: "bg-backdrop absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 p-4", children: /* @__PURE__ */ m.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
|
|
3242
3241
|
/* @__PURE__ */ m.jsx(
|
|
3243
3242
|
"img",
|
|
3244
3243
|
{
|
|
@@ -3254,7 +3253,7 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3254
3253
|
" Please try another timeframe."
|
|
3255
3254
|
] })
|
|
3256
3255
|
] }) }) });
|
|
3257
|
-
},
|
|
3256
|
+
}, kr = ({
|
|
3258
3257
|
children: e,
|
|
3259
3258
|
eventId: t,
|
|
3260
3259
|
widgetKey: n,
|
|
@@ -3264,61 +3263,62 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3264
3263
|
newsDetail: o,
|
|
3265
3264
|
selectedCandles: a,
|
|
3266
3265
|
defaultSymbol: f,
|
|
3267
|
-
currentSymbol:
|
|
3268
|
-
currentTimeFrame:
|
|
3269
|
-
isUpcoming:
|
|
3270
|
-
isElapsed:
|
|
3271
|
-
onBack:
|
|
3266
|
+
currentSymbol: u,
|
|
3267
|
+
currentTimeFrame: d,
|
|
3268
|
+
isUpcoming: h = !1,
|
|
3269
|
+
isElapsed: g = !1,
|
|
3270
|
+
onBack: R,
|
|
3272
3271
|
pushBar: p,
|
|
3273
3272
|
iframeRef: w,
|
|
3274
|
-
futureRef:
|
|
3275
|
-
pendingMessageRef:
|
|
3276
|
-
iframeReadyToListenRef:
|
|
3277
|
-
highlightBarsRef:
|
|
3278
|
-
setGapCountExternal:
|
|
3279
|
-
setReplayModeExternal:
|
|
3273
|
+
futureRef: _,
|
|
3274
|
+
pendingMessageRef: D,
|
|
3275
|
+
iframeReadyToListenRef: P,
|
|
3276
|
+
highlightBarsRef: L,
|
|
3277
|
+
setGapCountExternal: x,
|
|
3278
|
+
setReplayModeExternal: B,
|
|
3279
|
+
setPlayEndTimestampExternal: V
|
|
3280
3280
|
}) => {
|
|
3281
|
-
const
|
|
3282
|
-
setNewsTargetCandle:
|
|
3283
|
-
setGapCount:
|
|
3284
|
-
setNewsPlayEndTimestamp:
|
|
3281
|
+
const N = me(null), { setCurrentSymbol: ae, setSelectedTimeframe: W } = dr(), {
|
|
3282
|
+
setNewsTargetCandle: k,
|
|
3283
|
+
setGapCount: Q,
|
|
3284
|
+
setNewsPlayEndTimestamp: Y,
|
|
3285
3285
|
setNewsSelectedCandles: Z
|
|
3286
|
-
} =
|
|
3287
|
-
return
|
|
3286
|
+
} = Re();
|
|
3287
|
+
return _e(() => {
|
|
3288
3288
|
if (!t || t == "" || !s) return;
|
|
3289
|
-
const
|
|
3289
|
+
const E = () => {
|
|
3290
3290
|
if (s)
|
|
3291
3291
|
try {
|
|
3292
|
-
const
|
|
3293
|
-
|
|
3292
|
+
const b = s?.activeChart();
|
|
3293
|
+
b && b.getAllShapes().forEach((G) => {
|
|
3294
3294
|
try {
|
|
3295
|
-
|
|
3296
|
-
} catch (
|
|
3297
|
-
console.error("Failed to remove shape",
|
|
3295
|
+
b.removeEntity(G.id);
|
|
3296
|
+
} catch (l) {
|
|
3297
|
+
console.error("Failed to remove shape", l);
|
|
3298
3298
|
}
|
|
3299
3299
|
});
|
|
3300
3300
|
} catch {
|
|
3301
3301
|
}
|
|
3302
|
-
},
|
|
3303
|
-
const { data:
|
|
3302
|
+
}, I = async () => {
|
|
3303
|
+
const { data: b, status: G } = await j.get(
|
|
3304
3304
|
`https://corprate-widget.iccandle.ai/news/${t}`,
|
|
3305
3305
|
{
|
|
3306
3306
|
headers: { "api-key": n },
|
|
3307
3307
|
params: { symbol: f }
|
|
3308
3308
|
}
|
|
3309
3309
|
);
|
|
3310
|
-
if (
|
|
3310
|
+
if (G !== 200) {
|
|
3311
3311
|
console.error("Failed to fetch news detail");
|
|
3312
3312
|
return;
|
|
3313
3313
|
}
|
|
3314
|
-
return
|
|
3314
|
+
return b;
|
|
3315
3315
|
};
|
|
3316
|
-
let
|
|
3317
|
-
const
|
|
3318
|
-
const
|
|
3319
|
-
return
|
|
3316
|
+
let U = !1;
|
|
3317
|
+
const ne = [], $ = (b, G) => {
|
|
3318
|
+
const l = window.setTimeout(b, G);
|
|
3319
|
+
return ne.push(l), l;
|
|
3320
3320
|
};
|
|
3321
|
-
return
|
|
3321
|
+
return N.current = s, s.onChartReady(async () => {
|
|
3322
3322
|
i === "dark" || i === "system" ? (s.applyOverrides({
|
|
3323
3323
|
//chart background
|
|
3324
3324
|
"paneProperties.background": "#000000",
|
|
@@ -3340,11 +3340,11 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3340
3340
|
"--tv-color-platform-background",
|
|
3341
3341
|
"#f9fafb"
|
|
3342
3342
|
));
|
|
3343
|
-
const
|
|
3344
|
-
if (!
|
|
3345
|
-
const
|
|
3346
|
-
await
|
|
3347
|
-
{ time:
|
|
3343
|
+
const b = s.activeChart();
|
|
3344
|
+
if (!b) return;
|
|
3345
|
+
const G = async (F, J) => {
|
|
3346
|
+
await b.createShape(
|
|
3347
|
+
{ time: J },
|
|
3348
3348
|
{
|
|
3349
3349
|
shape: "vertical_line",
|
|
3350
3350
|
lock: !0,
|
|
@@ -3352,44 +3352,44 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3352
3352
|
overrides: { linestyle: 2, linewidth: 1 }
|
|
3353
3353
|
}
|
|
3354
3354
|
);
|
|
3355
|
-
const
|
|
3356
|
-
let
|
|
3357
|
-
if (
|
|
3358
|
-
const
|
|
3359
|
-
(
|
|
3355
|
+
const S = await b.exportData(), X = S.data.findIndex((v) => v[0] === J);
|
|
3356
|
+
let M = a;
|
|
3357
|
+
if (X != -1 && !M && (M = [...wn].sort((v, K) => K - v).find((v) => S.data[X + v]) ?? null), X != -1 && M) {
|
|
3358
|
+
const v = F, K = S.data[X + M][0], H = S.data.filter(
|
|
3359
|
+
(ce) => ce[0] > v && ce[0] <= K
|
|
3360
3360
|
) ?? [];
|
|
3361
|
-
let re = null,
|
|
3362
|
-
if (
|
|
3363
|
-
const
|
|
3364
|
-
(
|
|
3361
|
+
let re = null, fe = null;
|
|
3362
|
+
if (H.length > 0) {
|
|
3363
|
+
const ce = H.reduce(
|
|
3364
|
+
(z, ee, le, O) => Number(ee[3]) < Number(O[z][3]) ? le : z,
|
|
3365
3365
|
0
|
|
3366
|
-
),
|
|
3367
|
-
|
|
3368
|
-
time:
|
|
3369
|
-
value: Number(
|
|
3366
|
+
), ue = H[ce];
|
|
3367
|
+
fe = {
|
|
3368
|
+
time: ue[0],
|
|
3369
|
+
value: Number(ue[3])
|
|
3370
3370
|
};
|
|
3371
3371
|
}
|
|
3372
|
-
if (
|
|
3373
|
-
const
|
|
3374
|
-
(
|
|
3372
|
+
if (H.length > 0) {
|
|
3373
|
+
const ce = H.reduce(
|
|
3374
|
+
(z, ee, le, O) => Number(ee[2]) > Number(O[z][2]) ? le : z,
|
|
3375
3375
|
0
|
|
3376
|
-
),
|
|
3376
|
+
), ue = H[ce];
|
|
3377
3377
|
re = {
|
|
3378
|
-
time:
|
|
3379
|
-
value: Number(
|
|
3378
|
+
time: ue[0],
|
|
3379
|
+
value: Number(ue[2])
|
|
3380
3380
|
};
|
|
3381
3381
|
}
|
|
3382
|
-
if (re &&
|
|
3383
|
-
const
|
|
3384
|
-
await
|
|
3382
|
+
if (re && fe && H.length > 0) {
|
|
3383
|
+
const ce = re.value, ue = fe.value, ee = S.data[X + 1][1];
|
|
3384
|
+
await b.createMultipointShape(
|
|
3385
3385
|
[
|
|
3386
3386
|
{
|
|
3387
|
-
time:
|
|
3388
|
-
price:
|
|
3387
|
+
time: v,
|
|
3388
|
+
price: ee
|
|
3389
3389
|
},
|
|
3390
3390
|
{
|
|
3391
|
-
time:
|
|
3392
|
-
price:
|
|
3391
|
+
time: K,
|
|
3392
|
+
price: ce
|
|
3393
3393
|
}
|
|
3394
3394
|
],
|
|
3395
3395
|
{
|
|
@@ -3408,15 +3408,15 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3408
3408
|
frozen: !0
|
|
3409
3409
|
}
|
|
3410
3410
|
}
|
|
3411
|
-
), await
|
|
3411
|
+
), await b.createMultipointShape(
|
|
3412
3412
|
[
|
|
3413
3413
|
{
|
|
3414
|
-
time:
|
|
3415
|
-
price:
|
|
3414
|
+
time: v,
|
|
3415
|
+
price: ue
|
|
3416
3416
|
},
|
|
3417
3417
|
{
|
|
3418
|
-
time:
|
|
3419
|
-
price:
|
|
3418
|
+
time: K,
|
|
3419
|
+
price: ee
|
|
3420
3420
|
}
|
|
3421
3421
|
],
|
|
3422
3422
|
{
|
|
@@ -3434,15 +3434,15 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3434
3434
|
frozen: !0
|
|
3435
3435
|
}
|
|
3436
3436
|
}
|
|
3437
|
-
), await
|
|
3437
|
+
), await b.createMultipointShape(
|
|
3438
3438
|
[
|
|
3439
3439
|
{
|
|
3440
|
-
time:
|
|
3441
|
-
price:
|
|
3440
|
+
time: v,
|
|
3441
|
+
price: ce
|
|
3442
3442
|
},
|
|
3443
3443
|
{
|
|
3444
|
-
time:
|
|
3445
|
-
price:
|
|
3444
|
+
time: K,
|
|
3445
|
+
price: ce
|
|
3446
3446
|
}
|
|
3447
3447
|
],
|
|
3448
3448
|
{
|
|
@@ -3455,15 +3455,15 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3455
3455
|
extendRight: !0
|
|
3456
3456
|
}
|
|
3457
3457
|
}
|
|
3458
|
-
), await
|
|
3458
|
+
), await b.createMultipointShape(
|
|
3459
3459
|
[
|
|
3460
3460
|
{
|
|
3461
|
-
time:
|
|
3462
|
-
price:
|
|
3461
|
+
time: v,
|
|
3462
|
+
price: ue
|
|
3463
3463
|
},
|
|
3464
3464
|
{
|
|
3465
|
-
time:
|
|
3466
|
-
price:
|
|
3465
|
+
time: K,
|
|
3466
|
+
price: ue
|
|
3467
3467
|
}
|
|
3468
3468
|
],
|
|
3469
3469
|
{
|
|
@@ -3477,23 +3477,23 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3477
3477
|
}
|
|
3478
3478
|
}
|
|
3479
3479
|
);
|
|
3480
|
-
const
|
|
3481
|
-
(
|
|
3480
|
+
const le = Tr.find(
|
|
3481
|
+
(we) => Bt(we.name) == Bt(u)
|
|
3482
3482
|
)?.pipLocation;
|
|
3483
|
-
let
|
|
3484
|
-
if (
|
|
3485
|
-
const
|
|
3486
|
-
Math.abs((
|
|
3483
|
+
let O = "", q = "";
|
|
3484
|
+
if (le) {
|
|
3485
|
+
const we = Math.pow(10, -le), ft = parseFloat(
|
|
3486
|
+
Math.abs((ce - ee) * we).toFixed(
|
|
3487
3487
|
1
|
|
3488
3488
|
)
|
|
3489
|
-
),
|
|
3490
|
-
Math.abs((
|
|
3489
|
+
), mt = parseFloat(
|
|
3490
|
+
Math.abs((ue - ee) * we).toFixed(
|
|
3491
3491
|
1
|
|
3492
3492
|
)
|
|
3493
3493
|
);
|
|
3494
|
-
|
|
3494
|
+
O = `${ft >= 0 ? "+" : ""}${ft.toFixed(2)} pip`, q = `${mt >= 0 ? "-" : ""}${mt.toFixed(2)} pip`;
|
|
3495
3495
|
}
|
|
3496
|
-
await
|
|
3496
|
+
await b.createShape(
|
|
3497
3497
|
{
|
|
3498
3498
|
time: re.time,
|
|
3499
3499
|
price: re.value
|
|
@@ -3504,14 +3504,14 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3504
3504
|
arrowColor: "#12B76A",
|
|
3505
3505
|
fontsize: 11,
|
|
3506
3506
|
color: "#12B76A",
|
|
3507
|
-
text:
|
|
3507
|
+
text: O,
|
|
3508
3508
|
bold: !0
|
|
3509
3509
|
}
|
|
3510
3510
|
}
|
|
3511
|
-
), await
|
|
3511
|
+
), await b.createShape(
|
|
3512
3512
|
{
|
|
3513
|
-
time:
|
|
3514
|
-
price:
|
|
3513
|
+
time: fe.time,
|
|
3514
|
+
price: fe.value
|
|
3515
3515
|
},
|
|
3516
3516
|
{
|
|
3517
3517
|
shape: "arrow_up",
|
|
@@ -3519,19 +3519,19 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3519
3519
|
arrowColor: "#D92D20",
|
|
3520
3520
|
fontsize: 11,
|
|
3521
3521
|
color: "#D92D20",
|
|
3522
|
-
text:
|
|
3522
|
+
text: q,
|
|
3523
3523
|
bold: !0
|
|
3524
3524
|
}
|
|
3525
3525
|
}
|
|
3526
3526
|
);
|
|
3527
|
-
const
|
|
3528
|
-
await
|
|
3527
|
+
const te = Math.floor((v + K) / 2);
|
|
3528
|
+
await b.createShape(
|
|
3529
3529
|
{
|
|
3530
|
-
time:
|
|
3530
|
+
time: te
|
|
3531
3531
|
},
|
|
3532
3532
|
{
|
|
3533
3533
|
shape: "text",
|
|
3534
|
-
text: `${
|
|
3534
|
+
text: `${M} candles`,
|
|
3535
3535
|
zOrder: "top",
|
|
3536
3536
|
overrides: {
|
|
3537
3537
|
fontsize: 12,
|
|
@@ -3543,20 +3543,20 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3543
3543
|
);
|
|
3544
3544
|
}
|
|
3545
3545
|
}
|
|
3546
|
-
if (
|
|
3547
|
-
from:
|
|
3548
|
-
to:
|
|
3549
|
-
}),
|
|
3550
|
-
const
|
|
3551
|
-
|
|
3546
|
+
if (S && S.data.length > 0 && S.data[0][0] >= S.data[S.data.length - 1][0] && await b.setVisibleRange({
|
|
3547
|
+
from: S.data[0][0],
|
|
3548
|
+
to: S.data[S.data.length - 1][0]
|
|
3549
|
+
}), h && r) {
|
|
3550
|
+
const v = Math.floor(Date.now() / 1e3), K = J, H = b.resolution(), re = 3600 * 24 * 7;
|
|
3551
|
+
v - re >= K + re && await b.setVisibleRange(
|
|
3552
3552
|
{
|
|
3553
|
-
from:
|
|
3554
|
-
to:
|
|
3553
|
+
from: v - re,
|
|
3554
|
+
to: K + re
|
|
3555
3555
|
},
|
|
3556
3556
|
{ applyDefaultRightMargin: !0, percentRightMargin: 50 }
|
|
3557
|
-
),
|
|
3558
|
-
|
|
3559
|
-
{ time:
|
|
3557
|
+
), $(() => {
|
|
3558
|
+
U || N.current !== s || Number(H) <= 30 && b.createShape(
|
|
3559
|
+
{ time: K },
|
|
3560
3560
|
{
|
|
3561
3561
|
shape: "vertical_line",
|
|
3562
3562
|
lock: !0,
|
|
@@ -3566,139 +3566,144 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3566
3566
|
);
|
|
3567
3567
|
}, 2e3);
|
|
3568
3568
|
}
|
|
3569
|
-
},
|
|
3570
|
-
if (
|
|
3571
|
-
const
|
|
3572
|
-
if (
|
|
3573
|
-
|
|
3574
|
-
const
|
|
3575
|
-
|
|
3576
|
-
const
|
|
3577
|
-
|
|
3578
|
-
{ from:
|
|
3569
|
+
}, l = async () => {
|
|
3570
|
+
if (U || N.current !== s) return;
|
|
3571
|
+
const F = await I();
|
|
3572
|
+
if (U || N.current !== s) return;
|
|
3573
|
+
E();
|
|
3574
|
+
const J = (F?.event?.timestamp ?? 0) / 1e3, S = nt(d), X = J - J % S;
|
|
3575
|
+
b.getVisibleBarsRange() || await new Promise((K) => setTimeout(K, 2e3));
|
|
3576
|
+
const v = b.getVisibleBarsRange();
|
|
3577
|
+
v && v.from <= J && J <= v.to ? await G(J, X) : (h || await b.setVisibleRange(
|
|
3578
|
+
{ from: J },
|
|
3579
3579
|
{ applyDefaultRightMargin: !0, percentRightMargin: 50 }
|
|
3580
|
-
), await
|
|
3581
|
-
},
|
|
3582
|
-
|
|
3583
|
-
|
|
3580
|
+
), await G(J, X));
|
|
3581
|
+
}, y = () => {
|
|
3582
|
+
$(() => {
|
|
3583
|
+
U || N.current !== s || (async () => {
|
|
3584
3584
|
try {
|
|
3585
|
-
|
|
3585
|
+
if (u == b.symbol()) {
|
|
3586
|
+
await l();
|
|
3587
|
+
return;
|
|
3588
|
+
}
|
|
3589
|
+
x(0), B(!1), V(null), Z(null), w.current?.contentWindow?.postMessage(
|
|
3586
3590
|
{ action: "handleClose" },
|
|
3587
3591
|
"*"
|
|
3588
|
-
),
|
|
3589
|
-
} catch (
|
|
3590
|
-
console.log("error=>",
|
|
3592
|
+
), ae(b.symbol());
|
|
3593
|
+
} catch (F) {
|
|
3594
|
+
console.log("error=>", F);
|
|
3591
3595
|
}
|
|
3592
3596
|
})();
|
|
3593
3597
|
}, 300);
|
|
3594
|
-
},
|
|
3595
|
-
|
|
3596
|
-
|
|
3598
|
+
}, A = (F) => {
|
|
3599
|
+
$(() => {
|
|
3600
|
+
U || N.current !== s || d == F || (async () => {
|
|
3597
3601
|
try {
|
|
3598
|
-
|
|
3602
|
+
x(0), B(!1), V(null), Z(null), w.current?.contentWindow?.postMessage(
|
|
3599
3603
|
{ action: "handleClose" },
|
|
3600
3604
|
"*"
|
|
3601
|
-
),
|
|
3602
|
-
} catch (
|
|
3603
|
-
console.log("error=>",
|
|
3605
|
+
), W(F);
|
|
3606
|
+
} catch (J) {
|
|
3607
|
+
console.log("error=>", J);
|
|
3604
3608
|
}
|
|
3605
3609
|
})();
|
|
3606
3610
|
}, 300);
|
|
3607
3611
|
};
|
|
3608
|
-
|
|
3612
|
+
b.onSymbolChanged().subscribe(null, y), b.onIntervalChanged().subscribe(null, A);
|
|
3609
3613
|
try {
|
|
3610
|
-
await
|
|
3611
|
-
} catch (
|
|
3612
|
-
console.log("error=>",
|
|
3614
|
+
await l();
|
|
3615
|
+
} catch (F) {
|
|
3616
|
+
console.log("error=>", F);
|
|
3613
3617
|
}
|
|
3614
|
-
|
|
3618
|
+
U && (() => {
|
|
3615
3619
|
try {
|
|
3616
|
-
|
|
3620
|
+
b.onSymbolChanged().unsubscribe(null, y);
|
|
3617
3621
|
} catch {
|
|
3618
3622
|
}
|
|
3619
3623
|
try {
|
|
3620
|
-
|
|
3624
|
+
b.onIntervalChanged().unsubscribe(null, A);
|
|
3621
3625
|
} catch {
|
|
3622
3626
|
}
|
|
3623
3627
|
})();
|
|
3624
3628
|
}), () => {
|
|
3625
|
-
|
|
3629
|
+
U = !0, ne.forEach((b) => window.clearTimeout(b)), E(), N.current === s && (N.current = null);
|
|
3626
3630
|
};
|
|
3627
3631
|
}, [
|
|
3628
3632
|
i,
|
|
3629
3633
|
n,
|
|
3630
3634
|
s,
|
|
3631
|
-
|
|
3635
|
+
h,
|
|
3632
3636
|
f,
|
|
3633
3637
|
a,
|
|
3634
3638
|
r,
|
|
3635
3639
|
t,
|
|
3636
|
-
l,
|
|
3637
|
-
ne,
|
|
3638
3640
|
d,
|
|
3641
|
+
W,
|
|
3642
|
+
u,
|
|
3643
|
+
ae,
|
|
3644
|
+
g,
|
|
3639
3645
|
Y,
|
|
3640
|
-
C,
|
|
3641
|
-
V,
|
|
3642
3646
|
Z,
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
+
Q,
|
|
3648
|
+
k,
|
|
3649
|
+
x,
|
|
3650
|
+
B,
|
|
3651
|
+
V,
|
|
3647
3652
|
w
|
|
3648
|
-
]),
|
|
3653
|
+
]), _e(() => {
|
|
3649
3654
|
if (s) {
|
|
3650
|
-
if (t == "" ||
|
|
3655
|
+
if (t == "" || g) return;
|
|
3651
3656
|
s.onChartReady(async () => {
|
|
3652
|
-
const
|
|
3653
|
-
|
|
3657
|
+
const E = s?.activeChart();
|
|
3658
|
+
W(E.resolution()), s.resetCache(), E.resetData(), E && E.onDataLoaded().subscribe(
|
|
3654
3659
|
null,
|
|
3655
3660
|
async () => {
|
|
3656
|
-
const { data:
|
|
3657
|
-
(
|
|
3658
|
-
),
|
|
3659
|
-
o:
|
|
3660
|
-
h:
|
|
3661
|
-
l:
|
|
3662
|
-
c:
|
|
3663
|
-
timestamp:
|
|
3661
|
+
const { data: I } = await E.exportData(), U = nt(d), ne = (r?.timestamp ?? 0) / 1e3, $ = ne - ne % U, b = I.findIndex(
|
|
3662
|
+
(l) => l[0] === $
|
|
3663
|
+
), G = I.slice(b - 49, b + 1).map((l) => ({
|
|
3664
|
+
o: l[1],
|
|
3665
|
+
h: l[2],
|
|
3666
|
+
l: l[3],
|
|
3667
|
+
c: l[4],
|
|
3668
|
+
timestamp: l[0] * 1e3
|
|
3664
3669
|
}));
|
|
3665
|
-
if (
|
|
3666
|
-
const
|
|
3667
|
-
o:
|
|
3668
|
-
h:
|
|
3669
|
-
l:
|
|
3670
|
-
c:
|
|
3671
|
-
timestamp:
|
|
3672
|
-
},
|
|
3673
|
-
(
|
|
3674
|
-
)?.session || "24x7",
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
),
|
|
3680
|
-
o:
|
|
3681
|
-
h:
|
|
3682
|
-
l:
|
|
3683
|
-
c:
|
|
3684
|
-
timestamp:
|
|
3670
|
+
if (h) {
|
|
3671
|
+
const l = I[I.length - 1], y = {
|
|
3672
|
+
o: l[1],
|
|
3673
|
+
h: l[2],
|
|
3674
|
+
l: l[3],
|
|
3675
|
+
c: l[4],
|
|
3676
|
+
timestamp: l[0] * 1e3
|
|
3677
|
+
}, A = E.resolution(), T = Ce(A) * 1e3, F = y.timestamp, J = r?.timestamp ?? 0, S = Math.floor(J / T) * T, X = pt.find(
|
|
3678
|
+
(H) => H.ticker === u || H.display_name === u
|
|
3679
|
+
)?.session || "24x7", M = Or(
|
|
3680
|
+
F,
|
|
3681
|
+
S,
|
|
3682
|
+
A,
|
|
3683
|
+
X
|
|
3684
|
+
), v = I.slice(-50).map((H) => ({
|
|
3685
|
+
o: H[1],
|
|
3686
|
+
h: H[2],
|
|
3687
|
+
l: H[3],
|
|
3688
|
+
c: H[4],
|
|
3689
|
+
timestamp: H[0] * 1e3
|
|
3685
3690
|
}));
|
|
3686
|
-
|
|
3687
|
-
const
|
|
3688
|
-
|
|
3689
|
-
|
|
3691
|
+
Q(M), k(v);
|
|
3692
|
+
const K = { newsTargetCandle: v, gapCount: M };
|
|
3693
|
+
D.current = K, P.current && (w.current?.contentWindow?.postMessage(
|
|
3694
|
+
D.current,
|
|
3690
3695
|
"*"
|
|
3691
|
-
),
|
|
3696
|
+
), D.current = null);
|
|
3692
3697
|
} else {
|
|
3693
|
-
|
|
3694
|
-
const
|
|
3695
|
-
newsTargetCandle:
|
|
3698
|
+
k(G), Q(0);
|
|
3699
|
+
const l = {
|
|
3700
|
+
newsTargetCandle: G,
|
|
3696
3701
|
gapCount: 0
|
|
3697
3702
|
};
|
|
3698
|
-
|
|
3699
|
-
|
|
3703
|
+
D.current = l, P.current && (w.current?.contentWindow?.postMessage(
|
|
3704
|
+
D.current,
|
|
3700
3705
|
"*"
|
|
3701
|
-
),
|
|
3706
|
+
), D.current = null);
|
|
3702
3707
|
}
|
|
3703
3708
|
},
|
|
3704
3709
|
!0
|
|
@@ -3708,15 +3713,15 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3708
3713
|
}, [
|
|
3709
3714
|
t,
|
|
3710
3715
|
r?.timestamp,
|
|
3716
|
+
k,
|
|
3711
3717
|
W,
|
|
3712
|
-
|
|
3713
|
-
X,
|
|
3714
|
-
l,
|
|
3715
|
-
_,
|
|
3716
|
-
C,
|
|
3718
|
+
Q,
|
|
3717
3719
|
d,
|
|
3720
|
+
h,
|
|
3721
|
+
g,
|
|
3722
|
+
u,
|
|
3718
3723
|
s,
|
|
3719
|
-
|
|
3724
|
+
D
|
|
3720
3725
|
]), /* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__container", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_detail_page__right_border", children: [
|
|
3721
3726
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__title_container", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_detail_page__title_padding", children: [
|
|
3722
3727
|
/* @__PURE__ */ m.jsx(
|
|
@@ -3724,30 +3729,30 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3724
3729
|
{
|
|
3725
3730
|
type: "button",
|
|
3726
3731
|
className: "news-widget__button news-widget__button--ghost news-widget__button--icon news-widget_detail_page__back_button",
|
|
3727
|
-
onClick:
|
|
3728
|
-
children: /* @__PURE__ */ m.jsx(
|
|
3732
|
+
onClick: R,
|
|
3733
|
+
children: /* @__PURE__ */ m.jsx(Cr, { className: "news-widget_detail_page__back_icon" })
|
|
3729
3734
|
}
|
|
3730
3735
|
),
|
|
3731
3736
|
/* @__PURE__ */ m.jsx("p", { className: "news-widget_detail_page__title_text", children: "Economic Calendar Analysis" })
|
|
3732
3737
|
] }) }),
|
|
3733
|
-
/* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__event_details", children: /* @__PURE__ */ m.jsxs(
|
|
3738
|
+
/* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__event_details", children: /* @__PURE__ */ m.jsxs(Nr, { newsDetail: o, children: [
|
|
3734
3739
|
e,
|
|
3735
|
-
|
|
3740
|
+
h && /* @__PURE__ */ m.jsx(
|
|
3736
3741
|
Pr,
|
|
3737
3742
|
{
|
|
3738
3743
|
replayTabId: t || "news",
|
|
3739
|
-
futureBarsRef:
|
|
3740
|
-
highlightBarsRef:
|
|
3744
|
+
futureBarsRef: _,
|
|
3745
|
+
highlightBarsRef: L,
|
|
3741
3746
|
pushBar: p,
|
|
3742
|
-
tvWidgetRef:
|
|
3743
|
-
resolution:
|
|
3744
|
-
symbol:
|
|
3747
|
+
tvWidgetRef: N,
|
|
3748
|
+
resolution: d || "15",
|
|
3749
|
+
symbol: u,
|
|
3745
3750
|
resolvedTheme: i
|
|
3746
3751
|
}
|
|
3747
3752
|
)
|
|
3748
3753
|
] }) })
|
|
3749
3754
|
] }) });
|
|
3750
|
-
},
|
|
3755
|
+
}, Ne = "https://widget-result-news.iccandle.ai", Ht = "https://corprate-widget.iccandle.ai/news", Fr = ({
|
|
3751
3756
|
chartWidget: e,
|
|
3752
3757
|
children: t,
|
|
3753
3758
|
widgetKey: n,
|
|
@@ -3757,194 +3762,201 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3757
3762
|
theme: o,
|
|
3758
3763
|
symbolMapper: a,
|
|
3759
3764
|
analyzeCallback: f,
|
|
3760
|
-
pushBar:
|
|
3761
|
-
futureRef:
|
|
3762
|
-
highlightBarsRef:
|
|
3763
|
-
setGapCountExternal:
|
|
3764
|
-
setReplayModeExternal:
|
|
3765
|
+
pushBar: u,
|
|
3766
|
+
futureRef: d,
|
|
3767
|
+
highlightBarsRef: h,
|
|
3768
|
+
setGapCountExternal: g,
|
|
3769
|
+
setReplayModeExternal: R,
|
|
3770
|
+
setPlayEndTimestampExternal: p
|
|
3765
3771
|
}) => {
|
|
3766
|
-
const { start:
|
|
3772
|
+
const { start: w } = Un(), [_, D] = de(""), [P, L] = de(i), [x, B] = de(r), [V, N] = de(i), [ae, W] = de(r), [k, Q] = de(null), [Y, Z] = de(
|
|
3767
3773
|
null
|
|
3768
|
-
),
|
|
3769
|
-
setNewsSelectedCandles:
|
|
3770
|
-
setNewsPlayEndTimestamp:
|
|
3771
|
-
newsTargetCandle:
|
|
3772
|
-
gapCount:
|
|
3773
|
-
} =
|
|
3774
|
-
|
|
3775
|
-
if (
|
|
3776
|
-
if (
|
|
3777
|
-
|
|
3774
|
+
), E = me(null), I = me(!1), {
|
|
3775
|
+
setNewsSelectedCandles: U,
|
|
3776
|
+
setNewsPlayEndTimestamp: ne,
|
|
3777
|
+
newsTargetCandle: $,
|
|
3778
|
+
gapCount: b
|
|
3779
|
+
} = Re(), G = me(null), l = lr[P] || "M15", y = nt("60"), A = Y?.[0]?.timestamp ? Y?.[0]?.timestamp / 1e3 : 0, T = A - A % y, F = Y?.[0]?.candleData.H1?.candles, J = F?.findIndex((z) => z.timestamp === T) || 0, X = (F?.length || 0) - J <= 10, M = !X, v = !!_ && !M, K = me(v), H = me(!1);
|
|
3780
|
+
_e(() => {
|
|
3781
|
+
if (v !== K.current) {
|
|
3782
|
+
if (K.current = v, H.current) {
|
|
3783
|
+
H.current = !1;
|
|
3778
3784
|
return;
|
|
3779
3785
|
}
|
|
3780
|
-
|
|
3786
|
+
w();
|
|
3781
3787
|
}
|
|
3782
|
-
}, [
|
|
3783
|
-
const
|
|
3784
|
-
const { data:
|
|
3785
|
-
`${
|
|
3788
|
+
}, [v, w]), _e(() => {
|
|
3789
|
+
const z = async (O) => {
|
|
3790
|
+
const { data: q, status: te } = await j.get(
|
|
3791
|
+
`${Ht}/${O}`,
|
|
3786
3792
|
{
|
|
3787
3793
|
headers: { "api-key": n },
|
|
3788
3794
|
params: { symbol: r }
|
|
3789
3795
|
}
|
|
3790
3796
|
);
|
|
3791
|
-
return
|
|
3792
|
-
},
|
|
3793
|
-
const { data:
|
|
3794
|
-
`${
|
|
3797
|
+
return te !== 200 ? (console.error("Failed to fetch news detail"), null) : q;
|
|
3798
|
+
}, ee = async (O) => {
|
|
3799
|
+
const { data: q, status: te } = await j.get(
|
|
3800
|
+
`${Ht}/similar-details`,
|
|
3795
3801
|
{
|
|
3796
3802
|
headers: { "api-key": n },
|
|
3797
|
-
params: { event_id:
|
|
3803
|
+
params: { event_id: O }
|
|
3798
3804
|
}
|
|
3799
3805
|
);
|
|
3800
|
-
return
|
|
3806
|
+
return te !== 200 ? (console.error("Failed to fetch compared news"), null) : q;
|
|
3801
3807
|
};
|
|
3802
3808
|
(async () => {
|
|
3803
|
-
if (
|
|
3804
|
-
const [
|
|
3805
|
-
|
|
3806
|
-
|
|
3809
|
+
if (_ === "") return;
|
|
3810
|
+
const [O, q] = await Promise.all([
|
|
3811
|
+
z(_),
|
|
3812
|
+
ee(_)
|
|
3807
3813
|
]);
|
|
3808
|
-
|
|
3814
|
+
O && Q(O), q && Z(q);
|
|
3809
3815
|
})();
|
|
3810
|
-
}, [n,
|
|
3811
|
-
const re =
|
|
3812
|
-
|
|
3816
|
+
}, [n, _, r]);
|
|
3817
|
+
const re = He(() => {
|
|
3818
|
+
R(!1), g(0), p(null), U(null), ne(null);
|
|
3813
3819
|
}, [
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
+
R,
|
|
3821
|
+
g,
|
|
3822
|
+
U,
|
|
3823
|
+
ne,
|
|
3824
|
+
p
|
|
3825
|
+
]), fe = He(() => {
|
|
3826
|
+
D(""), B(r), re();
|
|
3820
3827
|
}, [r, re]);
|
|
3821
|
-
|
|
3822
|
-
const
|
|
3823
|
-
if (
|
|
3824
|
-
const
|
|
3825
|
-
if (
|
|
3826
|
-
|
|
3827
|
-
else if (
|
|
3828
|
+
_e(() => {
|
|
3829
|
+
const z = async ({ origin: ee, data: le }) => {
|
|
3830
|
+
if (ee !== Ne || typeof le != "string") return;
|
|
3831
|
+
const O = JSON.parse(le);
|
|
3832
|
+
if (O.action == "back")
|
|
3833
|
+
fe();
|
|
3834
|
+
else if (O.action == "back-to-similar-events")
|
|
3828
3835
|
re();
|
|
3829
|
-
else if (
|
|
3830
|
-
|
|
3831
|
-
const
|
|
3832
|
-
await e?.headerReady(),
|
|
3836
|
+
else if (O.action == "eventClicked") {
|
|
3837
|
+
H.current = !0, w();
|
|
3838
|
+
const te = O.data.event, we = e?.activeChart();
|
|
3839
|
+
await e?.headerReady(), we?.clearMarks(2), localStorage.setItem(
|
|
3833
3840
|
"iccandle:current-news-event",
|
|
3834
3841
|
JSON.stringify({
|
|
3835
|
-
actual:
|
|
3836
|
-
event_name:
|
|
3837
|
-
forecast:
|
|
3838
|
-
id:
|
|
3839
|
-
metric:
|
|
3840
|
-
previous:
|
|
3841
|
-
timestamp:
|
|
3842
|
-
currency:
|
|
3842
|
+
actual: te.actual,
|
|
3843
|
+
event_name: te.event_name,
|
|
3844
|
+
forecast: te.forecast,
|
|
3845
|
+
id: te.id,
|
|
3846
|
+
metric: te.metric,
|
|
3847
|
+
previous: te.previous,
|
|
3848
|
+
timestamp: te.timestamp,
|
|
3849
|
+
currency: te.currency
|
|
3843
3850
|
})
|
|
3844
|
-
),
|
|
3845
|
-
} else if (
|
|
3846
|
-
const
|
|
3847
|
-
if (
|
|
3848
|
-
|
|
3849
|
-
const
|
|
3850
|
-
(
|
|
3851
|
+
), we?.refreshMarks(), N(P), W(x), D(te.id);
|
|
3852
|
+
} else if (O.action == "intervalChanged" || O.action == "symbolChanged") {
|
|
3853
|
+
const q = O.data;
|
|
3854
|
+
if (q.type === 2) return;
|
|
3855
|
+
q.resolution && L(q.resolution);
|
|
3856
|
+
const te = pt.find(
|
|
3857
|
+
(we) => we.display_name == q.symbol || we.ticker == q.symbol
|
|
3851
3858
|
)?.ticker || "XAU_USD";
|
|
3852
|
-
|
|
3853
|
-
} else if (
|
|
3854
|
-
if (
|
|
3855
|
-
const
|
|
3856
|
-
|
|
3857
|
-
|
|
3859
|
+
B(te);
|
|
3860
|
+
} else if (O.action == "replay") {
|
|
3861
|
+
if (M) return;
|
|
3862
|
+
const q = O.data;
|
|
3863
|
+
q.isReplay == !1 ? p(null) : p(
|
|
3864
|
+
(k?.event.timestamp ?? 0) / 1e3
|
|
3865
|
+
), R(q.isReplay), g(b), U(q.selectedCandles), ne(
|
|
3866
|
+
$?.[$.length - 1]?.timestamp ?? null
|
|
3858
3867
|
);
|
|
3859
|
-
} else
|
|
3860
|
-
|
|
3868
|
+
} else O.action == "iframe-ready" ? (I.current = !0, E.current?.contentWindow?.postMessage(
|
|
3869
|
+
G.current,
|
|
3861
3870
|
"*"
|
|
3862
|
-
),
|
|
3871
|
+
), G.current = null) : O.action == "analyze" && f();
|
|
3863
3872
|
};
|
|
3864
|
-
return window.addEventListener("message",
|
|
3873
|
+
return window.addEventListener("message", z), () => window.removeEventListener("message", z);
|
|
3865
3874
|
}, [
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3875
|
+
M,
|
|
3876
|
+
$,
|
|
3877
|
+
k,
|
|
3878
|
+
b,
|
|
3869
3879
|
e,
|
|
3870
3880
|
r,
|
|
3871
|
-
|
|
3881
|
+
w,
|
|
3872
3882
|
re,
|
|
3873
|
-
|
|
3883
|
+
fe,
|
|
3874
3884
|
a,
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
v,
|
|
3879
|
-
S,
|
|
3880
|
-
E,
|
|
3881
|
-
C,
|
|
3885
|
+
G,
|
|
3886
|
+
N,
|
|
3887
|
+
W,
|
|
3882
3888
|
x,
|
|
3883
|
-
|
|
3889
|
+
P,
|
|
3890
|
+
R,
|
|
3891
|
+
g,
|
|
3892
|
+
p,
|
|
3893
|
+
ne,
|
|
3894
|
+
U,
|
|
3884
3895
|
f
|
|
3885
3896
|
]);
|
|
3886
|
-
const
|
|
3887
|
-
const
|
|
3888
|
-
return
|
|
3889
|
-
`next_pip_up_${
|
|
3890
|
-
`next_pip_down_${
|
|
3897
|
+
const ce = ve(() => {
|
|
3898
|
+
const z = Y?.[0]?.candleData?.[l]?.metadata;
|
|
3899
|
+
return z ? [...wn].sort((ee, le) => le - ee).find((ee) => [
|
|
3900
|
+
`next_pip_up_${ee}`,
|
|
3901
|
+
`next_pip_down_${ee}`
|
|
3891
3902
|
].some(
|
|
3892
|
-
(
|
|
3903
|
+
(O) => z[O] !== void 0
|
|
3893
3904
|
)) ?? null : null;
|
|
3894
|
-
}, [
|
|
3895
|
-
|
|
3896
|
-
const
|
|
3897
|
-
|
|
3905
|
+
}, [Y, l]);
|
|
3906
|
+
_e(() => {
|
|
3907
|
+
const z = () => {
|
|
3908
|
+
fe();
|
|
3898
3909
|
};
|
|
3899
|
-
return window.addEventListener("popstate",
|
|
3900
|
-
}, [
|
|
3901
|
-
const
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3910
|
+
return window.addEventListener("popstate", z), () => window.removeEventListener("popstate", z);
|
|
3911
|
+
}, [fe]);
|
|
3912
|
+
const ue = ve(() => _ ? Y ? M ? `${Ne}/${_}?apiKey=${n}&userId=${s}&theme=${o}&interval=${V}&symbol=${ae}` : `${Ne}/similar-events/${_}?apiKey=${n}&userId=${s}&theme=${o}` : `${Ne}?apiKey=${n}&userId=${s}&theme=${o}` : `${Ne}?apiKey=${n}&userId=${s}&theme=${o}`, [
|
|
3913
|
+
_,
|
|
3914
|
+
Y,
|
|
3915
|
+
M,
|
|
3905
3916
|
n,
|
|
3906
3917
|
o,
|
|
3907
3918
|
s,
|
|
3908
|
-
|
|
3909
|
-
|
|
3919
|
+
V,
|
|
3920
|
+
ae
|
|
3910
3921
|
]);
|
|
3911
3922
|
return /* @__PURE__ */ m.jsxs("div", { className: "news-widget_main__container news-widget_main__container--lg", children: [
|
|
3912
3923
|
/* @__PURE__ */ m.jsx(
|
|
3913
3924
|
"div",
|
|
3914
3925
|
{
|
|
3915
3926
|
className: "news-widget_main__left",
|
|
3916
|
-
style: { display:
|
|
3927
|
+
style: { display: _ && !M ? "flex" : "none" },
|
|
3917
3928
|
children: /* @__PURE__ */ m.jsx(
|
|
3918
|
-
|
|
3929
|
+
ur,
|
|
3919
3930
|
{
|
|
3920
|
-
selectedTimeframe:
|
|
3921
|
-
setSelectedTimeframe:
|
|
3922
|
-
currentSymbol:
|
|
3923
|
-
setCurrentSymbol:
|
|
3931
|
+
selectedTimeframe: P,
|
|
3932
|
+
setSelectedTimeframe: L,
|
|
3933
|
+
currentSymbol: x,
|
|
3934
|
+
setCurrentSymbol: B,
|
|
3924
3935
|
children: /* @__PURE__ */ m.jsx(
|
|
3925
|
-
|
|
3936
|
+
kr,
|
|
3926
3937
|
{
|
|
3927
|
-
eventId:
|
|
3938
|
+
eventId: _,
|
|
3928
3939
|
chartWidget: e,
|
|
3929
3940
|
widgetKey: n,
|
|
3930
3941
|
theme: o,
|
|
3931
3942
|
defaultSymbol: r,
|
|
3932
|
-
newsDetail:
|
|
3933
|
-
isUpcoming:
|
|
3934
|
-
event:
|
|
3935
|
-
selectedCandles:
|
|
3936
|
-
currentTimeFrame:
|
|
3937
|
-
currentSymbol:
|
|
3938
|
-
onBack:
|
|
3939
|
-
isElapsed:
|
|
3940
|
-
iframeRef:
|
|
3941
|
-
pendingMessageRef:
|
|
3942
|
-
iframeReadyToListenRef:
|
|
3943
|
-
pushBar:
|
|
3944
|
-
futureRef:
|
|
3945
|
-
highlightBarsRef:
|
|
3946
|
-
setReplayModeExternal:
|
|
3947
|
-
setGapCountExternal:
|
|
3943
|
+
newsDetail: k,
|
|
3944
|
+
isUpcoming: X,
|
|
3945
|
+
event: k?.event,
|
|
3946
|
+
selectedCandles: ce,
|
|
3947
|
+
currentTimeFrame: P,
|
|
3948
|
+
currentSymbol: x,
|
|
3949
|
+
onBack: fe,
|
|
3950
|
+
isElapsed: M,
|
|
3951
|
+
iframeRef: E,
|
|
3952
|
+
pendingMessageRef: G,
|
|
3953
|
+
iframeReadyToListenRef: I,
|
|
3954
|
+
pushBar: u,
|
|
3955
|
+
futureRef: d,
|
|
3956
|
+
highlightBarsRef: h,
|
|
3957
|
+
setReplayModeExternal: R,
|
|
3958
|
+
setGapCountExternal: g,
|
|
3959
|
+
setPlayEndTimestampExternal: p,
|
|
3948
3960
|
children: t
|
|
3949
3961
|
}
|
|
3950
3962
|
)
|
|
@@ -3955,26 +3967,26 @@ const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3955
3967
|
/* @__PURE__ */ m.jsx(
|
|
3956
3968
|
"iframe",
|
|
3957
3969
|
{
|
|
3958
|
-
src:
|
|
3959
|
-
ref:
|
|
3960
|
-
className:
|
|
3970
|
+
src: ue,
|
|
3971
|
+
ref: E,
|
|
3972
|
+
className: _ && !M ? "news-widget_main__iframe_half" : "news-widget_main__iframe_full"
|
|
3961
3973
|
}
|
|
3962
3974
|
)
|
|
3963
3975
|
] });
|
|
3964
|
-
},
|
|
3965
|
-
function
|
|
3976
|
+
}, jr = "https://api.iccandle.ai", Br = '"Inter Tight", ui-sans-serif, system-ui, sans-serif';
|
|
3977
|
+
function It(e) {
|
|
3966
3978
|
return {
|
|
3967
3979
|
iccandle_primary: e.iccandle_primary,
|
|
3968
3980
|
iccandle_border: e.iccandle_border,
|
|
3969
3981
|
iccandle_text: e.iccandle_text,
|
|
3970
3982
|
iccandle_background: e.iccandle_background,
|
|
3971
3983
|
iccandle_primary_gradient_end: e.iccandle_primary_gradient_end,
|
|
3972
|
-
iccandle_font: e.icc_font ?? e.iccandle_font ??
|
|
3984
|
+
iccandle_font: e.icc_font ?? e.iccandle_font ?? Br
|
|
3973
3985
|
};
|
|
3974
3986
|
}
|
|
3975
|
-
const
|
|
3987
|
+
const Yr = async (e) => {
|
|
3976
3988
|
const t = await fetch(
|
|
3977
|
-
`${
|
|
3989
|
+
`${jr}/corporate-client/v1/widgetStyle/search/user/?service_type=news`,
|
|
3978
3990
|
{ headers: { "api-key": e } }
|
|
3979
3991
|
);
|
|
3980
3992
|
if (!t.ok)
|
|
@@ -3982,10 +3994,10 @@ const Br = async (e) => {
|
|
|
3982
3994
|
const n = await t.json();
|
|
3983
3995
|
return {
|
|
3984
3996
|
...n,
|
|
3985
|
-
dark:
|
|
3986
|
-
light:
|
|
3997
|
+
dark: It(n.dark),
|
|
3998
|
+
light: It(n.light)
|
|
3987
3999
|
};
|
|
3988
|
-
},
|
|
4000
|
+
}, $t = {
|
|
3989
4001
|
iccandle_font: "--iccandle-font",
|
|
3990
4002
|
iccandle_primary: "--iccandle-primary",
|
|
3991
4003
|
iccandle_border: "--iccandle-border",
|
|
@@ -3993,32 +4005,32 @@ const Br = async (e) => {
|
|
|
3993
4005
|
iccandle_background: "--iccandle-background",
|
|
3994
4006
|
iccandle_primary_gradient_end: "--iccandle-primary-gradient-end"
|
|
3995
4007
|
};
|
|
3996
|
-
function
|
|
3997
|
-
const [n, s] =
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
s(
|
|
4008
|
+
function Mr(e, t) {
|
|
4009
|
+
const [n, s] = de(null);
|
|
4010
|
+
_e(() => {
|
|
4011
|
+
Yr(e).then((u) => {
|
|
4012
|
+
s(u);
|
|
4001
4013
|
});
|
|
4002
4014
|
}, [e]);
|
|
4003
|
-
const r =
|
|
4015
|
+
const r = me(null), [i, o] = de(null), a = ve(() => t === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : t, [t]), f = ve(() => {
|
|
4004
4016
|
if (n)
|
|
4005
4017
|
return a === "dark" ? n.dark : n.light;
|
|
4006
4018
|
}, [n, a]);
|
|
4007
|
-
return
|
|
4019
|
+
return _e(() => {
|
|
4008
4020
|
if (typeof window > "u" || !f || !i) return;
|
|
4009
|
-
const
|
|
4010
|
-
Object.keys(
|
|
4011
|
-
(
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
f[
|
|
4021
|
+
const u = i;
|
|
4022
|
+
Object.keys($t).forEach(
|
|
4023
|
+
(d) => {
|
|
4024
|
+
u.style.setProperty(
|
|
4025
|
+
$t[d],
|
|
4026
|
+
f[d]
|
|
4015
4027
|
);
|
|
4016
4028
|
}
|
|
4017
4029
|
);
|
|
4018
4030
|
}, [f, i]), { rootRef: r, setRootEl: o, resolvedTheme: a };
|
|
4019
4031
|
}
|
|
4020
|
-
const
|
|
4021
|
-
const { rootRef: t, setRootEl: n, resolvedTheme: s } =
|
|
4032
|
+
const ai = (e) => {
|
|
4033
|
+
const { rootRef: t, setRootEl: n, resolvedTheme: s } = Mr(
|
|
4022
4034
|
e.widgetKey,
|
|
4023
4035
|
e.theme
|
|
4024
4036
|
);
|
|
@@ -4029,10 +4041,10 @@ const oi = (e) => {
|
|
|
4029
4041
|
t.current = r, n(r);
|
|
4030
4042
|
},
|
|
4031
4043
|
className: `news-widget__container news-widget ${s === "dark" ? "dark" : ""}`,
|
|
4032
|
-
children: /* @__PURE__ */ m.jsx(Tn, { theme: s, children: /* @__PURE__ */ m.jsx(
|
|
4044
|
+
children: /* @__PURE__ */ m.jsx(Tn, { theme: s, children: /* @__PURE__ */ m.jsx(Fr, { ...e, children: e.children }) })
|
|
4033
4045
|
}
|
|
4034
4046
|
);
|
|
4035
4047
|
};
|
|
4036
4048
|
export {
|
|
4037
|
-
|
|
4049
|
+
ai as NewsWidget
|
|
4038
4050
|
};
|