@luizleon/sf.prefeiturasp.vuecomponents 0.0.18 → 0.0.20
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/lib.es.js +2003 -1509
- package/dist/lib.es.js.map +1 -1
- package/dist/lib.umd.js +36 -35
- package/dist/lib.umd.js.map +1 -1
- package/dist/services/dialogService.d.ts +2 -2
- package/package.json +17 -5
- package/src/common/appResult.ts +0 -22
- package/src/components/button/Button.d.ts +0 -42
- package/src/components/button/Button.vue +0 -61
- package/src/components/content/Content.d.ts +0 -35
- package/src/components/content/Content.vue +0 -41
- package/src/components/icon/Icon.d.ts +0 -38
- package/src/components/icon/Icon.vue +0 -43
- package/src/components/internal/HeaderAvatar.vue +0 -49
- package/src/components/internal/LoadingCircle.vue +0 -16
- package/src/components/internal/MenuIcon.vue +0 -13
- package/src/components/internal/ScrollToTop.vue +0 -26
- package/src/components/internal/ThemeToggle.ts +0 -41
- package/src/components/internal/ThemeToggle.vue +0 -23
- package/src/components/internal/cssClassBuilder.ts +0 -44
- package/src/components/layout/Layout.d.ts +0 -44
- package/src/components/layout/Layout.vue +0 -51
- package/src/components/navmenulink/NavMenuLink.d.ts +0 -35
- package/src/components/navmenulink/NavMenuLink.vue +0 -41
- package/src/components/tabnavigation/TabNavigation.d.ts +0 -42
- package/src/components/tabnavigation/TabNavigation.vue +0 -117
- package/src/enum/cor.ts +0 -9
- package/src/enum/index.ts +0 -2
- package/src/enum/tamanho.ts +0 -5
- package/src/index.ts +0 -62
- package/src/keycloak.d.ts +0 -671
- package/src/keycloak.js +0 -1731
- package/src/services/authService.ts +0 -68
- package/src/services/dialogService.ts +0 -64
- package/src/services/navMenuService.ts +0 -21
- package/src/style/componentes.scss +0 -15
- package/src/style/src/_animation.scss +0 -441
- package/src/style/src/_display.scss +0 -10
- package/src/style/src/_flexbox.scss +0 -85
- package/src/style/src/_functions.scss +0 -171
- package/src/style/src/_gap.scss +0 -8
- package/src/style/src/_grid.scss +0 -100
- package/src/style/src/_mixins.scss +0 -633
- package/src/style/src/_normalize.scss +0 -351
- package/src/style/src/_ripple.scss +0 -30
- package/src/style/src/_size.scss +0 -98
- package/src/style/src/_spacing.scss +0 -42
- package/src/style/src/_typography.scss +0 -43
- package/src/style/src/_variables.scss +0 -87
- package/src/style/src/components/_button.scss +0 -107
- package/src/style/src/components/_content.scss +0 -57
- package/src/style/src/components/_drawer.scss +0 -99
- package/src/style/src/components/_headerAvatar.scss +0 -22
- package/src/style/src/components/_icon.scss +0 -120
- package/src/style/src/components/_internal-icon-button.scss +0 -5
- package/src/style/src/components/_layout.scss +0 -183
- package/src/style/src/components/_loading-circle.scss +0 -24
- package/src/style/src/components/_navmenulink.scss +0 -31
- package/src/style/src/components/_scrollToTop.scss +0 -28
- package/src/style/src/components/_svg_icon.scss +0 -5
- package/src/style/src/components/_tab-navigation.scss +0 -93
- package/src/style/src/components/_themetoggle.scss +0 -25
- package/src/style/src/components/_tooltip.scss +0 -55
- package/src/style/src/sweetalert/_sweetalert.scss +0 -9
- package/src/style/src/sweetalert/scss/_animations.scss +0 -197
- package/src/style/src/sweetalert/scss/_body.scss +0 -45
- package/src/style/src/sweetalert/scss/_core.scss +0 -863
- package/src/style/src/sweetalert/scss/_mixins.scss +0 -16
- package/src/style/src/sweetalert/scss/_theming.scss +0 -8
- package/src/style/src/sweetalert/scss/_toasts-animations.scss +0 -83
- package/src/style/src/sweetalert/scss/_toasts-body.scss +0 -85
- package/src/style/src/sweetalert/scss/_toasts.scss +0 -203
- package/src/style/src/sweetalert/scss/_variables.scss +0 -265
- package/src/style/tema.scss +0 -169
- package/src/ts-helpers.d.ts +0 -57
- package/tsconfig.json +0 -19
- package/vite.config.js +0 -26
package/dist/lib.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as
|
|
5
|
-
class
|
|
1
|
+
var Er = Object.defineProperty;
|
|
2
|
+
var Tr = (t, e, n) => e in t ? Er(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var gt = (t, e, n) => (Tr(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
|
+
import { ref as _t, openBlock as J, createElementBlock as Ae, createElementVNode as j, defineComponent as $e, normalizeStyle as xn, normalizeClass as ke, mergeProps as Sr, createBlock as lt, Fragment as Co, createTextVNode as Lr, toDisplayString as Wt, createCommentVNode as Cn, unref as He, createStaticVNode as Ir, createVNode as wt, renderSlot as De, resolveComponent as Eo, withCtx as To, onMounted as So, onBeforeUnmount as Pr, renderList as Rr, nextTick as Or } from "vue";
|
|
5
|
+
class Fr {
|
|
6
6
|
constructor() {
|
|
7
|
-
|
|
7
|
+
gt(this, "_visible", _t(!1));
|
|
8
8
|
}
|
|
9
9
|
get IsVisible() {
|
|
10
10
|
return this._visible.value === !0;
|
|
@@ -19,16 +19,16 @@ class Yn {
|
|
|
19
19
|
this._visible.value = !0;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
const
|
|
23
|
-
var
|
|
24
|
-
const
|
|
22
|
+
const Br = new Fr(), Lo = () => Br;
|
|
23
|
+
var Io = /* @__PURE__ */ ((t) => (t.Primary = "primary", t.Secondary = "secondary", t.Info = "info", t.Success = "success", t.Help = "help", t.Warn = "warn", t.Error = "error", t))(Io || {}), kt = /* @__PURE__ */ ((t) => (t.Pequeno = "sm", t.Medio = "md", t.Grande = "lg", t))(kt || {});
|
|
24
|
+
const Po = (t, e) => {
|
|
25
25
|
const n = t.__vccOpts || t;
|
|
26
26
|
for (const [o, i] of e)
|
|
27
27
|
n[o] = i;
|
|
28
28
|
return n;
|
|
29
|
-
},
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
29
|
+
}, Mr = {}, Ur = { class: "sf-loading-circle" }, Dr = /* @__PURE__ */ j("div", null, [
|
|
30
|
+
/* @__PURE__ */ j("svg", { viewBox: "25 25 50 50" }, [
|
|
31
|
+
/* @__PURE__ */ j("circle", {
|
|
32
32
|
cx: "50",
|
|
33
33
|
cy: "50",
|
|
34
34
|
r: "20",
|
|
@@ -37,20 +37,20 @@ const an = (t, e) => {
|
|
|
37
37
|
"stroke-miterlimit": "10"
|
|
38
38
|
})
|
|
39
39
|
])
|
|
40
|
-
], -1),
|
|
41
|
-
|
|
40
|
+
], -1), Nr = [
|
|
41
|
+
Dr
|
|
42
42
|
];
|
|
43
|
-
function
|
|
44
|
-
return
|
|
43
|
+
function $r(t, e) {
|
|
44
|
+
return J(), Ae("div", Ur, Nr);
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
class
|
|
46
|
+
const Hr = /* @__PURE__ */ Po(Mr, [["render", $r]]);
|
|
47
|
+
class st {
|
|
48
48
|
/**
|
|
49
49
|
* Creates a new instance of the CssClassBuilder class.
|
|
50
50
|
* @param value The initial value of the CSS class string.
|
|
51
51
|
*/
|
|
52
52
|
constructor(e) {
|
|
53
|
-
|
|
53
|
+
gt(this, "retorno");
|
|
54
54
|
this.retorno = e ?? "";
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
@@ -78,7 +78,7 @@ class Be {
|
|
|
78
78
|
return this.retorno.trim();
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const jr = ["disabled", "tabindex"], zr = ["data-color"], jt = /* @__PURE__ */ $e({
|
|
82
82
|
__name: "Icon",
|
|
83
83
|
props: {
|
|
84
84
|
icone: {},
|
|
@@ -88,42 +88,42 @@ const oo = ["disabled", "tabindex"], ro = ["data-color"], st = /* @__PURE__ */ y
|
|
|
88
88
|
disabled: { type: Boolean },
|
|
89
89
|
loading: { type: Boolean },
|
|
90
90
|
button: { type: Boolean },
|
|
91
|
-
tamanho: { default:
|
|
91
|
+
tamanho: { default: kt.Medio },
|
|
92
92
|
dot: { type: Boolean },
|
|
93
|
-
dotColor: { default:
|
|
93
|
+
dotColor: { default: Io.Error },
|
|
94
94
|
buttonProps: {}
|
|
95
95
|
},
|
|
96
96
|
setup(t) {
|
|
97
97
|
const e = t;
|
|
98
98
|
function n() {
|
|
99
|
-
return new
|
|
99
|
+
return new st(`${e.class} sf-icon`).AddClass("sf-component-loading", e.loading).AddClass("sf-component-disabled", e.disabled).AddClass("sf-icon-button", e.button).AddClass("sf-icon-small", e.tamanho === kt.Pequeno).AddClass("sf-icon-medium", e.tamanho === kt.Medio).AddClass("sf-icon-large", e.tamanho === kt.Grande).AddClass("sf-ripple", e.button === !0).Build();
|
|
100
100
|
}
|
|
101
|
-
return (o, i) => (
|
|
102
|
-
style:
|
|
103
|
-
class:
|
|
101
|
+
return (o, i) => (J(), Ae("div", {
|
|
102
|
+
style: xn(e.style),
|
|
103
|
+
class: ke(n())
|
|
104
104
|
}, [
|
|
105
|
-
|
|
105
|
+
j("button", Sr({
|
|
106
106
|
class: "material-symbols-outlined",
|
|
107
107
|
disabled: e.disabled || e.loading
|
|
108
108
|
}, e.buttonProps, {
|
|
109
109
|
tabindex: e.button ? void 0 : -1
|
|
110
110
|
}), [
|
|
111
|
-
e.loading ? (
|
|
112
|
-
|
|
111
|
+
e.loading ? (J(), lt(Hr, { key: 0 })) : (J(), Ae(Co, { key: 1 }, [
|
|
112
|
+
Lr(Wt(e.icone), 1)
|
|
113
113
|
], 64))
|
|
114
|
-
], 16,
|
|
115
|
-
e.dot ? (
|
|
114
|
+
], 16, jr),
|
|
115
|
+
e.dot ? (J(), Ae("span", {
|
|
116
116
|
key: 0,
|
|
117
117
|
"data-color": e.dotColor
|
|
118
|
-
}, null, 8,
|
|
118
|
+
}, null, 8, zr)) : Cn("", !0)
|
|
119
119
|
], 6));
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
|
-
var
|
|
123
|
-
function
|
|
122
|
+
var Vr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
123
|
+
function Wr(t) {
|
|
124
124
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function qr(t) {
|
|
127
127
|
if (t.__esModule)
|
|
128
128
|
return t;
|
|
129
129
|
var e = t.default;
|
|
@@ -144,16 +144,16 @@ function ao(t) {
|
|
|
144
144
|
});
|
|
145
145
|
}), n;
|
|
146
146
|
}
|
|
147
|
-
var
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
var
|
|
152
|
-
for (var
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
function
|
|
147
|
+
var qt = {};
|
|
148
|
+
qt.byteLength = Yr;
|
|
149
|
+
qt.toByteArray = Xr;
|
|
150
|
+
qt.fromByteArray = es;
|
|
151
|
+
var Oe = [], Ce = [], Kr = typeof Uint8Array < "u" ? Uint8Array : Array, an = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
152
|
+
for (var ot = 0, Gr = an.length; ot < Gr; ++ot)
|
|
153
|
+
Oe[ot] = an[ot], Ce[an.charCodeAt(ot)] = ot;
|
|
154
|
+
Ce["-".charCodeAt(0)] = 62;
|
|
155
|
+
Ce["_".charCodeAt(0)] = 63;
|
|
156
|
+
function Ro(t) {
|
|
157
157
|
var e = t.length;
|
|
158
158
|
if (e % 4 > 0)
|
|
159
159
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -162,41 +162,41 @@ function cn(t) {
|
|
|
162
162
|
var o = n === e ? 0 : 4 - n % 4;
|
|
163
163
|
return [n, o];
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
var e =
|
|
165
|
+
function Yr(t) {
|
|
166
|
+
var e = Ro(t), n = e[0], o = e[1];
|
|
167
167
|
return (n + o) * 3 / 4 - o;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Jr(t, e, n) {
|
|
170
170
|
return (e + n) * 3 / 4 - n;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
173
|
-
var e, n =
|
|
174
|
-
for (
|
|
175
|
-
e =
|
|
176
|
-
return i === 2 && (e =
|
|
172
|
+
function Xr(t) {
|
|
173
|
+
var e, n = Ro(t), o = n[0], i = n[1], c = new Kr(Jr(t, o, i)), x = 0, L = i > 0 ? o - 4 : o, u;
|
|
174
|
+
for (u = 0; u < L; u += 4)
|
|
175
|
+
e = Ce[t.charCodeAt(u)] << 18 | Ce[t.charCodeAt(u + 1)] << 12 | Ce[t.charCodeAt(u + 2)] << 6 | Ce[t.charCodeAt(u + 3)], c[x++] = e >> 16 & 255, c[x++] = e >> 8 & 255, c[x++] = e & 255;
|
|
176
|
+
return i === 2 && (e = Ce[t.charCodeAt(u)] << 2 | Ce[t.charCodeAt(u + 1)] >> 4, c[x++] = e & 255), i === 1 && (e = Ce[t.charCodeAt(u)] << 10 | Ce[t.charCodeAt(u + 1)] << 4 | Ce[t.charCodeAt(u + 2)] >> 2, c[x++] = e >> 8 & 255, c[x++] = e & 255), c;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
return
|
|
178
|
+
function Zr(t) {
|
|
179
|
+
return Oe[t >> 18 & 63] + Oe[t >> 12 & 63] + Oe[t >> 6 & 63] + Oe[t & 63];
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function Qr(t, e, n) {
|
|
182
182
|
for (var o, i = [], c = e; c < n; c += 3)
|
|
183
|
-
o = (t[c] << 16 & 16711680) + (t[c + 1] << 8 & 65280) + (t[c + 2] & 255), i.push(
|
|
183
|
+
o = (t[c] << 16 & 16711680) + (t[c + 1] << 8 & 65280) + (t[c + 2] & 255), i.push(Zr(o));
|
|
184
184
|
return i.join("");
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
for (var e, n = t.length, o = n % 3, i = [], c = 16383, x = 0,
|
|
188
|
-
i.push(
|
|
186
|
+
function es(t) {
|
|
187
|
+
for (var e, n = t.length, o = n % 3, i = [], c = 16383, x = 0, L = n - o; x < L; x += c)
|
|
188
|
+
i.push(Qr(t, x, x + c > L ? L : x + c));
|
|
189
189
|
return o === 1 ? (e = t[n - 1], i.push(
|
|
190
|
-
|
|
190
|
+
Oe[e >> 2] + Oe[e << 4 & 63] + "=="
|
|
191
191
|
)) : o === 2 && (e = (t[n - 2] << 8) + t[n - 1], i.push(
|
|
192
|
-
|
|
192
|
+
Oe[e >> 10] + Oe[e >> 4 & 63] + Oe[e << 2 & 63] + "="
|
|
193
193
|
)), i.join("");
|
|
194
194
|
}
|
|
195
|
-
var
|
|
196
|
-
const
|
|
195
|
+
var Oo = { exports: {} };
|
|
196
|
+
const ts = {}, ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
197
197
|
__proto__: null,
|
|
198
|
-
default:
|
|
199
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
198
|
+
default: ts
|
|
199
|
+
}, Symbol.toStringTag, { value: "Module" })), no = /* @__PURE__ */ qr(ns);
|
|
200
200
|
/**
|
|
201
201
|
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
|
202
202
|
*
|
|
@@ -210,8 +210,8 @@ const bo = {}, vo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
210
210
|
var e = "input is invalid type", n = typeof window == "object", o = n ? window : {};
|
|
211
211
|
o.JS_SHA256_NO_WINDOW && (n = !1);
|
|
212
212
|
var i = !n && typeof self == "object", c = !o.JS_SHA256_NO_NODE_JS && typeof process == "object" && process.versions && process.versions.node;
|
|
213
|
-
c ? o =
|
|
214
|
-
var x = !o.JS_SHA256_NO_COMMON_JS && !0 && t.exports,
|
|
213
|
+
c ? o = Vr : i && (o = self);
|
|
214
|
+
var x = !o.JS_SHA256_NO_COMMON_JS && !0 && t.exports, L = !o.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer < "u", u = "0123456789abcdef".split(""), H = [-2147483648, 8388608, 32768, 128], W = [24, 16, 8, 0], Q = [
|
|
215
215
|
1116352408,
|
|
216
216
|
1899447441,
|
|
217
217
|
3049323471,
|
|
@@ -276,189 +276,189 @@ const bo = {}, vo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
276
276
|
2756734187,
|
|
277
277
|
3204031479,
|
|
278
278
|
3329325298
|
|
279
|
-
],
|
|
280
|
-
(o.JS_SHA256_NO_NODE_JS || !Array.isArray) && (Array.isArray = function(
|
|
281
|
-
return Object.prototype.toString.call(
|
|
282
|
-
}),
|
|
283
|
-
return typeof
|
|
279
|
+
], Le = ["hex", "array", "digest", "arrayBuffer"], z = [];
|
|
280
|
+
(o.JS_SHA256_NO_NODE_JS || !Array.isArray) && (Array.isArray = function(f) {
|
|
281
|
+
return Object.prototype.toString.call(f) === "[object Array]";
|
|
282
|
+
}), L && (o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView) && (ArrayBuffer.isView = function(f) {
|
|
283
|
+
return typeof f == "object" && f.buffer && f.buffer.constructor === ArrayBuffer;
|
|
284
284
|
});
|
|
285
|
-
var
|
|
286
|
-
return function(
|
|
287
|
-
return new D(
|
|
285
|
+
var Be = function(f, k) {
|
|
286
|
+
return function(I) {
|
|
287
|
+
return new D(k, !0).update(I)[f]();
|
|
288
288
|
};
|
|
289
|
-
},
|
|
290
|
-
var
|
|
291
|
-
c && (
|
|
292
|
-
return new D(
|
|
293
|
-
},
|
|
294
|
-
return
|
|
289
|
+
}, Xe = function(f) {
|
|
290
|
+
var k = Be("hex", f);
|
|
291
|
+
c && (k = ve(k, f)), k.create = function() {
|
|
292
|
+
return new D(f);
|
|
293
|
+
}, k.update = function(w) {
|
|
294
|
+
return k.create().update(w);
|
|
295
295
|
};
|
|
296
|
-
for (var
|
|
297
|
-
var
|
|
298
|
-
|
|
296
|
+
for (var I = 0; I < Le.length; ++I) {
|
|
297
|
+
var A = Le[I];
|
|
298
|
+
k[A] = Be(A, f);
|
|
299
299
|
}
|
|
300
|
-
return
|
|
301
|
-
},
|
|
302
|
-
var
|
|
303
|
-
|
|
304
|
-
return new
|
|
300
|
+
return k;
|
|
301
|
+
}, ve = function(f, k) {
|
|
302
|
+
var I = no, A = no.Buffer, w = k ? "sha224" : "sha256", y;
|
|
303
|
+
A.from && !o.JS_SHA256_NO_BUFFER_FROM ? y = A.from : y = function(p) {
|
|
304
|
+
return new A(p);
|
|
305
305
|
};
|
|
306
|
-
var
|
|
307
|
-
if (typeof
|
|
308
|
-
return
|
|
309
|
-
if (
|
|
306
|
+
var O = function(p) {
|
|
307
|
+
if (typeof p == "string")
|
|
308
|
+
return I.createHash(w).update(p, "utf8").digest("hex");
|
|
309
|
+
if (p == null)
|
|
310
310
|
throw new Error(e);
|
|
311
|
-
return
|
|
311
|
+
return p.constructor === ArrayBuffer && (p = new Uint8Array(p)), Array.isArray(p) || ArrayBuffer.isView(p) || p.constructor === A ? I.createHash(w).update(y(p)).digest("hex") : f(p);
|
|
312
312
|
};
|
|
313
|
-
return
|
|
314
|
-
},
|
|
315
|
-
return function(
|
|
316
|
-
return new
|
|
313
|
+
return O;
|
|
314
|
+
}, Ze = function(f, k) {
|
|
315
|
+
return function(I, A) {
|
|
316
|
+
return new ye(I, k, !0).update(A)[f]();
|
|
317
317
|
};
|
|
318
|
-
},
|
|
319
|
-
var
|
|
320
|
-
|
|
321
|
-
return new
|
|
322
|
-
},
|
|
323
|
-
return
|
|
318
|
+
}, de = function(f) {
|
|
319
|
+
var k = Ze("hex", f);
|
|
320
|
+
k.create = function(w) {
|
|
321
|
+
return new ye(w, f);
|
|
322
|
+
}, k.update = function(w, y) {
|
|
323
|
+
return k.create(w).update(y);
|
|
324
324
|
};
|
|
325
|
-
for (var
|
|
326
|
-
var
|
|
327
|
-
|
|
325
|
+
for (var I = 0; I < Le.length; ++I) {
|
|
326
|
+
var A = Le[I];
|
|
327
|
+
k[A] = Ze(A, f);
|
|
328
328
|
}
|
|
329
|
-
return
|
|
329
|
+
return k;
|
|
330
330
|
};
|
|
331
|
-
function D(
|
|
332
|
-
|
|
331
|
+
function D(f, k) {
|
|
332
|
+
k ? (z[0] = z[16] = z[1] = z[2] = z[3] = z[4] = z[5] = z[6] = z[7] = z[8] = z[9] = z[10] = z[11] = z[12] = z[13] = z[14] = z[15] = 0, this.blocks = z) : this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], f ? (this.h0 = 3238371032, this.h1 = 914150663, this.h2 = 812702999, this.h3 = 4144912697, this.h4 = 4290775857, this.h5 = 1750603025, this.h6 = 1694076839, this.h7 = 3204075428) : (this.h0 = 1779033703, this.h1 = 3144134277, this.h2 = 1013904242, this.h3 = 2773480762, this.h4 = 1359893119, this.h5 = 2600822924, this.h6 = 528734635, this.h7 = 1541459225), this.block = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0, this.is224 = f;
|
|
333
333
|
}
|
|
334
|
-
D.prototype.update = function(
|
|
334
|
+
D.prototype.update = function(f) {
|
|
335
335
|
if (!this.finalized) {
|
|
336
|
-
var
|
|
337
|
-
if (
|
|
338
|
-
if (
|
|
339
|
-
if (
|
|
336
|
+
var k, I = typeof f;
|
|
337
|
+
if (I !== "string") {
|
|
338
|
+
if (I === "object") {
|
|
339
|
+
if (f === null)
|
|
340
340
|
throw new Error(e);
|
|
341
|
-
if (
|
|
342
|
-
|
|
343
|
-
else if (!Array.isArray(
|
|
341
|
+
if (L && f.constructor === ArrayBuffer)
|
|
342
|
+
f = new Uint8Array(f);
|
|
343
|
+
else if (!Array.isArray(f) && (!L || !ArrayBuffer.isView(f)))
|
|
344
344
|
throw new Error(e);
|
|
345
345
|
} else
|
|
346
346
|
throw new Error(e);
|
|
347
|
-
|
|
347
|
+
k = !0;
|
|
348
348
|
}
|
|
349
|
-
for (var
|
|
350
|
-
if (this.hashed && (this.hashed = !1,
|
|
351
|
-
for (
|
|
352
|
-
|
|
349
|
+
for (var A, w = 0, y, O = f.length, p = this.blocks; w < O; ) {
|
|
350
|
+
if (this.hashed && (this.hashed = !1, p[0] = this.block, p[16] = p[1] = p[2] = p[3] = p[4] = p[5] = p[6] = p[7] = p[8] = p[9] = p[10] = p[11] = p[12] = p[13] = p[14] = p[15] = 0), k)
|
|
351
|
+
for (y = this.start; w < O && y < 64; ++w)
|
|
352
|
+
p[y >> 2] |= f[w] << W[y++ & 3];
|
|
353
353
|
else
|
|
354
|
-
for (
|
|
355
|
-
|
|
356
|
-
this.lastByteIndex =
|
|
354
|
+
for (y = this.start; w < O && y < 64; ++w)
|
|
355
|
+
A = f.charCodeAt(w), A < 128 ? p[y >> 2] |= A << W[y++ & 3] : A < 2048 ? (p[y >> 2] |= (192 | A >> 6) << W[y++ & 3], p[y >> 2] |= (128 | A & 63) << W[y++ & 3]) : A < 55296 || A >= 57344 ? (p[y >> 2] |= (224 | A >> 12) << W[y++ & 3], p[y >> 2] |= (128 | A >> 6 & 63) << W[y++ & 3], p[y >> 2] |= (128 | A & 63) << W[y++ & 3]) : (A = 65536 + ((A & 1023) << 10 | f.charCodeAt(++w) & 1023), p[y >> 2] |= (240 | A >> 18) << W[y++ & 3], p[y >> 2] |= (128 | A >> 12 & 63) << W[y++ & 3], p[y >> 2] |= (128 | A >> 6 & 63) << W[y++ & 3], p[y >> 2] |= (128 | A & 63) << W[y++ & 3]);
|
|
356
|
+
this.lastByteIndex = y, this.bytes += y - this.start, y >= 64 ? (this.block = p[16], this.start = y - 64, this.hash(), this.hashed = !0) : this.start = y;
|
|
357
357
|
}
|
|
358
358
|
return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this;
|
|
359
359
|
}
|
|
360
360
|
}, D.prototype.finalize = function() {
|
|
361
361
|
if (!this.finalized) {
|
|
362
362
|
this.finalized = !0;
|
|
363
|
-
var
|
|
364
|
-
|
|
363
|
+
var f = this.blocks, k = this.lastByteIndex;
|
|
364
|
+
f[16] = this.block, f[k >> 2] |= H[k & 3], this.block = f[16], k >= 56 && (this.hashed || this.hash(), f[0] = this.block, f[16] = f[1] = f[2] = f[3] = f[4] = f[5] = f[6] = f[7] = f[8] = f[9] = f[10] = f[11] = f[12] = f[13] = f[14] = f[15] = 0), f[14] = this.hBytes << 3 | this.bytes >>> 29, f[15] = this.bytes << 3, this.hash();
|
|
365
365
|
}
|
|
366
366
|
}, D.prototype.hash = function() {
|
|
367
|
-
var
|
|
368
|
-
for (
|
|
369
|
-
|
|
370
|
-
for (
|
|
371
|
-
this.first ? (this.is224 ? (
|
|
372
|
-
this.h0 = this.h0 +
|
|
367
|
+
var f = this.h0, k = this.h1, I = this.h2, A = this.h3, w = this.h4, y = this.h5, O = this.h6, p = this.h7, F = this.blocks, q, Y, G, ae, P, fe, r, a, d, g, h;
|
|
368
|
+
for (q = 16; q < 64; ++q)
|
|
369
|
+
P = F[q - 15], Y = (P >>> 7 | P << 25) ^ (P >>> 18 | P << 14) ^ P >>> 3, P = F[q - 2], G = (P >>> 17 | P << 15) ^ (P >>> 19 | P << 13) ^ P >>> 10, F[q] = F[q - 16] + Y + F[q - 7] + G << 0;
|
|
370
|
+
for (h = k & I, q = 0; q < 64; q += 4)
|
|
371
|
+
this.first ? (this.is224 ? (a = 300032, P = F[0] - 1413257819, p = P - 150054599 << 0, A = P + 24177077 << 0) : (a = 704751109, P = F[0] - 210244248, p = P - 1521486534 << 0, A = P + 143694565 << 0), this.first = !1) : (Y = (f >>> 2 | f << 30) ^ (f >>> 13 | f << 19) ^ (f >>> 22 | f << 10), G = (w >>> 6 | w << 26) ^ (w >>> 11 | w << 21) ^ (w >>> 25 | w << 7), a = f & k, ae = a ^ f & I ^ h, r = w & y ^ ~w & O, P = p + G + r + Q[q] + F[q], fe = Y + ae, p = A + P << 0, A = P + fe << 0), Y = (A >>> 2 | A << 30) ^ (A >>> 13 | A << 19) ^ (A >>> 22 | A << 10), G = (p >>> 6 | p << 26) ^ (p >>> 11 | p << 21) ^ (p >>> 25 | p << 7), d = A & f, ae = d ^ A & k ^ a, r = p & w ^ ~p & y, P = O + G + r + Q[q + 1] + F[q + 1], fe = Y + ae, O = I + P << 0, I = P + fe << 0, Y = (I >>> 2 | I << 30) ^ (I >>> 13 | I << 19) ^ (I >>> 22 | I << 10), G = (O >>> 6 | O << 26) ^ (O >>> 11 | O << 21) ^ (O >>> 25 | O << 7), g = I & A, ae = g ^ I & f ^ d, r = O & p ^ ~O & w, P = y + G + r + Q[q + 2] + F[q + 2], fe = Y + ae, y = k + P << 0, k = P + fe << 0, Y = (k >>> 2 | k << 30) ^ (k >>> 13 | k << 19) ^ (k >>> 22 | k << 10), G = (y >>> 6 | y << 26) ^ (y >>> 11 | y << 21) ^ (y >>> 25 | y << 7), h = k & I, ae = h ^ k & A ^ g, r = y & O ^ ~y & p, P = w + G + r + Q[q + 3] + F[q + 3], fe = Y + ae, w = f + P << 0, f = P + fe << 0, this.chromeBugWorkAround = !0;
|
|
372
|
+
this.h0 = this.h0 + f << 0, this.h1 = this.h1 + k << 0, this.h2 = this.h2 + I << 0, this.h3 = this.h3 + A << 0, this.h4 = this.h4 + w << 0, this.h5 = this.h5 + y << 0, this.h6 = this.h6 + O << 0, this.h7 = this.h7 + p << 0;
|
|
373
373
|
}, D.prototype.hex = function() {
|
|
374
374
|
this.finalize();
|
|
375
|
-
var
|
|
376
|
-
return this.is224 || (
|
|
375
|
+
var f = this.h0, k = this.h1, I = this.h2, A = this.h3, w = this.h4, y = this.h5, O = this.h6, p = this.h7, F = u[f >> 28 & 15] + u[f >> 24 & 15] + u[f >> 20 & 15] + u[f >> 16 & 15] + u[f >> 12 & 15] + u[f >> 8 & 15] + u[f >> 4 & 15] + u[f & 15] + u[k >> 28 & 15] + u[k >> 24 & 15] + u[k >> 20 & 15] + u[k >> 16 & 15] + u[k >> 12 & 15] + u[k >> 8 & 15] + u[k >> 4 & 15] + u[k & 15] + u[I >> 28 & 15] + u[I >> 24 & 15] + u[I >> 20 & 15] + u[I >> 16 & 15] + u[I >> 12 & 15] + u[I >> 8 & 15] + u[I >> 4 & 15] + u[I & 15] + u[A >> 28 & 15] + u[A >> 24 & 15] + u[A >> 20 & 15] + u[A >> 16 & 15] + u[A >> 12 & 15] + u[A >> 8 & 15] + u[A >> 4 & 15] + u[A & 15] + u[w >> 28 & 15] + u[w >> 24 & 15] + u[w >> 20 & 15] + u[w >> 16 & 15] + u[w >> 12 & 15] + u[w >> 8 & 15] + u[w >> 4 & 15] + u[w & 15] + u[y >> 28 & 15] + u[y >> 24 & 15] + u[y >> 20 & 15] + u[y >> 16 & 15] + u[y >> 12 & 15] + u[y >> 8 & 15] + u[y >> 4 & 15] + u[y & 15] + u[O >> 28 & 15] + u[O >> 24 & 15] + u[O >> 20 & 15] + u[O >> 16 & 15] + u[O >> 12 & 15] + u[O >> 8 & 15] + u[O >> 4 & 15] + u[O & 15];
|
|
376
|
+
return this.is224 || (F += u[p >> 28 & 15] + u[p >> 24 & 15] + u[p >> 20 & 15] + u[p >> 16 & 15] + u[p >> 12 & 15] + u[p >> 8 & 15] + u[p >> 4 & 15] + u[p & 15]), F;
|
|
377
377
|
}, D.prototype.toString = D.prototype.hex, D.prototype.digest = function() {
|
|
378
378
|
this.finalize();
|
|
379
|
-
var
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
v >> 24 & 255,
|
|
385
|
-
v >> 16 & 255,
|
|
386
|
-
v >> 8 & 255,
|
|
387
|
-
v & 255,
|
|
388
|
-
_ >> 24 & 255,
|
|
389
|
-
_ >> 16 & 255,
|
|
390
|
-
_ >> 8 & 255,
|
|
391
|
-
_ & 255,
|
|
392
|
-
y >> 24 & 255,
|
|
393
|
-
y >> 16 & 255,
|
|
394
|
-
y >> 8 & 255,
|
|
395
|
-
y & 255,
|
|
379
|
+
var f = this.h0, k = this.h1, I = this.h2, A = this.h3, w = this.h4, y = this.h5, O = this.h6, p = this.h7, F = [
|
|
380
|
+
f >> 24 & 255,
|
|
381
|
+
f >> 16 & 255,
|
|
382
|
+
f >> 8 & 255,
|
|
383
|
+
f & 255,
|
|
396
384
|
k >> 24 & 255,
|
|
397
385
|
k >> 16 & 255,
|
|
398
386
|
k >> 8 & 255,
|
|
399
387
|
k & 255,
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
388
|
+
I >> 24 & 255,
|
|
389
|
+
I >> 16 & 255,
|
|
390
|
+
I >> 8 & 255,
|
|
391
|
+
I & 255,
|
|
392
|
+
A >> 24 & 255,
|
|
393
|
+
A >> 16 & 255,
|
|
394
|
+
A >> 8 & 255,
|
|
395
|
+
A & 255,
|
|
396
|
+
w >> 24 & 255,
|
|
397
|
+
w >> 16 & 255,
|
|
398
|
+
w >> 8 & 255,
|
|
399
|
+
w & 255,
|
|
400
|
+
y >> 24 & 255,
|
|
401
|
+
y >> 16 & 255,
|
|
402
|
+
y >> 8 & 255,
|
|
403
|
+
y & 255,
|
|
404
|
+
O >> 24 & 255,
|
|
405
|
+
O >> 16 & 255,
|
|
406
|
+
O >> 8 & 255,
|
|
407
|
+
O & 255
|
|
408
408
|
];
|
|
409
|
-
return this.is224 ||
|
|
409
|
+
return this.is224 || F.push(p >> 24 & 255, p >> 16 & 255, p >> 8 & 255, p & 255), F;
|
|
410
410
|
}, D.prototype.array = D.prototype.digest, D.prototype.arrayBuffer = function() {
|
|
411
411
|
this.finalize();
|
|
412
|
-
var
|
|
413
|
-
return
|
|
412
|
+
var f = new ArrayBuffer(this.is224 ? 28 : 32), k = new DataView(f);
|
|
413
|
+
return k.setUint32(0, this.h0), k.setUint32(4, this.h1), k.setUint32(8, this.h2), k.setUint32(12, this.h3), k.setUint32(16, this.h4), k.setUint32(20, this.h5), k.setUint32(24, this.h6), this.is224 || k.setUint32(28, this.h7), f;
|
|
414
414
|
};
|
|
415
|
-
function
|
|
416
|
-
var
|
|
417
|
-
if (
|
|
418
|
-
var
|
|
419
|
-
for (
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
} else if (
|
|
423
|
-
if (
|
|
415
|
+
function ye(f, k, I) {
|
|
416
|
+
var A, w = typeof f;
|
|
417
|
+
if (w === "string") {
|
|
418
|
+
var y = [], O = f.length, p = 0, F;
|
|
419
|
+
for (A = 0; A < O; ++A)
|
|
420
|
+
F = f.charCodeAt(A), F < 128 ? y[p++] = F : F < 2048 ? (y[p++] = 192 | F >> 6, y[p++] = 128 | F & 63) : F < 55296 || F >= 57344 ? (y[p++] = 224 | F >> 12, y[p++] = 128 | F >> 6 & 63, y[p++] = 128 | F & 63) : (F = 65536 + ((F & 1023) << 10 | f.charCodeAt(++A) & 1023), y[p++] = 240 | F >> 18, y[p++] = 128 | F >> 12 & 63, y[p++] = 128 | F >> 6 & 63, y[p++] = 128 | F & 63);
|
|
421
|
+
f = y;
|
|
422
|
+
} else if (w === "object") {
|
|
423
|
+
if (f === null)
|
|
424
424
|
throw new Error(e);
|
|
425
|
-
if (
|
|
426
|
-
|
|
427
|
-
else if (!Array.isArray(
|
|
425
|
+
if (L && f.constructor === ArrayBuffer)
|
|
426
|
+
f = new Uint8Array(f);
|
|
427
|
+
else if (!Array.isArray(f) && (!L || !ArrayBuffer.isView(f)))
|
|
428
428
|
throw new Error(e);
|
|
429
429
|
} else
|
|
430
430
|
throw new Error(e);
|
|
431
|
-
|
|
432
|
-
var
|
|
433
|
-
for (
|
|
434
|
-
var
|
|
435
|
-
|
|
431
|
+
f.length > 64 && (f = new D(k, !0).update(f).array());
|
|
432
|
+
var q = [], Y = [];
|
|
433
|
+
for (A = 0; A < 64; ++A) {
|
|
434
|
+
var G = f[A] || 0;
|
|
435
|
+
q[A] = 92 ^ G, Y[A] = 54 ^ G;
|
|
436
436
|
}
|
|
437
|
-
D.call(this,
|
|
437
|
+
D.call(this, k, I), this.update(Y), this.oKeyPad = q, this.inner = !0, this.sharedMemory = I;
|
|
438
438
|
}
|
|
439
|
-
|
|
439
|
+
ye.prototype = new D(), ye.prototype.finalize = function() {
|
|
440
440
|
if (D.prototype.finalize.call(this), this.inner) {
|
|
441
441
|
this.inner = !1;
|
|
442
|
-
var
|
|
443
|
-
D.call(this, this.is224, this.sharedMemory), this.update(this.oKeyPad), this.update(
|
|
442
|
+
var f = this.array();
|
|
443
|
+
D.call(this, this.is224, this.sharedMemory), this.update(this.oKeyPad), this.update(f), D.prototype.finalize.call(this);
|
|
444
444
|
}
|
|
445
445
|
};
|
|
446
|
-
var
|
|
447
|
-
|
|
446
|
+
var X = Xe();
|
|
447
|
+
X.sha256 = X, X.sha224 = Xe(!0), X.sha256.hmac = de(), X.sha224.hmac = de(!0), x ? t.exports = X : (o.sha256 = X.sha256, o.sha224 = X.sha224);
|
|
448
448
|
})();
|
|
449
|
-
})(
|
|
450
|
-
var
|
|
451
|
-
const
|
|
452
|
-
class
|
|
449
|
+
})(Oo);
|
|
450
|
+
var os = Oo.exports;
|
|
451
|
+
const rs = /* @__PURE__ */ Wr(os);
|
|
452
|
+
class At extends Error {
|
|
453
453
|
}
|
|
454
|
-
|
|
455
|
-
function
|
|
454
|
+
At.prototype.name = "InvalidTokenError";
|
|
455
|
+
function ss(t) {
|
|
456
456
|
return decodeURIComponent(atob(t).replace(/(.)/g, (e, n) => {
|
|
457
457
|
let o = n.charCodeAt(0).toString(16).toUpperCase();
|
|
458
458
|
return o.length < 2 && (o = "0" + o), "%" + o;
|
|
459
459
|
}));
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function is(t) {
|
|
462
462
|
let e = t.replace(/-/g, "+").replace(/_/g, "/");
|
|
463
463
|
switch (e.length % 4) {
|
|
464
464
|
case 0:
|
|
@@ -473,49 +473,49 @@ function xo(t) {
|
|
|
473
473
|
throw new Error("base64 string is not of the correct length");
|
|
474
474
|
}
|
|
475
475
|
try {
|
|
476
|
-
return
|
|
476
|
+
return ss(e);
|
|
477
477
|
} catch {
|
|
478
478
|
return atob(e);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function cn(t, e) {
|
|
482
482
|
if (typeof t != "string")
|
|
483
|
-
throw new
|
|
483
|
+
throw new At("Invalid token specified: must be a string");
|
|
484
484
|
e || (e = {});
|
|
485
485
|
const n = e.header === !0 ? 0 : 1, o = t.split(".")[n];
|
|
486
486
|
if (typeof o != "string")
|
|
487
|
-
throw new
|
|
487
|
+
throw new At(`Invalid token specified: missing part #${n + 1}`);
|
|
488
488
|
let i;
|
|
489
489
|
try {
|
|
490
|
-
i =
|
|
490
|
+
i = is(o);
|
|
491
491
|
} catch (c) {
|
|
492
|
-
throw new
|
|
492
|
+
throw new At(`Invalid token specified: invalid base64 for part #${n + 1} (${c.message})`);
|
|
493
493
|
}
|
|
494
494
|
try {
|
|
495
495
|
return JSON.parse(i);
|
|
496
496
|
} catch (c) {
|
|
497
|
-
throw new
|
|
497
|
+
throw new At(`Invalid token specified: invalid json for part #${n + 1} (${c.message})`);
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
if (typeof Promise > "u")
|
|
501
501
|
throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");
|
|
502
|
-
function
|
|
503
|
-
if (!(this instanceof
|
|
502
|
+
function Fo(t) {
|
|
503
|
+
if (!(this instanceof Fo))
|
|
504
504
|
throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");
|
|
505
505
|
for (var e = this, n, o = [], i, c = {
|
|
506
506
|
enable: !0,
|
|
507
507
|
callbackList: [],
|
|
508
508
|
interval: 5
|
|
509
|
-
}, x = document.getElementsByTagName("script"),
|
|
510
|
-
(x[
|
|
511
|
-
var
|
|
509
|
+
}, x = document.getElementsByTagName("script"), L = 0; L < x.length; L++)
|
|
510
|
+
(x[L].src.indexOf("keycloak.js") !== -1 || x[L].src.indexOf("keycloak.min.js") !== -1) && x[L].src.indexOf("version=") !== -1 && (e.iframeVersion = x[L].src.substring(x[L].src.indexOf("version=") + 8).split("&")[0]);
|
|
511
|
+
var u = !0, H = fe(console.info), W = fe(console.warn);
|
|
512
512
|
e.init = function(r) {
|
|
513
513
|
if (e.didInitialize)
|
|
514
514
|
throw new Error("A 'Keycloak' instance can only be initialized once.");
|
|
515
|
-
e.didInitialize = !0, e.authenticated = !1, i =
|
|
516
|
-
var
|
|
517
|
-
if (r &&
|
|
518
|
-
if (typeof r.useNonce < "u" && (
|
|
515
|
+
e.didInitialize = !0, e.authenticated = !1, i = P();
|
|
516
|
+
var a = ["default", "cordova", "cordova-native"];
|
|
517
|
+
if (r && a.indexOf(r.adapter) > -1 ? n = Y(r.adapter) : r && typeof r.adapter == "object" ? n = r.adapter : window.Cordova || window.cordova ? n = Y("cordova") : n = Y(), r) {
|
|
518
|
+
if (typeof r.useNonce < "u" && (u = r.useNonce), typeof r.checkLoginIframe < "u" && (c.enable = r.checkLoginIframe), r.checkLoginIframeInterval && (c.interval = r.checkLoginIframeInterval), r.onLoad === "login-required" && (e.loginRequired = !0), r.responseMode)
|
|
519
519
|
if (r.responseMode === "query" || r.responseMode === "fragment")
|
|
520
520
|
e.responseMode = r.responseMode;
|
|
521
521
|
else
|
|
@@ -544,755 +544,755 @@ function un(t) {
|
|
|
544
544
|
typeof r.enableLogging == "boolean" ? e.enableLogging = r.enableLogging : e.enableLogging = !1, typeof r.scope == "string" && (e.scope = r.scope), typeof r.acrValues == "string" && (e.acrValues = r.acrValues), typeof r.messageReceiveTimeout == "number" && r.messageReceiveTimeout > 0 ? e.messageReceiveTimeout = r.messageReceiveTimeout : e.messageReceiveTimeout = 1e4;
|
|
545
545
|
}
|
|
546
546
|
e.responseMode || (e.responseMode = "fragment"), e.responseType || (e.responseType = "code", e.flow = "standard");
|
|
547
|
-
var
|
|
548
|
-
|
|
549
|
-
e.onReady && e.onReady(e.authenticated),
|
|
550
|
-
}).catch(function(
|
|
551
|
-
|
|
547
|
+
var d = w(), g = w();
|
|
548
|
+
g.promise.then(function() {
|
|
549
|
+
e.onReady && e.onReady(e.authenticated), d.setSuccess(e.authenticated);
|
|
550
|
+
}).catch(function(E) {
|
|
551
|
+
d.setError(E);
|
|
552
552
|
});
|
|
553
|
-
var
|
|
554
|
-
function
|
|
555
|
-
var
|
|
556
|
-
|
|
557
|
-
|
|
553
|
+
var h = D();
|
|
554
|
+
function _() {
|
|
555
|
+
var E = function(N) {
|
|
556
|
+
N || (R.prompt = "none"), r && r.locale && (R.locale = r.locale), e.login(R).then(function() {
|
|
557
|
+
g.setSuccess();
|
|
558
558
|
}).catch(function(he) {
|
|
559
|
-
|
|
559
|
+
g.setError(he);
|
|
560
560
|
});
|
|
561
|
-
},
|
|
562
|
-
var
|
|
563
|
-
|
|
564
|
-
var
|
|
565
|
-
if (!(
|
|
566
|
-
var
|
|
567
|
-
|
|
561
|
+
}, C = function() {
|
|
562
|
+
var N = document.createElement("iframe"), he = e.createLoginUrl({ prompt: "none", redirectUri: e.silentCheckSsoRedirectUri });
|
|
563
|
+
N.setAttribute("src", he), N.setAttribute("sandbox", "allow-scripts allow-same-origin"), N.setAttribute("title", "keycloak-silent-check-sso"), N.style.display = "none", document.body.appendChild(N);
|
|
564
|
+
var ce = function(ee) {
|
|
565
|
+
if (!(ee.origin !== window.location.origin || N.contentWindow !== ee.source)) {
|
|
566
|
+
var Re = k(ee.data);
|
|
567
|
+
de(Re, g), document.body.removeChild(N), window.removeEventListener("message", ce);
|
|
568
568
|
}
|
|
569
569
|
};
|
|
570
|
-
window.addEventListener("message",
|
|
571
|
-
},
|
|
570
|
+
window.addEventListener("message", ce);
|
|
571
|
+
}, R = {};
|
|
572
572
|
switch (r.onLoad) {
|
|
573
573
|
case "check-sso":
|
|
574
|
-
c.enable ?
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
}).catch(function(
|
|
578
|
-
|
|
574
|
+
c.enable ? O().then(function() {
|
|
575
|
+
F().then(function(N) {
|
|
576
|
+
N ? g.setSuccess() : e.silentCheckSsoRedirectUri ? C() : E(!1);
|
|
577
|
+
}).catch(function(N) {
|
|
578
|
+
g.setError(N);
|
|
579
579
|
});
|
|
580
|
-
}) : e.silentCheckSsoRedirectUri ?
|
|
580
|
+
}) : e.silentCheckSsoRedirectUri ? C() : E(!1);
|
|
581
581
|
break;
|
|
582
582
|
case "login-required":
|
|
583
|
-
|
|
583
|
+
E(!0);
|
|
584
584
|
break;
|
|
585
585
|
default:
|
|
586
586
|
throw "Invalid value for onLoad";
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
function
|
|
590
|
-
var
|
|
591
|
-
if (
|
|
592
|
-
return
|
|
593
|
-
|
|
594
|
-
}).catch(function(
|
|
595
|
-
|
|
589
|
+
function m() {
|
|
590
|
+
var E = k(window.location.href);
|
|
591
|
+
if (E && window.history.replaceState(window.history.state, null, E.newUrl), E && E.valid)
|
|
592
|
+
return O().then(function() {
|
|
593
|
+
de(E, g);
|
|
594
|
+
}).catch(function(C) {
|
|
595
|
+
g.setError(C);
|
|
596
596
|
});
|
|
597
|
-
r ? r.token && r.refreshToken ? (
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
}).catch(function(
|
|
601
|
-
|
|
597
|
+
r ? r.token && r.refreshToken ? (X(r.token, r.refreshToken, r.idToken), c.enable ? O().then(function() {
|
|
598
|
+
F().then(function(C) {
|
|
599
|
+
C ? (e.onAuthSuccess && e.onAuthSuccess(), g.setSuccess(), p()) : g.setSuccess();
|
|
600
|
+
}).catch(function(C) {
|
|
601
|
+
g.setError(C);
|
|
602
602
|
});
|
|
603
603
|
}) : e.updateToken(-1).then(function() {
|
|
604
|
-
e.onAuthSuccess && e.onAuthSuccess(),
|
|
605
|
-
}).catch(function(
|
|
606
|
-
e.onAuthError && e.onAuthError(), r.onLoad ?
|
|
607
|
-
})) : r.onLoad ?
|
|
604
|
+
e.onAuthSuccess && e.onAuthSuccess(), g.setSuccess();
|
|
605
|
+
}).catch(function(C) {
|
|
606
|
+
e.onAuthError && e.onAuthError(), r.onLoad ? _() : g.setError(C);
|
|
607
|
+
})) : r.onLoad ? _() : g.setSuccess() : g.setSuccess();
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
var
|
|
611
|
-
(document.readyState === "interactive" || document.readyState === "complete") && (document.removeEventListener("readystatechange",
|
|
609
|
+
function b() {
|
|
610
|
+
var E = w(), C = function() {
|
|
611
|
+
(document.readyState === "interactive" || document.readyState === "complete") && (document.removeEventListener("readystatechange", C), E.setSuccess());
|
|
612
612
|
};
|
|
613
|
-
return document.addEventListener("readystatechange",
|
|
613
|
+
return document.addEventListener("readystatechange", C), C(), E.promise;
|
|
614
614
|
}
|
|
615
|
-
return
|
|
616
|
-
|
|
617
|
-
|
|
615
|
+
return h.then(function() {
|
|
616
|
+
b().then(q).then(m).catch(function(E) {
|
|
617
|
+
d.setError(E);
|
|
618
618
|
});
|
|
619
|
-
}),
|
|
620
|
-
|
|
621
|
-
}),
|
|
619
|
+
}), h.catch(function(E) {
|
|
620
|
+
d.setError(E);
|
|
621
|
+
}), d.promise;
|
|
622
622
|
}, e.login = function(r) {
|
|
623
623
|
return n.login(r);
|
|
624
624
|
};
|
|
625
|
-
function
|
|
626
|
-
var
|
|
627
|
-
if (
|
|
628
|
-
return
|
|
629
|
-
|
|
630
|
-
for (var
|
|
631
|
-
|
|
632
|
-
return
|
|
633
|
-
}
|
|
634
|
-
function
|
|
635
|
-
return
|
|
636
|
-
}
|
|
637
|
-
function
|
|
638
|
-
for (var
|
|
639
|
-
|
|
640
|
-
return String.fromCharCode.apply(null,
|
|
641
|
-
}
|
|
642
|
-
function
|
|
625
|
+
function Q(r) {
|
|
626
|
+
var a = null, d = window.crypto || window.msCrypto;
|
|
627
|
+
if (d && d.getRandomValues && window.Uint8Array)
|
|
628
|
+
return a = new Uint8Array(r), d.getRandomValues(a), a;
|
|
629
|
+
a = new Array(r);
|
|
630
|
+
for (var g = 0; g < a.length; g++)
|
|
631
|
+
a[g] = Math.floor(256 * Math.random());
|
|
632
|
+
return a;
|
|
633
|
+
}
|
|
634
|
+
function Le(r) {
|
|
635
|
+
return z(r, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
|
|
636
|
+
}
|
|
637
|
+
function z(r, a) {
|
|
638
|
+
for (var d = Q(r), g = new Array(r), h = 0; h < r; h++)
|
|
639
|
+
g[h] = a.charCodeAt(d[h] % a.length);
|
|
640
|
+
return String.fromCharCode.apply(null, g);
|
|
641
|
+
}
|
|
642
|
+
function Be(r, a) {
|
|
643
643
|
switch (r) {
|
|
644
644
|
case "S256":
|
|
645
|
-
var
|
|
646
|
-
return
|
|
645
|
+
var d = new Uint8Array(rs.arrayBuffer(a)), g = qt.fromByteArray(d).replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "");
|
|
646
|
+
return g;
|
|
647
647
|
default:
|
|
648
648
|
throw "Invalid value for pkceMethod";
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
function
|
|
652
|
-
var
|
|
651
|
+
function Xe(r) {
|
|
652
|
+
var a = {
|
|
653
653
|
id_token: {
|
|
654
654
|
acr: r
|
|
655
655
|
}
|
|
656
656
|
};
|
|
657
|
-
return JSON.stringify(
|
|
657
|
+
return JSON.stringify(a);
|
|
658
658
|
}
|
|
659
659
|
e.createLoginUrl = function(r) {
|
|
660
|
-
var
|
|
661
|
-
state:
|
|
662
|
-
nonce:
|
|
663
|
-
redirectUri: encodeURIComponent(
|
|
660
|
+
var a = f(), d = f(), g = n.redirectUri(r), h = {
|
|
661
|
+
state: a,
|
|
662
|
+
nonce: d,
|
|
663
|
+
redirectUri: encodeURIComponent(g)
|
|
664
664
|
};
|
|
665
|
-
r && r.prompt && (
|
|
666
|
-
var
|
|
667
|
-
r && r.action == "register" ?
|
|
668
|
-
var
|
|
669
|
-
|
|
670
|
-
var
|
|
671
|
-
if (
|
|
672
|
-
var
|
|
673
|
-
|
|
665
|
+
r && r.prompt && (h.prompt = r.prompt);
|
|
666
|
+
var _;
|
|
667
|
+
r && r.action == "register" ? _ = e.endpoints.register() : _ = e.endpoints.authorize();
|
|
668
|
+
var m = r && r.scope || e.scope;
|
|
669
|
+
m ? m.indexOf("openid") === -1 && (m = "openid " + m) : m = "openid";
|
|
670
|
+
var b = _ + "?client_id=" + encodeURIComponent(e.clientId) + "&redirect_uri=" + encodeURIComponent(g) + "&state=" + encodeURIComponent(a) + "&response_mode=" + encodeURIComponent(e.responseMode) + "&response_type=" + encodeURIComponent(e.responseType) + "&scope=" + encodeURIComponent(m);
|
|
671
|
+
if (u && (b = b + "&nonce=" + encodeURIComponent(d)), r && r.prompt && (b += "&prompt=" + encodeURIComponent(r.prompt)), r && r.maxAge && (b += "&max_age=" + encodeURIComponent(r.maxAge)), r && r.loginHint && (b += "&login_hint=" + encodeURIComponent(r.loginHint)), r && r.idpHint && (b += "&kc_idp_hint=" + encodeURIComponent(r.idpHint)), r && r.action && r.action != "register" && (b += "&kc_action=" + encodeURIComponent(r.action)), r && r.locale && (b += "&ui_locales=" + encodeURIComponent(r.locale)), r && r.acr) {
|
|
672
|
+
var E = Xe(r.acr);
|
|
673
|
+
b += "&claims=" + encodeURIComponent(E);
|
|
674
674
|
}
|
|
675
|
-
if ((r && r.acrValues || e.acrValues) && (
|
|
676
|
-
var
|
|
677
|
-
|
|
678
|
-
var
|
|
679
|
-
|
|
675
|
+
if ((r && r.acrValues || e.acrValues) && (b += "&acr_values=" + encodeURIComponent(r.acrValues || e.acrValues)), e.pkceMethod) {
|
|
676
|
+
var C = Le(96);
|
|
677
|
+
h.pkceCodeVerifier = C;
|
|
678
|
+
var R = Be(e.pkceMethod, C);
|
|
679
|
+
b += "&code_challenge=" + R, b += "&code_challenge_method=" + e.pkceMethod;
|
|
680
680
|
}
|
|
681
|
-
return i.add(
|
|
681
|
+
return i.add(h), b;
|
|
682
682
|
}, e.logout = function(r) {
|
|
683
683
|
return n.logout(r);
|
|
684
684
|
}, e.createLogoutUrl = function(r) {
|
|
685
|
-
var
|
|
686
|
-
return e.idToken && (
|
|
685
|
+
var a = e.endpoints.logout() + "?client_id=" + encodeURIComponent(e.clientId) + "&post_logout_redirect_uri=" + encodeURIComponent(n.redirectUri(r, !1));
|
|
686
|
+
return e.idToken && (a += "&id_token_hint=" + encodeURIComponent(e.idToken)), a;
|
|
687
687
|
}, e.register = function(r) {
|
|
688
688
|
return n.register(r);
|
|
689
689
|
}, e.createRegisterUrl = function(r) {
|
|
690
690
|
return r || (r = {}), r.action = "register", e.createLoginUrl(r);
|
|
691
691
|
}, e.createAccountUrl = function(r) {
|
|
692
|
-
var
|
|
693
|
-
return typeof
|
|
692
|
+
var a = ve(), d = void 0;
|
|
693
|
+
return typeof a < "u" && (d = a + "/account?referrer=" + encodeURIComponent(e.clientId) + "&referrer_uri=" + encodeURIComponent(n.redirectUri(r))), d;
|
|
694
694
|
}, e.accountManagement = function() {
|
|
695
695
|
return n.accountManagement();
|
|
696
696
|
}, e.hasRealmRole = function(r) {
|
|
697
|
-
var
|
|
698
|
-
return !!
|
|
699
|
-
}, e.hasResourceRole = function(r,
|
|
697
|
+
var a = e.realmAccess;
|
|
698
|
+
return !!a && a.roles.indexOf(r) >= 0;
|
|
699
|
+
}, e.hasResourceRole = function(r, a) {
|
|
700
700
|
if (!e.resourceAccess)
|
|
701
701
|
return !1;
|
|
702
|
-
var
|
|
703
|
-
return !!
|
|
702
|
+
var d = e.resourceAccess[a || e.clientId];
|
|
703
|
+
return !!d && d.roles.indexOf(r) >= 0;
|
|
704
704
|
}, e.loadUserProfile = function() {
|
|
705
|
-
var r =
|
|
706
|
-
|
|
707
|
-
var
|
|
708
|
-
return
|
|
709
|
-
|
|
710
|
-
},
|
|
705
|
+
var r = ve() + "/account", a = new XMLHttpRequest();
|
|
706
|
+
a.open("GET", r, !0), a.setRequestHeader("Accept", "application/json"), a.setRequestHeader("Authorization", "bearer " + e.token);
|
|
707
|
+
var d = w();
|
|
708
|
+
return a.onreadystatechange = function() {
|
|
709
|
+
a.readyState == 4 && (a.status == 200 ? (e.profile = JSON.parse(a.responseText), d.setSuccess(e.profile)) : d.setError());
|
|
710
|
+
}, a.send(), d.promise;
|
|
711
711
|
}, e.loadUserInfo = function() {
|
|
712
|
-
var r = e.endpoints.userinfo(),
|
|
713
|
-
|
|
714
|
-
var
|
|
715
|
-
return
|
|
716
|
-
|
|
717
|
-
},
|
|
712
|
+
var r = e.endpoints.userinfo(), a = new XMLHttpRequest();
|
|
713
|
+
a.open("GET", r, !0), a.setRequestHeader("Accept", "application/json"), a.setRequestHeader("Authorization", "bearer " + e.token);
|
|
714
|
+
var d = w();
|
|
715
|
+
return a.onreadystatechange = function() {
|
|
716
|
+
a.readyState == 4 && (a.status == 200 ? (e.userInfo = JSON.parse(a.responseText), d.setSuccess(e.userInfo)) : d.setError());
|
|
717
|
+
}, a.send(), d.promise;
|
|
718
718
|
}, e.isTokenExpired = function(r) {
|
|
719
719
|
if (!e.tokenParsed || !e.refreshToken && e.flow != "implicit")
|
|
720
720
|
throw "Not authenticated";
|
|
721
721
|
if (e.timeSkew == null)
|
|
722
|
-
return
|
|
723
|
-
var
|
|
722
|
+
return H("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"), !0;
|
|
723
|
+
var a = e.tokenParsed.exp - Math.ceil((/* @__PURE__ */ new Date()).getTime() / 1e3) + e.timeSkew;
|
|
724
724
|
if (r) {
|
|
725
725
|
if (isNaN(r))
|
|
726
726
|
throw "Invalid minValidity";
|
|
727
|
-
|
|
727
|
+
a -= r;
|
|
728
728
|
}
|
|
729
|
-
return
|
|
729
|
+
return a < 0;
|
|
730
730
|
}, e.updateToken = function(r) {
|
|
731
|
-
var
|
|
731
|
+
var a = w();
|
|
732
732
|
if (!e.refreshToken)
|
|
733
|
-
return
|
|
733
|
+
return a.setError(), a.promise;
|
|
734
734
|
r = r || 5;
|
|
735
|
-
var
|
|
736
|
-
var
|
|
737
|
-
if (r == -1 ? (
|
|
738
|
-
|
|
735
|
+
var d = function() {
|
|
736
|
+
var h = !1;
|
|
737
|
+
if (r == -1 ? (h = !0, H("[KEYCLOAK] Refreshing token: forced refresh")) : (!e.tokenParsed || e.isTokenExpired(r)) && (h = !0, H("[KEYCLOAK] Refreshing token: token expired")), !h)
|
|
738
|
+
a.setSuccess(!1);
|
|
739
739
|
else {
|
|
740
|
-
var
|
|
741
|
-
if (o.push(
|
|
742
|
-
var
|
|
743
|
-
|
|
744
|
-
var
|
|
745
|
-
|
|
746
|
-
if (
|
|
747
|
-
if (
|
|
748
|
-
|
|
749
|
-
var
|
|
750
|
-
|
|
751
|
-
for (var
|
|
752
|
-
|
|
740
|
+
var _ = "grant_type=refresh_token&refresh_token=" + e.refreshToken, m = e.endpoints.token();
|
|
741
|
+
if (o.push(a), o.length == 1) {
|
|
742
|
+
var b = new XMLHttpRequest();
|
|
743
|
+
b.open("POST", m, !0), b.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), b.withCredentials = !0, _ += "&client_id=" + encodeURIComponent(e.clientId);
|
|
744
|
+
var E = (/* @__PURE__ */ new Date()).getTime();
|
|
745
|
+
b.onreadystatechange = function() {
|
|
746
|
+
if (b.readyState == 4)
|
|
747
|
+
if (b.status == 200) {
|
|
748
|
+
H("[KEYCLOAK] Token refreshed"), E = (E + (/* @__PURE__ */ new Date()).getTime()) / 2;
|
|
749
|
+
var C = JSON.parse(b.responseText);
|
|
750
|
+
X(C.access_token, C.refresh_token, C.id_token, E), e.onAuthRefreshSuccess && e.onAuthRefreshSuccess();
|
|
751
|
+
for (var R = o.pop(); R != null; R = o.pop())
|
|
752
|
+
R.setSuccess(!0);
|
|
753
753
|
} else {
|
|
754
|
-
|
|
755
|
-
for (var
|
|
756
|
-
|
|
754
|
+
W("[KEYCLOAK] Failed to refresh token"), b.status == 400 && e.clearToken(), e.onAuthRefreshError && e.onAuthRefreshError();
|
|
755
|
+
for (var R = o.pop(); R != null; R = o.pop())
|
|
756
|
+
R.setError(!0);
|
|
757
757
|
}
|
|
758
|
-
},
|
|
758
|
+
}, b.send(_);
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
};
|
|
762
762
|
if (c.enable) {
|
|
763
|
-
var
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
}).catch(function(
|
|
767
|
-
|
|
763
|
+
var g = F();
|
|
764
|
+
g.then(function() {
|
|
765
|
+
d();
|
|
766
|
+
}).catch(function(h) {
|
|
767
|
+
a.setError(h);
|
|
768
768
|
});
|
|
769
769
|
} else
|
|
770
|
-
|
|
771
|
-
return
|
|
770
|
+
d();
|
|
771
|
+
return a.promise;
|
|
772
772
|
}, e.clearToken = function() {
|
|
773
|
-
e.token && (
|
|
774
|
-
}, e.setToken =
|
|
775
|
-
function
|
|
773
|
+
e.token && (X(null, null, null), e.onAuthLogout && e.onAuthLogout(), e.loginRequired && e.login());
|
|
774
|
+
}, e.setToken = X;
|
|
775
|
+
function ve() {
|
|
776
776
|
if (typeof e.authServerUrl < "u")
|
|
777
777
|
return e.authServerUrl.charAt(e.authServerUrl.length - 1) == "/" ? e.authServerUrl + "realms/" + encodeURIComponent(e.realm) : e.authServerUrl + "/realms/" + encodeURIComponent(e.realm);
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function Ze() {
|
|
780
780
|
return window.location.origin ? window.location.origin : window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "");
|
|
781
781
|
}
|
|
782
|
-
function
|
|
783
|
-
var
|
|
784
|
-
if (r.kc_action_status && e.onActionUpdate && e.onActionUpdate(r.kc_action_status),
|
|
785
|
-
if (
|
|
786
|
-
var
|
|
787
|
-
e.onAuthError && e.onAuthError(
|
|
782
|
+
function de(r, a) {
|
|
783
|
+
var d = r.code, g = r.error, h = r.prompt, _ = (/* @__PURE__ */ new Date()).getTime();
|
|
784
|
+
if (r.kc_action_status && e.onActionUpdate && e.onActionUpdate(r.kc_action_status), g) {
|
|
785
|
+
if (h != "none") {
|
|
786
|
+
var m = { error: g, error_description: r.error_description };
|
|
787
|
+
e.onAuthError && e.onAuthError(m), a && a.setError(m);
|
|
788
788
|
} else
|
|
789
|
-
|
|
789
|
+
a && a.setSuccess();
|
|
790
790
|
return;
|
|
791
791
|
} else
|
|
792
|
-
e.flow != "standard" && (r.access_token || r.id_token) &&
|
|
793
|
-
if (e.flow != "implicit" &&
|
|
794
|
-
var
|
|
795
|
-
|
|
796
|
-
if (
|
|
797
|
-
if (
|
|
798
|
-
var
|
|
799
|
-
|
|
792
|
+
e.flow != "standard" && (r.access_token || r.id_token) && R(r.access_token, null, r.id_token, !0);
|
|
793
|
+
if (e.flow != "implicit" && d) {
|
|
794
|
+
var b = "code=" + d + "&grant_type=authorization_code", E = e.endpoints.token(), C = new XMLHttpRequest();
|
|
795
|
+
C.open("POST", E, !0), C.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), b += "&client_id=" + encodeURIComponent(e.clientId), b += "&redirect_uri=" + r.redirectUri, r.pkceCodeVerifier && (b += "&code_verifier=" + r.pkceCodeVerifier), C.withCredentials = !0, C.onreadystatechange = function() {
|
|
796
|
+
if (C.readyState == 4)
|
|
797
|
+
if (C.status == 200) {
|
|
798
|
+
var N = JSON.parse(C.responseText);
|
|
799
|
+
R(N.access_token, N.refresh_token, N.id_token, e.flow === "standard"), p();
|
|
800
800
|
} else
|
|
801
|
-
e.onAuthError && e.onAuthError(),
|
|
802
|
-
},
|
|
801
|
+
e.onAuthError && e.onAuthError(), a && a.setError();
|
|
802
|
+
}, C.send(b);
|
|
803
803
|
}
|
|
804
|
-
function
|
|
805
|
-
|
|
804
|
+
function R(N, he, ce, ee) {
|
|
805
|
+
_ = (_ + (/* @__PURE__ */ new Date()).getTime()) / 2, X(N, he, ce, _), u && (e.tokenParsed && e.tokenParsed.nonce != r.storedNonce || e.refreshTokenParsed && e.refreshTokenParsed.nonce != r.storedNonce || e.idTokenParsed && e.idTokenParsed.nonce != r.storedNonce) ? (H("[KEYCLOAK] Invalid nonce, clearing token"), e.clearToken(), a && a.setError()) : ee && (e.onAuthSuccess && e.onAuthSuccess(), a && a.setSuccess());
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
808
|
function D(r) {
|
|
809
|
-
var
|
|
810
|
-
t ? typeof t == "string" && (
|
|
811
|
-
function
|
|
812
|
-
|
|
809
|
+
var a = w(), d;
|
|
810
|
+
t ? typeof t == "string" && (d = t) : d = location.origin + "/keycloak.json";
|
|
811
|
+
function g(C) {
|
|
812
|
+
C ? e.endpoints = {
|
|
813
813
|
authorize: function() {
|
|
814
|
-
return
|
|
814
|
+
return C.authorization_endpoint;
|
|
815
815
|
},
|
|
816
816
|
token: function() {
|
|
817
|
-
return
|
|
817
|
+
return C.token_endpoint;
|
|
818
818
|
},
|
|
819
819
|
logout: function() {
|
|
820
|
-
if (!
|
|
820
|
+
if (!C.end_session_endpoint)
|
|
821
821
|
throw "Not supported by the OIDC server";
|
|
822
|
-
return
|
|
822
|
+
return C.end_session_endpoint;
|
|
823
823
|
},
|
|
824
824
|
checkSessionIframe: function() {
|
|
825
|
-
if (!
|
|
825
|
+
if (!C.check_session_iframe)
|
|
826
826
|
throw "Not supported by the OIDC server";
|
|
827
|
-
return
|
|
827
|
+
return C.check_session_iframe;
|
|
828
828
|
},
|
|
829
829
|
register: function() {
|
|
830
830
|
throw 'Redirection to "Register user" page not supported in standard OIDC mode';
|
|
831
831
|
},
|
|
832
832
|
userinfo: function() {
|
|
833
|
-
if (!
|
|
833
|
+
if (!C.userinfo_endpoint)
|
|
834
834
|
throw "Not supported by the OIDC server";
|
|
835
|
-
return
|
|
835
|
+
return C.userinfo_endpoint;
|
|
836
836
|
}
|
|
837
837
|
} : e.endpoints = {
|
|
838
838
|
authorize: function() {
|
|
839
|
-
return
|
|
839
|
+
return ve() + "/protocol/openid-connect/auth";
|
|
840
840
|
},
|
|
841
841
|
token: function() {
|
|
842
|
-
return
|
|
842
|
+
return ve() + "/protocol/openid-connect/token";
|
|
843
843
|
},
|
|
844
844
|
logout: function() {
|
|
845
|
-
return
|
|
845
|
+
return ve() + "/protocol/openid-connect/logout";
|
|
846
846
|
},
|
|
847
847
|
checkSessionIframe: function() {
|
|
848
|
-
var
|
|
849
|
-
return e.iframeVersion && (
|
|
848
|
+
var R = ve() + "/protocol/openid-connect/login-status-iframe.html";
|
|
849
|
+
return e.iframeVersion && (R = R + "?version=" + e.iframeVersion), R;
|
|
850
850
|
},
|
|
851
851
|
thirdPartyCookiesIframe: function() {
|
|
852
|
-
var
|
|
853
|
-
return e.iframeVersion && (
|
|
852
|
+
var R = ve() + "/protocol/openid-connect/3p-cookies/step1.html";
|
|
853
|
+
return e.iframeVersion && (R = R + "?version=" + e.iframeVersion), R;
|
|
854
854
|
},
|
|
855
855
|
register: function() {
|
|
856
|
-
return
|
|
856
|
+
return ve() + "/protocol/openid-connect/registrations";
|
|
857
857
|
},
|
|
858
858
|
userinfo: function() {
|
|
859
|
-
return
|
|
859
|
+
return ve() + "/protocol/openid-connect/userinfo";
|
|
860
860
|
}
|
|
861
861
|
};
|
|
862
862
|
}
|
|
863
|
-
if (
|
|
864
|
-
var
|
|
865
|
-
|
|
866
|
-
if (
|
|
867
|
-
if (
|
|
868
|
-
var
|
|
869
|
-
e.authServerUrl =
|
|
863
|
+
if (d) {
|
|
864
|
+
var h = new XMLHttpRequest();
|
|
865
|
+
h.open("GET", d, !0), h.setRequestHeader("Accept", "application/json"), h.onreadystatechange = function() {
|
|
866
|
+
if (h.readyState == 4)
|
|
867
|
+
if (h.status == 200 || ye(h)) {
|
|
868
|
+
var C = JSON.parse(h.responseText);
|
|
869
|
+
e.authServerUrl = C["auth-server-url"], e.realm = C.realm, e.clientId = C.resource, g(null), a.setSuccess();
|
|
870
870
|
} else
|
|
871
|
-
|
|
872
|
-
},
|
|
871
|
+
a.setError();
|
|
872
|
+
}, h.send();
|
|
873
873
|
} else {
|
|
874
874
|
if (!t.clientId)
|
|
875
875
|
throw "clientId missing";
|
|
876
876
|
e.clientId = t.clientId;
|
|
877
|
-
var
|
|
878
|
-
if (
|
|
879
|
-
if (typeof
|
|
880
|
-
var
|
|
881
|
-
|
|
882
|
-
var
|
|
883
|
-
|
|
884
|
-
if (
|
|
885
|
-
if (
|
|
886
|
-
var
|
|
887
|
-
|
|
877
|
+
var _ = t.oidcProvider;
|
|
878
|
+
if (_)
|
|
879
|
+
if (typeof _ == "string") {
|
|
880
|
+
var E;
|
|
881
|
+
_.charAt(_.length - 1) == "/" ? E = _ + ".well-known/openid-configuration" : E = _ + "/.well-known/openid-configuration";
|
|
882
|
+
var h = new XMLHttpRequest();
|
|
883
|
+
h.open("GET", E, !0), h.setRequestHeader("Accept", "application/json"), h.onreadystatechange = function() {
|
|
884
|
+
if (h.readyState == 4)
|
|
885
|
+
if (h.status == 200 || ye(h)) {
|
|
886
|
+
var R = JSON.parse(h.responseText);
|
|
887
|
+
g(R), a.setSuccess();
|
|
888
888
|
} else
|
|
889
|
-
|
|
890
|
-
},
|
|
889
|
+
a.setError();
|
|
890
|
+
}, h.send();
|
|
891
891
|
} else
|
|
892
|
-
|
|
892
|
+
g(_), a.setSuccess();
|
|
893
893
|
else {
|
|
894
894
|
if (!t.url) {
|
|
895
|
-
for (var
|
|
896
|
-
if (
|
|
897
|
-
t.url =
|
|
895
|
+
for (var m = document.getElementsByTagName("script"), b = 0; b < m.length; b++)
|
|
896
|
+
if (m[b].src.match(/.*keycloak\.js/)) {
|
|
897
|
+
t.url = m[b].src.substr(0, m[b].src.indexOf("/js/keycloak.js"));
|
|
898
898
|
break;
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
901
|
if (!t.realm)
|
|
902
902
|
throw "realm missing";
|
|
903
|
-
e.authServerUrl = t.url, e.realm = t.realm,
|
|
903
|
+
e.authServerUrl = t.url, e.realm = t.realm, g(null), a.setSuccess();
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
|
-
return
|
|
906
|
+
return a.promise;
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function ye(r) {
|
|
909
909
|
return r.status == 0 && r.responseText && r.responseURL.startsWith("file:");
|
|
910
910
|
}
|
|
911
|
-
function
|
|
912
|
-
if (e.tokenTimeoutHandle && (clearTimeout(e.tokenTimeoutHandle), e.tokenTimeoutHandle = null),
|
|
913
|
-
if (e.token = r, e.tokenParsed =
|
|
914
|
-
var
|
|
915
|
-
|
|
911
|
+
function X(r, a, d, g) {
|
|
912
|
+
if (e.tokenTimeoutHandle && (clearTimeout(e.tokenTimeoutHandle), e.tokenTimeoutHandle = null), a ? (e.refreshToken = a, e.refreshTokenParsed = cn(a)) : (delete e.refreshToken, delete e.refreshTokenParsed), d ? (e.idToken = d, e.idTokenParsed = cn(d)) : (delete e.idToken, delete e.idTokenParsed), r) {
|
|
913
|
+
if (e.token = r, e.tokenParsed = cn(r), e.sessionId = e.tokenParsed.session_state, e.authenticated = !0, e.subject = e.tokenParsed.sub, e.realmAccess = e.tokenParsed.realm_access, e.resourceAccess = e.tokenParsed.resource_access, g && (e.timeSkew = Math.floor(g / 1e3) - e.tokenParsed.iat), e.timeSkew != null && (H("[KEYCLOAK] Estimated time difference between browser and server is " + e.timeSkew + " seconds"), e.onTokenExpired)) {
|
|
914
|
+
var h = (e.tokenParsed.exp - (/* @__PURE__ */ new Date()).getTime() / 1e3 + e.timeSkew) * 1e3;
|
|
915
|
+
H("[KEYCLOAK] Token expires in " + Math.round(h / 1e3) + " s"), h <= 0 ? e.onTokenExpired() : e.tokenTimeoutHandle = setTimeout(e.onTokenExpired, h);
|
|
916
916
|
}
|
|
917
917
|
} else
|
|
918
918
|
delete e.token, delete e.tokenParsed, delete e.subject, delete e.realmAccess, delete e.resourceAccess, e.authenticated = !1;
|
|
919
919
|
}
|
|
920
|
-
function
|
|
921
|
-
var r = "0123456789abcdef",
|
|
922
|
-
|
|
923
|
-
var
|
|
924
|
-
return
|
|
925
|
-
}
|
|
926
|
-
function
|
|
927
|
-
var
|
|
928
|
-
if (
|
|
929
|
-
var
|
|
930
|
-
return
|
|
920
|
+
function f() {
|
|
921
|
+
var r = "0123456789abcdef", a = z(36, r).split("");
|
|
922
|
+
a[14] = "4", a[19] = r.substr(a[19] & 3 | 8, 1), a[8] = a[13] = a[18] = a[23] = "-";
|
|
923
|
+
var d = a.join("");
|
|
924
|
+
return d;
|
|
925
|
+
}
|
|
926
|
+
function k(r) {
|
|
927
|
+
var a = I(r);
|
|
928
|
+
if (a) {
|
|
929
|
+
var d = i.get(a.state);
|
|
930
|
+
return d && (a.valid = !0, a.redirectUri = d.redirectUri, a.storedNonce = d.nonce, a.prompt = d.prompt, a.pkceCodeVerifier = d.pkceCodeVerifier), a;
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
|
-
function
|
|
934
|
-
var
|
|
933
|
+
function I(r) {
|
|
934
|
+
var a;
|
|
935
935
|
switch (e.flow) {
|
|
936
936
|
case "standard":
|
|
937
|
-
|
|
937
|
+
a = ["code", "state", "session_state", "kc_action_status", "iss"];
|
|
938
938
|
break;
|
|
939
939
|
case "implicit":
|
|
940
|
-
|
|
940
|
+
a = ["access_token", "token_type", "id_token", "state", "session_state", "expires_in", "kc_action_status", "iss"];
|
|
941
941
|
break;
|
|
942
942
|
case "hybrid":
|
|
943
|
-
|
|
943
|
+
a = ["access_token", "token_type", "id_token", "code", "state", "session_state", "expires_in", "kc_action_status", "iss"];
|
|
944
944
|
break;
|
|
945
945
|
}
|
|
946
|
-
|
|
947
|
-
var
|
|
948
|
-
if (e.responseMode === "query" &&
|
|
946
|
+
a.push("error"), a.push("error_description"), a.push("error_uri");
|
|
947
|
+
var d = r.indexOf("?"), g = r.indexOf("#"), h, _;
|
|
948
|
+
if (e.responseMode === "query" && d !== -1 ? (h = r.substring(0, d), _ = A(r.substring(d + 1, g !== -1 ? g : r.length), a), _.paramsString !== "" && (h += "?" + _.paramsString), g !== -1 && (h += r.substring(g))) : e.responseMode === "fragment" && g !== -1 && (h = r.substring(0, g), _ = A(r.substring(g + 1), a), _.paramsString !== "" && (h += "#" + _.paramsString)), _ && _.oauthParams) {
|
|
949
949
|
if (e.flow === "standard" || e.flow === "hybrid") {
|
|
950
|
-
if ((
|
|
951
|
-
return
|
|
952
|
-
} else if (e.flow === "implicit" && (
|
|
953
|
-
return
|
|
950
|
+
if ((_.oauthParams.code || _.oauthParams.error) && _.oauthParams.state)
|
|
951
|
+
return _.oauthParams.newUrl = h, _.oauthParams;
|
|
952
|
+
} else if (e.flow === "implicit" && (_.oauthParams.access_token || _.oauthParams.error) && _.oauthParams.state)
|
|
953
|
+
return _.oauthParams.newUrl = h, _.oauthParams;
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
for (var
|
|
956
|
+
function A(r, a) {
|
|
957
|
+
for (var d = r.split("&"), g = {
|
|
958
958
|
paramsString: "",
|
|
959
959
|
oauthParams: {}
|
|
960
|
-
},
|
|
961
|
-
var
|
|
962
|
-
|
|
960
|
+
}, h = 0; h < d.length; h++) {
|
|
961
|
+
var _ = d[h].indexOf("="), m = d[h].slice(0, _);
|
|
962
|
+
a.indexOf(m) !== -1 ? g.oauthParams[m] = d[h].slice(_ + 1) : (g.paramsString !== "" && (g.paramsString += "&"), g.paramsString += d[h]);
|
|
963
963
|
}
|
|
964
|
-
return
|
|
964
|
+
return g;
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function w() {
|
|
967
967
|
var r = {
|
|
968
|
-
setSuccess: function(
|
|
969
|
-
r.resolve(
|
|
968
|
+
setSuccess: function(a) {
|
|
969
|
+
r.resolve(a);
|
|
970
970
|
},
|
|
971
|
-
setError: function(
|
|
972
|
-
r.reject(
|
|
971
|
+
setError: function(a) {
|
|
972
|
+
r.reject(a);
|
|
973
973
|
}
|
|
974
974
|
};
|
|
975
|
-
return r.promise = new Promise(function(
|
|
976
|
-
r.resolve =
|
|
975
|
+
return r.promise = new Promise(function(a, d) {
|
|
976
|
+
r.resolve = a, r.reject = d;
|
|
977
977
|
}), r;
|
|
978
978
|
}
|
|
979
|
-
function
|
|
980
|
-
var
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
},
|
|
979
|
+
function y(r, a, d) {
|
|
980
|
+
var g = null, h = new Promise(function(_, m) {
|
|
981
|
+
g = setTimeout(function() {
|
|
982
|
+
m({ error: d || "Promise is not settled within timeout of " + a + "ms" });
|
|
983
|
+
}, a);
|
|
984
984
|
});
|
|
985
|
-
return Promise.race([r,
|
|
986
|
-
clearTimeout(
|
|
985
|
+
return Promise.race([r, h]).finally(function() {
|
|
986
|
+
clearTimeout(g);
|
|
987
987
|
});
|
|
988
988
|
}
|
|
989
|
-
function
|
|
990
|
-
var r =
|
|
989
|
+
function O() {
|
|
990
|
+
var r = w();
|
|
991
991
|
if (!c.enable || c.iframe)
|
|
992
992
|
return r.setSuccess(), r.promise;
|
|
993
|
-
var
|
|
994
|
-
c.iframe =
|
|
995
|
-
var
|
|
996
|
-
|
|
993
|
+
var a = document.createElement("iframe");
|
|
994
|
+
c.iframe = a, a.onload = function() {
|
|
995
|
+
var h = e.endpoints.authorize();
|
|
996
|
+
h.charAt(0) === "/" ? c.iframeOrigin = Ze() : c.iframeOrigin = h.substring(0, h.indexOf("/", 8)), r.setSuccess();
|
|
997
997
|
};
|
|
998
|
-
var
|
|
999
|
-
|
|
1000
|
-
var
|
|
1001
|
-
if (!(
|
|
1002
|
-
|
|
1003
|
-
for (var
|
|
1004
|
-
var
|
|
1005
|
-
|
|
998
|
+
var d = e.endpoints.checkSessionIframe();
|
|
999
|
+
a.setAttribute("src", d), a.setAttribute("sandbox", "allow-scripts allow-same-origin"), a.setAttribute("title", "keycloak-session-iframe"), a.style.display = "none", document.body.appendChild(a);
|
|
1000
|
+
var g = function(h) {
|
|
1001
|
+
if (!(h.origin !== c.iframeOrigin || c.iframe.contentWindow !== h.source) && (h.data == "unchanged" || h.data == "changed" || h.data == "error")) {
|
|
1002
|
+
h.data != "unchanged" && e.clearToken();
|
|
1003
|
+
for (var _ = c.callbackList.splice(0, c.callbackList.length), m = _.length - 1; m >= 0; --m) {
|
|
1004
|
+
var b = _[m];
|
|
1005
|
+
h.data == "error" ? b.setError() : b.setSuccess(h.data == "unchanged");
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
1008
|
};
|
|
1009
|
-
return window.addEventListener("message",
|
|
1009
|
+
return window.addEventListener("message", g, !1), r.promise;
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1011
|
+
function p() {
|
|
1012
1012
|
c.enable && e.token && setTimeout(function() {
|
|
1013
|
-
|
|
1014
|
-
r &&
|
|
1013
|
+
F().then(function(r) {
|
|
1014
|
+
r && p();
|
|
1015
1015
|
});
|
|
1016
1016
|
}, c.interval * 1e3);
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1019
|
-
var r =
|
|
1018
|
+
function F() {
|
|
1019
|
+
var r = w();
|
|
1020
1020
|
if (c.iframe && c.iframeOrigin) {
|
|
1021
|
-
var
|
|
1021
|
+
var a = e.clientId + " " + (e.sessionId ? e.sessionId : "");
|
|
1022
1022
|
c.callbackList.push(r);
|
|
1023
|
-
var
|
|
1024
|
-
c.callbackList.length == 1 && c.iframe.contentWindow.postMessage(
|
|
1023
|
+
var d = c.iframeOrigin;
|
|
1024
|
+
c.callbackList.length == 1 && c.iframe.contentWindow.postMessage(a, d);
|
|
1025
1025
|
} else
|
|
1026
1026
|
r.setSuccess();
|
|
1027
1027
|
return r.promise;
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1030
|
-
var r =
|
|
1029
|
+
function q() {
|
|
1030
|
+
var r = w();
|
|
1031
1031
|
if (c.enable || e.silentCheckSsoRedirectUri) {
|
|
1032
|
-
var
|
|
1033
|
-
|
|
1034
|
-
var
|
|
1035
|
-
|
|
1032
|
+
var a = document.createElement("iframe");
|
|
1033
|
+
a.setAttribute("src", e.endpoints.thirdPartyCookiesIframe()), a.setAttribute("sandbox", "allow-scripts allow-same-origin"), a.setAttribute("title", "keycloak-3p-check-iframe"), a.style.display = "none", document.body.appendChild(a);
|
|
1034
|
+
var d = function(g) {
|
|
1035
|
+
a.contentWindow === g.source && (g.data !== "supported" && g.data !== "unsupported" || (g.data === "unsupported" && (W(
|
|
1036
1036
|
`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
|
|
1037
1037
|
|
|
1038
1038
|
- It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
|
|
1039
1039
|
- It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
|
|
1040
1040
|
|
|
1041
1041
|
For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`
|
|
1042
|
-
), c.enable = !1, e.silentCheckSsoFallback && (e.silentCheckSsoRedirectUri = !1)), document.body.removeChild(
|
|
1042
|
+
), c.enable = !1, e.silentCheckSsoFallback && (e.silentCheckSsoRedirectUri = !1)), document.body.removeChild(a), window.removeEventListener("message", d), r.setSuccess()));
|
|
1043
1043
|
};
|
|
1044
|
-
window.addEventListener("message",
|
|
1044
|
+
window.addEventListener("message", d, !1);
|
|
1045
1045
|
} else
|
|
1046
1046
|
r.setSuccess();
|
|
1047
|
-
return
|
|
1047
|
+
return y(r.promise, e.messageReceiveTimeout, "Timeout when waiting for 3rd party check iframe message.");
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function Y(r) {
|
|
1050
1050
|
if (!r || r == "default")
|
|
1051
1051
|
return {
|
|
1052
|
-
login: function(
|
|
1053
|
-
return window.location.assign(e.createLoginUrl(
|
|
1052
|
+
login: function(m) {
|
|
1053
|
+
return window.location.assign(e.createLoginUrl(m)), w().promise;
|
|
1054
1054
|
},
|
|
1055
|
-
logout: function(
|
|
1056
|
-
return window.location.replace(e.createLogoutUrl(
|
|
1055
|
+
logout: function(m) {
|
|
1056
|
+
return window.location.replace(e.createLogoutUrl(m)), w().promise;
|
|
1057
1057
|
},
|
|
1058
|
-
register: function(
|
|
1059
|
-
return window.location.assign(e.createRegisterUrl(
|
|
1058
|
+
register: function(m) {
|
|
1059
|
+
return window.location.assign(e.createRegisterUrl(m)), w().promise;
|
|
1060
1060
|
},
|
|
1061
1061
|
accountManagement: function() {
|
|
1062
|
-
var
|
|
1063
|
-
if (typeof
|
|
1064
|
-
window.location.href =
|
|
1062
|
+
var m = e.createAccountUrl();
|
|
1063
|
+
if (typeof m < "u")
|
|
1064
|
+
window.location.href = m;
|
|
1065
1065
|
else
|
|
1066
1066
|
throw "Not supported by the OIDC server";
|
|
1067
|
-
return
|
|
1067
|
+
return w().promise;
|
|
1068
1068
|
},
|
|
1069
|
-
redirectUri: function(
|
|
1070
|
-
return
|
|
1069
|
+
redirectUri: function(m, b) {
|
|
1070
|
+
return m && m.redirectUri ? m.redirectUri : e.redirectUri ? e.redirectUri : location.href;
|
|
1071
1071
|
}
|
|
1072
1072
|
};
|
|
1073
1073
|
if (r == "cordova") {
|
|
1074
1074
|
c.enable = !1;
|
|
1075
|
-
var
|
|
1076
|
-
return window.cordova && window.cordova.InAppBrowser ? window.cordova.InAppBrowser.open(
|
|
1077
|
-
},
|
|
1078
|
-
return
|
|
1079
|
-
return
|
|
1075
|
+
var a = function(m, b, E) {
|
|
1076
|
+
return window.cordova && window.cordova.InAppBrowser ? window.cordova.InAppBrowser.open(m, b, E) : window.open(m, b, E);
|
|
1077
|
+
}, d = function(m) {
|
|
1078
|
+
return m && m.cordovaOptions ? Object.keys(m.cordovaOptions).reduce(function(b, E) {
|
|
1079
|
+
return b[E] = m.cordovaOptions[E], b;
|
|
1080
1080
|
}, {}) : {};
|
|
1081
|
-
},
|
|
1082
|
-
return Object.keys(
|
|
1083
|
-
return
|
|
1081
|
+
}, g = function(m) {
|
|
1082
|
+
return Object.keys(m).reduce(function(b, E) {
|
|
1083
|
+
return b.push(E + "=" + m[E]), b;
|
|
1084
1084
|
}, []).join(",");
|
|
1085
|
-
},
|
|
1086
|
-
var
|
|
1087
|
-
return
|
|
1088
|
-
},
|
|
1085
|
+
}, h = function(m) {
|
|
1086
|
+
var b = d(m);
|
|
1087
|
+
return b.location = "no", m && m.prompt == "none" && (b.hidden = "yes"), g(b);
|
|
1088
|
+
}, _ = function() {
|
|
1089
1089
|
return e.redirectUri || "http://localhost";
|
|
1090
1090
|
};
|
|
1091
1091
|
return {
|
|
1092
|
-
login: function(
|
|
1093
|
-
var
|
|
1094
|
-
he = !0,
|
|
1092
|
+
login: function(m) {
|
|
1093
|
+
var b = w(), E = h(m), C = e.createLoginUrl(m), R = a(C, "_blank", E), N = !1, he = !1, ce = function() {
|
|
1094
|
+
he = !0, R.close();
|
|
1095
1095
|
};
|
|
1096
|
-
return
|
|
1097
|
-
if (
|
|
1098
|
-
var
|
|
1099
|
-
|
|
1096
|
+
return R.addEventListener("loadstart", function(ee) {
|
|
1097
|
+
if (ee.url.indexOf(_()) == 0) {
|
|
1098
|
+
var Re = k(ee.url);
|
|
1099
|
+
de(Re, b), ce(), N = !0;
|
|
1100
1100
|
}
|
|
1101
|
-
}),
|
|
1102
|
-
if (!
|
|
1103
|
-
if (
|
|
1104
|
-
var
|
|
1105
|
-
|
|
1101
|
+
}), R.addEventListener("loaderror", function(ee) {
|
|
1102
|
+
if (!N)
|
|
1103
|
+
if (ee.url.indexOf(_()) == 0) {
|
|
1104
|
+
var Re = k(ee.url);
|
|
1105
|
+
de(Re, b), ce(), N = !0;
|
|
1106
1106
|
} else
|
|
1107
|
-
|
|
1108
|
-
}),
|
|
1109
|
-
he ||
|
|
1107
|
+
b.setError(), ce();
|
|
1108
|
+
}), R.addEventListener("exit", function(ee) {
|
|
1109
|
+
he || b.setError({
|
|
1110
1110
|
reason: "closed_by_user"
|
|
1111
1111
|
});
|
|
1112
|
-
}),
|
|
1112
|
+
}), b.promise;
|
|
1113
1113
|
},
|
|
1114
|
-
logout: function(
|
|
1115
|
-
var
|
|
1116
|
-
return
|
|
1117
|
-
|
|
1118
|
-
}),
|
|
1119
|
-
|
|
1120
|
-
}),
|
|
1121
|
-
|
|
1122
|
-
}),
|
|
1114
|
+
logout: function(m) {
|
|
1115
|
+
var b = w(), E = e.createLogoutUrl(m), C = a(E, "_blank", "location=no,hidden=yes,clearcache=yes"), R;
|
|
1116
|
+
return C.addEventListener("loadstart", function(N) {
|
|
1117
|
+
N.url.indexOf(_()) == 0 && C.close();
|
|
1118
|
+
}), C.addEventListener("loaderror", function(N) {
|
|
1119
|
+
N.url.indexOf(_()) == 0 || (R = !0), C.close();
|
|
1120
|
+
}), C.addEventListener("exit", function(N) {
|
|
1121
|
+
R ? b.setError() : (e.clearToken(), b.setSuccess());
|
|
1122
|
+
}), b.promise;
|
|
1123
1123
|
},
|
|
1124
|
-
register: function(
|
|
1125
|
-
var
|
|
1126
|
-
return
|
|
1127
|
-
if (
|
|
1128
|
-
|
|
1129
|
-
var he =
|
|
1130
|
-
|
|
1124
|
+
register: function(m) {
|
|
1125
|
+
var b = w(), E = e.createRegisterUrl(), C = h(m), R = a(E, "_blank", C);
|
|
1126
|
+
return R.addEventListener("loadstart", function(N) {
|
|
1127
|
+
if (N.url.indexOf(_()) == 0) {
|
|
1128
|
+
R.close();
|
|
1129
|
+
var he = k(N.url);
|
|
1130
|
+
de(he, b);
|
|
1131
1131
|
}
|
|
1132
|
-
}),
|
|
1132
|
+
}), b.promise;
|
|
1133
1133
|
},
|
|
1134
1134
|
accountManagement: function() {
|
|
1135
|
-
var
|
|
1136
|
-
if (typeof
|
|
1137
|
-
var
|
|
1138
|
-
|
|
1139
|
-
|
|
1135
|
+
var m = e.createAccountUrl();
|
|
1136
|
+
if (typeof m < "u") {
|
|
1137
|
+
var b = a(m, "_blank", "location=no");
|
|
1138
|
+
b.addEventListener("loadstart", function(E) {
|
|
1139
|
+
E.url.indexOf(_()) == 0 && b.close();
|
|
1140
1140
|
});
|
|
1141
1141
|
} else
|
|
1142
1142
|
throw "Not supported by the OIDC server";
|
|
1143
1143
|
},
|
|
1144
|
-
redirectUri: function(
|
|
1145
|
-
return
|
|
1144
|
+
redirectUri: function(m) {
|
|
1145
|
+
return _();
|
|
1146
1146
|
}
|
|
1147
1147
|
};
|
|
1148
1148
|
}
|
|
1149
1149
|
if (r == "cordova-native")
|
|
1150
1150
|
return c.enable = !1, {
|
|
1151
|
-
login: function(
|
|
1152
|
-
var
|
|
1153
|
-
return universalLinks.subscribe("keycloak", function(
|
|
1151
|
+
login: function(m) {
|
|
1152
|
+
var b = w(), E = e.createLoginUrl(m);
|
|
1153
|
+
return universalLinks.subscribe("keycloak", function(C) {
|
|
1154
1154
|
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close();
|
|
1155
|
-
var
|
|
1156
|
-
|
|
1157
|
-
}), window.cordova.plugins.browsertab.openUrl(
|
|
1155
|
+
var R = k(C.url);
|
|
1156
|
+
de(R, b);
|
|
1157
|
+
}), window.cordova.plugins.browsertab.openUrl(E), b.promise;
|
|
1158
1158
|
},
|
|
1159
|
-
logout: function(
|
|
1160
|
-
var
|
|
1161
|
-
return universalLinks.subscribe("keycloak", function(
|
|
1162
|
-
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close(), e.clearToken(),
|
|
1163
|
-
}), window.cordova.plugins.browsertab.openUrl(
|
|
1159
|
+
logout: function(m) {
|
|
1160
|
+
var b = w(), E = e.createLogoutUrl(m);
|
|
1161
|
+
return universalLinks.subscribe("keycloak", function(C) {
|
|
1162
|
+
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close(), e.clearToken(), b.setSuccess();
|
|
1163
|
+
}), window.cordova.plugins.browsertab.openUrl(E), b.promise;
|
|
1164
1164
|
},
|
|
1165
|
-
register: function(
|
|
1166
|
-
var
|
|
1167
|
-
return universalLinks.subscribe("keycloak", function(
|
|
1165
|
+
register: function(m) {
|
|
1166
|
+
var b = w(), E = e.createRegisterUrl(m);
|
|
1167
|
+
return universalLinks.subscribe("keycloak", function(C) {
|
|
1168
1168
|
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close();
|
|
1169
|
-
var
|
|
1170
|
-
|
|
1171
|
-
}), window.cordova.plugins.browsertab.openUrl(
|
|
1169
|
+
var R = k(C.url);
|
|
1170
|
+
de(R, b);
|
|
1171
|
+
}), window.cordova.plugins.browsertab.openUrl(E), b.promise;
|
|
1172
1172
|
},
|
|
1173
1173
|
accountManagement: function() {
|
|
1174
|
-
var
|
|
1175
|
-
if (typeof
|
|
1176
|
-
window.cordova.plugins.browsertab.openUrl(
|
|
1174
|
+
var m = e.createAccountUrl();
|
|
1175
|
+
if (typeof m < "u")
|
|
1176
|
+
window.cordova.plugins.browsertab.openUrl(m);
|
|
1177
1177
|
else
|
|
1178
1178
|
throw "Not supported by the OIDC server";
|
|
1179
1179
|
},
|
|
1180
|
-
redirectUri: function(
|
|
1181
|
-
return
|
|
1180
|
+
redirectUri: function(m) {
|
|
1181
|
+
return m && m.redirectUri ? m.redirectUri : e.redirectUri ? e.redirectUri : "http://localhost";
|
|
1182
1182
|
}
|
|
1183
1183
|
};
|
|
1184
1184
|
throw "invalid adapter type: " + r;
|
|
1185
1185
|
}
|
|
1186
|
-
var
|
|
1187
|
-
if (!(this instanceof
|
|
1188
|
-
return new
|
|
1186
|
+
var G = function() {
|
|
1187
|
+
if (!(this instanceof G))
|
|
1188
|
+
return new G();
|
|
1189
1189
|
localStorage.setItem("kc-test", "test"), localStorage.removeItem("kc-test");
|
|
1190
1190
|
var r = this;
|
|
1191
|
-
function
|
|
1192
|
-
for (var
|
|
1193
|
-
var
|
|
1194
|
-
if (
|
|
1195
|
-
var
|
|
1196
|
-
if (
|
|
1191
|
+
function a() {
|
|
1192
|
+
for (var d = (/* @__PURE__ */ new Date()).getTime(), g = 0; g < localStorage.length; g++) {
|
|
1193
|
+
var h = localStorage.key(g);
|
|
1194
|
+
if (h && h.indexOf("kc-callback-") == 0) {
|
|
1195
|
+
var _ = localStorage.getItem(h);
|
|
1196
|
+
if (_)
|
|
1197
1197
|
try {
|
|
1198
|
-
var
|
|
1199
|
-
(!
|
|
1198
|
+
var m = JSON.parse(_).expires;
|
|
1199
|
+
(!m || m < d) && localStorage.removeItem(h);
|
|
1200
1200
|
} catch {
|
|
1201
|
-
localStorage.removeItem(
|
|
1201
|
+
localStorage.removeItem(h);
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
|
-
r.get = function(f) {
|
|
1207
|
-
if (f) {
|
|
1208
|
-
var m = "kc-callback-" + f, d = localStorage.getItem(m);
|
|
1209
|
-
return d && (localStorage.removeItem(m), d = JSON.parse(d)), s(), d;
|
|
1210
|
-
}
|
|
1211
|
-
}, r.add = function(f) {
|
|
1212
|
-
s();
|
|
1213
|
-
var m = "kc-callback-" + f.state;
|
|
1214
|
-
f.expires = (/* @__PURE__ */ new Date()).getTime() + 60 * 60 * 1e3, localStorage.setItem(m, JSON.stringify(f));
|
|
1215
|
-
};
|
|
1216
|
-
}, re = function() {
|
|
1217
|
-
if (!(this instanceof re))
|
|
1218
|
-
return new re();
|
|
1219
|
-
var r = this;
|
|
1220
1206
|
r.get = function(d) {
|
|
1221
1207
|
if (d) {
|
|
1222
|
-
var
|
|
1223
|
-
|
|
1224
|
-
return JSON.parse(w);
|
|
1208
|
+
var g = "kc-callback-" + d, h = localStorage.getItem(g);
|
|
1209
|
+
return h && (localStorage.removeItem(g), h = JSON.parse(h)), a(), h;
|
|
1225
1210
|
}
|
|
1226
1211
|
}, r.add = function(d) {
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1212
|
+
a();
|
|
1213
|
+
var g = "kc-callback-" + d.state;
|
|
1214
|
+
d.expires = (/* @__PURE__ */ new Date()).getTime() + 60 * 60 * 1e3, localStorage.setItem(g, JSON.stringify(d));
|
|
1230
1215
|
};
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
return
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
if (
|
|
1239
|
-
return
|
|
1216
|
+
}, ae = function() {
|
|
1217
|
+
if (!(this instanceof ae))
|
|
1218
|
+
return new ae();
|
|
1219
|
+
var r = this;
|
|
1220
|
+
r.get = function(h) {
|
|
1221
|
+
if (h) {
|
|
1222
|
+
var _ = d("kc-callback-" + h);
|
|
1223
|
+
if (g("kc-callback-" + h, "", a(-100)), _)
|
|
1224
|
+
return JSON.parse(_);
|
|
1225
|
+
}
|
|
1226
|
+
}, r.add = function(h) {
|
|
1227
|
+
g("kc-callback-" + h.state, JSON.stringify(h), a(60));
|
|
1228
|
+
}, r.removeItem = function(h) {
|
|
1229
|
+
g(h, "", a(-100));
|
|
1230
|
+
};
|
|
1231
|
+
var a = function(h) {
|
|
1232
|
+
var _ = /* @__PURE__ */ new Date();
|
|
1233
|
+
return _.setTime(_.getTime() + h * 60 * 1e3), _;
|
|
1234
|
+
}, d = function(h) {
|
|
1235
|
+
for (var _ = h + "=", m = document.cookie.split(";"), b = 0; b < m.length; b++) {
|
|
1236
|
+
for (var E = m[b]; E.charAt(0) == " "; )
|
|
1237
|
+
E = E.substring(1);
|
|
1238
|
+
if (E.indexOf(_) == 0)
|
|
1239
|
+
return E.substring(_.length, E.length);
|
|
1240
1240
|
}
|
|
1241
1241
|
return "";
|
|
1242
|
-
},
|
|
1243
|
-
var
|
|
1244
|
-
document.cookie =
|
|
1242
|
+
}, g = function(h, _, m) {
|
|
1243
|
+
var b = h + "=" + _ + "; expires=" + m.toUTCString() + "; ";
|
|
1244
|
+
document.cookie = b;
|
|
1245
1245
|
};
|
|
1246
1246
|
};
|
|
1247
|
-
function
|
|
1247
|
+
function P() {
|
|
1248
1248
|
try {
|
|
1249
|
-
return new
|
|
1249
|
+
return new G();
|
|
1250
1250
|
} catch {
|
|
1251
1251
|
}
|
|
1252
|
-
return new
|
|
1252
|
+
return new ae();
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function fe(r) {
|
|
1255
1255
|
return function() {
|
|
1256
1256
|
e.enableLogging && r.apply(console, Array.prototype.slice.call(arguments));
|
|
1257
1257
|
};
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
n && await
|
|
1260
|
+
const Kt = new Fo(), as = (t, e) => {
|
|
1261
|
+
Kt.init({ onLoad: "login-required" }).then(async (n) => {
|
|
1262
|
+
n && await cs(), t();
|
|
1263
1263
|
}).catch((n) => {
|
|
1264
1264
|
e(n);
|
|
1265
1265
|
});
|
|
1266
|
-
},
|
|
1267
|
-
const t = await
|
|
1268
|
-
|
|
1269
|
-
},
|
|
1270
|
-
|
|
1266
|
+
}, cs = async () => {
|
|
1267
|
+
const t = await Kt.loadUserInfo();
|
|
1268
|
+
le.User.email = t.email ?? "", le.User.emailVerified = t.email_verified === !0, le.User.firstName = t.given_name ?? "", le.User.lastName = t.family_name ?? "", le.User.name = t.name ?? "", le.User.sub = t.sub ?? "", le.User.username = t.preferred_username ?? "", le.User.roles = [...t.role ?? []], le.User.groups = [...t.group ?? []], le.User.IsInRole = (e) => le.User.roles.includes(e);
|
|
1269
|
+
}, ls = () => {
|
|
1270
|
+
Kt.logout({
|
|
1271
1271
|
redirectUri: location.origin
|
|
1272
1272
|
}).then(() => {
|
|
1273
1273
|
sessionStorage.removeItem("user-info");
|
|
1274
1274
|
});
|
|
1275
|
-
},
|
|
1276
|
-
Instance:
|
|
1275
|
+
}, le = {
|
|
1276
|
+
Instance: Kt,
|
|
1277
1277
|
User: {},
|
|
1278
|
-
CallLogin:
|
|
1279
|
-
CallLogout:
|
|
1280
|
-
},
|
|
1278
|
+
CallLogin: as,
|
|
1279
|
+
CallLogout: ls
|
|
1280
|
+
}, Bo = "SweetAlert2:", us = (t) => {
|
|
1281
1281
|
const e = [];
|
|
1282
1282
|
for (let n = 0; n < t.length; n++)
|
|
1283
1283
|
e.indexOf(t[n]) === -1 && e.push(t[n]);
|
|
1284
1284
|
return e;
|
|
1285
|
-
},
|
|
1286
|
-
console.warn(`${
|
|
1287
|
-
},
|
|
1288
|
-
console.error(`${
|
|
1289
|
-
},
|
|
1290
|
-
|
|
1291
|
-
},
|
|
1292
|
-
|
|
1285
|
+
}, En = (t) => t.charAt(0).toUpperCase() + t.slice(1), xe = (t) => Array.prototype.slice.call(t), be = (t) => {
|
|
1286
|
+
console.warn(`${Bo} ${typeof t == "object" ? t.join(" ") : t}`);
|
|
1287
|
+
}, Je = (t) => {
|
|
1288
|
+
console.error(`${Bo} ${t}`);
|
|
1289
|
+
}, oo = [], ds = (t) => {
|
|
1290
|
+
oo.includes(t) || (oo.push(t), be(t));
|
|
1291
|
+
}, fs = (t, e) => {
|
|
1292
|
+
ds(
|
|
1293
1293
|
`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`
|
|
1294
1294
|
);
|
|
1295
|
-
},
|
|
1295
|
+
}, Gt = (t) => typeof t == "function" ? t() : t, Tn = (t) => t && typeof t.toPromise == "function", St = (t) => Tn(t) ? t.toPromise() : Promise.resolve(t), Sn = (t) => t && Promise.resolve(t) === t, it = {
|
|
1296
1296
|
title: "",
|
|
1297
1297
|
titleText: "",
|
|
1298
1298
|
text: "",
|
|
@@ -1380,7 +1380,7 @@ const ut = new un(), Co = (t, e) => {
|
|
|
1380
1380
|
didClose: void 0,
|
|
1381
1381
|
didDestroy: void 0,
|
|
1382
1382
|
scrollbarPadding: !0
|
|
1383
|
-
},
|
|
1383
|
+
}, hs = [
|
|
1384
1384
|
"allowEscapeKey",
|
|
1385
1385
|
"allowOutsideClick",
|
|
1386
1386
|
"background",
|
|
@@ -1424,7 +1424,7 @@ const ut = new un(), Co = (t, e) => {
|
|
|
1424
1424
|
"title",
|
|
1425
1425
|
"titleText",
|
|
1426
1426
|
"willClose"
|
|
1427
|
-
],
|
|
1427
|
+
], ps = {}, ms = [
|
|
1428
1428
|
"allowOutsideClick",
|
|
1429
1429
|
"allowEnterKey",
|
|
1430
1430
|
"backdrop",
|
|
@@ -1434,22 +1434,22 @@ const ut = new un(), Co = (t, e) => {
|
|
|
1434
1434
|
"returnFocus",
|
|
1435
1435
|
"heightAuto",
|
|
1436
1436
|
"keydownListenerCapture"
|
|
1437
|
-
],
|
|
1438
|
-
|
|
1439
|
-
},
|
|
1440
|
-
|
|
1441
|
-
},
|
|
1442
|
-
|
|
1443
|
-
},
|
|
1444
|
-
!t.backdrop && t.allowOutsideClick &&
|
|
1437
|
+
], Mo = (t) => Object.prototype.hasOwnProperty.call(it, t), Uo = (t) => hs.indexOf(t) !== -1, gn = (t) => ps[t], gs = (t) => {
|
|
1438
|
+
Mo(t) || be(`Unknown parameter "${t}"`);
|
|
1439
|
+
}, bs = (t) => {
|
|
1440
|
+
ms.includes(t) && be(`The parameter "${t}" is incompatible with toasts`);
|
|
1441
|
+
}, vs = (t) => {
|
|
1442
|
+
gn(t) && fs(t, gn(t));
|
|
1443
|
+
}, ys = (t) => {
|
|
1444
|
+
!t.backdrop && t.allowOutsideClick && be('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');
|
|
1445
1445
|
for (const e in t)
|
|
1446
|
-
|
|
1447
|
-
},
|
|
1446
|
+
gs(e), t.toast && bs(e), vs(e);
|
|
1447
|
+
}, ws = "swal2-", Do = (t) => {
|
|
1448
1448
|
const e = {};
|
|
1449
1449
|
for (const n in t)
|
|
1450
|
-
e[t[n]] =
|
|
1450
|
+
e[t[n]] = ws + t[n];
|
|
1451
1451
|
return e;
|
|
1452
|
-
},
|
|
1452
|
+
}, l = Do([
|
|
1453
1453
|
"container",
|
|
1454
1454
|
"shown",
|
|
1455
1455
|
"height-auto",
|
|
@@ -1519,10 +1519,10 @@ const ut = new un(), Co = (t, e) => {
|
|
|
1519
1519
|
"icon-info",
|
|
1520
1520
|
"icon-question",
|
|
1521
1521
|
"icon-error"
|
|
1522
|
-
]),
|
|
1523
|
-
const e =
|
|
1522
|
+
]), xt = Do(["success", "warning", "info", "question", "error"]), se = () => document.body.querySelector(`.${l.container}`), Lt = (t) => {
|
|
1523
|
+
const e = se();
|
|
1524
1524
|
return e ? e.querySelector(t) : null;
|
|
1525
|
-
},
|
|
1525
|
+
}, Se = (t) => Lt(`.${t}`), V = () => Se(l.popup), It = () => Se(l.icon), No = () => Se(l.title), zt = () => Se(l["html-container"]), $o = () => Se(l.image), Ho = () => Se(l["progress-steps"]), Yt = () => Se(l["validation-message"]), Ie = () => Lt(`.${l.actions} .${l.confirm}`), ze = () => Lt(`.${l.actions} .${l.deny}`), ks = () => Se(l["input-label"]), dt = () => Lt(`.${l.loader}`), Ge = () => Lt(`.${l.actions} .${l.cancel}`), Pt = () => Se(l.actions), jo = () => Se(l.footer), Jt = () => Se(l["timer-progress-bar"]), Ln = () => Se(l.close), As = `
|
|
1526
1526
|
a[href],
|
|
1527
1527
|
area[href],
|
|
1528
1528
|
input:not([disabled]),
|
|
@@ -1537,28 +1537,28 @@ const ut = new un(), Co = (t, e) => {
|
|
|
1537
1537
|
audio[controls],
|
|
1538
1538
|
video[controls],
|
|
1539
1539
|
summary
|
|
1540
|
-
`,
|
|
1541
|
-
const t =
|
|
1542
|
-
|
|
1540
|
+
`, In = () => {
|
|
1541
|
+
const t = xe(
|
|
1542
|
+
V().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')
|
|
1543
1543
|
).sort((n, o) => {
|
|
1544
1544
|
const i = parseInt(n.getAttribute("tabindex")), c = parseInt(o.getAttribute("tabindex"));
|
|
1545
1545
|
return i > c ? 1 : i < c ? -1 : 0;
|
|
1546
|
-
}), e =
|
|
1546
|
+
}), e = xe(V().querySelectorAll(As)).filter(
|
|
1547
1547
|
(n) => n.getAttribute("tabindex") !== "-1"
|
|
1548
1548
|
);
|
|
1549
|
-
return
|
|
1550
|
-
},
|
|
1549
|
+
return us(t.concat(e)).filter((n) => _e(n));
|
|
1550
|
+
}, Pn = () => Ne(document.body, l.shown) && !Ne(document.body, l["toast-shown"]) && !Ne(document.body, l["no-backdrop"]), Xt = () => V() && Ne(V(), l.toast), _s = () => V().hasAttribute("data-loading"), at = {
|
|
1551
1551
|
previousBodyPadding: null
|
|
1552
|
-
},
|
|
1552
|
+
}, re = (t, e) => {
|
|
1553
1553
|
if (t.textContent = "", e) {
|
|
1554
1554
|
const o = new DOMParser().parseFromString(e, "text/html");
|
|
1555
|
-
|
|
1555
|
+
xe(o.querySelector("head").childNodes).forEach((i) => {
|
|
1556
1556
|
t.appendChild(i);
|
|
1557
|
-
}),
|
|
1557
|
+
}), xe(o.querySelector("body").childNodes).forEach((i) => {
|
|
1558
1558
|
t.appendChild(i);
|
|
1559
1559
|
});
|
|
1560
1560
|
}
|
|
1561
|
-
},
|
|
1561
|
+
}, Ne = (t, e) => {
|
|
1562
1562
|
if (!e)
|
|
1563
1563
|
return !1;
|
|
1564
1564
|
const n = e.split(/\s+/);
|
|
@@ -1566,163 +1566,163 @@ const ut = new un(), Co = (t, e) => {
|
|
|
1566
1566
|
if (!t.classList.contains(n[o]))
|
|
1567
1567
|
return !1;
|
|
1568
1568
|
return !0;
|
|
1569
|
-
},
|
|
1570
|
-
|
|
1571
|
-
!Object.values(
|
|
1569
|
+
}, xs = (t, e) => {
|
|
1570
|
+
xe(t.classList).forEach((n) => {
|
|
1571
|
+
!Object.values(l).includes(n) && !Object.values(xt).includes(n) && !Object.values(e.showClass).includes(n) && t.classList.remove(n);
|
|
1572
1572
|
});
|
|
1573
|
-
},
|
|
1574
|
-
if (
|
|
1573
|
+
}, Ee = (t, e, n) => {
|
|
1574
|
+
if (xs(t, e), e.customClass && e.customClass[n]) {
|
|
1575
1575
|
if (typeof e.customClass[n] != "string" && !e.customClass[n].forEach)
|
|
1576
|
-
return
|
|
1576
|
+
return be(
|
|
1577
1577
|
`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof e.customClass[n]}"`
|
|
1578
1578
|
);
|
|
1579
|
-
|
|
1579
|
+
$(t, e.customClass[n]);
|
|
1580
1580
|
}
|
|
1581
|
-
},
|
|
1581
|
+
}, Rn = (t, e) => {
|
|
1582
1582
|
if (!e)
|
|
1583
1583
|
return null;
|
|
1584
1584
|
switch (e) {
|
|
1585
1585
|
case "select":
|
|
1586
1586
|
case "textarea":
|
|
1587
1587
|
case "file":
|
|
1588
|
-
return t.querySelector(`.${
|
|
1588
|
+
return t.querySelector(`.${l.popup} > .${l[e]}`);
|
|
1589
1589
|
case "checkbox":
|
|
1590
|
-
return t.querySelector(`.${
|
|
1590
|
+
return t.querySelector(`.${l.popup} > .${l.checkbox} input`);
|
|
1591
1591
|
case "radio":
|
|
1592
|
-
return t.querySelector(`.${
|
|
1592
|
+
return t.querySelector(`.${l.popup} > .${l.radio} input:checked`) || t.querySelector(`.${l.popup} > .${l.radio} input:first-child`);
|
|
1593
1593
|
case "range":
|
|
1594
|
-
return t.querySelector(`.${
|
|
1594
|
+
return t.querySelector(`.${l.popup} > .${l.range} input`);
|
|
1595
1595
|
default:
|
|
1596
|
-
return t.querySelector(`.${
|
|
1596
|
+
return t.querySelector(`.${l.popup} > .${l.input}`);
|
|
1597
1597
|
}
|
|
1598
|
-
},
|
|
1598
|
+
}, zo = (t) => {
|
|
1599
1599
|
if (t.focus(), t.type !== "file") {
|
|
1600
1600
|
const e = t.value;
|
|
1601
1601
|
t.value = "", t.value = e;
|
|
1602
1602
|
}
|
|
1603
|
-
},
|
|
1603
|
+
}, Vo = (t, e, n) => {
|
|
1604
1604
|
!t || !e || (typeof e == "string" && (e = e.split(/\s+/).filter(Boolean)), e.forEach((o) => {
|
|
1605
1605
|
Array.isArray(t) ? t.forEach((i) => {
|
|
1606
1606
|
n ? i.classList.add(o) : i.classList.remove(o);
|
|
1607
1607
|
}) : n ? t.classList.add(o) : t.classList.remove(o);
|
|
1608
1608
|
}));
|
|
1609
|
-
},
|
|
1610
|
-
|
|
1611
|
-
},
|
|
1612
|
-
|
|
1613
|
-
},
|
|
1614
|
-
const n =
|
|
1609
|
+
}, $ = (t, e) => {
|
|
1610
|
+
Vo(t, e, !0);
|
|
1611
|
+
}, Fe = (t, e) => {
|
|
1612
|
+
Vo(t, e, !1);
|
|
1613
|
+
}, je = (t, e) => {
|
|
1614
|
+
const n = xe(t.childNodes);
|
|
1615
1615
|
for (let o = 0; o < n.length; o++)
|
|
1616
|
-
if (
|
|
1616
|
+
if (Ne(n[o], e))
|
|
1617
1617
|
return n[o];
|
|
1618
|
-
},
|
|
1618
|
+
}, Ct = (t, e, n) => {
|
|
1619
1619
|
n === `${parseInt(n)}` && (n = parseInt(n)), n || parseInt(n) === 0 ? t.style[e] = typeof n == "number" ? `${n}px` : n : t.style.removeProperty(e);
|
|
1620
|
-
},
|
|
1620
|
+
}, te = (t, e = "flex") => {
|
|
1621
1621
|
t.style.display = e;
|
|
1622
|
-
},
|
|
1622
|
+
}, ie = (t) => {
|
|
1623
1623
|
t.style.display = "none";
|
|
1624
|
-
},
|
|
1624
|
+
}, ro = (t, e, n, o) => {
|
|
1625
1625
|
const i = t.querySelector(e);
|
|
1626
1626
|
i && (i.style[n] = o);
|
|
1627
|
-
},
|
|
1628
|
-
e ?
|
|
1629
|
-
},
|
|
1627
|
+
}, Zt = (t, e, n) => {
|
|
1628
|
+
e ? te(t, n) : ie(t);
|
|
1629
|
+
}, _e = (t) => !!(t && (t.offsetWidth || t.offsetHeight || t.getClientRects().length)), Cs = () => !_e(Ie()) && !_e(ze()) && !_e(Ge()), so = (t) => t.scrollHeight > t.clientHeight, Wo = (t) => {
|
|
1630
1630
|
const e = window.getComputedStyle(t), n = parseFloat(e.getPropertyValue("animation-duration") || "0"), o = parseFloat(e.getPropertyValue("transition-duration") || "0");
|
|
1631
1631
|
return n > 0 || o > 0;
|
|
1632
|
-
},
|
|
1633
|
-
const n =
|
|
1634
|
-
|
|
1632
|
+
}, On = (t, e = !1) => {
|
|
1633
|
+
const n = Jt();
|
|
1634
|
+
_e(n) && (e && (n.style.transition = "none", n.style.width = "100%"), setTimeout(() => {
|
|
1635
1635
|
n.style.transition = `width ${t / 1e3}s linear`, n.style.width = "0%";
|
|
1636
1636
|
}, 10));
|
|
1637
|
-
},
|
|
1638
|
-
const t =
|
|
1637
|
+
}, Es = () => {
|
|
1638
|
+
const t = Jt(), e = parseInt(window.getComputedStyle(t).width);
|
|
1639
1639
|
t.style.removeProperty("transition"), t.style.width = "100%";
|
|
1640
1640
|
const n = parseInt(window.getComputedStyle(t).width), o = e / n * 100;
|
|
1641
1641
|
t.style.removeProperty("transition"), t.style.width = `${o}%`;
|
|
1642
|
-
},
|
|
1643
|
-
|
|
1644
|
-
},
|
|
1642
|
+
}, qo = () => typeof window > "u" || typeof document > "u", Ts = 100, B = {}, Ss = () => {
|
|
1643
|
+
B.previousActiveElement && B.previousActiveElement.focus ? (B.previousActiveElement.focus(), B.previousActiveElement = null) : document.body && document.body.focus();
|
|
1644
|
+
}, Ls = (t) => new Promise((e) => {
|
|
1645
1645
|
if (!t)
|
|
1646
1646
|
return e();
|
|
1647
1647
|
const n = window.scrollX, o = window.scrollY;
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
},
|
|
1651
|
-
}),
|
|
1652
|
-
<div aria-labelledby="${
|
|
1653
|
-
<button type="button" class="${
|
|
1654
|
-
<ul class="${
|
|
1655
|
-
<div class="${
|
|
1656
|
-
<img class="${
|
|
1657
|
-
<h2 class="${
|
|
1658
|
-
<div class="${
|
|
1659
|
-
<input class="${
|
|
1660
|
-
<input type="file" class="${
|
|
1661
|
-
<div class="${
|
|
1648
|
+
B.restoreFocusTimeout = setTimeout(() => {
|
|
1649
|
+
Ss(), e();
|
|
1650
|
+
}, Ts), window.scrollTo(n, o);
|
|
1651
|
+
}), Is = `
|
|
1652
|
+
<div aria-labelledby="${l.title}" aria-describedby="${l["html-container"]}" class="${l.popup}" tabindex="-1">
|
|
1653
|
+
<button type="button" class="${l.close}"></button>
|
|
1654
|
+
<ul class="${l["progress-steps"]}"></ul>
|
|
1655
|
+
<div class="${l.icon}"></div>
|
|
1656
|
+
<img class="${l.image}" />
|
|
1657
|
+
<h2 class="${l.title}" id="${l.title}"></h2>
|
|
1658
|
+
<div class="${l["html-container"]}" id="${l["html-container"]}"></div>
|
|
1659
|
+
<input class="${l.input}" />
|
|
1660
|
+
<input type="file" class="${l.file}" />
|
|
1661
|
+
<div class="${l.range}">
|
|
1662
1662
|
<input type="range" />
|
|
1663
1663
|
<output></output>
|
|
1664
1664
|
</div>
|
|
1665
|
-
<select class="${
|
|
1666
|
-
<div class="${
|
|
1667
|
-
<label for="${
|
|
1665
|
+
<select class="${l.select}"></select>
|
|
1666
|
+
<div class="${l.radio}"></div>
|
|
1667
|
+
<label for="${l.checkbox}" class="${l.checkbox}">
|
|
1668
1668
|
<input type="checkbox" />
|
|
1669
|
-
<span class="${
|
|
1669
|
+
<span class="${l.label}"></span>
|
|
1670
1670
|
</label>
|
|
1671
|
-
<textarea class="${
|
|
1672
|
-
<div class="${
|
|
1673
|
-
<div class="${
|
|
1674
|
-
<div class="${
|
|
1675
|
-
<button type="button" class="${
|
|
1676
|
-
<button type="button" class="${
|
|
1677
|
-
<button type="button" class="${
|
|
1671
|
+
<textarea class="${l.textarea}"></textarea>
|
|
1672
|
+
<div class="${l["validation-message"]}" id="${l["validation-message"]}"></div>
|
|
1673
|
+
<div class="${l.actions}">
|
|
1674
|
+
<div class="${l.loader}"></div>
|
|
1675
|
+
<button type="button" class="${l.confirm}"></button>
|
|
1676
|
+
<button type="button" class="${l.deny}"></button>
|
|
1677
|
+
<button type="button" class="${l.cancel}"></button>
|
|
1678
1678
|
</div>
|
|
1679
|
-
<div class="${
|
|
1680
|
-
<div class="${
|
|
1681
|
-
<div class="${
|
|
1679
|
+
<div class="${l.footer}"></div>
|
|
1680
|
+
<div class="${l["timer-progress-bar-container"]}">
|
|
1681
|
+
<div class="${l["timer-progress-bar"]}"></div>
|
|
1682
1682
|
</div>
|
|
1683
1683
|
</div>
|
|
1684
|
-
`.replace(/(^|\n)\s*/g, ""),
|
|
1685
|
-
const t =
|
|
1686
|
-
return t ? (t.remove(),
|
|
1684
|
+
`.replace(/(^|\n)\s*/g, ""), Ps = () => {
|
|
1685
|
+
const t = se();
|
|
1686
|
+
return t ? (t.remove(), Fe(
|
|
1687
1687
|
[document.documentElement, document.body],
|
|
1688
|
-
[
|
|
1688
|
+
[l["no-backdrop"], l["toast-shown"], l["has-column"]]
|
|
1689
1689
|
), !0) : !1;
|
|
1690
|
-
},
|
|
1691
|
-
|
|
1692
|
-
},
|
|
1693
|
-
const t =
|
|
1694
|
-
e.oninput =
|
|
1695
|
-
|
|
1690
|
+
}, Ke = () => {
|
|
1691
|
+
B.currentInstance.resetValidationMessage();
|
|
1692
|
+
}, Rs = () => {
|
|
1693
|
+
const t = V(), e = je(t, l.input), n = je(t, l.file), o = t.querySelector(`.${l.range} input`), i = t.querySelector(`.${l.range} output`), c = je(t, l.select), x = t.querySelector(`.${l.checkbox} input`), L = je(t, l.textarea);
|
|
1694
|
+
e.oninput = Ke, n.onchange = Ke, c.onchange = Ke, x.onchange = Ke, L.oninput = Ke, o.oninput = () => {
|
|
1695
|
+
Ke(), i.value = o.value;
|
|
1696
1696
|
}, o.onchange = () => {
|
|
1697
|
-
|
|
1697
|
+
Ke(), o.nextSibling.value = o.value;
|
|
1698
1698
|
};
|
|
1699
|
-
},
|
|
1700
|
-
const e =
|
|
1699
|
+
}, Os = (t) => typeof t == "string" ? document.querySelector(t) : t, Fs = (t) => {
|
|
1700
|
+
const e = V();
|
|
1701
1701
|
e.setAttribute("role", t.toast ? "alert" : "dialog"), e.setAttribute("aria-live", t.toast ? "polite" : "assertive"), t.toast || e.setAttribute("aria-modal", "true");
|
|
1702
|
-
},
|
|
1703
|
-
window.getComputedStyle(t).direction === "rtl" &&
|
|
1704
|
-
},
|
|
1705
|
-
const e =
|
|
1706
|
-
if (
|
|
1707
|
-
|
|
1702
|
+
}, Bs = (t) => {
|
|
1703
|
+
window.getComputedStyle(t).direction === "rtl" && $(se(), l.rtl);
|
|
1704
|
+
}, Ms = (t) => {
|
|
1705
|
+
const e = Ps();
|
|
1706
|
+
if (qo()) {
|
|
1707
|
+
Je("SweetAlert2 requires document to initialize");
|
|
1708
1708
|
return;
|
|
1709
1709
|
}
|
|
1710
1710
|
const n = document.createElement("div");
|
|
1711
|
-
n.className =
|
|
1712
|
-
const o =
|
|
1713
|
-
o.appendChild(n),
|
|
1714
|
-
},
|
|
1715
|
-
t instanceof HTMLElement ? e.appendChild(t) : typeof t == "object" ?
|
|
1716
|
-
},
|
|
1717
|
-
t.jquery ?
|
|
1718
|
-
},
|
|
1711
|
+
n.className = l.container, e && $(n, l["no-transition"]), re(n, Is);
|
|
1712
|
+
const o = Os(t.target);
|
|
1713
|
+
o.appendChild(n), Fs(t), Bs(o), Rs();
|
|
1714
|
+
}, Fn = (t, e) => {
|
|
1715
|
+
t instanceof HTMLElement ? e.appendChild(t) : typeof t == "object" ? Us(t, e) : t && re(e, t);
|
|
1716
|
+
}, Us = (t, e) => {
|
|
1717
|
+
t.jquery ? Ds(e, t) : re(e, t.toString());
|
|
1718
|
+
}, Ds = (t, e) => {
|
|
1719
1719
|
if (t.textContent = "", 0 in e)
|
|
1720
1720
|
for (let n = 0; n in e; n++)
|
|
1721
1721
|
t.appendChild(e[n].cloneNode(!0));
|
|
1722
1722
|
else
|
|
1723
1723
|
t.appendChild(e.cloneNode(!0));
|
|
1724
|
-
},
|
|
1725
|
-
if (
|
|
1724
|
+
}, Et = (() => {
|
|
1725
|
+
if (qo())
|
|
1726
1726
|
return !1;
|
|
1727
1727
|
const t = document.createElement("div"), e = {
|
|
1728
1728
|
WebkitAnimation: "webkitAnimationEnd",
|
|
@@ -1734,119 +1734,119 @@ const ut = new un(), Co = (t, e) => {
|
|
|
1734
1734
|
if (Object.prototype.hasOwnProperty.call(e, n) && typeof t.style[n] < "u")
|
|
1735
1735
|
return e[n];
|
|
1736
1736
|
return !1;
|
|
1737
|
-
})(),
|
|
1737
|
+
})(), Ns = () => {
|
|
1738
1738
|
const t = document.createElement("div");
|
|
1739
|
-
t.className =
|
|
1739
|
+
t.className = l["scrollbar-measure"], document.body.appendChild(t);
|
|
1740
1740
|
const e = t.getBoundingClientRect().width - t.clientWidth;
|
|
1741
1741
|
return document.body.removeChild(t), e;
|
|
1742
|
-
},
|
|
1743
|
-
const n =
|
|
1744
|
-
!e.showConfirmButton && !e.showDenyButton && !e.showCancelButton ?
|
|
1742
|
+
}, $s = (t, e) => {
|
|
1743
|
+
const n = Pt(), o = dt();
|
|
1744
|
+
!e.showConfirmButton && !e.showDenyButton && !e.showCancelButton ? ie(n) : te(n), Ee(n, e, "actions"), Hs(n, o, e), re(o, e.loaderHtml), Ee(o, e, "loader");
|
|
1745
1745
|
};
|
|
1746
|
-
function
|
|
1747
|
-
const o =
|
|
1748
|
-
|
|
1746
|
+
function Hs(t, e, n) {
|
|
1747
|
+
const o = Ie(), i = ze(), c = Ge();
|
|
1748
|
+
ln(o, "confirm", n), ln(i, "deny", n), ln(c, "cancel", n), js(o, i, c, n), n.reverseButtons && (n.toast ? (t.insertBefore(c, o), t.insertBefore(i, o)) : (t.insertBefore(c, e), t.insertBefore(i, e), t.insertBefore(o, e)));
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function js(t, e, n, o) {
|
|
1751
1751
|
if (!o.buttonsStyling)
|
|
1752
|
-
return
|
|
1753
|
-
|
|
1752
|
+
return Fe([t, e, n], l.styled);
|
|
1753
|
+
$([t, e, n], l.styled), o.confirmButtonColor && (t.style.backgroundColor = o.confirmButtonColor, $(t, l["default-outline"])), o.denyButtonColor && (e.style.backgroundColor = o.denyButtonColor, $(e, l["default-outline"])), o.cancelButtonColor && (n.style.backgroundColor = o.cancelButtonColor, $(n, l["default-outline"]));
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1756
|
-
|
|
1755
|
+
function ln(t, e, n) {
|
|
1756
|
+
Zt(t, n[`show${En(e)}Button`], "inline-block"), re(t, n[`${e}ButtonText`]), t.setAttribute("aria-label", n[`${e}ButtonAriaLabel`]), t.className = l[e], Ee(t, n, `${e}Button`), $(t, n[`${e}ButtonClass`]);
|
|
1757
1757
|
}
|
|
1758
|
-
function
|
|
1759
|
-
typeof e == "string" ? t.style.background = e : e ||
|
|
1758
|
+
function zs(t, e) {
|
|
1759
|
+
typeof e == "string" ? t.style.background = e : e || $([document.documentElement, document.body], l["no-backdrop"]);
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1762
|
-
e in
|
|
1761
|
+
function Vs(t, e) {
|
|
1762
|
+
e in l ? $(t, l[e]) : (be('The "position" parameter is not valid, defaulting to "center"'), $(t, l.center));
|
|
1763
1763
|
}
|
|
1764
|
-
function
|
|
1764
|
+
function Ws(t, e) {
|
|
1765
1765
|
if (e && typeof e == "string") {
|
|
1766
1766
|
const n = `grow-${e}`;
|
|
1767
|
-
n in
|
|
1767
|
+
n in l && $(t, l[n]);
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
|
-
const
|
|
1771
|
-
const n =
|
|
1772
|
-
n && (
|
|
1773
|
-
},
|
|
1770
|
+
const qs = (t, e) => {
|
|
1771
|
+
const n = se();
|
|
1772
|
+
n && (zs(n, e.backdrop), Vs(n, e.position), Ws(n, e.grow), Ee(n, e, "container"));
|
|
1773
|
+
}, U = {
|
|
1774
1774
|
awaitingPromise: /* @__PURE__ */ new WeakMap(),
|
|
1775
1775
|
promise: /* @__PURE__ */ new WeakMap(),
|
|
1776
1776
|
innerParams: /* @__PURE__ */ new WeakMap(),
|
|
1777
1777
|
domCache: /* @__PURE__ */ new WeakMap()
|
|
1778
|
-
},
|
|
1779
|
-
const n =
|
|
1780
|
-
|
|
1781
|
-
const x =
|
|
1782
|
-
|
|
1783
|
-
}), e.input && (i &&
|
|
1784
|
-
},
|
|
1785
|
-
if (!
|
|
1786
|
-
return
|
|
1778
|
+
}, Ks = ["input", "file", "range", "select", "radio", "checkbox", "textarea"], Gs = (t, e) => {
|
|
1779
|
+
const n = V(), o = U.innerParams.get(t), i = !o || e.input !== o.input;
|
|
1780
|
+
Ks.forEach((c) => {
|
|
1781
|
+
const x = l[c], L = je(n, x);
|
|
1782
|
+
Xs(c, e.inputAttributes), L.className = x, i && ie(L);
|
|
1783
|
+
}), e.input && (i && Ys(e), Zs(e));
|
|
1784
|
+
}, Ys = (t) => {
|
|
1785
|
+
if (!ge[t.input])
|
|
1786
|
+
return Je(
|
|
1787
1787
|
`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${t.input}"`
|
|
1788
1788
|
);
|
|
1789
|
-
const e =
|
|
1790
|
-
|
|
1791
|
-
|
|
1789
|
+
const e = Ko(t.input), n = ge[t.input](e, t);
|
|
1790
|
+
te(n), setTimeout(() => {
|
|
1791
|
+
zo(n);
|
|
1792
1792
|
});
|
|
1793
|
-
},
|
|
1793
|
+
}, Js = (t) => {
|
|
1794
1794
|
for (let e = 0; e < t.attributes.length; e++) {
|
|
1795
1795
|
const n = t.attributes[e].name;
|
|
1796
1796
|
["type", "value", "style"].includes(n) || t.removeAttribute(n);
|
|
1797
1797
|
}
|
|
1798
|
-
},
|
|
1799
|
-
const n =
|
|
1798
|
+
}, Xs = (t, e) => {
|
|
1799
|
+
const n = Rn(V(), t);
|
|
1800
1800
|
if (n) {
|
|
1801
|
-
|
|
1801
|
+
Js(n);
|
|
1802
1802
|
for (const o in e)
|
|
1803
1803
|
n.setAttribute(o, e[o]);
|
|
1804
1804
|
}
|
|
1805
|
-
},
|
|
1806
|
-
const e =
|
|
1807
|
-
t.customClass &&
|
|
1808
|
-
},
|
|
1805
|
+
}, Zs = (t) => {
|
|
1806
|
+
const e = Ko(t.input);
|
|
1807
|
+
t.customClass && $(e, t.customClass.input);
|
|
1808
|
+
}, Bn = (t, e) => {
|
|
1809
1809
|
(!t.placeholder || e.inputPlaceholder) && (t.placeholder = e.inputPlaceholder);
|
|
1810
|
-
},
|
|
1810
|
+
}, Rt = (t, e, n) => {
|
|
1811
1811
|
if (n.inputLabel) {
|
|
1812
|
-
t.id =
|
|
1813
|
-
const o = document.createElement("label"), i =
|
|
1814
|
-
o.setAttribute("for", t.id), o.className = i,
|
|
1815
|
-
}
|
|
1816
|
-
},
|
|
1817
|
-
const e =
|
|
1818
|
-
return
|
|
1819
|
-
},
|
|
1820
|
-
|
|
1812
|
+
t.id = l.input;
|
|
1813
|
+
const o = document.createElement("label"), i = l["input-label"];
|
|
1814
|
+
o.setAttribute("for", t.id), o.className = i, $(o, n.customClass.inputLabel), o.innerText = n.inputLabel, e.insertAdjacentElement("beforebegin", o);
|
|
1815
|
+
}
|
|
1816
|
+
}, Ko = (t) => {
|
|
1817
|
+
const e = l[t] ? l[t] : l.input;
|
|
1818
|
+
return je(V(), e);
|
|
1819
|
+
}, ge = {};
|
|
1820
|
+
ge.text = ge.email = ge.password = ge.number = ge.tel = ge.url = (t, e) => (typeof e.inputValue == "string" || typeof e.inputValue == "number" ? t.value = e.inputValue : Sn(e.inputValue) || be(
|
|
1821
1821
|
`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e.inputValue}"`
|
|
1822
|
-
),
|
|
1823
|
-
|
|
1824
|
-
|
|
1822
|
+
), Rt(t, t, e), Bn(t, e), t.type = e.input, t);
|
|
1823
|
+
ge.file = (t, e) => (Rt(t, t, e), Bn(t, e), t);
|
|
1824
|
+
ge.range = (t, e) => {
|
|
1825
1825
|
const n = t.querySelector("input"), o = t.querySelector("output");
|
|
1826
|
-
return n.value = e.inputValue, n.type = e.input, o.value = e.inputValue,
|
|
1826
|
+
return n.value = e.inputValue, n.type = e.input, o.value = e.inputValue, Rt(n, t, e), t;
|
|
1827
1827
|
};
|
|
1828
|
-
|
|
1828
|
+
ge.select = (t, e) => {
|
|
1829
1829
|
if (t.textContent = "", e.inputPlaceholder) {
|
|
1830
1830
|
const n = document.createElement("option");
|
|
1831
|
-
|
|
1831
|
+
re(n, e.inputPlaceholder), n.value = "", n.disabled = !0, n.selected = !0, t.appendChild(n);
|
|
1832
1832
|
}
|
|
1833
|
-
return
|
|
1833
|
+
return Rt(t, t, e), t;
|
|
1834
1834
|
};
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
const n =
|
|
1838
|
-
n.value = "1", n.id =
|
|
1835
|
+
ge.radio = (t) => (t.textContent = "", t);
|
|
1836
|
+
ge.checkbox = (t, e) => {
|
|
1837
|
+
const n = Rn(V(), "checkbox");
|
|
1838
|
+
n.value = "1", n.id = l.checkbox, n.checked = !!e.inputValue;
|
|
1839
1839
|
const o = t.querySelector("span");
|
|
1840
|
-
return
|
|
1840
|
+
return re(o, e.inputPlaceholder), t;
|
|
1841
1841
|
};
|
|
1842
|
-
|
|
1843
|
-
t.value = e.inputValue,
|
|
1842
|
+
ge.textarea = (t, e) => {
|
|
1843
|
+
t.value = e.inputValue, Bn(t, e), Rt(t, t, e);
|
|
1844
1844
|
const n = (o) => parseInt(window.getComputedStyle(o).marginLeft) + parseInt(window.getComputedStyle(o).marginRight);
|
|
1845
1845
|
return setTimeout(() => {
|
|
1846
1846
|
if ("MutationObserver" in window) {
|
|
1847
|
-
const o = parseInt(window.getComputedStyle(
|
|
1847
|
+
const o = parseInt(window.getComputedStyle(V()).width), i = () => {
|
|
1848
1848
|
const c = t.offsetWidth + n(t);
|
|
1849
|
-
c > o ?
|
|
1849
|
+
c > o ? V().style.width = `${c}px` : V().style.width = null;
|
|
1850
1850
|
};
|
|
1851
1851
|
new MutationObserver(i).observe(t, {
|
|
1852
1852
|
attributes: !0,
|
|
@@ -1855,51 +1855,51 @@ G.textarea = (t, e) => {
|
|
|
1855
1855
|
}
|
|
1856
1856
|
}), t;
|
|
1857
1857
|
};
|
|
1858
|
-
const
|
|
1859
|
-
const n =
|
|
1860
|
-
|
|
1861
|
-
},
|
|
1862
|
-
const n =
|
|
1863
|
-
|
|
1864
|
-
},
|
|
1865
|
-
const n =
|
|
1866
|
-
|
|
1867
|
-
},
|
|
1868
|
-
const n =
|
|
1858
|
+
const Qs = (t, e) => {
|
|
1859
|
+
const n = zt();
|
|
1860
|
+
Ee(n, e, "htmlContainer"), e.html ? (Fn(e.html, n), te(n, "block")) : e.text ? (n.textContent = e.text, te(n, "block")) : ie(n), Gs(t, e);
|
|
1861
|
+
}, ei = (t, e) => {
|
|
1862
|
+
const n = jo();
|
|
1863
|
+
Zt(n, e.footer), e.footer && Fn(e.footer, n), Ee(n, e, "footer");
|
|
1864
|
+
}, ti = (t, e) => {
|
|
1865
|
+
const n = Ln();
|
|
1866
|
+
re(n, e.closeButtonHtml), Ee(n, e, "closeButton"), Zt(n, e.showCloseButton), n.setAttribute("aria-label", e.closeButtonAriaLabel);
|
|
1867
|
+
}, ni = (t, e) => {
|
|
1868
|
+
const n = U.innerParams.get(t), o = It();
|
|
1869
1869
|
if (n && e.icon === n.icon) {
|
|
1870
|
-
|
|
1870
|
+
ao(o, e), io(o, e);
|
|
1871
1871
|
return;
|
|
1872
1872
|
}
|
|
1873
1873
|
if (!e.icon && !e.iconHtml)
|
|
1874
|
-
return
|
|
1875
|
-
if (e.icon && Object.keys(
|
|
1876
|
-
return
|
|
1877
|
-
|
|
1878
|
-
},
|
|
1879
|
-
for (const n in
|
|
1880
|
-
e.icon !== n &&
|
|
1881
|
-
|
|
1882
|
-
},
|
|
1883
|
-
const t =
|
|
1874
|
+
return ie(o);
|
|
1875
|
+
if (e.icon && Object.keys(xt).indexOf(e.icon) === -1)
|
|
1876
|
+
return Je(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`), ie(o);
|
|
1877
|
+
te(o), ao(o, e), io(o, e), $(o, e.showClass.icon);
|
|
1878
|
+
}, io = (t, e) => {
|
|
1879
|
+
for (const n in xt)
|
|
1880
|
+
e.icon !== n && Fe(t, xt[n]);
|
|
1881
|
+
$(t, xt[e.icon]), ii(t, e), oi(), Ee(t, e, "icon");
|
|
1882
|
+
}, oi = () => {
|
|
1883
|
+
const t = V(), e = window.getComputedStyle(t).getPropertyValue("background-color"), n = t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");
|
|
1884
1884
|
for (let o = 0; o < n.length; o++)
|
|
1885
1885
|
n[o].style.backgroundColor = e;
|
|
1886
|
-
},
|
|
1886
|
+
}, ri = `
|
|
1887
1887
|
<div class="swal2-success-circular-line-left"></div>
|
|
1888
1888
|
<span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
|
|
1889
1889
|
<div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
|
|
1890
1890
|
<div class="swal2-success-circular-line-right"></div>
|
|
1891
|
-
`,
|
|
1891
|
+
`, si = `
|
|
1892
1892
|
<span class="swal2-x-mark">
|
|
1893
1893
|
<span class="swal2-x-mark-line-left"></span>
|
|
1894
1894
|
<span class="swal2-x-mark-line-right"></span>
|
|
1895
1895
|
</span>
|
|
1896
|
-
`,
|
|
1897
|
-
t.textContent = "", e.iconHtml ?
|
|
1896
|
+
`, ao = (t, e) => {
|
|
1897
|
+
t.textContent = "", e.iconHtml ? re(t, co(e.iconHtml)) : e.icon === "success" ? re(t, ri) : e.icon === "error" ? re(t, si) : re(t, co({
|
|
1898
1898
|
question: "?",
|
|
1899
1899
|
warning: "!",
|
|
1900
1900
|
info: "i"
|
|
1901
1901
|
}[e.icon]));
|
|
1902
|
-
},
|
|
1902
|
+
}, ii = (t, e) => {
|
|
1903
1903
|
if (e.iconColor) {
|
|
1904
1904
|
t.style.color = e.iconColor, t.style.borderColor = e.iconColor;
|
|
1905
1905
|
for (const n of [
|
|
@@ -1908,108 +1908,108 @@ const gr = (t, e) => {
|
|
|
1908
1908
|
".swal2-x-mark-line-left",
|
|
1909
1909
|
".swal2-x-mark-line-right"
|
|
1910
1910
|
])
|
|
1911
|
-
|
|
1912
|
-
|
|
1911
|
+
ro(t, n, "backgroundColor", e.iconColor);
|
|
1912
|
+
ro(t, ".swal2-success-ring", "borderColor", e.iconColor);
|
|
1913
1913
|
}
|
|
1914
|
-
},
|
|
1915
|
-
const n =
|
|
1914
|
+
}, co = (t) => `<div class="${l["icon-content"]}">${t}</div>`, ai = (t, e) => {
|
|
1915
|
+
const n = $o();
|
|
1916
1916
|
if (!e.imageUrl)
|
|
1917
|
-
return
|
|
1918
|
-
|
|
1919
|
-
},
|
|
1917
|
+
return ie(n);
|
|
1918
|
+
te(n, ""), n.setAttribute("src", e.imageUrl), n.setAttribute("alt", e.imageAlt), Ct(n, "width", e.imageWidth), Ct(n, "height", e.imageHeight), n.className = l.image, Ee(n, e, "image");
|
|
1919
|
+
}, ci = (t) => {
|
|
1920
1920
|
const e = document.createElement("li");
|
|
1921
|
-
return
|
|
1922
|
-
},
|
|
1921
|
+
return $(e, l["progress-step"]), re(e, t), e;
|
|
1922
|
+
}, li = (t) => {
|
|
1923
1923
|
const e = document.createElement("li");
|
|
1924
|
-
return
|
|
1925
|
-
},
|
|
1926
|
-
const n =
|
|
1924
|
+
return $(e, l["progress-step-line"]), t.progressStepsDistance && (e.style.width = t.progressStepsDistance), e;
|
|
1925
|
+
}, ui = (t, e) => {
|
|
1926
|
+
const n = Ho();
|
|
1927
1927
|
if (!e.progressSteps || e.progressSteps.length === 0)
|
|
1928
|
-
return
|
|
1929
|
-
|
|
1928
|
+
return ie(n);
|
|
1929
|
+
te(n), n.textContent = "", e.currentProgressStep >= e.progressSteps.length && be(
|
|
1930
1930
|
"Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"
|
|
1931
1931
|
), e.progressSteps.forEach((o, i) => {
|
|
1932
|
-
const c =
|
|
1933
|
-
if (n.appendChild(c), i === e.currentProgressStep &&
|
|
1934
|
-
const x =
|
|
1932
|
+
const c = ci(o);
|
|
1933
|
+
if (n.appendChild(c), i === e.currentProgressStep && $(c, l["active-progress-step"]), i !== e.progressSteps.length - 1) {
|
|
1934
|
+
const x = li(e);
|
|
1935
1935
|
n.appendChild(x);
|
|
1936
1936
|
}
|
|
1937
1937
|
});
|
|
1938
|
-
},
|
|
1939
|
-
const n =
|
|
1940
|
-
|
|
1941
|
-
},
|
|
1942
|
-
const n =
|
|
1943
|
-
e.toast ? (
|
|
1944
|
-
},
|
|
1945
|
-
t.className = `${
|
|
1946
|
-
},
|
|
1947
|
-
|
|
1948
|
-
},
|
|
1938
|
+
}, di = (t, e) => {
|
|
1939
|
+
const n = No();
|
|
1940
|
+
Zt(n, e.title || e.titleText, "block"), e.title && Fn(e.title, n), e.titleText && (n.innerText = e.titleText), Ee(n, e, "title");
|
|
1941
|
+
}, fi = (t, e) => {
|
|
1942
|
+
const n = se(), o = V();
|
|
1943
|
+
e.toast ? (Ct(n, "width", e.width), o.style.width = "100%", o.insertBefore(dt(), It())) : Ct(o, "width", e.width), Ct(o, "padding", e.padding), e.color && (o.style.color = e.color), e.background && (o.style.background = e.background), ie(Yt()), hi(o, e);
|
|
1944
|
+
}, hi = (t, e) => {
|
|
1945
|
+
t.className = `${l.popup} ${_e(t) ? e.showClass.popup : ""}`, e.toast ? ($([document.documentElement, document.body], l["toast-shown"]), $(t, l.toast)) : $(t, l.modal), Ee(t, e, "popup"), typeof e.customClass == "string" && $(t, e.customClass), e.icon && $(t, l[`icon-${e.icon}`]);
|
|
1946
|
+
}, Go = (t, e) => {
|
|
1947
|
+
fi(t, e), qs(t, e), ui(t, e), ni(t, e), ai(t, e), di(t, e), ti(t, e), Qs(t, e), $s(t, e), ei(t, e), typeof e.didRender == "function" && e.didRender(V());
|
|
1948
|
+
}, ft = Object.freeze({
|
|
1949
1949
|
cancel: "cancel",
|
|
1950
1950
|
backdrop: "backdrop",
|
|
1951
1951
|
close: "close",
|
|
1952
1952
|
esc: "esc",
|
|
1953
1953
|
timer: "timer"
|
|
1954
|
-
}),
|
|
1955
|
-
|
|
1956
|
-
e ===
|
|
1954
|
+
}), pi = () => {
|
|
1955
|
+
xe(document.body.children).forEach((e) => {
|
|
1956
|
+
e === se() || e.contains(se()) || (e.hasAttribute("aria-hidden") && e.setAttribute("data-previous-aria-hidden", e.getAttribute("aria-hidden")), e.setAttribute("aria-hidden", "true"));
|
|
1957
1957
|
});
|
|
1958
|
-
},
|
|
1959
|
-
|
|
1958
|
+
}, Yo = () => {
|
|
1959
|
+
xe(document.body.children).forEach((e) => {
|
|
1960
1960
|
e.hasAttribute("data-previous-aria-hidden") ? (e.setAttribute("aria-hidden", e.getAttribute("data-previous-aria-hidden")), e.removeAttribute("data-previous-aria-hidden")) : e.removeAttribute("aria-hidden");
|
|
1961
1961
|
});
|
|
1962
|
-
},
|
|
1962
|
+
}, Jo = ["swal-title", "swal-html", "swal-footer"], mi = (t) => {
|
|
1963
1963
|
const e = typeof t.template == "string" ? document.querySelector(t.template) : t.template;
|
|
1964
1964
|
if (!e)
|
|
1965
1965
|
return {};
|
|
1966
1966
|
const n = e.content;
|
|
1967
|
-
return
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1967
|
+
return Ai(n), Object.assign(
|
|
1968
|
+
gi(n),
|
|
1969
|
+
bi(n),
|
|
1970
|
+
vi(n),
|
|
1971
|
+
yi(n),
|
|
1972
|
+
wi(n),
|
|
1973
|
+
ki(n, Jo)
|
|
1974
1974
|
);
|
|
1975
|
-
},
|
|
1975
|
+
}, gi = (t) => {
|
|
1976
1976
|
const e = {};
|
|
1977
|
-
return
|
|
1978
|
-
|
|
1977
|
+
return xe(t.querySelectorAll("swal-param")).forEach((n) => {
|
|
1978
|
+
Ye(n, ["name", "value"]);
|
|
1979
1979
|
const o = n.getAttribute("name"), i = n.getAttribute("value");
|
|
1980
|
-
typeof
|
|
1980
|
+
typeof it[o] == "boolean" && i === "false" && (e[o] = !1), typeof it[o] == "object" && (e[o] = JSON.parse(i));
|
|
1981
1981
|
}), e;
|
|
1982
|
-
},
|
|
1982
|
+
}, bi = (t) => {
|
|
1983
1983
|
const e = {};
|
|
1984
|
-
return
|
|
1985
|
-
|
|
1984
|
+
return xe(t.querySelectorAll("swal-button")).forEach((n) => {
|
|
1985
|
+
Ye(n, ["type", "color", "aria-label"]);
|
|
1986
1986
|
const o = n.getAttribute("type");
|
|
1987
|
-
e[`${o}ButtonText`] = n.innerHTML, e[`show${
|
|
1987
|
+
e[`${o}ButtonText`] = n.innerHTML, e[`show${En(o)}Button`] = !0, n.hasAttribute("color") && (e[`${o}ButtonColor`] = n.getAttribute("color")), n.hasAttribute("aria-label") && (e[`${o}ButtonAriaLabel`] = n.getAttribute("aria-label"));
|
|
1988
1988
|
}), e;
|
|
1989
|
-
},
|
|
1989
|
+
}, vi = (t) => {
|
|
1990
1990
|
const e = {}, n = t.querySelector("swal-image");
|
|
1991
|
-
return n && (
|
|
1992
|
-
},
|
|
1991
|
+
return n && (Ye(n, ["src", "width", "height", "alt"]), n.hasAttribute("src") && (e.imageUrl = n.getAttribute("src")), n.hasAttribute("width") && (e.imageWidth = n.getAttribute("width")), n.hasAttribute("height") && (e.imageHeight = n.getAttribute("height")), n.hasAttribute("alt") && (e.imageAlt = n.getAttribute("alt"))), e;
|
|
1992
|
+
}, yi = (t) => {
|
|
1993
1993
|
const e = {}, n = t.querySelector("swal-icon");
|
|
1994
|
-
return n && (
|
|
1995
|
-
},
|
|
1994
|
+
return n && (Ye(n, ["type", "color"]), n.hasAttribute("type") && (e.icon = n.getAttribute("type")), n.hasAttribute("color") && (e.iconColor = n.getAttribute("color")), e.iconHtml = n.innerHTML), e;
|
|
1995
|
+
}, wi = (t) => {
|
|
1996
1996
|
const e = {}, n = t.querySelector("swal-input");
|
|
1997
|
-
n && (
|
|
1997
|
+
n && (Ye(n, ["type", "label", "placeholder", "value"]), e.input = n.getAttribute("type") || "text", n.hasAttribute("label") && (e.inputLabel = n.getAttribute("label")), n.hasAttribute("placeholder") && (e.inputPlaceholder = n.getAttribute("placeholder")), n.hasAttribute("value") && (e.inputValue = n.getAttribute("value")));
|
|
1998
1998
|
const o = t.querySelectorAll("swal-input-option");
|
|
1999
|
-
return o.length && (e.inputOptions = {},
|
|
2000
|
-
|
|
1999
|
+
return o.length && (e.inputOptions = {}, xe(o).forEach((i) => {
|
|
2000
|
+
Ye(i, ["value"]);
|
|
2001
2001
|
const c = i.getAttribute("value"), x = i.innerHTML;
|
|
2002
2002
|
e.inputOptions[c] = x;
|
|
2003
2003
|
})), e;
|
|
2004
|
-
},
|
|
2004
|
+
}, ki = (t, e) => {
|
|
2005
2005
|
const n = {};
|
|
2006
2006
|
for (const o in e) {
|
|
2007
2007
|
const i = e[o], c = t.querySelector(i);
|
|
2008
|
-
c && (
|
|
2008
|
+
c && (Ye(c, []), n[i.replace(/^swal-/, "")] = c.innerHTML.trim());
|
|
2009
2009
|
}
|
|
2010
2010
|
return n;
|
|
2011
|
-
},
|
|
2012
|
-
const e =
|
|
2011
|
+
}, Ai = (t) => {
|
|
2012
|
+
const e = Jo.concat([
|
|
2013
2013
|
"swal-param",
|
|
2014
2014
|
"swal-button",
|
|
2015
2015
|
"swal-image",
|
|
@@ -2017,38 +2017,38 @@ const gr = (t, e) => {
|
|
|
2017
2017
|
"swal-input",
|
|
2018
2018
|
"swal-input-option"
|
|
2019
2019
|
]);
|
|
2020
|
-
|
|
2020
|
+
xe(t.children).forEach((n) => {
|
|
2021
2021
|
const o = n.tagName.toLowerCase();
|
|
2022
|
-
e.indexOf(o) === -1 &&
|
|
2022
|
+
e.indexOf(o) === -1 && be(`Unrecognized element <${o}>`);
|
|
2023
2023
|
});
|
|
2024
|
-
},
|
|
2025
|
-
|
|
2026
|
-
e.indexOf(n.name) === -1 &&
|
|
2024
|
+
}, Ye = (t, e) => {
|
|
2025
|
+
xe(t.attributes).forEach((n) => {
|
|
2026
|
+
e.indexOf(n.name) === -1 && be([
|
|
2027
2027
|
`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`,
|
|
2028
2028
|
`${e.length ? `Allowed attributes are: ${e.join(", ")}` : "To set the value, use HTML within the element."}`
|
|
2029
2029
|
]);
|
|
2030
2030
|
});
|
|
2031
|
-
},
|
|
2031
|
+
}, lo = {
|
|
2032
2032
|
email: (t, e) => /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t) ? Promise.resolve() : Promise.resolve(e || "Invalid email address"),
|
|
2033
2033
|
url: (t, e) => /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t) ? Promise.resolve() : Promise.resolve(e || "Invalid URL")
|
|
2034
2034
|
};
|
|
2035
|
-
function
|
|
2036
|
-
t.inputValidator || Object.keys(
|
|
2037
|
-
t.input === e && (t.inputValidator =
|
|
2035
|
+
function _i(t) {
|
|
2036
|
+
t.inputValidator || Object.keys(lo).forEach((e) => {
|
|
2037
|
+
t.input === e && (t.inputValidator = lo[e]);
|
|
2038
2038
|
});
|
|
2039
2039
|
}
|
|
2040
|
-
function
|
|
2041
|
-
(!t.target || typeof t.target == "string" && !document.querySelector(t.target) || typeof t.target != "string" && !t.target.appendChild) && (
|
|
2040
|
+
function xi(t) {
|
|
2041
|
+
(!t.target || typeof t.target == "string" && !document.querySelector(t.target) || typeof t.target != "string" && !t.target.appendChild) && (be('Target parameter is not valid, defaulting to "body"'), t.target = "body");
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2044
|
-
|
|
2043
|
+
function Ci(t) {
|
|
2044
|
+
_i(t), t.showLoaderOnConfirm && !t.preConfirm && be(
|
|
2045
2045
|
`showLoaderOnConfirm is set to true, but preConfirm is not defined.
|
|
2046
2046
|
showLoaderOnConfirm should be used together with preConfirm, see usage example:
|
|
2047
2047
|
https://sweetalert2.github.io/#ajax-request`
|
|
2048
|
-
),
|
|
2049
|
-
`).join("<br />")),
|
|
2048
|
+
), xi(t), typeof t.title == "string" && (t.title = t.title.split(`
|
|
2049
|
+
`).join("<br />")), Ms(t);
|
|
2050
2050
|
}
|
|
2051
|
-
class
|
|
2051
|
+
class Ei {
|
|
2052
2052
|
constructor(e, n) {
|
|
2053
2053
|
this.callback = e, this.remaining = n, this.running = !1, this.start();
|
|
2054
2054
|
}
|
|
@@ -2069,233 +2069,233 @@ class Vr {
|
|
|
2069
2069
|
return this.running;
|
|
2070
2070
|
}
|
|
2071
2071
|
}
|
|
2072
|
-
const
|
|
2073
|
-
|
|
2074
|
-
},
|
|
2075
|
-
|
|
2076
|
-
},
|
|
2072
|
+
const Ti = () => {
|
|
2073
|
+
at.previousBodyPadding === null && document.body.scrollHeight > window.innerHeight && (at.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${at.previousBodyPadding + Ns()}px`);
|
|
2074
|
+
}, Si = () => {
|
|
2075
|
+
at.previousBodyPadding !== null && (document.body.style.paddingRight = `${at.previousBodyPadding}px`, at.previousBodyPadding = null);
|
|
2076
|
+
}, Li = () => {
|
|
2077
2077
|
if (// @ts-ignore
|
|
2078
|
-
(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) && !
|
|
2078
|
+
(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) && !Ne(document.body, l.iosfix)) {
|
|
2079
2079
|
const e = document.body.scrollTop;
|
|
2080
|
-
document.body.style.top = `${e * -1}px`,
|
|
2080
|
+
document.body.style.top = `${e * -1}px`, $(document.body, l.iosfix), Pi(), Ii();
|
|
2081
2081
|
}
|
|
2082
|
-
},
|
|
2082
|
+
}, Ii = () => {
|
|
2083
2083
|
const t = navigator.userAgent, e = !!t.match(/iPad/i) || !!t.match(/iPhone/i), n = !!t.match(/WebKit/i);
|
|
2084
|
-
e && n && !t.match(/CriOS/i) &&
|
|
2085
|
-
},
|
|
2086
|
-
const t =
|
|
2084
|
+
e && n && !t.match(/CriOS/i) && V().scrollHeight > window.innerHeight - 44 && (se().style.paddingBottom = "44px");
|
|
2085
|
+
}, Pi = () => {
|
|
2086
|
+
const t = se();
|
|
2087
2087
|
let e;
|
|
2088
2088
|
t.ontouchstart = (n) => {
|
|
2089
|
-
e =
|
|
2089
|
+
e = Ri(n);
|
|
2090
2090
|
}, t.ontouchmove = (n) => {
|
|
2091
2091
|
e && (n.preventDefault(), n.stopPropagation());
|
|
2092
2092
|
};
|
|
2093
|
-
},
|
|
2094
|
-
const e = t.target, n =
|
|
2095
|
-
return
|
|
2093
|
+
}, Ri = (t) => {
|
|
2094
|
+
const e = t.target, n = se();
|
|
2095
|
+
return Oi(t) || Fi(t) ? !1 : e === n || !so(n) && e.tagName !== "INPUT" && // #1603
|
|
2096
2096
|
e.tagName !== "TEXTAREA" && // #2266
|
|
2097
|
-
!(
|
|
2098
|
-
|
|
2099
|
-
},
|
|
2100
|
-
if (
|
|
2097
|
+
!(so(zt()) && // #1944
|
|
2098
|
+
zt().contains(e));
|
|
2099
|
+
}, Oi = (t) => t.touches && t.touches.length && t.touches[0].touchType === "stylus", Fi = (t) => t.touches && t.touches.length > 1, Bi = () => {
|
|
2100
|
+
if (Ne(document.body, l.iosfix)) {
|
|
2101
2101
|
const t = parseInt(document.body.style.top, 10);
|
|
2102
|
-
|
|
2102
|
+
Fe(document.body, l.iosfix), document.body.style.top = "", document.body.scrollTop = t * -1;
|
|
2103
2103
|
}
|
|
2104
|
-
},
|
|
2105
|
-
const e =
|
|
2104
|
+
}, Xo = 10, Mi = (t) => {
|
|
2105
|
+
const e = se(), n = V();
|
|
2106
2106
|
typeof t.willOpen == "function" && t.willOpen(n);
|
|
2107
2107
|
const i = window.getComputedStyle(document.body).overflowY;
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
},
|
|
2111
|
-
},
|
|
2112
|
-
const e =
|
|
2108
|
+
Ni(e, n, t), setTimeout(() => {
|
|
2109
|
+
Ui(e, n);
|
|
2110
|
+
}, Xo), Pn() && (Di(e, t.scrollbarPadding, i), pi()), !Xt() && !B.previousActiveElement && (B.previousActiveElement = document.activeElement), typeof t.didOpen == "function" && setTimeout(() => t.didOpen(n)), Fe(e, l["no-transition"]);
|
|
2111
|
+
}, Zo = (t) => {
|
|
2112
|
+
const e = V();
|
|
2113
2113
|
if (t.target !== e)
|
|
2114
2114
|
return;
|
|
2115
|
-
const n =
|
|
2116
|
-
e.removeEventListener(
|
|
2117
|
-
},
|
|
2118
|
-
|
|
2119
|
-
},
|
|
2120
|
-
|
|
2115
|
+
const n = se();
|
|
2116
|
+
e.removeEventListener(Et, Zo), n.style.overflowY = "auto";
|
|
2117
|
+
}, Ui = (t, e) => {
|
|
2118
|
+
Et && Wo(e) ? (t.style.overflowY = "hidden", e.addEventListener(Et, Zo)) : t.style.overflowY = "auto";
|
|
2119
|
+
}, Di = (t, e, n) => {
|
|
2120
|
+
Li(), e && n !== "hidden" && Ti(), setTimeout(() => {
|
|
2121
2121
|
t.scrollTop = 0;
|
|
2122
2122
|
});
|
|
2123
|
-
},
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
},
|
|
2127
|
-
},
|
|
2128
|
-
let e =
|
|
2129
|
-
e || new
|
|
2130
|
-
const n =
|
|
2131
|
-
|
|
2132
|
-
},
|
|
2133
|
-
const n =
|
|
2134
|
-
!e &&
|
|
2135
|
-
},
|
|
2136
|
-
e.input === "select" || e.input === "radio" ?
|
|
2137
|
-
},
|
|
2123
|
+
}, Ni = (t, e, n) => {
|
|
2124
|
+
$(t, n.showClass.backdrop), e.style.setProperty("opacity", "0", "important"), te(e, "grid"), setTimeout(() => {
|
|
2125
|
+
$(e, n.showClass.popup), e.style.removeProperty("opacity");
|
|
2126
|
+
}, Xo), $([document.documentElement, document.body], l.shown), n.heightAuto && n.backdrop && !n.toast && $([document.documentElement, document.body], l["height-auto"]);
|
|
2127
|
+
}, ut = (t) => {
|
|
2128
|
+
let e = V();
|
|
2129
|
+
e || new ct(), e = V();
|
|
2130
|
+
const n = dt();
|
|
2131
|
+
Xt() ? ie(It()) : $i(e, t), te(n), e.setAttribute("data-loading", !0), e.setAttribute("aria-busy", !0), e.focus();
|
|
2132
|
+
}, $i = (t, e) => {
|
|
2133
|
+
const n = Pt(), o = dt();
|
|
2134
|
+
!e && _e(Ie()) && (e = Ie()), te(n), e && (ie(e), o.setAttribute("data-button-to-replace", e.className)), o.parentNode.insertBefore(o, e), $([t, n], l.loading);
|
|
2135
|
+
}, Hi = (t, e) => {
|
|
2136
|
+
e.input === "select" || e.input === "radio" ? qi(t, e) : ["text", "email", "number", "tel", "textarea"].includes(e.input) && (Tn(e.inputValue) || Sn(e.inputValue)) && (ut(Ie()), Ki(t, e));
|
|
2137
|
+
}, ji = (t, e) => {
|
|
2138
2138
|
const n = t.getInput();
|
|
2139
2139
|
if (!n)
|
|
2140
2140
|
return null;
|
|
2141
2141
|
switch (e.input) {
|
|
2142
2142
|
case "checkbox":
|
|
2143
|
-
return
|
|
2143
|
+
return zi(n);
|
|
2144
2144
|
case "radio":
|
|
2145
|
-
return
|
|
2145
|
+
return Vi(n);
|
|
2146
2146
|
case "file":
|
|
2147
|
-
return
|
|
2147
|
+
return Wi(n);
|
|
2148
2148
|
default:
|
|
2149
2149
|
return e.inputAutoTrim ? n.value.trim() : n.value;
|
|
2150
2150
|
}
|
|
2151
|
-
},
|
|
2152
|
-
const n =
|
|
2153
|
-
|
|
2151
|
+
}, zi = (t) => t.checked ? 1 : 0, Vi = (t) => t.checked ? t.value : null, Wi = (t) => t.files.length ? t.getAttribute("multiple") !== null ? t.files : t.files[0] : null, qi = (t, e) => {
|
|
2152
|
+
const n = V(), o = (i) => Gi[e.input](n, bn(i), e);
|
|
2153
|
+
Tn(e.inputOptions) || Sn(e.inputOptions) ? (ut(Ie()), St(e.inputOptions).then((i) => {
|
|
2154
2154
|
t.hideLoading(), o(i);
|
|
2155
|
-
})) : typeof e.inputOptions == "object" ? o(e.inputOptions) :
|
|
2156
|
-
},
|
|
2155
|
+
})) : typeof e.inputOptions == "object" ? o(e.inputOptions) : Je(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`);
|
|
2156
|
+
}, Ki = (t, e) => {
|
|
2157
2157
|
const n = t.getInput();
|
|
2158
|
-
|
|
2159
|
-
n.value = e.input === "number" ? parseFloat(o) || 0 : `${o}`,
|
|
2158
|
+
ie(n), St(e.inputValue).then((o) => {
|
|
2159
|
+
n.value = e.input === "number" ? parseFloat(o) || 0 : `${o}`, te(n), n.focus(), t.hideLoading();
|
|
2160
2160
|
}).catch((o) => {
|
|
2161
|
-
|
|
2161
|
+
Je(`Error in inputValue promise: ${o}`), n.value = "", te(n), n.focus(), t.hideLoading();
|
|
2162
2162
|
});
|
|
2163
|
-
},
|
|
2163
|
+
}, Gi = {
|
|
2164
2164
|
select: (t, e, n) => {
|
|
2165
|
-
const o =
|
|
2166
|
-
const
|
|
2167
|
-
|
|
2165
|
+
const o = je(t, l.select), i = (c, x, L) => {
|
|
2166
|
+
const u = document.createElement("option");
|
|
2167
|
+
u.value = L, re(u, x), u.selected = uo(L, n.inputValue), c.appendChild(u);
|
|
2168
2168
|
};
|
|
2169
2169
|
e.forEach((c) => {
|
|
2170
|
-
const x = c[0],
|
|
2171
|
-
if (Array.isArray(
|
|
2172
|
-
const
|
|
2173
|
-
|
|
2170
|
+
const x = c[0], L = c[1];
|
|
2171
|
+
if (Array.isArray(L)) {
|
|
2172
|
+
const u = document.createElement("optgroup");
|
|
2173
|
+
u.label = x, u.disabled = !1, o.appendChild(u), L.forEach((H) => i(u, H[1], H[0]));
|
|
2174
2174
|
} else
|
|
2175
|
-
i(o,
|
|
2175
|
+
i(o, L, x);
|
|
2176
2176
|
}), o.focus();
|
|
2177
2177
|
},
|
|
2178
2178
|
radio: (t, e, n) => {
|
|
2179
|
-
const o =
|
|
2179
|
+
const o = je(t, l.radio);
|
|
2180
2180
|
e.forEach((c) => {
|
|
2181
|
-
const x = c[0],
|
|
2182
|
-
|
|
2183
|
-
const
|
|
2184
|
-
|
|
2181
|
+
const x = c[0], L = c[1], u = document.createElement("input"), H = document.createElement("label");
|
|
2182
|
+
u.type = "radio", u.name = l.radio, u.value = x, uo(x, n.inputValue) && (u.checked = !0);
|
|
2183
|
+
const W = document.createElement("span");
|
|
2184
|
+
re(W, L), W.className = l.label, H.appendChild(u), H.appendChild(W), o.appendChild(H);
|
|
2185
2185
|
});
|
|
2186
2186
|
const i = o.querySelectorAll("input");
|
|
2187
2187
|
i.length && i[0].focus();
|
|
2188
2188
|
}
|
|
2189
|
-
},
|
|
2189
|
+
}, bn = (t) => {
|
|
2190
2190
|
const e = [];
|
|
2191
2191
|
return typeof Map < "u" && t instanceof Map ? t.forEach((n, o) => {
|
|
2192
2192
|
let i = n;
|
|
2193
|
-
typeof i == "object" && (i =
|
|
2193
|
+
typeof i == "object" && (i = bn(i)), e.push([o, i]);
|
|
2194
2194
|
}) : Object.keys(t).forEach((n) => {
|
|
2195
2195
|
let o = t[n];
|
|
2196
|
-
typeof o == "object" && (o =
|
|
2196
|
+
typeof o == "object" && (o = bn(o)), e.push([n, o]);
|
|
2197
2197
|
}), e;
|
|
2198
|
-
},
|
|
2199
|
-
function
|
|
2200
|
-
const t =
|
|
2198
|
+
}, uo = (t, e) => e && e.toString() === t.toString();
|
|
2199
|
+
function fo() {
|
|
2200
|
+
const t = U.innerParams.get(this);
|
|
2201
2201
|
if (!t)
|
|
2202
2202
|
return;
|
|
2203
|
-
const e =
|
|
2204
|
-
|
|
2203
|
+
const e = U.domCache.get(this);
|
|
2204
|
+
ie(e.loader), Xt() ? t.icon && te(It()) : Yi(e), Fe([e.popup, e.actions], l.loading), e.popup.removeAttribute("aria-busy"), e.popup.removeAttribute("data-loading"), e.confirmButton.disabled = !1, e.denyButton.disabled = !1, e.cancelButton.disabled = !1;
|
|
2205
2205
|
}
|
|
2206
|
-
const
|
|
2206
|
+
const Yi = (t) => {
|
|
2207
2207
|
const e = t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));
|
|
2208
|
-
e.length ?
|
|
2208
|
+
e.length ? te(e[0], "inline-block") : Cs() && ie(t.actions);
|
|
2209
2209
|
};
|
|
2210
|
-
function
|
|
2211
|
-
const e =
|
|
2212
|
-
return n ?
|
|
2210
|
+
function Ji(t) {
|
|
2211
|
+
const e = U.innerParams.get(t || this), n = U.domCache.get(t || this);
|
|
2212
|
+
return n ? Rn(n.popup, e.input) : null;
|
|
2213
2213
|
}
|
|
2214
|
-
const
|
|
2214
|
+
const Tt = {
|
|
2215
2215
|
swalPromiseResolve: /* @__PURE__ */ new WeakMap(),
|
|
2216
2216
|
swalPromiseReject: /* @__PURE__ */ new WeakMap()
|
|
2217
|
-
},
|
|
2217
|
+
}, Xi = () => _e(V()), Qo = () => Ie() && Ie().click(), Zi = () => ze() && ze().click(), Qi = () => Ge() && Ge().click(), er = (t) => {
|
|
2218
2218
|
t.keydownTarget && t.keydownHandlerAdded && (t.keydownTarget.removeEventListener("keydown", t.keydownHandler, {
|
|
2219
2219
|
capture: t.keydownListenerCapture
|
|
2220
2220
|
}), t.keydownHandlerAdded = !1);
|
|
2221
|
-
},
|
|
2222
|
-
|
|
2221
|
+
}, ea = (t, e, n, o) => {
|
|
2222
|
+
er(e), n.toast || (e.keydownHandler = (i) => na(t, i, o), e.keydownTarget = n.keydownListenerCapture ? window : V(), e.keydownListenerCapture = n.keydownListenerCapture, e.keydownTarget.addEventListener("keydown", e.keydownHandler, {
|
|
2223
2223
|
capture: e.keydownListenerCapture
|
|
2224
2224
|
}), e.keydownHandlerAdded = !0);
|
|
2225
|
-
},
|
|
2226
|
-
const o =
|
|
2225
|
+
}, vn = (t, e, n) => {
|
|
2226
|
+
const o = In();
|
|
2227
2227
|
if (o.length)
|
|
2228
2228
|
return e = e + n, e === o.length ? e = 0 : e === -1 && (e = o.length - 1), o[e].focus();
|
|
2229
|
-
|
|
2230
|
-
},
|
|
2231
|
-
const o =
|
|
2232
|
-
o && (e.isComposing || e.keyCode === 229 || (o.stopKeydownPropagation && e.stopPropagation(), e.key === "Enter" ?
|
|
2233
|
-
},
|
|
2234
|
-
if (
|
|
2229
|
+
V().focus();
|
|
2230
|
+
}, tr = ["ArrowRight", "ArrowDown"], ta = ["ArrowLeft", "ArrowUp"], na = (t, e, n) => {
|
|
2231
|
+
const o = U.innerParams.get(t);
|
|
2232
|
+
o && (e.isComposing || e.keyCode === 229 || (o.stopKeydownPropagation && e.stopPropagation(), e.key === "Enter" ? oa(t, e, o) : e.key === "Tab" ? ra(e, o) : [...tr, ...ta].includes(e.key) ? sa(e.key) : e.key === "Escape" && ia(e, o, n)));
|
|
2233
|
+
}, oa = (t, e, n) => {
|
|
2234
|
+
if (Gt(n.allowEnterKey) && e.target && t.getInput() && e.target.outerHTML === t.getInput().outerHTML) {
|
|
2235
2235
|
if (["textarea", "file"].includes(n.input))
|
|
2236
2236
|
return;
|
|
2237
|
-
|
|
2237
|
+
Qo(), e.preventDefault();
|
|
2238
2238
|
}
|
|
2239
|
-
},
|
|
2240
|
-
const n = t.target, o =
|
|
2239
|
+
}, ra = (t, e) => {
|
|
2240
|
+
const n = t.target, o = In();
|
|
2241
2241
|
let i = -1;
|
|
2242
2242
|
for (let c = 0; c < o.length; c++)
|
|
2243
2243
|
if (n === o[c]) {
|
|
2244
2244
|
i = c;
|
|
2245
2245
|
break;
|
|
2246
2246
|
}
|
|
2247
|
-
t.shiftKey ?
|
|
2248
|
-
},
|
|
2249
|
-
const e =
|
|
2247
|
+
t.shiftKey ? vn(e, i, -1) : vn(e, i, 1), t.stopPropagation(), t.preventDefault();
|
|
2248
|
+
}, sa = (t) => {
|
|
2249
|
+
const e = Ie(), n = ze(), o = Ge();
|
|
2250
2250
|
if (![e, n, o].includes(document.activeElement))
|
|
2251
2251
|
return;
|
|
2252
|
-
const i =
|
|
2252
|
+
const i = tr.includes(t) ? "nextElementSibling" : "previousElementSibling";
|
|
2253
2253
|
let c = document.activeElement;
|
|
2254
|
-
for (let x = 0; x <
|
|
2254
|
+
for (let x = 0; x < Pt().children.length; x++) {
|
|
2255
2255
|
if (c = c[i], !c)
|
|
2256
2256
|
return;
|
|
2257
|
-
if (
|
|
2257
|
+
if (_e(c) && c instanceof HTMLButtonElement)
|
|
2258
2258
|
break;
|
|
2259
2259
|
}
|
|
2260
2260
|
c instanceof HTMLButtonElement && c.focus();
|
|
2261
|
-
},
|
|
2262
|
-
|
|
2261
|
+
}, ia = (t, e, n) => {
|
|
2262
|
+
Gt(e.allowEscapeKey) && (t.preventDefault(), n(ft.esc));
|
|
2263
2263
|
};
|
|
2264
|
-
function
|
|
2265
|
-
|
|
2264
|
+
function nr(t, e, n, o) {
|
|
2265
|
+
Xt() ? ho(t, o) : (Ls(n).then(() => ho(t, o)), er(B)), /^((?!chrome|android).)*safari/i.test(navigator.userAgent) ? (e.setAttribute("style", "display:none !important"), e.removeAttribute("class"), e.innerHTML = "") : e.remove(), Pn() && (Si(), Bi(), Yo()), aa();
|
|
2266
2266
|
}
|
|
2267
|
-
function
|
|
2268
|
-
|
|
2267
|
+
function aa() {
|
|
2268
|
+
Fe(
|
|
2269
2269
|
[document.documentElement, document.body],
|
|
2270
|
-
[
|
|
2270
|
+
[l.shown, l["height-auto"], l["no-backdrop"], l["toast-shown"]]
|
|
2271
2271
|
);
|
|
2272
2272
|
}
|
|
2273
|
-
function
|
|
2274
|
-
t =
|
|
2275
|
-
const e =
|
|
2276
|
-
this.isAwaitingPromise() ? t.isDismissed || (
|
|
2273
|
+
function Ut(t) {
|
|
2274
|
+
t = da(t);
|
|
2275
|
+
const e = Tt.swalPromiseResolve.get(this), n = la(this);
|
|
2276
|
+
this.isAwaitingPromise() ? t.isDismissed || (Ot(this), e(t)) : n && e(t);
|
|
2277
2277
|
}
|
|
2278
|
-
function
|
|
2279
|
-
return !!
|
|
2278
|
+
function ca() {
|
|
2279
|
+
return !!U.awaitingPromise.get(this);
|
|
2280
2280
|
}
|
|
2281
|
-
const
|
|
2282
|
-
const e =
|
|
2281
|
+
const la = (t) => {
|
|
2282
|
+
const e = V();
|
|
2283
2283
|
if (!e)
|
|
2284
2284
|
return !1;
|
|
2285
|
-
const n =
|
|
2286
|
-
if (!n ||
|
|
2285
|
+
const n = U.innerParams.get(t);
|
|
2286
|
+
if (!n || Ne(e, n.hideClass.popup))
|
|
2287
2287
|
return !1;
|
|
2288
|
-
|
|
2289
|
-
const o =
|
|
2290
|
-
return
|
|
2288
|
+
Fe(e, n.showClass.popup), $(e, n.hideClass.popup);
|
|
2289
|
+
const o = se();
|
|
2290
|
+
return Fe(o, n.showClass.backdrop), $(o, n.hideClass.backdrop), fa(t, e, n), !0;
|
|
2291
2291
|
};
|
|
2292
|
-
function
|
|
2293
|
-
const e =
|
|
2294
|
-
|
|
2292
|
+
function ua(t) {
|
|
2293
|
+
const e = Tt.swalPromiseReject.get(this);
|
|
2294
|
+
Ot(this), e && e(t);
|
|
2295
2295
|
}
|
|
2296
|
-
const
|
|
2297
|
-
t.isAwaitingPromise() && (
|
|
2298
|
-
},
|
|
2296
|
+
const Ot = (t) => {
|
|
2297
|
+
t.isAwaitingPromise() && (U.awaitingPromise.delete(t), U.innerParams.get(t) || t._destroy());
|
|
2298
|
+
}, da = (t) => typeof t > "u" ? {
|
|
2299
2299
|
isConfirmed: !1,
|
|
2300
2300
|
isDenied: !1,
|
|
2301
2301
|
isDismissed: !0
|
|
@@ -2306,31 +2306,31 @@ const et = (t) => {
|
|
|
2306
2306
|
isDismissed: !1
|
|
2307
2307
|
},
|
|
2308
2308
|
t
|
|
2309
|
-
),
|
|
2310
|
-
const o =
|
|
2311
|
-
typeof n.willClose == "function" && n.willClose(e), i ?
|
|
2312
|
-
},
|
|
2313
|
-
|
|
2309
|
+
), fa = (t, e, n) => {
|
|
2310
|
+
const o = se(), i = Et && Wo(e);
|
|
2311
|
+
typeof n.willClose == "function" && n.willClose(e), i ? ha(t, e, o, n.returnFocus, n.didClose) : nr(t, o, n.returnFocus, n.didClose);
|
|
2312
|
+
}, ha = (t, e, n, o, i) => {
|
|
2313
|
+
B.swalCloseEventFinishedCallback = nr.bind(
|
|
2314
2314
|
null,
|
|
2315
2315
|
t,
|
|
2316
2316
|
n,
|
|
2317
2317
|
o,
|
|
2318
2318
|
i
|
|
2319
|
-
), e.addEventListener(
|
|
2320
|
-
c.target === e && (
|
|
2319
|
+
), e.addEventListener(Et, function(c) {
|
|
2320
|
+
c.target === e && (B.swalCloseEventFinishedCallback(), delete B.swalCloseEventFinishedCallback);
|
|
2321
2321
|
});
|
|
2322
|
-
},
|
|
2322
|
+
}, ho = (t, e) => {
|
|
2323
2323
|
setTimeout(() => {
|
|
2324
2324
|
typeof e == "function" && e.bind(t.params)(), t._destroy();
|
|
2325
2325
|
});
|
|
2326
2326
|
};
|
|
2327
|
-
function
|
|
2328
|
-
const o =
|
|
2327
|
+
function or(t, e, n) {
|
|
2328
|
+
const o = U.domCache.get(t);
|
|
2329
2329
|
e.forEach((i) => {
|
|
2330
2330
|
o[i].disabled = n;
|
|
2331
2331
|
});
|
|
2332
2332
|
}
|
|
2333
|
-
function
|
|
2333
|
+
function rr(t, e) {
|
|
2334
2334
|
if (!t)
|
|
2335
2335
|
return !1;
|
|
2336
2336
|
if (t.type === "radio") {
|
|
@@ -2340,41 +2340,41 @@ function Un(t, e) {
|
|
|
2340
2340
|
} else
|
|
2341
2341
|
t.disabled = e;
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2344
|
-
|
|
2343
|
+
function pa() {
|
|
2344
|
+
or(this, ["confirmButton", "denyButton", "cancelButton"], !1);
|
|
2345
2345
|
}
|
|
2346
|
-
function
|
|
2347
|
-
|
|
2346
|
+
function ma() {
|
|
2347
|
+
or(this, ["confirmButton", "denyButton", "cancelButton"], !0);
|
|
2348
2348
|
}
|
|
2349
|
-
function
|
|
2350
|
-
return
|
|
2349
|
+
function ga() {
|
|
2350
|
+
return rr(this.getInput(), !1);
|
|
2351
2351
|
}
|
|
2352
|
-
function
|
|
2353
|
-
return
|
|
2352
|
+
function ba() {
|
|
2353
|
+
return rr(this.getInput(), !0);
|
|
2354
2354
|
}
|
|
2355
|
-
function
|
|
2356
|
-
const e =
|
|
2357
|
-
|
|
2355
|
+
function va(t) {
|
|
2356
|
+
const e = U.domCache.get(this), n = U.innerParams.get(this);
|
|
2357
|
+
re(e.validationMessage, t), e.validationMessage.className = l["validation-message"], n.customClass && n.customClass.validationMessage && $(e.validationMessage, n.customClass.validationMessage), te(e.validationMessage);
|
|
2358
2358
|
const o = this.getInput();
|
|
2359
|
-
o && (o.setAttribute("aria-invalid", !0), o.setAttribute("aria-describedby",
|
|
2359
|
+
o && (o.setAttribute("aria-invalid", !0), o.setAttribute("aria-describedby", l["validation-message"]), zo(o), $(o, l.inputerror));
|
|
2360
2360
|
}
|
|
2361
|
-
function
|
|
2362
|
-
const t =
|
|
2363
|
-
t.validationMessage &&
|
|
2361
|
+
function ya() {
|
|
2362
|
+
const t = U.domCache.get(this);
|
|
2363
|
+
t.validationMessage && ie(t.validationMessage);
|
|
2364
2364
|
const e = this.getInput();
|
|
2365
|
-
e && (e.removeAttribute("aria-invalid"), e.removeAttribute("aria-describedby"),
|
|
2365
|
+
e && (e.removeAttribute("aria-invalid"), e.removeAttribute("aria-describedby"), Fe(e, l.inputerror));
|
|
2366
2366
|
}
|
|
2367
|
-
function
|
|
2368
|
-
return
|
|
2367
|
+
function wa() {
|
|
2368
|
+
return U.domCache.get(this).progressSteps;
|
|
2369
2369
|
}
|
|
2370
|
-
function
|
|
2371
|
-
const e =
|
|
2372
|
-
if (!e ||
|
|
2373
|
-
return
|
|
2370
|
+
function ka(t) {
|
|
2371
|
+
const e = V(), n = U.innerParams.get(this);
|
|
2372
|
+
if (!e || Ne(e, n.hideClass.popup))
|
|
2373
|
+
return be(
|
|
2374
2374
|
"You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."
|
|
2375
2375
|
);
|
|
2376
|
-
const o =
|
|
2377
|
-
|
|
2376
|
+
const o = Aa(t), i = Object.assign({}, n, o);
|
|
2377
|
+
Go(this, i), U.innerParams.set(this, i), Object.defineProperties(this, {
|
|
2378
2378
|
params: {
|
|
2379
2379
|
value: Object.assign({}, this.params, t),
|
|
2380
2380
|
writable: !1,
|
|
@@ -2382,135 +2382,135 @@ function Os(t) {
|
|
|
2382
2382
|
}
|
|
2383
2383
|
});
|
|
2384
2384
|
}
|
|
2385
|
-
const
|
|
2385
|
+
const Aa = (t) => {
|
|
2386
2386
|
const e = {};
|
|
2387
2387
|
return Object.keys(t).forEach((n) => {
|
|
2388
|
-
|
|
2388
|
+
Uo(n) ? e[n] = t[n] : be(
|
|
2389
2389
|
`Invalid parameter to update: "${n}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
|
|
2390
2390
|
|
|
2391
2391
|
If you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md`
|
|
2392
2392
|
);
|
|
2393
2393
|
}), e;
|
|
2394
2394
|
};
|
|
2395
|
-
function
|
|
2396
|
-
const t =
|
|
2395
|
+
function _a() {
|
|
2396
|
+
const t = U.domCache.get(this), e = U.innerParams.get(this);
|
|
2397
2397
|
if (!e) {
|
|
2398
|
-
|
|
2398
|
+
sr(this);
|
|
2399
2399
|
return;
|
|
2400
2400
|
}
|
|
2401
|
-
t.popup &&
|
|
2401
|
+
t.popup && B.swalCloseEventFinishedCallback && (B.swalCloseEventFinishedCallback(), delete B.swalCloseEventFinishedCallback), B.deferDisposalTimer && (clearTimeout(B.deferDisposalTimer), delete B.deferDisposalTimer), typeof e.didDestroy == "function" && e.didDestroy(), xa(this);
|
|
2402
2402
|
}
|
|
2403
|
-
const
|
|
2404
|
-
|
|
2405
|
-
},
|
|
2406
|
-
t.isAwaitingPromise() ? (
|
|
2407
|
-
},
|
|
2403
|
+
const xa = (t) => {
|
|
2404
|
+
sr(t), delete t.params, delete B.keydownHandler, delete B.keydownTarget, delete B.currentInstance;
|
|
2405
|
+
}, sr = (t) => {
|
|
2406
|
+
t.isAwaitingPromise() ? (un(U, t), U.awaitingPromise.set(t, !0)) : (un(Tt, t), un(U, t));
|
|
2407
|
+
}, un = (t, e) => {
|
|
2408
2408
|
for (const n in t)
|
|
2409
2409
|
t[n].delete(e);
|
|
2410
|
-
},
|
|
2410
|
+
}, ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2411
2411
|
__proto__: null,
|
|
2412
|
-
_destroy:
|
|
2413
|
-
close:
|
|
2414
|
-
closeModal:
|
|
2415
|
-
closePopup:
|
|
2416
|
-
closeToast:
|
|
2417
|
-
disableButtons:
|
|
2418
|
-
disableInput:
|
|
2419
|
-
disableLoading:
|
|
2420
|
-
enableButtons:
|
|
2421
|
-
enableInput:
|
|
2422
|
-
getInput:
|
|
2423
|
-
getProgressSteps:
|
|
2424
|
-
handleAwaitingPromise:
|
|
2425
|
-
hideLoading:
|
|
2426
|
-
isAwaitingPromise:
|
|
2427
|
-
rejectPromise:
|
|
2428
|
-
resetValidationMessage:
|
|
2429
|
-
showValidationMessage:
|
|
2430
|
-
update:
|
|
2431
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2432
|
-
const e =
|
|
2433
|
-
t.disableButtons(), e.input ?
|
|
2434
|
-
},
|
|
2435
|
-
const e =
|
|
2436
|
-
t.disableButtons(), e.returnInputValueOnDeny ?
|
|
2437
|
-
},
|
|
2438
|
-
t.disableButtons(), e(
|
|
2439
|
-
},
|
|
2440
|
-
const n =
|
|
2412
|
+
_destroy: _a,
|
|
2413
|
+
close: Ut,
|
|
2414
|
+
closeModal: Ut,
|
|
2415
|
+
closePopup: Ut,
|
|
2416
|
+
closeToast: Ut,
|
|
2417
|
+
disableButtons: ma,
|
|
2418
|
+
disableInput: ba,
|
|
2419
|
+
disableLoading: fo,
|
|
2420
|
+
enableButtons: pa,
|
|
2421
|
+
enableInput: ga,
|
|
2422
|
+
getInput: Ji,
|
|
2423
|
+
getProgressSteps: wa,
|
|
2424
|
+
handleAwaitingPromise: Ot,
|
|
2425
|
+
hideLoading: fo,
|
|
2426
|
+
isAwaitingPromise: ca,
|
|
2427
|
+
rejectPromise: ua,
|
|
2428
|
+
resetValidationMessage: ya,
|
|
2429
|
+
showValidationMessage: va,
|
|
2430
|
+
update: ka
|
|
2431
|
+
}, Symbol.toStringTag, { value: "Module" })), Ca = (t) => {
|
|
2432
|
+
const e = U.innerParams.get(t);
|
|
2433
|
+
t.disableButtons(), e.input ? ar(t, "confirm") : Un(t, !0);
|
|
2434
|
+
}, Ea = (t) => {
|
|
2435
|
+
const e = U.innerParams.get(t);
|
|
2436
|
+
t.disableButtons(), e.returnInputValueOnDeny ? ar(t, "deny") : Mn(t, !1);
|
|
2437
|
+
}, Ta = (t, e) => {
|
|
2438
|
+
t.disableButtons(), e(ft.cancel);
|
|
2439
|
+
}, ar = (t, e) => {
|
|
2440
|
+
const n = U.innerParams.get(t);
|
|
2441
2441
|
if (!n.input)
|
|
2442
|
-
return
|
|
2443
|
-
`The "input" parameter is needed to be set when using returnInputValueOn${
|
|
2442
|
+
return Je(
|
|
2443
|
+
`The "input" parameter is needed to be set when using returnInputValueOn${En(e)}`
|
|
2444
2444
|
);
|
|
2445
|
-
const o =
|
|
2446
|
-
n.inputValidator ?
|
|
2447
|
-
},
|
|
2448
|
-
const o =
|
|
2445
|
+
const o = ji(t, n);
|
|
2446
|
+
n.inputValidator ? Sa(t, o, e) : t.getInput().checkValidity() ? e === "deny" ? Mn(t, o) : Un(t, o) : (t.enableButtons(), t.showValidationMessage(n.validationMessage));
|
|
2447
|
+
}, Sa = (t, e, n) => {
|
|
2448
|
+
const o = U.innerParams.get(t);
|
|
2449
2449
|
t.disableInput(), Promise.resolve().then(
|
|
2450
|
-
() =>
|
|
2450
|
+
() => St(o.inputValidator(e, o.validationMessage))
|
|
2451
2451
|
).then((c) => {
|
|
2452
|
-
t.enableButtons(), t.enableInput(), c ? t.showValidationMessage(c) : n === "deny" ?
|
|
2452
|
+
t.enableButtons(), t.enableInput(), c ? t.showValidationMessage(c) : n === "deny" ? Mn(t, e) : Un(t, e);
|
|
2453
2453
|
});
|
|
2454
|
-
},
|
|
2455
|
-
const n =
|
|
2456
|
-
n.showLoaderOnDeny &&
|
|
2457
|
-
() =>
|
|
2454
|
+
}, Mn = (t, e) => {
|
|
2455
|
+
const n = U.innerParams.get(t || globalThis);
|
|
2456
|
+
n.showLoaderOnDeny && ut(ze()), n.preDeny ? (U.awaitingPromise.set(t || globalThis, !0), Promise.resolve().then(
|
|
2457
|
+
() => St(n.preDeny(e, n.validationMessage))
|
|
2458
2458
|
).then((i) => {
|
|
2459
|
-
i === !1 ? (t.hideLoading(),
|
|
2460
|
-
}).catch((i) =>
|
|
2461
|
-
},
|
|
2459
|
+
i === !1 ? (t.hideLoading(), Ot(t)) : t.closePopup({ isDenied: !0, value: typeof i > "u" ? e : i });
|
|
2460
|
+
}).catch((i) => cr(t || globalThis, i))) : t.closePopup({ isDenied: !0, value: e });
|
|
2461
|
+
}, po = (t, e) => {
|
|
2462
2462
|
t.closePopup({ isConfirmed: !0, value: e });
|
|
2463
|
-
},
|
|
2463
|
+
}, cr = (t, e) => {
|
|
2464
2464
|
t.rejectPromise(e);
|
|
2465
|
-
},
|
|
2466
|
-
const n =
|
|
2467
|
-
n.showLoaderOnConfirm &&
|
|
2468
|
-
() =>
|
|
2465
|
+
}, Un = (t, e) => {
|
|
2466
|
+
const n = U.innerParams.get(t || globalThis);
|
|
2467
|
+
n.showLoaderOnConfirm && ut(), n.preConfirm ? (t.resetValidationMessage(), U.awaitingPromise.set(t || globalThis, !0), Promise.resolve().then(
|
|
2468
|
+
() => St(n.preConfirm(e, n.validationMessage))
|
|
2469
2469
|
).then((i) => {
|
|
2470
|
-
|
|
2471
|
-
}).catch((i) =>
|
|
2472
|
-
},
|
|
2473
|
-
|
|
2474
|
-
},
|
|
2470
|
+
_e(Yt()) || i === !1 ? (t.hideLoading(), Ot(t)) : po(t, typeof i > "u" ? e : i);
|
|
2471
|
+
}).catch((i) => cr(t || globalThis, i))) : po(t, e);
|
|
2472
|
+
}, La = (t, e, n) => {
|
|
2473
|
+
U.innerParams.get(t).toast ? Ia(t, e, n) : (Ra(e), Oa(e), Fa(t, e, n));
|
|
2474
|
+
}, Ia = (t, e, n) => {
|
|
2475
2475
|
e.popup.onclick = () => {
|
|
2476
|
-
const o =
|
|
2477
|
-
o && (
|
|
2476
|
+
const o = U.innerParams.get(t);
|
|
2477
|
+
o && (Pa(o) || o.timer || o.input) || n(ft.close);
|
|
2478
2478
|
};
|
|
2479
|
-
},
|
|
2480
|
-
let
|
|
2481
|
-
const
|
|
2479
|
+
}, Pa = (t) => t.showConfirmButton || t.showDenyButton || t.showCancelButton || t.showCloseButton;
|
|
2480
|
+
let Vt = !1;
|
|
2481
|
+
const Ra = (t) => {
|
|
2482
2482
|
t.popup.onmousedown = () => {
|
|
2483
2483
|
t.container.onmouseup = function(e) {
|
|
2484
|
-
t.container.onmouseup = void 0, e.target === t.container && (
|
|
2484
|
+
t.container.onmouseup = void 0, e.target === t.container && (Vt = !0);
|
|
2485
2485
|
};
|
|
2486
2486
|
};
|
|
2487
|
-
},
|
|
2487
|
+
}, Oa = (t) => {
|
|
2488
2488
|
t.container.onmousedown = () => {
|
|
2489
2489
|
t.popup.onmouseup = function(e) {
|
|
2490
|
-
t.popup.onmouseup = void 0, (e.target === t.popup || t.popup.contains(e.target)) && (
|
|
2490
|
+
t.popup.onmouseup = void 0, (e.target === t.popup || t.popup.contains(e.target)) && (Vt = !0);
|
|
2491
2491
|
};
|
|
2492
2492
|
};
|
|
2493
|
-
},
|
|
2493
|
+
}, Fa = (t, e, n) => {
|
|
2494
2494
|
e.container.onclick = (o) => {
|
|
2495
|
-
const i =
|
|
2496
|
-
if (
|
|
2497
|
-
|
|
2495
|
+
const i = U.innerParams.get(t);
|
|
2496
|
+
if (Vt) {
|
|
2497
|
+
Vt = !1;
|
|
2498
2498
|
return;
|
|
2499
2499
|
}
|
|
2500
|
-
o.target === e.container &&
|
|
2500
|
+
o.target === e.container && Gt(i.allowOutsideClick) && n(ft.backdrop);
|
|
2501
2501
|
};
|
|
2502
|
-
},
|
|
2502
|
+
}, Ba = (t) => typeof t == "object" && t.jquery, mo = (t) => t instanceof Element || Ba(t), Ma = (t) => {
|
|
2503
2503
|
const e = {};
|
|
2504
|
-
return typeof t[0] == "object" && !
|
|
2504
|
+
return typeof t[0] == "object" && !mo(t[0]) ? Object.assign(e, t[0]) : ["title", "html", "icon"].forEach((n, o) => {
|
|
2505
2505
|
const i = t[o];
|
|
2506
|
-
typeof i == "string" ||
|
|
2506
|
+
typeof i == "string" || mo(i) ? e[n] = i : i !== void 0 && Je(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`);
|
|
2507
2507
|
}), e;
|
|
2508
2508
|
};
|
|
2509
|
-
function
|
|
2509
|
+
function Ua(...t) {
|
|
2510
2510
|
const e = this;
|
|
2511
2511
|
return new e(...t);
|
|
2512
2512
|
}
|
|
2513
|
-
function
|
|
2513
|
+
function Da(t) {
|
|
2514
2514
|
class e extends this {
|
|
2515
2515
|
_main(o, i) {
|
|
2516
2516
|
return super._main(o, Object.assign({}, t, i));
|
|
@@ -2518,83 +2518,83 @@ function ei(t) {
|
|
|
2518
2518
|
}
|
|
2519
2519
|
return e;
|
|
2520
2520
|
}
|
|
2521
|
-
const
|
|
2522
|
-
if (
|
|
2523
|
-
return
|
|
2524
|
-
},
|
|
2525
|
-
if (
|
|
2526
|
-
const t =
|
|
2527
|
-
return
|
|
2528
|
-
}
|
|
2529
|
-
},
|
|
2530
|
-
const t =
|
|
2531
|
-
return t && (t.running ?
|
|
2532
|
-
},
|
|
2533
|
-
if (
|
|
2534
|
-
const e =
|
|
2535
|
-
return
|
|
2536
|
-
}
|
|
2537
|
-
},
|
|
2538
|
-
let
|
|
2539
|
-
const
|
|
2540
|
-
function
|
|
2541
|
-
|
|
2521
|
+
const Na = () => B.timeout && B.timeout.getTimerLeft(), lr = () => {
|
|
2522
|
+
if (B.timeout)
|
|
2523
|
+
return Es(), B.timeout.stop();
|
|
2524
|
+
}, ur = () => {
|
|
2525
|
+
if (B.timeout) {
|
|
2526
|
+
const t = B.timeout.start();
|
|
2527
|
+
return On(t), t;
|
|
2528
|
+
}
|
|
2529
|
+
}, $a = () => {
|
|
2530
|
+
const t = B.timeout;
|
|
2531
|
+
return t && (t.running ? lr() : ur());
|
|
2532
|
+
}, Ha = (t) => {
|
|
2533
|
+
if (B.timeout) {
|
|
2534
|
+
const e = B.timeout.increase(t);
|
|
2535
|
+
return On(e, !0), e;
|
|
2536
|
+
}
|
|
2537
|
+
}, ja = () => B.timeout && B.timeout.isRunning();
|
|
2538
|
+
let go = !1;
|
|
2539
|
+
const yn = {};
|
|
2540
|
+
function za(t = "data-swal-template") {
|
|
2541
|
+
yn[t] = this, go || (document.body.addEventListener("click", Va), go = !0);
|
|
2542
2542
|
}
|
|
2543
|
-
const
|
|
2543
|
+
const Va = (t) => {
|
|
2544
2544
|
for (let e = t.target; e && e !== document; e = e.parentNode)
|
|
2545
|
-
for (const n in
|
|
2545
|
+
for (const n in yn) {
|
|
2546
2546
|
const o = e.getAttribute(n);
|
|
2547
2547
|
if (o) {
|
|
2548
|
-
|
|
2548
|
+
yn[n].fire({ template: o });
|
|
2549
2549
|
return;
|
|
2550
2550
|
}
|
|
2551
2551
|
}
|
|
2552
|
-
},
|
|
2552
|
+
}, Wa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2553
2553
|
__proto__: null,
|
|
2554
|
-
argsToParams:
|
|
2555
|
-
bindClickHandler:
|
|
2556
|
-
clickCancel:
|
|
2557
|
-
clickConfirm:
|
|
2558
|
-
clickDeny:
|
|
2559
|
-
enableLoading:
|
|
2560
|
-
fire:
|
|
2561
|
-
getActions:
|
|
2562
|
-
getCancelButton:
|
|
2563
|
-
getCloseButton:
|
|
2564
|
-
getConfirmButton:
|
|
2565
|
-
getContainer:
|
|
2566
|
-
getDenyButton:
|
|
2567
|
-
getFocusableElements:
|
|
2568
|
-
getFooter:
|
|
2569
|
-
getHtmlContainer:
|
|
2570
|
-
getIcon:
|
|
2571
|
-
getImage:
|
|
2572
|
-
getInputLabel:
|
|
2573
|
-
getLoader:
|
|
2574
|
-
getPopup:
|
|
2575
|
-
getTimerLeft:
|
|
2576
|
-
getTimerProgressBar:
|
|
2577
|
-
getTitle:
|
|
2578
|
-
getValidationMessage:
|
|
2579
|
-
increaseTimer:
|
|
2580
|
-
isDeprecatedParameter:
|
|
2581
|
-
isLoading:
|
|
2582
|
-
isTimerRunning:
|
|
2583
|
-
isUpdatableParameter:
|
|
2584
|
-
isValidParameter:
|
|
2585
|
-
isVisible:
|
|
2586
|
-
mixin:
|
|
2587
|
-
resumeTimer:
|
|
2588
|
-
showLoading:
|
|
2589
|
-
stopTimer:
|
|
2590
|
-
toggleTimer:
|
|
2554
|
+
argsToParams: Ma,
|
|
2555
|
+
bindClickHandler: za,
|
|
2556
|
+
clickCancel: Qi,
|
|
2557
|
+
clickConfirm: Qo,
|
|
2558
|
+
clickDeny: Zi,
|
|
2559
|
+
enableLoading: ut,
|
|
2560
|
+
fire: Ua,
|
|
2561
|
+
getActions: Pt,
|
|
2562
|
+
getCancelButton: Ge,
|
|
2563
|
+
getCloseButton: Ln,
|
|
2564
|
+
getConfirmButton: Ie,
|
|
2565
|
+
getContainer: se,
|
|
2566
|
+
getDenyButton: ze,
|
|
2567
|
+
getFocusableElements: In,
|
|
2568
|
+
getFooter: jo,
|
|
2569
|
+
getHtmlContainer: zt,
|
|
2570
|
+
getIcon: It,
|
|
2571
|
+
getImage: $o,
|
|
2572
|
+
getInputLabel: ks,
|
|
2573
|
+
getLoader: dt,
|
|
2574
|
+
getPopup: V,
|
|
2575
|
+
getTimerLeft: Na,
|
|
2576
|
+
getTimerProgressBar: Jt,
|
|
2577
|
+
getTitle: No,
|
|
2578
|
+
getValidationMessage: Yt,
|
|
2579
|
+
increaseTimer: Ha,
|
|
2580
|
+
isDeprecatedParameter: gn,
|
|
2581
|
+
isLoading: _s,
|
|
2582
|
+
isTimerRunning: ja,
|
|
2583
|
+
isUpdatableParameter: Uo,
|
|
2584
|
+
isValidParameter: Mo,
|
|
2585
|
+
isVisible: Xi,
|
|
2586
|
+
mixin: Da,
|
|
2587
|
+
resumeTimer: ur,
|
|
2588
|
+
showLoading: ut,
|
|
2589
|
+
stopTimer: lr,
|
|
2590
|
+
toggleTimer: $a
|
|
2591
2591
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2592
|
-
let
|
|
2593
|
-
class
|
|
2592
|
+
let wn;
|
|
2593
|
+
class ht {
|
|
2594
2594
|
constructor(...e) {
|
|
2595
2595
|
if (typeof window > "u")
|
|
2596
2596
|
return;
|
|
2597
|
-
|
|
2597
|
+
wn = this;
|
|
2598
2598
|
const n = Object.freeze(this.constructor.argsToParams(e));
|
|
2599
2599
|
Object.defineProperties(this, {
|
|
2600
2600
|
params: {
|
|
@@ -2605,88 +2605,583 @@ class Re {
|
|
|
2605
2605
|
}
|
|
2606
2606
|
});
|
|
2607
2607
|
const o = this._main(this.params);
|
|
2608
|
-
|
|
2608
|
+
U.promise.set(this, o);
|
|
2609
2609
|
}
|
|
2610
2610
|
_main(e, n = {}) {
|
|
2611
|
-
|
|
2612
|
-
const o =
|
|
2613
|
-
|
|
2614
|
-
const i =
|
|
2615
|
-
return
|
|
2611
|
+
ys(Object.assign({}, n, e)), B.currentInstance && (B.currentInstance._destroy(), Pn() && Yo()), B.currentInstance = this;
|
|
2612
|
+
const o = Ka(e, n);
|
|
2613
|
+
Ci(o), Object.freeze(o), B.timeout && (B.timeout.stop(), delete B.timeout), clearTimeout(B.restoreFocusTimeout);
|
|
2614
|
+
const i = Ga(this);
|
|
2615
|
+
return Go(this, o), U.innerParams.set(this, o), qa(this, i, o);
|
|
2616
2616
|
}
|
|
2617
2617
|
// `catch` cannot be the name of a module export, so we define our thenable methods here instead
|
|
2618
2618
|
then(e) {
|
|
2619
|
-
return
|
|
2619
|
+
return U.promise.get(this).then(e);
|
|
2620
2620
|
}
|
|
2621
2621
|
finally(e) {
|
|
2622
|
-
return
|
|
2622
|
+
return U.promise.get(this).finally(e);
|
|
2623
2623
|
}
|
|
2624
2624
|
}
|
|
2625
|
-
const
|
|
2625
|
+
const qa = (t, e, n) => new Promise((o, i) => {
|
|
2626
2626
|
const c = (x) => {
|
|
2627
2627
|
t.closePopup({ isDismissed: !0, dismiss: x });
|
|
2628
2628
|
};
|
|
2629
|
-
|
|
2629
|
+
Tt.swalPromiseResolve.set(t, o), Tt.swalPromiseReject.set(t, i), e.confirmButton.onclick = () => Ca(t), e.denyButton.onclick = () => Ea(t), e.cancelButton.onclick = () => Ta(t, c), e.closeButton.onclick = () => c(ft.close), La(t, e, c), ea(t, B, n, c), Hi(t, n), Mi(n), Ya(B, n, c), Ja(e, n), setTimeout(() => {
|
|
2630
2630
|
e.container.scrollTop = 0;
|
|
2631
2631
|
});
|
|
2632
|
-
}),
|
|
2633
|
-
const n =
|
|
2634
|
-
return o.showClass = Object.assign({},
|
|
2635
|
-
},
|
|
2632
|
+
}), Ka = (t, e) => {
|
|
2633
|
+
const n = mi(t), o = Object.assign({}, it, e, n, t);
|
|
2634
|
+
return o.showClass = Object.assign({}, it.showClass, o.showClass), o.hideClass = Object.assign({}, it.hideClass, o.hideClass), o;
|
|
2635
|
+
}, Ga = (t) => {
|
|
2636
2636
|
const e = {
|
|
2637
|
-
popup:
|
|
2638
|
-
container:
|
|
2639
|
-
actions:
|
|
2640
|
-
confirmButton:
|
|
2641
|
-
denyButton:
|
|
2642
|
-
cancelButton:
|
|
2643
|
-
loader:
|
|
2644
|
-
closeButton:
|
|
2645
|
-
validationMessage:
|
|
2646
|
-
progressSteps:
|
|
2637
|
+
popup: V(),
|
|
2638
|
+
container: se(),
|
|
2639
|
+
actions: Pt(),
|
|
2640
|
+
confirmButton: Ie(),
|
|
2641
|
+
denyButton: ze(),
|
|
2642
|
+
cancelButton: Ge(),
|
|
2643
|
+
loader: dt(),
|
|
2644
|
+
closeButton: Ln(),
|
|
2645
|
+
validationMessage: Yt(),
|
|
2646
|
+
progressSteps: Ho()
|
|
2647
2647
|
};
|
|
2648
|
-
return
|
|
2649
|
-
},
|
|
2650
|
-
const o =
|
|
2651
|
-
|
|
2648
|
+
return U.domCache.set(t, e), e;
|
|
2649
|
+
}, Ya = (t, e, n) => {
|
|
2650
|
+
const o = Jt();
|
|
2651
|
+
ie(o), e.timer && (t.timeout = new Ei(() => {
|
|
2652
2652
|
n("timer"), delete t.timeout;
|
|
2653
|
-
}, e.timer), e.timerProgressBar && (
|
|
2654
|
-
t.timeout && t.timeout.running &&
|
|
2653
|
+
}, e.timer), e.timerProgressBar && (te(o), Ee(o, e, "timerProgressBar"), setTimeout(() => {
|
|
2654
|
+
t.timeout && t.timeout.running && On(e.timer);
|
|
2655
2655
|
})));
|
|
2656
|
-
},
|
|
2656
|
+
}, Ja = (t, e) => {
|
|
2657
2657
|
if (!e.toast) {
|
|
2658
|
-
if (!
|
|
2659
|
-
return
|
|
2660
|
-
|
|
2658
|
+
if (!Gt(e.allowEnterKey))
|
|
2659
|
+
return Za();
|
|
2660
|
+
Xa(t, e) || vn(e, -1, 1);
|
|
2661
2661
|
}
|
|
2662
|
-
},
|
|
2662
|
+
}, Xa = (t, e) => e.focusDeny && _e(t.denyButton) ? (t.denyButton.focus(), !0) : e.focusCancel && _e(t.cancelButton) ? (t.cancelButton.focus(), !0) : e.focusConfirm && _e(t.confirmButton) ? (t.confirmButton.focus(), !0) : !1, Za = () => {
|
|
2663
2663
|
document.activeElement instanceof HTMLElement && typeof document.activeElement.blur == "function" && document.activeElement.blur();
|
|
2664
2664
|
};
|
|
2665
|
-
Object.assign(
|
|
2666
|
-
Object.assign(
|
|
2667
|
-
Object.keys(
|
|
2668
|
-
|
|
2669
|
-
if (
|
|
2670
|
-
return
|
|
2665
|
+
Object.assign(ht.prototype, ir);
|
|
2666
|
+
Object.assign(ht, Wa);
|
|
2667
|
+
Object.keys(ir).forEach((t) => {
|
|
2668
|
+
ht[t] = function(...e) {
|
|
2669
|
+
if (wn)
|
|
2670
|
+
return wn[t](...e);
|
|
2671
|
+
};
|
|
2672
|
+
});
|
|
2673
|
+
ht.DismissReason = ft;
|
|
2674
|
+
ht.version = "11.4.8";
|
|
2675
|
+
const ct = ht;
|
|
2676
|
+
ct.default = ct;
|
|
2677
|
+
/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */
|
|
2678
|
+
const {
|
|
2679
|
+
entries: dr,
|
|
2680
|
+
setPrototypeOf: bo,
|
|
2681
|
+
isFrozen: Qa,
|
|
2682
|
+
getPrototypeOf: ec,
|
|
2683
|
+
getOwnPropertyDescriptor: fr
|
|
2684
|
+
} = Object;
|
|
2685
|
+
let {
|
|
2686
|
+
freeze: ue,
|
|
2687
|
+
seal: Pe,
|
|
2688
|
+
create: hr
|
|
2689
|
+
} = Object, {
|
|
2690
|
+
apply: kn,
|
|
2691
|
+
construct: An
|
|
2692
|
+
} = typeof Reflect < "u" && Reflect;
|
|
2693
|
+
ue || (ue = function(e) {
|
|
2694
|
+
return e;
|
|
2695
|
+
});
|
|
2696
|
+
Pe || (Pe = function(e) {
|
|
2697
|
+
return e;
|
|
2698
|
+
});
|
|
2699
|
+
kn || (kn = function(e, n, o) {
|
|
2700
|
+
return e.apply(n, o);
|
|
2701
|
+
});
|
|
2702
|
+
An || (An = function(e, n) {
|
|
2703
|
+
return new e(...n);
|
|
2704
|
+
});
|
|
2705
|
+
const Dt = Te(Array.prototype.forEach), vo = Te(Array.prototype.pop), bt = Te(Array.prototype.push), Ht = Te(String.prototype.toLowerCase), dn = Te(String.prototype.toString), tc = Te(String.prototype.match), vt = Te(String.prototype.replace), nc = Te(String.prototype.indexOf), oc = Te(String.prototype.trim), we = Te(RegExp.prototype.test), yt = rc(TypeError);
|
|
2706
|
+
function Te(t) {
|
|
2707
|
+
return function(e) {
|
|
2708
|
+
for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), i = 1; i < n; i++)
|
|
2709
|
+
o[i - 1] = arguments[i];
|
|
2710
|
+
return kn(t, e, o);
|
|
2711
|
+
};
|
|
2712
|
+
}
|
|
2713
|
+
function rc(t) {
|
|
2714
|
+
return function() {
|
|
2715
|
+
for (var e = arguments.length, n = new Array(e), o = 0; o < e; o++)
|
|
2716
|
+
n[o] = arguments[o];
|
|
2717
|
+
return An(t, n);
|
|
2671
2718
|
};
|
|
2719
|
+
}
|
|
2720
|
+
function M(t, e) {
|
|
2721
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ht;
|
|
2722
|
+
bo && bo(t, null);
|
|
2723
|
+
let o = e.length;
|
|
2724
|
+
for (; o--; ) {
|
|
2725
|
+
let i = e[o];
|
|
2726
|
+
if (typeof i == "string") {
|
|
2727
|
+
const c = n(i);
|
|
2728
|
+
c !== i && (Qa(e) || (e[o] = c), i = c);
|
|
2729
|
+
}
|
|
2730
|
+
t[i] = !0;
|
|
2731
|
+
}
|
|
2732
|
+
return t;
|
|
2733
|
+
}
|
|
2734
|
+
function rt(t) {
|
|
2735
|
+
const e = hr(null);
|
|
2736
|
+
for (const [n, o] of dr(t))
|
|
2737
|
+
fr(t, n) !== void 0 && (e[n] = o);
|
|
2738
|
+
return e;
|
|
2739
|
+
}
|
|
2740
|
+
function Nt(t, e) {
|
|
2741
|
+
for (; t !== null; ) {
|
|
2742
|
+
const o = fr(t, e);
|
|
2743
|
+
if (o) {
|
|
2744
|
+
if (o.get)
|
|
2745
|
+
return Te(o.get);
|
|
2746
|
+
if (typeof o.value == "function")
|
|
2747
|
+
return Te(o.value);
|
|
2748
|
+
}
|
|
2749
|
+
t = ec(t);
|
|
2750
|
+
}
|
|
2751
|
+
function n(o) {
|
|
2752
|
+
return console.warn("fallback value for", o), null;
|
|
2753
|
+
}
|
|
2754
|
+
return n;
|
|
2755
|
+
}
|
|
2756
|
+
const yo = ue(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), fn = ue(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), hn = ue(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), sc = ue(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), pn = ue(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), ic = ue(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), wo = ue(["#text"]), ko = ue(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), mn = ue(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ao = ue(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), $t = ue(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ac = Pe(/\{\{[\w\W]*|[\w\W]*\}\}/gm), cc = Pe(/<%[\w\W]*|[\w\W]*%>/gm), lc = Pe(/\${[\w\W]*}/gm), uc = Pe(/^data-[\-\w.\u00B7-\uFFFF]/), dc = Pe(/^aria-[\-\w]+$/), pr = Pe(
|
|
2757
|
+
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
2758
|
+
// eslint-disable-line no-useless-escape
|
|
2759
|
+
), fc = Pe(/^(?:\w+script|data):/i), hc = Pe(
|
|
2760
|
+
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
2761
|
+
// eslint-disable-line no-control-regex
|
|
2762
|
+
), mr = Pe(/^html$/i);
|
|
2763
|
+
var _o = /* @__PURE__ */ Object.freeze({
|
|
2764
|
+
__proto__: null,
|
|
2765
|
+
MUSTACHE_EXPR: ac,
|
|
2766
|
+
ERB_EXPR: cc,
|
|
2767
|
+
TMPLIT_EXPR: lc,
|
|
2768
|
+
DATA_ATTR: uc,
|
|
2769
|
+
ARIA_ATTR: dc,
|
|
2770
|
+
IS_ALLOWED_URI: pr,
|
|
2771
|
+
IS_SCRIPT_OR_DATA: fc,
|
|
2772
|
+
ATTR_WHITESPACE: hc,
|
|
2773
|
+
DOCTYPE_NAME: mr
|
|
2672
2774
|
});
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2775
|
+
const pc = function() {
|
|
2776
|
+
return typeof window > "u" ? null : window;
|
|
2777
|
+
}, mc = function(e, n) {
|
|
2778
|
+
if (typeof e != "object" || typeof e.createPolicy != "function")
|
|
2779
|
+
return null;
|
|
2780
|
+
let o = null;
|
|
2781
|
+
const i = "data-tt-policy-suffix";
|
|
2782
|
+
n && n.hasAttribute(i) && (o = n.getAttribute(i));
|
|
2783
|
+
const c = "dompurify" + (o ? "#" + o : "");
|
|
2784
|
+
try {
|
|
2785
|
+
return e.createPolicy(c, {
|
|
2786
|
+
createHTML(x) {
|
|
2787
|
+
return x;
|
|
2788
|
+
},
|
|
2789
|
+
createScriptURL(x) {
|
|
2790
|
+
return x;
|
|
2791
|
+
}
|
|
2792
|
+
});
|
|
2793
|
+
} catch {
|
|
2794
|
+
return console.warn("TrustedTypes policy " + c + " could not be created."), null;
|
|
2795
|
+
}
|
|
2796
|
+
};
|
|
2797
|
+
function gr() {
|
|
2798
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : pc();
|
|
2799
|
+
const e = (S) => gr(S);
|
|
2800
|
+
if (e.version = "3.0.6", e.removed = [], !t || !t.document || t.document.nodeType !== 9)
|
|
2801
|
+
return e.isSupported = !1, e;
|
|
2802
|
+
let {
|
|
2803
|
+
document: n
|
|
2804
|
+
} = t;
|
|
2805
|
+
const o = n, i = o.currentScript, {
|
|
2806
|
+
DocumentFragment: c,
|
|
2807
|
+
HTMLTemplateElement: x,
|
|
2808
|
+
Node: L,
|
|
2809
|
+
Element: u,
|
|
2810
|
+
NodeFilter: H,
|
|
2811
|
+
NamedNodeMap: W = t.NamedNodeMap || t.MozNamedAttrMap,
|
|
2812
|
+
HTMLFormElement: Q,
|
|
2813
|
+
DOMParser: Le,
|
|
2814
|
+
trustedTypes: z
|
|
2815
|
+
} = t, Be = u.prototype, Xe = Nt(Be, "cloneNode"), ve = Nt(Be, "nextSibling"), Ze = Nt(Be, "childNodes"), de = Nt(Be, "parentNode");
|
|
2816
|
+
if (typeof x == "function") {
|
|
2817
|
+
const S = n.createElement("template");
|
|
2818
|
+
S.content && S.content.ownerDocument && (n = S.content.ownerDocument);
|
|
2819
|
+
}
|
|
2820
|
+
let D, ye = "";
|
|
2821
|
+
const {
|
|
2822
|
+
implementation: X,
|
|
2823
|
+
createNodeIterator: f,
|
|
2824
|
+
createDocumentFragment: k,
|
|
2825
|
+
getElementsByTagName: I
|
|
2826
|
+
} = n, {
|
|
2827
|
+
importNode: A
|
|
2828
|
+
} = o;
|
|
2829
|
+
let w = {};
|
|
2830
|
+
e.isSupported = typeof dr == "function" && typeof de == "function" && X && X.createHTMLDocument !== void 0;
|
|
2831
|
+
const {
|
|
2832
|
+
MUSTACHE_EXPR: y,
|
|
2833
|
+
ERB_EXPR: O,
|
|
2834
|
+
TMPLIT_EXPR: p,
|
|
2835
|
+
DATA_ATTR: F,
|
|
2836
|
+
ARIA_ATTR: q,
|
|
2837
|
+
IS_SCRIPT_OR_DATA: Y,
|
|
2838
|
+
ATTR_WHITESPACE: G
|
|
2839
|
+
} = _o;
|
|
2840
|
+
let {
|
|
2841
|
+
IS_ALLOWED_URI: ae
|
|
2842
|
+
} = _o, P = null;
|
|
2843
|
+
const fe = M({}, [...yo, ...fn, ...hn, ...pn, ...wo]);
|
|
2844
|
+
let r = null;
|
|
2845
|
+
const a = M({}, [...ko, ...mn, ...Ao, ...$t]);
|
|
2846
|
+
let d = Object.seal(hr(null, {
|
|
2847
|
+
tagNameCheck: {
|
|
2848
|
+
writable: !0,
|
|
2849
|
+
configurable: !1,
|
|
2850
|
+
enumerable: !0,
|
|
2851
|
+
value: null
|
|
2852
|
+
},
|
|
2853
|
+
attributeNameCheck: {
|
|
2854
|
+
writable: !0,
|
|
2855
|
+
configurable: !1,
|
|
2856
|
+
enumerable: !0,
|
|
2857
|
+
value: null
|
|
2858
|
+
},
|
|
2859
|
+
allowCustomizedBuiltInElements: {
|
|
2860
|
+
writable: !0,
|
|
2861
|
+
configurable: !1,
|
|
2862
|
+
enumerable: !0,
|
|
2863
|
+
value: !1
|
|
2864
|
+
}
|
|
2865
|
+
})), g = null, h = null, _ = !0, m = !0, b = !1, E = !0, C = !1, R = !1, N = !1, he = !1, ce = !1, ee = !1, Re = !1, Dn = !0, Nn = !1;
|
|
2866
|
+
const br = "user-content-";
|
|
2867
|
+
let Qt = !0, pt = !1, Qe = {}, et = null;
|
|
2868
|
+
const $n = M({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
2869
|
+
let Hn = null;
|
|
2870
|
+
const jn = M({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
2871
|
+
let en = null;
|
|
2872
|
+
const zn = M({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Ft = "http://www.w3.org/1998/Math/MathML", Bt = "http://www.w3.org/2000/svg", Me = "http://www.w3.org/1999/xhtml";
|
|
2873
|
+
let tt = Me, tn = !1, nn = null;
|
|
2874
|
+
const vr = M({}, [Ft, Bt, Me], dn);
|
|
2875
|
+
let Ve = null;
|
|
2876
|
+
const yr = ["application/xhtml+xml", "text/html"], wr = "text/html";
|
|
2877
|
+
let Z = null, nt = null;
|
|
2878
|
+
const kr = n.createElement("form"), Vn = function(s) {
|
|
2879
|
+
return s instanceof RegExp || s instanceof Function;
|
|
2880
|
+
}, on = function() {
|
|
2881
|
+
let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2882
|
+
if (!(nt && nt === s)) {
|
|
2883
|
+
if ((!s || typeof s != "object") && (s = {}), s = rt(s), Ve = // eslint-disable-next-line unicorn/prefer-includes
|
|
2884
|
+
yr.indexOf(s.PARSER_MEDIA_TYPE) === -1 ? Ve = wr : Ve = s.PARSER_MEDIA_TYPE, Z = Ve === "application/xhtml+xml" ? dn : Ht, P = "ALLOWED_TAGS" in s ? M({}, s.ALLOWED_TAGS, Z) : fe, r = "ALLOWED_ATTR" in s ? M({}, s.ALLOWED_ATTR, Z) : a, nn = "ALLOWED_NAMESPACES" in s ? M({}, s.ALLOWED_NAMESPACES, dn) : vr, en = "ADD_URI_SAFE_ATTR" in s ? M(
|
|
2885
|
+
rt(zn),
|
|
2886
|
+
// eslint-disable-line indent
|
|
2887
|
+
s.ADD_URI_SAFE_ATTR,
|
|
2888
|
+
// eslint-disable-line indent
|
|
2889
|
+
Z
|
|
2890
|
+
// eslint-disable-line indent
|
|
2891
|
+
) : zn, Hn = "ADD_DATA_URI_TAGS" in s ? M(
|
|
2892
|
+
rt(jn),
|
|
2893
|
+
// eslint-disable-line indent
|
|
2894
|
+
s.ADD_DATA_URI_TAGS,
|
|
2895
|
+
// eslint-disable-line indent
|
|
2896
|
+
Z
|
|
2897
|
+
// eslint-disable-line indent
|
|
2898
|
+
) : jn, et = "FORBID_CONTENTS" in s ? M({}, s.FORBID_CONTENTS, Z) : $n, g = "FORBID_TAGS" in s ? M({}, s.FORBID_TAGS, Z) : {}, h = "FORBID_ATTR" in s ? M({}, s.FORBID_ATTR, Z) : {}, Qe = "USE_PROFILES" in s ? s.USE_PROFILES : !1, _ = s.ALLOW_ARIA_ATTR !== !1, m = s.ALLOW_DATA_ATTR !== !1, b = s.ALLOW_UNKNOWN_PROTOCOLS || !1, E = s.ALLOW_SELF_CLOSE_IN_ATTR !== !1, C = s.SAFE_FOR_TEMPLATES || !1, R = s.WHOLE_DOCUMENT || !1, ce = s.RETURN_DOM || !1, ee = s.RETURN_DOM_FRAGMENT || !1, Re = s.RETURN_TRUSTED_TYPE || !1, he = s.FORCE_BODY || !1, Dn = s.SANITIZE_DOM !== !1, Nn = s.SANITIZE_NAMED_PROPS || !1, Qt = s.KEEP_CONTENT !== !1, pt = s.IN_PLACE || !1, ae = s.ALLOWED_URI_REGEXP || pr, tt = s.NAMESPACE || Me, d = s.CUSTOM_ELEMENT_HANDLING || {}, s.CUSTOM_ELEMENT_HANDLING && Vn(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (d.tagNameCheck = s.CUSTOM_ELEMENT_HANDLING.tagNameCheck), s.CUSTOM_ELEMENT_HANDLING && Vn(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (d.attributeNameCheck = s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), s.CUSTOM_ELEMENT_HANDLING && typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (d.allowCustomizedBuiltInElements = s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), C && (m = !1), ee && (ce = !0), Qe && (P = M({}, [...wo]), r = [], Qe.html === !0 && (M(P, yo), M(r, ko)), Qe.svg === !0 && (M(P, fn), M(r, mn), M(r, $t)), Qe.svgFilters === !0 && (M(P, hn), M(r, mn), M(r, $t)), Qe.mathMl === !0 && (M(P, pn), M(r, Ao), M(r, $t))), s.ADD_TAGS && (P === fe && (P = rt(P)), M(P, s.ADD_TAGS, Z)), s.ADD_ATTR && (r === a && (r = rt(r)), M(r, s.ADD_ATTR, Z)), s.ADD_URI_SAFE_ATTR && M(en, s.ADD_URI_SAFE_ATTR, Z), s.FORBID_CONTENTS && (et === $n && (et = rt(et)), M(et, s.FORBID_CONTENTS, Z)), Qt && (P["#text"] = !0), R && M(P, ["html", "head", "body"]), P.table && (M(P, ["tbody"]), delete g.tbody), s.TRUSTED_TYPES_POLICY) {
|
|
2899
|
+
if (typeof s.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
2900
|
+
throw yt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
2901
|
+
if (typeof s.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
2902
|
+
throw yt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
2903
|
+
D = s.TRUSTED_TYPES_POLICY, ye = D.createHTML("");
|
|
2904
|
+
} else
|
|
2905
|
+
D === void 0 && (D = mc(z, i)), D !== null && typeof ye == "string" && (ye = D.createHTML(""));
|
|
2906
|
+
ue && ue(s), nt = s;
|
|
2907
|
+
}
|
|
2908
|
+
}, Wn = M({}, ["mi", "mo", "mn", "ms", "mtext"]), qn = M({}, ["foreignobject", "desc", "title", "annotation-xml"]), Ar = M({}, ["title", "style", "font", "a", "script"]), Mt = M({}, fn);
|
|
2909
|
+
M(Mt, hn), M(Mt, sc);
|
|
2910
|
+
const rn = M({}, pn);
|
|
2911
|
+
M(rn, ic);
|
|
2912
|
+
const _r = function(s) {
|
|
2913
|
+
let v = de(s);
|
|
2914
|
+
(!v || !v.tagName) && (v = {
|
|
2915
|
+
namespaceURI: tt,
|
|
2916
|
+
tagName: "template"
|
|
2917
|
+
});
|
|
2918
|
+
const T = Ht(s.tagName), K = Ht(v.tagName);
|
|
2919
|
+
return nn[s.namespaceURI] ? s.namespaceURI === Bt ? v.namespaceURI === Me ? T === "svg" : v.namespaceURI === Ft ? T === "svg" && (K === "annotation-xml" || Wn[K]) : !!Mt[T] : s.namespaceURI === Ft ? v.namespaceURI === Me ? T === "math" : v.namespaceURI === Bt ? T === "math" && qn[K] : !!rn[T] : s.namespaceURI === Me ? v.namespaceURI === Bt && !qn[K] || v.namespaceURI === Ft && !Wn[K] ? !1 : !rn[T] && (Ar[T] || !Mt[T]) : !!(Ve === "application/xhtml+xml" && nn[s.namespaceURI]) : !1;
|
|
2920
|
+
}, We = function(s) {
|
|
2921
|
+
bt(e.removed, {
|
|
2922
|
+
element: s
|
|
2923
|
+
});
|
|
2924
|
+
try {
|
|
2925
|
+
s.parentNode.removeChild(s);
|
|
2926
|
+
} catch {
|
|
2927
|
+
s.remove();
|
|
2928
|
+
}
|
|
2929
|
+
}, sn = function(s, v) {
|
|
2930
|
+
try {
|
|
2931
|
+
bt(e.removed, {
|
|
2932
|
+
attribute: v.getAttributeNode(s),
|
|
2933
|
+
from: v
|
|
2934
|
+
});
|
|
2935
|
+
} catch {
|
|
2936
|
+
bt(e.removed, {
|
|
2937
|
+
attribute: null,
|
|
2938
|
+
from: v
|
|
2939
|
+
});
|
|
2940
|
+
}
|
|
2941
|
+
if (v.removeAttribute(s), s === "is" && !r[s])
|
|
2942
|
+
if (ce || ee)
|
|
2943
|
+
try {
|
|
2944
|
+
We(v);
|
|
2945
|
+
} catch {
|
|
2946
|
+
}
|
|
2947
|
+
else
|
|
2948
|
+
try {
|
|
2949
|
+
v.setAttribute(s, "");
|
|
2950
|
+
} catch {
|
|
2951
|
+
}
|
|
2952
|
+
}, Kn = function(s) {
|
|
2953
|
+
let v = null, T = null;
|
|
2954
|
+
if (he)
|
|
2955
|
+
s = "<remove></remove>" + s;
|
|
2956
|
+
else {
|
|
2957
|
+
const oe = tc(s, /^[\r\n\t ]+/);
|
|
2958
|
+
T = oe && oe[0];
|
|
2959
|
+
}
|
|
2960
|
+
Ve === "application/xhtml+xml" && tt === Me && (s = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + s + "</body></html>");
|
|
2961
|
+
const K = D ? D.createHTML(s) : s;
|
|
2962
|
+
if (tt === Me)
|
|
2963
|
+
try {
|
|
2964
|
+
v = new Le().parseFromString(K, Ve);
|
|
2965
|
+
} catch {
|
|
2966
|
+
}
|
|
2967
|
+
if (!v || !v.documentElement) {
|
|
2968
|
+
v = X.createDocument(tt, "template", null);
|
|
2969
|
+
try {
|
|
2970
|
+
v.documentElement.innerHTML = tn ? ye : K;
|
|
2971
|
+
} catch {
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
const ne = v.body || v.documentElement;
|
|
2975
|
+
return s && T && ne.insertBefore(n.createTextNode(T), ne.childNodes[0] || null), tt === Me ? I.call(v, R ? "html" : "body")[0] : R ? v.documentElement : ne;
|
|
2976
|
+
}, Gn = function(s) {
|
|
2977
|
+
return f.call(
|
|
2978
|
+
s.ownerDocument || s,
|
|
2979
|
+
s,
|
|
2980
|
+
// eslint-disable-next-line no-bitwise
|
|
2981
|
+
H.SHOW_ELEMENT | H.SHOW_COMMENT | H.SHOW_TEXT,
|
|
2982
|
+
null
|
|
2983
|
+
);
|
|
2984
|
+
}, xr = function(s) {
|
|
2985
|
+
return s instanceof Q && (typeof s.nodeName != "string" || typeof s.textContent != "string" || typeof s.removeChild != "function" || !(s.attributes instanceof W) || typeof s.removeAttribute != "function" || typeof s.setAttribute != "function" || typeof s.namespaceURI != "string" || typeof s.insertBefore != "function" || typeof s.hasChildNodes != "function");
|
|
2986
|
+
}, Yn = function(s) {
|
|
2987
|
+
return typeof L == "function" && s instanceof L;
|
|
2988
|
+
}, Ue = function(s, v, T) {
|
|
2989
|
+
w[s] && Dt(w[s], (K) => {
|
|
2990
|
+
K.call(e, v, T, nt);
|
|
2991
|
+
});
|
|
2992
|
+
}, Jn = function(s) {
|
|
2993
|
+
let v = null;
|
|
2994
|
+
if (Ue("beforeSanitizeElements", s, null), xr(s))
|
|
2995
|
+
return We(s), !0;
|
|
2996
|
+
const T = Z(s.nodeName);
|
|
2997
|
+
if (Ue("uponSanitizeElement", s, {
|
|
2998
|
+
tagName: T,
|
|
2999
|
+
allowedTags: P
|
|
3000
|
+
}), s.hasChildNodes() && !Yn(s.firstElementChild) && we(/<[/\w]/g, s.innerHTML) && we(/<[/\w]/g, s.textContent))
|
|
3001
|
+
return We(s), !0;
|
|
3002
|
+
if (!P[T] || g[T]) {
|
|
3003
|
+
if (!g[T] && Zn(T) && (d.tagNameCheck instanceof RegExp && we(d.tagNameCheck, T) || d.tagNameCheck instanceof Function && d.tagNameCheck(T)))
|
|
3004
|
+
return !1;
|
|
3005
|
+
if (Qt && !et[T]) {
|
|
3006
|
+
const K = de(s) || s.parentNode, ne = Ze(s) || s.childNodes;
|
|
3007
|
+
if (ne && K) {
|
|
3008
|
+
const oe = ne.length;
|
|
3009
|
+
for (let pe = oe - 1; pe >= 0; --pe)
|
|
3010
|
+
K.insertBefore(Xe(ne[pe], !0), ve(s));
|
|
3011
|
+
}
|
|
3012
|
+
}
|
|
3013
|
+
return We(s), !0;
|
|
3014
|
+
}
|
|
3015
|
+
return s instanceof u && !_r(s) || (T === "noscript" || T === "noembed" || T === "noframes") && we(/<\/no(script|embed|frames)/i, s.innerHTML) ? (We(s), !0) : (C && s.nodeType === 3 && (v = s.textContent, Dt([y, O, p], (K) => {
|
|
3016
|
+
v = vt(v, K, " ");
|
|
3017
|
+
}), s.textContent !== v && (bt(e.removed, {
|
|
3018
|
+
element: s.cloneNode()
|
|
3019
|
+
}), s.textContent = v)), Ue("afterSanitizeElements", s, null), !1);
|
|
3020
|
+
}, Xn = function(s, v, T) {
|
|
3021
|
+
if (Dn && (v === "id" || v === "name") && (T in n || T in kr))
|
|
3022
|
+
return !1;
|
|
3023
|
+
if (!(m && !h[v] && we(F, v))) {
|
|
3024
|
+
if (!(_ && we(q, v))) {
|
|
3025
|
+
if (!r[v] || h[v]) {
|
|
3026
|
+
if (
|
|
3027
|
+
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
3028
|
+
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
3029
|
+
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
3030
|
+
!(Zn(s) && (d.tagNameCheck instanceof RegExp && we(d.tagNameCheck, s) || d.tagNameCheck instanceof Function && d.tagNameCheck(s)) && (d.attributeNameCheck instanceof RegExp && we(d.attributeNameCheck, v) || d.attributeNameCheck instanceof Function && d.attributeNameCheck(v)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
3031
|
+
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
3032
|
+
v === "is" && d.allowCustomizedBuiltInElements && (d.tagNameCheck instanceof RegExp && we(d.tagNameCheck, T) || d.tagNameCheck instanceof Function && d.tagNameCheck(T)))
|
|
3033
|
+
)
|
|
3034
|
+
return !1;
|
|
3035
|
+
} else if (!en[v]) {
|
|
3036
|
+
if (!we(ae, vt(T, G, ""))) {
|
|
3037
|
+
if (!((v === "src" || v === "xlink:href" || v === "href") && s !== "script" && nc(T, "data:") === 0 && Hn[s])) {
|
|
3038
|
+
if (!(b && !we(Y, vt(T, G, "")))) {
|
|
3039
|
+
if (T)
|
|
3040
|
+
return !1;
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
return !0;
|
|
3048
|
+
}, Zn = function(s) {
|
|
3049
|
+
return s.indexOf("-") > 0;
|
|
3050
|
+
}, Qn = function(s) {
|
|
3051
|
+
Ue("beforeSanitizeAttributes", s, null);
|
|
3052
|
+
const {
|
|
3053
|
+
attributes: v
|
|
3054
|
+
} = s;
|
|
3055
|
+
if (!v)
|
|
3056
|
+
return;
|
|
3057
|
+
const T = {
|
|
3058
|
+
attrName: "",
|
|
3059
|
+
attrValue: "",
|
|
3060
|
+
keepAttr: !0,
|
|
3061
|
+
allowedAttributes: r
|
|
3062
|
+
};
|
|
3063
|
+
let K = v.length;
|
|
3064
|
+
for (; K--; ) {
|
|
3065
|
+
const ne = v[K], {
|
|
3066
|
+
name: oe,
|
|
3067
|
+
namespaceURI: pe,
|
|
3068
|
+
value: qe
|
|
3069
|
+
} = ne, mt = Z(oe);
|
|
3070
|
+
let me = oe === "value" ? qe : oc(qe);
|
|
3071
|
+
if (T.attrName = mt, T.attrValue = me, T.keepAttr = !0, T.forceKeepAttr = void 0, Ue("uponSanitizeAttribute", s, T), me = T.attrValue, T.forceKeepAttr || (sn(oe, s), !T.keepAttr))
|
|
3072
|
+
continue;
|
|
3073
|
+
if (!E && we(/\/>/i, me)) {
|
|
3074
|
+
sn(oe, s);
|
|
3075
|
+
continue;
|
|
3076
|
+
}
|
|
3077
|
+
C && Dt([y, O, p], (to) => {
|
|
3078
|
+
me = vt(me, to, " ");
|
|
3079
|
+
});
|
|
3080
|
+
const eo = Z(s.nodeName);
|
|
3081
|
+
if (Xn(eo, mt, me)) {
|
|
3082
|
+
if (Nn && (mt === "id" || mt === "name") && (sn(oe, s), me = br + me), D && typeof z == "object" && typeof z.getAttributeType == "function" && !pe)
|
|
3083
|
+
switch (z.getAttributeType(eo, mt)) {
|
|
3084
|
+
case "TrustedHTML": {
|
|
3085
|
+
me = D.createHTML(me);
|
|
3086
|
+
break;
|
|
3087
|
+
}
|
|
3088
|
+
case "TrustedScriptURL": {
|
|
3089
|
+
me = D.createScriptURL(me);
|
|
3090
|
+
break;
|
|
3091
|
+
}
|
|
3092
|
+
}
|
|
3093
|
+
try {
|
|
3094
|
+
pe ? s.setAttributeNS(pe, oe, me) : s.setAttribute(oe, me), vo(e.removed);
|
|
3095
|
+
} catch {
|
|
3096
|
+
}
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
Ue("afterSanitizeAttributes", s, null);
|
|
3100
|
+
}, Cr = function S(s) {
|
|
3101
|
+
let v = null;
|
|
3102
|
+
const T = Gn(s);
|
|
3103
|
+
for (Ue("beforeSanitizeShadowDOM", s, null); v = T.nextNode(); )
|
|
3104
|
+
Ue("uponSanitizeShadowNode", v, null), !Jn(v) && (v.content instanceof c && S(v.content), Qn(v));
|
|
3105
|
+
Ue("afterSanitizeShadowDOM", s, null);
|
|
3106
|
+
};
|
|
3107
|
+
return e.sanitize = function(S) {
|
|
3108
|
+
let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, v = null, T = null, K = null, ne = null;
|
|
3109
|
+
if (tn = !S, tn && (S = "<!-->"), typeof S != "string" && !Yn(S))
|
|
3110
|
+
if (typeof S.toString == "function") {
|
|
3111
|
+
if (S = S.toString(), typeof S != "string")
|
|
3112
|
+
throw yt("dirty is not a string, aborting");
|
|
3113
|
+
} else
|
|
3114
|
+
throw yt("toString is not a function");
|
|
3115
|
+
if (!e.isSupported)
|
|
3116
|
+
return S;
|
|
3117
|
+
if (N || on(s), e.removed = [], typeof S == "string" && (pt = !1), pt) {
|
|
3118
|
+
if (S.nodeName) {
|
|
3119
|
+
const qe = Z(S.nodeName);
|
|
3120
|
+
if (!P[qe] || g[qe])
|
|
3121
|
+
throw yt("root node is forbidden and cannot be sanitized in-place");
|
|
3122
|
+
}
|
|
3123
|
+
} else if (S instanceof L)
|
|
3124
|
+
v = Kn("<!---->"), T = v.ownerDocument.importNode(S, !0), T.nodeType === 1 && T.nodeName === "BODY" || T.nodeName === "HTML" ? v = T : v.appendChild(T);
|
|
3125
|
+
else {
|
|
3126
|
+
if (!ce && !C && !R && // eslint-disable-next-line unicorn/prefer-includes
|
|
3127
|
+
S.indexOf("<") === -1)
|
|
3128
|
+
return D && Re ? D.createHTML(S) : S;
|
|
3129
|
+
if (v = Kn(S), !v)
|
|
3130
|
+
return ce ? null : Re ? ye : "";
|
|
3131
|
+
}
|
|
3132
|
+
v && he && We(v.firstChild);
|
|
3133
|
+
const oe = Gn(pt ? S : v);
|
|
3134
|
+
for (; K = oe.nextNode(); )
|
|
3135
|
+
Jn(K) || (K.content instanceof c && Cr(K.content), Qn(K));
|
|
3136
|
+
if (pt)
|
|
3137
|
+
return S;
|
|
3138
|
+
if (ce) {
|
|
3139
|
+
if (ee)
|
|
3140
|
+
for (ne = k.call(v.ownerDocument); v.firstChild; )
|
|
3141
|
+
ne.appendChild(v.firstChild);
|
|
3142
|
+
else
|
|
3143
|
+
ne = v;
|
|
3144
|
+
return (r.shadowroot || r.shadowrootmode) && (ne = A.call(o, ne, !0)), ne;
|
|
3145
|
+
}
|
|
3146
|
+
let pe = R ? v.outerHTML : v.innerHTML;
|
|
3147
|
+
return R && P["!doctype"] && v.ownerDocument && v.ownerDocument.doctype && v.ownerDocument.doctype.name && we(mr, v.ownerDocument.doctype.name) && (pe = "<!DOCTYPE " + v.ownerDocument.doctype.name + `>
|
|
3148
|
+
` + pe), C && Dt([y, O, p], (qe) => {
|
|
3149
|
+
pe = vt(pe, qe, " ");
|
|
3150
|
+
}), D && Re ? D.createHTML(pe) : pe;
|
|
3151
|
+
}, e.setConfig = function() {
|
|
3152
|
+
let S = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
3153
|
+
on(S), N = !0;
|
|
3154
|
+
}, e.clearConfig = function() {
|
|
3155
|
+
nt = null, N = !1;
|
|
3156
|
+
}, e.isValidAttribute = function(S, s, v) {
|
|
3157
|
+
nt || on({});
|
|
3158
|
+
const T = Z(S), K = Z(s);
|
|
3159
|
+
return Xn(T, K, v);
|
|
3160
|
+
}, e.addHook = function(S, s) {
|
|
3161
|
+
typeof s == "function" && (w[S] = w[S] || [], bt(w[S], s));
|
|
3162
|
+
}, e.removeHook = function(S) {
|
|
3163
|
+
if (w[S])
|
|
3164
|
+
return vo(w[S]);
|
|
3165
|
+
}, e.removeHooks = function(S) {
|
|
3166
|
+
w[S] && (w[S] = []);
|
|
3167
|
+
}, e.removeAllHooks = function() {
|
|
3168
|
+
w = {};
|
|
3169
|
+
}, e;
|
|
3170
|
+
}
|
|
3171
|
+
var xo = gr();
|
|
3172
|
+
class gc {
|
|
2678
3173
|
get IsVisible() {
|
|
2679
|
-
return
|
|
3174
|
+
return ct.isVisible();
|
|
2680
3175
|
}
|
|
2681
3176
|
async ConfirmAsync(e) {
|
|
2682
3177
|
return new Promise((n) => {
|
|
2683
|
-
|
|
3178
|
+
ct.fire({
|
|
2684
3179
|
showCancelButton: !0,
|
|
2685
3180
|
allowEscapeKey: !1,
|
|
2686
3181
|
allowOutsideClick: !1,
|
|
2687
3182
|
icon: "question",
|
|
2688
|
-
title: e.
|
|
2689
|
-
html: e.
|
|
3183
|
+
title: e.title,
|
|
3184
|
+
html: xo.sanitize(e.text),
|
|
2690
3185
|
confirmButtonText: e.confirmLabel ?? "confirmar",
|
|
2691
3186
|
cancelButtonText: e.rejectLabel ?? "cancelar"
|
|
2692
3187
|
}).then((o) => {
|
|
@@ -2696,63 +3191,62 @@ class gi {
|
|
|
2696
3191
|
}
|
|
2697
3192
|
async AlertAsync(e) {
|
|
2698
3193
|
const n = e.icon ?? "info";
|
|
2699
|
-
let o
|
|
2700
|
-
return Array.isArray(e.text) ?
|
|
3194
|
+
let o;
|
|
3195
|
+
return Array.isArray(e.text) ? o = `<div style="max-height: 50vh; overflow: auto">
|
|
2701
3196
|
${e.text.join("<br />")}
|
|
2702
|
-
</div>` : o = e.text, new Promise((
|
|
2703
|
-
|
|
3197
|
+
</div>` : o = e.text, new Promise((i) => {
|
|
3198
|
+
ct.fire({
|
|
2704
3199
|
allowEscapeKey: !1,
|
|
2705
3200
|
allowOutsideClick: !1,
|
|
2706
3201
|
icon: n,
|
|
2707
3202
|
title: e.title,
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
}).then(() => c(!0));
|
|
3203
|
+
html: xo.sanitize(o)
|
|
3204
|
+
}).then(() => i(!0));
|
|
2711
3205
|
});
|
|
2712
3206
|
}
|
|
2713
3207
|
}
|
|
2714
|
-
const
|
|
3208
|
+
const bc = new gc(), vc = () => bc, yc = ["data-cor"], wc = /* @__PURE__ */ $e({
|
|
2715
3209
|
__name: "HeaderAvatar",
|
|
2716
3210
|
setup(t) {
|
|
2717
|
-
const e =
|
|
3211
|
+
const e = vc(), n = i();
|
|
2718
3212
|
async function o() {
|
|
2719
3213
|
await e.ConfirmAsync({
|
|
2720
|
-
|
|
3214
|
+
text: `${le.User.username} - ${le.User.name}.<br /><br />Você deseja sair da conta?`,
|
|
2721
3215
|
confirmLabel: "sair"
|
|
2722
|
-
}) &&
|
|
3216
|
+
}) && le.CallLogout();
|
|
2723
3217
|
}
|
|
2724
3218
|
function i() {
|
|
2725
|
-
const x =
|
|
2726
|
-
let
|
|
3219
|
+
const x = le.User.name;
|
|
3220
|
+
let L = "?";
|
|
2727
3221
|
if (!x)
|
|
2728
|
-
return
|
|
2729
|
-
const
|
|
2730
|
-
return
|
|
3222
|
+
return L;
|
|
3223
|
+
const u = x.split(" ").filter((W) => W.length > 0).map((W) => W[0].toUpperCase()), H = Math.min(2, u.length);
|
|
3224
|
+
return L = u.slice(0, H).join(""), L.length > 0 ? L : "?";
|
|
2731
3225
|
}
|
|
2732
3226
|
function c() {
|
|
2733
|
-
const x = n[0],
|
|
2734
|
-
return Math.max(
|
|
3227
|
+
const x = n[0], L = x === "?" ? 0 : (x.charCodeAt(0) - 64) % 19;
|
|
3228
|
+
return Math.max(L, 0);
|
|
2735
3229
|
}
|
|
2736
|
-
return (x,
|
|
3230
|
+
return (x, L) => (J(), Ae("div", {
|
|
2737
3231
|
id: "sf-header-avatar",
|
|
2738
3232
|
"data-cor": c(),
|
|
2739
3233
|
onClick: o
|
|
2740
|
-
},
|
|
3234
|
+
}, Wt(He(n)), 9, yc));
|
|
2741
3235
|
}
|
|
2742
|
-
}),
|
|
3236
|
+
}), kc = {}, Ac = {
|
|
2743
3237
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2744
3238
|
height: "48",
|
|
2745
3239
|
viewBox: "0 -960 960 960",
|
|
2746
3240
|
width: "48",
|
|
2747
3241
|
class: "sf-svg-icon"
|
|
2748
|
-
},
|
|
2749
|
-
|
|
3242
|
+
}, _c = /* @__PURE__ */ j("path", { d: "m307.231-83.463-54.999-55.23 343.923-343.922-343.923-343.539 54.999-54.614 398.153 398.153L307.231-83.462Z" }, null, -1), xc = [
|
|
3243
|
+
_c
|
|
2750
3244
|
];
|
|
2751
|
-
function
|
|
2752
|
-
return
|
|
3245
|
+
function Cc(t, e) {
|
|
3246
|
+
return J(), Ae("svg", Ac, xc);
|
|
2753
3247
|
}
|
|
2754
|
-
const
|
|
2755
|
-
class
|
|
3248
|
+
const Ec = /* @__PURE__ */ Po(kc, [["render", Cc]]);
|
|
3249
|
+
class Tc {
|
|
2756
3250
|
get storedTheme() {
|
|
2757
3251
|
return localStorage.getItem("color-scheme");
|
|
2758
3252
|
}
|
|
@@ -2778,66 +3272,66 @@ class _i {
|
|
|
2778
3272
|
this.EnableLightMode();
|
|
2779
3273
|
}
|
|
2780
3274
|
}
|
|
2781
|
-
const
|
|
2782
|
-
|
|
2783
|
-
],
|
|
3275
|
+
const _n = (() => new Tc())(), Sc = /* @__PURE__ */ Ir('<svg xmlns="http://www.w3.org/2000/svg" width="472.39" height="472.39" viewBox="0 0 472.39 472.39"><g class="toggle-sun"><path d="M403.21,167V69.18H305.38L236.2,0,167,69.18H69.18V167L0,236.2l69.18,69.18v97.83H167l69.18,69.18,69.18-69.18h97.83V305.38l69.18-69.18Zm-167,198.17a129,129,0,1,1,129-129A129,129,0,0,1,236.2,365.19Z"></path></g><g class="toggle-circle"><circle class="cls-1" cx="236.2" cy="236.2" r="103.78"></circle></g></svg>', 1), Lc = [
|
|
3276
|
+
Sc
|
|
3277
|
+
], Ic = /* @__PURE__ */ $e({
|
|
2784
3278
|
__name: "ThemeToggle",
|
|
2785
3279
|
setup(t) {
|
|
2786
|
-
return (e, n) => (
|
|
3280
|
+
return (e, n) => (J(), Ae("button", {
|
|
2787
3281
|
id: "sf-theme-toggle",
|
|
2788
3282
|
onClick: n[0] || (n[0] = //@ts-ignore
|
|
2789
|
-
(...o) =>
|
|
2790
|
-
},
|
|
3283
|
+
(...o) => He(_n).Toggle && He(_n).Toggle(...o))
|
|
3284
|
+
}, Lc));
|
|
2791
3285
|
}
|
|
2792
|
-
}),
|
|
3286
|
+
}), Pc = { id: "sf-layout" }, Rc = /* @__PURE__ */ j("div", { class: "sf-layout-menu-toggler-logo" }, null, -1), Oc = { class: "title" }, Fc = { class: "sf-layout-nav-header" }, Bc = /* @__PURE__ */ j("span", null, "Menu", -1), Mc = { class: "sf-layout-nav-content" }, Uc = /* @__PURE__ */ j("section", { id: "sf-layout-page-title" }, null, -1), Dc = { id: "sf-layout-content" }, Qc = /* @__PURE__ */ $e({
|
|
2793
3287
|
__name: "Layout",
|
|
2794
3288
|
setup(t) {
|
|
2795
|
-
const e =
|
|
2796
|
-
return (n, o) => (
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
class:
|
|
3289
|
+
const e = Lo();
|
|
3290
|
+
return (n, o) => (J(), Ae("div", Pc, [
|
|
3291
|
+
j("header", null, [
|
|
3292
|
+
j("div", {
|
|
3293
|
+
class: ke([
|
|
2800
3294
|
"sf-layout-menu-toggler",
|
|
2801
|
-
{ invert:
|
|
3295
|
+
{ invert: He(e).IsVisible }
|
|
2802
3296
|
]),
|
|
2803
|
-
onClick: o[0] || (o[0] = (i) =>
|
|
3297
|
+
onClick: o[0] || (o[0] = (i) => He(e).Toggle())
|
|
2804
3298
|
}, [
|
|
2805
|
-
|
|
2806
|
-
|
|
3299
|
+
Rc,
|
|
3300
|
+
wt(Ec)
|
|
2807
3301
|
], 2),
|
|
2808
|
-
|
|
2809
|
-
|
|
3302
|
+
j("div", Oc, [
|
|
3303
|
+
De(n.$slots, "title")
|
|
2810
3304
|
]),
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
3305
|
+
De(n.$slots, "action"),
|
|
3306
|
+
wt(Ic),
|
|
3307
|
+
wt(wc)
|
|
2814
3308
|
]),
|
|
2815
|
-
|
|
2816
|
-
class:
|
|
3309
|
+
j("nav", {
|
|
3310
|
+
class: ke({ visible: He(e).IsVisible })
|
|
2817
3311
|
}, [
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
3312
|
+
j("div", Fc, [
|
|
3313
|
+
Bc,
|
|
3314
|
+
wt(jt, {
|
|
2821
3315
|
icone: "close",
|
|
2822
3316
|
button: "",
|
|
2823
|
-
onClick: o[1] || (o[1] = (i) =>
|
|
3317
|
+
onClick: o[1] || (o[1] = (i) => He(e).Close())
|
|
2824
3318
|
})
|
|
2825
3319
|
]),
|
|
2826
|
-
|
|
2827
|
-
|
|
3320
|
+
j("div", Mc, [
|
|
3321
|
+
De(n.$slots, "menu")
|
|
2828
3322
|
])
|
|
2829
3323
|
], 2),
|
|
2830
|
-
|
|
2831
|
-
class:
|
|
3324
|
+
j("main", {
|
|
3325
|
+
class: ke({ "menu-visible": He(e).IsVisible })
|
|
2832
3326
|
}, [
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
3327
|
+
Uc,
|
|
3328
|
+
j("section", Dc, [
|
|
3329
|
+
De(n.$slots, "content")
|
|
2836
3330
|
])
|
|
2837
3331
|
], 2)
|
|
2838
3332
|
]));
|
|
2839
3333
|
}
|
|
2840
|
-
}),
|
|
3334
|
+
}), Nc = ["href", "data-active", "onClick"], $c = { class: "sf-navmenulink-text" }, el = /* @__PURE__ */ $e({
|
|
2841
3335
|
__name: "NavMenuLink",
|
|
2842
3336
|
props: {
|
|
2843
3337
|
href: {},
|
|
@@ -2846,57 +3340,57 @@ const St = (() => new _i())(), Ei = /* @__PURE__ */ zn('<svg xmlns="http://www.w
|
|
|
2846
3340
|
exact: { type: Boolean }
|
|
2847
3341
|
},
|
|
2848
3342
|
setup(t) {
|
|
2849
|
-
const e = t, n =
|
|
3343
|
+
const e = t, n = Lo();
|
|
2850
3344
|
function o(i, c) {
|
|
2851
3345
|
i.preventDefault();
|
|
2852
|
-
const
|
|
2853
|
-
c(),
|
|
3346
|
+
const L = i.target.closest(".sf-layout-nav-content");
|
|
3347
|
+
c(), L && L.clientWidth + 10 > document.body.clientWidth && n.Close();
|
|
2854
3348
|
}
|
|
2855
3349
|
return (i, c) => {
|
|
2856
|
-
const x =
|
|
2857
|
-
return
|
|
3350
|
+
const x = Eo("router-link");
|
|
3351
|
+
return J(), lt(x, {
|
|
2858
3352
|
to: e.href,
|
|
2859
3353
|
custom: ""
|
|
2860
3354
|
}, {
|
|
2861
|
-
default:
|
|
2862
|
-
|
|
3355
|
+
default: To(({ href: L, navigate: u, isExactActive: H, isActive: W }) => [
|
|
3356
|
+
j("a", {
|
|
2863
3357
|
class: "sf-navmenulink",
|
|
2864
|
-
href:
|
|
2865
|
-
"data-active": e.exact ?
|
|
2866
|
-
onClick: (
|
|
3358
|
+
href: L,
|
|
3359
|
+
"data-active": e.exact ? H : W,
|
|
3360
|
+
onClick: (Q) => o(Q, u)
|
|
2867
3361
|
}, [
|
|
2868
|
-
e.icon ? (
|
|
3362
|
+
e.icon ? (J(), lt(jt, {
|
|
2869
3363
|
key: 0,
|
|
2870
3364
|
icone: e.icon,
|
|
2871
3365
|
"button-props": { tabindex: -1 }
|
|
2872
|
-
}, null, 8, ["icone"])) :
|
|
2873
|
-
|
|
2874
|
-
], 8,
|
|
3366
|
+
}, null, 8, ["icone"])) : Cn("", !0),
|
|
3367
|
+
j("span", $c, Wt(e.text), 1)
|
|
3368
|
+
], 8, Nc)
|
|
2875
3369
|
]),
|
|
2876
3370
|
_: 1
|
|
2877
3371
|
}, 8, ["to"]);
|
|
2878
3372
|
};
|
|
2879
3373
|
}
|
|
2880
|
-
}),
|
|
3374
|
+
}), Hc = /* @__PURE__ */ $e({
|
|
2881
3375
|
__name: "ScrollToTop",
|
|
2882
3376
|
setup(t) {
|
|
2883
|
-
const e =
|
|
3377
|
+
const e = _t(!1), n = `--${+/* @__PURE__ */ new Date()}`;
|
|
2884
3378
|
let o = null;
|
|
2885
3379
|
function i() {
|
|
2886
3380
|
o == null || o.scrollTo(0, 0);
|
|
2887
3381
|
}
|
|
2888
|
-
return
|
|
3382
|
+
return So(() => {
|
|
2889
3383
|
var c;
|
|
2890
3384
|
o = ((c = document.getElementById(n)) == null ? void 0 : c.parentElement) ?? null, o && o.addEventListener("scroll", function() {
|
|
2891
3385
|
e.value = this.scrollTop - this.clientHeight > 0;
|
|
2892
3386
|
});
|
|
2893
|
-
}), (c, x) => (
|
|
3387
|
+
}), (c, x) => (J(), Ae("button", {
|
|
2894
3388
|
id: n,
|
|
2895
|
-
class:
|
|
3389
|
+
class: ke(["sf-scrollToTop", { "sf-scrollToTop-visible": e.value }]),
|
|
2896
3390
|
onClick: i
|
|
2897
3391
|
}, null, 2));
|
|
2898
3392
|
}
|
|
2899
|
-
}),
|
|
3393
|
+
}), tl = /* @__PURE__ */ $e({
|
|
2900
3394
|
__name: "Content",
|
|
2901
3395
|
props: {
|
|
2902
3396
|
class: {},
|
|
@@ -2908,40 +3402,40 @@ const St = (() => new _i())(), Ei = /* @__PURE__ */ zn('<svg xmlns="http://www.w
|
|
|
2908
3402
|
setup(t) {
|
|
2909
3403
|
const e = t;
|
|
2910
3404
|
function n() {
|
|
2911
|
-
return new
|
|
3405
|
+
return new st("sf-content").AddClass(e.class, !!e.class).Build();
|
|
2912
3406
|
}
|
|
2913
3407
|
function o() {
|
|
2914
|
-
return new
|
|
3408
|
+
return new st("sf-content-body").AddClass("sf-content-no-padding", e.disableBodyPadding).Build();
|
|
2915
3409
|
}
|
|
2916
3410
|
function i() {
|
|
2917
|
-
return new
|
|
3411
|
+
return new st("sf-content-header").AddClass("sf-content-no-padding", e.disableHeaderPadding).Build();
|
|
2918
3412
|
}
|
|
2919
3413
|
function c() {
|
|
2920
|
-
return new
|
|
3414
|
+
return new st("sf-content-footer").AddClass("sf-content-no-padding", e.disableFooterPadding).Build();
|
|
2921
3415
|
}
|
|
2922
|
-
return (x,
|
|
2923
|
-
class:
|
|
2924
|
-
style:
|
|
3416
|
+
return (x, L) => (J(), Ae("div", {
|
|
3417
|
+
class: ke(n()),
|
|
3418
|
+
style: xn(e.style)
|
|
2925
3419
|
}, [
|
|
2926
|
-
|
|
2927
|
-
class:
|
|
3420
|
+
j("div", {
|
|
3421
|
+
class: ke(i())
|
|
2928
3422
|
}, [
|
|
2929
|
-
|
|
3423
|
+
De(x.$slots, "header")
|
|
2930
3424
|
], 2),
|
|
2931
|
-
|
|
2932
|
-
class:
|
|
3425
|
+
j("div", {
|
|
3426
|
+
class: ke(o())
|
|
2933
3427
|
}, [
|
|
2934
|
-
|
|
2935
|
-
|
|
3428
|
+
De(x.$slots, "default"),
|
|
3429
|
+
wt(Hc)
|
|
2936
3430
|
], 2),
|
|
2937
|
-
|
|
2938
|
-
class:
|
|
3431
|
+
j("div", {
|
|
3432
|
+
class: ke(c())
|
|
2939
3433
|
}, [
|
|
2940
|
-
|
|
3434
|
+
De(x.$slots, "footer")
|
|
2941
3435
|
], 2)
|
|
2942
3436
|
], 6));
|
|
2943
3437
|
}
|
|
2944
|
-
}),
|
|
3438
|
+
}), jc = { class: "sf-tab-navigation" }, zc = /* @__PURE__ */ j("svg", {
|
|
2945
3439
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2946
3440
|
fill: "none",
|
|
2947
3441
|
viewBox: "0 0 24 24",
|
|
@@ -2949,14 +3443,14 @@ const St = (() => new _i())(), Ei = /* @__PURE__ */ zn('<svg xmlns="http://www.w
|
|
|
2949
3443
|
stroke: "currentColor",
|
|
2950
3444
|
class: "w-6 h-6"
|
|
2951
3445
|
}, [
|
|
2952
|
-
/* @__PURE__ */
|
|
3446
|
+
/* @__PURE__ */ j("path", {
|
|
2953
3447
|
"stroke-linecap": "round",
|
|
2954
3448
|
"stroke-linejoin": "round",
|
|
2955
3449
|
d: "M15.75 19.5L8.25 12l7.5-7.5"
|
|
2956
3450
|
})
|
|
2957
|
-
], -1),
|
|
2958
|
-
|
|
2959
|
-
],
|
|
3451
|
+
], -1), Vc = [
|
|
3452
|
+
zc
|
|
3453
|
+
], Wc = ["data-active"], qc = ["href", "onClick"], Kc = /* @__PURE__ */ j("svg", {
|
|
2960
3454
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2961
3455
|
fill: "none",
|
|
2962
3456
|
viewBox: "0 0 24 24",
|
|
@@ -2964,82 +3458,82 @@ const St = (() => new _i())(), Ei = /* @__PURE__ */ zn('<svg xmlns="http://www.w
|
|
|
2964
3458
|
stroke: "currentColor",
|
|
2965
3459
|
class: "w-6 h-6"
|
|
2966
3460
|
}, [
|
|
2967
|
-
/* @__PURE__ */
|
|
3461
|
+
/* @__PURE__ */ j("path", {
|
|
2968
3462
|
"stroke-linecap": "round",
|
|
2969
3463
|
"stroke-linejoin": "round",
|
|
2970
3464
|
d: "M8.25 4.5l7.5 7.5-7.5 7.5"
|
|
2971
3465
|
})
|
|
2972
|
-
], -1),
|
|
2973
|
-
|
|
2974
|
-
],
|
|
3466
|
+
], -1), Gc = [
|
|
3467
|
+
Kc
|
|
3468
|
+
], nl = /* @__PURE__ */ $e({
|
|
2975
3469
|
__name: "TabNavigation",
|
|
2976
3470
|
props: {
|
|
2977
3471
|
tabs: {}
|
|
2978
3472
|
},
|
|
2979
3473
|
setup(t) {
|
|
2980
|
-
const e = t, n =
|
|
2981
|
-
|
|
2982
|
-
}), i =
|
|
2983
|
-
function x(
|
|
2984
|
-
const
|
|
2985
|
-
n.value.scrollLeft +=
|
|
3474
|
+
const e = t, n = _t(null), o = new ResizeObserver((u) => {
|
|
3475
|
+
L();
|
|
3476
|
+
}), i = _t(!1), c = _t(!1);
|
|
3477
|
+
function x(u = !1) {
|
|
3478
|
+
const H = n.value.clientWidth;
|
|
3479
|
+
n.value.scrollLeft += u ? -H : H;
|
|
2986
3480
|
}
|
|
2987
|
-
function
|
|
2988
|
-
const
|
|
2989
|
-
i.value = n.value.scrollLeft > 10, c.value = n.value.scrollLeft <
|
|
3481
|
+
function L() {
|
|
3482
|
+
const u = n.value.scrollWidth - n.value.clientWidth;
|
|
3483
|
+
i.value = n.value.scrollLeft > 10, c.value = n.value.scrollLeft < u - 10;
|
|
2990
3484
|
}
|
|
2991
|
-
return
|
|
2992
|
-
n.value.addEventListener("scroll",
|
|
2993
|
-
}),
|
|
2994
|
-
var
|
|
3485
|
+
return So(() => {
|
|
3486
|
+
n.value.addEventListener("scroll", L), o.observe(n.value);
|
|
3487
|
+
}), Pr(() => {
|
|
3488
|
+
var u;
|
|
2995
3489
|
try {
|
|
2996
|
-
(
|
|
3490
|
+
(u = n.value) == null || u.removeEventListener(
|
|
2997
3491
|
"scroll",
|
|
2998
|
-
|
|
3492
|
+
L
|
|
2999
3493
|
), o.unobserve(n.value), o.disconnect();
|
|
3000
3494
|
} catch {
|
|
3001
3495
|
}
|
|
3002
|
-
}), (
|
|
3003
|
-
const
|
|
3004
|
-
return
|
|
3005
|
-
|
|
3006
|
-
class:
|
|
3007
|
-
onClick:
|
|
3008
|
-
},
|
|
3009
|
-
|
|
3496
|
+
}), (u, H) => {
|
|
3497
|
+
const W = Eo("RouterLink");
|
|
3498
|
+
return J(), Ae("div", jc, [
|
|
3499
|
+
j("div", {
|
|
3500
|
+
class: ke(["left-arrow", { active: i.value }]),
|
|
3501
|
+
onClick: H[0] || (H[0] = (Q) => x(!0))
|
|
3502
|
+
}, Vc, 2),
|
|
3503
|
+
j("ul", {
|
|
3010
3504
|
ref_key: "trackerContainer",
|
|
3011
3505
|
ref: n
|
|
3012
3506
|
}, [
|
|
3013
|
-
(
|
|
3014
|
-
to:
|
|
3507
|
+
(J(!0), Ae(Co, null, Rr(e.tabs, (Q) => (J(), lt(W, {
|
|
3508
|
+
to: Q.route,
|
|
3015
3509
|
custom: !0
|
|
3016
3510
|
}, {
|
|
3017
|
-
default:
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
item:
|
|
3021
|
-
navigate:
|
|
3022
|
-
isActive:
|
|
3511
|
+
default: To(({ navigate: Le, isActive: z }) => [
|
|
3512
|
+
j("li", { "data-active": z }, [
|
|
3513
|
+
De(u.$slots, "item", {
|
|
3514
|
+
item: Q,
|
|
3515
|
+
navigate: Le,
|
|
3516
|
+
isActive: z
|
|
3023
3517
|
}, () => [
|
|
3024
|
-
|
|
3025
|
-
href:
|
|
3026
|
-
class:
|
|
3027
|
-
onClick:
|
|
3028
|
-
},
|
|
3518
|
+
j("a", {
|
|
3519
|
+
href: Q.route,
|
|
3520
|
+
class: ke({ active: z }),
|
|
3521
|
+
onClick: Le
|
|
3522
|
+
}, Wt(Q.text), 11, qc)
|
|
3029
3523
|
])
|
|
3030
|
-
], 8,
|
|
3524
|
+
], 8, Wc)
|
|
3031
3525
|
]),
|
|
3032
3526
|
_: 2
|
|
3033
3527
|
}, 1032, ["to"]))), 256))
|
|
3034
3528
|
], 512),
|
|
3035
|
-
|
|
3036
|
-
class:
|
|
3037
|
-
onClick:
|
|
3038
|
-
},
|
|
3529
|
+
j("div", {
|
|
3530
|
+
class: ke(["right-arrow", { active: c.value }]),
|
|
3531
|
+
onClick: H[1] || (H[1] = (Q) => x())
|
|
3532
|
+
}, Gc, 2)
|
|
3039
3533
|
]);
|
|
3040
3534
|
};
|
|
3041
3535
|
}
|
|
3042
|
-
}),
|
|
3536
|
+
}), Yc = ["id", "name", "disabled", "data-color", "form", "type"], Jc = { class: "sf-button-label" }, ol = /* @__PURE__ */ $e({
|
|
3043
3537
|
__name: "Button",
|
|
3044
3538
|
props: {
|
|
3045
3539
|
icon: {},
|
|
@@ -3061,40 +3555,40 @@ const St = (() => new _i())(), Ei = /* @__PURE__ */ zn('<svg xmlns="http://www.w
|
|
|
3061
3555
|
setup(t) {
|
|
3062
3556
|
const e = t;
|
|
3063
3557
|
function n() {
|
|
3064
|
-
return new
|
|
3558
|
+
return new st(`${e.class ?? ""} sf-button`).AddClass("sf-component-loading", e.loading).AddClass("sf-component-disabled", e.disabled).AddClass("sf-button-small", e.size === "sm").AddClass("sf-button-medium", e.size === "md").AddClass("sf-button-large", e.size === "lg").AddClass("sf-button-filled", e.variant === "filled").AddClass("sf-button-text", e.variant === "text").AddClass("sf-button-outlined", e.variant === "outlined").AddClass("sf-button-with-icon", !!e.icon).AddClass("sf-ripple").Build();
|
|
3065
3559
|
}
|
|
3066
|
-
return (o, i) => (
|
|
3560
|
+
return (o, i) => (J(), Ae("button", {
|
|
3067
3561
|
id: e.id,
|
|
3068
3562
|
name: e.name,
|
|
3069
|
-
class:
|
|
3070
|
-
style:
|
|
3563
|
+
class: ke(n()),
|
|
3564
|
+
style: xn(e.style),
|
|
3071
3565
|
disabled: e.disabled || e.loading,
|
|
3072
3566
|
"data-color": e.color,
|
|
3073
3567
|
form: e.form,
|
|
3074
3568
|
type: e.type
|
|
3075
3569
|
}, [
|
|
3076
|
-
e.icon ? (
|
|
3570
|
+
e.icon ? (J(), lt(jt, {
|
|
3077
3571
|
key: 0,
|
|
3078
3572
|
icone: e.icon,
|
|
3079
3573
|
loading: e.loading,
|
|
3080
3574
|
size: e.size,
|
|
3081
3575
|
"button-props": { tabindex: -1 }
|
|
3082
|
-
}, null, 8, ["icone", "loading", "size"])) : e.loading ? (
|
|
3576
|
+
}, null, 8, ["icone", "loading", "size"])) : e.loading ? (J(), lt(jt, {
|
|
3083
3577
|
key: 1,
|
|
3084
3578
|
loading: !0,
|
|
3085
3579
|
size: e.size,
|
|
3086
3580
|
"button-props": { tabindex: -1 }
|
|
3087
|
-
}, null, 8, ["size"])) :
|
|
3088
|
-
|
|
3089
|
-
|
|
3581
|
+
}, null, 8, ["size"])) : Cn("", !0),
|
|
3582
|
+
j("span", Jc, [
|
|
3583
|
+
De(o.$slots, "default")
|
|
3090
3584
|
])
|
|
3091
|
-
], 14,
|
|
3585
|
+
], 14, Yc));
|
|
3092
3586
|
}
|
|
3093
3587
|
});
|
|
3094
|
-
class
|
|
3588
|
+
class rl {
|
|
3095
3589
|
constructor(e = null) {
|
|
3096
|
-
|
|
3097
|
-
|
|
3590
|
+
gt(this, "errors", []);
|
|
3591
|
+
gt(this, "_value", null);
|
|
3098
3592
|
this._value = e;
|
|
3099
3593
|
}
|
|
3100
3594
|
get value() {
|
|
@@ -3115,7 +3609,7 @@ class oa {
|
|
|
3115
3609
|
}
|
|
3116
3610
|
(() => {
|
|
3117
3611
|
function t() {
|
|
3118
|
-
|
|
3612
|
+
Or(() => {
|
|
3119
3613
|
setTimeout(() => {
|
|
3120
3614
|
var n;
|
|
3121
3615
|
const e = document.querySelector(":root");
|
|
@@ -3129,19 +3623,19 @@ class oa {
|
|
|
3129
3623
|
}
|
|
3130
3624
|
t(), window.addEventListener("resize", t);
|
|
3131
3625
|
})();
|
|
3132
|
-
|
|
3626
|
+
_n.SetInitialTheme();
|
|
3133
3627
|
export {
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3628
|
+
rl as AppResult,
|
|
3629
|
+
le as AuthService,
|
|
3630
|
+
Io as Cor,
|
|
3631
|
+
ol as SfButton,
|
|
3632
|
+
tl as SfContent,
|
|
3633
|
+
jt as SfIcon,
|
|
3634
|
+
Qc as SfLayout,
|
|
3635
|
+
el as SfNavMenuLink,
|
|
3636
|
+
nl as SfTabNavigation,
|
|
3637
|
+
kt as Tamanho,
|
|
3638
|
+
vc as UseDialogService,
|
|
3639
|
+
Lo as UseNavMenuService
|
|
3146
3640
|
};
|
|
3147
3641
|
//# sourceMappingURL=lib.es.js.map
|