drizzle-cube 0.1.31 → 0.1.33
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 +51 -8
- package/dist/adapters/{compiler-CVega_Gv.js → compiler-Ce33cdy6.js} +925 -896
- package/dist/adapters/express/index.js +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/client/charts.js +1 -1
- package/dist/client/chunks/{charts-MTxju0dv.js → charts-D4v7aUDh.js} +268 -244
- package/dist/client/chunks/charts-D4v7aUDh.js.map +1 -0
- package/dist/client/chunks/components-BXU3r9yv.js +19905 -0
- package/dist/client/chunks/components-BXU3r9yv.js.map +1 -0
- package/dist/client/chunks/{icons-C_McHd9z.js → icons-CEfXECaS.js} +174 -298
- package/dist/client/chunks/icons-CEfXECaS.js.map +1 -0
- package/dist/client/components/Modal.d.ts +1 -1
- package/dist/client/components.js +16 -19642
- package/dist/client/components.js.map +1 -1
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +31 -24
- package/dist/client/styles.css +1 -1
- package/dist/client/theme/index.d.ts +101 -0
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/index.d.ts +11 -2
- package/dist/server/index.js +1258 -1229
- package/package.json +2 -2
- package/dist/client/chunks/charts-MTxju0dv.js.map +0 -1
- package/dist/client/chunks/icons-C_McHd9z.js.map +0 -1
|
@@ -555,14 +555,26 @@ function Ne({
|
|
|
555
555
|
d: "M6 18 18 6M6 6l12 12"
|
|
556
556
|
}));
|
|
557
557
|
}
|
|
558
|
-
const xn = /* @__PURE__ */ i.forwardRef(Ne)
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
558
|
+
const xn = /* @__PURE__ */ i.forwardRef(Ne);
|
|
559
|
+
function ze(e, t) {
|
|
560
|
+
const n = e.icons, r = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
|
|
561
|
+
function a(s) {
|
|
562
|
+
if (n[s]) return o[s] = [];
|
|
563
|
+
if (!(s in o)) {
|
|
564
|
+
o[s] = null;
|
|
565
|
+
const l = r[s] && r[s].parent, c = l && a(l);
|
|
566
|
+
c && (o[s] = [l].concat(c));
|
|
567
|
+
}
|
|
568
|
+
return o[s];
|
|
564
569
|
}
|
|
565
|
-
|
|
570
|
+
return Object.keys(n).concat(Object.keys(r)).forEach(a), o;
|
|
571
|
+
}
|
|
572
|
+
const ce = Object.freeze({
|
|
573
|
+
left: 0,
|
|
574
|
+
top: 0,
|
|
575
|
+
width: 16,
|
|
576
|
+
height: 16
|
|
577
|
+
}), $ = Object.freeze({
|
|
566
578
|
rotate: 0,
|
|
567
579
|
vFlip: !1,
|
|
568
580
|
hFlip: !1
|
|
@@ -574,51 +586,32 @@ const xn = /* @__PURE__ */ i.forwardRef(Ne), ce = Object.freeze(
|
|
|
574
586
|
body: "",
|
|
575
587
|
hidden: !1
|
|
576
588
|
});
|
|
577
|
-
function
|
|
589
|
+
function Ue(e, t) {
|
|
578
590
|
const n = {};
|
|
579
591
|
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
580
592
|
const r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
581
593
|
return r && (n.rotate = r), n;
|
|
582
594
|
}
|
|
583
595
|
function J(e, t) {
|
|
584
|
-
const n =
|
|
585
|
-
for (const r in W)
|
|
586
|
-
r in $ ? r in e && !(r in n) && (n[r] = $[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
|
|
596
|
+
const n = Ue(e, t);
|
|
597
|
+
for (const r in W) r in $ ? r in e && !(r in n) && (n[r] = $[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
|
|
587
598
|
return n;
|
|
588
599
|
}
|
|
589
|
-
function Ue(e, t) {
|
|
590
|
-
const n = e.icons, r = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
|
|
591
|
-
function a(s) {
|
|
592
|
-
if (n[s])
|
|
593
|
-
return o[s] = [];
|
|
594
|
-
if (!(s in o)) {
|
|
595
|
-
o[s] = null;
|
|
596
|
-
const l = r[s] && r[s].parent, c = l && a(l);
|
|
597
|
-
c && (o[s] = [l].concat(c));
|
|
598
|
-
}
|
|
599
|
-
return o[s];
|
|
600
|
-
}
|
|
601
|
-
return Object.keys(n).concat(Object.keys(r)).forEach(a), o;
|
|
602
|
-
}
|
|
603
600
|
function _e(e, t, n) {
|
|
604
601
|
const r = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
605
602
|
let a = {};
|
|
606
603
|
function s(l) {
|
|
607
|
-
a = J(
|
|
608
|
-
r[l] || o[l],
|
|
609
|
-
a
|
|
610
|
-
);
|
|
604
|
+
a = J(r[l] || o[l], a);
|
|
611
605
|
}
|
|
612
606
|
return s(t), n.forEach(s), J(e, a);
|
|
613
607
|
}
|
|
614
608
|
function le(e, t) {
|
|
615
609
|
const n = [];
|
|
616
|
-
if (typeof e != "object" || typeof e.icons != "object")
|
|
617
|
-
return n;
|
|
610
|
+
if (typeof e != "object" || typeof e.icons != "object") return n;
|
|
618
611
|
e.not_found instanceof Array && e.not_found.forEach((o) => {
|
|
619
612
|
t(o, null), n.push(o);
|
|
620
613
|
});
|
|
621
|
-
const r =
|
|
614
|
+
const r = ze(e);
|
|
622
615
|
for (const o in r) {
|
|
623
616
|
const a = r[o];
|
|
624
617
|
a && (t(o, _e(e, o, a)), n.push(o));
|
|
@@ -632,59 +625,60 @@ const qe = {
|
|
|
632
625
|
...ce
|
|
633
626
|
};
|
|
634
627
|
function B(e, t) {
|
|
635
|
-
for (const n in t)
|
|
636
|
-
if (n in e && typeof e[n] != typeof t[n])
|
|
637
|
-
return !1;
|
|
628
|
+
for (const n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
|
|
638
629
|
return !0;
|
|
639
630
|
}
|
|
640
631
|
function ue(e) {
|
|
641
|
-
if (typeof e != "object" || e === null)
|
|
642
|
-
return null;
|
|
632
|
+
if (typeof e != "object" || e === null) return null;
|
|
643
633
|
const t = e;
|
|
644
|
-
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !B(e, qe))
|
|
645
|
-
return null;
|
|
634
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !B(e, qe)) return null;
|
|
646
635
|
const n = t.icons;
|
|
647
636
|
for (const o in n) {
|
|
648
637
|
const a = n[o];
|
|
649
|
-
if (
|
|
650
|
-
// Name cannot be empty
|
|
651
|
-
!o || // Must have body
|
|
652
|
-
typeof a.body != "string" || // Check other props
|
|
653
|
-
!B(
|
|
654
|
-
a,
|
|
655
|
-
W
|
|
656
|
-
)
|
|
657
|
-
)
|
|
658
|
-
return null;
|
|
638
|
+
if (!o || typeof a.body != "string" || !B(a, W)) return null;
|
|
659
639
|
}
|
|
660
640
|
const r = t.aliases || /* @__PURE__ */ Object.create(null);
|
|
661
641
|
for (const o in r) {
|
|
662
642
|
const a = r[o], s = a.parent;
|
|
663
|
-
if (
|
|
664
|
-
// Name cannot be empty
|
|
665
|
-
!o || // Parent must be set and point to existing icon
|
|
666
|
-
typeof s != "string" || !n[s] && !r[s] || // Check other props
|
|
667
|
-
!B(
|
|
668
|
-
a,
|
|
669
|
-
W
|
|
670
|
-
)
|
|
671
|
-
)
|
|
672
|
-
return null;
|
|
643
|
+
if (!o || typeof s != "string" || !n[s] && !r[s] || !B(a, W)) return null;
|
|
673
644
|
}
|
|
674
645
|
return t;
|
|
675
646
|
}
|
|
676
|
-
const
|
|
647
|
+
const K = /* @__PURE__ */ Object.create(null);
|
|
648
|
+
function Qe(e, t) {
|
|
649
|
+
return {
|
|
650
|
+
provider: e,
|
|
651
|
+
prefix: t,
|
|
652
|
+
icons: /* @__PURE__ */ Object.create(null),
|
|
653
|
+
missing: /* @__PURE__ */ new Set()
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
function j(e, t) {
|
|
657
|
+
const n = K[e] || (K[e] = /* @__PURE__ */ Object.create(null));
|
|
658
|
+
return n[t] || (n[t] = Qe(e, t));
|
|
659
|
+
}
|
|
660
|
+
function de(e, t) {
|
|
661
|
+
return ue(t) ? le(t, (n, r) => {
|
|
662
|
+
r ? e.icons[n] = r : e.missing.add(n);
|
|
663
|
+
}) : [];
|
|
664
|
+
}
|
|
665
|
+
function Ge(e, t, n) {
|
|
666
|
+
try {
|
|
667
|
+
if (typeof n.body == "string")
|
|
668
|
+
return e.icons[t] = { ...n }, !0;
|
|
669
|
+
} catch {
|
|
670
|
+
}
|
|
671
|
+
return !1;
|
|
672
|
+
}
|
|
673
|
+
const fe = /^[a-z0-9]+(-[a-z0-9]+)*$/, T = (e, t, n, r = "") => {
|
|
677
674
|
const o = e.split(":");
|
|
678
675
|
if (e.slice(0, 1) === "@") {
|
|
679
|
-
if (o.length < 2 || o.length > 3)
|
|
680
|
-
return null;
|
|
676
|
+
if (o.length < 2 || o.length > 3) return null;
|
|
681
677
|
r = o.shift().slice(1);
|
|
682
678
|
}
|
|
683
|
-
if (o.length > 3 || !o.length)
|
|
684
|
-
return null;
|
|
679
|
+
if (o.length > 3 || !o.length) return null;
|
|
685
680
|
if (o.length > 1) {
|
|
686
681
|
const l = o.pop(), c = o.pop(), u = {
|
|
687
|
-
// Allow provider without '@': "provider:prefix:name"
|
|
688
682
|
provider: o.length > 0 ? o[0] : r,
|
|
689
683
|
prefix: c,
|
|
690
684
|
name: l
|
|
@@ -709,34 +703,7 @@ const de = /^[a-z0-9]+(-[a-z0-9]+)*$/, T = (e, t, n, r = "") => {
|
|
|
709
703
|
return t && !S(l, n) ? null : l;
|
|
710
704
|
}
|
|
711
705
|
return null;
|
|
712
|
-
}, S = (e, t) => e ?
|
|
713
|
-
// Check name: cannot be empty
|
|
714
|
-
((t && e.prefix === "" || e.prefix) && e.name) : !1, K = /* @__PURE__ */ Object.create(null);
|
|
715
|
-
function Qe(e, t) {
|
|
716
|
-
return {
|
|
717
|
-
provider: e,
|
|
718
|
-
prefix: t,
|
|
719
|
-
icons: /* @__PURE__ */ Object.create(null),
|
|
720
|
-
missing: /* @__PURE__ */ new Set()
|
|
721
|
-
};
|
|
722
|
-
}
|
|
723
|
-
function j(e, t) {
|
|
724
|
-
const n = K[e] || (K[e] = /* @__PURE__ */ Object.create(null));
|
|
725
|
-
return n[t] || (n[t] = Qe(e, t));
|
|
726
|
-
}
|
|
727
|
-
function fe(e, t) {
|
|
728
|
-
return ue(t) ? le(t, (n, r) => {
|
|
729
|
-
r ? e.icons[n] = r : e.missing.add(n);
|
|
730
|
-
}) : [];
|
|
731
|
-
}
|
|
732
|
-
function Ge(e, t, n) {
|
|
733
|
-
try {
|
|
734
|
-
if (typeof n.body == "string")
|
|
735
|
-
return e.icons[t] = { ...n }, !0;
|
|
736
|
-
} catch {
|
|
737
|
-
}
|
|
738
|
-
return !1;
|
|
739
|
-
}
|
|
706
|
+
}, S = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
740
707
|
let O = !1;
|
|
741
708
|
function he(e) {
|
|
742
709
|
return typeof e == "boolean" && (O = e), O;
|
|
@@ -750,14 +717,12 @@ function X(e) {
|
|
|
750
717
|
}
|
|
751
718
|
function Je(e, t) {
|
|
752
719
|
const n = T(e, !0, O);
|
|
753
|
-
if (!n)
|
|
754
|
-
return !1;
|
|
720
|
+
if (!n) return !1;
|
|
755
721
|
const r = j(n.provider, n.prefix);
|
|
756
722
|
return t ? Ge(r, n.name, t) : (r.missing.add(n.name), !0);
|
|
757
723
|
}
|
|
758
724
|
function Ke(e, t) {
|
|
759
|
-
if (typeof e != "object")
|
|
760
|
-
return !1;
|
|
725
|
+
if (typeof e != "object") return !1;
|
|
761
726
|
if (typeof t != "string" && (t = e.provider || ""), O && !t && !e.prefix) {
|
|
762
727
|
let o = !1;
|
|
763
728
|
return ue(e) && (e.prefix = "", le(e, (a, s) => {
|
|
@@ -768,40 +733,31 @@ function Ke(e, t) {
|
|
|
768
733
|
if (!S({
|
|
769
734
|
prefix: n,
|
|
770
735
|
name: "a"
|
|
771
|
-
}))
|
|
772
|
-
return !1;
|
|
736
|
+
})) return !1;
|
|
773
737
|
const r = j(t, n);
|
|
774
|
-
return !!
|
|
738
|
+
return !!de(r, e);
|
|
775
739
|
}
|
|
776
740
|
const pe = Object.freeze({
|
|
777
741
|
width: null,
|
|
778
742
|
height: null
|
|
779
743
|
}), me = Object.freeze({
|
|
780
|
-
// Dimensions
|
|
781
744
|
...pe,
|
|
782
|
-
// Transformations
|
|
783
745
|
...$
|
|
784
746
|
}), Xe = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Ye = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
785
747
|
function Y(e, t, n) {
|
|
786
|
-
if (t === 1)
|
|
787
|
-
|
|
788
|
-
if (
|
|
789
|
-
return Math.ceil(e * t * n) / n;
|
|
790
|
-
if (typeof e != "string")
|
|
791
|
-
return e;
|
|
748
|
+
if (t === 1) return e;
|
|
749
|
+
if (n = n || 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
750
|
+
if (typeof e != "string") return e;
|
|
792
751
|
const r = e.split(Xe);
|
|
793
|
-
if (r === null || !r.length)
|
|
794
|
-
return e;
|
|
752
|
+
if (r === null || !r.length) return e;
|
|
795
753
|
const o = [];
|
|
796
754
|
let a = r.shift(), s = Ye.test(a);
|
|
797
755
|
for (; ; ) {
|
|
798
756
|
if (s) {
|
|
799
757
|
const l = parseFloat(a);
|
|
800
758
|
isNaN(l) ? o.push(a) : o.push(Math.ceil(l * t * n) / n);
|
|
801
|
-
} else
|
|
802
|
-
|
|
803
|
-
if (a = r.shift(), a === void 0)
|
|
804
|
-
return o.join("");
|
|
759
|
+
} else o.push(a);
|
|
760
|
+
if (a = r.shift(), a === void 0) return o.join("");
|
|
805
761
|
s = !s;
|
|
806
762
|
}
|
|
807
763
|
}
|
|
@@ -810,11 +766,9 @@ function et(e, t = "defs") {
|
|
|
810
766
|
const r = e.indexOf("<" + t);
|
|
811
767
|
for (; r >= 0; ) {
|
|
812
768
|
const o = e.indexOf(">", r), a = e.indexOf("</" + t);
|
|
813
|
-
if (o === -1 || a === -1)
|
|
814
|
-
break;
|
|
769
|
+
if (o === -1 || a === -1) break;
|
|
815
770
|
const s = e.indexOf(">", a);
|
|
816
|
-
if (s === -1)
|
|
817
|
-
break;
|
|
771
|
+
if (s === -1) break;
|
|
818
772
|
n += e.slice(o + 1, a).trim(), e = e.slice(0, r).trim() + e.slice(s + 1);
|
|
819
773
|
}
|
|
820
774
|
return {
|
|
@@ -847,34 +801,20 @@ function ot(e, t) {
|
|
|
847
801
|
[n, r].forEach((k) => {
|
|
848
802
|
const f = [], p = k.hFlip, E = k.vFlip;
|
|
849
803
|
let b = k.rotate;
|
|
850
|
-
p ? E ? b += 2 : (f.push(
|
|
851
|
-
"translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"
|
|
852
|
-
), f.push("scale(-1 1)"), o.top = o.left = 0) : E && (f.push(
|
|
853
|
-
"translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"
|
|
854
|
-
), f.push("scale(1 -1)"), o.top = o.left = 0);
|
|
804
|
+
p ? E ? b += 2 : (f.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), f.push("scale(-1 1)"), o.top = o.left = 0) : E && (f.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), f.push("scale(1 -1)"), o.top = o.left = 0);
|
|
855
805
|
let y;
|
|
856
806
|
switch (b < 0 && (b -= Math.floor(b / 4) * 4), b = b % 4, b) {
|
|
857
807
|
case 1:
|
|
858
|
-
y = o.height / 2 + o.top, f.unshift(
|
|
859
|
-
"rotate(90 " + y.toString() + " " + y.toString() + ")"
|
|
860
|
-
);
|
|
808
|
+
y = o.height / 2 + o.top, f.unshift("rotate(90 " + y.toString() + " " + y.toString() + ")");
|
|
861
809
|
break;
|
|
862
810
|
case 2:
|
|
863
|
-
f.unshift(
|
|
864
|
-
"rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")"
|
|
865
|
-
);
|
|
811
|
+
f.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
|
|
866
812
|
break;
|
|
867
813
|
case 3:
|
|
868
|
-
y = o.width / 2 + o.left, f.unshift(
|
|
869
|
-
"rotate(-90 " + y.toString() + " " + y.toString() + ")"
|
|
870
|
-
);
|
|
814
|
+
y = o.width / 2 + o.left, f.unshift("rotate(-90 " + y.toString() + " " + y.toString() + ")");
|
|
871
815
|
break;
|
|
872
816
|
}
|
|
873
|
-
b % 2 === 1 && (o.left !== o.top && (y = o.left, o.left = o.top, o.top = y), o.width !== o.height && (y = o.width, o.width = o.height, o.height = y)), f.length && (a = nt(
|
|
874
|
-
a,
|
|
875
|
-
'<g transform="' + f.join(" ") + '">',
|
|
876
|
-
"</g>"
|
|
877
|
-
));
|
|
817
|
+
b % 2 === 1 && (o.left !== o.top && (y = o.left, o.left = o.top, o.top = y), o.width !== o.height && (y = o.width, o.width = o.height, o.height = y)), f.length && (a = nt(a, '<g transform="' + f.join(" ") + '">', "</g>"));
|
|
878
818
|
});
|
|
879
819
|
const s = r.width, l = r.height, c = o.width, u = o.height;
|
|
880
820
|
let d, h;
|
|
@@ -883,7 +823,12 @@ function ot(e, t) {
|
|
|
883
823
|
rt(f) || (m[k] = f.toString());
|
|
884
824
|
};
|
|
885
825
|
g("width", d), g("height", h);
|
|
886
|
-
const v = [
|
|
826
|
+
const v = [
|
|
827
|
+
o.left,
|
|
828
|
+
o.top,
|
|
829
|
+
c,
|
|
830
|
+
u
|
|
831
|
+
];
|
|
887
832
|
return m.viewBox = v.join(" "), {
|
|
888
833
|
attributes: m,
|
|
889
834
|
viewBox: v,
|
|
@@ -895,19 +840,12 @@ let st = 0;
|
|
|
895
840
|
function ct(e, t = at) {
|
|
896
841
|
const n = [];
|
|
897
842
|
let r;
|
|
898
|
-
for (; r = it.exec(e); )
|
|
899
|
-
|
|
900
|
-
if (!n.length)
|
|
901
|
-
return e;
|
|
843
|
+
for (; r = it.exec(e); ) n.push(r[1]);
|
|
844
|
+
if (!n.length) return e;
|
|
902
845
|
const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
903
846
|
return n.forEach((a) => {
|
|
904
847
|
const s = typeof t == "function" ? t(a) : t + (st++).toString(), l = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
905
|
-
e = e.replace(
|
|
906
|
-
// Allowed characters before id: [#;"]
|
|
907
|
-
// Allowed characters after id: [)"], .[a-z]
|
|
908
|
-
new RegExp('([#;"])(' + l + ')([")]|\\.[a-z])', "g"),
|
|
909
|
-
"$1" + s + o + "$3"
|
|
910
|
-
);
|
|
848
|
+
e = e.replace(new RegExp('([#;"])(' + l + ')([")]|\\.[a-z])', "g"), "$1" + s + o + "$3");
|
|
911
849
|
}), e = e.replace(new RegExp(o, "g"), ""), e;
|
|
912
850
|
}
|
|
913
851
|
const D = /* @__PURE__ */ Object.create(null);
|
|
@@ -919,38 +857,22 @@ function N(e) {
|
|
|
919
857
|
}
|
|
920
858
|
function _(e) {
|
|
921
859
|
let t;
|
|
922
|
-
if (typeof e.resources == "string")
|
|
923
|
-
|
|
924
|
-
else if (t = e.resources, !(t instanceof Array) || !t.length)
|
|
925
|
-
return null;
|
|
860
|
+
if (typeof e.resources == "string") t = [e.resources];
|
|
861
|
+
else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
|
|
926
862
|
return {
|
|
927
|
-
// API hosts
|
|
928
863
|
resources: t,
|
|
929
|
-
// Root path
|
|
930
864
|
path: e.path || "/",
|
|
931
|
-
// URL length limit
|
|
932
865
|
maxURL: e.maxURL || 500,
|
|
933
|
-
// Timeout before next host is used.
|
|
934
866
|
rotate: e.rotate || 750,
|
|
935
|
-
// Timeout before failing query.
|
|
936
867
|
timeout: e.timeout || 5e3,
|
|
937
|
-
// Randomise default API end point.
|
|
938
868
|
random: e.random === !0,
|
|
939
|
-
// Start index
|
|
940
869
|
index: e.index || 0,
|
|
941
|
-
// Receive data after time out (used if time out kicks in first, then API module sends data anyway).
|
|
942
870
|
dataAfterTimeout: e.dataAfterTimeout !== !1
|
|
943
871
|
};
|
|
944
872
|
}
|
|
945
|
-
const q = /* @__PURE__ */ Object.create(null), C = [
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
], A = [];
|
|
949
|
-
for (; C.length > 0; )
|
|
950
|
-
C.length === 1 || Math.random() > 0.5 ? A.push(C.shift()) : A.push(C.pop());
|
|
951
|
-
q[""] = _({
|
|
952
|
-
resources: ["https://api.iconify.design"].concat(A)
|
|
953
|
-
});
|
|
873
|
+
const q = /* @__PURE__ */ Object.create(null), C = ["https://api.simplesvg.com", "https://api.unisvg.com"], A = [];
|
|
874
|
+
for (; C.length > 0; ) C.length === 1 || Math.random() > 0.5 ? A.push(C.shift()) : A.push(C.pop());
|
|
875
|
+
q[""] = _({ resources: ["https://api.iconify.design"].concat(A) });
|
|
954
876
|
function ut(e, t) {
|
|
955
877
|
const n = _(t);
|
|
956
878
|
return n === null ? !1 : (q[e] = n, !0);
|
|
@@ -961,19 +883,16 @@ function Q(e) {
|
|
|
961
883
|
const dt = () => {
|
|
962
884
|
let e;
|
|
963
885
|
try {
|
|
964
|
-
if (e = fetch, typeof e == "function")
|
|
965
|
-
return e;
|
|
886
|
+
if (e = fetch, typeof e == "function") return e;
|
|
966
887
|
} catch {
|
|
967
888
|
}
|
|
968
889
|
};
|
|
969
890
|
let ee = dt();
|
|
970
891
|
function ft(e, t) {
|
|
971
892
|
const n = Q(e);
|
|
972
|
-
if (!n)
|
|
973
|
-
return 0;
|
|
893
|
+
if (!n) return 0;
|
|
974
894
|
let r;
|
|
975
|
-
if (!n.maxURL)
|
|
976
|
-
r = 0;
|
|
895
|
+
if (!n.maxURL) r = 0;
|
|
977
896
|
else {
|
|
978
897
|
let o = 0;
|
|
979
898
|
n.resources.forEach((s) => {
|
|
@@ -1007,8 +926,7 @@ const pt = (e, t, n) => {
|
|
|
1007
926
|
function mt(e) {
|
|
1008
927
|
if (typeof e == "string") {
|
|
1009
928
|
const t = Q(e);
|
|
1010
|
-
if (t)
|
|
1011
|
-
return t.path;
|
|
929
|
+
if (t) return t.path;
|
|
1012
930
|
}
|
|
1013
931
|
return "/";
|
|
1014
932
|
}
|
|
@@ -1020,9 +938,7 @@ const gt = (e, t, n) => {
|
|
|
1020
938
|
let r = mt(t.provider);
|
|
1021
939
|
switch (t.type) {
|
|
1022
940
|
case "icons": {
|
|
1023
|
-
const a = t.prefix, l = t.icons.join(","), c = new URLSearchParams({
|
|
1024
|
-
icons: l
|
|
1025
|
-
});
|
|
941
|
+
const a = t.prefix, l = t.icons.join(","), c = new URLSearchParams({ icons: l });
|
|
1026
942
|
r += a + ".json?" + c.toString();
|
|
1027
943
|
break;
|
|
1028
944
|
}
|
|
@@ -1062,82 +978,45 @@ const gt = (e, t, n) => {
|
|
|
1062
978
|
prepare: pt,
|
|
1063
979
|
send: gt
|
|
1064
980
|
};
|
|
1065
|
-
function vt(e) {
|
|
1066
|
-
const t = {
|
|
1067
|
-
loaded: [],
|
|
1068
|
-
missing: [],
|
|
1069
|
-
pending: []
|
|
1070
|
-
}, n = /* @__PURE__ */ Object.create(null);
|
|
1071
|
-
e.sort((o, a) => o.provider !== a.provider ? o.provider.localeCompare(a.provider) : o.prefix !== a.prefix ? o.prefix.localeCompare(a.prefix) : o.name.localeCompare(a.name));
|
|
1072
|
-
let r = {
|
|
1073
|
-
provider: "",
|
|
1074
|
-
prefix: "",
|
|
1075
|
-
name: ""
|
|
1076
|
-
};
|
|
1077
|
-
return e.forEach((o) => {
|
|
1078
|
-
if (r.name === o.name && r.prefix === o.prefix && r.provider === o.provider)
|
|
1079
|
-
return;
|
|
1080
|
-
r = o;
|
|
1081
|
-
const a = o.provider, s = o.prefix, l = o.name, c = n[a] || (n[a] = /* @__PURE__ */ Object.create(null)), u = c[s] || (c[s] = j(a, s));
|
|
1082
|
-
let d;
|
|
1083
|
-
l in u.icons ? d = t.loaded : s === "" || u.missing.has(l) ? d = t.missing : d = t.pending;
|
|
1084
|
-
const h = {
|
|
1085
|
-
provider: a,
|
|
1086
|
-
prefix: s,
|
|
1087
|
-
name: l
|
|
1088
|
-
};
|
|
1089
|
-
d.push(h);
|
|
1090
|
-
}), t;
|
|
1091
|
-
}
|
|
1092
981
|
function ge(e, t) {
|
|
1093
982
|
e.forEach((n) => {
|
|
1094
983
|
const r = n.loaderCallbacks;
|
|
1095
984
|
r && (n.loaderCallbacks = r.filter((o) => o.id !== t));
|
|
1096
985
|
});
|
|
1097
986
|
}
|
|
1098
|
-
function
|
|
987
|
+
function vt(e) {
|
|
1099
988
|
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
1100
989
|
e.pendingCallbacksFlag = !1;
|
|
1101
990
|
const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
1102
|
-
if (!t.length)
|
|
1103
|
-
return;
|
|
991
|
+
if (!t.length) return;
|
|
1104
992
|
let n = !1;
|
|
1105
993
|
const r = e.provider, o = e.prefix;
|
|
1106
994
|
t.forEach((a) => {
|
|
1107
995
|
const s = a.icons, l = s.pending.length;
|
|
1108
996
|
s.pending = s.pending.filter((c) => {
|
|
1109
|
-
if (c.prefix !== o)
|
|
1110
|
-
return !0;
|
|
997
|
+
if (c.prefix !== o) return !0;
|
|
1111
998
|
const u = c.name;
|
|
1112
|
-
if (e.icons[u])
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
name: u
|
|
1123
|
-
});
|
|
999
|
+
if (e.icons[u]) s.loaded.push({
|
|
1000
|
+
provider: r,
|
|
1001
|
+
prefix: o,
|
|
1002
|
+
name: u
|
|
1003
|
+
});
|
|
1004
|
+
else if (e.missing.has(u)) s.missing.push({
|
|
1005
|
+
provider: r,
|
|
1006
|
+
prefix: o,
|
|
1007
|
+
name: u
|
|
1008
|
+
});
|
|
1124
1009
|
else
|
|
1125
1010
|
return n = !0, !0;
|
|
1126
1011
|
return !1;
|
|
1127
|
-
}), s.pending.length !== l && (n || ge([e], a.id), a.callback(
|
|
1128
|
-
s.loaded.slice(0),
|
|
1129
|
-
s.missing.slice(0),
|
|
1130
|
-
s.pending.slice(0),
|
|
1131
|
-
a.abort
|
|
1132
|
-
));
|
|
1012
|
+
}), s.pending.length !== l && (n || ge([e], a.id), a.callback(s.loaded.slice(0), s.missing.slice(0), s.pending.slice(0), a.abort));
|
|
1133
1013
|
});
|
|
1134
1014
|
}));
|
|
1135
1015
|
}
|
|
1136
|
-
let
|
|
1137
|
-
function
|
|
1138
|
-
const r =
|
|
1139
|
-
if (!t.pending.length)
|
|
1140
|
-
return o;
|
|
1016
|
+
let kt = 0;
|
|
1017
|
+
function bt(e, t, n) {
|
|
1018
|
+
const r = kt++, o = ge.bind(null, n, r);
|
|
1019
|
+
if (!t.pending.length) return o;
|
|
1141
1020
|
const a = {
|
|
1142
1021
|
id: r,
|
|
1143
1022
|
icons: t,
|
|
@@ -1148,6 +1027,32 @@ function yt(e, t, n) {
|
|
|
1148
1027
|
(s.loaderCallbacks || (s.loaderCallbacks = [])).push(a);
|
|
1149
1028
|
}), o;
|
|
1150
1029
|
}
|
|
1030
|
+
function yt(e) {
|
|
1031
|
+
const t = {
|
|
1032
|
+
loaded: [],
|
|
1033
|
+
missing: [],
|
|
1034
|
+
pending: []
|
|
1035
|
+
}, n = /* @__PURE__ */ Object.create(null);
|
|
1036
|
+
e.sort((o, a) => o.provider !== a.provider ? o.provider.localeCompare(a.provider) : o.prefix !== a.prefix ? o.prefix.localeCompare(a.prefix) : o.name.localeCompare(a.name));
|
|
1037
|
+
let r = {
|
|
1038
|
+
provider: "",
|
|
1039
|
+
prefix: "",
|
|
1040
|
+
name: ""
|
|
1041
|
+
};
|
|
1042
|
+
return e.forEach((o) => {
|
|
1043
|
+
if (r.name === o.name && r.prefix === o.prefix && r.provider === o.provider) return;
|
|
1044
|
+
r = o;
|
|
1045
|
+
const a = o.provider, s = o.prefix, l = o.name, c = n[a] || (n[a] = /* @__PURE__ */ Object.create(null)), u = c[s] || (c[s] = j(a, s));
|
|
1046
|
+
let d;
|
|
1047
|
+
l in u.icons ? d = t.loaded : s === "" || u.missing.has(l) ? d = t.missing : d = t.pending;
|
|
1048
|
+
const h = {
|
|
1049
|
+
provider: a,
|
|
1050
|
+
prefix: s,
|
|
1051
|
+
name: l
|
|
1052
|
+
};
|
|
1053
|
+
d.push(h);
|
|
1054
|
+
}), t;
|
|
1055
|
+
}
|
|
1151
1056
|
function xt(e, t = !0, n = !1) {
|
|
1152
1057
|
const r = [];
|
|
1153
1058
|
return e.forEach((o) => {
|
|
@@ -1155,7 +1060,7 @@ function xt(e, t = !0, n = !1) {
|
|
|
1155
1060
|
a && r.push(a);
|
|
1156
1061
|
}), r;
|
|
1157
1062
|
}
|
|
1158
|
-
|
|
1063
|
+
const Et = {
|
|
1159
1064
|
resources: [],
|
|
1160
1065
|
index: 0,
|
|
1161
1066
|
timeout: 2e3,
|
|
@@ -1173,8 +1078,7 @@ function Mt(e, t, n, r) {
|
|
|
1173
1078
|
s.push(w[x]), w = w.slice(0, x).concat(w.slice(x + 1));
|
|
1174
1079
|
}
|
|
1175
1080
|
s = s.concat(w);
|
|
1176
|
-
} else
|
|
1177
|
-
s = e.resources.slice(a).concat(e.resources.slice(0, a));
|
|
1081
|
+
} else s = e.resources.slice(a).concat(e.resources.slice(0, a));
|
|
1178
1082
|
const l = Date.now();
|
|
1179
1083
|
let c = "pending", u = 0, d, h = null, m = [], g = [];
|
|
1180
1084
|
typeof r == "function" && g.push(r);
|
|
@@ -1216,8 +1120,7 @@ function Mt(e, t, n, r) {
|
|
|
1216
1120
|
case "pending":
|
|
1217
1121
|
break;
|
|
1218
1122
|
case "failed":
|
|
1219
|
-
if (F || !e.dataAfterTimeout)
|
|
1220
|
-
return;
|
|
1123
|
+
if (F || !e.dataAfterTimeout) return;
|
|
1221
1124
|
break;
|
|
1222
1125
|
default:
|
|
1223
1126
|
return;
|
|
@@ -1239,8 +1142,7 @@ function Mt(e, t, n, r) {
|
|
|
1239
1142
|
});
|
|
1240
1143
|
}
|
|
1241
1144
|
function P() {
|
|
1242
|
-
if (c !== "pending")
|
|
1243
|
-
return;
|
|
1145
|
+
if (c !== "pending") return;
|
|
1244
1146
|
v();
|
|
1245
1147
|
const w = s.shift();
|
|
1246
1148
|
if (w === void 0) {
|
|
@@ -1274,14 +1176,9 @@ function we(e) {
|
|
|
1274
1176
|
n = n.filter((l) => l().status === "pending");
|
|
1275
1177
|
}
|
|
1276
1178
|
function o(l, c, u) {
|
|
1277
|
-
const d = Mt(
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
c,
|
|
1281
|
-
(h, m) => {
|
|
1282
|
-
r(), u && u(h, m);
|
|
1283
|
-
}
|
|
1284
|
-
);
|
|
1179
|
+
const d = Mt(t, l, c, (h, m) => {
|
|
1180
|
+
r(), u && u(h, m);
|
|
1181
|
+
});
|
|
1285
1182
|
return n.push(d), d;
|
|
1286
1183
|
}
|
|
1287
1184
|
function a(l) {
|
|
@@ -1303,8 +1200,7 @@ const Z = /* @__PURE__ */ Object.create(null);
|
|
|
1303
1200
|
function jt(e) {
|
|
1304
1201
|
if (!Z[e]) {
|
|
1305
1202
|
const t = Q(e);
|
|
1306
|
-
if (!t)
|
|
1307
|
-
return;
|
|
1203
|
+
if (!t) return;
|
|
1308
1204
|
const n = we(t), r = {
|
|
1309
1205
|
config: t,
|
|
1310
1206
|
redundancy: n
|
|
@@ -1336,13 +1232,13 @@ function ne() {
|
|
|
1336
1232
|
}
|
|
1337
1233
|
function Ct(e) {
|
|
1338
1234
|
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
1339
|
-
e.iconsLoaderFlag = !1,
|
|
1235
|
+
e.iconsLoaderFlag = !1, vt(e);
|
|
1340
1236
|
}));
|
|
1341
1237
|
}
|
|
1342
1238
|
function Rt(e) {
|
|
1343
1239
|
const t = [], n = [];
|
|
1344
1240
|
return e.forEach((r) => {
|
|
1345
|
-
(r.match(
|
|
1241
|
+
(r.match(fe) ? t : n).push(r);
|
|
1346
1242
|
}), {
|
|
1347
1243
|
valid: t,
|
|
1348
1244
|
invalid: n
|
|
@@ -1355,15 +1251,14 @@ function R(e, t, n) {
|
|
|
1355
1251
|
o && o.delete(a), e.icons[a] || e.missing.add(a);
|
|
1356
1252
|
});
|
|
1357
1253
|
}
|
|
1358
|
-
if (n && typeof n == "object")
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
return;
|
|
1363
|
-
}
|
|
1364
|
-
} catch (o) {
|
|
1365
|
-
console.error(o);
|
|
1254
|
+
if (n && typeof n == "object") try {
|
|
1255
|
+
if (!de(e, n).length) {
|
|
1256
|
+
r();
|
|
1257
|
+
return;
|
|
1366
1258
|
}
|
|
1259
|
+
} catch (o) {
|
|
1260
|
+
console.error(o);
|
|
1261
|
+
}
|
|
1367
1262
|
r(), Ct(e);
|
|
1368
1263
|
}
|
|
1369
1264
|
function re(e, t) {
|
|
@@ -1377,16 +1272,12 @@ function It(e, t) {
|
|
|
1377
1272
|
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
1378
1273
|
e.iconsQueueFlag = !1;
|
|
1379
1274
|
const { provider: n, prefix: r } = e, o = e.iconsToLoad;
|
|
1380
|
-
if (delete e.iconsToLoad, !o || !o.length)
|
|
1381
|
-
return;
|
|
1275
|
+
if (delete e.iconsToLoad, !o || !o.length) return;
|
|
1382
1276
|
const a = e.loadIcon;
|
|
1383
1277
|
if (e.loadIcons && (o.length > 1 || !a)) {
|
|
1384
|
-
re(
|
|
1385
|
-
e
|
|
1386
|
-
|
|
1387
|
-
R(e, o, d);
|
|
1388
|
-
}
|
|
1389
|
-
);
|
|
1278
|
+
re(e.loadIcons(o, r, n), (d) => {
|
|
1279
|
+
R(e, o, d);
|
|
1280
|
+
});
|
|
1390
1281
|
return;
|
|
1391
1282
|
}
|
|
1392
1283
|
if (a) {
|
|
@@ -1395,9 +1286,7 @@ function It(e, t) {
|
|
|
1395
1286
|
re(h, (m) => {
|
|
1396
1287
|
const g = m ? {
|
|
1397
1288
|
prefix: r,
|
|
1398
|
-
icons: {
|
|
1399
|
-
[d]: m
|
|
1400
|
-
}
|
|
1289
|
+
icons: { [d]: m }
|
|
1401
1290
|
} : null;
|
|
1402
1291
|
R(e, [d], g);
|
|
1403
1292
|
});
|
|
@@ -1405,9 +1294,8 @@ function It(e, t) {
|
|
|
1405
1294
|
return;
|
|
1406
1295
|
}
|
|
1407
1296
|
const { valid: s, invalid: l } = Rt(o);
|
|
1408
|
-
if (l.length && R(e, l, null), !s.length)
|
|
1409
|
-
|
|
1410
|
-
const c = r.match(de) ? N(n) : null;
|
|
1297
|
+
if (l.length && R(e, l, null), !s.length) return;
|
|
1298
|
+
const c = r.match(fe) ? N(n) : null;
|
|
1411
1299
|
if (!c) {
|
|
1412
1300
|
R(e, s, null);
|
|
1413
1301
|
return;
|
|
@@ -1420,16 +1308,11 @@ function It(e, t) {
|
|
|
1420
1308
|
}));
|
|
1421
1309
|
}
|
|
1422
1310
|
const Ot = (e, t) => {
|
|
1423
|
-
const n = xt(e, !0, he()), r =
|
|
1311
|
+
const n = xt(e, !0, he()), r = yt(n);
|
|
1424
1312
|
if (!r.pending.length) {
|
|
1425
1313
|
let c = !0;
|
|
1426
1314
|
return t && setTimeout(() => {
|
|
1427
|
-
c && t(
|
|
1428
|
-
r.loaded,
|
|
1429
|
-
r.missing,
|
|
1430
|
-
r.pending,
|
|
1431
|
-
ne
|
|
1432
|
-
);
|
|
1315
|
+
c && t(r.loaded, r.missing, r.pending, ne);
|
|
1433
1316
|
}), () => {
|
|
1434
1317
|
c = !1;
|
|
1435
1318
|
};
|
|
@@ -1438,8 +1321,7 @@ const Ot = (e, t) => {
|
|
|
1438
1321
|
let s, l;
|
|
1439
1322
|
return r.pending.forEach((c) => {
|
|
1440
1323
|
const { provider: u, prefix: d } = c;
|
|
1441
|
-
if (d === l && u === s)
|
|
1442
|
-
return;
|
|
1324
|
+
if (d === l && u === s) return;
|
|
1443
1325
|
s = u, l = d, a.push(j(u, d));
|
|
1444
1326
|
const h = o[u] || (o[u] = /* @__PURE__ */ Object.create(null));
|
|
1445
1327
|
h[d] || (h[d] = []);
|
|
@@ -1449,12 +1331,10 @@ const Ot = (e, t) => {
|
|
|
1449
1331
|
}), a.forEach((c) => {
|
|
1450
1332
|
const u = o[c.provider][c.prefix];
|
|
1451
1333
|
u.length && It(c, u);
|
|
1452
|
-
}), t ?
|
|
1334
|
+
}), t ? bt(t, r, a) : ne;
|
|
1453
1335
|
};
|
|
1454
1336
|
function Ft(e, t) {
|
|
1455
|
-
const n = {
|
|
1456
|
-
...e
|
|
1457
|
-
};
|
|
1337
|
+
const n = { ...e };
|
|
1458
1338
|
for (const r in t) {
|
|
1459
1339
|
const o = t[r], a = typeof o;
|
|
1460
1340
|
r in pe ? (o === null || o && (a === "string" || a === "number")) && (n[r] = o) : a === typeof n[r] && (n[r] = r === "rotate" ? o % 4 : o);
|
|
@@ -1477,8 +1357,7 @@ function At(e, t) {
|
|
|
1477
1357
|
function $t(e, t = 0) {
|
|
1478
1358
|
const n = e.replace(/^-?[0-9.]*/, "");
|
|
1479
1359
|
function r(o) {
|
|
1480
|
-
for (; o < 0; )
|
|
1481
|
-
o += 4;
|
|
1360
|
+
for (; o < 0; ) o += 4;
|
|
1482
1361
|
return o % 4;
|
|
1483
1362
|
}
|
|
1484
1363
|
if (n === "") {
|
|
@@ -1502,8 +1381,7 @@ function $t(e, t = 0) {
|
|
|
1502
1381
|
}
|
|
1503
1382
|
function Tt(e, t) {
|
|
1504
1383
|
let n = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
1505
|
-
for (const r in t)
|
|
1506
|
-
n += " " + r + '="' + t[r] + '"';
|
|
1384
|
+
for (const r in t) n += " " + r + '="' + t[r] + '"';
|
|
1507
1385
|
return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + e + "</svg>";
|
|
1508
1386
|
}
|
|
1509
1387
|
function Pt(e) {
|
|
@@ -1518,10 +1396,7 @@ function Bt(e) {
|
|
|
1518
1396
|
let I;
|
|
1519
1397
|
function Zt() {
|
|
1520
1398
|
try {
|
|
1521
|
-
I = window.trustedTypes.createPolicy("iconify", {
|
|
1522
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
1523
|
-
createHTML: (e) => e
|
|
1524
|
-
});
|
|
1399
|
+
I = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
|
|
1525
1400
|
} catch {
|
|
1526
1401
|
I = null;
|
|
1527
1402
|
}
|
|
@@ -1591,6 +1466,7 @@ const zt = (e, t, n) => {
|
|
|
1591
1466
|
case "onLoad":
|
|
1592
1467
|
case "mode":
|
|
1593
1468
|
case "ssr":
|
|
1469
|
+
case "fallback":
|
|
1594
1470
|
break;
|
|
1595
1471
|
// Forward ref
|
|
1596
1472
|
case "_ref":
|
|
@@ -2018,4 +1894,4 @@ export {
|
|
|
2018
1894
|
xn as y,
|
|
2019
1895
|
mn as z
|
|
2020
1896
|
};
|
|
2021
|
-
//# sourceMappingURL=icons-
|
|
1897
|
+
//# sourceMappingURL=icons-CEfXECaS.js.map
|