@keenmate/web-multiselect 1.0.0-rc03 → 1.0.0-rc04

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.
@@ -1,7 +1,7 @@
1
1
  var Ue = Object.defineProperty;
2
2
  var Ye = (i, e, t) => e in i ? Ue(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var u = (i, e, t) => Ye(i, typeof e != "symbol" ? e + "" : e, t);
4
- const te = Math.min, z = Math.max, ie = Math.round, J = Math.floor, P = (i) => ({
3
+ var h = (i, e, t) => Ye(i, typeof e != "symbol" ? e + "" : e, t);
4
+ const te = Math.min, z = Math.max, ie = Math.round, J = Math.floor, O = (i) => ({
5
5
  x: i,
6
6
  y: i
7
7
  }), Xe = {
@@ -16,10 +16,10 @@ const te = Math.min, z = Math.max, ie = Math.round, J = Math.floor, P = (i) => (
16
16
  function ke(i, e, t) {
17
17
  return z(i, te(e, t));
18
18
  }
19
- function le(i, e) {
19
+ function se(i, e) {
20
20
  return typeof i == "function" ? i(e) : i;
21
21
  }
22
- function N(i) {
22
+ function R(i) {
23
23
  return i.split("-")[0];
24
24
  }
25
25
  function ne(i) {
@@ -33,30 +33,30 @@ function Ve(i) {
33
33
  }
34
34
  const qe = /* @__PURE__ */ new Set(["top", "bottom"]);
35
35
  function V(i) {
36
- return qe.has(N(i)) ? "y" : "x";
36
+ return qe.has(R(i)) ? "y" : "x";
37
37
  }
38
- function $e(i) {
38
+ function De(i) {
39
39
  return Ee(V(i));
40
40
  }
41
41
  function Ze(i, e, t) {
42
42
  t === void 0 && (t = !1);
43
- const o = ne(i), s = $e(i), l = Ve(s);
44
- let n = s === "x" ? o === (t ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
45
- return e.reference[l] > e.floating[l] && (n = oe(n)), [n, oe(n)];
43
+ const l = ne(i), o = De(i), s = Ve(o);
44
+ let n = o === "x" ? l === (t ? "end" : "start") ? "right" : "left" : l === "start" ? "bottom" : "top";
45
+ return e.reference[s] > e.floating[s] && (n = le(n)), [n, le(n)];
46
46
  }
47
47
  function Qe(i) {
48
- const e = oe(i);
48
+ const e = le(i);
49
49
  return [fe(i), e, fe(e)];
50
50
  }
51
51
  function fe(i) {
52
52
  return i.replace(/start|end/g, (e) => Je[e]);
53
53
  }
54
- const Ae = ["left", "right"], Se = ["right", "left"], et = ["top", "bottom"], tt = ["bottom", "top"];
54
+ const Ae = ["left", "right"], Pe = ["right", "left"], et = ["top", "bottom"], tt = ["bottom", "top"];
55
55
  function it(i, e, t) {
56
56
  switch (i) {
57
57
  case "top":
58
58
  case "bottom":
59
- return t ? e ? Se : Ae : e ? Ae : Se;
59
+ return t ? e ? Pe : Ae : e ? Ae : Pe;
60
60
  case "left":
61
61
  case "right":
62
62
  return e ? et : tt;
@@ -64,15 +64,15 @@ function it(i, e, t) {
64
64
  return [];
65
65
  }
66
66
  }
67
- function ot(i, e, t, o) {
68
- const s = ne(i);
69
- let l = it(N(i), t === "start", o);
70
- return s && (l = l.map((n) => n + "-" + s), e && (l = l.concat(l.map(fe)))), l;
67
+ function lt(i, e, t, l) {
68
+ const o = ne(i);
69
+ let s = it(R(i), t === "start", l);
70
+ return o && (s = s.map((n) => n + "-" + o), e && (s = s.concat(s.map(fe)))), s;
71
71
  }
72
- function oe(i) {
72
+ function le(i) {
73
73
  return i.replace(/left|right|bottom|top/g, (e) => Xe[e]);
74
74
  }
75
- function st(i) {
75
+ function ot(i) {
76
76
  return {
77
77
  top: 0,
78
78
  right: 0,
@@ -81,95 +81,95 @@ function st(i) {
81
81
  ...i
82
82
  };
83
83
  }
84
- function lt(i) {
85
- return typeof i != "number" ? st(i) : {
84
+ function st(i) {
85
+ return typeof i != "number" ? ot(i) : {
86
86
  top: i,
87
87
  right: i,
88
88
  bottom: i,
89
89
  left: i
90
90
  };
91
91
  }
92
- function se(i) {
92
+ function oe(i) {
93
93
  const {
94
94
  x: e,
95
95
  y: t,
96
- width: o,
97
- height: s
96
+ width: l,
97
+ height: o
98
98
  } = i;
99
99
  return {
100
- width: o,
101
- height: s,
100
+ width: l,
101
+ height: o,
102
102
  top: t,
103
103
  left: e,
104
- right: e + o,
105
- bottom: t + s,
104
+ right: e + l,
105
+ bottom: t + o,
106
106
  x: e,
107
107
  y: t
108
108
  };
109
109
  }
110
- function Oe(i, e, t) {
110
+ function Se(i, e, t) {
111
111
  let {
112
- reference: o,
113
- floating: s
112
+ reference: l,
113
+ floating: o
114
114
  } = i;
115
- const l = V(e), n = $e(e), r = Ve(n), a = N(e), c = l === "y", p = o.x + o.width / 2 - s.width / 2, d = o.y + o.height / 2 - s.height / 2, m = o[r] / 2 - s[r] / 2;
116
- let h;
115
+ const s = V(e), n = De(e), r = Ve(n), a = R(e), c = s === "y", p = l.x + l.width / 2 - o.width / 2, d = l.y + l.height / 2 - o.height / 2, m = l[r] / 2 - o[r] / 2;
116
+ let u;
117
117
  switch (a) {
118
118
  case "top":
119
- h = {
119
+ u = {
120
120
  x: p,
121
- y: o.y - s.height
121
+ y: l.y - o.height
122
122
  };
123
123
  break;
124
124
  case "bottom":
125
- h = {
125
+ u = {
126
126
  x: p,
127
- y: o.y + o.height
127
+ y: l.y + l.height
128
128
  };
129
129
  break;
130
130
  case "right":
131
- h = {
132
- x: o.x + o.width,
131
+ u = {
132
+ x: l.x + l.width,
133
133
  y: d
134
134
  };
135
135
  break;
136
136
  case "left":
137
- h = {
138
- x: o.x - s.width,
137
+ u = {
138
+ x: l.x - o.width,
139
139
  y: d
140
140
  };
141
141
  break;
142
142
  default:
143
- h = {
144
- x: o.x,
145
- y: o.y
143
+ u = {
144
+ x: l.x,
145
+ y: l.y
146
146
  };
147
147
  }
148
148
  switch (ne(e)) {
149
149
  case "start":
150
- h[n] -= m * (t && c ? -1 : 1);
150
+ u[n] -= m * (t && c ? -1 : 1);
151
151
  break;
152
152
  case "end":
153
- h[n] += m * (t && c ? -1 : 1);
153
+ u[n] += m * (t && c ? -1 : 1);
154
154
  break;
155
155
  }
156
- return h;
156
+ return u;
157
157
  }
158
158
  const nt = async (i, e, t) => {
159
159
  const {
160
- placement: o = "bottom",
161
- strategy: s = "absolute",
162
- middleware: l = [],
160
+ placement: l = "bottom",
161
+ strategy: o = "absolute",
162
+ middleware: s = [],
163
163
  platform: n
164
- } = t, r = l.filter(Boolean), a = await (n.isRTL == null ? void 0 : n.isRTL(e));
164
+ } = t, r = s.filter(Boolean), a = await (n.isRTL == null ? void 0 : n.isRTL(e));
165
165
  let c = await n.getElementRects({
166
166
  reference: i,
167
167
  floating: e,
168
- strategy: s
168
+ strategy: o
169
169
  }), {
170
170
  x: p,
171
171
  y: d
172
- } = Oe(c, o, a), m = o, h = {}, g = 0;
172
+ } = Se(c, l, a), m = l, u = {}, g = 0;
173
173
  for (let v = 0; v < r.length; v++) {
174
174
  const {
175
175
  name: w,
@@ -182,10 +182,10 @@ const nt = async (i, e, t) => {
182
182
  } = await b({
183
183
  x: p,
184
184
  y: d,
185
- initialPlacement: o,
185
+ initialPlacement: l,
186
186
  placement: m,
187
- strategy: s,
188
- middlewareData: h,
187
+ strategy: o,
188
+ middlewareData: u,
189
189
  rects: c,
190
190
  platform: n,
191
191
  elements: {
@@ -193,36 +193,36 @@ const nt = async (i, e, t) => {
193
193
  floating: e
194
194
  }
195
195
  });
196
- p = _ ?? p, d = y ?? d, h = {
197
- ...h,
196
+ p = _ ?? p, d = y ?? d, u = {
197
+ ...u,
198
198
  [w]: {
199
- ...h[w],
199
+ ...u[w],
200
200
  ...C
201
201
  }
202
202
  }, x && g <= 50 && (g++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (c = x.rects === !0 ? await n.getElementRects({
203
203
  reference: i,
204
204
  floating: e,
205
- strategy: s
205
+ strategy: o
206
206
  }) : x.rects), {
207
207
  x: p,
208
208
  y: d
209
- } = Oe(c, m, a)), v = -1);
209
+ } = Se(c, m, a)), v = -1);
210
210
  }
211
211
  return {
212
212
  x: p,
213
213
  y: d,
214
214
  placement: m,
215
- strategy: s,
216
- middlewareData: h
215
+ strategy: o,
216
+ middlewareData: u
217
217
  };
218
218
  };
219
- async function De(i, e) {
219
+ async function $e(i, e) {
220
220
  var t;
221
221
  e === void 0 && (e = {});
222
222
  const {
223
- x: o,
224
- y: s,
225
- platform: l,
223
+ x: l,
224
+ y: o,
225
+ platform: s,
226
226
  rects: n,
227
227
  elements: r,
228
228
  strategy: a
@@ -231,24 +231,24 @@ async function De(i, e) {
231
231
  rootBoundary: p = "viewport",
232
232
  elementContext: d = "floating",
233
233
  altBoundary: m = !1,
234
- padding: h = 0
235
- } = le(e, i), g = lt(h), w = r[m ? d === "floating" ? "reference" : "floating" : d], b = se(await l.getClippingRect({
236
- element: (t = await (l.isElement == null ? void 0 : l.isElement(w))) == null || t ? w : w.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(r.floating)),
234
+ padding: u = 0
235
+ } = se(e, i), g = st(u), w = r[m ? d === "floating" ? "reference" : "floating" : d], b = oe(await s.getClippingRect({
236
+ element: (t = await (s.isElement == null ? void 0 : s.isElement(w))) == null || t ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(r.floating)),
237
237
  boundary: c,
238
238
  rootBoundary: p,
239
239
  strategy: a
240
240
  })), _ = d === "floating" ? {
241
- x: o,
242
- y: s,
241
+ x: l,
242
+ y: o,
243
243
  width: n.floating.width,
244
244
  height: n.floating.height
245
- } : n.reference, y = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(r.floating)), C = await (l.isElement == null ? void 0 : l.isElement(y)) ? await (l.getScale == null ? void 0 : l.getScale(y)) || {
245
+ } : n.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(r.floating)), C = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
246
246
  x: 1,
247
247
  y: 1
248
248
  } : {
249
249
  x: 1,
250
250
  y: 1
251
- }, x = se(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
251
+ }, x = oe(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
252
252
  elements: r,
253
253
  rect: _,
254
254
  offsetParent: y,
@@ -266,10 +266,10 @@ const rt = function(i) {
266
266
  name: "flip",
267
267
  options: i,
268
268
  async fn(e) {
269
- var t, o;
269
+ var t, l;
270
270
  const {
271
- placement: s,
272
- middlewareData: l,
271
+ placement: o,
272
+ middlewareData: s,
273
273
  rects: n,
274
274
  initialPlacement: r,
275
275
  platform: a,
@@ -278,33 +278,33 @@ const rt = function(i) {
278
278
  mainAxis: p = !0,
279
279
  crossAxis: d = !0,
280
280
  fallbackPlacements: m,
281
- fallbackStrategy: h = "bestFit",
281
+ fallbackStrategy: u = "bestFit",
282
282
  fallbackAxisSideDirection: g = "none",
283
283
  flipAlignment: v = !0,
284
284
  ...w
285
- } = le(i, e);
286
- if ((t = l.arrow) != null && t.alignmentOffset)
285
+ } = se(i, e);
286
+ if ((t = s.arrow) != null && t.alignmentOffset)
287
287
  return {};
288
- const b = N(s), _ = V(r), y = N(r) === r, C = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), x = m || (y || !v ? [oe(r)] : Qe(r)), G = g !== "none";
289
- !m && G && x.push(...ot(r, v, g, C));
290
- const F = [r, ...x], pe = await De(e, w), X = [];
291
- let B = ((o = l.flip) == null ? void 0 : o.overflows) || [];
288
+ const b = R(o), _ = V(r), y = R(r) === r, C = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), x = m || (y || !v ? [le(r)] : Qe(r)), G = g !== "none";
289
+ !m && G && x.push(...lt(r, v, g, C));
290
+ const F = [r, ...x], pe = await $e(e, w), X = [];
291
+ let B = ((l = s.flip) == null ? void 0 : l.overflows) || [];
292
292
  if (p && X.push(pe[b]), d) {
293
- const D = Ze(s, n, C);
294
- X.push(pe[D[0]], pe[D[1]]);
293
+ const $ = Ze(o, n, C);
294
+ X.push(pe[$[0]], pe[$[1]]);
295
295
  }
296
296
  if (B = [...B, {
297
- placement: s,
297
+ placement: o,
298
298
  overflows: X
299
- }], !X.every((D) => D <= 0)) {
299
+ }], !X.every(($) => $ <= 0)) {
300
300
  var ye, xe;
301
- const D = (((ye = l.flip) == null ? void 0 : ye.index) || 0) + 1, he = F[D];
301
+ const $ = (((ye = s.flip) == null ? void 0 : ye.index) || 0) + 1, he = F[$];
302
302
  if (he && (!(d === "alignment" ? _ !== V(he) : !1) || // We leave the current main axis only if every placement on that axis
303
303
  // overflows the main axis.
304
304
  B.every((A) => V(A.placement) === _ ? A.overflows[0] > 0 : !0)))
305
305
  return {
306
306
  data: {
307
- index: D,
307
+ index: $,
308
308
  overflows: B
309
309
  },
310
310
  reset: {
@@ -313,18 +313,18 @@ const rt = function(i) {
313
313
  };
314
314
  let K = (xe = B.filter((L) => L.overflows[0] <= 0).sort((L, A) => L.overflows[1] - A.overflows[1])[0]) == null ? void 0 : xe.placement;
315
315
  if (!K)
316
- switch (h) {
316
+ switch (u) {
317
317
  case "bestFit": {
318
318
  var Ce;
319
319
  const L = (Ce = B.filter((A) => {
320
320
  if (G) {
321
- const M = V(A.placement);
322
- return M === _ || // Create a bias to the `y` side axis due to horizontal
321
+ const I = V(A.placement);
322
+ return I === _ || // Create a bias to the `y` side axis due to horizontal
323
323
  // reading directions favoring greater width.
324
- M === "y";
324
+ I === "y";
325
325
  }
326
326
  return !0;
327
- }).map((A) => [A.placement, A.overflows.filter((M) => M > 0).reduce((M, Ke) => M + Ke, 0)]).sort((A, M) => A[1] - M[1])[0]) == null ? void 0 : Ce[0];
327
+ }).map((A) => [A.placement, A.overflows.filter((I) => I > 0).reduce((I, Ke) => I + Ke, 0)]).sort((A, I) => A[1] - I[1])[0]) == null ? void 0 : Ce[0];
328
328
  L && (K = L);
329
329
  break;
330
330
  }
@@ -332,7 +332,7 @@ const rt = function(i) {
332
332
  K = r;
333
333
  break;
334
334
  }
335
- if (s !== K)
335
+ if (o !== K)
336
336
  return {
337
337
  reset: {
338
338
  placement: K
@@ -346,12 +346,12 @@ const rt = function(i) {
346
346
  async function ct(i, e) {
347
347
  const {
348
348
  placement: t,
349
- platform: o,
350
- elements: s
351
- } = i, l = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), n = N(t), r = ne(t), a = V(t) === "y", c = at.has(n) ? -1 : 1, p = l && a ? -1 : 1, d = le(e, i);
349
+ platform: l,
350
+ elements: o
351
+ } = i, s = await (l.isRTL == null ? void 0 : l.isRTL(o.floating)), n = R(t), r = ne(t), a = V(t) === "y", c = at.has(n) ? -1 : 1, p = s && a ? -1 : 1, d = se(e, i);
352
352
  let {
353
353
  mainAxis: m,
354
- crossAxis: h,
354
+ crossAxis: u,
355
355
  alignmentAxis: g
356
356
  } = typeof d == "number" ? {
357
357
  mainAxis: d,
@@ -362,12 +362,12 @@ async function ct(i, e) {
362
362
  crossAxis: d.crossAxis || 0,
363
363
  alignmentAxis: d.alignmentAxis
364
364
  };
365
- return r && typeof g == "number" && (h = r === "end" ? g * -1 : g), a ? {
366
- x: h * p,
365
+ return r && typeof g == "number" && (u = r === "end" ? g * -1 : g), a ? {
366
+ x: u * p,
367
367
  y: m * c
368
368
  } : {
369
369
  x: m * c,
370
- y: h * p
370
+ y: u * p
371
371
  };
372
372
  }
373
373
  const dt = function(i) {
@@ -375,16 +375,16 @@ const dt = function(i) {
375
375
  name: "offset",
376
376
  options: i,
377
377
  async fn(e) {
378
- var t, o;
378
+ var t, l;
379
379
  const {
380
- x: s,
381
- y: l,
380
+ x: o,
381
+ y: s,
382
382
  placement: n,
383
383
  middlewareData: r
384
384
  } = e, a = await ct(e, i);
385
- return n === ((t = r.offset) == null ? void 0 : t.placement) && (o = r.arrow) != null && o.alignmentOffset ? {} : {
386
- x: s + a.x,
387
- y: l + a.y,
385
+ return n === ((t = r.offset) == null ? void 0 : t.placement) && (l = r.arrow) != null && l.alignmentOffset ? {} : {
386
+ x: o + a.x,
387
+ y: s + a.y,
388
388
  data: {
389
389
  ...a,
390
390
  placement: n
@@ -399,10 +399,10 @@ const dt = function(i) {
399
399
  async fn(e) {
400
400
  const {
401
401
  x: t,
402
- y: o,
403
- placement: s
402
+ y: l,
403
+ placement: o
404
404
  } = e, {
405
- mainAxis: l = !0,
405
+ mainAxis: s = !0,
406
406
  crossAxis: n = !1,
407
407
  limiter: r = {
408
408
  fn: (w) => {
@@ -417,14 +417,14 @@ const dt = function(i) {
417
417
  }
418
418
  },
419
419
  ...a
420
- } = le(i, e), c = {
420
+ } = se(i, e), c = {
421
421
  x: t,
422
- y: o
423
- }, p = await De(e, a), d = V(N(s)), m = Ee(d);
424
- let h = c[m], g = c[d];
425
- if (l) {
426
- const w = m === "y" ? "top" : "left", b = m === "y" ? "bottom" : "right", _ = h + p[w], y = h - p[b];
427
- h = ke(_, h, y);
422
+ y: l
423
+ }, p = await $e(e, a), d = V(R(o)), m = Ee(d);
424
+ let u = c[m], g = c[d];
425
+ if (s) {
426
+ const w = m === "y" ? "top" : "left", b = m === "y" ? "bottom" : "right", _ = u + p[w], y = u - p[b];
427
+ u = ke(_, u, y);
428
428
  }
429
429
  if (n) {
430
430
  const w = d === "y" ? "top" : "left", b = d === "y" ? "bottom" : "right", _ = g + p[w], y = g - p[b];
@@ -432,16 +432,16 @@ const dt = function(i) {
432
432
  }
433
433
  const v = r.fn({
434
434
  ...e,
435
- [m]: h,
435
+ [m]: u,
436
436
  [d]: g
437
437
  });
438
438
  return {
439
439
  ...v,
440
440
  data: {
441
441
  x: v.x - t,
442
- y: v.y - o,
442
+ y: v.y - l,
443
443
  enabled: {
444
- [m]: l,
444
+ [m]: s,
445
445
  [d]: n
446
446
  }
447
447
  }
@@ -459,20 +459,20 @@ function k(i) {
459
459
  var e;
460
460
  return (i == null || (e = i.ownerDocument) == null ? void 0 : e.defaultView) || window;
461
461
  }
462
- function I(i) {
462
+ function M(i) {
463
463
  var e;
464
464
  return (e = (Le(i) ? i.ownerDocument : i.document) || window.document) == null ? void 0 : e.documentElement;
465
465
  }
466
466
  function Le(i) {
467
467
  return re() ? i instanceof Node || i instanceof k(i).Node : !1;
468
468
  }
469
- function S(i) {
469
+ function P(i) {
470
470
  return re() ? i instanceof Element || i instanceof k(i).Element : !1;
471
471
  }
472
472
  function T(i) {
473
473
  return re() ? i instanceof HTMLElement || i instanceof k(i).HTMLElement : !1;
474
474
  }
475
- function Pe(i) {
475
+ function Oe(i) {
476
476
  return !re() || typeof ShadowRoot > "u" ? !1 : i instanceof ShadowRoot || i instanceof k(i).ShadowRoot;
477
477
  }
478
478
  const ht = /* @__PURE__ */ new Set(["inline", "contents"]);
@@ -480,10 +480,10 @@ function Y(i) {
480
480
  const {
481
481
  overflow: e,
482
482
  overflowX: t,
483
- overflowY: o,
484
- display: s
485
- } = O(i);
486
- return /auto|scroll|overlay|hidden|clip/.test(e + o + t) && !ht.has(s);
483
+ overflowY: l,
484
+ display: o
485
+ } = S(i);
486
+ return /auto|scroll|overlay|hidden|clip/.test(e + l + t) && !ht.has(o);
487
487
  }
488
488
  const ut = /* @__PURE__ */ new Set(["table", "td", "th"]);
489
489
  function mt(i) {
@@ -501,17 +501,17 @@ function ae(i) {
501
501
  }
502
502
  const gt = ["transform", "translate", "scale", "rotate", "perspective"], bt = ["transform", "translate", "scale", "rotate", "perspective", "filter"], vt = ["paint", "layout", "strict", "content"];
503
503
  function ve(i) {
504
- const e = we(), t = S(i) ? O(i) : i;
505
- return gt.some((o) => t[o] ? t[o] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !e && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !e && (t.filter ? t.filter !== "none" : !1) || bt.some((o) => (t.willChange || "").includes(o)) || vt.some((o) => (t.contain || "").includes(o));
504
+ const e = we(), t = P(i) ? S(i) : i;
505
+ return gt.some((l) => t[l] ? t[l] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !e && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !e && (t.filter ? t.filter !== "none" : !1) || bt.some((l) => (t.willChange || "").includes(l)) || vt.some((l) => (t.contain || "").includes(l));
506
506
  }
507
507
  function wt(i) {
508
- let e = $(i);
508
+ let e = D(i);
509
509
  for (; T(e) && !W(e); ) {
510
510
  if (ve(e))
511
511
  return e;
512
512
  if (ae(e))
513
513
  return null;
514
- e = $(e);
514
+ e = D(e);
515
515
  }
516
516
  return null;
517
517
  }
@@ -522,11 +522,11 @@ const _t = /* @__PURE__ */ new Set(["html", "body", "#document"]);
522
522
  function W(i) {
523
523
  return _t.has(j(i));
524
524
  }
525
- function O(i) {
525
+ function S(i) {
526
526
  return k(i).getComputedStyle(i);
527
527
  }
528
528
  function ce(i) {
529
- return S(i) ? {
529
+ return P(i) ? {
530
530
  scrollLeft: i.scrollLeft,
531
531
  scrollTop: i.scrollTop
532
532
  } : {
@@ -534,65 +534,65 @@ function ce(i) {
534
534
  scrollTop: i.scrollY
535
535
  };
536
536
  }
537
- function $(i) {
537
+ function D(i) {
538
538
  if (j(i) === "html")
539
539
  return i;
540
540
  const e = (
541
541
  // Step into the shadow DOM of the parent of a slotted node.
542
542
  i.assignedSlot || // DOM Element detected.
543
543
  i.parentNode || // ShadowRoot detected.
544
- Pe(i) && i.host || // Fallback.
545
- I(i)
544
+ Oe(i) && i.host || // Fallback.
545
+ M(i)
546
546
  );
547
- return Pe(e) ? e.host : e;
547
+ return Oe(e) ? e.host : e;
548
548
  }
549
549
  function ze(i) {
550
- const e = $(i);
550
+ const e = D(i);
551
551
  return W(e) ? i.ownerDocument ? i.ownerDocument.body : i.body : T(e) && Y(e) ? e : ze(e);
552
552
  }
553
553
  function U(i, e, t) {
554
- var o;
554
+ var l;
555
555
  e === void 0 && (e = []), t === void 0 && (t = !0);
556
- const s = ze(i), l = s === ((o = i.ownerDocument) == null ? void 0 : o.body), n = k(s);
557
- if (l) {
556
+ const o = ze(i), s = o === ((l = i.ownerDocument) == null ? void 0 : l.body), n = k(o);
557
+ if (s) {
558
558
  const r = ge(n);
559
- return e.concat(n, n.visualViewport || [], Y(s) ? s : [], r && t ? U(r) : []);
559
+ return e.concat(n, n.visualViewport || [], Y(o) ? o : [], r && t ? U(r) : []);
560
560
  }
561
- return e.concat(s, U(s, [], t));
561
+ return e.concat(o, U(o, [], t));
562
562
  }
563
563
  function ge(i) {
564
564
  return i.parent && Object.getPrototypeOf(i.parent) ? i.frameElement : null;
565
565
  }
566
- function Ne(i) {
567
- const e = O(i);
568
- let t = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
569
- const s = T(i), l = s ? i.offsetWidth : t, n = s ? i.offsetHeight : o, r = ie(t) !== l || ie(o) !== n;
570
- return r && (t = l, o = n), {
566
+ function Re(i) {
567
+ const e = S(i);
568
+ let t = parseFloat(e.width) || 0, l = parseFloat(e.height) || 0;
569
+ const o = T(i), s = o ? i.offsetWidth : t, n = o ? i.offsetHeight : l, r = ie(t) !== s || ie(l) !== n;
570
+ return r && (t = s, l = n), {
571
571
  width: t,
572
- height: o,
572
+ height: l,
573
573
  $: r
574
574
  };
575
575
  }
576
576
  function _e(i) {
577
- return S(i) ? i : i.contextElement;
577
+ return P(i) ? i : i.contextElement;
578
578
  }
579
579
  function H(i) {
580
580
  const e = _e(i);
581
581
  if (!T(e))
582
- return P(1);
582
+ return O(1);
583
583
  const t = e.getBoundingClientRect(), {
584
- width: o,
585
- height: s,
586
- $: l
587
- } = Ne(e);
588
- let n = (l ? ie(t.width) : t.width) / o, r = (l ? ie(t.height) : t.height) / s;
584
+ width: l,
585
+ height: o,
586
+ $: s
587
+ } = Re(e);
588
+ let n = (s ? ie(t.width) : t.width) / l, r = (s ? ie(t.height) : t.height) / o;
589
589
  return (!n || !Number.isFinite(n)) && (n = 1), (!r || !Number.isFinite(r)) && (r = 1), {
590
590
  x: n,
591
591
  y: r
592
592
  };
593
593
  }
594
- const yt = /* @__PURE__ */ P(0);
595
- function Re(i) {
594
+ const yt = /* @__PURE__ */ O(0);
595
+ function Ne(i) {
596
596
  const e = k(i);
597
597
  return !we() || !e.visualViewport ? yt : {
598
598
  x: e.visualViewport.offsetLeft,
@@ -602,22 +602,22 @@ function Re(i) {
602
602
  function xt(i, e, t) {
603
603
  return e === void 0 && (e = !1), !t || e && t !== k(i) ? !1 : e;
604
604
  }
605
- function R(i, e, t, o) {
605
+ function N(i, e, t, l) {
606
606
  e === void 0 && (e = !1), t === void 0 && (t = !1);
607
- const s = i.getBoundingClientRect(), l = _e(i);
608
- let n = P(1);
609
- e && (o ? S(o) && (n = H(o)) : n = H(i));
610
- const r = xt(l, t, o) ? Re(l) : P(0);
611
- let a = (s.left + r.x) / n.x, c = (s.top + r.y) / n.y, p = s.width / n.x, d = s.height / n.y;
612
- if (l) {
613
- const m = k(l), h = o && S(o) ? k(o) : o;
607
+ const o = i.getBoundingClientRect(), s = _e(i);
608
+ let n = O(1);
609
+ e && (l ? P(l) && (n = H(l)) : n = H(i));
610
+ const r = xt(s, t, l) ? Ne(s) : O(0);
611
+ let a = (o.left + r.x) / n.x, c = (o.top + r.y) / n.y, p = o.width / n.x, d = o.height / n.y;
612
+ if (s) {
613
+ const m = k(s), u = l && P(l) ? k(l) : l;
614
614
  let g = m, v = ge(g);
615
- for (; v && o && h !== g; ) {
616
- const w = H(v), b = v.getBoundingClientRect(), _ = O(v), y = b.left + (v.clientLeft + parseFloat(_.paddingLeft)) * w.x, C = b.top + (v.clientTop + parseFloat(_.paddingTop)) * w.y;
615
+ for (; v && l && u !== g; ) {
616
+ const w = H(v), b = v.getBoundingClientRect(), _ = S(v), y = b.left + (v.clientLeft + parseFloat(_.paddingLeft)) * w.x, C = b.top + (v.clientTop + parseFloat(_.paddingTop)) * w.y;
617
617
  a *= w.x, c *= w.y, p *= w.x, d *= w.y, a += y, c += C, g = k(v), v = ge(g);
618
618
  }
619
619
  }
620
- return se({
620
+ return oe({
621
621
  width: p,
622
622
  height: d,
623
623
  x: a,
@@ -626,35 +626,35 @@ function R(i, e, t, o) {
626
626
  }
627
627
  function de(i, e) {
628
628
  const t = ce(i).scrollLeft;
629
- return e ? e.left + t : R(I(i)).left + t;
629
+ return e ? e.left + t : N(M(i)).left + t;
630
630
  }
631
631
  function Fe(i, e) {
632
- const t = i.getBoundingClientRect(), o = t.left + e.scrollLeft - de(i, t), s = t.top + e.scrollTop;
632
+ const t = i.getBoundingClientRect(), l = t.left + e.scrollLeft - de(i, t), o = t.top + e.scrollTop;
633
633
  return {
634
- x: o,
635
- y: s
634
+ x: l,
635
+ y: o
636
636
  };
637
637
  }
638
638
  function Ct(i) {
639
639
  let {
640
640
  elements: e,
641
641
  rect: t,
642
- offsetParent: o,
643
- strategy: s
642
+ offsetParent: l,
643
+ strategy: o
644
644
  } = i;
645
- const l = s === "fixed", n = I(o), r = e ? ae(e.floating) : !1;
646
- if (o === n || r && l)
645
+ const s = o === "fixed", n = M(l), r = e ? ae(e.floating) : !1;
646
+ if (l === n || r && s)
647
647
  return t;
648
648
  let a = {
649
649
  scrollLeft: 0,
650
650
  scrollTop: 0
651
- }, c = P(1);
652
- const p = P(0), d = T(o);
653
- if ((d || !d && !l) && ((j(o) !== "body" || Y(n)) && (a = ce(o)), T(o))) {
654
- const h = R(o);
655
- c = H(o), p.x = h.x + o.clientLeft, p.y = h.y + o.clientTop;
651
+ }, c = O(1);
652
+ const p = O(0), d = T(l);
653
+ if ((d || !d && !s) && ((j(l) !== "body" || Y(n)) && (a = ce(l)), T(l))) {
654
+ const u = N(l);
655
+ c = H(l), p.x = u.x + l.clientLeft, p.y = u.y + l.clientTop;
656
656
  }
657
- const m = n && !d && !l ? Fe(n, a) : P(0);
657
+ const m = n && !d && !s ? Fe(n, a) : O(0);
658
658
  return {
659
659
  width: t.width * c.x,
660
660
  height: t.height * c.y,
@@ -666,40 +666,40 @@ function kt(i) {
666
666
  return Array.from(i.getClientRects());
667
667
  }
668
668
  function At(i) {
669
- const e = I(i), t = ce(i), o = i.ownerDocument.body, s = z(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), l = z(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
669
+ const e = M(i), t = ce(i), l = i.ownerDocument.body, o = z(e.scrollWidth, e.clientWidth, l.scrollWidth, l.clientWidth), s = z(e.scrollHeight, e.clientHeight, l.scrollHeight, l.clientHeight);
670
670
  let n = -t.scrollLeft + de(i);
671
671
  const r = -t.scrollTop;
672
- return O(o).direction === "rtl" && (n += z(e.clientWidth, o.clientWidth) - s), {
673
- width: s,
674
- height: l,
672
+ return S(l).direction === "rtl" && (n += z(e.clientWidth, l.clientWidth) - o), {
673
+ width: o,
674
+ height: s,
675
675
  x: n,
676
676
  y: r
677
677
  };
678
678
  }
679
679
  const Te = 25;
680
- function St(i, e) {
681
- const t = k(i), o = I(i), s = t.visualViewport;
682
- let l = o.clientWidth, n = o.clientHeight, r = 0, a = 0;
683
- if (s) {
684
- l = s.width, n = s.height;
680
+ function Pt(i, e) {
681
+ const t = k(i), l = M(i), o = t.visualViewport;
682
+ let s = l.clientWidth, n = l.clientHeight, r = 0, a = 0;
683
+ if (o) {
684
+ s = o.width, n = o.height;
685
685
  const p = we();
686
- (!p || p && e === "fixed") && (r = s.offsetLeft, a = s.offsetTop);
686
+ (!p || p && e === "fixed") && (r = o.offsetLeft, a = o.offsetTop);
687
687
  }
688
- const c = de(o);
688
+ const c = de(l);
689
689
  if (c <= 0) {
690
- const p = o.ownerDocument, d = p.body, m = getComputedStyle(d), h = p.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, g = Math.abs(o.clientWidth - d.clientWidth - h);
691
- g <= Te && (l -= g);
692
- } else c <= Te && (l += c);
690
+ const p = l.ownerDocument, d = p.body, m = getComputedStyle(d), u = p.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, g = Math.abs(l.clientWidth - d.clientWidth - u);
691
+ g <= Te && (s -= g);
692
+ } else c <= Te && (s += c);
693
693
  return {
694
- width: l,
694
+ width: s,
695
695
  height: n,
696
696
  x: r,
697
697
  y: a
698
698
  };
699
699
  }
700
- const Ot = /* @__PURE__ */ new Set(["absolute", "fixed"]);
701
- function Pt(i, e) {
702
- const t = R(i, !0, e === "fixed"), o = t.top + i.clientTop, s = t.left + i.clientLeft, l = T(i) ? H(i) : P(1), n = i.clientWidth * l.x, r = i.clientHeight * l.y, a = s * l.x, c = o * l.y;
700
+ const St = /* @__PURE__ */ new Set(["absolute", "fixed"]);
701
+ function Ot(i, e) {
702
+ const t = N(i, !0, e === "fixed"), l = t.top + i.clientTop, o = t.left + i.clientLeft, s = T(i) ? H(i) : O(1), n = i.clientWidth * s.x, r = i.clientHeight * s.y, a = o * s.x, c = l * s.y;
703
703
  return {
704
704
  width: n,
705
705
  height: r,
@@ -707,53 +707,53 @@ function Pt(i, e) {
707
707
  y: c
708
708
  };
709
709
  }
710
- function Ie(i, e, t) {
711
- let o;
710
+ function Me(i, e, t) {
711
+ let l;
712
712
  if (e === "viewport")
713
- o = St(i, t);
713
+ l = Pt(i, t);
714
714
  else if (e === "document")
715
- o = At(I(i));
716
- else if (S(e))
717
- o = Pt(e, t);
715
+ l = At(M(i));
716
+ else if (P(e))
717
+ l = Ot(e, t);
718
718
  else {
719
- const s = Re(i);
720
- o = {
721
- x: e.x - s.x,
722
- y: e.y - s.y,
719
+ const o = Ne(i);
720
+ l = {
721
+ x: e.x - o.x,
722
+ y: e.y - o.y,
723
723
  width: e.width,
724
724
  height: e.height
725
725
  };
726
726
  }
727
- return se(o);
727
+ return oe(l);
728
728
  }
729
729
  function Be(i, e) {
730
- const t = $(i);
731
- return t === e || !S(t) || W(t) ? !1 : O(t).position === "fixed" || Be(t, e);
730
+ const t = D(i);
731
+ return t === e || !P(t) || W(t) ? !1 : S(t).position === "fixed" || Be(t, e);
732
732
  }
733
733
  function Tt(i, e) {
734
734
  const t = e.get(i);
735
735
  if (t)
736
736
  return t;
737
- let o = U(i, [], !1).filter((r) => S(r) && j(r) !== "body"), s = null;
738
- const l = O(i).position === "fixed";
739
- let n = l ? $(i) : i;
740
- for (; S(n) && !W(n); ) {
741
- const r = O(n), a = ve(n);
742
- !a && r.position === "fixed" && (s = null), (l ? !a && !s : !a && r.position === "static" && !!s && Ot.has(s.position) || Y(n) && !a && Be(i, n)) ? o = o.filter((p) => p !== n) : s = r, n = $(n);
737
+ let l = U(i, [], !1).filter((r) => P(r) && j(r) !== "body"), o = null;
738
+ const s = S(i).position === "fixed";
739
+ let n = s ? D(i) : i;
740
+ for (; P(n) && !W(n); ) {
741
+ const r = S(n), a = ve(n);
742
+ !a && r.position === "fixed" && (o = null), (s ? !a && !o : !a && r.position === "static" && !!o && St.has(o.position) || Y(n) && !a && Be(i, n)) ? l = l.filter((p) => p !== n) : o = r, n = D(n);
743
743
  }
744
- return e.set(i, o), o;
744
+ return e.set(i, l), l;
745
745
  }
746
- function It(i) {
746
+ function Mt(i) {
747
747
  let {
748
748
  element: e,
749
749
  boundary: t,
750
- rootBoundary: o,
751
- strategy: s
750
+ rootBoundary: l,
751
+ strategy: o
752
752
  } = i;
753
- const n = [...t === "clippingAncestors" ? ae(e) ? [] : Tt(e, this._c) : [].concat(t), o], r = n[0], a = n.reduce((c, p) => {
754
- const d = Ie(e, p, s);
753
+ const n = [...t === "clippingAncestors" ? ae(e) ? [] : Tt(e, this._c) : [].concat(t), l], r = n[0], a = n.reduce((c, p) => {
754
+ const d = Me(e, p, o);
755
755
  return c.top = z(d.top, c.top), c.right = te(d.right, c.right), c.bottom = te(d.bottom, c.bottom), c.left = z(d.left, c.left), c;
756
- }, Ie(e, r, s));
756
+ }, Me(e, r, o));
757
757
  return {
758
758
  width: a.right - a.left,
759
759
  height: a.bottom - a.top,
@@ -761,33 +761,33 @@ function It(i) {
761
761
  y: a.top
762
762
  };
763
763
  }
764
- function Mt(i) {
764
+ function It(i) {
765
765
  const {
766
766
  width: e,
767
767
  height: t
768
- } = Ne(i);
768
+ } = Re(i);
769
769
  return {
770
770
  width: e,
771
771
  height: t
772
772
  };
773
773
  }
774
774
  function Et(i, e, t) {
775
- const o = T(e), s = I(e), l = t === "fixed", n = R(i, !0, l, e);
775
+ const l = T(e), o = M(e), s = t === "fixed", n = N(i, !0, s, e);
776
776
  let r = {
777
777
  scrollLeft: 0,
778
778
  scrollTop: 0
779
779
  };
780
- const a = P(0);
780
+ const a = O(0);
781
781
  function c() {
782
- a.x = de(s);
783
- }
784
- if (o || !o && !l)
785
- if ((j(e) !== "body" || Y(s)) && (r = ce(e)), o) {
786
- const h = R(e, !0, l, e);
787
- a.x = h.x + e.clientLeft, a.y = h.y + e.clientTop;
788
- } else s && c();
789
- l && !o && s && c();
790
- const p = s && !o && !l ? Fe(s, r) : P(0), d = n.left + r.scrollLeft - a.x - p.x, m = n.top + r.scrollTop - a.y - p.y;
782
+ a.x = de(o);
783
+ }
784
+ if (l || !l && !s)
785
+ if ((j(e) !== "body" || Y(o)) && (r = ce(e)), l) {
786
+ const u = N(e, !0, s, e);
787
+ a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
788
+ } else o && c();
789
+ s && !l && o && c();
790
+ const p = o && !l && !s ? Fe(o, r) : O(0), d = n.left + r.scrollLeft - a.x - p.x, m = n.top + r.scrollTop - a.y - p.y;
791
791
  return {
792
792
  x: d,
793
793
  y: m,
@@ -796,82 +796,82 @@ function Et(i, e, t) {
796
796
  };
797
797
  }
798
798
  function ue(i) {
799
- return O(i).position === "static";
799
+ return S(i).position === "static";
800
800
  }
801
- function Me(i, e) {
802
- if (!T(i) || O(i).position === "fixed")
801
+ function Ie(i, e) {
802
+ if (!T(i) || S(i).position === "fixed")
803
803
  return null;
804
804
  if (e)
805
805
  return e(i);
806
806
  let t = i.offsetParent;
807
- return I(i) === t && (t = t.ownerDocument.body), t;
807
+ return M(i) === t && (t = t.ownerDocument.body), t;
808
808
  }
809
809
  function He(i, e) {
810
810
  const t = k(i);
811
811
  if (ae(i))
812
812
  return t;
813
813
  if (!T(i)) {
814
- let s = $(i);
815
- for (; s && !W(s); ) {
816
- if (S(s) && !ue(s))
817
- return s;
818
- s = $(s);
814
+ let o = D(i);
815
+ for (; o && !W(o); ) {
816
+ if (P(o) && !ue(o))
817
+ return o;
818
+ o = D(o);
819
819
  }
820
820
  return t;
821
821
  }
822
- let o = Me(i, e);
823
- for (; o && mt(o) && ue(o); )
824
- o = Me(o, e);
825
- return o && W(o) && ue(o) && !ve(o) ? t : o || wt(i) || t;
822
+ let l = Ie(i, e);
823
+ for (; l && mt(l) && ue(l); )
824
+ l = Ie(l, e);
825
+ return l && W(l) && ue(l) && !ve(l) ? t : l || wt(i) || t;
826
826
  }
827
827
  const Vt = async function(i) {
828
- const e = this.getOffsetParent || He, t = this.getDimensions, o = await t(i.floating);
828
+ const e = this.getOffsetParent || He, t = this.getDimensions, l = await t(i.floating);
829
829
  return {
830
830
  reference: Et(i.reference, await e(i.floating), i.strategy),
831
831
  floating: {
832
832
  x: 0,
833
833
  y: 0,
834
- width: o.width,
835
- height: o.height
834
+ width: l.width,
835
+ height: l.height
836
836
  }
837
837
  };
838
838
  };
839
- function $t(i) {
840
- return O(i).direction === "rtl";
839
+ function Dt(i) {
840
+ return S(i).direction === "rtl";
841
841
  }
842
- const Dt = {
842
+ const $t = {
843
843
  convertOffsetParentRelativeRectToViewportRelativeRect: Ct,
844
- getDocumentElement: I,
845
- getClippingRect: It,
844
+ getDocumentElement: M,
845
+ getClippingRect: Mt,
846
846
  getOffsetParent: He,
847
847
  getElementRects: Vt,
848
848
  getClientRects: kt,
849
- getDimensions: Mt,
849
+ getDimensions: It,
850
850
  getScale: H,
851
- isElement: S,
852
- isRTL: $t
851
+ isElement: P,
852
+ isRTL: Dt
853
853
  };
854
854
  function We(i, e) {
855
855
  return i.x === e.x && i.y === e.y && i.width === e.width && i.height === e.height;
856
856
  }
857
857
  function Lt(i, e) {
858
- let t = null, o;
859
- const s = I(i);
860
- function l() {
858
+ let t = null, l;
859
+ const o = M(i);
860
+ function s() {
861
861
  var r;
862
- clearTimeout(o), (r = t) == null || r.disconnect(), t = null;
862
+ clearTimeout(l), (r = t) == null || r.disconnect(), t = null;
863
863
  }
864
864
  function n(r, a) {
865
- r === void 0 && (r = !1), a === void 0 && (a = 1), l();
865
+ r === void 0 && (r = !1), a === void 0 && (a = 1), s();
866
866
  const c = i.getBoundingClientRect(), {
867
867
  left: p,
868
868
  top: d,
869
869
  width: m,
870
- height: h
870
+ height: u
871
871
  } = c;
872
- if (r || e(), !m || !h)
872
+ if (r || e(), !m || !u)
873
873
  return;
874
- const g = J(d), v = J(s.clientWidth - (p + m)), w = J(s.clientHeight - (d + h)), b = J(p), y = {
874
+ const g = J(d), v = J(o.clientWidth - (p + m)), w = J(o.clientHeight - (d + u)), b = J(p), y = {
875
875
  rootMargin: -g + "px " + -v + "px " + -w + "px " + -b + "px",
876
876
  threshold: z(0, te(1, a)) || 1
877
877
  };
@@ -881,7 +881,7 @@ function Lt(i, e) {
881
881
  if (F !== a) {
882
882
  if (!C)
883
883
  return n();
884
- F ? n(!1, F) : o = setTimeout(() => {
884
+ F ? n(!1, F) : l = setTimeout(() => {
885
885
  n(!1, 1e-7);
886
886
  }, 1e3);
887
887
  }
@@ -891,62 +891,62 @@ function Lt(i, e) {
891
891
  t = new IntersectionObserver(x, {
892
892
  ...y,
893
893
  // Handle <iframe>s
894
- root: s.ownerDocument
894
+ root: o.ownerDocument
895
895
  });
896
896
  } catch {
897
897
  t = new IntersectionObserver(x, y);
898
898
  }
899
899
  t.observe(i);
900
900
  }
901
- return n(!0), l;
901
+ return n(!0), s;
902
902
  }
903
- function q(i, e, t, o) {
904
- o === void 0 && (o = {});
903
+ function q(i, e, t, l) {
904
+ l === void 0 && (l = {});
905
905
  const {
906
- ancestorScroll: s = !0,
907
- ancestorResize: l = !0,
906
+ ancestorScroll: o = !0,
907
+ ancestorResize: s = !0,
908
908
  elementResize: n = typeof ResizeObserver == "function",
909
909
  layoutShift: r = typeof IntersectionObserver == "function",
910
910
  animationFrame: a = !1
911
- } = o, c = _e(i), p = s || l ? [...c ? U(c) : [], ...U(e)] : [];
911
+ } = l, c = _e(i), p = o || s ? [...c ? U(c) : [], ...U(e)] : [];
912
912
  p.forEach((b) => {
913
- s && b.addEventListener("scroll", t, {
913
+ o && b.addEventListener("scroll", t, {
914
914
  passive: !0
915
- }), l && b.addEventListener("resize", t);
915
+ }), s && b.addEventListener("resize", t);
916
916
  });
917
917
  const d = c && r ? Lt(c, t) : null;
918
- let m = -1, h = null;
919
- n && (h = new ResizeObserver((b) => {
918
+ let m = -1, u = null;
919
+ n && (u = new ResizeObserver((b) => {
920
920
  let [_] = b;
921
- _ && _.target === c && h && (h.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
921
+ _ && _.target === c && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
922
922
  var y;
923
- (y = h) == null || y.observe(e);
923
+ (y = u) == null || y.observe(e);
924
924
  })), t();
925
- }), c && !a && h.observe(c), h.observe(e));
926
- let g, v = a ? R(i) : null;
925
+ }), c && !a && u.observe(c), u.observe(e));
926
+ let g, v = a ? N(i) : null;
927
927
  a && w();
928
928
  function w() {
929
- const b = R(i);
929
+ const b = N(i);
930
930
  v && !We(v, b) && t(), v = b, g = requestAnimationFrame(w);
931
931
  }
932
932
  return t(), () => {
933
933
  var b;
934
934
  p.forEach((_) => {
935
- s && _.removeEventListener("scroll", t), l && _.removeEventListener("resize", t);
936
- }), d == null || d(), (b = h) == null || b.disconnect(), h = null, a && cancelAnimationFrame(g);
935
+ o && _.removeEventListener("scroll", t), s && _.removeEventListener("resize", t);
936
+ }), d == null || d(), (b = u) == null || b.disconnect(), u = null, a && cancelAnimationFrame(g);
937
937
  };
938
938
  }
939
939
  const Z = dt, Q = pt, me = rt, ee = (i, e, t) => {
940
- const o = /* @__PURE__ */ new Map(), s = {
941
- platform: Dt,
940
+ const l = /* @__PURE__ */ new Map(), o = {
941
+ platform: $t,
942
942
  ...t
943
- }, l = {
944
- ...s.platform,
945
- _c: o
943
+ }, s = {
944
+ ...o.platform,
945
+ _c: l
946
946
  };
947
947
  return nt(i, e, {
948
- ...s,
949
- platform: l
948
+ ...o,
949
+ platform: s
950
950
  });
951
951
  };
952
952
  let E = 0;
@@ -986,35 +986,38 @@ const f = {
986
986
  };
987
987
  class zt {
988
988
  constructor(e, t = {}) {
989
- u(this, "element");
990
- u(this, "instanceId");
991
- u(this, "options");
992
- u(this, "isOpen", !1);
993
- u(this, "selectedValues", /* @__PURE__ */ new Set());
994
- u(this, "selectedOptions", /* @__PURE__ */ new Map());
995
- u(this, "allOptions", []);
996
- u(this, "filteredOptions", []);
997
- u(this, "hiddenInputs", []);
998
- u(this, "focusedIndex", -1);
999
- u(this, "searchTerm", "");
1000
- u(this, "isLoading", !1);
1001
- u(this, "showSelectedPopover", !1);
1002
- u(this, "selectedPopoverPlacement", null);
1003
- u(this, "dropdownPlacement", null);
989
+ h(this, "element");
990
+ h(this, "instanceId");
991
+ h(this, "options");
992
+ h(this, "isOpen", !1);
993
+ h(this, "selectedValues", /* @__PURE__ */ new Set());
994
+ h(this, "selectedOptions", /* @__PURE__ */ new Map());
995
+ h(this, "allOptions", []);
996
+ h(this, "filteredOptions", []);
997
+ h(this, "hiddenInputs", []);
998
+ h(this, "focusedIndex", -1);
999
+ h(this, "searchTerm", "");
1000
+ h(this, "isLoading", !1);
1001
+ h(this, "showSelectedPopover", !1);
1002
+ h(this, "selectedPopoverPlacement", null);
1003
+ h(this, "dropdownPlacement", null);
1004
+ h(this, "isRTL", !1);
1005
+ h(this, "effectivePillsPosition", "bottom");
1006
+ h(this, "justClosedViaClick", !1);
1004
1007
  // Floating UI cleanup functions
1005
- u(this, "dropdownCleanup", null);
1006
- u(this, "hintCleanup", null);
1007
- u(this, "selectedPopoverCleanup", null);
1008
+ h(this, "dropdownCleanup", null);
1009
+ h(this, "hintCleanup", null);
1010
+ h(this, "selectedPopoverCleanup", null);
1008
1011
  // Pill tooltip storage
1009
- u(this, "pillTooltips", /* @__PURE__ */ new Map());
1010
- u(this, "pillTooltipCleanups", /* @__PURE__ */ new Map());
1012
+ h(this, "pillTooltips", /* @__PURE__ */ new Map());
1013
+ h(this, "pillTooltipCleanups", /* @__PURE__ */ new Map());
1011
1014
  // DOM elements
1012
- u(this, "input");
1013
- u(this, "dropdown");
1014
- u(this, "pillsContainer");
1015
- u(this, "countBadge");
1016
- u(this, "hint");
1017
- u(this, "selectedPopover");
1015
+ h(this, "input");
1016
+ h(this, "dropdown");
1017
+ h(this, "pillsContainer");
1018
+ h(this, "countBadge");
1019
+ h(this, "hint");
1020
+ h(this, "selectedPopover");
1018
1021
  this.element = e, this.instanceId = `MS-${Math.random().toString(36).substr(2, 9)}`, this.options = {
1019
1022
  // String options
1020
1023
  searchHint: e.dataset.searchHint || "",
@@ -1134,12 +1137,21 @@ class zt {
1134
1137
  this.filteredOptions = [...this.allOptions];
1135
1138
  }
1136
1139
  buildHTML() {
1137
- const e = this.options.container || document.body;
1138
- this.element.classList.add("ml"), (!this.options.isCheckboxesShown || !this.options.isMultipleEnabled) && this.element.classList.add("ml--no-checkboxes");
1139
- const t = document.createElement("div");
1140
- t.className = "ml__input-wrapper", this.input = document.createElement("input"), this.input.type = "text", this.input.className = "ml__input", this.input.placeholder = this.options.searchPlaceholder, this.input.autocomplete = "off", this.options.searchInputMode === "readonly" ? this.input.readOnly = !0 : this.options.searchInputMode === "hidden" && (this.input.style.display = "none");
1141
- const o = document.createElement("span");
1142
- o.className = "ml__toggle", o.innerHTML = "▼", this.countBadge = document.createElement("span"), this.countBadge.className = "ml__count-badge", this.countBadge.style.display = "none", t.appendChild(this.input), t.appendChild(this.countBadge), t.appendChild(o), this.pillsContainer = document.createElement("div"), this.pillsContainer.className = "ml__pills", this.element.appendChild(t), this.element.appendChild(this.pillsContainer), this.dropdown = document.createElement("div"), this.dropdown.className = "ml__dropdown", e.appendChild(this.dropdown), this.options.searchHint && (this.hint = document.createElement("div"), this.hint.className = "ml__hint", this.hint.textContent = this.options.searchHint, e.appendChild(this.hint)), this.selectedPopover = document.createElement("div"), this.selectedPopover.className = "ml__selected-popover", e.appendChild(this.selectedPopover), this.renderDropdown();
1140
+ const e = this.options.container || document.body, t = this.element.getRootNode(), l = t instanceof ShadowRoot ? t.host : this.element, o = l.getAttribute("dir") === "rtl", s = l.closest('[dir="rtl"]') !== null;
1141
+ this.isRTL = o || s, console.log("[MultiSelect RTL Debug]", {
1142
+ isShadowRoot: t instanceof ShadowRoot,
1143
+ hostElement: l,
1144
+ elementDir: l.getAttribute("dir"),
1145
+ hasElementDir: o,
1146
+ hasAncestorDir: s,
1147
+ isRTL: this.isRTL
1148
+ }), this.effectivePillsPosition = this.options.pillsPosition || "bottom", this.isRTL && (this.effectivePillsPosition === "left" ? this.effectivePillsPosition = "right" : this.effectivePillsPosition === "right" && (this.effectivePillsPosition = "left")), this.element.classList.add("ml"), this.isRTL && (this.element.classList.add("ml--rtl"), console.log("[MultiSelect RTL] Added ml--rtl class to element")), (!this.options.isCheckboxesShown || !this.options.isMultipleEnabled) && this.element.classList.add("ml--no-checkboxes");
1149
+ const n = document.createElement("div");
1150
+ n.className = "ml__input-wrapper", this.input = document.createElement("input"), this.input.type = "text", this.input.className = "ml__input", this.input.placeholder = this.options.searchPlaceholder, this.input.autocomplete = "off", this.options.searchInputMode === "readonly" ? this.input.readOnly = !0 : this.options.searchInputMode === "hidden" && (this.input.style.display = "none");
1151
+ const r = document.createElement("span");
1152
+ r.className = "ml__toggle", r.innerHTML = "▼", this.countBadge = document.createElement("span"), this.countBadge.className = "ml__count-badge", this.countBadge.style.display = "none", n.appendChild(this.input), n.appendChild(this.countBadge), n.appendChild(r), this.pillsContainer = document.createElement("div"), this.pillsContainer.className = "ml__pills";
1153
+ const a = document.createElement("div");
1154
+ a.className = "ml-wrapper", (this.effectivePillsPosition === "left" || this.effectivePillsPosition === "right") && a.classList.add("ml-wrapper--inline"), a.appendChild(n), a.appendChild(this.pillsContainer), this.element.appendChild(a), this.dropdown = document.createElement("div"), this.dropdown.className = "ml__dropdown", e.appendChild(this.dropdown), this.options.searchHint && (this.hint = document.createElement("div"), this.hint.className = "ml__hint", this.hint.textContent = this.options.searchHint, e.appendChild(this.hint)), this.selectedPopover = document.createElement("div"), this.selectedPopover.className = "ml__selected-popover", e.appendChild(this.selectedPopover), this.renderDropdown();
1143
1155
  }
1144
1156
  renderDropdown() {
1145
1157
  let e = "";
@@ -1155,33 +1167,33 @@ class zt {
1155
1167
  e += `<div class="ml__empty">${this.options.emptyMessage}</div>`;
1156
1168
  else if (this.options.isGroupsAllowed) {
1157
1169
  const t = this.groupOptions(this.filteredOptions);
1158
- Object.keys(t).forEach((o) => {
1159
- e += '<div class="ml__group">', o !== "__ungrouped__" && (e += `<div class="ml__group-label">${o}</div>`), t[o].forEach((s, l) => {
1160
- e += this.renderOption(s, l);
1170
+ Object.keys(t).forEach((l) => {
1171
+ e += '<div class="ml__group">', l !== "__ungrouped__" && (e += `<div class="ml__group-label">${l}</div>`), t[l].forEach((o, s) => {
1172
+ e += this.renderOption(o, s);
1161
1173
  }), e += "</div>";
1162
1174
  });
1163
1175
  } else
1164
- this.filteredOptions.forEach((t, o) => {
1165
- e += this.renderOption(t, o);
1176
+ this.filteredOptions.forEach((t, l) => {
1177
+ e += this.renderOption(t, l);
1166
1178
  });
1167
1179
  e += "</div>", this.dropdown.innerHTML = e;
1168
1180
  }
1169
1181
  renderOption(e, t) {
1170
- const o = this.getItemValue(e), s = this.getItemDisplayValue(e), l = this.getItemIcon(e), n = this.getItemSubtitle(e), r = this.getItemDisabled(e), a = this.selectedValues.has(String(o)), c = t === this.focusedIndex, p = ["ml__option"];
1182
+ const l = this.getItemValue(e), o = this.getItemDisplayValue(e), s = this.getItemIcon(e), n = this.getItemSubtitle(e), r = this.getItemDisabled(e), a = this.selectedValues.has(String(l)), c = t === this.focusedIndex, p = ["ml__option"];
1171
1183
  a && p.push("ml__option--selected"), c && p.push("ml__option--focused"), r && p.push("ml__option--disabled");
1172
- let d = `<div class="${p.join(" ")}" data-value="${o}" data-index="${t}">`;
1173
- return this.options.isCheckboxesShown && this.options.isMultipleEnabled && (d += `<input type="checkbox" class="ml__checkbox" ${a ? "checked" : ""} ${r ? "disabled" : ""}>`), d += '<div class="ml__option-content">', l && (d += `<span class="ml__option-icon">${l}</span>`), d += '<div class="ml__option-text">', d += `<div class="ml__option-title">${this.highlightMatch(s, this.searchTerm)}</div>`, n && (d += `<div class="ml__option-subtitle">${n}</div>`), d += "</div>", d += "</div>", d += "</div>", d;
1184
+ let d = `<div class="${p.join(" ")}" data-value="${l}" data-index="${t}">`;
1185
+ return this.options.isCheckboxesShown && this.options.isMultipleEnabled && (d += `<input type="checkbox" class="ml__checkbox" ${a ? "checked" : ""} ${r ? "disabled" : ""}>`), d += '<div class="ml__option-content">', s && (d += `<span class="ml__option-icon">${s}</span>`), d += '<div class="ml__option-text">', d += `<div class="ml__option-title">${this.highlightMatch(o, this.searchTerm)}</div>`, n && (d += `<div class="ml__option-subtitle">${n}</div>`), d += "</div>", d += "</div>", d += "</div>", d;
1174
1186
  }
1175
1187
  highlightMatch(e, t) {
1176
1188
  if (!t) return e;
1177
- const o = new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
1178
- return e.replace(o, "<mark>$1</mark>");
1189
+ const l = new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
1190
+ return e.replace(l, "<mark>$1</mark>");
1179
1191
  }
1180
1192
  groupOptions(e) {
1181
1193
  const t = {};
1182
- return e.forEach((o) => {
1183
- const s = this.getItemGroup(o) || "__ungrouped__";
1184
- t[s] || (t[s] = []), t[s].push(o);
1194
+ return e.forEach((l) => {
1195
+ const o = this.getItemGroup(l) || "__ungrouped__";
1196
+ t[o] || (t[o] = []), t[o].push(l);
1185
1197
  }), t;
1186
1198
  }
1187
1199
  renderPills() {
@@ -1189,26 +1201,26 @@ class zt {
1189
1201
  const e = Array.from(this.selectedOptions.values()), t = this.selectedValues.size;
1190
1202
  if (!this.options.isMultipleEnabled) {
1191
1203
  this.pillsContainer.innerHTML = "", this.countBadge.style.display = "none";
1192
- const l = e[0] ? this.getItemDisplayValue(e[0]) : void 0;
1204
+ const s = e[0] ? this.getItemDisplayValue(e[0]) : void 0;
1193
1205
  f.warn(`[${this.instanceId}] renderPills() single-select mode`, {
1194
1206
  isOpen: this.isOpen,
1195
1207
  count: t,
1196
1208
  selectedOptionsLength: e.length,
1197
1209
  willSetValue: !this.isOpen && t > 0 && e.length > 0,
1198
- selectedLabel: l
1199
- }), !this.isOpen && t > 0 && e.length > 0 ? (f.info(`[${this.instanceId}] ✅ SETTING input.value = "${l}"`), this.input.value = l, f.info(`[${this.instanceId}] 🔍 VERIFY input.value = "${this.input.value}"`)) : this.isOpen ? f.info(`[${this.instanceId}] ⏭️ SKIPPING input update (dropdown is open)`) : (f.info(`[${this.instanceId}] ❌ CLEARING input.value (no selection)`), this.input.value = "");
1210
+ selectedLabel: s
1211
+ }), !this.isOpen && t > 0 && e.length > 0 ? (f.info(`[${this.instanceId}] ✅ SETTING input.value = "${s}"`), this.input.value = s, f.info(`[${this.instanceId}] 🔍 VERIFY input.value = "${this.input.value}"`)) : this.isOpen ? f.info(`[${this.instanceId}] ⏭️ SKIPPING input update (dropdown is open)`) : (f.info(`[${this.instanceId}] ❌ CLEARING input.value (no selection)`), this.input.value = "");
1200
1212
  return;
1201
1213
  }
1202
- let o = this.options.pillsDisplayMode;
1203
- if (this.options.pillsThreshold !== null && t > this.options.pillsThreshold && (o = this.options.pillsThresholdMode || "count"), !this.isOpen)
1204
- if (t > 0 && o === "count") {
1205
- const l = this.options.getCountPillCallback ? this.options.getCountPillCallback(t) : `${t} selected`;
1206
- this.input.placeholder = l;
1214
+ let l = this.options.pillsDisplayMode;
1215
+ if (this.options.pillsThreshold !== null && t > this.options.pillsThreshold && (l = this.options.pillsThresholdMode || "count"), !this.isOpen)
1216
+ if (t > 0 && l === "count") {
1217
+ const s = this.options.getCountPillCallback ? this.options.getCountPillCallback(t) : `${t} selected`;
1218
+ this.input.placeholder = s;
1207
1219
  } else
1208
1220
  this.input.placeholder = this.options.searchPlaceholder;
1209
- if (this.options.isCountBadgeShown && t > 0 ? (this.countBadge.textContent = `[${t}]`, this.countBadge.style.display = "") : this.countBadge.style.display = "none", o === "pills")
1210
- this.pillsContainer.className = `ml__pills ml__pills--${this.options.pillsPosition}`, this.pillsContainer.innerHTML = e.map((l) => {
1211
- const n = this.getItemValue(l), r = this.getItemDisplayValue(l);
1221
+ if (this.options.isCountBadgeShown && t > 0 ? (this.countBadge.textContent = `[${t}]`, this.countBadge.style.display = "") : this.countBadge.style.display = "none", l === "pills")
1222
+ this.pillsContainer.className = `ml__pills ml__pills--${this.effectivePillsPosition}`, this.pillsContainer.innerHTML = e.map((s) => {
1223
+ const n = this.getItemValue(s), r = this.getItemDisplayValue(s);
1212
1224
  return `
1213
1225
  <div class="ml__pill">
1214
1226
  <span class="ml__pill-text">${r}</span>
@@ -1216,9 +1228,9 @@ class zt {
1216
1228
  </div>
1217
1229
  `;
1218
1230
  }).join("");
1219
- else if (o === "partial") {
1220
- this.pillsContainer.className = `ml__pills ml__pills--${this.options.pillsPosition}`;
1221
- const l = this.options.pillsMaxVisible || 3, n = e.slice(0, l), r = t - l, a = n.map((p) => {
1231
+ else if (l === "partial") {
1232
+ this.pillsContainer.className = `ml__pills ml__pills--${this.effectivePillsPosition}`;
1233
+ const s = this.options.pillsMaxVisible || 3, n = e.slice(0, s), r = t - s, a = n.map((p) => {
1222
1234
  const d = this.getItemValue(p), m = this.getItemDisplayValue(p);
1223
1235
  return `
1224
1236
  <div class="ml__pill">
@@ -1234,12 +1246,12 @@ class zt {
1234
1246
  <button type="button" class="ml__pill-remove" data-action="remove-hidden" aria-label="Remove ${r} hidden items"></button>
1235
1247
  </div>
1236
1248
  `), this.pillsContainer.innerHTML = a + c;
1237
- } else if (this.pillsContainer.className = `ml__count-display ml__count-display--${this.options.pillsPosition}`, t > 0) {
1238
- const l = this.options.getCountPillCallback ? this.options.getCountPillCallback(t) : `${t} selected`;
1249
+ } else if (this.pillsContainer.className = `ml__count-display ml__count-display--${this.effectivePillsPosition}`, t > 0) {
1250
+ const s = this.options.getCountPillCallback ? this.options.getCountPillCallback(t) : `${t} selected`;
1239
1251
  this.pillsContainer.innerHTML = `
1240
1252
  <div class="ml__count-badge-wrapper">
1241
1253
  <button type="button" class="ml__count-text" data-action="show-selected">
1242
- ${l}
1254
+ ${s}
1243
1255
  </button>
1244
1256
  <button type="button" class="ml__count-clear" data-action="clear-count" aria-label="Clear all selections"></button>
1245
1257
  </div>
@@ -1250,8 +1262,12 @@ class zt {
1250
1262
  }
1251
1263
  attachEvents() {
1252
1264
  this.input.addEventListener("mousedown", (e) => {
1253
- this.isOpen || e.stopPropagation();
1254
- }), this.input.addEventListener("focus", () => this.open()), this.input.addEventListener("input", (e) => {
1265
+ e.stopPropagation(), this.isOpen ? (this.justClosedViaClick = !0, this.close(), setTimeout(() => {
1266
+ this.justClosedViaClick = !1;
1267
+ }, 0)) : this.open();
1268
+ }), this.input.addEventListener("focus", () => {
1269
+ !this.isOpen && !this.justClosedViaClick && this.open();
1270
+ }), this.input.addEventListener("input", (e) => {
1255
1271
  const t = e.target.value;
1256
1272
  this.options.isSearchEnabled && !this.isOpen && this.open(), this.handleSearch(t);
1257
1273
  }), this.input.addEventListener("keydown", (e) => this.handleKeydown(e)), setTimeout(() => {
@@ -1287,8 +1303,8 @@ class zt {
1287
1303
  return;
1288
1304
  }
1289
1305
  if (!this.options.isSearchEnabled) {
1290
- const t = e.key.length === 1 || e.key === "Backspace" || e.key === "Delete", o = ["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", "Enter", "Escape", "Tab"].includes(e.key);
1291
- if (t && !o) {
1306
+ const t = e.key.length === 1 || e.key === "Backspace" || e.key === "Delete", l = ["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", "Enter", "Escape", "Tab"].includes(e.key);
1307
+ if (t && !l) {
1292
1308
  e.preventDefault();
1293
1309
  return;
1294
1310
  }
@@ -1328,19 +1344,19 @@ class zt {
1328
1344
  const t = e.target.closest("[data-action]");
1329
1345
  if (t) {
1330
1346
  e.preventDefault();
1331
- const s = t.dataset.action;
1332
- f.debug(`[${this.instanceId}] Action button clicked:`, s), s === "select-all" ? this.selectAll() : s === "clear-all" && this.clearAll();
1347
+ const o = t.dataset.action;
1348
+ f.debug(`[${this.instanceId}] Action button clicked:`, o), o === "select-all" ? this.selectAll() : o === "clear-all" && this.clearAll();
1333
1349
  return;
1334
1350
  }
1335
- const o = e.target.closest(".ml__option");
1336
- if (o && !o.classList.contains("ml__option--disabled")) {
1351
+ const l = e.target.closest(".ml__option");
1352
+ if (l && !l.classList.contains("ml__option--disabled")) {
1337
1353
  e.preventDefault();
1338
- const s = o.dataset.value, l = this.filteredOptions.find((n) => String(this.getItemValue(n)) === s);
1354
+ const o = l.dataset.value, s = this.filteredOptions.find((n) => String(this.getItemValue(n)) === o);
1339
1355
  f.debug(`[${this.instanceId}] Option clicked:`, {
1340
- value: s,
1356
+ value: o,
1341
1357
  closeOnSelect: this.options.isCloseOnSelect,
1342
1358
  placeholder: this.options.searchPlaceholder
1343
- }), l && this.toggleOption(l);
1359
+ }), s && this.toggleOption(s);
1344
1360
  }
1345
1361
  }
1346
1362
  handlePillClick(e) {
@@ -1352,15 +1368,15 @@ class zt {
1352
1368
  e.preventDefault(), e.stopPropagation(), this.toggleSelectedPopover();
1353
1369
  return;
1354
1370
  }
1355
- const s = e.target.closest(".ml__pill-remove");
1356
- if (s) {
1357
- if (e.preventDefault(), e.stopPropagation(), s.dataset.action === "remove-hidden") {
1371
+ const o = e.target.closest(".ml__pill-remove");
1372
+ if (o) {
1373
+ if (e.preventDefault(), e.stopPropagation(), o.dataset.action === "remove-hidden") {
1358
1374
  f.debug(`[${this.instanceId}] Remove hidden items button clicked`);
1359
1375
  const a = this.options.pillsMaxVisible || 3;
1360
1376
  Array.from(this.selectedOptions.values()).slice(a).forEach((d) => this.deselectOption(d));
1361
1377
  return;
1362
1378
  }
1363
- const n = s.dataset.value, r = this.selectedOptions.get(n);
1379
+ const n = o.dataset.value, r = this.selectedOptions.get(n);
1364
1380
  r && this.deselectOption(r);
1365
1381
  return;
1366
1382
  }
@@ -1370,7 +1386,7 @@ class zt {
1370
1386
  }
1371
1387
  }
1372
1388
  handleClickOutside(e) {
1373
- var s;
1389
+ var o;
1374
1390
  const t = e.composedPath();
1375
1391
  if (this.showSelectedPopover && !t.some(
1376
1392
  (n) => n instanceof Node && (this.selectedPopover.contains(n) || this.countBadge.contains(n) || n.closest && n.closest(".ml__count-text"))
@@ -1379,19 +1395,19 @@ class zt {
1379
1395
  return;
1380
1396
  }
1381
1397
  if (!this.isOpen) return;
1382
- const o = t.some(
1383
- (l) => l instanceof Node && (this.element.contains(l) || this.dropdown.contains(l) || this.hint && this.hint.contains(l))
1398
+ const l = t.some(
1399
+ (s) => s instanceof Node && (this.element.contains(s) || this.dropdown.contains(s) || this.hint && this.hint.contains(s))
1384
1400
  );
1385
1401
  f.debug(`[${this.instanceId}] handleClickOutside`, {
1386
1402
  target: e.target.className,
1387
1403
  targetTag: e.target.tagName,
1388
- clickedInside: o,
1404
+ clickedInside: l,
1389
1405
  pathLength: t.length,
1390
- firstInPath: (s = t[0]) == null ? void 0 : s.tagName,
1391
- elementContains: t.some((l) => l instanceof Node && this.element.contains(l)),
1392
- dropdownContains: t.some((l) => l instanceof Node && this.dropdown.contains(l)),
1406
+ firstInPath: (o = t[0]) == null ? void 0 : o.tagName,
1407
+ elementContains: t.some((s) => s instanceof Node && this.element.contains(s)),
1408
+ dropdownContains: t.some((s) => s instanceof Node && this.dropdown.contains(s)),
1393
1409
  isConnected: this.dropdown.isConnected
1394
- }), o || (f.warn(`[${this.instanceId}] Closing dropdown due to click outside`), this.close());
1410
+ }), l || (f.warn(`[${this.instanceId}] Closing dropdown due to click outside`), this.close());
1395
1411
  }
1396
1412
  focusNext() {
1397
1413
  this.filteredOptions.length !== 0 && (this.focusedIndex = (this.focusedIndex + 1) % this.filteredOptions.length, this.renderDropdown(), this.scrollToFocused());
@@ -1416,12 +1432,12 @@ class zt {
1416
1432
  e && e.scrollIntoView({ block: "nearest", behavior: "smooth" });
1417
1433
  }
1418
1434
  toggleOption(e) {
1419
- const t = this.getItemValue(e), o = String(t);
1435
+ const t = this.getItemValue(e), l = String(t);
1420
1436
  if (f.debug(`[${this.instanceId}] toggleOption called`, { value: t, multiple: this.options.isMultipleEnabled }), !this.options.isMultipleEnabled) {
1421
- this.selectedValues.has(o) ? (f.debug(`[${this.instanceId}] Deselecting option in single-select mode`, { value: t }), this.deselectOption(e)) : (f.debug(`[${this.instanceId}] Clearing previous selections and selecting new option`, { value: t }), this.selectedValues.clear(), this.selectedOptions.clear(), this.selectOption(e)), f.info(`[${this.instanceId}] ❌ Closing dropdown (single-select mode)`), this.close();
1437
+ this.selectedValues.has(l) ? (f.debug(`[${this.instanceId}] Deselecting option in single-select mode`, { value: t }), this.deselectOption(e)) : (f.debug(`[${this.instanceId}] Clearing previous selections and selecting new option`, { value: t }), this.selectedValues.clear(), this.selectedOptions.clear(), this.selectOption(e)), f.info(`[${this.instanceId}] ❌ Closing dropdown (single-select mode)`), this.close();
1422
1438
  return;
1423
1439
  }
1424
- this.selectedValues.has(o) ? (f.debug(`[${this.instanceId}] Deselecting option`, { value: t }), this.deselectOption(e)) : (f.debug(`[${this.instanceId}] Selecting option`, { value: t }), this.selectOption(e)), f.debug(`[${this.instanceId}] Checking closeOnSelect`, {
1440
+ this.selectedValues.has(l) ? (f.debug(`[${this.instanceId}] Deselecting option`, { value: t }), this.deselectOption(e)) : (f.debug(`[${this.instanceId}] Selecting option`, { value: t }), this.selectOption(e)), f.debug(`[${this.instanceId}] Checking closeOnSelect`, {
1425
1441
  closeOnSelect: this.options.isCloseOnSelect,
1426
1442
  willClose: this.options.isCloseOnSelect === !0,
1427
1443
  placeholder: this.options.searchPlaceholder
@@ -1438,18 +1454,18 @@ class zt {
1438
1454
  }
1439
1455
  }
1440
1456
  selectOption(e) {
1441
- const t = this.getItemValue(e), o = String(t);
1442
- this.selectedValues.add(o), this.selectedOptions.set(o, e), this.renderDropdown(), this.renderPills(), this.updateHiddenInput(), this.options.selectCallback && this.options.selectCallback(e), this.options.changeCallback && this.options.changeCallback(this.getSelected());
1457
+ const t = this.getItemValue(e), l = String(t);
1458
+ this.selectedValues.add(l), this.selectedOptions.set(l, e), this.renderDropdown(), this.renderPills(), this.updateHiddenInput(), this.options.selectCallback && this.options.selectCallback(e), this.options.changeCallback && this.options.changeCallback(this.getSelected());
1443
1459
  }
1444
1460
  deselectOption(e) {
1445
- const t = this.getItemValue(e), o = String(t);
1446
- this.selectedValues.delete(o), this.selectedOptions.delete(o), this.renderDropdown(), this.renderPills(), this.updateHiddenInput(), this.options.deselectCallback && this.options.deselectCallback(e), this.options.changeCallback && this.options.changeCallback(this.getSelected());
1461
+ const t = this.getItemValue(e), l = String(t);
1462
+ this.selectedValues.delete(l), this.selectedOptions.delete(l), this.renderDropdown(), this.renderPills(), this.updateHiddenInput(), this.options.deselectCallback && this.options.deselectCallback(e), this.options.changeCallback && this.options.changeCallback(this.getSelected());
1447
1463
  }
1448
1464
  selectAll() {
1449
1465
  this.filteredOptions.forEach((e) => {
1450
1466
  if (!this.getItemDisabled(e)) {
1451
- const t = this.getItemValue(e), o = String(t);
1452
- this.selectedValues.add(o), this.selectedOptions.set(o, e);
1467
+ const t = this.getItemValue(e), l = String(t);
1468
+ this.selectedValues.add(l), this.selectedOptions.set(l, e);
1453
1469
  }
1454
1470
  }), this.renderDropdown(), this.renderPills(), this.updateHiddenInput(), this.options.changeCallback && this.options.changeCallback(this.getSelected());
1455
1471
  }
@@ -1483,11 +1499,11 @@ class zt {
1483
1499
  ee(this.input, this.dropdown, {
1484
1500
  placement: e,
1485
1501
  middleware: t
1486
- }).then(({ x: o, y: s, placement: l }) => {
1487
- this.options.isPlacementLocked && !this.dropdownPlacement && (this.dropdownPlacement = l, f.debug(`[${this.instanceId}] Locked dropdown placement:`, l));
1502
+ }).then(({ x: l, y: o, placement: s }) => {
1503
+ this.options.isPlacementLocked && !this.dropdownPlacement && (this.dropdownPlacement = s, f.debug(`[${this.instanceId}] Locked dropdown placement:`, s));
1488
1504
  const n = {
1489
- left: `${o}px`,
1490
- top: `${s}px`,
1505
+ left: `${l}px`,
1506
+ top: `${o}px`,
1491
1507
  width: `${this.input.offsetWidth}px`
1492
1508
  };
1493
1509
  this.options.dropdownMinWidth && (n.minWidth = this.options.dropdownMinWidth), Object.assign(this.dropdown.style, n), this.hint && this.isOpen && this.positionHint();
@@ -1508,10 +1524,10 @@ class zt {
1508
1524
  // Don't use flip() - we want hint to stay opposite of dropdown
1509
1525
  Q({ padding: 8 })
1510
1526
  ]
1511
- }).then(({ x: t, y: o }) => {
1527
+ }).then(({ x: t, y: l }) => {
1512
1528
  Object.assign(this.hint.style, {
1513
1529
  left: `${t}px`,
1514
- top: `${o}px`
1530
+ top: `${l}px`
1515
1531
  });
1516
1532
  });
1517
1533
  }
@@ -1521,11 +1537,11 @@ class zt {
1521
1537
  const e = this.element.dataset.initialValues;
1522
1538
  if (e)
1523
1539
  try {
1524
- JSON.parse(e).forEach((o) => {
1525
- const s = String(o);
1526
- this.selectedValues.add(s);
1527
- const l = this.allOptions.find((n) => String(this.getItemValue(n)) === s);
1528
- l && this.selectedOptions.set(s, l);
1540
+ JSON.parse(e).forEach((l) => {
1541
+ const o = String(l);
1542
+ this.selectedValues.add(o);
1543
+ const s = this.allOptions.find((n) => String(this.getItemValue(n)) === o);
1544
+ s && this.selectedOptions.set(o, s);
1529
1545
  }), this.renderPills();
1530
1546
  } catch (t) {
1531
1547
  console.error("[MultiSelect] Failed to parse initial values:", t);
@@ -1548,12 +1564,12 @@ class zt {
1548
1564
  <button type="button" class="ml__selected-popover-close" aria-label="Close">&times;</button>
1549
1565
  </div>
1550
1566
  <div class="ml__selected-popover-body">
1551
- ${e.map((o) => {
1552
- const s = this.getItemValue(o), l = this.getItemDisplayValue(o);
1567
+ ${e.map((l) => {
1568
+ const o = this.getItemValue(l), s = this.getItemDisplayValue(l);
1553
1569
  return `
1554
1570
  <div class="ml__pill">
1555
- <span class="ml__pill-text">${l}</span>
1556
- <button type="button" class="ml__pill-remove" data-value="${s}" aria-label="Remove ${l}"></button>
1571
+ <span class="ml__pill-text">${s}</span>
1572
+ <button type="button" class="ml__pill-remove" data-value="${o}" aria-label="Remove ${s}"></button>
1557
1573
  </div>
1558
1574
  `;
1559
1575
  }).join("")}
@@ -1565,11 +1581,11 @@ class zt {
1565
1581
  e.preventDefault(), this.hideSelectedPopover();
1566
1582
  return;
1567
1583
  }
1568
- const o = e.target.closest(".ml__pill-remove");
1569
- if (o) {
1584
+ const l = e.target.closest(".ml__pill-remove");
1585
+ if (l) {
1570
1586
  e.preventDefault();
1571
- const s = o.dataset.value, l = this.selectedOptions.get(s);
1572
- l && (this.deselectOption(l), this.renderSelectedPopover(), this.selectedValues.size === 0 && this.hideSelectedPopover());
1587
+ const o = l.dataset.value, s = this.selectedOptions.get(o);
1588
+ s && (this.deselectOption(s), this.renderSelectedPopover(), this.selectedValues.size === 0 && this.hideSelectedPopover());
1573
1589
  }
1574
1590
  }
1575
1591
  positionSelectedPopover() {
@@ -1585,14 +1601,14 @@ class zt {
1585
1601
  ...this.selectedPopoverPlacement ? [] : [me()],
1586
1602
  Q({ padding: 8 })
1587
1603
  ]
1588
- }).then(({ x: t, y: o, placement: s }) => {
1589
- this.selectedPopoverPlacement || (this.selectedPopoverPlacement = s, f.debug(`[${this.instanceId}] Locked popover placement:`, s));
1590
- const l = {
1604
+ }).then(({ x: t, y: l, placement: o }) => {
1605
+ this.selectedPopoverPlacement || (this.selectedPopoverPlacement = o, f.debug(`[${this.instanceId}] Locked popover placement:`, o));
1606
+ const s = {
1591
1607
  left: `${t}px`,
1592
- top: `${o}px`,
1608
+ top: `${l}px`,
1593
1609
  width: `${this.input.offsetWidth}px`
1594
1610
  };
1595
- this.options.dropdownMinWidth && (l.minWidth = this.options.dropdownMinWidth), Object.assign(this.selectedPopover.style, l);
1611
+ this.options.dropdownMinWidth && (s.minWidth = this.options.dropdownMinWidth), Object.assign(this.selectedPopover.style, s);
1596
1612
  });
1597
1613
  }
1598
1614
  );
@@ -1602,20 +1618,20 @@ class zt {
1602
1618
  // ========================================================================
1603
1619
  updateHiddenInput() {
1604
1620
  if (!this.options.formFieldId) return;
1605
- this.hiddenInputs.forEach((s) => s.remove()), this.hiddenInputs = [];
1606
- const e = this.options.valueFormat || "json", t = Array.from(this.selectedOptions.values()).map((s) => this.getItemValue(s)), o = this.options.hostElement || this.element;
1621
+ this.hiddenInputs.forEach((o) => o.remove()), this.hiddenInputs = [];
1622
+ const e = this.options.valueFormat || "json", t = Array.from(this.selectedOptions.values()).map((o) => this.getItemValue(o)), l = this.options.hostElement || this.element;
1607
1623
  if (e === "array")
1608
- t.forEach((s) => {
1609
- const l = document.createElement("input");
1610
- l.type = "hidden", l.name = `${this.options.formFieldId}[]`, l.value = String(s), o.appendChild(l), this.hiddenInputs.push(l);
1624
+ t.forEach((o) => {
1625
+ const s = document.createElement("input");
1626
+ s.type = "hidden", s.name = `${this.options.formFieldId}[]`, s.value = String(o), l.appendChild(s), this.hiddenInputs.push(s);
1611
1627
  });
1612
1628
  else {
1613
- const s = document.createElement("input");
1614
- s.type = "hidden", s.name = this.options.formFieldId, s.id = this.options.formFieldId, s.value = this.getFormValue(), o.appendChild(s), this.hiddenInputs.push(s);
1629
+ const o = document.createElement("input");
1630
+ o.type = "hidden", o.name = this.options.formFieldId, o.id = this.options.formFieldId, o.value = this.getFormValue(), l.appendChild(o), this.hiddenInputs.push(o);
1615
1631
  }
1616
1632
  }
1617
1633
  getFormValue() {
1618
- const e = Array.from(this.selectedOptions.values()).map((o) => this.getItemValue(o));
1634
+ const e = Array.from(this.selectedOptions.values()).map((l) => this.getItemValue(l));
1619
1635
  return this.options.getValueFormatCallback ? this.options.getValueFormatCallback(e) : (this.options.valueFormat || "json") === "csv" ? e.join(",") : JSON.stringify(e);
1620
1636
  }
1621
1637
  // ========================================================================
@@ -1626,8 +1642,8 @@ class zt {
1626
1642
  }
1627
1643
  setSelected(e) {
1628
1644
  this.selectedValues = new Set(e.map((t) => String(t))), this.selectedOptions.clear(), e.forEach((t) => {
1629
- const o = String(t), s = this.allOptions.find((l) => String(this.getItemValue(l)) === o);
1630
- s && this.selectedOptions.set(o, s);
1645
+ const l = String(t), o = this.allOptions.find((s) => String(this.getItemValue(s)) === l);
1646
+ o && this.selectedOptions.set(l, o);
1631
1647
  }), this.renderDropdown(), this.renderPills(), this.updateHiddenInput();
1632
1648
  }
1633
1649
  get selectedItem() {
@@ -1656,70 +1672,70 @@ class zt {
1656
1672
  return;
1657
1673
  }
1658
1674
  const e = this.pillsContainer.querySelectorAll(".ml__pill:not(.ml__pill--more)");
1659
- console.log(`[Tooltips] Found ${e.length} pills to attach tooltips to`), e.forEach((o) => {
1660
- const s = o, l = s.querySelector(".ml__pill-remove");
1661
- if (!l) return;
1662
- const n = l.dataset.value, r = this.selectedOptions.get(n);
1675
+ console.log(`[Tooltips] Found ${e.length} pills to attach tooltips to`), e.forEach((l) => {
1676
+ const o = l, s = o.querySelector(".ml__pill-remove");
1677
+ if (!s) return;
1678
+ const n = s.dataset.value, r = this.selectedOptions.get(n);
1663
1679
  if (!r) return;
1664
- const a = s.querySelector(".ml__pill-text");
1680
+ const a = o.querySelector(".ml__pill-text");
1665
1681
  a && this.createTooltipForElement(a, r, n);
1666
1682
  const c = this.getItemDisplayValue(r);
1667
- this.createRemoveButtonTooltip(l, c, n);
1683
+ this.createRemoveButtonTooltip(s, c, n);
1668
1684
  });
1669
1685
  const t = this.pillsContainer.querySelector(".ml__pill--more");
1670
1686
  if (t) {
1671
- const o = t.querySelector(".ml__pill-remove");
1672
- if (o && o.dataset.action === "remove-hidden") {
1673
- const s = this.options.pillsMaxVisible || 3, n = Array.from(this.selectedOptions.values()).length - s;
1674
- this.createRemoveButtonTooltip(o, `${n} hidden items`, "more-badge-remove");
1687
+ const l = t.querySelector(".ml__pill-remove");
1688
+ if (l && l.dataset.action === "remove-hidden") {
1689
+ const o = this.options.pillsMaxVisible || 3, n = Array.from(this.selectedOptions.values()).length - o;
1690
+ this.createRemoveButtonTooltip(l, `${n} hidden items`, "more-badge-remove");
1675
1691
  }
1676
1692
  }
1677
1693
  }
1678
- createTooltipForElement(e, t, o) {
1679
- const s = document.createElement("div");
1680
- s.className = "ml__pill-tooltip";
1681
- let l;
1694
+ createTooltipForElement(e, t, l) {
1695
+ const o = document.createElement("div");
1696
+ o.className = "ml__pill-tooltip";
1697
+ let s;
1682
1698
  if (this.options.getPillTooltipCallback)
1683
- l = this.options.getPillTooltipCallback(t), console.log("[Tooltips] Using custom callback for tooltip content");
1699
+ s = this.options.getPillTooltipCallback(t), console.log("[Tooltips] Using custom callback for tooltip content");
1684
1700
  else {
1685
1701
  const d = this.getItemDisplayValue(t), m = this.getItemSubtitle(t);
1686
- l = m ? `${d}
1687
- ${m}` : d, console.log(`[Tooltips] Using default content: "${l}"`);
1702
+ s = m ? `${d}
1703
+ ${m}` : d, console.log(`[Tooltips] Using default content: "${s}"`);
1688
1704
  }
1689
- typeof l == "string" ? s.textContent = l : s.appendChild(l), (this.options.container || document.body).appendChild(s), console.log(`[Tooltips] Tooltip element created and appended for "${o}"`), this.pillTooltips.set(o, s);
1705
+ typeof s == "string" ? o.textContent = s : o.appendChild(s), (this.options.container || document.body).appendChild(o), console.log(`[Tooltips] Tooltip element created and appended for "${l}"`), this.pillTooltips.set(l, o);
1690
1706
  let r, a;
1691
1707
  const c = () => {
1692
- clearTimeout(a), console.log(`[Tooltips] Mouse entered pill "${o}", will show tooltip in ${this.options.pillTooltipDelay || 300}ms`), r = window.setTimeout(() => {
1693
- console.log(`[Tooltips] Showing tooltip for "${o}"`), s.classList.add("ml__pill-tooltip--visible"), this.positionPillTooltip(e, s, o);
1708
+ clearTimeout(a), console.log(`[Tooltips] Mouse entered pill "${l}", will show tooltip in ${this.options.pillTooltipDelay || 300}ms`), r = window.setTimeout(() => {
1709
+ console.log(`[Tooltips] Showing tooltip for "${l}"`), o.classList.add("ml__pill-tooltip--visible"), this.positionPillTooltip(e, o, l);
1694
1710
  }, this.options.pillTooltipDelay || 300);
1695
1711
  }, p = () => {
1696
1712
  clearTimeout(r), a = window.setTimeout(() => {
1697
- s.classList.remove("ml__pill-tooltip--visible"), this.cleanupPillTooltip(o);
1713
+ o.classList.remove("ml__pill-tooltip--visible"), this.cleanupPillTooltip(l);
1698
1714
  }, 100);
1699
1715
  };
1700
1716
  e.addEventListener("mouseenter", c), e.addEventListener("mouseleave", p);
1701
1717
  }
1702
- createRemoveButtonTooltip(e, t, o) {
1703
- const s = document.createElement("div");
1704
- s.className = "ml__pill-tooltip", s.textContent = `Remove ${t}`, (this.options.container || document.body).appendChild(s);
1705
- const n = `${o}-remove`;
1706
- this.pillTooltips.set(n, s);
1718
+ createRemoveButtonTooltip(e, t, l) {
1719
+ const o = document.createElement("div");
1720
+ o.className = "ml__pill-tooltip", o.textContent = `Remove ${t}`, (this.options.container || document.body).appendChild(o);
1721
+ const n = `${l}-remove`;
1722
+ this.pillTooltips.set(n, o);
1707
1723
  let r, a;
1708
1724
  const c = () => {
1709
1725
  clearTimeout(a);
1710
- const d = this.pillTooltips.get(o);
1726
+ const d = this.pillTooltips.get(l);
1711
1727
  d && d.classList.remove("ml__pill-tooltip--visible"), r = window.setTimeout(() => {
1712
- s.classList.add("ml__pill-tooltip--visible"), this.positionPillTooltip(e, s, n);
1728
+ o.classList.add("ml__pill-tooltip--visible"), this.positionPillTooltip(e, o, n);
1713
1729
  }, this.options.pillTooltipDelay || 300);
1714
1730
  }, p = () => {
1715
1731
  clearTimeout(r), a = window.setTimeout(() => {
1716
- s.classList.remove("ml__pill-tooltip--visible"), this.cleanupPillTooltip(n);
1732
+ o.classList.remove("ml__pill-tooltip--visible"), this.cleanupPillTooltip(n);
1717
1733
  }, 100);
1718
1734
  };
1719
1735
  e.addEventListener("mouseenter", c), e.addEventListener("mouseleave", p);
1720
1736
  }
1721
- positionPillTooltip(e, t, o) {
1722
- const s = q(e, t, () => {
1737
+ positionPillTooltip(e, t, l) {
1738
+ const o = q(e, t, () => {
1723
1739
  ee(e, t, {
1724
1740
  placement: this.options.pillTooltipPlacement || "top",
1725
1741
  strategy: "fixed",
@@ -1728,11 +1744,11 @@ ${m}` : d, console.log(`[Tooltips] Using default content: "${l}"`);
1728
1744
  me(),
1729
1745
  Q({ padding: 8 })
1730
1746
  ]
1731
- }).then(({ x: l, y: n }) => {
1747
+ }).then(({ x: s, y: n }) => {
1732
1748
  Object.assign(t.style, {
1733
- left: `${l}px`,
1749
+ left: `${s}px`,
1734
1750
  top: `${n}px`
1735
- }), console.log(`[Tooltips] Positioned tooltip "${o}" at x:${l}, y:${n}`, {
1751
+ }), console.log(`[Tooltips] Positioned tooltip "${l}" at x:${s}, y:${n}`, {
1736
1752
  placement: this.options.pillTooltipPlacement || "top",
1737
1753
  tooltipClasses: t.className,
1738
1754
  tooltipDisplay: window.getComputedStyle(t).display,
@@ -1743,7 +1759,7 @@ ${m}` : d, console.log(`[Tooltips] Using default content: "${l}"`);
1743
1759
  });
1744
1760
  });
1745
1761
  });
1746
- this.pillTooltipCleanups.set(o, s);
1762
+ this.pillTooltipCleanups.set(l, o);
1747
1763
  }
1748
1764
  cleanupPillTooltip(e) {
1749
1765
  const t = this.pillTooltipCleanups.get(e);
@@ -1759,49 +1775,49 @@ ${m}` : d, console.log(`[Tooltips] Using default content: "${l}"`);
1759
1775
  this.destroyAllPillTooltips(), this.dropdownCleanup && this.dropdownCleanup(), this.hintCleanup && this.hintCleanup(), this.selectedPopoverCleanup && this.selectedPopoverCleanup(), this.dropdown && this.dropdown.remove(), this.hint && this.hint.remove(), this.selectedPopover && this.selectedPopover.remove(), this.element.innerHTML = "", this.element.classList.remove("ml", "ml--open", "ml--no-checkboxes"), console.log("[MultiSelect] Destroyed");
1760
1776
  }
1761
1777
  }
1762
- const Nt = '@charset "UTF-8";multi-select:not(:defined){display:block;min-height:2.5rem;color:transparent!important;background:transparent}.ml-wrapper{display:flex;flex-direction:column;align-items:stretch}.ml-wrapper--inline{flex-direction:row;align-items:flex-start}.ml{position:relative;width:100%}.ml__input-wrapper{position:relative;display:flex;align-items:center}.ml__input{width:100%;padding:var(--ml-input-padding, .5rem .75rem);padding-right:var(--ml-input-padding-right, 2.5rem);font-size:var(--ml-input-font-size, .875rem);border:var(--ml-input-border-style, 1px solid #d1d5db);border-radius:var(--ml-input-border-radius, .375rem);background:var(--ml-input-bg, #ffffff);color:var(--ml-input-text, #111827);transition:border-color var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__input:focus{outline:none;border-color:var(--ml-input-focus-border-color, #3b82f6)}.ml__input::placeholder{color:var(--ml-input-placeholder-color, #6b7280);opacity:0;transition:opacity var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}:host([data-ready]) .ml__input::placeholder{opacity:var(--ml-placeholder-opacity, .6)}.ml__toggle{position:absolute;right:var(--ml-toggle-right, .75rem);top:50%;transform:var(--ml-transform-center-y, translateY(-50%));pointer-events:none;color:var(--ml-toggle-color, #6b7280);transition:transform var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml--open .ml__toggle{transform:var(--ml-transform-center-y, translateY(-50%)) rotate(var(--ml-transform-rotate-180, 180deg))}.ml__count-badge{position:absolute;right:var(--ml-count-badge-offset, 2rem);top:50%;transform:var(--ml-transform-center-y, translateY(-50%));padding:var(--ml-count-badge-padding, .125rem .25rem);background:var(--ml-count-badge-bg, #3b82f6);color:var(--ml-count-badge-color, #ffffff);font-size:var(--ml-count-badge-font-size, .75rem);font-weight:var(--ml-count-badge-font-weight, 600);border-radius:var(--ml-count-badge-border-radius, .25rem);cursor:pointer;transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-badge:hover{background:var(--ml-count-badge-bg-hover, #2563eb);transform:var(--ml-transform-center-y, translateY(-50%)) scale(var(--ml-transform-scale-hover, 1.1))}.ml__hint{display:none;position:absolute;z-index:var(--ml-z-index-popover, 10000);padding:var(--ml-hint-padding, .5rem .75rem);background:var(--ml-hint-bg, #ffffff);border:var(--ml-hint-border, 1px solid #e5e7eb);border-radius:var(--ml-hint-border-radius, .375rem);box-shadow:var(--ml-hint-box-shadow, 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1));font-size:var(--ml-hint-font-size, .75rem);color:var(--ml-hint-color, #6b7280);line-height:var(--ml-line-height-relaxed, 1.4);max-width:100%}.ml__hint--visible{display:block}.ml__dropdown{display:none;position:absolute;z-index:var(--ml-z-index-dropdown, 9999);background:var(--ml-dropdown-bg, #ffffff);border:var(--ml-dropdown-border, 1px solid #e5e7eb);border-radius:var(--ml-dropdown-border-radius, .375rem);box-shadow:var(--ml-dropdown-box-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1));max-height:var(--ml-dropdown-max-height, 20rem);overflow-y:auto;color:var(--ml-dropdown-color, #111827)}.ml__dropdown--visible{display:block}.ml__actions{display:flex;gap:var(--ml-actions-gap, .25rem);padding:var(--ml-actions-padding, .5rem);border-bottom:var(--ml-actions-border-bottom, 1px solid #e5e7eb)}.ml__actions--sticky{position:sticky;top:0;z-index:var(--ml-z-index-sticky, 1);background:var(--ml-actions-bg, #ffffff)}.ml__action-btn{flex:1;padding:var(--ml-action-btn-padding, .25rem .5rem);font-size:var(--ml-action-btn-font-size, .75rem);border:var(--ml-action-btn-border, 1px solid #e5e7eb);border-radius:var(--ml-action-btn-border-radius, .25rem);background:var(--ml-action-btn-bg, transparent);color:var(--ml-action-btn-color, inherit);cursor:pointer;transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__action-btn:hover{background:var(--ml-action-btn-bg-hover, #f3f4f6);border-color:var(--ml-action-btn-border-color-hover, #3b82f6)}.ml__action-btn:active{transform:scale(var(--ml-transform-scale-active, .98))}.ml__options{padding:var(--ml-options-padding, .25rem 0)}.ml__group+.ml__group{border-top:var(--ml-group-border-top, 1px solid #e5e7eb);margin-top:var(--ml-group-margin-top, .25rem);padding-top:var(--ml-group-padding-top, .25rem)}.ml__group-label{padding:var(--ml-group-label-padding, .25rem .75rem);font-size:var(--ml-group-label-font-size, .75rem);font-weight:var(--ml-group-label-font-weight, 600);color:var(--ml-group-label-color, #6b7280);text-transform:var(--ml-group-label-transform, uppercase);letter-spacing:var(--ml-group-label-letter-spacing, .05em)}.ml__option{display:flex;align-items:flex-start;gap:var(--ml-option-gap, .5rem);padding:var(--ml-option-padding, .5rem .75rem);cursor:pointer;transition:background-color var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__option:hover{background:var(--ml-option-bg-hover, #f9fafb)}.ml__option--focused{background:var(--ml-option-bg-focused, #f9fafb);outline:var(--ml-option-outline-focused, 2px solid #3b82f6);outline-offset:var(--ml-option-focus-outline-offset, -2px)}.ml__option--selected{background:var(--ml-option-bg-selected, rgba(59, 130, 246, .1))}.ml__option--disabled{opacity:var(--ml-disabled-opacity, .5);cursor:not-allowed}.ml__option--disabled:hover{background:var(--ml-option-bg, transparent)}.ml__checkbox{flex-shrink:0;margin-top:var(--ml-checkbox-margin-top, .125rem);cursor:pointer}.ml__option--disabled .ml__checkbox{cursor:not-allowed}.ml__option-content{flex:1;display:flex;align-items:flex-start;gap:var(--ml-option-content-gap, .5rem);min-width:0}.ml__option-icon{flex-shrink:0;width:var(--ml-option-icon-size, 1.25rem);height:var(--ml-option-icon-size, 1.25rem);display:flex;align-items:center;justify-content:center;font-size:var(--ml-option-icon-font-size, 1rem)}.ml__option-icon svg{width:100%;height:100%;fill:currentColor}.ml__option-text{flex:1;min-width:0}.ml__option-title{font-size:var(--ml-option-title-font-size, .875rem);color:var(--ml-option-title-color, inherit);line-height:var(--ml-line-height-relaxed, 1.4)}.ml__option-title mark{background:var(--ml-option-mark-bg, rgba(59, 130, 246, .2));color:var(--ml-option-mark-color, inherit);font-weight:var(--ml-option-mark-font-weight, 600)}.ml__option-subtitle{margin-top:var(--ml-option-subtitle-margin-top, .25rem);font-size:var(--ml-option-subtitle-font-size, .75rem);color:var(--ml-option-subtitle-color, #6b7280);line-height:var(--ml-option-subtitle-line-height, 1.3)}.ml__empty{padding:var(--ml-empty-padding, 1rem .75rem);text-align:center;font-size:var(--ml-empty-font-size, .875rem);color:var(--ml-empty-color, #6b7280)}.ml__loader{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--ml-loader-padding, 1rem);gap:var(--ml-loader-gap, .5rem)}.ml__loading-text{font-size:var(--ml-loading-text-font-size, .875rem);color:var(--ml-loading-text-color, #6b7280)}.ml__pills{display:flex;flex-wrap:wrap;gap:var(--ml-pills-gap, .5rem);padding:0}.ml__pills:empty{display:none}.ml__pills--bottom{margin-top:var(--ml-pills-margin-bottom, .5rem)}.ml__pills--top{margin-bottom:var(--ml-pills-margin-top, .5rem);order:var(--ml-order-first, -1)}.ml__pills--left{order:var(--ml-order-first, -1);margin-right:var(--ml-pills-margin-left, .5rem);justify-content:flex-start}.ml__pills--right{margin-left:var(--ml-pills-margin-right, .5rem);justify-content:flex-end}.ml__count-display{display:flex;align-items:center}.ml__count-display:empty{display:none}.ml__count-display--bottom{margin-top:var(--ml-count-display-margin-bottom, .5rem)}.ml__count-display--top{margin-bottom:var(--ml-count-display-margin-top, .5rem);order:var(--ml-order-first, -1)}.ml__count-display--left{order:var(--ml-order-first, -1);margin-right:var(--ml-count-display-margin-left, .5rem);justify-content:flex-start}.ml__count-display--right{margin-left:var(--ml-count-display-margin-right, .5rem);justify-content:flex-end}.ml__count-badge-wrapper{display:inline-flex;align-items:center;gap:var(--ml-count-badge-wrapper-gap, .25rem);background:var(--ml-count-badge-wrapper-bg, transparent);border:var(--ml-count-badge-wrapper-border, 1px solid #e5e7eb);border-radius:var(--ml-count-badge-wrapper-border-radius, .25rem);padding:var(--ml-count-badge-wrapper-padding, .25rem .5rem);transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-badge-wrapper:hover{background:var(--ml-count-badge-wrapper-bg-hover, #f9fafb);border-color:var(--ml-count-badge-wrapper-border-color-hover, #3b82f6)}.ml__count-text{display:inline-flex;align-items:center;background:var(--ml-count-text-bg, transparent);border:var(--ml-count-text-border, none);padding:0;font-size:var(--ml-count-text-font-size, .875rem);color:var(--ml-count-text-color, #111827);cursor:pointer;transition:color var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:var(--ml-count-clear-size, 1rem);height:var(--ml-count-clear-size, 1rem);padding:0;border:none;background:var(--ml-count-clear-bg, transparent);color:var(--ml-count-clear-color, #6b7280);font-size:var(--ml-count-clear-font-size, 1.125rem);line-height:var(--ml-line-height-none, 1);cursor:pointer;border-radius:var(--ml-count-clear-border-radius, 50%);transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-clear:hover{background:var(--ml-count-clear-bg-hover, rgba(59, 130, 246, .2));color:var(--ml-count-clear-color-hover, #3b82f6)}.ml__count-clear:before{content:var(--ml-icon-clear, "×")}.ml__pill{display:inline-flex;align-items:center;height:var(--ml-pill-height, 1.5rem);font-size:var(--ml-pill-font-size, .75rem);font-weight:var(--ml-pill-font-weight, 600);line-height:var(--ml-line-height-none, 1);border-radius:var(--ml-pill-border-radius, .375rem);overflow:hidden;max-width:100%}.ml__pill-text{display:flex;align-items:center;height:100%;padding:var(--ml-pill-text-padding, 0 .5rem);background:var(--ml-pill-text-bg, #eff6ff);color:var(--ml-pill-text-color, #3b82f6);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:background-color var(--ml-transition-normal, .2s) ease}.ml__pill-remove{display:flex;align-items:center;justify-content:center;width:var(--ml-pill-remove-width, 1.5rem);height:100%;flex-shrink:0;background:var(--ml-pill-remove-bg, #3b82f6);color:var(--ml-pill-remove-color, #ffffff);border:var(--ml-pill-remove-border, none);cursor:pointer;transition:background-color var(--ml-transition-normal, .2s) ease;font-size:var(--ml-pill-remove-font-size, .75rem)}.ml__pill-remove:hover{background:var(--ml-pill-remove-bg-hover, #2563eb)}.ml__pill-remove:focus{outline:none;box-shadow:var(--ml-pill-remove-box-shadow-focus, 0 0 0 2px rgba(59, 130, 246, .5))}.ml__pill-remove:before{content:var(--ml-icon-remove, "×");font-size:var(--ml-font-size-base, 1rem);line-height:var(--ml-line-height-none, 1)}.ml__pill--more{cursor:pointer}.ml__pill--more .ml__pill-text{background:var(--ml-more-badge-bg, #eff6ff);font-weight:var(--ml-pill-font-weight, 600)}.ml__pill--more:hover .ml__pill-text{background:var(--ml-more-badge-hover-bg, #ffffff)}.ml__pill--more:active .ml__pill-text{background:var(--ml-more-badge-active-bg, #e0f2fe)}.ml__pill-tooltip{position:fixed;z-index:var(--ml-tooltip-z-index, 10000);opacity:0;visibility:hidden;transition:opacity var(--ml-transition-normal, .2s) ease,visibility var(--ml-transition-normal, .2s) ease;background:var(--ml-tooltip-bg, #333);color:var(--ml-tooltip-color, #fff);padding:var(--ml-tooltip-padding, .5rem .75rem);border-radius:var(--ml-tooltip-border-radius, .375rem);font-size:var(--ml-tooltip-font-size, .875rem);line-height:var(--ml-line-height-relaxed, 1.4);max-width:var(--ml-tooltip-max-width, 20rem);word-wrap:break-word;white-space:pre-wrap;box-shadow:var(--ml-tooltip-shadow, 0 2px 8px rgba(0, 0, 0, .15));pointer-events:none}.ml__pill-tooltip--visible{opacity:1;visibility:visible}.ml__selected-popover{display:none;position:absolute;z-index:var(--ml-z-index-popover, 10000);background:var(--ml-selected-popover-bg, #ffffff);border:var(--ml-selected-popover-border, 1px solid #e5e7eb);border-radius:var(--ml-selected-popover-border-radius, .375rem);box-shadow:var(--ml-selected-popover-box-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1));width:var(--ml-selected-popover-width, 20rem);max-height:var(--ml-selected-popover-max-height, 20rem);overflow:hidden}.ml__selected-popover--visible{display:flex;flex-direction:column}.ml__selected-popover-header{display:flex;align-items:center;justify-content:space-between;padding:var(--ml-selected-popover-header-padding, .5rem .75rem);background:var(--ml-selected-popover-header-bg, rgba(59, 130, 246, .1));border-bottom:var(--ml-selected-popover-header-border-bottom, 1px solid #e5e7eb);font-size:var(--ml-selected-popover-header-font-size, .875rem);font-weight:var(--ml-selected-popover-header-font-weight, 600);color:var(--ml-selected-popover-header-color, #111827)}.ml__selected-popover-close{display:flex;align-items:center;justify-content:center;width:var(--ml-popover-close-size, 1.5rem);height:var(--ml-popover-close-size, 1.5rem);padding:0;border:none;background:var(--ml-selected-popover-close-bg, transparent);color:var(--ml-selected-popover-close-color, #6b7280);font-size:var(--ml-selected-popover-close-font-size, 1.25rem);line-height:var(--ml-line-height-none, 1);cursor:pointer;border-radius:var(--ml-selected-popover-close-border-radius, 50%);transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__selected-popover-close:hover{background:var(--ml-selected-popover-close-bg-hover, rgba(59, 130, 246, .2));color:var(--ml-selected-popover-close-color-hover, #3b82f6)}.ml__selected-popover-body{display:flex;flex-direction:column;gap:var(--ml-selected-popover-body-gap, .25rem);padding:var(--ml-selected-popover-body-padding, .5rem);overflow-y:auto;max-height:var(--ml-selected-popover-body-max-height, 18rem)}.ml__selected-popover-body .ml__pill{width:100%}.ml__selected-popover-body .ml__pill-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.ml--xs .ml__input{font-size:var(--ml-font-size-xs, .75rem)}.ml--xs .ml__option{padding:var(--ml-spacing-xs, .25rem) var(--ml-spacing-sm, .5rem)}.ml--xs .ml__option-title{font-size:var(--ml-font-size-xs, .75rem)}.ml--xs .ml__pill{font-size:var(--ml-font-size-2xs, .625rem)}.ml--sm .ml__input,.ml--sm .ml__option-title{font-size:var(--ml-font-size-xs, .75rem)}.ml--lg .ml__input,.ml--lg .ml__option-title{font-size:var(--ml-font-size-base, 1rem)}.ml--lg .ml__pill{font-size:var(--ml-font-size-sm, .875rem)}.ml--xl .ml__input,.ml--xl .ml__option-title{font-size:var(--ml-font-size-lg, 1.125rem)}.ml--xl .ml__pill{font-size:var(--ml-font-size-base, 1rem)}.ml--disabled .ml__input{opacity:var(--ml-disabled-input-opacity, .6);cursor:not-allowed;background:var(--ml-input-bg-disabled, rgba(107, 114, 128, .05))}.ml--disabled .ml__toggle{opacity:var(--ml-disabled-input-opacity, .6)}.ml--no-checkboxes .ml__option{gap:0;padding-left:var(--ml-option-padding-h, .75rem)}.ml--no-checkboxes .ml__option-content{padding-left:0}.ml-debug-info{margin-top:.25rem;padding:.25rem;background-color:#f9fafb;border:1px solid #e5e7eb;border-radius:.375rem;font-size:.75rem;color:#111827}.ml-debug-info details summary{cursor:pointer;font-weight:600;color:#2563eb;-webkit-user-select:none;user-select:none;padding:.25rem;border-radius:.25rem}.ml-debug-info details summary:hover{background-color:#f3f4f6}.ml-debug-info details summary:focus{outline:2px solid #3b82f6;outline-offset:2px}.ml-debug-info .ml-debug-stats{display:flex;flex-direction:column;gap:.25rem;margin-top:.25rem;padding:.25rem;background-color:#fff;border-radius:.25rem}.ml-debug-info .ml-debug-stats span{display:flex;justify-content:space-between;padding:2px 4px;font-family:monospace;font-size:.625rem}.ml-debug-info .ml-debug-stats span:before{content:"•";margin-right:.25rem;color:#3b82f6}', Rt = typeof HTMLElement < "u" ? HTMLElement : class {
1778
+ const Rt = '@charset "UTF-8";multi-select:not(:defined){display:block;min-height:2.5rem;color:transparent!important;background:transparent}.ml-wrapper{display:flex;flex-direction:column;align-items:stretch}.ml-wrapper--inline{flex-direction:row;align-items:flex-start}.ml{position:relative;width:100%}.ml__input-wrapper{position:relative;display:flex;align-items:center}.ml__input{width:100%;padding:var(--ml-input-padding, .5rem .75rem);padding-right:var(--ml-input-padding-right, 2.5rem);font-size:var(--ml-input-font-size, .875rem);border:var(--ml-input-border-style, 1px solid #d1d5db);border-radius:var(--ml-input-border-radius, .375rem);background:var(--ml-input-bg, #ffffff);color:var(--ml-input-text, #111827);cursor:pointer;transition:border-color var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__input:focus{outline:none;border-color:var(--ml-input-focus-border-color, #3b82f6)}.ml__input::placeholder{color:var(--ml-input-placeholder-color, #6b7280);opacity:0;transition:opacity var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}:host([data-ready]) .ml__input::placeholder{opacity:var(--ml-placeholder-opacity, .6)}.ml__toggle{position:absolute;right:var(--ml-toggle-right, .75rem);top:50%;transform:var(--ml-transform-center-y, translateY(-50%));pointer-events:none;color:var(--ml-toggle-color, #6b7280);transition:transform var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml--open .ml__toggle{transform:var(--ml-transform-center-y, translateY(-50%)) rotate(var(--ml-transform-rotate-180, 180deg))}.ml__count-badge{position:absolute;right:var(--ml-count-badge-offset, 2rem);top:50%;transform:var(--ml-transform-center-y, translateY(-50%));padding:var(--ml-count-badge-padding, .125rem .25rem);background:var(--ml-count-badge-bg, #3b82f6);color:var(--ml-count-badge-color, #ffffff);font-size:var(--ml-count-badge-font-size, .75rem);font-weight:var(--ml-count-badge-font-weight, 600);border-radius:var(--ml-count-badge-border-radius, .25rem);cursor:pointer;transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-badge:hover{background:var(--ml-count-badge-bg-hover, #2563eb);transform:var(--ml-transform-center-y, translateY(-50%)) scale(var(--ml-transform-scale-hover, 1.1))}.ml__hint{display:none;position:absolute;z-index:var(--ml-z-index-popover, 10000);padding:var(--ml-hint-padding, .5rem .75rem);background:var(--ml-hint-bg, #ffffff);border:var(--ml-hint-border, 1px solid #e5e7eb);border-radius:var(--ml-hint-border-radius, .375rem);box-shadow:var(--ml-hint-box-shadow, 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1));font-size:var(--ml-hint-font-size, .75rem);color:var(--ml-hint-color, #6b7280);line-height:var(--ml-line-height-relaxed, 1.4);max-width:100%}.ml__hint--visible{display:block}.ml__dropdown{display:none;position:absolute;z-index:var(--ml-z-index-dropdown, 9999);background:var(--ml-dropdown-bg, #ffffff);border:var(--ml-dropdown-border, 1px solid #e5e7eb);border-radius:var(--ml-dropdown-border-radius, .375rem);box-shadow:var(--ml-dropdown-box-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1));max-height:var(--ml-dropdown-max-height, 20rem);overflow-y:auto;color:var(--ml-dropdown-color, #111827)}.ml__dropdown--visible{display:block}.ml__actions{display:flex;gap:var(--ml-actions-gap, .25rem);padding:var(--ml-actions-padding, .5rem);border-bottom:var(--ml-actions-border-bottom, 1px solid #e5e7eb)}.ml__actions--sticky{position:sticky;top:0;z-index:var(--ml-z-index-sticky, 1);background:var(--ml-actions-bg, #ffffff)}.ml__action-btn{flex:1;padding:var(--ml-action-btn-padding, .25rem .5rem);font-size:var(--ml-action-btn-font-size, .75rem);border:var(--ml-action-btn-border, 1px solid #e5e7eb);border-radius:var(--ml-action-btn-border-radius, .25rem);background:var(--ml-action-btn-bg, transparent);color:var(--ml-action-btn-color, inherit);cursor:pointer;transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__action-btn:hover{background:var(--ml-action-btn-bg-hover, #f3f4f6);border-color:var(--ml-action-btn-border-color-hover, #3b82f6)}.ml__action-btn:active{transform:scale(var(--ml-transform-scale-active, .98))}.ml__options{padding:var(--ml-options-padding, .25rem 0)}.ml__group+.ml__group{border-top:var(--ml-group-border-top, 1px solid #e5e7eb);margin-top:var(--ml-group-margin-top, .25rem);padding-top:var(--ml-group-padding-top, .25rem)}.ml__group-label{padding:var(--ml-group-label-padding, .25rem .75rem);font-size:var(--ml-group-label-font-size, .75rem);font-weight:var(--ml-group-label-font-weight, 600);color:var(--ml-group-label-color, #6b7280);text-transform:var(--ml-group-label-transform, uppercase);letter-spacing:var(--ml-group-label-letter-spacing, .05em)}.ml__option{display:flex;align-items:flex-start;gap:var(--ml-option-gap, .5rem);padding:var(--ml-option-padding, .5rem .75rem);cursor:pointer;transition:background-color var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__option:hover{background:var(--ml-option-bg-hover, #f9fafb)}.ml__option--focused{background:var(--ml-option-bg-focused, #f9fafb);outline:var(--ml-option-outline-focused, 2px solid #3b82f6);outline-offset:var(--ml-option-focus-outline-offset, -2px)}.ml__option--selected{background:var(--ml-option-bg-selected, rgba(59, 130, 246, .1))}.ml__option--disabled{opacity:var(--ml-disabled-opacity, .5);cursor:not-allowed}.ml__option--disabled:hover{background:var(--ml-option-bg, transparent)}.ml__checkbox{flex-shrink:0;margin-top:var(--ml-checkbox-margin-top, .125rem);cursor:pointer}.ml__option--disabled .ml__checkbox{cursor:not-allowed}.ml__option-content{flex:1;display:flex;align-items:flex-start;gap:var(--ml-option-content-gap, .5rem);min-width:0}.ml__option-icon{flex-shrink:0;width:var(--ml-option-icon-size, 1.25rem);height:var(--ml-option-icon-size, 1.25rem);display:flex;align-items:center;justify-content:center;font-size:var(--ml-option-icon-font-size, 1rem)}.ml__option-icon svg{width:100%;height:100%;fill:currentColor}.ml__option-text{flex:1;min-width:0}.ml__option-title{font-size:var(--ml-option-title-font-size, .875rem);color:var(--ml-option-title-color, inherit);line-height:var(--ml-line-height-relaxed, 1.4)}.ml__option-title mark{background:var(--ml-option-mark-bg, rgba(59, 130, 246, .2));color:var(--ml-option-mark-color, inherit);font-weight:var(--ml-option-mark-font-weight, 600)}.ml__option-subtitle{margin-top:var(--ml-option-subtitle-margin-top, .25rem);font-size:var(--ml-option-subtitle-font-size, .75rem);color:var(--ml-option-subtitle-color, #6b7280);line-height:var(--ml-option-subtitle-line-height, 1.3)}.ml__empty{padding:var(--ml-empty-padding, 1rem .75rem);text-align:center;font-size:var(--ml-empty-font-size, .875rem);color:var(--ml-empty-color, #6b7280)}.ml__loader{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--ml-loader-padding, 1rem);gap:var(--ml-loader-gap, .5rem)}.ml__loading-text{font-size:var(--ml-loading-text-font-size, .875rem);color:var(--ml-loading-text-color, #6b7280)}.ml__pills{display:flex;flex-wrap:wrap;gap:var(--ml-pills-gap, .5rem);padding:0}.ml__pills:empty{display:none}.ml__pills--bottom{margin-top:var(--ml-pills-margin-bottom, .5rem)}.ml__pills--top{margin-bottom:var(--ml-pills-margin-top, .5rem);order:var(--ml-order-first, -1)}.ml__pills--left{order:var(--ml-order-first, -1);margin-right:var(--ml-pills-margin-left, .25rem);justify-content:flex-end}.ml__pills--right{margin-left:var(--ml-pills-margin-right, .25rem);justify-content:flex-start}.ml__count-display{display:flex;align-items:center}.ml__count-display:empty{display:none}.ml__count-display--bottom{margin-top:var(--ml-count-display-margin-bottom, .5rem)}.ml__count-display--top{margin-bottom:var(--ml-count-display-margin-top, .5rem);order:var(--ml-order-first, -1)}.ml__count-display--left{order:var(--ml-order-first, -1);margin-right:var(--ml-count-display-margin-left, .5rem);justify-content:flex-start}.ml__count-display--right{margin-left:var(--ml-count-display-margin-right, .5rem);justify-content:flex-end}.ml__count-badge-wrapper{display:inline-flex;align-items:center;gap:var(--ml-count-badge-wrapper-gap, .25rem);background:var(--ml-count-badge-wrapper-bg, transparent);border:var(--ml-count-badge-wrapper-border, 1px solid #e5e7eb);border-radius:var(--ml-count-badge-wrapper-border-radius, .25rem);padding:var(--ml-count-badge-wrapper-padding, .25rem .5rem);transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-badge-wrapper:hover{background:var(--ml-count-badge-wrapper-bg-hover, #f9fafb);border-color:var(--ml-count-badge-wrapper-border-color-hover, #3b82f6)}.ml__count-text{display:inline-flex;align-items:center;background:var(--ml-count-text-bg, transparent);border:var(--ml-count-text-border, none);padding:0;font-size:var(--ml-count-text-font-size, .875rem);color:var(--ml-count-text-color, #111827);cursor:pointer;transition:color var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:var(--ml-count-clear-size, 1rem);height:var(--ml-count-clear-size, 1rem);padding:0;border:none;background:var(--ml-count-clear-bg, transparent);color:var(--ml-count-clear-color, #6b7280);font-size:var(--ml-count-clear-font-size, 1.125rem);line-height:var(--ml-line-height-none, 1);cursor:pointer;border-radius:var(--ml-count-clear-border-radius, 50%);transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__count-clear:hover{background:var(--ml-count-clear-bg-hover, rgba(59, 130, 246, .2));color:var(--ml-count-clear-color-hover, #3b82f6)}.ml__count-clear:before{content:var(--ml-icon-clear, "×")}.ml__pill{display:inline-flex;align-items:center;height:var(--ml-pill-height, 1.5rem);font-size:var(--ml-pill-font-size, .75rem);font-weight:var(--ml-pill-font-weight, 600);line-height:var(--ml-line-height-none, 1);border-radius:var(--ml-pill-border-radius, .375rem);overflow:hidden;max-width:100%}.ml__pill-text{display:flex;align-items:center;height:100%;padding:var(--ml-pill-text-padding, 0 .5rem);background:var(--ml-pill-text-bg, #eff6ff);color:var(--ml-pill-text-color, #3b82f6);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:background-color var(--ml-transition-normal, .2s) ease}.ml__pill-remove{display:flex;align-items:center;justify-content:center;width:var(--ml-pill-remove-width, 1.5rem);height:100%;flex-shrink:0;background:var(--ml-pill-remove-bg, #3b82f6);color:var(--ml-pill-remove-color, #ffffff);border:var(--ml-pill-remove-border, none);cursor:pointer;transition:background-color var(--ml-transition-normal, .2s) ease;font-size:var(--ml-pill-remove-font-size, .75rem)}.ml__pill-remove:hover{background:var(--ml-pill-remove-bg-hover, #2563eb)}.ml__pill-remove:focus{outline:none;box-shadow:var(--ml-pill-remove-box-shadow-focus, 0 0 0 2px rgba(59, 130, 246, .5))}.ml__pill-remove:before{content:var(--ml-icon-remove, "×");font-size:var(--ml-font-size-base, 1rem);line-height:var(--ml-line-height-none, 1)}.ml__pill--more{cursor:pointer}.ml__pill--more .ml__pill-text{background:var(--ml-more-badge-bg, #eff6ff);font-weight:var(--ml-pill-font-weight, 600)}.ml__pill--more:hover .ml__pill-text{background:var(--ml-more-badge-hover-bg, #ffffff)}.ml__pill--more:active .ml__pill-text{background:var(--ml-more-badge-active-bg, #e0f2fe)}.ml__pill-tooltip{position:fixed;z-index:var(--ml-tooltip-z-index, 10000);opacity:0;visibility:hidden;transition:opacity var(--ml-transition-normal, .2s) ease,visibility var(--ml-transition-normal, .2s) ease;background:var(--ml-tooltip-bg, #333);color:var(--ml-tooltip-color, #fff);padding:var(--ml-tooltip-padding, .5rem .75rem);border-radius:var(--ml-tooltip-border-radius, .375rem);font-size:var(--ml-tooltip-font-size, .875rem);line-height:var(--ml-line-height-relaxed, 1.4);max-width:var(--ml-tooltip-max-width, 20rem);word-wrap:break-word;white-space:pre-wrap;box-shadow:var(--ml-tooltip-shadow, 0 2px 8px rgba(0, 0, 0, .15));pointer-events:none}.ml__pill-tooltip--visible{opacity:1;visibility:visible}.ml__selected-popover{display:none;position:absolute;z-index:var(--ml-z-index-popover, 10000);background:var(--ml-selected-popover-bg, #ffffff);border:var(--ml-selected-popover-border, 1px solid #e5e7eb);border-radius:var(--ml-selected-popover-border-radius, .375rem);box-shadow:var(--ml-selected-popover-box-shadow, 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1));width:var(--ml-selected-popover-width, 20rem);max-height:var(--ml-selected-popover-max-height, 20rem);overflow:hidden}.ml__selected-popover--visible{display:flex;flex-direction:column}.ml__selected-popover-header{display:flex;align-items:center;justify-content:space-between;padding:var(--ml-selected-popover-header-padding, .5rem .75rem);background:var(--ml-selected-popover-header-bg, rgba(59, 130, 246, .1));border-bottom:var(--ml-selected-popover-header-border-bottom, 1px solid #e5e7eb);font-size:var(--ml-selected-popover-header-font-size, .875rem);font-weight:var(--ml-selected-popover-header-font-weight, 600);color:var(--ml-selected-popover-header-color, #111827)}.ml__selected-popover-close{display:flex;align-items:center;justify-content:center;width:var(--ml-popover-close-size, 1.5rem);height:var(--ml-popover-close-size, 1.5rem);padding:0;border:none;background:var(--ml-selected-popover-close-bg, transparent);color:var(--ml-selected-popover-close-color, #6b7280);font-size:var(--ml-selected-popover-close-font-size, 1.25rem);line-height:var(--ml-line-height-none, 1);cursor:pointer;border-radius:var(--ml-selected-popover-close-border-radius, 50%);transition:all var(--ml-transition-fast, .15s) var(--ml-easing-snappy, cubic-bezier(.4, 0, .2, 1))}.ml__selected-popover-close:hover{background:var(--ml-selected-popover-close-bg-hover, rgba(59, 130, 246, .2));color:var(--ml-selected-popover-close-color-hover, #3b82f6)}.ml__selected-popover-body{display:flex;flex-direction:column;gap:var(--ml-selected-popover-body-gap, .25rem);padding:var(--ml-selected-popover-body-padding, .5rem);overflow-y:auto;max-height:var(--ml-selected-popover-body-max-height, 18rem)}.ml__selected-popover-body .ml__pill{width:100%}.ml__selected-popover-body .ml__pill-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.ml--rtl .ml__input-wrapper{direction:rtl}.ml--rtl .ml__input{text-align:right;padding-left:var(--ml-input-padding-right, 2.5rem);padding-right:var(--ml-input-padding-h, .75rem)}.ml--rtl .ml__toggle{left:var(--ml-toggle-right, .75rem)!important;right:auto!important}.ml--rtl .ml__count-badge{left:var(--ml-count-badge-offset, 2rem)!important;right:auto!important}.ml--rtl .ml__dropdown{direction:rtl;text-align:right}.ml--rtl .ml__option{flex-direction:row-reverse}.ml--rtl .ml__checkbox{margin-left:var(--ml-spacing-sm, .5rem);margin-right:0}.ml--rtl .ml__option-content{text-align:right}.ml--rtl .ml__option-icon{margin-left:var(--ml-spacing-xs, .25rem);margin-right:0}.ml--rtl .ml__pills{direction:rtl}.ml--rtl .ml__pill{flex-direction:row-reverse}.ml--rtl .ml__pill-remove{border-radius:var(--ml-pill-remove-border-radius-rtl, .375rem) 0 0 var(--ml-pill-remove-border-radius-rtl, .375rem);border-left:var(--ml-pill-remove-border, none);border-right:none}.ml--rtl .ml__pill-text{border-radius:0 var(--ml-pill-text-border-radius-rtl, .375rem) var(--ml-pill-text-border-radius-rtl, .375rem) 0}.ml--rtl .ml__count-display{direction:rtl}.ml--rtl .ml__count-badge-wrapper{flex-direction:row-reverse}.ml--rtl .ml__selected-popover{direction:rtl;text-align:right}.ml--rtl .ml__actions{direction:rtl}.ml--rtl .ml__group-label,.ml--rtl .ml__empty{text-align:right}.ml--rtl .ml__hint{direction:rtl;text-align:right}.ml--xs .ml__input{font-size:var(--ml-font-size-xs, .75rem)}.ml--xs .ml__option{padding:var(--ml-spacing-xs, .25rem) var(--ml-spacing-sm, .5rem)}.ml--xs .ml__option-title{font-size:var(--ml-font-size-xs, .75rem)}.ml--xs .ml__pill{font-size:var(--ml-font-size-2xs, .625rem)}.ml--sm .ml__input,.ml--sm .ml__option-title{font-size:var(--ml-font-size-xs, .75rem)}.ml--lg .ml__input,.ml--lg .ml__option-title{font-size:var(--ml-font-size-base, 1rem)}.ml--lg .ml__pill{font-size:var(--ml-font-size-sm, .875rem)}.ml--xl .ml__input,.ml--xl .ml__option-title{font-size:var(--ml-font-size-lg, 1.125rem)}.ml--xl .ml__pill{font-size:var(--ml-font-size-base, 1rem)}.ml--disabled .ml__input{opacity:var(--ml-disabled-input-opacity, .6);cursor:not-allowed;background:var(--ml-input-bg-disabled, rgba(107, 114, 128, .05))}.ml--disabled .ml__toggle{opacity:var(--ml-disabled-input-opacity, .6)}.ml--no-checkboxes .ml__option{gap:0;padding-left:var(--ml-option-padding-h, .75rem)}.ml--no-checkboxes .ml__option-content{padding-left:0}.ml-debug-info{margin-top:.25rem;padding:.25rem;background-color:#f9fafb;border:1px solid #e5e7eb;border-radius:.375rem;font-size:.75rem;color:#111827}.ml-debug-info details summary{cursor:pointer;font-weight:600;color:#2563eb;-webkit-user-select:none;user-select:none;padding:.25rem;border-radius:.25rem}.ml-debug-info details summary:hover{background-color:#f3f4f6}.ml-debug-info details summary:focus{outline:2px solid #3b82f6;outline-offset:2px}.ml-debug-info .ml-debug-stats{display:flex;flex-direction:column;gap:.25rem;margin-top:.25rem;padding:.25rem;background-color:#fff;border-radius:.25rem}.ml-debug-info .ml-debug-stats span{display:flex;justify-content:space-between;padding:2px 4px;font-family:monospace;font-size:.625rem}.ml-debug-info .ml-debug-stats span:before{content:"•";margin-right:.25rem;color:#3b82f6}', Nt = typeof HTMLElement < "u" ? HTMLElement : class {
1763
1779
  }, be = /* @__PURE__ */ new Set();
1764
1780
  function je() {
1765
1781
  return Array.from(be);
1766
1782
  }
1767
- class Ge extends Rt {
1783
+ class Ge extends Nt {
1768
1784
  constructor() {
1769
1785
  super();
1770
- u(this, "picker");
1771
- u(this, "containerElement");
1772
- u(this, "shadow");
1786
+ h(this, "picker");
1787
+ h(this, "containerElement");
1788
+ h(this, "shadow");
1773
1789
  // Properties for complex data (not attributes)
1774
- u(this, "_options");
1790
+ h(this, "_options");
1775
1791
  // Member/Callback properties
1776
- u(this, "_valueMember");
1777
- u(this, "_getValueCallback");
1778
- u(this, "_displayValueMember");
1779
- u(this, "_getDisplayValueCallback");
1780
- u(this, "_searchValueMember");
1781
- u(this, "_getSearchValueCallback");
1782
- u(this, "_iconMember");
1783
- u(this, "_getIconCallback");
1784
- u(this, "_subtitleMember");
1785
- u(this, "_getSubtitleCallback");
1786
- u(this, "_groupMember");
1787
- u(this, "_getGroupCallback");
1788
- u(this, "_disabledMember");
1789
- u(this, "_getDisabledCallback");
1792
+ h(this, "_valueMember");
1793
+ h(this, "_getValueCallback");
1794
+ h(this, "_displayValueMember");
1795
+ h(this, "_getDisplayValueCallback");
1796
+ h(this, "_searchValueMember");
1797
+ h(this, "_getSearchValueCallback");
1798
+ h(this, "_iconMember");
1799
+ h(this, "_getIconCallback");
1800
+ h(this, "_subtitleMember");
1801
+ h(this, "_getSubtitleCallback");
1802
+ h(this, "_groupMember");
1803
+ h(this, "_getGroupCallback");
1804
+ h(this, "_disabledMember");
1805
+ h(this, "_getDisabledCallback");
1790
1806
  // Value formatting callbacks
1791
- u(this, "_getValueFormatCallback");
1807
+ h(this, "_getValueFormatCallback");
1792
1808
  // Tooltip callbacks
1793
- u(this, "_getPillTooltipCallback");
1809
+ h(this, "_getPillTooltipCallback");
1794
1810
  // Count pill callback
1795
- u(this, "_getCountPillCallback");
1811
+ h(this, "_getCountPillCallback");
1796
1812
  // Event callbacks
1797
- u(this, "_searchCallback");
1798
- u(this, "_addNewCallback");
1799
- u(this, "_selectCallback");
1800
- u(this, "_deselectCallback");
1801
- u(this, "_changeCallback");
1813
+ h(this, "_searchCallback");
1814
+ h(this, "_addNewCallback");
1815
+ h(this, "_selectCallback");
1816
+ h(this, "_deselectCallback");
1817
+ h(this, "_changeCallback");
1802
1818
  this.shadow = this.attachShadow({ mode: "open" });
1803
1819
  const t = document.createElement("style");
1804
- t.textContent = Nt, this.shadow.appendChild(t), requestAnimationFrame(() => {
1820
+ t.textContent = Rt, this.shadow.appendChild(t), requestAnimationFrame(() => {
1805
1821
  this.setAttribute("data-ready", "");
1806
1822
  });
1807
1823
  }
@@ -1857,8 +1873,8 @@ class Ge extends Rt {
1857
1873
  disconnectedCallback() {
1858
1874
  be.delete(this), this.picker && this.picker.destroy();
1859
1875
  }
1860
- attributeChangedCallback(t, o, s) {
1861
- o !== s && this.picker && t !== "initial-values" && (this.picker.destroy(), this.initializePicker());
1876
+ attributeChangedCallback(t, l, o) {
1877
+ l !== o && this.picker && t !== "initial-values" && (this.picker.destroy(), this.initializePicker());
1862
1878
  }
1863
1879
  render() {
1864
1880
  this.containerElement = document.createElement("div"), this.containerElement.setAttribute("data-multiselect", ""), this.className && (this.containerElement.className = this.className), this.shadow.appendChild(this.containerElement), this.getAttribute("show-debug-info") === "true" && this.renderDebugInfo();
@@ -1866,21 +1882,21 @@ class Ge extends Rt {
1866
1882
  renderDebugInfo() {
1867
1883
  const t = this.shadow.querySelector(".ml-debug-info");
1868
1884
  t && t.remove();
1869
- const o = document.createElement("div");
1870
- o.className = "ml-debug-info";
1871
- const s = document.createElement("details"), l = document.createElement("summary");
1872
- l.textContent = "Debug Info";
1885
+ const l = document.createElement("div");
1886
+ l.className = "ml-debug-info";
1887
+ const o = document.createElement("details"), s = document.createElement("summary");
1888
+ s.textContent = "Debug Info";
1873
1889
  const n = document.createElement("div");
1874
- n.className = "ml-debug-stats", s.appendChild(l), s.appendChild(n), o.appendChild(s), this.shadow.appendChild(o), this.updateDebugInfo();
1890
+ n.className = "ml-debug-stats", o.appendChild(s), o.appendChild(n), l.appendChild(o), this.shadow.appendChild(l), this.updateDebugInfo();
1875
1891
  }
1876
1892
  updateDebugInfo() {
1877
- var h, g;
1893
+ var u, g;
1878
1894
  const t = this.shadow.querySelector(".ml-debug-stats");
1879
1895
  if (!t || !this.picker) return;
1880
- const o = "1.0.0-rc02", s = je().length, n = this.picker.getSelected().length, r = ((h = this._options) == null ? void 0 : h.length) || 0, a = this.picker, c = a.isOpen || !1, p = a.searchTerm || "", d = a.isLoading || !1, m = ((g = a.filteredOptions) == null ? void 0 : g.length) || 0;
1896
+ const l = "1.0.0-rc04", o = je().length, n = this.picker.getSelected().length, r = ((u = this._options) == null ? void 0 : u.length) || 0, a = this.picker, c = a.isOpen || !1, p = a.searchTerm || "", d = a.isLoading || !1, m = ((g = a.filteredOptions) == null ? void 0 : g.length) || 0;
1881
1897
  t.innerHTML = `
1882
- <span>Version: ${o}</span>
1883
- <span>Total Instances: ${s}</span>
1898
+ <span>Version: ${l}</span>
1899
+ <span>Total Instances: ${o}</span>
1884
1900
  <span>Options: ${r}</span>
1885
1901
  <span>Filtered: ${m}</span>
1886
1902
  <span>Selected: ${n}</span>
@@ -1894,14 +1910,14 @@ class Ge extends Rt {
1894
1910
  initializePicker() {
1895
1911
  if (!this.containerElement) return;
1896
1912
  let t;
1897
- const o = this.getAttribute("initial-values");
1898
- if (o)
1913
+ const l = this.getAttribute("initial-values");
1914
+ if (l)
1899
1915
  try {
1900
- t = JSON.parse(o);
1901
- } catch (l) {
1902
- console.error("[MultiSelectElement] Failed to parse initial-values:", l);
1916
+ t = JSON.parse(l);
1917
+ } catch (s) {
1918
+ console.error("[MultiSelectElement] Failed to parse initial-values:", s);
1903
1919
  }
1904
- const s = {
1920
+ const o = {
1905
1921
  // String options
1906
1922
  searchHint: this.getAttribute("search-hint") || void 0,
1907
1923
  searchPlaceholder: this.getAttribute("search-placeholder") || "Search...",
@@ -1956,36 +1972,36 @@ class Ge extends Rt {
1956
1972
  pillTooltipDelay: parseInt(this.getAttribute("pill-tooltip-delay") || "300"),
1957
1973
  pillTooltipOffset: parseInt(this.getAttribute("pill-tooltip-offset") || "8"),
1958
1974
  // Count pill callback
1959
- getCountPillCallback: this._getCountPillCallback || ((l, n) => n !== void 0 ? `+${n} more` : `${l} selected`),
1975
+ getCountPillCallback: this._getCountPillCallback || ((s, n) => n !== void 0 ? `+${n} more` : `${s} selected`),
1960
1976
  // Data and callbacks
1961
1977
  options: this._options,
1962
1978
  searchCallback: this._searchCallback,
1963
1979
  addNewCallback: this._addNewCallback,
1964
- selectCallback: (l) => {
1980
+ selectCallback: (s) => {
1965
1981
  var n, r;
1966
- this._selectCallback && this._selectCallback(l), this.dispatchEvent(new CustomEvent("select", {
1982
+ this._selectCallback && this._selectCallback(s), this.dispatchEvent(new CustomEvent("select", {
1967
1983
  detail: {
1968
- option: l,
1984
+ option: s,
1969
1985
  selectedOptions: (n = this.picker) == null ? void 0 : n.getSelected(),
1970
1986
  selectedValues: Array.from(((r = this.picker) == null ? void 0 : r.getValue()) || [])
1971
1987
  }
1972
1988
  }));
1973
1989
  },
1974
- deselectCallback: (l) => {
1990
+ deselectCallback: (s) => {
1975
1991
  var n, r;
1976
- this._deselectCallback && this._deselectCallback(l), this.dispatchEvent(new CustomEvent("deselect", {
1992
+ this._deselectCallback && this._deselectCallback(s), this.dispatchEvent(new CustomEvent("deselect", {
1977
1993
  detail: {
1978
- option: l,
1994
+ option: s,
1979
1995
  selectedOptions: (n = this.picker) == null ? void 0 : n.getSelected(),
1980
1996
  selectedValues: Array.from(((r = this.picker) == null ? void 0 : r.getValue()) || [])
1981
1997
  }
1982
1998
  }));
1983
1999
  },
1984
- changeCallback: (l) => {
2000
+ changeCallback: (s) => {
1985
2001
  var n;
1986
- this._changeCallback && this._changeCallback(l), this.dispatchEvent(new CustomEvent("change", {
2002
+ this._changeCallback && this._changeCallback(s), this.dispatchEvent(new CustomEvent("change", {
1987
2003
  detail: {
1988
- selectedOptions: l,
2004
+ selectedOptions: s,
1989
2005
  selectedValues: Array.from(((n = this.picker) == null ? void 0 : n.getValue()) || [])
1990
2006
  }
1991
2007
  }));
@@ -1995,7 +2011,7 @@ class Ge extends Rt {
1995
2011
  // Pass host element (this) for hidden inputs in light DOM
1996
2012
  hostElement: this
1997
2013
  };
1998
- t && (this.containerElement.dataset.initialValues = JSON.stringify(t)), this.picker = new zt(this.containerElement, s);
2014
+ t && (this.containerElement.dataset.initialValues = JSON.stringify(t)), this.picker = new zt(this.containerElement, o);
1999
2015
  }
2000
2016
  reinitialize() {
2001
2017
  this.picker && (this.picker.destroy(), this.initializePicker());
@@ -2212,10 +2228,10 @@ class Ge extends Rt {
2212
2228
  }
2213
2229
  typeof window < "u" && typeof customElements < "u" && (customElements.get("multi-select") || customElements.define("multi-select", Ge));
2214
2230
  typeof window < "u" && (window.keenmate = window.keenmate || {}, window.keenmate.multiselect = {
2215
- version: () => "1.0.0-rc02",
2231
+ version: () => "1.0.0-rc04",
2216
2232
  config: {
2217
2233
  name: "@keenmate/web-multiselect",
2218
- version: "1.0.0-rc02",
2234
+ version: "1.0.0-rc04",
2219
2235
  author: "Keenmate",
2220
2236
  license: "MIT",
2221
2237
  repository: "git+https://github.com/keenmate/web-multiselect.git",