image-beautifier 1.0.2 → 1.0.4

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.
@@ -1,29 +1,31 @@
1
- var si = Object.defineProperty;
2
- var ni = (o, t, n) => t in o ? si(o, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[t] = n;
3
- var k = (o, t, n) => ni(o, typeof t != "symbol" ? t + "" : t, n);
4
- import yt, { useState as O, useMemo as me, useEffect as M, Children as it, cloneElement as ot, useRef as ue } from "react";
5
- import { ColorPicker as ai, Button as T, Dropdown as vt, Popover as ge, Divider as li, InputNumber as rt, Tooltip as F, Modal as ci, Switch as st, Input as di, Radio as L, Segmented as nt, ConfigProvider as fi, Popconfirm as pi, Drawer as ui, Slider as de, Upload as hi, message as mi } from "antd";
6
- import { observer as Y } from "mobx-react-lite";
7
- import { Camera as gi, Check as xi, Square as bi, Circle as wi, Slash as yi, MoveDownLeft as vi, Pencil as ji, Smile as Mi, Undo as Ci, Redo as Ai, ChevronRight as Ti, ChevronDown as Ni, ChevronUp as Si, RotateCcw as ki, ZoomIn as Ri, ZoomOut as Di, Hand as Hi, Crop as zi, FlipHorizontal2 as Ei, FlipVertical2 as Oi, Sunset as _i, Box as Yi, LayoutGrid as Ii, ImagePlus as Bi, Type as Pi, CodeXml as Wi, ClipboardPaste as Zi, ImagePlay as Gi, Maximize as Fi, ListCollapse as Li, ArrowUpRight as Ui, ArrowDownRight as Vi, ImageDown as Ji, Copy as qi, Settings2 as Xi, ChevronLeft as Qi, Pipette as $i, Trash2 as Ki, icons as at } from "lucide-react";
8
- import { TinyColor as eo } from "@ctrl/tinycolor";
9
- import { clsx as to } from "clsx";
10
- import { twMerge as io } from "tailwind-merge";
11
- import { makeAutoObservable as jt, toJS as Mt, action as oo } from "mobx";
12
- import ro from "@emoji-mart/data";
13
- import so from "@emoji-mart/react";
14
- import { Frame as no, Image as ao, Box as lo, Rect as De, Ellipse as co, Line as lt, Text as fo, Cursor as po, App as uo, ZoomEvent as ho, ResizeEvent as mo, DragEvent as ke } from "leafer-ui";
15
- import { addListener as go, removeListener as xo } from "resize-detector";
16
- import { Arrow as bo } from "@leafer-in/arrow";
17
- import { ScrollBar as wo } from "@leafer-in/scroll";
18
- import { tinykeys as Ct } from "tinykeys";
1
+ var hr = Object.defineProperty;
2
+ var pr = (i, t, n) => t in i ? hr(i, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[t] = n;
3
+ var R = (i, t, n) => pr(i, typeof t != "symbol" ? t + "" : t, n);
4
+ import kt, { useState as O, useMemo as le, useEffect as N, Children as ot, cloneElement as st, useRef as ne } from "react";
5
+ import { ColorPicker as ur, Button as k, Dropdown as At, Popover as xe, Divider as mr, InputNumber as nt, Tooltip as L, Modal as gr, Switch as at, Input as xr, Radio as P, Segmented as lt, ConfigProvider as Nt, Popconfirm as br, Drawer as wr, Slider as pe, Upload as yr, message as vr, theme as ct } from "antd";
6
+ import { observer as B } from "mobx-react-lite";
7
+ import { Camera as jr, Check as Mr, Square as Cr, Circle as kr, Slash as Ar, MoveDownLeft as Nr, Pencil as Tr, Smile as Sr, Undo as Rr, Redo as Dr, ChevronRight as Hr, ChevronDown as zr, ChevronUp as _r, RotateCcw as Er, ZoomIn as Or, ZoomOut as Br, Hand as Yr, Crop as Ir, FlipHorizontal2 as Pr, FlipVertical2 as Wr, Sunset as Zr, Box as Fr, LayoutGrid as Gr, ImagePlus as Lr, Type as Ur, CodeXml as Vr, ClipboardPaste as Jr, ImagePlay as qr, Maximize as Xr, ListCollapse as Qr, ArrowUpRight as $r, ArrowDownRight as Kr, ImageDown as ei, Copy as ti, Settings2 as ri, ChevronLeft as ii, Pipette as oi, Trash2 as si, Sun as ni, Moon as ai, icons as dt } from "lucide-react";
8
+ import { TinyColor as li } from "@ctrl/tinycolor";
9
+ import { clsx as ci } from "clsx";
10
+ import { twMerge as di } from "tailwind-merge";
11
+ import { makeAutoObservable as Tt, toJS as St, runInAction as fi, action as hi } from "mobx";
12
+ import { maxBy as pi } from "lodash";
13
+ import ui from "@emoji-mart/data";
14
+ import mi from "@emoji-mart/react";
15
+ import { Frame as gi, Rect as ae, Box as ft, Ellipse as ht, Line as pt, Text as xi, Cursor as bi, App as wi, ZoomEvent as yi, ResizeEvent as vi, PointerEvent as ji, DragEvent as De } from "leafer-ui";
16
+ import { addListener as Mi, removeListener as Ci } from "resize-detector";
17
+ import { Arrow as ki } from "@leafer-in/arrow";
18
+ import { ScrollBar as Ai } from "@leafer-in/scroll";
19
+ import { tinykeys as Rt } from "tinykeys";
19
20
  import "@leafer-in/editor";
20
21
  import "@leafer-in/view";
21
- import yo from "react-cropper";
22
- var fe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
23
- function vo(o) {
24
- return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
22
+ import { StyleProvider as Ni } from "@ant-design/cssinjs";
23
+ import Ti from "react-cropper";
24
+ var ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
25
+ function Si(i) {
26
+ return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
25
27
  }
26
- var He = { exports: {} }, oe = {};
28
+ var ze = { exports: {} }, ie = {};
27
29
  /**
28
30
  * @license React
29
31
  * react-jsx-runtime.production.min.js
@@ -33,21 +35,21 @@ var He = { exports: {} }, oe = {};
33
35
  * This source code is licensed under the MIT license found in the
34
36
  * LICENSE file in the root directory of this source tree.
35
37
  */
36
- var ct;
37
- function jo() {
38
- if (ct) return oe;
39
- ct = 1;
40
- var o = yt, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, a = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
41
- function d(f, u, h) {
42
- var g, y = {}, S = null, N = null;
43
- h !== void 0 && (S = "" + h), u.key !== void 0 && (S = "" + u.key), u.ref !== void 0 && (N = u.ref);
44
- for (g in u) s.call(u, g) && !l.hasOwnProperty(g) && (y[g] = u[g]);
45
- if (f && f.defaultProps) for (g in u = f.defaultProps, u) y[g] === void 0 && (y[g] = u[g]);
46
- return { $$typeof: t, type: f, key: S, ref: N, props: y, _owner: a.current };
38
+ var ut;
39
+ function Ri() {
40
+ if (ut) return ie;
41
+ ut = 1;
42
+ var i = kt, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, a = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
43
+ function h(f, d, p) {
44
+ var m, b = {}, C = null, A = null;
45
+ p !== void 0 && (C = "" + p), d.key !== void 0 && (C = "" + d.key), d.ref !== void 0 && (A = d.ref);
46
+ for (m in d) s.call(d, m) && !l.hasOwnProperty(m) && (b[m] = d[m]);
47
+ if (f && f.defaultProps) for (m in d = f.defaultProps, d) b[m] === void 0 && (b[m] = d[m]);
48
+ return { $$typeof: t, type: f, key: C, ref: A, props: b, _owner: a.current };
47
49
  }
48
- return oe.Fragment = n, oe.jsx = d, oe.jsxs = d, oe;
50
+ return ie.Fragment = n, ie.jsx = h, ie.jsxs = h, ie;
49
51
  }
50
- var re = {};
52
+ var oe = {};
51
53
  /**
52
54
  * @license React
53
55
  * react-jsx-runtime.development.js
@@ -57,61 +59,61 @@ var re = {};
57
59
  * This source code is licensed under the MIT license found in the
58
60
  * LICENSE file in the root directory of this source tree.
59
61
  */
60
- var dt;
61
- function Mo() {
62
- return dt || (dt = 1, process.env.NODE_ENV !== "production" && function() {
63
- var o = yt, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), f = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), N = Symbol.for("react.offscreen"), x = Symbol.iterator, v = "@@iterator";
64
- function H(i) {
65
- if (i === null || typeof i != "object")
62
+ var mt;
63
+ function Di() {
64
+ return mt || (mt = 1, process.env.NODE_ENV !== "production" && function() {
65
+ var i = kt, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), f = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), A = Symbol.for("react.offscreen"), x = Symbol.iterator, w = "@@iterator";
66
+ function S(r) {
67
+ if (r === null || typeof r != "object")
66
68
  return null;
67
- var c = x && i[x] || i[v];
69
+ var c = x && r[x] || r[w];
68
70
  return typeof c == "function" ? c : null;
69
71
  }
70
- var _ = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
71
- function E(i) {
72
+ var _ = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
73
+ function E(r) {
72
74
  {
73
- for (var c = arguments.length, p = new Array(c > 1 ? c - 1 : 0), m = 1; m < c; m++)
74
- p[m - 1] = arguments[m];
75
- be("error", i, p);
75
+ for (var c = arguments.length, u = new Array(c > 1 ? c - 1 : 0), g = 1; g < c; g++)
76
+ u[g - 1] = arguments[g];
77
+ ye("error", r, u);
76
78
  }
77
79
  }
78
- function be(i, c, p) {
80
+ function ye(r, c, u) {
79
81
  {
80
- var m = _.ReactDebugCurrentFrame, j = m.getStackAddendum();
81
- j !== "" && (c += "%s", p = p.concat([j]));
82
- var C = p.map(function(w) {
83
- return String(w);
82
+ var g = _.ReactDebugCurrentFrame, j = g.getStackAddendum();
83
+ j !== "" && (c += "%s", u = u.concat([j]));
84
+ var T = u.map(function(v) {
85
+ return String(v);
84
86
  });
85
- C.unshift("Warning: " + c), Function.prototype.apply.call(console[i], console, C);
87
+ T.unshift("Warning: " + c), Function.prototype.apply.call(console[r], console, T);
86
88
  }
87
89
  }
88
- var we = !1, $ = !1, R = !1, W = !1, U = !1, K;
90
+ var ve = !1, $ = !1, D = !1, F = !1, U = !1, K;
89
91
  K = Symbol.for("react.module.reference");
90
- function Rt(i) {
91
- return !!(typeof i == "string" || typeof i == "function" || i === s || i === l || U || i === a || i === h || i === g || W || i === N || we || $ || R || typeof i == "object" && i !== null && (i.$$typeof === S || i.$$typeof === y || i.$$typeof === d || i.$$typeof === f || i.$$typeof === u || // This needs to include all possible module reference object
92
+ function Bt(r) {
93
+ return !!(typeof r == "string" || typeof r == "function" || r === s || r === l || U || r === a || r === p || r === m || F || r === A || ve || $ || D || typeof r == "object" && r !== null && (r.$$typeof === C || r.$$typeof === b || r.$$typeof === h || r.$$typeof === f || r.$$typeof === d || // This needs to include all possible module reference object
92
94
  // types supported by any Flight configuration anywhere since
93
95
  // we don't know which Flight build this will end up being used
94
96
  // with.
95
- i.$$typeof === K || i.getModuleId !== void 0));
97
+ r.$$typeof === K || r.getModuleId !== void 0));
96
98
  }
97
- function Dt(i, c, p) {
98
- var m = i.displayName;
99
- if (m)
100
- return m;
99
+ function Yt(r, c, u) {
100
+ var g = r.displayName;
101
+ if (g)
102
+ return g;
101
103
  var j = c.displayName || c.name || "";
102
- return j !== "" ? p + "(" + j + ")" : p;
104
+ return j !== "" ? u + "(" + j + ")" : u;
103
105
  }
104
- function ze(i) {
105
- return i.displayName || "Context";
106
+ function Ee(r) {
107
+ return r.displayName || "Context";
106
108
  }
107
- function Z(i) {
108
- if (i == null)
109
+ function G(r) {
110
+ if (r == null)
109
111
  return null;
110
- if (typeof i.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
111
- return i.displayName || i.name || null;
112
- if (typeof i == "string")
113
- return i;
114
- switch (i) {
112
+ if (typeof r.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
113
+ return r.displayName || r.name || null;
114
+ if (typeof r == "string")
115
+ return r;
116
+ switch (r) {
115
117
  case s:
116
118
  return "Fragment";
117
119
  case n:
@@ -120,28 +122,28 @@ function Mo() {
120
122
  return "Profiler";
121
123
  case a:
122
124
  return "StrictMode";
123
- case h:
125
+ case p:
124
126
  return "Suspense";
125
- case g:
127
+ case m:
126
128
  return "SuspenseList";
127
129
  }
128
- if (typeof i == "object")
129
- switch (i.$$typeof) {
130
+ if (typeof r == "object")
131
+ switch (r.$$typeof) {
130
132
  case f:
131
- var c = i;
132
- return ze(c) + ".Consumer";
133
+ var c = r;
134
+ return Ee(c) + ".Consumer";
135
+ case h:
136
+ var u = r;
137
+ return Ee(u._context) + ".Provider";
133
138
  case d:
134
- var p = i;
135
- return ze(p._context) + ".Provider";
136
- case u:
137
- return Dt(i, i.render, "ForwardRef");
138
- case y:
139
- var m = i.displayName || null;
140
- return m !== null ? m : Z(i.type) || "Memo";
141
- case S: {
142
- var j = i, C = j._payload, w = j._init;
139
+ return Yt(r, r.render, "ForwardRef");
140
+ case b:
141
+ var g = r.displayName || null;
142
+ return g !== null ? g : G(r.type) || "Memo";
143
+ case C: {
144
+ var j = r, T = j._payload, v = j._init;
143
145
  try {
144
- return Z(w(C));
146
+ return G(v(T));
145
147
  } catch {
146
148
  return null;
147
149
  }
@@ -149,570 +151,572 @@ function Mo() {
149
151
  }
150
152
  return null;
151
153
  }
152
- var V = Object.assign, ee = 0, Ee, Oe, _e, Ye, Ie, Be, Pe;
153
- function We() {
154
+ var V = Object.assign, ee = 0, Oe, Be, Ye, Ie, Pe, We, Ze;
155
+ function Fe() {
154
156
  }
155
- We.__reactDisabledLog = !0;
156
- function Ht() {
157
+ Fe.__reactDisabledLog = !0;
158
+ function It() {
157
159
  {
158
160
  if (ee === 0) {
159
- Ee = console.log, Oe = console.info, _e = console.warn, Ye = console.error, Ie = console.group, Be = console.groupCollapsed, Pe = console.groupEnd;
160
- var i = {
161
+ Oe = console.log, Be = console.info, Ye = console.warn, Ie = console.error, Pe = console.group, We = console.groupCollapsed, Ze = console.groupEnd;
162
+ var r = {
161
163
  configurable: !0,
162
164
  enumerable: !0,
163
- value: We,
165
+ value: Fe,
164
166
  writable: !0
165
167
  };
166
168
  Object.defineProperties(console, {
167
- info: i,
168
- log: i,
169
- warn: i,
170
- error: i,
171
- group: i,
172
- groupCollapsed: i,
173
- groupEnd: i
169
+ info: r,
170
+ log: r,
171
+ warn: r,
172
+ error: r,
173
+ group: r,
174
+ groupCollapsed: r,
175
+ groupEnd: r
174
176
  });
175
177
  }
176
178
  ee++;
177
179
  }
178
180
  }
179
- function zt() {
181
+ function Pt() {
180
182
  {
181
183
  if (ee--, ee === 0) {
182
- var i = {
184
+ var r = {
183
185
  configurable: !0,
184
186
  enumerable: !0,
185
187
  writable: !0
186
188
  };
187
189
  Object.defineProperties(console, {
188
- log: V({}, i, {
189
- value: Ee
190
- }),
191
- info: V({}, i, {
190
+ log: V({}, r, {
192
191
  value: Oe
193
192
  }),
194
- warn: V({}, i, {
195
- value: _e
193
+ info: V({}, r, {
194
+ value: Be
196
195
  }),
197
- error: V({}, i, {
196
+ warn: V({}, r, {
198
197
  value: Ye
199
198
  }),
200
- group: V({}, i, {
199
+ error: V({}, r, {
201
200
  value: Ie
202
201
  }),
203
- groupCollapsed: V({}, i, {
204
- value: Be
205
- }),
206
- groupEnd: V({}, i, {
202
+ group: V({}, r, {
207
203
  value: Pe
204
+ }),
205
+ groupCollapsed: V({}, r, {
206
+ value: We
207
+ }),
208
+ groupEnd: V({}, r, {
209
+ value: Ze
208
210
  })
209
211
  });
210
212
  }
211
213
  ee < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
212
214
  }
213
215
  }
214
- var ye = _.ReactCurrentDispatcher, ve;
215
- function ne(i, c, p) {
216
+ var je = _.ReactCurrentDispatcher, Me;
217
+ function ce(r, c, u) {
216
218
  {
217
- if (ve === void 0)
219
+ if (Me === void 0)
218
220
  try {
219
221
  throw Error();
220
222
  } catch (j) {
221
- var m = j.stack.trim().match(/\n( *(at )?)/);
222
- ve = m && m[1] || "";
223
+ var g = j.stack.trim().match(/\n( *(at )?)/);
224
+ Me = g && g[1] || "";
223
225
  }
224
226
  return `
225
- ` + ve + i;
227
+ ` + Me + r;
226
228
  }
227
229
  }
228
- var je = !1, ae;
230
+ var Ce = !1, de;
229
231
  {
230
- var Et = typeof WeakMap == "function" ? WeakMap : Map;
231
- ae = new Et();
232
+ var Wt = typeof WeakMap == "function" ? WeakMap : Map;
233
+ de = new Wt();
232
234
  }
233
- function Ze(i, c) {
234
- if (!i || je)
235
+ function Ge(r, c) {
236
+ if (!r || Ce)
235
237
  return "";
236
238
  {
237
- var p = ae.get(i);
238
- if (p !== void 0)
239
- return p;
239
+ var u = de.get(r);
240
+ if (u !== void 0)
241
+ return u;
240
242
  }
241
- var m;
242
- je = !0;
243
+ var g;
244
+ Ce = !0;
243
245
  var j = Error.prepareStackTrace;
244
246
  Error.prepareStackTrace = void 0;
245
- var C;
246
- C = ye.current, ye.current = null, Ht();
247
+ var T;
248
+ T = je.current, je.current = null, It();
247
249
  try {
248
250
  if (c) {
249
- var w = function() {
251
+ var v = function() {
250
252
  throw Error();
251
253
  };
252
- if (Object.defineProperty(w.prototype, "props", {
254
+ if (Object.defineProperty(v.prototype, "props", {
253
255
  set: function() {
254
256
  throw Error();
255
257
  }
256
258
  }), typeof Reflect == "object" && Reflect.construct) {
257
259
  try {
258
- Reflect.construct(w, []);
259
- } catch (B) {
260
- m = B;
260
+ Reflect.construct(v, []);
261
+ } catch (I) {
262
+ g = I;
261
263
  }
262
- Reflect.construct(i, [], w);
264
+ Reflect.construct(r, [], v);
263
265
  } else {
264
266
  try {
265
- w.call();
266
- } catch (B) {
267
- m = B;
267
+ v.call();
268
+ } catch (I) {
269
+ g = I;
268
270
  }
269
- i.call(w.prototype);
271
+ r.call(v.prototype);
270
272
  }
271
273
  } else {
272
274
  try {
273
275
  throw Error();
274
- } catch (B) {
275
- m = B;
276
+ } catch (I) {
277
+ g = I;
276
278
  }
277
- i();
279
+ r();
278
280
  }
279
- } catch (B) {
280
- if (B && m && typeof B.stack == "string") {
281
- for (var b = B.stack.split(`
282
- `), I = m.stack.split(`
283
- `), D = b.length - 1, z = I.length - 1; D >= 1 && z >= 0 && b[D] !== I[z]; )
281
+ } catch (I) {
282
+ if (I && g && typeof I.stack == "string") {
283
+ for (var y = I.stack.split(`
284
+ `), Y = g.stack.split(`
285
+ `), H = y.length - 1, z = Y.length - 1; H >= 1 && z >= 0 && y[H] !== Y[z]; )
284
286
  z--;
285
- for (; D >= 1 && z >= 0; D--, z--)
286
- if (b[D] !== I[z]) {
287
- if (D !== 1 || z !== 1)
287
+ for (; H >= 1 && z >= 0; H--, z--)
288
+ if (y[H] !== Y[z]) {
289
+ if (H !== 1 || z !== 1)
288
290
  do
289
- if (D--, z--, z < 0 || b[D] !== I[z]) {
290
- var P = `
291
- ` + b[D].replace(" at new ", " at ");
292
- return i.displayName && P.includes("<anonymous>") && (P = P.replace("<anonymous>", i.displayName)), typeof i == "function" && ae.set(i, P), P;
291
+ if (H--, z--, z < 0 || y[H] !== Y[z]) {
292
+ var W = `
293
+ ` + y[H].replace(" at new ", " at ");
294
+ return r.displayName && W.includes("<anonymous>") && (W = W.replace("<anonymous>", r.displayName)), typeof r == "function" && de.set(r, W), W;
293
295
  }
294
- while (D >= 1 && z >= 0);
296
+ while (H >= 1 && z >= 0);
295
297
  break;
296
298
  }
297
299
  }
298
300
  } finally {
299
- je = !1, ye.current = C, zt(), Error.prepareStackTrace = j;
301
+ Ce = !1, je.current = T, Pt(), Error.prepareStackTrace = j;
300
302
  }
301
- var X = i ? i.displayName || i.name : "", J = X ? ne(X) : "";
302
- return typeof i == "function" && ae.set(i, J), J;
303
+ var X = r ? r.displayName || r.name : "", J = X ? ce(X) : "";
304
+ return typeof r == "function" && de.set(r, J), J;
303
305
  }
304
- function Ot(i, c, p) {
305
- return Ze(i, !1);
306
+ function Zt(r, c, u) {
307
+ return Ge(r, !1);
306
308
  }
307
- function _t(i) {
308
- var c = i.prototype;
309
+ function Ft(r) {
310
+ var c = r.prototype;
309
311
  return !!(c && c.isReactComponent);
310
312
  }
311
- function le(i, c, p) {
312
- if (i == null)
313
+ function fe(r, c, u) {
314
+ if (r == null)
313
315
  return "";
314
- if (typeof i == "function")
315
- return Ze(i, _t(i));
316
- if (typeof i == "string")
317
- return ne(i);
318
- switch (i) {
319
- case h:
320
- return ne("Suspense");
321
- case g:
322
- return ne("SuspenseList");
316
+ if (typeof r == "function")
317
+ return Ge(r, Ft(r));
318
+ if (typeof r == "string")
319
+ return ce(r);
320
+ switch (r) {
321
+ case p:
322
+ return ce("Suspense");
323
+ case m:
324
+ return ce("SuspenseList");
323
325
  }
324
- if (typeof i == "object")
325
- switch (i.$$typeof) {
326
- case u:
327
- return Ot(i.render);
328
- case y:
329
- return le(i.type, c, p);
330
- case S: {
331
- var m = i, j = m._payload, C = m._init;
326
+ if (typeof r == "object")
327
+ switch (r.$$typeof) {
328
+ case d:
329
+ return Zt(r.render);
330
+ case b:
331
+ return fe(r.type, c, u);
332
+ case C: {
333
+ var g = r, j = g._payload, T = g._init;
332
334
  try {
333
- return le(C(j), c, p);
335
+ return fe(T(j), c, u);
334
336
  } catch {
335
337
  }
336
338
  }
337
339
  }
338
340
  return "";
339
341
  }
340
- var te = Object.prototype.hasOwnProperty, Ge = {}, Fe = _.ReactDebugCurrentFrame;
341
- function ce(i) {
342
- if (i) {
343
- var c = i._owner, p = le(i.type, i._source, c ? c.type : null);
344
- Fe.setExtraStackFrame(p);
342
+ var te = Object.prototype.hasOwnProperty, Le = {}, Ue = _.ReactDebugCurrentFrame;
343
+ function he(r) {
344
+ if (r) {
345
+ var c = r._owner, u = fe(r.type, r._source, c ? c.type : null);
346
+ Ue.setExtraStackFrame(u);
345
347
  } else
346
- Fe.setExtraStackFrame(null);
348
+ Ue.setExtraStackFrame(null);
347
349
  }
348
- function Yt(i, c, p, m, j) {
350
+ function Gt(r, c, u, g, j) {
349
351
  {
350
- var C = Function.call.bind(te);
351
- for (var w in i)
352
- if (C(i, w)) {
353
- var b = void 0;
352
+ var T = Function.call.bind(te);
353
+ for (var v in r)
354
+ if (T(r, v)) {
355
+ var y = void 0;
354
356
  try {
355
- if (typeof i[w] != "function") {
356
- var I = Error((m || "React class") + ": " + p + " type `" + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[w] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
357
- throw I.name = "Invariant Violation", I;
357
+ if (typeof r[v] != "function") {
358
+ var Y = Error((g || "React class") + ": " + u + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
359
+ throw Y.name = "Invariant Violation", Y;
358
360
  }
359
- b = i[w](c, w, m, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
360
- } catch (D) {
361
- b = D;
361
+ y = r[v](c, v, g, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
362
+ } catch (H) {
363
+ y = H;
362
364
  }
363
- b && !(b instanceof Error) && (ce(j), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", m || "React class", p, w, typeof b), ce(null)), b instanceof Error && !(b.message in Ge) && (Ge[b.message] = !0, ce(j), E("Failed %s type: %s", p, b.message), ce(null));
365
+ y && !(y instanceof Error) && (he(j), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", u, v, typeof y), he(null)), y instanceof Error && !(y.message in Le) && (Le[y.message] = !0, he(j), E("Failed %s type: %s", u, y.message), he(null));
364
366
  }
365
367
  }
366
368
  }
367
- var It = Array.isArray;
368
- function Me(i) {
369
- return It(i);
369
+ var Lt = Array.isArray;
370
+ function ke(r) {
371
+ return Lt(r);
370
372
  }
371
- function Bt(i) {
373
+ function Ut(r) {
372
374
  {
373
- var c = typeof Symbol == "function" && Symbol.toStringTag, p = c && i[Symbol.toStringTag] || i.constructor.name || "Object";
374
- return p;
375
+ var c = typeof Symbol == "function" && Symbol.toStringTag, u = c && r[Symbol.toStringTag] || r.constructor.name || "Object";
376
+ return u;
375
377
  }
376
378
  }
377
- function Pt(i) {
379
+ function Vt(r) {
378
380
  try {
379
- return Le(i), !1;
381
+ return Ve(r), !1;
380
382
  } catch {
381
383
  return !0;
382
384
  }
383
385
  }
384
- function Le(i) {
385
- return "" + i;
386
+ function Ve(r) {
387
+ return "" + r;
386
388
  }
387
- function Ue(i) {
388
- if (Pt(i))
389
- return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Bt(i)), Le(i);
389
+ function Je(r) {
390
+ if (Vt(r))
391
+ return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ut(r)), Ve(r);
390
392
  }
391
- var ie = _.ReactCurrentOwner, Wt = {
393
+ var re = _.ReactCurrentOwner, Jt = {
392
394
  key: !0,
393
395
  ref: !0,
394
396
  __self: !0,
395
397
  __source: !0
396
- }, Ve, Je, Ce;
397
- Ce = {};
398
- function Zt(i) {
399
- if (te.call(i, "ref")) {
400
- var c = Object.getOwnPropertyDescriptor(i, "ref").get;
398
+ }, qe, Xe, Ae;
399
+ Ae = {};
400
+ function qt(r) {
401
+ if (te.call(r, "ref")) {
402
+ var c = Object.getOwnPropertyDescriptor(r, "ref").get;
401
403
  if (c && c.isReactWarning)
402
404
  return !1;
403
405
  }
404
- return i.ref !== void 0;
406
+ return r.ref !== void 0;
405
407
  }
406
- function Gt(i) {
407
- if (te.call(i, "key")) {
408
- var c = Object.getOwnPropertyDescriptor(i, "key").get;
408
+ function Xt(r) {
409
+ if (te.call(r, "key")) {
410
+ var c = Object.getOwnPropertyDescriptor(r, "key").get;
409
411
  if (c && c.isReactWarning)
410
412
  return !1;
411
413
  }
412
- return i.key !== void 0;
414
+ return r.key !== void 0;
413
415
  }
414
- function Ft(i, c) {
415
- if (typeof i.ref == "string" && ie.current && c && ie.current.stateNode !== c) {
416
- var p = Z(ie.current.type);
417
- Ce[p] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Z(ie.current.type), i.ref), Ce[p] = !0);
416
+ function Qt(r, c) {
417
+ if (typeof r.ref == "string" && re.current && c && re.current.stateNode !== c) {
418
+ var u = G(re.current.type);
419
+ Ae[u] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', G(re.current.type), r.ref), Ae[u] = !0);
418
420
  }
419
421
  }
420
- function Lt(i, c) {
422
+ function $t(r, c) {
421
423
  {
422
- var p = function() {
423
- Ve || (Ve = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
424
+ var u = function() {
425
+ qe || (qe = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
424
426
  };
425
- p.isReactWarning = !0, Object.defineProperty(i, "key", {
426
- get: p,
427
+ u.isReactWarning = !0, Object.defineProperty(r, "key", {
428
+ get: u,
427
429
  configurable: !0
428
430
  });
429
431
  }
430
432
  }
431
- function Ut(i, c) {
433
+ function Kt(r, c) {
432
434
  {
433
- var p = function() {
434
- Je || (Je = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
435
+ var u = function() {
436
+ Xe || (Xe = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
435
437
  };
436
- p.isReactWarning = !0, Object.defineProperty(i, "ref", {
437
- get: p,
438
+ u.isReactWarning = !0, Object.defineProperty(r, "ref", {
439
+ get: u,
438
440
  configurable: !0
439
441
  });
440
442
  }
441
443
  }
442
- var Vt = function(i, c, p, m, j, C, w) {
443
- var b = {
444
+ var er = function(r, c, u, g, j, T, v) {
445
+ var y = {
444
446
  // This tag allows us to uniquely identify this as a React Element
445
447
  $$typeof: t,
446
448
  // Built-in properties that belong on the element
447
- type: i,
449
+ type: r,
448
450
  key: c,
449
- ref: p,
450
- props: w,
451
+ ref: u,
452
+ props: v,
451
453
  // Record the component responsible for creating this element.
452
- _owner: C
454
+ _owner: T
453
455
  };
454
- return b._store = {}, Object.defineProperty(b._store, "validated", {
456
+ return y._store = {}, Object.defineProperty(y._store, "validated", {
455
457
  configurable: !1,
456
458
  enumerable: !1,
457
459
  writable: !0,
458
460
  value: !1
459
- }), Object.defineProperty(b, "_self", {
461
+ }), Object.defineProperty(y, "_self", {
460
462
  configurable: !1,
461
463
  enumerable: !1,
462
464
  writable: !1,
463
- value: m
464
- }), Object.defineProperty(b, "_source", {
465
+ value: g
466
+ }), Object.defineProperty(y, "_source", {
465
467
  configurable: !1,
466
468
  enumerable: !1,
467
469
  writable: !1,
468
470
  value: j
469
- }), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
471
+ }), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y;
470
472
  };
471
- function Jt(i, c, p, m, j) {
473
+ function tr(r, c, u, g, j) {
472
474
  {
473
- var C, w = {}, b = null, I = null;
474
- p !== void 0 && (Ue(p), b = "" + p), Gt(c) && (Ue(c.key), b = "" + c.key), Zt(c) && (I = c.ref, Ft(c, j));
475
- for (C in c)
476
- te.call(c, C) && !Wt.hasOwnProperty(C) && (w[C] = c[C]);
477
- if (i && i.defaultProps) {
478
- var D = i.defaultProps;
479
- for (C in D)
480
- w[C] === void 0 && (w[C] = D[C]);
475
+ var T, v = {}, y = null, Y = null;
476
+ u !== void 0 && (Je(u), y = "" + u), Xt(c) && (Je(c.key), y = "" + c.key), qt(c) && (Y = c.ref, Qt(c, j));
477
+ for (T in c)
478
+ te.call(c, T) && !Jt.hasOwnProperty(T) && (v[T] = c[T]);
479
+ if (r && r.defaultProps) {
480
+ var H = r.defaultProps;
481
+ for (T in H)
482
+ v[T] === void 0 && (v[T] = H[T]);
481
483
  }
482
- if (b || I) {
483
- var z = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
484
- b && Lt(w, z), I && Ut(w, z);
484
+ if (y || Y) {
485
+ var z = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
486
+ y && $t(v, z), Y && Kt(v, z);
485
487
  }
486
- return Vt(i, b, I, j, m, ie.current, w);
488
+ return er(r, y, Y, j, g, re.current, v);
487
489
  }
488
490
  }
489
- var Ae = _.ReactCurrentOwner, qe = _.ReactDebugCurrentFrame;
490
- function q(i) {
491
- if (i) {
492
- var c = i._owner, p = le(i.type, i._source, c ? c.type : null);
493
- qe.setExtraStackFrame(p);
491
+ var Ne = _.ReactCurrentOwner, Qe = _.ReactDebugCurrentFrame;
492
+ function q(r) {
493
+ if (r) {
494
+ var c = r._owner, u = fe(r.type, r._source, c ? c.type : null);
495
+ Qe.setExtraStackFrame(u);
494
496
  } else
495
- qe.setExtraStackFrame(null);
497
+ Qe.setExtraStackFrame(null);
496
498
  }
497
499
  var Te;
498
500
  Te = !1;
499
- function Ne(i) {
500
- return typeof i == "object" && i !== null && i.$$typeof === t;
501
+ function Se(r) {
502
+ return typeof r == "object" && r !== null && r.$$typeof === t;
501
503
  }
502
- function Xe() {
504
+ function $e() {
503
505
  {
504
- if (Ae.current) {
505
- var i = Z(Ae.current.type);
506
- if (i)
506
+ if (Ne.current) {
507
+ var r = G(Ne.current.type);
508
+ if (r)
507
509
  return `
508
510
 
509
- Check the render method of \`` + i + "`.";
511
+ Check the render method of \`` + r + "`.";
510
512
  }
511
513
  return "";
512
514
  }
513
515
  }
514
- function qt(i) {
516
+ function rr(r) {
515
517
  return "";
516
518
  }
517
- var Qe = {};
518
- function Xt(i) {
519
+ var Ke = {};
520
+ function ir(r) {
519
521
  {
520
- var c = Xe();
522
+ var c = $e();
521
523
  if (!c) {
522
- var p = typeof i == "string" ? i : i.displayName || i.name;
523
- p && (c = `
524
+ var u = typeof r == "string" ? r : r.displayName || r.name;
525
+ u && (c = `
524
526
 
525
- Check the top-level render call using <` + p + ">.");
527
+ Check the top-level render call using <` + u + ">.");
526
528
  }
527
529
  return c;
528
530
  }
529
531
  }
530
- function $e(i, c) {
532
+ function et(r, c) {
531
533
  {
532
- if (!i._store || i._store.validated || i.key != null)
534
+ if (!r._store || r._store.validated || r.key != null)
533
535
  return;
534
- i._store.validated = !0;
535
- var p = Xt(c);
536
- if (Qe[p])
536
+ r._store.validated = !0;
537
+ var u = ir(c);
538
+ if (Ke[u])
537
539
  return;
538
- Qe[p] = !0;
539
- var m = "";
540
- i && i._owner && i._owner !== Ae.current && (m = " It was passed a child from " + Z(i._owner.type) + "."), q(i), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, m), q(null);
540
+ Ke[u] = !0;
541
+ var g = "";
542
+ r && r._owner && r._owner !== Ne.current && (g = " It was passed a child from " + G(r._owner.type) + "."), q(r), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, g), q(null);
541
543
  }
542
544
  }
543
- function Ke(i, c) {
545
+ function tt(r, c) {
544
546
  {
545
- if (typeof i != "object")
547
+ if (typeof r != "object")
546
548
  return;
547
- if (Me(i))
548
- for (var p = 0; p < i.length; p++) {
549
- var m = i[p];
550
- Ne(m) && $e(m, c);
549
+ if (ke(r))
550
+ for (var u = 0; u < r.length; u++) {
551
+ var g = r[u];
552
+ Se(g) && et(g, c);
551
553
  }
552
- else if (Ne(i))
553
- i._store && (i._store.validated = !0);
554
- else if (i) {
555
- var j = H(i);
556
- if (typeof j == "function" && j !== i.entries)
557
- for (var C = j.call(i), w; !(w = C.next()).done; )
558
- Ne(w.value) && $e(w.value, c);
554
+ else if (Se(r))
555
+ r._store && (r._store.validated = !0);
556
+ else if (r) {
557
+ var j = S(r);
558
+ if (typeof j == "function" && j !== r.entries)
559
+ for (var T = j.call(r), v; !(v = T.next()).done; )
560
+ Se(v.value) && et(v.value, c);
559
561
  }
560
562
  }
561
563
  }
562
- function Qt(i) {
564
+ function or(r) {
563
565
  {
564
- var c = i.type;
566
+ var c = r.type;
565
567
  if (c == null || typeof c == "string")
566
568
  return;
567
- var p;
569
+ var u;
568
570
  if (typeof c == "function")
569
- p = c.propTypes;
570
- else if (typeof c == "object" && (c.$$typeof === u || // Note: Memo only checks outer props here.
571
+ u = c.propTypes;
572
+ else if (typeof c == "object" && (c.$$typeof === d || // Note: Memo only checks outer props here.
571
573
  // Inner props are checked in the reconciler.
572
- c.$$typeof === y))
573
- p = c.propTypes;
574
+ c.$$typeof === b))
575
+ u = c.propTypes;
574
576
  else
575
577
  return;
576
- if (p) {
577
- var m = Z(c);
578
- Yt(p, i.props, "prop", m, i);
578
+ if (u) {
579
+ var g = G(c);
580
+ Gt(u, r.props, "prop", g, r);
579
581
  } else if (c.PropTypes !== void 0 && !Te) {
580
582
  Te = !0;
581
- var j = Z(c);
583
+ var j = G(c);
582
584
  E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j || "Unknown");
583
585
  }
584
586
  typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
585
587
  }
586
588
  }
587
- function $t(i) {
589
+ function sr(r) {
588
590
  {
589
- for (var c = Object.keys(i.props), p = 0; p < c.length; p++) {
590
- var m = c[p];
591
- if (m !== "children" && m !== "key") {
592
- q(i), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", m), q(null);
591
+ for (var c = Object.keys(r.props), u = 0; u < c.length; u++) {
592
+ var g = c[u];
593
+ if (g !== "children" && g !== "key") {
594
+ q(r), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), q(null);
593
595
  break;
594
596
  }
595
597
  }
596
- i.ref !== null && (q(i), E("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
598
+ r.ref !== null && (q(r), E("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
597
599
  }
598
600
  }
599
- var et = {};
600
- function tt(i, c, p, m, j, C) {
601
+ var rt = {};
602
+ function it(r, c, u, g, j, T) {
601
603
  {
602
- var w = Rt(i);
603
- if (!w) {
604
- var b = "";
605
- (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
606
- var I = qt();
607
- I ? b += I : b += Xe();
608
- var D;
609
- i === null ? D = "null" : Me(i) ? D = "array" : i !== void 0 && i.$$typeof === t ? (D = "<" + (Z(i.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : D = typeof i, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, b);
604
+ var v = Bt(r);
605
+ if (!v) {
606
+ var y = "";
607
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (y += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
608
+ var Y = rr();
609
+ Y ? y += Y : y += $e();
610
+ var H;
611
+ r === null ? H = "null" : ke(r) ? H = "array" : r !== void 0 && r.$$typeof === t ? (H = "<" + (G(r.type) || "Unknown") + " />", y = " Did you accidentally export a JSX literal instead of a component?") : H = typeof r, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", H, y);
610
612
  }
611
- var z = Jt(i, c, p, j, C);
613
+ var z = tr(r, c, u, j, T);
612
614
  if (z == null)
613
615
  return z;
614
- if (w) {
615
- var P = c.children;
616
- if (P !== void 0)
617
- if (m)
618
- if (Me(P)) {
619
- for (var X = 0; X < P.length; X++)
620
- Ke(P[X], i);
621
- Object.freeze && Object.freeze(P);
616
+ if (v) {
617
+ var W = c.children;
618
+ if (W !== void 0)
619
+ if (g)
620
+ if (ke(W)) {
621
+ for (var X = 0; X < W.length; X++)
622
+ tt(W[X], r);
623
+ Object.freeze && Object.freeze(W);
622
624
  } else
623
625
  E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
624
626
  else
625
- Ke(P, i);
627
+ tt(W, r);
626
628
  }
627
629
  if (te.call(c, "key")) {
628
- var J = Z(i), B = Object.keys(c).filter(function(ri) {
629
- return ri !== "key";
630
- }), Se = B.length > 0 ? "{key: someKey, " + B.join(": ..., ") + ": ...}" : "{key: someKey}";
631
- if (!et[J + Se]) {
632
- var oi = B.length > 0 ? "{" + B.join(": ..., ") + ": ...}" : "{}";
630
+ var J = G(r), I = Object.keys(c).filter(function(fr) {
631
+ return fr !== "key";
632
+ }), Re = I.length > 0 ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}";
633
+ if (!rt[J + Re]) {
634
+ var dr = I.length > 0 ? "{" + I.join(": ..., ") + ": ...}" : "{}";
633
635
  E(`A props object containing a "key" prop is being spread into JSX:
634
636
  let props = %s;
635
637
  <%s {...props} />
636
638
  React keys must be passed directly to JSX without using spread:
637
639
  let props = %s;
638
- <%s key={someKey} {...props} />`, Se, J, oi, J), et[J + Se] = !0;
640
+ <%s key={someKey} {...props} />`, Re, J, dr, J), rt[J + Re] = !0;
639
641
  }
640
642
  }
641
- return i === s ? $t(z) : Qt(z), z;
643
+ return r === s ? sr(z) : or(z), z;
642
644
  }
643
645
  }
644
- function Kt(i, c, p) {
645
- return tt(i, c, p, !0);
646
+ function nr(r, c, u) {
647
+ return it(r, c, u, !0);
646
648
  }
647
- function ei(i, c, p) {
648
- return tt(i, c, p, !1);
649
+ function ar(r, c, u) {
650
+ return it(r, c, u, !1);
649
651
  }
650
- var ti = ei, ii = Kt;
651
- re.Fragment = s, re.jsx = ti, re.jsxs = ii;
652
- }()), re;
652
+ var lr = ar, cr = nr;
653
+ oe.Fragment = s, oe.jsx = lr, oe.jsxs = cr;
654
+ }()), oe;
653
655
  }
654
- process.env.NODE_ENV === "production" ? He.exports = jo() : He.exports = Mo();
655
- var e = He.exports;
656
- const A = {
657
- Camera: gi,
658
- Check: xi,
659
- Square: bi,
660
- Circle: wi,
661
- Slash: yi,
662
- MoveDownLeft: vi,
663
- Pencil: ji,
664
- Smile: Mi,
665
- Undo: Ci,
666
- Redo: Ai,
667
- ChevronRight: Ti,
668
- ChevronDown: Ni,
669
- ChevronUp: Si,
670
- RotateCcw: ki,
671
- ZoomIn: Ri,
672
- ZoomOut: Di,
673
- Hand: Hi,
674
- Crop: zi,
675
- FlipHorizontal2: Ei,
676
- FlipVertical2: Oi,
677
- Sunset: _i,
678
- Box: Yi,
679
- LayoutGrid: Ii,
680
- ImagePlus: Bi,
681
- Type: Pi,
682
- CodeXml: Wi,
683
- ClipboardPaste: Zi,
684
- ImagePlay: Gi,
685
- Maximize: Fi,
686
- ListCollapse: Li,
687
- ArrowUpRight: Ui,
688
- ArrowDownRight: Vi,
689
- ImageDown: Ji,
690
- Copy: qi,
691
- Settings2: Xi,
692
- ChevronLeft: Qi,
693
- Pipette: $i,
694
- Trash2: Ki
695
- }, xe = (o) => {
656
+ process.env.NODE_ENV === "production" ? ze.exports = Ri() : ze.exports = Di();
657
+ var e = ze.exports;
658
+ const M = {
659
+ Camera: jr,
660
+ Check: Mr,
661
+ Square: Cr,
662
+ Circle: kr,
663
+ Slash: Ar,
664
+ MoveDownLeft: Nr,
665
+ Pencil: Tr,
666
+ Smile: Sr,
667
+ Undo: Rr,
668
+ Redo: Dr,
669
+ ChevronRight: Hr,
670
+ ChevronDown: zr,
671
+ ChevronUp: _r,
672
+ RotateCcw: Er,
673
+ ZoomIn: Or,
674
+ ZoomOut: Br,
675
+ Hand: Yr,
676
+ Crop: Ir,
677
+ FlipHorizontal2: Pr,
678
+ FlipVertical2: Wr,
679
+ Sunset: Zr,
680
+ Box: Fr,
681
+ LayoutGrid: Gr,
682
+ ImagePlus: Lr,
683
+ Type: Ur,
684
+ CodeXml: Vr,
685
+ ClipboardPaste: Jr,
686
+ ImagePlay: qr,
687
+ Maximize: Xr,
688
+ ListCollapse: Qr,
689
+ ArrowUpRight: $r,
690
+ ArrowDownRight: Kr,
691
+ ImageDown: ei,
692
+ Copy: ti,
693
+ Settings2: ri,
694
+ ChevronLeft: ii,
695
+ Pipette: oi,
696
+ Trash2: si,
697
+ Sun: ni,
698
+ Moon: ai
699
+ }, be = (i) => {
696
700
  const t = () => {
697
701
  if (!window.EyeDropper) return;
698
702
  new EyeDropper().open().then((s) => {
699
703
  const a = s.sRGBHex;
700
- o != null && o.onChange && o.onChange(new eo(a));
704
+ i != null && i.onChange && i.onChange(new li(a));
701
705
  }).catch((s) => {
702
706
  console.log(s);
703
707
  });
704
708
  };
705
709
  return /* @__PURE__ */ e.jsx(
706
- ai,
710
+ ur,
707
711
  {
708
- ...o,
712
+ ...i,
709
713
  panelRender: (n) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
710
- window.EyeDropper && /* @__PURE__ */ e.jsx("div", { className: "mb-1", children: /* @__PURE__ */ e.jsx(T, { type: "text", shape: "circle", size: "small", icon: /* @__PURE__ */ e.jsx(A.Pipette, { size: 16 }), onClick: t }) }),
714
+ window.EyeDropper && /* @__PURE__ */ e.jsx("div", { className: "mb-1", children: /* @__PURE__ */ e.jsx(k, { type: "text", shape: "circle", size: "small", icon: /* @__PURE__ */ e.jsx(M.Pipette, { size: 16 }), onClick: t }) }),
711
715
  n
712
716
  ] })
713
717
  }
714
718
  );
715
- }, Co = [
719
+ }, Hi = [
716
720
  {
717
721
  label: /* @__PURE__ */ e.jsx("div", { className: "w-4 h-3 mt-1.5 items-center cursor-pointer", children: /* @__PURE__ */ e.jsx("i", { className: "block w-full origin-center rounded-lg bg-slate-600 -rotate-45 h-[1px]" }) }),
718
722
  key: 1
@@ -733,18 +737,18 @@ const A = {
733
737
  label: /* @__PURE__ */ e.jsx("div", { className: "w-4 h-3 mt-1.5 items-center cursor-pointer", children: /* @__PURE__ */ e.jsx("i", { className: "block w-full origin-center rounded-lg bg-slate-600 -rotate-45 h-[8px]" }) }),
734
738
  key: 8
735
739
  }
736
- ], Ao = ({ defaultValue: o, onChange: t }) => {
740
+ ], zi = ({ defaultValue: i, onChange: t }) => {
737
741
  const n = ({ key: s }) => {
738
742
  t(s);
739
743
  };
740
744
  return /* @__PURE__ */ e.jsx(
741
- vt,
745
+ At,
742
746
  {
743
- menu: { items: Co, onClick: n, selectedKeys: [o] },
747
+ menu: { items: Hi, onClick: n, selectedKeys: [i] },
744
748
  trigger: ["click"],
745
749
  placement: "bottom",
746
750
  children: /* @__PURE__ */ e.jsx(
747
- T,
751
+ k,
748
752
  {
749
753
  type: "text",
750
754
  shape: "circle",
@@ -754,7 +758,7 @@ const A = {
754
758
  {
755
759
  className: "block w-full origin-center rounded-lg bg-slate-600 -rotate-45",
756
760
  style: {
757
- height: o + "px"
761
+ height: i + "px"
758
762
  }
759
763
  }
760
764
  ) })
@@ -763,37 +767,37 @@ const A = {
763
767
  }
764
768
  );
765
769
  };
766
- let To = (o, t = 21) => (n = t) => {
770
+ let _i = (i, t = 21) => (n = t) => {
767
771
  let s = "", a = n;
768
772
  for (; a--; )
769
- s += o[Math.random() * o.length | 0];
773
+ s += i[Math.random() * i.length | 0];
770
774
  return s;
771
775
  };
772
- const No = () => {
773
- const o = typeof navigator == "object" ? navigator.platform : "";
774
- return /Mac|iPod|iPhone|iPad/.test(o);
775
- }, ft = No() ? "⌘" : "Ctrl", At = [
776
+ const Ei = () => {
777
+ const i = typeof navigator == "object" ? navigator.platform : "";
778
+ return /Mac|iPod|iPhone|iPad/.test(i);
779
+ }, gt = Ei() ? "⌘" : "Ctrl", Dt = [
776
780
  "image/jpeg",
777
781
  "image/png",
778
782
  "image/bmp",
779
783
  "image/gif",
780
784
  "image/webp"
781
785
  ];
782
- function G(...o) {
783
- return io(to(o));
786
+ function Z(...i) {
787
+ return di(ci(i));
784
788
  }
785
- const he = To(
789
+ const ge = _i(
786
790
  "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
787
791
  7
788
- ), So = (o, t) => {
792
+ ), Oi = (i, t) => {
789
793
  let n = document.createElement("a");
790
- n.href = o, n.download = t, n.style = "position: absolute; z-index: -111; visibility: none;", document.body.appendChild(n), n.click(), document.body.removeChild(n), n = null;
791
- }, ko = (o, t, n = 950, s = 450) => {
792
- let a = o, l = t;
793
- return a > n && (l *= n / a, a = n), l > s && (a *= s / l, l = s), { width: a, height: l };
794
- }, Ro = (o) => {
794
+ n.href = i, n.download = t, n.style = "position: absolute; z-index: -111; visibility: none;", document.body.appendChild(n), n.click(), document.body.removeChild(n), n = null;
795
+ }, Bi = (i, t, n = 950, s = 450) => {
796
+ let a = i, l = t;
797
+ return a > n && (l *= n / a, a = n), l > s && (a *= s / l, l = s), { width: Math.round(a), height: Math.round(l) };
798
+ }, Yi = (i) => {
795
799
  const t = new Image();
796
- return o.startsWith("data") || (t.crossOrigin = "Anonymous"), new Promise(function(n, s) {
800
+ return i.startsWith("data") || (t.crossOrigin = "Anonymous"), new Promise(function(n, s) {
797
801
  t.onload = function() {
798
802
  n(t);
799
803
  };
@@ -802,71 +806,85 @@ const he = To(
802
806
  new Error("An error occurred attempting to load image")
803
807
  );
804
808
  };
805
- t.onerror = a, t.onabort = a, t.src = o;
809
+ t.onerror = a, t.onabort = a, t.src = i;
806
810
  });
807
- }, Do = (o, t, n) => o === "top-left" ? {
811
+ }, we = (i, t, n = 0.15) => {
812
+ const s = Math.min(i, t);
813
+ return Math.round(s * n);
814
+ }, Ii = (i, t, n) => i === "top-left" ? {
808
815
  x: 0,
809
816
  y: 0
810
- } : o === "top" ? {
817
+ } : i === "top" ? {
811
818
  x: t / 2,
812
819
  y: 0
813
- } : o === "top-right" ? {
820
+ } : i === "top-right" ? {
814
821
  x: t,
815
822
  y: 0
816
- } : o === "left" ? {
823
+ } : i === "left" ? {
817
824
  x: 0,
818
825
  y: n / 2
819
- } : o === "right" ? {
826
+ } : i === "right" ? {
820
827
  x: t,
821
828
  y: n / 2
822
- } : o === "bottom-left" ? {
829
+ } : i === "bottom-left" ? {
823
830
  x: 0,
824
831
  y: n
825
- } : o === "bottom" ? {
832
+ } : i === "bottom" ? {
826
833
  x: t / 2,
827
834
  y: n
828
- } : o === "bottom-right" ? {
835
+ } : i === "bottom-right" ? {
829
836
  x: t,
830
837
  y: n
831
- } : { x: t / 2, y: n / 2 }, Ho = (o, t, n) => {
832
- const s = n * (Math.PI / 180), a = Math.abs(o * Math.cos(s)) + Math.abs(t * Math.sin(s)), l = Math.abs(o * Math.sin(s)) + Math.abs(t * Math.cos(s));
838
+ } : { x: t / 2, y: n / 2 }, Pi = (i, t, n) => {
839
+ const s = n * (Math.PI / 180), a = Math.abs(i * Math.cos(s)) + Math.abs(t * Math.sin(s)), l = Math.abs(i * Math.sin(s)) + Math.abs(t * Math.cos(s));
833
840
  return {
834
841
  width: Math.round(a),
835
842
  height: Math.round(l)
836
843
  };
837
- }, zo = ({ text: o, color: t, angleDegrees: n }) => {
844
+ }, _e = (i) => "data:image/svg+xml," + encodeURIComponent(i).replace(/'/g, "%27").replace(/"/g, "%22"), Wi = ({ text: i, color: t, angleDegrees: n }) => {
838
845
  const s = document.createElement("div");
839
846
  s.style = `text-align:center;white-space:nowrap;line-height:100px;transform: rotate(${n}deg);position: absolute;top:0;left:0;opacity: 0;`;
840
847
  const a = document.createElement("span");
841
- a.style.color = t, a.style.fontSize = "36px", a.innerText = o, s.append(a), document.body.append(s);
842
- const { width: l, height: d } = s.getBoundingClientRect();
848
+ a.style.color = t, a.style.fontSize = "36px", a.innerText = i, s.append(a), document.body.append(s);
849
+ const { width: l, height: h } = s.getBoundingClientRect();
843
850
  document.body.removeChild(s);
844
- const f = Ho(l, d, n), u = `
851
+ const f = Pi(l, h, n), d = `
845
852
  <div xmlns="http://www.w3.org/1999/xhtml" style="text-align:center;white-space:nowrap;line-height:${f.height}px;transform:rotate(${n}deg);">
846
- <span style="color:${t};font-size:36px;">${o}</span>
853
+ <span style="color:${t};font-size:36px;">${i}</span>
847
854
  </div>
848
- `, h = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${f.width} ${f.height}" width="${f.width}" height="${f.height}">
855
+ `, p = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${f.width} ${f.height}" width="${f.width}" height="${f.height}">
856
+ <foreignObject width="100%" height="100%">
857
+ ${d}
858
+ </foreignObject>
859
+ </svg>`;
860
+ return _e(p);
861
+ }, Zi = (i) => {
862
+ const t = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32">
849
863
  <foreignObject width="100%" height="100%">
850
- ${u}
864
+ <div xmlns="http://www.w3.org/1999/xhtml" style="text-align:center;white-space:nowrap;line-height:32px;">
865
+ <span style="color:#ffffff;font-size:18px;">${i}</span>
866
+ </div>
851
867
  </foreignObject>
852
- </svg>`, g = new Blob([h], { type: "image/svg+xml;charset=utf-8" });
853
- return (window.URL || window.webkitURL || window).createObjectURL(g);
868
+ </svg>`;
869
+ return _e(t);
854
870
  };
855
- let pt, Eo = class {
871
+ let xt, Fi = class {
856
872
  constructor() {
857
- k(this, "img", {});
858
- k(this, "invalid", !1);
859
- k(this, "app", null);
860
- k(this, "scale", 100);
861
- k(this, "useTool", null);
862
- k(this, "annotateColor", "#ff0000");
863
- k(this, "strokeWidth", 4);
864
- k(this, "shapes", /* @__PURE__ */ new Map());
865
- k(this, "message", null);
866
- jt(this);
873
+ R(this, "img", {});
874
+ R(this, "invalid", !1);
875
+ R(this, "app", null);
876
+ R(this, "scale", 100);
877
+ R(this, "useTool", null);
878
+ R(this, "annotateColor", "#ff0000");
879
+ R(this, "strokeWidth", 4);
880
+ R(this, "shapes", /* @__PURE__ */ new Map());
881
+ R(this, "message", null);
882
+ R(this, "theme", "light");
883
+ R(this, "clearFun", null);
884
+ Tt(this);
867
885
  }
868
886
  get shapesList() {
869
- return Array.from(Mt(this.shapes).values());
887
+ return Array.from(St(this.shapes).values());
870
888
  }
871
889
  get cursor() {
872
890
  return this.useTool === "Pencil" ? "pencil" : this.useTool ? "crosshair" : "auto";
@@ -876,8 +894,20 @@ let pt, Eo = class {
876
894
  const t = !!((n = this.app) != null && n.tree);
877
895
  return t || (this.message.info("Please add a image"), this.setInvalid()), t;
878
896
  }
897
+ get nextStep() {
898
+ const t = this.shapesList.filter((s) => s.type === "Step"), n = pi(t, (s) => Number(s.text));
899
+ return n != null && n.text ? Number(n.text) + 1 : 1;
900
+ }
901
+ get isDark() {
902
+ return this.theme === "dark";
903
+ }
904
+ setTheme(t) {
905
+ t !== this.theme && fi(() => {
906
+ t ? this.theme = t : this.theme = this.isDark ? "light" : "dark";
907
+ });
908
+ }
879
909
  setInvalid() {
880
- clearTimeout(pt), this.invalid = !0, pt = setTimeout(oo(() => {
910
+ clearTimeout(xt), this.invalid = !0, xt = setTimeout(hi(() => {
881
911
  this.invalid = !1;
882
912
  }), 200);
883
913
  }
@@ -914,15 +944,18 @@ let pt, Eo = class {
914
944
  setStrokeWidth(t) {
915
945
  this.strokeWidth = t;
916
946
  }
947
+ setClearFun(t) {
948
+ this.clearFun = t;
949
+ }
917
950
  clearImg() {
918
951
  this.img = {};
919
952
  }
920
953
  destroy() {
921
954
  var t;
922
- (t = this.app) == null || t.destroy(), this.app = null;
955
+ (t = this.app) == null || t.destroy(!0), this.app = null, this.shapes.clear(), this.setUseTool(null);
923
956
  }
924
957
  };
925
- const Oo = new Eo(), Q = {
958
+ const Gi = new Fi(), Q = {
926
959
  default_1: {
927
960
  class: "bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500",
928
961
  fill: {
@@ -1309,25 +1342,25 @@ const Oo = new Eo(), Q = {
1309
1342
  }
1310
1343
  }
1311
1344
  };
1312
- class _o {
1345
+ class Li {
1313
1346
  constructor() {
1314
- k(this, "scale", 1);
1315
- k(this, "scaleX", !1);
1316
- k(this, "scaleY", !1);
1317
- k(this, "padding", 0);
1318
- k(this, "paddingBg", "rgba(255,255,255, 100)");
1319
- k(this, "round", 10);
1320
- k(this, "shadow", 3);
1321
- k(this, "frame", "none");
1322
- k(this, "background", "default_1");
1323
- k(this, "align", "center");
1324
- k(this, "waterImg", null);
1325
- k(this, "waterIndex", 1);
1326
- k(this, "size", {
1347
+ R(this, "scale", 1);
1348
+ R(this, "scaleX", !1);
1349
+ R(this, "scaleY", !1);
1350
+ R(this, "padding", 0);
1351
+ R(this, "paddingBg", "rgba(255,255,255, 100)");
1352
+ R(this, "round", 10);
1353
+ R(this, "shadow", 3);
1354
+ R(this, "frame", "none");
1355
+ R(this, "background", "default_1");
1356
+ R(this, "align", "center");
1357
+ R(this, "waterImg", null);
1358
+ R(this, "waterIndex", 1);
1359
+ R(this, "size", {
1327
1360
  type: "auto",
1328
1361
  title: "Auto"
1329
1362
  });
1330
- k(this, "frameConf", {
1363
+ R(this, "frameConf", {
1331
1364
  width: 800,
1332
1365
  height: 600,
1333
1366
  background: {
@@ -1337,10 +1370,10 @@ class _o {
1337
1370
  stops: ["#6366f1", "#a855f7", "#ec4899"]
1338
1371
  }
1339
1372
  });
1340
- jt(this);
1373
+ Tt(this);
1341
1374
  }
1342
1375
  get waterSvg() {
1343
- return Mt(this.waterImg);
1376
+ return St(this.waterImg);
1344
1377
  }
1345
1378
  setScale(t) {
1346
1379
  this.scale = t;
@@ -1357,6 +1390,9 @@ class _o {
1357
1390
  setShadow(t) {
1358
1391
  this.shadow = t;
1359
1392
  }
1393
+ setFrame(t) {
1394
+ this.frame = t;
1395
+ }
1360
1396
  setFrameSize(t, n) {
1361
1397
  !t || !n || (this.frameConf.width = t, this.frameConf.height = n);
1362
1398
  }
@@ -1379,37 +1415,37 @@ class _o {
1379
1415
  this.waterIndex = t;
1380
1416
  }
1381
1417
  }
1382
- const Yo = new _o(), r = {
1383
- editor: Oo,
1384
- option: Yo
1385
- }, Io = ({ disabled: o = !1, toSelect: t, locale: n = "en" }) => {
1386
- const [s, a] = O(!1), l = () => {
1387
- a(!1);
1388
- }, d = (u) => {
1389
- a(u);
1390
- }, f = (u) => {
1391
- t(u.native), l();
1418
+ const Ui = new Li(), o = {
1419
+ editor: Gi,
1420
+ option: Ui
1421
+ }, Vi = ({ disabled: i = !1, toSelect: t, locale: n = "en", theme: s = "auto" }) => {
1422
+ const [a, l] = O(!1), h = () => {
1423
+ l(!1);
1424
+ }, f = (p) => {
1425
+ l(p);
1426
+ }, d = (p) => {
1427
+ t(p.native), h();
1392
1428
  };
1393
1429
  return /* @__PURE__ */ e.jsx(
1394
- ge,
1430
+ xe,
1395
1431
  {
1396
- content: /* @__PURE__ */ e.jsx(so, { data: ro, locale: n, onEmojiSelect: f, previewPosition: "none" }),
1432
+ content: /* @__PURE__ */ e.jsx(mi, { data: ui, locale: n, onEmojiSelect: d, previewPosition: "none", theme: s }),
1397
1433
  title: "",
1398
1434
  trigger: "click",
1399
- open: s,
1400
- onOpenChange: d,
1435
+ open: a,
1436
+ onOpenChange: f,
1401
1437
  children: /* @__PURE__ */ e.jsx(
1402
- T,
1438
+ k,
1403
1439
  {
1404
1440
  type: "text",
1405
1441
  shape: "circle",
1406
- disabled: o,
1407
- icon: /* @__PURE__ */ e.jsx(A.Smile, { size: 16 })
1442
+ disabled: i,
1443
+ icon: /* @__PURE__ */ e.jsx(M.Smile, { size: 16 })
1408
1444
  }
1409
1445
  )
1410
1446
  }
1411
1447
  );
1412
- }, Bo = () => /* @__PURE__ */ e.jsx("h1", { children: /* @__PURE__ */ e.jsxs("a", { href: "https://shoteasy.fun", target: "_blank", "aria-label": "ShotEasy", className: "flex gap-1 text-gray-700 items-center text-xs font-semibold", children: [
1448
+ }, Ji = () => /* @__PURE__ */ e.jsx("h1", { children: /* @__PURE__ */ e.jsxs("a", { href: "https://shoteasy.fun", target: "_blank", "aria-label": "ShotEasy", className: "flex gap-1 text-gray-700 dark:text-gray-300 items-center text-xs font-semibold", children: [
1413
1449
  /* @__PURE__ */ e.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 510 510", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1414
1450
  /* @__PURE__ */ e.jsxs("g", { filter: "url(#filter0_i_40_60)", children: [
1415
1451
  /* @__PURE__ */ e.jsx("path", { d: "M60.1774 83.172C64.1232 61.4358 84.9426 47.0139 106.679 50.9598L271.777 80.9308C293.513 84.8767 307.935 105.696 303.989 127.432L247.462 438.817C243.516 460.553 222.696 474.975 200.96 471.029L35.8623 441.058C14.1261 437.112 -0.295702 416.293 3.65017 394.557L60.1774 83.172Z", fill: "#812BED" }),
@@ -1429,59 +1465,64 @@ const Yo = new _o(), r = {
1429
1465
  ] }) })
1430
1466
  ] }),
1431
1467
  /* @__PURE__ */ e.jsx("span", { children: "ShotEasy" })
1432
- ] }) }), Po = () => /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex justify-end items-end gap-2", children: [
1433
- /* @__PURE__ */ e.jsx("a", { href: "https://github.com/CH563/image-beautifier", target: "_blank", "aria-label": "GitHub", className: "block rounded-full p-1.5 hover:bg-slate-100", children: /* @__PURE__ */ e.jsx("svg", { viewBox: "64 64 896 896", focusable: "false", "data-icon": "github", width: "16", height: "16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx("path", { d: "M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z" }) }) }),
1434
- /* @__PURE__ */ e.jsx("a", { href: "https://twitter.com/LiWen563", target: "_blank", "aria-label": "twitter:@LiWen563", className: "block rounded-full p-1.5 hover:bg-slate-100", children: /* @__PURE__ */ e.jsx("svg", { fill: "currentColor", viewBox: "0 0 24 24", width: "16", height: "16", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx("g", { children: /* @__PURE__ */ e.jsx("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }) }) })
1435
- ] }), Wo = ["Square", "SquareFill", "Circle", "Slash", "MoveDownLeft", "Pencil", "Smile"], Zo = Y(() => {
1436
- const [o, t] = O(!1), n = (l) => {
1437
- if (!r.editor.isEditing) return;
1438
- const { useTool: d } = r.editor;
1439
- r.editor.setUseTool(d === l ? null : l), t(!1);
1440
- }, s = (l) => {
1441
- if (!r.editor.isEditing) return;
1442
- const d = r.option.frameConf.width / 2 - 24, f = r.option.frameConf.height / 2 - 24;
1443
- r.editor.setUseTool(null), t(!1), r.editor.addShape({
1444
- id: he(),
1468
+ ] }) }), qi = ({ children: i }) => /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex justify-end items-end gap-2 dark:text-gray-300", children: [
1469
+ i,
1470
+ /* @__PURE__ */ e.jsx("a", { href: "https://github.com/CH563/image-beautifier", target: "_blank", "aria-label": "GitHub", className: "block rounded-full p-2 hover:bg-slate-100 dark:hover:bg-slate-700", children: /* @__PURE__ */ e.jsx("svg", { viewBox: "64 64 896 896", focusable: "false", "data-icon": "github", width: "16", height: "16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx("path", { d: "M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z" }) }) }),
1471
+ /* @__PURE__ */ e.jsx("a", { href: "https://twitter.com/LiWen563", target: "_blank", "aria-label": "twitter:@LiWen563", className: "block rounded-full p-2 dark:hover:bg-slate-700", children: /* @__PURE__ */ e.jsx("svg", { fill: "currentColor", viewBox: "0 0 24 24", width: "16", height: "16", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx("g", { children: /* @__PURE__ */ e.jsx("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }) }) })
1472
+ ] }), Xi = ["Square", "SquareFill", "Circle", "Slash", "MoveDownLeft", "Pencil", "Step", "Smile"], Qi = B(({ headLeft: i, headRight: t }) => {
1473
+ const [n, s] = O(!1), a = (d) => {
1474
+ if (!o.editor.isEditing) return;
1475
+ const { useTool: p } = o.editor;
1476
+ o.editor.setUseTool(p === d ? null : d), s(!1);
1477
+ }, l = (d) => {
1478
+ if (!o.editor.isEditing) return;
1479
+ const p = o.option.frameConf.width / 2 - 24, m = o.option.frameConf.height / 2 - 24;
1480
+ o.editor.setUseTool(null), s(!1), o.editor.addShape({
1481
+ id: ge(),
1445
1482
  type: "emoji",
1446
- text: l,
1447
- zIndex: r.editor.shapes.size + 1,
1448
- x: d,
1449
- y: f,
1483
+ text: d,
1484
+ zIndex: o.editor.shapes.size + 1,
1485
+ x: p,
1486
+ y: m,
1450
1487
  editable: !0
1451
1488
  });
1452
- }, a = () => {
1453
- if (!r.editor.isEditing) return;
1454
- const l = !o;
1455
- r.editor.setUseTool(null), t(l), r.editor.app.config.move.drag = l;
1489
+ }, h = () => {
1490
+ if (!o.editor.isEditing) return;
1491
+ const d = !n;
1492
+ o.editor.setUseTool(null), s(d), o.editor.app.config.move.drag = d;
1493
+ }, f = () => {
1494
+ o.editor.setTheme(), localStorage.setItem("SHOTEASY_BEAUTIFIER_THEME", o.editor.theme);
1456
1495
  };
1457
- return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center shrink-0 gap-3 bg-white py-2 px-5 border-b border-b-gray-50 shadow-sm relative z-[11] select-none", children: [
1458
- /* @__PURE__ */ e.jsx("div", { className: "flex-1", children: /* @__PURE__ */ e.jsx(Bo, {}) }),
1459
- /* @__PURE__ */ e.jsx("div", { className: "flex gap-1 justify-center items-center", children: Wo.map((l) => {
1460
- if (l === "Smile") return /* @__PURE__ */ e.jsx(Io, { disabled: !1, toSelect: s }, l);
1461
- let d;
1462
- if (l.includes("Fill")) {
1463
- const f = l.replace("Fill", ""), u = at[f];
1464
- d = /* @__PURE__ */ e.jsx(u, { size: 16, fill: "currentColor" });
1465
- } else {
1466
- const f = at[l];
1467
- d = /* @__PURE__ */ e.jsx(f, { name: l, size: 16 });
1496
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center shrink-0 gap-3 bg-white dark:bg-black py-2 px-5 border-b border-b-gray-50 dark:border-b-gray-700 shadow-sm relative z-[11] select-none", children: [
1497
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1", children: i || /* @__PURE__ */ e.jsx(Ji, {}) }),
1498
+ /* @__PURE__ */ e.jsx("div", { className: "flex gap-1 justify-center items-center", children: Xi.map((d) => {
1499
+ if (d === "Smile") return /* @__PURE__ */ e.jsx(Vi, { disabled: !1, theme: o.editor.isDark ? "dark" : "light", toSelect: l }, d);
1500
+ let p;
1501
+ if (d.includes("Fill")) {
1502
+ const m = d.replace("Fill", ""), b = dt[m];
1503
+ p = /* @__PURE__ */ e.jsx(b, { size: 16, fill: "currentColor" });
1504
+ } else if (d === "Step")
1505
+ p = /* @__PURE__ */ e.jsx("div", { className: "border text-xs border-black dark:border-white w-4 h-4 rounded-full text-center leading-4", children: o.editor.nextStep }, d);
1506
+ else {
1507
+ const m = dt[d];
1508
+ p = /* @__PURE__ */ e.jsx(m, { name: d, size: 16 });
1468
1509
  }
1469
1510
  return /* @__PURE__ */ e.jsx(
1470
- T,
1511
+ k,
1471
1512
  {
1472
1513
  type: "text",
1473
1514
  shape: "circle",
1474
- icon: d,
1475
- className: r.editor.useTool === l && "text-[#1677ff] bg-sky-100/50 hover:bg-sky-100 hover:text-[#1677ff]",
1476
- onClick: () => n(l)
1515
+ icon: p,
1516
+ className: o.editor.useTool === d && "text-[#1a79ff] [&_.border]:border-[#1a79ff] bg-sky-100/50 hover:bg-sky-100 hover:text-[#1a79ff] [&_.border]:hover:text-[#1a79ff]",
1517
+ onClick: () => a(d)
1477
1518
  },
1478
- l
1519
+ d
1479
1520
  );
1480
1521
  }) }),
1481
- /* @__PURE__ */ e.jsx(li, { type: "vertical" }),
1522
+ /* @__PURE__ */ e.jsx(mr, { type: "vertical" }),
1482
1523
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 justify-center items-center", children: [
1483
1524
  /* @__PURE__ */ e.jsx(
1484
- xe,
1525
+ be,
1485
1526
  {
1486
1527
  size: "small",
1487
1528
  presets: [
@@ -1500,141 +1541,149 @@ const Yo = new _o(), r = {
1500
1541
  ]
1501
1542
  }
1502
1543
  ],
1503
- value: r.editor.annotateColor,
1504
- onChange: (l) => r.editor.setAnnotateColor(l.toHexString())
1544
+ value: o.editor.annotateColor,
1545
+ onChange: (d) => o.editor.setAnnotateColor(d.toHexString())
1505
1546
  }
1506
1547
  ),
1507
- /* @__PURE__ */ e.jsx(Ao, { defaultValue: r.editor.strokeWidth, onChange: (l) => r.editor.setStrokeWidth(l) }),
1548
+ /* @__PURE__ */ e.jsx(zi, { defaultValue: o.editor.strokeWidth, onChange: (d) => o.editor.setStrokeWidth(d) }),
1508
1549
  /* @__PURE__ */ e.jsx(
1509
- T,
1550
+ k,
1510
1551
  {
1511
1552
  type: "text",
1512
1553
  shape: "circle",
1513
- className: o && "text-[#1677ff] bg-sky-100/50 hover:bg-sky-100 hover:text-[#1677ff]",
1514
- icon: /* @__PURE__ */ e.jsx(A.Hand, { size: 16 }),
1515
- onClick: a
1554
+ className: n && "text-[#1677ff] bg-sky-100/50 hover:bg-sky-100 hover:text-[#1677ff]",
1555
+ icon: /* @__PURE__ */ e.jsx(M.Hand, { size: 16 }),
1556
+ onClick: h
1516
1557
  }
1517
1558
  )
1518
1559
  ] }),
1519
- /* @__PURE__ */ e.jsx(Po, {})
1560
+ t || /* @__PURE__ */ e.jsx(qi, { children: /* @__PURE__ */ e.jsx(
1561
+ k,
1562
+ {
1563
+ type: "text",
1564
+ shape: "circle",
1565
+ icon: o.editor.isDark ? /* @__PURE__ */ e.jsx(M.Sun, { size: 16 }) : /* @__PURE__ */ e.jsx(M.Moon, { size: 16 }),
1566
+ onClick: f
1567
+ }
1568
+ ) })
1520
1569
  ] });
1521
1570
  });
1522
- function Go(o) {
1523
- var t = typeof o;
1524
- return o != null && (t == "object" || t == "function");
1571
+ function $i(i) {
1572
+ var t = typeof i;
1573
+ return i != null && (t == "object" || t == "function");
1525
1574
  }
1526
- var Tt = Go, Fo = typeof fe == "object" && fe && fe.Object === Object && fe, Lo = Fo, Uo = Lo, Vo = typeof self == "object" && self && self.Object === Object && self, Jo = Uo || Vo || Function("return this")(), Nt = Jo, qo = Nt, Xo = function() {
1527
- return qo.Date.now();
1528
- }, Qo = Xo, $o = /\s/;
1529
- function Ko(o) {
1530
- for (var t = o.length; t-- && $o.test(o.charAt(t)); )
1575
+ var Ht = $i, Ki = typeof ue == "object" && ue && ue.Object === Object && ue, eo = Ki, to = eo, ro = typeof self == "object" && self && self.Object === Object && self, io = to || ro || Function("return this")(), zt = io, oo = zt, so = function() {
1576
+ return oo.Date.now();
1577
+ }, no = so, ao = /\s/;
1578
+ function lo(i) {
1579
+ for (var t = i.length; t-- && ao.test(i.charAt(t)); )
1531
1580
  ;
1532
1581
  return t;
1533
1582
  }
1534
- var er = Ko, tr = er, ir = /^\s+/;
1535
- function or(o) {
1536
- return o && o.slice(0, tr(o) + 1).replace(ir, "");
1583
+ var co = lo, fo = co, ho = /^\s+/;
1584
+ function po(i) {
1585
+ return i && i.slice(0, fo(i) + 1).replace(ho, "");
1537
1586
  }
1538
- var rr = or, sr = Nt, nr = sr.Symbol, St = nr, ut = St, kt = Object.prototype, ar = kt.hasOwnProperty, lr = kt.toString, se = ut ? ut.toStringTag : void 0;
1539
- function cr(o) {
1540
- var t = ar.call(o, se), n = o[se];
1587
+ var uo = po, mo = zt, go = mo.Symbol, _t = go, bt = _t, Et = Object.prototype, xo = Et.hasOwnProperty, bo = Et.toString, se = bt ? bt.toStringTag : void 0;
1588
+ function wo(i) {
1589
+ var t = xo.call(i, se), n = i[se];
1541
1590
  try {
1542
- o[se] = void 0;
1591
+ i[se] = void 0;
1543
1592
  var s = !0;
1544
1593
  } catch {
1545
1594
  }
1546
- var a = lr.call(o);
1547
- return s && (t ? o[se] = n : delete o[se]), a;
1595
+ var a = bo.call(i);
1596
+ return s && (t ? i[se] = n : delete i[se]), a;
1548
1597
  }
1549
- var dr = cr, fr = Object.prototype, pr = fr.toString;
1550
- function ur(o) {
1551
- return pr.call(o);
1598
+ var yo = wo, vo = Object.prototype, jo = vo.toString;
1599
+ function Mo(i) {
1600
+ return jo.call(i);
1552
1601
  }
1553
- var hr = ur, ht = St, mr = dr, gr = hr, xr = "[object Null]", br = "[object Undefined]", mt = ht ? ht.toStringTag : void 0;
1554
- function wr(o) {
1555
- return o == null ? o === void 0 ? br : xr : mt && mt in Object(o) ? mr(o) : gr(o);
1602
+ var Co = Mo, wt = _t, ko = yo, Ao = Co, No = "[object Null]", To = "[object Undefined]", yt = wt ? wt.toStringTag : void 0;
1603
+ function So(i) {
1604
+ return i == null ? i === void 0 ? To : No : yt && yt in Object(i) ? ko(i) : Ao(i);
1556
1605
  }
1557
- var yr = wr;
1558
- function vr(o) {
1559
- return o != null && typeof o == "object";
1606
+ var Ro = So;
1607
+ function Do(i) {
1608
+ return i != null && typeof i == "object";
1560
1609
  }
1561
- var jr = vr, Mr = yr, Cr = jr, Ar = "[object Symbol]";
1562
- function Tr(o) {
1563
- return typeof o == "symbol" || Cr(o) && Mr(o) == Ar;
1610
+ var Ho = Do, zo = Ro, _o = Ho, Eo = "[object Symbol]";
1611
+ function Oo(i) {
1612
+ return typeof i == "symbol" || _o(i) && zo(i) == Eo;
1564
1613
  }
1565
- var Nr = Tr, Sr = rr, gt = Tt, kr = Nr, xt = NaN, Rr = /^[-+]0x[0-9a-f]+$/i, Dr = /^0b[01]+$/i, Hr = /^0o[0-7]+$/i, zr = parseInt;
1566
- function Er(o) {
1567
- if (typeof o == "number")
1568
- return o;
1569
- if (kr(o))
1570
- return xt;
1571
- if (gt(o)) {
1572
- var t = typeof o.valueOf == "function" ? o.valueOf() : o;
1573
- o = gt(t) ? t + "" : t;
1614
+ var Bo = Oo, Yo = uo, vt = Ht, Io = Bo, jt = NaN, Po = /^[-+]0x[0-9a-f]+$/i, Wo = /^0b[01]+$/i, Zo = /^0o[0-7]+$/i, Fo = parseInt;
1615
+ function Go(i) {
1616
+ if (typeof i == "number")
1617
+ return i;
1618
+ if (Io(i))
1619
+ return jt;
1620
+ if (vt(i)) {
1621
+ var t = typeof i.valueOf == "function" ? i.valueOf() : i;
1622
+ i = vt(t) ? t + "" : t;
1574
1623
  }
1575
- if (typeof o != "string")
1576
- return o === 0 ? o : +o;
1577
- o = Sr(o);
1578
- var n = Dr.test(o);
1579
- return n || Hr.test(o) ? zr(o.slice(2), n ? 2 : 8) : Rr.test(o) ? xt : +o;
1624
+ if (typeof i != "string")
1625
+ return i === 0 ? i : +i;
1626
+ i = Yo(i);
1627
+ var n = Wo.test(i);
1628
+ return n || Zo.test(i) ? Fo(i.slice(2), n ? 2 : 8) : Po.test(i) ? jt : +i;
1580
1629
  }
1581
- var Or = Er, _r = Tt, Re = Qo, bt = Or, Yr = "Expected a function", Ir = Math.max, Br = Math.min;
1582
- function Pr(o, t, n) {
1583
- var s, a, l, d, f, u, h = 0, g = !1, y = !1, S = !0;
1584
- if (typeof o != "function")
1585
- throw new TypeError(Yr);
1586
- t = bt(t) || 0, _r(n) && (g = !!n.leading, y = "maxWait" in n, l = y ? Ir(bt(n.maxWait) || 0, t) : l, S = "trailing" in n ? !!n.trailing : S);
1587
- function N(R) {
1588
- var W = s, U = a;
1589
- return s = a = void 0, h = R, d = o.apply(U, W), d;
1630
+ var Lo = Go, Uo = Ht, He = no, Mt = Lo, Vo = "Expected a function", Jo = Math.max, qo = Math.min;
1631
+ function Xo(i, t, n) {
1632
+ var s, a, l, h, f, d, p = 0, m = !1, b = !1, C = !0;
1633
+ if (typeof i != "function")
1634
+ throw new TypeError(Vo);
1635
+ t = Mt(t) || 0, Uo(n) && (m = !!n.leading, b = "maxWait" in n, l = b ? Jo(Mt(n.maxWait) || 0, t) : l, C = "trailing" in n ? !!n.trailing : C);
1636
+ function A(D) {
1637
+ var F = s, U = a;
1638
+ return s = a = void 0, p = D, h = i.apply(U, F), h;
1590
1639
  }
1591
- function x(R) {
1592
- return h = R, f = setTimeout(_, t), g ? N(R) : d;
1640
+ function x(D) {
1641
+ return p = D, f = setTimeout(_, t), m ? A(D) : h;
1593
1642
  }
1594
- function v(R) {
1595
- var W = R - u, U = R - h, K = t - W;
1596
- return y ? Br(K, l - U) : K;
1643
+ function w(D) {
1644
+ var F = D - d, U = D - p, K = t - F;
1645
+ return b ? qo(K, l - U) : K;
1597
1646
  }
1598
- function H(R) {
1599
- var W = R - u, U = R - h;
1600
- return u === void 0 || W >= t || W < 0 || y && U >= l;
1647
+ function S(D) {
1648
+ var F = D - d, U = D - p;
1649
+ return d === void 0 || F >= t || F < 0 || b && U >= l;
1601
1650
  }
1602
1651
  function _() {
1603
- var R = Re();
1604
- if (H(R))
1605
- return E(R);
1606
- f = setTimeout(_, v(R));
1652
+ var D = He();
1653
+ if (S(D))
1654
+ return E(D);
1655
+ f = setTimeout(_, w(D));
1607
1656
  }
1608
- function E(R) {
1609
- return f = void 0, S && s ? N(R) : (s = a = void 0, d);
1657
+ function E(D) {
1658
+ return f = void 0, C && s ? A(D) : (s = a = void 0, h);
1610
1659
  }
1611
- function be() {
1612
- f !== void 0 && clearTimeout(f), h = 0, s = u = a = f = void 0;
1660
+ function ye() {
1661
+ f !== void 0 && clearTimeout(f), p = 0, s = d = a = f = void 0;
1613
1662
  }
1614
- function we() {
1615
- return f === void 0 ? d : E(Re());
1663
+ function ve() {
1664
+ return f === void 0 ? h : E(He());
1616
1665
  }
1617
1666
  function $() {
1618
- var R = Re(), W = H(R);
1619
- if (s = arguments, a = this, u = R, W) {
1667
+ var D = He(), F = S(D);
1668
+ if (s = arguments, a = this, d = D, F) {
1620
1669
  if (f === void 0)
1621
- return x(u);
1622
- if (y)
1623
- return clearTimeout(f), f = setTimeout(_, t), N(u);
1670
+ return x(d);
1671
+ if (b)
1672
+ return clearTimeout(f), f = setTimeout(_, t), A(d);
1624
1673
  }
1625
- return f === void 0 && (f = setTimeout(_, t)), d;
1674
+ return f === void 0 && (f = setTimeout(_, t)), h;
1626
1675
  }
1627
- return $.cancel = be, $.flush = we, $;
1676
+ return $.cancel = ye, $.flush = ve, $;
1628
1677
  }
1629
- var Wr = Pr;
1630
- const Zr = /* @__PURE__ */ vo(Wr), Gr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDI0LTA0LTE1VDEyOjUwOjI3KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wNC0xNVQxMjo1MzowOSswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyNC0wNC0xNVQxMjo1MzowOSswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxNTY3NDQxZC1lYmQxLWIwNGUtOWUwOS0yMWQ1Mjk3NzAxNzMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTU2NzQ0MWQtZWJkMS1iMDRlLTllMDktMjFkNTI5NzcwMTczIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MTU2NzQ0MWQtZWJkMS1iMDRlLTllMDktMjFkNTI5NzcwMTczIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDoxNTY3NDQxZC1lYmQxLWIwNGUtOWUwOS0yMWQ1Mjk3NzAxNzMiIHN0RXZ0OndoZW49IjIwMjQtMDQtMTVUMTI6NTA6MjcrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7YEaJEAAAFqUlEQVRoge2Z709TVxjHT2kpFMpCLdSWdiWYFVK0IAV0yBqNYQ2CI062ie4PcJq9QZAfmRq0UwQmIRjjFBeXOJfAYHEYZ81ixQUmJhbkBb9aSotcpHDbYltbU0t69+LqXQPa9Nyit0v6zXlx2p7v8zyfe0977jmlYRgG/s+KorqAUBUBoFoRAKoVAaBaEQCqFQGgWhEAqsUIfqjZbG5parI7HLV1dRKJZPUAt9uNoqhucvKfgQGTyYRaLAtmMwBAIpGkpqbKsrJy5PLU1NS4uLg1Kx8AgAWtcy0tdADoANTX1vp8Pv+PrFZrT3f3gf37JRs24GPe2AQ83tcHDvx6/brFYgk+b2BBABytqsLr+PbwYY/Hg7/pdDp/6+r6rLQ0hsEIUPqKVlpc/HtPj9frDR0AYgpFRb36wtBoNBqNBgAYGhpSNTTcvn17eXmZGCaRSKRS6YdisSAlZR2HgyCI0WhEEGTk8WOHw4GPUavVmnv3KioqVKdPC4XC9zSF6mpq8OtXVVmJYVhXZ+dHaWnERWUxmV+Vl/9y7dro6OjS0tLy8jJhdLlc8/Pz9/v6TjY05GRn+9+Kop07dTpdKHeADMA3Bw+ebWzkJibiLxk02u6Skr6+PqfTGTiCz+czm82qU6dEKSkEw+asrIeDg+8VQMDjxcfG4v342NiWpqYXL15AZR0YGMiTy/0ZDAYDZOWvRAaAaHExMa3nzpFLPDo6qigsJEJ9vmePy+UiEYc8ADcx8ceLF0mkJDQ9Pb01Px+PxqTTz7e3kwhCHqCstPTp06cGg2HqtfR6/bNnz6DSa7VakUCAB9wklZpMJsj6YQBqqqv9AVLWr5dt3JiZkUE0aXr67pKSmZkZqArOnjlDxGxpboasHwbgu/r6YBapjsuXoSqw2Wxb8vJwr3zzZgRBoOwQD3OFCkVSUlJCQsIHb1duXt6OHTugFiIOh1N55Ai+Mk7p9dPT01B2iJVYqVT+pdHMPnlCrMT+wjCMwWBIMzNFIhFUBQCAjwsKxGLxzMyMy+XS6XQKhQLCDHW/3pGcTmfFvn34LDp86BCUNyz2A2w2WyaT4X2DXg/lDQsAAACfz8c7iygKZQwXgOTkZBaLBQBAFxehjOECwGazmUwmAOD58+dQxnABWFxcdLvdAIB1XC6UMVwAUBT1er0AAF5yMpQxLABevnw5OTGB95PeHQCGYT9duVJYUHD50iVsTf9ZW1hY0Ny9i/ezs7PhzMEvGWNjY2KhkA4Aj8vVarVQy01g/XHjBvEo1dPdDeWFuANxLFYihwMAsFqt59vb8SkbuhwOx4ULF/C+QCBIz8iA80Ph/vD6aIjFZN5Rq6G8b9PZxkb/PYbD4YCywwGYTCZZZiaeLE8un52dhbKv1uPhYWJDw2axujo7YSNAP8y1t7VFR0XhKUt27VpaWoKNQMhsNn+ybRtx+b/cu9ftdsMGgQaw2+3KoiIia7FSqdfrYYNgGIYgyJ6ysv/2dzzePY2GRBwyj9PDQ0NpYjGRe2t+/t/370NF6O/v35Kb63+60dbauuK8NUiR3A/c7O0V8fn+p7Ynjh+fn5/3P5BbLa/Xq9PpGk6cEItEhJdJpx8/doxcGRhpAAzDBh88WHFOmC2T1dfW3lGrjUaj1Wr1eDw+n8/tdttsNsPU1M3e3qrKSuIrizeRQNDS3BwYO7BoWAhr6uTExNHq6j9v3fJ/k8FgbJLJ+AKBSChMSEhAUdRms80hyMjIyAq7QqFoUKm2b99OugAAQt5S2u32n69e9f8xCaZlSCTfq1SwBxBv1Nrsiefm5q50dHxRXr4+KSlw6bk5OadOnhwfH1+TvFiIU2iFXC6X0Wh8ODioffTIYrFYLBar1RodHR0fH89ms3Pk8k+VyvT0dD6fv/pQg7TWEoAShcV+IBRFAKhWBIBqRQCoVgSAakUAqFYEgGr9C1O6hDD/uqSdAAAAAElFTkSuQmCC", Fr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPqSURBVFiFxdZ/TFVlGMDx7/seLnjFewE3B1xwM62tlGJYSCIBBbv2g8JMakaptZpzi2T2Y/lPqzblnzYG/cVG2tJ+mavl1qZm05rSykEO0QDBgIvA5e4yvRe4F7ic0x90b5d7D4JwWM9f55w9z57P+7xn7zmkHRj4Ie3AQBH/U8SgUrPCohx/97z3aFqiqQ20YdCGhSpvTSqqB5ThSx3t7oOl9zsXAyAAPrkwUptqlRV6CT6fv6dye1HqePL63d6G+sNGAySAzapc023u9/dWbtuY7u5sMo00Hfs09a0L+YsC0ITm0W1elmdz97RKACVppVCWrzmRfnAgx3iApnl1m3ddkcFn5nvtAAlonDISMbU6ZAjg8/t7K5/bOK05QGx6VvDSUMTUBFTVG2q+bVNo7NMSLSnht4YhpgAxije08u6rUc1zcvN446kMMm0mwxESoKWt1bX3hUeT9Vaek5vHiVPn2FOYwqGyJErXmSMRJ1dW9WcvCPDB1szBMVvOTmlO0CITHil4DCmnXFLA+8WWSESipoqf5juJ0IpHztd9Zc4q2yGXWKchfjl7BlVV/yvQR8x7O5TwmwlHU/PSh3e1T7o6tmqBMQHQ1+vgRq+DzU8+gxACACGgYE0cQ6MqV52BYPkSoMxa/PZZz88f35gXAGCip7ElEtHSfIn+oWHsdjv/GhBA3l0LR0QBQogNL3dOujqeDSIuN/6G954yCteuMBShCwD97bjS2o5n9RYKVscZhpgRANHbEXBfp2vZQ7hi0g1D3BYQQoRtx7ijEUd6KU5frCGIWQEwfTsmPf1iou8yDlsJzhHIj0BsWhXHX4MBem5OzgkxJ0DkJCYG20XA/TfdywtxjsrpCAGxMYLT7WPh5TMioo7e28VIQ/3RZdnlO6Q5QRtt/p7BuhK+a+jkozNe1LDjq9Md0CtPQOPkkeoj68MfijsBBCM+b/d2X+PXX6i+W0KaE7DkV/BEeQVbMq1cdweovzjKeCDqVKdeOX5us7iWhWSzeKfm93kDAOJzX3vJ13Tsc9XvEQBKYhrxD76I+b7HMaWui8r/TPn21yLREfylu4mqFYv9tY3zBughgqEkphFrewDFmoqIXcqXhSl/lMS7NkSU96GOZ8z5JdQLvcMKQPN7Cbg6GO/9kzp7RtfzKYHokYAFIX0LAoD+tyMYh19/tWvX3ZZVMxYLEb9gwEyIWZtPhWYIIBJx6JXy7jk0B0Hbgl5CvXhvZ4W9aq38BkicPVt8aDgAQKvam43k9CyIfkwy445OwrmG2F9zEVUrBvpmbK5qT4t91UOLMoFgaFV7kpCmN0GUAMmAE8SPmESt2Fc9BPAP1KEkwmzcLhwAAAAASUVORK5CYII=", Lr = (o, t) => t instanceof Array ? t.map((n) => it.toArray(n).map(
1631
- (s) => ot(s, { ...o })
1632
- )) : it.toArray(t).map(
1633
- (s) => ot(s, { ...o })
1634
- ), Ur = ({ width: o, height: t, background: n, parent: s, children: a, cursor: l }) => {
1635
- const d = me(() => {
1636
- const f = new no({
1637
- width: o,
1678
+ var Qo = Xo;
1679
+ const $o = /* @__PURE__ */ Si(Qo), Ko = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDI0LTA0LTE1VDEyOjUwOjI3KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wNC0xNVQxMjo1MzowOSswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyNC0wNC0xNVQxMjo1MzowOSswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxNTY3NDQxZC1lYmQxLWIwNGUtOWUwOS0yMWQ1Mjk3NzAxNzMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTU2NzQ0MWQtZWJkMS1iMDRlLTllMDktMjFkNTI5NzcwMTczIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MTU2NzQ0MWQtZWJkMS1iMDRlLTllMDktMjFkNTI5NzcwMTczIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDoxNTY3NDQxZC1lYmQxLWIwNGUtOWUwOS0yMWQ1Mjk3NzAxNzMiIHN0RXZ0OndoZW49IjIwMjQtMDQtMTVUMTI6NTA6MjcrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7YEaJEAAAFqUlEQVRoge2Z709TVxjHT2kpFMpCLdSWdiWYFVK0IAV0yBqNYQ2CI062ie4PcJq9QZAfmRq0UwQmIRjjFBeXOJfAYHEYZ81ixQUmJhbkBb9aSotcpHDbYltbU0t69+LqXQPa9Nyit0v6zXlx2p7v8zyfe0977jmlYRgG/s+KorqAUBUBoFoRAKoVAaBaEQCqFQGgWhEAqsUIfqjZbG5parI7HLV1dRKJZPUAt9uNoqhucvKfgQGTyYRaLAtmMwBAIpGkpqbKsrJy5PLU1NS4uLg1Kx8AgAWtcy0tdADoANTX1vp8Pv+PrFZrT3f3gf37JRs24GPe2AQ83tcHDvx6/brFYgk+b2BBABytqsLr+PbwYY/Hg7/pdDp/6+r6rLQ0hsEIUPqKVlpc/HtPj9frDR0AYgpFRb36wtBoNBqNBgAYGhpSNTTcvn17eXmZGCaRSKRS6YdisSAlZR2HgyCI0WhEEGTk8WOHw4GPUavVmnv3KioqVKdPC4XC9zSF6mpq8OtXVVmJYVhXZ+dHaWnERWUxmV+Vl/9y7dro6OjS0tLy8jJhdLlc8/Pz9/v6TjY05GRn+9+Kop07dTpdKHeADMA3Bw+ebWzkJibiLxk02u6Skr6+PqfTGTiCz+czm82qU6dEKSkEw+asrIeDg+8VQMDjxcfG4v342NiWpqYXL15AZR0YGMiTy/0ZDAYDZOWvRAaAaHExMa3nzpFLPDo6qigsJEJ9vmePy+UiEYc8ADcx8ceLF0mkJDQ9Pb01Px+PxqTTz7e3kwhCHqCstPTp06cGg2HqtfR6/bNnz6DSa7VakUCAB9wklZpMJsj6YQBqqqv9AVLWr5dt3JiZkUE0aXr67pKSmZkZqArOnjlDxGxpboasHwbgu/r6YBapjsuXoSqw2Wxb8vJwr3zzZgRBoOwQD3OFCkVSUlJCQsIHb1duXt6OHTugFiIOh1N55Ai+Mk7p9dPT01B2iJVYqVT+pdHMPnlCrMT+wjCMwWBIMzNFIhFUBQCAjwsKxGLxzMyMy+XS6XQKhQLCDHW/3pGcTmfFvn34LDp86BCUNyz2A2w2WyaT4X2DXg/lDQsAAACfz8c7iygKZQwXgOTkZBaLBQBAFxehjOECwGazmUwmAOD58+dQxnABWFxcdLvdAIB1XC6UMVwAUBT1er0AAF5yMpQxLABevnw5OTGB95PeHQCGYT9duVJYUHD50iVsTf9ZW1hY0Ny9i/ezs7PhzMEvGWNjY2KhkA4Aj8vVarVQy01g/XHjBvEo1dPdDeWFuANxLFYihwMAsFqt59vb8SkbuhwOx4ULF/C+QCBIz8iA80Ph/vD6aIjFZN5Rq6G8b9PZxkb/PYbD4YCywwGYTCZZZiaeLE8un52dhbKv1uPhYWJDw2axujo7YSNAP8y1t7VFR0XhKUt27VpaWoKNQMhsNn+ybRtx+b/cu9ftdsMGgQaw2+3KoiIia7FSqdfrYYNgGIYgyJ6ysv/2dzzePY2GRBwyj9PDQ0NpYjGRe2t+/t/370NF6O/v35Kb63+60dbauuK8NUiR3A/c7O0V8fn+p7Ynjh+fn5/3P5BbLa/Xq9PpGk6cEItEhJdJpx8/doxcGRhpAAzDBh88WHFOmC2T1dfW3lGrjUaj1Wr1eDw+n8/tdttsNsPU1M3e3qrKSuIrizeRQNDS3BwYO7BoWAhr6uTExNHq6j9v3fJ/k8FgbJLJ+AKBSChMSEhAUdRms80hyMjIyAq7QqFoUKm2b99OugAAQt5S2u32n69e9f8xCaZlSCTfq1SwBxBv1Nrsiefm5q50dHxRXr4+KSlw6bk5OadOnhwfH1+TvFiIU2iFXC6X0Wh8ODioffTIYrFYLBar1RodHR0fH89ms3Pk8k+VyvT0dD6fv/pQg7TWEoAShcV+IBRFAKhWBIBqRQCoVgSAakUAqFYEgGr9C1O6hDD/uqSdAAAAAElFTkSuQmCC", es = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPqSURBVFiFxdZ/TFVlGMDx7/seLnjFewE3B1xwM62tlGJYSCIBBbv2g8JMakaptZpzi2T2Y/lPqzblnzYG/cVG2tJ+mavl1qZm05rSykEO0QDBgIvA5e4yvRe4F7ic0x90b5d7D4JwWM9f55w9z57P+7xn7zmkHRj4Ie3AQBH/U8SgUrPCohx/97z3aFqiqQ20YdCGhSpvTSqqB5ThSx3t7oOl9zsXAyAAPrkwUptqlRV6CT6fv6dye1HqePL63d6G+sNGAySAzapc023u9/dWbtuY7u5sMo00Hfs09a0L+YsC0ITm0W1elmdz97RKACVppVCWrzmRfnAgx3iApnl1m3ddkcFn5nvtAAlonDISMbU6ZAjg8/t7K5/bOK05QGx6VvDSUMTUBFTVG2q+bVNo7NMSLSnht4YhpgAxije08u6rUc1zcvN446kMMm0mwxESoKWt1bX3hUeT9Vaek5vHiVPn2FOYwqGyJErXmSMRJ1dW9WcvCPDB1szBMVvOTmlO0CITHil4DCmnXFLA+8WWSESipoqf5juJ0IpHztd9Zc4q2yGXWKchfjl7BlVV/yvQR8x7O5TwmwlHU/PSh3e1T7o6tmqBMQHQ1+vgRq+DzU8+gxACACGgYE0cQ6MqV52BYPkSoMxa/PZZz88f35gXAGCip7ElEtHSfIn+oWHsdjv/GhBA3l0LR0QBQogNL3dOujqeDSIuN/6G954yCteuMBShCwD97bjS2o5n9RYKVscZhpgRANHbEXBfp2vZQ7hi0g1D3BYQQoRtx7ijEUd6KU5frCGIWQEwfTsmPf1iou8yDlsJzhHIj0BsWhXHX4MBem5OzgkxJ0DkJCYG20XA/TfdywtxjsrpCAGxMYLT7WPh5TMioo7e28VIQ/3RZdnlO6Q5QRtt/p7BuhK+a+jkozNe1LDjq9Md0CtPQOPkkeoj68MfijsBBCM+b/d2X+PXX6i+W0KaE7DkV/BEeQVbMq1cdweovzjKeCDqVKdeOX5us7iWhWSzeKfm93kDAOJzX3vJ13Tsc9XvEQBKYhrxD76I+b7HMaWui8r/TPn21yLREfylu4mqFYv9tY3zBughgqEkphFrewDFmoqIXcqXhSl/lMS7NkSU96GOZ8z5JdQLvcMKQPN7Cbg6GO/9kzp7RtfzKYHokYAFIX0LAoD+tyMYh19/tWvX3ZZVMxYLEb9gwEyIWZtPhWYIIBJx6JXy7jk0B0Hbgl5CvXhvZ4W9aq38BkicPVt8aDgAQKvam43k9CyIfkwy445OwrmG2F9zEVUrBvpmbK5qT4t91UOLMoFgaFV7kpCmN0GUAMmAE8SPmESt2Fc9BPAP1KEkwmzcLhwAAAAASUVORK5CYII=", ts = (i, t) => t instanceof Array ? t.map((n) => ot.toArray(n).map(
1680
+ (s) => st(s, { ...i })
1681
+ )) : ot.toArray(t).map(
1682
+ (s) => st(s, { ...i })
1683
+ ), rs = ({ width: i, height: t, background: n, parent: s, children: a, cursor: l }) => {
1684
+ const h = le(() => {
1685
+ const f = new gi({
1686
+ width: i,
1638
1687
  height: t,
1639
1688
  overflow: "hide",
1640
1689
  fill: n,
@@ -1642,147 +1691,215 @@ const Zr = /* @__PURE__ */ vo(Wr), Gr = "data:image/png;base64,iVBORw0KGgoAAAANS
1642
1691
  });
1643
1692
  return f.name = "frame", f;
1644
1693
  }, []);
1645
- return M(() => {
1646
- d.width = o, d.height = t, d.fill = n;
1647
- }, [o, t, n]), M(() => {
1648
- d.cursor = l || "auto";
1649
- }, [l]), M(() => (s.add(d), () => {
1650
- d.remove();
1651
- }), [s]), /* @__PURE__ */ e.jsx(e.Fragment, { children: Lr({ parent: d }, a) });
1652
- }, Vr = Y(({ parent: o }) => {
1653
- const [t, n] = me(() => {
1654
- const s = new ao({
1655
- url: r.editor.img.src,
1656
- origin: "center"
1657
- }), a = new lo({
1694
+ return N(() => {
1695
+ h.width = i, h.height = t, h.fill = n;
1696
+ }, [i, t, n]), N(() => {
1697
+ h.cursor = l || "auto";
1698
+ }, [l]), N(() => (s.add(h), () => {
1699
+ h.remove();
1700
+ }), [s]), /* @__PURE__ */ e.jsx(e.Fragment, { children: ts({ parent: h }, a) });
1701
+ }, is = `
1702
+ <svg width="43" height="32" viewBox="0 0 52 38" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 24.75C9.17564 24.75 11.75 22.1756 11.75 19C11.75 15.8244 9.17564 13.25 6 13.25C2.82436 13.25 0.25 15.8244 0.25 19C0.25 22.1756 2.82436 24.75 6 24.75Z" fill="#FF5F57" stroke="black" stroke-opacity="0.2" stroke-width="0.5"></path><path d="M26 24.75C29.1756 24.75 31.75 22.1756 31.75 19C31.75 15.8244 29.1756 13.25 26 13.25C22.8244 13.25 20.25 15.8244 20.25 19C20.25 22.1756 22.8244 24.75 26 24.75Z" fill="#FEBC2E" stroke="black" stroke-opacity="0.2" stroke-width="0.5"></path><path d="M46 24.75C49.1756 24.75 51.75 22.1756 51.75 19C51.75 15.8244 49.1756 13.25 46 13.25C42.8244 13.25 40.25 15.8244 40.25 19C40.25 22.1756 42.8244 24.75 46 24.75Z" fill="#28C840" stroke="black" stroke-opacity="0.2" stroke-width="0.5"></path></svg>
1703
+ `, os = _e(is), ss = B(({ parent: i }) => {
1704
+ const t = ne(null), [n, s, a] = le(() => {
1705
+ const l = new ae({
1706
+ origin: "center",
1707
+ fill: {
1708
+ type: "image",
1709
+ url: o.editor.img.src
1710
+ }
1711
+ }), h = new ft({
1712
+ overflow: "hide",
1713
+ children: [l]
1714
+ }), f = new ft({
1658
1715
  overflow: "hide",
1716
+ strokeAlign: "outside",
1659
1717
  scale: 1,
1660
- children: [s]
1718
+ fill: "#ffffff00",
1719
+ children: [h]
1661
1720
  });
1662
- return [s, a];
1663
- }, [o]);
1664
- return M(() => {
1665
- r.option.padding === 0 ? n.fill = "#ffffff00" : n.fill = r.option.paddingBg;
1666
- }, [r.option.paddingBg, r.option.padding]), M(() => {
1667
- n.cornerRadius = r.option.round, t.cornerRadius = r.option.round - 2;
1668
- }, [r.option.round]), M(() => {
1669
- const { shadow: s } = r.option;
1670
- s === 0 ? n.shadow = null : n.shadow = {
1671
- x: s * 4,
1672
- y: s * 4,
1673
- blur: s * 3,
1721
+ return [l, h, f];
1722
+ }, [i]);
1723
+ return N(() => {
1724
+ o.option.padding === 0 ? s.fill = "#ffffff00" : s.fill = o.option.paddingBg;
1725
+ }, [o.option.paddingBg, o.option.padding]), N(() => {
1726
+ const { round: l } = o.option;
1727
+ a.cornerRadius = l, t.current ? (t.current.cornerRadius = [l, l, 0, 0], s.cornerRadius = [0, 0, l, l], n.cornerRadius = [0, 0, l, l]) : (s.cornerRadius = l, n.cornerRadius = l);
1728
+ }, [o.option.round]), N(() => {
1729
+ const { shadow: l } = o.option;
1730
+ l === 0 ? a.shadow = null : a.shadow = {
1731
+ x: l * 4,
1732
+ y: l * 4,
1733
+ blur: l * 3,
1674
1734
  color: "#00000045",
1675
1735
  box: !0
1676
1736
  };
1677
- }, [r.option.shadow]), M(() => {
1678
- n.scale = r.option.scale;
1679
- }, [r.option.scale]), M(() => {
1680
- t.url = r.editor.img.src;
1681
- }, [r.editor.img.src]), M(() => {
1682
- t.scaleX = r.option.scaleX ? -1 : 1;
1683
- }, [r.option.scaleX]), M(() => {
1684
- t.scaleY = r.option.scaleY ? -1 : 1;
1685
- }, [r.option.scaleY]), M(() => {
1686
- const s = Math.round(r.option.frameConf.width * 0.2), { width: a, height: l } = ko(r.editor.img.width, r.editor.img.height, r.option.frameConf.width - s, r.option.frameConf.height - s);
1687
- t.width = a - r.option.padding, t.height = l - r.option.padding, n.width = a, n.height = l, n.origin = r.option.align;
1688
- const { x: d, y: f } = Do(r.option.align, r.option.frameConf.width - a, r.option.frameConf.height - l);
1689
- n.x = d, n.y = f, r.option.padding > 0 && (t.x = r.option.padding / 2, t.y = r.option.padding / 2);
1690
- }, [r.option.frameConf.width, r.option.frameConf.height, r.option.padding, r.option.align]), M(() => (o.add(n), () => {
1691
- n.remove();
1692
- }), [o]), null;
1693
- }), Jr = Y(({ parent: o }) => {
1694
- const t = me(() => new De({
1737
+ }, [o.option.shadow]), N(() => {
1738
+ a.scale = o.option.scale;
1739
+ }, [o.option.scale]), N(() => {
1740
+ n.url = o.editor.img.src;
1741
+ }, [o.editor.img.src]), N(() => {
1742
+ n.scaleX = o.option.scaleX ? -1 : 1;
1743
+ }, [o.option.scaleX]), N(() => {
1744
+ n.scaleY = o.option.scaleY ? -1 : 1;
1745
+ }, [o.option.scaleY]), N(() => {
1746
+ const { align: l, round: h, frame: f, frameConf: d } = o.option, p = we(d.width, d.height), { width: m, height: b } = Bi(o.editor.img.width, o.editor.img.height, d.width - p, d.height - p);
1747
+ let C = b;
1748
+ switch (f) {
1749
+ case "light":
1750
+ a.strokeWidth = 8, a.stroke = "#ffffff80";
1751
+ break;
1752
+ case "dark":
1753
+ a.strokeWidth = 8, a.stroke = "#00000050";
1754
+ break;
1755
+ case "macosBarLight":
1756
+ case "macosBarDark":
1757
+ C += 32, t.current = new ae({
1758
+ x: 0,
1759
+ y: 0,
1760
+ height: 32,
1761
+ width: m,
1762
+ cornerRadius: [h, h, 0, 0],
1763
+ draggable: !0,
1764
+ fill: [
1765
+ { type: "solid", color: f.includes("Dark") ? "#3a3a3b" : "#ffffff" },
1766
+ { type: "image", url: os, format: "svg", mode: "clip", offset: { x: 10, y: 0 } }
1767
+ ]
1768
+ }), a.addAfter(t.current, s), s.cornerRadius = [0, 0, h, h], n.cornerRadius = [0, 0, h, h];
1769
+ break;
1770
+ default:
1771
+ a.strokeWidth = null, a.stroke = null;
1772
+ }
1773
+ const { x: A, y: x } = Ii(l, d.width - m, d.height - C);
1774
+ a.width = m, a.height = C, a.origin = l, a.x = A, a.y = x, s.width = m, s.height = b, s.x = 0, s.y = C - b;
1775
+ const w = m - o.option.padding, S = Math.round(w * b / m);
1776
+ return n.width = w + 2, n.height = S + 2, n.x = o.option.padding / 2 - 1, n.y = (b - S) / 2 - 1, () => {
1777
+ var _;
1778
+ a.strokeWidth = null, a.stroke = null, (_ = t.current) == null || _.remove(), t.current = null, s.cornerRadius = o.option.round, n.cornerRadius = o.option.round;
1779
+ };
1780
+ }, [o.option.frameConf.width, o.option.frameConf.height, o.option.padding, o.option.align, o.option.frame]), N(() => (i.add(a), () => {
1781
+ a.remove();
1782
+ }), [i]), null;
1783
+ }), ns = B(({ parent: i }) => {
1784
+ const t = le(() => new ae({
1695
1785
  x: 0,
1696
1786
  y: 0
1697
- }), [o]);
1698
- return M(() => {
1699
- t.width = r.option.frameConf.width, t.height = r.option.frameConf.height;
1700
- }, [r.option.frameConf.width, r.option.frameConf.height]), M(() => {
1701
- t.zIndex = r.option.waterIndex;
1702
- }, [r.option.waterIndex]), M(() => {
1787
+ }), [i]);
1788
+ return N(() => {
1789
+ t.width = o.option.frameConf.width, t.height = o.option.frameConf.height;
1790
+ }, [o.option.frameConf.width, o.option.frameConf.height]), N(() => {
1791
+ t.zIndex = o.option.waterIndex;
1792
+ }, [o.option.waterIndex]), N(() => {
1703
1793
  t.fill = {
1704
1794
  type: "image",
1705
- url: r.option.waterSvg,
1795
+ url: o.option.waterSvg,
1706
1796
  mode: "repeat",
1707
1797
  format: "svg",
1708
- size: Math.round(r.option.frameConf.width / 6)
1798
+ size: Math.round(o.option.frameConf.width / 6)
1709
1799
  };
1710
- }, [r.option.waterSvg, r.option.frameConf.width]), M(() => (o.add(t), () => {
1800
+ }, [o.option.waterSvg, o.option.frameConf.width]), N(() => (i.add(t), () => {
1711
1801
  t.remove();
1712
1802
  }), []), null;
1713
- }), qr = ({ parent: o, type: t, id: n, width: s, height: a, x: l, y: d, fill: f, strokeWidth: u, zIndex: h, points: g, editable: y, text: S }) => {
1714
- const N = me(() => {
1715
- const x = { id: n, x: l, y: d, zIndex: h };
1716
- return t === "SquareFill" ? new De({
1803
+ }), as = ({ parent: i, type: t, id: n, width: s, height: a, x: l, y: h, fill: f, strokeWidth: d, zIndex: p, points: m, editable: b, text: C }) => {
1804
+ const A = le(() => {
1805
+ const x = { id: n, x: l, y: h, zIndex: p };
1806
+ return t === "SquareFill" ? new ae({
1717
1807
  cornerRadius: 8,
1718
1808
  width: s,
1719
1809
  height: a,
1720
1810
  fill: f,
1721
1811
  ...x
1722
- }) : t === "Circle" ? new co({
1812
+ }) : t === "Circle" ? new ht({
1723
1813
  stroke: f,
1724
- strokeWidth: u,
1814
+ strokeWidth: d,
1725
1815
  width: s,
1726
1816
  height: a,
1727
1817
  ...x
1728
- }) : t === "Slash" ? new lt({
1818
+ }) : t === "Slash" ? new pt({
1729
1819
  id: n,
1730
- points: g,
1731
- zIndex: h,
1820
+ points: m,
1821
+ zIndex: p,
1732
1822
  stroke: f,
1733
- strokeWidth: u
1734
- }) : t === "MoveDownLeft" ? new bo({
1823
+ strokeWidth: d
1824
+ }) : t === "MoveDownLeft" ? new ki({
1735
1825
  id: n,
1736
- points: g,
1737
- zIndex: h,
1826
+ points: m,
1827
+ zIndex: p,
1738
1828
  strokeCap: "round",
1739
1829
  strokeJoin: "round",
1740
1830
  stroke: f,
1741
- strokeWidth: u
1742
- }) : t === "Pencil" ? new lt({
1831
+ strokeWidth: d
1832
+ }) : t === "Pencil" ? new pt({
1743
1833
  id: n,
1744
- points: g,
1745
- zIndex: h,
1834
+ points: m,
1835
+ zIndex: p,
1746
1836
  curve: !0,
1747
1837
  stroke: f,
1748
- strokeWidth: u
1749
- }) : t === "emoji" ? new fo({
1838
+ strokeWidth: d
1839
+ }) : t === "Step" ? new ht({
1840
+ ...x,
1841
+ width: 32,
1842
+ height: 32,
1843
+ stroke: "#ffffff90",
1844
+ strokeWidth: 2,
1845
+ strokeAlign: "outside",
1846
+ lockRatio: !0,
1847
+ shadow: {
1848
+ x: 1,
1849
+ y: 1,
1850
+ blur: 2,
1851
+ color: "#00000045",
1852
+ box: !0
1853
+ },
1854
+ fill: [
1855
+ {
1856
+ type: "solid",
1857
+ color: f
1858
+ },
1859
+ {
1860
+ type: "image",
1861
+ url: Zi(C),
1862
+ format: "svg",
1863
+ align: "center"
1864
+ }
1865
+ ]
1866
+ }) : t === "emoji" ? new xi({
1750
1867
  id: n,
1751
- zIndex: h,
1752
- text: S,
1868
+ zIndex: p,
1869
+ text: C,
1753
1870
  resizeFontSize: !0,
1754
1871
  fontSize: 48
1755
- }) : new De({
1872
+ }) : new ae({
1756
1873
  cornerRadius: 8,
1757
1874
  stroke: f,
1758
- strokeWidth: u,
1875
+ strokeWidth: d,
1759
1876
  width: s,
1760
1877
  height: a,
1761
1878
  ...x
1762
1879
  });
1763
- }, [o]);
1764
- return M(() => {
1765
- ["Slash", "MoveDownLeft", "Pencil"].includes(t) ? N.points = g : (N.x = l, N.y = d, N.width = s, N.height = a);
1766
- }, [l, d, s, a]), M(() => {
1767
- N.editable = !!y;
1768
- }, [y]), M(() => (o.add(N), () => {
1769
- N.remove();
1770
- }), [o]), null;
1771
- }, Xr = Y(() => (M(() => {
1772
- const o = (s) => {
1880
+ }, [i]);
1881
+ return N(() => {
1882
+ ["Slash", "MoveDownLeft", "Pencil"].includes(t) ? A.points = m : t === "Step" || (A.x = l, A.y = h, A.width = s, A.height = a);
1883
+ }, [l, h, s, a]), N(() => {
1884
+ A.editable = !!b;
1885
+ }, [b]), N(() => (i.add(A), () => {
1886
+ A.remove();
1887
+ }), [i]), null;
1888
+ }, ls = B(() => (N(() => {
1889
+ const i = (s) => {
1773
1890
  var l;
1774
- const { list: a } = (l = r.editor.app) == null ? void 0 : l.editor;
1891
+ const { list: a } = (l = o.editor.app) == null ? void 0 : l.editor;
1775
1892
  if (a != null && a.length) {
1776
- for (let d of a)
1777
- d.remove(), r.editor.removeShape(d);
1778
- r.editor.app.editor.cancel();
1893
+ for (let h of a)
1894
+ h.remove(), o.editor.removeShape(h);
1895
+ o.editor.app.editor.cancel();
1779
1896
  }
1780
1897
  }, t = (s) => {
1781
1898
  var a, l;
1782
- s === "fit" ? (a = r.editor.app) == null || a.tree.zoom(s, 100) : (l = r.editor.app) == null || l.tree.zoom(s), r.editor.setScale(r.editor.app.tree.scale);
1783
- }, n = Ct(window, {
1784
- Backspace: o,
1785
- Delete: o,
1899
+ s === "fit" ? (a = o.editor.app) == null || a.tree.zoom(s, 100) : (l = o.editor.app) == null || l.tree.zoom(s), o.editor.setScale(o.editor.app.tree.scale);
1900
+ }, n = Rt(window, {
1901
+ Backspace: i,
1902
+ Delete: i,
1786
1903
  "$mod+Minus": (s) => {
1787
1904
  s.preventDefault(), t("out");
1788
1905
  },
@@ -1797,12 +1914,12 @@ const Zr = /* @__PURE__ */ vo(Wr), Gr = "data:image/png;base64,iVBORw0KGgoAAAANS
1797
1914
  n();
1798
1915
  };
1799
1916
  }, [window]), null));
1800
- po.set("pencil", { url: Fr });
1801
- const Qr = Y(({ target: o }) => {
1917
+ bi.set("pencil", { url: es });
1918
+ const cs = B(({ target: i }) => {
1802
1919
  var t, n;
1803
- return M(() => {
1804
- const s = new uo({
1805
- view: o,
1920
+ return N(() => {
1921
+ const s = new wi({
1922
+ view: i,
1806
1923
  editor: {
1807
1924
  lockRatio: "corner",
1808
1925
  stroke: "#3f99f7",
@@ -1814,7 +1931,7 @@ const Qr = Y(({ target: o }) => {
1814
1931
  height: 20,
1815
1932
  fill: {
1816
1933
  type: "image",
1817
- url: Gr
1934
+ url: Ko
1818
1935
  }
1819
1936
  }
1820
1937
  },
@@ -1826,65 +1943,75 @@ const Qr = Y(({ target: o }) => {
1826
1943
  usePartRender: !0
1827
1944
  }
1828
1945
  });
1829
- new wo(s), r.editor.setApp(s), s.tree.on(ho.ZOOM, () => {
1830
- r.editor.setScale(s.tree.scale);
1831
- }), s.tree.on(mo.RESIZE, () => {
1832
- r.editor.setScale(s.tree.scale);
1946
+ new Ai(s), o.editor.setApp(s), s.tree.on(yi.ZOOM, () => {
1947
+ o.editor.setScale(s.tree.scale);
1948
+ }), s.tree.on(vi.RESIZE, () => {
1949
+ o.editor.setScale(s.tree.scale);
1833
1950
  });
1834
1951
  let a = null;
1835
- s.tree.on(ke.START, (d) => {
1836
- if (!r.editor.useTool) return;
1837
- const { target: f } = d;
1838
- if (r.editor.getShape(f.id)) return;
1839
- a = he();
1840
- const h = d.getPageBounds(), g = r.editor.useTool, y = {
1952
+ const l = (f) => {
1953
+ if (!o.editor.useTool) return;
1954
+ const { target: d } = f;
1955
+ if (o.editor.getShape(d.id)) return;
1956
+ a = ge();
1957
+ const m = f.getPageBounds ? f.getPageBounds() : f.getPage(), b = o.editor.useTool;
1958
+ return {
1841
1959
  id: a,
1842
- type: g,
1843
- fill: r.editor.annotateColor,
1844
- strokeWidth: r.editor.strokeWidth,
1845
- zIndex: r.editor.shapes.size + 1,
1846
- ...h
1960
+ type: b,
1961
+ fill: o.editor.annotateColor,
1962
+ strokeWidth: o.editor.strokeWidth,
1963
+ zIndex: o.editor.shapes.size + 1,
1964
+ ...m
1847
1965
  };
1848
- ["Slash", "MoveDownLeft", "Pencil"].includes(g) && (y.points = [h.x, h.y]), r.editor.addShape(y);
1849
- }), s.tree.on(ke.DRAG, (d) => {
1850
- if (!r.editor.useTool || !a) return;
1851
- const f = r.editor.getShape(a);
1852
- if (!f) return;
1853
- const u = d.getPageBounds(), h = Object.assign({}, f, u), { points: g, type: y } = h;
1854
- if (g && g.length) {
1855
- const { x: S, y: N } = d.getInnerTotal(), x = S > 0 ? u.x + S : u.x, v = N > 0 ? u.y + N : u.y;
1856
- y === "Pencil" ? h.points = [...g, x, v] : h.points = [g[0], g[1], x, v];
1966
+ };
1967
+ s.tree.on(ji.DOWN, (f) => {
1968
+ if (o.editor.useTool !== "Step") return;
1969
+ const p = l(f);
1970
+ p && (p.text = o.editor.nextStep, p.editable = !0, o.editor.addShape(p), a = null, o.editor.setUseTool(null));
1971
+ }), s.tree.on(De.START, (f) => {
1972
+ const d = o.editor.useTool;
1973
+ if (d === "Step") return;
1974
+ const p = l(f);
1975
+ p && (["Slash", "MoveDownLeft", "Pencil"].includes(d) && (p.points = [p.x, p.y]), o.editor.addShape(p));
1976
+ }), s.tree.on(De.DRAG, (f) => {
1977
+ if (!o.editor.useTool || !a) return;
1978
+ const d = o.editor.getShape(a);
1979
+ if (!d) return;
1980
+ const p = f.getPageBounds(), m = Object.assign({}, d, p), { points: b, type: C } = m;
1981
+ if (b && b.length) {
1982
+ const { x: A, y: x } = f.getInnerTotal(), w = A > 0 ? p.x + A : p.x, S = x > 0 ? p.y + x : p.y;
1983
+ C === "Pencil" ? m.points = [...b, w, S] : m.points = [b[0], b[1], w, S];
1857
1984
  }
1858
- r.editor.addShape(h);
1859
- }), s.tree.on(ke.END, () => {
1860
- if (!r.editor.useTool || !a) return;
1861
- const d = r.editor.getShape(a);
1862
- d && ((d.width === 0 || d.height === 0) && !["Slash", "MoveDownLeft", "Pencil"].includes(d.type) ? r.editor.removeShape(d) : r.editor.addShape(Object.assign({}, d, { editable: !0 }))), a = null, r.editor.useTool !== "Pencil" && r.editor.setUseTool(null);
1985
+ o.editor.addShape(m);
1986
+ }), s.tree.on(De.END, () => {
1987
+ if (!o.editor.useTool || !a) return;
1988
+ const f = o.editor.getShape(a);
1989
+ f && ((f.width === 0 || f.height === 0) && !["Slash", "MoveDownLeft", "Pencil"].includes(f.type) ? o.editor.removeShape(f) : o.editor.addShape(Object.assign({}, f, { editable: !0 }))), a = null, o.editor.useTool !== "Pencil" && o.editor.setUseTool(null);
1863
1990
  });
1864
- const l = Zr(() => {
1865
- const { width: d, height: f } = o.getBoundingClientRect();
1866
- s.tree.zoom("fit", 100), r.option.frameConf.width < d && r.option.frameConf.height < f && s.tree.zoom(1);
1991
+ const h = $o(() => {
1992
+ const { width: f, height: d } = i.getBoundingClientRect();
1993
+ s.tree.zoom("fit", 100), o.option.frameConf.width < f && o.option.frameConf.height < d && s.tree.zoom(1);
1867
1994
  }, 10);
1868
- return go(o, l), () => {
1869
- xo(o, l), r.editor.destroy();
1995
+ return Mi(i, h), () => {
1996
+ Ci(i, h), o.editor.destroy();
1870
1997
  };
1871
- }, [o]), M(() => {
1998
+ }, [i]), N(() => {
1872
1999
  const s = setTimeout(() => {
1873
- const { width: a, height: l } = o.getBoundingClientRect();
1874
- r.editor.app.tree.zoom("fit", 100), r.option.frameConf.width < a && r.option.frameConf.height < l && r.editor.app.tree.zoom(1), r.editor.setScale(r.editor.app.tree.scale);
2000
+ const { width: a, height: l } = i.getBoundingClientRect();
2001
+ o.editor.app.tree.zoom("fit", 100), o.option.frameConf.width < a && o.option.frameConf.height < l && o.editor.app.tree.zoom(1), o.editor.setScale(o.editor.app.tree.scale);
1875
2002
  }, 20);
1876
2003
  return () => {
1877
2004
  clearTimeout(s);
1878
2005
  };
1879
- }, [r.option.frameConf.width, r.option.frameConf.height]), (t = r.editor.app) != null && t.tree ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1880
- /* @__PURE__ */ e.jsxs(Ur, { parent: r.editor.app.tree, cursor: r.editor.cursor, ...r.option.frameConf, children: [
1881
- r.editor.shapesList.map((s) => /* @__PURE__ */ e.jsx(qr, { ...s }, s.id)),
1882
- ((n = r.editor.img) == null ? void 0 : n.src) && /* @__PURE__ */ e.jsx(Vr, {}),
1883
- r.option.waterImg && /* @__PURE__ */ e.jsx(Jr, {})
2006
+ }, [o.option.frameConf.width, o.option.frameConf.height]), (t = o.editor.app) != null && t.tree ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2007
+ /* @__PURE__ */ e.jsxs(rs, { parent: o.editor.app.tree, cursor: o.editor.cursor, ...o.option.frameConf, children: [
2008
+ o.editor.shapesList.map((s) => /* @__PURE__ */ e.jsx(as, { ...s }, s.id)),
2009
+ ((n = o.editor.img) == null ? void 0 : n.src) && /* @__PURE__ */ e.jsx(ss, {}),
2010
+ o.option.waterImg && /* @__PURE__ */ e.jsx(ns, {})
1884
2011
  ] }),
1885
- /* @__PURE__ */ e.jsx(Xr, {})
2012
+ /* @__PURE__ */ e.jsx(ls, {})
1886
2013
  ] }) : null;
1887
- }), $r = [
2014
+ }), ds = [
1888
2015
  {
1889
2016
  key: 0.5,
1890
2017
  label: "50%"
@@ -1901,33 +2028,33 @@ const Qr = Y(({ target: o }) => {
1901
2028
  key: 2,
1902
2029
  label: "200%"
1903
2030
  }
1904
- ], Kr = Y(() => {
1905
- const o = (n) => {
2031
+ ], fs = B(() => {
2032
+ const i = (n) => {
1906
2033
  var s;
1907
- (s = r.editor.app) == null || s.tree.zoom(n), r.editor.setScale(r.editor.app.tree.scale);
2034
+ (s = o.editor.app) == null || s.tree.zoom(n), o.editor.setScale(o.editor.app.tree.scale);
1908
2035
  }, t = (n) => {
1909
2036
  var a, l;
1910
2037
  const s = Number(n.key);
1911
- s === 4 ? (a = r.editor.app) == null || a.tree.zoom("fit", 100) : (l = r.editor.app) == null || l.tree.zoom(s), r.editor.setScale(r.editor.app.tree.scale);
2038
+ s === 4 ? (a = o.editor.app) == null || a.tree.zoom("fit", 100) : (l = o.editor.app) == null || l.tree.zoom(s), o.editor.setScale(o.editor.app.tree.scale);
1912
2039
  };
1913
2040
  return /* @__PURE__ */ e.jsxs("div", { className: "absolute z-10 bottom-4 gap-2 right-4 flex items-center ", children: [
1914
- /* @__PURE__ */ e.jsxs("div", { className: "flex bg-white overflow-hidden rounded-full shadow-md", children: [
1915
- /* @__PURE__ */ e.jsx(T, { type: "text", icon: /* @__PURE__ */ e.jsx(A.ZoomIn, { size: 16 }), onClick: () => o("in") }),
1916
- /* @__PURE__ */ e.jsx(vt, { menu: { items: $r, onClick: t }, placement: "top", children: /* @__PURE__ */ e.jsxs(T, { type: "text", children: [
1917
- r.editor.scale,
2041
+ /* @__PURE__ */ e.jsxs("div", { className: "flex bg-white dark:bg-black overflow-hidden rounded-full shadow-md", children: [
2042
+ /* @__PURE__ */ e.jsx(k, { type: "text", icon: /* @__PURE__ */ e.jsx(M.ZoomIn, { size: 16 }), onClick: () => i("in") }),
2043
+ /* @__PURE__ */ e.jsx(At, { menu: { items: ds, onClick: t }, placement: "top", children: /* @__PURE__ */ e.jsxs(k, { type: "text", children: [
2044
+ o.editor.scale,
1918
2045
  "%"
1919
2046
  ] }) }),
1920
- /* @__PURE__ */ e.jsx(T, { type: "text", icon: /* @__PURE__ */ e.jsx(A.ZoomOut, { size: 16 }), onClick: () => o("out") })
2047
+ /* @__PURE__ */ e.jsx(k, { type: "text", icon: /* @__PURE__ */ e.jsx(M.ZoomOut, { size: 16 }), onClick: () => i("out") })
1921
2048
  ] }),
1922
- /* @__PURE__ */ e.jsx("div", { className: "rounded-full bg-white shadow-md overflow-hidden", children: /* @__PURE__ */ e.jsx(T, { type: "text", icon: /* @__PURE__ */ e.jsx(A.Maximize, { size: 16 }), onClick: () => t({ key: 4 }) }) })
2049
+ /* @__PURE__ */ e.jsx("div", { className: "rounded-full bg-white dark:bg-black shadow-md overflow-hidden", children: /* @__PURE__ */ e.jsx(k, { type: "text", icon: /* @__PURE__ */ e.jsx(M.Maximize, { size: 16 }), onClick: () => t({ key: 4 }) }) })
1923
2050
  ] });
1924
- }), es = Y(() => {
1925
- const [o, t] = O(null);
2051
+ }), hs = B(() => {
2052
+ const [i, t] = O(null);
1926
2053
  return /* @__PURE__ */ e.jsxs("div", { className: "md:w-0 md:flex-1 overflow-hidden select-none relative", children: [
1927
- /* @__PURE__ */ e.jsx("div", { className: "w-full h-full relative z-0", ref: (n) => t(n), children: o && /* @__PURE__ */ e.jsx(Qr, { target: o }) }),
1928
- /* @__PURE__ */ e.jsx(Kr, {})
2054
+ /* @__PURE__ */ e.jsx("div", { className: "w-full h-full relative z-0", ref: (n) => t(n), children: i && /* @__PURE__ */ e.jsx(cs, { target: i }) }),
2055
+ /* @__PURE__ */ e.jsx(fs, {})
1929
2056
  ] });
1930
- }), ts = [
2057
+ }), ps = [
1931
2058
  {
1932
2059
  key: "default",
1933
2060
  title: "Default",
@@ -2089,32 +2216,32 @@ const Qr = Y(({ target: o }) => {
2089
2216
  }
2090
2217
  ]
2091
2218
  }
2092
- ], is = ({ frameWidth: o, frameHeight: t, type: n, onSet: s }) => {
2093
- const [a, l] = O(""), [d, f] = O(""), u = () => {
2219
+ ], us = ({ frameWidth: i, frameHeight: t, type: n, onSet: s }) => {
2220
+ const [a, l] = O(""), [h, f] = O(""), d = () => {
2094
2221
  s({ type: "auto", title: "Auto" });
2095
- }, h = () => {
2096
- s({ type: "custom", title: "Custom", width: a, height: d });
2222
+ }, p = () => {
2223
+ s({ type: "custom", title: "Custom", width: a, height: h });
2097
2224
  };
2098
- return M(() => {
2099
- n === "custom" ? (l(o), f(t)) : (l(""), f(""));
2225
+ return N(() => {
2226
+ n === "custom" ? (l(i), f(t)) : (l(""), f(""));
2100
2227
  }, [n]), /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center py-2 font-normal", children: [
2101
2228
  /* @__PURE__ */ e.jsx(
2102
- rt,
2229
+ nt,
2103
2230
  {
2104
2231
  min: 1,
2105
2232
  value: a,
2106
2233
  onChange: l,
2107
- placeholder: o,
2234
+ placeholder: i,
2108
2235
  prefix: /* @__PURE__ */ e.jsx("span", { className: "opacity-60 mx-1", children: "W" }),
2109
2236
  className: "flex-1"
2110
2237
  }
2111
2238
  ),
2112
2239
  /* @__PURE__ */ e.jsx("span", { className: "text-xs opacity-50", children: "x" }),
2113
2240
  /* @__PURE__ */ e.jsx(
2114
- rt,
2241
+ nt,
2115
2242
  {
2116
2243
  min: 1,
2117
- value: d,
2244
+ value: h,
2118
2245
  onChange: f,
2119
2246
  placeholder: t,
2120
2247
  prefix: /* @__PURE__ */ e.jsx("span", { className: "opacity-60 mx-1", children: "H" }),
@@ -2122,135 +2249,135 @@ const Qr = Y(({ target: o }) => {
2122
2249
  }
2123
2250
  ),
2124
2251
  /* @__PURE__ */ e.jsx(
2125
- T,
2252
+ k,
2126
2253
  {
2127
2254
  type: "primary",
2128
2255
  shape: "circle",
2129
- icon: /* @__PURE__ */ e.jsx(A.Check, { size: 18 }),
2130
- disabled: !a || !d,
2131
- onClick: h
2256
+ icon: /* @__PURE__ */ e.jsx(M.Check, { size: 18 }),
2257
+ disabled: !a || !h,
2258
+ onClick: p
2132
2259
  }
2133
2260
  ),
2134
- /* @__PURE__ */ e.jsx(F, { title: "Auto size", children: /* @__PURE__ */ e.jsx(
2135
- T,
2261
+ /* @__PURE__ */ e.jsx(L, { title: "Auto size", children: /* @__PURE__ */ e.jsx(
2262
+ k,
2136
2263
  {
2137
2264
  type: "primary",
2138
2265
  shape: "circle",
2139
- icon: /* @__PURE__ */ e.jsx(A.Maximize, { size: 18 }),
2266
+ icon: /* @__PURE__ */ e.jsx(M.Maximize, { size: 18 }),
2140
2267
  disabled: n === "auto",
2141
- onClick: u
2268
+ onClick: d
2142
2269
  }
2143
2270
  ) })
2144
2271
  ] });
2145
- }, os = Y(() => {
2146
- var N;
2147
- const o = ue(null), [t, n] = O(!1), [s, a] = O(500), l = () => {
2272
+ }, ms = B(() => {
2273
+ var A;
2274
+ const i = ne(null), [t, n] = O(!1), [s, a] = O(500), l = () => {
2148
2275
  n(!1);
2149
- }, d = (x) => {
2150
- if (n(x), x && o.current) {
2151
- const { height: v, y: H } = o.current.getBoundingClientRect(), _ = document.body.clientHeight - v - H - 80;
2276
+ }, h = (x) => {
2277
+ if (n(x), x && i.current) {
2278
+ const { height: w, y: S } = i.current.getBoundingClientRect(), _ = document.body.clientHeight - w - S - 80;
2152
2279
  a(_);
2153
2280
  }
2154
- }, f = (x, v) => !(x !== r.option.size.type || v.height !== r.option.frameConf.height || v.width !== r.option.frameConf.width), u = (x) => {
2155
- if (l(), x.type === "auto" && r.editor.img.width) {
2156
- const v = Math.round(r.editor.img.width * 0.2);
2157
- r.option.setSize({ ...x, width: r.editor.img.width + v, height: r.editor.img.height + v });
2281
+ }, f = (x, w) => !(x !== o.option.size.type || w.height !== o.option.frameConf.height || w.width !== o.option.frameConf.width), d = (x) => {
2282
+ if (l(), x.type === "auto" && o.editor.img.width) {
2283
+ const w = we(o.editor.img.width, o.editor.img.height);
2284
+ o.option.setSize({ ...x, width: o.editor.img.width + w, height: o.editor.img.height + w });
2158
2285
  return;
2159
2286
  }
2160
- r.option.setSize(x);
2161
- }, h = (x, v, H) => {
2162
- l(), r.option.setSize({
2287
+ o.option.setSize(x);
2288
+ }, p = (x, w, S) => {
2289
+ l(), o.option.setSize({
2163
2290
  type: x,
2164
- title: `${v}${H.title ? ` ${H.title} ` : " "}${H.w} : ${H.h}`,
2165
- width: H.width,
2166
- height: H.height
2291
+ title: `${w}${S.title ? ` ${S.title} ` : " "}${S.w} : ${S.h}`,
2292
+ width: S.width,
2293
+ height: S.height
2167
2294
  });
2168
- }, g = ((N = r.editor.img) == null ? void 0 : N.src) || r.option.size.type !== "auto", y = /* @__PURE__ */ e.jsx(is, { type: r.option.size.type, frameWidth: r.option.frameConf.width, frameHeight: r.option.frameConf.height, onSet: u }), S = /* @__PURE__ */ e.jsx("div", { className: "border-t border-gray-200 py-2 divide-y", children: ts.map((x) => /* @__PURE__ */ e.jsxs("div", { children: [
2295
+ }, m = ((A = o.editor.img) == null ? void 0 : A.src) || o.option.size.type !== "auto", b = /* @__PURE__ */ e.jsx(us, { type: o.option.size.type, frameWidth: o.option.frameConf.width, frameHeight: o.option.frameConf.height, onSet: d }), C = /* @__PURE__ */ e.jsx("div", { className: "border-t border-gray-200 dark:border-gray-800 py-2 divide-y dark:divide-gray-700", "data-mode": o.editor.isDark ? "dark" : "light", children: ps.map((x) => /* @__PURE__ */ e.jsxs("div", { children: [
2169
2296
  x.key !== "default" && /* @__PURE__ */ e.jsx("div", { className: "font-semibold pt-2", children: x.title }),
2170
- /* @__PURE__ */ e.jsx("section", { className: "flex flex-wrap items-end pb-2", children: x.lists.map((v, H) => /* @__PURE__ */ e.jsxs(
2171
- T,
2297
+ /* @__PURE__ */ e.jsx("section", { className: "flex flex-wrap items-end pb-2", children: x.lists.map((w, S) => /* @__PURE__ */ e.jsxs(
2298
+ k,
2172
2299
  {
2173
2300
  type: "text",
2174
2301
  className: "flex-[33%] p-3 h-auto flex-col gap-0 disabled:bg-blue-500/5 disabled:border-blue-500 disabled:cursor-default disabled:text-black",
2175
- disabled: f(x.key, v),
2176
- onClick: () => h(x.key, x.title, v),
2302
+ disabled: f(x.key, w),
2303
+ onClick: () => p(x.key, x.title, w),
2177
2304
  children: [
2178
2305
  /* @__PURE__ */ e.jsx("div", { className: "py-2 px-3 w-full", children: /* @__PURE__ */ e.jsx(
2179
2306
  "div",
2180
2307
  {
2181
- className: "border border-black/50 bg-black/10 w-full flex items-center justify-center rounded-md opacity-75",
2182
- style: { aspectRatio: v.w / v.h },
2308
+ className: "border border-black/50 bg-black/10 dark:bg-white/20 dark:border-white/40 w-full flex items-center justify-center rounded-md opacity-75",
2309
+ style: { aspectRatio: w.w / w.h },
2183
2310
  children: /* @__PURE__ */ e.jsxs("span", { children: [
2184
- v.w,
2311
+ w.w,
2185
2312
  " : ",
2186
- v.h
2313
+ w.h
2187
2314
  ] })
2188
2315
  }
2189
2316
  ) }),
2190
- v.title && /* @__PURE__ */ e.jsx("div", { className: "text-xs", children: v.title }),
2317
+ w.title && /* @__PURE__ */ e.jsx("div", { className: "text-xs", children: w.title }),
2191
2318
  /* @__PURE__ */ e.jsxs("div", { className: "text-xs overflow-hidden text-gray-500", children: [
2192
- v.width,
2319
+ w.width,
2193
2320
  " x ",
2194
- v.height
2321
+ w.height
2195
2322
  ] })
2196
2323
  ]
2197
2324
  },
2198
- H
2325
+ S
2199
2326
  )) })
2200
2327
  ] }, x.key)) });
2201
2328
  return /* @__PURE__ */ e.jsx(
2202
- ge,
2329
+ xe,
2203
2330
  {
2204
- content: S,
2205
- title: y,
2331
+ content: C,
2332
+ title: b,
2206
2333
  trigger: "click",
2207
2334
  arrow: !1,
2208
2335
  placement: "bottomRight",
2209
2336
  open: t,
2210
- overlayClassName: "[&_.ant-popover-inner]:h-full [&_.ant-popover-inner]:overflow-x-hidden [&_.ant-popover-inner]:overflow-y-auto [&_.ant-popover-content]:h-full",
2337
+ overlayClassName: Z("shoteasy-components [&_.ant-popover-inner]:h-full [&_.ant-popover-inner]:overflow-x-hidden [&_.ant-popover-inner]:overflow-y-auto [&_.ant-popover-content]:h-full", o.editor.isDark && "dark-mode"),
2211
2338
  overlayStyle: {
2212
2339
  width: "400px",
2213
2340
  height: `${s}px`
2214
2341
  },
2215
- onOpenChange: d,
2216
- children: /* @__PURE__ */ e.jsxs("div", { className: G("px-3 py-1.5 border shrink-0 border-gray-200 gap-3 shadow-sm overflow-hidden max-h-12 rounded-md hover:border-blue-500 [&_svg]:hover:text-blue-500 cursor-pointer flex items-center", t && "shadow-md"), ref: o, children: [
2342
+ onOpenChange: h,
2343
+ children: /* @__PURE__ */ e.jsxs("div", { className: Z("px-3 py-1.5 border shrink-0 border-gray-200 dark:border-gray-700 gap-3 shadow-sm overflow-hidden max-h-12 rounded-md hover:border-blue-500 [&_svg]:hover:text-blue-500 cursor-pointer flex items-center", t && "shadow-md"), ref: i, children: [
2217
2344
  /* @__PURE__ */ e.jsx(
2218
2345
  "div",
2219
2346
  {
2220
- className: "border border-black/50 bg-black/10 w-4 rounded-sm",
2221
- style: { aspectRatio: r.option.frameConf.width / r.option.frameConf.height }
2347
+ className: "border border-black/50 bg-black/10 dark:bg-white/20 dark:border-white/40 w-4 rounded-sm",
2348
+ style: { aspectRatio: o.option.frameConf.width / o.option.frameConf.height }
2222
2349
  }
2223
2350
  ),
2224
2351
  /* @__PURE__ */ e.jsxs("div", { className: "text-xs", children: [
2225
- /* @__PURE__ */ e.jsx("div", { className: "font-semibold leading-3 mb-0.5", children: r.option.size.title }),
2226
- g ? /* @__PURE__ */ e.jsxs("div", { className: "text-gray-500 leading-3", children: [
2227
- r.option.frameConf.width,
2352
+ /* @__PURE__ */ e.jsx("div", { className: "font-semibold leading-3 mb-0.5", children: o.option.size.title }),
2353
+ m ? /* @__PURE__ */ e.jsxs("div", { className: "text-gray-500 leading-3", children: [
2354
+ o.option.frameConf.width,
2228
2355
  " x ",
2229
- r.option.frameConf.height,
2356
+ o.option.frameConf.height,
2230
2357
  " px"
2231
2358
  ] }) : /* @__PURE__ */ e.jsx("div", { className: "text-gray-500 leading-3", children: "Adaptive screenshot size" })
2232
2359
  ] }),
2233
2360
  /* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
2234
- t ? /* @__PURE__ */ e.jsx(A.ChevronUp, { size: 16 }) : /* @__PURE__ */ e.jsx(A.ChevronDown, { size: 16 })
2361
+ t ? /* @__PURE__ */ e.jsx(M.ChevronUp, { size: 16 }) : /* @__PURE__ */ e.jsx(M.ChevronDown, { size: 16 })
2235
2362
  ] })
2236
2363
  }
2237
2364
  );
2238
- }), rs = Y(() => {
2239
- const o = ue(null), [t, n] = O(!1), s = () => {
2365
+ }), gs = B(() => {
2366
+ const i = ne(null), [t, n] = O(!1), s = () => {
2240
2367
  n(!0);
2241
2368
  }, a = () => {
2242
- var d, f;
2243
- if (typeof ((d = o.current) == null ? void 0 : d.cropper) < "u") {
2244
- const u = (f = o.current) == null ? void 0 : f.cropper.getCroppedCanvas();
2245
- if (u) {
2246
- const { width: h, height: g } = u, y = u.toDataURL();
2247
- if (r.editor.setImg(Object.assign({}, r.editor.img, {
2248
- src: y,
2249
- width: h,
2250
- height: g
2251
- })), r.option.size.type === "auto") {
2252
- const S = Math.round(h * 0.2);
2253
- r.option.setFrameSize(h + S, g + S);
2369
+ var h, f;
2370
+ if (typeof ((h = i.current) == null ? void 0 : h.cropper) < "u") {
2371
+ const d = (f = i.current) == null ? void 0 : f.cropper.getCroppedCanvas();
2372
+ if (d) {
2373
+ const { width: p, height: m } = d, b = d.toDataURL();
2374
+ if (o.editor.setImg(Object.assign({}, o.editor.img, {
2375
+ src: b,
2376
+ width: p,
2377
+ height: m
2378
+ })), o.option.size.type === "auto") {
2379
+ const C = we(p, m);
2380
+ o.option.setFrameSize(p + C, m + C);
2254
2381
  }
2255
2382
  }
2256
2383
  }
@@ -2259,17 +2386,17 @@ const Qr = Y(({ target: o }) => {
2259
2386
  n(!1);
2260
2387
  };
2261
2388
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2262
- /* @__PURE__ */ e.jsx(F, { title: "Crop Image", children: /* @__PURE__ */ e.jsx(
2263
- T,
2389
+ /* @__PURE__ */ e.jsx(L, { title: "Crop Image", children: /* @__PURE__ */ e.jsx(
2390
+ k,
2264
2391
  {
2265
2392
  type: "text",
2266
2393
  shape: "circle",
2267
- icon: /* @__PURE__ */ e.jsx(A.Crop, { size: 18 }),
2394
+ icon: /* @__PURE__ */ e.jsx(M.Crop, { size: 18 }),
2268
2395
  onClick: s
2269
2396
  }
2270
2397
  ) }),
2271
2398
  /* @__PURE__ */ e.jsx(
2272
- ci,
2399
+ gr,
2273
2400
  {
2274
2401
  title: "Cropper",
2275
2402
  open: t,
@@ -2277,13 +2404,13 @@ const Qr = Y(({ target: o }) => {
2277
2404
  onCancel: l,
2278
2405
  destroyOnClose: !0,
2279
2406
  children: /* @__PURE__ */ e.jsx(
2280
- yo,
2407
+ Ti,
2281
2408
  {
2282
- ref: o,
2409
+ ref: i,
2283
2410
  style: { height: 400, width: "100%" },
2284
2411
  zoomTo: 0.5,
2285
- initialAspectRatio: r.editor.img.width / r.editor.img.height,
2286
- src: r.editor.img.src,
2412
+ initialAspectRatio: o.editor.img.width / o.editor.img.height,
2413
+ src: o.editor.img.src,
2287
2414
  dragMode: "move",
2288
2415
  viewMode: 1,
2289
2416
  minCropBoxHeight: 10,
@@ -2298,82 +2425,83 @@ const Qr = Y(({ target: o }) => {
2298
2425
  }
2299
2426
  )
2300
2427
  ] });
2301
- }), ss = ["top-left", "top", "top-right", "left", "center", "right", "bottom-left", "bottom", "bottom-right"], ns = Y(() => {
2302
- const [o, t] = O(!1), n = (l) => {
2428
+ }), xs = ["top-left", "top", "top-right", "left", "center", "right", "bottom-left", "bottom", "bottom-right"], bs = B(() => {
2429
+ const [i, t] = O(!1), n = (l) => {
2303
2430
  t(l);
2304
2431
  }, s = (l) => {
2305
- r.option.setAlign(l);
2306
- }, a = /* @__PURE__ */ e.jsx("div", { className: G("flex flex-wrap w-24 position-block", r.option.align), children: ss.map((l) => /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 border border-gray-200 rounded-sm hover:bg-gray-100 cursor-pointer", onClick: () => s(l) }, l)) });
2432
+ o.option.setAlign(l);
2433
+ }, a = /* @__PURE__ */ e.jsx("div", { className: Z("flex flex-wrap w-24 position-block", o.option.align), children: xs.map((l) => /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 border border-[var(--c-br)] rounded-sm hover:bg-[var(--c-wb)] cursor-pointer", onClick: () => s(l) }, l)) });
2307
2434
  return /* @__PURE__ */ e.jsx(
2308
- ge,
2435
+ xe,
2309
2436
  {
2310
2437
  content: a,
2311
2438
  trigger: "click",
2312
2439
  arrow: !1,
2313
2440
  placement: "bottomRight",
2314
- open: o,
2441
+ overlayClassName: Z("shoteasy-components", o.editor.isDark && "dark-mode"),
2442
+ open: i,
2315
2443
  onOpenChange: n,
2316
2444
  children: /* @__PURE__ */ e.jsx(
2317
- T,
2445
+ k,
2318
2446
  {
2319
2447
  type: "text",
2320
2448
  shape: "circle",
2321
- className: G(o && "shadow-md"),
2322
- icon: /* @__PURE__ */ e.jsx(A.LayoutGrid, { size: 18 })
2449
+ className: Z(i && "shadow-md"),
2450
+ icon: /* @__PURE__ */ e.jsx(M.LayoutGrid, { size: 18 })
2323
2451
  }
2324
2452
  )
2325
2453
  }
2326
2454
  );
2327
- }), as = Y(() => {
2328
- const [o, t] = O(!1), [n, s] = O("ShotEasy"), [a, l] = O("#00000030"), [d, f] = O(45), u = (h) => {
2329
- l(typeof h == "string" ? h : h.toRgbString());
2455
+ }), ws = B(() => {
2456
+ const [i, t] = O(!1), [n, s] = O("ShotEasy"), [a, l] = O("#00000030"), [h, f] = O(45), d = (p) => {
2457
+ l(typeof p == "string" ? p : p.toRgbString());
2330
2458
  };
2331
- return M(() => {
2332
- if (o && n.trim()) {
2333
- const h = zo({
2459
+ return N(() => {
2460
+ if (i && n.trim()) {
2461
+ const p = Wi({
2334
2462
  text: n,
2335
2463
  color: a,
2336
- angleDegrees: d
2464
+ angleDegrees: h
2337
2465
  });
2338
- r.option.setWaterImg(h);
2466
+ o.option.setWaterImg(p);
2339
2467
  } else
2340
- r.option.setWaterImg(null);
2341
- }, [o, n, a, d]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2468
+ o.option.setWaterImg(null);
2469
+ }, [i, n, a, h]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2342
2470
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm flex gap-4 items-center justify-between", children: [
2343
2471
  /* @__PURE__ */ e.jsx("label", { children: "Watermark" }),
2344
- /* @__PURE__ */ e.jsx(st, { defaultChecked: o, onChange: t, size: "small", className: "bg-slate-200" })
2472
+ /* @__PURE__ */ e.jsx(at, { defaultChecked: i, onChange: t, size: "small", className: "bg-slate-200" })
2345
2473
  ] }),
2346
- o && /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-xs grid gap-3 pl-2 pt-2", children: [
2347
- /* @__PURE__ */ e.jsx(di, { defaultValue: n, placeholder: "Watermark content", onChange: (h) => s(h.target.value) }),
2474
+ i && /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-xs grid gap-3 pl-2 pt-2", children: [
2475
+ /* @__PURE__ */ e.jsx(xr, { defaultValue: n, placeholder: "Watermark content", onChange: (p) => s(p.target.value) }),
2348
2476
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
2349
2477
  /* @__PURE__ */ e.jsx("label", { children: "Color" }),
2350
- /* @__PURE__ */ e.jsx(xe, { value: a, onChange: u, size: "small" })
2478
+ /* @__PURE__ */ e.jsx(be, { value: a, onChange: d, size: "small" })
2351
2479
  ] }),
2352
2480
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
2353
2481
  /* @__PURE__ */ e.jsx("label", { children: "Direction" }),
2354
- /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(L.Group, { defaultValue: d, onChange: (h) => f(h.target.value), size: "small", children: [
2355
- /* @__PURE__ */ e.jsx(L.Button, { value: -45, children: /* @__PURE__ */ e.jsx(A.ArrowUpRight, { size: 16, className: "mt-[3px]" }) }),
2356
- /* @__PURE__ */ e.jsx(L.Button, { value: 45, children: /* @__PURE__ */ e.jsx(A.ArrowDownRight, { size: 16, className: "mt-[3px]" }) })
2482
+ /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(P.Group, { defaultValue: h, onChange: (p) => f(p.target.value), size: "small", children: [
2483
+ /* @__PURE__ */ e.jsx(P.Button, { value: -45, children: /* @__PURE__ */ e.jsx(M.ArrowUpRight, { size: 16, className: "mt-[3px]" }) }),
2484
+ /* @__PURE__ */ e.jsx(P.Button, { value: 45, children: /* @__PURE__ */ e.jsx(M.ArrowDownRight, { size: 16, className: "mt-[3px]" }) })
2357
2485
  ] }) })
2358
2486
  ] }),
2359
2487
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
2360
2488
  /* @__PURE__ */ e.jsx("label", { children: "Only Background" }),
2361
- /* @__PURE__ */ e.jsx(st, { size: "small", onChange: (h) => r.option.setWaterIndex(h ? -1 : 1), className: "bg-slate-200" })
2489
+ /* @__PURE__ */ e.jsx(at, { size: "small", onChange: (p) => o.option.setWaterIndex(p ? -1 : 1), className: "bg-slate-200" })
2362
2490
  ] })
2363
2491
  ] })
2364
2492
  ] });
2365
2493
  });
2366
- function ls(o, t, n) {
2367
- const s = ue(o), a = ue(t);
2368
- M(() => {
2369
- s.current = o, a.current = t;
2370
- }, [...n]), M(() => {
2371
- const l = Ct(window, {
2372
- "$mod+KeyS": (d) => {
2373
- d.preventDefault(), s.current && s.current();
2494
+ function ys(i, t, n) {
2495
+ const s = ne(i), a = ne(t);
2496
+ N(() => {
2497
+ s.current = i, a.current = t;
2498
+ }, [...n]), N(() => {
2499
+ const l = Rt(window, {
2500
+ "$mod+KeyS": (h) => {
2501
+ h.preventDefault(), s.current && s.current();
2374
2502
  },
2375
- "$mod+KeyC": (d) => {
2376
- d.preventDefault(), a && a.current();
2503
+ "$mod+KeyC": (h) => {
2504
+ h.preventDefault(), a && a.current();
2377
2505
  }
2378
2506
  });
2379
2507
  return () => {
@@ -2381,68 +2509,68 @@ function ls(o, t, n) {
2381
2509
  };
2382
2510
  }, [window]);
2383
2511
  }
2384
- const cs = Y(() => {
2385
- var N;
2386
- const [o, t] = O(!1), [n, s] = O(!1), [a, l] = O("png"), [d, f] = O(1), u = (x) => {
2512
+ const vs = B(() => {
2513
+ var A;
2514
+ const [i, t] = O(!1), [n, s] = O(!1), [a, l] = O("png"), [h, f] = O(1), d = (x) => {
2387
2515
  s(x);
2388
- }, h = async () => {
2389
- if (!r.editor.isEditing || o) return;
2516
+ }, p = async () => {
2517
+ if (!o.editor.isEditing || i) return;
2390
2518
  const x = {
2391
- pixelRatio: d
2519
+ pixelRatio: h
2392
2520
  };
2393
2521
  ["jpg", "webp"].includes(a) && (x.quality = 0.9, x.fill = "#ffffff");
2394
- const v = he();
2395
- t(!0), r.editor.message.open({
2396
- key: v,
2522
+ const w = ge();
2523
+ t(!0), o.editor.message.open({
2524
+ key: w,
2397
2525
  type: "loading",
2398
2526
  content: "Downloading..."
2399
- }), await r.editor.app.tree.export(a, x).then((H) => {
2527
+ }), await o.editor.app.tree.export(a, x).then((S) => {
2400
2528
  let _ = "ShotEasy";
2401
- d > 1 && (_ += `@${d}`), So(H.data, `${_}.${a}`), r.editor.message.open({
2402
- key: v,
2529
+ h > 1 && (_ += `@${h}`), Oi(S.data, `${_}.${a}`), o.editor.message.open({
2530
+ key: w,
2403
2531
  type: "success",
2404
2532
  content: "Download Success!"
2405
2533
  });
2406
2534
  }).catch(() => {
2407
- r.editor.message.open({
2408
- key: v,
2535
+ o.editor.message.open({
2536
+ key: w,
2409
2537
  type: "error",
2410
2538
  content: "Download failed!"
2411
2539
  });
2412
2540
  }), t(!1);
2413
- }, g = async () => {
2414
- if (!r.editor.isEditing || o) return;
2415
- const x = he();
2416
- t(!0), r.editor.message.open({
2541
+ }, m = async () => {
2542
+ if (!o.editor.isEditing || i) return;
2543
+ const x = ge();
2544
+ t(!0), o.editor.message.open({
2417
2545
  key: x,
2418
2546
  type: "loading",
2419
2547
  content: "Copying..."
2420
- }), await r.editor.app.tree.export("png", { blob: !0, pixelRatio: d }).then(async (v) => {
2421
- const { data: H } = v;
2548
+ }), await o.editor.app.tree.export("png", { blob: !0, pixelRatio: h }).then(async (w) => {
2549
+ const { data: S } = w;
2422
2550
  await navigator.clipboard.write([
2423
2551
  new ClipboardItem({
2424
- [H.type]: H
2552
+ [S.type]: S
2425
2553
  })
2426
- ]), r.editor.message.open({
2554
+ ]), o.editor.message.open({
2427
2555
  key: x,
2428
2556
  type: "success",
2429
2557
  content: "Copy Success!"
2430
2558
  });
2431
2559
  }).catch(() => {
2432
- r.editor.message.open({
2560
+ o.editor.message.open({
2433
2561
  key: x,
2434
2562
  type: "error",
2435
2563
  content: "Copy failed!"
2436
2564
  });
2437
2565
  }), t(!1);
2438
- }, y = () => {
2439
- r.editor.clearImg();
2566
+ }, b = () => {
2567
+ o.editor.destroy(), o.editor.clearImg(), o.editor.clearFun && o.editor.clearFun();
2440
2568
  };
2441
- ls(() => h(), () => g(), [h, g]);
2442
- const S = /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "p-2 [&_.ant-segmented]:w-full [&_.ant-segmented-item]:w-[33%]", children: [
2569
+ ys(() => p(), () => m(), [p, m]);
2570
+ const C = /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "p-2 [&_.ant-segmented]:w-full [&_.ant-segmented-item]:w-[33%]", children: [
2443
2571
  /* @__PURE__ */ e.jsx("div", { className: "text-xs text-gray-400 mb-2", children: "Format" }),
2444
2572
  /* @__PURE__ */ e.jsx(
2445
- nt,
2573
+ lt,
2446
2574
  {
2447
2575
  options: ["png", "jpg", "webp"],
2448
2576
  size: "middle",
@@ -2451,72 +2579,72 @@ const cs = Y(() => {
2451
2579
  ),
2452
2580
  /* @__PURE__ */ e.jsx("div", { className: "text-xs text-gray-400 mt-2 mb-2", children: "Pixel Ratio" }),
2453
2581
  /* @__PURE__ */ e.jsx(
2454
- nt,
2582
+ lt,
2455
2583
  {
2456
2584
  options: [{ value: 1, icon: "1x" }, { value: 2, icon: "2x" }, { value: 3, icon: "3x" }],
2457
2585
  size: "middle",
2458
2586
  onChange: f
2459
2587
  }
2460
2588
  ),
2461
- r.option.frameConf.width && /* @__PURE__ */ e.jsxs("div", { className: "text-xs p-3 mt-4 flex justify-between bg-black/5 rounded-md", children: [
2589
+ o.option.frameConf.width && /* @__PURE__ */ e.jsxs("div", { className: "text-xs p-3 mt-4 flex justify-between bg-black/5 rounded-md", children: [
2462
2590
  /* @__PURE__ */ e.jsx("span", { className: "text-gray-400", children: "Download Size" }),
2463
2591
  /* @__PURE__ */ e.jsxs("span", { className: "text-gray-700", children: [
2464
- r.option.frameConf.width * d,
2592
+ o.option.frameConf.width * h,
2465
2593
  " x ",
2466
- r.option.frameConf.height * d
2594
+ o.option.frameConf.height * h
2467
2595
  ] })
2468
2596
  ] })
2469
2597
  ] }) });
2470
2598
  return /* @__PURE__ */ e.jsxs("div", { className: "shrink-0 py-4 px-6 flex gap-2 justify-center items-center", children: [
2471
2599
  /* @__PURE__ */ e.jsx(
2472
- fi,
2600
+ Nt,
2473
2601
  {
2474
2602
  theme: {
2475
2603
  components: {
2476
2604
  Button: {
2477
- colorPrimary: "#000",
2605
+ colorPrimary: o.editor.isDark ? "#2b4acb" : "#000",
2478
2606
  algorithm: !0
2479
2607
  // 启用算法
2480
2608
  }
2481
2609
  }
2482
2610
  },
2483
2611
  children: /* @__PURE__ */ e.jsxs("div", { className: "ant-space-compact flex flex-1", children: [
2484
- /* @__PURE__ */ e.jsx(F, { placement: "top", title: /* @__PURE__ */ e.jsxs("span", { children: [
2612
+ /* @__PURE__ */ e.jsx(L, { placement: "top", title: /* @__PURE__ */ e.jsxs("span", { children: [
2485
2613
  "Download ",
2486
- ft,
2614
+ gt,
2487
2615
  " + S"
2488
2616
  ] }), children: /* @__PURE__ */ e.jsx(
2489
- T,
2617
+ k,
2490
2618
  {
2491
2619
  type: "primary",
2492
2620
  size: "large",
2493
- loading: o,
2494
- icon: /* @__PURE__ */ e.jsx(A.ImageDown, { size: 18 }),
2621
+ loading: i,
2622
+ icon: /* @__PURE__ */ e.jsx(M.ImageDown, { size: 18 }),
2495
2623
  className: "rounded-se-none flex-1 rounded-ee-none me-[-1px] hover:z-[1] border-r-white/30",
2496
- onClick: h,
2624
+ onClick: p,
2497
2625
  children: /* @__PURE__ */ e.jsxs("div", { className: "leading-4 px-2", children: [
2498
2626
  /* @__PURE__ */ e.jsx("div", { className: "text-sm leading-4 font-semibold", children: "Download" }),
2499
2627
  /* @__PURE__ */ e.jsxs("div", { className: "text-xs", children: [
2500
- d,
2628
+ h,
2501
2629
  "x as ",
2502
2630
  a.toLocaleUpperCase()
2503
2631
  ] })
2504
2632
  ] })
2505
2633
  }
2506
2634
  ) }),
2507
- /* @__PURE__ */ e.jsx(F, { placement: "top", title: /* @__PURE__ */ e.jsxs("span", { children: [
2635
+ /* @__PURE__ */ e.jsx(L, { placement: "top", title: /* @__PURE__ */ e.jsxs("span", { children: [
2508
2636
  "Copy ",
2509
- ft,
2637
+ gt,
2510
2638
  " + C"
2511
2639
  ] }), children: /* @__PURE__ */ e.jsx(
2512
- T,
2640
+ k,
2513
2641
  {
2514
2642
  type: "primary",
2515
2643
  size: "large",
2516
- icon: /* @__PURE__ */ e.jsx(A.Copy, { size: 18 }),
2517
- loading: o,
2644
+ icon: /* @__PURE__ */ e.jsx(M.Copy, { size: 18 }),
2645
+ loading: i,
2518
2646
  className: "rounded-ss-none rounded-es-none border-l-white/30",
2519
- onClick: g
2647
+ onClick: m
2520
2648
  }
2521
2649
  ) })
2522
2650
  ] })
@@ -2524,9 +2652,9 @@ const cs = Y(() => {
2524
2652
  ),
2525
2653
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
2526
2654
  /* @__PURE__ */ e.jsx(
2527
- ge,
2655
+ xe,
2528
2656
  {
2529
- content: S,
2657
+ content: C,
2530
2658
  trigger: "click",
2531
2659
  arrow: !1,
2532
2660
  placement: "topRight",
@@ -2534,197 +2662,250 @@ const cs = Y(() => {
2534
2662
  overlayStyle: {
2535
2663
  width: "320px"
2536
2664
  },
2537
- onOpenChange: u,
2538
- children: /* @__PURE__ */ e.jsx(T, { size: "large", icon: /* @__PURE__ */ e.jsx(A.Settings2, { size: 18 }) })
2665
+ onOpenChange: d,
2666
+ children: /* @__PURE__ */ e.jsx(k, { size: "large", icon: /* @__PURE__ */ e.jsx(M.Settings2, { size: 18 }) })
2539
2667
  }
2540
2668
  ),
2541
- ((N = r.editor.img) == null ? void 0 : N.src) && /* @__PURE__ */ e.jsx(
2542
- pi,
2669
+ ((A = o.editor.img) == null ? void 0 : A.src) && /* @__PURE__ */ e.jsx(
2670
+ br,
2543
2671
  {
2544
2672
  title: "Delete the screenshot",
2545
2673
  description: "Are you sure to delete this screenshot?",
2546
- onConfirm: y,
2674
+ placement: "topRight",
2675
+ onConfirm: b,
2547
2676
  okText: "Yes",
2548
2677
  cancelText: "No",
2549
- children: /* @__PURE__ */ e.jsx(T, { size: "large", icon: /* @__PURE__ */ e.jsx(A.Trash2, { size: 18 }) })
2678
+ children: /* @__PURE__ */ e.jsx(k, { size: "large", icon: /* @__PURE__ */ e.jsx(M.Trash2, { size: 18 }) })
2550
2679
  }
2551
2680
  )
2552
2681
  ] })
2553
2682
  ] });
2554
- }), ds = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%3e%3cpath%20d='M311.296%20428.544V40.96C186.368%2094.208%2087.552%20195.072%2036.864%20321.024l274.432%20274.432V428.544z'%20fill='%2337C15C'%3e%3c/path%3e%3cpath%20d='M428.544%20311.296l274.432-274.432C642.048%2012.288%20577.536%200%20512%200%20440.832%200%20372.736%2014.848%20311.296%2040.96v387.584l117.248-117.248z'%20fill='%23A9E247'%3e%3c/path%3e%3cpath%20d='M983.04%20311.296h-387.584l117.248%20117.248%20274.432%20274.432c24.576-60.416%2036.864-125.44%2036.864-190.976%200-71.168-14.848-139.264-40.96-200.704z'%20fill='%23FF7D12'%3e%3c/path%3e%3cpath%20d='M712.704%20595.456V983.04c124.928-53.248%20223.744-154.112%20274.432-280.064l-274.432-274.432v166.912z'%20fill='%23F93B21'%3e%3c/path%3e%3cpath%20d='M595.456%20712.704l-274.432%20274.432c60.928%2024.576%20125.44%2036.864%20190.976%2036.864%2071.168%200%20139.264-14.848%20200.704-40.96v-387.584l-117.248%20117.248z'%20fill='%23846FEF'%3e%3c/path%3e%3cpath%20d='M428.544%20712.704H40.96c53.248%20124.928%20154.112%20223.744%20280.064%20274.432l274.432-274.432H428.544z'%20fill='%231E95FF'%3e%3c/path%3e%3cpath%20d='M311.296%20595.456L36.864%20321.024C12.288%20381.952%200%20446.464%200%20512c0%2071.168%2014.848%20139.264%2040.96%20200.704h387.584l-117.248-117.248z'%20fill='%2314EFEF'%3e%3c/path%3e%3cpath%20d='M595.456%20311.296H983.04c-53.248-124.928-154.112-223.744-280.064-274.432L428.544%20311.296h166.912z'%20fill='%23FFC931'%3e%3c/path%3e%3c/svg%3e", wt = ["cosmic", "desktop"], pe = ({ type: o, options: t, onChange: n, value: s }) => {
2683
+ }), js = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%3e%3cpath%20d='M311.296%20428.544V40.96C186.368%2094.208%2087.552%20195.072%2036.864%20321.024l274.432%20274.432V428.544z'%20fill='%2337C15C'%3e%3c/path%3e%3cpath%20d='M428.544%20311.296l274.432-274.432C642.048%2012.288%20577.536%200%20512%200%20440.832%200%20372.736%2014.848%20311.296%2040.96v387.584l117.248-117.248z'%20fill='%23A9E247'%3e%3c/path%3e%3cpath%20d='M983.04%20311.296h-387.584l117.248%20117.248%20274.432%20274.432c24.576-60.416%2036.864-125.44%2036.864-190.976%200-71.168-14.848-139.264-40.96-200.704z'%20fill='%23FF7D12'%3e%3c/path%3e%3cpath%20d='M712.704%20595.456V983.04c124.928-53.248%20223.744-154.112%20274.432-280.064l-274.432-274.432v166.912z'%20fill='%23F93B21'%3e%3c/path%3e%3cpath%20d='M595.456%20712.704l-274.432%20274.432c60.928%2024.576%20125.44%2036.864%20190.976%2036.864%2071.168%200%20139.264-14.848%20200.704-40.96v-387.584l-117.248%20117.248z'%20fill='%23846FEF'%3e%3c/path%3e%3cpath%20d='M428.544%20712.704H40.96c53.248%20124.928%20154.112%20223.744%20280.064%20274.432l274.432-274.432H428.544z'%20fill='%231E95FF'%3e%3c/path%3e%3cpath%20d='M311.296%20595.456L36.864%20321.024C12.288%20381.952%200%20446.464%200%20512c0%2071.168%2014.848%20139.264%2040.96%20200.704h387.584l-117.248-117.248z'%20fill='%2314EFEF'%3e%3c/path%3e%3cpath%20d='M595.456%20311.296H983.04c-53.248-124.928-154.112-223.744-280.064-274.432L428.544%20311.296h166.912z'%20fill='%23FFC931'%3e%3c/path%3e%3c/svg%3e", Ct = ["cosmic", "desktop"], me = ({ type: i, options: t, onChange: n, value: s }) => {
2555
2684
  let a = [];
2556
2685
  if (t && t.length)
2557
2686
  a = t;
2558
2687
  else {
2559
2688
  const l = [];
2560
- Object.keys(Q).map((d) => {
2561
- d.includes(o) && l.push({
2562
- key: d,
2563
- value: Q[d]
2689
+ Object.keys(Q).map((h) => {
2690
+ h.includes(i) && l.push({
2691
+ key: h,
2692
+ value: Q[h]
2564
2693
  });
2565
2694
  }), a = l;
2566
2695
  }
2567
2696
  return /* @__PURE__ */ e.jsx(
2568
- L.Group,
2697
+ P.Group,
2569
2698
  {
2570
2699
  onChange: (l) => n(l.target.value),
2571
2700
  value: s,
2572
- rootClassName: G(
2701
+ rootClassName: Z(
2573
2702
  "grid [&_span]:ps-0",
2574
- wt.includes(o) ? "grid-cols-5 gap-y-1.5" : "grid-cols-7 gap-y-3"
2703
+ Ct.includes(i) ? "grid-cols-5 gap-y-1.5" : "grid-cols-7 gap-y-3"
2575
2704
  ),
2576
- children: a.map((l, d) => /* @__PURE__ */ e.jsx(
2577
- L,
2705
+ children: a.map((l, h) => /* @__PURE__ */ e.jsx(
2706
+ P,
2578
2707
  {
2579
2708
  className: "[&_.ant-radio]:hidden [&_span]:p-0 mr-0",
2580
2709
  value: l.key,
2581
- children: wt.includes(o) ? /* @__PURE__ */ e.jsx("div", { className: G("w-12 h-8 rounded-md overflow-hidden"), children: /* @__PURE__ */ e.jsx("img", { src: `${l.value.class}&w=48`, className: "w-full h-full object-cover object-center" }) }) : /* @__PURE__ */ e.jsx("div", { className: G("w-8 h-8 rounded-full overflow-hidden", l.value.class) })
2710
+ children: Ct.includes(i) ? /* @__PURE__ */ e.jsx("div", { className: Z("w-12 h-8 rounded-md overflow-hidden"), children: /* @__PURE__ */ e.jsx("img", { src: `${l.value.class}&w=48`, className: "w-full h-full object-cover object-center" }) }) : /* @__PURE__ */ e.jsx("div", { className: Z("w-8 h-8 rounded-full overflow-hidden", l.value.class) })
2582
2711
  },
2583
- d
2712
+ h
2584
2713
  ))
2585
2714
  }
2586
2715
  );
2587
- }, fs = Y(({ showMore: o, onChange: t }) => {
2716
+ }, Ms = B(({ showMore: i, onChange: t }) => {
2588
2717
  const n = () => {
2589
2718
  t(!1);
2590
2719
  }, s = (l) => {
2591
- const d = l.toHexString();
2592
- r.option.frameConf.background = {
2720
+ const h = l.toHexString();
2721
+ o.option.frameConf.background = {
2593
2722
  type: "solid",
2594
- color: d
2723
+ color: h
2595
2724
  };
2596
2725
  }, a = (l) => {
2597
- r.option.setBackground(l);
2726
+ o.option.setBackground(l);
2598
2727
  };
2599
2728
  return /* @__PURE__ */ e.jsx(
2600
- ui,
2729
+ wr,
2601
2730
  {
2602
2731
  title: "",
2603
2732
  placement: "right",
2604
2733
  closable: !1,
2605
2734
  mask: !1,
2606
2735
  onClose: n,
2607
- open: o,
2736
+ open: i,
2608
2737
  getContainer: !1,
2609
2738
  width: "100%",
2610
2739
  className: "[&_.ant-drawer-body]:p-0",
2611
2740
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-hidden", children: [
2612
2741
  /* @__PURE__ */ e.jsx("div", { className: "shrink-0 pt-4 px-4", children: /* @__PURE__ */ e.jsx(
2613
- T,
2742
+ k,
2614
2743
  {
2615
2744
  type: "text",
2616
2745
  size: "small",
2617
2746
  className: "text-xs flex items-center opacity-80 m-0",
2618
- icon: /* @__PURE__ */ e.jsx(A.ChevronLeft, { size: 16 }),
2747
+ icon: /* @__PURE__ */ e.jsx(M.ChevronRight, { size: 16 }),
2748
+ iconPosition: "end",
2619
2749
  onClick: () => t(!1),
2620
2750
  children: "Back"
2621
2751
  }
2622
2752
  ) }),
2623
2753
  /* @__PURE__ */ e.jsxs("div", { className: "h-0 flex-1 overflow-y-auto px-4 py-2", children: [
2624
2754
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Custom" }),
2625
- /* @__PURE__ */ e.jsx("div", { className: "py-1", children: /* @__PURE__ */ e.jsx(xe, { onChange: s, children: /* @__PURE__ */ e.jsx(T, { type: "default", size: "small", shape: "circle", icon: /* @__PURE__ */ e.jsx("img", { src: ds, width: 18 }) }) }) }),
2755
+ /* @__PURE__ */ e.jsx("div", { className: "py-1", children: /* @__PURE__ */ e.jsx(be, { onChange: s, children: /* @__PURE__ */ e.jsx(k, { type: "default", size: "small", shape: "circle", icon: /* @__PURE__ */ e.jsx("img", { src: js, width: 18 }) }) }) }),
2626
2756
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Solid Colors" }),
2627
- /* @__PURE__ */ e.jsx(pe, { type: "solid", onChange: a, value: r.option.background }),
2757
+ /* @__PURE__ */ e.jsx(me, { type: "solid", onChange: a, value: o.option.background }),
2628
2758
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Gradients" }),
2629
- /* @__PURE__ */ e.jsx(pe, { type: "gradient", onChange: a, value: r.option.background }),
2759
+ /* @__PURE__ */ e.jsx(me, { type: "gradient", onChange: a, value: o.option.background }),
2630
2760
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Cosmic Gradients" }),
2631
- /* @__PURE__ */ e.jsx(pe, { type: "cosmic", onChange: a, value: r.option.background }),
2761
+ /* @__PURE__ */ e.jsx(me, { type: "cosmic", onChange: a, value: o.option.background }),
2632
2762
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Desktop" }),
2633
- /* @__PURE__ */ e.jsx(pe, { type: "desktop", onChange: a, value: r.option.background })
2763
+ /* @__PURE__ */ e.jsx(me, { type: "desktop", onChange: a, value: o.option.background })
2634
2764
  ] })
2635
2765
  ] })
2636
2766
  }
2637
2767
  );
2638
- }), ps = Y(() => {
2639
- const [o, t] = O(!1), n = (s) => {
2768
+ }), Cs = B(() => {
2769
+ const [i, t] = O(!1), n = (s) => {
2770
+ o.option.setFrame(s.target.value);
2771
+ };
2772
+ return /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
2773
+ /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
2774
+ /* @__PURE__ */ e.jsx("label", { children: "Frame" }),
2775
+ /* @__PURE__ */ e.jsxs(
2776
+ k,
2777
+ {
2778
+ type: "text",
2779
+ size: "small",
2780
+ className: "text-xs flex items-center opacity-80 m-0",
2781
+ disabled: !0,
2782
+ onClick: () => t(!0),
2783
+ children: [
2784
+ "More ",
2785
+ /* @__PURE__ */ e.jsx(M.ChevronRight, { size: 16 })
2786
+ ]
2787
+ }
2788
+ )
2789
+ ] }),
2790
+ /* @__PURE__ */ e.jsx("div", { className: "py-3 [&_.ant-radio-wrapper_span]:p-0 [&_.ant-radio-wrapper_span]:px-1", children: /* @__PURE__ */ e.jsxs(
2791
+ P.Group,
2792
+ {
2793
+ rootClassName: "grid grid-cols-5",
2794
+ onChange: n,
2795
+ value: o.option.frame,
2796
+ children: [
2797
+ /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:mr-0 [&_span]:block [&_span]:w-full", value: "none", children: /* @__PURE__ */ e.jsx("div", { className: "bg-gray-300/30 rounded-md h-8 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "bg-slate-300/40 h-7 w-[85%] rounded-md shadow-md -mt-1 -ml-1" }) }) }),
2798
+ /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:mr-0 [&_span]:block [&_span]:w-full", value: "light", children: /* @__PURE__ */ e.jsx("div", { className: "bg-gray-300/30 rounded-md h-8 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "bg-slate-300/40 border-2 border-white/80 h-7 w-[85%] rounded-md shadow-md -mt-1 -ml-1" }) }) }),
2799
+ /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:mr-0 [&_span]:block [&_span]:w-full", value: "dark", children: /* @__PURE__ */ e.jsx("div", { className: "bg-gray-300/30 rounded-md h-8 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "bg-slate-300/40 border-2 border-black/40 h-7 w-[85%] rounded-md shadow-md -mt-1 -ml-1" }) }) }),
2800
+ /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:mr-0 [&_span]:block [&_span]:w-full", value: "macosBarLight", children: /* @__PURE__ */ e.jsx("div", { className: "bg-gray-300/30 rounded-md h-8 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "bg-slate-300/40 h-7 w-[85%] rounded-sm shadow-md mt-2 ml-3 overflow-hidden", children: /* @__PURE__ */ e.jsx(
2801
+ "div",
2802
+ {
2803
+ className: "h-1.5 bg-white/90 px-0.5 flex items-center gap-[1px] before:block before:rounded-full before:w-0.5 before:h-0.5 before:bg-red-500 after:w-0.5 after:h-0.5 after:bg-green-500",
2804
+ children: /* @__PURE__ */ e.jsx("i", { className: "block w-0.5 h-0.5 bg-yellow-500" })
2805
+ }
2806
+ ) }) }) }),
2807
+ /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:mr-0 [&_span]:block [&_span]:w-full", value: "macosBarDark", children: /* @__PURE__ */ e.jsx("div", { className: "bg-gray-300/30 rounded-md h-8 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "bg-slate-300/40 h-7 w-[85%] rounded-sm shadow-md mt-2 ml-3 overflow-hidden", children: /* @__PURE__ */ e.jsx(
2808
+ "div",
2809
+ {
2810
+ className: "h-1.5 bg-black/90 px-0.5 flex items-center gap-[1px] before:block before:rounded-full before:w-0.5 before:h-0.5 before:bg-red-500 after:w-0.5 after:h-0.5 after:bg-green-500",
2811
+ children: /* @__PURE__ */ e.jsx("i", { className: "block w-0.5 h-0.5 bg-yellow-500" })
2812
+ }
2813
+ ) }) }) })
2814
+ ]
2815
+ }
2816
+ ) })
2817
+ ] });
2818
+ }), ks = B(() => {
2819
+ const [i, t] = O(!1), n = (s) => {
2640
2820
  const a = s.target.value;
2641
- r.option.setBackground(a);
2821
+ o.option.setBackground(a);
2642
2822
  };
2643
- return /* @__PURE__ */ e.jsxs("div", { className: "bg-white flex flex-col md:w-[340px] border-l border-l-gray-50 shadow-lg relative z-10 select-none", children: [
2823
+ return /* @__PURE__ */ e.jsxs("div", { className: "bg-white dark:bg-black flex flex-col md:w-[340px] border-l border-l-gray-50 dark:border-l-gray-700 dark:text-gray-400 shadow-lg relative z-10 select-none", children: [
2644
2824
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex-col gap-2 p-4 overflow-y-auto overflow-x-hidden", children: [
2645
- /* @__PURE__ */ e.jsx(os, {}),
2825
+ /* @__PURE__ */ e.jsx(ms, {}),
2646
2826
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold pt-2 [&_label]:text-sm", children: [
2647
2827
  /* @__PURE__ */ e.jsx("label", { children: "Quick" }),
2648
2828
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-4 items-center py-2", children: [
2649
- /* @__PURE__ */ e.jsx(rs, {}),
2829
+ /* @__PURE__ */ e.jsx(gs, {}),
2650
2830
  /* @__PURE__ */ e.jsx(
2651
- T,
2831
+ k,
2652
2832
  {
2653
2833
  type: "text",
2654
2834
  shape: "circle",
2655
- onClick: () => r.option.toggleFlip("x"),
2656
- icon: /* @__PURE__ */ e.jsx(A.FlipHorizontal2, { size: 18 })
2835
+ onClick: () => o.option.toggleFlip("x"),
2836
+ icon: /* @__PURE__ */ e.jsx(M.FlipHorizontal2, { size: 18 })
2657
2837
  }
2658
2838
  ),
2659
2839
  /* @__PURE__ */ e.jsx(
2660
- T,
2840
+ k,
2661
2841
  {
2662
2842
  type: "text",
2663
2843
  shape: "circle",
2664
- onClick: () => r.option.toggleFlip("y"),
2665
- icon: /* @__PURE__ */ e.jsx(A.FlipVertical2, { size: 18 })
2844
+ onClick: () => o.option.toggleFlip("y"),
2845
+ icon: /* @__PURE__ */ e.jsx(M.FlipVertical2, { size: 18 })
2666
2846
  }
2667
2847
  ),
2668
- /* @__PURE__ */ e.jsx(ns, {})
2848
+ /* @__PURE__ */ e.jsx(bs, {})
2669
2849
  ] })
2670
2850
  ] }),
2671
2851
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
2672
2852
  /* @__PURE__ */ e.jsx("label", { children: "Scale" }),
2673
2853
  /* @__PURE__ */ e.jsx(
2674
- de,
2854
+ pe,
2675
2855
  {
2676
2856
  min: 0.1,
2677
2857
  max: 2,
2678
2858
  step: 0.1,
2679
- onChange: (s) => r.option.setScale(s),
2680
- value: typeof r.option.scale == "number" ? r.option.scale : 1
2859
+ onChange: (s) => o.option.setScale(s),
2860
+ value: typeof o.option.scale == "number" ? o.option.scale : 1
2681
2861
  }
2682
2862
  )
2683
2863
  ] }),
2684
2864
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
2685
2865
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between", children: [
2686
2866
  /* @__PURE__ */ e.jsx("label", { children: "Padding" }),
2687
- /* @__PURE__ */ e.jsx(xe, { value: r.option.paddingBg, onChange: (s) => r.option.setPaddingBg(s.toRgbString()), size: "small" })
2867
+ /* @__PURE__ */ e.jsx(be, { value: o.option.paddingBg, onChange: (s) => o.option.setPaddingBg(s.toRgbString()), size: "small" })
2688
2868
  ] }),
2689
2869
  /* @__PURE__ */ e.jsx(
2690
- de,
2870
+ pe,
2691
2871
  {
2692
2872
  min: 0,
2693
2873
  max: 60,
2694
- onChange: (s) => r.option.setPadding(s),
2695
- value: typeof r.option.padding == "number" ? r.option.padding : 0
2874
+ onChange: (s) => o.option.setPadding(s),
2875
+ value: typeof o.option.padding == "number" ? o.option.padding : 0
2696
2876
  }
2697
2877
  )
2698
2878
  ] }),
2699
2879
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
2700
2880
  /* @__PURE__ */ e.jsx("label", { children: "Rounded" }),
2701
2881
  /* @__PURE__ */ e.jsx(
2702
- de,
2882
+ pe,
2703
2883
  {
2704
2884
  min: 0,
2705
2885
  max: 20,
2706
- onChange: (s) => r.option.setRound(s),
2707
- value: typeof r.option.round == "number" ? r.option.round : 0
2886
+ onChange: (s) => o.option.setRound(s),
2887
+ value: typeof o.option.round == "number" ? o.option.round : 0
2708
2888
  }
2709
2889
  )
2710
2890
  ] }),
2711
2891
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
2712
2892
  /* @__PURE__ */ e.jsx("label", { children: "Shadow" }),
2713
2893
  /* @__PURE__ */ e.jsx(
2714
- de,
2894
+ pe,
2715
2895
  {
2716
2896
  min: 0,
2717
2897
  max: 6,
2718
- onChange: (s) => r.option.setShadow(s),
2719
- value: typeof r.option.shadow == "number" ? r.option.shadow : 0
2898
+ onChange: (s) => o.option.setShadow(s),
2899
+ value: typeof o.option.shadow == "number" ? o.option.shadow : 0
2720
2900
  }
2721
2901
  )
2722
2902
  ] }),
2903
+ /* @__PURE__ */ e.jsx(Cs, {}),
2723
2904
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
2724
2905
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
2725
2906
  /* @__PURE__ */ e.jsx("label", { children: "Background" }),
2726
2907
  /* @__PURE__ */ e.jsxs(
2727
- T,
2908
+ k,
2728
2909
  {
2729
2910
  type: "text",
2730
2911
  size: "small",
@@ -2732,90 +2913,90 @@ const cs = Y(() => {
2732
2913
  onClick: () => t(!0),
2733
2914
  children: [
2734
2915
  "More ",
2735
- /* @__PURE__ */ e.jsx(A.ChevronRight, { size: 16 })
2916
+ /* @__PURE__ */ e.jsx(M.ChevronRight, { size: 16 })
2736
2917
  ]
2737
2918
  }
2738
2919
  )
2739
2920
  ] }),
2740
2921
  /* @__PURE__ */ e.jsx("div", { className: "py-3", children: /* @__PURE__ */ e.jsxs(
2741
- L.Group,
2922
+ P.Group,
2742
2923
  {
2743
2924
  onChange: n,
2744
- value: r.option.background,
2925
+ value: o.option.background,
2745
2926
  rootClassName: "grid grid-cols-7 [&_span]:ps-0",
2746
2927
  children: [
2747
- /* @__PURE__ */ e.jsx(L, { className: "[&_.ant-radio]:hidden [&_span]:p-0 mr-0", value: "default_1", children: /* @__PURE__ */ e.jsx("div", { className: G("w-8 h-8 rounded-full", Q.default_1.class) }) }),
2928
+ /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:p-0 mr-0", value: "default_1", children: /* @__PURE__ */ e.jsx("div", { className: Z("w-8 h-8 rounded-full", Q.default_1.class) }) }),
2748
2929
  Object.keys(Q).map((s) => {
2749
- if (s.includes("default") && s !== "default_1") return /* @__PURE__ */ e.jsx(L, { className: "[&_.ant-radio]:hidden [&_span]:p-0 mr-0", value: s, children: /* @__PURE__ */ e.jsx("div", { className: G("w-8 h-8 rounded-full", Q[s].class) }) }, s);
2930
+ if (s.includes("default") && s !== "default_1") return /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:p-0 mr-0", value: s, children: /* @__PURE__ */ e.jsx("div", { className: Z("w-8 h-8 rounded-full", Q[s].class) }) }, s);
2750
2931
  })
2751
2932
  ]
2752
2933
  }
2753
2934
  ) })
2754
2935
  ] }),
2755
- /* @__PURE__ */ e.jsx(as, {})
2936
+ /* @__PURE__ */ e.jsx(ws, {})
2756
2937
  ] }),
2757
- /* @__PURE__ */ e.jsx(cs, {}),
2758
- /* @__PURE__ */ e.jsx(fs, { showMore: o, onChange: t })
2938
+ /* @__PURE__ */ e.jsx(vs, {}),
2939
+ /* @__PURE__ */ e.jsx(Ms, { showMore: i, onChange: t })
2759
2940
  ] });
2760
- }), us = (o, t = []) => {
2761
- M(() => {
2941
+ }), As = (i, t = []) => {
2942
+ N(() => {
2762
2943
  const n = async (s) => {
2763
2944
  const a = s.clipboardData;
2764
2945
  if (!a || !a.items) return;
2765
2946
  const l = Array.from(a.items).filter(
2766
- (f) => At.includes(f.type)
2947
+ (f) => Dt.includes(f.type)
2767
2948
  );
2768
2949
  if (!l.length) return;
2769
- const d = l[0].getAsFile();
2770
- o && o(d);
2950
+ const h = l[0].getAsFile();
2951
+ i && i(h);
2771
2952
  };
2772
2953
  return document.addEventListener("paste", n, !1), () => {
2773
2954
  document.removeEventListener("paste", n);
2774
2955
  };
2775
2956
  }, [...t]);
2776
- }, hs = async () => {
2957
+ }, Ot = (i) => async (n, s = "blob") => {
2958
+ const a = window.URL || window.webkitURL || window, l = s === "blob" ? a.createObjectURL(n) : n, h = await Yi(l), f = Math.round(h.width), d = Math.round(h.height);
2959
+ if (i.editor.setImg({
2960
+ src: l,
2961
+ width: f,
2962
+ height: d,
2963
+ type: s === "blob" ? n.type : "image/png",
2964
+ name: s === "blob" ? n.name : "ShotEasy.png"
2965
+ }), i.option.size.type === "auto") {
2966
+ const p = we(f, d);
2967
+ i.option.setFrameSize(f + p, d + p);
2968
+ }
2969
+ }, Ns = async () => {
2777
2970
  try {
2778
- const o = await navigator.mediaDevices.getDisplayMedia(), t = document.createElement("video");
2779
- t.srcObject = o, t.play(), await new Promise((l) => t.onplaying = l);
2971
+ const i = await navigator.mediaDevices.getDisplayMedia(), t = document.createElement("video");
2972
+ t.srcObject = i, t.play(), await new Promise((l) => t.onplaying = l);
2780
2973
  const n = document.createElement("canvas");
2781
2974
  n.width = t.videoWidth, n.height = t.videoHeight, n.getContext("2d").drawImage(t, 0, 0);
2782
2975
  const a = n.toDataURL("image/png");
2783
2976
  return t.srcObject.getTracks().forEach((l) => l.stop()), a;
2784
- } catch (o) {
2785
- console.log("Error capturing screen:", o);
2977
+ } catch (i) {
2978
+ console.log("Error capturing screen:", i);
2786
2979
  }
2787
- }, { Dragger: ms } = hi, gs = Y(() => {
2788
- const o = async (a, l = "blob") => {
2789
- const d = window.URL || window.webkitURL || window, f = l === "blob" ? d.createObjectURL(a) : a, u = await Ro(f), h = Math.round(u.width), g = Math.round(u.height);
2790
- if (r.editor.setImg({
2791
- src: f,
2792
- width: h,
2793
- height: g,
2794
- type: l === "blob" ? a.type : "image/png",
2795
- name: l === "blob" ? a.name : "ShotEasy.png"
2796
- }), r.option.size.type === "auto") {
2797
- const y = Math.round(h * 0.2);
2798
- r.option.setFrameSize(h + y, g + y);
2799
- }
2800
- }, t = async (a) => (await o(a), Promise.reject()), n = async () => {
2801
- const a = await hs();
2802
- a && o(a, "dataURL");
2980
+ }, { Dragger: Ts } = yr, Ss = B(() => {
2981
+ const i = Ot(o), t = async (a) => (await i(a), Promise.reject()), n = async () => {
2982
+ const a = await Ns();
2983
+ a && i(a, "dataURL");
2803
2984
  }, s = () => {
2804
- r.editor.message.info("Developing, Coming soon!");
2985
+ o.editor.message.info("Developing, Coming soon!");
2805
2986
  };
2806
- return us((a) => {
2807
- o(a);
2808
- }), /* @__PURE__ */ e.jsx("div", { className: "md:w-0 md:flex-1 flex flex-col justify-center items-center overflow-hidden select-none relative", children: /* @__PURE__ */ e.jsxs("div", { className: G("max-w-[600px]", r.editor.invalid && "invalid"), children: [
2987
+ return As((a) => {
2988
+ i(a);
2989
+ }), /* @__PURE__ */ e.jsx("div", { className: "md:w-0 md:flex-1 flex flex-col justify-center items-center overflow-hidden select-none relative", children: /* @__PURE__ */ e.jsxs("div", { className: Z("max-w-[600px]", o.editor.invalid && "invalid"), children: [
2809
2990
  /* @__PURE__ */ e.jsx(
2810
- ms,
2991
+ Ts,
2811
2992
  {
2812
- accept: At.join(","),
2993
+ accept: Dt.join(","),
2813
2994
  name: "file",
2814
2995
  showUploadList: !1,
2815
2996
  beforeUpload: t,
2816
- rootClassName: "p-4 rounded-md bg-white block shadow-sm",
2997
+ rootClassName: "p-4 rounded-md bg-white dark:bg-black dark:text-gray-400 block shadow-sm",
2817
2998
  children: /* @__PURE__ */ e.jsxs("div", { className: "text-center p-10", children: [
2818
- /* @__PURE__ */ e.jsx("p", { className: "text-2xl my-2 opacity-60", children: /* @__PURE__ */ e.jsx(A.ImagePlus, { className: "mx-auto", size: 36 }) }),
2999
+ /* @__PURE__ */ e.jsx("p", { className: "text-2xl my-2 opacity-60", children: /* @__PURE__ */ e.jsx(M.ImagePlus, { className: "mx-auto", size: 36 }) }),
2819
3000
  /* @__PURE__ */ e.jsxs("p", { className: "text-sm px-4", children: [
2820
3001
  "Click or Drag image to this area",
2821
3002
  /* @__PURE__ */ e.jsx("br", {}),
@@ -2824,29 +3005,40 @@ const cs = Y(() => {
2824
3005
  ] })
2825
3006
  }
2826
3007
  ),
2827
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mt-4 py-4 px-6 rounded-md bg-white shadow-sm", children: [
2828
- /* @__PURE__ */ e.jsx(F, { placement: "top", arrow: !1, title: "Take a screenshot of desktop windows", children: /* @__PURE__ */ e.jsx(T, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(A.Camera, { size: 20 }), onClick: n }) }),
2829
- /* @__PURE__ */ e.jsx(F, { placement: "top", arrow: !1, title: "Beautify text", children: /* @__PURE__ */ e.jsx(T, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(A.Type, { size: 20 }), onClick: s }) }),
2830
- /* @__PURE__ */ e.jsx(F, { placement: "top", arrow: !1, title: "Beautify Code", children: /* @__PURE__ */ e.jsx(T, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(A.CodeXml, { size: 20, onClick: s }) }) }),
2831
- /* @__PURE__ */ e.jsx(F, { placement: "top", arrow: !1, title: "Create gif animate", children: /* @__PURE__ */ e.jsx(T, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(A.ImagePlay, { size: 20, onClick: s }) }) })
3008
+ /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mt-2 py-4 px-6 rounded-md bg-white dark:bg-black shadow-sm", children: [
3009
+ /* @__PURE__ */ e.jsx(L, { placement: "top", arrow: !1, title: "Take a screenshot of desktop windows", children: /* @__PURE__ */ e.jsx(k, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(M.Camera, { size: 20 }), onClick: n }) }),
3010
+ /* @__PURE__ */ e.jsx(L, { placement: "top", arrow: !1, title: "Beautify text", children: /* @__PURE__ */ e.jsx(k, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(M.Type, { size: 20 }), onClick: s }) }),
3011
+ /* @__PURE__ */ e.jsx(L, { placement: "top", arrow: !1, title: "Beautify Code", children: /* @__PURE__ */ e.jsx(k, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(M.CodeXml, { size: 20, onClick: s }) }) }),
3012
+ /* @__PURE__ */ e.jsx(L, { placement: "top", arrow: !1, title: "Create gif animate", children: /* @__PURE__ */ e.jsx(k, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(M.ImagePlay, { size: 20, onClick: s }) }) })
2832
3013
  ] })
2833
3014
  ] }) });
2834
- }), Ys = Y(() => {
2835
- var s;
2836
- const o = (s = r.editor.img) != null && s.src ? /* @__PURE__ */ e.jsx(es, {}) : /* @__PURE__ */ e.jsx(gs, {}), [t, n] = mi.useMessage();
2837
- return M(() => {
2838
- r.editor.setMessage(t);
2839
- }, [t]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2840
- n,
2841
- /* @__PURE__ */ e.jsxs("div", { className: "polka flex flex-col overflow-hidden antialiased w-full h-[100vh]", children: [
2842
- /* @__PURE__ */ e.jsx(Zo, {}),
2843
- /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col flex-1 h-0 md:flex-row md:items-stretch", children: [
2844
- o,
2845
- /* @__PURE__ */ e.jsx(ps, {})
2846
- ] })
2847
- ] })
2848
- ] });
3015
+ }), $s = B(({ defaultImg: i, headLeft: t, headRight: n, isDark: s, boxClassName: a = "", onClear: l }) => {
3016
+ var m;
3017
+ const h = Ot(o), f = (m = o.editor.img) != null && m.src ? /* @__PURE__ */ e.jsx(hs, {}) : /* @__PURE__ */ e.jsx(Ss, {}), [d, p] = vr.useMessage();
3018
+ return o.editor.setMessage(d), o.editor.setClearFun(l), le(() => {
3019
+ const b = s || localStorage.getItem("SHOTEASY_BEAUTIFIER_THEME") === "dark" ? "dark" : "light";
3020
+ o.editor.setTheme(b);
3021
+ }, [s]), N(() => {
3022
+ i && h(i, "dataURL");
3023
+ }, [i]), /* @__PURE__ */ e.jsx(Ni, { children: /* @__PURE__ */ e.jsxs(
3024
+ Nt,
3025
+ {
3026
+ theme: {
3027
+ algorithm: o.editor.isDark ? ct.darkAlgorithm : ct.defaultAlgorithm
3028
+ },
3029
+ children: [
3030
+ p,
3031
+ /* @__PURE__ */ e.jsxs("div", { id: "shoteasy-container", className: Z("polka flex flex-col overflow-hidden antialiased w-full h-[100vh] dark:bg-black", a), "data-mode": o.editor.isDark ? "dark" : "light", children: [
3032
+ /* @__PURE__ */ e.jsx(Qi, { headLeft: t, headRight: n }),
3033
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col flex-1 h-0 md:flex-row md:items-stretch", children: [
3034
+ f,
3035
+ /* @__PURE__ */ e.jsx(ks, {})
3036
+ ] })
3037
+ ] })
3038
+ ]
3039
+ }
3040
+ ) });
2849
3041
  });
2850
3042
  export {
2851
- Ys as ImageBeautifier
3043
+ $s as ImageBeautifier
2852
3044
  };