cck-ui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +3 -0
  3. package/dist/index.css +1 -0
  4. package/dist/index.full.js +2957 -0
  5. package/dist/index.full.min.js +21 -0
  6. package/dist/index.full.min.js.map +1 -0
  7. package/dist/index.full.min.mjs +21 -0
  8. package/dist/index.full.min.mjs.map +1 -0
  9. package/dist/index.full.mjs +2945 -0
  10. package/es/_virtual/_rolldown/runtime.mjs +27 -0
  11. package/es/component.d.ts +6 -0
  12. package/es/component.mjs +8 -0
  13. package/es/component.mjs.map +1 -0
  14. package/es/components/base/style/css.mjs +1 -0
  15. package/es/components/base/style/index.mjs +1 -0
  16. package/es/components/button/index.d.ts +8 -0
  17. package/es/components/button/src/button-custom.d.ts +6 -0
  18. package/es/components/button/src/button.types.d.ts +77 -0
  19. package/es/components/button/src/button.vue.d.ts +28 -0
  20. package/es/components/button/src/use-button.d.ts +14 -0
  21. package/es/components/button/style/css.mjs +2 -0
  22. package/es/components/form/index.d.ts +4 -0
  23. package/es/components/form/src/constants.d.ts +7 -0
  24. package/es/components/form/src/form.types.d.ts +10 -0
  25. package/es/components/form/src/hooks/index.d.ts +2 -0
  26. package/es/components/form/src/hooks/use-form-common-props.d.ts +7 -0
  27. package/es/components/icon/index.d.ts +26 -0
  28. package/es/components/icon/src/icon.types.d.ts +13 -0
  29. package/es/components/icon/src/icon.vue.d.ts +17 -0
  30. package/es/components/icon/style/css.mjs +1 -0
  31. package/es/components/icon/style/index.mjs +1 -0
  32. package/es/components/index.d.ts +5 -0
  33. package/es/constants/index.d.ts +3 -0
  34. package/es/constants/key.d.ts +4 -0
  35. package/es/constants/sizes.d.ts +12 -0
  36. package/es/defaults.d.ts +6 -0
  37. package/es/defaults.mjs +9 -0
  38. package/es/defaults.mjs.map +1 -0
  39. package/es/hooks/index.d.ts +4 -0
  40. package/es/hooks/use-namespace/index.d.ts +27 -0
  41. package/es/hooks/use-prop/index.d.ts +6 -0
  42. package/es/hooks/use-theme/index.d.ts +5 -0
  43. package/es/index.d.ts +11 -0
  44. package/es/index.mjs +11 -0
  45. package/es/index.mjs.map +1 -0
  46. package/es/make-installer.d.ts +8 -0
  47. package/es/make-installer.mjs +14 -0
  48. package/es/make-installer.mjs.map +1 -0
  49. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/conversion.mjs +268 -0
  50. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/conversion.mjs.map +1 -0
  51. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/css-color-names.mjs +158 -0
  52. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/css-color-names.mjs.map +1 -0
  53. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/format-input.mjs +192 -0
  54. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/format-input.mjs.map +1 -0
  55. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/index.mjs +456 -0
  56. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/index.mjs.map +1 -0
  57. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/util.mjs +65 -0
  58. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/util.mjs.map +1 -0
  59. package/es/node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs +53 -0
  60. package/es/node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs.map +1 -0
  61. package/es/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.runtime.esm-bundler.mjs +22 -0
  62. package/es/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.runtime.esm-bundler.mjs.map +1 -0
  63. package/es/packages/components/button/index.mjs +8 -0
  64. package/es/packages/components/button/index.mjs.map +1 -0
  65. package/es/packages/components/button/src/button-custom.mjs +121 -0
  66. package/es/packages/components/button/src/button-custom.mjs.map +1 -0
  67. package/es/packages/components/button/src/button.mjs +7 -0
  68. package/es/packages/components/button/src/button.mjs.map +1 -0
  69. package/es/packages/components/button/src/button.types.mjs +0 -0
  70. package/es/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs +139 -0
  71. package/es/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  72. package/es/packages/components/button/src/use-button.mjs +41 -0
  73. package/es/packages/components/button/src/use-button.mjs.map +1 -0
  74. package/es/packages/components/form/index.mjs +3 -0
  75. package/es/packages/components/form/src/constants.mjs +6 -0
  76. package/es/packages/components/form/src/constants.mjs.map +1 -0
  77. package/es/packages/components/form/src/form.types.mjs +0 -0
  78. package/es/packages/components/form/src/hooks/index.mjs +2 -0
  79. package/es/packages/components/form/src/hooks/use-form-common-props.mjs +16 -0
  80. package/es/packages/components/form/src/hooks/use-form-common-props.mjs.map +1 -0
  81. package/es/packages/components/icon/index.mjs +8 -0
  82. package/es/packages/components/icon/index.mjs.map +1 -0
  83. package/es/packages/components/icon/src/icon.mjs +7 -0
  84. package/es/packages/components/icon/src/icon.mjs.map +1 -0
  85. package/es/packages/components/icon/src/icon.types.mjs +0 -0
  86. package/es/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.mjs +42 -0
  87. package/es/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  88. package/es/packages/components/index.mjs +3 -0
  89. package/es/packages/constants/index.mjs +3 -0
  90. package/es/packages/constants/key.mjs +6 -0
  91. package/es/packages/constants/key.mjs.map +1 -0
  92. package/es/packages/constants/sizes.mjs +24 -0
  93. package/es/packages/constants/sizes.mjs.map +1 -0
  94. package/es/packages/hooks/index.mjs +4 -0
  95. package/es/packages/hooks/use-namespace/index.mjs +63 -0
  96. package/es/packages/hooks/use-namespace/index.mjs.map +1 -0
  97. package/es/packages/hooks/use-prop/index.mjs +10 -0
  98. package/es/packages/hooks/use-prop/index.mjs.map +1 -0
  99. package/es/packages/hooks/use-theme/index.mjs +19 -0
  100. package/es/packages/hooks/use-theme/index.mjs.map +1 -0
  101. package/es/packages/utils/colors.mjs +109 -0
  102. package/es/packages/utils/colors.mjs.map +1 -0
  103. package/es/packages/utils/dom/index.mjs +2 -0
  104. package/es/packages/utils/dom/style.mjs +11 -0
  105. package/es/packages/utils/dom/style.mjs.map +1 -0
  106. package/es/packages/utils/index.mjs +5 -0
  107. package/es/packages/utils/types.mjs +12 -0
  108. package/es/packages/utils/types.mjs.map +1 -0
  109. package/es/packages/utils/vue/index.mjs +2 -0
  110. package/es/packages/utils/vue/install.mjs +38 -0
  111. package/es/packages/utils/vue/install.mjs.map +1 -0
  112. package/es/packages/utils/vue/typescript.mjs +0 -0
  113. package/es/plugin.d.ts +6 -0
  114. package/es/plugin.mjs +6 -0
  115. package/es/plugin.mjs.map +1 -0
  116. package/es/utils/colors.d.ts +14 -0
  117. package/es/utils/dom/index.d.ts +2 -0
  118. package/es/utils/dom/style.d.ts +4 -0
  119. package/es/utils/index.d.ts +6 -0
  120. package/es/utils/types.d.ts +8 -0
  121. package/es/utils/vue/index.d.ts +3 -0
  122. package/es/utils/vue/install.d.ts +7 -0
  123. package/es/utils/vue/typescript.d.ts +19 -0
  124. package/global.d.ts +8 -0
  125. package/lib/_virtual/_rolldown/runtime.js +37 -0
  126. package/lib/component.d.ts +6 -0
  127. package/lib/component.js +12 -0
  128. package/lib/component.js.map +1 -0
  129. package/lib/components/base/style/css.js +2 -0
  130. package/lib/components/base/style/index.js +2 -0
  131. package/lib/components/button/index.d.ts +8 -0
  132. package/lib/components/button/src/button-custom.d.ts +6 -0
  133. package/lib/components/button/src/button.types.d.ts +77 -0
  134. package/lib/components/button/src/button.vue.d.ts +28 -0
  135. package/lib/components/button/src/use-button.d.ts +14 -0
  136. package/lib/components/button/style/css.js +3 -0
  137. package/lib/components/form/index.d.ts +4 -0
  138. package/lib/components/form/src/constants.d.ts +7 -0
  139. package/lib/components/form/src/form.types.d.ts +10 -0
  140. package/lib/components/form/src/hooks/index.d.ts +2 -0
  141. package/lib/components/form/src/hooks/use-form-common-props.d.ts +7 -0
  142. package/lib/components/icon/index.d.ts +26 -0
  143. package/lib/components/icon/src/icon.types.d.ts +13 -0
  144. package/lib/components/icon/src/icon.vue.d.ts +17 -0
  145. package/lib/components/icon/style/css.js +2 -0
  146. package/lib/components/icon/style/index.js +2 -0
  147. package/lib/components/index.d.ts +5 -0
  148. package/lib/constants/index.d.ts +3 -0
  149. package/lib/constants/key.d.ts +4 -0
  150. package/lib/constants/sizes.d.ts +12 -0
  151. package/lib/defaults.d.ts +6 -0
  152. package/lib/defaults.js +13 -0
  153. package/lib/defaults.js.map +1 -0
  154. package/lib/hooks/index.d.ts +4 -0
  155. package/lib/hooks/use-namespace/index.d.ts +27 -0
  156. package/lib/hooks/use-prop/index.d.ts +6 -0
  157. package/lib/hooks/use-theme/index.d.ts +5 -0
  158. package/lib/index.d.ts +11 -0
  159. package/lib/index.js +19 -0
  160. package/lib/index.js.map +1 -0
  161. package/lib/make-installer.d.ts +8 -0
  162. package/lib/make-installer.js +15 -0
  163. package/lib/make-installer.js.map +1 -0
  164. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/conversion.js +309 -0
  165. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/conversion.js.map +1 -0
  166. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/css-color-names.js +168 -0
  167. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/css-color-names.js.map +1 -0
  168. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/format-input.js +209 -0
  169. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/format-input.js.map +1 -0
  170. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/from-ratio.js +43 -0
  171. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/from-ratio.js.map +1 -0
  172. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/index.js +471 -0
  173. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/index.js.map +1 -0
  174. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/interfaces.js +14 -0
  175. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/interfaces.js.map +1 -0
  176. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/public_api.js +50 -0
  177. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/public_api.js.map +1 -0
  178. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/random.js +255 -0
  179. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/random.js.map +1 -0
  180. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/readability.js +96 -0
  181. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/readability.js.map +1 -0
  182. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/to-ms-filter.js +35 -0
  183. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/to-ms-filter.js.map +1 -0
  184. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/util.js +82 -0
  185. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/util.js.map +1 -0
  186. package/lib/node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.js +53 -0
  187. package/lib/node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.js.map +1 -0
  188. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.js +66 -0
  189. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.js.map +1 -0
  190. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.prod.js +56 -0
  191. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.prod.js.map +1 -0
  192. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index.js +18 -0
  193. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index.js.map +1 -0
  194. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js +14 -0
  195. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js.map +1 -0
  196. package/lib/packages/components/button/index.js +13 -0
  197. package/lib/packages/components/button/index.js.map +1 -0
  198. package/lib/packages/components/button/src/button-custom.js +122 -0
  199. package/lib/packages/components/button/src/button-custom.js.map +1 -0
  200. package/lib/packages/components/button/src/button.js +10 -0
  201. package/lib/packages/components/button/src/button.js.map +1 -0
  202. package/lib/packages/components/button/src/button.types.js +1 -0
  203. package/lib/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.js +139 -0
  204. package/lib/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.js.map +1 -0
  205. package/lib/packages/components/button/src/use-button.js +42 -0
  206. package/lib/packages/components/button/src/use-button.js.map +1 -0
  207. package/lib/packages/components/form/index.js +6 -0
  208. package/lib/packages/components/form/src/constants.js +7 -0
  209. package/lib/packages/components/form/src/constants.js.map +1 -0
  210. package/lib/packages/components/form/src/form.types.js +1 -0
  211. package/lib/packages/components/form/src/hooks/index.js +4 -0
  212. package/lib/packages/components/form/src/hooks/use-form-common-props.js +18 -0
  213. package/lib/packages/components/form/src/hooks/use-form-common-props.js.map +1 -0
  214. package/lib/packages/components/icon/index.js +13 -0
  215. package/lib/packages/components/icon/index.js.map +1 -0
  216. package/lib/packages/components/icon/src/icon.js +10 -0
  217. package/lib/packages/components/icon/src/icon.js.map +1 -0
  218. package/lib/packages/components/icon/src/icon.types.js +1 -0
  219. package/lib/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.js +42 -0
  220. package/lib/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.js.map +1 -0
  221. package/lib/packages/components/index.js +5 -0
  222. package/lib/packages/constants/index.js +6 -0
  223. package/lib/packages/constants/key.js +7 -0
  224. package/lib/packages/constants/key.js.map +1 -0
  225. package/lib/packages/constants/sizes.js +26 -0
  226. package/lib/packages/constants/sizes.js.map +1 -0
  227. package/lib/packages/hooks/index.js +10 -0
  228. package/lib/packages/hooks/use-namespace/index.js +67 -0
  229. package/lib/packages/hooks/use-namespace/index.js.map +1 -0
  230. package/lib/packages/hooks/use-prop/index.js +11 -0
  231. package/lib/packages/hooks/use-prop/index.js.map +1 -0
  232. package/lib/packages/hooks/use-theme/index.js +20 -0
  233. package/lib/packages/hooks/use-theme/index.js.map +1 -0
  234. package/lib/packages/utils/colors.js +112 -0
  235. package/lib/packages/utils/colors.js.map +1 -0
  236. package/lib/packages/utils/dom/index.js +3 -0
  237. package/lib/packages/utils/dom/style.js +13 -0
  238. package/lib/packages/utils/dom/style.js.map +1 -0
  239. package/lib/packages/utils/index.js +21 -0
  240. package/lib/packages/utils/types.js +21 -0
  241. package/lib/packages/utils/types.js.map +1 -0
  242. package/lib/packages/utils/vue/index.js +4 -0
  243. package/lib/packages/utils/vue/install.js +40 -0
  244. package/lib/packages/utils/vue/install.js.map +1 -0
  245. package/lib/packages/utils/vue/typescript.js +1 -0
  246. package/lib/plugin.d.ts +6 -0
  247. package/lib/plugin.js +10 -0
  248. package/lib/plugin.js.map +1 -0
  249. package/lib/utils/colors.d.ts +14 -0
  250. package/lib/utils/dom/index.d.ts +2 -0
  251. package/lib/utils/dom/style.d.ts +4 -0
  252. package/lib/utils/index.d.ts +6 -0
  253. package/lib/utils/types.d.ts +8 -0
  254. package/lib/utils/vue/index.d.ts +3 -0
  255. package/lib/utils/vue/install.d.ts +7 -0
  256. package/lib/utils/vue/typescript.d.ts +19 -0
  257. package/package.json +69 -0
  258. package/theme-slate/base.css +1 -0
  259. package/theme-slate/cu-button.css +1 -0
  260. package/theme-slate/cu-common.css +1 -0
  261. package/theme-slate/cu-icon.css +1 -0
  262. package/theme-slate/cu-var.css +1 -0
  263. package/theme-slate/dark/css-vars.css +0 -0
  264. package/theme-slate/index.css +1 -0
  265. package/theme-slate/src/base.scss +2 -0
  266. package/theme-slate/src/button.scss +317 -0
  267. package/theme-slate/src/common/var.scss +179 -0
  268. package/theme-slate/src/common.scss +9 -0
  269. package/theme-slate/src/dark/css-vars.scss +0 -0
  270. package/theme-slate/src/icon.scss +43 -0
  271. package/theme-slate/src/index.scss +4 -0
  272. package/theme-slate/src/mixins/_var.scss +9 -0
  273. package/theme-slate/src/mixins/config.scss +5 -0
  274. package/theme-slate/src/mixins/function.scss +11 -0
  275. package/theme-slate/src/mixins/mixins.scss +19 -0
  276. package/theme-slate/src/var.scss +297 -0
