@cling-se/widget 0.20.0 → 0.21.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 +6 -0
- package/dist/{AddClientCallout-p9hY5ma4.js → AddClientCallout-CHUJdq58.js} +4 -4
- package/dist/{AnswerModal-B5HomjlZ.js → AnswerModal-DyapzyIy.js} +679 -681
- package/dist/{AttachmentItem-vWCnfmSy.js → AttachmentItem-2Lbs4CKr.js} +4 -4
- package/dist/{BaseUpload-CpJcJRjy.js → BaseUpload-BdfjBI10.js} +2 -2
- package/dist/{BlockMedia-TjxVQfRI.js → BlockMedia-Cgrrv6PB.js} +1 -1
- package/dist/{CCallout-mg5CHKbW.js → CCallout-CbGaTfon.js} +1 -1
- package/dist/{CCurrencyDropdown-CYsaulJX.js → CCurrencyDropdown-s6YyITN1.js} +3 -3
- package/dist/{CDropdownItem-Cu4bFWtD.js → CDropdownItem-D2_kvXa_.js} +2 -2
- package/dist/{CFormField.vue_vue_type_script_setup_true_lang-BeIp8_aU.js → CFormField.vue_vue_type_script_setup_true_lang-CXzY3WCV.js} +2 -2
- package/dist/{CPhoneFormat-GM3CZqub.js → CPhoneFormat-CgWUX4xc.js} +1 -1
- package/dist/{CPhoneInput-DKf8eSyK.js → CPhoneInput-Bb78mU9U.js} +5 -5
- package/dist/{CPriceInput-Be3pub6u.js → CPriceInput-1feoLjqZ.js} +2 -2
- package/dist/{CSelect-CNY0-lsV.js → CSelect-DzVWxFr-.js} +1 -1
- package/dist/{CSkeleton-Bh4UU_9s.js → CSkeleton-Che8iURg.js} +1 -1
- package/dist/{ClientAutocomplete-Dm4wSPnJ.js → ClientAutocomplete-BrRpKW_p.js} +3 -3
- package/dist/{ClientModal-BHmZDhYp.js → ClientModal-BkRusR-p.js} +8 -8
- package/dist/{ColorPicker-CDmqEHnY.js → ColorPicker-Ba0bViV-.js} +1 -1
- package/dist/{CompanyModal-CifLcwwI.js → CompanyModal-RtuWTytD.js} +7 -7
- package/dist/{ContentWrapper-CTNDb0ck.js → ContentWrapper-C92i2rMN.js} +6 -6
- package/dist/{CoverBlockSettings-rLaGxL29.js → CoverBlockSettings-BPqtMkhc.js} +7 -7
- package/dist/{DocAnswer-DdRshw-Z.js → DocAnswer-BPB_pIO9.js} +2 -2
- package/dist/{DocDetails-bSPDS7-8.js → DocDetails-CmuE-pGU.js} +4 -4
- package/dist/{DocForm-Cn6th1oG.js → DocForm-MZuCjmqg.js} +24 -24
- package/dist/{DocFormSend-BVoLYwUB.js → DocFormSend-t1DotUWg.js} +2 -2
- package/dist/{DocLinks-BB5jSGpp.js → DocLinks-raND-RV3.js} +2 -2
- package/dist/{DocModalBase-DVMNHrQ0.js → DocModalBase-BTf5RwrM.js} +1 -1
- package/dist/{DocPrint-4LADFj3b.js → DocPrint-rFQCpls5.js} +1 -1
- package/dist/{DocReceipt-DMsRqm6N.js → DocReceipt-BzEv7iQI.js} +2 -2
- package/dist/{DocSendReminder--sHhq7nq.js → DocSendReminder-B3x4IK4a.js} +1 -1
- package/dist/{DocTextEditor-rxDDkurp.js → DocTextEditor-BnizHe_5.js} +141 -134
- package/dist/{DocTimeline-XcSBcUaQ.js → DocTimeline-DnZj_LnM.js} +2 -2
- package/dist/{DocumentClient-C_ZKPKB5.js → DocumentClient-gm-pzudv.js} +5 -5
- package/dist/{DocumentLayout-B49wHYov.js → DocumentLayout-YxxpHY-E.js} +5 -5
- package/dist/{DocumentLogotype-BuK-fBZa.js → DocumentLogotype-ChGKZ_Qg.js} +4 -4
- package/dist/{DocumentVoided-oOGAvC6V.js → DocumentVoided-HJGhl1_K.js} +1 -1
- package/dist/{EmbedInput-D8YWQ-qB.js → EmbedInput-vxzmm0aK.js} +3 -3
- package/dist/{EmbedSettings-CAMvefuZ.js → EmbedSettings-CzXZc7oD.js} +3 -3
- package/dist/{ErrorCallout-BJyb9nBD.js → ErrorCallout-C51ElTfp.js} +1 -1
- package/dist/{FilePreviewModal-DHyhUuZo.js → FilePreviewModal-BAT5txhb.js} +2 -2
- package/dist/{Flag-Ce5qgf2m.js → Flag-BexeJEGw.js} +1 -1
- package/dist/{HeaderSettings-BMOUeMU8.js → HeaderSettings-DrrnesnI.js} +9 -9
- package/dist/{ImageSelectModal-BJEHD53w.js → ImageSelectModal-CZK9a8V7.js} +3 -3
- package/dist/{ImageUploadWrapper-Bm_fsubV.js → ImageUploadWrapper-DMR97A6K.js} +2 -2
- package/dist/{Index-BFUBReG-.js → Index-B1ay-1P2.js} +3 -3
- package/dist/{Index-BRRXjIQP.js → Index-BEuSlOrT.js} +1 -1
- package/dist/{Index-BIAKEao7.js → Index-BVBYxWuz.js} +4 -4
- package/dist/{Index-C9iZyCtn.js → Index-BYFWrKuq.js} +8 -8
- package/dist/{Index-CxSrhoOz.js → Index-BYIKyMnu.js} +5 -5
- package/dist/{Index-ClT5TAft.js → Index-BiP_vcaf.js} +3 -3
- package/dist/{Index-CghqZnil.js → Index-BiuMBcD2.js} +5 -5
- package/dist/{Index-D_j8z8TJ.js → Index-Blrcegjn.js} +9 -9
- package/dist/{Index-BkaAqWBO.js → Index-BwDu8CJK.js} +1 -1
- package/dist/{Index-C7CgBDIF.js → Index-C9yPo8e-.js} +3 -3
- package/dist/{Index-y1iAAknQ.js → Index-CAMIux1F.js} +641 -598
- package/dist/{Index-CAgPjQtC.js → Index-CKG-y86w.js} +6 -6
- package/dist/{Index-Ba4whr1w.js → Index-CLJS5uIx.js} +2 -2
- package/dist/{Index-B7LFM_9O.js → Index-CN7frBBf.js} +2 -2
- package/dist/{Index-SSS__jy7.js → Index-CPcPhA1k.js} +5 -5
- package/dist/{Index-CQ9351hs.js → Index-CRrUmXai.js} +8 -8
- package/dist/{Index-B6utGn5s.js → Index-CWeJqHrl.js} +1 -1
- package/dist/{Index-B8363PUi.js → Index-Cfw4pakU.js} +4 -4
- package/dist/{Index-CItHDT3v.js → Index-CpsMRxtq.js} +4 -4
- package/dist/{Index-CQvg6N5q.js → Index-D2ZkVyYi.js} +5 -5
- package/dist/{Index-BSDfmC22.js → Index-D4YkmlSS.js} +2 -2
- package/dist/{Index-ClIh2IW1.js → Index-DH_R4un3.js} +258 -240
- package/dist/{Index-Bns741YV.js → Index-DLQ_V1c5.js} +3 -3
- package/dist/{Index-D9NojrLE.js → Index-DPDipy5g.js} +4 -4
- package/dist/{Index-2rJaMFcL.js → Index-D_C0qEB3.js} +4 -4
- package/dist/{Index-EFThQNhh.js → Index-DgtEJqd_.js} +2 -2
- package/dist/{Index-CYbVMO20.js → Index-Dnn1-7F6.js} +4 -4
- package/dist/{Index-CrIL3HJg.js → Index-DsFK6Cph.js} +3 -3
- package/dist/{Index-Do4iuEM8.js → Index-DtSc0ZCn.js} +2 -2
- package/dist/{Index-Bcdw8XVA.js → Index-LQVro5oP.js} +5 -5
- package/dist/{Index-DCR65NzU.js → Index-XArklt7b.js} +7 -7
- package/dist/Index-flxUW9JI.js +4 -0
- package/dist/{Index-CzdPYWAZ.js → Index-kyXImimP.js} +4 -4
- package/dist/{Index-CoSRZBAe.js → Index-qVrrTuqd.js} +6 -6
- package/dist/{Index.vue_vue_type_script_lang-cUDsYudO.js → Index.vue_vue_type_script_lang-CkFt4EE-.js} +2 -2
- package/dist/{InputToggleRow-BFnFE9Oc.js → InputToggleRow-CIJ2tdb5.js} +1 -1
- package/dist/{ManualPopover-DmAP6B_Y.js → ManualPopover-Cm4X4puK.js} +1 -1
- package/dist/{MediaWrapper-C4JfFbde.js → MediaWrapper-_QoV0Yp3.js} +3 -3
- package/dist/{NotBindingText-7Rr1u9v1.js → NotBindingText-DXOuTuRU.js} +2 -2
- package/dist/{PackageGroup-DkdCS2oR.js → PackageGroup-CK5XKMRW.js} +5 -5
- package/dist/{PdfTerms-BdymoJyT.js → PdfTerms-4-xS7sSr.js} +2 -2
- package/dist/{PdfViewer-CXkBa0_g.js → PdfViewer-Kl_mnvI8.js} +2 -2
- package/dist/{PlainHtml.vue_vue_type_script_setup_true_lang-lB3eiXpl.js → PlainHtml.vue_vue_type_script_setup_true_lang-BpWlRPKs.js} +1 -1
- package/dist/{PriceHeader-DXustcav.js → PriceHeader-BntNqVVQ.js} +7 -7
- package/dist/{SearchApi-DuZeNjkY.js → SearchApi-BEUkPklX.js} +1 -1
- package/dist/{SendForm-BrSZ5UeL.js → SendForm-BS73k4AT.js} +8 -8
- package/dist/{Setup-CNSgF7b0.js → Setup-CS03IRqK.js} +1 -1
- package/dist/{SmartList-Rb2o-PbW.js → SmartList-DRocSsgI.js} +1 -1
- package/dist/{Sortable.vue_vue_type_script_setup_true_lang-r7QF2LJS.js → Sortable.vue_vue_type_script_setup_true_lang-Dv_klLzu.js} +1 -1
- package/dist/{TermsSettings-yBfUx-7b.js → TermsSettings-DUJ9LO60.js} +5 -5
- package/dist/{ThemeColorRow-DYUR7TXj.js → ThemeColorRow-Dd_GSct6.js} +3 -3
- package/dist/{ToggleBinding-BEjzG2Xh.js → ToggleBinding-CfQWg9lu.js} +4 -4
- package/dist/{UploadModal-s3ML8quJ.js → UploadModal-CbFASSdJ.js} +2 -2
- package/dist/{VideoPlayerInput-Brw0_mfP.js → VideoPlayerInput-DTlqRKfe.js} +4 -4
- package/dist/{VideoPlayerSettings-aNVhnuCo.js → VideoPlayerSettings-Dzjf2pR-.js} +2 -2
- package/dist/{VideoSelectModal-BzIXa-FM.js → VideoSelectModal-l13Jzs11.js} +3 -3
- package/dist/{focusDrawerMixin-DHsxgKiI.js → focusDrawerMixin-D3TS6r2P.js} +1 -1
- package/dist/{formDrawerState-BRzcOCYZ.js → formDrawerState-C4a0CyyW.js} +1 -1
- package/dist/fortnoxTheme-BZNI3z8T.js +8 -0
- package/dist/{helpers-5o9UkEF4.js → helpers-z8_6IC7O.js} +1 -1
- package/dist/{index-BTf-KF-1.js → index-4cF-Byrh.js} +6 -8
- package/dist/{index-TdIPOc2f.js → index-BNLATTGI.js} +1 -1
- package/dist/{index-DKJal8iX.js → index-BahcePwR.js} +8 -8
- package/dist/{index-DxQodQ2P.js → index-C3pwuPoh.js} +1 -1
- package/dist/{index-B02B2of8.js → index-DKdgpzG1.js} +3 -3
- package/dist/{index-BXGeWlwY.js → index-GBvEp_9M.js} +1 -1
- package/dist/{index-CE5j0xPs.js → index-bVINFrWw.js} +1 -1
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +151 -151
- package/dist/{main-DKpj1mxJ.js → main-D8veaMd1.js} +9728 -9649
- package/dist/{mapFormMixin-D2ME1W30.js → mapFormMixin-CFpAen9Y.js} +2 -2
- package/dist/{omit-BlWnRm5y.js → omit-D0GRsmN6.js} +1 -1
- package/dist/{publicSenderState-CXApLC0x.js → publicSenderState-eqZv8nqt.js} +1 -1
- package/dist/{splitpanes-CxR9KAOD.js → splitpanes-CMv_BjEq.js} +1 -1
- package/dist/{template-B2jjOkEF.js → template-DZJeLTWP.js} +1 -1
- package/dist/{tippy.esm-C_ureXvQ.js → tippy.esm-DfMqnQub.js} +11 -7
- package/dist/{useTermsModal-DctGKo-3.js → useTermsModal-DcYDBUN3.js} +4 -4
- package/dist/{utils-mwks91R5.js → utils-CuhF9735.js} +1 -1
- package/dist/{validation-HJ33ekhX.js → validation-DSHT8mZg.js} +2 -2
- package/dist/widget.css +1 -1
- package/package.json +2 -2
- package/dist/Index-CvYoh9UK.js +0 -4
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { m as Z } from "./mapFormMixin-
|
|
2
|
-
import { a7 as Re, ak as $t, _ as tt, V as ke, k as Lt,
|
|
1
|
+
import { m as Z } from "./mapFormMixin-CFpAen9Y.js";
|
|
2
|
+
import { a7 as Re, ak as $t, _ as tt, V as ke, k as Lt, cU as Fe, aB as Wt, d7 as $e, b as $, d as R, o as D, j as y, e as L, f as B, F as lt, c as Q, w as N, t as I, q as K, al as Ut, d8 as Ne, d9 as Le, u as Ue, x as Ht, v as qe, da as Oe, m as ze, g as ct, ap as je, cl as Ve, h as Yt, ax as Gt } from "./main-D8veaMd1.js";
|
|
3
3
|
import { a as z } from "./anime.es-4wvNItHq.js";
|
|
4
|
-
import { _ as We } from "./CFormField.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as We } from "./CFormField.vue_vue_type_script_setup_true_lang-CXzY3WCV.js";
|
|
5
|
+
import { i as He } from "./fortnoxTheme-BZNI3z8T.js";
|
|
5
6
|
var G = {}, ut, Kt;
|
|
6
|
-
function
|
|
7
|
+
function Ye() {
|
|
7
8
|
return Kt || (Kt = 1, ut = function() {
|
|
8
9
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
9
10
|
}), ut;
|
|
@@ -12,7 +13,7 @@ var dt = {}, V = {}, Jt;
|
|
|
12
13
|
function W() {
|
|
13
14
|
if (Jt) return V;
|
|
14
15
|
Jt = 1;
|
|
15
|
-
let
|
|
16
|
+
let n;
|
|
16
17
|
const t = [
|
|
17
18
|
0,
|
|
18
19
|
// Not used
|
|
@@ -71,58 +72,58 @@ function W() {
|
|
|
71
72
|
}, V.setToSJISFunction = function(i) {
|
|
72
73
|
if (typeof i != "function")
|
|
73
74
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
74
|
-
|
|
75
|
+
n = i;
|
|
75
76
|
}, V.isKanjiModeEnabled = function() {
|
|
76
|
-
return typeof
|
|
77
|
+
return typeof n < "u";
|
|
77
78
|
}, V.toSJIS = function(i) {
|
|
78
|
-
return
|
|
79
|
+
return n(i);
|
|
79
80
|
}, V;
|
|
80
81
|
}
|
|
81
82
|
var ht = {}, Xt;
|
|
82
83
|
function qt() {
|
|
83
|
-
return Xt || (Xt = 1, function(
|
|
84
|
-
|
|
84
|
+
return Xt || (Xt = 1, function(n) {
|
|
85
|
+
n.L = { bit: 1 }, n.M = { bit: 0 }, n.Q = { bit: 3 }, n.H = { bit: 2 };
|
|
85
86
|
function t(o) {
|
|
86
87
|
if (typeof o != "string")
|
|
87
88
|
throw new Error("Param is not a string");
|
|
88
89
|
switch (o.toLowerCase()) {
|
|
89
90
|
case "l":
|
|
90
91
|
case "low":
|
|
91
|
-
return
|
|
92
|
+
return n.L;
|
|
92
93
|
case "m":
|
|
93
94
|
case "medium":
|
|
94
|
-
return
|
|
95
|
+
return n.M;
|
|
95
96
|
case "q":
|
|
96
97
|
case "quartile":
|
|
97
|
-
return
|
|
98
|
+
return n.Q;
|
|
98
99
|
case "h":
|
|
99
100
|
case "high":
|
|
100
|
-
return
|
|
101
|
+
return n.H;
|
|
101
102
|
default:
|
|
102
103
|
throw new Error("Unknown EC Level: " + o);
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
|
-
|
|
106
|
+
n.isValid = function(i) {
|
|
106
107
|
return i && typeof i.bit < "u" && i.bit >= 0 && i.bit < 4;
|
|
107
|
-
},
|
|
108
|
-
if (
|
|
108
|
+
}, n.from = function(i, e) {
|
|
109
|
+
if (n.isValid(i))
|
|
109
110
|
return i;
|
|
110
111
|
try {
|
|
111
112
|
return t(i);
|
|
112
113
|
} catch {
|
|
113
|
-
return
|
|
114
|
+
return e;
|
|
114
115
|
}
|
|
115
116
|
};
|
|
116
117
|
}(ht)), ht;
|
|
117
118
|
}
|
|
118
119
|
var ft, Qt;
|
|
119
|
-
function
|
|
120
|
+
function Ge() {
|
|
120
121
|
if (Qt) return ft;
|
|
121
122
|
Qt = 1;
|
|
122
|
-
function
|
|
123
|
+
function n() {
|
|
123
124
|
this.buffer = [], this.length = 0;
|
|
124
125
|
}
|
|
125
|
-
return
|
|
126
|
+
return n.prototype = {
|
|
126
127
|
get: function(t) {
|
|
127
128
|
const o = Math.floor(t / 8);
|
|
128
129
|
return (this.buffer[o] >>> 7 - t % 8 & 1) === 1;
|
|
@@ -138,70 +139,70 @@ function Ye() {
|
|
|
138
139
|
const o = Math.floor(this.length / 8);
|
|
139
140
|
this.buffer.length <= o && this.buffer.push(0), t && (this.buffer[o] |= 128 >>> this.length % 8), this.length++;
|
|
140
141
|
}
|
|
141
|
-
}, ft =
|
|
142
|
+
}, ft = n, ft;
|
|
142
143
|
}
|
|
143
144
|
var gt, Zt;
|
|
144
|
-
function
|
|
145
|
+
function Ke() {
|
|
145
146
|
if (Zt) return gt;
|
|
146
147
|
Zt = 1;
|
|
147
|
-
function
|
|
148
|
+
function n(t) {
|
|
148
149
|
if (!t || t < 1)
|
|
149
150
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
150
151
|
this.size = t, this.data = new Uint8Array(t * t), this.reservedBit = new Uint8Array(t * t);
|
|
151
152
|
}
|
|
152
|
-
return
|
|
153
|
+
return n.prototype.set = function(t, o, i, e) {
|
|
153
154
|
const s = t * this.size + o;
|
|
154
|
-
this.data[s] = i,
|
|
155
|
-
},
|
|
155
|
+
this.data[s] = i, e && (this.reservedBit[s] = !0);
|
|
156
|
+
}, n.prototype.get = function(t, o) {
|
|
156
157
|
return this.data[t * this.size + o];
|
|
157
|
-
},
|
|
158
|
+
}, n.prototype.xor = function(t, o, i) {
|
|
158
159
|
this.data[t * this.size + o] ^= i;
|
|
159
|
-
},
|
|
160
|
+
}, n.prototype.isReserved = function(t, o) {
|
|
160
161
|
return this.reservedBit[t * this.size + o];
|
|
161
|
-
}, gt =
|
|
162
|
+
}, gt = n, gt;
|
|
162
163
|
}
|
|
163
164
|
var mt = {}, te;
|
|
164
|
-
function
|
|
165
|
-
return te || (te = 1, function(
|
|
165
|
+
function Je() {
|
|
166
|
+
return te || (te = 1, function(n) {
|
|
166
167
|
const t = W().getSymbolSize;
|
|
167
|
-
|
|
168
|
+
n.getRowColCoords = function(i) {
|
|
168
169
|
if (i === 1) return [];
|
|
169
|
-
const
|
|
170
|
-
for (let l = 1; l <
|
|
170
|
+
const e = Math.floor(i / 7) + 2, s = t(i), r = s === 145 ? 26 : Math.ceil((s - 13) / (2 * e - 2)) * 2, a = [s - 7];
|
|
171
|
+
for (let l = 1; l < e - 1; l++)
|
|
171
172
|
a[l] = a[l - 1] - r;
|
|
172
173
|
return a.push(6), a.reverse();
|
|
173
|
-
},
|
|
174
|
-
const
|
|
174
|
+
}, n.getPositions = function(i) {
|
|
175
|
+
const e = [], s = n.getRowColCoords(i), r = s.length;
|
|
175
176
|
for (let a = 0; a < r; a++)
|
|
176
177
|
for (let l = 0; l < r; l++)
|
|
177
178
|
a === 0 && l === 0 || // top-left
|
|
178
179
|
a === 0 && l === r - 1 || // bottom-left
|
|
179
|
-
a === r - 1 && l === 0 ||
|
|
180
|
-
return
|
|
180
|
+
a === r - 1 && l === 0 || e.push([s[a], s[l]]);
|
|
181
|
+
return e;
|
|
181
182
|
};
|
|
182
183
|
}(mt)), mt;
|
|
183
184
|
}
|
|
184
185
|
var pt = {}, ee;
|
|
185
|
-
function
|
|
186
|
+
function Xe() {
|
|
186
187
|
if (ee) return pt;
|
|
187
188
|
ee = 1;
|
|
188
|
-
const
|
|
189
|
+
const n = W().getSymbolSize, t = 7;
|
|
189
190
|
return pt.getPositions = function(i) {
|
|
190
|
-
const
|
|
191
|
+
const e = n(i);
|
|
191
192
|
return [
|
|
192
193
|
// top-left
|
|
193
194
|
[0, 0],
|
|
194
195
|
// top-right
|
|
195
|
-
[
|
|
196
|
+
[e - t, 0],
|
|
196
197
|
// bottom-left
|
|
197
|
-
[0,
|
|
198
|
+
[0, e - t]
|
|
198
199
|
];
|
|
199
200
|
}, pt;
|
|
200
201
|
}
|
|
201
202
|
var wt = {}, ne;
|
|
202
|
-
function
|
|
203
|
-
return ne || (ne = 1, function(
|
|
204
|
-
|
|
203
|
+
function Qe() {
|
|
204
|
+
return ne || (ne = 1, function(n) {
|
|
205
|
+
n.Patterns = {
|
|
205
206
|
PATTERN000: 0,
|
|
206
207
|
PATTERN001: 1,
|
|
207
208
|
PATTERN010: 2,
|
|
@@ -217,80 +218,80 @@ function Xe() {
|
|
|
217
218
|
N3: 40,
|
|
218
219
|
N4: 10
|
|
219
220
|
};
|
|
220
|
-
|
|
221
|
-
return
|
|
222
|
-
},
|
|
223
|
-
return
|
|
224
|
-
},
|
|
225
|
-
const s =
|
|
221
|
+
n.isValid = function(e) {
|
|
222
|
+
return e != null && e !== "" && !isNaN(e) && e >= 0 && e <= 7;
|
|
223
|
+
}, n.from = function(e) {
|
|
224
|
+
return n.isValid(e) ? parseInt(e, 10) : void 0;
|
|
225
|
+
}, n.getPenaltyN1 = function(e) {
|
|
226
|
+
const s = e.size;
|
|
226
227
|
let r = 0, a = 0, l = 0, u = null, c = null;
|
|
227
228
|
for (let h = 0; h < s; h++) {
|
|
228
229
|
a = l = 0, u = c = null;
|
|
229
230
|
for (let f = 0; f < s; f++) {
|
|
230
|
-
let d =
|
|
231
|
-
d === u ? a++ : (a >= 5 && (r += t.N1 + (a - 5)), u = d, a = 1), d =
|
|
231
|
+
let d = e.get(h, f);
|
|
232
|
+
d === u ? a++ : (a >= 5 && (r += t.N1 + (a - 5)), u = d, a = 1), d = e.get(f, h), d === c ? l++ : (l >= 5 && (r += t.N1 + (l - 5)), c = d, l = 1);
|
|
232
233
|
}
|
|
233
234
|
a >= 5 && (r += t.N1 + (a - 5)), l >= 5 && (r += t.N1 + (l - 5));
|
|
234
235
|
}
|
|
235
236
|
return r;
|
|
236
|
-
},
|
|
237
|
-
const s =
|
|
237
|
+
}, n.getPenaltyN2 = function(e) {
|
|
238
|
+
const s = e.size;
|
|
238
239
|
let r = 0;
|
|
239
240
|
for (let a = 0; a < s - 1; a++)
|
|
240
241
|
for (let l = 0; l < s - 1; l++) {
|
|
241
|
-
const u =
|
|
242
|
+
const u = e.get(a, l) + e.get(a, l + 1) + e.get(a + 1, l) + e.get(a + 1, l + 1);
|
|
242
243
|
(u === 4 || u === 0) && r++;
|
|
243
244
|
}
|
|
244
245
|
return r * t.N2;
|
|
245
|
-
},
|
|
246
|
-
const s =
|
|
246
|
+
}, n.getPenaltyN3 = function(e) {
|
|
247
|
+
const s = e.size;
|
|
247
248
|
let r = 0, a = 0, l = 0;
|
|
248
249
|
for (let u = 0; u < s; u++) {
|
|
249
250
|
a = l = 0;
|
|
250
251
|
for (let c = 0; c < s; c++)
|
|
251
|
-
a = a << 1 & 2047 |
|
|
252
|
+
a = a << 1 & 2047 | e.get(u, c), c >= 10 && (a === 1488 || a === 93) && r++, l = l << 1 & 2047 | e.get(c, u), c >= 10 && (l === 1488 || l === 93) && r++;
|
|
252
253
|
}
|
|
253
254
|
return r * t.N3;
|
|
254
|
-
},
|
|
255
|
+
}, n.getPenaltyN4 = function(e) {
|
|
255
256
|
let s = 0;
|
|
256
|
-
const r =
|
|
257
|
-
for (let l = 0; l < r; l++) s +=
|
|
257
|
+
const r = e.data.length;
|
|
258
|
+
for (let l = 0; l < r; l++) s += e.data[l];
|
|
258
259
|
return Math.abs(Math.ceil(s * 100 / r / 5) - 10) * t.N4;
|
|
259
260
|
};
|
|
260
|
-
function o(i,
|
|
261
|
+
function o(i, e, s) {
|
|
261
262
|
switch (i) {
|
|
262
|
-
case
|
|
263
|
-
return (
|
|
264
|
-
case
|
|
265
|
-
return
|
|
266
|
-
case
|
|
263
|
+
case n.Patterns.PATTERN000:
|
|
264
|
+
return (e + s) % 2 === 0;
|
|
265
|
+
case n.Patterns.PATTERN001:
|
|
266
|
+
return e % 2 === 0;
|
|
267
|
+
case n.Patterns.PATTERN010:
|
|
267
268
|
return s % 3 === 0;
|
|
268
|
-
case
|
|
269
|
-
return (
|
|
270
|
-
case
|
|
271
|
-
return (Math.floor(
|
|
272
|
-
case
|
|
273
|
-
return
|
|
274
|
-
case
|
|
275
|
-
return (
|
|
276
|
-
case
|
|
277
|
-
return (
|
|
269
|
+
case n.Patterns.PATTERN011:
|
|
270
|
+
return (e + s) % 3 === 0;
|
|
271
|
+
case n.Patterns.PATTERN100:
|
|
272
|
+
return (Math.floor(e / 2) + Math.floor(s / 3)) % 2 === 0;
|
|
273
|
+
case n.Patterns.PATTERN101:
|
|
274
|
+
return e * s % 2 + e * s % 3 === 0;
|
|
275
|
+
case n.Patterns.PATTERN110:
|
|
276
|
+
return (e * s % 2 + e * s % 3) % 2 === 0;
|
|
277
|
+
case n.Patterns.PATTERN111:
|
|
278
|
+
return (e * s % 3 + (e + s) % 2) % 2 === 0;
|
|
278
279
|
default:
|
|
279
280
|
throw new Error("bad maskPattern:" + i);
|
|
280
281
|
}
|
|
281
282
|
}
|
|
282
|
-
|
|
283
|
+
n.applyMask = function(e, s) {
|
|
283
284
|
const r = s.size;
|
|
284
285
|
for (let a = 0; a < r; a++)
|
|
285
286
|
for (let l = 0; l < r; l++)
|
|
286
|
-
s.isReserved(l, a) || s.xor(l, a, o(
|
|
287
|
-
},
|
|
288
|
-
const r = Object.keys(
|
|
287
|
+
s.isReserved(l, a) || s.xor(l, a, o(e, l, a));
|
|
288
|
+
}, n.getBestMask = function(e, s) {
|
|
289
|
+
const r = Object.keys(n.Patterns).length;
|
|
289
290
|
let a = 0, l = 1 / 0;
|
|
290
291
|
for (let u = 0; u < r; u++) {
|
|
291
|
-
s(u),
|
|
292
|
-
const c =
|
|
293
|
-
|
|
292
|
+
s(u), n.applyMask(u, e);
|
|
293
|
+
const c = n.getPenaltyN1(e) + n.getPenaltyN2(e) + n.getPenaltyN3(e) + n.getPenaltyN4(e);
|
|
294
|
+
n.applyMask(u, e), c < l && (l = c, a = u);
|
|
294
295
|
}
|
|
295
296
|
return a;
|
|
296
297
|
};
|
|
@@ -300,7 +301,7 @@ var nt = {}, ie;
|
|
|
300
301
|
function Se() {
|
|
301
302
|
if (ie) return nt;
|
|
302
303
|
ie = 1;
|
|
303
|
-
const
|
|
304
|
+
const n = qt(), t = [
|
|
304
305
|
// L M Q H
|
|
305
306
|
1,
|
|
306
307
|
1,
|
|
@@ -625,99 +626,99 @@ function Se() {
|
|
|
625
626
|
2040,
|
|
626
627
|
2430
|
|
627
628
|
];
|
|
628
|
-
return nt.getBlocksCount = function(
|
|
629
|
+
return nt.getBlocksCount = function(e, s) {
|
|
629
630
|
switch (s) {
|
|
630
|
-
case
|
|
631
|
-
return t[(
|
|
632
|
-
case
|
|
633
|
-
return t[(
|
|
634
|
-
case
|
|
635
|
-
return t[(
|
|
636
|
-
case
|
|
637
|
-
return t[(
|
|
631
|
+
case n.L:
|
|
632
|
+
return t[(e - 1) * 4 + 0];
|
|
633
|
+
case n.M:
|
|
634
|
+
return t[(e - 1) * 4 + 1];
|
|
635
|
+
case n.Q:
|
|
636
|
+
return t[(e - 1) * 4 + 2];
|
|
637
|
+
case n.H:
|
|
638
|
+
return t[(e - 1) * 4 + 3];
|
|
638
639
|
default:
|
|
639
640
|
return;
|
|
640
641
|
}
|
|
641
|
-
}, nt.getTotalCodewordsCount = function(
|
|
642
|
+
}, nt.getTotalCodewordsCount = function(e, s) {
|
|
642
643
|
switch (s) {
|
|
643
|
-
case
|
|
644
|
-
return o[(
|
|
645
|
-
case
|
|
646
|
-
return o[(
|
|
647
|
-
case
|
|
648
|
-
return o[(
|
|
649
|
-
case
|
|
650
|
-
return o[(
|
|
644
|
+
case n.L:
|
|
645
|
+
return o[(e - 1) * 4 + 0];
|
|
646
|
+
case n.M:
|
|
647
|
+
return o[(e - 1) * 4 + 1];
|
|
648
|
+
case n.Q:
|
|
649
|
+
return o[(e - 1) * 4 + 2];
|
|
650
|
+
case n.H:
|
|
651
|
+
return o[(e - 1) * 4 + 3];
|
|
651
652
|
default:
|
|
652
653
|
return;
|
|
653
654
|
}
|
|
654
655
|
}, nt;
|
|
655
656
|
}
|
|
656
657
|
var yt = {}, X = {}, se;
|
|
657
|
-
function
|
|
658
|
+
function Ze() {
|
|
658
659
|
if (se) return X;
|
|
659
660
|
se = 1;
|
|
660
|
-
const
|
|
661
|
+
const n = new Uint8Array(512), t = new Uint8Array(256);
|
|
661
662
|
return function() {
|
|
662
663
|
let i = 1;
|
|
663
|
-
for (let
|
|
664
|
-
e
|
|
665
|
-
for (let
|
|
666
|
-
e
|
|
664
|
+
for (let e = 0; e < 255; e++)
|
|
665
|
+
n[e] = i, t[i] = e, i <<= 1, i & 256 && (i ^= 285);
|
|
666
|
+
for (let e = 255; e < 512; e++)
|
|
667
|
+
n[e] = n[e - 255];
|
|
667
668
|
}(), X.log = function(i) {
|
|
668
669
|
if (i < 1) throw new Error("log(" + i + ")");
|
|
669
670
|
return t[i];
|
|
670
671
|
}, X.exp = function(i) {
|
|
671
|
-
return
|
|
672
|
-
}, X.mul = function(i,
|
|
673
|
-
return i === 0 ||
|
|
672
|
+
return n[i];
|
|
673
|
+
}, X.mul = function(i, e) {
|
|
674
|
+
return i === 0 || e === 0 ? 0 : n[t[i] + t[e]];
|
|
674
675
|
}, X;
|
|
675
676
|
}
|
|
676
677
|
var oe;
|
|
677
|
-
function
|
|
678
|
-
return oe || (oe = 1, function(
|
|
679
|
-
const t =
|
|
680
|
-
|
|
681
|
-
const s = new Uint8Array(i.length +
|
|
678
|
+
function tn() {
|
|
679
|
+
return oe || (oe = 1, function(n) {
|
|
680
|
+
const t = Ze();
|
|
681
|
+
n.mul = function(i, e) {
|
|
682
|
+
const s = new Uint8Array(i.length + e.length - 1);
|
|
682
683
|
for (let r = 0; r < i.length; r++)
|
|
683
|
-
for (let a = 0; a <
|
|
684
|
-
s[r + a] ^= t.mul(i[r],
|
|
684
|
+
for (let a = 0; a < e.length; a++)
|
|
685
|
+
s[r + a] ^= t.mul(i[r], e[a]);
|
|
685
686
|
return s;
|
|
686
|
-
},
|
|
687
|
+
}, n.mod = function(i, e) {
|
|
687
688
|
let s = new Uint8Array(i);
|
|
688
|
-
for (; s.length -
|
|
689
|
+
for (; s.length - e.length >= 0; ) {
|
|
689
690
|
const r = s[0];
|
|
690
|
-
for (let l = 0; l <
|
|
691
|
-
s[l] ^= t.mul(
|
|
691
|
+
for (let l = 0; l < e.length; l++)
|
|
692
|
+
s[l] ^= t.mul(e[l], r);
|
|
692
693
|
let a = 0;
|
|
693
694
|
for (; a < s.length && s[a] === 0; ) a++;
|
|
694
695
|
s = s.slice(a);
|
|
695
696
|
}
|
|
696
697
|
return s;
|
|
697
|
-
},
|
|
698
|
-
let
|
|
698
|
+
}, n.generateECPolynomial = function(i) {
|
|
699
|
+
let e = new Uint8Array([1]);
|
|
699
700
|
for (let s = 0; s < i; s++)
|
|
700
|
-
|
|
701
|
-
return
|
|
701
|
+
e = n.mul(e, new Uint8Array([1, t.exp(s)]));
|
|
702
|
+
return e;
|
|
702
703
|
};
|
|
703
704
|
}(yt)), yt;
|
|
704
705
|
}
|
|
705
706
|
var vt, re;
|
|
706
|
-
function
|
|
707
|
+
function en() {
|
|
707
708
|
if (re) return vt;
|
|
708
709
|
re = 1;
|
|
709
|
-
const
|
|
710
|
+
const n = tn();
|
|
710
711
|
function t(o) {
|
|
711
712
|
this.genPoly = void 0, this.degree = o, this.degree && this.initialize(this.degree);
|
|
712
713
|
}
|
|
713
714
|
return t.prototype.initialize = function(i) {
|
|
714
|
-
this.degree = i, this.genPoly =
|
|
715
|
+
this.degree = i, this.genPoly = n.generateECPolynomial(this.degree);
|
|
715
716
|
}, t.prototype.encode = function(i) {
|
|
716
717
|
if (!this.genPoly)
|
|
717
718
|
throw new Error("Encoder not initialized");
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
const s =
|
|
719
|
+
const e = new Uint8Array(i.length + this.degree);
|
|
720
|
+
e.set(i);
|
|
721
|
+
const s = n.mod(e, this.genPoly), r = this.degree - s.length;
|
|
721
722
|
if (r > 0) {
|
|
722
723
|
const a = new Uint8Array(this.degree);
|
|
723
724
|
return a.set(s, r), a;
|
|
@@ -735,15 +736,15 @@ var U = {}, le;
|
|
|
735
736
|
function Me() {
|
|
736
737
|
if (le) return U;
|
|
737
738
|
le = 1;
|
|
738
|
-
const
|
|
739
|
+
const n = "[0-9]+", t = "[A-Z $%*+\\-./:]+";
|
|
739
740
|
let o = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
740
741
|
o = o.replace(/u/g, "\\u");
|
|
741
742
|
const i = "(?:(?![A-Z0-9 $%*+\\-./:]|" + o + `)(?:.|[\r
|
|
742
743
|
]))+`;
|
|
743
|
-
U.KANJI = new RegExp(o, "g"), U.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), U.BYTE = new RegExp(i, "g"), U.NUMERIC = new RegExp(
|
|
744
|
-
const
|
|
744
|
+
U.KANJI = new RegExp(o, "g"), U.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), U.BYTE = new RegExp(i, "g"), U.NUMERIC = new RegExp(n, "g"), U.ALPHANUMERIC = new RegExp(t, "g");
|
|
745
|
+
const e = new RegExp("^" + o + "$"), s = new RegExp("^" + n + "$"), r = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
745
746
|
return U.testKanji = function(l) {
|
|
746
|
-
return
|
|
747
|
+
return e.test(l);
|
|
747
748
|
}, U.testNumeric = function(l) {
|
|
748
749
|
return s.test(l);
|
|
749
750
|
}, U.testAlphanumeric = function(l) {
|
|
@@ -752,57 +753,57 @@ function Me() {
|
|
|
752
753
|
}
|
|
753
754
|
var ce;
|
|
754
755
|
function H() {
|
|
755
|
-
return ce || (ce = 1, function(
|
|
756
|
+
return ce || (ce = 1, function(n) {
|
|
756
757
|
const t = Te(), o = Me();
|
|
757
|
-
|
|
758
|
+
n.NUMERIC = {
|
|
758
759
|
id: "Numeric",
|
|
759
760
|
bit: 1,
|
|
760
761
|
ccBits: [10, 12, 14]
|
|
761
|
-
},
|
|
762
|
+
}, n.ALPHANUMERIC = {
|
|
762
763
|
id: "Alphanumeric",
|
|
763
764
|
bit: 2,
|
|
764
765
|
ccBits: [9, 11, 13]
|
|
765
|
-
},
|
|
766
|
+
}, n.BYTE = {
|
|
766
767
|
id: "Byte",
|
|
767
768
|
bit: 4,
|
|
768
769
|
ccBits: [8, 16, 16]
|
|
769
|
-
},
|
|
770
|
+
}, n.KANJI = {
|
|
770
771
|
id: "Kanji",
|
|
771
772
|
bit: 8,
|
|
772
773
|
ccBits: [8, 10, 12]
|
|
773
|
-
},
|
|
774
|
+
}, n.MIXED = {
|
|
774
775
|
bit: -1
|
|
775
|
-
},
|
|
776
|
+
}, n.getCharCountIndicator = function(s, r) {
|
|
776
777
|
if (!s.ccBits) throw new Error("Invalid mode: " + s);
|
|
777
778
|
if (!t.isValid(r))
|
|
778
779
|
throw new Error("Invalid version: " + r);
|
|
779
780
|
return r >= 1 && r < 10 ? s.ccBits[0] : r < 27 ? s.ccBits[1] : s.ccBits[2];
|
|
780
|
-
},
|
|
781
|
-
return o.testNumeric(s) ?
|
|
782
|
-
},
|
|
781
|
+
}, n.getBestModeForData = function(s) {
|
|
782
|
+
return o.testNumeric(s) ? n.NUMERIC : o.testAlphanumeric(s) ? n.ALPHANUMERIC : o.testKanji(s) ? n.KANJI : n.BYTE;
|
|
783
|
+
}, n.toString = function(s) {
|
|
783
784
|
if (s && s.id) return s.id;
|
|
784
785
|
throw new Error("Invalid mode");
|
|
785
|
-
},
|
|
786
|
+
}, n.isValid = function(s) {
|
|
786
787
|
return s && s.bit && s.ccBits;
|
|
787
788
|
};
|
|
788
|
-
function i(
|
|
789
|
-
if (typeof
|
|
789
|
+
function i(e) {
|
|
790
|
+
if (typeof e != "string")
|
|
790
791
|
throw new Error("Param is not a string");
|
|
791
|
-
switch (
|
|
792
|
+
switch (e.toLowerCase()) {
|
|
792
793
|
case "numeric":
|
|
793
|
-
return
|
|
794
|
+
return n.NUMERIC;
|
|
794
795
|
case "alphanumeric":
|
|
795
|
-
return
|
|
796
|
+
return n.ALPHANUMERIC;
|
|
796
797
|
case "kanji":
|
|
797
|
-
return
|
|
798
|
+
return n.KANJI;
|
|
798
799
|
case "byte":
|
|
799
|
-
return
|
|
800
|
+
return n.BYTE;
|
|
800
801
|
default:
|
|
801
|
-
throw new Error("Unknown mode: " +
|
|
802
|
+
throw new Error("Unknown mode: " + e);
|
|
802
803
|
}
|
|
803
804
|
}
|
|
804
|
-
|
|
805
|
-
if (
|
|
805
|
+
n.from = function(s, r) {
|
|
806
|
+
if (n.isValid(s))
|
|
806
807
|
return s;
|
|
807
808
|
try {
|
|
808
809
|
return i(s);
|
|
@@ -813,16 +814,16 @@ function H() {
|
|
|
813
814
|
}(Ct)), Ct;
|
|
814
815
|
}
|
|
815
816
|
var ue;
|
|
816
|
-
function
|
|
817
|
-
return ue || (ue = 1, function(
|
|
818
|
-
const t = W(), o = Se(), i = qt(),
|
|
817
|
+
function nn() {
|
|
818
|
+
return ue || (ue = 1, function(n) {
|
|
819
|
+
const t = W(), o = Se(), i = qt(), e = H(), s = Te(), r = 7973, a = t.getBCHDigit(r);
|
|
819
820
|
function l(f, d, p) {
|
|
820
821
|
for (let g = 1; g <= 40; g++)
|
|
821
|
-
if (d <=
|
|
822
|
+
if (d <= n.getCapacity(g, p, f))
|
|
822
823
|
return g;
|
|
823
824
|
}
|
|
824
825
|
function u(f, d) {
|
|
825
|
-
return
|
|
826
|
+
return e.getCharCountIndicator(f, d) + 4;
|
|
826
827
|
}
|
|
827
828
|
function c(f, d) {
|
|
828
829
|
let p = 0;
|
|
@@ -833,30 +834,30 @@ function en() {
|
|
|
833
834
|
}
|
|
834
835
|
function h(f, d) {
|
|
835
836
|
for (let p = 1; p <= 40; p++)
|
|
836
|
-
if (c(f, p) <=
|
|
837
|
+
if (c(f, p) <= n.getCapacity(p, d, e.MIXED))
|
|
837
838
|
return p;
|
|
838
839
|
}
|
|
839
|
-
|
|
840
|
+
n.from = function(d, p) {
|
|
840
841
|
return s.isValid(d) ? parseInt(d, 10) : p;
|
|
841
|
-
},
|
|
842
|
+
}, n.getCapacity = function(d, p, g) {
|
|
842
843
|
if (!s.isValid(d))
|
|
843
844
|
throw new Error("Invalid QR Code version");
|
|
844
|
-
typeof g > "u" && (g =
|
|
845
|
+
typeof g > "u" && (g = e.BYTE);
|
|
845
846
|
const A = t.getSymbolTotalCodewords(d), x = o.getTotalCodewordsCount(d, p), T = (A - x) * 8;
|
|
846
|
-
if (g ===
|
|
847
|
+
if (g === e.MIXED) return T;
|
|
847
848
|
const E = T - u(g, d);
|
|
848
849
|
switch (g) {
|
|
849
|
-
case
|
|
850
|
+
case e.NUMERIC:
|
|
850
851
|
return Math.floor(E / 10 * 3);
|
|
851
|
-
case
|
|
852
|
+
case e.ALPHANUMERIC:
|
|
852
853
|
return Math.floor(E / 11 * 2);
|
|
853
|
-
case
|
|
854
|
+
case e.KANJI:
|
|
854
855
|
return Math.floor(E / 13);
|
|
855
|
-
case
|
|
856
|
+
case e.BYTE:
|
|
856
857
|
default:
|
|
857
858
|
return Math.floor(E / 8);
|
|
858
859
|
}
|
|
859
|
-
},
|
|
860
|
+
}, n.getBestVersionForData = function(d, p) {
|
|
860
861
|
let g;
|
|
861
862
|
const A = i.from(p, i.M);
|
|
862
863
|
if (Array.isArray(d)) {
|
|
@@ -868,7 +869,7 @@ function en() {
|
|
|
868
869
|
} else
|
|
869
870
|
g = d;
|
|
870
871
|
return l(g.mode, g.getLength(), A);
|
|
871
|
-
},
|
|
872
|
+
}, n.getEncodedBits = function(d) {
|
|
872
873
|
if (!s.isValid(d) || d < 7)
|
|
873
874
|
throw new Error("Invalid QR Code version");
|
|
874
875
|
let p = d << 12;
|
|
@@ -879,25 +880,25 @@ function en() {
|
|
|
879
880
|
}(_t)), _t;
|
|
880
881
|
}
|
|
881
882
|
var bt = {}, de;
|
|
882
|
-
function
|
|
883
|
+
function sn() {
|
|
883
884
|
if (de) return bt;
|
|
884
885
|
de = 1;
|
|
885
|
-
const
|
|
886
|
+
const n = W(), t = 1335, o = 21522, i = n.getBCHDigit(t);
|
|
886
887
|
return bt.getEncodedBits = function(s, r) {
|
|
887
888
|
const a = s.bit << 3 | r;
|
|
888
889
|
let l = a << 10;
|
|
889
|
-
for (;
|
|
890
|
-
l ^= t <<
|
|
890
|
+
for (; n.getBCHDigit(l) - i >= 0; )
|
|
891
|
+
l ^= t << n.getBCHDigit(l) - i;
|
|
891
892
|
return (a << 10 | l) ^ o;
|
|
892
893
|
}, bt;
|
|
893
894
|
}
|
|
894
895
|
var Pt = {}, Et, he;
|
|
895
|
-
function
|
|
896
|
+
function on() {
|
|
896
897
|
if (he) return Et;
|
|
897
898
|
he = 1;
|
|
898
|
-
const
|
|
899
|
+
const n = H();
|
|
899
900
|
function t(o) {
|
|
900
|
-
this.mode =
|
|
901
|
+
this.mode = n.NUMERIC, this.data = o.toString();
|
|
901
902
|
}
|
|
902
903
|
return t.getBitsLength = function(i) {
|
|
903
904
|
return 10 * Math.floor(i / 3) + (i % 3 ? i % 3 * 3 + 1 : 0);
|
|
@@ -906,18 +907,18 @@ function sn() {
|
|
|
906
907
|
}, t.prototype.getBitsLength = function() {
|
|
907
908
|
return t.getBitsLength(this.data.length);
|
|
908
909
|
}, t.prototype.write = function(i) {
|
|
909
|
-
let
|
|
910
|
-
for (
|
|
911
|
-
s = this.data.substr(
|
|
912
|
-
const a = this.data.length -
|
|
913
|
-
a > 0 && (s = this.data.substr(
|
|
910
|
+
let e, s, r;
|
|
911
|
+
for (e = 0; e + 3 <= this.data.length; e += 3)
|
|
912
|
+
s = this.data.substr(e, 3), r = parseInt(s, 10), i.put(r, 10);
|
|
913
|
+
const a = this.data.length - e;
|
|
914
|
+
a > 0 && (s = this.data.substr(e), r = parseInt(s, 10), i.put(r, a * 3 + 1));
|
|
914
915
|
}, Et = t, Et;
|
|
915
916
|
}
|
|
916
917
|
var kt, fe;
|
|
917
|
-
function
|
|
918
|
+
function rn() {
|
|
918
919
|
if (fe) return kt;
|
|
919
920
|
fe = 1;
|
|
920
|
-
const
|
|
921
|
+
const n = H(), t = [
|
|
921
922
|
"0",
|
|
922
923
|
"1",
|
|
923
924
|
"2",
|
|
@@ -965,31 +966,31 @@ function on() {
|
|
|
965
966
|
":"
|
|
966
967
|
];
|
|
967
968
|
function o(i) {
|
|
968
|
-
this.mode =
|
|
969
|
+
this.mode = n.ALPHANUMERIC, this.data = i;
|
|
969
970
|
}
|
|
970
|
-
return o.getBitsLength = function(
|
|
971
|
-
return 11 * Math.floor(
|
|
971
|
+
return o.getBitsLength = function(e) {
|
|
972
|
+
return 11 * Math.floor(e / 2) + 6 * (e % 2);
|
|
972
973
|
}, o.prototype.getLength = function() {
|
|
973
974
|
return this.data.length;
|
|
974
975
|
}, o.prototype.getBitsLength = function() {
|
|
975
976
|
return o.getBitsLength(this.data.length);
|
|
976
|
-
}, o.prototype.write = function(
|
|
977
|
+
}, o.prototype.write = function(e) {
|
|
977
978
|
let s;
|
|
978
979
|
for (s = 0; s + 2 <= this.data.length; s += 2) {
|
|
979
980
|
let r = t.indexOf(this.data[s]) * 45;
|
|
980
|
-
r += t.indexOf(this.data[s + 1]),
|
|
981
|
+
r += t.indexOf(this.data[s + 1]), e.put(r, 11);
|
|
981
982
|
}
|
|
982
|
-
this.data.length % 2 &&
|
|
983
|
+
this.data.length % 2 && e.put(t.indexOf(this.data[s]), 6);
|
|
983
984
|
}, kt = o, kt;
|
|
984
985
|
}
|
|
985
986
|
var St, ge;
|
|
986
|
-
function
|
|
987
|
+
function an() {
|
|
987
988
|
return ge || (ge = 1, St = function(t) {
|
|
988
|
-
for (var o = [], i = t.length,
|
|
989
|
-
var s = t.charCodeAt(
|
|
990
|
-
if (s >= 55296 && s <= 56319 && i >
|
|
991
|
-
var r = t.charCodeAt(
|
|
992
|
-
r >= 56320 && r <= 57343 && (s = (s - 55296) * 1024 + r - 56320 + 65536,
|
|
989
|
+
for (var o = [], i = t.length, e = 0; e < i; e++) {
|
|
990
|
+
var s = t.charCodeAt(e);
|
|
991
|
+
if (s >= 55296 && s <= 56319 && i > e + 1) {
|
|
992
|
+
var r = t.charCodeAt(e + 1);
|
|
993
|
+
r >= 56320 && r <= 57343 && (s = (s - 55296) * 1024 + r - 56320 + 65536, e += 1);
|
|
993
994
|
}
|
|
994
995
|
if (s < 128) {
|
|
995
996
|
o.push(s);
|
|
@@ -1013,49 +1014,49 @@ function rn() {
|
|
|
1013
1014
|
}), St;
|
|
1014
1015
|
}
|
|
1015
1016
|
var Tt, me;
|
|
1016
|
-
function
|
|
1017
|
+
function ln() {
|
|
1017
1018
|
if (me) return Tt;
|
|
1018
1019
|
me = 1;
|
|
1019
|
-
const
|
|
1020
|
+
const n = an(), t = H();
|
|
1020
1021
|
function o(i) {
|
|
1021
|
-
this.mode = t.BYTE, typeof i == "string" && (i =
|
|
1022
|
+
this.mode = t.BYTE, typeof i == "string" && (i = n(i)), this.data = new Uint8Array(i);
|
|
1022
1023
|
}
|
|
1023
|
-
return o.getBitsLength = function(
|
|
1024
|
-
return
|
|
1024
|
+
return o.getBitsLength = function(e) {
|
|
1025
|
+
return e * 8;
|
|
1025
1026
|
}, o.prototype.getLength = function() {
|
|
1026
1027
|
return this.data.length;
|
|
1027
1028
|
}, o.prototype.getBitsLength = function() {
|
|
1028
1029
|
return o.getBitsLength(this.data.length);
|
|
1029
1030
|
}, o.prototype.write = function(i) {
|
|
1030
|
-
for (let
|
|
1031
|
-
i.put(this.data[
|
|
1031
|
+
for (let e = 0, s = this.data.length; e < s; e++)
|
|
1032
|
+
i.put(this.data[e], 8);
|
|
1032
1033
|
}, Tt = o, Tt;
|
|
1033
1034
|
}
|
|
1034
1035
|
var Mt, pe;
|
|
1035
|
-
function
|
|
1036
|
+
function cn() {
|
|
1036
1037
|
if (pe) return Mt;
|
|
1037
1038
|
pe = 1;
|
|
1038
|
-
const
|
|
1039
|
+
const n = H(), t = W();
|
|
1039
1040
|
function o(i) {
|
|
1040
|
-
this.mode =
|
|
1041
|
+
this.mode = n.KANJI, this.data = i;
|
|
1041
1042
|
}
|
|
1042
|
-
return o.getBitsLength = function(
|
|
1043
|
-
return
|
|
1043
|
+
return o.getBitsLength = function(e) {
|
|
1044
|
+
return e * 13;
|
|
1044
1045
|
}, o.prototype.getLength = function() {
|
|
1045
1046
|
return this.data.length;
|
|
1046
1047
|
}, o.prototype.getBitsLength = function() {
|
|
1047
1048
|
return o.getBitsLength(this.data.length);
|
|
1048
1049
|
}, o.prototype.write = function(i) {
|
|
1049
|
-
let
|
|
1050
|
-
for (
|
|
1051
|
-
let s = t.toSJIS(this.data[
|
|
1050
|
+
let e;
|
|
1051
|
+
for (e = 0; e < this.data.length; e++) {
|
|
1052
|
+
let s = t.toSJIS(this.data[e]);
|
|
1052
1053
|
if (s >= 33088 && s <= 40956)
|
|
1053
1054
|
s -= 33088;
|
|
1054
1055
|
else if (s >= 57408 && s <= 60351)
|
|
1055
1056
|
s -= 49472;
|
|
1056
1057
|
else
|
|
1057
1058
|
throw new Error(
|
|
1058
|
-
"Invalid SJIS character: " + this.data[
|
|
1059
|
+
"Invalid SJIS character: " + this.data[e] + `
|
|
1059
1060
|
Make sure your charset is UTF-8`
|
|
1060
1061
|
);
|
|
1061
1062
|
s = (s >>> 8 & 255) * 192 + (s & 255), i.put(s, 13);
|
|
@@ -1063,10 +1064,10 @@ Make sure your charset is UTF-8`
|
|
|
1063
1064
|
}, Mt = o, Mt;
|
|
1064
1065
|
}
|
|
1065
1066
|
var It = { exports: {} }, we;
|
|
1066
|
-
function
|
|
1067
|
-
return we || (we = 1, function(
|
|
1067
|
+
function un() {
|
|
1068
|
+
return we || (we = 1, function(n) {
|
|
1068
1069
|
var t = {
|
|
1069
|
-
single_source_shortest_paths: function(o, i,
|
|
1070
|
+
single_source_shortest_paths: function(o, i, e) {
|
|
1070
1071
|
var s = {}, r = {};
|
|
1071
1072
|
r[i] = 0;
|
|
1072
1073
|
var a = t.PriorityQueue.make();
|
|
@@ -1076,22 +1077,22 @@ function cn() {
|
|
|
1076
1077
|
for (c in f)
|
|
1077
1078
|
f.hasOwnProperty(c) && (d = f[c], p = h + d, g = r[c], A = typeof r[c] > "u", (A || g > p) && (r[c] = p, a.push(c, p), s[c] = u));
|
|
1078
1079
|
}
|
|
1079
|
-
if (typeof
|
|
1080
|
-
var x = ["Could not find a path from ", i, " to ",
|
|
1080
|
+
if (typeof e < "u" && typeof r[e] > "u") {
|
|
1081
|
+
var x = ["Could not find a path from ", i, " to ", e, "."].join("");
|
|
1081
1082
|
throw new Error(x);
|
|
1082
1083
|
}
|
|
1083
1084
|
return s;
|
|
1084
1085
|
},
|
|
1085
1086
|
extract_shortest_path_from_predecessor_list: function(o, i) {
|
|
1086
|
-
for (var
|
|
1087
|
-
|
|
1088
|
-
return
|
|
1087
|
+
for (var e = [], s = i; s; )
|
|
1088
|
+
e.push(s), o[s], s = o[s];
|
|
1089
|
+
return e.reverse(), e;
|
|
1089
1090
|
},
|
|
1090
|
-
find_path: function(o, i,
|
|
1091
|
-
var s = t.single_source_shortest_paths(o, i,
|
|
1091
|
+
find_path: function(o, i, e) {
|
|
1092
|
+
var s = t.single_source_shortest_paths(o, i, e);
|
|
1092
1093
|
return t.extract_shortest_path_from_predecessor_list(
|
|
1093
1094
|
s,
|
|
1094
|
-
|
|
1095
|
+
e
|
|
1095
1096
|
);
|
|
1096
1097
|
},
|
|
1097
1098
|
/**
|
|
@@ -1099,11 +1100,11 @@ function cn() {
|
|
|
1099
1100
|
*/
|
|
1100
1101
|
PriorityQueue: {
|
|
1101
1102
|
make: function(o) {
|
|
1102
|
-
var i = t.PriorityQueue,
|
|
1103
|
+
var i = t.PriorityQueue, e = {}, s;
|
|
1103
1104
|
o = o || {};
|
|
1104
1105
|
for (s in i)
|
|
1105
|
-
i.hasOwnProperty(s) && (
|
|
1106
|
-
return
|
|
1106
|
+
i.hasOwnProperty(s) && (e[s] = i[s]);
|
|
1107
|
+
return e.queue = [], e.sorter = o.sorter || i.default_sorter, e;
|
|
1107
1108
|
},
|
|
1108
1109
|
default_sorter: function(o, i) {
|
|
1109
1110
|
return o.cost - i.cost;
|
|
@@ -1113,8 +1114,8 @@ function cn() {
|
|
|
1113
1114
|
* is at the front of the queue.
|
|
1114
1115
|
*/
|
|
1115
1116
|
push: function(o, i) {
|
|
1116
|
-
var
|
|
1117
|
-
this.queue.push(
|
|
1117
|
+
var e = { value: o, cost: i };
|
|
1118
|
+
this.queue.push(e), this.queue.sort(this.sorter);
|
|
1118
1119
|
},
|
|
1119
1120
|
/**
|
|
1120
1121
|
* Return the highest priority element in the queue.
|
|
@@ -1127,13 +1128,13 @@ function cn() {
|
|
|
1127
1128
|
}
|
|
1128
1129
|
}
|
|
1129
1130
|
};
|
|
1130
|
-
|
|
1131
|
+
n.exports = t;
|
|
1131
1132
|
}(It)), It.exports;
|
|
1132
1133
|
}
|
|
1133
1134
|
var ye;
|
|
1134
|
-
function
|
|
1135
|
-
return ye || (ye = 1, function(
|
|
1136
|
-
const t = H(), o =
|
|
1135
|
+
function dn() {
|
|
1136
|
+
return ye || (ye = 1, function(n) {
|
|
1137
|
+
const t = H(), o = on(), i = rn(), e = ln(), s = cn(), r = Me(), a = W(), l = un();
|
|
1137
1138
|
function u(x) {
|
|
1138
1139
|
return unescape(encodeURIComponent(x)).length;
|
|
1139
1140
|
}
|
|
@@ -1171,7 +1172,7 @@ function un() {
|
|
|
1171
1172
|
case t.KANJI:
|
|
1172
1173
|
return s.getBitsLength(x);
|
|
1173
1174
|
case t.BYTE:
|
|
1174
|
-
return
|
|
1175
|
+
return e.getBitsLength(x);
|
|
1175
1176
|
}
|
|
1176
1177
|
}
|
|
1177
1178
|
function d(x) {
|
|
@@ -1245,30 +1246,30 @@ function un() {
|
|
|
1245
1246
|
case t.KANJI:
|
|
1246
1247
|
return new s(x);
|
|
1247
1248
|
case t.BYTE:
|
|
1248
|
-
return new
|
|
1249
|
+
return new e(x);
|
|
1249
1250
|
}
|
|
1250
1251
|
}
|
|
1251
|
-
|
|
1252
|
+
n.fromArray = function(T) {
|
|
1252
1253
|
return T.reduce(function(E, k) {
|
|
1253
1254
|
return typeof k == "string" ? E.push(A(k, null)) : k.data && E.push(A(k.data, k.mode)), E;
|
|
1254
1255
|
}, []);
|
|
1255
|
-
},
|
|
1256
|
+
}, n.fromString = function(T, E) {
|
|
1256
1257
|
const k = h(T, a.isKanjiModeEnabled()), F = p(k), w = g(F, E), b = l.find_path(w.map, "start", "end"), C = [];
|
|
1257
1258
|
for (let m = 1; m < b.length - 1; m++)
|
|
1258
1259
|
C.push(w.table[b[m]].node);
|
|
1259
|
-
return
|
|
1260
|
-
},
|
|
1261
|
-
return
|
|
1260
|
+
return n.fromArray(d(C));
|
|
1261
|
+
}, n.rawSplit = function(T) {
|
|
1262
|
+
return n.fromArray(
|
|
1262
1263
|
h(T, a.isKanjiModeEnabled())
|
|
1263
1264
|
);
|
|
1264
1265
|
};
|
|
1265
1266
|
}(Pt)), Pt;
|
|
1266
1267
|
}
|
|
1267
1268
|
var ve;
|
|
1268
|
-
function
|
|
1269
|
+
function hn() {
|
|
1269
1270
|
if (ve) return dt;
|
|
1270
1271
|
ve = 1;
|
|
1271
|
-
const
|
|
1272
|
+
const n = W(), t = qt(), o = Ge(), i = Ke(), e = Je(), s = Xe(), r = Qe(), a = Se(), l = en(), u = nn(), c = sn(), h = H(), f = dn();
|
|
1272
1273
|
function d(w, b) {
|
|
1273
1274
|
const C = w.size, m = s.getPositions(b);
|
|
1274
1275
|
for (let S = 0; S < m.length; S++) {
|
|
@@ -1287,7 +1288,7 @@ function dn() {
|
|
|
1287
1288
|
}
|
|
1288
1289
|
}
|
|
1289
1290
|
function g(w, b) {
|
|
1290
|
-
const C =
|
|
1291
|
+
const C = e.getPositions(b);
|
|
1291
1292
|
for (let m = 0; m < C.length; m++) {
|
|
1292
1293
|
const S = C[m][0], v = C[m][1];
|
|
1293
1294
|
for (let P = -2; P <= 2; P++)
|
|
@@ -1329,7 +1330,7 @@ function dn() {
|
|
|
1329
1330
|
C.forEach(function(M) {
|
|
1330
1331
|
m.put(M.mode.bit, 4), m.put(M.getLength(), h.getCharCountIndicator(M.mode, w)), M.write(m);
|
|
1331
1332
|
});
|
|
1332
|
-
const S =
|
|
1333
|
+
const S = n.getSymbolTotalCodewords(w), v = a.getTotalCodewordsCount(w, b), P = (S - v) * 8;
|
|
1333
1334
|
for (m.getLengthInBits() + 4 <= P && m.put(0, 4); m.getLengthInBits() % 8 !== 0; )
|
|
1334
1335
|
m.putBit(0);
|
|
1335
1336
|
const _ = (P - m.getLengthInBits()) / 8;
|
|
@@ -1338,7 +1339,7 @@ function dn() {
|
|
|
1338
1339
|
return k(m, w, b);
|
|
1339
1340
|
}
|
|
1340
1341
|
function k(w, b, C) {
|
|
1341
|
-
const m =
|
|
1342
|
+
const m = n.getSymbolTotalCodewords(b), S = a.getTotalCodewordsCount(b, C), v = m - S, P = a.getBlocksCount(b, C), _ = m % P, M = P - _, j = Math.floor(m / P), J = Math.floor(v / P), Ae = J + 1, zt = j - J, Be = new l(zt);
|
|
1342
1343
|
let st = 0;
|
|
1343
1344
|
const et = new Array(P), jt = new Array(P);
|
|
1344
1345
|
let ot = 0;
|
|
@@ -1382,7 +1383,7 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
1382
1383
|
Minimum version required to store current data is: ` + v + `.
|
|
1383
1384
|
`
|
|
1384
1385
|
);
|
|
1385
|
-
const P = E(b, C, S), _ =
|
|
1386
|
+
const P = E(b, C, S), _ = n.getSymbolSize(b), M = new i(_);
|
|
1386
1387
|
return d(M, b), p(M), g(M, b), x(M, C, 0), b >= 7 && A(M, b), T(M, P), isNaN(m) && (m = r.getBestMask(
|
|
1387
1388
|
M,
|
|
1388
1389
|
x.bind(null, M, C)
|
|
@@ -1398,12 +1399,12 @@ Minimum version required to store current data is: ` + v + `.
|
|
|
1398
1399
|
if (typeof b > "u" || b === "")
|
|
1399
1400
|
throw new Error("No input text");
|
|
1400
1401
|
let m = t.M, S, v;
|
|
1401
|
-
return typeof C < "u" && (m = t.from(C.errorCorrectionLevel, t.M), S = u.from(C.version), v = r.from(C.maskPattern), C.toSJISFunc &&
|
|
1402
|
+
return typeof C < "u" && (m = t.from(C.errorCorrectionLevel, t.M), S = u.from(C.version), v = r.from(C.maskPattern), C.toSJISFunc && n.setToSJISFunction(C.toSJISFunc)), F(b, S, m, v);
|
|
1402
1403
|
}, dt;
|
|
1403
1404
|
}
|
|
1404
1405
|
var At = {}, Bt = {}, _e;
|
|
1405
1406
|
function Ie() {
|
|
1406
|
-
return _e || (_e = 1, function(
|
|
1407
|
+
return _e || (_e = 1, function(n) {
|
|
1407
1408
|
function t(o) {
|
|
1408
1409
|
if (typeof o == "number" && (o = o.toString()), typeof o != "string")
|
|
1409
1410
|
throw new Error("Color should be defined as hex string");
|
|
@@ -1413,22 +1414,22 @@ function Ie() {
|
|
|
1413
1414
|
(i.length === 3 || i.length === 4) && (i = Array.prototype.concat.apply([], i.map(function(s) {
|
|
1414
1415
|
return [s, s];
|
|
1415
1416
|
}))), i.length === 6 && i.push("F", "F");
|
|
1416
|
-
const
|
|
1417
|
+
const e = parseInt(i.join(""), 16);
|
|
1417
1418
|
return {
|
|
1418
|
-
r:
|
|
1419
|
-
g:
|
|
1420
|
-
b:
|
|
1421
|
-
a:
|
|
1419
|
+
r: e >> 24 & 255,
|
|
1420
|
+
g: e >> 16 & 255,
|
|
1421
|
+
b: e >> 8 & 255,
|
|
1422
|
+
a: e & 255,
|
|
1422
1423
|
hex: "#" + i.slice(0, 6).join("")
|
|
1423
1424
|
};
|
|
1424
1425
|
}
|
|
1425
|
-
|
|
1426
|
+
n.getOptions = function(i) {
|
|
1426
1427
|
i || (i = {}), i.color || (i.color = {});
|
|
1427
|
-
const
|
|
1428
|
+
const e = typeof i.margin > "u" || i.margin === null || i.margin < 0 ? 4 : i.margin, s = i.width && i.width >= 21 ? i.width : void 0, r = i.scale || 4;
|
|
1428
1429
|
return {
|
|
1429
1430
|
width: s,
|
|
1430
1431
|
scale: s ? 4 : r,
|
|
1431
|
-
margin:
|
|
1432
|
+
margin: e,
|
|
1432
1433
|
color: {
|
|
1433
1434
|
dark: t(i.color.dark || "#000000ff"),
|
|
1434
1435
|
light: t(i.color.light || "#ffffffff")
|
|
@@ -1436,13 +1437,13 @@ function Ie() {
|
|
|
1436
1437
|
type: i.type,
|
|
1437
1438
|
rendererOpts: i.rendererOpts || {}
|
|
1438
1439
|
};
|
|
1439
|
-
},
|
|
1440
|
-
return
|
|
1441
|
-
},
|
|
1442
|
-
const s =
|
|
1443
|
-
return Math.floor((i +
|
|
1444
|
-
},
|
|
1445
|
-
const r =
|
|
1440
|
+
}, n.getScale = function(i, e) {
|
|
1441
|
+
return e.width && e.width >= i + e.margin * 2 ? e.width / (i + e.margin * 2) : e.scale;
|
|
1442
|
+
}, n.getImageWidth = function(i, e) {
|
|
1443
|
+
const s = n.getScale(i, e);
|
|
1444
|
+
return Math.floor((i + e.margin * 2) * s);
|
|
1445
|
+
}, n.qrToImageData = function(i, e, s) {
|
|
1446
|
+
const r = e.modules.size, a = e.modules.data, l = n.getScale(r, s), u = Math.floor((r + s.margin * 2) * l), c = s.margin * l, h = [s.color.light, s.color.dark];
|
|
1446
1447
|
for (let f = 0; f < u; f++)
|
|
1447
1448
|
for (let d = 0; d < u; d++) {
|
|
1448
1449
|
let p = (f * u + d) * 4, g = s.color.light;
|
|
@@ -1456,11 +1457,11 @@ function Ie() {
|
|
|
1456
1457
|
}(Bt)), Bt;
|
|
1457
1458
|
}
|
|
1458
1459
|
var Ce;
|
|
1459
|
-
function
|
|
1460
|
-
return Ce || (Ce = 1, function(
|
|
1460
|
+
function fn() {
|
|
1461
|
+
return Ce || (Ce = 1, function(n) {
|
|
1461
1462
|
const t = Ie();
|
|
1462
|
-
function o(
|
|
1463
|
-
|
|
1463
|
+
function o(e, s, r) {
|
|
1464
|
+
e.clearRect(0, 0, s.width, s.height), s.style || (s.style = {}), s.height = r, s.width = r, s.style.height = r + "px", s.style.width = r + "px";
|
|
1464
1465
|
}
|
|
1465
1466
|
function i() {
|
|
1466
1467
|
try {
|
|
@@ -1469,54 +1470,54 @@ function hn() {
|
|
|
1469
1470
|
throw new Error("You need to specify a canvas element");
|
|
1470
1471
|
}
|
|
1471
1472
|
}
|
|
1472
|
-
|
|
1473
|
+
n.render = function(s, r, a) {
|
|
1473
1474
|
let l = a, u = r;
|
|
1474
1475
|
typeof l > "u" && (!r || !r.getContext) && (l = r, r = void 0), r || (u = i()), l = t.getOptions(l);
|
|
1475
1476
|
const c = t.getImageWidth(s.modules.size, l), h = u.getContext("2d"), f = h.createImageData(c, c);
|
|
1476
1477
|
return t.qrToImageData(f.data, s, l), o(h, u, c), h.putImageData(f, 0, 0), u;
|
|
1477
|
-
},
|
|
1478
|
+
}, n.renderToDataURL = function(s, r, a) {
|
|
1478
1479
|
let l = a;
|
|
1479
1480
|
typeof l > "u" && (!r || !r.getContext) && (l = r, r = void 0), l || (l = {});
|
|
1480
|
-
const u =
|
|
1481
|
+
const u = n.render(s, r, l), c = l.type || "image/png", h = l.rendererOpts || {};
|
|
1481
1482
|
return u.toDataURL(c, h.quality);
|
|
1482
1483
|
};
|
|
1483
1484
|
}(At)), At;
|
|
1484
1485
|
}
|
|
1485
1486
|
var Dt = {}, xe;
|
|
1486
|
-
function
|
|
1487
|
+
function gn() {
|
|
1487
1488
|
if (xe) return Dt;
|
|
1488
1489
|
xe = 1;
|
|
1489
|
-
const
|
|
1490
|
-
function t(
|
|
1491
|
-
const r =
|
|
1490
|
+
const n = Ie();
|
|
1491
|
+
function t(e, s) {
|
|
1492
|
+
const r = e.a / 255, a = s + '="' + e.hex + '"';
|
|
1492
1493
|
return r < 1 ? a + " " + s + '-opacity="' + r.toFixed(2).slice(1) + '"' : a;
|
|
1493
1494
|
}
|
|
1494
|
-
function o(
|
|
1495
|
-
let a =
|
|
1495
|
+
function o(e, s, r) {
|
|
1496
|
+
let a = e + s;
|
|
1496
1497
|
return typeof r < "u" && (a += " " + r), a;
|
|
1497
1498
|
}
|
|
1498
|
-
function i(
|
|
1499
|
+
function i(e, s, r) {
|
|
1499
1500
|
let a = "", l = 0, u = !1, c = 0;
|
|
1500
|
-
for (let h = 0; h <
|
|
1501
|
+
for (let h = 0; h < e.length; h++) {
|
|
1501
1502
|
const f = Math.floor(h % s), d = Math.floor(h / s);
|
|
1502
|
-
!f && !u && (u = !0),
|
|
1503
|
+
!f && !u && (u = !0), e[h] ? (c++, h > 0 && f > 0 && e[h - 1] || (a += u ? o("M", f + r, 0.5 + d + r) : o("m", l, 0), l = 0, u = !1), f + 1 < s && e[h + 1] || (a += o("h", c), c = 0)) : l++;
|
|
1503
1504
|
}
|
|
1504
1505
|
return a;
|
|
1505
1506
|
}
|
|
1506
1507
|
return Dt.render = function(s, r, a) {
|
|
1507
|
-
const l =
|
|
1508
|
+
const l = n.getOptions(r), u = s.modules.size, c = s.modules.data, h = u + l.margin * 2, f = l.color.light.a ? "<path " + t(l.color.light, "fill") + ' d="M0 0h' + h + "v" + h + 'H0z"/>' : "", d = "<path " + t(l.color.dark, "stroke") + ' d="' + i(c, u, l.margin) + '"/>', p = 'viewBox="0 0 ' + h + " " + h + '"', A = '<svg xmlns="http://www.w3.org/2000/svg" ' + (l.width ? 'width="' + l.width + '" height="' + l.width + '" ' : "") + p + ' shape-rendering="crispEdges">' + f + d + `</svg>
|
|
1508
1509
|
`;
|
|
1509
1510
|
return typeof a == "function" && a(null, A), A;
|
|
1510
1511
|
}, Dt;
|
|
1511
1512
|
}
|
|
1512
1513
|
var be;
|
|
1513
|
-
function
|
|
1514
|
+
function mn() {
|
|
1514
1515
|
if (be) return G;
|
|
1515
1516
|
be = 1;
|
|
1516
|
-
const
|
|
1517
|
-
function
|
|
1517
|
+
const n = Ye(), t = hn(), o = fn(), i = gn();
|
|
1518
|
+
function e(s, r, a, l, u) {
|
|
1518
1519
|
const c = [].slice.call(arguments, 1), h = c.length, f = typeof c[h - 1] == "function";
|
|
1519
|
-
if (!f && !
|
|
1520
|
+
if (!f && !n())
|
|
1520
1521
|
throw new Error("Callback required as last argument");
|
|
1521
1522
|
if (f) {
|
|
1522
1523
|
if (h < 2)
|
|
@@ -1541,14 +1542,14 @@ function gn() {
|
|
|
1541
1542
|
u(d);
|
|
1542
1543
|
}
|
|
1543
1544
|
}
|
|
1544
|
-
return G.create = t.create, G.toCanvas =
|
|
1545
|
+
return G.create = t.create, G.toCanvas = e.bind(null, o.render), G.toDataURL = e.bind(null, o.renderToDataURL), G.toString = e.bind(null, function(s, r, a) {
|
|
1545
1546
|
return i.render(s, a);
|
|
1546
1547
|
}), G;
|
|
1547
1548
|
}
|
|
1548
|
-
var Rt =
|
|
1549
|
+
var Rt = mn();
|
|
1549
1550
|
/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */
|
|
1550
1551
|
const Pe = "ready";
|
|
1551
|
-
var
|
|
1552
|
+
var pn = Re({
|
|
1552
1553
|
name: "VueQrcode",
|
|
1553
1554
|
props: {
|
|
1554
1555
|
/**
|
|
@@ -1595,30 +1596,30 @@ var mn = Re({
|
|
|
1595
1596
|
* Generate QR code.
|
|
1596
1597
|
*/
|
|
1597
1598
|
generate() {
|
|
1598
|
-
const
|
|
1599
|
+
const n = this.options || {}, t = String(this.value), o = () => {
|
|
1599
1600
|
this.$emit(Pe, this.$el);
|
|
1600
1601
|
};
|
|
1601
1602
|
switch (this.tag) {
|
|
1602
1603
|
case "canvas":
|
|
1603
|
-
Rt.toCanvas(this.$el, t,
|
|
1604
|
+
Rt.toCanvas(this.$el, t, n, (i) => {
|
|
1604
1605
|
if (i)
|
|
1605
1606
|
throw i;
|
|
1606
1607
|
o();
|
|
1607
1608
|
});
|
|
1608
1609
|
break;
|
|
1609
1610
|
case "img":
|
|
1610
|
-
Rt.toDataURL(t,
|
|
1611
|
+
Rt.toDataURL(t, n, (i, e) => {
|
|
1611
1612
|
if (i)
|
|
1612
1613
|
throw i;
|
|
1613
|
-
this.$el.src =
|
|
1614
|
+
this.$el.src = e, this.$el.onload = o;
|
|
1614
1615
|
});
|
|
1615
1616
|
break;
|
|
1616
1617
|
case "svg":
|
|
1617
|
-
Rt.toString(t,
|
|
1618
|
+
Rt.toString(t, n, (i, e) => {
|
|
1618
1619
|
if (i)
|
|
1619
1620
|
throw i;
|
|
1620
1621
|
const s = document.createElement("div");
|
|
1621
|
-
s.innerHTML =
|
|
1622
|
+
s.innerHTML = e;
|
|
1622
1623
|
const r = s.querySelector("svg");
|
|
1623
1624
|
if (r) {
|
|
1624
1625
|
const { attributes: a, childNodes: l } = r;
|
|
@@ -1639,16 +1640,16 @@ var mn = Re({
|
|
|
1639
1640
|
return $t(this.tag, this.$slots.default);
|
|
1640
1641
|
}
|
|
1641
1642
|
});
|
|
1642
|
-
class
|
|
1643
|
+
class wn {
|
|
1643
1644
|
constructor() {
|
|
1644
1645
|
this._activePolls = {}, this._pollingInterval = 1e3;
|
|
1645
1646
|
}
|
|
1646
1647
|
_startPolling(t) {
|
|
1647
|
-
const { handler: o, interval: i } = this._activePolls[t],
|
|
1648
|
+
const { handler: o, interval: i } = this._activePolls[t], e = async () => {
|
|
1648
1649
|
var s;
|
|
1649
|
-
await o(), (s = this._activePolls[t]) != null && s.pollActive && setTimeout(
|
|
1650
|
+
await o(), (s = this._activePolls[t]) != null && s.pollActive && setTimeout(e, i || this._pollingInterval);
|
|
1650
1651
|
};
|
|
1651
|
-
|
|
1652
|
+
e();
|
|
1652
1653
|
}
|
|
1653
1654
|
/**
|
|
1654
1655
|
* Add a new poll to the active polls list.
|
|
@@ -1664,7 +1665,7 @@ class pn {
|
|
|
1664
1665
|
id: t,
|
|
1665
1666
|
handler: o,
|
|
1666
1667
|
interval: i,
|
|
1667
|
-
removeAfterMs:
|
|
1668
|
+
removeAfterMs: e = 0,
|
|
1668
1669
|
startImmediately: s = !0,
|
|
1669
1670
|
data: r
|
|
1670
1671
|
}) {
|
|
@@ -1674,9 +1675,9 @@ class pn {
|
|
|
1674
1675
|
throw new Error("Poll with the same ID already exists");
|
|
1675
1676
|
return this._activePolls[t] = { handler: o, interval: i, pollActive: !1, data: r }, s && setTimeout(() => {
|
|
1676
1677
|
this.activatePoll(t);
|
|
1677
|
-
}, 0),
|
|
1678
|
+
}, 0), e && setTimeout(() => {
|
|
1678
1679
|
this._activePolls[t] && this.removePoll(t);
|
|
1679
|
-
},
|
|
1680
|
+
}, e), () => this.removePoll(t);
|
|
1680
1681
|
}
|
|
1681
1682
|
activatePoll(t) {
|
|
1682
1683
|
if (!this._activePolls[t])
|
|
@@ -1700,18 +1701,18 @@ class pn {
|
|
|
1700
1701
|
}
|
|
1701
1702
|
let Ft = null;
|
|
1702
1703
|
function Ee() {
|
|
1703
|
-
return Ft || (Ft = new
|
|
1704
|
+
return Ft || (Ft = new wn()), Ft;
|
|
1704
1705
|
}
|
|
1705
|
-
function
|
|
1706
|
+
function yn(n) {
|
|
1706
1707
|
window.history.replaceState(window.history.state, "", window.location.href);
|
|
1707
1708
|
let t = "";
|
|
1708
1709
|
const o = (navigator == null ? void 0 : navigator.userAgent) || "";
|
|
1709
|
-
return o.match("CriOS") ? t = "googlechromes://" : o.match("FxiOS") ? t = "firefox://" : o.match("EdgiOS") ? t = "microsoft-edge-https://" : o.match("GSA") && (t = "googleapp://open-url?url="), t + encodeURIComponent(`${window.location.href}#${
|
|
1710
|
+
return o.match("CriOS") ? t = "googlechromes://" : o.match("FxiOS") ? t = "firefox://" : o.match("EdgiOS") ? t = "microsoft-edge-https://" : o.match("GSA") && (t = "googleapp://open-url?url="), t + encodeURIComponent(`${window.location.href}#${n}`);
|
|
1710
1711
|
}
|
|
1711
|
-
const
|
|
1712
|
+
const vn = {
|
|
1712
1713
|
name: "BankIdAnswer",
|
|
1713
1714
|
components: {
|
|
1714
|
-
QrCode:
|
|
1715
|
+
QrCode: pn
|
|
1715
1716
|
},
|
|
1716
1717
|
emits: ["loading", "error", "complete"],
|
|
1717
1718
|
mixins: [Z([])],
|
|
@@ -1734,42 +1735,42 @@ const yn = {
|
|
|
1734
1735
|
},
|
|
1735
1736
|
computed: {
|
|
1736
1737
|
viewText() {
|
|
1737
|
-
const
|
|
1738
|
+
const n = (t) => this._document.$t(`answerModal.bankId.component.viewText.${t}`);
|
|
1738
1739
|
return {
|
|
1739
1740
|
new: {
|
|
1740
|
-
title:
|
|
1741
|
-
text:
|
|
1742
|
-
spinnerText:
|
|
1741
|
+
title: n("new.title"),
|
|
1742
|
+
text: n("new.text"),
|
|
1743
|
+
spinnerText: n("new.spinnerText")
|
|
1743
1744
|
},
|
|
1744
1745
|
waiting: {
|
|
1745
|
-
title:
|
|
1746
|
-
text:
|
|
1747
|
-
spinnerText:
|
|
1746
|
+
title: n("waiting.title"),
|
|
1747
|
+
text: n("waiting.text"),
|
|
1748
|
+
spinnerText: n("waiting.spinnerText")
|
|
1748
1749
|
},
|
|
1749
1750
|
started: {
|
|
1750
|
-
title:
|
|
1751
|
-
text:
|
|
1752
|
-
spinnerText:
|
|
1751
|
+
title: n("waiting.title"),
|
|
1752
|
+
text: n("waiting.text"),
|
|
1753
|
+
spinnerText: n("waiting.spinnerText")
|
|
1753
1754
|
},
|
|
1754
1755
|
signing: {
|
|
1755
|
-
title:
|
|
1756
|
-
text:
|
|
1757
|
-
spinnerText:
|
|
1756
|
+
title: n("signing.title"),
|
|
1757
|
+
text: n("signing.text"),
|
|
1758
|
+
spinnerText: n("signing.spinnerText")
|
|
1758
1759
|
},
|
|
1759
1760
|
error: {
|
|
1760
|
-
title:
|
|
1761
|
-
text:
|
|
1761
|
+
title: n("error.title"),
|
|
1762
|
+
text: n("error.text")
|
|
1762
1763
|
},
|
|
1763
1764
|
canceled: {
|
|
1764
|
-
title:
|
|
1765
|
-
text:
|
|
1765
|
+
title: n("canceled.title"),
|
|
1766
|
+
text: n("canceled.text")
|
|
1766
1767
|
}
|
|
1767
1768
|
};
|
|
1768
1769
|
}
|
|
1769
1770
|
},
|
|
1770
1771
|
watch: {
|
|
1771
|
-
isLoading(
|
|
1772
|
-
this.$emit("loading",
|
|
1772
|
+
isLoading(n) {
|
|
1773
|
+
this.$emit("loading", n);
|
|
1773
1774
|
}
|
|
1774
1775
|
},
|
|
1775
1776
|
created() {
|
|
@@ -1778,13 +1779,13 @@ const yn = {
|
|
|
1778
1779
|
methods: {
|
|
1779
1780
|
tryResumeSigningSession() {
|
|
1780
1781
|
var o, i;
|
|
1781
|
-
const
|
|
1782
|
-
(
|
|
1782
|
+
const n = Ee(), t = Object.keys(n._activePolls).find(
|
|
1783
|
+
(e) => e.includes("bankId-")
|
|
1783
1784
|
);
|
|
1784
1785
|
try {
|
|
1785
1786
|
if (t) {
|
|
1786
|
-
const { signAnswerId:
|
|
1787
|
-
this.signAnswerId =
|
|
1787
|
+
const { signAnswerId: e, autoStartToken: s, qrCode: r } = ((o = n._activePolls[t]) == null ? void 0 : o.data) || {};
|
|
1788
|
+
this.signAnswerId = e, this.autoStartToken = s, this.qrCode = r, n.removePoll(t), (i = window.location) != null && i.hash && window.history.replaceState(
|
|
1788
1789
|
window.history.state,
|
|
1789
1790
|
"",
|
|
1790
1791
|
window.location.pathname
|
|
@@ -1798,10 +1799,10 @@ const yn = {
|
|
|
1798
1799
|
Wt("error", s);
|
|
1799
1800
|
}
|
|
1800
1801
|
},
|
|
1801
|
-
async submit({ answer:
|
|
1802
|
+
async submit({ answer: n }) {
|
|
1802
1803
|
try {
|
|
1803
1804
|
this.isLoading = !0;
|
|
1804
|
-
const { id: t, autoStartToken: o, qrCodeData: i } = await
|
|
1805
|
+
const { id: t, autoStartToken: o, qrCodeData: i } = await n({
|
|
1805
1806
|
body: { isAccepted: !0 }
|
|
1806
1807
|
});
|
|
1807
1808
|
o && (this.autoStartToken = o), i && (this.qrCode = i), this.signAnswerId = t, this.startPolling(), this.isMobile && this.triggerAutoStart();
|
|
@@ -1812,20 +1813,20 @@ const yn = {
|
|
|
1812
1813
|
},
|
|
1813
1814
|
async startPolling() {
|
|
1814
1815
|
if (!this.signAnswerId) throw Error("Missing signAnswerId");
|
|
1815
|
-
const
|
|
1816
|
+
const n = Ee(), t = `bankId-${this.signAnswerId}`, o = async () => {
|
|
1816
1817
|
if (!this.signAnswerId) throw Error("Missing signAnswerId");
|
|
1817
1818
|
const i = () => {
|
|
1818
|
-
this.clearSignState(),
|
|
1819
|
+
this.clearSignState(), n.removePoll(t);
|
|
1819
1820
|
};
|
|
1820
1821
|
try {
|
|
1821
|
-
const { data:
|
|
1822
|
-
|
|
1823
|
-
} catch (
|
|
1824
|
-
this.onError(
|
|
1822
|
+
const { data: e } = await Le.get(this.signAnswerId);
|
|
1823
|
+
e.qrCodeData && (this.qrCode = e.qrCodeData), ["completed", "canceled"].includes(e.status) && i(), e.status === "completed" ? this.onComplete() : e.status === "canceled" ? this.onCanceled() : this.view = e.status;
|
|
1824
|
+
} catch (e) {
|
|
1825
|
+
this.onError(e), i();
|
|
1825
1826
|
}
|
|
1826
1827
|
};
|
|
1827
1828
|
try {
|
|
1828
|
-
|
|
1829
|
+
n.addPoll({
|
|
1829
1830
|
id: t,
|
|
1830
1831
|
handler: o,
|
|
1831
1832
|
interval: 1e3,
|
|
@@ -1837,10 +1838,10 @@ const yn = {
|
|
|
1837
1838
|
});
|
|
1838
1839
|
} catch {
|
|
1839
1840
|
this.clearSignState();
|
|
1840
|
-
const
|
|
1841
|
+
const e = this._document.$t(
|
|
1841
1842
|
"answerModal.bankId.component.viewText.error.text"
|
|
1842
1843
|
);
|
|
1843
|
-
Wt("error",
|
|
1844
|
+
Wt("error", e);
|
|
1844
1845
|
}
|
|
1845
1846
|
},
|
|
1846
1847
|
clearSignState() {
|
|
@@ -1854,11 +1855,11 @@ const yn = {
|
|
|
1854
1855
|
"answerModal.bankId.component.signingInterrupted"
|
|
1855
1856
|
);
|
|
1856
1857
|
},
|
|
1857
|
-
onError(
|
|
1858
|
+
onError(n) {
|
|
1858
1859
|
var o, i;
|
|
1859
|
-
if (
|
|
1860
|
+
if (n.httpStatusCode === 409) throw n;
|
|
1860
1861
|
this.$emit("error"), this.view = "error";
|
|
1861
|
-
const t = (i = (o =
|
|
1862
|
+
const t = (i = (o = n.response) == null ? void 0 : o.data) == null ? void 0 : i.errorCode;
|
|
1862
1863
|
switch (t) {
|
|
1863
1864
|
case 9001:
|
|
1864
1865
|
// Signing already in progress
|
|
@@ -1873,59 +1874,59 @@ const yn = {
|
|
|
1873
1874
|
case 9006:
|
|
1874
1875
|
// Signing start fail
|
|
1875
1876
|
case 9007:
|
|
1876
|
-
Fe.warn(
|
|
1877
|
+
Fe.warn(n);
|
|
1877
1878
|
break;
|
|
1878
1879
|
case 9009:
|
|
1879
1880
|
this.$emit("complete");
|
|
1880
1881
|
break;
|
|
1881
1882
|
default:
|
|
1882
|
-
Lt(
|
|
1883
|
+
Lt(n, { showMessage: !1 });
|
|
1883
1884
|
}
|
|
1884
1885
|
this.errorMessage = this.$i18n.te(`errors:${t}`) && this._document.$t(`answerModal.bankId.component.errors.${t}`) || this._document.$t("answerModal.bankId.component.defaultError");
|
|
1885
1886
|
},
|
|
1886
1887
|
triggerAutoStart() {
|
|
1887
1888
|
if (!this.autoStartToken) return;
|
|
1888
|
-
let
|
|
1889
|
+
let n = "bankid://", t = "null";
|
|
1889
1890
|
if (this.isMobile) {
|
|
1890
|
-
const i = Ne(),
|
|
1891
|
-
(s || r) && (
|
|
1891
|
+
const i = Ne(), e = (navigator == null ? void 0 : navigator.userAgent) || (navigator == null ? void 0 : navigator.vendor) || (window == null ? void 0 : window.opera), s = i === "iOS" && (/Version\/[\d.]+.*Safari/.test(e) || /GSA/.test(e)), r = i === "Android" && /Version\/[\d.]+.*Chrome/.test(e);
|
|
1892
|
+
(s || r) && (n = "https://app.bankid.com"), i === "iOS" && ke.value !== "widget" && (t = yn(this.signAnswerId));
|
|
1892
1893
|
}
|
|
1893
|
-
const o = `${
|
|
1894
|
+
const o = `${n}/?autostarttoken=${this.autoStartToken}&redirect=${t}`;
|
|
1894
1895
|
this.isMobile ? document.location = o : this.$refs.autoStartFrame.src = o;
|
|
1895
1896
|
}
|
|
1896
1897
|
}
|
|
1897
|
-
},
|
|
1898
|
+
}, _n = { class: "-my-4 flex flex-col items-center" }, Cn = {
|
|
1898
1899
|
ref: "autoStartFrame",
|
|
1899
1900
|
height: "0",
|
|
1900
1901
|
width: "0",
|
|
1901
1902
|
class: "hidden"
|
|
1902
|
-
},
|
|
1903
|
+
}, xn = {
|
|
1903
1904
|
key: 0,
|
|
1904
1905
|
class: "flex h-[250px] w-[250px] items-center justify-center rounded-xl bg-gray-100"
|
|
1905
|
-
},
|
|
1906
|
+
}, bn = ["textContent"], Pn = { key: 2 }, En = {
|
|
1906
1907
|
class: "flex flex-col items-center justify-center",
|
|
1907
1908
|
style: { "background-color": "#183e4f", padding: `calc(2.5 * var(--rem)) calc(3 * var(--rem))
|
|
1908
1909
|
calc(2 * var(--rem))` }
|
|
1909
|
-
},
|
|
1910
|
+
}, kn = ["textContent"], Sn = {
|
|
1910
1911
|
class: "flex w-full flex-col items-center justify-center text-center",
|
|
1911
1912
|
style: { padding: `calc(3 * var(--rem)) calc(2 * var(--rem))
|
|
1912
1913
|
calc(2 * var(--rem))` }
|
|
1913
|
-
},
|
|
1914
|
-
function
|
|
1914
|
+
}, Tn = ["textContent"], Mn = ["textContent"];
|
|
1915
|
+
function In(n, t, o, i, e, s) {
|
|
1915
1916
|
const r = $("CIcon"), a = $("QrCode"), l = $("CButton"), u = $("Animation");
|
|
1916
|
-
return D(), R("div",
|
|
1917
|
-
y("iframe",
|
|
1918
|
-
["form", "signing", "error", "canceled"].includes(
|
|
1917
|
+
return D(), R("div", _n, [
|
|
1918
|
+
y("iframe", Cn, null, 512),
|
|
1919
|
+
["form", "signing", "error", "canceled"].includes(e.view) ? (D(), R("div", xn, [
|
|
1919
1920
|
B(r, {
|
|
1920
1921
|
type: "bankId",
|
|
1921
1922
|
size: "50",
|
|
1922
1923
|
class: "text-gray-500"
|
|
1923
1924
|
})
|
|
1924
1925
|
])) : L("", !0),
|
|
1925
|
-
["new", "waiting", "started"].includes(
|
|
1926
|
-
|
|
1926
|
+
["new", "waiting", "started"].includes(e.view) ? (D(), R(lt, { key: 1 }, [
|
|
1927
|
+
e.qrCode ? (D(), Q(a, {
|
|
1927
1928
|
key: 0,
|
|
1928
|
-
value:
|
|
1929
|
+
value: e.qrCode,
|
|
1929
1930
|
options: {
|
|
1930
1931
|
width: 250,
|
|
1931
1932
|
errorCorrectionLevel: "L",
|
|
@@ -1940,9 +1941,9 @@ function Mn(e, t, o, i, n, s) {
|
|
|
1940
1941
|
y("div", {
|
|
1941
1942
|
key: "a",
|
|
1942
1943
|
class: "min-h-[20px] pt-4 text-sm text-gray-500",
|
|
1943
|
-
textContent: I((c = s.viewText[
|
|
1944
|
-
}, null, 8,
|
|
1945
|
-
!
|
|
1944
|
+
textContent: I((c = s.viewText[e.view]) == null ? void 0 : c.spinnerText)
|
|
1945
|
+
}, null, 8, bn),
|
|
1946
|
+
!e.isMobile && ["new", "waiting", "started"].includes(e.view) ? (D(), Q(l, {
|
|
1946
1947
|
key: "b",
|
|
1947
1948
|
type: "none",
|
|
1948
1949
|
pattern: "secondary",
|
|
@@ -1951,7 +1952,7 @@ function Mn(e, t, o, i, n, s) {
|
|
|
1951
1952
|
onClick: s.triggerAutoStart
|
|
1952
1953
|
}, {
|
|
1953
1954
|
default: N(() => [
|
|
1954
|
-
K(I(
|
|
1955
|
+
K(I(n._document.$t("answerModal.bankId.component.startOnThisDevice")), 1)
|
|
1955
1956
|
]),
|
|
1956
1957
|
_: 1
|
|
1957
1958
|
}, 8, ["onClick"])) : L("", !0)
|
|
@@ -1959,17 +1960,17 @@ function Mn(e, t, o, i, n, s) {
|
|
|
1959
1960
|
}),
|
|
1960
1961
|
_: 1
|
|
1961
1962
|
}),
|
|
1962
|
-
["form", "new", "waiting", "started"].includes(
|
|
1963
|
+
["form", "new", "waiting", "started"].includes(e.view) ? L("", !0) : (D(), R("div", Pn, [
|
|
1963
1964
|
B(Ut, { name: "pop-in" }, {
|
|
1964
1965
|
default: N(() => [
|
|
1965
|
-
["signing", "error", "canceled"].includes(
|
|
1966
|
+
["signing", "error", "canceled"].includes(e.view) ? (D(), R("div", {
|
|
1966
1967
|
key: 0,
|
|
1967
1968
|
class: "bankid-popup",
|
|
1968
1969
|
onClick: t[1] || (t[1] = () => {
|
|
1969
|
-
|
|
1970
|
+
e.view = "form", e.isLoading = !1;
|
|
1970
1971
|
})
|
|
1971
1972
|
}, [
|
|
1972
|
-
y("div",
|
|
1973
|
+
y("div", En, [
|
|
1973
1974
|
B(r, {
|
|
1974
1975
|
type: "bankId",
|
|
1975
1976
|
size: "34",
|
|
@@ -1977,17 +1978,17 @@ function Mn(e, t, o, i, n, s) {
|
|
|
1977
1978
|
}),
|
|
1978
1979
|
y("div", {
|
|
1979
1980
|
class: "pt-4 text-sm font-medium text-white opacity-75",
|
|
1980
|
-
textContent: I(s.viewText[
|
|
1981
|
-
}, null, 8,
|
|
1981
|
+
textContent: I(s.viewText[e.view].text)
|
|
1982
|
+
}, null, 8, kn)
|
|
1982
1983
|
]),
|
|
1983
|
-
y("div",
|
|
1984
|
-
|
|
1984
|
+
y("div", Sn, [
|
|
1985
|
+
e.view === "signing" ? (D(), R(lt, { key: 0 }, [
|
|
1985
1986
|
t[2] || (t[2] = y("div", { class: "spinner" }, null, -1)),
|
|
1986
1987
|
y("div", {
|
|
1987
1988
|
class: "pt-8 text-gray-500",
|
|
1988
|
-
textContent: I(s.viewText[
|
|
1989
|
-
}, null, 8,
|
|
1990
|
-
], 64)) : ["error", "canceled"].includes(
|
|
1989
|
+
textContent: I(s.viewText[e.view].spinnerText)
|
|
1990
|
+
}, null, 8, Tn)
|
|
1991
|
+
], 64)) : ["error", "canceled"].includes(e.view) ? (D(), R(lt, { key: 1 }, [
|
|
1991
1992
|
B(r, {
|
|
1992
1993
|
type: "error",
|
|
1993
1994
|
size: "22",
|
|
@@ -1995,18 +1996,18 @@ function Mn(e, t, o, i, n, s) {
|
|
|
1995
1996
|
}),
|
|
1996
1997
|
y("div", {
|
|
1997
1998
|
style: { "font-size": "14px" },
|
|
1998
|
-
textContent: I(
|
|
1999
|
-
}, null, 8,
|
|
1999
|
+
textContent: I(e.errorMessage)
|
|
2000
|
+
}, null, 8, Mn),
|
|
2000
2001
|
B(l, {
|
|
2001
|
-
loading:
|
|
2002
|
+
loading: e.isLoading,
|
|
2002
2003
|
type: "none",
|
|
2003
2004
|
pattern: "secondary",
|
|
2004
2005
|
size: "small",
|
|
2005
2006
|
style: { "margin-top": "calc(2.5 * var(--rem))", padding: "1em", height: "initial" },
|
|
2006
|
-
onClick: t[0] || (t[0] = (c) =>
|
|
2007
|
+
onClick: t[0] || (t[0] = (c) => e.view = "form")
|
|
2007
2008
|
}, {
|
|
2008
2009
|
default: N(() => [
|
|
2009
|
-
K(I(
|
|
2010
|
+
K(I(n._document.$t("tryAgain")), 1)
|
|
2010
2011
|
]),
|
|
2011
2012
|
_: 1
|
|
2012
2013
|
}, 8, ["loading"])
|
|
@@ -2019,7 +2020,7 @@ function Mn(e, t, o, i, n, s) {
|
|
|
2019
2020
|
]))
|
|
2020
2021
|
]);
|
|
2021
2022
|
}
|
|
2022
|
-
const
|
|
2023
|
+
const An = /* @__PURE__ */ tt(vn, [["render", In], ["__scopeId", "data-v-4273b03f"]]), Bn = {
|
|
2023
2024
|
name: "DenyAnswer",
|
|
2024
2025
|
mixins: [Z([])],
|
|
2025
2026
|
props: {
|
|
@@ -2034,24 +2035,24 @@ const In = /* @__PURE__ */ tt(yn, [["render", Mn], ["__scopeId", "data-v-4273b03
|
|
|
2034
2035
|
};
|
|
2035
2036
|
},
|
|
2036
2037
|
methods: {
|
|
2037
|
-
async submit({ update:
|
|
2038
|
+
async submit({ update: n, answer: t }) {
|
|
2038
2039
|
const o = [];
|
|
2039
2040
|
this.rejectReason && o.push({
|
|
2040
2041
|
key: "unclear-other",
|
|
2041
2042
|
category: "misc",
|
|
2042
2043
|
description: this.rejectReason,
|
|
2043
2044
|
sentAt: this._document.lastSentAt
|
|
2044
|
-
}), await
|
|
2045
|
+
}), await n({ body: { "data.rejectReasons": o } }), await t({ body: { isAccepted: !1 } }), typeof this.onCompleteFunc == "function" && this.onCompleteFunc();
|
|
2045
2046
|
}
|
|
2046
2047
|
}
|
|
2047
|
-
},
|
|
2048
|
-
function
|
|
2048
|
+
}, Dn = { class: "text-left" };
|
|
2049
|
+
function Rn(n, t, o, i, e, s) {
|
|
2049
2050
|
const r = $("CInput");
|
|
2050
|
-
return D(), R("div",
|
|
2051
|
-
y("label", null, I(
|
|
2051
|
+
return D(), R("div", Dn, [
|
|
2052
|
+
y("label", null, I(n._document.$t("answerModal.decline.component.label")), 1),
|
|
2052
2053
|
B(r, {
|
|
2053
|
-
modelValue:
|
|
2054
|
-
"onUpdate:modelValue": t[0] || (t[0] = (a) =>
|
|
2054
|
+
modelValue: e.rejectReason,
|
|
2055
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.rejectReason = a),
|
|
2055
2056
|
type: "textarea",
|
|
2056
2057
|
filled: "",
|
|
2057
2058
|
"custom-class": "decline-input",
|
|
@@ -2059,16 +2060,16 @@ function Dn(e, t, o, i, n, s) {
|
|
|
2059
2060
|
}, null, 8, ["modelValue"])
|
|
2060
2061
|
]);
|
|
2061
2062
|
}
|
|
2062
|
-
const
|
|
2063
|
+
const Fn = /* @__PURE__ */ tt(Bn, [["render", Rn]]);
|
|
2063
2064
|
/*!
|
|
2064
2065
|
* Signature Pad v4.0.10 | https://github.com/szimek/signature_pad
|
|
2065
2066
|
* (c) 2022 Szymon Nowak | Released under the MIT license
|
|
2066
2067
|
*/
|
|
2067
2068
|
class it {
|
|
2068
|
-
constructor(t, o, i,
|
|
2069
|
+
constructor(t, o, i, e) {
|
|
2069
2070
|
if (isNaN(t) || isNaN(o))
|
|
2070
2071
|
throw new Error(`Point is invalid: (${t}, ${o})`);
|
|
2071
|
-
this.x = +t, this.y = +o, this.pressure = i || 0, this.time =
|
|
2072
|
+
this.x = +t, this.y = +o, this.pressure = i || 0, this.time = e || Date.now();
|
|
2072
2073
|
}
|
|
2073
2074
|
distanceTo(t) {
|
|
2074
2075
|
return Math.sqrt(Math.pow(this.x - t.x, 2) + Math.pow(this.y - t.y, 2));
|
|
@@ -2081,37 +2082,37 @@ class it {
|
|
|
2081
2082
|
}
|
|
2082
2083
|
}
|
|
2083
2084
|
class Ot {
|
|
2084
|
-
constructor(t, o, i,
|
|
2085
|
-
this.startPoint = t, this.control2 = o, this.control1 = i, this.endPoint =
|
|
2085
|
+
constructor(t, o, i, e, s, r) {
|
|
2086
|
+
this.startPoint = t, this.control2 = o, this.control1 = i, this.endPoint = e, this.startWidth = s, this.endWidth = r;
|
|
2086
2087
|
}
|
|
2087
2088
|
static fromPoints(t, o) {
|
|
2088
|
-
const i = this.calculateControlPoints(t[0], t[1], t[2]).c2,
|
|
2089
|
-
return new Ot(t[1], i,
|
|
2089
|
+
const i = this.calculateControlPoints(t[0], t[1], t[2]).c2, e = this.calculateControlPoints(t[1], t[2], t[3]).c1;
|
|
2090
|
+
return new Ot(t[1], i, e, t[2], o.start, o.end);
|
|
2090
2091
|
}
|
|
2091
2092
|
static calculateControlPoints(t, o, i) {
|
|
2092
|
-
const
|
|
2093
|
+
const e = t.x - o.x, s = t.y - o.y, r = o.x - i.x, a = o.y - i.y, l = { x: (t.x + o.x) / 2, y: (t.y + o.y) / 2 }, u = { x: (o.x + i.x) / 2, y: (o.y + i.y) / 2 }, c = Math.sqrt(e * e + s * s), h = Math.sqrt(r * r + a * a), f = l.x - u.x, d = l.y - u.y, p = h / (c + h), g = { x: u.x + f * p, y: u.y + d * p }, A = o.x - g.x, x = o.y - g.y;
|
|
2093
2094
|
return {
|
|
2094
2095
|
c1: new it(l.x + A, l.y + x),
|
|
2095
2096
|
c2: new it(u.x + A, u.y + x)
|
|
2096
2097
|
};
|
|
2097
2098
|
}
|
|
2098
2099
|
length() {
|
|
2099
|
-
let o = 0, i,
|
|
2100
|
+
let o = 0, i, e;
|
|
2100
2101
|
for (let s = 0; s <= 10; s += 1) {
|
|
2101
2102
|
const r = s / 10, a = this.point(r, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), l = this.point(r, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
|
|
2102
2103
|
if (s > 0) {
|
|
2103
|
-
const u = a - i, c = l -
|
|
2104
|
+
const u = a - i, c = l - e;
|
|
2104
2105
|
o += Math.sqrt(u * u + c * c);
|
|
2105
2106
|
}
|
|
2106
|
-
i = a,
|
|
2107
|
+
i = a, e = l;
|
|
2107
2108
|
}
|
|
2108
2109
|
return o;
|
|
2109
2110
|
}
|
|
2110
|
-
point(t, o, i,
|
|
2111
|
-
return o * (1 - t) * (1 - t) * (1 - t) + 3 * i * (1 - t) * (1 - t) * t + 3 *
|
|
2111
|
+
point(t, o, i, e, s) {
|
|
2112
|
+
return o * (1 - t) * (1 - t) * (1 - t) + 3 * i * (1 - t) * (1 - t) * t + 3 * e * (1 - t) * t * t + s * t * t * t;
|
|
2112
2113
|
}
|
|
2113
2114
|
}
|
|
2114
|
-
class
|
|
2115
|
+
class $n {
|
|
2115
2116
|
constructor() {
|
|
2116
2117
|
try {
|
|
2117
2118
|
this._et = new EventTarget();
|
|
@@ -2129,17 +2130,17 @@ class Fn {
|
|
|
2129
2130
|
this._et.removeEventListener(t, o, i);
|
|
2130
2131
|
}
|
|
2131
2132
|
}
|
|
2132
|
-
function
|
|
2133
|
-
let o = 0, i = null,
|
|
2133
|
+
function Nn(n, t = 250) {
|
|
2134
|
+
let o = 0, i = null, e, s, r;
|
|
2134
2135
|
const a = () => {
|
|
2135
|
-
o = Date.now(), i = null,
|
|
2136
|
+
o = Date.now(), i = null, e = n.apply(s, r), i || (s = null, r = []);
|
|
2136
2137
|
};
|
|
2137
2138
|
return function(...u) {
|
|
2138
2139
|
const c = Date.now(), h = t - (c - o);
|
|
2139
|
-
return s = this, r = u, h <= 0 || h > t ? (i && (clearTimeout(i), i = null), o = c,
|
|
2140
|
+
return s = this, r = u, h <= 0 || h > t ? (i && (clearTimeout(i), i = null), o = c, e = n.apply(s, r), i || (s = null, r = [])) : i || (i = window.setTimeout(a, h)), e;
|
|
2140
2141
|
};
|
|
2141
2142
|
}
|
|
2142
|
-
let
|
|
2143
|
+
let Ln = class Nt extends $n {
|
|
2143
2144
|
constructor(t, o = {}) {
|
|
2144
2145
|
super(), this.canvas = t, this._handleMouseDown = (i) => {
|
|
2145
2146
|
i.buttons === 1 && (this._drawningStroke = !0, this._strokeBegin(i));
|
|
@@ -2149,13 +2150,13 @@ let Nn = class Nt extends Fn {
|
|
|
2149
2150
|
i.buttons === 1 && this._drawningStroke && (this._drawningStroke = !1, this._strokeEnd(i));
|
|
2150
2151
|
}, this._handleTouchStart = (i) => {
|
|
2151
2152
|
if (i.cancelable && i.preventDefault(), i.targetTouches.length === 1) {
|
|
2152
|
-
const
|
|
2153
|
-
this._strokeBegin(
|
|
2153
|
+
const e = i.changedTouches[0];
|
|
2154
|
+
this._strokeBegin(e);
|
|
2154
2155
|
}
|
|
2155
2156
|
}, this._handleTouchMove = (i) => {
|
|
2156
2157
|
i.cancelable && i.preventDefault();
|
|
2157
|
-
const
|
|
2158
|
-
this._strokeMoveUpdate(
|
|
2158
|
+
const e = i.targetTouches[0];
|
|
2159
|
+
this._strokeMoveUpdate(e);
|
|
2159
2160
|
}, this._handleTouchEnd = (i) => {
|
|
2160
2161
|
if (i.target === this.canvas) {
|
|
2161
2162
|
i.cancelable && i.preventDefault();
|
|
@@ -2168,19 +2169,19 @@ let Nn = class Nt extends Fn {
|
|
|
2168
2169
|
this._drawningStroke && (i.preventDefault(), this._strokeMoveUpdate(i));
|
|
2169
2170
|
}, this._handlePointerEnd = (i) => {
|
|
2170
2171
|
this._drawningStroke && (i.preventDefault(), this._drawningStroke = !1, this._strokeEnd(i));
|
|
2171
|
-
}, this.velocityFilterWeight = o.velocityFilterWeight || 0.7, this.minWidth = o.minWidth || 0.5, this.maxWidth = o.maxWidth || 2.5, this.throttle = "throttle" in o ? o.throttle : 16, this.minDistance = "minDistance" in o ? o.minDistance : 5, this.dotSize = o.dotSize || 0, this.penColor = o.penColor || "black", this.backgroundColor = o.backgroundColor || "rgba(0,0,0,0)", this._strokeMoveUpdate = this.throttle ?
|
|
2172
|
+
}, this.velocityFilterWeight = o.velocityFilterWeight || 0.7, this.minWidth = o.minWidth || 0.5, this.maxWidth = o.maxWidth || 2.5, this.throttle = "throttle" in o ? o.throttle : 16, this.minDistance = "minDistance" in o ? o.minDistance : 5, this.dotSize = o.dotSize || 0, this.penColor = o.penColor || "black", this.backgroundColor = o.backgroundColor || "rgba(0,0,0,0)", this._strokeMoveUpdate = this.throttle ? Nn(Nt.prototype._strokeUpdate, this.throttle) : Nt.prototype._strokeUpdate, this._ctx = t.getContext("2d"), this.clear(), this.on();
|
|
2172
2173
|
}
|
|
2173
2174
|
clear() {
|
|
2174
2175
|
const { _ctx: t, canvas: o } = this;
|
|
2175
2176
|
t.fillStyle = this.backgroundColor, t.clearRect(0, 0, o.width, o.height), t.fillRect(0, 0, o.width, o.height), this._data = [], this._reset(this._getPointGroupOptions()), this._isEmpty = !0;
|
|
2176
2177
|
}
|
|
2177
2178
|
fromDataURL(t, o = {}) {
|
|
2178
|
-
return new Promise((i,
|
|
2179
|
+
return new Promise((i, e) => {
|
|
2179
2180
|
const s = new Image(), r = o.ratio || window.devicePixelRatio || 1, a = o.width || this.canvas.width / r, l = o.height || this.canvas.height / r, u = o.xOffset || 0, c = o.yOffset || 0;
|
|
2180
2181
|
this._reset(this._getPointGroupOptions()), s.onload = () => {
|
|
2181
2182
|
this._ctx.drawImage(s, u, c, a, l), i();
|
|
2182
2183
|
}, s.onerror = (h) => {
|
|
2183
|
-
|
|
2184
|
+
e(h);
|
|
2184
2185
|
}, s.crossOrigin = "anonymous", s.src = t, this._isEmpty = !1;
|
|
2185
2186
|
});
|
|
2186
2187
|
}
|
|
@@ -2229,7 +2230,7 @@ let Nn = class Nt extends Fn {
|
|
|
2229
2230
|
return;
|
|
2230
2231
|
}
|
|
2231
2232
|
this.dispatchEvent(new CustomEvent("beforeUpdateStroke", { detail: t }));
|
|
2232
|
-
const o = t.clientX, i = t.clientY,
|
|
2233
|
+
const o = t.clientX, i = t.clientY, e = t.pressure !== void 0 ? t.pressure : t.force !== void 0 ? t.force : 0, s = this._createPoint(o, i, e), r = this._data[this._data.length - 1], a = r.points, l = a.length > 0 && a[a.length - 1], u = l ? s.distanceTo(l) <= this.minDistance : !1, c = this._getPointGroupOptions(r);
|
|
2233
2234
|
if (!l || !(l && u)) {
|
|
2234
2235
|
const h = this._addPoint(s, c);
|
|
2235
2236
|
l ? h && this._drawCurve(h, c) : this._drawDot(s, c), a.push({
|
|
@@ -2257,34 +2258,34 @@ let Nn = class Nt extends Fn {
|
|
|
2257
2258
|
this._lastPoints = [], this._lastVelocity = 0, this._lastWidth = (t.minWidth + t.maxWidth) / 2, this._ctx.fillStyle = t.penColor;
|
|
2258
2259
|
}
|
|
2259
2260
|
_createPoint(t, o, i) {
|
|
2260
|
-
const
|
|
2261
|
-
return new it(t -
|
|
2261
|
+
const e = this.canvas.getBoundingClientRect();
|
|
2262
|
+
return new it(t - e.left, o - e.top, i, (/* @__PURE__ */ new Date()).getTime());
|
|
2262
2263
|
}
|
|
2263
2264
|
_addPoint(t, o) {
|
|
2264
2265
|
const { _lastPoints: i } = this;
|
|
2265
2266
|
if (i.push(t), i.length > 2) {
|
|
2266
2267
|
i.length === 3 && i.unshift(i[0]);
|
|
2267
|
-
const
|
|
2268
|
+
const e = this._calculateCurveWidths(i[1], i[2], o), s = Ot.fromPoints(i, e);
|
|
2268
2269
|
return i.shift(), s;
|
|
2269
2270
|
}
|
|
2270
2271
|
return null;
|
|
2271
2272
|
}
|
|
2272
2273
|
_calculateCurveWidths(t, o, i) {
|
|
2273
|
-
const
|
|
2274
|
+
const e = i.velocityFilterWeight * o.velocityFrom(t) + (1 - i.velocityFilterWeight) * this._lastVelocity, s = this._strokeWidth(e, i), r = {
|
|
2274
2275
|
end: s,
|
|
2275
2276
|
start: this._lastWidth
|
|
2276
2277
|
};
|
|
2277
|
-
return this._lastVelocity =
|
|
2278
|
+
return this._lastVelocity = e, this._lastWidth = s, r;
|
|
2278
2279
|
}
|
|
2279
2280
|
_strokeWidth(t, o) {
|
|
2280
2281
|
return Math.max(o.maxWidth / (t + 1), o.minWidth);
|
|
2281
2282
|
}
|
|
2282
2283
|
_drawCurveSegment(t, o, i) {
|
|
2283
|
-
const
|
|
2284
|
-
|
|
2284
|
+
const e = this._ctx;
|
|
2285
|
+
e.moveTo(t, o), e.arc(t, o, i, 0, 2 * Math.PI, !1), this._isEmpty = !1;
|
|
2285
2286
|
}
|
|
2286
2287
|
_drawCurve(t, o) {
|
|
2287
|
-
const i = this._ctx,
|
|
2288
|
+
const i = this._ctx, e = t.endWidth - t.startWidth, s = Math.ceil(t.length()) * 2;
|
|
2288
2289
|
i.beginPath(), i.fillStyle = o.penColor;
|
|
2289
2290
|
for (let r = 0; r < s; r += 1) {
|
|
2290
2291
|
const a = r / s, l = a * a, u = l * a, c = 1 - a, h = c * c, f = h * c;
|
|
@@ -2292,18 +2293,18 @@ let Nn = class Nt extends Fn {
|
|
|
2292
2293
|
d += 3 * h * a * t.control1.x, d += 3 * c * l * t.control2.x, d += u * t.endPoint.x;
|
|
2293
2294
|
let p = f * t.startPoint.y;
|
|
2294
2295
|
p += 3 * h * a * t.control1.y, p += 3 * c * l * t.control2.y, p += u * t.endPoint.y;
|
|
2295
|
-
const g = Math.min(t.startWidth + u *
|
|
2296
|
+
const g = Math.min(t.startWidth + u * e, o.maxWidth);
|
|
2296
2297
|
this._drawCurveSegment(d, p, g);
|
|
2297
2298
|
}
|
|
2298
2299
|
i.closePath(), i.fill();
|
|
2299
2300
|
}
|
|
2300
2301
|
_drawDot(t, o) {
|
|
2301
|
-
const i = this._ctx,
|
|
2302
|
-
i.beginPath(), this._drawCurveSegment(t.x, t.y,
|
|
2302
|
+
const i = this._ctx, e = o.dotSize > 0 ? o.dotSize : (o.minWidth + o.maxWidth) / 2;
|
|
2303
|
+
i.beginPath(), this._drawCurveSegment(t.x, t.y, e), i.closePath(), i.fillStyle = o.penColor, i.fill();
|
|
2303
2304
|
}
|
|
2304
2305
|
_fromData(t, o, i) {
|
|
2305
|
-
for (const
|
|
2306
|
-
const { points: s } =
|
|
2306
|
+
for (const e of t) {
|
|
2307
|
+
const { points: s } = e, r = this._getPointGroupOptions(e);
|
|
2307
2308
|
if (s.length > 1)
|
|
2308
2309
|
for (let a = 0; a < s.length; a += 1) {
|
|
2309
2310
|
const l = s[a], u = new it(l.x, l.y, l.pressure, l.time);
|
|
@@ -2316,7 +2317,7 @@ let Nn = class Nt extends Fn {
|
|
|
2316
2317
|
}
|
|
2317
2318
|
}
|
|
2318
2319
|
_toSVG() {
|
|
2319
|
-
const t = this._data, o = Math.max(window.devicePixelRatio || 1, 1), i = 0,
|
|
2320
|
+
const t = this._data, o = Math.max(window.devicePixelRatio || 1, 1), i = 0, e = 0, s = this.canvas.width / o, r = this.canvas.height / o, a = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
2320
2321
|
a.setAttribute("width", this.canvas.width.toString()), a.setAttribute("height", this.canvas.height.toString()), this._fromData(t, (d, { penColor: p }) => {
|
|
2321
2322
|
const g = document.createElement("path");
|
|
2322
2323
|
if (!isNaN(d.control1.x) && !isNaN(d.control1.y) && !isNaN(d.control2.x) && !isNaN(d.control2.y)) {
|
|
@@ -2327,7 +2328,7 @@ let Nn = class Nt extends Fn {
|
|
|
2327
2328
|
const T = document.createElement("circle"), E = g > 0 ? g : (A + x) / 2;
|
|
2328
2329
|
T.setAttribute("r", E.toString()), T.setAttribute("cx", d.x.toString()), T.setAttribute("cy", d.y.toString()), T.setAttribute("fill", p), a.appendChild(T);
|
|
2329
2330
|
});
|
|
2330
|
-
const l = "data:image/svg+xml;base64,", u = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="${i} ${
|
|
2331
|
+
const l = "data:image/svg+xml;base64,", u = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="${i} ${e} ${s} ${r}" width="${s}" height="${r}">`;
|
|
2331
2332
|
let c = a.innerHTML;
|
|
2332
2333
|
if (c === void 0) {
|
|
2333
2334
|
const d = document.createElement("dummy"), p = a.childNodes;
|
|
@@ -2340,25 +2341,25 @@ let Nn = class Nt extends Fn {
|
|
|
2340
2341
|
return l + btoa(f);
|
|
2341
2342
|
}
|
|
2342
2343
|
};
|
|
2343
|
-
class
|
|
2344
|
+
class Un extends Ln {
|
|
2344
2345
|
fromText(t, o = {}) {
|
|
2345
2346
|
if (this.clear(), !t) return;
|
|
2346
|
-
const { font: i, x:
|
|
2347
|
+
const { font: i, x: e = 10, y: s = 50 } = o;
|
|
2347
2348
|
let { maxWidth: r } = o;
|
|
2348
2349
|
if (!r) {
|
|
2349
2350
|
const { clientWidth: a = 300 } = this.canvas;
|
|
2350
|
-
r = Math.floor(a - 2 *
|
|
2351
|
+
r = Math.floor(a - 2 * e);
|
|
2351
2352
|
}
|
|
2352
|
-
this._ctx.font = i, this._ctx.fillText(t,
|
|
2353
|
+
this._ctx.font = i, this._ctx.fillText(t, e, s, r), this._isEmpty = !1;
|
|
2353
2354
|
}
|
|
2354
2355
|
}
|
|
2355
|
-
const
|
|
2356
|
+
const qn = {
|
|
2356
2357
|
name: "SignaturePad",
|
|
2357
2358
|
props: {
|
|
2358
2359
|
type: {
|
|
2359
2360
|
type: String,
|
|
2360
2361
|
default: "text",
|
|
2361
|
-
validator: (
|
|
2362
|
+
validator: (n) => ["text", "draw"].includes(n)
|
|
2362
2363
|
},
|
|
2363
2364
|
text: {
|
|
2364
2365
|
type: String,
|
|
@@ -2417,15 +2418,15 @@ const Un = {
|
|
|
2417
2418
|
type() {
|
|
2418
2419
|
this.initType();
|
|
2419
2420
|
},
|
|
2420
|
-
text(
|
|
2421
|
-
this.drawText(
|
|
2421
|
+
text(n) {
|
|
2422
|
+
this.drawText(n);
|
|
2422
2423
|
}
|
|
2423
2424
|
},
|
|
2424
2425
|
mounted() {
|
|
2425
|
-
const { options:
|
|
2426
|
-
this.signaturePad = new
|
|
2426
|
+
const { options: n, defaultOptions: t } = this, o = this.$refs.signaturePadCanvas;
|
|
2427
|
+
this.signaturePad = new Un(o, {
|
|
2427
2428
|
...t,
|
|
2428
|
-
...
|
|
2429
|
+
...n
|
|
2429
2430
|
}), this.onResizeHandler = this.resizeCanvas.bind(this), window.addEventListener("resize", this.onResizeHandler, !1), Object.keys(this.signEvents).forEach((i) => {
|
|
2430
2431
|
this.signaturePad.addEventListener(i, () => {
|
|
2431
2432
|
this.signEvents[i]();
|
|
@@ -2440,54 +2441,54 @@ const Un = {
|
|
|
2440
2441
|
this.type === "draw" ? this.openSignaturePad() : this.lockSignaturePad();
|
|
2441
2442
|
},
|
|
2442
2443
|
resizeCanvas() {
|
|
2443
|
-
const
|
|
2444
|
-
if (
|
|
2444
|
+
const n = this.$refs.signaturePadCanvas, t = Math.max(window.devicePixelRatio || 1, 1);
|
|
2445
|
+
if (n.width = n.offsetWidth * t, n.height = n.offsetHeight * t, n.getContext("2d").scale(t, t), this.signaturePad.clear(), this.signatureData = "", this.type === "draw") {
|
|
2445
2446
|
const o = this.signaturePad.toData();
|
|
2446
2447
|
o != null && o.length && this.signaturePad.fromData(o);
|
|
2447
2448
|
} else this.type === "text" && this.drawText(this.text);
|
|
2448
2449
|
},
|
|
2449
|
-
saveSignature(
|
|
2450
|
-
const { type: t = "image/png", trim: o = !0, encoderOptions: i } =
|
|
2450
|
+
saveSignature(n = {}) {
|
|
2451
|
+
const { type: t = "image/png", trim: o = !0, encoderOptions: i } = n || {}, e = { isEmpty: !1, data: void 0 };
|
|
2451
2452
|
if (!this.validTypes.includes(t)) {
|
|
2452
2453
|
const s = this.validTypes.join(", ");
|
|
2453
2454
|
throw new Error(
|
|
2454
2455
|
`The Image type is incorrect! We only support ${s} types.`
|
|
2455
2456
|
);
|
|
2456
2457
|
}
|
|
2457
|
-
if (this.signaturePad.isEmpty()) return { ...
|
|
2458
|
+
if (this.signaturePad.isEmpty()) return { ...e, isEmpty: !0 };
|
|
2458
2459
|
if (o) {
|
|
2459
2460
|
const s = this.$refs.signaturePadCanvas, r = s ? this.trimCanvas(s) : null;
|
|
2460
2461
|
this.signatureData = r ? r.toDataURL(t, i) : "";
|
|
2461
2462
|
} else
|
|
2462
2463
|
this.signatureData = this.signaturePad.toDataURL(t, i);
|
|
2463
2464
|
return {
|
|
2464
|
-
...
|
|
2465
|
+
...e,
|
|
2465
2466
|
data: this.signatureData
|
|
2466
2467
|
};
|
|
2467
2468
|
},
|
|
2468
2469
|
undoSignature() {
|
|
2469
|
-
const { signaturePad:
|
|
2470
|
-
t &&
|
|
2470
|
+
const { signaturePad: n } = this, t = n.toData();
|
|
2471
|
+
t && n.fromData(t.slice(0, -1));
|
|
2471
2472
|
},
|
|
2472
|
-
drawText(
|
|
2473
|
-
this.signaturePad.fromText(
|
|
2473
|
+
drawText(n) {
|
|
2474
|
+
this.signaturePad.fromText(n, {
|
|
2474
2475
|
font: '40px "Nothing You Could Do"',
|
|
2475
2476
|
x: 10,
|
|
2476
2477
|
y: 100
|
|
2477
2478
|
});
|
|
2478
2479
|
},
|
|
2479
2480
|
// Extend of module methods
|
|
2480
|
-
fromText(...
|
|
2481
|
-
return this.signaturePad.fromText(...
|
|
2481
|
+
fromText(...n) {
|
|
2482
|
+
return this.signaturePad.fromText(...n);
|
|
2482
2483
|
},
|
|
2483
|
-
fromDataURL(...
|
|
2484
|
-
return this.signaturePad.fromDataURL(...
|
|
2484
|
+
fromDataURL(...n) {
|
|
2485
|
+
return this.signaturePad.fromDataURL(...n);
|
|
2485
2486
|
},
|
|
2486
|
-
fromData(...
|
|
2487
|
-
return this.signaturePad.fromData(...
|
|
2487
|
+
fromData(...n) {
|
|
2488
|
+
return this.signaturePad.fromData(...n);
|
|
2488
2489
|
},
|
|
2489
|
-
toData(...
|
|
2490
|
-
return this.signaturePad.toData(...
|
|
2490
|
+
toData(...n) {
|
|
2491
|
+
return this.signaturePad.toData(...n);
|
|
2491
2492
|
},
|
|
2492
2493
|
lockSignaturePad() {
|
|
2493
2494
|
return this.signaturePad.off();
|
|
@@ -2501,10 +2502,10 @@ const Un = {
|
|
|
2501
2502
|
clearSignature() {
|
|
2502
2503
|
return this.signaturePad.clear();
|
|
2503
2504
|
},
|
|
2504
|
-
trimCanvas(
|
|
2505
|
+
trimCanvas(n) {
|
|
2505
2506
|
const t = document.createElement("canvas"), o = t.getContext("2d");
|
|
2506
|
-
t.width =
|
|
2507
|
-
let i = t.width,
|
|
2507
|
+
t.width = n.width, t.height = n.height, o.drawImage(n, 0, 0);
|
|
2508
|
+
let i = t.width, e = t.height;
|
|
2508
2509
|
const s = { x: [], y: [] }, r = o.getImageData(
|
|
2509
2510
|
0,
|
|
2510
2511
|
0,
|
|
@@ -2512,23 +2513,23 @@ const Un = {
|
|
|
2512
2513
|
t.height
|
|
2513
2514
|
);
|
|
2514
2515
|
let a = 0;
|
|
2515
|
-
for (let c = 0; c <
|
|
2516
|
+
for (let c = 0; c < e; c++)
|
|
2516
2517
|
for (let h = 0; h < i; h++)
|
|
2517
2518
|
a = (c * i + h) * 4, r.data[a + 3] > 0 && (s.x.push(h), s.y.push(c));
|
|
2518
2519
|
s.x.sort((c, h) => c - h), s.y.sort((c, h) => c - h);
|
|
2519
2520
|
const l = s.x.length - 1;
|
|
2520
|
-
i = s.x[l] - s.x[0],
|
|
2521
|
-
const u = o.getImageData(s.x[0], s.y[0], i,
|
|
2522
|
-
return t.height =
|
|
2521
|
+
i = s.x[l] - s.x[0], e = s.y[l] - s.y[0];
|
|
2522
|
+
const u = o.getImageData(s.x[0], s.y[0], i, e);
|
|
2523
|
+
return t.height = e, o.putImageData(u, 0, 0), t;
|
|
2523
2524
|
}
|
|
2524
2525
|
},
|
|
2525
2526
|
render() {
|
|
2526
|
-
const { width:
|
|
2527
|
+
const { width: n, height: t, customStyle: o } = this;
|
|
2527
2528
|
return $t(
|
|
2528
2529
|
"div",
|
|
2529
2530
|
{
|
|
2530
2531
|
style: {
|
|
2531
|
-
width:
|
|
2532
|
+
width: n,
|
|
2532
2533
|
height: t,
|
|
2533
2534
|
...o
|
|
2534
2535
|
}
|
|
@@ -2545,22 +2546,22 @@ const Un = {
|
|
|
2545
2546
|
);
|
|
2546
2547
|
}
|
|
2547
2548
|
};
|
|
2548
|
-
function
|
|
2549
|
+
function On({ rel: n, href: t, crossorigin: o = !1 }) {
|
|
2549
2550
|
const i = document.createElement("link");
|
|
2550
|
-
i.rel =
|
|
2551
|
+
i.rel = n, i.href = t, i.crossorigin = o, document.head.appendChild(i);
|
|
2551
2552
|
}
|
|
2552
|
-
const
|
|
2553
|
+
const zn = [
|
|
2553
2554
|
{ rel: "preconnect", href: "https://fonts.googleapis.com" },
|
|
2554
2555
|
{ rel: "preconnect", href: "https://fonts.gstatic.com", crossorigin: !0 },
|
|
2555
2556
|
{
|
|
2556
2557
|
rel: "stylesheet",
|
|
2557
2558
|
href: "https://fonts.googleapis.com/css2?family=Nothing+You+Could+Do&display=swap"
|
|
2558
2559
|
}
|
|
2559
|
-
],
|
|
2560
|
+
], jn = {
|
|
2560
2561
|
name: "SignatureAnswer",
|
|
2561
2562
|
components: {
|
|
2562
2563
|
CField: We,
|
|
2563
|
-
SignaturePad:
|
|
2564
|
+
SignaturePad: qn
|
|
2564
2565
|
},
|
|
2565
2566
|
emits: ["invalid"],
|
|
2566
2567
|
mixins: [Z([])],
|
|
@@ -2579,8 +2580,8 @@ const On = [
|
|
|
2579
2580
|
};
|
|
2580
2581
|
},
|
|
2581
2582
|
watch: {
|
|
2582
|
-
mode(
|
|
2583
|
-
this.reset(), this.$refs.signaturePad &&
|
|
2583
|
+
mode(n) {
|
|
2584
|
+
this.reset(), this.$refs.signaturePad && n === "text" && this.focusName();
|
|
2584
2585
|
},
|
|
2585
2586
|
text() {
|
|
2586
2587
|
this.$refs.signaturePad && this.$nextTick(() => {
|
|
@@ -2589,13 +2590,13 @@ const On = [
|
|
|
2589
2590
|
},
|
|
2590
2591
|
isEmpty: {
|
|
2591
2592
|
immediate: !0,
|
|
2592
|
-
handler(
|
|
2593
|
-
this.$emit("invalid",
|
|
2593
|
+
handler(n) {
|
|
2594
|
+
this.$emit("invalid", n);
|
|
2594
2595
|
}
|
|
2595
2596
|
}
|
|
2596
2597
|
},
|
|
2597
2598
|
created() {
|
|
2598
|
-
|
|
2599
|
+
zn.forEach(On);
|
|
2599
2600
|
},
|
|
2600
2601
|
mounted() {
|
|
2601
2602
|
this.focusName();
|
|
@@ -2608,15 +2609,15 @@ const On = [
|
|
|
2608
2609
|
this.$refs.signaturePad && (this.mode === "text" && this.text ? this.text = this.text.slice(0, this.text.length - 1) : this.$refs.signaturePad.undoSignature(), this.isEmpty = this.$refs.signaturePad.isEmpty());
|
|
2609
2610
|
},
|
|
2610
2611
|
getSignatureData() {
|
|
2611
|
-
let
|
|
2612
|
-
this.mode === "draw" && (
|
|
2613
|
-
const { isEmpty: t, data: o } = this.$refs.signaturePad ? this.$refs.signaturePad.saveSignature(
|
|
2612
|
+
let n = { type: "image/png", trim: !0 };
|
|
2613
|
+
this.mode === "draw" && (n = { type: "image/svg+xml", trim: !1 });
|
|
2614
|
+
const { isEmpty: t, data: o } = this.$refs.signaturePad ? this.$refs.signaturePad.saveSignature(n) : {};
|
|
2614
2615
|
if (t || !o) throw Error("Missing signatureData");
|
|
2615
2616
|
return o;
|
|
2616
2617
|
},
|
|
2617
|
-
async submit({ answer:
|
|
2618
|
+
async submit({ answer: n }) {
|
|
2618
2619
|
const t = this.getSignatureData();
|
|
2619
|
-
await
|
|
2620
|
+
await n({ body: { isAccepted: !0, signatureDataURL: t } }), typeof this.onCompleteFunc == "function" && this.onCompleteFunc();
|
|
2620
2621
|
},
|
|
2621
2622
|
focusName() {
|
|
2622
2623
|
this.$nextTick(
|
|
@@ -2624,47 +2625,47 @@ const On = [
|
|
|
2624
2625
|
);
|
|
2625
2626
|
}
|
|
2626
2627
|
}
|
|
2627
|
-
},
|
|
2628
|
+
}, Vn = { style: { "text-align": "left" } }, Wn = {
|
|
2628
2629
|
class: "flex w-full items-center justify-between",
|
|
2629
2630
|
style: { "font-size": "16px", "padding-bottom": "1em", "font-weight": "500", color: "hsl(0, 0%, 11%)" }
|
|
2630
|
-
},
|
|
2631
|
+
}, Hn = { class: "sign-toggle" }, Yn = {
|
|
2631
2632
|
class: "wrapper",
|
|
2632
2633
|
style: { "padding-bottom": "5px" }
|
|
2633
|
-
},
|
|
2634
|
+
}, Gn = { style: { position: "absolute", left: "1em", top: "0.75em", "font-size": "12px", color: "hsl(0, 0%, 50%)" } }, Kn = { class: "flex w-full justify-end" }, Jn = {
|
|
2634
2635
|
class: "text-center",
|
|
2635
2636
|
style: { "font-size": "12px", color: "hsl(0, 0%, 45%)", "padding-top": "10px" }
|
|
2636
2637
|
};
|
|
2637
|
-
function
|
|
2638
|
+
function Xn(n, t, o, i, e, s) {
|
|
2638
2639
|
const r = $("CInput"), a = $("CField"), l = $("SignaturePad"), u = $("CButton");
|
|
2639
|
-
return D(), R("div",
|
|
2640
|
-
y("div",
|
|
2641
|
-
y("div", null, I(
|
|
2642
|
-
y("div",
|
|
2640
|
+
return D(), R("div", Vn, [
|
|
2641
|
+
y("div", Wn, [
|
|
2642
|
+
y("div", null, I(n._document.$t("answerModal.signature.component.subTitle")), 1),
|
|
2643
|
+
y("div", Hn, [
|
|
2643
2644
|
y("div", {
|
|
2644
|
-
class: Ht([{ active:
|
|
2645
|
-
onClick: t[0] || (t[0] = (c) =>
|
|
2646
|
-
}, I(
|
|
2645
|
+
class: Ht([{ active: e.mode === "text" }, "sign-toggle-button"]),
|
|
2646
|
+
onClick: t[0] || (t[0] = (c) => e.mode = "text")
|
|
2647
|
+
}, I(n._document.$t("answerModal.signature.component.text.tab")), 3),
|
|
2647
2648
|
y("div", {
|
|
2648
|
-
class: Ht([{ active:
|
|
2649
|
-
onClick: t[1] || (t[1] = (c) =>
|
|
2650
|
-
}, I(
|
|
2649
|
+
class: Ht([{ active: e.mode === "draw" }, "sign-toggle-button"]),
|
|
2650
|
+
onClick: t[1] || (t[1] = (c) => e.mode = "draw")
|
|
2651
|
+
}, I(n._document.$t("answerModal.signature.component.draw.tab")), 3)
|
|
2651
2652
|
])
|
|
2652
2653
|
]),
|
|
2653
|
-
|
|
2654
|
+
e.mode === "text" ? (D(), Q(a, {
|
|
2654
2655
|
key: 0,
|
|
2655
|
-
label:
|
|
2656
|
+
label: n._document.$t("answerModal.signature.component.text.nameLabel")
|
|
2656
2657
|
}, {
|
|
2657
2658
|
default: N(() => [
|
|
2658
2659
|
B(r, {
|
|
2659
2660
|
ref: "nameInput",
|
|
2660
|
-
modelValue:
|
|
2661
|
-
"onUpdate:modelValue": t[2] || (t[2] = (c) =>
|
|
2662
|
-
placeholder:
|
|
2661
|
+
modelValue: e.text,
|
|
2662
|
+
"onUpdate:modelValue": t[2] || (t[2] = (c) => e.text = c),
|
|
2663
|
+
placeholder: n._document.$t("answerModal.signature.component.text.namePlaceholder")
|
|
2663
2664
|
}, null, 8, ["modelValue", "placeholder"])
|
|
2664
2665
|
]),
|
|
2665
2666
|
_: 1
|
|
2666
2667
|
}, 8, ["label"])) : L("", !0),
|
|
2667
|
-
y("div",
|
|
2668
|
+
y("div", Yn, [
|
|
2668
2669
|
t[3] || (t[3] = y("div", { class: "background-image" }, [
|
|
2669
2670
|
y("svg", {
|
|
2670
2671
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2685,26 +2686,26 @@ function Jn(e, t, o, i, n, s) {
|
|
|
2685
2686
|
})
|
|
2686
2687
|
])
|
|
2687
2688
|
], -1)),
|
|
2688
|
-
y("div",
|
|
2689
|
+
y("div", Gn, I(n._document.$t(`answerModal.signature.component.${e.mode}.canvasLabel`)), 1),
|
|
2689
2690
|
t[4] || (t[4] = y("span", { style: { "font-family": "'Nothing You Could Do', cursive" } }, null, -1)),
|
|
2690
2691
|
B(l, {
|
|
2691
2692
|
ref: "signaturePad",
|
|
2692
|
-
type:
|
|
2693
|
-
text:
|
|
2693
|
+
type: e.mode,
|
|
2694
|
+
text: e.text,
|
|
2694
2695
|
options: {
|
|
2695
|
-
penColor:
|
|
2696
|
+
penColor: e.penColor
|
|
2696
2697
|
},
|
|
2697
2698
|
"sign-events": {
|
|
2698
2699
|
endStroke: () => {
|
|
2699
|
-
|
|
2700
|
+
e.isEmpty = n.$refs.signaturePad ? n.$refs.signaturePad.isEmpty() : !0;
|
|
2700
2701
|
}
|
|
2701
2702
|
},
|
|
2702
2703
|
class: "signature-pad"
|
|
2703
2704
|
}, null, 8, ["type", "text", "options", "sign-events"])
|
|
2704
2705
|
]),
|
|
2705
|
-
Ue(y("div",
|
|
2706
|
+
Ue(y("div", Kn, [
|
|
2706
2707
|
B(u, {
|
|
2707
|
-
disabled:
|
|
2708
|
+
disabled: e.isEmpty,
|
|
2708
2709
|
type: "text",
|
|
2709
2710
|
size: "small",
|
|
2710
2711
|
pattern: "tertiary",
|
|
@@ -2713,7 +2714,7 @@ function Jn(e, t, o, i, n, s) {
|
|
|
2713
2714
|
onClick: s.reset
|
|
2714
2715
|
}, null, 8, ["disabled", "onClick"]),
|
|
2715
2716
|
B(u, {
|
|
2716
|
-
disabled:
|
|
2717
|
+
disabled: e.isEmpty,
|
|
2717
2718
|
type: "text",
|
|
2718
2719
|
size: "small",
|
|
2719
2720
|
pattern: "tertiary",
|
|
@@ -2722,20 +2723,17 @@ function Jn(e, t, o, i, n, s) {
|
|
|
2722
2723
|
onClick: s.undo
|
|
2723
2724
|
}, null, 8, ["disabled", "onClick"])
|
|
2724
2725
|
], 512), [
|
|
2725
|
-
[qe,
|
|
2726
|
+
[qe, e.mode === "draw"]
|
|
2726
2727
|
]),
|
|
2727
|
-
y("div",
|
|
2728
|
+
y("div", Jn, I(n._document.$t("answerModal.signature.component.terms")), 1)
|
|
2728
2729
|
]);
|
|
2729
2730
|
}
|
|
2730
|
-
const
|
|
2731
|
-
const e = window.location.host.split(".");
|
|
2732
|
-
return e && e[0];
|
|
2733
|
-
}, Zn = Qn() === "fortnox", ti = [
|
|
2731
|
+
const Qn = /* @__PURE__ */ tt(jn, [["render", Xn], ["__scopeId", "data-v-6857111d"]]), Zn = [
|
|
2734
2732
|
"enjoyedExperience",
|
|
2735
2733
|
// boolean value
|
|
2736
2734
|
"whatToImprove"
|
|
2737
2735
|
// string value
|
|
2738
|
-
],
|
|
2736
|
+
], ti = {
|
|
2739
2737
|
emits: ["page", "close"],
|
|
2740
2738
|
mixins: [Z([])],
|
|
2741
2739
|
props: {
|
|
@@ -2752,7 +2750,7 @@ const Xn = /* @__PURE__ */ tt(zn, [["render", Jn], ["__scopeId", "data-v-6857111
|
|
|
2752
2750
|
},
|
|
2753
2751
|
computed: {
|
|
2754
2752
|
showPostFeedbackActions() {
|
|
2755
|
-
return ke.value !== "widget" && !
|
|
2753
|
+
return ke.value !== "widget" && !He;
|
|
2756
2754
|
}
|
|
2757
2755
|
},
|
|
2758
2756
|
created() {
|
|
@@ -2761,39 +2759,39 @@ const Xn = /* @__PURE__ */ tt(zn, [["render", Jn], ["__scopeId", "data-v-6857111
|
|
|
2761
2759
|
});
|
|
2762
2760
|
},
|
|
2763
2761
|
methods: {
|
|
2764
|
-
async submitFeedback({ type:
|
|
2762
|
+
async submitFeedback({ type: n, data: t }) {
|
|
2765
2763
|
if (!this.publicId) throw Error("Missing param publicId");
|
|
2766
|
-
if (!
|
|
2767
|
-
if (!
|
|
2764
|
+
if (!n) throw Error("Missing param type");
|
|
2765
|
+
if (!Zn.includes(n)) throw Error("Invalid feedback type");
|
|
2768
2766
|
if (!t) throw Error("Missing param data");
|
|
2769
2767
|
let o = "positive";
|
|
2770
|
-
if (
|
|
2768
|
+
if (n === "whatToImprove" && !t.value) {
|
|
2771
2769
|
this.goTo("negative.success");
|
|
2772
2770
|
return;
|
|
2773
2771
|
}
|
|
2774
2772
|
try {
|
|
2775
|
-
Oe.feedback(this.publicId, { type:
|
|
2773
|
+
Oe.feedback(this.publicId, { type: n, data: t }), n === "enjoyedExperience" && !t.value && (o = "negative"), n === "whatToImprove" && (o = "negative.success");
|
|
2776
2774
|
} catch (i) {
|
|
2777
2775
|
Lt(i, { showMessage: !1 });
|
|
2778
2776
|
} finally {
|
|
2779
2777
|
this.goTo(o);
|
|
2780
2778
|
}
|
|
2781
2779
|
},
|
|
2782
|
-
async goTo(
|
|
2783
|
-
if (
|
|
2780
|
+
async goTo(n) {
|
|
2781
|
+
if (n === "positive" && !this.showPostFeedbackActions && setTimeout(() => {
|
|
2784
2782
|
this.close();
|
|
2785
|
-
}, 2e3), this.$emit("page",
|
|
2783
|
+
}, 2e3), this.$emit("page", n), n === "positive" || n === "negative") {
|
|
2786
2784
|
this.$refs.start.style.opacity = 0, this.page = "intermediate", setTimeout(() => {
|
|
2787
|
-
this.page =
|
|
2785
|
+
this.page = n;
|
|
2788
2786
|
}, 2e3);
|
|
2789
2787
|
return;
|
|
2790
2788
|
}
|
|
2791
|
-
this.page =
|
|
2789
|
+
this.page = n;
|
|
2792
2790
|
},
|
|
2793
2791
|
startAnimation() {
|
|
2794
|
-
const
|
|
2795
|
-
|
|
2796
|
-
targets:
|
|
2792
|
+
const n = this.$refs.feedbackBg;
|
|
2793
|
+
n.gradOneXPos = 0, n.gradOneYPos = 0, n.gradTwoXPos = 80, n.gradTwoYPos = 20, n.gradThreeXPos = 20, n.gradThreeYPos = 80, n.gradFourXPos = 80, n.gradFourYPos = 80, z({
|
|
2794
|
+
targets: n,
|
|
2797
2795
|
duration: 12e3,
|
|
2798
2796
|
direction: "alternate",
|
|
2799
2797
|
easing: "linear",
|
|
@@ -2807,38 +2805,38 @@ const Xn = /* @__PURE__ */ tt(zn, [["render", Jn], ["__scopeId", "data-v-6857111
|
|
|
2807
2805
|
gradFourXPos: [85, 80, 75, 70, 95],
|
|
2808
2806
|
gradFourYPos: [90, 100, 120, 100, 85],
|
|
2809
2807
|
update() {
|
|
2810
|
-
|
|
2808
|
+
n.style.setProperty(
|
|
2811
2809
|
"--gradOneXPos",
|
|
2812
|
-
`${
|
|
2813
|
-
),
|
|
2810
|
+
`${n.gradOneXPos}%`
|
|
2811
|
+
), n.style.setProperty(
|
|
2814
2812
|
"--gradOneYPos",
|
|
2815
|
-
`${
|
|
2816
|
-
),
|
|
2813
|
+
`${n.gradOneYPos}%`
|
|
2814
|
+
), n.style.setProperty(
|
|
2817
2815
|
"--gradTwoXPos",
|
|
2818
|
-
`${
|
|
2819
|
-
),
|
|
2816
|
+
`${n.gradTwoXPos}%`
|
|
2817
|
+
), n.style.setProperty(
|
|
2820
2818
|
"--gradTwoYPos",
|
|
2821
|
-
`${
|
|
2822
|
-
),
|
|
2819
|
+
`${n.gradTwoYPos}%`
|
|
2820
|
+
), n.style.setProperty(
|
|
2823
2821
|
"--gradThreeXPos",
|
|
2824
|
-
`${
|
|
2825
|
-
),
|
|
2822
|
+
`${n.gradThreeXPos}%`
|
|
2823
|
+
), n.style.setProperty(
|
|
2826
2824
|
"--gradThreeYPos",
|
|
2827
|
-
`${
|
|
2828
|
-
),
|
|
2825
|
+
`${n.gradThreeYPos}%`
|
|
2826
|
+
), n.style.setProperty(
|
|
2829
2827
|
"--gradFourXPos",
|
|
2830
|
-
`${
|
|
2831
|
-
),
|
|
2828
|
+
`${n.gradFourXPos}%`
|
|
2829
|
+
), n.style.setProperty(
|
|
2832
2830
|
"--gradFourYPos",
|
|
2833
|
-
`${
|
|
2831
|
+
`${n.gradFourYPos}%`
|
|
2834
2832
|
);
|
|
2835
2833
|
}
|
|
2836
2834
|
});
|
|
2837
2835
|
},
|
|
2838
2836
|
// animations
|
|
2839
|
-
leave(
|
|
2837
|
+
leave(n, t) {
|
|
2840
2838
|
z({
|
|
2841
|
-
targets:
|
|
2839
|
+
targets: n,
|
|
2842
2840
|
// height: 0,
|
|
2843
2841
|
// opacity: [1, 0],
|
|
2844
2842
|
opacity: 0,
|
|
@@ -2847,9 +2845,9 @@ const Xn = /* @__PURE__ */ tt(zn, [["render", Jn], ["__scopeId", "data-v-6857111
|
|
|
2847
2845
|
complete: t
|
|
2848
2846
|
});
|
|
2849
2847
|
},
|
|
2850
|
-
enter(
|
|
2848
|
+
enter(n, t) {
|
|
2851
2849
|
z({
|
|
2852
|
-
targets:
|
|
2850
|
+
targets: n,
|
|
2853
2851
|
delay: this.page === "intermediate" ? 250 : 0,
|
|
2854
2852
|
duration: 500,
|
|
2855
2853
|
opacity: [0, 1],
|
|
@@ -2861,32 +2859,32 @@ const Xn = /* @__PURE__ */ tt(zn, [["render", Jn], ["__scopeId", "data-v-6857111
|
|
|
2861
2859
|
this.$emit("close");
|
|
2862
2860
|
}
|
|
2863
2861
|
}
|
|
2864
|
-
},
|
|
2862
|
+
}, ei = { class: "f-feedback" }, ni = {
|
|
2865
2863
|
ref: "feedbackBg",
|
|
2866
2864
|
class: "f-bg"
|
|
2867
|
-
},
|
|
2865
|
+
}, ii = { class: "f-container" }, si = {
|
|
2868
2866
|
ref: "start",
|
|
2869
2867
|
key: "start",
|
|
2870
2868
|
class: "flex w-full flex-col items-center justify-center",
|
|
2871
2869
|
style: { transition: "opacity 250ms" }
|
|
2872
|
-
},
|
|
2870
|
+
}, oi = ["textContent"], ri = {
|
|
2873
2871
|
key: "intermediate",
|
|
2874
2872
|
style: { height: "100%", display: "flex", "flex-direction": "column" }
|
|
2875
|
-
},
|
|
2873
|
+
}, ai = { style: { flex: "1 1 auto", display: "flex", "flex-direction": "column", "justify-content": "center", "align-items": "center" } }, li = ["textContent"], ci = {
|
|
2876
2874
|
key: "positive",
|
|
2877
2875
|
style: { height: "100%", display: "flex", "flex-direction": "column" }
|
|
2878
|
-
},
|
|
2876
|
+
}, ui = { style: { flex: "1 1 auto", display: "flex", "flex-direction": "column", "justify-content": "center", "align-items": "center" } }, di = ["textContent"], hi = ["textContent"], fi = {
|
|
2879
2877
|
key: "negative",
|
|
2880
2878
|
style: { height: "100%", display: "flex", "flex-direction": "column" }
|
|
2881
|
-
},
|
|
2879
|
+
}, gi = { style: { flex: "1 1 auto", display: "flex", "flex-direction": "column", "justify-content": "center", "align-items": "center" } }, mi = ["textContent"], pi = ["textContent"], wi = {
|
|
2882
2880
|
key: "success",
|
|
2883
2881
|
style: { height: "100%", display: "flex", "flex-direction": "column" }
|
|
2884
|
-
},
|
|
2885
|
-
function
|
|
2882
|
+
}, yi = { style: { flex: "1 1 auto", display: "flex", "flex-direction": "column", "justify-content": "center", "align-items": "center" } }, vi = ["textContent"], _i = ["textContent"];
|
|
2883
|
+
function Ci(n, t, o, i, e, s) {
|
|
2886
2884
|
const r = $("CButton"), a = $("CInput");
|
|
2887
|
-
return D(), R("div",
|
|
2888
|
-
y("div",
|
|
2889
|
-
y("div",
|
|
2885
|
+
return D(), R("div", ei, [
|
|
2886
|
+
y("div", ni, null, 512),
|
|
2887
|
+
y("div", ii, [
|
|
2890
2888
|
B(Ut, {
|
|
2891
2889
|
css: !1,
|
|
2892
2890
|
mode: "out-in",
|
|
@@ -2894,11 +2892,11 @@ function xi(e, t, o, i, n, s) {
|
|
|
2894
2892
|
onLeave: s.leave
|
|
2895
2893
|
}, {
|
|
2896
2894
|
default: N(() => [
|
|
2897
|
-
|
|
2895
|
+
e.page === "start" ? (D(), R("div", si, [
|
|
2898
2896
|
y("div", {
|
|
2899
2897
|
style: { "padding-bottom": "calc(1.5 * var(--rem))", "font-size": "14px", "font-weight": "500" },
|
|
2900
|
-
textContent: I(
|
|
2901
|
-
}, null, 8,
|
|
2898
|
+
textContent: I(n._document.$t("answerFeedback.start.title"))
|
|
2899
|
+
}, null, 8, oi),
|
|
2902
2900
|
y("div", null, [
|
|
2903
2901
|
B(r, {
|
|
2904
2902
|
"icon-left": "thumbsdown",
|
|
@@ -2911,7 +2909,7 @@ function xi(e, t, o, i, n, s) {
|
|
|
2911
2909
|
}))
|
|
2912
2910
|
}, {
|
|
2913
2911
|
default: N(() => [
|
|
2914
|
-
K(I(
|
|
2912
|
+
K(I(n._document.$t("answerFeedback.start.no")), 1)
|
|
2915
2913
|
]),
|
|
2916
2914
|
_: 1
|
|
2917
2915
|
}),
|
|
@@ -2927,27 +2925,27 @@ function xi(e, t, o, i, n, s) {
|
|
|
2927
2925
|
}))
|
|
2928
2926
|
}, {
|
|
2929
2927
|
default: N(() => [
|
|
2930
|
-
K(I(
|
|
2928
|
+
K(I(n._document.$t("answerFeedback.start.yes")), 1)
|
|
2931
2929
|
]),
|
|
2932
2930
|
_: 1
|
|
2933
2931
|
})
|
|
2934
2932
|
])
|
|
2935
|
-
], 512)) :
|
|
2936
|
-
y("div",
|
|
2933
|
+
], 512)) : e.page === "intermediate" ? (D(), R("div", ri, [
|
|
2934
|
+
y("div", ai, [
|
|
2937
2935
|
y("div", {
|
|
2938
2936
|
class: "f-title",
|
|
2939
|
-
textContent: I(
|
|
2940
|
-
}, null, 8,
|
|
2937
|
+
textContent: I(n._document.$t("answerFeedback.intermediate.title"))
|
|
2938
|
+
}, null, 8, li)
|
|
2941
2939
|
])
|
|
2942
|
-
])) :
|
|
2943
|
-
y("div",
|
|
2940
|
+
])) : e.page === "positive" ? (D(), R("div", ci, [
|
|
2941
|
+
y("div", ui, [
|
|
2944
2942
|
y("div", {
|
|
2945
2943
|
class: "f-title",
|
|
2946
|
-
textContent: I(
|
|
2947
|
-
}, null, 8,
|
|
2944
|
+
textContent: I(n._document.$t("answerFeedback.yes.title"))
|
|
2945
|
+
}, null, 8, di),
|
|
2948
2946
|
y("div", {
|
|
2949
|
-
textContent: I(
|
|
2950
|
-
}, null, 8,
|
|
2947
|
+
textContent: I(n._document.$t("answerFeedback.yes.text"))
|
|
2948
|
+
}, null, 8, hi)
|
|
2951
2949
|
]),
|
|
2952
2950
|
B(r, {
|
|
2953
2951
|
class: "a-btn",
|
|
@@ -2957,31 +2955,31 @@ function xi(e, t, o, i, n, s) {
|
|
|
2957
2955
|
href: "/register?utm_source=document&utm_medium=feedback-modal&utm_campaign=signup&utm_content=positive-exp",
|
|
2958
2956
|
target: "_blank",
|
|
2959
2957
|
style: { "margin-bottom": "0.5em" },
|
|
2960
|
-
textContent: I(
|
|
2958
|
+
textContent: I(n._document.$t("answerFeedback.yes.action"))
|
|
2961
2959
|
}, null, 8, ["textContent"]),
|
|
2962
2960
|
B(r, {
|
|
2963
2961
|
class: "a-btn",
|
|
2964
2962
|
wide: "",
|
|
2965
2963
|
tag: "a",
|
|
2966
|
-
href: `https://${
|
|
2964
|
+
href: `https://${n.$t(
|
|
2967
2965
|
"_common:brand.domain"
|
|
2968
2966
|
)}?utm_source=document&utm_medium=feedback-modal&utm_campaign=learn-more&utm_content=positive-exp`,
|
|
2969
2967
|
target: "_blank",
|
|
2970
|
-
textContent: I(
|
|
2968
|
+
textContent: I(n._document.$t("answerFeedback.yes.secondary"))
|
|
2971
2969
|
}, null, 8, ["href", "textContent"])
|
|
2972
|
-
])) :
|
|
2973
|
-
y("div",
|
|
2970
|
+
])) : e.page === "negative" ? (D(), R("div", fi, [
|
|
2971
|
+
y("div", gi, [
|
|
2974
2972
|
y("div", {
|
|
2975
2973
|
class: "f-title",
|
|
2976
|
-
textContent: I(
|
|
2977
|
-
}, null, 8,
|
|
2974
|
+
textContent: I(n._document.$t("answerFeedback.no.start.title"))
|
|
2975
|
+
}, null, 8, mi),
|
|
2978
2976
|
y("div", {
|
|
2979
|
-
textContent: I(
|
|
2980
|
-
}, null, 8,
|
|
2977
|
+
textContent: I(n._document.$t("answerFeedback.no.start.text"))
|
|
2978
|
+
}, null, 8, pi),
|
|
2981
2979
|
B(a, {
|
|
2982
|
-
modelValue:
|
|
2983
|
-
"onUpdate:modelValue": t[2] || (t[2] = (l) =>
|
|
2984
|
-
placeholder:
|
|
2980
|
+
modelValue: e.whatToImprove,
|
|
2981
|
+
"onUpdate:modelValue": t[2] || (t[2] = (l) => e.whatToImprove = l),
|
|
2982
|
+
placeholder: n._document.$t("answerFeedback.no.start.placeholder"),
|
|
2985
2983
|
type: "textarea",
|
|
2986
2984
|
class: "input-style",
|
|
2987
2985
|
style: { margin: "2em 0" }
|
|
@@ -2992,37 +2990,37 @@ function xi(e, t, o, i, n, s) {
|
|
|
2992
2990
|
class: "a-btn",
|
|
2993
2991
|
onClick: t[3] || (t[3] = (l) => s.submitFeedback({
|
|
2994
2992
|
type: "whatToImprove",
|
|
2995
|
-
data: { value:
|
|
2993
|
+
data: { value: e.whatToImprove }
|
|
2996
2994
|
})),
|
|
2997
|
-
textContent: I(
|
|
2995
|
+
textContent: I(n._document.$t("answerFeedback.no.start.action"))
|
|
2998
2996
|
}, null, 8, ["textContent"])
|
|
2999
|
-
])) :
|
|
3000
|
-
y("div",
|
|
2997
|
+
])) : e.page === "negative.success" ? (D(), R("div", wi, [
|
|
2998
|
+
y("div", yi, [
|
|
3001
2999
|
y("div", {
|
|
3002
3000
|
class: "f-title",
|
|
3003
|
-
textContent: I(
|
|
3004
|
-
}, null, 8,
|
|
3001
|
+
textContent: I(n._document.$t("answerFeedback.no.success.title"))
|
|
3002
|
+
}, null, 8, vi),
|
|
3005
3003
|
y("div", {
|
|
3006
|
-
textContent: I(
|
|
3007
|
-
}, null, 8,
|
|
3004
|
+
textContent: I(n._document.$t("answerFeedback.no.success.text"))
|
|
3005
|
+
}, null, 8, _i)
|
|
3008
3006
|
]),
|
|
3009
3007
|
B(r, {
|
|
3010
3008
|
class: "a-btn",
|
|
3011
3009
|
tag: "a",
|
|
3012
|
-
href: `https://${
|
|
3010
|
+
href: `https://${n.$t(
|
|
3013
3011
|
"_common:brand.domain"
|
|
3014
3012
|
)}?utm_source=document&utm_medium=feedback-modal&utm_campaign=learn-more&utm_content=negative-exp`,
|
|
3015
3013
|
target: "_blank",
|
|
3016
3014
|
wide: "",
|
|
3017
3015
|
type: "secondary",
|
|
3018
3016
|
style: { "margin-bottom": "0.5em" },
|
|
3019
|
-
textContent: I(
|
|
3017
|
+
textContent: I(n._document.$t("answerFeedback.no.success.action"))
|
|
3020
3018
|
}, null, 8, ["href", "textContent"]),
|
|
3021
3019
|
B(r, {
|
|
3022
3020
|
class: "a-btn",
|
|
3023
3021
|
wide: "",
|
|
3024
3022
|
onClick: s.close,
|
|
3025
|
-
textContent: I(
|
|
3023
|
+
textContent: I(n._document.$t("answerFeedback.no.success.secondary"))
|
|
3026
3024
|
}, null, 8, ["onClick", "textContent"])
|
|
3027
3025
|
])) : L("", !0)
|
|
3028
3026
|
]),
|
|
@@ -3031,12 +3029,12 @@ function xi(e, t, o, i, n, s) {
|
|
|
3031
3029
|
])
|
|
3032
3030
|
]);
|
|
3033
3031
|
}
|
|
3034
|
-
const
|
|
3032
|
+
const xi = /* @__PURE__ */ tt(ti, [["render", Ci], ["__scopeId", "data-v-ca06a183"]]), bi = {
|
|
3035
3033
|
components: {
|
|
3036
|
-
Feedback:
|
|
3037
|
-
Signature:
|
|
3038
|
-
BankId:
|
|
3039
|
-
Deny:
|
|
3034
|
+
Feedback: xi,
|
|
3035
|
+
Signature: Qn,
|
|
3036
|
+
BankId: An,
|
|
3037
|
+
Deny: Fn
|
|
3040
3038
|
},
|
|
3041
3039
|
mixins: [Z([])],
|
|
3042
3040
|
i18nOptions: {
|
|
@@ -3078,17 +3076,17 @@ const bi = /* @__PURE__ */ tt(ei, [["render", xi], ["__scopeId", "data-v-ed8d6ec
|
|
|
3078
3076
|
return this.isSender ? this._document.senderClient : this._document.viewer;
|
|
3079
3077
|
},
|
|
3080
3078
|
answerMethod() {
|
|
3081
|
-
var
|
|
3082
|
-
return (
|
|
3079
|
+
var n;
|
|
3080
|
+
return (n = this.signee.answerMethod) == null ? void 0 : n.accept;
|
|
3083
3081
|
},
|
|
3084
3082
|
successStrings() {
|
|
3085
|
-
const
|
|
3083
|
+
const n = this.signee.email ? this._document.$t(`answerModal.${this.answerType}.success.text`, {
|
|
3086
3084
|
email: this.signee.email
|
|
3087
3085
|
}) : this._document.$t(
|
|
3088
3086
|
`answerModal.${this.answerType}.success.textFallback`
|
|
3089
3087
|
), t = this.signee.email ? this._document.$t("answerModal.successTextSingle", {
|
|
3090
3088
|
email: this.signee.email
|
|
3091
|
-
}) : this._document.$t("answerModal.successTextFallbackSingle"), o = this._document.remainingSignatures === 0 ? t :
|
|
3089
|
+
}) : this._document.$t("answerModal.successTextFallbackSingle"), o = this._document.remainingSignatures === 0 ? t : n;
|
|
3092
3090
|
return {
|
|
3093
3091
|
title: this._document.$t(
|
|
3094
3092
|
`answerModal.${this.answerType}.success.title`
|
|
@@ -3113,16 +3111,16 @@ const bi = /* @__PURE__ */ tt(ei, [["render", xi], ["__scopeId", "data-v-ed8d6ec
|
|
|
3113
3111
|
if (!this.isPosting) {
|
|
3114
3112
|
this.isPosting = !0;
|
|
3115
3113
|
try {
|
|
3116
|
-
const { submit:
|
|
3117
|
-
if (typeof
|
|
3114
|
+
const { submit: n } = this.$refs.answerComponent || {};
|
|
3115
|
+
if (typeof n != "function")
|
|
3118
3116
|
throw Error("Missing answer type submit method");
|
|
3119
|
-
await
|
|
3117
|
+
await n({
|
|
3120
3118
|
update: (t) => this.putCurrentDoc({ includeChanges: !0, ...t }),
|
|
3121
3119
|
answer: this.answerCurrentDoc,
|
|
3122
3120
|
...this.isSender ? this.senderActions : null
|
|
3123
3121
|
});
|
|
3124
|
-
} catch (
|
|
3125
|
-
this.isPosting = !1,
|
|
3122
|
+
} catch (n) {
|
|
3123
|
+
this.isPosting = !1, n.httpStatusCode === 409 ? this.page = "versionError" : Lt(n);
|
|
3126
3124
|
}
|
|
3127
3125
|
}
|
|
3128
3126
|
},
|
|
@@ -3157,9 +3155,9 @@ const bi = /* @__PURE__ */ tt(ei, [["render", xi], ["__scopeId", "data-v-ed8d6ec
|
|
|
3157
3155
|
setFixedHeight() {
|
|
3158
3156
|
this.$el.style.minHeight = `${this.$el.offsetHeight}px`;
|
|
3159
3157
|
},
|
|
3160
|
-
minimizeHeight(
|
|
3158
|
+
minimizeHeight(n, t) {
|
|
3161
3159
|
z({
|
|
3162
|
-
targets:
|
|
3160
|
+
targets: n,
|
|
3163
3161
|
height: 0,
|
|
3164
3162
|
flexGrow: [1, 0],
|
|
3165
3163
|
opacity: [1, 0],
|
|
@@ -3174,9 +3172,9 @@ const bi = /* @__PURE__ */ tt(ei, [["render", xi], ["__scopeId", "data-v-ed8d6ec
|
|
|
3174
3172
|
easing: "easeOutQuint"
|
|
3175
3173
|
});
|
|
3176
3174
|
},
|
|
3177
|
-
enterAnim(
|
|
3175
|
+
enterAnim(n, t) {
|
|
3178
3176
|
z({
|
|
3179
|
-
targets:
|
|
3177
|
+
targets: n.querySelectorAll(".stagger-anim"),
|
|
3180
3178
|
opacity: [0, 1],
|
|
3181
3179
|
delay: z.stagger(180, { start: 800 }),
|
|
3182
3180
|
duration: 340,
|
|
@@ -3184,9 +3182,9 @@ const bi = /* @__PURE__ */ tt(ei, [["render", xi], ["__scopeId", "data-v-ed8d6ec
|
|
|
3184
3182
|
complete: t
|
|
3185
3183
|
});
|
|
3186
3184
|
},
|
|
3187
|
-
leaveAnim(
|
|
3188
|
-
|
|
3189
|
-
targets:
|
|
3185
|
+
leaveAnim(n, t) {
|
|
3186
|
+
n.style.position = "absolute", z({
|
|
3187
|
+
targets: n.querySelectorAll(".stagger-anim"),
|
|
3190
3188
|
opacity: 0,
|
|
3191
3189
|
delay: z.stagger(200),
|
|
3192
3190
|
duration: 200,
|
|
@@ -3195,47 +3193,47 @@ const bi = /* @__PURE__ */ tt(ei, [["render", xi], ["__scopeId", "data-v-ed8d6ec
|
|
|
3195
3193
|
});
|
|
3196
3194
|
}
|
|
3197
3195
|
}
|
|
3198
|
-
},
|
|
3196
|
+
}, Pi = {
|
|
3199
3197
|
key: "start",
|
|
3200
3198
|
class: "root-padding flex-grow"
|
|
3201
|
-
},
|
|
3199
|
+
}, Ei = {
|
|
3202
3200
|
class: "stagger-anim",
|
|
3203
3201
|
style: { "padding-bottom": "40px" }
|
|
3204
|
-
},
|
|
3202
|
+
}, ki = ["textContent"], Si = ["textContent"], Ti = {
|
|
3205
3203
|
class: "stagger-anim",
|
|
3206
3204
|
style: { "padding-top": "3em" }
|
|
3207
|
-
},
|
|
3205
|
+
}, Mi = {
|
|
3208
3206
|
key: "intermediate",
|
|
3209
3207
|
class: "flex w-full flex-grow flex-col items-center justify-center text-center",
|
|
3210
3208
|
style: { height: "100%" }
|
|
3211
|
-
},
|
|
3209
|
+
}, Ii = ["textContent"], Ai = {
|
|
3212
3210
|
key: "success",
|
|
3213
3211
|
class: "flex w-full flex-grow flex-col",
|
|
3214
3212
|
style: { height: "100%" }
|
|
3215
|
-
},
|
|
3213
|
+
}, Bi = {
|
|
3216
3214
|
key: 0,
|
|
3217
3215
|
class: "flex w-full flex-grow flex-col items-center justify-center",
|
|
3218
3216
|
style: { overflow: "hidden" }
|
|
3219
|
-
},
|
|
3217
|
+
}, Di = {
|
|
3220
3218
|
style: { height: "100%" },
|
|
3221
3219
|
class: "root-padding flex w-full flex-col items-center justify-center"
|
|
3222
|
-
},
|
|
3220
|
+
}, Ri = {
|
|
3223
3221
|
class: "a-title stagger-anim",
|
|
3224
3222
|
style: { padding: "calc(2.5 * var(--rem)) 0 calc(2 * var(--rem))" }
|
|
3225
|
-
},
|
|
3223
|
+
}, Fi = ["textContent"], $i = ["textContent"], Ni = {
|
|
3226
3224
|
key: "versionError",
|
|
3227
3225
|
class: "root-padding flex flex-grow flex-col items-center justify-center text-center"
|
|
3228
|
-
},
|
|
3226
|
+
}, Li = { class: "stagger-anim" }, Ui = {
|
|
3229
3227
|
class: "flex items-center justify-center",
|
|
3230
3228
|
style: { padding: "20px 0" }
|
|
3231
|
-
},
|
|
3229
|
+
}, qi = {
|
|
3232
3230
|
class: "flex items-center justify-center",
|
|
3233
3231
|
style: { width: "52px", height: "52px", "border-radius": "50%" }
|
|
3234
|
-
},
|
|
3232
|
+
}, Oi = ["textContent"], zi = ["textContent"], ji = {
|
|
3235
3233
|
class: "stagger-anim",
|
|
3236
3234
|
style: { "padding-top": "3em" }
|
|
3237
3235
|
};
|
|
3238
|
-
function
|
|
3236
|
+
function Vi(n, t, o, i, e, s) {
|
|
3239
3237
|
const r = $("CButton"), a = $("Feedback"), l = $("CIcon");
|
|
3240
3238
|
return D(), Q(Ve, {
|
|
3241
3239
|
class: "a-root font-inter",
|
|
@@ -3254,66 +3252,66 @@ function Wi(e, t, o, i, n, s) {
|
|
|
3254
3252
|
circle: "",
|
|
3255
3253
|
class: "text-[hsl(0, 0%, 45%)] absolute right-5 top-5 z-[9]",
|
|
3256
3254
|
onClick: t[0] || (t[0] = () => {
|
|
3257
|
-
|
|
3255
|
+
n.$emit("cancel"), n.$emit("close");
|
|
3258
3256
|
})
|
|
3259
3257
|
}),
|
|
3260
|
-
|
|
3261
|
-
y("div",
|
|
3258
|
+
e.page === "start" ? (D(), R("div", Pi, [
|
|
3259
|
+
y("div", Ei, [
|
|
3262
3260
|
y("div", {
|
|
3263
3261
|
class: "a-title",
|
|
3264
|
-
textContent: I(
|
|
3265
|
-
}, null, 8,
|
|
3262
|
+
textContent: I(n._document.$t(`answerModal.${s.answerType}.start.title`))
|
|
3263
|
+
}, null, 8, ki),
|
|
3266
3264
|
y("div", {
|
|
3267
3265
|
style: { color: "hsl(0, 0%, 40%)" },
|
|
3268
|
-
textContent: I(
|
|
3269
|
-
}, null, 8,
|
|
3266
|
+
textContent: I(n._document.$t(`answerModal.${s.answerType}.start.text`))
|
|
3267
|
+
}, null, 8, Si)
|
|
3270
3268
|
]),
|
|
3271
3269
|
(D(), Q(je(s.answerComponentName), {
|
|
3272
3270
|
ref: "answerComponent",
|
|
3273
|
-
_document:
|
|
3271
|
+
_document: n._document,
|
|
3274
3272
|
signee: s.signee,
|
|
3275
3273
|
"on-complete-func": s.onComplete,
|
|
3276
3274
|
class: "stagger-anim",
|
|
3277
|
-
onInvalid: t[1] || (t[1] = (c) =>
|
|
3278
|
-
onLoading: t[2] || (t[2] = (c) =>
|
|
3275
|
+
onInvalid: t[1] || (t[1] = (c) => e.actionInvalid = c),
|
|
3276
|
+
onLoading: t[2] || (t[2] = (c) => e.isPosting = c)
|
|
3279
3277
|
}, null, 40, ["_document", "signee", "on-complete-func"])),
|
|
3280
|
-
y("div",
|
|
3278
|
+
y("div", Ti, [
|
|
3281
3279
|
B(r, {
|
|
3282
|
-
loading:
|
|
3283
|
-
disabled:
|
|
3280
|
+
loading: e.isPosting,
|
|
3281
|
+
disabled: e.actionInvalid,
|
|
3284
3282
|
type: o.mode === "decline" ? "text" : "secondary",
|
|
3285
3283
|
class: "a-btn",
|
|
3286
3284
|
icon: s.answerType === "bankId" ? "bankId" : "",
|
|
3287
3285
|
onClick: s.onSubmit
|
|
3288
3286
|
}, {
|
|
3289
3287
|
default: N(() => [
|
|
3290
|
-
K(I(
|
|
3288
|
+
K(I(n._document.$t(`answerModal.${s.answerType}.start.action`)), 1)
|
|
3291
3289
|
]),
|
|
3292
3290
|
_: 1
|
|
3293
3291
|
}, 8, ["loading", "disabled", "type", "icon", "onClick"])
|
|
3294
3292
|
])
|
|
3295
|
-
])) :
|
|
3293
|
+
])) : e.page === "intermediate" ? (D(), R("div", Mi, [
|
|
3296
3294
|
y("div", {
|
|
3297
3295
|
class: "a-title stagger-anim",
|
|
3298
|
-
textContent: I(
|
|
3299
|
-
}, null, 8,
|
|
3300
|
-
])) :
|
|
3296
|
+
textContent: I(n._document.$t("answerModal.answerSuccess"))
|
|
3297
|
+
}, null, 8, Ii)
|
|
3298
|
+
])) : e.page === "success" ? (D(), R("div", Ai, [
|
|
3301
3299
|
B(Ut, {
|
|
3302
3300
|
css: !1,
|
|
3303
3301
|
onLeave: s.minimizeHeight
|
|
3304
3302
|
}, {
|
|
3305
3303
|
default: N(() => [
|
|
3306
|
-
|
|
3307
|
-
y("div",
|
|
3308
|
-
y("div",
|
|
3304
|
+
e.isFeedbackInitiated ? L("", !0) : (D(), R("div", Bi, [
|
|
3305
|
+
y("div", Di, [
|
|
3306
|
+
y("div", Ri, [
|
|
3309
3307
|
y("div", {
|
|
3310
3308
|
textContent: I(s.successStrings.title)
|
|
3311
|
-
}, null, 8,
|
|
3309
|
+
}, null, 8, Fi)
|
|
3312
3310
|
]),
|
|
3313
3311
|
y("div", {
|
|
3314
3312
|
class: "stagger-anim",
|
|
3315
3313
|
textContent: I(s.successStrings.text)
|
|
3316
|
-
}, null, 8,
|
|
3314
|
+
}, null, 8, $i)
|
|
3317
3315
|
])
|
|
3318
3316
|
]))
|
|
3319
3317
|
]),
|
|
@@ -3321,17 +3319,17 @@ function Wi(e, t, o, i, n, s) {
|
|
|
3321
3319
|
}, 8, ["onLeave"]),
|
|
3322
3320
|
B(a, {
|
|
3323
3321
|
ref: "feedback",
|
|
3324
|
-
"public-id": (u =
|
|
3325
|
-
_document:
|
|
3322
|
+
"public-id": (u = n._document.viewer) == null ? void 0 : u.publicDocumentId,
|
|
3323
|
+
_document: n._document,
|
|
3326
3324
|
style: { flex: "0 0", overflow: "hidden", "min-height": "200px" },
|
|
3327
3325
|
class: "stagger-anim",
|
|
3328
|
-
onPage: t[3] || (t[3] = () =>
|
|
3329
|
-
onClose: t[4] || (t[4] = (c) =>
|
|
3326
|
+
onPage: t[3] || (t[3] = () => e.isFeedbackInitiated = !0),
|
|
3327
|
+
onClose: t[4] || (t[4] = (c) => n.$emit("close"))
|
|
3330
3328
|
}, null, 8, ["public-id", "_document"])
|
|
3331
|
-
])) :
|
|
3332
|
-
y("div",
|
|
3333
|
-
y("div",
|
|
3334
|
-
y("div",
|
|
3329
|
+
])) : e.page === "versionError" ? (D(), R("div", Ni, [
|
|
3330
|
+
y("div", Li, [
|
|
3331
|
+
y("div", Ui, [
|
|
3332
|
+
y("div", qi, [
|
|
3335
3333
|
B(l, {
|
|
3336
3334
|
size: 30,
|
|
3337
3335
|
type: "error"
|
|
@@ -3340,21 +3338,21 @@ function Wi(e, t, o, i, n, s) {
|
|
|
3340
3338
|
]),
|
|
3341
3339
|
y("div", {
|
|
3342
3340
|
class: "a-title",
|
|
3343
|
-
textContent: I(
|
|
3344
|
-
}, null, 8,
|
|
3341
|
+
textContent: I(n._document.$t(`answerModal.versionError.${o.mode}.title`))
|
|
3342
|
+
}, null, 8, Oi),
|
|
3345
3343
|
y("div", {
|
|
3346
|
-
textContent: I(
|
|
3347
|
-
}, null, 8,
|
|
3344
|
+
textContent: I(n._document.$t("answerModal.versionError.text"))
|
|
3345
|
+
}, null, 8, zi)
|
|
3348
3346
|
]),
|
|
3349
|
-
y("div",
|
|
3347
|
+
y("div", ji, [
|
|
3350
3348
|
B(r, {
|
|
3351
|
-
loading:
|
|
3349
|
+
loading: e.isPosting,
|
|
3352
3350
|
type: "none",
|
|
3353
3351
|
class: "a-btn",
|
|
3354
3352
|
onClick: s.reload
|
|
3355
3353
|
}, {
|
|
3356
3354
|
default: N(() => [
|
|
3357
|
-
K(I(
|
|
3355
|
+
K(I(n._document.$t("answerModal.versionError.btn")), 1)
|
|
3358
3356
|
]),
|
|
3359
3357
|
_: 1
|
|
3360
3358
|
}, 8, ["loading", "onClick"])
|
|
@@ -3365,7 +3363,7 @@ function Wi(e, t, o, i, n, s) {
|
|
|
3365
3363
|
_: 1
|
|
3366
3364
|
}, 8, ["onEnter", "onLeave"]);
|
|
3367
3365
|
}
|
|
3368
|
-
const Ji = /* @__PURE__ */ tt(
|
|
3366
|
+
const Ji = /* @__PURE__ */ tt(bi, [["render", Vi], ["__scopeId", "data-v-494b4312"]]);
|
|
3369
3367
|
export {
|
|
3370
3368
|
Ji as default
|
|
3371
3369
|
};
|