@web-utils/component 3.5.0 → 3.6.0

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,101 +1,101 @@
1
- var Ce = Object.defineProperty, Le = Object.defineProperties;
2
- var Me = Object.getOwnPropertyDescriptors;
1
+ var Le = Object.defineProperty, Me = Object.defineProperties;
2
+ var Te = Object.getOwnPropertyDescriptors;
3
3
  var J = Object.getOwnPropertySymbols;
4
- var Te = Object.prototype.hasOwnProperty, De = Object.prototype.propertyIsEnumerable;
5
- var Z = (e, t, s) => t in e ? Ce(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, v = (e, t) => {
4
+ var De = Object.prototype.hasOwnProperty, xe = Object.prototype.propertyIsEnumerable;
5
+ var Z = (e, t, s) => t in e ? Le(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, _ = (e, t) => {
6
6
  for (var s in t || (t = {}))
7
- Te.call(t, s) && Z(e, s, t[s]);
7
+ De.call(t, s) && Z(e, s, t[s]);
8
8
  if (J)
9
9
  for (var s of J(t))
10
- De.call(t, s) && Z(e, s, t[s]);
10
+ xe.call(t, s) && Z(e, s, t[s]);
11
11
  return e;
12
- }, w = (e, t) => Le(e, Me(t));
13
- import xe, { h as r } from "vue";
14
- import { noop as Re, identity as $e, last as ee, once as Ie, debounce as Ae } from "lodash-es";
15
- import { isPromise as le } from "@web-utils/core";
16
- import { n as m } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
17
- const O = process.env.NODE_ENV === "production" ? (
12
+ }, C = (e, t) => Me(e, Te(t));
13
+ import Re, { h as r } from "vue";
14
+ import { noop as $e, identity as Ie, last as ee, once as Ae, debounce as Ve } from "lodash-es";
15
+ import { isPromise as ae } from "@web-utils/core";
16
+ import { n as v } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
17
+ const N = process.env.NODE_ENV === "production" ? (
18
18
  /* istanbul ignore next */
19
- Re
19
+ $e
20
20
  ) : function(t, s) {
21
21
  if (!t()) {
22
22
  const n = ["[Vue-TreeSelect Warning]"].concat(s());
23
23
  console.error(...n);
24
24
  }
25
25
  };
26
- function b(e) {
26
+ function w(e) {
27
27
  return function(s, ...n) {
28
28
  s.type === "mousedown" && s.button === 0 && e.call(this, s, ...n);
29
29
  };
30
30
  }
31
- function Ve(e, t) {
31
+ function Be(e, t) {
32
32
  const s = e.getBoundingClientRect(), n = t.getBoundingClientRect(), i = t.offsetHeight / 3;
33
33
  n.bottom + i > s.bottom ? e.scrollTop = Math.min(t.offsetTop + t.clientHeight - e.offsetHeight + i, e.scrollHeight) : n.top - i < s.top && (e.scrollTop = Math.max(t.offsetTop - i, 0));
34
34
  }
35
- function ae(e, t) {
35
+ function ce(e, t) {
36
36
  const s = e.indexOf(t);
37
37
  s !== -1 && e.splice(s, 1);
38
38
  }
39
- let q;
40
- const R = [], Be = 100;
41
- function ze() {
42
- q = setInterval(() => {
43
- R.forEach(ce);
44
- }, Be);
45
- }
39
+ let Y;
40
+ const A = [], ze = 100;
46
41
  function Fe() {
47
- clearInterval(q), q = null;
42
+ Y = setInterval(() => {
43
+ A.forEach(ue);
44
+ }, ze);
45
+ }
46
+ function ke() {
47
+ clearInterval(Y), Y = null;
48
48
  }
49
- function ce(e) {
50
- const { $el: t, listener: s, lastWidth: n, lastHeight: i } = e, l = t.offsetWidth, o = t.offsetHeight;
51
- (n !== l || i !== o) && (e.lastWidth = l, e.lastHeight = o, s({ width: l, height: o }));
49
+ function ue(e) {
50
+ const { $el: t, listener: s, lastWidth: n, lastHeight: i } = e, l = t.offsetWidth, a = t.offsetHeight;
51
+ (n !== l || i !== a) && (e.lastWidth = l, e.lastHeight = a, s({ width: l, height: a }));
52
52
  }
53
- function ke(e, t) {
53
+ function He(e, t) {
54
54
  const s = {
55
55
  $el: e,
56
56
  listener: t,
57
57
  lastWidth: null,
58
58
  lastHeight: null
59
59
  }, n = () => {
60
- ae(R, s), R.length || Fe();
60
+ ce(A, s), A.length || ke();
61
61
  };
62
- return R.push(s), ce(s), ze(), n;
62
+ return A.push(s), ue(s), Fe(), n;
63
63
  }
64
- function He(e, t) {
64
+ function Pe(e, t) {
65
65
  const s = document.createElement("_"), n = s.appendChild(document.createElement("_")), i = s.appendChild(document.createElement("_")), l = n.appendChild(document.createElement("_"));
66
- let o, u;
67
- return n.style.cssText = s.style.cssText = "height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1", l.style.cssText = i.style.cssText = "display:block;height:100%;transition:0s;width:100%", l.style.width = l.style.height = "200%", e.appendChild(s), p(), g;
68
- function p() {
69
- c();
70
- const f = e.offsetWidth, N = e.offsetHeight;
71
- (f !== o || N !== u) && (o = f, u = N, i.style.width = `${f * 2}px`, i.style.height = `${N * 2}px`, s.scrollLeft = s.scrollWidth, s.scrollTop = s.scrollHeight, n.scrollLeft = n.scrollWidth, n.scrollTop = n.scrollHeight, t({ width: f, height: N })), n.addEventListener("scroll", p), s.addEventListener("scroll", p);
66
+ let a, c;
67
+ return n.style.cssText = s.style.cssText = "height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1", l.style.cssText = i.style.cssText = "display:block;height:100%;transition:0s;width:100%", l.style.width = l.style.height = "200%", e.appendChild(s), h(), g;
68
+ function h() {
69
+ o();
70
+ const p = e.offsetWidth, f = e.offsetHeight;
71
+ (p !== a || f !== c) && (a = p, c = f, i.style.width = `${p * 2}px`, i.style.height = `${f * 2}px`, s.scrollLeft = s.scrollWidth, s.scrollTop = s.scrollHeight, n.scrollLeft = n.scrollWidth, n.scrollTop = n.scrollHeight, t({ width: p, height: f })), n.addEventListener("scroll", h), s.addEventListener("scroll", h);
72
72
  }
73
- function c() {
74
- n.removeEventListener("scroll", p), s.removeEventListener("scroll", p);
73
+ function o() {
74
+ n.removeEventListener("scroll", h), s.removeEventListener("scroll", h);
75
75
  }
76
76
  function g() {
77
- c(), e.removeChild(s);
77
+ o(), e.removeChild(s);
78
78
  }
79
79
  }
80
- function ue(e, t) {
80
+ function he(e, t) {
81
81
  const s = document.documentMode === 9;
82
82
  let n = !0;
83
- const o = (s ? ke : He)(e, (...u) => n || t(...u));
84
- return n = !1, o;
83
+ const a = (s ? He : Pe)(e, (...c) => n || t(...c));
84
+ return n = !1, a;
85
85
  }
86
- function Pe(e) {
86
+ function We(e) {
87
87
  const t = [];
88
88
  let s = e.parentNode;
89
89
  for (; s && s.nodeName !== "BODY" && s.nodeType === document.ELEMENT_NODE; )
90
- We(s) && t.push(s), s = s.parentNode;
90
+ je(s) && t.push(s), s = s.parentNode;
91
91
  return t.push(window), t;
92
92
  }
93
- function We(e) {
93
+ function je(e) {
94
94
  const { overflow: t, overflowX: s, overflowY: n } = getComputedStyle(e);
95
95
  return /(auto|scroll|overlay)/.test(t + n + s);
96
96
  }
97
- function he(e, t) {
98
- const s = Pe(e);
97
+ function de(e, t) {
98
+ const s = We(e);
99
99
  return window.addEventListener("resize", t, { passive: !0 }), s.forEach((n) => {
100
100
  n.addEventListener("scroll", t, { passive: !0 });
101
101
  }), function() {
@@ -104,53 +104,53 @@ function he(e, t) {
104
104
  });
105
105
  };
106
106
  }
107
- function de(e) {
107
+ function pe(e) {
108
108
  return Number.isNaN(e);
109
109
  }
110
110
  const S = () => /* @__PURE__ */ Object.create(null);
111
- function pe(e) {
111
+ function fe(e) {
112
112
  return e == null || typeof e != "object" ? !1 : Object.getPrototypeOf(e) === Object.prototype;
113
113
  }
114
- function je(e, t, s) {
115
- pe(s) ? (e[t] || (e[t] = {}), U(e[t], s)) : e[t] = s;
114
+ function Qe(e, t, s) {
115
+ fe(s) ? (e[t] || (e[t] = {}), X(e[t], s)) : e[t] = s;
116
116
  }
117
- function U(e, t) {
118
- if (pe(t)) {
117
+ function X(e, t) {
118
+ if (fe(t)) {
119
119
  const s = Object.keys(t);
120
120
  for (let n = 0, i = s.length; n < i; n++)
121
- je(e, s[n], t[s[n]]);
121
+ Qe(e, s[n], t[s[n]]);
122
122
  }
123
123
  return e;
124
124
  }
125
- function y(e, t) {
125
+ function E(e, t) {
126
126
  return e.indexOf(t) !== -1;
127
127
  }
128
- function fe(e, t, s) {
128
+ function me(e, t, s) {
129
129
  for (let n = 0, i = e.length; n < i; n++)
130
130
  if (t.call(s, e[n], n, e)) return e[n];
131
131
  }
132
- function B(e, t) {
132
+ function z(e, t) {
133
133
  if (e.length !== t.length) return !0;
134
134
  for (let s = 0; s < e.length; s++)
135
135
  if (e[s] !== t[s]) return !0;
136
136
  return !1;
137
137
  }
138
- function Qe(e, t) {
138
+ function qe(e, t) {
139
139
  const s = t.length, n = e.length;
140
140
  if (n > s)
141
141
  return !1;
142
142
  if (n === s)
143
143
  return e === t;
144
144
  e: for (let i = 0, l = 0; i < n; i++) {
145
- const o = e.charCodeAt(i);
145
+ const a = e.charCodeAt(i);
146
146
  for (; l < s; )
147
- if (t.charCodeAt(l++) === o)
147
+ if (t.charCodeAt(l++) === a)
148
148
  continue e;
149
149
  return !1;
150
150
  }
151
151
  return !0;
152
152
  }
153
- const E = null, Y = 0, me = 1, ge = 2, C = "ALL_CHILDREN", L = "ALL_DESCENDANTS", M = "LEAF_CHILDREN", T = "LEAF_DESCENDANTS", Ke = "LOAD_ROOT_OPTIONS", qe = "LOAD_CHILDREN_OPTIONS", Ue = "ASYNC_SEARCH", z = "ALL", x = "BRANCH_PRIORITY", F = "LEAF_PRIORITY", k = "ALL_WITH_INDETERMINATE", te = "ORDER_SELECTED", se = "LEVEL", ne = "INDEX", d = {
153
+ const b = null, G = 0, ge = 1, ve = 2, L = "ALL_CHILDREN", D = "ALL_DESCENDANTS", x = "LEAF_CHILDREN", R = "LEAF_DESCENDANTS", Ke = "LOAD_ROOT_OPTIONS", Ue = "LOAD_CHILDREN_OPTIONS", Ye = "ASYNC_SEARCH", F = "ALL", I = "BRANCH_PRIORITY", k = "LEAF_PRIORITY", H = "ALL_WITH_INDETERMINATE", te = "ORDER_SELECTED", se = "LEVEL", ne = "INDEX", m = {
154
154
  BACKSPACE: 8,
155
155
  ENTER: 13,
156
156
  ESCAPE: 27,
@@ -161,7 +161,7 @@ const E = null, Y = 0, me = 1, ge = 2, C = "ALL_CHILDREN", L = "ALL_DESCENDANTS"
161
161
  ARROW_RIGHT: 39,
162
162
  ARROW_DOWN: 40,
163
163
  DELETE: 46
164
- }, Ye = process.env.NODE_ENV === "testing" ? (
164
+ }, Xe = process.env.NODE_ENV === "testing" ? (
165
165
  /* to speed up unit testing */
166
166
  10
167
167
  ) : (
@@ -177,28 +177,28 @@ function Se(e, t) {
177
177
  s++;
178
178
  } while (!0);
179
179
  }
180
- function Xe(e, t) {
180
+ function Ge(e, t) {
181
181
  return e.level === t.level ? Se(e, t) : e.level - t.level;
182
182
  }
183
- function H() {
183
+ function P() {
184
184
  return {
185
185
  isLoaded: !1,
186
186
  isLoading: !1,
187
187
  loadingError: ""
188
188
  };
189
189
  }
190
- function Ge(e) {
191
- return typeof e == "string" ? e : typeof e == "number" && !de(e) ? `${e}` : "";
190
+ function Je(e) {
191
+ return typeof e == "string" ? e : typeof e == "number" && !pe(e) ? `${e}` : "";
192
192
  }
193
193
  function oe(e, t, s) {
194
- return e ? Qe(t, s) : y(s, t);
194
+ return e ? qe(t, s) : E(s, t);
195
195
  }
196
- function P(e) {
196
+ function W(e) {
197
197
  return e.message || /* istanbul ignore next */
198
198
  String(e);
199
199
  }
200
- let Je = 0;
201
- const Ze = {
200
+ let Ze = 0;
201
+ const et = {
202
202
  provide() {
203
203
  return {
204
204
  // Enable access to the instance of root component of vue-treeselect
@@ -429,7 +429,7 @@ const Ze = {
429
429
  */
430
430
  instanceId: {
431
431
  // Add two trailing "$" to distinguish from explictly specified ids.
432
- default: () => `${Je++}$$`,
432
+ default: () => `${Ze++}$$`,
433
433
  type: [String, Number]
434
434
  },
435
435
  /**
@@ -525,7 +525,7 @@ const Ze = {
525
525
  */
526
526
  normalizer: {
527
527
  type: Function,
528
- default: $e
528
+ default: Ie
529
529
  },
530
530
  /**
531
531
  * By default (`auto`), the menu will open below the control. If there is not
@@ -543,7 +543,7 @@ const Ze = {
543
543
  type: String,
544
544
  default: "auto",
545
545
  validator(e) {
546
- return y(["auto", "top", "bottom", "above", "below"], e);
546
+ return E(["auto", "top", "bottom", "above", "below"], e);
547
547
  }
548
548
  },
549
549
  /**
@@ -633,9 +633,9 @@ const Ze = {
633
633
  */
634
634
  showCountOf: {
635
635
  type: String,
636
- default: C,
636
+ default: L,
637
637
  validator(e) {
638
- return y([C, L, M, T], e);
638
+ return E([L, D, x, R], e);
639
639
  }
640
640
  },
641
641
  /**
@@ -656,7 +656,7 @@ const Ze = {
656
656
  type: String,
657
657
  default: te,
658
658
  validator(e) {
659
- return y([te, se, ne], e);
659
+ return E([te, se, ne], e);
660
660
  }
661
661
  },
662
662
  /**
@@ -684,9 +684,9 @@ const Ze = {
684
684
  */
685
685
  valueConsistsOf: {
686
686
  type: String,
687
- default: x,
687
+ default: I,
688
688
  validator(e) {
689
- return y([z, x, F, k], e);
689
+ return E([F, I, k, H], e);
690
690
  }
691
691
  },
692
692
  /**
@@ -740,7 +740,7 @@ const Ze = {
740
740
  selectedNodeMap: S()
741
741
  },
742
742
  // States of root options.
743
- rootOptionsStates: H(),
743
+ rootOptionsStates: P(),
744
744
  localSearch: {
745
745
  // Has user entered any query to search local options?
746
746
  active: !1,
@@ -768,27 +768,27 @@ const Ze = {
768
768
  */
769
769
  internalValue() {
770
770
  let e;
771
- if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === z)
771
+ if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === F)
772
772
  e = this.forest.selectedNodeIds.slice();
773
- else if (this.valueConsistsOf === x)
773
+ else if (this.valueConsistsOf === I)
774
774
  e = this.forest.selectedNodeIds.filter((t) => {
775
775
  const s = this.getNode(t);
776
776
  return s.isRootNode ? !0 : !this.isSelected(s.parentNode);
777
777
  });
778
- else if (this.valueConsistsOf === F)
778
+ else if (this.valueConsistsOf === k)
779
779
  e = this.forest.selectedNodeIds.filter((t) => {
780
780
  const s = this.getNode(t);
781
781
  return s.isLeaf ? !0 : s.children.length === 0;
782
782
  });
783
- else if (this.valueConsistsOf === k) {
783
+ else if (this.valueConsistsOf === H) {
784
784
  const t = [];
785
785
  e = this.forest.selectedNodeIds.slice(), this.selectedNodes.forEach((s) => {
786
786
  s.ancestors.forEach((n) => {
787
- y(t, n.id) || y(e, n.id) || t.push(n.id);
787
+ E(t, n.id) || E(e, n.id) || t.push(n.id);
788
788
  });
789
789
  }), e.push(...t);
790
790
  }
791
- return this.sortValueBy === se ? e.sort((t, s) => Xe(this.getNode(t), this.getNode(s))) : this.sortValueBy === ne && e.sort((t, s) => Se(this.getNode(t), this.getNode(s))), e;
791
+ return this.sortValueBy === se ? e.sort((t, s) => Ge(this.getNode(t), this.getNode(s))) : this.sortValueBy === ne && e.sort((t, s) => Se(this.getNode(t), this.getNode(s))), e;
792
792
  },
793
793
  /**
794
794
  * Has any option been selected?
@@ -859,7 +859,7 @@ const Ze = {
859
859
  this.initialize();
860
860
  },
861
861
  internalValue(e, t) {
862
- B(e, t) && this.$emit("input", this.getValue(), this.getInstanceId());
862
+ z(e, t) && this.$emit("input", this.getValue(), this.getInstanceId());
863
863
  },
864
864
  matchKeys() {
865
865
  this.initialize();
@@ -879,22 +879,22 @@ const Ze = {
879
879
  },
880
880
  value() {
881
881
  const e = this.extractCheckedNodeIdsFromValue();
882
- B(e, this.internalValue) && this.fixSelectedNodeIds(e);
882
+ z(e, this.internalValue) && this.fixSelectedNodeIds(e);
883
883
  }
884
884
  },
885
885
  methods: {
886
886
  verifyProps() {
887
- O(
887
+ N(
888
888
  () => this.async ? this.searchable : !0,
889
889
  () => 'For async search mode, the value of "searchable" prop must be true.'
890
- ), this.options == null && !this.loadOptions && O(
890
+ ), this.options == null && !this.loadOptions && N(
891
891
  () => !1,
892
892
  () => 'Are you meant to dynamically load options? You need to use "loadOptions" prop.'
893
- ), this.flat && O(
893
+ ), this.flat && N(
894
894
  () => this.multiple,
895
895
  () => 'You are using flat mode. But you forgot to add "multiple=true"?'
896
896
  ), this.flat || ["autoSelectAncestors", "autoSelectDescendants", "autoDeselectAncestors", "autoDeselectDescendants"].forEach((t) => {
897
- O(
897
+ N(
898
898
  () => !this[t],
899
899
  () => `"${t}" only applies to flat mode.`
900
900
  );
@@ -907,7 +907,7 @@ const Ze = {
907
907
  const e = this.async ? this.getRemoteSearchEntry().options : this.options;
908
908
  if (Array.isArray(e)) {
909
909
  const t = this.forest.nodeMap;
910
- this.forest.nodeMap = S(), this.keepDataOfSelectedNodes(t), this.forest.normalizedOptions = this.normalize(E, e, t), this.fixSelectedNodeIds(this.internalValue);
910
+ this.forest.nodeMap = S(), this.keepDataOfSelectedNodes(t), this.forest.normalizedOptions = this.normalize(b, e, t), this.fixSelectedNodeIds(this.internalValue);
911
911
  } else
912
912
  this.forest.normalizedOptions = [];
913
913
  },
@@ -921,7 +921,7 @@ const Ze = {
921
921
  return this.multiple ? e : e[0];
922
922
  },
923
923
  getNode(e) {
924
- return O(
924
+ return N(
925
925
  () => e != null,
926
926
  () => `Invalid node id: ${e}`
927
927
  ), e == null ? null : e in this.forest.nodeMap ? this.forest.nodeMap[e] : this.createFallbackNode(e);
@@ -931,7 +931,7 @@ const Ze = {
931
931
  id: e,
932
932
  label: s,
933
933
  ancestors: [],
934
- parentNode: E,
934
+ parentNode: b,
935
935
  isFallbackNode: !0,
936
936
  isRootNode: !0,
937
937
  isLeaf: !0,
@@ -952,13 +952,13 @@ const Ze = {
952
952
  if (this.valueFormat === "id")
953
953
  return t;
954
954
  const s = this.multiple ? Array.isArray(this.value) ? this.value : [] : this.value ? [this.value] : [];
955
- return fe(s, (i) => i && this.enhancedNormalizer(i).id === e) || t;
955
+ return me(s, (i) => i && this.enhancedNormalizer(i).id === e) || t;
956
956
  },
957
957
  fixSelectedNodeIds(e) {
958
958
  let t = [];
959
- if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === z)
959
+ if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === F)
960
960
  t = e;
961
- else if (this.valueConsistsOf === x)
961
+ else if (this.valueConsistsOf === I)
962
962
  e.forEach((n) => {
963
963
  t.push(n);
964
964
  const i = this.getNode(n);
@@ -966,28 +966,28 @@ const Ze = {
966
966
  t.push(l.id);
967
967
  });
968
968
  });
969
- else if (this.valueConsistsOf === F) {
969
+ else if (this.valueConsistsOf === k) {
970
970
  const n = S(), i = e.slice();
971
971
  for (; i.length; ) {
972
- const l = i.shift(), o = this.getNode(l);
973
- t.push(l), !o.isRootNode && (o.parentNode.id in n || (n[o.parentNode.id] = o.parentNode.children.length), --n[o.parentNode.id] === 0 && i.push(o.parentNode.id));
972
+ const l = i.shift(), a = this.getNode(l);
973
+ t.push(l), !a.isRootNode && (a.parentNode.id in n || (n[a.parentNode.id] = a.parentNode.children.length), --n[a.parentNode.id] === 0 && i.push(a.parentNode.id));
974
974
  }
975
- } else if (this.valueConsistsOf === k) {
975
+ } else if (this.valueConsistsOf === H) {
976
976
  const n = S(), i = e.filter((l) => {
977
- const o = this.getNode(l);
978
- return o.isLeaf || o.children.length === 0;
977
+ const a = this.getNode(l);
978
+ return a.isLeaf || a.children.length === 0;
979
979
  });
980
980
  for (; i.length; ) {
981
- const l = i.shift(), o = this.getNode(l);
982
- t.push(l), !o.isRootNode && (o.parentNode.id in n || (n[o.parentNode.id] = o.parentNode.children.length), --n[o.parentNode.id] === 0 && i.push(o.parentNode.id));
981
+ const l = i.shift(), a = this.getNode(l);
982
+ t.push(l), !a.isRootNode && (a.parentNode.id in n || (n[a.parentNode.id] = a.parentNode.children.length), --n[a.parentNode.id] === 0 && i.push(a.parentNode.id));
983
983
  }
984
984
  }
985
- B(this.forest.selectedNodeIds, t) && (this.forest.selectedNodeIds = t), this.buildForestState();
985
+ z(this.forest.selectedNodeIds, t) && (this.forest.selectedNodeIds = t), this.buildForestState();
986
986
  },
987
987
  keepDataOfSelectedNodes(e) {
988
988
  this.forest.selectedNodeIds.forEach((t) => {
989
989
  if (!e[t]) return;
990
- const s = w(v({}, e[t]), {
990
+ const s = C(_({}, e[t]), {
991
991
  isFallbackNode: !0
992
992
  });
993
993
  this.$set(this.forest.nodeMap, t, s);
@@ -1037,7 +1037,7 @@ const Ze = {
1037
1037
  blurInput() {
1038
1038
  this.getInput().blur();
1039
1039
  },
1040
- handleMouseDown: b(function(t) {
1040
+ handleMouseDown: w(function(t) {
1041
1041
  if (t.preventDefault(), t.stopPropagation(), this.disabled) return;
1042
1042
  this.getValueContainer().$el.contains(t.target) && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused) && this.openMenu(), this._blurOnSelect ? this.blurInput() : this.focusInput(), this.resetFlags();
1043
1043
  }),
@@ -1050,15 +1050,15 @@ const Ze = {
1050
1050
  return this.localSearch.active = !1, t();
1051
1051
  this.localSearch.active = !0, this.localSearch.noResults = !0, this.traverseAllNodesDFS((i) => {
1052
1052
  i.isBranch && (i.isExpandedOnSearch = !1, i.showAllChildrenOnSearch = !1, i.isMatched = !1, i.hasMatchedDescendants = !1, this.$set(this.localSearch.countMap, i.id, {
1053
- [C]: 0,
1054
1053
  [L]: 0,
1055
- [M]: 0,
1056
- [T]: 0
1054
+ [D]: 0,
1055
+ [x]: 0,
1056
+ [R]: 0
1057
1057
  }));
1058
1058
  });
1059
1059
  const s = e.trim().toLocaleLowerCase(), n = s.replace(/\s+/g, " ").split(" ");
1060
1060
  this.traverseAllNodesDFS((i) => {
1061
- this.searchNested && n.length > 1 ? i.isMatched = n.every((l) => oe(!1, l, i.nestedSearchLabel)) : i.isMatched = this.matchKeys.some((l) => oe(!this.disableFuzzyMatching, s, i.lowerCased[l])), i.isMatched && (this.localSearch.noResults = !1, i.ancestors.forEach((l) => this.localSearch.countMap[l.id][L]++), i.isLeaf && i.ancestors.forEach((l) => this.localSearch.countMap[l.id][T]++), i.parentNode !== E && (this.localSearch.countMap[i.parentNode.id][C] += 1, i.isLeaf && (this.localSearch.countMap[i.parentNode.id][M] += 1))), (i.isMatched || i.isBranch && i.isExpandedOnSearch) && i.parentNode !== E && (i.parentNode.isExpandedOnSearch = !0, i.parentNode.hasMatchedDescendants = !0);
1061
+ this.searchNested && n.length > 1 ? i.isMatched = n.every((l) => oe(!1, l, i.nestedSearchLabel)) : i.isMatched = this.matchKeys.some((l) => oe(!this.disableFuzzyMatching, s, i.lowerCased[l])), i.isMatched && (this.localSearch.noResults = !1, i.ancestors.forEach((l) => this.localSearch.countMap[l.id][D]++), i.isLeaf && i.ancestors.forEach((l) => this.localSearch.countMap[l.id][R]++), i.parentNode !== b && (this.localSearch.countMap[i.parentNode.id][L] += 1, i.isLeaf && (this.localSearch.countMap[i.parentNode.id][x] += 1))), (i.isMatched || i.isBranch && i.isExpandedOnSearch) && i.parentNode !== b && (i.parentNode.isExpandedOnSearch = !0, i.parentNode.hasMatchedDescendants = !0);
1062
1062
  }), t();
1063
1063
  },
1064
1064
  handleRemoteSearch() {
@@ -1068,7 +1068,7 @@ const Ze = {
1068
1068
  if ((e === "" || this.cacheOptions) && t.isLoaded)
1069
1069
  return s();
1070
1070
  this.callLoadOptionsProp({
1071
- action: Ue,
1071
+ action: Ye,
1072
1072
  args: { searchQuery: e },
1073
1073
  isPending() {
1074
1074
  return t.isLoading;
@@ -1080,7 +1080,7 @@ const Ze = {
1080
1080
  t.isLoaded = !0, t.options = n, this.trigger.searchQuery === e && s();
1081
1081
  },
1082
1082
  fail: (n) => {
1083
- t.loadingError = P(n);
1083
+ t.loadingError = W(n);
1084
1084
  },
1085
1085
  end: () => {
1086
1086
  t.isLoading = !1;
@@ -1088,7 +1088,7 @@ const Ze = {
1088
1088
  });
1089
1089
  },
1090
1090
  getRemoteSearchEntry() {
1091
- const { searchQuery: e } = this.trigger, t = this.remoteSearch[e] || w(v({}, H()), {
1091
+ const { searchQuery: e } = this.trigger, t = this.remoteSearch[e] || C(_({}, P()), {
1092
1092
  options: []
1093
1093
  });
1094
1094
  if (this.$watch(
@@ -1126,7 +1126,7 @@ const Ze = {
1126
1126
  if (s != null && s in this.forest.nodeMap && (this.forest.nodeMap[s].isHighlighted = !1), this.menu.current = e.id, e.isHighlighted = !0, this.menu.isOpen && t) {
1127
1127
  const n = () => {
1128
1128
  const i = this.getMenu(), l = i.querySelector(`.vue-treeselect__option[data-id="${e.id}"]`);
1129
- l && Ve(i, l);
1129
+ l && Be(i, l);
1130
1130
  };
1131
1131
  this.getMenu() ? n() : this.$nextTick(n);
1132
1132
  }
@@ -1180,49 +1180,49 @@ const Ze = {
1180
1180
  }), this.forest.selectedNodeMap = e;
1181
1181
  const t = S();
1182
1182
  this.multiple && (this.traverseAllNodesByIndex((s) => {
1183
- t[s.id] = Y;
1183
+ t[s.id] = G;
1184
1184
  }), this.selectedNodes.forEach((s) => {
1185
- t[s.id] = ge, !this.flat && !this.disableBranchNodes && s.ancestors.forEach((n) => {
1186
- this.isSelected(n) || (t[n.id] = me);
1185
+ t[s.id] = ve, !this.flat && !this.disableBranchNodes && s.ancestors.forEach((n) => {
1186
+ this.isSelected(n) || (t[n.id] = ge);
1187
1187
  });
1188
1188
  })), this.forest.checkedStateMap = t;
1189
1189
  },
1190
1190
  enhancedNormalizer(e) {
1191
- return v(v({}, e), this.normalizer(e, this.getInstanceId()));
1191
+ return _(_({}, e), this.normalizer(e, this.getInstanceId()));
1192
1192
  },
1193
1193
  normalize(e, t, s) {
1194
- let n = t.map((i) => [this.enhancedNormalizer(i), i]).map(([i, l], o) => {
1194
+ let n = t.map((i) => [this.enhancedNormalizer(i), i]).map(([i, l], a) => {
1195
1195
  this.checkDuplication(i), this.verifyNodeShape(i);
1196
- const { id: u, label: p, children: c, isDefaultExpanded: g } = i, f = e === E, N = f ? 0 : e.level + 1, I = Array.isArray(c) || c === null, A = !I, G = !!i.isDisabled || !this.flat && !f && e.isDisabled, be = !!i.isNew, V = this.matchKeys.reduce(
1197
- (h, D) => w(v({}, h), {
1198
- [D]: Ge(i[D]).toLocaleLowerCase()
1196
+ const { id: c, label: h, children: o, isDefaultExpanded: g } = i, p = e === b, f = p ? 0 : e.level + 1, M = Array.isArray(o) || o === null, T = !M, y = !!i.isDisabled || !this.flat && !p && e.isDisabled, we = !!i.isNew, B = this.matchKeys.reduce(
1197
+ (d, $) => C(_({}, d), {
1198
+ [$]: Je(i[$]).toLocaleLowerCase()
1199
1199
  }),
1200
1200
  {}
1201
- ), we = f ? V.label : `${e.nestedSearchLabel} ${V.label}`, a = this.$set(this.forest.nodeMap, u, S());
1202
- if (this.$set(a, "id", u), this.$set(a, "label", p), this.$set(a, "level", N), this.$set(a, "ancestors", f ? [] : [e].concat(e.ancestors)), this.$set(a, "index", (f ? [] : e.index).concat(o)), this.$set(a, "parentNode", e), this.$set(a, "lowerCased", V), this.$set(a, "nestedSearchLabel", we), this.$set(a, "isDisabled", G), this.$set(a, "isNew", be), this.$set(a, "isMatched", !1), this.$set(a, "isHighlighted", !1), this.$set(a, "isBranch", I), this.$set(a, "isLeaf", A), this.$set(a, "isRootNode", f), this.$set(a, "raw", l), I) {
1203
- const h = Array.isArray(c);
1204
- this.$set(a, "childrenStates", w(v({}, H()), {
1205
- isLoaded: h
1206
- })), this.$set(a, "isExpanded", typeof g == "boolean" ? g : N < this.defaultExpandLevel), this.$set(a, "hasMatchedDescendants", !1), this.$set(a, "hasDisabledDescendants", !1), this.$set(a, "isExpandedOnSearch", !1), this.$set(a, "showAllChildrenOnSearch", !1), this.$set(a, "count", {
1207
- [C]: 0,
1201
+ ), Ce = p ? B.label : `${e.nestedSearchLabel} ${B.label}`, u = this.$set(this.forest.nodeMap, c, S());
1202
+ if (this.$set(u, "id", c), this.$set(u, "label", h), this.$set(u, "level", f), this.$set(u, "ancestors", p ? [] : [e].concat(e.ancestors)), this.$set(u, "index", (p ? [] : e.index).concat(a)), this.$set(u, "parentNode", e), this.$set(u, "lowerCased", B), this.$set(u, "nestedSearchLabel", Ce), this.$set(u, "isDisabled", y), this.$set(u, "isNew", we), this.$set(u, "isMatched", !1), this.$set(u, "isHighlighted", !1), this.$set(u, "isBranch", M), this.$set(u, "isLeaf", T), this.$set(u, "isRootNode", p), this.$set(u, "raw", l), M) {
1203
+ const d = Array.isArray(o);
1204
+ this.$set(u, "childrenStates", C(_({}, P()), {
1205
+ isLoaded: d
1206
+ })), this.$set(u, "isExpanded", typeof g == "boolean" ? g : f < this.defaultExpandLevel), this.$set(u, "hasMatchedDescendants", !1), this.$set(u, "hasDisabledDescendants", !1), this.$set(u, "isExpandedOnSearch", !1), this.$set(u, "showAllChildrenOnSearch", !1), this.$set(u, "count", {
1208
1207
  [L]: 0,
1209
- [M]: 0,
1210
- [T]: 0
1211
- }), this.$set(a, "children", h ? this.normalize(a, c, s) : []), g === !0 && a.ancestors.forEach((D) => {
1212
- D.isExpanded = !0;
1213
- }), !h && typeof this.loadOptions != "function" ? O(
1208
+ [D]: 0,
1209
+ [x]: 0,
1210
+ [R]: 0
1211
+ }), this.$set(u, "children", d ? this.normalize(u, o, s) : []), g === !0 && u.ancestors.forEach(($) => {
1212
+ $.isExpanded = !0;
1213
+ }), !d && typeof this.loadOptions != "function" ? N(
1214
1214
  () => !1,
1215
1215
  () => 'Unloaded branch node detected. "loadOptions" prop is required to load its children.'
1216
- ) : !h && a.isExpanded && this.loadChildrenOptions(a);
1216
+ ) : !d && u.isExpanded && this.loadChildrenOptions(u);
1217
1217
  }
1218
- if (a.ancestors.forEach((h) => h.count[L]++), A && a.ancestors.forEach((h) => h.count[T]++), f || (e.count[C] += 1, A && (e.count[M] += 1), G && (e.hasDisabledDescendants = !0)), s && s[u]) {
1219
- const h = s[u];
1220
- a.isMatched = h.isMatched, a.showAllChildrenOnSearch = h.showAllChildrenOnSearch, a.isHighlighted = h.isHighlighted, h.isBranch && a.isBranch && (a.isExpanded = h.isExpanded, a.isExpandedOnSearch = h.isExpandedOnSearch, h.childrenStates.isLoaded && !a.childrenStates.isLoaded ? a.isExpanded = !1 : a.childrenStates = v({}, h.childrenStates));
1218
+ if (u.ancestors.forEach((d) => d.count[D]++), T && u.ancestors.forEach((d) => d.count[R]++), p || (e.count[L] += 1, T && (e.count[x] += 1), y && (e.hasDisabledDescendants = !0)), s && s[c]) {
1219
+ const d = s[c];
1220
+ u.isMatched = d.isMatched, u.showAllChildrenOnSearch = d.showAllChildrenOnSearch, u.isHighlighted = d.isHighlighted, d.isBranch && u.isBranch && (u.isExpanded = d.isExpanded, u.isExpandedOnSearch = d.isExpandedOnSearch, d.childrenStates.isLoaded && !u.childrenStates.isLoaded ? u.isExpanded = !1 : u.childrenStates = _({}, d.childrenStates));
1221
1221
  }
1222
- return a;
1222
+ return u;
1223
1223
  });
1224
1224
  if (this.branchNodesFirst) {
1225
- const i = n.filter((o) => o.isBranch), l = n.filter((o) => o.isLeaf);
1225
+ const i = n.filter((a) => a.isBranch), l = n.filter((a) => a.isLeaf);
1226
1226
  n = i.concat(l);
1227
1227
  }
1228
1228
  return n;
@@ -1240,7 +1240,7 @@ const Ze = {
1240
1240
  });
1241
1241
  },
1242
1242
  fail: (e) => {
1243
- this.rootOptionsStates.loadingError = P(e);
1243
+ this.rootOptionsStates.loadingError = W(e);
1244
1244
  },
1245
1245
  end: () => {
1246
1246
  this.rootOptionsStates.isLoading = !1;
@@ -1250,7 +1250,7 @@ const Ze = {
1250
1250
  loadChildrenOptions(e) {
1251
1251
  const { id: t, raw: s } = e;
1252
1252
  this.callLoadOptionsProp({
1253
- action: qe,
1253
+ action: Ue,
1254
1254
  args: {
1255
1255
  // We always pass the raw node instead of the normalized node to any
1256
1256
  // callback provided by the user of this component.
@@ -1266,45 +1266,45 @@ const Ze = {
1266
1266
  this.getNode(t).childrenStates.isLoaded = !0;
1267
1267
  },
1268
1268
  fail: (n) => {
1269
- this.getNode(t).childrenStates.loadingError = P(n);
1269
+ this.getNode(t).childrenStates.loadingError = W(n);
1270
1270
  },
1271
1271
  end: () => {
1272
1272
  this.getNode(t).childrenStates.isLoading = !1;
1273
1273
  }
1274
1274
  });
1275
1275
  },
1276
- callLoadOptionsProp({ action: e, args: t, isPending: s, start: n, succeed: i, fail: l, end: o }) {
1276
+ callLoadOptionsProp({ action: e, args: t, isPending: s, start: n, succeed: i, fail: l, end: a }) {
1277
1277
  if (!this.loadOptions || s())
1278
1278
  return;
1279
1279
  n();
1280
- const u = Ie((c, g) => {
1281
- c ? l(c) : i(g), o();
1282
- }), p = this.loadOptions(w(v({
1280
+ const c = Ae((o, g) => {
1281
+ o ? l(o) : i(g), a();
1282
+ }), h = this.loadOptions(C(_({
1283
1283
  id: this.getInstanceId(),
1284
1284
  instanceId: this.getInstanceId(),
1285
1285
  action: e
1286
1286
  }, t), {
1287
- callback: u
1287
+ callback: c
1288
1288
  }));
1289
- le(p) && p.then(
1289
+ ae(h) && h.then(
1290
1290
  () => {
1291
- u();
1291
+ c();
1292
1292
  },
1293
- (c) => {
1294
- u(c);
1293
+ (o) => {
1294
+ c(o);
1295
1295
  }
1296
- ).catch((c) => {
1297
- console.error(c);
1296
+ ).catch((o) => {
1297
+ console.error(o);
1298
1298
  });
1299
1299
  },
1300
1300
  checkDuplication(e) {
1301
- O(
1301
+ N(
1302
1302
  () => !(e.id in this.forest.nodeMap && !this.forest.nodeMap[e.id].isFallbackNode),
1303
1303
  () => `Detected duplicate presence of node id ${JSON.stringify(e.id)}. Their labels are "${this.forest.nodeMap[e.id].label}" and "${e.label}" respectively.`
1304
1304
  );
1305
1305
  },
1306
1306
  verifyNodeShape(e) {
1307
- O(
1307
+ N(
1308
1308
  () => !(e.children === void 0 && e.isBranch === !0),
1309
1309
  () => "Are you meant to declare an unloaded branch node? `isBranch: true` is no longer supported, please use `children: null` instead."
1310
1310
  );
@@ -1313,7 +1313,7 @@ const Ze = {
1313
1313
  if (this.disabled || e.isDisabled)
1314
1314
  return;
1315
1315
  this.single && this.clear();
1316
- const t = this.multiple && !this.flat ? this.forest.checkedStateMap[e.id] === Y : !this.isSelected(e);
1316
+ const t = this.multiple && !this.flat ? this.forest.checkedStateMap[e.id] === G : !this.isSelected(e);
1317
1317
  t ? this._selectNode(e) : this._deselectNode(e), this.buildForestState(), t ? this.$emit("select", e.raw, this.getInstanceId()) : this.$emit("deselect", e.raw, this.getInstanceId()), this.localSearch.active && t && (this.single || this.clearOnSelect) && this.resetSearchQuery(), this.single && this.closeOnSelect && (this.closeMenu(), this.searchable && (this._blurOnSelect = !0));
1318
1318
  },
1319
1319
  clear() {
@@ -1338,7 +1338,7 @@ const Ze = {
1338
1338
  (!s.isDisabled || this.allowSelectingDisabledDescendants) && this.addValue(s);
1339
1339
  }), t) {
1340
1340
  let s = e;
1341
- for (; (s = s.parentNode) !== E && s.children.every(this.isSelected); )
1341
+ for (; (s = s.parentNode) !== b && s.children.every(this.isSelected); )
1342
1342
  this.addValue(s);
1343
1343
  }
1344
1344
  },
@@ -1362,7 +1362,7 @@ const Ze = {
1362
1362
  e.children.length === 0) {
1363
1363
  this.removeValue(e);
1364
1364
  let s = e;
1365
- for (; (s = s.parentNode) !== E && this.isSelected(s); )
1365
+ for (; (s = s.parentNode) !== b && this.isSelected(s); )
1366
1366
  this.removeValue(s);
1367
1367
  }
1368
1368
  },
@@ -1370,7 +1370,7 @@ const Ze = {
1370
1370
  this.forest.selectedNodeIds.push(e.id), this.forest.selectedNodeMap[e.id] = !0;
1371
1371
  },
1372
1372
  removeValue(e) {
1373
- ae(this.forest.selectedNodeIds, e.id), delete this.forest.selectedNodeMap[e.id];
1373
+ ce(this.forest.selectedNodeIds, e.id), delete this.forest.selectedNodeMap[e.id];
1374
1374
  },
1375
1375
  removeLastValue() {
1376
1376
  if (!this.hasValue) return;
@@ -1397,10 +1397,10 @@ const Ze = {
1397
1397
  this.toggleClickOutsideEvent(!1);
1398
1398
  }
1399
1399
  };
1400
- function et(e) {
1401
- return typeof e == "string" ? e : e != null && !de(e) ? JSON.stringify(e) : "";
1400
+ function tt(e) {
1401
+ return typeof e == "string" ? e : e != null && !pe(e) ? JSON.stringify(e) : "";
1402
1402
  }
1403
- const tt = {
1403
+ const st = {
1404
1404
  name: "VueTreeSelectHiddenFields",
1405
1405
  functional: !0,
1406
1406
  inject: ["instance"],
@@ -1409,7 +1409,7 @@ const tt = {
1409
1409
  instance: s
1410
1410
  } = t.injections;
1411
1411
  if (!s.name || s.disabled || !s.hasValue) return null;
1412
- let n = s.internalValue.map(et);
1412
+ let n = s.internalValue.map(tt);
1413
1413
  return s.multiple && s.joinValues && (n = [n.join(s.delimiter)]), n.map((i, l) => r("input", {
1414
1414
  attrs: {
1415
1415
  type: "hidden",
@@ -1421,47 +1421,54 @@ const tt = {
1421
1421
  key: `hidden-field-${l}`
1422
1422
  }));
1423
1423
  }
1424
- }, st = null, nt = null;
1425
- var it = /* @__PURE__ */ m(
1426
- tt,
1424
+ }, nt = null, it = null;
1425
+ var rt = /* @__PURE__ */ v(
1427
1426
  st,
1428
1427
  nt,
1428
+ it,
1429
1429
  !1,
1430
1430
  null,
1431
1431
  null
1432
1432
  );
1433
- const rt = it.exports;
1434
- function ot(e) {
1433
+ const ot = rt.exports;
1434
+ function lt(e) {
1435
1435
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1436
1436
  }
1437
- function X() {
1438
- return X = Object.assign ? Object.assign.bind() : function(e) {
1439
- for (var t, s = 1; s < arguments.length; s++) for (var n in t = arguments[s], t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
1440
- return e;
1441
- }, X.apply(this, arguments);
1442
- }
1443
- var lt = ["attrs", "props", "domProps"], at = ["class", "style", "directives"], ct = ["on", "nativeOn"], ut = function(e) {
1444
- return e.reduce(function(t, s) {
1445
- for (var n in s) if (!t[n]) t[n] = s[n];
1446
- else if (lt.indexOf(n) !== -1) t[n] = X({}, t[n], s[n]);
1447
- else if (at.indexOf(n) !== -1) {
1448
- var i = t[n] instanceof Array ? t[n] : [t[n]], l = s[n] instanceof Array ? s[n] : [s[n]];
1449
- t[n] = [].concat(i, l);
1450
- } else if (ct.indexOf(n) !== -1)
1451
- for (var o in s[n]) if (t[n][o]) {
1452
- var u = t[n][o] instanceof Array ? t[n][o] : [t[n][o]], p = s[n][o] instanceof Array ? s[n][o] : [s[n][o]];
1453
- t[n][o] = [].concat(u, p);
1454
- } else t[n][o] = s[n][o];
1455
- else if (n === "hook") for (var c in s[n]) t[n][c] = t[n][c] ? ht(t[n][c], s[n][c]) : s[n][c];
1456
- else t[n] = s[n];
1457
- return t;
1458
- }, {});
1459
- }, ht = function(e, t) {
1460
- return function() {
1461
- e && e.apply(this, arguments), t && t.apply(this, arguments);
1437
+ var j, le;
1438
+ function at() {
1439
+ if (le) return j;
1440
+ le = 1;
1441
+ function e() {
1442
+ return e = Object.assign ? Object.assign.bind() : function(a) {
1443
+ for (var c, h = 1; h < arguments.length; h++) for (var o in c = arguments[h], c) Object.prototype.hasOwnProperty.call(c, o) && (a[o] = c[o]);
1444
+ return a;
1445
+ }, e.apply(this, arguments);
1446
+ }
1447
+ var t = ["attrs", "props", "domProps"], s = ["class", "style", "directives"], n = ["on", "nativeOn"], i = function(a) {
1448
+ return a.reduce(function(c, h) {
1449
+ for (var o in h) if (!c[o]) c[o] = h[o];
1450
+ else if (t.indexOf(o) !== -1) c[o] = e({}, c[o], h[o]);
1451
+ else if (s.indexOf(o) !== -1) {
1452
+ var g = c[o] instanceof Array ? c[o] : [c[o]], p = h[o] instanceof Array ? h[o] : [h[o]];
1453
+ c[o] = [].concat(g, p);
1454
+ } else if (n.indexOf(o) !== -1)
1455
+ for (var f in h[o]) if (c[o][f]) {
1456
+ var M = c[o][f] instanceof Array ? c[o][f] : [c[o][f]], T = h[o][f] instanceof Array ? h[o][f] : [h[o][f]];
1457
+ c[o][f] = [].concat(M, T);
1458
+ } else c[o][f] = h[o][f];
1459
+ else if (o === "hook") for (var y in h[o]) c[o][y] = c[o][y] ? l(c[o][y], h[o][y]) : h[o][y];
1460
+ else c[o] = h[o];
1461
+ return c;
1462
+ }, {});
1463
+ }, l = function(a, c) {
1464
+ return function() {
1465
+ a && a.apply(this, arguments), c && c.apply(this, arguments);
1466
+ };
1462
1467
  };
1463
- }, dt = ut;
1464
- const $ = /* @__PURE__ */ ot(dt), pt = [d.ENTER, d.END, d.HOME, d.ARROW_LEFT, d.ARROW_UP, d.ARROW_RIGHT, d.ARROW_DOWN], ft = {
1468
+ return j = i, j;
1469
+ }
1470
+ var ct = at();
1471
+ const V = /* @__PURE__ */ lt(ct), ut = [m.ENTER, m.END, m.HOME, m.ARROW_LEFT, m.ARROW_UP, m.ARROW_RIGHT, m.ARROW_DOWN], ht = {
1465
1472
  name: "VueTreeSelectInput",
1466
1473
  inject: ["instance"],
1467
1474
  data: () => ({
@@ -1490,7 +1497,7 @@ const $ = /* @__PURE__ */ ot(dt), pt = [d.ENTER, d.END, d.HOME, d.ARROW_LEFT, d.
1490
1497
  }
1491
1498
  },
1492
1499
  created() {
1493
- this.debouncedCallback = Ae(this.updateSearchQuery, Ye, {
1500
+ this.debouncedCallback = Ve(this.updateSearchQuery, Xe, {
1494
1501
  leading: !0,
1495
1502
  trailing: !0
1496
1503
  });
@@ -1541,51 +1548,51 @@ const $ = /* @__PURE__ */ ot(dt), pt = [d.ENTER, d.END, d.HOME, d.ARROW_LEFT, d.
1541
1548
  e.keyCode
1542
1549
  );
1543
1550
  if (!(e.ctrlKey || e.shiftKey || e.altKey || e.metaKey)) {
1544
- if (!t.menu.isOpen && y(pt, s))
1551
+ if (!t.menu.isOpen && E(ut, s))
1545
1552
  return e.preventDefault(), t.openMenu();
1546
1553
  switch (s) {
1547
- case d.BACKSPACE: {
1554
+ case m.BACKSPACE: {
1548
1555
  t.backspaceRemoves && !this.value.length && t.removeLastValue();
1549
1556
  break;
1550
1557
  }
1551
- case d.ENTER: {
1558
+ case m.ENTER: {
1552
1559
  if (e.preventDefault(), t.menu.current === null) return;
1553
1560
  const n = t.getNode(t.menu.current);
1554
1561
  if (n.isBranch && t.disableBranchNodes) return;
1555
1562
  t.select(n);
1556
1563
  break;
1557
1564
  }
1558
- case d.ESCAPE: {
1565
+ case m.ESCAPE: {
1559
1566
  this.value.length ? this.clear() : t.menu.isOpen && t.closeMenu();
1560
1567
  break;
1561
1568
  }
1562
- case d.END: {
1569
+ case m.END: {
1563
1570
  e.preventDefault(), t.highlightLastOption();
1564
1571
  break;
1565
1572
  }
1566
- case d.HOME: {
1573
+ case m.HOME: {
1567
1574
  e.preventDefault(), t.highlightFirstOption();
1568
1575
  break;
1569
1576
  }
1570
- case d.ARROW_LEFT: {
1577
+ case m.ARROW_LEFT: {
1571
1578
  const n = t.getNode(t.menu.current);
1572
1579
  n.isBranch && t.shouldExpand(n) ? (e.preventDefault(), t.toggleExpanded(n)) : !n.isRootNode && (n.isLeaf || n.isBranch && !t.shouldExpand(n)) && (e.preventDefault(), t.setCurrentHighlightedOption(n.parentNode));
1573
1580
  break;
1574
1581
  }
1575
- case d.ARROW_UP: {
1582
+ case m.ARROW_UP: {
1576
1583
  e.preventDefault(), t.highlightPrevOption();
1577
1584
  break;
1578
1585
  }
1579
- case d.ARROW_RIGHT: {
1586
+ case m.ARROW_RIGHT: {
1580
1587
  const n = t.getNode(t.menu.current);
1581
1588
  n.isBranch && !t.shouldExpand(n) && (e.preventDefault(), t.toggleExpanded(n));
1582
1589
  break;
1583
1590
  }
1584
- case d.ARROW_DOWN: {
1591
+ case m.ARROW_DOWN: {
1585
1592
  e.preventDefault(), t.highlightNextOption();
1586
1593
  break;
1587
1594
  }
1588
- case d.DELETE: {
1595
+ case m.DELETE: {
1589
1596
  t.deleteRemoves && !this.value.length && t.removeLastValue();
1590
1597
  break;
1591
1598
  }
@@ -1601,18 +1608,18 @@ const $ = /* @__PURE__ */ ot(dt), pt = [d.ENTER, d.END, d.HOME, d.ARROW_LEFT, d.
1601
1608
  const {
1602
1609
  instance: e
1603
1610
  } = this, t = {}, s = [];
1604
- return e.searchable && !e.disabled && (s.push(this.renderInput()), this.needAutoSize && s.push(this.renderSizer())), e.searchable || U(t, {
1611
+ return e.searchable && !e.disabled && (s.push(this.renderInput()), this.needAutoSize && s.push(this.renderSizer())), e.searchable || X(t, {
1605
1612
  on: {
1606
1613
  focus: this.onFocus,
1607
1614
  blur: this.onBlur,
1608
1615
  keydown: this.onKeyDown
1609
1616
  },
1610
1617
  ref: "input"
1611
- }), !e.searchable && !e.disabled && U(t, {
1618
+ }), !e.searchable && !e.disabled && X(t, {
1612
1619
  attrs: {
1613
1620
  tabIndex: e.tabIndex
1614
1621
  }
1615
- }), r("div", $([{
1622
+ }), r("div", V([{
1616
1623
  class: "vue-treeselect__input-container"
1617
1624
  }, t]), [s]);
1618
1625
  },
@@ -1661,16 +1668,16 @@ const $ = /* @__PURE__ */ ot(dt), pt = [d.ENTER, d.END, d.HOME, d.ARROW_LEFT, d.
1661
1668
  render() {
1662
1669
  return this.renderInputContainer();
1663
1670
  }
1664
- }, mt = null, gt = null;
1665
- var St = /* @__PURE__ */ m(
1666
- ft,
1667
- mt,
1668
- gt,
1671
+ }, dt = null, pt = null;
1672
+ var ft = /* @__PURE__ */ v(
1673
+ ht,
1674
+ dt,
1675
+ pt,
1669
1676
  !1,
1670
1677
  null,
1671
1678
  null
1672
1679
  );
1673
- const ve = St.exports, vt = {
1680
+ const _e = ft.exports, mt = {
1674
1681
  name: "VueTreeSelectPlaceholder",
1675
1682
  inject: ["instance"],
1676
1683
  render() {
@@ -1685,16 +1692,16 @@ const ve = St.exports, vt = {
1685
1692
  class: t
1686
1693
  }, [e.placeholder]);
1687
1694
  }
1688
- }, _t = null, Ot = null;
1689
- var yt = /* @__PURE__ */ m(
1695
+ }, gt = null, vt = null;
1696
+ var St = /* @__PURE__ */ v(
1697
+ mt,
1698
+ gt,
1690
1699
  vt,
1691
- _t,
1692
- Ot,
1693
1700
  !1,
1694
1701
  null,
1695
1702
  null
1696
1703
  );
1697
- const _e = yt.exports, Nt = {
1704
+ const Oe = St.exports, _t = {
1698
1705
  name: "VueTreeSelectSingleValue",
1699
1706
  inject: ["instance"],
1700
1707
  methods: {
@@ -1716,34 +1723,34 @@ const _e = yt.exports, Nt = {
1716
1723
  } = this, s = e.hasValue && !e.trigger.searchQuery;
1717
1724
  return t([s && r("div", {
1718
1725
  class: "vue-treeselect__single-value"
1719
- }, [this.renderSingleValueLabel()]), r(_e), r(ve, {
1726
+ }, [this.renderSingleValueLabel()]), r(Oe), r(_e, {
1720
1727
  ref: "input"
1721
1728
  })]);
1722
1729
  }
1723
- }, Et = null, bt = null;
1724
- var wt = /* @__PURE__ */ m(
1725
- Nt,
1726
- Et,
1727
- bt,
1730
+ }, Ot = null, yt = null;
1731
+ var Nt = /* @__PURE__ */ v(
1732
+ _t,
1733
+ Ot,
1734
+ yt,
1728
1735
  !1,
1729
1736
  null,
1730
1737
  null
1731
1738
  );
1732
- const Ct = wt.exports, Lt = {
1739
+ const Et = Nt.exports, bt = {
1733
1740
  name: "VueTreeSelectDelete"
1734
1741
  };
1735
- var Mt = function() {
1742
+ var wt = function() {
1736
1743
  var t = this, s = t._self._c;
1737
1744
  return s("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 348.333 348.333" } }, [s("path", { attrs: { d: "M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z" } })]);
1738
- }, Tt = [], Dt = /* @__PURE__ */ m(
1739
- Lt,
1740
- Mt,
1741
- Tt,
1745
+ }, Ct = [], Lt = /* @__PURE__ */ v(
1746
+ bt,
1747
+ wt,
1748
+ Ct,
1742
1749
  !1,
1743
1750
  null,
1744
1751
  null
1745
1752
  );
1746
- const Oe = Dt.exports, xt = {
1753
+ const ye = Lt.exports, Mt = {
1747
1754
  name: "VueTreeSelectMultiValueItem",
1748
1755
  inject: ["instance"],
1749
1756
  props: {
@@ -1753,7 +1760,7 @@ const Oe = Dt.exports, xt = {
1753
1760
  }
1754
1761
  },
1755
1762
  methods: {
1756
- handleMouseDown: b(function() {
1763
+ handleMouseDown: w(function() {
1757
1764
  const {
1758
1765
  instance: t,
1759
1766
  node: s
@@ -1783,18 +1790,18 @@ const Oe = Dt.exports, xt = {
1783
1790
  class: "vue-treeselect__multi-value-label"
1784
1791
  }, [i]), r("span", {
1785
1792
  class: "vue-treeselect__icon vue-treeselect__value-remove"
1786
- }, [r(Oe)])])]);
1793
+ }, [r(ye)])])]);
1787
1794
  }
1788
- }, Rt = null, $t = null;
1789
- var It = /* @__PURE__ */ m(
1790
- xt,
1791
- Rt,
1792
- $t,
1795
+ }, Tt = null, Dt = null;
1796
+ var xt = /* @__PURE__ */ v(
1797
+ Mt,
1798
+ Tt,
1799
+ Dt,
1793
1800
  !1,
1794
1801
  null,
1795
1802
  null
1796
1803
  );
1797
- const At = It.exports, Vt = {
1804
+ const Rt = xt.exports, $t = {
1798
1805
  name: "VueTreeSelectMultiValue",
1799
1806
  inject: ["instance"],
1800
1807
  methods: {
@@ -1802,7 +1809,7 @@ const At = It.exports, Vt = {
1802
1809
  const {
1803
1810
  instance: e
1804
1811
  } = this;
1805
- return e.internalValue.slice(0, e.limit).map(e.getNode).map((t) => r(At, {
1812
+ return e.internalValue.slice(0, e.limit).map(e.getNode).map((t) => r(Rt, {
1806
1813
  key: `multi-value-item-${t.id}`,
1807
1814
  attrs: {
1808
1815
  node: t
@@ -1825,7 +1832,7 @@ const At = It.exports, Vt = {
1825
1832
  const {
1826
1833
  renderValueContainer: e
1827
1834
  } = this.$parent;
1828
- return e(r("transition-group", $([{
1835
+ return e(r("transition-group", V([{
1829
1836
  class: "vue-treeselect__multi-value"
1830
1837
  }, {
1831
1838
  props: {
@@ -1833,37 +1840,37 @@ const At = It.exports, Vt = {
1833
1840
  name: "vue-treeselect__multi-value-item--transition",
1834
1841
  appear: !0
1835
1842
  }
1836
- }]), [this.renderMultiValueItems(), this.renderExceedLimitTip(), r(_e, {
1843
+ }]), [this.renderMultiValueItems(), this.renderExceedLimitTip(), r(Oe, {
1837
1844
  key: "placeholder"
1838
- }), r(ve, {
1845
+ }), r(_e, {
1839
1846
  ref: "input",
1840
1847
  key: "input"
1841
1848
  })]));
1842
1849
  }
1843
- }, Bt = null, zt = null;
1844
- var Ft = /* @__PURE__ */ m(
1845
- Vt,
1846
- Bt,
1847
- zt,
1850
+ }, It = null, At = null;
1851
+ var Vt = /* @__PURE__ */ v(
1852
+ $t,
1853
+ It,
1854
+ At,
1848
1855
  !1,
1849
1856
  null,
1850
1857
  null
1851
1858
  );
1852
- const kt = Ft.exports, Ht = {
1859
+ const Bt = Vt.exports, zt = {
1853
1860
  name: "VueTreeSelectArrow"
1854
1861
  };
1855
- var Pt = function() {
1862
+ var Ft = function() {
1856
1863
  var t = this, s = t._self._c;
1857
1864
  return s("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 292.362 292.362" } }, [s("path", { attrs: { d: "M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z" } })]);
1858
- }, Wt = [], jt = /* @__PURE__ */ m(
1859
- Ht,
1860
- Pt,
1861
- Wt,
1865
+ }, kt = [], Ht = /* @__PURE__ */ v(
1866
+ zt,
1867
+ Ft,
1868
+ kt,
1862
1869
  !1,
1863
1870
  null,
1864
1871
  null
1865
1872
  );
1866
- const ye = jt.exports, Qt = {
1873
+ const Ne = Ht.exports, Pt = {
1867
1874
  name: "VueTreeSelectControl",
1868
1875
  inject: ["instance"],
1869
1876
  computed: {
@@ -1913,7 +1920,7 @@ const ye = jt.exports, Qt = {
1913
1920
  on: {
1914
1921
  mousedown: this.handleMouseDownOnX
1915
1922
  }
1916
- }, [r(Oe, {
1923
+ }, [r(ye, {
1917
1924
  class: "vue-treeselect__x"
1918
1925
  })]) : null;
1919
1926
  },
@@ -1929,20 +1936,20 @@ const ye = jt.exports, Qt = {
1929
1936
  on: {
1930
1937
  mousedown: this.handleMouseDownOnArrow
1931
1938
  }
1932
- }, [r(ye, {
1939
+ }, [r(Ne, {
1933
1940
  class: t
1934
1941
  })]) : null;
1935
1942
  },
1936
- handleMouseDownOnX: b(function(t) {
1943
+ handleMouseDownOnX: w(function(t) {
1937
1944
  t.stopPropagation(), t.preventDefault();
1938
1945
  const {
1939
1946
  instance: s
1940
1947
  } = this, n = s.beforeClearAll(), i = (l) => {
1941
1948
  l && s.clear();
1942
1949
  };
1943
- le(n) ? n.then(i) : setTimeout(() => i(n), 0);
1950
+ ae(n) ? n.then(i) : setTimeout(() => i(n), 0);
1944
1951
  }),
1945
- handleMouseDownOnArrow: b(function(t) {
1952
+ handleMouseDownOnArrow: w(function(t) {
1946
1953
  t.preventDefault(), t.stopPropagation();
1947
1954
  const {
1948
1955
  instance: s
@@ -1959,7 +1966,7 @@ const ye = jt.exports, Qt = {
1959
1966
  render() {
1960
1967
  const {
1961
1968
  instance: e
1962
- } = this, t = e.single ? Ct : kt;
1969
+ } = this, t = e.single ? Et : Bt;
1963
1970
  return r("div", {
1964
1971
  class: "vue-treeselect__control",
1965
1972
  on: {
@@ -1969,16 +1976,16 @@ const ye = jt.exports, Qt = {
1969
1976
  ref: "value-container"
1970
1977
  }), this.renderX(), this.renderArrow()]);
1971
1978
  }
1972
- }, Kt = null, qt = null;
1973
- var Ut = /* @__PURE__ */ m(
1974
- Qt,
1975
- Kt,
1976
- qt,
1979
+ }, Wt = null, jt = null;
1980
+ var Qt = /* @__PURE__ */ v(
1981
+ Pt,
1982
+ Wt,
1983
+ jt,
1977
1984
  !1,
1978
1985
  null,
1979
1986
  null
1980
1987
  );
1981
- const Yt = Ut.exports, Xt = {
1988
+ const qt = Qt.exports, Kt = {
1982
1989
  name: "VueTreeSelectTip",
1983
1990
  functional: !0,
1984
1991
  props: {
@@ -2006,18 +2013,18 @@ const Yt = Ut.exports, Xt = {
2006
2013
  class: `vue-treeselect__tip-text vue-treeselect__${s.type}-tip-text`
2007
2014
  }, [n])]);
2008
2015
  }
2009
- }, Gt = null, Jt = null;
2010
- var Zt = /* @__PURE__ */ m(
2011
- Xt,
2012
- Gt,
2013
- Jt,
2016
+ }, Ut = null, Yt = null;
2017
+ var Xt = /* @__PURE__ */ v(
2018
+ Kt,
2019
+ Ut,
2020
+ Yt,
2014
2021
  !1,
2015
2022
  null,
2016
2023
  null
2017
2024
  );
2018
- const _ = Zt.exports;
2019
- let W, j, Q;
2020
- const Ne = {
2025
+ const O = Xt.exports;
2026
+ let Q, q, K;
2027
+ const Ee = {
2021
2028
  name: "VueTreeSelectOption",
2022
2029
  inject: ["instance"],
2023
2030
  props: {
@@ -2091,15 +2098,15 @@ const Ne = {
2091
2098
  on: {
2092
2099
  mousedown: this.handleMouseDownOnArrow
2093
2100
  }
2094
- }, [r("transition", $([{}, s]), [r(ye, {
2101
+ }, [r("transition", V([{}, s]), [r(Ne, {
2095
2102
  class: n
2096
2103
  })])]);
2097
2104
  }
2098
2105
  return (
2099
2106
  /* node.isLeaf && */
2100
- e.hasBranchNodes ? (W || (W = r("div", {
2107
+ e.hasBranchNodes ? (Q || (Q = r("div", {
2101
2108
  class: "vue-treeselect__option-arrow-placeholder"
2102
- }, [" "])), W) : null
2109
+ }, [" "])), Q) : null
2103
2110
  );
2104
2111
  },
2105
2112
  renderLabelContainer(e) {
@@ -2125,25 +2132,25 @@ const Ne = {
2125
2132
  node: t
2126
2133
  } = this, s = e.forest.checkedStateMap[t.id], n = {
2127
2134
  "vue-treeselect__checkbox": !0,
2128
- "vue-treeselect__checkbox--checked": s === ge,
2129
- "vue-treeselect__checkbox--indeterminate": s === me,
2130
- "vue-treeselect__checkbox--unchecked": s === Y,
2135
+ "vue-treeselect__checkbox--checked": s === ve,
2136
+ "vue-treeselect__checkbox--indeterminate": s === ge,
2137
+ "vue-treeselect__checkbox--unchecked": s === G,
2131
2138
  "vue-treeselect__checkbox--disabled": t.isDisabled
2132
2139
  };
2133
- return j || (j = r("span", {
2140
+ return q || (q = r("span", {
2134
2141
  class: "vue-treeselect__check-mark"
2135
- })), Q || (Q = r("span", {
2142
+ })), K || (K = r("span", {
2136
2143
  class: "vue-treeselect__minus-mark"
2137
2144
  })), r("span", {
2138
2145
  class: n
2139
- }, [j, Q]);
2146
+ }, [q, K]);
2140
2147
  },
2141
2148
  renderLabel() {
2142
2149
  const {
2143
2150
  instance: e,
2144
2151
  node: t
2145
- } = this, s = t.isBranch && (e.localSearch.active ? e.showCountOnSearchComputed : e.showCount), n = s ? e.localSearch.active ? e.localSearch.countMap[t.id][e.showCountOf] : t.count[e.showCountOf] : NaN, i = "vue-treeselect__label", l = "vue-treeselect__count", o = e.$scopedSlots["option-label"];
2146
- return o ? o({
2152
+ } = this, s = t.isBranch && (e.localSearch.active ? e.showCountOnSearchComputed : e.showCount), n = s ? e.localSearch.active ? e.localSearch.countMap[t.id][e.showCountOf] : t.count[e.showCountOf] : NaN, i = "vue-treeselect__label", l = "vue-treeselect__count", a = e.$scopedSlots["option-label"];
2153
+ return a ? a({
2147
2154
  node: t,
2148
2155
  shouldShowCount: s,
2149
2156
  count: n,
@@ -2159,7 +2166,7 @@ const Ne = {
2159
2166
  const {
2160
2167
  node: e
2161
2168
  } = this;
2162
- return e.childrenStates.isLoaded ? e.children.map((t) => r(Ne, {
2169
+ return e.childrenStates.isLoaded ? e.children.map((t) => r(Ee, {
2163
2170
  attrs: {
2164
2171
  node: t
2165
2172
  },
@@ -2171,7 +2178,7 @@ const Ne = {
2171
2178
  instance: e,
2172
2179
  node: t
2173
2180
  } = this;
2174
- return !t.childrenStates.isLoaded || t.children.length ? null : r(_, {
2181
+ return !t.childrenStates.isLoaded || t.children.length ? null : r(O, {
2175
2182
  attrs: {
2176
2183
  type: "no-children",
2177
2184
  icon: "warning"
@@ -2183,7 +2190,7 @@ const Ne = {
2183
2190
  instance: e,
2184
2191
  node: t
2185
2192
  } = this;
2186
- return t.childrenStates.isLoading ? r(_, {
2193
+ return t.childrenStates.isLoading ? r(O, {
2187
2194
  attrs: {
2188
2195
  type: "loading",
2189
2196
  icon: "loader"
@@ -2195,7 +2202,7 @@ const Ne = {
2195
2202
  instance: e,
2196
2203
  node: t
2197
2204
  } = this;
2198
- return t.childrenStates.loadingError ? r(_, {
2205
+ return t.childrenStates.loadingError ? r(O, {
2199
2206
  attrs: {
2200
2207
  type: "error",
2201
2208
  icon: "error"
@@ -2217,21 +2224,21 @@ const Ne = {
2217
2224
  } = this;
2218
2225
  e.target === e.currentTarget && t.setCurrentHighlightedOption(s, !1);
2219
2226
  },
2220
- handleMouseDownOnArrow: b(function() {
2227
+ handleMouseDownOnArrow: w(function() {
2221
2228
  const {
2222
2229
  instance: t,
2223
2230
  node: s
2224
2231
  } = this;
2225
2232
  t.toggleExpanded(s);
2226
2233
  }),
2227
- handleMouseDownOnLabelContainer: b(function() {
2234
+ handleMouseDownOnLabelContainer: w(function() {
2228
2235
  const {
2229
2236
  instance: t,
2230
2237
  node: s
2231
2238
  } = this;
2232
2239
  s.isBranch && t.disableBranchNodes ? t.toggleExpanded(s) : t.select(s);
2233
2240
  }),
2234
- handleMouseDownOnRetry: b(function() {
2241
+ handleMouseDownOnRetry: w(function() {
2235
2242
  const {
2236
2243
  instance: t,
2237
2244
  node: s
@@ -2252,23 +2259,23 @@ const Ne = {
2252
2259
  };
2253
2260
  return r("div", {
2254
2261
  class: s
2255
- }, [this.renderOption(), e.isBranch && r("transition", $([{}, n]), [this.renderSubOptionsList()])]);
2262
+ }, [this.renderOption(), e.isBranch && r("transition", V([{}, n]), [this.renderSubOptionsList()])]);
2256
2263
  }
2257
- }, es = null, ts = null;
2258
- var ss = /* @__PURE__ */ m(
2259
- Ne,
2260
- es,
2261
- ts,
2264
+ }, Gt = null, Jt = null;
2265
+ var Zt = /* @__PURE__ */ v(
2266
+ Ee,
2267
+ Gt,
2268
+ Jt,
2262
2269
  !1,
2263
2270
  null,
2264
2271
  null
2265
2272
  );
2266
- const ns = ss.exports, is = {
2273
+ const es = Zt.exports, ts = {
2267
2274
  top: "top",
2268
2275
  bottom: "bottom",
2269
2276
  above: "top",
2270
2277
  below: "bottom"
2271
- }, rs = {
2278
+ }, ss = {
2272
2279
  name: "VueTreeSelectMenu",
2273
2280
  inject: ["instance"],
2274
2281
  computed: {
@@ -2356,7 +2363,7 @@ const ns = ss.exports, is = {
2356
2363
  } = this;
2357
2364
  return r("div", {
2358
2365
  class: "vue-treeselect__list"
2359
- }, [e.forest.normalizedOptions.map((t) => r(ns, {
2366
+ }, [e.forest.normalizedOptions.map((t) => r(es, {
2360
2367
  attrs: {
2361
2368
  node: t
2362
2369
  },
@@ -2367,7 +2374,7 @@ const ns = ss.exports, is = {
2367
2374
  const {
2368
2375
  instance: e
2369
2376
  } = this;
2370
- return r(_, {
2377
+ return r(O, {
2371
2378
  attrs: {
2372
2379
  type: "search-prompt",
2373
2380
  icon: "warning"
@@ -2378,7 +2385,7 @@ const ns = ss.exports, is = {
2378
2385
  const {
2379
2386
  instance: e
2380
2387
  } = this;
2381
- return r(_, {
2388
+ return r(O, {
2382
2389
  attrs: {
2383
2390
  type: "loading",
2384
2391
  icon: "loader"
@@ -2389,7 +2396,7 @@ const ns = ss.exports, is = {
2389
2396
  const {
2390
2397
  instance: e
2391
2398
  } = this;
2392
- return r(_, {
2399
+ return r(O, {
2393
2400
  attrs: {
2394
2401
  type: "error",
2395
2402
  icon: "error"
@@ -2408,7 +2415,7 @@ const ns = ss.exports, is = {
2408
2415
  const {
2409
2416
  instance: e
2410
2417
  } = this, t = e.getRemoteSearchEntry();
2411
- return r(_, {
2418
+ return r(O, {
2412
2419
  attrs: {
2413
2420
  type: "error",
2414
2421
  icon: "error"
@@ -2427,7 +2434,7 @@ const ns = ss.exports, is = {
2427
2434
  const {
2428
2435
  instance: e
2429
2436
  } = this;
2430
- return r(_, {
2437
+ return r(O, {
2431
2438
  attrs: {
2432
2439
  type: "no-options",
2433
2440
  icon: "warning"
@@ -2438,7 +2445,7 @@ const ns = ss.exports, is = {
2438
2445
  const {
2439
2446
  instance: e
2440
2447
  } = this;
2441
- return r(_, {
2448
+ return r(O, {
2442
2449
  attrs: {
2443
2450
  type: "no-results",
2444
2451
  icon: "warning"
@@ -2456,15 +2463,15 @@ const ns = ss.exports, is = {
2456
2463
  instance: e
2457
2464
  } = this;
2458
2465
  if (!e.menu.isOpen) return;
2459
- const t = e.getMenu(), s = e.getControl(), n = t.getBoundingClientRect(), i = s.getBoundingClientRect(), l = n.height, o = window.innerHeight, u = i.top, p = window.innerHeight - i.bottom, c = i.top >= 0 && i.top <= o || i.top < 0 && i.bottom > 0, g = p > l + re, f = u > l + re;
2460
- c ? e.openDirection !== "auto" ? e.menu.placement = is[e.openDirection] : g || !f ? e.menu.placement = "bottom" : e.menu.placement = "top" : e.closeMenu();
2466
+ const t = e.getMenu(), s = e.getControl(), n = t.getBoundingClientRect(), i = s.getBoundingClientRect(), l = n.height, a = window.innerHeight, c = i.top, h = window.innerHeight - i.bottom, o = i.top >= 0 && i.top <= a || i.top < 0 && i.bottom > 0, g = h > l + re, p = c > l + re;
2467
+ o ? e.openDirection !== "auto" ? e.menu.placement = ts[e.openDirection] : g || !p ? e.menu.placement = "bottom" : e.menu.placement = "top" : e.closeMenu();
2461
2468
  },
2462
2469
  setupMenuSizeWatcher() {
2463
2470
  const {
2464
2471
  instance: e
2465
2472
  } = this, t = e.getMenu();
2466
2473
  this.menuSizeWatcher || (this.menuSizeWatcher = {
2467
- remove: ue(t, this.adjustMenuOpenDirection)
2474
+ remove: he(t, this.adjustMenuOpenDirection)
2468
2475
  });
2469
2476
  },
2470
2477
  setupMenuResizeAndScrollEventListeners() {
@@ -2472,7 +2479,7 @@ const ns = ss.exports, is = {
2472
2479
  instance: e
2473
2480
  } = this, t = e.getControl();
2474
2481
  this.menuResizeAndScrollEventListeners || (this.menuResizeAndScrollEventListeners = {
2475
- remove: he(t, this.adjustMenuOpenDirection)
2482
+ remove: de(t, this.adjustMenuOpenDirection)
2476
2483
  });
2477
2484
  },
2478
2485
  removeMenuSizeWatcher() {
@@ -2493,16 +2500,16 @@ const ns = ss.exports, is = {
2493
2500
  }
2494
2501
  }, [this.renderMenu()])]);
2495
2502
  }
2496
- }, os = null, ls = null;
2497
- var as = /* @__PURE__ */ m(
2498
- rs,
2499
- os,
2500
- ls,
2503
+ }, ns = null, is = null;
2504
+ var rs = /* @__PURE__ */ v(
2505
+ ss,
2506
+ ns,
2507
+ is,
2501
2508
  !1,
2502
2509
  null,
2503
2510
  null
2504
2511
  );
2505
- const Ee = as.exports, cs = {
2512
+ const be = rs.exports, os = {
2506
2513
  name: "VueTreeSelectPortalTarget",
2507
2514
  inject: ["instance"],
2508
2515
  watch: {
@@ -2534,7 +2541,7 @@ const Ee = as.exports, cs = {
2534
2541
  instance: e
2535
2542
  } = this, t = e.getControl();
2536
2543
  this.controlResizeAndScrollEventListeners || (this.controlResizeAndScrollEventListeners = {
2537
- remove: he(t, this.updateMenuContainerOffset)
2544
+ remove: de(t, this.updateMenuContainerOffset)
2538
2545
  });
2539
2546
  },
2540
2547
  setupControlSizeWatcher() {
@@ -2542,7 +2549,7 @@ const Ee = as.exports, cs = {
2542
2549
  instance: e
2543
2550
  } = this, t = e.getControl();
2544
2551
  this.controlSizeWatcher || (this.controlSizeWatcher = {
2545
- remove: ue(t, () => {
2552
+ remove: he(t, () => {
2546
2553
  this.updateWidth(), this.updateMenuContainerOffset();
2547
2554
  })
2548
2555
  });
@@ -2562,8 +2569,8 @@ const Ee = as.exports, cs = {
2562
2569
  updateMenuContainerOffset() {
2563
2570
  const {
2564
2571
  instance: e
2565
- } = this, t = e.getControl(), s = this.$el, n = t.getBoundingClientRect(), i = s.getBoundingClientRect(), l = e.menu.placement === "bottom" ? n.height : 0, o = `${Math.round(n.left - i.left)}px`, u = `${Math.round(n.top - i.top + l)}px`, p = this.$refs.menu.$refs["menu-container"].style, g = fe(["transform", "webkitTransform", "MozTransform", "msTransform"], (f) => f in document.body.style);
2566
- p[g] = `translate(${o}, ${u})`;
2572
+ } = this, t = e.getControl(), s = this.$el, n = t.getBoundingClientRect(), i = s.getBoundingClientRect(), l = e.menu.placement === "bottom" ? n.height : 0, a = `${Math.round(n.left - i.left)}px`, c = `${Math.round(n.top - i.top + l)}px`, h = this.$refs.menu.$refs["menu-container"].style, g = me(["transform", "webkitTransform", "MozTransform", "msTransform"], (p) => p in document.body.style);
2573
+ h[g] = `translate(${a}, ${c})`;
2567
2574
  }
2568
2575
  },
2569
2576
  render() {
@@ -2578,7 +2585,7 @@ const Ee = as.exports, cs = {
2578
2585
  attrs: {
2579
2586
  "data-instance-id": e.getInstanceId()
2580
2587
  }
2581
- }, [r(Ee, {
2588
+ }, [r(be, {
2582
2589
  ref: "menu"
2583
2590
  })]);
2584
2591
  },
@@ -2586,8 +2593,8 @@ const Ee = as.exports, cs = {
2586
2593
  this.removeHandlers();
2587
2594
  }
2588
2595
  };
2589
- let K;
2590
- const us = {
2596
+ let U;
2597
+ const ls = {
2591
2598
  name: "VueTreeSelectMenuPortal",
2592
2599
  created() {
2593
2600
  this.portalTarget = null;
@@ -2601,32 +2608,32 @@ const us = {
2601
2608
  methods: {
2602
2609
  setup() {
2603
2610
  const e = document.createElement("div");
2604
- document.body.appendChild(e), this.portalTarget = new xe(v({
2611
+ document.body.appendChild(e), this.portalTarget = new Re(_({
2605
2612
  el: e,
2606
2613
  parent: this
2607
- }, cs));
2614
+ }, os));
2608
2615
  },
2609
2616
  teardown() {
2610
2617
  document.body.removeChild(this.portalTarget.$el), this.portalTarget.$el.innerHTML = "", this.portalTarget.$destroy(), this.portalTarget = null;
2611
2618
  }
2612
2619
  },
2613
2620
  render() {
2614
- return K || (K = r("div", {
2621
+ return U || (U = r("div", {
2615
2622
  class: "vue-treeselect__menu-placeholder"
2616
- })), K;
2623
+ })), U;
2617
2624
  }
2618
- }, hs = null, ds = null;
2619
- var ps = /* @__PURE__ */ m(
2620
- us,
2621
- hs,
2622
- ds,
2625
+ }, as = null, cs = null;
2626
+ var us = /* @__PURE__ */ v(
2627
+ ls,
2628
+ as,
2629
+ cs,
2623
2630
  !1,
2624
2631
  null,
2625
2632
  null
2626
2633
  );
2627
- const fs = ps.exports, Os = {
2634
+ const hs = us.exports, vs = {
2628
2635
  name: "VueTreeSelect",
2629
- mixins: [Ze],
2636
+ mixins: [et],
2630
2637
  computed: {
2631
2638
  wrapperClass() {
2632
2639
  return {
@@ -2649,15 +2656,15 @@ const fs = ps.exports, Os = {
2649
2656
  return r("div", {
2650
2657
  ref: "wrapper",
2651
2658
  class: this.wrapperClass
2652
- }, [r(rt), r(Yt, {
2659
+ }, [r(ot), r(qt, {
2653
2660
  ref: "control"
2654
- }), this.appendToBody ? r(fs, {
2661
+ }), this.appendToBody ? r(hs, {
2655
2662
  ref: "portal"
2656
- }) : r(Ee, {
2663
+ }) : r(be, {
2657
2664
  ref: "menu"
2658
2665
  })]);
2659
2666
  }
2660
2667
  };
2661
2668
  export {
2662
- Os as default
2669
+ vs as default
2663
2670
  };