@cling-se/widget 0.12.4 → 0.12.5

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.
Files changed (118) hide show
  1. package/dist/{AddClientCallout-96e94ad9.js → AddClientCallout-d38447e9.js} +5 -5
  2. package/dist/{AnswerModal-6990ea17.js → AnswerModal-60fed10c.js} +1263 -1153
  3. package/dist/{AttachmentItem-0d327381.js → AttachmentItem-7a97569e.js} +3 -3
  4. package/dist/{BaseDatePicker-e2e1ea6e.js → BaseDatePicker-586a3926.js} +2 -2
  5. package/dist/{BaseInput-d9c734b0.js → BaseInput-42ac25a2.js} +1 -1
  6. package/dist/{BaseUpload-9efbce6d.js → BaseUpload-c295782d.js} +2 -2
  7. package/dist/{BlockMedia-70d92534.js → BlockMedia-11f309cf.js} +1 -1
  8. package/dist/{CCallout-419f1eac.js → CCallout-d09a7a83.js} +2 -2
  9. package/dist/{CDropdownItem-60893039.js → CDropdownItem-8fc4a155.js} +1 -1
  10. package/dist/{CField-2e027461.js → CField-30c37bbb.js} +1 -1
  11. package/dist/{CPhoneFormat-b0670312.js → CPhoneFormat-19d0676c.js} +1 -1
  12. package/dist/{CSlider.vue_vue_type_style_index_0_lang-852dfd0e.js → CSlider.vue_vue_type_style_index_0_lang-b4f46db0.js} +1 -1
  13. package/dist/{ClientAutocomplete-44998c42.js → ClientAutocomplete-52294d98.js} +2 -2
  14. package/dist/{ClientModal-d4ebef77.js → ClientModal-aa88eb21.js} +5 -5
  15. package/dist/{ColorPicker-cd9e1cc0.js → ColorPicker-891fa9ff.js} +1 -1
  16. package/dist/{CompanyModal-36820c26.js → CompanyModal-0e72aa2e.js} +3 -3
  17. package/dist/{ContentWrapper-520e4761.js → ContentWrapper-a4ddc5d8.js} +13 -13
  18. package/dist/{CoverBlockSettings-0251d18f.js → CoverBlockSettings-691d6064.js} +7 -7
  19. package/dist/{DocAnswer-dad0bf7f.js → DocAnswer-7fc72be9.js} +4 -4
  20. package/dist/{DocDetails-31009b60.js → DocDetails-594b20bf.js} +17 -17
  21. package/dist/{DocForm-3e6d9d83.js → DocForm-880847a9.js} +30 -32
  22. package/dist/{DocFormSend-3b8e9604.js → DocFormSend-9d282d49.js} +17 -17
  23. package/dist/{DocLinks-1467ba01.js → DocLinks-9e5d5f96.js} +2 -2
  24. package/dist/{DocModalBase-c596787a.js → DocModalBase-7e1c49aa.js} +1 -1
  25. package/dist/{DocPrint-3970f8e8.js → DocPrint-1e5e78b5.js} +1 -1
  26. package/dist/{DocReceipt-dd5c7d5b.js → DocReceipt-36f6fcaa.js} +8 -8
  27. package/dist/{DocSendReminder-a3909a71.js → DocSendReminder-14d0bd2b.js} +1 -1
  28. package/dist/{DocTextEditor-f0223af8.js → DocTextEditor-cd03a1fe.js} +293 -292
  29. package/dist/{DocTimeline-9b29e5f6.js → DocTimeline-2c06a4b3.js} +1 -1
  30. package/dist/{DocumentClient-f77bc578.js → DocumentClient-66af4fe0.js} +7 -7
  31. package/dist/{DocumentLayout-9cc2a08e.js → DocumentLayout-46669407.js} +4 -4
  32. package/dist/{DocumentLogotype-20216f74.js → DocumentLogotype-552d8817.js} +3 -3
  33. package/dist/{DocumentVoided-1198114e.js → DocumentVoided-d7fc7000.js} +1 -1
  34. package/dist/{EmbedInput-df3aa286.js → EmbedInput-a6a8d0c1.js} +2 -2
  35. package/dist/{EmbedSettings-b71e059b.js → EmbedSettings-ecb5415d.js} +3 -3
  36. package/dist/{ErrorCallout-a39eba4d.js → ErrorCallout-385e2432.js} +1 -1
  37. package/dist/{FilePreviewModal-b5edeee0.js → FilePreviewModal-8cded353.js} +5 -5
  38. package/dist/{Flag-c7a354cd.js → Flag-ccc46cd6.js} +1 -1
  39. package/dist/{HeaderSettings-db6e32c8.js → HeaderSettings-297a8e94.js} +15 -15
  40. package/dist/{ImageSelectModal-856e363b.js → ImageSelectModal-ebaf75ed.js} +8 -8
  41. package/dist/{ImageUploadWrapper-24dadc15.js → ImageUploadWrapper-a905ddef.js} +2 -2
  42. package/dist/{Index-607f6640.js → Index-00eebe39.js} +6 -6
  43. package/dist/{Index-40083942.js → Index-07a53bf1.js} +14 -14
  44. package/dist/{Index-5355b449.js → Index-0b001380.js} +7 -7
  45. package/dist/{Index-1bf76a16.js → Index-0c6a6fc0.js} +4 -4
  46. package/dist/{Index-b5480383.js → Index-0d64d6fc.js} +8 -8
  47. package/dist/{Index-0099e82e.js → Index-136ed256.js} +1 -1
  48. package/dist/{Index-f06fcb76.js → Index-16428365.js} +5 -5
  49. package/dist/{Index-4f9afe72.js → Index-17d50e25.js} +6 -6
  50. package/dist/{Index-12ea21c5.js → Index-1cd23b39.js} +1 -1
  51. package/dist/{Index-a5a82682.js → Index-1f63b613.js} +9 -9
  52. package/dist/{Index-4f25825f.js → Index-2e389474.js} +10 -10
  53. package/dist/{Index-3889e134.js → Index-317eff3e.js} +4 -4
  54. package/dist/{Index-99ac0ac2.js → Index-3651364d.js} +4 -4
  55. package/dist/{Index-54a78fad.js → Index-3be2f7bc.js} +4 -4
  56. package/dist/{Index-6d22d9d1.js → Index-3d1be851.js} +2 -2
  57. package/dist/{Index-dd5f8fc7.js → Index-6dd45bfc.js} +9 -9
  58. package/dist/{Index-014d0ac2.js → Index-71933eec.js} +14 -14
  59. package/dist/{Index-8ac2ed05.js → Index-76955f5a.js} +4 -4
  60. package/dist/{Index-9891ee1a.js → Index-795195ae.js} +6 -6
  61. package/dist/{Index-139b1013.js → Index-928cfa67.js} +2 -2
  62. package/dist/{Index-ef955a66.js → Index-94c95a58.js} +3 -3
  63. package/dist/{Index-dcbfb822.js → Index-9d492b13.js} +2 -2
  64. package/dist/{Index-34978d11.js → Index-9ea113ee.js} +2 -2
  65. package/dist/{Index-cada810e.js → Index-a6509bbb.js} +7 -7
  66. package/dist/{Index-d689466d.js → Index-ab6bac6f.js} +2 -2
  67. package/dist/{Index-f05fe2a1.js → Index-addb1314.js} +4 -4
  68. package/dist/{Index-4e675d8a.js → Index-b910802d.js} +4 -4
  69. package/dist/{Index-7b2e5ac5.js → Index-bce6b732.js} +13 -13
  70. package/dist/{Index-3378fcf6.js → Index-c90f6095.js} +4 -4
  71. package/dist/{Index-75368b48.js → Index-cbec68f4.js} +2 -2
  72. package/dist/{Index-bc5f3ca9.js → Index-cebc4b52.js} +2 -2
  73. package/dist/{Index-73cee68c.js → Index-ec6a2275.js} +2 -2
  74. package/dist/{Index-c551781f.js → Index-f38d974c.js} +6 -6
  75. package/dist/{Index-007a1233.js → Index-f951187a.js} +5 -5
  76. package/dist/{InputToggleRow-a9229972.js → InputToggleRow-5ee011ac.js} +1 -1
  77. package/dist/{IsPremiumPreStep-4e9e2883.js → IsPremiumPreStep-a43d13cb.js} +2 -2
  78. package/dist/{ManualPopover-720770bb.js → ManualPopover-a8f15584.js} +1 -1
  79. package/dist/{MediaWrapper-90c72ae5.js → MediaWrapper-b6e26d7e.js} +3 -3
  80. package/dist/{NotBindingText-832d5350.js → NotBindingText-8ff419f4.js} +2 -2
  81. package/dist/{PackageGroup-22cbb76c.js → PackageGroup-08b05fd3.js} +12 -12
  82. package/dist/{PdfTerms-ce2d5d5e.js → PdfTerms-949c0afc.js} +5 -5
  83. package/dist/{PdfViewer-ebff4b6c.js → PdfViewer-2ddc01f9.js} +2 -2
  84. package/dist/{PlainHtml-faae67a3.js → PlainHtml-0b903d46.js} +1 -1
  85. package/dist/{PriceHeader-67ac2108.js → PriceHeader-693bc152.js} +13 -13
  86. package/dist/{SearchApi-d90fd0d2.js → SearchApi-305bca0e.js} +2 -2
  87. package/dist/{Setup-88387515.js → Setup-faa481fe.js} +1 -1
  88. package/dist/{TermsSettings-82f18edc.js → TermsSettings-42e0de5d.js} +7 -7
  89. package/dist/{ThemeColorRow-ca0c7f34.js → ThemeColorRow-a0b0ad20.js} +3 -3
  90. package/dist/{ToggleBinding-87b13b54.js → ToggleBinding-21d3e533.js} +3 -3
  91. package/dist/{UploadModal-9c6b64dc.js → UploadModal-364456d3.js} +3 -3
  92. package/dist/{VideoPlayerInput-87ae1e67.js → VideoPlayerInput-4c6358ac.js} +3 -3
  93. package/dist/{VideoPlayerSettings-ab7c9dd9.js → VideoPlayerSettings-0c7ea30b.js} +4 -4
  94. package/dist/{VideoSelectModal-b9c128a2.js → VideoSelectModal-d97c0d57.js} +8 -8
  95. package/dist/{answerDocumentMixin-1a04710f.js → answerDocumentMixin-043bdad9.js} +3 -3
  96. package/dist/{debounce-5f4cc346.js → debounce-da1cfff7.js} +1 -1
  97. package/dist/{focusDrawerMixin-fcfab690.js → focusDrawerMixin-72023f17.js} +1 -1
  98. package/dist/{formComponentsInstall-f2198c99.js → formComponentsInstall-63aedf1c.js} +12 -12
  99. package/dist/{formDrawerState-6ff961ac.js → formDrawerState-e0ff3ff0.js} +1 -1
  100. package/dist/{formValidationMixin-5882b9a7.js → formValidationMixin-b8eb5da2.js} +1 -1
  101. package/dist/{index-525e4866.js → index-0aed1acb.js} +5 -5
  102. package/dist/{index-383fefaf.js → index-102daf6b.js} +1 -1
  103. package/dist/{index-9d8996e9.js → index-10b258a2.js} +1 -1
  104. package/dist/{index-7fa7534f.js → index-c169ee1b.js} +9 -9
  105. package/dist/{index-069b282b.js → index-c28a8215.js} +3 -3
  106. package/dist/{index-09727136.js → index-d822374b.js} +1 -1
  107. package/dist/index.es.js +3 -3
  108. package/dist/index.umd.js +145 -145
  109. package/dist/{main-0ba93efc.js → main-e0ec3a1d.js} +5970 -5795
  110. package/dist/{mapFormMixin-46fe94a8.js → mapFormMixin-d799f9b8.js} +1 -1
  111. package/dist/{publicSenderState-644bb177.js → publicSenderState-c9b2f6c7.js} +1 -1
  112. package/dist/style.css +2 -2
  113. package/dist/{throttle-61f5ee70.js → throttle-cc238be3.js} +2 -2
  114. package/dist/{tinycolor-4773d945.js → tinycolor-8cfd2ec1.js} +1 -1
  115. package/dist/{tippy.esm-b5320973.js → tippy.esm-77270ccc.js} +5 -5
  116. package/dist/{utils-8d533496.js → utils-8dc6c03d.js} +1 -1
  117. package/dist/{vuedraggable.umd-37bf712b.js → vuedraggable.umd-3076e893.js} +1 -1
  118. package/package.json +1 -1
@@ -1,19 +1,19 @@
1
1
  import { a as nt } from "./anime.es-e284c852.js";
2
- import { aq as Tt, h as Et, n as ot, ar as Ft, as as kt, at as It, au as Mt, g as wt, e as Bt, J as At } from "./main-0ba93efc.js";
3
- import { a as Rt } from "./vuex.esm-4a0fff7c.js";
4
- import { m as ft } from "./mapFormMixin-46fe94a8.js";
5
- import { C as $t } from "./CField-2e027461.js";
2
+ import { aq as It, h as Ct, n as ot, ar as Mt, L as Tt, as as Rt, at as $t, au as Dt, g as wt, e as At, J as Bt } from "./main-e0ec3a1d.js";
3
+ import { a as Ut } from "./vuex.esm-4a0fff7c.js";
4
+ import { m as ft } from "./mapFormMixin-d799f9b8.js";
5
+ import { C as Lt } from "./CField-30c37bbb.js";
6
6
  import "./CField.vue_vue_type_style_index_0_lang-4ed993c7.js";
