bitboss-ui 0.2.44 → 0.2.46

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 (146) hide show
  1. package/dist/index101.js +3 -3
  2. package/dist/index103.js +2 -2
  3. package/dist/index109.js +1 -1
  4. package/dist/index11.js +2 -2
  5. package/dist/index111.js +4 -4
  6. package/dist/index113.js +1 -1
  7. package/dist/index116.js +1 -1
  8. package/dist/index117.js +1 -1
  9. package/dist/index118.js +1 -1
  10. package/dist/index119.js +1 -1
  11. package/dist/index121.js +1 -1
  12. package/dist/index125.js +1 -1
  13. package/dist/index126.js +1 -1
  14. package/dist/index127.js +1 -1
  15. package/dist/index131.js +2 -2
  16. package/dist/index15.js +8 -8
  17. package/dist/index17.js +9 -9
  18. package/dist/index19.js +3 -3
  19. package/dist/index196.js +2 -2
  20. package/dist/index196.js.map +1 -1
  21. package/dist/index197.js +4 -3
  22. package/dist/index197.js.map +1 -1
  23. package/dist/index198.js +5 -35
  24. package/dist/index198.js.map +1 -1
  25. package/dist/index199.js +16 -6
  26. package/dist/index199.js.map +1 -1
  27. package/dist/index200.js +16 -5
  28. package/dist/index200.js.map +1 -1
  29. package/dist/index201.js +18 -15
  30. package/dist/index201.js.map +1 -1
  31. package/dist/index202.js +17 -13
  32. package/dist/index202.js.map +1 -1
  33. package/dist/index203.js +28 -18
  34. package/dist/index203.js.map +1 -1
  35. package/dist/index204.js +8 -20
  36. package/dist/index204.js.map +1 -1
  37. package/dist/index205.js +2 -29
  38. package/dist/index205.js.map +1 -1
  39. package/dist/index206.js +368 -8
  40. package/dist/index206.js.map +1 -1
  41. package/dist/index207.js +134 -2
  42. package/dist/index207.js.map +1 -1
  43. package/dist/index208.js +2 -2
  44. package/dist/index208.js.map +1 -1
  45. package/dist/index209.js +174 -2
  46. package/dist/index209.js.map +1 -1
  47. package/dist/index21.js +2 -2
  48. package/dist/index210.js +23 -2
  49. package/dist/index210.js.map +1 -1
  50. package/dist/index211.js +350 -345
  51. package/dist/index211.js.map +1 -1
  52. package/dist/index212.js +2 -134
  53. package/dist/index212.js.map +1 -1
  54. package/dist/index213.js +3 -174
  55. package/dist/index213.js.map +1 -1
  56. package/dist/index214.js +3 -23
  57. package/dist/index214.js.map +1 -1
  58. package/dist/index215.js +225 -363
  59. package/dist/index215.js.map +1 -1
  60. package/dist/index216.js +2 -235
  61. package/dist/index216.js.map +1 -1
  62. package/dist/index217.js +2 -4
  63. package/dist/index217.js.map +1 -1
  64. package/dist/index218.js +3 -10
  65. package/dist/index218.js.map +1 -1
  66. package/dist/index219.js +35 -2
  67. package/dist/index219.js.map +1 -1
  68. package/dist/index220.js +6 -3
  69. package/dist/index220.js.map +1 -1
  70. package/dist/index221.js +10 -3
  71. package/dist/index221.js.map +1 -1
  72. package/dist/index222.js +9 -6
  73. package/dist/index222.js.map +1 -1
  74. package/dist/index223.js +120 -16
  75. package/dist/index223.js.map +1 -1
  76. package/dist/index224.js +6 -9
  77. package/dist/index224.js.map +1 -1
  78. package/dist/index225.js +16 -120
  79. package/dist/index225.js.map +1 -1
  80. package/dist/index226.js +3 -434
  81. package/dist/index226.js.map +1 -1
  82. package/dist/index227.js +294 -88
  83. package/dist/index227.js.map +1 -1
  84. package/dist/index228.js +6 -200
  85. package/dist/index228.js.map +1 -1
  86. package/dist/index229.js +2 -295
  87. package/dist/index229.js.map +1 -1
  88. package/dist/index23.js +1 -1
  89. package/dist/index230.js +2 -6
  90. package/dist/index230.js.map +1 -1
  91. package/dist/index231.js +2 -2
  92. package/dist/index235.js +2 -2
  93. package/dist/index236.js +117 -2
  94. package/dist/index236.js.map +1 -1
  95. package/dist/index237.js +106 -2
  96. package/dist/index237.js.map +1 -1
  97. package/dist/index238.js +218 -111
  98. package/dist/index238.js.map +1 -1
  99. package/dist/index239.js +246 -94
  100. package/dist/index239.js.map +1 -1
  101. package/dist/index240.js +1 -1
  102. package/dist/index241.js +2 -69
  103. package/dist/index241.js.map +1 -1
  104. package/dist/index242.js +5 -160
  105. package/dist/index242.js.map +1 -1
  106. package/dist/index243.js +162 -1
  107. package/dist/index243.js.map +1 -1
  108. package/dist/index244.js +1 -7
  109. package/dist/index244.js.map +1 -1
  110. package/dist/index245.js +69 -2
  111. package/dist/index245.js.map +1 -1
  112. package/dist/index246.js +434 -3
  113. package/dist/index246.js.map +1 -1
  114. package/dist/index247.js +83 -218
  115. package/dist/index247.js.map +1 -1
  116. package/dist/index248.js +200 -258
  117. package/dist/index248.js.map +1 -1
  118. package/dist/index249.js +1 -1
  119. package/dist/index25.js +2 -2
  120. package/dist/index250.js +15 -4
  121. package/dist/index250.js.map +1 -1
  122. package/dist/index251.js +4 -4
  123. package/dist/index251.js.map +1 -1
  124. package/dist/index252.js +4 -61
  125. package/dist/index252.js.map +1 -1
  126. package/dist/index253.js +60 -14
  127. package/dist/index253.js.map +1 -1
  128. package/dist/index254.js +3 -2
  129. package/dist/index254.js.map +1 -1
  130. package/dist/index255.js +2 -3
  131. package/dist/index255.js.map +1 -1
  132. package/dist/index29.js +3 -3
  133. package/dist/index31.js +74 -74
  134. package/dist/index31.js.map +1 -1
  135. package/dist/index33.js +2 -2
  136. package/dist/index35.js +2 -2
  137. package/dist/index47.js +1 -1
  138. package/dist/index49.js +1 -1
  139. package/dist/index65.js +5 -5
  140. package/dist/index69.js +2 -2
  141. package/dist/index72.js +1 -1
  142. package/dist/index75.js +1 -1
  143. package/dist/index79.js +4 -4
  144. package/dist/index81.js +1 -1
  145. package/dist/style.css +1 -1
  146. package/package.json +1 -1
