siteguide.js 0.9.2 → 0.9.4
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/css/siteguide.css +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +371 -353
- package/package.json +71 -71
package/dist/index.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var St = Object.prototype.hasOwnProperty,
|
|
5
|
-
var
|
|
1
|
+
var Kt = Object.defineProperty, Xt = Object.defineProperties;
|
|
2
|
+
var Gt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var ot = Object.getOwnPropertySymbols;
|
|
4
|
+
var St = Object.prototype.hasOwnProperty, Et = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Pt = Math.pow, ut = (e, t, i) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, $ = (e, t) => {
|
|
6
6
|
for (var i in t || (t = {}))
|
|
7
7
|
St.call(t, i) && ut(e, i, t[i]);
|
|
8
|
-
if (
|
|
9
|
-
for (var i of
|
|
10
|
-
|
|
8
|
+
if (ot)
|
|
9
|
+
for (var i of ot(t))
|
|
10
|
+
Et.call(t, i) && ut(e, i, t[i]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, Z = (e, t) => Xt(e, Gt(t));
|
|
13
|
+
var Tt = (e, t) => {
|
|
14
14
|
var i = {};
|
|
15
15
|
for (var n in e)
|
|
16
16
|
St.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var n of
|
|
19
|
-
t.indexOf(n) < 0 &&
|
|
17
|
+
if (e != null && ot)
|
|
18
|
+
for (var n of ot(e))
|
|
19
|
+
t.indexOf(n) < 0 && Et.call(e, n) && (i[n] = e[n]);
|
|
20
20
|
return i;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
var
|
|
22
|
+
var x = (e, t, i) => ut(e, typeof t != "symbol" ? t + "" : t, i);
|
|
23
|
+
var A = (e, t, i) => new Promise((n, o) => {
|
|
24
24
|
var s = (a) => {
|
|
25
25
|
try {
|
|
26
26
|
c(i.next(a));
|
|
@@ -36,71 +36,71 @@ var k = (e, t, i) => new Promise((n, o) => {
|
|
|
36
36
|
}, c = (a) => a.done ? n(a.value) : Promise.resolve(a.value).then(s, r);
|
|
37
37
|
c((i = i.apply(e, t)).next());
|
|
38
38
|
});
|
|
39
|
-
const
|
|
39
|
+
const Jt = ["top", "right", "bottom", "left"], Lt = ["start", "end"], Rt = /* @__PURE__ */ Jt.reduce((e, t) => e.concat(t, t + "-" + Lt[0], t + "-" + Lt[1]), []), tt = Math.min, X = Math.max, rt = Math.round, N = (e) => ({
|
|
40
40
|
x: e,
|
|
41
41
|
y: e
|
|
42
|
-
}),
|
|
42
|
+
}), Qt = {
|
|
43
43
|
left: "right",
|
|
44
44
|
right: "left",
|
|
45
45
|
bottom: "top",
|
|
46
46
|
top: "bottom"
|
|
47
|
-
},
|
|
47
|
+
}, Zt = {
|
|
48
48
|
start: "end",
|
|
49
49
|
end: "start"
|
|
50
50
|
};
|
|
51
|
-
function
|
|
52
|
-
return
|
|
51
|
+
function te(e, t, i) {
|
|
52
|
+
return X(e, tt(t, i));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function lt(e, t) {
|
|
55
55
|
return typeof e == "function" ? e(t) : e;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function it(e) {
|
|
58
58
|
return e.split("-")[0];
|
|
59
59
|
}
|
|
60
60
|
function V(e) {
|
|
61
61
|
return e.split("-")[1];
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function ee(e) {
|
|
64
64
|
return e === "x" ? "y" : "x";
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function yt(e) {
|
|
67
67
|
return e === "y" ? "height" : "width";
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return ["top", "bottom"].includes(
|
|
69
|
+
function xt(e) {
|
|
70
|
+
return ["top", "bottom"].includes(it(e)) ? "y" : "x";
|
|
71
71
|
}
|
|
72
72
|
function wt(e) {
|
|
73
|
-
return
|
|
73
|
+
return ee(xt(e));
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function ie(e, t, i) {
|
|
76
76
|
i === void 0 && (i = !1);
|
|
77
|
-
const n = V(e), o = wt(e), s =
|
|
77
|
+
const n = V(e), o = wt(e), s = yt(o);
|
|
78
78
|
let r = o === "x" ? n === (i ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
79
|
-
return t.reference[s] > t.floating[s] && (r =
|
|
79
|
+
return t.reference[s] > t.floating[s] && (r = Ot(r)), [r, Ot(r)];
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
return e.replace(/start|end/g, (t) =>
|
|
81
|
+
function ne(e) {
|
|
82
|
+
return e.replace(/start|end/g, (t) => Zt[t]);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
84
|
+
function Ot(e) {
|
|
85
|
+
return e.replace(/left|right|bottom|top/g, (t) => Qt[t]);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
87
|
+
function oe(e) {
|
|
88
|
+
return $({
|
|
89
89
|
top: 0,
|
|
90
90
|
right: 0,
|
|
91
91
|
bottom: 0,
|
|
92
92
|
left: 0
|
|
93
93
|
}, e);
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
return typeof e != "number" ?
|
|
95
|
+
function Ht(e) {
|
|
96
|
+
return typeof e != "number" ? oe(e) : {
|
|
97
97
|
top: e,
|
|
98
98
|
right: e,
|
|
99
99
|
bottom: e,
|
|
100
100
|
left: e
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function ct(e) {
|
|
104
104
|
const {
|
|
105
105
|
x: t,
|
|
106
106
|
y: i,
|
|
@@ -118,36 +118,36 @@ function rt(e) {
|
|
|
118
118
|
y: i
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function kt(e, t, i) {
|
|
122
122
|
let {
|
|
123
123
|
reference: n,
|
|
124
124
|
floating: o
|
|
125
125
|
} = e;
|
|
126
|
-
const s =
|
|
126
|
+
const s = xt(t), r = wt(t), c = yt(r), a = it(t), l = s === "y", f = n.x + n.width / 2 - o.width / 2, h = n.y + n.height / 2 - o.height / 2, g = n[c] / 2 - o[c] / 2;
|
|
127
127
|
let u;
|
|
128
128
|
switch (a) {
|
|
129
129
|
case "top":
|
|
130
130
|
u = {
|
|
131
|
-
x:
|
|
131
|
+
x: f,
|
|
132
132
|
y: n.y - o.height
|
|
133
133
|
};
|
|
134
134
|
break;
|
|
135
135
|
case "bottom":
|
|
136
136
|
u = {
|
|
137
|
-
x:
|
|
137
|
+
x: f,
|
|
138
138
|
y: n.y + n.height
|
|
139
139
|
};
|
|
140
140
|
break;
|
|
141
141
|
case "right":
|
|
142
142
|
u = {
|
|
143
143
|
x: n.x + n.width,
|
|
144
|
-
y:
|
|
144
|
+
y: h
|
|
145
145
|
};
|
|
146
146
|
break;
|
|
147
147
|
case "left":
|
|
148
148
|
u = {
|
|
149
149
|
x: n.x - o.width,
|
|
150
|
-
y:
|
|
150
|
+
y: h
|
|
151
151
|
};
|
|
152
152
|
break;
|
|
153
153
|
default:
|
|
@@ -166,7 +166,7 @@ function $t(e, t, i) {
|
|
|
166
166
|
}
|
|
167
167
|
return u;
|
|
168
168
|
}
|
|
169
|
-
const
|
|
169
|
+
const se = (e, t, i) => A(void 0, null, function* () {
|
|
170
170
|
const {
|
|
171
171
|
placement: n = "bottom",
|
|
172
172
|
strategy: o = "absolute",
|
|
@@ -178,21 +178,21 @@ const oe = (e, t, i) => k(void 0, null, function* () {
|
|
|
178
178
|
floating: t,
|
|
179
179
|
strategy: o
|
|
180
180
|
}), {
|
|
181
|
-
x:
|
|
182
|
-
y:
|
|
183
|
-
} =
|
|
181
|
+
x: f,
|
|
182
|
+
y: h
|
|
183
|
+
} = kt(l, n, a), g = n, u = {}, d = 0;
|
|
184
184
|
for (let p = 0; p < c.length; p++) {
|
|
185
185
|
const {
|
|
186
186
|
name: m,
|
|
187
|
-
fn:
|
|
187
|
+
fn: y
|
|
188
188
|
} = c[p], {
|
|
189
189
|
x: _,
|
|
190
|
-
y:
|
|
191
|
-
data:
|
|
192
|
-
reset:
|
|
193
|
-
} = yield
|
|
194
|
-
x:
|
|
195
|
-
y:
|
|
190
|
+
y: b,
|
|
191
|
+
data: S,
|
|
192
|
+
reset: v
|
|
193
|
+
} = yield y({
|
|
194
|
+
x: f,
|
|
195
|
+
y: h,
|
|
196
196
|
initialPlacement: n,
|
|
197
197
|
placement: g,
|
|
198
198
|
strategy: o,
|
|
@@ -204,27 +204,27 @@ const oe = (e, t, i) => k(void 0, null, function* () {
|
|
|
204
204
|
floating: t
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
|
-
|
|
208
|
-
[m]:
|
|
209
|
-
}),
|
|
207
|
+
f = _ != null ? _ : f, h = b != null ? b : h, u = Z($({}, u), {
|
|
208
|
+
[m]: $($({}, u[m]), S)
|
|
209
|
+
}), v && d <= 50 && (d++, typeof v == "object" && (v.placement && (g = v.placement), v.rects && (l = v.rects === !0 ? yield r.getElementRects({
|
|
210
210
|
reference: e,
|
|
211
211
|
floating: t,
|
|
212
212
|
strategy: o
|
|
213
|
-
}) :
|
|
214
|
-
x:
|
|
215
|
-
y:
|
|
216
|
-
} =
|
|
213
|
+
}) : v.rects), {
|
|
214
|
+
x: f,
|
|
215
|
+
y: h
|
|
216
|
+
} = kt(l, g, a)), p = -1);
|
|
217
217
|
}
|
|
218
218
|
return {
|
|
219
|
-
x:
|
|
220
|
-
y:
|
|
219
|
+
x: f,
|
|
220
|
+
y: h,
|
|
221
221
|
placement: g,
|
|
222
222
|
strategy: o,
|
|
223
223
|
middlewareData: u
|
|
224
224
|
};
|
|
225
225
|
});
|
|
226
|
-
function
|
|
227
|
-
return
|
|
226
|
+
function re(e, t) {
|
|
227
|
+
return A(this, null, function* () {
|
|
228
228
|
var i;
|
|
229
229
|
t === void 0 && (t = {});
|
|
230
230
|
const {
|
|
@@ -236,45 +236,45 @@ function se(e, t) {
|
|
|
236
236
|
strategy: a
|
|
237
237
|
} = e, {
|
|
238
238
|
boundary: l = "clippingAncestors",
|
|
239
|
-
rootBoundary:
|
|
240
|
-
elementContext:
|
|
239
|
+
rootBoundary: f = "viewport",
|
|
240
|
+
elementContext: h = "floating",
|
|
241
241
|
altBoundary: g = !1,
|
|
242
242
|
padding: u = 0
|
|
243
|
-
} =
|
|
243
|
+
} = lt(t, e), d = Ht(u), m = c[g ? h === "floating" ? "reference" : "floating" : h], y = ct(yield s.getClippingRect({
|
|
244
244
|
element: (i = yield s.isElement == null ? void 0 : s.isElement(m)) == null || i ? m : m.contextElement || (yield s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
245
245
|
boundary: l,
|
|
246
|
-
rootBoundary:
|
|
246
|
+
rootBoundary: f,
|
|
247
247
|
strategy: a
|
|
248
|
-
})), _ =
|
|
248
|
+
})), _ = h === "floating" ? {
|
|
249
249
|
x: n,
|
|
250
250
|
y: o,
|
|
251
251
|
width: r.floating.width,
|
|
252
252
|
height: r.floating.height
|
|
253
|
-
} : r.reference,
|
|
253
|
+
} : r.reference, b = yield s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating), S = (yield s.isElement == null ? void 0 : s.isElement(b)) ? (yield s.getScale == null ? void 0 : s.getScale(b)) || {
|
|
254
254
|
x: 1,
|
|
255
255
|
y: 1
|
|
256
256
|
} : {
|
|
257
257
|
x: 1,
|
|
258
258
|
y: 1
|
|
259
|
-
},
|
|
259
|
+
}, v = ct(s.convertOffsetParentRelativeRectToViewportRelativeRect ? yield s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
260
260
|
elements: c,
|
|
261
261
|
rect: _,
|
|
262
|
-
offsetParent:
|
|
262
|
+
offsetParent: b,
|
|
263
263
|
strategy: a
|
|
264
264
|
}) : _);
|
|
265
265
|
return {
|
|
266
|
-
top: (
|
|
267
|
-
bottom: (
|
|
268
|
-
left: (
|
|
269
|
-
right: (
|
|
266
|
+
top: (y.top - v.top + d.top) / S.y,
|
|
267
|
+
bottom: (v.bottom - y.bottom + d.bottom) / S.y,
|
|
268
|
+
left: (y.left - v.left + d.left) / S.x,
|
|
269
|
+
right: (v.right - y.right + d.right) / S.x
|
|
270
270
|
};
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
const
|
|
273
|
+
const ce = (e) => ({
|
|
274
274
|
name: "arrow",
|
|
275
275
|
options: e,
|
|
276
276
|
fn(i) {
|
|
277
|
-
return
|
|
277
|
+
return A(this, null, function* () {
|
|
278
278
|
const {
|
|
279
279
|
x: n,
|
|
280
280
|
y: o,
|
|
@@ -284,96 +284,96 @@ const re = (e) => ({
|
|
|
284
284
|
elements: a,
|
|
285
285
|
middlewareData: l
|
|
286
286
|
} = i, {
|
|
287
|
-
element:
|
|
288
|
-
padding:
|
|
289
|
-
} =
|
|
290
|
-
if (
|
|
287
|
+
element: f,
|
|
288
|
+
padding: h = 0
|
|
289
|
+
} = lt(e, i) || {};
|
|
290
|
+
if (f == null)
|
|
291
291
|
return {};
|
|
292
|
-
const g =
|
|
292
|
+
const g = Ht(h), u = {
|
|
293
293
|
x: n,
|
|
294
294
|
y: o
|
|
295
|
-
}, d = wt(s), p =
|
|
296
|
-
let
|
|
297
|
-
(!
|
|
298
|
-
const W =
|
|
295
|
+
}, d = wt(s), p = yt(d), m = yield c.getDimensions(f), y = d === "y", _ = y ? "top" : "left", b = y ? "bottom" : "right", S = y ? "clientHeight" : "clientWidth", v = r.reference[p] + r.reference[d] - u[d] - r.floating[p], w = u[d] - r.reference[d], P = yield c.getOffsetParent == null ? void 0 : c.getOffsetParent(f);
|
|
296
|
+
let T = P ? P[S] : 0;
|
|
297
|
+
(!T || !(yield c.isElement == null ? void 0 : c.isElement(P))) && (T = a.floating[S] || r.floating[p]);
|
|
298
|
+
const W = v / 2 - w / 2, M = T / 2 - m[p] / 2 - 1, I = tt(g[_], M), E = tt(g[b], M), R = I, Y = T - m[p] - E, k = T / 2 - m[p] / 2 + W, q = te(R, k, Y), U = !l.arrow && V(s) != null && k !== q && r.reference[p] / 2 - (k < R ? I : E) - m[p] / 2 < 0, K = U ? k < R ? k - R : k - Y : 0;
|
|
299
299
|
return {
|
|
300
|
-
[d]: u[d] +
|
|
301
|
-
data:
|
|
300
|
+
[d]: u[d] + K,
|
|
301
|
+
data: $({
|
|
302
302
|
[d]: q,
|
|
303
|
-
centerOffset:
|
|
304
|
-
},
|
|
305
|
-
alignmentOffset:
|
|
303
|
+
centerOffset: k - q - K
|
|
304
|
+
}, U && {
|
|
305
|
+
alignmentOffset: K
|
|
306
306
|
}),
|
|
307
|
-
reset:
|
|
307
|
+
reset: U
|
|
308
308
|
};
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
});
|
|
312
|
-
function
|
|
313
|
-
return (e ? [...i.filter((o) => V(o) === e), ...i.filter((o) => V(o) !== e)] : i.filter((o) =>
|
|
312
|
+
function le(e, t, i) {
|
|
313
|
+
return (e ? [...i.filter((o) => V(o) === e), ...i.filter((o) => V(o) !== e)] : i.filter((o) => it(o) === o)).filter((o) => e ? V(o) === e || (t ? ne(o) !== o : !1) : !0);
|
|
314
314
|
}
|
|
315
|
-
const
|
|
315
|
+
const ae = function(e) {
|
|
316
316
|
return e === void 0 && (e = {}), {
|
|
317
317
|
name: "autoPlacement",
|
|
318
318
|
options: e,
|
|
319
319
|
fn(i) {
|
|
320
|
-
return
|
|
320
|
+
return A(this, null, function* () {
|
|
321
321
|
var n, o, s;
|
|
322
322
|
const {
|
|
323
323
|
rects: r,
|
|
324
324
|
middlewareData: c,
|
|
325
325
|
placement: a,
|
|
326
326
|
platform: l,
|
|
327
|
-
elements:
|
|
328
|
-
} = i, I =
|
|
329
|
-
crossAxis:
|
|
327
|
+
elements: f
|
|
328
|
+
} = i, I = lt(e, i), {
|
|
329
|
+
crossAxis: h = !1,
|
|
330
330
|
alignment: g,
|
|
331
|
-
allowedPlacements: u =
|
|
331
|
+
allowedPlacements: u = Rt,
|
|
332
332
|
autoAlignment: d = !0
|
|
333
|
-
} = I, p =
|
|
333
|
+
} = I, p = Tt(I, [
|
|
334
334
|
"crossAxis",
|
|
335
335
|
"alignment",
|
|
336
336
|
"allowedPlacements",
|
|
337
337
|
"autoAlignment"
|
|
338
|
-
]), m = g !== void 0 || u ===
|
|
339
|
-
if (
|
|
338
|
+
]), m = g !== void 0 || u === Rt ? le(g || null, d, u) : u, y = yield re(i, p), _ = ((n = c.autoPlacement) == null ? void 0 : n.index) || 0, b = m[_];
|
|
339
|
+
if (b == null)
|
|
340
340
|
return {};
|
|
341
|
-
const
|
|
342
|
-
if (a !==
|
|
341
|
+
const S = ie(b, r, yield l.isRTL == null ? void 0 : l.isRTL(f.floating));
|
|
342
|
+
if (a !== b)
|
|
343
343
|
return {
|
|
344
344
|
reset: {
|
|
345
345
|
placement: m[0]
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
|
-
const
|
|
349
|
-
placement:
|
|
350
|
-
overflows:
|
|
351
|
-
}],
|
|
352
|
-
if (
|
|
348
|
+
const v = [y[it(b)], y[S[0]], y[S[1]]], w = [...((o = c.autoPlacement) == null ? void 0 : o.overflows) || [], {
|
|
349
|
+
placement: b,
|
|
350
|
+
overflows: v
|
|
351
|
+
}], P = m[_ + 1];
|
|
352
|
+
if (P)
|
|
353
353
|
return {
|
|
354
354
|
data: {
|
|
355
355
|
index: _ + 1,
|
|
356
356
|
overflows: w
|
|
357
357
|
},
|
|
358
358
|
reset: {
|
|
359
|
-
placement:
|
|
359
|
+
placement: P
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
|
-
const
|
|
363
|
-
const
|
|
364
|
-
return [
|
|
362
|
+
const T = w.map((E) => {
|
|
363
|
+
const R = V(E.placement);
|
|
364
|
+
return [E.placement, R && h ? (
|
|
365
365
|
// Check along the mainAxis and main crossAxis side.
|
|
366
|
-
|
|
366
|
+
E.overflows.slice(0, 2).reduce((Y, k) => Y + k, 0)
|
|
367
367
|
) : (
|
|
368
368
|
// Check only the mainAxis.
|
|
369
|
-
|
|
370
|
-
),
|
|
371
|
-
}).sort((
|
|
369
|
+
E.overflows[0]
|
|
370
|
+
), E.overflows];
|
|
371
|
+
}).sort((E, R) => E[1] - R[1]), M = ((s = T.filter((E) => E[2].slice(
|
|
372
372
|
0,
|
|
373
373
|
// Aligned placements should not check their opposite crossAxis
|
|
374
374
|
// side.
|
|
375
|
-
V(
|
|
376
|
-
).every((
|
|
375
|
+
V(E[0]) ? 2 : 3
|
|
376
|
+
).every((R) => R <= 0))[0]) == null ? void 0 : s[0]) || T[0][0];
|
|
377
377
|
return M !== a ? {
|
|
378
378
|
data: {
|
|
379
379
|
index: _ + 1,
|
|
@@ -387,32 +387,32 @@ const le = function(e) {
|
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
389
|
};
|
|
390
|
-
function
|
|
391
|
-
return
|
|
390
|
+
function he(e, t) {
|
|
391
|
+
return A(this, null, function* () {
|
|
392
392
|
const {
|
|
393
393
|
placement: i,
|
|
394
394
|
platform: n,
|
|
395
395
|
elements: o
|
|
396
|
-
} = e, s = yield n.isRTL == null ? void 0 : n.isRTL(o.floating), r =
|
|
396
|
+
} = e, s = yield n.isRTL == null ? void 0 : n.isRTL(o.floating), r = it(i), c = V(i), a = xt(i) === "y", l = ["left", "top"].includes(r) ? -1 : 1, f = s && a ? -1 : 1, h = lt(t, e);
|
|
397
397
|
let {
|
|
398
398
|
mainAxis: g,
|
|
399
399
|
crossAxis: u,
|
|
400
400
|
alignmentAxis: d
|
|
401
|
-
} = typeof
|
|
402
|
-
mainAxis:
|
|
401
|
+
} = typeof h == "number" ? {
|
|
402
|
+
mainAxis: h,
|
|
403
403
|
crossAxis: 0,
|
|
404
404
|
alignmentAxis: null
|
|
405
405
|
} : {
|
|
406
|
-
mainAxis:
|
|
407
|
-
crossAxis:
|
|
408
|
-
alignmentAxis:
|
|
406
|
+
mainAxis: h.mainAxis || 0,
|
|
407
|
+
crossAxis: h.crossAxis || 0,
|
|
408
|
+
alignmentAxis: h.alignmentAxis
|
|
409
409
|
};
|
|
410
410
|
return c && typeof d == "number" && (u = c === "end" ? d * -1 : d), a ? {
|
|
411
|
-
x: u *
|
|
411
|
+
x: u * f,
|
|
412
412
|
y: g * l
|
|
413
413
|
} : {
|
|
414
414
|
x: g * l,
|
|
415
|
-
y: u *
|
|
415
|
+
y: u * f
|
|
416
416
|
};
|
|
417
417
|
});
|
|
418
418
|
}
|
|
@@ -421,18 +421,18 @@ const fe = function(e) {
|
|
|
421
421
|
name: "offset",
|
|
422
422
|
options: e,
|
|
423
423
|
fn(i) {
|
|
424
|
-
return
|
|
424
|
+
return A(this, null, function* () {
|
|
425
425
|
var n, o;
|
|
426
426
|
const {
|
|
427
427
|
x: s,
|
|
428
428
|
y: r,
|
|
429
429
|
placement: c,
|
|
430
430
|
middlewareData: a
|
|
431
|
-
} = i, l = yield
|
|
431
|
+
} = i, l = yield he(i, e);
|
|
432
432
|
return c === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
433
433
|
x: s + l.x,
|
|
434
434
|
y: r + l.y,
|
|
435
|
-
data:
|
|
435
|
+
data: Z($({}, l), {
|
|
436
436
|
placement: c
|
|
437
437
|
})
|
|
438
438
|
};
|
|
@@ -440,45 +440,45 @@ const fe = function(e) {
|
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
442
|
};
|
|
443
|
-
function
|
|
443
|
+
function at() {
|
|
444
444
|
return typeof window != "undefined";
|
|
445
445
|
}
|
|
446
|
-
function
|
|
447
|
-
return
|
|
446
|
+
function Q(e) {
|
|
447
|
+
return Nt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function O(e) {
|
|
450
450
|
var t;
|
|
451
451
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
452
452
|
}
|
|
453
453
|
function z(e) {
|
|
454
454
|
var t;
|
|
455
|
-
return (t = (
|
|
455
|
+
return (t = (Nt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
458
|
-
return
|
|
457
|
+
function Nt(e) {
|
|
458
|
+
return at() ? e instanceof Node || e instanceof O(e).Node : !1;
|
|
459
459
|
}
|
|
460
460
|
function D(e) {
|
|
461
|
-
return
|
|
461
|
+
return at() ? e instanceof Element || e instanceof O(e).Element : !1;
|
|
462
462
|
}
|
|
463
463
|
function F(e) {
|
|
464
|
-
return
|
|
464
|
+
return at() ? e instanceof HTMLElement || e instanceof O(e).HTMLElement : !1;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
467
|
-
return !
|
|
466
|
+
function $t(e) {
|
|
467
|
+
return !at() || typeof ShadowRoot == "undefined" ? !1 : e instanceof ShadowRoot || e instanceof O(e).ShadowRoot;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function nt(e) {
|
|
470
470
|
const {
|
|
471
471
|
overflow: t,
|
|
472
472
|
overflowX: i,
|
|
473
473
|
overflowY: n,
|
|
474
474
|
display: o
|
|
475
|
-
} =
|
|
475
|
+
} = B(e);
|
|
476
476
|
return /auto|scroll|overlay|hidden|clip/.test(t + n + i) && !["inline", "contents"].includes(o);
|
|
477
477
|
}
|
|
478
|
-
function
|
|
479
|
-
return ["table", "td", "th"].includes(
|
|
478
|
+
function ue(e) {
|
|
479
|
+
return ["table", "td", "th"].includes(Q(e));
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function ht(e) {
|
|
482
482
|
return [":popover-open", ":modal"].some((t) => {
|
|
483
483
|
try {
|
|
484
484
|
return e.matches(t);
|
|
@@ -487,29 +487,29 @@ function at(e) {
|
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
const t =
|
|
490
|
+
function bt(e) {
|
|
491
|
+
const t = vt(), i = D(e) ? B(e) : e;
|
|
492
492
|
return i.transform !== "none" || i.perspective !== "none" || (i.containerType ? i.containerType !== "normal" : !1) || !t && (i.backdropFilter ? i.backdropFilter !== "none" : !1) || !t && (i.filter ? i.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((n) => (i.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (i.contain || "").includes(n));
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function de(e) {
|
|
495
495
|
let t = j(e);
|
|
496
|
-
for (; F(t) && !
|
|
497
|
-
if (
|
|
496
|
+
for (; F(t) && !J(t); ) {
|
|
497
|
+
if (bt(t))
|
|
498
498
|
return t;
|
|
499
|
-
if (
|
|
499
|
+
if (ht(t))
|
|
500
500
|
return null;
|
|
501
501
|
t = j(t);
|
|
502
502
|
}
|
|
503
503
|
return null;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function vt() {
|
|
506
506
|
return typeof CSS == "undefined" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
return ["html", "body", "#document"].includes(
|
|
508
|
+
function J(e) {
|
|
509
|
+
return ["html", "body", "#document"].includes(Q(e));
|
|
510
510
|
}
|
|
511
|
-
function
|
|
512
|
-
return
|
|
511
|
+
function B(e) {
|
|
512
|
+
return O(e).getComputedStyle(e);
|
|
513
513
|
}
|
|
514
514
|
function ft(e) {
|
|
515
515
|
return D(e) ? {
|
|
@@ -521,28 +521,28 @@ function ft(e) {
|
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
523
|
function j(e) {
|
|
524
|
-
if (
|
|
524
|
+
if (Q(e) === "html")
|
|
525
525
|
return e;
|
|
526
526
|
const t = (
|
|
527
527
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
528
528
|
e.assignedSlot || // DOM Element detected.
|
|
529
529
|
e.parentNode || // ShadowRoot detected.
|
|
530
|
-
|
|
530
|
+
$t(e) && e.host || // Fallback.
|
|
531
531
|
z(e)
|
|
532
532
|
);
|
|
533
|
-
return
|
|
533
|
+
return $t(t) ? t.host : t;
|
|
534
534
|
}
|
|
535
535
|
function Ft(e) {
|
|
536
536
|
const t = j(e);
|
|
537
|
-
return
|
|
537
|
+
return J(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : F(t) && nt(t) ? t : Ft(t);
|
|
538
538
|
}
|
|
539
539
|
function pt(e, t, i) {
|
|
540
540
|
var n;
|
|
541
541
|
t === void 0 && (t = []), i === void 0 && (i = !0);
|
|
542
|
-
const o = Ft(e), s = o === ((n = e.ownerDocument) == null ? void 0 : n.body), r =
|
|
542
|
+
const o = Ft(e), s = o === ((n = e.ownerDocument) == null ? void 0 : n.body), r = O(o);
|
|
543
543
|
if (s) {
|
|
544
544
|
const c = mt(r);
|
|
545
|
-
return t.concat(r, r.visualViewport || [],
|
|
545
|
+
return t.concat(r, r.visualViewport || [], nt(o) ? o : [], c && i ? pt(c) : []);
|
|
546
546
|
}
|
|
547
547
|
return t.concat(o, pt(o, [], i));
|
|
548
548
|
}
|
|
@@ -550,9 +550,9 @@ function mt(e) {
|
|
|
550
550
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
551
551
|
}
|
|
552
552
|
function Mt(e) {
|
|
553
|
-
const t =
|
|
553
|
+
const t = B(e);
|
|
554
554
|
let i = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
|
|
555
|
-
const o = F(e), s = o ? e.offsetWidth : i, r = o ? e.offsetHeight : n, c =
|
|
555
|
+
const o = F(e), s = o ? e.offsetWidth : i, r = o ? e.offsetHeight : n, c = rt(i) !== s || rt(n) !== r;
|
|
556
556
|
return c && (i = s, n = r), {
|
|
557
557
|
width: i,
|
|
558
558
|
height: n,
|
|
@@ -562,57 +562,57 @@ function Mt(e) {
|
|
|
562
562
|
function Vt(e) {
|
|
563
563
|
return D(e) ? e : e.contextElement;
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function G(e) {
|
|
566
566
|
const t = Vt(e);
|
|
567
567
|
if (!F(t))
|
|
568
|
-
return
|
|
568
|
+
return N(1);
|
|
569
569
|
const i = t.getBoundingClientRect(), {
|
|
570
570
|
width: n,
|
|
571
571
|
height: o,
|
|
572
572
|
$: s
|
|
573
573
|
} = Mt(t);
|
|
574
|
-
let r = (s ?
|
|
574
|
+
let r = (s ? rt(i.width) : i.width) / n, c = (s ? rt(i.height) : i.height) / o;
|
|
575
575
|
return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
576
576
|
x: r,
|
|
577
577
|
y: c
|
|
578
578
|
};
|
|
579
579
|
}
|
|
580
|
-
const
|
|
580
|
+
const ge = /* @__PURE__ */ N(0);
|
|
581
581
|
function zt(e) {
|
|
582
|
-
const t =
|
|
583
|
-
return !
|
|
582
|
+
const t = O(e);
|
|
583
|
+
return !vt() || !t.visualViewport ? ge : {
|
|
584
584
|
x: t.visualViewport.offsetLeft,
|
|
585
585
|
y: t.visualViewport.offsetTop
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
return t === void 0 && (t = !1), !i || t && i !==
|
|
588
|
+
function pe(e, t, i) {
|
|
589
|
+
return t === void 0 && (t = !1), !i || t && i !== O(e) ? !1 : t;
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function et(e, t, i, n) {
|
|
592
592
|
t === void 0 && (t = !1), i === void 0 && (i = !1);
|
|
593
593
|
const o = e.getBoundingClientRect(), s = Vt(e);
|
|
594
|
-
let r =
|
|
595
|
-
t && (n ? D(n) && (r =
|
|
596
|
-
const c =
|
|
597
|
-
let a = (o.left + c.x) / r.x, l = (o.top + c.y) / r.y,
|
|
594
|
+
let r = N(1);
|
|
595
|
+
t && (n ? D(n) && (r = G(n)) : r = G(e));
|
|
596
|
+
const c = pe(s, i, n) ? zt(s) : N(0);
|
|
597
|
+
let a = (o.left + c.x) / r.x, l = (o.top + c.y) / r.y, f = o.width / r.x, h = o.height / r.y;
|
|
598
598
|
if (s) {
|
|
599
|
-
const g =
|
|
599
|
+
const g = O(s), u = n && D(n) ? O(n) : n;
|
|
600
600
|
let d = g, p = mt(d);
|
|
601
601
|
for (; p && n && u !== d; ) {
|
|
602
|
-
const m =
|
|
603
|
-
a *= m.x, l *= m.y,
|
|
602
|
+
const m = G(p), y = p.getBoundingClientRect(), _ = B(p), b = y.left + (p.clientLeft + parseFloat(_.paddingLeft)) * m.x, S = y.top + (p.clientTop + parseFloat(_.paddingTop)) * m.y;
|
|
603
|
+
a *= m.x, l *= m.y, f *= m.x, h *= m.y, a += b, l += S, d = O(p), p = mt(d);
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
|
-
return
|
|
607
|
-
width:
|
|
608
|
-
height:
|
|
606
|
+
return ct({
|
|
607
|
+
width: f,
|
|
608
|
+
height: h,
|
|
609
609
|
x: a,
|
|
610
610
|
y: l
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
613
|
function _t(e, t) {
|
|
614
614
|
const i = ft(e).scrollLeft;
|
|
615
|
-
return t ? t.left + i :
|
|
615
|
+
return t ? t.left + i : et(z(e)).left + i;
|
|
616
616
|
}
|
|
617
617
|
function Wt(e, t, i) {
|
|
618
618
|
i === void 0 && (i = !1);
|
|
@@ -625,53 +625,53 @@ function Wt(e, t, i) {
|
|
|
625
625
|
y: s
|
|
626
626
|
};
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function me(e) {
|
|
629
629
|
let {
|
|
630
630
|
elements: t,
|
|
631
631
|
rect: i,
|
|
632
632
|
offsetParent: n,
|
|
633
633
|
strategy: o
|
|
634
634
|
} = e;
|
|
635
|
-
const s = o === "fixed", r = z(n), c = t ?
|
|
635
|
+
const s = o === "fixed", r = z(n), c = t ? ht(t.floating) : !1;
|
|
636
636
|
if (n === r || c && s)
|
|
637
637
|
return i;
|
|
638
638
|
let a = {
|
|
639
639
|
scrollLeft: 0,
|
|
640
640
|
scrollTop: 0
|
|
641
|
-
}, l =
|
|
642
|
-
const
|
|
643
|
-
if ((
|
|
644
|
-
const u =
|
|
645
|
-
l =
|
|
641
|
+
}, l = N(1);
|
|
642
|
+
const f = N(0), h = F(n);
|
|
643
|
+
if ((h || !h && !s) && ((Q(n) !== "body" || nt(r)) && (a = ft(n)), F(n))) {
|
|
644
|
+
const u = et(n);
|
|
645
|
+
l = G(n), f.x = u.x + n.clientLeft, f.y = u.y + n.clientTop;
|
|
646
646
|
}
|
|
647
|
-
const g = r && !
|
|
647
|
+
const g = r && !h && !s ? Wt(r, a, !0) : N(0);
|
|
648
648
|
return {
|
|
649
649
|
width: i.width * l.x,
|
|
650
650
|
height: i.height * l.y,
|
|
651
|
-
x: i.x * l.x - a.scrollLeft * l.x +
|
|
652
|
-
y: i.y * l.y - a.scrollTop * l.y +
|
|
651
|
+
x: i.x * l.x - a.scrollLeft * l.x + f.x + g.x,
|
|
652
|
+
y: i.y * l.y - a.scrollTop * l.y + f.y + g.y
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function ye(e) {
|
|
656
656
|
return Array.from(e.getClientRects());
|
|
657
657
|
}
|
|
658
658
|
function xe(e) {
|
|
659
|
-
const t = z(e), i = ft(e), n = e.ownerDocument.body, o =
|
|
659
|
+
const t = z(e), i = ft(e), n = e.ownerDocument.body, o = X(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), s = X(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
|
|
660
660
|
let r = -i.scrollLeft + _t(e);
|
|
661
661
|
const c = -i.scrollTop;
|
|
662
|
-
return
|
|
662
|
+
return B(n).direction === "rtl" && (r += X(t.clientWidth, n.clientWidth) - o), {
|
|
663
663
|
width: o,
|
|
664
664
|
height: s,
|
|
665
665
|
x: r,
|
|
666
666
|
y: c
|
|
667
667
|
};
|
|
668
668
|
}
|
|
669
|
-
function
|
|
670
|
-
const i =
|
|
669
|
+
function we(e, t) {
|
|
670
|
+
const i = O(e), n = z(e), o = i.visualViewport;
|
|
671
671
|
let s = n.clientWidth, r = n.clientHeight, c = 0, a = 0;
|
|
672
672
|
if (o) {
|
|
673
673
|
s = o.width, r = o.height;
|
|
674
|
-
const l =
|
|
674
|
+
const l = vt();
|
|
675
675
|
(!l || l && t === "fixed") && (c = o.offsetLeft, a = o.offsetTop);
|
|
676
676
|
}
|
|
677
677
|
return {
|
|
@@ -681,8 +681,8 @@ function ye(e, t) {
|
|
|
681
681
|
y: a
|
|
682
682
|
};
|
|
683
683
|
}
|
|
684
|
-
function
|
|
685
|
-
const i =
|
|
684
|
+
function be(e, t) {
|
|
685
|
+
const i = et(e, !0, t === "fixed"), n = i.top + e.clientTop, o = i.left + e.clientLeft, s = F(e) ? G(e) : N(1), r = e.clientWidth * s.x, c = e.clientHeight * s.y, a = o * s.x, l = n * s.y;
|
|
686
686
|
return {
|
|
687
687
|
width: r,
|
|
688
688
|
height: c,
|
|
@@ -690,14 +690,14 @@ function we(e, t) {
|
|
|
690
690
|
y: l
|
|
691
691
|
};
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function At(e, t, i) {
|
|
694
694
|
let n;
|
|
695
695
|
if (t === "viewport")
|
|
696
|
-
n =
|
|
696
|
+
n = we(e, i);
|
|
697
697
|
else if (t === "document")
|
|
698
698
|
n = xe(z(e));
|
|
699
699
|
else if (D(t))
|
|
700
|
-
n =
|
|
700
|
+
n = be(t, i);
|
|
701
701
|
else {
|
|
702
702
|
const o = zt(e);
|
|
703
703
|
n = {
|
|
@@ -707,36 +707,36 @@ function kt(e, t, i) {
|
|
|
707
707
|
height: t.height
|
|
708
708
|
};
|
|
709
709
|
}
|
|
710
|
-
return
|
|
710
|
+
return ct(n);
|
|
711
711
|
}
|
|
712
712
|
function It(e, t) {
|
|
713
713
|
const i = j(e);
|
|
714
|
-
return i === t || !D(i) ||
|
|
714
|
+
return i === t || !D(i) || J(i) ? !1 : B(i).position === "fixed" || It(i, t);
|
|
715
715
|
}
|
|
716
716
|
function ve(e, t) {
|
|
717
717
|
const i = t.get(e);
|
|
718
718
|
if (i)
|
|
719
719
|
return i;
|
|
720
|
-
let n = pt(e, [], !1).filter((c) => D(c) &&
|
|
721
|
-
const s =
|
|
720
|
+
let n = pt(e, [], !1).filter((c) => D(c) && Q(c) !== "body"), o = null;
|
|
721
|
+
const s = B(e).position === "fixed";
|
|
722
722
|
let r = s ? j(e) : e;
|
|
723
|
-
for (; D(r) && !
|
|
724
|
-
const c =
|
|
725
|
-
!a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) ||
|
|
723
|
+
for (; D(r) && !J(r); ) {
|
|
724
|
+
const c = B(r), a = bt(r);
|
|
725
|
+
!a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || nt(r) && !a && It(e, r)) ? n = n.filter((f) => f !== r) : o = c, r = j(r);
|
|
726
726
|
}
|
|
727
727
|
return t.set(e, n), n;
|
|
728
728
|
}
|
|
729
|
-
function
|
|
729
|
+
function _e(e) {
|
|
730
730
|
let {
|
|
731
731
|
element: t,
|
|
732
732
|
boundary: i,
|
|
733
733
|
rootBoundary: n,
|
|
734
734
|
strategy: o
|
|
735
735
|
} = e;
|
|
736
|
-
const r = [...i === "clippingAncestors" ?
|
|
737
|
-
const
|
|
738
|
-
return l.top =
|
|
739
|
-
},
|
|
736
|
+
const r = [...i === "clippingAncestors" ? ht(t) ? [] : ve(t, this._c) : [].concat(i), n], c = r[0], a = r.reduce((l, f) => {
|
|
737
|
+
const h = At(t, f, o);
|
|
738
|
+
return l.top = X(h.top, l.top), l.right = tt(h.right, l.right), l.bottom = tt(h.bottom, l.bottom), l.left = X(h.left, l.left), l;
|
|
739
|
+
}, At(t, c, o));
|
|
740
740
|
return {
|
|
741
741
|
width: a.right - a.left,
|
|
742
742
|
height: a.bottom - a.top,
|
|
@@ -744,7 +744,7 @@ function be(e) {
|
|
|
744
744
|
y: a.top
|
|
745
745
|
};
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function Ce(e) {
|
|
748
748
|
const {
|
|
749
749
|
width: t,
|
|
750
750
|
height: i
|
|
@@ -754,31 +754,31 @@ function _e(e) {
|
|
|
754
754
|
height: i
|
|
755
755
|
};
|
|
756
756
|
}
|
|
757
|
-
function
|
|
758
|
-
const n = F(t), o = z(t), s = i === "fixed", r =
|
|
757
|
+
function Se(e, t, i) {
|
|
758
|
+
const n = F(t), o = z(t), s = i === "fixed", r = et(e, !0, s, t);
|
|
759
759
|
let c = {
|
|
760
760
|
scrollLeft: 0,
|
|
761
761
|
scrollTop: 0
|
|
762
762
|
};
|
|
763
|
-
const a =
|
|
763
|
+
const a = N(0);
|
|
764
764
|
if (n || !n && !s)
|
|
765
|
-
if ((
|
|
766
|
-
const g =
|
|
765
|
+
if ((Q(t) !== "body" || nt(o)) && (c = ft(t)), n) {
|
|
766
|
+
const g = et(t, !0, s, t);
|
|
767
767
|
a.x = g.x + t.clientLeft, a.y = g.y + t.clientTop;
|
|
768
768
|
} else o && (a.x = _t(o));
|
|
769
|
-
const l = o && !n && !s ? Wt(o, c) :
|
|
769
|
+
const l = o && !n && !s ? Wt(o, c) : N(0), f = r.left + c.scrollLeft - a.x - l.x, h = r.top + c.scrollTop - a.y - l.y;
|
|
770
770
|
return {
|
|
771
|
-
x:
|
|
772
|
-
y:
|
|
771
|
+
x: f,
|
|
772
|
+
y: h,
|
|
773
773
|
width: r.width,
|
|
774
774
|
height: r.height
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
777
|
function dt(e) {
|
|
778
|
-
return
|
|
778
|
+
return B(e).position === "static";
|
|
779
779
|
}
|
|
780
780
|
function Dt(e, t) {
|
|
781
|
-
if (!F(e) ||
|
|
781
|
+
if (!F(e) || B(e).position === "fixed")
|
|
782
782
|
return null;
|
|
783
783
|
if (t)
|
|
784
784
|
return t(e);
|
|
@@ -786,12 +786,12 @@ function Dt(e, t) {
|
|
|
786
786
|
return z(e) === i && (i = i.ownerDocument.body), i;
|
|
787
787
|
}
|
|
788
788
|
function jt(e, t) {
|
|
789
|
-
const i =
|
|
790
|
-
if (
|
|
789
|
+
const i = O(e);
|
|
790
|
+
if (ht(e))
|
|
791
791
|
return i;
|
|
792
792
|
if (!F(e)) {
|
|
793
793
|
let o = j(e);
|
|
794
|
-
for (; o && !
|
|
794
|
+
for (; o && !J(o); ) {
|
|
795
795
|
if (D(o) && !dt(o))
|
|
796
796
|
return o;
|
|
797
797
|
o = j(o);
|
|
@@ -799,15 +799,15 @@ function jt(e, t) {
|
|
|
799
799
|
return i;
|
|
800
800
|
}
|
|
801
801
|
let n = Dt(e, t);
|
|
802
|
-
for (; n &&
|
|
802
|
+
for (; n && ue(n) && dt(n); )
|
|
803
803
|
n = Dt(n, t);
|
|
804
|
-
return n &&
|
|
804
|
+
return n && J(n) && dt(n) && !bt(n) ? i : n || de(e) || i;
|
|
805
805
|
}
|
|
806
|
-
const
|
|
807
|
-
return
|
|
806
|
+
const Ee = function(e) {
|
|
807
|
+
return A(this, null, function* () {
|
|
808
808
|
const t = this.getOffsetParent || jt, i = this.getDimensions, n = yield i(e.floating);
|
|
809
809
|
return {
|
|
810
|
-
reference:
|
|
810
|
+
reference: Se(e.reference, yield t(e.floating), e.strategy),
|
|
811
811
|
floating: {
|
|
812
812
|
x: 0,
|
|
813
813
|
y: 0,
|
|
@@ -818,36 +818,36 @@ const Se = function(e) {
|
|
|
818
818
|
});
|
|
819
819
|
};
|
|
820
820
|
function Pe(e) {
|
|
821
|
-
return
|
|
821
|
+
return B(e).direction === "rtl";
|
|
822
822
|
}
|
|
823
823
|
const Te = {
|
|
824
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
824
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: me,
|
|
825
825
|
getDocumentElement: z,
|
|
826
|
-
getClippingRect:
|
|
826
|
+
getClippingRect: _e,
|
|
827
827
|
getOffsetParent: jt,
|
|
828
|
-
getElementRects:
|
|
829
|
-
getClientRects:
|
|
830
|
-
getDimensions:
|
|
831
|
-
getScale:
|
|
828
|
+
getElementRects: Ee,
|
|
829
|
+
getClientRects: ye,
|
|
830
|
+
getDimensions: Ce,
|
|
831
|
+
getScale: G,
|
|
832
832
|
isElement: D,
|
|
833
833
|
isRTL: Pe
|
|
834
|
-
},
|
|
835
|
-
const n = /* @__PURE__ */ new Map(), o =
|
|
834
|
+
}, Le = fe, Re = ae, Oe = ce, ke = (e, t, i) => {
|
|
835
|
+
const n = /* @__PURE__ */ new Map(), o = $({
|
|
836
836
|
platform: Te
|
|
837
|
-
}, i), s =
|
|
837
|
+
}, i), s = Z($({}, o.platform), {
|
|
838
838
|
_c: n
|
|
839
839
|
});
|
|
840
|
-
return
|
|
840
|
+
return se(e, t, Z($({}, o), {
|
|
841
841
|
platform: s
|
|
842
842
|
}));
|
|
843
843
|
};
|
|
844
|
-
function
|
|
844
|
+
function H(e) {
|
|
845
845
|
return e === null || typeof e == "undefined";
|
|
846
846
|
}
|
|
847
|
-
function
|
|
848
|
-
return !
|
|
847
|
+
function C(e) {
|
|
848
|
+
return !H(e);
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Bt(e) {
|
|
851
851
|
return new Promise((t) => setTimeout(t, e));
|
|
852
852
|
}
|
|
853
853
|
function Yt(e) {
|
|
@@ -889,19 +889,19 @@ class Ae {
|
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
|
-
function
|
|
893
|
-
var c, a, l,
|
|
894
|
-
if (e.innerHTML = "", e.className = `${(c = i.config.class) != null ? c : ""} ${i.config.classPrefix} ${i.config.animationClass}`, !i.config.arrow.disable && ((a = i.activeStep) != null && a.hasHost)) {
|
|
892
|
+
function De(e, t, i) {
|
|
893
|
+
var c, a, l, f, h, g, u, d, p, m, y, _, b, S, v;
|
|
894
|
+
if (e.innerHTML = "", e.className = `${(c = i.config.class) != null ? c : ""} siteguide-pos ${i.config.classPrefix} ${i.config.animationClass}`, !i.config.arrow.disable && ((a = i.activeStep) != null && a.hasHost)) {
|
|
895
895
|
const w = L("div", [
|
|
896
896
|
(l = i.config.arrow.class) != null ? l : "",
|
|
897
897
|
`${i.config.classPrefix}-arrow`
|
|
898
898
|
]);
|
|
899
899
|
e.appendChild(w);
|
|
900
900
|
}
|
|
901
|
-
(
|
|
901
|
+
(f = t.customization) != null && f.class && e.classList.add(t.customization.class);
|
|
902
902
|
const n = L("div", [
|
|
903
903
|
`${i.config.classPrefix}-header`,
|
|
904
|
-
`${(g = (
|
|
904
|
+
`${(g = (h = t.customization) == null ? void 0 : h.headerClass) != null ? g : ""}`
|
|
905
905
|
]);
|
|
906
906
|
e.appendChild(n);
|
|
907
907
|
const o = L("h1", [
|
|
@@ -911,25 +911,25 @@ function ke(e, t, i) {
|
|
|
911
911
|
o.innerHTML = i.config.translateFn((p = t.title) != null ? p : ""), n.appendChild(o), i.config.close.button && (i.config.closeIcon.onclick = i.complete.bind(i), n.appendChild(i.config.closeIcon));
|
|
912
912
|
const s = L("div", [
|
|
913
913
|
`${i.config.classPrefix}-content`,
|
|
914
|
-
`${(
|
|
914
|
+
`${(y = (m = t.customization) == null ? void 0 : m.contentClass) != null ? y : ""}`
|
|
915
915
|
]);
|
|
916
916
|
e.appendChild(s);
|
|
917
917
|
const r = L("div", [
|
|
918
918
|
`${i.config.classPrefix}-footer`,
|
|
919
|
-
`${(
|
|
919
|
+
`${(b = (_ = t.customization) == null ? void 0 : _.footerClass) != null ? b : ""}`
|
|
920
920
|
]);
|
|
921
|
-
if (
|
|
921
|
+
if (H(t.buttonList) && (t.buttonList = Be(i)), t.buttonList.forEach((w) => {
|
|
922
922
|
var W;
|
|
923
|
-
const
|
|
924
|
-
|
|
925
|
-
const
|
|
926
|
-
|
|
923
|
+
const P = [`${i.config.classPrefix}-button`, (W = w.class) != null ? W : ""];
|
|
924
|
+
H(w.type) || w.type === "secondary" ? P.push(`${i.config.classPrefix}-button-secondary`) : w.type === "primary" ? P.push(`${i.config.classPrefix}-button-primary`) : w.type === "link" && P.push(`${i.config.classPrefix}-button-link`), !H(w.class) && w.class !== "" && P.push(w.class);
|
|
925
|
+
const T = L("button", P);
|
|
926
|
+
T.innerHTML = i.config.translateFn(w.text), T.onclick = (M) => {
|
|
927
927
|
w.action.call(i);
|
|
928
|
-
}, r.appendChild(
|
|
929
|
-
}), !i.config.progress.disable && i.config.progress.text &&
|
|
928
|
+
}, r.appendChild(T);
|
|
929
|
+
}), !i.config.progress.disable && i.config.progress.text && C(i.activeStepIndex)) {
|
|
930
930
|
const w = L("p", [
|
|
931
931
|
`${i.config.classPrefix}-progress`,
|
|
932
|
-
`${(
|
|
932
|
+
`${(v = (S = t.customization) == null ? void 0 : S.progressClass) != null ? v : ""}`
|
|
933
933
|
]);
|
|
934
934
|
w.innerHTML = i.config.translateFn(
|
|
935
935
|
He(i.config.progress.text, i.activeStepIndex + 1, i.stepList.length)
|
|
@@ -937,7 +937,7 @@ function ke(e, t, i) {
|
|
|
937
937
|
}
|
|
938
938
|
e.appendChild(r);
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function Be(e) {
|
|
941
941
|
return [
|
|
942
942
|
{
|
|
943
943
|
text: e.config.buttons.prevText,
|
|
@@ -955,8 +955,8 @@ function He(e, t, i) {
|
|
|
955
955
|
}
|
|
956
956
|
class Ne {
|
|
957
957
|
constructor() {
|
|
958
|
-
|
|
959
|
-
|
|
958
|
+
x(this, "_renderContentStrategy", /* @__PURE__ */ new Map());
|
|
959
|
+
x(this, "_staticSides", {
|
|
960
960
|
top: "bottom",
|
|
961
961
|
right: "left",
|
|
962
962
|
bottom: "top",
|
|
@@ -970,34 +970,34 @@ class Ne {
|
|
|
970
970
|
var o, s;
|
|
971
971
|
if (!this._renderContentStrategy.has(i.popupData.type))
|
|
972
972
|
throw new Error("Missing popup creator strategy");
|
|
973
|
-
t.style.display = "none", t.classList.remove(i.tour.config.animationClass), i.hostElement ? t.style.position = Ct(i.hostElement) : t.style.position = "fixed",
|
|
974
|
-
}).then(() => i.isFirst && i.direction === "toNext" ?
|
|
973
|
+
t.style.display = "none", t.classList.remove(i.tour.config.animationClass), i.hostElement ? t.style.position = Ct(i.hostElement) : t.style.position = "fixed", De(t, i.popupData, i.tour), (o = this._renderContentStrategy.get(i.popupData.type)) == null || o.renderContent(t, i.popupData, i.tour.config), (s = i.hostElement) == null || s.scrollIntoView(i.tour.config.scrollTo), n();
|
|
974
|
+
}).then(() => i.isFirst && i.direction === "toNext" ? Bt(0) : Bt(400)).then(() => {
|
|
975
975
|
t.style.display = "flex", this.updatePosition(t, i), t.classList.add(i.tour.config.animationClass);
|
|
976
976
|
});
|
|
977
977
|
}
|
|
978
978
|
/** @inheritdoc */
|
|
979
979
|
updatePosition(t, i) {
|
|
980
|
-
|
|
980
|
+
C(i.hostElement) ? this.renderFloatingPopup(t, i) : this.renderCenterPopup(t);
|
|
981
981
|
}
|
|
982
982
|
renderFloatingPopup(t, i) {
|
|
983
983
|
var l;
|
|
984
|
-
const n = t.style.position === "fixed" ? window.scrollY || document.documentElement.scrollTop : 0, o = t.querySelector(`.${i.tour.config.classPrefix}-arrow`), s = [], r =
|
|
985
|
-
s.push(
|
|
984
|
+
const n = t.style.position === "fixed" ? window.scrollY || document.documentElement.scrollTop : 0, o = t.querySelector(`.${i.tour.config.classPrefix}-arrow`), s = [], r = C(i.popupData.position) && i.popupData.position !== "auto" ? i.popupData.position : void 0, c = (l = o == null ? void 0 : o.offsetWidth) != null ? l : 10, a = Math.sqrt(2 * Pt(c, 2)) / 2 + i.tour.config.highlight.padding;
|
|
985
|
+
s.push(Le(a)), (i.popupData.position === "auto" || H(r)) && s.push(Re()), !i.tour.config.arrow.disable && C(o) && s.push(Oe({ element: o })), ke(i.hostElement, t, {
|
|
986
986
|
placement: r,
|
|
987
987
|
middleware: [...s]
|
|
988
|
-
}).then(({ x:
|
|
988
|
+
}).then(({ x: f, y: h, middlewareData: g, placement: u }) => {
|
|
989
989
|
Object.assign(t.style, {
|
|
990
|
-
top: `${
|
|
991
|
-
left: `${
|
|
990
|
+
top: `${h - n}px`,
|
|
991
|
+
left: `${f}px`,
|
|
992
992
|
marginTop: "0",
|
|
993
993
|
marginLeft: "0"
|
|
994
994
|
});
|
|
995
995
|
const d = u.split("-")[0], p = this._staticSides[d];
|
|
996
|
-
if (g.arrow &&
|
|
997
|
-
const { x: m, y
|
|
996
|
+
if (g.arrow && C(o)) {
|
|
997
|
+
const { x: m, y } = g.arrow;
|
|
998
998
|
Object.assign(o.style, {
|
|
999
999
|
left: m != null ? `${m}px` : "",
|
|
1000
|
-
top:
|
|
1000
|
+
top: y != null ? `${y}px` : "",
|
|
1001
1001
|
right: "",
|
|
1002
1002
|
bottom: "",
|
|
1003
1003
|
[p]: `${-c / 2}px`,
|
|
@@ -1018,7 +1018,7 @@ class Ne {
|
|
|
1018
1018
|
this._renderContentStrategy.set("text", new Ae()), this._renderContentStrategy.set("custom", new $e());
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
|
-
class
|
|
1021
|
+
class Fe {
|
|
1022
1022
|
/** @inheritdoc */
|
|
1023
1023
|
render(t, i) {
|
|
1024
1024
|
return new Promise((n) => {
|
|
@@ -1038,7 +1038,7 @@ class Be {
|
|
|
1038
1038
|
t.style.transform = "", t.style.left = `${n.left - o}px`, t.style.top = `${n.top + s - o}px`, t.style.width = `${n.width + 2 * o}px`, t.style.height = `${n.height + 2 * o}px`, t.style.opacity = "1";
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
1041
|
-
class
|
|
1041
|
+
class Me {
|
|
1042
1042
|
/** @inheritdoc */
|
|
1043
1043
|
render(t, i) {
|
|
1044
1044
|
return new Promise((n) => {
|
|
@@ -1058,15 +1058,15 @@ class Fe {
|
|
|
1058
1058
|
t.style.transform = "", t.style.left = `${n.left - o}px`, t.style.top = `${n.top + s - o}px`, t.style.width = `${n.width + 2 * o}px`, t.style.height = `${n.height + 2 * o}px`;
|
|
1059
1059
|
}
|
|
1060
1060
|
}
|
|
1061
|
-
class
|
|
1061
|
+
class Ve {
|
|
1062
1062
|
constructor(t, i) {
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1063
|
+
x(this, "popupData");
|
|
1064
|
+
x(this, "tour");
|
|
1065
|
+
x(this, "_index");
|
|
1066
|
+
x(this, "_hostElement", null);
|
|
1067
|
+
x(this, "_direction", "toNext");
|
|
1068
|
+
x(this, "_hostData");
|
|
1069
|
+
x(this, "_resizeObserver", null);
|
|
1070
1070
|
var n;
|
|
1071
1071
|
this.popupData = i.popup, this.tour = t, this._index = (n = i.index) != null ? n : null, this._hostData = i.host;
|
|
1072
1072
|
}
|
|
@@ -1077,7 +1077,7 @@ class Me {
|
|
|
1077
1077
|
return this._direction;
|
|
1078
1078
|
}
|
|
1079
1079
|
get hasHost() {
|
|
1080
|
-
return
|
|
1080
|
+
return C(this._hostElement);
|
|
1081
1081
|
}
|
|
1082
1082
|
get hostElement() {
|
|
1083
1083
|
return this._hostElement;
|
|
@@ -1089,56 +1089,66 @@ class Me {
|
|
|
1089
1089
|
this._index = t;
|
|
1090
1090
|
}
|
|
1091
1091
|
show(t) {
|
|
1092
|
-
return
|
|
1092
|
+
return A(this, null, function* () {
|
|
1093
1093
|
var n;
|
|
1094
|
-
if (
|
|
1094
|
+
if (H(this.tour.popup))
|
|
1095
1095
|
return;
|
|
1096
1096
|
this._direction = t, this._hostData && (this._hostElement = this.resolveHostElement(
|
|
1097
1097
|
typeof this._hostData == "function" ? this._hostData() : (n = this._hostData) != null ? n : null
|
|
1098
1098
|
)), this._resizeObserver = this.listenHostResize();
|
|
1099
|
-
const i = [
|
|
1100
|
-
this.tour.config.
|
|
1099
|
+
const i = [];
|
|
1100
|
+
C(this.tour.background) && i.push(this.tour.backgroundRenderer.render(this.tour.background, this)), !this.tour.config.highlight.disable && !H(this.tour.highlight) && i.push(this.tour.highlightRenderer.render(this.tour.highlight, this)), this.tour.config.highlight.disable && C(this.tour.highlight) && this.tour.highlightRenderer.render(this.tour.highlight, {}), this.tour.config.interaction.disable && C(this.tour.interaction) ? i.push(this.tour.interactionRenderer.render(this.tour.interaction, this)) : !this.tour.config.interaction.disable && C(this.tour.interaction) && i.push(this.tour.interactionRenderer.render(this.tour.interaction, {})), i.push(this.tour.popupRenderer.render(this.tour.popup, this)), yield Promise.all(i), this.toggleHostClass(!0);
|
|
1101
1101
|
});
|
|
1102
1102
|
}
|
|
1103
1103
|
hide() {
|
|
1104
|
-
return
|
|
1104
|
+
return A(this, null, function* () {
|
|
1105
1105
|
var t;
|
|
1106
1106
|
(t = this._resizeObserver) == null || t.disconnect(), this.toggleHostClass(!1);
|
|
1107
1107
|
});
|
|
1108
1108
|
}
|
|
1109
1109
|
toggleHostClass(t) {
|
|
1110
|
-
|
|
1110
|
+
var i, n;
|
|
1111
|
+
H(this._hostElement) || (t ? (this._hostElement.classList.add("siteguide-host"), (i = this._hostElement.parentElement) == null || i.classList.add("siteguide-host-parent")) : (this._hostElement.classList.remove("siteguide-host"), (n = this._hostElement.parentElement) == null || n.classList.remove("siteguide-host-parent")));
|
|
1111
1112
|
}
|
|
1112
1113
|
resolveHostElement(t) {
|
|
1113
1114
|
return typeof this._hostData == "string" ? document.querySelector(this._hostData) : t;
|
|
1114
1115
|
}
|
|
1115
1116
|
listenHostResize() {
|
|
1116
1117
|
const t = new ResizeObserver(() => {
|
|
1117
|
-
|
|
1118
|
+
H(this.tour.activeStep) || (C(this.tour.popup) && this.tour.popupRenderer.updatePosition(this.tour.popup, this.tour.activeStep), C(this.tour.highlight) && !this.tour.config.highlight.disable && this.tour.highlightRenderer.updatePosition(this.tour.highlight, this.tour.activeStep), C(this.tour.interaction) && this.tour.config.interaction.disable && this.tour.interactionRenderer.updatePosition(this.tour.interaction, this.tour.activeStep));
|
|
1118
1119
|
});
|
|
1119
|
-
return
|
|
1120
|
+
return C(this._hostElement) && t.observe(this._hostElement), t;
|
|
1120
1121
|
}
|
|
1121
1122
|
}
|
|
1122
1123
|
function gt(e) {
|
|
1123
1124
|
return e && typeof e == "object" && !Array.isArray(e);
|
|
1124
1125
|
}
|
|
1125
1126
|
function qt(e, t) {
|
|
1126
|
-
const i =
|
|
1127
|
+
const i = $({}, e);
|
|
1127
1128
|
return gt(e) && gt(t) && Object.keys(t).forEach((n) => {
|
|
1128
1129
|
const o = n, s = n;
|
|
1129
1130
|
gt(t[o]) ? (s in e || Object.assign(i, { [s]: {} }), i[s] = qt(e[s], t[o])) : Object.assign(i, { [s]: t[o] });
|
|
1130
1131
|
}), i;
|
|
1131
1132
|
}
|
|
1132
|
-
function
|
|
1133
|
+
function ze(e) {
|
|
1133
1134
|
const t = L("button", [`${e}-close`]);
|
|
1134
1135
|
return t.innerHTML = "✖", t;
|
|
1135
1136
|
}
|
|
1136
|
-
class
|
|
1137
|
+
class We {
|
|
1138
|
+
/** @inheritdoc */
|
|
1139
|
+
render(t, i) {
|
|
1140
|
+
return i.tour.config.background.disable ? t.style.pointerEvents = "none" : t.style.pointerEvents = "auto", Promise.resolve();
|
|
1141
|
+
}
|
|
1142
|
+
/** @inheritdoc */
|
|
1143
|
+
updatePosition(t, i) {
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
class Ie {
|
|
1137
1147
|
constructor() {
|
|
1138
|
-
|
|
1148
|
+
x(this, "_activeTour", null);
|
|
1139
1149
|
}
|
|
1140
1150
|
get isActive() {
|
|
1141
|
-
return
|
|
1151
|
+
return C(this.activeTour);
|
|
1142
1152
|
}
|
|
1143
1153
|
get activeTour() {
|
|
1144
1154
|
return this._activeTour;
|
|
@@ -1147,30 +1157,31 @@ class ze {
|
|
|
1147
1157
|
this._activeTour = t;
|
|
1148
1158
|
}
|
|
1149
1159
|
}
|
|
1150
|
-
const
|
|
1151
|
-
class
|
|
1160
|
+
const st = new Ie();
|
|
1161
|
+
class Ye {
|
|
1152
1162
|
constructor(t) {
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1163
|
+
x(this, "popupRenderer", new Ne());
|
|
1164
|
+
x(this, "highlightRenderer", new Fe());
|
|
1165
|
+
x(this, "interactionRenderer", new Me());
|
|
1166
|
+
x(this, "backgroundRenderer", new We());
|
|
1167
|
+
x(this, "_popup", null);
|
|
1168
|
+
x(this, "_highlight", null);
|
|
1169
|
+
x(this, "_interaction", null);
|
|
1170
|
+
x(this, "_background", null);
|
|
1171
|
+
x(this, "_stepList", []);
|
|
1172
|
+
x(this, "_activeStep", null);
|
|
1173
|
+
x(this, "_bodyResizeObserver", null);
|
|
1174
|
+
x(this, "_config");
|
|
1175
|
+
x(this, "closeOnEsc", (t) => {
|
|
1165
1176
|
t.key === "Escape" && this.complete();
|
|
1166
1177
|
});
|
|
1167
|
-
|
|
1178
|
+
x(this, "closeOnClick", () => {
|
|
1168
1179
|
this.complete();
|
|
1169
1180
|
});
|
|
1170
|
-
|
|
1181
|
+
x(this, "keyboardControl", (t) => {
|
|
1171
1182
|
t.key === "ArrowRight" ? this.next() : t.key === "ArrowLeft" && this.prev();
|
|
1172
1183
|
});
|
|
1173
|
-
var i, n, o, s, r, c, a, l,
|
|
1184
|
+
var i, n, o, s, r, c, a, l, f, h, g, u, d, p, m, y, _, b, S, v, w, P, T, W, M, I, E, R, Y, k, q, U, K;
|
|
1174
1185
|
this._config = {
|
|
1175
1186
|
classPrefix: (i = t.classPrefix) != null ? i : "siteguide",
|
|
1176
1187
|
class: "",
|
|
@@ -1181,7 +1192,7 @@ class Ie {
|
|
|
1181
1192
|
animationClass: (c = t.animationClass) != null ? c : "siteguide-animation",
|
|
1182
1193
|
close: {
|
|
1183
1194
|
button: (l = (a = t.close) == null ? void 0 : a.button) != null ? l : !0,
|
|
1184
|
-
clickout: (
|
|
1195
|
+
clickout: (h = (f = t.close) == null ? void 0 : f.clickout) != null ? h : !1,
|
|
1185
1196
|
esc: (u = (g = t.close) == null ? void 0 : g.esc) != null ? u : !0
|
|
1186
1197
|
},
|
|
1187
1198
|
// @ts-expect-error
|
|
@@ -1191,25 +1202,28 @@ class Ie {
|
|
|
1191
1202
|
inline: "center"
|
|
1192
1203
|
},
|
|
1193
1204
|
// @ts-expect-error
|
|
1194
|
-
closeIcon: (m = t.closeIcon) != null ? m :
|
|
1205
|
+
closeIcon: (m = t.closeIcon) != null ? m : ze((p = t.classPrefix) != null ? p : "siteguide"),
|
|
1195
1206
|
arrow: {
|
|
1196
|
-
disable: (_ = (
|
|
1197
|
-
class: (
|
|
1207
|
+
disable: (_ = (y = t.arrow) == null ? void 0 : y.disable) != null ? _ : !1,
|
|
1208
|
+
class: (S = (b = t.arrow) == null ? void 0 : b.class) != null ? S : ""
|
|
1198
1209
|
},
|
|
1199
1210
|
highlight: {
|
|
1200
|
-
disable: (w = (
|
|
1201
|
-
padding: (
|
|
1211
|
+
disable: (w = (v = t.highlight) == null ? void 0 : v.disable) != null ? w : !1,
|
|
1212
|
+
padding: (T = (P = t.highlight) == null ? void 0 : P.padding) != null ? T : 8,
|
|
1202
1213
|
class: (M = (W = t.highlight) == null ? void 0 : W.class) != null ? M : ""
|
|
1203
1214
|
},
|
|
1204
1215
|
progress: {
|
|
1205
|
-
disable: (
|
|
1216
|
+
disable: (E = (I = t.progress) == null ? void 0 : I.disable) != null ? E : !0,
|
|
1206
1217
|
text: "Step {{currentStep}} of {{totalSteps}}"
|
|
1207
1218
|
},
|
|
1208
1219
|
interaction: {
|
|
1209
|
-
disable: (Y = (
|
|
1220
|
+
disable: (Y = (R = t.interaction) == null ? void 0 : R.disable) != null ? Y : !0
|
|
1210
1221
|
},
|
|
1211
|
-
|
|
1212
|
-
|
|
1222
|
+
background: {
|
|
1223
|
+
disable: (q = (k = t.background) == null ? void 0 : k.disable) != null ? q : !0
|
|
1224
|
+
},
|
|
1225
|
+
keyboardControl: (U = t.keyboardControl) != null ? U : !1,
|
|
1226
|
+
translateFn: (K = t.translateFn) != null ? K : (Ut) => Ut
|
|
1213
1227
|
};
|
|
1214
1228
|
}
|
|
1215
1229
|
get stepList() {
|
|
@@ -1227,6 +1241,9 @@ class Ie {
|
|
|
1227
1241
|
get interaction() {
|
|
1228
1242
|
return this._interaction;
|
|
1229
1243
|
}
|
|
1244
|
+
get background() {
|
|
1245
|
+
return this._background;
|
|
1246
|
+
}
|
|
1230
1247
|
get activeStep() {
|
|
1231
1248
|
return this._activeStep;
|
|
1232
1249
|
}
|
|
@@ -1234,11 +1251,11 @@ class Ie {
|
|
|
1234
1251
|
return this._activeStep ? this.stepList.indexOf(this._activeStep) : null;
|
|
1235
1252
|
}
|
|
1236
1253
|
addStep(t) {
|
|
1237
|
-
if (
|
|
1254
|
+
if (H(t.index)) {
|
|
1238
1255
|
const n = this._stepList.reduce((o, s) => s.index !== null && s.index !== void 0 && s.index > o ? s.index : o, -1);
|
|
1239
1256
|
t.index = n + 1;
|
|
1240
1257
|
}
|
|
1241
|
-
const i = new
|
|
1258
|
+
const i = new Ve(this, t);
|
|
1242
1259
|
this._stepList.push(i), this._stepList.sort((n, o) => n.index - o.index);
|
|
1243
1260
|
}
|
|
1244
1261
|
addSteps(t) {
|
|
@@ -1248,17 +1265,18 @@ class Ie {
|
|
|
1248
1265
|
this._stepList = this._stepList.filter((i) => t !== i.index);
|
|
1249
1266
|
}
|
|
1250
1267
|
start() {
|
|
1251
|
-
|
|
1268
|
+
st.isActive || (st.setActiveTour(this), this._bodyResizeObserver = this.getBodyResizeObserver(), this.config.close.esc && document.addEventListener("keydown", this.closeOnEsc), this.config.keyboardControl && document.addEventListener("keydown", this.keyboardControl), this._background = L("div", ["siteguide-background"]), document.body.appendChild(this._background), this.config.close.clickout && this._background.addEventListener("click", this.closeOnClick), this._config.highlight.disable || (this._highlight = L("div", [
|
|
1252
1269
|
this._config.highlight.class,
|
|
1270
|
+
"siteguide-highlight-pos",
|
|
1253
1271
|
`${this._config.classPrefix}-highlight`
|
|
1254
|
-
]), document.body.appendChild(this._highlight)), this._config.interaction.disable && (this._interaction = L("div", ["siteguide-interaction"]), document.body.appendChild(this._interaction)), this._popup = L("div", [this._config.classPrefix]), document.body.appendChild(this._popup), this.next());
|
|
1272
|
+
]), document.body.appendChild(this._highlight)), this._config.interaction.disable && (this._interaction = L("div", ["siteguide-interaction"]), document.body.appendChild(this._interaction)), this._popup = L("div", ["siteguide-pos", this._config.classPrefix]), document.body.appendChild(this._popup), this.next());
|
|
1255
1273
|
}
|
|
1256
1274
|
complete() {
|
|
1257
1275
|
var t, i;
|
|
1258
|
-
this._popup && document.body.removeChild(this._popup), this._highlight && document.body.removeChild(this._highlight), this._interaction && document.body.removeChild(this._interaction), this._background && document.body.removeChild(this._background), (t = this._bodyResizeObserver) == null || t.disconnect(), (i = this._activeStep) == null || i.hide(), this._activeStep = null,
|
|
1276
|
+
this._popup && document.body.removeChild(this._popup), this._highlight && document.body.removeChild(this._highlight), this._interaction && document.body.removeChild(this._interaction), this._background && document.body.removeChild(this._background), (t = this._bodyResizeObserver) == null || t.disconnect(), (i = this._activeStep) == null || i.hide(), this._activeStep = null, st.setActiveTour(null), this.config.close.esc && document.removeEventListener("keydown", this.closeOnEsc), this.config.keyboardControl && document.removeEventListener("keydown", this.keyboardControl);
|
|
1259
1277
|
}
|
|
1260
1278
|
prev() {
|
|
1261
|
-
const t =
|
|
1279
|
+
const t = C(this._activeStep) ? this._stepList.indexOf(this._activeStep) - 1 : this._stepList.indexOf(this._stepList[this._stepList.length - 1]);
|
|
1262
1280
|
if (t < 0) {
|
|
1263
1281
|
this.complete();
|
|
1264
1282
|
return;
|
|
@@ -1266,14 +1284,14 @@ class Ie {
|
|
|
1266
1284
|
this.changeStepTo(t, "fromBack");
|
|
1267
1285
|
}
|
|
1268
1286
|
next() {
|
|
1269
|
-
return
|
|
1287
|
+
return A(this, null, function* () {
|
|
1270
1288
|
var i, n, o;
|
|
1271
|
-
const t =
|
|
1289
|
+
const t = C(this._activeStep) ? this._stepList.indexOf(this._activeStep) + 1 : this._stepList.indexOf(this._stepList[0]);
|
|
1272
1290
|
if (t >= this._stepList.length) {
|
|
1273
1291
|
this.complete();
|
|
1274
1292
|
return;
|
|
1275
1293
|
}
|
|
1276
|
-
|
|
1294
|
+
C((i = this._activeStep) == null ? void 0 : i.popupData.allowNext) && !((o = yield (n = this._activeStep) == null ? void 0 : n.popupData.allowNext.call(this)) == null || o) || this.changeStepTo(t, "toNext");
|
|
1277
1295
|
});
|
|
1278
1296
|
}
|
|
1279
1297
|
goTo(t) {
|
|
@@ -1293,15 +1311,15 @@ class Ie {
|
|
|
1293
1311
|
}
|
|
1294
1312
|
getBodyResizeObserver() {
|
|
1295
1313
|
const t = new ResizeObserver(() => {
|
|
1296
|
-
this._activeStep && (
|
|
1314
|
+
this._activeStep && (C(this._popup) && this.popupRenderer.updatePosition(this._popup, this._activeStep), C(this._highlight) && !this.config.highlight.disable && this.highlightRenderer.updatePosition(this._highlight, this._activeStep), C(this._interaction) && this.config.interaction.disable && this.interactionRenderer.updatePosition(this._interaction, this._activeStep));
|
|
1297
1315
|
});
|
|
1298
1316
|
return t.observe(document.body), t;
|
|
1299
1317
|
}
|
|
1300
1318
|
}
|
|
1301
|
-
const
|
|
1319
|
+
const qe = st;
|
|
1302
1320
|
export {
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1321
|
+
qe as Siteguide,
|
|
1322
|
+
Ye as Tour,
|
|
1323
|
+
Ve as TourStep,
|
|
1306
1324
|
L as createElement
|
|
1307
1325
|
};
|