@wfrog/vc-ui 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +3 -3
  2. package/dist/es/chunk/{OEa4tYPF.mjs → -ga82G_B.mjs} +1 -1
  3. package/dist/es/chunk/B1BnPYNG.mjs +163 -0
  4. package/dist/es/chunk/{DFOLES4O.mjs → BA2yoAwy.mjs} +403 -502
  5. package/dist/es/chunk/{BpqBBo4z.mjs → BDyXj_90.mjs} +2 -2
  6. package/dist/es/chunk/{BI0vrXwX.mjs → BI-fNJhk.mjs} +6 -3
  7. package/dist/es/chunk/{BsGCX4td.mjs → BK4T_2ha.mjs} +1 -1
  8. package/dist/es/chunk/{73YgKz3H.mjs → BLLKi_0v.mjs} +1 -1
  9. package/dist/es/chunk/{DTLPXrjb.mjs → BTsEMnf_.mjs} +1 -1
  10. package/dist/es/chunk/{B5UQmWXg.mjs → BUf50Y7Y.mjs} +41 -21
  11. package/dist/es/chunk/{BzedaLtg.mjs → BYVaz5Or.mjs} +2 -2
  12. package/dist/es/chunk/BaJ7k5Lg.mjs +209 -0
  13. package/dist/es/chunk/{Bp9jXKX0.mjs → BambM7zX.mjs} +2 -2
  14. package/dist/es/chunk/{CizMbf5K.mjs → Bl0WQiki.mjs} +1 -1
  15. package/dist/es/chunk/{CLbj8G-F.mjs → Bnot0Gwc.mjs} +12 -4
  16. package/dist/es/chunk/{4eyJqDa9.mjs → BoGGHTrJ.mjs} +4 -2
  17. package/dist/es/chunk/C7Dgjpd1.mjs +242 -0
  18. package/dist/es/chunk/{D0LB3gF-.mjs → CKbkzlkO.mjs} +104 -72
  19. package/dist/es/chunk/{DrgvuOYH.mjs → CL5WTCB3.mjs} +4 -2
  20. package/dist/es/chunk/{XwSiBVsA.mjs → CM_I1FoA.mjs} +2 -2
  21. package/dist/es/chunk/{DouIsSPi.mjs → CNILa-hz.mjs} +1 -1
  22. package/dist/es/chunk/{DRoyW749.mjs → CcKUdl3e.mjs} +12 -6
  23. package/dist/es/chunk/CidLkmft.mjs +188 -0
  24. package/dist/es/chunk/{HAog8AWU.mjs → CitH0taR.mjs} +816 -539
  25. package/dist/es/chunk/{Cu6erWl4.mjs → CzqeSQn4.mjs} +73 -38
  26. package/dist/es/chunk/{CLCfXfvv.mjs → D7JQbDFE.mjs} +154 -118
  27. package/dist/es/chunk/{DaCDeO95.mjs → D9iEroQw.mjs} +1 -207
  28. package/dist/es/chunk/{cPBw23yt.mjs → DEPZhJ0Z.mjs} +21 -16
  29. package/dist/es/chunk/{CPERtDRX.mjs → DHpbQMGk.mjs} +32 -22
  30. package/dist/es/chunk/{BHsNc7jl.mjs → DKpRXDRE.mjs} +82 -55
  31. package/dist/es/chunk/{CLMc8GzD.mjs → DMYHOxhk.mjs} +462 -311
  32. package/dist/es/chunk/{CBSopeeE.mjs → DQHGjqG5.mjs} +9 -4
  33. package/dist/es/chunk/DTEM_vYZ.mjs +23 -0
  34. package/dist/es/chunk/{NQBKROII.mjs → DWcIzeMM.mjs} +1 -1
  35. package/dist/es/chunk/{FHvLvzEB.mjs → DX38FfmL.mjs} +1088 -697
  36. package/dist/es/chunk/{DZD-YnCt.mjs → Dcm-lOj8.mjs} +4 -4
  37. package/dist/es/chunk/{09Ec85_u.mjs → DdmNdV7I.mjs} +398 -278
  38. package/dist/es/chunk/{f0-vIQGp.mjs → DfHTA5LW.mjs} +3 -3
  39. package/dist/es/chunk/DgFT6snA.mjs +835 -0
  40. package/dist/es/chunk/{DwKWIlzw.mjs → DgSzI6Fw.mjs} +106 -71
  41. package/dist/es/chunk/{BcTuAX8r.mjs → Dsye5ZEp.mjs} +5 -3
  42. package/dist/es/chunk/{BsLJxiSC.mjs → Dw-yyl2m.mjs} +1 -1
  43. package/dist/es/chunk/{DXPWe_a5.mjs → U13Qpiki.mjs} +19 -13
  44. package/dist/es/chunk/{axpwSky6.mjs → _8u_XVHh.mjs} +168 -120
  45. package/dist/es/chunk/egk9EEzo.mjs +66 -0
  46. package/dist/es/chunk/{BUEEWLrd.mjs → ezK_XQQd.mjs} +15 -6
  47. package/dist/es/chunk/{Bl2KlMdP.mjs → oW98L-44.mjs} +8 -3
  48. package/dist/es/chunk/{Dk6Bx0KT.mjs → plK2vnjp.mjs} +8 -5
  49. package/dist/es/components/awesome-icon/awesome-icon.mjs +2 -1
  50. package/dist/es/components/backbottom/backbottom.mjs +2 -2
  51. package/dist/es/components/button/button.mjs +105 -76
  52. package/dist/es/components/choice/choice.mjs +2 -2
  53. package/dist/es/components/config-provider/config-provider.d.ts +1 -0
  54. package/dist/es/components/config-provider/config-provider.mjs +13 -5
  55. package/dist/es/components/cropper/cropper.mjs +44 -33
  56. package/dist/es/components/currency/currency.mjs +5 -5
  57. package/dist/es/components/daterange-picker/daterange-picker.mjs +2267 -1522
  58. package/dist/es/components/dialog/dialog.mjs +213 -172
  59. package/dist/es/components/dialog/index.css +1 -1
  60. package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +11 -11
  61. package/dist/es/components/dialog-map-point/dialog-map-point.mjs +5 -4
  62. package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +495 -314
  63. package/dist/es/components/dialog-upload-images/index.css +1 -1
  64. package/dist/es/components/drag-verify/drag-verify.mjs +3 -3
  65. package/dist/es/components/drawer/drawer.mjs +136 -94
  66. package/dist/es/components/drawer/index.css +1 -1
  67. package/dist/es/components/easy-pagination/easy-pagination.mjs +2 -2
  68. package/dist/es/components/el-icon/el-icon.mjs +1 -1
  69. package/dist/es/components/el-icon/index.css +3 -2
  70. package/dist/es/components/flag/flag.mjs +2 -1
  71. package/dist/es/components/icon/icon.mjs +10 -31
  72. package/dist/es/components/icon/icon.vue.d.ts +1 -1
  73. package/dist/es/components/icon/icon2.mjs +1 -1
  74. package/dist/es/components/icon/index.mjs +2 -2
  75. package/dist/es/components/icon-picker/components/collections.vue.d.ts +625 -0
  76. package/dist/es/components/icon-picker/components/panel.vue.d.ts +9 -0
  77. package/dist/es/components/icon-picker/icon-picker.d.ts +40 -0
  78. package/dist/es/components/icon-picker/icon-picker.mjs +1375 -0
  79. package/dist/es/components/icon-picker/icon-picker.vue.d.ts +9 -0
  80. package/dist/es/components/icon-picker/index.css +121 -0
  81. package/dist/es/components/icon-picker/index.d.ts +4 -0
  82. package/dist/es/components/icon-picker/index.mjs +6 -0
  83. package/dist/es/components/iconify-icon/iconify-icon.d.ts +5 -0
  84. package/dist/es/components/iconify-icon/iconify-icon.mjs +1860 -0
  85. package/dist/es/components/iconify-icon/iconify-icon.vue.d.ts +6 -0
  86. package/dist/es/components/iconify-icon/index.css +11 -0
  87. package/dist/es/components/iconify-icon/index.d.ts +4 -0
  88. package/dist/es/components/iconify-icon/index.mjs +6 -0
  89. package/dist/es/components/image/image.mjs +5 -5
  90. package/dist/es/components/input/input.mjs +4 -4
  91. package/dist/es/components/input/input.vue.d.ts +63 -54
  92. package/dist/es/components/input-number/input-number.mjs +5 -5
  93. package/dist/es/components/pca-picker/components/c.vue.d.ts +4 -4
  94. package/dist/es/components/pca-picker/index.css +1 -1
  95. package/dist/es/components/pca-picker/pca-picker.mjs +154 -160
  96. package/dist/es/components/pca-picker/pca-picker.vue.d.ts +12 -11
  97. package/dist/es/components/qr-code/qr-code.mjs +2 -1
  98. package/dist/es/components/screenfull/screenfull.mjs +6 -5
  99. package/dist/es/components/scrollbar/index.css +18 -0
  100. package/dist/es/components/scrollbar/index.d.ts +4 -0
  101. package/dist/es/components/scrollbar/index.mjs +6 -0
  102. package/dist/es/components/scrollbar/scrollbar.d.ts +4 -0
  103. package/dist/es/components/scrollbar/scrollbar.mjs +65 -0
  104. package/dist/es/components/scrollbar/scrollbar.vue.d.ts +588 -0
  105. package/dist/es/components/select/select.mjs +7 -7
  106. package/dist/es/components/single-player/index.css +1 -1
  107. package/dist/es/components/single-player/single-player.mjs +265 -166
  108. package/dist/es/components/svg-icon/index.css +3 -2
  109. package/dist/es/components/svg-icon/svg-icon.mjs +3 -3
  110. package/dist/es/components/switch/switch.mjs +2 -2
  111. package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +2 -2
  112. package/dist/es/components/tags/tags.mjs +9 -9
  113. package/dist/es/components/text-ellipsis/text-ellipsis.mjs +4 -4
  114. package/dist/es/components/thousand-input/thousand-input.mjs +5 -4
  115. package/dist/es/components/thousand-input/thousand-input.vue.d.ts +126 -108
  116. package/dist/es/components/tinymce/index.css +1 -1
  117. package/dist/es/components/tinymce/tinymce.mjs +9 -8
  118. package/dist/es/components/tree-picker/components/popover-cascader.vue.d.ts +179 -141
  119. package/dist/es/components/tree-picker/popover-cascader.css +1 -1
  120. package/dist/es/components/tree-picker/tree-picker.mjs +10 -10
  121. package/dist/es/components/tree-picker/tree-picker.vue.d.ts +12 -11
  122. package/dist/es/components/upload-file/upload-file.mjs +3 -3
  123. package/dist/es/index.d.ts +3 -0
  124. package/dist/es/index.mjs +41 -31
  125. package/dist/global.d.ts +3 -0
  126. package/dist/index.css +166 -22
  127. package/package.json +8 -2
  128. package/dist/es/chunk/BtTIs3tG.mjs +0 -138
  129. package/dist/es/chunk/C7wQNvSS.mjs +0 -728
  130. package/dist/es/chunk/Cbhe4I9Z.mjs +0 -16
  131. package/dist/es/chunk/DihosKp1.mjs +0 -140
  132. package/dist/es/components/icon/index.css +0 -9