7
- const Dt = () => {
8
- const m = window.location.host.split(".");
9
- return m && m[0];
10
- }, Ut = Dt() === "fortnox";
11
- const Lt = [
7
+ const Nt = () => {
8
+ const v = window.location.host.split(".");
9
+ return v && v[0];
10
+ }, Ot = Nt() === "fortnox";
11
+ const zt = [
12
12
  "enjoyedExperience",
13
13
  // boolean value
14
14
  "whatToImprove"
15
15
  // string value
16
- ], Nt = {
16
+ ], Yt = {
17
17
  props: {
18
18
  publicId: {
19
19
  type: String,
@@ -33,37 +33,37 @@ const Lt = [
33
33
  };
34
34
  },
35
35
  methods: {
36
- async submitFeedback({ type: m, data: r }) {
36
+ async submitFeedback({ type: v, data: r }) {
37
37
  if (!this.publicId)
38
38
  throw Error("Missing param publicId");
39
- if (!m)
39
+ if (!v)
40
40
  throw Error("Missing param type");
41
- if (!Lt.includes(m))
41
+ if (!zt.includes(v))
42
42
  throw Error("Invalid feedback type");
43
43
  if (!r)
44
44
  throw Error("Missing param data");
45
45
  let n = "positive";
46
46
  try {
47
- Tt.feedback(this.publicId, { type: m, data: r }), m === "enjoyedExperience" && !r.value && (n = "negative"), m === "whatToImprove" && (n = "negative.success"), Ut && n !== "negative" && (n = "custom");
47
+ It.feedback(this.publicId, { type: v, data: r }), v === "enjoyedExperience" && !r.value && (n = "negative"), v === "whatToImprove" && (n = "negative.success"), Ot && n !== "negative" && (n = "custom");
48
48
  } catch (g) {
49
- Et(g, { showMessage: !1 });
49
+ Ct(g, { showMessage: !1 });
50
50
  } finally {
51
51
  this.goTo(n);
52
52
  }
53
53
  },
54
- async goTo(m) {
55
- if (this.$emit("page", m), m === "positive" || m === "negative") {
54
+ async goTo(v) {
55
+ if (this.$emit("page", v), v === "positive" || v === "negative") {
56
56
  this.$refs.start.style.opacity = 0, this.page = "intermediate", setTimeout(() => {
57
- this.page = m;
57
+ this.page = v;
58
58
  }, 2e3);
59
59
  return;
60
60
  }
61
- this.page = m;
61
+ this.page = v;
62
62
  },
63
63
  startAnimation() {
64
- const m = this.$refs.feedbackBg;
65
- m.gradOneXPos = 0, m.gradOneYPos = 0, m.gradTwoXPos = 80, m.gradTwoYPos = 20, m.gradThreeXPos = 20, m.gradThreeYPos = 80, m.gradFourXPos = 80, m.gradFourYPos = 80, nt({
66
- targets: m,
64
+ const v = this.$refs.feedbackBg;
65
+ v.gradOneXPos = 0, v.gradOneYPos = 0, v.gradTwoXPos = 80, v.gradTwoYPos = 20, v.gradThreeXPos = 20, v.gradThreeYPos = 80, v.gradFourXPos = 80, v.gradFourYPos = 80, nt({
66
+ targets: v,
67
67
  duration: 12e3,
68
68
  direction: "alternate",
69
69
  easing: "linear",
@@ -77,38 +77,38 @@ const Lt = [
77
77
  gradFourXPos: [85, 80, 75, 70, 95],
78
78
  gradFourYPos: [90, 100, 120, 100, 85],
79
79
  update() {
80
- m.style.setProperty(
80
+ v.style.setProperty(
81
81
  "--gradOneXPos",
82
- `${m.gradOneXPos}%`
83
- ), m.style.setProperty(
82
+ `${v.gradOneXPos}%`
83
+ ), v.style.setProperty(
84
84
  "--gradOneYPos",
85
- `${m.gradOneYPos}%`
86
- ), m.style.setProperty(
85
+ `${v.gradOneYPos}%`
86
+ ), v.style.setProperty(
87
87
  "--gradTwoXPos",
88
- `${m.gradTwoXPos}%`
89
- ), m.style.setProperty(
88
+ `${v.gradTwoXPos}%`
89
+ ), v.style.setProperty(
90
90
  "--gradTwoYPos",
91
- `${m.gradTwoYPos}%`
92
- ), m.style.setProperty(
91
+ `${v.gradTwoYPos}%`
92
+ ), v.style.setProperty(
93
93
  "--gradThreeXPos",
94
- `${m.gradThreeXPos}%`
95
- ), m.style.setProperty(
94
+ `${v.gradThreeXPos}%`
95
+ ), v.style.setProperty(
96
96
  "--gradThreeYPos",
97
- `${m.gradThreeYPos}%`
98
- ), m.style.setProperty(
97
+ `${v.gradThreeYPos}%`
98
+ ), v.style.setProperty(
99
99
  "--gradFourXPos",
100
- `${m.gradFourXPos}%`
101
- ), m.style.setProperty(
100
+ `${v.gradFourXPos}%`
101
+ ), v.style.setProperty(
102
102
  "--gradFourYPos",
103
- `${m.gradFourYPos}%`
103
+ `${v.gradFourYPos}%`
104
104
  );
105
105
  }
106
106
  });
107
107
  },
108
108
  // animations
109
- leave(m, r) {
109
+ leave(v, r) {
110
110
  nt({
111
- targets: m,
111
+ targets: v,
112
112
  // height: 0,
113
113
  // opacity: [1, 0],
114
114
  opacity: 0,
@@ -117,9 +117,9 @@ const Lt = [
117
117
  complete: r
118
118
  });
119
119
  },
120
- enter(m, r) {
120
+ enter(v, r) {
121
121
  nt({
122
- targets: m,
122
+ targets: v,
123
123
  delay: this.page === "intermediate" ? 250 : 0,
124
124
  duration: 500,
125
125
  opacity: [0, 1],
@@ -129,7 +129,7 @@ const Lt = [
129
129
  }
130
130
  }
131
131
  };
132
- var Ot = function() {
132
+ var Wt = function() {
133
133
  var r = this, n = r._self._c;
134
134
  return n("div", { staticClass: "f-feedback" }, [n("div", { ref: "feedbackBg", staticClass: "f-bg" }), n("div", { staticClass: "f-container" }, [n("transition", { attrs: { css: !1, mode: "out-in" }, on: { enter: r.enter, leave: r.leave } }, [r.page === "start" ? n("div", { key: "start", ref: "start", staticClass: "flex w-full flex-col items-center justify-center", staticStyle: { transition: "opacity 250ms" } }, [n("div", { staticStyle: { "padding-bottom": "calc(1.5 * var(--rem))", "font-size": "14px", "font-weight": "500" }, domProps: { textContent: r._s(r._document.$t("answerFeedback.start.title")) } }), n("div", [n("CButton", { staticClass: "feedback-btn", attrs: { "icon-left": "thumbsdown", size: "small", pattern: "secondary" }, on: { click: function(g) {
135
135
  return r.submitFeedback({
@@ -157,26 +157,26 @@ var Ot = function() {
157
157
  } } })], 1) : r.page === "custom" ? n("div", { key: "success", staticStyle: { height: "100%", display: "flex", "flex-direction": "column" } }, [n("div", { staticStyle: { flex: "1 1 auto", display: "flex", "flex-direction": "column", "justify-content": "center", "align-items": "center" } }, [n("div", { staticClass: "f-title", domProps: { textContent: r._s(r._document.$t("answerFeedback.custom.title")) } }), n("div", { domProps: { textContent: r._s(r._document.$t("answerFeedback.custom.text")) } })]), n("CButton", { staticClass: "a-btn", attrs: { type: "secondary", wide: "" }, domProps: { textContent: r._s(r._document.$t("answerFeedback.custom.action")) }, on: { click: function(g) {
158
158
  return r.$emit("close");
159
159
  } } })], 1) : r._e()])], 1)]);
160
- }, zt = [], Yt = /* @__PURE__ */ ot(
161
- Nt,
162
- Ot,
163
- zt,
160
+ }, Ht = [], jt = /* @__PURE__ */ ot(
161
+ Yt,
162
+ Wt,
163
+ Ht,
164
164
  !1,
165
165
  null,
166
166
  "67b518b8",
167
167
  null,
168
168
  null
169
169
  );
170
- const Wt = Yt.exports;
170
+ const Gt = jt.exports;
171
171
  /*!
172
172
  * Signature Pad v4.0.10 | https://github.com/szimek/signature_pad
173
173
  * (c) 2022 Szymon Nowak | Released under the MIT license
174
174
  */
175
175
  class pt {
176
- constructor(r, n, g, l) {
176
+ constructor(r, n, g, u) {
177
177
  if (isNaN(r) || isNaN(n))
178
178
  throw new Error(`Point is invalid: (${r}, ${n})`);
179
- this.x = +r, this.y = +n, this.pressure = g || 0, this.time = l || Date.now();
179
+ this.x = +r, this.y = +n, this.pressure = g || 0, this.time = u || Date.now();
180
180
  }
181
181
  distanceTo(r) {
182
182
  return Math.sqrt(Math.pow(this.x - r.x, 2) + Math.pow(this.y - r.y, 2));
@@ -188,38 +188,38 @@ class pt {
188
188
  return this.time !== r.time ? this.distanceTo(r) / (this.time - r.time) : 0;
189
189
  }
190
190
  }
191
- class Ct {
192
- constructor(r, n, g, l, f, d) {
193
- this.startPoint = r, this.control2 = n, this.control1 = g, this.endPoint = l, this.startWidth = f, this.endWidth = d;
191
+ class bt {
192
+ constructor(r, n, g, u, h, d) {
193
+ this.startPoint = r, this.control2 = n, this.control1 = g, this.endPoint = u, this.startWidth = h, this.endWidth = d;
194
194
  }
195
195
  static fromPoints(r, n) {
196
- const g = this.calculateControlPoints(r[0], r[1], r[2]).c2, l = this.calculateControlPoints(r[1], r[2], r[3]).c1;
197
- return new Ct(r[1], g, l, r[2], n.start, n.end);
196
+ const g = this.calculateControlPoints(r[0], r[1], r[2]).c2, u = this.calculateControlPoints(r[1], r[2], r[3]).c1;
197
+ return new bt(r[1], g, u, r[2], n.start, n.end);
198
198
  }
199
199
  static calculateControlPoints(r, n, g) {
200
- const l = r.x - n.x, f = r.y - n.y, d = n.x - g.x, c = n.y - g.y, i = { x: (r.x + n.x) / 2, y: (r.y + n.y) / 2 }, s = { x: (n.x + g.x) / 2, y: (n.y + g.y) / 2 }, h = Math.sqrt(l * l + f * f), a = Math.sqrt(d * d + c * c), w = i.x - s.x, x = i.y - s.y, b = a / (h + a), S = { x: s.x + w * b, y: s.y + x * b }, F = n.x - S.x, M = n.y - S.y;
200
+ const u = r.x - n.x, h = r.y - n.y, d = n.x - g.x, c = n.y - g.y, i = { x: (r.x + n.x) / 2, y: (r.y + n.y) / 2 }, s = { x: (n.x + g.x) / 2, y: (n.y + g.y) / 2 }, f = Math.sqrt(u * u + h * h), a = Math.sqrt(d * d + c * c), w = i.x - s.x, x = i.y - s.y, b = a / (f + a), A = { x: s.x + w * b, y: s.y + x * b }, F = n.x - A.x, M = n.y - A.y;
201
201
  return {
202
202
  c1: new pt(i.x + F, i.y + M),
203
203
  c2: new pt(s.x + F, s.y + M)
204
204
  };
205
205
  }
206
206
  length() {
207
- let n = 0, g, l;
208
- for (let f = 0; f <= 10; f += 1) {
209
- const d = f / 10, c = this.point(d, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), i = this.point(d, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
210
- if (f > 0) {
211
- const s = c - g, h = i - l;
212
- n += Math.sqrt(s * s + h * h);
213
- }
214
- g = c, l = i;
207
+ let n = 0, g, u;
208
+ for (let h = 0; h <= 10; h += 1) {
209
+ const d = h / 10, c = this.point(d, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), i = this.point(d, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
210
+ if (h > 0) {
211
+ const s = c - g, f = i - u;
212
+ n += Math.sqrt(s * s + f * f);
213
+ }
214
+ g = c, u = i;
215
215
  }
216
216
  return n;
217
217
  }
218
- point(r, n, g, l, f) {
219
- return n * (1 - r) * (1 - r) * (1 - r) + 3 * g * (1 - r) * (1 - r) * r + 3 * l * (1 - r) * r * r + f * r * r * r;
218
+ point(r, n, g, u, h) {
219
+ return n * (1 - r) * (1 - r) * (1 - r) + 3 * g * (1 - r) * (1 - r) * r + 3 * u * (1 - r) * r * r + h * r * r * r;
220
220
  }
221
221
  }
222
- class Ht {
222
+ class Kt {
223
223
  constructor() {
224
224
  try {
225
225
  this._et = new EventTarget();
@@ -237,17 +237,17 @@ class Ht {
237
237
  this._et.removeEventListener(r, n, g);
238
238
  }
239
239
  }
240
- function jt(m, r = 250) {
241
- let n = 0, g = null, l, f, d;
240
+ function Vt(v, r = 250) {
241
+ let n = 0, g = null, u, h, d;
242
242
  const c = () => {
243
- n = Date.now(), g = null, l = m.apply(f, d), g || (f = null, d = []);
243
+ n = Date.now(), g = null, u = v.apply(h, d), g || (h = null, d = []);
244
244
  };
245
245
  return function(...s) {
246
- const h = Date.now(), a = r - (h - n);
247
- return f = this, d = s, a <= 0 || a > r ? (g && (clearTimeout(g), g = null), n = h, l = m.apply(f, d), g || (f = null, d = [])) : g || (g = window.setTimeout(c, a)), l;
246
+ const f = Date.now(), a = r - (f - n);
247
+ return h = this, d = s, a <= 0 || a > r ? (g && (clearTimeout(g), g = null), n = f, u = v.apply(h, d), g || (h = null, d = [])) : g || (g = window.setTimeout(c, a)), u;
248
248
  };
249
249
  }
250
- let Gt = class _t extends Ht {
250
+ let Jt = class Et extends Kt {
251
251
  constructor(r, n = {}) {
252
252
  super(), this.canvas = r, this._handleMouseDown = (g) => {
253
253
  g.buttons === 1 && (this._drawningStroke = !0, this._strokeBegin(g));
@@ -257,18 +257,18 @@ let Gt = class _t extends Ht {
257
257
  g.buttons === 1 && this._drawningStroke && (this._drawningStroke = !1, this._strokeEnd(g));
258
258
  }, this._handleTouchStart = (g) => {
259
259
  if (g.cancelable && g.preventDefault(), g.targetTouches.length === 1) {
260
- const l = g.changedTouches[0];
261
- this._strokeBegin(l);
260
+ const u = g.changedTouches[0];
261
+ this._strokeBegin(u);
262
262
  }
263
263
  }, this._handleTouchMove = (g) => {
264
264
  g.cancelable && g.preventDefault();
265
- const l = g.targetTouches[0];
266
- this._strokeMoveUpdate(l);
265
+ const u = g.targetTouches[0];
266
+ this._strokeMoveUpdate(u);
267
267
  }, this._handleTouchEnd = (g) => {
268
268
  if (g.target === this.canvas) {
269
269
  g.cancelable && g.preventDefault();
270
- const f = g.changedTouches[0];
271
- this._strokeEnd(f);
270
+ const h = g.changedTouches[0];
271
+ this._strokeEnd(h);
272
272
  }
273
273
  }, this._handlePointerStart = (g) => {
274
274
  this._drawningStroke = !0, g.preventDefault(), this._strokeBegin(g);
@@ -276,20 +276,20 @@ let Gt = class _t extends Ht {
276
276
  this._drawningStroke && (g.preventDefault(), this._strokeMoveUpdate(g));
277
277
  }, this._handlePointerEnd = (g) => {
278
278
  this._drawningStroke && (g.preventDefault(), this._drawningStroke = !1, this._strokeEnd(g));
279
- }, this.velocityFilterWeight = n.velocityFilterWeight || 0.7, this.minWidth = n.minWidth || 0.5, this.maxWidth = n.maxWidth || 2.5, this.throttle = "throttle" in n ? n.throttle : 16, this.minDistance = "minDistance" in n ? n.minDistance : 5, this.dotSize = n.dotSize || 0, this.penColor = n.penColor || "black", this.backgroundColor = n.backgroundColor || "rgba(0,0,0,0)", this._strokeMoveUpdate = this.throttle ? jt(_t.prototype._strokeUpdate, this.throttle) : _t.prototype._strokeUpdate, this._ctx = r.getContext("2d"), this.clear(), this.on();
279
+ }, this.velocityFilterWeight = n.velocityFilterWeight || 0.7, this.minWidth = n.minWidth || 0.5, this.maxWidth = n.maxWidth || 2.5, this.throttle = "throttle" in n ? n.throttle : 16, this.minDistance = "minDistance" in n ? n.minDistance : 5, this.dotSize = n.dotSize || 0, this.penColor = n.penColor || "black", this.backgroundColor = n.backgroundColor || "rgba(0,0,0,0)", this._strokeMoveUpdate = this.throttle ? Vt(Et.prototype._strokeUpdate, this.throttle) : Et.prototype._strokeUpdate, this._ctx = r.getContext("2d"), this.clear(), this.on();
280
280
  }
281
281
  clear() {
282
282
  const { _ctx: r, canvas: n } = this;
283
283
  r.fillStyle = this.backgroundColor, r.clearRect(0, 0, n.width, n.height), r.fillRect(0, 0, n.width, n.height), this._data = [], this._reset(this._getPointGroupOptions()), this._isEmpty = !0;
284
284
  }
285
285
  fromDataURL(r, n = {}) {
286
- return new Promise((g, l) => {
287
- const f = new Image(), d = n.ratio || window.devicePixelRatio || 1, c = n.width || this.canvas.width / d, i = n.height || this.canvas.height / d, s = n.xOffset || 0, h = n.yOffset || 0;
288
- this._reset(this._getPointGroupOptions()), f.onload = () => {
289
- this._ctx.drawImage(f, s, h, c, i), g();
290
- }, f.onerror = (a) => {
291
- l(a);
292
- }, f.crossOrigin = "anonymous", f.src = r, this._isEmpty = !1;
286
+ return new Promise((g, u) => {
287
+ const h = new Image(), d = n.ratio || window.devicePixelRatio || 1, c = n.width || this.canvas.width / d, i = n.height || this.canvas.height / d, s = n.xOffset || 0, f = n.yOffset || 0;
288
+ this._reset(this._getPointGroupOptions()), h.onload = () => {
289
+ this._ctx.drawImage(h, s, f, c, i), g();
290
+ }, h.onerror = (a) => {
291
+ u(a);
292
+ }, h.crossOrigin = "anonymous", h.src = r, this._isEmpty = !1;
293
293
  });
294
294
  }
295
295
  toDataURL(r = "image/png", n) {
@@ -337,14 +337,14 @@ let Gt = class _t extends Ht {
337
337
  return;
338
338
  }
339
339
  this.dispatchEvent(new CustomEvent("beforeUpdateStroke", { detail: r }));
340
- const n = r.clientX, g = r.clientY, l = r.pressure !== void 0 ? r.pressure : r.force !== void 0 ? r.force : 0, f = this._createPoint(n, g, l), d = this._data[this._data.length - 1], c = d.points, i = c.length > 0 && c[c.length - 1], s = i ? f.distanceTo(i) <= this.minDistance : !1, h = this._getPointGroupOptions(d);
340
+ const n = r.clientX, g = r.clientY, u = r.pressure !== void 0 ? r.pressure : r.force !== void 0 ? r.force : 0, h = this._createPoint(n, g, u), d = this._data[this._data.length - 1], c = d.points, i = c.length > 0 && c[c.length - 1], s = i ? h.distanceTo(i) <= this.minDistance : !1, f = this._getPointGroupOptions(d);
341
341
  if (!i || !(i && s)) {
342
- const a = this._addPoint(f, h);
343
- i ? a && this._drawCurve(a, h) : this._drawDot(f, h), c.push({
344
- time: f.time,
345
- x: f.x,
346
- y: f.y,
347
- pressure: f.pressure
342
+ const a = this._addPoint(h, f);
343
+ i ? a && this._drawCurve(a, f) : this._drawDot(h, f), c.push({
344
+ time: h.time,
345
+ x: h.x,
346
+ y: h.y,
347
+ pressure: h.pressure
348
348
  });
349
349
  }
350
350
  this.dispatchEvent(new CustomEvent("afterUpdateStroke", { detail: r }));
@@ -365,108 +365,108 @@ let Gt = class _t extends Ht {
365
365
  this._lastPoints = [], this._lastVelocity = 0, this._lastWidth = (r.minWidth + r.maxWidth) / 2, this._ctx.fillStyle = r.penColor;
366
366
  }
367
367
  _createPoint(r, n, g) {
368
- const l = this.canvas.getBoundingClientRect();
369
- return new pt(r - l.left, n - l.top, g, (/* @__PURE__ */ new Date()).getTime());
368
+ const u = this.canvas.getBoundingClientRect();
369
+ return new pt(r - u.left, n - u.top, g, (/* @__PURE__ */ new Date()).getTime());
370
370
  }
371
371
  _addPoint(r, n) {
372
372
  const { _lastPoints: g } = this;
373
373
  if (g.push(r), g.length > 2) {
374
374
  g.length === 3 && g.unshift(g[0]);
375
- const l = this._calculateCurveWidths(g[1], g[2], n), f = Ct.fromPoints(g, l);
376
- return g.shift(), f;
375
+ const u = this._calculateCurveWidths(g[1], g[2], n), h = bt.fromPoints(g, u);
376
+ return g.shift(), h;
377
377
  }
378
378
  return null;
379
379
  }
380
380
  _calculateCurveWidths(r, n, g) {
381
- const l = g.velocityFilterWeight * n.velocityFrom(r) + (1 - g.velocityFilterWeight) * this._lastVelocity, f = this._strokeWidth(l, g), d = {
382
- end: f,
381
+ const u = g.velocityFilterWeight * n.velocityFrom(r) + (1 - g.velocityFilterWeight) * this._lastVelocity, h = this._strokeWidth(u, g), d = {
382
+ end: h,
383
383
  start: this._lastWidth
384
384
  };
385
- return this._lastVelocity = l, this._lastWidth = f, d;
385
+ return this._lastVelocity = u, this._lastWidth = h, d;
386
386
  }
387
387
  _strokeWidth(r, n) {
388
388
  return Math.max(n.maxWidth / (r + 1), n.minWidth);
389
389
  }
390
390
  _drawCurveSegment(r, n, g) {
391
- const l = this._ctx;
392
- l.moveTo(r, n), l.arc(r, n, g, 0, 2 * Math.PI, !1), this._isEmpty = !1;
391
+ const u = this._ctx;
392
+ u.moveTo(r, n), u.arc(r, n, g, 0, 2 * Math.PI, !1), this._isEmpty = !1;
393
393
  }
394
394
  _drawCurve(r, n) {
395
- const g = this._ctx, l = r.endWidth - r.startWidth, f = Math.ceil(r.length()) * 2;
395
+ const g = this._ctx, u = r.endWidth - r.startWidth, h = Math.ceil(r.length()) * 2;
396
396
  g.beginPath(), g.fillStyle = n.penColor;
397
- for (let d = 0; d < f; d += 1) {
398
- const c = d / f, i = c * c, s = i * c, h = 1 - c, a = h * h, w = a * h;
397
+ for (let d = 0; d < h; d += 1) {
398
+ const c = d / h, i = c * c, s = i * c, f = 1 - c, a = f * f, w = a * f;
399
399
  let x = w * r.startPoint.x;
400
- x += 3 * a * c * r.control1.x, x += 3 * h * i * r.control2.x, x += s * r.endPoint.x;
400
+ x += 3 * a * c * r.control1.x, x += 3 * f * i * r.control2.x, x += s * r.endPoint.x;
401
401
  let b = w * r.startPoint.y;
402
- b += 3 * a * c * r.control1.y, b += 3 * h * i * r.control2.y, b += s * r.endPoint.y;
403
- const S = Math.min(r.startWidth + s * l, n.maxWidth);
404
- this._drawCurveSegment(x, b, S);
402
+ b += 3 * a * c * r.control1.y, b += 3 * f * i * r.control2.y, b += s * r.endPoint.y;
403
+ const A = Math.min(r.startWidth + s * u, n.maxWidth);
404
+ this._drawCurveSegment(x, b, A);
405
405
  }
406
406
  g.closePath(), g.fill();
407
407
  }
408
408
  _drawDot(r, n) {
409
- const g = this._ctx, l = n.dotSize > 0 ? n.dotSize : (n.minWidth + n.maxWidth) / 2;
410
- g.beginPath(), this._drawCurveSegment(r.x, r.y, l), g.closePath(), g.fillStyle = n.penColor, g.fill();
409
+ const g = this._ctx, u = n.dotSize > 0 ? n.dotSize : (n.minWidth + n.maxWidth) / 2;
410
+ g.beginPath(), this._drawCurveSegment(r.x, r.y, u), g.closePath(), g.fillStyle = n.penColor, g.fill();
411
411
  }
412
412
  _fromData(r, n, g) {
413
- for (const l of r) {
414
- const { points: f } = l, d = this._getPointGroupOptions(l);
415
- if (f.length > 1)
416
- for (let c = 0; c < f.length; c += 1) {
417
- const i = f[c], s = new pt(i.x, i.y, i.pressure, i.time);
413
+ for (const u of r) {
414
+ const { points: h } = u, d = this._getPointGroupOptions(u);
415
+ if (h.length > 1)
416
+ for (let c = 0; c < h.length; c += 1) {
417
+ const i = h[c], s = new pt(i.x, i.y, i.pressure, i.time);
418
418
  c === 0 && this._reset(d);
419
- const h = this._addPoint(s, d);
420
- h && n(h, d);
419
+ const f = this._addPoint(s, d);
420
+ f && n(f, d);
421
421
  }
422
422
  else
423
- this._reset(d), g(f[0], d);
423
+ this._reset(d), g(h[0], d);
424
424
  }
425
425
  }
426
426
  _toSVG() {
427
- const r = this._data, n = Math.max(window.devicePixelRatio || 1, 1), g = 0, l = 0, f = this.canvas.width / n, d = this.canvas.height / n, c = document.createElementNS("http://www.w3.org/2000/svg", "svg");
427
+ const r = this._data, n = Math.max(window.devicePixelRatio || 1, 1), g = 0, u = 0, h = this.canvas.width / n, d = this.canvas.height / n, c = document.createElementNS("http://www.w3.org/2000/svg", "svg");
428
428
  c.setAttribute("width", this.canvas.width.toString()), c.setAttribute("height", this.canvas.height.toString()), this._fromData(r, (x, { penColor: b }) => {
429
- const S = document.createElement("path");
429
+ const A = document.createElement("path");
430
430
  if (!isNaN(x.control1.x) && !isNaN(x.control1.y) && !isNaN(x.control2.x) && !isNaN(x.control2.y)) {
431
431
  const F = `M ${x.startPoint.x.toFixed(3)},${x.startPoint.y.toFixed(3)} C ${x.control1.x.toFixed(3)},${x.control1.y.toFixed(3)} ${x.control2.x.toFixed(3)},${x.control2.y.toFixed(3)} ${x.endPoint.x.toFixed(3)},${x.endPoint.y.toFixed(3)}`;
432
- S.setAttribute("d", F), S.setAttribute("stroke-width", (x.endWidth * 2.25).toFixed(3)), S.setAttribute("stroke", b), S.setAttribute("fill", "none"), S.setAttribute("stroke-linecap", "round"), c.appendChild(S);
432
+ A.setAttribute("d", F), A.setAttribute("stroke-width", (x.endWidth * 2.25).toFixed(3)), A.setAttribute("stroke", b), A.setAttribute("fill", "none"), A.setAttribute("stroke-linecap", "round"), c.appendChild(A);
433
433
  }
434
- }, (x, { penColor: b, dotSize: S, minWidth: F, maxWidth: M }) => {
435
- const C = document.createElement("circle"), T = S > 0 ? S : (F + M) / 2;
436
- C.setAttribute("r", T.toString()), C.setAttribute("cx", x.x.toString()), C.setAttribute("cy", x.y.toString()), C.setAttribute("fill", b), c.appendChild(C);
434
+ }, (x, { penColor: b, dotSize: A, minWidth: F, maxWidth: M }) => {
435
+ const C = document.createElement("circle"), B = A > 0 ? A : (F + M) / 2;
436
+ C.setAttribute("r", B.toString()), C.setAttribute("cx", x.x.toString()), C.setAttribute("cy", x.y.toString()), C.setAttribute("fill", b), c.appendChild(C);
437
437
  });
438
- const i = "data:image/svg+xml;base64,", s = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="${g} ${l} ${f} ${d}" width="${f}" height="${d}">`;
439
- let h = c.innerHTML;
440
- if (h === void 0) {
438
+ const i = "data:image/svg+xml;base64,", s = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="${g} ${u} ${h} ${d}" width="${h}" height="${d}">`;
439
+ let f = c.innerHTML;
440
+ if (f === void 0) {
441
441
  const x = document.createElement("dummy"), b = c.childNodes;
442
442
  x.innerHTML = "";
443
- for (let S = 0; S < b.length; S += 1)
444
- x.appendChild(b[S].cloneNode(!0));
445
- h = x.innerHTML;
443
+ for (let A = 0; A < b.length; A += 1)
444
+ x.appendChild(b[A].cloneNode(!0));
445
+ f = x.innerHTML;
446
446
  }
447
- const a = "</svg>", w = s + h + a;
447
+ const a = "</svg>", w = s + f + a;
448
448
  return i + btoa(w);
449
449
  }
450
- }, Vt = class extends Gt {
450
+ }, Xt = class extends Jt {
451
451
  fromText(r, n = {}) {
452
452
  if (this.clear(), !r)
453
453
  return;
454
- const { font: g, x: l = 10, y: f = 50 } = n;
454
+ const { font: g, x: u = 10, y: h = 50 } = n;
455
455
  let { maxWidth: d } = n;
456
456
  if (!d) {
457
457
  const { clientWidth: c = 300 } = this.canvas;
458
- d = Math.floor(c - 2 * l);
458
+ d = Math.floor(c - 2 * u);
459
459
  }
460
- this._ctx.font = g, this._ctx.fillText(r, l, f, d), this._isEmpty = !1;
460
+ this._ctx.font = g, this._ctx.fillText(r, u, h, d), this._isEmpty = !1;
461
461
  }
462
462
  };
463
- const Jt = {
463
+ const Qt = {
464
464
  name: "SignaturePad",
465
465
  props: {
466
466
  type: {
467
467
  type: String,
468
468
  default: "text",
469
- validator: (m) => ["text", "draw"].includes(m)
469
+ validator: (v) => ["text", "draw"].includes(v)
470
470
  },
471
471
  text: {
472
472
  type: String,
@@ -525,15 +525,15 @@ const Jt = {
525
525
  type() {
526
526
  this.initType();
527
527
  },
528
- text(m) {
529
- this.drawText(m);
528
+ text(v) {
529
+ this.drawText(v);
530
530
  }
531
531
  },
532
532
  mounted() {
533
- const { options: m, defaultOptions: r } = this, n = this.$refs.signaturePadCanvas;
534
- this.signaturePad = new Vt(n, {
533
+ const { options: v, defaultOptions: r } = this, n = this.$refs.signaturePadCanvas;
534
+ this.signaturePad = new Xt(n, {
535
535
  ...r,
536
- ...m
536
+ ...v
537
537
  }), this.onResizeHandler = this.resizeCanvas.bind(this), window.addEventListener("resize", this.onResizeHandler, !1), Object.keys(this.signEvents).forEach((g) => {
538
538
  this.signaturePad.addEventListener(g, () => {
539
539
  this.signEvents[g]();
@@ -548,56 +548,56 @@ const Jt = {
548
548
  this.type === "draw" ? this.openSignaturePad() : this.lockSignaturePad();
549
549
  },
550
550
  resizeCanvas() {
551
- const m = this.$refs.signaturePadCanvas, r = Math.max(window.devicePixelRatio || 1, 1);
552
- if (m.width = m.offsetWidth * r, m.height = m.offsetHeight * r, m.getContext("2d").scale(r, r), this.signaturePad.clear(), this.signatureData = "", this.type === "draw") {
551
+ const v = this.$refs.signaturePadCanvas, r = Math.max(window.devicePixelRatio || 1, 1);
552
+ if (v.width = v.offsetWidth * r, v.height = v.offsetHeight * r, v.getContext("2d").scale(r, r), this.signaturePad.clear(), this.signatureData = "", this.type === "draw") {
553
553
  const n = this.signaturePad.toData();
554
554
  n != null && n.length && this.signaturePad.fromData(n);
555
555
  } else
556
556
  this.type === "text" && this.drawText(this.text);
557
557
  },
558
- saveSignature(m = {}) {
559
- const { type: r = "image/png", trim: n = !0, encoderOptions: g } = m || {}, l = { isEmpty: !1, data: void 0 };
558
+ saveSignature(v = {}) {
559
+ const { type: r = "image/png", trim: n = !0, encoderOptions: g } = v || {}, u = { isEmpty: !1, data: void 0 };
560
560
  if (!this.validTypes.includes(r)) {
561
- const f = this.validTypes.join(", ");
561
+ const h = this.validTypes.join(", ");
562
562
  throw new Error(
563
- `The Image type is incorrect! We only support ${f} types.`
563
+ `The Image type is incorrect! We only support ${h} types.`
564
564
  );
565
565
  }
566
566
  if (this.signaturePad.isEmpty())
567
- return { ...l, isEmpty: !0 };
567
+ return { ...u, isEmpty: !0 };
568
568
  if (n) {
569
- const f = this.$refs.signaturePadCanvas, d = f ? this.trimCanvas(f) : null;
569
+ const h = this.$refs.signaturePadCanvas, d = h ? this.trimCanvas(h) : null;
570
570
  this.signatureData = d ? d.toDataURL(r, g) : "";
571
571
  } else
572
572
  this.signatureData = this.signaturePad.toDataURL(r, g);
573
573
  return {
574
- ...l,
574
+ ...u,
575
575
  data: this.signatureData
576
576
  };
577
577
  },
578
578
  undoSignature() {
579
- const { signaturePad: m } = this, r = m.toData();
580
- r && m.fromData(r.slice(0, -1));
579
+ const { signaturePad: v } = this, r = v.toData();
580
+ r && v.fromData(r.slice(0, -1));
581
581
  },
582
- drawText(m) {
583
- this.signaturePad.fromText(m, {
582
+ drawText(v) {
583
+ this.signaturePad.fromText(v, {
584
584
  font: '40px "Nothing You Could Do"',
585
585
  x: 10,
586
586
  y: 100
587
587
  });
588
588
  },
589
589
  // Extend of module methods
590
- fromText(...m) {
591
- return this.signaturePad.fromText(...m);
590
+ fromText(...v) {
591
+ return this.signaturePad.fromText(...v);
592
592
  },
593
- fromDataURL(...m) {
594
- return this.signaturePad.fromDataURL(...m);
593
+ fromDataURL(...v) {
594
+ return this.signaturePad.fromDataURL(...v);
595
595
  },
596
- fromData(...m) {
597
- return this.signaturePad.fromData(...m);
596
+ fromData(...v) {
597
+ return this.signaturePad.fromData(...v);
598
598
  },
599
- toData(...m) {
600
- return this.signaturePad.toData(...m);
599
+ toData(...v) {
600
+ return this.signaturePad.toData(...v);
601
601
  },
602
602
  lockSignaturePad() {
603
603
  return this.signaturePad.off();
@@ -611,30 +611,30 @@ const Jt = {
611
611
  clearSignature() {
612
612
  return this.signaturePad.clear();
613
613
  },
614
- trimCanvas(m) {
614
+ trimCanvas(v) {
615
615
  const r = document.createElement("canvas"), n = r.getContext("2d");
616
- r.width = m.width, r.height = m.height, n.drawImage(m, 0, 0);
617
- let g = r.width, l = r.height;
618
- const f = { x: [], y: [] }, d = n.getImageData(
616
+ r.width = v.width, r.height = v.height, n.drawImage(v, 0, 0);
617
+ let g = r.width, u = r.height;
618
+ const h = { x: [], y: [] }, d = n.getImageData(
619
619
  0,
620
620
  0,
621
621
  r.width,
622
622
  r.height
623
623
  );
624
624
  let c = 0;
625
- for (let h = 0; h < l; h++)
625
+ for (let f = 0; f < u; f++)
626
626
  for (let a = 0; a < g; a++)
627
- c = (h * g + a) * 4, d.data[c + 3] > 0 && (f.x.push(a), f.y.push(h));
628
- f.x.sort((h, a) => h - a), f.y.sort((h, a) => h - a);
629
- const i = f.x.length - 1;
630
- g = f.x[i] - f.x[0], l = f.y[i] - f.y[0];
631
- const s = n.getImageData(f.x[0], f.y[0], g, l);
632
- return r.height = l, n.putImageData(s, 0, 0), r;
627
+ c = (f * g + a) * 4, d.data[c + 3] > 0 && (h.x.push(a), h.y.push(f));
628
+ h.x.sort((f, a) => f - a), h.y.sort((f, a) => f - a);
629
+ const i = h.x.length - 1;
630
+ g = h.x[i] - h.x[0], u = h.y[i] - h.y[0];
631
+ const s = n.getImageData(h.x[0], h.y[0], g, u);
632
+ return r.height = u, n.putImageData(s, 0, 0), r;
633
633
  }
634
634
  },
635
- render(m) {
635
+ render(v) {
636
636
  const { width: r, height: n, customStyle: g } = this;
637
- return m(
637
+ return v(
638
638
  "div",
639
639
  {
640
640
  style: {
@@ -644,7 +644,7 @@ const Jt = {
644
644
  }
645
645
  },
646
646
  [
647
- m("canvas", {
647
+ v("canvas", {
648
648
  style: {
649
649
  width: "100%",
650
650
  height: "100%"
@@ -654,34 +654,40 @@ const Jt = {
654
654
  ]
655
655
  );
656
656
  }
657
- }, Kt = null, Xt = null;
658
- var Qt = /* @__PURE__ */ ot(
659
- Jt,
660
- Kt,
661
- Xt,
657
+ }, qt = null, Zt = null;
658
+ var te = /* @__PURE__ */ ot(
659
+ Qt,
660
+ qt,
661
+ Zt,
662
662
  !1,
663
663
  null,
664
664
  null,
665
665
  null,
666
666
  null
667
667
  );
668
- const qt = Qt.exports;
669
- function Zt({ rel: m, href: r, crossorigin: n = !1 }) {
668
+ const ee = te.exports;
669
+ function re({ rel: v, href: r, crossorigin: n = !1 }) {
670
670
  const g = document.createElement("link");
671
- g.rel = m, g.href = r, g.crossorigin = n, document.head.appendChild(g);
671
+ g.rel = v, g.href = r, g.crossorigin = n, document.head.appendChild(g);
672
672
  }
673
- const te = [
673
+ const ne = [
674
674
  { rel: "preconnect", href: "https://fonts.googleapis.com" },
675
675
  { rel: "preconnect", href: "https://fonts.gstatic.com", crossorigin: !0 },
676
676
  {
677
677
  rel: "stylesheet",
678
678
  href: "https://fonts.googleapis.com/css2?family=Nothing+You+Could+Do&display=swap"
679
679
  }
680
- ], ee = {
680
+ ], ie = {
681
681
  name: "SignatureAnswer",
682
682
  components: {
683
- CField: $t,
684
- SignaturePad: qt
683
+ CField: Lt,
684
+ SignaturePad: ee
685
+ },
686
+ props: {
687
+ onCompleteFunc: {
688
+ type: Function,
689
+ default: null
690
+ }
685
691
  },
686
692
  mixins: [ft([])],
687
693
  data() {
@@ -693,8 +699,8 @@ const te = [
693
699
  };
694
700
  },
695
701
  watch: {
696
- mode(m) {
697
- this.reset(), this.$refs.signaturePad && m === "text" && this.focusName();
702
+ mode(v) {
703
+ this.reset(), this.$refs.signaturePad && v === "text" && this.focusName();
698
704
  },
699
705
  text() {
700
706
  this.$refs.signaturePad && this.$nextTick(() => {
@@ -703,13 +709,13 @@ const te = [
703
709
  },
704
710
  isEmpty: {
705
711
  immediate: !0,
706
- handler(m) {
707
- this.$emit("invalid", m);
712
+ handler(v) {
713
+ this.$emit("invalid", v);
708
714
  }
709
715
  }
710
716
  },
711
717
  created() {
712
- te.forEach(Zt);
718
+ ne.forEach(re);
713
719
  },
714
720
  mounted() {
715
721
  this.focusName();
@@ -722,16 +728,16 @@ const te = [
722
728
  this.$refs.signaturePad && (this.mode === "text" && this.text ? this.text = this.text.slice(0, this.text.length - 1) : this.$refs.signaturePad.undoSignature(), this.isEmpty = this.$refs.signaturePad.isEmpty());
723
729
  },
724
730
  getSignatureData() {
725
- let m = { type: "image/png", trim: !0 };
726
- this.mode === "draw" && (m = { type: "image/svg+xml", trim: !1 });
727
- const { isEmpty: r, data: n } = this.$refs.signaturePad ? this.$refs.signaturePad.saveSignature(m) : {};
731
+ let v = { type: "image/png", trim: !0 };
732
+ this.mode === "draw" && (v = { type: "image/svg+xml", trim: !1 });
733
+ const { isEmpty: r, data: n } = this.$refs.signaturePad ? this.$refs.signaturePad.saveSignature(v) : {};
728
734
  if (r || !n)
729
735
  throw Error("Missing signatureData");
730
736
  return n;
731
737
  },
732
- async submit({ answer: m }) {
738
+ async submit({ answer: v }) {
733
739
  const r = this.getSignatureData();
734
- await m({ body: { isAccepted: !0, signatureDataURL: r } }), this.$emit("complete");
740
+ await v({ body: { isAccepted: !0, signatureDataURL: r } }), typeof this.onCompleteFunc == "function" && this.onCompleteFunc();
735
741
  },
736
742
  focusName() {
737
743
  this.$nextTick(
@@ -740,7 +746,7 @@ const te = [
740
746
  }
741
747
  }
742
748
  };
743
- var re = function() {
749
+ var ae = function() {
744
750
  var r = this, n = r._self._c;
745
751
  return n("div", { staticStyle: { "text-align": "left" } }, [n("div", { staticClass: "flex w-full items-center justify-between", staticStyle: { "font-size": "16px", "padding-bottom": "1em", "font-weight": "500", color: "hsl(0, 0%, 11%)" } }, [n("div", [r._v(r._s(r._document.$t("answerModal.signature.component.subTitle")))]), n("div", { staticClass: "sign-toggle" }, [n("div", { staticClass: "sign-toggle-button", class: { active: r.mode === "text" }, on: { click: function(g) {
746
752
  r.mode = "text";
@@ -755,17 +761,17 @@ var re = function() {
755
761
  r.isEmpty = r.$refs.signaturePad ? r.$refs.signaturePad.isEmpty() : !0;
756
762
  }
757
763
  } } })], 1), n("div", { directives: [{ name: "show", rawName: "v-show", value: r.mode === "draw", expression: "mode === 'draw'" }], staticClass: "flex w-full justify-end" }, [n("CButton", { attrs: { disabled: r.isEmpty, type: "text", size: "small", pattern: "tertiary", circle: "", icon: "trash" }, on: { click: r.reset } }), n("CButton", { attrs: { disabled: r.isEmpty, type: "text", size: "small", pattern: "tertiary", circle: "", icon: "rotate-left" }, on: { click: r.undo } })], 1), n("div", { staticClass: "text-center", staticStyle: { "font-size": "12px", color: "hsl(0, 0%, 45%)", "padding-top": "10px" } }, [r._v(" " + r._s(r._document.$t("answerModal.signature.component.terms")) + " ")])], 1);
758
- }, ne = [], ie = /* @__PURE__ */ ot(
759
- ee,
760
- re,
761
- ne,
764
+ }, oe = [], se = /* @__PURE__ */ ot(
765
+ ie,
766
+ ae,
767
+ oe,
762
768
  !1,
763
769
  null,
764
- "8e2ef7ac",
770
+ "2545fee5",
765
771
  null,
766
772
  null
767
773
  );
768
- const ae = ie.exports;
774
+ const ue = se.exports;
769
775
  /*!
770
776
  * vue-qrcode v1.0.2
771
777
  * https://fengyuanchen.github.io/vue-qrcode
@@ -778,61 +784,61 @@ const ae = ie.exports;
778
784
  function gt() {
779
785
  throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs");
780
786
  }
781
- function oe(m, r) {
782
- return r = { exports: {} }, m(r, r.exports), r.exports;
787
+ function le(v, r) {
788
+ return r = { exports: {} }, v(r, r.exports), r.exports;
783
789
  }
784
- var xt = oe(function(m, r) {
790
+ var xt = le(function(v, r) {
785
791
  (function(n) {
786
- m.exports = n();
792
+ v.exports = n();
787
793
  })(function() {
788
794
  return function() {
789
- function n(g, l, f) {
790
- function d(s, h) {
791
- if (!l[s]) {
795
+ function n(g, u, h) {
796
+ function d(s, f) {
797
+ if (!u[s]) {
792
798
  if (!g[s]) {
793
799
  var a = typeof gt == "function" && gt;
794
- if (!h && a)
800
+ if (!f && a)
795
801
  return a(s, !0);
796
802
  if (c)
797
803
  return c(s, !0);
798
804
  var w = new Error("Cannot find module '" + s + "'");
799
805
  throw w.code = "MODULE_NOT_FOUND", w;
800
806
  }
801
- var x = l[s] = { exports: {} };
807
+ var x = u[s] = { exports: {} };
802
808
  g[s][0].call(x.exports, function(b) {
803
- var S = g[s][1][b];
804
- return d(S || b);
805
- }, x, x.exports, n, g, l, f);
809
+ var A = g[s][1][b];
810
+ return d(A || b);
811
+ }, x, x.exports, n, g, u, h);
806
812
  }
807
- return l[s].exports;
813
+ return u[s].exports;
808
814
  }
809
- for (var c = typeof gt == "function" && gt, i = 0; i < f.length; i++)
810
- d(f[i]);
815
+ for (var c = typeof gt == "function" && gt, i = 0; i < h.length; i++)
816
+ d(h[i]);
811
817
  return d;
812
818
  }
813
819
  return n;
814
- }()({ 1: [function(n, g, l) {
820
+ }()({ 1: [function(n, g, u) {
815
821
  g.exports = function() {
816
822
  return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
817
823
  };
818
- }, {}], 2: [function(n, g, l) {
819
- var f = n("./utils").getSymbolSize;
820
- l.getRowColCoords = function(c) {
824
+ }, {}], 2: [function(n, g, u) {
825
+ var h = n("./utils").getSymbolSize;
826
+ u.getRowColCoords = function(c) {
821
827
  if (c === 1)
822
828
  return [];
823
- for (var i = Math.floor(c / 7) + 2, s = f(c), h = s === 145 ? 26 : Math.ceil((s - 13) / (2 * i - 2)) * 2, a = [s - 7], w = 1; w < i - 1; w++)
824
- a[w] = a[w - 1] - h;
829
+ for (var i = Math.floor(c / 7) + 2, s = h(c), f = s === 145 ? 26 : Math.ceil((s - 13) / (2 * i - 2)) * 2, a = [s - 7], w = 1; w < i - 1; w++)
830
+ a[w] = a[w - 1] - f;
825
831
  return a.push(6), a.reverse();
826
- }, l.getPositions = function(c) {
827
- for (var i = [], s = l.getRowColCoords(c), h = s.length, a = 0; a < h; a++)
828
- for (var w = 0; w < h; w++)
832
+ }, u.getPositions = function(c) {
833
+ for (var i = [], s = u.getRowColCoords(c), f = s.length, a = 0; a < f; a++)
834
+ for (var w = 0; w < f; w++)
829
835
  a === 0 && w === 0 || // top-left
830
- a === 0 && w === h - 1 || // bottom-left
831
- a === h - 1 && w === 0 || i.push([s[a], s[w]]);
836
+ a === 0 && w === f - 1 || // bottom-left
837
+ a === f - 1 && w === 0 || i.push([s[a], s[w]]);
832
838
  return i;
833
839
  };
834
- }, { "./utils": 21 }], 3: [function(n, g, l) {
835
- var f = n("./mode"), d = [
840
+ }, { "./utils": 21 }], 3: [function(n, g, u) {
841
+ var h = n("./mode"), d = [
836
842
  "0",
837
843
  "1",
838
844
  "2",
@@ -880,7 +886,7 @@ var xt = oe(function(m, r) {
880
886
  ":"
881
887
  ];
882
888
  function c(i) {
883
- this.mode = f.ALPHANUMERIC, this.data = i;
889
+ this.mode = h.ALPHANUMERIC, this.data = i;
884
890
  }
885
891
  c.getBitsLength = function(s) {
886
892
  return 11 * Math.floor(s / 2) + 6 * (s % 2);
@@ -889,18 +895,18 @@ var xt = oe(function(m, r) {
889
895
  }, c.prototype.getBitsLength = function() {
890
896
  return c.getBitsLength(this.data.length);
891
897
  }, c.prototype.write = function(s) {
892
- var h;
893
- for (h = 0; h + 2 <= this.data.length; h += 2) {
894
- var a = d.indexOf(this.data[h]) * 45;
895
- a += d.indexOf(this.data[h + 1]), s.put(a, 11);
898
+ var f;
899
+ for (f = 0; f + 2 <= this.data.length; f += 2) {
900
+ var a = d.indexOf(this.data[f]) * 45;
901
+ a += d.indexOf(this.data[f + 1]), s.put(a, 11);
896
902
  }
897
- this.data.length % 2 && s.put(d.indexOf(this.data[h]), 6);
903
+ this.data.length % 2 && s.put(d.indexOf(this.data[f]), 6);
898
904
  }, g.exports = c;
899
- }, { "./mode": 14 }], 4: [function(n, g, l) {
900
- function f() {
905
+ }, { "./mode": 14 }], 4: [function(n, g, u) {
906
+ function h() {
901
907
  this.buffer = [], this.length = 0;
902
908
  }
903
- f.prototype = {
909
+ h.prototype = {
904
910
  get: function(d) {
905
911
  var c = Math.floor(d / 8);
906
912
  return (this.buffer[c] >>> 7 - d % 8 & 1) === 1;
@@ -916,17 +922,17 @@ var xt = oe(function(m, r) {
916
922
  var c = Math.floor(this.length / 8);
917
923
  this.buffer.length <= c && this.buffer.push(0), d && (this.buffer[c] |= 128 >>> this.length % 8), this.length++;
918
924
  }
919
- }, g.exports = f;
920
- }, {}], 5: [function(n, g, l) {
921
- var f = n("../utils/buffer");
925
+ }, g.exports = h;
926
+ }, {}], 5: [function(n, g, u) {
927
+ var h = n("../utils/buffer");
922
928
  function d(c) {
923
929
  if (!c || c < 1)
924
930
  throw new Error("BitMatrix size must be defined and greater than 0");
925
- this.size = c, this.data = f.alloc(c * c), this.reservedBit = f.alloc(c * c);
931
+ this.size = c, this.data = h.alloc(c * c), this.reservedBit = h.alloc(c * c);
926
932
  }
927
- d.prototype.set = function(c, i, s, h) {
933
+ d.prototype.set = function(c, i, s, f) {
928
934
  var a = c * this.size + i;
929
- this.data[a] = s, h && (this.reservedBit[a] = !0);
935
+ this.data[a] = s, f && (this.reservedBit[a] = !0);
930
936
  }, d.prototype.get = function(c, i) {
931
937
  return this.data[c * this.size + i];
932
938
  }, d.prototype.xor = function(c, i, s) {
@@ -934,10 +940,10 @@ var xt = oe(function(m, r) {
934
940
  }, d.prototype.isReserved = function(c, i) {
935
941
  return this.reservedBit[c * this.size + i];
936
942
  }, g.exports = d;
937
- }, { "../utils/buffer": 28 }], 6: [function(n, g, l) {
938
- var f = n("../utils/buffer"), d = n("./mode");
943
+ }, { "../utils/buffer": 28 }], 6: [function(n, g, u) {
944
+ var h = n("../utils/buffer"), d = n("./mode");
939
945
  function c(i) {
940
- this.mode = d.BYTE, this.data = f.from(i);
946
+ this.mode = d.BYTE, this.data = h.from(i);
941
947
  }
942
948
  c.getBitsLength = function(s) {
943
949
  return s * 8;
@@ -946,11 +952,11 @@ var xt = oe(function(m, r) {
946
952
  }, c.prototype.getBitsLength = function() {
947
953
  return c.getBitsLength(this.data.length);
948
954
  }, c.prototype.write = function(i) {
949
- for (var s = 0, h = this.data.length; s < h; s++)
955
+ for (var s = 0, f = this.data.length; s < f; s++)
950
956
  i.put(this.data[s], 8);
951
957
  }, g.exports = c;
952
- }, { "../utils/buffer": 28, "./mode": 14 }], 7: [function(n, g, l) {
953
- var f = n("./error-correction-level"), d = [
958
+ }, { "../utils/buffer": 28, "./mode": 14 }], 7: [function(n, g, u) {
959
+ var h = n("./error-correction-level"), d = [
954
960
  // L M Q H
955
961
  1,
956
962
  1,
@@ -1275,71 +1281,71 @@ var xt = oe(function(m, r) {
1275
1281
  2040,
1276
1282
  2430
1277
1283
  ];
1278
- l.getBlocksCount = function(s, h) {
1279
- switch (h) {
1280
- case f.L:
1284
+ u.getBlocksCount = function(s, f) {
1285
+ switch (f) {
1286
+ case h.L:
1281
1287
  return d[(s - 1) * 4 + 0];
1282
- case f.M:
1288
+ case h.M:
1283
1289
  return d[(s - 1) * 4 + 1];
1284
- case f.Q:
1290
+ case h.Q:
1285
1291
  return d[(s - 1) * 4 + 2];
1286
- case f.H:
1292
+ case h.H:
1287
1293
  return d[(s - 1) * 4 + 3];
1288
1294
  default:
1289
1295
  return;
1290
1296
  }
1291
- }, l.getTotalCodewordsCount = function(s, h) {
1292
- switch (h) {
1293
- case f.L:
1297
+ }, u.getTotalCodewordsCount = function(s, f) {
1298
+ switch (f) {
1299
+ case h.L:
1294
1300
  return c[(s - 1) * 4 + 0];
1295
- case f.M:
1301
+ case h.M:
1296
1302
  return c[(s - 1) * 4 + 1];
1297
- case f.Q:
1303
+ case h.Q:
1298
1304
  return c[(s - 1) * 4 + 2];
1299
- case f.H:
1305
+ case h.H:
1300
1306
  return c[(s - 1) * 4 + 3];
1301
1307
  default:
1302
1308
  return;
1303
1309
  }
1304
1310
  };
1305
- }, { "./error-correction-level": 8 }], 8: [function(n, g, l) {
1306
- l.L = { bit: 1 }, l.M = { bit: 0 }, l.Q = { bit: 3 }, l.H = { bit: 2 };
1307
- function f(d) {
1311
+ }, { "./error-correction-level": 8 }], 8: [function(n, g, u) {
1312
+ u.L = { bit: 1 }, u.M = { bit: 0 }, u.Q = { bit: 3 }, u.H = { bit: 2 };
1313
+ function h(d) {
1308
1314
  if (typeof d != "string")
1309
1315
  throw new Error("Param is not a string");
1310
1316
  var c = d.toLowerCase();
1311
1317
  switch (c) {
1312
1318
  case "l":
1313
1319
  case "low":
1314
- return l.L;
1320
+ return u.L;
1315
1321
  case "m":
1316
1322
  case "medium":
1317
- return l.M;
1323
+ return u.M;
1318
1324
  case "q":
1319
1325
  case "quartile":
1320
- return l.Q;
1326
+ return u.Q;
1321
1327
  case "h":
1322
1328
  case "high":
1323
- return l.H;
1329
+ return u.H;
1324
1330
  default:
1325
1331
  throw new Error("Unknown EC Level: " + d);
1326
1332
  }
1327
1333
  }
1328
- l.isValid = function(c) {
1334
+ u.isValid = function(c) {
1329
1335
  return c && typeof c.bit < "u" && c.bit >= 0 && c.bit < 4;
1330
- }, l.from = function(c, i) {
1331
- if (l.isValid(c))
1336
+ }, u.from = function(c, i) {
1337
+ if (u.isValid(c))
1332
1338
  return c;
1333
1339
  try {
1334
- return f(c);
1340
+ return h(c);
1335
1341
  } catch {
1336
1342
  return i;
1337
1343
  }
1338
1344
  };
1339
- }, {}], 9: [function(n, g, l) {
1340
- var f = n("./utils").getSymbolSize, d = 7;
1341
- l.getPositions = function(i) {
1342
- var s = f(i);
1345
+ }, {}], 9: [function(n, g, u) {
1346
+ var h = n("./utils").getSymbolSize, d = 7;
1347
+ u.getPositions = function(i) {
1348
+ var s = h(i);
1343
1349
  return [
1344
1350
  // top-left
1345
1351
  [0, 0],
@@ -1349,33 +1355,33 @@ var xt = oe(function(m, r) {
1349
1355
  [0, s - d]
1350
1356
  ];
1351
1357
  };
1352
- }, { "./utils": 21 }], 10: [function(n, g, l) {
1353
- var f = n("./utils"), d = 1335, c = 21522, i = f.getBCHDigit(d);
1354
- l.getEncodedBits = function(h, a) {
1355
- for (var w = h.bit << 3 | a, x = w << 10; f.getBCHDigit(x) - i >= 0; )
1356
- x ^= d << f.getBCHDigit(x) - i;
1358
+ }, { "./utils": 21 }], 10: [function(n, g, u) {
1359
+ var h = n("./utils"), d = 1335, c = 21522, i = h.getBCHDigit(d);
1360
+ u.getEncodedBits = function(f, a) {
1361
+ for (var w = f.bit << 3 | a, x = w << 10; h.getBCHDigit(x) - i >= 0; )
1362
+ x ^= d << h.getBCHDigit(x) - i;
1357
1363
  return (w << 10 | x) ^ c;
1358
1364
  };
1359
- }, { "./utils": 21 }], 11: [function(n, g, l) {
1360
- var f = n("../utils/buffer"), d = f.alloc(512), c = f.alloc(256);
1365
+ }, { "./utils": 21 }], 11: [function(n, g, u) {
1366
+ var h = n("../utils/buffer"), d = h.alloc(512), c = h.alloc(256);
1361
1367
  (function() {
1362
- for (var s = 1, h = 0; h < 255; h++)
1363
- d[h] = s, c[s] = h, s <<= 1, s & 256 && (s ^= 285);
1364
- for (h = 255; h < 512; h++)
1365
- d[h] = d[h - 255];
1366
- })(), l.log = function(s) {
1368
+ for (var s = 1, f = 0; f < 255; f++)
1369
+ d[f] = s, c[s] = f, s <<= 1, s & 256 && (s ^= 285);
1370
+ for (f = 255; f < 512; f++)
1371
+ d[f] = d[f - 255];
1372
+ })(), u.log = function(s) {
1367
1373
  if (s < 1)
1368
1374
  throw new Error("log(" + s + ")");
1369
1375
  return c[s];
1370
- }, l.exp = function(s) {
1376
+ }, u.exp = function(s) {
1371
1377
  return d[s];
1372
- }, l.mul = function(s, h) {
1373
- return s === 0 || h === 0 ? 0 : d[c[s] + c[h]];
1378
+ }, u.mul = function(s, f) {
1379
+ return s === 0 || f === 0 ? 0 : d[c[s] + c[f]];
1374
1380
  };
1375
- }, { "../utils/buffer": 28 }], 12: [function(n, g, l) {
1376
- var f = n("./mode"), d = n("./utils");
1381
+ }, { "../utils/buffer": 28 }], 12: [function(n, g, u) {
1382
+ var h = n("./mode"), d = n("./utils");
1377
1383
  function c(i) {
1378
- this.mode = f.KANJI, this.data = i;
1384
+ this.mode = h.KANJI, this.data = i;
1379
1385
  }
1380
1386
  c.getBitsLength = function(s) {
1381
1387
  return s * 13;
@@ -1386,21 +1392,21 @@ var xt = oe(function(m, r) {
1386
1392
  }, c.prototype.write = function(i) {
1387
1393
  var s;
1388
1394
  for (s = 0; s < this.data.length; s++) {
1389
- var h = d.toSJIS(this.data[s]);
1390
- if (h >= 33088 && h <= 40956)
1391
- h -= 33088;
1392
- else if (h >= 57408 && h <= 60351)
1393
- h -= 49472;
1395
+ var f = d.toSJIS(this.data[s]);
1396
+ if (f >= 33088 && f <= 40956)
1397
+ f -= 33088;
1398
+ else if (f >= 57408 && f <= 60351)
1399
+ f -= 49472;
1394
1400
  else
1395
1401
  throw new Error(
1396
1402
  "Invalid SJIS character: " + this.data[s] + `
1397
1403
  Make sure your charset is UTF-8`
1398
1404
  );
1399
- h = (h >>> 8 & 255) * 192 + (h & 255), i.put(h, 13);
1405
+ f = (f >>> 8 & 255) * 192 + (f & 255), i.put(f, 13);
1400
1406
  }
1401
1407
  }, g.exports = c;
1402
- }, { "./mode": 14, "./utils": 21 }], 13: [function(n, g, l) {
1403
- l.Patterns = {
1408
+ }, { "./mode": 14, "./utils": 21 }], 13: [function(n, g, u) {
1409
+ u.Patterns = {
1404
1410
  PATTERN000: 0,
1405
1411
  PATTERN001: 1,
1406
1412
  PATTERN010: 2,
@@ -1410,113 +1416,113 @@ Make sure your charset is UTF-8`
1410
1416
  PATTERN110: 6,
1411
1417
  PATTERN111: 7
1412
1418
  };
1413
- var f = {
1419
+ var h = {
1414
1420
  N1: 3,
1415
1421
  N2: 3,
1416
1422
  N3: 40,
1417
1423
  N4: 10
1418
1424
  };
1419
- l.isValid = function(i) {
1425
+ u.isValid = function(i) {
1420
1426
  return i != null && i !== "" && !isNaN(i) && i >= 0 && i <= 7;
1421
- }, l.from = function(i) {
1422
- return l.isValid(i) ? parseInt(i, 10) : void 0;
1423
- }, l.getPenaltyN1 = function(i) {
1424
- for (var s = i.size, h = 0, a = 0, w = 0, x = null, b = null, S = 0; S < s; S++) {
1427
+ }, u.from = function(i) {
1428
+ return u.isValid(i) ? parseInt(i, 10) : void 0;
1429
+ }, u.getPenaltyN1 = function(i) {
1430
+ for (var s = i.size, f = 0, a = 0, w = 0, x = null, b = null, A = 0; A < s; A++) {
1425
1431
  a = w = 0, x = b = null;
1426
1432
  for (var F = 0; F < s; F++) {
1427
- var M = i.get(S, F);
1428
- M === x ? a++ : (a >= 5 && (h += f.N1 + (a - 5)), x = M, a = 1), M = i.get(F, S), M === b ? w++ : (w >= 5 && (h += f.N1 + (w - 5)), b = M, w = 1);
1433
+ var M = i.get(A, F);
1434
+ M === x ? a++ : (a >= 5 && (f += h.N1 + (a - 5)), x = M, a = 1), M = i.get(F, A), M === b ? w++ : (w >= 5 && (f += h.N1 + (w - 5)), b = M, w = 1);
1429
1435
  }
1430
- a >= 5 && (h += f.N1 + (a - 5)), w >= 5 && (h += f.N1 + (w - 5));
1436
+ a >= 5 && (f += h.N1 + (a - 5)), w >= 5 && (f += h.N1 + (w - 5));
1431
1437
  }
1432
- return h;
1433
- }, l.getPenaltyN2 = function(i) {
1434
- for (var s = i.size, h = 0, a = 0; a < s - 1; a++)
1438
+ return f;
1439
+ }, u.getPenaltyN2 = function(i) {
1440
+ for (var s = i.size, f = 0, a = 0; a < s - 1; a++)
1435
1441
  for (var w = 0; w < s - 1; w++) {
1436
1442
  var x = i.get(a, w) + i.get(a, w + 1) + i.get(a + 1, w) + i.get(a + 1, w + 1);
1437
- (x === 4 || x === 0) && h++;
1443
+ (x === 4 || x === 0) && f++;
1438
1444
  }
1439
- return h * f.N2;
1440
- }, l.getPenaltyN3 = function(i) {
1441
- for (var s = i.size, h = 0, a = 0, w = 0, x = 0; x < s; x++) {
1445
+ return f * h.N2;
1446
+ }, u.getPenaltyN3 = function(i) {
1447
+ for (var s = i.size, f = 0, a = 0, w = 0, x = 0; x < s; x++) {
1442
1448
  a = w = 0;
1443
1449
  for (var b = 0; b < s; b++)
1444
- a = a << 1 & 2047 | i.get(x, b), b >= 10 && (a === 1488 || a === 93) && h++, w = w << 1 & 2047 | i.get(b, x), b >= 10 && (w === 1488 || w === 93) && h++;
1450
+ a = a << 1 & 2047 | i.get(x, b), b >= 10 && (a === 1488 || a === 93) && f++, w = w << 1 & 2047 | i.get(b, x), b >= 10 && (w === 1488 || w === 93) && f++;
1445
1451
  }
1446
- return h * f.N3;
1447
- }, l.getPenaltyN4 = function(i) {
1448
- for (var s = 0, h = i.data.length, a = 0; a < h; a++)
1452
+ return f * h.N3;
1453
+ }, u.getPenaltyN4 = function(i) {
1454
+ for (var s = 0, f = i.data.length, a = 0; a < f; a++)
1449
1455
  s += i.data[a];
1450
- var w = Math.abs(Math.ceil(s * 100 / h / 5) - 10);
1451
- return w * f.N4;
1456
+ var w = Math.abs(Math.ceil(s * 100 / f / 5) - 10);
1457
+ return w * h.N4;
1452
1458
  };
1453
1459
  function d(c, i, s) {
1454
1460
  switch (c) {
1455
- case l.Patterns.PATTERN000:
1461
+ case u.Patterns.PATTERN000:
1456
1462
  return (i + s) % 2 === 0;
1457
- case l.Patterns.PATTERN001:
1463
+ case u.Patterns.PATTERN001:
1458
1464
  return i % 2 === 0;
1459
- case l.Patterns.PATTERN010:
1465
+ case u.Patterns.PATTERN010:
1460
1466
  return s % 3 === 0;
1461
- case l.Patterns.PATTERN011:
1467
+ case u.Patterns.PATTERN011:
1462
1468
  return (i + s) % 3 === 0;
1463
- case l.Patterns.PATTERN100:
1469
+ case u.Patterns.PATTERN100:
1464
1470
  return (Math.floor(i / 2) + Math.floor(s / 3)) % 2 === 0;
1465
- case l.Patterns.PATTERN101:
1471
+ case u.Patterns.PATTERN101:
1466
1472
  return i * s % 2 + i * s % 3 === 0;
1467
- case l.Patterns.PATTERN110:
1473
+ case u.Patterns.PATTERN110:
1468
1474
  return (i * s % 2 + i * s % 3) % 2 === 0;
1469
- case l.Patterns.PATTERN111:
1475
+ case u.Patterns.PATTERN111:
1470
1476
  return (i * s % 3 + (i + s) % 2) % 2 === 0;
1471
1477
  default:
1472
1478
  throw new Error("bad maskPattern:" + c);
1473
1479
  }
1474
1480
  }
1475
- l.applyMask = function(i, s) {
1476
- for (var h = s.size, a = 0; a < h; a++)
1477
- for (var w = 0; w < h; w++)
1481
+ u.applyMask = function(i, s) {
1482
+ for (var f = s.size, a = 0; a < f; a++)
1483
+ for (var w = 0; w < f; w++)
1478
1484
  s.isReserved(w, a) || s.xor(w, a, d(i, w, a));
1479
- }, l.getBestMask = function(i, s) {
1480
- for (var h = Object.keys(l.Patterns).length, a = 0, w = 1 / 0, x = 0; x < h; x++) {
1481
- s(x), l.applyMask(x, i);
1482
- var b = l.getPenaltyN1(i) + l.getPenaltyN2(i) + l.getPenaltyN3(i) + l.getPenaltyN4(i);
1483
- l.applyMask(x, i), b < w && (w = b, a = x);
1485
+ }, u.getBestMask = function(i, s) {
1486
+ for (var f = Object.keys(u.Patterns).length, a = 0, w = 1 / 0, x = 0; x < f; x++) {
1487
+ s(x), u.applyMask(x, i);
1488
+ var b = u.getPenaltyN1(i) + u.getPenaltyN2(i) + u.getPenaltyN3(i) + u.getPenaltyN4(i);
1489
+ u.applyMask(x, i), b < w && (w = b, a = x);
1484
1490
  }
1485
1491
  return a;
1486
1492
  };
1487
- }, {}], 14: [function(n, g, l) {
1488
- var f = n("./version-check"), d = n("./regex");
1489
- l.NUMERIC = {
1493
+ }, {}], 14: [function(n, g, u) {
1494
+ var h = n("./version-check"), d = n("./regex");
1495
+ u.NUMERIC = {
1490
1496
  id: "Numeric",
1491
1497
  bit: 1,
1492
1498
  ccBits: [10, 12, 14]
1493
- }, l.ALPHANUMERIC = {
1499
+ }, u.ALPHANUMERIC = {
1494
1500
  id: "Alphanumeric",
1495
1501
  bit: 2,
1496
1502
  ccBits: [9, 11, 13]
1497
- }, l.BYTE = {
1503
+ }, u.BYTE = {
1498
1504
  id: "Byte",
1499
1505
  bit: 4,
1500
1506
  ccBits: [8, 16, 16]
1501
- }, l.KANJI = {
1507
+ }, u.KANJI = {
1502
1508
  id: "Kanji",
1503
1509
  bit: 8,
1504
1510
  ccBits: [8, 10, 12]
1505
- }, l.MIXED = {
1511
+ }, u.MIXED = {
1506
1512
  bit: -1
1507
- }, l.getCharCountIndicator = function(s, h) {
1513
+ }, u.getCharCountIndicator = function(s, f) {
1508
1514
  if (!s.ccBits)
1509
1515
  throw new Error("Invalid mode: " + s);
1510
- if (!f.isValid(h))
1511
- throw new Error("Invalid version: " + h);
1512
- return h >= 1 && h < 10 ? s.ccBits[0] : h < 27 ? s.ccBits[1] : s.ccBits[2];
1513
- }, l.getBestModeForData = function(s) {
1514
- return d.testNumeric(s) ? l.NUMERIC : d.testAlphanumeric(s) ? l.ALPHANUMERIC : d.testKanji(s) ? l.KANJI : l.BYTE;
1515
- }, l.toString = function(s) {
1516
+ if (!h.isValid(f))
1517
+ throw new Error("Invalid version: " + f);
1518
+ return f >= 1 && f < 10 ? s.ccBits[0] : f < 27 ? s.ccBits[1] : s.ccBits[2];
1519
+ }, u.getBestModeForData = function(s) {
1520
+ return d.testNumeric(s) ? u.NUMERIC : d.testAlphanumeric(s) ? u.ALPHANUMERIC : d.testKanji(s) ? u.KANJI : u.BYTE;
1521
+ }, u.toString = function(s) {
1516
1522
  if (s && s.id)
1517
1523
  return s.id;
1518
1524
  throw new Error("Invalid mode");
1519
- }, l.isValid = function(s) {
1525
+ }, u.isValid = function(s) {
1520
1526
  return s && s.bit && s.ccBits;
1521
1527
  };
1522
1528
  function c(i) {
@@ -1525,30 +1531,30 @@ Make sure your charset is UTF-8`
1525
1531
  var s = i.toLowerCase();
1526
1532
  switch (s) {
1527
1533
  case "numeric":
1528
- return l.NUMERIC;
1534
+ return u.NUMERIC;
1529
1535
  case "alphanumeric":
1530
- return l.ALPHANUMERIC;
1536
+ return u.ALPHANUMERIC;
1531
1537
  case "kanji":
1532
- return l.KANJI;
1538
+ return u.KANJI;
1533
1539
  case "byte":
1534
- return l.BYTE;
1540
+ return u.BYTE;
1535
1541
  default:
1536
1542
  throw new Error("Unknown mode: " + i);
1537
1543
  }
1538
1544
  }
1539
- l.from = function(s, h) {
1540
- if (l.isValid(s))
1545
+ u.from = function(s, f) {
1546
+ if (u.isValid(s))
1541
1547
  return s;
1542
1548
  try {
1543
1549
  return c(s);
1544
1550
  } catch {
1545
- return h;
1551
+ return f;
1546
1552
  }
1547
1553
  };
1548
- }, { "./regex": 19, "./version-check": 22 }], 15: [function(n, g, l) {
1549
- var f = n("./mode");
1554
+ }, { "./regex": 19, "./version-check": 22 }], 15: [function(n, g, u) {
1555
+ var h = n("./mode");
1550
1556
  function d(c) {
1551
- this.mode = f.NUMERIC, this.data = c.toString();
1557
+ this.mode = h.NUMERIC, this.data = c.toString();
1552
1558
  }
1553
1559
  d.getBitsLength = function(i) {
1554
1560
  return 10 * Math.floor(i / 3) + (i % 3 ? i % 3 * 3 + 1 : 0);
@@ -1557,35 +1563,35 @@ Make sure your charset is UTF-8`
1557
1563
  }, d.prototype.getBitsLength = function() {
1558
1564
  return d.getBitsLength(this.data.length);
1559
1565
  }, d.prototype.write = function(i) {
1560
- var s, h, a;
1566
+ var s, f, a;
1561
1567
  for (s = 0; s + 3 <= this.data.length; s += 3)
1562
- h = this.data.substr(s, 3), a = parseInt(h, 10), i.put(a, 10);
1568
+ f = this.data.substr(s, 3), a = parseInt(f, 10), i.put(a, 10);
1563
1569
  var w = this.data.length - s;
1564
- w > 0 && (h = this.data.substr(s), a = parseInt(h, 10), i.put(a, w * 3 + 1));
1570
+ w > 0 && (f = this.data.substr(s), a = parseInt(f, 10), i.put(a, w * 3 + 1));
1565
1571
  }, g.exports = d;
1566
- }, { "./mode": 14 }], 16: [function(n, g, l) {
1567
- var f = n("../utils/buffer"), d = n("./galois-field");
1568
- l.mul = function(i, s) {
1569
- for (var h = f.alloc(i.length + s.length - 1), a = 0; a < i.length; a++)
1572
+ }, { "./mode": 14 }], 16: [function(n, g, u) {
1573
+ var h = n("../utils/buffer"), d = n("./galois-field");
1574
+ u.mul = function(i, s) {
1575
+ for (var f = h.alloc(i.length + s.length - 1), a = 0; a < i.length; a++)
1570
1576
  for (var w = 0; w < s.length; w++)
1571
- h[a + w] ^= d.mul(i[a], s[w]);
1572
- return h;
1573
- }, l.mod = function(i, s) {
1574
- for (var h = f.from(i); h.length - s.length >= 0; ) {
1575
- for (var a = h[0], w = 0; w < s.length; w++)
1576
- h[w] ^= d.mul(s[w], a);
1577
- for (var x = 0; x < h.length && h[x] === 0; )
1577
+ f[a + w] ^= d.mul(i[a], s[w]);
1578
+ return f;
1579
+ }, u.mod = function(i, s) {
1580
+ for (var f = h.from(i); f.length - s.length >= 0; ) {
1581
+ for (var a = f[0], w = 0; w < s.length; w++)
1582
+ f[w] ^= d.mul(s[w], a);
1583
+ for (var x = 0; x < f.length && f[x] === 0; )
1578
1584
  x++;
1579
- h = h.slice(x);
1585
+ f = f.slice(x);
1580
1586
  }
1581
- return h;
1582
- }, l.generateECPolynomial = function(i) {
1583
- for (var s = f.from([1]), h = 0; h < i; h++)
1584
- s = l.mul(s, [1, d.exp(h)]);
1587
+ return f;
1588
+ }, u.generateECPolynomial = function(i) {
1589
+ for (var s = h.from([1]), f = 0; f < i; f++)
1590
+ s = u.mul(s, [1, d.exp(f)]);
1585
1591
  return s;
1586
1592
  };
1587
- }, { "../utils/buffer": 28, "./galois-field": 11 }], 17: [function(n, g, l) {
1588
- var f = n("../utils/buffer"), d = n("./utils"), c = n("./error-correction-level"), i = n("./bit-buffer"), s = n("./bit-matrix"), h = n("./alignment-pattern"), a = n("./finder-pattern"), w = n("./mask-pattern"), x = n("./error-correction-code"), b = n("./reed-solomon-encoder"), S = n("./version"), F = n("./format-info"), M = n("./mode"), C = n("./segments"), T = n("isarray");
1593
+ }, { "../utils/buffer": 28, "./galois-field": 11 }], 17: [function(n, g, u) {
1594
+ var h = n("../utils/buffer"), d = n("./utils"), c = n("./error-correction-level"), i = n("./bit-buffer"), s = n("./bit-matrix"), f = n("./alignment-pattern"), a = n("./finder-pattern"), w = n("./mask-pattern"), x = n("./error-correction-code"), b = n("./reed-solomon-encoder"), A = n("./version"), F = n("./format-info"), M = n("./mode"), C = n("./segments"), B = n("isarray");
1589
1595
  function I($, D) {
1590
1596
  for (var U = $.size, R = a.getPositions(D), O = 0; O < R.length; O++)
1591
1597
  for (var z = R[O][0], N = R[O][1], Y = -1; Y <= 7; Y++)
@@ -1600,13 +1606,13 @@ Make sure your charset is UTF-8`
1600
1606
  }
1601
1607
  }
1602
1608
  function _($, D) {
1603
- for (var U = h.getPositions(D), R = 0; R < U.length; R++)
1609
+ for (var U = f.getPositions(D), R = 0; R < U.length; R++)
1604
1610
  for (var O = U[R][0], z = U[R][1], N = -2; N <= 2; N++)
1605
1611
  for (var Y = -2; Y <= 2; Y++)
1606
1612
  N === -2 || N === 2 || Y === -2 || Y === 2 || N === 0 && Y === 0 ? $.set(O + N, z + Y, !0, !0) : $.set(O + N, z + Y, !1, !0);
1607
1613
  }
1608
- function v($, D) {
1609
- for (var U = $.size, R = S.getEncodedBits(D), O, z, N, Y = 0; Y < 18; Y++)
1614
+ function m($, D) {
1615
+ for (var U = $.size, R = A.getEncodedBits(D), O, z, N, Y = 0; Y < 18; Y++)
1610
1616
  O = Math.floor(Y / 3), z = Y % 3 + U - 8 - 3, N = (R >> Y & 1) === 1, $.set(O, z, N, !0), $.set(z, O, N, !0);
1611
1617
  }
1612
1618
  function p($, D, U) {
@@ -1629,7 +1635,7 @@ Make sure your charset is UTF-8`
1629
1635
  }
1630
1636
  }
1631
1637
  }
1632
- function A($, D, U) {
1638
+ function T($, D, U) {
1633
1639
  var R = new i();
1634
1640
  U.forEach(function(et) {
1635
1641
  R.put(et.mode.bit, 4), R.put(et.getLength(), M.getCharCountIndicator(et.mode, $)), et.write(R);
@@ -1642,28 +1648,28 @@ Make sure your charset is UTF-8`
1642
1648
  return L(R, $, D);
1643
1649
  }
1644
1650
  function L($, D, U) {
1645
- for (var R = d.getSymbolTotalCodewords(D), O = x.getTotalCodewordsCount(D, U), z = R - O, N = x.getBlocksCount(D, U), Y = R % N, j = N - Y, et = Math.floor(R / N), X = Math.floor(z / N), mt = X + 1, K = et - X, q = new b(K), at = 0, it = new Array(N), st = new Array(N), ut = 0, vt = f.from($.buffer), rt = 0; rt < N; rt++) {
1646
- var ct = rt < j ? X : mt;
1647
- it[rt] = vt.slice(at, at + ct), st[rt] = q.encode(it[rt]), at += ct, ut = Math.max(ut, ct);
1651
+ for (var R = d.getSymbolTotalCodewords(D), O = x.getTotalCodewordsCount(D, U), z = R - O, N = x.getBlocksCount(D, U), Y = R % N, j = N - Y, et = Math.floor(R / N), X = Math.floor(z / N), mt = X + 1, J = et - X, q = new b(J), at = 0, it = new Array(N), st = new Array(N), ut = 0, vt = h.from($.buffer), rt = 0; rt < N; rt++) {
1652
+ var lt = rt < j ? X : mt;
1653
+ it[rt] = vt.slice(at, at + lt), st[rt] = q.encode(it[rt]), at += lt, ut = Math.max(ut, lt);
1648
1654
  }
1649
- var lt = f.alloc(R), ht = 0, tt, Q;
1655
+ var ct = h.alloc(R), ht = 0, tt, Q;
1650
1656
  for (tt = 0; tt < ut; tt++)
1651
1657
  for (Q = 0; Q < N; Q++)
1652
- tt < it[Q].length && (lt[ht++] = it[Q][tt]);
1653
- for (tt = 0; tt < K; tt++)
1658
+ tt < it[Q].length && (ct[ht++] = it[Q][tt]);
1659
+ for (tt = 0; tt < J; tt++)
1654
1660
  for (Q = 0; Q < N; Q++)
1655
- lt[ht++] = st[Q][tt];
1656
- return lt;
1661
+ ct[ht++] = st[Q][tt];
1662
+ return ct;
1657
1663
  }
1658
1664
  function W($, D, U, R) {
1659
1665
  var O;
1660
- if (T($))
1666
+ if (B($))
1661
1667
  O = C.fromArray($);
1662
1668
  else if (typeof $ == "string") {
1663
1669
  var z = D;
1664
1670
  if (!z) {
1665
1671
  var N = C.rawSplit($);
1666
- z = S.getBestVersionForData(
1672
+ z = A.getBestVersionForData(
1667
1673
  N,
1668
1674
  U
1669
1675
  );
@@ -1671,7 +1677,7 @@ Make sure your charset is UTF-8`
1671
1677
  O = C.fromString($, z || 40);
1672
1678
  } else
1673
1679
  throw new Error("Invalid data");
1674
- var Y = S.getBestVersionForData(
1680
+ var Y = A.getBestVersionForData(
1675
1681
  O,
1676
1682
  U
1677
1683
  );
@@ -1686,8 +1692,8 @@ The chosen QR Code version cannot contain this amount of data.
1686
1692
  Minimum version required to store current data is: ` + Y + `.
1687
1693
  `
1688
1694
  );
1689
- var j = A(D, U, O), et = d.getSymbolSize(D), X = new s(et);
1690
- return I(X, D), k(X), _(X, D), p(X, U, 0), D >= 7 && v(X, D), E(X, j), isNaN(R) && (R = w.getBestMask(
1695
+ var j = T(D, U, O), et = d.getSymbolSize(D), X = new s(et);
1696
+ return I(X, D), k(X), _(X, D), p(X, U, 0), D >= 7 && m(X, D), E(X, j), isNaN(R) && (R = w.getBestMask(
1691
1697
  X,
1692
1698
  p.bind(null, X, U)
1693
1699
  )), w.applyMask(R, X), p(X, U, R), {
@@ -1698,50 +1704,50 @@ Minimum version required to store current data is: ` + Y + `.
1698
1704
  segments: O
1699
1705
  };
1700
1706
  }
1701
- l.create = function(D, U) {
1707
+ u.create = function(D, U) {
1702
1708
  if (typeof D > "u" || D === "")
1703
1709
  throw new Error("No input text");
1704
1710
  var R = c.M, O, z;
1705
- return typeof U < "u" && (R = c.from(U.errorCorrectionLevel, c.M), O = S.from(U.version), z = w.from(U.maskPattern), U.toSJISFunc && d.setToSJISFunction(U.toSJISFunc)), W(D, O, R, z);
1711
+ return typeof U < "u" && (R = c.from(U.errorCorrectionLevel, c.M), O = A.from(U.version), z = w.from(U.maskPattern), U.toSJISFunc && d.setToSJISFunction(U.toSJISFunc)), W(D, O, R, z);
1706
1712
  };
1707
- }, { "../utils/buffer": 28, "./alignment-pattern": 2, "./bit-buffer": 4, "./bit-matrix": 5, "./error-correction-code": 7, "./error-correction-level": 8, "./finder-pattern": 9, "./format-info": 10, "./mask-pattern": 13, "./mode": 14, "./reed-solomon-encoder": 18, "./segments": 20, "./utils": 21, "./version": 23, isarray: 33 }], 18: [function(n, g, l) {
1708
- var f = n("../utils/buffer"), d = n("./polynomial"), c = n("buffer").Buffer;
1713
+ }, { "../utils/buffer": 28, "./alignment-pattern": 2, "./bit-buffer": 4, "./bit-matrix": 5, "./error-correction-code": 7, "./error-correction-level": 8, "./finder-pattern": 9, "./format-info": 10, "./mask-pattern": 13, "./mode": 14, "./reed-solomon-encoder": 18, "./segments": 20, "./utils": 21, "./version": 23, isarray: 33 }], 18: [function(n, g, u) {
1714
+ var h = n("../utils/buffer"), d = n("./polynomial"), c = n("buffer").Buffer;
1709
1715
  function i(s) {
1710
1716
  this.genPoly = void 0, this.degree = s, this.degree && this.initialize(this.degree);
1711
1717
  }
1712
- i.prototype.initialize = function(h) {
1713
- this.degree = h, this.genPoly = d.generateECPolynomial(this.degree);
1714
- }, i.prototype.encode = function(h) {
1718
+ i.prototype.initialize = function(f) {
1719
+ this.degree = f, this.genPoly = d.generateECPolynomial(this.degree);
1720
+ }, i.prototype.encode = function(f) {
1715
1721
  if (!this.genPoly)
1716
1722
  throw new Error("Encoder not initialized");
1717
- var a = f.alloc(this.degree), w = c.concat([h, a], h.length + this.degree), x = d.mod(w, this.genPoly), b = this.degree - x.length;
1723
+ var a = h.alloc(this.degree), w = c.concat([f, a], f.length + this.degree), x = d.mod(w, this.genPoly), b = this.degree - x.length;
1718
1724
  if (b > 0) {
1719
- var S = f.alloc(this.degree);
1720
- return x.copy(S, b), S;
1725
+ var A = h.alloc(this.degree);
1726
+ return x.copy(A, b), A;
1721
1727
  }
1722
1728
  return x;
1723
1729
  }, g.exports = i;
1724
- }, { "../utils/buffer": 28, "./polynomial": 16, buffer: 30 }], 19: [function(n, g, l) {
1725
- var f = "[0-9]+", d = "[A-Z $%*+\\-./:]+", c = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
1730
+ }, { "../utils/buffer": 28, "./polynomial": 16, buffer: 30 }], 19: [function(n, g, u) {
1731
+ var h = "[0-9]+", d = "[A-Z $%*+\\-./:]+", c = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
1726
1732
  c = c.replace(/u/g, "\\u");
1727
1733
  var i = "(?:(?![A-Z0-9 $%*+\\-./:]|" + c + `)(?:.|[\r
1728
1734
  ]))+`;
1729
- l.KANJI = new RegExp(c, "g"), l.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), l.BYTE = new RegExp(i, "g"), l.NUMERIC = new RegExp(f, "g"), l.ALPHANUMERIC = new RegExp(d, "g");
1730
- var s = new RegExp("^" + c + "$"), h = new RegExp("^" + f + "$"), a = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
1731
- l.testKanji = function(x) {
1735
+ u.KANJI = new RegExp(c, "g"), u.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), u.BYTE = new RegExp(i, "g"), u.NUMERIC = new RegExp(h, "g"), u.ALPHANUMERIC = new RegExp(d, "g");
1736
+ var s = new RegExp("^" + c + "$"), f = new RegExp("^" + h + "$"), a = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
1737
+ u.testKanji = function(x) {
1732
1738
  return s.test(x);
1733
- }, l.testNumeric = function(x) {
1734
- return h.test(x);
1735
- }, l.testAlphanumeric = function(x) {
1739
+ }, u.testNumeric = function(x) {
1740
+ return f.test(x);
1741
+ }, u.testAlphanumeric = function(x) {
1736
1742
  return a.test(x);
1737
1743
  };
1738
- }, {}], 20: [function(n, g, l) {
1739
- var f = n("./mode"), d = n("./numeric-data"), c = n("./alphanumeric-data"), i = n("./byte-data"), s = n("./kanji-data"), h = n("./regex"), a = n("./utils"), w = n("dijkstrajs");
1744
+ }, {}], 20: [function(n, g, u) {
1745
+ var h = n("./mode"), d = n("./numeric-data"), c = n("./alphanumeric-data"), i = n("./byte-data"), s = n("./kanji-data"), f = n("./regex"), a = n("./utils"), w = n("dijkstrajs");
1740
1746
  function x(k) {
1741
1747
  return unescape(encodeURIComponent(k)).length;
1742
1748
  }
1743
- function b(k, _, v) {
1744
- for (var p = [], E; (E = k.exec(v)) !== null; )
1749
+ function b(k, _, m) {
1750
+ for (var p = [], E; (E = k.exec(m)) !== null; )
1745
1751
  p.push({
1746
1752
  data: E[0],
1747
1753
  index: E.index,
@@ -1750,11 +1756,11 @@ Minimum version required to store current data is: ` + Y + `.
1750
1756
  });
1751
1757
  return p;
1752
1758
  }
1753
- function S(k) {
1754
- var _ = b(h.NUMERIC, f.NUMERIC, k), v = b(h.ALPHANUMERIC, f.ALPHANUMERIC, k), p, E;
1755
- a.isKanjiModeEnabled() ? (p = b(h.BYTE, f.BYTE, k), E = b(h.KANJI, f.KANJI, k)) : (p = b(h.BYTE_KANJI, f.BYTE, k), E = []);
1756
- var A = _.concat(v, p, E);
1757
- return A.sort(function(L, W) {
1759
+ function A(k) {
1760
+ var _ = b(f.NUMERIC, h.NUMERIC, k), m = b(f.ALPHANUMERIC, h.ALPHANUMERIC, k), p, E;
1761
+ a.isKanjiModeEnabled() ? (p = b(f.BYTE, h.BYTE, k), E = b(f.KANJI, h.KANJI, k)) : (p = b(f.BYTE_KANJI, h.BYTE, k), E = []);
1762
+ var T = _.concat(m, p, E);
1763
+ return T.sort(function(L, W) {
1758
1764
  return L.index - W.index;
1759
1765
  }).map(function(L) {
1760
1766
  return {
@@ -1766,100 +1772,100 @@ Minimum version required to store current data is: ` + Y + `.
1766
1772
  }
1767
1773
  function F(k, _) {
1768
1774
  switch (_) {
1769
- case f.NUMERIC:
1775
+ case h.NUMERIC:
1770
1776
  return d.getBitsLength(k);
1771
- case f.ALPHANUMERIC:
1777
+ case h.ALPHANUMERIC:
1772
1778
  return c.getBitsLength(k);
1773
- case f.KANJI:
1779
+ case h.KANJI:
1774
1780
  return s.getBitsLength(k);
1775
- case f.BYTE:
1781
+ case h.BYTE:
1776
1782
  return i.getBitsLength(k);
1777
1783
  }
1778
1784
  }
1779
1785
  function M(k) {
1780
- return k.reduce(function(_, v) {
1786
+ return k.reduce(function(_, m) {
1781
1787
  var p = _.length - 1 >= 0 ? _[_.length - 1] : null;
1782
- return p && p.mode === v.mode ? (_[_.length - 1].data += v.data, _) : (_.push(v), _);
1788
+ return p && p.mode === m.mode ? (_[_.length - 1].data += m.data, _) : (_.push(m), _);
1783
1789
  }, []);
1784
1790
  }
1785
1791
  function C(k) {
1786
- for (var _ = [], v = 0; v < k.length; v++) {
1787
- var p = k[v];
1792
+ for (var _ = [], m = 0; m < k.length; m++) {
1793
+ var p = k[m];
1788
1794
  switch (p.mode) {
1789
- case f.NUMERIC:
1795
+ case h.NUMERIC:
1790
1796
  _.push([
1791
1797
  p,
1792
- { data: p.data, mode: f.ALPHANUMERIC, length: p.length },
1793
- { data: p.data, mode: f.BYTE, length: p.length }
1798
+ { data: p.data, mode: h.ALPHANUMERIC, length: p.length },
1799
+ { data: p.data, mode: h.BYTE, length: p.length }
1794
1800
  ]);
1795
1801
  break;
1796
- case f.ALPHANUMERIC:
1802
+ case h.ALPHANUMERIC:
1797
1803
  _.push([
1798
1804
  p,
1799
- { data: p.data, mode: f.BYTE, length: p.length }
1805
+ { data: p.data, mode: h.BYTE, length: p.length }
1800
1806
  ]);
1801
1807
  break;
1802
- case f.KANJI:
1808
+ case h.KANJI:
1803
1809
  _.push([
1804
1810
  p,
1805
- { data: p.data, mode: f.BYTE, length: x(p.data) }
1811
+ { data: p.data, mode: h.BYTE, length: x(p.data) }
1806
1812
  ]);
1807
1813
  break;
1808
- case f.BYTE:
1814
+ case h.BYTE:
1809
1815
  _.push([
1810
- { data: p.data, mode: f.BYTE, length: x(p.data) }
1816
+ { data: p.data, mode: h.BYTE, length: x(p.data) }
1811
1817
  ]);
1812
1818
  }
1813
1819
  }
1814
1820
  return _;
1815
1821
  }
1816
- function T(k, _) {
1817
- for (var v = {}, p = { start: {} }, E = ["start"], A = 0; A < k.length; A++) {
1818
- for (var L = k[A], W = [], $ = 0; $ < L.length; $++) {
1819
- var D = L[$], U = "" + A + $;
1820
- W.push(U), v[U] = { node: D, lastCount: 0 }, p[U] = {};
1822
+ function B(k, _) {
1823
+ for (var m = {}, p = { start: {} }, E = ["start"], T = 0; T < k.length; T++) {
1824
+ for (var L = k[T], W = [], $ = 0; $ < L.length; $++) {
1825
+ var D = L[$], U = "" + T + $;
1826
+ W.push(U), m[U] = { node: D, lastCount: 0 }, p[U] = {};
1821
1827
  for (var R = 0; R < E.length; R++) {
1822
1828
  var O = E[R];
1823
- v[O] && v[O].node.mode === D.mode ? (p[O][U] = F(v[O].lastCount + D.length, D.mode) - F(v[O].lastCount, D.mode), v[O].lastCount += D.length) : (v[O] && (v[O].lastCount = D.length), p[O][U] = F(D.length, D.mode) + 4 + f.getCharCountIndicator(D.mode, _));
1829
+ m[O] && m[O].node.mode === D.mode ? (p[O][U] = F(m[O].lastCount + D.length, D.mode) - F(m[O].lastCount, D.mode), m[O].lastCount += D.length) : (m[O] && (m[O].lastCount = D.length), p[O][U] = F(D.length, D.mode) + 4 + h.getCharCountIndicator(D.mode, _));
1824
1830
  }
1825
1831
  }
1826
1832
  E = W;
1827
1833
  }
1828
1834
  for (R = 0; R < E.length; R++)
1829
1835
  p[E[R]].end = 0;
1830
- return { map: p, table: v };
1836
+ return { map: p, table: m };
1831
1837
  }
1832
1838
  function I(k, _) {
1833
- var v, p = f.getBestModeForData(k);
1834
- if (v = f.from(_, p), v !== f.BYTE && v.bit < p.bit)
1835
- throw new Error('"' + k + '" cannot be encoded with mode ' + f.toString(v) + `.
1836
- Suggested mode is: ` + f.toString(p));
1837
- switch (v === f.KANJI && !a.isKanjiModeEnabled() && (v = f.BYTE), v) {
1838
- case f.NUMERIC:
1839
+ var m, p = h.getBestModeForData(k);
1840
+ if (m = h.from(_, p), m !== h.BYTE && m.bit < p.bit)
1841
+ throw new Error('"' + k + '" cannot be encoded with mode ' + h.toString(m) + `.
1842
+ Suggested mode is: ` + h.toString(p));
1843
+ switch (m === h.KANJI && !a.isKanjiModeEnabled() && (m = h.BYTE), m) {
1844
+ case h.NUMERIC:
1839
1845
  return new d(k);
1840
- case f.ALPHANUMERIC:
1846
+ case h.ALPHANUMERIC:
1841
1847
  return new c(k);
1842
- case f.KANJI:
1848
+ case h.KANJI:
1843
1849
  return new s(k);
1844
- case f.BYTE:
1850
+ case h.BYTE:
1845
1851
  return new i(k);
1846
1852
  }
1847
1853
  }
1848
- l.fromArray = function(_) {
1849
- return _.reduce(function(v, p) {
1850
- return typeof p == "string" ? v.push(I(p, null)) : p.data && v.push(I(p.data, p.mode)), v;
1854
+ u.fromArray = function(_) {
1855
+ return _.reduce(function(m, p) {
1856
+ return typeof p == "string" ? m.push(I(p, null)) : p.data && m.push(I(p.data, p.mode)), m;
1851
1857
  }, []);
1852
- }, l.fromString = function(_, v) {
1853
- for (var p = S(_, a.isKanjiModeEnabled()), E = C(p), A = T(E, v), L = w.find_path(A.map, "start", "end"), W = [], $ = 1; $ < L.length - 1; $++)
1854
- W.push(A.table[L[$]].node);
1855
- return l.fromArray(M(W));
1856
- }, l.rawSplit = function(_) {
1857
- return l.fromArray(
1858
- S(_, a.isKanjiModeEnabled())
1858
+ }, u.fromString = function(_, m) {
1859
+ for (var p = A(_, a.isKanjiModeEnabled()), E = C(p), T = B(E, m), L = w.find_path(T.map, "start", "end"), W = [], $ = 1; $ < L.length - 1; $++)
1860
+ W.push(T.table[L[$]].node);
1861
+ return u.fromArray(M(W));
1862
+ }, u.rawSplit = function(_) {
1863
+ return u.fromArray(
1864
+ A(_, a.isKanjiModeEnabled())
1859
1865
  );
1860
1866
  };
1861
- }, { "./alphanumeric-data": 3, "./byte-data": 6, "./kanji-data": 12, "./mode": 14, "./numeric-data": 15, "./regex": 19, "./utils": 21, dijkstrajs: 31 }], 21: [function(n, g, l) {
1862
- var f, d = [
1867
+ }, { "./alphanumeric-data": 3, "./byte-data": 6, "./kanji-data": 12, "./mode": 14, "./numeric-data": 15, "./regex": 19, "./utils": 21, dijkstrajs: 31 }], 21: [function(n, g, u) {
1868
+ var h, d = [
1863
1869
  0,
1864
1870
  // Not used
1865
1871
  26,
@@ -1903,65 +1909,65 @@ Minimum version required to store current data is: ` + Y + `.
1903
1909
  3532,
1904
1910
  3706
1905
1911
  ];
1906
- l.getSymbolSize = function(i) {
1912
+ u.getSymbolSize = function(i) {
1907
1913
  if (!i)
1908
1914
  throw new Error('"version" cannot be null or undefined');
1909
1915
  if (i < 1 || i > 40)
1910
1916
  throw new Error('"version" should be in range from 1 to 40');
1911
1917
  return i * 4 + 17;
1912
- }, l.getSymbolTotalCodewords = function(i) {
1918
+ }, u.getSymbolTotalCodewords = function(i) {
1913
1919
  return d[i];
1914
- }, l.getBCHDigit = function(c) {
1920
+ }, u.getBCHDigit = function(c) {
1915
1921
  for (var i = 0; c !== 0; )
1916
1922
  i++, c >>>= 1;
1917
1923
  return i;
1918
- }, l.setToSJISFunction = function(i) {
1924
+ }, u.setToSJISFunction = function(i) {
1919
1925
  if (typeof i != "function")
1920
1926
  throw new Error('"toSJISFunc" is not a valid function.');
1921
- f = i;
1922
- }, l.isKanjiModeEnabled = function() {
1923
- return typeof f < "u";
1924
- }, l.toSJIS = function(i) {
1925
- return f(i);
1927
+ h = i;
1928
+ }, u.isKanjiModeEnabled = function() {
1929
+ return typeof h < "u";
1930
+ }, u.toSJIS = function(i) {
1931
+ return h(i);
1926
1932
  };
1927
- }, {}], 22: [function(n, g, l) {
1928
- l.isValid = function(d) {
1933
+ }, {}], 22: [function(n, g, u) {
1934
+ u.isValid = function(d) {
1929
1935
  return !isNaN(d) && d >= 1 && d <= 40;
1930
1936
  };
1931
- }, {}], 23: [function(n, g, l) {
1932
- var f = n("./utils"), d = n("./error-correction-code"), c = n("./error-correction-level"), i = n("./mode"), s = n("./version-check"), h = n("isarray"), a = 7973, w = f.getBCHDigit(a);
1933
- function x(M, C, T) {
1937
+ }, {}], 23: [function(n, g, u) {
1938
+ var h = n("./utils"), d = n("./error-correction-code"), c = n("./error-correction-level"), i = n("./mode"), s = n("./version-check"), f = n("isarray"), a = 7973, w = h.getBCHDigit(a);
1939
+ function x(M, C, B) {
1934
1940
  for (var I = 1; I <= 40; I++)
1935
- if (C <= l.getCapacity(I, T, M))
1941
+ if (C <= u.getCapacity(I, B, M))
1936
1942
  return I;
1937
1943
  }
1938
1944
  function b(M, C) {
1939
1945
  return i.getCharCountIndicator(M, C) + 4;
1940
1946
  }
1941
- function S(M, C) {
1942
- var T = 0;
1947
+ function A(M, C) {
1948
+ var B = 0;
1943
1949
  return M.forEach(function(I) {
1944
1950
  var k = b(I.mode, C);
1945
- T += k + I.getBitsLength();
1946
- }), T;
1951
+ B += k + I.getBitsLength();
1952
+ }), B;
1947
1953
  }
1948
1954
  function F(M, C) {
1949
- for (var T = 1; T <= 40; T++) {
1950
- var I = S(M, T);
1951
- if (I <= l.getCapacity(T, C, i.MIXED))
1952
- return T;
1955
+ for (var B = 1; B <= 40; B++) {
1956
+ var I = A(M, B);
1957
+ if (I <= u.getCapacity(B, C, i.MIXED))
1958
+ return B;
1953
1959
  }
1954
1960
  }
1955
- l.from = function(C, T) {
1956
- return s.isValid(C) ? parseInt(C, 10) : T;
1957
- }, l.getCapacity = function(C, T, I) {
1961
+ u.from = function(C, B) {
1962
+ return s.isValid(C) ? parseInt(C, 10) : B;
1963
+ }, u.getCapacity = function(C, B, I) {
1958
1964
  if (!s.isValid(C))
1959
1965
  throw new Error("Invalid QR Code version");
1960
1966
  typeof I > "u" && (I = i.BYTE);
1961
- var k = f.getSymbolTotalCodewords(C), _ = d.getTotalCodewordsCount(C, T), v = (k - _) * 8;
1967
+ var k = h.getSymbolTotalCodewords(C), _ = d.getTotalCodewordsCount(C, B), m = (k - _) * 8;
1962
1968
  if (I === i.MIXED)
1963
- return v;
1964
- var p = v - b(I, C);
1969
+ return m;
1970
+ var p = m - b(I, C);
1965
1971
  switch (I) {
1966
1972
  case i.NUMERIC:
1967
1973
  return Math.floor(p / 10 * 3);
@@ -1973,9 +1979,9 @@ Minimum version required to store current data is: ` + Y + `.
1973
1979
  default:
1974
1980
  return Math.floor(p / 8);
1975
1981
  }
1976
- }, l.getBestVersionForData = function(C, T) {
1977
- var I, k = c.from(T, c.M);
1978
- if (h(C)) {
1982
+ }, u.getBestVersionForData = function(C, B) {
1983
+ var I, k = c.from(B, c.M);
1984
+ if (f(C)) {
1979
1985
  if (C.length > 1)
1980
1986
  return F(C, k);
1981
1987
  if (C.length === 0)
@@ -1984,18 +1990,18 @@ Minimum version required to store current data is: ` + Y + `.
1984
1990
  } else
1985
1991
  I = C;
1986
1992
  return x(I.mode, I.getLength(), k);
1987
- }, l.getEncodedBits = function(C) {
1993
+ }, u.getEncodedBits = function(C) {
1988
1994
  if (!s.isValid(C) || C < 7)
1989
1995
  throw new Error("Invalid QR Code version");
1990
- for (var T = C << 12; f.getBCHDigit(T) - w >= 0; )
1991
- T ^= a << f.getBCHDigit(T) - w;
1992
- return C << 12 | T;
1996
+ for (var B = C << 12; h.getBCHDigit(B) - w >= 0; )
1997
+ B ^= a << h.getBCHDigit(B) - w;
1998
+ return C << 12 | B;
1993
1999
  };
1994
- }, { "./error-correction-code": 7, "./error-correction-level": 8, "./mode": 14, "./utils": 21, "./version-check": 22, isarray: 33 }], 24: [function(n, g, l) {
1995
- var f = n("./can-promise"), d = n("./core/qrcode"), c = n("./renderer/canvas"), i = n("./renderer/svg-tag.js");
1996
- function s(h, a, w, x, b) {
1997
- var S = [].slice.call(arguments, 1), F = S.length, M = typeof S[F - 1] == "function";
1998
- if (!M && !f())
2000
+ }, { "./error-correction-code": 7, "./error-correction-level": 8, "./mode": 14, "./utils": 21, "./version-check": 22, isarray: 33 }], 24: [function(n, g, u) {
2001
+ var h = n("./can-promise"), d = n("./core/qrcode"), c = n("./renderer/canvas"), i = n("./renderer/svg-tag.js");
2002
+ function s(f, a, w, x, b) {
2003
+ var A = [].slice.call(arguments, 1), F = A.length, M = typeof A[F - 1] == "function";
2004
+ if (!M && !h())
1999
2005
  throw new Error("Callback required as last argument");
2000
2006
  if (M) {
2001
2007
  if (F < 2)
@@ -2004,10 +2010,10 @@ Minimum version required to store current data is: ` + Y + `.
2004
2010
  } else {
2005
2011
  if (F < 1)
2006
2012
  throw new Error("Too few arguments provided");
2007
- return F === 1 ? (w = a, a = x = void 0) : F === 2 && !a.getContext && (x = w, w = a, a = void 0), new Promise(function(T, I) {
2013
+ return F === 1 ? (w = a, a = x = void 0) : F === 2 && !a.getContext && (x = w, w = a, a = void 0), new Promise(function(B, I) {
2008
2014
  try {
2009
2015
  var k = d.create(w, x);
2010
- T(h(k, a, x));
2016
+ B(f(k, a, x));
2011
2017
  } catch (_) {
2012
2018
  I(_);
2013
2019
  }
@@ -2015,18 +2021,18 @@ Minimum version required to store current data is: ` + Y + `.
2015
2021
  }
2016
2022
  try {
2017
2023
  var C = d.create(w, x);
2018
- b(null, h(C, a, x));
2019
- } catch (T) {
2020
- b(T);
2024
+ b(null, f(C, a, x));
2025
+ } catch (B) {
2026
+ b(B);
2021
2027
  }
2022
2028
  }
2023
- l.create = d.create, l.toCanvas = s.bind(null, c.render), l.toDataURL = s.bind(null, c.renderToDataURL), l.toString = s.bind(null, function(h, a, w) {
2024
- return i.render(h, w);
2029
+ u.create = d.create, u.toCanvas = s.bind(null, c.render), u.toDataURL = s.bind(null, c.renderToDataURL), u.toString = s.bind(null, function(f, a, w) {
2030
+ return i.render(f, w);
2025
2031
  });
2026
- }, { "./can-promise": 1, "./core/qrcode": 17, "./renderer/canvas": 25, "./renderer/svg-tag.js": 26 }], 25: [function(n, g, l) {
2027
- var f = n("./utils");
2028
- function d(i, s, h) {
2029
- i.clearRect(0, 0, s.width, s.height), s.style || (s.style = {}), s.height = h, s.width = h, s.style.height = h + "px", s.style.width = h + "px";
2032
+ }, { "./can-promise": 1, "./core/qrcode": 17, "./renderer/canvas": 25, "./renderer/svg-tag.js": 26 }], 25: [function(n, g, u) {
2033
+ var h = n("./utils");
2034
+ function d(i, s, f) {
2035
+ i.clearRect(0, 0, s.width, s.height), s.style || (s.style = {}), s.height = f, s.width = f, s.style.height = f + "px", s.style.width = f + "px";
2030
2036
  }
2031
2037
  function c() {
2032
2038
  try {
@@ -2035,41 +2041,41 @@ Minimum version required to store current data is: ` + Y + `.
2035
2041
  throw new Error("You need to specify a canvas element");
2036
2042
  }
2037
2043
  }
2038
- l.render = function(s, h, a) {
2039
- var w = a, x = h;
2040
- typeof w > "u" && (!h || !h.getContext) && (w = h, h = void 0), h || (x = c()), w = f.getOptions(w);
2041
- var b = f.getImageWidth(s.modules.size, w), S = x.getContext("2d"), F = S.createImageData(b, b);
2042
- return f.qrToImageData(F.data, s, w), d(S, x, b), S.putImageData(F, 0, 0), x;
2043
- }, l.renderToDataURL = function(s, h, a) {
2044
+ u.render = function(s, f, a) {
2045
+ var w = a, x = f;
2046
+ typeof w > "u" && (!f || !f.getContext) && (w = f, f = void 0), f || (x = c()), w = h.getOptions(w);
2047
+ var b = h.getImageWidth(s.modules.size, w), A = x.getContext("2d"), F = A.createImageData(b, b);
2048
+ return h.qrToImageData(F.data, s, w), d(A, x, b), A.putImageData(F, 0, 0), x;
2049
+ }, u.renderToDataURL = function(s, f, a) {
2044
2050
  var w = a;
2045
- typeof w > "u" && (!h || !h.getContext) && (w = h, h = void 0), w || (w = {});
2046
- var x = l.render(s, h, w), b = w.type || "image/png", S = w.rendererOpts || {};
2047
- return x.toDataURL(b, S.quality);
2051
+ typeof w > "u" && (!f || !f.getContext) && (w = f, f = void 0), w || (w = {});
2052
+ var x = u.render(s, f, w), b = w.type || "image/png", A = w.rendererOpts || {};
2053
+ return x.toDataURL(b, A.quality);
2048
2054
  };
2049
- }, { "./utils": 27 }], 26: [function(n, g, l) {
2050
- var f = n("./utils");
2051
- function d(s, h) {
2052
- var a = s.a / 255, w = h + '="' + s.hex + '"';
2053
- return a < 1 ? w + " " + h + '-opacity="' + a.toFixed(2).slice(1) + '"' : w;
2054
- }
2055
- function c(s, h, a) {
2056
- var w = s + h;
2055
+ }, { "./utils": 27 }], 26: [function(n, g, u) {
2056
+ var h = n("./utils");
2057
+ function d(s, f) {
2058
+ var a = s.a / 255, w = f + '="' + s.hex + '"';
2059
+ return a < 1 ? w + " " + f + '-opacity="' + a.toFixed(2).slice(1) + '"' : w;
2060
+ }
2061
+ function c(s, f, a) {
2062
+ var w = s + f;
2057
2063
  return typeof a < "u" && (w += " " + a), w;
2058
2064
  }
2059
- function i(s, h, a) {
2060
- for (var w = "", x = 0, b = !1, S = 0, F = 0; F < s.length; F++) {
2061
- var M = Math.floor(F % h), C = Math.floor(F / h);
2062
- !M && !b && (b = !0), s[F] ? (S++, F > 0 && M > 0 && s[F - 1] || (w += b ? c("M", M + a, 0.5 + C + a) : c("m", x, 0), x = 0, b = !1), M + 1 < h && s[F + 1] || (w += c("h", S), S = 0)) : x++;
2065
+ function i(s, f, a) {
2066
+ for (var w = "", x = 0, b = !1, A = 0, F = 0; F < s.length; F++) {
2067
+ var M = Math.floor(F % f), C = Math.floor(F / f);
2068
+ !M && !b && (b = !0), s[F] ? (A++, F > 0 && M > 0 && s[F - 1] || (w += b ? c("M", M + a, 0.5 + C + a) : c("m", x, 0), x = 0, b = !1), M + 1 < f && s[F + 1] || (w += c("h", A), A = 0)) : x++;
2063
2069
  }
2064
2070
  return w;
2065
2071
  }
2066
- l.render = function(h, a, w) {
2067
- var x = f.getOptions(a), b = h.modules.size, S = h.modules.data, F = b + x.margin * 2, M = x.color.light.a ? "<path " + d(x.color.light, "fill") + ' d="M0 0h' + F + "v" + F + 'H0z"/>' : "", C = "<path " + d(x.color.dark, "stroke") + ' d="' + i(S, b, x.margin) + '"/>', T = 'viewBox="0 0 ' + F + " " + F + '"', I = x.width ? 'width="' + x.width + '" height="' + x.width + '" ' : "", k = '<svg xmlns="http://www.w3.org/2000/svg" ' + I + T + ' shape-rendering="crispEdges">' + M + C + `</svg>
2072
+ u.render = function(f, a, w) {
2073
+ var x = h.getOptions(a), b = f.modules.size, A = f.modules.data, F = b + x.margin * 2, M = x.color.light.a ? "<path " + d(x.color.light, "fill") + ' d="M0 0h' + F + "v" + F + 'H0z"/>' : "", C = "<path " + d(x.color.dark, "stroke") + ' d="' + i(A, b, x.margin) + '"/>', B = 'viewBox="0 0 ' + F + " " + F + '"', I = x.width ? 'width="' + x.width + '" height="' + x.width + '" ' : "", k = '<svg xmlns="http://www.w3.org/2000/svg" ' + I + B + ' shape-rendering="crispEdges">' + M + C + `</svg>
2068
2074
  `;
2069
2075
  return typeof w == "function" && w(null, k), k;
2070
2076
  };
2071
- }, { "./utils": 27 }], 27: [function(n, g, l) {
2072
- function f(d) {
2077
+ }, { "./utils": 27 }], 27: [function(n, g, u) {
2078
+ function h(d) {
2073
2079
  if (typeof d == "number" && (d = d.toString()), typeof d != "string")
2074
2080
  throw new Error("Color should be defined as hex string");
2075
2081
  var c = d.slice().replace("#", "").split("");
@@ -2087,38 +2093,38 @@ Minimum version required to store current data is: ` + Y + `.
2087
2093
  hex: "#" + c.slice(0, 6).join("")
2088
2094
  };
2089
2095
  }
2090
- l.getOptions = function(c) {
2096
+ u.getOptions = function(c) {
2091
2097
  c || (c = {}), c.color || (c.color = {});
2092
- var i = typeof c.margin > "u" || c.margin === null || c.margin < 0 ? 4 : c.margin, s = c.width && c.width >= 21 ? c.width : void 0, h = c.scale || 4;
2098
+ var i = typeof c.margin > "u" || c.margin === null || c.margin < 0 ? 4 : c.margin, s = c.width && c.width >= 21 ? c.width : void 0, f = c.scale || 4;
2093
2099
  return {
2094
2100
  width: s,
2095
- scale: s ? 4 : h,
2101
+ scale: s ? 4 : f,
2096
2102
  margin: i,
2097
2103
  color: {
2098
- dark: f(c.color.dark || "#000000ff"),
2099
- light: f(c.color.light || "#ffffffff")
2104
+ dark: h(c.color.dark || "#000000ff"),
2105
+ light: h(c.color.light || "#ffffffff")
2100
2106
  },
2101
2107
  type: c.type,
2102
2108
  rendererOpts: c.rendererOpts || {}
2103
2109
  };
2104
- }, l.getScale = function(c, i) {
2110
+ }, u.getScale = function(c, i) {
2105
2111
  return i.width && i.width >= c + i.margin * 2 ? i.width / (c + i.margin * 2) : i.scale;
2106
- }, l.getImageWidth = function(c, i) {
2107
- var s = l.getScale(c, i);
2112
+ }, u.getImageWidth = function(c, i) {
2113
+ var s = u.getScale(c, i);
2108
2114
  return Math.floor((c + i.margin * 2) * s);
2109
- }, l.qrToImageData = function(c, i, s) {
2110
- for (var h = i.modules.size, a = i.modules.data, w = l.getScale(h, s), x = Math.floor((h + s.margin * 2) * w), b = s.margin * w, S = [s.color.light, s.color.dark], F = 0; F < x; F++)
2115
+ }, u.qrToImageData = function(c, i, s) {
2116
+ for (var f = i.modules.size, a = i.modules.data, w = u.getScale(f, s), x = Math.floor((f + s.margin * 2) * w), b = s.margin * w, A = [s.color.light, s.color.dark], F = 0; F < x; F++)
2111
2117
  for (var M = 0; M < x; M++) {
2112
- var C = (F * x + M) * 4, T = s.color.light;
2118
+ var C = (F * x + M) * 4, B = s.color.light;
2113
2119
  if (F >= b && M >= b && F < x - b && M < x - b) {
2114
2120
  var I = Math.floor((F - b) / w), k = Math.floor((M - b) / w);
2115
- T = S[a[I * h + k] ? 1 : 0];
2121
+ B = A[a[I * f + k] ? 1 : 0];
2116
2122
  }
2117
- c[C++] = T.r, c[C++] = T.g, c[C++] = T.b, c[C] = T.a;
2123
+ c[C++] = B.r, c[C++] = B.g, c[C++] = B.b, c[C] = B.a;
2118
2124
  }
2119
2125
  };
2120
- }, {}], 28: [function(n, g, l) {
2121
- var f = n("isarray");
2126
+ }, {}], 28: [function(n, g, u) {
2127
+ var h = n("isarray");
2122
2128
  function d() {
2123
2129
  try {
2124
2130
  var _ = new Uint8Array(1);
@@ -2131,8 +2137,8 @@ Minimum version required to store current data is: ` + Y + `.
2131
2137
  }
2132
2138
  i.TYPED_ARRAY_SUPPORT = d();
2133
2139
  var c = i.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;
2134
- function i(_, v, p) {
2135
- return !i.TYPED_ARRAY_SUPPORT && !(this instanceof i) ? new i(_, v, p) : typeof _ == "number" ? w(this, _) : k(this, _, v, p);
2140
+ function i(_, m, p) {
2141
+ return !i.TYPED_ARRAY_SUPPORT && !(this instanceof i) ? new i(_, m, p) : typeof _ == "number" ? w(this, _) : k(this, _, m, p);
2136
2142
  }
2137
2143
  i.TYPED_ARRAY_SUPPORT && (i.prototype.__proto__ = Uint8Array.prototype, i.__proto__ = Uint8Array, typeof Symbol < "u" && Symbol.species && i[Symbol.species] === i && Object.defineProperty(i, Symbol.species, {
2138
2144
  value: null,
@@ -2145,85 +2151,85 @@ Minimum version required to store current data is: ` + Y + `.
2145
2151
  throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + c.toString(16) + " bytes");
2146
2152
  return _ | 0;
2147
2153
  }
2148
- function h(_) {
2154
+ function f(_) {
2149
2155
  return _ !== _;
2150
2156
  }
2151
- function a(_, v) {
2157
+ function a(_, m) {
2152
2158
  var p;
2153
- return i.TYPED_ARRAY_SUPPORT ? (p = new Uint8Array(v), p.__proto__ = i.prototype) : (p = _, p === null && (p = new i(v)), p.length = v), p;
2159
+ return i.TYPED_ARRAY_SUPPORT ? (p = new Uint8Array(m), p.__proto__ = i.prototype) : (p = _, p === null && (p = new i(m)), p.length = m), p;
2154
2160
  }
2155
- function w(_, v) {
2156
- var p = a(_, v < 0 ? 0 : s(v) | 0);
2161
+ function w(_, m) {
2162
+ var p = a(_, m < 0 ? 0 : s(m) | 0);
2157
2163
  if (!i.TYPED_ARRAY_SUPPORT)
2158
- for (var E = 0; E < v; ++E)
2164
+ for (var E = 0; E < m; ++E)
2159
2165
  p[E] = 0;
2160
2166
  return p;
2161
2167
  }
2162
- function x(_, v) {
2163
- var p = C(v) | 0, E = a(_, p), A = E.write(v);
2164
- return A !== p && (E = E.slice(0, A)), E;
2168
+ function x(_, m) {
2169
+ var p = C(m) | 0, E = a(_, p), T = E.write(m);
2170
+ return T !== p && (E = E.slice(0, T)), E;
2165
2171
  }
2166
- function b(_, v) {
2167
- for (var p = v.length < 0 ? 0 : s(v.length) | 0, E = a(_, p), A = 0; A < p; A += 1)
2168
- E[A] = v[A] & 255;
2172
+ function b(_, m) {
2173
+ for (var p = m.length < 0 ? 0 : s(m.length) | 0, E = a(_, p), T = 0; T < p; T += 1)
2174
+ E[T] = m[T] & 255;
2169
2175
  return E;
2170
2176
  }
2171
- function S(_, v, p, E) {
2172
- if (p < 0 || v.byteLength < p)
2177
+ function A(_, m, p, E) {
2178
+ if (p < 0 || m.byteLength < p)
2173
2179
  throw new RangeError("'offset' is out of bounds");
2174
- if (v.byteLength < p + (E || 0))
2180
+ if (m.byteLength < p + (E || 0))
2175
2181
  throw new RangeError("'length' is out of bounds");
2176
- var A;
2177
- return p === void 0 && E === void 0 ? A = new Uint8Array(v) : E === void 0 ? A = new Uint8Array(v, p) : A = new Uint8Array(v, p, E), i.TYPED_ARRAY_SUPPORT ? A.__proto__ = i.prototype : A = b(_, A), A;
2182
+ var T;
2183
+ return p === void 0 && E === void 0 ? T = new Uint8Array(m) : E === void 0 ? T = new Uint8Array(m, p) : T = new Uint8Array(m, p, E), i.TYPED_ARRAY_SUPPORT ? T.__proto__ = i.prototype : T = b(_, T), T;
2178
2184
  }
2179
- function F(_, v) {
2180
- if (i.isBuffer(v)) {
2181
- var p = s(v.length) | 0, E = a(_, p);
2182
- return E.length === 0 || v.copy(E, 0, 0, p), E;
2185
+ function F(_, m) {
2186
+ if (i.isBuffer(m)) {
2187
+ var p = s(m.length) | 0, E = a(_, p);
2188
+ return E.length === 0 || m.copy(E, 0, 0, p), E;
2183
2189
  }
2184
- if (v) {
2185
- if (typeof ArrayBuffer < "u" && v.buffer instanceof ArrayBuffer || "length" in v)
2186
- return typeof v.length != "number" || h(v.length) ? a(_, 0) : b(_, v);
2187
- if (v.type === "Buffer" && Array.isArray(v.data))
2188
- return b(_, v.data);
2190
+ if (m) {
2191
+ if (typeof ArrayBuffer < "u" && m.buffer instanceof ArrayBuffer || "length" in m)
2192
+ return typeof m.length != "number" || f(m.length) ? a(_, 0) : b(_, m);
2193
+ if (m.type === "Buffer" && Array.isArray(m.data))
2194
+ return b(_, m.data);
2189
2195
  }
2190
2196
  throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
2191
2197
  }
2192
- function M(_, v) {
2193
- v = v || 1 / 0;
2194
- for (var p, E = _.length, A = null, L = [], W = 0; W < E; ++W) {
2198
+ function M(_, m) {
2199
+ m = m || 1 / 0;
2200
+ for (var p, E = _.length, T = null, L = [], W = 0; W < E; ++W) {
2195
2201
  if (p = _.charCodeAt(W), p > 55295 && p < 57344) {
2196
- if (!A) {
2202
+ if (!T) {
2197
2203
  if (p > 56319) {
2198
- (v -= 3) > -1 && L.push(239, 191, 189);
2204
+ (m -= 3) > -1 && L.push(239, 191, 189);
2199
2205
  continue;
2200
2206
  } else if (W + 1 === E) {
2201
- (v -= 3) > -1 && L.push(239, 191, 189);
2207
+ (m -= 3) > -1 && L.push(239, 191, 189);
2202
2208
  continue;
2203
2209
  }
2204
- A = p;
2210
+ T = p;
2205
2211
  continue;
2206
2212
  }
2207
2213
  if (p < 56320) {
2208
- (v -= 3) > -1 && L.push(239, 191, 189), A = p;
2214
+ (m -= 3) > -1 && L.push(239, 191, 189), T = p;
2209
2215
  continue;
2210
2216
  }
2211
- p = (A - 55296 << 10 | p - 56320) + 65536;
2217
+ p = (T - 55296 << 10 | p - 56320) + 65536;
2212
2218
  } else
2213
- A && (v -= 3) > -1 && L.push(239, 191, 189);
2214
- if (A = null, p < 128) {
2215
- if ((v -= 1) < 0)
2219
+ T && (m -= 3) > -1 && L.push(239, 191, 189);
2220
+ if (T = null, p < 128) {
2221
+ if ((m -= 1) < 0)
2216
2222
  break;
2217
2223
  L.push(p);
2218
2224
  } else if (p < 2048) {
2219
- if ((v -= 2) < 0)
2225
+ if ((m -= 2) < 0)
2220
2226
  break;
2221
2227
  L.push(
2222
2228
  p >> 6 | 192,
2223
2229
  p & 63 | 128
2224
2230
  );
2225
2231
  } else if (p < 65536) {
2226
- if ((v -= 3) < 0)
2232
+ if ((m -= 3) < 0)
2227
2233
  break;
2228
2234
  L.push(
2229
2235
  p >> 12 | 224,
@@ -2231,7 +2237,7 @@ Minimum version required to store current data is: ` + Y + `.
2231
2237
  p & 63 | 128
2232
2238
  );
2233
2239
  } else if (p < 1114112) {
2234
- if ((v -= 4) < 0)
2240
+ if ((m -= 4) < 0)
2235
2241
  break;
2236
2242
  L.push(
2237
2243
  p >> 18 | 240,
@@ -2250,166 +2256,166 @@ Minimum version required to store current data is: ` + Y + `.
2250
2256
  if (typeof ArrayBuffer < "u" && typeof ArrayBuffer.isView == "function" && (ArrayBuffer.isView(_) || _ instanceof ArrayBuffer))
2251
2257
  return _.byteLength;
2252
2258
  typeof _ != "string" && (_ = "" + _);
2253
- var v = _.length;
2254
- return v === 0 ? 0 : M(_).length;
2259
+ var m = _.length;
2260
+ return m === 0 ? 0 : M(_).length;
2255
2261
  }
2256
- function T(_, v, p, E) {
2257
- for (var A = 0; A < E && !(A + p >= v.length || A >= _.length); ++A)
2258
- v[A + p] = _[A];
2259
- return A;
2262
+ function B(_, m, p, E) {
2263
+ for (var T = 0; T < E && !(T + p >= m.length || T >= _.length); ++T)
2264
+ m[T + p] = _[T];
2265
+ return T;
2260
2266
  }
2261
- function I(_, v, p, E) {
2262
- return T(M(v, _.length - p), _, p, E);
2267
+ function I(_, m, p, E) {
2268
+ return B(M(m, _.length - p), _, p, E);
2263
2269
  }
2264
- function k(_, v, p, E) {
2265
- if (typeof v == "number")
2270
+ function k(_, m, p, E) {
2271
+ if (typeof m == "number")
2266
2272
  throw new TypeError('"value" argument must not be a number');
2267
- return typeof ArrayBuffer < "u" && v instanceof ArrayBuffer ? S(_, v, p, E) : typeof v == "string" ? x(_, v) : F(_, v);
2273
+ return typeof ArrayBuffer < "u" && m instanceof ArrayBuffer ? A(_, m, p, E) : typeof m == "string" ? x(_, m) : F(_, m);
2268
2274
  }
2269
- i.prototype.write = function(v, p, E) {
2275
+ i.prototype.write = function(m, p, E) {
2270
2276
  p === void 0 ? (E = this.length, p = 0) : E === void 0 && typeof p == "string" ? (E = this.length, p = 0) : isFinite(p) && (p = p | 0, isFinite(E) ? E = E | 0 : E = void 0);
2271
- var A = this.length - p;
2272
- if ((E === void 0 || E > A) && (E = A), v.length > 0 && (E < 0 || p < 0) || p > this.length)
2277
+ var T = this.length - p;
2278
+ if ((E === void 0 || E > T) && (E = T), m.length > 0 && (E < 0 || p < 0) || p > this.length)
2273
2279
  throw new RangeError("Attempt to write outside buffer bounds");
2274
- return I(this, v, p, E);
2275
- }, i.prototype.slice = function(v, p) {
2280
+ return I(this, m, p, E);
2281
+ }, i.prototype.slice = function(m, p) {
2276
2282
  var E = this.length;
2277
- v = ~~v, p = p === void 0 ? E : ~~p, v < 0 ? (v += E, v < 0 && (v = 0)) : v > E && (v = E), p < 0 ? (p += E, p < 0 && (p = 0)) : p > E && (p = E), p < v && (p = v);
2278
- var A;
2283
+ m = ~~m, p = p === void 0 ? E : ~~p, m < 0 ? (m += E, m < 0 && (m = 0)) : m > E && (m = E), p < 0 ? (p += E, p < 0 && (p = 0)) : p > E && (p = E), p < m && (p = m);
2284
+ var T;
2279
2285
  if (i.TYPED_ARRAY_SUPPORT)
2280
- A = this.subarray(v, p), A.__proto__ = i.prototype;
2286
+ T = this.subarray(m, p), T.__proto__ = i.prototype;
2281
2287
  else {
2282
- var L = p - v;
2283
- A = new i(L, void 0);
2288
+ var L = p - m;
2289
+ T = new i(L, void 0);
2284
2290
  for (var W = 0; W < L; ++W)
2285
- A[W] = this[W + v];
2291
+ T[W] = this[W + m];
2286
2292
  }
2287
- return A;
2288
- }, i.prototype.copy = function(v, p, E, A) {
2289
- if (E || (E = 0), !A && A !== 0 && (A = this.length), p >= v.length && (p = v.length), p || (p = 0), A > 0 && A < E && (A = E), A === E || v.length === 0 || this.length === 0)
2293
+ return T;
2294
+ }, i.prototype.copy = function(m, p, E, T) {
2295
+ if (E || (E = 0), !T && T !== 0 && (T = this.length), p >= m.length && (p = m.length), p || (p = 0), T > 0 && T < E && (T = E), T === E || m.length === 0 || this.length === 0)
2290
2296
  return 0;
2291
2297
  if (p < 0)
2292
2298
  throw new RangeError("targetStart out of bounds");
2293
2299
  if (E < 0 || E >= this.length)
2294
2300
  throw new RangeError("sourceStart out of bounds");
2295
- if (A < 0)
2301
+ if (T < 0)
2296
2302
  throw new RangeError("sourceEnd out of bounds");
2297
- A > this.length && (A = this.length), v.length - p < A - E && (A = v.length - p + E);
2298
- var L = A - E, W;
2299
- if (this === v && E < p && p < A)
2303
+ T > this.length && (T = this.length), m.length - p < T - E && (T = m.length - p + E);
2304
+ var L = T - E, W;
2305
+ if (this === m && E < p && p < T)
2300
2306
  for (W = L - 1; W >= 0; --W)
2301
- v[W + p] = this[W + E];
2307
+ m[W + p] = this[W + E];
2302
2308
  else if (L < 1e3 || !i.TYPED_ARRAY_SUPPORT)
2303
2309
  for (W = 0; W < L; ++W)
2304
- v[W + p] = this[W + E];
2310
+ m[W + p] = this[W + E];
2305
2311
  else
2306
2312
  Uint8Array.prototype.set.call(
2307
- v,
2313
+ m,
2308
2314
  this.subarray(E, E + L),
2309
2315
  p
2310
2316
  );
2311
2317
  return L;
2312
- }, i.prototype.fill = function(v, p, E) {
2313
- if (typeof v == "string") {
2314
- if (typeof p == "string" ? (p = 0, E = this.length) : typeof E == "string" && (E = this.length), v.length === 1) {
2315
- var A = v.charCodeAt(0);
2316
- A < 256 && (v = A);
2318
+ }, i.prototype.fill = function(m, p, E) {
2319
+ if (typeof m == "string") {
2320
+ if (typeof p == "string" ? (p = 0, E = this.length) : typeof E == "string" && (E = this.length), m.length === 1) {
2321
+ var T = m.charCodeAt(0);
2322
+ T < 256 && (m = T);
2317
2323
  }
2318
2324
  } else
2319
- typeof v == "number" && (v = v & 255);
2325
+ typeof m == "number" && (m = m & 255);
2320
2326
  if (p < 0 || this.length < p || this.length < E)
2321
2327
  throw new RangeError("Out of range index");
2322
2328
  if (E <= p)
2323
2329
  return this;
2324
- p = p >>> 0, E = E === void 0 ? this.length : E >>> 0, v || (v = 0);
2330
+ p = p >>> 0, E = E === void 0 ? this.length : E >>> 0, m || (m = 0);
2325
2331
  var L;
2326
- if (typeof v == "number")
2332
+ if (typeof m == "number")
2327
2333
  for (L = p; L < E; ++L)
2328
- this[L] = v;
2334
+ this[L] = m;
2329
2335
  else {
2330
- var W = i.isBuffer(v) ? v : new i(v), $ = W.length;
2336
+ var W = i.isBuffer(m) ? m : new i(m), $ = W.length;
2331
2337
  for (L = 0; L < E - p; ++L)
2332
2338
  this[L + p] = W[L % $];
2333
2339
  }
2334
2340
  return this;
2335
- }, i.concat = function(v, p) {
2336
- if (!f(v))
2341
+ }, i.concat = function(m, p) {
2342
+ if (!h(m))
2337
2343
  throw new TypeError('"list" argument must be an Array of Buffers');
2338
- if (v.length === 0)
2344
+ if (m.length === 0)
2339
2345
  return a(null, 0);
2340
2346
  var E;
2341
2347
  if (p === void 0)
2342
- for (p = 0, E = 0; E < v.length; ++E)
2343
- p += v[E].length;
2344
- var A = w(null, p), L = 0;
2345
- for (E = 0; E < v.length; ++E) {
2346
- var W = v[E];
2348
+ for (p = 0, E = 0; E < m.length; ++E)
2349
+ p += m[E].length;
2350
+ var T = w(null, p), L = 0;
2351
+ for (E = 0; E < m.length; ++E) {
2352
+ var W = m[E];
2347
2353
  if (!i.isBuffer(W))
2348
2354
  throw new TypeError('"list" argument must be an Array of Buffers');
2349
- W.copy(A, L), L += W.length;
2355
+ W.copy(T, L), L += W.length;
2350
2356
  }
2351
- return A;
2352
- }, i.byteLength = C, i.prototype._isBuffer = !0, i.isBuffer = function(v) {
2353
- return !!(v != null && v._isBuffer);
2357
+ return T;
2358
+ }, i.byteLength = C, i.prototype._isBuffer = !0, i.isBuffer = function(m) {
2359
+ return !!(m != null && m._isBuffer);
2354
2360
  }, g.exports.alloc = function(_) {
2355
- var v = new i(_);
2356
- return v.fill(0), v;
2361
+ var m = new i(_);
2362
+ return m.fill(0), m;
2357
2363
  }, g.exports.from = function(_) {
2358
2364
  return new i(_);
2359
2365
  };
2360
- }, { isarray: 33 }], 29: [function(n, g, l) {
2361
- l.byteLength = w, l.toByteArray = b, l.fromByteArray = M;
2362
- for (var f = [], d = [], c = typeof Uint8Array < "u" ? Uint8Array : Array, i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s = 0, h = i.length; s < h; ++s)
2363
- f[s] = i[s], d[i.charCodeAt(s)] = s;
2366
+ }, { isarray: 33 }], 29: [function(n, g, u) {
2367
+ u.byteLength = w, u.toByteArray = b, u.fromByteArray = M;
2368
+ for (var h = [], d = [], c = typeof Uint8Array < "u" ? Uint8Array : Array, i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s = 0, f = i.length; s < f; ++s)
2369
+ h[s] = i[s], d[i.charCodeAt(s)] = s;
2364
2370
  d["-".charCodeAt(0)] = 62, d["_".charCodeAt(0)] = 63;
2365
2371
  function a(C) {
2366
- var T = C.length;
2367
- if (T % 4 > 0)
2372
+ var B = C.length;
2373
+ if (B % 4 > 0)
2368
2374
  throw new Error("Invalid string. Length must be a multiple of 4");
2369
2375
  var I = C.indexOf("=");
2370
- I === -1 && (I = T);
2371
- var k = I === T ? 0 : 4 - I % 4;
2376
+ I === -1 && (I = B);
2377
+ var k = I === B ? 0 : 4 - I % 4;
2372
2378
  return [I, k];
2373
2379
  }
2374
2380
  function w(C) {
2375
- var T = a(C), I = T[0], k = T[1];
2381
+ var B = a(C), I = B[0], k = B[1];
2376
2382
  return (I + k) * 3 / 4 - k;
2377
2383
  }
2378
- function x(C, T, I) {
2379
- return (T + I) * 3 / 4 - I;
2384
+ function x(C, B, I) {
2385
+ return (B + I) * 3 / 4 - I;
2380
2386
  }
2381
2387
  function b(C) {
2382
- var T, I = a(C), k = I[0], _ = I[1], v = new c(x(C, k, _)), p = 0, E = _ > 0 ? k - 4 : k, A;
2383
- for (A = 0; A < E; A += 4)
2384
- T = d[C.charCodeAt(A)] << 18 | d[C.charCodeAt(A + 1)] << 12 | d[C.charCodeAt(A + 2)] << 6 | d[C.charCodeAt(A + 3)], v[p++] = T >> 16 & 255, v[p++] = T >> 8 & 255, v[p++] = T & 255;
2385
- return _ === 2 && (T = d[C.charCodeAt(A)] << 2 | d[C.charCodeAt(A + 1)] >> 4, v[p++] = T & 255), _ === 1 && (T = d[C.charCodeAt(A)] << 10 | d[C.charCodeAt(A + 1)] << 4 | d[C.charCodeAt(A + 2)] >> 2, v[p++] = T >> 8 & 255, v[p++] = T & 255), v;
2388
+ var B, I = a(C), k = I[0], _ = I[1], m = new c(x(C, k, _)), p = 0, E = _ > 0 ? k - 4 : k, T;
2389
+ for (T = 0; T < E; T += 4)
2390
+ B = d[C.charCodeAt(T)] << 18 | d[C.charCodeAt(T + 1)] << 12 | d[C.charCodeAt(T + 2)] << 6 | d[C.charCodeAt(T + 3)], m[p++] = B >> 16 & 255, m[p++] = B >> 8 & 255, m[p++] = B & 255;
2391
+ return _ === 2 && (B = d[C.charCodeAt(T)] << 2 | d[C.charCodeAt(T + 1)] >> 4, m[p++] = B & 255), _ === 1 && (B = d[C.charCodeAt(T)] << 10 | d[C.charCodeAt(T + 1)] << 4 | d[C.charCodeAt(T + 2)] >> 2, m[p++] = B >> 8 & 255, m[p++] = B & 255), m;
2386
2392
  }
2387
- function S(C) {
2388
- return f[C >> 18 & 63] + f[C >> 12 & 63] + f[C >> 6 & 63] + f[C & 63];
2393
+ function A(C) {
2394
+ return h[C >> 18 & 63] + h[C >> 12 & 63] + h[C >> 6 & 63] + h[C & 63];
2389
2395
  }
2390
- function F(C, T, I) {
2391
- for (var k, _ = [], v = T; v < I; v += 3)
2392
- k = (C[v] << 16 & 16711680) + (C[v + 1] << 8 & 65280) + (C[v + 2] & 255), _.push(S(k));
2396
+ function F(C, B, I) {
2397
+ for (var k, _ = [], m = B; m < I; m += 3)
2398
+ k = (C[m] << 16 & 16711680) + (C[m + 1] << 8 & 65280) + (C[m + 2] & 255), _.push(A(k));
2393
2399
  return _.join("");
2394
2400
  }
2395
2401
  function M(C) {
2396
- for (var T, I = C.length, k = I % 3, _ = [], v = 16383, p = 0, E = I - k; p < E; p += v)
2402
+ for (var B, I = C.length, k = I % 3, _ = [], m = 16383, p = 0, E = I - k; p < E; p += m)
2397
2403
  _.push(F(
2398
2404
  C,
2399
2405
  p,
2400
- p + v > E ? E : p + v
2406
+ p + m > E ? E : p + m
2401
2407
  ));
2402
- return k === 1 ? (T = C[I - 1], _.push(
2403
- f[T >> 2] + f[T << 4 & 63] + "=="
2404
- )) : k === 2 && (T = (C[I - 2] << 8) + C[I - 1], _.push(
2405
- f[T >> 10] + f[T >> 4 & 63] + f[T << 2 & 63] + "="
2408
+ return k === 1 ? (B = C[I - 1], _.push(
2409
+ h[B >> 2] + h[B << 4 & 63] + "=="
2410
+ )) : k === 2 && (B = (C[I - 2] << 8) + C[I - 1], _.push(
2411
+ h[B >> 10] + h[B >> 4 & 63] + h[B << 2 & 63] + "="
2406
2412
  )), _.join("");
2407
2413
  }
2408
- }, {}], 30: [function(n, g, l) {
2409
- var f = n("base64-js"), d = n("ieee754"), c = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
2410
- l.Buffer = a, l.SlowBuffer = k, l.INSPECT_MAX_BYTES = 50;
2414
+ }, {}], 30: [function(n, g, u) {
2415
+ var h = n("base64-js"), d = n("ieee754"), c = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
2416
+ u.Buffer = a, u.SlowBuffer = k, u.INSPECT_MAX_BYTES = 50;
2411
2417
  var i = 2147483647;
2412
- l.kMaxLength = i, a.TYPED_ARRAY_SUPPORT = s(), !a.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
2418
+ u.kMaxLength = i, a.TYPED_ARRAY_SUPPORT = s(), !a.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
2413
2419
  "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
2414
2420
  );
2415
2421
  function s() {
@@ -2435,7 +2441,7 @@ Minimum version required to store current data is: ` + Y + `.
2435
2441
  return this.byteOffset;
2436
2442
  }
2437
2443
  });
2438
- function h(o) {
2444
+ function f(o) {
2439
2445
  if (o > i)
2440
2446
  throw new RangeError('The value "' + o + '" is invalid for option "size"');
2441
2447
  var t = new Uint8Array(o);
@@ -2447,7 +2453,7 @@ Minimum version required to store current data is: ` + Y + `.
2447
2453
  throw new TypeError(
2448
2454
  'The "string" argument must be of type string. Received type number'
2449
2455
  );
2450
- return S(o);
2456
+ return A(o);
2451
2457
  }
2452
2458
  return w(o, t, e);
2453
2459
  }
@@ -2472,10 +2478,10 @@ Minimum version required to store current data is: ` + Y + `.
2472
2478
  throw new TypeError(
2473
2479
  'The "value" argument must not be of type number. Received type number'
2474
2480
  );
2475
- var u = o.valueOf && o.valueOf();
2476
- if (u != null && u !== o)
2477
- return a.from(u, t, e);
2478
- var y = T(o);
2481
+ var l = o.valueOf && o.valueOf();
2482
+ if (l != null && l !== o)
2483
+ return a.from(l, t, e);
2484
+ var y = B(o);
2479
2485
  if (y)
2480
2486
  return y;
2481
2487
  if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof o[Symbol.toPrimitive] == "function")
@@ -2498,28 +2504,28 @@ Minimum version required to store current data is: ` + Y + `.
2498
2504
  throw new RangeError('The value "' + o + '" is invalid for option "size"');
2499
2505
  }
2500
2506
  function b(o, t, e) {
2501
- return x(o), o <= 0 ? h(o) : t !== void 0 ? typeof e == "string" ? h(o).fill(t, e) : h(o).fill(t) : h(o);
2507
+ return x(o), o <= 0 ? f(o) : t !== void 0 ? typeof e == "string" ? f(o).fill(t, e) : f(o).fill(t) : f(o);
2502
2508
  }
2503
2509
  a.alloc = function(o, t, e) {
2504
2510
  return b(o, t, e);
2505
2511
  };
2506
- function S(o) {
2507
- return x(o), h(o < 0 ? 0 : I(o) | 0);
2512
+ function A(o) {
2513
+ return x(o), f(o < 0 ? 0 : I(o) | 0);
2508
2514
  }
2509
2515
  a.allocUnsafe = function(o) {
2510
- return S(o);
2516
+ return A(o);
2511
2517
  }, a.allocUnsafeSlow = function(o) {
2512
- return S(o);
2518
+ return A(o);
2513
2519
  };
2514
2520
  function F(o, t) {
2515
2521
  if ((typeof t != "string" || t === "") && (t = "utf8"), !a.isEncoding(t))
2516
2522
  throw new TypeError("Unknown encoding: " + t);
2517
- var e = _(o, t) | 0, u = h(e), y = u.write(o, t);
2518
- return y !== e && (u = u.slice(0, y)), u;
2523
+ var e = _(o, t) | 0, l = f(e), y = l.write(o, t);
2524
+ return y !== e && (l = l.slice(0, y)), l;
2519
2525
  }
2520
2526
  function M(o) {
2521
- for (var t = o.length < 0 ? 0 : I(o.length) | 0, e = h(t), u = 0; u < t; u += 1)
2522
- e[u] = o[u] & 255;
2527
+ for (var t = o.length < 0 ? 0 : I(o.length) | 0, e = f(t), l = 0; l < t; l += 1)
2528
+ e[l] = o[l] & 255;
2523
2529
  return e;
2524
2530
  }
2525
2531
  function C(o, t, e) {
@@ -2527,16 +2533,16 @@ Minimum version required to store current data is: ` + Y + `.
2527
2533
  throw new RangeError('"offset" is outside of buffer bounds');
2528
2534
  if (o.byteLength < t + (e || 0))
2529
2535
  throw new RangeError('"length" is outside of buffer bounds');
2530
- var u;
2531
- return t === void 0 && e === void 0 ? u = new Uint8Array(o) : e === void 0 ? u = new Uint8Array(o, t) : u = new Uint8Array(o, t, e), Object.setPrototypeOf(u, a.prototype), u;
2536
+ var l;
2537
+ return t === void 0 && e === void 0 ? l = new Uint8Array(o) : e === void 0 ? l = new Uint8Array(o, t) : l = new Uint8Array(o, t, e), Object.setPrototypeOf(l, a.prototype), l;
2532
2538
  }
2533
- function T(o) {
2539
+ function B(o) {
2534
2540
  if (a.isBuffer(o)) {
2535
- var t = I(o.length) | 0, e = h(t);
2541
+ var t = I(o.length) | 0, e = f(t);
2536
2542
  return e.length === 0 || o.copy(e, 0, 0, t), e;
2537
2543
  }
2538
2544
  if (o.length !== void 0)
2539
- return typeof o.length != "number" || yt(o.length) ? h(0) : M(o);
2545
+ return typeof o.length != "number" || yt(o.length) ? f(0) : M(o);
2540
2546
  if (o.type === "Buffer" && Array.isArray(o.data))
2541
2547
  return M(o.data);
2542
2548
  }
@@ -2557,12 +2563,12 @@ Minimum version required to store current data is: ` + Y + `.
2557
2563
  );
2558
2564
  if (t === e)
2559
2565
  return 0;
2560
- for (var u = t.length, y = e.length, P = 0, B = Math.min(u, y); P < B; ++P)
2566
+ for (var l = t.length, y = e.length, P = 0, S = Math.min(l, y); P < S; ++P)
2561
2567
  if (t[P] !== e[P]) {
2562
- u = t[P], y = e[P];
2568
+ l = t[P], y = e[P];
2563
2569
  break;
2564
2570
  }
2565
- return u < y ? -1 : y < u ? 1 : 0;
2571
+ return l < y ? -1 : y < l ? 1 : 0;
2566
2572
  }, a.isEncoding = function(t) {
2567
2573
  switch (String(t).toLowerCase()) {
2568
2574
  case "hex":
@@ -2585,16 +2591,16 @@ Minimum version required to store current data is: ` + Y + `.
2585
2591
  throw new TypeError('"list" argument must be an Array of Buffers');
2586
2592
  if (t.length === 0)
2587
2593
  return a.alloc(0);
2588
- var u;
2594
+ var l;
2589
2595
  if (e === void 0)
2590
- for (e = 0, u = 0; u < t.length; ++u)
2591
- e += t[u].length;
2596
+ for (e = 0, l = 0; l < t.length; ++l)
2597
+ e += t[l].length;
2592
2598
  var y = a.allocUnsafe(e), P = 0;
2593
- for (u = 0; u < t.length; ++u) {
2594
- var B = t[u];
2595
- if (Q(B, Uint8Array) && (B = a.from(B)), !a.isBuffer(B))
2599
+ for (l = 0; l < t.length; ++l) {
2600
+ var S = t[l];
2601
+ if (Q(S, Uint8Array) && (S = a.from(S)), !a.isBuffer(S))
2596
2602
  throw new TypeError('"list" argument must be an Array of Buffers');
2597
- B.copy(y, P), P += B.length;
2603
+ S.copy(y, P), P += S.length;
2598
2604
  }
2599
2605
  return y;
2600
2606
  };
@@ -2607,8 +2613,8 @@ Minimum version required to store current data is: ` + Y + `.
2607
2613
  throw new TypeError(
2608
2614
  'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof o
2609
2615
  );
2610
- var e = o.length, u = arguments.length > 2 && arguments[2] === !0;
2611
- if (!u && e === 0)
2616
+ var e = o.length, l = arguments.length > 2 && arguments[2] === !0;
2617
+ if (!l && e === 0)
2612
2618
  return 0;
2613
2619
  for (var y = !1; ; )
2614
2620
  switch (t) {
@@ -2630,13 +2636,13 @@ Minimum version required to store current data is: ` + Y + `.
2630
2636
  return ht(o).length;
2631
2637
  default:
2632
2638
  if (y)
2633
- return u ? -1 : rt(o).length;
2639
+ return l ? -1 : rt(o).length;
2634
2640
  t = ("" + t).toLowerCase(), y = !0;
2635
2641
  }
2636
2642
  }
2637
2643
  a.byteLength = _;
2638
- function v(o, t, e) {
2639
- var u = !1;
2644
+ function m(o, t, e) {
2645
+ var l = !1;
2640
2646
  if ((t === void 0 || t < 0) && (t = 0), t > this.length || ((e === void 0 || e > this.length) && (e = this.length), e <= 0) || (e >>>= 0, t >>>= 0, e <= t))
2641
2647
  return "";
2642
2648
  for (o || (o = "utf8"); ; )
@@ -2659,15 +2665,15 @@ Minimum version required to store current data is: ` + Y + `.
2659
2665
  case "utf-16le":
2660
2666
  return mt(this, t, e);
2661
2667
  default:
2662
- if (u)
2668
+ if (l)
2663
2669
  throw new TypeError("Unknown encoding: " + o);
2664
- o = (o + "").toLowerCase(), u = !0;
2670
+ o = (o + "").toLowerCase(), l = !0;
2665
2671
  }
2666
2672
  }
2667
2673
  a.prototype._isBuffer = !0;
2668
2674
  function p(o, t, e) {
2669
- var u = o[t];
2670
- o[t] = o[e], o[e] = u;
2675
+ var l = o[t];
2676
+ o[t] = o[e], o[e] = l;
2671
2677
  }
2672
2678
  a.prototype.swap16 = function() {
2673
2679
  var t = this.length;
@@ -2692,40 +2698,40 @@ Minimum version required to store current data is: ` + Y + `.
2692
2698
  return this;
2693
2699
  }, a.prototype.toString = function() {
2694
2700
  var t = this.length;
2695
- return t === 0 ? "" : arguments.length === 0 ? z(this, 0, t) : v.apply(this, arguments);
2701
+ return t === 0 ? "" : arguments.length === 0 ? z(this, 0, t) : m.apply(this, arguments);
2696
2702
  }, a.prototype.toLocaleString = a.prototype.toString, a.prototype.equals = function(t) {
2697
2703
  if (!a.isBuffer(t))
2698
2704
  throw new TypeError("Argument must be a Buffer");
2699
2705
  return this === t ? !0 : a.compare(this, t) === 0;
2700
2706
  }, a.prototype.inspect = function() {
2701
- var t = "", e = l.INSPECT_MAX_BYTES;
2707
+ var t = "", e = u.INSPECT_MAX_BYTES;
2702
2708
  return t = this.toString("hex", 0, e).replace(/(.{2})/g, "$1 ").trim(), this.length > e && (t += " ... "), "<Buffer " + t + ">";
2703
- }, c && (a.prototype[c] = a.prototype.inspect), a.prototype.compare = function(t, e, u, y, P) {
2709
+ }, c && (a.prototype[c] = a.prototype.inspect), a.prototype.compare = function(t, e, l, y, P) {
2704
2710
  if (Q(t, Uint8Array) && (t = a.from(t, t.offset, t.byteLength)), !a.isBuffer(t))
2705
2711
  throw new TypeError(
2706
2712
  'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t
2707
2713
  );
2708
- if (e === void 0 && (e = 0), u === void 0 && (u = t ? t.length : 0), y === void 0 && (y = 0), P === void 0 && (P = this.length), e < 0 || u > t.length || y < 0 || P > this.length)
2714
+ if (e === void 0 && (e = 0), l === void 0 && (l = t ? t.length : 0), y === void 0 && (y = 0), P === void 0 && (P = this.length), e < 0 || l > t.length || y < 0 || P > this.length)
2709
2715
  throw new RangeError("out of range index");
2710
- if (y >= P && e >= u)
2716
+ if (y >= P && e >= l)
2711
2717
  return 0;
2712
2718
  if (y >= P)
2713
2719
  return -1;
2714
- if (e >= u)
2720
+ if (e >= l)
2715
2721
  return 1;
2716
- if (e >>>= 0, u >>>= 0, y >>>= 0, P >>>= 0, this === t)
2722
+ if (e >>>= 0, l >>>= 0, y >>>= 0, P >>>= 0, this === t)
2717
2723
  return 0;
2718
- for (var B = P - y, H = u - e, G = Math.min(B, H), V = this.slice(y, P), Z = t.slice(e, u), J = 0; J < G; ++J)
2719
- if (V[J] !== Z[J]) {
2720
- B = V[J], H = Z[J];
2724
+ for (var S = P - y, H = l - e, G = Math.min(S, H), K = this.slice(y, P), Z = t.slice(e, l), V = 0; V < G; ++V)
2725
+ if (K[V] !== Z[V]) {
2726
+ S = K[V], H = Z[V];
2721
2727
  break;
2722
2728
  }
2723
- return B < H ? -1 : H < B ? 1 : 0;
2729
+ return S < H ? -1 : H < S ? 1 : 0;
2724
2730
  };
2725
- function E(o, t, e, u, y) {
2731
+ function E(o, t, e, l, y) {
2726
2732
  if (o.length === 0)
2727
2733
  return -1;
2728
- if (typeof e == "string" ? (u = e, e = 0) : e > 2147483647 ? e = 2147483647 : e < -2147483648 && (e = -2147483648), e = +e, yt(e) && (e = y ? 0 : o.length - 1), e < 0 && (e = o.length + e), e >= o.length) {
2734
+ if (typeof e == "string" ? (l = e, e = 0) : e > 2147483647 ? e = 2147483647 : e < -2147483648 && (e = -2147483648), e = +e, yt(e) && (e = y ? 0 : o.length - 1), e < 0 && (e = o.length + e), e >= o.length) {
2729
2735
  if (y)
2730
2736
  return -1;
2731
2737
  e = o.length - 1;
@@ -2734,117 +2740,117 @@ Minimum version required to store current data is: ` + Y + `.
2734
2740
  e = 0;
2735
2741
  else
2736
2742
  return -1;
2737
- if (typeof t == "string" && (t = a.from(t, u)), a.isBuffer(t))
2738
- return t.length === 0 ? -1 : A(o, t, e, u, y);
2743
+ if (typeof t == "string" && (t = a.from(t, l)), a.isBuffer(t))
2744
+ return t.length === 0 ? -1 : T(o, t, e, l, y);
2739
2745
  if (typeof t == "number")
2740
- return t = t & 255, typeof Uint8Array.prototype.indexOf == "function" ? y ? Uint8Array.prototype.indexOf.call(o, t, e) : Uint8Array.prototype.lastIndexOf.call(o, t, e) : A(o, [t], e, u, y);
2746
+ return t = t & 255, typeof Uint8Array.prototype.indexOf == "function" ? y ? Uint8Array.prototype.indexOf.call(o, t, e) : Uint8Array.prototype.lastIndexOf.call(o, t, e) : T(o, [t], e, l, y);
2741
2747
  throw new TypeError("val must be string, number or Buffer");
2742
2748
  }
2743
- function A(o, t, e, u, y) {
2744
- var P = 1, B = o.length, H = t.length;
2745
- if (u !== void 0 && (u = String(u).toLowerCase(), u === "ucs2" || u === "ucs-2" || u === "utf16le" || u === "utf-16le")) {
2749
+ function T(o, t, e, l, y) {
2750
+ var P = 1, S = o.length, H = t.length;
2751
+ if (l !== void 0 && (l = String(l).toLowerCase(), l === "ucs2" || l === "ucs-2" || l === "utf16le" || l === "utf-16le")) {
2746
2752
  if (o.length < 2 || t.length < 2)
2747
2753
  return -1;
2748
- P = 2, B /= 2, H /= 2, e /= 2;
2754
+ P = 2, S /= 2, H /= 2, e /= 2;
2749
2755
  }
2750
- function G(bt, Pt) {
2751
- return P === 1 ? bt[Pt] : bt.readUInt16BE(Pt * P);
2756
+ function G(Pt, St) {
2757
+ return P === 1 ? Pt[St] : Pt.readUInt16BE(St * P);
2752
2758
  }
2753
- var V;
2759
+ var K;
2754
2760
  if (y) {
2755
2761
  var Z = -1;
2756
- for (V = e; V < B; V++)
2757
- if (G(o, V) === G(t, Z === -1 ? 0 : V - Z)) {
2758
- if (Z === -1 && (Z = V), V - Z + 1 === H)
2762
+ for (K = e; K < S; K++)
2763
+ if (G(o, K) === G(t, Z === -1 ? 0 : K - Z)) {
2764
+ if (Z === -1 && (Z = K), K - Z + 1 === H)
2759
2765
  return Z * P;
2760
2766
  } else
2761
- Z !== -1 && (V -= V - Z), Z = -1;
2767
+ Z !== -1 && (K -= K - Z), Z = -1;
2762
2768
  } else
2763
- for (e + H > B && (e = B - H), V = e; V >= 0; V--) {
2764
- for (var J = !0, dt = 0; dt < H; dt++)
2765
- if (G(o, V + dt) !== G(t, dt)) {
2766
- J = !1;
2769
+ for (e + H > S && (e = S - H), K = e; K >= 0; K--) {
2770
+ for (var V = !0, dt = 0; dt < H; dt++)
2771
+ if (G(o, K + dt) !== G(t, dt)) {
2772
+ V = !1;
2767
2773
  break;
2768
2774
  }
2769
- if (J)
2770
- return V;
2775
+ if (V)
2776
+ return K;
2771
2777
  }
2772
2778
  return -1;
2773
2779
  }
2774
- a.prototype.includes = function(t, e, u) {
2775
- return this.indexOf(t, e, u) !== -1;
2776
- }, a.prototype.indexOf = function(t, e, u) {
2777
- return E(this, t, e, u, !0);
2778
- }, a.prototype.lastIndexOf = function(t, e, u) {
2779
- return E(this, t, e, u, !1);
2780
+ a.prototype.includes = function(t, e, l) {
2781
+ return this.indexOf(t, e, l) !== -1;
2782
+ }, a.prototype.indexOf = function(t, e, l) {
2783
+ return E(this, t, e, l, !0);
2784
+ }, a.prototype.lastIndexOf = function(t, e, l) {
2785
+ return E(this, t, e, l, !1);
2780
2786
  };
2781
- function L(o, t, e, u) {
2787
+ function L(o, t, e, l) {
2782
2788
  e = Number(e) || 0;
2783
2789
  var y = o.length - e;
2784
- u ? (u = Number(u), u > y && (u = y)) : u = y;
2790
+ l ? (l = Number(l), l > y && (l = y)) : l = y;
2785
2791
  var P = t.length;
2786
- u > P / 2 && (u = P / 2);
2787
- for (var B = 0; B < u; ++B) {
2788
- var H = parseInt(t.substr(B * 2, 2), 16);
2792
+ l > P / 2 && (l = P / 2);
2793
+ for (var S = 0; S < l; ++S) {
2794
+ var H = parseInt(t.substr(S * 2, 2), 16);
2789
2795
  if (yt(H))
2790
- return B;
2791
- o[e + B] = H;
2796
+ return S;
2797
+ o[e + S] = H;
2792
2798
  }
2793
- return B;
2799
+ return S;
2794
2800
  }
2795
- function W(o, t, e, u) {
2796
- return tt(rt(t, o.length - e), o, e, u);
2801
+ function W(o, t, e, l) {
2802
+ return tt(rt(t, o.length - e), o, e, l);
2797
2803
  }
2798
- function $(o, t, e, u) {
2799
- return tt(ct(t), o, e, u);
2804
+ function $(o, t, e, l) {
2805
+ return tt(lt(t), o, e, l);
2800
2806
  }
2801
- function D(o, t, e, u) {
2802
- return $(o, t, e, u);
2807
+ function D(o, t, e, l) {
2808
+ return $(o, t, e, l);
2803
2809
  }
2804
- function U(o, t, e, u) {
2805
- return tt(ht(t), o, e, u);
2810
+ function U(o, t, e, l) {
2811
+ return tt(ht(t), o, e, l);
2806
2812
  }
2807
- function R(o, t, e, u) {
2808
- return tt(lt(t, o.length - e), o, e, u);
2813
+ function R(o, t, e, l) {
2814
+ return tt(ct(t, o.length - e), o, e, l);
2809
2815
  }
2810
- a.prototype.write = function(t, e, u, y) {
2816
+ a.prototype.write = function(t, e, l, y) {
2811
2817
  if (e === void 0)
2812
- y = "utf8", u = this.length, e = 0;
2813
- else if (u === void 0 && typeof e == "string")
2814
- y = e, u = this.length, e = 0;
2818
+ y = "utf8", l = this.length, e = 0;
2819
+ else if (l === void 0 && typeof e == "string")
2820
+ y = e, l = this.length, e = 0;
2815
2821
  else if (isFinite(e))
2816
- e = e >>> 0, isFinite(u) ? (u = u >>> 0, y === void 0 && (y = "utf8")) : (y = u, u = void 0);
2822
+ e = e >>> 0, isFinite(l) ? (l = l >>> 0, y === void 0 && (y = "utf8")) : (y = l, l = void 0);
2817
2823
  else
2818
2824
  throw new Error(
2819
2825
  "Buffer.write(string, encoding, offset[, length]) is no longer supported"
2820
2826
  );
2821
2827
  var P = this.length - e;
2822
- if ((u === void 0 || u > P) && (u = P), t.length > 0 && (u < 0 || e < 0) || e > this.length)
2828
+ if ((l === void 0 || l > P) && (l = P), t.length > 0 && (l < 0 || e < 0) || e > this.length)
2823
2829
  throw new RangeError("Attempt to write outside buffer bounds");
2824
2830
  y || (y = "utf8");
2825
- for (var B = !1; ; )
2831
+ for (var S = !1; ; )
2826
2832
  switch (y) {
2827
2833
  case "hex":
2828
- return L(this, t, e, u);
2834
+ return L(this, t, e, l);
2829
2835
  case "utf8":
2830
2836
  case "utf-8":
2831
- return W(this, t, e, u);
2837
+ return W(this, t, e, l);
2832
2838
  case "ascii":
2833
- return $(this, t, e, u);
2839
+ return $(this, t, e, l);
2834
2840
  case "latin1":
2835
2841
  case "binary":
2836
- return D(this, t, e, u);
2842
+ return D(this, t, e, l);
2837
2843
  case "base64":
2838
- return U(this, t, e, u);
2844
+ return U(this, t, e, l);
2839
2845
  case "ucs2":
2840
2846
  case "ucs-2":
2841
2847
  case "utf16le":
2842
2848
  case "utf-16le":
2843
- return R(this, t, e, u);
2849
+ return R(this, t, e, l);
2844
2850
  default:
2845
- if (B)
2851
+ if (S)
2846
2852
  throw new TypeError("Unknown encoding: " + y);
2847
- y = ("" + y).toLowerCase(), B = !0;
2853
+ y = ("" + y).toLowerCase(), S = !0;
2848
2854
  }
2849
2855
  }, a.prototype.toJSON = function() {
2850
2856
  return {
@@ -2853,249 +2859,249 @@ Minimum version required to store current data is: ` + Y + `.
2853
2859
  };
2854
2860
  };
2855
2861
  function O(o, t, e) {
2856
- return t === 0 && e === o.length ? f.fromByteArray(o) : f.fromByteArray(o.slice(t, e));
2862
+ return t === 0 && e === o.length ? h.fromByteArray(o) : h.fromByteArray(o.slice(t, e));
2857
2863
  }
2858
2864
  function z(o, t, e) {
2859
2865
  e = Math.min(o.length, e);
2860
- for (var u = [], y = t; y < e; ) {
2861
- var P = o[y], B = null, H = P > 239 ? 4 : P > 223 ? 3 : P > 191 ? 2 : 1;
2866
+ for (var l = [], y = t; y < e; ) {
2867
+ var P = o[y], S = null, H = P > 239 ? 4 : P > 223 ? 3 : P > 191 ? 2 : 1;
2862
2868
  if (y + H <= e) {
2863
- var G, V, Z, J;
2869
+ var G, K, Z, V;
2864
2870
  switch (H) {
2865
2871
  case 1:
2866
- P < 128 && (B = P);
2872
+ P < 128 && (S = P);
2867
2873
  break;
2868
2874
  case 2:
2869
- G = o[y + 1], (G & 192) === 128 && (J = (P & 31) << 6 | G & 63, J > 127 && (B = J));
2875
+ G = o[y + 1], (G & 192) === 128 && (V = (P & 31) << 6 | G & 63, V > 127 && (S = V));
2870
2876
  break;
2871
2877
  case 3:
2872
- G = o[y + 1], V = o[y + 2], (G & 192) === 128 && (V & 192) === 128 && (J = (P & 15) << 12 | (G & 63) << 6 | V & 63, J > 2047 && (J < 55296 || J > 57343) && (B = J));
2878
+ G = o[y + 1], K = o[y + 2], (G & 192) === 128 && (K & 192) === 128 && (V = (P & 15) << 12 | (G & 63) << 6 | K & 63, V > 2047 && (V < 55296 || V > 57343) && (S = V));
2873
2879
  break;
2874
2880
  case 4:
2875
- G = o[y + 1], V = o[y + 2], Z = o[y + 3], (G & 192) === 128 && (V & 192) === 128 && (Z & 192) === 128 && (J = (P & 15) << 18 | (G & 63) << 12 | (V & 63) << 6 | Z & 63, J > 65535 && J < 1114112 && (B = J));
2881
+ G = o[y + 1], K = o[y + 2], Z = o[y + 3], (G & 192) === 128 && (K & 192) === 128 && (Z & 192) === 128 && (V = (P & 15) << 18 | (G & 63) << 12 | (K & 63) << 6 | Z & 63, V > 65535 && V < 1114112 && (S = V));
2876
2882
  }
2877
2883
  }
2878
- B === null ? (B = 65533, H = 1) : B > 65535 && (B -= 65536, u.push(B >>> 10 & 1023 | 55296), B = 56320 | B & 1023), u.push(B), y += H;
2884
+ S === null ? (S = 65533, H = 1) : S > 65535 && (S -= 65536, l.push(S >>> 10 & 1023 | 55296), S = 56320 | S & 1023), l.push(S), y += H;
2879
2885
  }
2880
- return Y(u);
2886
+ return Y(l);
2881
2887
  }
2882
2888
  var N = 4096;
2883
2889
  function Y(o) {
2884
2890
  var t = o.length;
2885
2891
  if (t <= N)
2886
2892
  return String.fromCharCode.apply(String, o);
2887
- for (var e = "", u = 0; u < t; )
2893
+ for (var e = "", l = 0; l < t; )
2888
2894
  e += String.fromCharCode.apply(
2889
2895
  String,
2890
- o.slice(u, u += N)
2896
+ o.slice(l, l += N)
2891
2897
  );
2892
2898
  return e;
2893
2899
  }
2894
2900
  function j(o, t, e) {
2895
- var u = "";
2901
+ var l = "";
2896
2902
  e = Math.min(o.length, e);
2897
2903
  for (var y = t; y < e; ++y)
2898
- u += String.fromCharCode(o[y] & 127);
2899
- return u;
2904
+ l += String.fromCharCode(o[y] & 127);
2905
+ return l;
2900
2906
  }
2901
2907
  function et(o, t, e) {
2902
- var u = "";
2908
+ var l = "";
2903
2909
  e = Math.min(o.length, e);
2904
2910
  for (var y = t; y < e; ++y)
2905
- u += String.fromCharCode(o[y]);
2906
- return u;
2911
+ l += String.fromCharCode(o[y]);
2912
+ return l;
2907
2913
  }
2908
2914
  function X(o, t, e) {
2909
- var u = o.length;
2910
- (!t || t < 0) && (t = 0), (!e || e < 0 || e > u) && (e = u);
2915
+ var l = o.length;
2916
+ (!t || t < 0) && (t = 0), (!e || e < 0 || e > l) && (e = l);
2911
2917
  for (var y = "", P = t; P < e; ++P)
2912
- y += St[o[P]];
2918
+ y += kt[o[P]];
2913
2919
  return y;
2914
2920
  }
2915
2921
  function mt(o, t, e) {
2916
- for (var u = o.slice(t, e), y = "", P = 0; P < u.length; P += 2)
2917
- y += String.fromCharCode(u[P] + u[P + 1] * 256);
2922
+ for (var l = o.slice(t, e), y = "", P = 0; P < l.length; P += 2)
2923
+ y += String.fromCharCode(l[P] + l[P + 1] * 256);
2918
2924
  return y;
2919
2925
  }
2920
2926
  a.prototype.slice = function(t, e) {
2921
- var u = this.length;
2922
- t = ~~t, e = e === void 0 ? u : ~~e, t < 0 ? (t += u, t < 0 && (t = 0)) : t > u && (t = u), e < 0 ? (e += u, e < 0 && (e = 0)) : e > u && (e = u), e < t && (e = t);
2927
+ var l = this.length;
2928
+ t = ~~t, e = e === void 0 ? l : ~~e, t < 0 ? (t += l, t < 0 && (t = 0)) : t > l && (t = l), e < 0 ? (e += l, e < 0 && (e = 0)) : e > l && (e = l), e < t && (e = t);
2923
2929
  var y = this.subarray(t, e);
2924
2930
  return Object.setPrototypeOf(y, a.prototype), y;
2925
2931
  };
2926
- function K(o, t, e) {
2932
+ function J(o, t, e) {
2927
2933
  if (o % 1 !== 0 || o < 0)
2928
2934
  throw new RangeError("offset is not uint");
2929
2935
  if (o + t > e)
2930
2936
  throw new RangeError("Trying to access beyond buffer length");
2931
2937
  }
2932
- a.prototype.readUIntLE = function(t, e, u) {
2933
- t = t >>> 0, e = e >>> 0, u || K(t, e, this.length);
2934
- for (var y = this[t], P = 1, B = 0; ++B < e && (P *= 256); )
2935
- y += this[t + B] * P;
2938
+ a.prototype.readUIntLE = function(t, e, l) {
2939
+ t = t >>> 0, e = e >>> 0, l || J(t, e, this.length);
2940
+ for (var y = this[t], P = 1, S = 0; ++S < e && (P *= 256); )
2941
+ y += this[t + S] * P;
2936
2942
  return y;
2937
- }, a.prototype.readUIntBE = function(t, e, u) {
2938
- t = t >>> 0, e = e >>> 0, u || K(t, e, this.length);
2943
+ }, a.prototype.readUIntBE = function(t, e, l) {
2944
+ t = t >>> 0, e = e >>> 0, l || J(t, e, this.length);
2939
2945
  for (var y = this[t + --e], P = 1; e > 0 && (P *= 256); )
2940
2946
  y += this[t + --e] * P;
2941
2947
  return y;
2942
2948
  }, a.prototype.readUInt8 = function(t, e) {
2943
- return t = t >>> 0, e || K(t, 1, this.length), this[t];
2949
+ return t = t >>> 0, e || J(t, 1, this.length), this[t];
2944
2950
  }, a.prototype.readUInt16LE = function(t, e) {
2945
- return t = t >>> 0, e || K(t, 2, this.length), this[t] | this[t + 1] << 8;
2951
+ return t = t >>> 0, e || J(t, 2, this.length), this[t] | this[t + 1] << 8;
2946
2952
  }, a.prototype.readUInt16BE = function(t, e) {
2947
- return t = t >>> 0, e || K(t, 2, this.length), this[t] << 8 | this[t + 1];
2953
+ return t = t >>> 0, e || J(t, 2, this.length), this[t] << 8 | this[t + 1];
2948
2954
  }, a.prototype.readUInt32LE = function(t, e) {
2949
- return t = t >>> 0, e || K(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + this[t + 3] * 16777216;
2955
+ return t = t >>> 0, e || J(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + this[t + 3] * 16777216;
2950
2956
  }, a.prototype.readUInt32BE = function(t, e) {
2951
- return t = t >>> 0, e || K(t, 4, this.length), this[t] * 16777216 + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
2952
- }, a.prototype.readIntLE = function(t, e, u) {
2953
- t = t >>> 0, e = e >>> 0, u || K(t, e, this.length);
2954
- for (var y = this[t], P = 1, B = 0; ++B < e && (P *= 256); )
2955
- y += this[t + B] * P;
2957
+ return t = t >>> 0, e || J(t, 4, this.length), this[t] * 16777216 + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
2958
+ }, a.prototype.readIntLE = function(t, e, l) {
2959
+ t = t >>> 0, e = e >>> 0, l || J(t, e, this.length);
2960
+ for (var y = this[t], P = 1, S = 0; ++S < e && (P *= 256); )
2961
+ y += this[t + S] * P;
2956
2962
  return P *= 128, y >= P && (y -= Math.pow(2, 8 * e)), y;
2957
- }, a.prototype.readIntBE = function(t, e, u) {
2958
- t = t >>> 0, e = e >>> 0, u || K(t, e, this.length);
2959
- for (var y = e, P = 1, B = this[t + --y]; y > 0 && (P *= 256); )
2960
- B += this[t + --y] * P;
2961
- return P *= 128, B >= P && (B -= Math.pow(2, 8 * e)), B;
2963
+ }, a.prototype.readIntBE = function(t, e, l) {
2964
+ t = t >>> 0, e = e >>> 0, l || J(t, e, this.length);
2965
+ for (var y = e, P = 1, S = this[t + --y]; y > 0 && (P *= 256); )
2966
+ S += this[t + --y] * P;
2967
+ return P *= 128, S >= P && (S -= Math.pow(2, 8 * e)), S;
2962
2968
  }, a.prototype.readInt8 = function(t, e) {
2963
- return t = t >>> 0, e || K(t, 1, this.length), this[t] & 128 ? (255 - this[t] + 1) * -1 : this[t];
2969
+ return t = t >>> 0, e || J(t, 1, this.length), this[t] & 128 ? (255 - this[t] + 1) * -1 : this[t];
2964
2970
  }, a.prototype.readInt16LE = function(t, e) {
2965
- t = t >>> 0, e || K(t, 2, this.length);
2966
- var u = this[t] | this[t + 1] << 8;
2967
- return u & 32768 ? u | 4294901760 : u;
2971
+ t = t >>> 0, e || J(t, 2, this.length);
2972
+ var l = this[t] | this[t + 1] << 8;
2973
+ return l & 32768 ? l | 4294901760 : l;
2968
2974
  }, a.prototype.readInt16BE = function(t, e) {
2969
- t = t >>> 0, e || K(t, 2, this.length);
2970
- var u = this[t + 1] | this[t] << 8;
2971
- return u & 32768 ? u | 4294901760 : u;
2975
+ t = t >>> 0, e || J(t, 2, this.length);
2976
+ var l = this[t + 1] | this[t] << 8;
2977
+ return l & 32768 ? l | 4294901760 : l;
2972
2978
  }, a.prototype.readInt32LE = function(t, e) {
2973
- return t = t >>> 0, e || K(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24;
2979
+ return t = t >>> 0, e || J(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24;
2974
2980
  }, a.prototype.readInt32BE = function(t, e) {
2975
- return t = t >>> 0, e || K(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3];
2981
+ return t = t >>> 0, e || J(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3];
2976
2982
  }, a.prototype.readFloatLE = function(t, e) {
2977
- return t = t >>> 0, e || K(t, 4, this.length), d.read(this, t, !0, 23, 4);
2983
+ return t = t >>> 0, e || J(t, 4, this.length), d.read(this, t, !0, 23, 4);
2978
2984
  }, a.prototype.readFloatBE = function(t, e) {
2979
- return t = t >>> 0, e || K(t, 4, this.length), d.read(this, t, !1, 23, 4);
2985
+ return t = t >>> 0, e || J(t, 4, this.length), d.read(this, t, !1, 23, 4);
2980
2986
  }, a.prototype.readDoubleLE = function(t, e) {
2981
- return t = t >>> 0, e || K(t, 8, this.length), d.read(this, t, !0, 52, 8);
2987
+ return t = t >>> 0, e || J(t, 8, this.length), d.read(this, t, !0, 52, 8);
2982
2988
  }, a.prototype.readDoubleBE = function(t, e) {
2983
- return t = t >>> 0, e || K(t, 8, this.length), d.read(this, t, !1, 52, 8);
2989
+ return t = t >>> 0, e || J(t, 8, this.length), d.read(this, t, !1, 52, 8);
2984
2990
  };
2985
- function q(o, t, e, u, y, P) {
2991
+ function q(o, t, e, l, y, P) {
2986
2992
  if (!a.isBuffer(o))
2987
2993
  throw new TypeError('"buffer" argument must be a Buffer instance');
2988
2994
  if (t > y || t < P)
2989
2995
  throw new RangeError('"value" argument is out of bounds');
2990
- if (e + u > o.length)
2996
+ if (e + l > o.length)
2991
2997
  throw new RangeError("Index out of range");
2992
2998
  }
2993
- a.prototype.writeUIntLE = function(t, e, u, y) {
2994
- if (t = +t, e = e >>> 0, u = u >>> 0, !y) {
2995
- var P = Math.pow(2, 8 * u) - 1;
2996
- q(this, t, e, u, P, 0);
2999
+ a.prototype.writeUIntLE = function(t, e, l, y) {
3000
+ if (t = +t, e = e >>> 0, l = l >>> 0, !y) {
3001
+ var P = Math.pow(2, 8 * l) - 1;
3002
+ q(this, t, e, l, P, 0);
2997
3003
  }
2998
- var B = 1, H = 0;
2999
- for (this[e] = t & 255; ++H < u && (B *= 256); )
3000
- this[e + H] = t / B & 255;
3001
- return e + u;
3002
- }, a.prototype.writeUIntBE = function(t, e, u, y) {
3003
- if (t = +t, e = e >>> 0, u = u >>> 0, !y) {
3004
- var P = Math.pow(2, 8 * u) - 1;
3005
- q(this, t, e, u, P, 0);
3004
+ var S = 1, H = 0;
3005
+ for (this[e] = t & 255; ++H < l && (S *= 256); )
3006
+ this[e + H] = t / S & 255;
3007
+ return e + l;
3008
+ }, a.prototype.writeUIntBE = function(t, e, l, y) {
3009
+ if (t = +t, e = e >>> 0, l = l >>> 0, !y) {
3010
+ var P = Math.pow(2, 8 * l) - 1;
3011
+ q(this, t, e, l, P, 0);
3006
3012
  }
3007
- var B = u - 1, H = 1;
3008
- for (this[e + B] = t & 255; --B >= 0 && (H *= 256); )
3009
- this[e + B] = t / H & 255;
3010
- return e + u;
3011
- }, a.prototype.writeUInt8 = function(t, e, u) {
3012
- return t = +t, e = e >>> 0, u || q(this, t, e, 1, 255, 0), this[e] = t & 255, e + 1;
3013
- }, a.prototype.writeUInt16LE = function(t, e, u) {
3014
- return t = +t, e = e >>> 0, u || q(this, t, e, 2, 65535, 0), this[e] = t & 255, this[e + 1] = t >>> 8, e + 2;
3015
- }, a.prototype.writeUInt16BE = function(t, e, u) {
3016
- return t = +t, e = e >>> 0, u || q(this, t, e, 2, 65535, 0), this[e] = t >>> 8, this[e + 1] = t & 255, e + 2;
3017
- }, a.prototype.writeUInt32LE = function(t, e, u) {
3018
- return t = +t, e = e >>> 0, u || q(this, t, e, 4, 4294967295, 0), this[e + 3] = t >>> 24, this[e + 2] = t >>> 16, this[e + 1] = t >>> 8, this[e] = t & 255, e + 4;
3019
- }, a.prototype.writeUInt32BE = function(t, e, u) {
3020
- return t = +t, e = e >>> 0, u || q(this, t, e, 4, 4294967295, 0), this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = t & 255, e + 4;
3021
- }, a.prototype.writeIntLE = function(t, e, u, y) {
3013
+ var S = l - 1, H = 1;
3014
+ for (this[e + S] = t & 255; --S >= 0 && (H *= 256); )
3015
+ this[e + S] = t / H & 255;
3016
+ return e + l;
3017
+ }, a.prototype.writeUInt8 = function(t, e, l) {
3018
+ return t = +t, e = e >>> 0, l || q(this, t, e, 1, 255, 0), this[e] = t & 255, e + 1;
3019
+ }, a.prototype.writeUInt16LE = function(t, e, l) {
3020
+ return t = +t, e = e >>> 0, l || q(this, t, e, 2, 65535, 0), this[e] = t & 255, this[e + 1] = t >>> 8, e + 2;
3021
+ }, a.prototype.writeUInt16BE = function(t, e, l) {
3022
+ return t = +t, e = e >>> 0, l || q(this, t, e, 2, 65535, 0), this[e] = t >>> 8, this[e + 1] = t & 255, e + 2;
3023
+ }, a.prototype.writeUInt32LE = function(t, e, l) {
3024
+ return t = +t, e = e >>> 0, l || q(this, t, e, 4, 4294967295, 0), this[e + 3] = t >>> 24, this[e + 2] = t >>> 16, this[e + 1] = t >>> 8, this[e] = t & 255, e + 4;
3025
+ }, a.prototype.writeUInt32BE = function(t, e, l) {
3026
+ return t = +t, e = e >>> 0, l || q(this, t, e, 4, 4294967295, 0), this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = t & 255, e + 4;
3027
+ }, a.prototype.writeIntLE = function(t, e, l, y) {
3022
3028
  if (t = +t, e = e >>> 0, !y) {
3023
- var P = Math.pow(2, 8 * u - 1);
3024
- q(this, t, e, u, P - 1, -P);
3029
+ var P = Math.pow(2, 8 * l - 1);
3030
+ q(this, t, e, l, P - 1, -P);
3025
3031
  }
3026
- var B = 0, H = 1, G = 0;
3027
- for (this[e] = t & 255; ++B < u && (H *= 256); )
3028
- t < 0 && G === 0 && this[e + B - 1] !== 0 && (G = 1), this[e + B] = (t / H >> 0) - G & 255;
3029
- return e + u;
3030
- }, a.prototype.writeIntBE = function(t, e, u, y) {
3032
+ var S = 0, H = 1, G = 0;
3033
+ for (this[e] = t & 255; ++S < l && (H *= 256); )
3034
+ t < 0 && G === 0 && this[e + S - 1] !== 0 && (G = 1), this[e + S] = (t / H >> 0) - G & 255;
3035
+ return e + l;
3036
+ }, a.prototype.writeIntBE = function(t, e, l, y) {
3031
3037
  if (t = +t, e = e >>> 0, !y) {
3032
- var P = Math.pow(2, 8 * u - 1);
3033
- q(this, t, e, u, P - 1, -P);
3038
+ var P = Math.pow(2, 8 * l - 1);
3039
+ q(this, t, e, l, P - 1, -P);
3034
3040
  }
3035
- var B = u - 1, H = 1, G = 0;
3036
- for (this[e + B] = t & 255; --B >= 0 && (H *= 256); )
3037
- t < 0 && G === 0 && this[e + B + 1] !== 0 && (G = 1), this[e + B] = (t / H >> 0) - G & 255;
3038
- return e + u;
3039
- }, a.prototype.writeInt8 = function(t, e, u) {
3040
- return t = +t, e = e >>> 0, u || q(this, t, e, 1, 127, -128), t < 0 && (t = 255 + t + 1), this[e] = t & 255, e + 1;
3041
- }, a.prototype.writeInt16LE = function(t, e, u) {
3042
- return t = +t, e = e >>> 0, u || q(this, t, e, 2, 32767, -32768), this[e] = t & 255, this[e + 1] = t >>> 8, e + 2;
3043
- }, a.prototype.writeInt16BE = function(t, e, u) {
3044
- return t = +t, e = e >>> 0, u || q(this, t, e, 2, 32767, -32768), this[e] = t >>> 8, this[e + 1] = t & 255, e + 2;
3045
- }, a.prototype.writeInt32LE = function(t, e, u) {
3046
- return t = +t, e = e >>> 0, u || q(this, t, e, 4, 2147483647, -2147483648), this[e] = t & 255, this[e + 1] = t >>> 8, this[e + 2] = t >>> 16, this[e + 3] = t >>> 24, e + 4;
3047
- }, a.prototype.writeInt32BE = function(t, e, u) {
3048
- return t = +t, e = e >>> 0, u || q(this, t, e, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = t & 255, e + 4;
3041
+ var S = l - 1, H = 1, G = 0;
3042
+ for (this[e + S] = t & 255; --S >= 0 && (H *= 256); )
3043
+ t < 0 && G === 0 && this[e + S + 1] !== 0 && (G = 1), this[e + S] = (t / H >> 0) - G & 255;
3044
+ return e + l;
3045
+ }, a.prototype.writeInt8 = function(t, e, l) {
3046
+ return t = +t, e = e >>> 0, l || q(this, t, e, 1, 127, -128), t < 0 && (t = 255 + t + 1), this[e] = t & 255, e + 1;
3047
+ }, a.prototype.writeInt16LE = function(t, e, l) {
3048
+ return t = +t, e = e >>> 0, l || q(this, t, e, 2, 32767, -32768), this[e] = t & 255, this[e + 1] = t >>> 8, e + 2;
3049
+ }, a.prototype.writeInt16BE = function(t, e, l) {
3050
+ return t = +t, e = e >>> 0, l || q(this, t, e, 2, 32767, -32768), this[e] = t >>> 8, this[e + 1] = t & 255, e + 2;
3051
+ }, a.prototype.writeInt32LE = function(t, e, l) {
3052
+ return t = +t, e = e >>> 0, l || q(this, t, e, 4, 2147483647, -2147483648), this[e] = t & 255, this[e + 1] = t >>> 8, this[e + 2] = t >>> 16, this[e + 3] = t >>> 24, e + 4;
3053
+ }, a.prototype.writeInt32BE = function(t, e, l) {
3054
+ return t = +t, e = e >>> 0, l || q(this, t, e, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = t & 255, e + 4;
3049
3055
  };
3050
- function at(o, t, e, u, y, P) {
3051
- if (e + u > o.length)
3056
+ function at(o, t, e, l, y, P) {
3057
+ if (e + l > o.length)
3052
3058
  throw new RangeError("Index out of range");
3053
3059
  if (e < 0)
3054
3060
  throw new RangeError("Index out of range");
3055
3061
  }
3056
- function it(o, t, e, u, y) {
3057
- return t = +t, e = e >>> 0, y || at(o, t, e, 4), d.write(o, t, e, u, 23, 4), e + 4;
3062
+ function it(o, t, e, l, y) {
3063
+ return t = +t, e = e >>> 0, y || at(o, t, e, 4), d.write(o, t, e, l, 23, 4), e + 4;
3058
3064
  }
3059
- a.prototype.writeFloatLE = function(t, e, u) {
3060
- return it(this, t, e, !0, u);
3061
- }, a.prototype.writeFloatBE = function(t, e, u) {
3062
- return it(this, t, e, !1, u);
3065
+ a.prototype.writeFloatLE = function(t, e, l) {
3066
+ return it(this, t, e, !0, l);
3067
+ }, a.prototype.writeFloatBE = function(t, e, l) {
3068
+ return it(this, t, e, !1, l);
3063
3069
  };
3064
- function st(o, t, e, u, y) {
3065
- return t = +t, e = e >>> 0, y || at(o, t, e, 8), d.write(o, t, e, u, 52, 8), e + 8;
3066
- }
3067
- a.prototype.writeDoubleLE = function(t, e, u) {
3068
- return st(this, t, e, !0, u);
3069
- }, a.prototype.writeDoubleBE = function(t, e, u) {
3070
- return st(this, t, e, !1, u);
3071
- }, a.prototype.copy = function(t, e, u, y) {
3070
+ function st(o, t, e, l, y) {
3071
+ return t = +t, e = e >>> 0, y || at(o, t, e, 8), d.write(o, t, e, l, 52, 8), e + 8;
3072
+ }
3073
+ a.prototype.writeDoubleLE = function(t, e, l) {
3074
+ return st(this, t, e, !0, l);
3075
+ }, a.prototype.writeDoubleBE = function(t, e, l) {
3076
+ return st(this, t, e, !1, l);
3077
+ }, a.prototype.copy = function(t, e, l, y) {
3072
3078
  if (!a.isBuffer(t))
3073
3079
  throw new TypeError("argument should be a Buffer");
3074
- if (u || (u = 0), !y && y !== 0 && (y = this.length), e >= t.length && (e = t.length), e || (e = 0), y > 0 && y < u && (y = u), y === u || t.length === 0 || this.length === 0)
3080
+ if (l || (l = 0), !y && y !== 0 && (y = this.length), e >= t.length && (e = t.length), e || (e = 0), y > 0 && y < l && (y = l), y === l || t.length === 0 || this.length === 0)
3075
3081
  return 0;
3076
3082
  if (e < 0)
3077
3083
  throw new RangeError("targetStart out of bounds");
3078
- if (u < 0 || u >= this.length)
3084
+ if (l < 0 || l >= this.length)
3079
3085
  throw new RangeError("Index out of range");
3080
3086
  if (y < 0)
3081
3087
  throw new RangeError("sourceEnd out of bounds");
3082
- y > this.length && (y = this.length), t.length - e < y - u && (y = t.length - e + u);
3083
- var P = y - u;
3088
+ y > this.length && (y = this.length), t.length - e < y - l && (y = t.length - e + l);
3089
+ var P = y - l;
3084
3090
  if (this === t && typeof Uint8Array.prototype.copyWithin == "function")
3085
- this.copyWithin(e, u, y);
3086
- else if (this === t && u < e && e < y)
3087
- for (var B = P - 1; B >= 0; --B)
3088
- t[B + e] = this[B + u];
3091
+ this.copyWithin(e, l, y);
3092
+ else if (this === t && l < e && e < y)
3093
+ for (var S = P - 1; S >= 0; --S)
3094
+ t[S + e] = this[S + l];
3089
3095
  else
3090
3096
  Uint8Array.prototype.set.call(
3091
3097
  t,
3092
- this.subarray(u, y),
3098
+ this.subarray(l, y),
3093
3099
  e
3094
3100
  );
3095
3101
  return P;
3096
- }, a.prototype.fill = function(t, e, u, y) {
3102
+ }, a.prototype.fill = function(t, e, l, y) {
3097
3103
  if (typeof t == "string") {
3098
- if (typeof e == "string" ? (y = e, e = 0, u = this.length) : typeof u == "string" && (y = u, u = this.length), y !== void 0 && typeof y != "string")
3104
+ if (typeof e == "string" ? (y = e, e = 0, l = this.length) : typeof l == "string" && (y = l, l = this.length), y !== void 0 && typeof y != "string")
3099
3105
  throw new TypeError("encoding must be a string");
3100
3106
  if (typeof y == "string" && !a.isEncoding(y))
3101
3107
  throw new TypeError("Unknown encoding: " + y);
@@ -3105,21 +3111,21 @@ Minimum version required to store current data is: ` + Y + `.
3105
3111
  }
3106
3112
  } else
3107
3113
  typeof t == "number" ? t = t & 255 : typeof t == "boolean" && (t = Number(t));
3108
- if (e < 0 || this.length < e || this.length < u)
3114
+ if (e < 0 || this.length < e || this.length < l)
3109
3115
  throw new RangeError("Out of range index");
3110
- if (u <= e)
3116
+ if (l <= e)
3111
3117
  return this;
3112
- e = e >>> 0, u = u === void 0 ? this.length : u >>> 0, t || (t = 0);
3113
- var B;
3118
+ e = e >>> 0, l = l === void 0 ? this.length : l >>> 0, t || (t = 0);
3119
+ var S;
3114
3120
  if (typeof t == "number")
3115
- for (B = e; B < u; ++B)
3116
- this[B] = t;
3121
+ for (S = e; S < l; ++S)
3122
+ this[S] = t;
3117
3123
  else {
3118
3124
  var H = a.isBuffer(t) ? t : a.from(t, y), G = H.length;
3119
3125
  if (G === 0)
3120
3126
  throw new TypeError('The value "' + t + '" is invalid for argument "value"');
3121
- for (B = 0; B < u - e; ++B)
3122
- this[B + e] = H[B % G];
3127
+ for (S = 0; S < l - e; ++S)
3128
+ this[S + e] = H[S % G];
3123
3129
  }
3124
3130
  return this;
3125
3131
  };
@@ -3133,13 +3139,13 @@ Minimum version required to store current data is: ` + Y + `.
3133
3139
  }
3134
3140
  function rt(o, t) {
3135
3141
  t = t || 1 / 0;
3136
- for (var e, u = o.length, y = null, P = [], B = 0; B < u; ++B) {
3137
- if (e = o.charCodeAt(B), e > 55295 && e < 57344) {
3142
+ for (var e, l = o.length, y = null, P = [], S = 0; S < l; ++S) {
3143
+ if (e = o.charCodeAt(S), e > 55295 && e < 57344) {
3138
3144
  if (!y) {
3139
3145
  if (e > 56319) {
3140
3146
  (t -= 3) > -1 && P.push(239, 191, 189);
3141
3147
  continue;
3142
- } else if (B + 1 === u) {
3148
+ } else if (S + 1 === l) {
3143
3149
  (t -= 3) > -1 && P.push(239, 191, 189);
3144
3150
  continue;
3145
3151
  }
@@ -3186,21 +3192,21 @@ Minimum version required to store current data is: ` + Y + `.
3186
3192
  }
3187
3193
  return P;
3188
3194
  }
3189
- function ct(o) {
3195
+ function lt(o) {
3190
3196
  for (var t = [], e = 0; e < o.length; ++e)
3191
3197
  t.push(o.charCodeAt(e) & 255);
3192
3198
  return t;
3193
3199
  }
3194
- function lt(o, t) {
3195
- for (var e, u, y, P = [], B = 0; B < o.length && !((t -= 2) < 0); ++B)
3196
- e = o.charCodeAt(B), u = e >> 8, y = e % 256, P.push(y), P.push(u);
3200
+ function ct(o, t) {
3201
+ for (var e, l, y, P = [], S = 0; S < o.length && !((t -= 2) < 0); ++S)
3202
+ e = o.charCodeAt(S), l = e >> 8, y = e % 256, P.push(y), P.push(l);
3197
3203
  return P;
3198
3204
  }
3199
3205
  function ht(o) {
3200
- return f.toByteArray(vt(o));
3206
+ return h.toByteArray(vt(o));
3201
3207
  }
3202
- function tt(o, t, e, u) {
3203
- for (var y = 0; y < u && !(y + e >= t.length || y >= o.length); ++y)
3208
+ function tt(o, t, e, l) {
3209
+ for (var y = 0; y < l && !(y + e >= t.length || y >= o.length); ++y)
3204
3210
  t[y + e] = o[y];
3205
3211
  return y;
3206
3212
  }
@@ -3210,25 +3216,25 @@ Minimum version required to store current data is: ` + Y + `.
3210
3216
  function yt(o) {
3211
3217
  return o !== o;
3212
3218
  }
3213
- var St = function() {
3219
+ var kt = function() {
3214
3220
  for (var o = "0123456789abcdef", t = new Array(256), e = 0; e < 16; ++e)
3215
- for (var u = e * 16, y = 0; y < 16; ++y)
3216
- t[u + y] = o[e] + o[y];
3221
+ for (var l = e * 16, y = 0; y < 16; ++y)
3222
+ t[l + y] = o[e] + o[y];
3217
3223
  return t;
3218
3224
  }();
3219
- }, { "base64-js": 29, ieee754: 32 }], 31: [function(n, g, l) {
3220
- var f = {
3225
+ }, { "base64-js": 29, ieee754: 32 }], 31: [function(n, g, u) {
3226
+ var h = {
3221
3227
  single_source_shortest_paths: function(d, c, i) {
3222
- var s = {}, h = {};
3223
- h[c] = 0;
3224
- var a = f.PriorityQueue.make();
3228
+ var s = {}, f = {};
3229
+ f[c] = 0;
3230
+ var a = h.PriorityQueue.make();
3225
3231
  a.push(c, 0);
3226
- for (var w, x, b, S, F, M, C, T, I; !a.empty(); ) {
3227
- w = a.pop(), x = w.value, S = w.cost, F = d[x] || {};
3232
+ for (var w, x, b, A, F, M, C, B, I; !a.empty(); ) {
3233
+ w = a.pop(), x = w.value, A = w.cost, F = d[x] || {};
3228
3234
  for (b in F)
3229
- F.hasOwnProperty(b) && (M = F[b], C = S + M, T = h[b], I = typeof h[b] > "u", (I || T > C) && (h[b] = C, a.push(b, C), s[b] = x));
3235
+ F.hasOwnProperty(b) && (M = F[b], C = A + M, B = f[b], I = typeof f[b] > "u", (I || B > C) && (f[b] = C, a.push(b, C), s[b] = x));
3230
3236
  }
3231
- if (typeof i < "u" && typeof h[i] > "u") {
3237
+ if (typeof i < "u" && typeof f[i] > "u") {
3232
3238
  var k = ["Could not find a path from ", c, " to ", i, "."].join("");
3233
3239
  throw new Error(k);
3234
3240
  }
@@ -3240,8 +3246,8 @@ Minimum version required to store current data is: ` + Y + `.
3240
3246
  return i.reverse(), i;
3241
3247
  },
3242
3248
  find_path: function(d, c, i) {
3243
- var s = f.single_source_shortest_paths(d, c, i);
3244
- return f.extract_shortest_path_from_predecessor_list(
3249
+ var s = h.single_source_shortest_paths(d, c, i);
3250
+ return h.extract_shortest_path_from_predecessor_list(
3245
3251
  s,
3246
3252
  i
3247
3253
  );
@@ -3251,7 +3257,7 @@ Minimum version required to store current data is: ` + Y + `.
3251
3257
  */
3252
3258
  PriorityQueue: {
3253
3259
  make: function(d) {
3254
- var c = f.PriorityQueue, i = {}, s;
3260
+ var c = h.PriorityQueue, i = {}, s;
3255
3261
  d = d || {};
3256
3262
  for (s in c)
3257
3263
  c.hasOwnProperty(s) && (i[s] = c[s]);
@@ -3279,38 +3285,38 @@ Minimum version required to store current data is: ` + Y + `.
3279
3285
  }
3280
3286
  }
3281
3287
  };
3282
- typeof g < "u" && (g.exports = f);
3283
- }, {}], 32: [function(n, g, l) {
3284
- l.read = function(f, d, c, i, s) {
3285
- var h, a, w = s * 8 - i - 1, x = (1 << w) - 1, b = x >> 1, S = -7, F = c ? s - 1 : 0, M = c ? -1 : 1, C = f[d + F];
3286
- for (F += M, h = C & (1 << -S) - 1, C >>= -S, S += w; S > 0; h = h * 256 + f[d + F], F += M, S -= 8)
3288
+ typeof g < "u" && (g.exports = h);
3289
+ }, {}], 32: [function(n, g, u) {
3290
+ u.read = function(h, d, c, i, s) {
3291
+ var f, a, w = s * 8 - i - 1, x = (1 << w) - 1, b = x >> 1, A = -7, F = c ? s - 1 : 0, M = c ? -1 : 1, C = h[d + F];
3292
+ for (F += M, f = C & (1 << -A) - 1, C >>= -A, A += w; A > 0; f = f * 256 + h[d + F], F += M, A -= 8)
3287
3293
  ;
3288
- for (a = h & (1 << -S) - 1, h >>= -S, S += i; S > 0; a = a * 256 + f[d + F], F += M, S -= 8)
3294
+ for (a = f & (1 << -A) - 1, f >>= -A, A += i; A > 0; a = a * 256 + h[d + F], F += M, A -= 8)
3289
3295
  ;
3290
- if (h === 0)
3291
- h = 1 - b;
3296
+ if (f === 0)
3297
+ f = 1 - b;
3292
3298
  else {
3293
- if (h === x)
3299
+ if (f === x)
3294
3300
  return a ? NaN : (C ? -1 : 1) * (1 / 0);
3295
- a = a + Math.pow(2, i), h = h - b;
3301
+ a = a + Math.pow(2, i), f = f - b;
3296
3302
  }
3297
- return (C ? -1 : 1) * a * Math.pow(2, h - i);
3298
- }, l.write = function(f, d, c, i, s, h) {
3299
- var a, w, x, b = h * 8 - s - 1, S = (1 << b) - 1, F = S >> 1, M = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, C = i ? 0 : h - 1, T = i ? 1 : -1, I = d < 0 || d === 0 && 1 / d < 0 ? 1 : 0;
3300
- for (d = Math.abs(d), isNaN(d) || d === 1 / 0 ? (w = isNaN(d) ? 1 : 0, a = S) : (a = Math.floor(Math.log(d) / Math.LN2), d * (x = Math.pow(2, -a)) < 1 && (a--, x *= 2), a + F >= 1 ? d += M / x : d += M * Math.pow(2, 1 - F), d * x >= 2 && (a++, x /= 2), a + F >= S ? (w = 0, a = S) : a + F >= 1 ? (w = (d * x - 1) * Math.pow(2, s), a = a + F) : (w = d * Math.pow(2, F - 1) * Math.pow(2, s), a = 0)); s >= 8; f[c + C] = w & 255, C += T, w /= 256, s -= 8)
3303
+ return (C ? -1 : 1) * a * Math.pow(2, f - i);
3304
+ }, u.write = function(h, d, c, i, s, f) {
3305
+ var a, w, x, b = f * 8 - s - 1, A = (1 << b) - 1, F = A >> 1, M = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, C = i ? 0 : f - 1, B = i ? 1 : -1, I = d < 0 || d === 0 && 1 / d < 0 ? 1 : 0;
3306
+ for (d = Math.abs(d), isNaN(d) || d === 1 / 0 ? (w = isNaN(d) ? 1 : 0, a = A) : (a = Math.floor(Math.log(d) / Math.LN2), d * (x = Math.pow(2, -a)) < 1 && (a--, x *= 2), a + F >= 1 ? d += M / x : d += M * Math.pow(2, 1 - F), d * x >= 2 && (a++, x /= 2), a + F >= A ? (w = 0, a = A) : a + F >= 1 ? (w = (d * x - 1) * Math.pow(2, s), a = a + F) : (w = d * Math.pow(2, F - 1) * Math.pow(2, s), a = 0)); s >= 8; h[c + C] = w & 255, C += B, w /= 256, s -= 8)
3301
3307
  ;
3302
- for (a = a << s | w, b += s; b > 0; f[c + C] = a & 255, C += T, a /= 256, b -= 8)
3308
+ for (a = a << s | w, b += s; b > 0; h[c + C] = a & 255, C += B, a /= 256, b -= 8)
3303
3309
  ;
3304
- f[c + C - T] |= I * 128;
3310
+ h[c + C - B] |= I * 128;
3305
3311
  };
3306
- }, {}], 33: [function(n, g, l) {
3307
- var f = {}.toString;
3312
+ }, {}], 33: [function(n, g, u) {
3313
+ var h = {}.toString;
3308
3314
  g.exports = Array.isArray || function(d) {
3309
- return f.call(d) == "[object Array]";
3315
+ return h.call(d) == "[object Array]";
3310
3316
  };
3311
3317
  }, {}] }, {}, [24])(24);
3312
3318
  });
3313
- }), se = {
3319
+ }), ce = {
3314
3320
  name: "qrcode",
3315
3321
  props: {
3316
3322
  /**
@@ -3350,17 +3356,17 @@ Minimum version required to store current data is: ` + Y + `.
3350
3356
  * Generate QR code.
3351
3357
  */
3352
3358
  generate: function() {
3353
- var r = this, n = this.options, g = this.tag, l = String(this.value);
3354
- g === "canvas" ? xt.toCanvas(this.$el, l, n, function(f) {
3355
- if (f)
3356
- throw f;
3357
- }) : g === "img" ? xt.toDataURL(l, n, function(f, d) {
3358
- if (f)
3359
- throw f;
3359
+ var r = this, n = this.options, g = this.tag, u = String(this.value);
3360
+ g === "canvas" ? xt.toCanvas(this.$el, u, n, function(h) {
3361
+ if (h)
3362
+ throw h;
3363
+ }) : g === "img" ? xt.toDataURL(u, n, function(h, d) {
3364
+ if (h)
3365
+ throw h;
3360
3366
  r.$el.src = d;
3361
- }) : xt.toString(l, n, function(f, d) {
3362
- if (f)
3363
- throw f;
3367
+ }) : xt.toString(u, n, function(h, d) {
3368
+ if (h)
3369
+ throw h;
3364
3370
  r.$el.innerHTML = d;
3365
3371
  });
3366
3372
  }
@@ -3369,22 +3375,90 @@ Minimum version required to store current data is: ` + Y + `.
3369
3375
  this.generate();
3370
3376
  }
3371
3377
  };
3372
- function ue(m) {
3378
+ class he {
3379
+ constructor() {
3380
+ this._activePolls = {}, this._pollingInterval = 1e3;
3381
+ }
3382
+ _startPolling(r) {
3383
+ const { handler: n, interval: g } = this._activePolls[r], u = async () => {
3384
+ var h;
3385
+ await n(), (h = this._activePolls[r]) != null && h.pollActive && setTimeout(u, g || this._pollingInterval);
3386
+ };
3387
+ u();
3388
+ }
3389
+ /**
3390
+ * Add a new poll to the active polls list.
3391
+ * @param {string} options.id - Unique identifier for the poll.
3392
+ * @param {function} options.handler - Function to be executed when the poll is activated.
3393
+ * @param {number} options.interval - Time interval in milliseconds at which the poll should run.
3394
+ * @param {number} [options.removeAfterMs=0] - Optional. Time in milliseconds after which the poll should be automatically removed.
3395
+ * @param {boolean} [options.startImmediately=true] - Optional. If true, the poll will start immediately after being added.
3396
+ * @param {*} [options.data] - Optional. Additional data associated with the poll.
3397
+ * @returns {function} - A function that can be used to manually remove the poll from the active polls list.
3398
+ */
3399
+ addPoll({
3400
+ id: r,
3401
+ handler: n,
3402
+ interval: g,
3403
+ removeAfterMs: u = 0,
3404
+ startImmediately: h = !0,
3405
+ data: d
3406
+ }) {
3407
+ if (!r || typeof n != "function")
3408
+ throw new Error("Invalid poll definition");
3409
+ if (this._activePolls[r])
3410
+ throw new Error("Poll with the same ID already exists");
3411
+ return this._activePolls[r] = { handler: n, interval: g, pollActive: !1, data: d }, h && setTimeout(() => {
3412
+ this.activatePoll(r);
3413
+ }, 0), u && setTimeout(() => {
3414
+ this._activePolls[r] && this.removePoll(r);
3415
+ }, u), () => this.removePoll(r);
3416
+ }
3417
+ activatePoll(r) {
3418
+ if (!this._activePolls[r])
3419
+ throw new Error("Poll not found");
3420
+ this._activePolls[r].pollActive || (this._activePolls[r].pollActive = !0, this._startPolling(r));
3421
+ }
3422
+ deactivatePoll(r) {
3423
+ if (!this._activePolls[r]) {
3424
+ console.warn("[deactivatePoll] Poll not found");
3425
+ return;
3426
+ }
3427
+ this._activePolls[r].pollActive = !1;
3428
+ }
3429
+ removePoll(r) {
3430
+ if (!this._activePolls[r]) {
3431
+ console.warn("[removePoll] Poll not found");
3432
+ return;
3433
+ }
3434
+ delete this._activePolls[r];
3435
+ }
3436
+ }
3437
+ let _t = null;
3438
+ function Ft() {
3439
+ return _t || (_t = new he()), _t;
3440
+ }
3441
+ function fe(v) {
3373
3442
  window.history.replaceState({}, "", window.location.href);
3374
3443
  let r = "";
3375
3444
  const n = (navigator == null ? void 0 : navigator.userAgent) || "";
3376
- return n.match("CriOS") ? r = "googlechromes://" : n.match("FxiOS") ? r = "firefox://" : n.match("GSA") && (r = "googleapp://open-url?url="), r + encodeURIComponent(`${window.location.href}#${m}`);
3445
+ return n.match("CriOS") ? r = "googlechromes://" : n.match("FxiOS") ? r = "firefox://" : n.match("GSA") && (r = "googleapp://open-url?url="), r + encodeURIComponent(`${window.location.href}#${v}`);
3377
3446
  }
3378
- const ce = {
3447
+ const de = {
3379
3448
  name: "BankIdAnswer",
3380
3449
  components: {
3381
- QrCode: se
3450
+ QrCode: ce
3382
3451
  },
3383
3452
  mixins: [ft([])],
3453
+ props: {
3454
+ onCompleteFunc: {
3455
+ type: Function,
3456
+ default: null
3457
+ }
3458
+ },
3384
3459
  data() {
3385
3460
  return {
3386
3461
  signAnswerId: null,
3387
- signInterval: null,
3388
3462
  view: "form",
3389
3463
  errorMessage: "",
3390
3464
  isLoading: !1,
@@ -3395,61 +3469,74 @@ const ce = {
3395
3469
  },
3396
3470
  computed: {
3397
3471
  viewText() {
3398
- const m = (r) => this._document.$t(`answerModal.bankId.component.viewText.${r}`);
3472
+ const v = (r) => this._document.$t(`answerModal.bankId.component.viewText.${r}`);
3399
3473
  return {
3400
3474
  new: {
3401
- title: m("new.title"),
3402
- text: m("new.text"),
3403
- spinnerText: m("new.spinnerText")
3475
+ title: v("new.title"),
3476
+ text: v("new.text"),
3477
+ spinnerText: v("new.spinnerText")
3404
3478
  },
3405
3479
  waiting: {
3406
- title: m("waiting.title"),
3407
- text: m("waiting.text"),
3408
- spinnerText: m("waiting.spinnerText")
3480
+ title: v("waiting.title"),
3481
+ text: v("waiting.text"),
3482
+ spinnerText: v("waiting.spinnerText")
3409
3483
  },
3410
3484
  started: {
3411
- title: m("waiting.title"),
3412
- text: m("waiting.text"),
3413
- spinnerText: m("waiting.spinnerText")
3485
+ title: v("waiting.title"),
3486
+ text: v("waiting.text"),
3487
+ spinnerText: v("waiting.spinnerText")
3414
3488
  },
3415
3489
  signing: {
3416
- title: m("signing.title"),
3417
- text: m("signing.text"),
3418
- spinnerText: m("signing.spinnerText")
3490
+ title: v("signing.title"),
3491
+ text: v("signing.text"),
3492
+ spinnerText: v("signing.spinnerText")
3419
3493
  },
3420
3494
  error: {
3421
- title: m("error.title"),
3422
- text: m("error.text")
3495
+ title: v("error.title"),
3496
+ text: v("error.text")
3423
3497
  },
3424
3498
  canceled: {
3425
- title: m("canceled.title"),
3426
- text: m("canceled.text")
3499
+ title: v("canceled.title"),
3500
+ text: v("canceled.text")
3427
3501
  }
3428
3502
  };
3429
3503
  }
3430
3504
  },
3431
3505
  watch: {
3432
- isLoading(m) {
3433
- this.$emit("loading", m);
3434
- },
3435
- $route: {
3436
- immediate: !0,
3437
- handler(m) {
3438
- m != null && m.hash && this.resumePolling(m.hash.slice(1));
3439
- }
3506
+ isLoading(v) {
3507
+ this.$emit("loading", v);
3440
3508
  }
3441
3509
  },
3442
3510
  created() {
3443
- this.isMobile = Ft();
3444
- },
3445
- beforeDestroy() {
3446
- this.signInterval && this.stopPolling();
3511
+ this.isMobile = Mt(), this.tryResumeSigningSession();
3447
3512
  },
3448
3513
  methods: {
3449
- async submit({ answer: m }) {
3514
+ tryResumeSigningSession() {
3515
+ var n, g;
3516
+ const v = Ft(), r = Object.keys(v._activePolls).find(
3517
+ (u) => u.includes("bankId-")
3518
+ );
3519
+ try {
3520
+ if (r) {
3521
+ const { signAnswerId: u, autoStartToken: h, qrCode: d } = (n = v._activePolls[r]) == null ? void 0 : n.data;
3522
+ this.signAnswerId = u, this.autoStartToken = h, this.qrCode = d, v.removePoll(r), (g = window.location) != null && g.hash && window.history.replaceState(
3523
+ {},
3524
+ "",
3525
+ window.location.pathname
3526
+ // clears search + hash
3527
+ ), this.isLoading = !0, this.startPolling();
3528
+ }
3529
+ } catch (u) {
3530
+ const h = this._document.$t(
3531
+ "answerModal.bankId.component.viewText.error.text"
3532
+ );
3533
+ Tt("error", h), console.error(u);
3534
+ }
3535
+ },
3536
+ async submit({ answer: v }) {
3450
3537
  try {
3451
3538
  this.isLoading = !0;
3452
- const { id: r, autoStartToken: n, qrCodeData: g } = await m({
3539
+ const { id: r, autoStartToken: n, qrCodeData: g } = await v({
3453
3540
  body: { isAccepted: !0 }
3454
3541
  });
3455
3542
  n && (this.autoStartToken = n), g && (this.qrCode = g), this.signAnswerId = r, this.startPolling(), this.isMobile && this.triggerAutoStart();
@@ -3458,38 +3545,58 @@ const ce = {
3458
3545
  this.onError(r);
3459
3546
  }
3460
3547
  },
3461
- async requestStatus() {
3548
+ async startPolling() {
3462
3549
  if (!this.signAnswerId)
3463
3550
  throw Error("Missing signAnswerId");
3551
+ const v = Ft(), r = `bankId-${this.signAnswerId}`, n = async () => {
3552
+ if (!this.signAnswerId)
3553
+ throw Error("Missing signAnswerId");
3554
+ const g = () => {
3555
+ this.clearSignState(), v.removePoll(r);
3556
+ };
3557
+ try {
3558
+ const { data: u } = await $t.get(this.signAnswerId);
3559
+ u.qrCodeData && (this.qrCode = u.qrCodeData), ["completed", "canceled"].includes(u.status) && g(), u.status === "completed" ? this.onComplete() : u.status === "canceled" ? this.onCanceled() : this.view = u.status;
3560
+ } catch (u) {
3561
+ this.onError(u), g();
3562
+ }
3563
+ };
3464
3564
  try {
3465
- const { data: m } = await kt.get(this.signAnswerId);
3466
- m.qrCodeData && (this.qrCode = m.qrCodeData), m.status === "completed" ? this.onComplete() : m.status === "canceled" ? this.onCanceled() : this.view = m.status;
3467
- } catch (m) {
3468
- this.onError(m);
3565
+ v.addPoll({
3566
+ id: r,
3567
+ handler: n,
3568
+ interval: 1e3,
3569
+ data: {
3570
+ signAnswerId: this.signAnswerId,
3571
+ autoStartToken: this.autoStartToken,
3572
+ qrCode: this.qrCode
3573
+ }
3574
+ });
3575
+ } catch (g) {
3576
+ this.clearSignState();
3577
+ const u = this._document.$t(
3578
+ "answerModal.bankId.component.viewText.error.text"
3579
+ );
3580
+ Tt("error", u), console.error(g);
3469
3581
  }
3470
3582
  },
3471
- async startPolling() {
3472
- if (!this.signAnswerId)
3473
- throw Error("Missing signAnswerId");
3474
- this.signInterval = setInterval(this.requestStatus, 1e3);
3475
- },
3476
- stopPolling() {
3477
- clearInterval(this.signInterval), this.autoStartToken = null, this.qrCode = null, this.isLoading = !1;
3583
+ clearSignState() {
3584
+ this.autoStartToken = null, this.qrCode = null, this.isLoading = !1;
3478
3585
  },
3479
3586
  onComplete() {
3480
- this.stopPolling(), this.$emit("complete");
3587
+ typeof this.onCompleteFunc == "function" && this.onCompleteFunc();
3481
3588
  },
3482
3589
  onCanceled() {
3483
- this.stopPolling(), this.view = "canceled", this.errorMessage = this._document.$t(
3590
+ this.view = "canceled", this.errorMessage = this._document.$t(
3484
3591
  "answerModal.bankId.component.signingInterrupted"
3485
3592
  );
3486
3593
  },
3487
- onError(m) {
3594
+ onError(v) {
3488
3595
  var n, g;
3489
- if (this.stopPolling(), m.httpStatusCode === 409)
3490
- throw m;
3596
+ if (v.httpStatusCode === 409)
3597
+ throw v;
3491
3598
  this.$emit("error"), this.view = "error";
3492
- const r = (g = (n = m.response) == null ? void 0 : n.data) == null ? void 0 : g.errorCode;
3599
+ const r = (g = (n = v.response) == null ? void 0 : n.data) == null ? void 0 : g.errorCode;
3493
3600
  switch (r) {
3494
3601
  case 9001:
3495
3602
  case 9002:
@@ -3498,99 +3605,100 @@ const ce = {
3498
3605
  case 9005:
3499
3606
  case 9006:
3500
3607
  case 9007:
3501
- It.warn(m);
3608
+ Rt.warn(v);
3502
3609
  break;
3503
3610
  case 9009:
3504
3611
  this.$emit("complete");
3505
3612
  break;
3506
3613
  default:
3507
- Et(m, { showMessage: !1 });
3614
+ Ct(v, { showMessage: !1 });
3508
3615
  }
3509
3616
  this.errorMessage = this.$i18n.te(`errors:${r}`) && this._document.$t(`answerModal.bankId.component.errors.${r}`) || this._document.$t("answerModal.bankId.component.defaultError");
3510
3617
  },
3511
- resumePolling(m) {
3512
- this.view = "signing", this.signAnswerId = m, this.startPolling();
3513
- const r = new URL(window.location.href);
3514
- r.search = "", r.hash = "", window.history.replaceState({}, "", r.href);
3515
- },
3516
3618
  triggerAutoStart() {
3517
3619
  if (!this.autoStartToken)
3518
3620
  return;
3519
- let m = "bankid://", r = "null";
3621
+ let v = "bankid://", r = "null";
3520
3622
  if (this.isMobile) {
3521
- const g = Mt(), l = (navigator == null ? void 0 : navigator.userAgent) || (navigator == null ? void 0 : navigator.vendor) || (window == null ? void 0 : window.opera), f = g === "iOS" && (/Version\/[\d\.]+.*Safari/.test(l) || /GSA/.test(l)), d = g === "Android" && /Version\/[\d\.]+.*Chrome/.test(l);
3522
- (f || d) && (m = "https://app.bankid.com"), g === "iOS" && this.$view !== "widget" && (r = ue(this.signAnswerId));
3623
+ const g = Dt(), u = (navigator == null ? void 0 : navigator.userAgent) || (navigator == null ? void 0 : navigator.vendor) || (window == null ? void 0 : window.opera), h = g === "iOS" && (/Version\/[\d\.]+.*Safari/.test(u) || /GSA/.test(u)), d = g === "Android" && /Version\/[\d\.]+.*Chrome/.test(u);
3624
+ (h || d) && (v = "https://app.bankid.com"), g === "iOS" && this.$view !== "widget" && (r = fe(this.signAnswerId));
3523
3625
  }
3524
- const n = `${m}/?autostarttoken=${this.autoStartToken}&redirect=${r}`;
3525
- this.isMobile ? document.location = n : document.getElementById("autoStartFrame").src = n;
3626
+ const n = `${v}/?autostarttoken=${this.autoStartToken}&redirect=${r}`;
3627
+ this.isMobile ? document.location = n : this.$refs.autoStartFrame.src = n;
3526
3628
  }
3527
3629
  }
3528
3630
  };
3529
- var le = function() {
3631
+ var ge = function() {
3530
3632
  var g;
3531
3633
  var r = this, n = r._self._c;
3532
- return n("div", { staticClass: "-my-4 flex flex-col items-center" }, [n("iframe", { staticClass: "hidden", attrs: { id: "autoStartFrame", height: "0", width: "0" } }), ["form", "signing", "error", "canceled"].includes(r.view) ? n("div", { staticClass: "flex h-[250px] w-[250px] items-center justify-center rounded-xl bg-gray-100" }, [n("BaseIcon", { staticClass: "text-gray-500", attrs: { type: "bankId", size: "50" } })], 1) : r._e(), ["new", "waiting", "started"].includes(r.view) ? [r.qrCode ? n("QrCode", { attrs: { value: r.qrCode, options: {
3634
+ return n("div", { staticClass: "-my-4 flex flex-col items-center" }, [n("iframe", { ref: "autoStartFrame", staticClass: "hidden", attrs: { height: "0", width: "0" } }), ["form", "signing", "error", "canceled"].includes(r.view) ? n("div", { staticClass: "flex h-[250px] w-[250px] items-center justify-center rounded-xl bg-gray-100" }, [n("BaseIcon", { staticClass: "text-gray-500", attrs: { type: "bankId", size: "50" } })], 1) : r._e(), ["new", "waiting", "started"].includes(r.view) ? [r.qrCode ? n("QrCode", { attrs: { value: r.qrCode, options: {
3533
3635
  width: 250,
3534
3636
  errorCorrectionLevel: "L",
3535
3637
  color: { dark: "#000000" }
3536
3638
  } } }) : r._e()] : r._e(), n("Animation", { staticClass: "w-full" }, [n("div", { key: "a", staticClass: "min-h-[20px] pt-4 text-sm text-gray-500", domProps: { textContent: r._s((g = r.viewText[r.view]) == null ? void 0 : g.spinnerText) } }), !r.isMobile && ["new", "waiting", "started"].includes(r.view) ? n("CButton", { key: "b", staticClass: "mt-4", attrs: { type: "none", pattern: "secondary", size: "small" }, on: { click: r.triggerAutoStart } }, [r._v(" " + r._s(r._document.$t("answerModal.bankId.component.startOnThisDevice")) + " ")]) : r._e()], 1), ["form", "new", "waiting", "started"].includes(r.view) ? r._e() : n("div", [n("transition", { attrs: { name: "pop-in" } }, [n("div", { staticClass: "bankid-popup", on: { click: () => {
3537
3639
  r.view = "form", r.isLoading = !1;
3538
- } } }, [n("div", { staticClass: "flex flex-col items-center justify-center", staticStyle: { "background-color": "#183e4f", padding: "calc(2.5 * var(--rem)) calc(3 * var(--rem))" } }, [n("BaseIcon", { staticClass: "text-white", attrs: { type: "bankId", size: "34" } }), n("div", { staticClass: "pt-4 text-sm font-medium text-white opacity-75", domProps: { textContent: r._s(r.viewText[r.view].text) } })], 1), n("div", { staticClass: "flex w-full flex-col items-center justify-center text-center", staticStyle: { padding: "calc(3 * var(--rem)) calc(2 * var(--rem))" } }, [r.view === "signing" ? [n("div", { staticClass: "spinner" }), n("div", { staticClass: "pt-8 text-gray-500", domProps: { textContent: r._s(r.viewText[r.view].spinnerText) } })] : ["error", "canceled"].includes(r.view) ? [n("BaseIcon", { staticClass: "mb-2.5 text-gray-400", attrs: { type: "error", size: "22" } }), n("div", { staticStyle: { "font-size": "14px" }, domProps: { textContent: r._s(r.errorMessage) } }), n("CButton", { staticStyle: { "margin-top": "calc(2.5 * var(--rem))", padding: "1em", height: "initial" }, attrs: { loading: r.isLoading, type: "none", pattern: "secondary", size: "small" }, on: { click: function(l) {
3640
+ } } }, [n("div", { staticClass: "flex flex-col items-center justify-center", staticStyle: { "background-color": "#183e4f", padding: "calc(2.5 * var(--rem)) calc(3 * var(--rem))" } }, [n("BaseIcon", { staticClass: "text-white", attrs: { type: "bankId", size: "34" } }), n("div", { staticClass: "pt-4 text-sm font-medium text-white opacity-75", domProps: { textContent: r._s(r.viewText[r.view].text) } })], 1), n("div", { staticClass: "flex w-full flex-col items-center justify-center text-center", staticStyle: { padding: "calc(3 * var(--rem)) calc(2 * var(--rem))" } }, [r.view === "signing" ? [n("div", { staticClass: "spinner" }), n("div", { staticClass: "pt-8 text-gray-500", domProps: { textContent: r._s(r.viewText[r.view].spinnerText) } })] : ["error", "canceled"].includes(r.view) ? [n("BaseIcon", { staticClass: "mb-2.5 text-gray-400", attrs: { type: "error", size: "22" } }), n("div", { staticStyle: { "font-size": "14px" }, domProps: { textContent: r._s(r.errorMessage) } }), n("CButton", { staticStyle: { "margin-top": "calc(2.5 * var(--rem))", padding: "1em", height: "initial" }, attrs: { loading: r.isLoading, type: "none", pattern: "secondary", size: "small" }, on: { click: function(u) {
3539
3641
  r.view = "form";
3540
3642
  } } }, [r._v(" " + r._s(r._document.$t("tryAgain")) + " ")])] : r._e()], 2)])])], 1)], 2);
3541
- }, he = [], fe = /* @__PURE__ */ ot(
3542
- ce,
3543
- le,
3544
- he,
3643
+ }, pe = [], me = /* @__PURE__ */ ot(
3644
+ de,
3645
+ ge,
3646
+ pe,
3545
3647
  !1,
3546
3648
  null,
3547
- "73b8e23a",
3649
+ "14eecff1",
3548
3650
  null,
3549
3651
  null
3550
3652
  );
3551
- const de = fe.exports;
3552
- const ge = {
3653
+ const ve = me.exports;
3654
+ const ye = {
3553
3655
  name: "DenyAnswer",
3554
3656
  mixins: [ft([])],
3657
+ props: {
3658
+ onCompleteFunc: {
3659
+ type: Function,
3660
+ default: null
3661
+ }
3662
+ },
3555
3663
  data() {
3556
3664
  return {
3557
3665
  rejectReason: ""
3558
3666
  };
3559
3667
  },
3560
3668
  methods: {
3561
- async submit({ update: m, answer: r }) {
3669
+ async submit({ update: v, answer: r }) {
3562
3670
  const n = [];
3563
3671
  this.rejectReason && n.push({
3564
3672
  key: "unclear-other",
3565
3673
  category: "misc",
3566
3674
  description: this.rejectReason,
3567
3675
  sentAt: this._document.lastSentAt
3568
- }), await m({ body: { "data.rejectReasons": n } }), await r({ body: { isAccepted: !1 } }), this.$emit("complete");
3676
+ }), await v({ body: { "data.rejectReasons": n } }), await r({ body: { isAccepted: !1 } }), typeof this.onCompleteFunc == "function" && this.onCompleteFunc();
3569
3677
  }
3570
3678
  }
3571
3679
  };
3572
- var pe = function() {
3680
+ var we = function() {
3573
3681
  var r = this, n = r._self._c;
3574
3682
  return n("div", { staticClass: "text-left" }, [n("label", [r._v(r._s(r._document.$t("answerModal.decline.component.label")))]), n("CInput", { staticStyle: { "margin-bottom": "calc(1.5 * var(--rem))" }, attrs: { type: "textarea", filled: "", "custom-class": "decline-input" }, model: { value: r.rejectReason, callback: function(g) {
3575
3683
  r.rejectReason = g;
3576
3684
  }, expression: "rejectReason" } })], 1);
3577
- }, me = [], ve = /* @__PURE__ */ ot(
3578
- ge,
3579
- pe,
3580
- me,
3685
+ }, xe = [], _e = /* @__PURE__ */ ot(
3686
+ ye,
3687
+ we,
3688
+ xe,
3581
3689
  !1,
3582
3690
  null,
3583
3691
  null,
3584
3692
  null,
3585
3693
  null
3586
3694
  );
3587
- const ye = ve.exports;
3588
- const we = {
3695
+ const Ee = _e.exports;
3696
+ const Ce = {
3589
3697
  components: {
3590
- Feedback: Wt,
3591
- Signature: ae,
3592
- BankId: de,
3593
- Deny: ye
3698
+ Feedback: Gt,
3699
+ Signature: ue,
3700
+ BankId: ve,
3701
+ Deny: Ee
3594
3702
  },
3595
3703
  mixins: [ft([])],
3596
3704
  i18nOptions: {
@@ -3632,17 +3740,17 @@ const we = {
3632
3740
  return this.isSender ? this._document.senderClient : this._document.viewer;
3633
3741
  },
3634
3742
  answerMethod() {
3635
- var m;
3636
- return (m = this.signee.answerMethod) == null ? void 0 : m.accept;
3743
+ var v;
3744
+ return (v = this.signee.answerMethod) == null ? void 0 : v.accept;
3637
3745
  },
3638
3746
  successStrings() {
3639
- const m = this.signee.email ? this._document.$t(`answerModal.${this.answerType}.success.text`, {
3747
+ const v = this.signee.email ? this._document.$t(`answerModal.${this.answerType}.success.text`, {
3640
3748
  email: this.signee.email
3641
3749
  }) : this._document.$t(
3642
3750
  `answerModal.${this.answerType}.success.textFallback`
3643
3751
  ), r = this.signee.email ? this._document.$t("answerModal.successTextSingle", {
3644
3752
  email: this.signee.email
3645
- }) : this._document.$t("answerModal.successTextFallbackSingle"), n = this._document.remainingSignatures === 0 ? r : m;
3753
+ }) : this._document.$t("answerModal.successTextFallbackSingle"), n = this._document.remainingSignatures === 0 ? r : v;
3646
3754
  return {
3647
3755
  title: this._document.$t(
3648
3756
  `answerModal.${this.answerType}.success.title`
@@ -3655,7 +3763,7 @@ const we = {
3655
3763
  this.calcHeight && this.$nextTick(() => this.setFixedHeight());
3656
3764
  },
3657
3765
  methods: {
3658
- ...Rt({
3766
+ ...Ut({
3659
3767
  answerCurrentDoc: wt.ANSWER_CURRENT_PUBLIC_DOCUMENT,
3660
3768
  putCurrentDoc: wt.PUT_CURRENT_PUBLIC_DOCUMENT,
3661
3769
  reloadCurrentDocument: wt.RELOAD_CURRENT_DOCUMENT
@@ -3667,37 +3775,39 @@ const we = {
3667
3775
  if (!this.isPosting) {
3668
3776
  this.isPosting = !0;
3669
3777
  try {
3670
- const { submit: m } = this.$refs.answerComponent;
3671
- if (typeof m != "function")
3778
+ const { submit: v } = this.$refs.answerComponent;
3779
+ if (typeof v != "function")
3672
3780
  throw Error("Missing answer type submit method");
3673
- await m({
3781
+ await v({
3674
3782
  update: (r) => this.putCurrentDoc({ includeChanges: !0, ...r }),
3675
3783
  answer: this.answerCurrentDoc,
3676
3784
  ...this.isSender ? this.senderActions : null
3677
3785
  });
3678
- } catch (m) {
3679
- this.isPosting = !1, m.httpStatusCode === 409 ? this.page = "versionError" : Et(m);
3786
+ } catch (v) {
3787
+ this.isPosting = !1, v.httpStatusCode === 409 ? this.page = "versionError" : Ct(v);
3680
3788
  }
3681
3789
  }
3682
3790
  },
3683
- async onComplete() {
3684
- var m, r;
3685
- if (this.isSender && this.senderActions.send) {
3686
- this.$emit("close"), await this.senderActions.send();
3687
- return;
3688
- }
3689
- this.mode === "accept" && this.answerMethod === "bankId" ? this.reloadCurrentDocument().then(
3690
- () => {
3691
- var n, g;
3692
- return Bt.trigger("document:answer", {
3693
- id: (n = this._document) == null ? void 0 : n.id,
3694
- ...(g = this.signee) == null ? void 0 : g.answer
3695
- });
3791
+ onComplete() {
3792
+ return (async () => {
3793
+ var r, n;
3794
+ if (this.isSender && this.senderActions.send) {
3795
+ this.$emit("close"), await this.senderActions.send();
3796
+ return;
3696
3797
  }
3697
- ) : Bt.trigger("document:answer", {
3698
- id: (m = this._document) == null ? void 0 : m.id,
3699
- ...(r = this.signee) == null ? void 0 : r.answer
3700
- }), await At(800), this.page = "intermediate", await At(2e3), this.page = "success", this.isPosting = !1;
3798
+ this.mode === "accept" && this.answerMethod === "bankId" ? this.reloadCurrentDocument().then(
3799
+ () => {
3800
+ var g, u;
3801
+ return At.trigger("document:answer", {
3802
+ id: (g = this._document) == null ? void 0 : g.id,
3803
+ ...(u = this.signee) == null ? void 0 : u.answer
3804
+ });
3805
+ }
3806
+ ) : At.trigger("document:answer", {
3807
+ id: (r = this._document) == null ? void 0 : r.id,
3808
+ ...(n = this.signee) == null ? void 0 : n.answer
3809
+ }), await Bt(800), this.page = "intermediate", await Bt(2e3), this.page = "success", this.isPosting = !1;
3810
+ })();
3701
3811
  },
3702
3812
  reload() {
3703
3813
  window.location.reload();
@@ -3705,9 +3815,9 @@ const we = {
3705
3815
  setFixedHeight() {
3706
3816
  this.$el.style.minHeight = `${this.$el.offsetHeight}px`;
3707
3817
  },
3708
- minimizeHeight(m, r) {
3818
+ minimizeHeight(v, r) {
3709
3819
  nt({
3710
- targets: m,
3820
+ targets: v,
3711
3821
  height: 0,
3712
3822
  flexGrow: [1, 0],
3713
3823
  opacity: [1, 0],
@@ -3722,9 +3832,9 @@ const we = {
3722
3832
  easing: "easeOutQuint"
3723
3833
  });
3724
3834
  },
3725
- enterAnim(m, r) {
3835
+ enterAnim(v, r) {
3726
3836
  nt({
3727
- targets: m.querySelectorAll(".stagger-anim"),
3837
+ targets: v.querySelectorAll(".stagger-anim"),
3728
3838
  opacity: [0, 1],
3729
3839
  delay: nt.stagger(180, { start: 800 }),
3730
3840
  duration: 340,
@@ -3732,9 +3842,9 @@ const we = {
3732
3842
  complete: r
3733
3843
  });
3734
3844
  },
3735
- leaveAnim(m, r) {
3736
- m.style.position = "absolute", nt({
3737
- targets: m.querySelectorAll(".stagger-anim"),
3845
+ leaveAnim(v, r) {
3846
+ v.style.position = "absolute", nt({
3847
+ targets: v.querySelectorAll(".stagger-anim"),
3738
3848
  opacity: 0,
3739
3849
  delay: nt.stagger(200),
3740
3850
  duration: 200,
@@ -3744,29 +3854,29 @@ const we = {
3744
3854
  }
3745
3855
  }
3746
3856
  };
3747
- var xe = function() {
3857
+ var be = function() {
3748
3858
  var g;
3749
3859
  var r = this, n = r._self._c;
3750
- return n("transition-group", { staticClass: "a-root font-inter", attrs: { tag: "div", css: !1, mode: "out-in" }, on: { enter: r.enterAnim, leave: r.leaveAnim } }, [n("CButton", { key: "btn", staticClass: "text-[hsl(0, 0%, 45%)] absolute right-5 top-5 z-[9]", attrs: { icon: "x", circle: "" }, on: { click: function(l) {
3860
+ return n("transition-group", { staticClass: "a-root font-inter", attrs: { tag: "div", css: !1, mode: "out-in" }, on: { enter: r.enterAnim, leave: r.leaveAnim } }, [n("CButton", { key: "btn", staticClass: "text-[hsl(0, 0%, 45%)] absolute right-5 top-5 z-[9]", attrs: { icon: "x", circle: "" }, on: { click: function(u) {
3751
3861
  r.$parent.$emit("cancel"), r.$emit("close");
3752
- } } }), r.page === "start" ? n("div", { key: "start", staticClass: "root-padding flex-grow" }, [n("div", { staticClass: "stagger-anim", staticStyle: { "padding-bottom": "40px" } }, [n("div", { staticClass: "a-title", domProps: { textContent: r._s(r._document.$t(`answerModal.${r.answerType}.start.title`)) } }), n("div", { staticStyle: { color: "hsl(0, 0%, 40%)" }, domProps: { textContent: r._s(r._document.$t(`answerModal.${r.answerType}.start.text`)) } })]), n(r.answerComponentName, { ref: "answerComponent", tag: "component", staticClass: "stagger-anim", attrs: { _document: r._document, signee: r.signee }, on: { invalid: function(l) {
3753
- r.actionInvalid = l;
3754
- }, loading: function(l) {
3755
- r.isPosting = l;
3756
- }, complete: r.onComplete } }), n("div", { staticClass: "stagger-anim", staticStyle: { "padding-top": "3em" } }, [n("CButton", { staticClass: "a-btn", attrs: { loading: r.isPosting, disabled: r.actionInvalid, type: r.mode === "decline" ? "text" : "secondary", icon: r.answerType === "bankId" ? "bankId" : "" }, on: { click: r.onSubmit } }, [r._v(" " + r._s(r._document.$t(`answerModal.${r.answerType}.start.action`)) + " ")])], 1)], 1) : r.page === "intermediate" ? n("div", { key: "intermediate", staticClass: "flex w-full flex-grow flex-col items-center justify-center text-center", staticStyle: { height: "100%" } }, [n("div", { staticClass: "a-title stagger-anim", domProps: { textContent: r._s(r._document.$t("answerModal.answerSuccess")) } })]) : r.page === "success" ? n("div", { key: "success", staticClass: "flex w-full flex-grow flex-col", staticStyle: { height: "100%" } }, [n("transition", { attrs: { css: !1 }, on: { leave: r.minimizeHeight } }, [r.isFeedbackInitiated ? r._e() : n("div", { staticClass: "flex w-full flex-grow flex-col items-center justify-center", staticStyle: { overflow: "hidden" } }, [n("div", { staticClass: "root-padding flex w-full flex-col items-center justify-center", staticStyle: { height: "100%" } }, [n("div", { staticClass: "a-title stagger-anim", staticStyle: { padding: "calc(2.5 * var(--rem)) 0 calc(2 * var(--rem))" } }, [n("div", { domProps: { textContent: r._s(r.successStrings.title) } })]), n("div", { staticClass: "stagger-anim", domProps: { textContent: r._s(r.successStrings.text) } })])])]), n("Feedback", { ref: "feedback", staticClass: "stagger-anim", staticStyle: { flex: "0 0", overflow: "hidden", "min-height": "200px" }, attrs: { "public-id": (g = r._document.viewer) == null ? void 0 : g.publicDocumentId, _document: r._document }, on: { page: () => r.isFeedbackInitiated = !0, close: function(l) {
3862
+ } } }), r.page === "start" ? n("div", { key: "start", staticClass: "root-padding flex-grow" }, [n("div", { staticClass: "stagger-anim", staticStyle: { "padding-bottom": "40px" } }, [n("div", { staticClass: "a-title", domProps: { textContent: r._s(r._document.$t(`answerModal.${r.answerType}.start.title`)) } }), n("div", { staticStyle: { color: "hsl(0, 0%, 40%)" }, domProps: { textContent: r._s(r._document.$t(`answerModal.${r.answerType}.start.text`)) } })]), n(r.answerComponentName, { ref: "answerComponent", tag: "component", staticClass: "stagger-anim", attrs: { _document: r._document, signee: r.signee, "on-complete-func": r.onComplete }, on: { invalid: function(u) {
3863
+ r.actionInvalid = u;
3864
+ }, loading: function(u) {
3865
+ r.isPosting = u;
3866
+ } } }), n("div", { staticClass: "stagger-anim", staticStyle: { "padding-top": "3em" } }, [n("CButton", { staticClass: "a-btn", attrs: { loading: r.isPosting, disabled: r.actionInvalid, type: r.mode === "decline" ? "text" : "secondary", icon: r.answerType === "bankId" ? "bankId" : "" }, on: { click: r.onSubmit } }, [r._v(" " + r._s(r._document.$t(`answerModal.${r.answerType}.start.action`)) + " ")])], 1)], 1) : r.page === "intermediate" ? n("div", { key: "intermediate", staticClass: "flex w-full flex-grow flex-col items-center justify-center text-center", staticStyle: { height: "100%" } }, [n("div", { staticClass: "a-title stagger-anim", domProps: { textContent: r._s(r._document.$t("answerModal.answerSuccess")) } })]) : r.page === "success" ? n("div", { key: "success", staticClass: "flex w-full flex-grow flex-col", staticStyle: { height: "100%" } }, [n("transition", { attrs: { css: !1 }, on: { leave: r.minimizeHeight } }, [r.isFeedbackInitiated ? r._e() : n("div", { staticClass: "flex w-full flex-grow flex-col items-center justify-center", staticStyle: { overflow: "hidden" } }, [n("div", { staticClass: "root-padding flex w-full flex-col items-center justify-center", staticStyle: { height: "100%" } }, [n("div", { staticClass: "a-title stagger-anim", staticStyle: { padding: "calc(2.5 * var(--rem)) 0 calc(2 * var(--rem))" } }, [n("div", { domProps: { textContent: r._s(r.successStrings.title) } })]), n("div", { staticClass: "stagger-anim", domProps: { textContent: r._s(r.successStrings.text) } })])])]), n("Feedback", { ref: "feedback", staticClass: "stagger-anim", staticStyle: { flex: "0 0", overflow: "hidden", "min-height": "200px" }, attrs: { "public-id": (g = r._document.viewer) == null ? void 0 : g.publicDocumentId, _document: r._document }, on: { page: () => r.isFeedbackInitiated = !0, close: function(u) {
3757
3867
  return r.$emit("close");
3758
3868
  } } })], 1) : r.page === "versionError" ? n("div", { key: "versionError", staticClass: "root-padding flex flex-grow flex-col items-center justify-center text-center" }, [n("div", { staticClass: "stagger-anim" }, [n("div", { staticClass: "flex items-center justify-center", staticStyle: { padding: "20px 0" } }, [n("div", { staticClass: "flex items-center justify-center", staticStyle: { width: "52px", height: "52px", "border-radius": "50%" } }, [n("BaseIcon", { attrs: { size: 30, type: "error" } })], 1)]), n("div", { staticClass: "a-title", domProps: { textContent: r._s(r._document.$t(`answerModal.versionError.${r.mode}.title`)) } }), n("div", { domProps: { textContent: r._s(r._document.$t("answerModal.versionError.text")) } })]), n("div", { staticClass: "stagger-anim", staticStyle: { "padding-top": "3em" } }, [n("CButton", { staticClass: "a-btn", attrs: { loading: r.isPosting, type: "none" }, on: { click: r.reload } }, [r._v(" " + r._s(r._document.$t("answerModal.versionError.btn")) + " ")])], 1)]) : r._e()], 1);
3759
- }, _e = [], Ee = /* @__PURE__ */ ot(
3760
- we,
3761
- xe,
3762
- _e,
3869
+ }, Pe = [], Se = /* @__PURE__ */ ot(
3870
+ Ce,
3871
+ be,
3872
+ Pe,
3763
3873
  !1,
3764
3874
  null,
3765
- "60b44ed1",
3875
+ "a3ebd6b5",
3766
3876
  null,
3767
3877
  null
3768
3878
  );
3769
- const Fe = Ee.exports;
3879
+ const Re = Se.exports;
3770
3880
  export {
3771
- Fe as default
3881
+ Re as default
3772
3882
  };