@cling-se/widget 0.17.2 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/AddClientCallout-Bod9Eqx4.js +101 -0
- package/dist/AnswerModal-a2cyKFbt.js +3371 -0
- package/dist/AttachmentItem-DBUqckCS.js +171 -0
- package/dist/BaseUpload-DrWzuvbS.js +6503 -0
- package/dist/BlockMedia-DuE_K9hR.js +103 -0
- package/dist/CCallout-CM1VsH30.js +104 -0
- package/dist/{CCurrencyDropdown-CKRgncWy.js → CCurrencyDropdown-C_lAaq4P.js} +91 -53
- package/dist/CDropdownItem-DMUAJ90n.js +749 -0
- package/dist/CFormField.vue_vue_type_script_setup_true_lang-BqAyWe3T.js +292 -0
- package/dist/{CPhoneFormat-Bd-HZuYo.js → CPhoneFormat-Dnn_cKk7.js} +13 -21
- package/dist/CPhoneInput-DuGkDiv-.js +207 -0
- package/dist/CPriceInput-B7DYzKcF.js +142 -0
- package/dist/CSelect-BZZDr27O.js +98 -0
- package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-D2jDhnYI.js +51 -0
- package/dist/ClientAutocomplete-DuaJ5zDf.js +532 -0
- package/dist/ClientModal-CaMSjLkD.js +1188 -0
- package/dist/ColorPicker-BISZPQ6j.js +1408 -0
- package/dist/CompanyModal-ClTcmU4Y.js +250 -0
- package/dist/ContentWrapper-Bj7jbWU0.js +265 -0
- package/dist/CoverBlockSettings-AXyiLxrF.js +861 -0
- package/dist/DocAnswer-Bu09V33D.js +33 -0
- package/dist/DocDetails-B6-2LKsO.js +452 -0
- package/dist/DocForm-CFN8LWSd.js +6772 -0
- package/dist/DocFormSend-D1CUhy4n.js +171 -0
- package/dist/DocLinks-CuliFqtN.js +36 -0
- package/dist/DocModalBase-BxKsnwN-.js +29 -0
- package/dist/DocPrint-B_HJ_RET.js +399 -0
- package/dist/DocReceipt-D-A1TaTI.js +341 -0
- package/dist/DocSendReminder-BKTJonzh.js +181 -0
- package/dist/{DocTextEditor-DFid7uKr.js → DocTextEditor-CEPcJT2o.js} +7907 -5579
- package/dist/DocTimeline-CF9S4YDZ.js +537 -0
- package/dist/DocumentClient-7mbq2QA4.js +90 -0
- package/dist/DocumentLayout-DkFlHgW6.js +1434 -0
- package/dist/DocumentLogotype-BTYMdpNi.js +162 -0
- package/dist/DocumentVoided-CWr5WMUv.js +33 -0
- package/dist/EmbedInput-SevVEpwc.js +156 -0
- package/dist/EmbedSettings-YMbUmp1O.js +103 -0
- package/dist/ErrorCallout-CQo2iF9c.js +34 -0
- package/dist/FilePreviewModal-C0xBeoAz.js +202 -0
- package/dist/Flag-BObij6SN.js +41 -0
- package/dist/HeaderSettings-C77pR78n.js +720 -0
- package/dist/ImageSelectModal-DKdU-0uq.js +119 -0
- package/dist/ImageUploadWrapper-BGkS5Cll.js +1585 -0
- package/dist/Index-B3y-jq9s.js +1098 -0
- package/dist/Index-B41pUREi.js +47 -0
- package/dist/Index-BEyeS1OG.js +52 -0
- package/dist/Index-BG5j8ZFP.js +93 -0
- package/dist/Index-BOT65yQR.js +68 -0
- package/dist/Index-BQNl-cXP.js +28 -0
- package/dist/Index-BY6xsS7C.js +38 -0
- package/dist/Index-Bh0Xv5ry.js +163 -0
- package/dist/Index-Bn4FSQcx.js +228 -0
- package/dist/Index-BrRIAede.js +87 -0
- package/dist/Index-C-6um0kX.js +76 -0
- package/dist/{Index-EO0rsTmx.js → Index-C-gHa5xk.js} +319 -214
- package/dist/Index-C0wcjKCH.js +629 -0
- package/dist/Index-C6BbUFYw.js +160 -0
- package/dist/Index-C8xwJ0m1.js +200 -0
- package/dist/Index-CKgFEJF4.js +140 -0
- package/dist/{Index-CbYLDVU5.js → Index-CQwmu4f1.js} +47 -60
- package/dist/Index-CXchTpBa.js +74 -0
- package/dist/{Index-BzcZCdHj.js → Index-CYoRt8PA.js} +9 -17
- package/dist/Index-CZZNQ4q5.js +39 -0
- package/dist/Index-CkaAs5ms.js +136 -0
- package/dist/Index-CtpXaBz8.js +363 -0
- package/dist/Index-CxDsSGtZ.js +126 -0
- package/dist/Index-DFkTBm02.js +102 -0
- package/dist/Index-DP3ll8F-.js +70 -0
- package/dist/{Index-BdJbs8bM.js → Index-DPDzMKQa.js} +10 -18
- package/dist/Index-DvxSig3z.js +25 -0
- package/dist/Index-Dzrn3Y6p.js +16 -0
- package/dist/{Index-BWnh94_i.js → Index-LQb0omFE.js} +10 -18
- package/dist/Index-Mt4mSaNT.js +4 -0
- package/dist/Index-_xN_cczo.js +3477 -0
- package/dist/Index-gAz45qgR.js +21 -0
- package/dist/Index-xXLFalgR.js +49 -0
- package/dist/Index-zyZRPz3H.js +28 -0
- package/dist/Index.vue_vue_type_script_lang-Ddo1wo-D.js +671 -0
- package/dist/InputToggleRow-CokEYwm2.js +99 -0
- package/dist/ManualPopover-Dukly7GP.js +65 -0
- package/dist/MediaWrapper-B8msCrQm.js +18 -0
- package/dist/{NotBindingText-D8Blua5a.js → NotBindingText-DcQd8Eej.js} +13 -17
- package/dist/PackageGroup-clUIUoik.js +1060 -0
- package/dist/PdfTerms-DpzMVRfN.js +34 -0
- package/dist/PdfViewer-CSf4Rtbj.js +392 -0
- package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D6KSjjMA.js +17 -0
- package/dist/PriceHeader-Dyweu8aH.js +488 -0
- package/dist/{SearchApi-Bg9FwkW0.js → SearchApi-Y1fDQn0u.js} +37 -49
- package/dist/SendForm-B9l24WwR.js +6689 -0
- package/dist/Setup-DyzbPFM4.js +47 -0
- package/dist/{SmartList-DofjZjfy.js → SmartList-CWGKoAJh.js} +16 -24
- package/dist/Sortable.vue_vue_type_script_setup_true_lang-C2Gwp6Q-.js +1349 -0
- package/dist/{TermsSettings-B4glHd0I.js → TermsSettings-BeQH307A.js} +169 -56
- package/dist/ThemeColorRow-DFIsPy55.js +105 -0
- package/dist/ToggleBinding-DlH4y1IM.js +44 -0
- package/dist/UploadModal-BZ0mPBBB.js +134 -0
- package/dist/VideoPlayerInput-DBxcTUb7.js +134 -0
- package/dist/VideoPlayerSettings-Dg1OxjOa.js +78 -0
- package/dist/VideoSelectModal-BhbanMix.js +217 -0
- package/dist/{anime.es-BrPTThYb.js → anime.es-4wvNItHq.js} +205 -201
- package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
- package/dist/{dom-Ds4ypDrd.js → dom-CkTGWrfu.js} +3 -6
- package/dist/{focusDrawerMixin-DVCJIsb_.js → focusDrawerMixin-BVbTYOGr.js} +1 -1
- package/dist/{formDrawerState-BYsq1pB0.js → formDrawerState-CogZ-GVm.js} +2 -2
- package/dist/helpers-B4GUxtdD.js +46 -0
- package/dist/index-BZDey7B-.js +268 -0
- package/dist/index-Bd8_ZHHq.js +188 -0
- package/dist/index-BvyoYp1e.js +508 -0
- package/dist/index-CJZoubA3.js +3525 -0
- package/dist/index-D7yQWP4d.js +125 -0
- package/dist/index-D8hGHka6.js +513 -0
- package/dist/index-Dxy4tf7x.js +149 -0
- package/dist/index.es.js +2 -5
- package/dist/index.umd.js +303 -1486
- package/dist/main-Bn5XkQPb.js +57570 -0
- package/dist/mapFormMixin-C7FJLnbO.js +1528 -0
- package/dist/omit-DrWpFvRJ.js +56 -0
- package/dist/{publicSenderState-C4cIGu3m.js → publicSenderState-tdtCFPMx.js} +4 -4
- package/dist/splitpanes-BApidgjj.js +342 -0
- package/dist/template-CHdf2K2I.js +1572 -0
- package/dist/tippy.esm-Co6FYzEM.js +1994 -0
- package/dist/useTermsModal-VDnO1Lro.js +87 -0
- package/dist/{utils-CMs9ODO8.js → utils-DZkn0Q9c.js} +8 -11
- package/dist/validation-CqBkar3f.js +40 -0
- package/dist/widget.css +1 -0
- package/package.json +20 -25
- package/dist/AddClientCallout-TF4dWJwb.js +0 -48
- package/dist/AnswerModal-CLHDa2TD.js +0 -3879
- package/dist/AttachmentItem-ICP5nbhT.js +0 -85
- package/dist/BaseDatePicker-wwmiz_b5.js +0 -3187
- package/dist/BaseUpload-CDZOjohX.js +0 -1977
- package/dist/BlockMedia-D1JAYF9F.js +0 -76
- package/dist/CCallout-dAjcZXrm.js +0 -58
- package/dist/CDropdownItem-CkSNbSdj.js +0 -640
- package/dist/CFormField-Dw6UM1u6.js +0 -240
- package/dist/CPhoneInput-Dd6cJ4jg.js +0 -138
- package/dist/CPriceInput-CjV95s8E.js +0 -116
- package/dist/CSelect-izVnsQME.js +0 -91
- package/dist/CSkeleton-C0TjtLtY.js +0 -55
- package/dist/ClientAutocomplete-Cfu3abEx.js +0 -438
- package/dist/ClientModal-DjSoPQ9x.js +0 -666
- package/dist/ColorPicker-DZP6FIdn.js +0 -2879
- package/dist/CompanyModal-BYQWdbhG.js +0 -147
- package/dist/ContentWrapper-Bci9pSEp.js +0 -190
- package/dist/CoverBlockSettings-wD55bj3k.js +0 -659
- package/dist/DocAnswer-B5q-ntKP.js +0 -36
- package/dist/DocDetails-BQuaNZ4b.js +0 -263
- package/dist/DocForm-QzZ5wqsS.js +0 -5017
- package/dist/DocFormSend-CORtQPhb.js +0 -146
- package/dist/DocLinks-DZPzODUe.js +0 -38
- package/dist/DocModalBase-TTALjv6K.js +0 -28
- package/dist/DocPrint-BB-KT9ut.js +0 -240
- package/dist/DocReceipt-CGks1GLS.js +0 -217
- package/dist/DocSendReminder-BBQXJbsV.js +0 -140
- package/dist/DocTimeline-4jnYDmBI.js +0 -485
- package/dist/DocumentClient-BAAX7Dxk.js +0 -136
- package/dist/DocumentLayout-C4edCFmr.js +0 -4880
- package/dist/DocumentLogotype-i7YSQKcH.js +0 -92
- package/dist/DocumentVoided-BvZoMFB_.js +0 -25
- package/dist/EmbedInput-Bij7ER30.js +0 -117
- package/dist/EmbedSettings-D0oyq4-9.js +0 -74
- package/dist/ErrorCallout-CsW3WTZp.js +0 -27
- package/dist/FilePreviewModal-Doaawg0l.js +0 -81
- package/dist/Flag-C4Mf2xUU.js +0 -46
- package/dist/HeaderSettings-DwZ54IsK.js +0 -440
- package/dist/ImageSelectModal-ClFJ5uXM.js +0 -86
- package/dist/ImageUploadWrapper-DtEp_Pg3.js +0 -1604
- package/dist/Index-2MwnGZ_4.js +0 -25
- package/dist/Index-3CwdeytO.js +0 -107
- package/dist/Index-B-bSVOoh.js +0 -73
- package/dist/Index-BDyMp1ib.js +0 -643
- package/dist/Index-BMgtwHVA.js +0 -24
- package/dist/Index-BTD3hWbY.js +0 -54
- package/dist/Index-BUbd06rz.js +0 -144
- package/dist/Index-Bv2XrpgK.js +0 -25
- package/dist/Index-C00Ay-7P.js +0 -62
- package/dist/Index-CHL_6WQH.js +0 -66
- package/dist/Index-CLyNrkJA.js +0 -28
- package/dist/Index-CV57PvUE.js +0 -26
- package/dist/Index-Crj4apcP.js +0 -146
- package/dist/Index-CryBgLTa.js +0 -294
- package/dist/Index-Cv33nreP.js +0 -33
- package/dist/Index-D0ErQJ2M.js +0 -2445
- package/dist/Index-D8ZnVbsP.js +0 -32
- package/dist/Index-DPNIJewY.js +0 -56
- package/dist/Index-DVXhB0Ja.js +0 -58
- package/dist/Index-DWhQwxeB.js +0 -94
- package/dist/Index-DX7tomhl.js +0 -230
- package/dist/Index-D_AdmLWe.js +0 -41
- package/dist/Index-DgTQzlfK.js +0 -754
- package/dist/Index-DhapmO-4.js +0 -55
- package/dist/Index-DjC8joRt.js +0 -150
- package/dist/Index-Dv4l4LKF.js +0 -154
- package/dist/Index-TTFKPIIC.js +0 -84
- package/dist/Index-cT8oYfLR.js +0 -41
- package/dist/Index-igPwrQMu.js +0 -77
- package/dist/InputToggleRow-BgOubdXs.js +0 -57
- package/dist/ManualPopover-8suun-i9.js +0 -60
- package/dist/MediaWrapper-BadblLbS.js +0 -23
- package/dist/PackageGroup-BxmqH6qI.js +0 -704
- package/dist/PdfTerms-C6MRk0Ix.js +0 -31
- package/dist/PdfViewer-DUoiQx_1.js +0 -383
- package/dist/PlainHtml-DZ9V0Yuf.js +0 -27
- package/dist/PriceHeader-C3_CoKrL.js +0 -338
- package/dist/SendForm-D-OvqCee.js +0 -1023
- package/dist/Setup-CwK4er2y.js +0 -50
- package/dist/ThemeColorRow-BplIaxA2.js +0 -69
- package/dist/ToggleBinding-6ntt38Ye.js +0 -42
- package/dist/UploadModal-B6jQzsYA.js +0 -95
- package/dist/VideoPlayerInput-ryP77WC0.js +0 -97
- package/dist/VideoPlayerSettings-DJh0JNRI.js +0 -61
- package/dist/VideoSelectModal-8udQ394X.js +0 -104
- package/dist/answerDocumentMixin-CF4J_vsp.js +0 -51
- package/dist/debounce-CgyZi04Q.js +0 -84
- package/dist/formValidationMixin-Dq7aZhBk.js +0 -49
- package/dist/index-2Q8Ejpof.js +0 -167
- package/dist/index-B5-izJkt.js +0 -102
- package/dist/index-BQb6k0M8.js +0 -351
- package/dist/index-CR-KQfRE.js +0 -81
- package/dist/index-CogHiXWx.js +0 -2700
- package/dist/index-lZ1sSNWc.js +0 -492
- package/dist/main-BpqUyMpC.js +0 -57349
- package/dist/mapFormMixin-rxtAFyFK.js +0 -3028
- package/dist/omit-C7FeydiO.js +0 -31
- package/dist/simplebar.min-Dm388s-3.js +0 -71
- package/dist/splitpanes-BHUVsCZF.js +0 -382
- package/dist/style.css +0 -4
- package/dist/throttle-CfcsX8nA.js +0 -18
- package/dist/tippy.esm-C9mV-Rzr.js +0 -1805
- package/dist/vuedraggable.umd-CChGnToh.js +0 -3161
- package/dist/vuex.esm-DKGl8mcw.js +0 -467
|
@@ -0,0 +1,1408 @@
|
|
|
1
|
+
import { o as f, b as m, l as k, e as S, s as h, d as v, E as R, bW as ee, v as G, n as J, c as U, f as p, G as T, _ as te } from "./main-Bn5XkQPb.js";
|
|
2
|
+
const re = "";
|
|
3
|
+
function H(e, t) {
|
|
4
|
+
t === void 0 && (t = {});
|
|
5
|
+
var r = t.insertAt;
|
|
6
|
+
if (!(!e || typeof document > "u")) {
|
|
7
|
+
var n = document.head || document.getElementsByTagName("head")[0], a = document.createElement("style");
|
|
8
|
+
a.type = "text/css", r === "top" && n.firstChild ? n.insertBefore(a, n.firstChild) : n.appendChild(a), a.styleSheet ? a.styleSheet.cssText = e : a.appendChild(document.createTextNode(e));
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const A = function(e, t) {
|
|
12
|
+
const { componentPrefix: r = re } = t || {};
|
|
13
|
+
e.component(`${r}${this.name}`, this);
|
|
14
|
+
}, V = {};
|
|
15
|
+
var E = {
|
|
16
|
+
name: "Checkboard",
|
|
17
|
+
props: {
|
|
18
|
+
size: {
|
|
19
|
+
type: [Number, String],
|
|
20
|
+
default: 8
|
|
21
|
+
},
|
|
22
|
+
white: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "#fff"
|
|
25
|
+
},
|
|
26
|
+
grey: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "#e6e6e6"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
computed: {
|
|
32
|
+
bgStyle() {
|
|
33
|
+
return {
|
|
34
|
+
"background-image": `url(${ie(this.white, this.grey, this.size)})`
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
function ne(e, t, r) {
|
|
40
|
+
if (typeof document > "u")
|
|
41
|
+
return null;
|
|
42
|
+
const n = document.createElement("canvas");
|
|
43
|
+
n.width = n.height = r * 2;
|
|
44
|
+
const a = n.getContext("2d");
|
|
45
|
+
return a ? (a.fillStyle = e, a.fillRect(0, 0, n.width, n.height), a.fillStyle = t, a.fillRect(0, 0, r, r), a.translate(r, r), a.fillRect(0, 0, r, r), n.toDataURL()) : null;
|
|
46
|
+
}
|
|
47
|
+
function ie(e, t, r) {
|
|
48
|
+
const n = `${e},${t},${r}`;
|
|
49
|
+
if (V[n])
|
|
50
|
+
return V[n];
|
|
51
|
+
const a = ne(e, t, r);
|
|
52
|
+
return V[n] = a, a;
|
|
53
|
+
}
|
|
54
|
+
function ae(e, t, r, n, a, i) {
|
|
55
|
+
return f(), m(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
class: "vc-checkerboard",
|
|
59
|
+
style: k(i.bgStyle)
|
|
60
|
+
},
|
|
61
|
+
null,
|
|
62
|
+
4
|
|
63
|
+
/* STYLE */
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
var se = ".vc-checkerboard{background-size:contain;bottom:0;left:0;position:absolute;right:0;top:0}";
|
|
67
|
+
H(se);
|
|
68
|
+
E.render = ae;
|
|
69
|
+
E.__file = "src/components/checkboard/checkboard.vue";
|
|
70
|
+
E.install = A;
|
|
71
|
+
var D = {
|
|
72
|
+
name: "Alpha",
|
|
73
|
+
components: {
|
|
74
|
+
Checkboard: E
|
|
75
|
+
},
|
|
76
|
+
props: {
|
|
77
|
+
value: Object,
|
|
78
|
+
onChange: Function
|
|
79
|
+
},
|
|
80
|
+
computed: {
|
|
81
|
+
colors() {
|
|
82
|
+
return this.value;
|
|
83
|
+
},
|
|
84
|
+
gradientColor() {
|
|
85
|
+
const { rgba: e } = this.colors, t = [e.r, e.g, e.b].join(",");
|
|
86
|
+
return `linear-gradient(to right, rgba(${t}, 0) 0%, rgba(${t}, 1) 100%)`;
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
methods: {
|
|
90
|
+
handleChange(e, t) {
|
|
91
|
+
!t && e.preventDefault();
|
|
92
|
+
const { container: r } = this.$refs;
|
|
93
|
+
if (!r)
|
|
94
|
+
return;
|
|
95
|
+
const n = r.clientWidth, a = r.getBoundingClientRect().left + window.pageXOffset, s = (e.pageX || (e.touches ? e.touches[0].pageX : 0)) - a;
|
|
96
|
+
let o;
|
|
97
|
+
s < 0 ? o = 0 : s > n ? o = 1 : o = Math.round(s * 100 / n) / 100, this.colors.a !== o && this.$emit("change", {
|
|
98
|
+
h: this.colors.hsl.h,
|
|
99
|
+
s: this.colors.hsl.s,
|
|
100
|
+
l: this.colors.hsl.l,
|
|
101
|
+
a: o,
|
|
102
|
+
source: "rgba"
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
handleMouseDown(e) {
|
|
106
|
+
this.handleChange(e, !0), window.addEventListener("mousemove", this.handleChange), window.addEventListener("mouseup", this.handleMouseUp);
|
|
107
|
+
},
|
|
108
|
+
handleMouseUp() {
|
|
109
|
+
this.unbindEventListeners();
|
|
110
|
+
},
|
|
111
|
+
unbindEventListeners() {
|
|
112
|
+
window.removeEventListener("mousemove", this.handleChange), window.removeEventListener("mouseup", this.handleMouseUp);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
const oe = { class: "vc-alpha" }, he = { class: "vc-alpha-checkboard-wrap" }, le = /* @__PURE__ */ h(
|
|
117
|
+
"div",
|
|
118
|
+
{ class: "vc-alpha-picker" },
|
|
119
|
+
null,
|
|
120
|
+
-1
|
|
121
|
+
/* HOISTED */
|
|
122
|
+
), ce = [
|
|
123
|
+
le
|
|
124
|
+
];
|
|
125
|
+
function ue(e, t, r, n, a, i) {
|
|
126
|
+
const s = S("Checkboard");
|
|
127
|
+
return f(), m("div", oe, [
|
|
128
|
+
h("div", he, [
|
|
129
|
+
v(s)
|
|
130
|
+
]),
|
|
131
|
+
h(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
class: "vc-alpha-gradient",
|
|
135
|
+
style: k({ background: i.gradientColor })
|
|
136
|
+
},
|
|
137
|
+
null,
|
|
138
|
+
4
|
|
139
|
+
/* STYLE */
|
|
140
|
+
),
|
|
141
|
+
h(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
ref: "container",
|
|
145
|
+
class: "vc-alpha-container",
|
|
146
|
+
onMousedown: t[0] || (t[0] = (...o) => i.handleMouseDown && i.handleMouseDown(...o)),
|
|
147
|
+
onTouchmove: t[1] || (t[1] = (...o) => i.handleChange && i.handleChange(...o)),
|
|
148
|
+
onTouchstart: t[2] || (t[2] = (...o) => i.handleChange && i.handleChange(...o))
|
|
149
|
+
},
|
|
150
|
+
[
|
|
151
|
+
h(
|
|
152
|
+
"div",
|
|
153
|
+
{
|
|
154
|
+
class: "vc-alpha-pointer",
|
|
155
|
+
style: k({ left: `${i.colors.a * 100}%` })
|
|
156
|
+
},
|
|
157
|
+
ce,
|
|
158
|
+
4
|
|
159
|
+
/* STYLE */
|
|
160
|
+
)
|
|
161
|
+
],
|
|
162
|
+
544
|
|
163
|
+
/* HYDRATE_EVENTS, NEED_PATCH */
|
|
164
|
+
)
|
|
165
|
+
]);
|
|
166
|
+
}
|
|
167
|
+
var de = ".vc-alpha,.vc-alpha-checkboard-wrap{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-checkboard-wrap{overflow:hidden}.vc-alpha-gradient{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-container{cursor:pointer;height:100%;margin:0 3px;position:relative;z-index:2}.vc-alpha-pointer{position:absolute;z-index:2}.vc-alpha-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}";
|
|
168
|
+
H(de);
|
|
169
|
+
D.render = ue;
|
|
170
|
+
D.__file = "src/components/alpha/alpha.vue";
|
|
171
|
+
D.install = A;
|
|
172
|
+
function d(e, t) {
|
|
173
|
+
fe(e) && (e = "100%");
|
|
174
|
+
var r = ge(e);
|
|
175
|
+
return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), r && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
|
|
176
|
+
}
|
|
177
|
+
function L(e) {
|
|
178
|
+
return Math.min(1, Math.max(0, e));
|
|
179
|
+
}
|
|
180
|
+
function fe(e) {
|
|
181
|
+
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
|
|
182
|
+
}
|
|
183
|
+
function ge(e) {
|
|
184
|
+
return typeof e == "string" && e.indexOf("%") !== -1;
|
|
185
|
+
}
|
|
186
|
+
function Q(e) {
|
|
187
|
+
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
188
|
+
}
|
|
189
|
+
function I(e) {
|
|
190
|
+
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
|
|
191
|
+
}
|
|
192
|
+
function _(e) {
|
|
193
|
+
return e.length === 1 ? "0" + e : String(e);
|
|
194
|
+
}
|
|
195
|
+
function pe(e, t, r) {
|
|
196
|
+
return {
|
|
197
|
+
r: d(e, 255) * 255,
|
|
198
|
+
g: d(t, 255) * 255,
|
|
199
|
+
b: d(r, 255) * 255
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function Y(e, t, r) {
|
|
203
|
+
e = d(e, 255), t = d(t, 255), r = d(r, 255);
|
|
204
|
+
var n = Math.max(e, t, r), a = Math.min(e, t, r), i = 0, s = 0, o = (n + a) / 2;
|
|
205
|
+
if (n === a)
|
|
206
|
+
s = 0, i = 0;
|
|
207
|
+
else {
|
|
208
|
+
var u = n - a;
|
|
209
|
+
switch (s = o > 0.5 ? u / (2 - n - a) : u / (n + a), n) {
|
|
210
|
+
case e:
|
|
211
|
+
i = (t - r) / u + (t < r ? 6 : 0);
|
|
212
|
+
break;
|
|
213
|
+
case t:
|
|
214
|
+
i = (r - e) / u + 2;
|
|
215
|
+
break;
|
|
216
|
+
case r:
|
|
217
|
+
i = (e - t) / u + 4;
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
i /= 6;
|
|
221
|
+
}
|
|
222
|
+
return { h: i, s, l: o };
|
|
223
|
+
}
|
|
224
|
+
function z(e, t, r) {
|
|
225
|
+
return r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (t - e) * (6 * r) : r < 1 / 2 ? t : r < 2 / 3 ? e + (t - e) * (2 / 3 - r) * 6 : e;
|
|
226
|
+
}
|
|
227
|
+
function ve(e, t, r) {
|
|
228
|
+
var n, a, i;
|
|
229
|
+
if (e = d(e, 360), t = d(t, 100), r = d(r, 100), t === 0)
|
|
230
|
+
a = r, i = r, n = r;
|
|
231
|
+
else {
|
|
232
|
+
var s = r < 0.5 ? r * (1 + t) : r + t - r * t, o = 2 * r - s;
|
|
233
|
+
n = z(o, s, e + 1 / 3), a = z(o, s, e), i = z(o, s, e - 1 / 3);
|
|
234
|
+
}
|
|
235
|
+
return { r: n * 255, g: a * 255, b: i * 255 };
|
|
236
|
+
}
|
|
237
|
+
function q(e, t, r) {
|
|
238
|
+
e = d(e, 255), t = d(t, 255), r = d(r, 255);
|
|
239
|
+
var n = Math.max(e, t, r), a = Math.min(e, t, r), i = 0, s = n, o = n - a, u = n === 0 ? 0 : o / n;
|
|
240
|
+
if (n === a)
|
|
241
|
+
i = 0;
|
|
242
|
+
else {
|
|
243
|
+
switch (n) {
|
|
244
|
+
case e:
|
|
245
|
+
i = (t - r) / o + (t < r ? 6 : 0);
|
|
246
|
+
break;
|
|
247
|
+
case t:
|
|
248
|
+
i = (r - e) / o + 2;
|
|
249
|
+
break;
|
|
250
|
+
case r:
|
|
251
|
+
i = (e - t) / o + 4;
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
i /= 6;
|
|
255
|
+
}
|
|
256
|
+
return { h: i, s: u, v: s };
|
|
257
|
+
}
|
|
258
|
+
function be(e, t, r) {
|
|
259
|
+
e = d(e, 360) * 6, t = d(t, 100), r = d(r, 100);
|
|
260
|
+
var n = Math.floor(e), a = e - n, i = r * (1 - t), s = r * (1 - a * t), o = r * (1 - (1 - a) * t), u = n % 6, x = [r, s, i, i, o, r][u], c = [o, r, r, s, i, i][u], l = [i, i, o, r, r, s][u];
|
|
261
|
+
return { r: x * 255, g: c * 255, b: l * 255 };
|
|
262
|
+
}
|
|
263
|
+
function K(e, t, r, n) {
|
|
264
|
+
var a = [
|
|
265
|
+
_(Math.round(e).toString(16)),
|
|
266
|
+
_(Math.round(t).toString(16)),
|
|
267
|
+
_(Math.round(r).toString(16))
|
|
268
|
+
];
|
|
269
|
+
return n && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join("");
|
|
270
|
+
}
|
|
271
|
+
function me(e, t, r, n, a) {
|
|
272
|
+
var i = [
|
|
273
|
+
_(Math.round(e).toString(16)),
|
|
274
|
+
_(Math.round(t).toString(16)),
|
|
275
|
+
_(Math.round(r).toString(16)),
|
|
276
|
+
_(xe(n))
|
|
277
|
+
];
|
|
278
|
+
return a && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) && i[3].startsWith(i[3].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) + i[3].charAt(0) : i.join("");
|
|
279
|
+
}
|
|
280
|
+
function xe(e) {
|
|
281
|
+
return Math.round(parseFloat(e) * 255).toString(16);
|
|
282
|
+
}
|
|
283
|
+
function Z(e) {
|
|
284
|
+
return g(e) / 255;
|
|
285
|
+
}
|
|
286
|
+
function g(e) {
|
|
287
|
+
return parseInt(e, 16);
|
|
288
|
+
}
|
|
289
|
+
function we(e) {
|
|
290
|
+
return {
|
|
291
|
+
r: e >> 16,
|
|
292
|
+
g: (e & 65280) >> 8,
|
|
293
|
+
b: e & 255
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
var P = {
|
|
297
|
+
aliceblue: "#f0f8ff",
|
|
298
|
+
antiquewhite: "#faebd7",
|
|
299
|
+
aqua: "#00ffff",
|
|
300
|
+
aquamarine: "#7fffd4",
|
|
301
|
+
azure: "#f0ffff",
|
|
302
|
+
beige: "#f5f5dc",
|
|
303
|
+
bisque: "#ffe4c4",
|
|
304
|
+
black: "#000000",
|
|
305
|
+
blanchedalmond: "#ffebcd",
|
|
306
|
+
blue: "#0000ff",
|
|
307
|
+
blueviolet: "#8a2be2",
|
|
308
|
+
brown: "#a52a2a",
|
|
309
|
+
burlywood: "#deb887",
|
|
310
|
+
cadetblue: "#5f9ea0",
|
|
311
|
+
chartreuse: "#7fff00",
|
|
312
|
+
chocolate: "#d2691e",
|
|
313
|
+
coral: "#ff7f50",
|
|
314
|
+
cornflowerblue: "#6495ed",
|
|
315
|
+
cornsilk: "#fff8dc",
|
|
316
|
+
crimson: "#dc143c",
|
|
317
|
+
cyan: "#00ffff",
|
|
318
|
+
darkblue: "#00008b",
|
|
319
|
+
darkcyan: "#008b8b",
|
|
320
|
+
darkgoldenrod: "#b8860b",
|
|
321
|
+
darkgray: "#a9a9a9",
|
|
322
|
+
darkgreen: "#006400",
|
|
323
|
+
darkgrey: "#a9a9a9",
|
|
324
|
+
darkkhaki: "#bdb76b",
|
|
325
|
+
darkmagenta: "#8b008b",
|
|
326
|
+
darkolivegreen: "#556b2f",
|
|
327
|
+
darkorange: "#ff8c00",
|
|
328
|
+
darkorchid: "#9932cc",
|
|
329
|
+
darkred: "#8b0000",
|
|
330
|
+
darksalmon: "#e9967a",
|
|
331
|
+
darkseagreen: "#8fbc8f",
|
|
332
|
+
darkslateblue: "#483d8b",
|
|
333
|
+
darkslategray: "#2f4f4f",
|
|
334
|
+
darkslategrey: "#2f4f4f",
|
|
335
|
+
darkturquoise: "#00ced1",
|
|
336
|
+
darkviolet: "#9400d3",
|
|
337
|
+
deeppink: "#ff1493",
|
|
338
|
+
deepskyblue: "#00bfff",
|
|
339
|
+
dimgray: "#696969",
|
|
340
|
+
dimgrey: "#696969",
|
|
341
|
+
dodgerblue: "#1e90ff",
|
|
342
|
+
firebrick: "#b22222",
|
|
343
|
+
floralwhite: "#fffaf0",
|
|
344
|
+
forestgreen: "#228b22",
|
|
345
|
+
fuchsia: "#ff00ff",
|
|
346
|
+
gainsboro: "#dcdcdc",
|
|
347
|
+
ghostwhite: "#f8f8ff",
|
|
348
|
+
goldenrod: "#daa520",
|
|
349
|
+
gold: "#ffd700",
|
|
350
|
+
gray: "#808080",
|
|
351
|
+
green: "#008000",
|
|
352
|
+
greenyellow: "#adff2f",
|
|
353
|
+
grey: "#808080",
|
|
354
|
+
honeydew: "#f0fff0",
|
|
355
|
+
hotpink: "#ff69b4",
|
|
356
|
+
indianred: "#cd5c5c",
|
|
357
|
+
indigo: "#4b0082",
|
|
358
|
+
ivory: "#fffff0",
|
|
359
|
+
khaki: "#f0e68c",
|
|
360
|
+
lavenderblush: "#fff0f5",
|
|
361
|
+
lavender: "#e6e6fa",
|
|
362
|
+
lawngreen: "#7cfc00",
|
|
363
|
+
lemonchiffon: "#fffacd",
|
|
364
|
+
lightblue: "#add8e6",
|
|
365
|
+
lightcoral: "#f08080",
|
|
366
|
+
lightcyan: "#e0ffff",
|
|
367
|
+
lightgoldenrodyellow: "#fafad2",
|
|
368
|
+
lightgray: "#d3d3d3",
|
|
369
|
+
lightgreen: "#90ee90",
|
|
370
|
+
lightgrey: "#d3d3d3",
|
|
371
|
+
lightpink: "#ffb6c1",
|
|
372
|
+
lightsalmon: "#ffa07a",
|
|
373
|
+
lightseagreen: "#20b2aa",
|
|
374
|
+
lightskyblue: "#87cefa",
|
|
375
|
+
lightslategray: "#778899",
|
|
376
|
+
lightslategrey: "#778899",
|
|
377
|
+
lightsteelblue: "#b0c4de",
|
|
378
|
+
lightyellow: "#ffffe0",
|
|
379
|
+
lime: "#00ff00",
|
|
380
|
+
limegreen: "#32cd32",
|
|
381
|
+
linen: "#faf0e6",
|
|
382
|
+
magenta: "#ff00ff",
|
|
383
|
+
maroon: "#800000",
|
|
384
|
+
mediumaquamarine: "#66cdaa",
|
|
385
|
+
mediumblue: "#0000cd",
|
|
386
|
+
mediumorchid: "#ba55d3",
|
|
387
|
+
mediumpurple: "#9370db",
|
|
388
|
+
mediumseagreen: "#3cb371",
|
|
389
|
+
mediumslateblue: "#7b68ee",
|
|
390
|
+
mediumspringgreen: "#00fa9a",
|
|
391
|
+
mediumturquoise: "#48d1cc",
|
|
392
|
+
mediumvioletred: "#c71585",
|
|
393
|
+
midnightblue: "#191970",
|
|
394
|
+
mintcream: "#f5fffa",
|
|
395
|
+
mistyrose: "#ffe4e1",
|
|
396
|
+
moccasin: "#ffe4b5",
|
|
397
|
+
navajowhite: "#ffdead",
|
|
398
|
+
navy: "#000080",
|
|
399
|
+
oldlace: "#fdf5e6",
|
|
400
|
+
olive: "#808000",
|
|
401
|
+
olivedrab: "#6b8e23",
|
|
402
|
+
orange: "#ffa500",
|
|
403
|
+
orangered: "#ff4500",
|
|
404
|
+
orchid: "#da70d6",
|
|
405
|
+
palegoldenrod: "#eee8aa",
|
|
406
|
+
palegreen: "#98fb98",
|
|
407
|
+
paleturquoise: "#afeeee",
|
|
408
|
+
palevioletred: "#db7093",
|
|
409
|
+
papayawhip: "#ffefd5",
|
|
410
|
+
peachpuff: "#ffdab9",
|
|
411
|
+
peru: "#cd853f",
|
|
412
|
+
pink: "#ffc0cb",
|
|
413
|
+
plum: "#dda0dd",
|
|
414
|
+
powderblue: "#b0e0e6",
|
|
415
|
+
purple: "#800080",
|
|
416
|
+
rebeccapurple: "#663399",
|
|
417
|
+
red: "#ff0000",
|
|
418
|
+
rosybrown: "#bc8f8f",
|
|
419
|
+
royalblue: "#4169e1",
|
|
420
|
+
saddlebrown: "#8b4513",
|
|
421
|
+
salmon: "#fa8072",
|
|
422
|
+
sandybrown: "#f4a460",
|
|
423
|
+
seagreen: "#2e8b57",
|
|
424
|
+
seashell: "#fff5ee",
|
|
425
|
+
sienna: "#a0522d",
|
|
426
|
+
silver: "#c0c0c0",
|
|
427
|
+
skyblue: "#87ceeb",
|
|
428
|
+
slateblue: "#6a5acd",
|
|
429
|
+
slategray: "#708090",
|
|
430
|
+
slategrey: "#708090",
|
|
431
|
+
snow: "#fffafa",
|
|
432
|
+
springgreen: "#00ff7f",
|
|
433
|
+
steelblue: "#4682b4",
|
|
434
|
+
tan: "#d2b48c",
|
|
435
|
+
teal: "#008080",
|
|
436
|
+
thistle: "#d8bfd8",
|
|
437
|
+
tomato: "#ff6347",
|
|
438
|
+
turquoise: "#40e0d0",
|
|
439
|
+
violet: "#ee82ee",
|
|
440
|
+
wheat: "#f5deb3",
|
|
441
|
+
white: "#ffffff",
|
|
442
|
+
whitesmoke: "#f5f5f5",
|
|
443
|
+
yellow: "#ffff00",
|
|
444
|
+
yellowgreen: "#9acd32"
|
|
445
|
+
};
|
|
446
|
+
function ye(e) {
|
|
447
|
+
var t = { r: 0, g: 0, b: 0 }, r = 1, n = null, a = null, i = null, s = !1, o = !1;
|
|
448
|
+
return typeof e == "string" && (e = ke(e)), typeof e == "object" && (w(e.r) && w(e.g) && w(e.b) ? (t = pe(e.r, e.g, e.b), s = !0, o = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : w(e.h) && w(e.s) && w(e.v) ? (n = I(e.s), a = I(e.v), t = be(e.h, n, a), s = !0, o = "hsv") : w(e.h) && w(e.s) && w(e.l) && (n = I(e.s), i = I(e.l), t = ve(e.h, n, i), s = !0, o = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (r = e.a)), r = Q(r), {
|
|
449
|
+
ok: s,
|
|
450
|
+
format: e.format || o,
|
|
451
|
+
r: Math.min(255, Math.max(t.r, 0)),
|
|
452
|
+
g: Math.min(255, Math.max(t.g, 0)),
|
|
453
|
+
b: Math.min(255, Math.max(t.b, 0)),
|
|
454
|
+
a: r
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
var Ce = "[-\\+]?\\d+%?", _e = "[-\\+]?\\d*\\.\\d+%?", C = "(?:".concat(_e, ")|(?:").concat(Ce, ")"), $ = "[\\s|\\(]+(".concat(C, ")[,|\\s]+(").concat(C, ")[,|\\s]+(").concat(C, ")\\s*\\)?"), W = "[\\s|\\(]+(".concat(C, ")[,|\\s]+(").concat(C, ")[,|\\s]+(").concat(C, ")[,|\\s]+(").concat(C, ")\\s*\\)?"), b = {
|
|
458
|
+
CSS_UNIT: new RegExp(C),
|
|
459
|
+
rgb: new RegExp("rgb" + $),
|
|
460
|
+
rgba: new RegExp("rgba" + W),
|
|
461
|
+
hsl: new RegExp("hsl" + $),
|
|
462
|
+
hsla: new RegExp("hsla" + W),
|
|
463
|
+
hsv: new RegExp("hsv" + $),
|
|
464
|
+
hsva: new RegExp("hsva" + W),
|
|
465
|
+
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
466
|
+
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
467
|
+
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
468
|
+
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
469
|
+
};
|
|
470
|
+
function ke(e) {
|
|
471
|
+
if (e = e.trim().toLowerCase(), e.length === 0)
|
|
472
|
+
return !1;
|
|
473
|
+
var t = !1;
|
|
474
|
+
if (P[e])
|
|
475
|
+
e = P[e], t = !0;
|
|
476
|
+
else if (e === "transparent")
|
|
477
|
+
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
478
|
+
var r = b.rgb.exec(e);
|
|
479
|
+
return r ? { r: r[1], g: r[2], b: r[3] } : (r = b.rgba.exec(e), r ? { r: r[1], g: r[2], b: r[3], a: r[4] } : (r = b.hsl.exec(e), r ? { h: r[1], s: r[2], l: r[3] } : (r = b.hsla.exec(e), r ? { h: r[1], s: r[2], l: r[3], a: r[4] } : (r = b.hsv.exec(e), r ? { h: r[1], s: r[2], v: r[3] } : (r = b.hsva.exec(e), r ? { h: r[1], s: r[2], v: r[3], a: r[4] } : (r = b.hex8.exec(e), r ? {
|
|
480
|
+
r: g(r[1]),
|
|
481
|
+
g: g(r[2]),
|
|
482
|
+
b: g(r[3]),
|
|
483
|
+
a: Z(r[4]),
|
|
484
|
+
format: t ? "name" : "hex8"
|
|
485
|
+
} : (r = b.hex6.exec(e), r ? {
|
|
486
|
+
r: g(r[1]),
|
|
487
|
+
g: g(r[2]),
|
|
488
|
+
b: g(r[3]),
|
|
489
|
+
format: t ? "name" : "hex"
|
|
490
|
+
} : (r = b.hex4.exec(e), r ? {
|
|
491
|
+
r: g(r[1] + r[1]),
|
|
492
|
+
g: g(r[2] + r[2]),
|
|
493
|
+
b: g(r[3] + r[3]),
|
|
494
|
+
a: Z(r[4] + r[4]),
|
|
495
|
+
format: t ? "name" : "hex8"
|
|
496
|
+
} : (r = b.hex3.exec(e), r ? {
|
|
497
|
+
r: g(r[1] + r[1]),
|
|
498
|
+
g: g(r[2] + r[2]),
|
|
499
|
+
b: g(r[3] + r[3]),
|
|
500
|
+
format: t ? "name" : "hex"
|
|
501
|
+
} : !1)))))))));
|
|
502
|
+
}
|
|
503
|
+
function w(e) {
|
|
504
|
+
return !!b.CSS_UNIT.exec(String(e));
|
|
505
|
+
}
|
|
506
|
+
var Me = (
|
|
507
|
+
/** @class */
|
|
508
|
+
function() {
|
|
509
|
+
function e(t, r) {
|
|
510
|
+
t === void 0 && (t = ""), r === void 0 && (r = {});
|
|
511
|
+
var n;
|
|
512
|
+
if (t instanceof e)
|
|
513
|
+
return t;
|
|
514
|
+
typeof t == "number" && (t = we(t)), this.originalInput = t;
|
|
515
|
+
var a = ye(t);
|
|
516
|
+
this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (n = r.format) !== null && n !== void 0 ? n : a.format, this.gradientType = r.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = a.ok;
|
|
517
|
+
}
|
|
518
|
+
return e.prototype.isDark = function() {
|
|
519
|
+
return this.getBrightness() < 128;
|
|
520
|
+
}, e.prototype.isLight = function() {
|
|
521
|
+
return !this.isDark();
|
|
522
|
+
}, e.prototype.getBrightness = function() {
|
|
523
|
+
var t = this.toRgb();
|
|
524
|
+
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
|
|
525
|
+
}, e.prototype.getLuminance = function() {
|
|
526
|
+
var t = this.toRgb(), r, n, a, i = t.r / 255, s = t.g / 255, o = t.b / 255;
|
|
527
|
+
return i <= 0.03928 ? r = i / 12.92 : r = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? n = s / 12.92 : n = Math.pow((s + 0.055) / 1.055, 2.4), o <= 0.03928 ? a = o / 12.92 : a = Math.pow((o + 0.055) / 1.055, 2.4), 0.2126 * r + 0.7152 * n + 0.0722 * a;
|
|
528
|
+
}, e.prototype.getAlpha = function() {
|
|
529
|
+
return this.a;
|
|
530
|
+
}, e.prototype.setAlpha = function(t) {
|
|
531
|
+
return this.a = Q(t), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
532
|
+
}, e.prototype.isMonochrome = function() {
|
|
533
|
+
var t = this.toHsl().s;
|
|
534
|
+
return t === 0;
|
|
535
|
+
}, e.prototype.toHsv = function() {
|
|
536
|
+
var t = q(this.r, this.g, this.b);
|
|
537
|
+
return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
|
|
538
|
+
}, e.prototype.toHsvString = function() {
|
|
539
|
+
var t = q(this.r, this.g, this.b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), a = Math.round(t.v * 100);
|
|
540
|
+
return this.a === 1 ? "hsv(".concat(r, ", ").concat(n, "%, ").concat(a, "%)") : "hsva(".concat(r, ", ").concat(n, "%, ").concat(a, "%, ").concat(this.roundA, ")");
|
|
541
|
+
}, e.prototype.toHsl = function() {
|
|
542
|
+
var t = Y(this.r, this.g, this.b);
|
|
543
|
+
return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
|
|
544
|
+
}, e.prototype.toHslString = function() {
|
|
545
|
+
var t = Y(this.r, this.g, this.b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), a = Math.round(t.l * 100);
|
|
546
|
+
return this.a === 1 ? "hsl(".concat(r, ", ").concat(n, "%, ").concat(a, "%)") : "hsla(".concat(r, ", ").concat(n, "%, ").concat(a, "%, ").concat(this.roundA, ")");
|
|
547
|
+
}, e.prototype.toHex = function(t) {
|
|
548
|
+
return t === void 0 && (t = !1), K(this.r, this.g, this.b, t);
|
|
549
|
+
}, e.prototype.toHexString = function(t) {
|
|
550
|
+
return t === void 0 && (t = !1), "#" + this.toHex(t);
|
|
551
|
+
}, e.prototype.toHex8 = function(t) {
|
|
552
|
+
return t === void 0 && (t = !1), me(this.r, this.g, this.b, this.a, t);
|
|
553
|
+
}, e.prototype.toHex8String = function(t) {
|
|
554
|
+
return t === void 0 && (t = !1), "#" + this.toHex8(t);
|
|
555
|
+
}, e.prototype.toHexShortString = function(t) {
|
|
556
|
+
return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
|
|
557
|
+
}, e.prototype.toRgb = function() {
|
|
558
|
+
return {
|
|
559
|
+
r: Math.round(this.r),
|
|
560
|
+
g: Math.round(this.g),
|
|
561
|
+
b: Math.round(this.b),
|
|
562
|
+
a: this.a
|
|
563
|
+
};
|
|
564
|
+
}, e.prototype.toRgbString = function() {
|
|
565
|
+
var t = Math.round(this.r), r = Math.round(this.g), n = Math.round(this.b);
|
|
566
|
+
return this.a === 1 ? "rgb(".concat(t, ", ").concat(r, ", ").concat(n, ")") : "rgba(".concat(t, ", ").concat(r, ", ").concat(n, ", ").concat(this.roundA, ")");
|
|
567
|
+
}, e.prototype.toPercentageRgb = function() {
|
|
568
|
+
var t = function(r) {
|
|
569
|
+
return "".concat(Math.round(d(r, 255) * 100), "%");
|
|
570
|
+
};
|
|
571
|
+
return {
|
|
572
|
+
r: t(this.r),
|
|
573
|
+
g: t(this.g),
|
|
574
|
+
b: t(this.b),
|
|
575
|
+
a: this.a
|
|
576
|
+
};
|
|
577
|
+
}, e.prototype.toPercentageRgbString = function() {
|
|
578
|
+
var t = function(r) {
|
|
579
|
+
return Math.round(d(r, 255) * 100);
|
|
580
|
+
};
|
|
581
|
+
return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
|
|
582
|
+
}, e.prototype.toName = function() {
|
|
583
|
+
if (this.a === 0)
|
|
584
|
+
return "transparent";
|
|
585
|
+
if (this.a < 1)
|
|
586
|
+
return !1;
|
|
587
|
+
for (var t = "#" + K(this.r, this.g, this.b, !1), r = 0, n = Object.entries(P); r < n.length; r++) {
|
|
588
|
+
var a = n[r], i = a[0], s = a[1];
|
|
589
|
+
if (t === s)
|
|
590
|
+
return i;
|
|
591
|
+
}
|
|
592
|
+
return !1;
|
|
593
|
+
}, e.prototype.toString = function(t) {
|
|
594
|
+
var r = !!t;
|
|
595
|
+
t = t ?? this.format;
|
|
596
|
+
var n = !1, a = this.a < 1 && this.a >= 0, i = !r && a && (t.startsWith("hex") || t === "name");
|
|
597
|
+
return i ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (n = this.toRgbString()), t === "prgb" && (n = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (n = this.toHexString()), t === "hex3" && (n = this.toHexString(!0)), t === "hex4" && (n = this.toHex8String(!0)), t === "hex8" && (n = this.toHex8String()), t === "name" && (n = this.toName()), t === "hsl" && (n = this.toHslString()), t === "hsv" && (n = this.toHsvString()), n || this.toHexString());
|
|
598
|
+
}, e.prototype.toNumber = function() {
|
|
599
|
+
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
600
|
+
}, e.prototype.clone = function() {
|
|
601
|
+
return new e(this.toString());
|
|
602
|
+
}, e.prototype.lighten = function(t) {
|
|
603
|
+
t === void 0 && (t = 10);
|
|
604
|
+
var r = this.toHsl();
|
|
605
|
+
return r.l += t / 100, r.l = L(r.l), new e(r);
|
|
606
|
+
}, e.prototype.brighten = function(t) {
|
|
607
|
+
t === void 0 && (t = 10);
|
|
608
|
+
var r = this.toRgb();
|
|
609
|
+
return r.r = Math.max(0, Math.min(255, r.r - Math.round(255 * -(t / 100)))), r.g = Math.max(0, Math.min(255, r.g - Math.round(255 * -(t / 100)))), r.b = Math.max(0, Math.min(255, r.b - Math.round(255 * -(t / 100)))), new e(r);
|
|
610
|
+
}, e.prototype.darken = function(t) {
|
|
611
|
+
t === void 0 && (t = 10);
|
|
612
|
+
var r = this.toHsl();
|
|
613
|
+
return r.l -= t / 100, r.l = L(r.l), new e(r);
|
|
614
|
+
}, e.prototype.tint = function(t) {
|
|
615
|
+
return t === void 0 && (t = 10), this.mix("white", t);
|
|
616
|
+
}, e.prototype.shade = function(t) {
|
|
617
|
+
return t === void 0 && (t = 10), this.mix("black", t);
|
|
618
|
+
}, e.prototype.desaturate = function(t) {
|
|
619
|
+
t === void 0 && (t = 10);
|
|
620
|
+
var r = this.toHsl();
|
|
621
|
+
return r.s -= t / 100, r.s = L(r.s), new e(r);
|
|
622
|
+
}, e.prototype.saturate = function(t) {
|
|
623
|
+
t === void 0 && (t = 10);
|
|
624
|
+
var r = this.toHsl();
|
|
625
|
+
return r.s += t / 100, r.s = L(r.s), new e(r);
|
|
626
|
+
}, e.prototype.greyscale = function() {
|
|
627
|
+
return this.desaturate(100);
|
|
628
|
+
}, e.prototype.spin = function(t) {
|
|
629
|
+
var r = this.toHsl(), n = (r.h + t) % 360;
|
|
630
|
+
return r.h = n < 0 ? 360 + n : n, new e(r);
|
|
631
|
+
}, e.prototype.mix = function(t, r) {
|
|
632
|
+
r === void 0 && (r = 50);
|
|
633
|
+
var n = this.toRgb(), a = new e(t).toRgb(), i = r / 100, s = {
|
|
634
|
+
r: (a.r - n.r) * i + n.r,
|
|
635
|
+
g: (a.g - n.g) * i + n.g,
|
|
636
|
+
b: (a.b - n.b) * i + n.b,
|
|
637
|
+
a: (a.a - n.a) * i + n.a
|
|
638
|
+
};
|
|
639
|
+
return new e(s);
|
|
640
|
+
}, e.prototype.analogous = function(t, r) {
|
|
641
|
+
t === void 0 && (t = 6), r === void 0 && (r = 30);
|
|
642
|
+
var n = this.toHsl(), a = 360 / r, i = [this];
|
|
643
|
+
for (n.h = (n.h - (a * t >> 1) + 720) % 360; --t; )
|
|
644
|
+
n.h = (n.h + a) % 360, i.push(new e(n));
|
|
645
|
+
return i;
|
|
646
|
+
}, e.prototype.complement = function() {
|
|
647
|
+
var t = this.toHsl();
|
|
648
|
+
return t.h = (t.h + 180) % 360, new e(t);
|
|
649
|
+
}, e.prototype.monochromatic = function(t) {
|
|
650
|
+
t === void 0 && (t = 6);
|
|
651
|
+
for (var r = this.toHsv(), n = r.h, a = r.s, i = r.v, s = [], o = 1 / t; t--; )
|
|
652
|
+
s.push(new e({ h: n, s: a, v: i })), i = (i + o) % 1;
|
|
653
|
+
return s;
|
|
654
|
+
}, e.prototype.splitcomplement = function() {
|
|
655
|
+
var t = this.toHsl(), r = t.h;
|
|
656
|
+
return [
|
|
657
|
+
this,
|
|
658
|
+
new e({ h: (r + 72) % 360, s: t.s, l: t.l }),
|
|
659
|
+
new e({ h: (r + 216) % 360, s: t.s, l: t.l })
|
|
660
|
+
];
|
|
661
|
+
}, e.prototype.onBackground = function(t) {
|
|
662
|
+
var r = this.toRgb(), n = new e(t).toRgb(), a = r.a + n.a * (1 - r.a);
|
|
663
|
+
return new e({
|
|
664
|
+
r: (r.r * r.a + n.r * n.a * (1 - r.a)) / a,
|
|
665
|
+
g: (r.g * r.a + n.g * n.a * (1 - r.a)) / a,
|
|
666
|
+
b: (r.b * r.a + n.b * n.a * (1 - r.a)) / a,
|
|
667
|
+
a
|
|
668
|
+
});
|
|
669
|
+
}, e.prototype.triad = function() {
|
|
670
|
+
return this.polyad(3);
|
|
671
|
+
}, e.prototype.tetrad = function() {
|
|
672
|
+
return this.polyad(4);
|
|
673
|
+
}, e.prototype.polyad = function(t) {
|
|
674
|
+
for (var r = this.toHsl(), n = r.h, a = [this], i = 360 / t, s = 1; s < t; s++)
|
|
675
|
+
a.push(new e({ h: (n + s * i) % 360, s: r.s, l: r.l }));
|
|
676
|
+
return a;
|
|
677
|
+
}, e.prototype.equals = function(t) {
|
|
678
|
+
return this.toRgbString() === new e(t).toRgbString();
|
|
679
|
+
}, e;
|
|
680
|
+
}()
|
|
681
|
+
);
|
|
682
|
+
function y(...e) {
|
|
683
|
+
return new Me(...e);
|
|
684
|
+
}
|
|
685
|
+
function X(e, t) {
|
|
686
|
+
const r = e && e.a;
|
|
687
|
+
let n;
|
|
688
|
+
e && e.hsl ? n = y(e.hsl) : e && e.hex && e.hex.length > 0 ? n = y(e.hex) : e && e.hsv ? n = y(e.hsv) : e && e.rgba ? n = y(e.rgba) : e && e.rgb ? n = y(e.rgb) : n = y(e), n && (n._a === void 0 || n._a === null) && n.setAlpha(r || n.getAlpha());
|
|
689
|
+
const a = n.toHsl(), i = n.toHsv();
|
|
690
|
+
return a.s === 0 && (i.h = a.h = e.h || e.hsl && e.hsl.h || t || 0), i.v < 0.0164 && (i.h = e.h || e.hsv && e.hsv.h || 0, i.s = e.s || e.hsv && e.hsv.s || 0), a.l < 0.01 && (a.h = e.h || e.hsl && e.hsl.h || 0, a.s = e.s || e.hsl && e.hsl.s || 0), {
|
|
691
|
+
hsl: a,
|
|
692
|
+
hex: n.toHexString().toUpperCase(),
|
|
693
|
+
hex8: n.toHex8String().toUpperCase(),
|
|
694
|
+
rgba: n.toRgb(),
|
|
695
|
+
hsv: i,
|
|
696
|
+
oldHue: e.h || t || a.h,
|
|
697
|
+
source: e.source,
|
|
698
|
+
a: n.getAlpha()
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
var Se = {
|
|
702
|
+
model: {
|
|
703
|
+
prop: "modelValue",
|
|
704
|
+
event: "update:modelValue"
|
|
705
|
+
},
|
|
706
|
+
props: ["modelValue"],
|
|
707
|
+
data() {
|
|
708
|
+
return {
|
|
709
|
+
val: X(this.modelValue)
|
|
710
|
+
};
|
|
711
|
+
},
|
|
712
|
+
computed: {
|
|
713
|
+
colors: {
|
|
714
|
+
get() {
|
|
715
|
+
return this.val;
|
|
716
|
+
},
|
|
717
|
+
set(e) {
|
|
718
|
+
this.val = e, this.$emit("update:modelValue", e);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
watch: {
|
|
723
|
+
modelValue(e) {
|
|
724
|
+
this.val = X(e);
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
methods: {
|
|
728
|
+
colorChange(e, t) {
|
|
729
|
+
this.oldHue = this.colors.hsl.h, this.colors = X(e, t || this.oldHue);
|
|
730
|
+
},
|
|
731
|
+
isValidHex(e) {
|
|
732
|
+
return y(e).isValid;
|
|
733
|
+
},
|
|
734
|
+
simpleCheckForValidColor(e) {
|
|
735
|
+
const t = ["r", "g", "b", "a", "h", "s", "l", "v"];
|
|
736
|
+
let r = 0, n = 0;
|
|
737
|
+
for (let a = 0; a < t.length; a++) {
|
|
738
|
+
const i = t[a];
|
|
739
|
+
e[i] && (r++, isNaN(e[i]) || n++);
|
|
740
|
+
}
|
|
741
|
+
if (r === n)
|
|
742
|
+
return e;
|
|
743
|
+
},
|
|
744
|
+
paletteUpperCase(e) {
|
|
745
|
+
return e.map((t) => t.toUpperCase());
|
|
746
|
+
},
|
|
747
|
+
isTransparent(e) {
|
|
748
|
+
return y(e).getAlpha() === 0;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
}, F = {
|
|
752
|
+
name: "EditableInput",
|
|
753
|
+
props: {
|
|
754
|
+
label: String,
|
|
755
|
+
labelText: String,
|
|
756
|
+
desc: String,
|
|
757
|
+
value: [String, Number],
|
|
758
|
+
max: Number,
|
|
759
|
+
min: Number,
|
|
760
|
+
arrowOffset: {
|
|
761
|
+
type: Number,
|
|
762
|
+
default: 1
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
computed: {
|
|
766
|
+
val: {
|
|
767
|
+
get() {
|
|
768
|
+
return this.value;
|
|
769
|
+
},
|
|
770
|
+
set(e) {
|
|
771
|
+
if (this.max !== void 0 && +e > this.max)
|
|
772
|
+
this.$refs.input.value = this.max;
|
|
773
|
+
else
|
|
774
|
+
return e;
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
labelId() {
|
|
778
|
+
return `input__label__${this.label}__${Math.random().toString().slice(2, 5)}`;
|
|
779
|
+
},
|
|
780
|
+
labelSpanText() {
|
|
781
|
+
return this.labelText || this.label;
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
methods: {
|
|
785
|
+
update(e) {
|
|
786
|
+
this.handleChange(e.target.value);
|
|
787
|
+
},
|
|
788
|
+
handleChange(e) {
|
|
789
|
+
const t = {};
|
|
790
|
+
t[this.label] = e, t.hex === void 0 && t["#"] === void 0 ? this.$emit("change", t) : e.length > 5 && this.$emit("change", t);
|
|
791
|
+
},
|
|
792
|
+
// **** unused
|
|
793
|
+
// handleBlur (e) {
|
|
794
|
+
// console.log(e)
|
|
795
|
+
// },
|
|
796
|
+
handleKeyDown(e) {
|
|
797
|
+
let { val: t } = this;
|
|
798
|
+
const r = Number(t);
|
|
799
|
+
if (r) {
|
|
800
|
+
const n = this.arrowOffset || 1;
|
|
801
|
+
e.keyCode === 38 && (t = r + n, this.handleChange(t), e.preventDefault()), e.keyCode === 40 && (t = r - n, this.handleChange(t), e.preventDefault());
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
// **** unused
|
|
805
|
+
// handleDrag (e) {
|
|
806
|
+
// console.log(e)
|
|
807
|
+
// },
|
|
808
|
+
// handleMouseDown (e) {
|
|
809
|
+
// console.log(e)
|
|
810
|
+
// }
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
const He = { class: "vc-editable-input" }, Ae = ["aria-labelledby"], Re = ["id", "for"], Ee = { class: "vc-input__desc" };
|
|
814
|
+
function Te(e, t, r, n, a, i) {
|
|
815
|
+
return f(), m("div", He, [
|
|
816
|
+
R(h("input", {
|
|
817
|
+
ref: "input",
|
|
818
|
+
"onUpdate:modelValue": t[0] || (t[0] = (s) => i.val = s),
|
|
819
|
+
"aria-labelledby": i.labelId,
|
|
820
|
+
class: "vc-input__input",
|
|
821
|
+
onKeydown: t[1] || (t[1] = (...s) => i.handleKeyDown && i.handleKeyDown(...s)),
|
|
822
|
+
onInput: t[2] || (t[2] = (...s) => i.update && i.update(...s))
|
|
823
|
+
}, null, 40, Ae), [
|
|
824
|
+
[ee, i.val]
|
|
825
|
+
]),
|
|
826
|
+
h("span", {
|
|
827
|
+
id: i.labelId,
|
|
828
|
+
for: r.label,
|
|
829
|
+
class: "vc-input__label"
|
|
830
|
+
}, G(i.labelSpanText), 9, Re),
|
|
831
|
+
h(
|
|
832
|
+
"span",
|
|
833
|
+
Ee,
|
|
834
|
+
G(r.desc),
|
|
835
|
+
1
|
|
836
|
+
/* TEXT */
|
|
837
|
+
)
|
|
838
|
+
]);
|
|
839
|
+
}
|
|
840
|
+
var Le = ".vc-editable-input{position:relative}.vc-input__input{border:0;outline:none;padding:0}.vc-input__label{text-transform:capitalize}";
|
|
841
|
+
H(Le);
|
|
842
|
+
F.render = Te;
|
|
843
|
+
F.__file = "src/components/editable-input/editable-input.vue";
|
|
844
|
+
F.install = A;
|
|
845
|
+
function j(e, t, r) {
|
|
846
|
+
return t < r ? e < t ? t : e > r ? r : e : e < r ? r : e > t ? t : e;
|
|
847
|
+
}
|
|
848
|
+
var B = {
|
|
849
|
+
name: "Saturation",
|
|
850
|
+
props: {
|
|
851
|
+
value: Object
|
|
852
|
+
},
|
|
853
|
+
computed: {
|
|
854
|
+
colors() {
|
|
855
|
+
return this.value;
|
|
856
|
+
},
|
|
857
|
+
bgColor() {
|
|
858
|
+
return `hsl(${this.colors.hsv.h}, 100%, 50%)`;
|
|
859
|
+
},
|
|
860
|
+
pointerTop() {
|
|
861
|
+
return `${-(this.colors.hsv.v * 100) + 1 + 100}%`;
|
|
862
|
+
},
|
|
863
|
+
pointerLeft() {
|
|
864
|
+
return `${this.colors.hsv.s * 100}%`;
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
methods: {
|
|
868
|
+
handleChange(e, t) {
|
|
869
|
+
!t && e.preventDefault();
|
|
870
|
+
const { container: r } = this.$refs;
|
|
871
|
+
if (!r)
|
|
872
|
+
return;
|
|
873
|
+
const n = r.clientWidth, a = r.clientHeight, i = r.getBoundingClientRect().left + window.pageXOffset, s = r.getBoundingClientRect().top + window.pageYOffset, o = e.pageX || (e.touches ? e.touches[0].pageX : 0), u = e.pageY || (e.touches ? e.touches[0].pageY : 0), x = j(o - i, 0, n), c = j(u - s, 0, a), l = x / n, M = j(-(c / a) + 1, 0, 1);
|
|
874
|
+
this.onChange({
|
|
875
|
+
h: this.colors.hsv.h,
|
|
876
|
+
s: l,
|
|
877
|
+
v: M,
|
|
878
|
+
a: this.colors.hsv.a,
|
|
879
|
+
source: "hsva"
|
|
880
|
+
});
|
|
881
|
+
},
|
|
882
|
+
onChange(e) {
|
|
883
|
+
this.$emit("change", e);
|
|
884
|
+
},
|
|
885
|
+
handleMouseDown(e) {
|
|
886
|
+
window.addEventListener("mousemove", this.handleChange), window.addEventListener("mouseup", this.handleChange), window.addEventListener("mouseup", this.handleMouseUp);
|
|
887
|
+
},
|
|
888
|
+
handleMouseUp(e) {
|
|
889
|
+
this.unbindEventListeners();
|
|
890
|
+
},
|
|
891
|
+
unbindEventListeners() {
|
|
892
|
+
window.removeEventListener("mousemove", this.handleChange), window.removeEventListener("mouseup", this.handleChange), window.removeEventListener("mouseup", this.handleMouseUp);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
};
|
|
896
|
+
const Ie = /* @__PURE__ */ h(
|
|
897
|
+
"div",
|
|
898
|
+
{ class: "vc-saturation--white" },
|
|
899
|
+
null,
|
|
900
|
+
-1
|
|
901
|
+
/* HOISTED */
|
|
902
|
+
), De = /* @__PURE__ */ h(
|
|
903
|
+
"div",
|
|
904
|
+
{ class: "vc-saturation--black" },
|
|
905
|
+
null,
|
|
906
|
+
-1
|
|
907
|
+
/* HOISTED */
|
|
908
|
+
), Fe = /* @__PURE__ */ h(
|
|
909
|
+
"div",
|
|
910
|
+
{ class: "vc-saturation-circle" },
|
|
911
|
+
null,
|
|
912
|
+
-1
|
|
913
|
+
/* HOISTED */
|
|
914
|
+
), Be = [
|
|
915
|
+
Fe
|
|
916
|
+
];
|
|
917
|
+
function Ne(e, t, r, n, a, i) {
|
|
918
|
+
return f(), m(
|
|
919
|
+
"div",
|
|
920
|
+
{
|
|
921
|
+
ref: "container",
|
|
922
|
+
class: "vc-saturation",
|
|
923
|
+
style: k({ background: i.bgColor }),
|
|
924
|
+
onMousedown: t[0] || (t[0] = (...s) => i.handleMouseDown && i.handleMouseDown(...s)),
|
|
925
|
+
onTouchmove: t[1] || (t[1] = (...s) => i.handleChange && i.handleChange(...s)),
|
|
926
|
+
onTouchstart: t[2] || (t[2] = (...s) => i.handleChange && i.handleChange(...s))
|
|
927
|
+
},
|
|
928
|
+
[
|
|
929
|
+
Ie,
|
|
930
|
+
De,
|
|
931
|
+
h(
|
|
932
|
+
"div",
|
|
933
|
+
{
|
|
934
|
+
class: "vc-saturation-pointer",
|
|
935
|
+
style: k({ top: i.pointerTop, left: i.pointerLeft })
|
|
936
|
+
},
|
|
937
|
+
Be,
|
|
938
|
+
4
|
|
939
|
+
/* STYLE */
|
|
940
|
+
)
|
|
941
|
+
],
|
|
942
|
+
36
|
|
943
|
+
/* STYLE, HYDRATE_EVENTS */
|
|
944
|
+
);
|
|
945
|
+
}
|
|
946
|
+
var Oe = ".vc-saturation,.vc-saturation--black,.vc-saturation--white{bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0}.vc-saturation--white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.vc-saturation--black{background:linear-gradient(0deg,#000,transparent)}.vc-saturation-pointer{cursor:pointer;position:absolute}.vc-saturation-circle{border-radius:50%;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);cursor:head;height:4px;transform:translate(-2px,-2px);width:4px}";
|
|
947
|
+
H(Oe);
|
|
948
|
+
B.render = Ne;
|
|
949
|
+
B.__file = "src/components/saturation/saturation.vue";
|
|
950
|
+
B.install = A;
|
|
951
|
+
var N = {
|
|
952
|
+
name: "Hue",
|
|
953
|
+
props: {
|
|
954
|
+
value: Object,
|
|
955
|
+
direction: {
|
|
956
|
+
type: String,
|
|
957
|
+
// [horizontal | vertical]
|
|
958
|
+
default: "horizontal"
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
data() {
|
|
962
|
+
return {
|
|
963
|
+
oldHue: 0,
|
|
964
|
+
pullDirection: ""
|
|
965
|
+
};
|
|
966
|
+
},
|
|
967
|
+
computed: {
|
|
968
|
+
colors() {
|
|
969
|
+
return this.value;
|
|
970
|
+
},
|
|
971
|
+
directionClass() {
|
|
972
|
+
return {
|
|
973
|
+
"vc-hue--horizontal": this.direction === "horizontal",
|
|
974
|
+
"vc-hue--vertical": this.direction === "vertical"
|
|
975
|
+
};
|
|
976
|
+
},
|
|
977
|
+
pointerTop() {
|
|
978
|
+
return this.direction === "vertical" ? this.colors.hsl.h === 0 && this.pullDirection === "right" ? 0 : `${-(this.colors.hsl.h * 100 / 360) + 100}%` : 0;
|
|
979
|
+
},
|
|
980
|
+
pointerLeft() {
|
|
981
|
+
return this.direction === "vertical" ? 0 : this.colors.hsl.h === 0 && this.pullDirection === "right" ? "100%" : `${this.colors.hsl.h * 100 / 360}%`;
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
watch: {
|
|
985
|
+
value: {
|
|
986
|
+
handler(e, t) {
|
|
987
|
+
const { h: r } = e.hsl;
|
|
988
|
+
r !== 0 && r - this.oldHue > 0 && (this.pullDirection = "right"), r !== 0 && r - this.oldHue < 0 && (this.pullDirection = "left"), this.oldHue = r;
|
|
989
|
+
},
|
|
990
|
+
deep: !0,
|
|
991
|
+
immediate: !0
|
|
992
|
+
}
|
|
993
|
+
},
|
|
994
|
+
methods: {
|
|
995
|
+
handleChange(e, t) {
|
|
996
|
+
!t && e.preventDefault();
|
|
997
|
+
const { container: r } = this.$refs;
|
|
998
|
+
if (!r)
|
|
999
|
+
return;
|
|
1000
|
+
const n = r.clientWidth, a = r.clientHeight, i = r.getBoundingClientRect().left + window.pageXOffset, s = r.getBoundingClientRect().top + window.pageYOffset, o = e.pageX || (e.touches ? e.touches[0].pageX : 0), u = e.pageY || (e.touches ? e.touches[0].pageY : 0), x = o - i, c = u - s;
|
|
1001
|
+
let l, M;
|
|
1002
|
+
this.direction === "vertical" ? (c < 0 ? l = 360 : c > a ? l = 0 : (M = -(c * 100 / a) + 100, l = 360 * M / 100), this.colors.hsl.h !== l && this.$emit("change", {
|
|
1003
|
+
h: l,
|
|
1004
|
+
s: this.colors.hsl.s,
|
|
1005
|
+
l: this.colors.hsl.l,
|
|
1006
|
+
a: this.colors.hsl.a,
|
|
1007
|
+
source: "hsl"
|
|
1008
|
+
})) : (x < 0 ? l = 0 : x > n ? l = 360 : (M = x * 100 / n, l = 360 * M / 100), this.colors.hsl.h !== l && this.$emit("change", {
|
|
1009
|
+
h: l,
|
|
1010
|
+
s: this.colors.hsl.s,
|
|
1011
|
+
l: this.colors.hsl.l,
|
|
1012
|
+
a: this.colors.hsl.a,
|
|
1013
|
+
source: "hsl"
|
|
1014
|
+
}));
|
|
1015
|
+
},
|
|
1016
|
+
handleMouseDown(e) {
|
|
1017
|
+
this.handleChange(e, !0), window.addEventListener("mousemove", this.handleChange), window.addEventListener("mouseup", this.handleChange), window.addEventListener("mouseup", this.handleMouseUp);
|
|
1018
|
+
},
|
|
1019
|
+
handleMouseUp(e) {
|
|
1020
|
+
this.unbindEventListeners();
|
|
1021
|
+
},
|
|
1022
|
+
unbindEventListeners() {
|
|
1023
|
+
window.removeEventListener("mousemove", this.handleChange), window.removeEventListener("mouseup", this.handleChange), window.removeEventListener("mouseup", this.handleMouseUp);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
};
|
|
1027
|
+
const Ue = ["aria-valuenow"], Ve = /* @__PURE__ */ h(
|
|
1028
|
+
"div",
|
|
1029
|
+
{ class: "vc-hue-picker" },
|
|
1030
|
+
null,
|
|
1031
|
+
-1
|
|
1032
|
+
/* HOISTED */
|
|
1033
|
+
), ze = [
|
|
1034
|
+
Ve
|
|
1035
|
+
];
|
|
1036
|
+
function $e(e, t, r, n, a, i) {
|
|
1037
|
+
return f(), m(
|
|
1038
|
+
"div",
|
|
1039
|
+
{
|
|
1040
|
+
class: J(["vc-hue", [i.directionClass]])
|
|
1041
|
+
},
|
|
1042
|
+
[
|
|
1043
|
+
h("div", {
|
|
1044
|
+
ref: "container",
|
|
1045
|
+
class: "vc-hue-container",
|
|
1046
|
+
role: "slider",
|
|
1047
|
+
"aria-valuenow": i.colors.hsl.h,
|
|
1048
|
+
"aria-valuemin": "0",
|
|
1049
|
+
"aria-valuemax": "360",
|
|
1050
|
+
onMousedown: t[0] || (t[0] = (...s) => i.handleMouseDown && i.handleMouseDown(...s)),
|
|
1051
|
+
onTouchmove: t[1] || (t[1] = (...s) => i.handleChange && i.handleChange(...s)),
|
|
1052
|
+
onTouchstart: t[2] || (t[2] = (...s) => i.handleChange && i.handleChange(...s))
|
|
1053
|
+
}, [
|
|
1054
|
+
h(
|
|
1055
|
+
"div",
|
|
1056
|
+
{
|
|
1057
|
+
class: "vc-hue-pointer",
|
|
1058
|
+
style: k({ top: i.pointerTop, left: i.pointerLeft }),
|
|
1059
|
+
role: "presentation"
|
|
1060
|
+
},
|
|
1061
|
+
ze,
|
|
1062
|
+
4
|
|
1063
|
+
/* STYLE */
|
|
1064
|
+
)
|
|
1065
|
+
], 40, Ue)
|
|
1066
|
+
],
|
|
1067
|
+
2
|
|
1068
|
+
/* CLASS */
|
|
1069
|
+
);
|
|
1070
|
+
}
|
|
1071
|
+
var We = ".vc-hue{border-radius:2px;bottom:0;left:0;position:absolute;right:0;top:0}.vc-hue--horizontal{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue--vertical{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue-container{cursor:pointer;height:100%;margin:0 2px;position:relative}.vc-hue-pointer{position:absolute;z-index:2}.vc-hue-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}";
|
|
1072
|
+
H(We);
|
|
1073
|
+
N.render = $e;
|
|
1074
|
+
N.__file = "src/components/hue/hue.vue";
|
|
1075
|
+
N.install = A;
|
|
1076
|
+
var O = {
|
|
1077
|
+
name: "Chrome",
|
|
1078
|
+
components: {
|
|
1079
|
+
Saturation: B,
|
|
1080
|
+
Hue: N,
|
|
1081
|
+
Alpha: D,
|
|
1082
|
+
EdIn: F,
|
|
1083
|
+
Checkboard: E
|
|
1084
|
+
},
|
|
1085
|
+
mixins: [Se],
|
|
1086
|
+
props: {
|
|
1087
|
+
disableAlpha: {
|
|
1088
|
+
type: Boolean,
|
|
1089
|
+
default: !1
|
|
1090
|
+
},
|
|
1091
|
+
disableFields: {
|
|
1092
|
+
type: Boolean,
|
|
1093
|
+
default: !1
|
|
1094
|
+
},
|
|
1095
|
+
format: {
|
|
1096
|
+
type: String,
|
|
1097
|
+
default: "hex"
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
data() {
|
|
1101
|
+
return {
|
|
1102
|
+
fieldsIndex: "hex",
|
|
1103
|
+
highlight: !1
|
|
1104
|
+
};
|
|
1105
|
+
},
|
|
1106
|
+
computed: {
|
|
1107
|
+
hsl() {
|
|
1108
|
+
const { h: e, s: t, l: r } = this.colors.hsl;
|
|
1109
|
+
return {
|
|
1110
|
+
h: e.toFixed(),
|
|
1111
|
+
s: `${(t * 100).toFixed()}%`,
|
|
1112
|
+
l: `${(r * 100).toFixed()}%`
|
|
1113
|
+
};
|
|
1114
|
+
},
|
|
1115
|
+
activeColor() {
|
|
1116
|
+
const { rgba: e } = this.colors;
|
|
1117
|
+
return `rgba(${[e.r, e.g, e.b, e.a].join(",")})`;
|
|
1118
|
+
},
|
|
1119
|
+
hasAlpha() {
|
|
1120
|
+
return this.colors.a < 1;
|
|
1121
|
+
}
|
|
1122
|
+
},
|
|
1123
|
+
watch: {
|
|
1124
|
+
format: {
|
|
1125
|
+
handler(e) {
|
|
1126
|
+
this.fieldsIndex = e;
|
|
1127
|
+
},
|
|
1128
|
+
immediate: !0
|
|
1129
|
+
}
|
|
1130
|
+
},
|
|
1131
|
+
methods: {
|
|
1132
|
+
childChange(e) {
|
|
1133
|
+
this.colorChange(e);
|
|
1134
|
+
},
|
|
1135
|
+
inputChange(e) {
|
|
1136
|
+
if (e) {
|
|
1137
|
+
if (e.hex)
|
|
1138
|
+
this.isValidHex(e.hex) && this.colorChange({
|
|
1139
|
+
hex: e.hex,
|
|
1140
|
+
source: "hex"
|
|
1141
|
+
});
|
|
1142
|
+
else if (e.r || e.g || e.b || e.a)
|
|
1143
|
+
this.colorChange({
|
|
1144
|
+
r: e.r || this.colors.rgba.r,
|
|
1145
|
+
g: e.g || this.colors.rgba.g,
|
|
1146
|
+
b: e.b || this.colors.rgba.b,
|
|
1147
|
+
a: e.a || this.colors.rgba.a,
|
|
1148
|
+
source: "rgba"
|
|
1149
|
+
});
|
|
1150
|
+
else if (e.h || e.s || e.l) {
|
|
1151
|
+
const t = e.s ? e.s.replace("%", "") / 100 : this.colors.hsl.s, r = e.l ? e.l.replace("%", "") / 100 : this.colors.hsl.l;
|
|
1152
|
+
this.colorChange({
|
|
1153
|
+
h: e.h || this.colors.hsl.h,
|
|
1154
|
+
s: t,
|
|
1155
|
+
l: r,
|
|
1156
|
+
source: "hsl"
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
},
|
|
1161
|
+
toggleViews() {
|
|
1162
|
+
switch (this.fieldsIndex) {
|
|
1163
|
+
case "hex":
|
|
1164
|
+
this.fieldsIndex = `rgb${this.disableAlpha ? "" : "a"}`;
|
|
1165
|
+
break;
|
|
1166
|
+
case "rgb":
|
|
1167
|
+
case "rgba":
|
|
1168
|
+
this.fieldsIndex = `hsl${this.disableAlpha ? "" : "a"}`;
|
|
1169
|
+
break;
|
|
1170
|
+
default:
|
|
1171
|
+
this.fieldsIndex = "hex";
|
|
1172
|
+
break;
|
|
1173
|
+
}
|
|
1174
|
+
this.$emit("update:format", this.fieldsIndex);
|
|
1175
|
+
},
|
|
1176
|
+
showHighlight() {
|
|
1177
|
+
this.highlight = !0;
|
|
1178
|
+
},
|
|
1179
|
+
hideHighlight() {
|
|
1180
|
+
this.highlight = !1;
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
};
|
|
1184
|
+
const Xe = { class: "vc-chrome-saturation-wrap" }, je = { class: "vc-chrome-body" }, Pe = { class: "vc-chrome-controls" }, Ge = { class: "vc-chrome-color-wrap" }, Ye = ["aria-label"], qe = { class: "vc-chrome-sliders" }, Ke = { class: "vc-chrome-hue-wrap" }, Ze = {
|
|
1185
|
+
key: 0,
|
|
1186
|
+
class: "vc-chrome-alpha-wrap"
|
|
1187
|
+
}, Je = {
|
|
1188
|
+
key: 0,
|
|
1189
|
+
class: "vc-chrome-fields-wrap"
|
|
1190
|
+
}, Qe = { class: "vc-chrome-fields" }, et = { class: "vc-chrome-field" }, tt = { class: "vc-chrome-fields" }, rt = { class: "vc-chrome-field" }, nt = { class: "vc-chrome-field" }, it = { class: "vc-chrome-field" }, at = {
|
|
1191
|
+
key: 0,
|
|
1192
|
+
class: "vc-chrome-field"
|
|
1193
|
+
}, st = { class: "vc-chrome-fields" }, ot = { class: "vc-chrome-field" }, ht = { class: "vc-chrome-field" }, lt = { class: "vc-chrome-field" }, ct = {
|
|
1194
|
+
key: 0,
|
|
1195
|
+
class: "vc-chrome-field"
|
|
1196
|
+
}, ut = { class: "vc-chrome-toggle-icon" }, dt = /* @__PURE__ */ h(
|
|
1197
|
+
"path",
|
|
1198
|
+
{
|
|
1199
|
+
fill: "#333",
|
|
1200
|
+
d: "M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"
|
|
1201
|
+
},
|
|
1202
|
+
null,
|
|
1203
|
+
-1
|
|
1204
|
+
/* HOISTED */
|
|
1205
|
+
), ft = [
|
|
1206
|
+
dt
|
|
1207
|
+
], gt = { class: "vc-chrome-toggle-icon-highlight" };
|
|
1208
|
+
function pt(e, t, r, n, a, i) {
|
|
1209
|
+
const s = S("Saturation"), o = S("Checkboard"), u = S("Hue"), x = S("Alpha"), c = S("EdIn");
|
|
1210
|
+
return f(), m(
|
|
1211
|
+
"div",
|
|
1212
|
+
{
|
|
1213
|
+
role: "application",
|
|
1214
|
+
"aria-label": "Chrome color picker",
|
|
1215
|
+
class: J(["vc-chrome", [r.disableAlpha ? "vc-chrome__disable-alpha" : ""]])
|
|
1216
|
+
},
|
|
1217
|
+
[
|
|
1218
|
+
h("div", Xe, [
|
|
1219
|
+
v(s, {
|
|
1220
|
+
value: e.colors,
|
|
1221
|
+
onChange: i.childChange
|
|
1222
|
+
}, null, 8, ["value", "onChange"])
|
|
1223
|
+
]),
|
|
1224
|
+
h("div", je, [
|
|
1225
|
+
h("div", Pe, [
|
|
1226
|
+
h("div", Ge, [
|
|
1227
|
+
h("div", {
|
|
1228
|
+
"aria-label": `current color is ${e.colors.hex}`,
|
|
1229
|
+
class: "vc-chrome-active-color",
|
|
1230
|
+
style: k({ background: i.activeColor })
|
|
1231
|
+
}, null, 12, Ye),
|
|
1232
|
+
r.disableAlpha ? p("v-if", !0) : (f(), U(o, { key: 0 }))
|
|
1233
|
+
]),
|
|
1234
|
+
h("div", qe, [
|
|
1235
|
+
h("div", Ke, [
|
|
1236
|
+
v(u, {
|
|
1237
|
+
value: e.colors,
|
|
1238
|
+
onChange: i.childChange
|
|
1239
|
+
}, null, 8, ["value", "onChange"])
|
|
1240
|
+
]),
|
|
1241
|
+
r.disableAlpha ? p("v-if", !0) : (f(), m("div", Ze, [
|
|
1242
|
+
v(x, {
|
|
1243
|
+
value: e.colors,
|
|
1244
|
+
onChange: i.childChange
|
|
1245
|
+
}, null, 8, ["value", "onChange"])
|
|
1246
|
+
]))
|
|
1247
|
+
])
|
|
1248
|
+
]),
|
|
1249
|
+
r.disableFields ? p("v-if", !0) : (f(), m("div", Je, [
|
|
1250
|
+
R(h(
|
|
1251
|
+
"div",
|
|
1252
|
+
Qe,
|
|
1253
|
+
[
|
|
1254
|
+
p(" hex "),
|
|
1255
|
+
h("div", et, [
|
|
1256
|
+
i.hasAlpha ? p("v-if", !0) : (f(), U(c, {
|
|
1257
|
+
key: 0,
|
|
1258
|
+
label: "hex",
|
|
1259
|
+
value: e.colors.hex,
|
|
1260
|
+
onChange: i.inputChange
|
|
1261
|
+
}, null, 8, ["value", "onChange"])),
|
|
1262
|
+
i.hasAlpha ? (f(), U(c, {
|
|
1263
|
+
key: 1,
|
|
1264
|
+
label: "hex",
|
|
1265
|
+
value: e.colors.hex8,
|
|
1266
|
+
onChange: i.inputChange
|
|
1267
|
+
}, null, 8, ["value", "onChange"])) : p("v-if", !0)
|
|
1268
|
+
])
|
|
1269
|
+
],
|
|
1270
|
+
512
|
|
1271
|
+
/* NEED_PATCH */
|
|
1272
|
+
), [
|
|
1273
|
+
[T, a.fieldsIndex === "hex"]
|
|
1274
|
+
]),
|
|
1275
|
+
R(h(
|
|
1276
|
+
"div",
|
|
1277
|
+
tt,
|
|
1278
|
+
[
|
|
1279
|
+
p(" rgba "),
|
|
1280
|
+
h("div", rt, [
|
|
1281
|
+
v(c, {
|
|
1282
|
+
label: "r",
|
|
1283
|
+
value: e.colors.rgba.r,
|
|
1284
|
+
onChange: i.inputChange
|
|
1285
|
+
}, null, 8, ["value", "onChange"])
|
|
1286
|
+
]),
|
|
1287
|
+
h("div", nt, [
|
|
1288
|
+
v(c, {
|
|
1289
|
+
label: "g",
|
|
1290
|
+
value: e.colors.rgba.g,
|
|
1291
|
+
onChange: i.inputChange
|
|
1292
|
+
}, null, 8, ["value", "onChange"])
|
|
1293
|
+
]),
|
|
1294
|
+
h("div", it, [
|
|
1295
|
+
v(c, {
|
|
1296
|
+
label: "b",
|
|
1297
|
+
value: e.colors.rgba.b,
|
|
1298
|
+
onChange: i.inputChange
|
|
1299
|
+
}, null, 8, ["value", "onChange"])
|
|
1300
|
+
]),
|
|
1301
|
+
r.disableAlpha ? p("v-if", !0) : (f(), m("div", at, [
|
|
1302
|
+
v(c, {
|
|
1303
|
+
label: "a",
|
|
1304
|
+
value: e.colors.a,
|
|
1305
|
+
"arrow-offset": 0.01,
|
|
1306
|
+
max: 1,
|
|
1307
|
+
onChange: i.inputChange
|
|
1308
|
+
}, null, 8, ["value", "arrow-offset", "onChange"])
|
|
1309
|
+
]))
|
|
1310
|
+
],
|
|
1311
|
+
512
|
|
1312
|
+
/* NEED_PATCH */
|
|
1313
|
+
), [
|
|
1314
|
+
[T, ["rgb", "rgba"].includes(a.fieldsIndex)]
|
|
1315
|
+
]),
|
|
1316
|
+
R(h(
|
|
1317
|
+
"div",
|
|
1318
|
+
st,
|
|
1319
|
+
[
|
|
1320
|
+
p(" hsla "),
|
|
1321
|
+
h("div", ot, [
|
|
1322
|
+
v(c, {
|
|
1323
|
+
label: "h",
|
|
1324
|
+
value: i.hsl.h,
|
|
1325
|
+
onChange: i.inputChange
|
|
1326
|
+
}, null, 8, ["value", "onChange"])
|
|
1327
|
+
]),
|
|
1328
|
+
h("div", ht, [
|
|
1329
|
+
v(c, {
|
|
1330
|
+
label: "s",
|
|
1331
|
+
value: i.hsl.s,
|
|
1332
|
+
onChange: i.inputChange
|
|
1333
|
+
}, null, 8, ["value", "onChange"])
|
|
1334
|
+
]),
|
|
1335
|
+
h("div", lt, [
|
|
1336
|
+
v(c, {
|
|
1337
|
+
label: "l",
|
|
1338
|
+
value: i.hsl.l,
|
|
1339
|
+
onChange: i.inputChange
|
|
1340
|
+
}, null, 8, ["value", "onChange"])
|
|
1341
|
+
]),
|
|
1342
|
+
r.disableAlpha ? p("v-if", !0) : (f(), m("div", ct, [
|
|
1343
|
+
v(c, {
|
|
1344
|
+
label: "a",
|
|
1345
|
+
value: e.colors.a,
|
|
1346
|
+
"arrow-offset": 0.01,
|
|
1347
|
+
max: 1,
|
|
1348
|
+
onChange: i.inputChange
|
|
1349
|
+
}, null, 8, ["value", "arrow-offset", "onChange"])
|
|
1350
|
+
]))
|
|
1351
|
+
],
|
|
1352
|
+
512
|
|
1353
|
+
/* NEED_PATCH */
|
|
1354
|
+
), [
|
|
1355
|
+
[T, ["hsl", "hsla"].includes(a.fieldsIndex)]
|
|
1356
|
+
]),
|
|
1357
|
+
p(" btn "),
|
|
1358
|
+
h("div", {
|
|
1359
|
+
class: "vc-chrome-toggle-btn",
|
|
1360
|
+
role: "button",
|
|
1361
|
+
"aria-label": "Change another color definition",
|
|
1362
|
+
onClick: t[3] || (t[3] = (...l) => i.toggleViews && i.toggleViews(...l))
|
|
1363
|
+
}, [
|
|
1364
|
+
h("div", ut, [
|
|
1365
|
+
(f(), m(
|
|
1366
|
+
"svg",
|
|
1367
|
+
{
|
|
1368
|
+
style: { width: "24px", height: "24px" },
|
|
1369
|
+
viewBox: "0 0 24 24",
|
|
1370
|
+
onMouseover: t[0] || (t[0] = (...l) => i.showHighlight && i.showHighlight(...l)),
|
|
1371
|
+
onMouseenter: t[1] || (t[1] = (...l) => i.showHighlight && i.showHighlight(...l)),
|
|
1372
|
+
onMouseout: t[2] || (t[2] = (...l) => i.hideHighlight && i.hideHighlight(...l))
|
|
1373
|
+
},
|
|
1374
|
+
ft,
|
|
1375
|
+
32
|
|
1376
|
+
/* HYDRATE_EVENTS */
|
|
1377
|
+
))
|
|
1378
|
+
]),
|
|
1379
|
+
R(h(
|
|
1380
|
+
"div",
|
|
1381
|
+
gt,
|
|
1382
|
+
null,
|
|
1383
|
+
512
|
|
1384
|
+
/* NEED_PATCH */
|
|
1385
|
+
), [
|
|
1386
|
+
[T, a.highlight]
|
|
1387
|
+
])
|
|
1388
|
+
]),
|
|
1389
|
+
p(" btn ")
|
|
1390
|
+
]))
|
|
1391
|
+
])
|
|
1392
|
+
],
|
|
1393
|
+
2
|
|
1394
|
+
/* CLASS */
|
|
1395
|
+
);
|
|
1396
|
+
}
|
|
1397
|
+
var vt = ".vc-chrome{background:#fff;background-color:#fff;border-radius:2px;box-shadow:0 0 2px rgba(0,0,0,.3),0 4px 8px rgba(0,0,0,.3);box-sizing:initial;font-family:Menlo;width:225px}.vc-chrome-controls{display:flex}.vc-chrome-color-wrap{position:relative;width:36px}.vc-chrome-active-color{border-radius:15px;height:30px;overflow:hidden;position:relative;width:30px;z-index:1}.vc-chrome-color-wrap .vc-checkerboard{background-size:auto;border-radius:15px;height:30px;width:30px}.vc-chrome-sliders{flex:1}.vc-chrome-fields-wrap{display:flex;padding-top:16px}.vc-chrome-fields{display:flex;flex:1;margin-left:-6px}.vc-chrome-field{padding-left:6px;width:100%}.vc-chrome-toggle-btn{position:relative;text-align:right;width:32px}.vc-chrome-toggle-icon{cursor:pointer;margin-right:-4px;margin-top:12px;position:relative;z-index:2}.vc-chrome-toggle-icon-highlight{background:#eee;border-radius:4px;height:28px;left:12px;position:absolute;top:10px;width:24px}.vc-chrome-hue-wrap{margin-bottom:8px}.vc-chrome-alpha-wrap,.vc-chrome-hue-wrap{height:10px;position:relative}.vc-chrome-alpha-wrap .vc-alpha-gradient,.vc-chrome-hue-wrap .vc-hue{border-radius:2px}.vc-chrome-alpha-wrap .vc-alpha-picker,.vc-chrome-hue-wrap .vc-hue-picker{background-color:#f8f8f8;border-radius:6px;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);height:12px;transform:translate(-6px,-2px);width:12px}.vc-chrome-body{background-color:#fff;padding:16px 16px 12px}.vc-chrome-saturation-wrap{border-radius:2px 2px 0 0;overflow:hidden;padding-bottom:55%;position:relative;width:100%}.vc-chrome-saturation-wrap .vc-saturation-circle{height:12px;width:12px}.vc-chrome-fields .vc-input__input{border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #dadada;color:#333;font-size:11px;height:21px;text-align:center;width:100%}.vc-chrome-fields .vc-input__label{color:#969696;display:block;font-size:11px;line-height:11px;margin-top:12px;text-align:center;text-transform:uppercase}.vc-chrome__disable-alpha .vc-chrome-active-color{height:18px;width:18px}.vc-chrome__disable-alpha .vc-chrome-color-wrap{width:30px}.vc-chrome__disable-alpha .vc-chrome-hue-wrap{margin-bottom:4px;margin-top:4px}";
|
|
1398
|
+
H(vt);
|
|
1399
|
+
O.render = pt;
|
|
1400
|
+
O.__file = "src/components/chrome/chrome.vue";
|
|
1401
|
+
O.install = A;
|
|
1402
|
+
const bt = {
|
|
1403
|
+
name: "ColorPicker",
|
|
1404
|
+
extends: O
|
|
1405
|
+
}, xt = /* @__PURE__ */ te(bt, [["__scopeId", "data-v-11d72679"]]);
|
|
1406
|
+
export {
|
|
1407
|
+
xt as C
|
|
1408
|
+
};
|