package/dist/index211.js CHANGED
@@ -1,371 +1,376 @@
1
- import { shift as P, flip as tt, computePosition as et, arrow as ot } from "./index215.js";
2
- import { detectOverflow as At, offset as Nt } from "./index215.js";
3
- import { createCoords as x, rectToClientRect as q, round as N, max as T, min as I, floor as A } from "./index238.js";
4
- import { getOverflowAncestors as V, isElement as b, getWindow as E, getComputedStyle as y, getDocumentElement as C, isHTMLElement as R, isWebKit as U, getNodeName as W, isOverflowElement as S, getNodeScroll as D, isTableElement as nt, isContainingBlock as K, getContainingBlock as it, getParentNode as z, isLastTraversableNode as X } from "./index239.js";
5
- function j(t) {
6
- const e = y(t);
7
- let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
8
- const s = R(t), c = s ? t.offsetWidth : n, i = s ? t.offsetHeight : o, r = N(n) !== c || N(o) !== i;
9
- return r && (n = c, o = i), {
10
- width: n,
11
- height: o,
12
- $: r
13
- };
14
- }
15
- function $(t) {
16
- return b(t) ? t : t.contextElement;
17
- }
18
- function F(t) {
19
- const e = $(t);
20
- if (!R(e))
21
- return x(1);
22
- const n = e.getBoundingClientRect(), {
23
- width: o,
24
- height: s,
25
- $: c
26
- } = j(e);
27
- let i = (c ? N(n.width) : n.width) / o, r = (c ? N(n.height) : n.height) / s;
28
- return (!i || !Number.isFinite(i)) && (i = 1), (!r || !Number.isFinite(r)) && (r = 1), {
29
- x: i,
30
- y: r
31
- };
32
- }
33
- const st = /* @__PURE__ */ x(0);
34
- function G(t) {
35
- const e = E(t);
36
- return !U() || !e.visualViewport ? st : {
37
- x: e.visualViewport.offsetLeft,
38
- y: e.visualViewport.offsetTop
39
- };
40
- }
41
- function rt(t, e, n) {
42
- return e === void 0 && (e = !1), !n || e && n !== E(t) ? !1 : e;
43
- }
44
- function L(t, e, n, o) {
45
- e === void 0 && (e = !1), n === void 0 && (n = !1);
46
- const s = t.getBoundingClientRect(), c = $(t);
47
- let i = x(1);
48
- e && (o ? b(o) && (i = F(o)) : i = F(t));
49
- const r = rt(c, n, o) ? G(c) : x(0);
50
- let l = (s.left + r.x) / i.x, f = (s.top + r.y) / i.y, u = s.width / i.x, h = s.height / i.y;
51
- if (c) {
52
- const w = E(c), g = o && b(o) ? E(o) : o;
53
- let v = w, a = v.frameElement;
54
- for (; a && o && g !== v; ) {
55
- const p = F(a), d = a.getBoundingClientRect(), m = y(a), O = d.left + (a.clientLeft + parseFloat(m.paddingLeft)) * p.x, B = d.top + (a.clientTop + parseFloat(m.paddingTop)) * p.y;
56
- l *= p.x, f *= p.y, u *= p.x, h *= p.y, l += O, f += B, v = E(a), a = v.frameElement;
57
- }
58
- }
59
- return q({
60
- width: u,
61
- height: h,
62
- x: l,
63
- y: f
64
- });
65
- }
66
- const ct = [":popover-open", ":modal"];
67
- function J(t) {
68
- return ct.some((e) => {
69
- try {
70
- return t.matches(e);
71
- } catch {
72
- return !1;
73
- }
74
- });
75
- }
76
- function lt(t) {
1
+ import { evaluate as j, getSide as M, getOppositePlacement as G, getExpandedPlacements as J, getOppositeAxisPlacements as K, getAlignmentSides as N, getAlignment as F, getSideAxis as Y, clamp as B, getAlignmentAxis as z, getPaddingObject as H, rectToClientRect as $, getOppositeAxis as Q, getAxisLength as I, min as X } from "./index236.js";
2
+ function _(o, i, m) {
77
3
  let {
78
- elements: e,
79
- rect: n,
80
- offsetParent: o,
81
- strategy: s
82
- } = t;
83
- const c = s === "fixed", i = C(o), r = e ? J(e.floating) : !1;
84
- if (o === i || r && c)
85
- return n;
86
- let l = {
87
- scrollLeft: 0,
88
- scrollTop: 0
89
- }, f = x(1);
90
- const u = x(0), h = R(o);
91
- if ((h || !h && !c) && ((W(o) !== "body" || S(i)) && (l = D(o)), R(o))) {
92
- const w = L(o);
93
- f = F(o), u.x = w.x + o.clientLeft, u.y = w.y + o.clientTop;
4
+ reference: n,
5
+ floating: r
6
+ } = o;
7
+ const e = Y(i), l = z(i), a = I(l), g = M(i), x = e === "y", d = n.x + n.width / 2 - r.width / 2, c = n.y + n.height / 2 - r.height / 2, f = n[a] / 2 - r[a] / 2;
8
+ let t;
9
+ switch (g) {
10
+ case "top":
11
+ t = {
12
+ x: d,
13
+ y: n.y - r.height
14
+ };
15
+ break;
16
+ case "bottom":
17
+ t = {
18
+ x: d,
19
+ y: n.y + n.height
20
+ };
21
+ break;
22
+ case "right":
23
+ t = {
24
+ x: n.x + n.width,
25
+ y: c
26
+ };
27
+ break;
28
+ case "left":
29
+ t = {
30
+ x: n.x - r.width,
31
+ y: c
32
+ };
33
+ break;
34
+ default:
35
+ t = {
36
+ x: n.x,
37
+ y: n.y
38
+ };
94
39
  }
95
- return {
96
- width: n.width * f.x,
97
- height: n.height * f.y,
98
- x: n.x * f.x - l.scrollLeft * f.x + u.x,
99
- y: n.y * f.y - l.scrollTop * f.y + u.y
100
- };
101
- }
102
- function ft(t) {
103
- return Array.from(t.getClientRects());
104
- }
105
- function Q(t) {
106
- return L(C(t)).left + D(t).scrollLeft;
107
- }
108
- function ut(t) {
109
- const e = C(t), n = D(t), o = t.ownerDocument.body, s = T(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), c = T(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
110
- let i = -n.scrollLeft + Q(t);
111
- const r = -n.scrollTop;
112
- return y(o).direction === "rtl" && (i += T(e.clientWidth, o.clientWidth) - s), {
113
- width: s,
114
- height: c,
115
- x: i,
116
- y: r
117
- };
40
+ switch (F(i)) {
41
+ case "start":
42
+ t[l] -= f * (m && x ? -1 : 1);
43
+ break;
44
+ case "end":
45
+ t[l] += f * (m && x ? -1 : 1);
46
+ break;
47
+ }
48
+ return t;
118
49
  }
119
- function ht(t, e) {
120
- const n = E(t), o = C(t), s = n.visualViewport;
121
- let c = o.clientWidth, i = o.clientHeight, r = 0, l = 0;
122
- if (s) {
123
- c = s.width, i = s.height;
124
- const f = U();
125
- (!f || f && e === "fixed") && (r = s.offsetLeft, l = s.offsetTop);
50
+ const tt = async (o, i, m) => {
51
+ const {
52
+ placement: n = "bottom",
53
+ strategy: r = "absolute",
54
+ middleware: e = [],
55
+ platform: l
56
+ } = m, a = e.filter(Boolean), g = await (l.isRTL == null ? void 0 : l.isRTL(i));
57
+ let x = await l.getElementRects({
58
+ reference: o,
59
+ floating: i,
60
+ strategy: r
61
+ }), {
62
+ x: d,
63
+ y: c
64
+ } = _(x, n, g), f = n, t = {}, s = 0;
65
+ for (let w = 0; w < a.length; w++) {
66
+ const {
67
+ name: u,
68
+ fn: p
69
+ } = a[w], {
70
+ x: h,
71
+ y,
72
+ data: P,
73
+ reset: v
74
+ } = await p({
75
+ x: d,
76
+ y: c,
77
+ initialPlacement: n,
78
+ placement: f,
79
+ strategy: r,
80
+ middlewareData: t,
81
+ rects: x,
82
+ platform: l,
83
+ elements: {
84
+ reference: o,
85
+ floating: i
86
+ }
87
+ });
88
+ d = h ?? d, c = y ?? c, t = {
89
+ ...t,
90
+ [u]: {
91
+ ...t[u],
92
+ ...P
93
+ }
94
+ }, v && s <= 50 && (s++, typeof v == "object" && (v.placement && (f = v.placement), v.rects && (x = v.rects === !0 ? await l.getElementRects({
95
+ reference: o,
96
+ floating: i,
97
+ strategy: r
98
+ }) : v.rects), {
99
+ x: d,
100
+ y: c
101
+ } = _(x, f, g)), w = -1);
126
102
  }
127
103
  return {
128
- width: c,
129
- height: i,
130
- x: r,
131
- y: l
104
+ x: d,
105
+ y: c,
106
+ placement: f,
107
+ strategy: r,
108
+ middlewareData: t
132
109
  };
133
- }
134
- function at(t, e) {
135
- const n = L(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, c = R(t) ? F(t) : x(1), i = t.clientWidth * c.x, r = t.clientHeight * c.y, l = s * c.x, f = o * c.y;
110
+ };
111
+ async function W(o, i) {
112
+ var m;
113
+ i === void 0 && (i = {});
114
+ const {
115
+ x: n,
116
+ y: r,
117
+ platform: e,
118
+ rects: l,
119
+ elements: a,
120
+ strategy: g
121
+ } = o, {
122
+ boundary: x = "clippingAncestors",
123
+ rootBoundary: d = "viewport",
124
+ elementContext: c = "floating",
125
+ altBoundary: f = !1,
126
+ padding: t = 0
127
+ } = j(i, o), s = H(t), u = a[f ? c === "floating" ? "reference" : "floating" : c], p = $(await e.getClippingRect({
128
+ element: (m = await (e.isElement == null ? void 0 : e.isElement(u))) == null || m ? u : u.contextElement || await (e.getDocumentElement == null ? void 0 : e.getDocumentElement(a.floating)),
129
+ boundary: x,
130
+ rootBoundary: d,
131
+ strategy: g
132
+ })), h = c === "floating" ? {
133
+ ...l.floating,
134
+ x: n,
135
+ y: r
136
+ } : l.reference, y = await (e.getOffsetParent == null ? void 0 : e.getOffsetParent(a.floating)), P = await (e.isElement == null ? void 0 : e.isElement(y)) ? await (e.getScale == null ? void 0 : e.getScale(y)) || {
137
+ x: 1,
138
+ y: 1
139
+ } : {
140
+ x: 1,
141
+ y: 1
142
+ }, v = $(e.convertOffsetParentRelativeRectToViewportRelativeRect ? await e.convertOffsetParentRelativeRectToViewportRelativeRect({
143
+ elements: a,
144
+ rect: h,
145
+ offsetParent: y,
146
+ strategy: g
147
+ }) : h);
136
148
  return {
137
- width: i,
138
- height: r,
139
- x: l,
140
- y: f
149
+ top: (p.top - v.top + s.top) / P.y,
150
+ bottom: (v.bottom - p.bottom + s.bottom) / P.y,
151
+ left: (p.left - v.left + s.left) / P.x,
152
+ right: (v.right - p.right + s.right) / P.x
141
153
  };
142
154
  }
143
- function _(t, e, n) {
144
- let o;
145
- if (e === "viewport")
146
- o = ht(t, n);
147
- else if (e === "document")
148
- o = ut(C(t));
149
- else if (b(e))
150
- o = at(e, n);
151
- else {
152
- const s = G(t);
153
- o = {
154
- ...e,
155
- x: e.x - s.x,
156
- y: e.y - s.y
155
+ const et = (o) => ({
156
+ name: "arrow",
157
+ options: o,
158
+ async fn(i) {
159
+ const {
160
+ x: m,
161
+ y: n,
162
+ placement: r,
163
+ rects: e,
164
+ platform: l,
165
+ elements: a,
166
+ middlewareData: g
167
+ } = i, {
168
+ element: x,
169
+ padding: d = 0
170
+ } = j(o, i) || {};
171
+ if (x == null)
172
+ return {};
173
+ const c = H(d), f = {
174
+ x: m,
175
+ y: n
176
+ }, t = z(r), s = I(t), w = await l.getDimensions(x), u = t === "y", p = u ? "top" : "left", h = u ? "bottom" : "right", y = u ? "clientHeight" : "clientWidth", P = e.reference[s] + e.reference[t] - f[t] - e.floating[s], v = f[t] - e.reference[t], D = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(x));
177
+ let O = D ? D[y] : 0;
178
+ (!O || !await (l.isElement == null ? void 0 : l.isElement(D))) && (O = a.floating[y] || e.floating[s]);
179
+ const E = P / 2 - v / 2, S = O / 2 - w[s] / 2 - 1, T = X(c[p], S), L = X(c[h], S), b = T, V = O - w[s] - L, A = O / 2 - w[s] / 2 + E, R = B(b, A, V), k = !g.arrow && F(r) != null && A !== R && e.reference[s] / 2 - (A < b ? T : L) - w[s] / 2 < 0, C = k ? A < b ? A - b : A - V : 0;
180
+ return {
181
+ [t]: f[t] + C,
182
+ data: {
183
+ [t]: R,
184
+ centerOffset: A - R - C,
185
+ ...k && {
186
+ alignmentOffset: C
187
+ }
188
+ },
189
+ reset: k
157
190
  };
158
191
  }
159
- return q(o);
160
- }
161
- function Y(t, e) {
162
- const n = z(t);
163
- return n === e || !b(n) || X(n) ? !1 : y(n).position === "fixed" || Y(n, e);
164
- }
165
- function dt(t, e) {
166
- const n = e.get(t);
167
- if (n)
168
- return n;
169
- let o = V(t, [], !1).filter((r) => b(r) && W(r) !== "body"), s = null;
170
- const c = y(t).position === "fixed";
171
- let i = c ? z(t) : t;
172
- for (; b(i) && !X(i); ) {
173
- const r = y(i), l = K(i);
174
- !l && r.position === "fixed" && (s = null), (c ? !l && !s : !l && r.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || S(i) && !l && Y(t, i)) ? o = o.filter((u) => u !== i) : s = r, i = z(i);
175
- }
176
- return e.set(t, o), o;
177
- }
178
- function gt(t) {
179
- let {
180
- element: e,
181
- boundary: n,
182
- rootBoundary: o,
183
- strategy: s
184
- } = t;
185
- const i = [...n === "clippingAncestors" ? dt(e, this._c) : [].concat(n), o], r = i[0], l = i.reduce((f, u) => {
186
- const h = _(e, u, s);
187
- return f.top = T(h.top, f.top), f.right = I(h.right, f.right), f.bottom = I(h.bottom, f.bottom), f.left = T(h.left, f.left), f;
188
- }, _(e, r, s));
189
- return {
190
- width: l.right - l.left,
191
- height: l.bottom - l.top,
192
- x: l.left,
193
- y: l.top
192
+ }), nt = function(o) {
193
+ return o === void 0 && (o = {}), {
194
+ name: "flip",
195
+ options: o,
196
+ async fn(i) {
197
+ var m, n;
198
+ const {
199
+ placement: r,
200
+ middlewareData: e,
201
+ rects: l,
202
+ initialPlacement: a,
203
+ platform: g,
204
+ elements: x
205
+ } = i, {
206
+ mainAxis: d = !0,
207
+ crossAxis: c = !0,
208
+ fallbackPlacements: f,
209
+ fallbackStrategy: t = "bestFit",
210
+ fallbackAxisSideDirection: s = "none",
211
+ flipAlignment: w = !0,
212
+ ...u
213
+ } = j(o, i);
214
+ if ((m = e.arrow) != null && m.alignmentOffset)
215
+ return {};
216
+ const p = M(r), h = M(a) === a, y = await (g.isRTL == null ? void 0 : g.isRTL(x.floating)), P = f || (h || !w ? [G(a)] : J(a));
217
+ !f && s !== "none" && P.push(...K(a, w, s, y));
218
+ const v = [a, ...P], D = await W(i, u), O = [];
219
+ let E = ((n = e.flip) == null ? void 0 : n.overflows) || [];
220
+ if (d && O.push(D[p]), c) {
221
+ const b = N(r, l, y);
222
+ O.push(D[b[0]], D[b[1]]);
223
+ }
224
+ if (E = [...E, {
225
+ placement: r,
226
+ overflows: O
227
+ }], !O.every((b) => b <= 0)) {
228
+ var S, T;
229
+ const b = (((S = e.flip) == null ? void 0 : S.index) || 0) + 1, V = v[b];
230
+ if (V)
231
+ return {
232
+ data: {
233
+ index: b,
234
+ overflows: E
235
+ },
236
+ reset: {
237
+ placement: V
238
+ }
239
+ };
240
+ let A = (T = E.filter((R) => R.overflows[0] <= 0).sort((R, k) => R.overflows[1] - k.overflows[1])[0]) == null ? void 0 : T.placement;
241
+ if (!A)
242
+ switch (t) {
243
+ case "bestFit": {
244
+ var L;
245
+ const R = (L = E.map((k) => [k.placement, k.overflows.filter((C) => C > 0).reduce((C, q) => C + q, 0)]).sort((k, C) => k[1] - C[1])[0]) == null ? void 0 : L[0];
246
+ R && (A = R);
247
+ break;
248
+ }
249
+ case "initialPlacement":
250
+ A = a;
251
+ break;
252
+ }
253
+ if (r !== A)
254
+ return {
255
+ reset: {
256
+ placement: A
257
+ }
258
+ };
259
+ }
260
+ return {};
261
+ }
194
262
  };
195
- }
196
- function pt(t) {
263
+ };
264
+ async function U(o, i) {
197
265
  const {
198
- width: e,
199
- height: n
200
- } = j(t);
201
- return {
202
- width: e,
203
- height: n
204
- };
205
- }
206
- function mt(t, e, n) {
207
- const o = R(e), s = C(e), c = n === "fixed", i = L(t, !0, c, e);
208
- let r = {
209
- scrollLeft: 0,
210
- scrollTop: 0
266
+ placement: m,
267
+ platform: n,
268
+ elements: r
269
+ } = o, e = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), l = M(m), a = F(m), g = Y(m) === "y", x = ["left", "top"].includes(l) ? -1 : 1, d = e && g ? -1 : 1, c = j(i, o);
270
+ let {
271
+ mainAxis: f,
272
+ crossAxis: t,
273
+ alignmentAxis: s
274
+ } = typeof c == "number" ? {
275
+ mainAxis: c,
276
+ crossAxis: 0,
277
+ alignmentAxis: null
278
+ } : {
279
+ mainAxis: 0,
280
+ crossAxis: 0,
281
+ alignmentAxis: null,
282
+ ...c
211
283
  };
212
- const l = x(0);
213
- if (o || !o && !c)
214
- if ((W(e) !== "body" || S(s)) && (r = D(e)), o) {
215
- const h = L(e, !0, c, e);
216
- l.x = h.x + e.clientLeft, l.y = h.y + e.clientTop;
217
- } else
218
- s && (l.x = Q(s));
219
- const f = i.left + r.scrollLeft - l.x, u = i.top + r.scrollTop - l.y;
220
- return {
221
- x: f,
222
- y: u,
223
- width: i.width,
224
- height: i.height
284
+ return a && typeof s == "number" && (t = a === "end" ? s * -1 : s), g ? {
285
+ x: t * d,
286
+ y: f * x
287
+ } : {
288
+ x: f * x,
289
+ y: t * d
225
290
  };
226
291
  }
227
- function k(t, e) {
228
- return !R(t) || y(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
229
- }
230
- function Z(t, e) {
231
- const n = E(t);
232
- if (!R(t) || J(t))
233
- return n;
234
- let o = k(t, e);
235
- for (; o && nt(o) && y(o).position === "static"; )
236
- o = k(o, e);
237
- return o && (W(o) === "html" || W(o) === "body" && y(o).position === "static" && !K(o)) ? n : o || it(t) || n;
238
- }
239
- const wt = async function(t) {
240
- const e = this.getOffsetParent || Z, n = this.getDimensions;
241
- return {
242
- reference: mt(t.reference, await e(t.floating), t.strategy),
243
- floating: {
244
- x: 0,
245
- y: 0,
246
- ...await n(t.floating)
292
+ const it = function(o) {
293
+ return o === void 0 && (o = 0), {
294
+ name: "offset",
295
+ options: o,
296
+ async fn(i) {
297
+ var m, n;
298
+ const {
299
+ x: r,
300
+ y: e,
301
+ placement: l,
302
+ middlewareData: a
303
+ } = i, g = await U(i, o);
304
+ return l === ((m = a.offset) == null ? void 0 : m.placement) && (n = a.arrow) != null && n.alignmentOffset ? {} : {
305
+ x: r + g.x,
306
+ y: e + g.y,
307
+ data: {
308
+ ...g,
309
+ placement: l
310
+ }
311
+ };
247
312
  }
248
313
  };
249
- };
250
- function yt(t) {
251
- return y(t).direction === "rtl";
252
- }
253
- const vt = {
254
- convertOffsetParentRelativeRectToViewportRelativeRect: lt,
255
- getDocumentElement: C,
256
- getClippingRect: gt,
257
- getOffsetParent: Z,
258
- getElementRects: wt,
259
- getClientRects: ft,
260
- getDimensions: pt,
261
- getScale: F,
262
- isElement: b,
263
- isRTL: yt
264
- };
265
- function xt(t, e) {
266
- let n = null, o;
267
- const s = C(t);
268
- function c() {
269
- var r;
270
- clearTimeout(o), (r = n) == null || r.disconnect(), n = null;
271
- }
272
- function i(r, l) {
273
- r === void 0 && (r = !1), l === void 0 && (l = 1), c();
274
- const {
275
- left: f,
276
- top: u,
277
- width: h,
278
- height: w
279
- } = t.getBoundingClientRect();
280
- if (r || e(), !h || !w)
281
- return;
282
- const g = A(u), v = A(s.clientWidth - (f + h)), a = A(s.clientHeight - (u + w)), p = A(f), m = {
283
- rootMargin: -g + "px " + -v + "px " + -a + "px " + -p + "px",
284
- threshold: T(0, I(1, l)) || 1
285
- };
286
- let O = !0;
287
- function B(M) {
288
- const H = M[0].intersectionRatio;
289
- if (H !== l) {
290
- if (!O)
291
- return i();
292
- H ? i(!1, H) : o = setTimeout(() => {
293
- i(!1, 1e-7);
294
- }, 100);
314
+ }, ot = function(o) {
315
+ return o === void 0 && (o = {}), {
316
+ name: "shift",
317
+ options: o,
318
+ async fn(i) {
319
+ const {
320
+ x: m,
321
+ y: n,
322
+ placement: r
323
+ } = i, {
324
+ mainAxis: e = !0,
325
+ crossAxis: l = !1,
326
+ limiter: a = {
327
+ fn: (u) => {
328
+ let {
329
+ x: p,
330
+ y: h
331
+ } = u;
332
+ return {
333
+ x: p,
334
+ y: h
335
+ };
336
+ }
337
+ },
338
+ ...g
339
+ } = j(o, i), x = {
340
+ x: m,
341
+ y: n
342
+ }, d = await W(i, g), c = Y(M(r)), f = Q(c);
343
+ let t = x[f], s = x[c];
344
+ if (e) {
345
+ const u = f === "y" ? "top" : "left", p = f === "y" ? "bottom" : "right", h = t + d[u], y = t - d[p];
346
+ t = B(h, t, y);
295
347
  }
296
- O = !1;
297
- }
298
- try {
299
- n = new IntersectionObserver(B, {
300
- ...m,
301
- // Handle <iframe>s
302
- root: s.ownerDocument
348
+ if (l) {
349
+ const u = c === "y" ? "top" : "left", p = c === "y" ? "bottom" : "right", h = s + d[u], y = s - d[p];
350
+ s = B(h, s, y);
351
+ }
352
+ const w = a.fn({
353
+ ...i,
354
+ [f]: t,
355
+ [c]: s
303
356
  });
304
- } catch {
305
- n = new IntersectionObserver(B, m);
357
+ return {
358
+ ...w,
359
+ data: {
360
+ x: w.x - m,
361
+ y: w.y - n
362
+ }
363
+ };
306
364
  }
307
- n.observe(t);
308
- }
309
- return i(!0), c;
310
- }
311
- function Ot(t, e, n, o) {
312
- o === void 0 && (o = {});
313
- const {
314
- ancestorScroll: s = !0,
315
- ancestorResize: c = !0,
316
- elementResize: i = typeof ResizeObserver == "function",
317
- layoutShift: r = typeof IntersectionObserver == "function",
318
- animationFrame: l = !1
319
- } = o, f = $(t), u = s || c ? [...f ? V(f) : [], ...V(e)] : [];
320
- u.forEach((d) => {
321
- s && d.addEventListener("scroll", n, {
322
- passive: !0
323
- }), c && d.addEventListener("resize", n);
324
- });
325
- const h = f && r ? xt(f, n) : null;
326
- let w = -1, g = null;
327
- i && (g = new ResizeObserver((d) => {
328
- let [m] = d;
329
- m && m.target === f && g && (g.unobserve(e), cancelAnimationFrame(w), w = requestAnimationFrame(() => {
330
- var O;
331
- (O = g) == null || O.observe(e);
332
- })), n();
333
- }), f && !l && g.observe(f), g.observe(e));
334
- let v, a = l ? L(t) : null;
335
- l && p();
336
- function p() {
337
- const d = L(t);
338
- a && (d.x !== a.x || d.y !== a.y || d.width !== a.width || d.height !== a.height) && n(), a = d, v = requestAnimationFrame(p);
339
- }
340
- return n(), () => {
341
- var d;
342
- u.forEach((m) => {
343
- s && m.removeEventListener("scroll", n), c && m.removeEventListener("resize", n);
344
- }), h == null || h(), (d = g) == null || d.disconnect(), g = null, l && cancelAnimationFrame(v);
345
- };
346
- }
347
- const Et = P, Lt = tt, Tt = ot, Ft = (t, e, n) => {
348
- const o = /* @__PURE__ */ new Map(), s = {
349
- platform: vt,
350
- ...n
351
- }, c = {
352
- ...s.platform,
353
- _c: o
354
365
  };
355
- return et(t, e, {
356
- ...s,
357
- platform: c
358
- });
359
366
  };
360
367
  export {
361
- Tt as arrow,
362
- Ot as autoUpdate,
363
- Ft as computePosition,
364
- At as detectOverflow,
365
- Lt as flip,
366
- V as getOverflowAncestors,
367
- Nt as offset,
368
- vt as platform,
369
- Et as shift
368
+ et as arrow,
369
+ tt as computePosition,
370
+ W as detectOverflow,
371
+ nt as flip,
372
+ it as offset,
373
+ $ as rectToClientRect,
374
+ ot as shift
370
375
  };
371
376
  //# sourceMappingURL=index211.js.map