@cling-se/widget 0.21.3 → 0.22.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 +16 -0
- package/dist/{AddClientCallout-CodlIQwE.js → AddClientCallout-CxbvK6ZG.js} +7 -7
- package/dist/{AnswerModal-J1UhMHpo.js → AnswerModal-vTetGwVn.js} +935 -651
- package/dist/{AttachmentItem-B0_8bPKy.js → AttachmentItem-DSHNRIq_.js} +9 -9
- package/dist/{BaseUpload-DuqbaH9l.js → BaseUpload-CWaM_bb7.js} +2 -2
- package/dist/{BlockMedia-Dy_--7Vj.js → BlockMedia-B1T85G4R.js} +9 -9
- package/dist/{CCallout-CmuwGNSi.js → CCallout-BieMmWa4.js} +5 -5
- package/dist/{CCurrencyDropdown-B8g2vrhq.js → CCurrencyDropdown-DKWtCUE_.js} +3 -3
- package/dist/{CDropdownItem-CM3Ir-XA.js → CDropdownItem-pNNH9fV3.js} +13 -13
- package/dist/{CFormField.vue_vue_type_script_setup_true_lang-C1P9Y9Tg.js → CFormField.vue_vue_type_script_setup_true_lang-B57OaS--.js} +14 -14
- package/dist/{CPhoneFormat-C0kGNp6W.js → CPhoneFormat-CyrQRGmd.js} +1 -1
- package/dist/{CPhoneInput-BUgER0Oa.js → CPhoneInput-BQHgpUCY.js} +5 -5
- package/dist/{CPriceInput-BQF9nkwR.js → CPriceInput-DnFN-I6p.js} +2 -2
- package/dist/{CSelect-H8jAu9Ae.js → CSelect-DB4-JxH8.js} +5 -5
- package/dist/{CSkeleton-C0XDwN9S.js → CSkeleton-DpRDxR6D.js} +7 -7
- package/dist/{ClientAutocomplete-BoNP8_4h.js → ClientAutocomplete-BjwvkuJ-.js} +19 -19
- package/dist/{ClientModal-DWFXbAOk.js → ClientModal-oBN2VSio.js} +138 -130
- package/dist/{ColorPicker-Bdwc47q6.js → ColorPicker-B5rSvXLV.js} +21 -21
- package/dist/{CompanyModal-CD6ojsz7.js → CompanyModal-QrsUL6Et.js} +13 -13
- package/dist/{ContentWrapper-Do4aBTL8.js → ContentWrapper-Yx-KMsfH.js} +22 -22
- package/dist/{CoverBlockSettings-4MmtvSy8.js → CoverBlockSettings-C8giTiEZ.js} +19 -19
- package/dist/{DocAnswer-CjwxDT6u.js → DocAnswer-Djyhwfrp.js} +2 -2
- package/dist/{DocDetails-BxIsdfgP.js → DocDetails-Dv6noPvB.js} +100 -94
- package/dist/{DocForm-CS9PFRi-.js → DocForm-BFHchJ6w.js} +24 -24
- package/dist/{DocFormSend-wzBPrCIU.js → DocFormSend-K2rbjklj.js} +2 -2
- package/dist/{DocLinks-DExm1cq-.js → DocLinks-DpUl89XR.js} +2 -2
- package/dist/{DocModalBase-CTtPx1oT.js → DocModalBase-BlTZ8CY3.js} +1 -1
- package/dist/{DocPrint-BlnW2EcE.js → DocPrint-Bmfl4Abk.js} +9 -9
- package/dist/{DocReceipt-CDyPZK5d.js → DocReceipt-3wi5YXqR.js} +111 -81
- package/dist/{DocSendReminder-yIYfJPSd.js → DocSendReminder-CHqgC_wM.js} +1 -1
- package/dist/{DocTextEditor-i_xyQACD.js → DocTextEditor-BGzwRwjt.js} +8 -8
- package/dist/{DocTimeline-p1JDm9-T.js → DocTimeline-BG7ldFgR.js} +12 -12
- package/dist/{DocumentClient-D_DZDXb4.js → DocumentClient-CLCAh4lI.js} +5 -5
- package/dist/{DocumentLayout-Q5yx_Q6I.js → DocumentLayout-DHSEYClM.js} +32 -32
- package/dist/{DocumentLogotype-BTLs13IJ.js → DocumentLogotype-0jH2-sr7.js} +8 -8
- package/dist/{DocumentVoided-DQ_dMdFP.js → DocumentVoided-BAS8mATO.js} +1 -1
- package/dist/{EmbedInput-DaMyfqJY.js → EmbedInput-DnSz1tbL.js} +18 -18
- package/dist/{EmbedSettings-Bc1eYQT0.js → EmbedSettings-BQ1kKupC.js} +5 -5
- package/dist/{ErrorCallout-DlQuu1rj.js → ErrorCallout-XMtdcNvE.js} +4 -4
- package/dist/{FilePreviewModal-BU9Sbe30.js → FilePreviewModal-Bv28RVrN.js} +20 -20
- package/dist/{Flag-CO6k_SbL.js → Flag-CcF7qtHi.js} +1 -1
- package/dist/{HeaderSettings-Dc7tbdZd.js → HeaderSettings-SKEJyM9y.js} +20 -20
- package/dist/{ImageSelectModal-d2IEg740.js → ImageSelectModal-BNXs_Rfh.js} +3 -3
- package/dist/{ImageUploadWrapper-B6hVAJaZ.js → ImageUploadWrapper-BmlB0qHZ.js} +23 -23
- package/dist/{Index-B2xKlEgp.js → Index-B1mvOHsr.js} +5 -5
- package/dist/{Index-CXEmMsr7.js → Index-B4EqZ9op.js} +8 -8
- package/dist/{Index-BJFdGM64.js → Index-B8soD6pI.js} +2 -2
- package/dist/{Index-C51ttD-V.js → Index-BDW4tvrc.js} +2 -2
- package/dist/{Index-m4JD2kLy.js → Index-BLC_eYvf.js} +2 -2
- package/dist/{Index-C7lZs4w7.js → Index-BNetDL7G.js} +4 -4
- package/dist/{Index-Br1Beh1t.js → Index-BRIv1n05.js} +4 -4
- package/dist/{Index-vj_4fW0L.js → Index-BS-ERsZ7.js} +28 -28
- package/dist/{Index-hTFQZ8P4.js → Index-BS1J5b8c.js} +3 -3
- package/dist/{Index-CIhXv9Vl.js → Index-B_R1p7cp.js} +1 -1
- package/dist/{Index-OOuia-Qn.js → Index-BbEj20KG.js} +13 -13
- package/dist/{Index-CRyXpadf.js → Index-Bd3gjqXz.js} +6 -6
- package/dist/{Index-FOlkhY4l.js → Index-Bxi4pinD.js} +3 -3
- package/dist/{Index-C8Vaj5ox.js → Index-Bz6vrP4D.js} +4 -4
- package/dist/{Index-CgUYpoRx.js → Index-C2Jql1QC.js} +16 -16
- package/dist/{Index-lrMaEM_k.js → Index-C6r2p8Qd.js} +7 -7
- package/dist/{Index-CpSQ5aXa.js → Index-C9k2n-HK.js} +4 -4
- package/dist/{Index--oU_6qkg.js → Index-CDdxLKdQ.js} +4 -4
- package/dist/{Index-BDxHSXUe.js → Index-CQSkYi57.js} +6 -6
- package/dist/{Index-BFFBTLqx.js → Index-CVoJGfTj.js} +5 -5
- package/dist/{Index-xaM6i_Ur.js → Index-CYjEFdMF.js} +2 -2
- package/dist/{Index-DqyAAbPV.js → Index-Ca6-XJ1q.js} +23 -23
- package/dist/{Index-Cyg7Cxb6.js → Index-CfpNMWEI.js} +5 -5
- package/dist/{Index-DmCgJ6-P.js → Index-Coef67Wb.js} +8 -8
- package/dist/{Index-CTR16GFI.js → Index-DRadSzmh.js} +11 -11
- package/dist/{Index-BlwNDGUd.js → Index-DU19comM.js} +14 -14
- package/dist/{Index-nspOYYbJ.js → Index-DquGwrE6.js} +11 -11
- package/dist/{Index-zwGVqaGe.js → Index-Dz3beMLO.js} +5 -5
- package/dist/{Index-DQ67Jdhz.js → Index-GmMgg4ZI.js} +10 -10
- package/dist/{Index-Bmv9uPyM.js → Index-LNHTL5EH.js} +1 -1
- package/dist/Index-Ra_-tX11.js +106 -0
- package/dist/Index-aOBMRrRj.js +4 -0
- package/dist/{Index-CP9Mwo6E.js → Index-ec9osPpw.js} +4 -4
- package/dist/{Index-4N9vyKBQ.js → Index-mcDMCki9.js} +30 -30
- package/dist/{Index.vue_vue_type_script_lang-C5astrcb.js → Index.vue_vue_type_script_lang-DOtAXSQl.js} +2 -2
- package/dist/{InputToggleRow-BBWZeA_f.js → InputToggleRow-DH7USYPf.js} +9 -9
- package/dist/{ManualPopover-DTwmTCPu.js → ManualPopover-JDRhdC8G.js} +3 -3
- package/dist/{MediaWrapper-Y0DGv4f8.js → MediaWrapper-DdbmCwGw.js} +3 -3
- package/dist/{NotBindingText-FUapTBAD.js → NotBindingText-CwV-MkgL.js} +2 -2
- package/dist/{PackageGroup-ChiyEDwB.js → PackageGroup-CH-8hyAF.js} +10 -10
- package/dist/{PdfTerms-CuQguFsD.js → PdfTerms-BBeN_k6I.js} +4 -4
- package/dist/{PdfViewer-Brnjp6OZ.js → PdfViewer-Du_M79jv.js} +27 -27
- package/dist/{PlainHtml.vue_vue_type_script_setup_true_lang-D5CY66LQ.js → PlainHtml.vue_vue_type_script_setup_true_lang-BKJdTPrg.js} +1 -1
- package/dist/{PriceHeader-DpCLCW93.js → PriceHeader-Be2QwWzs.js} +25 -25
- package/dist/{SearchApi-iBG9y8ZN.js → SearchApi-dNunyqch.js} +1 -1
- package/dist/{SendForm-CTd08c8d.js → SendForm-BIIwVZwY.js} +143 -130
- package/dist/{Setup-C2kYjDKF.js → Setup-DBbHXz4_.js} +1 -1
- package/dist/{SmartList-BBq3BgJi.js → SmartList-C2JUKK2W.js} +1 -1
- package/dist/{Sortable.vue_vue_type_script_setup_true_lang-DyiB_0J-.js → Sortable.vue_vue_type_script_setup_true_lang-CzrvSsIg.js} +35 -35
- package/dist/{TermsSettings-Dj6sTbrm.js → TermsSettings-BZBWd3c9.js} +11 -11
- package/dist/{ThemeColorRow-BiwW-diz.js → ThemeColorRow-7KF7icN8.js} +5 -5
- package/dist/{ToggleBinding-JP15-Wvc.js → ToggleBinding-w8lNunzO.js} +4 -4
- package/dist/{UploadModal-zYfzZsGt.js → UploadModal-BRdimOyC.js} +2 -2
- package/dist/{VideoPlayerInput-zU6Kw9cw.js → VideoPlayerInput-BHmr7HvX.js} +6 -6
- package/dist/{VideoPlayerSettings-D7cfFYht.js → VideoPlayerSettings-fI8gpjks.js} +6 -6
- package/dist/{VideoSelectModal-CjOlhyNV.js → VideoSelectModal-Beq5yE0M.js} +9 -9
- package/dist/{focusDrawerMixin-C0aQjH6-.js → focusDrawerMixin-vhY6JO7g.js} +1 -1
- package/dist/{formDrawerState-CyABAApS.js → formDrawerState-ChHVYfc3.js} +1 -1
- package/dist/{fortnoxTheme-DQVyPRLl.js → fortnoxTheme-BGyYnb8i.js} +1 -1
- package/dist/{helpers-H5tqC2mD.js → helpers-Dw4CluFv.js} +1 -1
- package/dist/{index-EUYwyBFe.js → index-BUPqyA87.js} +6 -6
- package/dist/{index-77ik5EB2.js → index-BcnDsk0Z.js} +1 -1
- package/dist/{index-JV3eF8nv.js → index-C-tsPusW.js} +7 -7
- package/dist/{index-Ze_XZYbW.js → index-CPfrJsi9.js} +13 -13
- package/dist/{index-z_Lljo35.js → index-DJYVhEQt.js} +22 -22
- package/dist/{index-Cp5KfNdY.js → index-DihGX5od.js} +30 -30
- package/dist/{index-6-kWjuuL.js → index-syUJ22zc.js} +25 -28
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +140 -138
- package/dist/{main-BN-1fMb8.js → main-BBhJGb7I.js} +4908 -4635
- package/dist/{mapFormMixin-CM1I_eW_.js → mapFormMixin-CCKubywa.js} +2 -2
- package/dist/omit-Cdd54eFA.js +56 -0
- package/dist/{publicSenderState-BbL_iSL_.js → publicSenderState-LkIY-kEl.js} +1 -1
- package/dist/{splitpanes--dOqXPIb.js → splitpanes-nCfEUpmu.js} +1 -1
- package/dist/{template-BwkDoewU.js → template-B-Ds8x_U.js} +1 -1
- package/dist/{tippy.esm-BDnfKmn9.js → tippy.esm-DdYqbHFh.js} +66 -66
- package/dist/{useTermsModal-CmEHVDST.js → useTermsModal-Z_pZQ4H2.js} +4 -4
- package/dist/{utils-BVo-Ajwa.js → utils-C3tvmZHk.js} +1 -1
- package/dist/validation-CWxbj-wT.js +40 -0
- package/dist/widget.css +1 -1
- package/package.json +1 -1
- package/dist/Index-C7fJuk6X.js +0 -4
- package/dist/Index-M2_bF0WP.js +0 -87
- package/dist/omit-D9nqAztq.js +0 -56
- package/dist/validation-BJw9_38H.js +0 -40
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
import {
|
|
1
|
+
import { m as Q } from "./mapFormMixin-CCKubywa.js";
|
|
2
|
+
import { a8 as Le, al as qt, _ as Z, W as Se, l as at, cV as jt, aC as st, d8 as Te, b as L, d as D, o as I, j as f, e as $, f as B, F as J, c as X, w as N, t as T, s as W, am as lt, d9 as Ne, da as Me, v as Ue, y as Gt, x as qe, db as je, m as ze, g as ft, aq as Oe, cm as Ve, h as Kt, ay as Jt } from "./main-BBhJGb7I.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-
|
|
5
|
-
import { i as He } from "./fortnoxTheme-
|
|
6
|
-
var
|
|
4
|
+
import { _ as We } from "./CFormField.vue_vue_type_script_setup_true_lang-B57OaS--.js";
|
|
5
|
+
import { i as He } from "./fortnoxTheme-BGyYnb8i.js";
|
|
6
|
+
var K = {}, gt, Xt;
|
|
7
7
|
function Ye() {
|
|
8
|
-
return
|
|
8
|
+
return Xt || (Xt = 1, gt = function() {
|
|
9
9
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
10
|
-
}),
|
|
10
|
+
}), gt;
|
|
11
11
|
}
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
12
|
+
var mt = {}, V = {}, Qt;
|
|
13
|
+
function H() {
|
|
14
|
+
if (Qt) return V;
|
|
15
|
+
Qt = 1;
|
|
16
16
|
let n;
|
|
17
17
|
const t = [
|
|
18
18
|
0,
|
|
@@ -79,9 +79,9 @@ function W() {
|
|
|
79
79
|
return n(i);
|
|
80
80
|
}, V;
|
|
81
81
|
}
|
|
82
|
-
var
|
|
83
|
-
function
|
|
84
|
-
return
|
|
82
|
+
var pt = {}, Zt;
|
|
83
|
+
function Ot() {
|
|
84
|
+
return Zt || (Zt = 1, function(n) {
|
|
85
85
|
n.L = { bit: 1 }, n.M = { bit: 0 }, n.Q = { bit: 3 }, n.H = { bit: 2 };
|
|
86
86
|
function t(o) {
|
|
87
87
|
if (typeof o != "string")
|
|
@@ -114,12 +114,12 @@ function qt() {
|
|
|
114
114
|
return e;
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
|
-
}(
|
|
117
|
+
}(pt)), pt;
|
|
118
118
|
}
|
|
119
|
-
var
|
|
119
|
+
var wt, te;
|
|
120
120
|
function Ge() {
|
|
121
|
-
if (
|
|
122
|
-
|
|
121
|
+
if (te) return wt;
|
|
122
|
+
te = 1;
|
|
123
123
|
function n() {
|
|
124
124
|
this.buffer = [], this.length = 0;
|
|
125
125
|
}
|
|
@@ -139,12 +139,12 @@ function Ge() {
|
|
|
139
139
|
const o = Math.floor(this.length / 8);
|
|
140
140
|
this.buffer.length <= o && this.buffer.push(0), t && (this.buffer[o] |= 128 >>> this.length % 8), this.length++;
|
|
141
141
|
}
|
|
142
|
-
},
|
|
142
|
+
}, wt = n, wt;
|
|
143
143
|
}
|
|
144
|
-
var
|
|
144
|
+
var yt, ee;
|
|
145
145
|
function Ke() {
|
|
146
|
-
if (
|
|
147
|
-
|
|
146
|
+
if (ee) return yt;
|
|
147
|
+
ee = 1;
|
|
148
148
|
function n(t) {
|
|
149
149
|
if (!t || t < 1)
|
|
150
150
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
@@ -159,12 +159,12 @@ function Ke() {
|
|
|
159
159
|
this.data[t * this.size + o] ^= i;
|
|
160
160
|
}, n.prototype.isReserved = function(t, o) {
|
|
161
161
|
return this.reservedBit[t * this.size + o];
|
|
162
|
-
},
|
|
162
|
+
}, yt = n, yt;
|
|
163
163
|
}
|
|
164
|
-
var
|
|
164
|
+
var vt = {}, ne;
|
|
165
165
|
function Je() {
|
|
166
|
-
return
|
|
167
|
-
const t =
|
|
166
|
+
return ne || (ne = 1, function(n) {
|
|
167
|
+
const t = H().getSymbolSize;
|
|
168
168
|
n.getRowColCoords = function(i) {
|
|
169
169
|
if (i === 1) return [];
|
|
170
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];
|
|
@@ -180,14 +180,14 @@ function Je() {
|
|
|
180
180
|
a === r - 1 && l === 0 || e.push([s[a], s[l]]);
|
|
181
181
|
return e;
|
|
182
182
|
};
|
|
183
|
-
}(
|
|
183
|
+
}(vt)), vt;
|
|
184
184
|
}
|
|
185
|
-
var
|
|
185
|
+
var _t = {}, ie;
|
|
186
186
|
function Xe() {
|
|
187
|
-
if (
|
|
188
|
-
|
|
189
|
-
const n =
|
|
190
|
-
return
|
|
187
|
+
if (ie) return _t;
|
|
188
|
+
ie = 1;
|
|
189
|
+
const n = H().getSymbolSize, t = 7;
|
|
190
|
+
return _t.getPositions = function(i) {
|
|
191
191
|
const e = n(i);
|
|
192
192
|
return [
|
|
193
193
|
// top-left
|
|
@@ -197,11 +197,11 @@ function Xe() {
|
|
|
197
197
|
// bottom-left
|
|
198
198
|
[0, e - t]
|
|
199
199
|
];
|
|
200
|
-
},
|
|
200
|
+
}, _t;
|
|
201
201
|
}
|
|
202
|
-
var
|
|
202
|
+
var Ct = {}, se;
|
|
203
203
|
function Qe() {
|
|
204
|
-
return
|
|
204
|
+
return se || (se = 1, function(n) {
|
|
205
205
|
n.Patterns = {
|
|
206
206
|
PATTERN000: 0,
|
|
207
207
|
PATTERN001: 1,
|
|
@@ -224,12 +224,12 @@ function Qe() {
|
|
|
224
224
|
return n.isValid(e) ? parseInt(e, 10) : void 0;
|
|
225
225
|
}, n.getPenaltyN1 = function(e) {
|
|
226
226
|
const s = e.size;
|
|
227
|
-
let r = 0, a = 0, l = 0,
|
|
227
|
+
let r = 0, a = 0, l = 0, d = null, c = null;
|
|
228
228
|
for (let h = 0; h < s; h++) {
|
|
229
|
-
a = l = 0,
|
|
230
|
-
for (let
|
|
231
|
-
let
|
|
232
|
-
|
|
229
|
+
a = l = 0, d = c = null;
|
|
230
|
+
for (let g = 0; g < s; g++) {
|
|
231
|
+
let u = e.get(h, g);
|
|
232
|
+
u === d ? a++ : (a >= 5 && (r += t.N1 + (a - 5)), d = u, a = 1), u = e.get(g, h), u === c ? l++ : (l >= 5 && (r += t.N1 + (l - 5)), c = u, l = 1);
|
|
233
233
|
}
|
|
234
234
|
a >= 5 && (r += t.N1 + (a - 5)), l >= 5 && (r += t.N1 + (l - 5));
|
|
235
235
|
}
|
|
@@ -239,17 +239,17 @@ function Qe() {
|
|
|
239
239
|
let r = 0;
|
|
240
240
|
for (let a = 0; a < s - 1; a++)
|
|
241
241
|
for (let l = 0; l < s - 1; l++) {
|
|
242
|
-
const
|
|
243
|
-
(
|
|
242
|
+
const d = e.get(a, l) + e.get(a, l + 1) + e.get(a + 1, l) + e.get(a + 1, l + 1);
|
|
243
|
+
(d === 4 || d === 0) && r++;
|
|
244
244
|
}
|
|
245
245
|
return r * t.N2;
|
|
246
246
|
}, n.getPenaltyN3 = function(e) {
|
|
247
247
|
const s = e.size;
|
|
248
248
|
let r = 0, a = 0, l = 0;
|
|
249
|
-
for (let
|
|
249
|
+
for (let d = 0; d < s; d++) {
|
|
250
250
|
a = l = 0;
|
|
251
251
|
for (let c = 0; c < s; c++)
|
|
252
|
-
a = a << 1 & 2047 | e.get(
|
|
252
|
+
a = a << 1 & 2047 | e.get(d, c), c >= 10 && (a === 1488 || a === 93) && r++, l = l << 1 & 2047 | e.get(c, d), c >= 10 && (l === 1488 || l === 93) && r++;
|
|
253
253
|
}
|
|
254
254
|
return r * t.N3;
|
|
255
255
|
}, n.getPenaltyN4 = function(e) {
|
|
@@ -288,20 +288,20 @@ function Qe() {
|
|
|
288
288
|
}, n.getBestMask = function(e, s) {
|
|
289
289
|
const r = Object.keys(n.Patterns).length;
|
|
290
290
|
let a = 0, l = 1 / 0;
|
|
291
|
-
for (let
|
|
292
|
-
s(
|
|
291
|
+
for (let d = 0; d < r; d++) {
|
|
292
|
+
s(d), n.applyMask(d, e);
|
|
293
293
|
const c = n.getPenaltyN1(e) + n.getPenaltyN2(e) + n.getPenaltyN3(e) + n.getPenaltyN4(e);
|
|
294
|
-
n.applyMask(
|
|
294
|
+
n.applyMask(d, e), c < l && (l = c, a = d);
|
|
295
295
|
}
|
|
296
296
|
return a;
|
|
297
297
|
};
|
|
298
|
-
}(
|
|
298
|
+
}(Ct)), Ct;
|
|
299
299
|
}
|
|
300
|
-
var
|
|
301
|
-
function
|
|
302
|
-
if (
|
|
303
|
-
|
|
304
|
-
const n =
|
|
300
|
+
var it = {}, oe;
|
|
301
|
+
function Ae() {
|
|
302
|
+
if (oe) return it;
|
|
303
|
+
oe = 1;
|
|
304
|
+
const n = Ot(), t = [
|
|
305
305
|
// L M Q H
|
|
306
306
|
1,
|
|
307
307
|
1,
|
|
@@ -626,7 +626,7 @@ function Se() {
|
|
|
626
626
|
2040,
|
|
627
627
|
2430
|
|
628
628
|
];
|
|
629
|
-
return
|
|
629
|
+
return it.getBlocksCount = function(e, s) {
|
|
630
630
|
switch (s) {
|
|
631
631
|
case n.L:
|
|
632
632
|
return t[(e - 1) * 4 + 0];
|
|
@@ -639,7 +639,7 @@ function Se() {
|
|
|
639
639
|
default:
|
|
640
640
|
return;
|
|
641
641
|
}
|
|
642
|
-
},
|
|
642
|
+
}, it.getTotalCodewordsCount = function(e, s) {
|
|
643
643
|
switch (s) {
|
|
644
644
|
case n.L:
|
|
645
645
|
return o[(e - 1) * 4 + 0];
|
|
@@ -652,12 +652,12 @@ function Se() {
|
|
|
652
652
|
default:
|
|
653
653
|
return;
|
|
654
654
|
}
|
|
655
|
-
},
|
|
655
|
+
}, it;
|
|
656
656
|
}
|
|
657
|
-
var
|
|
657
|
+
var xt = {}, et = {}, re;
|
|
658
658
|
function Ze() {
|
|
659
|
-
if (
|
|
660
|
-
|
|
659
|
+
if (re) return et;
|
|
660
|
+
re = 1;
|
|
661
661
|
const n = new Uint8Array(512), t = new Uint8Array(256);
|
|
662
662
|
return function() {
|
|
663
663
|
let i = 1;
|
|
@@ -665,18 +665,18 @@ function Ze() {
|
|
|
665
665
|
n[e] = i, t[i] = e, i <<= 1, i & 256 && (i ^= 285);
|
|
666
666
|
for (let e = 255; e < 512; e++)
|
|
667
667
|
n[e] = n[e - 255];
|
|
668
|
-
}(),
|
|
668
|
+
}(), et.log = function(i) {
|
|
669
669
|
if (i < 1) throw new Error("log(" + i + ")");
|
|
670
670
|
return t[i];
|
|
671
|
-
},
|
|
671
|
+
}, et.exp = function(i) {
|
|
672
672
|
return n[i];
|
|
673
|
-
},
|
|
673
|
+
}, et.mul = function(i, e) {
|
|
674
674
|
return i === 0 || e === 0 ? 0 : n[t[i] + t[e]];
|
|
675
|
-
},
|
|
675
|
+
}, et;
|
|
676
676
|
}
|
|
677
|
-
var
|
|
677
|
+
var ae;
|
|
678
678
|
function tn() {
|
|
679
|
-
return
|
|
679
|
+
return ae || (ae = 1, function(n) {
|
|
680
680
|
const t = Ze();
|
|
681
681
|
n.mul = function(i, e) {
|
|
682
682
|
const s = new Uint8Array(i.length + e.length - 1);
|
|
@@ -701,12 +701,12 @@ function tn() {
|
|
|
701
701
|
e = n.mul(e, new Uint8Array([1, t.exp(s)]));
|
|
702
702
|
return e;
|
|
703
703
|
};
|
|
704
|
-
}(
|
|
704
|
+
}(xt)), xt;
|
|
705
705
|
}
|
|
706
|
-
var
|
|
706
|
+
var bt, le;
|
|
707
707
|
function en() {
|
|
708
|
-
if (
|
|
709
|
-
|
|
708
|
+
if (le) return bt;
|
|
709
|
+
le = 1;
|
|
710
710
|
const n = tn();
|
|
711
711
|
function t(o) {
|
|
712
712
|
this.genPoly = void 0, this.degree = o, this.degree && this.initialize(this.degree);
|
|
@@ -724,18 +724,18 @@ function en() {
|
|
|
724
724
|
return a.set(s, r), a;
|
|
725
725
|
}
|
|
726
726
|
return s;
|
|
727
|
-
},
|
|
727
|
+
}, bt = t, bt;
|
|
728
728
|
}
|
|
729
|
-
var
|
|
730
|
-
function
|
|
731
|
-
return
|
|
729
|
+
var Pt = {}, Et = {}, kt = {}, ce;
|
|
730
|
+
function Ie() {
|
|
731
|
+
return ce || (ce = 1, kt.isValid = function(t) {
|
|
732
732
|
return !isNaN(t) && t >= 1 && t <= 40;
|
|
733
|
-
}),
|
|
733
|
+
}), kt;
|
|
734
734
|
}
|
|
735
|
-
var U = {},
|
|
736
|
-
function
|
|
737
|
-
if (
|
|
738
|
-
|
|
735
|
+
var U = {}, de;
|
|
736
|
+
function Be() {
|
|
737
|
+
if (de) return U;
|
|
738
|
+
de = 1;
|
|
739
739
|
const n = "[0-9]+", t = "[A-Z $%*+\\-./:]+";
|
|
740
740
|
let o = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
741
741
|
o = o.replace(/u/g, "\\u");
|
|
@@ -751,10 +751,10 @@ function Me() {
|
|
|
751
751
|
return r.test(l);
|
|
752
752
|
}, U;
|
|
753
753
|
}
|
|
754
|
-
var
|
|
755
|
-
function
|
|
756
|
-
return
|
|
757
|
-
const t =
|
|
754
|
+
var ue;
|
|
755
|
+
function Y() {
|
|
756
|
+
return ue || (ue = 1, function(n) {
|
|
757
|
+
const t = Ie(), o = Be();
|
|
758
758
|
n.NUMERIC = {
|
|
759
759
|
id: "Numeric",
|
|
760
760
|
bit: 1,
|
|
@@ -811,42 +811,42 @@ function H() {
|
|
|
811
811
|
return r;
|
|
812
812
|
}
|
|
813
813
|
};
|
|
814
|
-
}(
|
|
814
|
+
}(Et)), Et;
|
|
815
815
|
}
|
|
816
|
-
var
|
|
816
|
+
var he;
|
|
817
817
|
function nn() {
|
|
818
|
-
return
|
|
819
|
-
const t =
|
|
820
|
-
function l(
|
|
821
|
-
for (let
|
|
822
|
-
if (
|
|
823
|
-
return
|
|
824
|
-
}
|
|
825
|
-
function
|
|
826
|
-
return e.getCharCountIndicator(
|
|
827
|
-
}
|
|
828
|
-
function c(
|
|
829
|
-
let
|
|
830
|
-
return
|
|
831
|
-
const
|
|
832
|
-
|
|
833
|
-
}),
|
|
834
|
-
}
|
|
835
|
-
function h(
|
|
836
|
-
for (let
|
|
837
|
-
if (c(
|
|
838
|
-
return
|
|
839
|
-
}
|
|
840
|
-
n.from = function(
|
|
841
|
-
return s.isValid(
|
|
842
|
-
}, n.getCapacity = function(
|
|
843
|
-
if (!s.isValid(
|
|
818
|
+
return he || (he = 1, function(n) {
|
|
819
|
+
const t = H(), o = Ae(), i = Ot(), e = Y(), s = Ie(), r = 7973, a = t.getBCHDigit(r);
|
|
820
|
+
function l(g, u, w) {
|
|
821
|
+
for (let m = 1; m <= 40; m++)
|
|
822
|
+
if (u <= n.getCapacity(m, w, g))
|
|
823
|
+
return m;
|
|
824
|
+
}
|
|
825
|
+
function d(g, u) {
|
|
826
|
+
return e.getCharCountIndicator(g, u) + 4;
|
|
827
|
+
}
|
|
828
|
+
function c(g, u) {
|
|
829
|
+
let w = 0;
|
|
830
|
+
return g.forEach(function(m) {
|
|
831
|
+
const F = d(m.mode, u);
|
|
832
|
+
w += F + m.getBitsLength();
|
|
833
|
+
}), w;
|
|
834
|
+
}
|
|
835
|
+
function h(g, u) {
|
|
836
|
+
for (let w = 1; w <= 40; w++)
|
|
837
|
+
if (c(g, w) <= n.getCapacity(w, u, e.MIXED))
|
|
838
|
+
return w;
|
|
839
|
+
}
|
|
840
|
+
n.from = function(u, w) {
|
|
841
|
+
return s.isValid(u) ? parseInt(u, 10) : w;
|
|
842
|
+
}, n.getCapacity = function(u, w, m) {
|
|
843
|
+
if (!s.isValid(u))
|
|
844
844
|
throw new Error("Invalid QR Code version");
|
|
845
|
-
typeof
|
|
846
|
-
const
|
|
847
|
-
if (
|
|
848
|
-
const E =
|
|
849
|
-
switch (
|
|
845
|
+
typeof m > "u" && (m = e.BYTE);
|
|
846
|
+
const F = t.getSymbolTotalCodewords(u), x = o.getTotalCodewordsCount(u, w), M = (F - x) * 8;
|
|
847
|
+
if (m === e.MIXED) return M;
|
|
848
|
+
const E = M - d(m, u);
|
|
849
|
+
switch (m) {
|
|
850
850
|
case e.NUMERIC:
|
|
851
851
|
return Math.floor(E / 10 * 3);
|
|
852
852
|
case e.ALPHANUMERIC:
|
|
@@ -857,46 +857,46 @@ function nn() {
|
|
|
857
857
|
default:
|
|
858
858
|
return Math.floor(E / 8);
|
|
859
859
|
}
|
|
860
|
-
}, n.getBestVersionForData = function(
|
|
861
|
-
let
|
|
862
|
-
const
|
|
863
|
-
if (Array.isArray(
|
|
864
|
-
if (
|
|
865
|
-
return h(
|
|
866
|
-
if (
|
|
860
|
+
}, n.getBestVersionForData = function(u, w) {
|
|
861
|
+
let m;
|
|
862
|
+
const F = i.from(w, i.M);
|
|
863
|
+
if (Array.isArray(u)) {
|
|
864
|
+
if (u.length > 1)
|
|
865
|
+
return h(u, F);
|
|
866
|
+
if (u.length === 0)
|
|
867
867
|
return 1;
|
|
868
|
-
|
|
868
|
+
m = u[0];
|
|
869
869
|
} else
|
|
870
|
-
|
|
871
|
-
return l(
|
|
872
|
-
}, n.getEncodedBits = function(
|
|
873
|
-
if (!s.isValid(
|
|
870
|
+
m = u;
|
|
871
|
+
return l(m.mode, m.getLength(), F);
|
|
872
|
+
}, n.getEncodedBits = function(u) {
|
|
873
|
+
if (!s.isValid(u) || u < 7)
|
|
874
874
|
throw new Error("Invalid QR Code version");
|
|
875
|
-
let
|
|
876
|
-
for (; t.getBCHDigit(
|
|
877
|
-
|
|
878
|
-
return
|
|
875
|
+
let w = u << 12;
|
|
876
|
+
for (; t.getBCHDigit(w) - a >= 0; )
|
|
877
|
+
w ^= r << t.getBCHDigit(w) - a;
|
|
878
|
+
return u << 12 | w;
|
|
879
879
|
};
|
|
880
|
-
}(
|
|
880
|
+
}(Pt)), Pt;
|
|
881
881
|
}
|
|
882
|
-
var
|
|
882
|
+
var St = {}, fe;
|
|
883
883
|
function sn() {
|
|
884
|
-
if (
|
|
885
|
-
|
|
886
|
-
const n =
|
|
887
|
-
return
|
|
884
|
+
if (fe) return St;
|
|
885
|
+
fe = 1;
|
|
886
|
+
const n = H(), t = 1335, o = 21522, i = n.getBCHDigit(t);
|
|
887
|
+
return St.getEncodedBits = function(s, r) {
|
|
888
888
|
const a = s.bit << 3 | r;
|
|
889
889
|
let l = a << 10;
|
|
890
890
|
for (; n.getBCHDigit(l) - i >= 0; )
|
|
891
891
|
l ^= t << n.getBCHDigit(l) - i;
|
|
892
892
|
return (a << 10 | l) ^ o;
|
|
893
|
-
},
|
|
893
|
+
}, St;
|
|
894
894
|
}
|
|
895
|
-
var
|
|
895
|
+
var Tt = {}, Mt, ge;
|
|
896
896
|
function on() {
|
|
897
|
-
if (
|
|
898
|
-
|
|
899
|
-
const n =
|
|
897
|
+
if (ge) return Mt;
|
|
898
|
+
ge = 1;
|
|
899
|
+
const n = Y();
|
|
900
900
|
function t(o) {
|
|
901
901
|
this.mode = n.NUMERIC, this.data = o.toString();
|
|
902
902
|
}
|
|
@@ -912,13 +912,13 @@ function on() {
|
|
|
912
912
|
s = this.data.substr(e, 3), r = parseInt(s, 10), i.put(r, 10);
|
|
913
913
|
const a = this.data.length - e;
|
|
914
914
|
a > 0 && (s = this.data.substr(e), r = parseInt(s, 10), i.put(r, a * 3 + 1));
|
|
915
|
-
},
|
|
915
|
+
}, Mt = t, Mt;
|
|
916
916
|
}
|
|
917
|
-
var
|
|
917
|
+
var At, me;
|
|
918
918
|
function rn() {
|
|
919
|
-
if (
|
|
920
|
-
|
|
921
|
-
const n =
|
|
919
|
+
if (me) return At;
|
|
920
|
+
me = 1;
|
|
921
|
+
const n = Y(), t = [
|
|
922
922
|
"0",
|
|
923
923
|
"1",
|
|
924
924
|
"2",
|
|
@@ -981,11 +981,11 @@ function rn() {
|
|
|
981
981
|
r += t.indexOf(this.data[s + 1]), e.put(r, 11);
|
|
982
982
|
}
|
|
983
983
|
this.data.length % 2 && e.put(t.indexOf(this.data[s]), 6);
|
|
984
|
-
},
|
|
984
|
+
}, At = o, At;
|
|
985
985
|
}
|
|
986
|
-
var
|
|
986
|
+
var It, pe;
|
|
987
987
|
function an() {
|
|
988
|
-
return
|
|
988
|
+
return pe || (pe = 1, It = function(t) {
|
|
989
989
|
for (var o = [], i = t.length, e = 0; e < i; e++) {
|
|
990
990
|
var s = t.charCodeAt(e);
|
|
991
991
|
if (s >= 55296 && s <= 56319 && i > e + 1) {
|
|
@@ -1011,13 +1011,13 @@ function an() {
|
|
|
1011
1011
|
o.push(239, 191, 189);
|
|
1012
1012
|
}
|
|
1013
1013
|
return new Uint8Array(o).buffer;
|
|
1014
|
-
}),
|
|
1014
|
+
}), It;
|
|
1015
1015
|
}
|
|
1016
|
-
var
|
|
1016
|
+
var Bt, we;
|
|
1017
1017
|
function ln() {
|
|
1018
|
-
if (
|
|
1019
|
-
|
|
1020
|
-
const n = an(), t =
|
|
1018
|
+
if (we) return Bt;
|
|
1019
|
+
we = 1;
|
|
1020
|
+
const n = an(), t = Y();
|
|
1021
1021
|
function o(i) {
|
|
1022
1022
|
this.mode = t.BYTE, typeof i == "string" && (i = n(i)), this.data = new Uint8Array(i);
|
|
1023
1023
|
}
|
|
@@ -1030,13 +1030,13 @@ function ln() {
|
|
|
1030
1030
|
}, o.prototype.write = function(i) {
|
|
1031
1031
|
for (let e = 0, s = this.data.length; e < s; e++)
|
|
1032
1032
|
i.put(this.data[e], 8);
|
|
1033
|
-
},
|
|
1033
|
+
}, Bt = o, Bt;
|
|
1034
1034
|
}
|
|
1035
|
-
var
|
|
1035
|
+
var Dt, ye;
|
|
1036
1036
|
function cn() {
|
|
1037
|
-
if (
|
|
1038
|
-
|
|
1039
|
-
const n =
|
|
1037
|
+
if (ye) return Dt;
|
|
1038
|
+
ye = 1;
|
|
1039
|
+
const n = Y(), t = H();
|
|
1040
1040
|
function o(i) {
|
|
1041
1041
|
this.mode = n.KANJI, this.data = i;
|
|
1042
1042
|
}
|
|
@@ -1061,21 +1061,21 @@ Make sure your charset is UTF-8`
|
|
|
1061
1061
|
);
|
|
1062
1062
|
s = (s >>> 8 & 255) * 192 + (s & 255), i.put(s, 13);
|
|
1063
1063
|
}
|
|
1064
|
-
},
|
|
1064
|
+
}, Dt = o, Dt;
|
|
1065
1065
|
}
|
|
1066
|
-
var
|
|
1067
|
-
function
|
|
1068
|
-
return
|
|
1066
|
+
var Ft = { exports: {} }, ve;
|
|
1067
|
+
function dn() {
|
|
1068
|
+
return ve || (ve = 1, function(n) {
|
|
1069
1069
|
var t = {
|
|
1070
1070
|
single_source_shortest_paths: function(o, i, e) {
|
|
1071
1071
|
var s = {}, r = {};
|
|
1072
1072
|
r[i] = 0;
|
|
1073
1073
|
var a = t.PriorityQueue.make();
|
|
1074
1074
|
a.push(i, 0);
|
|
1075
|
-
for (var l,
|
|
1076
|
-
l = a.pop(),
|
|
1077
|
-
for (c in
|
|
1078
|
-
|
|
1075
|
+
for (var l, d, c, h, g, u, w, m, F; !a.empty(); ) {
|
|
1076
|
+
l = a.pop(), d = l.value, h = l.cost, g = o[d] || {};
|
|
1077
|
+
for (c in g)
|
|
1078
|
+
g.hasOwnProperty(c) && (u = g[c], w = h + u, m = r[c], F = typeof r[c] > "u", (F || m > w) && (r[c] = w, a.push(c, w), s[c] = d));
|
|
1079
1079
|
}
|
|
1080
1080
|
if (typeof e < "u" && typeof r[e] > "u") {
|
|
1081
1081
|
var x = ["Could not find a path from ", i, " to ", e, "."].join("");
|
|
@@ -1129,31 +1129,31 @@ function un() {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
};
|
|
1131
1131
|
n.exports = t;
|
|
1132
|
-
}(
|
|
1132
|
+
}(Ft)), Ft.exports;
|
|
1133
1133
|
}
|
|
1134
|
-
var
|
|
1135
|
-
function
|
|
1136
|
-
return
|
|
1137
|
-
const t =
|
|
1138
|
-
function
|
|
1134
|
+
var _e;
|
|
1135
|
+
function un() {
|
|
1136
|
+
return _e || (_e = 1, function(n) {
|
|
1137
|
+
const t = Y(), o = on(), i = rn(), e = ln(), s = cn(), r = Be(), a = H(), l = dn();
|
|
1138
|
+
function d(x) {
|
|
1139
1139
|
return unescape(encodeURIComponent(x)).length;
|
|
1140
1140
|
}
|
|
1141
|
-
function c(x,
|
|
1141
|
+
function c(x, M, E) {
|
|
1142
1142
|
const k = [];
|
|
1143
|
-
let
|
|
1144
|
-
for (; (
|
|
1143
|
+
let R;
|
|
1144
|
+
for (; (R = x.exec(E)) !== null; )
|
|
1145
1145
|
k.push({
|
|
1146
|
-
data:
|
|
1147
|
-
index:
|
|
1148
|
-
mode:
|
|
1149
|
-
length:
|
|
1146
|
+
data: R[0],
|
|
1147
|
+
index: R.index,
|
|
1148
|
+
mode: M,
|
|
1149
|
+
length: R[0].length
|
|
1150
1150
|
});
|
|
1151
1151
|
return k;
|
|
1152
1152
|
}
|
|
1153
1153
|
function h(x) {
|
|
1154
|
-
const
|
|
1155
|
-
let k,
|
|
1156
|
-
return a.isKanjiModeEnabled() ? (k = c(r.BYTE, t.BYTE, x),
|
|
1154
|
+
const M = c(r.NUMERIC, t.NUMERIC, x), E = c(r.ALPHANUMERIC, t.ALPHANUMERIC, x);
|
|
1155
|
+
let k, R;
|
|
1156
|
+
return a.isKanjiModeEnabled() ? (k = c(r.BYTE, t.BYTE, x), R = c(r.KANJI, t.KANJI, x)) : (k = c(r.BYTE_KANJI, t.BYTE, x), R = []), M.concat(E, k, R).sort(function(b, C) {
|
|
1157
1157
|
return b.index - C.index;
|
|
1158
1158
|
}).map(function(b) {
|
|
1159
1159
|
return {
|
|
@@ -1163,8 +1163,8 @@ function dn() {
|
|
|
1163
1163
|
};
|
|
1164
1164
|
});
|
|
1165
1165
|
}
|
|
1166
|
-
function
|
|
1167
|
-
switch (
|
|
1166
|
+
function g(x, M) {
|
|
1167
|
+
switch (M) {
|
|
1168
1168
|
case t.NUMERIC:
|
|
1169
1169
|
return o.getBitsLength(x);
|
|
1170
1170
|
case t.ALPHANUMERIC:
|
|
@@ -1175,67 +1175,67 @@ function dn() {
|
|
|
1175
1175
|
return e.getBitsLength(x);
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1179
|
-
return x.reduce(function(
|
|
1180
|
-
const k =
|
|
1181
|
-
return k && k.mode === E.mode ? (
|
|
1178
|
+
function u(x) {
|
|
1179
|
+
return x.reduce(function(M, E) {
|
|
1180
|
+
const k = M.length - 1 >= 0 ? M[M.length - 1] : null;
|
|
1181
|
+
return k && k.mode === E.mode ? (M[M.length - 1].data += E.data, M) : (M.push(E), M);
|
|
1182
1182
|
}, []);
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1185
|
-
const
|
|
1184
|
+
function w(x) {
|
|
1185
|
+
const M = [];
|
|
1186
1186
|
for (let E = 0; E < x.length; E++) {
|
|
1187
1187
|
const k = x[E];
|
|
1188
1188
|
switch (k.mode) {
|
|
1189
1189
|
case t.NUMERIC:
|
|
1190
|
-
|
|
1190
|
+
M.push([
|
|
1191
1191
|
k,
|
|
1192
1192
|
{ data: k.data, mode: t.ALPHANUMERIC, length: k.length },
|
|
1193
1193
|
{ data: k.data, mode: t.BYTE, length: k.length }
|
|
1194
1194
|
]);
|
|
1195
1195
|
break;
|
|
1196
1196
|
case t.ALPHANUMERIC:
|
|
1197
|
-
|
|
1197
|
+
M.push([
|
|
1198
1198
|
k,
|
|
1199
1199
|
{ data: k.data, mode: t.BYTE, length: k.length }
|
|
1200
1200
|
]);
|
|
1201
1201
|
break;
|
|
1202
1202
|
case t.KANJI:
|
|
1203
|
-
|
|
1203
|
+
M.push([
|
|
1204
1204
|
k,
|
|
1205
|
-
{ data: k.data, mode: t.BYTE, length:
|
|
1205
|
+
{ data: k.data, mode: t.BYTE, length: d(k.data) }
|
|
1206
1206
|
]);
|
|
1207
1207
|
break;
|
|
1208
1208
|
case t.BYTE:
|
|
1209
|
-
|
|
1210
|
-
{ data: k.data, mode: t.BYTE, length:
|
|
1209
|
+
M.push([
|
|
1210
|
+
{ data: k.data, mode: t.BYTE, length: d(k.data) }
|
|
1211
1211
|
]);
|
|
1212
1212
|
}
|
|
1213
1213
|
}
|
|
1214
|
-
return
|
|
1214
|
+
return M;
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function m(x, M) {
|
|
1217
1217
|
const E = {}, k = { start: {} };
|
|
1218
|
-
let
|
|
1219
|
-
for (let
|
|
1220
|
-
const b = x[
|
|
1221
|
-
for (let
|
|
1222
|
-
const S = b[
|
|
1218
|
+
let R = ["start"];
|
|
1219
|
+
for (let y = 0; y < x.length; y++) {
|
|
1220
|
+
const b = x[y], C = [];
|
|
1221
|
+
for (let p = 0; p < b.length; p++) {
|
|
1222
|
+
const S = b[p], v = "" + y + p;
|
|
1223
1223
|
C.push(v), E[v] = { node: S, lastCount: 0 }, k[v] = {};
|
|
1224
|
-
for (let P = 0; P <
|
|
1225
|
-
const _ =
|
|
1226
|
-
E[_] && E[_].node.mode === S.mode ? (k[_][v] =
|
|
1224
|
+
for (let P = 0; P < R.length; P++) {
|
|
1225
|
+
const _ = R[P];
|
|
1226
|
+
E[_] && E[_].node.mode === S.mode ? (k[_][v] = g(E[_].lastCount + S.length, S.mode) - g(E[_].lastCount, S.mode), E[_].lastCount += S.length) : (E[_] && (E[_].lastCount = S.length), k[_][v] = g(S.length, S.mode) + 4 + t.getCharCountIndicator(S.mode, M));
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
|
-
|
|
1229
|
+
R = C;
|
|
1230
1230
|
}
|
|
1231
|
-
for (let
|
|
1232
|
-
k[
|
|
1231
|
+
for (let y = 0; y < R.length; y++)
|
|
1232
|
+
k[R[y]].end = 0;
|
|
1233
1233
|
return { map: k, table: E };
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1235
|
+
function F(x, M) {
|
|
1236
1236
|
let E;
|
|
1237
1237
|
const k = t.getBestModeForData(x);
|
|
1238
|
-
if (E = t.from(
|
|
1238
|
+
if (E = t.from(M, k), E !== t.BYTE && E.bit < k.bit)
|
|
1239
1239
|
throw new Error('"' + x + '" cannot be encoded with mode ' + t.toString(E) + `.
|
|
1240
1240
|
Suggested mode is: ` + t.toString(k));
|
|
1241
1241
|
switch (E === t.KANJI && !a.isKanjiModeEnabled() && (E = t.BYTE), E) {
|
|
@@ -1249,129 +1249,129 @@ function dn() {
|
|
|
1249
1249
|
return new e(x);
|
|
1250
1250
|
}
|
|
1251
1251
|
}
|
|
1252
|
-
n.fromArray = function(
|
|
1253
|
-
return
|
|
1254
|
-
return typeof k == "string" ? E.push(
|
|
1252
|
+
n.fromArray = function(M) {
|
|
1253
|
+
return M.reduce(function(E, k) {
|
|
1254
|
+
return typeof k == "string" ? E.push(F(k, null)) : k.data && E.push(F(k.data, k.mode)), E;
|
|
1255
1255
|
}, []);
|
|
1256
|
-
}, n.fromString = function(
|
|
1257
|
-
const k = h(
|
|
1258
|
-
for (let
|
|
1259
|
-
C.push(
|
|
1260
|
-
return n.fromArray(
|
|
1261
|
-
}, n.rawSplit = function(
|
|
1256
|
+
}, n.fromString = function(M, E) {
|
|
1257
|
+
const k = h(M, a.isKanjiModeEnabled()), R = w(k), y = m(R, E), b = l.find_path(y.map, "start", "end"), C = [];
|
|
1258
|
+
for (let p = 1; p < b.length - 1; p++)
|
|
1259
|
+
C.push(y.table[b[p]].node);
|
|
1260
|
+
return n.fromArray(u(C));
|
|
1261
|
+
}, n.rawSplit = function(M) {
|
|
1262
1262
|
return n.fromArray(
|
|
1263
|
-
h(
|
|
1263
|
+
h(M, a.isKanjiModeEnabled())
|
|
1264
1264
|
);
|
|
1265
1265
|
};
|
|
1266
|
-
}(
|
|
1266
|
+
}(Tt)), Tt;
|
|
1267
1267
|
}
|
|
1268
|
-
var
|
|
1268
|
+
var Ce;
|
|
1269
1269
|
function hn() {
|
|
1270
|
-
if (
|
|
1271
|
-
|
|
1272
|
-
const n =
|
|
1273
|
-
function
|
|
1274
|
-
const C =
|
|
1275
|
-
for (let S = 0; S <
|
|
1276
|
-
const v =
|
|
1270
|
+
if (Ce) return mt;
|
|
1271
|
+
Ce = 1;
|
|
1272
|
+
const n = H(), t = Ot(), o = Ge(), i = Ke(), e = Je(), s = Xe(), r = Qe(), a = Ae(), l = en(), d = nn(), c = sn(), h = Y(), g = un();
|
|
1273
|
+
function u(y, b) {
|
|
1274
|
+
const C = y.size, p = s.getPositions(b);
|
|
1275
|
+
for (let S = 0; S < p.length; S++) {
|
|
1276
|
+
const v = p[S][0], P = p[S][1];
|
|
1277
1277
|
for (let _ = -1; _ <= 7; _++)
|
|
1278
1278
|
if (!(v + _ <= -1 || C <= v + _))
|
|
1279
|
-
for (let
|
|
1280
|
-
P +
|
|
1279
|
+
for (let A = -1; A <= 7; A++)
|
|
1280
|
+
P + A <= -1 || C <= P + A || (_ >= 0 && _ <= 6 && (A === 0 || A === 6) || A >= 0 && A <= 6 && (_ === 0 || _ === 6) || _ >= 2 && _ <= 4 && A >= 2 && A <= 4 ? y.set(v + _, P + A, !0, !0) : y.set(v + _, P + A, !1, !0));
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1284
|
-
const b =
|
|
1283
|
+
function w(y) {
|
|
1284
|
+
const b = y.size;
|
|
1285
1285
|
for (let C = 8; C < b - 8; C++) {
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1286
|
+
const p = C % 2 === 0;
|
|
1287
|
+
y.set(C, 6, p, !0), y.set(6, C, p, !0);
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function m(y, b) {
|
|
1291
1291
|
const C = e.getPositions(b);
|
|
1292
|
-
for (let
|
|
1293
|
-
const S = C[
|
|
1292
|
+
for (let p = 0; p < C.length; p++) {
|
|
1293
|
+
const S = C[p][0], v = C[p][1];
|
|
1294
1294
|
for (let P = -2; P <= 2; P++)
|
|
1295
1295
|
for (let _ = -2; _ <= 2; _++)
|
|
1296
|
-
P === -2 || P === 2 || _ === -2 || _ === 2 || P === 0 && _ === 0 ?
|
|
1296
|
+
P === -2 || P === 2 || _ === -2 || _ === 2 || P === 0 && _ === 0 ? y.set(S + P, v + _, !0, !0) : y.set(S + P, v + _, !1, !0);
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1300
|
-
const C =
|
|
1299
|
+
function F(y, b) {
|
|
1300
|
+
const C = y.size, p = d.getEncodedBits(b);
|
|
1301
1301
|
let S, v, P;
|
|
1302
1302
|
for (let _ = 0; _ < 18; _++)
|
|
1303
|
-
S = Math.floor(_ / 3), v = _ % 3 + C - 8 - 3, P = (
|
|
1303
|
+
S = Math.floor(_ / 3), v = _ % 3 + C - 8 - 3, P = (p >> _ & 1) === 1, y.set(S, v, P, !0), y.set(v, S, P, !0);
|
|
1304
1304
|
}
|
|
1305
|
-
function x(
|
|
1306
|
-
const
|
|
1305
|
+
function x(y, b, C) {
|
|
1306
|
+
const p = y.size, S = c.getEncodedBits(b, C);
|
|
1307
1307
|
let v, P;
|
|
1308
1308
|
for (v = 0; v < 15; v++)
|
|
1309
|
-
P = (S >> v & 1) === 1, v < 6 ?
|
|
1310
|
-
|
|
1309
|
+
P = (S >> v & 1) === 1, v < 6 ? y.set(v, 8, P, !0) : v < 8 ? y.set(v + 1, 8, P, !0) : y.set(p - 15 + v, 8, P, !0), v < 8 ? y.set(8, p - v - 1, P, !0) : v < 9 ? y.set(8, 15 - v - 1 + 1, P, !0) : y.set(8, 15 - v - 1, P, !0);
|
|
1310
|
+
y.set(p - 8, 8, 1, !0);
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1313
|
-
const C =
|
|
1314
|
-
let
|
|
1312
|
+
function M(y, b) {
|
|
1313
|
+
const C = y.size;
|
|
1314
|
+
let p = -1, S = C - 1, v = 7, P = 0;
|
|
1315
1315
|
for (let _ = C - 1; _ > 0; _ -= 2)
|
|
1316
1316
|
for (_ === 6 && _--; ; ) {
|
|
1317
|
-
for (let
|
|
1318
|
-
if (!
|
|
1319
|
-
let
|
|
1320
|
-
P < b.length && (
|
|
1317
|
+
for (let A = 0; A < 2; A++)
|
|
1318
|
+
if (!y.isReserved(S, _ - A)) {
|
|
1319
|
+
let O = !1;
|
|
1320
|
+
P < b.length && (O = (b[P] >>> v & 1) === 1), y.set(S, _ - A, O), v--, v === -1 && (P++, v = 7);
|
|
1321
1321
|
}
|
|
1322
|
-
if (S +=
|
|
1323
|
-
S -=
|
|
1322
|
+
if (S += p, S < 0 || C <= S) {
|
|
1323
|
+
S -= p, p = -p;
|
|
1324
1324
|
break;
|
|
1325
1325
|
}
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
|
-
function E(
|
|
1329
|
-
const
|
|
1330
|
-
C.forEach(function(
|
|
1331
|
-
|
|
1328
|
+
function E(y, b, C) {
|
|
1329
|
+
const p = new o();
|
|
1330
|
+
C.forEach(function(A) {
|
|
1331
|
+
p.put(A.mode.bit, 4), p.put(A.getLength(), h.getCharCountIndicator(A.mode, y)), A.write(p);
|
|
1332
1332
|
});
|
|
1333
|
-
const S = n.getSymbolTotalCodewords(
|
|
1334
|
-
for (
|
|
1335
|
-
|
|
1336
|
-
const _ = (P -
|
|
1337
|
-
for (let
|
|
1338
|
-
|
|
1339
|
-
return k(
|
|
1340
|
-
}
|
|
1341
|
-
function k(
|
|
1342
|
-
const
|
|
1343
|
-
let
|
|
1344
|
-
const
|
|
1345
|
-
let
|
|
1346
|
-
const
|
|
1347
|
-
for (let
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1350
|
-
}
|
|
1351
|
-
const
|
|
1352
|
-
let
|
|
1353
|
-
for (q = 0; q <
|
|
1354
|
-
for (
|
|
1355
|
-
q <
|
|
1356
|
-
for (q = 0; q <
|
|
1357
|
-
for (
|
|
1358
|
-
|
|
1359
|
-
return
|
|
1360
|
-
}
|
|
1361
|
-
function
|
|
1333
|
+
const S = n.getSymbolTotalCodewords(y), v = a.getTotalCodewordsCount(y, b), P = (S - v) * 8;
|
|
1334
|
+
for (p.getLengthInBits() + 4 <= P && p.put(0, 4); p.getLengthInBits() % 8 !== 0; )
|
|
1335
|
+
p.putBit(0);
|
|
1336
|
+
const _ = (P - p.getLengthInBits()) / 8;
|
|
1337
|
+
for (let A = 0; A < _; A++)
|
|
1338
|
+
p.put(A % 2 ? 17 : 236, 8);
|
|
1339
|
+
return k(p, y, b);
|
|
1340
|
+
}
|
|
1341
|
+
function k(y, b, C) {
|
|
1342
|
+
const p = n.getSymbolTotalCodewords(b), S = a.getTotalCodewordsCount(b, C), v = p - S, P = a.getBlocksCount(b, C), _ = p % P, A = P - _, O = Math.floor(p / P), tt = Math.floor(v / P), Fe = tt + 1, Wt = O - tt, Re = new l(Wt);
|
|
1343
|
+
let ct = 0;
|
|
1344
|
+
const nt = new Array(P), Ht = new Array(P);
|
|
1345
|
+
let dt = 0;
|
|
1346
|
+
const $e = new Uint8Array(y.buffer);
|
|
1347
|
+
for (let G = 0; G < P; G++) {
|
|
1348
|
+
const ht = G < A ? tt : Fe;
|
|
1349
|
+
nt[G] = $e.slice(ct, ct + ht), Ht[G] = Re.encode(nt[G]), ct += ht, dt = Math.max(dt, ht);
|
|
1350
|
+
}
|
|
1351
|
+
const ut = new Uint8Array(p);
|
|
1352
|
+
let Yt = 0, q, j;
|
|
1353
|
+
for (q = 0; q < dt; q++)
|
|
1354
|
+
for (j = 0; j < P; j++)
|
|
1355
|
+
q < nt[j].length && (ut[Yt++] = nt[j][q]);
|
|
1356
|
+
for (q = 0; q < Wt; q++)
|
|
1357
|
+
for (j = 0; j < P; j++)
|
|
1358
|
+
ut[Yt++] = Ht[j][q];
|
|
1359
|
+
return ut;
|
|
1360
|
+
}
|
|
1361
|
+
function R(y, b, C, p) {
|
|
1362
1362
|
let S;
|
|
1363
|
-
if (Array.isArray(
|
|
1364
|
-
S =
|
|
1365
|
-
else if (typeof
|
|
1366
|
-
let
|
|
1367
|
-
if (!
|
|
1368
|
-
const
|
|
1369
|
-
|
|
1363
|
+
if (Array.isArray(y))
|
|
1364
|
+
S = g.fromArray(y);
|
|
1365
|
+
else if (typeof y == "string") {
|
|
1366
|
+
let O = b;
|
|
1367
|
+
if (!O) {
|
|
1368
|
+
const tt = g.rawSplit(y);
|
|
1369
|
+
O = d.getBestVersionForData(tt, C);
|
|
1370
1370
|
}
|
|
1371
|
-
S =
|
|
1371
|
+
S = g.fromString(y, O || 40);
|
|
1372
1372
|
} else
|
|
1373
1373
|
throw new Error("Invalid data");
|
|
1374
|
-
const v =
|
|
1374
|
+
const v = d.getBestVersionForData(S, C);
|
|
1375
1375
|
if (!v)
|
|
1376
1376
|
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
1377
1377
|
if (!b)
|
|
@@ -1383,28 +1383,28 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
1383
1383
|
Minimum version required to store current data is: ` + v + `.
|
|
1384
1384
|
`
|
|
1385
1385
|
);
|
|
1386
|
-
const P = E(b, C, S), _ = n.getSymbolSize(b),
|
|
1387
|
-
return
|
|
1388
|
-
|
|
1389
|
-
x.bind(null,
|
|
1390
|
-
)), r.applyMask(
|
|
1391
|
-
modules:
|
|
1386
|
+
const P = E(b, C, S), _ = n.getSymbolSize(b), A = new i(_);
|
|
1387
|
+
return u(A, b), w(A), m(A, b), x(A, C, 0), b >= 7 && F(A, b), M(A, P), isNaN(p) && (p = r.getBestMask(
|
|
1388
|
+
A,
|
|
1389
|
+
x.bind(null, A, C)
|
|
1390
|
+
)), r.applyMask(p, A), x(A, C, p), {
|
|
1391
|
+
modules: A,
|
|
1392
1392
|
version: b,
|
|
1393
1393
|
errorCorrectionLevel: C,
|
|
1394
|
-
maskPattern:
|
|
1394
|
+
maskPattern: p,
|
|
1395
1395
|
segments: S
|
|
1396
1396
|
};
|
|
1397
1397
|
}
|
|
1398
|
-
return
|
|
1398
|
+
return mt.create = function(b, C) {
|
|
1399
1399
|
if (typeof b > "u" || b === "")
|
|
1400
1400
|
throw new Error("No input text");
|
|
1401
|
-
let
|
|
1402
|
-
return typeof C < "u" && (
|
|
1403
|
-
},
|
|
1401
|
+
let p = t.M, S, v;
|
|
1402
|
+
return typeof C < "u" && (p = t.from(C.errorCorrectionLevel, t.M), S = d.from(C.version), v = r.from(C.maskPattern), C.toSJISFunc && n.setToSJISFunction(C.toSJISFunc)), R(b, S, p, v);
|
|
1403
|
+
}, mt;
|
|
1404
1404
|
}
|
|
1405
|
-
var
|
|
1406
|
-
function
|
|
1407
|
-
return
|
|
1405
|
+
var Rt = {}, $t = {}, xe;
|
|
1406
|
+
function De() {
|
|
1407
|
+
return xe || (xe = 1, function(n) {
|
|
1408
1408
|
function t(o) {
|
|
1409
1409
|
if (typeof o == "number" && (o = o.toString()), typeof o != "string")
|
|
1410
1410
|
throw new Error("Color should be defined as hex string");
|
|
@@ -1443,23 +1443,23 @@ function Ie() {
|
|
|
1443
1443
|
const s = n.getScale(i, e);
|
|
1444
1444
|
return Math.floor((i + e.margin * 2) * s);
|
|
1445
1445
|
}, n.qrToImageData = function(i, e, s) {
|
|
1446
|
-
const r = e.modules.size, a = e.modules.data, l = n.getScale(r, s),
|
|
1447
|
-
for (let
|
|
1448
|
-
for (let
|
|
1449
|
-
let
|
|
1450
|
-
if (
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1446
|
+
const r = e.modules.size, a = e.modules.data, l = n.getScale(r, s), d = Math.floor((r + s.margin * 2) * l), c = s.margin * l, h = [s.color.light, s.color.dark];
|
|
1447
|
+
for (let g = 0; g < d; g++)
|
|
1448
|
+
for (let u = 0; u < d; u++) {
|
|
1449
|
+
let w = (g * d + u) * 4, m = s.color.light;
|
|
1450
|
+
if (g >= c && u >= c && g < d - c && u < d - c) {
|
|
1451
|
+
const F = Math.floor((g - c) / l), x = Math.floor((u - c) / l);
|
|
1452
|
+
m = h[a[F * r + x] ? 1 : 0];
|
|
1453
1453
|
}
|
|
1454
|
-
i[
|
|
1454
|
+
i[w++] = m.r, i[w++] = m.g, i[w++] = m.b, i[w] = m.a;
|
|
1455
1455
|
}
|
|
1456
1456
|
};
|
|
1457
|
-
}(
|
|
1457
|
+
}($t)), $t;
|
|
1458
1458
|
}
|
|
1459
|
-
var
|
|
1459
|
+
var be;
|
|
1460
1460
|
function fn() {
|
|
1461
|
-
return
|
|
1462
|
-
const t =
|
|
1461
|
+
return be || (be = 1, function(n) {
|
|
1462
|
+
const t = De();
|
|
1463
1463
|
function o(e, s, r) {
|
|
1464
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";
|
|
1465
1465
|
}
|
|
@@ -1471,23 +1471,23 @@ function fn() {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
1473
|
n.render = function(s, r, a) {
|
|
1474
|
-
let l = a,
|
|
1475
|
-
typeof l > "u" && (!r || !r.getContext) && (l = r, r = void 0), r || (
|
|
1476
|
-
const c = t.getImageWidth(s.modules.size, l), h =
|
|
1477
|
-
return t.qrToImageData(
|
|
1474
|
+
let l = a, d = r;
|
|
1475
|
+
typeof l > "u" && (!r || !r.getContext) && (l = r, r = void 0), r || (d = i()), l = t.getOptions(l);
|
|
1476
|
+
const c = t.getImageWidth(s.modules.size, l), h = d.getContext("2d"), g = h.createImageData(c, c);
|
|
1477
|
+
return t.qrToImageData(g.data, s, l), o(h, d, c), h.putImageData(g, 0, 0), d;
|
|
1478
1478
|
}, n.renderToDataURL = function(s, r, a) {
|
|
1479
1479
|
let l = a;
|
|
1480
1480
|
typeof l > "u" && (!r || !r.getContext) && (l = r, r = void 0), l || (l = {});
|
|
1481
|
-
const
|
|
1482
|
-
return
|
|
1481
|
+
const d = n.render(s, r, l), c = l.type || "image/png", h = l.rendererOpts || {};
|
|
1482
|
+
return d.toDataURL(c, h.quality);
|
|
1483
1483
|
};
|
|
1484
|
-
}(
|
|
1484
|
+
}(Rt)), Rt;
|
|
1485
1485
|
}
|
|
1486
|
-
var
|
|
1486
|
+
var Lt = {}, Pe;
|
|
1487
1487
|
function gn() {
|
|
1488
|
-
if (
|
|
1489
|
-
|
|
1490
|
-
const n =
|
|
1488
|
+
if (Pe) return Lt;
|
|
1489
|
+
Pe = 1;
|
|
1490
|
+
const n = De();
|
|
1491
1491
|
function t(e, s) {
|
|
1492
1492
|
const r = e.a / 255, a = s + '="' + e.hex + '"';
|
|
1493
1493
|
return r < 1 ? a + " " + s + '-opacity="' + r.toFixed(2).slice(1) + '"' : a;
|
|
@@ -1497,59 +1497,59 @@ function gn() {
|
|
|
1497
1497
|
return typeof r < "u" && (a += " " + r), a;
|
|
1498
1498
|
}
|
|
1499
1499
|
function i(e, s, r) {
|
|
1500
|
-
let a = "", l = 0,
|
|
1500
|
+
let a = "", l = 0, d = !1, c = 0;
|
|
1501
1501
|
for (let h = 0; h < e.length; h++) {
|
|
1502
|
-
const
|
|
1503
|
-
!
|
|
1502
|
+
const g = Math.floor(h % s), u = Math.floor(h / s);
|
|
1503
|
+
!g && !d && (d = !0), e[h] ? (c++, h > 0 && g > 0 && e[h - 1] || (a += d ? o("M", g + r, 0.5 + u + r) : o("m", l, 0), l = 0, d = !1), g + 1 < s && e[h + 1] || (a += o("h", c), c = 0)) : l++;
|
|
1504
1504
|
}
|
|
1505
1505
|
return a;
|
|
1506
1506
|
}
|
|
1507
|
-
return
|
|
1508
|
-
const l = n.getOptions(r),
|
|
1507
|
+
return Lt.render = function(s, r, a) {
|
|
1508
|
+
const l = n.getOptions(r), d = s.modules.size, c = s.modules.data, h = d + l.margin * 2, g = l.color.light.a ? "<path " + t(l.color.light, "fill") + ' d="M0 0h' + h + "v" + h + 'H0z"/>' : "", u = "<path " + t(l.color.dark, "stroke") + ' d="' + i(c, d, l.margin) + '"/>', w = 'viewBox="0 0 ' + h + " " + h + '"', F = '<svg xmlns="http://www.w3.org/2000/svg" ' + (l.width ? 'width="' + l.width + '" height="' + l.width + '" ' : "") + w + ' shape-rendering="crispEdges">' + g + u + `</svg>
|
|
1509
1509
|
`;
|
|
1510
|
-
return typeof a == "function" && a(null,
|
|
1511
|
-
},
|
|
1510
|
+
return typeof a == "function" && a(null, F), F;
|
|
1511
|
+
}, Lt;
|
|
1512
1512
|
}
|
|
1513
|
-
var
|
|
1513
|
+
var Ee;
|
|
1514
1514
|
function mn() {
|
|
1515
|
-
if (
|
|
1516
|
-
|
|
1515
|
+
if (Ee) return K;
|
|
1516
|
+
Ee = 1;
|
|
1517
1517
|
const n = Ye(), t = hn(), o = fn(), i = gn();
|
|
1518
|
-
function e(s, r, a, l,
|
|
1519
|
-
const c = [].slice.call(arguments, 1), h = c.length,
|
|
1520
|
-
if (!
|
|
1518
|
+
function e(s, r, a, l, d) {
|
|
1519
|
+
const c = [].slice.call(arguments, 1), h = c.length, g = typeof c[h - 1] == "function";
|
|
1520
|
+
if (!g && !n())
|
|
1521
1521
|
throw new Error("Callback required as last argument");
|
|
1522
|
-
if (
|
|
1522
|
+
if (g) {
|
|
1523
1523
|
if (h < 2)
|
|
1524
1524
|
throw new Error("Too few arguments provided");
|
|
1525
|
-
h === 2 ? (
|
|
1525
|
+
h === 2 ? (d = a, a = r, r = l = void 0) : h === 3 && (r.getContext && typeof d > "u" ? (d = l, l = void 0) : (d = l, l = a, a = r, r = void 0));
|
|
1526
1526
|
} else {
|
|
1527
1527
|
if (h < 1)
|
|
1528
1528
|
throw new Error("Too few arguments provided");
|
|
1529
|
-
return h === 1 ? (a = r, r = l = void 0) : h === 2 && !r.getContext && (l = a, a = r, r = void 0), new Promise(function(
|
|
1529
|
+
return h === 1 ? (a = r, r = l = void 0) : h === 2 && !r.getContext && (l = a, a = r, r = void 0), new Promise(function(u, w) {
|
|
1530
1530
|
try {
|
|
1531
|
-
const
|
|
1532
|
-
|
|
1533
|
-
} catch (
|
|
1534
|
-
|
|
1531
|
+
const m = t.create(a, l);
|
|
1532
|
+
u(s(m, r, l));
|
|
1533
|
+
} catch (m) {
|
|
1534
|
+
w(m);
|
|
1535
1535
|
}
|
|
1536
1536
|
});
|
|
1537
1537
|
}
|
|
1538
1538
|
try {
|
|
1539
|
-
const
|
|
1540
|
-
|
|
1541
|
-
} catch (
|
|
1542
|
-
u
|
|
1539
|
+
const u = t.create(a, l);
|
|
1540
|
+
d(null, s(u, r, l));
|
|
1541
|
+
} catch (u) {
|
|
1542
|
+
d(u);
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
|
-
return
|
|
1545
|
+
return K.create = t.create, K.toCanvas = e.bind(null, o.render), K.toDataURL = e.bind(null, o.renderToDataURL), K.toString = e.bind(null, function(s, r, a) {
|
|
1546
1546
|
return i.render(s, a);
|
|
1547
|
-
}),
|
|
1547
|
+
}), K;
|
|
1548
1548
|
}
|
|
1549
|
-
var
|
|
1549
|
+
var Nt = mn();
|
|
1550
1550
|
/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */
|
|
1551
|
-
const
|
|
1552
|
-
var pn =
|
|
1551
|
+
const ke = "ready";
|
|
1552
|
+
var pn = Le({
|
|
1553
1553
|
name: "VueQrcode",
|
|
1554
1554
|
props: {
|
|
1555
1555
|
/**
|
|
@@ -1575,7 +1575,7 @@ var pn = Re({
|
|
|
1575
1575
|
default: "canvas"
|
|
1576
1576
|
}
|
|
1577
1577
|
},
|
|
1578
|
-
emits: [
|
|
1578
|
+
emits: [ke],
|
|
1579
1579
|
watch: {
|
|
1580
1580
|
$props: {
|
|
1581
1581
|
deep: !0,
|
|
@@ -1597,25 +1597,25 @@ var pn = Re({
|
|
|
1597
1597
|
*/
|
|
1598
1598
|
generate() {
|
|
1599
1599
|
const n = this.options || {}, t = String(this.value), o = () => {
|
|
1600
|
-
this.$emit(
|
|
1600
|
+
this.$emit(ke, this.$el);
|
|
1601
1601
|
};
|
|
1602
1602
|
switch (this.tag) {
|
|
1603
1603
|
case "canvas":
|
|
1604
|
-
|
|
1604
|
+
Nt.toCanvas(this.$el, t, n, (i) => {
|
|
1605
1605
|
if (i)
|
|
1606
1606
|
throw i;
|
|
1607
1607
|
o();
|
|
1608
1608
|
});
|
|
1609
1609
|
break;
|
|
1610
1610
|
case "img":
|
|
1611
|
-
|
|
1611
|
+
Nt.toDataURL(t, n, (i, e) => {
|
|
1612
1612
|
if (i)
|
|
1613
1613
|
throw i;
|
|
1614
1614
|
this.$el.src = e, this.$el.onload = o;
|
|
1615
1615
|
});
|
|
1616
1616
|
break;
|
|
1617
1617
|
case "svg":
|
|
1618
|
-
|
|
1618
|
+
Nt.toString(t, n, (i, e) => {
|
|
1619
1619
|
if (i)
|
|
1620
1620
|
throw i;
|
|
1621
1621
|
const s = document.createElement("div");
|
|
@@ -1623,11 +1623,11 @@ var pn = Re({
|
|
|
1623
1623
|
const r = s.querySelector("svg");
|
|
1624
1624
|
if (r) {
|
|
1625
1625
|
const { attributes: a, childNodes: l } = r;
|
|
1626
|
-
Object.keys(a).forEach((
|
|
1627
|
-
const c = a[Number(
|
|
1626
|
+
Object.keys(a).forEach((d) => {
|
|
1627
|
+
const c = a[Number(d)];
|
|
1628
1628
|
this.$el.setAttribute(c.name, c.value);
|
|
1629
|
-
}), Object.keys(l).forEach((
|
|
1630
|
-
const c = l[Number(
|
|
1629
|
+
}), Object.keys(l).forEach((d) => {
|
|
1630
|
+
const c = l[Number(d)];
|
|
1631
1631
|
this.$el.appendChild(c.cloneNode(!0));
|
|
1632
1632
|
}), o();
|
|
1633
1633
|
}
|
|
@@ -1637,7 +1637,7 @@ var pn = Re({
|
|
|
1637
1637
|
}
|
|
1638
1638
|
},
|
|
1639
1639
|
render() {
|
|
1640
|
-
return
|
|
1640
|
+
return qt(this.tag, this.$slots.default);
|
|
1641
1641
|
}
|
|
1642
1642
|
});
|
|
1643
1643
|
class wn {
|
|
@@ -1699,9 +1699,9 @@ class wn {
|
|
|
1699
1699
|
delete this._activePolls[t];
|
|
1700
1700
|
}
|
|
1701
1701
|
}
|
|
1702
|
-
let
|
|
1703
|
-
function
|
|
1704
|
-
return
|
|
1702
|
+
let Ut = null;
|
|
1703
|
+
function ot() {
|
|
1704
|
+
return Ut || (Ut = new wn()), Ut;
|
|
1705
1705
|
}
|
|
1706
1706
|
function yn(n) {
|
|
1707
1707
|
window.history.replaceState(window.history.state, "", window.location.href);
|
|
@@ -1715,7 +1715,7 @@ const vn = {
|
|
|
1715
1715
|
QrCode: pn
|
|
1716
1716
|
},
|
|
1717
1717
|
emits: ["loading", "error", "complete"],
|
|
1718
|
-
mixins: [
|
|
1718
|
+
mixins: [Q([])],
|
|
1719
1719
|
props: {
|
|
1720
1720
|
onCompleteFunc: {
|
|
1721
1721
|
type: Function,
|
|
@@ -1774,12 +1774,12 @@ const vn = {
|
|
|
1774
1774
|
}
|
|
1775
1775
|
},
|
|
1776
1776
|
created() {
|
|
1777
|
-
this.isMobile =
|
|
1777
|
+
this.isMobile = Te(), this.tryResumeSigningSession();
|
|
1778
1778
|
},
|
|
1779
1779
|
methods: {
|
|
1780
1780
|
tryResumeSigningSession() {
|
|
1781
1781
|
var o, i;
|
|
1782
|
-
const n =
|
|
1782
|
+
const n = ot(), t = Object.keys(n._activePolls).find(
|
|
1783
1783
|
(e) => e.includes("bankId-")
|
|
1784
1784
|
);
|
|
1785
1785
|
try {
|
|
@@ -1796,7 +1796,7 @@ const vn = {
|
|
|
1796
1796
|
const s = this._document.$t(
|
|
1797
1797
|
"answerModal.bankId.component.viewText.error.text"
|
|
1798
1798
|
);
|
|
1799
|
-
|
|
1799
|
+
st("error", s);
|
|
1800
1800
|
}
|
|
1801
1801
|
},
|
|
1802
1802
|
async submit({ answer: n }) {
|
|
@@ -1813,13 +1813,13 @@ const vn = {
|
|
|
1813
1813
|
},
|
|
1814
1814
|
async startPolling() {
|
|
1815
1815
|
if (!this.signAnswerId) throw Error("Missing signAnswerId");
|
|
1816
|
-
const n =
|
|
1816
|
+
const n = ot(), t = `bankId-${this.signAnswerId}`, o = async () => {
|
|
1817
1817
|
if (!this.signAnswerId) throw Error("Missing signAnswerId");
|
|
1818
1818
|
const i = () => {
|
|
1819
1819
|
this.clearSignState(), n.removePoll(t);
|
|
1820
1820
|
};
|
|
1821
1821
|
try {
|
|
1822
|
-
const { data: e } = await
|
|
1822
|
+
const { data: e } = await Me.get(this.signAnswerId);
|
|
1823
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
1824
|
} catch (e) {
|
|
1825
1825
|
this.onError(e), i();
|
|
@@ -1841,7 +1841,7 @@ const vn = {
|
|
|
1841
1841
|
const e = this._document.$t(
|
|
1842
1842
|
"answerModal.bankId.component.viewText.error.text"
|
|
1843
1843
|
);
|
|
1844
|
-
|
|
1844
|
+
st("error", e);
|
|
1845
1845
|
}
|
|
1846
1846
|
},
|
|
1847
1847
|
clearSignState() {
|
|
@@ -1874,13 +1874,13 @@ const vn = {
|
|
|
1874
1874
|
case 9006:
|
|
1875
1875
|
// Signing start fail
|
|
1876
1876
|
case 9007:
|
|
1877
|
-
|
|
1877
|
+
jt.warn(n);
|
|
1878
1878
|
break;
|
|
1879
1879
|
case 9009:
|
|
1880
1880
|
this.$emit("complete");
|
|
1881
1881
|
break;
|
|
1882
1882
|
default:
|
|
1883
|
-
|
|
1883
|
+
at(n, { showMessage: !1 });
|
|
1884
1884
|
}
|
|
1885
1885
|
this.errorMessage = this.$i18n.te(`errors:${t}`) && this._document.$t(`answerModal.bankId.component.errors.${t}`) || this._document.$t("answerModal.bankId.component.defaultError");
|
|
1886
1886
|
},
|
|
@@ -1889,7 +1889,7 @@ const vn = {
|
|
|
1889
1889
|
let n = "bankid://", t = "null";
|
|
1890
1890
|
if (this.isMobile) {
|
|
1891
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" &&
|
|
1892
|
+
(s || r) && (n = "https://app.bankid.com"), i === "iOS" && Se.value !== "widget" && (t = yn(this.signAnswerId));
|
|
1893
1893
|
}
|
|
1894
1894
|
const o = `${n}/?autostarttoken=${this.autoStartToken}&redirect=${t}`;
|
|
1895
1895
|
this.isMobile ? document.location = o : this.$refs.autoStartFrame.src = o;
|
|
@@ -1912,19 +1912,19 @@ const vn = {
|
|
|
1912
1912
|
style: { padding: `calc(3 * var(--rem)) calc(2 * var(--rem))
|
|
1913
1913
|
calc(2 * var(--rem))` }
|
|
1914
1914
|
}, Tn = ["textContent"], Mn = ["textContent"];
|
|
1915
|
-
function
|
|
1916
|
-
const r =
|
|
1917
|
-
return
|
|
1918
|
-
|
|
1919
|
-
["form", "signing", "error", "canceled"].includes(e.view) ? (
|
|
1915
|
+
function An(n, t, o, i, e, s) {
|
|
1916
|
+
const r = L("CIcon"), a = L("QrCode"), l = L("CButton"), d = L("Animation");
|
|
1917
|
+
return I(), D("div", _n, [
|
|
1918
|
+
f("iframe", Cn, null, 512),
|
|
1919
|
+
["form", "signing", "error", "canceled"].includes(e.view) ? (I(), D("div", xn, [
|
|
1920
1920
|
B(r, {
|
|
1921
1921
|
type: "bankId",
|
|
1922
1922
|
size: "50",
|
|
1923
1923
|
class: "text-gray-500"
|
|
1924
1924
|
})
|
|
1925
|
-
])) :
|
|
1926
|
-
["new", "waiting", "started"].includes(e.view) ? (
|
|
1927
|
-
e.qrCode ? (
|
|
1925
|
+
])) : $("", !0),
|
|
1926
|
+
["new", "waiting", "started"].includes(e.view) ? (I(), D(J, { key: 1 }, [
|
|
1927
|
+
e.qrCode ? (I(), X(a, {
|
|
1928
1928
|
key: 0,
|
|
1929
1929
|
value: e.qrCode,
|
|
1930
1930
|
options: {
|
|
@@ -1932,18 +1932,18 @@ function In(n, t, o, i, e, s) {
|
|
|
1932
1932
|
errorCorrectionLevel: "L",
|
|
1933
1933
|
color: { dark: "#000000" }
|
|
1934
1934
|
}
|
|
1935
|
-
}, null, 8, ["value"])) :
|
|
1936
|
-
], 64)) :
|
|
1937
|
-
B(
|
|
1935
|
+
}, null, 8, ["value"])) : $("", !0)
|
|
1936
|
+
], 64)) : $("", !0),
|
|
1937
|
+
B(d, { class: "w-full" }, {
|
|
1938
1938
|
default: N(() => {
|
|
1939
1939
|
var c;
|
|
1940
1940
|
return [
|
|
1941
|
-
|
|
1941
|
+
f("div", {
|
|
1942
1942
|
key: "a",
|
|
1943
1943
|
class: "min-h-[20px] pt-4 text-sm text-gray-500",
|
|
1944
|
-
textContent:
|
|
1944
|
+
textContent: T((c = s.viewText[e.view]) == null ? void 0 : c.spinnerText)
|
|
1945
1945
|
}, null, 8, bn),
|
|
1946
|
-
!e.isMobile && ["new", "waiting", "started"].includes(e.view) ? (
|
|
1946
|
+
!e.isMobile && ["new", "waiting", "started"].includes(e.view) ? (I(), X(l, {
|
|
1947
1947
|
key: "b",
|
|
1948
1948
|
type: "none",
|
|
1949
1949
|
pattern: "secondary",
|
|
@@ -1952,51 +1952,51 @@ function In(n, t, o, i, e, s) {
|
|
|
1952
1952
|
onClick: s.triggerAutoStart
|
|
1953
1953
|
}, {
|
|
1954
1954
|
default: N(() => [
|
|
1955
|
-
|
|
1955
|
+
W(T(n._document.$t("answerModal.bankId.component.startOnThisDevice")), 1)
|
|
1956
1956
|
]),
|
|
1957
1957
|
_: 1
|
|
1958
|
-
}, 8, ["onClick"])) :
|
|
1958
|
+
}, 8, ["onClick"])) : $("", !0)
|
|
1959
1959
|
];
|
|
1960
1960
|
}),
|
|
1961
1961
|
_: 1
|
|
1962
1962
|
}),
|
|
1963
|
-
["form", "new", "waiting", "started"].includes(e.view) ?
|
|
1964
|
-
B(
|
|
1963
|
+
["form", "new", "waiting", "started"].includes(e.view) ? $("", !0) : (I(), D("div", Pn, [
|
|
1964
|
+
B(lt, { name: "pop-in" }, {
|
|
1965
1965
|
default: N(() => [
|
|
1966
|
-
["signing", "error", "canceled"].includes(e.view) ? (
|
|
1966
|
+
["signing", "error", "canceled"].includes(e.view) ? (I(), D("div", {
|
|
1967
1967
|
key: 0,
|
|
1968
1968
|
class: "bankid-popup",
|
|
1969
1969
|
onClick: t[1] || (t[1] = () => {
|
|
1970
1970
|
e.view = "form", e.isLoading = !1;
|
|
1971
1971
|
})
|
|
1972
1972
|
}, [
|
|
1973
|
-
|
|
1973
|
+
f("div", En, [
|
|
1974
1974
|
B(r, {
|
|
1975
1975
|
type: "bankId",
|
|
1976
1976
|
size: "34",
|
|
1977
1977
|
class: "text-white"
|
|
1978
1978
|
}),
|
|
1979
|
-
|
|
1979
|
+
f("div", {
|
|
1980
1980
|
class: "pt-4 text-sm font-medium text-white opacity-75",
|
|
1981
|
-
textContent:
|
|
1981
|
+
textContent: T(s.viewText[e.view].text)
|
|
1982
1982
|
}, null, 8, kn)
|
|
1983
1983
|
]),
|
|
1984
|
-
|
|
1985
|
-
e.view === "signing" ? (
|
|
1986
|
-
t[2] || (t[2] =
|
|
1987
|
-
|
|
1984
|
+
f("div", Sn, [
|
|
1985
|
+
e.view === "signing" ? (I(), D(J, { key: 0 }, [
|
|
1986
|
+
t[2] || (t[2] = f("div", { class: "spinner" }, null, -1)),
|
|
1987
|
+
f("div", {
|
|
1988
1988
|
class: "pt-8 text-gray-500",
|
|
1989
|
-
textContent:
|
|
1989
|
+
textContent: T(s.viewText[e.view].spinnerText)
|
|
1990
1990
|
}, null, 8, Tn)
|
|
1991
|
-
], 64)) : ["error", "canceled"].includes(e.view) ? (
|
|
1991
|
+
], 64)) : ["error", "canceled"].includes(e.view) ? (I(), D(J, { key: 1 }, [
|
|
1992
1992
|
B(r, {
|
|
1993
1993
|
type: "error",
|
|
1994
1994
|
size: "22",
|
|
1995
1995
|
class: "mb-2.5 text-gray-400"
|
|
1996
1996
|
}),
|
|
1997
|
-
|
|
1997
|
+
f("div", {
|
|
1998
1998
|
style: { "font-size": "14px" },
|
|
1999
|
-
textContent:
|
|
1999
|
+
textContent: T(e.errorMessage)
|
|
2000
2000
|
}, null, 8, Mn),
|
|
2001
2001
|
B(l, {
|
|
2002
2002
|
loading: e.isLoading,
|
|
@@ -2007,22 +2007,22 @@ function In(n, t, o, i, e, s) {
|
|
|
2007
2007
|
onClick: t[0] || (t[0] = (c) => e.view = "form")
|
|
2008
2008
|
}, {
|
|
2009
2009
|
default: N(() => [
|
|
2010
|
-
|
|
2010
|
+
W(T(n._document.$t("tryAgain")), 1)
|
|
2011
2011
|
]),
|
|
2012
2012
|
_: 1
|
|
2013
2013
|
}, 8, ["loading"])
|
|
2014
|
-
], 64)) :
|
|
2014
|
+
], 64)) : $("", !0)
|
|
2015
2015
|
])
|
|
2016
|
-
])) :
|
|
2016
|
+
])) : $("", !0)
|
|
2017
2017
|
]),
|
|
2018
2018
|
_: 1
|
|
2019
2019
|
})
|
|
2020
2020
|
]))
|
|
2021
2021
|
]);
|
|
2022
2022
|
}
|
|
2023
|
-
const
|
|
2023
|
+
const In = /* @__PURE__ */ Z(vn, [["render", An], ["__scopeId", "data-v-ee068373"]]), Bn = {
|
|
2024
2024
|
name: "DenyAnswer",
|
|
2025
|
-
mixins: [
|
|
2025
|
+
mixins: [Q([])],
|
|
2026
2026
|
props: {
|
|
2027
2027
|
onCompleteFunc: {
|
|
2028
2028
|
type: Function,
|
|
@@ -2046,10 +2046,10 @@ const An = /* @__PURE__ */ tt(vn, [["render", In], ["__scopeId", "data-v-ee06837
|
|
|
2046
2046
|
}
|
|
2047
2047
|
}
|
|
2048
2048
|
}, Dn = { class: "text-left" };
|
|
2049
|
-
function
|
|
2050
|
-
const r =
|
|
2051
|
-
return
|
|
2052
|
-
|
|
2049
|
+
function Fn(n, t, o, i, e, s) {
|
|
2050
|
+
const r = L("CInput");
|
|
2051
|
+
return I(), D("div", Dn, [
|
|
2052
|
+
f("label", null, T(n._document.$t("answerModal.decline.component.label")), 1),
|
|
2053
2053
|
B(r, {
|
|
2054
2054
|
modelValue: e.rejectReason,
|
|
2055
2055
|
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.rejectReason = a),
|
|
@@ -2060,12 +2060,295 @@ function Rn(n, t, o, i, e, s) {
|
|
|
2060
2060
|
}, null, 8, ["modelValue"])
|
|
2061
2061
|
]);
|
|
2062
2062
|
}
|
|
2063
|
-
const
|
|
2063
|
+
const Rn = /* @__PURE__ */ Z(Bn, [["render", Fn]]), $n = {
|
|
2064
|
+
name: "FrejaAnswer",
|
|
2065
|
+
emits: ["loading", "error", "complete"],
|
|
2066
|
+
mixins: [Q([])],
|
|
2067
|
+
props: {
|
|
2068
|
+
onCompleteFunc: {
|
|
2069
|
+
type: Function,
|
|
2070
|
+
default: null
|
|
2071
|
+
}
|
|
2072
|
+
},
|
|
2073
|
+
data() {
|
|
2074
|
+
return {
|
|
2075
|
+
signAnswerId: null,
|
|
2076
|
+
view: "form",
|
|
2077
|
+
errorMessage: "",
|
|
2078
|
+
isLoading: !1,
|
|
2079
|
+
qrCode: null,
|
|
2080
|
+
appUrl: null,
|
|
2081
|
+
isMobile: !1
|
|
2082
|
+
};
|
|
2083
|
+
},
|
|
2084
|
+
computed: {
|
|
2085
|
+
viewText() {
|
|
2086
|
+
const n = (t) => this._document.$t(`answerModal.freja.component.viewText.${t}`);
|
|
2087
|
+
return {
|
|
2088
|
+
new: {
|
|
2089
|
+
spinnerText: n("new.spinnerText")
|
|
2090
|
+
},
|
|
2091
|
+
waiting: {
|
|
2092
|
+
spinnerText: n("waiting.spinnerText")
|
|
2093
|
+
},
|
|
2094
|
+
started: {
|
|
2095
|
+
spinnerText: n("waiting.spinnerText")
|
|
2096
|
+
},
|
|
2097
|
+
signing: {
|
|
2098
|
+
text: n("signing.text"),
|
|
2099
|
+
spinnerText: n("signing.spinnerText")
|
|
2100
|
+
},
|
|
2101
|
+
error: {
|
|
2102
|
+
text: n("error.text")
|
|
2103
|
+
},
|
|
2104
|
+
canceled: {
|
|
2105
|
+
text: n("canceled.text")
|
|
2106
|
+
}
|
|
2107
|
+
};
|
|
2108
|
+
}
|
|
2109
|
+
},
|
|
2110
|
+
watch: {
|
|
2111
|
+
isLoading(n) {
|
|
2112
|
+
this.$emit("loading", n);
|
|
2113
|
+
}
|
|
2114
|
+
},
|
|
2115
|
+
created() {
|
|
2116
|
+
this.isMobile = Te(), this.tryResumeSigningSession();
|
|
2117
|
+
},
|
|
2118
|
+
methods: {
|
|
2119
|
+
tryResumeSigningSession() {
|
|
2120
|
+
var o;
|
|
2121
|
+
const n = ot(), t = Object.keys(n._activePolls).find(
|
|
2122
|
+
(i) => i.includes("freja-")
|
|
2123
|
+
);
|
|
2124
|
+
try {
|
|
2125
|
+
if (t) {
|
|
2126
|
+
const { signAnswerId: i, qrCode: e, appUrl: s } = ((o = n._activePolls[t]) == null ? void 0 : o.data) || {};
|
|
2127
|
+
this.signAnswerId = i, this.qrCode = e, this.appUrl = s, n.removePoll(t), this.isLoading = !0, this.startPolling();
|
|
2128
|
+
}
|
|
2129
|
+
} catch {
|
|
2130
|
+
const e = this._document.$t(
|
|
2131
|
+
"answerModal.freja.component.viewText.error.text"
|
|
2132
|
+
);
|
|
2133
|
+
st("error", e);
|
|
2134
|
+
}
|
|
2135
|
+
},
|
|
2136
|
+
async submit({ answer: n }) {
|
|
2137
|
+
try {
|
|
2138
|
+
this.isLoading = !0;
|
|
2139
|
+
const { id: t, qrCodeData: o, appUrl: i } = await n({
|
|
2140
|
+
body: { isAccepted: !0 }
|
|
2141
|
+
});
|
|
2142
|
+
o && (this.qrCode = o), i && (this.appUrl = i), this.signAnswerId = t, this.startPolling(), this.isMobile && this.openFrejaApp();
|
|
2143
|
+
return;
|
|
2144
|
+
} catch (t) {
|
|
2145
|
+
this.onError(t);
|
|
2146
|
+
}
|
|
2147
|
+
},
|
|
2148
|
+
async startPolling() {
|
|
2149
|
+
if (!this.signAnswerId) throw Error("Missing signAnswerId");
|
|
2150
|
+
const n = ot(), t = `freja-${this.signAnswerId}`, o = async () => {
|
|
2151
|
+
if (!this.signAnswerId) throw Error("Missing signAnswerId");
|
|
2152
|
+
const i = () => {
|
|
2153
|
+
this.clearSignState(), n.removePoll(t);
|
|
2154
|
+
};
|
|
2155
|
+
try {
|
|
2156
|
+
const { data: e } = await Me.get(this.signAnswerId);
|
|
2157
|
+
e.qrCodeData && (this.qrCode = e.qrCodeData), ["completed", "canceled"].includes(e.status) && i(), e.status === "completed" ? this.onComplete() : e.status === "canceled" ? e.errorCode != null ? this.onError({
|
|
2158
|
+
response: { data: { errorCode: e.errorCode } }
|
|
2159
|
+
}) : this.onCanceled() : this.view = e.status;
|
|
2160
|
+
} catch (e) {
|
|
2161
|
+
this.onError(e), i();
|
|
2162
|
+
}
|
|
2163
|
+
};
|
|
2164
|
+
try {
|
|
2165
|
+
n.addPoll({
|
|
2166
|
+
id: t,
|
|
2167
|
+
handler: o,
|
|
2168
|
+
interval: 1e3,
|
|
2169
|
+
data: {
|
|
2170
|
+
signAnswerId: this.signAnswerId,
|
|
2171
|
+
qrCode: this.qrCode,
|
|
2172
|
+
appUrl: this.appUrl
|
|
2173
|
+
}
|
|
2174
|
+
});
|
|
2175
|
+
} catch {
|
|
2176
|
+
this.clearSignState();
|
|
2177
|
+
const e = this._document.$t(
|
|
2178
|
+
"answerModal.freja.component.viewText.error.text"
|
|
2179
|
+
);
|
|
2180
|
+
st("error", e);
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2183
|
+
clearSignState() {
|
|
2184
|
+
this.qrCode = null, this.appUrl = null, this.isLoading = !1;
|
|
2185
|
+
},
|
|
2186
|
+
onComplete() {
|
|
2187
|
+
typeof this.onCompleteFunc == "function" && this.onCompleteFunc();
|
|
2188
|
+
},
|
|
2189
|
+
onCanceled() {
|
|
2190
|
+
this.view = "canceled", this.errorMessage = this._document.$t(
|
|
2191
|
+
"answerModal.freja.component.signingInterrupted"
|
|
2192
|
+
);
|
|
2193
|
+
},
|
|
2194
|
+
onError(n) {
|
|
2195
|
+
var o, i;
|
|
2196
|
+
if (n.httpStatusCode === 409) throw n;
|
|
2197
|
+
switch (this.$emit("error"), this.view = "error", (i = (o = n.response) == null ? void 0 : o.data) == null ? void 0 : i.errorCode) {
|
|
2198
|
+
case 9001:
|
|
2199
|
+
case 9002:
|
|
2200
|
+
case 9003:
|
|
2201
|
+
case 9004:
|
|
2202
|
+
case 9005:
|
|
2203
|
+
case 9006:
|
|
2204
|
+
case 9007:
|
|
2205
|
+
jt.warn(n);
|
|
2206
|
+
break;
|
|
2207
|
+
case 9009:
|
|
2208
|
+
this.$emit("complete");
|
|
2209
|
+
break;
|
|
2210
|
+
case 9011:
|
|
2211
|
+
jt.warn("Freja sign canceled: SSN mismatch (errorCode 9011)"), this.errorMessage = this._document.$t(
|
|
2212
|
+
"answerModal.freja.component.ssnMismatchError"
|
|
2213
|
+
);
|
|
2214
|
+
return;
|
|
2215
|
+
default:
|
|
2216
|
+
at(n, { showMessage: !1 });
|
|
2217
|
+
}
|
|
2218
|
+
this.errorMessage = this._document.$t(
|
|
2219
|
+
"answerModal.freja.component.defaultError"
|
|
2220
|
+
);
|
|
2221
|
+
},
|
|
2222
|
+
openFrejaApp() {
|
|
2223
|
+
this.appUrl && (window.location.href = this.appUrl);
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
}, Ln = { class: "-my-4 flex flex-col items-center" }, Nn = {
|
|
2227
|
+
key: 0,
|
|
2228
|
+
class: "flex h-[250px] w-[250px] items-center justify-center rounded-xl bg-gray-100"
|
|
2229
|
+
}, Un = ["src"], qn = ["textContent"], jn = { key: 2 }, zn = {
|
|
2230
|
+
class: "flex flex-col items-center justify-center",
|
|
2231
|
+
style: { "background-color": "#1e5799", padding: `calc(2.5 * var(--rem)) calc(3 * var(--rem))
|
|
2232
|
+
calc(2 * var(--rem))` }
|
|
2233
|
+
}, On = ["textContent"], Vn = {
|
|
2234
|
+
class: "flex w-full flex-col items-center justify-center text-center",
|
|
2235
|
+
style: { padding: `calc(3 * var(--rem)) calc(2 * var(--rem))
|
|
2236
|
+
calc(2 * var(--rem))` }
|
|
2237
|
+
}, Wn = ["textContent"], Hn = ["textContent"];
|
|
2238
|
+
function Yn(n, t, o, i, e, s) {
|
|
2239
|
+
const r = L("CIcon"), a = L("CButton"), l = L("Animation");
|
|
2240
|
+
return I(), D("div", Ln, [
|
|
2241
|
+
["form", "signing", "error", "canceled"].includes(e.view) ? (I(), D("div", Nn, [
|
|
2242
|
+
B(r, {
|
|
2243
|
+
type: "frejaPlusText",
|
|
2244
|
+
size: "80"
|
|
2245
|
+
})
|
|
2246
|
+
])) : $("", !0),
|
|
2247
|
+
["new", "waiting", "started"].includes(e.view) ? (I(), D(J, { key: 1 }, [
|
|
2248
|
+
e.qrCode ? (I(), D("img", {
|
|
2249
|
+
key: 0,
|
|
2250
|
+
src: `data:image/png;base64,${e.qrCode}`,
|
|
2251
|
+
alt: "Freja eID QR",
|
|
2252
|
+
width: "250",
|
|
2253
|
+
height: "250",
|
|
2254
|
+
class: "rounded-xl"
|
|
2255
|
+
}, null, 8, Un)) : $("", !0)
|
|
2256
|
+
], 64)) : $("", !0),
|
|
2257
|
+
B(l, { class: "w-full" }, {
|
|
2258
|
+
default: N(() => {
|
|
2259
|
+
var d;
|
|
2260
|
+
return [
|
|
2261
|
+
f("div", {
|
|
2262
|
+
key: "a",
|
|
2263
|
+
class: "min-h-[20px] pt-4 text-sm text-gray-500",
|
|
2264
|
+
textContent: T((d = s.viewText[e.view]) == null ? void 0 : d.spinnerText)
|
|
2265
|
+
}, null, 8, qn),
|
|
2266
|
+
e.appUrl && ["new", "waiting", "started"].includes(e.view) ? (I(), X(a, {
|
|
2267
|
+
key: "b",
|
|
2268
|
+
type: "none",
|
|
2269
|
+
pattern: "secondary",
|
|
2270
|
+
size: "small",
|
|
2271
|
+
class: "mt-4",
|
|
2272
|
+
onClick: s.openFrejaApp
|
|
2273
|
+
}, {
|
|
2274
|
+
default: N(() => [
|
|
2275
|
+
W(T(n._document.$t("answerModal.freja.component.openApp")), 1)
|
|
2276
|
+
]),
|
|
2277
|
+
_: 1
|
|
2278
|
+
}, 8, ["onClick"])) : $("", !0)
|
|
2279
|
+
];
|
|
2280
|
+
}),
|
|
2281
|
+
_: 1
|
|
2282
|
+
}),
|
|
2283
|
+
["form", "new", "waiting", "started"].includes(e.view) ? $("", !0) : (I(), D("div", jn, [
|
|
2284
|
+
B(lt, { name: "pop-in" }, {
|
|
2285
|
+
default: N(() => {
|
|
2286
|
+
var d, c;
|
|
2287
|
+
return [
|
|
2288
|
+
["signing", "error", "canceled"].includes(e.view) ? (I(), D("div", {
|
|
2289
|
+
key: 0,
|
|
2290
|
+
class: "freja-popup",
|
|
2291
|
+
onClick: t[1] || (t[1] = () => {
|
|
2292
|
+
e.view = "form", e.isLoading = !1;
|
|
2293
|
+
})
|
|
2294
|
+
}, [
|
|
2295
|
+
f("div", zn, [
|
|
2296
|
+
B(r, {
|
|
2297
|
+
type: "freja",
|
|
2298
|
+
size: "34",
|
|
2299
|
+
class: "text-white"
|
|
2300
|
+
}),
|
|
2301
|
+
f("div", {
|
|
2302
|
+
class: "pt-4 text-sm font-medium text-white opacity-75",
|
|
2303
|
+
textContent: T((d = s.viewText[e.view]) == null ? void 0 : d.text)
|
|
2304
|
+
}, null, 8, On)
|
|
2305
|
+
]),
|
|
2306
|
+
f("div", Vn, [
|
|
2307
|
+
e.view === "signing" ? (I(), D(J, { key: 0 }, [
|
|
2308
|
+
t[2] || (t[2] = f("div", { class: "spinner" }, null, -1)),
|
|
2309
|
+
f("div", {
|
|
2310
|
+
class: "pt-8 text-gray-500",
|
|
2311
|
+
textContent: T((c = s.viewText[e.view]) == null ? void 0 : c.spinnerText)
|
|
2312
|
+
}, null, 8, Wn)
|
|
2313
|
+
], 64)) : ["error", "canceled"].includes(e.view) ? (I(), D(J, { key: 1 }, [
|
|
2314
|
+
B(r, {
|
|
2315
|
+
type: "error",
|
|
2316
|
+
size: "22",
|
|
2317
|
+
class: "mb-2.5 text-gray-400"
|
|
2318
|
+
}),
|
|
2319
|
+
f("div", {
|
|
2320
|
+
style: { "font-size": "14px" },
|
|
2321
|
+
textContent: T(e.errorMessage)
|
|
2322
|
+
}, null, 8, Hn),
|
|
2323
|
+
B(a, {
|
|
2324
|
+
loading: e.isLoading,
|
|
2325
|
+
type: "none",
|
|
2326
|
+
pattern: "secondary",
|
|
2327
|
+
size: "small",
|
|
2328
|
+
style: { "margin-top": "calc(2.5 * var(--rem))", padding: "1em", height: "initial" },
|
|
2329
|
+
onClick: t[0] || (t[0] = (h) => e.view = "form")
|
|
2330
|
+
}, {
|
|
2331
|
+
default: N(() => [
|
|
2332
|
+
W(T(n._document.$t("tryAgain")), 1)
|
|
2333
|
+
]),
|
|
2334
|
+
_: 1
|
|
2335
|
+
}, 8, ["loading"])
|
|
2336
|
+
], 64)) : $("", !0)
|
|
2337
|
+
])
|
|
2338
|
+
])) : $("", !0)
|
|
2339
|
+
];
|
|
2340
|
+
}),
|
|
2341
|
+
_: 1
|
|
2342
|
+
})
|
|
2343
|
+
]))
|
|
2344
|
+
]);
|
|
2345
|
+
}
|
|
2346
|
+
const Gn = /* @__PURE__ */ Z($n, [["render", Yn], ["__scopeId", "data-v-dadf1501"]]);
|
|
2064
2347
|
/*!
|
|
2065
2348
|
* Signature Pad v4.0.10 | https://github.com/szimek/signature_pad
|
|
2066
2349
|
* (c) 2022 Szymon Nowak | Released under the MIT license
|
|
2067
2350
|
*/
|
|
2068
|
-
class
|
|
2351
|
+
class rt {
|
|
2069
2352
|
constructor(t, o, i, e) {
|
|
2070
2353
|
if (isNaN(t) || isNaN(o))
|
|
2071
2354
|
throw new Error(`Point is invalid: (${t}, ${o})`);
|
|
@@ -2081,19 +2364,19 @@ class it {
|
|
|
2081
2364
|
return this.time !== t.time ? this.distanceTo(t) / (this.time - t.time) : 0;
|
|
2082
2365
|
}
|
|
2083
2366
|
}
|
|
2084
|
-
class
|
|
2367
|
+
class Vt {
|
|
2085
2368
|
constructor(t, o, i, e, s, r) {
|
|
2086
2369
|
this.startPoint = t, this.control2 = o, this.control1 = i, this.endPoint = e, this.startWidth = s, this.endWidth = r;
|
|
2087
2370
|
}
|
|
2088
2371
|
static fromPoints(t, o) {
|
|
2089
2372
|
const i = this.calculateControlPoints(t[0], t[1], t[2]).c2, e = this.calculateControlPoints(t[1], t[2], t[3]).c1;
|
|
2090
|
-
return new
|
|
2373
|
+
return new Vt(t[1], i, e, t[2], o.start, o.end);
|
|
2091
2374
|
}
|
|
2092
2375
|
static calculateControlPoints(t, o, i) {
|
|
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 },
|
|
2376
|
+
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 }, d = { 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), g = l.x - d.x, u = l.y - d.y, w = h / (c + h), m = { x: d.x + g * w, y: d.y + u * w }, F = o.x - m.x, x = o.y - m.y;
|
|
2094
2377
|
return {
|
|
2095
|
-
c1: new
|
|
2096
|
-
c2: new
|
|
2378
|
+
c1: new rt(l.x + F, l.y + x),
|
|
2379
|
+
c2: new rt(d.x + F, d.y + x)
|
|
2097
2380
|
};
|
|
2098
2381
|
}
|
|
2099
2382
|
length() {
|
|
@@ -2101,8 +2384,8 @@ class Ot {
|
|
|
2101
2384
|
for (let s = 0; s <= 10; s += 1) {
|
|
2102
2385
|
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);
|
|
2103
2386
|
if (s > 0) {
|
|
2104
|
-
const
|
|
2105
|
-
o += Math.sqrt(
|
|
2387
|
+
const d = a - i, c = l - e;
|
|
2388
|
+
o += Math.sqrt(d * d + c * c);
|
|
2106
2389
|
}
|
|
2107
2390
|
i = a, e = l;
|
|
2108
2391
|
}
|
|
@@ -2112,7 +2395,7 @@ class Ot {
|
|
|
2112
2395
|
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;
|
|
2113
2396
|
}
|
|
2114
2397
|
}
|
|
2115
|
-
class
|
|
2398
|
+
class Kn {
|
|
2116
2399
|
constructor() {
|
|
2117
2400
|
try {
|
|
2118
2401
|
this._et = new EventTarget();
|
|
@@ -2130,17 +2413,17 @@ class $n {
|
|
|
2130
2413
|
this._et.removeEventListener(t, o, i);
|
|
2131
2414
|
}
|
|
2132
2415
|
}
|
|
2133
|
-
function
|
|
2416
|
+
function Jn(n, t = 250) {
|
|
2134
2417
|
let o = 0, i = null, e, s, r;
|
|
2135
2418
|
const a = () => {
|
|
2136
2419
|
o = Date.now(), i = null, e = n.apply(s, r), i || (s = null, r = []);
|
|
2137
2420
|
};
|
|
2138
|
-
return function(...
|
|
2421
|
+
return function(...d) {
|
|
2139
2422
|
const c = Date.now(), h = t - (c - o);
|
|
2140
|
-
return s = this, r =
|
|
2423
|
+
return s = this, r = d, 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;
|
|
2141
2424
|
};
|
|
2142
2425
|
}
|
|
2143
|
-
let
|
|
2426
|
+
let Xn = class zt extends Kn {
|
|
2144
2427
|
constructor(t, o = {}) {
|
|
2145
2428
|
super(), this.canvas = t, this._handleMouseDown = (i) => {
|
|
2146
2429
|
i.buttons === 1 && (this._drawningStroke = !0, this._strokeBegin(i));
|
|
@@ -2169,7 +2452,7 @@ let Ln = class Nt extends $n {
|
|
|
2169
2452
|
this._drawningStroke && (i.preventDefault(), this._strokeMoveUpdate(i));
|
|
2170
2453
|
}, this._handlePointerEnd = (i) => {
|
|
2171
2454
|
this._drawningStroke && (i.preventDefault(), this._drawningStroke = !1, this._strokeEnd(i));
|
|
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 ?
|
|
2455
|
+
}, 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 ? Jn(zt.prototype._strokeUpdate, this.throttle) : zt.prototype._strokeUpdate, this._ctx = t.getContext("2d"), this.clear(), this.on();
|
|
2173
2456
|
}
|
|
2174
2457
|
clear() {
|
|
2175
2458
|
const { _ctx: t, canvas: o } = this;
|
|
@@ -2177,9 +2460,9 @@ let Ln = class Nt extends $n {
|
|
|
2177
2460
|
}
|
|
2178
2461
|
fromDataURL(t, o = {}) {
|
|
2179
2462
|
return new Promise((i, e) => {
|
|
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,
|
|
2463
|
+
const s = new Image(), r = o.ratio || window.devicePixelRatio || 1, a = o.width || this.canvas.width / r, l = o.height || this.canvas.height / r, d = o.xOffset || 0, c = o.yOffset || 0;
|
|
2181
2464
|
this._reset(this._getPointGroupOptions()), s.onload = () => {
|
|
2182
|
-
this._ctx.drawImage(s,
|
|
2465
|
+
this._ctx.drawImage(s, d, c, a, l), i();
|
|
2183
2466
|
}, s.onerror = (h) => {
|
|
2184
2467
|
e(h);
|
|
2185
2468
|
}, s.crossOrigin = "anonymous", s.src = t, this._isEmpty = !1;
|
|
@@ -2230,8 +2513,8 @@ let Ln = class Nt extends $n {
|
|
|
2230
2513
|
return;
|
|
2231
2514
|
}
|
|
2232
2515
|
this.dispatchEvent(new CustomEvent("beforeUpdateStroke", { detail: t }));
|
|
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],
|
|
2234
|
-
if (!l || !(l &&
|
|
2516
|
+
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], d = l ? s.distanceTo(l) <= this.minDistance : !1, c = this._getPointGroupOptions(r);
|
|
2517
|
+
if (!l || !(l && d)) {
|
|
2235
2518
|
const h = this._addPoint(s, c);
|
|
2236
2519
|
l ? h && this._drawCurve(h, c) : this._drawDot(s, c), a.push({
|
|
2237
2520
|
time: s.time,
|
|
@@ -2259,13 +2542,13 @@ let Ln = class Nt extends $n {
|
|
|
2259
2542
|
}
|
|
2260
2543
|
_createPoint(t, o, i) {
|
|
2261
2544
|
const e = this.canvas.getBoundingClientRect();
|
|
2262
|
-
return new
|
|
2545
|
+
return new rt(t - e.left, o - e.top, i, (/* @__PURE__ */ new Date()).getTime());
|
|
2263
2546
|
}
|
|
2264
2547
|
_addPoint(t, o) {
|
|
2265
2548
|
const { _lastPoints: i } = this;
|
|
2266
2549
|
if (i.push(t), i.length > 2) {
|
|
2267
2550
|
i.length === 3 && i.unshift(i[0]);
|
|
2268
|
-
const e = this._calculateCurveWidths(i[1], i[2], o), s =
|
|
2551
|
+
const e = this._calculateCurveWidths(i[1], i[2], o), s = Vt.fromPoints(i, e);
|
|
2269
2552
|
return i.shift(), s;
|
|
2270
2553
|
}
|
|
2271
2554
|
return null;
|
|
@@ -2288,13 +2571,13 @@ let Ln = class Nt extends $n {
|
|
|
2288
2571
|
const i = this._ctx, e = t.endWidth - t.startWidth, s = Math.ceil(t.length()) * 2;
|
|
2289
2572
|
i.beginPath(), i.fillStyle = o.penColor;
|
|
2290
2573
|
for (let r = 0; r < s; r += 1) {
|
|
2291
|
-
const a = r / s, l = a * a,
|
|
2292
|
-
let
|
|
2293
|
-
|
|
2294
|
-
let
|
|
2295
|
-
|
|
2296
|
-
const
|
|
2297
|
-
this._drawCurveSegment(
|
|
2574
|
+
const a = r / s, l = a * a, d = l * a, c = 1 - a, h = c * c, g = h * c;
|
|
2575
|
+
let u = g * t.startPoint.x;
|
|
2576
|
+
u += 3 * h * a * t.control1.x, u += 3 * c * l * t.control2.x, u += d * t.endPoint.x;
|
|
2577
|
+
let w = g * t.startPoint.y;
|
|
2578
|
+
w += 3 * h * a * t.control1.y, w += 3 * c * l * t.control2.y, w += d * t.endPoint.y;
|
|
2579
|
+
const m = Math.min(t.startWidth + d * e, o.maxWidth);
|
|
2580
|
+
this._drawCurveSegment(u, w, m);
|
|
2298
2581
|
}
|
|
2299
2582
|
i.closePath(), i.fill();
|
|
2300
2583
|
}
|
|
@@ -2307,9 +2590,9 @@ let Ln = class Nt extends $n {
|
|
|
2307
2590
|
const { points: s } = e, r = this._getPointGroupOptions(e);
|
|
2308
2591
|
if (s.length > 1)
|
|
2309
2592
|
for (let a = 0; a < s.length; a += 1) {
|
|
2310
|
-
const l = s[a],
|
|
2593
|
+
const l = s[a], d = new rt(l.x, l.y, l.pressure, l.time);
|
|
2311
2594
|
a === 0 && this._reset(r);
|
|
2312
|
-
const c = this._addPoint(
|
|
2595
|
+
const c = this._addPoint(d, r);
|
|
2313
2596
|
c && o(c, r);
|
|
2314
2597
|
}
|
|
2315
2598
|
else
|
|
@@ -2318,30 +2601,30 @@ let Ln = class Nt extends $n {
|
|
|
2318
2601
|
}
|
|
2319
2602
|
_toSVG() {
|
|
2320
2603
|
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");
|
|
2321
|
-
a.setAttribute("width", this.canvas.width.toString()), a.setAttribute("height", this.canvas.height.toString()), this._fromData(t, (
|
|
2322
|
-
const
|
|
2323
|
-
if (!isNaN(
|
|
2324
|
-
const
|
|
2325
|
-
|
|
2604
|
+
a.setAttribute("width", this.canvas.width.toString()), a.setAttribute("height", this.canvas.height.toString()), this._fromData(t, (u, { penColor: w }) => {
|
|
2605
|
+
const m = document.createElement("path");
|
|
2606
|
+
if (!isNaN(u.control1.x) && !isNaN(u.control1.y) && !isNaN(u.control2.x) && !isNaN(u.control2.y)) {
|
|
2607
|
+
const F = `M ${u.startPoint.x.toFixed(3)},${u.startPoint.y.toFixed(3)} C ${u.control1.x.toFixed(3)},${u.control1.y.toFixed(3)} ${u.control2.x.toFixed(3)},${u.control2.y.toFixed(3)} ${u.endPoint.x.toFixed(3)},${u.endPoint.y.toFixed(3)}`;
|
|
2608
|
+
m.setAttribute("d", F), m.setAttribute("stroke-width", (u.endWidth * 2.25).toFixed(3)), m.setAttribute("stroke", w), m.setAttribute("fill", "none"), m.setAttribute("stroke-linecap", "round"), a.appendChild(m);
|
|
2326
2609
|
}
|
|
2327
|
-
}, (
|
|
2328
|
-
const
|
|
2329
|
-
|
|
2610
|
+
}, (u, { penColor: w, dotSize: m, minWidth: F, maxWidth: x }) => {
|
|
2611
|
+
const M = document.createElement("circle"), E = m > 0 ? m : (F + x) / 2;
|
|
2612
|
+
M.setAttribute("r", E.toString()), M.setAttribute("cx", u.x.toString()), M.setAttribute("cy", u.y.toString()), M.setAttribute("fill", w), a.appendChild(M);
|
|
2330
2613
|
});
|
|
2331
|
-
const l = "data:image/svg+xml;base64,",
|
|
2614
|
+
const l = "data:image/svg+xml;base64,", d = `<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}">`;
|
|
2332
2615
|
let c = a.innerHTML;
|
|
2333
2616
|
if (c === void 0) {
|
|
2334
|
-
const
|
|
2335
|
-
|
|
2336
|
-
for (let
|
|
2337
|
-
|
|
2338
|
-
c =
|
|
2617
|
+
const u = document.createElement("dummy"), w = a.childNodes;
|
|
2618
|
+
u.innerHTML = "";
|
|
2619
|
+
for (let m = 0; m < w.length; m += 1)
|
|
2620
|
+
u.appendChild(w[m].cloneNode(!0));
|
|
2621
|
+
c = u.innerHTML;
|
|
2339
2622
|
}
|
|
2340
|
-
const
|
|
2341
|
-
return l + btoa(
|
|
2623
|
+
const g = d + c + "</svg>";
|
|
2624
|
+
return l + btoa(g);
|
|
2342
2625
|
}
|
|
2343
2626
|
};
|
|
2344
|
-
class
|
|
2627
|
+
class Qn extends Xn {
|
|
2345
2628
|
fromText(t, o = {}) {
|
|
2346
2629
|
if (this.clear(), !t) return;
|
|
2347
2630
|
const { font: i, x: e = 10, y: s = 50 } = o;
|
|
@@ -2353,7 +2636,7 @@ class Un extends Ln {
|
|
|
2353
2636
|
this._ctx.font = i, this._ctx.fillText(t, e, s, r), this._isEmpty = !1;
|
|
2354
2637
|
}
|
|
2355
2638
|
}
|
|
2356
|
-
const
|
|
2639
|
+
const Zn = {
|
|
2357
2640
|
name: "SignaturePad",
|
|
2358
2641
|
props: {
|
|
2359
2642
|
type: {
|
|
@@ -2424,7 +2707,7 @@ const qn = {
|
|
|
2424
2707
|
},
|
|
2425
2708
|
mounted() {
|
|
2426
2709
|
const { options: n, defaultOptions: t } = this, o = this.$refs.signaturePadCanvas;
|
|
2427
|
-
this.signaturePad = new
|
|
2710
|
+
this.signaturePad = new Qn(o, {
|
|
2428
2711
|
...t,
|
|
2429
2712
|
...n
|
|
2430
2713
|
}), this.onResizeHandler = this.resizeCanvas.bind(this), window.addEventListener("resize", this.onResizeHandler, !1), Object.keys(this.signEvents).forEach((i) => {
|
|
@@ -2519,13 +2802,13 @@ const qn = {
|
|
|
2519
2802
|
s.x.sort((c, h) => c - h), s.y.sort((c, h) => c - h);
|
|
2520
2803
|
const l = s.x.length - 1;
|
|
2521
2804
|
i = s.x[l] - s.x[0], e = s.y[l] - s.y[0];
|
|
2522
|
-
const
|
|
2523
|
-
return t.height = e, o.putImageData(
|
|
2805
|
+
const d = o.getImageData(s.x[0], s.y[0], i, e);
|
|
2806
|
+
return t.height = e, o.putImageData(d, 0, 0), t;
|
|
2524
2807
|
}
|
|
2525
2808
|
},
|
|
2526
2809
|
render() {
|
|
2527
2810
|
const { width: n, height: t, customStyle: o } = this;
|
|
2528
|
-
return
|
|
2811
|
+
return qt(
|
|
2529
2812
|
"div",
|
|
2530
2813
|
{
|
|
2531
2814
|
style: {
|
|
@@ -2535,7 +2818,7 @@ const qn = {
|
|
|
2535
2818
|
}
|
|
2536
2819
|
},
|
|
2537
2820
|
[
|
|
2538
|
-
|
|
2821
|
+
qt("canvas", {
|
|
2539
2822
|
style: {
|
|
2540
2823
|
width: "100%",
|
|
2541
2824
|
height: "100%"
|
|
@@ -2546,25 +2829,25 @@ const qn = {
|
|
|
2546
2829
|
);
|
|
2547
2830
|
}
|
|
2548
2831
|
};
|
|
2549
|
-
function
|
|
2832
|
+
function ti({ rel: n, href: t, crossorigin: o = !1 }) {
|
|
2550
2833
|
const i = document.createElement("link");
|
|
2551
2834
|
i.rel = n, i.href = t, i.crossorigin = o, document.head.appendChild(i);
|
|
2552
2835
|
}
|
|
2553
|
-
const
|
|
2836
|
+
const ei = [
|
|
2554
2837
|
{ rel: "preconnect", href: "https://fonts.googleapis.com" },
|
|
2555
2838
|
{ rel: "preconnect", href: "https://fonts.gstatic.com", crossorigin: !0 },
|
|
2556
2839
|
{
|
|
2557
2840
|
rel: "stylesheet",
|
|
2558
2841
|
href: "https://fonts.googleapis.com/css2?family=Nothing+You+Could+Do&display=swap"
|
|
2559
2842
|
}
|
|
2560
|
-
],
|
|
2843
|
+
], ni = {
|
|
2561
2844
|
name: "SignatureAnswer",
|
|
2562
2845
|
components: {
|
|
2563
2846
|
CField: We,
|
|
2564
|
-
SignaturePad:
|
|
2847
|
+
SignaturePad: Zn
|
|
2565
2848
|
},
|
|
2566
2849
|
emits: ["invalid"],
|
|
2567
|
-
mixins: [
|
|
2850
|
+
mixins: [Q([])],
|
|
2568
2851
|
props: {
|
|
2569
2852
|
onCompleteFunc: {
|
|
2570
2853
|
type: Function,
|
|
@@ -2596,7 +2879,7 @@ const zn = [
|
|
|
2596
2879
|
}
|
|
2597
2880
|
},
|
|
2598
2881
|
created() {
|
|
2599
|
-
|
|
2882
|
+
ei.forEach(ti);
|
|
2600
2883
|
},
|
|
2601
2884
|
mounted() {
|
|
2602
2885
|
this.focusName();
|
|
@@ -2625,33 +2908,33 @@ const zn = [
|
|
|
2625
2908
|
);
|
|
2626
2909
|
}
|
|
2627
2910
|
}
|
|
2628
|
-
},
|
|
2911
|
+
}, ii = { style: { "text-align": "left" } }, si = {
|
|
2629
2912
|
class: "flex w-full items-center justify-between",
|
|
2630
2913
|
style: { "font-size": "16px", "padding-bottom": "1em", "font-weight": "500", color: "hsl(0, 0%, 11%)" }
|
|
2631
|
-
},
|
|
2914
|
+
}, oi = { class: "sign-toggle" }, ri = {
|
|
2632
2915
|
class: "wrapper",
|
|
2633
2916
|
style: { "padding-bottom": "5px" }
|
|
2634
|
-
},
|
|
2917
|
+
}, ai = { style: { position: "absolute", left: "1em", top: "0.75em", "font-size": "12px", color: "hsl(0, 0%, 50%)" } }, li = { class: "flex w-full justify-end" }, ci = {
|
|
2635
2918
|
class: "text-center",
|
|
2636
2919
|
style: { "font-size": "12px", color: "hsl(0, 0%, 45%)", "padding-top": "10px" }
|
|
2637
2920
|
};
|
|
2638
|
-
function
|
|
2639
|
-
const r =
|
|
2640
|
-
return
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
class:
|
|
2921
|
+
function di(n, t, o, i, e, s) {
|
|
2922
|
+
const r = L("CInput"), a = L("CField"), l = L("SignaturePad"), d = L("CButton");
|
|
2923
|
+
return I(), D("div", ii, [
|
|
2924
|
+
f("div", si, [
|
|
2925
|
+
f("div", null, T(n._document.$t("answerModal.signature.component.subTitle")), 1),
|
|
2926
|
+
f("div", oi, [
|
|
2927
|
+
f("div", {
|
|
2928
|
+
class: Gt([{ active: e.mode === "text" }, "sign-toggle-button"]),
|
|
2646
2929
|
onClick: t[0] || (t[0] = (c) => e.mode = "text")
|
|
2647
|
-
},
|
|
2648
|
-
|
|
2649
|
-
class:
|
|
2930
|
+
}, T(n._document.$t("answerModal.signature.component.text.tab")), 3),
|
|
2931
|
+
f("div", {
|
|
2932
|
+
class: Gt([{ active: e.mode === "draw" }, "sign-toggle-button"]),
|
|
2650
2933
|
onClick: t[1] || (t[1] = (c) => e.mode = "draw")
|
|
2651
|
-
},
|
|
2934
|
+
}, T(n._document.$t("answerModal.signature.component.draw.tab")), 3)
|
|
2652
2935
|
])
|
|
2653
2936
|
]),
|
|
2654
|
-
e.mode === "text" ? (
|
|
2937
|
+
e.mode === "text" ? (I(), X(a, {
|
|
2655
2938
|
key: 0,
|
|
2656
2939
|
label: n._document.$t("answerModal.signature.component.text.nameLabel")
|
|
2657
2940
|
}, {
|
|
@@ -2664,15 +2947,15 @@ function Xn(n, t, o, i, e, s) {
|
|
|
2664
2947
|
}, null, 8, ["modelValue", "placeholder"])
|
|
2665
2948
|
]),
|
|
2666
2949
|
_: 1
|
|
2667
|
-
}, 8, ["label"])) :
|
|
2668
|
-
|
|
2669
|
-
t[3] || (t[3] =
|
|
2670
|
-
|
|
2950
|
+
}, 8, ["label"])) : $("", !0),
|
|
2951
|
+
f("div", ri, [
|
|
2952
|
+
t[3] || (t[3] = f("div", { class: "background-image" }, [
|
|
2953
|
+
f("svg", {
|
|
2671
2954
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2672
2955
|
width: "100%",
|
|
2673
2956
|
height: "100%"
|
|
2674
2957
|
}, [
|
|
2675
|
-
|
|
2958
|
+
f("line", {
|
|
2676
2959
|
x1: "0",
|
|
2677
2960
|
y1: "75%",
|
|
2678
2961
|
x2: "100%",
|
|
@@ -2686,8 +2969,8 @@ function Xn(n, t, o, i, e, s) {
|
|
|
2686
2969
|
})
|
|
2687
2970
|
])
|
|
2688
2971
|
], -1)),
|
|
2689
|
-
|
|
2690
|
-
t[4] || (t[4] =
|
|
2972
|
+
f("div", ai, T(n._document.$t(`answerModal.signature.component.${e.mode}.canvasLabel`)), 1),
|
|
2973
|
+
t[4] || (t[4] = f("span", { style: { "font-family": "'Nothing You Could Do', cursive" } }, null, -1)),
|
|
2691
2974
|
B(l, {
|
|
2692
2975
|
ref: "signaturePad",
|
|
2693
2976
|
type: e.mode,
|
|
@@ -2703,8 +2986,8 @@ function Xn(n, t, o, i, e, s) {
|
|
|
2703
2986
|
class: "signature-pad"
|
|
2704
2987
|
}, null, 8, ["type", "text", "options", "sign-events"])
|
|
2705
2988
|
]),
|
|
2706
|
-
Ue(
|
|
2707
|
-
B(
|
|
2989
|
+
Ue(f("div", li, [
|
|
2990
|
+
B(d, {
|
|
2708
2991
|
disabled: e.isEmpty,
|
|
2709
2992
|
type: "text",
|
|
2710
2993
|
size: "small",
|
|
@@ -2713,7 +2996,7 @@ function Xn(n, t, o, i, e, s) {
|
|
|
2713
2996
|
icon: "trash",
|
|
2714
2997
|
onClick: s.reset
|
|
2715
2998
|
}, null, 8, ["disabled", "onClick"]),
|
|
2716
|
-
B(
|
|
2999
|
+
B(d, {
|
|
2717
3000
|
disabled: e.isEmpty,
|
|
2718
3001
|
type: "text",
|
|
2719
3002
|
size: "small",
|
|
@@ -2725,17 +3008,17 @@ function Xn(n, t, o, i, e, s) {
|
|
|
2725
3008
|
], 512), [
|
|
2726
3009
|
[qe, e.mode === "draw"]
|
|
2727
3010
|
]),
|
|
2728
|
-
|
|
3011
|
+
f("div", ci, T(n._document.$t("answerModal.signature.component.terms")), 1)
|
|
2729
3012
|
]);
|
|
2730
3013
|
}
|
|
2731
|
-
const
|
|
3014
|
+
const ui = /* @__PURE__ */ Z(ni, [["render", di], ["__scopeId", "data-v-f66bc68a"]]), hi = [
|
|
2732
3015
|
"enjoyedExperience",
|
|
2733
3016
|
// boolean value
|
|
2734
3017
|
"whatToImprove"
|
|
2735
3018
|
// string value
|
|
2736
|
-
],
|
|
3019
|
+
], fi = {
|
|
2737
3020
|
emits: ["page", "close"],
|
|
2738
|
-
mixins: [
|
|
3021
|
+
mixins: [Q([])],
|
|
2739
3022
|
props: {
|
|
2740
3023
|
publicId: {
|
|
2741
3024
|
type: String,
|
|
@@ -2750,7 +3033,7 @@ const Qn = /* @__PURE__ */ tt(jn, [["render", Xn], ["__scopeId", "data-v-f66bc68
|
|
|
2750
3033
|
},
|
|
2751
3034
|
computed: {
|
|
2752
3035
|
showPostFeedbackActions() {
|
|
2753
|
-
return
|
|
3036
|
+
return Se.value !== "widget" && !He;
|
|
2754
3037
|
}
|
|
2755
3038
|
},
|
|
2756
3039
|
created() {
|
|
@@ -2762,7 +3045,7 @@ const Qn = /* @__PURE__ */ tt(jn, [["render", Xn], ["__scopeId", "data-v-f66bc68
|
|
|
2762
3045
|
async submitFeedback({ type: n, data: t }) {
|
|
2763
3046
|
if (!this.publicId) throw Error("Missing param publicId");
|
|
2764
3047
|
if (!n) throw Error("Missing param type");
|
|
2765
|
-
if (!
|
|
3048
|
+
if (!hi.includes(n)) throw Error("Invalid feedback type");
|
|
2766
3049
|
if (!t) throw Error("Missing param data");
|
|
2767
3050
|
let o = "positive";
|
|
2768
3051
|
if (n === "whatToImprove" && !t.value) {
|
|
@@ -2770,9 +3053,9 @@ const Qn = /* @__PURE__ */ tt(jn, [["render", Xn], ["__scopeId", "data-v-f66bc68
|
|
|
2770
3053
|
return;
|
|
2771
3054
|
}
|
|
2772
3055
|
try {
|
|
2773
|
-
|
|
3056
|
+
je.feedback(this.publicId, { type: n, data: t }), n === "enjoyedExperience" && !t.value && (o = "negative"), n === "whatToImprove" && (o = "negative.success");
|
|
2774
3057
|
} catch (i) {
|
|
2775
|
-
|
|
3058
|
+
at(i, { showMessage: !1 });
|
|
2776
3059
|
} finally {
|
|
2777
3060
|
this.goTo(o);
|
|
2778
3061
|
}
|
|
@@ -2859,45 +3142,45 @@ const Qn = /* @__PURE__ */ tt(jn, [["render", Xn], ["__scopeId", "data-v-f66bc68
|
|
|
2859
3142
|
this.$emit("close");
|
|
2860
3143
|
}
|
|
2861
3144
|
}
|
|
2862
|
-
},
|
|
3145
|
+
}, gi = { class: "f-feedback" }, mi = {
|
|
2863
3146
|
ref: "feedbackBg",
|
|
2864
3147
|
class: "f-bg"
|
|
2865
|
-
},
|
|
3148
|
+
}, pi = { class: "f-container" }, wi = {
|
|
2866
3149
|
ref: "start",
|
|
2867
3150
|
key: "start",
|
|
2868
3151
|
class: "flex w-full flex-col items-center justify-center",
|
|
2869
3152
|
style: { transition: "opacity 250ms" }
|
|
2870
|
-
},
|
|
3153
|
+
}, yi = ["textContent"], vi = {
|
|
2871
3154
|
key: "intermediate",
|
|
2872
3155
|
style: { height: "100%", display: "flex", "flex-direction": "column" }
|
|
2873
|
-
},
|
|
3156
|
+
}, _i = { style: { flex: "1 1 auto", display: "flex", "flex-direction": "column", "justify-content": "center", "align-items": "center" } }, Ci = ["textContent"], xi = {
|
|
2874
3157
|
key: "positive",
|
|
2875
3158
|
style: { height: "100%", display: "flex", "flex-direction": "column" }
|
|
2876
|
-
},
|
|
3159
|
+
}, bi = { style: { flex: "1 1 auto", display: "flex", "flex-direction": "column", "justify-content": "center", "align-items": "center" } }, Pi = ["textContent"], Ei = ["textContent"], ki = {
|
|
2877
3160
|
key: "negative",
|
|
2878
3161
|
style: { height: "100%", display: "flex", "flex-direction": "column" }
|
|
2879
|
-
},
|
|
3162
|
+
}, Si = { style: { flex: "1 1 auto", display: "flex", "flex-direction": "column", "justify-content": "center", "align-items": "center" } }, Ti = ["textContent"], Mi = ["textContent"], Ai = {
|
|
2880
3163
|
key: "success",
|
|
2881
3164
|
style: { height: "100%", display: "flex", "flex-direction": "column" }
|
|
2882
|
-
},
|
|
2883
|
-
function
|
|
2884
|
-
const r =
|
|
2885
|
-
return
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
B(
|
|
3165
|
+
}, Ii = { style: { flex: "1 1 auto", display: "flex", "flex-direction": "column", "justify-content": "center", "align-items": "center" } }, Bi = ["textContent"], Di = ["textContent"];
|
|
3166
|
+
function Fi(n, t, o, i, e, s) {
|
|
3167
|
+
const r = L("CButton"), a = L("CInput");
|
|
3168
|
+
return I(), D("div", gi, [
|
|
3169
|
+
f("div", mi, null, 512),
|
|
3170
|
+
f("div", pi, [
|
|
3171
|
+
B(lt, {
|
|
2889
3172
|
css: !1,
|
|
2890
3173
|
mode: "out-in",
|
|
2891
3174
|
onEnter: s.enter,
|
|
2892
3175
|
onLeave: s.leave
|
|
2893
3176
|
}, {
|
|
2894
3177
|
default: N(() => [
|
|
2895
|
-
e.page === "start" ? (
|
|
2896
|
-
|
|
3178
|
+
e.page === "start" ? (I(), D("div", wi, [
|
|
3179
|
+
f("div", {
|
|
2897
3180
|
style: { "padding-bottom": "calc(1.5 * var(--rem))", "font-size": "14px", "font-weight": "500" },
|
|
2898
|
-
textContent:
|
|
2899
|
-
}, null, 8,
|
|
2900
|
-
|
|
3181
|
+
textContent: T(n._document.$t("answerFeedback.start.title"))
|
|
3182
|
+
}, null, 8, yi),
|
|
3183
|
+
f("div", null, [
|
|
2901
3184
|
B(r, {
|
|
2902
3185
|
"icon-left": "thumbsdown",
|
|
2903
3186
|
size: "small",
|
|
@@ -2909,7 +3192,7 @@ function Ci(n, t, o, i, e, s) {
|
|
|
2909
3192
|
}))
|
|
2910
3193
|
}, {
|
|
2911
3194
|
default: N(() => [
|
|
2912
|
-
|
|
3195
|
+
W(T(n._document.$t("answerFeedback.start.no")), 1)
|
|
2913
3196
|
]),
|
|
2914
3197
|
_: 1
|
|
2915
3198
|
}),
|
|
@@ -2925,27 +3208,27 @@ function Ci(n, t, o, i, e, s) {
|
|
|
2925
3208
|
}))
|
|
2926
3209
|
}, {
|
|
2927
3210
|
default: N(() => [
|
|
2928
|
-
|
|
3211
|
+
W(T(n._document.$t("answerFeedback.start.yes")), 1)
|
|
2929
3212
|
]),
|
|
2930
3213
|
_: 1
|
|
2931
3214
|
})
|
|
2932
3215
|
])
|
|
2933
|
-
], 512)) : e.page === "intermediate" ? (
|
|
2934
|
-
|
|
2935
|
-
|
|
3216
|
+
], 512)) : e.page === "intermediate" ? (I(), D("div", vi, [
|
|
3217
|
+
f("div", _i, [
|
|
3218
|
+
f("div", {
|
|
2936
3219
|
class: "f-title",
|
|
2937
|
-
textContent:
|
|
2938
|
-
}, null, 8,
|
|
3220
|
+
textContent: T(n._document.$t("answerFeedback.intermediate.title"))
|
|
3221
|
+
}, null, 8, Ci)
|
|
2939
3222
|
])
|
|
2940
|
-
])) : e.page === "positive" ? (
|
|
2941
|
-
|
|
2942
|
-
|
|
3223
|
+
])) : e.page === "positive" ? (I(), D("div", xi, [
|
|
3224
|
+
f("div", bi, [
|
|
3225
|
+
f("div", {
|
|
2943
3226
|
class: "f-title",
|
|
2944
|
-
textContent:
|
|
2945
|
-
}, null, 8,
|
|
2946
|
-
|
|
2947
|
-
textContent:
|
|
2948
|
-
}, null, 8,
|
|
3227
|
+
textContent: T(n._document.$t("answerFeedback.yes.title"))
|
|
3228
|
+
}, null, 8, Pi),
|
|
3229
|
+
f("div", {
|
|
3230
|
+
textContent: T(n._document.$t("answerFeedback.yes.text"))
|
|
3231
|
+
}, null, 8, Ei)
|
|
2949
3232
|
]),
|
|
2950
3233
|
B(r, {
|
|
2951
3234
|
class: "a-btn",
|
|
@@ -2955,7 +3238,7 @@ function Ci(n, t, o, i, e, s) {
|
|
|
2955
3238
|
href: "/register?utm_source=document&utm_medium=feedback-modal&utm_campaign=signup&utm_content=positive-exp",
|
|
2956
3239
|
target: "_blank",
|
|
2957
3240
|
style: { "margin-bottom": "0.5em" },
|
|
2958
|
-
textContent:
|
|
3241
|
+
textContent: T(n._document.$t("answerFeedback.yes.action"))
|
|
2959
3242
|
}, null, 8, ["textContent"]),
|
|
2960
3243
|
B(r, {
|
|
2961
3244
|
class: "a-btn",
|
|
@@ -2965,17 +3248,17 @@ function Ci(n, t, o, i, e, s) {
|
|
|
2965
3248
|
"_common:brand.domain"
|
|
2966
3249
|
)}?utm_source=document&utm_medium=feedback-modal&utm_campaign=learn-more&utm_content=positive-exp`,
|
|
2967
3250
|
target: "_blank",
|
|
2968
|
-
textContent:
|
|
3251
|
+
textContent: T(n._document.$t("answerFeedback.yes.secondary"))
|
|
2969
3252
|
}, null, 8, ["href", "textContent"])
|
|
2970
|
-
])) : e.page === "negative" ? (
|
|
2971
|
-
|
|
2972
|
-
|
|
3253
|
+
])) : e.page === "negative" ? (I(), D("div", ki, [
|
|
3254
|
+
f("div", Si, [
|
|
3255
|
+
f("div", {
|
|
2973
3256
|
class: "f-title",
|
|
2974
|
-
textContent:
|
|
2975
|
-
}, null, 8,
|
|
2976
|
-
|
|
2977
|
-
textContent:
|
|
2978
|
-
}, null, 8,
|
|
3257
|
+
textContent: T(n._document.$t("answerFeedback.no.start.title"))
|
|
3258
|
+
}, null, 8, Ti),
|
|
3259
|
+
f("div", {
|
|
3260
|
+
textContent: T(n._document.$t("answerFeedback.no.start.text"))
|
|
3261
|
+
}, null, 8, Mi),
|
|
2979
3262
|
B(a, {
|
|
2980
3263
|
modelValue: e.whatToImprove,
|
|
2981
3264
|
"onUpdate:modelValue": t[2] || (t[2] = (l) => e.whatToImprove = l),
|
|
@@ -2992,17 +3275,17 @@ function Ci(n, t, o, i, e, s) {
|
|
|
2992
3275
|
type: "whatToImprove",
|
|
2993
3276
|
data: { value: e.whatToImprove }
|
|
2994
3277
|
})),
|
|
2995
|
-
textContent:
|
|
3278
|
+
textContent: T(n._document.$t("answerFeedback.no.start.action"))
|
|
2996
3279
|
}, null, 8, ["textContent"])
|
|
2997
|
-
])) : e.page === "negative.success" ? (
|
|
2998
|
-
|
|
2999
|
-
|
|
3280
|
+
])) : e.page === "negative.success" ? (I(), D("div", Ai, [
|
|
3281
|
+
f("div", Ii, [
|
|
3282
|
+
f("div", {
|
|
3000
3283
|
class: "f-title",
|
|
3001
|
-
textContent:
|
|
3002
|
-
}, null, 8,
|
|
3003
|
-
|
|
3004
|
-
textContent:
|
|
3005
|
-
}, null, 8,
|
|
3284
|
+
textContent: T(n._document.$t("answerFeedback.no.success.title"))
|
|
3285
|
+
}, null, 8, Bi),
|
|
3286
|
+
f("div", {
|
|
3287
|
+
textContent: T(n._document.$t("answerFeedback.no.success.text"))
|
|
3288
|
+
}, null, 8, Di)
|
|
3006
3289
|
]),
|
|
3007
3290
|
B(r, {
|
|
3008
3291
|
class: "a-btn",
|
|
@@ -3014,29 +3297,30 @@ function Ci(n, t, o, i, e, s) {
|
|
|
3014
3297
|
wide: "",
|
|
3015
3298
|
type: "secondary",
|
|
3016
3299
|
style: { "margin-bottom": "0.5em" },
|
|
3017
|
-
textContent:
|
|
3300
|
+
textContent: T(n._document.$t("answerFeedback.no.success.action"))
|
|
3018
3301
|
}, null, 8, ["href", "textContent"]),
|
|
3019
3302
|
B(r, {
|
|
3020
3303
|
class: "a-btn",
|
|
3021
3304
|
wide: "",
|
|
3022
3305
|
onClick: s.close,
|
|
3023
|
-
textContent:
|
|
3306
|
+
textContent: T(n._document.$t("answerFeedback.no.success.secondary"))
|
|
3024
3307
|
}, null, 8, ["onClick", "textContent"])
|
|
3025
|
-
])) :
|
|
3308
|
+
])) : $("", !0)
|
|
3026
3309
|
]),
|
|
3027
3310
|
_: 1
|
|
3028
3311
|
}, 8, ["onEnter", "onLeave"])
|
|
3029
3312
|
])
|
|
3030
3313
|
]);
|
|
3031
3314
|
}
|
|
3032
|
-
const
|
|
3315
|
+
const Ri = /* @__PURE__ */ Z(fi, [["render", Fi], ["__scopeId", "data-v-cba2fe5c"]]), $i = {
|
|
3033
3316
|
components: {
|
|
3034
|
-
Feedback:
|
|
3035
|
-
Signature:
|
|
3036
|
-
BankId:
|
|
3037
|
-
|
|
3317
|
+
Feedback: Ri,
|
|
3318
|
+
Signature: ui,
|
|
3319
|
+
BankId: In,
|
|
3320
|
+
Freja: Gn,
|
|
3321
|
+
Deny: Rn
|
|
3038
3322
|
},
|
|
3039
|
-
mixins: [
|
|
3323
|
+
mixins: [Q([])],
|
|
3040
3324
|
i18nOptions: {
|
|
3041
3325
|
namespaces: "temporary",
|
|
3042
3326
|
messages: {
|
|
@@ -3067,10 +3351,10 @@ const xi = /* @__PURE__ */ tt(ti, [["render", Ci], ["__scopeId", "data-v-cba2fe5
|
|
|
3067
3351
|
},
|
|
3068
3352
|
computed: {
|
|
3069
3353
|
answerComponentName() {
|
|
3070
|
-
return this.mode === "decline" ? "Deny" : this.answerMethod === "bankId" ? "BankId" : "Signature";
|
|
3354
|
+
return this.mode === "decline" ? "Deny" : this.answerMethod === "bankId" ? "BankId" : this.answerMethod === "freja" ? "Freja" : "Signature";
|
|
3071
3355
|
},
|
|
3072
3356
|
answerType() {
|
|
3073
|
-
return this.mode === "decline" ? "decline" : this.answerMethod === "bankId" ? "bankId" : "signature";
|
|
3357
|
+
return this.mode === "decline" ? "decline" : this.answerMethod === "bankId" ? "bankId" : this.answerMethod === "freja" ? "freja" : "signature";
|
|
3074
3358
|
},
|
|
3075
3359
|
signee() {
|
|
3076
3360
|
return this.isSender ? this._document.senderClient : this._document.viewer;
|
|
@@ -3100,9 +3384,9 @@ const xi = /* @__PURE__ */ tt(ti, [["render", Ci], ["__scopeId", "data-v-cba2fe5
|
|
|
3100
3384
|
},
|
|
3101
3385
|
methods: {
|
|
3102
3386
|
...ze({
|
|
3103
|
-
answerCurrentDoc:
|
|
3104
|
-
putCurrentDoc:
|
|
3105
|
-
reloadCurrentDocument:
|
|
3387
|
+
answerCurrentDoc: ft.ANSWER_CURRENT_PUBLIC_DOCUMENT,
|
|
3388
|
+
putCurrentDoc: ft.PUT_CURRENT_PUBLIC_DOCUMENT,
|
|
3389
|
+
reloadCurrentDocument: ft.RELOAD_CURRENT_DOCUMENT
|
|
3106
3390
|
}),
|
|
3107
3391
|
async onSubmit() {
|
|
3108
3392
|
this.setFixedHeight(), await this.submit();
|
|
@@ -3120,7 +3404,7 @@ const xi = /* @__PURE__ */ tt(ti, [["render", Ci], ["__scopeId", "data-v-cba2fe5
|
|
|
3120
3404
|
...this.isSender ? this.senderActions : null
|
|
3121
3405
|
});
|
|
3122
3406
|
} catch (n) {
|
|
3123
|
-
this.isPosting = !1, n.httpStatusCode === 409 ? this.page = "versionError" :
|
|
3407
|
+
this.isPosting = !1, n.httpStatusCode === 409 ? this.page = "versionError" : at(n);
|
|
3124
3408
|
}
|
|
3125
3409
|
}
|
|
3126
3410
|
},
|
|
@@ -3132,21 +3416,21 @@ const xi = /* @__PURE__ */ tt(ti, [["render", Ci], ["__scopeId", "data-v-cba2fe5
|
|
|
3132
3416
|
return;
|
|
3133
3417
|
}
|
|
3134
3418
|
const t = this.mode === "accept";
|
|
3135
|
-
this.mode === "accept" && this.answerMethod === "bankId" ? setTimeout(
|
|
3419
|
+
this.mode === "accept" && (this.answerMethod === "bankId" || this.answerMethod === "freja") ? setTimeout(
|
|
3136
3420
|
() => this.reloadCurrentDocument().then(
|
|
3137
3421
|
() => {
|
|
3138
3422
|
var i;
|
|
3139
|
-
return
|
|
3423
|
+
return Kt.trigger("document:answer", {
|
|
3140
3424
|
id: (i = this._document) == null ? void 0 : i.id,
|
|
3141
3425
|
didAccept: t
|
|
3142
3426
|
});
|
|
3143
3427
|
}
|
|
3144
3428
|
),
|
|
3145
3429
|
1e3
|
|
3146
|
-
) :
|
|
3430
|
+
) : Kt.trigger("document:answer", {
|
|
3147
3431
|
id: (o = this._document) == null ? void 0 : o.id,
|
|
3148
3432
|
didAccept: t
|
|
3149
|
-
}), await
|
|
3433
|
+
}), await Jt(800), this.page = "intermediate", await Jt(2e3), this.page = "success", this.isPosting = !1;
|
|
3150
3434
|
})();
|
|
3151
3435
|
},
|
|
3152
3436
|
reload() {
|
|
@@ -3193,49 +3477,49 @@ const xi = /* @__PURE__ */ tt(ti, [["render", Ci], ["__scopeId", "data-v-cba2fe5
|
|
|
3193
3477
|
});
|
|
3194
3478
|
}
|
|
3195
3479
|
}
|
|
3196
|
-
},
|
|
3480
|
+
}, Li = {
|
|
3197
3481
|
key: "start",
|
|
3198
3482
|
class: "root-padding flex-grow"
|
|
3199
|
-
},
|
|
3483
|
+
}, Ni = {
|
|
3200
3484
|
class: "stagger-anim",
|
|
3201
3485
|
style: { "padding-bottom": "40px" }
|
|
3202
|
-
},
|
|
3486
|
+
}, Ui = ["textContent"], qi = ["textContent"], ji = {
|
|
3203
3487
|
class: "stagger-anim",
|
|
3204
3488
|
style: { "padding-top": "3em" }
|
|
3205
|
-
},
|
|
3489
|
+
}, zi = {
|
|
3206
3490
|
key: "intermediate",
|
|
3207
3491
|
class: "flex w-full flex-grow flex-col items-center justify-center text-center",
|
|
3208
3492
|
style: { height: "100%" }
|
|
3209
|
-
},
|
|
3493
|
+
}, Oi = ["textContent"], Vi = {
|
|
3210
3494
|
key: "success",
|
|
3211
3495
|
class: "flex w-full flex-grow flex-col",
|
|
3212
3496
|
style: { height: "100%" }
|
|
3213
|
-
},
|
|
3497
|
+
}, Wi = {
|
|
3214
3498
|
key: 0,
|
|
3215
3499
|
class: "flex w-full flex-grow flex-col items-center justify-center",
|
|
3216
3500
|
style: { overflow: "hidden" }
|
|
3217
|
-
},
|
|
3501
|
+
}, Hi = {
|
|
3218
3502
|
style: { height: "100%" },
|
|
3219
3503
|
class: "root-padding flex w-full flex-col items-center justify-center"
|
|
3220
|
-
},
|
|
3504
|
+
}, Yi = {
|
|
3221
3505
|
class: "a-title stagger-anim",
|
|
3222
3506
|
style: { padding: "calc(2.5 * var(--rem)) 0 calc(2 * var(--rem))" }
|
|
3223
|
-
},
|
|
3507
|
+
}, Gi = ["textContent"], Ki = ["textContent"], Ji = {
|
|
3224
3508
|
key: "versionError",
|
|
3225
3509
|
class: "root-padding flex flex-grow flex-col items-center justify-center text-center"
|
|
3226
|
-
},
|
|
3510
|
+
}, Xi = { class: "stagger-anim" }, Qi = {
|
|
3227
3511
|
class: "flex items-center justify-center",
|
|
3228
3512
|
style: { padding: "20px 0" }
|
|
3229
|
-
},
|
|
3513
|
+
}, Zi = {
|
|
3230
3514
|
class: "flex items-center justify-center",
|
|
3231
3515
|
style: { width: "52px", height: "52px", "border-radius": "50%" }
|
|
3232
|
-
},
|
|
3516
|
+
}, ts = ["textContent"], es = ["textContent"], ns = {
|
|
3233
3517
|
class: "stagger-anim",
|
|
3234
3518
|
style: { "padding-top": "3em" }
|
|
3235
3519
|
};
|
|
3236
|
-
function
|
|
3237
|
-
const r =
|
|
3238
|
-
return
|
|
3520
|
+
function is(n, t, o, i, e, s) {
|
|
3521
|
+
const r = L("CButton"), a = L("Feedback"), l = L("CIcon");
|
|
3522
|
+
return I(), X(Ve, {
|
|
3239
3523
|
class: "a-root font-inter",
|
|
3240
3524
|
tag: "div",
|
|
3241
3525
|
css: !1,
|
|
@@ -3244,7 +3528,7 @@ function Vi(n, t, o, i, e, s) {
|
|
|
3244
3528
|
onLeave: s.leaveAnim
|
|
3245
3529
|
}, {
|
|
3246
3530
|
default: N(() => {
|
|
3247
|
-
var
|
|
3531
|
+
var d;
|
|
3248
3532
|
return [
|
|
3249
3533
|
B(r, {
|
|
3250
3534
|
key: "btn",
|
|
@@ -3255,18 +3539,18 @@ function Vi(n, t, o, i, e, s) {
|
|
|
3255
3539
|
n.$emit("cancel"), n.$emit("close");
|
|
3256
3540
|
})
|
|
3257
3541
|
}),
|
|
3258
|
-
e.page === "start" ? (
|
|
3259
|
-
|
|
3260
|
-
|
|
3542
|
+
e.page === "start" ? (I(), D("div", Li, [
|
|
3543
|
+
f("div", Ni, [
|
|
3544
|
+
f("div", {
|
|
3261
3545
|
class: "a-title",
|
|
3262
|
-
textContent:
|
|
3263
|
-
}, null, 8,
|
|
3264
|
-
|
|
3546
|
+
textContent: T(n._document.$t(`answerModal.${s.answerType}.start.title`))
|
|
3547
|
+
}, null, 8, Ui),
|
|
3548
|
+
f("div", {
|
|
3265
3549
|
style: { color: "hsl(0, 0%, 40%)" },
|
|
3266
|
-
textContent:
|
|
3267
|
-
}, null, 8,
|
|
3550
|
+
textContent: T(n._document.$t(`answerModal.${s.answerType}.start.text`))
|
|
3551
|
+
}, null, 8, qi)
|
|
3268
3552
|
]),
|
|
3269
|
-
(
|
|
3553
|
+
(I(), X(Oe(s.answerComponentName), {
|
|
3270
3554
|
ref: "answerComponent",
|
|
3271
3555
|
_document: n._document,
|
|
3272
3556
|
signee: s.signee,
|
|
@@ -3275,43 +3559,43 @@ function Vi(n, t, o, i, e, s) {
|
|
|
3275
3559
|
onInvalid: t[1] || (t[1] = (c) => e.actionInvalid = c),
|
|
3276
3560
|
onLoading: t[2] || (t[2] = (c) => e.isPosting = c)
|
|
3277
3561
|
}, null, 40, ["_document", "signee", "on-complete-func"])),
|
|
3278
|
-
|
|
3562
|
+
f("div", ji, [
|
|
3279
3563
|
B(r, {
|
|
3280
3564
|
loading: e.isPosting,
|
|
3281
3565
|
disabled: e.actionInvalid,
|
|
3282
3566
|
type: o.mode === "decline" ? "text" : "secondary",
|
|
3283
3567
|
class: "a-btn",
|
|
3284
|
-
icon: s.answerType === "bankId" ? "bankId" : "",
|
|
3568
|
+
icon: s.answerType === "bankId" ? "bankId" : s.answerType === "freja" ? "freja" : "",
|
|
3285
3569
|
onClick: s.onSubmit
|
|
3286
3570
|
}, {
|
|
3287
3571
|
default: N(() => [
|
|
3288
|
-
|
|
3572
|
+
W(T(n._document.$t(`answerModal.${s.answerType}.start.action`)), 1)
|
|
3289
3573
|
]),
|
|
3290
3574
|
_: 1
|
|
3291
3575
|
}, 8, ["loading", "disabled", "type", "icon", "onClick"])
|
|
3292
3576
|
])
|
|
3293
|
-
])) : e.page === "intermediate" ? (
|
|
3294
|
-
|
|
3577
|
+
])) : e.page === "intermediate" ? (I(), D("div", zi, [
|
|
3578
|
+
f("div", {
|
|
3295
3579
|
class: "a-title stagger-anim",
|
|
3296
|
-
textContent:
|
|
3297
|
-
}, null, 8,
|
|
3298
|
-
])) : e.page === "success" ? (
|
|
3299
|
-
B(
|
|
3580
|
+
textContent: T(n._document.$t("answerModal.answerSuccess"))
|
|
3581
|
+
}, null, 8, Oi)
|
|
3582
|
+
])) : e.page === "success" ? (I(), D("div", Vi, [
|
|
3583
|
+
B(lt, {
|
|
3300
3584
|
css: !1,
|
|
3301
3585
|
onLeave: s.minimizeHeight
|
|
3302
3586
|
}, {
|
|
3303
3587
|
default: N(() => [
|
|
3304
|
-
e.isFeedbackInitiated ?
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
textContent:
|
|
3309
|
-
}, null, 8,
|
|
3588
|
+
e.isFeedbackInitiated ? $("", !0) : (I(), D("div", Wi, [
|
|
3589
|
+
f("div", Hi, [
|
|
3590
|
+
f("div", Yi, [
|
|
3591
|
+
f("div", {
|
|
3592
|
+
textContent: T(s.successStrings.title)
|
|
3593
|
+
}, null, 8, Gi)
|
|
3310
3594
|
]),
|
|
3311
|
-
|
|
3595
|
+
f("div", {
|
|
3312
3596
|
class: "stagger-anim",
|
|
3313
|
-
textContent:
|
|
3314
|
-
}, null, 8,
|
|
3597
|
+
textContent: T(s.successStrings.text)
|
|
3598
|
+
}, null, 8, Ki)
|
|
3315
3599
|
])
|
|
3316
3600
|
]))
|
|
3317
3601
|
]),
|
|
@@ -3319,32 +3603,32 @@ function Vi(n, t, o, i, e, s) {
|
|
|
3319
3603
|
}, 8, ["onLeave"]),
|
|
3320
3604
|
B(a, {
|
|
3321
3605
|
ref: "feedback",
|
|
3322
|
-
"public-id": (
|
|
3606
|
+
"public-id": (d = n._document.viewer) == null ? void 0 : d.publicDocumentId,
|
|
3323
3607
|
_document: n._document,
|
|
3324
3608
|
style: { flex: "0 0", overflow: "hidden", "min-height": "200px" },
|
|
3325
3609
|
class: "stagger-anim",
|
|
3326
3610
|
onPage: t[3] || (t[3] = () => e.isFeedbackInitiated = !0),
|
|
3327
3611
|
onClose: t[4] || (t[4] = (c) => n.$emit("close"))
|
|
3328
3612
|
}, null, 8, ["public-id", "_document"])
|
|
3329
|
-
])) : e.page === "versionError" ? (
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3613
|
+
])) : e.page === "versionError" ? (I(), D("div", Ji, [
|
|
3614
|
+
f("div", Xi, [
|
|
3615
|
+
f("div", Qi, [
|
|
3616
|
+
f("div", Zi, [
|
|
3333
3617
|
B(l, {
|
|
3334
3618
|
size: 30,
|
|
3335
3619
|
type: "error"
|
|
3336
3620
|
})
|
|
3337
3621
|
])
|
|
3338
3622
|
]),
|
|
3339
|
-
|
|
3623
|
+
f("div", {
|
|
3340
3624
|
class: "a-title",
|
|
3341
|
-
textContent:
|
|
3342
|
-
}, null, 8,
|
|
3343
|
-
|
|
3344
|
-
textContent:
|
|
3345
|
-
}, null, 8,
|
|
3625
|
+
textContent: T(n._document.$t(`answerModal.versionError.${o.mode}.title`))
|
|
3626
|
+
}, null, 8, ts),
|
|
3627
|
+
f("div", {
|
|
3628
|
+
textContent: T(n._document.$t("answerModal.versionError.text"))
|
|
3629
|
+
}, null, 8, es)
|
|
3346
3630
|
]),
|
|
3347
|
-
|
|
3631
|
+
f("div", ns, [
|
|
3348
3632
|
B(r, {
|
|
3349
3633
|
loading: e.isPosting,
|
|
3350
3634
|
type: "none",
|
|
@@ -3352,18 +3636,18 @@ function Vi(n, t, o, i, e, s) {
|
|
|
3352
3636
|
onClick: s.reload
|
|
3353
3637
|
}, {
|
|
3354
3638
|
default: N(() => [
|
|
3355
|
-
|
|
3639
|
+
W(T(n._document.$t("answerModal.versionError.btn")), 1)
|
|
3356
3640
|
]),
|
|
3357
3641
|
_: 1
|
|
3358
3642
|
}, 8, ["loading", "onClick"])
|
|
3359
3643
|
])
|
|
3360
|
-
])) :
|
|
3644
|
+
])) : $("", !0)
|
|
3361
3645
|
];
|
|
3362
3646
|
}),
|
|
3363
3647
|
_: 1
|
|
3364
3648
|
}, 8, ["onEnter", "onLeave"]);
|
|
3365
3649
|
}
|
|
3366
|
-
const
|
|
3650
|
+
const cs = /* @__PURE__ */ Z($i, [["render", is], ["__scopeId", "data-v-0eef52e4"]]);
|
|
3367
3651
|
export {
|
|
3368
|
-
|
|
3652
|
+
cs as default
|
|
3369
3653
|
};
|