@orchidui/dashboard 1.19.0-3 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  var pt = Object.defineProperty;
2
2
  var gt = (n, V, r) => V in n ? pt(n, V, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[V] = r;
3
- var ze = (n, V, r) => gt(n, typeof V != "symbol" ? V + "" : V, r);
4
- import { ref as v, computed as he, createBlock as F, openBlock as m, unref as w, normalizeClass as Q, withCtx as Y, createVNode as T, createElementBlock as E, createSlots as vt, renderSlot as Ke, normalizeStyle as ee, createCommentVNode as D, onMounted as _e, watch as ye, createElementVNode as h, Fragment as pe, createTextVNode as ge, toDisplayString as Pe, renderList as Ze, withKeys as it, inject as Be, reactive as et, provide as Te, nextTick as mt, withDirectives as ft, vShow as bt, defineComponent as ht, defineAsyncComponent as st } from "vue";
5
- import { Q as G, a as yt } from "./QuillEditor-DRwC0sgJ.js";
6
- import { BaseInput as rt, Dropdown as ut, Input as $e, Icon as A, Modal as xt, Select as Je, Slider as Ne } from "@orchidui/core";
7
- import { rgbToHsl as tt, rgb2Hex as lt, rgbaToHex8 as kt, hsl2Hex as at, hexToRgb as je, rgbToHue as Ae, hslToRgb as nt, hex8ToRgba as $t, parseRgba as wt, parseRgb as St } from "./Dashboard/ColorPicker/components/converters.js";
3
+ var We = (n, V, r) => gt(n, typeof V != "symbol" ? V + "" : V, r);
4
+ import { ref as v, computed as $e, createBlock as P, openBlock as m, unref as w, normalizeClass as Q, withCtx as W, createVNode as L, createElementBlock as E, createSlots as vt, renderSlot as je, normalizeStyle as te, createCommentVNode as H, onMounted as Je, watch as fe, createElementVNode as h, Teleport as mt, Fragment as ge, createTextVNode as ve, toDisplayString as Ne, renderList as Ke, withKeys as ot, inject as Re, reactive as _e, provide as Be, nextTick as ft, withDirectives as ht, vShow as yt, defineAsyncComponent as it } from "vue";
5
+ import { Q as Y, a as bt } from "./QuillEditor-DwCbpq2d.js";
6
+ import { BaseInput as st, Dropdown as rt, Input as we, Icon as A, Modal as xt, Select as Ze, Slider as Ae } from "@orchidui/core";
7
+ import { rgbToHsl as et, rgb2Hex as tt, rgbaToHex8 as kt, hsl2Hex as lt, hexToRgb as ze, rgbToHue as Qe, hslToRgb as at, hex8ToRgba as $t, parseRgba as wt, parseRgb as St } from "./Dashboard/ColorPicker/components/converters.js";
8
8
  import { PieChart as Ct } from "./Dashboard/Charts/PieChart/OcPieChart.js";
9
- import { LineChart as Ol } from "./Dashboard/Charts/LineChart/OcLineChart.js";
9
+ import { LineChart as Ml } from "./Dashboard/Charts/LineChart/OcLineChart.js";
10
10
  import { BarChart as Al } from "./Dashboard/Charts/BarChart/OcBarChart.js";
11
11
  import { BarRaceChart as Pl } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
12
12
  import { _ as ql } from "./OcCard-D3be6IMj.js";
@@ -33,9 +33,9 @@ const It = { key: 1 }, Vt = {
33
33
  },
34
34
  emits: ["update:model-value"],
35
35
  setup(n, { emit: V }) {
36
- const r = n, y = V, u = v(!1), f = v(r.modelValue), C = (M) => {
37
- M && (f.value = M, y("update:model-value", M));
38
- }, p = he(() => r.variant === "gradient" ? {
36
+ const r = n, y = V, u = v(!1), f = v(r.modelValue), C = (U) => {
37
+ U && (f.value = U, y("update:model-value", U));
38
+ }, p = $e(() => r.variant === "gradient" ? {
39
39
  class: "w-[20px] h-[20px] hide-svg-icon",
40
40
  style: {
41
41
  background: f.value
@@ -44,41 +44,41 @@ const It = { key: 1 }, Vt = {
44
44
  style: {
45
45
  color: f.value
46
46
  }
47
- }), a = v(), H = v([]), j = () => {
48
- H.value.length > 8 && (H.value = H.value.filter((M, N) => N < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(H.value));
47
+ }), a = v(), O = v([]), Z = () => {
48
+ O.value.length > 8 && (O.value = O.value.filter((U, N) => N < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(O.value));
49
49
  };
50
- let O = localStorage.getItem("ck-cp-local-color-list");
51
- O && (H.value = [...new Set(JSON.parse(O))], j());
52
- const L = (M) => {
53
- if (!M && f.value)
54
- if (H.value.find((U) => U === f.value))
55
- H.value = [
50
+ let M = localStorage.getItem("ck-cp-local-color-list");
51
+ M && (O.value = [...new Set(JSON.parse(M))], Z());
52
+ const T = (U) => {
53
+ if (!U && f.value)
54
+ if (O.value.find((D) => D === f.value))
55
+ O.value = [
56
56
  f.value,
57
- ...H.value.filter((U) => U !== f.value)
58
- ], j();
57
+ ...O.value.filter((D) => D !== f.value)
58
+ ], Z();
59
59
  else {
60
- H.value.length >= 9 && H.value.pop();
61
- let U = f.value;
62
- H.value.unshift(U), j();
60
+ O.value.length >= 9 && O.value.pop();
61
+ let D = f.value;
62
+ O.value.unshift(D), Z();
63
63
  }
64
- }, B = v(!1), W = (M) => {
65
- f.value = M, y("update:model-value", M), u.value = !1;
64
+ }, B = v(!1), z = (U) => {
65
+ f.value = U, y("update:model-value", U), u.value = !1;
66
66
  };
67
- return (M, N) => (m(), F(w(rt), {
67
+ return (U, N) => (m(), P(w(st), {
68
68
  class: Q(n.hideInputColor ? "w-[40px]" : ""),
69
69
  onClick: N[1] || (N[1] = () => {
70
- var U;
71
- return (U = a.value) == null ? void 0 : U.toggleDropdown();
70
+ var D;
71
+ return (D = a.value) == null ? void 0 : D.toggleDropdown();
72
72
  })
73
73
  }, {
74
- default: Y(() => [
75
- T(w(ut), {
74
+ default: W(() => [
75
+ L(w(rt), {
76
76
  ref_key: "dropdownRef",
77
77
  ref: a,
78
78
  modelValue: u.value,
79
79
  "onUpdate:modelValue": [
80
- N[0] || (N[0] = (U) => u.value = U),
81
- L
80
+ N[0] || (N[0] = (D) => u.value = D),
81
+ T
82
82
  ],
83
83
  "max-menu-height": 800,
84
84
  placement: n.placement,
@@ -86,29 +86,29 @@ const It = { key: 1 }, Vt = {
86
86
  strategy: "fixed"
87
87
  }
88
88
  }, {
89
- menu: Y(() => [
90
- B.value ? D("", !0) : (m(), F(w(xl), {
89
+ menu: W(() => [
90
+ B.value ? H("", !0) : (m(), P(w(xl), {
91
91
  key: 0,
92
92
  variant: n.variant,
93
93
  "show-alpha": !n.hideOpacity,
94
94
  type: n.hideOpacity ? "HEX" : "HEX8",
95
95
  "model-value": n.modelValue,
96
- "last-used-colors": H.value,
96
+ "last-used-colors": O.value,
97
97
  "preset-colors": n.presetColors,
98
98
  "onUpdate:modelValue": C,
99
- onLastUsedPick: W
99
+ onLastUsedPick: z
100
100
  }, null, 8, ["variant", "show-alpha", "type", "model-value", "last-used-colors", "preset-colors"]))
101
101
  ]),
102
- default: Y(() => [
102
+ default: W(() => [
103
103
  n.hideInputColor ? (m(), E("div", It, [
104
- Ke(M.$slots, "picker-icon", {}, () => [
105
- T(w(A), {
104
+ je(U.$slots, "picker-icon", {}, () => [
105
+ L(w(A), {
106
106
  class: "cursor-pointer",
107
- style: ee(`color: ${f.value}`),
107
+ style: te(`color: ${f.value}`),
108
108
  name: "drop"
109
109
  }, null, 8, ["style"])
110
110
  ])
111
- ])) : (m(), F(w($e), {
111
+ ])) : (m(), P(w(we), {
112
112
  key: 0,
113
113
  "model-value": f.value,
114
114
  icon: "drop",
@@ -116,10 +116,10 @@ const It = { key: 1 }, Vt = {
116
116
  placeholder: "",
117
117
  "onUpdate:modelValue": C
118
118
  }, vt({ _: 2 }, [
119
- M.$slots.leading ? {
119
+ U.$slots.leading ? {
120
120
  name: "leading",
121
- fn: Y(() => [
122
- Ke(M.$slots, "leading")
121
+ fn: W(() => [
122
+ je(U.$slots, "leading")
123
123
  ]),
124
124
  key: "0"
125
125
  } : void 0
@@ -131,7 +131,7 @@ const It = { key: 1 }, Vt = {
131
131
  _: 3
132
132
  }, 8, ["class"]));
133
133
  }
134
- }, Lt = ["id"], Tt = { class: "flex items-center gap-x-3 px-5" }, Bt = { class: "flex items-center gap-x-5 cursor-pointer" }, Rt = { class: "flex flex-col py-2 overflow-hidden" }, Et = ["onClick"], Mt = { class: "flex gap-x-3 items-center px-5" }, Ut = { class: "flex items-center gap-x-3 px-5" }, Dt = { class: "flex gap-x-3 items-center px-5" }, Ht = { class: "flex gap-x-3 items-center px-5" }, Ot = { class: "flex items-center" }, Qt = { class: "grid cursor-pointer px-5" }, At = {
134
+ }, Tt = ["id"], Lt = { class: "flex items-center gap-x-3 px-5" }, Bt = { class: "flex items-center gap-x-5 cursor-pointer" }, Rt = { class: "flex flex-col py-2 overflow-hidden" }, Et = ["onClick"], Ut = { class: "flex gap-x-3 items-center px-5" }, Dt = { class: "flex items-center gap-x-3 px-5" }, Ht = { class: "flex gap-x-3 items-center px-5" }, Ot = { class: "flex gap-x-3 items-center px-5" }, Mt = { class: "flex items-center" }, Qt = { class: "grid cursor-pointer px-5" }, At = {
135
135
  key: 5,
136
136
  class: "flex gap-x-3 items-center px-5"
137
137
  }, Nt = { class: "flex" }, Pt = { class: "mt-1 mx-2 cursor-pointer" }, Rl = {
@@ -200,136 +200,111 @@ const It = { key: 1 }, Vt = {
200
200
  "alignment"
201
201
  ],
202
202
  "text-only": ["changes", "font-size", "font-style", "link", "quote", "list", "alignment"]
203
- }, f = he(() => u[r.variant]), C = G.import("attributors/style/size");
204
- C.whitelist = r.fontSizes.map((c) => c.value), G.register(C, !0);
205
- const p = G.import("attributors/style/align");
206
- G.register(p, !0);
207
- const a = G.import("attributors/style/background");
208
- G.register(a, !0);
209
- const H = G.import("attributors/style/color");
210
- G.register(H, !0);
211
- const j = G.import("attributors/style/direction");
212
- G.register(j, !0);
213
- const O = G.import("attributors/style/font");
214
- G.register(O, !0);
215
- const L = G.import("blots/block/embed");
216
- class B extends L {
203
+ }, f = $e(() => u[r.variant]), C = Y.import("attributors/style/size");
204
+ C.whitelist = r.fontSizes.map((c) => c.value), Y.register(C, !0);
205
+ const p = Y.import("attributors/style/align");
206
+ Y.register(p, !0);
207
+ const a = Y.import("attributors/style/background");
208
+ Y.register(a, !0);
209
+ const O = Y.import("attributors/style/color");
210
+ Y.register(O, !0);
211
+ const Z = Y.import("attributors/style/direction");
212
+ Y.register(Z, !0);
213
+ const M = Y.import("attributors/style/font");
214
+ Y.register(M, !0);
215
+ const T = Y.import("blots/block/embed");
216
+ class B extends T {
217
217
  }
218
- ze(B, "blotName", "divider"), ze(B, "tagName", "hr"), G.register(B);
219
- const W = v(
218
+ We(B, "blotName", "divider"), We(B, "tagName", "hr"), Y.register(B);
219
+ const z = v(
220
220
  Math.random().toString(36).replace(/[^a-zA-Z]+/g, "")
221
- ), M = v(!1), N = v(!1), U = v(!1), te = v(!1), K = v(!1), z = v(!1), R = v(!1), q = v(""), le = v(""), _ = v(""), x = v(), we = v(!1), ue = v(r.image), ve = he(() => {
222
- const c = [
223
- "background",
224
- "bold",
225
- "color",
226
- "font",
227
- "code",
228
- "italic",
229
- "link",
230
- "size",
231
- "strike",
232
- "script",
233
- "underline",
234
- "blockquote",
235
- "header",
236
- "indent",
237
- "list",
238
- "align",
239
- "direction",
240
- "code-block",
241
- "formula"
242
- ];
243
- return f.value.includes("image") && c.push("image"), f.value.includes("media") && c.push("video"), {
244
- formats: c
245
- };
246
- }), Se = (c) => {
247
- M.value = x.value.getQuill().history.stack.undo.length > 0, N.value = x.value.getQuill().history.stack.redo.length > 0, U.value = x.value.getQuill().getFormat().bold, te.value = x.value.getQuill().getFormat().italic, K.value = x.value.getQuill().getFormat().underline, R.value = x.value.getQuill().getFormat().blockquote, le.value = x.value.getQuill().getFormat().list, _.value = x.value.getQuill().getFormat().align;
221
+ ), U = v(!1), N = v(!1), D = v(!1), le = v(!1), J = v(!1), j = v(!1), R = v(!1), X = v(""), ae = v(""), ee = v(""), b = v(), Se = v(!1), ue = v(r.image), ie = (c) => {
222
+ U.value = b.value.getQuill().history.stack.undo.length > 0, N.value = b.value.getQuill().history.stack.redo.length > 0, D.value = b.value.getQuill().getFormat().bold, le.value = b.value.getQuill().getFormat().italic, J.value = b.value.getQuill().getFormat().underline, R.value = b.value.getQuill().getFormat().blockquote, ae.value = b.value.getQuill().getFormat().list, ee.value = b.value.getQuill().getFormat().align;
248
223
  let o = document.createElement("div");
249
- o.innerHTML = c, we.value && (o.innerText ? y("update:modelValue", c || "") : y("update:modelValue", ""), o.remove());
250
- }, Re = () => {
251
- if (x.value.getQuill().getSelection(!0)) {
252
- const o = x.value.getQuill().getSelection(!0);
253
- x.value.getQuill().insertText(o.index, `
254
- `, G.sources.USER), x.value.getQuill().insertEmbed(o.index + 1, "divider", !0, G.sources.USER), x.value.getQuill().setSelection(o.index + 2, G.sources.SILENT);
224
+ o.innerHTML = c, Se.value && (o.innerText ? y("update:modelValue", c || "") : y("update:modelValue", ""), o.remove());
225
+ }, Pe = () => {
226
+ if (b.value.getQuill().getSelection(!0)) {
227
+ const o = b.value.getQuill().getSelection(!0);
228
+ b.value.getQuill().insertText(o.index, `
229
+ `, Y.sources.USER), b.value.getQuill().insertEmbed(o.index + 1, "divider", !0, Y.sources.USER), b.value.getQuill().setSelection(o.index + 2, Y.sources.SILENT);
255
230
  }
256
231
  }, Ee = () => {
257
- x.value.getQuill().history.undo(), Se(r.modelValue);
232
+ b.value.getQuill().history.undo(), ie(r.modelValue);
233
+ }, Ue = () => {
234
+ b.value.getQuill().history.redo(), ie(r.modelValue);
258
235
  }, Ce = () => {
259
- x.value.getQuill().history.redo(), Se(r.modelValue);
260
- }, ae = () => {
261
236
  var c;
262
- x.value.getQuill().format("bold", !U.value), (c = x.value.getQuill().getSelection()) != null && c.length || (U.value = !U.value);
237
+ b.value.getQuill().format("bold", !D.value), (c = b.value.getQuill().getSelection()) != null && c.length || (D.value = !D.value);
238
+ }, ne = () => {
239
+ var c;
240
+ b.value.getQuill().format("italic", !le.value), (c = b.value.getQuill().getSelection()) != null && c.length || (le.value = !le.value);
263
241
  }, Ie = () => {
264
242
  var c;
265
- x.value.getQuill().format("italic", !te.value), (c = x.value.getQuill().getSelection()) != null && c.length || (te.value = !te.value);
243
+ b.value.getQuill().format("underline", !J.value), (c = b.value.getQuill().getSelection()) != null && c.length || (J.value = !J.value);
244
+ }, De = (c) => {
245
+ b.value.getQuill().format("size", c), X.value = c, j.value = !1;
246
+ }, me = () => {
247
+ const c = b.value.getQuill().getSelection();
248
+ c && c.length > 0 && b.value.getQuill().theme.tooltip.edit();
266
249
  }, Xe = () => {
267
- var c;
268
- x.value.getQuill().format("underline", !K.value), (c = x.value.getQuill().getSelection()) != null && c.length || (K.value = !K.value);
269
- }, de = (c) => {
270
- x.value.getQuill().format("size", c), q.value = c, z.value = !1;
271
- }, qe = () => {
272
- const c = x.value.getQuill().getSelection();
273
- c && c.length > 0 && x.value.getQuill().theme.tooltip.edit();
274
- }, ne = () => {
275
- x.value.getQuill().format("blockquote", !R.value);
276
- }, Me = (c) => {
277
- const o = x.value.getQuill().getSelection();
278
- o && (x.value.getQuill().clipboard.dangerouslyPasteHTML(o.index, `<img src="${c}" />`), ue.value = c, y("update:image", ue.value));
279
- }, Fe = () => {
280
- x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1);
250
+ b.value.getQuill().format("blockquote", !R.value);
251
+ }, oe = (c) => {
252
+ const o = b.value.getQuill().getSelection();
253
+ o && (b.value.getQuill().clipboard.dangerouslyPasteHTML(o.index, `<img src="${c}" />`), ue.value = c, y("update:image", ue.value));
254
+ }, He = () => {
255
+ b.value.getQuill().getSelection() || b.value.getQuill().setSelection(b.value.getQuill().getLength() - 1);
281
256
  const c = document.createElement("input");
282
257
  c.type = "file", c.accept = "jpg,.jpeg,.png,.webp,.gif", c.onchange = () => {
283
- const o = c.files[0], b = new FileReader();
284
- b.onload = () => Me(b.result), b.readAsDataURL(o);
258
+ const o = c.files[0], x = new FileReader();
259
+ x.onload = () => oe(x.result), x.readAsDataURL(o);
285
260
  }, c.click();
286
- }, P = (c) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(c), Z = (c) => {
261
+ }, Oe = (c) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(c), q = (c) => {
287
262
  setTimeout(() => {
288
- var b;
263
+ var x;
289
264
  if (c) {
290
- const J = x.value.getHTML(), ce = document.createElement("div");
291
- ce.innerHTML = J;
292
- let se = ce.getElementsByTagName("img");
293
- if (se && se.length > 0)
294
- for (let be = 0; be < se.length; be++) {
295
- const Qe = (b = se[be]) == null ? void 0 : b.getAttribute("src");
296
- P(Qe) && y("update:image", Qe);
265
+ const G = b.value.getHTML(), se = document.createElement("div");
266
+ se.innerHTML = G;
267
+ let xe = se.getElementsByTagName("img");
268
+ if (xe && xe.length > 0)
269
+ for (let pe = 0; pe < xe.length; pe++) {
270
+ const ke = (x = xe[pe]) == null ? void 0 : x.getAttribute("src");
271
+ Oe(ke) && y("update:image", ke);
297
272
  }
298
273
  }
299
274
  }, 100);
300
275
  const { items: o } = c.clipboardData;
301
- o.length && o[0].getAsString((b) => {
302
- P(b) && (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1));
276
+ o.length && o[0].getAsString((x) => {
277
+ Oe(x) && (b.value.getQuill().getSelection() || b.value.getQuill().setSelection(b.value.getQuill().getLength() - 1));
303
278
  });
304
- }, Ue = () => {
305
- x.value.getQuill().theme.tooltip.edit("video");
306
- }, De = (c) => {
307
- x.value.getQuill().format("list", c), le.value = c;
308
- }, me = (c = void 0) => {
309
- x.value.getQuill().format("align", c), _.value = c;
310
- }, fe = v(""), He = () => {
311
- x.value.getQuill().format("color", fe.value);
279
+ }, _ = () => {
280
+ b.value.getQuill().theme.tooltip.edit("video");
281
+ }, Ve = (c) => {
282
+ b.value.getQuill().format("list", c), ae.value = c;
283
+ }, he = (c = void 0) => {
284
+ b.value.getQuill().format("align", c), ee.value = c;
285
+ }, de = v(""), qe = () => {
286
+ b.value.getQuill().format("color", de.value);
312
287
  };
313
- _e(() => {
314
- de(r.initialFontSize || r.fontSizes[0].value), we.value = !0;
288
+ Je(() => {
289
+ De(r.initialFontSize || r.fontSizes[0].value), Se.value = !0;
315
290
  });
316
- const ie = v(100), xe = v(!1), Oe = (c) => {
317
- var b, J;
318
- ie.value = c;
319
- const o = (b = window.getSelection()) == null ? void 0 : b.focusNode;
320
- o && o.nodeName !== "#text" && (x.value.getQuill().format("width", `${ie.value}%`), (J = o == null ? void 0 : o.querySelector("img")) == null || J.setAttribute("style", "margin:auto;display:block;"));
321
- }, ke = (c = "left") => {
322
- var b, J;
323
- const o = (b = window.getSelection()) == null ? void 0 : b.focusNode;
291
+ const ye = v(100), ce = v(!1), Te = (c) => {
292
+ var x, G;
293
+ ye.value = c;
294
+ const o = (x = window.getSelection()) == null ? void 0 : x.focusNode;
295
+ o && o.nodeName !== "#text" && (b.value.getQuill().format("width", `${ye.value}%`), (G = o == null ? void 0 : o.querySelector("img")) == null || G.setAttribute("style", "margin:auto;display:block;"));
296
+ }, be = (c = "left") => {
297
+ var x, G;
298
+ const o = (x = window.getSelection()) == null ? void 0 : x.focusNode;
324
299
  if (o && o.nodeName !== "#text") {
325
- let ce = "float:left";
326
- c == "center" ? ce = "" : c == "right" && (ce = "float:right"), (J = o == null ? void 0 : o.querySelector("img")) == null || J.setAttribute("style", `margin:auto;display:block;${ce}`);
300
+ let se = "float:left";
301
+ c == "center" ? se = "" : c == "right" && (se = "float:right"), (G = o == null ? void 0 : o.querySelector("img")) == null || G.setAttribute("style", `margin:auto;display:block;${se}`);
327
302
  }
328
- }, oe = () => {
303
+ }, Me = () => {
329
304
  var o;
330
305
  const c = (o = window.getSelection()) == null ? void 0 : o.focusNode;
331
- xe.value = c.innerHTML && c.innerHTML.includes("<img");
332
- }, X = v(!1), Ve = v(3), Le = v(3), Ge = he(() => {
306
+ ce.value = c.innerHTML && c.innerHTML.includes("<img");
307
+ }, K = v(!1), F = v(3), Le = v(3), Fe = $e(() => {
333
308
  let c = [];
334
309
  for (let o = 1; o < 30; o++)
335
310
  c.push({
@@ -337,7 +312,7 @@ const It = { key: 1 }, Vt = {
337
312
  value: o.toString()
338
313
  });
339
314
  return c;
340
- }), Ye = he(() => {
315
+ }), Ge = $e(() => {
341
316
  let c = [];
342
317
  for (let o = 1; o < 12; o++)
343
318
  c.push({
@@ -345,15 +320,16 @@ const It = { key: 1 }, Vt = {
345
320
  value: o.toString()
346
321
  });
347
322
  return c;
348
- }), We = () => {
349
- x.value.getQuill().getModule("better-table").insertTable(parseInt(Ve.value), parseInt(Le.value)), X.value = !1;
323
+ }), Ye = () => {
324
+ let c = b.value.getQuill().getModule("better-table");
325
+ c == null || c.insertTable(parseInt(F.value), parseInt(Le.value)), K.value = !1;
350
326
  };
351
- return ye(
327
+ return fe(
352
328
  () => r.modelValue,
353
329
  (c) => {
354
- c || x.value.getQuill().setContents([], "silent");
330
+ c || b.value.getQuill().setContents([], "silent");
355
331
  }
356
- ), (c, o) => (m(), F(w(rt), {
332
+ ), (c, o) => (m(), P(w(st), {
357
333
  label: n.label,
358
334
  hint: n.hint,
359
335
  "error-message": n.errorMessage,
@@ -362,104 +338,107 @@ const It = { key: 1 }, Vt = {
362
338
  "tooltip-text": n.tooltipText,
363
339
  "tooltip-options": n.tooltipOptions
364
340
  }, {
365
- default: Y(() => [
366
- T(w(xt), {
367
- title: "Insert table",
368
- modelValue: X.value,
369
- "onUpdate:modelValue": o[2] || (o[2] = (b) => X.value = b),
370
- class: "!w-full !h-full",
371
- confirmButtonProps: {
372
- label: "Save",
373
- onClick: () => We()
374
- }
375
- }, {
376
- default: Y(() => [
377
- T(w(Je), {
378
- modelValue: Le.value,
379
- "onUpdate:modelValue": o[0] || (o[0] = (b) => Le.value = b),
380
- options: Ye.value,
381
- label: "Table cell",
382
- class: "mb-3"
383
- }, null, 8, ["modelValue", "options"]),
384
- T(w(Je), {
385
- modelValue: Ve.value,
386
- "onUpdate:modelValue": o[1] || (o[1] = (b) => Ve.value = b),
387
- options: Ge.value,
388
- label: "Table rows"
389
- }, null, 8, ["modelValue", "options"])
390
- ]),
391
- _: 1
392
- }, 8, ["modelValue", "confirmButtonProps"]),
341
+ default: W(() => [
342
+ (m(), P(mt, { to: "body" }, [
343
+ L(w(xt), {
344
+ size: "small",
345
+ title: "Insert table",
346
+ modelValue: K.value,
347
+ "onUpdate:modelValue": o[2] || (o[2] = (x) => K.value = x),
348
+ class: "!w-full !h-full",
349
+ confirmButtonProps: {
350
+ label: "Save",
351
+ onClick: () => Ye()
352
+ }
353
+ }, {
354
+ default: W(() => [
355
+ L(w(Ze), {
356
+ modelValue: Le.value,
357
+ "onUpdate:modelValue": o[0] || (o[0] = (x) => Le.value = x),
358
+ options: Ge.value,
359
+ label: "Table cell",
360
+ class: "mb-3"
361
+ }, null, 8, ["modelValue", "options"]),
362
+ L(w(Ze), {
363
+ modelValue: F.value,
364
+ "onUpdate:modelValue": o[1] || (o[1] = (x) => F.value = x),
365
+ options: Fe.value,
366
+ label: "Table rows"
367
+ }, null, 8, ["modelValue", "options"])
368
+ ]),
369
+ _: 1
370
+ }, 8, ["modelValue", "confirmButtonProps"])
371
+ ])),
393
372
  h("div", {
394
373
  class: Q(["grid", { "has-error": n.errorMessage }]),
395
- onClick: oe
374
+ onClick: Me
396
375
  }, [
397
- W.value ? (m(), F(w(yt), {
376
+ z.value ? (m(), P(w(bt), {
398
377
  key: 0,
399
- id: `#${W.value}`,
378
+ id: `#${z.value}`,
400
379
  ref_key: "quill",
401
- ref: x,
380
+ ref: b,
402
381
  content: n.modelValue,
403
382
  options: {
404
- bounds: `#${W.value}`
383
+ bounds: `#${z.value}`
405
384
  },
385
+ "is-text-only": "",
406
386
  theme: "snow",
407
387
  "content-type": "html",
408
- "global-options": ve.value,
409
388
  class: "min-h-[200px]",
410
389
  placeholder: n.placeholder,
411
- "onUpdate:content": Se,
412
- onPaste: Z
390
+ "onUpdate:content": ie,
391
+ onPaste: q
413
392
  }, {
414
- toolbar: Y(() => [
393
+ toolbar: W(() => [
415
394
  h("div", {
416
- id: W.value,
395
+ id: z.value,
417
396
  class: "flex min-h-[36px] flex-wrap !py-2 !px-3 gap-y-2 rounded-t"
418
397
  }, [
419
- f.value.includes("changes") ? (m(), E(pe, { key: 0 }, [
420
- h("div", Tt, [
421
- T(w(A), {
422
- class: Q(M.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
398
+ f.value.includes("changes") ? (m(), E(ge, { key: 0 }, [
399
+ h("div", Lt, [
400
+ L(w(A), {
401
+ class: Q(U.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
423
402
  width: "20",
424
403
  height: "20",
425
404
  name: "text-editor/undo",
426
405
  onClick: Ee
427
406
  }, null, 8, ["class"]),
428
- T(w(A), {
407
+ L(w(A), {
429
408
  class: Q(N.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
430
409
  width: "20",
431
410
  height: "20",
432
411
  name: "text-editor/redo",
433
- onClick: Ce
412
+ onClick: Ue
434
413
  }, null, 8, ["class"])
435
414
  ]),
436
415
  o[16] || (o[16] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
437
- ], 64)) : D("", !0),
438
- f.value.includes("font-size") ? (m(), E(pe, { key: 1 }, [
439
- T(w(ut), {
440
- modelValue: z.value,
441
- "onUpdate:modelValue": o[3] || (o[3] = (b) => z.value = b),
416
+ ], 64)) : H("", !0),
417
+ f.value.includes("font-size") ? (m(), E(ge, { key: 1 }, [
418
+ L(w(rt), {
419
+ modelValue: j.value,
420
+ "onUpdate:modelValue": o[3] || (o[3] = (x) => j.value = x),
442
421
  class: "px-5"
443
422
  }, {
444
- menu: Y(() => [
423
+ menu: W(() => [
445
424
  h("div", Rt, [
446
- (m(!0), E(pe, null, Ze(n.fontSizes, (b) => (m(), E("div", {
447
- key: b.value,
448
- class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", q.value === b.value ? "font-medium" : ""]),
449
- onClick: (J) => de(b.value)
450
- }, Pe(b.label), 11, Et))), 128))
425
+ (m(!0), E(ge, null, Ke(n.fontSizes, (x) => (m(), E("div", {
426
+ key: x.value,
427
+ class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", X.value === x.value ? "font-medium" : ""]),
428
+ onClick: (G) => De(x.value)
429
+ }, Ne(x.label), 11, Et))), 128))
451
430
  ])
452
431
  ]),
453
- default: Y(() => {
454
- var b;
432
+ default: W(() => {
433
+ var x;
455
434
  return [
456
435
  h("div", Bt, [
457
- ge(Pe((b = n.fontSizes.find((J) => J.value === q.value)) == null ? void 0 : b.label) + " ", 1),
458
- T(w(A), {
436
+ ve(Ne((x = n.fontSizes.find((G) => G.value === X.value)) == null ? void 0 : x.label) + " ", 1),
437
+ L(w(A), {
459
438
  width: "20",
460
439
  height: "20",
461
440
  name: "chevron-down",
462
- class: Q(["transition-all", z.value ? "rotate-180" : ""])
441
+ class: Q(["transition-all", j.value ? "rotate-180" : ""])
463
442
  }, null, 8, ["class"])
464
443
  ])
465
444
  ];
@@ -467,144 +446,144 @@ const It = { key: 1 }, Vt = {
467
446
  _: 1
468
447
  }, 8, ["modelValue"]),
469
448
  o[17] || (o[17] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
470
- ], 64)) : D("", !0),
471
- f.value.includes("font-style") ? (m(), E(pe, { key: 2 }, [
472
- h("div", Mt, [
473
- T(w(A), {
474
- class: Q(["cursor-pointer", U.value ? "text-oc-text" : "text-oc-text-300"]),
449
+ ], 64)) : H("", !0),
450
+ f.value.includes("font-style") ? (m(), E(ge, { key: 2 }, [
451
+ h("div", Ut, [
452
+ L(w(A), {
453
+ class: Q(["cursor-pointer", D.value ? "text-oc-text" : "text-oc-text-300"]),
475
454
  width: "20",
476
455
  height: "20",
477
456
  name: "text-editor/bold",
478
- onClick: ae
457
+ onClick: Ce
479
458
  }, null, 8, ["class"]),
480
- T(w(A), {
481
- class: Q(["cursor-pointer", te.value ? "text-oc-text" : "text-oc-text-300"]),
459
+ L(w(A), {
460
+ class: Q(["cursor-pointer", le.value ? "text-oc-text" : "text-oc-text-300"]),
482
461
  width: "20",
483
462
  height: "20",
484
463
  name: "text-editor/italic",
485
- onClick: Ie
464
+ onClick: ne
486
465
  }, null, 8, ["class"]),
487
- T(w(A), {
488
- class: Q(["cursor-pointer", K.value ? "text-oc-text" : "text-oc-text-300"]),
466
+ L(w(A), {
467
+ class: Q(["cursor-pointer", J.value ? "text-oc-text" : "text-oc-text-300"]),
489
468
  width: "20",
490
469
  height: "20",
491
470
  name: "text-editor/underline",
492
- onClick: Xe
471
+ onClick: Ie
493
472
  }, null, 8, ["class"])
494
473
  ]),
495
474
  o[18] || (o[18] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
496
- ], 64)) : D("", !0),
497
- h("div", Ut, [
498
- f.value.includes("link") ? (m(), F(w(A), {
475
+ ], 64)) : H("", !0),
476
+ h("div", Dt, [
477
+ f.value.includes("link") ? (m(), P(w(A), {
499
478
  key: 0,
500
479
  class: "cursor-pointer",
501
480
  width: "20",
502
481
  height: "20",
503
482
  name: "text-editor/link",
504
- onClick: qe
505
- })) : D("", !0),
506
- f.value.includes("image") ? (m(), F(w(A), {
483
+ onClick: me
484
+ })) : H("", !0),
485
+ f.value.includes("image") ? (m(), P(w(A), {
507
486
  key: 1,
508
487
  class: "cursor-pointer",
509
488
  width: "20",
510
489
  height: "20",
511
490
  name: "text-editor/image",
512
- onClick: Fe
513
- })) : D("", !0),
514
- f.value.includes("quote") ? (m(), F(w(A), {
491
+ onClick: He
492
+ })) : H("", !0),
493
+ f.value.includes("quote") ? (m(), P(w(A), {
515
494
  key: 2,
516
495
  class: Q(["cursor-pointer", R.value ? "text-oc-text" : "text-oc-text-300"]),
517
496
  width: "20",
518
497
  height: "20",
519
498
  name: "text-editor/quote",
520
- onClick: ne
521
- }, null, 8, ["class"])) : D("", !0),
522
- f.value.includes("media") ? (m(), F(w(A), {
499
+ onClick: Xe
500
+ }, null, 8, ["class"])) : H("", !0),
501
+ f.value.includes("media") ? (m(), P(w(A), {
523
502
  key: 3,
524
503
  class: "cursor-pointer",
525
504
  width: "20",
526
505
  height: "20",
527
506
  name: "text-editor/media",
528
- onClick: Ue
529
- })) : D("", !0),
530
- T(w(A), {
507
+ onClick: _
508
+ })) : H("", !0),
509
+ L(w(A), {
531
510
  class: "cursor-pointer",
532
511
  width: "20",
533
512
  height: "20",
534
513
  name: "table",
535
- onClick: o[4] || (o[4] = (b) => X.value = !X.value)
514
+ onClick: o[4] || (o[4] = (x) => K.value = !K.value)
536
515
  })
537
516
  ]),
538
- f.value.includes("list") ? (m(), E(pe, { key: 3 }, [
517
+ f.value.includes("list") ? (m(), E(ge, { key: 3 }, [
539
518
  o[19] || (o[19] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
540
- h("div", Dt, [
541
- T(w(A), {
542
- class: Q(["cursor-pointer", le.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
519
+ h("div", Ht, [
520
+ L(w(A), {
521
+ class: Q(["cursor-pointer", ae.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
543
522
  width: "20",
544
523
  height: "20",
545
524
  name: "text-editor/bullet",
546
- onClick: o[5] || (o[5] = (b) => De("bullet"))
525
+ onClick: o[5] || (o[5] = (x) => Ve("bullet"))
547
526
  }, null, 8, ["class"]),
548
- T(w(A), {
549
- class: Q(["cursor-pointer", le.value === "ordered" ? "text-oc-text" : "text-oc-text-300"]),
527
+ L(w(A), {
528
+ class: Q(["cursor-pointer", ae.value === "ordered" ? "text-oc-text" : "text-oc-text-300"]),
550
529
  width: "20",
551
530
  height: "20",
552
531
  name: "text-editor/number",
553
- onClick: o[6] || (o[6] = (b) => De("ordered"))
532
+ onClick: o[6] || (o[6] = (x) => Ve("ordered"))
554
533
  }, null, 8, ["class"])
555
534
  ])
556
- ], 64)) : D("", !0),
557
- f.value.includes("alignment") ? (m(), E(pe, { key: 4 }, [
535
+ ], 64)) : H("", !0),
536
+ f.value.includes("alignment") ? (m(), E(ge, { key: 4 }, [
558
537
  o[20] || (o[20] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
559
- h("div", Ht, [
560
- T(w(A), {
561
- class: Q(["cursor-pointer", _.value ? "text-oc-text-300" : "text-oc-text"]),
538
+ h("div", Ot, [
539
+ L(w(A), {
540
+ class: Q(["cursor-pointer", ee.value ? "text-oc-text-300" : "text-oc-text"]),
562
541
  width: "20",
563
542
  height: "20",
564
543
  name: "text-editor/left",
565
- onClick: o[7] || (o[7] = (b) => me())
544
+ onClick: o[7] || (o[7] = (x) => he())
566
545
  }, null, 8, ["class"]),
567
- T(w(A), {
568
- class: Q(["cursor-pointer", _.value === "center" ? "text-oc-text" : "text-oc-text-300"]),
546
+ L(w(A), {
547
+ class: Q(["cursor-pointer", ee.value === "center" ? "text-oc-text" : "text-oc-text-300"]),
569
548
  width: "20",
570
549
  height: "20",
571
550
  name: "text-editor/center",
572
- onClick: o[8] || (o[8] = (b) => me("center"))
551
+ onClick: o[8] || (o[8] = (x) => he("center"))
573
552
  }, null, 8, ["class"]),
574
- T(w(A), {
575
- class: Q(["cursor-pointer", _.value === "right" ? "text-oc-text" : "text-oc-text-300"]),
553
+ L(w(A), {
554
+ class: Q(["cursor-pointer", ee.value === "right" ? "text-oc-text" : "text-oc-text-300"]),
576
555
  width: "20",
577
556
  height: "20",
578
557
  name: "text-editor/right",
579
- onClick: o[9] || (o[9] = (b) => me("right"))
558
+ onClick: o[9] || (o[9] = (x) => he("right"))
580
559
  }, null, 8, ["class"]),
581
- T(w(A), {
582
- class: Q(["cursor-pointer", _.value === "justify" ? "text-oc-text" : "text-oc-text-300"]),
560
+ L(w(A), {
561
+ class: Q(["cursor-pointer", ee.value === "justify" ? "text-oc-text" : "text-oc-text-300"]),
583
562
  width: "20",
584
563
  height: "20",
585
564
  name: "text-editor/justify",
586
- onClick: o[10] || (o[10] = (b) => me("justify"))
565
+ onClick: o[10] || (o[10] = (x) => he("justify"))
587
566
  }, null, 8, ["class"])
588
567
  ])
589
- ], 64)) : D("", !0),
568
+ ], 64)) : H("", !0),
590
569
  o[22] || (o[22] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
591
- h("div", Ot, [
592
- T(w(Vt), {
593
- modelValue: fe.value,
570
+ h("div", Mt, [
571
+ L(w(Vt), {
572
+ modelValue: de.value,
594
573
  "onUpdate:modelValue": [
595
- o[11] || (o[11] = (b) => fe.value = b),
596
- He
574
+ o[11] || (o[11] = (x) => de.value = x),
575
+ qe
597
576
  ],
598
577
  "hide-input-color": ""
599
578
  }, {
600
- "picker-icon": Y(() => [
579
+ "picker-icon": W(() => [
601
580
  h("div", Qt, [
602
581
  h("div", {
603
- style: ee(`color:${fe.value}`)
582
+ style: te(`color:${de.value}`)
604
583
  }, "A", 4),
605
584
  h("div", {
606
585
  class: "h-[5px] w-full rounded border",
607
- style: ee(`background:${fe.value}`)
586
+ style: te(`background:${de.value}`)
608
587
  }, null, 4)
609
588
  ])
610
589
  ]),
@@ -612,39 +591,39 @@ const It = { key: 1 }, Vt = {
612
591
  }, 8, ["modelValue"])
613
592
  ]),
614
593
  o[23] || (o[23] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
615
- xe.value ? (m(), E("div", At, [
616
- T(w(Ne), {
594
+ ce.value ? (m(), E("div", At, [
595
+ L(w(Ae), {
617
596
  label: "Image width",
618
597
  class: "w-[120px]",
619
- "model-value": ie.value,
598
+ "model-value": ye.value,
620
599
  "min-limit": 0,
621
600
  "max-limit": 100,
622
- "onUpdate:modelValue": Oe
601
+ "onUpdate:modelValue": Te
623
602
  }, null, 8, ["model-value"]),
624
603
  h("div", Nt, [
625
- T(w(A), {
604
+ L(w(A), {
626
605
  class: "cursor-pointer",
627
606
  width: "20",
628
607
  height: "20",
629
608
  name: "text-editor/left",
630
- onClick: o[12] || (o[12] = (b) => ke())
609
+ onClick: o[12] || (o[12] = (x) => be())
631
610
  }),
632
- T(w(A), {
611
+ L(w(A), {
633
612
  class: "cursor-pointer",
634
613
  width: "20",
635
614
  height: "20",
636
615
  name: "text-editor/center",
637
- onClick: o[13] || (o[13] = (b) => ke("center"))
616
+ onClick: o[13] || (o[13] = (x) => be("center"))
638
617
  }),
639
- T(w(A), {
618
+ L(w(A), {
640
619
  class: "cursor-pointer",
641
620
  width: "20",
642
621
  height: "20",
643
622
  name: "text-editor/right",
644
- onClick: o[14] || (o[14] = (b) => ke("right"))
623
+ onClick: o[14] || (o[14] = (x) => be("right"))
645
624
  })
646
625
  ])
647
- ])) : D("", !0),
626
+ ])) : H("", !0),
648
627
  h("div", Pt, [
649
628
  (m(), E("svg", {
650
629
  width: "20",
@@ -652,7 +631,7 @@ const It = { key: 1 }, Vt = {
652
631
  viewBox: "0 0 15 15",
653
632
  fill: "none",
654
633
  xmlns: "http://www.w3.org/2000/svg",
655
- onClick: o[15] || (o[15] = (b) => Re())
634
+ onClick: o[15] || (o[15] = (x) => Pe())
656
635
  }, o[21] || (o[21] = [
657
636
  h("path", {
658
637
  "fill-rule": "evenodd",
@@ -662,10 +641,10 @@ const It = { key: 1 }, Vt = {
662
641
  }, null, -1)
663
642
  ])))
664
643
  ])
665
- ], 8, Lt)
644
+ ], 8, Tt)
666
645
  ]),
667
646
  _: 1
668
- }, 8, ["id", "content", "options", "global-options", "placeholder"])) : D("", !0)
647
+ }, 8, ["id", "content", "options", "placeholder"])) : H("", !0)
669
648
  ], 2)
670
649
  ]),
671
650
  _: 1
@@ -712,22 +691,22 @@ const It = { key: 1 }, Vt = {
712
691
  }
713
692
  u.value = `#${a.toUpperCase()}`, y("update:modelValue", u.value);
714
693
  };
715
- return ye(
694
+ return fe(
716
695
  () => r.modelValue,
717
696
  (p, a) => {
718
697
  p !== a && (u.value = p);
719
698
  },
720
699
  { immediate: !0 }
721
- ), (p, a) => (m(), F(w($e), {
700
+ ), (p, a) => (m(), P(w(we), {
722
701
  class: "w-[158px]",
723
702
  placeholder: "#FFFFFF",
724
703
  "model-value": u.value,
725
704
  "onUpdate:modelValue": f,
726
705
  onBlur: C,
727
- onKeyup: it(C, ["enter"])
706
+ onKeyup: ot(C, ["enter"])
728
707
  }, null, 8, ["model-value"]));
729
708
  }
730
- }, qt = { class: "grid grid-cols-3 gap-3" }, ot = {
709
+ }, qt = { class: "grid grid-cols-3 gap-3" }, nt = {
731
710
  __name: "InputRgbHsl",
732
711
  props: {
733
712
  inputType: {
@@ -750,74 +729,74 @@ const It = { key: 1 }, Vt = {
750
729
  r: 0,
751
730
  g: 0,
752
731
  b: 0
753
- }), f = v(), C = v(), p = v(), a = (O, L) => {
754
- var W, M, N;
732
+ }), f = v(), C = v(), p = v(), a = (M, T) => {
733
+ var z, U, N;
755
734
  let B = 255;
756
- if (r.inputType == "HSL" && (B = 100, O == "r" && (B = 360)), !isNaN(parseInt(L))) {
757
- if (O == "r") {
758
- let U = parseInt(L);
759
- U <= B && (u.value.r = U, r.inputType == "RGB" ? H("r") : j()), (W = f.value) == null || W.focus();
760
- } else if (O == "g") {
761
- let U = parseInt(L);
762
- U <= B && (u.value.g = U, r.inputType == "RGB" ? H("g") : j()), (M = C.value) == null || M.focus();
763
- } else if (O == "b") {
764
- let U = parseInt(L);
765
- U <= B && (u.value.b = U, r.inputType == "RGB" ? H("b") : j()), (N = p.value) == null || N.focus();
735
+ if (r.inputType == "HSL" && (B = 100, M == "r" && (B = 360)), !isNaN(parseInt(T))) {
736
+ if (M == "r") {
737
+ let D = parseInt(T);
738
+ D <= B && (u.value.r = D, r.inputType == "RGB" ? O("r") : Z()), (z = f.value) == null || z.focus();
739
+ } else if (M == "g") {
740
+ let D = parseInt(T);
741
+ D <= B && (u.value.g = D, r.inputType == "RGB" ? O("g") : Z()), (U = C.value) == null || U.focus();
742
+ } else if (M == "b") {
743
+ let D = parseInt(T);
744
+ D <= B && (u.value.b = D, r.inputType == "RGB" ? O("b") : Z()), (N = p.value) == null || N.focus();
766
745
  }
767
746
  }
768
- }, H = (O) => {
747
+ }, O = (M) => {
769
748
  y("update-rgb-value", {
770
- type: O,
749
+ type: M,
771
750
  value: {
772
751
  r: parseInt(u.value.r),
773
752
  g: parseInt(u.value.g),
774
753
  b: parseInt(u.value.b)
775
754
  }
776
755
  });
777
- }, j = () => {
756
+ }, Z = () => {
778
757
  y("update-hsl-value", {
779
758
  h: parseInt(u.value.r),
780
759
  s: parseInt(u.value.g),
781
760
  l: parseInt(u.value.b)
782
761
  });
783
762
  };
784
- return r.inputType === "RGB" ? ye(
763
+ return r.inputType === "RGB" ? fe(
785
764
  () => r.rgbValue,
786
- (O, L) => {
787
- O !== L && (u.value = O);
765
+ (M, T) => {
766
+ M !== T && (u.value = M);
788
767
  },
789
768
  { immediate: !0, deep: !0 }
790
- ) : ye(
769
+ ) : fe(
791
770
  () => r.hslValue,
792
- (O) => {
771
+ (M) => {
793
772
  u.value = {
794
- r: O.h,
795
- g: O.s,
796
- b: O.l
773
+ r: M.h,
774
+ g: M.s,
775
+ b: M.l
797
776
  };
798
777
  },
799
778
  { immediate: !0, deep: !0 }
800
- ), (O, L) => (m(), E("div", qt, [
801
- T(w($e), {
779
+ ), (M, T) => (m(), E("div", qt, [
780
+ L(w(we), {
802
781
  ref_key: "rInputEl",
803
782
  ref: f,
804
783
  "model-value": u.value.r,
805
784
  placeholder: "100",
806
- "onUpdate:modelValue": L[0] || (L[0] = (B) => a("r", B))
785
+ "onUpdate:modelValue": T[0] || (T[0] = (B) => a("r", B))
807
786
  }, null, 8, ["model-value"]),
808
- T(w($e), {
787
+ L(w(we), {
809
788
  ref_key: "gInputEl",
810
789
  ref: C,
811
790
  "model-value": u.value.g,
812
791
  placeholder: "100",
813
- "onUpdate:modelValue": L[1] || (L[1] = (B) => a("g", B))
792
+ "onUpdate:modelValue": T[1] || (T[1] = (B) => a("g", B))
814
793
  }, null, 8, ["model-value"]),
815
- T(w($e), {
794
+ L(w(we), {
816
795
  ref_key: "bInputEl",
817
796
  ref: p,
818
797
  "model-value": u.value.b,
819
798
  placeholder: "100",
820
- "onUpdate:modelValue": L[2] || (L[2] = (B) => a("b", B))
799
+ "onUpdate:modelValue": T[2] || (T[2] = (B) => a("b", B))
821
800
  }, null, 8, ["model-value"])
822
801
  ]));
823
802
  }
@@ -838,22 +817,22 @@ const It = { key: 1 }, Vt = {
838
817
  let p = parseInt(u.value);
839
818
  p && p <= 100 ? y("update:modelValue", p) : u.value = r.modelValue;
840
819
  };
841
- return ye(
820
+ return fe(
842
821
  () => r.modelValue,
843
822
  (p, a) => {
844
823
  p !== a && (u.value = p);
845
824
  },
846
825
  { immediate: !0 }
847
- ), (p, a) => (m(), F(w($e), {
826
+ ), (p, a) => (m(), P(w(we), {
848
827
  class: "w-[75px]",
849
828
  placeholder: "100",
850
829
  "model-value": u.value,
851
830
  "onUpdate:modelValue": f,
852
831
  onBlur: C,
853
- onKeyup: it(C, ["enter"])
832
+ onKeyup: ot(C, ["enter"])
854
833
  }, {
855
- leading: Y(() => a[0] || (a[0] = [
856
- ge("%")
834
+ leading: W(() => a[0] || (a[0] = [
835
+ ve("%")
857
836
  ])),
858
837
  _: 1
859
838
  }, 8, ["model-value"]));
@@ -868,7 +847,7 @@ const It = { key: 1 }, Vt = {
868
847
  const y = v(n.modelValue), u = V, f = (C) => {
869
848
  y.value = C, u("update:model-value", C);
870
849
  };
871
- return (C, p) => (m(), F(w(Je), {
850
+ return (C, p) => (m(), P(w(Ze), {
872
851
  class: "!w-[80px]",
873
852
  "model-value": y.value,
874
853
  options: [
@@ -895,7 +874,7 @@ const It = { key: 1 }, Vt = {
895
874
  },
896
875
  emits: ["update:modelValue", "onInput"],
897
876
  setup(n, { emit: V }) {
898
- const r = Be("opacitySlider"), y = V, u = (f) => {
877
+ const r = Re("opacitySlider"), y = V, u = (f) => {
899
878
  y("update:modelValue", parseInt(f.target.value)), y("onInput", f);
900
879
  };
901
880
  return (f, C) => (m(), E("div", Yt, [
@@ -920,32 +899,32 @@ const It = { key: 1 }, Vt = {
920
899
  },
921
900
  emits: ["onAddColor", "onMouseDown", "onDeleteColor"],
922
901
  setup(n, { emit: V }) {
923
- const r = Be("gradientBar"), y = v(), u = V, f = (L) => {
924
- L.preventDefault();
925
- }, C = v("left:0"), p = v(!1), a = (L) => {
926
- u("onMouseDown", L);
927
- }, H = () => {
928
- let L = y.value.querySelector(".select");
929
- C.value = L == null ? void 0 : L.getAttribute("style");
930
- }, j = () => {
902
+ const r = Re("gradientBar"), y = v(), u = V, f = (T) => {
903
+ T.preventDefault();
904
+ }, C = v("left:0"), p = v(!1), a = (T) => {
905
+ u("onMouseDown", T);
906
+ }, O = () => {
907
+ let T = y.value.querySelector(".select");
908
+ C.value = T == null ? void 0 : T.getAttribute("style");
909
+ }, Z = () => {
931
910
  var B;
932
- H(), (((B = y.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? p.value = !0 : p.value = !1;
933
- }, O = (L) => {
934
- p.value = !1, u("onAddColor", L);
911
+ O(), (((B = y.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? p.value = !0 : p.value = !1;
912
+ }, M = (T) => {
913
+ p.value = !1, u("onAddColor", T);
935
914
  };
936
- return (L, B) => (m(), E("div", {
915
+ return (T, B) => (m(), E("div", {
937
916
  ref_key: "gradientSlider",
938
917
  ref: y,
939
918
  class: "relative h-[40px]",
940
- onClick: j
919
+ onClick: Z
941
920
  }, [
942
921
  h("button", {
943
922
  type: "button",
944
923
  class: Q(["absolute top-[-18px] text-oc-accent-3 rounded-[4px] border-2 border-oc-gray-200 p-2 bg-oc-bg-light", p.value ? "" : "!hidden"]),
945
- style: ee(C.value),
946
- onClick: B[0] || (B[0] = (W) => L.$emit("onDeleteColor"))
924
+ style: te(C.value),
925
+ onClick: B[0] || (B[0] = (z) => T.$emit("onDeleteColor"))
947
926
  }, [
948
- T(w(A), {
927
+ L(w(A), {
949
928
  name: "bin",
950
929
  width: "14",
951
930
  height: "14"
@@ -963,7 +942,7 @@ const It = { key: 1 }, Vt = {
963
942
  ref_key: "gradientBar",
964
943
  ref: r,
965
944
  class: "gradient-container",
966
- onDblclick: O
945
+ onDblclick: M
967
946
  }, null, 544)
968
947
  ], 34)
969
948
  ], 512));
@@ -1009,7 +988,7 @@ const It = { key: 1 }, Vt = {
1009
988
  emits: ["update:angle", "update:percentageX", "update:percentageY", "onInput"],
1010
989
  setup(n, { emit: V }) {
1011
990
  const r = v(!1), y = v(!1);
1012
- _e(() => {
991
+ Je(() => {
1013
992
  r.value = !0, y.value = !0;
1014
993
  });
1015
994
  const u = V, f = (C, p) => {
@@ -1027,7 +1006,7 @@ const It = { key: 1 }, Vt = {
1027
1006
  }
1028
1007
  };
1029
1008
  return (C, p) => (m(), E("div", el, [
1030
- n.gradientType == "linear" && r.value ? (m(), F(w(Ne), {
1009
+ n.gradientType == "linear" && r.value ? (m(), P(w(Ae), {
1031
1010
  key: 0,
1032
1011
  label: "Angle",
1033
1012
  "model-value": n.angle,
@@ -1035,54 +1014,54 @@ const It = { key: 1 }, Vt = {
1035
1014
  "max-limit": 360,
1036
1015
  "onUpdate:modelValue": p[0] || (p[0] = (a) => f(a, "angle"))
1037
1016
  }, {
1038
- "min-limit-label": Y(() => p[3] || (p[3] = [
1039
- ge("0 ")
1017
+ "min-limit-label": W(() => p[3] || (p[3] = [
1018
+ ve("0 ")
1040
1019
  ])),
1041
- "max-limit-label": Y(() => p[4] || (p[4] = [
1042
- ge("360"),
1020
+ "max-limit-label": W(() => p[4] || (p[4] = [
1021
+ ve("360"),
1043
1022
  h("span", null, "°", -1)
1044
1023
  ])),
1045
1024
  _: 1
1046
- }, 8, ["model-value"])) : D("", !0),
1025
+ }, 8, ["model-value"])) : H("", !0),
1047
1026
  n.gradientType == "radial" && y.value ? (m(), E("div", tl, [
1048
- T(w(Ne), {
1027
+ L(w(Ae), {
1049
1028
  label: "Position X",
1050
1029
  "model-value": n.percentageX,
1051
1030
  "min-limit": 0,
1052
1031
  "max-limit": 100,
1053
1032
  "onUpdate:modelValue": p[1] || (p[1] = (a) => f(a, "percentageX"))
1054
1033
  }, {
1055
- "min-limit-label": Y(() => p[5] || (p[5] = [
1056
- ge("0")
1034
+ "min-limit-label": W(() => p[5] || (p[5] = [
1035
+ ve("0")
1057
1036
  ])),
1058
- "max-limit-label": Y(() => p[6] || (p[6] = [
1059
- ge("100%")
1037
+ "max-limit-label": W(() => p[6] || (p[6] = [
1038
+ ve("100%")
1060
1039
  ])),
1061
1040
  _: 1
1062
1041
  }, 8, ["model-value"]),
1063
- T(w(Ne), {
1042
+ L(w(Ae), {
1064
1043
  label: "Position Y",
1065
1044
  "model-value": n.percentageY,
1066
1045
  "min-limit": 0,
1067
1046
  "max-limit": 100,
1068
1047
  "onUpdate:modelValue": p[2] || (p[2] = (a) => f(a, "percentageY"))
1069
1048
  }, {
1070
- "min-limit-label": Y(() => p[7] || (p[7] = [
1071
- ge("0")
1049
+ "min-limit-label": W(() => p[7] || (p[7] = [
1050
+ ve("0")
1072
1051
  ])),
1073
- "max-limit-label": Y(() => p[8] || (p[8] = [
1074
- ge("100%")
1052
+ "max-limit-label": W(() => p[8] || (p[8] = [
1053
+ ve("100%")
1075
1054
  ])),
1076
1055
  _: 1
1077
1056
  }, 8, ["model-value"])
1078
- ])) : D("", !0)
1057
+ ])) : H("", !0)
1079
1058
  ]));
1080
1059
  }
1081
1060
  }, al = {
1082
1061
  __name: "PickerWrap",
1083
1062
  emits: ["onMouseDown"],
1084
1063
  setup(n) {
1085
- const V = Be("canvas"), r = Be("pickerWrap"), y = Be("pickerPointer"), u = (f) => {
1064
+ const V = Re("canvas"), r = Re("pickerWrap"), y = Re("pickerPointer"), u = (f) => {
1086
1065
  f.preventDefault();
1087
1066
  };
1088
1067
  return (f, C) => (m(), E("div", {
@@ -1142,7 +1121,7 @@ const It = { key: 1 }, Vt = {
1142
1121
  n.modelValue && n.mode == "solid" ? (m(), E("div", {
1143
1122
  key: 0,
1144
1123
  class: "w-[28px] h-[28px] rounded-full border",
1145
- style: ee(`background:${n.modelValue}`)
1124
+ style: te(`background:${n.modelValue}`)
1146
1125
  }, null, 4)) : (m(), E("svg", ol, r[3] || (r[3] = [
1147
1126
  h("g", { opacity: "0.5" }, [
1148
1127
  h("path", {
@@ -1155,12 +1134,12 @@ const It = { key: 1 }, Vt = {
1155
1134
  h("button", {
1156
1135
  type: "button",
1157
1136
  class: Q(n.gradientType == "linear" && n.mode != "solid" ? "active" : ""),
1158
- style: ee(`${n.iconClasses.linear ? "" : "padding: 7px;"}`),
1137
+ style: te(`${n.iconClasses.linear ? "" : "padding: 7px;"}`),
1159
1138
  onClick: r[1] || (r[1] = (y) => V.$emit("onChangeMode", "linear"))
1160
1139
  }, [
1161
1140
  h("div", {
1162
1141
  class: "w-[28px] h-[28px] rounded-full border",
1163
- style: ee(
1142
+ style: te(
1164
1143
  n.modelValue && n.gradientType == "linear" && n.mode != "solid" ? `background:${n.modelValue}` : `
1165
1144
  background: linear-gradient(
1166
1145
  180deg,
@@ -1174,12 +1153,12 @@ const It = { key: 1 }, Vt = {
1174
1153
  h("button", {
1175
1154
  type: "button",
1176
1155
  class: Q(n.gradientType == "radial" && n.mode != "solid" ? "active" : ""),
1177
- style: ee(`${n.iconClasses.radial ? "" : "padding: 6px;"}`),
1156
+ style: te(`${n.iconClasses.radial ? "" : "padding: 6px;"}`),
1178
1157
  onClick: r[2] || (r[2] = (y) => V.$emit("onChangeMode", "radial"))
1179
1158
  }, [
1180
1159
  h("div", {
1181
1160
  class: "w-[28px] h-[28px] rounded-full border",
1182
- style: ee(
1161
+ style: te(
1183
1162
  n.modelValue && n.gradientType == "radial" && n.mode != "solid" ? `background:${n.modelValue}` : "background: radial-gradient(circle at 50% 50%, rgb(255, 255, 255) 0%, rgb(3, 16, 47) 100%);"
1184
1163
  )
1185
1164
  }, null, 4)
@@ -1192,13 +1171,13 @@ const It = { key: 1 }, Vt = {
1192
1171
  }, ul = {
1193
1172
  key: 1,
1194
1173
  class: "grid items-center mb-5"
1195
- }, dl = { key: 2 }, cl = { key: 0 }, pl = { class: "ck-cp-local-color-conatiner" }, gl = ["onClick"], vl = { class: "flex items-center gap-2" }, ml = { id: "ck-cp-target-background" }, fl = { class: "flex gap-3" }, bl = {
1174
+ }, dl = { key: 2 }, cl = { key: 0 }, pl = { class: "ck-cp-local-color-conatiner" }, gl = ["onClick"], vl = { class: "flex items-center gap-2" }, ml = { id: "ck-cp-target-background" }, fl = { class: "flex gap-3" }, hl = {
1196
1175
  key: 0,
1197
1176
  class: "w-full flex gap-3"
1198
- }, hl = {
1177
+ }, yl = {
1199
1178
  key: 4,
1200
1179
  class: "ck-cp-local-color-conatiner"
1201
- }, yl = ["onClick"], xl = {
1180
+ }, bl = ["onClick"], xl = {
1202
1181
  __name: "OcColorPickerPopup",
1203
1182
  props: {
1204
1183
  modelValue: {
@@ -1240,62 +1219,62 @@ const It = { key: 1 }, Vt = {
1240
1219
  }, a = v([
1241
1220
  { id: 1, r: 68, g: 71, b: 119, a: 100, percent: 0, hue: 0, select: !0 },
1242
1221
  { id: 2, r: 0, g: 0, b: 255, a: 100, percent: 100, hue: 0, select: !1 }
1243
- ]), H = v(r.lastUsedColors);
1244
- ye(
1222
+ ]), O = v(r.lastUsedColors);
1223
+ fe(
1245
1224
  () => r.lastUsedColors,
1246
1225
  () => {
1247
- H.value = r.lastUsedColors;
1226
+ O.value = r.lastUsedColors;
1248
1227
  },
1249
1228
  {
1250
1229
  deep: !0
1251
1230
  }
1252
1231
  );
1253
- const j = he(() => r.variant !== "gradient" ? H.value.filter((t) => !t.includes("linear") && !t.includes("radial")) : H.value), O = v(!1), L = v("linear"), B = et({
1232
+ const Z = $e(() => r.variant !== "gradient" ? O.value.filter((t) => !t.includes("linear") && !t.includes("radial")) : O.value), M = v(!1), T = v("linear"), B = _e({
1254
1233
  angle: 90,
1255
1234
  percentageX: 50,
1256
1235
  percentageY: 50
1257
- }), W = v(""), M = v(r.inputType), N = v(!1), U = v(), te = v(), K = v(), z = v(), R = v(), q = et({
1236
+ }), z = v(""), U = v(r.inputType), N = v(!1), D = v(), le = v(), J = v(), j = v(), R = v(), X = _e({
1258
1237
  h: 0,
1259
1238
  s: 0,
1260
1239
  l: 0
1261
1240
  });
1262
- Te("gradientBar", te), Te("canvas", K), Te("pickerWrap", z), Te("pickerPointer", R), Te("opacitySlider", U);
1263
- let le = 0, _ = 0, x = 0, we = 0, ue = 0, ve = 0;
1264
- const Se = (t) => {
1265
- !z.value || !R.value || (ue = z.value.offsetHeight - R.value.offsetHeight, ve = z.value.offsetWidth - R.value.offsetWidth, x = t.clientX - t.target.getBoundingClientRect().left, we = t.clientY - t.target.getBoundingClientRect().top, le = x - R.value.offsetWidth / 2, _ = we - R.value.offsetHeight / 2, R.value.style.left = `${le}px`, R.value.style.top = `${_}px`, Ce(!1), b(), window.addEventListener("mousemove", Re), window.addEventListener("mouseup", Ee));
1266
- }, Re = (t) => {
1241
+ Be("gradientBar", le), Be("canvas", J), Be("pickerWrap", j), Be("pickerPointer", R), Be("opacitySlider", D);
1242
+ let ae = 0, ee = 0, b = 0, Se = 0, ue = 0, ie = 0;
1243
+ const Pe = (t) => {
1244
+ !j.value || !R.value || (ue = j.value.offsetHeight - R.value.offsetHeight, ie = j.value.offsetWidth - R.value.offsetWidth, b = t.clientX - t.target.getBoundingClientRect().left, Se = t.clientY - t.target.getBoundingClientRect().top, ae = b - R.value.offsetWidth / 2, ee = Se - R.value.offsetHeight / 2, R.value.style.left = `${ae}px`, R.value.style.top = `${ee}px`, Ce(!1), G(), window.addEventListener("mousemove", Ee), window.addEventListener("mouseup", Ue));
1245
+ }, Ee = (t) => {
1267
1246
  t.preventDefault();
1268
- const e = z.value.getBoundingClientRect(), l = t.clientX - e.left - R.value.offsetWidth / 2, i = t.clientY - e.top - R.value.offsetHeight / 2;
1269
- l >= 0 && l <= ve ? (le = l, R.value.style.left = `${l}px`) : 0 > l ? (le = 0, R.value.style.left = "0px") : l > ve && (le = ve, R.value.style.left = `${ve}px`), i >= 0 && i <= ue ? (_ = i, R.value.style.top = `${i}px`) : 0 > i ? (_ = 0, R.value.style.top = "0px") : i > ue && (_ = ue, R.value.style.top = `${ue}px`), Ce(!1), b();
1270
- }, Ee = () => {
1271
- window.removeEventListener("mousemove", Re), window.removeEventListener("mouseup", Ee);
1247
+ const e = j.value.getBoundingClientRect(), l = t.clientX - e.left - R.value.offsetWidth / 2, i = t.clientY - e.top - R.value.offsetHeight / 2;
1248
+ l >= 0 && l <= ie ? (ae = l, R.value.style.left = `${l}px`) : 0 > l ? (ae = 0, R.value.style.left = "0px") : l > ie && (ae = ie, R.value.style.left = `${ie}px`), i >= 0 && i <= ue ? (ee = i, R.value.style.top = `${i}px`) : 0 > i ? (ee = 0, R.value.style.top = "0px") : i > ue && (ee = ue, R.value.style.top = `${ue}px`), Ce(!1), G();
1249
+ }, Ue = () => {
1250
+ window.removeEventListener("mousemove", Ee), window.removeEventListener("mouseup", Ue);
1272
1251
  }, Ce = (t) => {
1273
1252
  if (!t) {
1274
- let e = Xe();
1275
- const l = nt(ae.value, e.s, e.l);
1253
+ let e = De();
1254
+ const l = at(ne.value, e.s, e.l);
1276
1255
  if (l) {
1277
1256
  if (N.value) {
1278
1257
  let i = a.value.find((s) => s.select == !0);
1279
1258
  i && (i.r = l.r, i.g = l.g, i.b = l.b);
1280
1259
  }
1281
- oe(), X();
1260
+ K(), F();
1282
1261
  }
1283
1262
  }
1284
- }, ae = v(0), Ie = async (t) => {
1285
- const { rgb: e } = at(ae.value, 100, 50);
1286
- ke(e), setTimeout(() => {
1287
- Ce(t), b();
1263
+ }, ne = v(0), Ie = async (t) => {
1264
+ const { rgb: e } = lt(ne.value, 100, 50);
1265
+ Me(e), setTimeout(() => {
1266
+ Ce(t), G();
1288
1267
  }, 0);
1289
- }, Xe = () => {
1290
- let t = { s: 0, l: 0 }, e = z.value.offsetWidth - R.value.offsetWidth, l = z.value.offsetHeight - R.value.offsetHeight, i = parseInt(R.value.style.left), d = 1 - parseInt(R.value.style.top) / l, k = i / e;
1268
+ }, De = () => {
1269
+ let t = { s: 0, l: 0 }, e = j.value.offsetWidth - R.value.offsetWidth, l = j.value.offsetHeight - R.value.offsetHeight, i = parseInt(R.value.style.left), d = 1 - parseInt(R.value.style.top) / l, k = i / e;
1291
1270
  return t.l = d / 2 * (2 - k), t.s = d * k / (1 - Math.abs(2 * t.l - 1)), Number.isNaN(t.s) && (t.s = t.l), t.l = t.l > 1 ? 1 : t.l, t.s = t.s > 1 ? 1 : t.s, t;
1292
- }, de = () => {
1271
+ }, me = () => {
1293
1272
  const t = a.value.find((e) => e.select == !0);
1294
1273
  if (t) {
1295
- const { l: e, s: l } = tt(t.r, t.g, t.b);
1274
+ const { l: e, s: l } = et(t.r, t.g, t.b);
1296
1275
  let i = e, s = l;
1297
1276
  Number.isNaN(s) && (s = i);
1298
- let d = { x: 0, y: 0 }, k = z.value.offsetWidth - R.value.offsetWidth, I = z.value.offsetHeight - R.value.offsetHeight;
1277
+ let d = { x: 0, y: 0 }, k = j.value.offsetWidth - R.value.offsetWidth, I = j.value.offsetHeight - R.value.offsetHeight;
1299
1278
  const [$, g] = 2 * i - 1 < 0 ? [
1300
1279
  k * 2 * s / (1 + s),
1301
1280
  I * (1 - i * (1 + s))
@@ -1306,26 +1285,26 @@ const It = { key: 1 }, Vt = {
1306
1285
  return d.x = $, d.y = g, d;
1307
1286
  } else
1308
1287
  return null;
1309
- }, qe = () => {
1288
+ }, Xe = () => {
1310
1289
  const t = a.value.find((e) => e.select == !0);
1311
- t && (t.hue = ae.value);
1312
- }, ne = v(100), Me = (t) => {
1290
+ t && (t.hue = ne.value);
1291
+ }, oe = v(100), He = (t) => {
1313
1292
  if (r.showAlpha) {
1314
1293
  const e = a.value.find((l) => l.select == !0);
1315
- e && (e.a = parseInt(t), X());
1294
+ e && (e.a = parseInt(t), F());
1316
1295
  }
1317
- }, Fe = (t) => {
1296
+ }, Oe = (t) => {
1318
1297
  var l, i, s, d;
1319
1298
  const e = (i = (l = u.value) == null ? void 0 : l.querySelector(".gradient-handle-content")) == null ? void 0 : i.getBoundingClientRect();
1320
- return t === 0 ? "0px" : t === 100 && e ? `${(((s = te.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((d = te.value) == null ? void 0 : d.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
1299
+ return t === 0 ? "0px" : t === 100 && e ? `${(((s = le.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((d = le.value) == null ? void 0 : d.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
1321
1300
  };
1322
- let P = null, Z = null;
1323
- const Ue = (t) => {
1301
+ let q = null, _ = null;
1302
+ const Ve = (t) => {
1324
1303
  var i, s;
1325
1304
  const l = t.target.offsetParent;
1326
1305
  if ((i = l == null ? void 0 : l.id) != null && i.includes("clr-gb-")) {
1327
1306
  const d = l.id.replace("clr-gb-", "");
1328
- Z = l;
1307
+ _ = l;
1329
1308
  const k = a.value.find((I) => I.select == !0);
1330
1309
  if (k && k.id != d) {
1331
1310
  const I = (s = u.value) == null ? void 0 : s.querySelector(".gradient-handle.select");
@@ -1334,30 +1313,30 @@ const It = { key: 1 }, Vt = {
1334
1313
  for (let g = 0; g < a.value.length; g++) {
1335
1314
  const S = a.value[g];
1336
1315
  if (S.id == d) {
1337
- $ != -1 && (a.value[$].select = !1), a.value[g].select = !0, ne.value = S.a, ie(S.r, S.g, S.b, S.hue, !0), oe(), b();
1316
+ $ != -1 && (a.value[$].select = !1), a.value[g].select = !0, oe.value = S.a, ce(S.r, S.g, S.b, S.hue, !0), K(), G();
1338
1317
  break;
1339
1318
  }
1340
1319
  }
1341
1320
  }
1342
- window.addEventListener("mousemove", me), window.addEventListener("mouseup", De);
1321
+ window.addEventListener("mousemove", de), window.addEventListener("mouseup", he);
1343
1322
  }
1344
- }, De = () => {
1345
- window.removeEventListener("mousemove", me), window.removeEventListener("mouseup", Ue);
1346
- }, me = (t) => {
1323
+ }, he = () => {
1324
+ window.removeEventListener("mousemove", de), window.removeEventListener("mouseup", Ve);
1325
+ }, de = (t) => {
1347
1326
  var d, k;
1348
1327
  t.preventDefault();
1349
- const e = (k = (d = u.value) == null ? void 0 : d.querySelector(".gradient-handle-content")) == null ? void 0 : k.getBoundingClientRect(), l = P == null ? void 0 : P.getBoundingClientRect(), i = l.width - (e == null ? void 0 : e.width);
1328
+ const e = (k = (d = u.value) == null ? void 0 : d.querySelector(".gradient-handle-content")) == null ? void 0 : k.getBoundingClientRect(), l = q == null ? void 0 : q.getBoundingClientRect(), i = l.width - (e == null ? void 0 : e.width);
1350
1329
  let s = t.clientX - (l.left || 0) - ((e == null ? void 0 : e.width) || 0) / 2;
1351
- if (s < 0 ? s = 0 : s > i && (s = i), Z) {
1352
- Z.style.left = `${s}px`;
1330
+ if (s < 0 ? s = 0 : s > i && (s = i), _) {
1331
+ _.style.left = `${s}px`;
1353
1332
  const I = parseFloat((s / ((l == null ? void 0 : l.width) - (e == null ? void 0 : e.width)) * 100).toFixed(0)), $ = a.value.find(
1354
- (g) => g.id == (Z == null ? void 0 : Z.id.replace("clr-gb-", ""))
1333
+ (g) => g.id == (_ == null ? void 0 : _.id.replace("clr-gb-", ""))
1355
1334
  );
1356
- $ && ($.percent = I), X();
1335
+ $ && ($.percent = I), F();
1357
1336
  }
1358
- }, fe = (t) => {
1337
+ }, qe = (t) => {
1359
1338
  var I, $;
1360
- const e = P == null ? void 0 : P.getBoundingClientRect(), l = Math.round((t.clientX - ((e == null ? void 0 : e.left) || 0)) / ((e == null ? void 0 : e.width) || 1) * 100), i = a.value.findIndex((g) => g.select == !0), s = a.value[i], d = {
1339
+ const e = q == null ? void 0 : q.getBoundingClientRect(), l = Math.round((t.clientX - ((e == null ? void 0 : e.left) || 0)) / ((e == null ? void 0 : e.width) || 1) * 100), i = a.value.findIndex((g) => g.select == !0), s = a.value[i], d = {
1361
1340
  id: Date.now(),
1362
1341
  r: s.r,
1363
1342
  g: s.g,
@@ -1369,14 +1348,14 @@ const It = { key: 1 }, Vt = {
1369
1348
  };
1370
1349
  a.value[i].select = !1;
1371
1350
  const k = (I = u.value) == null ? void 0 : I.querySelector(".gradient-handle.select");
1372
- k == null || k.classList.remove("select"), a.value = [...a.value, d], Oe(d), Z = ($ = u.value) == null ? void 0 : $.querySelector(`#clr-gb-${d.id}`), X();
1373
- }, He = (t) => {
1351
+ k == null || k.classList.remove("select"), a.value = [...a.value, d], be(d), _ = ($ = u.value) == null ? void 0 : $.querySelector(`#clr-gb-${d.id}`), F();
1352
+ }, ye = (t) => {
1374
1353
  if (t.r == 0 && t.g == 0 && t.b == 0)
1375
1354
  return !0;
1376
1355
  if (t.r == 255 && t.g == 255 && t.b == 255)
1377
1356
  return !0;
1378
1357
  {
1379
- const e = K.value.getContext("2d", { willReadFrequently: !0 }), l = K.value.width, i = K.value.height, s = e.getImageData(0, 0, l, i).data, d = t.r, k = t.g, I = t.b;
1358
+ const e = J.value.getContext("2d", { willReadFrequently: !0 }), l = J.value.width, i = J.value.height, s = e.getImageData(0, 0, l, i).data, d = t.r, k = t.g, I = t.b;
1380
1359
  for (let $ = 0; $ < i; $++)
1381
1360
  for (let g = 0; g < l; g++) {
1382
1361
  const S = ($ * l + g) * 4, re = s[S], dt = s[S + 1], ct = s[S + 2];
@@ -1385,47 +1364,47 @@ const It = { key: 1 }, Vt = {
1385
1364
  }
1386
1365
  return !1;
1387
1366
  }
1388
- }, ie = (t, e, l, i, s) => {
1367
+ }, ce = (t, e, l, i, s) => {
1389
1368
  setTimeout(() => {
1390
- if (He({ r: t, g: e, b: l })) {
1391
- let d = de();
1369
+ if (ye({ r: t, g: e, b: l })) {
1370
+ let d = me();
1392
1371
  d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`);
1393
1372
  } else {
1394
- let d = de();
1395
- d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`), ae.value = i, Ie(s);
1373
+ let d = me();
1374
+ d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`), ne.value = i, Ie(s);
1396
1375
  }
1397
1376
  }, 0);
1398
- }, xe = () => {
1399
- a.value.forEach((l) => Oe(l)), Ve();
1377
+ }, Te = () => {
1378
+ a.value.forEach((l) => be(l)), Le();
1400
1379
  const t = a.value[0];
1401
- ae.value = t.hue, Ie(!0);
1402
- let e = de();
1403
- e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), oe(), X();
1404
- }, Oe = (t) => {
1380
+ ne.value = t.hue, Ie(!0);
1381
+ let e = me();
1382
+ e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), K(), F();
1383
+ }, be = (t) => {
1405
1384
  if (y.value == "gradient") {
1406
1385
  let e = document.createElement("div");
1407
- e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = Fe(t.percent);
1386
+ e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = Oe(t.percent);
1408
1387
  let l = document.createElement("div");
1409
- l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), P && P.appendChild(e);
1388
+ l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), q && q.appendChild(e);
1410
1389
  }
1411
- }, ke = (t) => {
1412
- const e = K.value.getContext("2d", { willReadFrequently: !0 }), l = K.value.width, i = K.value.height;
1390
+ }, Me = (t) => {
1391
+ const e = J.value.getContext("2d", { willReadFrequently: !0 }), l = J.value.width, i = J.value.height;
1413
1392
  e.fillStyle = `rgb(${t[0]},${t[1]},${t[2]})`, e.fillRect(0, 0, l, i);
1414
1393
  let s = e.createLinearGradient(0, 0, l - 12, 0);
1415
1394
  s.addColorStop(0, "rgb(255,255,255)"), s.addColorStop(1, "rgba(255,255,255,0)"), e.fillStyle = s, e.fillRect(0, 0, l, i);
1416
1395
  let d = e.createLinearGradient(0, 0, 0, i);
1417
1396
  d.addColorStop(0, "rgba(0,0,0,0)"), d.addColorStop(1, "rgb(0,0,0)"), e.fillStyle = d, e.fillRect(0, 0, l, i);
1418
- }, oe = () => {
1397
+ }, K = () => {
1419
1398
  if (r.showAlpha) {
1420
1399
  let t = a.value.find((e) => e.select == !0);
1421
- t && (U.value.style.background = ` linear-gradient(90deg,rgba(255, 255, 255, 0) 0%, rgba(${t.r}, ${t.g}, ${t.b}, 100) 97%)`);
1400
+ t && (D.value.style.background = ` linear-gradient(90deg,rgba(255, 255, 255, 0) 0%, rgba(${t.r}, ${t.g}, ${t.b}, 100) 97%)`);
1422
1401
  }
1423
- }, X = () => {
1402
+ }, F = () => {
1424
1403
  var t;
1425
1404
  if (y.value == "gradient") {
1426
1405
  a.value.sort((s, d) => s.percent - d.percent);
1427
1406
  let e = "linear-gradient(90deg, ", l;
1428
- if (L.value == "linear") {
1407
+ if (T.value == "linear") {
1429
1408
  l = `linear-gradient(${B.angle}deg, `;
1430
1409
  for (let s = 0; s < a.value.length; s++) {
1431
1410
  const { r: d, g: k, b: I, a: $, percent: g } = a.value[s];
@@ -1438,7 +1417,7 @@ const It = { key: 1 }, Vt = {
1438
1417
  a.value.length - 1 == s ? (e = e + `rgba(${d},${k},${I},${$ / 100}) ${g}%)`, l = l + `rgba(${d},${k},${I},${$ / 100}) ${g}%)`) : (e = e + `rgba(${d},${k},${I},${$ / 100}) ${g}%, `, l = l + `rgba(${d},${k},${I},${$ / 100}) ${g}%, `);
1439
1418
  }
1440
1419
  }
1441
- te.value.style.backgroundImage = e;
1420
+ le.value.style.backgroundImage = e;
1442
1421
  let i = (t = u.value) == null ? void 0 : t.querySelector("#ck-cp-target-background");
1443
1422
  i && (i.style.backgroundImage = l, N.value && p(i.style.backgroundImage));
1444
1423
  } else {
@@ -1455,17 +1434,17 @@ const It = { key: 1 }, Vt = {
1455
1434
  d = `rgb(${e},${l},${i})`;
1456
1435
  break;
1457
1436
  case "HEX":
1458
- d = lt(e, l, i);
1437
+ d = tt(e, l, i);
1459
1438
  break;
1460
1439
  }
1461
1440
  p(d);
1462
1441
  }
1463
- }, Ve = () => {
1442
+ }, Le = () => {
1464
1443
  a.value.forEach((t) => {
1465
- t.hue = Ae(t.r, t.g, t.b);
1444
+ t.hue = Qe(t.r, t.g, t.b);
1466
1445
  });
1467
- }, Le = (t) => {
1468
- L.value = t, X();
1446
+ }, Fe = (t) => {
1447
+ T.value = t, F();
1469
1448
  }, Ge = () => {
1470
1449
  var t, e;
1471
1450
  if (a.value.length > 2) {
@@ -1476,68 +1455,68 @@ const It = { key: 1 }, Vt = {
1476
1455
  const s = (t = u.value) == null ? void 0 : t.querySelector(`#clr-gb-${i}`);
1477
1456
  s == null || s.remove();
1478
1457
  const d = a.value[0];
1479
- d && (d.select = !0, Z = (e = u.value) == null ? void 0 : e.querySelector(`#clr-gb-${d.id}`), Z == null || Z.classList.add("select"), ie(d.r, d.g, d.b, d.hue, !1), b(), X());
1458
+ d && (d.select = !0, _ = (e = u.value) == null ? void 0 : e.querySelector(`#clr-gb-${d.id}`), _ == null || _.classList.add("select"), ce(d.r, d.g, d.b, d.hue, !1), G(), F());
1480
1459
  }
1481
1460
  }
1482
1461
  }, Ye = () => {
1483
1462
  var l;
1484
1463
  const t = (l = u.value) == null ? void 0 : l.querySelector("#cp-btn-eyedropper");
1485
1464
  t == null || t.classList.add("active"), new EyeDropper().open().then((i) => {
1486
- const { sRGBHex: s } = i, d = a.value.find((I) => I.select == !0), k = je(s);
1465
+ const { sRGBHex: s } = i, d = a.value.find((I) => I.select == !0), k = ze(s);
1487
1466
  if (k) {
1488
- const I = Ae(k.r, k.g, k.b);
1489
- if (d && (d.hue = I, d.r = k.r, d.g = k.g, d.b = k.b), He(k)) {
1490
- const $ = de();
1467
+ const I = Qe(k.r, k.g, k.b);
1468
+ if (d && (d.hue = I, d.r = k.r, d.g = k.g, d.b = k.b), ye(k)) {
1469
+ const $ = me();
1491
1470
  $ && (R.value.style.left = `${$.x}px`, R.value.style.top = `${$.y}px`);
1492
1471
  } else {
1493
- ae.value = I;
1494
- const { rgb: $ } = at(I, 100, 50);
1495
- ke($);
1496
- const g = de();
1472
+ ne.value = I;
1473
+ const { rgb: $ } = lt(I, 100, 50);
1474
+ Me($);
1475
+ const g = me();
1497
1476
  g && (R.value.style.left = `${g.x}px`, R.value.style.top = `${g.y}px`);
1498
1477
  }
1499
- b(), oe(), X(), t == null || t.classList.remove("active");
1478
+ G(), K(), F(), t == null || t.classList.remove("active");
1500
1479
  }
1501
1480
  }).catch(() => {
1502
1481
  t == null || t.classList.remove("active");
1503
1482
  });
1504
- }, We = (t) => {
1483
+ }, c = (t) => {
1505
1484
  const { value: e, type: l } = t;
1506
1485
  if (l != "a") {
1507
1486
  const i = a.value.find((s) => s.select == !0);
1508
1487
  if (i) {
1509
1488
  i.r = parseInt(e.r), i.g = parseInt(e.g), i.b = parseInt(e.b);
1510
- const s = Ae(i.r, i.g, i.b);
1511
- i.hue = s, ie(i.r, i.g, i.b, i.hue, !0), X(), oe();
1489
+ const s = Qe(i.r, i.g, i.b);
1490
+ i.hue = s, ce(i.r, i.g, i.b, i.hue, !0), F(), K();
1512
1491
  }
1513
1492
  } else
1514
- ne.value = e, X(), oe();
1515
- }, c = (t) => {
1516
- q.h = t.h, q.s = t.s, q.l = t.l;
1493
+ oe.value = e, F(), K();
1494
+ }, o = (t) => {
1495
+ X.h = t.h, X.s = t.s, X.l = t.l;
1517
1496
  const e = a.value.find((l) => l.select == !0);
1518
- if (e && !Number.isNaN(q.h) && !Number.isNaN(q.s) && !Number.isNaN(q.l)) {
1519
- const { r: l, g: i, b: s } = nt(q.h, q.s / 100, q.l / 100);
1520
- e.hue = q.h, e.r = l, e.g = i, e.b = s, ie(e.r, e.g, e.b, e.hue, !0), X(), oe();
1497
+ if (e && !Number.isNaN(X.h) && !Number.isNaN(X.s) && !Number.isNaN(X.l)) {
1498
+ const { r: l, g: i, b: s } = at(X.h, X.s / 100, X.l / 100);
1499
+ e.hue = X.h, e.r = l, e.g = i, e.b = s, ce(e.r, e.g, e.b, e.hue, !0), F(), K();
1521
1500
  }
1522
- }, o = () => {
1523
- if (W.value) {
1524
- const t = je(W.value);
1501
+ }, x = () => {
1502
+ if (z.value) {
1503
+ const t = ze(z.value);
1525
1504
  if (t) {
1526
- const e = Ae(t.r, t.g, t.b), l = a.value.find((i) => i.select == !0);
1527
- l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ie(t.r, t.g, t.b, l.hue, !0), X(), oe(), se(M.value));
1505
+ const e = Qe(t.r, t.g, t.b), l = a.value.find((i) => i.select == !0);
1506
+ l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ce(t.r, t.g, t.b, l.hue, !0), F(), K(), pe(U.value));
1528
1507
  }
1529
1508
  }
1530
- }, b = () => {
1509
+ }, G = () => {
1531
1510
  const t = a.value.find((e) => e.select == !0);
1532
- t && (W.value = lt(t.r, t.g, t.b).toUpperCase()), se(M.value);
1533
- }, J = (t) => {
1511
+ t && (z.value = tt(t.r, t.g, t.b).toUpperCase()), pe(U.value);
1512
+ }, se = (t) => {
1534
1513
  f("last-used-pick", t);
1535
1514
  };
1536
- window.EyeDropper && (O.value = !0);
1537
- const ce = (t = "") => {
1515
+ window.EyeDropper && (M.value = !0);
1516
+ const xe = (t = "") => {
1538
1517
  if (y.value == "gradient") {
1539
1518
  let e = t.includes("linear") ? "linear" : "radial", l = [];
1540
- if (L.value = e, e == "linear") {
1519
+ if (T.value = e, e == "linear") {
1541
1520
  let i = /^linear-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), d = /,\s*(?![^()]*\))/;
1542
1521
  if (s) {
1543
1522
  let k = s[1].split(d);
@@ -1593,7 +1572,7 @@ const It = { key: 1 }, Vt = {
1593
1572
  }
1594
1573
  }
1595
1574
  }
1596
- l.length > 1 && (a.value = l, a.value[0].select = !0, ne.value = a.value[0].a);
1575
+ l.length > 1 && (a.value = l, a.value[0].select = !0, oe.value = a.value[0].a);
1597
1576
  } else if (t) {
1598
1577
  let e = {
1599
1578
  r: 0,
@@ -1605,7 +1584,7 @@ const It = { key: 1 }, Vt = {
1605
1584
  if (t.length >= 8)
1606
1585
  e = $t(t);
1607
1586
  else {
1608
- let l = je(t);
1587
+ let l = ze(t);
1609
1588
  l ? (e.a = 1, e.r = l.r, e.g = l.g, e.b = l.b) : e = null;
1610
1589
  }
1611
1590
  else if (t.includes("rgb"))
@@ -1615,48 +1594,48 @@ const It = { key: 1 }, Vt = {
1615
1594
  let l = St(t);
1616
1595
  l ? (e.a = 1, e.r = l.r, e.g = l.g, e.b = l.b) : e = null;
1617
1596
  }
1618
- e && (a.value[0].r = e.r, a.value[0].b = e.b, a.value[0].g = e.g, a.value[0].a = parseInt((e.a * 100).toFixed(0)), ne.value = a.value[0].a, a.value[0].hue = 0);
1597
+ e && (a.value[0].r = e.r, a.value[0].b = e.b, a.value[0].g = e.g, a.value[0].a = parseInt((e.a * 100).toFixed(0)), oe.value = a.value[0].a, a.value[0].hue = 0);
1619
1598
  }
1620
- }, se = (t) => {
1599
+ }, pe = (t) => {
1621
1600
  const e = a.value.find((l) => l.select == !0);
1622
1601
  if (e) {
1623
1602
  switch (t) {
1624
1603
  case "RGB":
1625
1604
  break;
1626
1605
  case "HSL": {
1627
- const { h: l, s: i, l: s } = tt(e.r, e.g, e.b);
1628
- q.h = Math.round(l), q.s = Math.round(i * 100), q.l = Math.round(s * 100);
1606
+ const { h: l, s: i, l: s } = et(e.r, e.g, e.b);
1607
+ X.h = Math.round(l), X.s = Math.round(i * 100), X.l = Math.round(s * 100);
1629
1608
  break;
1630
1609
  }
1631
1610
  }
1632
- M.value = t;
1611
+ U.value = t;
1633
1612
  }
1634
- }, be = (t) => {
1635
- t && ce(t), xe();
1613
+ }, ke = (t) => {
1614
+ t && xe(t), Te();
1636
1615
  };
1637
- ye(
1616
+ fe(
1638
1617
  () => r.modelValue,
1639
1618
  (t, e) => {
1640
1619
  t !== e && t !== C.value && (a.value.forEach((l) => {
1641
- const i = P == null ? void 0 : P.querySelector(`#clr-gb-${l.id}`);
1620
+ const i = q == null ? void 0 : q.querySelector(`#clr-gb-${l.id}`);
1642
1621
  i == null || i.remove();
1643
- }), be(t));
1622
+ }), ke(t));
1644
1623
  }
1645
1624
  );
1646
- const Qe = (t) => {
1625
+ const ut = (t) => {
1647
1626
  a.value.forEach((e) => {
1648
- const l = P == null ? void 0 : P.querySelector(`#clr-gb-${e.id}`);
1627
+ const l = q == null ? void 0 : q.querySelector(`#clr-gb-${e.id}`);
1649
1628
  l == null || l.remove();
1650
1629
  }), t !== "solid" ? (y.value = "gradient", setTimeout(() => {
1651
1630
  var e;
1652
- P = (e = u.value) == null ? void 0 : e.querySelector(".gradient-bar"), Le(t), xe();
1631
+ q = (e = u.value) == null ? void 0 : e.querySelector(".gradient-bar"), Fe(t), Te();
1653
1632
  }, 200)) : t === "solid" && (y.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
1654
- be(r.modelValue);
1633
+ ke(r.modelValue);
1655
1634
  }, 200));
1656
1635
  };
1657
- return _e(() => {
1636
+ return Je(() => {
1658
1637
  var t;
1659
- y.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", y.value == "gradient" && (P = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")), be(r.modelValue), se(M.value), mt(() => {
1638
+ y.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", y.value == "gradient" && (q = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")), ke(r.modelValue), pe(U.value), ft(() => {
1660
1639
  N.value = !0;
1661
1640
  });
1662
1641
  }), (t, e) => (m(), E("div", {
@@ -1666,58 +1645,58 @@ const It = { key: 1 }, Vt = {
1666
1645
  "cp-theme": n.theme
1667
1646
  }, [
1668
1647
  n.variant == "gradient" ? (m(), E("div", rl, [
1669
- T(il, {
1648
+ L(il, {
1670
1649
  class: "mr-auto",
1671
1650
  variant: n.variant,
1672
1651
  mode: y.value,
1673
1652
  "model-value": n.modelValue,
1674
1653
  iconClasses: n.iconClasses,
1675
- gradientType: L.value,
1676
- onOnChangeMode: Qe
1654
+ gradientType: T.value,
1655
+ onOnChangeMode: ut
1677
1656
  }, null, 8, ["variant", "mode", "model-value", "iconClasses", "gradientType"])
1678
- ])) : D("", !0),
1657
+ ])) : H("", !0),
1679
1658
  y.value == "gradient" && n.variant == "gradient" ? (m(), E("div", ul, [
1680
- T(Kt, {
1681
- gradientType: L.value,
1682
- onOnAddColor: fe,
1683
- onOnMouseDown: Ue,
1659
+ L(Kt, {
1660
+ gradientType: T.value,
1661
+ onOnAddColor: qe,
1662
+ onOnMouseDown: Ve,
1684
1663
  onOnDeleteColor: Ge
1685
1664
  }, null, 8, ["gradientType"]),
1686
- T(ll, {
1665
+ L(ll, {
1687
1666
  percentageY: B.percentageY,
1688
1667
  "onUpdate:percentageY": e[0] || (e[0] = (l) => B.percentageY = l),
1689
1668
  angle: B.angle,
1690
1669
  "onUpdate:angle": e[1] || (e[1] = (l) => B.angle = l),
1691
1670
  percentageX: B.percentageX,
1692
1671
  "onUpdate:percentageX": e[2] || (e[2] = (l) => B.percentageX = l),
1693
- inputType: M.value,
1672
+ inputType: U.value,
1694
1673
  mode: y.value,
1695
- gradientType: L.value,
1696
- onOnInput: X
1674
+ gradientType: T.value,
1675
+ onOnInput: F
1697
1676
  }, null, 8, ["percentageY", "angle", "percentageX", "inputType", "mode", "gradientType"])
1698
1677
  ])) : (m(), E("div", dl, [
1699
1678
  n.presetColors ? (m(), E("div", cl, [
1700
1679
  e[10] || (e[10] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium" }, "Choose color", -1)),
1701
1680
  h("div", pl, [
1702
- (m(!0), E(pe, null, Ze(n.presetColors, (l) => (m(), E("div", {
1681
+ (m(!0), E(ge, null, Ke(n.presetColors, (l) => (m(), E("div", {
1703
1682
  key: `color-${l}`,
1704
1683
  class: "ck-cp-color-item !w-[32px] !h-[32px]",
1705
- style: ee(`background:${l}`),
1706
- onClick: (i) => J(l)
1684
+ style: te(`background:${l}`),
1685
+ onClick: (i) => se(l)
1707
1686
  }, null, 12, gl))), 128))
1708
1687
  ])
1709
- ])) : D("", !0)
1688
+ ])) : H("", !0)
1710
1689
  ])),
1711
- T(al, { onOnMouseDown: Se }),
1690
+ L(al, { onOnMouseDown: Pe }),
1712
1691
  h("div", vl, [
1713
- T(_t, {
1714
- class: Q(O.value ? "max-w-[90%]" : ""),
1715
- modelValue: ae.value,
1716
- "onUpdate:modelValue": e[3] || (e[3] = (l) => ae.value = l),
1692
+ L(_t, {
1693
+ class: Q(M.value ? "max-w-[90%]" : ""),
1694
+ modelValue: ne.value,
1695
+ "onUpdate:modelValue": e[3] || (e[3] = (l) => ne.value = l),
1717
1696
  onOnInput: e[4] || (e[4] = (l) => Ie(!1)),
1718
- onOnChange: qe
1697
+ onOnChange: Xe
1719
1698
  }, null, 8, ["class", "modelValue"]),
1720
- O.value ? (m(), E("button", {
1699
+ M.value ? (m(), E("button", {
1721
1700
  key: 0,
1722
1701
  id: "cp-btn-eyedropper",
1723
1702
  type: "button",
@@ -1734,61 +1713,61 @@ const It = { key: 1 }, Vt = {
1734
1713
  }, [
1735
1714
  h("path", { d: "M21.35 1.825l-6.344 6.35-0.588-0.588c-0.781-0.781-2.050-0.781-2.831 0s-0.781 2.050 0 2.831l10 10c0.781 0.781 2.050 0.781 2.831 0s0.781-2.050 0-2.831l-0.587-0.587 6.344-6.35c2.438-2.438 2.438-6.388 0-8.819s-6.387-2.438-8.819 0zM3.462 20.206c-0.938 0.938-1.462 2.212-1.462 3.538v2.65l-1.663 2.494c-0.531 0.794-0.425 1.85 0.25 2.525s1.731 0.781 2.525 0.25l2.494-1.663h2.65c1.325 0 2.6-0.525 3.537-1.462l7.544-7.544-2.831-2.831-7.544 7.544c-0.188 0.188-0.444 0.294-0.706 0.294h-2.256v-2.256c0-0.262 0.106-0.519 0.294-0.706l7.544-7.544-2.831-2.831-7.544 7.544z" })
1736
1715
  ], -1)
1737
- ]))) : D("", !0)
1716
+ ]))) : H("", !0)
1738
1717
  ]),
1739
- n.showAlpha ? (m(), F(jt, {
1718
+ n.showAlpha ? (m(), P(jt, {
1740
1719
  key: 3,
1741
- modelValue: ne.value,
1742
- "onUpdate:modelValue": e[5] || (e[5] = (l) => ne.value = l),
1743
- onOnInput: e[6] || (e[6] = (l) => Me(l.target.value))
1744
- }, null, 8, ["modelValue"])) : D("", !0),
1745
- ft(h("div", ml, null, 512), [
1746
- [bt, !1]
1720
+ modelValue: oe.value,
1721
+ "onUpdate:modelValue": e[5] || (e[5] = (l) => oe.value = l),
1722
+ onOnInput: e[6] || (e[6] = (l) => He(l.target.value))
1723
+ }, null, 8, ["modelValue"])) : H("", !0),
1724
+ ht(h("div", ml, null, 512), [
1725
+ [yt, !1]
1747
1726
  ]),
1748
1727
  h("div", fl, [
1749
- T(Gt, {
1750
- "model-value": M.value,
1751
- "onUpdate:modelValue": se
1728
+ L(Gt, {
1729
+ "model-value": U.value,
1730
+ "onUpdate:modelValue": pe
1752
1731
  }, null, 8, ["model-value"]),
1753
- N.value && n.showInputSet ? (m(), E("div", bl, [
1754
- M.value == "HEX" ? (m(), F(Xt, {
1732
+ N.value && n.showInputSet ? (m(), E("div", hl, [
1733
+ U.value == "HEX" ? (m(), P(Xt, {
1755
1734
  key: 0,
1756
- modelValue: W.value,
1735
+ modelValue: z.value,
1757
1736
  "onUpdate:modelValue": [
1758
- e[7] || (e[7] = (l) => W.value = l),
1759
- o
1737
+ e[7] || (e[7] = (l) => z.value = l),
1738
+ x
1760
1739
  ]
1761
- }, null, 8, ["modelValue"])) : D("", !0),
1762
- M.value == "RGB" ? (m(), F(ot, {
1740
+ }, null, 8, ["modelValue"])) : H("", !0),
1741
+ U.value == "RGB" ? (m(), P(nt, {
1763
1742
  key: 1,
1764
1743
  "rgb-value": a.value.find((l) => l.select == !0),
1765
- onUpdateRgbValue: We
1766
- }, null, 8, ["rgb-value"])) : D("", !0),
1767
- M.value == "HSL" ? (m(), F(ot, {
1744
+ onUpdateRgbValue: c
1745
+ }, null, 8, ["rgb-value"])) : H("", !0),
1746
+ U.value == "HSL" ? (m(), P(nt, {
1768
1747
  key: 2,
1769
1748
  "input-type": "HSL",
1770
- "hsl-value": q,
1771
- onUpdateHslValue: c
1772
- }, null, 8, ["hsl-value"])) : D("", !0),
1773
- n.showAlpha ? (m(), F(Ft, {
1749
+ "hsl-value": X,
1750
+ onUpdateHslValue: o
1751
+ }, null, 8, ["hsl-value"])) : H("", !0),
1752
+ n.showAlpha ? (m(), P(Ft, {
1774
1753
  key: 3,
1775
- modelValue: ne.value,
1754
+ modelValue: oe.value,
1776
1755
  "onUpdate:modelValue": [
1777
- e[8] || (e[8] = (l) => ne.value = l),
1778
- e[9] || (e[9] = (l) => Me(l))
1756
+ e[8] || (e[8] = (l) => oe.value = l),
1757
+ e[9] || (e[9] = (l) => He(l))
1779
1758
  ]
1780
- }, null, 8, ["modelValue"])) : D("", !0)
1781
- ])) : D("", !0)
1759
+ }, null, 8, ["modelValue"])) : H("", !0)
1760
+ ])) : H("", !0)
1782
1761
  ]),
1783
1762
  e[12] || (e[12] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium font-inter" }, "Last used", -1)),
1784
- H.value.length > 0 && n.showColorList ? (m(), E("div", hl, [
1785
- (m(!0), E(pe, null, Ze(j.value, (l) => (m(), E("div", {
1763
+ O.value.length > 0 && n.showColorList ? (m(), E("div", yl, [
1764
+ (m(!0), E(ge, null, Ke(Z.value, (l) => (m(), E("div", {
1786
1765
  key: `color-${l}`,
1787
1766
  class: "ck-cp-color-item !w-[32px] !h-[32px]",
1788
- style: ee(`background:${l}`),
1789
- onClick: (i) => J(l)
1790
- }, null, 12, yl))), 128))
1791
- ])) : D("", !0)
1767
+ style: te(`background:${l}`),
1768
+ onClick: (i) => se(l)
1769
+ }, null, 12, bl))), 128))
1770
+ ])) : H("", !0)
1792
1771
  ], 10, sl));
1793
1772
  }
1794
1773
  }, kl = { class: "flex flex-col pt-10 px-7 gap-y-7 items-center" }, $l = { class: "flex flex-col gap-y-4 text-center items-center" }, wl = {
@@ -1797,7 +1776,7 @@ const It = { key: 1 }, Vt = {
1797
1776
  }, Sl = {
1798
1777
  key: 0,
1799
1778
  class: "text-sm text-oc-text-400"
1800
- }, El = /* @__PURE__ */ ht({
1779
+ }, El = {
1801
1780
  __name: "OcOnboardingProgressbar",
1802
1781
  props: {
1803
1782
  title: {
@@ -1818,7 +1797,7 @@ const It = { key: 1 }, Vt = {
1818
1797
  }
1819
1798
  },
1820
1799
  setup(n) {
1821
- const V = n, r = he(() => ({
1800
+ const V = n, r = $e(() => ({
1822
1801
  grid: {
1823
1802
  containLabel: !1
1824
1803
  },
@@ -1847,34 +1826,34 @@ const It = { key: 1 }, Vt = {
1847
1826
  ]
1848
1827
  }));
1849
1828
  return (y, u) => (m(), E("div", kl, [
1850
- T(w(Ct), {
1829
+ L(w(Ct), {
1851
1830
  class: "w-[140px] bg-white rounded-full h-[140px]",
1852
1831
  "additional-options": r.value,
1853
1832
  "tooltip-formatter": () => null,
1854
1833
  "tooltip-value-formatter": () => null
1855
1834
  }, null, 8, ["additional-options"]),
1856
1835
  h("div", $l, [
1857
- n.title ? (m(), E("span", wl, Pe(n.title), 1)) : D("", !0),
1858
- Ke(y.$slots, "description", {}, () => [
1859
- n.description ? (m(), E("span", Sl, Pe(n.description), 1)) : D("", !0)
1836
+ n.title ? (m(), E("span", wl, Ne(n.title), 1)) : H("", !0),
1837
+ je(y.$slots, "description", {}, () => [
1838
+ n.description ? (m(), E("span", Sl, Ne(n.description), 1)) : H("", !0)
1860
1839
  ])
1861
1840
  ])
1862
1841
  ]));
1863
1842
  }
1864
- }), Ml = st(
1865
- () => import("./OcCodeBlock-uFQyGnLq.js")
1866
- ), Ul = st(
1867
- () => import("./OcLottieAnimation-0mdksHMn.js")
1843
+ }, Ul = it(
1844
+ () => import("./OcCodeBlock-B_LpoG2V.js")
1845
+ ), Dl = it(
1846
+ () => import("./OcLottieAnimation-BjY3rCjS.js")
1868
1847
  );
1869
1848
  export {
1870
1849
  Al as BarChart,
1871
1850
  Pl as BarRaceChart,
1872
1851
  ql as Card,
1873
- Ml as CodeBlock,
1852
+ Ul as CodeBlock,
1874
1853
  Vt as ColorPicker,
1875
1854
  xl as ColorPickerPopup,
1876
- Ol as LineChart,
1877
- Ul as LottieAnimation,
1855
+ Ml as LineChart,
1856
+ Dl as LottieAnimation,
1878
1857
  El as OnboardingProgressbar,
1879
1858
  Ct as PieChart,
1880
1859
  Rl as TextEditor