@openrails/billing-ui 0.0.0-stage → 0.233.2
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 +351 -0
- package/LICENSE +21 -0
- package/README.md +260 -2
- package/dist/account/account-billing.d.ts +19 -0
- package/dist/account/cancel-dialog.d.ts +18 -0
- package/dist/account/change-card-dialog.d.ts +14 -0
- package/dist/account/format.d.ts +25 -0
- package/dist/account/notice.d.ts +3 -0
- package/dist/account/payment-history.d.ts +8 -0
- package/dist/account/payment-methods-panel.d.ts +17 -0
- package/dist/account/section.d.ts +27 -0
- package/dist/account/status-badge.d.ts +8 -0
- package/dist/account/subscriptions-panel.d.ts +19 -0
- package/dist/appearance.d.ts +23 -0
- package/dist/authenticate.d.ts +8 -0
- package/dist/checkout-frame.d.ts +17 -0
- package/dist/checkout-page.d.ts +21 -0
- package/dist/checkout.d.ts +24 -0
- package/dist/client/client.d.ts +181 -0
- package/dist/client/errors.d.ts +26 -0
- package/dist/client/generated/currencies.d.ts +1 -0
- package/dist/client/generated/error-codes.d.ts +7 -0
- package/dist/client/generated/routes.d.ts +775 -0
- package/dist/client/generated/wire.d.ts +682 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/types.d.ts +800 -0
- package/dist/client-DXUPzA8C.js +889 -0
- package/dist/client-DXUPzA8C.js.map +1 -0
- package/dist/client.js +2 -0
- package/dist/components/billing-fields.d.ts +39 -0
- package/dist/components/card-brands.d.ts +6 -0
- package/dist/components/card-fields.d.ts +29 -0
- package/dist/components/ccbill-fields.d.ts +8 -0
- package/dist/components/methods.d.ts +13 -0
- package/dist/components/pay-button.d.ts +6 -0
- package/dist/components/qr.d.ts +6 -0
- package/dist/components/saved-methods.d.ts +9 -0
- package/dist/components/states.d.ts +10 -0
- package/dist/components/stripe-card.d.ts +17 -0
- package/dist/components/summary.d.ts +12 -0
- package/dist/components/ui/alert-dialog.d.ts +18 -0
- package/dist/components/ui/badge.d.ts +7 -0
- package/dist/components/ui/button.d.ts +8 -0
- package/dist/components/ui/card.d.ts +11 -0
- package/dist/components/ui/dialog.d.ts +17 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +3 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/separator.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/config-BQELtBh4.js +341 -0
- package/dist/config-BQELtBh4.js.map +1 -0
- package/dist/dist-CslWupfi.js +3311 -0
- package/dist/dist-CslWupfi.js.map +1 -0
- package/dist/fixtures.d.ts +9 -0
- package/dist/frame.d.ts +47 -0
- package/dist/i18n/context.d.ts +4 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/messages.d.ts +58 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +4090 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/billing.d.ts +39 -0
- package/dist/lib/card-brands.d.ts +2 -0
- package/dist/lib/card-entry.d.ts +46 -0
- package/dist/lib/ccbill.d.ts +8 -0
- package/dist/lib/collect.d.ts +51 -0
- package/dist/lib/money.d.ts +10 -0
- package/dist/lib/period.d.ts +13 -0
- package/dist/lib/rail-meta.d.ts +15 -0
- package/dist/lib/redirect.d.ts +2 -0
- package/dist/lib/stripe-appearance.d.ts +2 -0
- package/dist/lib/stripe.d.ts +2 -0
- package/dist/locales/de.d.ts +2 -0
- package/dist/locales/de.js +207 -0
- package/dist/locales/de.js.map +1 -0
- package/dist/locales/en.d.ts +204 -0
- package/dist/locales/en.js +207 -0
- package/dist/locales/en.js.map +1 -0
- package/dist/locales/es.d.ts +2 -0
- package/dist/locales/es.js +207 -0
- package/dist/locales/es.js.map +1 -0
- package/dist/locales/ja.d.ts +2 -0
- package/dist/locales/ja.js +198 -0
- package/dist/locales/ja.js.map +1 -0
- package/dist/locales/ko.d.ts +2 -0
- package/dist/locales/ko.js +198 -0
- package/dist/locales/ko.js.map +1 -0
- package/dist/locales/zh.d.ts +2 -0
- package/dist/locales/zh.js +198 -0
- package/dist/locales/zh.js.map +1 -0
- package/dist/modal.d.ts +12 -0
- package/dist/provider.d.ts +18 -0
- package/dist/psp.d.ts +35 -0
- package/dist/react/config.d.ts +34 -0
- package/dist/react/context.d.ts +35 -0
- package/dist/react/hooks.d.ts +82 -0
- package/dist/react/index.d.ts +4 -0
- package/dist/react/provider.d.ts +10 -0
- package/dist/react/remote.d.ts +10 -0
- package/dist/react.js +33 -0
- package/dist/react.js.map +1 -0
- package/dist/save-payment-method.d.ts +26 -0
- package/dist/scope-context.d.ts +17 -0
- package/dist/scope.d.ts +6 -0
- package/dist/source.d.ts +5 -0
- package/dist/styles.css +3 -0
- package/dist/tokenized-card-form.d.ts +24 -0
- package/dist/types.d.ts +250 -0
- package/docs/payment-form-contract.md +136 -0
- package/package.json +112 -3
|
@@ -0,0 +1,3311 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
|
|
3
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
4
|
+
get: ((e) => i[e]).bind(null, d),
|
|
5
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
6
|
+
});
|
|
7
|
+
return e;
|
|
8
|
+
}, c = /* @__PURE__ */ ((n, r, o) => (o = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
|
|
9
|
+
value: n,
|
|
10
|
+
enumerable: !0
|
|
11
|
+
}) : o, n)))((/* @__PURE__ */ o(((e, t) => {
|
|
12
|
+
(function(n, r) {
|
|
13
|
+
typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.QRCodeStyling = r() : n.QRCodeStyling = r();
|
|
14
|
+
})(e, (function() {
|
|
15
|
+
return (() => {
|
|
16
|
+
var e = {
|
|
17
|
+
192: (e, t) => {
|
|
18
|
+
var n, r, i = function() {
|
|
19
|
+
var e = function(e, t) {
|
|
20
|
+
var n = e, r = o[t], i = null, a = 0, c = null, g = [], _ = {}, y = function(e, t) {
|
|
21
|
+
i = function(e) {
|
|
22
|
+
for (var t = Array(e), n = 0; n < e; n += 1) {
|
|
23
|
+
t[n] = Array(e);
|
|
24
|
+
for (var r = 0; r < e; r += 1) t[n][r] = null;
|
|
25
|
+
}
|
|
26
|
+
return t;
|
|
27
|
+
}(a = 4 * n + 17), b(0, 0), b(a - 7, 0), b(0, a - 7), S(), x(), w(e, t), n >= 7 && C(e), c ??= E(n, r, g), T(c, t);
|
|
28
|
+
}, b = function(e, t) {
|
|
29
|
+
for (var n = -1; n <= 7; n += 1) if (!(e + n <= -1 || a <= e + n)) for (var r = -1; r <= 7; r += 1) t + r <= -1 || a <= t + r || (i[e + n][t + r] = 0 <= n && n <= 6 && (r == 0 || r == 6) || 0 <= r && r <= 6 && (n == 0 || n == 6) || 2 <= n && n <= 4 && 2 <= r && r <= 4);
|
|
30
|
+
}, x = function() {
|
|
31
|
+
for (var e = 8; e < a - 8; e += 1) i[e][6] ?? (i[e][6] = e % 2 == 0);
|
|
32
|
+
for (var t = 8; t < a - 8; t += 1) i[6][t] ?? (i[6][t] = t % 2 == 0);
|
|
33
|
+
}, S = function() {
|
|
34
|
+
for (var e = s.getPatternPosition(n), t = 0; t < e.length; t += 1) for (var r = 0; r < e.length; r += 1) {
|
|
35
|
+
var a = e[t], o = e[r];
|
|
36
|
+
if (i[a][o] == null) for (var c = -2; c <= 2; c += 1) for (var l = -2; l <= 2; l += 1) i[a + c][o + l] = c == -2 || c == 2 || l == -2 || l == 2 || c == 0 && l == 0;
|
|
37
|
+
}
|
|
38
|
+
}, C = function(e) {
|
|
39
|
+
for (var t = s.getBCHTypeNumber(n), r = 0; r < 18; r += 1) {
|
|
40
|
+
var o = !e && (t >> r & 1) == 1;
|
|
41
|
+
i[Math.floor(r / 3)][r % 3 + a - 8 - 3] = o;
|
|
42
|
+
}
|
|
43
|
+
for (r = 0; r < 18; r += 1) o = !e && (t >> r & 1) == 1, i[r % 3 + a - 8 - 3][Math.floor(r / 3)] = o;
|
|
44
|
+
}, w = function(e, t) {
|
|
45
|
+
for (var n = r << 3 | t, o = s.getBCHTypeInfo(n), c = 0; c < 15; c += 1) {
|
|
46
|
+
var l = !e && (o >> c & 1) == 1;
|
|
47
|
+
c < 6 ? i[c][8] = l : c < 8 ? i[c + 1][8] = l : i[a - 15 + c][8] = l;
|
|
48
|
+
}
|
|
49
|
+
for (c = 0; c < 15; c += 1) l = !e && (o >> c & 1) == 1, c < 8 ? i[8][a - c - 1] = l : c < 9 ? i[8][15 - c - 1 + 1] = l : i[8][15 - c - 1] = l;
|
|
50
|
+
i[a - 8][8] = !e;
|
|
51
|
+
}, T = function(e, t) {
|
|
52
|
+
for (var n = -1, r = a - 1, o = 7, c = 0, l = s.getMaskFunction(t), u = a - 1; u > 0; u -= 2) for (u == 6 && --u;;) {
|
|
53
|
+
for (var d = 0; d < 2; d += 1) if (i[r][u - d] == null) {
|
|
54
|
+
var f = !1;
|
|
55
|
+
c < e.length && (f = (e[c] >>> o & 1) == 1), l(r, u - d) && (f = !f), i[r][u - d] = f, --o == -1 && (c += 1, o = 7);
|
|
56
|
+
}
|
|
57
|
+
if ((r += n) < 0 || a <= r) {
|
|
58
|
+
r -= n, n = -n;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}, E = function(e, t, n) {
|
|
63
|
+
for (var r = u.getRSBlocks(e, t), i = d(), a = 0; a < n.length; a += 1) {
|
|
64
|
+
var o = n[a];
|
|
65
|
+
i.put(o.getMode(), 4), i.put(o.getLength(), s.getLengthInBits(o.getMode(), e)), o.write(i);
|
|
66
|
+
}
|
|
67
|
+
var c = 0;
|
|
68
|
+
for (a = 0; a < r.length; a += 1) c += r[a].dataCount;
|
|
69
|
+
if (i.getLengthInBits() > 8 * c) throw "code length overflow. (" + i.getLengthInBits() + ">" + 8 * c + ")";
|
|
70
|
+
for (i.getLengthInBits() + 4 <= 8 * c && i.put(0, 4); i.getLengthInBits() % 8 != 0;) i.putBit(!1);
|
|
71
|
+
for (; !(i.getLengthInBits() >= 8 * c || (i.put(236, 8), i.getLengthInBits() >= 8 * c));) i.put(17, 8);
|
|
72
|
+
return function(e, t) {
|
|
73
|
+
for (var n = 0, r = 0, i = 0, a = Array(t.length), o = Array(t.length), c = 0; c < t.length; c += 1) {
|
|
74
|
+
var u = t[c].dataCount, d = t[c].totalCount - u;
|
|
75
|
+
r = Math.max(r, u), i = Math.max(i, d), a[c] = Array(u);
|
|
76
|
+
for (var f = 0; f < a[c].length; f += 1) a[c][f] = 255 & e.getBuffer()[f + n];
|
|
77
|
+
n += u;
|
|
78
|
+
var p = s.getErrorCorrectPolynomial(d), m = l(a[c], p.getLength() - 1).mod(p);
|
|
79
|
+
for (o[c] = Array(p.getLength() - 1), f = 0; f < o[c].length; f += 1) {
|
|
80
|
+
var h = f + m.getLength() - o[c].length;
|
|
81
|
+
o[c][f] = h >= 0 ? m.getAt(h) : 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
var g = 0;
|
|
85
|
+
for (f = 0; f < t.length; f += 1) g += t[f].totalCount;
|
|
86
|
+
var _ = Array(g), v = 0;
|
|
87
|
+
for (f = 0; f < r; f += 1) for (c = 0; c < t.length; c += 1) f < a[c].length && (_[v] = a[c][f], v += 1);
|
|
88
|
+
for (f = 0; f < i; f += 1) for (c = 0; c < t.length; c += 1) f < o[c].length && (_[v] = o[c][f], v += 1);
|
|
89
|
+
return _;
|
|
90
|
+
}(i, r);
|
|
91
|
+
};
|
|
92
|
+
_.addData = function(e, t) {
|
|
93
|
+
var n = null;
|
|
94
|
+
switch (t ||= "Byte") {
|
|
95
|
+
case "Numeric":
|
|
96
|
+
n = f(e);
|
|
97
|
+
break;
|
|
98
|
+
case "Alphanumeric":
|
|
99
|
+
n = p(e);
|
|
100
|
+
break;
|
|
101
|
+
case "Byte":
|
|
102
|
+
n = m(e);
|
|
103
|
+
break;
|
|
104
|
+
case "Kanji":
|
|
105
|
+
n = h(e);
|
|
106
|
+
break;
|
|
107
|
+
default: throw "mode:" + t;
|
|
108
|
+
}
|
|
109
|
+
g.push(n), c = null;
|
|
110
|
+
}, _.isDark = function(e, t) {
|
|
111
|
+
if (e < 0 || a <= e || t < 0 || a <= t) throw e + "," + t;
|
|
112
|
+
return i[e][t];
|
|
113
|
+
}, _.getModuleCount = function() {
|
|
114
|
+
return a;
|
|
115
|
+
}, _.make = function() {
|
|
116
|
+
if (n < 1) {
|
|
117
|
+
for (var e = 1; e < 40; e++) {
|
|
118
|
+
for (var t = u.getRSBlocks(e, r), i = d(), a = 0; a < g.length; a++) {
|
|
119
|
+
var o = g[a];
|
|
120
|
+
i.put(o.getMode(), 4), i.put(o.getLength(), s.getLengthInBits(o.getMode(), e)), o.write(i);
|
|
121
|
+
}
|
|
122
|
+
var c = 0;
|
|
123
|
+
for (a = 0; a < t.length; a++) c += t[a].dataCount;
|
|
124
|
+
if (i.getLengthInBits() <= 8 * c) break;
|
|
125
|
+
}
|
|
126
|
+
n = e;
|
|
127
|
+
}
|
|
128
|
+
y(!1, function() {
|
|
129
|
+
for (var e = 0, t = 0, n = 0; n < 8; n += 1) {
|
|
130
|
+
y(!0, n);
|
|
131
|
+
var r = s.getLostPoint(_);
|
|
132
|
+
(n == 0 || e > r) && (e = r, t = n);
|
|
133
|
+
}
|
|
134
|
+
return t;
|
|
135
|
+
}());
|
|
136
|
+
}, _.createTableTag = function(e, t) {
|
|
137
|
+
e ||= 2;
|
|
138
|
+
var n = "";
|
|
139
|
+
n += "<table style=\"", n += " border-width: 0px; border-style: none;", n += " border-collapse: collapse;", n += " padding: 0px; margin: " + (t = t === void 0 ? 4 * e : t) + "px;", n += "\">", n += "<tbody>";
|
|
140
|
+
for (var r = 0; r < _.getModuleCount(); r += 1) {
|
|
141
|
+
n += "<tr>";
|
|
142
|
+
for (var i = 0; i < _.getModuleCount(); i += 1) n += "<td style=\"", n += " border-width: 0px; border-style: none;", n += " border-collapse: collapse;", n += " padding: 0px; margin: 0px;", n += " width: " + e + "px;", n += " height: " + e + "px;", n += " background-color: ", n += _.isDark(r, i) ? "#000000" : "#ffffff", n += ";", n += "\"/>";
|
|
143
|
+
n += "</tr>";
|
|
144
|
+
}
|
|
145
|
+
return (n += "</tbody>") + "</table>";
|
|
146
|
+
}, _.createSvgTag = function(e, t, n, r) {
|
|
147
|
+
var i = {};
|
|
148
|
+
typeof arguments[0] == "object" && (e = (i = arguments[0]).cellSize, t = i.margin, n = i.alt, r = i.title), e ||= 2, t = t === void 0 ? 4 * e : t, (n = typeof n == "string" ? { text: n } : n || {}).text = n.text || null, n.id = n.text ? n.id || "qrcode-description" : null, (r = typeof r == "string" ? { text: r } : r || {}).text = r.text || null, r.id = r.text ? r.id || "qrcode-title" : null;
|
|
149
|
+
var a, o, s, c, l = _.getModuleCount() * e + 2 * t, u = "";
|
|
150
|
+
for (c = "l" + e + ",0 0," + e + " -" + e + ",0 0,-" + e + "z ", u += "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"", u += i.scalable ? "" : " width=\"" + l + "px\" height=\"" + l + "px\"", u += " viewBox=\"0 0 " + l + " " + l + "\" ", u += " preserveAspectRatio=\"xMinYMin meet\"", u += r.text || n.text ? " role=\"img\" aria-labelledby=\"" + D([r.id, n.id].join(" ").trim()) + "\"" : "", u += ">", u += r.text ? "<title id=\"" + D(r.id) + "\">" + D(r.text) + "</title>" : "", u += n.text ? "<description id=\"" + D(n.id) + "\">" + D(n.text) + "</description>" : "", u += "<rect width=\"100%\" height=\"100%\" fill=\"white\" cx=\"0\" cy=\"0\"/>", u += "<path d=\"", o = 0; o < _.getModuleCount(); o += 1) for (s = o * e + t, a = 0; a < _.getModuleCount(); a += 1) _.isDark(o, a) && (u += "M" + (a * e + t) + "," + s + c);
|
|
151
|
+
return (u += "\" stroke=\"transparent\" fill=\"black\"/>") + "</svg>";
|
|
152
|
+
}, _.createDataURL = function(e, t) {
|
|
153
|
+
e ||= 2, t = t === void 0 ? 4 * e : t;
|
|
154
|
+
var n = _.getModuleCount() * e + 2 * t, r = t, i = n - t;
|
|
155
|
+
return v(n, n, (function(t, n) {
|
|
156
|
+
if (r <= t && t < i && r <= n && n < i) {
|
|
157
|
+
var a = Math.floor((t - r) / e), o = Math.floor((n - r) / e);
|
|
158
|
+
return +!_.isDark(o, a);
|
|
159
|
+
}
|
|
160
|
+
return 1;
|
|
161
|
+
}));
|
|
162
|
+
}, _.createImgTag = function(e, t, n) {
|
|
163
|
+
e ||= 2, t = t === void 0 ? 4 * e : t;
|
|
164
|
+
var r = _.getModuleCount() * e + 2 * t, i = "";
|
|
165
|
+
return i += "<img", i += " src=\"", i += _.createDataURL(e, t), i += "\"", i += " width=\"", i += r, i += "\"", i += " height=\"", i += r, i += "\"", n && (i += " alt=\"", i += D(n), i += "\""), i + "/>";
|
|
166
|
+
};
|
|
167
|
+
var D = function(e) {
|
|
168
|
+
for (var t = "", n = 0; n < e.length; n += 1) {
|
|
169
|
+
var r = e.charAt(n);
|
|
170
|
+
switch (r) {
|
|
171
|
+
case "<":
|
|
172
|
+
t += "<";
|
|
173
|
+
break;
|
|
174
|
+
case ">":
|
|
175
|
+
t += ">";
|
|
176
|
+
break;
|
|
177
|
+
case "&":
|
|
178
|
+
t += "&";
|
|
179
|
+
break;
|
|
180
|
+
case "\"":
|
|
181
|
+
t += """;
|
|
182
|
+
break;
|
|
183
|
+
default: t += r;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return t;
|
|
187
|
+
};
|
|
188
|
+
return _.createASCII = function(e, t) {
|
|
189
|
+
if ((e ||= 1) < 2) return function(e) {
|
|
190
|
+
e = e === void 0 ? 2 : e;
|
|
191
|
+
var t, n, r, i, a, o = 1 * _.getModuleCount() + 2 * e, s = e, c = o - e, l = {
|
|
192
|
+
"██": "█",
|
|
193
|
+
"█ ": "▀",
|
|
194
|
+
" █": "▄",
|
|
195
|
+
" ": " "
|
|
196
|
+
}, u = {
|
|
197
|
+
"██": "▀",
|
|
198
|
+
"█ ": "▀",
|
|
199
|
+
" █": " ",
|
|
200
|
+
" ": " "
|
|
201
|
+
}, d = "";
|
|
202
|
+
for (t = 0; t < o; t += 2) {
|
|
203
|
+
for (r = Math.floor((t - s) / 1), i = Math.floor((t + 1 - s) / 1), n = 0; n < o; n += 1) a = "█", s <= n && n < c && s <= t && t < c && _.isDark(r, Math.floor((n - s) / 1)) && (a = " "), s <= n && n < c && s <= t + 1 && t + 1 < c && _.isDark(i, Math.floor((n - s) / 1)) ? a += " " : a += "█", d += e < 1 && t + 1 >= c ? u[a] : l[a];
|
|
204
|
+
d += "\n";
|
|
205
|
+
}
|
|
206
|
+
return o % 2 && e > 0 ? d.substring(0, d.length - o - 1) + Array(o + 1).join("▀") : d.substring(0, d.length - 1);
|
|
207
|
+
}(t);
|
|
208
|
+
--e, t = t === void 0 ? 2 * e : t;
|
|
209
|
+
var n, r, i, a, o = _.getModuleCount() * e + 2 * t, s = t, c = o - t, l = Array(e + 1).join("██"), u = Array(e + 1).join(" "), d = "", f = "";
|
|
210
|
+
for (n = 0; n < o; n += 1) {
|
|
211
|
+
for (i = Math.floor((n - s) / e), f = "", r = 0; r < o; r += 1) a = 1, s <= r && r < c && s <= n && n < c && _.isDark(i, Math.floor((r - s) / e)) && (a = 0), f += a ? l : u;
|
|
212
|
+
for (i = 0; i < e; i += 1) d += f + "\n";
|
|
213
|
+
}
|
|
214
|
+
return d.substring(0, d.length - 1);
|
|
215
|
+
}, _.renderTo2dContext = function(e, t) {
|
|
216
|
+
t ||= 2;
|
|
217
|
+
for (var n = _.getModuleCount(), r = 0; r < n; r++) for (var i = 0; i < n; i++) e.fillStyle = _.isDark(r, i) ? "black" : "white", e.fillRect(r * t, i * t, t, t);
|
|
218
|
+
}, _;
|
|
219
|
+
};
|
|
220
|
+
e.stringToBytes = (e.stringToBytesFuncs = { default: function(e) {
|
|
221
|
+
for (var t = [], n = 0; n < e.length; n += 1) {
|
|
222
|
+
var r = e.charCodeAt(n);
|
|
223
|
+
t.push(255 & r);
|
|
224
|
+
}
|
|
225
|
+
return t;
|
|
226
|
+
} }).default, e.createStringToBytes = function(e, t) {
|
|
227
|
+
var n = function() {
|
|
228
|
+
for (var n = _(e), r = function() {
|
|
229
|
+
var e = n.read();
|
|
230
|
+
if (e == -1) throw "eof";
|
|
231
|
+
return e;
|
|
232
|
+
}, i = 0, a = {};;) {
|
|
233
|
+
var o = n.read();
|
|
234
|
+
if (o == -1) break;
|
|
235
|
+
var s = r(), c = r() << 8 | r();
|
|
236
|
+
a[String.fromCharCode(o << 8 | s)] = c, i += 1;
|
|
237
|
+
}
|
|
238
|
+
if (i != t) throw i + " != " + t;
|
|
239
|
+
return a;
|
|
240
|
+
}(), r = 63;
|
|
241
|
+
return function(e) {
|
|
242
|
+
for (var t = [], i = 0; i < e.length; i += 1) {
|
|
243
|
+
var a = e.charCodeAt(i);
|
|
244
|
+
if (a < 128) t.push(a);
|
|
245
|
+
else {
|
|
246
|
+
var o = n[e.charAt(i)];
|
|
247
|
+
typeof o == "number" ? (255 & o) == o ? t.push(o) : (t.push(o >>> 8), t.push(255 & o)) : t.push(r);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return t;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
var t, n, r, i, a, o = {
|
|
254
|
+
L: 1,
|
|
255
|
+
M: 0,
|
|
256
|
+
Q: 3,
|
|
257
|
+
H: 2
|
|
258
|
+
}, s = (t = [
|
|
259
|
+
[],
|
|
260
|
+
[6, 18],
|
|
261
|
+
[6, 22],
|
|
262
|
+
[6, 26],
|
|
263
|
+
[6, 30],
|
|
264
|
+
[6, 34],
|
|
265
|
+
[
|
|
266
|
+
6,
|
|
267
|
+
22,
|
|
268
|
+
38
|
|
269
|
+
],
|
|
270
|
+
[
|
|
271
|
+
6,
|
|
272
|
+
24,
|
|
273
|
+
42
|
|
274
|
+
],
|
|
275
|
+
[
|
|
276
|
+
6,
|
|
277
|
+
26,
|
|
278
|
+
46
|
|
279
|
+
],
|
|
280
|
+
[
|
|
281
|
+
6,
|
|
282
|
+
28,
|
|
283
|
+
50
|
|
284
|
+
],
|
|
285
|
+
[
|
|
286
|
+
6,
|
|
287
|
+
30,
|
|
288
|
+
54
|
|
289
|
+
],
|
|
290
|
+
[
|
|
291
|
+
6,
|
|
292
|
+
32,
|
|
293
|
+
58
|
|
294
|
+
],
|
|
295
|
+
[
|
|
296
|
+
6,
|
|
297
|
+
34,
|
|
298
|
+
62
|
|
299
|
+
],
|
|
300
|
+
[
|
|
301
|
+
6,
|
|
302
|
+
26,
|
|
303
|
+
46,
|
|
304
|
+
66
|
|
305
|
+
],
|
|
306
|
+
[
|
|
307
|
+
6,
|
|
308
|
+
26,
|
|
309
|
+
48,
|
|
310
|
+
70
|
|
311
|
+
],
|
|
312
|
+
[
|
|
313
|
+
6,
|
|
314
|
+
26,
|
|
315
|
+
50,
|
|
316
|
+
74
|
|
317
|
+
],
|
|
318
|
+
[
|
|
319
|
+
6,
|
|
320
|
+
30,
|
|
321
|
+
54,
|
|
322
|
+
78
|
|
323
|
+
],
|
|
324
|
+
[
|
|
325
|
+
6,
|
|
326
|
+
30,
|
|
327
|
+
56,
|
|
328
|
+
82
|
|
329
|
+
],
|
|
330
|
+
[
|
|
331
|
+
6,
|
|
332
|
+
30,
|
|
333
|
+
58,
|
|
334
|
+
86
|
|
335
|
+
],
|
|
336
|
+
[
|
|
337
|
+
6,
|
|
338
|
+
34,
|
|
339
|
+
62,
|
|
340
|
+
90
|
|
341
|
+
],
|
|
342
|
+
[
|
|
343
|
+
6,
|
|
344
|
+
28,
|
|
345
|
+
50,
|
|
346
|
+
72,
|
|
347
|
+
94
|
|
348
|
+
],
|
|
349
|
+
[
|
|
350
|
+
6,
|
|
351
|
+
26,
|
|
352
|
+
50,
|
|
353
|
+
74,
|
|
354
|
+
98
|
|
355
|
+
],
|
|
356
|
+
[
|
|
357
|
+
6,
|
|
358
|
+
30,
|
|
359
|
+
54,
|
|
360
|
+
78,
|
|
361
|
+
102
|
|
362
|
+
],
|
|
363
|
+
[
|
|
364
|
+
6,
|
|
365
|
+
28,
|
|
366
|
+
54,
|
|
367
|
+
80,
|
|
368
|
+
106
|
|
369
|
+
],
|
|
370
|
+
[
|
|
371
|
+
6,
|
|
372
|
+
32,
|
|
373
|
+
58,
|
|
374
|
+
84,
|
|
375
|
+
110
|
|
376
|
+
],
|
|
377
|
+
[
|
|
378
|
+
6,
|
|
379
|
+
30,
|
|
380
|
+
58,
|
|
381
|
+
86,
|
|
382
|
+
114
|
|
383
|
+
],
|
|
384
|
+
[
|
|
385
|
+
6,
|
|
386
|
+
34,
|
|
387
|
+
62,
|
|
388
|
+
90,
|
|
389
|
+
118
|
|
390
|
+
],
|
|
391
|
+
[
|
|
392
|
+
6,
|
|
393
|
+
26,
|
|
394
|
+
50,
|
|
395
|
+
74,
|
|
396
|
+
98,
|
|
397
|
+
122
|
|
398
|
+
],
|
|
399
|
+
[
|
|
400
|
+
6,
|
|
401
|
+
30,
|
|
402
|
+
54,
|
|
403
|
+
78,
|
|
404
|
+
102,
|
|
405
|
+
126
|
|
406
|
+
],
|
|
407
|
+
[
|
|
408
|
+
6,
|
|
409
|
+
26,
|
|
410
|
+
52,
|
|
411
|
+
78,
|
|
412
|
+
104,
|
|
413
|
+
130
|
|
414
|
+
],
|
|
415
|
+
[
|
|
416
|
+
6,
|
|
417
|
+
30,
|
|
418
|
+
56,
|
|
419
|
+
82,
|
|
420
|
+
108,
|
|
421
|
+
134
|
|
422
|
+
],
|
|
423
|
+
[
|
|
424
|
+
6,
|
|
425
|
+
34,
|
|
426
|
+
60,
|
|
427
|
+
86,
|
|
428
|
+
112,
|
|
429
|
+
138
|
|
430
|
+
],
|
|
431
|
+
[
|
|
432
|
+
6,
|
|
433
|
+
30,
|
|
434
|
+
58,
|
|
435
|
+
86,
|
|
436
|
+
114,
|
|
437
|
+
142
|
|
438
|
+
],
|
|
439
|
+
[
|
|
440
|
+
6,
|
|
441
|
+
34,
|
|
442
|
+
62,
|
|
443
|
+
90,
|
|
444
|
+
118,
|
|
445
|
+
146
|
|
446
|
+
],
|
|
447
|
+
[
|
|
448
|
+
6,
|
|
449
|
+
30,
|
|
450
|
+
54,
|
|
451
|
+
78,
|
|
452
|
+
102,
|
|
453
|
+
126,
|
|
454
|
+
150
|
|
455
|
+
],
|
|
456
|
+
[
|
|
457
|
+
6,
|
|
458
|
+
24,
|
|
459
|
+
50,
|
|
460
|
+
76,
|
|
461
|
+
102,
|
|
462
|
+
128,
|
|
463
|
+
154
|
|
464
|
+
],
|
|
465
|
+
[
|
|
466
|
+
6,
|
|
467
|
+
28,
|
|
468
|
+
54,
|
|
469
|
+
80,
|
|
470
|
+
106,
|
|
471
|
+
132,
|
|
472
|
+
158
|
|
473
|
+
],
|
|
474
|
+
[
|
|
475
|
+
6,
|
|
476
|
+
32,
|
|
477
|
+
58,
|
|
478
|
+
84,
|
|
479
|
+
110,
|
|
480
|
+
136,
|
|
481
|
+
162
|
|
482
|
+
],
|
|
483
|
+
[
|
|
484
|
+
6,
|
|
485
|
+
26,
|
|
486
|
+
54,
|
|
487
|
+
82,
|
|
488
|
+
110,
|
|
489
|
+
138,
|
|
490
|
+
166
|
|
491
|
+
],
|
|
492
|
+
[
|
|
493
|
+
6,
|
|
494
|
+
30,
|
|
495
|
+
58,
|
|
496
|
+
86,
|
|
497
|
+
114,
|
|
498
|
+
142,
|
|
499
|
+
170
|
|
500
|
+
]
|
|
501
|
+
], n = 1335, r = 7973, a = function(e) {
|
|
502
|
+
for (var t = 0; e != 0;) t += 1, e >>>= 1;
|
|
503
|
+
return t;
|
|
504
|
+
}, (i = {}).getBCHTypeInfo = function(e) {
|
|
505
|
+
for (var t = e << 10; a(t) - a(n) >= 0;) t ^= n << a(t) - a(n);
|
|
506
|
+
return 21522 ^ (e << 10 | t);
|
|
507
|
+
}, i.getBCHTypeNumber = function(e) {
|
|
508
|
+
for (var t = e << 12; a(t) - a(r) >= 0;) t ^= r << a(t) - a(r);
|
|
509
|
+
return e << 12 | t;
|
|
510
|
+
}, i.getPatternPosition = function(e) {
|
|
511
|
+
return t[e - 1];
|
|
512
|
+
}, i.getMaskFunction = function(e) {
|
|
513
|
+
switch (e) {
|
|
514
|
+
case 0: return function(e, t) {
|
|
515
|
+
return (e + t) % 2 == 0;
|
|
516
|
+
};
|
|
517
|
+
case 1: return function(e, t) {
|
|
518
|
+
return e % 2 == 0;
|
|
519
|
+
};
|
|
520
|
+
case 2: return function(e, t) {
|
|
521
|
+
return t % 3 == 0;
|
|
522
|
+
};
|
|
523
|
+
case 3: return function(e, t) {
|
|
524
|
+
return (e + t) % 3 == 0;
|
|
525
|
+
};
|
|
526
|
+
case 4: return function(e, t) {
|
|
527
|
+
return (Math.floor(e / 2) + Math.floor(t / 3)) % 2 == 0;
|
|
528
|
+
};
|
|
529
|
+
case 5: return function(e, t) {
|
|
530
|
+
return e * t % 2 + e * t % 3 == 0;
|
|
531
|
+
};
|
|
532
|
+
case 6: return function(e, t) {
|
|
533
|
+
return (e * t % 2 + e * t % 3) % 2 == 0;
|
|
534
|
+
};
|
|
535
|
+
case 7: return function(e, t) {
|
|
536
|
+
return (e * t % 3 + (e + t) % 2) % 2 == 0;
|
|
537
|
+
};
|
|
538
|
+
default: throw "bad maskPattern:" + e;
|
|
539
|
+
}
|
|
540
|
+
}, i.getErrorCorrectPolynomial = function(e) {
|
|
541
|
+
for (var t = l([1], 0), n = 0; n < e; n += 1) t = t.multiply(l([1, c.gexp(n)], 0));
|
|
542
|
+
return t;
|
|
543
|
+
}, i.getLengthInBits = function(e, t) {
|
|
544
|
+
if (1 <= t && t < 10) switch (e) {
|
|
545
|
+
case 1: return 10;
|
|
546
|
+
case 2: return 9;
|
|
547
|
+
case 4:
|
|
548
|
+
case 8: return 8;
|
|
549
|
+
default: throw "mode:" + e;
|
|
550
|
+
}
|
|
551
|
+
else if (t < 27) switch (e) {
|
|
552
|
+
case 1: return 12;
|
|
553
|
+
case 2: return 11;
|
|
554
|
+
case 4: return 16;
|
|
555
|
+
case 8: return 10;
|
|
556
|
+
default: throw "mode:" + e;
|
|
557
|
+
}
|
|
558
|
+
else {
|
|
559
|
+
if (!(t < 41)) throw "type:" + t;
|
|
560
|
+
switch (e) {
|
|
561
|
+
case 1: return 14;
|
|
562
|
+
case 2: return 13;
|
|
563
|
+
case 4: return 16;
|
|
564
|
+
case 8: return 12;
|
|
565
|
+
default: throw "mode:" + e;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}, i.getLostPoint = function(e) {
|
|
569
|
+
for (var t = e.getModuleCount(), n = 0, r = 0; r < t; r += 1) for (var i = 0; i < t; i += 1) {
|
|
570
|
+
for (var a = 0, o = e.isDark(r, i), s = -1; s <= 1; s += 1) if (!(r + s < 0 || t <= r + s)) for (var c = -1; c <= 1; c += 1) i + c < 0 || t <= i + c || s == 0 && c == 0 || o == e.isDark(r + s, i + c) && (a += 1);
|
|
571
|
+
a > 5 && (n += 3 + a - 5);
|
|
572
|
+
}
|
|
573
|
+
for (r = 0; r < t - 1; r += 1) for (i = 0; i < t - 1; i += 1) {
|
|
574
|
+
var l = 0;
|
|
575
|
+
e.isDark(r, i) && (l += 1), e.isDark(r + 1, i) && (l += 1), e.isDark(r, i + 1) && (l += 1), e.isDark(r + 1, i + 1) && (l += 1), l != 0 && l != 4 || (n += 3);
|
|
576
|
+
}
|
|
577
|
+
for (r = 0; r < t; r += 1) for (i = 0; i < t - 6; i += 1) e.isDark(r, i) && !e.isDark(r, i + 1) && e.isDark(r, i + 2) && e.isDark(r, i + 3) && e.isDark(r, i + 4) && !e.isDark(r, i + 5) && e.isDark(r, i + 6) && (n += 40);
|
|
578
|
+
for (i = 0; i < t; i += 1) for (r = 0; r < t - 6; r += 1) e.isDark(r, i) && !e.isDark(r + 1, i) && e.isDark(r + 2, i) && e.isDark(r + 3, i) && e.isDark(r + 4, i) && !e.isDark(r + 5, i) && e.isDark(r + 6, i) && (n += 40);
|
|
579
|
+
var u = 0;
|
|
580
|
+
for (i = 0; i < t; i += 1) for (r = 0; r < t; r += 1) e.isDark(r, i) && (u += 1);
|
|
581
|
+
return n + Math.abs(100 * u / t / t - 50) / 5 * 10;
|
|
582
|
+
}, i), c = function() {
|
|
583
|
+
for (var e = Array(256), t = Array(256), n = 0; n < 8; n += 1) e[n] = 1 << n;
|
|
584
|
+
for (n = 8; n < 256; n += 1) e[n] = e[n - 4] ^ e[n - 5] ^ e[n - 6] ^ e[n - 8];
|
|
585
|
+
for (n = 0; n < 255; n += 1) t[e[n]] = n;
|
|
586
|
+
return {
|
|
587
|
+
glog: function(e) {
|
|
588
|
+
if (e < 1) throw "glog(" + e + ")";
|
|
589
|
+
return t[e];
|
|
590
|
+
},
|
|
591
|
+
gexp: function(t) {
|
|
592
|
+
for (; t < 0;) t += 255;
|
|
593
|
+
for (; t >= 256;) t -= 255;
|
|
594
|
+
return e[t];
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
}();
|
|
598
|
+
function l(e, t) {
|
|
599
|
+
if (e.length === void 0) throw e.length + "/" + t;
|
|
600
|
+
var n = function() {
|
|
601
|
+
for (var n = 0; n < e.length && e[n] == 0;) n += 1;
|
|
602
|
+
for (var r = Array(e.length - n + t), i = 0; i < e.length - n; i += 1) r[i] = e[i + n];
|
|
603
|
+
return r;
|
|
604
|
+
}(), r = {
|
|
605
|
+
getAt: function(e) {
|
|
606
|
+
return n[e];
|
|
607
|
+
},
|
|
608
|
+
getLength: function() {
|
|
609
|
+
return n.length;
|
|
610
|
+
},
|
|
611
|
+
multiply: function(e) {
|
|
612
|
+
for (var t = Array(r.getLength() + e.getLength() - 1), n = 0; n < r.getLength(); n += 1) for (var i = 0; i < e.getLength(); i += 1) t[n + i] ^= c.gexp(c.glog(r.getAt(n)) + c.glog(e.getAt(i)));
|
|
613
|
+
return l(t, 0);
|
|
614
|
+
},
|
|
615
|
+
mod: function(e) {
|
|
616
|
+
if (r.getLength() - e.getLength() < 0) return r;
|
|
617
|
+
for (var t = c.glog(r.getAt(0)) - c.glog(e.getAt(0)), n = Array(r.getLength()), i = 0; i < r.getLength(); i += 1) n[i] = r.getAt(i);
|
|
618
|
+
for (i = 0; i < e.getLength(); i += 1) n[i] ^= c.gexp(c.glog(e.getAt(i)) + t);
|
|
619
|
+
return l(n, 0).mod(e);
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
return r;
|
|
623
|
+
}
|
|
624
|
+
var u = function() {
|
|
625
|
+
var e = [
|
|
626
|
+
[
|
|
627
|
+
1,
|
|
628
|
+
26,
|
|
629
|
+
19
|
|
630
|
+
],
|
|
631
|
+
[
|
|
632
|
+
1,
|
|
633
|
+
26,
|
|
634
|
+
16
|
|
635
|
+
],
|
|
636
|
+
[
|
|
637
|
+
1,
|
|
638
|
+
26,
|
|
639
|
+
13
|
|
640
|
+
],
|
|
641
|
+
[
|
|
642
|
+
1,
|
|
643
|
+
26,
|
|
644
|
+
9
|
|
645
|
+
],
|
|
646
|
+
[
|
|
647
|
+
1,
|
|
648
|
+
44,
|
|
649
|
+
34
|
|
650
|
+
],
|
|
651
|
+
[
|
|
652
|
+
1,
|
|
653
|
+
44,
|
|
654
|
+
28
|
|
655
|
+
],
|
|
656
|
+
[
|
|
657
|
+
1,
|
|
658
|
+
44,
|
|
659
|
+
22
|
|
660
|
+
],
|
|
661
|
+
[
|
|
662
|
+
1,
|
|
663
|
+
44,
|
|
664
|
+
16
|
|
665
|
+
],
|
|
666
|
+
[
|
|
667
|
+
1,
|
|
668
|
+
70,
|
|
669
|
+
55
|
|
670
|
+
],
|
|
671
|
+
[
|
|
672
|
+
1,
|
|
673
|
+
70,
|
|
674
|
+
44
|
|
675
|
+
],
|
|
676
|
+
[
|
|
677
|
+
2,
|
|
678
|
+
35,
|
|
679
|
+
17
|
|
680
|
+
],
|
|
681
|
+
[
|
|
682
|
+
2,
|
|
683
|
+
35,
|
|
684
|
+
13
|
|
685
|
+
],
|
|
686
|
+
[
|
|
687
|
+
1,
|
|
688
|
+
100,
|
|
689
|
+
80
|
|
690
|
+
],
|
|
691
|
+
[
|
|
692
|
+
2,
|
|
693
|
+
50,
|
|
694
|
+
32
|
|
695
|
+
],
|
|
696
|
+
[
|
|
697
|
+
2,
|
|
698
|
+
50,
|
|
699
|
+
24
|
|
700
|
+
],
|
|
701
|
+
[
|
|
702
|
+
4,
|
|
703
|
+
25,
|
|
704
|
+
9
|
|
705
|
+
],
|
|
706
|
+
[
|
|
707
|
+
1,
|
|
708
|
+
134,
|
|
709
|
+
108
|
|
710
|
+
],
|
|
711
|
+
[
|
|
712
|
+
2,
|
|
713
|
+
67,
|
|
714
|
+
43
|
|
715
|
+
],
|
|
716
|
+
[
|
|
717
|
+
2,
|
|
718
|
+
33,
|
|
719
|
+
15,
|
|
720
|
+
2,
|
|
721
|
+
34,
|
|
722
|
+
16
|
|
723
|
+
],
|
|
724
|
+
[
|
|
725
|
+
2,
|
|
726
|
+
33,
|
|
727
|
+
11,
|
|
728
|
+
2,
|
|
729
|
+
34,
|
|
730
|
+
12
|
|
731
|
+
],
|
|
732
|
+
[
|
|
733
|
+
2,
|
|
734
|
+
86,
|
|
735
|
+
68
|
|
736
|
+
],
|
|
737
|
+
[
|
|
738
|
+
4,
|
|
739
|
+
43,
|
|
740
|
+
27
|
|
741
|
+
],
|
|
742
|
+
[
|
|
743
|
+
4,
|
|
744
|
+
43,
|
|
745
|
+
19
|
|
746
|
+
],
|
|
747
|
+
[
|
|
748
|
+
4,
|
|
749
|
+
43,
|
|
750
|
+
15
|
|
751
|
+
],
|
|
752
|
+
[
|
|
753
|
+
2,
|
|
754
|
+
98,
|
|
755
|
+
78
|
|
756
|
+
],
|
|
757
|
+
[
|
|
758
|
+
4,
|
|
759
|
+
49,
|
|
760
|
+
31
|
|
761
|
+
],
|
|
762
|
+
[
|
|
763
|
+
2,
|
|
764
|
+
32,
|
|
765
|
+
14,
|
|
766
|
+
4,
|
|
767
|
+
33,
|
|
768
|
+
15
|
|
769
|
+
],
|
|
770
|
+
[
|
|
771
|
+
4,
|
|
772
|
+
39,
|
|
773
|
+
13,
|
|
774
|
+
1,
|
|
775
|
+
40,
|
|
776
|
+
14
|
|
777
|
+
],
|
|
778
|
+
[
|
|
779
|
+
2,
|
|
780
|
+
121,
|
|
781
|
+
97
|
|
782
|
+
],
|
|
783
|
+
[
|
|
784
|
+
2,
|
|
785
|
+
60,
|
|
786
|
+
38,
|
|
787
|
+
2,
|
|
788
|
+
61,
|
|
789
|
+
39
|
|
790
|
+
],
|
|
791
|
+
[
|
|
792
|
+
4,
|
|
793
|
+
40,
|
|
794
|
+
18,
|
|
795
|
+
2,
|
|
796
|
+
41,
|
|
797
|
+
19
|
|
798
|
+
],
|
|
799
|
+
[
|
|
800
|
+
4,
|
|
801
|
+
40,
|
|
802
|
+
14,
|
|
803
|
+
2,
|
|
804
|
+
41,
|
|
805
|
+
15
|
|
806
|
+
],
|
|
807
|
+
[
|
|
808
|
+
2,
|
|
809
|
+
146,
|
|
810
|
+
116
|
|
811
|
+
],
|
|
812
|
+
[
|
|
813
|
+
3,
|
|
814
|
+
58,
|
|
815
|
+
36,
|
|
816
|
+
2,
|
|
817
|
+
59,
|
|
818
|
+
37
|
|
819
|
+
],
|
|
820
|
+
[
|
|
821
|
+
4,
|
|
822
|
+
36,
|
|
823
|
+
16,
|
|
824
|
+
4,
|
|
825
|
+
37,
|
|
826
|
+
17
|
|
827
|
+
],
|
|
828
|
+
[
|
|
829
|
+
4,
|
|
830
|
+
36,
|
|
831
|
+
12,
|
|
832
|
+
4,
|
|
833
|
+
37,
|
|
834
|
+
13
|
|
835
|
+
],
|
|
836
|
+
[
|
|
837
|
+
2,
|
|
838
|
+
86,
|
|
839
|
+
68,
|
|
840
|
+
2,
|
|
841
|
+
87,
|
|
842
|
+
69
|
|
843
|
+
],
|
|
844
|
+
[
|
|
845
|
+
4,
|
|
846
|
+
69,
|
|
847
|
+
43,
|
|
848
|
+
1,
|
|
849
|
+
70,
|
|
850
|
+
44
|
|
851
|
+
],
|
|
852
|
+
[
|
|
853
|
+
6,
|
|
854
|
+
43,
|
|
855
|
+
19,
|
|
856
|
+
2,
|
|
857
|
+
44,
|
|
858
|
+
20
|
|
859
|
+
],
|
|
860
|
+
[
|
|
861
|
+
6,
|
|
862
|
+
43,
|
|
863
|
+
15,
|
|
864
|
+
2,
|
|
865
|
+
44,
|
|
866
|
+
16
|
|
867
|
+
],
|
|
868
|
+
[
|
|
869
|
+
4,
|
|
870
|
+
101,
|
|
871
|
+
81
|
|
872
|
+
],
|
|
873
|
+
[
|
|
874
|
+
1,
|
|
875
|
+
80,
|
|
876
|
+
50,
|
|
877
|
+
4,
|
|
878
|
+
81,
|
|
879
|
+
51
|
|
880
|
+
],
|
|
881
|
+
[
|
|
882
|
+
4,
|
|
883
|
+
50,
|
|
884
|
+
22,
|
|
885
|
+
4,
|
|
886
|
+
51,
|
|
887
|
+
23
|
|
888
|
+
],
|
|
889
|
+
[
|
|
890
|
+
3,
|
|
891
|
+
36,
|
|
892
|
+
12,
|
|
893
|
+
8,
|
|
894
|
+
37,
|
|
895
|
+
13
|
|
896
|
+
],
|
|
897
|
+
[
|
|
898
|
+
2,
|
|
899
|
+
116,
|
|
900
|
+
92,
|
|
901
|
+
2,
|
|
902
|
+
117,
|
|
903
|
+
93
|
|
904
|
+
],
|
|
905
|
+
[
|
|
906
|
+
6,
|
|
907
|
+
58,
|
|
908
|
+
36,
|
|
909
|
+
2,
|
|
910
|
+
59,
|
|
911
|
+
37
|
|
912
|
+
],
|
|
913
|
+
[
|
|
914
|
+
4,
|
|
915
|
+
46,
|
|
916
|
+
20,
|
|
917
|
+
6,
|
|
918
|
+
47,
|
|
919
|
+
21
|
|
920
|
+
],
|
|
921
|
+
[
|
|
922
|
+
7,
|
|
923
|
+
42,
|
|
924
|
+
14,
|
|
925
|
+
4,
|
|
926
|
+
43,
|
|
927
|
+
15
|
|
928
|
+
],
|
|
929
|
+
[
|
|
930
|
+
4,
|
|
931
|
+
133,
|
|
932
|
+
107
|
|
933
|
+
],
|
|
934
|
+
[
|
|
935
|
+
8,
|
|
936
|
+
59,
|
|
937
|
+
37,
|
|
938
|
+
1,
|
|
939
|
+
60,
|
|
940
|
+
38
|
|
941
|
+
],
|
|
942
|
+
[
|
|
943
|
+
8,
|
|
944
|
+
44,
|
|
945
|
+
20,
|
|
946
|
+
4,
|
|
947
|
+
45,
|
|
948
|
+
21
|
|
949
|
+
],
|
|
950
|
+
[
|
|
951
|
+
12,
|
|
952
|
+
33,
|
|
953
|
+
11,
|
|
954
|
+
4,
|
|
955
|
+
34,
|
|
956
|
+
12
|
|
957
|
+
],
|
|
958
|
+
[
|
|
959
|
+
3,
|
|
960
|
+
145,
|
|
961
|
+
115,
|
|
962
|
+
1,
|
|
963
|
+
146,
|
|
964
|
+
116
|
|
965
|
+
],
|
|
966
|
+
[
|
|
967
|
+
4,
|
|
968
|
+
64,
|
|
969
|
+
40,
|
|
970
|
+
5,
|
|
971
|
+
65,
|
|
972
|
+
41
|
|
973
|
+
],
|
|
974
|
+
[
|
|
975
|
+
11,
|
|
976
|
+
36,
|
|
977
|
+
16,
|
|
978
|
+
5,
|
|
979
|
+
37,
|
|
980
|
+
17
|
|
981
|
+
],
|
|
982
|
+
[
|
|
983
|
+
11,
|
|
984
|
+
36,
|
|
985
|
+
12,
|
|
986
|
+
5,
|
|
987
|
+
37,
|
|
988
|
+
13
|
|
989
|
+
],
|
|
990
|
+
[
|
|
991
|
+
5,
|
|
992
|
+
109,
|
|
993
|
+
87,
|
|
994
|
+
1,
|
|
995
|
+
110,
|
|
996
|
+
88
|
|
997
|
+
],
|
|
998
|
+
[
|
|
999
|
+
5,
|
|
1000
|
+
65,
|
|
1001
|
+
41,
|
|
1002
|
+
5,
|
|
1003
|
+
66,
|
|
1004
|
+
42
|
|
1005
|
+
],
|
|
1006
|
+
[
|
|
1007
|
+
5,
|
|
1008
|
+
54,
|
|
1009
|
+
24,
|
|
1010
|
+
7,
|
|
1011
|
+
55,
|
|
1012
|
+
25
|
|
1013
|
+
],
|
|
1014
|
+
[
|
|
1015
|
+
11,
|
|
1016
|
+
36,
|
|
1017
|
+
12,
|
|
1018
|
+
7,
|
|
1019
|
+
37,
|
|
1020
|
+
13
|
|
1021
|
+
],
|
|
1022
|
+
[
|
|
1023
|
+
5,
|
|
1024
|
+
122,
|
|
1025
|
+
98,
|
|
1026
|
+
1,
|
|
1027
|
+
123,
|
|
1028
|
+
99
|
|
1029
|
+
],
|
|
1030
|
+
[
|
|
1031
|
+
7,
|
|
1032
|
+
73,
|
|
1033
|
+
45,
|
|
1034
|
+
3,
|
|
1035
|
+
74,
|
|
1036
|
+
46
|
|
1037
|
+
],
|
|
1038
|
+
[
|
|
1039
|
+
15,
|
|
1040
|
+
43,
|
|
1041
|
+
19,
|
|
1042
|
+
2,
|
|
1043
|
+
44,
|
|
1044
|
+
20
|
|
1045
|
+
],
|
|
1046
|
+
[
|
|
1047
|
+
3,
|
|
1048
|
+
45,
|
|
1049
|
+
15,
|
|
1050
|
+
13,
|
|
1051
|
+
46,
|
|
1052
|
+
16
|
|
1053
|
+
],
|
|
1054
|
+
[
|
|
1055
|
+
1,
|
|
1056
|
+
135,
|
|
1057
|
+
107,
|
|
1058
|
+
5,
|
|
1059
|
+
136,
|
|
1060
|
+
108
|
|
1061
|
+
],
|
|
1062
|
+
[
|
|
1063
|
+
10,
|
|
1064
|
+
74,
|
|
1065
|
+
46,
|
|
1066
|
+
1,
|
|
1067
|
+
75,
|
|
1068
|
+
47
|
|
1069
|
+
],
|
|
1070
|
+
[
|
|
1071
|
+
1,
|
|
1072
|
+
50,
|
|
1073
|
+
22,
|
|
1074
|
+
15,
|
|
1075
|
+
51,
|
|
1076
|
+
23
|
|
1077
|
+
],
|
|
1078
|
+
[
|
|
1079
|
+
2,
|
|
1080
|
+
42,
|
|
1081
|
+
14,
|
|
1082
|
+
17,
|
|
1083
|
+
43,
|
|
1084
|
+
15
|
|
1085
|
+
],
|
|
1086
|
+
[
|
|
1087
|
+
5,
|
|
1088
|
+
150,
|
|
1089
|
+
120,
|
|
1090
|
+
1,
|
|
1091
|
+
151,
|
|
1092
|
+
121
|
|
1093
|
+
],
|
|
1094
|
+
[
|
|
1095
|
+
9,
|
|
1096
|
+
69,
|
|
1097
|
+
43,
|
|
1098
|
+
4,
|
|
1099
|
+
70,
|
|
1100
|
+
44
|
|
1101
|
+
],
|
|
1102
|
+
[
|
|
1103
|
+
17,
|
|
1104
|
+
50,
|
|
1105
|
+
22,
|
|
1106
|
+
1,
|
|
1107
|
+
51,
|
|
1108
|
+
23
|
|
1109
|
+
],
|
|
1110
|
+
[
|
|
1111
|
+
2,
|
|
1112
|
+
42,
|
|
1113
|
+
14,
|
|
1114
|
+
19,
|
|
1115
|
+
43,
|
|
1116
|
+
15
|
|
1117
|
+
],
|
|
1118
|
+
[
|
|
1119
|
+
3,
|
|
1120
|
+
141,
|
|
1121
|
+
113,
|
|
1122
|
+
4,
|
|
1123
|
+
142,
|
|
1124
|
+
114
|
|
1125
|
+
],
|
|
1126
|
+
[
|
|
1127
|
+
3,
|
|
1128
|
+
70,
|
|
1129
|
+
44,
|
|
1130
|
+
11,
|
|
1131
|
+
71,
|
|
1132
|
+
45
|
|
1133
|
+
],
|
|
1134
|
+
[
|
|
1135
|
+
17,
|
|
1136
|
+
47,
|
|
1137
|
+
21,
|
|
1138
|
+
4,
|
|
1139
|
+
48,
|
|
1140
|
+
22
|
|
1141
|
+
],
|
|
1142
|
+
[
|
|
1143
|
+
9,
|
|
1144
|
+
39,
|
|
1145
|
+
13,
|
|
1146
|
+
16,
|
|
1147
|
+
40,
|
|
1148
|
+
14
|
|
1149
|
+
],
|
|
1150
|
+
[
|
|
1151
|
+
3,
|
|
1152
|
+
135,
|
|
1153
|
+
107,
|
|
1154
|
+
5,
|
|
1155
|
+
136,
|
|
1156
|
+
108
|
|
1157
|
+
],
|
|
1158
|
+
[
|
|
1159
|
+
3,
|
|
1160
|
+
67,
|
|
1161
|
+
41,
|
|
1162
|
+
13,
|
|
1163
|
+
68,
|
|
1164
|
+
42
|
|
1165
|
+
],
|
|
1166
|
+
[
|
|
1167
|
+
15,
|
|
1168
|
+
54,
|
|
1169
|
+
24,
|
|
1170
|
+
5,
|
|
1171
|
+
55,
|
|
1172
|
+
25
|
|
1173
|
+
],
|
|
1174
|
+
[
|
|
1175
|
+
15,
|
|
1176
|
+
43,
|
|
1177
|
+
15,
|
|
1178
|
+
10,
|
|
1179
|
+
44,
|
|
1180
|
+
16
|
|
1181
|
+
],
|
|
1182
|
+
[
|
|
1183
|
+
4,
|
|
1184
|
+
144,
|
|
1185
|
+
116,
|
|
1186
|
+
4,
|
|
1187
|
+
145,
|
|
1188
|
+
117
|
|
1189
|
+
],
|
|
1190
|
+
[
|
|
1191
|
+
17,
|
|
1192
|
+
68,
|
|
1193
|
+
42
|
|
1194
|
+
],
|
|
1195
|
+
[
|
|
1196
|
+
17,
|
|
1197
|
+
50,
|
|
1198
|
+
22,
|
|
1199
|
+
6,
|
|
1200
|
+
51,
|
|
1201
|
+
23
|
|
1202
|
+
],
|
|
1203
|
+
[
|
|
1204
|
+
19,
|
|
1205
|
+
46,
|
|
1206
|
+
16,
|
|
1207
|
+
6,
|
|
1208
|
+
47,
|
|
1209
|
+
17
|
|
1210
|
+
],
|
|
1211
|
+
[
|
|
1212
|
+
2,
|
|
1213
|
+
139,
|
|
1214
|
+
111,
|
|
1215
|
+
7,
|
|
1216
|
+
140,
|
|
1217
|
+
112
|
|
1218
|
+
],
|
|
1219
|
+
[
|
|
1220
|
+
17,
|
|
1221
|
+
74,
|
|
1222
|
+
46
|
|
1223
|
+
],
|
|
1224
|
+
[
|
|
1225
|
+
7,
|
|
1226
|
+
54,
|
|
1227
|
+
24,
|
|
1228
|
+
16,
|
|
1229
|
+
55,
|
|
1230
|
+
25
|
|
1231
|
+
],
|
|
1232
|
+
[
|
|
1233
|
+
34,
|
|
1234
|
+
37,
|
|
1235
|
+
13
|
|
1236
|
+
],
|
|
1237
|
+
[
|
|
1238
|
+
4,
|
|
1239
|
+
151,
|
|
1240
|
+
121,
|
|
1241
|
+
5,
|
|
1242
|
+
152,
|
|
1243
|
+
122
|
|
1244
|
+
],
|
|
1245
|
+
[
|
|
1246
|
+
4,
|
|
1247
|
+
75,
|
|
1248
|
+
47,
|
|
1249
|
+
14,
|
|
1250
|
+
76,
|
|
1251
|
+
48
|
|
1252
|
+
],
|
|
1253
|
+
[
|
|
1254
|
+
11,
|
|
1255
|
+
54,
|
|
1256
|
+
24,
|
|
1257
|
+
14,
|
|
1258
|
+
55,
|
|
1259
|
+
25
|
|
1260
|
+
],
|
|
1261
|
+
[
|
|
1262
|
+
16,
|
|
1263
|
+
45,
|
|
1264
|
+
15,
|
|
1265
|
+
14,
|
|
1266
|
+
46,
|
|
1267
|
+
16
|
|
1268
|
+
],
|
|
1269
|
+
[
|
|
1270
|
+
6,
|
|
1271
|
+
147,
|
|
1272
|
+
117,
|
|
1273
|
+
4,
|
|
1274
|
+
148,
|
|
1275
|
+
118
|
|
1276
|
+
],
|
|
1277
|
+
[
|
|
1278
|
+
6,
|
|
1279
|
+
73,
|
|
1280
|
+
45,
|
|
1281
|
+
14,
|
|
1282
|
+
74,
|
|
1283
|
+
46
|
|
1284
|
+
],
|
|
1285
|
+
[
|
|
1286
|
+
11,
|
|
1287
|
+
54,
|
|
1288
|
+
24,
|
|
1289
|
+
16,
|
|
1290
|
+
55,
|
|
1291
|
+
25
|
|
1292
|
+
],
|
|
1293
|
+
[
|
|
1294
|
+
30,
|
|
1295
|
+
46,
|
|
1296
|
+
16,
|
|
1297
|
+
2,
|
|
1298
|
+
47,
|
|
1299
|
+
17
|
|
1300
|
+
],
|
|
1301
|
+
[
|
|
1302
|
+
8,
|
|
1303
|
+
132,
|
|
1304
|
+
106,
|
|
1305
|
+
4,
|
|
1306
|
+
133,
|
|
1307
|
+
107
|
|
1308
|
+
],
|
|
1309
|
+
[
|
|
1310
|
+
8,
|
|
1311
|
+
75,
|
|
1312
|
+
47,
|
|
1313
|
+
13,
|
|
1314
|
+
76,
|
|
1315
|
+
48
|
|
1316
|
+
],
|
|
1317
|
+
[
|
|
1318
|
+
7,
|
|
1319
|
+
54,
|
|
1320
|
+
24,
|
|
1321
|
+
22,
|
|
1322
|
+
55,
|
|
1323
|
+
25
|
|
1324
|
+
],
|
|
1325
|
+
[
|
|
1326
|
+
22,
|
|
1327
|
+
45,
|
|
1328
|
+
15,
|
|
1329
|
+
13,
|
|
1330
|
+
46,
|
|
1331
|
+
16
|
|
1332
|
+
],
|
|
1333
|
+
[
|
|
1334
|
+
10,
|
|
1335
|
+
142,
|
|
1336
|
+
114,
|
|
1337
|
+
2,
|
|
1338
|
+
143,
|
|
1339
|
+
115
|
|
1340
|
+
],
|
|
1341
|
+
[
|
|
1342
|
+
19,
|
|
1343
|
+
74,
|
|
1344
|
+
46,
|
|
1345
|
+
4,
|
|
1346
|
+
75,
|
|
1347
|
+
47
|
|
1348
|
+
],
|
|
1349
|
+
[
|
|
1350
|
+
28,
|
|
1351
|
+
50,
|
|
1352
|
+
22,
|
|
1353
|
+
6,
|
|
1354
|
+
51,
|
|
1355
|
+
23
|
|
1356
|
+
],
|
|
1357
|
+
[
|
|
1358
|
+
33,
|
|
1359
|
+
46,
|
|
1360
|
+
16,
|
|
1361
|
+
4,
|
|
1362
|
+
47,
|
|
1363
|
+
17
|
|
1364
|
+
],
|
|
1365
|
+
[
|
|
1366
|
+
8,
|
|
1367
|
+
152,
|
|
1368
|
+
122,
|
|
1369
|
+
4,
|
|
1370
|
+
153,
|
|
1371
|
+
123
|
|
1372
|
+
],
|
|
1373
|
+
[
|
|
1374
|
+
22,
|
|
1375
|
+
73,
|
|
1376
|
+
45,
|
|
1377
|
+
3,
|
|
1378
|
+
74,
|
|
1379
|
+
46
|
|
1380
|
+
],
|
|
1381
|
+
[
|
|
1382
|
+
8,
|
|
1383
|
+
53,
|
|
1384
|
+
23,
|
|
1385
|
+
26,
|
|
1386
|
+
54,
|
|
1387
|
+
24
|
|
1388
|
+
],
|
|
1389
|
+
[
|
|
1390
|
+
12,
|
|
1391
|
+
45,
|
|
1392
|
+
15,
|
|
1393
|
+
28,
|
|
1394
|
+
46,
|
|
1395
|
+
16
|
|
1396
|
+
],
|
|
1397
|
+
[
|
|
1398
|
+
3,
|
|
1399
|
+
147,
|
|
1400
|
+
117,
|
|
1401
|
+
10,
|
|
1402
|
+
148,
|
|
1403
|
+
118
|
|
1404
|
+
],
|
|
1405
|
+
[
|
|
1406
|
+
3,
|
|
1407
|
+
73,
|
|
1408
|
+
45,
|
|
1409
|
+
23,
|
|
1410
|
+
74,
|
|
1411
|
+
46
|
|
1412
|
+
],
|
|
1413
|
+
[
|
|
1414
|
+
4,
|
|
1415
|
+
54,
|
|
1416
|
+
24,
|
|
1417
|
+
31,
|
|
1418
|
+
55,
|
|
1419
|
+
25
|
|
1420
|
+
],
|
|
1421
|
+
[
|
|
1422
|
+
11,
|
|
1423
|
+
45,
|
|
1424
|
+
15,
|
|
1425
|
+
31,
|
|
1426
|
+
46,
|
|
1427
|
+
16
|
|
1428
|
+
],
|
|
1429
|
+
[
|
|
1430
|
+
7,
|
|
1431
|
+
146,
|
|
1432
|
+
116,
|
|
1433
|
+
7,
|
|
1434
|
+
147,
|
|
1435
|
+
117
|
|
1436
|
+
],
|
|
1437
|
+
[
|
|
1438
|
+
21,
|
|
1439
|
+
73,
|
|
1440
|
+
45,
|
|
1441
|
+
7,
|
|
1442
|
+
74,
|
|
1443
|
+
46
|
|
1444
|
+
],
|
|
1445
|
+
[
|
|
1446
|
+
1,
|
|
1447
|
+
53,
|
|
1448
|
+
23,
|
|
1449
|
+
37,
|
|
1450
|
+
54,
|
|
1451
|
+
24
|
|
1452
|
+
],
|
|
1453
|
+
[
|
|
1454
|
+
19,
|
|
1455
|
+
45,
|
|
1456
|
+
15,
|
|
1457
|
+
26,
|
|
1458
|
+
46,
|
|
1459
|
+
16
|
|
1460
|
+
],
|
|
1461
|
+
[
|
|
1462
|
+
5,
|
|
1463
|
+
145,
|
|
1464
|
+
115,
|
|
1465
|
+
10,
|
|
1466
|
+
146,
|
|
1467
|
+
116
|
|
1468
|
+
],
|
|
1469
|
+
[
|
|
1470
|
+
19,
|
|
1471
|
+
75,
|
|
1472
|
+
47,
|
|
1473
|
+
10,
|
|
1474
|
+
76,
|
|
1475
|
+
48
|
|
1476
|
+
],
|
|
1477
|
+
[
|
|
1478
|
+
15,
|
|
1479
|
+
54,
|
|
1480
|
+
24,
|
|
1481
|
+
25,
|
|
1482
|
+
55,
|
|
1483
|
+
25
|
|
1484
|
+
],
|
|
1485
|
+
[
|
|
1486
|
+
23,
|
|
1487
|
+
45,
|
|
1488
|
+
15,
|
|
1489
|
+
25,
|
|
1490
|
+
46,
|
|
1491
|
+
16
|
|
1492
|
+
],
|
|
1493
|
+
[
|
|
1494
|
+
13,
|
|
1495
|
+
145,
|
|
1496
|
+
115,
|
|
1497
|
+
3,
|
|
1498
|
+
146,
|
|
1499
|
+
116
|
|
1500
|
+
],
|
|
1501
|
+
[
|
|
1502
|
+
2,
|
|
1503
|
+
74,
|
|
1504
|
+
46,
|
|
1505
|
+
29,
|
|
1506
|
+
75,
|
|
1507
|
+
47
|
|
1508
|
+
],
|
|
1509
|
+
[
|
|
1510
|
+
42,
|
|
1511
|
+
54,
|
|
1512
|
+
24,
|
|
1513
|
+
1,
|
|
1514
|
+
55,
|
|
1515
|
+
25
|
|
1516
|
+
],
|
|
1517
|
+
[
|
|
1518
|
+
23,
|
|
1519
|
+
45,
|
|
1520
|
+
15,
|
|
1521
|
+
28,
|
|
1522
|
+
46,
|
|
1523
|
+
16
|
|
1524
|
+
],
|
|
1525
|
+
[
|
|
1526
|
+
17,
|
|
1527
|
+
145,
|
|
1528
|
+
115
|
|
1529
|
+
],
|
|
1530
|
+
[
|
|
1531
|
+
10,
|
|
1532
|
+
74,
|
|
1533
|
+
46,
|
|
1534
|
+
23,
|
|
1535
|
+
75,
|
|
1536
|
+
47
|
|
1537
|
+
],
|
|
1538
|
+
[
|
|
1539
|
+
10,
|
|
1540
|
+
54,
|
|
1541
|
+
24,
|
|
1542
|
+
35,
|
|
1543
|
+
55,
|
|
1544
|
+
25
|
|
1545
|
+
],
|
|
1546
|
+
[
|
|
1547
|
+
19,
|
|
1548
|
+
45,
|
|
1549
|
+
15,
|
|
1550
|
+
35,
|
|
1551
|
+
46,
|
|
1552
|
+
16
|
|
1553
|
+
],
|
|
1554
|
+
[
|
|
1555
|
+
17,
|
|
1556
|
+
145,
|
|
1557
|
+
115,
|
|
1558
|
+
1,
|
|
1559
|
+
146,
|
|
1560
|
+
116
|
|
1561
|
+
],
|
|
1562
|
+
[
|
|
1563
|
+
14,
|
|
1564
|
+
74,
|
|
1565
|
+
46,
|
|
1566
|
+
21,
|
|
1567
|
+
75,
|
|
1568
|
+
47
|
|
1569
|
+
],
|
|
1570
|
+
[
|
|
1571
|
+
29,
|
|
1572
|
+
54,
|
|
1573
|
+
24,
|
|
1574
|
+
19,
|
|
1575
|
+
55,
|
|
1576
|
+
25
|
|
1577
|
+
],
|
|
1578
|
+
[
|
|
1579
|
+
11,
|
|
1580
|
+
45,
|
|
1581
|
+
15,
|
|
1582
|
+
46,
|
|
1583
|
+
46,
|
|
1584
|
+
16
|
|
1585
|
+
],
|
|
1586
|
+
[
|
|
1587
|
+
13,
|
|
1588
|
+
145,
|
|
1589
|
+
115,
|
|
1590
|
+
6,
|
|
1591
|
+
146,
|
|
1592
|
+
116
|
|
1593
|
+
],
|
|
1594
|
+
[
|
|
1595
|
+
14,
|
|
1596
|
+
74,
|
|
1597
|
+
46,
|
|
1598
|
+
23,
|
|
1599
|
+
75,
|
|
1600
|
+
47
|
|
1601
|
+
],
|
|
1602
|
+
[
|
|
1603
|
+
44,
|
|
1604
|
+
54,
|
|
1605
|
+
24,
|
|
1606
|
+
7,
|
|
1607
|
+
55,
|
|
1608
|
+
25
|
|
1609
|
+
],
|
|
1610
|
+
[
|
|
1611
|
+
59,
|
|
1612
|
+
46,
|
|
1613
|
+
16,
|
|
1614
|
+
1,
|
|
1615
|
+
47,
|
|
1616
|
+
17
|
|
1617
|
+
],
|
|
1618
|
+
[
|
|
1619
|
+
12,
|
|
1620
|
+
151,
|
|
1621
|
+
121,
|
|
1622
|
+
7,
|
|
1623
|
+
152,
|
|
1624
|
+
122
|
|
1625
|
+
],
|
|
1626
|
+
[
|
|
1627
|
+
12,
|
|
1628
|
+
75,
|
|
1629
|
+
47,
|
|
1630
|
+
26,
|
|
1631
|
+
76,
|
|
1632
|
+
48
|
|
1633
|
+
],
|
|
1634
|
+
[
|
|
1635
|
+
39,
|
|
1636
|
+
54,
|
|
1637
|
+
24,
|
|
1638
|
+
14,
|
|
1639
|
+
55,
|
|
1640
|
+
25
|
|
1641
|
+
],
|
|
1642
|
+
[
|
|
1643
|
+
22,
|
|
1644
|
+
45,
|
|
1645
|
+
15,
|
|
1646
|
+
41,
|
|
1647
|
+
46,
|
|
1648
|
+
16
|
|
1649
|
+
],
|
|
1650
|
+
[
|
|
1651
|
+
6,
|
|
1652
|
+
151,
|
|
1653
|
+
121,
|
|
1654
|
+
14,
|
|
1655
|
+
152,
|
|
1656
|
+
122
|
|
1657
|
+
],
|
|
1658
|
+
[
|
|
1659
|
+
6,
|
|
1660
|
+
75,
|
|
1661
|
+
47,
|
|
1662
|
+
34,
|
|
1663
|
+
76,
|
|
1664
|
+
48
|
|
1665
|
+
],
|
|
1666
|
+
[
|
|
1667
|
+
46,
|
|
1668
|
+
54,
|
|
1669
|
+
24,
|
|
1670
|
+
10,
|
|
1671
|
+
55,
|
|
1672
|
+
25
|
|
1673
|
+
],
|
|
1674
|
+
[
|
|
1675
|
+
2,
|
|
1676
|
+
45,
|
|
1677
|
+
15,
|
|
1678
|
+
64,
|
|
1679
|
+
46,
|
|
1680
|
+
16
|
|
1681
|
+
],
|
|
1682
|
+
[
|
|
1683
|
+
17,
|
|
1684
|
+
152,
|
|
1685
|
+
122,
|
|
1686
|
+
4,
|
|
1687
|
+
153,
|
|
1688
|
+
123
|
|
1689
|
+
],
|
|
1690
|
+
[
|
|
1691
|
+
29,
|
|
1692
|
+
74,
|
|
1693
|
+
46,
|
|
1694
|
+
14,
|
|
1695
|
+
75,
|
|
1696
|
+
47
|
|
1697
|
+
],
|
|
1698
|
+
[
|
|
1699
|
+
49,
|
|
1700
|
+
54,
|
|
1701
|
+
24,
|
|
1702
|
+
10,
|
|
1703
|
+
55,
|
|
1704
|
+
25
|
|
1705
|
+
],
|
|
1706
|
+
[
|
|
1707
|
+
24,
|
|
1708
|
+
45,
|
|
1709
|
+
15,
|
|
1710
|
+
46,
|
|
1711
|
+
46,
|
|
1712
|
+
16
|
|
1713
|
+
],
|
|
1714
|
+
[
|
|
1715
|
+
4,
|
|
1716
|
+
152,
|
|
1717
|
+
122,
|
|
1718
|
+
18,
|
|
1719
|
+
153,
|
|
1720
|
+
123
|
|
1721
|
+
],
|
|
1722
|
+
[
|
|
1723
|
+
13,
|
|
1724
|
+
74,
|
|
1725
|
+
46,
|
|
1726
|
+
32,
|
|
1727
|
+
75,
|
|
1728
|
+
47
|
|
1729
|
+
],
|
|
1730
|
+
[
|
|
1731
|
+
48,
|
|
1732
|
+
54,
|
|
1733
|
+
24,
|
|
1734
|
+
14,
|
|
1735
|
+
55,
|
|
1736
|
+
25
|
|
1737
|
+
],
|
|
1738
|
+
[
|
|
1739
|
+
42,
|
|
1740
|
+
45,
|
|
1741
|
+
15,
|
|
1742
|
+
32,
|
|
1743
|
+
46,
|
|
1744
|
+
16
|
|
1745
|
+
],
|
|
1746
|
+
[
|
|
1747
|
+
20,
|
|
1748
|
+
147,
|
|
1749
|
+
117,
|
|
1750
|
+
4,
|
|
1751
|
+
148,
|
|
1752
|
+
118
|
|
1753
|
+
],
|
|
1754
|
+
[
|
|
1755
|
+
40,
|
|
1756
|
+
75,
|
|
1757
|
+
47,
|
|
1758
|
+
7,
|
|
1759
|
+
76,
|
|
1760
|
+
48
|
|
1761
|
+
],
|
|
1762
|
+
[
|
|
1763
|
+
43,
|
|
1764
|
+
54,
|
|
1765
|
+
24,
|
|
1766
|
+
22,
|
|
1767
|
+
55,
|
|
1768
|
+
25
|
|
1769
|
+
],
|
|
1770
|
+
[
|
|
1771
|
+
10,
|
|
1772
|
+
45,
|
|
1773
|
+
15,
|
|
1774
|
+
67,
|
|
1775
|
+
46,
|
|
1776
|
+
16
|
|
1777
|
+
],
|
|
1778
|
+
[
|
|
1779
|
+
19,
|
|
1780
|
+
148,
|
|
1781
|
+
118,
|
|
1782
|
+
6,
|
|
1783
|
+
149,
|
|
1784
|
+
119
|
|
1785
|
+
],
|
|
1786
|
+
[
|
|
1787
|
+
18,
|
|
1788
|
+
75,
|
|
1789
|
+
47,
|
|
1790
|
+
31,
|
|
1791
|
+
76,
|
|
1792
|
+
48
|
|
1793
|
+
],
|
|
1794
|
+
[
|
|
1795
|
+
34,
|
|
1796
|
+
54,
|
|
1797
|
+
24,
|
|
1798
|
+
34,
|
|
1799
|
+
55,
|
|
1800
|
+
25
|
|
1801
|
+
],
|
|
1802
|
+
[
|
|
1803
|
+
20,
|
|
1804
|
+
45,
|
|
1805
|
+
15,
|
|
1806
|
+
61,
|
|
1807
|
+
46,
|
|
1808
|
+
16
|
|
1809
|
+
]
|
|
1810
|
+
], t = function(e, t) {
|
|
1811
|
+
var n = {};
|
|
1812
|
+
return n.totalCount = e, n.dataCount = t, n;
|
|
1813
|
+
};
|
|
1814
|
+
return { getRSBlocks: function(n, r) {
|
|
1815
|
+
var i = function(t, n) {
|
|
1816
|
+
switch (n) {
|
|
1817
|
+
case o.L: return e[4 * (t - 1) + 0];
|
|
1818
|
+
case o.M: return e[4 * (t - 1) + 1];
|
|
1819
|
+
case o.Q: return e[4 * (t - 1) + 2];
|
|
1820
|
+
case o.H: return e[4 * (t - 1) + 3];
|
|
1821
|
+
default: return;
|
|
1822
|
+
}
|
|
1823
|
+
}(n, r);
|
|
1824
|
+
if (i === void 0) throw "bad rs block @ typeNumber:" + n + "/errorCorrectionLevel:" + r;
|
|
1825
|
+
for (var a = i.length / 3, s = [], c = 0; c < a; c += 1) for (var l = i[3 * c + 0], u = i[3 * c + 1], d = i[3 * c + 2], f = 0; f < l; f += 1) s.push(t(u, d));
|
|
1826
|
+
return s;
|
|
1827
|
+
} };
|
|
1828
|
+
}(), d = function() {
|
|
1829
|
+
var e = [], t = 0, n = {
|
|
1830
|
+
getBuffer: function() {
|
|
1831
|
+
return e;
|
|
1832
|
+
},
|
|
1833
|
+
getAt: function(t) {
|
|
1834
|
+
return (e[Math.floor(t / 8)] >>> 7 - t % 8 & 1) == 1;
|
|
1835
|
+
},
|
|
1836
|
+
put: function(e, t) {
|
|
1837
|
+
for (var r = 0; r < t; r += 1) n.putBit((e >>> t - r - 1 & 1) == 1);
|
|
1838
|
+
},
|
|
1839
|
+
getLengthInBits: function() {
|
|
1840
|
+
return t;
|
|
1841
|
+
},
|
|
1842
|
+
putBit: function(n) {
|
|
1843
|
+
var r = Math.floor(t / 8);
|
|
1844
|
+
e.length <= r && e.push(0), n && (e[r] |= 128 >>> t % 8), t += 1;
|
|
1845
|
+
}
|
|
1846
|
+
};
|
|
1847
|
+
return n;
|
|
1848
|
+
}, f = function(e) {
|
|
1849
|
+
var t = e, n = {
|
|
1850
|
+
getMode: function() {
|
|
1851
|
+
return 1;
|
|
1852
|
+
},
|
|
1853
|
+
getLength: function(e) {
|
|
1854
|
+
return t.length;
|
|
1855
|
+
},
|
|
1856
|
+
write: function(e) {
|
|
1857
|
+
for (var n = t, i = 0; i + 2 < n.length;) e.put(r(n.substring(i, i + 3)), 10), i += 3;
|
|
1858
|
+
i < n.length && (n.length - i == 1 ? e.put(r(n.substring(i, i + 1)), 4) : n.length - i == 2 && e.put(r(n.substring(i, i + 2)), 7));
|
|
1859
|
+
}
|
|
1860
|
+
}, r = function(e) {
|
|
1861
|
+
for (var t = 0, n = 0; n < e.length; n += 1) t = 10 * t + i(e.charAt(n));
|
|
1862
|
+
return t;
|
|
1863
|
+
}, i = function(e) {
|
|
1864
|
+
if ("0" <= e && e <= "9") return e.charCodeAt(0) - 48;
|
|
1865
|
+
throw "illegal char :" + e;
|
|
1866
|
+
};
|
|
1867
|
+
return n;
|
|
1868
|
+
}, p = function(e) {
|
|
1869
|
+
var t = e, n = {
|
|
1870
|
+
getMode: function() {
|
|
1871
|
+
return 2;
|
|
1872
|
+
},
|
|
1873
|
+
getLength: function(e) {
|
|
1874
|
+
return t.length;
|
|
1875
|
+
},
|
|
1876
|
+
write: function(e) {
|
|
1877
|
+
for (var n = t, i = 0; i + 1 < n.length;) e.put(45 * r(n.charAt(i)) + r(n.charAt(i + 1)), 11), i += 2;
|
|
1878
|
+
i < n.length && e.put(r(n.charAt(i)), 6);
|
|
1879
|
+
}
|
|
1880
|
+
}, r = function(e) {
|
|
1881
|
+
if ("0" <= e && e <= "9") return e.charCodeAt(0) - 48;
|
|
1882
|
+
if ("A" <= e && e <= "Z") return e.charCodeAt(0) - 65 + 10;
|
|
1883
|
+
switch (e) {
|
|
1884
|
+
case " ": return 36;
|
|
1885
|
+
case "$": return 37;
|
|
1886
|
+
case "%": return 38;
|
|
1887
|
+
case "*": return 39;
|
|
1888
|
+
case "+": return 40;
|
|
1889
|
+
case "-": return 41;
|
|
1890
|
+
case ".": return 42;
|
|
1891
|
+
case "/": return 43;
|
|
1892
|
+
case ":": return 44;
|
|
1893
|
+
default: throw "illegal char :" + e;
|
|
1894
|
+
}
|
|
1895
|
+
};
|
|
1896
|
+
return n;
|
|
1897
|
+
}, m = function(t) {
|
|
1898
|
+
var n = e.stringToBytes(t);
|
|
1899
|
+
return {
|
|
1900
|
+
getMode: function() {
|
|
1901
|
+
return 4;
|
|
1902
|
+
},
|
|
1903
|
+
getLength: function(e) {
|
|
1904
|
+
return n.length;
|
|
1905
|
+
},
|
|
1906
|
+
write: function(e) {
|
|
1907
|
+
for (var t = 0; t < n.length; t += 1) e.put(n[t], 8);
|
|
1908
|
+
}
|
|
1909
|
+
};
|
|
1910
|
+
}, h = function(t) {
|
|
1911
|
+
var n = e.stringToBytesFuncs.SJIS;
|
|
1912
|
+
if (!n) throw "sjis not supported.";
|
|
1913
|
+
(function(e, t) {
|
|
1914
|
+
var r = n("友");
|
|
1915
|
+
if (r.length != 2 || (r[0] << 8 | r[1]) != 38726) throw "sjis not supported.";
|
|
1916
|
+
})();
|
|
1917
|
+
var r = n(t);
|
|
1918
|
+
return {
|
|
1919
|
+
getMode: function() {
|
|
1920
|
+
return 8;
|
|
1921
|
+
},
|
|
1922
|
+
getLength: function(e) {
|
|
1923
|
+
return ~~(r.length / 2);
|
|
1924
|
+
},
|
|
1925
|
+
write: function(e) {
|
|
1926
|
+
for (var t = r, n = 0; n + 1 < t.length;) {
|
|
1927
|
+
var i = (255 & t[n]) << 8 | 255 & t[n + 1];
|
|
1928
|
+
if (33088 <= i && i <= 40956) i -= 33088;
|
|
1929
|
+
else {
|
|
1930
|
+
if (!(57408 <= i && i <= 60351)) throw "illegal char at " + (n + 1) + "/" + i;
|
|
1931
|
+
i -= 49472;
|
|
1932
|
+
}
|
|
1933
|
+
i = 192 * (i >>> 8 & 255) + (255 & i), e.put(i, 13), n += 2;
|
|
1934
|
+
}
|
|
1935
|
+
if (n < t.length) throw "illegal char at " + (n + 1);
|
|
1936
|
+
}
|
|
1937
|
+
};
|
|
1938
|
+
}, g = function() {
|
|
1939
|
+
var e = [], t = {
|
|
1940
|
+
writeByte: function(t) {
|
|
1941
|
+
e.push(255 & t);
|
|
1942
|
+
},
|
|
1943
|
+
writeShort: function(e) {
|
|
1944
|
+
t.writeByte(e), t.writeByte(e >>> 8);
|
|
1945
|
+
},
|
|
1946
|
+
writeBytes: function(e, n, r) {
|
|
1947
|
+
n ||= 0, r ||= e.length;
|
|
1948
|
+
for (var i = 0; i < r; i += 1) t.writeByte(e[i + n]);
|
|
1949
|
+
},
|
|
1950
|
+
writeString: function(e) {
|
|
1951
|
+
for (var n = 0; n < e.length; n += 1) t.writeByte(e.charCodeAt(n));
|
|
1952
|
+
},
|
|
1953
|
+
toByteArray: function() {
|
|
1954
|
+
return e;
|
|
1955
|
+
},
|
|
1956
|
+
toString: function() {
|
|
1957
|
+
var t = "";
|
|
1958
|
+
t += "[";
|
|
1959
|
+
for (var n = 0; n < e.length; n += 1) n > 0 && (t += ","), t += e[n];
|
|
1960
|
+
return t + "]";
|
|
1961
|
+
}
|
|
1962
|
+
};
|
|
1963
|
+
return t;
|
|
1964
|
+
}, _ = function(e) {
|
|
1965
|
+
var t = e, n = 0, r = 0, i = 0, a = { read: function() {
|
|
1966
|
+
for (; i < 8;) {
|
|
1967
|
+
if (n >= t.length) {
|
|
1968
|
+
if (i == 0) return -1;
|
|
1969
|
+
throw "unexpected end of file./" + i;
|
|
1970
|
+
}
|
|
1971
|
+
var e = t.charAt(n);
|
|
1972
|
+
if (n += 1, e == "=") return i = 0, -1;
|
|
1973
|
+
e.match(/^\s$/) || (r = r << 6 | o(e.charCodeAt(0)), i += 6);
|
|
1974
|
+
}
|
|
1975
|
+
var a = r >>> i - 8 & 255;
|
|
1976
|
+
return i -= 8, a;
|
|
1977
|
+
} }, o = function(e) {
|
|
1978
|
+
if (65 <= e && e <= 90) return e - 65;
|
|
1979
|
+
if (97 <= e && e <= 122) return e - 97 + 26;
|
|
1980
|
+
if (48 <= e && e <= 57) return e - 48 + 52;
|
|
1981
|
+
if (e == 43) return 62;
|
|
1982
|
+
if (e == 47) return 63;
|
|
1983
|
+
throw "c:" + e;
|
|
1984
|
+
};
|
|
1985
|
+
return a;
|
|
1986
|
+
}, v = function(e, t, n) {
|
|
1987
|
+
for (var r = function(e, t) {
|
|
1988
|
+
var n = e, r = t, i = Array(e * t), a = {
|
|
1989
|
+
setPixel: function(e, t, r) {
|
|
1990
|
+
i[t * n + e] = r;
|
|
1991
|
+
},
|
|
1992
|
+
write: function(e) {
|
|
1993
|
+
e.writeString("GIF87a"), e.writeShort(n), e.writeShort(r), e.writeByte(128), e.writeByte(0), e.writeByte(0), e.writeByte(0), e.writeByte(0), e.writeByte(0), e.writeByte(255), e.writeByte(255), e.writeByte(255), e.writeString(","), e.writeShort(0), e.writeShort(0), e.writeShort(n), e.writeShort(r), e.writeByte(0);
|
|
1994
|
+
var t = o(2);
|
|
1995
|
+
e.writeByte(2);
|
|
1996
|
+
for (var i = 0; t.length - i > 255;) e.writeByte(255), e.writeBytes(t, i, 255), i += 255;
|
|
1997
|
+
e.writeByte(t.length - i), e.writeBytes(t, i, t.length - i), e.writeByte(0), e.writeString(";");
|
|
1998
|
+
}
|
|
1999
|
+
}, o = function(e) {
|
|
2000
|
+
for (var t = 1 << e, n = 1 + (1 << e), r = e + 1, a = s(), o = 0; o < t; o += 1) a.add(String.fromCharCode(o));
|
|
2001
|
+
a.add(String.fromCharCode(t)), a.add(String.fromCharCode(n));
|
|
2002
|
+
var c, l, u, d = g(), f = (c = d, l = 0, u = 0, {
|
|
2003
|
+
write: function(e, t) {
|
|
2004
|
+
if (e >>> t) throw "length over";
|
|
2005
|
+
for (; l + t >= 8;) c.writeByte(255 & (e << l | u)), t -= 8 - l, e >>>= 8 - l, u = 0, l = 0;
|
|
2006
|
+
u |= e << l, l += t;
|
|
2007
|
+
},
|
|
2008
|
+
flush: function() {
|
|
2009
|
+
l > 0 && c.writeByte(u);
|
|
2010
|
+
}
|
|
2011
|
+
});
|
|
2012
|
+
f.write(t, r);
|
|
2013
|
+
var p = 0, m = String.fromCharCode(i[p]);
|
|
2014
|
+
for (p += 1; p < i.length;) {
|
|
2015
|
+
var h = String.fromCharCode(i[p]);
|
|
2016
|
+
p += 1, a.contains(m + h) ? m += h : (f.write(a.indexOf(m), r), a.size() < 4095 && (a.size() == 1 << r && (r += 1), a.add(m + h)), m = h);
|
|
2017
|
+
}
|
|
2018
|
+
return f.write(a.indexOf(m), r), f.write(n, r), f.flush(), d.toByteArray();
|
|
2019
|
+
}, s = function() {
|
|
2020
|
+
var e = {}, t = 0, n = {
|
|
2021
|
+
add: function(r) {
|
|
2022
|
+
if (n.contains(r)) throw "dup key:" + r;
|
|
2023
|
+
e[r] = t, t += 1;
|
|
2024
|
+
},
|
|
2025
|
+
size: function() {
|
|
2026
|
+
return t;
|
|
2027
|
+
},
|
|
2028
|
+
indexOf: function(t) {
|
|
2029
|
+
return e[t];
|
|
2030
|
+
},
|
|
2031
|
+
contains: function(t) {
|
|
2032
|
+
return e[t] !== void 0;
|
|
2033
|
+
}
|
|
2034
|
+
};
|
|
2035
|
+
return n;
|
|
2036
|
+
};
|
|
2037
|
+
return a;
|
|
2038
|
+
}(e, t), i = 0; i < t; i += 1) for (var a = 0; a < e; a += 1) r.setPixel(a, i, n(a, i));
|
|
2039
|
+
var o = g();
|
|
2040
|
+
r.write(o);
|
|
2041
|
+
for (var s = function() {
|
|
2042
|
+
var e = 0, t = 0, n = 0, r = "", i = {}, a = function(e) {
|
|
2043
|
+
r += String.fromCharCode(o(63 & e));
|
|
2044
|
+
}, o = function(e) {
|
|
2045
|
+
if (!(e < 0)) {
|
|
2046
|
+
if (e < 26) return 65 + e;
|
|
2047
|
+
if (e < 52) return e - 26 + 97;
|
|
2048
|
+
if (e < 62) return e - 52 + 48;
|
|
2049
|
+
if (e == 62) return 43;
|
|
2050
|
+
if (e == 63) return 47;
|
|
2051
|
+
}
|
|
2052
|
+
throw "n:" + e;
|
|
2053
|
+
};
|
|
2054
|
+
return i.writeByte = function(r) {
|
|
2055
|
+
for (e = e << 8 | 255 & r, t += 8, n += 1; t >= 6;) a(e >>> t - 6), t -= 6;
|
|
2056
|
+
}, i.flush = function() {
|
|
2057
|
+
if (t > 0 && (a(e << 6 - t), e = 0, t = 0), n % 3 != 0) for (var i = 3 - n % 3, o = 0; o < i; o += 1) r += "=";
|
|
2058
|
+
}, i.toString = function() {
|
|
2059
|
+
return r;
|
|
2060
|
+
}, i;
|
|
2061
|
+
}(), c = o.toByteArray(), l = 0; l < c.length; l += 1) s.writeByte(c[l]);
|
|
2062
|
+
return s.flush(), "data:image/gif;base64," + s;
|
|
2063
|
+
};
|
|
2064
|
+
return e;
|
|
2065
|
+
}();
|
|
2066
|
+
i.stringToBytesFuncs["UTF-8"] = function(e) {
|
|
2067
|
+
return function(e) {
|
|
2068
|
+
for (var t = [], n = 0; n < e.length; n++) {
|
|
2069
|
+
var r = e.charCodeAt(n);
|
|
2070
|
+
r < 128 ? t.push(r) : r < 2048 ? t.push(192 | r >> 6, 128 | 63 & r) : r < 55296 || r >= 57344 ? t.push(224 | r >> 12, 128 | r >> 6 & 63, 128 | 63 & r) : (n++, r = 65536 + ((1023 & r) << 10 | 1023 & e.charCodeAt(n)), t.push(240 | r >> 18, 128 | r >> 12 & 63, 128 | r >> 6 & 63, 128 | 63 & r));
|
|
2071
|
+
}
|
|
2072
|
+
return t;
|
|
2073
|
+
}(e);
|
|
2074
|
+
}, (r = typeof (n = function() {
|
|
2075
|
+
return i;
|
|
2076
|
+
}) == "function" ? n.apply(t, []) : n) === void 0 || (e.exports = r);
|
|
2077
|
+
},
|
|
2078
|
+
676: (e, t, n) => {
|
|
2079
|
+
n.d(t, { default: () => F });
|
|
2080
|
+
var r = function() {
|
|
2081
|
+
return r = Object.assign || function(e) {
|
|
2082
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
2083
|
+
return e;
|
|
2084
|
+
}, r.apply(this, arguments);
|
|
2085
|
+
}, i = function() {
|
|
2086
|
+
for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
|
|
2087
|
+
var r = Array(e), i = 0;
|
|
2088
|
+
for (t = 0; t < n; t++) for (var a = arguments[t], o = 0, s = a.length; o < s; o++, i++) r[i] = a[o];
|
|
2089
|
+
return r;
|
|
2090
|
+
}, a = function(e) {
|
|
2091
|
+
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
2092
|
+
};
|
|
2093
|
+
function o(e) {
|
|
2094
|
+
var t = [...arguments].slice(1);
|
|
2095
|
+
if (!t.length) return e;
|
|
2096
|
+
var n = t.shift();
|
|
2097
|
+
return n !== void 0 && a(e) && a(n) ? (e = r({}, e), Object.keys(n).forEach((function(t) {
|
|
2098
|
+
var r = e[t], i = n[t];
|
|
2099
|
+
Array.isArray(r) && Array.isArray(i) ? e[t] = i : a(r) && a(i) ? e[t] = o(Object.assign({}, r), i) : e[t] = i;
|
|
2100
|
+
})), o.apply(void 0, i([e], t))) : e;
|
|
2101
|
+
}
|
|
2102
|
+
function s(e, t) {
|
|
2103
|
+
var n = document.createElement("a");
|
|
2104
|
+
n.download = t, n.href = e, document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
2105
|
+
}
|
|
2106
|
+
var c = function(e, t, n, r) {
|
|
2107
|
+
return new (n ||= Promise)((function(i, a) {
|
|
2108
|
+
function o(e) {
|
|
2109
|
+
try {
|
|
2110
|
+
c(r.next(e));
|
|
2111
|
+
} catch (e) {
|
|
2112
|
+
a(e);
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
function s(e) {
|
|
2116
|
+
try {
|
|
2117
|
+
c(r.throw(e));
|
|
2118
|
+
} catch (e) {
|
|
2119
|
+
a(e);
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
function c(e) {
|
|
2123
|
+
var t;
|
|
2124
|
+
e.done ? i(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
|
|
2125
|
+
e(t);
|
|
2126
|
+
}))).then(o, s);
|
|
2127
|
+
}
|
|
2128
|
+
c((r = r.apply(e, t || [])).next());
|
|
2129
|
+
}));
|
|
2130
|
+
}, l = function(e, t) {
|
|
2131
|
+
var n, r, i, a, o = {
|
|
2132
|
+
label: 0,
|
|
2133
|
+
sent: function() {
|
|
2134
|
+
if (1 & i[0]) throw i[1];
|
|
2135
|
+
return i[1];
|
|
2136
|
+
},
|
|
2137
|
+
trys: [],
|
|
2138
|
+
ops: []
|
|
2139
|
+
};
|
|
2140
|
+
return a = {
|
|
2141
|
+
next: s(0),
|
|
2142
|
+
throw: s(1),
|
|
2143
|
+
return: s(2)
|
|
2144
|
+
}, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
2145
|
+
return this;
|
|
2146
|
+
}), a;
|
|
2147
|
+
function s(a) {
|
|
2148
|
+
return function(s) {
|
|
2149
|
+
return function(a) {
|
|
2150
|
+
if (n) throw TypeError("Generator is already executing.");
|
|
2151
|
+
for (; o;) try {
|
|
2152
|
+
if (n = 1, r && (i = 2 & a[0] ? r.return : a[0] ? r.throw || ((i = r.return) && i.call(r), 0) : r.next) && !(i = i.call(r, a[1])).done) return i;
|
|
2153
|
+
switch (r = 0, i && (a = [2 & a[0], i.value]), a[0]) {
|
|
2154
|
+
case 0:
|
|
2155
|
+
case 1:
|
|
2156
|
+
i = a;
|
|
2157
|
+
break;
|
|
2158
|
+
case 4: return o.label++, {
|
|
2159
|
+
value: a[1],
|
|
2160
|
+
done: !1
|
|
2161
|
+
};
|
|
2162
|
+
case 5:
|
|
2163
|
+
o.label++, r = a[1], a = [0];
|
|
2164
|
+
continue;
|
|
2165
|
+
case 7:
|
|
2166
|
+
a = o.ops.pop(), o.trys.pop();
|
|
2167
|
+
continue;
|
|
2168
|
+
default:
|
|
2169
|
+
if (!((i = (i = o.trys).length > 0 && i[i.length - 1]) || a[0] !== 6 && a[0] !== 2)) {
|
|
2170
|
+
o = 0;
|
|
2171
|
+
continue;
|
|
2172
|
+
}
|
|
2173
|
+
if (a[0] === 3 && (!i || a[1] > i[0] && a[1] < i[3])) {
|
|
2174
|
+
o.label = a[1];
|
|
2175
|
+
break;
|
|
2176
|
+
}
|
|
2177
|
+
if (a[0] === 6 && o.label < i[1]) {
|
|
2178
|
+
o.label = i[1], i = a;
|
|
2179
|
+
break;
|
|
2180
|
+
}
|
|
2181
|
+
if (i && o.label < i[2]) {
|
|
2182
|
+
o.label = i[2], o.ops.push(a);
|
|
2183
|
+
break;
|
|
2184
|
+
}
|
|
2185
|
+
i[2] && o.ops.pop(), o.trys.pop();
|
|
2186
|
+
continue;
|
|
2187
|
+
}
|
|
2188
|
+
a = t.call(e, o);
|
|
2189
|
+
} catch (e) {
|
|
2190
|
+
a = [6, e], r = 0;
|
|
2191
|
+
} finally {
|
|
2192
|
+
n = i = 0;
|
|
2193
|
+
}
|
|
2194
|
+
if (5 & a[0]) throw a[1];
|
|
2195
|
+
return {
|
|
2196
|
+
value: a[0] ? a[1] : void 0,
|
|
2197
|
+
done: !0
|
|
2198
|
+
};
|
|
2199
|
+
}([a, s]);
|
|
2200
|
+
};
|
|
2201
|
+
}
|
|
2202
|
+
};
|
|
2203
|
+
function u(e) {
|
|
2204
|
+
return c(this, void 0, void 0, (function() {
|
|
2205
|
+
return l(this, (function(t) {
|
|
2206
|
+
return [2, new Promise((function(t) {
|
|
2207
|
+
var n = new XMLHttpRequest();
|
|
2208
|
+
n.onload = function() {
|
|
2209
|
+
var e = new FileReader();
|
|
2210
|
+
e.onloadend = function() {
|
|
2211
|
+
t(e.result);
|
|
2212
|
+
}, e.readAsDataURL(n.response);
|
|
2213
|
+
}, n.open("GET", e), n.responseType = "blob", n.send();
|
|
2214
|
+
}))];
|
|
2215
|
+
}));
|
|
2216
|
+
}));
|
|
2217
|
+
}
|
|
2218
|
+
let d = {
|
|
2219
|
+
L: .07,
|
|
2220
|
+
M: .15,
|
|
2221
|
+
Q: .25,
|
|
2222
|
+
H: .3
|
|
2223
|
+
};
|
|
2224
|
+
var f = function() {
|
|
2225
|
+
return f = Object.assign || function(e) {
|
|
2226
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
2227
|
+
return e;
|
|
2228
|
+
}, f.apply(this, arguments);
|
|
2229
|
+
};
|
|
2230
|
+
let p = function() {
|
|
2231
|
+
function e(e) {
|
|
2232
|
+
var t = e.svg, n = e.type;
|
|
2233
|
+
this._svg = t, this._type = n;
|
|
2234
|
+
}
|
|
2235
|
+
return e.prototype.draw = function(e, t, n, r) {
|
|
2236
|
+
var i;
|
|
2237
|
+
switch (this._type) {
|
|
2238
|
+
case "dots":
|
|
2239
|
+
i = this._drawDot;
|
|
2240
|
+
break;
|
|
2241
|
+
case "classy":
|
|
2242
|
+
i = this._drawClassy;
|
|
2243
|
+
break;
|
|
2244
|
+
case "classy-rounded":
|
|
2245
|
+
i = this._drawClassyRounded;
|
|
2246
|
+
break;
|
|
2247
|
+
case "rounded":
|
|
2248
|
+
i = this._drawRounded;
|
|
2249
|
+
break;
|
|
2250
|
+
case "extra-rounded":
|
|
2251
|
+
i = this._drawExtraRounded;
|
|
2252
|
+
break;
|
|
2253
|
+
default: i = this._drawSquare;
|
|
2254
|
+
}
|
|
2255
|
+
i.call(this, {
|
|
2256
|
+
x: e,
|
|
2257
|
+
y: t,
|
|
2258
|
+
size: n,
|
|
2259
|
+
getNeighbor: r
|
|
2260
|
+
});
|
|
2261
|
+
}, e.prototype._rotateFigure = function(e) {
|
|
2262
|
+
var t, n = e.x, r = e.y, i = e.size, a = e.rotation, o = a === void 0 ? 0 : a, s = n + i / 2, c = r + i / 2;
|
|
2263
|
+
(0, e.draw)(), (t = this._element) == null || t.setAttribute("transform", "rotate(" + 180 * o / Math.PI + "," + s + "," + c + ")");
|
|
2264
|
+
}, e.prototype._basicDot = function(e) {
|
|
2265
|
+
var t = this, n = e.size, r = e.x, i = e.y;
|
|
2266
|
+
this._rotateFigure(f(f({}, e), { draw: function() {
|
|
2267
|
+
t._element = document.createElementNS("http://www.w3.org/2000/svg", "circle"), t._element.setAttribute("cx", String(r + n / 2)), t._element.setAttribute("cy", String(i + n / 2)), t._element.setAttribute("r", String(n / 2));
|
|
2268
|
+
} }));
|
|
2269
|
+
}, e.prototype._basicSquare = function(e) {
|
|
2270
|
+
var t = this, n = e.size, r = e.x, i = e.y;
|
|
2271
|
+
this._rotateFigure(f(f({}, e), { draw: function() {
|
|
2272
|
+
t._element = document.createElementNS("http://www.w3.org/2000/svg", "rect"), t._element.setAttribute("x", String(r)), t._element.setAttribute("y", String(i)), t._element.setAttribute("width", String(n)), t._element.setAttribute("height", String(n));
|
|
2273
|
+
} }));
|
|
2274
|
+
}, e.prototype._basicSideRounded = function(e) {
|
|
2275
|
+
var t = this, n = e.size, r = e.x, i = e.y;
|
|
2276
|
+
this._rotateFigure(f(f({}, e), { draw: function() {
|
|
2277
|
+
t._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), t._element.setAttribute("d", "M " + r + " " + i + "v " + n + "h " + n / 2 + "a " + n / 2 + " " + n / 2 + ", 0, 0, 0, 0 " + -n);
|
|
2278
|
+
} }));
|
|
2279
|
+
}, e.prototype._basicCornerRounded = function(e) {
|
|
2280
|
+
var t = this, n = e.size, r = e.x, i = e.y;
|
|
2281
|
+
this._rotateFigure(f(f({}, e), { draw: function() {
|
|
2282
|
+
t._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), t._element.setAttribute("d", "M " + r + " " + i + "v " + n + "h " + n + "v " + -n / 2 + "a " + n / 2 + " " + n / 2 + ", 0, 0, 0, " + -n / 2 + " " + -n / 2);
|
|
2283
|
+
} }));
|
|
2284
|
+
}, e.prototype._basicCornerExtraRounded = function(e) {
|
|
2285
|
+
var t = this, n = e.size, r = e.x, i = e.y;
|
|
2286
|
+
this._rotateFigure(f(f({}, e), { draw: function() {
|
|
2287
|
+
t._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), t._element.setAttribute("d", "M " + r + " " + i + "v " + n + "h " + n + "a " + n + " " + n + ", 0, 0, 0, " + -n + " " + -n);
|
|
2288
|
+
} }));
|
|
2289
|
+
}, e.prototype._basicCornersRounded = function(e) {
|
|
2290
|
+
var t = this, n = e.size, r = e.x, i = e.y;
|
|
2291
|
+
this._rotateFigure(f(f({}, e), { draw: function() {
|
|
2292
|
+
t._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), t._element.setAttribute("d", "M " + r + " " + i + "v " + n / 2 + "a " + n / 2 + " " + n / 2 + ", 0, 0, 0, " + n / 2 + " " + n / 2 + "h " + n / 2 + "v " + -n / 2 + "a " + n / 2 + " " + n / 2 + ", 0, 0, 0, " + -n / 2 + " " + -n / 2);
|
|
2293
|
+
} }));
|
|
2294
|
+
}, e.prototype._drawDot = function(e) {
|
|
2295
|
+
var t = e.x, n = e.y, r = e.size;
|
|
2296
|
+
this._basicDot({
|
|
2297
|
+
x: t,
|
|
2298
|
+
y: n,
|
|
2299
|
+
size: r,
|
|
2300
|
+
rotation: 0
|
|
2301
|
+
});
|
|
2302
|
+
}, e.prototype._drawSquare = function(e) {
|
|
2303
|
+
var t = e.x, n = e.y, r = e.size;
|
|
2304
|
+
this._basicSquare({
|
|
2305
|
+
x: t,
|
|
2306
|
+
y: n,
|
|
2307
|
+
size: r,
|
|
2308
|
+
rotation: 0
|
|
2309
|
+
});
|
|
2310
|
+
}, e.prototype._drawRounded = function(e) {
|
|
2311
|
+
var t = e.x, n = e.y, r = e.size, i = e.getNeighbor, a = i ? +i(-1, 0) : 0, o = i ? +i(1, 0) : 0, s = i ? +i(0, -1) : 0, c = i ? +i(0, 1) : 0, l = a + o + s + c;
|
|
2312
|
+
if (l !== 0) {
|
|
2313
|
+
if (l > 2 || a && o || s && c) this._basicSquare({
|
|
2314
|
+
x: t,
|
|
2315
|
+
y: n,
|
|
2316
|
+
size: r,
|
|
2317
|
+
rotation: 0
|
|
2318
|
+
});
|
|
2319
|
+
else {
|
|
2320
|
+
if (l === 2) {
|
|
2321
|
+
var u = 0;
|
|
2322
|
+
a && s ? u = Math.PI / 2 : s && o ? u = Math.PI : o && c && (u = -Math.PI / 2), this._basicCornerRounded({
|
|
2323
|
+
x: t,
|
|
2324
|
+
y: n,
|
|
2325
|
+
size: r,
|
|
2326
|
+
rotation: u
|
|
2327
|
+
});
|
|
2328
|
+
return;
|
|
2329
|
+
}
|
|
2330
|
+
if (l === 1) return u = 0, s ? u = Math.PI / 2 : o ? u = Math.PI : c && (u = -Math.PI / 2), void this._basicSideRounded({
|
|
2331
|
+
x: t,
|
|
2332
|
+
y: n,
|
|
2333
|
+
size: r,
|
|
2334
|
+
rotation: u
|
|
2335
|
+
});
|
|
2336
|
+
}
|
|
2337
|
+
} else this._basicDot({
|
|
2338
|
+
x: t,
|
|
2339
|
+
y: n,
|
|
2340
|
+
size: r,
|
|
2341
|
+
rotation: 0
|
|
2342
|
+
});
|
|
2343
|
+
}, e.prototype._drawExtraRounded = function(e) {
|
|
2344
|
+
var t = e.x, n = e.y, r = e.size, i = e.getNeighbor, a = i ? +i(-1, 0) : 0, o = i ? +i(1, 0) : 0, s = i ? +i(0, -1) : 0, c = i ? +i(0, 1) : 0, l = a + o + s + c;
|
|
2345
|
+
if (l !== 0) {
|
|
2346
|
+
if (l > 2 || a && o || s && c) this._basicSquare({
|
|
2347
|
+
x: t,
|
|
2348
|
+
y: n,
|
|
2349
|
+
size: r,
|
|
2350
|
+
rotation: 0
|
|
2351
|
+
});
|
|
2352
|
+
else {
|
|
2353
|
+
if (l === 2) {
|
|
2354
|
+
var u = 0;
|
|
2355
|
+
a && s ? u = Math.PI / 2 : s && o ? u = Math.PI : o && c && (u = -Math.PI / 2), this._basicCornerExtraRounded({
|
|
2356
|
+
x: t,
|
|
2357
|
+
y: n,
|
|
2358
|
+
size: r,
|
|
2359
|
+
rotation: u
|
|
2360
|
+
});
|
|
2361
|
+
return;
|
|
2362
|
+
}
|
|
2363
|
+
if (l === 1) return u = 0, s ? u = Math.PI / 2 : o ? u = Math.PI : c && (u = -Math.PI / 2), void this._basicSideRounded({
|
|
2364
|
+
x: t,
|
|
2365
|
+
y: n,
|
|
2366
|
+
size: r,
|
|
2367
|
+
rotation: u
|
|
2368
|
+
});
|
|
2369
|
+
}
|
|
2370
|
+
} else this._basicDot({
|
|
2371
|
+
x: t,
|
|
2372
|
+
y: n,
|
|
2373
|
+
size: r,
|
|
2374
|
+
rotation: 0
|
|
2375
|
+
});
|
|
2376
|
+
}, e.prototype._drawClassy = function(e) {
|
|
2377
|
+
var t = e.x, n = e.y, r = e.size, i = e.getNeighbor, a = i ? +i(-1, 0) : 0, o = i ? +i(1, 0) : 0, s = i ? +i(0, -1) : 0, c = i ? +i(0, 1) : 0;
|
|
2378
|
+
a + o + s + c === 0 ? this._basicCornersRounded({
|
|
2379
|
+
x: t,
|
|
2380
|
+
y: n,
|
|
2381
|
+
size: r,
|
|
2382
|
+
rotation: Math.PI / 2
|
|
2383
|
+
}) : a || s ? o || c ? this._basicSquare({
|
|
2384
|
+
x: t,
|
|
2385
|
+
y: n,
|
|
2386
|
+
size: r,
|
|
2387
|
+
rotation: 0
|
|
2388
|
+
}) : this._basicCornerRounded({
|
|
2389
|
+
x: t,
|
|
2390
|
+
y: n,
|
|
2391
|
+
size: r,
|
|
2392
|
+
rotation: Math.PI / 2
|
|
2393
|
+
}) : this._basicCornerRounded({
|
|
2394
|
+
x: t,
|
|
2395
|
+
y: n,
|
|
2396
|
+
size: r,
|
|
2397
|
+
rotation: -Math.PI / 2
|
|
2398
|
+
});
|
|
2399
|
+
}, e.prototype._drawClassyRounded = function(e) {
|
|
2400
|
+
var t = e.x, n = e.y, r = e.size, i = e.getNeighbor, a = i ? +i(-1, 0) : 0, o = i ? +i(1, 0) : 0, s = i ? +i(0, -1) : 0, c = i ? +i(0, 1) : 0;
|
|
2401
|
+
a + o + s + c === 0 ? this._basicCornersRounded({
|
|
2402
|
+
x: t,
|
|
2403
|
+
y: n,
|
|
2404
|
+
size: r,
|
|
2405
|
+
rotation: Math.PI / 2
|
|
2406
|
+
}) : a || s ? o || c ? this._basicSquare({
|
|
2407
|
+
x: t,
|
|
2408
|
+
y: n,
|
|
2409
|
+
size: r,
|
|
2410
|
+
rotation: 0
|
|
2411
|
+
}) : this._basicCornerExtraRounded({
|
|
2412
|
+
x: t,
|
|
2413
|
+
y: n,
|
|
2414
|
+
size: r,
|
|
2415
|
+
rotation: Math.PI / 2
|
|
2416
|
+
}) : this._basicCornerExtraRounded({
|
|
2417
|
+
x: t,
|
|
2418
|
+
y: n,
|
|
2419
|
+
size: r,
|
|
2420
|
+
rotation: -Math.PI / 2
|
|
2421
|
+
});
|
|
2422
|
+
}, e;
|
|
2423
|
+
}();
|
|
2424
|
+
var m = function() {
|
|
2425
|
+
return m = Object.assign || function(e) {
|
|
2426
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
2427
|
+
return e;
|
|
2428
|
+
}, m.apply(this, arguments);
|
|
2429
|
+
};
|
|
2430
|
+
let h = function() {
|
|
2431
|
+
function e(e) {
|
|
2432
|
+
var t = e.svg, n = e.type;
|
|
2433
|
+
this._svg = t, this._type = n;
|
|
2434
|
+
}
|
|
2435
|
+
return e.prototype.draw = function(e, t, n, r) {
|
|
2436
|
+
var i;
|
|
2437
|
+
switch (this._type) {
|
|
2438
|
+
case "square":
|
|
2439
|
+
i = this._drawSquare;
|
|
2440
|
+
break;
|
|
2441
|
+
case "extra-rounded":
|
|
2442
|
+
i = this._drawExtraRounded;
|
|
2443
|
+
break;
|
|
2444
|
+
default: i = this._drawDot;
|
|
2445
|
+
}
|
|
2446
|
+
i.call(this, {
|
|
2447
|
+
x: e,
|
|
2448
|
+
y: t,
|
|
2449
|
+
size: n,
|
|
2450
|
+
rotation: r
|
|
2451
|
+
});
|
|
2452
|
+
}, e.prototype._rotateFigure = function(e) {
|
|
2453
|
+
var t, n = e.x, r = e.y, i = e.size, a = e.rotation, o = a === void 0 ? 0 : a, s = n + i / 2, c = r + i / 2;
|
|
2454
|
+
(0, e.draw)(), (t = this._element) == null || t.setAttribute("transform", "rotate(" + 180 * o / Math.PI + "," + s + "," + c + ")");
|
|
2455
|
+
}, e.prototype._basicDot = function(e) {
|
|
2456
|
+
var t = this, n = e.size, r = e.x, i = e.y, a = n / 7;
|
|
2457
|
+
this._rotateFigure(m(m({}, e), { draw: function() {
|
|
2458
|
+
t._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), t._element.setAttribute("clip-rule", "evenodd"), t._element.setAttribute("d", "M " + (r + n / 2) + " " + i + "a " + n / 2 + " " + n / 2 + " 0 1 0 0.1 0zm 0 " + a + "a " + (n / 2 - a) + " " + (n / 2 - a) + " 0 1 1 -0.1 0Z");
|
|
2459
|
+
} }));
|
|
2460
|
+
}, e.prototype._basicSquare = function(e) {
|
|
2461
|
+
var t = this, n = e.size, r = e.x, i = e.y, a = n / 7;
|
|
2462
|
+
this._rotateFigure(m(m({}, e), { draw: function() {
|
|
2463
|
+
t._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), t._element.setAttribute("clip-rule", "evenodd"), t._element.setAttribute("d", "M " + r + " " + i + "v " + n + "h " + n + "v " + -n + "zM " + (r + a) + " " + (i + a) + "h " + (n - 2 * a) + "v " + (n - 2 * a) + "h " + (2 * a - n) + "z");
|
|
2464
|
+
} }));
|
|
2465
|
+
}, e.prototype._basicExtraRounded = function(e) {
|
|
2466
|
+
var t = this, n = e.size, r = e.x, i = e.y, a = n / 7;
|
|
2467
|
+
this._rotateFigure(m(m({}, e), { draw: function() {
|
|
2468
|
+
t._element = document.createElementNS("http://www.w3.org/2000/svg", "path"), t._element.setAttribute("clip-rule", "evenodd"), t._element.setAttribute("d", "M " + r + " " + (i + 2.5 * a) + "v " + 2 * a + "a " + 2.5 * a + " " + 2.5 * a + ", 0, 0, 0, " + 2.5 * a + " " + 2.5 * a + "h " + 2 * a + "a " + 2.5 * a + " " + 2.5 * a + ", 0, 0, 0, " + 2.5 * a + " " + 2.5 * -a + "v " + -2 * a + "a " + 2.5 * a + " " + 2.5 * a + ", 0, 0, 0, " + 2.5 * -a + " " + 2.5 * -a + "h " + -2 * a + "a " + 2.5 * a + " " + 2.5 * a + ", 0, 0, 0, " + 2.5 * -a + " " + 2.5 * a + "M " + (r + 2.5 * a) + " " + (i + a) + "h " + 2 * a + "a " + 1.5 * a + " " + 1.5 * a + ", 0, 0, 1, " + 1.5 * a + " " + 1.5 * a + "v " + 2 * a + "a " + 1.5 * a + " " + 1.5 * a + ", 0, 0, 1, " + 1.5 * -a + " " + 1.5 * a + "h " + -2 * a + "a " + 1.5 * a + " " + 1.5 * a + ", 0, 0, 1, " + 1.5 * -a + " " + 1.5 * -a + "v " + -2 * a + "a " + 1.5 * a + " " + 1.5 * a + ", 0, 0, 1, " + 1.5 * a + " " + 1.5 * -a);
|
|
2469
|
+
} }));
|
|
2470
|
+
}, e.prototype._drawDot = function(e) {
|
|
2471
|
+
var t = e.x, n = e.y, r = e.size, i = e.rotation;
|
|
2472
|
+
this._basicDot({
|
|
2473
|
+
x: t,
|
|
2474
|
+
y: n,
|
|
2475
|
+
size: r,
|
|
2476
|
+
rotation: i
|
|
2477
|
+
});
|
|
2478
|
+
}, e.prototype._drawSquare = function(e) {
|
|
2479
|
+
var t = e.x, n = e.y, r = e.size, i = e.rotation;
|
|
2480
|
+
this._basicSquare({
|
|
2481
|
+
x: t,
|
|
2482
|
+
y: n,
|
|
2483
|
+
size: r,
|
|
2484
|
+
rotation: i
|
|
2485
|
+
});
|
|
2486
|
+
}, e.prototype._drawExtraRounded = function(e) {
|
|
2487
|
+
var t = e.x, n = e.y, r = e.size, i = e.rotation;
|
|
2488
|
+
this._basicExtraRounded({
|
|
2489
|
+
x: t,
|
|
2490
|
+
y: n,
|
|
2491
|
+
size: r,
|
|
2492
|
+
rotation: i
|
|
2493
|
+
});
|
|
2494
|
+
}, e;
|
|
2495
|
+
}();
|
|
2496
|
+
var g = function() {
|
|
2497
|
+
return g = Object.assign || function(e) {
|
|
2498
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
2499
|
+
return e;
|
|
2500
|
+
}, g.apply(this, arguments);
|
|
2501
|
+
};
|
|
2502
|
+
let _ = function() {
|
|
2503
|
+
function e(e) {
|
|
2504
|
+
var t = e.svg, n = e.type;
|
|
2505
|
+
this._svg = t, this._type = n;
|
|
2506
|
+
}
|
|
2507
|
+
return e.prototype.draw = function(e, t, n, r) {
|
|
2508
|
+
(this._type === "square" ? this._drawSquare : this._drawDot).call(this, {
|
|
2509
|
+
x: e,
|
|
2510
|
+
y: t,
|
|
2511
|
+
size: n,
|
|
2512
|
+
rotation: r
|
|
2513
|
+
});
|
|
2514
|
+
}, e.prototype._rotateFigure = function(e) {
|
|
2515
|
+
var t, n = e.x, r = e.y, i = e.size, a = e.rotation, o = a === void 0 ? 0 : a, s = n + i / 2, c = r + i / 2;
|
|
2516
|
+
(0, e.draw)(), (t = this._element) == null || t.setAttribute("transform", "rotate(" + 180 * o / Math.PI + "," + s + "," + c + ")");
|
|
2517
|
+
}, e.prototype._basicDot = function(e) {
|
|
2518
|
+
var t = this, n = e.size, r = e.x, i = e.y;
|
|
2519
|
+
this._rotateFigure(g(g({}, e), { draw: function() {
|
|
2520
|
+
t._element = document.createElementNS("http://www.w3.org/2000/svg", "circle"), t._element.setAttribute("cx", String(r + n / 2)), t._element.setAttribute("cy", String(i + n / 2)), t._element.setAttribute("r", String(n / 2));
|
|
2521
|
+
} }));
|
|
2522
|
+
}, e.prototype._basicSquare = function(e) {
|
|
2523
|
+
var t = this, n = e.size, r = e.x, i = e.y;
|
|
2524
|
+
this._rotateFigure(g(g({}, e), { draw: function() {
|
|
2525
|
+
t._element = document.createElementNS("http://www.w3.org/2000/svg", "rect"), t._element.setAttribute("x", String(r)), t._element.setAttribute("y", String(i)), t._element.setAttribute("width", String(n)), t._element.setAttribute("height", String(n));
|
|
2526
|
+
} }));
|
|
2527
|
+
}, e.prototype._drawDot = function(e) {
|
|
2528
|
+
var t = e.x, n = e.y, r = e.size, i = e.rotation;
|
|
2529
|
+
this._basicDot({
|
|
2530
|
+
x: t,
|
|
2531
|
+
y: n,
|
|
2532
|
+
size: r,
|
|
2533
|
+
rotation: i
|
|
2534
|
+
});
|
|
2535
|
+
}, e.prototype._drawSquare = function(e) {
|
|
2536
|
+
var t = e.x, n = e.y, r = e.size, i = e.rotation;
|
|
2537
|
+
this._basicSquare({
|
|
2538
|
+
x: t,
|
|
2539
|
+
y: n,
|
|
2540
|
+
size: r,
|
|
2541
|
+
rotation: i
|
|
2542
|
+
});
|
|
2543
|
+
}, e;
|
|
2544
|
+
}(), v = "circle";
|
|
2545
|
+
var y = function(e, t, n, r) {
|
|
2546
|
+
return new (n ||= Promise)((function(i, a) {
|
|
2547
|
+
function o(e) {
|
|
2548
|
+
try {
|
|
2549
|
+
c(r.next(e));
|
|
2550
|
+
} catch (e) {
|
|
2551
|
+
a(e);
|
|
2552
|
+
}
|
|
2553
|
+
}
|
|
2554
|
+
function s(e) {
|
|
2555
|
+
try {
|
|
2556
|
+
c(r.throw(e));
|
|
2557
|
+
} catch (e) {
|
|
2558
|
+
a(e);
|
|
2559
|
+
}
|
|
2560
|
+
}
|
|
2561
|
+
function c(e) {
|
|
2562
|
+
var t;
|
|
2563
|
+
e.done ? i(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
|
|
2564
|
+
e(t);
|
|
2565
|
+
}))).then(o, s);
|
|
2566
|
+
}
|
|
2567
|
+
c((r = r.apply(e, t || [])).next());
|
|
2568
|
+
}));
|
|
2569
|
+
}, b = function(e, t) {
|
|
2570
|
+
var n, r, i, a, o = {
|
|
2571
|
+
label: 0,
|
|
2572
|
+
sent: function() {
|
|
2573
|
+
if (1 & i[0]) throw i[1];
|
|
2574
|
+
return i[1];
|
|
2575
|
+
},
|
|
2576
|
+
trys: [],
|
|
2577
|
+
ops: []
|
|
2578
|
+
};
|
|
2579
|
+
return a = {
|
|
2580
|
+
next: s(0),
|
|
2581
|
+
throw: s(1),
|
|
2582
|
+
return: s(2)
|
|
2583
|
+
}, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
2584
|
+
return this;
|
|
2585
|
+
}), a;
|
|
2586
|
+
function s(a) {
|
|
2587
|
+
return function(s) {
|
|
2588
|
+
return function(a) {
|
|
2589
|
+
if (n) throw TypeError("Generator is already executing.");
|
|
2590
|
+
for (; o;) try {
|
|
2591
|
+
if (n = 1, r && (i = 2 & a[0] ? r.return : a[0] ? r.throw || ((i = r.return) && i.call(r), 0) : r.next) && !(i = i.call(r, a[1])).done) return i;
|
|
2592
|
+
switch (r = 0, i && (a = [2 & a[0], i.value]), a[0]) {
|
|
2593
|
+
case 0:
|
|
2594
|
+
case 1:
|
|
2595
|
+
i = a;
|
|
2596
|
+
break;
|
|
2597
|
+
case 4: return o.label++, {
|
|
2598
|
+
value: a[1],
|
|
2599
|
+
done: !1
|
|
2600
|
+
};
|
|
2601
|
+
case 5:
|
|
2602
|
+
o.label++, r = a[1], a = [0];
|
|
2603
|
+
continue;
|
|
2604
|
+
case 7:
|
|
2605
|
+
a = o.ops.pop(), o.trys.pop();
|
|
2606
|
+
continue;
|
|
2607
|
+
default:
|
|
2608
|
+
if (!((i = (i = o.trys).length > 0 && i[i.length - 1]) || a[0] !== 6 && a[0] !== 2)) {
|
|
2609
|
+
o = 0;
|
|
2610
|
+
continue;
|
|
2611
|
+
}
|
|
2612
|
+
if (a[0] === 3 && (!i || a[1] > i[0] && a[1] < i[3])) {
|
|
2613
|
+
o.label = a[1];
|
|
2614
|
+
break;
|
|
2615
|
+
}
|
|
2616
|
+
if (a[0] === 6 && o.label < i[1]) {
|
|
2617
|
+
o.label = i[1], i = a;
|
|
2618
|
+
break;
|
|
2619
|
+
}
|
|
2620
|
+
if (i && o.label < i[2]) {
|
|
2621
|
+
o.label = i[2], o.ops.push(a);
|
|
2622
|
+
break;
|
|
2623
|
+
}
|
|
2624
|
+
i[2] && o.ops.pop(), o.trys.pop();
|
|
2625
|
+
continue;
|
|
2626
|
+
}
|
|
2627
|
+
a = t.call(e, o);
|
|
2628
|
+
} catch (e) {
|
|
2629
|
+
a = [6, e], r = 0;
|
|
2630
|
+
} finally {
|
|
2631
|
+
n = i = 0;
|
|
2632
|
+
}
|
|
2633
|
+
if (5 & a[0]) throw a[1];
|
|
2634
|
+
return {
|
|
2635
|
+
value: a[0] ? a[1] : void 0,
|
|
2636
|
+
done: !0
|
|
2637
|
+
};
|
|
2638
|
+
}([a, s]);
|
|
2639
|
+
};
|
|
2640
|
+
}
|
|
2641
|
+
}, x = [
|
|
2642
|
+
[
|
|
2643
|
+
1,
|
|
2644
|
+
1,
|
|
2645
|
+
1,
|
|
2646
|
+
1,
|
|
2647
|
+
1,
|
|
2648
|
+
1,
|
|
2649
|
+
1
|
|
2650
|
+
],
|
|
2651
|
+
[
|
|
2652
|
+
1,
|
|
2653
|
+
0,
|
|
2654
|
+
0,
|
|
2655
|
+
0,
|
|
2656
|
+
0,
|
|
2657
|
+
0,
|
|
2658
|
+
1
|
|
2659
|
+
],
|
|
2660
|
+
[
|
|
2661
|
+
1,
|
|
2662
|
+
0,
|
|
2663
|
+
0,
|
|
2664
|
+
0,
|
|
2665
|
+
0,
|
|
2666
|
+
0,
|
|
2667
|
+
1
|
|
2668
|
+
],
|
|
2669
|
+
[
|
|
2670
|
+
1,
|
|
2671
|
+
0,
|
|
2672
|
+
0,
|
|
2673
|
+
0,
|
|
2674
|
+
0,
|
|
2675
|
+
0,
|
|
2676
|
+
1
|
|
2677
|
+
],
|
|
2678
|
+
[
|
|
2679
|
+
1,
|
|
2680
|
+
0,
|
|
2681
|
+
0,
|
|
2682
|
+
0,
|
|
2683
|
+
0,
|
|
2684
|
+
0,
|
|
2685
|
+
1
|
|
2686
|
+
],
|
|
2687
|
+
[
|
|
2688
|
+
1,
|
|
2689
|
+
0,
|
|
2690
|
+
0,
|
|
2691
|
+
0,
|
|
2692
|
+
0,
|
|
2693
|
+
0,
|
|
2694
|
+
1
|
|
2695
|
+
],
|
|
2696
|
+
[
|
|
2697
|
+
1,
|
|
2698
|
+
1,
|
|
2699
|
+
1,
|
|
2700
|
+
1,
|
|
2701
|
+
1,
|
|
2702
|
+
1,
|
|
2703
|
+
1
|
|
2704
|
+
]
|
|
2705
|
+
], S = [
|
|
2706
|
+
[
|
|
2707
|
+
0,
|
|
2708
|
+
0,
|
|
2709
|
+
0,
|
|
2710
|
+
0,
|
|
2711
|
+
0,
|
|
2712
|
+
0,
|
|
2713
|
+
0
|
|
2714
|
+
],
|
|
2715
|
+
[
|
|
2716
|
+
0,
|
|
2717
|
+
0,
|
|
2718
|
+
0,
|
|
2719
|
+
0,
|
|
2720
|
+
0,
|
|
2721
|
+
0,
|
|
2722
|
+
0
|
|
2723
|
+
],
|
|
2724
|
+
[
|
|
2725
|
+
0,
|
|
2726
|
+
0,
|
|
2727
|
+
1,
|
|
2728
|
+
1,
|
|
2729
|
+
1,
|
|
2730
|
+
0,
|
|
2731
|
+
0
|
|
2732
|
+
],
|
|
2733
|
+
[
|
|
2734
|
+
0,
|
|
2735
|
+
0,
|
|
2736
|
+
1,
|
|
2737
|
+
1,
|
|
2738
|
+
1,
|
|
2739
|
+
0,
|
|
2740
|
+
0
|
|
2741
|
+
],
|
|
2742
|
+
[
|
|
2743
|
+
0,
|
|
2744
|
+
0,
|
|
2745
|
+
1,
|
|
2746
|
+
1,
|
|
2747
|
+
1,
|
|
2748
|
+
0,
|
|
2749
|
+
0
|
|
2750
|
+
],
|
|
2751
|
+
[
|
|
2752
|
+
0,
|
|
2753
|
+
0,
|
|
2754
|
+
0,
|
|
2755
|
+
0,
|
|
2756
|
+
0,
|
|
2757
|
+
0,
|
|
2758
|
+
0
|
|
2759
|
+
],
|
|
2760
|
+
[
|
|
2761
|
+
0,
|
|
2762
|
+
0,
|
|
2763
|
+
0,
|
|
2764
|
+
0,
|
|
2765
|
+
0,
|
|
2766
|
+
0,
|
|
2767
|
+
0
|
|
2768
|
+
]
|
|
2769
|
+
];
|
|
2770
|
+
let C = function() {
|
|
2771
|
+
function e(t) {
|
|
2772
|
+
this._element = document.createElementNS("http://www.w3.org/2000/svg", "svg"), this._element.setAttribute("width", String(t.width)), this._element.setAttribute("height", String(t.height)), this._defs = document.createElementNS("http://www.w3.org/2000/svg", "defs"), this._element.appendChild(this._defs), this._instanceId = e.instanceCount++, this._options = t;
|
|
2773
|
+
}
|
|
2774
|
+
return Object.defineProperty(e.prototype, "width", {
|
|
2775
|
+
get: function() {
|
|
2776
|
+
return this._options.width;
|
|
2777
|
+
},
|
|
2778
|
+
enumerable: !1,
|
|
2779
|
+
configurable: !0
|
|
2780
|
+
}), Object.defineProperty(e.prototype, "height", {
|
|
2781
|
+
get: function() {
|
|
2782
|
+
return this._options.height;
|
|
2783
|
+
},
|
|
2784
|
+
enumerable: !1,
|
|
2785
|
+
configurable: !0
|
|
2786
|
+
}), e.prototype.getElement = function() {
|
|
2787
|
+
return this._element;
|
|
2788
|
+
}, e.prototype.drawQR = function(e) {
|
|
2789
|
+
return y(this, void 0, void 0, (function() {
|
|
2790
|
+
var t, n, r, i, a, o, s, c, l, u, f = this;
|
|
2791
|
+
return b(this, (function(p) {
|
|
2792
|
+
switch (p.label) {
|
|
2793
|
+
case 0: return t = e.getModuleCount(), n = Math.min(this._options.width, this._options.height) - 2 * this._options.margin, r = this._options.shape === v ? n / Math.sqrt(2) : n, i = r / t, a = {
|
|
2794
|
+
hideXDots: 0,
|
|
2795
|
+
hideYDots: 0,
|
|
2796
|
+
width: 0,
|
|
2797
|
+
height: 0
|
|
2798
|
+
}, this._qr = e, this._options.image ? [4, this.loadImage()] : [3, 2];
|
|
2799
|
+
case 1:
|
|
2800
|
+
if (p.sent(), !this._image) return [2];
|
|
2801
|
+
o = this._options, s = o.imageOptions, c = o.qrOptions, l = s.imageSize * d[c.errorCorrectionLevel], u = Math.floor(l * t * t), a = function(e) {
|
|
2802
|
+
var t = e.originalHeight, n = e.originalWidth, r = e.maxHiddenDots, i = e.maxHiddenAxisDots, a = e.dotSize, o = {
|
|
2803
|
+
x: 0,
|
|
2804
|
+
y: 0
|
|
2805
|
+
}, s = {
|
|
2806
|
+
x: 0,
|
|
2807
|
+
y: 0
|
|
2808
|
+
};
|
|
2809
|
+
if (t <= 0 || n <= 0 || r <= 0 || a <= 0) return {
|
|
2810
|
+
height: 0,
|
|
2811
|
+
width: 0,
|
|
2812
|
+
hideYDots: 0,
|
|
2813
|
+
hideXDots: 0
|
|
2814
|
+
};
|
|
2815
|
+
var c = t / n;
|
|
2816
|
+
return o.x = Math.floor(Math.sqrt(r / c)), o.x <= 0 && (o.x = 1), i && i < o.x && (o.x = i), o.x % 2 == 0 && o.x--, s.x = o.x * a, o.y = 1 + 2 * Math.ceil((o.x * c - 1) / 2), s.y = Math.round(s.x * c), (o.y * o.x > r || i && i < o.y) && (i && i < o.y ? (o.y = i, o.y % 2 == 0 && o.x--) : o.y -= 2, s.y = o.y * a, o.x = 1 + 2 * Math.ceil((o.y / c - 1) / 2), s.x = Math.round(s.y / c)), {
|
|
2817
|
+
height: s.y,
|
|
2818
|
+
width: s.x,
|
|
2819
|
+
hideYDots: o.y,
|
|
2820
|
+
hideXDots: o.x
|
|
2821
|
+
};
|
|
2822
|
+
}({
|
|
2823
|
+
originalWidth: this._image.width,
|
|
2824
|
+
originalHeight: this._image.height,
|
|
2825
|
+
maxHiddenDots: u,
|
|
2826
|
+
maxHiddenAxisDots: t - 14,
|
|
2827
|
+
dotSize: i
|
|
2828
|
+
}), p.label = 2;
|
|
2829
|
+
case 2: return this.drawBackground(), this.drawDots((function(e, n) {
|
|
2830
|
+
return !(f._options.imageOptions.hideBackgroundDots && e >= (t - a.hideXDots) / 2 && e < (t + a.hideXDots) / 2 && n >= (t - a.hideYDots) / 2 && n < (t + a.hideYDots) / 2 || x[e]?.[n] || x[e - t + 7]?.[n] || x[e]?.[n - t + 7] || S[e]?.[n] || S[e - t + 7]?.[n] || S[e]?.[n - t + 7]);
|
|
2831
|
+
})), this.drawCorners(), this._options.image ? [4, this.drawImage({
|
|
2832
|
+
width: a.width,
|
|
2833
|
+
height: a.height,
|
|
2834
|
+
count: t,
|
|
2835
|
+
dotSize: i
|
|
2836
|
+
})] : [3, 4];
|
|
2837
|
+
case 3: p.sent(), p.label = 4;
|
|
2838
|
+
case 4: return [2];
|
|
2839
|
+
}
|
|
2840
|
+
}));
|
|
2841
|
+
}));
|
|
2842
|
+
}, e.prototype.drawBackground = function() {
|
|
2843
|
+
var e = this._element, t = this._options;
|
|
2844
|
+
if (e) {
|
|
2845
|
+
var n = t.backgroundOptions?.gradient, r = t.backgroundOptions?.color;
|
|
2846
|
+
if ((n || r) && this._createColor({
|
|
2847
|
+
options: n,
|
|
2848
|
+
color: r,
|
|
2849
|
+
additionalRotation: 0,
|
|
2850
|
+
x: 0,
|
|
2851
|
+
y: 0,
|
|
2852
|
+
height: t.height,
|
|
2853
|
+
width: t.width,
|
|
2854
|
+
name: "background-color"
|
|
2855
|
+
}), t.backgroundOptions?.round) {
|
|
2856
|
+
var i = Math.min(t.width, t.height), a = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2857
|
+
this._backgroundClipPath = document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._backgroundClipPath.setAttribute("id", "clip-path-background-color"), this._defs.appendChild(this._backgroundClipPath), a.setAttribute("x", String((t.width - i) / 2)), a.setAttribute("y", String((t.height - i) / 2)), a.setAttribute("width", String(i)), a.setAttribute("height", String(i)), a.setAttribute("rx", String(i / 2 * t.backgroundOptions.round)), this._backgroundClipPath.appendChild(a);
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
}, e.prototype.drawDots = function(e) {
|
|
2861
|
+
var t = this;
|
|
2862
|
+
if (!this._qr) throw "QR code is not defined";
|
|
2863
|
+
var n = this._options, r = this._qr.getModuleCount();
|
|
2864
|
+
if (r > n.width || r > n.height) throw "The canvas is too small.";
|
|
2865
|
+
var i = Math.min(n.width, n.height) - 2 * n.margin, a = (n.shape === v ? i / Math.sqrt(2) : i) / r, o = (n.width - r * a) / 2, s = (n.height - r * a) / 2, c = new p({
|
|
2866
|
+
svg: this._element,
|
|
2867
|
+
type: n.dotsOptions.type
|
|
2868
|
+
});
|
|
2869
|
+
this._dotsClipPath = document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._dotsClipPath.setAttribute("id", "clip-path-dot-color-" + this._instanceId), this._defs.appendChild(this._dotsClipPath), this._createColor({
|
|
2870
|
+
options: n.dotsOptions?.gradient,
|
|
2871
|
+
color: n.dotsOptions.color,
|
|
2872
|
+
additionalRotation: 0,
|
|
2873
|
+
x: 0,
|
|
2874
|
+
y: 0,
|
|
2875
|
+
height: n.height,
|
|
2876
|
+
width: n.width,
|
|
2877
|
+
name: "dot-color-" + this._instanceId
|
|
2878
|
+
});
|
|
2879
|
+
for (var l = function(n) {
|
|
2880
|
+
for (var i = function(i) {
|
|
2881
|
+
return e && !e(n, i) ? "continue" : u._qr?.isDark(n, i) ? (c.draw(o + n * a, s + i * a, a, (function(a, o) {
|
|
2882
|
+
return !(n + a < 0 || i + o < 0 || n + a >= r || i + o >= r) && !(e && !e(n + a, i + o)) && !!t._qr && t._qr.isDark(n + a, i + o);
|
|
2883
|
+
})), void (c._element && u._dotsClipPath && u._dotsClipPath.appendChild(c._element))) : "continue";
|
|
2884
|
+
}, l = 0; l < r; l++) i(l);
|
|
2885
|
+
}, u = this, d = 0; d < r; d++) l(d);
|
|
2886
|
+
if (n.shape === v) {
|
|
2887
|
+
var f = Math.floor((i / a - r) / 2), m = r + 2 * f, h = o - f * a, g = s - f * a, _ = [], y = Math.floor(m / 2);
|
|
2888
|
+
for (d = 0; d < m; d++) {
|
|
2889
|
+
_[d] = [];
|
|
2890
|
+
for (var b = 0; b < m; b++) d >= f - 1 && d <= m - f && b >= f - 1 && b <= m - f || Math.sqrt((d - y) * (d - y) + (b - y) * (b - y)) > y ? _[d][b] = 0 : _[d][b] = +!!this._qr.isDark(b - 2 * f < 0 ? b : b >= r ? b - 2 * f : b - f, d - 2 * f < 0 ? d : d >= r ? d - 2 * f : d - f);
|
|
2891
|
+
}
|
|
2892
|
+
var x = function(e) {
|
|
2893
|
+
for (var t = function(t) {
|
|
2894
|
+
if (!_[e][t]) return "continue";
|
|
2895
|
+
c.draw(h + e * a, g + t * a, a, (function(n, r) {
|
|
2896
|
+
return !!_[e + n]?.[t + r];
|
|
2897
|
+
})), c._element && S._dotsClipPath && S._dotsClipPath.appendChild(c._element);
|
|
2898
|
+
}, n = 0; n < m; n++) t(n);
|
|
2899
|
+
}, S = this;
|
|
2900
|
+
for (d = 0; d < m; d++) x(d);
|
|
2901
|
+
}
|
|
2902
|
+
}, e.prototype.drawCorners = function() {
|
|
2903
|
+
var e = this;
|
|
2904
|
+
if (!this._qr) throw "QR code is not defined";
|
|
2905
|
+
var t = this._element, n = this._options;
|
|
2906
|
+
if (!t) throw "Element code is not defined";
|
|
2907
|
+
var r = this._qr.getModuleCount(), i = Math.min(n.width, n.height) - 2 * n.margin, a = (n.shape === v ? i / Math.sqrt(2) : i) / r, o = 7 * a, s = 3 * a, c = (n.width - r * a) / 2, l = (n.height - r * a) / 2;
|
|
2908
|
+
[
|
|
2909
|
+
[
|
|
2910
|
+
0,
|
|
2911
|
+
0,
|
|
2912
|
+
0
|
|
2913
|
+
],
|
|
2914
|
+
[
|
|
2915
|
+
1,
|
|
2916
|
+
0,
|
|
2917
|
+
Math.PI / 2
|
|
2918
|
+
],
|
|
2919
|
+
[
|
|
2920
|
+
0,
|
|
2921
|
+
1,
|
|
2922
|
+
-Math.PI / 2
|
|
2923
|
+
]
|
|
2924
|
+
].forEach((function(t) {
|
|
2925
|
+
var i, u, d, f, m = t[0], g = t[1], v = t[2], y = c + m * a * (r - 7), b = l + g * a * (r - 7), C = e._dotsClipPath, w = e._dotsClipPath;
|
|
2926
|
+
if (((i = n.cornersSquareOptions) != null && i.gradient || (u = n.cornersSquareOptions) != null && u.color) && ((C = document.createElementNS("http://www.w3.org/2000/svg", "clipPath")).setAttribute("id", "clip-path-corners-square-color-" + m + "-" + g), e._defs.appendChild(C), e._cornersSquareClipPath = e._cornersDotClipPath = w = C, e._createColor({
|
|
2927
|
+
options: n.cornersSquareOptions?.gradient,
|
|
2928
|
+
color: n.cornersSquareOptions?.color,
|
|
2929
|
+
additionalRotation: v,
|
|
2930
|
+
x: y,
|
|
2931
|
+
y: b,
|
|
2932
|
+
height: o,
|
|
2933
|
+
width: o,
|
|
2934
|
+
name: "corners-square-color-" + m + "-" + g
|
|
2935
|
+
})), n.cornersSquareOptions?.type) {
|
|
2936
|
+
var T = new h({
|
|
2937
|
+
svg: e._element,
|
|
2938
|
+
type: n.cornersSquareOptions.type
|
|
2939
|
+
});
|
|
2940
|
+
T.draw(y, b, o, v), T._element && C && C.appendChild(T._element);
|
|
2941
|
+
} else for (var E = new p({
|
|
2942
|
+
svg: e._element,
|
|
2943
|
+
type: n.dotsOptions.type
|
|
2944
|
+
}), D = function(e) {
|
|
2945
|
+
for (var t = function(t) {
|
|
2946
|
+
if (!x[e]?.[t]) return "continue";
|
|
2947
|
+
E.draw(y + e * a, b + t * a, a, (function(n, r) {
|
|
2948
|
+
return !!x[e + n]?.[t + r];
|
|
2949
|
+
})), E._element && C && C.appendChild(E._element);
|
|
2950
|
+
}, n = 0; n < x[e].length; n++) t(n);
|
|
2951
|
+
}, O = 0; O < x.length; O++) D(O);
|
|
2952
|
+
if (((d = n.cornersDotOptions) != null && d.gradient || (f = n.cornersDotOptions) != null && f.color) && ((w = document.createElementNS("http://www.w3.org/2000/svg", "clipPath")).setAttribute("id", "clip-path-corners-dot-color-" + m + "-" + g), e._defs.appendChild(w), e._cornersDotClipPath = w, e._createColor({
|
|
2953
|
+
options: n.cornersDotOptions?.gradient,
|
|
2954
|
+
color: n.cornersDotOptions?.color,
|
|
2955
|
+
additionalRotation: v,
|
|
2956
|
+
x: y + 2 * a,
|
|
2957
|
+
y: b + 2 * a,
|
|
2958
|
+
height: s,
|
|
2959
|
+
width: s,
|
|
2960
|
+
name: "corners-dot-color-" + m + "-" + g
|
|
2961
|
+
})), n.cornersDotOptions?.type) {
|
|
2962
|
+
var k = new _({
|
|
2963
|
+
svg: e._element,
|
|
2964
|
+
type: n.cornersDotOptions.type
|
|
2965
|
+
});
|
|
2966
|
+
k.draw(y + 2 * a, b + 2 * a, s, v), k._element && w && w.appendChild(k._element);
|
|
2967
|
+
} else {
|
|
2968
|
+
E = new p({
|
|
2969
|
+
svg: e._element,
|
|
2970
|
+
type: n.dotsOptions.type
|
|
2971
|
+
});
|
|
2972
|
+
var A = function(e) {
|
|
2973
|
+
for (var t = function(t) {
|
|
2974
|
+
if (!S[e]?.[t]) return "continue";
|
|
2975
|
+
E.draw(y + e * a, b + t * a, a, (function(n, r) {
|
|
2976
|
+
return !!S[e + n]?.[t + r];
|
|
2977
|
+
})), E._element && w && w.appendChild(E._element);
|
|
2978
|
+
}, n = 0; n < S[e].length; n++) t(n);
|
|
2979
|
+
};
|
|
2980
|
+
for (O = 0; O < S.length; O++) A(O);
|
|
2981
|
+
}
|
|
2982
|
+
}));
|
|
2983
|
+
}, e.prototype.loadImage = function() {
|
|
2984
|
+
var e = this;
|
|
2985
|
+
return new Promise((function(t, n) {
|
|
2986
|
+
var r = e._options, i = new Image();
|
|
2987
|
+
if (!r.image) return n("Image is not defined");
|
|
2988
|
+
typeof r.imageOptions.crossOrigin == "string" && (i.crossOrigin = r.imageOptions.crossOrigin), e._image = i, i.onload = function() {
|
|
2989
|
+
t();
|
|
2990
|
+
}, i.src = r.image;
|
|
2991
|
+
}));
|
|
2992
|
+
}, e.prototype.drawImage = function(e) {
|
|
2993
|
+
var t = e.width, n = e.height, r = e.count, i = e.dotSize;
|
|
2994
|
+
return y(this, void 0, void 0, (function() {
|
|
2995
|
+
var e, a, o, s, c, l, d, f, p;
|
|
2996
|
+
return b(this, (function(m) {
|
|
2997
|
+
switch (m.label) {
|
|
2998
|
+
case 0: return e = this._options, a = (e.width - r * i) / 2, o = (e.height - r * i) / 2, s = a + e.imageOptions.margin + (r * i - t) / 2, c = o + e.imageOptions.margin + (r * i - n) / 2, l = t - 2 * e.imageOptions.margin, d = n - 2 * e.imageOptions.margin, (f = document.createElementNS("http://www.w3.org/2000/svg", "image")).setAttribute("x", String(s)), f.setAttribute("y", String(c)), f.setAttribute("width", l + "px"), f.setAttribute("height", d + "px"), [4, u(e.image || "")];
|
|
2999
|
+
case 1: return p = m.sent(), f.setAttribute("href", p || ""), this._element.appendChild(f), [2];
|
|
3000
|
+
}
|
|
3001
|
+
}));
|
|
3002
|
+
}));
|
|
3003
|
+
}, e.prototype._createColor = function(e) {
|
|
3004
|
+
var t = e.options, n = e.color, r = e.additionalRotation, i = e.x, a = e.y, o = e.height, s = e.width, c = e.name, l = s > o ? s : o, u = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
3005
|
+
if (u.setAttribute("x", String(i)), u.setAttribute("y", String(a)), u.setAttribute("height", String(o)), u.setAttribute("width", String(s)), u.setAttribute("clip-path", "url('#clip-path-" + c + "')"), t) {
|
|
3006
|
+
var d;
|
|
3007
|
+
if (t.type === "radial") (d = document.createElementNS("http://www.w3.org/2000/svg", "radialGradient")).setAttribute("id", c), d.setAttribute("gradientUnits", "userSpaceOnUse"), d.setAttribute("fx", String(i + s / 2)), d.setAttribute("fy", String(a + o / 2)), d.setAttribute("cx", String(i + s / 2)), d.setAttribute("cy", String(a + o / 2)), d.setAttribute("r", String(l / 2));
|
|
3008
|
+
else {
|
|
3009
|
+
var f = ((t.rotation || 0) + r) % (2 * Math.PI), p = (f + 2 * Math.PI) % (2 * Math.PI), m = i + s / 2, h = a + o / 2, g = i + s / 2, _ = a + o / 2;
|
|
3010
|
+
p >= 0 && p <= .25 * Math.PI || p > 1.75 * Math.PI && p <= 2 * Math.PI ? (m -= s / 2, h -= o / 2 * Math.tan(f), g += s / 2, _ += o / 2 * Math.tan(f)) : p > .25 * Math.PI && p <= .75 * Math.PI ? (h -= o / 2, m -= s / 2 / Math.tan(f), _ += o / 2, g += s / 2 / Math.tan(f)) : p > .75 * Math.PI && p <= 1.25 * Math.PI ? (m += s / 2, h += o / 2 * Math.tan(f), g -= s / 2, _ -= o / 2 * Math.tan(f)) : p > 1.25 * Math.PI && p <= 1.75 * Math.PI && (h += o / 2, m += s / 2 / Math.tan(f), _ -= o / 2, g -= s / 2 / Math.tan(f)), (d = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient")).setAttribute("id", c), d.setAttribute("gradientUnits", "userSpaceOnUse"), d.setAttribute("x1", String(Math.round(m))), d.setAttribute("y1", String(Math.round(h))), d.setAttribute("x2", String(Math.round(g))), d.setAttribute("y2", String(Math.round(_)));
|
|
3011
|
+
}
|
|
3012
|
+
t.colorStops.forEach((function(e) {
|
|
3013
|
+
var t = e.offset, n = e.color, r = document.createElementNS("http://www.w3.org/2000/svg", "stop");
|
|
3014
|
+
r.setAttribute("offset", 100 * t + "%"), r.setAttribute("stop-color", n), d.appendChild(r);
|
|
3015
|
+
})), u.setAttribute("fill", "url('#" + c + "')"), this._defs.appendChild(d);
|
|
3016
|
+
} else n && u.setAttribute("fill", n);
|
|
3017
|
+
this._element.appendChild(u);
|
|
3018
|
+
}, e.instanceCount = 0, e;
|
|
3019
|
+
}(), w = "canvas";
|
|
3020
|
+
for (var T = {}, E = 0; E <= 40; E++) T[E] = E;
|
|
3021
|
+
let D = {
|
|
3022
|
+
type: w,
|
|
3023
|
+
shape: "square",
|
|
3024
|
+
width: 300,
|
|
3025
|
+
height: 300,
|
|
3026
|
+
data: "",
|
|
3027
|
+
margin: 0,
|
|
3028
|
+
qrOptions: {
|
|
3029
|
+
typeNumber: T[0],
|
|
3030
|
+
mode: void 0,
|
|
3031
|
+
errorCorrectionLevel: "Q"
|
|
3032
|
+
},
|
|
3033
|
+
imageOptions: {
|
|
3034
|
+
hideBackgroundDots: !0,
|
|
3035
|
+
imageSize: .4,
|
|
3036
|
+
crossOrigin: void 0,
|
|
3037
|
+
margin: 0
|
|
3038
|
+
},
|
|
3039
|
+
dotsOptions: {
|
|
3040
|
+
type: "square",
|
|
3041
|
+
color: "#000"
|
|
3042
|
+
},
|
|
3043
|
+
backgroundOptions: {
|
|
3044
|
+
round: 0,
|
|
3045
|
+
color: "#fff"
|
|
3046
|
+
}
|
|
3047
|
+
};
|
|
3048
|
+
var O = function() {
|
|
3049
|
+
return O = Object.assign || function(e) {
|
|
3050
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
3051
|
+
return e;
|
|
3052
|
+
}, O.apply(this, arguments);
|
|
3053
|
+
};
|
|
3054
|
+
function k(e) {
|
|
3055
|
+
var t = O({}, e);
|
|
3056
|
+
if (!t.colorStops || !t.colorStops.length) throw "Field 'colorStops' is required in gradient";
|
|
3057
|
+
return t.rotation = t.rotation ? Number(t.rotation) : 0, t.colorStops = t.colorStops.map((function(e) {
|
|
3058
|
+
return O(O({}, e), { offset: Number(e.offset) });
|
|
3059
|
+
})), t;
|
|
3060
|
+
}
|
|
3061
|
+
function A(e) {
|
|
3062
|
+
var t = O({}, e);
|
|
3063
|
+
return t.width = Number(t.width), t.height = Number(t.height), t.margin = Number(t.margin), t.imageOptions = O(O({}, t.imageOptions), {
|
|
3064
|
+
hideBackgroundDots: !!t.imageOptions.hideBackgroundDots,
|
|
3065
|
+
imageSize: Number(t.imageOptions.imageSize),
|
|
3066
|
+
margin: Number(t.imageOptions.margin)
|
|
3067
|
+
}), t.margin > Math.min(t.width, t.height) && (t.margin = Math.min(t.width, t.height)), t.dotsOptions = O({}, t.dotsOptions), t.dotsOptions.gradient && (t.dotsOptions.gradient = k(t.dotsOptions.gradient)), t.cornersSquareOptions && (t.cornersSquareOptions = O({}, t.cornersSquareOptions), t.cornersSquareOptions.gradient && (t.cornersSquareOptions.gradient = k(t.cornersSquareOptions.gradient))), t.cornersDotOptions && (t.cornersDotOptions = O({}, t.cornersDotOptions), t.cornersDotOptions.gradient && (t.cornersDotOptions.gradient = k(t.cornersDotOptions.gradient))), t.backgroundOptions && (t.backgroundOptions = O({}, t.backgroundOptions), t.backgroundOptions.gradient && (t.backgroundOptions.gradient = k(t.backgroundOptions.gradient))), t;
|
|
3068
|
+
}
|
|
3069
|
+
var j = n(192), M = n.n(j), N = function(e, t, n, r) {
|
|
3070
|
+
return new (n ||= Promise)((function(i, a) {
|
|
3071
|
+
function o(e) {
|
|
3072
|
+
try {
|
|
3073
|
+
c(r.next(e));
|
|
3074
|
+
} catch (e) {
|
|
3075
|
+
a(e);
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
function s(e) {
|
|
3079
|
+
try {
|
|
3080
|
+
c(r.throw(e));
|
|
3081
|
+
} catch (e) {
|
|
3082
|
+
a(e);
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
function c(e) {
|
|
3086
|
+
var t;
|
|
3087
|
+
e.done ? i(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) {
|
|
3088
|
+
e(t);
|
|
3089
|
+
}))).then(o, s);
|
|
3090
|
+
}
|
|
3091
|
+
c((r = r.apply(e, t || [])).next());
|
|
3092
|
+
}));
|
|
3093
|
+
}, P = function(e, t) {
|
|
3094
|
+
var n, r, i, a, o = {
|
|
3095
|
+
label: 0,
|
|
3096
|
+
sent: function() {
|
|
3097
|
+
if (1 & i[0]) throw i[1];
|
|
3098
|
+
return i[1];
|
|
3099
|
+
},
|
|
3100
|
+
trys: [],
|
|
3101
|
+
ops: []
|
|
3102
|
+
};
|
|
3103
|
+
return a = {
|
|
3104
|
+
next: s(0),
|
|
3105
|
+
throw: s(1),
|
|
3106
|
+
return: s(2)
|
|
3107
|
+
}, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
3108
|
+
return this;
|
|
3109
|
+
}), a;
|
|
3110
|
+
function s(a) {
|
|
3111
|
+
return function(s) {
|
|
3112
|
+
return function(a) {
|
|
3113
|
+
if (n) throw TypeError("Generator is already executing.");
|
|
3114
|
+
for (; o;) try {
|
|
3115
|
+
if (n = 1, r && (i = 2 & a[0] ? r.return : a[0] ? r.throw || ((i = r.return) && i.call(r), 0) : r.next) && !(i = i.call(r, a[1])).done) return i;
|
|
3116
|
+
switch (r = 0, i && (a = [2 & a[0], i.value]), a[0]) {
|
|
3117
|
+
case 0:
|
|
3118
|
+
case 1:
|
|
3119
|
+
i = a;
|
|
3120
|
+
break;
|
|
3121
|
+
case 4: return o.label++, {
|
|
3122
|
+
value: a[1],
|
|
3123
|
+
done: !1
|
|
3124
|
+
};
|
|
3125
|
+
case 5:
|
|
3126
|
+
o.label++, r = a[1], a = [0];
|
|
3127
|
+
continue;
|
|
3128
|
+
case 7:
|
|
3129
|
+
a = o.ops.pop(), o.trys.pop();
|
|
3130
|
+
continue;
|
|
3131
|
+
default:
|
|
3132
|
+
if (!((i = (i = o.trys).length > 0 && i[i.length - 1]) || a[0] !== 6 && a[0] !== 2)) {
|
|
3133
|
+
o = 0;
|
|
3134
|
+
continue;
|
|
3135
|
+
}
|
|
3136
|
+
if (a[0] === 3 && (!i || a[1] > i[0] && a[1] < i[3])) {
|
|
3137
|
+
o.label = a[1];
|
|
3138
|
+
break;
|
|
3139
|
+
}
|
|
3140
|
+
if (a[0] === 6 && o.label < i[1]) {
|
|
3141
|
+
o.label = i[1], i = a;
|
|
3142
|
+
break;
|
|
3143
|
+
}
|
|
3144
|
+
if (i && o.label < i[2]) {
|
|
3145
|
+
o.label = i[2], o.ops.push(a);
|
|
3146
|
+
break;
|
|
3147
|
+
}
|
|
3148
|
+
i[2] && o.ops.pop(), o.trys.pop();
|
|
3149
|
+
continue;
|
|
3150
|
+
}
|
|
3151
|
+
a = t.call(e, o);
|
|
3152
|
+
} catch (e) {
|
|
3153
|
+
a = [6, e], r = 0;
|
|
3154
|
+
} finally {
|
|
3155
|
+
n = i = 0;
|
|
3156
|
+
}
|
|
3157
|
+
if (5 & a[0]) throw a[1];
|
|
3158
|
+
return {
|
|
3159
|
+
value: a[0] ? a[1] : void 0,
|
|
3160
|
+
done: !0
|
|
3161
|
+
};
|
|
3162
|
+
}([a, s]);
|
|
3163
|
+
};
|
|
3164
|
+
}
|
|
3165
|
+
};
|
|
3166
|
+
let F = function() {
|
|
3167
|
+
function e(e) {
|
|
3168
|
+
this._options = e ? A(o(D, e)) : D, this.update();
|
|
3169
|
+
}
|
|
3170
|
+
return e._clearContainer = function(e) {
|
|
3171
|
+
e && (e.innerHTML = "");
|
|
3172
|
+
}, e.prototype._setupSvg = function() {
|
|
3173
|
+
var e = this;
|
|
3174
|
+
if (this._qr) {
|
|
3175
|
+
var t = new C(this._options);
|
|
3176
|
+
this._svg = t.getElement(), this._svgDrawingPromise = t.drawQR(this._qr).then((function() {
|
|
3177
|
+
var n;
|
|
3178
|
+
e._svg && ((n = e._extension) == null || n.call(e, t.getElement(), e._options));
|
|
3179
|
+
}));
|
|
3180
|
+
}
|
|
3181
|
+
}, e.prototype._setupCanvas = function() {
|
|
3182
|
+
var e = this;
|
|
3183
|
+
this._qr && (this._canvas = document.createElement("canvas"), this._canvas.width = this._options.width, this._canvas.height = this._options.height, this._setupSvg(), this._canvasDrawingPromise = this._svgDrawingPromise?.then((function() {
|
|
3184
|
+
if (e._svg) {
|
|
3185
|
+
var t = e._svg, n = new XMLSerializer().serializeToString(t), r = "data:image/svg+xml;base64," + btoa(n), i = new Image();
|
|
3186
|
+
return new Promise((function(t) {
|
|
3187
|
+
i.onload = function() {
|
|
3188
|
+
var n;
|
|
3189
|
+
(n = e._canvas?.getContext("2d")) == null || n.drawImage(i, 0, 0), t();
|
|
3190
|
+
}, i.src = r;
|
|
3191
|
+
}));
|
|
3192
|
+
}
|
|
3193
|
+
})));
|
|
3194
|
+
}, e.prototype._getElement = function(e) {
|
|
3195
|
+
return e === void 0 && (e = "png"), N(this, void 0, void 0, (function() {
|
|
3196
|
+
return P(this, (function(t) {
|
|
3197
|
+
switch (t.label) {
|
|
3198
|
+
case 0:
|
|
3199
|
+
if (!this._qr) throw "QR code is empty";
|
|
3200
|
+
return e.toLowerCase() === "svg" ? (this._svg && this._svgDrawingPromise || this._setupSvg(), [4, this._svgDrawingPromise]) : [3, 2];
|
|
3201
|
+
case 1: return t.sent(), [2, this._svg];
|
|
3202
|
+
case 2: return this._canvas && this._canvasDrawingPromise || this._setupCanvas(), [4, this._canvasDrawingPromise];
|
|
3203
|
+
case 3: return t.sent(), [2, this._canvas];
|
|
3204
|
+
}
|
|
3205
|
+
}));
|
|
3206
|
+
}));
|
|
3207
|
+
}, e.prototype.update = function(t) {
|
|
3208
|
+
e._clearContainer(this._container), this._options = t ? A(o(this._options, t)) : this._options, this._options.data && (this._qr = M()(this._options.qrOptions.typeNumber, this._options.qrOptions.errorCorrectionLevel), this._qr.addData(this._options.data, this._options.qrOptions.mode || function(e) {
|
|
3209
|
+
switch (!0) {
|
|
3210
|
+
case /^[0-9]*$/.test(e): return "Numeric";
|
|
3211
|
+
case /^[0-9A-Z $%*+\-./:]*$/.test(e): return "Alphanumeric";
|
|
3212
|
+
default: return "Byte";
|
|
3213
|
+
}
|
|
3214
|
+
}(this._options.data)), this._qr.make(), this._options.type === w ? this._setupCanvas() : this._setupSvg(), this.append(this._container));
|
|
3215
|
+
}, e.prototype.append = function(e) {
|
|
3216
|
+
if (e) {
|
|
3217
|
+
if (typeof e.appendChild != "function") throw "Container should be a single DOM node";
|
|
3218
|
+
this._options.type === w ? this._canvas && e.appendChild(this._canvas) : this._svg && e.appendChild(this._svg), this._container = e;
|
|
3219
|
+
}
|
|
3220
|
+
}, e.prototype.applyExtension = function(e) {
|
|
3221
|
+
if (!e) throw "Extension function should be defined.";
|
|
3222
|
+
this._extension = e, this.update();
|
|
3223
|
+
}, e.prototype.deleteExtension = function() {
|
|
3224
|
+
this._extension = void 0, this.update();
|
|
3225
|
+
}, e.prototype.getRawData = function(e) {
|
|
3226
|
+
return e === void 0 && (e = "png"), N(this, void 0, void 0, (function() {
|
|
3227
|
+
var t, n, r;
|
|
3228
|
+
return P(this, (function(i) {
|
|
3229
|
+
switch (i.label) {
|
|
3230
|
+
case 0:
|
|
3231
|
+
if (!this._qr) throw "QR code is empty";
|
|
3232
|
+
return [4, this._getElement(e)];
|
|
3233
|
+
case 1: return (t = i.sent()) ? e.toLowerCase() === "svg" ? (n = new XMLSerializer(), r = n.serializeToString(t), [2, new Blob(["<?xml version=\"1.0\" standalone=\"no\"?>\r\n" + r], { type: "image/svg+xml" })]) : [2, new Promise((function(n) {
|
|
3234
|
+
return t.toBlob(n, "image/" + e, 1);
|
|
3235
|
+
}))] : [2, null];
|
|
3236
|
+
}
|
|
3237
|
+
}));
|
|
3238
|
+
}));
|
|
3239
|
+
}, e.prototype.download = function(e) {
|
|
3240
|
+
return N(this, void 0, void 0, (function() {
|
|
3241
|
+
var t, n, r, i, a;
|
|
3242
|
+
return P(this, (function(o) {
|
|
3243
|
+
switch (o.label) {
|
|
3244
|
+
case 0:
|
|
3245
|
+
if (!this._qr) throw "QR code is empty";
|
|
3246
|
+
return t = "png", n = "qr", typeof e == "string" ? (t = e, console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")) : typeof e == "object" && e && (e.name && (n = e.name), e.extension && (t = e.extension)), [4, this._getElement(t)];
|
|
3247
|
+
case 1: return (r = o.sent()) && (t.toLowerCase() === "svg" ? (i = new XMLSerializer(), a = "<?xml version=\"1.0\" standalone=\"no\"?>\r\n" + (a = i.serializeToString(r)), s("data:image/svg+xml;charset=utf-8," + encodeURIComponent(a), n + ".svg")) : s(r.toDataURL("image/" + t), n + "." + t)), [2];
|
|
3248
|
+
}
|
|
3249
|
+
}));
|
|
3250
|
+
}));
|
|
3251
|
+
}, e;
|
|
3252
|
+
}();
|
|
3253
|
+
}
|
|
3254
|
+
}, t = {};
|
|
3255
|
+
function n(r) {
|
|
3256
|
+
if (t[r]) return t[r].exports;
|
|
3257
|
+
var i = t[r] = { exports: {} };
|
|
3258
|
+
return e[r](i, i.exports, n), i.exports;
|
|
3259
|
+
}
|
|
3260
|
+
return n.n = (e) => {
|
|
3261
|
+
var t = e && e.__esModule ? () => e.default : () => e;
|
|
3262
|
+
return n.d(t, { a: t }), t;
|
|
3263
|
+
}, n.d = (e, t) => {
|
|
3264
|
+
for (var r in t) n.o(t, r) && !n.o(e, r) && Object.defineProperty(e, r, {
|
|
3265
|
+
enumerable: !0,
|
|
3266
|
+
get: t[r]
|
|
3267
|
+
});
|
|
3268
|
+
}, n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), n(676);
|
|
3269
|
+
})().default;
|
|
3270
|
+
}));
|
|
3271
|
+
})))(), 1), l = typeof c.default.default == "function" ? c.default.default : c.default;
|
|
3272
|
+
function u(e, t = 512, n = "white", r = "black") {
|
|
3273
|
+
return new l(d(e, t, n, r));
|
|
3274
|
+
}
|
|
3275
|
+
function d(e, t = 512, n = "white", r = "black") {
|
|
3276
|
+
return {
|
|
3277
|
+
type: "svg",
|
|
3278
|
+
width: t,
|
|
3279
|
+
height: t,
|
|
3280
|
+
data: String(e),
|
|
3281
|
+
margin: 16,
|
|
3282
|
+
qrOptions: {
|
|
3283
|
+
typeNumber: 0,
|
|
3284
|
+
mode: "Byte",
|
|
3285
|
+
errorCorrectionLevel: "Q"
|
|
3286
|
+
},
|
|
3287
|
+
backgroundOptions: { color: n },
|
|
3288
|
+
dotsOptions: {
|
|
3289
|
+
type: "extra-rounded",
|
|
3290
|
+
color: r
|
|
3291
|
+
},
|
|
3292
|
+
cornersSquareOptions: {
|
|
3293
|
+
type: "extra-rounded",
|
|
3294
|
+
color: r
|
|
3295
|
+
},
|
|
3296
|
+
cornersDotOptions: {
|
|
3297
|
+
type: "square",
|
|
3298
|
+
color: r
|
|
3299
|
+
},
|
|
3300
|
+
imageOptions: {
|
|
3301
|
+
hideBackgroundDots: !0,
|
|
3302
|
+
imageSize: .15,
|
|
3303
|
+
margin: 8
|
|
3304
|
+
},
|
|
3305
|
+
image: `data:image/svg+xml;utf8,<svg fill="${encodeURIComponent(r)}" height="16" viewBox="0 0 16 14" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15.9176 11.038-2.6413 2.7713c-.0574.0602-.1269.1082-.2041.141s-.1604.0497-.2446.0497h-12.520966c-.059744 0-.118187-.0171-.168147-.0491-.0499596-.0321-.0892609-.0777-.1130745-.1313-.02381372-.0536-.03110249-.1129-.02097081-.1705.01013171-.0576.03724251-.111.07800141-.1538l2.6432769-2.7713c.05726-.06.12651-.1079.20346-.1407s.15996-.0498.2439-.05h12.52032c.0597 0 .1182.0171.1681.0492.05.032.0893.0776.1131.1313.0238.0536.0311.1128.021.1704-.0102.0576-.0373.1111-.078.1538zm-2.6413-5.58067c-.0574-.0602-.1269-.1082-.2041-.141s-.1604-.04971-.2446-.04966h-12.520966c-.059744 0-.118187.01708-.168147.04913-.0499596.03205-.0892609.07768-.1130745.13129-.02381372.0536-.03110249.11285-.02097081.17045.01013171.05761.03724251.11106.07800141.15379l2.6432769 2.77134c.05726.06004.12651.10794.20346.14073.07695.0328.15996.04979.2439.04993h12.52032c.0597 0 .1182-.01707.1681-.04913.05-.03205.0893-.07768.1131-.13129.0238-.0536.0311-.11285.021-.17045-.0102-.05761-.0373-.11106-.078-.15379zm-12.969666-1.99066h12.520966c.0842.00004.1674-.01687.2446-.04967s.1467-.0808.2041-.141l2.6413-2.771333c.0407-.042736.0678-.096189.078-.153792.0101-.057603.0028-.116847-.021-.170453s-.0631-.0992385-.1131-.1312911c-.0499-.0320526-.1084-.04912893-.1681-.0491309h-12.52032c-.08394.00013975-.16695.0171339-.2439.0499304s-.1462.0806976-.20346.1407366l-2.6425955 2.771333c-.0407196.04269-.0678184.09609-.07797306.15363-.01015467.05754-.00292373.11673.02080606.17031.0237297.05358.0629266.09922.1127835.13132.049857.03211.108207.04928.167893.04941z"/></svg>`
|
|
3306
|
+
};
|
|
3307
|
+
}
|
|
3308
|
+
//#endregion
|
|
3309
|
+
export { u as createQR };
|
|
3310
|
+
|
|
3311
|
+
//# sourceMappingURL=dist-CslWupfi.js.map
|