vi-grid-builder 2.1.1 → 2.1.2

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.
package/README.md CHANGED
@@ -127,33 +127,90 @@ npm run dev
127
127
  ## Example config for columns
128
128
 
129
129
  ```js
130
- columns: [
130
+ columns: [{
131
+ label: 'ID',
132
+ name: 'id',
133
+ type: 'number',
134
+ sortable: true,
135
+ },
131
136
  {
132
- label: 'ID',
133
- type: 'vi-grid-text',
134
- name: 'id',
135
- sortable: true,
136
- align: 'right'
137
+ label: 'Title',
138
+ name: 'title',
137
139
  },
138
140
  {
139
- label: 'Name',
140
- type: 'vi-grid-text',
141
- name: 'user',
142
- format: (row) => `${row.firstName} ${row.lastName}`,
143
- align: 'center'
141
+ label: 'Link',
142
+ name: 'link',
143
+ type: 'link',
144
+ // link:'link'
144
145
  },
145
146
  {
146
- label: 'Hidden column',
147
- type: 'vi-grid-text',
147
+ label: 'Link with title',
148
148
  name: 'title',
149
- isVisible: false // This can be a function as well
149
+ type: 'link',
150
+ link: 'link'
150
151
  },
151
152
  {
152
- label: 'Hidden column with custom rule',
153
- type: 'vi-grid-text',
154
- name: 'title',
155
- isVisible: () => user.role === 'member'
156
- }
153
+ label: 'Price',
154
+ name: 'price',
155
+ type: 'number',
156
+ sortable: true,
157
+ format: {
158
+ style: 'currency',
159
+ currency: 'USD',
160
+ }
161
+ },
162
+ {
163
+ label: 'Image',
164
+ name: 'image',
165
+ type: 'image'
166
+ },
167
+ {
168
+ label: 'Status',
169
+ name: 'status',
170
+ type: 'badge'
171
+ },
172
+ {
173
+ label: 'Date',
174
+ name: 'date',
175
+ type: 'date',
176
+ mode: 'date'
177
+ },
178
+ {
179
+ label: 'Time',
180
+ name: 'date',
181
+ type: 'date',
182
+ },
183
+ {
184
+ label: 'Simple actions',
185
+ name: 'actions',
186
+ type: 'actions',
187
+ actions: [
188
+ {
189
+ action: 'edit',
190
+ name: 'Edit post'
191
+ },
192
+ {
193
+ action: 'remove',
194
+ name: 'Remove post'
195
+ }
196
+ ]
197
+ },
198
+ {
199
+ label: 'Kebab type actions',
200
+ name: 'actions',
201
+ type: 'actions',
202
+ kebab: true,
203
+ actions: [
204
+ {
205
+ action: 'edit',
206
+ name: 'Edit post'
207
+ },
208
+ {
209
+ action: 'remove',
210
+ name: 'Remove post'
211
+ }
212
+ ]
213
+ },
157
214
  ]
158
215
  ```
159
216
 
@@ -182,45 +239,46 @@ Props that you will receive for the custom field are:
182
239
 
183
240
  The component can look like this
184
241
 
185
- ```js
242
+ ```vue
243
+
186
244
  <template>
187
- <div class="avatar">
188
- <img v-if="row.picture"
189
- :src="row.picture" alt="User Avatar" class="avatar-img" />
190
- <div v-else class="avatar-initials">{{initials}}</div>
191
- </div>
245
+ <div class="avatar">
246
+ <img v-if="row.picture"
247
+ :src="row.picture" alt="User Avatar" class="avatar-img"/>
248
+ <div v-else class="avatar-initials">{{initials}}</div>
249
+ </div>
192
250
  </template>
193
251
 
194
252
  <script>
195
- export default {
253
+ export default {
196
254
  name: 'UserAvatar',
197
255
  props: {
198
- field: {
199
- type: Object,
200
- },
201
- value: {},
202
- originalValue: {},
203
- row: {
204
- type: Object,
205
- }
206
- },
256
+ field: {
257
+ type: Object,
258
+ },
259
+ value: {},
260
+ originalValue: {},
261
+ row: {
262
+ type: Object,
263
+ }
264
+ },
207
265
  computed: {
208
- initials() {
209
- if (this.row.name) {
210
- const nameParts = this.row.name.split(' ');
211
- return nameParts.map(part => part[0].toUpperCase()).join('');
212
- }
213
- return '';
214
- }
215
- }
216
- };
266
+ initials() {
267
+ if (this.row.name) {
268
+ const nameParts = this.row.name.split(' ');
269
+ return nameParts.map(part => part[0].toUpperCase()).join('');
270
+ }
271
+ return '';
272
+ }
273
+ }
274
+ };
217
275
  </script>
218
276
  ```
219
277
 
220
278
  Then we need to add this component as part of the settings for the plugin.
221
279
  See example:
222
280
 
223
- ```js
281
+ ```javascript
224
282
  import UserAvatar from "./components/user/UserAvatar.vue";
225
283
  import ViGridBuilder from "vi-grid-builder";
226
284
 
@@ -230,23 +288,12 @@ const app = createApp(App)
230
288
  UserAvatar
231
289
  }
232
290
  })
291
+ ```
233
292
 
234
- After
235
- adding
236
- the
237
- component in the
238
- fieldComponents
239
- we
240
- can
241
- use
242
- the
243
- new field
244
- type in the
245
- definition
246
- for the columns, like
293
+ After adding the component in the fieldComponents we can use the new field type in the definition for the columns, like
247
294
  this
248
- :
249
295
 
296
+ ```javascript
250
297
  columns: [
251
298
  {
252
299
  label: 'User',
@@ -1,4 +1,4 @@
1
- import { openBlock as y, createElementBlock as w, mergeProps as At, toDisplayString as M, createElementVNode as C, defineComponent as Tt, computed as A, watch as Cn, h as On, resolveComponent as z, withModifiers as Mt, createVNode as q, Fragment as ce, renderList as ue, createCommentVNode as j, ref as K, onMounted as ya, onUnmounted as ba, createBlock as R, resolveDynamicComponent as Se, renderSlot as V, normalizeClass as Y, withCtx as he, createTextVNode as wa } from "vue";
1
+ import { openBlock as y, createElementBlock as w, mergeProps as At, toDisplayString as M, createElementVNode as C, defineComponent as Tt, computed as A, watch as Cn, h as On, resolveComponent as z, withModifiers as Mt, createVNode as q, Fragment as ce, renderList as ue, createCommentVNode as j, ref as K, onMounted as ya, onUnmounted as ba, createBlock as R, resolveDynamicComponent as Se, renderSlot as L, normalizeClass as Y, withCtx as he, createTextVNode as wa } from "vue";
2
2
  const I = (e, t) => {
3
3
  const n = e.__vccOpts || e;
4
4
  for (const [a, r] of t)
@@ -122,7 +122,7 @@ function za(e) {
122
122
  var t = H(e), n = ze(t).getTime() - Ya(t).getTime();
123
123
  return Math.round(n / ja) + 1;
124
124
  }
125
- function Ge(e, t) {
125
+ function Be(e, t) {
126
126
  var n, a, r, i, o, s, l, c;
127
127
  N(1, arguments);
128
128
  var f = Ke(), d = ne((n = (a = (r = (i = t == null ? void 0 : t.weekStartsOn) !== null && i !== void 0 ? i : t == null || (o = t.locale) === null || o === void 0 || (s = o.options) === null || s === void 0 ? void 0 : s.weekStartsOn) !== null && r !== void 0 ? r : f.weekStartsOn) !== null && a !== void 0 ? a : (l = f.locale) === null || l === void 0 || (c = l.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && n !== void 0 ? n : 0);
@@ -139,24 +139,24 @@ function Dn(e, t) {
139
139
  throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
140
140
  var b = /* @__PURE__ */ new Date(0);
141
141
  b.setUTCFullYear(d + 1, 0, m), b.setUTCHours(0, 0, 0, 0);
142
- var x = Ge(b, t), _ = /* @__PURE__ */ new Date(0);
142
+ var x = Be(b, t), _ = /* @__PURE__ */ new Date(0);
143
143
  _.setUTCFullYear(d, 0, m), _.setUTCHours(0, 0, 0, 0);
144
- var g = Ge(_, t);
144
+ var g = Be(_, t);
145
145
  return f.getTime() >= x.getTime() ? d + 1 : f.getTime() >= g.getTime() ? d : d - 1;
146
146
  }
147
- function Ga(e, t) {
147
+ function Ba(e, t) {
148
148
  var n, a, r, i, o, s, l, c;
149
149
  N(1, arguments);
150
150
  var f = Ke(), d = ne((n = (a = (r = (i = t == null ? void 0 : t.firstWeekContainsDate) !== null && i !== void 0 ? i : t == null || (o = t.locale) === null || o === void 0 || (s = o.options) === null || s === void 0 ? void 0 : s.firstWeekContainsDate) !== null && r !== void 0 ? r : f.firstWeekContainsDate) !== null && a !== void 0 ? a : (l = f.locale) === null || l === void 0 || (c = l.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && n !== void 0 ? n : 1), h = Dn(e, t), m = /* @__PURE__ */ new Date(0);
151
151
  m.setUTCFullYear(h, 0, d), m.setUTCHours(0, 0, 0, 0);
152
- var b = Ge(m, t);
152
+ var b = Be(m, t);
153
153
  return b;
154
154
  }
155
- var Ba = 6048e5;
155
+ var Ga = 6048e5;
156
156
  function $a(e, t) {
157
157
  N(1, arguments);
158
- var n = H(e), a = Ge(n, t).getTime() - Ga(n, t).getTime();
159
- return Math.round(a / Ba) + 1;
158
+ var n = H(e), a = Be(n, t).getTime() - Ba(n, t).getTime();
159
+ return Math.round(a / Ga) + 1;
160
160
  }
161
161
  function k(e, t) {
162
162
  for (var n = e < 0 ? "-" : "", a = Math.abs(e).toString(); a.length < t; )
@@ -700,7 +700,7 @@ var ge = {
700
700
  return "Z";
701
701
  switch (n) {
702
702
  case "X":
703
- return Bt(o);
703
+ return Gt(o);
704
704
  case "XXXX":
705
705
  case "XX":
706
706
  return se(o);
@@ -715,7 +715,7 @@ var ge = {
715
715
  var i = r._originalDate || t, o = i.getTimezoneOffset();
716
716
  switch (n) {
717
717
  case "x":
718
- return Bt(o);
718
+ return Gt(o);
719
719
  case "xxxx":
720
720
  case "xx":
721
721
  return se(o);
@@ -732,7 +732,7 @@ var ge = {
732
732
  case "O":
733
733
  case "OO":
734
734
  case "OOO":
735
- return "GMT" + Gt(o, ":");
735
+ return "GMT" + Bt(o, ":");
736
736
  case "OOOO":
737
737
  default:
738
738
  return "GMT" + se(o, ":");
@@ -745,7 +745,7 @@ var ge = {
745
745
  case "z":
746
746
  case "zz":
747
747
  case "zzz":
748
- return "GMT" + Gt(o, ":");
748
+ return "GMT" + Bt(o, ":");
749
749
  case "zzzz":
750
750
  default:
751
751
  return "GMT" + se(o, ":");
@@ -762,14 +762,14 @@ var ge = {
762
762
  return k(o, n.length);
763
763
  }
764
764
  };
765
- function Gt(e, t) {
765
+ function Bt(e, t) {
766
766
  var n = e > 0 ? "-" : "+", a = Math.abs(e), r = Math.floor(a / 60), i = a % 60;
767
767
  if (i === 0)
768
768
  return n + String(r);
769
769
  var o = t || "";
770
770
  return n + String(r) + o + k(i, 2);
771
771
  }
772
- function Bt(e, t) {
772
+ function Gt(e, t) {
773
773
  if (e % 60 === 0) {
774
774
  var n = e > 0 ? "-" : "+";
775
775
  return n + k(Math.abs(e) / 60, 2);
@@ -1262,14 +1262,14 @@ var Vr = {
1262
1262
  }
1263
1263
  };
1264
1264
  const Yr = Vr;
1265
- var jr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, zr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Gr = /^'([^]*?)'?$/, Br = /''/g, $r = /[a-zA-Z]/;
1265
+ var jr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, zr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Br = /^'([^]*?)'?$/, Gr = /''/g, $r = /[a-zA-Z]/;
1266
1266
  function Hr(e, t, n) {
1267
1267
  var a, r, i, o, s, l, c, f, d, h, m, b, x, _, g, p, P, O;
1268
1268
  N(2, arguments);
1269
- var T = String(t), W = Ke(), E = (a = (r = n == null ? void 0 : n.locale) !== null && r !== void 0 ? r : W.locale) !== null && a !== void 0 ? a : Yr, oe = ne((i = (o = (s = (l = n == null ? void 0 : n.firstWeekContainsDate) !== null && l !== void 0 ? l : n == null || (c = n.locale) === null || c === void 0 || (f = c.options) === null || f === void 0 ? void 0 : f.firstWeekContainsDate) !== null && s !== void 0 ? s : W.firstWeekContainsDate) !== null && o !== void 0 ? o : (d = W.locale) === null || d === void 0 || (h = d.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && i !== void 0 ? i : 1);
1269
+ var T = String(t), V = Ke(), E = (a = (r = n == null ? void 0 : n.locale) !== null && r !== void 0 ? r : V.locale) !== null && a !== void 0 ? a : Yr, oe = ne((i = (o = (s = (l = n == null ? void 0 : n.firstWeekContainsDate) !== null && l !== void 0 ? l : n == null || (c = n.locale) === null || c === void 0 || (f = c.options) === null || f === void 0 ? void 0 : f.firstWeekContainsDate) !== null && s !== void 0 ? s : V.firstWeekContainsDate) !== null && o !== void 0 ? o : (d = V.locale) === null || d === void 0 || (h = d.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && i !== void 0 ? i : 1);
1270
1270
  if (!(oe >= 1 && oe <= 7))
1271
1271
  throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
1272
- var _e = ne((m = (b = (x = (_ = n == null ? void 0 : n.weekStartsOn) !== null && _ !== void 0 ? _ : n == null || (g = n.locale) === null || g === void 0 || (p = g.options) === null || p === void 0 ? void 0 : p.weekStartsOn) !== null && x !== void 0 ? x : W.weekStartsOn) !== null && b !== void 0 ? b : (P = W.locale) === null || P === void 0 || (O = P.options) === null || O === void 0 ? void 0 : O.weekStartsOn) !== null && m !== void 0 ? m : 0);
1272
+ var _e = ne((m = (b = (x = (_ = n == null ? void 0 : n.weekStartsOn) !== null && _ !== void 0 ? _ : n == null || (g = n.locale) === null || g === void 0 || (p = g.options) === null || p === void 0 ? void 0 : p.weekStartsOn) !== null && x !== void 0 ? x : V.weekStartsOn) !== null && b !== void 0 ? b : (P = V.locale) === null || P === void 0 || (O = P.options) === null || O === void 0 ? void 0 : O.weekStartsOn) !== null && m !== void 0 ? m : 0);
1273
1273
  if (!(_e >= 0 && _e <= 6))
1274
1274
  throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
1275
1275
  if (!E.localize)
@@ -1284,31 +1284,31 @@ function Hr(e, t, n) {
1284
1284
  weekStartsOn: _e,
1285
1285
  locale: E,
1286
1286
  _originalDate: me
1287
- }, Fe = T.match(zr).map(function(L) {
1288
- var Z = L[0];
1287
+ }, Fe = T.match(zr).map(function(U) {
1288
+ var Z = U[0];
1289
1289
  if (Z === "p" || Z === "P") {
1290
1290
  var Re = Ja[Z];
1291
- return Re(L, E.formatLong);
1291
+ return Re(U, E.formatLong);
1292
1292
  }
1293
- return L;
1294
- }).join("").match(jr).map(function(L) {
1295
- if (L === "''")
1293
+ return U;
1294
+ }).join("").match(jr).map(function(U) {
1295
+ if (U === "''")
1296
1296
  return "'";
1297
- var Z = L[0];
1297
+ var Z = U[0];
1298
1298
  if (Z === "'")
1299
- return qr(L);
1299
+ return qr(U);
1300
1300
  var Re = Ka[Z];
1301
1301
  if (Re)
1302
- return !(n != null && n.useAdditionalWeekYearTokens) && nr(L) && Ht(L, t, String(e)), !(n != null && n.useAdditionalDayOfYearTokens) && tr(L) && Ht(L, t, String(e)), Re(tt, L, E.localize, nt);
1302
+ return !(n != null && n.useAdditionalWeekYearTokens) && nr(U) && Ht(U, t, String(e)), !(n != null && n.useAdditionalDayOfYearTokens) && tr(U) && Ht(U, t, String(e)), Re(tt, U, E.localize, nt);
1303
1303
  if (Z.match($r))
1304
1304
  throw new RangeError("Format string contains an unescaped latin alphabet character `" + Z + "`");
1305
- return L;
1305
+ return U;
1306
1306
  }).join("");
1307
1307
  return Fe;
1308
1308
  }
1309
1309
  function qr(e) {
1310
- var t = e.match(Gr);
1311
- return t ? t[1].replace(Br, "'") : e;
1310
+ var t = e.match(Br);
1311
+ return t ? t[1].replace(Gr, "'") : e;
1312
1312
  }
1313
1313
  function Kr(e, t) {
1314
1314
  var n;
@@ -1804,7 +1804,7 @@ var yi = /fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/, bi
1804
1804
  900: "fad"
1805
1805
  }
1806
1806
  };
1807
- const X = "___FONT_AWESOME___", dt = 16, jn = "fa", zn = "svg-inline--fa", fe = "data-fa-i2svg", mt = "data-fa-pseudo-element", ji = "data-fa-pseudo-element-pending", Nt = "data-prefix", Et = "data-icon", en = "fontawesome-i2svg", zi = "async", Gi = ["HTML", "HEAD", "STYLE", "SCRIPT"], Gn = (() => {
1807
+ const X = "___FONT_AWESOME___", dt = 16, jn = "fa", zn = "svg-inline--fa", fe = "data-fa-i2svg", mt = "data-fa-pseudo-element", ji = "data-fa-pseudo-element-pending", Nt = "data-prefix", Et = "data-icon", en = "fontawesome-i2svg", zi = "async", Bi = ["HTML", "HEAD", "STYLE", "SCRIPT"], Bn = (() => {
1808
1808
  try {
1809
1809
  return process.env.NODE_ENV === "production";
1810
1810
  } catch {
@@ -1818,11 +1818,11 @@ function Ne(e) {
1818
1818
  }
1819
1819
  });
1820
1820
  }
1821
- const Bn = u({}, Un);
1822
- Bn[D] = u(u(u(u({}, {
1821
+ const Gn = u({}, Un);
1822
+ Gn[D] = u(u(u(u({}, {
1823
1823
  "fa-duotone": "duotone"
1824
1824
  }), Un[D]), Jt.kit), Jt["kit-duotone"]);
1825
- const Bi = Ne(Bn), gt = u({}, Ci);
1825
+ const Gi = Ne(Gn), gt = u({}, Ci);
1826
1826
  gt[D] = u(u(u(u({}, {
1827
1827
  duotone: "fad"
1828
1828
  }), gt[D]), Zt.kit), Zt["kit-duotone"]);
@@ -1893,7 +1893,7 @@ function Zi(e) {
1893
1893
  Ae.splice(Ae.indexOf(e), 1);
1894
1894
  };
1895
1895
  }
1896
- const te = dt, B = {
1896
+ const te = dt, G = {
1897
1897
  size: 16,
1898
1898
  x: 0,
1899
1899
  y: 0,
@@ -1940,7 +1940,7 @@ function Qe(e) {
1940
1940
  return Object.keys(e || {}).reduce((t, n) => t + "".concat(n, ": ").concat(e[n].trim(), ";"), "");
1941
1941
  }
1942
1942
  function Rt(e) {
1943
- return e.size !== B.size || e.x !== B.x || e.y !== B.y || e.rotate !== B.rotate || e.flipX || e.flipY;
1943
+ return e.size !== G.size || e.x !== G.x || e.y !== G.y || e.rotate !== G.rotate || e.flipX || e.flipY;
1944
1944
  }
1945
1945
  function ao(e) {
1946
1946
  let {
@@ -2564,12 +2564,12 @@ Q[X].hooks || (Q[X].hooks = {});
2564
2564
  Q[X].shims || (Q[X].shims = []);
2565
2565
  var $ = Q[X];
2566
2566
  const Xn = [], Qn = function() {
2567
- S.removeEventListener("DOMContentLoaded", Qn), Be = 1, Xn.map((e) => e());
2567
+ S.removeEventListener("DOMContentLoaded", Qn), Ge = 1, Xn.map((e) => e());
2568
2568
  };
2569
- let Be = !1;
2570
- J && (Be = (S.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(S.readyState), Be || S.addEventListener("DOMContentLoaded", Qn));
2569
+ let Ge = !1;
2570
+ J && (Ge = (S.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(S.readyState), Ge || S.addEventListener("DOMContentLoaded", Qn));
2571
2571
  function so(e) {
2572
- J && (Be ? setTimeout(e, 0) : Xn.push(e));
2572
+ J && (Ge ? setTimeout(e, 0) : Xn.push(e));
2573
2573
  }
2574
2574
  function Ee(e) {
2575
2575
  const {
@@ -2726,7 +2726,7 @@ function Je(e) {
2726
2726
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2727
2727
  const {
2728
2728
  family: n = D
2729
- } = t, a = Bi[n][e];
2729
+ } = t, a = Gi[n][e];
2730
2730
  if (n === Xe && !e)
2731
2731
  return "fad";
2732
2732
  const r = tn[n][e] || tn[n][a], i = e in $.styles ? e : null;
@@ -2931,7 +2931,7 @@ const sa = new ko(), Oo = () => {
2931
2931
  };
2932
2932
  }
2933
2933
  }
2934
- }, U = {
2934
+ }, W = {
2935
2935
  noAuto: Oo,
2936
2936
  config: v,
2937
2937
  dom: Ao,
@@ -2944,7 +2944,7 @@ const sa = new ko(), Oo = () => {
2944
2944
  const {
2945
2945
  autoReplaceSvgRoot: t = S
2946
2946
  } = e;
2947
- (Object.keys($.styles).length > 0 || v.autoFetchSvg) && J && v.autoReplaceSvg && U.dom.i2svg({
2947
+ (Object.keys($.styles).length > 0 || v.autoFetchSvg) && J && v.autoReplaceSvg && W.dom.i2svg({
2948
2948
  node: t
2949
2949
  });
2950
2950
  };
@@ -3181,7 +3181,7 @@ const Io = {
3181
3181
  height: 512
3182
3182
  };
3183
3183
  function Fo(e, t) {
3184
- !Gn && !v.showMissingIcons && e && console.error('Icon with name "'.concat(e, '" and prefix "').concat(t, '" is missing.'));
3184
+ !Bn && !v.showMissingIcons && e && console.error('Icon with name "'.concat(e, '" and prefix "').concat(t, '" is missing.'));
3185
3185
  }
3186
3186
  function xt(e, t) {
3187
3187
  let n = t;
@@ -3337,7 +3337,7 @@ function dn(e) {
3337
3337
  function zo() {
3338
3338
  $e && $e.disconnect();
3339
3339
  }
3340
- function Go(e) {
3340
+ function Bo(e) {
3341
3341
  const t = e.getAttribute("style");
3342
3342
  let n = [];
3343
3343
  return t && (n = t.split(";").reduce((a, r) => {
@@ -3345,7 +3345,7 @@ function Go(e) {
3345
3345
  return o && s.length > 0 && (a[o] = s.join(":").trim()), a;
3346
3346
  }, {})), n;
3347
3347
  }
3348
- function Bo(e) {
3348
+ function Go(e) {
3349
3349
  const t = e.getAttribute("data-prefix"), n = e.getAttribute("data-icon"), a = e.innerText !== void 0 ? e.innerText.trim() : "";
3350
3350
  let r = Ze(Ft(e));
3351
3351
  return r.prefix || (r.prefix = re()), t && n && (r.prefix = t, r.iconName = n), r.iconName && r.prefix || (r.prefix && a.length > 0 && (r.iconName = vo(r.prefix, e.innerText) || Ut(r.prefix, pt(e.innerText))), !r.iconName && v.autoFetchSvg && e.firstChild && e.firstChild.nodeType === Node.TEXT_NODE && (r.iconName = e.firstChild.data)), r;
@@ -3360,7 +3360,7 @@ function Ho() {
3360
3360
  title: null,
3361
3361
  titleId: null,
3362
3362
  prefix: null,
3363
- transform: B,
3363
+ transform: G,
3364
3364
  symbol: !1,
3365
3365
  mask: {
3366
3366
  iconName: null,
@@ -3383,14 +3383,14 @@ function mn(e) {
3383
3383
  iconName: n,
3384
3384
  prefix: a,
3385
3385
  rest: r
3386
- } = Bo(e), i = $o(e), o = bt("parseNodeAttributes", {}, e);
3387
- let s = t.styleParser ? Go(e) : [];
3386
+ } = Go(e), i = $o(e), o = bt("parseNodeAttributes", {}, e);
3387
+ let s = t.styleParser ? Bo(e) : [];
3388
3388
  return u({
3389
3389
  iconName: n,
3390
3390
  title: e.getAttribute("title"),
3391
3391
  titleId: e.getAttribute("data-fa-title-id"),
3392
3392
  prefix: a,
3393
- transform: B,
3393
+ transform: G,
3394
3394
  mask: {
3395
3395
  iconName: null,
3396
3396
  prefix: null,
@@ -3440,7 +3440,7 @@ function gn(e) {
3440
3440
  const h = da(d);
3441
3441
  h && f.push(h);
3442
3442
  } catch (h) {
3443
- Gn || h.name === "MissingIcon" && console.error(h);
3443
+ Bn || h.name === "MissingIcon" && console.error(h);
3444
3444
  }
3445
3445
  return f;
3446
3446
  }, []);
@@ -3475,7 +3475,7 @@ function Qo(e) {
3475
3475
  const Jo = function(e) {
3476
3476
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3477
3477
  const {
3478
- transform: n = B,
3478
+ transform: n = G,
3479
3479
  symbol: a = !1,
3480
3480
  mask: r = null,
3481
3481
  maskId: i = null,
@@ -3509,7 +3509,7 @@ const Jo = function(e) {
3509
3509
  },
3510
3510
  prefix: d,
3511
3511
  iconName: h,
3512
- transform: u(u({}, B), n),
3512
+ transform: u(u({}, G), n),
3513
3513
  symbol: a,
3514
3514
  title: o,
3515
3515
  maskId: i,
@@ -3667,7 +3667,7 @@ var Zo = {
3667
3667
  text(e) {
3668
3668
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3669
3669
  const {
3670
- transform: n = B,
3670
+ transform: n = G,
3671
3671
  title: a = null,
3672
3672
  classes: r = [],
3673
3673
  attributes: i = {},
@@ -3681,7 +3681,7 @@ var Zo = {
3681
3681
  params: t
3682
3682
  }), ln({
3683
3683
  content: e,
3684
- transform: u(u({}, B), n),
3684
+ transform: u(u({}, G), n),
3685
3685
  title: a,
3686
3686
  extra: {
3687
3687
  attributes: i,
@@ -3762,7 +3762,7 @@ function pn(e, t) {
3762
3762
  extra: O
3763
3763
  } = P;
3764
3764
  O.attributes[mt] = t, xt(g, m).then((T) => {
3765
- const W = Wt(u(u({}, P), {}, {
3765
+ const V = Wt(u(u({}, P), {}, {
3766
3766
  icons: {
3767
3767
  main: T,
3768
3768
  mask: oa()
@@ -3772,7 +3772,7 @@ function pn(e, t) {
3772
3772
  extra: O,
3773
3773
  watchable: !0
3774
3774
  })), E = S.createElementNS("http://www.w3.org/2000/svg", "svg");
3775
- t === "::before" ? e.insertBefore(E, e.firstChild) : e.appendChild(E), E.outerHTML = W.map((oe) => Ee(oe)).join(`
3775
+ t === "::before" ? e.insertBefore(E, e.firstChild) : e.appendChild(E), E.outerHTML = V.map((oe) => Ee(oe)).join(`
3776
3776
  `), e.removeAttribute(n), a();
