@vaebe/ccui 2.0.0-beta.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 (189) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +31 -0
  3. package/affix/ccui-cli.css +2 -0
  4. package/affix/index.es.js +132 -0
  5. package/affix/index.umd.js +1 -0
  6. package/alert/ccui-cli.css +2 -0
  7. package/alert/index.es.js +127 -0
  8. package/alert/index.umd.js +1 -0
  9. package/anchor/ccui-cli.css +2 -0
  10. package/anchor/index.es.js +160 -0
  11. package/anchor/index.umd.js +1 -0
  12. package/avatar/ccui-cli.css +2 -0
  13. package/avatar/index.es.js +235 -0
  14. package/avatar/index.umd.js +1 -0
  15. package/badge/ccui-cli.css +2 -0
  16. package/badge/index.es.js +146 -0
  17. package/badge/index.umd.js +1 -0
  18. package/breadcrumb/ccui-cli.css +2 -0
  19. package/breadcrumb/index.es.js +89 -0
  20. package/breadcrumb/index.umd.js +1 -0
  21. package/button/ccui-cli.css +2 -0
  22. package/button/index.es.js +1236 -0
  23. package/button/index.umd.js +1 -0
  24. package/button-3d/ccui-cli.css +2 -0
  25. package/button-3d/index.es.js +80 -0
  26. package/button-3d/index.umd.js +1 -0
  27. package/calendar/ccui-cli.css +2 -0
  28. package/calendar/index.es.js +450 -0
  29. package/calendar/index.umd.js +1 -0
  30. package/card/ccui-cli.css +2 -0
  31. package/card/index.es.js +78 -0
  32. package/card/index.umd.js +1 -0
  33. package/ccui-cli.css +2 -0
  34. package/check-box/ccui-cli.css +2 -0
  35. package/check-box/index.es.js +173 -0
  36. package/check-box/index.umd.js +1 -0
  37. package/collapse/ccui-cli.css +2 -0
  38. package/collapse/index.es.js +176 -0
  39. package/collapse/index.umd.js +1 -0
  40. package/config-provider/index.es.js +204 -0
  41. package/config-provider/index.umd.js +1 -0
  42. package/date-picker/ccui-cli.css +2 -0
  43. package/date-picker/index.es.js +2447 -0
  44. package/date-picker/index.umd.js +1 -0
  45. package/descriptions/ccui-cli.css +2 -0
  46. package/descriptions/index.es.js +175 -0
  47. package/descriptions/index.umd.js +1 -0
  48. package/divider/ccui-cli.css +2 -0
  49. package/divider/index.es.js +78 -0
  50. package/divider/index.umd.js +1 -0
  51. package/drawer/ccui-cli.css +2 -0
  52. package/drawer/index.es.js +1320 -0
  53. package/drawer/index.umd.js +1 -0
  54. package/dropdown/ccui-cli.css +2 -0
  55. package/dropdown/index.es.js +606 -0
  56. package/dropdown/index.umd.js +1 -0
  57. package/empty/ccui-cli.css +2 -0
  58. package/empty/index.es.js +173 -0
  59. package/empty/index.umd.js +1 -0
  60. package/flex/ccui-cli.css +2 -0
  61. package/flex/index.es.js +87 -0
  62. package/flex/index.umd.js +1 -0
  63. package/float-button/ccui-cli.css +2 -0
  64. package/float-button/index.es.js +169 -0
  65. package/float-button/index.umd.js +1 -0
  66. package/form/ccui-cli.css +2 -0
  67. package/form/index.es.js +752 -0
  68. package/form/index.umd.js +1 -0
  69. package/grid/ccui-cli.css +2 -0
  70. package/grid/index.es.js +207 -0
  71. package/grid/index.umd.js +1 -0
  72. package/icon/ccui-cli.css +2 -0
  73. package/icon/index.es.js +1228 -0
  74. package/icon/index.umd.js +1 -0
  75. package/image/ccui-cli.css +2 -0
  76. package/image/index.es.js +276 -0
  77. package/image/index.umd.js +1 -0
  78. package/index.d.ts +7 -0
  79. package/input/ccui-cli.css +2 -0
  80. package/input/index.es.js +1293 -0
  81. package/input/index.umd.js +1 -0
  82. package/input-number/ccui-cli.css +2 -0
  83. package/input-number/index.es.js +263 -0
  84. package/input-number/index.umd.js +1 -0
  85. package/layout/ccui-cli.css +2 -0
  86. package/layout/index.es.js +184 -0
  87. package/layout/index.umd.js +1 -0
  88. package/masonry/ccui-cli.css +2 -0
  89. package/masonry/index.es.js +119 -0
  90. package/masonry/index.umd.js +1 -0
  91. package/menu/ccui-cli.css +2 -0
  92. package/menu/index.es.js +385 -0
  93. package/menu/index.umd.js +1 -0
  94. package/message/ccui-cli.css +2 -0
  95. package/message/index.es.js +351 -0
  96. package/message/index.umd.js +1 -0
  97. package/modal/ccui-cli.css +2 -0
  98. package/modal/index.es.js +1553 -0
  99. package/modal/index.umd.js +1 -0
  100. package/notification/ccui-cli.css +2 -0
  101. package/notification/index.es.js +347 -0
  102. package/notification/index.umd.js +1 -0
  103. package/nuxt/components/category.js +2 -0
  104. package/nuxt/components/install.js +2 -0
  105. package/nuxt/components/status.js +2 -0
  106. package/nuxt/components/title.js +2 -0
  107. package/nuxt/index.js +13 -0
  108. package/package.json +53 -0
  109. package/pagination/ccui-cli.css +2 -0
  110. package/pagination/index.es.js +296 -0
  111. package/pagination/index.umd.js +1 -0
  112. package/popconfirm/ccui-cli.css +2 -0
  113. package/popconfirm/index.es.js +735 -0
  114. package/popconfirm/index.umd.js +1 -0
  115. package/popover/ccui-cli.css +2 -0
  116. package/popover/index.es.js +530 -0
  117. package/popover/index.umd.js +1 -0
  118. package/progress/ccui-cli.css +2 -0
  119. package/progress/index.es.js +167 -0
  120. package/progress/index.umd.js +1 -0
  121. package/radio/ccui-cli.css +2 -0
  122. package/radio/index.es.js +157 -0
  123. package/radio/index.umd.js +1 -0
  124. package/rate/ccui-cli.css +2 -0
  125. package/rate/index.es.js +115 -0
  126. package/rate/index.umd.js +1 -0
  127. package/result/ccui-cli.css +2 -0
  128. package/result/index.es.js +90 -0
  129. package/result/index.umd.js +1 -0
  130. package/segmented/ccui-cli.css +2 -0
  131. package/segmented/index.es.js +99 -0
  132. package/segmented/index.umd.js +1 -0
  133. package/select/ccui-cli.css +2 -0
  134. package/select/index.es.js +1885 -0
  135. package/select/index.umd.js +1 -0
  136. package/skeleton/ccui-cli.css +2 -0
  137. package/skeleton/index.es.js +117 -0
  138. package/skeleton/index.umd.js +1 -0
  139. package/slider/ccui-cli.css +2 -0
  140. package/slider/index.es.js +1071 -0
  141. package/slider/index.umd.js +1 -0
  142. package/space/ccui-cli.css +2 -0
  143. package/space/index.es.js +108 -0
  144. package/space/index.umd.js +1 -0
  145. package/spin/ccui-cli.css +2 -0
  146. package/spin/index.es.js +86 -0
  147. package/spin/index.umd.js +1 -0
  148. package/splitter/ccui-cli.css +2 -0
  149. package/splitter/index.es.js +198 -0
  150. package/splitter/index.umd.js +1 -0
  151. package/status/ccui-cli.css +2 -0
  152. package/status/index.es.js +44 -0
  153. package/status/index.umd.js +1 -0
  154. package/steps/ccui-cli.css +2 -0
  155. package/steps/index.es.js +118 -0
  156. package/steps/index.umd.js +1 -0
  157. package/switch/ccui-cli.css +2 -0
  158. package/switch/index.es.js +118 -0
  159. package/switch/index.umd.js +1 -0
  160. package/table/ccui-cli.css +2 -0
  161. package/table/index.es.js +553 -0
  162. package/table/index.umd.js +1 -0
  163. package/tabs/ccui-cli.css +2 -0
  164. package/tabs/index.es.js +128 -0
  165. package/tabs/index.umd.js +1 -0
  166. package/tag/ccui-cli.css +2 -0
  167. package/tag/index.es.js +116 -0
  168. package/tag/index.umd.js +1 -0
  169. package/theme/darkTheme.css +352 -0
  170. package/theme/theme.scss +703 -0
  171. package/timeline/ccui-cli.css +2 -0
  172. package/timeline/index.es.js +113 -0
  173. package/timeline/index.umd.js +1 -0
  174. package/tooltip/ccui-cli.css +2 -0
  175. package/tooltip/index.es.js +423 -0
  176. package/tooltip/index.umd.js +1 -0
  177. package/tree/ccui-cli.css +2 -0
  178. package/tree/index.es.js +810 -0
  179. package/tree/index.umd.js +1 -0
  180. package/typography/ccui-cli.css +2 -0
  181. package/typography/index.es.js +270 -0
  182. package/typography/index.umd.js +1 -0
  183. package/util/index.es.js +78 -0
  184. package/util/index.umd.js +1 -0
  185. package/vue-ccui.es.js +18989 -0
  186. package/vue-ccui.umd.js +1 -0
  187. package/watermark/ccui-cli.css +2 -0
  188. package/watermark/index.es.js +179 -0
  189. package/watermark/index.umd.js +1 -0
