@devalok/shilp-sutra 0.33.0 → 0.33.2
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/_chunks/framer.js +1777 -1728
- package/dist/_chunks/vendor-client.js +815 -792
- package/dist/ai/blocks/block-table.d.ts +1 -1
- package/dist/ai/blocks/block-table.d.ts.map +1 -1
- package/dist/ai/blocks/confirm.d.ts +1 -1
- package/dist/ai/blocks/confirm.d.ts.map +1 -1
- package/dist/ai/blocks/divider.d.ts +1 -1
- package/dist/ai/blocks/divider.d.ts.map +1 -1
- package/dist/ai/blocks/error.d.ts +1 -1
- package/dist/ai/blocks/error.d.ts.map +1 -1
- package/dist/ai/blocks/info.d.ts +2 -2
- package/dist/ai/blocks/info.d.ts.map +1 -1
- package/dist/ai/blocks/loading.d.ts +1 -1
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/blocks/stat-row.d.ts +1 -1
- package/dist/ai/blocks/stat-row.d.ts.map +1 -1
- package/dist/ai/blocks/success.d.ts +1 -1
- package/dist/ai/blocks/success.d.ts.map +1 -1
- package/dist/ai/blocks/text.d.ts +2 -2
- package/dist/ai/blocks/text.d.ts.map +1 -1
- package/dist/ai/devadoot-icon.d.ts +1 -1
- package/dist/ai/devadoot-icon.d.ts.map +1 -1
- package/dist/ui/lib/index.d.ts +1 -0
- package/dist/ui/lib/index.d.ts.map +1 -1
- package/llms-full.txt +1 -1
- package/package.json +12 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as S from "react";
|
|
3
|
-
import W, { useState as
|
|
4
|
-
import * as
|
|
3
|
+
import W, { useState as Ce, useRef as et, useEffect as Ct, useCallback as Qe, useLayoutEffect as Ee, useMemo as Ge } from "react";
|
|
4
|
+
import * as Je from "react-dom";
|
|
5
5
|
var K = function() {
|
|
6
6
|
return K = Object.assign || function(e) {
|
|
7
7
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
@@ -11,7 +11,7 @@ var K = function() {
|
|
|
11
11
|
return e;
|
|
12
12
|
}, K.apply(this, arguments);
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function Ae(t, e) {
|
|
15
15
|
var n = {};
|
|
16
16
|
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
|
|
17
17
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -19,17 +19,17 @@ function Re(t, e) {
|
|
|
19
19
|
e.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[o]) && (n[r[o]] = t[r[o]]);
|
|
20
20
|
return n;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function tn(t, e, n) {
|
|
23
23
|
if (n || arguments.length === 2) for (var r = 0, o = e.length, i; r < o; r++)
|
|
24
24
|
(i || !(r in e)) && (i || (i = Array.prototype.slice.call(e, 0, r)), i[r] = e[r]);
|
|
25
25
|
return t.concat(i || Array.prototype.slice.call(e));
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
function
|
|
27
|
+
var xt = "right-scroll-bar-position", St = "width-before-scroll-bar", en = "with-scroll-bars-hidden", nn = "--removed-body-scroll-bar-size";
|
|
28
|
+
function Nt(t, e) {
|
|
29
29
|
return typeof t == "function" ? t(e) : t && (t.current = e), t;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
var n =
|
|
31
|
+
function rn(t, e) {
|
|
32
|
+
var n = Ce(function() {
|
|
33
33
|
return {
|
|
34
34
|
// value
|
|
35
35
|
value: t,
|
|
@@ -49,31 +49,31 @@ function en(t, e) {
|
|
|
49
49
|
})[0];
|
|
50
50
|
return n.callback = e, n.facade;
|
|
51
51
|
}
|
|
52
|
-
var
|
|
53
|
-
function
|
|
54
|
-
var n =
|
|
52
|
+
var on = typeof window < "u" ? S.useLayoutEffect : S.useEffect, re = /* @__PURE__ */ new WeakMap();
|
|
53
|
+
function cn(t, e) {
|
|
54
|
+
var n = rn(null, function(r) {
|
|
55
55
|
return t.forEach(function(o) {
|
|
56
|
-
return
|
|
56
|
+
return Nt(o, r);
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
|
-
return
|
|
60
|
-
var r =
|
|
59
|
+
return on(function() {
|
|
60
|
+
var r = re.get(n);
|
|
61
61
|
if (r) {
|
|
62
62
|
var o = new Set(r), i = new Set(t), c = n.current;
|
|
63
63
|
o.forEach(function(a) {
|
|
64
|
-
i.has(a) ||
|
|
64
|
+
i.has(a) || Nt(a, null);
|
|
65
65
|
}), i.forEach(function(a) {
|
|
66
|
-
o.has(a) ||
|
|
66
|
+
o.has(a) || Nt(a, c);
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
re.set(n, t);
|
|
70
70
|
}, [t]), n;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function an(t) {
|
|
73
73
|
return t;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
e === void 0 && (e =
|
|
75
|
+
function sn(t, e) {
|
|
76
|
+
e === void 0 && (e = an);
|
|
77
77
|
var n = [], r = !1, o = {
|
|
78
78
|
read: function() {
|
|
79
79
|
if (r)
|
|
@@ -109,31 +109,31 @@ function cn(t, e) {
|
|
|
109
109
|
var a = n;
|
|
110
110
|
n = [], a.forEach(i), c = n;
|
|
111
111
|
}
|
|
112
|
-
var
|
|
113
|
-
var
|
|
114
|
-
c = [],
|
|
112
|
+
var f = function() {
|
|
113
|
+
var u = c;
|
|
114
|
+
c = [], u.forEach(i);
|
|
115
115
|
}, l = function() {
|
|
116
|
-
return Promise.resolve().then(
|
|
116
|
+
return Promise.resolve().then(f);
|
|
117
117
|
};
|
|
118
118
|
l(), n = {
|
|
119
|
-
push: function(
|
|
120
|
-
c.push(
|
|
119
|
+
push: function(u) {
|
|
120
|
+
c.push(u), l();
|
|
121
121
|
},
|
|
122
|
-
filter: function(
|
|
123
|
-
return c = c.filter(
|
|
122
|
+
filter: function(u) {
|
|
123
|
+
return c = c.filter(u), n;
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
128
|
return o;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function ln(t) {
|
|
131
131
|
t === void 0 && (t = {});
|
|
132
|
-
var e =
|
|
132
|
+
var e = sn(null);
|
|
133
133
|
return e.options = K({ async: !0, ssr: !1 }, t), e;
|
|
134
134
|
}
|
|
135
|
-
var
|
|
136
|
-
var e = t.sideCar, n =
|
|
135
|
+
var Oe = function(t) {
|
|
136
|
+
var e = t.sideCar, n = Ae(t, ["sideCar"]);
|
|
137
137
|
if (!e)
|
|
138
138
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
139
139
|
var r = e.read();
|
|
@@ -141,64 +141,64 @@ var Ee = function(t) {
|
|
|
141
141
|
throw new Error("Sidecar medium not found");
|
|
142
142
|
return S.createElement(r, K({}, n));
|
|
143
143
|
};
|
|
144
|
-
|
|
145
|
-
function
|
|
146
|
-
return t.useMedium(e),
|
|
144
|
+
Oe.isSideCarExport = !0;
|
|
145
|
+
function un(t, e) {
|
|
146
|
+
return t.useMedium(e), Oe;
|
|
147
147
|
}
|
|
148
|
-
var
|
|
149
|
-
},
|
|
148
|
+
var Me = ln(), Bt = function() {
|
|
149
|
+
}, _t = S.forwardRef(function(t, e) {
|
|
150
150
|
var n = S.useRef(null), r = S.useState({
|
|
151
|
-
onScrollCapture:
|
|
152
|
-
onWheelCapture:
|
|
153
|
-
onTouchMoveCapture:
|
|
154
|
-
}), o = r[0], i = r[1], c = t.forwardProps, a = t.children,
|
|
151
|
+
onScrollCapture: Bt,
|
|
152
|
+
onWheelCapture: Bt,
|
|
153
|
+
onTouchMoveCapture: Bt
|
|
154
|
+
}), o = r[0], i = r[1], c = t.forwardProps, a = t.children, f = t.className, l = t.removeScrollBar, u = t.enabled, s = t.shards, m = t.sideCar, h = t.noRelative, p = t.noIsolation, d = t.inert, g = t.allowPinchZoom, v = t.as, w = v === void 0 ? "div" : v, y = t.gapMode, b = Ae(t, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = m, R = cn([n, e]), E = K(K({}, b), o);
|
|
155
155
|
return S.createElement(
|
|
156
156
|
S.Fragment,
|
|
157
157
|
null,
|
|
158
|
-
|
|
159
|
-
c ? S.cloneElement(S.Children.only(a), K(K({}, E), { ref:
|
|
158
|
+
u && S.createElement(x, { sideCar: Me, removeScrollBar: l, shards: s, noRelative: h, noIsolation: p, inert: d, setCallbacks: i, allowPinchZoom: !!g, lockRef: n, gapMode: y }),
|
|
159
|
+
c ? S.cloneElement(S.Children.only(a), K(K({}, E), { ref: R })) : S.createElement(w, K({}, E, { className: f, ref: R }), a)
|
|
160
160
|
);
|
|
161
161
|
});
|
|
162
|
-
|
|
162
|
+
_t.defaultProps = {
|
|
163
163
|
enabled: !0,
|
|
164
164
|
removeScrollBar: !0,
|
|
165
165
|
inert: !1
|
|
166
166
|
};
|
|
167
|
-
|
|
168
|
-
fullWidth:
|
|
169
|
-
zeroRight:
|
|
167
|
+
_t.classNames = {
|
|
168
|
+
fullWidth: St,
|
|
169
|
+
zeroRight: xt
|
|
170
170
|
};
|
|
171
|
-
var
|
|
171
|
+
var fn = function() {
|
|
172
172
|
if (typeof __webpack_nonce__ < "u")
|
|
173
173
|
return __webpack_nonce__;
|
|
174
174
|
};
|
|
175
|
-
function
|
|
175
|
+
function dn() {
|
|
176
176
|
if (typeof document === "undefined")
|
|
177
177
|
return null;
|
|
178
178
|
var t = document.createElement("style");
|
|
179
179
|
t.type = "text/css";
|
|
180
|
-
var e =
|
|
180
|
+
var e = fn();
|
|
181
181
|
return e && t.setAttribute("nonce", e), t;
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function hn(t, e) {
|
|
184
184
|
t.styleSheet ? t.styleSheet.cssText = e : t.appendChild(document.createTextNode(e));
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function mn(t) {
|
|
187
187
|
var e = document.head || document.getElementsByTagName("head")[0];
|
|
188
188
|
e.appendChild(t);
|
|
189
189
|
}
|
|
190
|
-
var
|
|
190
|
+
var gn = function() {
|
|
191
191
|
var t = 0, e = null;
|
|
192
192
|
return {
|
|
193
193
|
add: function(n) {
|
|
194
|
-
t == 0 && (e =
|
|
194
|
+
t == 0 && (e = dn()) && (hn(e, n), mn(e)), t++;
|
|
195
195
|
},
|
|
196
196
|
remove: function() {
|
|
197
197
|
t--, !t && e && (e.parentNode && e.parentNode.removeChild(e), e = null);
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
|
-
},
|
|
201
|
-
var t =
|
|
200
|
+
}, vn = function() {
|
|
201
|
+
var t = gn();
|
|
202
202
|
return function(e, n) {
|
|
203
203
|
S.useEffect(function() {
|
|
204
204
|
return t.add(e), function() {
|
|
@@ -206,40 +206,40 @@ var hn = function() {
|
|
|
206
206
|
};
|
|
207
207
|
}, [e && n]);
|
|
208
208
|
};
|
|
209
|
-
},
|
|
210
|
-
var t =
|
|
209
|
+
}, _e = function() {
|
|
210
|
+
var t = vn(), e = function(n) {
|
|
211
211
|
var r = n.styles, o = n.dynamic;
|
|
212
212
|
return t(r, o), null;
|
|
213
213
|
};
|
|
214
214
|
return e;
|
|
215
|
-
},
|
|
215
|
+
}, pn = {
|
|
216
216
|
left: 0,
|
|
217
217
|
top: 0,
|
|
218
218
|
right: 0,
|
|
219
219
|
gap: 0
|
|
220
|
-
},
|
|
220
|
+
}, Wt = function(t) {
|
|
221
221
|
return parseInt(t || "", 10) || 0;
|
|
222
|
-
},
|
|
222
|
+
}, wn = function(t) {
|
|
223
223
|
var e = window.getComputedStyle(document.body), n = e[t === "padding" ? "paddingLeft" : "marginLeft"], r = e[t === "padding" ? "paddingTop" : "marginTop"], o = e[t === "padding" ? "paddingRight" : "marginRight"];
|
|
224
|
-
return [
|
|
225
|
-
},
|
|
224
|
+
return [Wt(n), Wt(r), Wt(o)];
|
|
225
|
+
}, yn = function(t) {
|
|
226
226
|
if (t === void 0 && (t = "margin"), typeof window > "u")
|
|
227
|
-
return
|
|
228
|
-
var e =
|
|
227
|
+
return pn;
|
|
228
|
+
var e = wn(t), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
229
229
|
return {
|
|
230
230
|
left: e[0],
|
|
231
231
|
top: e[1],
|
|
232
232
|
right: e[2],
|
|
233
233
|
gap: Math.max(0, r - n + e[2] - e[0])
|
|
234
234
|
};
|
|
235
|
-
},
|
|
235
|
+
}, bn = _e(), ct = "data-scroll-locked", xn = function(t, e, n, r) {
|
|
236
236
|
var o = t.left, i = t.top, c = t.right, a = t.gap;
|
|
237
237
|
return n === void 0 && (n = "margin"), `
|
|
238
|
-
.`.concat(
|
|
238
|
+
.`.concat(en, ` {
|
|
239
239
|
overflow: hidden `).concat(r, `;
|
|
240
240
|
padding-right: `).concat(a, "px ").concat(r, `;
|
|
241
241
|
}
|
|
242
|
-
body[`).concat(
|
|
242
|
+
body[`).concat(ct, `] {
|
|
243
243
|
overflow: hidden `).concat(r, `;
|
|
244
244
|
overscroll-behavior: contain;
|
|
245
245
|
`).concat([
|
|
@@ -256,273 +256,273 @@ var hn = function() {
|
|
|
256
256
|
].filter(Boolean).join(""), `
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
.`).concat(
|
|
259
|
+
.`).concat(xt, ` {
|
|
260
260
|
right: `).concat(a, "px ").concat(r, `;
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
.`).concat(
|
|
263
|
+
.`).concat(St, ` {
|
|
264
264
|
margin-right: `).concat(a, "px ").concat(r, `;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
.`).concat(
|
|
267
|
+
.`).concat(xt, " .").concat(xt, ` {
|
|
268
268
|
right: 0 `).concat(r, `;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
.`).concat(
|
|
271
|
+
.`).concat(St, " .").concat(St, ` {
|
|
272
272
|
margin-right: 0 `).concat(r, `;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
body[`).concat(
|
|
276
|
-
`).concat(
|
|
275
|
+
body[`).concat(ct, `] {
|
|
276
|
+
`).concat(nn, ": ").concat(a, `px;
|
|
277
277
|
}
|
|
278
278
|
`);
|
|
279
|
-
},
|
|
280
|
-
var t = parseInt(document.body.getAttribute(
|
|
279
|
+
}, oe = function() {
|
|
280
|
+
var t = parseInt(document.body.getAttribute(ct) || "0", 10);
|
|
281
281
|
return isFinite(t) ? t : 0;
|
|
282
|
-
},
|
|
282
|
+
}, Sn = function() {
|
|
283
283
|
S.useEffect(function() {
|
|
284
|
-
return document.body.setAttribute(
|
|
285
|
-
var t =
|
|
286
|
-
t <= 0 ? document.body.removeAttribute(
|
|
284
|
+
return document.body.setAttribute(ct, (oe() + 1).toString()), function() {
|
|
285
|
+
var t = oe() - 1;
|
|
286
|
+
t <= 0 ? document.body.removeAttribute(ct) : document.body.setAttribute(ct, t.toString());
|
|
287
287
|
};
|
|
288
288
|
}, []);
|
|
289
|
-
},
|
|
289
|
+
}, Rn = function(t) {
|
|
290
290
|
var e = t.noRelative, n = t.noImportant, r = t.gapMode, o = r === void 0 ? "margin" : r;
|
|
291
|
-
|
|
291
|
+
Sn();
|
|
292
292
|
var i = S.useMemo(function() {
|
|
293
|
-
return
|
|
293
|
+
return yn(o);
|
|
294
294
|
}, [o]);
|
|
295
|
-
return S.createElement(
|
|
296
|
-
},
|
|
295
|
+
return S.createElement(bn, { styles: xn(i, !e, o, n ? "" : "!important") });
|
|
296
|
+
}, Vt = !1;
|
|
297
297
|
if (typeof window < "u")
|
|
298
298
|
try {
|
|
299
|
-
var
|
|
299
|
+
var gt = Object.defineProperty({}, "passive", {
|
|
300
300
|
get: function() {
|
|
301
|
-
return
|
|
301
|
+
return Vt = !0, !0;
|
|
302
302
|
}
|
|
303
303
|
});
|
|
304
|
-
window.addEventListener("test",
|
|
304
|
+
window.addEventListener("test", gt, gt), window.removeEventListener("test", gt, gt);
|
|
305
305
|
} catch {
|
|
306
|
-
|
|
306
|
+
Vt = !1;
|
|
307
307
|
}
|
|
308
|
-
var
|
|
308
|
+
var rt = Vt ? { passive: !1 } : !1, Cn = function(t) {
|
|
309
309
|
return t.tagName === "TEXTAREA";
|
|
310
|
-
},
|
|
310
|
+
}, Pe = function(t, e) {
|
|
311
311
|
if (!(t instanceof Element))
|
|
312
312
|
return !1;
|
|
313
313
|
var n = window.getComputedStyle(t);
|
|
314
314
|
return (
|
|
315
315
|
// not-not-scrollable
|
|
316
316
|
n[e] !== "hidden" && // contains scroll inside self
|
|
317
|
-
!(n.overflowY === n.overflowX && !
|
|
317
|
+
!(n.overflowY === n.overflowX && !Cn(t) && n[e] === "visible")
|
|
318
318
|
);
|
|
319
|
-
},
|
|
320
|
-
return
|
|
321
|
-
},
|
|
322
|
-
return
|
|
323
|
-
},
|
|
319
|
+
}, En = function(t) {
|
|
320
|
+
return Pe(t, "overflowY");
|
|
321
|
+
}, An = function(t) {
|
|
322
|
+
return Pe(t, "overflowX");
|
|
323
|
+
}, ie = function(t, e) {
|
|
324
324
|
var n = e.ownerDocument, r = e;
|
|
325
325
|
do {
|
|
326
326
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
327
|
-
var o =
|
|
327
|
+
var o = ke(t, r);
|
|
328
328
|
if (o) {
|
|
329
|
-
var i =
|
|
329
|
+
var i = Le(t, r), c = i[1], a = i[2];
|
|
330
330
|
if (c > a)
|
|
331
331
|
return !0;
|
|
332
332
|
}
|
|
333
333
|
r = r.parentNode;
|
|
334
334
|
} while (r && r !== n.body);
|
|
335
335
|
return !1;
|
|
336
|
-
},
|
|
336
|
+
}, On = function(t) {
|
|
337
337
|
var e = t.scrollTop, n = t.scrollHeight, r = t.clientHeight;
|
|
338
338
|
return [
|
|
339
339
|
e,
|
|
340
340
|
n,
|
|
341
341
|
r
|
|
342
342
|
];
|
|
343
|
-
},
|
|
343
|
+
}, Mn = function(t) {
|
|
344
344
|
var e = t.scrollLeft, n = t.scrollWidth, r = t.clientWidth;
|
|
345
345
|
return [
|
|
346
346
|
e,
|
|
347
347
|
n,
|
|
348
348
|
r
|
|
349
349
|
];
|
|
350
|
-
}, Pe = function(t, e) {
|
|
351
|
-
return t === "v" ? Cn(e) : Rn(e);
|
|
352
350
|
}, ke = function(t, e) {
|
|
353
351
|
return t === "v" ? En(e) : An(e);
|
|
354
|
-
},
|
|
352
|
+
}, Le = function(t, e) {
|
|
353
|
+
return t === "v" ? On(e) : Mn(e);
|
|
354
|
+
}, _n = function(t, e) {
|
|
355
355
|
return t === "h" && e === "rtl" ? -1 : 1;
|
|
356
|
-
},
|
|
357
|
-
var i =
|
|
356
|
+
}, Pn = function(t, e, n, r, o) {
|
|
357
|
+
var i = _n(t, window.getComputedStyle(e).direction), c = i * r, a = n.target, f = e.contains(a), l = !1, u = c > 0, s = 0, m = 0;
|
|
358
358
|
do {
|
|
359
359
|
if (!a)
|
|
360
360
|
break;
|
|
361
|
-
var
|
|
362
|
-
(p || v) &&
|
|
361
|
+
var h = Le(t, a), p = h[0], d = h[1], g = h[2], v = d - g - i * p;
|
|
362
|
+
(p || v) && ke(t, a) && (s += v, m += p);
|
|
363
363
|
var w = a.parentNode;
|
|
364
364
|
a = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
|
|
365
365
|
} while (
|
|
366
366
|
// portaled content
|
|
367
|
-
!
|
|
368
|
-
|
|
367
|
+
!f && a !== document.body || // self content
|
|
368
|
+
f && (e.contains(a) || e === a)
|
|
369
369
|
);
|
|
370
|
-
return (
|
|
371
|
-
},
|
|
370
|
+
return (u && Math.abs(s) < 1 || !u && Math.abs(m) < 1) && (l = !0), l;
|
|
371
|
+
}, vt = function(t) {
|
|
372
372
|
return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
|
|
373
|
-
},
|
|
373
|
+
}, ce = function(t) {
|
|
374
374
|
return [t.deltaX, t.deltaY];
|
|
375
|
-
},
|
|
375
|
+
}, ae = function(t) {
|
|
376
376
|
return t && "current" in t ? t.current : t;
|
|
377
|
-
},
|
|
377
|
+
}, kn = function(t, e) {
|
|
378
378
|
return t[0] === e[0] && t[1] === e[1];
|
|
379
|
-
},
|
|
379
|
+
}, Ln = function(t) {
|
|
380
380
|
return `
|
|
381
381
|
.block-interactivity-`.concat(t, ` {pointer-events: none;}
|
|
382
382
|
.allow-interactivity-`).concat(t, ` {pointer-events: all;}
|
|
383
383
|
`);
|
|
384
|
-
},
|
|
385
|
-
function
|
|
386
|
-
var e = S.useRef([]), n = S.useRef([0, 0]), r = S.useRef(), o = S.useState(
|
|
384
|
+
}, Tn = 0, ot = [];
|
|
385
|
+
function Dn(t) {
|
|
386
|
+
var e = S.useRef([]), n = S.useRef([0, 0]), r = S.useRef(), o = S.useState(Tn++)[0], i = S.useState(_e)[0], c = S.useRef(t);
|
|
387
387
|
S.useEffect(function() {
|
|
388
388
|
c.current = t;
|
|
389
389
|
}, [t]), S.useEffect(function() {
|
|
390
390
|
if (t.inert) {
|
|
391
391
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
392
|
-
var d =
|
|
393
|
-
return d.forEach(function(
|
|
394
|
-
return
|
|
392
|
+
var d = tn([t.lockRef.current], (t.shards || []).map(ae), !0).filter(Boolean);
|
|
393
|
+
return d.forEach(function(g) {
|
|
394
|
+
return g.classList.add("allow-interactivity-".concat(o));
|
|
395
395
|
}), function() {
|
|
396
|
-
document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(
|
|
397
|
-
return
|
|
396
|
+
document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(g) {
|
|
397
|
+
return g.classList.remove("allow-interactivity-".concat(o));
|
|
398
398
|
});
|
|
399
399
|
};
|
|
400
400
|
}
|
|
401
401
|
}, [t.inert, t.lockRef.current, t.shards]);
|
|
402
|
-
var a = S.useCallback(function(d,
|
|
402
|
+
var a = S.useCallback(function(d, g) {
|
|
403
403
|
if ("touches" in d && d.touches.length === 2 || d.type === "wheel" && d.ctrlKey)
|
|
404
404
|
return !c.current.allowPinchZoom;
|
|
405
|
-
var v =
|
|
406
|
-
if ("touches" in d && E === "h" &&
|
|
405
|
+
var v = vt(d), w = n.current, y = "deltaX" in d ? d.deltaX : w[0] - v[0], b = "deltaY" in d ? d.deltaY : w[1] - v[1], x, R = d.target, E = Math.abs(y) > Math.abs(b) ? "h" : "v";
|
|
406
|
+
if ("touches" in d && E === "h" && R.type === "range")
|
|
407
407
|
return !1;
|
|
408
|
-
var
|
|
409
|
-
if (
|
|
408
|
+
var k = window.getSelection(), _ = k && k.anchorNode, C = _ ? _ === R || _.contains(R) : !1;
|
|
409
|
+
if (C)
|
|
410
410
|
return !1;
|
|
411
|
-
var O =
|
|
411
|
+
var O = ie(E, R);
|
|
412
412
|
if (!O)
|
|
413
413
|
return !0;
|
|
414
|
-
if (O ? x = E : (x = E === "v" ? "h" : "v", O =
|
|
414
|
+
if (O ? x = E : (x = E === "v" ? "h" : "v", O = ie(E, R)), !O)
|
|
415
415
|
return !1;
|
|
416
416
|
if (!r.current && "changedTouches" in d && (y || b) && (r.current = x), !x)
|
|
417
417
|
return !0;
|
|
418
|
-
var
|
|
419
|
-
return
|
|
420
|
-
}, []),
|
|
421
|
-
var
|
|
422
|
-
if (!(!
|
|
423
|
-
var v = "deltaY" in
|
|
424
|
-
return x.name ===
|
|
418
|
+
var P = r.current || x;
|
|
419
|
+
return Pn(P, g, d, P === "h" ? y : b);
|
|
420
|
+
}, []), f = S.useCallback(function(d) {
|
|
421
|
+
var g = d;
|
|
422
|
+
if (!(!ot.length || ot[ot.length - 1] !== i)) {
|
|
423
|
+
var v = "deltaY" in g ? ce(g) : vt(g), w = e.current.filter(function(x) {
|
|
424
|
+
return x.name === g.type && (x.target === g.target || g.target === x.shadowParent) && kn(x.delta, v);
|
|
425
425
|
})[0];
|
|
426
426
|
if (w && w.should) {
|
|
427
|
-
|
|
427
|
+
g.cancelable && g.preventDefault();
|
|
428
428
|
return;
|
|
429
429
|
}
|
|
430
430
|
if (!w) {
|
|
431
|
-
var y = (c.current.shards || []).map(
|
|
432
|
-
return x.contains(
|
|
433
|
-
}), b = y.length > 0 ? a(
|
|
434
|
-
b &&
|
|
431
|
+
var y = (c.current.shards || []).map(ae).filter(Boolean).filter(function(x) {
|
|
432
|
+
return x.contains(g.target);
|
|
433
|
+
}), b = y.length > 0 ? a(g, y[0]) : !c.current.noIsolation;
|
|
434
|
+
b && g.cancelable && g.preventDefault();
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
|
-
}, []), l = S.useCallback(function(d,
|
|
438
|
-
var y = { name: d, delta:
|
|
437
|
+
}, []), l = S.useCallback(function(d, g, v, w) {
|
|
438
|
+
var y = { name: d, delta: g, target: v, should: w, shadowParent: Nn(v) };
|
|
439
439
|
e.current.push(y), setTimeout(function() {
|
|
440
440
|
e.current = e.current.filter(function(b) {
|
|
441
441
|
return b !== y;
|
|
442
442
|
});
|
|
443
443
|
}, 1);
|
|
444
|
-
}, []),
|
|
445
|
-
n.current =
|
|
444
|
+
}, []), u = S.useCallback(function(d) {
|
|
445
|
+
n.current = vt(d), r.current = void 0;
|
|
446
446
|
}, []), s = S.useCallback(function(d) {
|
|
447
|
-
l(d.type,
|
|
448
|
-
}, []),
|
|
449
|
-
l(d.type,
|
|
447
|
+
l(d.type, ce(d), d.target, a(d, t.lockRef.current));
|
|
448
|
+
}, []), m = S.useCallback(function(d) {
|
|
449
|
+
l(d.type, vt(d), d.target, a(d, t.lockRef.current));
|
|
450
450
|
}, []);
|
|
451
451
|
S.useEffect(function() {
|
|
452
|
-
return
|
|
452
|
+
return ot.push(i), t.setCallbacks({
|
|
453
453
|
onScrollCapture: s,
|
|
454
454
|
onWheelCapture: s,
|
|
455
|
-
onTouchMoveCapture:
|
|
456
|
-
}), document.addEventListener("wheel",
|
|
457
|
-
|
|
455
|
+
onTouchMoveCapture: m
|
|
456
|
+
}), document.addEventListener("wheel", f, rt), document.addEventListener("touchmove", f, rt), document.addEventListener("touchstart", u, rt), function() {
|
|
457
|
+
ot = ot.filter(function(d) {
|
|
458
458
|
return d !== i;
|
|
459
|
-
}), document.removeEventListener("wheel",
|
|
459
|
+
}), document.removeEventListener("wheel", f, rt), document.removeEventListener("touchmove", f, rt), document.removeEventListener("touchstart", u, rt);
|
|
460
460
|
};
|
|
461
461
|
}, []);
|
|
462
|
-
var
|
|
462
|
+
var h = t.removeScrollBar, p = t.inert;
|
|
463
463
|
return S.createElement(
|
|
464
464
|
S.Fragment,
|
|
465
465
|
null,
|
|
466
|
-
p ? S.createElement(i, { styles:
|
|
467
|
-
|
|
466
|
+
p ? S.createElement(i, { styles: Ln(o) }) : null,
|
|
467
|
+
h ? S.createElement(Rn, { noRelative: t.noRelative, gapMode: t.gapMode }) : null
|
|
468
468
|
);
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Nn(t) {
|
|
471
471
|
for (var e = null; t !== null; )
|
|
472
472
|
t instanceof ShadowRoot && (e = t.host, t = t.host), t = t.parentNode;
|
|
473
473
|
return e;
|
|
474
474
|
}
|
|
475
|
-
const
|
|
476
|
-
var
|
|
477
|
-
return S.createElement(
|
|
475
|
+
const Bn = un(Me, Dn);
|
|
476
|
+
var Wn = S.forwardRef(function(t, e) {
|
|
477
|
+
return S.createElement(_t, K({}, t, { ref: e, sideCar: Bn }));
|
|
478
478
|
});
|
|
479
|
-
|
|
480
|
-
var
|
|
479
|
+
Wn.classNames = _t.classNames;
|
|
480
|
+
var Fn = function(t) {
|
|
481
481
|
if (typeof document > "u")
|
|
482
482
|
return null;
|
|
483
483
|
var e = Array.isArray(t) ? t[0] : t;
|
|
484
484
|
return e.ownerDocument.body;
|
|
485
|
-
},
|
|
486
|
-
return t && (t.host ||
|
|
487
|
-
},
|
|
485
|
+
}, it = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), wt = {}, Ft = 0, Te = function(t) {
|
|
486
|
+
return t && (t.host || Te(t.parentNode));
|
|
487
|
+
}, Hn = function(t, e) {
|
|
488
488
|
return e.map(function(n) {
|
|
489
489
|
if (t.contains(n))
|
|
490
490
|
return n;
|
|
491
|
-
var r =
|
|
491
|
+
var r = Te(n);
|
|
492
492
|
return r && t.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", t, ". Doing nothing"), null);
|
|
493
493
|
}).filter(function(n) {
|
|
494
494
|
return !!n;
|
|
495
495
|
});
|
|
496
|
-
},
|
|
497
|
-
var o =
|
|
498
|
-
|
|
499
|
-
var i =
|
|
496
|
+
}, $n = function(t, e, n, r) {
|
|
497
|
+
var o = Hn(e, Array.isArray(t) ? t : [t]);
|
|
498
|
+
wt[n] || (wt[n] = /* @__PURE__ */ new WeakMap());
|
|
499
|
+
var i = wt[n], c = [], a = /* @__PURE__ */ new Set(), f = new Set(o), l = function(s) {
|
|
500
500
|
!s || a.has(s) || (a.add(s), l(s.parentNode));
|
|
501
501
|
};
|
|
502
502
|
o.forEach(l);
|
|
503
|
-
var
|
|
504
|
-
!s ||
|
|
505
|
-
if (a.has(
|
|
506
|
-
|
|
503
|
+
var u = function(s) {
|
|
504
|
+
!s || f.has(s) || Array.prototype.forEach.call(s.children, function(m) {
|
|
505
|
+
if (a.has(m))
|
|
506
|
+
u(m);
|
|
507
507
|
else
|
|
508
508
|
try {
|
|
509
|
-
var
|
|
510
|
-
|
|
509
|
+
var h = m.getAttribute(r), p = h !== null && h !== "false", d = (it.get(m) || 0) + 1, g = (i.get(m) || 0) + 1;
|
|
510
|
+
it.set(m, d), i.set(m, g), c.push(m), d === 1 && p && pt.set(m, !0), g === 1 && m.setAttribute(n, "true"), p || m.setAttribute(r, "true");
|
|
511
511
|
} catch (v) {
|
|
512
|
-
console.error("aria-hidden: cannot operate on ",
|
|
512
|
+
console.error("aria-hidden: cannot operate on ", m, v);
|
|
513
513
|
}
|
|
514
514
|
});
|
|
515
515
|
};
|
|
516
|
-
return
|
|
516
|
+
return u(e), a.clear(), Ft++, function() {
|
|
517
517
|
c.forEach(function(s) {
|
|
518
|
-
var
|
|
519
|
-
|
|
520
|
-
}),
|
|
518
|
+
var m = it.get(s) - 1, h = i.get(s) - 1;
|
|
519
|
+
it.set(s, m), i.set(s, h), m || (pt.has(s) || s.removeAttribute(r), pt.delete(s)), h || s.removeAttribute(n);
|
|
520
|
+
}), Ft--, Ft || (it = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), wt = {});
|
|
521
521
|
};
|
|
522
|
-
},
|
|
522
|
+
}, to = function(t, e, n) {
|
|
523
523
|
n === void 0 && (n = "data-aria-hidden");
|
|
524
|
-
var r = Array.from(Array.isArray(t) ? t : [t]), o =
|
|
525
|
-
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))),
|
|
524
|
+
var r = Array.from(Array.isArray(t) ? t : [t]), o = Fn(t);
|
|
525
|
+
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), $n(r, o, n, "aria-hidden")) : function() {
|
|
526
526
|
return null;
|
|
527
527
|
};
|
|
528
528
|
};
|
|
@@ -535,121 +535,121 @@ function Pt() {
|
|
|
535
535
|
return t;
|
|
536
536
|
}).apply(this, arguments);
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function De(t, e) {
|
|
539
539
|
if (t == null) return {};
|
|
540
540
|
var n, r, o = {}, i = Object.keys(t);
|
|
541
541
|
for (r = 0; r < i.length; r++) e.indexOf(n = i[r]) >= 0 || (o[n] = t[n]);
|
|
542
542
|
return o;
|
|
543
543
|
}
|
|
544
|
-
function
|
|
545
|
-
var e =
|
|
544
|
+
function zt(t) {
|
|
545
|
+
var e = et(t), n = et(function(r) {
|
|
546
546
|
e.current && e.current(r);
|
|
547
547
|
});
|
|
548
548
|
return e.current = t, n.current;
|
|
549
549
|
}
|
|
550
|
-
var
|
|
550
|
+
var dt = function(t, e, n) {
|
|
551
551
|
return e === void 0 && (e = 0), n === void 0 && (n = 1), t > n ? n : t < e ? e : t;
|
|
552
|
-
},
|
|
552
|
+
}, ft = function(t) {
|
|
553
553
|
return "touches" in t;
|
|
554
|
-
},
|
|
554
|
+
}, jt = function(t) {
|
|
555
555
|
return t && t.ownerDocument.defaultView || self;
|
|
556
|
-
},
|
|
557
|
-
var r = t.getBoundingClientRect(), o =
|
|
556
|
+
}, se = function(t, e, n) {
|
|
557
|
+
var r = t.getBoundingClientRect(), o = ft(e) ? (function(i, c) {
|
|
558
558
|
for (var a = 0; a < i.length; a++) if (i[a].identifier === c) return i[a];
|
|
559
559
|
return i[0];
|
|
560
560
|
})(e.touches, n) : e;
|
|
561
|
-
return { left:
|
|
562
|
-
},
|
|
563
|
-
!
|
|
564
|
-
},
|
|
565
|
-
var e = t.onMove, n = t.onKey, r =
|
|
566
|
-
var
|
|
567
|
-
|
|
561
|
+
return { left: dt((o.pageX - (r.left + jt(t).pageXOffset)) / r.width), top: dt((o.pageY - (r.top + jt(t).pageYOffset)) / r.height) };
|
|
562
|
+
}, le = function(t) {
|
|
563
|
+
!ft(t) && t.preventDefault();
|
|
564
|
+
}, Ne = W.memo(function(t) {
|
|
565
|
+
var e = t.onMove, n = t.onKey, r = De(t, ["onMove", "onKey"]), o = et(null), i = zt(e), c = zt(n), a = et(null), f = et(!1), l = Ge(function() {
|
|
566
|
+
var h = function(g) {
|
|
567
|
+
le(g), (ft(g) ? g.touches.length > 0 : g.buttons > 0) && o.current ? i(se(o.current, g, a.current)) : d(!1);
|
|
568
568
|
}, p = function() {
|
|
569
569
|
return d(!1);
|
|
570
570
|
};
|
|
571
|
-
function d(
|
|
572
|
-
var v =
|
|
573
|
-
y(v ? "touchmove" : "mousemove",
|
|
571
|
+
function d(g) {
|
|
572
|
+
var v = f.current, w = jt(o.current), y = g ? w.addEventListener : w.removeEventListener;
|
|
573
|
+
y(v ? "touchmove" : "mousemove", h), y(v ? "touchend" : "mouseup", p);
|
|
574
574
|
}
|
|
575
|
-
return [function(
|
|
576
|
-
var v =
|
|
577
|
-
if (w && (
|
|
578
|
-
return x && !
|
|
579
|
-
})(v,
|
|
580
|
-
if (
|
|
581
|
-
|
|
575
|
+
return [function(g) {
|
|
576
|
+
var v = g.nativeEvent, w = o.current;
|
|
577
|
+
if (w && (le(v), !(function(b, x) {
|
|
578
|
+
return x && !ft(b);
|
|
579
|
+
})(v, f.current) && w)) {
|
|
580
|
+
if (ft(v)) {
|
|
581
|
+
f.current = !0;
|
|
582
582
|
var y = v.changedTouches || [];
|
|
583
583
|
y.length && (a.current = y[0].identifier);
|
|
584
584
|
}
|
|
585
|
-
w.focus(), i(
|
|
585
|
+
w.focus(), i(se(w, v, a.current)), d(!0);
|
|
586
586
|
}
|
|
587
|
-
}, function(
|
|
588
|
-
var v =
|
|
589
|
-
v < 37 || v > 40 || (
|
|
587
|
+
}, function(g) {
|
|
588
|
+
var v = g.which || g.keyCode;
|
|
589
|
+
v < 37 || v > 40 || (g.preventDefault(), c({ left: v === 39 ? 0.05 : v === 37 ? -0.05 : 0, top: v === 40 ? 0.05 : v === 38 ? -0.05 : 0 }));
|
|
590
590
|
}, d];
|
|
591
|
-
}, [c, i]),
|
|
591
|
+
}, [c, i]), u = l[0], s = l[1], m = l[2];
|
|
592
592
|
return Ct(function() {
|
|
593
|
-
return
|
|
594
|
-
}, [
|
|
595
|
-
}),
|
|
593
|
+
return m;
|
|
594
|
+
}, [m]), W.createElement("div", Pt({}, r, { onTouchStart: u, onMouseDown: u, className: "react-colorful__interactive", ref: o, onKeyDown: s, tabIndex: 0, role: "slider" }));
|
|
595
|
+
}), Ut = function(t) {
|
|
596
596
|
return t.filter(Boolean).join(" ");
|
|
597
|
-
},
|
|
598
|
-
var e = t.color, n = t.left, r = t.top, o = r === void 0 ? 0.5 : r, i =
|
|
597
|
+
}, Be = function(t) {
|
|
598
|
+
var e = t.color, n = t.left, r = t.top, o = r === void 0 ? 0.5 : r, i = Ut(["react-colorful__pointer", t.className]);
|
|
599
599
|
return W.createElement("div", { className: i, style: { top: 100 * o + "%", left: 100 * n + "%" } }, W.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: e } }));
|
|
600
600
|
}, D = function(t, e, n) {
|
|
601
601
|
return e === void 0 && (e = 0), n === void 0 && (n = Math.pow(10, e)), Math.round(n * t) / n;
|
|
602
|
-
}, Hn = function(t) {
|
|
603
|
-
return jn(zt(t));
|
|
604
|
-
}, zt = function(t) {
|
|
605
|
-
return t[0] === "#" && (t = t.substring(1)), t.length < 6 ? { r: parseInt(t[0] + t[0], 16), g: parseInt(t[1] + t[1], 16), b: parseInt(t[2] + t[2], 16), a: t.length === 4 ? D(parseInt(t[3] + t[3], 16) / 255, 2) : 1 } : { r: parseInt(t.substring(0, 2), 16), g: parseInt(t.substring(2, 4), 16), b: parseInt(t.substring(4, 6), 16), a: t.length === 8 ? D(parseInt(t.substring(6, 8), 16) / 255, 2) : 1 };
|
|
606
602
|
}, In = function(t) {
|
|
607
|
-
return
|
|
603
|
+
return Yn(Xt(t));
|
|
604
|
+
}, Xt = function(t) {
|
|
605
|
+
return t[0] === "#" && (t = t.substring(1)), t.length < 6 ? { r: parseInt(t[0] + t[0], 16), g: parseInt(t[1] + t[1], 16), b: parseInt(t[2] + t[2], 16), a: t.length === 4 ? D(parseInt(t[3] + t[3], 16) / 255, 2) : 1 } : { r: parseInt(t.substring(0, 2), 16), g: parseInt(t.substring(2, 4), 16), b: parseInt(t.substring(4, 6), 16), a: t.length === 8 ? D(parseInt(t.substring(6, 8), 16) / 255, 2) : 1 };
|
|
608
606
|
}, Vn = function(t) {
|
|
607
|
+
return Xn(jn(t));
|
|
608
|
+
}, zn = function(t) {
|
|
609
609
|
var e = t.s, n = t.v, r = t.a, o = (200 - e) * n / 100;
|
|
610
610
|
return { h: D(t.h), s: D(o > 0 && o < 200 ? e * n / 100 / (o <= 100 ? o : 200 - o) * 100 : 0), l: D(o / 2), a: D(r, 2) };
|
|
611
|
-
},
|
|
612
|
-
var e =
|
|
611
|
+
}, Yt = function(t) {
|
|
612
|
+
var e = zn(t);
|
|
613
613
|
return "hsl(" + e.h + ", " + e.s + "%, " + e.l + "%)";
|
|
614
|
-
},
|
|
614
|
+
}, jn = function(t) {
|
|
615
615
|
var e = t.h, n = t.s, r = t.v, o = t.a;
|
|
616
616
|
e = e / 360 * 6, n /= 100, r /= 100;
|
|
617
|
-
var i = Math.floor(e), c = r * (1 - n), a = r * (1 - (e - i) * n),
|
|
618
|
-
return { r: D(255 * [r, a, c, c,
|
|
619
|
-
},
|
|
617
|
+
var i = Math.floor(e), c = r * (1 - n), a = r * (1 - (e - i) * n), f = r * (1 - (1 - e + i) * n), l = i % 6;
|
|
618
|
+
return { r: D(255 * [r, a, c, c, f, r][l]), g: D(255 * [f, r, r, a, c, c][l]), b: D(255 * [c, c, f, r, r, a][l]), a: D(o, 2) };
|
|
619
|
+
}, yt = function(t) {
|
|
620
620
|
var e = t.toString(16);
|
|
621
621
|
return e.length < 2 ? "0" + e : e;
|
|
622
|
-
},
|
|
623
|
-
var e = t.r, n = t.g, r = t.b, o = t.a, i = o < 1 ?
|
|
624
|
-
return "#" +
|
|
625
|
-
},
|
|
622
|
+
}, Xn = function(t) {
|
|
623
|
+
var e = t.r, n = t.g, r = t.b, o = t.a, i = o < 1 ? yt(D(255 * o)) : "";
|
|
624
|
+
return "#" + yt(e) + yt(n) + yt(r) + i;
|
|
625
|
+
}, Yn = function(t) {
|
|
626
626
|
var e = t.r, n = t.g, r = t.b, o = t.a, i = Math.max(e, n, r), c = i - Math.min(e, n, r), a = c ? i === e ? (n - r) / c : i === n ? 2 + (r - e) / c : 4 + (e - n) / c : 0;
|
|
627
627
|
return { h: D(60 * (a < 0 ? a + 6 : a)), s: D(i ? c / i * 100 : 0), v: D(i / 255 * 100), a: o };
|
|
628
|
-
},
|
|
629
|
-
var e = t.hue, n = t.onChange, r =
|
|
630
|
-
return W.createElement("div", { className: r }, W.createElement(
|
|
628
|
+
}, qn = W.memo(function(t) {
|
|
629
|
+
var e = t.hue, n = t.onChange, r = Ut(["react-colorful__hue", t.className]);
|
|
630
|
+
return W.createElement("div", { className: r }, W.createElement(Ne, { onMove: function(o) {
|
|
631
631
|
n({ h: 360 * o.left });
|
|
632
632
|
}, onKey: function(o) {
|
|
633
|
-
n({ h:
|
|
634
|
-
}, "aria-label": "Hue", "aria-valuenow": D(e), "aria-valuemax": "360", "aria-valuemin": "0" }, W.createElement(
|
|
635
|
-
}),
|
|
636
|
-
var e = t.hsva, n = t.onChange, r = { backgroundColor:
|
|
637
|
-
return W.createElement("div", { className: "react-colorful__saturation", style: r }, W.createElement(
|
|
633
|
+
n({ h: dt(e + 360 * o.left, 0, 360) });
|
|
634
|
+
}, "aria-label": "Hue", "aria-valuenow": D(e), "aria-valuemax": "360", "aria-valuemin": "0" }, W.createElement(Be, { className: "react-colorful__hue-pointer", left: e / 360, color: Yt({ h: e, s: 100, v: 100, a: 1 }) })));
|
|
635
|
+
}), Kn = W.memo(function(t) {
|
|
636
|
+
var e = t.hsva, n = t.onChange, r = { backgroundColor: Yt({ h: e.h, s: 100, v: 100, a: 1 }) };
|
|
637
|
+
return W.createElement("div", { className: "react-colorful__saturation", style: r }, W.createElement(Ne, { onMove: function(o) {
|
|
638
638
|
n({ s: 100 * o.left, v: 100 - 100 * o.top });
|
|
639
639
|
}, onKey: function(o) {
|
|
640
|
-
n({ s:
|
|
641
|
-
}, "aria-label": "Color", "aria-valuetext": "Saturation " + D(e.s) + "%, Brightness " + D(e.v) + "%" }, W.createElement(
|
|
642
|
-
}),
|
|
640
|
+
n({ s: dt(e.s + 100 * o.left, 0, 100), v: dt(e.v - 100 * o.top, 0, 100) });
|
|
641
|
+
}, "aria-label": "Color", "aria-valuetext": "Saturation " + D(e.s) + "%, Brightness " + D(e.v) + "%" }, W.createElement(Be, { className: "react-colorful__saturation-pointer", top: 1 - e.v / 100, left: e.s / 100, color: Yt(e) })));
|
|
642
|
+
}), We = function(t, e) {
|
|
643
643
|
if (t === e) return !0;
|
|
644
644
|
for (var n in t) if (t[n] !== e[n]) return !1;
|
|
645
645
|
return !0;
|
|
646
|
-
},
|
|
647
|
-
return t.toLowerCase() === e.toLowerCase() ||
|
|
646
|
+
}, Un = function(t, e) {
|
|
647
|
+
return t.toLowerCase() === e.toLowerCase() || We(Xt(t), Xt(e));
|
|
648
648
|
};
|
|
649
|
-
function
|
|
650
|
-
var r =
|
|
649
|
+
function Zn(t, e, n) {
|
|
650
|
+
var r = zt(n), o = Ce(function() {
|
|
651
651
|
return t.toHsva(e);
|
|
652
|
-
}), i = o[0], c = o[1], a =
|
|
652
|
+
}), i = o[0], c = o[1], a = et({ color: e, hsva: i });
|
|
653
653
|
Ct(function() {
|
|
654
654
|
if (!t.equal(e, a.current.color)) {
|
|
655
655
|
var l = t.toHsva(e);
|
|
@@ -657,93 +657,90 @@ function Kn(t, e, n) {
|
|
|
657
657
|
}
|
|
658
658
|
}, [e, t]), Ct(function() {
|
|
659
659
|
var l;
|
|
660
|
-
|
|
660
|
+
We(i, a.current.hsva) || t.equal(l = t.fromHsva(i), a.current.color) || (a.current = { hsva: i, color: l }, r(l));
|
|
661
661
|
}, [i, t, r]);
|
|
662
|
-
var
|
|
663
|
-
c(function(
|
|
664
|
-
return Object.assign({},
|
|
662
|
+
var f = Qe(function(l) {
|
|
663
|
+
c(function(u) {
|
|
664
|
+
return Object.assign({}, u, l);
|
|
665
665
|
});
|
|
666
666
|
}, []);
|
|
667
|
-
return [i,
|
|
667
|
+
return [i, f];
|
|
668
668
|
}
|
|
669
|
-
var
|
|
669
|
+
var Qn = typeof window < "u" ? Ee : Ct, Gn = function() {
|
|
670
670
|
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
|
|
671
|
-
},
|
|
672
|
-
|
|
671
|
+
}, ue = /* @__PURE__ */ new Map(), Jn = function(t) {
|
|
672
|
+
Qn(function() {
|
|
673
673
|
var e = t.current ? t.current.ownerDocument : document;
|
|
674
|
-
if (e !== void 0 && !
|
|
674
|
+
if (e !== void 0 && !ue.has(e)) {
|
|
675
675
|
var n = e.createElement("style");
|
|
676
|
-
n.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,
|
|
677
|
-
var r =
|
|
676
|
+
n.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, ue.set(e, n);
|
|
677
|
+
var r = Gn();
|
|
678
678
|
r && n.setAttribute("nonce", r), e.head.appendChild(n);
|
|
679
679
|
}
|
|
680
680
|
}, []);
|
|
681
|
-
},
|
|
682
|
-
var e = t.className, n = t.colorModel, r = t.color, o = r === void 0 ? n.defaultColor : r, i = t.onChange, c =
|
|
683
|
-
|
|
684
|
-
var
|
|
685
|
-
return W.createElement("div", Pt({}, c, { ref: a, className: s }), W.createElement(
|
|
686
|
-
},
|
|
687
|
-
return
|
|
688
|
-
}, equal:
|
|
689
|
-
return W.createElement(
|
|
681
|
+
}, tr = function(t) {
|
|
682
|
+
var e = t.className, n = t.colorModel, r = t.color, o = r === void 0 ? n.defaultColor : r, i = t.onChange, c = De(t, ["className", "colorModel", "color", "onChange"]), a = et(null);
|
|
683
|
+
Jn(a);
|
|
684
|
+
var f = Zn(n, o, i), l = f[0], u = f[1], s = Ut(["react-colorful", e]);
|
|
685
|
+
return W.createElement("div", Pt({}, c, { ref: a, className: s }), W.createElement(Kn, { hsva: l, onChange: u }), W.createElement(qn, { hue: l.h, onChange: u, className: "react-colorful__last-control" }));
|
|
686
|
+
}, er = { defaultColor: "000", toHsva: In, fromHsva: function(t) {
|
|
687
|
+
return Vn({ h: t.h, s: t.s, v: t.v, a: 1 });
|
|
688
|
+
}, equal: Un }, eo = function(t) {
|
|
689
|
+
return W.createElement(tr, Pt({}, t, { colorModel: er }));
|
|
690
690
|
};
|
|
691
|
-
const
|
|
691
|
+
const Fe = ["top", "right", "bottom", "left"], fe = ["start", "end"], de = /* @__PURE__ */ Fe.reduce((t, e) => t.concat(e, e + "-" + fe[0], e + "-" + fe[1]), []), j = Math.min, B = Math.max, Et = Math.round, bt = Math.floor, U = (t) => ({
|
|
692
692
|
x: t,
|
|
693
693
|
y: t
|
|
694
|
-
}),
|
|
694
|
+
}), nr = {
|
|
695
695
|
left: "right",
|
|
696
696
|
right: "left",
|
|
697
697
|
bottom: "top",
|
|
698
698
|
top: "bottom"
|
|
699
|
-
}, er = {
|
|
700
|
-
start: "end",
|
|
701
|
-
end: "start"
|
|
702
699
|
};
|
|
703
|
-
function
|
|
700
|
+
function qt(t, e, n) {
|
|
704
701
|
return B(t, j(e, n));
|
|
705
702
|
}
|
|
706
703
|
function X(t, e) {
|
|
707
704
|
return typeof t == "function" ? t(e) : t;
|
|
708
705
|
}
|
|
709
|
-
function
|
|
706
|
+
function I(t) {
|
|
710
707
|
return t.split("-")[0];
|
|
711
708
|
}
|
|
712
709
|
function z(t) {
|
|
713
710
|
return t.split("-")[1];
|
|
714
711
|
}
|
|
715
|
-
function
|
|
712
|
+
function Zt(t) {
|
|
716
713
|
return t === "x" ? "y" : "x";
|
|
717
714
|
}
|
|
718
|
-
function
|
|
715
|
+
function Qt(t) {
|
|
719
716
|
return t === "y" ? "height" : "width";
|
|
720
717
|
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
return
|
|
718
|
+
function V(t) {
|
|
719
|
+
const e = t[0];
|
|
720
|
+
return e === "t" || e === "b" ? "y" : "x";
|
|
724
721
|
}
|
|
725
|
-
function
|
|
726
|
-
return
|
|
722
|
+
function Gt(t) {
|
|
723
|
+
return Zt(V(t));
|
|
727
724
|
}
|
|
728
|
-
function
|
|
725
|
+
function He(t, e, n) {
|
|
729
726
|
n === void 0 && (n = !1);
|
|
730
|
-
const r = z(t), o =
|
|
727
|
+
const r = z(t), o = Gt(t), i = Qt(o);
|
|
731
728
|
let c = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
732
|
-
return e.reference[i] > e.floating[i] && (c =
|
|
729
|
+
return e.reference[i] > e.floating[i] && (c = Ot(c)), [c, Ot(c)];
|
|
733
730
|
}
|
|
734
731
|
function rr(t) {
|
|
735
|
-
const e =
|
|
736
|
-
return [
|
|
732
|
+
const e = Ot(t);
|
|
733
|
+
return [At(t), e, At(e)];
|
|
737
734
|
}
|
|
738
|
-
function
|
|
739
|
-
return t.replace(
|
|
735
|
+
function At(t) {
|
|
736
|
+
return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
|
|
740
737
|
}
|
|
741
|
-
const
|
|
738
|
+
const he = ["left", "right"], me = ["right", "left"], or = ["top", "bottom"], ir = ["bottom", "top"];
|
|
742
739
|
function cr(t, e, n) {
|
|
743
740
|
switch (t) {
|
|
744
741
|
case "top":
|
|
745
742
|
case "bottom":
|
|
746
|
-
return n ? e ?
|
|
743
|
+
return n ? e ? me : he : e ? he : me;
|
|
747
744
|
case "left":
|
|
748
745
|
case "right":
|
|
749
746
|
return e ? or : ir;
|
|
@@ -753,11 +750,12 @@ function cr(t, e, n) {
|
|
|
753
750
|
}
|
|
754
751
|
function ar(t, e, n, r) {
|
|
755
752
|
const o = z(t);
|
|
756
|
-
let i = cr(
|
|
757
|
-
return o && (i = i.map((c) => c + "-" + o), e && (i = i.concat(i.map(
|
|
753
|
+
let i = cr(I(t), n === "start", r);
|
|
754
|
+
return o && (i = i.map((c) => c + "-" + o), e && (i = i.concat(i.map(At)))), i;
|
|
758
755
|
}
|
|
759
|
-
function
|
|
760
|
-
|
|
756
|
+
function Ot(t) {
|
|
757
|
+
const e = I(t);
|
|
758
|
+
return nr[e] + t.slice(e.length);
|
|
761
759
|
}
|
|
762
760
|
function sr(t) {
|
|
763
761
|
return {
|
|
@@ -768,7 +766,7 @@ function sr(t) {
|
|
|
768
766
|
...t
|
|
769
767
|
};
|
|
770
768
|
}
|
|
771
|
-
function
|
|
769
|
+
function Jt(t) {
|
|
772
770
|
return typeof t != "number" ? sr(t) : {
|
|
773
771
|
top: t,
|
|
774
772
|
right: t,
|
|
@@ -776,7 +774,7 @@ function Qt(t) {
|
|
|
776
774
|
left: t
|
|
777
775
|
};
|
|
778
776
|
}
|
|
779
|
-
function
|
|
777
|
+
function st(t) {
|
|
780
778
|
const {
|
|
781
779
|
x: e,
|
|
782
780
|
y: n,
|
|
@@ -794,53 +792,53 @@ function at(t) {
|
|
|
794
792
|
y: n
|
|
795
793
|
};
|
|
796
794
|
}
|
|
797
|
-
function
|
|
795
|
+
function ge(t, e, n) {
|
|
798
796
|
let {
|
|
799
797
|
reference: r,
|
|
800
798
|
floating: o
|
|
801
799
|
} = t;
|
|
802
|
-
const i =
|
|
803
|
-
let
|
|
804
|
-
switch (
|
|
800
|
+
const i = V(e), c = Gt(e), a = Qt(c), f = I(e), l = i === "y", u = r.x + r.width / 2 - o.width / 2, s = r.y + r.height / 2 - o.height / 2, m = r[a] / 2 - o[a] / 2;
|
|
801
|
+
let h;
|
|
802
|
+
switch (f) {
|
|
805
803
|
case "top":
|
|
806
|
-
|
|
807
|
-
x:
|
|
804
|
+
h = {
|
|
805
|
+
x: u,
|
|
808
806
|
y: r.y - o.height
|
|
809
807
|
};
|
|
810
808
|
break;
|
|
811
809
|
case "bottom":
|
|
812
|
-
|
|
813
|
-
x:
|
|
810
|
+
h = {
|
|
811
|
+
x: u,
|
|
814
812
|
y: r.y + r.height
|
|
815
813
|
};
|
|
816
814
|
break;
|
|
817
815
|
case "right":
|
|
818
|
-
|
|
816
|
+
h = {
|
|
819
817
|
x: r.x + r.width,
|
|
820
818
|
y: s
|
|
821
819
|
};
|
|
822
820
|
break;
|
|
823
821
|
case "left":
|
|
824
|
-
|
|
822
|
+
h = {
|
|
825
823
|
x: r.x - o.width,
|
|
826
824
|
y: s
|
|
827
825
|
};
|
|
828
826
|
break;
|
|
829
827
|
default:
|
|
830
|
-
|
|
828
|
+
h = {
|
|
831
829
|
x: r.x,
|
|
832
830
|
y: r.y
|
|
833
831
|
};
|
|
834
832
|
}
|
|
835
833
|
switch (z(e)) {
|
|
836
834
|
case "start":
|
|
837
|
-
|
|
835
|
+
h[c] -= m * (n && l ? -1 : 1);
|
|
838
836
|
break;
|
|
839
837
|
case "end":
|
|
840
|
-
|
|
838
|
+
h[c] += m * (n && l ? -1 : 1);
|
|
841
839
|
break;
|
|
842
840
|
}
|
|
843
|
-
return
|
|
841
|
+
return h;
|
|
844
842
|
}
|
|
845
843
|
async function lr(t, e) {
|
|
846
844
|
var n;
|
|
@@ -851,18 +849,18 @@ async function lr(t, e) {
|
|
|
851
849
|
platform: i,
|
|
852
850
|
rects: c,
|
|
853
851
|
elements: a,
|
|
854
|
-
strategy:
|
|
852
|
+
strategy: f
|
|
855
853
|
} = t, {
|
|
856
854
|
boundary: l = "clippingAncestors",
|
|
857
|
-
rootBoundary:
|
|
855
|
+
rootBoundary: u = "viewport",
|
|
858
856
|
elementContext: s = "floating",
|
|
859
|
-
altBoundary:
|
|
860
|
-
padding:
|
|
861
|
-
} = X(e, t), p =
|
|
862
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(
|
|
857
|
+
altBoundary: m = !1,
|
|
858
|
+
padding: h = 0
|
|
859
|
+
} = X(e, t), p = Jt(h), g = a[m ? s === "floating" ? "reference" : "floating" : s], v = st(await i.getClippingRect({
|
|
860
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(g))) == null || n ? g : g.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
|
|
863
861
|
boundary: l,
|
|
864
|
-
rootBoundary:
|
|
865
|
-
strategy:
|
|
862
|
+
rootBoundary: u,
|
|
863
|
+
strategy: f
|
|
866
864
|
})), w = s === "floating" ? {
|
|
867
865
|
x: r,
|
|
868
866
|
y: o,
|
|
@@ -874,11 +872,11 @@ async function lr(t, e) {
|
|
|
874
872
|
} : {
|
|
875
873
|
x: 1,
|
|
876
874
|
y: 1
|
|
877
|
-
}, x =
|
|
875
|
+
}, x = st(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
878
876
|
elements: a,
|
|
879
877
|
rect: w,
|
|
880
878
|
offsetParent: y,
|
|
881
|
-
strategy:
|
|
879
|
+
strategy: f
|
|
882
880
|
}) : w);
|
|
883
881
|
return {
|
|
884
882
|
top: (v.top - x.top + p.top) / b.y,
|
|
@@ -887,71 +885,71 @@ async function lr(t, e) {
|
|
|
887
885
|
right: (x.right - v.right + p.right) / b.x
|
|
888
886
|
};
|
|
889
887
|
}
|
|
890
|
-
const ur = async (t, e, n) => {
|
|
888
|
+
const ur = 50, fr = async (t, e, n) => {
|
|
891
889
|
const {
|
|
892
890
|
placement: r = "bottom",
|
|
893
891
|
strategy: o = "absolute",
|
|
894
892
|
middleware: i = [],
|
|
895
893
|
platform: c
|
|
896
|
-
} = n, a =
|
|
894
|
+
} = n, a = c.detectOverflow ? c : {
|
|
895
|
+
...c,
|
|
896
|
+
detectOverflow: lr
|
|
897
|
+
}, f = await (c.isRTL == null ? void 0 : c.isRTL(e));
|
|
897
898
|
let l = await c.getElementRects({
|
|
898
899
|
reference: t,
|
|
899
900
|
floating: e,
|
|
900
901
|
strategy: o
|
|
901
902
|
}), {
|
|
902
|
-
x:
|
|
903
|
+
x: u,
|
|
903
904
|
y: s
|
|
904
|
-
} =
|
|
905
|
-
|
|
906
|
-
|
|
905
|
+
} = ge(l, r, f), m = r, h = 0;
|
|
906
|
+
const p = {};
|
|
907
|
+
for (let d = 0; d < i.length; d++) {
|
|
908
|
+
const g = i[d];
|
|
909
|
+
if (!g)
|
|
910
|
+
continue;
|
|
907
911
|
const {
|
|
908
912
|
name: v,
|
|
909
913
|
fn: w
|
|
910
|
-
} =
|
|
914
|
+
} = g, {
|
|
911
915
|
x: y,
|
|
912
916
|
y: b,
|
|
913
917
|
data: x,
|
|
914
|
-
reset:
|
|
918
|
+
reset: R
|
|
915
919
|
} = await w({
|
|
916
|
-
x:
|
|
920
|
+
x: u,
|
|
917
921
|
y: s,
|
|
918
922
|
initialPlacement: r,
|
|
919
|
-
placement:
|
|
923
|
+
placement: m,
|
|
920
924
|
strategy: o,
|
|
921
|
-
middlewareData:
|
|
925
|
+
middlewareData: p,
|
|
922
926
|
rects: l,
|
|
923
|
-
platform:
|
|
924
|
-
...c,
|
|
925
|
-
detectOverflow: (d = c.detectOverflow) != null ? d : lr
|
|
926
|
-
},
|
|
927
|
+
platform: a,
|
|
927
928
|
elements: {
|
|
928
929
|
reference: t,
|
|
929
930
|
floating: e
|
|
930
931
|
}
|
|
931
932
|
});
|
|
932
|
-
|
|
933
|
-
...
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
...x
|
|
937
|
-
}
|
|
938
|
-
}, C && p <= 50 && (p++, typeof C == "object" && (C.placement && (g = C.placement), C.rects && (l = C.rects === !0 ? await c.getElementRects({
|
|
933
|
+
u = y ?? u, s = b ?? s, p[v] = {
|
|
934
|
+
...p[v],
|
|
935
|
+
...x
|
|
936
|
+
}, R && h < ur && (h++, typeof R == "object" && (R.placement && (m = R.placement), R.rects && (l = R.rects === !0 ? await c.getElementRects({
|
|
939
937
|
reference: t,
|
|
940
938
|
floating: e,
|
|
941
939
|
strategy: o
|
|
942
|
-
}) :
|
|
943
|
-
x:
|
|
940
|
+
}) : R.rects), {
|
|
941
|
+
x: u,
|
|
944
942
|
y: s
|
|
945
|
-
} =
|
|
943
|
+
} = ge(l, m, f)), d = -1);
|
|
946
944
|
}
|
|
947
945
|
return {
|
|
948
|
-
x:
|
|
946
|
+
x: u,
|
|
949
947
|
y: s,
|
|
950
|
-
placement:
|
|
948
|
+
placement: m,
|
|
951
949
|
strategy: o,
|
|
952
|
-
middlewareData:
|
|
950
|
+
middlewareData: p
|
|
953
951
|
};
|
|
954
|
-
},
|
|
952
|
+
}, dr = (t) => ({
|
|
955
953
|
name: "arrow",
|
|
956
954
|
options: t,
|
|
957
955
|
async fn(e) {
|
|
@@ -962,24 +960,24 @@ const ur = async (t, e, n) => {
|
|
|
962
960
|
rects: i,
|
|
963
961
|
platform: c,
|
|
964
962
|
elements: a,
|
|
965
|
-
middlewareData:
|
|
963
|
+
middlewareData: f
|
|
966
964
|
} = e, {
|
|
967
965
|
element: l,
|
|
968
|
-
padding:
|
|
966
|
+
padding: u = 0
|
|
969
967
|
} = X(t, e) || {};
|
|
970
968
|
if (l == null)
|
|
971
969
|
return {};
|
|
972
|
-
const s =
|
|
970
|
+
const s = Jt(u), m = {
|
|
973
971
|
x: n,
|
|
974
972
|
y: r
|
|
975
|
-
},
|
|
976
|
-
let E =
|
|
977
|
-
(!E || !await (c.isElement == null ? void 0 : c.isElement(
|
|
978
|
-
const
|
|
973
|
+
}, h = Gt(o), p = Qt(h), d = await c.getDimensions(l), g = h === "y", v = g ? "top" : "left", w = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = i.reference[p] + i.reference[h] - m[h] - i.floating[p], x = m[h] - i.reference[h], R = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(l));
|
|
974
|
+
let E = R ? R[y] : 0;
|
|
975
|
+
(!E || !await (c.isElement == null ? void 0 : c.isElement(R))) && (E = a.floating[y] || i.floating[p]);
|
|
976
|
+
const k = b / 2 - x / 2, _ = E / 2 - d[p] / 2 - 1, C = j(s[v], _), O = j(s[w], _), P = C, L = E - d[p] - O, M = E / 2 - d[p] / 2 + k, F = qt(P, M, L), T = !f.arrow && z(o) != null && M !== F && i.reference[p] / 2 - (M < P ? C : O) - d[p] / 2 < 0, N = T ? M < P ? M - P : M - L : 0;
|
|
979
977
|
return {
|
|
980
|
-
[
|
|
978
|
+
[h]: m[h] + N,
|
|
981
979
|
data: {
|
|
982
|
-
[
|
|
980
|
+
[h]: F,
|
|
983
981
|
centerOffset: M - F - N,
|
|
984
982
|
...T && {
|
|
985
983
|
alignmentOffset: N
|
|
@@ -989,10 +987,10 @@ const ur = async (t, e, n) => {
|
|
|
989
987
|
};
|
|
990
988
|
}
|
|
991
989
|
});
|
|
992
|
-
function
|
|
993
|
-
return (t ? [...n.filter((o) => z(o) === t), ...n.filter((o) => z(o) !== t)] : n.filter((o) =>
|
|
990
|
+
function hr(t, e, n) {
|
|
991
|
+
return (t ? [...n.filter((o) => z(o) === t), ...n.filter((o) => z(o) !== t)] : n.filter((o) => I(o) === o)).filter((o) => t ? z(o) === t || (e ? At(o) !== o : !1) : !0);
|
|
994
992
|
}
|
|
995
|
-
const
|
|
993
|
+
const mr = function(t) {
|
|
996
994
|
return t === void 0 && (t = {}), {
|
|
997
995
|
name: "autoPlacement",
|
|
998
996
|
options: t,
|
|
@@ -1002,65 +1000,65 @@ const hr = function(t) {
|
|
|
1002
1000
|
rects: i,
|
|
1003
1001
|
middlewareData: c,
|
|
1004
1002
|
placement: a,
|
|
1005
|
-
platform:
|
|
1003
|
+
platform: f,
|
|
1006
1004
|
elements: l
|
|
1007
1005
|
} = e, {
|
|
1008
|
-
crossAxis:
|
|
1006
|
+
crossAxis: u = !1,
|
|
1009
1007
|
alignment: s,
|
|
1010
|
-
allowedPlacements:
|
|
1011
|
-
autoAlignment:
|
|
1008
|
+
allowedPlacements: m = de,
|
|
1009
|
+
autoAlignment: h = !0,
|
|
1012
1010
|
...p
|
|
1013
|
-
} = X(t, e), d = s !== void 0 ||
|
|
1011
|
+
} = X(t, e), d = s !== void 0 || m === de ? hr(s || null, h, m) : m, g = await f.detectOverflow(e, p), v = ((n = c.autoPlacement) == null ? void 0 : n.index) || 0, w = d[v];
|
|
1014
1012
|
if (w == null)
|
|
1015
1013
|
return {};
|
|
1016
|
-
const y =
|
|
1014
|
+
const y = He(w, i, await (f.isRTL == null ? void 0 : f.isRTL(l.floating)));
|
|
1017
1015
|
if (a !== w)
|
|
1018
1016
|
return {
|
|
1019
1017
|
reset: {
|
|
1020
1018
|
placement: d[0]
|
|
1021
1019
|
}
|
|
1022
1020
|
};
|
|
1023
|
-
const b = [
|
|
1021
|
+
const b = [g[I(w)], g[y[0]], g[y[1]]], x = [...((r = c.autoPlacement) == null ? void 0 : r.overflows) || [], {
|
|
1024
1022
|
placement: w,
|
|
1025
1023
|
overflows: b
|
|
1026
|
-
}],
|
|
1027
|
-
if (
|
|
1024
|
+
}], R = d[v + 1];
|
|
1025
|
+
if (R)
|
|
1028
1026
|
return {
|
|
1029
1027
|
data: {
|
|
1030
1028
|
index: v + 1,
|
|
1031
1029
|
overflows: x
|
|
1032
1030
|
},
|
|
1033
1031
|
reset: {
|
|
1034
|
-
placement:
|
|
1032
|
+
placement: R
|
|
1035
1033
|
}
|
|
1036
1034
|
};
|
|
1037
|
-
const E = x.map((
|
|
1038
|
-
const O = z(
|
|
1039
|
-
return [
|
|
1035
|
+
const E = x.map((C) => {
|
|
1036
|
+
const O = z(C.placement);
|
|
1037
|
+
return [C.placement, O && u ? (
|
|
1040
1038
|
// Check along the mainAxis and main crossAxis side.
|
|
1041
|
-
|
|
1039
|
+
C.overflows.slice(0, 2).reduce((P, L) => P + L, 0)
|
|
1042
1040
|
) : (
|
|
1043
1041
|
// Check only the mainAxis.
|
|
1044
|
-
|
|
1045
|
-
),
|
|
1046
|
-
}).sort((
|
|
1042
|
+
C.overflows[0]
|
|
1043
|
+
), C.overflows];
|
|
1044
|
+
}).sort((C, O) => C[1] - O[1]), _ = ((o = E.filter((C) => C[2].slice(
|
|
1047
1045
|
0,
|
|
1048
1046
|
// Aligned placements should not check their opposite crossAxis
|
|
1049
1047
|
// side.
|
|
1050
|
-
z(
|
|
1048
|
+
z(C[0]) ? 2 : 3
|
|
1051
1049
|
).every((O) => O <= 0))[0]) == null ? void 0 : o[0]) || E[0][0];
|
|
1052
|
-
return
|
|
1050
|
+
return _ !== a ? {
|
|
1053
1051
|
data: {
|
|
1054
1052
|
index: v + 1,
|
|
1055
1053
|
overflows: x
|
|
1056
1054
|
},
|
|
1057
1055
|
reset: {
|
|
1058
|
-
placement:
|
|
1056
|
+
placement: _
|
|
1059
1057
|
}
|
|
1060
1058
|
} : {};
|
|
1061
1059
|
}
|
|
1062
1060
|
};
|
|
1063
|
-
},
|
|
1061
|
+
}, gr = function(t) {
|
|
1064
1062
|
return t === void 0 && (t = {}), {
|
|
1065
1063
|
name: "flip",
|
|
1066
1064
|
options: t,
|
|
@@ -1071,53 +1069,53 @@ const hr = function(t) {
|
|
|
1071
1069
|
middlewareData: i,
|
|
1072
1070
|
rects: c,
|
|
1073
1071
|
initialPlacement: a,
|
|
1074
|
-
platform:
|
|
1072
|
+
platform: f,
|
|
1075
1073
|
elements: l
|
|
1076
1074
|
} = e, {
|
|
1077
|
-
mainAxis:
|
|
1075
|
+
mainAxis: u = !0,
|
|
1078
1076
|
crossAxis: s = !0,
|
|
1079
|
-
fallbackPlacements:
|
|
1080
|
-
fallbackStrategy:
|
|
1077
|
+
fallbackPlacements: m,
|
|
1078
|
+
fallbackStrategy: h = "bestFit",
|
|
1081
1079
|
fallbackAxisSideDirection: p = "none",
|
|
1082
1080
|
flipAlignment: d = !0,
|
|
1083
|
-
...
|
|
1081
|
+
...g
|
|
1084
1082
|
} = X(t, e);
|
|
1085
1083
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
1086
1084
|
return {};
|
|
1087
|
-
const v =
|
|
1088
|
-
!
|
|
1089
|
-
const E = [a, ...x],
|
|
1090
|
-
let
|
|
1091
|
-
if (
|
|
1092
|
-
const M =
|
|
1093
|
-
|
|
1085
|
+
const v = I(o), w = V(a), y = I(a) === a, b = await (f.isRTL == null ? void 0 : f.isRTL(l.floating)), x = m || (y || !d ? [Ot(a)] : rr(a)), R = p !== "none";
|
|
1086
|
+
!m && R && x.push(...ar(a, d, p, b));
|
|
1087
|
+
const E = [a, ...x], k = await f.detectOverflow(e, g), _ = [];
|
|
1088
|
+
let C = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
1089
|
+
if (u && _.push(k[v]), s) {
|
|
1090
|
+
const M = He(o, c, b);
|
|
1091
|
+
_.push(k[M[0]], k[M[1]]);
|
|
1094
1092
|
}
|
|
1095
|
-
if (
|
|
1093
|
+
if (C = [...C, {
|
|
1096
1094
|
placement: o,
|
|
1097
|
-
overflows:
|
|
1098
|
-
}], !
|
|
1099
|
-
var O,
|
|
1095
|
+
overflows: _
|
|
1096
|
+
}], !_.every((M) => M <= 0)) {
|
|
1097
|
+
var O, P;
|
|
1100
1098
|
const M = (((O = i.flip) == null ? void 0 : O.index) || 0) + 1, F = E[M];
|
|
1101
|
-
if (F && (!(s === "alignment" ? w !==
|
|
1099
|
+
if (F && (!(s === "alignment" ? w !== V(F) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1102
1100
|
// overflows the main axis.
|
|
1103
|
-
|
|
1101
|
+
C.every((A) => V(A.placement) === w ? A.overflows[0] > 0 : !0)))
|
|
1104
1102
|
return {
|
|
1105
1103
|
data: {
|
|
1106
1104
|
index: M,
|
|
1107
|
-
overflows:
|
|
1105
|
+
overflows: C
|
|
1108
1106
|
},
|
|
1109
1107
|
reset: {
|
|
1110
1108
|
placement: F
|
|
1111
1109
|
}
|
|
1112
1110
|
};
|
|
1113
|
-
let T = (
|
|
1111
|
+
let T = (P = C.filter((N) => N.overflows[0] <= 0).sort((N, A) => N.overflows[1] - A.overflows[1])[0]) == null ? void 0 : P.placement;
|
|
1114
1112
|
if (!T)
|
|
1115
|
-
switch (
|
|
1113
|
+
switch (h) {
|
|
1116
1114
|
case "bestFit": {
|
|
1117
1115
|
var L;
|
|
1118
|
-
const N = (L =
|
|
1119
|
-
if (
|
|
1120
|
-
const H =
|
|
1116
|
+
const N = (L = C.filter((A) => {
|
|
1117
|
+
if (R) {
|
|
1118
|
+
const H = V(A.placement);
|
|
1121
1119
|
return H === w || // Create a bias to the `y` side axis due to horizontal
|
|
1122
1120
|
// reading directions favoring greater width.
|
|
1123
1121
|
H === "y";
|
|
@@ -1142,7 +1140,7 @@ const hr = function(t) {
|
|
|
1142
1140
|
}
|
|
1143
1141
|
};
|
|
1144
1142
|
};
|
|
1145
|
-
function
|
|
1143
|
+
function ve(t, e) {
|
|
1146
1144
|
return {
|
|
1147
1145
|
top: t.top - e.height,
|
|
1148
1146
|
right: t.right - e.width,
|
|
@@ -1150,10 +1148,10 @@ function me(t, e) {
|
|
|
1150
1148
|
left: t.left - e.width
|
|
1151
1149
|
};
|
|
1152
1150
|
}
|
|
1153
|
-
function
|
|
1154
|
-
return
|
|
1151
|
+
function pe(t) {
|
|
1152
|
+
return Fe.some((e) => t[e] >= 0);
|
|
1155
1153
|
}
|
|
1156
|
-
const
|
|
1154
|
+
const vr = function(t) {
|
|
1157
1155
|
return t === void 0 && (t = {}), {
|
|
1158
1156
|
name: "hide",
|
|
1159
1157
|
options: t,
|
|
@@ -1170,11 +1168,11 @@ const gr = function(t) {
|
|
|
1170
1168
|
const c = await r.detectOverflow(e, {
|
|
1171
1169
|
...i,
|
|
1172
1170
|
elementContext: "reference"
|
|
1173
|
-
}), a =
|
|
1171
|
+
}), a = ve(c, n.reference);
|
|
1174
1172
|
return {
|
|
1175
1173
|
data: {
|
|
1176
1174
|
referenceHiddenOffsets: a,
|
|
1177
|
-
referenceHidden:
|
|
1175
|
+
referenceHidden: pe(a)
|
|
1178
1176
|
}
|
|
1179
1177
|
};
|
|
1180
1178
|
}
|
|
@@ -1182,11 +1180,11 @@ const gr = function(t) {
|
|
|
1182
1180
|
const c = await r.detectOverflow(e, {
|
|
1183
1181
|
...i,
|
|
1184
1182
|
altBoundary: !0
|
|
1185
|
-
}), a =
|
|
1183
|
+
}), a = ve(c, n.floating);
|
|
1186
1184
|
return {
|
|
1187
1185
|
data: {
|
|
1188
1186
|
escapedOffsets: a,
|
|
1189
|
-
escaped:
|
|
1187
|
+
escaped: pe(a)
|
|
1190
1188
|
}
|
|
1191
1189
|
};
|
|
1192
1190
|
}
|
|
@@ -1196,7 +1194,7 @@ const gr = function(t) {
|
|
|
1196
1194
|
}
|
|
1197
1195
|
};
|
|
1198
1196
|
};
|
|
1199
|
-
function
|
|
1197
|
+
function $e(t) {
|
|
1200
1198
|
const e = j(...t.map((i) => i.left)), n = j(...t.map((i) => i.top)), r = B(...t.map((i) => i.right)), o = B(...t.map((i) => i.bottom));
|
|
1201
1199
|
return {
|
|
1202
1200
|
x: e,
|
|
@@ -1205,16 +1203,16 @@ function Fe(t) {
|
|
|
1205
1203
|
height: o - n
|
|
1206
1204
|
};
|
|
1207
1205
|
}
|
|
1208
|
-
function
|
|
1206
|
+
function pr(t) {
|
|
1209
1207
|
const e = t.slice().sort((o, i) => o.y - i.y), n = [];
|
|
1210
1208
|
let r = null;
|
|
1211
1209
|
for (let o = 0; o < e.length; o++) {
|
|
1212
1210
|
const i = e[o];
|
|
1213
1211
|
!r || i.y - r.y > r.height / 2 ? n.push([i]) : n[n.length - 1].push(i), r = i;
|
|
1214
1212
|
}
|
|
1215
|
-
return n.map((o) =>
|
|
1213
|
+
return n.map((o) => st($e(o)));
|
|
1216
1214
|
}
|
|
1217
|
-
const
|
|
1215
|
+
const wr = function(t) {
|
|
1218
1216
|
return t === void 0 && (t = {}), {
|
|
1219
1217
|
name: "inline",
|
|
1220
1218
|
options: t,
|
|
@@ -1227,15 +1225,15 @@ const pr = function(t) {
|
|
|
1227
1225
|
strategy: c
|
|
1228
1226
|
} = e, {
|
|
1229
1227
|
padding: a = 2,
|
|
1230
|
-
x:
|
|
1228
|
+
x: f,
|
|
1231
1229
|
y: l
|
|
1232
|
-
} = X(t, e),
|
|
1230
|
+
} = X(t, e), u = Array.from(await (i.getClientRects == null ? void 0 : i.getClientRects(r.reference)) || []), s = pr(u), m = st($e(u)), h = Jt(a);
|
|
1233
1231
|
function p() {
|
|
1234
|
-
if (s.length === 2 && s[0].left > s[1].right &&
|
|
1235
|
-
return s.find((
|
|
1232
|
+
if (s.length === 2 && s[0].left > s[1].right && f != null && l != null)
|
|
1233
|
+
return s.find((g) => f > g.left - h.left && f < g.right + h.right && l > g.top - h.top && l < g.bottom + h.bottom) || m;
|
|
1236
1234
|
if (s.length >= 2) {
|
|
1237
|
-
if (
|
|
1238
|
-
const
|
|
1235
|
+
if (V(n) === "y") {
|
|
1236
|
+
const C = s[0], O = s[s.length - 1], P = I(n) === "top", L = C.top, M = O.bottom, F = P ? C.left : O.left, T = P ? C.right : O.right, N = T - F, A = M - L;
|
|
1239
1237
|
return {
|
|
1240
1238
|
top: L,
|
|
1241
1239
|
bottom: M,
|
|
@@ -1247,19 +1245,19 @@ const pr = function(t) {
|
|
|
1247
1245
|
y: L
|
|
1248
1246
|
};
|
|
1249
1247
|
}
|
|
1250
|
-
const
|
|
1248
|
+
const g = I(n) === "left", v = B(...s.map((C) => C.right)), w = j(...s.map((C) => C.left)), y = s.filter((C) => g ? C.left === w : C.right === v), b = y[0].top, x = y[y.length - 1].bottom, R = w, E = v, k = E - R, _ = x - b;
|
|
1251
1249
|
return {
|
|
1252
1250
|
top: b,
|
|
1253
1251
|
bottom: x,
|
|
1254
|
-
left:
|
|
1252
|
+
left: R,
|
|
1255
1253
|
right: E,
|
|
1256
|
-
width:
|
|
1257
|
-
height:
|
|
1258
|
-
x:
|
|
1254
|
+
width: k,
|
|
1255
|
+
height: _,
|
|
1256
|
+
x: R,
|
|
1259
1257
|
y: b
|
|
1260
1258
|
};
|
|
1261
1259
|
}
|
|
1262
|
-
return
|
|
1260
|
+
return m;
|
|
1263
1261
|
}
|
|
1264
1262
|
const d = await i.getElementRects({
|
|
1265
1263
|
reference: {
|
|
@@ -1275,16 +1273,16 @@ const pr = function(t) {
|
|
|
1275
1273
|
} : {};
|
|
1276
1274
|
}
|
|
1277
1275
|
};
|
|
1278
|
-
},
|
|
1279
|
-
async function
|
|
1276
|
+
}, Ie = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1277
|
+
async function yr(t, e) {
|
|
1280
1278
|
const {
|
|
1281
1279
|
placement: n,
|
|
1282
1280
|
platform: r,
|
|
1283
1281
|
elements: o
|
|
1284
|
-
} = t, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), c =
|
|
1282
|
+
} = t, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), c = I(n), a = z(n), f = V(n) === "y", l = Ie.has(c) ? -1 : 1, u = i && f ? -1 : 1, s = X(e, t);
|
|
1285
1283
|
let {
|
|
1286
|
-
mainAxis:
|
|
1287
|
-
crossAxis:
|
|
1284
|
+
mainAxis: m,
|
|
1285
|
+
crossAxis: h,
|
|
1288
1286
|
alignmentAxis: p
|
|
1289
1287
|
} = typeof s == "number" ? {
|
|
1290
1288
|
mainAxis: s,
|
|
@@ -1295,15 +1293,15 @@ async function wr(t, e) {
|
|
|
1295
1293
|
crossAxis: s.crossAxis || 0,
|
|
1296
1294
|
alignmentAxis: s.alignmentAxis
|
|
1297
1295
|
};
|
|
1298
|
-
return a && typeof p == "number" && (
|
|
1299
|
-
x:
|
|
1300
|
-
y:
|
|
1296
|
+
return a && typeof p == "number" && (h = a === "end" ? p * -1 : p), f ? {
|
|
1297
|
+
x: h * u,
|
|
1298
|
+
y: m * l
|
|
1301
1299
|
} : {
|
|
1302
|
-
x:
|
|
1303
|
-
y:
|
|
1300
|
+
x: m * l,
|
|
1301
|
+
y: h * u
|
|
1304
1302
|
};
|
|
1305
1303
|
}
|
|
1306
|
-
const
|
|
1304
|
+
const br = function(t) {
|
|
1307
1305
|
return t === void 0 && (t = 0), {
|
|
1308
1306
|
name: "offset",
|
|
1309
1307
|
options: t,
|
|
@@ -1314,18 +1312,18 @@ const yr = function(t) {
|
|
|
1314
1312
|
y: i,
|
|
1315
1313
|
placement: c,
|
|
1316
1314
|
middlewareData: a
|
|
1317
|
-
} = e,
|
|
1315
|
+
} = e, f = await yr(e, t);
|
|
1318
1316
|
return c === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
|
|
1319
|
-
x: o +
|
|
1320
|
-
y: i +
|
|
1317
|
+
x: o + f.x,
|
|
1318
|
+
y: i + f.y,
|
|
1321
1319
|
data: {
|
|
1322
|
-
...
|
|
1320
|
+
...f,
|
|
1323
1321
|
placement: c
|
|
1324
1322
|
}
|
|
1325
1323
|
};
|
|
1326
1324
|
}
|
|
1327
1325
|
};
|
|
1328
|
-
},
|
|
1326
|
+
}, xr = function(t) {
|
|
1329
1327
|
return t === void 0 && (t = {}), {
|
|
1330
1328
|
name: "shift",
|
|
1331
1329
|
options: t,
|
|
@@ -1338,7 +1336,7 @@ const yr = function(t) {
|
|
|
1338
1336
|
} = e, {
|
|
1339
1337
|
mainAxis: c = !0,
|
|
1340
1338
|
crossAxis: a = !1,
|
|
1341
|
-
limiter:
|
|
1339
|
+
limiter: f = {
|
|
1342
1340
|
fn: (v) => {
|
|
1343
1341
|
let {
|
|
1344
1342
|
x: w,
|
|
@@ -1351,38 +1349,38 @@ const yr = function(t) {
|
|
|
1351
1349
|
}
|
|
1352
1350
|
},
|
|
1353
1351
|
...l
|
|
1354
|
-
} = X(t, e),
|
|
1352
|
+
} = X(t, e), u = {
|
|
1355
1353
|
x: n,
|
|
1356
1354
|
y: r
|
|
1357
|
-
}, s = await i.detectOverflow(e, l),
|
|
1358
|
-
let p =
|
|
1355
|
+
}, s = await i.detectOverflow(e, l), m = V(I(o)), h = Zt(m);
|
|
1356
|
+
let p = u[h], d = u[m];
|
|
1359
1357
|
if (c) {
|
|
1360
|
-
const v =
|
|
1361
|
-
p =
|
|
1358
|
+
const v = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", y = p + s[v], b = p - s[w];
|
|
1359
|
+
p = qt(y, p, b);
|
|
1362
1360
|
}
|
|
1363
1361
|
if (a) {
|
|
1364
|
-
const v =
|
|
1365
|
-
d =
|
|
1362
|
+
const v = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", y = d + s[v], b = d - s[w];
|
|
1363
|
+
d = qt(y, d, b);
|
|
1366
1364
|
}
|
|
1367
|
-
const
|
|
1365
|
+
const g = f.fn({
|
|
1368
1366
|
...e,
|
|
1369
|
-
[
|
|
1370
|
-
[
|
|
1367
|
+
[h]: p,
|
|
1368
|
+
[m]: d
|
|
1371
1369
|
});
|
|
1372
1370
|
return {
|
|
1373
|
-
...
|
|
1371
|
+
...g,
|
|
1374
1372
|
data: {
|
|
1375
|
-
x:
|
|
1376
|
-
y:
|
|
1373
|
+
x: g.x - n,
|
|
1374
|
+
y: g.y - r,
|
|
1377
1375
|
enabled: {
|
|
1378
|
-
[
|
|
1379
|
-
[
|
|
1376
|
+
[h]: c,
|
|
1377
|
+
[m]: a
|
|
1380
1378
|
}
|
|
1381
1379
|
}
|
|
1382
1380
|
};
|
|
1383
1381
|
}
|
|
1384
1382
|
};
|
|
1385
|
-
},
|
|
1383
|
+
}, Sr = function(t) {
|
|
1386
1384
|
return t === void 0 && (t = {}), {
|
|
1387
1385
|
options: t,
|
|
1388
1386
|
fn(e) {
|
|
@@ -1394,14 +1392,14 @@ const yr = function(t) {
|
|
|
1394
1392
|
middlewareData: c
|
|
1395
1393
|
} = e, {
|
|
1396
1394
|
offset: a = 0,
|
|
1397
|
-
mainAxis:
|
|
1395
|
+
mainAxis: f = !0,
|
|
1398
1396
|
crossAxis: l = !0
|
|
1399
|
-
} = X(t, e),
|
|
1397
|
+
} = X(t, e), u = {
|
|
1400
1398
|
x: n,
|
|
1401
1399
|
y: r
|
|
1402
|
-
}, s =
|
|
1403
|
-
let
|
|
1404
|
-
const d = X(a, e),
|
|
1400
|
+
}, s = V(o), m = Zt(s);
|
|
1401
|
+
let h = u[m], p = u[s];
|
|
1402
|
+
const d = X(a, e), g = typeof d == "number" ? {
|
|
1405
1403
|
mainAxis: d,
|
|
1406
1404
|
crossAxis: 0
|
|
1407
1405
|
} : {
|
|
@@ -1409,22 +1407,22 @@ const yr = function(t) {
|
|
|
1409
1407
|
crossAxis: 0,
|
|
1410
1408
|
...d
|
|
1411
1409
|
};
|
|
1412
|
-
if (
|
|
1413
|
-
const y =
|
|
1414
|
-
|
|
1410
|
+
if (f) {
|
|
1411
|
+
const y = m === "y" ? "height" : "width", b = i.reference[m] - i.floating[y] + g.mainAxis, x = i.reference[m] + i.reference[y] - g.mainAxis;
|
|
1412
|
+
h < b ? h = b : h > x && (h = x);
|
|
1415
1413
|
}
|
|
1416
1414
|
if (l) {
|
|
1417
1415
|
var v, w;
|
|
1418
|
-
const y =
|
|
1419
|
-
p < x ? p = x : p >
|
|
1416
|
+
const y = m === "y" ? "width" : "height", b = Ie.has(I(o)), x = i.reference[s] - i.floating[y] + (b && ((v = c.offset) == null ? void 0 : v[s]) || 0) + (b ? 0 : g.crossAxis), R = i.reference[s] + i.reference[y] + (b ? 0 : ((w = c.offset) == null ? void 0 : w[s]) || 0) - (b ? g.crossAxis : 0);
|
|
1417
|
+
p < x ? p = x : p > R && (p = R);
|
|
1420
1418
|
}
|
|
1421
1419
|
return {
|
|
1422
|
-
[
|
|
1420
|
+
[m]: h,
|
|
1423
1421
|
[s]: p
|
|
1424
1422
|
};
|
|
1425
1423
|
}
|
|
1426
1424
|
};
|
|
1427
|
-
},
|
|
1425
|
+
}, Rr = function(t) {
|
|
1428
1426
|
return t === void 0 && (t = {}), {
|
|
1429
1427
|
name: "size",
|
|
1430
1428
|
options: t,
|
|
@@ -1436,28 +1434,28 @@ const yr = function(t) {
|
|
|
1436
1434
|
platform: c,
|
|
1437
1435
|
elements: a
|
|
1438
1436
|
} = e, {
|
|
1439
|
-
apply:
|
|
1437
|
+
apply: f = () => {
|
|
1440
1438
|
},
|
|
1441
1439
|
...l
|
|
1442
|
-
} = X(t, e),
|
|
1440
|
+
} = X(t, e), u = await c.detectOverflow(e, l), s = I(o), m = z(o), h = V(o) === "y", {
|
|
1443
1441
|
width: p,
|
|
1444
1442
|
height: d
|
|
1445
1443
|
} = i.floating;
|
|
1446
|
-
let
|
|
1447
|
-
s === "top" || s === "bottom" ? (
|
|
1448
|
-
const w = d -
|
|
1449
|
-
let E = b,
|
|
1450
|
-
if ((n = e.middlewareData.shift) != null && n.enabled.x && (
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1444
|
+
let g, v;
|
|
1445
|
+
s === "top" || s === "bottom" ? (g = s, v = m === (await (c.isRTL == null ? void 0 : c.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (v = s, g = m === "end" ? "top" : "bottom");
|
|
1446
|
+
const w = d - u.top - u.bottom, y = p - u.left - u.right, b = j(d - u[g], w), x = j(p - u[v], y), R = !e.middlewareData.shift;
|
|
1447
|
+
let E = b, k = x;
|
|
1448
|
+
if ((n = e.middlewareData.shift) != null && n.enabled.x && (k = y), (r = e.middlewareData.shift) != null && r.enabled.y && (E = w), R && !m) {
|
|
1449
|
+
const C = B(u.left, 0), O = B(u.right, 0), P = B(u.top, 0), L = B(u.bottom, 0);
|
|
1450
|
+
h ? k = p - 2 * (C !== 0 || O !== 0 ? C + O : B(u.left, u.right)) : E = d - 2 * (P !== 0 || L !== 0 ? P + L : B(u.top, u.bottom));
|
|
1453
1451
|
}
|
|
1454
|
-
await
|
|
1452
|
+
await f({
|
|
1455
1453
|
...e,
|
|
1456
|
-
availableWidth:
|
|
1454
|
+
availableWidth: k,
|
|
1457
1455
|
availableHeight: E
|
|
1458
1456
|
});
|
|
1459
|
-
const
|
|
1460
|
-
return p !==
|
|
1457
|
+
const _ = await c.getDimensions(a.floating);
|
|
1458
|
+
return p !== _.width || d !== _.height ? {
|
|
1461
1459
|
reset: {
|
|
1462
1460
|
rects: !0
|
|
1463
1461
|
}
|
|
@@ -1468,80 +1466,80 @@ const yr = function(t) {
|
|
|
1468
1466
|
function kt() {
|
|
1469
1467
|
return typeof window < "u";
|
|
1470
1468
|
}
|
|
1471
|
-
function
|
|
1472
|
-
return
|
|
1469
|
+
function ut(t) {
|
|
1470
|
+
return Ve(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
1473
1471
|
}
|
|
1474
|
-
function
|
|
1472
|
+
function $(t) {
|
|
1475
1473
|
var e;
|
|
1476
1474
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
1477
1475
|
}
|
|
1478
|
-
function
|
|
1476
|
+
function Z(t) {
|
|
1479
1477
|
var e;
|
|
1480
|
-
return (e = (
|
|
1478
|
+
return (e = (Ve(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
1481
1479
|
}
|
|
1482
|
-
function
|
|
1483
|
-
return kt() ? t instanceof Node || t instanceof
|
|
1480
|
+
function Ve(t) {
|
|
1481
|
+
return kt() ? t instanceof Node || t instanceof $(t).Node : !1;
|
|
1484
1482
|
}
|
|
1485
1483
|
function Y(t) {
|
|
1486
|
-
return kt() ? t instanceof Element || t instanceof
|
|
1484
|
+
return kt() ? t instanceof Element || t instanceof $(t).Element : !1;
|
|
1487
1485
|
}
|
|
1488
|
-
function
|
|
1489
|
-
return kt() ? t instanceof HTMLElement || t instanceof
|
|
1486
|
+
function Q(t) {
|
|
1487
|
+
return kt() ? t instanceof HTMLElement || t instanceof $(t).HTMLElement : !1;
|
|
1490
1488
|
}
|
|
1491
|
-
function
|
|
1492
|
-
return !kt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof
|
|
1489
|
+
function we(t) {
|
|
1490
|
+
return !kt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof $(t).ShadowRoot;
|
|
1493
1491
|
}
|
|
1494
|
-
|
|
1495
|
-
function ht(t) {
|
|
1492
|
+
function mt(t) {
|
|
1496
1493
|
const {
|
|
1497
1494
|
overflow: e,
|
|
1498
1495
|
overflowX: n,
|
|
1499
1496
|
overflowY: r,
|
|
1500
1497
|
display: o
|
|
1501
1498
|
} = q(t);
|
|
1502
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + r + n) &&
|
|
1499
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + r + n) && o !== "inline" && o !== "contents";
|
|
1503
1500
|
}
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
return Rr.has(lt(t));
|
|
1501
|
+
function Cr(t) {
|
|
1502
|
+
return /^(table|td|th)$/.test(ut(t));
|
|
1507
1503
|
}
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
}
|
|
1504
|
+
function Lt(t) {
|
|
1505
|
+
try {
|
|
1506
|
+
if (t.matches(":popover-open"))
|
|
1507
|
+
return !0;
|
|
1508
|
+
} catch {
|
|
1509
|
+
}
|
|
1510
|
+
try {
|
|
1511
|
+
return t.matches(":modal");
|
|
1512
|
+
} catch {
|
|
1513
|
+
return !1;
|
|
1514
|
+
}
|
|
1517
1515
|
}
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1516
|
+
const Er = /transform|translate|scale|rotate|perspective|filter/, Ar = /paint|layout|strict|content/, tt = (t) => !!t && t !== "none";
|
|
1517
|
+
let Ht;
|
|
1518
|
+
function te(t) {
|
|
1519
|
+
const e = Y(t) ? q(t) : t;
|
|
1520
|
+
return tt(e.transform) || tt(e.translate) || tt(e.scale) || tt(e.rotate) || tt(e.perspective) || !ee() && (tt(e.backdropFilter) || tt(e.filter)) || Er.test(e.willChange || "") || Ar.test(e.contain || "");
|
|
1522
1521
|
}
|
|
1523
|
-
function
|
|
1522
|
+
function Or(t) {
|
|
1524
1523
|
let e = J(t);
|
|
1525
|
-
for (;
|
|
1526
|
-
if (
|
|
1524
|
+
for (; Q(e) && !lt(e); ) {
|
|
1525
|
+
if (te(e))
|
|
1527
1526
|
return e;
|
|
1528
|
-
if (
|
|
1527
|
+
if (Lt(e))
|
|
1529
1528
|
return null;
|
|
1530
1529
|
e = J(e);
|
|
1531
1530
|
}
|
|
1532
1531
|
return null;
|
|
1533
1532
|
}
|
|
1534
|
-
function
|
|
1535
|
-
return typeof CSS
|
|
1533
|
+
function ee() {
|
|
1534
|
+
return Ht == null && (Ht = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), Ht;
|
|
1536
1535
|
}
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
return _r.has(lt(t));
|
|
1536
|
+
function lt(t) {
|
|
1537
|
+
return /^(html|body|#document)$/.test(ut(t));
|
|
1540
1538
|
}
|
|
1541
1539
|
function q(t) {
|
|
1542
|
-
return
|
|
1540
|
+
return $(t).getComputedStyle(t);
|
|
1543
1541
|
}
|
|
1544
|
-
function
|
|
1542
|
+
function Tt(t) {
|
|
1545
1543
|
return Y(t) ? {
|
|
1546
1544
|
scrollLeft: t.scrollLeft,
|
|
1547
1545
|
scrollTop: t.scrollTop
|
|
@@ -1551,139 +1549,139 @@ function Lt(t) {
|
|
|
1551
1549
|
};
|
|
1552
1550
|
}
|
|
1553
1551
|
function J(t) {
|
|
1554
|
-
if (
|
|
1552
|
+
if (ut(t) === "html")
|
|
1555
1553
|
return t;
|
|
1556
1554
|
const e = (
|
|
1557
1555
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1558
1556
|
t.assignedSlot || // DOM Element detected.
|
|
1559
1557
|
t.parentNode || // ShadowRoot detected.
|
|
1560
|
-
|
|
1561
|
-
|
|
1558
|
+
we(t) && t.host || // Fallback.
|
|
1559
|
+
Z(t)
|
|
1562
1560
|
);
|
|
1563
|
-
return
|
|
1561
|
+
return we(e) ? e.host : e;
|
|
1564
1562
|
}
|
|
1565
|
-
function
|
|
1563
|
+
function ze(t) {
|
|
1566
1564
|
const e = J(t);
|
|
1567
|
-
return
|
|
1565
|
+
return lt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : Q(e) && mt(e) ? e : ze(e);
|
|
1568
1566
|
}
|
|
1569
|
-
function
|
|
1567
|
+
function ht(t, e, n) {
|
|
1570
1568
|
var r;
|
|
1571
1569
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
1572
|
-
const o =
|
|
1570
|
+
const o = ze(t), i = o === ((r = t.ownerDocument) == null ? void 0 : r.body), c = $(o);
|
|
1573
1571
|
if (i) {
|
|
1574
|
-
const a =
|
|
1575
|
-
return e.concat(c, c.visualViewport || [],
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1572
|
+
const a = Kt(c);
|
|
1573
|
+
return e.concat(c, c.visualViewport || [], mt(o) ? o : [], a && n ? ht(a) : []);
|
|
1574
|
+
} else
|
|
1575
|
+
return e.concat(o, ht(o, [], n));
|
|
1578
1576
|
}
|
|
1579
|
-
function
|
|
1577
|
+
function Kt(t) {
|
|
1580
1578
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
1581
1579
|
}
|
|
1582
|
-
function
|
|
1580
|
+
function je(t) {
|
|
1583
1581
|
const e = q(t);
|
|
1584
1582
|
let n = parseFloat(e.width) || 0, r = parseFloat(e.height) || 0;
|
|
1585
|
-
const o =
|
|
1583
|
+
const o = Q(t), i = o ? t.offsetWidth : n, c = o ? t.offsetHeight : r, a = Et(n) !== i || Et(r) !== c;
|
|
1586
1584
|
return a && (n = i, r = c), {
|
|
1587
1585
|
width: n,
|
|
1588
1586
|
height: r,
|
|
1589
1587
|
$: a
|
|
1590
1588
|
};
|
|
1591
1589
|
}
|
|
1592
|
-
function
|
|
1590
|
+
function ne(t) {
|
|
1593
1591
|
return Y(t) ? t : t.contextElement;
|
|
1594
1592
|
}
|
|
1595
|
-
function
|
|
1596
|
-
const e =
|
|
1597
|
-
if (!
|
|
1598
|
-
return
|
|
1593
|
+
function at(t) {
|
|
1594
|
+
const e = ne(t);
|
|
1595
|
+
if (!Q(e))
|
|
1596
|
+
return U(1);
|
|
1599
1597
|
const n = e.getBoundingClientRect(), {
|
|
1600
1598
|
width: r,
|
|
1601
1599
|
height: o,
|
|
1602
1600
|
$: i
|
|
1603
|
-
} =
|
|
1604
|
-
let c = (i ?
|
|
1601
|
+
} = je(e);
|
|
1602
|
+
let c = (i ? Et(n.width) : n.width) / r, a = (i ? Et(n.height) : n.height) / o;
|
|
1605
1603
|
return (!c || !Number.isFinite(c)) && (c = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
1606
1604
|
x: c,
|
|
1607
1605
|
y: a
|
|
1608
1606
|
};
|
|
1609
1607
|
}
|
|
1610
|
-
const
|
|
1611
|
-
function
|
|
1612
|
-
const e =
|
|
1613
|
-
return !
|
|
1608
|
+
const Mr = /* @__PURE__ */ U(0);
|
|
1609
|
+
function Xe(t) {
|
|
1610
|
+
const e = $(t);
|
|
1611
|
+
return !ee() || !e.visualViewport ? Mr : {
|
|
1614
1612
|
x: e.visualViewport.offsetLeft,
|
|
1615
1613
|
y: e.visualViewport.offsetTop
|
|
1616
1614
|
};
|
|
1617
1615
|
}
|
|
1618
|
-
function
|
|
1619
|
-
return e === void 0 && (e = !1), !n || e && n !==
|
|
1616
|
+
function _r(t, e, n) {
|
|
1617
|
+
return e === void 0 && (e = !1), !n || e && n !== $(t) ? !1 : e;
|
|
1620
1618
|
}
|
|
1621
|
-
function
|
|
1619
|
+
function nt(t, e, n, r) {
|
|
1622
1620
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
1623
|
-
const o = t.getBoundingClientRect(), i =
|
|
1624
|
-
let c =
|
|
1625
|
-
e && (r ? Y(r) && (c =
|
|
1626
|
-
const a =
|
|
1627
|
-
let
|
|
1621
|
+
const o = t.getBoundingClientRect(), i = ne(t);
|
|
1622
|
+
let c = U(1);
|
|
1623
|
+
e && (r ? Y(r) && (c = at(r)) : c = at(t));
|
|
1624
|
+
const a = _r(i, n, r) ? Xe(i) : U(0);
|
|
1625
|
+
let f = (o.left + a.x) / c.x, l = (o.top + a.y) / c.y, u = o.width / c.x, s = o.height / c.y;
|
|
1628
1626
|
if (i) {
|
|
1629
|
-
const
|
|
1630
|
-
let p =
|
|
1631
|
-
for (; d && r &&
|
|
1632
|
-
const
|
|
1633
|
-
|
|
1627
|
+
const m = $(i), h = r && Y(r) ? $(r) : r;
|
|
1628
|
+
let p = m, d = Kt(p);
|
|
1629
|
+
for (; d && r && h !== p; ) {
|
|
1630
|
+
const g = at(d), v = d.getBoundingClientRect(), w = q(d), y = v.left + (d.clientLeft + parseFloat(w.paddingLeft)) * g.x, b = v.top + (d.clientTop + parseFloat(w.paddingTop)) * g.y;
|
|
1631
|
+
f *= g.x, l *= g.y, u *= g.x, s *= g.y, f += y, l += b, p = $(d), d = Kt(p);
|
|
1634
1632
|
}
|
|
1635
1633
|
}
|
|
1636
|
-
return
|
|
1637
|
-
width:
|
|
1634
|
+
return st({
|
|
1635
|
+
width: u,
|
|
1638
1636
|
height: s,
|
|
1639
|
-
x:
|
|
1637
|
+
x: f,
|
|
1640
1638
|
y: l
|
|
1641
1639
|
});
|
|
1642
1640
|
}
|
|
1643
|
-
function
|
|
1644
|
-
const n =
|
|
1645
|
-
return e ? e.left + n :
|
|
1641
|
+
function Dt(t, e) {
|
|
1642
|
+
const n = Tt(t).scrollLeft;
|
|
1643
|
+
return e ? e.left + n : nt(Z(t)).left + n;
|
|
1646
1644
|
}
|
|
1647
|
-
function
|
|
1648
|
-
const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft -
|
|
1645
|
+
function Ye(t, e) {
|
|
1646
|
+
const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - Dt(t, n), o = n.top + e.scrollTop;
|
|
1649
1647
|
return {
|
|
1650
1648
|
x: r,
|
|
1651
1649
|
y: o
|
|
1652
1650
|
};
|
|
1653
1651
|
}
|
|
1654
|
-
function
|
|
1652
|
+
function Pr(t) {
|
|
1655
1653
|
let {
|
|
1656
1654
|
elements: e,
|
|
1657
1655
|
rect: n,
|
|
1658
1656
|
offsetParent: r,
|
|
1659
1657
|
strategy: o
|
|
1660
1658
|
} = t;
|
|
1661
|
-
const i = o === "fixed", c =
|
|
1659
|
+
const i = o === "fixed", c = Z(r), a = e ? Lt(e.floating) : !1;
|
|
1662
1660
|
if (r === c || a && i)
|
|
1663
1661
|
return n;
|
|
1664
|
-
let
|
|
1662
|
+
let f = {
|
|
1665
1663
|
scrollLeft: 0,
|
|
1666
1664
|
scrollTop: 0
|
|
1667
|
-
}, l =
|
|
1668
|
-
const
|
|
1669
|
-
if ((s || !s && !i) && ((
|
|
1670
|
-
const
|
|
1671
|
-
l =
|
|
1665
|
+
}, l = U(1);
|
|
1666
|
+
const u = U(0), s = Q(r);
|
|
1667
|
+
if ((s || !s && !i) && ((ut(r) !== "body" || mt(c)) && (f = Tt(r)), s)) {
|
|
1668
|
+
const h = nt(r);
|
|
1669
|
+
l = at(r), u.x = h.x + r.clientLeft, u.y = h.y + r.clientTop;
|
|
1672
1670
|
}
|
|
1673
|
-
const
|
|
1671
|
+
const m = c && !s && !i ? Ye(c, f) : U(0);
|
|
1674
1672
|
return {
|
|
1675
1673
|
width: n.width * l.x,
|
|
1676
1674
|
height: n.height * l.y,
|
|
1677
|
-
x: n.x * l.x -
|
|
1678
|
-
y: n.y * l.y -
|
|
1675
|
+
x: n.x * l.x - f.scrollLeft * l.x + u.x + m.x,
|
|
1676
|
+
y: n.y * l.y - f.scrollTop * l.y + u.y + m.y
|
|
1679
1677
|
};
|
|
1680
1678
|
}
|
|
1681
|
-
function
|
|
1679
|
+
function kr(t) {
|
|
1682
1680
|
return Array.from(t.getClientRects());
|
|
1683
1681
|
}
|
|
1684
|
-
function
|
|
1685
|
-
const e =
|
|
1686
|
-
let c = -n.scrollLeft +
|
|
1682
|
+
function Lr(t) {
|
|
1683
|
+
const e = Z(t), n = Tt(t), r = t.ownerDocument.body, o = B(e.scrollWidth, e.clientWidth, r.scrollWidth, r.clientWidth), i = B(e.scrollHeight, e.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1684
|
+
let c = -n.scrollLeft + Dt(t);
|
|
1687
1685
|
const a = -n.scrollTop;
|
|
1688
1686
|
return q(r).direction === "rtl" && (c += B(e.clientWidth, r.clientWidth) - o), {
|
|
1689
1687
|
width: o,
|
|
@@ -1692,47 +1690,46 @@ function Br(t) {
|
|
|
1692
1690
|
y: a
|
|
1693
1691
|
};
|
|
1694
1692
|
}
|
|
1695
|
-
const
|
|
1696
|
-
function
|
|
1697
|
-
const n =
|
|
1698
|
-
let i = r.clientWidth, c = r.clientHeight, a = 0,
|
|
1693
|
+
const ye = 25;
|
|
1694
|
+
function Tr(t, e) {
|
|
1695
|
+
const n = $(t), r = Z(t), o = n.visualViewport;
|
|
1696
|
+
let i = r.clientWidth, c = r.clientHeight, a = 0, f = 0;
|
|
1699
1697
|
if (o) {
|
|
1700
1698
|
i = o.width, c = o.height;
|
|
1701
|
-
const
|
|
1702
|
-
(!
|
|
1699
|
+
const u = ee();
|
|
1700
|
+
(!u || u && e === "fixed") && (a = o.offsetLeft, f = o.offsetTop);
|
|
1703
1701
|
}
|
|
1704
|
-
const l =
|
|
1702
|
+
const l = Dt(r);
|
|
1705
1703
|
if (l <= 0) {
|
|
1706
|
-
const
|
|
1707
|
-
p <=
|
|
1708
|
-
} else l <=
|
|
1704
|
+
const u = r.ownerDocument, s = u.body, m = getComputedStyle(s), h = u.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, p = Math.abs(r.clientWidth - s.clientWidth - h);
|
|
1705
|
+
p <= ye && (i -= p);
|
|
1706
|
+
} else l <= ye && (i += l);
|
|
1709
1707
|
return {
|
|
1710
1708
|
width: i,
|
|
1711
1709
|
height: c,
|
|
1712
1710
|
x: a,
|
|
1713
|
-
y:
|
|
1711
|
+
y: f
|
|
1714
1712
|
};
|
|
1715
1713
|
}
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
const n = et(t, !0, e === "fixed"), r = n.top + t.clientTop, o = n.left + t.clientLeft, i = U(t) ? ct(t) : Z(1), c = t.clientWidth * i.x, a = t.clientHeight * i.y, u = o * i.x, l = r * i.y;
|
|
1714
|
+
function Dr(t, e) {
|
|
1715
|
+
const n = nt(t, !0, e === "fixed"), r = n.top + t.clientTop, o = n.left + t.clientLeft, i = Q(t) ? at(t) : U(1), c = t.clientWidth * i.x, a = t.clientHeight * i.y, f = o * i.x, l = r * i.y;
|
|
1719
1716
|
return {
|
|
1720
1717
|
width: c,
|
|
1721
1718
|
height: a,
|
|
1722
|
-
x:
|
|
1719
|
+
x: f,
|
|
1723
1720
|
y: l
|
|
1724
1721
|
};
|
|
1725
1722
|
}
|
|
1726
|
-
function
|
|
1723
|
+
function be(t, e, n) {
|
|
1727
1724
|
let r;
|
|
1728
1725
|
if (e === "viewport")
|
|
1729
|
-
r =
|
|
1726
|
+
r = Tr(t, n);
|
|
1730
1727
|
else if (e === "document")
|
|
1731
|
-
r =
|
|
1728
|
+
r = Lr(Z(t));
|
|
1732
1729
|
else if (Y(e))
|
|
1733
|
-
r =
|
|
1730
|
+
r = Dr(e, n);
|
|
1734
1731
|
else {
|
|
1735
|
-
const o =
|
|
1732
|
+
const o = Xe(t);
|
|
1736
1733
|
r = {
|
|
1737
1734
|
x: e.x - o.x,
|
|
1738
1735
|
y: e.y - o.y,
|
|
@@ -1740,110 +1737,112 @@ function we(t, e, n) {
|
|
|
1740
1737
|
height: e.height
|
|
1741
1738
|
};
|
|
1742
1739
|
}
|
|
1743
|
-
return
|
|
1740
|
+
return st(r);
|
|
1744
1741
|
}
|
|
1745
|
-
function
|
|
1742
|
+
function qe(t, e) {
|
|
1746
1743
|
const n = J(t);
|
|
1747
|
-
return n === e || !Y(n) ||
|
|
1744
|
+
return n === e || !Y(n) || lt(n) ? !1 : q(n).position === "fixed" || qe(n, e);
|
|
1748
1745
|
}
|
|
1749
|
-
function
|
|
1746
|
+
function Nr(t, e) {
|
|
1750
1747
|
const n = e.get(t);
|
|
1751
1748
|
if (n)
|
|
1752
1749
|
return n;
|
|
1753
|
-
let r =
|
|
1750
|
+
let r = ht(t, [], !1).filter((a) => Y(a) && ut(a) !== "body"), o = null;
|
|
1754
1751
|
const i = q(t).position === "fixed";
|
|
1755
1752
|
let c = i ? J(t) : t;
|
|
1756
|
-
for (; Y(c) && !
|
|
1757
|
-
const a = q(c),
|
|
1758
|
-
!
|
|
1753
|
+
for (; Y(c) && !lt(c); ) {
|
|
1754
|
+
const a = q(c), f = te(c);
|
|
1755
|
+
!f && a.position === "fixed" && (o = null), (i ? !f && !o : !f && a.position === "static" && !!o && (o.position === "absolute" || o.position === "fixed") || mt(c) && !f && qe(t, c)) ? r = r.filter((u) => u !== c) : o = a, c = J(c);
|
|
1759
1756
|
}
|
|
1760
1757
|
return e.set(t, r), r;
|
|
1761
1758
|
}
|
|
1762
|
-
function
|
|
1759
|
+
function Br(t) {
|
|
1763
1760
|
let {
|
|
1764
1761
|
element: e,
|
|
1765
1762
|
boundary: n,
|
|
1766
1763
|
rootBoundary: r,
|
|
1767
1764
|
strategy: o
|
|
1768
1765
|
} = t;
|
|
1769
|
-
const c = [...n === "clippingAncestors" ?
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1766
|
+
const c = [...n === "clippingAncestors" ? Lt(e) ? [] : Nr(e, this._c) : [].concat(n), r], a = be(e, c[0], o);
|
|
1767
|
+
let f = a.top, l = a.right, u = a.bottom, s = a.left;
|
|
1768
|
+
for (let m = 1; m < c.length; m++) {
|
|
1769
|
+
const h = be(e, c[m], o);
|
|
1770
|
+
f = B(h.top, f), l = j(h.right, l), u = j(h.bottom, u), s = B(h.left, s);
|
|
1771
|
+
}
|
|
1773
1772
|
return {
|
|
1774
|
-
width:
|
|
1775
|
-
height: u
|
|
1776
|
-
x:
|
|
1777
|
-
y:
|
|
1773
|
+
width: l - s,
|
|
1774
|
+
height: u - f,
|
|
1775
|
+
x: s,
|
|
1776
|
+
y: f
|
|
1778
1777
|
};
|
|
1779
1778
|
}
|
|
1780
|
-
function
|
|
1779
|
+
function Wr(t) {
|
|
1781
1780
|
const {
|
|
1782
1781
|
width: e,
|
|
1783
1782
|
height: n
|
|
1784
|
-
} =
|
|
1783
|
+
} = je(t);
|
|
1785
1784
|
return {
|
|
1786
1785
|
width: e,
|
|
1787
1786
|
height: n
|
|
1788
1787
|
};
|
|
1789
1788
|
}
|
|
1790
|
-
function
|
|
1791
|
-
const r =
|
|
1789
|
+
function Fr(t, e, n) {
|
|
1790
|
+
const r = Q(e), o = Z(e), i = n === "fixed", c = nt(t, !0, i, e);
|
|
1792
1791
|
let a = {
|
|
1793
1792
|
scrollLeft: 0,
|
|
1794
1793
|
scrollTop: 0
|
|
1795
1794
|
};
|
|
1796
|
-
const
|
|
1795
|
+
const f = U(0);
|
|
1797
1796
|
function l() {
|
|
1798
|
-
|
|
1797
|
+
f.x = Dt(o);
|
|
1799
1798
|
}
|
|
1800
1799
|
if (r || !r && !i)
|
|
1801
|
-
if ((
|
|
1802
|
-
const
|
|
1803
|
-
|
|
1800
|
+
if ((ut(e) !== "body" || mt(o)) && (a = Tt(e)), r) {
|
|
1801
|
+
const h = nt(e, !0, i, e);
|
|
1802
|
+
f.x = h.x + e.clientLeft, f.y = h.y + e.clientTop;
|
|
1804
1803
|
} else o && l();
|
|
1805
1804
|
i && !r && o && l();
|
|
1806
|
-
const
|
|
1805
|
+
const u = o && !r && !i ? Ye(o, a) : U(0), s = c.left + a.scrollLeft - f.x - u.x, m = c.top + a.scrollTop - f.y - u.y;
|
|
1807
1806
|
return {
|
|
1808
1807
|
x: s,
|
|
1809
|
-
y:
|
|
1808
|
+
y: m,
|
|
1810
1809
|
width: c.width,
|
|
1811
1810
|
height: c.height
|
|
1812
1811
|
};
|
|
1813
1812
|
}
|
|
1814
|
-
function
|
|
1813
|
+
function $t(t) {
|
|
1815
1814
|
return q(t).position === "static";
|
|
1816
1815
|
}
|
|
1817
|
-
function
|
|
1818
|
-
if (!
|
|
1816
|
+
function xe(t, e) {
|
|
1817
|
+
if (!Q(t) || q(t).position === "fixed")
|
|
1819
1818
|
return null;
|
|
1820
1819
|
if (e)
|
|
1821
1820
|
return e(t);
|
|
1822
1821
|
let n = t.offsetParent;
|
|
1823
|
-
return
|
|
1822
|
+
return Z(t) === n && (n = n.ownerDocument.body), n;
|
|
1824
1823
|
}
|
|
1825
|
-
function
|
|
1826
|
-
const n =
|
|
1827
|
-
if (
|
|
1824
|
+
function Ke(t, e) {
|
|
1825
|
+
const n = $(t);
|
|
1826
|
+
if (Lt(t))
|
|
1828
1827
|
return n;
|
|
1829
|
-
if (!
|
|
1828
|
+
if (!Q(t)) {
|
|
1830
1829
|
let o = J(t);
|
|
1831
|
-
for (; o && !
|
|
1832
|
-
if (Y(o) &&
|
|
1830
|
+
for (; o && !lt(o); ) {
|
|
1831
|
+
if (Y(o) && !$t(o))
|
|
1833
1832
|
return o;
|
|
1834
1833
|
o = J(o);
|
|
1835
1834
|
}
|
|
1836
1835
|
return n;
|
|
1837
1836
|
}
|
|
1838
|
-
let r =
|
|
1839
|
-
for (; r &&
|
|
1840
|
-
r =
|
|
1841
|
-
return r &&
|
|
1837
|
+
let r = xe(t, e);
|
|
1838
|
+
for (; r && Cr(r) && $t(r); )
|
|
1839
|
+
r = xe(r, e);
|
|
1840
|
+
return r && lt(r) && $t(r) && !te(r) ? n : r || Or(t) || n;
|
|
1842
1841
|
}
|
|
1843
|
-
const
|
|
1844
|
-
const e = this.getOffsetParent ||
|
|
1842
|
+
const Hr = async function(t) {
|
|
1843
|
+
const e = this.getOffsetParent || Ke, n = this.getDimensions, r = await n(t.floating);
|
|
1845
1844
|
return {
|
|
1846
|
-
reference:
|
|
1845
|
+
reference: Fr(t.reference, await e(t.floating), t.strategy),
|
|
1847
1846
|
floating: {
|
|
1848
1847
|
x: 0,
|
|
1849
1848
|
y: 0,
|
|
@@ -1852,56 +1851,56 @@ const jr = async function(t) {
|
|
|
1852
1851
|
}
|
|
1853
1852
|
};
|
|
1854
1853
|
};
|
|
1855
|
-
function
|
|
1854
|
+
function $r(t) {
|
|
1856
1855
|
return q(t).direction === "rtl";
|
|
1857
1856
|
}
|
|
1858
|
-
const
|
|
1859
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1860
|
-
getDocumentElement:
|
|
1861
|
-
getClippingRect:
|
|
1862
|
-
getOffsetParent:
|
|
1863
|
-
getElementRects:
|
|
1864
|
-
getClientRects:
|
|
1865
|
-
getDimensions:
|
|
1866
|
-
getScale:
|
|
1857
|
+
const Ir = {
|
|
1858
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Pr,
|
|
1859
|
+
getDocumentElement: Z,
|
|
1860
|
+
getClippingRect: Br,
|
|
1861
|
+
getOffsetParent: Ke,
|
|
1862
|
+
getElementRects: Hr,
|
|
1863
|
+
getClientRects: kr,
|
|
1864
|
+
getDimensions: Wr,
|
|
1865
|
+
getScale: at,
|
|
1867
1866
|
isElement: Y,
|
|
1868
|
-
isRTL:
|
|
1867
|
+
isRTL: $r
|
|
1869
1868
|
};
|
|
1870
|
-
function
|
|
1869
|
+
function Ue(t, e) {
|
|
1871
1870
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1872
1871
|
}
|
|
1873
|
-
function
|
|
1872
|
+
function Vr(t, e) {
|
|
1874
1873
|
let n = null, r;
|
|
1875
|
-
const o =
|
|
1874
|
+
const o = Z(t);
|
|
1876
1875
|
function i() {
|
|
1877
1876
|
var a;
|
|
1878
1877
|
clearTimeout(r), (a = n) == null || a.disconnect(), n = null;
|
|
1879
1878
|
}
|
|
1880
|
-
function c(a,
|
|
1881
|
-
a === void 0 && (a = !1),
|
|
1879
|
+
function c(a, f) {
|
|
1880
|
+
a === void 0 && (a = !1), f === void 0 && (f = 1), i();
|
|
1882
1881
|
const l = t.getBoundingClientRect(), {
|
|
1883
|
-
left:
|
|
1882
|
+
left: u,
|
|
1884
1883
|
top: s,
|
|
1885
|
-
width:
|
|
1886
|
-
height:
|
|
1884
|
+
width: m,
|
|
1885
|
+
height: h
|
|
1887
1886
|
} = l;
|
|
1888
|
-
if (a || e(), !
|
|
1887
|
+
if (a || e(), !m || !h)
|
|
1889
1888
|
return;
|
|
1890
|
-
const p =
|
|
1891
|
-
rootMargin: -p + "px " + -d + "px " + -
|
|
1892
|
-
threshold: B(0, j(1,
|
|
1889
|
+
const p = bt(s), d = bt(o.clientWidth - (u + m)), g = bt(o.clientHeight - (s + h)), v = bt(u), y = {
|
|
1890
|
+
rootMargin: -p + "px " + -d + "px " + -g + "px " + -v + "px",
|
|
1891
|
+
threshold: B(0, j(1, f)) || 1
|
|
1893
1892
|
};
|
|
1894
1893
|
let b = !0;
|
|
1895
|
-
function x(
|
|
1896
|
-
const E =
|
|
1897
|
-
if (E !==
|
|
1894
|
+
function x(R) {
|
|
1895
|
+
const E = R[0].intersectionRatio;
|
|
1896
|
+
if (E !== f) {
|
|
1898
1897
|
if (!b)
|
|
1899
1898
|
return c();
|
|
1900
1899
|
E ? c(!1, E) : r = setTimeout(() => {
|
|
1901
1900
|
c(!1, 1e-7);
|
|
1902
1901
|
}, 1e3);
|
|
1903
1902
|
}
|
|
1904
|
-
E === 1 && !
|
|
1903
|
+
E === 1 && !Ue(l, t.getBoundingClientRect()) && c(), b = !1;
|
|
1905
1904
|
}
|
|
1906
1905
|
try {
|
|
1907
1906
|
n = new IntersectionObserver(x, {
|
|
@@ -1916,58 +1915,58 @@ function qr(t, e) {
|
|
|
1916
1915
|
}
|
|
1917
1916
|
return c(!0), i;
|
|
1918
1917
|
}
|
|
1919
|
-
function
|
|
1918
|
+
function no(t, e, n, r) {
|
|
1920
1919
|
r === void 0 && (r = {});
|
|
1921
1920
|
const {
|
|
1922
1921
|
ancestorScroll: o = !0,
|
|
1923
1922
|
ancestorResize: i = !0,
|
|
1924
1923
|
elementResize: c = typeof ResizeObserver == "function",
|
|
1925
1924
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1926
|
-
animationFrame:
|
|
1927
|
-
} = r, l =
|
|
1928
|
-
|
|
1925
|
+
animationFrame: f = !1
|
|
1926
|
+
} = r, l = ne(t), u = o || i ? [...l ? ht(l) : [], ...e ? ht(e) : []] : [];
|
|
1927
|
+
u.forEach((v) => {
|
|
1929
1928
|
o && v.addEventListener("scroll", n, {
|
|
1930
1929
|
passive: !0
|
|
1931
1930
|
}), i && v.addEventListener("resize", n);
|
|
1932
1931
|
});
|
|
1933
|
-
const s = l && a ?
|
|
1934
|
-
let
|
|
1935
|
-
c && (
|
|
1932
|
+
const s = l && a ? Vr(l, n) : null;
|
|
1933
|
+
let m = -1, h = null;
|
|
1934
|
+
c && (h = new ResizeObserver((v) => {
|
|
1936
1935
|
let [w] = v;
|
|
1937
|
-
w && w.target === l &&
|
|
1936
|
+
w && w.target === l && h && e && (h.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1938
1937
|
var y;
|
|
1939
|
-
(y =
|
|
1938
|
+
(y = h) == null || y.observe(e);
|
|
1940
1939
|
})), n();
|
|
1941
|
-
}), l && !
|
|
1942
|
-
let p, d =
|
|
1943
|
-
|
|
1944
|
-
function
|
|
1945
|
-
const v =
|
|
1946
|
-
d && !
|
|
1940
|
+
}), l && !f && h.observe(l), e && h.observe(e));
|
|
1941
|
+
let p, d = f ? nt(t) : null;
|
|
1942
|
+
f && g();
|
|
1943
|
+
function g() {
|
|
1944
|
+
const v = nt(t);
|
|
1945
|
+
d && !Ue(d, v) && n(), d = v, p = requestAnimationFrame(g);
|
|
1947
1946
|
}
|
|
1948
1947
|
return n(), () => {
|
|
1949
1948
|
var v;
|
|
1950
|
-
|
|
1949
|
+
u.forEach((w) => {
|
|
1951
1950
|
o && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
|
|
1952
|
-
}), s?.(), (v =
|
|
1951
|
+
}), s?.(), (v = h) == null || v.disconnect(), h = null, f && cancelAnimationFrame(p);
|
|
1953
1952
|
};
|
|
1954
1953
|
}
|
|
1955
|
-
const
|
|
1954
|
+
const zr = br, ro = mr, jr = xr, Xr = gr, Yr = Rr, qr = vr, Se = dr, oo = wr, Kr = Sr, Ur = (t, e, n) => {
|
|
1956
1955
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
1957
|
-
platform:
|
|
1956
|
+
platform: Ir,
|
|
1958
1957
|
...n
|
|
1959
1958
|
}, i = {
|
|
1960
1959
|
...o.platform,
|
|
1961
1960
|
_c: r
|
|
1962
1961
|
};
|
|
1963
|
-
return
|
|
1962
|
+
return fr(t, e, {
|
|
1964
1963
|
...o,
|
|
1965
1964
|
platform: i
|
|
1966
1965
|
});
|
|
1967
1966
|
};
|
|
1968
|
-
var
|
|
1969
|
-
},
|
|
1970
|
-
function
|
|
1967
|
+
var Zr = typeof document < "u", Qr = function() {
|
|
1968
|
+
}, Rt = Zr ? Ee : Qr;
|
|
1969
|
+
function Mt(t, e) {
|
|
1971
1970
|
if (t === e)
|
|
1972
1971
|
return !0;
|
|
1973
1972
|
if (typeof t != typeof e)
|
|
@@ -1979,7 +1978,7 @@ function Ot(t, e) {
|
|
|
1979
1978
|
if (Array.isArray(t)) {
|
|
1980
1979
|
if (n = t.length, n !== e.length) return !1;
|
|
1981
1980
|
for (r = n; r-- !== 0; )
|
|
1982
|
-
if (!
|
|
1981
|
+
if (!Mt(t[r], e[r]))
|
|
1983
1982
|
return !1;
|
|
1984
1983
|
return !0;
|
|
1985
1984
|
}
|
|
@@ -1990,27 +1989,27 @@ function Ot(t, e) {
|
|
|
1990
1989
|
return !1;
|
|
1991
1990
|
for (r = n; r-- !== 0; ) {
|
|
1992
1991
|
const i = o[r];
|
|
1993
|
-
if (!(i === "_owner" && t.$$typeof) && !
|
|
1992
|
+
if (!(i === "_owner" && t.$$typeof) && !Mt(t[i], e[i]))
|
|
1994
1993
|
return !1;
|
|
1995
1994
|
}
|
|
1996
1995
|
return !0;
|
|
1997
1996
|
}
|
|
1998
1997
|
return t !== t && e !== e;
|
|
1999
1998
|
}
|
|
2000
|
-
function
|
|
1999
|
+
function Ze(t) {
|
|
2001
2000
|
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2002
2001
|
}
|
|
2003
|
-
function
|
|
2004
|
-
const n =
|
|
2002
|
+
function Re(t, e) {
|
|
2003
|
+
const n = Ze(t);
|
|
2005
2004
|
return Math.round(e * n) / n;
|
|
2006
2005
|
}
|
|
2007
|
-
function
|
|
2006
|
+
function It(t) {
|
|
2008
2007
|
const e = S.useRef(t);
|
|
2009
|
-
return
|
|
2008
|
+
return Rt(() => {
|
|
2010
2009
|
e.current = t;
|
|
2011
2010
|
}), e;
|
|
2012
2011
|
}
|
|
2013
|
-
function
|
|
2012
|
+
function io(t) {
|
|
2014
2013
|
t === void 0 && (t = {});
|
|
2015
2014
|
const {
|
|
2016
2015
|
placement: e = "bottom",
|
|
@@ -2022,61 +2021,61 @@ function uo(t) {
|
|
|
2022
2021
|
floating: c
|
|
2023
2022
|
} = {},
|
|
2024
2023
|
transform: a = !0,
|
|
2025
|
-
whileElementsMounted:
|
|
2024
|
+
whileElementsMounted: f,
|
|
2026
2025
|
open: l
|
|
2027
|
-
} = t, [
|
|
2026
|
+
} = t, [u, s] = S.useState({
|
|
2028
2027
|
x: 0,
|
|
2029
2028
|
y: 0,
|
|
2030
2029
|
strategy: n,
|
|
2031
2030
|
placement: e,
|
|
2032
2031
|
middlewareData: {},
|
|
2033
2032
|
isPositioned: !1
|
|
2034
|
-
}), [
|
|
2035
|
-
|
|
2036
|
-
const [p, d] = S.useState(null), [
|
|
2037
|
-
A !==
|
|
2033
|
+
}), [m, h] = S.useState(r);
|
|
2034
|
+
Mt(m, r) || h(r);
|
|
2035
|
+
const [p, d] = S.useState(null), [g, v] = S.useState(null), w = S.useCallback((A) => {
|
|
2036
|
+
A !== R.current && (R.current = A, d(A));
|
|
2038
2037
|
}, []), y = S.useCallback((A) => {
|
|
2039
2038
|
A !== E.current && (E.current = A, v(A));
|
|
2040
|
-
}, []), b = i || p, x = c ||
|
|
2041
|
-
if (!
|
|
2039
|
+
}, []), b = i || p, x = c || g, R = S.useRef(null), E = S.useRef(null), k = S.useRef(u), _ = f != null, C = It(f), O = It(o), P = It(l), L = S.useCallback(() => {
|
|
2040
|
+
if (!R.current || !E.current)
|
|
2042
2041
|
return;
|
|
2043
2042
|
const A = {
|
|
2044
2043
|
placement: e,
|
|
2045
2044
|
strategy: n,
|
|
2046
|
-
middleware:
|
|
2045
|
+
middleware: m
|
|
2047
2046
|
};
|
|
2048
|
-
O.current && (A.platform = O.current),
|
|
2047
|
+
O.current && (A.platform = O.current), Ur(R.current, E.current, A).then((H) => {
|
|
2049
2048
|
const G = {
|
|
2050
2049
|
...H,
|
|
2051
2050
|
// The floating element's position may be recomputed while it's closed
|
|
2052
2051
|
// but still mounted (such as when transitioning out). To ensure
|
|
2053
2052
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
2054
2053
|
// setting it to `true` when `open === false` (must be specified).
|
|
2055
|
-
isPositioned:
|
|
2054
|
+
isPositioned: P.current !== !1
|
|
2056
2055
|
};
|
|
2057
|
-
M.current && !
|
|
2056
|
+
M.current && !Mt(k.current, G) && (k.current = G, Je.flushSync(() => {
|
|
2058
2057
|
s(G);
|
|
2059
2058
|
}));
|
|
2060
2059
|
});
|
|
2061
|
-
}, [
|
|
2062
|
-
|
|
2063
|
-
l === !1 &&
|
|
2060
|
+
}, [m, e, n, O, P]);
|
|
2061
|
+
Rt(() => {
|
|
2062
|
+
l === !1 && k.current.isPositioned && (k.current.isPositioned = !1, s((A) => ({
|
|
2064
2063
|
...A,
|
|
2065
2064
|
isPositioned: !1
|
|
2066
2065
|
})));
|
|
2067
2066
|
}, [l]);
|
|
2068
2067
|
const M = S.useRef(!1);
|
|
2069
|
-
|
|
2068
|
+
Rt(() => (M.current = !0, () => {
|
|
2070
2069
|
M.current = !1;
|
|
2071
|
-
}), []),
|
|
2072
|
-
if (b && (
|
|
2073
|
-
if (
|
|
2074
|
-
return
|
|
2070
|
+
}), []), Rt(() => {
|
|
2071
|
+
if (b && (R.current = b), x && (E.current = x), b && x) {
|
|
2072
|
+
if (C.current)
|
|
2073
|
+
return C.current(b, x, L);
|
|
2075
2074
|
L();
|
|
2076
2075
|
}
|
|
2077
|
-
}, [b, x, L,
|
|
2076
|
+
}, [b, x, L, C, _]);
|
|
2078
2077
|
const F = S.useMemo(() => ({
|
|
2079
|
-
reference:
|
|
2078
|
+
reference: R,
|
|
2080
2079
|
floating: E,
|
|
2081
2080
|
setReference: w,
|
|
2082
2081
|
setFloating: y
|
|
@@ -2091,11 +2090,11 @@ function uo(t) {
|
|
|
2091
2090
|
};
|
|
2092
2091
|
if (!T.floating)
|
|
2093
2092
|
return A;
|
|
2094
|
-
const H =
|
|
2093
|
+
const H = Re(T.floating, u.x), G = Re(T.floating, u.y);
|
|
2095
2094
|
return a ? {
|
|
2096
2095
|
...A,
|
|
2097
2096
|
transform: "translate(" + H + "px, " + G + "px)",
|
|
2098
|
-
...
|
|
2097
|
+
...Ze(T.floating) >= 1.5 && {
|
|
2099
2098
|
willChange: "transform"
|
|
2100
2099
|
}
|
|
2101
2100
|
} : {
|
|
@@ -2103,16 +2102,16 @@ function uo(t) {
|
|
|
2103
2102
|
left: H,
|
|
2104
2103
|
top: G
|
|
2105
2104
|
};
|
|
2106
|
-
}, [n, a, T.floating,
|
|
2105
|
+
}, [n, a, T.floating, u.x, u.y]);
|
|
2107
2106
|
return S.useMemo(() => ({
|
|
2108
|
-
...
|
|
2107
|
+
...u,
|
|
2109
2108
|
update: L,
|
|
2110
2109
|
refs: F,
|
|
2111
2110
|
elements: T,
|
|
2112
2111
|
floatingStyles: N
|
|
2113
|
-
}), [
|
|
2112
|
+
}), [u, L, F, T, N]);
|
|
2114
2113
|
}
|
|
2115
|
-
const
|
|
2114
|
+
const Gr = (t) => {
|
|
2116
2115
|
function e(n) {
|
|
2117
2116
|
return {}.hasOwnProperty.call(n, "current");
|
|
2118
2117
|
}
|
|
@@ -2124,57 +2123,81 @@ const ro = (t) => {
|
|
|
2124
2123
|
element: r,
|
|
2125
2124
|
padding: o
|
|
2126
2125
|
} = typeof t == "function" ? t(n) : t;
|
|
2127
|
-
return r && e(r) ? r.current != null ?
|
|
2126
|
+
return r && e(r) ? r.current != null ? Se({
|
|
2128
2127
|
element: r.current,
|
|
2129
2128
|
padding: o
|
|
2130
|
-
}).fn(n) : {} : r ?
|
|
2129
|
+
}).fn(n) : {} : r ? Se({
|
|
2131
2130
|
element: r,
|
|
2132
2131
|
padding: o
|
|
2133
2132
|
}).fn(n) : {};
|
|
2134
2133
|
}
|
|
2135
2134
|
};
|
|
2136
|
-
},
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
...Gr(t),
|
|
2153
|
-
options: [t, e]
|
|
2154
|
-
}), wo = (t, e) => ({
|
|
2155
|
-
...ro(t),
|
|
2135
|
+
}, co = (t, e) => {
|
|
2136
|
+
const n = zr(t);
|
|
2137
|
+
return {
|
|
2138
|
+
name: n.name,
|
|
2139
|
+
fn: n.fn,
|
|
2140
|
+
options: [t, e]
|
|
2141
|
+
};
|
|
2142
|
+
}, ao = (t, e) => {
|
|
2143
|
+
const n = jr(t);
|
|
2144
|
+
return {
|
|
2145
|
+
name: n.name,
|
|
2146
|
+
fn: n.fn,
|
|
2147
|
+
options: [t, e]
|
|
2148
|
+
};
|
|
2149
|
+
}, so = (t, e) => ({
|
|
2150
|
+
fn: Kr(t).fn,
|
|
2156
2151
|
options: [t, e]
|
|
2157
|
-
})
|
|
2152
|
+
}), lo = (t, e) => {
|
|
2153
|
+
const n = Xr(t);
|
|
2154
|
+
return {
|
|
2155
|
+
name: n.name,
|
|
2156
|
+
fn: n.fn,
|
|
2157
|
+
options: [t, e]
|
|
2158
|
+
};
|
|
2159
|
+
}, uo = (t, e) => {
|
|
2160
|
+
const n = Yr(t);
|
|
2161
|
+
return {
|
|
2162
|
+
name: n.name,
|
|
2163
|
+
fn: n.fn,
|
|
2164
|
+
options: [t, e]
|
|
2165
|
+
};
|
|
2166
|
+
}, fo = (t, e) => {
|
|
2167
|
+
const n = qr(t);
|
|
2168
|
+
return {
|
|
2169
|
+
name: n.name,
|
|
2170
|
+
fn: n.fn,
|
|
2171
|
+
options: [t, e]
|
|
2172
|
+
};
|
|
2173
|
+
}, ho = (t, e) => {
|
|
2174
|
+
const n = Gr(t);
|
|
2175
|
+
return {
|
|
2176
|
+
name: n.name,
|
|
2177
|
+
fn: n.fn,
|
|
2178
|
+
options: [t, e]
|
|
2179
|
+
};
|
|
2180
|
+
};
|
|
2158
2181
|
export {
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2182
|
+
Wn as R,
|
|
2183
|
+
eo as Z,
|
|
2184
|
+
uo as a,
|
|
2185
|
+
ho as b,
|
|
2186
|
+
fo as c,
|
|
2187
|
+
no as d,
|
|
2188
|
+
Xr as e,
|
|
2189
|
+
lo as f,
|
|
2190
|
+
jr as g,
|
|
2191
|
+
to as h,
|
|
2192
|
+
zr as i,
|
|
2193
|
+
Se as j,
|
|
2194
|
+
Yr as k,
|
|
2195
|
+
so as l,
|
|
2196
|
+
ro as m,
|
|
2197
|
+
qr as n,
|
|
2198
|
+
co as o,
|
|
2199
|
+
oo as p,
|
|
2200
|
+
Ur as q,
|
|
2201
|
+
ao as s,
|
|
2202
|
+
io as u
|
|
2180
2203
|
};
|