3777
3777
  }).catch(r);
3778
3778
  } else
@@ -3785,7 +3785,7 @@ function ss(e) {
3785
3785
  return Promise.all([pn(e, "::before"), pn(e, "::after")]);
3786
3786
  }
3787
3787
  function ls(e) {
3788
- return e.parentNode !== document.head && !~Gi.indexOf(e.tagName.toUpperCase()) && !e.getAttribute(mt) && (!e.parentNode || e.parentNode.tagName !== "svg");
3788
+ return e.parentNode !== document.head && !~Bi.indexOf(e.tagName.toUpperCase()) && !e.getAttribute(mt) && (!e.parentNode || e.parentNode.tagName !== "svg");
3789
3789
  }
3790
3790
  function yn(e) {
3791
3791
  if (J)
@@ -4114,18 +4114,18 @@ var ms = {
4114
4114
  }
4115
4115
  }, vs = [oo, Zo, es, ts, ns, cs, us, fs, ms, gs, hs];
4116
4116
  Co(vs, {
4117
- mixoutsTo: U
4117
+ mixoutsTo: W
4118
4118
  });
4119
- U.noAuto;
4120
- const ma = U.config, ga = U.library;
4121
- U.dom;
4122
- const He = U.parse;
4123
- U.findIconDefinition;
4124
- U.toHtml;
4125
- const ps = U.icon;
4126
- U.layer;
4127
- const ys = U.text;
4128
- U.counter;
4119
+ W.noAuto;
4120
+ const ma = W.config, ga = W.library;
4121
+ W.dom;
4122
+ const He = W.parse;
4123
+ W.findIconDefinition;
4124
+ W.toHtml;
4125
+ const ps = W.icon;
4126
+ W.layer;
4127
+ const ys = W.text;
4128
+ W.counter;
4129
4129
  function xn(e, t) {
4130
4130
  var n = Object.keys(e);
4131
4131
  if (Object.getOwnPropertySymbols) {
@@ -4136,7 +4136,7 @@ function xn(e, t) {
4136
4136
  }
4137
4137
  return n;
4138
4138
  }
4139
- function G(e) {
4139
+ function B(e) {
4140
4140
  for (var t = 1; t < arguments.length; t++) {
4141
4141
  var n = arguments[t] != null ? arguments[t] : {};
4142
4142
  t % 2 ? xn(Object(n), !0).forEach(function(a) {
@@ -4240,9 +4240,9 @@ var Os = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
4240
4240
  var n = function(g, p, P) {
4241
4241
  if (!c(p) || d(p) || h(p) || m(p) || l(p))
4242
4242
  return p;
4243
- var O, T = 0, W = 0;
4243
+ var O, T = 0, V = 0;
4244
4244
  if (f(p))
4245
- for (O = [], W = p.length; T < W; T++)
4245
+ for (O = [], V = p.length; T < V; T++)
4246
4246
  O.push(n(g, p[T], P));
4247
4247
  else {
4248
4248
  O = {};
@@ -4345,9 +4345,9 @@ function jt(e) {
4345
4345
  });
4346
4346
  n.class;
4347
4347
  var i = n.style, o = i === void 0 ? {} : i, s = xs(n, Ts);
4348
- return On(e.tag, G(G(G({}, t), {}, {
4348
+ return On(e.tag, B(B(B({}, t), {}, {
4349
4349
  class: r.class,
4350
- style: G(G({}, r.style), o)
4350
+ style: B(B({}, r.style), o)
4351
4351
  }, r.attrs), s), a);
4352
4352
  }
4353
4353
  var va = !1;
@@ -4532,7 +4532,7 @@ var we = Tt({
4532
4532
  }), s = A(function() {
4533
4533
  return Te("mask", Pn(t.mask));
4534
4534
  }), l = A(function() {
4535
- return ps(r.value, G(G(G(G({}, i.value), o.value), s.value), {}, {
4535
+ return ps(r.value, B(B(B(B({}, i.value), o.value), s.value), {}, {
4536
4536
  symbol: t.symbol,
4537
4537
  title: t.title,
4538
4538
  titleId: t.titleId,
@@ -4601,7 +4601,7 @@ Tt({
4601
4601
  }), o = A(function() {
4602
4602
  return Te("transform", typeof t.transform == "string" ? He.transform(t.transform) : t.transform);
4603
4603
  }), s = A(function() {
4604
- var c = ys(t.value.toString(), G(G({}, o.value), i.value)), f = c.abstract;
4604
+ var c = ys(t.value.toString(), B(B({}, o.value), i.value)), f = c.abstract;
4605
4605
  return t.counter && (f[0].attributes.class = f[0].attributes.class.replace("fa-layers-text", "")), f[0];
4606
4606
  }), l = A(function() {
4607
4607
  return jt(s.value, {}, a);
@@ -4682,7 +4682,7 @@ function js(e, t, n, a, r, i) {
4682
4682
  ]);
4683
4683
  }
4684
4684
  const zs = /* @__PURE__ */ I(Ws, [["render", js]]);
4685
- function Gs(e, t) {
4685
+ function Bs(e, t) {
4686
4686
  return {
4687
4687
  visibleActions: A(() => e.actions.filter((i) => i.isVisible === void 0 ? !0 : i.isVisible(e.row))),
4688
4688
  onActionClicked: (i) => {
@@ -4693,7 +4693,7 @@ function Gs(e, t) {
4693
4693
  }
4694
4694
  };
4695
4695
  }
4696
- const Bs = {
4696
+ const Gs = {
4697
4697
  name: "ViGridActions",
4698
4698
  components: { ViGridSimpleActions: zs, ViGridKebabMenu: Us },
4699
4699
  props: {
@@ -4712,7 +4712,7 @@ const Bs = {
4712
4712
  rowMenuOpened: {}
4713
4713
  },
4714
4714
  setup(e, { emit: t }) {
4715
- const { visibleActions: n, onActionClicked: a, toggleRowMenu: r } = Gs(e, t);
4715
+ const { visibleActions: n, onActionClicked: a, toggleRowMenu: r } = Bs(e, t);
4716
4716
  let i = K(null);
4717
4717
  return ya(() => {
4718
4718
  i.clickOutsideHandler = (o) => {
@@ -4751,7 +4751,7 @@ function Hs(e, t, n, a, r, i) {
4751
4751
  }, null, 8, ["actions", "row-key", "row", "onActionClicked"]))
4752
4752
  ], 512);
4753
4753
  }
4754
- const qs = /* @__PURE__ */ I(Bs, [["render", Hs]]);
4754
+ const qs = /* @__PURE__ */ I(Gs, [["render", Hs]]);
4755
4755
  const Ks = {
4756
4756
  name: "ViGridLink",
4757
4757
  props: {
@@ -4842,7 +4842,7 @@ function cl(e, t, n, a, r, i) {
4842
4842
  "row-menu-opened": n.rowMenuOpened,
4843
4843
  "onUpdate:rowMenuOpened": t[0] || (t[0] = (o) => e.$emit("update:rowMenuOpened", o)),
4844
4844
  onActionClicked: t[1] || (t[1] = (o) => e.$emit("action-clicked", o))
4845
- }), null, 16, ["value", "original-value", "row", "row-key", "row-menu-opened"])) : V(e.$slots, "custom-field", {
4845
+ }), null, 16, ["value", "original-value", "row", "row-key", "row-menu-opened"])) : L(e.$slots, "custom-field", {
4846
4846
  key: 1,
4847
4847
  field: n.field,
4848
4848
  value: n.fieldValue,
@@ -4966,12 +4966,12 @@ function wl(e) {
4966
4966
  }], s = (m, b, x) => x === "ascending" ? m.sort((_, g) => Number(_[b]) - Number(g[b])) : x === "descending" ? m.sort((_, g) => Number(g[b]) - Number(_[b])) : m, l = (m, b, x) => x === "ascending" ? m.sort((_, g) => _[b].toString().localeCompare(g[b].toString())) : x === "descending" ? m.sort((_, g) => g[b].toString().localeCompare(_[b].toString())) : m, c = function(m, b, x, _) {
4967
4967
  return _ ? x === "number" ? s(m, b, _) : l(m, b, _) : m;
4968
4968
  }, f = (m) => {
4969
- var b;
4970
- if (!((b = m == null ? void 0 : m.sortBy) != null && b.length))
4969
+ const b = m.sortBy ? Array.isArray(m.sortBy) ? m.sortBy[0].field : m.sortBy : null, x = b ? Array.isArray(m.sortBy) ? m.sortBy[0].descending : m.descending : null;
4970
+ if (!b)
4971
4971
  a.value = null, n.value = null, t.value = null;
4972
4972
  else {
4973
- let x = e.columns.find((_) => _.name === m.sortBy[0].field);
4974
- i(x, m != null && m.sortBy[0].descending ? "descending" : "ascending");
4973
+ let _ = e.columns.find((g) => g.name === b);
4974
+ i(_, x ? "descending" : "ascending");
4975
4975
  }
4976
4976
  }, d = (m) => a.value !== m.name ? "unsorted" : t.value, h = A(() => e.serverMode ? e.rows ?? [] : c([...e.rows ?? []], a.value, n.value, t.value));
4977
4977
  return {
@@ -5034,7 +5034,7 @@ function kl(e, t, n, a, r, i) {
5034
5034
  C("div", {
5035
5035
  class: Y(["vi-header-cell-content", n.align])
5036
5036
  }, [
5037
- V(e.$slots, "default")
5037
+ L(e.$slots, "default")
5038
5038
  ], 2)
5039
5039
  ], 8, Pl);
5040
5040
  }
@@ -5103,7 +5103,7 @@ function Al(e, t, n, a, r, i) {
5103
5103
  onClick: t[1] || (t[1] = (l) => e.$emit("sort", n.column))
5104
5104
  }))
5105
5105
  ])) : j("", !0),
5106
- V(e.$slots, "default", {}, () => [
5106
+ L(e.$slots, "default", {}, () => [
5107
5107
  wa(M(n.column.label), 1)
5108
5108
  ])
5109
5109
  ]),
@@ -5236,7 +5236,7 @@ const Ml = {
5236
5236
  const { currentVisibleRows: g, totalRows: p, onRowClicked: P } = bl(e, t, b), {
5237
5237
  selectedRows: O,
5238
5238
  toggleMasterSelect: T,
5239
- toggleRowSelect: W,
5239
+ toggleRowSelect: V,
5240
5240
  areAllRowsSelected: E,
5241
5241
  isRowSelected: oe
5242
5242
  } = Sl(e, t, g), _e = A(() => e.loading || r.value);
@@ -5252,7 +5252,7 @@ const Ml = {
5252
5252
  selectedRows: O,
5253
5253
  toggleMasterSelect: T,
5254
5254
  areAllRowsSelected: E,
5255
- toggleRowSelect: W,
5255
+ toggleRowSelect: V,
5256
5256
  setSortFields: f,
5257
5257
  fetchData: i,
5258
5258
  isDataLoading: _e,
@@ -5308,10 +5308,11 @@ const Ml = {
5308
5308
  }, Yl = ["onClick"], jl = {
5309
5309
  key: 0,
5310
5310
  class: "vi-cell vi-select-cell"
5311
- }, zl = { class: "vi-body-row vi-table-row vi-footer-row" }, Gl = ["colspan"];
5312
- function Bl(e, t, n, a, r, i) {
5311
+ }, zl = { class: "vi-body-row vi-table-row vi-footer-row" }, Bl = ["colspan"];
5312
+ function Gl(e, t, n, a, r, i) {
5313
5313
  const o = z("vi-grid-head-cell"), s = z("vi-grid-checkbox"), l = z("vi-grid-head-column-cell"), c = z("vi-grid-field"), f = z("vi-pagination");
5314
5314
  return y(), w("div", Dl, [
5315
+ L(e.$slots, "top"),
5315
5316
  C("div", {
5316
5317
  class: Y(["vi-table-container", { loading: a.isDataLoading }])
5317
5318
  }, [
@@ -5327,7 +5328,7 @@ function Bl(e, t, n, a, r, i) {
5327
5328
  class: "vi-title-cell"
5328
5329
  }, {
5329
5330
  default: he(() => [
5330
- V(e.$slots, "title", { title: n.title }, () => [
5331
+ L(e.$slots, "title", { title: n.title }, () => [
5331
5332
  C("span", null, M(n.title) + "}", 1)
5332
5333
  ])
5333
5334
  ]),
@@ -5357,7 +5358,7 @@ function Bl(e, t, n, a, r, i) {
5357
5358
  onSort: a.setSortFields
5358
5359
  }, {
5359
5360
  default: he(() => [
5360
- V(e.$slots, `vi-header-cell-${d.name}`, { column: d })
5361
+ L(e.$slots, `vi-header-cell-${d.name}`, { column: d })
5361
5362
  ]),
5362
5363
  _: 2
5363
5364
  }, 1032, ["column", "align", "sortable-state", "onSort"]))), 128))
@@ -5368,7 +5369,7 @@ function Bl(e, t, n, a, r, i) {
5368
5369
  class: "vi-loading-cell"
5369
5370
  }, {
5370
5371
  default: he(() => [
5371
- V(e.$slots, "loading", {}, () => [
5372
+ L(e.$slots, "loading", {}, () => [
5372
5373
  a.settings.defaultSlots.loading ? (y(), R(Se(a.settings.defaultSlots.loading), { key: 0 })) : (y(), w("div", Rl, t[2] || (t[2] = [
5373
5374
  C("div", { class: "loading-bar" }, null, -1)
5374
5375
  ])))
@@ -5380,7 +5381,7 @@ function Bl(e, t, n, a, r, i) {
5380
5381
  ]),
5381
5382
  !a.currentVisibleRows.length && !a.isDataLoading ? (y(), w("tbody", Ll, [
5382
5383
  C("tr", Ul, [
5383
- V(e.$slots, "empty-data", {}, () => [
5384
+ L(e.$slots, "empty-data", {}, () => [
5384
5385
  a.settings.defaultSlots.noRows ? (y(), R(Se(a.settings.defaultSlots.noRows), { key: 0 })) : (y(), w("td", {
5385
5386
  key: 1,
5386
5387
  colspan: a.totalColumns,
@@ -5433,7 +5434,7 @@ function Bl(e, t, n, a, r, i) {
5433
5434
  colspan: a.totalColumns,
5434
5435
  class: "vi-body-cell vi-cell vi-footer-cell"
5435
5436
  }, [
5436
- V(e.$slots, "footer", {
5437
+ L(e.$slots, "footer", {
5437
5438
  pagination: { ...n.pagination, totalRows: a.totalRows }
5438
5439
  }, () => [
5439
5440
  a.settings.defaultSlots.footer ? (y(), R(Se(a.settings.defaultSlots.footer), {
@@ -5451,14 +5452,15 @@ function Bl(e, t, n, a, r, i) {
5451
5452
  onUpdate: a.onPaginationChange
5452
5453
  }, null, 8, ["rows-per-page", "current-page", "total-rows", "compact", "rows-per-page-options", "onUpdate"]))
5453
5454
  ])
5454
- ], 8, Gl)
5455
+ ], 8, Bl)
5455
5456
  ])
5456
5457
  ]))
5457
5458
  ], 2)
5458
- ], 2)
5459
+ ], 2),
5460
+ L(e.$slots, "bottom")
5459
5461
  ]);
5460
5462
  }
5461
- const kn = /* @__PURE__ */ I(Ml, [["render", Bl]]), Sn = {
5463
+ const kn = /* @__PURE__ */ I(Ml, [["render", Gl]]), Sn = {
5462
5464
  format: {
5463
5465
  date: "yyyy-MM-dd",
5464
5466
  dateTime: "yyyy-MM-dd HH:mm:ss",
@@ -5577,7 +5579,7 @@ function ac(e, t, n, a, r, i) {
5577
5579
  const o = z("font-awesome-icon");
5578
5580
  return y(), w("div", Hl, [
5579
5581
  C("div", ql, [
5580
- V(e.$slots, "rows-per-page", {
5582
+ L(e.$slots, "rows-per-page", {
5581
5583
  rowsPerPage: i.rowsOnPage,
5582
5584
  rowsPerPageUpdate: i.rowsPerPageChange
5583
5585
  }, () => [
@@ -5593,7 +5595,7 @@ function ac(e, t, n, a, r, i) {
5593
5595
  ], 40, Kl)
5594
5596
  ])
5595
5597
  ]),
5596
- V(e.$slots, "visible-rows-info", {
5598
+ L(e.$slots, "visible-rows-info", {
5597
5599
  totalRows: n.totalRows,
5598
5600
  firstVisibleRow: i.firstVisibleRow,
5599
5601
  lastVisibleRow: i.lastVisibleRow
@@ -5601,7 +5603,7 @@ function ac(e, t, n, a, r, i) {
5601
5603
  n.totalRows > 0 ? (y(), w("div", Ql, " Showing " + M(i.firstVisibleRow) + " - " + M(i.lastVisibleRow) + " of " + M(n.totalRows), 1)) : j("", !0)
5602
5604
  ]),
5603
5605
  C("div", Jl, [
5604
- V(e.$slots, "navigation-prev", {}, () => [
5606
+ L(e.$slots, "navigation-prev", {}, () => [
5605
5607
  C("div", Zl, [
5606
5608
  C("div", {
5607
5609
  onClick: t[1] || (t[1] = (s) => i.pageChange(1)),
@@ -5627,7 +5629,7 @@ function ac(e, t, n, a, r, i) {
5627
5629
  onClick: (l) => i.pageChange(s)
5628
5630
  }, M(s), 11, tc))), 128))
5629
5631
  ])),
5630
- V(e.$slots, "navigation-next", {}, () => [
5632
+ L(e.$slots, "navigation-next", {}, () => [
5631
5633
  C("div", nc, [
5632
5634
  C("div", {
5633
5635
  class: Y([{ disabled: n.currentPage === i.totalPages }, "vi-page-nav vi-page-next"]),
@@ -558,7 +558,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
558
558
  }`;function sn(){const e=Qt,t=Jt,n=v.cssPrefix,a=v.replacementClass;let r=Bi;if(n!==e||a!==t){const i=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),l=new RegExp("\\.".concat(t),"g");r=r.replace(i,".".concat(n,"-")).replace(s,"--".concat(n,"-")).replace(l,".".concat(a))}return r}let ln=!1;function at(){v.autoAddCss&&!ln&&(Ni(sn()),ln=!0)}var Ri={mixout(){return{dom:{css:sn,insertCss:at}}},hooks(){return{beforeDOMElementCreation(){at()},beforeI2svg(){at()}}}};const W=Y||{};W[U]||(W[U]={}),W[U].styles||(W[U].styles={}),W[U].hooks||(W[U].hooks={}),W[U].shims||(W[U].shims=[]);var L=W[U];const cn=[],fn=function(){P.removeEventListener("DOMContentLoaded",fn),Ee=1,cn.map(e=>e())};let Ee=!1;V&&(Ee=(P.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(P.readyState),Ee||P.addEventListener("DOMContentLoaded",fn));function Li(e){V&&(Ee?setTimeout(e,0):cn.push(e))}function ge(e){const{tag:t,attributes:n={},children:a=[]}=e;return typeof e=="string"?on(e):"<".concat(t," ").concat(Mi(n),">").concat(a.map(ge).join(""),"</").concat(t,">")}function un(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var Vi=function(t,n){return function(a,r,i,s){return t.call(n,a,r,i,s)}},rt=function(t,n,a,r){var i=Object.keys(t),s=i.length,l=r!==void 0?Vi(n,r):n,c,f,d;for(a===void 0?(c=1,d=t[i[0]]):(c=0,d=a);c<s;c++)f=i[c],d=l(d,t[f],f,t);return d};function Ui(e){const t=[];let n=0;const a=e.length;for(;n<a;){const r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<a){const i=e.charCodeAt(n++);(i&64512)==56320?t.push(((r&1023)<<10)+(i&1023)+65536):(t.push(r),n--)}else t.push(r)}return t}function it(e){const t=Ui(e);return t.length===1?t[0].toString(16):null}function Wi(e,t){const n=e.length;let a=e.charCodeAt(t),r;return a>=55296&&a<=56319&&n>t+1&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(a-55296)*1024+r-56320+65536:a}function dn(e){return Object.keys(e).reduce((t,n)=>{const a=e[n];return!!a.icon?t[a.iconName]=a.icon:t[n]=a,t},{})}function ot(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{skipHooks:a=!1}=n,r=dn(t);typeof L.hooks.addPack=="function"&&!a?L.hooks.addPack(e,dn(t)):L.styles[e]=u(u({},L.styles[e]||{}),r),e==="fas"&&ot("fa",t)}const{styles:he,shims:zi}=L,mn=Object.keys(Je),ji=mn.reduce((e,t)=>(e[t]=Object.keys(Je[t]),e),{});let st=null,gn={},hn={},pn={},vn={},yn={};function Yi(e){return~Oi.indexOf(e)}function Gi(e,t){const n=t.split("-"),a=n[0],r=n.slice(1).join("-");return a===e&&r!==""&&!Yi(r)?r:null}const bn=()=>{const e=a=>rt(he,(r,i,s)=>(r[s]=rt(i,a,{}),r),{});gn=e((a,r,i)=>(r[3]&&(a[r[3]]=i),r[2]&&r[2].filter(l=>typeof l=="number").forEach(l=>{a[l.toString(16)]=i}),a)),hn=e((a,r,i)=>(a[i]=i,r[2]&&r[2].filter(l=>typeof l=="string").forEach(l=>{a[l]=i}),a)),yn=e((a,r,i)=>{const s=r[2];return a[i]=i,s.forEach(l=>{a[l]=i}),a});const t="far"in he||v.autoFetchSvg,n=rt(zi,(a,r)=>{const i=r[0];let s=r[1];const l=r[2];return s==="far"&&!t&&(s="fas"),typeof i=="string"&&(a.names[i]={prefix:s,iconName:l}),typeof i=="number"&&(a.unicodes[i.toString(16)]={prefix:s,iconName:l}),a},{names:{},unicodes:{}});pn=n.names,vn=n.unicodes,st=Te(v.styleDefault,{family:v.familyDefault})};Ti(e=>{st=Te(e.styleDefault,{family:v.familyDefault})}),bn();function lt(e,t){return(gn[e]||{})[t]}function $i(e,t){return(hn[e]||{})[t]}function Q(e,t){return(yn[e]||{})[t]}function wn(e){return pn[e]||{prefix:null,iconName:null}}function Hi(e){const t=vn[e],n=lt("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function $(){return st}const kn=()=>({prefix:null,iconName:null,rest:[]});function qi(e){let t=O;const n=mn.reduce((a,r)=>(a[r]="".concat(v.cssPrefix,"-").concat(r),a),{});return Ht.forEach(a=>{(e.includes(n[a])||e.some(r=>ji[a].includes(r)))&&(t=a)}),t}function Te(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{family:n=O}=t,a=_i[n][e];if(n===Se&&!e)return"fad";const r=nn[n][e]||nn[n][a],i=e in L.styles?e:null;return r||i||null}function Ki(e){let t=[],n=null;return e.forEach(a=>{const r=Gi(v.cssPrefix,a);r?n=r:a&&t.push(a)}),{iconName:n,rest:t}}function _n(e){return e.sort().filter((t,n,a)=>a.indexOf(t)===n)}function Ne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{skipLookups:n=!1}=t;let a=null;const r=Ge.concat(fi),i=_n(e.filter(m=>r.includes(m))),s=_n(e.filter(m=>!Ge.includes(m))),l=i.filter(m=>(a=m,!$t.includes(m))),[c=null]=l,f=qi(i),d=u(u({},Ki(s)),{},{prefix:Te(c,{family:f})});return u(u(u({},d),Zi({values:e,family:f,styles:he,config:v,canonical:d,givenPrefix:a})),Xi(n,a,d))}function Xi(e,t,n){let{prefix:a,iconName:r}=n;if(e||!a||!r)return{prefix:a,iconName:r};const i=t==="fa"?wn(r):{},s=Q(a,r);return r=i.iconName||s||r,a=i.prefix||a,a==="far"&&!he.far&&he.fas&&!v.autoFetchSvg&&(a="fas"),{prefix:a,iconName:r}}const Qi=Ht.filter(e=>e!==O||e!==Se),Ji=Object.keys(Ye).filter(e=>e!==O).map(e=>Object.keys(Ye[e])).flat();function Zi(e){const{values:t,family:n,canonical:a,givenPrefix:r="",styles:i={},config:s={}}=e,l=n===Se,c=t.includes("fa-duotone")||t.includes("fad"),f=s.familyDefault==="duotone",d=a.prefix==="fad"||a.prefix==="fa-duotone";if(!l&&(c||f||d)&&(a.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(a.prefix="fab"),!a.prefix&&Qi.includes(n)&&(Object.keys(i).find(p=>Ji.includes(p))||s.autoFetchSvg)){const p=ni.get(n).defaultShortPrefixId;a.prefix=p,a.iconName=Q(a.prefix,a.iconName)||a.iconName}return(a.prefix==="fa"||r==="fa")&&(a.prefix=$()||"fas"),a}class eo{constructor(){this.definitions={}}add(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];const r=n.reduce(this._pullDefinitions,{});Object.keys(r).forEach(i=>{this.definitions[i]=u(u({},this.definitions[i]||{}),r[i]),ot(i,r[i]);const s=Je[O][i];s&&ot(s,r[i]),bn()})}reset(){this.definitions={}}_pullDefinitions(t,n){const a=n.prefix&&n.iconName&&n.icon?{0:n}:n;return Object.keys(a).map(r=>{const{prefix:i,iconName:s,icon:l}=a[r],c=l[2];t[i]||(t[i]={}),c.length>0&&c.forEach(f=>{typeof f=="string"&&(t[i][f]=l)}),t[i][s]=l}),t}}let xn=[],ae={};const re={},to=Object.keys(re);function no(e,t){let{mixoutsTo:n}=t;return xn=e,ae={},Object.keys(re).forEach(a=>{to.indexOf(a)===-1&&delete re[a]}),xn.forEach(a=>{const r=a.mixout?a.mixout():{};if(Object.keys(r).forEach(i=>{typeof r[i]=="function"&&(n[i]=r[i]),typeof r[i]=="object"&&Object.keys(r[i]).forEach(s=>{n[i]||(n[i]={}),n[i][s]=r[i][s]})}),a.hooks){const i=a.hooks();Object.keys(i).forEach(s=>{ae[s]||(ae[s]=[]),ae[s].push(i[s])})}a.provides&&a.provides(re)}),n}function ct(e,t){for(var n=arguments.length,a=new Array(n>2?n-2:0),r=2;r<n;r++)a[r-2]=arguments[r];return(ae[e]||[]).forEach(s=>{t=s.apply(null,[t,...a])}),t}function J(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];(ae[e]||[]).forEach(i=>{i.apply(null,n)})}function H(){const e=arguments[0],t=Array.prototype.slice.call(arguments,1);return re[e]?re[e].apply(null,t):void 0}function ft(e){e.prefix==="fa"&&(e.prefix="fas");let{iconName:t}=e;const n=e.prefix||$();if(t)return t=Q(n,t)||t,un(Pn.definitions,n,t)||un(L.styles,n,t)}const Pn=new eo,D={noAuto:()=>{v.autoReplaceSvg=!1,v.observeMutations=!1,J("noAuto")},config:v,dom:{i2svg:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return V?(J("beforeI2svg",e),H("pseudoElements2svg",e),H("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:t}=e;v.autoReplaceSvg===!1&&(v.autoReplaceSvg=!0),v.observeMutations=!0,Li(()=>{ao({autoReplaceSvgRoot:t}),J("watch",e)})}},parse:{icon:e=>{if(e===null)return null;if(typeof e=="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Q(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){const t=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],n=Te(e[0]);return{prefix:n,iconName:Q(n,t)||t}}if(typeof e=="string"&&(e.indexOf("".concat(v.cssPrefix,"-"))>-1||e.match(xi))){const t=Ne(e.split(" "),{skipLookups:!0});return{prefix:t.prefix||$(),iconName:Q(t.prefix,t.iconName)||t.iconName}}if(typeof e=="string"){const t=$();return{prefix:t,iconName:Q(t,e)||e}}}},library:Pn,findIconDefinition:ft,toHtml:ge},ao=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:t=P}=e;(Object.keys(L.styles).length>0||v.autoFetchSvg)&&V&&v.autoReplaceSvg&&D.dom.i2svg({node:t})};function De(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(n=>ge(n))}}),Object.defineProperty(e,"node",{get:function(){if(!V)return;const n=P.createElement("div");return n.innerHTML=e.html,n.children}}),e}function ro(e){let{children:t,main:n,mask:a,attributes:r,styles:i,transform:s}=e;if(nt(s)&&n.found&&!a.found){const{width:l,height:c}=n,f={x:l/c/2,y:.5};r.style=Ae(u(u({},i),{},{"transform-origin":"".concat(f.x+s.x/16,"em ").concat(f.y+s.y/16,"em")}))}return[{tag:"svg",attributes:r,children:t}]}function io(e){let{prefix:t,iconName:n,children:a,attributes:r,symbol:i}=e;const s=i===!0?"".concat(t,"-").concat(v.cssPrefix,"-").concat(n):i;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:u(u({},r),{},{id:s}),children:a}]}]}function ut(e){const{icons:{main:t,mask:n},prefix:a,iconName:r,transform:i,symbol:s,title:l,maskId:c,titleId:f,extra:d,watchable:m=!1}=e,{width:p,height:g}=n.found?n:t,b=si.includes(a),k=[v.replacementClass,r?"".concat(v.cssPrefix,"-").concat(r):""].filter(A=>d.classes.indexOf(A)===-1).filter(A=>A!==""||!!A).concat(d.classes).join(" ");let w={children:[],attributes:u(u({},d.attributes),{},{"data-prefix":a,"data-icon":r,class:k,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(p," ").concat(g)})};const h=b&&!~d.classes.indexOf("fa-fw")?{width:"".concat(p/g*16*.0625,"em")}:{};m&&(w.attributes[X]=""),l&&(w.children.push({tag:"title",attributes:{id:w.attributes["aria-labelledby"]||"title-".concat(f||me())},children:[l]}),delete w.attributes.title);const y=u(u({},w),{},{prefix:a,iconName:r,main:t,mask:n,maskId:c,transform:i,symbol:s,styles:u(u({},h),d.styles)}),{children:x,attributes:C}=n.found&&t.found?H("generateAbstractMask",y)||{children:[],attributes:{}}:H("generateAbstractIcon",y)||{children:[],attributes:{}};return y.children=x,y.attributes=C,s?io(y):ro(y)}function Cn(e){const{content:t,width:n,height:a,transform:r,title:i,extra:s,watchable:l=!1}=e,c=u(u(u({},s.attributes),i?{title:i}:{}),{},{class:s.classes.join(" ")});l&&(c[X]="");const f=u({},s.styles);nt(r)&&(f.transform=Ii({transform:r,startCentered:!0,width:n,height:a}),f["-webkit-transform"]=f.transform);const d=Ae(f);d.length>0&&(c.style=d);const m=[];return m.push({tag:"span",attributes:c,children:[t]}),i&&m.push({tag:"span",attributes:{class:"sr-only"},children:[i]}),m}function oo(e){const{content:t,title:n,extra:a}=e,r=u(u(u({},a.attributes),n?{title:n}:{}),{},{class:a.classes.join(" ")}),i=Ae(a.styles);i.length>0&&(r.style=i);const s=[];return s.push({tag:"span",attributes:r,children:[t]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}const{styles:dt}=L;function mt(e){const t=e[0],n=e[1],[a]=e.slice(4);let r=null;return Array.isArray(a)?r={tag:"g",attributes:{class:"".concat(v.cssPrefix,"-").concat(et.GROUP)},children:[{tag:"path",attributes:{class:"".concat(v.cssPrefix,"-").concat(et.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(v.cssPrefix,"-").concat(et.PRIMARY),fill:"currentColor",d:a[1]}}]}:r={tag:"path",attributes:{fill:"currentColor",d:a}},{found:!0,width:t,height:n,icon:r}}const so={found:!1,width:512,height:512};function lo(e,t){!en&&!v.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function gt(e,t){let n=t;return t==="fa"&&v.styleDefault!==null&&(t=$()),new Promise((a,r)=>{if(n==="fa"){const i=wn(e)||{};e=i.iconName||e,t=i.prefix||t}if(e&&t&&dt[t]&&dt[t][e]){const i=dt[t][e];return a(mt(i))}lo(e,t),a(u(u({},so),{},{icon:v.showMissingIcons&&e?H("missingIconAbstract")||{}:{}}))})}const Sn=()=>{},ht=v.measurePerformance&&Ce&&Ce.mark&&Ce.measure?Ce:{mark:Sn,measure:Sn},pe='FA "6.7.1"',co=e=>(ht.mark("".concat(pe," ").concat(e," begins")),()=>On(e)),On=e=>{ht.mark("".concat(pe," ").concat(e," ends")),ht.measure("".concat(pe," ").concat(e),"".concat(pe," ").concat(e," begins"),"".concat(pe," ").concat(e," ends"))};var pt={begin:co,end:On};const Me=()=>{};function An(e){return typeof(e.getAttribute?e.getAttribute(X):null)=="string"}function fo(e){const t=e.getAttribute?e.getAttribute(qe):null,n=e.getAttribute?e.getAttribute(Ke):null;return t&&n}function uo(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(v.replacementClass)}function mo(){return v.autoReplaceSvg===!0?Fe.replace:Fe[v.autoReplaceSvg]||Fe.replace}function go(e){return P.createElementNS("http://www.w3.org/2000/svg",e)}function ho(e){return P.createElement(e)}function En(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{ceFn:n=e.tag==="svg"?go:ho}=t;if(typeof e=="string")return P.createTextNode(e);const a=n(e.tag);return Object.keys(e.attributes||[]).forEach(function(i){a.setAttribute(i,e.attributes[i])}),(e.children||[]).forEach(function(i){a.appendChild(En(i,{ceFn:n}))}),a}function po(e){let t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}const Fe={replace:function(e){const t=e[0];if(t.parentNode)if(e[1].forEach(n=>{t.parentNode.insertBefore(En(n),t)}),t.getAttribute(X)===null&&v.keepOriginalSource){let n=P.createComment(po(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){const t=e[0],n=e[1];if(~tt(t).indexOf(v.replacementClass))return Fe.replace(e);const a=new RegExp("".concat(v.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){const i=n[0].attributes.class.split(" ").reduce((s,l)=>(l===v.replacementClass||l.match(a)?s.toSvg.push(l):s.toNode.push(l),s),{toNode:[],toSvg:[]});n[0].attributes.class=i.toSvg.join(" "),i.toNode.length===0?t.removeAttribute("class"):t.setAttribute("class",i.toNode.join(" "))}const r=n.map(i=>ge(i)).join(`
559
559
  `);t.setAttribute(X,""),t.innerHTML=r}};function Tn(e){e()}function Nn(e,t){const n=typeof t=="function"?t:Me;if(e.length===0)n();else{let a=Tn;v.mutateApproach===wi&&(a=Y.requestAnimationFrame||Tn),a(()=>{const r=mo(),i=pt.begin("mutate");e.map(r),i(),n()})}}let vt=!1;function Dn(){vt=!0}function yt(){vt=!1}let Ie=null;function Mn(e){if(!jt||!v.observeMutations)return;const{treeCallback:t=Me,nodeCallback:n=Me,pseudoElementsCallback:a=Me,observeMutationsRoot:r=P}=e;Ie=new jt(i=>{if(vt)return;const s=$();ne(i).forEach(l=>{if(l.type==="childList"&&l.addedNodes.length>0&&!An(l.addedNodes[0])&&(v.searchPseudoElements&&a(l.target),t(l.target)),l.type==="attributes"&&l.target.parentNode&&v.searchPseudoElements&&a(l.target.parentNode),l.type==="attributes"&&An(l.target)&&~Si.indexOf(l.attributeName))if(l.attributeName==="class"&&fo(l.target)){const{prefix:c,iconName:f}=Ne(tt(l.target));l.target.setAttribute(qe,c||s),f&&l.target.setAttribute(Ke,f)}else uo(l.target)&&n(l.target)})}),V&&Ie.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function vo(){Ie&&Ie.disconnect()}function yo(e){const t=e.getAttribute("style");let n=[];return t&&(n=t.split(";").reduce((a,r)=>{const i=r.split(":"),s=i[0],l=i.slice(1);return s&&l.length>0&&(a[s]=l.join(":").trim()),a},{})),n}function bo(e){const t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),a=e.innerText!==void 0?e.innerText.trim():"";let r=Ne(tt(e));return r.prefix||(r.prefix=$()),t&&n&&(r.prefix=t,r.iconName=n),r.iconName&&r.prefix||(r.prefix&&a.length>0&&(r.iconName=$i(r.prefix,e.innerText)||lt(r.prefix,it(e.innerText))),!r.iconName&&v.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(r.iconName=e.firstChild.data)),r}function wo(e){const t=ne(e.attributes).reduce((r,i)=>(r.name!=="class"&&r.name!=="style"&&(r[i.name]=i.value),r),{}),n=e.getAttribute("title"),a=e.getAttribute("data-fa-title-id");return v.autoA11y&&(n?t["aria-labelledby"]="".concat(v.replacementClass,"-title-").concat(a||me()):(t["aria-hidden"]="true",t.focusable="false")),t}function ko(){return{iconName:null,title:null,titleId:null,prefix:null,transform:R,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function Fn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0};const{iconName:n,prefix:a,rest:r}=bo(e),i=wo(e),s=ct("parseNodeAttributes",{},e);let l=t.styleParser?yo(e):[];return u({iconName:n,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:a,transform:R,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:r,styles:l,attributes:i}},s)}const{styles:_o}=L;function In(e){const t=v.autoReplaceSvg==="nest"?Fn(e,{styleParser:!1}):Fn(e);return~t.extra.classes.indexOf(an)?H("generateLayersText",e,t):H("generateSvgReplacementMutation",e,t)}function xo(){return[...ri,...Ge]}function Bn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!V)return Promise.resolve();const n=P.documentElement.classList,a=d=>n.add("".concat(Zt,"-").concat(d)),r=d=>n.remove("".concat(Zt,"-").concat(d)),i=v.autoFetchSvg?xo():$t.concat(Object.keys(_o));i.includes("fa")||i.push("fa");const s=[".".concat(an,":not([").concat(X,"])")].concat(i.map(d=>".".concat(d,":not([").concat(X,"])"))).join(", ");if(s.length===0)return Promise.resolve();let l=[];try{l=ne(e.querySelectorAll(s))}catch{}if(l.length>0)a("pending"),r("complete");else return Promise.resolve();const c=pt.begin("onTree"),f=l.reduce((d,m)=>{try{const p=In(m);p&&d.push(p)}catch(p){en||p.name==="MissingIcon"&&console.error(p)}return d},[]);return new Promise((d,m)=>{Promise.all(f).then(p=>{Nn(p,()=>{a("active"),a("complete"),r("pending"),typeof t=="function"&&t(),c(),d()})}).catch(p=>{c(),m(p)})})}function Po(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;In(e).then(n=>{n&&Nn([n],t)})}function Co(e){return function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const a=(t||{}).icon?t:ft(t||{});let{mask:r}=n;return r&&(r=(r||{}).icon?r:ft(r||{})),e(a,u(u({},n),{},{mask:r}))}}const So=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:n=R,symbol:a=!1,mask:r=null,maskId:i=null,title:s=null,titleId:l=null,classes:c=[],attributes:f={},styles:d={}}=t;if(!e)return;const{prefix:m,iconName:p,icon:g}=e;return De(u({type:"icon"},e),()=>(J("beforeDOMElementCreation",{iconDefinition:e,params:t}),v.autoA11y&&(s?f["aria-labelledby"]="".concat(v.replacementClass,"-title-").concat(l||me()):(f["aria-hidden"]="true",f.focusable="false")),ut({icons:{main:mt(g),mask:r?mt(r.icon):{found:!1,width:null,height:null,icon:{}}},prefix:m,iconName:p,transform:u(u({},R),n),symbol:a,title:s,maskId:i,titleId:l,extra:{attributes:f,styles:d,classes:c}})))};var Oo={mixout(){return{icon:Co(So)}},hooks(){return{mutationObserverCallbacks(e){return e.treeCallback=Bn,e.nodeCallback=Po,e}}},provides(e){e.i2svg=function(t){const{node:n=P,callback:a=()=>{}}=t;return Bn(n,a)},e.generateSvgReplacementMutation=function(t,n){const{iconName:a,title:r,titleId:i,prefix:s,transform:l,symbol:c,mask:f,maskId:d,extra:m}=n;return new Promise((p,g)=>{Promise.all([gt(a,s),f.iconName?gt(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(b=>{let[k,w]=b;p([t,ut({icons:{main:k,mask:w},prefix:s,iconName:a,transform:l,symbol:c,maskId:d,title:r,titleId:i,extra:m,watchable:!0})])}).catch(g)})},e.generateAbstractIcon=function(t){let{children:n,attributes:a,main:r,transform:i,styles:s}=t;const l=Ae(s);l.length>0&&(a.style=l);let c;return nt(i)&&(c=H("generateAbstractTransformGrouping",{main:r,transform:i,containerWidth:r.width,iconWidth:r.width})),n.push(c||r.icon),{children:n,attributes:a}}}},Ao={mixout(){return{layer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{classes:n=[]}=t;return De({type:"layer"},()=>{J("beforeDOMElementCreation",{assembler:e,params:t});let a=[];return e(r=>{Array.isArray(r)?r.map(i=>{a=a.concat(i.abstract)}):a=a.concat(r.abstract)}),[{tag:"span",attributes:{class:["".concat(v.cssPrefix,"-layers"),...n].join(" ")},children:a}]})}}}},Eo={mixout(){return{counter(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{title:n=null,classes:a=[],attributes:r={},styles:i={}}=t;return De({type:"counter",content:e},()=>(J("beforeDOMElementCreation",{content:e,params:t}),oo({content:e.toString(),title:n,extra:{attributes:r,styles:i,classes:["".concat(v.cssPrefix,"-layers-counter"),...a]}})))}}}},To={mixout(){return{text(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:n=R,title:a=null,classes:r=[],attributes:i={},styles:s={}}=t;return De({type:"text",content:e},()=>(J("beforeDOMElementCreation",{content:e,params:t}),Cn({content:e,transform:u(u({},R),n),title:a,extra:{attributes:i,styles:s,classes:["".concat(v.cssPrefix,"-layers-text"),...r]}})))}}},provides(e){e.generateLayersText=function(t,n){const{title:a,transform:r,extra:i}=n;let s=null,l=null;if(Yt){const c=parseInt(getComputedStyle(t).fontSize,10),f=t.getBoundingClientRect();s=f.width/c,l=f.height/c}return v.autoA11y&&!a&&(i.attributes["aria-hidden"]="true"),Promise.resolve([t,Cn({content:t.innerHTML,width:s,height:l,transform:r,title:a,extra:i,watchable:!0})])}}};const No=new RegExp('"',"ug"),Rn=[1105920,1112319],Ln=u(u(u(u({},{FontAwesome:{normal:"fas",400:"fas"}}),ti),yi),ui),bt=Object.keys(Ln).reduce((e,t)=>(e[t.toLowerCase()]=Ln[t],e),{}),Do=Object.keys(bt).reduce((e,t)=>{const n=bt[t];return e[t]=n[900]||[...Object.entries(n)][0][1],e},{});function Mo(e){const t=e.replace(No,""),n=Wi(t,0),a=n>=Rn[0]&&n<=Rn[1],r=t.length===2?t[0]===t[1]:!1;return{value:it(r?t[0]:t),isSecondary:a||r}}function Fo(e,t){const n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),a=parseInt(t),r=isNaN(a)?"normal":a;return(bt[n]||{})[r]||Do[n]}function Vn(e,t){const n="".concat(bi).concat(t.replace(":","-"));return new Promise((a,r)=>{if(e.getAttribute(n)!==null)return a();const s=ne(e.children).filter(p=>p.getAttribute(He)===t)[0],l=Y.getComputedStyle(e,t),c=l.getPropertyValue("font-family"),f=c.match(Pi),d=l.getPropertyValue("font-weight"),m=l.getPropertyValue("content");if(s&&!f)return e.removeChild(s),a();if(f&&m!=="none"&&m!==""){const p=l.getPropertyValue("content");let g=Fo(c,d);const{value:b,isSecondary:k}=Mo(p),w=f[0].startsWith("FontAwesome");let h=lt(g,b),y=h;if(w){const x=Hi(b);x.iconName&&x.prefix&&(h=x.iconName,g=x.prefix)}if(h&&!k&&(!s||s.getAttribute(qe)!==g||s.getAttribute(Ke)!==y)){e.setAttribute(n,y),s&&e.removeChild(s);const x=ko(),{extra:C}=x;C.attributes[He]=t,gt(h,g).then(A=>{const F=ut(u(u({},x),{},{icons:{main:A,mask:kn()},prefix:g,iconName:y,extra:C,watchable:!0})),T=P.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(T,e.firstChild):e.appendChild(T),T.outerHTML=F.map(Z=>ge(Z)).join(`
560
560
  `),e.removeAttribute(n),a()}).catch(r)}else a()}else a()})}function Io(e){return Promise.all([Vn(e,"::before"),Vn(e,"::after")])}function Bo(e){return e.parentNode!==document.head&&!~ki.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(He)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function Un(e){if(V)return new Promise((t,n)=>{const a=ne(e.querySelectorAll("*")).filter(Bo).map(Io),r=pt.begin("searchPseudoElements");Dn(),Promise.all(a).then(()=>{r(),yt(),t()}).catch(()=>{r(),yt(),n()})})}var Ro={hooks(){return{mutationObserverCallbacks(e){return e.pseudoElementsCallback=Un,e}}},provides(e){e.pseudoElements2svg=function(t){const{node:n=P}=t;v.searchPseudoElements&&Un(n)}}};let Wn=!1;var Lo={mixout(){return{dom:{unwatch(){Dn(),Wn=!0}}}},hooks(){return{bootstrap(){Mn(ct("mutationObserverCallbacks",{}))},noAuto(){vo()},watch(e){const{observeMutationsRoot:t}=e;Wn?yt():Mn(ct("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}};const zn=e=>{let t={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce((n,a)=>{const r=a.toLowerCase().split("-"),i=r[0];let s=r.slice(1).join("-");if(i&&s==="h")return n.flipX=!0,n;if(i&&s==="v")return n.flipY=!0,n;if(s=parseFloat(s),isNaN(s))return n;switch(i){case"grow":n.size=n.size+s;break;case"shrink":n.size=n.size-s;break;case"left":n.x=n.x-s;break;case"right":n.x=n.x+s;break;case"up":n.y=n.y-s;break;case"down":n.y=n.y+s;break;case"rotate":n.rotate=n.rotate+s;break}return n},t)};var Vo={mixout(){return{parse:{transform:e=>zn(e)}}},hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-transform");return n&&(e.transform=zn(n)),e}}},provides(e){e.generateAbstractTransformGrouping=function(t){let{main:n,transform:a,containerWidth:r,iconWidth:i}=t;const s={transform:"translate(".concat(r/2," 256)")},l="translate(".concat(a.x*32,", ").concat(a.y*32,") "),c="scale(".concat(a.size/16*(a.flipX?-1:1),", ").concat(a.size/16*(a.flipY?-1:1),") "),f="rotate(".concat(a.rotate," 0 0)"),d={transform:"".concat(l," ").concat(c," ").concat(f)},m={transform:"translate(".concat(i/2*-1," -256)")},p={outer:s,inner:d,path:m};return{tag:"g",attributes:u({},p.outer),children:[{tag:"g",attributes:u({},p.inner),children:[{tag:n.icon.tag,children:n.icon.children,attributes:u(u({},n.icon.attributes),p.path)}]}]}}}};const wt={x:0,y:0,width:"100%",height:"100%"};function jn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function Uo(e){return e.tag==="g"?e.children:[e]}var Wo={hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-mask"),a=n?Ne(n.split(" ").map(r=>r.trim())):kn();return a.prefix||(a.prefix=$()),e.mask=a,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides(e){e.generateAbstractMask=function(t){let{children:n,attributes:a,main:r,mask:i,maskId:s,transform:l}=t;const{width:c,icon:f}=r,{width:d,icon:m}=i,p=Fi({transform:l,containerWidth:d,iconWidth:c}),g={tag:"rect",attributes:u(u({},wt),{},{fill:"white"})},b=f.children?{children:f.children.map(jn)}:{},k={tag:"g",attributes:u({},p.inner),children:[jn(u({tag:f.tag,attributes:u(u({},f.attributes),p.path)},b))]},w={tag:"g",attributes:u({},p.outer),children:[k]},h="mask-".concat(s||me()),y="clip-".concat(s||me()),x={tag:"mask",attributes:u(u({},wt),{},{id:h,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[g,w]},C={tag:"defs",children:[{tag:"clipPath",attributes:{id:y},children:Uo(m)},x]};return n.push(C,{tag:"rect",attributes:u({fill:"currentColor","clip-path":"url(#".concat(y,")"),mask:"url(#".concat(h,")")},wt)}),{children:n,attributes:a}}}},zo={provides(e){let t=!1;Y.matchMedia&&(t=Y.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){const n=[],a={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};n.push({tag:"path",attributes:u(u({},a),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});const i=u(u({},r),{},{attributeName:"opacity"}),s={tag:"circle",attributes:u(u({},a),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||s.children.push({tag:"animate",attributes:u(u({},r),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:u(u({},i),{},{values:"1;0;1;1;0;1;"})}),n.push(s),n.push({tag:"path",attributes:u(u({},a),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:u(u({},i),{},{values:"1;0;0;0;0;1;"})}]}),t||n.push({tag:"path",attributes:u(u({},a),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:u(u({},i),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:n}}}},jo={hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-symbol"),a=n===null?!1:n===""?!0:n;return e.symbol=a,e}}}},Yo=[Ri,Oo,Ao,Eo,To,Ro,Lo,Vo,Wo,zo,jo];no(Yo,{mixoutsTo:D}),D.noAuto;const Yn=D.config,Gn=D.library;D.dom;const Be=D.parse;D.findIconDefinition,D.toHtml;const Go=D.icon;D.layer;const $o=D.text;D.counter;function $n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$n(Object(n),!0).forEach(function(a){N(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$n(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ho(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qo(e){var t=Ho(e,"string");return typeof t=="symbol"?t:t+""}function Re(e){"@babel/helpers - typeof";return Re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Re(e)}function N(e,t,n){return t=qo(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ko(e,t){if(e==null)return{};var n={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;n[a]=e[a]}return n}function Xo(e,t){if(e==null)return{};var n=Ko(e,t),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)a=i[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function kt(e){return Qo(e)||Jo(e)||Zo(e)||es()}function Qo(e){if(Array.isArray(e))return _t(e)}function Jo(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Zo(e,t){if(e){if(typeof e=="string")return _t(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _t(e,t)}}function _t(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function es(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
561
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ts=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Hn={exports:{}};(function(e){(function(t){var n=function(h,y,x){if(!f(y)||m(y)||p(y)||g(y)||c(y))return y;var C,A=0,F=0;if(d(y))for(C=[],F=y.length;A<F;A++)C.push(n(h,y[A],x));else{C={};for(var T in y)Object.prototype.hasOwnProperty.call(y,T)&&(C[h(T,x)]=n(h,y[T],x))}return C},a=function(h,y){y=y||{};var x=y.separator||"_",C=y.split||/(?=[A-Z])/;return h.split(C).join(x)},r=function(h){return b(h)?h:(h=h.replace(/[\-_\s]+(.)?/g,function(y,x){return x?x.toUpperCase():""}),h.substr(0,1).toLowerCase()+h.substr(1))},i=function(h){var y=r(h);return y.substr(0,1).toUpperCase()+y.substr(1)},s=function(h,y){return a(h,y).toLowerCase()},l=Object.prototype.toString,c=function(h){return typeof h=="function"},f=function(h){return h===Object(h)},d=function(h){return l.call(h)=="[object Array]"},m=function(h){return l.call(h)=="[object Date]"},p=function(h){return l.call(h)=="[object RegExp]"},g=function(h){return l.call(h)=="[object Boolean]"},b=function(h){return h=h-0,h===h},k=function(h,y){var x=y&&"process"in y?y.process:y;return typeof x!="function"?h:function(C,A){return x(C,h,A)}},w={camelize:r,decamelize:s,pascalize:i,depascalize:s,camelizeKeys:function(h,y){return n(k(r,y),h)},decamelizeKeys:function(h,y){return n(k(s,y),h,y)},pascalizeKeys:function(h,y){return n(k(i,y),h)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=w:t.humps=w})(ts)})(Hn);var ns=Hn.exports,as=["class","style"];function rs(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var a=n.indexOf(":"),r=ns.camelize(n.slice(0,a)),i=n.slice(a+1).trim();return t[r]=i,t},{})}function is(e){return e.split(/\s+/).reduce(function(t,n){return t[n]=!0,t},{})}function xt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var a=(e.children||[]).map(function(c){return xt(c)}),r=Object.keys(e.attributes||{}).reduce(function(c,f){var d=e.attributes[f];switch(f){case"class":c.class=is(d);break;case"style":c.style=rs(d);break;default:c.attrs[f]=d}return c},{attrs:{},class:{},style:{}});n.class;var i=n.style,s=i===void 0?{}:i,l=Xo(n,as);return o.h(e.tag,I(I(I({},t),{},{class:r.class,style:I(I({},r.style),s)},r.attrs),l),a)}var qn=!1;try{qn=process.env.NODE_ENV==="production"}catch{}function os(){if(!qn&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function ve(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?N({},e,t):{}}function ss(e){var t,n=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip==="horizontal"||e.flip==="both","fa-flip-vertical":e.flip==="vertical"||e.flip==="both"},N(N(N(N(N(N(N(N(N(N(t,"fa-".concat(e.size),e.size!==null),"fa-rotate-".concat(e.rotation),e.rotation!==null),"fa-pull-".concat(e.pull),e.pull!==null),"fa-swap-opacity",e.swapOpacity),"fa-bounce",e.bounce),"fa-shake",e.shake),"fa-beat",e.beat),"fa-fade",e.fade),"fa-beat-fade",e.beatFade),"fa-flash",e.flash),N(N(t,"fa-spin-pulse",e.spinPulse),"fa-spin-reverse",e.spinReverse));return Object.keys(n).map(function(a){return n[a]?a:null}).filter(function(a){return a})}function Kn(e){if(e&&Re(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(Be.icon)return Be.icon(e);if(e===null)return null;if(Re(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}var ie=o.defineComponent({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(t){return[!0,!1,"horizontal","vertical","both"].indexOf(t)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},maskId:{type:String,default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(t){return["right","left"].indexOf(t)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(t){return[90,180,270].indexOf(Number.parseInt(t,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(t){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(t)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},titleId:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1}},setup:function(t,n){var a=n.attrs,r=o.computed(function(){return Kn(t.icon)}),i=o.computed(function(){return ve("classes",ss(t))}),s=o.computed(function(){return ve("transform",typeof t.transform=="string"?Be.transform(t.transform):t.transform)}),l=o.computed(function(){return ve("mask",Kn(t.mask))}),c=o.computed(function(){return Go(r.value,I(I(I(I({},i.value),s.value),l.value),{},{symbol:t.symbol,title:t.title,titleId:t.titleId,maskId:t.maskId}))});o.watch(c,function(d){if(!d)return os("Could not find one or more icon(s)",r.value,l.value)},{immediate:!0});var f=o.computed(function(){return c.value?xt(c.value.abstract[0],{},a):null});return function(){return f.value}}});o.defineComponent({name:"FontAwesomeLayers",props:{fixedWidth:{type:Boolean,default:!1}},setup:function(t,n){var a=n.slots,r=Yn.familyPrefix,i=o.computed(function(){return["".concat(r,"-layers")].concat(kt(t.fixedWidth?["".concat(r,"-fw")]:[]))});return function(){return o.h("div",{class:i.value},a.default?a.default():[])}}}),o.defineComponent({name:"FontAwesomeLayersText",props:{value:{type:[String,Number],default:""},transform:{type:[String,Object],default:null},counter:{type:Boolean,default:!1},position:{type:String,default:null,validator:function(t){return["bottom-left","bottom-right","top-left","top-right"].indexOf(t)>-1}}},setup:function(t,n){var a=n.attrs,r=Yn.familyPrefix,i=o.computed(function(){return ve("classes",[].concat(kt(t.counter?["".concat(r,"-layers-counter")]:[]),kt(t.position?["".concat(r,"-layers-").concat(t.position)]:[])))}),s=o.computed(function(){return ve("transform",typeof t.transform=="string"?Be.transform(t.transform):t.transform)}),l=o.computed(function(){var f=$o(t.value.toString(),I(I({},s.value),i.value)),d=f.abstract;return t.counter&&(d[0].attributes.class=d[0].attributes.class.replace("fa-layers-text","")),d[0]}),c=o.computed(function(){return xt(l.value,{},a)});return function(){return c.value}}});const ql="",ls={name:"ViGridKebabMenu",components:{FontAwesomeIcon:ie},props:{actions:{type:Array},rowKey:{type:String},row:{type:Object},showMenu:{type:Boolean}}},cs={key:0,class:"actions-menu"},fs=["onClick"];function us(e,t,n,a,r,i){const s=o.resolveComponent("font-awesome-icon");return o.openBlock(),o.createElementBlock("div",{class:"vi-grid-kebab-menu",ref:"kebabMenu",onClick:t[0]||(t[0]=o.withModifiers(l=>e.$emit("toggleMenu"),["stop"]))},[o.createVNode(s,{icon:["fas","ellipsis"]}),n.showMenu?(o.openBlock(),o.createElementBlock("div",cs,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.actions,l=>(o.openBlock(),o.createElementBlock("div",{key:l.action,onClick:c=>e.$emit("action-clicked",l.action),class:"actions-menu-item"},o.toDisplayString(l.name),9,fs))),128))])):o.createCommentVNode("",!0)],512)}const ds=E(ls,[["render",us]]),Kl="",ms={name:"ViGridSimpleActions",props:{actions:{type:Array}}},gs={class:"vi-grid-builder-actions"},hs=["onClick"];function ps(e,t,n,a,r,i){return o.openBlock(),o.createElementBlock("div",gs,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.actions,(s,l)=>(o.openBlock(),o.createElementBlock("div",{key:l},[o.createElementVNode("button",{onClick:o.withModifiers(c=>e.$emit("action-clicked",s.action),["stop"])},o.toDisplayString(s.name),9,hs)]))),128))])}const vs=E(ms,[["render",ps]]);function ys(e,t){return{visibleActions:o.computed(()=>e.actions.filter(i=>i.isVisible===void 0?!0:i.isVisible(e.row))),onActionClicked:i=>{t("action-clicked",{action:i,row:e.row})},toggleRowMenu:i=>{e.rowMenuOpened===i[e.rowKey]?t("update:rowMenuOpened",null):t("update:rowMenuOpened",i[e.rowKey])}}}const Xl="",bs={name:"ViGridActions",components:{ViGridSimpleActions:vs,ViGridKebabMenu:ds},props:{kebab:{type:Boolean,default:!1},row:{},rowKey:String,actions:{type:Array,default:function(){return[]}},rowMenuOpened:{}},setup(e,{emit:t}){const{visibleActions:n,onActionClicked:a,toggleRowMenu:r}=ys(e,t);let i=o.ref(null);return o.onMounted(()=>{i.clickOutsideHandler=s=>{e.rowMenuOpened&&i.value&&!(i.value===s.target||i.value.contains(s.target))&&t("update:rowMenuOpened",null)},document.addEventListener("click",i.clickOutsideHandler)}),o.onUnmounted(()=>{document.removeEventListener("click",i.clickOutsideHandler)}),{visibleActions:n,onActionClicked:a,toggleRowMenu:r,gridActions:i}}},ws={class:"vi-grid-actions",ref:"gridActions"};function ks(e,t,n,a,r,i){const s=o.resolveComponent("vi-grid-kebab-menu"),l=o.resolveComponent("vi-grid-simple-actions");return o.openBlock(),o.createElementBlock("div",ws,[n.kebab?(o.openBlock(),o.createBlock(s,{key:0,actions:a.visibleActions,"row-key":n.rowKey,row:n.row,"show-menu":n.row[n.rowKey]===n.rowMenuOpened,onActionClicked:a.onActionClicked,onToggleMenu:t[0]||(t[0]=c=>a.toggleRowMenu(n.row))},null,8,["actions","row-key","row","show-menu","onActionClicked"])):(o.openBlock(),o.createBlock(l,{key:1,actions:a.visibleActions,"row-key":n.rowKey,row:n.row,onActionClicked:a.onActionClicked},null,8,["actions","row-key","row","onActionClicked"]))],512)}const _s=E(bs,[["render",ks]]),Ql="",xs={name:"ViGridLink",props:{link:{type:String},row:{type:Object,required:!0},value:{}}},Ps={class:"vi-grid-link"},Cs=["href"],Ss={key:1};function Os(e,t,n,a,r,i){return o.openBlock(),o.createElementBlock("div",Ps,[n.link&&n.row[n.link]||!n.link&&n.value?(o.openBlock(),o.createElementBlock("a",{key:0,href:n.row[n.link]??n.value,target:"_blank"},o.toDisplayString(n.value),9,Cs)):(o.openBlock(),o.createElementBlock("div",Ss,o.toDisplayString(n.value),1))])}const As=E(xs,[["render",Os]]),Jl="",Es={name:"ViGridNumber",props:{value:{},format:{type:Object}},computed:{formattedNumber(){return this.format?new Intl.NumberFormat(void 0,this.format).format(Number(this.value)):this.value}}},Ts={class:"vi-grid-number"};function Ns(e,t,n,a,r,i){return o.openBlock(),o.createElementBlock("div",Ts,o.toDisplayString(i.formattedNumber),1)}const Ds=E(Es,[["render",Ns]]),Zl="",Ms=e=>e.toLowerCase().replace(/([-_][a-z])/g,t=>t.toUpperCase().replace("-","").replace("_","")),Fs=e=>e.charAt(0).toUpperCase()+e.slice(1),Is={name:"ViGridField",components:{ViGridBadge:ta,ViGridImage:oa,ViGridText:fa,ViGridDate:Gr,ViGridActions:_s,ViGridLink:As,ViGridNumber:Ds},props:{field:{type:Object,required:!0},fieldValue:{},rowValue:{},rowKey:String,rowMenuOpened:{},noDataLabel:{type:String,default:"/"}},computed:{filedValueFormatted(){return this.fieldValue??this.noDataLabel},fieldComponent(){let e=this.field.type?`vi-grid-${this.field.type}`:"vi-grid-text",t=Fs(Ms(e));return this.$options.components[t]?e:!1}}},Bs={class:"vi-grid-field"};function Rs(e,t,n,a,r,i){return o.openBlock(),o.createElementBlock("div",Bs,[i.fieldComponent?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.fieldComponent),o.mergeProps({key:0},n.field,{value:i.filedValueFormatted,"original-value":n.fieldValue,row:n.rowValue,"row-key":n.rowKey,"row-menu-opened":n.rowMenuOpened,"onUpdate:rowMenuOpened":t[0]||(t[0]=s=>e.$emit("update:rowMenuOpened",s)),onActionClicked:t[1]||(t[1]=s=>e.$emit("action-clicked",s))}),null,16,["value","original-value","row","row-key","row-menu-opened"])):o.renderSlot(e.$slots,"custom-field",{key:1,field:n.field,value:n.fieldValue,originalValue:n.fieldValue,row:n.rowValue,rowKey:n.rowKey})])}const Ls=E(Is,[["render",Rs]]),ec="",Vs={name:"ViGridCheckbox",props:{value:{type:Boolean},name:{type:String},row:{type:Object}}},Us={class:"vi-grid-checkbox"},Ws=["checked"];function zs(e,t,n,a,r,i){return o.openBlock(),o.createElementBlock("div",Us,[o.createElementVNode("input",{type:"checkbox",checked:n.value,onChange:t[0]||(t[0]=s=>e.$emit("checkbox-clicked",{row:this.row,field:this.name,value:s.target.checked})),onClick:t[1]||(t[1]=o.withModifiers(()=>{},["stop"]))},null,40,Ws)])}const js=E(Vs,[["render",zs]]);function Ys(e){const t=o.computed(()=>e.columns.filter(a=>a.isVisible===void 0||a.isVisible)),n=o.computed(()=>e.selectable?1+t.value.length:t.value.length);return{visibleColumns:t,totalColumns:n}}const Gs={align:"center",bordered:!1,stripped:!0,disablePagination:!1,noDataLabel:"No data",noCellDataLabel:"/",compactPagination:!0,rowsPerPageOptions:[{label:5,value:5},{label:10,value:10},{label:15,value:15},{label:20,value:20}],rowsPerPage:10,defaultSlots:{}},Pt=o.ref({});function $s(e){const t=["align","disablePagination","defaultSlots","noDataLabel","noCellDataLabel","stripped","bordered","compactPagination","rowsPerPageOptions","rowsPerPage"];return{settings:o.computed(()=>{const a=t.reduce((r,i)=>(e[i]!==void 0&&(r[i]=e[i]),r),{});return{...Gs,...Pt.value,...a}})}}function Hs(e,t,n){const a=o.computed(()=>{var s;return e.serverMode?(s=e.pagination)==null?void 0:s.rowsNumber:e.rows.length}),r=o.computed(()=>{var f;if(e.serverMode||e.disablePagination)return n.value;let s=((f=e.pagination)==null?void 0:f.rowsPerPage)??Pt.value.rowsPerPage;if(s===0)return n.value;const l=(e.pagination.page-1)*s,c=l+s;return n.value.slice(l,c)});return{totalRows:a,currentVisibleRows:r,onRowClicked:s=>{e.clickableRow&&t("rowClicked",s)}}}function qs(e){let t=o.ref(null),n=o.ref(null),a=o.ref(null);const r=function(g){return a.value!==g?"ascending":t.value==="ascending"?"descending":null},i=function(g,b="auto"){if(b!=="auto")a.value=g.name,n.value=g.type,t.value=b;else{const k=r(g.name);a.value=k===null?null:g.name,n.value=k===null?null:g.type,t.value=k}return{field:a.value,direction:t.value}},s=()=>t.value===null?null:[{field:a.value,descending:t.value==="descending"}],l=(g,b,k)=>k==="ascending"?g.sort((w,h)=>Number(w[b])-Number(h[b])):k==="descending"?g.sort((w,h)=>Number(h[b])-Number(w[b])):g,c=(g,b,k)=>k==="ascending"?g.sort((w,h)=>w[b].toString().localeCompare(h[b].toString())):k==="descending"?g.sort((w,h)=>h[b].toString().localeCompare(w[b].toString())):g,f=function(g,b,k,w){return w?k==="number"?l(g,b,w):c(g,b,w):g},d=g=>{var b;if(!((b=g==null?void 0:g.sortBy)!=null&&b.length))a.value=null,n.value=null,t.value=null;else{let k=e.columns.find(w=>w.name===g.sortBy[0].field);i(k,g!=null&&g.sortBy[0].descending?"descending":"ascending")}},m=g=>a.value!==g.name?"unsorted":t.value,p=o.computed(()=>e.serverMode?e.rows??[]:f([...e.rows??[]],a.value,n.value,t.value));return{setSortFieldsFromPagination:d,getSortableState:m,setSortFields:i,formatSortFields:s,clientSort:f,sortedRows:p,sortField:a,sortDirection:t,sortFieldType:n}}function Ks(e,t,n){const a=o.computed({get(){var i,s;return{page:(i=e.pagination)==null?void 0:i.page,rowsPerPage:(s=e.pagination)==null?void 0:s.rowsPerPage}},set(i){t("update:pagination",{...e.pagination,...i})}});return{localPagination:a,onPaginationChange:({currentPage:i,rowsPerPage:s})=>{let l={...a.value,...i&&{page:i},...s!==void 0&&{rowsPerPage:s}};a.value=l,e.serverMode&&n({pagination:l})}}}const Xs={components:{FontAwesomeIcon:ie},props:{align:{type:String,default:"left"},colspan:{type:Number}}},Qs=["colspan"];function Js(e,t,n,a,r,i){return o.openBlock(),o.createElementBlock("th",{class:"vi-header-cell vi-cell",colspan:n.colspan},[o.createElementVNode("div",{class:o.normalizeClass(["vi-header-cell-content",n.align])},[o.renderSlot(e.$slots,"default")],2)],8,Qs)}const Xn=E(Xs,[["render",Js]]);function Zs(e,t,n){let a=o.ref([]);const r=(c,f)=>{f?a.value.push(c[e.rowKey]):a.value=a.value.filter(d=>d!==c[e.rowKey]),t("selectedRowsUpdate",a.value)},i=c=>{if(c)a.value=[...a.value,...n.value.filter(f=>!a.value.includes(f[e.rowKey])).map(f=>f[e.rowKey])];else{const f=n.value.map(d=>d[e.rowKey]);a.value=a.value.filter(d=>!f.includes(d))}t("selectedRowsUpdate",a.value)},s=c=>a.value.includes(c[e.rowKey]),l=o.computed(()=>{const c=n.value.filter(f=>a.value.includes(f[e.rowKey]));return c.length>0&&c.length===n.value.length});return{selectedRows:a,toggleRowSelect:r,toggleMasterSelect:i,isRowSelected:s,areAllRowsSelected:l}}const el={components:{ViGridHeadCell:Xn,FontAwesomeIcon:ie},props:{column:{type:Object,required:!0},align:{type:String},sortableState:{type:String,required:!0}}},tl={key:0,class:"sort-button"};function nl(e,t,n,a,r,i){const s=o.resolveComponent("font-awesome-icon"),l=o.resolveComponent("vi-grid-head-cell");return o.openBlock(),o.createBlock(l,{class:o.normalizeClass(n.sortableState),align:n.column.align??n.align},{default:o.withCtx(()=>[n.column.sortable?(o.openBlock(),o.createElementBlock("div",tl,[n.sortableState==="descending"?(o.openBlock(),o.createBlock(s,{key:0,icon:["fas","chevron-down"],onClick:t[0]||(t[0]=c=>e.$emit("sort",n.column))})):(o.openBlock(),o.createBlock(s,{key:1,icon:["fas","chevron-up"],onClick:t[1]||(t[1]=c=>e.$emit("sort",n.column))}))])):o.createCommentVNode("",!0),o.renderSlot(e.$slots,"default",{},()=>[o.createTextVNode(o.toDisplayString(n.column.label),1)])]),_:3},8,["class","align"])}const al=E(el,[["render",nl]]),tc="",rl={name:"ViGridBuilder",components:{ViGridHeadColumnCell:al,ViGridHeadCell:Xn,ViGridCheckbox:js,ViGridField:Ls},props:{rows:{type:Array},rowKey:{type:String},columns:{type:Array,required:!0},title:{type:String},align:{type:String},pagination:{type:Object},disablePagination:{type:Boolean,default:void 0},fetchServerData:{type:Function},fetchOnInit:{type:Boolean,default:!0},filter:{type:Object},loading:{type:Boolean,default:!1},noDataLabel:{type:String},noCellDataLabel:{type:String},clickableRow:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},serverMode:{type:Boolean,default:!0},stripped:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},compactPagination:{type:Boolean,default:void 0},rowsPerPageOptions:{type:Array}},setup(e,{emit:t}){let n=o.ref(null),a=o.ref(null),r=o.ref(!1);const i=({pagination:Le,filter:Ct,search:St}={})=>{const Ve=Le??e.pagination;return r.value=!0,e.fetchServerData({...Ve&&{pagination:Ve},filter:Ct??e.filter,search:St??e.search}).finally(()=>r.value=!1)},{visibleColumns:s,totalColumns:l}=Ys(e),{setSortFieldsFromPagination:c,getSortableState:f,setSortFields:d,sortField:m,sortDirection:p,formatSortFields:g,sortedRows:b}=qs(e);c(e.pagination);const{localPagination:k,onPaginationChange:w}=Ks(e,t,i);o.watch([m,p],(...Le)=>{e.serverMode?i({pagination:{...e.pagination,page:1,sortBy:g()}}):k.value={...k.value,page:1}});const{currentVisibleRows:h,totalRows:y,onRowClicked:x}=Hs(e,t,b),{selectedRows:C,toggleMasterSelect:A,toggleRowSelect:F,areAllRowsSelected:T,isRowSelected:Z}=Zs(e,t,h),ye=o.computed(()=>e.loading||r.value);e.serverMode&&e.fetchOnInit&&i();const{settings:oe}=$s(e);return{search:n,isFetchingData:r,totalRows:y,currentVisibleRows:h,visibleColumns:s,totalColumns:l,selectedRows:C,toggleMasterSelect:A,areAllRowsSelected:T,toggleRowSelect:F,setSortFields:d,fetchData:i,isDataLoading:ye,onRowClicked:x,isRowSelected:Z,getSortableState:f,sortDirection:p,localPagination:k,onPaginationChange:w,rowMenuOpened:a,settings:oe,sortedRows:b}}},il={class:"vi-grid-builder"},ol={class:"vi-table-head"},sl={key:0,class:"vi-header-row vi-table-row vi-title-row"},ll={class:"vi-header-row vi-table-row"},cl={key:1,class:"vi-body-row vi-table-row vi-loading-row"},fl={key:1,class:"loading-bar-container"},ul={key:0,class:"vi-table-body"},dl={class:"vi-body-row vi-table-row vi-no-data-row"},ml=["colspan"],gl={key:1,class:"vi-table-body"},hl=["onClick"],pl={key:0,class:"vi-cell vi-select-cell"},vl={class:"vi-body-row vi-table-row vi-footer-row"},yl=["colspan"];function bl(e,t,n,a,r,i){const s=o.resolveComponent("vi-grid-head-cell"),l=o.resolveComponent("vi-grid-checkbox"),c=o.resolveComponent("vi-grid-head-column-cell"),f=o.resolveComponent("vi-grid-field"),d=o.resolveComponent("vi-pagination");return o.openBlock(),o.createElementBlock("div",il,[o.createElementVNode("div",{class:o.normalizeClass(["vi-table-container",{loading:a.isDataLoading}])},[o.createElementVNode("table",{class:o.normalizeClass(["vi-table",{stripped:a.settings.stripped,bordered:a.settings.bordered}])},[o.createElementVNode("thead",ol,[n.title?(o.openBlock(),o.createElementBlock("tr",sl,[n.title?(o.openBlock(),o.createBlock(s,{key:0,colspan:a.visibleColumns.length,align:a.settings.align,class:"vi-title-cell"},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"title",{title:n.title},()=>[o.createElementVNode("span",null,o.toDisplayString(n.title)+"}",1)])]),_:3},8,["colspan","align"])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("tr",ll,[n.selectable?(o.openBlock(),o.createBlock(s,{key:0,class:"vi-select-cell",align:a.settings.align},{default:o.withCtx(()=>[o.createVNode(l,{name:"masterSelect",value:a.areAllRowsSelected,onCheckboxClicked:t[0]||(t[0]=m=>a.toggleMasterSelect(m.value))},null,8,["value"])]),_:1},8,["align"])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.visibleColumns,m=>(o.openBlock(),o.createBlock(c,{key:m.name,column:m,align:a.settings.align,"sortable-state":a.getSortableState(m),onSort:a.setSortFields},{default:o.withCtx(()=>[o.renderSlot(e.$slots,`vi-header-cell-${m.name}`,{column:m})]),_:2},1032,["column","align","sortable-state","onSort"]))),128))]),a.isDataLoading?(o.openBlock(),o.createElementBlock("tr",cl,[o.createVNode(s,{colspan:a.totalColumns,class:"vi-loading-cell"},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"loading",{},()=>[a.settings.defaultSlots.loading?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a.settings.defaultSlots.loading),{key:0})):(o.openBlock(),o.createElementBlock("div",fl,t[2]||(t[2]=[o.createElementVNode("div",{class:"loading-bar"},null,-1)])))])]),_:3},8,["colspan"])])):o.createCommentVNode("",!0)]),!a.currentVisibleRows.length&&!a.isDataLoading?(o.openBlock(),o.createElementBlock("tbody",ul,[o.createElementVNode("tr",dl,[o.renderSlot(e.$slots,"empty-data",{},()=>[a.settings.defaultSlots.noRows?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a.settings.defaultSlots.noRows),{key:0})):(o.openBlock(),o.createElementBlock("td",{key:1,colspan:a.totalColumns,class:"vi-body-cell vi-cell"},o.toDisplayString(a.settings.noDataLabel),9,ml))])])])):(o.openBlock(),o.createElementBlock("tbody",gl,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.currentVisibleRows,m=>(o.openBlock(),o.createElementBlock("tr",{key:m[n.rowKey],onClick:p=>a.onRowClicked(m),class:o.normalizeClass([{clickable:n.clickableRow,selected:a.isRowSelected(m)},"vi-body-row vi-table-row"])},[n.selectable?(o.openBlock(),o.createElementBlock("td",pl,[o.createElementVNode("div",{class:o.normalizeClass(["vi-grid-field",a.settings.align])},[o.createVNode(l,{row:m,name:n.rowKey,value:a.selectedRows.includes(m[n.rowKey]),onCheckboxClicked:p=>a.toggleRowSelect(m,p.value)},null,8,["row","name","value","onCheckboxClicked"])],2)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.visibleColumns,p=>(o.openBlock(),o.createElementBlock("td",{key:p.name,class:"vi-body-cell vi-cell"},[o.createVNode(f,{class:o.normalizeClass(p.align??a.settings.align),field:p,"field-value":p.render?p.render(m):m[p.name],"row-value":m,"row-key":n.rowKey,"row-menu-opened":a.rowMenuOpened,"onUpdate:rowMenuOpened":t[1]||(t[1]=g=>a.rowMenuOpened=g),onActionClicked:g=>e.$emit(g.action,g.row),onCheckboxClicked:g=>a.toggleRowSelect(m,g.value)},{"custom-field":o.withCtx(g=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(p.type),o.mergeProps({ref_for:!0},g),null,16))]),_:2},1032,["class","field","field-value","row-value","row-key","row-menu-opened","onActionClicked","onCheckboxClicked"])]))),128))],10,hl))),128)),o.createElementVNode("tr",vl,[o.createElementVNode("td",{colspan:a.totalColumns,class:"vi-body-cell vi-cell vi-footer-cell"},[o.renderSlot(e.$slots,"footer",{pagination:{...n.pagination,totalRows:a.totalRows}},()=>[a.settings.defaultSlots.footer?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a.settings.defaultSlots.footer),{key:0,pagination:{...n.pagination,totalRows:a.totalRows}},null,8,["pagination"])):o.createCommentVNode("",!0),a.settings.disablePagination?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(d,{key:1,"rows-per-page":a.localPagination.rowsPerPage??a.settings.rowsPerPage,"current-page":a.localPagination.page,"total-rows":a.totalRows,"max-pages-displayed":3,compact:a.settings.compactPagination,"rows-per-page-options":a.settings.rowsPerPageOptions,onUpdate:a.onPaginationChange},null,8,["rows-per-page","current-page","total-rows","compact","rows-per-page-options","onUpdate"]))])],8,yl)])]))],2)],2)])}const Qn=E(rl,[["render",bl]]),Jn={format:{date:"yyyy-MM-dd",dateTime:"yyyy-MM-dd HH:mm:ss",time:"HH:mm:ss"},mode:"dateTime"},nc="",wl={name:"ViPagination",components:{FontAwesomeIcon:ie},props:{rowsPerPage:{type:Number,required:!0},rowsPerPageOptions:{type:Array},totalRows:{type:Number,required:!0},currentPage:{type:Number,required:!0},maxPagesDisplayed:{type:Number,default:3},options:{type:Object,default:function(){return{rowsPerPageOptions:[{label:5,value:5},{label:10,value:10},{label:15,value:15},{label:20,value:20}]}}},compact:{type:Boolean}},computed:{totalPages(){return Math.ceil(this.totalRows/this.rowsOnPage)},firsVisiblePage(){return this.visiblePages[0]},lastVisiblePage(){return this.visiblePages[this.visiblePages.length-1]},firstVisibleRow(){return this.currentPage===1?1:(this.currentPage-1)*this.rowsOnPage},lastVisibleRow(){return this.currentPage===this.totalPages?this.totalRows:this.currentPage*this.rowsOnPage},visiblePages(){let e,t;if(this.totalPages<=this.maxPagesDisplayed)e=1,t=this.totalPages;else{const n=Math.floor(this.maxPagesDisplayed/2);e=Math.max(this.currentPage-n,1),t=e+this.maxPagesDisplayed-1,t>this.totalPages&&(t=this.totalPages,e=t-this.maxPagesDisplayed+1)}return Array.from({length:t-e+1},(n,a)=>e+a)},rowsOnPage(){return this.rowsPerPage>0?this.rowsPerPage:this.totalRows},compactPagination(){var e;return this.compact!==void 0?this.compact:((e=this.ViPaginationSettings)==null?void 0:e.compact)??!1}},methods:{paginationChange({currentPage:e,rowsPerPage:t}){let n={currentPage:e!==void 0?parseInt(e):this.currentPage,rowsPerPage:t!==void 0?parseInt(t):this.rowsPerPage};this.$emit("update",n)},pageChange(e){if(e===this.currentPage||e>this.totalPages||e<1)return!1;this.$emit("update:currentPage",parseInt(e)),this.paginationChange({currentPage:e})},rowsPerPageChange(e){const t=e.target.value;if(t===this.rowsPerPage)return!1;this.$emit("update:rowsPerPage",parseInt(t)),this.paginationChange({rowsPerPage:t,currentPage:1})}}},kl={class:"vi-pagination"},_l={class:"vi-rows-per-page"},xl=["value"],Pl=["value"],Cl={key:0},Sl={class:"vi-pages-navigator"},Ol={class:"page-actions"},Al={key:0,class:"page-numbers-container"},El=["onClick"],Tl={class:"page-actions"};function Nl(e,t,n,a,r,i){const s=o.resolveComponent("font-awesome-icon");return o.openBlock(),o.createElementBlock("div",kl,[o.createElementVNode("div",_l,[o.renderSlot(e.$slots,"rows-per-page",{rowsPerPage:i.rowsOnPage,rowsPerPageUpdate:i.rowsPerPageChange},()=>[t[5]||(t[5]=o.createElementVNode("span",null,"Rows per page ",-1)),o.createElementVNode("select",{value:n.rowsPerPage,onChange:t[0]||(t[0]=(...l)=>i.rowsPerPageChange&&i.rowsPerPageChange(...l))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.rowsPerPageOptions,l=>(o.openBlock(),o.createElementBlock("option",{key:l.value,value:l.value},o.toDisplayString(l.label),9,Pl))),128))],40,xl)])]),o.renderSlot(e.$slots,"visible-rows-info",{totalRows:n.totalRows,firstVisibleRow:i.firstVisibleRow,lastVisibleRow:i.lastVisibleRow},()=>[n.totalRows>0?(o.openBlock(),o.createElementBlock("div",Cl," Showing "+o.toDisplayString(i.firstVisibleRow)+" - "+o.toDisplayString(i.lastVisibleRow)+" of "+o.toDisplayString(n.totalRows),1)):o.createCommentVNode("",!0)]),o.createElementVNode("div",Sl,[o.renderSlot(e.$slots,"navigation-prev",{},()=>[o.createElementVNode("div",Ol,[o.createElementVNode("div",{onClick:t[1]||(t[1]=l=>i.pageChange(1)),class:o.normalizeClass(["vi-page-nav vi-page-first",{disabled:i.firsVisiblePage===1&&!n.compact}])},[o.createVNode(s,{icon:["fas","angles-left"],size:"lg"})],2),o.createElementVNode("div",{class:o.normalizeClass([{disabled:n.currentPage===1},"vi-page-nav vi-page-prev"]),onClick:t[2]||(t[2]=l=>i.pageChange(n.currentPage-1))},[o.createVNode(s,{icon:["fas","angle-left"]})],2)])]),i.compactPagination?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Al,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.visiblePages,l=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["vi-page-number",{active:l===n.currentPage}]),key:l,onClick:c=>i.pageChange(l)},o.toDisplayString(l),11,El))),128))])),o.renderSlot(e.$slots,"navigation-next",{},()=>[o.createElementVNode("div",Tl,[o.createElementVNode("div",{class:o.normalizeClass([{disabled:n.currentPage===i.totalPages},"vi-page-nav vi-page-next"]),onClick:t[3]||(t[3]=l=>i.pageChange(n.currentPage+1))},[o.createVNode(s,{icon:["fas","angle-right"]})],2),o.createElementVNode("div",{class:o.normalizeClass([{disabled:i.lastVisiblePage===i.totalPages&&!n.compact},"vi-page-nav vi-page-last"]),onClick:t[4]||(t[4]=l=>i.pageChange(i.totalPages))},[o.createVNode(s,{icon:["fas","angles-right"],size:"lg"})],2)])])])])}const Dl=E(wl,[["render",Nl]]);/*!
561
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ts=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Hn={exports:{}};(function(e){(function(t){var n=function(h,y,x){if(!f(y)||m(y)||p(y)||g(y)||c(y))return y;var C,A=0,F=0;if(d(y))for(C=[],F=y.length;A<F;A++)C.push(n(h,y[A],x));else{C={};for(var T in y)Object.prototype.hasOwnProperty.call(y,T)&&(C[h(T,x)]=n(h,y[T],x))}return C},a=function(h,y){y=y||{};var x=y.separator||"_",C=y.split||/(?=[A-Z])/;return h.split(C).join(x)},r=function(h){return b(h)?h:(h=h.replace(/[\-_\s]+(.)?/g,function(y,x){return x?x.toUpperCase():""}),h.substr(0,1).toLowerCase()+h.substr(1))},i=function(h){var y=r(h);return y.substr(0,1).toUpperCase()+y.substr(1)},s=function(h,y){return a(h,y).toLowerCase()},l=Object.prototype.toString,c=function(h){return typeof h=="function"},f=function(h){return h===Object(h)},d=function(h){return l.call(h)=="[object Array]"},m=function(h){return l.call(h)=="[object Date]"},p=function(h){return l.call(h)=="[object RegExp]"},g=function(h){return l.call(h)=="[object Boolean]"},b=function(h){return h=h-0,h===h},k=function(h,y){var x=y&&"process"in y?y.process:y;return typeof x!="function"?h:function(C,A){return x(C,h,A)}},w={camelize:r,decamelize:s,pascalize:i,depascalize:s,camelizeKeys:function(h,y){return n(k(r,y),h)},decamelizeKeys:function(h,y){return n(k(s,y),h,y)},pascalizeKeys:function(h,y){return n(k(i,y),h)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=w:t.humps=w})(ts)})(Hn);var ns=Hn.exports,as=["class","style"];function rs(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var a=n.indexOf(":"),r=ns.camelize(n.slice(0,a)),i=n.slice(a+1).trim();return t[r]=i,t},{})}function is(e){return e.split(/\s+/).reduce(function(t,n){return t[n]=!0,t},{})}function xt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var a=(e.children||[]).map(function(c){return xt(c)}),r=Object.keys(e.attributes||{}).reduce(function(c,f){var d=e.attributes[f];switch(f){case"class":c.class=is(d);break;case"style":c.style=rs(d);break;default:c.attrs[f]=d}return c},{attrs:{},class:{},style:{}});n.class;var i=n.style,s=i===void 0?{}:i,l=Xo(n,as);return o.h(e.tag,I(I(I({},t),{},{class:r.class,style:I(I({},r.style),s)},r.attrs),l),a)}var qn=!1;try{qn=process.env.NODE_ENV==="production"}catch{}function os(){if(!qn&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function ve(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?N({},e,t):{}}function ss(e){var t,n=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip==="horizontal"||e.flip==="both","fa-flip-vertical":e.flip==="vertical"||e.flip==="both"},N(N(N(N(N(N(N(N(N(N(t,"fa-".concat(e.size),e.size!==null),"fa-rotate-".concat(e.rotation),e.rotation!==null),"fa-pull-".concat(e.pull),e.pull!==null),"fa-swap-opacity",e.swapOpacity),"fa-bounce",e.bounce),"fa-shake",e.shake),"fa-beat",e.beat),"fa-fade",e.fade),"fa-beat-fade",e.beatFade),"fa-flash",e.flash),N(N(t,"fa-spin-pulse",e.spinPulse),"fa-spin-reverse",e.spinReverse));return Object.keys(n).map(function(a){return n[a]?a:null}).filter(function(a){return a})}function Kn(e){if(e&&Re(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(Be.icon)return Be.icon(e);if(e===null)return null;if(Re(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}var ie=o.defineComponent({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(t){return[!0,!1,"horizontal","vertical","both"].indexOf(t)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},maskId:{type:String,default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(t){return["right","left"].indexOf(t)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(t){return[90,180,270].indexOf(Number.parseInt(t,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(t){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(t)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},titleId:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1}},setup:function(t,n){var a=n.attrs,r=o.computed(function(){return Kn(t.icon)}),i=o.computed(function(){return ve("classes",ss(t))}),s=o.computed(function(){return ve("transform",typeof t.transform=="string"?Be.transform(t.transform):t.transform)}),l=o.computed(function(){return ve("mask",Kn(t.mask))}),c=o.computed(function(){return Go(r.value,I(I(I(I({},i.value),s.value),l.value),{},{symbol:t.symbol,title:t.title,titleId:t.titleId,maskId:t.maskId}))});o.watch(c,function(d){if(!d)return os("Could not find one or more icon(s)",r.value,l.value)},{immediate:!0});var f=o.computed(function(){return c.value?xt(c.value.abstract[0],{},a):null});return function(){return f.value}}});o.defineComponent({name:"FontAwesomeLayers",props:{fixedWidth:{type:Boolean,default:!1}},setup:function(t,n){var a=n.slots,r=Yn.familyPrefix,i=o.computed(function(){return["".concat(r,"-layers")].concat(kt(t.fixedWidth?["".concat(r,"-fw")]:[]))});return function(){return o.h("div",{class:i.value},a.default?a.default():[])}}}),o.defineComponent({name:"FontAwesomeLayersText",props:{value:{type:[String,Number],default:""},transform:{type:[String,Object],default:null},counter:{type:Boolean,default:!1},position:{type:String,default:null,validator:function(t){return["bottom-left","bottom-right","top-left","top-right"].indexOf(t)>-1}}},setup:function(t,n){var a=n.attrs,r=Yn.familyPrefix,i=o.computed(function(){return ve("classes",[].concat(kt(t.counter?["".concat(r,"-layers-counter")]:[]),kt(t.position?["".concat(r,"-layers-").concat(t.position)]:[])))}),s=o.computed(function(){return ve("transform",typeof t.transform=="string"?Be.transform(t.transform):t.transform)}),l=o.computed(function(){var f=$o(t.value.toString(),I(I({},s.value),i.value)),d=f.abstract;return t.counter&&(d[0].attributes.class=d[0].attributes.class.replace("fa-layers-text","")),d[0]}),c=o.computed(function(){return xt(l.value,{},a)});return function(){return c.value}}});const ql="",ls={name:"ViGridKebabMenu",components:{FontAwesomeIcon:ie},props:{actions:{type:Array},rowKey:{type:String},row:{type:Object},showMenu:{type:Boolean}}},cs={key:0,class:"actions-menu"},fs=["onClick"];function us(e,t,n,a,r,i){const s=o.resolveComponent("font-awesome-icon");return o.openBlock(),o.createElementBlock("div",{class:"vi-grid-kebab-menu",ref:"kebabMenu",onClick:t[0]||(t[0]=o.withModifiers(l=>e.$emit("toggleMenu"),["stop"]))},[o.createVNode(s,{icon:["fas","ellipsis"]}),n.showMenu?(o.openBlock(),o.createElementBlock("div",cs,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.actions,l=>(o.openBlock(),o.createElementBlock("div",{key:l.action,onClick:c=>e.$emit("action-clicked",l.action),class:"actions-menu-item"},o.toDisplayString(l.name),9,fs))),128))])):o.createCommentVNode("",!0)],512)}const ds=E(ls,[["render",us]]),Kl="",ms={name:"ViGridSimpleActions",props:{actions:{type:Array}}},gs={class:"vi-grid-builder-actions"},hs=["onClick"];function ps(e,t,n,a,r,i){return o.openBlock(),o.createElementBlock("div",gs,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.actions,(s,l)=>(o.openBlock(),o.createElementBlock("div",{key:l},[o.createElementVNode("button",{onClick:o.withModifiers(c=>e.$emit("action-clicked",s.action),["stop"])},o.toDisplayString(s.name),9,hs)]))),128))])}const vs=E(ms,[["render",ps]]);function ys(e,t){return{visibleActions:o.computed(()=>e.actions.filter(i=>i.isVisible===void 0?!0:i.isVisible(e.row))),onActionClicked:i=>{t("action-clicked",{action:i,row:e.row})},toggleRowMenu:i=>{e.rowMenuOpened===i[e.rowKey]?t("update:rowMenuOpened",null):t("update:rowMenuOpened",i[e.rowKey])}}}const Xl="",bs={name:"ViGridActions",components:{ViGridSimpleActions:vs,ViGridKebabMenu:ds},props:{kebab:{type:Boolean,default:!1},row:{},rowKey:String,actions:{type:Array,default:function(){return[]}},rowMenuOpened:{}},setup(e,{emit:t}){const{visibleActions:n,onActionClicked:a,toggleRowMenu:r}=ys(e,t);let i=o.ref(null);return o.onMounted(()=>{i.clickOutsideHandler=s=>{e.rowMenuOpened&&i.value&&!(i.value===s.target||i.value.contains(s.target))&&t("update:rowMenuOpened",null)},document.addEventListener("click",i.clickOutsideHandler)}),o.onUnmounted(()=>{document.removeEventListener("click",i.clickOutsideHandler)}),{visibleActions:n,onActionClicked:a,toggleRowMenu:r,gridActions:i}}},ws={class:"vi-grid-actions",ref:"gridActions"};function ks(e,t,n,a,r,i){const s=o.resolveComponent("vi-grid-kebab-menu"),l=o.resolveComponent("vi-grid-simple-actions");return o.openBlock(),o.createElementBlock("div",ws,[n.kebab?(o.openBlock(),o.createBlock(s,{key:0,actions:a.visibleActions,"row-key":n.rowKey,row:n.row,"show-menu":n.row[n.rowKey]===n.rowMenuOpened,onActionClicked:a.onActionClicked,onToggleMenu:t[0]||(t[0]=c=>a.toggleRowMenu(n.row))},null,8,["actions","row-key","row","show-menu","onActionClicked"])):(o.openBlock(),o.createBlock(l,{key:1,actions:a.visibleActions,"row-key":n.rowKey,row:n.row,onActionClicked:a.onActionClicked},null,8,["actions","row-key","row","onActionClicked"]))],512)}const _s=E(bs,[["render",ks]]),Ql="",xs={name:"ViGridLink",props:{link:{type:String},row:{type:Object,required:!0},value:{}}},Ps={class:"vi-grid-link"},Cs=["href"],Ss={key:1};function Os(e,t,n,a,r,i){return o.openBlock(),o.createElementBlock("div",Ps,[n.link&&n.row[n.link]||!n.link&&n.value?(o.openBlock(),o.createElementBlock("a",{key:0,href:n.row[n.link]??n.value,target:"_blank"},o.toDisplayString(n.value),9,Cs)):(o.openBlock(),o.createElementBlock("div",Ss,o.toDisplayString(n.value),1))])}const As=E(xs,[["render",Os]]),Jl="",Es={name:"ViGridNumber",props:{value:{},format:{type:Object}},computed:{formattedNumber(){return this.format?new Intl.NumberFormat(void 0,this.format).format(Number(this.value)):this.value}}},Ts={class:"vi-grid-number"};function Ns(e,t,n,a,r,i){return o.openBlock(),o.createElementBlock("div",Ts,o.toDisplayString(i.formattedNumber),1)}const Ds=E(Es,[["render",Ns]]),Zl="",Ms=e=>e.toLowerCase().replace(/([-_][a-z])/g,t=>t.toUpperCase().replace("-","").replace("_","")),Fs=e=>e.charAt(0).toUpperCase()+e.slice(1),Is={name:"ViGridField",components:{ViGridBadge:ta,ViGridImage:oa,ViGridText:fa,ViGridDate:Gr,ViGridActions:_s,ViGridLink:As,ViGridNumber:Ds},props:{field:{type:Object,required:!0},fieldValue:{},rowValue:{},rowKey:String,rowMenuOpened:{},noDataLabel:{type:String,default:"/"}},computed:{filedValueFormatted(){return this.fieldValue??this.noDataLabel},fieldComponent(){let e=this.field.type?`vi-grid-${this.field.type}`:"vi-grid-text",t=Fs(Ms(e));return this.$options.components[t]?e:!1}}},Bs={class:"vi-grid-field"};function Rs(e,t,n,a,r,i){return o.openBlock(),o.createElementBlock("div",Bs,[i.fieldComponent?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.fieldComponent),o.mergeProps({key:0},n.field,{value:i.filedValueFormatted,"original-value":n.fieldValue,row:n.rowValue,"row-key":n.rowKey,"row-menu-opened":n.rowMenuOpened,"onUpdate:rowMenuOpened":t[0]||(t[0]=s=>e.$emit("update:rowMenuOpened",s)),onActionClicked:t[1]||(t[1]=s=>e.$emit("action-clicked",s))}),null,16,["value","original-value","row","row-key","row-menu-opened"])):o.renderSlot(e.$slots,"custom-field",{key:1,field:n.field,value:n.fieldValue,originalValue:n.fieldValue,row:n.rowValue,rowKey:n.rowKey})])}const Ls=E(Is,[["render",Rs]]),ec="",Vs={name:"ViGridCheckbox",props:{value:{type:Boolean},name:{type:String},row:{type:Object}}},Us={class:"vi-grid-checkbox"},Ws=["checked"];function zs(e,t,n,a,r,i){return o.openBlock(),o.createElementBlock("div",Us,[o.createElementVNode("input",{type:"checkbox",checked:n.value,onChange:t[0]||(t[0]=s=>e.$emit("checkbox-clicked",{row:this.row,field:this.name,value:s.target.checked})),onClick:t[1]||(t[1]=o.withModifiers(()=>{},["stop"]))},null,40,Ws)])}const js=E(Vs,[["render",zs]]);function Ys(e){const t=o.computed(()=>e.columns.filter(a=>a.isVisible===void 0||a.isVisible)),n=o.computed(()=>e.selectable?1+t.value.length:t.value.length);return{visibleColumns:t,totalColumns:n}}const Gs={align:"center",bordered:!1,stripped:!0,disablePagination:!1,noDataLabel:"No data",noCellDataLabel:"/",compactPagination:!0,rowsPerPageOptions:[{label:5,value:5},{label:10,value:10},{label:15,value:15},{label:20,value:20}],rowsPerPage:10,defaultSlots:{}},Pt=o.ref({});function $s(e){const t=["align","disablePagination","defaultSlots","noDataLabel","noCellDataLabel","stripped","bordered","compactPagination","rowsPerPageOptions","rowsPerPage"];return{settings:o.computed(()=>{const a=t.reduce((r,i)=>(e[i]!==void 0&&(r[i]=e[i]),r),{});return{...Gs,...Pt.value,...a}})}}function Hs(e,t,n){const a=o.computed(()=>{var s;return e.serverMode?(s=e.pagination)==null?void 0:s.rowsNumber:e.rows.length}),r=o.computed(()=>{var f;if(e.serverMode||e.disablePagination)return n.value;let s=((f=e.pagination)==null?void 0:f.rowsPerPage)??Pt.value.rowsPerPage;if(s===0)return n.value;const l=(e.pagination.page-1)*s,c=l+s;return n.value.slice(l,c)});return{totalRows:a,currentVisibleRows:r,onRowClicked:s=>{e.clickableRow&&t("rowClicked",s)}}}function qs(e){let t=o.ref(null),n=o.ref(null),a=o.ref(null);const r=function(g){return a.value!==g?"ascending":t.value==="ascending"?"descending":null},i=function(g,b="auto"){if(b!=="auto")a.value=g.name,n.value=g.type,t.value=b;else{const k=r(g.name);a.value=k===null?null:g.name,n.value=k===null?null:g.type,t.value=k}return{field:a.value,direction:t.value}},s=()=>t.value===null?null:[{field:a.value,descending:t.value==="descending"}],l=(g,b,k)=>k==="ascending"?g.sort((w,h)=>Number(w[b])-Number(h[b])):k==="descending"?g.sort((w,h)=>Number(h[b])-Number(w[b])):g,c=(g,b,k)=>k==="ascending"?g.sort((w,h)=>w[b].toString().localeCompare(h[b].toString())):k==="descending"?g.sort((w,h)=>h[b].toString().localeCompare(w[b].toString())):g,f=function(g,b,k,w){return w?k==="number"?l(g,b,w):c(g,b,w):g},d=g=>{const b=g.sortBy?Array.isArray(g.sortBy)?g.sortBy[0].field:g.sortBy:null,k=b?Array.isArray(g.sortBy)?g.sortBy[0].descending:g.descending:null;if(!b)a.value=null,n.value=null,t.value=null;else{let w=e.columns.find(h=>h.name===b);i(w,k?"descending":"ascending")}},m=g=>a.value!==g.name?"unsorted":t.value,p=o.computed(()=>e.serverMode?e.rows??[]:f([...e.rows??[]],a.value,n.value,t.value));return{setSortFieldsFromPagination:d,getSortableState:m,setSortFields:i,formatSortFields:s,clientSort:f,sortedRows:p,sortField:a,sortDirection:t,sortFieldType:n}}function Ks(e,t,n){const a=o.computed({get(){var i,s;return{page:(i=e.pagination)==null?void 0:i.page,rowsPerPage:(s=e.pagination)==null?void 0:s.rowsPerPage}},set(i){t("update:pagination",{...e.pagination,...i})}});return{localPagination:a,onPaginationChange:({currentPage:i,rowsPerPage:s})=>{let l={...a.value,...i&&{page:i},...s!==void 0&&{rowsPerPage:s}};a.value=l,e.serverMode&&n({pagination:l})}}}const Xs={components:{FontAwesomeIcon:ie},props:{align:{type:String,default:"left"},colspan:{type:Number}}},Qs=["colspan"];function Js(e,t,n,a,r,i){return o.openBlock(),o.createElementBlock("th",{class:"vi-header-cell vi-cell",colspan:n.colspan},[o.createElementVNode("div",{class:o.normalizeClass(["vi-header-cell-content",n.align])},[o.renderSlot(e.$slots,"default")],2)],8,Qs)}const Xn=E(Xs,[["render",Js]]);function Zs(e,t,n){let a=o.ref([]);const r=(c,f)=>{f?a.value.push(c[e.rowKey]):a.value=a.value.filter(d=>d!==c[e.rowKey]),t("selectedRowsUpdate",a.value)},i=c=>{if(c)a.value=[...a.value,...n.value.filter(f=>!a.value.includes(f[e.rowKey])).map(f=>f[e.rowKey])];else{const f=n.value.map(d=>d[e.rowKey]);a.value=a.value.filter(d=>!f.includes(d))}t("selectedRowsUpdate",a.value)},s=c=>a.value.includes(c[e.rowKey]),l=o.computed(()=>{const c=n.value.filter(f=>a.value.includes(f[e.rowKey]));return c.length>0&&c.length===n.value.length});return{selectedRows:a,toggleRowSelect:r,toggleMasterSelect:i,isRowSelected:s,areAllRowsSelected:l}}const el={components:{ViGridHeadCell:Xn,FontAwesomeIcon:ie},props:{column:{type:Object,required:!0},align:{type:String},sortableState:{type:String,required:!0}}},tl={key:0,class:"sort-button"};function nl(e,t,n,a,r,i){const s=o.resolveComponent("font-awesome-icon"),l=o.resolveComponent("vi-grid-head-cell");return o.openBlock(),o.createBlock(l,{class:o.normalizeClass(n.sortableState),align:n.column.align??n.align},{default:o.withCtx(()=>[n.column.sortable?(o.openBlock(),o.createElementBlock("div",tl,[n.sortableState==="descending"?(o.openBlock(),o.createBlock(s,{key:0,icon:["fas","chevron-down"],onClick:t[0]||(t[0]=c=>e.$emit("sort",n.column))})):(o.openBlock(),o.createBlock(s,{key:1,icon:["fas","chevron-up"],onClick:t[1]||(t[1]=c=>e.$emit("sort",n.column))}))])):o.createCommentVNode("",!0),o.renderSlot(e.$slots,"default",{},()=>[o.createTextVNode(o.toDisplayString(n.column.label),1)])]),_:3},8,["class","align"])}const al=E(el,[["render",nl]]),tc="",rl={name:"ViGridBuilder",components:{ViGridHeadColumnCell:al,ViGridHeadCell:Xn,ViGridCheckbox:js,ViGridField:Ls},props:{rows:{type:Array},rowKey:{type:String},columns:{type:Array,required:!0},title:{type:String},align:{type:String},pagination:{type:Object},disablePagination:{type:Boolean,default:void 0},fetchServerData:{type:Function},fetchOnInit:{type:Boolean,default:!0},filter:{type:Object},loading:{type:Boolean,default:!1},noDataLabel:{type:String},noCellDataLabel:{type:String},clickableRow:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},serverMode:{type:Boolean,default:!0},stripped:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},compactPagination:{type:Boolean,default:void 0},rowsPerPageOptions:{type:Array}},setup(e,{emit:t}){let n=o.ref(null),a=o.ref(null),r=o.ref(!1);const i=({pagination:Le,filter:Ct,search:St}={})=>{const Ve=Le??e.pagination;return r.value=!0,e.fetchServerData({...Ve&&{pagination:Ve},filter:Ct??e.filter,search:St??e.search}).finally(()=>r.value=!1)},{visibleColumns:s,totalColumns:l}=Ys(e),{setSortFieldsFromPagination:c,getSortableState:f,setSortFields:d,sortField:m,sortDirection:p,formatSortFields:g,sortedRows:b}=qs(e);c(e.pagination);const{localPagination:k,onPaginationChange:w}=Ks(e,t,i);o.watch([m,p],(...Le)=>{e.serverMode?i({pagination:{...e.pagination,page:1,sortBy:g()}}):k.value={...k.value,page:1}});const{currentVisibleRows:h,totalRows:y,onRowClicked:x}=Hs(e,t,b),{selectedRows:C,toggleMasterSelect:A,toggleRowSelect:F,areAllRowsSelected:T,isRowSelected:Z}=Zs(e,t,h),ye=o.computed(()=>e.loading||r.value);e.serverMode&&e.fetchOnInit&&i();const{settings:oe}=$s(e);return{search:n,isFetchingData:r,totalRows:y,currentVisibleRows:h,visibleColumns:s,totalColumns:l,selectedRows:C,toggleMasterSelect:A,areAllRowsSelected:T,toggleRowSelect:F,setSortFields:d,fetchData:i,isDataLoading:ye,onRowClicked:x,isRowSelected:Z,getSortableState:f,sortDirection:p,localPagination:k,onPaginationChange:w,rowMenuOpened:a,settings:oe,sortedRows:b}}},il={class:"vi-grid-builder"},ol={class:"vi-table-head"},sl={key:0,class:"vi-header-row vi-table-row vi-title-row"},ll={class:"vi-header-row vi-table-row"},cl={key:1,class:"vi-body-row vi-table-row vi-loading-row"},fl={key:1,class:"loading-bar-container"},ul={key:0,class:"vi-table-body"},dl={class:"vi-body-row vi-table-row vi-no-data-row"},ml=["colspan"],gl={key:1,class:"vi-table-body"},hl=["onClick"],pl={key:0,class:"vi-cell vi-select-cell"},vl={class:"vi-body-row vi-table-row vi-footer-row"},yl=["colspan"];function bl(e,t,n,a,r,i){const s=o.resolveComponent("vi-grid-head-cell"),l=o.resolveComponent("vi-grid-checkbox"),c=o.resolveComponent("vi-grid-head-column-cell"),f=o.resolveComponent("vi-grid-field"),d=o.resolveComponent("vi-pagination");return o.openBlock(),o.createElementBlock("div",il,[o.renderSlot(e.$slots,"top"),o.createElementVNode("div",{class:o.normalizeClass(["vi-table-container",{loading:a.isDataLoading}])},[o.createElementVNode("table",{class:o.normalizeClass(["vi-table",{stripped:a.settings.stripped,bordered:a.settings.bordered}])},[o.createElementVNode("thead",ol,[n.title?(o.openBlock(),o.createElementBlock("tr",sl,[n.title?(o.openBlock(),o.createBlock(s,{key:0,colspan:a.visibleColumns.length,align:a.settings.align,class:"vi-title-cell"},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"title",{title:n.title},()=>[o.createElementVNode("span",null,o.toDisplayString(n.title)+"}",1)])]),_:3},8,["colspan","align"])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("tr",ll,[n.selectable?(o.openBlock(),o.createBlock(s,{key:0,class:"vi-select-cell",align:a.settings.align},{default:o.withCtx(()=>[o.createVNode(l,{name:"masterSelect",value:a.areAllRowsSelected,onCheckboxClicked:t[0]||(t[0]=m=>a.toggleMasterSelect(m.value))},null,8,["value"])]),_:1},8,["align"])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.visibleColumns,m=>(o.openBlock(),o.createBlock(c,{key:m.name,column:m,align:a.settings.align,"sortable-state":a.getSortableState(m),onSort:a.setSortFields},{default:o.withCtx(()=>[o.renderSlot(e.$slots,`vi-header-cell-${m.name}`,{column:m})]),_:2},1032,["column","align","sortable-state","onSort"]))),128))]),a.isDataLoading?(o.openBlock(),o.createElementBlock("tr",cl,[o.createVNode(s,{colspan:a.totalColumns,class:"vi-loading-cell"},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"loading",{},()=>[a.settings.defaultSlots.loading?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a.settings.defaultSlots.loading),{key:0})):(o.openBlock(),o.createElementBlock("div",fl,t[2]||(t[2]=[o.createElementVNode("div",{class:"loading-bar"},null,-1)])))])]),_:3},8,["colspan"])])):o.createCommentVNode("",!0)]),!a.currentVisibleRows.length&&!a.isDataLoading?(o.openBlock(),o.createElementBlock("tbody",ul,[o.createElementVNode("tr",dl,[o.renderSlot(e.$slots,"empty-data",{},()=>[a.settings.defaultSlots.noRows?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a.settings.defaultSlots.noRows),{key:0})):(o.openBlock(),o.createElementBlock("td",{key:1,colspan:a.totalColumns,class:"vi-body-cell vi-cell"},o.toDisplayString(a.settings.noDataLabel),9,ml))])])])):(o.openBlock(),o.createElementBlock("tbody",gl,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.currentVisibleRows,m=>(o.openBlock(),o.createElementBlock("tr",{key:m[n.rowKey],onClick:p=>a.onRowClicked(m),class:o.normalizeClass([{clickable:n.clickableRow,selected:a.isRowSelected(m)},"vi-body-row vi-table-row"])},[n.selectable?(o.openBlock(),o.createElementBlock("td",pl,[o.createElementVNode("div",{class:o.normalizeClass(["vi-grid-field",a.settings.align])},[o.createVNode(l,{row:m,name:n.rowKey,value:a.selectedRows.includes(m[n.rowKey]),onCheckboxClicked:p=>a.toggleRowSelect(m,p.value)},null,8,["row","name","value","onCheckboxClicked"])],2)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.visibleColumns,p=>(o.openBlock(),o.createElementBlock("td",{key:p.name,class:"vi-body-cell vi-cell"},[o.createVNode(f,{class:o.normalizeClass(p.align??a.settings.align),field:p,"field-value":p.render?p.render(m):m[p.name],"row-value":m,"row-key":n.rowKey,"row-menu-opened":a.rowMenuOpened,"onUpdate:rowMenuOpened":t[1]||(t[1]=g=>a.rowMenuOpened=g),onActionClicked:g=>e.$emit(g.action,g.row),onCheckboxClicked:g=>a.toggleRowSelect(m,g.value)},{"custom-field":o.withCtx(g=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(p.type),o.mergeProps({ref_for:!0},g),null,16))]),_:2},1032,["class","field","field-value","row-value","row-key","row-menu-opened","onActionClicked","onCheckboxClicked"])]))),128))],10,hl))),128)),o.createElementVNode("tr",vl,[o.createElementVNode("td",{colspan:a.totalColumns,class:"vi-body-cell vi-cell vi-footer-cell"},[o.renderSlot(e.$slots,"footer",{pagination:{...n.pagination,totalRows:a.totalRows}},()=>[a.settings.defaultSlots.footer?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a.settings.defaultSlots.footer),{key:0,pagination:{...n.pagination,totalRows:a.totalRows}},null,8,["pagination"])):o.createCommentVNode("",!0),a.settings.disablePagination?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(d,{key:1,"rows-per-page":a.localPagination.rowsPerPage??a.settings.rowsPerPage,"current-page":a.localPagination.page,"total-rows":a.totalRows,"max-pages-displayed":3,compact:a.settings.compactPagination,"rows-per-page-options":a.settings.rowsPerPageOptions,onUpdate:a.onPaginationChange},null,8,["rows-per-page","current-page","total-rows","compact","rows-per-page-options","onUpdate"]))])],8,yl)])]))],2)],2),o.renderSlot(e.$slots,"bottom")])}const Qn=E(rl,[["render",bl]]),Jn={format:{date:"yyyy-MM-dd",dateTime:"yyyy-MM-dd HH:mm:ss",time:"HH:mm:ss"},mode:"dateTime"},nc="",wl={name:"ViPagination",components:{FontAwesomeIcon:ie},props:{rowsPerPage:{type:Number,required:!0},rowsPerPageOptions:{type:Array},totalRows:{type:Number,required:!0},currentPage:{type:Number,required:!0},maxPagesDisplayed:{type:Number,default:3},options:{type:Object,default:function(){return{rowsPerPageOptions:[{label:5,value:5},{label:10,value:10},{label:15,value:15},{label:20,value:20}]}}},compact:{type:Boolean}},computed:{totalPages(){return Math.ceil(this.totalRows/this.rowsOnPage)},firsVisiblePage(){return this.visiblePages[0]},lastVisiblePage(){return this.visiblePages[this.visiblePages.length-1]},firstVisibleRow(){return this.currentPage===1?1:(this.currentPage-1)*this.rowsOnPage},lastVisibleRow(){return this.currentPage===this.totalPages?this.totalRows:this.currentPage*this.rowsOnPage},visiblePages(){let e,t;if(this.totalPages<=this.maxPagesDisplayed)e=1,t=this.totalPages;else{const n=Math.floor(this.maxPagesDisplayed/2);e=Math.max(this.currentPage-n,1),t=e+this.maxPagesDisplayed-1,t>this.totalPages&&(t=this.totalPages,e=t-this.maxPagesDisplayed+1)}return Array.from({length:t-e+1},(n,a)=>e+a)},rowsOnPage(){return this.rowsPerPage>0?this.rowsPerPage:this.totalRows},compactPagination(){var e;return this.compact!==void 0?this.compact:((e=this.ViPaginationSettings)==null?void 0:e.compact)??!1}},methods:{paginationChange({currentPage:e,rowsPerPage:t}){let n={currentPage:e!==void 0?parseInt(e):this.currentPage,rowsPerPage:t!==void 0?parseInt(t):this.rowsPerPage};this.$emit("update",n)},pageChange(e){if(e===this.currentPage||e>this.totalPages||e<1)return!1;this.$emit("update:currentPage",parseInt(e)),this.paginationChange({currentPage:e})},rowsPerPageChange(e){const t=e.target.value;if(t===this.rowsPerPage)return!1;this.$emit("update:rowsPerPage",parseInt(t)),this.paginationChange({rowsPerPage:t,currentPage:1})}}},kl={class:"vi-pagination"},_l={class:"vi-rows-per-page"},xl=["value"],Pl=["value"],Cl={key:0},Sl={class:"vi-pages-navigator"},Ol={class:"page-actions"},Al={key:0,class:"page-numbers-container"},El=["onClick"],Tl={class:"page-actions"};function Nl(e,t,n,a,r,i){const s=o.resolveComponent("font-awesome-icon");return o.openBlock(),o.createElementBlock("div",kl,[o.createElementVNode("div",_l,[o.renderSlot(e.$slots,"rows-per-page",{rowsPerPage:i.rowsOnPage,rowsPerPageUpdate:i.rowsPerPageChange},()=>[t[5]||(t[5]=o.createElementVNode("span",null,"Rows per page ",-1)),o.createElementVNode("select",{value:n.rowsPerPage,onChange:t[0]||(t[0]=(...l)=>i.rowsPerPageChange&&i.rowsPerPageChange(...l))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.rowsPerPageOptions,l=>(o.openBlock(),o.createElementBlock("option",{key:l.value,value:l.value},o.toDisplayString(l.label),9,Pl))),128))],40,xl)])]),o.renderSlot(e.$slots,"visible-rows-info",{totalRows:n.totalRows,firstVisibleRow:i.firstVisibleRow,lastVisibleRow:i.lastVisibleRow},()=>[n.totalRows>0?(o.openBlock(),o.createElementBlock("div",Cl," Showing "+o.toDisplayString(i.firstVisibleRow)+" - "+o.toDisplayString(i.lastVisibleRow)+" of "+o.toDisplayString(n.totalRows),1)):o.createCommentVNode("",!0)]),o.createElementVNode("div",Sl,[o.renderSlot(e.$slots,"navigation-prev",{},()=>[o.createElementVNode("div",Ol,[o.createElementVNode("div",{onClick:t[1]||(t[1]=l=>i.pageChange(1)),class:o.normalizeClass(["vi-page-nav vi-page-first",{disabled:i.firsVisiblePage===1&&!n.compact}])},[o.createVNode(s,{icon:["fas","angles-left"],size:"lg"})],2),o.createElementVNode("div",{class:o.normalizeClass([{disabled:n.currentPage===1},"vi-page-nav vi-page-prev"]),onClick:t[2]||(t[2]=l=>i.pageChange(n.currentPage-1))},[o.createVNode(s,{icon:["fas","angle-left"]})],2)])]),i.compactPagination?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Al,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.visiblePages,l=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["vi-page-number",{active:l===n.currentPage}]),key:l,onClick:c=>i.pageChange(l)},o.toDisplayString(l),11,El))),128))])),o.renderSlot(e.$slots,"navigation-next",{},()=>[o.createElementVNode("div",Tl,[o.createElementVNode("div",{class:o.normalizeClass([{disabled:n.currentPage===i.totalPages},"vi-page-nav vi-page-next"]),onClick:t[3]||(t[3]=l=>i.pageChange(n.currentPage+1))},[o.createVNode(s,{icon:["fas","angle-right"]})],2),o.createElementVNode("div",{class:o.normalizeClass([{disabled:i.lastVisiblePage===i.totalPages&&!n.compact},"vi-page-nav vi-page-last"]),onClick:t[4]||(t[4]=l=>i.pageChange(i.totalPages))},[o.createVNode(s,{icon:["fas","angles-right"],size:"lg"})],2)])])])])}const Dl=E(wl,[["render",Nl]]);/*!
562
562
  * Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com
563
563
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
564
564
  * Copyright 2024 Fonticons, Inc.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vi-grid-builder",
3
3
  "main": "./dist/vi-grid-builder.umd.cjs",
4
- "version": "2.1.1",
4
+ "version": "2.1.2",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"