@@ -0,0 +1,1228 @@
1
+ import { computed as e, defineComponent as t, h as n, inject as r, nextTick as i, onMounted as a, onUnmounted as o, ref as s, shallowRef as c, useAttrs as l, watch as u } from "vue";
2
+ //#region ../../node_modules/.pnpm/@iconify+vue@5.0.1_vue@3.5.33_typescript@5.9.3_/node_modules/@iconify/vue/dist/iconify.mjs
3
+ var d = /^[a-z0-9]+(-[a-z0-9]+)*$/, f = (e, t, n, r = "") => {
4
+ let i = e.split(":");
5
+ if (e.slice(0, 1) === "@") {
6
+ if (i.length < 2 || i.length > 3) return null;
7
+ r = i.shift().slice(1);
8
+ }
9
+ if (i.length > 3 || !i.length) return null;
10
+ if (i.length > 1) {
11
+ let e = i.pop(), n = i.pop(), a = {
12
+ provider: i.length > 0 ? i[0] : r,
13
+ prefix: n,
14
+ name: e
15
+ };
16
+ return t && !p(a) ? null : a;
17
+ }
18
+ let a = i[0], o = a.split("-");
19
+ if (o.length > 1) {
20
+ let e = {
21
+ provider: r,
22
+ prefix: o.shift(),
23
+ name: o.join("-")
24
+ };
25
+ return t && !p(e) ? null : e;
26
+ }
27
+ if (n && r === "") {
28
+ let e = {
29
+ provider: r,
30
+ prefix: "",
31
+ name: a
32
+ };
33
+ return t && !p(e, n) ? null : e;
34
+ }
35
+ return null;
36
+ }, p = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
37
+ function m(e, t) {
38
+ let n = e.icons, r = e.aliases || Object.create(null), i = Object.create(null);
39
+ function a(e) {
40
+ if (n[e]) return i[e] = [];
41
+ if (!(e in i)) {
42
+ i[e] = null;
43
+ let t = r[e] && r[e].parent, n = t && a(t);
44
+ n && (i[e] = [t].concat(n));
45
+ }
46
+ return i[e];
47
+ }
48
+ return Object.keys(n).concat(Object.keys(r)).forEach(a), i;
49
+ }
50
+ var h = Object.freeze({
51
+ left: 0,
52
+ top: 0,
53
+ width: 16,
54
+ height: 16
55
+ }), g = Object.freeze({
56
+ rotate: 0,
57
+ vFlip: !1,
58
+ hFlip: !1
59
+ }), _ = Object.freeze({
60
+ ...h,
61
+ ...g
62
+ }), v = Object.freeze({
63
+ ..._,
64
+ body: "",
65
+ hidden: !1
66
+ });
67
+ function y(e, t) {
68
+ let n = {};
69
+ !e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
70
+ let r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
71
+ return r && (n.rotate = r), n;
72
+ }
73
+ function b(e, t) {
74
+ let n = y(e, t);
75
+ for (let r in v) r in g ? r in e && !(r in n) && (n[r] = g[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
76
+ return n;
77
+ }
78
+ function x(e, t, n) {
79
+ let r = e.icons, i = e.aliases || Object.create(null), a = {};
80
+ function o(e) {
81
+ a = b(r[e] || i[e], a);
82
+ }
83
+ return o(t), n.forEach(o), b(e, a);
84
+ }
85
+ function ee(e, t) {
86
+ let n = [];
87
+ if (typeof e != "object" || typeof e.icons != "object") return n;
88
+ e.not_found instanceof Array && e.not_found.forEach((e) => {
89
+ t(e, null), n.push(e);
90
+ });
91
+ let r = m(e);
92
+ for (let i in r) {
93
+ let a = r[i];
94
+ a && (t(i, x(e, i, a)), n.push(i));
95
+ }
96
+ return n;
97
+ }
98
+ var te = {
99
+ provider: "",
100
+ aliases: {},
101
+ not_found: {},
102
+ ...h
103
+ };
104
+ function S(e, t) {
105
+ for (let n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
106
+ return !0;
107
+ }
108
+ function ne(e) {
109
+ if (typeof e != "object" || !e) return null;
110
+ let t = e;
111
+ if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !S(e, te)) return null;
112
+ let n = t.icons;
113
+ for (let e in n) {
114
+ let t = n[e];
115
+ if (!e || typeof t.body != "string" || !S(t, v)) return null;
116
+ }
117
+ let r = t.aliases || Object.create(null);
118
+ for (let e in r) {
119
+ let t = r[e], i = t.parent;
120
+ if (!e || typeof i != "string" || !n[i] && !r[i] || !S(t, v)) return null;
121
+ }
122
+ return t;
123
+ }
124
+ var C = Object.create(null);
125
+ function re(e, t) {
126
+ return {
127
+ provider: e,
128
+ prefix: t,
129
+ icons: Object.create(null),
130
+ missing: /* @__PURE__ */ new Set()
131
+ };
132
+ }
133
+ function w(e, t) {
134
+ let n = C[e] || (C[e] = Object.create(null));
135
+ return n[t] || (n[t] = re(e, t));
136
+ }
137
+ function ie(e, t) {
138
+ return ne(t) ? ee(t, (t, n) => {
139
+ n ? e.icons[t] = n : e.missing.add(t);
140
+ }) : [];
141
+ }
142
+ function ae(e, t, n) {
143
+ try {
144
+ if (typeof n.body == "string") return e.icons[t] = { ...n }, !0;
145
+ } catch {}
146
+ return !1;
147
+ }
148
+ var T = !1;
149
+ function oe(e) {
150
+ return typeof e == "boolean" && (T = e), T;
151
+ }
152
+ function se(e) {
153
+ let t = typeof e == "string" ? f(e, !0, T) : e;
154
+ if (t) {
155
+ let e = w(t.provider, t.prefix), n = t.name;
156
+ return e.icons[n] || (e.missing.has(n) ? null : void 0);
157
+ }
158
+ }
159
+ function E(e, t) {
160
+ let n = f(e, !0, T);
161
+ if (!n) return !1;
162
+ let r = w(n.provider, n.prefix);
163
+ return t ? ae(r, n.name, t) : (r.missing.add(n.name), !0);
164
+ }
165
+ function D(e, t) {
166
+ if (typeof e != "object") return !1;
167
+ if (typeof t != "string" && (t = e.provider || ""), T && !t && !e.prefix) {
168
+ let t = !1;
169
+ return ne(e) && (e.prefix = "", ee(e, (e, n) => {
170
+ E(e, n) && (t = !0);
171
+ })), t;
172
+ }
173
+ let n = e.prefix;
174
+ return p({
175
+ prefix: n,
176
+ name: "a"
177
+ }) ? !!ie(w(t, n), e) : !1;
178
+ }
179
+ var ce = Object.freeze({
180
+ width: null,
181
+ height: null
182
+ }), O = Object.freeze({
183
+ ...ce,
184
+ ...g
185
+ }), le = /(-?[0-9.]*[0-9]+[0-9.]*)/g, ue = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
186
+ function k(e, t, n) {
187
+ if (t === 1) return e;
188
+ if (n ||= 100, typeof e == "number") return Math.ceil(e * t * n) / n;
189
+ if (typeof e != "string") return e;
190
+ let r = e.split(le);
191
+ if (r === null || !r.length) return e;
192
+ let i = [], a = r.shift(), o = ue.test(a);
193
+ for (;;) {
194
+ if (o) {
195
+ let e = parseFloat(a);
196
+ isNaN(e) ? i.push(a) : i.push(Math.ceil(e * t * n) / n);
197
+ } else i.push(a);
198
+ if (a = r.shift(), a === void 0) return i.join("");
199
+ o = !o;
200
+ }
201
+ }
202
+ function de(e, t = "defs") {
203
+ let n = "", r = e.indexOf("<" + t);
204
+ for (; r >= 0;) {
205
+ let i = e.indexOf(">", r), a = e.indexOf("</" + t);
206
+ if (i === -1 || a === -1) break;
207
+ let o = e.indexOf(">", a);
208
+ if (o === -1) break;
209
+ n += e.slice(i + 1, a).trim(), e = e.slice(0, r).trim() + e.slice(o + 1);
210
+ }
211
+ return {
212
+ defs: n,
213
+ content: e
214
+ };
215
+ }
216
+ function fe(e, t) {
217
+ return e ? "<defs>" + e + "</defs>" + t : t;
218
+ }
219
+ function pe(e, t, n) {
220
+ let r = de(e);
221
+ return fe(r.defs, t + r.content + n);
222
+ }
223
+ var me = (e) => e === "unset" || e === "undefined" || e === "none";
224
+ function he(e, t) {
225
+ let n = {
226
+ ..._,
227
+ ...e
228
+ }, r = {
229
+ ...O,
230
+ ...t
231
+ }, i = {
232
+ left: n.left,
233
+ top: n.top,
234
+ width: n.width,
235
+ height: n.height
236
+ }, a = n.body;
237
+ [n, r].forEach((e) => {
238
+ let t = [], n = e.hFlip, r = e.vFlip, o = e.rotate;
239
+ n ? r ? o += 2 : (t.push("translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"), t.push("scale(-1 1)"), i.top = i.left = 0) : r && (t.push("translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"), t.push("scale(1 -1)"), i.top = i.left = 0);
240
+ let s;
241
+ switch (o < 0 && (o -= Math.floor(o / 4) * 4), o %= 4, o) {
242
+ case 1:
243
+ s = i.height / 2 + i.top, t.unshift("rotate(90 " + s.toString() + " " + s.toString() + ")");
244
+ break;
245
+ case 2:
246
+ t.unshift("rotate(180 " + (i.width / 2 + i.left).toString() + " " + (i.height / 2 + i.top).toString() + ")");
247
+ break;
248
+ case 3:
249
+ s = i.width / 2 + i.left, t.unshift("rotate(-90 " + s.toString() + " " + s.toString() + ")");
250
+ break;
251
+ }
252
+ o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a = pe(a, "<g transform=\"" + t.join(" ") + "\">", "</g>"));
253
+ });
254
+ let o = r.width, s = r.height, c = i.width, l = i.height, u, d;
255
+ o === null ? (d = s === null ? "1em" : s === "auto" ? l : s, u = k(d, c / l)) : (u = o === "auto" ? c : o, d = s === null ? k(u, l / c) : s === "auto" ? l : s);
256
+ let f = {}, p = (e, t) => {
257
+ me(t) || (f[e] = t.toString());
258
+ };
259
+ p("width", u), p("height", d);
260
+ let m = [
261
+ i.left,
262
+ i.top,
263
+ c,
264
+ l
265
+ ];
266
+ return f.viewBox = m.join(" "), {
267
+ attributes: f,
268
+ viewBox: m,
269
+ body: a
270
+ };
271
+ }
272
+ var ge = /\sid="(\S+)"/g, A = /* @__PURE__ */ new Map();
273
+ function _e(e) {
274
+ e = e.replace(/[0-9]+$/, "") || "a";
275
+ let t = A.get(e) || 0;
276
+ return A.set(e, t + 1), t ? `${e}${t}` : e;
277
+ }
278
+ function ve(e) {
279
+ let t = [], n;
280
+ for (; n = ge.exec(e);) t.push(n[1]);
281
+ if (!t.length) return e;
282
+ let r = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
283
+ return t.forEach((t) => {
284
+ let n = _e(t), i = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
285
+ e = e.replace(RegExp("([#;\"])(" + i + ")([\")]|\\.[a-z])", "g"), "$1" + n + r + "$3");
286
+ }), e = e.replace(new RegExp(r, "g"), ""), e;
287
+ }
288
+ var j = Object.create(null);
289
+ function ye(e, t) {
290
+ j[e] = t;
291
+ }
292
+ function M(e) {
293
+ return j[e] || j[""];
294
+ }
295
+ function N(e) {
296
+ let t;
297
+ if (typeof e.resources == "string") t = [e.resources];
298
+ else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
299
+ return {
300
+ resources: t,
301
+ path: e.path || "/",
302
+ maxURL: e.maxURL || 500,
303
+ rotate: e.rotate || 750,
304
+ timeout: e.timeout || 5e3,
305
+ random: e.random === !0,
306
+ index: e.index || 0,
307
+ dataAfterTimeout: e.dataAfterTimeout !== !1
308
+ };
309
+ }
310
+ for (var P = Object.create(null), F = ["https://api.simplesvg.com", "https://api.unisvg.com"], I = []; F.length > 0;) F.length === 1 || Math.random() > .5 ? I.push(F.shift()) : I.push(F.pop());
311
+ P[""] = N({ resources: ["https://api.iconify.design"].concat(I) });
312
+ function be(e, t) {
313
+ let n = N(t);
314
+ return n === null ? !1 : (P[e] = n, !0);
315
+ }
316
+ function L(e) {
317
+ return P[e];
318
+ }
319
+ var R = (() => {
320
+ let e;
321
+ try {
322
+ if (e = fetch, typeof e == "function") return e;
323
+ } catch {}
324
+ })();
325
+ function xe(e, t) {
326
+ let n = L(e);
327
+ if (!n) return 0;
328
+ let r;
329
+ if (!n.maxURL) r = 0;
330
+ else {
331
+ let e = 0;
332
+ n.resources.forEach((t) => {
333
+ e = Math.max(e, t.length);
334
+ });
335
+ let i = t + ".json?icons=";
336
+ r = n.maxURL - e - n.path.length - i.length;
337
+ }
338
+ return r;
339
+ }
340
+ function Se(e) {
341
+ return e === 404;
342
+ }
343
+ var Ce = (e, t, n) => {
344
+ let r = [], i = xe(e, t), a = "icons", o = {
345
+ type: a,
346
+ provider: e,
347
+ prefix: t,
348
+ icons: []
349
+ }, s = 0;
350
+ return n.forEach((n, c) => {
351
+ s += n.length + 1, s >= i && c > 0 && (r.push(o), o = {
352
+ type: a,
353
+ provider: e,
354
+ prefix: t,
355
+ icons: []
356
+ }, s = n.length), o.icons.push(n);
357
+ }), r.push(o), r;
358
+ };
359
+ function we(e) {
360
+ if (typeof e == "string") {
361
+ let t = L(e);
362
+ if (t) return t.path;
363
+ }
364
+ return "/";
365
+ }
366
+ var Te = {
367
+ prepare: Ce,
368
+ send: (e, t, n) => {
369
+ if (!R) {
370
+ n("abort", 424);
371
+ return;
372
+ }
373
+ let r = we(t.provider);
374
+ switch (t.type) {
375
+ case "icons": {
376
+ let e = t.prefix, n = t.icons.join(","), i = new URLSearchParams({ icons: n });
377
+ r += e + ".json?" + i.toString();
378
+ break;
379
+ }
380
+ case "custom": {
381
+ let e = t.uri;
382
+ r += e.slice(0, 1) === "/" ? e.slice(1) : e;
383
+ break;
384
+ }
385
+ default:
386
+ n("abort", 400);
387
+ return;
388
+ }
389
+ let i = 503;
390
+ R(e + r).then((e) => {
391
+ let t = e.status;
392
+ if (t !== 200) {
393
+ setTimeout(() => {
394
+ n(Se(t) ? "abort" : "next", t);
395
+ });
396
+ return;
397
+ }
398
+ return i = 501, e.json();
399
+ }).then((e) => {
400
+ if (typeof e != "object" || !e) {
401
+ setTimeout(() => {
402
+ e === 404 ? n("abort", e) : n("next", i);
403
+ });
404
+ return;
405
+ }
406
+ setTimeout(() => {
407
+ n("success", e);
408
+ });
409
+ }).catch(() => {
410
+ n("next", i);
411
+ });
412
+ }
413
+ };
414
+ function z(e, t) {
415
+ e.forEach((e) => {
416
+ let n = e.loaderCallbacks;
417
+ n && (e.loaderCallbacks = n.filter((e) => e.id !== t));
418
+ });
419
+ }
420
+ function Ee(e) {
421
+ e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
422
+ e.pendingCallbacksFlag = !1;
423
+ let t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
424
+ if (!t.length) return;
425
+ let n = !1, r = e.provider, i = e.prefix;
426
+ t.forEach((t) => {
427
+ let a = t.icons, o = a.pending.length;
428
+ a.pending = a.pending.filter((t) => {
429
+ if (t.prefix !== i) return !0;
430
+ let o = t.name;
431
+ if (e.icons[o]) a.loaded.push({
432
+ provider: r,
433
+ prefix: i,
434
+ name: o
435
+ });
436
+ else if (e.missing.has(o)) a.missing.push({
437
+ provider: r,
438
+ prefix: i,
439
+ name: o
440
+ });
441
+ else return n = !0, !0;
442
+ return !1;
443
+ }), a.pending.length !== o && (n || z([e], t.id), t.callback(a.loaded.slice(0), a.missing.slice(0), a.pending.slice(0), t.abort));
444
+ });
445
+ }));
446
+ }
447
+ var De = 0;
448
+ function Oe(e, t, n) {
449
+ let r = De++, i = z.bind(null, n, r);
450
+ if (!t.pending.length) return i;
451
+ let a = {
452
+ id: r,
453
+ icons: t,
454
+ callback: e,
455
+ abort: i
456
+ };
457
+ return n.forEach((e) => {
458
+ (e.loaderCallbacks ||= []).push(a);
459
+ }), i;
460
+ }
461
+ function ke(e) {
462
+ let t = {
463
+ loaded: [],
464
+ missing: [],
465
+ pending: []
466
+ }, n = Object.create(null);
467
+ e.sort((e, t) => e.provider === t.provider ? e.prefix === t.prefix ? e.name.localeCompare(t.name) : e.prefix.localeCompare(t.prefix) : e.provider.localeCompare(t.provider));
468
+ let r = {
469
+ provider: "",
470
+ prefix: "",
471
+ name: ""
472
+ };
473
+ return e.forEach((e) => {
474
+ if (r.name === e.name && r.prefix === e.prefix && r.provider === e.provider) return;
475
+ r = e;
476
+ let i = e.provider, a = e.prefix, o = e.name, s = n[i] || (n[i] = Object.create(null)), c = s[a] || (s[a] = w(i, a)), l;
477
+ l = o in c.icons ? t.loaded : a === "" || c.missing.has(o) ? t.missing : t.pending;
478
+ let u = {
479
+ provider: i,
480
+ prefix: a,
481
+ name: o
482
+ };
483
+ l.push(u);
484
+ }), t;
485
+ }
486
+ function Ae(e, t = !0, n = !1) {
487
+ let r = [];
488
+ return e.forEach((e) => {
489
+ let i = typeof e == "string" ? f(e, t, n) : e;
490
+ i && r.push(i);
491
+ }), r;
492
+ }
493
+ var je = {
494
+ resources: [],
495
+ index: 0,
496
+ timeout: 2e3,
497
+ rotate: 750,
498
+ random: !1,
499
+ dataAfterTimeout: !1
500
+ };
501
+ function Me(e, t, n, r) {
502
+ let i = e.resources.length, a = e.random ? Math.floor(Math.random() * i) : e.index, o;
503
+ if (e.random) {
504
+ let t = e.resources.slice(0);
505
+ for (o = []; t.length > 1;) {
506
+ let e = Math.floor(Math.random() * t.length);
507
+ o.push(t[e]), t = t.slice(0, e).concat(t.slice(e + 1));
508
+ }
509
+ o = o.concat(t);
510
+ } else o = e.resources.slice(a).concat(e.resources.slice(0, a));
511
+ let s = Date.now(), c = "pending", l = 0, u, d = null, f = [], p = [];
512
+ typeof r == "function" && p.push(r);
513
+ function m() {
514
+ d &&= (clearTimeout(d), null);
515
+ }
516
+ function h() {
517
+ c === "pending" && (c = "aborted"), m(), f.forEach((e) => {
518
+ e.status === "pending" && (e.status = "aborted");
519
+ }), f = [];
520
+ }
521
+ function g(e, t) {
522
+ t && (p = []), typeof e == "function" && p.push(e);
523
+ }
524
+ function _() {
525
+ return {
526
+ startTime: s,
527
+ payload: t,
528
+ status: c,
529
+ queriesSent: l,
530
+ queriesPending: f.length,
531
+ subscribe: g,
532
+ abort: h
533
+ };
534
+ }
535
+ function v() {
536
+ c = "failed", p.forEach((e) => {
537
+ e(void 0, u);
538
+ });
539
+ }
540
+ function y() {
541
+ f.forEach((e) => {
542
+ e.status === "pending" && (e.status = "aborted");
543
+ }), f = [];
544
+ }
545
+ function b(t, n, r) {
546
+ let i = n !== "success";
547
+ switch (f = f.filter((e) => e !== t), c) {
548
+ case "pending": break;
549
+ case "failed":
550
+ if (i || !e.dataAfterTimeout) return;
551
+ break;
552
+ default: return;
553
+ }
554
+ if (n === "abort") {
555
+ u = r, v();
556
+ return;
557
+ }
558
+ if (i) {
559
+ u = r, f.length || (o.length ? x() : v());
560
+ return;
561
+ }
562
+ if (m(), y(), !e.random) {
563
+ let n = e.resources.indexOf(t.resource);
564
+ n !== -1 && n !== e.index && (e.index = n);
565
+ }
566
+ c = "completed", p.forEach((e) => {
567
+ e(r);
568
+ });
569
+ }
570
+ function x() {
571
+ if (c !== "pending") return;
572
+ m();
573
+ let r = o.shift();
574
+ if (r === void 0) {
575
+ if (f.length) {
576
+ d = setTimeout(() => {
577
+ m(), c === "pending" && (y(), v());
578
+ }, e.timeout);
579
+ return;
580
+ }
581
+ v();
582
+ return;
583
+ }
584
+ let i = {
585
+ status: "pending",
586
+ resource: r,
587
+ callback: (e, t) => {
588
+ b(i, e, t);
589
+ }
590
+ };
591
+ f.push(i), l++, d = setTimeout(x, e.rotate), n(r, t, i.callback);
592
+ }
593
+ return setTimeout(x), _;
594
+ }
595
+ function B(e) {
596
+ let t = {
597
+ ...je,
598
+ ...e
599
+ }, n = [];
600
+ function r() {
601
+ n = n.filter((e) => e().status === "pending");
602
+ }
603
+ function i(e, i, a) {
604
+ let o = Me(t, e, i, (e, t) => {
605
+ r(), a && a(e, t);
606
+ });
607
+ return n.push(o), o;
608
+ }
609
+ function a(e) {
610
+ return n.find((t) => e(t)) || null;
611
+ }
612
+ return {
613
+ query: i,
614
+ find: a,
615
+ setIndex: (e) => {
616
+ t.index = e;
617
+ },
618
+ getIndex: () => t.index,
619
+ cleanup: r
620
+ };
621
+ }
622
+ function V() {}
623
+ var H = Object.create(null);
624
+ function Ne(e) {
625
+ if (!H[e]) {
626
+ let t = L(e);
627
+ if (!t) return;
628
+ H[e] = {
629
+ config: t,
630
+ redundancy: B(t)
631
+ };
632
+ }
633
+ return H[e];
634
+ }
635
+ function Pe(e, t, n) {
636
+ let r, i;
637
+ if (typeof e == "string") {
638
+ let t = M(e);
639
+ if (!t) return n(void 0, 424), V;
640
+ i = t.send;
641
+ let a = Ne(e);
642
+ a && (r = a.redundancy);
643
+ } else {
644
+ let t = N(e);
645
+ if (t) {
646
+ r = B(t);
647
+ let n = M(e.resources ? e.resources[0] : "");
648
+ n && (i = n.send);
649
+ }
650
+ }
651
+ return !r || !i ? (n(void 0, 424), V) : r.query(t, i, n)().abort;
652
+ }
653
+ function U() {}
654
+ function Fe(e) {
655
+ e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
656
+ e.iconsLoaderFlag = !1, Ee(e);
657
+ }));
658
+ }
659
+ function Ie(e) {
660
+ let t = [], n = [];
661
+ return e.forEach((e) => {
662
+ (e.match(d) ? t : n).push(e);
663
+ }), {
664
+ valid: t,
665
+ invalid: n
666
+ };
667
+ }
668
+ function W(e, t, n) {
669
+ function r() {
670
+ let n = e.pendingIcons;
671
+ t.forEach((t) => {
672
+ n && n.delete(t), e.icons[t] || e.missing.add(t);
673
+ });
674
+ }
675
+ if (n && typeof n == "object") try {
676
+ if (!ie(e, n).length) {
677
+ r();
678
+ return;
679
+ }
680
+ } catch (e) {
681
+ console.error(e);
682
+ }
683
+ r(), Fe(e);
684
+ }
685
+ function G(e, t) {
686
+ e instanceof Promise ? e.then((e) => {
687
+ t(e);
688
+ }).catch(() => {
689
+ t(null);
690
+ }) : t(e);
691
+ }
692
+ function Le(e, t) {
693
+ e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
694
+ e.iconsQueueFlag = !1;
695
+ let { provider: t, prefix: n } = e, r = e.iconsToLoad;
696
+ if (delete e.iconsToLoad, !r || !r.length) return;
697
+ let i = e.loadIcon;
698
+ if (e.loadIcons && (r.length > 1 || !i)) {
699
+ G(e.loadIcons(r, n, t), (t) => {
700
+ W(e, r, t);
701
+ });
702
+ return;
703
+ }
704
+ if (i) {
705
+ r.forEach((r) => {
706
+ G(i(r, n, t), (t) => {
707
+ W(e, [r], t ? {
708
+ prefix: n,
709
+ icons: { [r]: t }
710
+ } : null);
711
+ });
712
+ });
713
+ return;
714
+ }
715
+ let { valid: a, invalid: o } = Ie(r);
716
+ if (o.length && W(e, o, null), !a.length) return;
717
+ let s = n.match(d) ? M(t) : null;
718
+ if (!s) {
719
+ W(e, a, null);
720
+ return;
721
+ }
722
+ s.prepare(t, n, a).forEach((n) => {
723
+ Pe(t, n, (t) => {
724
+ W(e, n.icons, t);
725
+ });
726
+ });
727
+ }));
728
+ }
729
+ var K = (e, t) => {
730
+ let n = ke(Ae(e, !0, oe()));
731
+ if (!n.pending.length) {
732
+ let e = !0;
733
+ return t && setTimeout(() => {
734
+ e && t(n.loaded, n.missing, n.pending, U);
735
+ }), () => {
736
+ e = !1;
737
+ };
738
+ }
739
+ let r = Object.create(null), i = [], a, o;
740
+ return n.pending.forEach((e) => {
741
+ let { provider: t, prefix: n } = e;
742
+ if (n === o && t === a) return;
743
+ a = t, o = n, i.push(w(t, n));
744
+ let s = r[t] || (r[t] = Object.create(null));
745
+ s[n] || (s[n] = []);
746
+ }), n.pending.forEach((e) => {
747
+ let { provider: t, prefix: n, name: i } = e, a = w(t, n), o = a.pendingIcons ||= /* @__PURE__ */ new Set();
748
+ o.has(i) || (o.add(i), r[t][n].push(i));
749
+ }), i.forEach((e) => {
750
+ let t = r[e.provider][e.prefix];
751
+ t.length && Le(e, t);
752
+ }), t ? Oe(t, n, i) : U;
753
+ }, Re = (e) => new Promise((t, n) => {
754
+ let r = typeof e == "string" ? f(e, !0) : e;
755
+ if (!r) {
756
+ n(e);
757
+ return;
758
+ }
759
+ K([r || e], (i) => {
760
+ if (i.length && r) {
761
+ let e = se(r);
762
+ if (e) {
763
+ t({
764
+ ..._,
765
+ ...e
766
+ });
767
+ return;
768
+ }
769
+ }
770
+ n(e);
771
+ });
772
+ });
773
+ function ze(e, t) {
774
+ let n = { ...e };
775
+ for (let e in t) {
776
+ let r = t[e], i = typeof r;
777
+ e in ce ? (r === null || r && (i === "string" || i === "number")) && (n[e] = r) : i === typeof n[e] && (n[e] = e === "rotate" ? r % 4 : r);
778
+ }
779
+ return n;
780
+ }
781
+ var Be = /[\s,]+/;
782
+ function Ve(e, t) {
783
+ t.split(Be).forEach((t) => {
784
+ switch (t.trim()) {
785
+ case "horizontal":
786
+ e.hFlip = !0;
787
+ break;
788
+ case "vertical":
789
+ e.vFlip = !0;
790
+ break;
791
+ }
792
+ });
793
+ }
794
+ function He(e, t = 0) {
795
+ let n = e.replace(/^-?[0-9.]*/, "");
796
+ function r(e) {
797
+ for (; e < 0;) e += 4;
798
+ return e % 4;
799
+ }
800
+ if (n === "") {
801
+ let t = parseInt(e);
802
+ return isNaN(t) ? 0 : r(t);
803
+ } else if (n !== e) {
804
+ let t = 0;
805
+ switch (n) {
806
+ case "%":
807
+ t = 25;
808
+ break;
809
+ case "deg": t = 90;
810
+ }
811
+ if (t) {
812
+ let i = parseFloat(e.slice(0, e.length - n.length));
813
+ return isNaN(i) ? 0 : (i /= t, i % 1 == 0 ? r(i) : 0);
814
+ }
815
+ }
816
+ return t;
817
+ }
818
+ function Ue(e, t) {
819
+ let n = e.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
820
+ for (let e in t) n += " " + e + "=\"" + t[e] + "\"";
821
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + n + ">" + e + "</svg>";
822
+ }
823
+ function We(e) {
824
+ return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
825
+ }
826
+ function Ge(e) {
827
+ return "data:image/svg+xml," + We(e);
828
+ }
829
+ function Ke(e) {
830
+ return "url(\"" + Ge(e) + "\")";
831
+ }
832
+ var q = {
833
+ ...O,
834
+ inline: !1
835
+ }, qe = {
836
+ xmlns: "http://www.w3.org/2000/svg",
837
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
838
+ "aria-hidden": !0,
839
+ role: "img"
840
+ }, Je = { display: "inline-block" }, J = { backgroundColor: "currentColor" }, Ye = { backgroundColor: "transparent" }, Xe = {
841
+ Image: "var(--svg)",
842
+ Repeat: "no-repeat",
843
+ Size: "100% 100%"
844
+ }, Ze = {
845
+ webkitMask: J,
846
+ mask: J,
847
+ background: Ye
848
+ };
849
+ for (let e in Ze) {
850
+ let t = Ze[e];
851
+ for (let n in Xe) t[e + n] = Xe[n];
852
+ }
853
+ var Y = {};
854
+ ["horizontal", "vertical"].forEach((e) => {
855
+ let t = e.slice(0, 1) + "Flip";
856
+ Y[e + "-flip"] = t, Y[e.slice(0, 1) + "-flip"] = t, Y[e + "Flip"] = t;
857
+ });
858
+ function Qe(e) {
859
+ return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
860
+ }
861
+ var $e = (e, t) => {
862
+ let r = ze(q, t), i = { ...qe }, a = t.mode || "svg", o = {}, s = t.style, c = typeof s == "object" && !(s instanceof Array) ? s : {};
863
+ for (let e in t) {
864
+ let n = t[e];
865
+ if (n !== void 0) switch (e) {
866
+ case "icon":
867
+ case "style":
868
+ case "onLoad":
869
+ case "mode":
870
+ case "ssr":
871
+ case "customise": break;
872
+ case "inline":
873
+ case "hFlip":
874
+ case "vFlip":
875
+ r[e] = n === !0 || n === "true" || n === 1;
876
+ break;
877
+ case "flip":
878
+ typeof n == "string" && Ve(r, n);
879
+ break;
880
+ case "color":
881
+ o.color = n;
882
+ break;
883
+ case "rotate":
884
+ typeof n == "string" ? r[e] = He(n) : typeof n == "number" && (r[e] = n);
885
+ break;
886
+ case "ariaHidden":
887
+ case "aria-hidden":
888
+ n !== !0 && n !== "true" && delete i["aria-hidden"];
889
+ break;
890
+ default: {
891
+ let t = Y[e];
892
+ t ? (n === !0 || n === "true" || n === 1) && (r[t] = !0) : q[e] === void 0 && (i[e] = n);
893
+ }
894
+ }
895
+ }
896
+ let l = he(e, r), u = l.attributes;
897
+ if (r.inline && (o.verticalAlign = "-0.125em"), a === "svg") return i.style = {
898
+ ...o,
899
+ ...c
900
+ }, Object.assign(i, u), i.innerHTML = ve(l.body), n("svg", i);
901
+ let { body: d, width: f, height: p } = e, m = a === "mask" || (a === "bg" ? !1 : d.indexOf("currentColor") !== -1), h = Ue(d, {
902
+ ...u,
903
+ width: f + "",
904
+ height: p + ""
905
+ });
906
+ return i.style = {
907
+ ...o,
908
+ "--svg": Ke(h),
909
+ width: Qe(u.width),
910
+ height: Qe(u.height),
911
+ ...Je,
912
+ ...m ? J : Ye,
913
+ ...c
914
+ }, n("span", i);
915
+ };
916
+ if (oe(!0), ye("", Te), typeof document < "u" && typeof window < "u") {
917
+ let e = window;
918
+ if (e.IconifyPreload !== void 0) {
919
+ let t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
920
+ typeof t == "object" && t && (t instanceof Array ? t : [t]).forEach((e) => {
921
+ try {
922
+ (typeof e != "object" || !e || e instanceof Array || typeof e.icons != "object" || typeof e.prefix != "string" || !D(e)) && console.error(n);
923
+ } catch {
924
+ console.error(n);
925
+ }
926
+ });
927
+ }
928
+ if (e.IconifyProviders !== void 0) {
929
+ let t = e.IconifyProviders;
930
+ if (typeof t == "object" && t) for (let e in t) {
931
+ let n = "IconifyProviders[" + e + "] is invalid.";
932
+ try {
933
+ let r = t[e];
934
+ if (typeof r != "object" || !r || r.resources === void 0) continue;
935
+ be(e, r) || console.error(n);
936
+ } catch {
937
+ console.error(n);
938
+ }
939
+ }
940
+ }
941
+ }
942
+ var et = {
943
+ ..._,
944
+ body: ""
945
+ }, tt = t((e, { emit: t }) => {
946
+ let n = s(null);
947
+ function r() {
948
+ n.value &&= (n.value.abort?.(), null);
949
+ }
950
+ let l = s(!!e.ssr), d = s(""), p = c(null);
951
+ function m() {
952
+ let a = e.icon;
953
+ if (typeof a == "object" && a && typeof a.body == "string") return d.value = "", { data: a };
954
+ let o;
955
+ if (typeof a != "string" || (o = f(a, !1, !0)) === null) return null;
956
+ let s = se(o);
957
+ if (!s) {
958
+ let e = n.value;
959
+ return (!e || e.name !== a) && (s === null ? n.value = { name: a } : n.value = {
960
+ name: a,
961
+ abort: K([o], h)
962
+ }), null;
963
+ }
964
+ r(), d.value !== a && (d.value = a, i(() => {
965
+ t("load", a);
966
+ }));
967
+ let c = e.customise;
968
+ if (c) {
969
+ s = Object.assign({}, s);
970
+ let e = c(s.body, o.name, o.prefix, o.provider);
971
+ typeof e == "string" && (s.body = e);
972
+ }
973
+ let l = ["iconify"];
974
+ return o.prefix !== "" && l.push("iconify--" + o.prefix), o.provider !== "" && l.push("iconify--" + o.provider), {
975
+ data: s,
976
+ classes: l
977
+ };
978
+ }
979
+ function h() {
980
+ let e = m();
981
+ e ? e.data !== p.value?.data && (p.value = e) : p.value = null;
982
+ }
983
+ return l.value ? h() : a(() => {
984
+ l.value = !0, h();
985
+ }), u(() => e.icon, h), o(r), () => {
986
+ let t = p.value;
987
+ if (!t) return $e(et, e);
988
+ let n = e;
989
+ return t.classes && (n = {
990
+ ...e,
991
+ class: t.classes.join(" ")
992
+ }), $e({
993
+ ..._,
994
+ ...t.data
995
+ }, n);
996
+ };
997
+ }, {
998
+ props: [
999
+ "icon",
1000
+ "mode",
1001
+ "ssr",
1002
+ "width",
1003
+ "height",
1004
+ "style",
1005
+ "color",
1006
+ "inline",
1007
+ "rotate",
1008
+ "hFlip",
1009
+ "horizontalFlip",
1010
+ "vFlip",
1011
+ "verticalFlip",
1012
+ "flip",
1013
+ "id",
1014
+ "ariaHidden",
1015
+ "customise",
1016
+ "title"
1017
+ ],
1018
+ emits: ["load"]
1019
+ }), nt = Symbol("ccui-config");
1020
+ //#endregion
1021
+ //#region ../ccui/ui/shared/hooks/use-namespace.ts
1022
+ function X(e, t, n) {
1023
+ let r = e;
1024
+ return t && (r += `__${t}`), n && (r += `--${n}`), r;
1025
+ }
1026
+ function rt(e, t = !1) {
1027
+ let n = t ? `.ccui-${e}` : `ccui-${e}`;
1028
+ return {
1029
+ b: () => X(n),
1030
+ e: (e) => e ? X(n, e) : "",
1031
+ m: (e) => e ? X(n, "", e) : "",
1032
+ em: (e, t) => e && t ? X(n, e, t) : "",
1033
+ is: (e) => `is-${e}`
1034
+ };
1035
+ }
1036
+ //#endregion
1037
+ //#region ../ccui/ui/icon/src/icon-registry.ts
1038
+ var Z = /* @__PURE__ */ new Map();
1039
+ function Q(e) {
1040
+ return e.trim();
1041
+ }
1042
+ function it(e, t) {
1043
+ Z.set(Q(e), t);
1044
+ }
1045
+ function at(e) {
1046
+ Z.delete(Q(e));
1047
+ }
1048
+ function ot() {
1049
+ Z.clear();
1050
+ }
1051
+ function st(e) {
1052
+ if (e) return Z.get(Q(e));
1053
+ }
1054
+ //#endregion
1055
+ //#region ../ccui/ui/icon/src/icon-types.ts
1056
+ var ct = {
1057
+ name: {
1058
+ type: String,
1059
+ default: ""
1060
+ },
1061
+ component: {
1062
+ type: Object,
1063
+ default: void 0
1064
+ },
1065
+ size: {
1066
+ type: [Number, String],
1067
+ default: void 0
1068
+ },
1069
+ color: {
1070
+ type: String,
1071
+ default: ""
1072
+ },
1073
+ twoToneColor: {
1074
+ type: String,
1075
+ default: ""
1076
+ },
1077
+ theme: {
1078
+ type: String,
1079
+ default: void 0
1080
+ },
1081
+ themePrefixMap: {
1082
+ type: Object,
1083
+ default: void 0
1084
+ },
1085
+ rotate: {
1086
+ type: Number,
1087
+ default: 0
1088
+ },
1089
+ spin: {
1090
+ type: Boolean,
1091
+ default: !1
1092
+ },
1093
+ spinDirection: {
1094
+ type: String,
1095
+ default: "cw"
1096
+ },
1097
+ loading: {
1098
+ type: Boolean,
1099
+ default: !1
1100
+ },
1101
+ clickable: {
1102
+ type: Boolean,
1103
+ default: !1
1104
+ },
1105
+ disabled: {
1106
+ type: Boolean,
1107
+ default: !1
1108
+ },
1109
+ iconifyPrefix: {
1110
+ type: String,
1111
+ default: ""
1112
+ },
1113
+ title: {
1114
+ type: String,
1115
+ default: ""
1116
+ },
1117
+ ariaLabel: {
1118
+ type: String,
1119
+ default: ""
1120
+ },
1121
+ prefixCls: {
1122
+ type: String,
1123
+ default: ""
1124
+ }
1125
+ }, lt = {
1126
+ prefixCls: "ccui",
1127
+ componentSize: "middle",
1128
+ locale: void 0,
1129
+ direction: "ltr",
1130
+ theme: void 0,
1131
+ iconPrefixCls: "ccui-icon"
1132
+ }, ut = {
1133
+ small: 14,
1134
+ large: 20
1135
+ };
1136
+ function dt(e) {
1137
+ return !!e && e.includes(":");
1138
+ }
1139
+ function ft(e, t) {
1140
+ let n = e === void 0 ? t : e;
1141
+ if (!(n == null || n === "" || n === "default")) return typeof n == "number" ? `${n}px` : n in ut ? `${ut[n]}px` : n;
1142
+ }
1143
+ function pt(e) {
1144
+ return e === "middle" ? "default" : e;
1145
+ }
1146
+ var $ = /* @__PURE__ */ t({
1147
+ name: "CIcon",
1148
+ inheritAttrs: !1,
1149
+ props: ct,
1150
+ emits: ["click"],
1151
+ setup(t, { slots: i, emit: a }) {
1152
+ let o = l(), s = rt("icon"), c = r(nt, lt), u = e(() => t.prefixCls || c.iconPrefixCls || "ccui-icon"), d = e(() => {
1153
+ if (!(!t.theme || !t.themePrefixMap)) return t.themePrefixMap[t.theme];
1154
+ }), f = e(() => t.name ? t.name.includes(":") ? t.name : d.value ? `${d.value}:${t.name}` : t.iconifyPrefix ? `${t.iconifyPrefix}:${t.name}` : t.name : ""), p = e(() => dt(f.value) ? f.value : void 0), m = e(() => {
1155
+ if (t.component) return t.component;
1156
+ if (t.name && !p.value) return st(t.name);
1157
+ }), h = e(() => !!t.name && !p.value && !m.value && !t.component), g = e(() => {
1158
+ let e = {}, n = ft(t.size, pt(c.componentSize));
1159
+ return n && (e.fontSize = n), t.color && (e.color = t.color), t.twoToneColor && (e["--ccui-icon-two-tone-color"] = t.twoToneColor), t.rotate !== void 0 && (e["--ccui-icon-rotate"] = `${t.rotate}deg`), e;
1160
+ }), _ = e(() => ({
1161
+ [s.b()]: !0,
1162
+ [s.m("spin")]: t.spin || t.loading,
1163
+ [s.m("spin-ccw")]: (t.spin || t.loading) && t.spinDirection === "ccw",
1164
+ [s.m("font")]: h.value,
1165
+ [s.m("svg")]: !!m.value || !!p.value || !!i.default,
1166
+ [s.m("iconify")]: !!p.value,
1167
+ [s.m(t.theme)]: !!t.theme,
1168
+ [s.m("clickable")]: t.clickable && !t.disabled,
1169
+ [s.m("disabled")]: t.clickable && t.disabled,
1170
+ [s.m("loading")]: t.loading
1171
+ })), v = (e) => {
1172
+ if (t.clickable && t.disabled) {
1173
+ e.preventDefault(), e.stopPropagation();
1174
+ return;
1175
+ }
1176
+ a("click", e);
1177
+ }, y = (e) => {
1178
+ !t.clickable || t.disabled || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
1179
+ };
1180
+ return () => {
1181
+ let { class: e, style: r, ...a } = o, c;
1182
+ c = t.loading ? n("svg", {
1183
+ viewBox: "0 0 24 24",
1184
+ class: s.e("loading-spinner"),
1185
+ "aria-hidden": "true"
1186
+ }, n("circle", {
1187
+ cx: "12",
1188
+ cy: "12",
1189
+ r: "9",
1190
+ fill: "none",
1191
+ stroke: "currentColor",
1192
+ "stroke-width": "2.5",
1193
+ "stroke-linecap": "round",
1194
+ "stroke-dasharray": "40 18"
1195
+ })) : m.value ? n(m.value) : p.value ? n(tt, { icon: p.value }) : h.value ? n("i", { class: [u.value, `${u.value}-${t.name}`] }) : i.default?.();
1196
+ let l = t.clickable, d = l ? "button" : t.title || t.ariaLabel ? "img" : void 0, f = l ? t.disabled ? -1 : 0 : void 0;
1197
+ return n("span", {
1198
+ ...a,
1199
+ class: [e, _.value],
1200
+ style: [r, g.value],
1201
+ role: d,
1202
+ tabindex: f,
1203
+ "aria-hidden": l || t.title || t.ariaLabel ? void 0 : "true",
1204
+ "aria-label": t.ariaLabel || t.title || void 0,
1205
+ "aria-disabled": l && t.disabled ? "true" : void 0,
1206
+ "aria-busy": t.loading ? "true" : void 0,
1207
+ title: t.title || void 0,
1208
+ onClick: v,
1209
+ onKeydown: y
1210
+ }, c);
1211
+ };
1212
+ }
1213
+ });
1214
+ //#endregion
1215
+ //#region ../ccui/ui/icon/index.ts
1216
+ $.install = function(e) {
1217
+ e.component($.name, $);
1218
+ };
1219
+ var mt = {
1220
+ title: "Icon 图标",
1221
+ category: "通用",
1222
+ status: "100%",
1223
+ install(e) {
1224
+ e.component($.name, $);
1225
+ }
1226
+ };
1227
+ //#endregion
1228
+ export { $ as Icon, be as addAPIProvider, D as addCollection, E as addIcon, ot as clearIconRegistry, mt as default, Re as loadIcon, K as loadIcons, it as registerIcon, st as resolveIcon, at as unregisterIcon };