vue-cropperjs2 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1458 @@
1
+ import { defineComponent as e, h as t, useTemplateRef as n } from "vue";
2
+ //#region node_modules/.pnpm/@cropper+utils@2.1.1/node_modules/@cropper/utils/dist/utils.esm.raw.js
3
+ var r = typeof window < "u" && window.document !== void 0, i = r ? window : {}, a = r ? "ontouchstart" in i.document.documentElement : !1, o = r ? "PointerEvent" in i : !1, s = "cropper", c = `${s}-canvas`, l = `${s}-crosshair`, u = `${s}-grid`, d = `${s}-handle`, f = `${s}-image`, p = `${s}-selection`, m = `${s}-shade`, h = `${s}-viewer`, g = "select", _ = "move", v = "scale", y = "rotate", b = "transform", x = "none", S = "n-resize", C = "e-resize", ee = "s-resize", te = "w-resize", w = "ne-resize", T = "nw-resize", E = "se-resize", D = "sw-resize", ne = a ? "touchend touchcancel" : "mouseup", re = a ? "touchmove" : "mousemove", ie = o ? "pointerdown" : a ? "touchstart" : "mousedown", ae = o ? "pointermove" : re, oe = o ? "pointerup pointercancel" : ne, se = "error", ce = "keydown", O = "load", le = "resize", ue = "wheel", k = "action", A = "actionend", j = "actionstart", M = "change", de = "transform";
4
+ function N(e) {
5
+ return typeof e == "string";
6
+ }
7
+ var fe = Number.isNaN || i.isNaN;
8
+ function P(e) {
9
+ return typeof e == "number" && !fe(e);
10
+ }
11
+ function F(e) {
12
+ return P(e) && e > 0 && e < Infinity;
13
+ }
14
+ function pe(e) {
15
+ return e === void 0;
16
+ }
17
+ function me(e) {
18
+ return typeof e == "object" && !!e;
19
+ }
20
+ var { hasOwnProperty: he } = Object.prototype;
21
+ function I(e) {
22
+ if (!me(e)) return !1;
23
+ try {
24
+ let { constructor: t } = e, { prototype: n } = t;
25
+ return t && n && he.call(n, "isPrototypeOf");
26
+ } catch {
27
+ return !1;
28
+ }
29
+ }
30
+ function L(e) {
31
+ return typeof e == "function";
32
+ }
33
+ function R(e) {
34
+ return typeof e == "object" && !!e && e.nodeType === 1;
35
+ }
36
+ var ge = /([a-z\d])([A-Z])/g;
37
+ function _e(e) {
38
+ return String(e).replace(ge, "$1-$2").toLowerCase();
39
+ }
40
+ var ve = /-[A-z\d]/g;
41
+ function ye(e) {
42
+ return e.replace(ve, (e) => e.slice(1).toUpperCase());
43
+ }
44
+ var be = /\s\s*/;
45
+ function z(e, t, n, r) {
46
+ t.trim().split(be).forEach((t) => {
47
+ e.removeEventListener(t, n, r);
48
+ });
49
+ }
50
+ function B(e, t, n, r) {
51
+ t.trim().split(be).forEach((t) => {
52
+ e.addEventListener(t, n, r);
53
+ });
54
+ }
55
+ function xe(e, t, n, r) {
56
+ B(e, t, n, Object.assign(Object.assign({}, r), { once: !0 }));
57
+ }
58
+ var Se = {
59
+ bubbles: !0,
60
+ cancelable: !0,
61
+ composed: !0
62
+ };
63
+ function Ce(e, t, n, r) {
64
+ return e.dispatchEvent(new CustomEvent(t, Object.assign(Object.assign(Object.assign({}, Se), { detail: n }), r)));
65
+ }
66
+ function we(e) {
67
+ return typeof e.composedPath == "function" && e.composedPath().find(R) || e.target;
68
+ }
69
+ var Te = Promise.resolve();
70
+ function Ee(e, t) {
71
+ return t ? Te.then(e ? t.bind(e) : t) : Te;
72
+ }
73
+ function De(e) {
74
+ let t = e.getRootNode();
75
+ switch (t.nodeType) {
76
+ case 1: return t.ownerDocument;
77
+ case 9: return t;
78
+ case 11: return t;
79
+ }
80
+ return null;
81
+ }
82
+ function Oe(e) {
83
+ let { documentElement: t } = e.ownerDocument, n = e.getBoundingClientRect();
84
+ return {
85
+ left: n.left + (i.pageXOffset - t.clientLeft),
86
+ top: n.top + (i.pageYOffset - t.clientTop)
87
+ };
88
+ }
89
+ var ke = /deg|g?rad|turn$/i;
90
+ function V(e) {
91
+ let t = parseFloat(e) || 0;
92
+ if (t !== 0) {
93
+ let [n = "rad"] = String(e).match(ke) || [];
94
+ switch (n.toLowerCase()) {
95
+ case "deg": return t / 360 * (Math.PI * 2);
96
+ case "grad": return t / 400 * (Math.PI * 2);
97
+ case "turn": return Math.PI * 2 * t;
98
+ }
99
+ }
100
+ return t;
101
+ }
102
+ var Ae = "contain", je = "cover";
103
+ function H(e, t = Ae) {
104
+ let { aspectRatio: n } = e, { width: r, height: i } = e, a = F(r), o = F(i);
105
+ if (a && o) {
106
+ let e = i * n;
107
+ t === Ae && e > r || t === je && e < r ? i = r / n : r = i * n;
108
+ } else a ? i = r / n : o && (r = i * n);
109
+ return {
110
+ width: r,
111
+ height: i
112
+ };
113
+ }
114
+ function Me(e, ...t) {
115
+ if (t.length === 0) return e;
116
+ let [n, r, i, a, o, s] = e, [c, l, u, d, f, p] = t[0];
117
+ return e = [
118
+ n * c + i * l,
119
+ r * c + a * l,
120
+ n * u + i * d,
121
+ r * u + a * d,
122
+ n * f + i * p + o,
123
+ r * f + a * p + s
124
+ ], Me(e, ...t.slice(1));
125
+ }
126
+ //#endregion
127
+ //#region node_modules/.pnpm/@cropper+element@2.1.1/node_modules/@cropper/element/dist/element.esm.raw.js
128
+ var Ne = ":host([hidden]){display:none!important}", Pe = /left|top|width|height/i, Fe = "open", U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new Map(), Le = i.document && Array.isArray(i.document.adoptedStyleSheets) && "replaceSync" in i.CSSStyleSheet.prototype, G = class extends HTMLElement {
129
+ get $sharedStyle() {
130
+ return `${this.themeColor ? `:host{--theme-color: ${this.themeColor};}` : ""}${Ne}`;
131
+ }
132
+ constructor() {
133
+ super(), this.shadowRootMode = Fe, this.slottable = !0;
134
+ let e = Object.getPrototypeOf(this)?.constructor?.$name;
135
+ e && Ie.set(e, this.tagName.toLowerCase());
136
+ }
137
+ static get observedAttributes() {
138
+ return [
139
+ "shadow-root-mode",
140
+ "slottable",
141
+ "theme-color"
142
+ ];
143
+ }
144
+ attributeChangedCallback(e, t, n) {
145
+ if (Object.is(n, t)) return;
146
+ let r = ye(e), i = this[r], a = n;
147
+ switch (typeof i) {
148
+ case "boolean":
149
+ a = n !== null && n !== "false";
150
+ break;
151
+ case "number":
152
+ a = Number(n);
153
+ break;
154
+ }
155
+ switch (this[r] = a, e) {
156
+ case "theme-color": {
157
+ let e = W.get(this), t = this.$sharedStyle;
158
+ e && t && (Le ? e.replaceSync(t) : e.textContent = t);
159
+ break;
160
+ }
161
+ }
162
+ }
163
+ $propertyChangedCallback(e, t, n) {
164
+ if (!Object.is(n, t)) switch (e = _e(e), typeof n) {
165
+ case "boolean":
166
+ n === !0 ? this.hasAttribute(e) || this.setAttribute(e, "") : this.removeAttribute(e);
167
+ break;
168
+ case "number": n = fe(n) ? "" : String(n);
169
+ default: n ? this.getAttribute(e) !== n && this.setAttribute(e, n) : this.removeAttribute(e);
170
+ }
171
+ }
172
+ connectedCallback() {
173
+ Object.getPrototypeOf(this).constructor.observedAttributes.forEach((e) => {
174
+ let t = ye(e), n = this[t];
175
+ pe(n) || this.$propertyChangedCallback(t, void 0, n), Object.defineProperty(this, t, {
176
+ enumerable: !0,
177
+ configurable: !0,
178
+ get() {
179
+ return n;
180
+ },
181
+ set(e) {
182
+ let r = n;
183
+ n = e, this.$propertyChangedCallback(t, r, e);
184
+ }
185
+ });
186
+ });
187
+ let e = this.shadowRoot || this.attachShadow({ mode: this.shadowRootMode || Fe });
188
+ if (U.set(this, e), W.set(this, this.$addStyles(this.$sharedStyle)), this.$style && this.$addStyles(this.$style), this.$template) {
189
+ let t = document.createElement("template");
190
+ t.innerHTML = this.$template, e.appendChild(t.content);
191
+ }
192
+ if (this.slottable) {
193
+ let t = document.createElement("slot");
194
+ e.appendChild(t);
195
+ }
196
+ }
197
+ disconnectedCallback() {
198
+ W.has(this) && W.delete(this), U.has(this) && U.delete(this);
199
+ }
200
+ $getTagNameOf(e) {
201
+ return Ie.get(e) ?? e;
202
+ }
203
+ $setStyles(e) {
204
+ return Object.keys(e).forEach((t) => {
205
+ let n = e[t];
206
+ P(n) && (n = n !== 0 && Pe.test(t) ? `${n}px` : String(n)), this.style[t] = n;
207
+ }), this;
208
+ }
209
+ $getShadowRoot() {
210
+ return this.shadowRoot || U.get(this);
211
+ }
212
+ $addStyles(e) {
213
+ let t, n = this.$getShadowRoot();
214
+ return Le ? (t = new CSSStyleSheet(), t.replaceSync(e), n.adoptedStyleSheets = n.adoptedStyleSheets.concat(t)) : (t = document.createElement("style"), t.textContent = e, n.appendChild(t)), t;
215
+ }
216
+ $emit(e, t, n) {
217
+ return Ce(this, e, t, n);
218
+ }
219
+ $nextTick(e) {
220
+ return Ee(this, e);
221
+ }
222
+ static $define(e, t) {
223
+ me(e) && (t = e, e = ""), e ||= this.$name || this.name, e = _e(e), r && i.customElements && !i.customElements.get(e) && customElements.define(e, this, t);
224
+ }
225
+ };
226
+ G.$version = "2.1.1";
227
+ //#endregion
228
+ //#region node_modules/.pnpm/@cropper+element-canvas@2.1.1/node_modules/@cropper/element-canvas/dist/element-canvas.esm.raw.js
229
+ var Re = ":host{display:block;min-height:100px;min-width:200px;overflow:hidden;position:relative;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([background]){background-color:#fff;background-image:repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc),repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc);background-image:repeating-conic-gradient(#ccc 0 25%,#fff 0 50%);background-position:0 0,.5rem .5rem;background-size:1rem 1rem}:host([disabled]){pointer-events:none}:host([disabled]):after{bottom:0;content:\"\";cursor:not-allowed;display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}", K = class extends G {
230
+ constructor() {
231
+ super(...arguments), this.$onPointerDown = null, this.$onPointerMove = null, this.$onPointerUp = null, this.$onWheel = null, this.$wheeling = !1, this.$pointers = /* @__PURE__ */ new Map(), this.$style = Re, this.$action = x, this.background = !1, this.disabled = !1, this.scaleStep = .1, this.themeColor = "#39f";
232
+ }
233
+ static get observedAttributes() {
234
+ return super.observedAttributes.concat([
235
+ "background",
236
+ "disabled",
237
+ "scale-step"
238
+ ]);
239
+ }
240
+ connectedCallback() {
241
+ super.connectedCallback(), this.disabled || this.$bind();
242
+ }
243
+ disconnectedCallback() {
244
+ this.disabled || this.$unbind(), super.disconnectedCallback();
245
+ }
246
+ $propertyChangedCallback(e, t, n) {
247
+ if (!Object.is(n, t)) switch (super.$propertyChangedCallback(e, t, n), e) {
248
+ case "disabled":
249
+ n ? this.$unbind() : this.$bind();
250
+ break;
251
+ }
252
+ }
253
+ $bind() {
254
+ this.$onPointerDown || (this.$onPointerDown = this.$handlePointerDown.bind(this), B(this, ie, this.$onPointerDown)), this.$onPointerMove || (this.$onPointerMove = this.$handlePointerMove.bind(this), B(this.ownerDocument, ae, this.$onPointerMove)), this.$onPointerUp || (this.$onPointerUp = this.$handlePointerUp.bind(this), B(this.ownerDocument, oe, this.$onPointerUp)), this.$onWheel || (this.$onWheel = this.$handleWheel.bind(this), B(this, ue, this.$onWheel, {
255
+ passive: !1,
256
+ capture: !0
257
+ }));
258
+ }
259
+ $unbind() {
260
+ this.$onPointerDown &&= (z(this, ie, this.$onPointerDown), null), this.$onPointerMove &&= (z(this.ownerDocument, ae, this.$onPointerMove), null), this.$onPointerUp &&= (z(this.ownerDocument, oe, this.$onPointerUp), null), this.$onWheel &&= (z(this, ue, this.$onWheel, { capture: !0 }), null);
261
+ }
262
+ $handlePointerDown(e) {
263
+ let { buttons: t, button: n, type: r } = e;
264
+ if (this.disabled || (r === "pointerdown" && e.pointerType === "mouse" || r === "mousedown") && (P(t) && t !== 1 || P(n) && n !== 0 || e.ctrlKey)) return;
265
+ let { $pointers: i } = this, a = "";
266
+ if (e.changedTouches) Array.from(e.changedTouches).forEach(({ identifier: e, pageX: t, pageY: n }) => {
267
+ i.set(e, {
268
+ startX: t,
269
+ startY: n,
270
+ endX: t,
271
+ endY: n
272
+ });
273
+ });
274
+ else {
275
+ let { pointerId: t = 0, pageX: n, pageY: r } = e;
276
+ i.set(t, {
277
+ startX: n,
278
+ startY: r,
279
+ endX: n,
280
+ endY: r
281
+ });
282
+ }
283
+ i.size > 1 ? a = b : R(e.target) && (a = e.target.action || e.target.getAttribute("action") || ""), this.$emit("actionstart", {
284
+ action: a,
285
+ relatedEvent: e
286
+ }) !== !1 && (e.preventDefault(), this.$action = a, this.style.willChange = "transform");
287
+ }
288
+ $handlePointerMove(e) {
289
+ let { $action: t, $pointers: n } = this;
290
+ if (this.disabled || t === "none" || n.size === 0 || this.$emit("actionmove", {
291
+ action: t,
292
+ relatedEvent: e
293
+ }) === !1) return;
294
+ if (e.preventDefault(), e.changedTouches) Array.from(e.changedTouches).forEach(({ identifier: e, pageX: t, pageY: r }) => {
295
+ let i = n.get(e);
296
+ i && Object.assign(i, {
297
+ endX: t,
298
+ endY: r
299
+ });
300
+ });
301
+ else {
302
+ let { pointerId: t = 0, pageX: r, pageY: i } = e, a = n.get(t);
303
+ a && Object.assign(a, {
304
+ endX: r,
305
+ endY: i
306
+ });
307
+ }
308
+ let r = {
309
+ action: t,
310
+ relatedEvent: e
311
+ };
312
+ if (t === "transform") {
313
+ let t = new Map(n), i = 0, a = 0, o = 0, s = 0, c = e.pageX, l = e.pageY;
314
+ n.forEach((e, n) => {
315
+ t.delete(n), t.forEach((t) => {
316
+ let n = t.startX - e.startX, r = t.startY - e.startY, u = t.endX - e.endX, d = t.endY - e.endY, f = 0, p = 0, m = 0, h = 0;
317
+ if (n === 0 ? r < 0 ? m = Math.PI * 2 : r > 0 && (m = Math.PI) : n > 0 ? m = Math.PI / 2 + Math.atan(r / n) : n < 0 && (m = Math.PI * 1.5 + Math.atan(r / n)), u === 0 ? d < 0 ? h = Math.PI * 2 : d > 0 && (h = Math.PI) : u > 0 ? h = Math.PI / 2 + Math.atan(d / u) : u < 0 && (h = Math.PI * 1.5 + Math.atan(d / u)), h > 0 || m > 0) {
318
+ let n = h - m, r = Math.abs(n);
319
+ r > i && (i = r, o = n, c = (e.startX + t.startX) / 2, l = (e.startY + t.startY) / 2);
320
+ }
321
+ if (n = Math.abs(n), r = Math.abs(r), u = Math.abs(u), d = Math.abs(d), n > 0 && r > 0 ? f = Math.sqrt(n * n + r * r) : n > 0 ? f = n : r > 0 && (f = r), u > 0 && d > 0 ? p = Math.sqrt(u * u + d * d) : u > 0 ? p = u : d > 0 && (p = d), f > 0 && p > 0) {
322
+ let n = (p - f) / f, r = Math.abs(n);
323
+ r > a && (a = r, s = n, c = (e.startX + t.startX) / 2, l = (e.startY + t.startY) / 2);
324
+ }
325
+ });
326
+ });
327
+ let u = i > 0, d = a > 0;
328
+ u && d ? (r.rotate = o, r.scale = s, r.centerX = c, r.centerY = l) : u ? (r.action = y, r.rotate = o, r.centerX = c, r.centerY = l) : d ? (r.action = v, r.scale = s, r.centerX = c, r.centerY = l) : r.action = x;
329
+ } else {
330
+ let [e] = Array.from(n.values());
331
+ Object.assign(r, e);
332
+ }
333
+ n.forEach((e) => {
334
+ e.startX = e.endX, e.startY = e.endY;
335
+ }), r.action !== "none" && this.$emit(k, r, { cancelable: !1 });
336
+ }
337
+ $handlePointerUp(e) {
338
+ let { $action: t, $pointers: n } = this;
339
+ if (!(this.disabled || t === "none") && this.$emit("actionend", {
340
+ action: t,
341
+ relatedEvent: e
342
+ }) !== !1) {
343
+ if (e.preventDefault(), e.changedTouches) Array.from(e.changedTouches).forEach(({ identifier: e }) => {
344
+ n.delete(e);
345
+ });
346
+ else {
347
+ let { pointerId: t = 0 } = e;
348
+ n.delete(t);
349
+ }
350
+ n.size === 0 && (this.style.willChange = "", this.$action = x);
351
+ }
352
+ }
353
+ $handleWheel(e) {
354
+ if (this.disabled || (e.preventDefault(), this.$wheeling)) return;
355
+ this.$wheeling = !0, setTimeout(() => {
356
+ this.$wheeling = !1;
357
+ }, 50);
358
+ let t = (e.deltaY > 0 ? -1 : 1) * this.scaleStep;
359
+ this.$emit(k, {
360
+ action: v,
361
+ scale: t,
362
+ relatedEvent: e
363
+ }, { cancelable: !1 });
364
+ }
365
+ $setAction(e) {
366
+ return N(e) && (this.$action = e), this;
367
+ }
368
+ $toCanvas(e) {
369
+ return new Promise((t, n) => {
370
+ if (!this.isConnected) {
371
+ n(/* @__PURE__ */ Error("The current element is not connected to the DOM."));
372
+ return;
373
+ }
374
+ let r = document.createElement("canvas"), i = this.offsetWidth, a = this.offsetHeight, o = 1;
375
+ I(e) && (F(e.width) || F(e.height)) && ({width: i, height: a} = H({
376
+ aspectRatio: i / a,
377
+ width: e.width,
378
+ height: e.height
379
+ }), o = i / this.offsetWidth), r.width = i, r.height = a;
380
+ let s = this.querySelector(this.$getTagNameOf(f));
381
+ if (!s) {
382
+ t(r);
383
+ return;
384
+ }
385
+ s.$ready().then((n) => {
386
+ let c = r.getContext("2d");
387
+ if (c) {
388
+ let [t, l, u, d, f, p] = s.$getTransform(), m = f, h = p, g = n.naturalWidth, _ = n.naturalHeight;
389
+ o !== 1 && (m *= o, h *= o, g *= o, _ *= o);
390
+ let v = g / 2, y = _ / 2;
391
+ c.fillStyle = "transparent", c.fillRect(0, 0, i, a), I(e) && L(e.beforeDraw) && e.beforeDraw.call(this, c, r), c.save(), c.translate(v, y), c.transform(t, l, u, d, m, h), c.translate(-v, -y), c.drawImage(n, 0, 0, g, _), c.restore();
392
+ }
393
+ t(r);
394
+ }).catch(n);
395
+ });
396
+ }
397
+ };
398
+ K.$name = c, K.$version = "2.1.1";
399
+ //#endregion
400
+ //#region node_modules/.pnpm/@cropper+element-image@2.1.1/node_modules/@cropper/element-image/dist/element-image.esm.raw.js
401
+ var ze = ":host{display:inline-block}img{display:block;height:100%;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}", Be = /* @__PURE__ */ new WeakMap(), Ve = [
402
+ "alt",
403
+ "crossorigin",
404
+ "decoding",
405
+ "elementtiming",
406
+ "fetchpriority",
407
+ "loading",
408
+ "referrerpolicy",
409
+ "sizes",
410
+ "src",
411
+ "srcset"
412
+ ], q = class extends G {
413
+ constructor() {
414
+ super(...arguments), this.$isReady = !1, this.$matrix = [
415
+ 1,
416
+ 0,
417
+ 0,
418
+ 1,
419
+ 0,
420
+ 0
421
+ ], this.$onLoad = null, this.$onCanvasAction = null, this.$onCanvasActionEnd = null, this.$onCanvasActionStart = null, this.$actionStartTarget = null, this.$style = ze, this.$image = new Image(), this.initialCenterSize = "contain", this.rotatable = !1, this.scalable = !1, this.skewable = !1, this.slottable = !1, this.translatable = !1, this.alt = "", this.crossorigin = "", this.decoding = "", this.elementtiming = "", this.fetchpriority = "", this.loading = "", this.referrerpolicy = "", this.sizes = "", this.src = "", this.srcset = "";
422
+ }
423
+ set $canvas(e) {
424
+ Be.set(this, e);
425
+ }
426
+ get $canvas() {
427
+ return Be.get(this);
428
+ }
429
+ static get observedAttributes() {
430
+ return super.observedAttributes.concat(Ve, [
431
+ "initial-center-size",
432
+ "rotatable",
433
+ "scalable",
434
+ "skewable",
435
+ "translatable"
436
+ ]);
437
+ }
438
+ attributeChangedCallback(e, t, n) {
439
+ Object.is(n, t) || (super.attributeChangedCallback(e, t, n), Ve.includes(e) && this.$image.setAttribute(e, n));
440
+ }
441
+ $propertyChangedCallback(e, t, n) {
442
+ if (!Object.is(n, t)) switch (super.$propertyChangedCallback(e, t, n), e) {
443
+ case "initialCenterSize":
444
+ this.$nextTick(() => {
445
+ this.$center(n);
446
+ });
447
+ break;
448
+ case "src":
449
+ this.$isReady = !1;
450
+ break;
451
+ }
452
+ }
453
+ connectedCallback() {
454
+ super.connectedCallback();
455
+ let { $image: e } = this, t = this.closest(this.$getTagNameOf(c));
456
+ t && (this.$canvas = t, this.$setStyles({
457
+ display: "block",
458
+ position: "absolute"
459
+ }), this.$onCanvasActionStart = (e) => {
460
+ this.$actionStartTarget = e.detail?.relatedEvent?.target;
461
+ }, this.$onCanvasActionEnd = () => {
462
+ this.$actionStartTarget = null;
463
+ }, this.$onCanvasAction = this.$handleAction.bind(this), B(t, j, this.$onCanvasActionStart), B(t, A, this.$onCanvasActionEnd), B(t, k, this.$onCanvasAction)), this.$onLoad = this.$handleLoad.bind(this), B(e, O, this.$onLoad), this.$getShadowRoot().appendChild(e);
464
+ }
465
+ disconnectedCallback() {
466
+ let { $image: e, $canvas: t } = this;
467
+ t && (this.$onCanvasActionStart &&= (z(t, j, this.$onCanvasActionStart), null), this.$onCanvasActionEnd &&= (z(t, A, this.$onCanvasActionEnd), null), this.$onCanvasAction &&= (z(t, k, this.$onCanvasAction), null)), e && this.$onLoad && (z(e, O, this.$onLoad), this.$onLoad = null), this.$getShadowRoot().removeChild(e), super.disconnectedCallback();
468
+ }
469
+ $handleLoad() {
470
+ let { $image: e } = this;
471
+ this.$setStyles({
472
+ width: e.naturalWidth,
473
+ height: e.naturalHeight
474
+ }), this.$canvas && this.$center(this.initialCenterSize), this.$isReady = !0;
475
+ }
476
+ $handleAction(e) {
477
+ if (this.hidden || !(this.rotatable || this.scalable || this.translatable)) return;
478
+ let { $canvas: t } = this, { detail: n } = e;
479
+ if (n) {
480
+ let { relatedEvent: e } = n, { action: r } = n;
481
+ switch (r === "transform" && (!this.rotatable || !this.scalable) && (r = this.rotatable ? y : this.scalable ? v : x), r) {
482
+ case _:
483
+ if (this.translatable) {
484
+ let r = null;
485
+ e && (r = e.target.closest(this.$getTagNameOf(p))), r ||= t.querySelector(this.$getTagNameOf(p)), r && r.multiple && !r.active && (r = t.querySelector(`${this.$getTagNameOf(p)}[active]`)), (!r || r.hidden || !r.movable || r.dynamic || !(this.$actionStartTarget && r.contains(this.$actionStartTarget))) && this.$move(n.endX - n.startX, n.endY - n.startY);
486
+ }
487
+ break;
488
+ case y:
489
+ if (this.rotatable) if (e) {
490
+ let { x: t, y: r } = this.getBoundingClientRect();
491
+ this.$rotate(n.rotate, e.clientX - t, e.clientY - r);
492
+ } else this.$rotate(n.rotate);
493
+ break;
494
+ case v:
495
+ if (this.scalable) if (e) {
496
+ let t = e.target.closest(this.$getTagNameOf(p));
497
+ if (!t || !t.zoomable || t.zoomable && t.dynamic) {
498
+ let { x: t, y: r } = this.getBoundingClientRect();
499
+ this.$zoom(n.scale, e.clientX - t, e.clientY - r);
500
+ }
501
+ } else this.$zoom(n.scale);
502
+ break;
503
+ case b:
504
+ if (this.rotatable && this.scalable) {
505
+ let { rotate: t } = n, { scale: r } = n;
506
+ r < 0 ? r = 1 / (1 - r) : r += 1;
507
+ let i = Math.cos(t), a = Math.sin(t), [o, s, c, l] = [
508
+ i * r,
509
+ a * r,
510
+ -a * r,
511
+ i * r
512
+ ];
513
+ if (e) {
514
+ let t = this.getBoundingClientRect(), n = e.clientX - t.x, r = e.clientY - t.y, [i, a, u, d] = this.$matrix, f = t.width / 2, p = t.height / 2, m = n - f, h = r - p, g = (m * d - u * h) / (i * d - u * a), _ = (h * i - a * m) / (i * d - u * a);
515
+ this.$transform(o, s, c, l, g * (1 - o) + _ * c, _ * (1 - l) + g * s);
516
+ } else this.$transform(o, s, c, l, 0, 0);
517
+ }
518
+ break;
519
+ }
520
+ }
521
+ }
522
+ $ready(e) {
523
+ let { $image: t } = this, n = new Promise((e, n) => {
524
+ let r = /* @__PURE__ */ Error("Failed to load the image source");
525
+ if (t.complete) t.naturalWidth > 0 && t.naturalHeight > 0 ? e(t) : n(r);
526
+ else {
527
+ let i = () => {
528
+ z(t, se, a), setTimeout(() => {
529
+ e(t);
530
+ });
531
+ }, a = () => {
532
+ z(t, O, i), n(r);
533
+ };
534
+ xe(t, O, i), xe(t, se, a);
535
+ }
536
+ });
537
+ return L(e) && n.then((t) => (e(t), t)), n;
538
+ }
539
+ $center(e) {
540
+ let { parentElement: t } = this;
541
+ if (!t) return this;
542
+ let n = t.getBoundingClientRect(), r = n.width, i = n.height, { x: a, y: o, width: s, height: c } = this.getBoundingClientRect(), l = a + s / 2, u = o + c / 2, d = n.x + r / 2, f = n.y + i / 2, { translatable: p } = this;
543
+ if (!p && !this.$isReady && (this.translatable = !0, this.$nextTick(() => {
544
+ this.translatable = p;
545
+ })), this.$move(d - l, f - u), e && (s !== r || c !== i)) {
546
+ let t = r / s, n = i / c, { scalable: a } = this;
547
+ switch (e && !a && !this.$isReady && (this.scalable = !0, this.$nextTick(() => {
548
+ this.scalable = a;
549
+ })), e) {
550
+ case "cover":
551
+ this.$scale(Math.max(t, n));
552
+ break;
553
+ case "contain":
554
+ this.$scale(Math.min(t, n));
555
+ break;
556
+ }
557
+ }
558
+ return this;
559
+ }
560
+ $move(e, t = e) {
561
+ if (this.translatable && P(e) && P(t)) {
562
+ let [n, r, i, a] = this.$matrix, o = (e * a - i * t) / (n * a - i * r), s = (t * n - r * e) / (n * a - i * r);
563
+ this.$translate(o, s);
564
+ }
565
+ return this;
566
+ }
567
+ $moveTo(e, t = e) {
568
+ if (this.translatable && P(e) && P(t)) {
569
+ let [n, r, i, a] = this.$matrix, o = (e * a - i * t) / (n * a - i * r), s = (t * n - r * e) / (n * a - i * r);
570
+ this.$setTransform(n, r, i, a, o, s);
571
+ }
572
+ return this;
573
+ }
574
+ $rotate(e, t, n) {
575
+ if (this.rotatable) {
576
+ let r = V(e), i = Math.cos(r), a = Math.sin(r), [o, s, c, l] = [
577
+ i,
578
+ a,
579
+ -a,
580
+ i
581
+ ];
582
+ if (P(t) && P(n)) {
583
+ let [e, r, i, a] = this.$matrix, { width: u, height: d } = this.getBoundingClientRect(), f = u / 2, p = d / 2, m = t - f, h = n - p, g = (m * a - i * h) / (e * a - i * r), _ = (h * e - r * m) / (e * a - i * r);
584
+ this.$transform(o, s, c, l, g * (1 - o) - _ * c, _ * (1 - l) - g * s);
585
+ } else this.$transform(o, s, c, l, 0, 0);
586
+ }
587
+ return this;
588
+ }
589
+ $zoom(e, t, n) {
590
+ if (!this.scalable || e === 0) return this;
591
+ if (e < 0 ? e = 1 / (1 - e) : e += 1, P(t) && P(n)) {
592
+ let [r, i, a, o] = this.$matrix, { width: s, height: c } = this.getBoundingClientRect(), l = s / 2, u = c / 2, d = t - l, f = n - u, p = (d * o - a * f) / (r * o - a * i), m = (f * r - i * d) / (r * o - a * i);
593
+ this.$transform(e, 0, 0, e, p * (1 - e), m * (1 - e));
594
+ } else this.$scale(e);
595
+ return this;
596
+ }
597
+ $scale(e, t = e) {
598
+ return this.scalable && this.$transform(e, 0, 0, t, 0, 0), this;
599
+ }
600
+ $skew(e, t = 0) {
601
+ if (this.skewable) {
602
+ let n = V(e), r = V(t);
603
+ this.$transform(1, Math.tan(r), Math.tan(n), 1, 0, 0);
604
+ }
605
+ return this;
606
+ }
607
+ $translate(e, t = e) {
608
+ return this.translatable && P(e) && P(t) && this.$transform(1, 0, 0, 1, e, t), this;
609
+ }
610
+ $transform(e, t, n, r, i, a) {
611
+ return P(e) && P(t) && P(n) && P(r) && P(i) && P(a) ? this.$setTransform(Me(this.$matrix, [
612
+ e,
613
+ t,
614
+ n,
615
+ r,
616
+ i,
617
+ a
618
+ ])) : this;
619
+ }
620
+ $setTransform(e, t, n, r, i, a) {
621
+ if ((this.rotatable || this.scalable || this.skewable || this.translatable) && (Array.isArray(e) && ([e, t, n, r, i, a] = e), P(e) && P(t) && P(n) && P(r) && P(i) && P(a))) {
622
+ let o = [...this.$matrix], s = [
623
+ e,
624
+ t,
625
+ n,
626
+ r,
627
+ i,
628
+ a
629
+ ];
630
+ if (this.$emit("transform", {
631
+ matrix: s,
632
+ oldMatrix: o
633
+ }) === !1) return this;
634
+ this.$matrix = s, this.style.transform = `matrix(${s.join(", ")})`;
635
+ }
636
+ return this;
637
+ }
638
+ $getTransform() {
639
+ return this.$matrix.slice();
640
+ }
641
+ $resetTransform() {
642
+ return this.$setTransform([
643
+ 1,
644
+ 0,
645
+ 0,
646
+ 1,
647
+ 0,
648
+ 0
649
+ ]);
650
+ }
651
+ };
652
+ q.$name = f, q.$version = "2.1.1";
653
+ //#endregion
654
+ //#region node_modules/.pnpm/@cropper+element-shade@2.1.1/node_modules/@cropper/element-shade/dist/element-shade.esm.raw.js
655
+ var He = ":host{display:block;height:0;left:0;outline:var(--theme-color) solid 1px;position:relative;top:0;width:0}:host([transparent]){outline-color:transparent}", Ue = /* @__PURE__ */ new WeakMap(), J = class extends G {
656
+ constructor() {
657
+ super(...arguments), this.$onWindowResize = null, this.$onCanvasActionEnd = null, this.$onCanvasActionStart = null, this.$onSelectionChange = null, this.$style = He, this.x = 0, this.y = 0, this.width = 0, this.height = 0, this.slottable = !1, this.themeColor = "rgba(0, 0, 0, 0.65)";
658
+ }
659
+ set $canvas(e) {
660
+ Ue.set(this, e);
661
+ }
662
+ get $canvas() {
663
+ return Ue.get(this);
664
+ }
665
+ static get observedAttributes() {
666
+ return super.observedAttributes.concat([
667
+ "height",
668
+ "width",
669
+ "x",
670
+ "y"
671
+ ]);
672
+ }
673
+ connectedCallback() {
674
+ super.connectedCallback();
675
+ let e = this.closest(this.$getTagNameOf(c));
676
+ if (e) {
677
+ this.$canvas = e, this.style.position = "absolute";
678
+ let t = e.querySelector(this.$getTagNameOf(p));
679
+ t && (this.$onWindowResize = this.$render.bind(this), this.$onCanvasActionStart = (e) => {
680
+ t.hidden && e.detail.action === "select" && (this.hidden = !1);
681
+ }, this.$onCanvasActionEnd = (e) => {
682
+ t.hidden && e.detail.action === "select" && (this.hidden = !0);
683
+ }, this.$onSelectionChange = (e) => {
684
+ let { x: n, y: r, width: i, height: a } = e.defaultPrevented ? t : e.detail;
685
+ this.$change(n, r, i, a), (t.hidden || n === 0 && r === 0 && i === 0 && a === 0) && (this.hidden = !0);
686
+ }, B(window, le, this.$onWindowResize), B(e, j, this.$onCanvasActionStart), B(e, A, this.$onCanvasActionEnd), B(e, M, this.$onSelectionChange));
687
+ }
688
+ this.$render();
689
+ }
690
+ disconnectedCallback() {
691
+ let { $canvas: e } = this;
692
+ e && (this.$onWindowResize &&= (z(window, le, this.$onWindowResize), null), this.$onCanvasActionStart &&= (z(e, j, this.$onCanvasActionStart), null), this.$onCanvasActionEnd &&= (z(e, A, this.$onCanvasActionEnd), null), this.$onSelectionChange &&= (z(e, M, this.$onSelectionChange), null)), super.disconnectedCallback();
693
+ }
694
+ $change(e, t, n = this.width, r = this.height) {
695
+ return !P(e) || !P(t) || !P(n) || !P(r) || e === this.x && t === this.y && n === this.width && r === this.height ? this : (this.hidden &&= !1, this.x = e, this.y = t, this.width = n, this.height = r, this.$render());
696
+ }
697
+ $reset() {
698
+ return this.$change(0, 0, 0, 0);
699
+ }
700
+ $render() {
701
+ return this.$setStyles({
702
+ transform: `translate(${this.x}px, ${this.y}px)`,
703
+ width: this.width,
704
+ height: this.height,
705
+ outlineWidth: i.innerWidth * i.devicePixelRatio
706
+ });
707
+ }
708
+ };
709
+ J.$name = m, J.$version = "2.1.1";
710
+ //#endregion
711
+ //#region node_modules/.pnpm/@cropper+element-handle@2.1.1/node_modules/@cropper/element-handle/dist/element-handle.esm.raw.js
712
+ var We = ":host{background-color:var(--theme-color);display:block}:host([action=move]),:host([action=select]){height:100%;left:0;position:absolute;top:0;width:100%}:host([action=move]){cursor:move}:host([action=select]){cursor:crosshair}:host([action$=-resize]){background-color:transparent;height:15px;position:absolute;width:15px}:host([action$=-resize]):after{background-color:var(--theme-color);content:\"\";display:block;height:5px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:5px}:host([action=n-resize]),:host([action=s-resize]){cursor:ns-resize;left:50%;transform:translateX(-50%);width:100%}:host([action=n-resize]){top:-8px}:host([action=s-resize]){bottom:-8px}:host([action=e-resize]),:host([action=w-resize]){cursor:ew-resize;height:100%;top:50%;transform:translateY(-50%)}:host([action=e-resize]){right:-8px}:host([action=w-resize]){left:-8px}:host([action=ne-resize]){cursor:nesw-resize;right:-8px;top:-8px}:host([action=nw-resize]){cursor:nwse-resize;left:-8px;top:-8px}:host([action=se-resize]){bottom:-8px;cursor:nwse-resize;right:-8px}:host([action=se-resize]):after{height:15px;width:15px}@media (pointer:coarse){:host([action=se-resize]):after{height:10px;width:10px}}@media (pointer:fine){:host([action=se-resize]):after{height:5px;width:5px}}:host([action=sw-resize]){bottom:-8px;cursor:nesw-resize;left:-8px}:host([plain]){background-color:transparent}", Y = class extends G {
713
+ constructor() {
714
+ super(...arguments), this.$onCanvasCropEnd = null, this.$onCanvasCropStart = null, this.$style = We, this.action = x, this.plain = !1, this.slottable = !1, this.themeColor = "rgba(51, 153, 255, 0.5)";
715
+ }
716
+ static get observedAttributes() {
717
+ return super.observedAttributes.concat(["action", "plain"]);
718
+ }
719
+ };
720
+ Y.$name = d, Y.$version = "2.1.1";
721
+ //#endregion
722
+ //#region node_modules/.pnpm/@cropper+element-selection@2.1.1/node_modules/@cropper/element-selection/dist/element-selection.esm.raw.js
723
+ var Ge = ":host{display:block;left:0;position:relative;right:0}:host([outlined]){outline:1px solid var(--theme-color)}:host([multiple]){outline:1px dashed hsla(0,0%,100%,.5)}:host([multiple]):after{bottom:0;content:\"\";cursor:pointer;display:block;left:0;position:absolute;right:0;top:0}:host([multiple][active]){outline-color:var(--theme-color);z-index:1}:host([multiple])>*{visibility:hidden}:host([multiple][active])>*{visibility:visible}:host([multiple][active]):after{display:none}", Ke = /* @__PURE__ */ new WeakMap(), X = class extends G {
724
+ constructor() {
725
+ super(...arguments), this.$onCanvasAction = null, this.$onCanvasActionStart = null, this.$onCanvasActionEnd = null, this.$onDocumentKeyDown = null, this.$action = "", this.$actionStartTarget = null, this.$changing = !1, this.$style = Ge, this.$initialSelection = {
726
+ x: 0,
727
+ y: 0,
728
+ width: 0,
729
+ height: 0
730
+ }, this.x = 0, this.y = 0, this.width = 0, this.height = 0, this.aspectRatio = NaN, this.initialAspectRatio = NaN, this.initialCoverage = NaN, this.active = !1, this.linked = !1, this.dynamic = !1, this.movable = !1, this.resizable = !1, this.zoomable = !1, this.multiple = !1, this.keyboard = !1, this.outlined = !1, this.precise = !1;
731
+ }
732
+ set $canvas(e) {
733
+ Ke.set(this, e);
734
+ }
735
+ get $canvas() {
736
+ return Ke.get(this);
737
+ }
738
+ static get observedAttributes() {
739
+ return super.observedAttributes.concat([
740
+ "active",
741
+ "aspect-ratio",
742
+ "dynamic",
743
+ "height",
744
+ "initial-aspect-ratio",
745
+ "initial-coverage",
746
+ "keyboard",
747
+ "linked",
748
+ "movable",
749
+ "multiple",
750
+ "outlined",
751
+ "precise",
752
+ "resizable",
753
+ "width",
754
+ "x",
755
+ "y",
756
+ "zoomable"
757
+ ]);
758
+ }
759
+ $propertyChangedCallback(e, t, n) {
760
+ if (!Object.is(n, t)) switch (super.$propertyChangedCallback(e, t, n), e) {
761
+ case "x":
762
+ case "y":
763
+ case "width":
764
+ case "height":
765
+ this.$changing || this.$nextTick(() => {
766
+ this.$change(this.x, this.y, this.width, this.height, this.aspectRatio, !0);
767
+ });
768
+ break;
769
+ case "aspectRatio":
770
+ case "initialAspectRatio":
771
+ this.$nextTick(() => {
772
+ this.$initSelection();
773
+ });
774
+ break;
775
+ case "initialCoverage":
776
+ this.$nextTick(() => {
777
+ F(n) && n <= 1 && this.$initSelection(!0, !0);
778
+ });
779
+ break;
780
+ case "keyboard":
781
+ this.$nextTick(() => {
782
+ this.$canvas && (n ? this.$onDocumentKeyDown || (this.$onDocumentKeyDown = this.$handleKeyDown.bind(this), B(this.ownerDocument, ce, this.$onDocumentKeyDown)) : this.$onDocumentKeyDown &&= (z(this.ownerDocument, ce, this.$onDocumentKeyDown), null));
783
+ });
784
+ break;
785
+ case "multiple":
786
+ this.$nextTick(() => {
787
+ if (this.$canvas) {
788
+ let e = this.$getSelections();
789
+ n ? (e.forEach((e) => {
790
+ e.active = !1;
791
+ }), this.active = !0, this.$emit(M, {
792
+ x: this.x,
793
+ y: this.y,
794
+ width: this.width,
795
+ height: this.height
796
+ })) : (this.active = !1, e.slice(1).forEach((e) => {
797
+ this.$removeSelection(e);
798
+ }));
799
+ }
800
+ });
801
+ break;
802
+ case "precise":
803
+ this.$nextTick(() => {
804
+ this.$change(this.x, this.y);
805
+ });
806
+ break;
807
+ case "linked":
808
+ n && (this.dynamic = !0);
809
+ break;
810
+ }
811
+ }
812
+ connectedCallback() {
813
+ super.connectedCallback();
814
+ let e = this.closest(this.$getTagNameOf(c));
815
+ e ? (this.$canvas = e, this.$setStyles({
816
+ position: "absolute",
817
+ transform: `translate(${this.x}px, ${this.y}px)`
818
+ }), this.hidden || this.$render(), this.$initSelection(!0), this.$onCanvasActionStart = this.$handleActionStart.bind(this), this.$onCanvasActionEnd = this.$handleActionEnd.bind(this), this.$onCanvasAction = this.$handleAction.bind(this), B(e, j, this.$onCanvasActionStart), B(e, A, this.$onCanvasActionEnd), B(e, k, this.$onCanvasAction)) : this.$render();
819
+ }
820
+ disconnectedCallback() {
821
+ let { $canvas: e } = this;
822
+ e && (this.$onCanvasActionStart &&= (z(e, j, this.$onCanvasActionStart), null), this.$onCanvasActionEnd &&= (z(e, A, this.$onCanvasActionEnd), null), this.$onCanvasAction &&= (z(e, k, this.$onCanvasAction), null)), super.disconnectedCallback();
823
+ }
824
+ $getSelections() {
825
+ let e = [];
826
+ return this.parentElement && (e = Array.from(this.parentElement.querySelectorAll(this.$getTagNameOf(p)))), e;
827
+ }
828
+ $initSelection(e = !1, t = !1) {
829
+ let { initialCoverage: n, parentElement: r } = this;
830
+ if (F(n) && r) {
831
+ let i = this.aspectRatio || this.initialAspectRatio, a = (t ? 0 : this.width) || r.offsetWidth * n, o = (t ? 0 : this.height) || r.offsetHeight * n;
832
+ F(i) && ({width: a, height: o} = H({
833
+ aspectRatio: i,
834
+ width: a,
835
+ height: o
836
+ })), this.$change(this.x, this.y, a, o), e && this.$center(), this.$initialSelection = {
837
+ x: this.x,
838
+ y: this.y,
839
+ width: this.width,
840
+ height: this.height
841
+ };
842
+ }
843
+ }
844
+ $createSelection() {
845
+ let e = this.cloneNode(!0);
846
+ return this.hasAttribute("id") && e.removeAttribute("id"), e.initialCoverage = NaN, this.active = !1, this.parentElement && this.parentElement.insertBefore(e, this.nextSibling), e;
847
+ }
848
+ $removeSelection(e = this) {
849
+ if (this.parentElement) {
850
+ let t = this.$getSelections();
851
+ if (t.length > 1) {
852
+ let n = t.indexOf(e), r = t[n + 1] || t[n - 1];
853
+ r && (e.active = !1, this.parentElement.removeChild(e), r.active = !0, r.$emit(M, {
854
+ x: r.x,
855
+ y: r.y,
856
+ width: r.width,
857
+ height: r.height
858
+ }));
859
+ } else this.$clear();
860
+ }
861
+ }
862
+ $handleActionStart(e) {
863
+ let t = e.detail?.relatedEvent?.target;
864
+ this.$action = "", this.$actionStartTarget = t, !this.hidden && this.multiple && !this.active && t === this && this.parentElement && (this.$getSelections().forEach((e) => {
865
+ e.active = !1;
866
+ }), this.active = !0, this.$emit(M, {
867
+ x: this.x,
868
+ y: this.y,
869
+ width: this.width,
870
+ height: this.height
871
+ }));
872
+ }
873
+ $handleAction(e) {
874
+ let { currentTarget: t, detail: n } = e;
875
+ if (!t || !n) return;
876
+ let { relatedEvent: r } = n, { action: i } = n, a = r ? we(r) : null;
877
+ if (!i && this.multiple && (i = this.$action || a?.action, this.$action = i), !i || this.hidden && i !== "select" || this.multiple && !this.active && i !== "scale") return;
878
+ let { width: o, height: s } = this, c = n.endX - n.startX, l = n.endY - n.startY, { aspectRatio: u } = this;
879
+ switch (!F(u) && r.shiftKey && (u = F(o) && F(s) ? o / s : 1), i) {
880
+ case g:
881
+ if (c !== 0 || l !== 0) {
882
+ c === 0 ? c = l : l === 0 && (l = c);
883
+ let { $canvas: e } = this, r = Oe(t);
884
+ (this.multiple && !this.hidden ? this.$createSelection() : this).$change(n.startX - r.left, n.startY - r.top, Math.abs(c), Math.abs(l), u), c < 0 ? l < 0 ? i = T : l > 0 && (i = D) : c > 0 && (l < 0 ? i = w : l > 0 && (i = E)), e && (e.$action = i);
885
+ }
886
+ break;
887
+ case _:
888
+ this.movable && (this.dynamic || this.$actionStartTarget && this.contains(this.$actionStartTarget)) && this.$move(c, l);
889
+ break;
890
+ case v:
891
+ if (r && this.zoomable && (this.dynamic || this.contains(r.target))) {
892
+ let e = Oe(t);
893
+ this.$zoom(n.scale, r.pageX - e.left, r.pageY - e.top);
894
+ }
895
+ break;
896
+ default: this.$resize(i, c, l, u);
897
+ }
898
+ }
899
+ $handleActionEnd() {
900
+ this.$action = "", this.$actionStartTarget = null;
901
+ }
902
+ $handleKeyDown(e) {
903
+ if (this.hidden || !this.keyboard || this.multiple && !this.active || e.defaultPrevented) return;
904
+ let { activeElement: t } = document;
905
+ if (!(t && (["INPUT", "TEXTAREA"].includes(t.tagName) || ["true", "plaintext-only"].includes(t.contentEditable)))) switch (e.key) {
906
+ case "Backspace":
907
+ e.metaKey && (e.preventDefault(), this.$removeSelection());
908
+ break;
909
+ case "Delete":
910
+ e.preventDefault(), this.$removeSelection();
911
+ break;
912
+ case "ArrowLeft":
913
+ e.preventDefault(), this.$move(-1, 0);
914
+ break;
915
+ case "ArrowRight":
916
+ e.preventDefault(), this.$move(1, 0);
917
+ break;
918
+ case "ArrowUp":
919
+ e.preventDefault(), this.$move(0, -1);
920
+ break;
921
+ case "ArrowDown":
922
+ e.preventDefault(), this.$move(0, 1);
923
+ break;
924
+ case "+":
925
+ e.preventDefault(), this.$zoom(.1);
926
+ break;
927
+ case "-":
928
+ e.preventDefault(), this.$zoom(-.1);
929
+ break;
930
+ }
931
+ }
932
+ $center() {
933
+ let { parentElement: e } = this;
934
+ if (!e) return this;
935
+ let t = (e.offsetWidth - this.width) / 2, n = (e.offsetHeight - this.height) / 2;
936
+ return this.$change(t, n);
937
+ }
938
+ $move(e, t = e) {
939
+ return this.$moveTo(this.x + e, this.y + t);
940
+ }
941
+ $moveTo(e, t = e) {
942
+ return this.movable ? this.$change(e, t) : this;
943
+ }
944
+ $resize(e, t = 0, n = 0, r = this.aspectRatio) {
945
+ if (!this.resizable) return this;
946
+ let i = F(r), { $canvas: a } = this, { x: o, y: s, width: c, height: l } = this;
947
+ switch (e) {
948
+ case S:
949
+ s += n, l -= n, l < 0 && (e = ee, l = -l, s -= l), i && (t = n * r, o += t / 2, c -= t, c < 0 && (c = -c, o -= c));
950
+ break;
951
+ case C:
952
+ c += t, c < 0 && (e = te, c = -c, o -= c), i && (n = t / r, s -= n / 2, l += n, l < 0 && (l = -l, s -= l));
953
+ break;
954
+ case ee:
955
+ l += n, l < 0 && (e = S, l = -l, s -= l), i && (t = n * r, o -= t / 2, c += t, c < 0 && (c = -c, o -= c));
956
+ break;
957
+ case te:
958
+ o += t, c -= t, c < 0 && (e = C, c = -c, o -= c), i && (n = t / r, s += n / 2, l -= n, l < 0 && (l = -l, s -= l));
959
+ break;
960
+ case w:
961
+ i && (n = -t / r), s += n, l -= n, c += t, c < 0 && l < 0 ? (e = D, c = -c, l = -l, o -= c, s -= l) : c < 0 ? (e = T, c = -c, o -= c) : l < 0 && (e = E, l = -l, s -= l);
962
+ break;
963
+ case T:
964
+ i && (n = t / r), o += t, s += n, c -= t, l -= n, c < 0 && l < 0 ? (e = E, c = -c, l = -l, o -= c, s -= l) : c < 0 ? (e = w, c = -c, o -= c) : l < 0 && (e = D, l = -l, s -= l);
965
+ break;
966
+ case E:
967
+ i && (n = t / r), c += t, l += n, c < 0 && l < 0 ? (e = T, c = -c, l = -l, o -= c, s -= l) : c < 0 ? (e = D, c = -c, o -= c) : l < 0 && (e = w, l = -l, s -= l);
968
+ break;
969
+ case D:
970
+ i && (n = -t / r), o += t, c -= t, l += n, c < 0 && l < 0 ? (e = w, c = -c, l = -l, o -= c, s -= l) : c < 0 ? (e = E, c = -c, o -= c) : l < 0 && (e = T, l = -l, s -= l);
971
+ break;
972
+ }
973
+ return a && a.$setAction(e), this.$change(o, s, c, l);
974
+ }
975
+ $zoom(e, t, n) {
976
+ if (!this.zoomable || e === 0) return this;
977
+ e < 0 ? e = 1 / (1 - e) : e += 1;
978
+ let { width: r, height: i } = this, a = r * e, o = i * e, s = this.x, c = this.y;
979
+ return P(t) && P(n) ? (s -= (a - r) * ((t - this.x) / r), c -= (o - i) * ((n - this.y) / i)) : (s -= (a - r) / 2, c -= (o - i) / 2), this.$change(s, c, a, o);
980
+ }
981
+ $change(e, t, n = this.width, r = this.height, i = this.aspectRatio, a = !1) {
982
+ return this.$changing || !P(e) || !P(t) || !P(n) || !P(r) || n < 0 || r < 0 || (F(i) && ({width: n, height: r} = H({
983
+ aspectRatio: i,
984
+ width: n,
985
+ height: r
986
+ }, "cover")), this.precise || (e = Math.round(e), t = Math.round(t), n = Math.round(n), r = Math.round(r)), e === this.x && t === this.y && n === this.width && r === this.height && Object.is(i, this.aspectRatio) && !a) || (this.hidden &&= !1, this.$emit("change", {
987
+ x: e,
988
+ y: t,
989
+ width: n,
990
+ height: r
991
+ }) === !1) ? this : (this.$changing = !0, this.x = e, this.y = t, this.width = n, this.height = r, this.$changing = !1, this.$render());
992
+ }
993
+ $reset() {
994
+ let { x: e, y: t, width: n, height: r } = this.$initialSelection;
995
+ return this.$change(e, t, n, r);
996
+ }
997
+ $clear() {
998
+ return this.$change(0, 0, 0, 0, NaN, !0), this.hidden = !0, this;
999
+ }
1000
+ $render() {
1001
+ return this.$setStyles({
1002
+ transform: `translate(${this.x}px, ${this.y}px)`,
1003
+ width: this.width,
1004
+ height: this.height
1005
+ });
1006
+ }
1007
+ $toCanvas(e) {
1008
+ return new Promise((t, n) => {
1009
+ if (!this.isConnected) {
1010
+ n(/* @__PURE__ */ Error("The current element is not connected to the DOM."));
1011
+ return;
1012
+ }
1013
+ let r = document.createElement("canvas"), { width: i, height: a } = this, o = 1;
1014
+ if (I(e) && (F(e.width) || F(e.height)) && ({width: i, height: a} = H({
1015
+ aspectRatio: i / a,
1016
+ width: e.width,
1017
+ height: e.height
1018
+ }), o = i / this.width), r.width = i, r.height = a, !this.$canvas) {
1019
+ t(r);
1020
+ return;
1021
+ }
1022
+ let s = this.$canvas.querySelector(this.$getTagNameOf(f));
1023
+ if (!s) {
1024
+ t(r);
1025
+ return;
1026
+ }
1027
+ s.$ready().then((n) => {
1028
+ let c = r.getContext("2d");
1029
+ if (c) {
1030
+ let [t, l, u, d, f, p] = s.$getTransform(), m = -this.x, h = -this.y, g = (m * d - u * h) / (t * d - u * l), _ = (h * t - l * m) / (t * d - u * l), v = t * g + u * _ + f, y = l * g + d * _ + p, b = n.naturalWidth, x = n.naturalHeight;
1031
+ o !== 1 && (v *= o, y *= o, b *= o, x *= o);
1032
+ let S = b / 2, C = x / 2;
1033
+ c.fillStyle = "transparent", c.fillRect(0, 0, i, a), I(e) && L(e.beforeDraw) && e.beforeDraw.call(this, c, r), c.save(), c.translate(S, C), c.transform(t, l, u, d, v, y), c.translate(-S, -C), c.drawImage(n, 0, 0, b, x), c.restore();
1034
+ }
1035
+ t(r);
1036
+ }).catch(n);
1037
+ });
1038
+ }
1039
+ };
1040
+ X.$name = p, X.$version = "2.1.1";
1041
+ //#endregion
1042
+ //#region node_modules/.pnpm/@cropper+element-grid@2.1.1/node_modules/@cropper/element-grid/dist/element-grid.esm.raw.js
1043
+ var qe = ":host{display:flex;flex-direction:column;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([bordered]){border:1px dashed var(--theme-color)}:host([covered]){bottom:0;left:0;position:absolute;right:0;top:0}:host>span{display:flex;flex:1}:host>span+span{border-top:1px dashed var(--theme-color)}:host>span>span{flex:1}:host>span>span+span{border-left:1px dashed var(--theme-color)}", Z = class extends G {
1044
+ constructor() {
1045
+ super(...arguments), this.$style = qe, this.bordered = !1, this.columns = 3, this.covered = !1, this.rows = 3, this.slottable = !1, this.themeColor = "rgba(238, 238, 238, 0.5)";
1046
+ }
1047
+ static get observedAttributes() {
1048
+ return super.observedAttributes.concat([
1049
+ "bordered",
1050
+ "columns",
1051
+ "covered",
1052
+ "rows"
1053
+ ]);
1054
+ }
1055
+ $propertyChangedCallback(e, t, n) {
1056
+ Object.is(n, t) || (super.$propertyChangedCallback(e, t, n), (e === "rows" || e === "columns") && this.$nextTick(() => {
1057
+ this.$render();
1058
+ }));
1059
+ }
1060
+ connectedCallback() {
1061
+ super.connectedCallback(), this.$render();
1062
+ }
1063
+ $render() {
1064
+ let e = this.$getShadowRoot(), t = document.createDocumentFragment();
1065
+ for (let e = 0; e < this.rows; e += 1) {
1066
+ let e = document.createElement("span");
1067
+ e.setAttribute("role", "row");
1068
+ for (let t = 0; t < this.columns; t += 1) {
1069
+ let t = document.createElement("span");
1070
+ t.setAttribute("role", "gridcell"), e.appendChild(t);
1071
+ }
1072
+ t.appendChild(e);
1073
+ }
1074
+ e && (e.innerHTML = "", e.appendChild(t));
1075
+ }
1076
+ };
1077
+ Z.$name = u, Z.$version = "2.1.1";
1078
+ //#endregion
1079
+ //#region node_modules/.pnpm/@cropper+element-crosshair@2.1.1/node_modules/@cropper/element-crosshair/dist/element-crosshair.esm.raw.js
1080
+ var Je = ":host{display:inline-block;height:1em;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1em}:host:after,:host:before{background-color:var(--theme-color);content:\"\";display:block;position:absolute}:host:before{height:1px;left:0;top:50%;transform:translateY(-50%);width:100%}:host:after{height:100%;left:50%;top:0;transform:translateX(-50%);width:1px}:host([centered]){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}", Q = class extends G {
1081
+ constructor() {
1082
+ super(...arguments), this.$style = Je, this.centered = !1, this.slottable = !1, this.themeColor = "rgba(238, 238, 238, 0.5)";
1083
+ }
1084
+ static get observedAttributes() {
1085
+ return super.observedAttributes.concat(["centered"]);
1086
+ }
1087
+ };
1088
+ Q.$name = l, Q.$version = "2.1.1";
1089
+ //#endregion
1090
+ //#region node_modules/.pnpm/@cropper+element-viewer@2.1.1/node_modules/@cropper/element-viewer/dist/element-viewer.esm.raw.js
1091
+ var Ye = ":host{display:block;height:100%;overflow:hidden;position:relative;width:100%}", Xe = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), et = "both", tt = "horizontal", nt = "vertical", rt = "none", $ = class extends G {
1092
+ constructor() {
1093
+ super(...arguments), this.$onSelectionChange = null, this.$onSourceImageLoad = null, this.$onSourceImageTransform = null, this.$scale = 1, this.$style = Ye, this.resize = nt, this.selection = "", this.slottable = !1;
1094
+ }
1095
+ set $image(e) {
1096
+ Ze.set(this, e);
1097
+ }
1098
+ get $image() {
1099
+ return Ze.get(this);
1100
+ }
1101
+ set $sourceImage(e) {
1102
+ $e.set(this, e);
1103
+ }
1104
+ get $sourceImage() {
1105
+ return $e.get(this);
1106
+ }
1107
+ set $canvas(e) {
1108
+ Xe.set(this, e);
1109
+ }
1110
+ get $canvas() {
1111
+ return Xe.get(this);
1112
+ }
1113
+ set $selection(e) {
1114
+ Qe.set(this, e);
1115
+ }
1116
+ get $selection() {
1117
+ return Qe.get(this);
1118
+ }
1119
+ static get observedAttributes() {
1120
+ return super.observedAttributes.concat(["resize", "selection"]);
1121
+ }
1122
+ connectedCallback() {
1123
+ super.connectedCallback();
1124
+ let e = null;
1125
+ if (e = this.selection ? De(this)?.querySelector(this.selection) ?? null : this.closest(this.$getTagNameOf(p)), R(e)) {
1126
+ this.$selection = e, this.$onSelectionChange = this.$handleSelectionChange.bind(this), B(e, M, this.$onSelectionChange);
1127
+ let t = e.closest(this.$getTagNameOf(c));
1128
+ if (t) {
1129
+ this.$canvas = t;
1130
+ let e = t.querySelector(this.$getTagNameOf(f));
1131
+ e && (this.$sourceImage = e, this.$image = e.cloneNode(!0), this.$getShadowRoot().appendChild(this.$image), this.$onSourceImageLoad = this.$handleSourceImageLoad.bind(this), this.$onSourceImageTransform = this.$handleSourceImageTransform.bind(this), B(e.$image, O, this.$onSourceImageLoad), B(e, de, this.$onSourceImageTransform));
1132
+ }
1133
+ this.$render();
1134
+ }
1135
+ }
1136
+ disconnectedCallback() {
1137
+ let { $selection: e, $sourceImage: t } = this;
1138
+ e && this.$onSelectionChange && (z(e, M, this.$onSelectionChange), this.$onSelectionChange = null), t && this.$onSourceImageLoad && (z(t.$image, O, this.$onSourceImageLoad), this.$onSourceImageLoad = null), t && this.$onSourceImageTransform && (z(t, de, this.$onSourceImageTransform), this.$onSourceImageTransform = null), super.disconnectedCallback();
1139
+ }
1140
+ $handleSelectionChange(e) {
1141
+ this.$render(e.defaultPrevented ? this.$selection : e.detail);
1142
+ }
1143
+ $handleSourceImageLoad() {
1144
+ let { $image: e, $sourceImage: t } = this, n = e.getAttribute("src"), r = t.getAttribute("src");
1145
+ r && r !== n && (e.setAttribute("src", r), e.$ready(() => {
1146
+ this.$render();
1147
+ }));
1148
+ }
1149
+ $handleSourceImageTransform(e) {
1150
+ this.$render(void 0, e.detail.matrix);
1151
+ }
1152
+ $render(e, t) {
1153
+ let { $canvas: n, $selection: r } = this;
1154
+ !e && !r.hidden && (e = r), (!e || e.x === 0 && e.y === 0 && e.width === 0 && e.height === 0) && (e = {
1155
+ x: 0,
1156
+ y: 0,
1157
+ width: n.offsetWidth,
1158
+ height: n.offsetHeight
1159
+ });
1160
+ let { x: i, y: a, width: o, height: s } = e, c = {}, { clientWidth: l, clientHeight: u } = this, d = l, f = u, p = NaN;
1161
+ switch (this.resize) {
1162
+ case et:
1163
+ p = 1, d = o, f = s, c.width = o, c.height = s;
1164
+ break;
1165
+ case tt:
1166
+ p = s > 0 ? u / s : 0, d = o * p, c.width = d;
1167
+ break;
1168
+ case nt:
1169
+ p = o > 0 ? l / o : 0, f = s * p, c.height = f;
1170
+ break;
1171
+ case rt:
1172
+ default: l > 0 ? p = o > 0 ? l / o : 0 : u > 0 && (p = s > 0 ? u / s : 0);
1173
+ }
1174
+ this.$scale = p, this.$setStyles(c), this.$sourceImage && setTimeout(() => {
1175
+ this.$transformImageByOffset(t ?? this.$sourceImage.$getTransform(), -i, -a);
1176
+ });
1177
+ }
1178
+ $transformImageByOffset(e, t, n) {
1179
+ let { $image: r, $scale: i, $sourceImage: a } = this;
1180
+ if (a && r && i >= 0) {
1181
+ let [o, s, c, l, u, d] = e, f = (t * l - c * n) / (o * l - c * s), p = (n * o - s * t) / (o * l - c * s), m = o * f + c * p + u, h = s * f + l * p + d;
1182
+ a.$ready((e) => {
1183
+ this.$setStyles.call(r, {
1184
+ width: e.naturalWidth * i,
1185
+ height: e.naturalHeight * i
1186
+ });
1187
+ }), r.$setTransform(o, s, c, l, m * i, h * i);
1188
+ }
1189
+ }
1190
+ };
1191
+ $.$name = h, $.$version = "2.1.1";
1192
+ //#endregion
1193
+ //#region node_modules/.pnpm/cropperjs@2.1.1/node_modules/cropperjs/dist/cropper.esm.raw.js
1194
+ var it = "<cropper-canvas background><cropper-image rotatable scalable skewable translatable></cropper-image><cropper-shade hidden></cropper-shade><cropper-handle action=\"select\" plain></cropper-handle><cropper-selection initial-coverage=\"0.5\" movable resizable><cropper-grid role=\"grid\" bordered covered></cropper-grid><cropper-crosshair centered></cropper-crosshair><cropper-handle action=\"move\" theme-color=\"rgba(255, 255, 255, 0.35)\"></cropper-handle><cropper-handle action=\"n-resize\"></cropper-handle><cropper-handle action=\"e-resize\"></cropper-handle><cropper-handle action=\"s-resize\"></cropper-handle><cropper-handle action=\"w-resize\"></cropper-handle><cropper-handle action=\"ne-resize\"></cropper-handle><cropper-handle action=\"nw-resize\"></cropper-handle><cropper-handle action=\"se-resize\"></cropper-handle><cropper-handle action=\"sw-resize\"></cropper-handle></cropper-selection></cropper-canvas>", at = /^img|canvas$/, ot = /<(\/?(?:script|style)[^>]*)>/gi, st = { template: it };
1195
+ K.$define(), Q.$define(), Z.$define(), Y.$define(), q.$define(), X.$define(), J.$define(), $.$define();
1196
+ var ct = class {
1197
+ constructor(e, t) {
1198
+ if (this.options = st, N(e) && (e = document.querySelector(e)), !R(e) || !at.test(e.localName)) throw Error("The first argument is required and must be an <img> or <canvas> element.");
1199
+ this.element = e, t = Object.assign(Object.assign({}, st), t), this.options = t;
1200
+ let { container: n } = t;
1201
+ if (n && (N(n) && (n = De(e)?.querySelector(n)), !R(n))) throw Error("The `container` option must be an element or a valid selector.");
1202
+ R(n) || (n = e.parentElement ? e.parentElement : e.ownerDocument.body), this.container = n;
1203
+ let r = e.localName, i = "";
1204
+ r === "img" ? {src: i} = e : r === "canvas" && window.HTMLCanvasElement && (i = e.toDataURL());
1205
+ let { template: a } = t;
1206
+ if (a && N(a)) {
1207
+ let t = document.createElement("template"), o = document.createDocumentFragment();
1208
+ t.innerHTML = a.replace(ot, "&lt;$1&gt;"), o.appendChild(t.content), Array.from(o.querySelectorAll(f)).forEach((t) => {
1209
+ t.setAttribute("src", i), t.setAttribute("alt", e.alt || "The image to crop"), r === "img" && [
1210
+ "crossorigin",
1211
+ "decoding",
1212
+ "elementtiming",
1213
+ "fetchpriority",
1214
+ "loading",
1215
+ "referrerpolicy",
1216
+ "sizes",
1217
+ "srcset"
1218
+ ].forEach((n) => {
1219
+ e.hasAttribute(n) && t.setAttribute(n, e.getAttribute(n) || "");
1220
+ });
1221
+ }), e.parentElement ? (e.style.display = "none", n.insertBefore(o, e.nextSibling)) : n.appendChild(o);
1222
+ }
1223
+ }
1224
+ getCropperCanvas() {
1225
+ return this.container.querySelector(c);
1226
+ }
1227
+ getCropperImage() {
1228
+ return this.container.querySelector(f);
1229
+ }
1230
+ getCropperSelection() {
1231
+ return this.container.querySelector(p);
1232
+ }
1233
+ getCropperSelections() {
1234
+ return this.container.querySelectorAll(p);
1235
+ }
1236
+ destroy() {
1237
+ var e;
1238
+ let t = this.getCropperCanvas();
1239
+ t && ((e = t.parentElement) == null || e.removeChild(t)), this.element && (this.element.style.display = "");
1240
+ }
1241
+ };
1242
+ ct.version = "2.1.1";
1243
+ //#endregion
1244
+ //#region src/components/CropperCanvas.vue
1245
+ var lt = e({
1246
+ name: "CropperCanvas",
1247
+ props: { background: {
1248
+ type: Boolean,
1249
+ default: !1
1250
+ } },
1251
+ setup(e, { slots: n }) {
1252
+ return K.$define(), () => t("cropper-canvas", {
1253
+ ...e,
1254
+ style: "height: 500px"
1255
+ }, n.default?.());
1256
+ }
1257
+ }), ut = e({
1258
+ name: "CropperImage",
1259
+ props: {
1260
+ src: {
1261
+ type: String,
1262
+ required: !0
1263
+ },
1264
+ alt: {
1265
+ type: String,
1266
+ default: ""
1267
+ },
1268
+ initialCenterSize: {
1269
+ type: String,
1270
+ default: "contain"
1271
+ },
1272
+ rotatable: {
1273
+ type: Boolean,
1274
+ default: !1
1275
+ },
1276
+ scalable: {
1277
+ type: Boolean,
1278
+ default: !1
1279
+ },
1280
+ skewable: {
1281
+ type: Boolean,
1282
+ default: !1
1283
+ },
1284
+ slottable: {
1285
+ type: Boolean,
1286
+ default: !1
1287
+ },
1288
+ translatable: {
1289
+ type: Boolean,
1290
+ default: !1
1291
+ }
1292
+ },
1293
+ setup(e, { slots: n }) {
1294
+ return q.$define(), () => t("cropper-image", e, n.default?.());
1295
+ }
1296
+ }), dt = e({
1297
+ name: "CropperShade",
1298
+ props: {
1299
+ x: {
1300
+ type: Number,
1301
+ default: 0
1302
+ },
1303
+ y: {
1304
+ type: Number,
1305
+ default: 0
1306
+ },
1307
+ width: {
1308
+ type: Number,
1309
+ default: 0
1310
+ },
1311
+ height: {
1312
+ type: Number,
1313
+ default: 0
1314
+ },
1315
+ slottable: {
1316
+ type: Boolean,
1317
+ default: !1
1318
+ },
1319
+ themeColor: {
1320
+ type: String,
1321
+ default: "rgba(0, 0, 0, 0.65)"
1322
+ },
1323
+ hidden: {
1324
+ type: Boolean,
1325
+ default: !1
1326
+ }
1327
+ },
1328
+ setup(e, { slots: n }) {
1329
+ return J.$define(), () => t("cropper-shade", e, n.default?.());
1330
+ }
1331
+ }), ft = e({
1332
+ name: "CropperHandle",
1333
+ props: {
1334
+ action: {
1335
+ type: String,
1336
+ default: "none"
1337
+ },
1338
+ plain: {
1339
+ type: Boolean,
1340
+ default: !1
1341
+ },
1342
+ slottable: {
1343
+ type: Boolean,
1344
+ default: !1
1345
+ },
1346
+ themeColor: {
1347
+ type: String,
1348
+ default: "rgba(51, 153, 255, 0.5)"
1349
+ }
1350
+ },
1351
+ setup(e, { slots: n }) {
1352
+ return Y.$define(), () => t("cropper-handle", e, n.default?.());
1353
+ }
1354
+ }), pt = e({
1355
+ name: "CropperSelection",
1356
+ props: {
1357
+ x: {
1358
+ type: Number,
1359
+ default: 0
1360
+ },
1361
+ y: {
1362
+ type: Number,
1363
+ default: 0
1364
+ },
1365
+ width: {
1366
+ type: Number,
1367
+ default: 0
1368
+ },
1369
+ height: {
1370
+ type: Number,
1371
+ default: 0
1372
+ },
1373
+ aspectRatio: { type: Number },
1374
+ initialAspectRatio: { type: Number },
1375
+ initialCoverage: { type: Number },
1376
+ dynamic: {
1377
+ type: Boolean,
1378
+ default: !1
1379
+ },
1380
+ movable: {
1381
+ type: Boolean,
1382
+ default: !1
1383
+ },
1384
+ resizable: {
1385
+ type: Boolean,
1386
+ default: !1
1387
+ },
1388
+ zoomable: {
1389
+ type: Boolean,
1390
+ default: !1
1391
+ },
1392
+ multiple: {
1393
+ type: Boolean,
1394
+ default: !1
1395
+ },
1396
+ keyboard: {
1397
+ type: Boolean,
1398
+ default: !1
1399
+ },
1400
+ outlined: {
1401
+ type: Boolean,
1402
+ default: !1
1403
+ },
1404
+ precise: {
1405
+ type: Boolean,
1406
+ default: !1
1407
+ }
1408
+ },
1409
+ setup(e, { slots: r, expose: i }) {
1410
+ return X.$define(), i({ selection: n("sel") }), () => t("cropper-selection", {
1411
+ ref: "sel",
1412
+ ...e
1413
+ }, r.default?.());
1414
+ }
1415
+ }), mt = e({
1416
+ name: "CropperCrosshair",
1417
+ props: { centered: {
1418
+ type: Boolean,
1419
+ default: !1
1420
+ } },
1421
+ setup(e, { slots: n }) {
1422
+ return Q.$define(), () => t("cropper-crosshair", e, n.default?.());
1423
+ }
1424
+ }), ht = e({
1425
+ name: "CropperGrid",
1426
+ props: {
1427
+ role: {
1428
+ type: String,
1429
+ default: "grid"
1430
+ },
1431
+ covered: {
1432
+ type: Boolean,
1433
+ default: !1
1434
+ }
1435
+ },
1436
+ setup(e, { slots: n }) {
1437
+ return Z.$define(), () => t("cropper-grid", e, n.default?.());
1438
+ }
1439
+ }), gt = e({
1440
+ name: "CropperViewer",
1441
+ props: {
1442
+ resize: {
1443
+ type: String,
1444
+ default: "vertical"
1445
+ },
1446
+ selection: {
1447
+ type: String,
1448
+ default: ""
1449
+ }
1450
+ },
1451
+ setup(e, { slots: n }) {
1452
+ return $.$define(), () => t("cropper-viewer", e, n.default?.());
1453
+ }
1454
+ }), _t = { install: (e) => {
1455
+ e.component("CropperCanvas", lt), e.component("CropperImage", ut), e.component("CropperShade", dt), e.component("CropperHandle", ft), e.component("CropperSelection", pt), e.component("CropperCrosshair", mt), e.component("CropperGrid", ht), e.component("CropperViewer", gt);
1456
+ } };
1457
+ //#endregion
1458
+ export { lt as CropperCanvas, mt as CropperCrosshair, ht as CropperGrid, ft as CropperHandle, ut as CropperImage, pt as CropperSelection, dt as CropperShade, gt as CropperViewer, _t as default };