@purpur/library 9.0.0 → 9.0.1

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.
Files changed (93) hide show
  1. package/CHANGELOG.json +12 -0
  2. package/CHANGELOG.md +8 -1
  3. package/dist/LICENSE.txt +5 -5
  4. package/dist/checkbox-Dk3bZkZ3.js.map +1 -1
  5. package/dist/checkbox-LYzMiXu7.mjs.map +1 -1
  6. package/dist/chip-group-CJVvfl_J.mjs.map +1 -1
  7. package/dist/chip-group-aj1fdnjC.js.map +1 -1
  8. package/dist/{date-picker-BRkh2YEH.mjs → date-picker-BRnwwZv1.mjs} +364 -354
  9. package/dist/date-picker-BRnwwZv1.mjs.map +1 -0
  10. package/dist/date-picker-DlJGggam.js +2 -0
  11. package/dist/date-picker-DlJGggam.js.map +1 -0
  12. package/dist/date-picker.cjs.js +1 -1
  13. package/dist/date-picker.es.js +1 -1
  14. package/dist/floating-ui.react-dom-0ol4sFzt.mjs +1363 -0
  15. package/dist/floating-ui.react-dom-0ol4sFzt.mjs.map +1 -0
  16. package/dist/floating-ui.react-dom-Cc_YSprQ.js +2 -0
  17. package/dist/floating-ui.react-dom-Cc_YSprQ.js.map +1 -0
  18. package/dist/index-2cFVyGXq.js.map +1 -1
  19. package/dist/index-B8Mazo6u.mjs.map +1 -1
  20. package/dist/index-BG6K_yAm.js.map +1 -1
  21. package/dist/index-BVmlsxuF.js.map +1 -1
  22. package/dist/index-BbtRr5Q6.js.map +1 -1
  23. package/dist/index-BtWPC8xc.js.map +1 -1
  24. package/dist/index-ByaXH_ih.mjs.map +1 -1
  25. package/dist/index-C1AXAWlO.mjs.map +1 -1
  26. package/dist/index-CCNZ9uWB.mjs.map +1 -1
  27. package/dist/index-CEQ35j8b.mjs.map +1 -1
  28. package/dist/index-CKCTy3ZL.mjs.map +1 -1
  29. package/dist/index-CLMd7NJE.mjs.map +1 -1
  30. package/dist/index-Cje7xxa1.js.map +1 -1
  31. package/dist/index-CleLBinl.js.map +1 -1
  32. package/dist/index-CoR7YA3H.js.map +1 -1
  33. package/dist/index-CxBG4Ssm.js.map +1 -1
  34. package/dist/index-DA01QPpC.js.map +1 -1
  35. package/dist/index-DCcK_d4W.mjs.map +1 -1
  36. package/dist/index-DDrLXRUs.mjs.map +1 -1
  37. package/dist/index-DLcqcWxM.mjs.map +1 -1
  38. package/dist/index-DOFLOnao.js.map +1 -1
  39. package/dist/index-DOfn3ixy.mjs.map +1 -1
  40. package/dist/index-DPxjTK4w.mjs.map +1 -1
  41. package/dist/index-DSf4qCR-.mjs.map +1 -1
  42. package/dist/index-DlMXYAr3.js.map +1 -1
  43. package/dist/index-HJvG7FXj.js.map +1 -1
  44. package/dist/index-Hk_HrrHM.js.map +1 -1
  45. package/dist/index-IpWiejWQ.mjs.map +1 -1
  46. package/dist/index-MiRhI3nq.mjs.map +1 -1
  47. package/dist/index-_XxjJPRD.js.map +1 -1
  48. package/dist/index-kcwFA4Dv.js.map +1 -1
  49. package/dist/index-tyLV0iiH.mjs.map +1 -1
  50. package/dist/label-7sJe5-pX.mjs.map +1 -1
  51. package/dist/label-yHK80hhV.js.map +1 -1
  52. package/dist/library.cjs.js +1 -1
  53. package/dist/library.es.js +5 -5
  54. package/dist/{popover-CYyCtoef.js → popover-B1BgSoQx.js} +2 -2
  55. package/dist/{popover-CYyCtoef.js.map → popover-B1BgSoQx.js.map} +1 -1
  56. package/dist/{popover-C6nZb3cQ.mjs → popover-DBMI9Jy1.mjs} +4 -4
  57. package/dist/{popover-C6nZb3cQ.mjs.map → popover-DBMI9Jy1.mjs.map} +1 -1
  58. package/dist/popover.cjs.js +1 -1
  59. package/dist/popover.es.js +1 -1
  60. package/dist/slider-CDOrFmK-.mjs.map +1 -1
  61. package/dist/slider-_R6JmPZl.js.map +1 -1
  62. package/dist/{stepper-DA0c9Utm.js → stepper-B248FwO-.js} +2 -2
  63. package/dist/{stepper-DA0c9Utm.js.map → stepper-B248FwO-.js.map} +1 -1
  64. package/dist/{stepper-D81jmbEf.mjs → stepper-BfIbJwZn.mjs} +2 -2
  65. package/dist/{stepper-D81jmbEf.mjs.map → stepper-BfIbJwZn.mjs.map} +1 -1
  66. package/dist/stepper.cjs.js +1 -1
  67. package/dist/stepper.es.js +1 -1
  68. package/dist/{table-Dd58bK_Q.js → table-BNeo_B1h.js} +2 -2
  69. package/dist/{table-Dd58bK_Q.js.map → table-BNeo_B1h.js.map} +1 -1
  70. package/dist/{table-CIrmGGb2.mjs → table-DvcpczWf.mjs} +2 -2
  71. package/dist/{table-CIrmGGb2.mjs.map → table-DvcpczWf.mjs.map} +1 -1
  72. package/dist/table.cjs.js +1 -1
  73. package/dist/table.es.js +1 -1
  74. package/dist/tabs-CfHd4UQ2.js.map +1 -1
  75. package/dist/tabs-CoXMAwMx.mjs.map +1 -1
  76. package/dist/toggle-C8IwTbX8.js.map +1 -1
  77. package/dist/toggle-Cezg5MUc.mjs.map +1 -1
  78. package/dist/{tooltip-870Nmk-v.js → tooltip-CLQLxoaf.js} +2 -2
  79. package/dist/{tooltip-870Nmk-v.js.map → tooltip-CLQLxoaf.js.map} +1 -1
  80. package/dist/{tooltip-Cqfj0lSz.mjs → tooltip-DXi7ikUT.mjs} +2 -2
  81. package/dist/{tooltip-Cqfj0lSz.mjs.map → tooltip-DXi7ikUT.mjs.map} +1 -1
  82. package/dist/tooltip.cjs.js +1 -1
  83. package/dist/tooltip.es.js +1 -1
  84. package/dist/visually-hidden-BYFkJEp1.mjs.map +1 -1
  85. package/dist/visually-hidden-C2CKovZx.js.map +1 -1
  86. package/package.json +68 -68
  87. package/dist/date-picker-BRkh2YEH.mjs.map +0 -1
  88. package/dist/date-picker-C2Wtf7XQ.js +0 -2
  89. package/dist/date-picker-C2Wtf7XQ.js.map +0 -1
  90. package/dist/floating-ui.react-dom-B_rB55Mr.mjs +0 -1340
  91. package/dist/floating-ui.react-dom-B_rB55Mr.mjs.map +0 -1
  92. package/dist/floating-ui.react-dom-z0lMBJ4R.js +0 -2
  93. package/dist/floating-ui.react-dom-z0lMBJ4R.js.map +0 -1
