@choosemycompany/ui 0.3.0 → 0.3.1

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/dist/index.js CHANGED
@@ -1,141 +1,30 @@
1
- import { defineComponent as j, computed as E, createElementBlock as I, openBlock as x, normalizeClass as k, renderSlot as C, Fragment as ye, createCommentVNode as _, unref as S, createVNode as je, createElementVNode as W, withCtx as Fe, ref as Q, shallowRef as _e, onMounted as Ee, watch as $e, onUnmounted as Ae, h as oe, nextTick as Le, createBlock as Me } from "vue";
2
- import './assets/index.css';const Ne = {
1
+ import { defineComponent as O, ref as K, shallowRef as je, onMounted as Fe, watch as $e, onUnmounted as Ae, h as ie, nextTick as Le, computed as _, createBlock as ve, openBlock as b, unref as T, normalizeClass as x, createElementBlock as v, createCommentVNode as j, renderSlot as P, Fragment as G, createVNode as Me, createElementVNode as N, withCtx as Ne, renderList as ze, toDisplayString as Re } from "vue";
2
+ import './assets/index.css';const De = {
3
3
  primary: "primary",
4
4
  secondary: "secondary"
5
- }, ze = {
5
+ }, Be = {
6
6
  default: "default",
7
7
  danger: "danger"
8
- }, De = {
8
+ }, Ve = {
9
9
  small: "small",
10
10
  medium: "medium"
11
- }, Re = ["disabled"], Kt = /* @__PURE__ */ j({
12
- name: "CmcButton",
13
- __name: "CmcButton",
14
- props: {
15
- kind: { default: Ne.primary },
16
- variant: { default: ze.default },
17
- size: { default: De.medium },
18
- disabled: { type: Boolean, default: !1 },
19
- loading: { type: Boolean, default: !1 }
20
- },
21
- emits: ["click"],
22
- setup(e, { emit: n }) {
23
- const t = e, s = n, o = E(() => ({
24
- button: !0,
25
- [`button--${t.variant}`]: !0,
26
- [`button--${t.kind}`]: !0,
27
- [`button--${t.size}`]: !0,
28
- "button--disabled": t.disabled
29
- })), i = () => {
30
- t.disabled || s("click", 1);
31
- };
32
- return (r, c) => (x(), I("button", {
33
- type: "button",
34
- class: k(o.value),
35
- onClick: i,
36
- disabled: t.disabled
37
- }, [
38
- C(r.$slots, "default")
39
- ], 10, Re));
40
- }
41
- }), P = {
42
- h1: "h1",
43
- h2: "h2",
44
- h3: "h3",
45
- h4: "h4",
46
- h5: "h5",
47
- h6: "h6"
48
- }, Be = /* @__PURE__ */ j({
49
- name: "CmcHeading",
50
- __name: "CmcHeading",
51
- props: {
52
- level: {}
53
- },
54
- setup(e) {
55
- const n = e, t = E(() => ({
56
- heading: !0,
57
- [`heading-${n.level}`]: !0
58
- }));
59
- return (s, o) => (x(), I(ye, null, [
60
- S(P).h1 === n.level ? (x(), I("h1", {
61
- key: 0,
62
- class: k(t.value)
63
- }, [
64
- C(s.$slots, "default")
65
- ], 2)) : _("", !0),
66
- S(P).h2 === n.level ? (x(), I("h2", {
67
- key: 1,
68
- class: k(t.value)
69
- }, [
70
- C(s.$slots, "default")
71
- ], 2)) : _("", !0),
72
- S(P).h3 === n.level ? (x(), I("h3", {
73
- key: 2,
74
- class: k(t.value)
75
- }, [
76
- C(s.$slots, "default")
77
- ], 2)) : _("", !0),
78
- S(P).h4 === n.level ? (x(), I("h4", {
79
- key: 3,
80
- class: k(t.value)
81
- }, [
82
- C(s.$slots, "default")
83
- ], 2)) : _("", !0),
84
- S(P).h5 === n.level ? (x(), I("h5", {
85
- key: 4,
86
- class: k(t.value)
87
- }, [
88
- C(s.$slots, "default")
89
- ], 2)) : _("", !0),
90
- S(P).h6 === n.level ? (x(), I("h6", {
91
- key: 5,
92
- class: k(t.value)
93
- }, [
94
- C(s.$slots, "default")
95
- ], 2)) : _("", !0)
96
- ], 64));
97
- }
98
- }), Wt = /* @__PURE__ */ j({
99
- name: "CmcTitle",
100
- __name: "CmcTitle",
101
- setup(e) {
102
- return (n, t) => (x(), I(ye, null, [
103
- je(Be, {
104
- level: S(P).h1
105
- }, {
106
- default: Fe(() => [
107
- C(n.$slots, "default")
108
- ]),
109
- _: 3
110
- }, 8, ["level"]),
111
- t[0] || (t[0] = W("hr", null, null, -1))
112
- ], 64));
113
- }
114
- }), He = {
115
- success: "success",
116
- danger: "danger",
117
- warning: "warning"
118
- }, Ve = { class: "status__label" }, Jt = /* @__PURE__ */ j({
119
- name: "CmcStatus",
120
- __name: "CmcStatus",
121
- props: {
122
- status: { default: He.success }
123
- },
124
- setup(e) {
125
- const n = e, t = E(() => ({
126
- status: !0,
127
- [`status--${n.status}`]: !0
128
- }));
129
- return (s, o) => (x(), I("div", {
130
- class: k(t.value)
131
- }, [
132
- o[0] || (o[0] = W("span", { class: "status__dot" }, null, -1)),
133
- W("span", Ve, [
134
- C(s.$slots, "default")
135
- ])
136
- ], 2));
137
- }
138
- }), be = /^[a-z0-9]+(-[a-z0-9]+)*$/, V = (e, n, t, s = "") => {
11
+ }, re = {
12
+ profile: "iconamoon:profile-light",
13
+ edit: "iconamoon:edit-light",
14
+ delete: "qlementine-icons:trash-16",
15
+ filter: "mdi:filter-outline",
16
+ search: "material-symbols:search",
17
+ people: "ic:outline-people",
18
+ plus: "ic:baseline-plus",
19
+ mail: "ci:mail-open",
20
+ "chevron-down": "mi:chevron-down"
21
+ }, J = {
22
+ medium: "medium",
23
+ large: "large"
24
+ }, Ge = {
25
+ primary: "primary",
26
+ secondary: "secondary"
27
+ }, xe = /^[a-z0-9]+(-[a-z0-9]+)*$/, q = (e, n, t, s = "") => {
139
28
  const o = e.split(":");
140
29
  if (e.slice(0, 1) === "@") {
141
30
  if (o.length < 2 || o.length > 3)
@@ -145,35 +34,35 @@ import './assets/index.css';const Ne = {
145
34
  if (o.length > 3 || !o.length)
146
35
  return null;
147
36
  if (o.length > 1) {
148
- const c = o.pop(), u = o.pop(), l = {
37
+ const l = o.pop(), a = o.pop(), c = {
149
38
  // Allow provider without '@': "provider:prefix:name"
150
39
  provider: o.length > 0 ? o[0] : s,
151
- prefix: u,
152
- name: c
40
+ prefix: a,
41
+ name: l
153
42
  };
154
- return n && !D(l) ? null : l;
43
+ return n && !D(c) ? null : c;
155
44
  }
156
45
  const i = o[0], r = i.split("-");
157
46
  if (r.length > 1) {
158
- const c = {
47
+ const l = {
159
48
  provider: s,
160
49
  prefix: r.shift(),
161
50
  name: r.join("-")
162
51
  };
163
- return n && !D(c) ? null : c;
52
+ return n && !D(l) ? null : l;
164
53
  }
165
54
  if (t && s === "") {
166
- const c = {
55
+ const l = {
167
56
  provider: s,
168
57
  prefix: "",
169
58
  name: i
170
59
  };
171
- return n && !D(c, t) ? null : c;
60
+ return n && !D(l, t) ? null : l;
172
61
  }
173
62
  return null;
174
63
  }, D = (e, n) => e ? !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
175
64
  // Check name: cannot be empty
176
- ((n && e.prefix === "" || e.prefix) && e.name) : !1, ve = Object.freeze(
65
+ ((n && e.prefix === "" || e.prefix) && e.name) : !1, we = Object.freeze(
177
66
  {
178
67
  left: 0,
179
68
  top: 0,
@@ -184,23 +73,23 @@ import './assets/index.css';const Ne = {
184
73
  rotate: 0,
185
74
  vFlip: !1,
186
75
  hFlip: !1
187
- }), G = Object.freeze({
188
- ...ve,
76
+ }), Q = Object.freeze({
77
+ ...we,
189
78
  ...H
190
- }), J = Object.freeze({
191
- ...G,
79
+ }), X = Object.freeze({
80
+ ...Q,
192
81
  body: "",
193
82
  hidden: !1
194
83
  });
195
- function Ge(e, n) {
84
+ function He(e, n) {
196
85
  const t = {};
197
86
  !e.hFlip != !n.hFlip && (t.hFlip = !0), !e.vFlip != !n.vFlip && (t.vFlip = !0);
198
87
  const s = ((e.rotate || 0) + (n.rotate || 0)) % 4;
199
88
  return s && (t.rotate = s), t;
200
89
  }
201
- function se(e, n) {
202
- const t = Ge(e, n);
203
- for (const s in J)
90
+ function ce(e, n) {
91
+ const t = He(e, n);
92
+ for (const s in X)
204
93
  s in H ? s in e && !(s in t) && (t[s] = H[s]) : s in n ? t[s] = n[s] : s in e && (t[s] = e[s]);
205
94
  return t;
206
95
  }
@@ -211,8 +100,8 @@ function qe(e, n) {
211
100
  return o[r] = [];
212
101
  if (!(r in o)) {
213
102
  o[r] = null;
214
- const c = s[r] && s[r].parent, u = c && i(c);
215
- u && (o[r] = [c].concat(u));
103
+ const l = s[r] && s[r].parent, a = l && i(l);
104
+ a && (o[r] = [l].concat(a));
216
105
  }
217
106
  return o[r];
218
107
  }
@@ -221,15 +110,15 @@ function qe(e, n) {
221
110
  function Qe(e, n, t) {
222
111
  const s = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
223
112
  let i = {};
224
- function r(c) {
225
- i = se(
226
- s[c] || o[c],
113
+ function r(l) {
114
+ i = ce(
115
+ s[l] || o[l],
227
116
  i
228
117
  );
229
118
  }
230
- return r(n), t.forEach(r), se(e, i);
119
+ return r(n), t.forEach(r), ce(e, i);
231
120
  }
232
- function xe(e, n) {
121
+ function Ie(e, n) {
233
122
  const t = [];
234
123
  if (typeof e != "object" || typeof e.icons != "object")
235
124
  return t;
@@ -247,19 +136,19 @@ const Ue = {
247
136
  provider: "",
248
137
  aliases: {},
249
138
  not_found: {},
250
- ...ve
139
+ ...we
251
140
  };
252
- function U(e, n) {
141
+ function W(e, n) {
253
142
  for (const t in n)
254
143
  if (t in e && typeof e[t] != typeof n[t])
255
144
  return !1;
256
145
  return !0;
257
146
  }
258
- function we(e) {
147
+ function Ce(e) {
259
148
  if (typeof e != "object" || e === null)
260
149
  return null;
261
150
  const n = e;
262
- if (typeof n.prefix != "string" || !e.icons || typeof e.icons != "object" || !U(e, Ue))
151
+ if (typeof n.prefix != "string" || !e.icons || typeof e.icons != "object" || !W(e, Ue))
263
152
  return null;
264
153
  const t = n.icons;
265
154
  for (const o in t) {
@@ -268,9 +157,9 @@ function we(e) {
268
157
  // Name cannot be empty
269
158
  !o || // Must have body
270
159
  typeof i.body != "string" || // Check other props
271
- !U(
160
+ !W(
272
161
  i,
273
- J
162
+ X
274
163
  )
275
164
  )
276
165
  return null;
@@ -282,16 +171,16 @@ function we(e) {
282
171
  // Name cannot be empty
283
172
  !o || // Parent must be set and point to existing icon
284
173
  typeof r != "string" || !t[r] && !s[r] || // Check other props
285
- !U(
174
+ !W(
286
175
  i,
287
- J
176
+ X
288
177
  )
289
178
  )
290
179
  return null;
291
180
  }
292
181
  return n;
293
182
  }
294
- const ie = /* @__PURE__ */ Object.create(null);
183
+ const le = /* @__PURE__ */ Object.create(null);
295
184
  function Ke(e, n) {
296
185
  return {
297
186
  provider: e,
@@ -301,11 +190,11 @@ function Ke(e, n) {
301
190
  };
302
191
  }
303
192
  function $(e, n) {
304
- const t = ie[e] || (ie[e] = /* @__PURE__ */ Object.create(null));
193
+ const t = le[e] || (le[e] = /* @__PURE__ */ Object.create(null));
305
194
  return t[n] || (t[n] = Ke(e, n));
306
195
  }
307
- function Ie(e, n) {
308
- return we(n) ? xe(n, (t, s) => {
196
+ function ke(e, n) {
197
+ return Ce(n) ? Ie(n, (t, s) => {
309
198
  s ? e.icons[t] = s : e.missing.add(t);
310
199
  }) : [];
311
200
  }
@@ -317,31 +206,31 @@ function We(e, n, t) {
317
206
  }
318
207
  return !1;
319
208
  }
320
- let N = !1;
321
- function ke(e) {
322
- return typeof e == "boolean" && (N = e), N;
209
+ let z = !1;
210
+ function Pe(e) {
211
+ return typeof e == "boolean" && (z = e), z;
323
212
  }
324
- function Je(e) {
325
- const n = typeof e == "string" ? V(e, !0, N) : e;
213
+ function Ze(e) {
214
+ const n = typeof e == "string" ? q(e, !0, z) : e;
326
215
  if (n) {
327
216
  const t = $(n.provider, n.prefix), s = n.name;
328
217
  return t.icons[s] || (t.missing.has(s) ? null : void 0);
329
218
  }
330
219
  }
331
- function Xe(e, n) {
332
- const t = V(e, !0, N);
220
+ function Je(e, n) {
221
+ const t = q(e, !0, z);
333
222
  if (!t)
334
223
  return !1;
335
224
  const s = $(t.provider, t.prefix);
336
225
  return n ? We(s, t.name, n) : (s.missing.add(t.name), !0);
337
226
  }
338
- function Ye(e, n) {
227
+ function Xe(e, n) {
339
228
  if (typeof e != "object")
340
229
  return !1;
341
- if (typeof n != "string" && (n = e.provider || ""), N && !n && !e.prefix) {
230
+ if (typeof n != "string" && (n = e.provider || ""), z && !n && !e.prefix) {
342
231
  let o = !1;
343
- return we(e) && (e.prefix = "", xe(e, (i, r) => {
344
- Xe(i, r) && (o = !0);
232
+ return Ce(e) && (e.prefix = "", Ie(e, (i, r) => {
233
+ Je(i, r) && (o = !0);
345
234
  })), o;
346
235
  }
347
236
  const t = e.prefix;
@@ -351,33 +240,33 @@ function Ye(e, n) {
351
240
  }))
352
241
  return !1;
353
242
  const s = $(n, t);
354
- return !!Ie(s, e);
243
+ return !!ke(s, e);
355
244
  }
356
- const Ce = Object.freeze({
245
+ const _e = Object.freeze({
357
246
  width: null,
358
247
  height: null
359
248
  }), Se = Object.freeze({
360
249
  // Dimensions
361
- ...Ce,
250
+ ..._e,
362
251
  // Transformations
363
252
  ...H
364
- }), Ze = /(-?[0-9.]*[0-9]+[0-9.]*)/g, et = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
365
- function re(e, n, t) {
253
+ }), Ye = /(-?[0-9.]*[0-9]+[0-9.]*)/g, et = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
254
+ function ae(e, n, t) {
366
255
  if (n === 1)
367
256
  return e;
368
257
  if (t = t || 100, typeof e == "number")
369
258
  return Math.ceil(e * n * t) / t;
370
259
  if (typeof e != "string")
371
260
  return e;
372
- const s = e.split(Ze);
261
+ const s = e.split(Ye);
373
262
  if (s === null || !s.length)
374
263
  return e;
375
264
  const o = [];
376
265
  let i = s.shift(), r = et.test(i);
377
266
  for (; ; ) {
378
267
  if (r) {
379
- const c = parseFloat(i);
380
- isNaN(c) ? o.push(i) : o.push(Math.ceil(c * n * t) / t);
268
+ const l = parseFloat(i);
269
+ isNaN(l) ? o.push(i) : o.push(Math.ceil(l * n * t) / t);
381
270
  } else
382
271
  o.push(i);
383
272
  if (i = s.shift(), i === void 0)
@@ -412,7 +301,7 @@ function ot(e, n, t) {
412
301
  const st = (e) => e === "unset" || e === "undefined" || e === "none";
413
302
  function it(e, n) {
414
303
  const t = {
415
- ...G,
304
+ ...Q,
416
305
  ...e
417
306
  }, s = {
418
307
  ...Se,
@@ -424,19 +313,19 @@ function it(e, n) {
424
313
  height: t.height
425
314
  };
426
315
  let i = t.body;
427
- [t, s].forEach((g) => {
428
- const f = [], F = g.hFlip, T = g.vFlip;
429
- let w = g.rotate;
430
- F ? T ? w += 2 : (f.push(
316
+ [t, s].forEach((h) => {
317
+ const f = [], S = h.hFlip, C = h.vFlip;
318
+ let k = h.rotate;
319
+ S ? C ? k += 2 : (f.push(
431
320
  "translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"
432
- ), f.push("scale(-1 1)"), o.top = o.left = 0) : T && (f.push(
321
+ ), f.push("scale(-1 1)"), o.top = o.left = 0) : C && (f.push(
433
322
  "translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"
434
323
  ), f.push("scale(1 -1)"), o.top = o.left = 0);
435
- let b;
436
- switch (w < 0 && (w -= Math.floor(w / 4) * 4), w = w % 4, w) {
324
+ let w;
325
+ switch (k < 0 && (k -= Math.floor(k / 4) * 4), k = k % 4, k) {
437
326
  case 1:
438
- b = o.height / 2 + o.top, f.unshift(
439
- "rotate(90 " + b.toString() + " " + b.toString() + ")"
327
+ w = o.height / 2 + o.top, f.unshift(
328
+ "rotate(90 " + w.toString() + " " + w.toString() + ")"
440
329
  );
441
330
  break;
442
331
  case 2:
@@ -445,25 +334,25 @@ function it(e, n) {
445
334
  );
446
335
  break;
447
336
  case 3:
448
- b = o.width / 2 + o.left, f.unshift(
449
- "rotate(-90 " + b.toString() + " " + b.toString() + ")"
337
+ w = o.width / 2 + o.left, f.unshift(
338
+ "rotate(-90 " + w.toString() + " " + w.toString() + ")"
450
339
  );
451
340
  break;
452
341
  }
453
- w % 2 === 1 && (o.left !== o.top && (b = o.left, o.left = o.top, o.top = b), o.width !== o.height && (b = o.width, o.width = o.height, o.height = b)), f.length && (i = ot(
342
+ k % 2 === 1 && (o.left !== o.top && (w = o.left, o.left = o.top, o.top = w), o.width !== o.height && (w = o.width, o.width = o.height, o.height = w)), f.length && (i = ot(
454
343
  i,
455
344
  '<g transform="' + f.join(" ") + '">',
456
345
  "</g>"
457
346
  ));
458
347
  });
459
- const r = s.width, c = s.height, u = o.width, l = o.height;
460
- let a, d;
461
- r === null ? (d = c === null ? "1em" : c === "auto" ? l : c, a = re(d, u / l)) : (a = r === "auto" ? u : r, d = c === null ? re(a, l / u) : c === "auto" ? l : c);
462
- const p = {}, m = (g, f) => {
463
- st(f) || (p[g] = f.toString());
348
+ const r = s.width, l = s.height, a = o.width, c = o.height;
349
+ let u, d;
350
+ r === null ? (d = l === null ? "1em" : l === "auto" ? c : l, u = ae(d, a / c)) : (u = r === "auto" ? a : r, d = l === null ? ae(u, c / a) : l === "auto" ? c : l);
351
+ const p = {}, g = (h, f) => {
352
+ st(f) || (p[h] = f.toString());
464
353
  };
465
- m("width", a), m("height", d);
466
- const y = [o.left, o.top, u, l];
354
+ g("width", u), g("height", d);
355
+ const y = [o.left, o.top, a, c];
467
356
  return p.viewBox = y.join(" "), {
468
357
  attributes: p,
469
358
  viewBox: y,
@@ -472,7 +361,7 @@ function it(e, n) {
472
361
  }
473
362
  const rt = /\sid="(\S+)"/g, ct = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
474
363
  let lt = 0;
475
- function ut(e, n = ct) {
364
+ function at(e, n = ct) {
476
365
  const t = [];
477
366
  let s;
478
367
  for (; s = rt.exec(e); )
@@ -481,23 +370,23 @@ function ut(e, n = ct) {
481
370
  return e;
482
371
  const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
483
372
  return t.forEach((i) => {
484
- const r = typeof n == "function" ? n(i) : n + (lt++).toString(), c = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
373
+ const r = typeof n == "function" ? n(i) : n + (lt++).toString(), l = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
485
374
  e = e.replace(
486
375
  // Allowed characters before id: [#;"]
487
376
  // Allowed characters after id: [)"], .[a-z]
488
- new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"),
377
+ new RegExp('([#;"])(' + l + ')([")]|\\.[a-z])', "g"),
489
378
  "$1" + r + o + "$3"
490
379
  );
491
380
  }), e = e.replace(new RegExp(o, "g"), ""), e;
492
381
  }
493
- const X = /* @__PURE__ */ Object.create(null);
494
- function at(e, n) {
495
- X[e] = n;
496
- }
497
- function Y(e) {
498
- return X[e] || X[""];
382
+ const Y = /* @__PURE__ */ Object.create(null);
383
+ function ut(e, n) {
384
+ Y[e] = n;
499
385
  }
500
386
  function ee(e) {
387
+ return Y[e] || Y[""];
388
+ }
389
+ function ne(e) {
501
390
  let n;
502
391
  if (typeof e.resources == "string")
503
392
  n = [e.resources];
@@ -522,21 +411,21 @@ function ee(e) {
522
411
  dataAfterTimeout: e.dataAfterTimeout !== !1
523
412
  };
524
413
  }
525
- const te = /* @__PURE__ */ Object.create(null), L = [
414
+ const oe = /* @__PURE__ */ Object.create(null), L = [
526
415
  "https://api.simplesvg.com",
527
416
  "https://api.unisvg.com"
528
- ], R = [];
417
+ ], B = [];
529
418
  for (; L.length > 0; )
530
- L.length === 1 || Math.random() > 0.5 ? R.push(L.shift()) : R.push(L.pop());
531
- te[""] = ee({
532
- resources: ["https://api.iconify.design"].concat(R)
419
+ L.length === 1 || Math.random() > 0.5 ? B.push(L.shift()) : B.push(L.pop());
420
+ oe[""] = ne({
421
+ resources: ["https://api.iconify.design"].concat(B)
533
422
  });
534
423
  function ft(e, n) {
535
- const t = ee(n);
536
- return t === null ? !1 : (te[e] = t, !0);
424
+ const t = ne(n);
425
+ return t === null ? !1 : (oe[e] = t, !0);
537
426
  }
538
- function ne(e) {
539
- return te[e];
427
+ function se(e) {
428
+ return oe[e];
540
429
  }
541
430
  const dt = () => {
542
431
  let e;
@@ -546,9 +435,9 @@ const dt = () => {
546
435
  } catch {
547
436
  }
548
437
  };
549
- let ce = dt();
438
+ let ue = dt();
550
439
  function pt(e, n) {
551
- const t = ne(e);
440
+ const t = se(e);
552
441
  if (!t)
553
442
  return 0;
554
443
  let s;
@@ -574,36 +463,36 @@ const mt = (e, n, t) => {
574
463
  provider: e,
575
464
  prefix: n,
576
465
  icons: []
577
- }, c = 0;
578
- return t.forEach((u, l) => {
579
- c += u.length + 1, c >= o && l > 0 && (s.push(r), r = {
466
+ }, l = 0;
467
+ return t.forEach((a, c) => {
468
+ l += a.length + 1, l >= o && c > 0 && (s.push(r), r = {
580
469
  type: i,
581
470
  provider: e,
582
471
  prefix: n,
583
472
  icons: []
584
- }, c = u.length), r.icons.push(u);
473
+ }, l = a.length), r.icons.push(a);
585
474
  }), s.push(r), s;
586
475
  };
587
476
  function gt(e) {
588
477
  if (typeof e == "string") {
589
- const n = ne(e);
478
+ const n = se(e);
590
479
  if (n)
591
480
  return n.path;
592
481
  }
593
482
  return "/";
594
483
  }
595
484
  const yt = (e, n, t) => {
596
- if (!ce) {
485
+ if (!ue) {
597
486
  t("abort", 424);
598
487
  return;
599
488
  }
600
489
  let s = gt(n.provider);
601
490
  switch (n.type) {
602
491
  case "icons": {
603
- const i = n.prefix, c = n.icons.join(","), u = new URLSearchParams({
604
- icons: c
492
+ const i = n.prefix, l = n.icons.join(","), a = new URLSearchParams({
493
+ icons: l
605
494
  });
606
- s += i + ".json?" + u.toString();
495
+ s += i + ".json?" + a.toString();
607
496
  break;
608
497
  }
609
498
  case "custom": {
@@ -616,7 +505,7 @@ const yt = (e, n, t) => {
616
505
  return;
617
506
  }
618
507
  let o = 503;
619
- ce(e + s).then((i) => {
508
+ ue(e + s).then((i) => {
620
509
  const r = i.status;
621
510
  if (r !== 200) {
622
511
  setTimeout(() => {
@@ -658,15 +547,15 @@ function vt(e) {
658
547
  if (s.name === o.name && s.prefix === o.prefix && s.provider === o.provider)
659
548
  return;
660
549
  s = o;
661
- const i = o.provider, r = o.prefix, c = o.name, u = t[i] || (t[i] = /* @__PURE__ */ Object.create(null)), l = u[r] || (u[r] = $(i, r));
662
- let a;
663
- c in l.icons ? a = n.loaded : r === "" || l.missing.has(c) ? a = n.missing : a = n.pending;
550
+ const i = o.provider, r = o.prefix, l = o.name, a = t[i] || (t[i] = /* @__PURE__ */ Object.create(null)), c = a[r] || (a[r] = $(i, r));
551
+ let u;
552
+ l in c.icons ? u = n.loaded : r === "" || c.missing.has(l) ? u = n.missing : u = n.pending;
664
553
  const d = {
665
554
  provider: i,
666
555
  prefix: r,
667
- name: c
556
+ name: l
668
557
  };
669
- a.push(d);
558
+ u.push(d);
670
559
  }), n;
671
560
  }
672
561
  function Te(e, n) {
@@ -684,27 +573,27 @@ function xt(e) {
684
573
  let t = !1;
685
574
  const s = e.provider, o = e.prefix;
686
575
  n.forEach((i) => {
687
- const r = i.icons, c = r.pending.length;
688
- r.pending = r.pending.filter((u) => {
689
- if (u.prefix !== o)
576
+ const r = i.icons, l = r.pending.length;
577
+ r.pending = r.pending.filter((a) => {
578
+ if (a.prefix !== o)
690
579
  return !0;
691
- const l = u.name;
692
- if (e.icons[l])
580
+ const c = a.name;
581
+ if (e.icons[c])
693
582
  r.loaded.push({
694
583
  provider: s,
695
584
  prefix: o,
696
- name: l
585
+ name: c
697
586
  });
698
- else if (e.missing.has(l))
587
+ else if (e.missing.has(c))
699
588
  r.missing.push({
700
589
  provider: s,
701
590
  prefix: o,
702
- name: l
591
+ name: c
703
592
  });
704
593
  else
705
594
  return t = !0, !0;
706
595
  return !1;
707
- }), r.pending.length !== c && (t || Te([e], i.id), i.callback(
596
+ }), r.pending.length !== l && (t || Te([e], i.id), i.callback(
708
597
  r.loaded.slice(0),
709
598
  r.missing.slice(0),
710
599
  r.pending.slice(0),
@@ -728,14 +617,14 @@ function It(e, n, t) {
728
617
  (r.loaderCallbacks || (r.loaderCallbacks = [])).push(i);
729
618
  }), o;
730
619
  }
731
- function kt(e, n = !0, t = !1) {
620
+ function Ct(e, n = !0, t = !1) {
732
621
  const s = [];
733
622
  return e.forEach((o) => {
734
- const i = typeof o == "string" ? V(o, n, t) : o;
623
+ const i = typeof o == "string" ? q(o, n, t) : o;
735
624
  i && s.push(i);
736
625
  }), s;
737
626
  }
738
- var Ct = {
627
+ var kt = {
739
628
  resources: [],
740
629
  index: 0,
741
630
  timeout: 2e3,
@@ -743,186 +632,186 @@ var Ct = {
743
632
  random: !1,
744
633
  dataAfterTimeout: !1
745
634
  };
746
- function St(e, n, t, s) {
635
+ function Pt(e, n, t, s) {
747
636
  const o = e.resources.length, i = e.random ? Math.floor(Math.random() * o) : e.index;
748
637
  let r;
749
638
  if (e.random) {
750
- let h = e.resources.slice(0);
751
- for (r = []; h.length > 1; ) {
752
- const v = Math.floor(Math.random() * h.length);
753
- r.push(h[v]), h = h.slice(0, v).concat(h.slice(v + 1));
639
+ let m = e.resources.slice(0);
640
+ for (r = []; m.length > 1; ) {
641
+ const I = Math.floor(Math.random() * m.length);
642
+ r.push(m[I]), m = m.slice(0, I).concat(m.slice(I + 1));
754
643
  }
755
- r = r.concat(h);
644
+ r = r.concat(m);
756
645
  } else
757
646
  r = e.resources.slice(i).concat(e.resources.slice(0, i));
758
- const c = Date.now();
759
- let u = "pending", l = 0, a, d = null, p = [], m = [];
760
- typeof s == "function" && m.push(s);
647
+ const l = Date.now();
648
+ let a = "pending", c = 0, u, d = null, p = [], g = [];
649
+ typeof s == "function" && g.push(s);
761
650
  function y() {
762
651
  d && (clearTimeout(d), d = null);
763
652
  }
764
- function g() {
765
- u === "pending" && (u = "aborted"), y(), p.forEach((h) => {
766
- h.status === "pending" && (h.status = "aborted");
653
+ function h() {
654
+ a === "pending" && (a = "aborted"), y(), p.forEach((m) => {
655
+ m.status === "pending" && (m.status = "aborted");
767
656
  }), p = [];
768
657
  }
769
- function f(h, v) {
770
- v && (m = []), typeof h == "function" && m.push(h);
658
+ function f(m, I) {
659
+ I && (g = []), typeof m == "function" && g.push(m);
771
660
  }
772
- function F() {
661
+ function S() {
773
662
  return {
774
- startTime: c,
663
+ startTime: l,
775
664
  payload: n,
776
- status: u,
777
- queriesSent: l,
665
+ status: a,
666
+ queriesSent: c,
778
667
  queriesPending: p.length,
779
668
  subscribe: f,
780
- abort: g
669
+ abort: h
781
670
  };
782
671
  }
783
- function T() {
784
- u = "failed", m.forEach((h) => {
785
- h(void 0, a);
672
+ function C() {
673
+ a = "failed", g.forEach((m) => {
674
+ m(void 0, u);
786
675
  });
787
676
  }
788
- function w() {
789
- p.forEach((h) => {
790
- h.status === "pending" && (h.status = "aborted");
677
+ function k() {
678
+ p.forEach((m) => {
679
+ m.status === "pending" && (m.status = "aborted");
791
680
  }), p = [];
792
681
  }
793
- function b(h, v, A) {
794
- const z = v !== "success";
795
- switch (p = p.filter((O) => O !== h), u) {
682
+ function w(m, I, A) {
683
+ const R = I !== "success";
684
+ switch (p = p.filter((E) => E !== m), a) {
796
685
  case "pending":
797
686
  break;
798
687
  case "failed":
799
- if (z || !e.dataAfterTimeout)
688
+ if (R || !e.dataAfterTimeout)
800
689
  return;
801
690
  break;
802
691
  default:
803
692
  return;
804
693
  }
805
- if (v === "abort") {
806
- a = A, T();
694
+ if (I === "abort") {
695
+ u = A, C();
807
696
  return;
808
697
  }
809
- if (z) {
810
- a = A, p.length || (r.length ? q() : T());
698
+ if (R) {
699
+ u = A, p.length || (r.length ? U() : C());
811
700
  return;
812
701
  }
813
- if (y(), w(), !e.random) {
814
- const O = e.resources.indexOf(h.resource);
815
- O !== -1 && O !== e.index && (e.index = O);
702
+ if (y(), k(), !e.random) {
703
+ const E = e.resources.indexOf(m.resource);
704
+ E !== -1 && E !== e.index && (e.index = E);
816
705
  }
817
- u = "completed", m.forEach((O) => {
818
- O(A);
706
+ a = "completed", g.forEach((E) => {
707
+ E(A);
819
708
  });
820
709
  }
821
- function q() {
822
- if (u !== "pending")
710
+ function U() {
711
+ if (a !== "pending")
823
712
  return;
824
713
  y();
825
- const h = r.shift();
826
- if (h === void 0) {
714
+ const m = r.shift();
715
+ if (m === void 0) {
827
716
  if (p.length) {
828
717
  d = setTimeout(() => {
829
- y(), u === "pending" && (w(), T());
718
+ y(), a === "pending" && (k(), C());
830
719
  }, e.timeout);
831
720
  return;
832
721
  }
833
- T();
722
+ C();
834
723
  return;
835
724
  }
836
- const v = {
725
+ const I = {
837
726
  status: "pending",
838
- resource: h,
839
- callback: (A, z) => {
840
- b(v, A, z);
727
+ resource: m,
728
+ callback: (A, R) => {
729
+ w(I, A, R);
841
730
  }
842
731
  };
843
- p.push(v), l++, d = setTimeout(q, e.rotate), t(h, n, v.callback);
732
+ p.push(I), c++, d = setTimeout(U, e.rotate), t(m, n, I.callback);
844
733
  }
845
- return setTimeout(q), F;
734
+ return setTimeout(U), S;
846
735
  }
847
736
  function Oe(e) {
848
737
  const n = {
849
- ...Ct,
738
+ ...kt,
850
739
  ...e
851
740
  };
852
741
  let t = [];
853
742
  function s() {
854
- t = t.filter((c) => c().status === "pending");
743
+ t = t.filter((l) => l().status === "pending");
855
744
  }
856
- function o(c, u, l) {
857
- const a = St(
745
+ function o(l, a, c) {
746
+ const u = Pt(
858
747
  n,
859
- c,
860
- u,
748
+ l,
749
+ a,
861
750
  (d, p) => {
862
- s(), l && l(d, p);
751
+ s(), c && c(d, p);
863
752
  }
864
753
  );
865
- return t.push(a), a;
754
+ return t.push(u), u;
866
755
  }
867
- function i(c) {
868
- return t.find((u) => c(u)) || null;
756
+ function i(l) {
757
+ return t.find((a) => l(a)) || null;
869
758
  }
870
759
  return {
871
760
  query: o,
872
761
  find: i,
873
- setIndex: (c) => {
874
- n.index = c;
762
+ setIndex: (l) => {
763
+ n.index = l;
875
764
  },
876
765
  getIndex: () => n.index,
877
766
  cleanup: s
878
767
  };
879
768
  }
880
- function le() {
769
+ function fe() {
881
770
  }
882
- const K = /* @__PURE__ */ Object.create(null);
883
- function Tt(e) {
884
- if (!K[e]) {
885
- const n = ne(e);
771
+ const Z = /* @__PURE__ */ Object.create(null);
772
+ function _t(e) {
773
+ if (!Z[e]) {
774
+ const n = se(e);
886
775
  if (!n)
887
776
  return;
888
777
  const t = Oe(n), s = {
889
778
  config: n,
890
779
  redundancy: t
891
780
  };
892
- K[e] = s;
781
+ Z[e] = s;
893
782
  }
894
- return K[e];
783
+ return Z[e];
895
784
  }
896
- function Ot(e, n, t) {
785
+ function St(e, n, t) {
897
786
  let s, o;
898
787
  if (typeof e == "string") {
899
- const i = Y(e);
788
+ const i = ee(e);
900
789
  if (!i)
901
- return t(void 0, 424), le;
790
+ return t(void 0, 424), fe;
902
791
  o = i.send;
903
- const r = Tt(e);
792
+ const r = _t(e);
904
793
  r && (s = r.redundancy);
905
794
  } else {
906
- const i = ee(e);
795
+ const i = ne(e);
907
796
  if (i) {
908
797
  s = Oe(i);
909
- const r = e.resources ? e.resources[0] : "", c = Y(r);
910
- c && (o = c.send);
798
+ const r = e.resources ? e.resources[0] : "", l = ee(r);
799
+ l && (o = l.send);
911
800
  }
912
801
  }
913
- return !s || !o ? (t(void 0, 424), le) : s.query(n, o, t)().abort;
802
+ return !s || !o ? (t(void 0, 424), fe) : s.query(n, o, t)().abort;
914
803
  }
915
- function ue() {
804
+ function de() {
916
805
  }
917
- function Pt(e) {
806
+ function Tt(e) {
918
807
  e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
919
808
  e.iconsLoaderFlag = !1, xt(e);
920
809
  }));
921
810
  }
922
- function jt(e) {
811
+ function Ot(e) {
923
812
  const n = [], t = [];
924
813
  return e.forEach((s) => {
925
- (s.match(be) ? n : t).push(s);
814
+ (s.match(xe) ? n : t).push(s);
926
815
  }), {
927
816
  valid: n,
928
817
  invalid: t
@@ -937,23 +826,23 @@ function M(e, n, t) {
937
826
  }
938
827
  if (t && typeof t == "object")
939
828
  try {
940
- if (!Ie(e, t).length) {
829
+ if (!ke(e, t).length) {
941
830
  s();
942
831
  return;
943
832
  }
944
833
  } catch (o) {
945
834
  console.error(o);
946
835
  }
947
- s(), Pt(e);
836
+ s(), Tt(e);
948
837
  }
949
- function ae(e, n) {
838
+ function pe(e, n) {
950
839
  e instanceof Promise ? e.then((t) => {
951
840
  n(t);
952
841
  }).catch(() => {
953
842
  n(null);
954
843
  }) : n(e);
955
844
  }
956
- function Ft(e, n) {
845
+ function Et(e, n) {
957
846
  e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(n).sort() : e.iconsToLoad = n, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
958
847
  e.iconsQueueFlag = !1;
959
848
  const { provider: t, prefix: s } = e, o = e.iconsToLoad;
@@ -961,83 +850,83 @@ function Ft(e, n) {
961
850
  return;
962
851
  const i = e.loadIcon;
963
852
  if (e.loadIcons && (o.length > 1 || !i)) {
964
- ae(
853
+ pe(
965
854
  e.loadIcons(o, s, t),
966
- (a) => {
967
- M(e, o, a);
855
+ (u) => {
856
+ M(e, o, u);
968
857
  }
969
858
  );
970
859
  return;
971
860
  }
972
861
  if (i) {
973
- o.forEach((a) => {
974
- const d = i(a, s, t);
975
- ae(d, (p) => {
976
- const m = p ? {
862
+ o.forEach((u) => {
863
+ const d = i(u, s, t);
864
+ pe(d, (p) => {
865
+ const g = p ? {
977
866
  prefix: s,
978
867
  icons: {
979
- [a]: p
868
+ [u]: p
980
869
  }
981
870
  } : null;
982
- M(e, [a], m);
871
+ M(e, [u], g);
983
872
  });
984
873
  });
985
874
  return;
986
875
  }
987
- const { valid: r, invalid: c } = jt(o);
988
- if (c.length && M(e, c, null), !r.length)
876
+ const { valid: r, invalid: l } = Ot(o);
877
+ if (l.length && M(e, l, null), !r.length)
989
878
  return;
990
- const u = s.match(be) ? Y(t) : null;
991
- if (!u) {
879
+ const a = s.match(xe) ? ee(t) : null;
880
+ if (!a) {
992
881
  M(e, r, null);
993
882
  return;
994
883
  }
995
- u.prepare(t, s, r).forEach((a) => {
996
- Ot(t, a, (d) => {
997
- M(e, a.icons, d);
884
+ a.prepare(t, s, r).forEach((u) => {
885
+ St(t, u, (d) => {
886
+ M(e, u.icons, d);
998
887
  });
999
888
  });
1000
889
  }));
1001
890
  }
1002
- const _t = (e, n) => {
1003
- const t = kt(e, !0, ke()), s = vt(t);
891
+ const jt = (e, n) => {
892
+ const t = Ct(e, !0, Pe()), s = vt(t);
1004
893
  if (!s.pending.length) {
1005
- let u = !0;
894
+ let a = !0;
1006
895
  return n && setTimeout(() => {
1007
- u && n(
896
+ a && n(
1008
897
  s.loaded,
1009
898
  s.missing,
1010
899
  s.pending,
1011
- ue
900
+ de
1012
901
  );
1013
902
  }), () => {
1014
- u = !1;
903
+ a = !1;
1015
904
  };
1016
905
  }
1017
906
  const o = /* @__PURE__ */ Object.create(null), i = [];
1018
- let r, c;
1019
- return s.pending.forEach((u) => {
1020
- const { provider: l, prefix: a } = u;
1021
- if (a === c && l === r)
907
+ let r, l;
908
+ return s.pending.forEach((a) => {
909
+ const { provider: c, prefix: u } = a;
910
+ if (u === l && c === r)
1022
911
  return;
1023
- r = l, c = a, i.push($(l, a));
1024
- const d = o[l] || (o[l] = /* @__PURE__ */ Object.create(null));
1025
- d[a] || (d[a] = []);
1026
- }), s.pending.forEach((u) => {
1027
- const { provider: l, prefix: a, name: d } = u, p = $(l, a), m = p.pendingIcons || (p.pendingIcons = /* @__PURE__ */ new Set());
1028
- m.has(d) || (m.add(d), o[l][a].push(d));
1029
- }), i.forEach((u) => {
1030
- const l = o[u.provider][u.prefix];
1031
- l.length && Ft(u, l);
1032
- }), n ? It(n, s, i) : ue;
912
+ r = c, l = u, i.push($(c, u));
913
+ const d = o[c] || (o[c] = /* @__PURE__ */ Object.create(null));
914
+ d[u] || (d[u] = []);
915
+ }), s.pending.forEach((a) => {
916
+ const { provider: c, prefix: u, name: d } = a, p = $(c, u), g = p.pendingIcons || (p.pendingIcons = /* @__PURE__ */ new Set());
917
+ g.has(d) || (g.add(d), o[c][u].push(d));
918
+ }), i.forEach((a) => {
919
+ const c = o[a.provider][a.prefix];
920
+ c.length && Et(a, c);
921
+ }), n ? It(n, s, i) : de;
1033
922
  };
1034
- function Et(e, n) {
923
+ function Ft(e, n) {
1035
924
  const t = {
1036
925
  ...e
1037
926
  };
1038
927
  for (const s in n) {
1039
928
  const o = n[s], i = typeof o;
1040
- s in Ce ? (o === null || o && (i === "string" || i === "number")) && (t[s] = o) : i === typeof t[s] && (t[s] = s === "rotate" ? o % 4 : o);
929
+ s in _e ? (o === null || o && (i === "string" || i === "number")) && (t[s] = o) : i === typeof t[s] && (t[s] = s === "rotate" ? o % 4 : o);
1041
930
  }
1042
931
  return t;
1043
932
  }
@@ -1092,51 +981,51 @@ function Nt(e) {
1092
981
  function zt(e) {
1093
982
  return "data:image/svg+xml," + Nt(e);
1094
983
  }
1095
- function Dt(e) {
984
+ function Rt(e) {
1096
985
  return 'url("' + zt(e) + '")';
1097
986
  }
1098
- const fe = {
987
+ const he = {
1099
988
  ...Se,
1100
989
  inline: !1
1101
- }, Rt = {
990
+ }, Dt = {
1102
991
  xmlns: "http://www.w3.org/2000/svg",
1103
992
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
1104
993
  "aria-hidden": !0,
1105
994
  role: "img"
1106
995
  }, Bt = {
1107
996
  display: "inline-block"
1108
- }, Z = {
997
+ }, te = {
1109
998
  backgroundColor: "currentColor"
1110
- }, Pe = {
999
+ }, Ee = {
1111
1000
  backgroundColor: "transparent"
1112
- }, de = {
1001
+ }, me = {
1113
1002
  Image: "var(--svg)",
1114
1003
  Repeat: "no-repeat",
1115
1004
  Size: "100% 100%"
1116
- }, pe = {
1117
- webkitMask: Z,
1118
- mask: Z,
1119
- background: Pe
1005
+ }, ge = {
1006
+ webkitMask: te,
1007
+ mask: te,
1008
+ background: Ee
1120
1009
  };
1121
- for (const e in pe) {
1122
- const n = pe[e];
1123
- for (const t in de)
1124
- n[e + t] = de[t];
1010
+ for (const e in ge) {
1011
+ const n = ge[e];
1012
+ for (const t in me)
1013
+ n[e + t] = me[t];
1125
1014
  }
1126
- const B = {};
1015
+ const V = {};
1127
1016
  ["horizontal", "vertical"].forEach((e) => {
1128
1017
  const n = e.slice(0, 1) + "Flip";
1129
- B[e + "-flip"] = n, B[e.slice(0, 1) + "-flip"] = n, B[e + "Flip"] = n;
1018
+ V[e + "-flip"] = n, V[e.slice(0, 1) + "-flip"] = n, V[e + "Flip"] = n;
1130
1019
  });
1131
- function he(e) {
1020
+ function ye(e) {
1132
1021
  return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
1133
1022
  }
1134
- const me = (e, n) => {
1135
- const t = Et(fe, n), s = { ...Rt }, o = n.mode || "svg", i = {}, r = n.style, c = typeof r == "object" && !(r instanceof Array) ? r : {};
1136
- for (let g in n) {
1137
- const f = n[g];
1023
+ const be = (e, n) => {
1024
+ const t = Ft(he, n), s = { ...Dt }, o = n.mode || "svg", i = {}, r = n.style, l = typeof r == "object" && !(r instanceof Array) ? r : {};
1025
+ for (let h in n) {
1026
+ const f = n[h];
1138
1027
  if (f !== void 0)
1139
- switch (g) {
1028
+ switch (h) {
1140
1029
  // Properties to ignore
1141
1030
  case "icon":
1142
1031
  case "style":
@@ -1148,7 +1037,7 @@ const me = (e, n) => {
1148
1037
  case "inline":
1149
1038
  case "hFlip":
1150
1039
  case "vFlip":
1151
- t[g] = f === !0 || f === "true" || f === 1;
1040
+ t[h] = f === !0 || f === "true" || f === 1;
1152
1041
  break;
1153
1042
  // Flip as string: 'horizontal,vertical'
1154
1043
  case "flip":
@@ -1160,7 +1049,7 @@ const me = (e, n) => {
1160
1049
  break;
1161
1050
  // Rotation as string
1162
1051
  case "rotate":
1163
- typeof f == "string" ? t[g] = Lt(f) : typeof f == "number" && (t[g] = f);
1052
+ typeof f == "string" ? t[h] = Lt(f) : typeof f == "number" && (t[h] = f);
1164
1053
  break;
1165
1054
  // Remove aria-hidden
1166
1055
  case "ariaHidden":
@@ -1168,37 +1057,37 @@ const me = (e, n) => {
1168
1057
  f !== !0 && f !== "true" && delete s["aria-hidden"];
1169
1058
  break;
1170
1059
  default: {
1171
- const F = B[g];
1172
- F ? (f === !0 || f === "true" || f === 1) && (t[F] = !0) : fe[g] === void 0 && (s[g] = f);
1060
+ const S = V[h];
1061
+ S ? (f === !0 || f === "true" || f === 1) && (t[S] = !0) : he[h] === void 0 && (s[h] = f);
1173
1062
  }
1174
1063
  }
1175
1064
  }
1176
- const u = it(e, t), l = u.attributes;
1065
+ const a = it(e, t), c = a.attributes;
1177
1066
  if (t.inline && (i.verticalAlign = "-0.125em"), o === "svg") {
1178
1067
  s.style = {
1179
1068
  ...i,
1180
- ...c
1181
- }, Object.assign(s, l);
1182
- let g = 0, f = n.id;
1183
- return typeof f == "string" && (f = f.replace(/-/g, "_")), s.innerHTML = ut(u.body, f ? () => f + "ID" + g++ : "iconifyVue"), oe("svg", s);
1069
+ ...l
1070
+ }, Object.assign(s, c);
1071
+ let h = 0, f = n.id;
1072
+ return typeof f == "string" && (f = f.replace(/-/g, "_")), s.innerHTML = at(a.body, f ? () => f + "ID" + h++ : "iconifyVue"), ie("svg", s);
1184
1073
  }
1185
- const { body: a, width: d, height: p } = e, m = o === "mask" || (o === "bg" ? !1 : a.indexOf("currentColor") !== -1), y = Mt(a, {
1186
- ...l,
1074
+ const { body: u, width: d, height: p } = e, g = o === "mask" || (o === "bg" ? !1 : u.indexOf("currentColor") !== -1), y = Mt(u, {
1075
+ ...c,
1187
1076
  width: d + "",
1188
1077
  height: p + ""
1189
1078
  });
1190
1079
  return s.style = {
1191
1080
  ...i,
1192
- "--svg": Dt(y),
1193
- width: he(l.width),
1194
- height: he(l.height),
1081
+ "--svg": Rt(y),
1082
+ width: ye(c.width),
1083
+ height: ye(c.height),
1195
1084
  ...Bt,
1196
- ...m ? Z : Pe,
1197
- ...c
1198
- }, oe("span", s);
1085
+ ...g ? te : Ee,
1086
+ ...l
1087
+ }, ie("span", s);
1199
1088
  };
1200
- ke(!0);
1201
- at("", bt);
1089
+ Pe(!0);
1090
+ ut("", bt);
1202
1091
  if (typeof document < "u" && typeof window < "u") {
1203
1092
  const e = window;
1204
1093
  if (e.IconifyPreload !== void 0) {
@@ -1208,7 +1097,7 @@ if (typeof document < "u" && typeof window < "u") {
1208
1097
  // Check if item is an object and not null/array
1209
1098
  (typeof s != "object" || s === null || s instanceof Array || // Check for 'icons' and 'prefix'
1210
1099
  typeof s.icons != "object" || typeof s.prefix != "string" || // Add icon set
1211
- !Ye(s)) && console.error(t);
1100
+ !Xe(s)) && console.error(t);
1212
1101
  } catch {
1213
1102
  console.error(t);
1214
1103
  }
@@ -1230,64 +1119,64 @@ if (typeof document < "u" && typeof window < "u") {
1230
1119
  }
1231
1120
  }
1232
1121
  }
1233
- const Ht = {
1234
- ...G,
1122
+ const Vt = {
1123
+ ...Q,
1235
1124
  body: ""
1236
- }, Vt = j((e, { emit: n }) => {
1237
- const t = Q(null);
1125
+ }, Gt = O((e, { emit: n }) => {
1126
+ const t = K(null);
1238
1127
  function s() {
1239
1128
  t.value && (t.value.abort?.(), t.value = null);
1240
1129
  }
1241
- const o = Q(!!e.ssr), i = Q(""), r = _e(null);
1242
- function c() {
1243
- const l = e.icon;
1244
- if (typeof l == "object" && l !== null && typeof l.body == "string")
1130
+ const o = K(!!e.ssr), i = K(""), r = je(null);
1131
+ function l() {
1132
+ const c = e.icon;
1133
+ if (typeof c == "object" && c !== null && typeof c.body == "string")
1245
1134
  return i.value = "", {
1246
- data: l
1135
+ data: c
1247
1136
  };
1248
- let a;
1249
- if (typeof l != "string" || (a = V(l, !1, !0)) === null)
1137
+ let u;
1138
+ if (typeof c != "string" || (u = q(c, !1, !0)) === null)
1250
1139
  return null;
1251
- let d = Je(a);
1140
+ let d = Ze(u);
1252
1141
  if (!d) {
1253
1142
  const y = t.value;
1254
- return (!y || y.name !== l) && (d === null ? t.value = {
1255
- name: l
1143
+ return (!y || y.name !== c) && (d === null ? t.value = {
1144
+ name: c
1256
1145
  } : t.value = {
1257
- name: l,
1258
- abort: _t([a], u)
1146
+ name: c,
1147
+ abort: jt([u], a)
1259
1148
  }), null;
1260
1149
  }
1261
- s(), i.value !== l && (i.value = l, Le(() => {
1262
- n("load", l);
1150
+ s(), i.value !== c && (i.value = c, Le(() => {
1151
+ n("load", c);
1263
1152
  }));
1264
1153
  const p = e.customise;
1265
1154
  if (p) {
1266
1155
  d = Object.assign({}, d);
1267
- const y = p(d.body, a.name, a.prefix, a.provider);
1156
+ const y = p(d.body, u.name, u.prefix, u.provider);
1268
1157
  typeof y == "string" && (d.body = y);
1269
1158
  }
1270
- const m = ["iconify"];
1271
- return a.prefix !== "" && m.push("iconify--" + a.prefix), a.provider !== "" && m.push("iconify--" + a.provider), { data: d, classes: m };
1159
+ const g = ["iconify"];
1160
+ return u.prefix !== "" && g.push("iconify--" + u.prefix), u.provider !== "" && g.push("iconify--" + u.provider), { data: d, classes: g };
1272
1161
  }
1273
- function u() {
1274
- const l = c();
1275
- l ? l.data !== r.value?.data && (r.value = l) : r.value = null;
1162
+ function a() {
1163
+ const c = l();
1164
+ c ? c.data !== r.value?.data && (r.value = c) : r.value = null;
1276
1165
  }
1277
- return o.value ? u() : Ee(() => {
1278
- o.value = !0, u();
1279
- }), $e(() => e.icon, u), Ae(s), () => {
1280
- const l = r.value;
1281
- if (!l)
1282
- return me(Ht, e);
1283
- let a = e;
1284
- return l.classes && (a = {
1166
+ return o.value ? a() : Fe(() => {
1167
+ o.value = !0, a();
1168
+ }), $e(() => e.icon, a), Ae(s), () => {
1169
+ const c = r.value;
1170
+ if (!c)
1171
+ return be(Vt, e);
1172
+ let u = e;
1173
+ return c.classes && (u = {
1285
1174
  ...e,
1286
- class: l.classes.join(" ")
1287
- }), me({
1288
- ...G,
1289
- ...l.data
1290
- }, a);
1175
+ class: c.classes.join(" ")
1176
+ }), be({
1177
+ ...Q,
1178
+ ...c.data
1179
+ }, u);
1291
1180
  };
1292
1181
  }, {
1293
1182
  props: [
@@ -1315,72 +1204,254 @@ const Ht = {
1315
1204
  "title"
1316
1205
  ],
1317
1206
  emits: ["load"]
1318
- }), ge = {
1319
- profile: "iconamoon:profile-light",
1320
- edit: "iconamoon:edit-light",
1321
- delete: "qlementine-icons:trash-16",
1322
- filter: "mdi:filter-outline",
1323
- search: "material-symbols:search",
1324
- people: "ic:outline-people",
1325
- plus: "ic:baseline-plus",
1326
- mail: "ci:mail-open",
1327
- "chevron-down": "mi:chevron-down"
1328
- }, Gt = {
1329
- m: 20,
1330
- l: 24
1331
- }, qt = {
1332
- primary: "primary",
1333
- secondary: "secondary"
1334
- }, Xt = /* @__PURE__ */ j({
1207
+ }), Ht = /* @__PURE__ */ O({
1335
1208
  name: "CmcIcon",
1336
1209
  __name: "CmcIcon",
1337
1210
  props: {
1338
- name: { default: ge.profile },
1339
- size: { default: "l" },
1340
- color: { default: qt.primary }
1211
+ name: { default: re.profile },
1212
+ size: { default: J.medium },
1213
+ color: { default: Ge.primary }
1341
1214
  },
1342
1215
  setup(e) {
1343
- const n = e, t = E(() => ge[n.name]), s = E(() => Gt[n.size]);
1344
- return (o, i) => (x(), Me(S(Vt), {
1345
- class: k(["cmc-icon", `cmc-icon--${n.color}`]),
1346
- icon: t.value,
1347
- width: s.value,
1348
- height: s.value
1216
+ const n = e, t = _(() => ({
1217
+ "cmc-icon": !0,
1218
+ [`cmc-icon--${n.size}`]: !0,
1219
+ [`cmc-icon--${n.color}`]: !0
1220
+ })), s = _(() => re[n.name]), o = _(() => J[n.size]);
1221
+ return (i, r) => (b(), ve(T(Gt), {
1222
+ class: x(t.value),
1223
+ icon: s.value,
1224
+ width: o.value,
1225
+ height: o.value
1349
1226
  }, null, 8, ["class", "icon", "width", "height"]));
1350
1227
  }
1351
- }), Qt = {
1228
+ }), qt = ["disabled"], on = /* @__PURE__ */ O({
1229
+ name: "CmcButton",
1230
+ __name: "CmcButton",
1231
+ props: {
1232
+ kind: { default: De.primary },
1233
+ variant: { default: Be.default },
1234
+ size: { default: Ve.medium },
1235
+ icon: {},
1236
+ disabled: { type: Boolean, default: !1 },
1237
+ loading: { type: Boolean, default: !1 }
1238
+ },
1239
+ emits: ["click"],
1240
+ setup(e, { emit: n }) {
1241
+ const t = e, s = n, o = _(() => ({
1242
+ button: !0,
1243
+ [`button--${t.variant}`]: !0,
1244
+ [`button--${t.kind}`]: !0,
1245
+ [`button--${t.size}`]: !0,
1246
+ "button--disabled": t.disabled
1247
+ })), i = () => {
1248
+ t.disabled || s("click");
1249
+ };
1250
+ return (r, l) => (b(), v("button", {
1251
+ type: "button",
1252
+ class: x(o.value),
1253
+ onClick: i,
1254
+ disabled: t.disabled
1255
+ }, [
1256
+ t.icon ? (b(), ve(Ht, {
1257
+ key: 0,
1258
+ name: t.icon,
1259
+ size: T(J).small
1260
+ }, null, 8, ["name", "size"])) : j("", !0),
1261
+ P(r.$slots, "default")
1262
+ ], 10, qt));
1263
+ }
1264
+ }), F = {
1265
+ h1: "h1",
1266
+ h2: "h2",
1267
+ h3: "h3",
1268
+ h4: "h4",
1269
+ h5: "h5",
1270
+ h6: "h6"
1271
+ }, Qt = /* @__PURE__ */ O({
1272
+ name: "CmcHeading",
1273
+ __name: "CmcHeading",
1274
+ props: {
1275
+ level: {}
1276
+ },
1277
+ setup(e) {
1278
+ const n = e, t = _(() => ({
1279
+ heading: !0,
1280
+ [`heading-${n.level}`]: !0
1281
+ }));
1282
+ return (s, o) => (b(), v(G, null, [
1283
+ T(F).h1 === n.level ? (b(), v("h1", {
1284
+ key: 0,
1285
+ class: x(t.value)
1286
+ }, [
1287
+ P(s.$slots, "default")
1288
+ ], 2)) : j("", !0),
1289
+ T(F).h2 === n.level ? (b(), v("h2", {
1290
+ key: 1,
1291
+ class: x(t.value)
1292
+ }, [
1293
+ P(s.$slots, "default")
1294
+ ], 2)) : j("", !0),
1295
+ T(F).h3 === n.level ? (b(), v("h3", {
1296
+ key: 2,
1297
+ class: x(t.value)
1298
+ }, [
1299
+ P(s.$slots, "default")
1300
+ ], 2)) : j("", !0),
1301
+ T(F).h4 === n.level ? (b(), v("h4", {
1302
+ key: 3,
1303
+ class: x(t.value)
1304
+ }, [
1305
+ P(s.$slots, "default")
1306
+ ], 2)) : j("", !0),
1307
+ T(F).h5 === n.level ? (b(), v("h5", {
1308
+ key: 4,
1309
+ class: x(t.value)
1310
+ }, [
1311
+ P(s.$slots, "default")
1312
+ ], 2)) : j("", !0),
1313
+ T(F).h6 === n.level ? (b(), v("h6", {
1314
+ key: 5,
1315
+ class: x(t.value)
1316
+ }, [
1317
+ P(s.$slots, "default")
1318
+ ], 2)) : j("", !0)
1319
+ ], 64));
1320
+ }
1321
+ }), sn = /* @__PURE__ */ O({
1322
+ name: "CmcTitle",
1323
+ __name: "CmcTitle",
1324
+ setup(e) {
1325
+ return (n, t) => (b(), v(G, null, [
1326
+ Me(Qt, {
1327
+ level: T(F).h1
1328
+ }, {
1329
+ default: Ne(() => [
1330
+ P(n.$slots, "default")
1331
+ ]),
1332
+ _: 3
1333
+ }, 8, ["level"]),
1334
+ t[0] || (t[0] = N("hr", null, null, -1))
1335
+ ], 64));
1336
+ }
1337
+ }), Ut = {
1338
+ success: "success",
1339
+ danger: "danger",
1340
+ warning: "warning"
1341
+ }, Kt = { class: "status__label" }, rn = /* @__PURE__ */ O({
1342
+ name: "CmcStatus",
1343
+ __name: "CmcStatus",
1344
+ props: {
1345
+ status: { default: Ut.success }
1346
+ },
1347
+ setup(e) {
1348
+ const n = e, t = _(() => ({
1349
+ status: !0,
1350
+ [`status--${n.status}`]: !0
1351
+ }));
1352
+ return (s, o) => (b(), v("div", {
1353
+ class: x(t.value)
1354
+ }, [
1355
+ o[0] || (o[0] = N("span", { class: "status__dot" }, null, -1)),
1356
+ N("span", Kt, [
1357
+ P(s.$slots, "default")
1358
+ ])
1359
+ ], 2));
1360
+ }
1361
+ }), Wt = { class: "pagination" }, Zt = ["disabled"], Jt = ["onClick"], Xt = {
1362
+ key: 1,
1363
+ class: "pagination__ellipsis"
1364
+ }, Yt = ["disabled"], en = 2, cn = /* @__PURE__ */ O({
1365
+ name: "CmcPagination",
1366
+ __name: "CmcPagination",
1367
+ props: {
1368
+ currentPage: {},
1369
+ totalItems: {},
1370
+ itemsPerPage: {}
1371
+ },
1372
+ emits: ["update:currentPage"],
1373
+ setup(e, { emit: n }) {
1374
+ const t = e;
1375
+ function s() {
1376
+ return Math.ceil(t.totalItems / t.itemsPerPage);
1377
+ }
1378
+ function o() {
1379
+ return Math.max(1, Math.min(t.currentPage, s()));
1380
+ }
1381
+ function i() {
1382
+ return en;
1383
+ }
1384
+ const r = n, l = _(() => {
1385
+ const p = s(), g = o(), y = i();
1386
+ if (p <= 1) return [1];
1387
+ const h = [];
1388
+ h.push(1);
1389
+ let f = Math.max(2, g - y), S = Math.min(p - 1, g + y);
1390
+ f > 2 && h.push("...");
1391
+ for (let C = f; C <= S; C++)
1392
+ h.push(C);
1393
+ return S < p - 1 && h.push("..."), h.push(p), h;
1394
+ }), a = _(() => t.currentPage > 1), c = _(() => t.currentPage < t.totalItems), u = () => {
1395
+ a.value && r("update:currentPage", t.currentPage - 1);
1396
+ }, d = () => {
1397
+ c.value && r("update:currentPage", t.currentPage + 1);
1398
+ };
1399
+ return (p, g) => (b(), v("nav", Wt, [
1400
+ N("button", {
1401
+ class: x(["pagination__page-button", { "is-invisible": !a.value }]),
1402
+ disabled: !a.value,
1403
+ "aria-label": "Page précédente",
1404
+ onClick: u
1405
+ }, " ‹ ", 10, Zt),
1406
+ (b(!0), v(G, null, ze(l.value, (y, h) => (b(), v(G, { key: h }, [
1407
+ typeof y == "number" ? (b(), v("button", {
1408
+ key: 0,
1409
+ class: x(["pagination__page-button", { "is-active": y === p.currentPage }]),
1410
+ onClick: () => r("update:currentPage", y)
1411
+ }, Re(y), 11, Jt)) : (b(), v("span", Xt, "…"))
1412
+ ], 64))), 128)),
1413
+ N("button", {
1414
+ class: x(["pagination__page-button", { "is-invisible": !c.value }]),
1415
+ disabled: !c.value,
1416
+ "aria-label": "Page suivante",
1417
+ onClick: d
1418
+ }, " › ", 10, Yt)
1419
+ ]));
1420
+ }
1421
+ }), tn = {
1352
1422
  medium: "medium"
1353
- }, Yt = /* @__PURE__ */ j({
1423
+ }, ln = /* @__PURE__ */ O({
1354
1424
  name: "CmcButtonGroup",
1355
1425
  __name: "CmcButtonGroup",
1356
1426
  props: {
1357
- gap: { default: Qt.medium }
1427
+ gap: { default: tn.medium }
1358
1428
  },
1359
1429
  setup(e) {
1360
- const n = e, t = E(() => ({
1430
+ const n = e, t = _(() => ({
1361
1431
  "button-group": !0,
1362
1432
  [`button-group-gap--${n.gap}`]: !0
1363
1433
  }));
1364
- return (s, o) => (x(), I("div", {
1365
- class: k(t.value)
1434
+ return (s, o) => (b(), v("div", {
1435
+ class: x(t.value)
1366
1436
  }, [
1367
- C(s.$slots, "default")
1437
+ P(s.$slots, "default")
1368
1438
  ], 2));
1369
1439
  }
1370
1440
  });
1371
1441
  export {
1372
- Kt as CmcButton,
1373
- Yt as CmcButtonGroup,
1374
- Be as CmcHeading,
1375
- Xt as CmcIcon,
1376
- Jt as CmcStatus,
1377
- Wt as CmcTitle,
1378
- Ne as buttonKindOptions,
1379
- De as buttonSizeOptions,
1380
- ze as buttonVariantOptions,
1381
- P as headingLevelOptions,
1382
- qt as iconColorOptions,
1383
- Gt as iconSizeOptions,
1384
- ge as iconsMap,
1385
- He as statusOptions
1442
+ on as CmcButton,
1443
+ ln as CmcButtonGroup,
1444
+ Qt as CmcHeading,
1445
+ Ht as CmcIcon,
1446
+ cn as CmcPagination,
1447
+ rn as CmcStatus,
1448
+ sn as CmcTitle,
1449
+ De as buttonKindOptions,
1450
+ Ve as buttonSizeOptions,
1451
+ Be as buttonVariantOptions,
1452
+ F as headingLevelOptions,
1453
+ Ge as iconColorOptions,
1454
+ re as iconNameOptions,
1455
+ J as iconSizeOptions,
1456
+ Ut as statusOptions
1386
1457
  };