@cccsaurora/clue-ui 1.2.3-dev.266 → 1.2.3

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.
Files changed (183) hide show
  1. package/ActionForm-DlOXqMUx.js +4460 -0
  2. package/AnnotationDetails-Bk-p0F6h.js +160 -0
  3. package/AnnotationPreview-jzZvkCxJ.js +140 -0
  4. package/ClueEnrichContext-KqRuuWNS.js +418 -0
  5. package/FlexOne-BXWFOd1T.js +6 -0
  6. package/_MapCache-BiTi0iqu.js +180 -0
  7. package/_Uint8Array-BQNOM9Rr.js +101 -0
  8. package/_baseAssignValue-CNMLQZco.js +20 -0
  9. package/_baseClone-BnT-6pyM.js +207 -0
  10. package/_baseExtremum-Ca2EHgy2.js +16 -0
  11. package/_baseFlatten-Bfr_Molw.js +72 -0
  12. package/_baseGet-DSZygzyq.js +79 -0
  13. package/_baseIsEqual-VgvaAFZG.js +147 -0
  14. package/_baseIteratee-Dbfsw5z8.js +95 -0
  15. package/_baseSlice-M5RKzt1A.js +10 -0
  16. package/_baseSum-wEbgNeUs.js +10 -0
  17. package/_baseUniq-BJcj69PL.js +79 -0
  18. package/_commonjsHelpers-DaMA6jEr.js +8 -0
  19. package/_createAggregator-k3TuAnxT.js +53 -0
  20. package/_getPrototype-Cr1Mk7BC.js +5 -0
  21. package/_getTag-CK2Sffaq.js +90 -0
  22. package/_isIterateeCall-DkJP7Rbx.js +13 -0
  23. package/_setToArray-C7yMOeww.js +29 -0
  24. package/cloneDeep-CF8TtLHr.js +8 -0
  25. package/components/AnnotationBody.js +35 -49
  26. package/components/AnnotationDetailPopover.js +30 -36
  27. package/components/AnnotationDetails.js +7 -7
  28. package/components/AnnotationEntry.js +35 -35
  29. package/components/AnnotationPreview.js +5 -5
  30. package/components/ClassificationChip.js +23 -44
  31. package/components/CountBadge.js +26 -31
  32. package/components/EnrichedCard.js +97 -110
  33. package/components/EnrichedChip.js +105 -130
  34. package/components/EnrichedTypography.js +107 -133
  35. package/components/ErrorBoundary.js +24 -28
  36. package/components/RetryFailedEnrichments.js +9 -10
  37. package/components/SourcePicker.js +49 -57
  38. package/components/actions/ActionForm.js +4 -4
  39. package/components/actions/ExecutePopover.js +59 -75
  40. package/components/actions/ResultModal.js +4 -4
  41. package/components/actions/form/schemaAdapter.js +23 -39
  42. package/components/actions/formats/FileResult.js +59 -86
  43. package/components/actions/formats/index.js +10 -21
  44. package/components/display/graph/ExpandMoreButton.js +10 -10
  45. package/components/display/graph/elements/NodeCard.js +91 -111
  46. package/components/display/graph/elements/NodeTag.js +13 -15
  47. package/components/display/graph/index.js +202 -261
  48. package/components/display/graph/visualizations/Leaf.js +69 -88
  49. package/components/display/graph/visualizations/cloud/index.js +81 -98
  50. package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
  51. package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
  52. package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
  53. package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
  54. package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
  55. package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
  56. package/components/display/graph/visualizations/icons/index.js +13 -14
  57. package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
  58. package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
  59. package/components/display/graph/visualizations/tree/Triangle.js +13 -13
  60. package/components/display/graph/visualizations/tree/index.js +306 -408
  61. package/components/display/icons/Iconified.js +12 -27
  62. package/components/display/json/index.js +4 -4
  63. package/components/display/markdown/index.js +5770 -8678
  64. package/components/enrichment/EnrichPopover.js +46 -54
  65. package/components/fetchers/Fetcher.js +119 -158
  66. package/components/fetchers/PreviewModal.js +17 -20
  67. package/components/fetchers/StatusChip.js +17 -21
  68. package/components/group/Entry.js +11 -13
  69. package/components/group/Group.js +10 -13
  70. package/components/group/GroupControl.js +65 -76
  71. package/components/stats/QueryStatus.js +33 -43
  72. package/countBy-CdYegFSu.js +8 -0
  73. package/data/event.js +4 -6
  74. package/database/index.js +2 -2
  75. package/debounce-DryYcbJ4.js +56 -0
  76. package/get-CH7kz5Ix.js +8 -0
  77. package/groupBy-br8xmD2R.js +8 -0
  78. package/hooks/ClueActionContext.js +6 -6
  79. package/hooks/ClueComponentContext.js +23 -29
  80. package/hooks/ClueConfigProvider.js +12 -14
  81. package/hooks/ClueDatabaseContext.js +13 -19
  82. package/hooks/ClueEnrichContext.js +8 -8
  83. package/hooks/ClueFetcherContext.js +56 -83
  84. package/hooks/ClueGroupContext.js +14 -17
  85. package/hooks/CluePopupContext.js +5 -5
  86. package/hooks/ClueProvider.js +10 -12
  87. package/hooks/selectors.js +7 -7
  88. package/hooks/useActionResult.js +2 -2
  89. package/hooks/useAnnotations.js +31 -47
  90. package/hooks/useClue.js +4 -6
  91. package/hooks/useClueActions.js +3 -3
  92. package/hooks/useClueConfig.js +4 -6
  93. package/hooks/useClueTypeConfig.js +3 -3
  94. package/hooks/useComparator.js +435 -722
  95. package/hooks/useErrors.js +18 -22
  96. package/hooks/useFetcherResult.js +24 -33
  97. package/hooks/useMyHighlights.js +36 -66
  98. package/hooks/useMyLocalStorage.js +37 -66
  99. package/iconify-BBckr5AQ.js +1263 -0
  100. package/icons/Action.js +49 -66
  101. package/icons/Assessment.js +69 -85
  102. package/icons/Context.js +63 -77
  103. package/icons/Opinion.js +60 -76
  104. package/icons/iconMap.js +2 -2
  105. package/identity-ByMq8VxU.js +6 -0
  106. package/index-BHAe_V9n.js +12768 -0
  107. package/index-BK-zfYhR.js +358 -0
  108. package/index-CA5CUNZO.js +975 -0
  109. package/index-Dj5C04IX.js +568 -0
  110. package/index-p5_wX7q1.js +11729 -0
  111. package/isNil-CjWwlQS3.js +6 -0
  112. package/isObject-B53jY8Qg.js +7 -0
  113. package/isObjectLike-BatpeCIi.js +29 -0
  114. package/isSymbol-C3_SC0Qp.js +8 -0
  115. package/last-7CdUxN0r.js +7 -0
  116. package/main.js +60 -60
  117. package/maxBy-Bc0dYHcO.js +8 -0
  118. package/package.json +1 -1
  119. package/sortBy-DY2JBf9n.js +75 -0
  120. package/sumBy-DuMASLPd.js +8 -0
  121. package/text/Frequency.js +23 -42
  122. package/toFinite-BMy6GObD.js +14 -0
  123. package/toNumber-YVhnnJv4.js +31 -0
  124. package/useClueTypeConfig-Ct9Ygter.js +2292 -0
  125. package/utils/chain.js +65 -92
  126. package/utils/classificationParser.js +256 -519
  127. package/utils/constants.js +10 -35
  128. package/utils/graph.js +45 -72
  129. package/utils/hashUtil.js +7 -7
  130. package/utils/line.js +81 -131
  131. package/utils/loggerUtil.js +3 -5
  132. package/utils/sessionStorage.js +27 -41
  133. package/utils/time.js +423 -423
  134. package/utils/utils.js +9 -9
  135. package/utils/window.js +10 -21
  136. package/utils-DmwSUrum.js +129 -0
  137. package/ActionForm-uDp92tN2.js +0 -5941
  138. package/AnnotationDetails-DGYfOiWm.js +0 -175
  139. package/AnnotationPreview-bHObsb3P.js +0 -188
  140. package/ClueEnrichContext-CJEJxrgs.js +0 -541
  141. package/FlexOne-BSYAhhtG.js +0 -9
  142. package/_MapCache-WmuDdwuH.js +0 -222
  143. package/_Uint8Array-B7JqpgFX.js +0 -128
  144. package/_baseAssignValue-CGTuELqU.js +0 -25
  145. package/_baseClone-CkNrTyhm.js +0 -283
  146. package/_baseExtremum-kob8QXyt.js +0 -18
  147. package/_baseFlatten-jIR_sN_-.js +0 -92
  148. package/_baseGet-Bx3A4Qfp.js +0 -108
  149. package/_baseIsEqual-C5OTWzTk.js +0 -208
  150. package/_baseIteratee-avi7MX2o.js +0 -126
  151. package/_baseSlice-GAv_YFTT.js +0 -20
  152. package/_baseSum-D0WC1dN0.js +0 -13
  153. package/_baseUniq-BI9GIHMF.js +0 -115
  154. package/_commonjsHelpers-DWwsNxpa.js +0 -8
  155. package/_createAggregator-QD8MzKwe.js +0 -63
  156. package/_getPrototype-CU0j_POw.js +0 -5
  157. package/_getTag-Ckxxfr88.js +0 -126
  158. package/_isIterateeCall-Ds3sw2SF.js +0 -17
  159. package/_setToArray-CaPKQhcz.js +0 -33
  160. package/cloneDeep-DJrLSw8W.js +0 -8
  161. package/countBy-c6S3dvSW.js +0 -14
  162. package/debounce-bV0h5FC5.js +0 -92
  163. package/get-DSsNkRQs.js +0 -8
  164. package/groupBy-xqz-n0Vd.js +0 -14
  165. package/iconify-CXMreGTg.js +0 -1782
  166. package/identity-CPGTqrE4.js +0 -6
  167. package/index-AMfoEg_6.js +0 -696
  168. package/index-B6C2a_Lg.js +0 -1172
  169. package/index-C12gPw2W.js +0 -17698
  170. package/index-DCKkHTvx.js +0 -15750
  171. package/index-JcKyZeoY.js +0 -465
  172. package/isNil-CIubwp4T.js +0 -6
  173. package/isObject-FTY-5JQX.js +0 -7
  174. package/isObjectLike-OAgjjZye.js +0 -48
  175. package/isSymbol-Xd2FsJyp.js +0 -8
  176. package/last-CUCl67Im.js +0 -7
  177. package/maxBy-IKHzFrCS.js +0 -8
  178. package/sortBy-DfSj8IoJ.js +0 -96
  179. package/sumBy-D-hb_NY-.js +0 -8
  180. package/toFinite-Bc55msYj.js +0 -16
  181. package/toNumber-DPxy1FBy.js +0 -39
  182. package/useClueTypeConfig-Z1LFp01b.js +0 -3289
  183. package/utils-HmNPuoDB.js +0 -199