@@ -0,0 +1,1860 @@
1
+ import './index.css'
2
+ import { defineComponent, ref, shallowRef, onMounted, watch, onUnmounted, h, nextTick, computed, createBlock, openBlock, unref, normalizeStyle, normalizeClass } from 'vue';
3
+ import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
4
+
5
+ const matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;
6
+ const stringToIcon = (value, validate, allowSimpleName, provider = "") => {
7
+ const colonSeparated = value.split(":");
8
+ if (value.slice(0, 1) === "@") {
9
+ if (colonSeparated.length < 2 || colonSeparated.length > 3) {
10
+ return null;
11
+ }
12
+ provider = colonSeparated.shift().slice(1);
13
+ }
14
+ if (colonSeparated.length > 3 || !colonSeparated.length) {
15
+ return null;
16
+ }
17
+ if (colonSeparated.length > 1) {
18
+ const name2 = colonSeparated.pop();
19
+ const prefix = colonSeparated.pop();
20
+ const result = {
21
+ // Allow provider without '@': "provider:prefix:name"
22
+ provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,
23
+ prefix,
24
+ name: name2
25
+ };
26
+ return validate && !validateIconName(result) ? null : result;
27
+ }
28
+ const name = colonSeparated[0];
29
+ const dashSeparated = name.split("-");
30
+ if (dashSeparated.length > 1) {
31
+ const result = {
32
+ provider,
33
+ prefix: dashSeparated.shift(),
34
+ name: dashSeparated.join("-")
35
+ };
36
+ return validate && !validateIconName(result) ? null : result;
37
+ }
38
+ if (allowSimpleName && provider === "") {
39
+ const result = {
40
+ provider,
41
+ prefix: "",
42
+ name
43
+ };
44
+ return validate && !validateIconName(result, allowSimpleName) ? null : result;
45
+ }
46
+ return null;
47
+ };
48
+ const validateIconName = (icon, allowSimpleName) => {
49
+ if (!icon) {
50
+ return false;
51
+ }
52
+ return !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
53
+ // Check name: cannot be empty
54
+ ((allowSimpleName && icon.prefix === "" || !!icon.prefix) && !!icon.name);
55
+ };
56
+
57
+ const defaultIconDimensions = Object.freeze(
58
+ {
59
+ left: 0,
60
+ top: 0,
61
+ width: 16,
62
+ height: 16
63
+ }
64
+ );
65
+ const defaultIconTransformations = Object.freeze({
66
+ rotate: 0,
67
+ vFlip: false,
68
+ hFlip: false
69
+ });
70
+ const defaultIconProps = Object.freeze({
71
+ ...defaultIconDimensions,
72
+ ...defaultIconTransformations
73
+ });
74
+ const defaultExtendedIconProps = Object.freeze({
75
+ ...defaultIconProps,
76
+ body: "",
77
+ hidden: false
78
+ });
79
+
80
+ function mergeIconTransformations(obj1, obj2) {
81
+ const result = {};
82
+ if (!obj1.hFlip !== !obj2.hFlip) {
83
+ result.hFlip = true;
84
+ }
85
+ if (!obj1.vFlip !== !obj2.vFlip) {
86
+ result.vFlip = true;
87
+ }
88
+ const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;
89
+ if (rotate) {
90
+ result.rotate = rotate;
91
+ }
92
+ return result;
93
+ }
94
+
95
+ function mergeIconData(parent, child) {
96
+ const result = mergeIconTransformations(parent, child);
97
+ for (const key in defaultExtendedIconProps) {
98
+ if (key in defaultIconTransformations) {
99
+ if (key in parent && !(key in result)) {
100
+ result[key] = defaultIconTransformations[key];
101
+ }
102
+ } else if (key in child) {
103
+ result[key] = child[key];
104
+ } else if (key in parent) {
105
+ result[key] = parent[key];
106
+ }
107
+ }
108
+ return result;
109
+ }
110
+
111
+ function getIconsTree(data, names) {
112
+ const icons = data.icons;
113
+ const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
114
+ const resolved = /* @__PURE__ */ Object.create(null);
115
+ function resolve(name) {
116
+ if (icons[name]) {
117
+ return resolved[name] = [];
118
+ }
119
+ if (!(name in resolved)) {
120
+ resolved[name] = null;
121
+ const parent = aliases[name] && aliases[name].parent;
122
+ const value = parent && resolve(parent);
123
+ if (value) {
124
+ resolved[name] = [parent].concat(value);
125
+ }
126
+ }
127
+ return resolved[name];
128
+ }
129
+ (Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);
130
+ return resolved;
131
+ }
132
+
133
+ function internalGetIconData(data, name, tree) {
134
+ const icons = data.icons;
135
+ const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
136
+ let currentProps = {};
137
+ function parse(name2) {
138
+ currentProps = mergeIconData(
139
+ icons[name2] || aliases[name2],
140
+ currentProps
141
+ );
142
+ }
143
+ parse(name);
144
+ tree.forEach(parse);
145
+ return mergeIconData(data, currentProps);
146
+ }
147
+
148
+ function parseIconSet(data, callback) {
149
+ const names = [];
150
+ if (typeof data !== "object" || typeof data.icons !== "object") {
151
+ return names;
152
+ }
153
+ if (data.not_found instanceof Array) {
154
+ data.not_found.forEach((name) => {
155
+ callback(name, null);
156
+ names.push(name);
157
+ });
158
+ }
159
+ const tree = getIconsTree(data);
160
+ for (const name in tree) {
161
+ const item = tree[name];
162
+ if (item) {
163
+ callback(name, internalGetIconData(data, name, item));
164
+ names.push(name);
165
+ }
166
+ }
167
+ return names;
168
+ }
169
+
170
+ const optionalPropertyDefaults = {
171
+ provider: "",
172
+ aliases: {},
173
+ not_found: {},
174
+ ...defaultIconDimensions
175
+ };
176
+ function checkOptionalProps(item, defaults) {
177
+ for (const prop in defaults) {
178
+ if (prop in item && typeof item[prop] !== typeof defaults[prop]) {
179
+ return false;
180
+ }
181
+ }
182
+ return true;
183
+ }
184
+ function quicklyValidateIconSet(obj) {
185
+ if (typeof obj !== "object" || obj === null) {
186
+ return null;
187
+ }
188
+ const data = obj;
189
+ if (typeof data.prefix !== "string" || !obj.icons || typeof obj.icons !== "object") {
190
+ return null;
191
+ }
192
+ if (!checkOptionalProps(obj, optionalPropertyDefaults)) {
193
+ return null;
194
+ }
195
+ const icons = data.icons;
196
+ for (const name in icons) {
197
+ const icon = icons[name];
198
+ if (
199
+ // Name cannot be empty
200
+ !name || // Must have body
201
+ typeof icon.body !== "string" || // Check other props
202
+ !checkOptionalProps(
203
+ icon,
204
+ defaultExtendedIconProps
205
+ )
206
+ ) {
207
+ return null;
208
+ }
209
+ }
210
+ const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
211
+ for (const name in aliases) {
212
+ const icon = aliases[name];
213
+ const parent = icon.parent;
214
+ if (
215
+ // Name cannot be empty
216
+ !name || // Parent must be set and point to existing icon
217
+ typeof parent !== "string" || !icons[parent] && !aliases[parent] || // Check other props
218
+ !checkOptionalProps(
219
+ icon,
220
+ defaultExtendedIconProps
221
+ )
222
+ ) {
223
+ return null;
224
+ }
225
+ }
226
+ return data;
227
+ }
228
+
229
+ const dataStorage = /* @__PURE__ */ Object.create(null);
230
+ function newStorage(provider, prefix) {
231
+ return {
232
+ provider,
233
+ prefix,
234
+ icons: /* @__PURE__ */ Object.create(null),
235
+ missing: /* @__PURE__ */ new Set()
236
+ };
237
+ }
238
+ function getStorage(provider, prefix) {
239
+ const providerStorage = dataStorage[provider] || (dataStorage[provider] = /* @__PURE__ */ Object.create(null));
240
+ return providerStorage[prefix] || (providerStorage[prefix] = newStorage(provider, prefix));
241
+ }
242
+ function addIconSet(storage, data) {
243
+ if (!quicklyValidateIconSet(data)) {
244
+ return [];
245
+ }
246
+ return parseIconSet(data, (name, icon) => {
247
+ if (icon) {
248
+ storage.icons[name] = icon;
249
+ } else {
250
+ storage.missing.add(name);
251
+ }
252
+ });
253
+ }
254
+ function addIconToStorage(storage, name, icon) {
255
+ try {
256
+ if (typeof icon.body === "string") {
257
+ storage.icons[name] = { ...icon };
258
+ return true;
259
+ }
260
+ } catch (err) {
261
+ }
262
+ return false;
263
+ }
264
+
265
+ let simpleNames = false;
266
+ function allowSimpleNames(allow) {
267
+ if (typeof allow === "boolean") {
268
+ simpleNames = allow;
269
+ }
270
+ return simpleNames;
271
+ }
272
+ function getIconData(name) {
273
+ const icon = typeof name === "string" ? stringToIcon(name, true, simpleNames) : name;
274
+ if (icon) {
275
+ const storage = getStorage(icon.provider, icon.prefix);
276
+ const iconName = icon.name;
277
+ return storage.icons[iconName] || (storage.missing.has(iconName) ? null : void 0);
278
+ }
279
+ }
280
+ function addIcon(name, data) {
281
+ const icon = stringToIcon(name, true, simpleNames);
282
+ if (!icon) {
283
+ return false;
284
+ }
285
+ const storage = getStorage(icon.provider, icon.prefix);
286
+ if (data) {
287
+ return addIconToStorage(storage, icon.name, data);
288
+ } else {
289
+ storage.missing.add(icon.name);
290
+ return true;
291
+ }
292
+ }
293
+ function addCollection(data, provider) {
294
+ if (typeof data !== "object") {
295
+ return false;
296
+ }
297
+ if (typeof provider !== "string") {
298
+ provider = data.provider || "";
299
+ }
300
+ if (simpleNames && !provider && !data.prefix) {
301
+ let added = false;
302
+ if (quicklyValidateIconSet(data)) {
303
+ data.prefix = "";
304
+ parseIconSet(data, (name, icon) => {
305
+ if (addIcon(name, icon)) {
306
+ added = true;
307
+ }
308
+ });
309
+ }
310
+ return added;
311
+ }
312
+ const prefix = data.prefix;
313
+ if (!validateIconName({
314
+ prefix,
315
+ name: "a"
316
+ })) {
317
+ return false;
318
+ }
319
+ const storage = getStorage(provider, prefix);
320
+ return !!addIconSet(storage, data);
321
+ }
322
+
323
+ const defaultIconSizeCustomisations = Object.freeze({
324
+ width: null,
325
+ height: null
326
+ });
327
+ const defaultIconCustomisations = Object.freeze({
328
+ // Dimensions
329
+ ...defaultIconSizeCustomisations,
330
+ // Transformations
331
+ ...defaultIconTransformations
332
+ });
333
+
334
+ const unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
335
+ const unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
336
+ function calculateSize(size, ratio, precision) {
337
+ if (ratio === 1) {
338
+ return size;
339
+ }
340
+ precision = precision || 100;
341
+ if (typeof size === "number") {
342
+ return Math.ceil(size * ratio * precision) / precision;
343
+ }
344
+ if (typeof size !== "string") {
345
+ return size;
346
+ }
347
+ const oldParts = size.split(unitsSplit);
348
+ if (oldParts === null || !oldParts.length) {
349
+ return size;
350
+ }
351
+ const newParts = [];
352
+ let code = oldParts.shift();
353
+ let isNumber = unitsTest.test(code);
354
+ while (true) {
355
+ if (isNumber) {
356
+ const num = parseFloat(code);
357
+ if (isNaN(num)) {
358
+ newParts.push(code);
359
+ } else {
360
+ newParts.push(Math.ceil(num * ratio * precision) / precision);
361
+ }
362
+ } else {
363
+ newParts.push(code);
364
+ }
365
+ code = oldParts.shift();
366
+ if (code === void 0) {
367
+ return newParts.join("");
368
+ }
369
+ isNumber = !isNumber;
370
+ }
371
+ }
372
+
373
+ function splitSVGDefs(content, tag = "defs") {
374
+ let defs = "";
375
+ const index = content.indexOf("<" + tag);
376
+ while (index >= 0) {
377
+ const start = content.indexOf(">", index);
378
+ const end = content.indexOf("</" + tag);
379
+ if (start === -1 || end === -1) {
380
+ break;
381
+ }
382
+ const endEnd = content.indexOf(">", end);
383
+ if (endEnd === -1) {
384
+ break;
385
+ }
386
+ defs += content.slice(start + 1, end).trim();
387
+ content = content.slice(0, index).trim() + content.slice(endEnd + 1);
388
+ }
389
+ return {
390
+ defs,
391
+ content
392
+ };
393
+ }
394
+ function mergeDefsAndContent(defs, content) {
395
+ return defs ? "<defs>" + defs + "</defs>" + content : content;
396
+ }
397
+ function wrapSVGContent(body, start, end) {
398
+ const split = splitSVGDefs(body);
399
+ return mergeDefsAndContent(split.defs, start + split.content + end);
400
+ }
401
+
402
+ const isUnsetKeyword = (value) => value === "unset" || value === "undefined" || value === "none";
403
+ function iconToSVG(icon, customisations) {
404
+ const fullIcon = {
405
+ ...defaultIconProps,
406
+ ...icon
407
+ };
408
+ const fullCustomisations = {
409
+ ...defaultIconCustomisations,
410
+ ...customisations
411
+ };
412
+ const box = {
413
+ left: fullIcon.left,
414
+ top: fullIcon.top,
415
+ width: fullIcon.width,
416
+ height: fullIcon.height
417
+ };
418
+ let body = fullIcon.body;
419
+ [fullIcon, fullCustomisations].forEach((props) => {
420
+ const transformations = [];
421
+ const hFlip = props.hFlip;
422
+ const vFlip = props.vFlip;
423
+ let rotation = props.rotate;
424
+ if (hFlip) {
425
+ if (vFlip) {
426
+ rotation += 2;
427
+ } else {
428
+ transformations.push(
429
+ "translate(" + (box.width + box.left).toString() + " " + (0 - box.top).toString() + ")"
430
+ );
431
+ transformations.push("scale(-1 1)");
432
+ box.top = box.left = 0;
433
+ }
434
+ } else if (vFlip) {
435
+ transformations.push(
436
+ "translate(" + (0 - box.left).toString() + " " + (box.height + box.top).toString() + ")"
437
+ );
438
+ transformations.push("scale(1 -1)");
439
+ box.top = box.left = 0;
440
+ }
441
+ let tempValue;
442
+ if (rotation < 0) {
443
+ rotation -= Math.floor(rotation / 4) * 4;
444
+ }
445
+ rotation = rotation % 4;
446
+ switch (rotation) {
447
+ case 1:
448
+ tempValue = box.height / 2 + box.top;
449
+ transformations.unshift(
450
+ "rotate(90 " + tempValue.toString() + " " + tempValue.toString() + ")"
451
+ );
452
+ break;
453
+ case 2:
454
+ transformations.unshift(
455
+ "rotate(180 " + (box.width / 2 + box.left).toString() + " " + (box.height / 2 + box.top).toString() + ")"
456
+ );
457
+ break;
458
+ case 3:
459
+ tempValue = box.width / 2 + box.left;
460
+ transformations.unshift(
461
+ "rotate(-90 " + tempValue.toString() + " " + tempValue.toString() + ")"
462
+ );
463
+ break;
464
+ }
465
+ if (rotation % 2 === 1) {
466
+ if (box.left !== box.top) {
467
+ tempValue = box.left;
468
+ box.left = box.top;
469
+ box.top = tempValue;
470
+ }
471
+ if (box.width !== box.height) {
472
+ tempValue = box.width;
473
+ box.width = box.height;
474
+ box.height = tempValue;
475
+ }
476
+ }
477
+ if (transformations.length) {
478
+ body = wrapSVGContent(
479
+ body,
480
+ '<g transform="' + transformations.join(" ") + '">',
481
+ "</g>"
482
+ );
483
+ }
484
+ });
485
+ const customisationsWidth = fullCustomisations.width;
486
+ const customisationsHeight = fullCustomisations.height;
487
+ const boxWidth = box.width;
488
+ const boxHeight = box.height;
489
+ let width;
490
+ let height;
491
+ if (customisationsWidth === null) {
492
+ height = customisationsHeight === null ? "1em" : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
493
+ width = calculateSize(height, boxWidth / boxHeight);
494
+ } else {
495
+ width = customisationsWidth === "auto" ? boxWidth : customisationsWidth;
496
+ height = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
497
+ }
498
+ const attributes = {};
499
+ const setAttr = (prop, value) => {
500
+ if (!isUnsetKeyword(value)) {
501
+ attributes[prop] = value.toString();
502
+ }
503
+ };
504
+ setAttr("width", width);
505
+ setAttr("height", height);
506
+ const viewBox = [box.left, box.top, boxWidth, boxHeight];
507
+ attributes.viewBox = viewBox.join(" ");
508
+ return {
509
+ attributes,
510
+ viewBox,
511
+ body
512
+ };
513
+ }
514
+
515
+ const regex = /\sid="(\S+)"/g;
516
+ const randomPrefix = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
517
+ let counter = 0;
518
+ function replaceIDs(body, prefix = randomPrefix) {
519
+ const ids = [];
520
+ let match;
521
+ while (match = regex.exec(body)) {
522
+ ids.push(match[1]);
523
+ }
524
+ if (!ids.length) {
525
+ return body;
526
+ }
527
+ const suffix = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
528
+ ids.forEach((id) => {
529
+ const newID = typeof prefix === "function" ? prefix(id) : prefix + (counter++).toString();
530
+ const escapedID = id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
531
+ body = body.replace(
532
+ // Allowed characters before id: [#;"]
533
+ // Allowed characters after id: [)"], .[a-z]
534
+ new RegExp('([#;"])(' + escapedID + ')([")]|\\.[a-z])', "g"),
535
+ "$1" + newID + suffix + "$3"
536
+ );
537
+ });
538
+ body = body.replace(new RegExp(suffix, "g"), "");
539
+ return body;
540
+ }
541
+
542
+ const storage = /* @__PURE__ */ Object.create(null);
543
+ function setAPIModule(provider, item) {
544
+ storage[provider] = item;
545
+ }
546
+ function getAPIModule(provider) {
547
+ return storage[provider] || storage[""];
548
+ }
549
+
550
+ function createAPIConfig(source) {
551
+ let resources;
552
+ if (typeof source.resources === "string") {
553
+ resources = [source.resources];
554
+ } else {
555
+ resources = source.resources;
556
+ if (!(resources instanceof Array) || !resources.length) {
557
+ return null;
558
+ }
559
+ }
560
+ const result = {
561
+ // API hosts
562
+ resources,
563
+ // Root path
564
+ path: source.path || "/",
565
+ // URL length limit
566
+ maxURL: source.maxURL || 500,
567
+ // Timeout before next host is used.
568
+ rotate: source.rotate || 750,
569
+ // Timeout before failing query.
570
+ timeout: source.timeout || 5e3,
571
+ // Randomise default API end point.
572
+ random: source.random === true,
573
+ // Start index
574
+ index: source.index || 0,
575
+ // Receive data after time out (used if time out kicks in first, then API module sends data anyway).
576
+ dataAfterTimeout: source.dataAfterTimeout !== false
577
+ };
578
+ return result;
579
+ }
580
+ const configStorage = /* @__PURE__ */ Object.create(null);
581
+ const fallBackAPISources = [
582
+ "https://api.simplesvg.com",
583
+ "https://api.unisvg.com"
584
+ ];
585
+ const fallBackAPI = [];
586
+ while (fallBackAPISources.length > 0) {
587
+ if (fallBackAPISources.length === 1) {
588
+ fallBackAPI.push(fallBackAPISources.shift());
589
+ } else {
590
+ if (Math.random() > 0.5) {
591
+ fallBackAPI.push(fallBackAPISources.shift());
592
+ } else {
593
+ fallBackAPI.push(fallBackAPISources.pop());
594
+ }
595
+ }
596
+ }
597
+ configStorage[""] = createAPIConfig({
598
+ resources: ["https://api.iconify.design"].concat(fallBackAPI)
599
+ });
600
+ function addAPIProvider(provider, customConfig) {
601
+ const config = createAPIConfig(customConfig);
602
+ if (config === null) {
603
+ return false;
604
+ }
605
+ configStorage[provider] = config;
606
+ return true;
607
+ }
608
+ function getAPIConfig(provider) {
609
+ return configStorage[provider];
610
+ }
611
+
612
+ const detectFetch = () => {
613
+ let callback;
614
+ try {
615
+ callback = fetch;
616
+ if (typeof callback === "function") {
617
+ return callback;
618
+ }
619
+ } catch (err) {
620
+ }
621
+ };
622
+ let fetchModule = detectFetch();
623
+ function calculateMaxLength(provider, prefix) {
624
+ const config = getAPIConfig(provider);
625
+ if (!config) {
626
+ return 0;
627
+ }
628
+ let result;
629
+ if (!config.maxURL) {
630
+ result = 0;
631
+ } else {
632
+ let maxHostLength = 0;
633
+ config.resources.forEach((item) => {
634
+ const host = item;
635
+ maxHostLength = Math.max(maxHostLength, host.length);
636
+ });
637
+ const url = prefix + ".json?icons=";
638
+ result = config.maxURL - maxHostLength - config.path.length - url.length;
639
+ }
640
+ return result;
641
+ }
642
+ function shouldAbort(status) {
643
+ return status === 404;
644
+ }
645
+ const prepare = (provider, prefix, icons) => {
646
+ const results = [];
647
+ const maxLength = calculateMaxLength(provider, prefix);
648
+ const type = "icons";
649
+ let item = {
650
+ type,
651
+ provider,
652
+ prefix,
653
+ icons: []
654
+ };
655
+ let length = 0;
656
+ icons.forEach((name, index) => {
657
+ length += name.length + 1;
658
+ if (length >= maxLength && index > 0) {
659
+ results.push(item);
660
+ item = {
661
+ type,
662
+ provider,
663
+ prefix,
664
+ icons: []
665
+ };
666
+ length = name.length;
667
+ }
668
+ item.icons.push(name);
669
+ });
670
+ results.push(item);
671
+ return results;
672
+ };
673
+ function getPath(provider) {
674
+ if (typeof provider === "string") {
675
+ const config = getAPIConfig(provider);
676
+ if (config) {
677
+ return config.path;
678
+ }
679
+ }
680
+ return "/";
681
+ }
682
+ const send = (host, params, callback) => {
683
+ if (!fetchModule) {
684
+ callback("abort", 424);
685
+ return;
686
+ }
687
+ let path = getPath(params.provider);
688
+ switch (params.type) {
689
+ case "icons": {
690
+ const prefix = params.prefix;
691
+ const icons = params.icons;
692
+ const iconsList = icons.join(",");
693
+ const urlParams = new URLSearchParams({
694
+ icons: iconsList
695
+ });
696
+ path += prefix + ".json?" + urlParams.toString();
697
+ break;
698
+ }
699
+ case "custom": {
700
+ const uri = params.uri;
701
+ path += uri.slice(0, 1) === "/" ? uri.slice(1) : uri;
702
+ break;
703
+ }
704
+ default:
705
+ callback("abort", 400);
706
+ return;
707
+ }
708
+ let defaultError = 503;
709
+ fetchModule(host + path).then((response) => {
710
+ const status = response.status;
711
+ if (status !== 200) {
712
+ setTimeout(() => {
713
+ callback(shouldAbort(status) ? "abort" : "next", status);
714
+ });
715
+ return;
716
+ }
717
+ defaultError = 501;
718
+ return response.json();
719
+ }).then((data) => {
720
+ if (typeof data !== "object" || data === null) {
721
+ setTimeout(() => {
722
+ if (data === 404) {
723
+ callback("abort", data);
724
+ } else {
725
+ callback("next", defaultError);
726
+ }
727
+ });
728
+ return;
729
+ }
730
+ setTimeout(() => {
731
+ callback("success", data);
732
+ });
733
+ }).catch(() => {
734
+ callback("next", defaultError);
735
+ });
736
+ };
737
+ const fetchAPIModule = {
738
+ prepare,
739
+ send
740
+ };
741
+
742
+ function sortIcons(icons) {
743
+ const result = {
744
+ loaded: [],
745
+ missing: [],
746
+ pending: []
747
+ };
748
+ const storage = /* @__PURE__ */ Object.create(null);
749
+ icons.sort((a, b) => {
750
+ if (a.provider !== b.provider) {
751
+ return a.provider.localeCompare(b.provider);
752
+ }
753
+ if (a.prefix !== b.prefix) {
754
+ return a.prefix.localeCompare(b.prefix);
755
+ }
756
+ return a.name.localeCompare(b.name);
757
+ });
758
+ let lastIcon = {
759
+ provider: "",
760
+ prefix: "",
761
+ name: ""
762
+ };
763
+ icons.forEach((icon) => {
764
+ if (lastIcon.name === icon.name && lastIcon.prefix === icon.prefix && lastIcon.provider === icon.provider) {
765
+ return;
766
+ }
767
+ lastIcon = icon;
768
+ const provider = icon.provider;
769
+ const prefix = icon.prefix;
770
+ const name = icon.name;
771
+ const providerStorage = storage[provider] || (storage[provider] = /* @__PURE__ */ Object.create(null));
772
+ const localStorage = providerStorage[prefix] || (providerStorage[prefix] = getStorage(provider, prefix));
773
+ let list;
774
+ if (name in localStorage.icons) {
775
+ list = result.loaded;
776
+ } else if (prefix === "" || localStorage.missing.has(name)) {
777
+ list = result.missing;
778
+ } else {
779
+ list = result.pending;
780
+ }
781
+ const item = {
782
+ provider,
783
+ prefix,
784
+ name
785
+ };
786
+ list.push(item);
787
+ });
788
+ return result;
789
+ }
790
+
791
+ function removeCallback(storages, id) {
792
+ storages.forEach((storage) => {
793
+ const items = storage.loaderCallbacks;
794
+ if (items) {
795
+ storage.loaderCallbacks = items.filter((row) => row.id !== id);
796
+ }
797
+ });
798
+ }
799
+ function updateCallbacks(storage) {
800
+ if (!storage.pendingCallbacksFlag) {
801
+ storage.pendingCallbacksFlag = true;
802
+ setTimeout(() => {
803
+ storage.pendingCallbacksFlag = false;
804
+ const items = storage.loaderCallbacks ? storage.loaderCallbacks.slice(0) : [];
805
+ if (!items.length) {
806
+ return;
807
+ }
808
+ let hasPending = false;
809
+ const provider = storage.provider;
810
+ const prefix = storage.prefix;
811
+ items.forEach((item) => {
812
+ const icons = item.icons;
813
+ const oldLength = icons.pending.length;
814
+ icons.pending = icons.pending.filter((icon) => {
815
+ if (icon.prefix !== prefix) {
816
+ return true;
817
+ }
818
+ const name = icon.name;
819
+ if (storage.icons[name]) {
820
+ icons.loaded.push({
821
+ provider,
822
+ prefix,
823
+ name
824
+ });
825
+ } else if (storage.missing.has(name)) {
826
+ icons.missing.push({
827
+ provider,
828
+ prefix,
829
+ name
830
+ });
831
+ } else {
832
+ hasPending = true;
833
+ return true;
834
+ }
835
+ return false;
836
+ });
837
+ if (icons.pending.length !== oldLength) {
838
+ if (!hasPending) {
839
+ removeCallback([storage], item.id);
840
+ }
841
+ item.callback(
842
+ icons.loaded.slice(0),
843
+ icons.missing.slice(0),
844
+ icons.pending.slice(0),
845
+ item.abort
846
+ );
847
+ }
848
+ });
849
+ });
850
+ }
851
+ }
852
+ let idCounter = 0;
853
+ function storeCallback(callback, icons, pendingSources) {
854
+ const id = idCounter++;
855
+ const abort = removeCallback.bind(null, pendingSources, id);
856
+ if (!icons.pending.length) {
857
+ return abort;
858
+ }
859
+ const item = {
860
+ id,
861
+ icons,
862
+ callback,
863
+ abort
864
+ };
865
+ pendingSources.forEach((storage) => {
866
+ (storage.loaderCallbacks || (storage.loaderCallbacks = [])).push(item);
867
+ });
868
+ return abort;
869
+ }
870
+
871
+ function listToIcons(list, validate = true, simpleNames = false) {
872
+ const result = [];
873
+ list.forEach((item) => {
874
+ const icon = typeof item === "string" ? stringToIcon(item, validate, simpleNames) : item;
875
+ if (icon) {
876
+ result.push(icon);
877
+ }
878
+ });
879
+ return result;
880
+ }
881
+
882
+ // src/config.ts
883
+ var defaultConfig = {
884
+ resources: [],
885
+ index: 0,
886
+ timeout: 2e3,
887
+ rotate: 750,
888
+ random: false,
889
+ dataAfterTimeout: false
890
+ };
891
+
892
+ // src/query.ts
893
+ function sendQuery(config, payload, query, done) {
894
+ const resourcesCount = config.resources.length;
895
+ const startIndex = config.random ? Math.floor(Math.random() * resourcesCount) : config.index;
896
+ let resources;
897
+ if (config.random) {
898
+ let list = config.resources.slice(0);
899
+ resources = [];
900
+ while (list.length > 1) {
901
+ const nextIndex = Math.floor(Math.random() * list.length);
902
+ resources.push(list[nextIndex]);
903
+ list = list.slice(0, nextIndex).concat(list.slice(nextIndex + 1));
904
+ }
905
+ resources = resources.concat(list);
906
+ } else {
907
+ resources = config.resources.slice(startIndex).concat(config.resources.slice(0, startIndex));
908
+ }
909
+ const startTime = Date.now();
910
+ let status = "pending";
911
+ let queriesSent = 0;
912
+ let lastError;
913
+ let timer = null;
914
+ let queue = [];
915
+ let doneCallbacks = [];
916
+ if (typeof done === "function") {
917
+ doneCallbacks.push(done);
918
+ }
919
+ function resetTimer() {
920
+ if (timer) {
921
+ clearTimeout(timer);
922
+ timer = null;
923
+ }
924
+ }
925
+ function abort() {
926
+ if (status === "pending") {
927
+ status = "aborted";
928
+ }
929
+ resetTimer();
930
+ queue.forEach((item) => {
931
+ if (item.status === "pending") {
932
+ item.status = "aborted";
933
+ }
934
+ });
935
+ queue = [];
936
+ }
937
+ function subscribe(callback, overwrite) {
938
+ if (overwrite) {
939
+ doneCallbacks = [];
940
+ }
941
+ if (typeof callback === "function") {
942
+ doneCallbacks.push(callback);
943
+ }
944
+ }
945
+ function getQueryStatus() {
946
+ return {
947
+ startTime,
948
+ payload,
949
+ status,
950
+ queriesSent,
951
+ queriesPending: queue.length,
952
+ subscribe,
953
+ abort
954
+ };
955
+ }
956
+ function failQuery() {
957
+ status = "failed";
958
+ doneCallbacks.forEach((callback) => {
959
+ callback(void 0, lastError);
960
+ });
961
+ }
962
+ function clearQueue() {
963
+ queue.forEach((item) => {
964
+ if (item.status === "pending") {
965
+ item.status = "aborted";
966
+ }
967
+ });
968
+ queue = [];
969
+ }
970
+ function moduleResponse(item, response, data) {
971
+ const isError = response !== "success";
972
+ queue = queue.filter((queued) => queued !== item);
973
+ switch (status) {
974
+ case "pending":
975
+ break;
976
+ case "failed":
977
+ if (isError || !config.dataAfterTimeout) {
978
+ return;
979
+ }
980
+ break;
981
+ default:
982
+ return;
983
+ }
984
+ if (response === "abort") {
985
+ lastError = data;
986
+ failQuery();
987
+ return;
988
+ }
989
+ if (isError) {
990
+ lastError = data;
991
+ if (!queue.length) {
992
+ if (!resources.length) {
993
+ failQuery();
994
+ } else {
995
+ execNext();
996
+ }
997
+ }
998
+ return;
999
+ }
1000
+ resetTimer();
1001
+ clearQueue();
1002
+ if (!config.random) {
1003
+ const index = config.resources.indexOf(item.resource);
1004
+ if (index !== -1 && index !== config.index) {
1005
+ config.index = index;
1006
+ }
1007
+ }
1008
+ status = "completed";
1009
+ doneCallbacks.forEach((callback) => {
1010
+ callback(data);
1011
+ });
1012
+ }
1013
+ function execNext() {
1014
+ if (status !== "pending") {
1015
+ return;
1016
+ }
1017
+ resetTimer();
1018
+ const resource = resources.shift();
1019
+ if (resource === void 0) {
1020
+ if (queue.length) {
1021
+ timer = setTimeout(() => {
1022
+ resetTimer();
1023
+ if (status === "pending") {
1024
+ clearQueue();
1025
+ failQuery();
1026
+ }
1027
+ }, config.timeout);
1028
+ return;
1029
+ }
1030
+ failQuery();
1031
+ return;
1032
+ }
1033
+ const item = {
1034
+ status: "pending",
1035
+ resource,
1036
+ callback: (status2, data) => {
1037
+ moduleResponse(item, status2, data);
1038
+ }
1039
+ };
1040
+ queue.push(item);
1041
+ queriesSent++;
1042
+ timer = setTimeout(execNext, config.rotate);
1043
+ query(resource, payload, item.callback);
1044
+ }
1045
+ setTimeout(execNext);
1046
+ return getQueryStatus;
1047
+ }
1048
+
1049
+ // src/index.ts
1050
+ function initRedundancy(cfg) {
1051
+ const config = {
1052
+ ...defaultConfig,
1053
+ ...cfg
1054
+ };
1055
+ let queries = [];
1056
+ function cleanup() {
1057
+ queries = queries.filter((item) => item().status === "pending");
1058
+ }
1059
+ function query(payload, queryCallback, doneCallback) {
1060
+ const query2 = sendQuery(
1061
+ config,
1062
+ payload,
1063
+ queryCallback,
1064
+ (data, error) => {
1065
+ cleanup();
1066
+ if (doneCallback) {
1067
+ doneCallback(data, error);
1068
+ }
1069
+ }
1070
+ );
1071
+ queries.push(query2);
1072
+ return query2;
1073
+ }
1074
+ function find(callback) {
1075
+ return queries.find((value) => {
1076
+ return callback(value);
1077
+ }) || null;
1078
+ }
1079
+ const instance = {
1080
+ query,
1081
+ find,
1082
+ setIndex: (index) => {
1083
+ config.index = index;
1084
+ },
1085
+ getIndex: () => config.index,
1086
+ cleanup
1087
+ };
1088
+ return instance;
1089
+ }
1090
+
1091
+ function emptyCallback$1() {
1092
+ }
1093
+ const redundancyCache = /* @__PURE__ */ Object.create(null);
1094
+ function getRedundancyCache(provider) {
1095
+ if (!redundancyCache[provider]) {
1096
+ const config = getAPIConfig(provider);
1097
+ if (!config) {
1098
+ return;
1099
+ }
1100
+ const redundancy = initRedundancy(config);
1101
+ const cachedReundancy = {
1102
+ config,
1103
+ redundancy
1104
+ };
1105
+ redundancyCache[provider] = cachedReundancy;
1106
+ }
1107
+ return redundancyCache[provider];
1108
+ }
1109
+ function sendAPIQuery(target, query, callback) {
1110
+ let redundancy;
1111
+ let send;
1112
+ if (typeof target === "string") {
1113
+ const api = getAPIModule(target);
1114
+ if (!api) {
1115
+ callback(void 0, 424);
1116
+ return emptyCallback$1;
1117
+ }
1118
+ send = api.send;
1119
+ const cached = getRedundancyCache(target);
1120
+ if (cached) {
1121
+ redundancy = cached.redundancy;
1122
+ }
1123
+ } else {
1124
+ const config = createAPIConfig(target);
1125
+ if (config) {
1126
+ redundancy = initRedundancy(config);
1127
+ const moduleKey = target.resources ? target.resources[0] : "";
1128
+ const api = getAPIModule(moduleKey);
1129
+ if (api) {
1130
+ send = api.send;
1131
+ }
1132
+ }
1133
+ }
1134
+ if (!redundancy || !send) {
1135
+ callback(void 0, 424);
1136
+ return emptyCallback$1;
1137
+ }
1138
+ return redundancy.query(query, send, callback)().abort;
1139
+ }
1140
+
1141
+ function emptyCallback() {
1142
+ }
1143
+ function loadedNewIcons(storage) {
1144
+ if (!storage.iconsLoaderFlag) {
1145
+ storage.iconsLoaderFlag = true;
1146
+ setTimeout(() => {
1147
+ storage.iconsLoaderFlag = false;
1148
+ updateCallbacks(storage);
1149
+ });
1150
+ }
1151
+ }
1152
+ function checkIconNamesForAPI(icons) {
1153
+ const valid = [];
1154
+ const invalid = [];
1155
+ icons.forEach((name) => {
1156
+ (name.match(matchIconName) ? valid : invalid).push(name);
1157
+ });
1158
+ return {
1159
+ valid,
1160
+ invalid
1161
+ };
1162
+ }
1163
+ function parseLoaderResponse(storage, icons, data) {
1164
+ function checkMissing() {
1165
+ const pending = storage.pendingIcons;
1166
+ icons.forEach((name) => {
1167
+ if (pending) {
1168
+ pending.delete(name);
1169
+ }
1170
+ if (!storage.icons[name]) {
1171
+ storage.missing.add(name);
1172
+ }
1173
+ });
1174
+ }
1175
+ if (data && typeof data === "object") {
1176
+ try {
1177
+ const parsed = addIconSet(storage, data);
1178
+ if (!parsed.length) {
1179
+ checkMissing();
1180
+ return;
1181
+ }
1182
+ } catch (err) {
1183
+ console.error(err);
1184
+ }
1185
+ }
1186
+ checkMissing();
1187
+ loadedNewIcons(storage);
1188
+ }
1189
+ function parsePossiblyAsyncResponse(response, callback) {
1190
+ if (response instanceof Promise) {
1191
+ response.then((data) => {
1192
+ callback(data);
1193
+ }).catch(() => {
1194
+ callback(null);
1195
+ });
1196
+ } else {
1197
+ callback(response);
1198
+ }
1199
+ }
1200
+ function loadNewIcons(storage, icons) {
1201
+ if (!storage.iconsToLoad) {
1202
+ storage.iconsToLoad = icons;
1203
+ } else {
1204
+ storage.iconsToLoad = storage.iconsToLoad.concat(icons).sort();
1205
+ }
1206
+ if (!storage.iconsQueueFlag) {
1207
+ storage.iconsQueueFlag = true;
1208
+ setTimeout(() => {
1209
+ storage.iconsQueueFlag = false;
1210
+ const { provider, prefix } = storage;
1211
+ const icons2 = storage.iconsToLoad;
1212
+ delete storage.iconsToLoad;
1213
+ if (!icons2 || !icons2.length) {
1214
+ return;
1215
+ }
1216
+ const customIconLoader = storage.loadIcon;
1217
+ if (storage.loadIcons && (icons2.length > 1 || !customIconLoader)) {
1218
+ parsePossiblyAsyncResponse(
1219
+ storage.loadIcons(icons2, prefix, provider),
1220
+ (data) => {
1221
+ parseLoaderResponse(storage, icons2, data);
1222
+ }
1223
+ );
1224
+ return;
1225
+ }
1226
+ if (customIconLoader) {
1227
+ icons2.forEach((name) => {
1228
+ const response = customIconLoader(name, prefix, provider);
1229
+ parsePossiblyAsyncResponse(response, (data) => {
1230
+ const iconSet = data ? {
1231
+ prefix,
1232
+ icons: {
1233
+ [name]: data
1234
+ }
1235
+ } : null;
1236
+ parseLoaderResponse(storage, [name], iconSet);
1237
+ });
1238
+ });
1239
+ return;
1240
+ }
1241
+ const { valid, invalid } = checkIconNamesForAPI(icons2);
1242
+ if (invalid.length) {
1243
+ parseLoaderResponse(storage, invalid, null);
1244
+ }
1245
+ if (!valid.length) {
1246
+ return;
1247
+ }
1248
+ const api = prefix.match(matchIconName) ? getAPIModule(provider) : null;
1249
+ if (!api) {
1250
+ parseLoaderResponse(storage, valid, null);
1251
+ return;
1252
+ }
1253
+ const params = api.prepare(provider, prefix, valid);
1254
+ params.forEach((item) => {
1255
+ sendAPIQuery(provider, item, (data) => {
1256
+ parseLoaderResponse(storage, item.icons, data);
1257
+ });
1258
+ });
1259
+ });
1260
+ }
1261
+ }
1262
+ const loadIcons = (icons, callback) => {
1263
+ const cleanedIcons = listToIcons(icons, true, allowSimpleNames());
1264
+ const sortedIcons = sortIcons(cleanedIcons);
1265
+ if (!sortedIcons.pending.length) {
1266
+ let callCallback = true;
1267
+ if (callback) {
1268
+ setTimeout(() => {
1269
+ if (callCallback) {
1270
+ callback(
1271
+ sortedIcons.loaded,
1272
+ sortedIcons.missing,
1273
+ sortedIcons.pending,
1274
+ emptyCallback
1275
+ );
1276
+ }
1277
+ });
1278
+ }
1279
+ return () => {
1280
+ callCallback = false;
1281
+ };
1282
+ }
1283
+ const newIcons = /* @__PURE__ */ Object.create(null);
1284
+ const sources = [];
1285
+ let lastProvider, lastPrefix;
1286
+ sortedIcons.pending.forEach((icon) => {
1287
+ const { provider, prefix } = icon;
1288
+ if (prefix === lastPrefix && provider === lastProvider) {
1289
+ return;
1290
+ }
1291
+ lastProvider = provider;
1292
+ lastPrefix = prefix;
1293
+ sources.push(getStorage(provider, prefix));
1294
+ const providerNewIcons = newIcons[provider] || (newIcons[provider] = /* @__PURE__ */ Object.create(null));
1295
+ if (!providerNewIcons[prefix]) {
1296
+ providerNewIcons[prefix] = [];
1297
+ }
1298
+ });
1299
+ sortedIcons.pending.forEach((icon) => {
1300
+ const { provider, prefix, name } = icon;
1301
+ const storage = getStorage(provider, prefix);
1302
+ const pendingQueue = storage.pendingIcons || (storage.pendingIcons = /* @__PURE__ */ new Set());
1303
+ if (!pendingQueue.has(name)) {
1304
+ pendingQueue.add(name);
1305
+ newIcons[provider][prefix].push(name);
1306
+ }
1307
+ });
1308
+ sources.forEach((storage) => {
1309
+ const list = newIcons[storage.provider][storage.prefix];
1310
+ if (list.length) {
1311
+ loadNewIcons(storage, list);
1312
+ }
1313
+ });
1314
+ return callback ? storeCallback(callback, sortedIcons, sources) : emptyCallback;
1315
+ };
1316
+
1317
+ function mergeCustomisations(defaults, item) {
1318
+ const result = {
1319
+ ...defaults
1320
+ };
1321
+ for (const key in item) {
1322
+ const value = item[key];
1323
+ const valueType = typeof value;
1324
+ if (key in defaultIconSizeCustomisations) {
1325
+ if (value === null || value && (valueType === "string" || valueType === "number")) {
1326
+ result[key] = value;
1327
+ }
1328
+ } else if (valueType === typeof result[key]) {
1329
+ result[key] = key === "rotate" ? value % 4 : value;
1330
+ }
1331
+ }
1332
+ return result;
1333
+ }
1334
+
1335
+ const separator = /[\s,]+/;
1336
+ function flipFromString(custom, flip) {
1337
+ flip.split(separator).forEach((str) => {
1338
+ const value = str.trim();
1339
+ switch (value) {
1340
+ case "horizontal":
1341
+ custom.hFlip = true;
1342
+ break;
1343
+ case "vertical":
1344
+ custom.vFlip = true;
1345
+ break;
1346
+ }
1347
+ });
1348
+ }
1349
+
1350
+ function rotateFromString(value, defaultValue = 0) {
1351
+ const units = value.replace(/^-?[0-9.]*/, "");
1352
+ function cleanup(value2) {
1353
+ while (value2 < 0) {
1354
+ value2 += 4;
1355
+ }
1356
+ return value2 % 4;
1357
+ }
1358
+ if (units === "") {
1359
+ const num = parseInt(value);
1360
+ return isNaN(num) ? 0 : cleanup(num);
1361
+ } else if (units !== value) {
1362
+ let split = 0;
1363
+ switch (units) {
1364
+ case "%":
1365
+ split = 25;
1366
+ break;
1367
+ case "deg":
1368
+ split = 90;
1369
+ }
1370
+ if (split) {
1371
+ let num = parseFloat(value.slice(0, value.length - units.length));
1372
+ if (isNaN(num)) {
1373
+ return 0;
1374
+ }
1375
+ num = num / split;
1376
+ return num % 1 === 0 ? cleanup(num) : 0;
1377
+ }
1378
+ }
1379
+ return defaultValue;
1380
+ }
1381
+
1382
+ function iconToHTML(body, attributes) {
1383
+ let renderAttribsHTML = body.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
1384
+ for (const attr in attributes) {
1385
+ renderAttribsHTML += " " + attr + '="' + attributes[attr] + '"';
1386
+ }
1387
+ return '<svg xmlns="http://www.w3.org/2000/svg"' + renderAttribsHTML + ">" + body + "</svg>";
1388
+ }
1389
+
1390
+ function encodeSVGforURL(svg) {
1391
+ return svg.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1392
+ }
1393
+ function svgToData(svg) {
1394
+ return "data:image/svg+xml," + encodeSVGforURL(svg);
1395
+ }
1396
+ function svgToURL(svg) {
1397
+ return 'url("' + svgToData(svg) + '")';
1398
+ }
1399
+
1400
+ const defaultExtendedIconCustomisations = {
1401
+ ...defaultIconCustomisations,
1402
+ inline: false,
1403
+ };
1404
+
1405
+ /**
1406
+ * Default SVG attributes
1407
+ */
1408
+ const svgDefaults = {
1409
+ 'xmlns': 'http://www.w3.org/2000/svg',
1410
+ 'xmlns:xlink': 'http://www.w3.org/1999/xlink',
1411
+ 'aria-hidden': true,
1412
+ 'role': 'img',
1413
+ };
1414
+ /**
1415
+ * Style modes
1416
+ */
1417
+ const commonProps = {
1418
+ display: 'inline-block',
1419
+ };
1420
+ const monotoneProps = {
1421
+ backgroundColor: 'currentColor',
1422
+ };
1423
+ const coloredProps = {
1424
+ backgroundColor: 'transparent',
1425
+ };
1426
+ // Dynamically add common props to variables above
1427
+ const propsToAdd = {
1428
+ Image: 'var(--svg)',
1429
+ Repeat: 'no-repeat',
1430
+ Size: '100% 100%',
1431
+ };
1432
+ const propsToAddTo = {
1433
+ webkitMask: monotoneProps,
1434
+ mask: monotoneProps,
1435
+ background: coloredProps,
1436
+ };
1437
+ for (const prefix in propsToAddTo) {
1438
+ const list = propsToAddTo[prefix];
1439
+ for (const prop in propsToAdd) {
1440
+ list[prefix + prop] = propsToAdd[prop];
1441
+ }
1442
+ }
1443
+ /**
1444
+ * Aliases for customisations.
1445
+ * In Vue 'v-' properties are reserved, so v-flip must be renamed
1446
+ */
1447
+ const customisationAliases = {};
1448
+ ['horizontal', 'vertical'].forEach((prefix) => {
1449
+ const attr = prefix.slice(0, 1) + 'Flip';
1450
+ // vertical-flip
1451
+ customisationAliases[prefix + '-flip'] = attr;
1452
+ // v-flip
1453
+ customisationAliases[prefix.slice(0, 1) + '-flip'] = attr;
1454
+ // verticalFlip
1455
+ customisationAliases[prefix + 'Flip'] = attr;
1456
+ });
1457
+ /**
1458
+ * Fix size: add 'px' to numbers
1459
+ */
1460
+ function fixSize(value) {
1461
+ return value + (value.match(/^[-0-9.]+$/) ? 'px' : '');
1462
+ }
1463
+ /**
1464
+ * Render icon
1465
+ */
1466
+ const render = (
1467
+ // Icon must be validated before calling this function
1468
+ icon,
1469
+ // Partial properties
1470
+ props) => {
1471
+ // Split properties
1472
+ const customisations = mergeCustomisations(defaultExtendedIconCustomisations, props);
1473
+ const componentProps = { ...svgDefaults };
1474
+ // Check mode
1475
+ const mode = props.mode || 'svg';
1476
+ // Copy style
1477
+ const style = {};
1478
+ const propsStyle = props.style;
1479
+ const customStyle = typeof propsStyle === 'object' && !(propsStyle instanceof Array)
1480
+ ? propsStyle
1481
+ : {};
1482
+ // Get element properties
1483
+ for (let key in props) {
1484
+ const value = props[key];
1485
+ if (value === void 0) {
1486
+ continue;
1487
+ }
1488
+ switch (key) {
1489
+ // Properties to ignore
1490
+ case 'icon':
1491
+ case 'style':
1492
+ case 'onLoad':
1493
+ case 'mode':
1494
+ case 'ssr':
1495
+ break;
1496
+ // Boolean attributes
1497
+ case 'inline':
1498
+ case 'hFlip':
1499
+ case 'vFlip':
1500
+ customisations[key] =
1501
+ value === true || value === 'true' || value === 1;
1502
+ break;
1503
+ // Flip as string: 'horizontal,vertical'
1504
+ case 'flip':
1505
+ if (typeof value === 'string') {
1506
+ flipFromString(customisations, value);
1507
+ }
1508
+ break;
1509
+ // Color: override style
1510
+ case 'color':
1511
+ style.color = value;
1512
+ break;
1513
+ // Rotation as string
1514
+ case 'rotate':
1515
+ if (typeof value === 'string') {
1516
+ customisations[key] = rotateFromString(value);
1517
+ }
1518
+ else if (typeof value === 'number') {
1519
+ customisations[key] = value;
1520
+ }
1521
+ break;
1522
+ // Remove aria-hidden
1523
+ case 'ariaHidden':
1524
+ case 'aria-hidden':
1525
+ // Vue transforms 'aria-hidden' property to 'ariaHidden'
1526
+ if (value !== true && value !== 'true') {
1527
+ delete componentProps['aria-hidden'];
1528
+ }
1529
+ break;
1530
+ default: {
1531
+ const alias = customisationAliases[key];
1532
+ if (alias) {
1533
+ // Aliases for boolean customisations
1534
+ if (value === true || value === 'true' || value === 1) {
1535
+ customisations[alias] = true;
1536
+ }
1537
+ }
1538
+ else if (defaultExtendedIconCustomisations[key] === void 0) {
1539
+ // Copy missing property if it does not exist in customisations
1540
+ componentProps[key] = value;
1541
+ }
1542
+ }
1543
+ }
1544
+ }
1545
+ // Generate icon
1546
+ const item = iconToSVG(icon, customisations);
1547
+ const renderAttribs = item.attributes;
1548
+ // Inline display
1549
+ if (customisations.inline) {
1550
+ style.verticalAlign = '-0.125em';
1551
+ }
1552
+ if (mode === 'svg') {
1553
+ // Add style
1554
+ componentProps.style = {
1555
+ ...style,
1556
+ ...customStyle,
1557
+ };
1558
+ // Add icon stuff
1559
+ Object.assign(componentProps, renderAttribs);
1560
+ // Counter for ids based on "id" property to render icons consistently on server and client
1561
+ let localCounter = 0;
1562
+ let id = props.id;
1563
+ if (typeof id === 'string') {
1564
+ // Convert '-' to '_' to avoid errors in animations
1565
+ id = id.replace(/-/g, '_');
1566
+ }
1567
+ // Add innerHTML and style to props
1568
+ componentProps['innerHTML'] = replaceIDs(item.body, id ? () => id + 'ID' + localCounter++ : 'iconifyVue');
1569
+ // Render icon
1570
+ return h('svg', componentProps);
1571
+ }
1572
+ // Render <span> with style
1573
+ const { body, width, height } = icon;
1574
+ const useMask = mode === 'mask' ||
1575
+ (mode === 'bg' ? false : body.indexOf('currentColor') !== -1);
1576
+ // Generate SVG
1577
+ const html = iconToHTML(body, {
1578
+ ...renderAttribs,
1579
+ width: width + '',
1580
+ height: height + '',
1581
+ });
1582
+ // Generate style
1583
+ componentProps.style = {
1584
+ ...style,
1585
+ '--svg': svgToURL(html),
1586
+ 'width': fixSize(renderAttribs.width),
1587
+ 'height': fixSize(renderAttribs.height),
1588
+ ...commonProps,
1589
+ ...(useMask ? monotoneProps : coloredProps),
1590
+ ...customStyle,
1591
+ };
1592
+ return h('span', componentProps);
1593
+ };
1594
+
1595
+ /**
1596
+ * Initialise stuff
1597
+ */
1598
+ // Enable short names
1599
+ allowSimpleNames(true);
1600
+ // Set API module
1601
+ setAPIModule('', fetchAPIModule);
1602
+ /**
1603
+ * Browser stuff
1604
+ */
1605
+ if (typeof document !== 'undefined' && typeof window !== 'undefined') {
1606
+ const _window = window;
1607
+ // Load icons from global "IconifyPreload"
1608
+ if (_window.IconifyPreload !== void 0) {
1609
+ const preload = _window.IconifyPreload;
1610
+ const err = 'Invalid IconifyPreload syntax.';
1611
+ if (typeof preload === 'object' && preload !== null) {
1612
+ (preload instanceof Array ? preload : [preload]).forEach((item) => {
1613
+ try {
1614
+ if (
1615
+ // Check if item is an object and not null/array
1616
+ typeof item !== 'object' ||
1617
+ item === null ||
1618
+ item instanceof Array ||
1619
+ // Check for 'icons' and 'prefix'
1620
+ typeof item.icons !== 'object' ||
1621
+ typeof item.prefix !== 'string' ||
1622
+ // Add icon set
1623
+ !addCollection(item)) {
1624
+ console.error(err);
1625
+ }
1626
+ }
1627
+ catch (e) {
1628
+ console.error(err);
1629
+ }
1630
+ });
1631
+ }
1632
+ }
1633
+ // Set API from global "IconifyProviders"
1634
+ if (_window.IconifyProviders !== void 0) {
1635
+ const providers = _window.IconifyProviders;
1636
+ if (typeof providers === 'object' && providers !== null) {
1637
+ for (let key in providers) {
1638
+ const err = 'IconifyProviders[' + key + '] is invalid.';
1639
+ try {
1640
+ const value = providers[key];
1641
+ if (typeof value !== 'object' ||
1642
+ !value ||
1643
+ value.resources === void 0) {
1644
+ continue;
1645
+ }
1646
+ if (!addAPIProvider(key, value)) {
1647
+ console.error(err);
1648
+ }
1649
+ }
1650
+ catch (e) {
1651
+ console.error(err);
1652
+ }
1653
+ }
1654
+ }
1655
+ }
1656
+ }
1657
+ /**
1658
+ * Empty icon data, rendered when icon is not available
1659
+ */
1660
+ const emptyIcon = {
1661
+ ...defaultIconProps,
1662
+ body: '',
1663
+ };
1664
+ /**
1665
+ * Component
1666
+ */
1667
+ const Icon = defineComponent((props, { emit }) => {
1668
+ const loader = ref(null);
1669
+ function abortLoading() {
1670
+ if (loader.value) {
1671
+ loader.value.abort?.();
1672
+ loader.value = null;
1673
+ }
1674
+ }
1675
+ // Render state
1676
+ const rendering = ref(!!props.ssr);
1677
+ const lastRenderedIconName = ref('');
1678
+ const iconData = shallowRef(null);
1679
+ // Update icon data
1680
+ function getIcon() {
1681
+ const icon = props.icon;
1682
+ // Icon is an object
1683
+ if (typeof icon === 'object' &&
1684
+ icon !== null &&
1685
+ typeof icon.body === 'string') {
1686
+ lastRenderedIconName.value = '';
1687
+ return {
1688
+ data: icon,
1689
+ };
1690
+ }
1691
+ // Check for valid icon name
1692
+ let iconName;
1693
+ if (typeof icon !== 'string' ||
1694
+ (iconName = stringToIcon(icon, false, true)) === null) {
1695
+ return null;
1696
+ }
1697
+ // Load icon
1698
+ let data = getIconData(iconName);
1699
+ if (!data) {
1700
+ // Icon data is not available
1701
+ const oldState = loader.value;
1702
+ if (!oldState || oldState.name !== icon) {
1703
+ // Icon name does not match old loader state
1704
+ if (data === null) {
1705
+ // Failed to load
1706
+ loader.value = {
1707
+ name: icon,
1708
+ };
1709
+ }
1710
+ else {
1711
+ loader.value = {
1712
+ name: icon,
1713
+ abort: loadIcons([iconName], updateIconData),
1714
+ };
1715
+ }
1716
+ }
1717
+ return null;
1718
+ }
1719
+ // Icon data is available
1720
+ abortLoading();
1721
+ if (lastRenderedIconName.value !== icon) {
1722
+ lastRenderedIconName.value = icon;
1723
+ // Emit on next tick because render will be called on next tick
1724
+ nextTick(() => {
1725
+ emit('load', icon);
1726
+ });
1727
+ }
1728
+ // Customise icon
1729
+ const customise = props.customise;
1730
+ if (customise) {
1731
+ // Clone data and customise it
1732
+ data = Object.assign({}, data);
1733
+ const customised = customise(data.body, iconName.name, iconName.prefix, iconName.provider);
1734
+ if (typeof customised === 'string') {
1735
+ data.body = customised;
1736
+ }
1737
+ }
1738
+ // Add classes
1739
+ const classes = ['iconify'];
1740
+ if (iconName.prefix !== '') {
1741
+ classes.push('iconify--' + iconName.prefix);
1742
+ }
1743
+ if (iconName.provider !== '') {
1744
+ classes.push('iconify--' + iconName.provider);
1745
+ }
1746
+ return { data, classes };
1747
+ }
1748
+ function updateIconData() {
1749
+ const icon = getIcon();
1750
+ if (!icon) {
1751
+ iconData.value = null;
1752
+ }
1753
+ else if (icon.data !== iconData.value?.data) {
1754
+ iconData.value = icon;
1755
+ }
1756
+ }
1757
+ // Set icon data
1758
+ if (rendering.value) {
1759
+ updateIconData();
1760
+ }
1761
+ else {
1762
+ onMounted(() => {
1763
+ rendering.value = true;
1764
+ updateIconData();
1765
+ });
1766
+ }
1767
+ watch(() => props.icon, updateIconData);
1768
+ // Abort loading on unmount
1769
+ onUnmounted(abortLoading);
1770
+ // Render function
1771
+ return () => {
1772
+ // Get icon data
1773
+ const icon = iconData.value;
1774
+ if (!icon) {
1775
+ // Icon is not available
1776
+ return render(emptyIcon, props);
1777
+ }
1778
+ // Add classes
1779
+ let newProps = props;
1780
+ if (icon.classes) {
1781
+ newProps = {
1782
+ ...props,
1783
+ class: icon.classes.join(' '),
1784
+ };
1785
+ }
1786
+ // Render icon
1787
+ return render({
1788
+ ...defaultIconProps,
1789
+ ...icon.data,
1790
+ }, newProps);
1791
+ };
1792
+ }, {
1793
+ props: [
1794
+ // Icon and render mode
1795
+ 'icon',
1796
+ 'mode',
1797
+ 'ssr',
1798
+ // Layout and style
1799
+ 'width',
1800
+ 'height',
1801
+ 'style',
1802
+ 'color',
1803
+ 'inline',
1804
+ // Transformations
1805
+ 'rotate',
1806
+ 'hFlip',
1807
+ 'horizontalFlip',
1808
+ 'vFlip',
1809
+ 'verticalFlip',
1810
+ 'flip',
1811
+ // Misc
1812
+ 'id',
1813
+ 'ariaHidden',
1814
+ 'customise',
1815
+ 'title',
1816
+ ],
1817
+ emits: ['load'],
1818
+ });
1819
+
1820
+ const _sfc_main = /* @__PURE__ */ defineComponent({
1821
+ __name: "iconify-icon",
1822
+ props: {
1823
+ name: {},
1824
+ color: { default: "" },
1825
+ size: { default: "" }
1826
+ },
1827
+ setup(__props) {
1828
+ const props = __props;
1829
+ const mySize = computed(() => {
1830
+ if (props.size && Number.isNaN(+props.size)) {
1831
+ return props.size;
1832
+ }
1833
+ return `${props.size}px`;
1834
+ });
1835
+ return (_ctx, _cache) => {
1836
+ return openBlock(), createBlock(unref(Icon), {
1837
+ icon: __props.name,
1838
+ class: normalizeClass(_ctx.$style.icon),
1839
+ style: normalizeStyle({ fontSize: unref(mySize), color: __props.color })
1840
+ }, null, 8, ["icon", "class", "style"]);
1841
+ };
1842
+ }
1843
+ });
1844
+
1845
+ /* unplugin-vue-components disabled */const icon = "_icon_1v0e5_1";
1846
+ const style0 = {
1847
+ icon: icon
1848
+ };
1849
+
1850
+ const cssModules = {
1851
+ "$style": style0
1852
+ };
1853
+ const Component = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
1854
+
1855
+ const __vite_glob_0_21 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
1856
+ __proto__: null,
1857
+ default: Component
1858
+ }, Symbol.toStringTag, { value: 'Module' }));
1859
+
1860
+ export { Component as C, __vite_glob_0_21 as _ };