@@ -0,0 +1,1363 @@
1
+ import * as L from "react";
2
+ import { useLayoutEffect as Ut } from "react";
3
+ import * as Kt from "react-dom";
4
+ function at() {
5
+ return typeof window < "u";
6
+ }
7
+ function tt(t) {
8
+ return Bt(t) ? (t.nodeName || "").toLowerCase() : "#document";
9
+ }
10
+ function $(t) {
11
+ var e;
12
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
13
+ }
14
+ function j(t) {
15
+ var e;
16
+ return (e = (Bt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
17
+ }
18
+ function Bt(t) {
19
+ return at() ? t instanceof Node || t instanceof $(t).Node : !1;
20
+ }
21
+ function N(t) {
22
+ return at() ? t instanceof Element || t instanceof $(t).Element : !1;
23
+ }
24
+ function Y(t) {
25
+ return at() ? t instanceof HTMLElement || t instanceof $(t).HTMLElement : !1;
26
+ }
27
+ function St(t) {
28
+ return !at() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof $(t).ShadowRoot;
29
+ }
30
+ function ot(t) {
31
+ const {
32
+ overflow: e,
33
+ overflowX: n,
34
+ overflowY: o,
35
+ display: i
36
+ } = H(t);
37
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && i !== "inline" && i !== "contents";
38
+ }
39
+ function Gt(t) {
40
+ return /^(table|td|th)$/.test(tt(t));
41
+ }
42
+ function ut(t) {
43
+ try {
44
+ if (t.matches(":popover-open"))
45
+ return !0;
46
+ } catch {
47
+ }
48
+ try {
49
+ return t.matches(":modal");
50
+ } catch {
51
+ return !1;
52
+ }
53
+ }
54
+ const Jt = /transform|translate|scale|rotate|perspective|filter/, Qt = /paint|layout|strict|content/, G = (t) => !!t && t !== "none";
55
+ let ht;
56
+ function vt(t) {
57
+ const e = N(t) ? H(t) : t;
58
+ return G(e.transform) || G(e.translate) || G(e.scale) || G(e.rotate) || G(e.perspective) || !bt() && (G(e.backdropFilter) || G(e.filter)) || Jt.test(e.willChange || "") || Qt.test(e.contain || "");
59
+ }
60
+ function Zt(t) {
61
+ let e = U(t);
62
+ for (; Y(e) && !Z(e); ) {
63
+ if (vt(e))
64
+ return e;
65
+ if (ut(e))
66
+ return null;
67
+ e = U(e);
68
+ }
69
+ return null;
70
+ }
71
+ function bt() {
72
+ return ht == null && (ht = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), ht;
73
+ }
74
+ function Z(t) {
75
+ return /^(html|body|#document)$/.test(tt(t));
76
+ }
77
+ function H(t) {
78
+ return $(t).getComputedStyle(t);
79
+ }
80
+ function dt(t) {
81
+ return N(t) ? {
82
+ scrollLeft: t.scrollLeft,
83
+ scrollTop: t.scrollTop
84
+ } : {
85
+ scrollLeft: t.scrollX,
86
+ scrollTop: t.scrollY
87
+ };
88
+ }
89
+ function U(t) {
90
+ if (tt(t) === "html")
91
+ return t;
92
+ const e = (
93
+ // Step into the shadow DOM of the parent of a slotted node.
94
+ t.assignedSlot || // DOM Element detected.
95
+ t.parentNode || // ShadowRoot detected.
96
+ St(t) && t.host || // Fallback.
97
+ j(t)
98
+ );
99
+ return St(e) ? e.host : e;
100
+ }
101
+ function Nt(t) {
102
+ const e = U(t);
103
+ return Z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : Y(e) && ot(e) ? e : Nt(e);
104
+ }
105
+ function nt(t, e, n) {
106
+ var o;
107
+ e === void 0 && (e = []), n === void 0 && (n = !0);
108
+ const i = Nt(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = $(i);
109
+ if (r) {
110
+ const c = wt(s);
111
+ return e.concat(s, s.visualViewport || [], ot(i) ? i : [], c && n ? nt(c) : []);
112
+ } else
113
+ return e.concat(i, nt(i, [], n));
114
+ }
115
+ function wt(t) {
116
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
117
+ }
118
+ const te = ["top", "right", "bottom", "left"], K = Math.min, F = Math.max, st = Math.round, it = Math.floor, z = (t) => ({
119
+ x: t,
120
+ y: t
121
+ }), ee = {
122
+ left: "right",
123
+ right: "left",
124
+ bottom: "top",
125
+ top: "bottom"
126
+ };
127
+ function xt(t, e, n) {
128
+ return F(t, K(e, n));
129
+ }
130
+ function I(t, e) {
131
+ return typeof t == "function" ? t(e) : t;
132
+ }
133
+ function X(t) {
134
+ return t.split("-")[0];
135
+ }
136
+ function et(t) {
137
+ return t.split("-")[1];
138
+ }
139
+ function Rt(t) {
140
+ return t === "x" ? "y" : "x";
141
+ }
142
+ function At(t) {
143
+ return t === "y" ? "height" : "width";
144
+ }
145
+ function V(t) {
146
+ const e = t[0];
147
+ return e === "t" || e === "b" ? "y" : "x";
148
+ }
149
+ function Ot(t) {
150
+ return Rt(V(t));
151
+ }
152
+ function ne(t, e, n) {
153
+ n === void 0 && (n = !1);
154
+ const o = et(t), i = Ot(t), r = At(i);
155
+ let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
156
+ return e.reference[r] > e.floating[r] && (s = ct(s)), [s, ct(s)];
157
+ }
158
+ function oe(t) {
159
+ const e = ct(t);
160
+ return [yt(t), e, yt(e)];
161
+ }
162
+ function yt(t) {
163
+ return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
164
+ }
165
+ const Et = ["left", "right"], Lt = ["right", "left"], ie = ["top", "bottom"], re = ["bottom", "top"];
166
+ function se(t, e, n) {
167
+ switch (t) {
168
+ case "top":
169
+ case "bottom":
170
+ return n ? e ? Lt : Et : e ? Et : Lt;
171
+ case "left":
172
+ case "right":
173
+ return e ? ie : re;
174
+ default:
175
+ return [];
176
+ }
177
+ }
178
+ function ce(t, e, n, o) {
179
+ const i = et(t);
180
+ let r = se(X(t), n === "start", o);
181
+ return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(yt)))), r;
182
+ }
183
+ function ct(t) {
184
+ const e = X(t);
185
+ return ee[e] + t.slice(e.length);
186
+ }
187
+ function le(t) {
188
+ return {
189
+ top: 0,
190
+ right: 0,
191
+ bottom: 0,
192
+ left: 0,
193
+ ...t
194
+ };
195
+ }
196
+ function Ht(t) {
197
+ return typeof t != "number" ? le(t) : {
198
+ top: t,
199
+ right: t,
200
+ bottom: t,
201
+ left: t
202
+ };
203
+ }
204
+ function lt(t) {
205
+ const {
206
+ x: e,
207
+ y: n,
208
+ width: o,
209
+ height: i
210
+ } = t;
211
+ return {
212
+ width: o,
213
+ height: i,
214
+ top: n,
215
+ left: e,
216
+ right: e + o,
217
+ bottom: n + i,
218
+ x: e,
219
+ y: n
220
+ };
221
+ }
222
+ function Pt(t, e, n) {
223
+ let {
224
+ reference: o,
225
+ floating: i
226
+ } = t;
227
+ const r = V(e), s = Ot(e), c = At(s), a = X(e), d = r === "y", l = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, m = o[c] / 2 - i[c] / 2;
228
+ let f;
229
+ switch (a) {
230
+ case "top":
231
+ f = {
232
+ x: l,
233
+ y: o.y - i.height
234
+ };
235
+ break;
236
+ case "bottom":
237
+ f = {
238
+ x: l,
239
+ y: o.y + o.height
240
+ };
241
+ break;
242
+ case "right":
243
+ f = {
244
+ x: o.x + o.width,
245
+ y: u
246
+ };
247
+ break;
248
+ case "left":
249
+ f = {
250
+ x: o.x - i.width,
251
+ y: u
252
+ };
253
+ break;
254
+ default:
255
+ f = {
256
+ x: o.x,
257
+ y: o.y
258
+ };
259
+ }
260
+ switch (et(e)) {
261
+ case "start":
262
+ f[s] -= m * (n && d ? -1 : 1);
263
+ break;
264
+ case "end":
265
+ f[s] += m * (n && d ? -1 : 1);
266
+ break;
267
+ }
268
+ return f;
269
+ }
270
+ async function fe(t, e) {
271
+ var n;
272
+ e === void 0 && (e = {});
273
+ const {
274
+ x: o,
275
+ y: i,
276
+ platform: r,
277
+ rects: s,
278
+ elements: c,
279
+ strategy: a
280
+ } = t, {
281
+ boundary: d = "clippingAncestors",
282
+ rootBoundary: l = "viewport",
283
+ elementContext: u = "floating",
284
+ altBoundary: m = !1,
285
+ padding: f = 0
286
+ } = I(e, t), h = Ht(f), w = c[m ? u === "floating" ? "reference" : "floating" : u], p = lt(await r.getClippingRect({
287
+ element: (n = await (r.isElement == null ? void 0 : r.isElement(w))) == null || n ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
288
+ boundary: d,
289
+ rootBoundary: l,
290
+ strategy: a
291
+ })), v = u === "floating" ? {
292
+ x: o,
293
+ y: i,
294
+ width: s.floating.width,
295
+ height: s.floating.height
296
+ } : s.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), x = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
297
+ x: 1,
298
+ y: 1
299
+ } : {
300
+ x: 1,
301
+ y: 1
302
+ }, b = lt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
303
+ elements: c,
304
+ rect: v,
305
+ offsetParent: y,
306
+ strategy: a
307
+ }) : v);
308
+ return {
309
+ top: (p.top - b.top + h.top) / x.y,
310
+ bottom: (b.bottom - p.bottom + h.bottom) / x.y,
311
+ left: (p.left - b.left + h.left) / x.x,
312
+ right: (b.right - p.right + h.right) / x.x
313
+ };
314
+ }
315
+ const ae = 50, ue = async (t, e, n) => {
316
+ const {
317
+ placement: o = "bottom",
318
+ strategy: i = "absolute",
319
+ middleware: r = [],
320
+ platform: s
321
+ } = n, c = s.detectOverflow ? s : {
322
+ ...s,
323
+ detectOverflow: fe
324
+ }, a = await (s.isRTL == null ? void 0 : s.isRTL(e));
325
+ let d = await s.getElementRects({
326
+ reference: t,
327
+ floating: e,
328
+ strategy: i
329
+ }), {
330
+ x: l,
331
+ y: u
332
+ } = Pt(d, o, a), m = o, f = 0;
333
+ const h = {};
334
+ for (let g = 0; g < r.length; g++) {
335
+ const w = r[g];
336
+ if (!w)
337
+ continue;
338
+ const {
339
+ name: p,
340
+ fn: v
341
+ } = w, {
342
+ x: y,
343
+ y: x,
344
+ data: b,
345
+ reset: R
346
+ } = await v({
347
+ x: l,
348
+ y: u,
349
+ initialPlacement: o,
350
+ placement: m,
351
+ strategy: i,
352
+ middlewareData: h,
353
+ rects: d,
354
+ platform: c,
355
+ elements: {
356
+ reference: t,
357
+ floating: e
358
+ }
359
+ });
360
+ l = y ?? l, u = x ?? u, h[p] = {
361
+ ...h[p],
362
+ ...b
363
+ }, R && f < ae && (f++, typeof R == "object" && (R.placement && (m = R.placement), R.rects && (d = R.rects === !0 ? await s.getElementRects({
364
+ reference: t,
365
+ floating: e,
366
+ strategy: i
367
+ }) : R.rects), {
368
+ x: l,
369
+ y: u
370
+ } = Pt(d, m, a)), g = -1);
371
+ }
372
+ return {
373
+ x: l,
374
+ y: u,
375
+ placement: m,
376
+ strategy: i,
377
+ middlewareData: h
378
+ };
379
+ }, de = (t) => ({
380
+ name: "arrow",
381
+ options: t,
382
+ async fn(e) {
383
+ const {
384
+ x: n,
385
+ y: o,
386
+ placement: i,
387
+ rects: r,
388
+ platform: s,
389
+ elements: c,
390
+ middlewareData: a
391
+ } = e, {
392
+ element: d,
393
+ padding: l = 0
394
+ } = I(t, e) || {};
395
+ if (d == null)
396
+ return {};
397
+ const u = Ht(l), m = {
398
+ x: n,
399
+ y: o
400
+ }, f = Ot(i), h = At(f), g = await s.getDimensions(d), w = f === "y", p = w ? "top" : "left", v = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", x = r.reference[h] + r.reference[f] - m[f] - r.floating[h], b = m[f] - r.reference[f], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(d));
401
+ let O = R ? R[y] : 0;
402
+ (!O || !await (s.isElement == null ? void 0 : s.isElement(R))) && (O = c.floating[y] || r.floating[h]);
403
+ const P = x / 2 - b / 2, W = O / 2 - g[h] / 2 - 1, E = K(u[p], W), B = K(u[v], W), M = E, D = O - g[h] - B, C = O / 2 - g[h] / 2 + P, _ = xt(M, C, D), S = !a.arrow && et(i) != null && C !== _ && r.reference[h] / 2 - (C < M ? E : B) - g[h] / 2 < 0, T = S ? C < M ? C - M : C - D : 0;
404
+ return {
405
+ [f]: m[f] + T,
406
+ data: {
407
+ [f]: _,
408
+ centerOffset: C - _ - T,
409
+ ...S && {
410
+ alignmentOffset: T
411
+ }
412
+ },
413
+ reset: S
414
+ };
415
+ }
416
+ }), me = function(t) {
417
+ return t === void 0 && (t = {}), {
418
+ name: "flip",
419
+ options: t,
420
+ async fn(e) {
421
+ var n, o;
422
+ const {
423
+ placement: i,
424
+ middlewareData: r,
425
+ rects: s,
426
+ initialPlacement: c,
427
+ platform: a,
428
+ elements: d
429
+ } = e, {
430
+ mainAxis: l = !0,
431
+ crossAxis: u = !0,
432
+ fallbackPlacements: m,
433
+ fallbackStrategy: f = "bestFit",
434
+ fallbackAxisSideDirection: h = "none",
435
+ flipAlignment: g = !0,
436
+ ...w
437
+ } = I(t, e);
438
+ if ((n = r.arrow) != null && n.alignmentOffset)
439
+ return {};
440
+ const p = X(i), v = V(c), y = X(c) === c, x = await (a.isRTL == null ? void 0 : a.isRTL(d.floating)), b = m || (y || !g ? [ct(c)] : oe(c)), R = h !== "none";
441
+ !m && R && b.push(...ce(c, g, h, x));
442
+ const O = [c, ...b], P = await a.detectOverflow(e, w), W = [];
443
+ let E = ((o = r.flip) == null ? void 0 : o.overflows) || [];
444
+ if (l && W.push(P[p]), u) {
445
+ const C = ne(i, s, x);
446
+ W.push(P[C[0]], P[C[1]]);
447
+ }
448
+ if (E = [...E, {
449
+ placement: i,
450
+ overflows: W
451
+ }], !W.every((C) => C <= 0)) {
452
+ var B, M;
453
+ const C = (((B = r.flip) == null ? void 0 : B.index) || 0) + 1, _ = O[C];
454
+ if (_ && (!(u === "alignment" ? v !== V(_) : !1) || // We leave the current main axis only if every placement on that axis
455
+ // overflows the main axis.
456
+ E.every((A) => V(A.placement) === v ? A.overflows[0] > 0 : !0)))
457
+ return {
458
+ data: {
459
+ index: C,
460
+ overflows: E
461
+ },
462
+ reset: {
463
+ placement: _
464
+ }
465
+ };
466
+ let S = (M = E.filter((T) => T.overflows[0] <= 0).sort((T, A) => T.overflows[1] - A.overflows[1])[0]) == null ? void 0 : M.placement;
467
+ if (!S)
468
+ switch (f) {
469
+ case "bestFit": {
470
+ var D;
471
+ const T = (D = E.filter((A) => {
472
+ if (R) {
473
+ const k = V(A.placement);
474
+ return k === v || // Create a bias to the `y` side axis due to horizontal
475
+ // reading directions favoring greater width.
476
+ k === "y";
477
+ }
478
+ return !0;
479
+ }).map((A) => [A.placement, A.overflows.filter((k) => k > 0).reduce((k, q) => k + q, 0)]).sort((A, k) => A[1] - k[1])[0]) == null ? void 0 : D[0];
480
+ T && (S = T);
481
+ break;
482
+ }
483
+ case "initialPlacement":
484
+ S = c;
485
+ break;
486
+ }
487
+ if (i !== S)
488
+ return {
489
+ reset: {
490
+ placement: S
491
+ }
492
+ };
493
+ }
494
+ return {};
495
+ }
496
+ };
497
+ };
498
+ function Dt(t, e) {
499
+ return {
500
+ top: t.top - e.height,
501
+ right: t.right - e.width,
502
+ bottom: t.bottom - e.height,
503
+ left: t.left - e.width
504
+ };
505
+ }
506
+ function Tt(t) {
507
+ return te.some((e) => t[e] >= 0);
508
+ }
509
+ const he = function(t) {
510
+ return t === void 0 && (t = {}), {
511
+ name: "hide",
512
+ options: t,
513
+ async fn(e) {
514
+ const {
515
+ rects: n,
516
+ platform: o
517
+ } = e, {
518
+ strategy: i = "referenceHidden",
519
+ ...r
520
+ } = I(t, e);
521
+ switch (i) {
522
+ case "referenceHidden": {
523
+ const s = await o.detectOverflow(e, {
524
+ ...r,
525
+ elementContext: "reference"
526
+ }), c = Dt(s, n.reference);
527
+ return {
528
+ data: {
529
+ referenceHiddenOffsets: c,
530
+ referenceHidden: Tt(c)
531
+ }
532
+ };
533
+ }
534
+ case "escaped": {
535
+ const s = await o.detectOverflow(e, {
536
+ ...r,
537
+ altBoundary: !0
538
+ }), c = Dt(s, n.floating);
539
+ return {
540
+ data: {
541
+ escapedOffsets: c,
542
+ escaped: Tt(c)
543
+ }
544
+ };
545
+ }
546
+ default:
547
+ return {};
548
+ }
549
+ }
550
+ };
551
+ }, _t = /* @__PURE__ */ new Set(["left", "top"]);
552
+ async function ge(t, e) {
553
+ const {
554
+ placement: n,
555
+ platform: o,
556
+ elements: i
557
+ } = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = X(n), c = et(n), a = V(n) === "y", d = _t.has(s) ? -1 : 1, l = r && a ? -1 : 1, u = I(e, t);
558
+ let {
559
+ mainAxis: m,
560
+ crossAxis: f,
561
+ alignmentAxis: h
562
+ } = typeof u == "number" ? {
563
+ mainAxis: u,
564
+ crossAxis: 0,
565
+ alignmentAxis: null
566
+ } : {
567
+ mainAxis: u.mainAxis || 0,
568
+ crossAxis: u.crossAxis || 0,
569
+ alignmentAxis: u.alignmentAxis
570
+ };
571
+ return c && typeof h == "number" && (f = c === "end" ? h * -1 : h), a ? {
572
+ x: f * l,
573
+ y: m * d
574
+ } : {
575
+ x: m * d,
576
+ y: f * l
577
+ };
578
+ }
579
+ const pe = function(t) {
580
+ return t === void 0 && (t = 0), {
581
+ name: "offset",
582
+ options: t,
583
+ async fn(e) {
584
+ var n, o;
585
+ const {
586
+ x: i,
587
+ y: r,
588
+ placement: s,
589
+ middlewareData: c
590
+ } = e, a = await ge(e, t);
591
+ return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
592
+ x: i + a.x,
593
+ y: r + a.y,
594
+ data: {
595
+ ...a,
596
+ placement: s
597
+ }
598
+ };
599
+ }
600
+ };
601
+ }, we = function(t) {
602
+ return t === void 0 && (t = {}), {
603
+ name: "shift",
604
+ options: t,
605
+ async fn(e) {
606
+ const {
607
+ x: n,
608
+ y: o,
609
+ placement: i,
610
+ platform: r
611
+ } = e, {
612
+ mainAxis: s = !0,
613
+ crossAxis: c = !1,
614
+ limiter: a = {
615
+ fn: (p) => {
616
+ let {
617
+ x: v,
618
+ y
619
+ } = p;
620
+ return {
621
+ x: v,
622
+ y
623
+ };
624
+ }
625
+ },
626
+ ...d
627
+ } = I(t, e), l = {
628
+ x: n,
629
+ y: o
630
+ }, u = await r.detectOverflow(e, d), m = V(X(i)), f = Rt(m);
631
+ let h = l[f], g = l[m];
632
+ if (s) {
633
+ const p = f === "y" ? "top" : "left", v = f === "y" ? "bottom" : "right", y = h + u[p], x = h - u[v];
634
+ h = xt(y, h, x);
635
+ }
636
+ if (c) {
637
+ const p = m === "y" ? "top" : "left", v = m === "y" ? "bottom" : "right", y = g + u[p], x = g - u[v];
638
+ g = xt(y, g, x);
639
+ }
640
+ const w = a.fn({
641
+ ...e,
642
+ [f]: h,
643
+ [m]: g
644
+ });
645
+ return {
646
+ ...w,
647
+ data: {
648
+ x: w.x - n,
649
+ y: w.y - o,
650
+ enabled: {
651
+ [f]: s,
652
+ [m]: c
653
+ }
654
+ }
655
+ };
656
+ }
657
+ };
658
+ }, xe = function(t) {
659
+ return t === void 0 && (t = {}), {
660
+ options: t,
661
+ fn(e) {
662
+ const {
663
+ x: n,
664
+ y: o,
665
+ placement: i,
666
+ rects: r,
667
+ middlewareData: s
668
+ } = e, {
669
+ offset: c = 0,
670
+ mainAxis: a = !0,
671
+ crossAxis: d = !0
672
+ } = I(t, e), l = {
673
+ x: n,
674
+ y: o
675
+ }, u = V(i), m = Rt(u);
676
+ let f = l[m], h = l[u];
677
+ const g = I(c, e), w = typeof g == "number" ? {
678
+ mainAxis: g,
679
+ crossAxis: 0
680
+ } : {
681
+ mainAxis: 0,
682
+ crossAxis: 0,
683
+ ...g
684
+ };
685
+ if (a) {
686
+ const y = m === "y" ? "height" : "width", x = r.reference[m] - r.floating[y] + w.mainAxis, b = r.reference[m] + r.reference[y] - w.mainAxis;
687
+ f < x ? f = x : f > b && (f = b);
688
+ }
689
+ if (d) {
690
+ var p, v;
691
+ const y = m === "y" ? "width" : "height", x = _t.has(X(i)), b = r.reference[u] - r.floating[y] + (x && ((p = s.offset) == null ? void 0 : p[u]) || 0) + (x ? 0 : w.crossAxis), R = r.reference[u] + r.reference[y] + (x ? 0 : ((v = s.offset) == null ? void 0 : v[u]) || 0) - (x ? w.crossAxis : 0);
692
+ h < b ? h = b : h > R && (h = R);
693
+ }
694
+ return {
695
+ [m]: f,
696
+ [u]: h
697
+ };
698
+ }
699
+ };
700
+ }, ye = function(t) {
701
+ return t === void 0 && (t = {}), {
702
+ name: "size",
703
+ options: t,
704
+ async fn(e) {
705
+ var n, o;
706
+ const {
707
+ placement: i,
708
+ rects: r,
709
+ platform: s,
710
+ elements: c
711
+ } = e, {
712
+ apply: a = () => {
713
+ },
714
+ ...d
715
+ } = I(t, e), l = await s.detectOverflow(e, d), u = X(i), m = et(i), f = V(i) === "y", {
716
+ width: h,
717
+ height: g
718
+ } = r.floating;
719
+ let w, p;
720
+ u === "top" || u === "bottom" ? (w = u, p = m === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (p = u, w = m === "end" ? "top" : "bottom");
721
+ const v = g - l.top - l.bottom, y = h - l.left - l.right, x = K(g - l[w], v), b = K(h - l[p], y), R = !e.middlewareData.shift;
722
+ let O = x, P = b;
723
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (P = y), (o = e.middlewareData.shift) != null && o.enabled.y && (O = v), R && !m) {
724
+ const E = F(l.left, 0), B = F(l.right, 0), M = F(l.top, 0), D = F(l.bottom, 0);
725
+ f ? P = h - 2 * (E !== 0 || B !== 0 ? E + B : F(l.left, l.right)) : O = g - 2 * (M !== 0 || D !== 0 ? M + D : F(l.top, l.bottom));
726
+ }
727
+ await a({
728
+ ...e,
729
+ availableWidth: P,
730
+ availableHeight: O
731
+ });
732
+ const W = await s.getDimensions(c.floating);
733
+ return h !== W.width || g !== W.height ? {
734
+ reset: {
735
+ rects: !0
736
+ }
737
+ } : {};
738
+ }
739
+ };
740
+ };
741
+ function Vt(t) {
742
+ const e = H(t);
743
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
744
+ const i = Y(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, c = st(n) !== r || st(o) !== s;
745
+ return c && (n = r, o = s), {
746
+ width: n,
747
+ height: o,
748
+ $: c
749
+ };
750
+ }
751
+ function Ct(t) {
752
+ return N(t) ? t : t.contextElement;
753
+ }
754
+ function Q(t) {
755
+ const e = Ct(t);
756
+ if (!Y(e))
757
+ return z(1);
758
+ const n = e.getBoundingClientRect(), {
759
+ width: o,
760
+ height: i,
761
+ $: r
762
+ } = Vt(e);
763
+ let s = (r ? st(n.width) : n.width) / o, c = (r ? st(n.height) : n.height) / i;
764
+ return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
765
+ x: s,
766
+ y: c
767
+ };
768
+ }
769
+ const ve = /* @__PURE__ */ z(0);
770
+ function zt(t) {
771
+ const e = $(t);
772
+ return !bt() || !e.visualViewport ? ve : {
773
+ x: e.visualViewport.offsetLeft,
774
+ y: e.visualViewport.offsetTop
775
+ };
776
+ }
777
+ function be(t, e, n) {
778
+ return e === void 0 && (e = !1), !n || e && n !== $(t) ? !1 : e;
779
+ }
780
+ function J(t, e, n, o) {
781
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
782
+ const i = t.getBoundingClientRect(), r = Ct(t);
783
+ let s = z(1);
784
+ e && (o ? N(o) && (s = Q(o)) : s = Q(t));
785
+ const c = be(r, n, o) ? zt(r) : z(0);
786
+ let a = (i.left + c.x) / s.x, d = (i.top + c.y) / s.y, l = i.width / s.x, u = i.height / s.y;
787
+ if (r) {
788
+ const m = $(r), f = o && N(o) ? $(o) : o;
789
+ let h = m, g = wt(h);
790
+ for (; g && o && f !== h; ) {
791
+ const w = Q(g), p = g.getBoundingClientRect(), v = H(g), y = p.left + (g.clientLeft + parseFloat(v.paddingLeft)) * w.x, x = p.top + (g.clientTop + parseFloat(v.paddingTop)) * w.y;
792
+ a *= w.x, d *= w.y, l *= w.x, u *= w.y, a += y, d += x, h = $(g), g = wt(h);
793
+ }
794
+ }
795
+ return lt({
796
+ width: l,
797
+ height: u,
798
+ x: a,
799
+ y: d
800
+ });
801
+ }
802
+ function mt(t, e) {
803
+ const n = dt(t).scrollLeft;
804
+ return e ? e.left + n : J(j(t)).left + n;
805
+ }
806
+ function jt(t, e) {
807
+ const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - mt(t, n), i = n.top + e.scrollTop;
808
+ return {
809
+ x: o,
810
+ y: i
811
+ };
812
+ }
813
+ function Re(t) {
814
+ let {
815
+ elements: e,
816
+ rect: n,
817
+ offsetParent: o,
818
+ strategy: i
819
+ } = t;
820
+ const r = i === "fixed", s = j(o), c = e ? ut(e.floating) : !1;
821
+ if (o === s || c && r)
822
+ return n;
823
+ let a = {
824
+ scrollLeft: 0,
825
+ scrollTop: 0
826
+ }, d = z(1);
827
+ const l = z(0), u = Y(o);
828
+ if ((u || !u && !r) && ((tt(o) !== "body" || ot(s)) && (a = dt(o)), u)) {
829
+ const f = J(o);
830
+ d = Q(o), l.x = f.x + o.clientLeft, l.y = f.y + o.clientTop;
831
+ }
832
+ const m = s && !u && !r ? jt(s, a) : z(0);
833
+ return {
834
+ width: n.width * d.x,
835
+ height: n.height * d.y,
836
+ x: n.x * d.x - a.scrollLeft * d.x + l.x + m.x,
837
+ y: n.y * d.y - a.scrollTop * d.y + l.y + m.y
838
+ };
839
+ }
840
+ function Ae(t) {
841
+ return Array.from(t.getClientRects());
842
+ }
843
+ function Oe(t) {
844
+ const e = j(t), n = dt(t), o = t.ownerDocument.body, i = F(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = F(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
845
+ let s = -n.scrollLeft + mt(t);
846
+ const c = -n.scrollTop;
847
+ return H(o).direction === "rtl" && (s += F(e.clientWidth, o.clientWidth) - i), {
848
+ width: i,
849
+ height: r,
850
+ x: s,
851
+ y: c
852
+ };
853
+ }
854
+ const Mt = 25;
855
+ function Ce(t, e) {
856
+ const n = $(t), o = j(t), i = n.visualViewport;
857
+ let r = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
858
+ if (i) {
859
+ r = i.width, s = i.height;
860
+ const l = bt();
861
+ (!l || l && e === "fixed") && (c = i.offsetLeft, a = i.offsetTop);
862
+ }
863
+ const d = mt(o);
864
+ if (d <= 0) {
865
+ const l = o.ownerDocument, u = l.body, m = getComputedStyle(u), f = l.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - u.clientWidth - f);
866
+ h <= Mt && (r -= h);
867
+ } else d <= Mt && (r += d);
868
+ return {
869
+ width: r,
870
+ height: s,
871
+ x: c,
872
+ y: a
873
+ };
874
+ }
875
+ function Se(t, e) {
876
+ const n = J(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = Y(t) ? Q(t) : z(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, a = i * r.x, d = o * r.y;
877
+ return {
878
+ width: s,
879
+ height: c,
880
+ x: a,
881
+ y: d
882
+ };
883
+ }
884
+ function kt(t, e, n) {
885
+ let o;
886
+ if (e === "viewport")
887
+ o = Ce(t, n);
888
+ else if (e === "document")
889
+ o = Oe(j(t));
890
+ else if (N(e))
891
+ o = Se(e, n);
892
+ else {
893
+ const i = zt(t);
894
+ o = {
895
+ x: e.x - i.x,
896
+ y: e.y - i.y,
897
+ width: e.width,
898
+ height: e.height
899
+ };
900
+ }
901
+ return lt(o);
902
+ }
903
+ function It(t, e) {
904
+ const n = U(t);
905
+ return n === e || !N(n) || Z(n) ? !1 : H(n).position === "fixed" || It(n, e);
906
+ }
907
+ function Ee(t, e) {
908
+ const n = e.get(t);
909
+ if (n)
910
+ return n;
911
+ let o = nt(t, [], !1).filter((c) => N(c) && tt(c) !== "body"), i = null;
912
+ const r = H(t).position === "fixed";
913
+ let s = r ? U(t) : t;
914
+ for (; N(s) && !Z(s); ) {
915
+ const c = H(s), a = vt(s);
916
+ !a && c.position === "fixed" && (i = null), (r ? !a && !i : !a && c.position === "static" && !!i && (i.position === "absolute" || i.position === "fixed") || ot(s) && !a && It(t, s)) ? o = o.filter((l) => l !== s) : i = c, s = U(s);
917
+ }
918
+ return e.set(t, o), o;
919
+ }
920
+ function Le(t) {
921
+ let {
922
+ element: e,
923
+ boundary: n,
924
+ rootBoundary: o,
925
+ strategy: i
926
+ } = t;
927
+ const s = [...n === "clippingAncestors" ? ut(e) ? [] : Ee(e, this._c) : [].concat(n), o], c = kt(e, s[0], i);
928
+ let a = c.top, d = c.right, l = c.bottom, u = c.left;
929
+ for (let m = 1; m < s.length; m++) {
930
+ const f = kt(e, s[m], i);
931
+ a = F(f.top, a), d = K(f.right, d), l = K(f.bottom, l), u = F(f.left, u);
932
+ }
933
+ return {
934
+ width: d - u,
935
+ height: l - a,
936
+ x: u,
937
+ y: a
938
+ };
939
+ }
940
+ function Pe(t) {
941
+ const {
942
+ width: e,
943
+ height: n
944
+ } = Vt(t);
945
+ return {
946
+ width: e,
947
+ height: n
948
+ };
949
+ }
950
+ function De(t, e, n) {
951
+ const o = Y(e), i = j(e), r = n === "fixed", s = J(t, !0, r, e);
952
+ let c = {
953
+ scrollLeft: 0,
954
+ scrollTop: 0
955
+ };
956
+ const a = z(0);
957
+ function d() {
958
+ a.x = mt(i);
959
+ }
960
+ if (o || !o && !r)
961
+ if ((tt(e) !== "body" || ot(i)) && (c = dt(e)), o) {
962
+ const f = J(e, !0, r, e);
963
+ a.x = f.x + e.clientLeft, a.y = f.y + e.clientTop;
964
+ } else i && d();
965
+ r && !o && i && d();
966
+ const l = i && !o && !r ? jt(i, c) : z(0), u = s.left + c.scrollLeft - a.x - l.x, m = s.top + c.scrollTop - a.y - l.y;
967
+ return {
968
+ x: u,
969
+ y: m,
970
+ width: s.width,
971
+ height: s.height
972
+ };
973
+ }
974
+ function gt(t) {
975
+ return H(t).position === "static";
976
+ }
977
+ function Ft(t, e) {
978
+ if (!Y(t) || H(t).position === "fixed")
979
+ return null;
980
+ if (e)
981
+ return e(t);
982
+ let n = t.offsetParent;
983
+ return j(t) === n && (n = n.ownerDocument.body), n;
984
+ }
985
+ function Xt(t, e) {
986
+ const n = $(t);
987
+ if (ut(t))
988
+ return n;
989
+ if (!Y(t)) {
990
+ let i = U(t);
991
+ for (; i && !Z(i); ) {
992
+ if (N(i) && !gt(i))
993
+ return i;
994
+ i = U(i);
995
+ }
996
+ return n;
997
+ }
998
+ let o = Ft(t, e);
999
+ for (; o && Gt(o) && gt(o); )
1000
+ o = Ft(o, e);
1001
+ return o && Z(o) && gt(o) && !vt(o) ? n : o || Zt(t) || n;
1002
+ }
1003
+ const Te = async function(t) {
1004
+ const e = this.getOffsetParent || Xt, n = this.getDimensions, o = await n(t.floating);
1005
+ return {
1006
+ reference: De(t.reference, await e(t.floating), t.strategy),
1007
+ floating: {
1008
+ x: 0,
1009
+ y: 0,
1010
+ width: o.width,
1011
+ height: o.height
1012
+ }
1013
+ };
1014
+ };
1015
+ function Me(t) {
1016
+ return H(t).direction === "rtl";
1017
+ }
1018
+ const ke = {
1019
+ convertOffsetParentRelativeRectToViewportRelativeRect: Re,
1020
+ getDocumentElement: j,
1021
+ getClippingRect: Le,
1022
+ getOffsetParent: Xt,
1023
+ getElementRects: Te,
1024
+ getClientRects: Ae,
1025
+ getDimensions: Pe,
1026
+ getScale: Q,
1027
+ isElement: N,
1028
+ isRTL: Me
1029
+ };
1030
+ function Yt(t, e) {
1031
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1032
+ }
1033
+ function Fe(t, e) {
1034
+ let n = null, o;
1035
+ const i = j(t);
1036
+ function r() {
1037
+ var c;
1038
+ clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
1039
+ }
1040
+ function s(c, a) {
1041
+ c === void 0 && (c = !1), a === void 0 && (a = 1), r();
1042
+ const d = t.getBoundingClientRect(), {
1043
+ left: l,
1044
+ top: u,
1045
+ width: m,
1046
+ height: f
1047
+ } = d;
1048
+ if (c || e(), !m || !f)
1049
+ return;
1050
+ const h = it(u), g = it(i.clientWidth - (l + m)), w = it(i.clientHeight - (u + f)), p = it(l), y = {
1051
+ rootMargin: -h + "px " + -g + "px " + -w + "px " + -p + "px",
1052
+ threshold: F(0, K(1, a)) || 1
1053
+ };
1054
+ let x = !0;
1055
+ function b(R) {
1056
+ const O = R[0].intersectionRatio;
1057
+ if (O !== a) {
1058
+ if (!x)
1059
+ return s();
1060
+ O ? s(!1, O) : o = setTimeout(() => {
1061
+ s(!1, 1e-7);
1062
+ }, 1e3);
1063
+ }
1064
+ O === 1 && !Yt(d, t.getBoundingClientRect()) && s(), x = !1;
1065
+ }
1066
+ try {
1067
+ n = new IntersectionObserver(b, {
1068
+ ...y,
1069
+ // Handle <iframe>s
1070
+ root: i.ownerDocument
1071
+ });
1072
+ } catch {
1073
+ n = new IntersectionObserver(b, y);
1074
+ }
1075
+ n.observe(t);
1076
+ }
1077
+ return s(!0), r;
1078
+ }
1079
+ function Ye(t, e, n, o) {
1080
+ o === void 0 && (o = {});
1081
+ const {
1082
+ ancestorScroll: i = !0,
1083
+ ancestorResize: r = !0,
1084
+ elementResize: s = typeof ResizeObserver == "function",
1085
+ layoutShift: c = typeof IntersectionObserver == "function",
1086
+ animationFrame: a = !1
1087
+ } = o, d = Ct(t), l = i || r ? [...d ? nt(d) : [], ...e ? nt(e) : []] : [];
1088
+ l.forEach((p) => {
1089
+ i && p.addEventListener("scroll", n, {
1090
+ passive: !0
1091
+ }), r && p.addEventListener("resize", n);
1092
+ });
1093
+ const u = d && c ? Fe(d, n) : null;
1094
+ let m = -1, f = null;
1095
+ s && (f = new ResizeObserver((p) => {
1096
+ let [v] = p;
1097
+ v && v.target === d && f && e && (f.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1098
+ var y;
1099
+ (y = f) == null || y.observe(e);
1100
+ })), n();
1101
+ }), d && !a && f.observe(d), e && f.observe(e));
1102
+ let h, g = a ? J(t) : null;
1103
+ a && w();
1104
+ function w() {
1105
+ const p = J(t);
1106
+ g && !Yt(g, p) && n(), g = p, h = requestAnimationFrame(w);
1107
+ }
1108
+ return n(), () => {
1109
+ var p;
1110
+ l.forEach((v) => {
1111
+ i && v.removeEventListener("scroll", n), r && v.removeEventListener("resize", n);
1112
+ }), u?.(), (p = f) == null || p.disconnect(), f = null, a && cancelAnimationFrame(h);
1113
+ };
1114
+ }
1115
+ const $e = pe, We = we, Be = me, Ne = ye, He = he, $t = de, _e = xe, Ve = (t, e, n) => {
1116
+ const o = /* @__PURE__ */ new Map(), i = {
1117
+ platform: ke,
1118
+ ...n
1119
+ }, r = {
1120
+ ...i.platform,
1121
+ _c: o
1122
+ };
1123
+ return ue(t, e, {
1124
+ ...i,
1125
+ platform: r
1126
+ });
1127
+ };
1128
+ var ze = typeof document < "u", je = function() {
1129
+ }, rt = ze ? Ut : je;
1130
+ function ft(t, e) {
1131
+ if (t === e)
1132
+ return !0;
1133
+ if (typeof t != typeof e)
1134
+ return !1;
1135
+ if (typeof t == "function" && t.toString() === e.toString())
1136
+ return !0;
1137
+ let n, o, i;
1138
+ if (t && e && typeof t == "object") {
1139
+ if (Array.isArray(t)) {
1140
+ if (n = t.length, n !== e.length) return !1;
1141
+ for (o = n; o-- !== 0; )
1142
+ if (!ft(t[o], e[o]))
1143
+ return !1;
1144
+ return !0;
1145
+ }
1146
+ if (i = Object.keys(t), n = i.length, n !== Object.keys(e).length)
1147
+ return !1;
1148
+ for (o = n; o-- !== 0; )
1149
+ if (!{}.hasOwnProperty.call(e, i[o]))
1150
+ return !1;
1151
+ for (o = n; o-- !== 0; ) {
1152
+ const r = i[o];
1153
+ if (!(r === "_owner" && t.$$typeof) && !ft(t[r], e[r]))
1154
+ return !1;
1155
+ }
1156
+ return !0;
1157
+ }
1158
+ return t !== t && e !== e;
1159
+ }
1160
+ function qt(t) {
1161
+ return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1162
+ }
1163
+ function Wt(t, e) {
1164
+ const n = qt(t);
1165
+ return Math.round(e * n) / n;
1166
+ }
1167
+ function pt(t) {
1168
+ const e = L.useRef(t);
1169
+ return rt(() => {
1170
+ e.current = t;
1171
+ }), e;
1172
+ }
1173
+ function qe(t) {
1174
+ t === void 0 && (t = {});
1175
+ const {
1176
+ placement: e = "bottom",
1177
+ strategy: n = "absolute",
1178
+ middleware: o = [],
1179
+ platform: i,
1180
+ elements: {
1181
+ reference: r,
1182
+ floating: s
1183
+ } = {},
1184
+ transform: c = !0,
1185
+ whileElementsMounted: a,
1186
+ open: d
1187
+ } = t, [l, u] = L.useState({
1188
+ x: 0,
1189
+ y: 0,
1190
+ strategy: n,
1191
+ placement: e,
1192
+ middlewareData: {},
1193
+ isPositioned: !1
1194
+ }), [m, f] = L.useState(o);
1195
+ ft(m, o) || f(o);
1196
+ const [h, g] = L.useState(null), [w, p] = L.useState(null), v = L.useCallback((A) => {
1197
+ A !== R.current && (R.current = A, g(A));
1198
+ }, []), y = L.useCallback((A) => {
1199
+ A !== O.current && (O.current = A, p(A));
1200
+ }, []), x = r || h, b = s || w, R = L.useRef(null), O = L.useRef(null), P = L.useRef(l), W = a != null, E = pt(a), B = pt(i), M = pt(d), D = L.useCallback(() => {
1201
+ if (!R.current || !O.current)
1202
+ return;
1203
+ const A = {
1204
+ placement: e,
1205
+ strategy: n,
1206
+ middleware: m
1207
+ };
1208
+ B.current && (A.platform = B.current), Ve(R.current, O.current, A).then((k) => {
1209
+ const q = {
1210
+ ...k,
1211
+ // The floating element's position may be recomputed while it's closed
1212
+ // but still mounted (such as when transitioning out). To ensure
1213
+ // `isPositioned` will be `false` initially on the next open, avoid
1214
+ // setting it to `true` when `open === false` (must be specified).
1215
+ isPositioned: M.current !== !1
1216
+ };
1217
+ C.current && !ft(P.current, q) && (P.current = q, Kt.flushSync(() => {
1218
+ u(q);
1219
+ }));
1220
+ });
1221
+ }, [m, e, n, B, M]);
1222
+ rt(() => {
1223
+ d === !1 && P.current.isPositioned && (P.current.isPositioned = !1, u((A) => ({
1224
+ ...A,
1225
+ isPositioned: !1
1226
+ })));
1227
+ }, [d]);
1228
+ const C = L.useRef(!1);
1229
+ rt(() => (C.current = !0, () => {
1230
+ C.current = !1;
1231
+ }), []), rt(() => {
1232
+ if (x && (R.current = x), b && (O.current = b), x && b) {
1233
+ if (E.current)
1234
+ return E.current(x, b, D);
1235
+ D();
1236
+ }
1237
+ }, [x, b, D, E, W]);
1238
+ const _ = L.useMemo(() => ({
1239
+ reference: R,
1240
+ floating: O,
1241
+ setReference: v,
1242
+ setFloating: y
1243
+ }), [v, y]), S = L.useMemo(() => ({
1244
+ reference: x,
1245
+ floating: b
1246
+ }), [x, b]), T = L.useMemo(() => {
1247
+ const A = {
1248
+ position: n,
1249
+ left: 0,
1250
+ top: 0
1251
+ };
1252
+ if (!S.floating)
1253
+ return A;
1254
+ const k = Wt(S.floating, l.x), q = Wt(S.floating, l.y);
1255
+ return c ? {
1256
+ ...A,
1257
+ transform: "translate(" + k + "px, " + q + "px)",
1258
+ ...qt(S.floating) >= 1.5 && {
1259
+ willChange: "transform"
1260
+ }
1261
+ } : {
1262
+ position: n,
1263
+ left: k,
1264
+ top: q
1265
+ };
1266
+ }, [n, c, S.floating, l.x, l.y]);
1267
+ return L.useMemo(() => ({
1268
+ ...l,
1269
+ update: D,
1270
+ refs: _,
1271
+ elements: S,
1272
+ floatingStyles: T
1273
+ }), [l, D, _, S, T]);
1274
+ }
1275
+ const Ie = (t) => {
1276
+ function e(n) {
1277
+ return {}.hasOwnProperty.call(n, "current");
1278
+ }
1279
+ return {
1280
+ name: "arrow",
1281
+ options: t,
1282
+ fn(n) {
1283
+ const {
1284
+ element: o,
1285
+ padding: i
1286
+ } = typeof t == "function" ? t(n) : t;
1287
+ return o && e(o) ? o.current != null ? $t({
1288
+ element: o.current,
1289
+ padding: i
1290
+ }).fn(n) : {} : o ? $t({
1291
+ element: o,
1292
+ padding: i
1293
+ }).fn(n) : {};
1294
+ }
1295
+ };
1296
+ }, Ue = (t, e) => {
1297
+ const n = $e(t);
1298
+ return {
1299
+ name: n.name,
1300
+ fn: n.fn,
1301
+ options: [t, e]
1302
+ };
1303
+ }, Ke = (t, e) => {
1304
+ const n = We(t);
1305
+ return {
1306
+ name: n.name,
1307
+ fn: n.fn,
1308
+ options: [t, e]
1309
+ };
1310
+ }, Ge = (t, e) => ({
1311
+ fn: _e(t).fn,
1312
+ options: [t, e]
1313
+ }), Je = (t, e) => {
1314
+ const n = Be(t);
1315
+ return {
1316
+ name: n.name,
1317
+ fn: n.fn,
1318
+ options: [t, e]
1319
+ };
1320
+ }, Qe = (t, e) => {
1321
+ const n = Ne(t);
1322
+ return {
1323
+ name: n.name,
1324
+ fn: n.fn,
1325
+ options: [t, e]
1326
+ };
1327
+ }, Ze = (t, e) => {
1328
+ const n = He(t);
1329
+ return {
1330
+ name: n.name,
1331
+ fn: n.fn,
1332
+ options: [t, e]
1333
+ };
1334
+ }, tn = (t, e) => {
1335
+ const n = Ie(t);
1336
+ return {
1337
+ name: n.name,
1338
+ fn: n.fn,
1339
+ options: [t, e]
1340
+ };
1341
+ };
1342
+ export {
1343
+ St as a,
1344
+ N as b,
1345
+ bt as c,
1346
+ Z as d,
1347
+ U as e,
1348
+ H as f,
1349
+ nt as g,
1350
+ Bt as h,
1351
+ Y as i,
1352
+ tt as j,
1353
+ Ye as k,
1354
+ Je as l,
1355
+ Qe as m,
1356
+ tn as n,
1357
+ Ue as o,
1358
+ Ze as p,
1359
+ Ge as q,
1360
+ Ke as s,
1361
+ qe as u
1362
+ };
1363
+ //# sourceMappingURL=floating-ui.react-dom-0ol4sFzt.mjs.map