@@ -0,0 +1,1263 @@
1
+ import I from "react";
2
+ const _ = /^[a-z0-9]+(-[a-z0-9]+)*$/, D = (t, e, n, r = "") => {
3
+ const o = t.split(":");
4
+ if (t.slice(0, 1) === "@") {
5
+ if (o.length < 2 || o.length > 3)
6
+ return null;
7
+ r = o.shift().slice(1);
8
+ }
9
+ if (o.length > 3 || !o.length)
10
+ return null;
11
+ if (o.length > 1) {
12
+ const c = o.pop(), l = o.pop(), f = {
13
+ // Allow provider without '@': "provider:prefix:name"
14
+ provider: o.length > 0 ? o[0] : r,
15
+ prefix: l,
16
+ name: c
17
+ };
18
+ return e && !O(f) ? null : f;
19
+ }
20
+ const i = o[0], s = i.split("-");
21
+ if (s.length > 1) {
22
+ const c = {
23
+ provider: r,
24
+ prefix: s.shift(),
25
+ name: s.join("-")
26
+ };
27
+ return e && !O(c) ? null : c;
28
+ }
29
+ if (n && r === "") {
30
+ const c = {
31
+ provider: r,
32
+ prefix: "",
33
+ name: i
34
+ };
35
+ return e && !O(c, n) ? null : c;
36
+ }
37
+ return null;
38
+ }, O = (t, e) => t ? !!((t.provider === "" || t.provider.match(_)) && (e && t.prefix === "" || t.prefix.match(_)) && t.name.match(_)) : !1, ht = Object.freeze(
39
+ {
40
+ left: 0,
41
+ top: 0,
42
+ width: 16,
43
+ height: 16
44
+ }
45
+ ), A = Object.freeze({
46
+ rotate: 0,
47
+ vFlip: !1,
48
+ hFlip: !1
49
+ }), W = Object.freeze({
50
+ ...ht,
51
+ ...A
52
+ }), B = Object.freeze({
53
+ ...W,
54
+ body: "",
55
+ hidden: !1
56
+ });
57
+ function Lt(t, e) {
58
+ const n = {};
59
+ !t.hFlip != !e.hFlip && (n.hFlip = !0), !t.vFlip != !e.vFlip && (n.vFlip = !0);
60
+ const r = ((t.rotate || 0) + (e.rotate || 0)) % 4;
61
+ return r && (n.rotate = r), n;
62
+ }
63
+ function et(t, e) {
64
+ const n = Lt(t, e);
65
+ for (const r in B)
66
+ r in A ? r in t && !(r in n) && (n[r] = A[r]) : r in e ? n[r] = e[r] : r in t && (n[r] = t[r]);
67
+ return n;
68
+ }
69
+ function Mt(t, e) {
70
+ const n = t.icons, r = t.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
71
+ function i(s) {
72
+ if (n[s])
73
+ return o[s] = [];
74
+ if (!(s in o)) {
75
+ o[s] = null;
76
+ const c = r[s] && r[s].parent, l = c && i(c);
77
+ l && (o[s] = [c].concat(l));
78
+ }
79
+ return o[s];
80
+ }
81
+ return Object.keys(n).concat(Object.keys(r)).forEach(i), o;
82
+ }
83
+ function Ot(t, e, n) {
84
+ const r = t.icons, o = t.aliases || /* @__PURE__ */ Object.create(null);
85
+ let i = {};
86
+ function s(c) {
87
+ i = et(
88
+ r[c] || o[c],
89
+ i
90
+ );
91
+ }
92
+ return s(e), n.forEach(s), et(t, i);
93
+ }
94
+ function pt(t, e) {
95
+ const n = [];
96
+ if (typeof t != "object" || typeof t.icons != "object")
97
+ return n;
98
+ t.not_found instanceof Array && t.not_found.forEach((o) => {
99
+ e(o, null), n.push(o);
100
+ });
101
+ const r = Mt(t);
102
+ for (const o in r) {
103
+ const i = r[o];
104
+ i && (e(o, Ot(t, o, i)), n.push(o));
105
+ }
106
+ return n;
107
+ }
108
+ const Ft = {
109
+ provider: "",
110
+ aliases: {},
111
+ not_found: {},
112
+ ...ht
113
+ };
114
+ function H(t, e) {
115
+ for (const n in e)
116
+ if (n in t && typeof t[n] != typeof e[n])
117
+ return !1;
118
+ return !0;
119
+ }
120
+ function gt(t) {
121
+ if (typeof t != "object" || t === null)
122
+ return null;
123
+ const e = t;
124
+ if (typeof e.prefix != "string" || !t.icons || typeof t.icons != "object" || !H(t, Ft))
125
+ return null;
126
+ const n = e.icons;
127
+ for (const o in n) {
128
+ const i = n[o];
129
+ if (!o.match(_) || typeof i.body != "string" || !H(
130
+ i,
131
+ B
132
+ ))
133
+ return null;
134
+ }
135
+ const r = e.aliases || /* @__PURE__ */ Object.create(null);
136
+ for (const o in r) {
137
+ const i = r[o], s = i.parent;
138
+ if (!o.match(_) || typeof s != "string" || !n[s] && !r[s] || !H(
139
+ i,
140
+ B
141
+ ))
142
+ return null;
143
+ }
144
+ return e;
145
+ }
146
+ const nt = /* @__PURE__ */ Object.create(null);
147
+ function At(t, e) {
148
+ return {
149
+ provider: t,
150
+ prefix: e,
151
+ icons: /* @__PURE__ */ Object.create(null),
152
+ missing: /* @__PURE__ */ new Set()
153
+ };
154
+ }
155
+ function v(t, e) {
156
+ const n = nt[t] || (nt[t] = /* @__PURE__ */ Object.create(null));
157
+ return n[e] || (n[e] = At(t, e));
158
+ }
159
+ function G(t, e) {
160
+ return gt(e) ? pt(e, (n, r) => {
161
+ r ? t.icons[n] = r : t.missing.add(n);
162
+ }) : [];
163
+ }
164
+ function Dt(t, e, n) {
165
+ try {
166
+ if (typeof n.body == "string")
167
+ return t.icons[e] = { ...n }, !0;
168
+ } catch {
169
+ }
170
+ return !1;
171
+ }
172
+ let j = !1;
173
+ function mt(t) {
174
+ return typeof t == "boolean" && (j = t), j;
175
+ }
176
+ function Nt(t) {
177
+ const e = typeof t == "string" ? D(t, !0, j) : t;
178
+ if (e) {
179
+ const n = v(e.provider, e.prefix), r = e.name;
180
+ return n.icons[r] || (n.missing.has(r) ? null : void 0);
181
+ }
182
+ }
183
+ function Rt(t, e) {
184
+ const n = D(t, !0, j);
185
+ if (!n)
186
+ return !1;
187
+ const r = v(n.provider, n.prefix);
188
+ return Dt(r, n.name, e);
189
+ }
190
+ function Ht(t, e) {
191
+ if (typeof t != "object")
192
+ return !1;
193
+ if (typeof e != "string" && (e = t.provider || ""), j && !e && !t.prefix) {
194
+ let o = !1;
195
+ return gt(t) && (t.prefix = "", pt(t, (i, s) => {
196
+ s && Rt(i, s) && (o = !0);
197
+ })), o;
198
+ }
199
+ const n = t.prefix;
200
+ if (!O({
201
+ provider: e,
202
+ prefix: n,
203
+ name: "a"
204
+ }))
205
+ return !1;
206
+ const r = v(e, n);
207
+ return !!G(r, t);
208
+ }
209
+ const yt = Object.freeze({
210
+ width: null,
211
+ height: null
212
+ }), bt = Object.freeze({
213
+ // Dimensions
214
+ ...yt,
215
+ // Transformations
216
+ ...A
217
+ }), Ut = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Bt = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
218
+ function ot(t, e, n) {
219
+ if (e === 1)
220
+ return t;
221
+ if (n = n || 100, typeof t == "number")
222
+ return Math.ceil(t * e * n) / n;
223
+ if (typeof t != "string")
224
+ return t;
225
+ const r = t.split(Ut);
226
+ if (r === null || !r.length)
227
+ return t;
228
+ const o = [];
229
+ let i = r.shift(), s = Bt.test(i);
230
+ for (; ; ) {
231
+ if (s) {
232
+ const c = parseFloat(i);
233
+ isNaN(c) ? o.push(i) : o.push(Math.ceil(c * e * n) / n);
234
+ } else
235
+ o.push(i);
236
+ if (i = r.shift(), i === void 0)
237
+ return o.join("");
238
+ s = !s;
239
+ }
240
+ }
241
+ const zt = (t) => t === "unset" || t === "undefined" || t === "none";
242
+ function Qt(t, e) {
243
+ const n = {
244
+ ...W,
245
+ ...t
246
+ }, r = {
247
+ ...bt,
248
+ ...e
249
+ }, o = {
250
+ left: n.left,
251
+ top: n.top,
252
+ width: n.width,
253
+ height: n.height
254
+ };
255
+ let i = n.body;
256
+ [n, r].forEach((w) => {
257
+ const g = [], C = w.hFlip, m = w.vFlip;
258
+ let u = w.rotate;
259
+ C ? m ? u += 2 : (g.push(
260
+ "translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"
261
+ ), g.push("scale(-1 1)"), o.top = o.left = 0) : m && (g.push(
262
+ "translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"
263
+ ), g.push("scale(1 -1)"), o.top = o.left = 0);
264
+ let b;
265
+ switch (u < 0 && (u -= Math.floor(u / 4) * 4), u = u % 4, u) {
266
+ case 1:
267
+ b = o.height / 2 + o.top, g.unshift(
268
+ "rotate(90 " + b.toString() + " " + b.toString() + ")"
269
+ );
270
+ break;
271
+ case 2:
272
+ g.unshift(
273
+ "rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")"
274
+ );
275
+ break;
276
+ case 3:
277
+ b = o.width / 2 + o.left, g.unshift(
278
+ "rotate(-90 " + b.toString() + " " + b.toString() + ")"
279
+ );
280
+ break;
281
+ }
282
+ u % 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)), g.length && (i = '<g transform="' + g.join(" ") + '">' + i + "</g>");
283
+ });
284
+ const s = r.width, c = r.height, l = o.width, f = o.height;
285
+ let a, d;
286
+ s === null ? (d = c === null ? "1em" : c === "auto" ? f : c, a = ot(d, l / f)) : (a = s === "auto" ? l : s, d = c === null ? ot(a, f / l) : c === "auto" ? f : c);
287
+ const p = {}, y = (w, g) => {
288
+ zt(g) || (p[w] = g.toString());
289
+ };
290
+ return y("width", a), y("height", d), p.viewBox = o.left.toString() + " " + o.top.toString() + " " + l.toString() + " " + f.toString(), {
291
+ attributes: p,
292
+ body: i
293
+ };
294
+ }
295
+ const qt = /\sid="(\S+)"/g, $t = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
296
+ let Vt = 0;
297
+ function Kt(t, e = $t) {
298
+ const n = [];
299
+ let r;
300
+ for (; r = qt.exec(t); )
301
+ n.push(r[1]);
302
+ if (!n.length)
303
+ return t;
304
+ const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
305
+ return n.forEach((i) => {
306
+ const s = typeof e == "function" ? e(i) : e + (Vt++).toString(), c = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
307
+ t = t.replace(
308
+ // Allowed characters before id: [#;"]
309
+ // Allowed characters after id: [)"], .[a-z]
310
+ new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"),
311
+ "$1" + s + o + "$3"
312
+ );
313
+ }), t = t.replace(new RegExp(o, "g"), ""), t;
314
+ }
315
+ const z = /* @__PURE__ */ Object.create(null);
316
+ function Wt(t, e) {
317
+ z[t] = e;
318
+ }
319
+ function Q(t) {
320
+ return z[t] || z[""];
321
+ }
322
+ function J(t) {
323
+ let e;
324
+ if (typeof t.resources == "string")
325
+ e = [t.resources];
326
+ else if (e = t.resources, !(e instanceof Array) || !e.length)
327
+ return null;
328
+ return {
329
+ // API hosts
330
+ resources: e,
331
+ // Root path
332
+ path: t.path || "/",
333
+ // URL length limit
334
+ maxURL: t.maxURL || 500,
335
+ // Timeout before next host is used.
336
+ rotate: t.rotate || 750,
337
+ // Timeout before failing query.
338
+ timeout: t.timeout || 5e3,
339
+ // Randomise default API end point.
340
+ random: t.random === !0,
341
+ // Start index
342
+ index: t.index || 0,
343
+ // Receive data after time out (used if time out kicks in first, then API module sends data anyway).
344
+ dataAfterTimeout: t.dataAfterTimeout !== !1
345
+ };
346
+ }
347
+ const X = /* @__PURE__ */ Object.create(null), T = [
348
+ "https://api.simplesvg.com",
349
+ "https://api.unisvg.com"
350
+ ], F = [];
351
+ for (; T.length > 0; )
352
+ T.length === 1 || Math.random() > 0.5 ? F.push(T.shift()) : F.push(T.pop());
353
+ X[""] = J({
354
+ resources: ["https://api.iconify.design"].concat(F)
355
+ });
356
+ function Gt(t, e) {
357
+ const n = J(e);
358
+ return n === null ? !1 : (X[t] = n, !0);
359
+ }
360
+ function Y(t) {
361
+ return X[t];
362
+ }
363
+ const Jt = () => {
364
+ let t;
365
+ try {
366
+ if (t = fetch, typeof t == "function")
367
+ return t;
368
+ } catch {
369
+ }
370
+ };
371
+ let rt = Jt();
372
+ function Xt(t, e) {
373
+ const n = Y(t);
374
+ if (!n)
375
+ return 0;
376
+ let r;
377
+ if (!n.maxURL)
378
+ r = 0;
379
+ else {
380
+ let o = 0;
381
+ n.resources.forEach((s) => {
382
+ o = Math.max(o, s.length);
383
+ });
384
+ const i = e + ".json?icons=";
385
+ r = n.maxURL - o - n.path.length - i.length;
386
+ }
387
+ return r;
388
+ }
389
+ function Yt(t) {
390
+ return t === 404;
391
+ }
392
+ const Zt = (t, e, n) => {
393
+ const r = [], o = Xt(t, e), i = "icons";
394
+ let s = {
395
+ type: i,
396
+ provider: t,
397
+ prefix: e,
398
+ icons: []
399
+ }, c = 0;
400
+ return n.forEach((l, f) => {
401
+ c += l.length + 1, c >= o && f > 0 && (r.push(s), s = {
402
+ type: i,
403
+ provider: t,
404
+ prefix: e,
405
+ icons: []
406
+ }, c = l.length), s.icons.push(l);
407
+ }), r.push(s), r;
408
+ };
409
+ function te(t) {
410
+ if (typeof t == "string") {
411
+ const e = Y(t);
412
+ if (e)
413
+ return e.path;
414
+ }
415
+ return "/";
416
+ }
417
+ const ee = (t, e, n) => {
418
+ if (!rt) {
419
+ n("abort", 424);
420
+ return;
421
+ }
422
+ let r = te(e.provider);
423
+ switch (e.type) {
424
+ case "icons": {
425
+ const i = e.prefix, c = e.icons.join(","), l = new URLSearchParams({
426
+ icons: c
427
+ });
428
+ r += i + ".json?" + l.toString();
429
+ break;
430
+ }
431
+ case "custom": {
432
+ const i = e.uri;
433
+ r += i.slice(0, 1) === "/" ? i.slice(1) : i;
434
+ break;
435
+ }
436
+ default:
437
+ n("abort", 400);
438
+ return;
439
+ }
440
+ let o = 503;
441
+ rt(t + r).then((i) => {
442
+ const s = i.status;
443
+ if (s !== 200) {
444
+ setTimeout(() => {
445
+ n(Yt(s) ? "abort" : "next", s);
446
+ });
447
+ return;
448
+ }
449
+ return o = 501, i.json();
450
+ }).then((i) => {
451
+ if (typeof i != "object" || i === null) {
452
+ setTimeout(() => {
453
+ i === 404 ? n("abort", i) : n("next", o);
454
+ });
455
+ return;
456
+ }
457
+ setTimeout(() => {
458
+ n("success", i);
459
+ });
460
+ }).catch(() => {
461
+ n("next", o);
462
+ });
463
+ }, ne = {
464
+ prepare: Zt,
465
+ send: ee
466
+ };
467
+ function oe(t) {
468
+ const e = {
469
+ loaded: [],
470
+ missing: [],
471
+ pending: []
472
+ }, n = /* @__PURE__ */ Object.create(null);
473
+ t.sort((o, i) => o.provider !== i.provider ? o.provider.localeCompare(i.provider) : o.prefix !== i.prefix ? o.prefix.localeCompare(i.prefix) : o.name.localeCompare(i.name));
474
+ let r = {
475
+ provider: "",
476
+ prefix: "",
477
+ name: ""
478
+ };
479
+ return t.forEach((o) => {
480
+ if (r.name === o.name && r.prefix === o.prefix && r.provider === o.provider)
481
+ return;
482
+ r = o;
483
+ const i = o.provider, s = o.prefix, c = o.name, l = n[i] || (n[i] = /* @__PURE__ */ Object.create(null)), f = l[s] || (l[s] = v(i, s));
484
+ let a;
485
+ c in f.icons ? a = e.loaded : s === "" || f.missing.has(c) ? a = e.missing : a = e.pending;
486
+ const d = {
487
+ provider: i,
488
+ prefix: s,
489
+ name: c
490
+ };
491
+ a.push(d);
492
+ }), e;
493
+ }
494
+ function wt(t, e) {
495
+ t.forEach((n) => {
496
+ const r = n.loaderCallbacks;
497
+ r && (n.loaderCallbacks = r.filter((o) => o.id !== e));
498
+ });
499
+ }
500
+ function re(t) {
501
+ t.pendingCallbacksFlag || (t.pendingCallbacksFlag = !0, setTimeout(() => {
502
+ t.pendingCallbacksFlag = !1;
503
+ const e = t.loaderCallbacks ? t.loaderCallbacks.slice(0) : [];
504
+ if (!e.length)
505
+ return;
506
+ let n = !1;
507
+ const r = t.provider, o = t.prefix;
508
+ e.forEach((i) => {
509
+ const s = i.icons, c = s.pending.length;
510
+ s.pending = s.pending.filter((l) => {
511
+ if (l.prefix !== o)
512
+ return !0;
513
+ const f = l.name;
514
+ if (t.icons[f])
515
+ s.loaded.push({
516
+ provider: r,
517
+ prefix: o,
518
+ name: f
519
+ });
520
+ else if (t.missing.has(f))
521
+ s.missing.push({
522
+ provider: r,
523
+ prefix: o,
524
+ name: f
525
+ });
526
+ else
527
+ return n = !0, !0;
528
+ return !1;
529
+ }), s.pending.length !== c && (n || wt([t], i.id), i.callback(
530
+ s.loaded.slice(0),
531
+ s.missing.slice(0),
532
+ s.pending.slice(0),
533
+ i.abort
534
+ ));
535
+ });
536
+ }));
537
+ }
538
+ let ie = 0;
539
+ function se(t, e, n) {
540
+ const r = ie++, o = wt.bind(null, n, r);
541
+ if (!e.pending.length)
542
+ return o;
543
+ const i = {
544
+ id: r,
545
+ icons: e,
546
+ callback: t,
547
+ abort: o
548
+ };
549
+ return n.forEach((s) => {
550
+ (s.loaderCallbacks || (s.loaderCallbacks = [])).push(i);
551
+ }), o;
552
+ }
553
+ function ce(t, e = !0, n = !1) {
554
+ const r = [];
555
+ return t.forEach((o) => {
556
+ const i = typeof o == "string" ? D(o, e, n) : o;
557
+ i && r.push(i);
558
+ }), r;
559
+ }
560
+ var le = {
561
+ resources: [],
562
+ index: 0,
563
+ timeout: 2e3,
564
+ rotate: 750,
565
+ random: !1,
566
+ dataAfterTimeout: !1
567
+ };
568
+ function fe(t, e, n, r) {
569
+ const o = t.resources.length, i = t.random ? Math.floor(Math.random() * o) : t.index;
570
+ let s;
571
+ if (t.random) {
572
+ let h = t.resources.slice(0);
573
+ for (s = []; h.length > 1; ) {
574
+ const x = Math.floor(Math.random() * h.length);
575
+ s.push(h[x]), h = h.slice(0, x).concat(h.slice(x + 1));
576
+ }
577
+ s = s.concat(h);
578
+ } else
579
+ s = t.resources.slice(i).concat(t.resources.slice(0, i));
580
+ const c = Date.now();
581
+ let l = "pending", f = 0, a, d = null, p = [], y = [];
582
+ typeof r == "function" && y.push(r);
583
+ function w() {
584
+ d && (clearTimeout(d), d = null);
585
+ }
586
+ function g() {
587
+ l === "pending" && (l = "aborted"), w(), p.forEach((h) => {
588
+ h.status === "pending" && (h.status = "aborted");
589
+ }), p = [];
590
+ }
591
+ function C(h, x) {
592
+ x && (y = []), typeof h == "function" && y.push(h);
593
+ }
594
+ function m() {
595
+ return {
596
+ startTime: c,
597
+ payload: e,
598
+ status: l,
599
+ queriesSent: f,
600
+ queriesPending: p.length,
601
+ subscribe: C,
602
+ abort: g
603
+ };
604
+ }
605
+ function u() {
606
+ l = "failed", y.forEach((h) => {
607
+ h(void 0, a);
608
+ });
609
+ }
610
+ function b() {
611
+ p.forEach((h) => {
612
+ h.status === "pending" && (h.status = "aborted");
613
+ }), p = [];
614
+ }
615
+ function Et(h, x, k) {
616
+ const L = x !== "success";
617
+ switch (p = p.filter((S) => S !== h), l) {
618
+ case "pending":
619
+ break;
620
+ case "failed":
621
+ if (L || !t.dataAfterTimeout)
622
+ return;
623
+ break;
624
+ default:
625
+ return;
626
+ }
627
+ if (x === "abort") {
628
+ a = k, u();
629
+ return;
630
+ }
631
+ if (L) {
632
+ a = k, p.length || (s.length ? R() : u());
633
+ return;
634
+ }
635
+ if (w(), b(), !t.random) {
636
+ const S = t.resources.indexOf(h.resource);
637
+ S !== -1 && S !== t.index && (t.index = S);
638
+ }
639
+ l = "completed", y.forEach((S) => {
640
+ S(k);
641
+ });
642
+ }
643
+ function R() {
644
+ if (l !== "pending")
645
+ return;
646
+ w();
647
+ const h = s.shift();
648
+ if (h === void 0) {
649
+ if (p.length) {
650
+ d = setTimeout(() => {
651
+ w(), l === "pending" && (b(), u());
652
+ }, t.timeout);
653
+ return;
654
+ }
655
+ u();
656
+ return;
657
+ }
658
+ const x = {
659
+ status: "pending",
660
+ resource: h,
661
+ callback: (k, L) => {
662
+ Et(x, k, L);
663
+ }
664
+ };
665
+ p.push(x), f++, d = setTimeout(R, t.rotate), n(h, e, x.callback);
666
+ }
667
+ return setTimeout(R), m;
668
+ }
669
+ function xt(t) {
670
+ const e = {
671
+ ...le,
672
+ ...t
673
+ };
674
+ let n = [];
675
+ function r() {
676
+ n = n.filter((c) => c().status === "pending");
677
+ }
678
+ function o(c, l, f) {
679
+ const a = fe(
680
+ e,
681
+ c,
682
+ l,
683
+ (d, p) => {
684
+ r(), f && f(d, p);
685
+ }
686
+ );
687
+ return n.push(a), a;
688
+ }
689
+ function i(c) {
690
+ return n.find((l) => c(l)) || null;
691
+ }
692
+ return {
693
+ query: o,
694
+ find: i,
695
+ setIndex: (c) => {
696
+ e.index = c;
697
+ },
698
+ getIndex: () => e.index,
699
+ cleanup: r
700
+ };
701
+ }
702
+ function it() {
703
+ }
704
+ const U = /* @__PURE__ */ Object.create(null);
705
+ function ae(t) {
706
+ if (!U[t]) {
707
+ const e = Y(t);
708
+ if (!e)
709
+ return;
710
+ const n = xt(e), r = {
711
+ config: e,
712
+ redundancy: n
713
+ };
714
+ U[t] = r;
715
+ }
716
+ return U[t];
717
+ }
718
+ function ue(t, e, n) {
719
+ let r, o;
720
+ if (typeof t == "string") {
721
+ const i = Q(t);
722
+ if (!i)
723
+ return n(void 0, 424), it;
724
+ o = i.send;
725
+ const s = ae(t);
726
+ s && (r = s.redundancy);
727
+ } else {
728
+ const i = J(t);
729
+ if (i) {
730
+ r = xt(i);
731
+ const s = t.resources ? t.resources[0] : "", c = Q(s);
732
+ c && (o = c.send);
733
+ }
734
+ }
735
+ return !r || !o ? (n(void 0, 424), it) : r.query(e, o, n)().abort;
736
+ }
737
+ const st = "iconify2", E = "iconify", It = E + "-count", ct = E + "-version", St = 36e5, de = 168;
738
+ function q(t, e) {
739
+ try {
740
+ return t.getItem(e);
741
+ } catch {
742
+ }
743
+ }
744
+ function Z(t, e, n) {
745
+ try {
746
+ return t.setItem(e, n), !0;
747
+ } catch {
748
+ }
749
+ }
750
+ function lt(t, e) {
751
+ try {
752
+ t.removeItem(e);
753
+ } catch {
754
+ }
755
+ }
756
+ function $(t, e) {
757
+ return Z(t, It, e.toString());
758
+ }
759
+ function V(t) {
760
+ return parseInt(q(t, It)) || 0;
761
+ }
762
+ const N = {
763
+ local: !0,
764
+ session: !0
765
+ }, vt = {
766
+ local: /* @__PURE__ */ new Set(),
767
+ session: /* @__PURE__ */ new Set()
768
+ };
769
+ let tt = !1;
770
+ function he(t) {
771
+ tt = t;
772
+ }
773
+ let M = typeof window > "u" ? {} : window;
774
+ function Ct(t) {
775
+ const e = t + "Storage";
776
+ try {
777
+ if (M && M[e] && typeof M[e].length == "number")
778
+ return M[e];
779
+ } catch {
780
+ }
781
+ N[t] = !1;
782
+ }
783
+ function kt(t, e) {
784
+ const n = Ct(t);
785
+ if (!n)
786
+ return;
787
+ const r = q(n, ct);
788
+ if (r !== st) {
789
+ if (r) {
790
+ const c = V(n);
791
+ for (let l = 0; l < c; l++)
792
+ lt(n, E + l.toString());
793
+ }
794
+ Z(n, ct, st), $(n, 0);
795
+ return;
796
+ }
797
+ const o = Math.floor(Date.now() / St) - de, i = (c) => {
798
+ const l = E + c.toString(), f = q(n, l);
799
+ if (typeof f == "string") {
800
+ try {
801
+ const a = JSON.parse(f);
802
+ if (typeof a == "object" && typeof a.cached == "number" && a.cached > o && typeof a.provider == "string" && typeof a.data == "object" && typeof a.data.prefix == "string" && // Valid item: run callback
803
+ e(a, c))
804
+ return !0;
805
+ } catch {
806
+ }
807
+ lt(n, l);
808
+ }
809
+ };
810
+ let s = V(n);
811
+ for (let c = s - 1; c >= 0; c--)
812
+ i(c) || (c === s - 1 ? (s--, $(n, s)) : vt[t].add(c));
813
+ }
814
+ function Tt() {
815
+ if (!tt) {
816
+ he(!0);
817
+ for (const t in N)
818
+ kt(t, (e) => {
819
+ const n = e.data, r = e.provider, o = n.prefix, i = v(
820
+ r,
821
+ o
822
+ );
823
+ if (!G(i, n).length)
824
+ return !1;
825
+ const s = n.lastModified || -1;
826
+ return i.lastModifiedCached = i.lastModifiedCached ? Math.min(i.lastModifiedCached, s) : s, !0;
827
+ });
828
+ }
829
+ }
830
+ function pe(t, e) {
831
+ const n = t.lastModifiedCached;
832
+ if (
833
+ // Matches or newer
834
+ n && n >= e
835
+ )
836
+ return n === e;
837
+ if (t.lastModifiedCached = e, n)
838
+ for (const r in N)
839
+ kt(r, (o) => {
840
+ const i = o.data;
841
+ return o.provider !== t.provider || i.prefix !== t.prefix || i.lastModified === e;
842
+ });
843
+ return !0;
844
+ }
845
+ function ge(t, e) {
846
+ tt || Tt();
847
+ function n(r) {
848
+ let o;
849
+ if (!N[r] || !(o = Ct(r)))
850
+ return;
851
+ const i = vt[r];
852
+ let s;
853
+ if (i.size)
854
+ i.delete(s = Array.from(i).shift());
855
+ else if (s = V(o), !$(o, s + 1))
856
+ return;
857
+ const c = {
858
+ cached: Math.floor(Date.now() / St),
859
+ provider: t.provider,
860
+ data: e
861
+ };
862
+ return Z(
863
+ o,
864
+ E + s.toString(),
865
+ JSON.stringify(c)
866
+ );
867
+ }
868
+ e.lastModified && !pe(t, e.lastModified) || Object.keys(e.icons).length && (e.not_found && (e = Object.assign({}, e), delete e.not_found), n("local") || n("session"));
869
+ }
870
+ function ft() {
871
+ }
872
+ function me(t) {
873
+ t.iconsLoaderFlag || (t.iconsLoaderFlag = !0, setTimeout(() => {
874
+ t.iconsLoaderFlag = !1, re(t);
875
+ }));
876
+ }
877
+ function ye(t, e) {
878
+ t.iconsToLoad ? t.iconsToLoad = t.iconsToLoad.concat(e).sort() : t.iconsToLoad = e, t.iconsQueueFlag || (t.iconsQueueFlag = !0, setTimeout(() => {
879
+ t.iconsQueueFlag = !1;
880
+ const { provider: n, prefix: r } = t, o = t.iconsToLoad;
881
+ delete t.iconsToLoad;
882
+ let i;
883
+ if (!o || !(i = Q(n)))
884
+ return;
885
+ i.prepare(n, r, o).forEach((c) => {
886
+ ue(n, c, (l) => {
887
+ if (typeof l != "object")
888
+ c.icons.forEach((f) => {
889
+ t.missing.add(f);
890
+ });
891
+ else
892
+ try {
893
+ const f = G(
894
+ t,
895
+ l
896
+ );
897
+ if (!f.length)
898
+ return;
899
+ const a = t.pendingIcons;
900
+ a && f.forEach((d) => {
901
+ a.delete(d);
902
+ }), ge(t, l);
903
+ } catch (f) {
904
+ console.error(f);
905
+ }
906
+ me(t);
907
+ });
908
+ });
909
+ }));
910
+ }
911
+ const be = (t, e) => {
912
+ const n = ce(t, !0, mt()), r = oe(n);
913
+ if (!r.pending.length) {
914
+ let l = !0;
915
+ return e && setTimeout(() => {
916
+ l && e(
917
+ r.loaded,
918
+ r.missing,
919
+ r.pending,
920
+ ft
921
+ );
922
+ }), () => {
923
+ l = !1;
924
+ };
925
+ }
926
+ const o = /* @__PURE__ */ Object.create(null), i = [];
927
+ let s, c;
928
+ return r.pending.forEach((l) => {
929
+ const { provider: f, prefix: a } = l;
930
+ if (a === c && f === s)
931
+ return;
932
+ s = f, c = a, i.push(v(f, a));
933
+ const d = o[f] || (o[f] = /* @__PURE__ */ Object.create(null));
934
+ d[a] || (d[a] = []);
935
+ }), r.pending.forEach((l) => {
936
+ const { provider: f, prefix: a, name: d } = l, p = v(f, a), y = p.pendingIcons || (p.pendingIcons = /* @__PURE__ */ new Set());
937
+ y.has(d) || (y.add(d), o[f][a].push(d));
938
+ }), i.forEach((l) => {
939
+ const { provider: f, prefix: a } = l;
940
+ o[f][a].length && ye(l, o[f][a]);
941
+ }), e ? se(e, r, i) : ft;
942
+ };
943
+ function we(t, e) {
944
+ const n = {
945
+ ...t
946
+ };
947
+ for (const r in e) {
948
+ const o = e[r], i = typeof o;
949
+ r in yt ? (o === null || o && (i === "string" || i === "number")) && (n[r] = o) : i === typeof n[r] && (n[r] = r === "rotate" ? o % 4 : o);
950
+ }
951
+ return n;
952
+ }
953
+ const xe = /[\s,]+/;
954
+ function Ie(t, e) {
955
+ e.split(xe).forEach((n) => {
956
+ switch (n.trim()) {
957
+ case "horizontal":
958
+ t.hFlip = !0;
959
+ break;
960
+ case "vertical":
961
+ t.vFlip = !0;
962
+ break;
963
+ }
964
+ });
965
+ }
966
+ function Se(t, e = 0) {
967
+ const n = t.replace(/^-?[0-9.]*/, "");
968
+ function r(o) {
969
+ for (; o < 0; )
970
+ o += 4;
971
+ return o % 4;
972
+ }
973
+ if (n === "") {
974
+ const o = parseInt(t);
975
+ return isNaN(o) ? 0 : r(o);
976
+ } else if (n !== t) {
977
+ let o = 0;
978
+ switch (n) {
979
+ case "%":
980
+ o = 25;
981
+ break;
982
+ case "deg":
983
+ o = 90;
984
+ }
985
+ if (o) {
986
+ let i = parseFloat(t.slice(0, t.length - n.length));
987
+ return isNaN(i) ? 0 : (i = i / o, i % 1 === 0 ? r(i) : 0);
988
+ }
989
+ }
990
+ return e;
991
+ }
992
+ function ve(t, e) {
993
+ let n = t.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
994
+ for (const r in e)
995
+ n += " " + r + '="' + e[r] + '"';
996
+ return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + t + "</svg>";
997
+ }
998
+ function Ce(t) {
999
+ return t.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1000
+ }
1001
+ function ke(t) {
1002
+ return "data:image/svg+xml," + Ce(t);
1003
+ }
1004
+ function Te(t) {
1005
+ return 'url("' + ke(t) + '")';
1006
+ }
1007
+ let P;
1008
+ function _e() {
1009
+ try {
1010
+ P = window.trustedTypes.createPolicy("iconify", {
1011
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
1012
+ createHTML: (t) => t
1013
+ });
1014
+ } catch {
1015
+ P = null;
1016
+ }
1017
+ }
1018
+ function Pe(t) {
1019
+ return P === void 0 && _e(), P ? P.createHTML(t) : t;
1020
+ }
1021
+ const _t = {
1022
+ ...bt,
1023
+ inline: !1
1024
+ }, je = {
1025
+ xmlns: "http://www.w3.org/2000/svg",
1026
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
1027
+ "aria-hidden": !0,
1028
+ role: "img"
1029
+ }, Ee = {
1030
+ display: "inline-block"
1031
+ }, K = {
1032
+ backgroundColor: "currentColor"
1033
+ }, Pt = {
1034
+ backgroundColor: "transparent"
1035
+ }, at = {
1036
+ Image: "var(--svg)",
1037
+ Repeat: "no-repeat",
1038
+ Size: "100% 100%"
1039
+ }, ut = {
1040
+ WebkitMask: K,
1041
+ mask: K,
1042
+ background: Pt
1043
+ };
1044
+ for (const t in ut) {
1045
+ const e = ut[t];
1046
+ for (const n in at)
1047
+ e[t + n] = at[n];
1048
+ }
1049
+ const Le = {
1050
+ ..._t,
1051
+ inline: !0
1052
+ };
1053
+ function dt(t) {
1054
+ return t + (t.match(/^[-0-9.]+$/) ? "px" : "");
1055
+ }
1056
+ const Me = (t, e, n, r) => {
1057
+ const o = n ? Le : _t, i = we(o, e), s = e.mode || "svg", c = {}, l = e.style || {}, f = {
1058
+ ...s === "svg" ? je : {},
1059
+ ref: r
1060
+ };
1061
+ for (let m in e) {
1062
+ const u = e[m];
1063
+ if (u !== void 0)
1064
+ switch (m) {
1065
+ case "icon":
1066
+ case "style":
1067
+ case "children":
1068
+ case "onLoad":
1069
+ case "mode":
1070
+ case "_ref":
1071
+ case "_inline":
1072
+ break;
1073
+ case "inline":
1074
+ case "hFlip":
1075
+ case "vFlip":
1076
+ i[m] = u === !0 || u === "true" || u === 1;
1077
+ break;
1078
+ case "flip":
1079
+ typeof u == "string" && Ie(i, u);
1080
+ break;
1081
+ case "color":
1082
+ c.color = u;
1083
+ break;
1084
+ case "rotate":
1085
+ typeof u == "string" ? i[m] = Se(u) : typeof u == "number" && (i[m] = u);
1086
+ break;
1087
+ case "ariaHidden":
1088
+ case "aria-hidden":
1089
+ u !== !0 && u !== "true" && delete f["aria-hidden"];
1090
+ break;
1091
+ default:
1092
+ o[m] === void 0 && (f[m] = u);
1093
+ }
1094
+ }
1095
+ const a = Qt(t, i), d = a.attributes;
1096
+ if (i.inline && (c.verticalAlign = "-0.125em"), s === "svg") {
1097
+ f.style = {
1098
+ ...c,
1099
+ ...l
1100
+ }, Object.assign(f, d);
1101
+ let m = 0, u = e.id;
1102
+ return typeof u == "string" && (u = u.replace(/-/g, "_")), f.dangerouslySetInnerHTML = {
1103
+ __html: Pe(Kt(a.body, u ? () => u + "ID" + m++ : "iconifyReact"))
1104
+ }, I.createElement("svg", f);
1105
+ }
1106
+ const { body: p, width: y, height: w } = t, g = s === "mask" || (s === "bg" ? !1 : p.indexOf("currentColor") !== -1), C = ve(p, {
1107
+ ...d,
1108
+ width: y + "",
1109
+ height: w + ""
1110
+ });
1111
+ return f.style = {
1112
+ ...c,
1113
+ "--svg": Te(C),
1114
+ width: dt(d.width),
1115
+ height: dt(d.height),
1116
+ ...Ee,
1117
+ ...g ? K : Pt,
1118
+ ...l
1119
+ }, I.createElement("span", f);
1120
+ };
1121
+ mt(!0);
1122
+ Wt("", ne);
1123
+ if (typeof document < "u" && typeof window < "u") {
1124
+ Tt();
1125
+ const t = window;
1126
+ if (t.IconifyPreload !== void 0) {
1127
+ const e = t.IconifyPreload, n = "Invalid IconifyPreload syntax.";
1128
+ typeof e == "object" && e !== null && (e instanceof Array ? e : [e]).forEach((r) => {
1129
+ try {
1130
+ // Check if item is an object and not null/array
1131
+ (typeof r != "object" || r === null || r instanceof Array || // Check for 'icons' and 'prefix'
1132
+ typeof r.icons != "object" || typeof r.prefix != "string" || // Add icon set
1133
+ !Ht(r)) && console.error(n);
1134
+ } catch {
1135
+ console.error(n);
1136
+ }
1137
+ });
1138
+ }
1139
+ if (t.IconifyProviders !== void 0) {
1140
+ const e = t.IconifyProviders;
1141
+ if (typeof e == "object" && e !== null)
1142
+ for (let n in e) {
1143
+ const r = "IconifyProviders[" + n + "] is invalid.";
1144
+ try {
1145
+ const o = e[n];
1146
+ if (typeof o != "object" || !o || o.resources === void 0)
1147
+ continue;
1148
+ Gt(n, o) || console.error(r);
1149
+ } catch {
1150
+ console.error(r);
1151
+ }
1152
+ }
1153
+ }
1154
+ }
1155
+ class jt extends I.Component {
1156
+ constructor(e) {
1157
+ super(e), this.state = {
1158
+ // Render placeholder before component is mounted
1159
+ icon: null
1160
+ };
1161
+ }
1162
+ /**
1163
+ * Abort loading icon
1164
+ */
1165
+ _abortLoading() {
1166
+ this._loading && (this._loading.abort(), this._loading = null);
1167
+ }
1168
+ /**
1169
+ * Update state
1170
+ */
1171
+ _setData(e) {
1172
+ this.state.icon !== e && this.setState({
1173
+ icon: e
1174
+ });
1175
+ }
1176
+ /**
1177
+ * Check if icon should be loaded
1178
+ */
1179
+ _checkIcon(e) {
1180
+ const n = this.state, r = this.props.icon;
1181
+ if (typeof r == "object" && r !== null && typeof r.body == "string") {
1182
+ this._icon = "", this._abortLoading(), (e || n.icon === null) && this._setData({
1183
+ data: r
1184
+ });
1185
+ return;
1186
+ }
1187
+ let o;
1188
+ if (typeof r != "string" || (o = D(r, !1, !0)) === null) {
1189
+ this._abortLoading(), this._setData(null);
1190
+ return;
1191
+ }
1192
+ const i = Nt(o);
1193
+ if (!i) {
1194
+ (!this._loading || this._loading.name !== r) && (this._abortLoading(), this._icon = "", this._setData(null), i !== null && (this._loading = {
1195
+ name: r,
1196
+ abort: be([o], this._checkIcon.bind(this, !1))
1197
+ }));
1198
+ return;
1199
+ }
1200
+ if (this._icon !== r || n.icon === null) {
1201
+ this._abortLoading(), this._icon = r;
1202
+ const s = ["iconify"];
1203
+ o.prefix !== "" && s.push("iconify--" + o.prefix), o.provider !== "" && s.push("iconify--" + o.provider), this._setData({
1204
+ data: i,
1205
+ classes: s
1206
+ }), this.props.onLoad && this.props.onLoad(r);
1207
+ }
1208
+ }
1209
+ /**
1210
+ * Component mounted
1211
+ */
1212
+ componentDidMount() {
1213
+ this._checkIcon(!1);
1214
+ }
1215
+ /**
1216
+ * Component updated
1217
+ */
1218
+ componentDidUpdate(e) {
1219
+ e.icon !== this.props.icon && this._checkIcon(!0);
1220
+ }
1221
+ /**
1222
+ * Abort loading
1223
+ */
1224
+ componentWillUnmount() {
1225
+ this._abortLoading();
1226
+ }
1227
+ /**
1228
+ * Render
1229
+ */
1230
+ render() {
1231
+ const e = this.props, n = this.state.icon;
1232
+ if (n === null)
1233
+ return e.children ? e.children : I.createElement("span", {});
1234
+ let r = e;
1235
+ return n.classes && (r = {
1236
+ ...e,
1237
+ className: (typeof e.className == "string" ? e.className + " " : "") + n.classes.join(" ")
1238
+ }), Me({
1239
+ ...W,
1240
+ ...n.data
1241
+ }, r, e._inline, e._ref);
1242
+ }
1243
+ }
1244
+ const Fe = I.forwardRef(function(e, n) {
1245
+ const r = {
1246
+ ...e,
1247
+ _ref: n,
1248
+ _inline: !1
1249
+ };
1250
+ return I.createElement(jt, r);
1251
+ });
1252
+ I.forwardRef(function(e, n) {
1253
+ const r = {
1254
+ ...e,
1255
+ _ref: n,
1256
+ _inline: !0
1257
+ };
1258
+ return I.createElement(jt, r);
1259
+ });
1260
+ export {
1261
+ Fe as I,
1262
+ Gt as a
1263
+ };