react-luminus-components 2.0.3-beta.r19-18 → 2.0.4-table
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +349 -349
- package/dist/.vite/manifest.json +46 -52
- package/dist/FormDisabledProvider-1MOB6N34.cjs +1 -0
- package/dist/FormDisabledProvider-CHZ2m_zJ.js +40 -0
- package/dist/ShortcutLinksContext-DEirK-v9.js +39884 -0
- package/dist/ShortcutLinksContext-DLi4B8z5.cjs +334 -0
- package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +3 -6
- package/dist/components/Documents/components/DocumentsModals/components/CreateFolderModal/hooks/useDocCreateFolderForm.d.ts +1 -4
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/hooks/useEditFileForm.d.ts +1 -6
- package/dist/components/Documents/hooks/useDocumentsReducer.d.ts +1 -1
- package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +3 -6
- package/dist/components/Dropdown/comps/UserAvatarToggle/UserAvatarToggle.d.ts +1 -3
- package/dist/components/Flexmonster/Flexmonster.d.ts +1 -1
- package/dist/components/Flexmonster/hooks/useReportVersionApi.d.ts +1 -1
- package/dist/components/Flexmonster/utils/flexMonsterUtils.d.ts +1 -1
- package/dist/components/HookForm/MiniDetailWrapper/MiniDetailWrapper.d.ts +1 -1
- package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +17 -4
- package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +38 -7
- package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +38 -8
- package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +38 -8
- package/dist/components/NotifCenter/Actions/NotificationActions.d.ts +3 -3
- package/dist/components/NotifCenter/Actions/components/HistoryTable/NotificationHistoryTable.d.ts +1 -1
- package/dist/components/NotifCenter/Actions/types/NotificationHistoryTableModel.d.ts +5 -0
- package/dist/components/ResponsiveContextDropdown/components/ResponsiveContextDropdownItem/ResponsiveContextDropdownItem.d.ts +1 -1
- package/dist/components/ResponsiveContextDropdown/hooks/useReponsiveContextDropdownHelpers.d.ts +2 -2
- package/dist/components/ResponsiveContextDropdown/utils/responsiveContextDropdownUtils.d.ts +1 -1
- package/dist/components/Tooltip/HtmlTooltip/HtmlTooltip.d.ts +2 -2
- package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +1 -1
- package/dist/components/common/AuthTemplate/AuthTemplate.d.ts +1 -1
- package/dist/components/common/ColumnResizer/ColumnResizer.d.ts +1 -1
- package/dist/components/common/DisabledRowLabelLink/DisabledRowLabelLink.d.ts +1 -1
- package/dist/components/common/ErrorBoundary/ErrorBoundary.d.ts +3 -7
- package/dist/components/common/FromToDatePicker/components/FromToDatePickerDropdownToggle/FromToDatePickerDropdownToggle.d.ts +1 -3
- package/dist/components/common/LineChart/comps/LineChartTooltip/LineChartTooltip.d.ts +2 -2
- package/dist/components/common/PermissionsSubstitute/Detail/hooks/useSubstDetailForm.d.ts +1 -8
- package/dist/components/common/QrCode/QrCode.d.ts +1 -1
- package/dist/components/common/RouteLink/RouteLink.d.ts +1 -1
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +1 -1
- package/dist/components/common/StrictModeDroppable/StrictModeDroppable.d.ts +5 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +941 -542
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useAxios/useAxios.d.ts +2 -5
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +1 -1
- package/dist/hooks/useGetApiDataBound/useGetApiDataBound.d.ts +0 -3
- package/dist/hooks/useGetDataBound/useGetDataBound.d.ts +2 -4
- package/dist/hooks/useScrollSave/useScrollSave.d.ts +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +136 -206
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +142 -278
- package/dist/localStorageUtils-89Gfn6XS.cjs +1 -0
- package/dist/{localStorageUtils-CZ4HDRzi.js → localStorageUtils-DdeuyghB.js} +8 -18
- package/dist/main.cjs.js +183 -21
- package/dist/main.es.js +11492 -11359
- package/dist/models/prop-types/InputContainerProps.d.ts +12 -4
- package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +1 -1
- package/dist/models/prop-types/InputProps/InputBaseProps.d.ts +2 -4
- package/dist/models/prop-types/InputProps/NumericInputProps.d.ts +1 -1
- package/dist/models/prop-types/InputProps/TextInputProps.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/useLocalStorageState-B-CRodSS.cjs +1 -0
- package/dist/useLocalStorageState-BPYqQMTu.js +78 -0
- package/dist/useRenderDraggableInPortal-D0OLp7Qb.js +78 -0
- package/dist/useRenderDraggableInPortal-QPCaw-E_.cjs +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/route/apiPathUtils.d.ts +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +159 -133
- package/dist/variables.scss +165 -165
- package/package.json +123 -128
- package/dist/FormDisabledProvider-Bi6oyt5U.js +0 -51
- package/dist/FormDisabledProvider-D5KzXgMJ.cjs +0 -1
- package/dist/components/common/HomeDashboard/comps/HomeDashboardWidget/HomeDashboardWidget.d.ts +0 -15
- package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/PhotoPreviews.d.ts +0 -15
- package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/PhotoPreview.d.ts +0 -14
- package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/comps/PreviewShadow/PreviewShadow.d.ts +0 -5
- package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/PhotoPreview/comps/index.d.ts +0 -1
- package/dist/components/common/PhotoLightbox/comps/PhotoPreviews/comps/index.d.ts +0 -1
- package/dist/components/common/PhotoLightbox/comps/index.d.ts +0 -1
- package/dist/hooks/useIsFormDirty/useIsFormDirty.d.ts +0 -7
- package/dist/localStorageUtils-CkZslzIU.cjs +0 -1
- package/dist/models/bntTable/IBnfTableDefColumn.d.ts +0 -40
- package/dist/models/ui/notifications/NotificationHistoryTableModel.d.ts +0 -6
- package/dist/nivo-bar-BQGSJTnK.js +0 -41890
- package/dist/nivo-bar-DcaMZ1K9.cjs +0 -326
- package/dist/useIsFormDirty-BQU8CwxF.cjs +0 -1
- package/dist/useIsFormDirty-uSOXZ5g6.js +0 -123
- package/dist/useLocalStorageState-Ccq9rFKj.js +0 -95
- package/dist/useLocalStorageState-aCjv2MC6.cjs +0 -1
package/dist/contexts.es.js
CHANGED
|
@@ -1,601 +1,1000 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import "@
|
|
8
|
-
import "react
|
|
1
|
+
var Ee = Object.defineProperty;
|
|
2
|
+
var Oe = (e, t, n) => t in e ? Ee(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var E = (e, t, n) => Oe(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { t as N, bF as we, j as d, bG as De, P as z, bo as Pe, bH as me, $ as O, bg as ke, Q as G, bI as je, aX as Ie, aw as Me, aq as pe, bi as he, at as I, as as Le, bJ as He, aP as oe, bK as _e, ab as ye, bL as ae, bM as $e, aR as Re, af as Ue, a1 as Ne } from "./ShortcutLinksContext-DEirK-v9.js";
|
|
5
|
+
import { bN as Bt, bd as Yt } from "./ShortcutLinksContext-DEirK-v9.js";
|
|
6
|
+
import D, { useState as S, useCallback as h, useMemo as T, useContext as _, useEffect as j, useRef as te, Component as re } from "react";
|
|
7
|
+
import { EventType as W, InteractionRequiredAuthError as Fe } from "@azure/msal-browser";
|
|
8
|
+
import { MsalProvider as qe } from "@azure/msal-react";
|
|
9
|
+
import "react-router-dom";
|
|
9
10
|
import "react-dom";
|
|
10
11
|
import "react-hook-form";
|
|
11
12
|
import "react-flexmonster";
|
|
12
|
-
import { L as
|
|
13
|
-
import { F as
|
|
14
|
-
import { a as
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
return
|
|
13
|
+
import { L as Ge, b as ze } from "./FormDisabledProvider-CHZ2m_zJ.js";
|
|
14
|
+
import { F as Wt } from "./FormDisabledProvider-CHZ2m_zJ.js";
|
|
15
|
+
import { a as Ke, u as Ve } from "./useLocalStorageState-BPYqQMTu.js";
|
|
16
|
+
function Be(e) {
|
|
17
|
+
const t = N(e);
|
|
18
|
+
return t.setHours(23, 59, 59, 999), t;
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
20
|
+
function Ye() {
|
|
21
|
+
return Be(Date.now());
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
const
|
|
24
|
-
+
|
|
25
|
-
+
|
|
26
|
-
].sort((
|
|
27
|
-
return
|
|
23
|
+
function Je(e, t) {
|
|
24
|
+
const n = +N(e), [r, s] = [
|
|
25
|
+
+N(t.start),
|
|
26
|
+
+N(t.end)
|
|
27
|
+
].sort((o, l) => o - l);
|
|
28
|
+
return n >= r && n <= s;
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
30
|
+
function We() {
|
|
31
|
+
return we(Date.now());
|
|
31
32
|
}
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
showConfirm: m,
|
|
51
|
-
hideConfirm: r,
|
|
52
|
-
textSm: c
|
|
53
|
-
}, e[2] = n, e[3] = a, e[4] = c, e[5] = l) : l = e[5];
|
|
54
|
-
const f = l;
|
|
55
|
-
let i;
|
|
56
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ v(Fe, {}), e[6] = i) : i = e[6];
|
|
57
|
-
let S;
|
|
58
|
-
return e[7] !== u || e[8] !== f ? (S = /* @__PURE__ */ E(fe.Provider, { value: f, children: [
|
|
59
|
-
i,
|
|
60
|
-
u
|
|
61
|
-
] }), e[7] = u, e[8] = f, e[9] = S) : S = e[9], S;
|
|
62
|
-
}, Ie = () => {
|
|
63
|
-
const t = N.c(43), {
|
|
64
|
-
texts: e
|
|
65
|
-
} = R(X), {
|
|
66
|
-
confirm: u
|
|
67
|
-
} = e, {
|
|
68
|
-
isShown: n,
|
|
69
|
-
text: s,
|
|
70
|
-
onFinish: a
|
|
71
|
-
} = de(), {
|
|
72
|
-
options: o
|
|
73
|
-
} = R(ae), [c, g] = k(o.defaultValue ?? "");
|
|
74
|
-
let h;
|
|
75
|
-
t[0] !== a ? (h = () => {
|
|
76
|
-
a(null);
|
|
77
|
-
}, t[0] = a, t[1] = h) : h = t[1];
|
|
78
|
-
const m = h;
|
|
79
|
-
let d;
|
|
80
|
-
t[2] !== a || t[3] !== o.required || t[4] !== c ? (d = (I) => {
|
|
81
|
-
I.preventDefault(), !(o.required && !c) && (a(c), g(""));
|
|
82
|
-
}, t[2] = a, t[3] = o.required, t[4] = c, t[5] = d) : d = t[5];
|
|
83
|
-
const r = d;
|
|
84
|
-
let l;
|
|
85
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (l = (I) => g(I.currentTarget.value), t[6] = l) : l = t[6];
|
|
86
|
-
let f;
|
|
87
|
-
t[7] !== c ? (f = {
|
|
88
|
-
value: c,
|
|
89
|
-
onChange: l,
|
|
33
|
+
const Qe = ({ children: e }) => {
|
|
34
|
+
const [t, n] = S(!1), [r, s] = S(""), [o, l] = S(void 0), i = h((u, f) => {
|
|
35
|
+
n(!0), s(u), l(f);
|
|
36
|
+
}, []), c = h(() => {
|
|
37
|
+
n(!1);
|
|
38
|
+
}, []), a = T(() => ({ show: t, text: r, showConfirm: i, hideConfirm: c, textSm: o }), [t, r, i, c, o]);
|
|
39
|
+
return /* @__PURE__ */ d.jsxs(De.Provider, { value: a, children: [
|
|
40
|
+
/* @__PURE__ */ d.jsx(wt, {}),
|
|
41
|
+
e
|
|
42
|
+
] });
|
|
43
|
+
}, Xe = () => {
|
|
44
|
+
const { texts: { confirm: e } } = _(z), { isShown: t, text: n, onFinish: r } = Pe(), { options: s } = _(me), [o, l] = S(s.defaultValue ?? ""), i = h(() => {
|
|
45
|
+
r(null);
|
|
46
|
+
}, [r]), c = h((u) => {
|
|
47
|
+
u.preventDefault(), !(s.required && !o) && (r(o), l(""));
|
|
48
|
+
}, [r, s.required, o]), a = T(() => ({
|
|
49
|
+
value: o,
|
|
50
|
+
onChange: (u) => l(u.currentTarget.value),
|
|
90
51
|
className: "w-100",
|
|
91
52
|
autoFocus: !0,
|
|
92
53
|
tabIndex: 0
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
t
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
const [g, h] = k(c), m = oe($e);
|
|
144
|
-
let d;
|
|
145
|
-
e[1] === Symbol.for("react.memo_cache_sentinel") ? (d = (b) => {
|
|
146
|
-
o(b), s(!0);
|
|
147
|
-
}, e[1] = d) : d = e[1];
|
|
148
|
-
const r = d;
|
|
149
|
-
let l;
|
|
150
|
-
e[2] === Symbol.for("react.memo_cache_sentinel") ? (l = () => {
|
|
151
|
-
s(!1);
|
|
152
|
-
}, e[2] = l) : l = e[2];
|
|
153
|
-
const f = l;
|
|
154
|
-
let i;
|
|
155
|
-
e[3] !== n || e[4] !== g || e[5] !== a ? (i = {
|
|
156
|
-
isShown: n,
|
|
157
|
-
text: a,
|
|
158
|
-
showPrompt: r,
|
|
159
|
-
hidePrompt: f,
|
|
160
|
-
resolveRef: m,
|
|
161
|
-
options: g,
|
|
162
|
-
setOptions: h
|
|
163
|
-
}, e[3] = n, e[4] = g, e[5] = a, e[6] = i) : i = e[6];
|
|
164
|
-
const S = i;
|
|
165
|
-
let y;
|
|
166
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ v(Ie, {}), e[7] = y) : y = e[7];
|
|
167
|
-
let x;
|
|
168
|
-
return e[8] !== u || e[9] !== S ? (x = /* @__PURE__ */ E(ae.Provider, { value: S, children: [
|
|
169
|
-
u,
|
|
170
|
-
y
|
|
171
|
-
] }), e[8] = u, e[9] = S, e[10] = x) : x = e[10], x;
|
|
172
|
-
};
|
|
173
|
-
function $e() {
|
|
174
|
-
}
|
|
175
|
-
const tt = (t) => {
|
|
176
|
-
const e = N.c(14), {
|
|
177
|
-
cookieDomain: u,
|
|
178
|
-
axiosOptions: n,
|
|
179
|
-
language: s,
|
|
180
|
-
texts: a,
|
|
181
|
-
ProjectIconComponent: o,
|
|
182
|
-
localizationContext: c,
|
|
183
|
-
chartColorPalette: g,
|
|
184
|
-
children: h
|
|
185
|
-
} = t;
|
|
186
|
-
let m;
|
|
187
|
-
e[0] !== o || e[1] !== n || e[2] !== g || e[3] !== u || e[4] !== s || e[5] !== c || e[6] !== a ? (m = {
|
|
188
|
-
axiosOptions: n,
|
|
189
|
-
cookieDomain: u,
|
|
190
|
-
language: s,
|
|
191
|
-
texts: a,
|
|
192
|
-
ProjectIconComponent: o,
|
|
193
|
-
localizationContext: c,
|
|
194
|
-
chartColorPalette: g
|
|
195
|
-
}, e[0] = o, e[1] = n, e[2] = g, e[3] = u, e[4] = s, e[5] = c, e[6] = a, e[7] = m) : m = e[7];
|
|
196
|
-
const d = m;
|
|
197
|
-
let r;
|
|
198
|
-
e[8] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ v(he, {}), e[8] = r) : r = e[8];
|
|
199
|
-
let l;
|
|
200
|
-
e[9] !== h ? (l = /* @__PURE__ */ v(Ne, { children: /* @__PURE__ */ E(Ue, { children: [
|
|
54
|
+
}), [o]);
|
|
55
|
+
return j(() => {
|
|
56
|
+
t === !0 && l(s.defaultValue ?? "");
|
|
57
|
+
}, [t, s.defaultValue]), /* @__PURE__ */ d.jsxs(O, { show: t, size: "sm", centered: !0, onHide: i, children: [
|
|
58
|
+
/* @__PURE__ */ d.jsx(O.Header, { className: "justify-content-center", children: /* @__PURE__ */ d.jsx(O.Title, { children: n }) }),
|
|
59
|
+
/* @__PURE__ */ d.jsxs("form", { onSubmit: c, onKeyDown: (u) => u.stopPropagation(), children: [
|
|
60
|
+
/* @__PURE__ */ d.jsxs(O.Body, { children: [
|
|
61
|
+
s.input === "textarea" ? /* @__PURE__ */ d.jsx("textarea", { ...a, rows: 5 }) : void 0,
|
|
62
|
+
s.input === "input" ? /* @__PURE__ */ d.jsx(ke, { ...a, type: s.type }) : void 0
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ d.jsxs(O.Footer, { className: "w-100 d-flex gap-5", children: [
|
|
65
|
+
/* @__PURE__ */ d.jsx(G, { variant: "outlined", color: "secondary", onClick: i, className: "flex-grow-1", children: e.cancel }),
|
|
66
|
+
/* @__PURE__ */ d.jsx(G, { color: "primary", disabled: s.required && !o, type: "submit", className: "flex-grow-1", children: e.confirm })
|
|
67
|
+
] })
|
|
68
|
+
] })
|
|
69
|
+
] });
|
|
70
|
+
}, Ze = ({ children: e }) => {
|
|
71
|
+
const [t, n] = S(!1), [r, s] = S(""), [o, l] = S({ input: "textarea", type: "text" }), i = te(() => {
|
|
72
|
+
}), c = h((f) => {
|
|
73
|
+
s(f), n(!0);
|
|
74
|
+
}, []), a = h(() => {
|
|
75
|
+
n(!1);
|
|
76
|
+
}, []), u = T(() => ({
|
|
77
|
+
isShown: t,
|
|
78
|
+
text: r,
|
|
79
|
+
showPrompt: c,
|
|
80
|
+
hidePrompt: a,
|
|
81
|
+
resolveRef: i,
|
|
82
|
+
options: o,
|
|
83
|
+
setOptions: l
|
|
84
|
+
}), [t, r, c, a, o]);
|
|
85
|
+
return /* @__PURE__ */ d.jsxs(me.Provider, { value: u, children: [
|
|
86
|
+
e,
|
|
87
|
+
/* @__PURE__ */ d.jsx(Xe, {})
|
|
88
|
+
] });
|
|
89
|
+
}, Ut = ({ cookieDomain: e, axiosOptions: t, language: n, texts: r, ProjectIconComponent: s, localizationContext: o, chartColorPalette: l, children: i }) => {
|
|
90
|
+
const c = T(() => ({
|
|
91
|
+
axiosOptions: t,
|
|
92
|
+
cookieDomain: e,
|
|
93
|
+
language: n,
|
|
94
|
+
texts: r,
|
|
95
|
+
ProjectIconComponent: s,
|
|
96
|
+
localizationContext: o,
|
|
97
|
+
chartColorPalette: l
|
|
98
|
+
}), [
|
|
99
|
+
t,
|
|
100
|
+
e,
|
|
101
|
+
n,
|
|
102
|
+
s,
|
|
103
|
+
o,
|
|
201
104
|
r,
|
|
202
|
-
|
|
203
|
-
]
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
] }), e[11] = u, e[12] = r, e[13] = l, e[14] = f) : f = e[14], f;
|
|
237
|
-
}, ot = (t) => {
|
|
238
|
-
const e = N.c(41), {
|
|
239
|
-
children: u
|
|
240
|
-
} = t, n = Se(), {
|
|
241
|
-
msalInstance: s,
|
|
242
|
-
getToken: a
|
|
243
|
-
} = R(ie), {
|
|
244
|
-
delegation: o,
|
|
245
|
-
setDelegation: c,
|
|
246
|
-
setAvailableDelegations: g,
|
|
247
|
-
refreshAvailableDelegations: h
|
|
248
|
-
} = R(ce), [m, d] = k(null);
|
|
249
|
-
let r;
|
|
250
|
-
e[0] !== a ? (r = async () => {
|
|
251
|
-
const _ = await a();
|
|
252
|
-
_ && d(_.token);
|
|
253
|
-
}, e[0] = a, e[1] = r) : r = e[1];
|
|
254
|
-
const l = r;
|
|
255
|
-
let f, i;
|
|
256
|
-
e[2] !== l ? (f = () => {
|
|
257
|
-
l();
|
|
258
|
-
}, i = [l], e[2] = l, e[3] = f, e[4] = i) : (f = e[3], i = e[4]), U(f, i);
|
|
259
|
-
const S = He;
|
|
260
|
-
let y;
|
|
261
|
-
e[5] === Symbol.for("react.memo_cache_sentinel") ? (y = S(), e[5] = y) : y = e[5];
|
|
262
|
-
const x = y;
|
|
263
|
-
let b;
|
|
264
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (b = {
|
|
265
|
-
state: x ? H.LOGGED_IN : H.LOGGING_IN,
|
|
266
|
-
user: x
|
|
267
|
-
}, e[6] = b) : b = e[6];
|
|
268
|
-
const [C, p] = k(b);
|
|
269
|
-
let D;
|
|
270
|
-
e[7] !== n ? (D = async (_) => {
|
|
271
|
-
let L = null;
|
|
272
|
-
return await n.get("/user/detail", _ ? {
|
|
273
|
-
headers: {
|
|
274
|
-
Authorization: `Bearer ${_}`
|
|
275
|
-
}
|
|
276
|
-
} : void 0).then((ee) => {
|
|
277
|
-
L = ee.data;
|
|
105
|
+
l
|
|
106
|
+
]);
|
|
107
|
+
return /* @__PURE__ */ d.jsx(z.Provider, { value: c, children: /* @__PURE__ */ d.jsx(Qe, { children: /* @__PURE__ */ d.jsxs(Ze, { children: [
|
|
108
|
+
/* @__PURE__ */ d.jsx(je, {}),
|
|
109
|
+
i
|
|
110
|
+
] }) }) });
|
|
111
|
+
}, Nt = ({ children: e }) => {
|
|
112
|
+
const [t, n] = S(!1), [r] = S(/* @__PURE__ */ new Set()), s = h((i) => {
|
|
113
|
+
r.add(i), n(!0);
|
|
114
|
+
}, [r]), o = h((i) => {
|
|
115
|
+
r.delete(i), r.size === 0 && n(!1);
|
|
116
|
+
}, [r]), l = T(() => ({ isLoading: t, startLoading: s, stopLoading: o }), [t, s, o]);
|
|
117
|
+
return /* @__PURE__ */ d.jsxs(Ie.Provider, { value: l, children: [
|
|
118
|
+
t && /* @__PURE__ */ d.jsx(Ge, {}),
|
|
119
|
+
e
|
|
120
|
+
] });
|
|
121
|
+
}, Ft = ({ children: e }) => {
|
|
122
|
+
const t = Me(), { msalInstance: n, getToken: r } = _(pe), { delegation: s, setDelegation: o, setAvailableDelegations: l, refreshAvailableDelegations: i } = _(he), [c, a] = S(null), u = h(async () => {
|
|
123
|
+
const g = await r();
|
|
124
|
+
g && a(g.token);
|
|
125
|
+
}, [r]);
|
|
126
|
+
j(() => {
|
|
127
|
+
u();
|
|
128
|
+
}, [u]);
|
|
129
|
+
const m = h(() => {
|
|
130
|
+
const g = localStorage.getItem("user") ?? null;
|
|
131
|
+
return g ? JSON.parse(g ?? "") : null;
|
|
132
|
+
}, [])(), [p, y] = S({
|
|
133
|
+
state: m ? I.LOGGED_IN : I.LOGGING_IN,
|
|
134
|
+
user: m
|
|
135
|
+
}), v = h(async (g) => {
|
|
136
|
+
let b = null;
|
|
137
|
+
return await t.get("/user/detail", g ? { headers: { Authorization: `Bearer ${g}` } } : void 0).then((K) => {
|
|
138
|
+
b = K.data;
|
|
278
139
|
}).catch(() => {
|
|
279
|
-
|
|
280
|
-
}),
|
|
281
|
-
},
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
e[9] !== g || e[10] !== c ? (T = () => {
|
|
285
|
-
localStorage.removeItem("user"), p({
|
|
286
|
-
state: H.LOGGED_OUT,
|
|
140
|
+
b = null;
|
|
141
|
+
}), b;
|
|
142
|
+
}, [t]), C = h(() => {
|
|
143
|
+
localStorage.removeItem("user"), y({
|
|
144
|
+
state: I.LOGGED_OUT,
|
|
287
145
|
user: null
|
|
288
|
-
}),
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
e[12] !== G || e[13] !== h ? (P = async (_) => {
|
|
293
|
-
p({
|
|
294
|
-
state: H.LOGGING_IN,
|
|
146
|
+
}), o(null), l(null);
|
|
147
|
+
}, [l, o]), w = h(async (g) => {
|
|
148
|
+
y({
|
|
149
|
+
state: I.LOGGING_IN,
|
|
295
150
|
user: null
|
|
296
151
|
});
|
|
297
|
-
const
|
|
298
|
-
return
|
|
299
|
-
state:
|
|
300
|
-
user:
|
|
301
|
-
}), localStorage.setItem("user", JSON.stringify(
|
|
302
|
-
state:
|
|
152
|
+
const b = await v(g);
|
|
153
|
+
return b ? (y({
|
|
154
|
+
state: I.LOGGED_IN,
|
|
155
|
+
user: b
|
|
156
|
+
}), localStorage.setItem("user", JSON.stringify(b)), await i(), !0) : (y({
|
|
157
|
+
state: I.LOGIN_FAILED,
|
|
303
158
|
user: null
|
|
304
159
|
}), !1);
|
|
305
|
-
},
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
if (s) {
|
|
315
|
-
const _ = s.addEventCallback((L) => {
|
|
316
|
-
if (L.eventType === ne.LOGIN_SUCCESS && L.payload) {
|
|
317
|
-
const ee = L.payload;
|
|
318
|
-
d(ee.accessToken);
|
|
160
|
+
}, [v, i]), P = h(() => {
|
|
161
|
+
C();
|
|
162
|
+
}, [C]);
|
|
163
|
+
j(() => {
|
|
164
|
+
if (n) {
|
|
165
|
+
const g = n.addEventCallback((b) => {
|
|
166
|
+
if (b.eventType === W.LOGIN_SUCCESS && b.payload) {
|
|
167
|
+
const K = b.payload;
|
|
168
|
+
a(K.accessToken);
|
|
319
169
|
}
|
|
320
170
|
});
|
|
321
171
|
return () => {
|
|
322
|
-
|
|
172
|
+
g && n.removeEventCallback(g);
|
|
323
173
|
};
|
|
324
174
|
}
|
|
325
|
-
return
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
_ && await w(_).catch(() => {
|
|
332
|
-
O(), c(null);
|
|
175
|
+
return () => {
|
|
176
|
+
};
|
|
177
|
+
}, [n, w, P]);
|
|
178
|
+
const se = h(async (g) => {
|
|
179
|
+
g && await w(g).catch(() => {
|
|
180
|
+
P(), o(null);
|
|
333
181
|
});
|
|
334
|
-
},
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
let K;
|
|
342
|
-
e[30] !== m || e[31] !== $ || e[32] !== Y ? (K = [m, Y, $], e[30] = m, e[31] = $, e[32] = Y, e[33] = K) : K = e[33], U(j, K);
|
|
343
|
-
let B;
|
|
344
|
-
e[34] !== w || e[35] !== O || e[36] !== C ? (B = {
|
|
345
|
-
user: C.user,
|
|
346
|
-
userLoginState: C,
|
|
182
|
+
}, [w, P, o]);
|
|
183
|
+
j(() => {
|
|
184
|
+
se(c);
|
|
185
|
+
}, [c, s == null ? void 0 : s.id, se]);
|
|
186
|
+
const Ce = T(() => ({
|
|
187
|
+
user: p.user,
|
|
188
|
+
userLoginState: p,
|
|
347
189
|
loginUser: w,
|
|
348
|
-
logoutUser:
|
|
349
|
-
},
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
function He() {
|
|
355
|
-
const t = localStorage.getItem("user") ?? null;
|
|
356
|
-
return t ? JSON.parse(t ?? "") : null;
|
|
357
|
-
}
|
|
358
|
-
function Re() {
|
|
359
|
-
}
|
|
360
|
-
const st = ({
|
|
361
|
-
...t
|
|
362
|
-
}) => {
|
|
363
|
-
const {
|
|
364
|
-
cookieDomain: e
|
|
365
|
-
} = R(X), [, u] = ye(["Authorization"]), n = J(
|
|
366
|
-
() => t.useMsal ? t.msalInstance : null,
|
|
190
|
+
logoutUser: P
|
|
191
|
+
}), [p, w, P]);
|
|
192
|
+
return /* @__PURE__ */ d.jsx(Le.Provider, { value: Ce, children: e });
|
|
193
|
+
}, qt = ({ ...e }) => {
|
|
194
|
+
const { cookieDomain: t } = _(z), [, n] = He(["Authorization"]), r = T(
|
|
195
|
+
() => e.useMsal ? e.msalInstance : null,
|
|
367
196
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
368
|
-
[
|
|
369
|
-
), s =
|
|
370
|
-
() =>
|
|
197
|
+
[e.useMsal, e.useMsal ? e.msalInstance : null]
|
|
198
|
+
), s = T(
|
|
199
|
+
() => e.useMsal ? e.msalScopes : [],
|
|
371
200
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
372
|
-
[
|
|
373
|
-
),
|
|
374
|
-
() =>
|
|
201
|
+
[e.useMsal, e.useMsal ? e.msalScopes : null]
|
|
202
|
+
), o = T(
|
|
203
|
+
() => e.useMsal ? e.msalExtraScopes : [],
|
|
375
204
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
376
|
-
[
|
|
377
|
-
),
|
|
378
|
-
const
|
|
379
|
-
return
|
|
380
|
-
token:
|
|
381
|
-
expiresOn:
|
|
205
|
+
[e.useMsal, e.useMsal ? e.msalExtraScopes : null]
|
|
206
|
+
), l = te(null), i = h(() => {
|
|
207
|
+
const f = localStorage.getItem("token");
|
|
208
|
+
return f ? {
|
|
209
|
+
token: f,
|
|
210
|
+
expiresOn: ze(new Date(Date.now()), 1)
|
|
382
211
|
} : null;
|
|
383
|
-
}, []),
|
|
384
|
-
var
|
|
385
|
-
if (
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
212
|
+
}, []), c = h(async () => {
|
|
213
|
+
var y;
|
|
214
|
+
if (l.current)
|
|
215
|
+
return l.current;
|
|
216
|
+
const f = r == null ? void 0 : r.getActiveAccount(), m = f ?? ((y = r == null ? void 0 : r.getAllAccounts()) == null ? void 0 : y.at(0)) ?? void 0;
|
|
217
|
+
if (!m)
|
|
218
|
+
return null;
|
|
219
|
+
f || r == null || r.setActiveAccount(m);
|
|
220
|
+
const p = r == null ? void 0 : r.acquireTokenSilent({
|
|
390
221
|
scopes: s,
|
|
391
|
-
account:
|
|
392
|
-
}).then((
|
|
393
|
-
token:
|
|
394
|
-
expiresOn:
|
|
395
|
-
})).catch((
|
|
396
|
-
if (console.error("Error acquiring token",
|
|
397
|
-
return console.log("Silent token acquisition failed. Acquiring token using redirect"),
|
|
222
|
+
account: m
|
|
223
|
+
}).then((v) => ({
|
|
224
|
+
token: v.accessToken,
|
|
225
|
+
expiresOn: v.expiresOn ?? new Date(Date.now())
|
|
226
|
+
})).catch((v) => {
|
|
227
|
+
if (console.error("Error acquiring token", v), v instanceof Fe)
|
|
228
|
+
return console.log("Silent token acquisition failed. Acquiring token using redirect"), r == null || r.acquireTokenRedirect({
|
|
398
229
|
scopes: s,
|
|
399
|
-
extraScopesToConsent:
|
|
230
|
+
extraScopesToConsent: o
|
|
400
231
|
}), null;
|
|
401
|
-
throw
|
|
232
|
+
throw v;
|
|
402
233
|
}).finally(() => {
|
|
403
|
-
|
|
234
|
+
l.current = null;
|
|
404
235
|
});
|
|
405
|
-
return
|
|
406
|
-
}, [
|
|
407
|
-
useMsal:
|
|
408
|
-
msalInstance:
|
|
236
|
+
return l.current = p ?? null, p ?? null;
|
|
237
|
+
}, [r, s, o]), a = h(async () => e.useMsal ? c() : i(), [i, c, e.useMsal]), u = T(() => ({
|
|
238
|
+
useMsal: e.useMsal ?? !1,
|
|
239
|
+
msalInstance: r,
|
|
409
240
|
msalScopes: s,
|
|
410
|
-
msalExtraScopes:
|
|
411
|
-
getToken:
|
|
412
|
-
}), [
|
|
413
|
-
return
|
|
414
|
-
if (
|
|
415
|
-
const
|
|
416
|
-
if (
|
|
417
|
-
const
|
|
418
|
-
|
|
419
|
-
const
|
|
420
|
-
|
|
241
|
+
msalExtraScopes: o,
|
|
242
|
+
getToken: a
|
|
243
|
+
}), [e.useMsal, r, s, o, a]);
|
|
244
|
+
return j(() => {
|
|
245
|
+
if (e.useMsal && r) {
|
|
246
|
+
const f = r.addEventCallback((m) => {
|
|
247
|
+
if (m.eventType === W.LOGIN_SUCCESS || m.eventType === W.ACQUIRE_TOKEN_SUCCESS && m.payload) {
|
|
248
|
+
const p = m.payload, y = p.account;
|
|
249
|
+
r.setActiveAccount(y);
|
|
250
|
+
const v = p.accessToken, C = p.expiresOn;
|
|
251
|
+
n("Authorization", v, {
|
|
421
252
|
path: "/",
|
|
422
253
|
secure: !0,
|
|
423
254
|
sameSite: "none",
|
|
424
|
-
domain:
|
|
425
|
-
expires:
|
|
255
|
+
domain: t,
|
|
256
|
+
expires: C ?? void 0
|
|
426
257
|
});
|
|
427
258
|
}
|
|
428
|
-
|
|
259
|
+
m.error && console.error("AuthProvider MSAL Error", m);
|
|
429
260
|
});
|
|
430
261
|
return () => {
|
|
431
|
-
|
|
262
|
+
f && r.removeEventCallback(f);
|
|
432
263
|
};
|
|
433
264
|
}
|
|
434
265
|
return () => {
|
|
435
266
|
};
|
|
436
|
-
}, [
|
|
437
|
-
},
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
if (!s) {
|
|
445
|
-
c = null;
|
|
446
|
-
break e;
|
|
447
|
-
}
|
|
448
|
-
const p = s.from ? se(s.from) : Me(), D = s.to ? se(s.to) : Ae();
|
|
449
|
-
if (!Oe(new Date(Date.now()), {
|
|
450
|
-
start: p,
|
|
451
|
-
end: D
|
|
452
|
-
})) {
|
|
453
|
-
a(null), c = null;
|
|
454
|
-
break e;
|
|
455
|
-
}
|
|
456
|
-
c = s;
|
|
457
|
-
}
|
|
458
|
-
const g = c;
|
|
459
|
-
let h;
|
|
460
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
267
|
+
}, [e.useMsal, r, n, t]), /* @__PURE__ */ d.jsx(pe.Provider, { value: u, children: e.useMsal ? /* @__PURE__ */ d.jsx(qe, { instance: e.msalInstance, children: e.children }) : e.children });
|
|
268
|
+
}, Gt = ({ children: e, relativeEndpoint: t }) => {
|
|
269
|
+
const [n, r, s] = Ke("user-delegation", null), o = T(() => {
|
|
270
|
+
if (!n)
|
|
271
|
+
return null;
|
|
272
|
+
const f = n.from ? oe(n.from) : We(), m = n.to ? oe(n.to) : Ye();
|
|
273
|
+
return Je(new Date(Date.now()), { start: f, end: m }) ? n : (r(null), null);
|
|
274
|
+
}, [n, r]), { data: l, setData: i, reloadData: c } = Ve(t, {
|
|
461
275
|
nullStateBeforeLoad: !1,
|
|
462
276
|
nullStateOnFail: !0
|
|
463
|
-
},
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
reloadData: r
|
|
468
|
-
} = Le(n, h), l = oe(null);
|
|
469
|
-
let f, i;
|
|
470
|
-
e[1] !== r ? (f = () => {
|
|
471
|
-
const p = () => {
|
|
472
|
-
r(), l.current = window.setTimeout(p, ve() + 5e3);
|
|
277
|
+
}), a = te(null);
|
|
278
|
+
j(() => {
|
|
279
|
+
const f = () => {
|
|
280
|
+
c(), a.current = window.setTimeout(f, _e() + 5e3);
|
|
473
281
|
};
|
|
474
|
-
return
|
|
475
|
-
|
|
282
|
+
return f(), () => {
|
|
283
|
+
a.current !== null && window.clearTimeout(a.current);
|
|
476
284
|
};
|
|
477
|
-
},
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
const p = () => {
|
|
481
|
-
o();
|
|
285
|
+
}, [c]), j(() => {
|
|
286
|
+
const f = () => {
|
|
287
|
+
s();
|
|
482
288
|
};
|
|
483
|
-
return window.addEventListener("focus",
|
|
484
|
-
window.removeEventListener("focus",
|
|
289
|
+
return window.addEventListener("focus", f), () => {
|
|
290
|
+
window.removeEventListener("focus", f);
|
|
485
291
|
};
|
|
486
|
-
},
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
const e = N.c(18), {
|
|
502
|
-
defaultHelmet: u,
|
|
503
|
-
children: n,
|
|
504
|
-
helmetPrefix: s
|
|
505
|
-
} = t, a = s ?? "";
|
|
506
|
-
let o;
|
|
507
|
-
e[0] !== u || e[1] !== a ? (o = le(a, u), e[0] = u, e[1] = a, e[2] = o) : o = e[2];
|
|
508
|
-
let c;
|
|
509
|
-
e[3] !== o ? (c = [o], e[3] = o, e[4] = c) : c = e[4];
|
|
510
|
-
const [g, h] = k(c);
|
|
511
|
-
let m;
|
|
512
|
-
e[5] !== s ? (m = (C) => {
|
|
513
|
-
h((p) => [...p, le(s ?? "", C)]);
|
|
514
|
-
}, e[5] = s, e[6] = m) : m = e[6];
|
|
515
|
-
const d = m;
|
|
516
|
-
let r;
|
|
517
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (r = () => {
|
|
518
|
-
h(qe);
|
|
519
|
-
}, e[7] = r) : r = e[7];
|
|
520
|
-
const l = r;
|
|
521
|
-
let f;
|
|
522
|
-
e[8] !== g ? (f = g.at(-1) ?? "", e[8] = g, e[9] = f) : f = e[9];
|
|
523
|
-
const i = f;
|
|
524
|
-
let S;
|
|
525
|
-
e[10] !== d ? (S = {
|
|
526
|
-
addHelmet: d,
|
|
527
|
-
removeHelmet: l
|
|
528
|
-
}, e[10] = d, e[11] = S) : S = e[11];
|
|
529
|
-
const y = S;
|
|
530
|
-
let x;
|
|
531
|
-
e[12] !== i ? (x = /* @__PURE__ */ v("title", { children: i }), e[12] = i, e[13] = x) : x = e[13];
|
|
532
|
-
let b;
|
|
533
|
-
return e[14] !== n || e[15] !== y || e[16] !== x ? (b = /* @__PURE__ */ E(be.Provider, { value: y, children: [
|
|
534
|
-
x,
|
|
535
|
-
n
|
|
536
|
-
] }), e[14] = n, e[15] = y, e[16] = x, e[17] = b) : b = e[17], b;
|
|
292
|
+
}, [s, c]);
|
|
293
|
+
const u = T(() => ({
|
|
294
|
+
delegation: o,
|
|
295
|
+
setDelegation: r,
|
|
296
|
+
availableDelegations: l,
|
|
297
|
+
setAvailableDelegations: i,
|
|
298
|
+
refreshAvailableDelegations: c
|
|
299
|
+
}), [
|
|
300
|
+
o,
|
|
301
|
+
r,
|
|
302
|
+
l,
|
|
303
|
+
i,
|
|
304
|
+
c
|
|
305
|
+
]);
|
|
306
|
+
return /* @__PURE__ */ d.jsx(he.Provider, { value: u, children: e });
|
|
537
307
|
};
|
|
538
|
-
function
|
|
539
|
-
|
|
308
|
+
var et = typeof Element < "u", tt = typeof Map == "function", rt = typeof Set == "function", nt = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
|
|
309
|
+
function F(e, t) {
|
|
310
|
+
if (e === t) return !0;
|
|
311
|
+
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
312
|
+
if (e.constructor !== t.constructor) return !1;
|
|
313
|
+
var n, r, s;
|
|
314
|
+
if (Array.isArray(e)) {
|
|
315
|
+
if (n = e.length, n != t.length) return !1;
|
|
316
|
+
for (r = n; r-- !== 0; )
|
|
317
|
+
if (!F(e[r], t[r])) return !1;
|
|
318
|
+
return !0;
|
|
319
|
+
}
|
|
320
|
+
var o;
|
|
321
|
+
if (tt && e instanceof Map && t instanceof Map) {
|
|
322
|
+
if (e.size !== t.size) return !1;
|
|
323
|
+
for (o = e.entries(); !(r = o.next()).done; )
|
|
324
|
+
if (!t.has(r.value[0])) return !1;
|
|
325
|
+
for (o = e.entries(); !(r = o.next()).done; )
|
|
326
|
+
if (!F(r.value[1], t.get(r.value[0]))) return !1;
|
|
327
|
+
return !0;
|
|
328
|
+
}
|
|
329
|
+
if (rt && e instanceof Set && t instanceof Set) {
|
|
330
|
+
if (e.size !== t.size) return !1;
|
|
331
|
+
for (o = e.entries(); !(r = o.next()).done; )
|
|
332
|
+
if (!t.has(r.value[0])) return !1;
|
|
333
|
+
return !0;
|
|
334
|
+
}
|
|
335
|
+
if (nt && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
|
|
336
|
+
if (n = e.length, n != t.length) return !1;
|
|
337
|
+
for (r = n; r-- !== 0; )
|
|
338
|
+
if (e[r] !== t[r]) return !1;
|
|
339
|
+
return !0;
|
|
340
|
+
}
|
|
341
|
+
if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
|
|
342
|
+
if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof t.valueOf == "function") return e.valueOf() === t.valueOf();
|
|
343
|
+
if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof t.toString == "function") return e.toString() === t.toString();
|
|
344
|
+
if (s = Object.keys(e), n = s.length, n !== Object.keys(t).length) return !1;
|
|
345
|
+
for (r = n; r-- !== 0; )
|
|
346
|
+
if (!Object.prototype.hasOwnProperty.call(t, s[r])) return !1;
|
|
347
|
+
if (et && e instanceof Element) return !1;
|
|
348
|
+
for (r = n; r-- !== 0; )
|
|
349
|
+
if (!((s[r] === "_owner" || s[r] === "__v" || s[r] === "__o") && e.$$typeof) && !F(e[s[r]], t[s[r]]))
|
|
350
|
+
return !1;
|
|
351
|
+
return !0;
|
|
352
|
+
}
|
|
353
|
+
return e !== e && t !== t;
|
|
540
354
|
}
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
355
|
+
var st = function(t, n) {
|
|
356
|
+
try {
|
|
357
|
+
return F(t, n);
|
|
358
|
+
} catch (r) {
|
|
359
|
+
if ((r.message || "").match(/stack|recursion/i))
|
|
360
|
+
return console.warn("react-fast-compare cannot handle circular refs"), !1;
|
|
361
|
+
throw r;
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
const ot = /* @__PURE__ */ ye(st);
|
|
365
|
+
var at = function(t, n, r, s) {
|
|
366
|
+
var o = r ? r.call(s, t, n) : void 0;
|
|
367
|
+
if (o !== void 0)
|
|
368
|
+
return !!o;
|
|
369
|
+
if (t === n)
|
|
370
|
+
return !0;
|
|
371
|
+
if (typeof t != "object" || !t || typeof n != "object" || !n)
|
|
372
|
+
return !1;
|
|
373
|
+
var l = Object.keys(t), i = Object.keys(n);
|
|
374
|
+
if (l.length !== i.length)
|
|
375
|
+
return !1;
|
|
376
|
+
for (var c = Object.prototype.hasOwnProperty.bind(n), a = 0; a < l.length; a++) {
|
|
377
|
+
var u = l[a];
|
|
378
|
+
if (!c(u))
|
|
379
|
+
return !1;
|
|
380
|
+
var f = t[u], m = n[u];
|
|
381
|
+
if (o = r ? r.call(s, f, m, u) : void 0, o === !1 || o === void 0 && f !== m)
|
|
382
|
+
return !1;
|
|
383
|
+
}
|
|
384
|
+
return !0;
|
|
385
|
+
};
|
|
386
|
+
const it = /* @__PURE__ */ ye(at);
|
|
387
|
+
var ge = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "head", e.HTML = "html", e.LINK = "link", e.META = "meta", e.NOSCRIPT = "noscript", e.SCRIPT = "script", e.STYLE = "style", e.TITLE = "title", e.FRAGMENT = "Symbol(react.fragment)", e))(ge || {}), V = {
|
|
388
|
+
link: { rel: ["amphtml", "canonical", "alternate"] },
|
|
389
|
+
script: { type: ["application/ld+json"] },
|
|
390
|
+
meta: {
|
|
391
|
+
charset: "",
|
|
392
|
+
name: ["generator", "robots", "description"],
|
|
393
|
+
property: [
|
|
394
|
+
"og:type",
|
|
395
|
+
"og:title",
|
|
396
|
+
"og:url",
|
|
397
|
+
"og:image",
|
|
398
|
+
"og:image:alt",
|
|
399
|
+
"og:description",
|
|
400
|
+
"twitter:url",
|
|
401
|
+
"twitter:title",
|
|
402
|
+
"twitter:description",
|
|
403
|
+
"twitter:image",
|
|
404
|
+
"twitter:image:alt",
|
|
405
|
+
"twitter:card",
|
|
406
|
+
"twitter:site"
|
|
407
|
+
]
|
|
408
|
+
}
|
|
409
|
+
}, ie = Object.values(ge), ne = {
|
|
410
|
+
accesskey: "accessKey",
|
|
411
|
+
charset: "charSet",
|
|
412
|
+
class: "className",
|
|
413
|
+
contenteditable: "contentEditable",
|
|
414
|
+
contextmenu: "contextMenu",
|
|
415
|
+
"http-equiv": "httpEquiv",
|
|
416
|
+
itemprop: "itemProp",
|
|
417
|
+
tabindex: "tabIndex"
|
|
418
|
+
}, lt = Object.entries(ne).reduce(
|
|
419
|
+
(e, [t, n]) => (e[n] = t, e),
|
|
420
|
+
{}
|
|
421
|
+
), A = "data-rh", L = {
|
|
422
|
+
DEFAULT_TITLE: "defaultTitle",
|
|
423
|
+
DEFER: "defer",
|
|
424
|
+
ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
|
|
425
|
+
ON_CHANGE_CLIENT_STATE: "onChangeClientState",
|
|
426
|
+
TITLE_TEMPLATE: "titleTemplate",
|
|
427
|
+
PRIORITIZE_SEO_TAGS: "prioritizeSeoTags"
|
|
428
|
+
}, H = (e, t) => {
|
|
429
|
+
for (let n = e.length - 1; n >= 0; n -= 1) {
|
|
430
|
+
const r = e[n];
|
|
431
|
+
if (Object.prototype.hasOwnProperty.call(r, t))
|
|
432
|
+
return r[t];
|
|
433
|
+
}
|
|
434
|
+
return null;
|
|
435
|
+
}, ct = (e) => {
|
|
436
|
+
let t = H(
|
|
437
|
+
e,
|
|
438
|
+
"title"
|
|
439
|
+
/* TITLE */
|
|
440
|
+
);
|
|
441
|
+
const n = H(e, L.TITLE_TEMPLATE);
|
|
442
|
+
if (Array.isArray(t) && (t = t.join("")), n && t)
|
|
443
|
+
return n.replace(/%s/g, () => t);
|
|
444
|
+
const r = H(e, L.DEFAULT_TITLE);
|
|
445
|
+
return t || r || void 0;
|
|
446
|
+
}, ut = (e) => H(e, L.ON_CHANGE_CLIENT_STATE) || (() => {
|
|
447
|
+
}), B = (e, t) => t.filter((n) => typeof n[e] < "u").map((n) => n[e]).reduce((n, r) => ({ ...n, ...r }), {}), ft = (e, t) => t.filter((n) => typeof n.base < "u").map((n) => n.base).reverse().reduce((n, r) => {
|
|
448
|
+
if (!n.length) {
|
|
449
|
+
const s = Object.keys(r);
|
|
450
|
+
for (let o = 0; o < s.length; o += 1) {
|
|
451
|
+
const i = s[o].toLowerCase();
|
|
452
|
+
if (e.indexOf(i) !== -1 && r[i])
|
|
453
|
+
return n.concat(r);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
return n;
|
|
457
|
+
}, []), dt = (e) => console && typeof console.warn == "function" && console.warn(e), $ = (e, t, n) => {
|
|
458
|
+
const r = {};
|
|
459
|
+
return n.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && dt(
|
|
460
|
+
`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`
|
|
461
|
+
), !1)).map((s) => s[e]).reverse().reduce((s, o) => {
|
|
462
|
+
const l = {};
|
|
463
|
+
o.filter((c) => {
|
|
464
|
+
let a;
|
|
465
|
+
const u = Object.keys(c);
|
|
466
|
+
for (let m = 0; m < u.length; m += 1) {
|
|
467
|
+
const p = u[m], y = p.toLowerCase();
|
|
468
|
+
t.indexOf(y) !== -1 && !(a === "rel" && c[a].toLowerCase() === "canonical") && !(y === "rel" && c[y].toLowerCase() === "stylesheet") && (a = y), t.indexOf(p) !== -1 && (p === "innerHTML" || p === "cssText" || p === "itemprop") && (a = p);
|
|
469
|
+
}
|
|
470
|
+
if (!a || !c[a])
|
|
471
|
+
return !1;
|
|
472
|
+
const f = c[a].toLowerCase();
|
|
473
|
+
return r[a] || (r[a] = {}), l[a] || (l[a] = {}), r[a][f] ? !1 : (l[a][f] = !0, !0);
|
|
474
|
+
}).reverse().forEach((c) => s.push(c));
|
|
475
|
+
const i = Object.keys(l);
|
|
476
|
+
for (let c = 0; c < i.length; c += 1) {
|
|
477
|
+
const a = i[c], u = {
|
|
478
|
+
...r[a],
|
|
479
|
+
...l[a]
|
|
480
|
+
};
|
|
481
|
+
r[a] = u;
|
|
482
|
+
}
|
|
483
|
+
return s;
|
|
484
|
+
}, []).reverse();
|
|
485
|
+
}, mt = (e, t) => {
|
|
486
|
+
if (Array.isArray(e) && e.length) {
|
|
487
|
+
for (let n = 0; n < e.length; n += 1)
|
|
488
|
+
if (e[n][t])
|
|
489
|
+
return !0;
|
|
490
|
+
}
|
|
491
|
+
return !1;
|
|
492
|
+
}, pt = (e) => ({
|
|
493
|
+
baseTag: ft([
|
|
494
|
+
"href"
|
|
495
|
+
/* HREF */
|
|
496
|
+
], e),
|
|
497
|
+
bodyAttributes: B("bodyAttributes", e),
|
|
498
|
+
defer: H(e, L.DEFER),
|
|
499
|
+
encode: H(e, L.ENCODE_SPECIAL_CHARACTERS),
|
|
500
|
+
htmlAttributes: B("htmlAttributes", e),
|
|
501
|
+
linkTags: $(
|
|
502
|
+
"link",
|
|
503
|
+
[
|
|
504
|
+
"rel",
|
|
505
|
+
"href"
|
|
506
|
+
/* HREF */
|
|
507
|
+
],
|
|
508
|
+
e
|
|
509
|
+
),
|
|
510
|
+
metaTags: $(
|
|
511
|
+
"meta",
|
|
512
|
+
[
|
|
513
|
+
"name",
|
|
514
|
+
"charset",
|
|
515
|
+
"http-equiv",
|
|
516
|
+
"property",
|
|
517
|
+
"itemprop"
|
|
518
|
+
/* ITEM_PROP */
|
|
519
|
+
],
|
|
520
|
+
e
|
|
521
|
+
),
|
|
522
|
+
noscriptTags: $("noscript", [
|
|
523
|
+
"innerHTML"
|
|
524
|
+
/* INNER_HTML */
|
|
525
|
+
], e),
|
|
526
|
+
onChangeClientState: ut(e),
|
|
527
|
+
scriptTags: $(
|
|
528
|
+
"script",
|
|
529
|
+
[
|
|
530
|
+
"src",
|
|
531
|
+
"innerHTML"
|
|
532
|
+
/* INNER_HTML */
|
|
533
|
+
],
|
|
534
|
+
e
|
|
535
|
+
),
|
|
536
|
+
styleTags: $("style", [
|
|
537
|
+
"cssText"
|
|
538
|
+
/* CSS_TEXT */
|
|
539
|
+
], e),
|
|
540
|
+
title: ct(e),
|
|
541
|
+
titleAttributes: B("titleAttributes", e),
|
|
542
|
+
prioritizeSeoTags: mt(e, L.PRIORITIZE_SEO_TAGS)
|
|
543
|
+
}), Te = (e) => Array.isArray(e) ? e.join("") : e, ht = (e, t) => {
|
|
544
|
+
const n = Object.keys(e);
|
|
545
|
+
for (let r = 0; r < n.length; r += 1)
|
|
546
|
+
if (t[n[r]] && t[n[r]].includes(e[n[r]]))
|
|
547
|
+
return !0;
|
|
548
|
+
return !1;
|
|
549
|
+
}, Y = (e, t) => Array.isArray(e) ? e.reduce(
|
|
550
|
+
(n, r) => (ht(r, t) ? n.priority.push(r) : n.default.push(r), n),
|
|
551
|
+
{ priority: [], default: [] }
|
|
552
|
+
) : { default: e, priority: [] }, le = (e, t) => ({
|
|
553
|
+
...e,
|
|
554
|
+
[t]: void 0
|
|
555
|
+
}), yt = [
|
|
556
|
+
"noscript",
|
|
557
|
+
"script",
|
|
558
|
+
"style"
|
|
559
|
+
/* STYLE */
|
|
560
|
+
], Q = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), ve = (e) => Object.keys(e).reduce((t, n) => {
|
|
561
|
+
const r = typeof e[n] < "u" ? `${n}="${e[n]}"` : `${n}`;
|
|
562
|
+
return t ? `${t} ${r}` : r;
|
|
563
|
+
}, ""), gt = (e, t, n, r) => {
|
|
564
|
+
const s = ve(n), o = Te(t);
|
|
565
|
+
return s ? `<${e} ${A}="true" ${s}>${Q(
|
|
566
|
+
o,
|
|
567
|
+
r
|
|
568
|
+
)}</${e}>` : `<${e} ${A}="true">${Q(
|
|
569
|
+
o,
|
|
570
|
+
r
|
|
571
|
+
)}</${e}>`;
|
|
572
|
+
}, Tt = (e, t, n = !0) => t.reduce((r, s) => {
|
|
573
|
+
const o = s, l = Object.keys(o).filter(
|
|
574
|
+
(a) => !(a === "innerHTML" || a === "cssText")
|
|
575
|
+
).reduce((a, u) => {
|
|
576
|
+
const f = typeof o[u] > "u" ? u : `${u}="${Q(o[u], n)}"`;
|
|
577
|
+
return a ? `${a} ${f}` : f;
|
|
578
|
+
}, ""), i = o.innerHTML || o.cssText || "", c = yt.indexOf(e) === -1;
|
|
579
|
+
return `${r}<${e} ${A}="true" ${l}${c ? "/>" : `>${i}</${e}>`}`;
|
|
580
|
+
}, ""), xe = (e, t = {}) => Object.keys(e).reduce((n, r) => {
|
|
581
|
+
const s = ne[r];
|
|
582
|
+
return n[s || r] = e[r], n;
|
|
583
|
+
}, t), vt = (e, t, n) => {
|
|
584
|
+
const r = {
|
|
585
|
+
key: t,
|
|
586
|
+
[A]: !0
|
|
587
|
+
}, s = xe(n, r);
|
|
588
|
+
return [D.createElement("title", s, t)];
|
|
589
|
+
}, q = (e, t) => t.map((n, r) => {
|
|
590
|
+
const s = {
|
|
591
|
+
key: r,
|
|
592
|
+
[A]: !0
|
|
593
|
+
};
|
|
594
|
+
return Object.keys(n).forEach((o) => {
|
|
595
|
+
const i = ne[o] || o;
|
|
596
|
+
if (i === "innerHTML" || i === "cssText") {
|
|
597
|
+
const c = n.innerHTML || n.cssText;
|
|
598
|
+
s.dangerouslySetInnerHTML = { __html: c };
|
|
599
|
+
} else
|
|
600
|
+
s[i] = n[o];
|
|
601
|
+
}), D.createElement(e, s);
|
|
602
|
+
}), x = (e, t, n = !0) => {
|
|
603
|
+
switch (e) {
|
|
604
|
+
case "title":
|
|
605
|
+
return {
|
|
606
|
+
toComponent: () => vt(e, t.title, t.titleAttributes),
|
|
607
|
+
toString: () => gt(e, t.title, t.titleAttributes, n)
|
|
608
|
+
};
|
|
609
|
+
case "bodyAttributes":
|
|
610
|
+
case "htmlAttributes":
|
|
611
|
+
return {
|
|
612
|
+
toComponent: () => xe(t),
|
|
613
|
+
toString: () => ve(t)
|
|
614
|
+
};
|
|
615
|
+
default:
|
|
616
|
+
return {
|
|
617
|
+
toComponent: () => q(e, t),
|
|
618
|
+
toString: () => Tt(e, t, n)
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
}, xt = ({ metaTags: e, linkTags: t, scriptTags: n, encode: r }) => {
|
|
622
|
+
const s = Y(e, V.meta), o = Y(t, V.link), l = Y(n, V.script);
|
|
623
|
+
return {
|
|
624
|
+
priorityMethods: {
|
|
625
|
+
toComponent: () => [
|
|
626
|
+
...q("meta", s.priority),
|
|
627
|
+
...q("link", o.priority),
|
|
628
|
+
...q("script", l.priority)
|
|
629
|
+
],
|
|
630
|
+
toString: () => (
|
|
631
|
+
// generate all the tags as strings and concatenate them
|
|
632
|
+
`${x("meta", s.priority, r)} ${x(
|
|
633
|
+
"link",
|
|
634
|
+
o.priority,
|
|
635
|
+
r
|
|
636
|
+
)} ${x("script", l.priority, r)}`
|
|
637
|
+
)
|
|
638
|
+
},
|
|
639
|
+
metaTags: s.default,
|
|
640
|
+
linkTags: o.default,
|
|
641
|
+
scriptTags: l.default
|
|
642
|
+
};
|
|
643
|
+
}, St = (e) => {
|
|
644
|
+
const {
|
|
645
|
+
baseTag: t,
|
|
646
|
+
bodyAttributes: n,
|
|
647
|
+
encode: r = !0,
|
|
648
|
+
htmlAttributes: s,
|
|
649
|
+
noscriptTags: o,
|
|
650
|
+
styleTags: l,
|
|
651
|
+
title: i = "",
|
|
652
|
+
titleAttributes: c,
|
|
653
|
+
prioritizeSeoTags: a
|
|
654
|
+
} = e;
|
|
655
|
+
let { linkTags: u, metaTags: f, scriptTags: m } = e, p = {
|
|
656
|
+
toComponent: () => {
|
|
657
|
+
},
|
|
658
|
+
toString: () => ""
|
|
659
|
+
};
|
|
660
|
+
return a && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: m } = xt(e)), {
|
|
661
|
+
priority: p,
|
|
662
|
+
base: x("base", t, r),
|
|
663
|
+
bodyAttributes: x("bodyAttributes", n, r),
|
|
664
|
+
htmlAttributes: x("htmlAttributes", s, r),
|
|
665
|
+
link: x("link", u, r),
|
|
666
|
+
meta: x("meta", f, r),
|
|
667
|
+
noscript: x("noscript", o, r),
|
|
668
|
+
script: x("script", m, r),
|
|
669
|
+
style: x("style", l, r),
|
|
670
|
+
title: x("title", { title: i, titleAttributes: c }, r)
|
|
671
|
+
};
|
|
672
|
+
}, X = St, U = [], Se = !!(typeof window < "u" && window.document && window.document.createElement), Z = class {
|
|
673
|
+
constructor(e, t) {
|
|
674
|
+
E(this, "instances", []);
|
|
675
|
+
E(this, "canUseDOM", Se);
|
|
676
|
+
E(this, "context");
|
|
677
|
+
E(this, "value", {
|
|
678
|
+
setHelmet: (e) => {
|
|
679
|
+
this.context.helmet = e;
|
|
680
|
+
},
|
|
681
|
+
helmetInstances: {
|
|
682
|
+
get: () => this.canUseDOM ? U : this.instances,
|
|
683
|
+
add: (e) => {
|
|
684
|
+
(this.canUseDOM ? U : this.instances).push(e);
|
|
685
|
+
},
|
|
686
|
+
remove: (e) => {
|
|
687
|
+
const t = (this.canUseDOM ? U : this.instances).indexOf(e);
|
|
688
|
+
(this.canUseDOM ? U : this.instances).splice(t, 1);
|
|
564
689
|
}
|
|
565
690
|
}
|
|
566
|
-
|
|
567
|
-
|
|
691
|
+
});
|
|
692
|
+
this.context = e, this.canUseDOM = t || !1, t || (e.helmet = X({
|
|
693
|
+
baseTag: [],
|
|
694
|
+
bodyAttributes: {},
|
|
695
|
+
encodeSpecialCharacters: !0,
|
|
696
|
+
htmlAttributes: {},
|
|
697
|
+
linkTags: [],
|
|
698
|
+
metaTags: [],
|
|
699
|
+
noscriptTags: [],
|
|
700
|
+
scriptTags: [],
|
|
701
|
+
styleTags: [],
|
|
702
|
+
title: "",
|
|
703
|
+
titleAttributes: {}
|
|
704
|
+
}));
|
|
705
|
+
}
|
|
706
|
+
}, bt = {}, be = D.createContext(bt), k, Ae = (k = class extends re {
|
|
707
|
+
constructor(n) {
|
|
708
|
+
super(n);
|
|
709
|
+
E(this, "helmetData");
|
|
710
|
+
this.helmetData = new Z(this.props.context || {}, k.canUseDOM);
|
|
711
|
+
}
|
|
712
|
+
render() {
|
|
713
|
+
return /* @__PURE__ */ D.createElement(be.Provider, { value: this.helmetData.value }, this.props.children);
|
|
714
|
+
}
|
|
715
|
+
}, E(k, "canUseDOM", Se), k), M = (e, t) => {
|
|
716
|
+
const n = document.head || document.querySelector(
|
|
717
|
+
"head"
|
|
718
|
+
/* HEAD */
|
|
719
|
+
), r = n.querySelectorAll(`${e}[${A}]`), s = [].slice.call(r), o = [];
|
|
568
720
|
let l;
|
|
569
|
-
t
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
l,
|
|
582
|
-
|
|
583
|
-
|
|
721
|
+
return t && t.length && t.forEach((i) => {
|
|
722
|
+
const c = document.createElement(e);
|
|
723
|
+
for (const a in i)
|
|
724
|
+
if (Object.prototype.hasOwnProperty.call(i, a))
|
|
725
|
+
if (a === "innerHTML")
|
|
726
|
+
c.innerHTML = i.innerHTML;
|
|
727
|
+
else if (a === "cssText")
|
|
728
|
+
c.styleSheet ? c.styleSheet.cssText = i.cssText : c.appendChild(document.createTextNode(i.cssText));
|
|
729
|
+
else {
|
|
730
|
+
const u = a, f = typeof i[u] > "u" ? "" : i[u];
|
|
731
|
+
c.setAttribute(a, f);
|
|
732
|
+
}
|
|
733
|
+
c.setAttribute(A, "true"), s.some((a, u) => (l = u, c.isEqualNode(a))) ? s.splice(l, 1) : o.push(c);
|
|
734
|
+
}), s.forEach((i) => {
|
|
735
|
+
var c;
|
|
736
|
+
return (c = i.parentNode) == null ? void 0 : c.removeChild(i);
|
|
737
|
+
}), o.forEach((i) => n.appendChild(i)), {
|
|
738
|
+
oldTags: s,
|
|
739
|
+
newTags: o
|
|
740
|
+
};
|
|
741
|
+
}, ee = (e, t) => {
|
|
742
|
+
const n = document.getElementsByTagName(e)[0];
|
|
743
|
+
if (!n)
|
|
744
|
+
return;
|
|
745
|
+
const r = n.getAttribute(A), s = r ? r.split(",") : [], o = [...s], l = Object.keys(t);
|
|
746
|
+
for (const i of l) {
|
|
747
|
+
const c = t[i] || "";
|
|
748
|
+
n.getAttribute(i) !== c && n.setAttribute(i, c), s.indexOf(i) === -1 && s.push(i);
|
|
749
|
+
const a = o.indexOf(i);
|
|
750
|
+
a !== -1 && o.splice(a, 1);
|
|
751
|
+
}
|
|
752
|
+
for (let i = o.length - 1; i >= 0; i -= 1)
|
|
753
|
+
n.removeAttribute(o[i]);
|
|
754
|
+
s.length === o.length ? n.removeAttribute(A) : n.getAttribute(A) !== l.join(",") && n.setAttribute(A, l.join(","));
|
|
755
|
+
}, At = (e, t) => {
|
|
756
|
+
typeof e < "u" && document.title !== e && (document.title = Te(e)), ee("title", t);
|
|
757
|
+
}, ce = (e, t) => {
|
|
758
|
+
const {
|
|
759
|
+
baseTag: n,
|
|
760
|
+
bodyAttributes: r,
|
|
761
|
+
htmlAttributes: s,
|
|
762
|
+
linkTags: o,
|
|
763
|
+
metaTags: l,
|
|
764
|
+
noscriptTags: i,
|
|
765
|
+
onChangeClientState: c,
|
|
766
|
+
scriptTags: a,
|
|
767
|
+
styleTags: u,
|
|
768
|
+
title: f,
|
|
769
|
+
titleAttributes: m
|
|
770
|
+
} = e;
|
|
771
|
+
ee("body", r), ee("html", s), At(f, m);
|
|
772
|
+
const p = {
|
|
773
|
+
baseTag: M("base", n),
|
|
774
|
+
linkTags: M("link", o),
|
|
775
|
+
metaTags: M("meta", l),
|
|
776
|
+
noscriptTags: M("noscript", i),
|
|
777
|
+
scriptTags: M("script", a),
|
|
778
|
+
styleTags: M("style", u)
|
|
779
|
+
}, y = {}, v = {};
|
|
780
|
+
Object.keys(p).forEach((C) => {
|
|
781
|
+
const { newTags: w, oldTags: P } = p[C];
|
|
782
|
+
w.length && (y[C] = w), P.length && (v[C] = p[C].oldTags);
|
|
783
|
+
}), t && t(), c(e, y, v);
|
|
784
|
+
}, R = null, Ct = (e) => {
|
|
785
|
+
R && cancelAnimationFrame(R), e.defer ? R = requestAnimationFrame(() => {
|
|
786
|
+
ce(e, () => {
|
|
787
|
+
R = null;
|
|
788
|
+
});
|
|
789
|
+
}) : (ce(e), R = null);
|
|
790
|
+
}, Et = Ct, ue = class extends re {
|
|
791
|
+
constructor() {
|
|
792
|
+
super(...arguments);
|
|
793
|
+
E(this, "rendered", !1);
|
|
794
|
+
}
|
|
795
|
+
shouldComponentUpdate(t) {
|
|
796
|
+
return !it(t, this.props);
|
|
797
|
+
}
|
|
798
|
+
componentDidUpdate() {
|
|
799
|
+
this.emitChange();
|
|
800
|
+
}
|
|
801
|
+
componentWillUnmount() {
|
|
802
|
+
const { helmetInstances: t } = this.props.context;
|
|
803
|
+
t.remove(this), this.emitChange();
|
|
804
|
+
}
|
|
805
|
+
emitChange() {
|
|
806
|
+
const { helmetInstances: t, setHelmet: n } = this.props.context;
|
|
807
|
+
let r = null;
|
|
808
|
+
const s = pt(
|
|
809
|
+
t.get().map((o) => {
|
|
810
|
+
const l = { ...o.props };
|
|
811
|
+
return delete l.context, l;
|
|
812
|
+
})
|
|
813
|
+
);
|
|
814
|
+
Ae.canUseDOM ? Et(s) : X && (r = X(s)), n(r);
|
|
815
|
+
}
|
|
816
|
+
// componentWillMount will be deprecated
|
|
817
|
+
// for SSR, initialize on first render
|
|
818
|
+
// constructor is also unsafe in StrictMode
|
|
819
|
+
init() {
|
|
820
|
+
if (this.rendered)
|
|
821
|
+
return;
|
|
822
|
+
this.rendered = !0;
|
|
823
|
+
const { helmetInstances: t } = this.props.context;
|
|
824
|
+
t.add(this), this.emitChange();
|
|
825
|
+
}
|
|
826
|
+
render() {
|
|
827
|
+
return this.init(), null;
|
|
828
|
+
}
|
|
829
|
+
}, J, Ot = (J = class extends re {
|
|
830
|
+
shouldComponentUpdate(e) {
|
|
831
|
+
return !ot(le(this.props, "helmetData"), le(e, "helmetData"));
|
|
832
|
+
}
|
|
833
|
+
mapNestedChildrenToProps(e, t) {
|
|
834
|
+
if (!t)
|
|
835
|
+
return null;
|
|
836
|
+
switch (e.type) {
|
|
837
|
+
case "script":
|
|
838
|
+
case "noscript":
|
|
839
|
+
return {
|
|
840
|
+
innerHTML: t
|
|
841
|
+
};
|
|
842
|
+
case "style":
|
|
843
|
+
return {
|
|
844
|
+
cssText: t
|
|
845
|
+
};
|
|
846
|
+
default:
|
|
847
|
+
throw new Error(
|
|
848
|
+
`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`
|
|
849
|
+
);
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
flattenArrayTypeChildren(e, t, n, r) {
|
|
853
|
+
return {
|
|
854
|
+
...t,
|
|
855
|
+
[e.type]: [
|
|
856
|
+
...t[e.type] || [],
|
|
857
|
+
{
|
|
858
|
+
...n,
|
|
859
|
+
...this.mapNestedChildrenToProps(e, r)
|
|
860
|
+
}
|
|
861
|
+
]
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
mapObjectTypeChildren(e, t, n, r) {
|
|
865
|
+
switch (e.type) {
|
|
866
|
+
case "title":
|
|
867
|
+
return {
|
|
868
|
+
...t,
|
|
869
|
+
[e.type]: r,
|
|
870
|
+
titleAttributes: { ...n }
|
|
871
|
+
};
|
|
872
|
+
case "body":
|
|
873
|
+
return {
|
|
874
|
+
...t,
|
|
875
|
+
bodyAttributes: { ...n }
|
|
876
|
+
};
|
|
877
|
+
case "html":
|
|
878
|
+
return {
|
|
879
|
+
...t,
|
|
880
|
+
htmlAttributes: { ...n }
|
|
881
|
+
};
|
|
882
|
+
default:
|
|
883
|
+
return {
|
|
884
|
+
...t,
|
|
885
|
+
[e.type]: { ...n }
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
mapArrayTypeChildrenToProps(e, t) {
|
|
890
|
+
let n = { ...t };
|
|
891
|
+
return Object.keys(e).forEach((r) => {
|
|
892
|
+
n = {
|
|
893
|
+
...n,
|
|
894
|
+
[r]: e[r]
|
|
895
|
+
};
|
|
896
|
+
}), n;
|
|
897
|
+
}
|
|
898
|
+
warnOnInvalidChildren(e, t) {
|
|
899
|
+
return ae(
|
|
900
|
+
ie.some((n) => e.type === n),
|
|
901
|
+
typeof e.type == "function" ? "You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information." : `Only elements types ${ie.join(
|
|
902
|
+
", "
|
|
903
|
+
)} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`
|
|
904
|
+
), ae(
|
|
905
|
+
!t || typeof t == "string" || Array.isArray(t) && !t.some((n) => typeof n != "string"),
|
|
906
|
+
`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`
|
|
907
|
+
), !0;
|
|
908
|
+
}
|
|
909
|
+
mapChildrenToProps(e, t) {
|
|
910
|
+
let n = {};
|
|
911
|
+
return D.Children.forEach(e, (r) => {
|
|
912
|
+
if (!r || !r.props)
|
|
913
|
+
return;
|
|
914
|
+
const { children: s, ...o } = r.props, l = Object.keys(o).reduce((c, a) => (c[lt[a] || a] = o[a], c), {});
|
|
915
|
+
let { type: i } = r;
|
|
916
|
+
switch (typeof i == "symbol" ? i = i.toString() : this.warnOnInvalidChildren(r, s), i) {
|
|
917
|
+
case "Symbol(react.fragment)":
|
|
918
|
+
t = this.mapChildrenToProps(s, t);
|
|
919
|
+
break;
|
|
920
|
+
case "link":
|
|
921
|
+
case "meta":
|
|
922
|
+
case "noscript":
|
|
923
|
+
case "script":
|
|
924
|
+
case "style":
|
|
925
|
+
n = this.flattenArrayTypeChildren(
|
|
926
|
+
r,
|
|
927
|
+
n,
|
|
928
|
+
l,
|
|
929
|
+
s
|
|
930
|
+
);
|
|
931
|
+
break;
|
|
932
|
+
default:
|
|
933
|
+
t = this.mapObjectTypeChildren(r, t, l, s);
|
|
934
|
+
break;
|
|
935
|
+
}
|
|
936
|
+
}), this.mapArrayTypeChildrenToProps(n, t);
|
|
937
|
+
}
|
|
938
|
+
render() {
|
|
939
|
+
const { children: e, ...t } = this.props;
|
|
940
|
+
let n = { ...t }, { helmetData: r } = t;
|
|
941
|
+
if (e && (n = this.mapChildrenToProps(e, n)), r && !(r instanceof Z)) {
|
|
942
|
+
const s = r;
|
|
943
|
+
r = new Z(s.context, !0), delete n.helmetData;
|
|
944
|
+
}
|
|
945
|
+
return r ? /* @__PURE__ */ D.createElement(ue, { ...n, context: r.value }) : /* @__PURE__ */ D.createElement(be.Consumer, null, (s) => /* @__PURE__ */ D.createElement(ue, { ...n, context: s }));
|
|
946
|
+
}
|
|
947
|
+
}, E(J, "defaultProps", {
|
|
948
|
+
defer: !0,
|
|
949
|
+
encodeSpecialCharacters: !0,
|
|
950
|
+
prioritizeSeoTags: !1
|
|
951
|
+
}), J);
|
|
952
|
+
const fe = (e, t) => e ? `${e} | ${t}` : t, zt = ({ defaultHelmet: e, children: t, helmetPrefix: n }) => {
|
|
953
|
+
const [r, s] = S([
|
|
954
|
+
fe(n ?? "", e)
|
|
955
|
+
]), o = h((a) => {
|
|
956
|
+
s((u) => [...u, fe(n ?? "", a)]);
|
|
957
|
+
}, [n]), l = h(() => {
|
|
958
|
+
s((a) => a.length > 1 ? a.slice(0, -1) : a);
|
|
959
|
+
}, [s]), i = T(() => r.at(-1) ?? "", [r]), c = T(() => ({ addHelmet: o, removeHelmet: l }), [o, l]);
|
|
960
|
+
return /* @__PURE__ */ d.jsx($e.Provider, { value: c, children: /* @__PURE__ */ d.jsxs(Ae, { children: [
|
|
961
|
+
/* @__PURE__ */ d.jsx(Ot, { defer: !1, children: /* @__PURE__ */ d.jsx("title", { children: i }) }),
|
|
962
|
+
t
|
|
963
|
+
] }) });
|
|
964
|
+
}, de = 50, wt = () => {
|
|
965
|
+
const { texts: { confirm: e } } = _(z), { onConfirm: t, onCancel: n, text: r, show: s, textSm: o } = Re(), l = T(() => o === void 0 ? r.length > de : o, [r, o]), i = T(() => r.length > de, [r]), c = h((a) => {
|
|
966
|
+
if (s)
|
|
967
|
+
switch (a.key) {
|
|
968
|
+
case "Enter":
|
|
969
|
+
a.preventDefault(), a.stopPropagation(), t();
|
|
970
|
+
break;
|
|
971
|
+
case "Escape":
|
|
972
|
+
a.preventDefault(), a.stopPropagation(), n();
|
|
973
|
+
break;
|
|
974
|
+
}
|
|
975
|
+
}, [t, n, s]);
|
|
976
|
+
return Ue(c), /* @__PURE__ */ d.jsxs(O, { show: s, size: i ? void 0 : "sm", centered: !0, onHide: n, children: [
|
|
977
|
+
/* @__PURE__ */ d.jsx(O.Header, { className: "justify-content-center", children: l ? /* @__PURE__ */ d.jsx(Ne, { variant: "body", children: r }) : /* @__PURE__ */ d.jsx(O.Title, { children: r }) }),
|
|
978
|
+
/* @__PURE__ */ d.jsx(O.Body, { children: /* @__PURE__ */ d.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
979
|
+
/* @__PURE__ */ d.jsx(G, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: n, children: e.no }),
|
|
980
|
+
/* @__PURE__ */ d.jsx(G, { type: "button", color: "primary", onClick: t, className: "w-100 ml", children: e.yes })
|
|
981
|
+
] }) })
|
|
982
|
+
] });
|
|
584
983
|
};
|
|
585
984
|
export {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
985
|
+
pe as AuthContext,
|
|
986
|
+
qt as AuthProvider,
|
|
987
|
+
he as DelegationContext,
|
|
988
|
+
Gt as DelegationProvider,
|
|
989
|
+
Bt as FormDisabledContext,
|
|
990
|
+
Wt as FormDisabledProvider,
|
|
991
|
+
$e as HelmetContext,
|
|
992
|
+
zt as HelmetProvider,
|
|
993
|
+
Ie as LoadingContext,
|
|
994
|
+
Nt as LoadingProvider,
|
|
995
|
+
z as LuminusComponentsContext,
|
|
996
|
+
Ut as LuminusComponentsProvider,
|
|
997
|
+
Le as UserContext,
|
|
998
|
+
Ft as UserProvider,
|
|
999
|
+
Yt as useFormDisabledContext
|
|
601
1000
|
};
|