@@ -0,0 +1,2945 @@
1
+ /*! CCK UI v0.0.1 */
2
+
3
+ //#region ../../packages/cck-ui/make-installer.ts
4
+ const INSTALLED_KEY = Symbol("INSTALLED_KEY");
5
+ const makeInstaller = (components) => {
6
+ const install = (app) => {
7
+ if (app[INSTALLED_KEY]) return;
8
+ app[INSTALLED_KEY] = true;
9
+ components.forEach((c) => app.use(c));
10
+ };
11
+ return { install };
12
+ };
13
+
14
+ //#endregion
15
+ //#region ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/util.js
16
+ function bound01(n, max) {
17
+ if (isOnePointZero(n)) n = "100%";
18
+ const isPercent = isPercentage(n);
19
+ n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
20
+ if (isPercent) n = parseInt(String(n * max), 10) / 100;
21
+ if (Math.abs(n - max) < 1e-6) return 1;
22
+ if (max === 360) n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
23
+ else n = n % max / parseFloat(String(max));
24
+ return n;
25
+ }
26
+ function clamp01(val) {
27
+ return Math.min(1, Math.max(0, val));
28
+ }
29
+ function isOnePointZero(n) {
30
+ return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
31
+ }
32
+ function isPercentage(n) {
33
+ return typeof n === "string" && n.indexOf("%") !== -1;
34
+ }
35
+ function boundAlpha(a) {
36
+ a = parseFloat(a);
37
+ if (isNaN(a) || a < 0 || a > 1) a = 1;
38
+ return a;
39
+ }
40
+ function convertToPercentage(n) {
41
+ if (Number(n) <= 1) return `${Number(n) * 100}%`;
42
+ return n;
43
+ }
44
+ function pad2(c) {
45
+ return c.length === 1 ? "0" + c : String(c);
46
+ }
47
+
48
+ //#endregion
49
+ //#region ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/conversion.js
50
+ function rgbToRgb(r, g, b) {
51
+ return {
52
+ r: bound01(r, 255) * 255,
53
+ g: bound01(g, 255) * 255,
54
+ b: bound01(b, 255) * 255
55
+ };
56
+ }
57
+ function rgbToHsl(r, g, b) {
58
+ r = bound01(r, 255);
59
+ g = bound01(g, 255);
60
+ b = bound01(b, 255);
61
+ const max = Math.max(r, g, b);
62
+ const min = Math.min(r, g, b);
63
+ let h = 0;
64
+ let s = 0;
65
+ const l = (max + min) / 2;
66
+ if (max === min) {
67
+ s = 0;
68
+ h = 0;
69
+ } else {
70
+ const d = max - min;
71
+ s = l > .5 ? d / (2 - max - min) : d / (max + min);
72
+ switch (max) {
73
+ case r:
74
+ h = (g - b) / d + (g < b ? 6 : 0);
75
+ break;
76
+ case g:
77
+ h = (b - r) / d + 2;
78
+ break;
79
+ case b:
80
+ h = (r - g) / d + 4;
81
+ break;
82
+ default: break;
83
+ }
84
+ h /= 6;
85
+ }
86
+ return {
87
+ h,
88
+ s,
89
+ l
90
+ };
91
+ }
92
+ function hue2rgb(p, q, t) {
93
+ if (t < 0) t += 1;
94
+ if (t > 1) t -= 1;
95
+ if (t < 1 / 6) return p + (q - p) * (6 * t);
96
+ if (t < 1 / 2) return q;
97
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
98
+ return p;
99
+ }
100
+ function hslToRgb(h, s, l) {
101
+ let r;
102
+ let g;
103
+ let b;
104
+ h = bound01(h, 360);
105
+ s = bound01(s, 100);
106
+ l = bound01(l, 100);
107
+ if (s === 0) {
108
+ g = l;
109
+ b = l;
110
+ r = l;
111
+ } else {
112
+ const q = l < .5 ? l * (1 + s) : l + s - l * s;
113
+ const p = 2 * l - q;
114
+ r = hue2rgb(p, q, h + 1 / 3);
115
+ g = hue2rgb(p, q, h);
116
+ b = hue2rgb(p, q, h - 1 / 3);
117
+ }
118
+ return {
119
+ r: r * 255,
120
+ g: g * 255,
121
+ b: b * 255
122
+ };
123
+ }
124
+ function rgbToHsv(r, g, b) {
125
+ r = bound01(r, 255);
126
+ g = bound01(g, 255);
127
+ b = bound01(b, 255);
128
+ const max = Math.max(r, g, b);
129
+ const min = Math.min(r, g, b);
130
+ let h = 0;
131
+ const v = max;
132
+ const d = max - min;
133
+ const s = max === 0 ? 0 : d / max;
134
+ if (max === min) h = 0;
135
+ else {
136
+ switch (max) {
137
+ case r:
138
+ h = (g - b) / d + (g < b ? 6 : 0);
139
+ break;
140
+ case g:
141
+ h = (b - r) / d + 2;
142
+ break;
143
+ case b:
144
+ h = (r - g) / d + 4;
145
+ break;
146
+ default: break;
147
+ }
148
+ h /= 6;
149
+ }
150
+ return {
151
+ h,
152
+ s,
153
+ v
154
+ };
155
+ }
156
+ function hsvToRgb(h, s, v) {
157
+ h = bound01(h, 360) * 6;
158
+ s = bound01(s, 100);
159
+ v = bound01(v, 100);
160
+ const i = Math.floor(h);
161
+ const f = h - i;
162
+ const p = v * (1 - s);
163
+ const q = v * (1 - f * s);
164
+ const t = v * (1 - (1 - f) * s);
165
+ const mod = i % 6;
166
+ const r = [
167
+ v,
168
+ q,
169
+ p,
170
+ p,
171
+ t,
172
+ v
173
+ ][mod];
174
+ const g = [
175
+ t,
176
+ v,
177
+ v,
178
+ q,
179
+ p,
180
+ p
181
+ ][mod];
182
+ const b = [
183
+ p,
184
+ p,
185
+ t,
186
+ v,
187
+ v,
188
+ q
189
+ ][mod];
190
+ return {
191
+ r: r * 255,
192
+ g: g * 255,
193
+ b: b * 255
194
+ };
195
+ }
196
+ function rgbToHex(r, g, b, allow3Char) {
197
+ const hex = [
198
+ pad2(Math.round(r).toString(16)),
199
+ pad2(Math.round(g).toString(16)),
200
+ pad2(Math.round(b).toString(16))
201
+ ];
202
+ if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
203
+ return hex.join("");
204
+ }
205
+ function rgbaToHex(r, g, b, a, allow4Char) {
206
+ const hex = [
207
+ pad2(Math.round(r).toString(16)),
208
+ pad2(Math.round(g).toString(16)),
209
+ pad2(Math.round(b).toString(16)),
210
+ pad2(convertDecimalToHex(a))
211
+ ];
212
+ if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
213
+ return hex.join("");
214
+ }
215
+ function cmykToRgb(c, m, y, k) {
216
+ const cConv = c / 100;
217
+ const mConv = m / 100;
218
+ const yConv = y / 100;
219
+ const kConv = k / 100;
220
+ return {
221
+ r: 255 * (1 - cConv) * (1 - kConv),
222
+ g: 255 * (1 - mConv) * (1 - kConv),
223
+ b: 255 * (1 - yConv) * (1 - kConv)
224
+ };
225
+ }
226
+ function rgbToCmyk(r, g, b) {
227
+ let c = 1 - r / 255;
228
+ let m = 1 - g / 255;
229
+ let y = 1 - b / 255;
230
+ let k = Math.min(c, m, y);
231
+ if (k === 1) {
232
+ c = 0;
233
+ m = 0;
234
+ y = 0;
235
+ } else {
236
+ c = (c - k) / (1 - k) * 100;
237
+ m = (m - k) / (1 - k) * 100;
238
+ y = (y - k) / (1 - k) * 100;
239
+ }
240
+ k *= 100;
241
+ return {
242
+ c: Math.round(c),
243
+ m: Math.round(m),
244
+ y: Math.round(y),
245
+ k: Math.round(k)
246
+ };
247
+ }
248
+ function convertDecimalToHex(d) {
249
+ return Math.round(parseFloat(d) * 255).toString(16);
250
+ }
251
+ function convertHexToDecimal(h) {
252
+ return parseIntFromHex(h) / 255;
253
+ }
254
+ function parseIntFromHex(val) {
255
+ return parseInt(val, 16);
256
+ }
257
+ function numberInputToObject(color) {
258
+ return {
259
+ r: color >> 16,
260
+ g: (color & 65280) >> 8,
261
+ b: color & 255
262
+ };
263
+ }
264
+
265
+ //#endregion
266
+ //#region ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js
267
+ const names = {
268
+ aliceblue: "#f0f8ff",
269
+ antiquewhite: "#faebd7",
270
+ aqua: "#00ffff",
271
+ aquamarine: "#7fffd4",
272
+ azure: "#f0ffff",
273
+ beige: "#f5f5dc",
274
+ bisque: "#ffe4c4",
275
+ black: "#000000",
276
+ blanchedalmond: "#ffebcd",
277
+ blue: "#0000ff",
278
+ blueviolet: "#8a2be2",
279
+ brown: "#a52a2a",
280
+ burlywood: "#deb887",
281
+ cadetblue: "#5f9ea0",
282
+ chartreuse: "#7fff00",
283
+ chocolate: "#d2691e",
284
+ coral: "#ff7f50",
285
+ cornflowerblue: "#6495ed",
286
+ cornsilk: "#fff8dc",
287
+ crimson: "#dc143c",
288
+ cyan: "#00ffff",
289
+ darkblue: "#00008b",
290
+ darkcyan: "#008b8b",
291
+ darkgoldenrod: "#b8860b",
292
+ darkgray: "#a9a9a9",
293
+ darkgreen: "#006400",
294
+ darkgrey: "#a9a9a9",
295
+ darkkhaki: "#bdb76b",
296
+ darkmagenta: "#8b008b",
297
+ darkolivegreen: "#556b2f",
298
+ darkorange: "#ff8c00",
299
+ darkorchid: "#9932cc",
300
+ darkred: "#8b0000",
301
+ darksalmon: "#e9967a",
302
+ darkseagreen: "#8fbc8f",
303
+ darkslateblue: "#483d8b",
304
+ darkslategray: "#2f4f4f",
305
+ darkslategrey: "#2f4f4f",
306
+ darkturquoise: "#00ced1",
307
+ darkviolet: "#9400d3",
308
+ deeppink: "#ff1493",
309
+ deepskyblue: "#00bfff",
310
+ dimgray: "#696969",
311
+ dimgrey: "#696969",
312
+ dodgerblue: "#1e90ff",
313
+ firebrick: "#b22222",
314
+ floralwhite: "#fffaf0",
315
+ forestgreen: "#228b22",
316
+ fuchsia: "#ff00ff",
317
+ gainsboro: "#dcdcdc",
318
+ ghostwhite: "#f8f8ff",
319
+ goldenrod: "#daa520",
320
+ gold: "#ffd700",
321
+ gray: "#808080",
322
+ green: "#008000",
323
+ greenyellow: "#adff2f",
324
+ grey: "#808080",
325
+ honeydew: "#f0fff0",
326
+ hotpink: "#ff69b4",
327
+ indianred: "#cd5c5c",
328
+ indigo: "#4b0082",
329
+ ivory: "#fffff0",
330
+ khaki: "#f0e68c",
331
+ lavenderblush: "#fff0f5",
332
+ lavender: "#e6e6fa",
333
+ lawngreen: "#7cfc00",
334
+ lemonchiffon: "#fffacd",
335
+ lightblue: "#add8e6",
336
+ lightcoral: "#f08080",
337
+ lightcyan: "#e0ffff",
338
+ lightgoldenrodyellow: "#fafad2",
339
+ lightgray: "#d3d3d3",
340
+ lightgreen: "#90ee90",
341
+ lightgrey: "#d3d3d3",
342
+ lightpink: "#ffb6c1",
343
+ lightsalmon: "#ffa07a",
344
+ lightseagreen: "#20b2aa",
345
+ lightskyblue: "#87cefa",
346
+ lightslategray: "#778899",
347
+ lightslategrey: "#778899",
348
+ lightsteelblue: "#b0c4de",
349
+ lightyellow: "#ffffe0",
350
+ lime: "#00ff00",
351
+ limegreen: "#32cd32",
352
+ linen: "#faf0e6",
353
+ magenta: "#ff00ff",
354
+ maroon: "#800000",
355
+ mediumaquamarine: "#66cdaa",
356
+ mediumblue: "#0000cd",
357
+ mediumorchid: "#ba55d3",
358
+ mediumpurple: "#9370db",
359
+ mediumseagreen: "#3cb371",
360
+ mediumslateblue: "#7b68ee",
361
+ mediumspringgreen: "#00fa9a",
362
+ mediumturquoise: "#48d1cc",
363
+ mediumvioletred: "#c71585",
364
+ midnightblue: "#191970",
365
+ mintcream: "#f5fffa",
366
+ mistyrose: "#ffe4e1",
367
+ moccasin: "#ffe4b5",
368
+ navajowhite: "#ffdead",
369
+ navy: "#000080",
370
+ oldlace: "#fdf5e6",
371
+ olive: "#808000",
372
+ olivedrab: "#6b8e23",
373
+ orange: "#ffa500",
374
+ orangered: "#ff4500",
375
+ orchid: "#da70d6",
376
+ palegoldenrod: "#eee8aa",
377
+ palegreen: "#98fb98",
378
+ paleturquoise: "#afeeee",
379
+ palevioletred: "#db7093",
380
+ papayawhip: "#ffefd5",
381
+ peachpuff: "#ffdab9",
382
+ peru: "#cd853f",
383
+ pink: "#ffc0cb",
384
+ plum: "#dda0dd",
385
+ powderblue: "#b0e0e6",
386
+ purple: "#800080",
387
+ rebeccapurple: "#663399",
388
+ red: "#ff0000",
389
+ rosybrown: "#bc8f8f",
390
+ royalblue: "#4169e1",
391
+ saddlebrown: "#8b4513",
392
+ salmon: "#fa8072",
393
+ sandybrown: "#f4a460",
394
+ seagreen: "#2e8b57",
395
+ seashell: "#fff5ee",
396
+ sienna: "#a0522d",
397
+ silver: "#c0c0c0",
398
+ skyblue: "#87ceeb",
399
+ slateblue: "#6a5acd",
400
+ slategray: "#708090",
401
+ slategrey: "#708090",
402
+ snow: "#fffafa",
403
+ springgreen: "#00ff7f",
404
+ steelblue: "#4682b4",
405
+ tan: "#d2b48c",
406
+ teal: "#008080",
407
+ thistle: "#d8bfd8",
408
+ tomato: "#ff6347",
409
+ turquoise: "#40e0d0",
410
+ violet: "#ee82ee",
411
+ wheat: "#f5deb3",
412
+ white: "#ffffff",
413
+ whitesmoke: "#f5f5f5",
414
+ yellow: "#ffff00",
415
+ yellowgreen: "#9acd32"
416
+ };
417
+
418
+ //#endregion
419
+ //#region ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/format-input.js
420
+ function inputToRGB(color) {
421
+ let rgb = {
422
+ r: 0,
423
+ g: 0,
424
+ b: 0
425
+ };
426
+ let a = 1;
427
+ let s = null;
428
+ let v = null;
429
+ let l = null;
430
+ let ok = false;
431
+ let format = false;
432
+ if (typeof color === "string") color = stringInputToObject(color);
433
+ if (typeof color === "object") {
434
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
435
+ rgb = rgbToRgb(color.r, color.g, color.b);
436
+ ok = true;
437
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
438
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
439
+ s = convertToPercentage(color.s);
440
+ v = convertToPercentage(color.v);
441
+ rgb = hsvToRgb(color.h, s, v);
442
+ ok = true;
443
+ format = "hsv";
444
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
445
+ s = convertToPercentage(color.s);
446
+ l = convertToPercentage(color.l);
447
+ rgb = hslToRgb(color.h, s, l);
448
+ ok = true;
449
+ format = "hsl";
450
+ } else if (isValidCSSUnit(color.c) && isValidCSSUnit(color.m) && isValidCSSUnit(color.y) && isValidCSSUnit(color.k)) {
451
+ rgb = cmykToRgb(color.c, color.m, color.y, color.k);
452
+ ok = true;
453
+ format = "cmyk";
454
+ }
455
+ if (Object.prototype.hasOwnProperty.call(color, "a")) a = color.a;
456
+ }
457
+ a = boundAlpha(a);
458
+ return {
459
+ ok,
460
+ format: color.format || format,
461
+ r: Math.min(255, Math.max(rgb.r, 0)),
462
+ g: Math.min(255, Math.max(rgb.g, 0)),
463
+ b: Math.min(255, Math.max(rgb.b, 0)),
464
+ a
465
+ };
466
+ }
467
+ const matchers = {
468
+ CSS_UNIT: /* @__PURE__ */ new RegExp("(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)"),
469
+ rgb: /* @__PURE__ */ new RegExp("rgb[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
470
+ rgba: /* @__PURE__ */ new RegExp("rgba[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
471
+ hsl: /* @__PURE__ */ new RegExp("hsl[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
472
+ hsla: /* @__PURE__ */ new RegExp("hsla[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
473
+ hsv: /* @__PURE__ */ new RegExp("hsv[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
474
+ hsva: /* @__PURE__ */ new RegExp("hsva[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
475
+ cmyk: /* @__PURE__ */ new RegExp("cmyk[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
476
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
477
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
478
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
479
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
480
+ };
481
+ function stringInputToObject(color) {
482
+ color = color.trim().toLowerCase();
483
+ if (color.length === 0) return false;
484
+ let named = false;
485
+ if (names[color]) {
486
+ color = names[color];
487
+ named = true;
488
+ } else if (color === "transparent") return {
489
+ r: 0,
490
+ g: 0,
491
+ b: 0,
492
+ a: 0,
493
+ format: "name"
494
+ };
495
+ let match = matchers.rgb.exec(color);
496
+ if (match) return {
497
+ r: match[1],
498
+ g: match[2],
499
+ b: match[3]
500
+ };
501
+ match = matchers.rgba.exec(color);
502
+ if (match) return {
503
+ r: match[1],
504
+ g: match[2],
505
+ b: match[3],
506
+ a: match[4]
507
+ };
508
+ match = matchers.hsl.exec(color);
509
+ if (match) return {
510
+ h: match[1],
511
+ s: match[2],
512
+ l: match[3]
513
+ };
514
+ match = matchers.hsla.exec(color);
515
+ if (match) return {
516
+ h: match[1],
517
+ s: match[2],
518
+ l: match[3],
519
+ a: match[4]
520
+ };
521
+ match = matchers.hsv.exec(color);
522
+ if (match) return {
523
+ h: match[1],
524
+ s: match[2],
525
+ v: match[3]
526
+ };
527
+ match = matchers.hsva.exec(color);
528
+ if (match) return {
529
+ h: match[1],
530
+ s: match[2],
531
+ v: match[3],
532
+ a: match[4]
533
+ };
534
+ match = matchers.cmyk.exec(color);
535
+ if (match) return {
536
+ c: match[1],
537
+ m: match[2],
538
+ y: match[3],
539
+ k: match[4]
540
+ };
541
+ match = matchers.hex8.exec(color);
542
+ if (match) return {
543
+ r: parseIntFromHex(match[1]),
544
+ g: parseIntFromHex(match[2]),
545
+ b: parseIntFromHex(match[3]),
546
+ a: convertHexToDecimal(match[4]),
547
+ format: named ? "name" : "hex8"
548
+ };
549
+ match = matchers.hex6.exec(color);
550
+ if (match) return {
551
+ r: parseIntFromHex(match[1]),
552
+ g: parseIntFromHex(match[2]),
553
+ b: parseIntFromHex(match[3]),
554
+ format: named ? "name" : "hex"
555
+ };
556
+ match = matchers.hex4.exec(color);
557
+ if (match) return {
558
+ r: parseIntFromHex(match[1] + match[1]),
559
+ g: parseIntFromHex(match[2] + match[2]),
560
+ b: parseIntFromHex(match[3] + match[3]),
561
+ a: convertHexToDecimal(match[4] + match[4]),
562
+ format: named ? "name" : "hex8"
563
+ };
564
+ match = matchers.hex3.exec(color);
565
+ if (match) return {
566
+ r: parseIntFromHex(match[1] + match[1]),
567
+ g: parseIntFromHex(match[2] + match[2]),
568
+ b: parseIntFromHex(match[3] + match[3]),
569
+ format: named ? "name" : "hex"
570
+ };
571
+ return false;
572
+ }
573
+ function isValidCSSUnit(color) {
574
+ if (typeof color === "number") return !Number.isNaN(color);
575
+ return matchers.CSS_UNIT.test(color);
576
+ }
577
+
578
+ //#endregion
579
+ //#region ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/index.js
580
+ var TinyColor = class TinyColor {
581
+ constructor(color = "", opts = {}) {
582
+ if (color instanceof TinyColor) return color;
583
+ if (typeof color === "number") color = numberInputToObject(color);
584
+ this.originalInput = color;
585
+ const rgb = inputToRGB(color);
586
+ this.originalInput = color;
587
+ this.r = rgb.r;
588
+ this.g = rgb.g;
589
+ this.b = rgb.b;
590
+ this.a = rgb.a;
591
+ this.roundA = Math.round(100 * this.a) / 100;
592
+ this.format = opts.format ?? rgb.format;
593
+ this.gradientType = opts.gradientType;
594
+ if (this.r < 1) this.r = Math.round(this.r);
595
+ if (this.g < 1) this.g = Math.round(this.g);
596
+ if (this.b < 1) this.b = Math.round(this.b);
597
+ this.isValid = rgb.ok;
598
+ }
599
+ isDark() {
600
+ return this.getBrightness() < 128;
601
+ }
602
+ isLight() {
603
+ return !this.isDark();
604
+ }
605
+ getBrightness() {
606
+ const rgb = this.toRgb();
607
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
608
+ }
609
+ getLuminance() {
610
+ const rgb = this.toRgb();
611
+ let R;
612
+ let G;
613
+ let B;
614
+ const RsRGB = rgb.r / 255;
615
+ const GsRGB = rgb.g / 255;
616
+ const BsRGB = rgb.b / 255;
617
+ if (RsRGB <= .03928) R = RsRGB / 12.92;
618
+ else R = Math.pow((RsRGB + .055) / 1.055, 2.4);
619
+ if (GsRGB <= .03928) G = GsRGB / 12.92;
620
+ else G = Math.pow((GsRGB + .055) / 1.055, 2.4);
621
+ if (BsRGB <= .03928) B = BsRGB / 12.92;
622
+ else B = Math.pow((BsRGB + .055) / 1.055, 2.4);
623
+ return .2126 * R + .7152 * G + .0722 * B;
624
+ }
625
+ getAlpha() {
626
+ return this.a;
627
+ }
628
+ setAlpha(alpha) {
629
+ this.a = boundAlpha(alpha);
630
+ this.roundA = Math.round(100 * this.a) / 100;
631
+ return this;
632
+ }
633
+ isMonochrome() {
634
+ const { s } = this.toHsl();
635
+ return s === 0;
636
+ }
637
+ toHsv() {
638
+ const hsv = rgbToHsv(this.r, this.g, this.b);
639
+ return {
640
+ h: hsv.h * 360,
641
+ s: hsv.s,
642
+ v: hsv.v,
643
+ a: this.a
644
+ };
645
+ }
646
+ toHsvString() {
647
+ const hsv = rgbToHsv(this.r, this.g, this.b);
648
+ const h = Math.round(hsv.h * 360);
649
+ const s = Math.round(hsv.s * 100);
650
+ const v = Math.round(hsv.v * 100);
651
+ return this.a === 1 ? `hsv(${h}, ${s}%, ${v}%)` : `hsva(${h}, ${s}%, ${v}%, ${this.roundA})`;
652
+ }
653
+ toHsl() {
654
+ const hsl = rgbToHsl(this.r, this.g, this.b);
655
+ return {
656
+ h: hsl.h * 360,
657
+ s: hsl.s,
658
+ l: hsl.l,
659
+ a: this.a
660
+ };
661
+ }
662
+ toHslString() {
663
+ const hsl = rgbToHsl(this.r, this.g, this.b);
664
+ const h = Math.round(hsl.h * 360);
665
+ const s = Math.round(hsl.s * 100);
666
+ const l = Math.round(hsl.l * 100);
667
+ return this.a === 1 ? `hsl(${h}, ${s}%, ${l}%)` : `hsla(${h}, ${s}%, ${l}%, ${this.roundA})`;
668
+ }
669
+ toHex(allow3Char = false) {
670
+ return rgbToHex(this.r, this.g, this.b, allow3Char);
671
+ }
672
+ toHexString(allow3Char = false) {
673
+ return "#" + this.toHex(allow3Char);
674
+ }
675
+ toHex8(allow4Char = false) {
676
+ return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);
677
+ }
678
+ toHex8String(allow4Char = false) {
679
+ return "#" + this.toHex8(allow4Char);
680
+ }
681
+ toHexShortString(allowShortChar = false) {
682
+ return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
683
+ }
684
+ toRgb() {
685
+ return {
686
+ r: Math.round(this.r),
687
+ g: Math.round(this.g),
688
+ b: Math.round(this.b),
689
+ a: this.a
690
+ };
691
+ }
692
+ toRgbString() {
693
+ const r = Math.round(this.r);
694
+ const g = Math.round(this.g);
695
+ const b = Math.round(this.b);
696
+ return this.a === 1 ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${this.roundA})`;
697
+ }
698
+ toPercentageRgb() {
699
+ const fmt = (x) => `${Math.round(bound01(x, 255) * 100)}%`;
700
+ return {
701
+ r: fmt(this.r),
702
+ g: fmt(this.g),
703
+ b: fmt(this.b),
704
+ a: this.a
705
+ };
706
+ }
707
+ toPercentageRgbString() {
708
+ const rnd = (x) => Math.round(bound01(x, 255) * 100);
709
+ return this.a === 1 ? `rgb(${rnd(this.r)}%, ${rnd(this.g)}%, ${rnd(this.b)}%)` : `rgba(${rnd(this.r)}%, ${rnd(this.g)}%, ${rnd(this.b)}%, ${this.roundA})`;
710
+ }
711
+ toCmyk() {
712
+ return { ...rgbToCmyk(this.r, this.g, this.b) };
713
+ }
714
+ toCmykString() {
715
+ const { c, m, y, k } = rgbToCmyk(this.r, this.g, this.b);
716
+ return `cmyk(${c}, ${m}, ${y}, ${k})`;
717
+ }
718
+ toName() {
719
+ if (this.a === 0) return "transparent";
720
+ if (this.a < 1) return false;
721
+ const hex = "#" + rgbToHex(this.r, this.g, this.b, false);
722
+ for (const [key, value] of Object.entries(names)) if (hex === value) return key;
723
+ return false;
724
+ }
725
+ toString(format) {
726
+ const formatSet = Boolean(format);
727
+ format = format ?? this.format;
728
+ let formattedString = false;
729
+ const hasAlpha = this.a < 1 && this.a >= 0;
730
+ if (!formatSet && hasAlpha && (format.startsWith("hex") || format === "name")) {
731
+ if (format === "name" && this.a === 0) return this.toName();
732
+ return this.toRgbString();
733
+ }
734
+ if (format === "rgb") formattedString = this.toRgbString();
735
+ if (format === "prgb") formattedString = this.toPercentageRgbString();
736
+ if (format === "hex" || format === "hex6") formattedString = this.toHexString();
737
+ if (format === "hex3") formattedString = this.toHexString(true);
738
+ if (format === "hex4") formattedString = this.toHex8String(true);
739
+ if (format === "hex8") formattedString = this.toHex8String();
740
+ if (format === "name") formattedString = this.toName();
741
+ if (format === "hsl") formattedString = this.toHslString();
742
+ if (format === "hsv") formattedString = this.toHsvString();
743
+ if (format === "cmyk") formattedString = this.toCmykString();
744
+ return formattedString || this.toHexString();
745
+ }
746
+ toNumber() {
747
+ return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
748
+ }
749
+ clone() {
750
+ return new TinyColor(this.toString());
751
+ }
752
+ lighten(amount = 10) {
753
+ const hsl = this.toHsl();
754
+ hsl.l += amount / 100;
755
+ hsl.l = clamp01(hsl.l);
756
+ return new TinyColor(hsl);
757
+ }
758
+ brighten(amount = 10) {
759
+ const rgb = this.toRgb();
760
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
761
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
762
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
763
+ return new TinyColor(rgb);
764
+ }
765
+ darken(amount = 10) {
766
+ const hsl = this.toHsl();
767
+ hsl.l -= amount / 100;
768
+ hsl.l = clamp01(hsl.l);
769
+ return new TinyColor(hsl);
770
+ }
771
+ tint(amount = 10) {
772
+ return this.mix("white", amount);
773
+ }
774
+ shade(amount = 10) {
775
+ return this.mix("black", amount);
776
+ }
777
+ desaturate(amount = 10) {
778
+ const hsl = this.toHsl();
779
+ hsl.s -= amount / 100;
780
+ hsl.s = clamp01(hsl.s);
781
+ return new TinyColor(hsl);
782
+ }
783
+ saturate(amount = 10) {
784
+ const hsl = this.toHsl();
785
+ hsl.s += amount / 100;
786
+ hsl.s = clamp01(hsl.s);
787
+ return new TinyColor(hsl);
788
+ }
789
+ greyscale() {
790
+ return this.desaturate(100);
791
+ }
792
+ spin(amount) {
793
+ const hsl = this.toHsl();
794
+ const hue = (hsl.h + amount) % 360;
795
+ hsl.h = hue < 0 ? 360 + hue : hue;
796
+ return new TinyColor(hsl);
797
+ }
798
+ mix(color, amount = 50) {
799
+ const rgb1 = this.toRgb();
800
+ const rgb2 = new TinyColor(color).toRgb();
801
+ const p = amount / 100;
802
+ return new TinyColor({
803
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
804
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
805
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
806
+ a: (rgb2.a - rgb1.a) * p + rgb1.a
807
+ });
808
+ }
809
+ analogous(results = 6, slices = 30) {
810
+ const hsl = this.toHsl();
811
+ const part = 360 / slices;
812
+ const ret = [this];
813
+ for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
814
+ hsl.h = (hsl.h + part) % 360;
815
+ ret.push(new TinyColor(hsl));
816
+ }
817
+ return ret;
818
+ }
819
+ complement() {
820
+ const hsl = this.toHsl();
821
+ hsl.h = (hsl.h + 180) % 360;
822
+ return new TinyColor(hsl);
823
+ }
824
+ monochromatic(results = 6) {
825
+ const hsv = this.toHsv();
826
+ const { h } = hsv;
827
+ const { s } = hsv;
828
+ let { v } = hsv;
829
+ const res = [];
830
+ const modification = 1 / results;
831
+ while (results--) {
832
+ res.push(new TinyColor({
833
+ h,
834
+ s,
835
+ v
836
+ }));
837
+ v = (v + modification) % 1;
838
+ }
839
+ return res;
840
+ }
841
+ splitcomplement() {
842
+ const hsl = this.toHsl();
843
+ const { h } = hsl;
844
+ return [
845
+ this,
846
+ new TinyColor({
847
+ h: (h + 72) % 360,
848
+ s: hsl.s,
849
+ l: hsl.l
850
+ }),
851
+ new TinyColor({
852
+ h: (h + 216) % 360,
853
+ s: hsl.s,
854
+ l: hsl.l
855
+ })
856
+ ];
857
+ }
858
+ onBackground(background) {
859
+ const fg = this.toRgb();
860
+ const bg = new TinyColor(background).toRgb();
861
+ const alpha = fg.a + bg.a * (1 - fg.a);
862
+ return new TinyColor({
863
+ r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
864
+ g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
865
+ b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
866
+ a: alpha
867
+ });
868
+ }
869
+ triad() {
870
+ return this.polyad(3);
871
+ }
872
+ tetrad() {
873
+ return this.polyad(4);
874
+ }
875
+ polyad(n) {
876
+ const hsl = this.toHsl();
877
+ const { h } = hsl;
878
+ const result = [this];
879
+ const increment = 360 / n;
880
+ for (let i = 1; i < n; i++) result.push(new TinyColor({
881
+ h: (h + i * increment) % 360,
882
+ s: hsl.s,
883
+ l: hsl.l
884
+ }));
885
+ return result;
886
+ }
887
+ equals(color) {
888
+ const comparedColor = new TinyColor(color);
889
+ if (this.format === "cmyk" || comparedColor.format === "cmyk") return this.toCmykString() === comparedColor.toCmykString();
890
+ return this.toRgbString() === comparedColor.toRgbString();
891
+ }
892
+ };
893
+
894
+ //#endregion
895
+ //#region ../../packages/utils/colors.ts
896
+ const SATURATIONS = [
897
+ 8,
898
+ 15,
899
+ 30,
900
+ 55,
901
+ 78,
902
+ 95,
903
+ 95,
904
+ 92,
905
+ 88,
906
+ 85
907
+ ];
908
+ const LIGHTNESSES = [
909
+ 95,
910
+ 88,
911
+ 75,
912
+ 62,
913
+ 50,
914
+ 40,
915
+ 32,
916
+ 27,
917
+ 22,
918
+ 18
919
+ ];
920
+ const shadeCache = /* @__PURE__ */ new Map();
921
+ function getNormalizedKey(colorStr) {
922
+ const tc = new TinyColor(colorStr);
923
+ if (!tc.isValid) return null;
924
+ return tc.toHexString();
925
+ }
926
+ function getFormat(colorStr) {
927
+ const fmt = new TinyColor(colorStr).format;
928
+ return fmt === "name" ? "hex" : fmt;
929
+ }
930
+ function generateColorShades(originalColor) {
931
+ const normKey = getNormalizedKey(originalColor);
932
+ if (!normKey) throw new Error(`Invalid color: ${originalColor}`);
933
+ const targetFormat = getFormat(originalColor);
934
+ const cacheKey = `${normKey}|${targetFormat}`;
935
+ if (shadeCache.has(cacheKey)) return shadeCache.get(cacheKey);
936
+ const base = new TinyColor(originalColor);
937
+ if (!base.isValid) throw new Error(`Invalid color: ${originalColor}`);
938
+ const { h } = base.toHsl();
939
+ const shades = [];
940
+ for (let i = 0; i < 10; i++) {
941
+ const color = new TinyColor({
942
+ h,
943
+ s: SATURATIONS[i] / 100,
944
+ l: LIGHTNESSES[i] / 100
945
+ });
946
+ let output;
947
+ switch (targetFormat) {
948
+ case "hex":
949
+ output = color.toHexString();
950
+ break;
951
+ case "rgb":
952
+ output = color.toRgbString();
953
+ break;
954
+ case "hsl":
955
+ output = color.toHslString();
956
+ break;
957
+ case "hsv":
958
+ output = color.toHsvString();
959
+ break;
960
+ default: output = color.toHexString();
961
+ }
962
+ shades.push(output);
963
+ }
964
+ shadeCache.set(cacheKey, shades);
965
+ return shades;
966
+ }
967
+ function setColorAlpha(originalColor, alpha) {
968
+ if (Number.isNaN(Number(alpha))) throw new TypeError(`Invalid alpha: ${alpha}`);
969
+ const tc = new TinyColor(originalColor);
970
+ if (!tc.isValid) throw new Error(`Invalid color: ${originalColor}`);
971
+ const targetFormat = getFormat(originalColor);
972
+ tc.setAlpha(alpha);
973
+ let output;
974
+ switch (targetFormat) {
975
+ case "rgb":
976
+ output = tc.toRgbString();
977
+ break;
978
+ case "hsl":
979
+ output = tc.toHslString();
980
+ break;
981
+ case "hsv":
982
+ output = tc.toHsvString();
983
+ break;
984
+ default: output = tc.toRgbString();
985
+ }
986
+ return output;
987
+ }
988
+
989
+ //#endregion
990
+ //#region ../../node_modules/.pnpm/@vue+shared@3.5.35/node_modules/@vue/shared/dist/shared.esm-bundler.js
991
+ /**
992
+ * @vue/shared v3.5.35
993
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
994
+ * @license MIT
995
+ **/
996
+ // @__NO_SIDE_EFFECTS__
997
+ function makeMap(str) {
998
+ const map = /* @__PURE__ */ Object.create(null);
999
+ for (const key of str.split(",")) map[key] = 1;
1000
+ return (val) => val in map;
1001
+ }
1002
+ const EMPTY_OBJ = {};
1003
+ const EMPTY_ARR = [];
1004
+ const NO = () => false;
1005
+ const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
1006
+ const isModelListener = (key) => key.startsWith("onUpdate:");
1007
+ const extend = Object.assign;
1008
+ const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
1009
+ const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
1010
+ const isArray = Array.isArray;
1011
+ const isMap = (val) => toTypeString(val) === "[object Map]";
1012
+ const isFunction = (val) => typeof val === "function";
1013
+ const isString = (val) => typeof val === "string";
1014
+ const isSymbol = (val) => typeof val === "symbol";
1015
+ const isObject = (val) => val !== null && typeof val === "object";
1016
+ const isPromise = (val) => {
1017
+ return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
1018
+ };
1019
+ const objectToString = Object.prototype.toString;
1020
+ const toTypeString = (value) => objectToString.call(value);
1021
+ const toRawType = (value) => {
1022
+ return toTypeString(value).slice(8, -1);
1023
+ };
1024
+ const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
1025
+ const cacheStringFunction = (fn) => {
1026
+ const cache = /* @__PURE__ */ Object.create(null);
1027
+ return ((str) => {
1028
+ return cache[str] || (cache[str] = fn(str));
1029
+ });
1030
+ };
1031
+ const camelizeRE = /-\w/g;
1032
+ const camelize = cacheStringFunction((str) => {
1033
+ return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
1034
+ });
1035
+ const hyphenateRE = /\B([A-Z])/g;
1036
+ const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
1037
+ const capitalize = cacheStringFunction((str) => {
1038
+ return str.charAt(0).toUpperCase() + str.slice(1);
1039
+ });
1040
+ const toHandlerKey = cacheStringFunction((str) => {
1041
+ return str ? `on${capitalize(str)}` : ``;
1042
+ });
1043
+ const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
1044
+ let _globalThis;
1045
+ const getGlobalThis = () => {
1046
+ return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
1047
+ };
1048
+ function normalizeStyle(value) {
1049
+ if (isArray(value)) {
1050
+ const res = {};
1051
+ for (let i = 0; i < value.length; i++) {
1052
+ const item = value[i];
1053
+ const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
1054
+ if (normalized) for (const key in normalized) res[key] = normalized[key];
1055
+ }
1056
+ return res;
1057
+ } else if (isString(value) || isObject(value)) return value;
1058
+ }
1059
+ const listDelimiterRE = /;(?![^(]*\))/g;
1060
+ const propertyDelimiterRE = /:([^]+)/;
1061
+ const styleCommentRE = /\/\*[^]*?\*\//g;
1062
+ function parseStringStyle(cssText) {
1063
+ const ret = {};
1064
+ cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
1065
+ if (item) {
1066
+ const tmp = item.split(propertyDelimiterRE);
1067
+ tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
1068
+ }
1069
+ });
1070
+ return ret;
1071
+ }
1072
+ function normalizeClass(value) {
1073
+ let res = "";
1074
+ if (isString(value)) res = value;
1075
+ else if (isArray(value)) for (let i = 0; i < value.length; i++) {
1076
+ const normalized = normalizeClass(value[i]);
1077
+ if (normalized) res += normalized + " ";
1078
+ }
1079
+ else if (isObject(value)) {
1080
+ for (const name in value) if (value[name]) res += name + " ";
1081
+ }
1082
+ return res.trim();
1083
+ }
1084
+ const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
1085
+ const isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);
1086
+
1087
+ //#endregion
1088
+ //#region ../../packages/utils/types.ts
1089
+ const isUndefined = (val) => val === void 0;
1090
+ const isNumber = (val) => typeof val === "number";
1091
+ const isStringNumber = (val) => {
1092
+ if (!isString(val)) return false;
1093
+ return !Number.isNaN(Number(val));
1094
+ };
1095
+
1096
+ //#endregion
1097
+ //#region ../../packages/utils/dom/style.ts
1098
+ function addUnit(value, defaultUnit = "px") {
1099
+ if (!value && value !== 0) return "";
1100
+ if (isNumber(value) || isStringNumber(value)) return `${value}${defaultUnit}`;
1101
+ else if (isString(value)) return value;
1102
+ }
1103
+
1104
+ //#endregion
1105
+ //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
1106
+ function isPlainObject(value) {
1107
+ if (!value || typeof value !== "object") return false;
1108
+ const proto = Object.getPrototypeOf(value);
1109
+ if (!(proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null)) return false;
1110
+ return Object.prototype.toString.call(value) === "[object Object]";
1111
+ }
1112
+
1113
+ //#endregion
1114
+ //#region ../../packages/utils/vue/install.ts
1115
+ const withPropsDefaultSetter = (target) => {
1116
+ const _p = target.props;
1117
+ const props = isArray(_p) ? Object.fromEntries(_p.map((key) => [key, {}])) : _p;
1118
+ target.setPropsDefaults = (defaults) => {
1119
+ if (!props) return;
1120
+ for (const [key, value] of Object.entries(defaults)) {
1121
+ const prop = props[key];
1122
+ if (!hasOwn(props, key)) continue;
1123
+ if (isPlainObject(prop)) {
1124
+ props[key] = {
1125
+ ...props,
1126
+ default: value
1127
+ };
1128
+ continue;
1129
+ }
1130
+ props[key] = {
1131
+ type: prop,
1132
+ default: value
1133
+ };
1134
+ }
1135
+ target.props = props;
1136
+ };
1137
+ };
1138
+ const withInstall = (main, extra) => {
1139
+ main.install = (app) => {
1140
+ for (const comp of [main, ...Object.values(extra ?? [])]) app.component(comp.name, comp);
1141
+ };
1142
+ if (extra) for (const [key, comp] of Object.entries(extra)) main[key] = comp;
1143
+ withPropsDefaultSetter(main);
1144
+ return main;
1145
+ };
1146
+
1147
+ //#endregion
1148
+ //#region ../../node_modules/.pnpm/@vue+reactivity@3.5.35/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
1149
+ /**
1150
+ * @vue/reactivity v3.5.35
1151
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
1152
+ * @license MIT
1153
+ **/
1154
+ let activeSub;
1155
+ let batchDepth = 0;
1156
+ let batchedSub;
1157
+ let batchedComputed;
1158
+ function batch(sub, isComputed = false) {
1159
+ sub.flags |= 8;
1160
+ if (isComputed) {
1161
+ sub.next = batchedComputed;
1162
+ batchedComputed = sub;
1163
+ return;
1164
+ }
1165
+ sub.next = batchedSub;
1166
+ batchedSub = sub;
1167
+ }
1168
+ function startBatch() {
1169
+ batchDepth++;
1170
+ }
1171
+ function endBatch() {
1172
+ if (--batchDepth > 0) return;
1173
+ if (batchedComputed) {
1174
+ let e = batchedComputed;
1175
+ batchedComputed = void 0;
1176
+ while (e) {
1177
+ const next = e.next;
1178
+ e.next = void 0;
1179
+ e.flags &= -9;
1180
+ e = next;
1181
+ }
1182
+ }
1183
+ let error;
1184
+ while (batchedSub) {
1185
+ let e = batchedSub;
1186
+ batchedSub = void 0;
1187
+ while (e) {
1188
+ const next = e.next;
1189
+ e.next = void 0;
1190
+ e.flags &= -9;
1191
+ if (e.flags & 1) try {
1192
+ e.trigger();
1193
+ } catch (err) {
1194
+ if (!error) error = err;
1195
+ }
1196
+ e = next;
1197
+ }
1198
+ }
1199
+ if (error) throw error;
1200
+ }
1201
+ function prepareDeps(sub) {
1202
+ for (let link = sub.deps; link; link = link.nextDep) {
1203
+ link.version = -1;
1204
+ link.prevActiveLink = link.dep.activeLink;
1205
+ link.dep.activeLink = link;
1206
+ }
1207
+ }
1208
+ function cleanupDeps(sub) {
1209
+ let head;
1210
+ let tail = sub.depsTail;
1211
+ let link = tail;
1212
+ while (link) {
1213
+ const prev = link.prevDep;
1214
+ if (link.version === -1) {
1215
+ if (link === tail) tail = prev;
1216
+ removeSub(link);
1217
+ removeDep(link);
1218
+ } else head = link;
1219
+ link.dep.activeLink = link.prevActiveLink;
1220
+ link.prevActiveLink = void 0;
1221
+ link = prev;
1222
+ }
1223
+ sub.deps = head;
1224
+ sub.depsTail = tail;
1225
+ }
1226
+ function isDirty(sub) {
1227
+ for (let link = sub.deps; link; link = link.nextDep) if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) return true;
1228
+ if (sub._dirty) return true;
1229
+ return false;
1230
+ }
1231
+ function refreshComputed(computed) {
1232
+ if (computed.flags & 4 && !(computed.flags & 16)) return;
1233
+ computed.flags &= -17;
1234
+ if (computed.globalVersion === globalVersion) return;
1235
+ computed.globalVersion = globalVersion;
1236
+ if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) return;
1237
+ computed.flags |= 2;
1238
+ const dep = computed.dep;
1239
+ const prevSub = activeSub;
1240
+ const prevShouldTrack = shouldTrack;
1241
+ activeSub = computed;
1242
+ shouldTrack = true;
1243
+ try {
1244
+ prepareDeps(computed);
1245
+ const value = computed.fn(computed._value);
1246
+ if (dep.version === 0 || hasChanged(value, computed._value)) {
1247
+ computed.flags |= 128;
1248
+ computed._value = value;
1249
+ dep.version++;
1250
+ }
1251
+ } catch (err) {
1252
+ dep.version++;
1253
+ throw err;
1254
+ } finally {
1255
+ activeSub = prevSub;
1256
+ shouldTrack = prevShouldTrack;
1257
+ cleanupDeps(computed);
1258
+ computed.flags &= -3;
1259
+ }
1260
+ }
1261
+ function removeSub(link, soft = false) {
1262
+ const { dep, prevSub, nextSub } = link;
1263
+ if (prevSub) {
1264
+ prevSub.nextSub = nextSub;
1265
+ link.prevSub = void 0;
1266
+ }
1267
+ if (nextSub) {
1268
+ nextSub.prevSub = prevSub;
1269
+ link.nextSub = void 0;
1270
+ }
1271
+ if (dep.subs === link) {
1272
+ dep.subs = prevSub;
1273
+ if (!prevSub && dep.computed) {
1274
+ dep.computed.flags &= -5;
1275
+ for (let l = dep.computed.deps; l; l = l.nextDep) removeSub(l, true);
1276
+ }
1277
+ }
1278
+ if (!soft && !--dep.sc && dep.map) dep.map.delete(dep.key);
1279
+ }
1280
+ function removeDep(link) {
1281
+ const { prevDep, nextDep } = link;
1282
+ if (prevDep) {
1283
+ prevDep.nextDep = nextDep;
1284
+ link.prevDep = void 0;
1285
+ }
1286
+ if (nextDep) {
1287
+ nextDep.prevDep = prevDep;
1288
+ link.nextDep = void 0;
1289
+ }
1290
+ }
1291
+ let shouldTrack = true;
1292
+ const trackStack = [];
1293
+ function pauseTracking() {
1294
+ trackStack.push(shouldTrack);
1295
+ shouldTrack = false;
1296
+ }
1297
+ function resetTracking() {
1298
+ const last = trackStack.pop();
1299
+ shouldTrack = last === void 0 ? true : last;
1300
+ }
1301
+ let globalVersion = 0;
1302
+ var Link = class {
1303
+ constructor(sub, dep) {
1304
+ this.sub = sub;
1305
+ this.dep = dep;
1306
+ this.version = dep.version;
1307
+ this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
1308
+ }
1309
+ };
1310
+ var Dep = class {
1311
+ constructor(computed) {
1312
+ this.computed = computed;
1313
+ this.version = 0;
1314
+ this.activeLink = void 0;
1315
+ this.subs = void 0;
1316
+ this.map = void 0;
1317
+ this.key = void 0;
1318
+ this.sc = 0;
1319
+ this.__v_skip = true;
1320
+ }
1321
+ track(debugInfo) {
1322
+ if (!activeSub || !shouldTrack || activeSub === this.computed) return;
1323
+ let link = this.activeLink;
1324
+ if (link === void 0 || link.sub !== activeSub) {
1325
+ link = this.activeLink = new Link(activeSub, this);
1326
+ if (!activeSub.deps) activeSub.deps = activeSub.depsTail = link;
1327
+ else {
1328
+ link.prevDep = activeSub.depsTail;
1329
+ activeSub.depsTail.nextDep = link;
1330
+ activeSub.depsTail = link;
1331
+ }
1332
+ addSub(link);
1333
+ } else if (link.version === -1) {
1334
+ link.version = this.version;
1335
+ if (link.nextDep) {
1336
+ const next = link.nextDep;
1337
+ next.prevDep = link.prevDep;
1338
+ if (link.prevDep) link.prevDep.nextDep = next;
1339
+ link.prevDep = activeSub.depsTail;
1340
+ link.nextDep = void 0;
1341
+ activeSub.depsTail.nextDep = link;
1342
+ activeSub.depsTail = link;
1343
+ if (activeSub.deps === link) activeSub.deps = next;
1344
+ }
1345
+ }
1346
+ return link;
1347
+ }
1348
+ trigger(debugInfo) {
1349
+ this.version++;
1350
+ globalVersion++;
1351
+ this.notify(debugInfo);
1352
+ }
1353
+ notify(debugInfo) {
1354
+ startBatch();
1355
+ try {
1356
+ for (let link = this.subs; link; link = link.prevSub) if (link.sub.notify()) link.sub.dep.notify();
1357
+ } finally {
1358
+ endBatch();
1359
+ }
1360
+ }
1361
+ };
1362
+ function addSub(link) {
1363
+ link.dep.sc++;
1364
+ if (link.sub.flags & 4) {
1365
+ const computed = link.dep.computed;
1366
+ if (computed && !link.dep.subs) {
1367
+ computed.flags |= 20;
1368
+ for (let l = computed.deps; l; l = l.nextDep) addSub(l);
1369
+ }
1370
+ const currentTail = link.dep.subs;
1371
+ if (currentTail !== link) {
1372
+ link.prevSub = currentTail;
1373
+ if (currentTail) currentTail.nextSub = link;
1374
+ }
1375
+ link.dep.subs = link;
1376
+ }
1377
+ }
1378
+ const targetMap = /* @__PURE__ */ new WeakMap();
1379
+ const ITERATE_KEY = /* @__PURE__ */ Symbol("");
1380
+ const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol("");
1381
+ const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol("");
1382
+ function track(target, type, key) {
1383
+ if (shouldTrack && activeSub) {
1384
+ let depsMap = targetMap.get(target);
1385
+ if (!depsMap) targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
1386
+ let dep = depsMap.get(key);
1387
+ if (!dep) {
1388
+ depsMap.set(key, dep = new Dep());
1389
+ dep.map = depsMap;
1390
+ dep.key = key;
1391
+ }
1392
+ dep.track();
1393
+ }
1394
+ }
1395
+ function trigger(target, type, key, newValue, oldValue, oldTarget) {
1396
+ const depsMap = targetMap.get(target);
1397
+ if (!depsMap) {
1398
+ globalVersion++;
1399
+ return;
1400
+ }
1401
+ const run = (dep) => {
1402
+ if (dep) dep.trigger();
1403
+ };
1404
+ startBatch();
1405
+ if (type === "clear") depsMap.forEach(run);
1406
+ else {
1407
+ const targetIsArray = isArray(target);
1408
+ const isArrayIndex = targetIsArray && isIntegerKey(key);
1409
+ if (targetIsArray && key === "length") {
1410
+ const newLength = Number(newValue);
1411
+ depsMap.forEach((dep, key2) => {
1412
+ if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) run(dep);
1413
+ });
1414
+ } else {
1415
+ if (key !== void 0 || depsMap.has(void 0)) run(depsMap.get(key));
1416
+ if (isArrayIndex) run(depsMap.get(ARRAY_ITERATE_KEY));
1417
+ switch (type) {
1418
+ case "add":
1419
+ if (!targetIsArray) {
1420
+ run(depsMap.get(ITERATE_KEY));
1421
+ if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
1422
+ } else if (isArrayIndex) run(depsMap.get("length"));
1423
+ break;
1424
+ case "delete":
1425
+ if (!targetIsArray) {
1426
+ run(depsMap.get(ITERATE_KEY));
1427
+ if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
1428
+ }
1429
+ break;
1430
+ case "set":
1431
+ if (isMap(target)) run(depsMap.get(ITERATE_KEY));
1432
+ break;
1433
+ }
1434
+ }
1435
+ }
1436
+ endBatch();
1437
+ }
1438
+ function reactiveReadArray(array) {
1439
+ const raw = /* @__PURE__ */ toRaw(array);
1440
+ if (raw === array) return raw;
1441
+ track(raw, "iterate", ARRAY_ITERATE_KEY);
1442
+ return /* @__PURE__ */ isShallow(array) ? raw : raw.map(toReactive);
1443
+ }
1444
+ function shallowReadArray(arr) {
1445
+ track(arr = /* @__PURE__ */ toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
1446
+ return arr;
1447
+ }
1448
+ function toWrapped(target, item) {
1449
+ if (/* @__PURE__ */ isReadonly(target)) return /* @__PURE__ */ isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
1450
+ return toReactive(item);
1451
+ }
1452
+ const arrayInstrumentations = {
1453
+ __proto__: null,
1454
+ [Symbol.iterator]() {
1455
+ return iterator(this, Symbol.iterator, (item) => toWrapped(this, item));
1456
+ },
1457
+ concat(...args) {
1458
+ return reactiveReadArray(this).concat(...args.map((x) => isArray(x) ? reactiveReadArray(x) : x));
1459
+ },
1460
+ entries() {
1461
+ return iterator(this, "entries", (value) => {
1462
+ value[1] = toWrapped(this, value[1]);
1463
+ return value;
1464
+ });
1465
+ },
1466
+ every(fn, thisArg) {
1467
+ return apply(this, "every", fn, thisArg, void 0, arguments);
1468
+ },
1469
+ filter(fn, thisArg) {
1470
+ return apply(this, "filter", fn, thisArg, (v) => v.map((item) => toWrapped(this, item)), arguments);
1471
+ },
1472
+ find(fn, thisArg) {
1473
+ return apply(this, "find", fn, thisArg, (item) => toWrapped(this, item), arguments);
1474
+ },
1475
+ findIndex(fn, thisArg) {
1476
+ return apply(this, "findIndex", fn, thisArg, void 0, arguments);
1477
+ },
1478
+ findLast(fn, thisArg) {
1479
+ return apply(this, "findLast", fn, thisArg, (item) => toWrapped(this, item), arguments);
1480
+ },
1481
+ findLastIndex(fn, thisArg) {
1482
+ return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
1483
+ },
1484
+ forEach(fn, thisArg) {
1485
+ return apply(this, "forEach", fn, thisArg, void 0, arguments);
1486
+ },
1487
+ includes(...args) {
1488
+ return searchProxy(this, "includes", args);
1489
+ },
1490
+ indexOf(...args) {
1491
+ return searchProxy(this, "indexOf", args);
1492
+ },
1493
+ join(separator) {
1494
+ return reactiveReadArray(this).join(separator);
1495
+ },
1496
+ lastIndexOf(...args) {
1497
+ return searchProxy(this, "lastIndexOf", args);
1498
+ },
1499
+ map(fn, thisArg) {
1500
+ return apply(this, "map", fn, thisArg, void 0, arguments);
1501
+ },
1502
+ pop() {
1503
+ return noTracking(this, "pop");
1504
+ },
1505
+ push(...args) {
1506
+ return noTracking(this, "push", args);
1507
+ },
1508
+ reduce(fn, ...args) {
1509
+ return reduce(this, "reduce", fn, args);
1510
+ },
1511
+ reduceRight(fn, ...args) {
1512
+ return reduce(this, "reduceRight", fn, args);
1513
+ },
1514
+ shift() {
1515
+ return noTracking(this, "shift");
1516
+ },
1517
+ some(fn, thisArg) {
1518
+ return apply(this, "some", fn, thisArg, void 0, arguments);
1519
+ },
1520
+ splice(...args) {
1521
+ return noTracking(this, "splice", args);
1522
+ },
1523
+ toReversed() {
1524
+ return reactiveReadArray(this).toReversed();
1525
+ },
1526
+ toSorted(comparer) {
1527
+ return reactiveReadArray(this).toSorted(comparer);
1528
+ },
1529
+ toSpliced(...args) {
1530
+ return reactiveReadArray(this).toSpliced(...args);
1531
+ },
1532
+ unshift(...args) {
1533
+ return noTracking(this, "unshift", args);
1534
+ },
1535
+ values() {
1536
+ return iterator(this, "values", (item) => toWrapped(this, item));
1537
+ }
1538
+ };
1539
+ function iterator(self, method, wrapValue) {
1540
+ const arr = shallowReadArray(self);
1541
+ const iter = arr[method]();
1542
+ if (arr !== self && !/* @__PURE__ */ isShallow(self)) {
1543
+ iter._next = iter.next;
1544
+ iter.next = () => {
1545
+ const result = iter._next();
1546
+ if (!result.done) result.value = wrapValue(result.value);
1547
+ return result;
1548
+ };
1549
+ }
1550
+ return iter;
1551
+ }
1552
+ const arrayProto = Array.prototype;
1553
+ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1554
+ const arr = shallowReadArray(self);
1555
+ const needsWrap = arr !== self && !/* @__PURE__ */ isShallow(self);
1556
+ const methodFn = arr[method];
1557
+ if (methodFn !== arrayProto[method]) {
1558
+ const result2 = methodFn.apply(self, args);
1559
+ return needsWrap ? toReactive(result2) : result2;
1560
+ }
1561
+ let wrappedFn = fn;
1562
+ if (arr !== self) {
1563
+ if (needsWrap) wrappedFn = function(item, index) {
1564
+ return fn.call(this, toWrapped(self, item), index, self);
1565
+ };
1566
+ else if (fn.length > 2) wrappedFn = function(item, index) {
1567
+ return fn.call(this, item, index, self);
1568
+ };
1569
+ }
1570
+ const result = methodFn.call(arr, wrappedFn, thisArg);
1571
+ return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
1572
+ }
1573
+ function reduce(self, method, fn, args) {
1574
+ const arr = shallowReadArray(self);
1575
+ const needsWrap = arr !== self && !/* @__PURE__ */ isShallow(self);
1576
+ let wrappedFn = fn;
1577
+ let wrapInitialAccumulator = false;
1578
+ if (arr !== self) {
1579
+ if (needsWrap) {
1580
+ wrapInitialAccumulator = args.length === 0;
1581
+ wrappedFn = function(acc, item, index) {
1582
+ if (wrapInitialAccumulator) {
1583
+ wrapInitialAccumulator = false;
1584
+ acc = toWrapped(self, acc);
1585
+ }
1586
+ return fn.call(this, acc, toWrapped(self, item), index, self);
1587
+ };
1588
+ } else if (fn.length > 3) wrappedFn = function(acc, item, index) {
1589
+ return fn.call(this, acc, item, index, self);
1590
+ };
1591
+ }
1592
+ const result = arr[method](wrappedFn, ...args);
1593
+ return wrapInitialAccumulator ? toWrapped(self, result) : result;
1594
+ }
1595
+ function searchProxy(self, method, args) {
1596
+ const arr = /* @__PURE__ */ toRaw(self);
1597
+ track(arr, "iterate", ARRAY_ITERATE_KEY);
1598
+ const res = arr[method](...args);
1599
+ if ((res === -1 || res === false) && /* @__PURE__ */ isProxy(args[0])) {
1600
+ args[0] = /* @__PURE__ */ toRaw(args[0]);
1601
+ return arr[method](...args);
1602
+ }
1603
+ return res;
1604
+ }
1605
+ function noTracking(self, method, args = []) {
1606
+ pauseTracking();
1607
+ startBatch();
1608
+ const res = (/* @__PURE__ */ toRaw(self))[method].apply(self, args);
1609
+ endBatch();
1610
+ resetTracking();
1611
+ return res;
1612
+ }
1613
+ const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
1614
+ const builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
1615
+ function hasOwnProperty(key) {
1616
+ if (!isSymbol(key)) key = String(key);
1617
+ const obj = /* @__PURE__ */ toRaw(this);
1618
+ track(obj, "has", key);
1619
+ return obj.hasOwnProperty(key);
1620
+ }
1621
+ var BaseReactiveHandler = class {
1622
+ constructor(_isReadonly = false, _isShallow = false) {
1623
+ this._isReadonly = _isReadonly;
1624
+ this._isShallow = _isShallow;
1625
+ }
1626
+ get(target, key, receiver) {
1627
+ if (key === "__v_skip") return target["__v_skip"];
1628
+ const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1629
+ if (key === "__v_isReactive") return !isReadonly2;
1630
+ else if (key === "__v_isReadonly") return isReadonly2;
1631
+ else if (key === "__v_isShallow") return isShallow2;
1632
+ else if (key === "__v_raw") {
1633
+ if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) return target;
1634
+ return;
1635
+ }
1636
+ const targetIsArray = isArray(target);
1637
+ if (!isReadonly2) {
1638
+ let fn;
1639
+ if (targetIsArray && (fn = arrayInstrumentations[key])) return fn;
1640
+ if (key === "hasOwnProperty") return hasOwnProperty;
1641
+ }
1642
+ const res = Reflect.get(target, key, /* @__PURE__ */ isRef(target) ? target : receiver);
1643
+ if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) return res;
1644
+ if (!isReadonly2) track(target, "get", key);
1645
+ if (isShallow2) return res;
1646
+ if (/* @__PURE__ */ isRef(res)) {
1647
+ const value = targetIsArray && isIntegerKey(key) ? res : res.value;
1648
+ return isReadonly2 && isObject(value) ? /* @__PURE__ */ readonly(value) : value;
1649
+ }
1650
+ if (isObject(res)) return isReadonly2 ? /* @__PURE__ */ readonly(res) : /* @__PURE__ */ reactive(res);
1651
+ return res;
1652
+ }
1653
+ };
1654
+ var MutableReactiveHandler = class extends BaseReactiveHandler {
1655
+ constructor(isShallow2 = false) {
1656
+ super(false, isShallow2);
1657
+ }
1658
+ set(target, key, value, receiver) {
1659
+ let oldValue = target[key];
1660
+ const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);
1661
+ if (!this._isShallow) {
1662
+ const isOldValueReadonly = /* @__PURE__ */ isReadonly(oldValue);
1663
+ if (!/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {
1664
+ oldValue = /* @__PURE__ */ toRaw(oldValue);
1665
+ value = /* @__PURE__ */ toRaw(value);
1666
+ }
1667
+ if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) if (isOldValueReadonly) return true;
1668
+ else {
1669
+ oldValue.value = value;
1670
+ return true;
1671
+ }
1672
+ }
1673
+ const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
1674
+ const result = Reflect.set(target, key, value, /* @__PURE__ */ isRef(target) ? target : receiver);
1675
+ if (target === /* @__PURE__ */ toRaw(receiver)) {
1676
+ if (!hadKey) trigger(target, "add", key, value);
1677
+ else if (hasChanged(value, oldValue)) trigger(target, "set", key, value, oldValue);
1678
+ }
1679
+ return result;
1680
+ }
1681
+ deleteProperty(target, key) {
1682
+ const hadKey = hasOwn(target, key);
1683
+ const oldValue = target[key];
1684
+ const result = Reflect.deleteProperty(target, key);
1685
+ if (result && hadKey) trigger(target, "delete", key, void 0, oldValue);
1686
+ return result;
1687
+ }
1688
+ has(target, key) {
1689
+ const result = Reflect.has(target, key);
1690
+ if (!isSymbol(key) || !builtInSymbols.has(key)) track(target, "has", key);
1691
+ return result;
1692
+ }
1693
+ ownKeys(target) {
1694
+ track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
1695
+ return Reflect.ownKeys(target);
1696
+ }
1697
+ };
1698
+ var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
1699
+ constructor(isShallow2 = false) {
1700
+ super(true, isShallow2);
1701
+ }
1702
+ set(target, key) {
1703
+ return true;
1704
+ }
1705
+ deleteProperty(target, key) {
1706
+ return true;
1707
+ }
1708
+ };
1709
+ const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
1710
+ const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
1711
+ const toShallow = (value) => value;
1712
+ const getProto = (v) => Reflect.getPrototypeOf(v);
1713
+ function createIterableMethod(method, isReadonly2, isShallow2) {
1714
+ return function(...args) {
1715
+ const target = this["__v_raw"];
1716
+ const rawTarget = /* @__PURE__ */ toRaw(target);
1717
+ const targetIsMap = isMap(rawTarget);
1718
+ const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
1719
+ const isKeyOnly = method === "keys" && targetIsMap;
1720
+ const innerIterator = target[method](...args);
1721
+ const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1722
+ !isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
1723
+ return extend(Object.create(innerIterator), { next() {
1724
+ const { value, done } = innerIterator.next();
1725
+ return done ? {
1726
+ value,
1727
+ done
1728
+ } : {
1729
+ value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
1730
+ done
1731
+ };
1732
+ } });
1733
+ };
1734
+ }
1735
+ function createReadonlyMethod(type) {
1736
+ return function(...args) {
1737
+ return type === "delete" ? false : type === "clear" ? void 0 : this;
1738
+ };
1739
+ }
1740
+ function createInstrumentations(readonly, shallow) {
1741
+ const instrumentations = {
1742
+ get(key) {
1743
+ const target = this["__v_raw"];
1744
+ const rawTarget = /* @__PURE__ */ toRaw(target);
1745
+ const rawKey = /* @__PURE__ */ toRaw(key);
1746
+ if (!readonly) {
1747
+ if (hasChanged(key, rawKey)) track(rawTarget, "get", key);
1748
+ track(rawTarget, "get", rawKey);
1749
+ }
1750
+ const { has } = getProto(rawTarget);
1751
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1752
+ if (has.call(rawTarget, key)) return wrap(target.get(key));
1753
+ else if (has.call(rawTarget, rawKey)) return wrap(target.get(rawKey));
1754
+ else if (target !== rawTarget) target.get(key);
1755
+ },
1756
+ get size() {
1757
+ const target = this["__v_raw"];
1758
+ !readonly && track(/* @__PURE__ */ toRaw(target), "iterate", ITERATE_KEY);
1759
+ return target.size;
1760
+ },
1761
+ has(key) {
1762
+ const target = this["__v_raw"];
1763
+ const rawTarget = /* @__PURE__ */ toRaw(target);
1764
+ const rawKey = /* @__PURE__ */ toRaw(key);
1765
+ if (!readonly) {
1766
+ if (hasChanged(key, rawKey)) track(rawTarget, "has", key);
1767
+ track(rawTarget, "has", rawKey);
1768
+ }
1769
+ return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1770
+ },
1771
+ forEach(callback, thisArg) {
1772
+ const observed = this;
1773
+ const target = observed["__v_raw"];
1774
+ const rawTarget = /* @__PURE__ */ toRaw(target);
1775
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1776
+ !readonly && track(rawTarget, "iterate", ITERATE_KEY);
1777
+ return target.forEach((value, key) => {
1778
+ return callback.call(thisArg, wrap(value), wrap(key), observed);
1779
+ });
1780
+ }
1781
+ };
1782
+ extend(instrumentations, readonly ? {
1783
+ add: createReadonlyMethod("add"),
1784
+ set: createReadonlyMethod("set"),
1785
+ delete: createReadonlyMethod("delete"),
1786
+ clear: createReadonlyMethod("clear")
1787
+ } : {
1788
+ add(value) {
1789
+ const target = /* @__PURE__ */ toRaw(this);
1790
+ const proto = getProto(target);
1791
+ const rawValue = /* @__PURE__ */ toRaw(value);
1792
+ const valueToAdd = !shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value) ? rawValue : value;
1793
+ if (!(proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue))) {
1794
+ target.add(valueToAdd);
1795
+ trigger(target, "add", valueToAdd, valueToAdd);
1796
+ }
1797
+ return this;
1798
+ },
1799
+ set(key, value) {
1800
+ if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) value = /* @__PURE__ */ toRaw(value);
1801
+ const target = /* @__PURE__ */ toRaw(this);
1802
+ const { has, get } = getProto(target);
1803
+ let hadKey = has.call(target, key);
1804
+ if (!hadKey) {
1805
+ key = /* @__PURE__ */ toRaw(key);
1806
+ hadKey = has.call(target, key);
1807
+ }
1808
+ const oldValue = get.call(target, key);
1809
+ target.set(key, value);
1810
+ if (!hadKey) trigger(target, "add", key, value);
1811
+ else if (hasChanged(value, oldValue)) trigger(target, "set", key, value, oldValue);
1812
+ return this;
1813
+ },
1814
+ delete(key) {
1815
+ const target = /* @__PURE__ */ toRaw(this);
1816
+ const { has, get } = getProto(target);
1817
+ let hadKey = has.call(target, key);
1818
+ if (!hadKey) {
1819
+ key = /* @__PURE__ */ toRaw(key);
1820
+ hadKey = has.call(target, key);
1821
+ }
1822
+ const oldValue = get ? get.call(target, key) : void 0;
1823
+ const result = target.delete(key);
1824
+ if (hadKey) trigger(target, "delete", key, void 0, oldValue);
1825
+ return result;
1826
+ },
1827
+ clear() {
1828
+ const target = /* @__PURE__ */ toRaw(this);
1829
+ const hadItems = target.size !== 0;
1830
+ const oldTarget = void 0;
1831
+ const result = target.clear();
1832
+ if (hadItems) trigger(target, "clear", void 0, void 0, oldTarget);
1833
+ return result;
1834
+ }
1835
+ });
1836
+ [
1837
+ "keys",
1838
+ "values",
1839
+ "entries",
1840
+ Symbol.iterator
1841
+ ].forEach((method) => {
1842
+ instrumentations[method] = createIterableMethod(method, readonly, shallow);
1843
+ });
1844
+ return instrumentations;
1845
+ }
1846
+ function createInstrumentationGetter(isReadonly2, shallow) {
1847
+ const instrumentations = createInstrumentations(isReadonly2, shallow);
1848
+ return (target, key, receiver) => {
1849
+ if (key === "__v_isReactive") return !isReadonly2;
1850
+ else if (key === "__v_isReadonly") return isReadonly2;
1851
+ else if (key === "__v_raw") return target;
1852
+ return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
1853
+ };
1854
+ }
1855
+ const mutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, false) };
1856
+ const readonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) };
1857
+ const reactiveMap = /* @__PURE__ */ new WeakMap();
1858
+ const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
1859
+ const readonlyMap = /* @__PURE__ */ new WeakMap();
1860
+ const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
1861
+ function targetTypeMap(rawType) {
1862
+ switch (rawType) {
1863
+ case "Object":
1864
+ case "Array": return 1;
1865
+ case "Map":
1866
+ case "Set":
1867
+ case "WeakMap":
1868
+ case "WeakSet": return 2;
1869
+ default: return 0;
1870
+ }
1871
+ }
1872
+ // @__NO_SIDE_EFFECTS__
1873
+ function reactive(target) {
1874
+ if (/* @__PURE__ */ isReadonly(target)) return target;
1875
+ return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
1876
+ }
1877
+ // @__NO_SIDE_EFFECTS__
1878
+ function readonly(target) {
1879
+ return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
1880
+ }
1881
+ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
1882
+ if (!isObject(target)) return target;
1883
+ if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) return target;
1884
+ if (target["__v_skip"] || !Object.isExtensible(target)) return target;
1885
+ const existingProxy = proxyMap.get(target);
1886
+ if (existingProxy) return existingProxy;
1887
+ const targetType = targetTypeMap(toRawType(target));
1888
+ if (targetType === 0) return target;
1889
+ const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
1890
+ proxyMap.set(target, proxy);
1891
+ return proxy;
1892
+ }
1893
+ // @__NO_SIDE_EFFECTS__
1894
+ function isReactive(value) {
1895
+ if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
1896
+ return !!(value && value["__v_isReactive"]);
1897
+ }
1898
+ // @__NO_SIDE_EFFECTS__
1899
+ function isReadonly(value) {
1900
+ return !!(value && value["__v_isReadonly"]);
1901
+ }
1902
+ // @__NO_SIDE_EFFECTS__
1903
+ function isShallow(value) {
1904
+ return !!(value && value["__v_isShallow"]);
1905
+ }
1906
+ // @__NO_SIDE_EFFECTS__
1907
+ function isProxy(value) {
1908
+ return value ? !!value["__v_raw"] : false;
1909
+ }
1910
+ // @__NO_SIDE_EFFECTS__
1911
+ function toRaw(observed) {
1912
+ const raw = observed && observed["__v_raw"];
1913
+ return raw ? /* @__PURE__ */ toRaw(raw) : observed;
1914
+ }
1915
+ const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
1916
+ const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
1917
+ // @__NO_SIDE_EFFECTS__
1918
+ function isRef(r) {
1919
+ return r ? r["__v_isRef"] === true : false;
1920
+ }
1921
+ // @__NO_SIDE_EFFECTS__
1922
+ function ref(value) {
1923
+ return createRef(value, false);
1924
+ }
1925
+ function createRef(rawValue, shallow) {
1926
+ if (/* @__PURE__ */ isRef(rawValue)) return rawValue;
1927
+ return new RefImpl(rawValue, shallow);
1928
+ }
1929
+ var RefImpl = class {
1930
+ constructor(value, isShallow2) {
1931
+ this.dep = new Dep();
1932
+ this["__v_isRef"] = true;
1933
+ this["__v_isShallow"] = false;
1934
+ this._rawValue = isShallow2 ? value : /* @__PURE__ */ toRaw(value);
1935
+ this._value = isShallow2 ? value : toReactive(value);
1936
+ this["__v_isShallow"] = isShallow2;
1937
+ }
1938
+ get value() {
1939
+ this.dep.track();
1940
+ return this._value;
1941
+ }
1942
+ set value(newValue) {
1943
+ const oldValue = this._rawValue;
1944
+ const useDirectValue = this["__v_isShallow"] || /* @__PURE__ */ isShallow(newValue) || /* @__PURE__ */ isReadonly(newValue);
1945
+ newValue = useDirectValue ? newValue : /* @__PURE__ */ toRaw(newValue);
1946
+ if (hasChanged(newValue, oldValue)) {
1947
+ this._rawValue = newValue;
1948
+ this._value = useDirectValue ? newValue : toReactive(newValue);
1949
+ this.dep.trigger();
1950
+ }
1951
+ }
1952
+ };
1953
+ function unref(ref2) {
1954
+ return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;
1955
+ }
1956
+ var ComputedRefImpl = class {
1957
+ constructor(fn, setter, isSSR) {
1958
+ this.fn = fn;
1959
+ this.setter = setter;
1960
+ this._value = void 0;
1961
+ this.dep = new Dep(this);
1962
+ this.__v_isRef = true;
1963
+ this.deps = void 0;
1964
+ this.depsTail = void 0;
1965
+ this.flags = 16;
1966
+ this.globalVersion = globalVersion - 1;
1967
+ this.next = void 0;
1968
+ this.effect = this;
1969
+ this["__v_isReadonly"] = !setter;
1970
+ this.isSSR = isSSR;
1971
+ }
1972
+ notify() {
1973
+ this.flags |= 16;
1974
+ if (!(this.flags & 8) && activeSub !== this) {
1975
+ batch(this, true);
1976
+ return true;
1977
+ }
1978
+ }
1979
+ get value() {
1980
+ const link = this.dep.track();
1981
+ refreshComputed(this);
1982
+ if (link) link.version = this.dep.version;
1983
+ return this._value;
1984
+ }
1985
+ set value(newValue) {
1986
+ if (this.setter) this.setter(newValue);
1987
+ }
1988
+ };
1989
+ // @__NO_SIDE_EFFECTS__
1990
+ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
1991
+ let getter;
1992
+ let setter;
1993
+ if (isFunction(getterOrOptions)) getter = getterOrOptions;
1994
+ else {
1995
+ getter = getterOrOptions.get;
1996
+ setter = getterOrOptions.set;
1997
+ }
1998
+ return new ComputedRefImpl(getter, setter, isSSR);
1999
+ }
2000
+
2001
+ //#endregion
2002
+ //#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.35/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
2003
+ /**
2004
+ * @vue/runtime-core v3.5.35
2005
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
2006
+ * @license MIT
2007
+ **/
2008
+ function callWithErrorHandling(fn, instance, type, args) {
2009
+ try {
2010
+ return args ? fn(...args) : fn();
2011
+ } catch (err) {
2012
+ handleError(err, instance, type);
2013
+ }
2014
+ }
2015
+ function callWithAsyncErrorHandling(fn, instance, type, args) {
2016
+ if (isFunction(fn)) {
2017
+ const res = callWithErrorHandling(fn, instance, type, args);
2018
+ if (res && isPromise(res)) res.catch((err) => {
2019
+ handleError(err, instance, type);
2020
+ });
2021
+ return res;
2022
+ }
2023
+ if (isArray(fn)) {
2024
+ const values = [];
2025
+ for (let i = 0; i < fn.length; i++) values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
2026
+ return values;
2027
+ }
2028
+ }
2029
+ function handleError(err, instance, type, throwInDev = true) {
2030
+ const contextVNode = instance ? instance.vnode : null;
2031
+ const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
2032
+ if (instance) {
2033
+ let cur = instance.parent;
2034
+ const exposedInstance = instance.proxy;
2035
+ const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`;
2036
+ while (cur) {
2037
+ const errorCapturedHooks = cur.ec;
2038
+ if (errorCapturedHooks) {
2039
+ for (let i = 0; i < errorCapturedHooks.length; i++) if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) return;
2040
+ }
2041
+ cur = cur.parent;
2042
+ }
2043
+ if (errorHandler) {
2044
+ pauseTracking();
2045
+ callWithErrorHandling(errorHandler, null, 10, [
2046
+ err,
2047
+ exposedInstance,
2048
+ errorInfo
2049
+ ]);
2050
+ resetTracking();
2051
+ return;
2052
+ }
2053
+ }
2054
+ logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
2055
+ }
2056
+ function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
2057
+ if (throwInProd) throw err;
2058
+ else console.error(err);
2059
+ }
2060
+ let devtools$1;
2061
+ let buffer = [];
2062
+ let devtoolsNotInstalled = false;
2063
+ function emit$1(event, ...args) {
2064
+ if (devtools$1) devtools$1.emit(event, ...args);
2065
+ else if (!devtoolsNotInstalled) buffer.push({
2066
+ event,
2067
+ args
2068
+ });
2069
+ }
2070
+ const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated");
2071
+ // @__NO_SIDE_EFFECTS__
2072
+ function createDevtoolsComponentHook(hook) {
2073
+ return (component) => {
2074
+ emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
2075
+ };
2076
+ }
2077
+ let currentRenderingInstance = null;
2078
+ let currentScopeId = null;
2079
+ function setCurrentRenderingInstance(instance) {
2080
+ const prev = currentRenderingInstance;
2081
+ currentRenderingInstance = instance;
2082
+ currentScopeId = instance && instance.type.__scopeId || null;
2083
+ return prev;
2084
+ }
2085
+ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
2086
+ if (!ctx) return fn;
2087
+ if (fn._n) return fn;
2088
+ const renderFnWithContext = (...args) => {
2089
+ if (renderFnWithContext._d) setBlockTracking(-1);
2090
+ const prevInstance = setCurrentRenderingInstance(ctx);
2091
+ let res;
2092
+ try {
2093
+ res = fn(...args);
2094
+ } finally {
2095
+ setCurrentRenderingInstance(prevInstance);
2096
+ if (renderFnWithContext._d) setBlockTracking(1);
2097
+ }
2098
+ if (__VUE_PROD_DEVTOOLS__) devtoolsComponentUpdated(ctx);
2099
+ return res;
2100
+ };
2101
+ renderFnWithContext._n = true;
2102
+ renderFnWithContext._c = true;
2103
+ renderFnWithContext._d = true;
2104
+ return renderFnWithContext;
2105
+ }
2106
+ function inject(key, defaultValue, treatDefaultAsFactory = false) {
2107
+ const instance = getCurrentInstance();
2108
+ if (instance || currentApp) {
2109
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
2110
+ if (provides && key in provides) return provides[key];
2111
+ else if (arguments.length > 1) return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
2112
+ }
2113
+ }
2114
+ const isTeleport = (type) => type.__isTeleport;
2115
+ function setTransitionHooks(vnode, hooks) {
2116
+ if (vnode.shapeFlag & 6 && vnode.component) {
2117
+ vnode.transition = hooks;
2118
+ setTransitionHooks(vnode.component.subTree, hooks);
2119
+ } else if (vnode.shapeFlag & 128) {
2120
+ vnode.ssContent.transition = hooks.clone(vnode.ssContent);
2121
+ vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
2122
+ } else vnode.transition = hooks;
2123
+ }
2124
+ // @__NO_SIDE_EFFECTS__
2125
+ function defineComponent(options, extraOptions) {
2126
+ return isFunction(options) ? /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
2127
+ }
2128
+ const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
2129
+ const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
2130
+ const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
2131
+ function injectHook(type, hook, target = currentInstance, prepend = false) {
2132
+ if (target) {
2133
+ const hooks = target[type] || (target[type] = []);
2134
+ const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
2135
+ pauseTracking();
2136
+ const reset = setCurrentInstance(target);
2137
+ const res = callWithAsyncErrorHandling(hook, target, type, args);
2138
+ reset();
2139
+ resetTracking();
2140
+ return res;
2141
+ });
2142
+ if (prepend) hooks.unshift(wrappedHook);
2143
+ else hooks.push(wrappedHook);
2144
+ return wrappedHook;
2145
+ }
2146
+ }
2147
+ const createHook = (lifecycle) => (hook, target = currentInstance) => {
2148
+ if (!isInSSRComponentSetup || lifecycle === "sp") injectHook(lifecycle, (...args) => hook(...args), target);
2149
+ };
2150
+ const onBeforeMount = createHook("bm");
2151
+ const onMounted = createHook("m");
2152
+ const onBeforeUpdate = createHook("bu");
2153
+ const onUpdated = createHook("u");
2154
+ const onBeforeUnmount = createHook("bum");
2155
+ const onUnmounted = createHook("um");
2156
+ const onServerPrefetch = createHook("sp");
2157
+ const onRenderTriggered = createHook("rtg");
2158
+ const onRenderTracked = createHook("rtc");
2159
+ const COMPONENTS = "components";
2160
+ const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
2161
+ function resolveDynamicComponent(component) {
2162
+ if (isString(component)) return resolveAsset(COMPONENTS, component, false) || component;
2163
+ else return component || NULL_DYNAMIC_COMPONENT;
2164
+ }
2165
+ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
2166
+ const instance = currentRenderingInstance || currentInstance;
2167
+ if (instance) {
2168
+ const Component = instance.type;
2169
+ if (type === COMPONENTS) {
2170
+ const selfName = getComponentName(Component, false);
2171
+ if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) return Component;
2172
+ }
2173
+ const res = resolve(instance[type] || Component[type], name) || resolve(instance.appContext[type], name);
2174
+ if (!res && maybeSelfReference) return Component;
2175
+ return res;
2176
+ }
2177
+ }
2178
+ function resolve(registry, name) {
2179
+ return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
2180
+ }
2181
+ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
2182
+ if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
2183
+ const hasProps = Object.keys(props).length > 0;
2184
+ if (name !== "default") props.name = name;
2185
+ return openBlock(), createBlock(Fragment, null, [createVNode("slot", props, fallback && fallback())], hasProps ? -2 : 64);
2186
+ }
2187
+ let slot = slots[name];
2188
+ if (slot && slot._c) slot._d = false;
2189
+ openBlock();
2190
+ const validSlotContent = slot && ensureValidVNode(slot(props));
2191
+ const slotKey = props.key || validSlotContent && validSlotContent.key;
2192
+ const rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
2193
+ if (!noSlotted && rendered.scopeId) rendered.slotScopeIds = [rendered.scopeId + "-s"];
2194
+ if (slot && slot._c) slot._d = true;
2195
+ return rendered;
2196
+ }
2197
+ function ensureValidVNode(vnodes) {
2198
+ return vnodes.some((child) => {
2199
+ if (!isVNode(child)) return true;
2200
+ if (child.type === Comment) return false;
2201
+ if (child.type === Fragment && !ensureValidVNode(child.children)) return false;
2202
+ return true;
2203
+ }) ? vnodes : null;
2204
+ }
2205
+ function useSlots() {
2206
+ return getContext("useSlots").slots;
2207
+ }
2208
+ function getContext(calledFunctionName) {
2209
+ const i = getCurrentInstance();
2210
+ return i.setupContext || (i.setupContext = createSetupContext(i));
2211
+ }
2212
+ function createAppContext() {
2213
+ return {
2214
+ app: null,
2215
+ config: {
2216
+ isNativeTag: NO,
2217
+ performance: false,
2218
+ globalProperties: {},
2219
+ optionMergeStrategies: {},
2220
+ errorHandler: void 0,
2221
+ warnHandler: void 0,
2222
+ compilerOptions: {}
2223
+ },
2224
+ mixins: [],
2225
+ components: {},
2226
+ directives: {},
2227
+ provides: /* @__PURE__ */ Object.create(null),
2228
+ optionsCache: /* @__PURE__ */ new WeakMap(),
2229
+ propsCache: /* @__PURE__ */ new WeakMap(),
2230
+ emitsCache: /* @__PURE__ */ new WeakMap()
2231
+ };
2232
+ }
2233
+ let currentApp = null;
2234
+ const internalObjectProto = {};
2235
+ const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
2236
+ const isSuspense = (type) => type.__isSuspense;
2237
+ const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
2238
+ const Text = /* @__PURE__ */ Symbol.for("v-txt");
2239
+ const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
2240
+ const blockStack = [];
2241
+ let currentBlock = null;
2242
+ function openBlock(disableTracking = false) {
2243
+ blockStack.push(currentBlock = disableTracking ? null : []);
2244
+ }
2245
+ function closeBlock() {
2246
+ blockStack.pop();
2247
+ currentBlock = blockStack[blockStack.length - 1] || null;
2248
+ }
2249
+ let isBlockTreeEnabled = 1;
2250
+ function setBlockTracking(value, inVOnce = false) {
2251
+ isBlockTreeEnabled += value;
2252
+ if (value < 0 && currentBlock && inVOnce) currentBlock.hasOnce = true;
2253
+ }
2254
+ function setupBlock(vnode) {
2255
+ vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
2256
+ closeBlock();
2257
+ if (isBlockTreeEnabled > 0 && currentBlock) currentBlock.push(vnode);
2258
+ return vnode;
2259
+ }
2260
+ function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
2261
+ return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true));
2262
+ }
2263
+ function createBlock(type, props, children, patchFlag, dynamicProps) {
2264
+ return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true));
2265
+ }
2266
+ function isVNode(value) {
2267
+ return value ? value.__v_isVNode === true : false;
2268
+ }
2269
+ const normalizeKey = ({ key }) => key != null ? key : null;
2270
+ const normalizeRef = ({ ref, ref_key, ref_for }) => {
2271
+ if (typeof ref === "number") ref = "" + ref;
2272
+ return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? {
2273
+ i: currentRenderingInstance,
2274
+ r: ref,
2275
+ k: ref_key,
2276
+ f: !!ref_for
2277
+ } : ref : null;
2278
+ };
2279
+ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
2280
+ const vnode = {
2281
+ __v_isVNode: true,
2282
+ __v_skip: true,
2283
+ type,
2284
+ props,
2285
+ key: props && normalizeKey(props),
2286
+ ref: props && normalizeRef(props),
2287
+ scopeId: currentScopeId,
2288
+ slotScopeIds: null,
2289
+ children,
2290
+ component: null,
2291
+ suspense: null,
2292
+ ssContent: null,
2293
+ ssFallback: null,
2294
+ dirs: null,
2295
+ transition: null,
2296
+ el: null,
2297
+ anchor: null,
2298
+ target: null,
2299
+ targetStart: null,
2300
+ targetAnchor: null,
2301
+ staticCount: 0,
2302
+ shapeFlag,
2303
+ patchFlag,
2304
+ dynamicProps,
2305
+ dynamicChildren: null,
2306
+ appContext: null,
2307
+ ctx: currentRenderingInstance
2308
+ };
2309
+ if (needFullChildrenNormalization) {
2310
+ normalizeChildren(vnode, children);
2311
+ if (shapeFlag & 128) type.normalize(vnode);
2312
+ } else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;
2313
+ if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);
2314
+ return vnode;
2315
+ }
2316
+ const createVNode = _createVNode;
2317
+ function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
2318
+ if (!type || type === NULL_DYNAMIC_COMPONENT) type = Comment;
2319
+ if (isVNode(type)) {
2320
+ const cloned = cloneVNode(type, props, true);
2321
+ if (children) normalizeChildren(cloned, children);
2322
+ if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
2323
+ else currentBlock.push(cloned);
2324
+ cloned.patchFlag = -2;
2325
+ return cloned;
2326
+ }
2327
+ if (isClassComponent(type)) type = type.__vccOpts;
2328
+ if (props) {
2329
+ props = guardReactiveProps(props);
2330
+ let { class: klass, style } = props;
2331
+ if (klass && !isString(klass)) props.class = normalizeClass(klass);
2332
+ if (isObject(style)) {
2333
+ if (isProxy(style) && !isArray(style)) style = extend({}, style);
2334
+ props.style = normalizeStyle(style);
2335
+ }
2336
+ }
2337
+ const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
2338
+ return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true);
2339
+ }
2340
+ function guardReactiveProps(props) {
2341
+ if (!props) return null;
2342
+ return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
2343
+ }
2344
+ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
2345
+ const { props, ref, patchFlag, children, transition } = vnode;
2346
+ const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
2347
+ const cloned = {
2348
+ __v_isVNode: true,
2349
+ __v_skip: true,
2350
+ type: vnode.type,
2351
+ props: mergedProps,
2352
+ key: mergedProps && normalizeKey(mergedProps),
2353
+ ref: extraProps && extraProps.ref ? mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref,
2354
+ scopeId: vnode.scopeId,
2355
+ slotScopeIds: vnode.slotScopeIds,
2356
+ children,
2357
+ target: vnode.target,
2358
+ targetStart: vnode.targetStart,
2359
+ targetAnchor: vnode.targetAnchor,
2360
+ staticCount: vnode.staticCount,
2361
+ shapeFlag: vnode.shapeFlag,
2362
+ patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
2363
+ dynamicProps: vnode.dynamicProps,
2364
+ dynamicChildren: vnode.dynamicChildren,
2365
+ appContext: vnode.appContext,
2366
+ dirs: vnode.dirs,
2367
+ transition,
2368
+ component: vnode.component,
2369
+ suspense: vnode.suspense,
2370
+ ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
2371
+ ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
2372
+ placeholder: vnode.placeholder,
2373
+ el: vnode.el,
2374
+ anchor: vnode.anchor,
2375
+ ctx: vnode.ctx,
2376
+ ce: vnode.ce
2377
+ };
2378
+ if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
2379
+ return cloned;
2380
+ }
2381
+ function createTextVNode(text = " ", flag = 0) {
2382
+ return createVNode(Text, null, text, flag);
2383
+ }
2384
+ function createCommentVNode(text = "", asBlock = false) {
2385
+ return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
2386
+ }
2387
+ function normalizeChildren(vnode, children) {
2388
+ let type = 0;
2389
+ const { shapeFlag } = vnode;
2390
+ if (children == null) children = null;
2391
+ else if (isArray(children)) type = 16;
2392
+ else if (typeof children === "object") if (shapeFlag & 65) {
2393
+ const slot = children.default;
2394
+ if (slot) {
2395
+ slot._c && (slot._d = false);
2396
+ normalizeChildren(vnode, slot());
2397
+ slot._c && (slot._d = true);
2398
+ }
2399
+ return;
2400
+ } else {
2401
+ type = 32;
2402
+ const slotFlag = children._;
2403
+ if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
2404
+ else if (slotFlag === 3 && currentRenderingInstance) if (currentRenderingInstance.slots._ === 1) children._ = 1;
2405
+ else {
2406
+ children._ = 2;
2407
+ vnode.patchFlag |= 1024;
2408
+ }
2409
+ }
2410
+ else if (isFunction(children)) {
2411
+ children = {
2412
+ default: children,
2413
+ _ctx: currentRenderingInstance
2414
+ };
2415
+ type = 32;
2416
+ } else {
2417
+ children = String(children);
2418
+ if (shapeFlag & 64) {
2419
+ type = 16;
2420
+ children = [createTextVNode(children)];
2421
+ } else type = 8;
2422
+ }
2423
+ vnode.children = children;
2424
+ vnode.shapeFlag |= type;
2425
+ }
2426
+ function mergeProps(...args) {
2427
+ const ret = {};
2428
+ for (let i = 0; i < args.length; i++) {
2429
+ const toMerge = args[i];
2430
+ for (const key in toMerge) if (key === "class") {
2431
+ if (ret.class !== toMerge.class) ret.class = normalizeClass([ret.class, toMerge.class]);
2432
+ } else if (key === "style") ret.style = normalizeStyle([ret.style, toMerge.style]);
2433
+ else if (isOn(key)) {
2434
+ const existing = ret[key];
2435
+ const incoming = toMerge[key];
2436
+ if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) ret[key] = existing ? [].concat(existing, incoming) : incoming;
2437
+ else if (incoming == null && existing == null && !isModelListener(key)) ret[key] = incoming;
2438
+ } else if (key !== "") ret[key] = toMerge[key];
2439
+ }
2440
+ return ret;
2441
+ }
2442
+ const emptyAppContext = createAppContext();
2443
+ let currentInstance = null;
2444
+ const getCurrentInstance = () => currentInstance || currentRenderingInstance;
2445
+ let internalSetCurrentInstance;
2446
+ let setInSSRSetupState;
2447
+ {
2448
+ const g = getGlobalThis();
2449
+ const registerGlobalSetter = (key, setter) => {
2450
+ let setters;
2451
+ if (!(setters = g[key])) setters = g[key] = [];
2452
+ setters.push(setter);
2453
+ return (v) => {
2454
+ if (setters.length > 1) setters.forEach((set) => set(v));
2455
+ else setters[0](v);
2456
+ };
2457
+ };
2458
+ internalSetCurrentInstance = registerGlobalSetter(`__VUE_INSTANCE_SETTERS__`, (v) => currentInstance = v);
2459
+ setInSSRSetupState = registerGlobalSetter(`__VUE_SSR_SETTERS__`, (v) => isInSSRComponentSetup = v);
2460
+ }
2461
+ const setCurrentInstance = (instance) => {
2462
+ const prev = currentInstance;
2463
+ internalSetCurrentInstance(instance);
2464
+ instance.scope.on();
2465
+ return () => {
2466
+ instance.scope.off();
2467
+ internalSetCurrentInstance(prev);
2468
+ };
2469
+ };
2470
+ let isInSSRComponentSetup = false;
2471
+ const attrsProxyHandlers = { get(target, key) {
2472
+ track(target, "get", "");
2473
+ return target[key];
2474
+ } };
2475
+ function createSetupContext(instance) {
2476
+ const expose = (exposed) => {
2477
+ instance.exposed = exposed || {};
2478
+ };
2479
+ return {
2480
+ attrs: new Proxy(instance.attrs, attrsProxyHandlers),
2481
+ slots: instance.slots,
2482
+ emit: instance.emit,
2483
+ expose
2484
+ };
2485
+ }
2486
+ function getComponentName(Component, includeInferred = true) {
2487
+ return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
2488
+ }
2489
+ function isClassComponent(value) {
2490
+ return isFunction(value) && "__vccOpts" in value;
2491
+ }
2492
+ const computed = (getterOrOptions, debugOptions) => {
2493
+ return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
2494
+ };
2495
+
2496
+ //#endregion
2497
+ //#region ../../packages/hooks/use-namespace/index.ts
2498
+ const defaultNamespace = "c";
2499
+ const statePrefix = "is-";
2500
+ const _bem = (namespace, block, blockSuffix, element, modifier) => {
2501
+ let cls = `${namespace}-${block}`;
2502
+ if (blockSuffix) cls += `-${blockSuffix}`;
2503
+ if (element) cls += `__${element}`;
2504
+ if (modifier) cls += `--${modifier}`;
2505
+ return cls;
2506
+ };
2507
+ const namespaceContextKey = Symbol("namespaceContextKey");
2508
+ const useGetDerivedNamespace = (namespaceOverrides) => {
2509
+ const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref("c")) : ref("c"));
2510
+ return computed(() => {
2511
+ return unref(derivedNamespace) || "c";
2512
+ });
2513
+ };
2514
+ const useNamespace = (block, namespaceOverrides) => {
2515
+ const namespace = useGetDerivedNamespace(namespaceOverrides);
2516
+ const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
2517
+ const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
2518
+ const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
2519
+ const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
2520
+ const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
2521
+ const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
2522
+ const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
2523
+ const is = (name, ...args) => {
2524
+ const state = args.length >= 1 ? args[0] : true;
2525
+ return name && state ? `${statePrefix}${name}` : "";
2526
+ };
2527
+ const cssVar = (object) => {
2528
+ const styles = {};
2529
+ for (const key in object) if (object[key]) styles[`--${namespace.value}-${key}`] = object[key];
2530
+ return styles;
2531
+ };
2532
+ const cssVarBlock = (object) => {
2533
+ const styles = {};
2534
+ for (const key in object) if (object[key]) styles[`--${namespace.value}-${block}-${key}`] = object[key];
2535
+ return styles;
2536
+ };
2537
+ const cssVarName = (name) => `--${namespace.value}-${name}`;
2538
+ const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
2539
+ return {
2540
+ namespace,
2541
+ b,
2542
+ e,
2543
+ m,
2544
+ be,
2545
+ em,
2546
+ bm,
2547
+ bem,
2548
+ is,
2549
+ cssVar,
2550
+ cssVarName,
2551
+ cssVarBlock,
2552
+ cssVarBlockName
2553
+ };
2554
+ };
2555
+
2556
+ //#endregion
2557
+ //#region ../../packages/hooks/use-prop/index.ts
2558
+ const useProp = (name) => {
2559
+ const vm = getCurrentInstance();
2560
+ return computed(() => (vm?.proxy?.$props)?.[name]);
2561
+ };
2562
+
2563
+ //#endregion
2564
+ //#region ../../packages/hooks/use-theme/index.ts
2565
+ const getCurrentScheme = () => {
2566
+ if (typeof document === "undefined") return "light";
2567
+ return document.documentElement.dataset.cColorScheme === "dark" ? "dark" : "light";
2568
+ };
2569
+ const colorScheme = ref(getCurrentScheme());
2570
+ if (typeof window !== "undefined") new MutationObserver(() => {
2571
+ const newScheme = getCurrentScheme();
2572
+ if (newScheme !== colorScheme.value) colorScheme.value = newScheme;
2573
+ }).observe(document.documentElement, {
2574
+ attributes: true,
2575
+ attributeFilter: ["data-c-color-scheme"]
2576
+ });
2577
+ const useColorScheme = () => readonly(colorScheme);
2578
+
2579
+ //#endregion
2580
+ //#region ../../packages/components/form/src/constants.ts
2581
+ const formContextKey = Symbol("formContextKey");
2582
+
2583
+ //#endregion
2584
+ //#region ../../packages/components/form/src/hooks/use-form-common-props.ts
2585
+ const useFormDisabled = (fallback) => {
2586
+ const disabled = useProp("disabled");
2587
+ const form = inject(formContextKey, void 0);
2588
+ return computed(() => {
2589
+ return disabled.value ?? unref(fallback) ?? form?.disabled ?? false;
2590
+ });
2591
+ };
2592
+
2593
+ //#endregion
2594
+ //#region ../../packages/components/button/src/use-button.ts
2595
+ const useButton = (props, slots) => {
2596
+ const _disabled = useFormDisabled();
2597
+ const _ref = ref();
2598
+ const { hasLeftSlot, hasRightSlot } = slots;
2599
+ const hasLeftSection = hasLeftSlot || !!props.leftSection;
2600
+ const hasRightSection = hasRightSlot || !!props.rightSection;
2601
+ const _props = computed(() => {
2602
+ const _attrs = {
2603
+ "data-disabled": _disabled.value || props.loading || void 0,
2604
+ "data-block": props.fullWidth || void 0,
2605
+ "data-size": props.size && props.size !== "sm" ? props.size : void 0,
2606
+ "data-with-left-section": hasLeftSection || void 0,
2607
+ "data-with-right-section": hasRightSection || void 0,
2608
+ "data-variant": props.variant || "default"
2609
+ };
2610
+ if (props.tag === "button") {
2611
+ _attrs["aria-disabled"] = _disabled.value || props.loading || void 0;
2612
+ _attrs["disabled"] = _disabled.value || props.loading;
2613
+ }
2614
+ return _attrs;
2615
+ });
2616
+ const handleClick = (evt) => {
2617
+ if (_disabled.value || props.loading) {
2618
+ evt.stopPropagation();
2619
+ return;
2620
+ }
2621
+ };
2622
+ return {
2623
+ _disabled,
2624
+ _ref,
2625
+ _props,
2626
+ handleClick
2627
+ };
2628
+ };
2629
+
2630
+ //#endregion
2631
+ //#region ../../packages/components/button/src/button-custom.ts
2632
+ const PRESET_COLORS = [
2633
+ "red",
2634
+ "pink",
2635
+ "grape",
2636
+ "violet",
2637
+ "indigo",
2638
+ "blue",
2639
+ "cyan",
2640
+ "teal",
2641
+ "green",
2642
+ "lime",
2643
+ "yellow",
2644
+ "orange",
2645
+ "gray",
2646
+ "dark"
2647
+ ];
2648
+ const getShadeIndexes = (scheme) => {
2649
+ if (scheme === "light") return {
2650
+ bg: 6,
2651
+ hover: 7,
2652
+ lightBg: 1,
2653
+ lightHover: 2,
2654
+ lightColor: 9,
2655
+ outlineColor: 6,
2656
+ outlineHoverBgAlpha: .05
2657
+ };
2658
+ else return {
2659
+ bg: 8,
2660
+ hover: 9,
2661
+ lightBg: 1,
2662
+ lightHover: 2,
2663
+ lightColor: 9,
2664
+ outlineColor: 4,
2665
+ outlineHoverBgAlpha: .05
2666
+ };
2667
+ };
2668
+ function useButtonCustomStyle(props) {
2669
+ const colorScheme = useColorScheme();
2670
+ return computed(() => {
2671
+ const styles = {};
2672
+ const { color, gradient, justify, variant } = props;
2673
+ const scheme = colorScheme.value;
2674
+ const idx = getShadeIndexes(scheme);
2675
+ if (justify) styles["--button-justify"] = justify;
2676
+ switch (variant) {
2677
+ case "default": break;
2678
+ case "filled":
2679
+ if (color) if (PRESET_COLORS.includes(color)) {
2680
+ styles["--button-bg"] = `var(--c-color-${color}-filled)`;
2681
+ styles["--button-hover"] = `var(--c-color-${color}-filled-hover)`;
2682
+ } else {
2683
+ const shades = generateColorShades(color);
2684
+ styles["--button-bg"] = shades[idx.bg];
2685
+ styles["--button-hover"] = shades[idx.hover];
2686
+ }
2687
+ break;
2688
+ case "light":
2689
+ if (color) if (PRESET_COLORS.includes(color)) {
2690
+ styles["--button-bg"] = `var(--c-color-${color}-light)`;
2691
+ styles["--button-hover"] = `var(--c-color-${color}-light-hover)`;
2692
+ styles["--button-color"] = `var(--c-color-${color}-light-color)`;
2693
+ } else {
2694
+ const shades = generateColorShades(color);
2695
+ styles["--button-bg"] = shades[idx.lightBg];
2696
+ styles["--button-hover"] = shades[idx.lightHover];
2697
+ styles["--button-color"] = shades[idx.lightColor];
2698
+ }
2699
+ break;
2700
+ case "outline":
2701
+ if (color) if (PRESET_COLORS.includes(color)) {
2702
+ styles["--button-hover"] = `var(--c-color-${color}-outline-hover)`;
2703
+ styles["--button-color"] = `var(--c-color-${color}-outline)`;
2704
+ styles["--button-bd"] = `calc(0.0625rem * var(--c-scale)) solid var(--c-color-${color}-outline)`;
2705
+ } else {
2706
+ const shades = generateColorShades(color);
2707
+ styles["--button-hover"] = setColorAlpha(shades[idx.outlineColor], idx.outlineHoverBgAlpha);
2708
+ styles["--button-color"] = shades[idx.outlineColor];
2709
+ styles["--button-bd"] = `calc(0.0625rem * var(--c-scale)) solid ${shades[idx.outlineColor]}`;
2710
+ }
2711
+ break;
2712
+ case "subtle":
2713
+ if (color) if (PRESET_COLORS.includes(color)) {
2714
+ styles["--button-hover"] = `var(--c-color-${color}-outline-hover)`;
2715
+ styles["--button-color"] = `var(--c-color-${color}-outline)`;
2716
+ } else {
2717
+ const shades = generateColorShades(color);
2718
+ styles["--button-hover"] = setColorAlpha(shades[idx.outlineColor], idx.outlineHoverBgAlpha);
2719
+ styles["--button-color"] = shades[idx.outlineColor];
2720
+ }
2721
+ break;
2722
+ case "transparent":
2723
+ if (color) if (PRESET_COLORS.includes(color)) styles["--button-color"] = `var(--c-color-${color}-light-color)`;
2724
+ else styles["--button-color"] = generateColorShades(color)[idx.lightColor];
2725
+ break;
2726
+ case "white":
2727
+ if (color) if (PRESET_COLORS.includes(color)) styles["--button-color"] = `var(--c-color-${color}-filled)`;
2728
+ else styles["--button-color"] = generateColorShades(color)[idx.bg];
2729
+ break;
2730
+ case "gradient":
2731
+ const from = gradient?.from || "blue";
2732
+ const to = gradient?.to || "cyan";
2733
+ const deg = gradient?.deg || "45";
2734
+ let finalFrom = from;
2735
+ let finalTo = to;
2736
+ if (PRESET_COLORS.includes(from)) finalFrom = `var(--c-color-${from}-filled)`;
2737
+ if (PRESET_COLORS.includes(to)) finalTo = `var(--c-color-${to}-filled)`;
2738
+ styles["--button-bg"] = `linear-gradient(${deg}deg, ${finalFrom} 0%, ${finalTo} 100%)`;
2739
+ break;
2740
+ default: break;
2741
+ }
2742
+ return styles;
2743
+ });
2744
+ }
2745
+
2746
+ //#endregion
2747
+ //#region ../../packages/components/button/src/button.vue?vue&type=script&setup=true&lang.ts
2748
+ const _hoisted_1 = {
2749
+ key: 0,
2750
+ "data-position": "left"
2751
+ };
2752
+ const _hoisted_2 = {
2753
+ key: 1,
2754
+ "data-position": "left"
2755
+ };
2756
+ const _hoisted_3 = {
2757
+ key: 2,
2758
+ "data-position": "right"
2759
+ };
2760
+ const _hoisted_4 = {
2761
+ key: 3,
2762
+ "data-position": "right"
2763
+ };
2764
+ var button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
2765
+ name: "CButton",
2766
+ __name: "button",
2767
+ props: {
2768
+ autoContrast: {
2769
+ type: Boolean,
2770
+ required: false
2771
+ },
2772
+ color: {
2773
+ type: String,
2774
+ required: false
2775
+ },
2776
+ disabled: {
2777
+ type: Boolean,
2778
+ required: false
2779
+ },
2780
+ fullWidth: {
2781
+ type: Boolean,
2782
+ required: false
2783
+ },
2784
+ gradient: {
2785
+ type: Object,
2786
+ required: false
2787
+ },
2788
+ justify: {
2789
+ type: void 0,
2790
+ required: false
2791
+ },
2792
+ leftSection: {
2793
+ type: null,
2794
+ required: false
2795
+ },
2796
+ loaderProps: {
2797
+ type: Object,
2798
+ required: false
2799
+ },
2800
+ loading: {
2801
+ type: Boolean,
2802
+ required: false
2803
+ },
2804
+ radius: {
2805
+ type: String,
2806
+ required: false,
2807
+ default: "4px"
2808
+ },
2809
+ rightSection: {
2810
+ type: null,
2811
+ required: false
2812
+ },
2813
+ size: {
2814
+ type: null,
2815
+ required: false,
2816
+ default: "sm"
2817
+ },
2818
+ tag: {
2819
+ type: null,
2820
+ required: false,
2821
+ default: "button"
2822
+ },
2823
+ variant: {
2824
+ type: String,
2825
+ required: false,
2826
+ default: "default"
2827
+ }
2828
+ },
2829
+ setup(__props, { expose: __expose }) {
2830
+ const slots = useSlots();
2831
+ const hasLeftSlot = computed(() => !!slots["left-section"]);
2832
+ const hasRightSlot = computed(() => !!slots["right-section"]);
2833
+ const props = __props;
2834
+ const { _disabled, _props, _ref, handleClick } = useButton(props, {
2835
+ hasLeftSlot: hasLeftSlot.value,
2836
+ hasRightSlot: hasRightSlot.value
2837
+ });
2838
+ const buttonStyle = useButtonCustomStyle(props);
2839
+ const ns = useNamespace("button");
2840
+ const buttonClass = computed(() => [
2841
+ useNamespace("focus").b("auto"),
2842
+ !_disabled.value && useNamespace("active").b(),
2843
+ ns.e("root"),
2844
+ ns.is("loading", props.loading)
2845
+ ]);
2846
+ const innerClass = computed(() => [ns.e("inner")]);
2847
+ const labelClass = computed(() => [ns.e("label")]);
2848
+ __expose({
2849
+ disabled: _disabled.value,
2850
+ ref: _ref,
2851
+ size: props.size,
2852
+ variant: props.variant
2853
+ });
2854
+ return (_ctx, _cache) => {
2855
+ return openBlock(), createBlock(resolveDynamicComponent(__props.tag), mergeProps(unref(_props), {
2856
+ class: buttonClass.value,
2857
+ style: unref(buttonStyle),
2858
+ onClick: unref(handleClick)
2859
+ }), {
2860
+ default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(innerClass.value) }, [
2861
+ _ctx.$slots["left-section"] ? (openBlock(), createElementBlock("span", _hoisted_1, [renderSlot(_ctx.$slots, "left-section")])) : __props.leftSection ? (openBlock(), createElementBlock("span", _hoisted_2, [(openBlock(), createBlock(resolveDynamicComponent(__props.leftSection)))])) : createCommentVNode("v-if", true),
2862
+ createBaseVNode("span", { class: normalizeClass(labelClass.value) }, [renderSlot(_ctx.$slots, "default")], 2),
2863
+ _ctx.$slots["right-section"] ? (openBlock(), createElementBlock("span", _hoisted_3, [renderSlot(_ctx.$slots, "right-section")])) : __props.rightSection ? (openBlock(), createElementBlock("span", _hoisted_4, [(openBlock(), createBlock(resolveDynamicComponent(__props.rightSection)))])) : createCommentVNode("v-if", true)
2864
+ ], 2)]),
2865
+ _: 3
2866
+ }, 16, [
2867
+ "class",
2868
+ "style",
2869
+ "onClick"
2870
+ ]);
2871
+ };
2872
+ }
2873
+ });
2874
+
2875
+ //#endregion
2876
+ //#region ../../packages/components/button/src/button.vue
2877
+ var button_default = button_vue_vue_type_script_setup_true_lang_default;
2878
+
2879
+ //#endregion
2880
+ //#region ../../packages/components/button/index.ts
2881
+ const CButton = withInstall(button_default);
2882
+
2883
+ //#endregion
2884
+ //#region ../../packages/components/icon/src/icon.vue?vue&type=script&setup=true&lang.ts
2885
+ var icon_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
2886
+ name: "CIcon",
2887
+ inheritAttrs: false,
2888
+ __name: "icon",
2889
+ props: {
2890
+ size: {
2891
+ type: [Number, String],
2892
+ required: false
2893
+ },
2894
+ color: {
2895
+ type: String,
2896
+ required: false
2897
+ }
2898
+ },
2899
+ setup(__props) {
2900
+ const props = __props;
2901
+ const ns = useNamespace("icon");
2902
+ const style = computed(() => {
2903
+ const { size, color } = props;
2904
+ if (!size && !color) return {};
2905
+ return {
2906
+ fontSize: isUndefined(size) ? void 0 : addUnit(size),
2907
+ "--color": color
2908
+ };
2909
+ });
2910
+ return (_ctx, _cache) => {
2911
+ return openBlock(), createElementBlock("i", mergeProps({
2912
+ class: unref(ns).b(),
2913
+ style: style.value
2914
+ }, _ctx.$attrs), [renderSlot(_ctx.$slots, "default")], 16);
2915
+ };
2916
+ }
2917
+ });
2918
+
2919
+ //#endregion
2920
+ //#region ../../packages/components/icon/src/icon.vue
2921
+ var icon_default = icon_vue_vue_type_script_setup_true_lang_default;
2922
+
2923
+ //#endregion
2924
+ //#region ../../packages/components/icon/index.ts
2925
+ const CIcon = withInstall(icon_default);
2926
+
2927
+ //#endregion
2928
+ //#region ../../packages/cck-ui/component.ts
2929
+ var component_default = [CButton, CIcon];
2930
+
2931
+ //#endregion
2932
+ //#region ../../packages/cck-ui/plugin.ts
2933
+ var plugin_default = [];
2934
+
2935
+ //#endregion
2936
+ //#region ../../packages/cck-ui/defaults.ts
2937
+ var defaults_default = makeInstaller([...component_default, ...plugin_default]);
2938
+
2939
+ //#endregion
2940
+ //#region ../../packages/cck-ui/index.ts
2941
+ const install = defaults_default.install;
2942
+ var cck_ui_default = defaults_default;
2943
+
2944
+ //#endregion
2945
+ export { CButton, CIcon, cck_ui_default as default, install, makeInstaller };