@cling-se/widget 0.19.6 → 0.19.8
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/CHANGELOG.md +15 -1
- package/dist/{AddClientCallout-DtVRTCr_.js → AddClientCallout-sPxYX5tQ.js} +18 -18
- package/dist/{AnswerModal-ClyWtHBj.js → AnswerModal-o8OHHulg.js} +80 -80
- package/dist/{AttachmentItem-COoLlAum.js → AttachmentItem-CzzOlHB-.js} +16 -16
- package/dist/{BaseUpload-DlaYaxxr.js → BaseUpload-oZQfFwOj.js} +256 -256
- package/dist/{BlockMedia-IMu4YO3J.js → BlockMedia-BGPxfM2X.js} +16 -16
- package/dist/{CCallout-C32zwICP.js → CCallout-CrbMGTIj.js} +15 -15
- package/dist/{CCurrencyDropdown-D4ZxTioo.js → CCurrencyDropdown-BnNDP51j.js} +13 -13
- package/dist/{CDropdownItem-BuQONogL.js → CDropdownItem-E-kRDIiy.js} +6 -6
- package/dist/{CFormField.vue_vue_type_script_setup_true_lang-KdkAe_wn.js → CFormField.vue_vue_type_script_setup_true_lang-Bi0MjQdW.js} +25 -25
- package/dist/{CPhoneFormat-C2K78cmZ.js → CPhoneFormat-CIQAVdsB.js} +1 -1
- package/dist/{CPhoneInput-DolVFzrL.js → CPhoneInput-9AwTJm-0.js} +21 -21
- package/dist/{CPriceInput-SbRlrDnD.js → CPriceInput-agFahtr1.js} +11 -11
- package/dist/CSelect-BpautzPq.js +129 -0
- package/dist/CSkeleton-GIqd-JU4.js +47 -0
- package/dist/{ClientAutocomplete-vgxEGqNU.js → ClientAutocomplete-DOHX9Igy.js} +26 -26
- package/dist/{ClientModal-B8ip7v99.js → ClientModal-DAXKN_b3.js} +35 -35
- package/dist/{ColorPicker-BrfM9S1s.js → ColorPicker-B9F8znY_.js} +82 -82
- package/dist/{CompanyModal-DJZezqM5.js → CompanyModal-BvIMVys6.js} +27 -27
- package/dist/{ContentWrapper-zJ4MCnSC.js → ContentWrapper-DB22RaUr.js} +24 -24
- package/dist/{CoverBlockSettings-Cz0NUYXX.js → CoverBlockSettings--l4fH9mr.js} +32 -32
- package/dist/{DocAnswer-EWarWnbt.js → DocAnswer-Bq-4uVbe.js} +4 -4
- package/dist/{DocDetails-CGHN3tbO.js → DocDetails-yxmchgO5.js} +59 -59
- package/dist/{DocForm-BLTap-Bb.js → DocForm-CzrR8o22.js} +1208 -1180
- package/dist/{DocFormSend-_jCPFI9r.js → DocFormSend-Bjc1QDcK.js} +11 -11
- package/dist/{DocLinks-D9Ok4HvN.js → DocLinks-BXbC-6v3.js} +6 -6
- package/dist/{DocModalBase-fQz5UuCF.js → DocModalBase-axX_Rlp3.js} +1 -1
- package/dist/{DocPrint-Cua_U7zt.js → DocPrint-D0IdWsUM.js} +19 -19
- package/dist/{DocReceipt-Cg2hiSby.js → DocReceipt-4e-RmgeQ.js} +19 -19
- package/dist/{DocSendReminder-Dh7G9kbZ.js → DocSendReminder-L35eZxgk.js} +12 -12
- package/dist/{DocTextEditor-Ds4Cbg-2.js → DocTextEditor-KrfylSV6.js} +4493 -4435
- package/dist/{DocTimeline-DpWUMwJE.js → DocTimeline-Be5CvtcQ.js} +18 -18
- package/dist/{DocumentClient-DUqHQVSe.js → DocumentClient-Bc4kf2q9.js} +10 -10
- package/dist/DocumentLayout-Oe-ZsHML.js +595 -0
- package/dist/{DocumentLogotype-BiekV9-j.js → DocumentLogotype-BFo5UEWS.js} +20 -20
- package/dist/{DocumentVoided-D_YMyeV8.js → DocumentVoided-DlQtlO7G.js} +7 -7
- package/dist/{EmbedInput-Crx-LEGc.js → EmbedInput-B29usQZZ.js} +10 -10
- package/dist/{EmbedSettings-xIGtEN7L.js → EmbedSettings-D-9rcSn0.js} +16 -16
- package/dist/{ErrorCallout-D_fUVD4I.js → ErrorCallout--EnH1Ezu.js} +9 -9
- package/dist/{FilePreviewModal-av2lE91B.js → FilePreviewModal-H5Ilg9xN.js} +9 -9
- package/dist/{Flag-CI52SH_9.js → Flag-DgZVh3Lf.js} +4 -4
- package/dist/{HeaderSettings-Ip634NWe.js → HeaderSettings-HuM_JwJw.js} +27 -27
- package/dist/{ImageSelectModal-DNtR86H7.js → ImageSelectModal-CJ-DstAf.js} +14 -14
- package/dist/{ImageUploadWrapper-Co43CWCP.js → ImageUploadWrapper-TYs37LIQ.js} +76 -76
- package/dist/{Index-C6KPbnAq.js → Index-6N_iRlrQ.js} +10 -10
- package/dist/{Index-bvCcp9l6.js → Index-B-PDcQKh.js} +34 -34
- package/dist/{Index-CTQyX_63.js → Index-B942Auag.js} +2 -2
- package/dist/{Index-4ZURK6a8.js → Index-BLdFyt-s.js} +12 -12
- package/dist/{Index-CZqJYh7u.js → Index-BMpHXgR4.js} +16 -16
- package/dist/{Index-DGwF2cvQ.js → Index-BZ6ZDf9T.js} +11 -11
- package/dist/{Index-Ci_PUYqE.js → Index-BdnFLjgV.js} +11 -11
- package/dist/{Index-BdW5_mV-.js → Index-BeOtRIzZ.js} +21 -21
- package/dist/Index-BsRxY7vc.js +21 -0
- package/dist/{Index-xVX7aGXv.js → Index-CAMAtPVL.js} +6 -6
- package/dist/{Index-uDG1i8F-.js → Index-CC4E2CmH.js} +11 -11
- package/dist/{Index-CJi8Remu.js → Index-CGus-YwW.js} +26 -26
- package/dist/{Index-C-Suk6Qs.js → Index-CLgN5Jzf.js} +3 -3
- package/dist/{Index-C92jPUcy.js → Index-CTlB43yV.js} +7 -7
- package/dist/{Index-CmLvcWe3.js → Index-CY2sRfaY.js} +194 -218
- package/dist/{Index-PzcQhAgF.js → Index-CnrSvy6E.js} +2 -2
- package/dist/{Index-Bgm5PHos.js → Index-CrdSdXWN.js} +18 -18
- package/dist/{Index-Bj81gIof.js → Index-CtJfMiZW.js} +2 -2
- package/dist/Index-D4HNTocO.js +4 -0
- package/dist/{Index-chiZsMLh.js → Index-D5_GLLQH.js} +507 -512
- package/dist/{Index-DOiPKAhk.js → Index-D9sceHk5.js} +17 -17
- package/dist/{Index-CV5RbQn5.js → Index-DJ11Zra_.js} +42 -42
- package/dist/{Index-DQbbxV0m.js → Index-DMIjuWSa.js} +9 -9
- package/dist/{Index-BMwBpYpa.js → Index-DTm59e-A.js} +11 -11
- package/dist/{Index-CxAd29-m.js → Index-DXT_IMjq.js} +8 -8
- package/dist/{Index-BF1bZUso.js → Index-DYUvtCff.js} +8 -8
- package/dist/{Index-DKuTOk0t.js → Index-DYW8T0Hl.js} +18 -18
- package/dist/{Index-DWIpdRX-.js → Index-Dg4dwlh_.js} +59 -58
- package/dist/{Index-DOCeODtL.js → Index-N88Abomf.js} +11 -11
- package/dist/{Index-BY2kaUsM.js → Index-W-Q19E3a.js} +7 -7
- package/dist/{Index-DwIfORsz.js → Index-edWEg_rF.js} +29 -29
- package/dist/{Index-DlGSVN83.js → Index-nRqNPZ3B.js} +18 -18
- package/dist/{Index-CeJRMtmh.js → Index-nTp9wEni.js} +7 -7
- package/dist/{Index-D_X2OZA3.js → Index-yJRtT77X.js} +2 -2
- package/dist/{Index.vue_vue_type_script_lang-WK-YdZ30.js → Index.vue_vue_type_script_lang-PJPQMT2c.js} +2 -2
- package/dist/{InputToggleRow-CWvEi0HF.js → InputToggleRow-DCr_DEm4.js} +9 -9
- package/dist/{ManualPopover-BSX3bOr0.js → ManualPopover-CpVsmQvn.js} +4 -4
- package/dist/{MediaWrapper-D8BXMoDz.js → MediaWrapper-Cj3LBhdR.js} +4 -4
- package/dist/{NotBindingText-V-8_5Pln.js → NotBindingText-1J0p_k4u.js} +5 -5
- package/dist/{PackageGroup-BN5njJA7.js → PackageGroup-CqrWEfCT.js} +17 -17
- package/dist/{PdfTerms-DarzYw1g.js → PdfTerms-DmrPDtae.js} +6 -6
- package/dist/{PdfViewer-DYN758PA.js → PdfViewer-C2EEwUBa.js} +37 -37
- package/dist/{PlainHtml.vue_vue_type_script_setup_true_lang-B3g18l5G.js → PlainHtml.vue_vue_type_script_setup_true_lang-B6pRo08V.js} +2 -2
- package/dist/{PriceHeader-B7QoQ2ZO.js → PriceHeader-BaREzUxI.js} +32 -32
- package/dist/{SearchApi-rcvoh3Av.js → SearchApi-Bf4jeQVr.js} +6 -6
- package/dist/{SendForm-DHRq76pb.js → SendForm-D5qpHxNU.js} +713 -711
- package/dist/{Setup-BWMY9S__.js → Setup-Bw8ViFxw.js} +4 -4
- package/dist/{SmartList-BpNfmUMA.js → SmartList-CzylvV8N.js} +1 -1
- package/dist/{Sortable.vue_vue_type_script_setup_true_lang-B_f6Nh_O.js → Sortable.vue_vue_type_script_setup_true_lang-DleoAiSK.js} +92 -92
- package/dist/{TermsSettings-BTv1dj63.js → TermsSettings-EoJvsPqK.js} +20 -20
- package/dist/{ThemeColorRow-r1ECSrBU.js → ThemeColorRow-D3blQMiD.js} +12 -12
- package/dist/{ToggleBinding-BBF1duBh.js → ToggleBinding-BteBsRYr.js} +7 -7
- package/dist/{UploadModal-B_l6gvuJ.js → UploadModal-Cr5sF3M-.js} +19 -19
- package/dist/{VideoPlayerInput-8e9ooR1p.js → VideoPlayerInput-BBycKv9w.js} +5 -5
- package/dist/{VideoPlayerSettings-CFOPAFlE.js → VideoPlayerSettings-BXXpTWBf.js} +12 -12
- package/dist/{VideoSelectModal-QWkNrFQC.js → VideoSelectModal-B2VPO6q4.js} +15 -15
- package/dist/{focusDrawerMixin-hy76kTBG.js → focusDrawerMixin-CCAEZjWO.js} +1 -1
- package/dist/{formDrawerState-s4ySD850.js → formDrawerState-CJyP4ce1.js} +1 -1
- package/dist/{helpers-BHIbXt8q.js → helpers-Cf9s0P7o.js} +3 -3
- package/dist/{index-Dbe2ueXc.js → index-C3pnyYI4.js} +90 -90
- package/dist/{index-CGXCI2G7.js → index-CBn1mHmK.js} +36 -36
- package/dist/{index-BTw8ZC8k.js → index-DAJmNac8.js} +6 -6
- package/dist/{index-DpubWmXg.js → index-DYJN9yoF.js} +37 -37
- package/dist/{index-ByEyJueq.js → index-DuXECcGq.js} +31 -31
- package/dist/{index-Cwf2aXw3.js → index-XzoHqJIR.js} +9 -9
- package/dist/{index-DjHfCViH.js → index-_MfZEYgE.js} +28 -27
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +154 -159
- package/dist/{main-WDVYC60Z.js → main-BayUZ9OO.js} +14904 -14950
- package/dist/{mapFormMixin-B8xN9LiX.js → mapFormMixin-Bx5_nE7g.js} +36 -42
- package/dist/omit-BKJdPM2H.js +56 -0
- package/dist/{publicSenderState-CtB0-WJX.js → publicSenderState-CblTasKp.js} +3 -3
- package/dist/{splitpanes-CwgWVXfp.js → splitpanes-DFkgBT3z.js} +6 -6
- package/dist/{template-fVxhQbOu.js → template-CvGgzazD.js} +5 -5
- package/dist/{tippy.esm-Ikv5_i_g.js → tippy.esm-CYKcJaqz.js} +222 -224
- package/dist/{useTermsModal-DxXjznop.js → useTermsModal-DFmdeFRm.js} +5 -5
- package/dist/{utils-fXD4AHot.js → utils-DTwXcY8_.js} +1 -1
- package/dist/{validation-Bf4rZ8pa.js → validation-d_jonAPy.js} +4 -4
- package/dist/widget.css +1 -1
- package/package.json +2 -2
- package/dist/CSelect-BQsWYh8F.js +0 -98
- package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-aq47QhPF.js +0 -51
- package/dist/DocumentLayout-Bth5tpry.js +0 -1434
- package/dist/Index-CFSuI-QL.js +0 -21
- package/dist/Index-DHzaqQH0.js +0 -4
- package/dist/omit-BhJ-wiH8.js +0 -56
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import re from "./BaseUpload-
|
|
2
|
-
import {
|
|
1
|
+
import re from "./BaseUpload-oZQfFwOj.js";
|
|
2
|
+
import { c as y, o as w, T as B, b as T, f as R, w as $, F as Et, n as Ct, ao as nt, u as Bt, v as Ut, R as st, e as ft, am as Rt, _ as kt, d as Ft, j as pt, q as ae, t as he, aA as ce } from "./main-BayUZ9OO.js";
|
|
3
3
|
function Tt(t, e) {
|
|
4
4
|
var i = Object.keys(t);
|
|
5
5
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -122,11 +122,11 @@ function gt(t, e, i) {
|
|
|
122
122
|
}, c;
|
|
123
123
|
}
|
|
124
124
|
gt.debounce = gt;
|
|
125
|
-
var vt = gt,
|
|
126
|
-
return
|
|
125
|
+
var vt = gt, f = function() {
|
|
126
|
+
return f = Object.assign || function(t) {
|
|
127
127
|
for (var e, i = 1, s = arguments.length; i < s; i++) for (var o in e = arguments[i]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
128
128
|
return t;
|
|
129
|
-
},
|
|
129
|
+
}, f.apply(this, arguments);
|
|
130
130
|
};
|
|
131
131
|
/*! *****************************************************************************
|
|
132
132
|
Copyright (c) Microsoft Corporation.
|
|
@@ -190,7 +190,7 @@ var q = function(t, e) {
|
|
|
190
190
|
e === void 0 && (e = {}), this.type = "resize", this.directions = t, this.params = e;
|
|
191
191
|
}, At = function(t) {
|
|
192
192
|
this.type = "move", this.directions = t;
|
|
193
|
-
},
|
|
193
|
+
}, me = function() {
|
|
194
194
|
function t(e, i, s, o, n) {
|
|
195
195
|
this.type = "drag", this.nativeEvent = e, this.position = s, this.previousPosition = o, this.element = i, this.anchor = n;
|
|
196
196
|
}
|
|
@@ -238,7 +238,7 @@ var q = function(t, e) {
|
|
|
238
238
|
if (this.touches.length) {
|
|
239
239
|
if (this.touches.length === 1 && i.length === 1) {
|
|
240
240
|
var s = this.$refs.draggable;
|
|
241
|
-
this.$emit("drag", new
|
|
241
|
+
this.$emit("drag", new me(t, s, { left: i[0].clientX, top: i[0].clientY }, { left: this.touches[0].clientX, top: this.touches[0].clientY }, this.anchor));
|
|
242
242
|
}
|
|
243
243
|
this.touches = i;
|
|
244
244
|
}
|
|
@@ -278,9 +278,9 @@ Vt.render = function(t, e, i, s, o, n) {
|
|
|
278
278
|
return [B(t.$slots, "default")];
|
|
279
279
|
}), _: 3 }, 8, ["class"])], 2);
|
|
280
280
|
};
|
|
281
|
-
var
|
|
281
|
+
var fe = O("vue-line-wrapper"), qt = { name: "LineWrapper", components: { DraggableElement: Mt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
|
|
282
282
|
var t;
|
|
283
|
-
return
|
|
283
|
+
return fe((C(t = {}, this.position, !0), C(t, "disabled", this.disabled), t));
|
|
284
284
|
} }, emits: ["leave", "enter", "drag", "drag-end"] };
|
|
285
285
|
qt.render = function(t, e, i, s, o, n) {
|
|
286
286
|
var a = T("DraggableElement");
|
|
@@ -325,7 +325,7 @@ function ot(t) {
|
|
|
325
325
|
return { left: -t.left, top: -t.top };
|
|
326
326
|
}
|
|
327
327
|
function x(t, e) {
|
|
328
|
-
return
|
|
328
|
+
return f(f({}, t), { left: t.left + e.left, top: t.top + e.top });
|
|
329
329
|
}
|
|
330
330
|
function W(t, e, i, s) {
|
|
331
331
|
if (e !== 1) {
|
|
@@ -376,7 +376,7 @@ function wt(t) {
|
|
|
376
376
|
return { width: t.right !== void 0 && t.left !== void 0 ? t.right - t.left : 1 / 0, height: t.bottom !== void 0 && t.top !== void 0 ? t.bottom - t.top : 1 / 0 };
|
|
377
377
|
}
|
|
378
378
|
function we(t, e) {
|
|
379
|
-
return
|
|
379
|
+
return f(f({}, t), { minWidth: Math.min(e.width, t.minWidth), minHeight: Math.min(e.height, t.minHeight), maxWidth: Math.min(e.width, t.maxWidth), maxHeight: Math.min(e.height, t.maxHeight) });
|
|
380
380
|
}
|
|
381
381
|
function Qt(t, e, i) {
|
|
382
382
|
i === void 0 && (i = !0);
|
|
@@ -393,18 +393,18 @@ function Ht(t) {
|
|
|
393
393
|
var e = t.size, i = t.aspectRatio, s = t.ignoreMinimum, o = t.sizeRestrictions;
|
|
394
394
|
return !!((e.correctRatio || b(e) >= i.minimum && b(e) <= i.maximum) && e.height <= o.maxHeight && e.width <= o.maxWidth && e.width && e.height && (s || e.height >= o.minHeight && e.width >= o.minWidth));
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function jt(t, e) {
|
|
397
397
|
return Math.pow(t.width - e.width, 2) + Math.pow(t.height - e.height, 2);
|
|
398
398
|
}
|
|
399
399
|
function P(t) {
|
|
400
400
|
var e = t.width, i = t.height, s = t.sizeRestrictions, o = { minimum: t.aspectRatio && t.aspectRatio.minimum || 0, maximum: t.aspectRatio && t.aspectRatio.maximum || 1 / 0 }, n = { width: Math.max(s.minWidth, Math.min(s.maxWidth, e)), height: Math.max(s.minHeight, Math.min(s.maxHeight, i)) };
|
|
401
401
|
function a(c, l) {
|
|
402
402
|
return l === void 0 && (l = !1), c.reduce(function(u, d) {
|
|
403
|
-
return Ht({ size: d, aspectRatio: o, sizeRestrictions: s, ignoreMinimum: l }) && (!u ||
|
|
403
|
+
return Ht({ size: d, aspectRatio: o, sizeRestrictions: s, ignoreMinimum: l }) && (!u || jt(d, { width: e, height: i }) < jt(u, { width: e, height: i })) ? d : u;
|
|
404
404
|
}, null);
|
|
405
405
|
}
|
|
406
406
|
var h = [];
|
|
407
|
-
[o.minimum, o.maximum].forEach(function(c) {
|
|
407
|
+
o && [o.minimum, o.maximum].forEach(function(c) {
|
|
408
408
|
c && h.push({ width: n.width, height: n.width / c, correctRatio: !0 }, { width: n.height * c, height: n.height, correctRatio: !0 });
|
|
409
409
|
}), Ht({ size: n, aspectRatio: o, sizeRestrictions: s }) && h.push(n);
|
|
410
410
|
var r = a(h) || a(h, !0);
|
|
@@ -417,13 +417,13 @@ function yt(t) {
|
|
|
417
417
|
function ye(t) {
|
|
418
418
|
var e = t.coordinates, i = t.transform, s = t.imageSize, o = t.sizeRestrictions, n = t.positionRestrictions, a = t.aspectRatio, h = t.visibleArea, r = function(l, u) {
|
|
419
419
|
return yt({ coordinates: l, positionRestrictions: n, event: new At({ left: u.left - l.left, top: u.top - l.top }) });
|
|
420
|
-
}, c =
|
|
420
|
+
}, c = f({}, e);
|
|
421
421
|
return (Array.isArray(i) ? i : [i]).forEach(function(l) {
|
|
422
422
|
var u = {};
|
|
423
|
-
A((u = typeof l == "function" ? l({ coordinates: c, imageSize: s, visibleArea: h }) : l).width) && A(u.height) || (c = function(d,
|
|
424
|
-
var p =
|
|
423
|
+
A((u = typeof l == "function" ? l({ coordinates: c, imageSize: s, visibleArea: h }) : l).width) && A(u.height) || (c = function(d, m) {
|
|
424
|
+
var p = f(f(f({}, d), P({ width: m.width, height: m.height, sizeRestrictions: o, aspectRatio: a })), { left: 0, top: 0 });
|
|
425
425
|
return r(p, { left: d.left, top: d.top });
|
|
426
|
-
}(c,
|
|
426
|
+
}(c, f(f({}, c), u))), A(u.left) && A(u.top) || (c = r(c, f(f({}, c), u)));
|
|
427
427
|
}), c;
|
|
428
428
|
}
|
|
429
429
|
function ze(t) {
|
|
@@ -432,9 +432,9 @@ function ze(t) {
|
|
|
432
432
|
t.aspectRatio;
|
|
433
433
|
var n = t.stencilSize, a = t.sizeRestrictions, h = t.positionRestrictions;
|
|
434
434
|
t.stencilReference;
|
|
435
|
-
var r, c, l, u =
|
|
436
|
-
r = b(
|
|
437
|
-
var p = rt(d = W(d, u.width * i.width / (d.width *
|
|
435
|
+
var r, c, l, u = f({}, s), d = f({}, o), m = f({}, n);
|
|
436
|
+
r = b(m), c = b(u), l === void 0 && (l = 1e-3), (r === 0 || c === 0 ? Math.abs(c - r) < l : Math.abs(c / r) < 1 + l && Math.abs(c / r) > 1 - l) || (u = f(f({}, u), P({ sizeRestrictions: a, width: u.width, height: u.height, aspectRatio: { minimum: b(m), maximum: b(m) } })));
|
|
437
|
+
var p = rt(d = W(d, u.width * i.width / (d.width * m.width)), e({ visibleArea: d, type: "resize" }));
|
|
438
438
|
return p !== 1 && (d = W(d, p), u = W(u, p)), d = S(d = x(d, X(M(u), M(d))), e({ visibleArea: d, type: "move" })), { coordinates: u = S(u, at(H(d), h)), visibleArea: d };
|
|
439
439
|
}
|
|
440
440
|
function Re(t) {
|
|
@@ -442,7 +442,7 @@ function Re(t) {
|
|
|
442
442
|
t.aspectRatio, t.stencilSize, t.sizeRestrictions;
|
|
443
443
|
var a = t.positionRestrictions;
|
|
444
444
|
t.stencilReference;
|
|
445
|
-
var h =
|
|
445
|
+
var h = f({}, o), r = f({}, n);
|
|
446
446
|
if (o && n && e.type !== "manipulateImage") {
|
|
447
447
|
var c = { width: 0, height: 0 };
|
|
448
448
|
r.width, s.width, b(s) > b(h) ? (c.height = 0.8 * s.height, c.width = c.height * b(h)) : (c.width = 0.8 * s.width, c.height = c.width * b(h));
|
|
@@ -452,7 +452,7 @@ function Re(t) {
|
|
|
452
452
|
return { coordinates: h, visibleArea: r };
|
|
453
453
|
}
|
|
454
454
|
function Ae(t) {
|
|
455
|
-
var e = t.event, i = t.coordinates, s = t.visibleArea, o = t.getAreaRestrictions, n =
|
|
455
|
+
var e = t.event, i = t.coordinates, s = t.visibleArea, o = t.getAreaRestrictions, n = f({}, s), a = f({}, i);
|
|
456
456
|
if (e.type === "setCoordinates") {
|
|
457
457
|
var h = Math.max(0, a.width - n.width), r = Math.max(0, a.height - n.height);
|
|
458
458
|
h > r ? n = W(n, Math.min(a.width / n.width, Y(n, o({ visibleArea: n, type: "resize" })))) : r > h && (n = W(n, Math.min(a.height / n.height, Y(n, o({ visibleArea: n, type: "resize" }))))), n = S(n = x(n, ot(N(a, H(n)))), o({ visibleArea: n, type: "move" }));
|
|
@@ -465,7 +465,7 @@ function Me(t) {
|
|
|
465
465
|
}
|
|
466
466
|
function Se(t) {
|
|
467
467
|
var e = t.imageSize, i = t.visibleArea, s = t.aspectRatio, o = t.sizeRestrictions, n = i || e, a = Math.min(s.maximum || 1 / 0, Math.max(s.minimum || 0, b(n))), h = n.width < n.height ? { width: 0.8 * n.width, height: 0.8 * n.width / a } : { height: 0.8 * n.height, width: 0.8 * n.height * a };
|
|
468
|
-
return P(
|
|
468
|
+
return P(f(f({}, h), { aspectRatio: s, sizeRestrictions: o }));
|
|
469
469
|
}
|
|
470
470
|
function xe(t) {
|
|
471
471
|
var e, i, s = t.imageSize, o = t.visibleArea, n = t.boundaries, a = t.aspectRatio, h = t.sizeRestrictions, r = t.stencilSize, c = o || s;
|
|
@@ -474,7 +474,7 @@ function xe(t) {
|
|
|
474
474
|
function Ee(t) {
|
|
475
475
|
var e = t.getAreaRestrictions, i = t.coordinates, s = t.imageSize, o = b(t.boundaries);
|
|
476
476
|
if (i) {
|
|
477
|
-
var n = { height: Math.max(i.height, s.height), width: Math.max(i.width, s.width) }, a = Zt({ width: b(n) > o ? n.width : n.height * o, height: b(n) > o ? n.width / o : n.height }, wt(e())), h = { left: i.left + i.width / 2 - a.width / 2, top: i.top + i.height / 2 - a.height / 2, width: a.width, height: a.height }, r = Z(i, H(
|
|
477
|
+
var n = { height: Math.max(i.height, s.height), width: Math.max(i.width, s.width) }, a = Zt({ width: b(n) > o ? n.width : n.height * o, height: b(n) > o ? n.width / o : n.height }, wt(e())), h = { left: i.left + i.width / 2 - a.width / 2, top: i.top + i.height / 2 - a.height / 2, width: a.width, height: a.height }, r = Z(i, H(f({ left: 0, top: 0 }, s))), c = {};
|
|
478
478
|
return !r.left && !r.right && h.width <= s.width && (c.left = 0, c.right = s.width), !r.top && !r.bottom && h.height <= s.height && (c.top = 0, c.bottom = s.height), S(h, c);
|
|
479
479
|
}
|
|
480
480
|
var l = b(s);
|
|
@@ -484,27 +484,27 @@ function J(t, e) {
|
|
|
484
484
|
return Qt(t, H(e));
|
|
485
485
|
}
|
|
486
486
|
function Ce(t) {
|
|
487
|
-
var e = t.event, i = t.coordinates, s = t.visibleArea, o = t.sizeRestrictions, n = t.getAreaRestrictions, a = t.positionRestrictions, h = t.adjustStencil, r = e.scale, c = e.move, l =
|
|
487
|
+
var e = t.event, i = t.coordinates, s = t.visibleArea, o = t.sizeRestrictions, n = t.getAreaRestrictions, a = t.positionRestrictions, h = t.adjustStencil, r = e.scale, c = e.move, l = f({}, s), u = f({}, i), d = 1, m = 1, p = r.factor && Math.abs(r.factor - 1) > 1e-3;
|
|
488
488
|
l = x(l, { left: c.left || 0, top: c.top || 0 });
|
|
489
489
|
var g = { stencil: { minimum: Math.max(o.minWidth ? o.minWidth / u.width : 0, o.minHeight ? o.minHeight / u.height : 0), maximum: Math.min(o.maxWidth ? o.maxWidth / u.width : 1 / 0, o.maxHeight ? o.maxHeight / u.height : 1 / 0, Y(u, a)) }, area: { maximum: Y(l, n({ visibleArea: l, type: "resize" })) } };
|
|
490
|
-
r.factor && p && (r.factor < 1 ? (
|
|
491
|
-
var E = i.left - s.left,
|
|
492
|
-
return l = S(l = x(l, N(l, { left: a.left !== void 0 ? a.left - E *
|
|
490
|
+
r.factor && p && (r.factor < 1 ? (m = Math.max(r.factor, g.stencil.minimum)) > 1 && (m = 1) : r.factor > 1 && (m = Math.min(r.factor, Math.min(g.area.maximum, g.stencil.maximum))) < 1 && (m = 1)), m && (l = W(l, m, r.center));
|
|
491
|
+
var E = i.left - s.left, j = s.width + s.left - (i.width + i.left), _ = i.top - s.top, G = s.height + s.top - (i.height + i.top);
|
|
492
|
+
return l = S(l = x(l, N(l, { left: a.left !== void 0 ? a.left - E * m : void 0, top: a.top !== void 0 ? a.top - _ * m : void 0, bottom: a.bottom !== void 0 ? a.bottom + G * m : void 0, right: a.right !== void 0 ? a.right + j * m : void 0 })), n({ visibleArea: l, type: "move" })), u.width = u.width * m, u.height = u.height * m, u.left = l.left + E * m, u.top = l.top + _ * m, u = S(u, at(H(l), a)), r.factor && p && h && (r.factor > 1 ? d = Math.min(g.area.maximum, r.factor) / m : r.factor < 1 && (d = Math.max(u.height / l.height, u.width / l.width, r.factor / m)), d !== 1 && (l = x(l = S(l = W(l, d, r.factor > 1 ? r.center : M(u)), n({ visibleArea: l, type: "move" })), ot(N(u, H(l)))))), { coordinates: u, visibleArea: l };
|
|
493
493
|
}
|
|
494
494
|
function Te(t) {
|
|
495
|
-
var e = t.aspectRatio, i = t.getAreaRestrictions, s = t.coordinates, o = t.visibleArea, n = t.sizeRestrictions, a = t.positionRestrictions, h = t.imageSize, r = t.previousImageSize, c = t.angle, l =
|
|
496
|
-
return (l =
|
|
495
|
+
var e = t.aspectRatio, i = t.getAreaRestrictions, s = t.coordinates, o = t.visibleArea, n = t.sizeRestrictions, a = t.positionRestrictions, h = t.imageSize, r = t.previousImageSize, c = t.angle, l = f({}, s), u = f({}, o), d = U(M(f({ left: 0, top: 0 }, r)), c);
|
|
496
|
+
return (l = f(f({}, P({ sizeRestrictions: n, aspectRatio: e, width: l.width, height: l.height })), U(M(l), c))).left -= d.left - h.width / 2 + l.width / 2, l.top -= d.top - h.height / 2 + l.height / 2, u = W(u, rt(u, i({ visibleArea: u, type: "resize" }))), { coordinates: l = S(l, a), visibleArea: u = S(u = x(u, X(M(l), M(s))), i({ visibleArea: u, type: "move" })) };
|
|
497
497
|
}
|
|
498
498
|
function We(t) {
|
|
499
|
-
var e = t.flip, i = t.previousFlip, s = t.rotate, o = t.getAreaRestrictions, n = t.coordinates, a = t.visibleArea, h = t.imageSize, r =
|
|
499
|
+
var e = t.flip, i = t.previousFlip, s = t.rotate, o = t.getAreaRestrictions, n = t.coordinates, a = t.visibleArea, h = t.imageSize, r = f({}, n), c = f({}, a), l = i.horizontal !== e.horizontal, u = i.vertical !== e.vertical;
|
|
500
500
|
if (l || u) {
|
|
501
|
-
var d = U({ left: h.width / 2, top: h.height / 2 }, -s),
|
|
502
|
-
r = x(r, X(p, M(r))),
|
|
501
|
+
var d = U({ left: h.width / 2, top: h.height / 2 }, -s), m = U(M(r), -s), p = U({ left: l ? d.left - (m.left - d.left) : m.left, top: u ? d.top - (m.top - d.top) : m.top }, s);
|
|
502
|
+
r = x(r, X(p, M(r))), m = U(M(c), -s), c = S(c = x(c, X(p = U({ left: l ? d.left - (m.left - d.left) : m.left, top: u ? d.top - (m.top - d.top) : m.top }, s), M(c))), o({ visibleArea: c, type: "move" }));
|
|
503
503
|
}
|
|
504
504
|
return { coordinates: r, visibleArea: c };
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
var e = t.directions, i = t.coordinates, s = t.positionRestrictions, o = s === void 0 ? {} : s, n = t.sizeRestrictions, a = t.preserveRatio, h = t.compensate, r =
|
|
506
|
+
function Lt(t) {
|
|
507
|
+
var e = t.directions, i = t.coordinates, s = t.positionRestrictions, o = s === void 0 ? {} : s, n = t.sizeRestrictions, a = t.preserveRatio, h = t.compensate, r = f({}, e), c = D(i, r).width, l = D(i, r).height;
|
|
508
508
|
c < 0 && (r.left < 0 && r.right < 0 ? (r.left = -(i.width - n.minWidth) / (r.left / r.right), r.right = -(i.width - n.minWidth) / (r.right / r.left)) : r.left < 0 ? r.left = -(i.width - n.minWidth) : r.right < 0 && (r.right = -(i.width - n.minWidth))), l < 0 && (r.top < 0 && r.bottom < 0 ? (r.top = -(i.height - n.minHeight) / (r.top / r.bottom), r.bottom = -(i.height - n.minHeight) / (r.bottom / r.top)) : r.top < 0 ? r.top = -(i.height - n.minHeight) : r.bottom < 0 && (r.bottom = -(i.height - n.minHeight)));
|
|
509
509
|
var u = Z(D(i, r), o);
|
|
510
510
|
h && (u.left && u.left > 0 && u.right === 0 ? (r.right += u.left, r.left -= u.left) : u.right && u.right > 0 && u.left === 0 && (r.left += u.right, r.right -= u.right), u.top && u.top > 0 && u.bottom === 0 ? (r.bottom += u.top, r.top -= u.top) : u.bottom && u.bottom > 0 && u.top === 0 && (r.top += u.bottom, r.bottom -= u.bottom), u = Z(D(i, r), o));
|
|
@@ -513,11 +513,11 @@ function jt(t) {
|
|
|
513
513
|
var E = u[g];
|
|
514
514
|
E && r[g] && (d[g] = Math.max(0, 1 - E / r[g]));
|
|
515
515
|
}), a) {
|
|
516
|
-
var
|
|
516
|
+
var m = Math.min.apply(null, I.map(function(g) {
|
|
517
517
|
return d[g];
|
|
518
518
|
}));
|
|
519
|
-
|
|
520
|
-
r[g] *=
|
|
519
|
+
m !== 1 / 0 && I.forEach(function(g) {
|
|
520
|
+
r[g] *= m;
|
|
521
521
|
});
|
|
522
522
|
} else I.forEach(function(g) {
|
|
523
523
|
d[g] !== 1 / 0 && (r[g] *= d[g]);
|
|
@@ -576,7 +576,7 @@ xt.render = function(t, e, i, s, o, n) {
|
|
|
576
576
|
return [R("div", { class: n.classes.root }, null, 2)];
|
|
577
577
|
}), _: 1 }, 8, ["class", "position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
578
578
|
};
|
|
579
|
-
var ut = O("vue-bounding-box"), He = ["east", "west", null],
|
|
579
|
+
var ut = O("vue-bounding-box"), He = ["east", "west", null], je = ["south", "north", null], Kt = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
|
|
580
580
|
return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };
|
|
581
581
|
} }, handlersComponent: { type: [Object, String], default: function() {
|
|
582
582
|
return St;
|
|
@@ -595,7 +595,7 @@ var ut = O("vue-bounding-box"), He = ["east", "west", null], Le = ["south", "nor
|
|
|
595
595
|
} }, resizable: { type: Boolean, default: !0 } }, data: function() {
|
|
596
596
|
var t = [];
|
|
597
597
|
return He.forEach(function(e) {
|
|
598
|
-
|
|
598
|
+
je.forEach(function(i) {
|
|
599
599
|
if (e !== i) {
|
|
600
600
|
var s = Xt(e, i), o = s.name, n = s.classname;
|
|
601
601
|
t.push({ name: o, classname: n, verticalDirection: i, horizontalDirection: e });
|
|
@@ -652,8 +652,8 @@ Kt.render = function(t, e, i, s, o, n) {
|
|
|
652
652
|
}) }, null, 8, ["default-class", "hover-class", "wrapper-class", "horizontal-position", "vertical-position", "disabled", "onDrag"]))], 6);
|
|
653
653
|
}), 128))], 6);
|
|
654
654
|
};
|
|
655
|
-
var
|
|
656
|
-
return { default:
|
|
655
|
+
var Le = O("vue-draggable-area"), Jt = { name: "DraggableArea", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
|
|
656
|
+
return { default: Le() };
|
|
657
657
|
} }, beforeMount: function() {
|
|
658
658
|
window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
|
|
659
659
|
}, beforeUnmount: function() {
|
|
@@ -706,7 +706,7 @@ function Pe(t) {
|
|
|
706
706
|
try {
|
|
707
707
|
if (t) if (/^data:/i.test(t)) e(function(r) {
|
|
708
708
|
r = r.replace(/^data:([^;]+);base64,/gim, "");
|
|
709
|
-
for (var c = atob(r), l = c.length, u = new ArrayBuffer(l), d = new Uint8Array(u),
|
|
709
|
+
for (var c = atob(r), l = c.length, u = new ArrayBuffer(l), d = new Uint8Array(u), m = 0; m < l; m++) d[m] = c.charCodeAt(m);
|
|
710
710
|
return u;
|
|
711
711
|
}(t));
|
|
712
712
|
else if (/^blob:/i.test(t)) {
|
|
@@ -747,10 +747,10 @@ function Be(t) {
|
|
|
747
747
|
}
|
|
748
748
|
r++;
|
|
749
749
|
}
|
|
750
|
-
if (n && (s = n + 10, function(
|
|
751
|
-
var E,
|
|
752
|
-
for (E = p, g += p; E < g; E++)
|
|
753
|
-
return
|
|
750
|
+
if (n && (s = n + 10, function(m, p, g) {
|
|
751
|
+
var E, j = "";
|
|
752
|
+
for (E = p, g += p; E < g; E++) j += String.fromCharCode(m.getUint8(E));
|
|
753
|
+
return j;
|
|
754
754
|
}(i, n + 4, 4) === "Exif")) {
|
|
755
755
|
var c = i.getUint16(s);
|
|
756
756
|
if (((o = c === 18761) || c === 19789) && i.getUint16(s + 2, o) === 42) {
|
|
@@ -905,7 +905,7 @@ ne.render = function(t, e, i, s, o, n) {
|
|
|
905
905
|
var a = T("preview");
|
|
906
906
|
return w(), y(a, st(t.$attrs, { fill: !0 }), null, 16);
|
|
907
907
|
};
|
|
908
|
-
var
|
|
908
|
+
var mt = O("vue-rectangle-stencil"), se = { name: "RectangleStencil", components: { StencilPreview: ne, BoundingBox: Kt, DraggableArea: Jt }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
|
|
909
909
|
return St;
|
|
910
910
|
} }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {
|
|
911
911
|
return xt;
|
|
@@ -920,7 +920,7 @@ var ft = O("vue-rectangle-stencil"), se = { name: "RectangleStencil", components
|
|
|
920
920
|
} } }, data: function() {
|
|
921
921
|
return { moving: !1, resizing: !1 };
|
|
922
922
|
}, computed: { classes: function() {
|
|
923
|
-
return { stencil: z(
|
|
923
|
+
return { stencil: z(mt({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: z(mt("preview"), this.previewClass), boundingBox: z(mt("bounding-box"), this.boundingBoxClass) };
|
|
924
924
|
}, style: function() {
|
|
925
925
|
var t = this.stencilCoordinates, e = t.height, i = t.width, s = t.left, o = t.top, n = { width: "".concat(i, "px"), height: "".concat(e, "px"), transform: "translate(".concat(s, "px, ").concat(o, "px)") };
|
|
926
926
|
return this.transitions && this.transitions.enabled && (n.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), n;
|
|
@@ -943,7 +943,7 @@ se.render = function(t, e, i, s, o, n) {
|
|
|
943
943
|
}), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
|
|
944
944
|
}), _: 1 }, 8, ["width", "height", "transitions", "class", "handlers", "handlers-component", "handlers-classes", "handlers-wrappers-classes", "lines", "lines-component", "lines-classes", "lines-wrappers-classes", "resizable", "onResize", "onResizeEnd"])], 6);
|
|
945
945
|
};
|
|
946
|
-
var Ue = ["transitions"],
|
|
946
|
+
var Ue = ["transitions"], L = O("vue-advanced-cropper"), oe = { name: "Cropper", components: { BackgroundWrapper: zt }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
|
|
947
947
|
return se;
|
|
948
948
|
} }, backgroundWrapperComponent: { type: [Object, String], default: function() {
|
|
949
949
|
return zt;
|
|
@@ -954,27 +954,27 @@ var Ue = ["transitions"], j = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
954
954
|
} }, roundResult: { type: Boolean, default: !0 }, defaultSize: { type: [Function, Object] }, defaultPosition: { type: [Function, Object] }, defaultVisibleArea: { type: [Function, Object] }, defaultTransforms: { type: [Function, Object] }, defaultBoundaries: { type: [Function, String], validator: function(t) {
|
|
955
955
|
return !(typeof t == "string" && t !== "fill" && t !== "fit");
|
|
956
956
|
} }, priority: { type: String, default: "coordinates" }, stencilSize: { type: [Object, Function] }, resizeImage: { type: [Boolean, Object], default: !0 }, moveImage: { type: [Boolean, Object], default: !0 }, autoZoomAlgorithm: { type: Function }, resizeAlgorithm: { type: Function, default: function(t) {
|
|
957
|
-
var e = t.event, i = t.coordinates, s = t.aspectRatio, o = t.positionRestrictions, n = t.sizeRestrictions, a =
|
|
957
|
+
var e = t.event, i = t.coordinates, s = t.aspectRatio, o = t.positionRestrictions, n = t.sizeRestrictions, a = f(f({}, i), { right: i.left + i.width, bottom: i.top + i.height }), h = e.params || {}, r = f({}, e.directions), c = h.allowedDirections || { left: !0, right: !0, bottom: !0, top: !0 };
|
|
958
958
|
n.widthFrozen && (r.left = 0, r.right = 0), n.heightFrozen && (r.top = 0, r.bottom = 0), I.forEach(function(V) {
|
|
959
959
|
c[V] || (r[V] = 0);
|
|
960
960
|
});
|
|
961
|
-
var l = D(a, r =
|
|
961
|
+
var l = D(a, r = Lt({ coordinates: a, directions: r, sizeRestrictions: n, positionRestrictions: o })).width, u = D(a, r).height, d = h.preserveRatio ? b(a) : lt(l / u, s);
|
|
962
962
|
if (d) {
|
|
963
|
-
var
|
|
964
|
-
if (
|
|
963
|
+
var m = h.respectDirection;
|
|
964
|
+
if (m || (m = a.width >= a.height || d === 1 ? "width" : "height"), m === "width") {
|
|
965
965
|
var p = l / d - a.height;
|
|
966
966
|
if (c.top && c.bottom) {
|
|
967
967
|
var g = r.top, E = r.bottom;
|
|
968
968
|
r.bottom = tt(p, E, g), r.top = tt(p, g, E);
|
|
969
969
|
} else c.bottom ? r.bottom = p : c.top ? r.top = p : c.right ? r.right = 0 : c.left && (r.left = 0);
|
|
970
|
-
} else if (
|
|
971
|
-
var
|
|
970
|
+
} else if (m === "height") {
|
|
971
|
+
var j = a.width - u * d;
|
|
972
972
|
if (c.left && c.right) {
|
|
973
973
|
var _ = r.left, G = r.right;
|
|
974
|
-
r.left = -tt(
|
|
975
|
-
} else c.left ? r.left = -
|
|
974
|
+
r.left = -tt(j, _, G), r.right = -tt(j, G, _);
|
|
975
|
+
} else c.left ? r.left = -j : c.right ? r.right = -j : c.top ? r.top = 0 : c.bottom && (r.bottom = 0);
|
|
976
976
|
}
|
|
977
|
-
r =
|
|
977
|
+
r = Lt({ directions: r, coordinates: a, sizeRestrictions: n, positionRestrictions: o, preserveRatio: !0, compensate: h.compensate });
|
|
978
978
|
}
|
|
979
979
|
return l = D(a, r).width, u = D(a, r).height, (d = h.preserveRatio ? b(a) : lt(l / u, s)) && Math.abs(d - l / u) > 1e-3 && I.forEach(function(V) {
|
|
980
980
|
c[V] || (r[V] = 0);
|
|
@@ -983,10 +983,10 @@ var Ue = ["transitions"], j = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
983
983
|
var e = t.stretcher, i = t.imageSize, s = b(i);
|
|
984
984
|
e.style.width = i.width + "px", e.style.height = e.clientWidth / s + "px", e.style.width = e.clientWidth + "px";
|
|
985
985
|
} }, fitCoordinates: { type: Function, default: function(t) {
|
|
986
|
-
var e = t.visibleArea, i = t.coordinates, s = t.aspectRatio, o = t.sizeRestrictions, n = t.positionRestrictions, a =
|
|
986
|
+
var e = t.visibleArea, i = t.coordinates, s = t.aspectRatio, o = t.sizeRestrictions, n = t.positionRestrictions, a = f(f({}, i), P({ width: i.width, height: i.height, aspectRatio: s, sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minHeight: Math.min(e.height, o.minHeight), minWidth: Math.min(e.width, o.minWidth) } }));
|
|
987
987
|
return a = S(a = x(a, X(M(i), M(a))), at(H(e), n));
|
|
988
988
|
} }, fitVisibleArea: { type: Function, default: function(t) {
|
|
989
|
-
var e = t.visibleArea, i = t.boundaries, s = t.getAreaRestrictions, o = t.coordinates, n =
|
|
989
|
+
var e = t.visibleArea, i = t.boundaries, s = t.getAreaRestrictions, o = t.coordinates, n = f({}, e);
|
|
990
990
|
n.height = n.width / b(i), n.top += (e.height - n.height) / 2, (o.height - n.height > 0 || o.width - n.width > 0) && (n = W(n, Math.max(o.height / n.height, o.width / n.width)));
|
|
991
991
|
var a = ot(N(o, H(n = W(n, rt(n, s({ visibleArea: n, type: "resize" }))))));
|
|
992
992
|
return n.width < o.width && (a.left = 0), n.height < o.height && (a.top = 0), n = S(n = x(n, a), s({ visibleArea: n, type: "move" }));
|
|
@@ -1024,7 +1024,7 @@ var Ue = ["transitions"], j = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1024
1024
|
if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
|
|
1025
1025
|
var t = this.sizeRestrictionsAlgorithm({ imageSize: this.imageSize, minWidth: A(this.minWidth) ? 0 : K(this.minWidth), minHeight: A(this.minHeight) ? 0 : K(this.minHeight), maxWidth: A(this.maxWidth) ? 1 / 0 : K(this.maxWidth), maxHeight: A(this.maxHeight) ? 1 / 0 : K(this.maxHeight) });
|
|
1026
1026
|
if (t = function(s) {
|
|
1027
|
-
var o = s.areaRestrictions, n = s.sizeRestrictions, a = s.boundaries, h = s.positionRestrictions, r =
|
|
1027
|
+
var o = s.areaRestrictions, n = s.sizeRestrictions, a = s.boundaries, h = s.positionRestrictions, r = f(f({}, n), { minWidth: n.minWidth !== void 0 ? n.minWidth : 0, minHeight: n.minHeight !== void 0 ? n.minHeight : 0, maxWidth: n.maxWidth !== void 0 ? n.maxWidth : 1 / 0, maxHeight: n.maxHeight !== void 0 ? n.maxHeight : 1 / 0 });
|
|
1028
1028
|
h.left !== void 0 && h.right !== void 0 && (r.maxWidth = Math.min(r.maxWidth, h.right - h.left)), h.bottom !== void 0 && h.top !== void 0 && (r.maxHeight = Math.min(r.maxHeight, h.bottom - h.top));
|
|
1029
1029
|
var c = wt(o), l = Zt(a, c);
|
|
1030
1030
|
return c.width < 1 / 0 && (!r.maxWidth || r.maxWidth > l.width) && (r.maxWidth = Math.min(r.maxWidth, l.width)), c.height < 1 / 0 && (!r.maxHeight || r.maxHeight > l.height) && (r.maxHeight = Math.min(r.maxHeight, l.height)), r.minWidth > r.maxWidth && (r.minWidth = r.maxWidth, r.widthFrozen = !0), r.minHeight > r.maxHeight && (r.minHeight = r.maxHeight, r.heightFrozen = !0), r;
|
|
@@ -1038,7 +1038,7 @@ var Ue = ["transitions"], j = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1038
1038
|
}, positionRestrictions: function() {
|
|
1039
1039
|
return this.positionRestrictionsAlgorithm({ imageSize: this.imageSize, imageRestriction: this.imageRestriction });
|
|
1040
1040
|
}, classes: function() {
|
|
1041
|
-
return { cropper:
|
|
1041
|
+
return { cropper: L(), image: z(L("image"), this.imageClass), stencil: L("stencil"), boundaries: z(L("boundaries"), this.boundariesClass), stretcher: z(L("stretcher")), background: z(L("background"), this.backgroundClass), foreground: z(L("foreground"), this.foregroundClass), imageWrapper: z(L("image-wrapper")), cropperWrapper: z(L("cropper-wrapper")) };
|
|
1042
1042
|
}, stencilCoordinates: function() {
|
|
1043
1043
|
if (this.initialized) {
|
|
1044
1044
|
var t = this.coordinates, e = t.width, i = t.height, s = t.left, o = t.top;
|
|
@@ -1131,15 +1131,15 @@ var Ue = ["transitions"], j = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1131
1131
|
}, normalizeEvent: function(t) {
|
|
1132
1132
|
return function(e) {
|
|
1133
1133
|
var i = e.event, s = e.visibleArea, o = e.coefficient;
|
|
1134
|
-
if (i.type === "manipulateImage") return
|
|
1134
|
+
if (i.type === "manipulateImage") return f(f({}, i), { move: { left: i.move && i.move.left ? o * i.move.left : 0, top: i.move && i.move.top ? o * i.move.top : 0 }, scale: { factor: i.scale && i.scale.factor ? i.scale.factor : 1, center: i.scale && i.scale.center ? { left: i.scale.center.left * o + s.left, top: i.scale.center.top * o + s.top } : null } });
|
|
1135
1135
|
if (i.type === "resize") {
|
|
1136
|
-
var n =
|
|
1136
|
+
var n = f(f({}, i), { directions: f({}, i.directions) });
|
|
1137
1137
|
return I.forEach(function(h) {
|
|
1138
1138
|
n.directions[h] *= o;
|
|
1139
1139
|
}), n;
|
|
1140
1140
|
}
|
|
1141
1141
|
if (i.type === "move") {
|
|
1142
|
-
var a =
|
|
1142
|
+
var a = f(f({}, i), { directions: f({}, i.directions) });
|
|
1143
1143
|
return ve.forEach(function(h) {
|
|
1144
1144
|
a.directions[h] *= o;
|
|
1145
1145
|
}), a;
|
|
@@ -1149,10 +1149,10 @@ var Ue = ["transitions"], j = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1149
1149
|
}, getCanvas: function() {
|
|
1150
1150
|
if (this.$refs.canvas) {
|
|
1151
1151
|
var t = this.$refs.canvas, e = this.$refs.image, i = this.imageTransforms.rotate !== 0 || this.imageTransforms.flip.horizontal || this.imageTransforms.flip.vertical ? function(h, r, c) {
|
|
1152
|
-
var l = c.rotate, u = c.flip, d = { width: r.naturalWidth, height: r.naturalHeight },
|
|
1153
|
-
h.height =
|
|
1154
|
-
var g = U(M(
|
|
1155
|
-
return p.translate(-(g.left -
|
|
1152
|
+
var l = c.rotate, u = c.flip, d = { width: r.naturalWidth, height: r.naturalHeight }, m = Gt(d, l), p = h.getContext("2d");
|
|
1153
|
+
h.height = m.height, h.width = m.width, p.save();
|
|
1154
|
+
var g = U(M(f({ left: 0, top: 0 }, d)), l);
|
|
1155
|
+
return p.translate(-(g.left - m.width / 2), -(g.top - m.height / 2)), p.rotate(l * Math.PI / 180), p.translate(u.horizontal ? d.width : 0, u.vertical ? d.height : 0), p.scale(u.horizontal ? -1 : 1, u.vertical ? -1 : 1), p.drawImage(r, 0, 0, d.width, d.height), p.restore(), h;
|
|
1156
1156
|
}(this.$refs.sourceCanvas, e, this.imageTransforms) : e, s = v({ minWidth: 0, minHeight: 0, maxWidth: 1 / 0, maxHeight: 1 / 0, maxArea: this.maxCanvasSize, imageSmoothingEnabled: !0, imageSmoothingQuality: "high", fillColor: "transparent" }, this.canvas), o = function(h) {
|
|
1157
1157
|
return h.find(function(r) {
|
|
1158
1158
|
return c = r, !Number.isNaN(parseFloat(c)) && isFinite(c);
|
|
@@ -1167,8 +1167,8 @@ var Ue = ["transitions"], j = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1167
1167
|
h.width = l ? l.width : c.width, h.height = l ? l.height : c.height;
|
|
1168
1168
|
var d = h.getContext("2d");
|
|
1169
1169
|
d.clearRect(0, 0, h.width, h.height), u && (u.imageSmoothingEnabled && (d.imageSmoothingEnabled = u.imageSmoothingEnabled), u.imageSmoothingQuality && (d.imageSmoothingQuality = u.imageSmoothingQuality), u.fillColor && (d.fillStyle = u.fillColor, d.fillRect(0, 0, h.width, h.height), d.save()));
|
|
1170
|
-
var
|
|
1171
|
-
d.drawImage(r, c.left +
|
|
1170
|
+
var m = c.left < 0 ? -c.left : 0, p = c.top < 0 ? -c.top : 0;
|
|
1171
|
+
d.drawImage(r, c.left + m, c.top + p, c.width, c.height, m * (h.width / c.width), p * (h.height / c.height), h.width, h.height);
|
|
1172
1172
|
}(t, i, this.coordinates, n, s), t;
|
|
1173
1173
|
}
|
|
1174
1174
|
}, update: function() {
|
|
@@ -1217,7 +1217,7 @@ var Ue = ["transitions"], j = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1217
1217
|
return this.appliedImageTransforms = v(v({}, this.defaultImageTransforms), {}, { flip: v({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {
|
|
1218
1218
|
t.priority !== "visible-area" && (t.visibleArea = null, t.resetCoordinates());
|
|
1219
1219
|
var e, i, s, o, n, a, h = t.defaultVisibleArea || Ee;
|
|
1220
|
-
t.visibleArea = F(h) ? h({ imageSize: t.imageSize, boundaries: t.boundaries, coordinates: t.priority !== "visible-area" ? t.coordinates : null, getAreaRestrictions: t.getAreaRestrictions, stencilSize: t.getStencilSize() }) : t.defaultVisibleArea, t.visibleArea = (e = { visibleArea: t.visibleArea, boundaries: t.boundaries, getAreaRestrictions: t.getAreaRestrictions }, i = e.visibleArea, s = e.boundaries, o = e.getAreaRestrictions, n =
|
|
1220
|
+
t.visibleArea = F(h) ? h({ imageSize: t.imageSize, boundaries: t.boundaries, coordinates: t.priority !== "visible-area" ? t.coordinates : null, getAreaRestrictions: t.getAreaRestrictions, stencilSize: t.getStencilSize() }) : t.defaultVisibleArea, t.visibleArea = (e = { visibleArea: t.visibleArea, boundaries: t.boundaries, getAreaRestrictions: t.getAreaRestrictions }, i = e.visibleArea, s = e.boundaries, o = e.getAreaRestrictions, n = f({}, i), a = b(s), n.width / n.height !== a && (n.height = n.width / a), S(n, o({ visibleArea: n, type: "move" }))), t.priority === "visible-area" ? t.resetCoordinates() : t.coordinates = t.fitCoordinates({ visibleArea: t.visibleArea, coordinates: t.coordinates, aspectRatio: t.getAspectRatio(), positionRestrictions: t.positionRestrictions, sizeRestrictions: t.sizeRestrictions }), t.runAutoZoom("resetVisibleArea");
|
|
1221
1221
|
}).catch(function() {
|
|
1222
1222
|
t.visibleArea = null;
|
|
1223
1223
|
});
|
|
@@ -1372,7 +1372,7 @@ var Ue = ["transitions"], j = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1372
1372
|
oe.render = function(t, e, i, s, o, n) {
|
|
1373
1373
|
return w(), y("div", { ref: "cropper", class: n.classes.cropper }, [R("div", { ref: "stretcher", class: n.classes.stretcher }, null, 2), R("div", { class: n.classes.boundaries, style: n.boundariesStyle }, [(w(), y(nt(i.backgroundWrapperComponent), { class: n.classes.cropperWrapper, "wheel-resize": n.settings.resizeImage.wheel, "touch-resize": n.settings.resizeImage.touch, "touch-move": n.settings.moveImage.touch, "mouse-move": n.settings.moveImage.mouse, onMove: n.onManipulateImage, onResize: n.onManipulateImage }, { default: $(function() {
|
|
1374
1374
|
return [R("div", { class: n.classes.background, style: n.boundariesStyle }, null, 6), R("div", { class: n.classes.imageWrapper }, [R("img", { ref: "image", crossorigin: o.imageAttributes.crossOrigin, src: o.imageAttributes.src, class: n.classes.image, style: n.imageStyle, onMousedown: e[1] || (e[1] = Rt(function() {
|
|
1375
|
-
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), R("div", { class: n.classes.foreground, style: n.boundariesStyle }, null, 6), Bt((w(), y(nt(i.stencilComponent), st({ ref: "stencil", image: n.image, coordinates: o.coordinates, "stencil-coordinates": n.stencilCoordinates, transitions: n.transitionsOptions }, i.stencilProps, { onResize: n.onResize, onResizeEnd: n.onResizeEnd, onMove: n.onMove, onMoveEnd: n.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[Ut, o.imageLoaded]]), i.canvas ? (w(), y("canvas", ke, null, 512)) :
|
|
1375
|
+
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), R("div", { class: n.classes.foreground, style: n.boundariesStyle }, null, 6), Bt((w(), y(nt(i.stencilComponent), st({ ref: "stencil", image: n.image, coordinates: o.coordinates, "stencil-coordinates": n.stencilCoordinates, transitions: n.transitionsOptions }, i.stencilProps, { onResize: n.onResize, onResizeEnd: n.onResizeEnd, onMove: n.onMove, onMoveEnd: n.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[Ut, o.imageLoaded]]), i.canvas ? (w(), y("canvas", ke, null, 512)) : ft("", !0), i.canvas ? (w(), y("canvas", Fe, null, 512)) : ft("", !0)];
|
|
1376
1376
|
}), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
|
|
1377
1377
|
};
|
|
1378
1378
|
const Xe = {
|
|
@@ -1567,7 +1567,7 @@ function Ze(t, e, i, s, o, n) {
|
|
|
1567
1567
|
})
|
|
1568
1568
|
}), {
|
|
1569
1569
|
default: $(() => [
|
|
1570
|
-
t.$slots.image ? B(t.$slots, "image", { key: 0 }, void 0, !0) :
|
|
1570
|
+
t.$slots.image ? B(t.$slots, "image", { key: 0 }, void 0, !0) : ft("", !0)
|
|
1571
1571
|
]),
|
|
1572
1572
|
_: 3
|
|
1573
1573
|
}, 16, ["model-value"]),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as g } from "./mapFormMixin-
|
|
2
|
-
import { _ as c,
|
|
3
|
-
import { f as k } from "./focusDrawerMixin-
|
|
1
|
+
import { m as g } from "./mapFormMixin-Bx5_nE7g.js";
|
|
2
|
+
import { _ as c, S as y, l, b as r, d as t, o as n, j as a, e as d, f as m, t as V, R as w, x as z, F as C, c as E, w as S } from "./main-BayUZ9OO.js";
|
|
3
|
+
import { f as k } from "./focusDrawerMixin-CCAEZjWO.js";
|
|
4
4
|
const h = {
|
|
5
5
|
name: "Embed",
|
|
6
6
|
i18nOptions: {
|
|
@@ -15,8 +15,8 @@ const h = {
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
components: {
|
|
18
|
-
EmbedSettings: l(() => import("./EmbedSettings-
|
|
19
|
-
EmbedInput: l(() => import("./EmbedInput-
|
|
18
|
+
EmbedSettings: l(() => import("./EmbedSettings-D-9rcSn0.js")),
|
|
19
|
+
EmbedInput: l(() => import("./EmbedInput-B29usQZZ.js")),
|
|
20
20
|
Spinner: y
|
|
21
21
|
},
|
|
22
22
|
mixins: [g(["embed", "size"]), k],
|
|
@@ -42,7 +42,7 @@ const h = {
|
|
|
42
42
|
key: 2,
|
|
43
43
|
class: "embed-loading-container"
|
|
44
44
|
};
|
|
45
|
-
function
|
|
45
|
+
function P(e, s, $, A, i, p) {
|
|
46
46
|
const u = r("EmbedInput"), b = r("Spinner"), f = r("EmbedSettings"), v = r("portal");
|
|
47
47
|
return n(), t("div", {
|
|
48
48
|
class: "embed-root font-inter",
|
|
@@ -50,7 +50,7 @@ function L(e, s, P, $, i, p) {
|
|
|
50
50
|
onMouseleavePassive: s[5] || (s[5] = (o) => i.showControls = !1)
|
|
51
51
|
}, [
|
|
52
52
|
a("div", {
|
|
53
|
-
class:
|
|
53
|
+
class: z([[
|
|
54
54
|
(e.size || !(e.embed && e.embed.src)) && "auto-size",
|
|
55
55
|
`embed-is-${e.size}`
|
|
56
56
|
], "no-drag"])
|
|
@@ -58,7 +58,7 @@ function L(e, s, P, $, i, p) {
|
|
|
58
58
|
e.embed ? (n(), t("div", D, [
|
|
59
59
|
!e.embed.src && e.canEdit ? (n(), t("div", F, [
|
|
60
60
|
a("div", M, [
|
|
61
|
-
a("div", B,
|
|
61
|
+
a("div", B, V(e.$t("subTitle")), 1),
|
|
62
62
|
m(u, {
|
|
63
63
|
ref: "input",
|
|
64
64
|
modelValue: e.embed,
|
|
@@ -67,7 +67,7 @@ function L(e, s, P, $, i, p) {
|
|
|
67
67
|
onVnodeMounted: p.onAdd
|
|
68
68
|
}, null, 8, ["modelValue", "onVnodeMounted"])
|
|
69
69
|
])
|
|
70
|
-
])) : e.embed.src ? (n(), t("iframe",
|
|
70
|
+
])) : e.embed.src ? (n(), t("iframe", w({ key: 1 }, { allowfullscreen: "", ...e.embed }, {
|
|
71
71
|
ref: "iframe",
|
|
72
72
|
class: "embed-element",
|
|
73
73
|
onLoad: s[1] || (s[1] = (o) => i.isLoading = !1)
|
|
@@ -95,7 +95,7 @@ function L(e, s, P, $, i, p) {
|
|
|
95
95
|
], 64)) : d("", !0)
|
|
96
96
|
], 32);
|
|
97
97
|
}
|
|
98
|
-
const U = /* @__PURE__ */ c(h, [["render",
|
|
98
|
+
const U = /* @__PURE__ */ c(h, [["render", P], ["__scopeId", "data-v-a4fbfbb8"]]);
|
|
99
99
|
export {
|
|
100
100
|
U as default
|
|
101
101
|
};
|