@hitgrab/finder 0.1.10-alpha → 0.1.12-alpha

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,4 +1,4 @@
1
- import { FilterRuleUnion, FilterTestOptions, FilterTestRuleOptions, FilterTestRuleOptionsOptions, HydratedFilterRule } from "./types/rule-types";
1
+ import { FilterRuleUnion, FilterTestOptions, FilterTestRuleOptions, HydratedFilterRule } from "./types/rule-types";
2
2
  import { MixinInjectedDependencies, SerializedFiltersMixin } from "./types/core-types";
3
3
  interface InitialValues {
4
4
  initialFilters: Record<string, any> | undefined;
@@ -19,7 +19,7 @@ declare class FiltersMixin {
19
19
  toggle(identifier: FilterRuleIdentifier, optionValue?: any): void;
20
20
  test(options: FilterTestOptions): any[];
21
21
  testRule({ rule: identifier, value, ...options }: FilterTestRuleOptions): any[];
22
- testRuleOptions({ rule: identifier, ...options }: FilterTestRuleOptionsOptions): Map<any, any>;
22
+ testRuleOptions(identifier: FilterRuleIdentifier, isAdditive?: boolean): Map<any, any>;
23
23
  get values(): Record<string, any>;
24
24
  get raw(): Record<string, any>;
25
25
  serialize(): SerializedFiltersMixin;
@@ -48,7 +48,7 @@ declare class FinderCore<FItem = any, FContext = any> {
48
48
  delete: (identifier: string | import("..").FilterRuleUnion | import("..").HydratedFilterRule<any, any, any>, optionValue?: any) => void;
49
49
  test: (options: import("./types/rule-types").FilterTestOptions) => any[];
50
50
  testRule: ({ rule: identifier, value, ...options }: import("./types/rule-types").FilterTestRuleOptions) => any[];
51
- testRuleOptions: ({ rule: identifier, ...options }: import("./types/rule-types").FilterTestRuleOptionsOptions) => Map<any, any>;
51
+ testRuleOptions: (identifier: string | import("..").FilterRuleUnion | import("..").HydratedFilterRule<any, any, any>, isAdditive?: boolean) => Map<any, any>;
52
52
  };
53
53
  get sortBy(): {
54
54
  activeRule: import("..").SortByRule<unknown, any> | undefined;
@@ -93,6 +93,5 @@ export interface FilterTestRuleOptions {
93
93
  export interface FilterTestRuleOptionsOptions {
94
94
  rule: string | FilterRuleUnion | HydratedFilterRule;
95
95
  isAdditive?: boolean;
96
- mergeExistingValue?: boolean;
97
96
  }
98
97
  export {};
package/dist/index.js CHANGED
@@ -103,7 +103,7 @@ function Dp() {
103
103
  ), S.$$typeof) {
104
104
  case _e:
105
105
  return "Portal";
106
- case xe:
106
+ case we:
107
107
  return (S.displayName || "Context") + ".Provider";
108
108
  case pt:
109
109
  return (S._context.displayName || "Context") + ".Consumer";
@@ -269,7 +269,7 @@ React keys must be passed directly to JSX without using spread:
269
269
  function G(S) {
270
270
  typeof S == "object" && S !== null && S.$$typeof === Ie && S._store && (S._store.validated = 1);
271
271
  }
272
- var fe = yp, Ie = Symbol.for("react.transitional.element"), _e = Symbol.for("react.portal"), Pe = Symbol.for("react.fragment"), pe = Symbol.for("react.strict_mode"), be = Symbol.for("react.profiler"), pt = Symbol.for("react.consumer"), xe = Symbol.for("react.context"), ot = Symbol.for("react.forward_ref"), Ne = Symbol.for("react.suspense"), Q = Symbol.for("react.suspense_list"), he = Symbol.for("react.memo"), Ze = Symbol.for("react.lazy"), jt = Symbol.for("react.activity"), ci = Symbol.for("react.client.reference"), Dn = fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, gr = Object.prototype.hasOwnProperty, hi = Array.isArray, dn = console.createTask ? console.createTask : function() {
272
+ var fe = yp, Ie = Symbol.for("react.transitional.element"), _e = Symbol.for("react.portal"), Pe = Symbol.for("react.fragment"), pe = Symbol.for("react.strict_mode"), be = Symbol.for("react.profiler"), pt = Symbol.for("react.consumer"), we = Symbol.for("react.context"), ot = Symbol.for("react.forward_ref"), Ne = Symbol.for("react.suspense"), Q = Symbol.for("react.suspense_list"), he = Symbol.for("react.memo"), Ze = Symbol.for("react.lazy"), jt = Symbol.for("react.activity"), ci = Symbol.for("react.client.reference"), Dn = fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, gr = Object.prototype.hasOwnProperty, hi = Array.isArray, dn = console.createTask ? console.createTask : function() {
273
273
  return null;
274
274
  };
275
275
  fe = {
@@ -323,7 +323,7 @@ function No({ children: c }) {
323
323
  }
324
324
  function Co({ children: c }) {
325
325
  const u = Nn();
326
- return u.hasMatches === !1 ? typeof c == "function" ? /* @__PURE__ */ Le.jsx(c, { pagination: u.pagination, context: u.context }) : c : null;
326
+ return u.isEmpty === !1 && u.hasMatches === !1 ? typeof c == "function" ? /* @__PURE__ */ Le.jsx(c, { pagination: u.pagination, context: u.context }) : c : null;
327
327
  }
328
328
  function Do({ children: c }) {
329
329
  const u = Nn();
@@ -362,11 +362,11 @@ var Up = ur.exports, yo;
362
362
  function Mp() {
363
363
  return yo || (yo = 1, function(c, u) {
364
364
  (function() {
365
- var i, l = "4.17.21", _ = 200, T = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", A = "Expected a function", O = "Invalid `variable` option passed into `_.template`", M = "__lodash_hash_undefined__", Y = 500, z = "__lodash_placeholder__", G = 1, fe = 2, Ie = 4, _e = 1, Pe = 2, pe = 1, be = 2, pt = 4, xe = 8, ot = 16, Ne = 32, Q = 64, he = 128, Ze = 256, jt = 512, ci = 30, Dn = "...", gr = 800, hi = 16, dn = 1, dr = 2, _r = 3, en = 1 / 0, At = 9007199254740991, pr = 17976931348623157e292, S = NaN, N = 4294967295, ee = N - 1, ve = N >>> 1, vt = [
365
+ var i, l = "4.17.21", _ = 200, T = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", A = "Expected a function", O = "Invalid `variable` option passed into `_.template`", M = "__lodash_hash_undefined__", Y = 500, z = "__lodash_placeholder__", G = 1, fe = 2, Ie = 4, _e = 1, Pe = 2, pe = 1, be = 2, pt = 4, we = 8, ot = 16, Ne = 32, Q = 64, he = 128, Ze = 256, jt = 512, ci = 30, Dn = "...", gr = 800, hi = 16, dn = 1, dr = 2, _r = 3, en = 1 / 0, At = 9007199254740991, pr = 17976931348623157e292, S = NaN, N = 4294967295, ee = N - 1, ve = N >>> 1, vt = [
366
366
  ["ary", he],
367
367
  ["bind", pe],
368
368
  ["bindKey", be],
369
- ["curry", xe],
369
+ ["curry", we],
370
370
  ["curryRight", ot],
371
371
  ["flip", jt],
372
372
  ["partial", Ne],
@@ -917,7 +917,7 @@ function Mp() {
917
917
  return e({}, "", {}), e;
918
918
  } catch {
919
919
  }
920
- }(), xl = E.clearTimeout !== me.clearTimeout && E.clearTimeout, yl = x && x.now !== me.Date.now && x.now, Ol = E.setTimeout !== me.setTimeout && E.setTimeout, Dr = ge.ceil, Fr = ge.floor, Hi = Z.getOwnPropertySymbols, Ll = Lr ? Lr.isBuffer : i, Us = E.isFinite, Pl = wr.join, bl = Ls(Z.keys, Z), de = ge.max, ye = ge.min, Nl = x.now, Cl = E.parseInt, Ms = ge.random, Dl = wr.reverse, qi = on(E, "DataView"), $n = on(E, "Map"), Yi = on(E, "Promise"), Sn = on(E, "Set"), kn = on(E, "WeakMap"), zn = on(Z, "create"), Ur = kn && new kn(), An = {}, Fl = an(qi), Ul = an($n), Ml = an(Yi), Bl = an(Sn), Gl = an(kn), Mr = Yt ? Yt.prototype : i, Kn = Mr ? Mr.valueOf : i, Bs = Mr ? Mr.toString : i;
920
+ }(), xl = E.clearTimeout !== me.clearTimeout && E.clearTimeout, yl = x && x.now !== me.Date.now && x.now, Ol = E.setTimeout !== me.setTimeout && E.setTimeout, Dr = ge.ceil, Fr = ge.floor, Hi = Z.getOwnPropertySymbols, Ll = Lr ? Lr.isBuffer : i, Us = E.isFinite, Pl = wr.join, bl = Ls(Z.keys, Z), de = ge.max, xe = ge.min, Nl = x.now, Cl = E.parseInt, Ms = ge.random, Dl = wr.reverse, qi = on(E, "DataView"), $n = on(E, "Map"), Yi = on(E, "Promise"), Sn = on(E, "Set"), kn = on(E, "WeakMap"), zn = on(Z, "create"), Ur = kn && new kn(), An = {}, Fl = an(qi), Ul = an($n), Ml = an(Yi), Bl = an(Sn), Gl = an(kn), Mr = Yt ? Yt.prototype : i, Kn = Mr ? Mr.valueOf : i, Bs = Mr ? Mr.toString : i;
921
921
  function f(e) {
922
922
  if (ae(e) && !D(e) && !(e instanceof H)) {
923
923
  if (e instanceof et)
@@ -1006,7 +1006,7 @@ function Mp() {
1006
1006
  return e;
1007
1007
  }
1008
1008
  function ql() {
1009
- var e = this.__wrapped__.value(), t = this.__dir__, n = D(e), r = t < 0, s = n ? e.length : 0, o = eh(0, s, this.__views__), a = o.start, h = o.end, d = h - a, I = r ? h : a - 1, R = this.__iteratees__, m = R.length, w = 0, y = ye(d, this.__takeCount__);
1009
+ var e = this.__wrapped__.value(), t = this.__dir__, n = D(e), r = t < 0, s = n ? e.length : 0, o = eh(0, s, this.__views__), a = o.start, h = o.end, d = h - a, I = r ? h : a - 1, R = this.__iteratees__, m = R.length, w = 0, y = xe(d, this.__takeCount__);
1010
1010
  if (!n || !r && s == d && y == d)
1011
1011
  return af(e, this.__actions__);
1012
1012
  var P = [];
@@ -1228,7 +1228,7 @@ function Mp() {
1228
1228
  if (a = nh(e), !h)
1229
1229
  return Ue(e, a);
1230
1230
  } else {
1231
- var m = Oe(e), w = m == vr || m == Yu;
1231
+ var m = ye(e), w = m == vr || m == Yu;
1232
1232
  if (Xt(e))
1233
1233
  return hf(e, h);
1234
1234
  if (m == wt || m == Re || w && !s) {
@@ -1365,12 +1365,12 @@ function Mp() {
1365
1365
  return e != null && t in Z(e);
1366
1366
  }
1367
1367
  function Ic(e, t, n) {
1368
- return e >= ye(t, n) && e < de(t, n);
1368
+ return e >= xe(t, n) && e < de(t, n);
1369
1369
  }
1370
1370
  function Zi(e, t, n) {
1371
1371
  for (var r = n ? bi : mr, s = e[0].length, o = e.length, a = o, h = p(o), d = 1 / 0, I = []; a--; ) {
1372
1372
  var R = e[a];
1373
- a && t && (R = ne(R, Ye(t))), d = ye(R.length, d), h[a] = !n && (t || s >= 120 && R.length >= 120) ? new un(a && R) : i;
1373
+ a && t && (R = ne(R, Ye(t))), d = xe(R.length, d), h[a] = !n && (t || s >= 120 && R.length >= 120) ? new un(a && R) : i;
1374
1374
  }
1375
1375
  R = e[0];
1376
1376
  var m = -1, w = h[0];
@@ -1411,7 +1411,7 @@ function Mp() {
1411
1411
  return e === t ? !0 : e == null || t == null || !ae(e) && !ae(t) ? e !== e && t !== t : Ac(e, t, n, r, Vn, s);
1412
1412
  }
1413
1413
  function Ac(e, t, n, r, s, o) {
1414
- var a = D(e), h = D(t), d = a ? Gt : Oe(e), I = h ? Gt : Oe(t);
1414
+ var a = D(e), h = D(t), d = a ? Gt : ye(e), I = h ? Gt : ye(t);
1415
1415
  d = d == Re ? wt : d, I = I == Re ? wt : I;
1416
1416
  var R = d == wt, m = I == wt, w = d == I;
1417
1417
  if (w && Xt(e)) {
@@ -1431,7 +1431,7 @@ function Mp() {
1431
1431
  return w ? (o || (o = new ht()), Qc(e, t, n, r, s, o)) : !1;
1432
1432
  }
1433
1433
  function wc(e) {
1434
- return ae(e) && Oe(e) == at;
1434
+ return ae(e) && ye(e) == at;
1435
1435
  }
1436
1436
  function Ji(e, t, n, r) {
1437
1437
  var s = n.length, o = s, a = !r;
@@ -1468,7 +1468,7 @@ function Mp() {
1468
1468
  return ae(e) && Ce(e) == Bn;
1469
1469
  }
1470
1470
  function yc(e) {
1471
- return ae(e) && Oe(e) == lt;
1471
+ return ae(e) && ye(e) == lt;
1472
1472
  }
1473
1473
  function Oc(e) {
1474
1474
  return ae(e) && ii(e.length) && !!te[Ce(e)];
@@ -1685,7 +1685,7 @@ function Mp() {
1685
1685
  else I ? b = P && (r || w) : h ? b = P && w && (r || !y) : d ? b = P && w && !y && (r || !U) : y || U ? b = !1 : b = r ? m <= t : m < t;
1686
1686
  b ? s = R + 1 : o = R;
1687
1687
  }
1688
- return ye(o, ee);
1688
+ return xe(o, ee);
1689
1689
  }
1690
1690
  function sf(e, t) {
1691
1691
  for (var n = -1, r = e.length, s = 0, o = []; ++n < r; ) {
@@ -2001,7 +2001,7 @@ function Mp() {
2001
2001
  for (r = a ? r : n; ++r < n; ) {
2002
2002
  o = t[r];
2003
2003
  var h = Jr(o), d = h == "wrapper" ? hu(o) : i;
2004
- d && pu(d[0]) && d[1] == (he | xe | Ne | Ze) && !d[4].length && d[9] == 1 ? a = a[Jr(d[0])].apply(a, d[3]) : a = o.length == 1 && pu(o) ? a[h]() : a.thru(o);
2004
+ d && pu(d[0]) && d[1] == (he | we | Ne | Ze) && !d[4].length && d[9] == 1 ? a = a[Jr(d[0])].apply(a, d[3]) : a = o.length == 1 && pu(o) ? a[h]() : a.thru(o);
2005
2005
  }
2006
2006
  return function() {
2007
2007
  var I = arguments, R = I[0];
@@ -2014,7 +2014,7 @@ function Mp() {
2014
2014
  });
2015
2015
  }
2016
2016
  function zr(e, t, n, r, s, o, a, h, d, I) {
2017
- var R = t & he, m = t & pe, w = t & be, y = t & (xe | ot), P = t & jt, U = w ? i : jn(e);
2017
+ var R = t & he, m = t & pe, w = t & be, y = t & (we | ot), P = t & jt, U = w ? i : jn(e);
2018
2018
  function b() {
2019
2019
  for (var W = arguments.length, $ = p(W), ze = W; ze--; )
2020
2020
  $[ze] = arguments[ze];
@@ -2098,7 +2098,7 @@ function Mp() {
2098
2098
  };
2099
2099
  }
2100
2100
  function Af(e, t, n, r, s, o, a, h, d, I) {
2101
- var R = t & xe, m = R ? a : i, w = R ? i : a, y = R ? o : i, P = R ? i : o;
2101
+ var R = t & we, m = R ? a : i, w = R ? i : a, y = R ? o : i, P = R ? i : o;
2102
2102
  t |= R ? Ne : Q, t &= ~(R ? Q : Ne), t & pt || (t &= -4);
2103
2103
  var U = [
2104
2104
  e,
@@ -2117,7 +2117,7 @@ function Mp() {
2117
2117
  function au(e) {
2118
2118
  var t = ge[e];
2119
2119
  return function(n, r) {
2120
- if (n = it(n), r = r == null ? 0 : ye(F(r), 292), r && Us(n)) {
2120
+ if (n = it(n), r = r == null ? 0 : xe(F(r), 292), r && Us(n)) {
2121
2121
  var s = (K(n) + "e").split("e"), o = t(s[0] + "e" + (+s[1] + r));
2122
2122
  return s = (K(o) + "e").split("e"), +(s[0] + "e" + (+s[1] - r));
2123
2123
  }
@@ -2129,7 +2129,7 @@ function Mp() {
2129
2129
  } : bu;
2130
2130
  function wf(e) {
2131
2131
  return function(t) {
2132
- var n = Oe(t);
2132
+ var n = ye(t);
2133
2133
  return n == at ? Gi(t) : n == lt ? hl(t) : il(t, e(t));
2134
2134
  };
2135
2135
  }
@@ -2154,9 +2154,9 @@ function Mp() {
2154
2154
  a,
2155
2155
  h
2156
2156
  ];
2157
- if (w && lh(y, w), e = y[0], t = y[1], n = y[2], r = y[3], s = y[4], h = y[9] = y[9] === i ? d ? 0 : e.length : de(y[9] - I, 0), !h && t & (xe | ot) && (t &= -25), !t || t == pe)
2157
+ if (w && lh(y, w), e = y[0], t = y[1], n = y[2], r = y[3], s = y[4], h = y[9] = y[9] === i ? d ? 0 : e.length : de(y[9] - I, 0), !h && t & (we | ot) && (t &= -25), !t || t == pe)
2158
2158
  var P = zc(e, t, n);
2159
- else t == xe || t == ot ? P = Kc(e, t, h) : (t == Ne || t == (pe | Ne)) && !s.length ? P = Xc(e, t, n, r) : P = zr.apply(i, y);
2159
+ else t == we || t == ot ? P = Kc(e, t, h) : (t == Ne || t == (pe | Ne)) && !s.length ? P = Xc(e, t, n, r) : P = zr.apply(i, y);
2160
2160
  var U = w ? uf : Uf;
2161
2161
  return Mf(U(P, y), e, t);
2162
2162
  }
@@ -2329,8 +2329,8 @@ function Mp() {
2329
2329
  for (var t = []; e; )
2330
2330
  Ht(t, du(e)), e = br(e);
2331
2331
  return t;
2332
- } : Nu, Oe = Ce;
2333
- (qi && Oe(new qi(new ArrayBuffer(1))) != pn || $n && Oe(new $n()) != at || Yi && Oe(Yi.resolve()) != $u || Sn && Oe(new Sn()) != lt || kn && Oe(new kn()) != Wn) && (Oe = function(e) {
2332
+ } : Nu, ye = Ce;
2333
+ (qi && ye(new qi(new ArrayBuffer(1))) != pn || $n && ye(new $n()) != at || Yi && ye(Yi.resolve()) != $u || Sn && ye(new Sn()) != lt || kn && ye(new kn()) != Wn) && (ye = function(e) {
2334
2334
  var t = Ce(e), n = t == wt ? e.constructor : i, r = n ? an(n) : "";
2335
2335
  if (r)
2336
2336
  switch (r) {
@@ -2358,7 +2358,7 @@ function Mp() {
2358
2358
  t -= a;
2359
2359
  break;
2360
2360
  case "take":
2361
- t = ye(t, e + a);
2361
+ t = xe(t, e + a);
2362
2362
  break;
2363
2363
  case "takeRight":
2364
2364
  e = de(e, t - a);
@@ -2485,7 +2485,7 @@ function Mp() {
2485
2485
  return t;
2486
2486
  }
2487
2487
  function lh(e, t) {
2488
- var n = e[1], r = t[1], s = n | r, o = s < (pe | be | he), a = r == he && n == xe || r == he && n == Ze && e[7].length <= t[8] || r == (he | Ze) && t[7].length <= t[8] && n == xe;
2488
+ var n = e[1], r = t[1], s = n | r, o = s < (pe | be | he), a = r == he && n == we || r == he && n == Ze && e[7].length <= t[8] || r == (he | Ze) && t[7].length <= t[8] && n == we;
2489
2489
  if (!(o || a))
2490
2490
  return e;
2491
2491
  r & pe && (e[2] = t[2], s |= n & pe ? 0 : pt);
@@ -2494,7 +2494,7 @@ function Mp() {
2494
2494
  var d = e[3];
2495
2495
  e[3] = d ? _f(d, h, t[4]) : h, e[4] = d ? qt(e[3], z) : t[4];
2496
2496
  }
2497
- return h = t[5], h && (d = e[5], e[5] = d ? pf(d, h, t[6]) : h, e[6] = d ? qt(e[5], z) : t[6]), h = t[7], h && (e[7] = h), r & he && (e[8] = e[8] == null ? t[8] : ye(e[8], t[8])), e[9] == null && (e[9] = t[9]), e[0] = t[0], e[1] = s, e;
2497
+ return h = t[5], h && (d = e[5], e[5] = d ? pf(d, h, t[6]) : h, e[6] = d ? qt(e[5], z) : t[6]), h = t[7], h && (e[7] = h), r & he && (e[8] = e[8] == null ? t[8] : xe(e[8], t[8])), e[9] == null && (e[9] = t[9]), e[0] = t[0], e[1] = s, e;
2498
2498
  }
2499
2499
  function ch(e) {
2500
2500
  var t = [];
@@ -2520,7 +2520,7 @@ function Mp() {
2520
2520
  return t.length < 2 ? e : fn(e, nt(t, 0, -1));
2521
2521
  }
2522
2522
  function gh(e, t) {
2523
- for (var n = e.length, r = ye(t.length, n), s = Ue(e); r--; ) {
2523
+ for (var n = e.length, r = xe(t.length, n), s = Ue(e); r--; ) {
2524
2524
  var o = t[r];
2525
2525
  e[r] = bt(o, n) ? s[o] : i;
2526
2526
  }
@@ -2657,7 +2657,7 @@ function Mp() {
2657
2657
  if (!r)
2658
2658
  return -1;
2659
2659
  var s = r - 1;
2660
- return n !== i && (s = F(n), s = n < 0 ? de(r + s, 0) : ye(s, r - 1)), Sr(e, L(t, 3), s, !0);
2660
+ return n !== i && (s = F(n), s = n < 0 ? de(r + s, 0) : xe(s, r - 1)), Sr(e, L(t, 3), s, !0);
2661
2661
  }
2662
2662
  function Yf(e) {
2663
2663
  var t = e == null ? 0 : e.length;
@@ -2714,7 +2714,7 @@ function Mp() {
2714
2714
  if (!r)
2715
2715
  return -1;
2716
2716
  var s = r;
2717
- return n !== i && (s = F(n), s = s < 0 ? de(r + s, 0) : ye(s, r - 1)), t === t ? dl(e, t, s) : Sr(e, Ss, s, !0);
2717
+ return n !== i && (s = F(n), s = s < 0 ? de(r + s, 0) : xe(s, r - 1)), t === t ? dl(e, t, s) : Sr(e, Ss, s, !0);
2718
2718
  }
2719
2719
  function Uh(e, t) {
2720
2720
  return e && e.length ? ef(e, F(t)) : i;
@@ -3011,7 +3011,7 @@ function Mp() {
3011
3011
  return 0;
3012
3012
  if (Me(e))
3013
3013
  return ui(e) ? In(e) : e.length;
3014
- var t = Oe(e);
3014
+ var t = ye(e);
3015
3015
  return t == at || t == lt ? e.size : Vi(e).length;
3016
3016
  }
3017
3017
  function zg(e, t, n) {
@@ -3062,7 +3062,7 @@ function Mp() {
3062
3062
  });
3063
3063
  function jf(e, t, n) {
3064
3064
  t = n ? i : t;
3065
- var r = Lt(e, xe, i, i, i, i, i, t);
3065
+ var r = Lt(e, we, i, i, i, i, i, t);
3066
3066
  return r.placeholder = jf.placeholder, r;
3067
3067
  }
3068
3068
  function eo(e, t, n) {
@@ -3084,7 +3084,7 @@ function Mp() {
3084
3084
  }
3085
3085
  function U(ce) {
3086
3086
  var dt = ce - d, Dt = ce - I, Ro = t - dt;
3087
- return m ? ye(Ro, o - Dt) : Ro;
3087
+ return m ? xe(Ro, o - Dt) : Ro;
3088
3088
  }
3089
3089
  function b(ce) {
3090
3090
  var dt = ce - d, Dt = ce - I;
@@ -3163,7 +3163,7 @@ function Mp() {
3163
3163
  t = t.length == 1 && D(t[0]) ? ne(t[0], Ye(L())) : ne(Se(t, 1), Ye(L()));
3164
3164
  var n = t.length;
3165
3165
  return B(function(r) {
3166
- for (var s = -1, o = ye(r.length, n); ++s < o; )
3166
+ for (var s = -1, o = xe(r.length, n); ++s < o; )
3167
3167
  r[s] = t[s].call(this, r[s]);
3168
3168
  return qe(e, this, r);
3169
3169
  });
@@ -3254,7 +3254,7 @@ function Mp() {
3254
3254
  return !0;
3255
3255
  if (Me(e) && (D(e) || typeof e == "string" || typeof e.splice == "function" || Xt(e) || Ln(e) || ln(e)))
3256
3256
  return !e.length;
3257
- var t = Oe(e);
3257
+ var t = ye(e);
3258
3258
  if (t == at || t == lt)
3259
3259
  return !e.size;
3260
3260
  if (er(e))
@@ -3349,7 +3349,7 @@ function Mp() {
3349
3349
  return e === i;
3350
3350
  }
3351
3351
  function Pd(e) {
3352
- return ae(e) && Oe(e) == Wn;
3352
+ return ae(e) && ye(e) == Wn;
3353
3353
  }
3354
3354
  function bd(e) {
3355
3355
  return ae(e) && Ce(e) == Ko;
@@ -3364,7 +3364,7 @@ function Mp() {
3364
3364
  return ui(e) ? ct(e) : Ue(e);
3365
3365
  if (Yn && e[Yn])
3366
3366
  return cl(e[Yn]());
3367
- var t = Oe(e), n = t == at ? Gi : t == lt ? Ar : Pn;
3367
+ var t = ye(e), n = t == at ? Gi : t == lt ? Ar : Pn;
3368
3368
  return n(e);
3369
3369
  }
3370
3370
  function Ct(e) {
@@ -3580,7 +3580,7 @@ function Mp() {
3580
3580
  }
3581
3581
  if (n || e % 1 || t % 1) {
3582
3582
  var s = Ms();
3583
- return ye(e + s * (t - e + Ka("1e-" + ((s + "").length - 1))), t);
3583
+ return xe(e + s * (t - e + Ka("1e-" + ((s + "").length - 1))), t);
3584
3584
  }
3585
3585
  return eu(e, t);
3586
3586
  }
@@ -3875,7 +3875,7 @@ function print() { __p += __j.call(arguments, '') }
3875
3875
  function ap(e, t) {
3876
3876
  if (e = F(e), e < 1 || e > At)
3877
3877
  return [];
3878
- var n = N, r = ye(e, N);
3878
+ var n = N, r = xe(e, N);
3879
3879
  t = L(t), e -= N;
3880
3880
  for (var s = Mi(r, t); ++n < e; )
3881
3881
  t(n);
@@ -3933,8 +3933,8 @@ function print() { __p += __j.call(arguments, '') }
3933
3933
  H.prototype[e] = function(n) {
3934
3934
  n = n === i ? 1 : de(F(n), 0);
3935
3935
  var r = this.__filtered__ && !t ? new H(this) : this.clone();
3936
- return r.__filtered__ ? r.__takeCount__ = ye(n, r.__takeCount__) : r.__views__.push({
3937
- size: ye(n, N),
3936
+ return r.__filtered__ ? r.__takeCount__ = xe(n, r.__takeCount__) : r.__views__.push({
3937
+ size: xe(n, N),
3938
3938
  type: e + (r.__dir__ < 0 ? "Right" : "")
3939
3939
  }), r;
3940
3940
  }, H.prototype[e + "Right"] = function(n) {
@@ -4230,7 +4230,7 @@ const ie = {
4230
4230
  SET_GROUP_SORT_BY_DIRECTION: "setGroupBySortDirection",
4231
4231
  SET_PAGE: "setPage",
4232
4232
  SET_NUM_ITEMS_PER_PAGE: "setNumItemsPerPage"
4233
- }, we = {
4233
+ }, Ae = {
4234
4234
  CORE: "core",
4235
4235
  SEARCH: "search",
4236
4236
  FILTERS: "filters",
@@ -4292,7 +4292,7 @@ class Uo {
4292
4292
  const l = this.searchTerm;
4293
4293
  this.searchTerm = u, l !== u && v(this, ut).debouncer(i, () => {
4294
4294
  v(this, ut).touch({
4295
- source: we.SEARCH,
4295
+ source: Ae.SEARCH,
4296
4296
  event: ie.SET_SEARCH_TERM,
4297
4297
  current: u,
4298
4298
  initial: l,
@@ -4305,7 +4305,7 @@ class Uo {
4305
4305
  return;
4306
4306
  const u = this.searchTerm;
4307
4307
  this.searchTerm = "", v(this, ut).touch({
4308
- source: we.SEARCH,
4308
+ source: Ae.SEARCH,
4309
4309
  event: ie.RESET_SEARCH_TERM,
4310
4310
  current: "",
4311
4311
  initial: u,
@@ -4475,20 +4475,20 @@ function Qp(c) {
4475
4475
  function Ut(c) {
4476
4476
  return c.boolean ? Jp(c) : c.multiple ? Vp(c) : Qp(c);
4477
4477
  }
4478
- var Ae, Xe;
4478
+ var Oe, Xe;
4479
4479
  class Mo {
4480
4480
  constructor({ initialFilters: u }, i) {
4481
- J(this, Ae);
4481
+ J(this, Oe);
4482
4482
  J(this, Xe);
4483
- q(this, Ae, u ?? {}), q(this, Xe, i);
4483
+ q(this, Oe, u ?? {}), q(this, Xe, i);
4484
4484
  }
4485
4485
  set(u, i) {
4486
4486
  if (v(this, Xe).isDisabled())
4487
4487
  return;
4488
4488
  const l = this.getRule(u), _ = this.get(u), A = typeof i == "string" && i.trim() === "" ? void 0 : i;
4489
- Ut(l).validate(i), !(v(this, Ae)[l.id] !== void 0 && v(this, Ae)[l.id] === A) && v(this, Xe).debouncer(l, () => {
4490
- q(this, Ae, { ...v(this, Ae), [l.id]: A }), v(this, Xe).touch({
4491
- source: we.FILTERS,
4489
+ Ut(l).validate(i), !(v(this, Oe)[l.id] !== void 0 && v(this, Oe)[l.id] === A) && v(this, Xe).debouncer(l, () => {
4490
+ q(this, Oe, { ...v(this, Oe), [l.id]: A }), v(this, Xe).touch({
4491
+ source: Ae.FILTERS,
4492
4492
  event: ie.SET_FILTER,
4493
4493
  current: A,
4494
4494
  initial: _,
@@ -4500,14 +4500,14 @@ class Mo {
4500
4500
  return v(this, Xe).getRuleBook().rules.filter(Lo);
4501
4501
  }
4502
4502
  get activeRules() {
4503
- return this.rules.filter((u) => Ut(u).isActive(v(this, Ae)[u.id]));
4503
+ return this.rules.filter((u) => Ut(u).isActive(v(this, Oe)[u.id]));
4504
4504
  }
4505
4505
  get(u) {
4506
- const i = this.getRule(u), l = v(this, Ae)[i.id];
4506
+ const i = this.getRule(u), l = v(this, Oe)[i.id];
4507
4507
  return Ut(i).parse(l);
4508
4508
  }
4509
4509
  has(u, i) {
4510
- const l = this.getRule(u), _ = v(this, Ae)[l.id];
4510
+ const l = this.getRule(u), _ = v(this, Oe)[l.id];
4511
4511
  return Ut(l).has(_, i);
4512
4512
  }
4513
4513
  getRule(u) {
@@ -4517,19 +4517,19 @@ class Mo {
4517
4517
  return i;
4518
4518
  }
4519
4519
  add(u, i) {
4520
- const l = this.getRule(u), _ = v(this, Ae)[l.id];
4520
+ const l = this.getRule(u), _ = v(this, Oe)[l.id];
4521
4521
  this.set(l, Ut(l).add(_, i));
4522
4522
  }
4523
4523
  delete(u, i) {
4524
- const l = this.getRule(u), _ = v(this, Ae)[l.id];
4524
+ const l = this.getRule(u), _ = v(this, Oe)[l.id];
4525
4525
  this.set(l, Ut(l).delete(_, i));
4526
4526
  }
4527
4527
  isRuleActive(u) {
4528
- const i = this.getRule(u), l = v(this, Ae)[i.id];
4528
+ const i = this.getRule(u), l = v(this, Oe)[i.id];
4529
4529
  return Ut(i).isActive(l);
4530
4530
  }
4531
4531
  toggle(u, i) {
4532
- const l = this.getRule(u), _ = v(this, Ae)[l.id], T = Ut(l).toggle(_, i);
4532
+ const l = this.getRule(u), _ = v(this, Oe)[l.id], T = Ut(l).toggle(_, i);
4533
4533
  this.set(l, T);
4534
4534
  }
4535
4535
  test(u) {
@@ -4549,24 +4549,19 @@ class Mo {
4549
4549
  ...l
4550
4550
  });
4551
4551
  }
4552
- testRuleOptions({ rule: u, ...i }) {
4552
+ testRuleOptions(u, i) {
4553
4553
  if (v(this, Xe).isLoading())
4554
4554
  return /* @__PURE__ */ new Map();
4555
4555
  const l = this.getRule(u);
4556
4556
  if (l.boolean === !0) {
4557
4557
  const _ = /* @__PURE__ */ new Map();
4558
- return _.set(!0, this.testRule({ rule: l, value: !0, ...i })), _.set(!1, this.testRule({ rule: l, value: !1, ...i })), _;
4558
+ return _.set(!0, this.testRule({ rule: l, value: !0 })), _.set(!1, this.testRule({ rule: l, value: !1 })), _;
4559
4559
  }
4560
4560
  if (Array.isArray(l.options)) {
4561
4561
  const _ = /* @__PURE__ */ new Map();
4562
4562
  return l.options.forEach((T) => {
4563
4563
  let A;
4564
- if (i.mergeExistingValue) {
4565
- const O = v(this, Ae)[l.id] ?? [];
4566
- l.multiple && (A = [...O, T.value]);
4567
- } else
4568
- l.multiple ? A = [T.value] : A = T.value;
4569
- _.set(T, this.testRule({ rule: l, value: A, ...i }));
4564
+ l.multiple ? A = [T.value] : A = T.value, _.set(T, this.testRule({ rule: l, value: A, isAdditive: i }));
4570
4565
  }), _;
4571
4566
  }
4572
4567
  throw new se(ue.TESTING_OPTIONS_ON_RULE_WITH_NO_OPTIONS, l);
@@ -4576,7 +4571,7 @@ class Mo {
4576
4571
  return this.rules.reduce((u, i) => (u[i.id] = this.get(i), u), {});
4577
4572
  }
4578
4573
  get raw() {
4579
- return v(this, Ae);
4574
+ return v(this, Oe);
4580
4575
  }
4581
4576
  serialize() {
4582
4577
  return {
@@ -4589,7 +4584,7 @@ class Mo {
4589
4584
  return _.length === 0 ? i : i.filter((T) => _.every((A) => A.filterFn(T, u.values[A.id], l)));
4590
4585
  }
4591
4586
  }
4592
- Ae = new WeakMap(), Xe = new WeakMap();
4587
+ Oe = new WeakMap(), Xe = new WeakMap();
4593
4588
  const Fu = [void 0, "desc", "asc"];
4594
4589
  var cn, st, Rt;
4595
4590
  class Bo {
@@ -4624,7 +4619,7 @@ class Bo {
4624
4619
  return;
4625
4620
  const i = v(this, st);
4626
4621
  q(this, st, u), v(this, Rt).touch({
4627
- source: we.SORT_BY,
4622
+ source: Ae.SORT_BY,
4628
4623
  event: ie.SET_SORT_BY_DIRECTION,
4629
4624
  current: { sortDirection: u },
4630
4625
  initial: { sortDirection: i },
@@ -4651,7 +4646,7 @@ class Bo {
4651
4646
  return;
4652
4647
  const l = v(this, st), _ = v(this, cn), T = u ? this.getRule(u) : void 0;
4653
4648
  q(this, cn, T), q(this, st, i), v(this, Rt).touch({
4654
- source: we.SORT_BY,
4649
+ source: Ae.SORT_BY,
4655
4650
  event: ie.SET_SORT_BY,
4656
4651
  current: { rule: T == null ? void 0 : T.id, sortDirection: i },
4657
4652
  initial: { rule: _ == null ? void 0 : _.id, sortDirection: l },
@@ -4714,7 +4709,7 @@ class Go {
4714
4709
  let l;
4715
4710
  const _ = typeof u == "string" && u.trim() === "";
4716
4711
  _ && (l = void 0), _ === !1 && u !== void 0 && (l = this.getRule(u)), v(this, Zt) !== l && (q(this, Zt, l), q(this, Jt, void 0), v(this, Mt).touch({
4717
- source: we.GROUP_BY,
4712
+ source: Ae.GROUP_BY,
4718
4713
  event: ie.SET_GROUP_BY,
4719
4714
  current: l == null ? void 0 : l.id,
4720
4715
  initial: i == null ? void 0 : i.id,
@@ -4724,7 +4719,7 @@ class Go {
4724
4719
  setGroupSortDirection(u) {
4725
4720
  const i = v(this, Jt);
4726
4721
  q(this, Jt, u), v(this, Mt).touch({
4727
- source: we.GROUP_BY,
4722
+ source: Ae.GROUP_BY,
4728
4723
  event: ie.SET_GROUP_SORT_BY_DIRECTION,
4729
4724
  current: u,
4730
4725
  initial: i,
@@ -4789,7 +4784,7 @@ class Wo {
4789
4784
  if (u !== v(this, ft)) {
4790
4785
  const i = v(this, ft);
4791
4786
  q(this, ft, u), v(this, Vt).touch({
4792
- source: we.PAGINATION,
4787
+ source: Ae.PAGINATION,
4793
4788
  event: ie.SET_PAGE,
4794
4789
  current: { page: v(this, ft) },
4795
4790
  initial: { page: i }
@@ -4800,7 +4795,7 @@ class Wo {
4800
4795
  if (u !== this.numItemsPerPage) {
4801
4796
  const i = this.numItemsPerPage;
4802
4797
  this.numItemsPerPage = u, v(this, Vt).touch({
4803
- source: we.PAGINATION,
4798
+ source: Ae.PAGINATION,
4804
4799
  event: ie.SET_NUM_ITEMS_PER_PAGE,
4805
4800
  current: { numItemsPerPage: this.numItemsPerPage },
4806
4801
  initial: { numItemsPerPage: i }
@@ -5003,7 +4998,7 @@ class rv {
5003
4998
  onInit: pe,
5004
4999
  onReady: be,
5005
5000
  onFirstUserInteraction: pt,
5006
- onChange: xe
5001
+ onChange: we
5007
5002
  }, ot) {
5008
5003
  J(this, We);
5009
5004
  J(this, Bt);
@@ -5025,14 +5020,14 @@ class rv {
5025
5020
  };
5026
5021
  this.search = new Uo({ initialSearchTerm: _ }, Q), this.filters = new Mo({ initialFilters: M }, Q), this.sortBy = new Bo({ initialSortBy: T, initialSortDirection: A }, Q), this.groupBy = new Go({ initialGroupBy: O, requireGroup: !!_e }, Q), this.pagination = new Wo({ page: z, numItemsPerPage: G }, Q), this.updatedAt = Date.now(), q(this, St, new fr()), this.context = Y, q(this, hr, Pe), v(this, Ee).silently(() => {
5027
5022
  const he = {
5028
- source: we.CORE,
5023
+ source: Ae.CORE,
5029
5024
  event: ie.INIT,
5030
5025
  timestamp: Date.now(),
5031
5026
  instance: this.getInstanceFn()
5032
5027
  };
5033
5028
  pe && pe(he);
5034
- }), xe && v(this, Ee).on(ie.CHANGE, xe), pt && v(this, Ee).on(ie.FIRST_USER_INTERACTION, pt), this.isReady = !fe && Array.isArray(u) && u.length > 0, be && this.isReady && be({
5035
- source: we.CORE,
5029
+ }), we && v(this, Ee).on(ie.CHANGE, we), pt && v(this, Ee).on(ie.FIRST_USER_INTERACTION, pt), this.isReady = !fe && Array.isArray(u) && u.length > 0, be && this.isReady && be({
5030
+ source: Ae.CORE,
5036
5031
  event: ie.READY,
5037
5032
  timestamp: Date.now(),
5038
5033
  instance: this.getInstanceFn()
@@ -5042,7 +5037,7 @@ class rv {
5042
5037
  if (v(this, bn) === !1) {
5043
5038
  q(this, bn, !0);
5044
5039
  const u = {
5045
- source: we.CORE,
5040
+ source: Ae.CORE,
5046
5041
  event: ie.FIRST_USER_INTERACTION,
5047
5042
  timestamp: Date.now(),
5048
5043
  instance: this.getInstanceFn()
@@ -5096,19 +5091,19 @@ class rv {
5096
5091
  setItems(u) {
5097
5092
  if (He.isEqual(u, v(this, Bt)) === !1) {
5098
5093
  const i = v(this, Bt);
5099
- q(this, Bt, u), v(this, _t).hydrateDefinitions(this.items, this.context), v(this, Qt).hydrateDefinitions(this.items, this.context), Ft(this, We, sr).call(this, { source: we.CORE, event: ie.SET_ITEMS, current: u, initial: i });
5094
+ q(this, Bt, u), v(this, _t).hydrateDefinitions(this.items, this.context), v(this, Qt).hydrateDefinitions(this.items, this.context), Ft(this, We, sr).call(this, { source: Ae.CORE, event: ie.SET_ITEMS, current: u, initial: i });
5100
5095
  }
5101
5096
  }
5102
5097
  setIsLoading(u) {
5103
5098
  if (!!u !== this.isLoading) {
5104
5099
  const i = this.isLoading;
5105
- this.isLoading = !!u, Ft(this, We, sr).call(this, { source: we.CORE, event: ie.SET_IS_LOADING, current: !!u, initial: i }), this.isLoading === !1 && Ft(this, We, qo).call(this);
5100
+ this.isLoading = !!u, Ft(this, We, sr).call(this, { source: Ae.CORE, event: ie.SET_IS_LOADING, current: !!u, initial: i }), this.isLoading === !1 && Ft(this, We, qo).call(this);
5106
5101
  }
5107
5102
  }
5108
5103
  setIsDisabled(u) {
5109
5104
  if (!!u !== this.disabled) {
5110
5105
  const i = this.disabled;
5111
- this.disabled = !!u, Ft(this, We, sr).call(this, { source: we.CORE, event: ie.SET_IS_DISABLED, current: !!u, initial: i });
5106
+ this.disabled = !!u, Ft(this, We, sr).call(this, { source: Ae.CORE, event: ie.SET_IS_DISABLED, current: !!u, initial: i });
5112
5107
  }
5113
5108
  }
5114
5109
  setRules(u) {
@@ -5116,7 +5111,7 @@ class rv {
5116
5111
  }
5117
5112
  setContext(u) {
5118
5113
  const i = this.context;
5119
- He.isEqual(u, i) === !1 && (this.context = u, v(this, _t).hydrateDefinitions(this.items, this.context), v(this, Qt).hydrateDefinitions(this.items, this.context), Ft(this, We, sr).call(this, { source: we.CORE, event: ie.SET_CONTEXT, current: u, initial: i }));
5114
+ He.isEqual(u, i) === !1 && (this.context = u, v(this, _t).hydrateDefinitions(this.items, this.context), v(this, Qt).hydrateDefinitions(this.items, this.context), Ft(this, We, sr).call(this, { source: Ae.CORE, event: ie.SET_CONTEXT, current: u, initial: i }));
5120
5115
  }
5121
5116
  }
5122
5117
  Bt = new WeakMap(), bn = new WeakMap(), hr = new WeakMap(), Ee = new WeakMap(), St = new WeakMap(), _t = new WeakMap(), Qt = new WeakMap(), We = new WeakSet(), /**
@@ -5146,7 +5141,7 @@ sr = function(u) {
5146
5141
  v(this, Ee).emit(u.event, i);
5147
5142
  }, qo = function() {
5148
5143
  this.isReady === !1 && (this.isReady = !0, v(this, Ee).emit(ie.READY, {
5149
- source: we.CORE,
5144
+ source: Ae.CORE,
5150
5145
  event: ie.READY,
5151
5146
  timestamp: Date.now()
5152
5147
  }));
@@ -5317,7 +5312,7 @@ function Yo({
5317
5312
  onReady: pe,
5318
5313
  onFirstUserInteraction: be,
5319
5314
  onChange: pt,
5320
- controllerRef: xe,
5315
+ controllerRef: we,
5321
5316
  children: ot
5322
5317
  }) {
5323
5318
  const [, Ne] = So(void 0), [Q] = So(() => {
@@ -5345,7 +5340,7 @@ function Yo({
5345
5340
  onChange: he
5346
5341
  });
5347
5342
  });
5348
- return Q.setItems(c), Q.setIsLoading(Y), Q.setIsDisabled(z), Q.setRules(u), M !== void 0 && Q.setContext(M), G !== void 0 && Q.pagination.setPage(G), fe !== void 0 && Q.pagination.setNumItemsPerPage(fe), bp(xe, () => Q, [Q]), /* @__PURE__ */ Le.jsx(Po, { value: [Q, Q.updatedAt], children: ot });
5343
+ return Q.setItems(c), Q.setIsLoading(Y), Q.setIsDisabled(z), Q.setRules(u), M !== void 0 && Q.setContext(M), G !== void 0 && Q.pagination.setPage(G), fe !== void 0 && Q.pagination.setNumItemsPerPage(fe), bp(we, () => Q, [Q]), /* @__PURE__ */ Le.jsx(Po, { value: [Q, Q.updatedAt], children: ot });
5349
5344
  }
5350
5345
  Yo.Content = Cn;
5351
5346
  Yo.SearchTermHaystack = zp;