@orchidui/dashboard 1.19.0 → 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,10 +1,10 @@
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 be, 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 H, onMounted as _e, watch as ye, createElementVNode as b, 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 ht, defineComponent as bt, defineAsyncComponent as st } from "vue";
5
- import { Q as G, a as yt } from "./QuillEditor-DwCbpq2d.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
9
  import { LineChart as Ml } from "./Dashboard/Charts/LineChart/OcLineChart.js";
10
10
  import { BarChart as Al } from "./Dashboard/Charts/BarChart/OcBarChart.js";
@@ -35,7 +35,7 @@ const It = { key: 1 }, Vt = {
35
35
  setup(n, { emit: V }) {
36
36
  const r = n, y = V, u = v(!1), f = v(r.modelValue), C = (U) => {
37
37
  U && (f.value = U, y("update:model-value", U));
38
- }, p = be(() => r.variant === "gradient" ? {
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(), O = v([]), j = () => {
47
+ }), a = v(), O = v([]), Z = () => {
48
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
50
  let M = localStorage.getItem("ck-cp-local-color-list");
51
- M && (O.value = [...new Set(JSON.parse(M))], j());
52
- const L = (U) => {
51
+ M && (O.value = [...new Set(JSON.parse(M))], Z());
52
+ const T = (U) => {
53
53
  if (!U && f.value)
54
54
  if (O.value.find((D) => D === f.value))
55
55
  O.value = [
56
56
  f.value,
57
57
  ...O.value.filter((D) => D !== f.value)
58
- ], j();
58
+ ], Z();
59
59
  else {
60
60
  O.value.length >= 9 && O.value.pop();
61
61
  let D = f.value;
62
- O.value.unshift(D), j();
62
+ O.value.unshift(D), Z();
63
63
  }
64
- }, B = v(!1), W = (U) => {
64
+ }, B = v(!1), z = (U) => {
65
65
  f.value = U, y("update:model-value", U), u.value = !1;
66
66
  };
67
- return (U, 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
70
  var D;
71
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
80
  N[0] || (N[0] = (D) => u.value = D),
81
- L
81
+ T
82
82
  ],
83
83
  "max-menu-height": 800,
84
84
  placement: n.placement,
@@ -86,8 +86,8 @@ const It = { key: 1 }, Vt = {
86
86
  strategy: "fixed"
87
87
  }
88
88
  }, {
89
- menu: Y(() => [
90
- B.value ? H("", !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,
@@ -96,19 +96,19 @@ const It = { key: 1 }, Vt = {
96
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(U.$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",
@@ -118,8 +118,8 @@ const It = { key: 1 }, Vt = {
118
118
  }, vt({ _: 2 }, [
119
119
  U.$slots.leading ? {
120
120
  name: "leading",
121
- fn: Y(() => [
122
- Ke(U.$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"], 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 = {
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 = be(() => 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 O = G.import("attributors/style/color");
210
- G.register(O, !0);
211
- const j = G.import("attributors/style/direction");
212
- G.register(j, !0);
213
- const M = G.import("attributors/style/font");
214
- G.register(M, !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
- ), U = v(!1), N = v(!1), D = 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 = be(() => {
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
- U.value = x.value.getQuill().history.stack.undo.length > 0, N.value = x.value.getQuill().history.stack.redo.length > 0, D.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", !D.value), (c = x.value.getQuill().getSelection()) != null && c.length || (D.value = !D.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
- }, Ue = (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], h = new FileReader();
284
- h.onload = () => Ue(h.result), h.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 h;
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 he = 0; he < se.length; he++) {
295
- const Qe = (h = se[he]) == null ? void 0 : h.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((h) => {
302
- P(h) && (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
- }, De = () => {
305
- x.value.getQuill().theme.tooltip.edit("video");
306
- }, He = (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(""), Oe = () => {
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), Me = (c) => {
317
- var h, J;
318
- ie.value = c;
319
- const o = (h = window.getSelection()) == null ? void 0 : h.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 h, J;
323
- const o = (h = window.getSelection()) == null ? void 0 : h.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 = be(() => {
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 = be(() => {
315
+ }), Ge = $e(() => {
341
316
  let c = [];
342
317
  for (let o = 1; o < 12; o++)
343
318
  c.push({
@@ -345,16 +320,16 @@ const It = { key: 1 }, Vt = {
345
320
  value: o.toString()
346
321
  });
347
322
  return c;
348
- }), We = () => {
349
- let c = x.value.getQuill().getModule("better-table");
350
- c == null || c.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;
351
326
  };
352
- return ye(
327
+ return fe(
353
328
  () => r.modelValue,
354
329
  (c) => {
355
- c || x.value.getQuill().setContents([], "silent");
330
+ c || b.value.getQuill().setContents([], "silent");
356
331
  }
357
- ), (c, o) => (m(), F(w(rt), {
332
+ ), (c, o) => (m(), P(w(st), {
358
333
  label: n.label,
359
334
  hint: n.hint,
360
335
  "error-message": n.errorMessage,
@@ -363,300 +338,302 @@ const It = { key: 1 }, Vt = {
363
338
  "tooltip-text": n.tooltipText,
364
339
  "tooltip-options": n.tooltipOptions
365
340
  }, {
366
- default: Y(() => [
367
- T(w(xt), {
368
- title: "Insert table",
369
- modelValue: X.value,
370
- "onUpdate:modelValue": o[2] || (o[2] = (h) => X.value = h),
371
- class: "!w-full !h-full",
372
- confirmButtonProps: {
373
- label: "Save",
374
- onClick: () => We()
375
- }
376
- }, {
377
- default: Y(() => [
378
- T(w(Je), {
379
- modelValue: Le.value,
380
- "onUpdate:modelValue": o[0] || (o[0] = (h) => Le.value = h),
381
- options: Ye.value,
382
- label: "Table cell",
383
- class: "mb-3"
384
- }, null, 8, ["modelValue", "options"]),
385
- T(w(Je), {
386
- modelValue: Ve.value,
387
- "onUpdate:modelValue": o[1] || (o[1] = (h) => Ve.value = h),
388
- options: Ge.value,
389
- label: "Table rows"
390
- }, null, 8, ["modelValue", "options"])
391
- ]),
392
- _: 1
393
- }, 8, ["modelValue", "confirmButtonProps"]),
394
- b("div", {
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
+ ])),
372
+ h("div", {
395
373
  class: Q(["grid", { "has-error": n.errorMessage }]),
396
- onClick: oe
374
+ onClick: Me
397
375
  }, [
398
- W.value ? (m(), F(w(yt), {
376
+ z.value ? (m(), P(w(bt), {
399
377
  key: 0,
400
- id: `#${W.value}`,
378
+ id: `#${z.value}`,
401
379
  ref_key: "quill",
402
- ref: x,
380
+ ref: b,
403
381
  content: n.modelValue,
404
382
  options: {
405
- bounds: `#${W.value}`
383
+ bounds: `#${z.value}`
406
384
  },
407
385
  "is-text-only": "",
408
386
  theme: "snow",
409
387
  "content-type": "html",
410
- "global-options": ve.value,
411
388
  class: "min-h-[200px]",
412
389
  placeholder: n.placeholder,
413
- "onUpdate:content": Se,
414
- onPaste: Z
390
+ "onUpdate:content": ie,
391
+ onPaste: q
415
392
  }, {
416
- toolbar: Y(() => [
417
- b("div", {
418
- id: W.value,
393
+ toolbar: W(() => [
394
+ h("div", {
395
+ id: z.value,
419
396
  class: "flex min-h-[36px] flex-wrap !py-2 !px-3 gap-y-2 rounded-t"
420
397
  }, [
421
- f.value.includes("changes") ? (m(), E(pe, { key: 0 }, [
422
- b("div", Tt, [
423
- T(w(A), {
398
+ f.value.includes("changes") ? (m(), E(ge, { key: 0 }, [
399
+ h("div", Lt, [
400
+ L(w(A), {
424
401
  class: Q(U.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
425
402
  width: "20",
426
403
  height: "20",
427
404
  name: "text-editor/undo",
428
405
  onClick: Ee
429
406
  }, null, 8, ["class"]),
430
- T(w(A), {
407
+ L(w(A), {
431
408
  class: Q(N.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
432
409
  width: "20",
433
410
  height: "20",
434
411
  name: "text-editor/redo",
435
- onClick: Ce
412
+ onClick: Ue
436
413
  }, null, 8, ["class"])
437
414
  ]),
438
- o[16] || (o[16] = b("div", { class: "border-l border-oc-gray-200" }, null, -1))
415
+ o[16] || (o[16] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
439
416
  ], 64)) : H("", !0),
440
- f.value.includes("font-size") ? (m(), E(pe, { key: 1 }, [
441
- T(w(ut), {
442
- modelValue: z.value,
443
- "onUpdate:modelValue": o[3] || (o[3] = (h) => z.value = h),
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),
444
421
  class: "px-5"
445
422
  }, {
446
- menu: Y(() => [
447
- b("div", Rt, [
448
- (m(!0), E(pe, null, Ze(n.fontSizes, (h) => (m(), E("div", {
449
- key: h.value,
450
- class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", q.value === h.value ? "font-medium" : ""]),
451
- onClick: (J) => de(h.value)
452
- }, Pe(h.label), 11, Et))), 128))
423
+ menu: W(() => [
424
+ h("div", Rt, [
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))
453
430
  ])
454
431
  ]),
455
- default: Y(() => {
456
- var h;
432
+ default: W(() => {
433
+ var x;
457
434
  return [
458
- b("div", Bt, [
459
- ge(Pe((h = n.fontSizes.find((J) => J.value === q.value)) == null ? void 0 : h.label) + " ", 1),
460
- T(w(A), {
435
+ h("div", Bt, [
436
+ ve(Ne((x = n.fontSizes.find((G) => G.value === X.value)) == null ? void 0 : x.label) + " ", 1),
437
+ L(w(A), {
461
438
  width: "20",
462
439
  height: "20",
463
440
  name: "chevron-down",
464
- class: Q(["transition-all", z.value ? "rotate-180" : ""])
441
+ class: Q(["transition-all", j.value ? "rotate-180" : ""])
465
442
  }, null, 8, ["class"])
466
443
  ])
467
444
  ];
468
445
  }),
469
446
  _: 1
470
447
  }, 8, ["modelValue"]),
471
- o[17] || (o[17] = b("div", { class: "border-l border-oc-gray-200" }, null, -1))
448
+ o[17] || (o[17] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
472
449
  ], 64)) : H("", !0),
473
- f.value.includes("font-style") ? (m(), E(pe, { key: 2 }, [
474
- b("div", Ut, [
475
- T(w(A), {
450
+ f.value.includes("font-style") ? (m(), E(ge, { key: 2 }, [
451
+ h("div", Ut, [
452
+ L(w(A), {
476
453
  class: Q(["cursor-pointer", D.value ? "text-oc-text" : "text-oc-text-300"]),
477
454
  width: "20",
478
455
  height: "20",
479
456
  name: "text-editor/bold",
480
- onClick: ae
457
+ onClick: Ce
481
458
  }, null, 8, ["class"]),
482
- T(w(A), {
483
- 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"]),
484
461
  width: "20",
485
462
  height: "20",
486
463
  name: "text-editor/italic",
487
- onClick: Ie
464
+ onClick: ne
488
465
  }, null, 8, ["class"]),
489
- T(w(A), {
490
- 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"]),
491
468
  width: "20",
492
469
  height: "20",
493
470
  name: "text-editor/underline",
494
- onClick: Xe
471
+ onClick: Ie
495
472
  }, null, 8, ["class"])
496
473
  ]),
497
- o[18] || (o[18] = b("div", { class: "border-l border-oc-gray-200" }, null, -1))
474
+ o[18] || (o[18] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
498
475
  ], 64)) : H("", !0),
499
- b("div", Dt, [
500
- f.value.includes("link") ? (m(), F(w(A), {
476
+ h("div", Dt, [
477
+ f.value.includes("link") ? (m(), P(w(A), {
501
478
  key: 0,
502
479
  class: "cursor-pointer",
503
480
  width: "20",
504
481
  height: "20",
505
482
  name: "text-editor/link",
506
- onClick: qe
483
+ onClick: me
507
484
  })) : H("", !0),
508
- f.value.includes("image") ? (m(), F(w(A), {
485
+ f.value.includes("image") ? (m(), P(w(A), {
509
486
  key: 1,
510
487
  class: "cursor-pointer",
511
488
  width: "20",
512
489
  height: "20",
513
490
  name: "text-editor/image",
514
- onClick: Fe
491
+ onClick: He
515
492
  })) : H("", !0),
516
- f.value.includes("quote") ? (m(), F(w(A), {
493
+ f.value.includes("quote") ? (m(), P(w(A), {
517
494
  key: 2,
518
495
  class: Q(["cursor-pointer", R.value ? "text-oc-text" : "text-oc-text-300"]),
519
496
  width: "20",
520
497
  height: "20",
521
498
  name: "text-editor/quote",
522
- onClick: ne
499
+ onClick: Xe
523
500
  }, null, 8, ["class"])) : H("", !0),
524
- f.value.includes("media") ? (m(), F(w(A), {
501
+ f.value.includes("media") ? (m(), P(w(A), {
525
502
  key: 3,
526
503
  class: "cursor-pointer",
527
504
  width: "20",
528
505
  height: "20",
529
506
  name: "text-editor/media",
530
- onClick: De
507
+ onClick: _
531
508
  })) : H("", !0),
532
- T(w(A), {
509
+ L(w(A), {
533
510
  class: "cursor-pointer",
534
511
  width: "20",
535
512
  height: "20",
536
513
  name: "table",
537
- onClick: o[4] || (o[4] = (h) => X.value = !X.value)
514
+ onClick: o[4] || (o[4] = (x) => K.value = !K.value)
538
515
  })
539
516
  ]),
540
- f.value.includes("list") ? (m(), E(pe, { key: 3 }, [
541
- o[19] || (o[19] = b("div", { class: "border-l border-oc-gray-200" }, null, -1)),
542
- b("div", Ht, [
543
- T(w(A), {
544
- class: Q(["cursor-pointer", le.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
517
+ f.value.includes("list") ? (m(), E(ge, { key: 3 }, [
518
+ o[19] || (o[19] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
519
+ h("div", Ht, [
520
+ L(w(A), {
521
+ class: Q(["cursor-pointer", ae.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
545
522
  width: "20",
546
523
  height: "20",
547
524
  name: "text-editor/bullet",
548
- onClick: o[5] || (o[5] = (h) => He("bullet"))
525
+ onClick: o[5] || (o[5] = (x) => Ve("bullet"))
549
526
  }, null, 8, ["class"]),
550
- T(w(A), {
551
- 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"]),
552
529
  width: "20",
553
530
  height: "20",
554
531
  name: "text-editor/number",
555
- onClick: o[6] || (o[6] = (h) => He("ordered"))
532
+ onClick: o[6] || (o[6] = (x) => Ve("ordered"))
556
533
  }, null, 8, ["class"])
557
534
  ])
558
535
  ], 64)) : H("", !0),
559
- f.value.includes("alignment") ? (m(), E(pe, { key: 4 }, [
560
- o[20] || (o[20] = b("div", { class: "border-l border-oc-gray-200" }, null, -1)),
561
- b("div", Ot, [
562
- T(w(A), {
563
- class: Q(["cursor-pointer", _.value ? "text-oc-text-300" : "text-oc-text"]),
536
+ f.value.includes("alignment") ? (m(), E(ge, { key: 4 }, [
537
+ o[20] || (o[20] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
538
+ h("div", Ot, [
539
+ L(w(A), {
540
+ class: Q(["cursor-pointer", ee.value ? "text-oc-text-300" : "text-oc-text"]),
564
541
  width: "20",
565
542
  height: "20",
566
543
  name: "text-editor/left",
567
- onClick: o[7] || (o[7] = (h) => me())
544
+ onClick: o[7] || (o[7] = (x) => he())
568
545
  }, null, 8, ["class"]),
569
- T(w(A), {
570
- 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"]),
571
548
  width: "20",
572
549
  height: "20",
573
550
  name: "text-editor/center",
574
- onClick: o[8] || (o[8] = (h) => me("center"))
551
+ onClick: o[8] || (o[8] = (x) => he("center"))
575
552
  }, null, 8, ["class"]),
576
- T(w(A), {
577
- 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"]),
578
555
  width: "20",
579
556
  height: "20",
580
557
  name: "text-editor/right",
581
- onClick: o[9] || (o[9] = (h) => me("right"))
558
+ onClick: o[9] || (o[9] = (x) => he("right"))
582
559
  }, null, 8, ["class"]),
583
- T(w(A), {
584
- 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"]),
585
562
  width: "20",
586
563
  height: "20",
587
564
  name: "text-editor/justify",
588
- onClick: o[10] || (o[10] = (h) => me("justify"))
565
+ onClick: o[10] || (o[10] = (x) => he("justify"))
589
566
  }, null, 8, ["class"])
590
567
  ])
591
568
  ], 64)) : H("", !0),
592
- o[22] || (o[22] = b("div", { class: "border-l border-oc-gray-200" }, null, -1)),
593
- b("div", Mt, [
594
- T(w(Vt), {
595
- modelValue: fe.value,
569
+ o[22] || (o[22] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
570
+ h("div", Mt, [
571
+ L(w(Vt), {
572
+ modelValue: de.value,
596
573
  "onUpdate:modelValue": [
597
- o[11] || (o[11] = (h) => fe.value = h),
598
- Oe
574
+ o[11] || (o[11] = (x) => de.value = x),
575
+ qe
599
576
  ],
600
577
  "hide-input-color": ""
601
578
  }, {
602
- "picker-icon": Y(() => [
603
- b("div", Qt, [
604
- b("div", {
605
- style: ee(`color:${fe.value}`)
579
+ "picker-icon": W(() => [
580
+ h("div", Qt, [
581
+ h("div", {
582
+ style: te(`color:${de.value}`)
606
583
  }, "A", 4),
607
- b("div", {
584
+ h("div", {
608
585
  class: "h-[5px] w-full rounded border",
609
- style: ee(`background:${fe.value}`)
586
+ style: te(`background:${de.value}`)
610
587
  }, null, 4)
611
588
  ])
612
589
  ]),
613
590
  _: 1
614
591
  }, 8, ["modelValue"])
615
592
  ]),
616
- o[23] || (o[23] = b("div", { class: "border-l border-oc-gray-200" }, null, -1)),
617
- xe.value ? (m(), E("div", At, [
618
- T(w(Ne), {
593
+ o[23] || (o[23] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
594
+ ce.value ? (m(), E("div", At, [
595
+ L(w(Ae), {
619
596
  label: "Image width",
620
597
  class: "w-[120px]",
621
- "model-value": ie.value,
598
+ "model-value": ye.value,
622
599
  "min-limit": 0,
623
600
  "max-limit": 100,
624
- "onUpdate:modelValue": Me
601
+ "onUpdate:modelValue": Te
625
602
  }, null, 8, ["model-value"]),
626
- b("div", Nt, [
627
- T(w(A), {
603
+ h("div", Nt, [
604
+ L(w(A), {
628
605
  class: "cursor-pointer",
629
606
  width: "20",
630
607
  height: "20",
631
608
  name: "text-editor/left",
632
- onClick: o[12] || (o[12] = (h) => ke())
609
+ onClick: o[12] || (o[12] = (x) => be())
633
610
  }),
634
- T(w(A), {
611
+ L(w(A), {
635
612
  class: "cursor-pointer",
636
613
  width: "20",
637
614
  height: "20",
638
615
  name: "text-editor/center",
639
- onClick: o[13] || (o[13] = (h) => ke("center"))
616
+ onClick: o[13] || (o[13] = (x) => be("center"))
640
617
  }),
641
- T(w(A), {
618
+ L(w(A), {
642
619
  class: "cursor-pointer",
643
620
  width: "20",
644
621
  height: "20",
645
622
  name: "text-editor/right",
646
- onClick: o[14] || (o[14] = (h) => ke("right"))
623
+ onClick: o[14] || (o[14] = (x) => be("right"))
647
624
  })
648
625
  ])
649
626
  ])) : H("", !0),
650
- b("div", Pt, [
627
+ h("div", Pt, [
651
628
  (m(), E("svg", {
652
629
  width: "20",
653
630
  height: "20",
654
631
  viewBox: "0 0 15 15",
655
632
  fill: "none",
656
633
  xmlns: "http://www.w3.org/2000/svg",
657
- onClick: o[15] || (o[15] = (h) => Re())
634
+ onClick: o[15] || (o[15] = (x) => Pe())
658
635
  }, o[21] || (o[21] = [
659
- b("path", {
636
+ h("path", {
660
637
  "fill-rule": "evenodd",
661
638
  "clip-rule": "evenodd",
662
639
  d: "M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z",
@@ -664,10 +641,10 @@ const It = { key: 1 }, Vt = {
664
641
  }, null, -1)
665
642
  ])))
666
643
  ])
667
- ], 8, Lt)
644
+ ], 8, Tt)
668
645
  ]),
669
646
  _: 1
670
- }, 8, ["id", "content", "options", "global-options", "placeholder"])) : H("", !0)
647
+ }, 8, ["id", "content", "options", "placeholder"])) : H("", !0)
671
648
  ], 2)
672
649
  ]),
673
650
  _: 1
@@ -714,22 +691,22 @@ const It = { key: 1 }, Vt = {
714
691
  }
715
692
  u.value = `#${a.toUpperCase()}`, y("update:modelValue", u.value);
716
693
  };
717
- return ye(
694
+ return fe(
718
695
  () => r.modelValue,
719
696
  (p, a) => {
720
697
  p !== a && (u.value = p);
721
698
  },
722
699
  { immediate: !0 }
723
- ), (p, a) => (m(), F(w($e), {
700
+ ), (p, a) => (m(), P(w(we), {
724
701
  class: "w-[158px]",
725
702
  placeholder: "#FFFFFF",
726
703
  "model-value": u.value,
727
704
  "onUpdate:modelValue": f,
728
705
  onBlur: C,
729
- onKeyup: it(C, ["enter"])
706
+ onKeyup: ot(C, ["enter"])
730
707
  }, null, 8, ["model-value"]));
731
708
  }
732
- }, qt = { class: "grid grid-cols-3 gap-3" }, ot = {
709
+ }, qt = { class: "grid grid-cols-3 gap-3" }, nt = {
733
710
  __name: "InputRgbHsl",
734
711
  props: {
735
712
  inputType: {
@@ -752,19 +729,19 @@ const It = { key: 1 }, Vt = {
752
729
  r: 0,
753
730
  g: 0,
754
731
  b: 0
755
- }), f = v(), C = v(), p = v(), a = (M, L) => {
756
- var W, U, N;
732
+ }), f = v(), C = v(), p = v(), a = (M, T) => {
733
+ var z, U, N;
757
734
  let B = 255;
758
- if (r.inputType == "HSL" && (B = 100, M == "r" && (B = 360)), !isNaN(parseInt(L))) {
735
+ if (r.inputType == "HSL" && (B = 100, M == "r" && (B = 360)), !isNaN(parseInt(T))) {
759
736
  if (M == "r") {
760
- let D = parseInt(L);
761
- D <= B && (u.value.r = D, r.inputType == "RGB" ? O("r") : j()), (W = f.value) == null || W.focus();
737
+ let D = parseInt(T);
738
+ D <= B && (u.value.r = D, r.inputType == "RGB" ? O("r") : Z()), (z = f.value) == null || z.focus();
762
739
  } else if (M == "g") {
763
- let D = parseInt(L);
764
- D <= B && (u.value.g = D, r.inputType == "RGB" ? O("g") : j()), (U = C.value) == null || U.focus();
740
+ let D = parseInt(T);
741
+ D <= B && (u.value.g = D, r.inputType == "RGB" ? O("g") : Z()), (U = C.value) == null || U.focus();
765
742
  } else if (M == "b") {
766
- let D = parseInt(L);
767
- D <= B && (u.value.b = D, r.inputType == "RGB" ? O("b") : j()), (N = p.value) == null || N.focus();
743
+ let D = parseInt(T);
744
+ D <= B && (u.value.b = D, r.inputType == "RGB" ? O("b") : Z()), (N = p.value) == null || N.focus();
768
745
  }
769
746
  }
770
747
  }, O = (M) => {
@@ -776,20 +753,20 @@ const It = { key: 1 }, Vt = {
776
753
  b: parseInt(u.value.b)
777
754
  }
778
755
  });
779
- }, j = () => {
756
+ }, Z = () => {
780
757
  y("update-hsl-value", {
781
758
  h: parseInt(u.value.r),
782
759
  s: parseInt(u.value.g),
783
760
  l: parseInt(u.value.b)
784
761
  });
785
762
  };
786
- return r.inputType === "RGB" ? ye(
763
+ return r.inputType === "RGB" ? fe(
787
764
  () => r.rgbValue,
788
- (M, L) => {
789
- M !== L && (u.value = M);
765
+ (M, T) => {
766
+ M !== T && (u.value = M);
790
767
  },
791
768
  { immediate: !0, deep: !0 }
792
- ) : ye(
769
+ ) : fe(
793
770
  () => r.hslValue,
794
771
  (M) => {
795
772
  u.value = {
@@ -799,27 +776,27 @@ const It = { key: 1 }, Vt = {
799
776
  };
800
777
  },
801
778
  { immediate: !0, deep: !0 }
802
- ), (M, L) => (m(), E("div", qt, [
803
- T(w($e), {
779
+ ), (M, T) => (m(), E("div", qt, [
780
+ L(w(we), {
804
781
  ref_key: "rInputEl",
805
782
  ref: f,
806
783
  "model-value": u.value.r,
807
784
  placeholder: "100",
808
- "onUpdate:modelValue": L[0] || (L[0] = (B) => a("r", B))
785
+ "onUpdate:modelValue": T[0] || (T[0] = (B) => a("r", B))
809
786
  }, null, 8, ["model-value"]),
810
- T(w($e), {
787
+ L(w(we), {
811
788
  ref_key: "gInputEl",
812
789
  ref: C,
813
790
  "model-value": u.value.g,
814
791
  placeholder: "100",
815
- "onUpdate:modelValue": L[1] || (L[1] = (B) => a("g", B))
792
+ "onUpdate:modelValue": T[1] || (T[1] = (B) => a("g", B))
816
793
  }, null, 8, ["model-value"]),
817
- T(w($e), {
794
+ L(w(we), {
818
795
  ref_key: "bInputEl",
819
796
  ref: p,
820
797
  "model-value": u.value.b,
821
798
  placeholder: "100",
822
- "onUpdate:modelValue": L[2] || (L[2] = (B) => a("b", B))
799
+ "onUpdate:modelValue": T[2] || (T[2] = (B) => a("b", B))
823
800
  }, null, 8, ["model-value"])
824
801
  ]));
825
802
  }
@@ -840,22 +817,22 @@ const It = { key: 1 }, Vt = {
840
817
  let p = parseInt(u.value);
841
818
  p && p <= 100 ? y("update:modelValue", p) : u.value = r.modelValue;
842
819
  };
843
- return ye(
820
+ return fe(
844
821
  () => r.modelValue,
845
822
  (p, a) => {
846
823
  p !== a && (u.value = p);
847
824
  },
848
825
  { immediate: !0 }
849
- ), (p, a) => (m(), F(w($e), {
826
+ ), (p, a) => (m(), P(w(we), {
850
827
  class: "w-[75px]",
851
828
  placeholder: "100",
852
829
  "model-value": u.value,
853
830
  "onUpdate:modelValue": f,
854
831
  onBlur: C,
855
- onKeyup: it(C, ["enter"])
832
+ onKeyup: ot(C, ["enter"])
856
833
  }, {
857
- leading: Y(() => a[0] || (a[0] = [
858
- ge("%")
834
+ leading: W(() => a[0] || (a[0] = [
835
+ ve("%")
859
836
  ])),
860
837
  _: 1
861
838
  }, 8, ["model-value"]));
@@ -870,7 +847,7 @@ const It = { key: 1 }, Vt = {
870
847
  const y = v(n.modelValue), u = V, f = (C) => {
871
848
  y.value = C, u("update:model-value", C);
872
849
  };
873
- return (C, p) => (m(), F(w(Je), {
850
+ return (C, p) => (m(), P(w(Ze), {
874
851
  class: "!w-[80px]",
875
852
  "model-value": y.value,
876
853
  options: [
@@ -897,12 +874,12 @@ const It = { key: 1 }, Vt = {
897
874
  },
898
875
  emits: ["update:modelValue", "onInput"],
899
876
  setup(n, { emit: V }) {
900
- const r = Be("opacitySlider"), y = V, u = (f) => {
877
+ const r = Re("opacitySlider"), y = V, u = (f) => {
901
878
  y("update:modelValue", parseInt(f.target.value)), y("onInput", f);
902
879
  };
903
880
  return (f, C) => (m(), E("div", Yt, [
904
- b("div", Wt, [
905
- b("input", {
881
+ h("div", Wt, [
882
+ h("input", {
906
883
  ref_key: "opacitySlider",
907
884
  ref: r,
908
885
  value: n.modelValue,
@@ -922,38 +899,38 @@ const It = { key: 1 }, Vt = {
922
899
  },
923
900
  emits: ["onAddColor", "onMouseDown", "onDeleteColor"],
924
901
  setup(n, { emit: V }) {
925
- const r = Be("gradientBar"), y = v(), u = V, f = (L) => {
926
- L.preventDefault();
927
- }, C = v("left:0"), p = v(!1), a = (L) => {
928
- u("onMouseDown", L);
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);
929
906
  }, O = () => {
930
- let L = y.value.querySelector(".select");
931
- C.value = L == null ? void 0 : L.getAttribute("style");
932
- }, j = () => {
907
+ let T = y.value.querySelector(".select");
908
+ C.value = T == null ? void 0 : T.getAttribute("style");
909
+ }, Z = () => {
933
910
  var B;
934
911
  O(), (((B = y.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? p.value = !0 : p.value = !1;
935
- }, M = (L) => {
936
- p.value = !1, u("onAddColor", L);
912
+ }, M = (T) => {
913
+ p.value = !1, u("onAddColor", T);
937
914
  };
938
- return (L, B) => (m(), E("div", {
915
+ return (T, B) => (m(), E("div", {
939
916
  ref_key: "gradientSlider",
940
917
  ref: y,
941
918
  class: "relative h-[40px]",
942
- onClick: j
919
+ onClick: Z
943
920
  }, [
944
- b("button", {
921
+ h("button", {
945
922
  type: "button",
946
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"]),
947
- style: ee(C.value),
948
- onClick: B[0] || (B[0] = (W) => L.$emit("onDeleteColor"))
924
+ style: te(C.value),
925
+ onClick: B[0] || (B[0] = (z) => T.$emit("onDeleteColor"))
949
926
  }, [
950
- T(w(A), {
927
+ L(w(A), {
951
928
  name: "bin",
952
929
  width: "14",
953
930
  height: "14"
954
931
  })
955
932
  ], 6),
956
- b("div", {
933
+ h("div", {
957
934
  class: Q(["gradient-bar", {
958
935
  "mt-[20px]": n.gradientType === "linear",
959
936
  "mt-[12px]": n.gradientType === "radial"
@@ -961,7 +938,7 @@ const It = { key: 1 }, Vt = {
961
938
  onMousedown: a,
962
939
  onDragstart: f
963
940
  }, [
964
- b("div", {
941
+ h("div", {
965
942
  ref_key: "gradientBar",
966
943
  ref: r,
967
944
  class: "gradient-container",
@@ -981,7 +958,7 @@ const It = { key: 1 }, Vt = {
981
958
  r("update:modelValue", parseFloat(u.target.value)), r("onInput", u);
982
959
  };
983
960
  return (u, f) => (m(), E("div", Zt, [
984
- b("input", {
961
+ h("input", {
985
962
  value: n.modelValue,
986
963
  class: "picker-hue-range-slider",
987
964
  type: "range",
@@ -1011,7 +988,7 @@ const It = { key: 1 }, Vt = {
1011
988
  emits: ["update:angle", "update:percentageX", "update:percentageY", "onInput"],
1012
989
  setup(n, { emit: V }) {
1013
990
  const r = v(!1), y = v(!1);
1014
- _e(() => {
991
+ Je(() => {
1015
992
  r.value = !0, y.value = !0;
1016
993
  });
1017
994
  const u = V, f = (C, p) => {
@@ -1029,7 +1006,7 @@ const It = { key: 1 }, Vt = {
1029
1006
  }
1030
1007
  };
1031
1008
  return (C, p) => (m(), E("div", el, [
1032
- n.gradientType == "linear" && r.value ? (m(), F(w(Ne), {
1009
+ n.gradientType == "linear" && r.value ? (m(), P(w(Ae), {
1033
1010
  key: 0,
1034
1011
  label: "Angle",
1035
1012
  "model-value": n.angle,
@@ -1037,43 +1014,43 @@ const It = { key: 1 }, Vt = {
1037
1014
  "max-limit": 360,
1038
1015
  "onUpdate:modelValue": p[0] || (p[0] = (a) => f(a, "angle"))
1039
1016
  }, {
1040
- "min-limit-label": Y(() => p[3] || (p[3] = [
1041
- ge("0 ")
1017
+ "min-limit-label": W(() => p[3] || (p[3] = [
1018
+ ve("0 ")
1042
1019
  ])),
1043
- "max-limit-label": Y(() => p[4] || (p[4] = [
1044
- ge("360"),
1045
- b("span", null, "°", -1)
1020
+ "max-limit-label": W(() => p[4] || (p[4] = [
1021
+ ve("360"),
1022
+ h("span", null, "°", -1)
1046
1023
  ])),
1047
1024
  _: 1
1048
1025
  }, 8, ["model-value"])) : H("", !0),
1049
1026
  n.gradientType == "radial" && y.value ? (m(), E("div", tl, [
1050
- T(w(Ne), {
1027
+ L(w(Ae), {
1051
1028
  label: "Position X",
1052
1029
  "model-value": n.percentageX,
1053
1030
  "min-limit": 0,
1054
1031
  "max-limit": 100,
1055
1032
  "onUpdate:modelValue": p[1] || (p[1] = (a) => f(a, "percentageX"))
1056
1033
  }, {
1057
- "min-limit-label": Y(() => p[5] || (p[5] = [
1058
- ge("0")
1034
+ "min-limit-label": W(() => p[5] || (p[5] = [
1035
+ ve("0")
1059
1036
  ])),
1060
- "max-limit-label": Y(() => p[6] || (p[6] = [
1061
- ge("100%")
1037
+ "max-limit-label": W(() => p[6] || (p[6] = [
1038
+ ve("100%")
1062
1039
  ])),
1063
1040
  _: 1
1064
1041
  }, 8, ["model-value"]),
1065
- T(w(Ne), {
1042
+ L(w(Ae), {
1066
1043
  label: "Position Y",
1067
1044
  "model-value": n.percentageY,
1068
1045
  "min-limit": 0,
1069
1046
  "max-limit": 100,
1070
1047
  "onUpdate:modelValue": p[2] || (p[2] = (a) => f(a, "percentageY"))
1071
1048
  }, {
1072
- "min-limit-label": Y(() => p[7] || (p[7] = [
1073
- ge("0")
1049
+ "min-limit-label": W(() => p[7] || (p[7] = [
1050
+ ve("0")
1074
1051
  ])),
1075
- "max-limit-label": Y(() => p[8] || (p[8] = [
1076
- ge("100%")
1052
+ "max-limit-label": W(() => p[8] || (p[8] = [
1053
+ ve("100%")
1077
1054
  ])),
1078
1055
  _: 1
1079
1056
  }, 8, ["model-value"])
@@ -1084,7 +1061,7 @@ const It = { key: 1 }, Vt = {
1084
1061
  __name: "PickerWrap",
1085
1062
  emits: ["onMouseDown"],
1086
1063
  setup(n) {
1087
- 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) => {
1088
1065
  f.preventDefault();
1089
1066
  };
1090
1067
  return (f, C) => (m(), E("div", {
@@ -1094,13 +1071,13 @@ const It = { key: 1 }, Vt = {
1094
1071
  onMousedown: C[0] || (C[0] = (p) => f.$emit("onMouseDown", p)),
1095
1072
  onDragstart: u
1096
1073
  }, [
1097
- b("canvas", {
1074
+ h("canvas", {
1098
1075
  ref_key: "canvas",
1099
1076
  ref: V,
1100
1077
  class: "colour-area"
1101
1078
  }, null, 512),
1102
- C[1] || (C[1] = b("div", { class: "colour-area-mask" }, null, -1)),
1103
- b("div", {
1079
+ C[1] || (C[1] = h("div", { class: "colour-area-mask" }, null, -1)),
1080
+ h("div", {
1104
1081
  ref_key: "pickerPointer",
1105
1082
  ref: y,
1106
1083
  class: "colour-area-point-circle"
@@ -1135,7 +1112,7 @@ const It = { key: 1 }, Vt = {
1135
1112
  emits: ["onChangeMode"],
1136
1113
  setup(n) {
1137
1114
  return (V, r) => (m(), E("div", nl, [
1138
- b("button", {
1115
+ h("button", {
1139
1116
  type: "button",
1140
1117
  class: Q(n.mode == "solid" ? "active" : ""),
1141
1118
  style: { padding: "7px" },
@@ -1144,25 +1121,25 @@ const It = { key: 1 }, Vt = {
1144
1121
  n.modelValue && n.mode == "solid" ? (m(), E("div", {
1145
1122
  key: 0,
1146
1123
  class: "w-[28px] h-[28px] rounded-full border",
1147
- style: ee(`background:${n.modelValue}`)
1124
+ style: te(`background:${n.modelValue}`)
1148
1125
  }, null, 4)) : (m(), E("svg", ol, r[3] || (r[3] = [
1149
- b("g", { opacity: "0.5" }, [
1150
- b("path", {
1126
+ h("g", { opacity: "0.5" }, [
1127
+ h("path", {
1151
1128
  d: "M0 14C0 6.26801 6.26801 0 14 0C21.732 0 28 6.26801 28 14C28 21.732 21.732 28 14 28C6.26801 28 0 21.732 0 14Z",
1152
1129
  fill: "#03102F"
1153
1130
  })
1154
1131
  ], -1)
1155
1132
  ])))
1156
1133
  ], 2),
1157
- b("button", {
1134
+ h("button", {
1158
1135
  type: "button",
1159
1136
  class: Q(n.gradientType == "linear" && n.mode != "solid" ? "active" : ""),
1160
- style: ee(`${n.iconClasses.linear ? "" : "padding: 7px;"}`),
1137
+ style: te(`${n.iconClasses.linear ? "" : "padding: 7px;"}`),
1161
1138
  onClick: r[1] || (r[1] = (y) => V.$emit("onChangeMode", "linear"))
1162
1139
  }, [
1163
- b("div", {
1140
+ h("div", {
1164
1141
  class: "w-[28px] h-[28px] rounded-full border",
1165
- style: ee(
1142
+ style: te(
1166
1143
  n.modelValue && n.gradientType == "linear" && n.mode != "solid" ? `background:${n.modelValue}` : `
1167
1144
  background: linear-gradient(
1168
1145
  180deg,
@@ -1173,15 +1150,15 @@ const It = { key: 1 }, Vt = {
1173
1150
  )
1174
1151
  }, null, 4)
1175
1152
  ], 6),
1176
- b("button", {
1153
+ h("button", {
1177
1154
  type: "button",
1178
1155
  class: Q(n.gradientType == "radial" && n.mode != "solid" ? "active" : ""),
1179
- style: ee(`${n.iconClasses.radial ? "" : "padding: 6px;"}`),
1156
+ style: te(`${n.iconClasses.radial ? "" : "padding: 6px;"}`),
1180
1157
  onClick: r[2] || (r[2] = (y) => V.$emit("onChangeMode", "radial"))
1181
1158
  }, [
1182
- b("div", {
1159
+ h("div", {
1183
1160
  class: "w-[28px] h-[28px] rounded-full border",
1184
- style: ee(
1161
+ style: te(
1185
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%);"
1186
1163
  )
1187
1164
  }, null, 4)
@@ -1197,10 +1174,10 @@ const It = { key: 1 }, Vt = {
1197
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 = {
1198
1175
  key: 0,
1199
1176
  class: "w-full flex gap-3"
1200
- }, bl = {
1177
+ }, yl = {
1201
1178
  key: 4,
1202
1179
  class: "ck-cp-local-color-conatiner"
1203
- }, yl = ["onClick"], xl = {
1180
+ }, bl = ["onClick"], xl = {
1204
1181
  __name: "OcColorPickerPopup",
1205
1182
  props: {
1206
1183
  modelValue: {
@@ -1243,7 +1220,7 @@ const It = { key: 1 }, Vt = {
1243
1220
  { id: 1, r: 68, g: 71, b: 119, a: 100, percent: 0, hue: 0, select: !0 },
1244
1221
  { id: 2, r: 0, g: 0, b: 255, a: 100, percent: 100, hue: 0, select: !1 }
1245
1222
  ]), O = v(r.lastUsedColors);
1246
- ye(
1223
+ fe(
1247
1224
  () => r.lastUsedColors,
1248
1225
  () => {
1249
1226
  O.value = r.lastUsedColors;
@@ -1252,52 +1229,52 @@ const It = { key: 1 }, Vt = {
1252
1229
  deep: !0
1253
1230
  }
1254
1231
  );
1255
- const j = be(() => r.variant !== "gradient" ? O.value.filter((t) => !t.includes("linear") && !t.includes("radial")) : O.value), M = 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({
1256
1233
  angle: 90,
1257
1234
  percentageX: 50,
1258
1235
  percentageY: 50
1259
- }), W = v(""), U = v(r.inputType), N = v(!1), D = 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({
1260
1237
  h: 0,
1261
1238
  s: 0,
1262
1239
  l: 0
1263
1240
  });
1264
- Te("gradientBar", te), Te("canvas", K), Te("pickerWrap", z), Te("pickerPointer", R), Te("opacitySlider", D);
1265
- let le = 0, _ = 0, x = 0, we = 0, ue = 0, ve = 0;
1266
- const Se = (t) => {
1267
- !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), h(), window.addEventListener("mousemove", Re), window.addEventListener("mouseup", Ee));
1268
- }, 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) => {
1269
1246
  t.preventDefault();
1270
- const e = z.value.getBoundingClientRect(), l = t.clientX - e.left - R.value.offsetWidth / 2, i = t.clientY - e.top - R.value.offsetHeight / 2;
1271
- 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), h();
1272
- }, Ee = () => {
1273
- 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);
1274
1251
  }, Ce = (t) => {
1275
1252
  if (!t) {
1276
- let e = Xe();
1277
- const l = nt(ae.value, e.s, e.l);
1253
+ let e = De();
1254
+ const l = at(ne.value, e.s, e.l);
1278
1255
  if (l) {
1279
1256
  if (N.value) {
1280
1257
  let i = a.value.find((s) => s.select == !0);
1281
1258
  i && (i.r = l.r, i.g = l.g, i.b = l.b);
1282
1259
  }
1283
- oe(), X();
1260
+ K(), F();
1284
1261
  }
1285
1262
  }
1286
- }, ae = v(0), Ie = async (t) => {
1287
- const { rgb: e } = at(ae.value, 100, 50);
1288
- ke(e), setTimeout(() => {
1289
- Ce(t), h();
1263
+ }, ne = v(0), Ie = async (t) => {
1264
+ const { rgb: e } = lt(ne.value, 100, 50);
1265
+ Me(e), setTimeout(() => {
1266
+ Ce(t), G();
1290
1267
  }, 0);
1291
- }, Xe = () => {
1292
- 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;
1293
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;
1294
- }, de = () => {
1271
+ }, me = () => {
1295
1272
  const t = a.value.find((e) => e.select == !0);
1296
1273
  if (t) {
1297
- 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);
1298
1275
  let i = e, s = l;
1299
1276
  Number.isNaN(s) && (s = i);
1300
- 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;
1301
1278
  const [$, g] = 2 * i - 1 < 0 ? [
1302
1279
  k * 2 * s / (1 + s),
1303
1280
  I * (1 - i * (1 + s))
@@ -1308,26 +1285,26 @@ const It = { key: 1 }, Vt = {
1308
1285
  return d.x = $, d.y = g, d;
1309
1286
  } else
1310
1287
  return null;
1311
- }, qe = () => {
1288
+ }, Xe = () => {
1312
1289
  const t = a.value.find((e) => e.select == !0);
1313
- t && (t.hue = ae.value);
1314
- }, ne = v(100), Ue = (t) => {
1290
+ t && (t.hue = ne.value);
1291
+ }, oe = v(100), He = (t) => {
1315
1292
  if (r.showAlpha) {
1316
1293
  const e = a.value.find((l) => l.select == !0);
1317
- e && (e.a = parseInt(t), X());
1294
+ e && (e.a = parseInt(t), F());
1318
1295
  }
1319
- }, Fe = (t) => {
1296
+ }, Oe = (t) => {
1320
1297
  var l, i, s, d;
1321
1298
  const e = (i = (l = u.value) == null ? void 0 : l.querySelector(".gradient-handle-content")) == null ? void 0 : i.getBoundingClientRect();
1322
- 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`;
1323
1300
  };
1324
- let P = null, Z = null;
1325
- const De = (t) => {
1301
+ let q = null, _ = null;
1302
+ const Ve = (t) => {
1326
1303
  var i, s;
1327
1304
  const l = t.target.offsetParent;
1328
1305
  if ((i = l == null ? void 0 : l.id) != null && i.includes("clr-gb-")) {
1329
1306
  const d = l.id.replace("clr-gb-", "");
1330
- Z = l;
1307
+ _ = l;
1331
1308
  const k = a.value.find((I) => I.select == !0);
1332
1309
  if (k && k.id != d) {
1333
1310
  const I = (s = u.value) == null ? void 0 : s.querySelector(".gradient-handle.select");
@@ -1336,30 +1313,30 @@ const It = { key: 1 }, Vt = {
1336
1313
  for (let g = 0; g < a.value.length; g++) {
1337
1314
  const S = a.value[g];
1338
1315
  if (S.id == d) {
1339
- $ != -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(), h();
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();
1340
1317
  break;
1341
1318
  }
1342
1319
  }
1343
1320
  }
1344
- window.addEventListener("mousemove", me), window.addEventListener("mouseup", He);
1321
+ window.addEventListener("mousemove", de), window.addEventListener("mouseup", he);
1345
1322
  }
1346
- }, He = () => {
1347
- window.removeEventListener("mousemove", me), window.removeEventListener("mouseup", De);
1348
- }, me = (t) => {
1323
+ }, he = () => {
1324
+ window.removeEventListener("mousemove", de), window.removeEventListener("mouseup", Ve);
1325
+ }, de = (t) => {
1349
1326
  var d, k;
1350
1327
  t.preventDefault();
1351
- 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);
1352
1329
  let s = t.clientX - (l.left || 0) - ((e == null ? void 0 : e.width) || 0) / 2;
1353
- if (s < 0 ? s = 0 : s > i && (s = i), Z) {
1354
- Z.style.left = `${s}px`;
1330
+ if (s < 0 ? s = 0 : s > i && (s = i), _) {
1331
+ _.style.left = `${s}px`;
1355
1332
  const I = parseFloat((s / ((l == null ? void 0 : l.width) - (e == null ? void 0 : e.width)) * 100).toFixed(0)), $ = a.value.find(
1356
- (g) => g.id == (Z == null ? void 0 : Z.id.replace("clr-gb-", ""))
1333
+ (g) => g.id == (_ == null ? void 0 : _.id.replace("clr-gb-", ""))
1357
1334
  );
1358
- $ && ($.percent = I), X();
1335
+ $ && ($.percent = I), F();
1359
1336
  }
1360
- }, fe = (t) => {
1337
+ }, qe = (t) => {
1361
1338
  var I, $;
1362
- 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 = {
1363
1340
  id: Date.now(),
1364
1341
  r: s.r,
1365
1342
  g: s.g,
@@ -1371,14 +1348,14 @@ const It = { key: 1 }, Vt = {
1371
1348
  };
1372
1349
  a.value[i].select = !1;
1373
1350
  const k = (I = u.value) == null ? void 0 : I.querySelector(".gradient-handle.select");
1374
- k == null || k.classList.remove("select"), a.value = [...a.value, d], Me(d), Z = ($ = u.value) == null ? void 0 : $.querySelector(`#clr-gb-${d.id}`), X();
1375
- }, Oe = (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) => {
1376
1353
  if (t.r == 0 && t.g == 0 && t.b == 0)
1377
1354
  return !0;
1378
1355
  if (t.r == 255 && t.g == 255 && t.b == 255)
1379
1356
  return !0;
1380
1357
  {
1381
- 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;
1382
1359
  for (let $ = 0; $ < i; $++)
1383
1360
  for (let g = 0; g < l; g++) {
1384
1361
  const S = ($ * l + g) * 4, re = s[S], dt = s[S + 1], ct = s[S + 2];
@@ -1387,47 +1364,47 @@ const It = { key: 1 }, Vt = {
1387
1364
  }
1388
1365
  return !1;
1389
1366
  }
1390
- }, ie = (t, e, l, i, s) => {
1367
+ }, ce = (t, e, l, i, s) => {
1391
1368
  setTimeout(() => {
1392
- if (Oe({ r: t, g: e, b: l })) {
1393
- let d = de();
1369
+ if (ye({ r: t, g: e, b: l })) {
1370
+ let d = me();
1394
1371
  d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`);
1395
1372
  } else {
1396
- let d = de();
1397
- 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);
1398
1375
  }
1399
1376
  }, 0);
1400
- }, xe = () => {
1401
- a.value.forEach((l) => Me(l)), Ve();
1377
+ }, Te = () => {
1378
+ a.value.forEach((l) => be(l)), Le();
1402
1379
  const t = a.value[0];
1403
- ae.value = t.hue, Ie(!0);
1404
- let e = de();
1405
- e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), oe(), X();
1406
- }, Me = (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) => {
1407
1384
  if (y.value == "gradient") {
1408
1385
  let e = document.createElement("div");
1409
- 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);
1410
1387
  let l = document.createElement("div");
1411
- 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);
1412
1389
  }
1413
- }, ke = (t) => {
1414
- 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;
1415
1392
  e.fillStyle = `rgb(${t[0]},${t[1]},${t[2]})`, e.fillRect(0, 0, l, i);
1416
1393
  let s = e.createLinearGradient(0, 0, l - 12, 0);
1417
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);
1418
1395
  let d = e.createLinearGradient(0, 0, 0, i);
1419
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);
1420
- }, oe = () => {
1397
+ }, K = () => {
1421
1398
  if (r.showAlpha) {
1422
1399
  let t = a.value.find((e) => e.select == !0);
1423
1400
  t && (D.value.style.background = ` linear-gradient(90deg,rgba(255, 255, 255, 0) 0%, rgba(${t.r}, ${t.g}, ${t.b}, 100) 97%)`);
1424
1401
  }
1425
- }, X = () => {
1402
+ }, F = () => {
1426
1403
  var t;
1427
1404
  if (y.value == "gradient") {
1428
1405
  a.value.sort((s, d) => s.percent - d.percent);
1429
1406
  let e = "linear-gradient(90deg, ", l;
1430
- if (L.value == "linear") {
1407
+ if (T.value == "linear") {
1431
1408
  l = `linear-gradient(${B.angle}deg, `;
1432
1409
  for (let s = 0; s < a.value.length; s++) {
1433
1410
  const { r: d, g: k, b: I, a: $, percent: g } = a.value[s];
@@ -1440,7 +1417,7 @@ const It = { key: 1 }, Vt = {
1440
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}%, `);
1441
1418
  }
1442
1419
  }
1443
- te.value.style.backgroundImage = e;
1420
+ le.value.style.backgroundImage = e;
1444
1421
  let i = (t = u.value) == null ? void 0 : t.querySelector("#ck-cp-target-background");
1445
1422
  i && (i.style.backgroundImage = l, N.value && p(i.style.backgroundImage));
1446
1423
  } else {
@@ -1457,17 +1434,17 @@ const It = { key: 1 }, Vt = {
1457
1434
  d = `rgb(${e},${l},${i})`;
1458
1435
  break;
1459
1436
  case "HEX":
1460
- d = lt(e, l, i);
1437
+ d = tt(e, l, i);
1461
1438
  break;
1462
1439
  }
1463
1440
  p(d);
1464
1441
  }
1465
- }, Ve = () => {
1442
+ }, Le = () => {
1466
1443
  a.value.forEach((t) => {
1467
- t.hue = Ae(t.r, t.g, t.b);
1444
+ t.hue = Qe(t.r, t.g, t.b);
1468
1445
  });
1469
- }, Le = (t) => {
1470
- L.value = t, X();
1446
+ }, Fe = (t) => {
1447
+ T.value = t, F();
1471
1448
  }, Ge = () => {
1472
1449
  var t, e;
1473
1450
  if (a.value.length > 2) {
@@ -1478,68 +1455,68 @@ const It = { key: 1 }, Vt = {
1478
1455
  const s = (t = u.value) == null ? void 0 : t.querySelector(`#clr-gb-${i}`);
1479
1456
  s == null || s.remove();
1480
1457
  const d = a.value[0];
1481
- 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), h(), 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());
1482
1459
  }
1483
1460
  }
1484
1461
  }, Ye = () => {
1485
1462
  var l;
1486
1463
  const t = (l = u.value) == null ? void 0 : l.querySelector("#cp-btn-eyedropper");
1487
1464
  t == null || t.classList.add("active"), new EyeDropper().open().then((i) => {
1488
- 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);
1489
1466
  if (k) {
1490
- const I = Ae(k.r, k.g, k.b);
1491
- if (d && (d.hue = I, d.r = k.r, d.g = k.g, d.b = k.b), Oe(k)) {
1492
- 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();
1493
1470
  $ && (R.value.style.left = `${$.x}px`, R.value.style.top = `${$.y}px`);
1494
1471
  } else {
1495
- ae.value = I;
1496
- const { rgb: $ } = at(I, 100, 50);
1497
- ke($);
1498
- const g = de();
1472
+ ne.value = I;
1473
+ const { rgb: $ } = lt(I, 100, 50);
1474
+ Me($);
1475
+ const g = me();
1499
1476
  g && (R.value.style.left = `${g.x}px`, R.value.style.top = `${g.y}px`);
1500
1477
  }
1501
- h(), oe(), X(), t == null || t.classList.remove("active");
1478
+ G(), K(), F(), t == null || t.classList.remove("active");
1502
1479
  }
1503
1480
  }).catch(() => {
1504
1481
  t == null || t.classList.remove("active");
1505
1482
  });
1506
- }, We = (t) => {
1483
+ }, c = (t) => {
1507
1484
  const { value: e, type: l } = t;
1508
1485
  if (l != "a") {
1509
1486
  const i = a.value.find((s) => s.select == !0);
1510
1487
  if (i) {
1511
1488
  i.r = parseInt(e.r), i.g = parseInt(e.g), i.b = parseInt(e.b);
1512
- const s = Ae(i.r, i.g, i.b);
1513
- 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();
1514
1491
  }
1515
1492
  } else
1516
- ne.value = e, X(), oe();
1517
- }, c = (t) => {
1518
- 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;
1519
1496
  const e = a.value.find((l) => l.select == !0);
1520
- if (e && !Number.isNaN(q.h) && !Number.isNaN(q.s) && !Number.isNaN(q.l)) {
1521
- const { r: l, g: i, b: s } = nt(q.h, q.s / 100, q.l / 100);
1522
- 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();
1523
1500
  }
1524
- }, o = () => {
1525
- if (W.value) {
1526
- const t = je(W.value);
1501
+ }, x = () => {
1502
+ if (z.value) {
1503
+ const t = ze(z.value);
1527
1504
  if (t) {
1528
- const e = Ae(t.r, t.g, t.b), l = a.value.find((i) => i.select == !0);
1529
- 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(U.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));
1530
1507
  }
1531
1508
  }
1532
- }, h = () => {
1509
+ }, G = () => {
1533
1510
  const t = a.value.find((e) => e.select == !0);
1534
- t && (W.value = lt(t.r, t.g, t.b).toUpperCase()), se(U.value);
1535
- }, J = (t) => {
1511
+ t && (z.value = tt(t.r, t.g, t.b).toUpperCase()), pe(U.value);
1512
+ }, se = (t) => {
1536
1513
  f("last-used-pick", t);
1537
1514
  };
1538
1515
  window.EyeDropper && (M.value = !0);
1539
- const ce = (t = "") => {
1516
+ const xe = (t = "") => {
1540
1517
  if (y.value == "gradient") {
1541
1518
  let e = t.includes("linear") ? "linear" : "radial", l = [];
1542
- if (L.value = e, e == "linear") {
1519
+ if (T.value = e, e == "linear") {
1543
1520
  let i = /^linear-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), d = /,\s*(?![^()]*\))/;
1544
1521
  if (s) {
1545
1522
  let k = s[1].split(d);
@@ -1595,7 +1572,7 @@ const It = { key: 1 }, Vt = {
1595
1572
  }
1596
1573
  }
1597
1574
  }
1598
- 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);
1599
1576
  } else if (t) {
1600
1577
  let e = {
1601
1578
  r: 0,
@@ -1607,7 +1584,7 @@ const It = { key: 1 }, Vt = {
1607
1584
  if (t.length >= 8)
1608
1585
  e = $t(t);
1609
1586
  else {
1610
- let l = je(t);
1587
+ let l = ze(t);
1611
1588
  l ? (e.a = 1, e.r = l.r, e.g = l.g, e.b = l.b) : e = null;
1612
1589
  }
1613
1590
  else if (t.includes("rgb"))
@@ -1617,48 +1594,48 @@ const It = { key: 1 }, Vt = {
1617
1594
  let l = St(t);
1618
1595
  l ? (e.a = 1, e.r = l.r, e.g = l.g, e.b = l.b) : e = null;
1619
1596
  }
1620
- 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);
1621
1598
  }
1622
- }, se = (t) => {
1599
+ }, pe = (t) => {
1623
1600
  const e = a.value.find((l) => l.select == !0);
1624
1601
  if (e) {
1625
1602
  switch (t) {
1626
1603
  case "RGB":
1627
1604
  break;
1628
1605
  case "HSL": {
1629
- const { h: l, s: i, l: s } = tt(e.r, e.g, e.b);
1630
- 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);
1631
1608
  break;
1632
1609
  }
1633
1610
  }
1634
1611
  U.value = t;
1635
1612
  }
1636
- }, he = (t) => {
1637
- t && ce(t), xe();
1613
+ }, ke = (t) => {
1614
+ t && xe(t), Te();
1638
1615
  };
1639
- ye(
1616
+ fe(
1640
1617
  () => r.modelValue,
1641
1618
  (t, e) => {
1642
1619
  t !== e && t !== C.value && (a.value.forEach((l) => {
1643
- 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}`);
1644
1621
  i == null || i.remove();
1645
- }), he(t));
1622
+ }), ke(t));
1646
1623
  }
1647
1624
  );
1648
- const Qe = (t) => {
1625
+ const ut = (t) => {
1649
1626
  a.value.forEach((e) => {
1650
- 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}`);
1651
1628
  l == null || l.remove();
1652
1629
  }), t !== "solid" ? (y.value = "gradient", setTimeout(() => {
1653
1630
  var e;
1654
- 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();
1655
1632
  }, 200)) : t === "solid" && (y.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
1656
- he(r.modelValue);
1633
+ ke(r.modelValue);
1657
1634
  }, 200));
1658
1635
  };
1659
- return _e(() => {
1636
+ return Je(() => {
1660
1637
  var t;
1661
- 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")), he(r.modelValue), se(U.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(() => {
1662
1639
  N.value = !0;
1663
1640
  });
1664
1641
  }), (t, e) => (m(), E("div", {
@@ -1668,24 +1645,24 @@ const It = { key: 1 }, Vt = {
1668
1645
  "cp-theme": n.theme
1669
1646
  }, [
1670
1647
  n.variant == "gradient" ? (m(), E("div", rl, [
1671
- T(il, {
1648
+ L(il, {
1672
1649
  class: "mr-auto",
1673
1650
  variant: n.variant,
1674
1651
  mode: y.value,
1675
1652
  "model-value": n.modelValue,
1676
1653
  iconClasses: n.iconClasses,
1677
- gradientType: L.value,
1678
- onOnChangeMode: Qe
1654
+ gradientType: T.value,
1655
+ onOnChangeMode: ut
1679
1656
  }, null, 8, ["variant", "mode", "model-value", "iconClasses", "gradientType"])
1680
1657
  ])) : H("", !0),
1681
1658
  y.value == "gradient" && n.variant == "gradient" ? (m(), E("div", ul, [
1682
- T(Kt, {
1683
- gradientType: L.value,
1684
- onOnAddColor: fe,
1685
- onOnMouseDown: De,
1659
+ L(Kt, {
1660
+ gradientType: T.value,
1661
+ onOnAddColor: qe,
1662
+ onOnMouseDown: Ve,
1686
1663
  onOnDeleteColor: Ge
1687
1664
  }, null, 8, ["gradientType"]),
1688
- T(ll, {
1665
+ L(ll, {
1689
1666
  percentageY: B.percentageY,
1690
1667
  "onUpdate:percentageY": e[0] || (e[0] = (l) => B.percentageY = l),
1691
1668
  angle: B.angle,
@@ -1694,30 +1671,30 @@ const It = { key: 1 }, Vt = {
1694
1671
  "onUpdate:percentageX": e[2] || (e[2] = (l) => B.percentageX = l),
1695
1672
  inputType: U.value,
1696
1673
  mode: y.value,
1697
- gradientType: L.value,
1698
- onOnInput: X
1674
+ gradientType: T.value,
1675
+ onOnInput: F
1699
1676
  }, null, 8, ["percentageY", "angle", "percentageX", "inputType", "mode", "gradientType"])
1700
1677
  ])) : (m(), E("div", dl, [
1701
1678
  n.presetColors ? (m(), E("div", cl, [
1702
- e[10] || (e[10] = b("div", { class: "text-oc-text-400 text-sm my-3 font-medium" }, "Choose color", -1)),
1703
- b("div", pl, [
1704
- (m(!0), E(pe, null, Ze(n.presetColors, (l) => (m(), E("div", {
1679
+ e[10] || (e[10] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium" }, "Choose color", -1)),
1680
+ h("div", pl, [
1681
+ (m(!0), E(ge, null, Ke(n.presetColors, (l) => (m(), E("div", {
1705
1682
  key: `color-${l}`,
1706
1683
  class: "ck-cp-color-item !w-[32px] !h-[32px]",
1707
- style: ee(`background:${l}`),
1708
- onClick: (i) => J(l)
1684
+ style: te(`background:${l}`),
1685
+ onClick: (i) => se(l)
1709
1686
  }, null, 12, gl))), 128))
1710
1687
  ])
1711
1688
  ])) : H("", !0)
1712
1689
  ])),
1713
- T(al, { onOnMouseDown: Se }),
1714
- b("div", vl, [
1715
- T(_t, {
1690
+ L(al, { onOnMouseDown: Pe }),
1691
+ h("div", vl, [
1692
+ L(_t, {
1716
1693
  class: Q(M.value ? "max-w-[90%]" : ""),
1717
- modelValue: ae.value,
1718
- "onUpdate:modelValue": e[3] || (e[3] = (l) => ae.value = l),
1694
+ modelValue: ne.value,
1695
+ "onUpdate:modelValue": e[3] || (e[3] = (l) => ne.value = l),
1719
1696
  onOnInput: e[4] || (e[4] = (l) => Ie(!1)),
1720
- onOnChange: qe
1697
+ onOnChange: Xe
1721
1698
  }, null, 8, ["class", "modelValue"]),
1722
1699
  M.value ? (m(), E("button", {
1723
1700
  key: 0,
@@ -1727,69 +1704,69 @@ const It = { key: 1 }, Vt = {
1727
1704
  style: { padding: "7px" },
1728
1705
  onClick: Ye
1729
1706
  }, e[11] || (e[11] = [
1730
- b("svg", {
1707
+ h("svg", {
1731
1708
  version: "1.1",
1732
1709
  xmlns: "http://www.w3.org/2000/svg",
1733
1710
  width: "32",
1734
1711
  height: "32",
1735
1712
  viewBox: "0 0 32 32"
1736
1713
  }, [
1737
- b("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" })
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" })
1738
1715
  ], -1)
1739
1716
  ]))) : H("", !0)
1740
1717
  ]),
1741
- n.showAlpha ? (m(), F(jt, {
1718
+ n.showAlpha ? (m(), P(jt, {
1742
1719
  key: 3,
1743
- modelValue: ne.value,
1744
- "onUpdate:modelValue": e[5] || (e[5] = (l) => ne.value = l),
1745
- onOnInput: e[6] || (e[6] = (l) => Ue(l.target.value))
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))
1746
1723
  }, null, 8, ["modelValue"])) : H("", !0),
1747
- ft(b("div", ml, null, 512), [
1748
- [ht, !1]
1724
+ ht(h("div", ml, null, 512), [
1725
+ [yt, !1]
1749
1726
  ]),
1750
- b("div", fl, [
1751
- T(Gt, {
1727
+ h("div", fl, [
1728
+ L(Gt, {
1752
1729
  "model-value": U.value,
1753
- "onUpdate:modelValue": se
1730
+ "onUpdate:modelValue": pe
1754
1731
  }, null, 8, ["model-value"]),
1755
1732
  N.value && n.showInputSet ? (m(), E("div", hl, [
1756
- U.value == "HEX" ? (m(), F(Xt, {
1733
+ U.value == "HEX" ? (m(), P(Xt, {
1757
1734
  key: 0,
1758
- modelValue: W.value,
1735
+ modelValue: z.value,
1759
1736
  "onUpdate:modelValue": [
1760
- e[7] || (e[7] = (l) => W.value = l),
1761
- o
1737
+ e[7] || (e[7] = (l) => z.value = l),
1738
+ x
1762
1739
  ]
1763
1740
  }, null, 8, ["modelValue"])) : H("", !0),
1764
- U.value == "RGB" ? (m(), F(ot, {
1741
+ U.value == "RGB" ? (m(), P(nt, {
1765
1742
  key: 1,
1766
1743
  "rgb-value": a.value.find((l) => l.select == !0),
1767
- onUpdateRgbValue: We
1744
+ onUpdateRgbValue: c
1768
1745
  }, null, 8, ["rgb-value"])) : H("", !0),
1769
- U.value == "HSL" ? (m(), F(ot, {
1746
+ U.value == "HSL" ? (m(), P(nt, {
1770
1747
  key: 2,
1771
1748
  "input-type": "HSL",
1772
- "hsl-value": q,
1773
- onUpdateHslValue: c
1749
+ "hsl-value": X,
1750
+ onUpdateHslValue: o
1774
1751
  }, null, 8, ["hsl-value"])) : H("", !0),
1775
- n.showAlpha ? (m(), F(Ft, {
1752
+ n.showAlpha ? (m(), P(Ft, {
1776
1753
  key: 3,
1777
- modelValue: ne.value,
1754
+ modelValue: oe.value,
1778
1755
  "onUpdate:modelValue": [
1779
- e[8] || (e[8] = (l) => ne.value = l),
1780
- e[9] || (e[9] = (l) => Ue(l))
1756
+ e[8] || (e[8] = (l) => oe.value = l),
1757
+ e[9] || (e[9] = (l) => He(l))
1781
1758
  ]
1782
1759
  }, null, 8, ["modelValue"])) : H("", !0)
1783
1760
  ])) : H("", !0)
1784
1761
  ]),
1785
- e[12] || (e[12] = b("div", { class: "text-oc-text-400 text-sm my-3 font-medium font-inter" }, "Last used", -1)),
1786
- O.value.length > 0 && n.showColorList ? (m(), E("div", bl, [
1787
- (m(!0), E(pe, null, Ze(j.value, (l) => (m(), E("div", {
1762
+ e[12] || (e[12] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium font-inter" }, "Last used", -1)),
1763
+ O.value.length > 0 && n.showColorList ? (m(), E("div", yl, [
1764
+ (m(!0), E(ge, null, Ke(Z.value, (l) => (m(), E("div", {
1788
1765
  key: `color-${l}`,
1789
1766
  class: "ck-cp-color-item !w-[32px] !h-[32px]",
1790
- style: ee(`background:${l}`),
1791
- onClick: (i) => J(l)
1792
- }, null, 12, yl))), 128))
1767
+ style: te(`background:${l}`),
1768
+ onClick: (i) => se(l)
1769
+ }, null, 12, bl))), 128))
1793
1770
  ])) : H("", !0)
1794
1771
  ], 10, sl));
1795
1772
  }
@@ -1799,7 +1776,7 @@ const It = { key: 1 }, Vt = {
1799
1776
  }, Sl = {
1800
1777
  key: 0,
1801
1778
  class: "text-sm text-oc-text-400"
1802
- }, El = /* @__PURE__ */ bt({
1779
+ }, El = {
1803
1780
  __name: "OcOnboardingProgressbar",
1804
1781
  props: {
1805
1782
  title: {
@@ -1820,7 +1797,7 @@ const It = { key: 1 }, Vt = {
1820
1797
  }
1821
1798
  },
1822
1799
  setup(n) {
1823
- const V = n, r = be(() => ({
1800
+ const V = n, r = $e(() => ({
1824
1801
  grid: {
1825
1802
  containLabel: !1
1826
1803
  },
@@ -1849,23 +1826,23 @@ const It = { key: 1 }, Vt = {
1849
1826
  ]
1850
1827
  }));
1851
1828
  return (y, u) => (m(), E("div", kl, [
1852
- T(w(Ct), {
1829
+ L(w(Ct), {
1853
1830
  class: "w-[140px] bg-white rounded-full h-[140px]",
1854
1831
  "additional-options": r.value,
1855
1832
  "tooltip-formatter": () => null,
1856
1833
  "tooltip-value-formatter": () => null
1857
1834
  }, null, 8, ["additional-options"]),
1858
- b("div", $l, [
1859
- n.title ? (m(), E("span", wl, Pe(n.title), 1)) : H("", !0),
1860
- Ke(y.$slots, "description", {}, () => [
1861
- n.description ? (m(), E("span", Sl, Pe(n.description), 1)) : H("", !0)
1835
+ h("div", $l, [
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)
1862
1839
  ])
1863
1840
  ])
1864
1841
  ]));
1865
1842
  }
1866
- }), Ul = st(
1867
- () => import("./OcCodeBlock-uFQyGnLq.js")
1868
- ), Dl = st(
1843
+ }, Ul = it(
1844
+ () => import("./OcCodeBlock-B_LpoG2V.js")
1845
+ ), Dl = it(
1869
1846
  () => import("./OcLottieAnimation-BjY3rCjS.js")
1870
1847
  );
1871
1848
  export {