@liquid-js/qr-code-styling 4.0.0-5 → 4.0.1

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.
@@ -12,49 +12,68 @@ import { DOMImplementation, XMLSerializer as XMLSerializer$1, DOMParser as DOMPa
12
12
 
13
13
  export { ErrorCorrectionLevel, Mode, TypeNumber } from "@liquid-js/qrcode-generator/lib/qrcode/QRCodeMinimal.js";
14
14
 
15
- let isObject = obj => !!obj && "object" == typeof obj && !Array.isArray(obj);
16
-
17
- function mergeDeep(target, ...sources) {
18
- if (!sources.length) return target;
19
- let source = sources.shift();
20
- return void 0 !== source && isObject(target) && isObject(source) ? (target = {
21
- ...target
22
- }, Object.keys(source).forEach((key => {
23
- let targetValue = target[key], sourceValue = source[key];
24
- Array.isArray(targetValue) && Array.isArray(sourceValue) ? target[key] = sourceValue : isObject(targetValue) && isObject(sourceValue) ? target[key] = mergeDeep(Object.assign({}, targetValue), sourceValue) : target[key] = sourceValue;
25
- })), mergeDeep(target, ...sources)) : target;
15
+ let $isObject$$ = $obj$jscomp$26$$ => !!$obj$jscomp$26$$ && "object" == typeof $obj$jscomp$26$$ && !Array.isArray($obj$jscomp$26$$);
16
+
17
+ function $mergeDeep$$($target$jscomp$92$$, ...$sources$$) {
18
+ if (!$sources$$.length) return $target$jscomp$92$$;
19
+ let $source$jscomp$16$$ = $sources$$.shift();
20
+ return void 0 !== $source$jscomp$16$$ && $isObject$$($target$jscomp$92$$) && $isObject$$($source$jscomp$16$$) ? ($target$jscomp$92$$ = {
21
+ ...$target$jscomp$92$$
22
+ }, Object.keys($source$jscomp$16$$).forEach(($key$jscomp$37$$ => {
23
+ let $targetValue$$ = $target$jscomp$92$$[$key$jscomp$37$$], $sourceValue$$ = $source$jscomp$16$$[$key$jscomp$37$$];
24
+ Array.isArray($targetValue$$) && Array.isArray($sourceValue$$) ? $target$jscomp$92$$[$key$jscomp$37$$] = $sourceValue$$ : $isObject$$($targetValue$$) && $isObject$$($sourceValue$$) ? $target$jscomp$92$$[$key$jscomp$37$$] = $mergeDeep$$(Object.assign({}, $targetValue$$), $sourceValue$$) : $target$jscomp$92$$[$key$jscomp$37$$] = $sourceValue$$;
25
+ })), $mergeDeep$$($target$jscomp$92$$, ...$sources$$)) : $target$jscomp$92$$;
26
26
  }
27
27
 
28
- var GradientType, DotType, CornerDotType, CornerSquareType, ShapeType, ImageMode;
29
-
30
- function sanitizeGradient(gradient_newGradient) {
31
- if (!(gradient_newGradient = {
32
- ...gradient_newGradient
33
- }).colorStops || !gradient_newGradient.colorStops.length) throw "Field 'colorStops' is required in gradient";
34
- return gradient_newGradient.rotation = gradient_newGradient.rotation ? Number(gradient_newGradient.rotation) : 0,
35
- gradient_newGradient.colorStops = gradient_newGradient.colorStops.map((colorStop => ({
36
- ...colorStop,
37
- offset: Number(colorStop.offset)
38
- }))), gradient_newGradient;
28
+ var $GradientType$$, $GradientType$jscomp$inline_0$$ = $GradientType$$ || ($GradientType$$ = {});
29
+
30
+ function $sanitizeGradient$$($gradient_newGradient$$) {
31
+ if (!($gradient_newGradient$$ = {
32
+ ...$gradient_newGradient$$
33
+ }).colorStops || !$gradient_newGradient$$.colorStops.length) throw "Field 'colorStops' is required in gradient";
34
+ return $gradient_newGradient$$.rotation = $gradient_newGradient$$.rotation ? Number($gradient_newGradient$$.rotation) : 0,
35
+ $gradient_newGradient$$.colorStops = $gradient_newGradient$$.colorStops.map(($colorStop$$ => ({
36
+ ...$colorStop$$,
37
+ offset: Number($colorStop$$.offset)
38
+ }))), $gradient_newGradient$$;
39
39
  }
40
40
 
41
- (GradientType = GradientType || (GradientType = {})).radial = "radial", GradientType.linear = "linear",
42
- (DotType = DotType || (DotType = {})).dot = "dot", DotType.randomDot = "random-dot",
43
- DotType.rounded = "rounded", DotType.extraRounded = "extra-rounded", DotType.verticalLine = "vertical-line",
44
- DotType.horizontalLine = "horizontal-line", DotType.classy = "classy", DotType.classyRounded = "classy-rounded",
45
- DotType.square = "square", DotType.smallSquare = "small-square", DotType.tinySquare = "tiny-square",
46
- DotType.diamond = "diamond", (CornerDotType = CornerDotType || (CornerDotType = {})).dot = "dot",
47
- CornerDotType.square = "square", CornerDotType.heart = "heart", CornerDotType.extraRounded = "extra-rounded",
48
- CornerDotType.classy = "classy", CornerDotType.outpoint = "outpoint", CornerDotType.inpoint = "inpoint",
49
- (CornerSquareType = CornerSquareType || (CornerSquareType = {})).dot = "dot", CornerSquareType.square = "square",
50
- CornerSquareType.extraRounded = "extra-rounded", CornerSquareType.classy = "classy",
51
- CornerSquareType.outpoint = "outpoint", CornerSquareType.inpoint = "inpoint", (ShapeType = ShapeType || (ShapeType = {})).square = "square",
52
- ShapeType.circle = "circle", (ImageMode = ImageMode || (ImageMode = {})).center = "center",
53
- ImageMode.overlay = "overlay", ImageMode.background = "background";
54
-
55
- let defaultOptions = {
41
+ $GradientType$jscomp$inline_0$$.radial = "radial", $GradientType$jscomp$inline_0$$.linear = "linear";
42
+
43
+ var $DotType$$, $DotType$jscomp$inline_2$$ = $DotType$$ || ($DotType$$ = {});
44
+
45
+ $DotType$jscomp$inline_2$$.dot = "dot", $DotType$jscomp$inline_2$$.randomDot = "random-dot",
46
+ $DotType$jscomp$inline_2$$.rounded = "rounded", $DotType$jscomp$inline_2$$.extraRounded = "extra-rounded",
47
+ $DotType$jscomp$inline_2$$.verticalLine = "vertical-line", $DotType$jscomp$inline_2$$.horizontalLine = "horizontal-line",
48
+ $DotType$jscomp$inline_2$$.classy = "classy", $DotType$jscomp$inline_2$$.classyRounded = "classy-rounded",
49
+ $DotType$jscomp$inline_2$$.square = "square", $DotType$jscomp$inline_2$$.smallSquare = "small-square",
50
+ $DotType$jscomp$inline_2$$.tinySquare = "tiny-square", $DotType$jscomp$inline_2$$.diamond = "diamond";
51
+
52
+ var $CornerDotType$$, $CornerDotType$jscomp$inline_4$$ = $CornerDotType$$ || ($CornerDotType$$ = {});
53
+
54
+ $CornerDotType$jscomp$inline_4$$.dot = "dot", $CornerDotType$jscomp$inline_4$$.square = "square",
55
+ $CornerDotType$jscomp$inline_4$$.heart = "heart", $CornerDotType$jscomp$inline_4$$.extraRounded = "extra-rounded",
56
+ $CornerDotType$jscomp$inline_4$$.classy = "classy", $CornerDotType$jscomp$inline_4$$.outpoint = "outpoint",
57
+ $CornerDotType$jscomp$inline_4$$.inpoint = "inpoint";
58
+
59
+ var $CornerSquareType$$, $CornerSquareType$jscomp$inline_6$$ = $CornerSquareType$$ || ($CornerSquareType$$ = {});
60
+
61
+ $CornerSquareType$jscomp$inline_6$$.dot = "dot", $CornerSquareType$jscomp$inline_6$$.square = "square",
62
+ $CornerSquareType$jscomp$inline_6$$.extraRounded = "extra-rounded", $CornerSquareType$jscomp$inline_6$$.classy = "classy",
63
+ $CornerSquareType$jscomp$inline_6$$.outpoint = "outpoint", $CornerSquareType$jscomp$inline_6$$.inpoint = "inpoint";
64
+
65
+ var $ShapeType$$, $ShapeType$jscomp$inline_8$$ = $ShapeType$$ || ($ShapeType$$ = {});
66
+
67
+ $ShapeType$jscomp$inline_8$$.square = "square", $ShapeType$jscomp$inline_8$$.circle = "circle";
68
+
69
+ var $ImageMode$$, $ImageMode$jscomp$inline_10$$ = $ImageMode$$ || ($ImageMode$$ = {});
70
+
71
+ $ImageMode$jscomp$inline_10$$.center = "center", $ImageMode$jscomp$inline_10$$.overlay = "overlay",
72
+ $ImageMode$jscomp$inline_10$$.background = "background";
73
+
74
+ let $defaultOptions$$ = {
56
75
  document: void 0,
57
- shape: ShapeType.square,
76
+ shape: $ShapeType$$.square,
58
77
  width: void 0,
59
78
  height: void 0,
60
79
  data: "",
@@ -64,7 +83,7 @@ let defaultOptions = {
64
83
  errorCorrectionLevel: ErrorCorrectionLevel.Q
65
84
  },
66
85
  imageOptions: {
67
- mode: ImageMode.center,
86
+ mode: $ImageMode$$.center,
68
87
  imageSize: .4,
69
88
  crossOrigin: void 0,
70
89
  margin: 0,
@@ -73,741 +92,756 @@ let defaultOptions = {
73
92
  }
74
93
  },
75
94
  dotsOptions: {
76
- type: DotType.square,
95
+ type: $DotType$$.square,
77
96
  color: "#000",
78
97
  size: 10
79
98
  }
80
99
  };
81
100
 
82
- function sanitizeOptions(newOptions_options) {
83
- return (newOptions_options = {
84
- ...newOptions_options
101
+ function $sanitizeOptions$$($newOptions_options$jscomp$34$$) {
102
+ return ($newOptions_options$jscomp$34$$ = {
103
+ ...$newOptions_options$jscomp$34$$
85
104
  }).imageOptions = {
86
- ...newOptions_options.imageOptions,
87
- imageSize: Math.min(1, Number(newOptions_options.imageOptions.imageSize)) || 1,
88
- margin: Number(newOptions_options.imageOptions.margin),
105
+ ...$newOptions_options$jscomp$34$$.imageOptions,
106
+ imageSize: Math.min(1, Number($newOptions_options$jscomp$34$$.imageOptions.imageSize)) || 1,
107
+ margin: Number($newOptions_options$jscomp$34$$.imageOptions.margin),
89
108
  fill: {
90
- ...newOptions_options.imageOptions.fill
109
+ ...$newOptions_options$jscomp$34$$.imageOptions.fill
91
110
  }
92
- }, newOptions_options.imageOptions.mode == ImageMode.overlay && (newOptions_options.imageOptions.margin = 0),
93
- newOptions_options.imageOptions.fill.gradient && (newOptions_options.imageOptions.fill.gradient = sanitizeGradient(newOptions_options.imageOptions.fill.gradient)),
94
- newOptions_options.dotsOptions = {
95
- ...newOptions_options.dotsOptions
96
- }, newOptions_options.dotsOptions.gradient && (newOptions_options.dotsOptions.gradient = sanitizeGradient(newOptions_options.dotsOptions.gradient)),
97
- newOptions_options.dotsOptions.size = Math.round(Math.max(0, newOptions_options.dotsOptions.size) || 10),
98
- newOptions_options.cornersSquareOptions && (newOptions_options.cornersSquareOptions = {
99
- ...newOptions_options.cornersSquareOptions
100
- }, newOptions_options.cornersSquareOptions.gradient && (newOptions_options.cornersSquareOptions.gradient = sanitizeGradient(newOptions_options.cornersSquareOptions.gradient))),
101
- newOptions_options.cornersDotOptions && (newOptions_options.cornersDotOptions = {
102
- ...newOptions_options.cornersDotOptions
103
- }, newOptions_options.cornersDotOptions.gradient && (newOptions_options.cornersDotOptions.gradient = sanitizeGradient(newOptions_options.cornersDotOptions.gradient))),
104
- newOptions_options.backgroundOptions && (newOptions_options.backgroundOptions = {
105
- ...newOptions_options.backgroundOptions
106
- }, newOptions_options.backgroundOptions.gradient && (newOptions_options.backgroundOptions.gradient = sanitizeGradient(newOptions_options.backgroundOptions.gradient))),
107
- newOptions_options.document || (newOptions_options.document = document), newOptions_options;
111
+ }, $newOptions_options$jscomp$34$$.imageOptions.mode == $ImageMode$$.overlay && ($newOptions_options$jscomp$34$$.imageOptions.margin = 0),
112
+ $newOptions_options$jscomp$34$$.imageOptions.fill.gradient && ($newOptions_options$jscomp$34$$.imageOptions.fill.gradient = $sanitizeGradient$$($newOptions_options$jscomp$34$$.imageOptions.fill.gradient)),
113
+ $newOptions_options$jscomp$34$$.dotsOptions = {
114
+ ...$newOptions_options$jscomp$34$$.dotsOptions
115
+ }, $newOptions_options$jscomp$34$$.dotsOptions.gradient && ($newOptions_options$jscomp$34$$.dotsOptions.gradient = $sanitizeGradient$$($newOptions_options$jscomp$34$$.dotsOptions.gradient)),
116
+ $newOptions_options$jscomp$34$$.dotsOptions.size = Math.round(Math.max(0, $newOptions_options$jscomp$34$$.dotsOptions.size) || 10),
117
+ $newOptions_options$jscomp$34$$.cornersSquareOptions && ($newOptions_options$jscomp$34$$.cornersSquareOptions = {
118
+ ...$newOptions_options$jscomp$34$$.cornersSquareOptions
119
+ }, $newOptions_options$jscomp$34$$.cornersSquareOptions.gradient && ($newOptions_options$jscomp$34$$.cornersSquareOptions.gradient = $sanitizeGradient$$($newOptions_options$jscomp$34$$.cornersSquareOptions.gradient))),
120
+ $newOptions_options$jscomp$34$$.cornersDotOptions && ($newOptions_options$jscomp$34$$.cornersDotOptions = {
121
+ ...$newOptions_options$jscomp$34$$.cornersDotOptions
122
+ }, $newOptions_options$jscomp$34$$.cornersDotOptions.gradient && ($newOptions_options$jscomp$34$$.cornersDotOptions.gradient = $sanitizeGradient$$($newOptions_options$jscomp$34$$.cornersDotOptions.gradient))),
123
+ $newOptions_options$jscomp$34$$.backgroundOptions && ($newOptions_options$jscomp$34$$.backgroundOptions = {
124
+ ...$newOptions_options$jscomp$34$$.backgroundOptions
125
+ }, $newOptions_options$jscomp$34$$.backgroundOptions.gradient && ($newOptions_options$jscomp$34$$.backgroundOptions.gradient = $sanitizeGradient$$($newOptions_options$jscomp$34$$.backgroundOptions.gradient))),
126
+ $newOptions_options$jscomp$34$$.document || ($newOptions_options$jscomp$34$$.document = document),
127
+ $newOptions_options$jscomp$34$$;
108
128
  }
109
129
 
110
- let ErrorCorrectionPercents = {
130
+ let $ErrorCorrectionPercents$$ = {
111
131
  [ErrorCorrectionLevel.L]: .07,
112
132
  [ErrorCorrectionLevel.M]: .15,
113
133
  [ErrorCorrectionLevel.Q]: .25,
114
134
  [ErrorCorrectionLevel.H]: .3
115
135
  };
116
136
 
117
- let rx = /\.?0+$/;
137
+ let $rx$$ = /\.?0+$/;
118
138
 
119
- function numToAttr(value) {
120
- return value.toFixed(7).replace(rx, "");
139
+ function $numToAttr$$($value$jscomp$91$$) {
140
+ return $value$jscomp$91$$.toFixed(7).replace($rx$$, "");
121
141
  }
122
142
 
123
- function svgPath(strings, ...values) {
124
- return strings.reduce(((t, v, i) => {
125
- let p = "";
126
- return i && (p = values[i - 1]), "number" == typeof p && (p = numToAttr(p)), `${t}${p}${v}`;
143
+ function $svgPath$$($strings$$, ...$values$jscomp$10$$) {
144
+ return $strings$$.reduce((($t$$, $v$$, $i$jscomp$3$$) => {
145
+ let $p$$ = "";
146
+ return $i$jscomp$3$$ && ($p$$ = $values$jscomp$10$$[$i$jscomp$3$$ - 1]), "number" == typeof $p$$ && ($p$$ = $numToAttr$$($p$$)),
147
+ `${$t$$}${$p$$}${$v$$}`;
127
148
  }), "").trim().replace(/[\s\n\r]+/gim, " ");
128
149
  }
129
150
 
130
- class QRCornerDot {
151
+ class $QRCornerDot$$ {
131
152
  get element() {
132
153
  return this._element;
133
154
  }
134
- constructor(type, document) {
135
- this.type = type, this.document = document;
155
+ constructor($type$jscomp$150$$, $document$jscomp$2$$) {
156
+ this.type = $type$jscomp$150$$, this.document = $document$jscomp$2$$;
136
157
  }
137
- draw(args) {
138
- let drawFunction;
158
+ draw($args$$) {
159
+ let $drawFunction$$;
139
160
  switch (this.type) {
140
- case CornerDotType.square:
141
- drawFunction = this.drawSquare;
161
+ case $CornerDotType$$.square:
162
+ $drawFunction$$ = this.drawSquare;
142
163
  break;
143
164
 
144
- case CornerDotType.heart:
145
- drawFunction = this.drawHeart;
165
+ case $CornerDotType$$.heart:
166
+ $drawFunction$$ = this.drawHeart;
146
167
  break;
147
168
 
148
- case CornerDotType.extraRounded:
149
- drawFunction = this.drawRounded;
169
+ case $CornerDotType$$.extraRounded:
170
+ $drawFunction$$ = this.drawRounded;
150
171
  break;
151
172
 
152
- case CornerDotType.classy:
153
- drawFunction = this.drawClassy;
173
+ case $CornerDotType$$.classy:
174
+ $drawFunction$$ = this.drawClassy;
154
175
  break;
155
176
 
156
- case CornerDotType.inpoint:
157
- drawFunction = this.drawInpoint;
177
+ case $CornerDotType$$.inpoint:
178
+ $drawFunction$$ = this.drawInpoint;
158
179
  break;
159
180
 
160
- case CornerDotType.outpoint:
161
- drawFunction = this.drawOutpoint;
181
+ case $CornerDotType$$.outpoint:
182
+ $drawFunction$$ = this.drawOutpoint;
162
183
  break;
163
184
 
164
185
  default:
165
- drawFunction = this.drawDot;
186
+ $drawFunction$$ = this.drawDot;
166
187
  }
167
- drawFunction.call(this, args);
188
+ $drawFunction$$.call(this, $args$$);
168
189
  }
169
- rotateFigure({x: cx_x, y: cy_y, size, rotation = 0, draw}) {
170
- cx_x += size / 2, cy_y += size / 2, draw(), this._element?.setAttribute("transform", `rotate(${numToAttr(180 * rotation / Math.PI)},${cx_x},${cy_y})`);
190
+ rotateFigure({x: $cx_x$jscomp$88$$, y: $cy_y$jscomp$73$$, size: $size$jscomp$21$$, rotation: $rotation$jscomp$3$$ = 0, draw: $draw$$}) {
191
+ $cx_x$jscomp$88$$ += $size$jscomp$21$$ / 2, $cy_y$jscomp$73$$ += $size$jscomp$21$$ / 2,
192
+ $draw$$(), this._element?.setAttribute("transform", `rotate(${$numToAttr$$(180 * $rotation$jscomp$3$$ / Math.PI)},${$cx_x$jscomp$88$$},${$cy_y$jscomp$73$$})`);
171
193
  }
172
- basicDot(args) {
173
- let {size, x, y} = args;
194
+ basicDot($args$jscomp$1$$) {
195
+ let {size: $size$jscomp$22$$, x: $x$jscomp$89$$, y: $y$jscomp$74$$} = $args$jscomp$1$$;
174
196
  this.rotateFigure({
175
- ...args,
197
+ ...$args$jscomp$1$$,
176
198
  draw: () => {
177
199
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "circle"),
178
- this._element.setAttribute("cx", numToAttr(x + size / 2)), this._element.setAttribute("cy", numToAttr(y + size / 2)),
179
- this._element.setAttribute("r", numToAttr(size / 2));
200
+ this._element.setAttribute("cx", $numToAttr$$($x$jscomp$89$$ + $size$jscomp$22$$ / 2)),
201
+ this._element.setAttribute("cy", $numToAttr$$($y$jscomp$74$$ + $size$jscomp$22$$ / 2)),
202
+ this._element.setAttribute("r", $numToAttr$$($size$jscomp$22$$ / 2));
180
203
  }
181
204
  });
182
205
  }
183
- basicSquare(args) {
184
- let {size, x, y} = args;
206
+ basicSquare($args$jscomp$2$$) {
207
+ let {size: $size$jscomp$23$$, x: $x$jscomp$90$$, y: $y$jscomp$75$$} = $args$jscomp$2$$;
185
208
  this.rotateFigure({
186
- ...args,
209
+ ...$args$jscomp$2$$,
187
210
  draw: () => {
188
211
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "rect"),
189
- this._element.setAttribute("x", numToAttr(x)), this._element.setAttribute("y", numToAttr(y)),
190
- this._element.setAttribute("width", numToAttr(size)), this._element.setAttribute("height", numToAttr(size));
212
+ this._element.setAttribute("x", $numToAttr$$($x$jscomp$90$$)), this._element.setAttribute("y", $numToAttr$$($y$jscomp$75$$)),
213
+ this._element.setAttribute("width", $numToAttr$$($size$jscomp$23$$)), this._element.setAttribute("height", $numToAttr$$($size$jscomp$23$$));
191
214
  }
192
215
  });
193
216
  }
194
- basicHeart(args) {
195
- let {size, x, y} = args;
217
+ basicHeart($args$jscomp$3$$) {
218
+ let {size: $size$jscomp$24$$, x: $x$jscomp$91$$, y: $y$jscomp$76$$} = $args$jscomp$3$$;
196
219
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "path");
197
- let move = !1, i = 0;
198
- this._element.setAttribute("d", [ "M", 1, .3262506, "c", 0, .0383376, -.0064626, .0758377, -.0193751, .1125001, "s", -.0356247, .076875, -.0681248, .1206252, "c", -.0325, .0437499, -.0762503, .0931247, -.1312501, .1481249, "C", .7262502, .7625008, .6566626, .8279132, .5724999, .9037505, "L", .5, .9687506, "L", .4275001, .9037505, "C", .3433374, .8279132, .2737499, .7625005, .21875, .7075007, "C", .1637501, .6525008, .1199999, .6031258, .0874999, .5593758, "S", .0322876, .4754133, .0193751, .4387506, "S", 0, .3645881, 0, .3262506, "c", 0, -.0783374, .0262499, -.1437498, .07875, -.1962499, "s", .1179124, -.07875, .1962499, -.07875, "c", .0433376, 0, .0845875, .0091625, .12375, .0274999, "S", .4716623, .1229131, .5, .1562506, "c", .0283374, -.0333375, .0620874, -.0591625, .1012502, -.0775, "c", .0391627, -.0183375, .0804126, -.0274999, .12375, -.0274999, "c", .0783374, 0, .1437497, .0262499, .1962501, .07875, "S", 1, .2479131, 1, .3262506, "z" ].map((v => "string" == typeof v ? (i = 0,
199
- move = v.toUpperCase() == v, v) : (i++, v *= size, move && (v += 1 == i % 2 ? x : y),
200
- numToAttr(v)))).join(" "));
201
- }
202
- basicRounded(args) {
203
- let {size, x, y} = args;
220
+ let $move$$ = !1, $i$jscomp$4$$ = 0;
221
+ this._element.setAttribute("d", [ "M", 1, .3262506, "c", 0, .0383376, -.0064626, .0758377, -.0193751, .1125001, "s", -.0356247, .076875, -.0681248, .1206252, "c", -.0325, .0437499, -.0762503, .0931247, -.1312501, .1481249, "C", .7262502, .7625008, .6566626, .8279132, .5724999, .9037505, "L", .5, .9687506, "L", .4275001, .9037505, "C", .3433374, .8279132, .2737499, .7625005, .21875, .7075007, "C", .1637501, .6525008, .1199999, .6031258, .0874999, .5593758, "S", .0322876, .4754133, .0193751, .4387506, "S", 0, .3645881, 0, .3262506, "c", 0, -.0783374, .0262499, -.1437498, .07875, -.1962499, "s", .1179124, -.07875, .1962499, -.07875, "c", .0433376, 0, .0845875, .0091625, .12375, .0274999, "S", .4716623, .1229131, .5, .1562506, "c", .0283374, -.0333375, .0620874, -.0591625, .1012502, -.0775, "c", .0391627, -.0183375, .0804126, -.0274999, .12375, -.0274999, "c", .0783374, 0, .1437497, .0262499, .1962501, .07875, "S", 1, .2479131, 1, .3262506, "z" ].map(($v$jscomp$1$$ => "string" == typeof $v$jscomp$1$$ ? ($i$jscomp$4$$ = 0,
222
+ $move$$ = $v$jscomp$1$$.toUpperCase() == $v$jscomp$1$$, $v$jscomp$1$$) : ($i$jscomp$4$$++,
223
+ $v$jscomp$1$$ *= $size$jscomp$24$$, $move$$ && ($v$jscomp$1$$ += 1 == $i$jscomp$4$$ % 2 ? $x$jscomp$91$$ : $y$jscomp$76$$),
224
+ $numToAttr$$($v$jscomp$1$$)))).join(" "));
225
+ }
226
+ basicRounded($args$jscomp$4$$) {
227
+ let {size: $size$jscomp$25$$, x: $x$jscomp$92$$, y: $y$jscomp$77$$} = $args$jscomp$4$$;
204
228
  this.rotateFigure({
205
- ...args,
229
+ ...$args$jscomp$4$$,
206
230
  draw: () => {
207
231
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "rect"),
208
- this._element.setAttribute("x", numToAttr(x)), this._element.setAttribute("y", numToAttr(y)),
209
- this._element.setAttribute("width", numToAttr(size)), this._element.setAttribute("height", numToAttr(size)),
210
- this._element.setAttribute("rx", numToAttr(size / 4)), this._element.setAttribute("ry", numToAttr(size / 4));
232
+ this._element.setAttribute("x", $numToAttr$$($x$jscomp$92$$)), this._element.setAttribute("y", $numToAttr$$($y$jscomp$77$$)),
233
+ this._element.setAttribute("width", $numToAttr$$($size$jscomp$25$$)), this._element.setAttribute("height", $numToAttr$$($size$jscomp$25$$)),
234
+ this._element.setAttribute("rx", $numToAttr$$($size$jscomp$25$$ / 4)), this._element.setAttribute("ry", $numToAttr$$($size$jscomp$25$$ / 4));
211
235
  }
212
236
  });
213
237
  }
214
- basicClassy(args) {
215
- let {size, x, y} = args, dotSize = size / 7;
238
+ basicClassy($args$jscomp$5$$) {
239
+ let {size: $size$jscomp$26$$, x: $x$jscomp$93$$, y: $y$jscomp$78$$} = $args$jscomp$5$$, $dotSize$$ = $size$jscomp$26$$ / 7;
216
240
  this.rotateFigure({
217
- ...args,
241
+ ...$args$jscomp$5$$,
218
242
  draw: () => {
219
243
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
220
- this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", svgPath`M ${x} ${y + 2.5 * dotSize} v ${2 * dotSize} a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${2.5 * dotSize} ${2.5 * dotSize} h ${4.5 * dotSize} v ${-4.5 * dotSize} a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${2.5 * -dotSize} ${2.5 * -dotSize} h ${-2 * dotSize} H ${x} z`);
244
+ this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", $svgPath$$`M ${$x$jscomp$93$$} ${$y$jscomp$78$$ + 2.5 * $dotSize$$} v ${2 * $dotSize$$} a ${2.5 * $dotSize$$} ${2.5 * $dotSize$$}, 0, 0, 0, ${2.5 * $dotSize$$} ${2.5 * $dotSize$$} h ${4.5 * $dotSize$$} v ${-4.5 * $dotSize$$} a ${2.5 * $dotSize$$} ${2.5 * $dotSize$$}, 0, 0, 0, ${2.5 * -$dotSize$$} ${2.5 * -$dotSize$$} h ${-2 * $dotSize$$} H ${$x$jscomp$93$$} z`);
221
245
  }
222
246
  });
223
247
  }
224
- basicInpoint(args) {
225
- let {size, x, y} = args;
248
+ basicInpoint($args$jscomp$6$$) {
249
+ let {size: $size$jscomp$27$$, x: $x$jscomp$94$$, y: $y$jscomp$79$$} = $args$jscomp$6$$;
226
250
  this.rotateFigure({
227
- ...args,
251
+ ...$args$jscomp$6$$,
228
252
  draw: () => {
229
253
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
230
- this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", svgPath`M ${x} ${y + size / 2} v ${size / 4} a ${size / 4}, ${size / 4} 0 0 0 ${size / 4}, ${size / 4} h ${size / 4 * 3} v ${-size / 4 * 3} a ${size / 4}, ${size / 4} 0 0 0 ${-size / 4}, ${-size / 4} h ${-size / 2} a ${size / 4}, ${size / 4} 0 0 0 ${-size / 4}, ${size / 4} z`);
254
+ this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", $svgPath$$`M ${$x$jscomp$94$$} ${$y$jscomp$79$$ + $size$jscomp$27$$ / 2} v ${$size$jscomp$27$$ / 4} a ${$size$jscomp$27$$ / 4}, ${$size$jscomp$27$$ / 4} 0 0 0 ${$size$jscomp$27$$ / 4}, ${$size$jscomp$27$$ / 4} h ${$size$jscomp$27$$ / 4 * 3} v ${-$size$jscomp$27$$ / 4 * 3} a ${$size$jscomp$27$$ / 4}, ${$size$jscomp$27$$ / 4} 0 0 0 ${-$size$jscomp$27$$ / 4}, ${-$size$jscomp$27$$ / 4} h ${-$size$jscomp$27$$ / 2} a ${$size$jscomp$27$$ / 4}, ${$size$jscomp$27$$ / 4} 0 0 0 ${-$size$jscomp$27$$ / 4}, ${$size$jscomp$27$$ / 4} z`);
231
255
  }
232
256
  });
233
257
  }
234
- drawDot({x, y, size, rotation}) {
258
+ drawDot({x: $x$jscomp$95$$, y: $y$jscomp$80$$, size: $size$jscomp$28$$, rotation: $rotation$jscomp$4$$}) {
235
259
  this.basicDot({
236
- x,
237
- y,
238
- size,
239
- rotation
260
+ x: $x$jscomp$95$$,
261
+ y: $y$jscomp$80$$,
262
+ size: $size$jscomp$28$$,
263
+ rotation: $rotation$jscomp$4$$
240
264
  });
241
265
  }
242
- drawSquare({x, y, size, rotation}) {
266
+ drawSquare({x: $x$jscomp$96$$, y: $y$jscomp$81$$, size: $size$jscomp$29$$, rotation: $rotation$jscomp$5$$}) {
243
267
  this.basicSquare({
244
- x,
245
- y,
246
- size,
247
- rotation
268
+ x: $x$jscomp$96$$,
269
+ y: $y$jscomp$81$$,
270
+ size: $size$jscomp$29$$,
271
+ rotation: $rotation$jscomp$5$$
248
272
  });
249
273
  }
250
- drawHeart({x, y, size, rotation}) {
274
+ drawHeart({x: $x$jscomp$97$$, y: $y$jscomp$82$$, size: $size$jscomp$30$$, rotation: $rotation$jscomp$6$$}) {
251
275
  this.basicHeart({
252
- x,
253
- y,
254
- size,
255
- rotation
276
+ x: $x$jscomp$97$$,
277
+ y: $y$jscomp$82$$,
278
+ size: $size$jscomp$30$$,
279
+ rotation: $rotation$jscomp$6$$
256
280
  });
257
281
  }
258
- drawRounded({x, y, size, rotation}) {
282
+ drawRounded({x: $x$jscomp$98$$, y: $y$jscomp$83$$, size: $size$jscomp$31$$, rotation: $rotation$jscomp$7$$}) {
259
283
  this.basicRounded({
260
- x,
261
- y,
262
- size,
263
- rotation
284
+ x: $x$jscomp$98$$,
285
+ y: $y$jscomp$83$$,
286
+ size: $size$jscomp$31$$,
287
+ rotation: $rotation$jscomp$7$$
264
288
  });
265
289
  }
266
- drawClassy({x, y, size, rotation}) {
290
+ drawClassy({x: $x$jscomp$99$$, y: $y$jscomp$84$$, size: $size$jscomp$32$$, rotation: $rotation$jscomp$8$$}) {
267
291
  this.basicClassy({
268
- x,
269
- y,
270
- size,
271
- rotation
292
+ x: $x$jscomp$99$$,
293
+ y: $y$jscomp$84$$,
294
+ size: $size$jscomp$32$$,
295
+ rotation: $rotation$jscomp$8$$
272
296
  });
273
297
  }
274
- drawInpoint({x, y, size, rotation}) {
298
+ drawInpoint({x: $x$jscomp$100$$, y: $y$jscomp$85$$, size: $size$jscomp$33$$, rotation: $rotation$jscomp$9$$}) {
275
299
  this.basicInpoint({
276
- x,
277
- y,
278
- size,
279
- rotation
300
+ x: $x$jscomp$100$$,
301
+ y: $y$jscomp$85$$,
302
+ size: $size$jscomp$33$$,
303
+ rotation: $rotation$jscomp$9$$
280
304
  });
281
305
  }
282
- drawOutpoint({x, y, size, rotation}) {
306
+ drawOutpoint({x: $x$jscomp$101$$, y: $y$jscomp$86$$, size: $size$jscomp$34$$, rotation: $rotation$jscomp$10$$}) {
283
307
  this.basicInpoint({
284
- x,
285
- y,
286
- size,
287
- rotation: (rotation || 0) + Math.PI
308
+ x: $x$jscomp$101$$,
309
+ y: $y$jscomp$86$$,
310
+ size: $size$jscomp$34$$,
311
+ rotation: ($rotation$jscomp$10$$ || 0) + Math.PI
288
312
  });
289
313
  }
290
314
  }
291
315
 
292
- class QRCornerSquare {
316
+ class $QRCornerSquare$$ {
293
317
  get element() {
294
318
  return this._element;
295
319
  }
296
320
  get fill() {
297
321
  return this._fill;
298
322
  }
299
- constructor(type, document) {
300
- this.type = type, this.document = document;
323
+ constructor($type$jscomp$152$$, $document$jscomp$3$$) {
324
+ this.type = $type$jscomp$152$$, this.document = $document$jscomp$3$$;
301
325
  }
302
- draw(args) {
303
- let drawFunction;
326
+ draw($args$jscomp$7$$) {
327
+ let $drawFunction$jscomp$1$$;
304
328
  switch (this.type) {
305
- case CornerSquareType.square:
306
- drawFunction = this.drawSquare;
329
+ case $CornerSquareType$$.square:
330
+ $drawFunction$jscomp$1$$ = this.drawSquare;
307
331
  break;
308
332
 
309
- case CornerSquareType.extraRounded:
310
- drawFunction = this.drawExtraRounded;
333
+ case $CornerSquareType$$.extraRounded:
334
+ $drawFunction$jscomp$1$$ = this.drawExtraRounded;
311
335
  break;
312
336
 
313
- case CornerSquareType.classy:
314
- drawFunction = this.drawClassy;
337
+ case $CornerSquareType$$.classy:
338
+ $drawFunction$jscomp$1$$ = this.drawClassy;
315
339
  break;
316
340
 
317
- case CornerSquareType.outpoint:
318
- drawFunction = this.drawOutpoint;
341
+ case $CornerSquareType$$.outpoint:
342
+ $drawFunction$jscomp$1$$ = this.drawOutpoint;
319
343
  break;
320
344
 
321
- case CornerSquareType.inpoint:
322
- drawFunction = this.drawInpoint;
345
+ case $CornerSquareType$$.inpoint:
346
+ $drawFunction$jscomp$1$$ = this.drawInpoint;
323
347
  break;
324
348
 
325
349
  default:
326
- drawFunction = this.drawDot;
350
+ $drawFunction$jscomp$1$$ = this.drawDot;
327
351
  }
328
- drawFunction.call(this, args);
352
+ $drawFunction$jscomp$1$$.call(this, $args$jscomp$7$$);
329
353
  }
330
- rotateFigure({x: cx, y: cy, size, rotation = 0, draw}) {
331
- cx += size / 2, cy += size / 2, draw(), this._element?.setAttribute("transform", `rotate(${numToAttr(180 * rotation / Math.PI)},${cx},${cy})`),
332
- this._fill?.setAttribute("transform", `rotate(${numToAttr(180 * rotation / Math.PI)},${cx},${cy})`);
354
+ rotateFigure({x: $cx$jscomp$1_x$jscomp$102$$, y: $cy$jscomp$1_y$jscomp$87$$, size: $size$jscomp$35$$, rotation: $rotation$jscomp$11$$ = 0, draw: $draw$jscomp$1$$}) {
355
+ $cx$jscomp$1_x$jscomp$102$$ += $size$jscomp$35$$ / 2, $cy$jscomp$1_y$jscomp$87$$ += $size$jscomp$35$$ / 2,
356
+ $draw$jscomp$1$$(), this._element?.setAttribute("transform", `rotate(${$numToAttr$$(180 * $rotation$jscomp$11$$ / Math.PI)},${$cx$jscomp$1_x$jscomp$102$$},${$cy$jscomp$1_y$jscomp$87$$})`),
357
+ this._fill?.setAttribute("transform", `rotate(${$numToAttr$$(180 * $rotation$jscomp$11$$ / Math.PI)},${$cx$jscomp$1_x$jscomp$102$$},${$cy$jscomp$1_y$jscomp$87$$})`);
333
358
  }
334
- basicDot(args) {
335
- let {size, x, y} = args, dotSize = size / 7;
359
+ basicDot($args$jscomp$8$$) {
360
+ let {size: $size$jscomp$36$$, x: $x$jscomp$103$$, y: $y$jscomp$88$$} = $args$jscomp$8$$, $dotSize$jscomp$2$$ = $size$jscomp$36$$ / 7;
336
361
  this.rotateFigure({
337
- ...args,
362
+ ...$args$jscomp$8$$,
338
363
  draw: () => {
339
364
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
340
- this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", svgPath`M ${x + size / 2} ${y} a ${size / 2} ${size / 2} 0 1 0 0.1 0 z m 0 ${dotSize} a ${size / 2 - dotSize} ${size / 2 - dotSize} 0 1 1 -0.1 0 Z`),
365
+ this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", $svgPath$$`M ${$x$jscomp$103$$ + $size$jscomp$36$$ / 2} ${$y$jscomp$88$$} a ${$size$jscomp$36$$ / 2} ${$size$jscomp$36$$ / 2} 0 1 0 0.1 0 z m 0 ${$dotSize$jscomp$2$$} a ${$size$jscomp$36$$ / 2 - $dotSize$jscomp$2$$} ${$size$jscomp$36$$ / 2 - $dotSize$jscomp$2$$} 0 1 1 -0.1 0 Z`),
341
366
  this._fill = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
342
- this._fill.setAttribute("clip-rule", "evenodd"), this._fill.setAttribute("d", svgPath`M ${x + size / 2} ${y - dotSize} a ${size / 2 + dotSize} ${size / 2 + dotSize} 0 1 0 0.1 0 z`);
367
+ this._fill.setAttribute("clip-rule", "evenodd"), this._fill.setAttribute("d", $svgPath$$`M ${$x$jscomp$103$$ + $size$jscomp$36$$ / 2} ${$y$jscomp$88$$ - $dotSize$jscomp$2$$} a ${$size$jscomp$36$$ / 2 + $dotSize$jscomp$2$$} ${$size$jscomp$36$$ / 2 + $dotSize$jscomp$2$$} 0 1 0 0.1 0 z`);
343
368
  }
344
369
  });
345
370
  }
346
- basicSquare(args) {
347
- let {size, x, y} = args, dotSize = size / 7;
371
+ basicSquare($args$jscomp$9$$) {
372
+ let {size: $size$jscomp$37$$, x: $x$jscomp$104$$, y: $y$jscomp$89$$} = $args$jscomp$9$$, $dotSize$jscomp$3$$ = $size$jscomp$37$$ / 7;
348
373
  this.rotateFigure({
349
- ...args,
374
+ ...$args$jscomp$9$$,
350
375
  draw: () => {
351
376
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
352
- this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", svgPath`M ${x} ${y} v ${size} h ${size} v ${-size} z M ${x + dotSize} ${y + dotSize} h ${size - 2 * dotSize} v ${size - 2 * dotSize} h ${2 * dotSize - size} z`),
377
+ this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", $svgPath$$`M ${$x$jscomp$104$$} ${$y$jscomp$89$$} v ${$size$jscomp$37$$} h ${$size$jscomp$37$$} v ${-$size$jscomp$37$$} z M ${$x$jscomp$104$$ + $dotSize$jscomp$3$$} ${$y$jscomp$89$$ + $dotSize$jscomp$3$$} h ${$size$jscomp$37$$ - 2 * $dotSize$jscomp$3$$} v ${$size$jscomp$37$$ - 2 * $dotSize$jscomp$3$$} h ${2 * $dotSize$jscomp$3$$ - $size$jscomp$37$$} z`),
353
378
  this._fill = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
354
- this._fill.setAttribute("clip-rule", "evenodd"), this._fill.setAttribute("d", svgPath`M ${x - dotSize} ${y - dotSize} h ${size + 2 * dotSize} v ${size + 2 * dotSize} h ${-size - 2 * dotSize} z`);
379
+ this._fill.setAttribute("clip-rule", "evenodd"), this._fill.setAttribute("d", $svgPath$$`M ${$x$jscomp$104$$ - $dotSize$jscomp$3$$} ${$y$jscomp$89$$ - $dotSize$jscomp$3$$} h ${$size$jscomp$37$$ + 2 * $dotSize$jscomp$3$$} v ${$size$jscomp$37$$ + 2 * $dotSize$jscomp$3$$} h ${-$size$jscomp$37$$ - 2 * $dotSize$jscomp$3$$} z`);
355
380
  }
356
381
  });
357
382
  }
358
- basicExtraRounded(args) {
359
- let {size, x, y} = args, dotSize = size / 7;
383
+ basicExtraRounded($args$jscomp$10$$) {
384
+ let {size: $size$jscomp$38$$, x: $x$jscomp$105$$, y: $y$jscomp$90$$} = $args$jscomp$10$$, $dotSize$jscomp$4$$ = $size$jscomp$38$$ / 7;
360
385
  this.rotateFigure({
361
- ...args,
386
+ ...$args$jscomp$10$$,
362
387
  draw: () => {
363
388
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
364
- this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", svgPath`M ${x} ${y + 2.5 * dotSize} v ${2 * dotSize} a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${2.5 * dotSize} ${2.5 * dotSize} h ${2 * dotSize} a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${2.5 * dotSize} ${2.5 * -dotSize} v ${-2 * dotSize} a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${2.5 * -dotSize} ${2.5 * -dotSize} h ${-2 * dotSize} a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${2.5 * -dotSize} ${2.5 * dotSize} z M ${x + 2.5 * dotSize} ${y + dotSize} h ${2 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * dotSize} ${1.5 * dotSize} v ${2 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * -dotSize} ${1.5 * dotSize} h ${-2 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * -dotSize} ${1.5 * -dotSize} v ${-2 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * dotSize} ${1.5 * -dotSize} z`),
389
+ this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", $svgPath$$`M ${$x$jscomp$105$$} ${$y$jscomp$90$$ + 2.5 * $dotSize$jscomp$4$$} v ${2 * $dotSize$jscomp$4$$} a ${2.5 * $dotSize$jscomp$4$$} ${2.5 * $dotSize$jscomp$4$$}, 0, 0, 0, ${2.5 * $dotSize$jscomp$4$$} ${2.5 * $dotSize$jscomp$4$$} h ${2 * $dotSize$jscomp$4$$} a ${2.5 * $dotSize$jscomp$4$$} ${2.5 * $dotSize$jscomp$4$$}, 0, 0, 0, ${2.5 * $dotSize$jscomp$4$$} ${2.5 * -$dotSize$jscomp$4$$} v ${-2 * $dotSize$jscomp$4$$} a ${2.5 * $dotSize$jscomp$4$$} ${2.5 * $dotSize$jscomp$4$$}, 0, 0, 0, ${2.5 * -$dotSize$jscomp$4$$} ${2.5 * -$dotSize$jscomp$4$$} h ${-2 * $dotSize$jscomp$4$$} a ${2.5 * $dotSize$jscomp$4$$} ${2.5 * $dotSize$jscomp$4$$}, 0, 0, 0, ${2.5 * -$dotSize$jscomp$4$$} ${2.5 * $dotSize$jscomp$4$$} z M ${$x$jscomp$105$$ + 2.5 * $dotSize$jscomp$4$$} ${$y$jscomp$90$$ + $dotSize$jscomp$4$$} h ${2 * $dotSize$jscomp$4$$} a ${1.5 * $dotSize$jscomp$4$$} ${1.5 * $dotSize$jscomp$4$$}, 0, 0, 1, ${1.5 * $dotSize$jscomp$4$$} ${1.5 * $dotSize$jscomp$4$$} v ${2 * $dotSize$jscomp$4$$} a ${1.5 * $dotSize$jscomp$4$$} ${1.5 * $dotSize$jscomp$4$$}, 0, 0, 1, ${1.5 * -$dotSize$jscomp$4$$} ${1.5 * $dotSize$jscomp$4$$} h ${-2 * $dotSize$jscomp$4$$} a ${1.5 * $dotSize$jscomp$4$$} ${1.5 * $dotSize$jscomp$4$$}, 0, 0, 1, ${1.5 * -$dotSize$jscomp$4$$} ${1.5 * -$dotSize$jscomp$4$$} v ${-2 * $dotSize$jscomp$4$$} a ${1.5 * $dotSize$jscomp$4$$} ${1.5 * $dotSize$jscomp$4$$}, 0, 0, 1, ${1.5 * $dotSize$jscomp$4$$} ${1.5 * -$dotSize$jscomp$4$$} z`),
365
390
  this._fill = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
366
- this._fill.setAttribute("clip-rule", "evenodd"), this._fill.setAttribute("d", svgPath`M ${x + 2.5 * dotSize} ${y + dotSize} h ${2 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * dotSize} ${1.5 * dotSize} v ${2 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * -dotSize} ${1.5 * dotSize} h ${-2 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * -dotSize} ${1.5 * -dotSize} v ${-2 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * dotSize} ${1.5 * -dotSize} z`);
391
+ this._fill.setAttribute("clip-rule", "evenodd"), this._fill.setAttribute("d", $svgPath$$`M ${$x$jscomp$105$$ + 2.5 * $dotSize$jscomp$4$$} ${$y$jscomp$90$$ + $dotSize$jscomp$4$$} h ${2 * $dotSize$jscomp$4$$} a ${1.5 * $dotSize$jscomp$4$$} ${1.5 * $dotSize$jscomp$4$$}, 0, 0, 1, ${1.5 * $dotSize$jscomp$4$$} ${1.5 * $dotSize$jscomp$4$$} v ${2 * $dotSize$jscomp$4$$} a ${1.5 * $dotSize$jscomp$4$$} ${1.5 * $dotSize$jscomp$4$$}, 0, 0, 1, ${1.5 * -$dotSize$jscomp$4$$} ${1.5 * $dotSize$jscomp$4$$} h ${-2 * $dotSize$jscomp$4$$} a ${1.5 * $dotSize$jscomp$4$$} ${1.5 * $dotSize$jscomp$4$$}, 0, 0, 1, ${1.5 * -$dotSize$jscomp$4$$} ${1.5 * -$dotSize$jscomp$4$$} v ${-2 * $dotSize$jscomp$4$$} a ${1.5 * $dotSize$jscomp$4$$} ${1.5 * $dotSize$jscomp$4$$}, 0, 0, 1, ${1.5 * $dotSize$jscomp$4$$} ${1.5 * -$dotSize$jscomp$4$$} z`);
367
392
  }
368
393
  });
369
394
  }
370
- basicClassy(args) {
371
- let {size, x, y} = args, dotSize = size / 7;
395
+ basicClassy($args$jscomp$11$$) {
396
+ let {size: $size$jscomp$39$$, x: $x$jscomp$106$$, y: $y$jscomp$91$$} = $args$jscomp$11$$, $dotSize$jscomp$5$$ = $size$jscomp$39$$ / 7;
372
397
  this.rotateFigure({
373
- ...args,
398
+ ...$args$jscomp$11$$,
374
399
  draw: () => {
375
400
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
376
- this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", svgPath`M ${x} ${y + 2.5 * dotSize} v ${2 * dotSize} a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${2.5 * dotSize} ${2.5 * dotSize} h ${4.5 * dotSize} v ${-4.5 * dotSize} a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${2.5 * -dotSize} ${2.5 * -dotSize} h ${-2 * dotSize} H ${x} z M ${x + 2.5 * dotSize} ${y + dotSize} h ${2 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * dotSize} ${1.5 * dotSize} v ${3.5 * dotSize} h ${-3.5 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * -dotSize} ${1.5 * -dotSize} v ${-3.5 * dotSize} z`),
401
+ this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", $svgPath$$`M ${$x$jscomp$106$$} ${$y$jscomp$91$$ + 2.5 * $dotSize$jscomp$5$$} v ${2 * $dotSize$jscomp$5$$} a ${2.5 * $dotSize$jscomp$5$$} ${2.5 * $dotSize$jscomp$5$$}, 0, 0, 0, ${2.5 * $dotSize$jscomp$5$$} ${2.5 * $dotSize$jscomp$5$$} h ${4.5 * $dotSize$jscomp$5$$} v ${-4.5 * $dotSize$jscomp$5$$} a ${2.5 * $dotSize$jscomp$5$$} ${2.5 * $dotSize$jscomp$5$$}, 0, 0, 0, ${2.5 * -$dotSize$jscomp$5$$} ${2.5 * -$dotSize$jscomp$5$$} h ${-2 * $dotSize$jscomp$5$$} H ${$x$jscomp$106$$} z M ${$x$jscomp$106$$ + 2.5 * $dotSize$jscomp$5$$} ${$y$jscomp$91$$ + $dotSize$jscomp$5$$} h ${2 * $dotSize$jscomp$5$$} a ${1.5 * $dotSize$jscomp$5$$} ${1.5 * $dotSize$jscomp$5$$}, 0, 0, 1, ${1.5 * $dotSize$jscomp$5$$} ${1.5 * $dotSize$jscomp$5$$} v ${3.5 * $dotSize$jscomp$5$$} h ${-3.5 * $dotSize$jscomp$5$$} a ${1.5 * $dotSize$jscomp$5$$} ${1.5 * $dotSize$jscomp$5$$}, 0, 0, 1, ${1.5 * -$dotSize$jscomp$5$$} ${1.5 * -$dotSize$jscomp$5$$} v ${-3.5 * $dotSize$jscomp$5$$} z`),
377
402
  this._fill = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
378
- this._fill.setAttribute("clip-rule", "evenodd"), this._fill.setAttribute("d", svgPath`M ${x + .5 * dotSize} ${y - dotSize} h ${4 * dotSize} a ${3.5 * dotSize} ${3.5 * dotSize}, 0, 0, 1, ${3.5 * dotSize} ${3.5 * dotSize} v ${5.5 * dotSize} h ${-5.5 * dotSize} a ${3.5 * dotSize} ${3.5 * dotSize}, 0, 0, 1, ${3.5 * -dotSize} ${3.5 * -dotSize} v ${-5.5 * dotSize} z`);
403
+ this._fill.setAttribute("clip-rule", "evenodd"), this._fill.setAttribute("d", $svgPath$$`M ${$x$jscomp$106$$ + .5 * $dotSize$jscomp$5$$} ${$y$jscomp$91$$ - $dotSize$jscomp$5$$} h ${4 * $dotSize$jscomp$5$$} a ${3.5 * $dotSize$jscomp$5$$} ${3.5 * $dotSize$jscomp$5$$}, 0, 0, 1, ${3.5 * $dotSize$jscomp$5$$} ${3.5 * $dotSize$jscomp$5$$} v ${5.5 * $dotSize$jscomp$5$$} h ${-5.5 * $dotSize$jscomp$5$$} a ${3.5 * $dotSize$jscomp$5$$} ${3.5 * $dotSize$jscomp$5$$}, 0, 0, 1, ${3.5 * -$dotSize$jscomp$5$$} ${3.5 * -$dotSize$jscomp$5$$} v ${-5.5 * $dotSize$jscomp$5$$} z`);
379
404
  }
380
405
  });
381
406
  }
382
- basicInpoint(args) {
383
- let {size, x, y} = args, dotSize = size / 7;
407
+ basicInpoint($args$jscomp$12$$) {
408
+ let {size: $size$jscomp$40$$, x: $x$jscomp$107$$, y: $y$jscomp$92$$} = $args$jscomp$12$$, $dotSize$jscomp$6$$ = $size$jscomp$40$$ / 7;
384
409
  this.rotateFigure({
385
- ...args,
410
+ ...$args$jscomp$12$$,
386
411
  draw: () => {
387
412
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
388
- this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", svgPath`M ${x} ${y + 2.5 * dotSize} v ${2 * dotSize} a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${2.5 * dotSize} ${2.5 * dotSize} h ${4.5 * dotSize} v ${-4.5 * dotSize} a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${2.5 * -dotSize} ${2.5 * -dotSize} h ${-2 * dotSize} a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${2.5 * -dotSize} ${2.5 * dotSize} z M ${x + 2.5 * dotSize} ${y + dotSize} h ${2 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * dotSize} ${1.5 * dotSize} v ${3.5 * dotSize} h ${-3.5 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * -dotSize} ${1.5 * -dotSize} v ${-2 * dotSize} a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${1.5 * dotSize} ${1.5 * -dotSize} z`),
413
+ this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", $svgPath$$`M ${$x$jscomp$107$$} ${$y$jscomp$92$$ + 2.5 * $dotSize$jscomp$6$$} v ${2 * $dotSize$jscomp$6$$} a ${2.5 * $dotSize$jscomp$6$$} ${2.5 * $dotSize$jscomp$6$$}, 0, 0, 0, ${2.5 * $dotSize$jscomp$6$$} ${2.5 * $dotSize$jscomp$6$$} h ${4.5 * $dotSize$jscomp$6$$} v ${-4.5 * $dotSize$jscomp$6$$} a ${2.5 * $dotSize$jscomp$6$$} ${2.5 * $dotSize$jscomp$6$$}, 0, 0, 0, ${2.5 * -$dotSize$jscomp$6$$} ${2.5 * -$dotSize$jscomp$6$$} h ${-2 * $dotSize$jscomp$6$$} a ${2.5 * $dotSize$jscomp$6$$} ${2.5 * $dotSize$jscomp$6$$}, 0, 0, 0, ${2.5 * -$dotSize$jscomp$6$$} ${2.5 * $dotSize$jscomp$6$$} z M ${$x$jscomp$107$$ + 2.5 * $dotSize$jscomp$6$$} ${$y$jscomp$92$$ + $dotSize$jscomp$6$$} h ${2 * $dotSize$jscomp$6$$} a ${1.5 * $dotSize$jscomp$6$$} ${1.5 * $dotSize$jscomp$6$$}, 0, 0, 1, ${1.5 * $dotSize$jscomp$6$$} ${1.5 * $dotSize$jscomp$6$$} v ${3.5 * $dotSize$jscomp$6$$} h ${-3.5 * $dotSize$jscomp$6$$} a ${1.5 * $dotSize$jscomp$6$$} ${1.5 * $dotSize$jscomp$6$$}, 0, 0, 1, ${1.5 * -$dotSize$jscomp$6$$} ${1.5 * -$dotSize$jscomp$6$$} v ${-2 * $dotSize$jscomp$6$$} a ${1.5 * $dotSize$jscomp$6$$} ${1.5 * $dotSize$jscomp$6$$}, 0, 0, 1, ${1.5 * $dotSize$jscomp$6$$} ${1.5 * -$dotSize$jscomp$6$$} z`),
389
414
  this._fill = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
390
- this._fill.setAttribute("clip-rule", "evenodd"), this._fill.setAttribute("d", svgPath`M ${x + .5 * dotSize} ${y - dotSize} h ${4 * dotSize} a ${3.5 * dotSize} ${3.5 * dotSize}, 0, 0, 1, ${3.5 * dotSize} ${3.5 * dotSize} v ${5.5 * dotSize} h ${-5.5 * dotSize} a ${3.5 * dotSize} ${3.5 * dotSize}, 0, 0, 1, ${3.5 * -dotSize} ${3.5 * -dotSize} v ${-2 * dotSize} a ${3.5 * dotSize} ${3.5 * dotSize}, 0, 0, 1, ${3.5 * dotSize} ${3.5 * -dotSize} z`);
415
+ this._fill.setAttribute("clip-rule", "evenodd"), this._fill.setAttribute("d", $svgPath$$`M ${$x$jscomp$107$$ + .5 * $dotSize$jscomp$6$$} ${$y$jscomp$92$$ - $dotSize$jscomp$6$$} h ${4 * $dotSize$jscomp$6$$} a ${3.5 * $dotSize$jscomp$6$$} ${3.5 * $dotSize$jscomp$6$$}, 0, 0, 1, ${3.5 * $dotSize$jscomp$6$$} ${3.5 * $dotSize$jscomp$6$$} v ${5.5 * $dotSize$jscomp$6$$} h ${-5.5 * $dotSize$jscomp$6$$} a ${3.5 * $dotSize$jscomp$6$$} ${3.5 * $dotSize$jscomp$6$$}, 0, 0, 1, ${3.5 * -$dotSize$jscomp$6$$} ${3.5 * -$dotSize$jscomp$6$$} v ${-2 * $dotSize$jscomp$6$$} a ${3.5 * $dotSize$jscomp$6$$} ${3.5 * $dotSize$jscomp$6$$}, 0, 0, 1, ${3.5 * $dotSize$jscomp$6$$} ${3.5 * -$dotSize$jscomp$6$$} z`);
391
416
  }
392
417
  });
393
418
  }
394
- drawDot({x, y, size, rotation}) {
419
+ drawDot({x: $x$jscomp$108$$, y: $y$jscomp$93$$, size: $size$jscomp$41$$, rotation: $rotation$jscomp$12$$}) {
395
420
  this.basicDot({
396
- x,
397
- y,
398
- size,
399
- rotation
421
+ x: $x$jscomp$108$$,
422
+ y: $y$jscomp$93$$,
423
+ size: $size$jscomp$41$$,
424
+ rotation: $rotation$jscomp$12$$
400
425
  });
401
426
  }
402
- drawSquare({x, y, size, rotation}) {
427
+ drawSquare({x: $x$jscomp$109$$, y: $y$jscomp$94$$, size: $size$jscomp$42$$, rotation: $rotation$jscomp$13$$}) {
403
428
  this.basicSquare({
404
- x,
405
- y,
406
- size,
407
- rotation
429
+ x: $x$jscomp$109$$,
430
+ y: $y$jscomp$94$$,
431
+ size: $size$jscomp$42$$,
432
+ rotation: $rotation$jscomp$13$$
408
433
  });
409
434
  }
410
- drawExtraRounded({x, y, size, rotation}) {
435
+ drawExtraRounded({x: $x$jscomp$110$$, y: $y$jscomp$95$$, size: $size$jscomp$43$$, rotation: $rotation$jscomp$14$$}) {
411
436
  this.basicExtraRounded({
412
- x,
413
- y,
414
- size,
415
- rotation
437
+ x: $x$jscomp$110$$,
438
+ y: $y$jscomp$95$$,
439
+ size: $size$jscomp$43$$,
440
+ rotation: $rotation$jscomp$14$$
416
441
  });
417
442
  }
418
- drawClassy({x, y, size, rotation}) {
443
+ drawClassy({x: $x$jscomp$111$$, y: $y$jscomp$96$$, size: $size$jscomp$44$$, rotation: $rotation$jscomp$15$$}) {
419
444
  this.basicClassy({
420
- x,
421
- y,
422
- size,
423
- rotation
445
+ x: $x$jscomp$111$$,
446
+ y: $y$jscomp$96$$,
447
+ size: $size$jscomp$44$$,
448
+ rotation: $rotation$jscomp$15$$
424
449
  });
425
450
  }
426
- drawInpoint({x, y, size, rotation}) {
451
+ drawInpoint({x: $x$jscomp$112$$, y: $y$jscomp$97$$, size: $size$jscomp$45$$, rotation: $rotation$jscomp$16$$}) {
427
452
  this.basicInpoint({
428
- x,
429
- y,
430
- size,
431
- rotation
453
+ x: $x$jscomp$112$$,
454
+ y: $y$jscomp$97$$,
455
+ size: $size$jscomp$45$$,
456
+ rotation: $rotation$jscomp$16$$
432
457
  });
433
458
  }
434
- drawOutpoint({x, y, size, rotation}) {
459
+ drawOutpoint({x: $x$jscomp$113$$, y: $y$jscomp$98$$, size: $size$jscomp$46$$, rotation: $rotation$jscomp$17$$}) {
435
460
  this.basicInpoint({
436
- x,
437
- y,
438
- size,
439
- rotation: (rotation || 0) + Math.PI
461
+ x: $x$jscomp$113$$,
462
+ y: $y$jscomp$98$$,
463
+ size: $size$jscomp$46$$,
464
+ rotation: ($rotation$jscomp$17$$ || 0) + Math.PI
440
465
  });
441
466
  }
442
467
  }
443
468
 
444
- class QRDot {
469
+ class $QRDot$$ {
445
470
  get element() {
446
471
  return this._element;
447
472
  }
448
- constructor(type, document) {
449
- this.type = type, this.document = document;
473
+ constructor($type$jscomp$154$$, $document$jscomp$4$$) {
474
+ this.type = $type$jscomp$154$$, this.document = $document$jscomp$4$$;
450
475
  }
451
- draw(args) {
452
- let drawFunction;
476
+ draw($args$jscomp$13$$) {
477
+ let $drawFunction$jscomp$2$$;
453
478
  switch (this.type) {
454
- case DotType.dot:
455
- drawFunction = this.drawDot;
479
+ case $DotType$$.dot:
480
+ $drawFunction$jscomp$2$$ = this.drawDot;
456
481
  break;
457
482
 
458
- case DotType.randomDot:
459
- drawFunction = this.drawRandomDot;
483
+ case $DotType$$.randomDot:
484
+ $drawFunction$jscomp$2$$ = this.drawRandomDot;
460
485
  break;
461
486
 
462
- case DotType.classy:
463
- drawFunction = this.drawClassy;
487
+ case $DotType$$.classy:
488
+ $drawFunction$jscomp$2$$ = this.drawClassy;
464
489
  break;
465
490
 
466
- case DotType.classyRounded:
467
- drawFunction = this.drawClassyRounded;
491
+ case $DotType$$.classyRounded:
492
+ $drawFunction$jscomp$2$$ = this.drawClassyRounded;
468
493
  break;
469
494
 
470
- case DotType.rounded:
471
- drawFunction = this.drawRounded;
495
+ case $DotType$$.rounded:
496
+ $drawFunction$jscomp$2$$ = this.drawRounded;
472
497
  break;
473
498
 
474
- case DotType.verticalLine:
475
- drawFunction = this.drawVerticalLine;
499
+ case $DotType$$.verticalLine:
500
+ $drawFunction$jscomp$2$$ = this.drawVerticalLine;
476
501
  break;
477
502
 
478
- case DotType.horizontalLine:
479
- drawFunction = this.drawHorizontalLine;
503
+ case $DotType$$.horizontalLine:
504
+ $drawFunction$jscomp$2$$ = this.drawHorizontalLine;
480
505
  break;
481
506
 
482
- case DotType.extraRounded:
483
- drawFunction = this.drawExtraRounded;
507
+ case $DotType$$.extraRounded:
508
+ $drawFunction$jscomp$2$$ = this.drawExtraRounded;
484
509
  break;
485
510
 
486
- case DotType.diamond:
487
- drawFunction = this.drawDiamond;
511
+ case $DotType$$.diamond:
512
+ $drawFunction$jscomp$2$$ = this.drawDiamond;
488
513
  break;
489
514
 
490
- case DotType.smallSquare:
491
- drawFunction = this.drawSmallSquare;
515
+ case $DotType$$.smallSquare:
516
+ $drawFunction$jscomp$2$$ = this.drawSmallSquare;
492
517
  break;
493
518
 
494
- case DotType.tinySquare:
495
- drawFunction = this.drawTinySquare;
519
+ case $DotType$$.tinySquare:
520
+ $drawFunction$jscomp$2$$ = this.drawTinySquare;
496
521
  break;
497
522
 
498
523
  default:
499
- drawFunction = this.drawSquare;
524
+ $drawFunction$jscomp$2$$ = this.drawSquare;
500
525
  }
501
- drawFunction.call(this, args);
526
+ $drawFunction$jscomp$2$$.call(this, $args$jscomp$13$$);
502
527
  }
503
- rotateFigure({x: cx, y: cy, size, rotation = 0, draw}) {
504
- cx += size / 2, cy += size / 2, draw(), this._element?.setAttribute("transform", `rotate(${numToAttr(180 * rotation / Math.PI)},${cx},${cy})`);
528
+ rotateFigure({x: $cx$jscomp$2_x$jscomp$114$$, y: $cy$jscomp$2_y$jscomp$99$$, size: $size$jscomp$47$$, rotation: $rotation$jscomp$18$$ = 0, draw: $draw$jscomp$2$$}) {
529
+ $cx$jscomp$2_x$jscomp$114$$ += $size$jscomp$47$$ / 2, $cy$jscomp$2_y$jscomp$99$$ += $size$jscomp$47$$ / 2,
530
+ $draw$jscomp$2$$(), this._element?.setAttribute("transform", `rotate(${$numToAttr$$(180 * $rotation$jscomp$18$$ / Math.PI)},${$cx$jscomp$2_x$jscomp$114$$},${$cy$jscomp$2_y$jscomp$99$$})`);
505
531
  }
506
- basicDot(args) {
507
- let {size, x, y} = args;
532
+ basicDot($args$jscomp$14$$) {
533
+ let {size: $size$jscomp$48$$, x: $x$jscomp$115$$, y: $y$jscomp$100$$} = $args$jscomp$14$$;
508
534
  this.rotateFigure({
509
- ...args,
535
+ ...$args$jscomp$14$$,
510
536
  draw: () => {
511
537
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "circle"),
512
- this._element.setAttribute("cx", numToAttr(x + size / 2)), this._element.setAttribute("cy", numToAttr(y + size / 2)),
513
- this._element.setAttribute("r", numToAttr(size / 2));
538
+ this._element.setAttribute("cx", $numToAttr$$($x$jscomp$115$$ + $size$jscomp$48$$ / 2)),
539
+ this._element.setAttribute("cy", $numToAttr$$($y$jscomp$100$$ + $size$jscomp$48$$ / 2)),
540
+ this._element.setAttribute("r", $numToAttr$$($size$jscomp$48$$ / 2));
514
541
  }
515
542
  });
516
543
  }
517
- basicSquare(args) {
518
- let {size, x, y} = args;
544
+ basicSquare($args$jscomp$15$$) {
545
+ let {size: $size$jscomp$49$$, x: $x$jscomp$116$$, y: $y$jscomp$101$$} = $args$jscomp$15$$;
519
546
  this.rotateFigure({
520
- ...args,
547
+ ...$args$jscomp$15$$,
521
548
  draw: () => {
522
549
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "rect"),
523
- this._element.setAttribute("x", numToAttr(x)), this._element.setAttribute("y", numToAttr(y)),
524
- this._element.setAttribute("width", numToAttr(size)), this._element.setAttribute("height", numToAttr(size));
550
+ this._element.setAttribute("x", $numToAttr$$($x$jscomp$116$$)), this._element.setAttribute("y", $numToAttr$$($y$jscomp$101$$)),
551
+ this._element.setAttribute("width", $numToAttr$$($size$jscomp$49$$)), this._element.setAttribute("height", $numToAttr$$($size$jscomp$49$$));
525
552
  }
526
553
  });
527
554
  }
528
- basicSideRounded(args) {
529
- let {size, x, y} = args;
555
+ basicSideRounded($args$jscomp$16$$) {
556
+ let {size: $size$jscomp$50$$, x: $x$jscomp$117$$, y: $y$jscomp$102$$} = $args$jscomp$16$$;
530
557
  this.rotateFigure({
531
- ...args,
558
+ ...$args$jscomp$16$$,
532
559
  draw: () => {
533
560
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
534
- this._element.setAttribute("d", svgPath`M ${x} ${y} v ${size} h ${size / 2} a ${size / 2} ${size / 2}, 0, 0, 0, 0 ${-size} z`);
561
+ this._element.setAttribute("d", $svgPath$$`M ${$x$jscomp$117$$} ${$y$jscomp$102$$} v ${$size$jscomp$50$$} h ${$size$jscomp$50$$ / 2} a ${$size$jscomp$50$$ / 2} ${$size$jscomp$50$$ / 2}, 0, 0, 0, 0 ${-$size$jscomp$50$$} z`);
535
562
  }
536
563
  });
537
564
  }
538
- basicCornerRounded(args) {
539
- let {size, x, y} = args;
565
+ basicCornerRounded($args$jscomp$17$$) {
566
+ let {size: $size$jscomp$51$$, x: $x$jscomp$118$$, y: $y$jscomp$103$$} = $args$jscomp$17$$;
540
567
  this.rotateFigure({
541
- ...args,
568
+ ...$args$jscomp$17$$,
542
569
  draw: () => {
543
570
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
544
- this._element.setAttribute("d", svgPath`M ${x} ${y} v ${size} h ${size} v ${-size / 2} a ${size / 2} ${size / 2}, 0, 0, 0, ${-size / 2} ${-size / 2} z`);
571
+ this._element.setAttribute("d", $svgPath$$`M ${$x$jscomp$118$$} ${$y$jscomp$103$$} v ${$size$jscomp$51$$} h ${$size$jscomp$51$$} v ${-$size$jscomp$51$$ / 2} a ${$size$jscomp$51$$ / 2} ${$size$jscomp$51$$ / 2}, 0, 0, 0, ${-$size$jscomp$51$$ / 2} ${-$size$jscomp$51$$ / 2} z`);
545
572
  }
546
573
  });
547
574
  }
548
- basicCornerExtraRounded(args) {
549
- let {size, x, y} = args;
575
+ basicCornerExtraRounded($args$jscomp$18$$) {
576
+ let {size: $size$jscomp$52$$, x: $x$jscomp$119$$, y: $y$jscomp$104$$} = $args$jscomp$18$$;
550
577
  this.rotateFigure({
551
- ...args,
578
+ ...$args$jscomp$18$$,
552
579
  draw: () => {
553
580
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
554
- this._element.setAttribute("d", svgPath`M ${x} ${y} v ${size} h ${size} a ${size} ${size}, 0, 0, 0, ${-size} ${-size} z`);
581
+ this._element.setAttribute("d", $svgPath$$`M ${$x$jscomp$119$$} ${$y$jscomp$104$$} v ${$size$jscomp$52$$} h ${$size$jscomp$52$$} a ${$size$jscomp$52$$} ${$size$jscomp$52$$}, 0, 0, 0, ${-$size$jscomp$52$$} ${-$size$jscomp$52$$} z`);
555
582
  }
556
583
  });
557
584
  }
558
- basicCornersRounded(args) {
559
- let {size, x, y} = args;
585
+ basicCornersRounded($args$jscomp$19$$) {
586
+ let {size: $size$jscomp$53$$, x: $x$jscomp$120$$, y: $y$jscomp$105$$} = $args$jscomp$19$$;
560
587
  this.rotateFigure({
561
- ...args,
588
+ ...$args$jscomp$19$$,
562
589
  draw: () => {
563
590
  this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "path"),
564
- this._element.setAttribute("d", svgPath`M ${x} ${y} v ${size / 2} a ${size / 2} ${size / 2}, 0, 0, 0, ${size / 2} ${size / 2} h ${size / 2} v ${-size / 2} a ${size / 2} ${size / 2}, 0, 0, 0, ${-size / 2} ${-size / 2} z`);
591
+ this._element.setAttribute("d", $svgPath$$`M ${$x$jscomp$120$$} ${$y$jscomp$105$$} v ${$size$jscomp$53$$ / 2} a ${$size$jscomp$53$$ / 2} ${$size$jscomp$53$$ / 2}, 0, 0, 0, ${$size$jscomp$53$$ / 2} ${$size$jscomp$53$$ / 2} h ${$size$jscomp$53$$ / 2} v ${-$size$jscomp$53$$ / 2} a ${$size$jscomp$53$$ / 2} ${$size$jscomp$53$$ / 2}, 0, 0, 0, ${-$size$jscomp$53$$ / 2} ${-$size$jscomp$53$$ / 2} z`);
565
592
  }
566
593
  });
567
594
  }
568
- drawDot({x, y, size}) {
595
+ drawDot({x: $x$jscomp$121$$, y: $y$jscomp$106$$, size: $size$jscomp$54$$}) {
569
596
  this.basicDot({
570
- x,
571
- y,
572
- size,
597
+ x: $x$jscomp$121$$,
598
+ y: $y$jscomp$106$$,
599
+ size: $size$jscomp$54$$,
573
600
  rotation: 0
574
601
  });
575
602
  }
576
- drawRandomDot({x, y, size}) {
603
+ drawRandomDot({x: $x$jscomp$122$$, y: $y$jscomp$107$$, size: $size$jscomp$55$$}) {
577
604
  this.basicDot({
578
- x,
579
- y,
580
- size: size * (.25 * Math.random() + .75),
605
+ x: $x$jscomp$122$$,
606
+ y: $y$jscomp$107$$,
607
+ size: $size$jscomp$55$$ * (.25 * Math.random() + .75),
581
608
  rotation: 0
582
609
  });
583
610
  }
584
- drawSquare({x, y, size}) {
611
+ drawSquare({x: $x$jscomp$123$$, y: $y$jscomp$108$$, size: $size$jscomp$56$$}) {
585
612
  this.basicSquare({
586
- x,
587
- y,
588
- size,
613
+ x: $x$jscomp$123$$,
614
+ y: $y$jscomp$108$$,
615
+ size: $size$jscomp$56$$,
589
616
  rotation: 0
590
617
  });
591
618
  }
592
- drawSmallSquare({x, y, size}) {
619
+ drawSmallSquare({x: $x$jscomp$124$$, y: $y$jscomp$109$$, size: $size$jscomp$57$$}) {
593
620
  this.basicSquare({
594
- x: x + .15 * size,
595
- y: y + .15 * size,
596
- size: .7 * size,
621
+ x: $x$jscomp$124$$ + .15 * $size$jscomp$57$$,
622
+ y: $y$jscomp$109$$ + .15 * $size$jscomp$57$$,
623
+ size: .7 * $size$jscomp$57$$,
597
624
  rotation: 0
598
625
  });
599
626
  }
600
- drawTinySquare({x, y, size}) {
627
+ drawTinySquare({x: $x$jscomp$125$$, y: $y$jscomp$110$$, size: $size$jscomp$58$$}) {
601
628
  this.basicSquare({
602
- x: x + .35 * size,
603
- y: y + .35 * size,
604
- size: .3 * size,
629
+ x: $x$jscomp$125$$ + .35 * $size$jscomp$58$$,
630
+ y: $y$jscomp$110$$ + .35 * $size$jscomp$58$$,
631
+ size: .3 * $size$jscomp$58$$,
605
632
  rotation: 0
606
633
  });
607
634
  }
608
- drawDiamond({x, y, size}) {
635
+ drawDiamond({x: $x$jscomp$126$$, y: $y$jscomp$111$$, size: $size$jscomp$59$$}) {
609
636
  this.basicSquare({
610
- x,
611
- y,
612
- size,
637
+ x: $x$jscomp$126$$,
638
+ y: $y$jscomp$111$$,
639
+ size: $size$jscomp$59$$,
613
640
  rotation: Math.PI / 4
614
641
  });
615
642
  }
616
- drawRounded({x, y, size, getNeighbor: bottomNeighbor_getNeighbor}) {
617
- var leftNeighbor_rotation = bottomNeighbor_getNeighbor ? +bottomNeighbor_getNeighbor(-1, 0) : 0;
618
- let rightNeighbor = bottomNeighbor_getNeighbor ? +bottomNeighbor_getNeighbor(1, 0) : 0, topNeighbor = bottomNeighbor_getNeighbor ? +bottomNeighbor_getNeighbor(0, -1) : 0;
619
- var neighborsCount_rotation = leftNeighbor_rotation + rightNeighbor + topNeighbor + (bottomNeighbor_getNeighbor = bottomNeighbor_getNeighbor ? +bottomNeighbor_getNeighbor(0, 1) : 0);
620
- 0 === neighborsCount_rotation ? this.basicDot({
621
- x,
622
- y,
623
- size,
643
+ drawRounded({x: $x$jscomp$127$$, y: $y$jscomp$112$$, size: $size$jscomp$60$$, getNeighbor: $bottomNeighbor_getNeighbor$$}) {
644
+ var $leftNeighbor_rotation$jscomp$20$$ = $bottomNeighbor_getNeighbor$$ ? +$bottomNeighbor_getNeighbor$$(-1, 0) : 0;
645
+ let $rightNeighbor$$ = $bottomNeighbor_getNeighbor$$ ? +$bottomNeighbor_getNeighbor$$(1, 0) : 0, $topNeighbor$$ = $bottomNeighbor_getNeighbor$$ ? +$bottomNeighbor_getNeighbor$$(0, -1) : 0;
646
+ var $neighborsCount_rotation$jscomp$19$$ = $leftNeighbor_rotation$jscomp$20$$ + $rightNeighbor$$ + $topNeighbor$$ + ($bottomNeighbor_getNeighbor$$ = $bottomNeighbor_getNeighbor$$ ? +$bottomNeighbor_getNeighbor$$(0, 1) : 0);
647
+ 0 === $neighborsCount_rotation$jscomp$19$$ ? this.basicDot({
648
+ x: $x$jscomp$127$$,
649
+ y: $y$jscomp$112$$,
650
+ size: $size$jscomp$60$$,
624
651
  rotation: 0
625
- }) : 2 < neighborsCount_rotation || leftNeighbor_rotation && rightNeighbor || topNeighbor && bottomNeighbor_getNeighbor ? this.basicSquare({
626
- x,
627
- y,
628
- size,
652
+ }) : 2 < $neighborsCount_rotation$jscomp$19$$ || $leftNeighbor_rotation$jscomp$20$$ && $rightNeighbor$$ || $topNeighbor$$ && $bottomNeighbor_getNeighbor$$ ? this.basicSquare({
653
+ x: $x$jscomp$127$$,
654
+ y: $y$jscomp$112$$,
655
+ size: $size$jscomp$60$$,
629
656
  rotation: 0
630
- }) : 2 === neighborsCount_rotation ? (neighborsCount_rotation = 0, leftNeighbor_rotation && topNeighbor ? neighborsCount_rotation = Math.PI / 2 : topNeighbor && rightNeighbor ? neighborsCount_rotation = Math.PI : rightNeighbor && bottomNeighbor_getNeighbor && (neighborsCount_rotation = -Math.PI / 2),
657
+ }) : 2 === $neighborsCount_rotation$jscomp$19$$ ? ($neighborsCount_rotation$jscomp$19$$ = 0,
658
+ $leftNeighbor_rotation$jscomp$20$$ && $topNeighbor$$ ? $neighborsCount_rotation$jscomp$19$$ = Math.PI / 2 : $topNeighbor$$ && $rightNeighbor$$ ? $neighborsCount_rotation$jscomp$19$$ = Math.PI : $rightNeighbor$$ && $bottomNeighbor_getNeighbor$$ && ($neighborsCount_rotation$jscomp$19$$ = -Math.PI / 2),
631
659
  this.basicCornerRounded({
632
- x,
633
- y,
634
- size,
635
- rotation: neighborsCount_rotation
636
- })) : 1 === neighborsCount_rotation && (leftNeighbor_rotation = 0, topNeighbor ? leftNeighbor_rotation = Math.PI / 2 : rightNeighbor ? leftNeighbor_rotation = Math.PI : bottomNeighbor_getNeighbor && (leftNeighbor_rotation = -Math.PI / 2),
660
+ x: $x$jscomp$127$$,
661
+ y: $y$jscomp$112$$,
662
+ size: $size$jscomp$60$$,
663
+ rotation: $neighborsCount_rotation$jscomp$19$$
664
+ })) : 1 === $neighborsCount_rotation$jscomp$19$$ && ($leftNeighbor_rotation$jscomp$20$$ = 0,
665
+ $topNeighbor$$ ? $leftNeighbor_rotation$jscomp$20$$ = Math.PI / 2 : $rightNeighbor$$ ? $leftNeighbor_rotation$jscomp$20$$ = Math.PI : $bottomNeighbor_getNeighbor$$ && ($leftNeighbor_rotation$jscomp$20$$ = -Math.PI / 2),
637
666
  this.basicSideRounded({
638
- x,
639
- y,
640
- size,
641
- rotation: leftNeighbor_rotation
667
+ x: $x$jscomp$127$$,
668
+ y: $y$jscomp$112$$,
669
+ size: $size$jscomp$60$$,
670
+ rotation: $leftNeighbor_rotation$jscomp$20$$
642
671
  }));
643
672
  }
644
- drawVerticalLine({x, y, size, getNeighbor: bottomNeighbor}) {
645
- let leftNeighbor = bottomNeighbor ? +bottomNeighbor(-1, 0) : 0, rightNeighbor = bottomNeighbor ? +bottomNeighbor(1, 0) : 0, topNeighbor = bottomNeighbor ? +bottomNeighbor(0, -1) : 0;
646
- 0 === leftNeighbor + rightNeighbor + topNeighbor + (bottomNeighbor = bottomNeighbor ? +bottomNeighbor(0, 1) : 0) || leftNeighbor && !topNeighbor && !bottomNeighbor || rightNeighbor && !topNeighbor && !bottomNeighbor ? this.basicDot({
647
- x,
648
- y,
649
- size,
673
+ drawVerticalLine({x: $x$jscomp$128$$, y: $y$jscomp$113$$, size: $size$jscomp$61$$, getNeighbor: $bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$}) {
674
+ let $leftNeighbor$jscomp$1$$ = $bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$ ? +$bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$(-1, 0) : 0, $rightNeighbor$jscomp$1$$ = $bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$ ? +$bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$(1, 0) : 0, $topNeighbor$jscomp$1$$ = $bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$ ? +$bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$(0, -1) : 0;
675
+ 0 === $leftNeighbor$jscomp$1$$ + $rightNeighbor$jscomp$1$$ + $topNeighbor$jscomp$1$$ + ($bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$ = $bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$ ? +$bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$(0, 1) : 0) || $leftNeighbor$jscomp$1$$ && !$topNeighbor$jscomp$1$$ && !$bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$ || $rightNeighbor$jscomp$1$$ && !$topNeighbor$jscomp$1$$ && !$bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$ ? this.basicDot({
676
+ x: $x$jscomp$128$$,
677
+ y: $y$jscomp$113$$,
678
+ size: $size$jscomp$61$$,
650
679
  rotation: 0
651
- }) : topNeighbor && bottomNeighbor ? this.basicSquare({
652
- x,
653
- y,
654
- size,
680
+ }) : $topNeighbor$jscomp$1$$ && $bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$ ? this.basicSquare({
681
+ x: $x$jscomp$128$$,
682
+ y: $y$jscomp$113$$,
683
+ size: $size$jscomp$61$$,
655
684
  rotation: 0
656
- }) : topNeighbor && !bottomNeighbor ? this.basicSideRounded({
657
- x,
658
- y,
659
- size,
685
+ }) : $topNeighbor$jscomp$1$$ && !$bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$ ? this.basicSideRounded({
686
+ x: $x$jscomp$128$$,
687
+ y: $y$jscomp$113$$,
688
+ size: $size$jscomp$61$$,
660
689
  rotation: Math.PI / 2
661
- }) : bottomNeighbor && !topNeighbor && this.basicSideRounded({
662
- x,
663
- y,
664
- size,
690
+ }) : $bottomNeighbor$jscomp$1_getNeighbor$jscomp$1$$ && !$topNeighbor$jscomp$1$$ && this.basicSideRounded({
691
+ x: $x$jscomp$128$$,
692
+ y: $y$jscomp$113$$,
693
+ size: $size$jscomp$61$$,
665
694
  rotation: -Math.PI / 2
666
695
  });
667
696
  }
668
- drawHorizontalLine({x, y, size, getNeighbor: bottomNeighbor}) {
669
- let leftNeighbor = bottomNeighbor ? +bottomNeighbor(-1, 0) : 0, rightNeighbor = bottomNeighbor ? +bottomNeighbor(1, 0) : 0, topNeighbor = bottomNeighbor ? +bottomNeighbor(0, -1) : 0;
670
- 0 === leftNeighbor + rightNeighbor + topNeighbor + (bottomNeighbor = bottomNeighbor ? +bottomNeighbor(0, 1) : 0) || topNeighbor && !leftNeighbor && !rightNeighbor || bottomNeighbor && !leftNeighbor && !rightNeighbor ? this.basicDot({
671
- x,
672
- y,
673
- size,
697
+ drawHorizontalLine({x: $x$jscomp$129$$, y: $y$jscomp$114$$, size: $size$jscomp$62$$, getNeighbor: $bottomNeighbor$jscomp$2_getNeighbor$jscomp$2$$}) {
698
+ let $leftNeighbor$jscomp$2$$ = $bottomNeighbor$jscomp$2_getNeighbor$jscomp$2$$ ? +$bottomNeighbor$jscomp$2_getNeighbor$jscomp$2$$(-1, 0) : 0, $rightNeighbor$jscomp$2$$ = $bottomNeighbor$jscomp$2_getNeighbor$jscomp$2$$ ? +$bottomNeighbor$jscomp$2_getNeighbor$jscomp$2$$(1, 0) : 0, $topNeighbor$jscomp$2$$ = $bottomNeighbor$jscomp$2_getNeighbor$jscomp$2$$ ? +$bottomNeighbor$jscomp$2_getNeighbor$jscomp$2$$(0, -1) : 0;
699
+ 0 === $leftNeighbor$jscomp$2$$ + $rightNeighbor$jscomp$2$$ + $topNeighbor$jscomp$2$$ + ($bottomNeighbor$jscomp$2_getNeighbor$jscomp$2$$ = $bottomNeighbor$jscomp$2_getNeighbor$jscomp$2$$ ? +$bottomNeighbor$jscomp$2_getNeighbor$jscomp$2$$(0, 1) : 0) || $topNeighbor$jscomp$2$$ && !$leftNeighbor$jscomp$2$$ && !$rightNeighbor$jscomp$2$$ || $bottomNeighbor$jscomp$2_getNeighbor$jscomp$2$$ && !$leftNeighbor$jscomp$2$$ && !$rightNeighbor$jscomp$2$$ ? this.basicDot({
700
+ x: $x$jscomp$129$$,
701
+ y: $y$jscomp$114$$,
702
+ size: $size$jscomp$62$$,
674
703
  rotation: 0
675
- }) : leftNeighbor && rightNeighbor ? this.basicSquare({
676
- x,
677
- y,
678
- size,
704
+ }) : $leftNeighbor$jscomp$2$$ && $rightNeighbor$jscomp$2$$ ? this.basicSquare({
705
+ x: $x$jscomp$129$$,
706
+ y: $y$jscomp$114$$,
707
+ size: $size$jscomp$62$$,
679
708
  rotation: 0
680
- }) : leftNeighbor && !rightNeighbor ? this.basicSideRounded({
681
- x,
682
- y,
683
- size,
709
+ }) : $leftNeighbor$jscomp$2$$ && !$rightNeighbor$jscomp$2$$ ? this.basicSideRounded({
710
+ x: $x$jscomp$129$$,
711
+ y: $y$jscomp$114$$,
712
+ size: $size$jscomp$62$$,
684
713
  rotation: 0
685
- }) : rightNeighbor && !leftNeighbor && this.basicSideRounded({
686
- x,
687
- y,
688
- size,
714
+ }) : $rightNeighbor$jscomp$2$$ && !$leftNeighbor$jscomp$2$$ && this.basicSideRounded({
715
+ x: $x$jscomp$129$$,
716
+ y: $y$jscomp$114$$,
717
+ size: $size$jscomp$62$$,
689
718
  rotation: Math.PI
690
719
  });
691
720
  }
692
- drawExtraRounded({x, y, size, getNeighbor: bottomNeighbor}) {
693
- var leftNeighbor = bottomNeighbor ? +bottomNeighbor(-1, 0) : 0;
694
- let rightNeighbor = bottomNeighbor ? +bottomNeighbor(1, 0) : 0, topNeighbor = bottomNeighbor ? +bottomNeighbor(0, -1) : 0;
695
- var neighborsCount = leftNeighbor + rightNeighbor + topNeighbor + (bottomNeighbor = bottomNeighbor ? +bottomNeighbor(0, 1) : 0);
696
- 0 === neighborsCount ? this.basicDot({
697
- x,
698
- y,
699
- size,
721
+ drawExtraRounded({x: $x$jscomp$130$$, y: $y$jscomp$115$$, size: $size$jscomp$63$$, getNeighbor: $bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$}) {
722
+ var $leftNeighbor$jscomp$3_rotation$jscomp$26$$ = $bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$ ? +$bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$(-1, 0) : 0;
723
+ let $rightNeighbor$jscomp$3$$ = $bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$ ? +$bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$(1, 0) : 0, $topNeighbor$jscomp$3$$ = $bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$ ? +$bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$(0, -1) : 0;
724
+ var $neighborsCount$jscomp$3_rotation$jscomp$25$$ = $leftNeighbor$jscomp$3_rotation$jscomp$26$$ + $rightNeighbor$jscomp$3$$ + $topNeighbor$jscomp$3$$ + ($bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$ = $bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$ ? +$bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$(0, 1) : 0);
725
+ 0 === $neighborsCount$jscomp$3_rotation$jscomp$25$$ ? this.basicDot({
726
+ x: $x$jscomp$130$$,
727
+ y: $y$jscomp$115$$,
728
+ size: $size$jscomp$63$$,
700
729
  rotation: 0
701
- }) : 2 < neighborsCount || leftNeighbor && rightNeighbor || topNeighbor && bottomNeighbor ? this.basicSquare({
702
- x,
703
- y,
704
- size,
730
+ }) : 2 < $neighborsCount$jscomp$3_rotation$jscomp$25$$ || $leftNeighbor$jscomp$3_rotation$jscomp$26$$ && $rightNeighbor$jscomp$3$$ || $topNeighbor$jscomp$3$$ && $bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$ ? this.basicSquare({
731
+ x: $x$jscomp$130$$,
732
+ y: $y$jscomp$115$$,
733
+ size: $size$jscomp$63$$,
705
734
  rotation: 0
706
- }) : 2 === neighborsCount ? (neighborsCount = 0, leftNeighbor && topNeighbor ? neighborsCount = Math.PI / 2 : topNeighbor && rightNeighbor ? neighborsCount = Math.PI : rightNeighbor && bottomNeighbor && (neighborsCount = -Math.PI / 2),
735
+ }) : 2 === $neighborsCount$jscomp$3_rotation$jscomp$25$$ ? ($neighborsCount$jscomp$3_rotation$jscomp$25$$ = 0,
736
+ $leftNeighbor$jscomp$3_rotation$jscomp$26$$ && $topNeighbor$jscomp$3$$ ? $neighborsCount$jscomp$3_rotation$jscomp$25$$ = Math.PI / 2 : $topNeighbor$jscomp$3$$ && $rightNeighbor$jscomp$3$$ ? $neighborsCount$jscomp$3_rotation$jscomp$25$$ = Math.PI : $rightNeighbor$jscomp$3$$ && $bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$ && ($neighborsCount$jscomp$3_rotation$jscomp$25$$ = -Math.PI / 2),
707
737
  this.basicCornerExtraRounded({
708
- x,
709
- y,
710
- size,
711
- rotation: neighborsCount
712
- })) : 1 === neighborsCount && (leftNeighbor = 0, topNeighbor ? leftNeighbor = Math.PI / 2 : rightNeighbor ? leftNeighbor = Math.PI : bottomNeighbor && (leftNeighbor = -Math.PI / 2),
738
+ x: $x$jscomp$130$$,
739
+ y: $y$jscomp$115$$,
740
+ size: $size$jscomp$63$$,
741
+ rotation: $neighborsCount$jscomp$3_rotation$jscomp$25$$
742
+ })) : 1 === $neighborsCount$jscomp$3_rotation$jscomp$25$$ && ($leftNeighbor$jscomp$3_rotation$jscomp$26$$ = 0,
743
+ $topNeighbor$jscomp$3$$ ? $leftNeighbor$jscomp$3_rotation$jscomp$26$$ = Math.PI / 2 : $rightNeighbor$jscomp$3$$ ? $leftNeighbor$jscomp$3_rotation$jscomp$26$$ = Math.PI : $bottomNeighbor$jscomp$3_getNeighbor$jscomp$3$$ && ($leftNeighbor$jscomp$3_rotation$jscomp$26$$ = -Math.PI / 2),
713
744
  this.basicSideRounded({
714
- x,
715
- y,
716
- size,
717
- rotation: leftNeighbor
745
+ x: $x$jscomp$130$$,
746
+ y: $y$jscomp$115$$,
747
+ size: $size$jscomp$63$$,
748
+ rotation: $leftNeighbor$jscomp$3_rotation$jscomp$26$$
718
749
  }));
719
750
  }
720
- drawClassy({x, y, size, getNeighbor: bottomNeighbor}) {
721
- let leftNeighbor = bottomNeighbor ? +bottomNeighbor(-1, 0) : 0, rightNeighbor = bottomNeighbor ? +bottomNeighbor(1, 0) : 0, topNeighbor = bottomNeighbor ? +bottomNeighbor(0, -1) : 0;
722
- 0 === leftNeighbor + rightNeighbor + topNeighbor + (bottomNeighbor = bottomNeighbor ? +bottomNeighbor(0, 1) : 0) ? this.basicCornersRounded({
723
- x,
724
- y,
725
- size,
751
+ drawClassy({x: $x$jscomp$131$$, y: $y$jscomp$116$$, size: $size$jscomp$64$$, getNeighbor: $bottomNeighbor$jscomp$4_getNeighbor$jscomp$4$$}) {
752
+ let $leftNeighbor$jscomp$4$$ = $bottomNeighbor$jscomp$4_getNeighbor$jscomp$4$$ ? +$bottomNeighbor$jscomp$4_getNeighbor$jscomp$4$$(-1, 0) : 0, $rightNeighbor$jscomp$4$$ = $bottomNeighbor$jscomp$4_getNeighbor$jscomp$4$$ ? +$bottomNeighbor$jscomp$4_getNeighbor$jscomp$4$$(1, 0) : 0, $topNeighbor$jscomp$4$$ = $bottomNeighbor$jscomp$4_getNeighbor$jscomp$4$$ ? +$bottomNeighbor$jscomp$4_getNeighbor$jscomp$4$$(0, -1) : 0;
753
+ 0 === $leftNeighbor$jscomp$4$$ + $rightNeighbor$jscomp$4$$ + $topNeighbor$jscomp$4$$ + ($bottomNeighbor$jscomp$4_getNeighbor$jscomp$4$$ = $bottomNeighbor$jscomp$4_getNeighbor$jscomp$4$$ ? +$bottomNeighbor$jscomp$4_getNeighbor$jscomp$4$$(0, 1) : 0) ? this.basicCornersRounded({
754
+ x: $x$jscomp$131$$,
755
+ y: $y$jscomp$116$$,
756
+ size: $size$jscomp$64$$,
726
757
  rotation: Math.PI / 2
727
- }) : leftNeighbor || topNeighbor ? rightNeighbor || bottomNeighbor ? this.basicSquare({
728
- x,
729
- y,
730
- size,
758
+ }) : $leftNeighbor$jscomp$4$$ || $topNeighbor$jscomp$4$$ ? $rightNeighbor$jscomp$4$$ || $bottomNeighbor$jscomp$4_getNeighbor$jscomp$4$$ ? this.basicSquare({
759
+ x: $x$jscomp$131$$,
760
+ y: $y$jscomp$116$$,
761
+ size: $size$jscomp$64$$,
731
762
  rotation: 0
732
763
  }) : this.basicCornerRounded({
733
- x,
734
- y,
735
- size,
764
+ x: $x$jscomp$131$$,
765
+ y: $y$jscomp$116$$,
766
+ size: $size$jscomp$64$$,
736
767
  rotation: Math.PI / 2
737
768
  }) : this.basicCornerRounded({
738
- x,
739
- y,
740
- size,
769
+ x: $x$jscomp$131$$,
770
+ y: $y$jscomp$116$$,
771
+ size: $size$jscomp$64$$,
741
772
  rotation: -Math.PI / 2
742
773
  });
743
774
  }
744
- drawClassyRounded({x, y, size, getNeighbor: bottomNeighbor}) {
745
- let leftNeighbor = bottomNeighbor ? +bottomNeighbor(-1, 0) : 0, rightNeighbor = bottomNeighbor ? +bottomNeighbor(1, 0) : 0, topNeighbor = bottomNeighbor ? +bottomNeighbor(0, -1) : 0;
746
- 0 === leftNeighbor + rightNeighbor + topNeighbor + (bottomNeighbor = bottomNeighbor ? +bottomNeighbor(0, 1) : 0) ? this.basicCornersRounded({
747
- x,
748
- y,
749
- size,
775
+ drawClassyRounded({x: $x$jscomp$132$$, y: $y$jscomp$117$$, size: $size$jscomp$65$$, getNeighbor: $bottomNeighbor$jscomp$5_getNeighbor$jscomp$5$$}) {
776
+ let $leftNeighbor$jscomp$5$$ = $bottomNeighbor$jscomp$5_getNeighbor$jscomp$5$$ ? +$bottomNeighbor$jscomp$5_getNeighbor$jscomp$5$$(-1, 0) : 0, $rightNeighbor$jscomp$5$$ = $bottomNeighbor$jscomp$5_getNeighbor$jscomp$5$$ ? +$bottomNeighbor$jscomp$5_getNeighbor$jscomp$5$$(1, 0) : 0, $topNeighbor$jscomp$5$$ = $bottomNeighbor$jscomp$5_getNeighbor$jscomp$5$$ ? +$bottomNeighbor$jscomp$5_getNeighbor$jscomp$5$$(0, -1) : 0;
777
+ 0 === $leftNeighbor$jscomp$5$$ + $rightNeighbor$jscomp$5$$ + $topNeighbor$jscomp$5$$ + ($bottomNeighbor$jscomp$5_getNeighbor$jscomp$5$$ = $bottomNeighbor$jscomp$5_getNeighbor$jscomp$5$$ ? +$bottomNeighbor$jscomp$5_getNeighbor$jscomp$5$$(0, 1) : 0) ? this.basicCornersRounded({
778
+ x: $x$jscomp$132$$,
779
+ y: $y$jscomp$117$$,
780
+ size: $size$jscomp$65$$,
750
781
  rotation: Math.PI / 2
751
- }) : leftNeighbor || topNeighbor ? rightNeighbor || bottomNeighbor ? this.basicSquare({
752
- x,
753
- y,
754
- size,
782
+ }) : $leftNeighbor$jscomp$5$$ || $topNeighbor$jscomp$5$$ ? $rightNeighbor$jscomp$5$$ || $bottomNeighbor$jscomp$5_getNeighbor$jscomp$5$$ ? this.basicSquare({
783
+ x: $x$jscomp$132$$,
784
+ y: $y$jscomp$117$$,
785
+ size: $size$jscomp$65$$,
755
786
  rotation: 0
756
787
  }) : this.basicCornerExtraRounded({
757
- x,
758
- y,
759
- size,
788
+ x: $x$jscomp$132$$,
789
+ y: $y$jscomp$117$$,
790
+ size: $size$jscomp$65$$,
760
791
  rotation: Math.PI / 2
761
792
  }) : this.basicCornerExtraRounded({
762
- x,
763
- y,
764
- size,
793
+ x: $x$jscomp$132$$,
794
+ y: $y$jscomp$117$$,
795
+ size: $size$jscomp$65$$,
765
796
  rotation: -Math.PI / 2
766
797
  });
767
798
  }
768
799
  }
769
800
 
770
- let browserImageTools = {
771
- toDataURL: url => "string" == typeof url && url.startsWith("data:") ? Promise.resolve(url) : new Promise(((resolve, reject) => {
772
- if ("string" == typeof url) {
773
- const xhr = new XMLHttpRequest;
774
- xhr.onload = function() {
775
- const reader = new FileReader;
776
- reader.onloadend = function() {
777
- resolve(reader.result);
778
- }, reader.readAsDataURL(xhr.response);
779
- }, xhr.onerror = xhr.onabort = xhr.ontimeout = reject, xhr.open("GET", url, !0),
780
- xhr.responseType = "blob", xhr.send();
801
+ let $browserImageTools$$ = {
802
+ toDataURL: $url$jscomp$22$$ => "string" == typeof $url$jscomp$22$$ && $url$jscomp$22$$.startsWith("data:") ? Promise.resolve($url$jscomp$22$$) : new Promise((($resolve$$, $reject$$) => {
803
+ if ("string" == typeof $url$jscomp$22$$) {
804
+ const $xhr$$ = new XMLHttpRequest;
805
+ $xhr$$.onload = function() {
806
+ const $reader$$ = new FileReader;
807
+ $reader$$.onloadend = function() {
808
+ $resolve$$($reader$$.result);
809
+ }, $reader$$.readAsDataURL($xhr$$.response);
810
+ }, $xhr$$.onerror = $xhr$$.onabort = $xhr$$.ontimeout = $reject$$, $xhr$$.open("GET", $url$jscomp$22$$, !0),
811
+ $xhr$$.responseType = "blob", $xhr$$.send();
781
812
  } else {
782
- const reader = new FileReader;
783
- reader.onloadend = function() {
784
- resolve(reader.result);
785
- }, reader.readAsDataURL(url);
813
+ const $reader$jscomp$1$$ = new FileReader;
814
+ $reader$jscomp$1$$.onloadend = function() {
815
+ $resolve$$($reader$jscomp$1$$.result);
816
+ }, $reader$jscomp$1$$.readAsDataURL($url$jscomp$22$$);
786
817
  }
787
818
  })),
788
- getSize: (src, crossOrigin) => new Promise(((resolve, reject) => {
789
- const image = new Image;
790
- "string" === crossOrigin && (image.crossOrigin = crossOrigin), image.onload = () => {
791
- resolve({
792
- width: image.width,
793
- height: image.height
819
+ getSize: ($src$jscomp$4$$, $crossOrigin$$) => new Promise((($resolve$jscomp$1$$, $reject$jscomp$1$$) => {
820
+ const $image$jscomp$3$$ = new Image;
821
+ "string" === $crossOrigin$$ && ($image$jscomp$3$$.crossOrigin = $crossOrigin$$),
822
+ $image$jscomp$3$$.onload = () => {
823
+ $resolve$jscomp$1$$({
824
+ width: $image$jscomp$3$$.width,
825
+ height: $image$jscomp$3$$.height
794
826
  });
795
- }, image.onerror = image.onabort = reject, "string" == typeof src ? image.src = src : browserImageTools.toDataURL(src).then((url => image.src = url)).catch(reject);
827
+ }, $image$jscomp$3$$.onerror = $image$jscomp$3$$.onabort = $reject$jscomp$1$$, "string" == typeof $src$jscomp$4$$ ? $image$jscomp$3$$.src = $src$jscomp$4$$ : $browserImageTools$$.toDataURL($src$jscomp$4$$).then(($url$jscomp$23$$ => $image$jscomp$3$$.src = $url$jscomp$23$$)).catch($reject$jscomp$1$$);
796
828
  }))
797
829
  };
798
830
 
799
- let squareMask = [ [ 1, 1, 1, 1, 1, 1, 1 ], [ 1, 0, 0, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 0, 0, 1 ], [ 1, 1, 1, 1, 1, 1, 1 ] ], dotMask = [ [ 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 1, 1, 1, 0, 0 ], [ 0, 0, 1, 1, 1, 0, 0 ], [ 0, 0, 1, 1, 1, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0 ] ];
831
+ let $squareMask$$ = [ [ 1, 1, 1, 1, 1, 1, 1 ], [ 1, 0, 0, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 0, 0, 1 ], [ 1, 1, 1, 1, 1, 1, 1 ] ], $dotMask$$ = [ [ 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 1, 1, 1, 0, 0 ], [ 0, 0, 1, 1, 1, 0, 0 ], [ 0, 0, 1, 1, 1, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0 ] ];
800
832
 
801
- class QRSVG {
833
+ class $QRSVG$$ {
802
834
  get element() {
803
835
  return this._element;
804
836
  }
805
- constructor(options) {
806
- this.options = options, this.document = options.document, this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "svg");
807
- let width = numToAttr(options.width), height = numToAttr(options.height);
808
- this._element.setAttribute("width", width), this._element.setAttribute("height", height),
809
- this._element.setAttribute("viewBox", `0 0 ${width} ${height}`), this.defs = this.document.createElementNS("http://www.w3.org/2000/svg", "defs"),
810
- this._element.appendChild(this.defs), this.imageTools = options.imageTools || browserImageTools;
837
+ constructor($options$jscomp$35$$) {
838
+ this.options = $options$jscomp$35$$, this.document = $options$jscomp$35$$.document,
839
+ this._element = this.document.createElementNS("http://www.w3.org/2000/svg", "svg");
840
+ let $width$jscomp$28$$ = $numToAttr$$($options$jscomp$35$$.width), $height$jscomp$25$$ = $numToAttr$$($options$jscomp$35$$.height);
841
+ this._element.setAttribute("width", $width$jscomp$28$$), this._element.setAttribute("height", $height$jscomp$25$$),
842
+ this._element.setAttribute("viewBox", `0 0 ${$width$jscomp$28$$} ${$height$jscomp$25$$}`),
843
+ this.defs = this.document.createElementNS("http://www.w3.org/2000/svg", "defs"),
844
+ this._element.appendChild(this.defs), this.imageTools = $options$jscomp$35$$.imageTools || $browserImageTools$$;
811
845
  }
812
846
  get width() {
813
847
  return this.options.width;
@@ -815,341 +849,362 @@ class QRSVG {
815
849
  get height() {
816
850
  return this.options.height;
817
851
  }
818
- async drawQR(qr_size) {
819
- let count = qr_size.getModuleCount();
820
- var alignment_maxWidth_typeNumber = parseInt(((count - 17) / 4).toFixed(0), 10);
821
- let dotSize = this.options.dotsOptions.size, drawImageSize = {
852
+ async drawQR($qr_size$jscomp$68$$) {
853
+ let $count$jscomp$39$$ = $qr_size$jscomp$68$$.getModuleCount();
854
+ var $alignment_maxWidth_typeNumber$$ = parseInt((($count$jscomp$39$$ - 17) / 4).toFixed(0), 10);
855
+ let $dotSize$jscomp$8$$ = this.options.dotsOptions.size, $drawImageSize$$ = {
822
856
  hideXDots: 0,
823
857
  hideYDots: 0,
824
858
  width: 0,
825
859
  height: 0
826
860
  };
827
- if (this.qr = qr_size, this.options.image) {
828
- qr_size = await this.imageTools.getSize(this.options.image, this.options.imageOptions.crossOrigin);
829
- let {imageOptions, errorCorrectionPercent} = this.options;
830
- if (imageOptions.mode == ImageMode.background) {
831
- var coverLevel_margin = this.options.backgroundOptions && this.options.backgroundOptions.margin || 0;
832
- alignment_maxWidth_typeNumber = (this.options.width - 2 * coverLevel_margin * dotSize) * imageOptions.imageSize,
833
- coverLevel_margin = (this.options.height - 2 * coverLevel_margin * dotSize) * imageOptions.imageSize;
834
- let {width, height} = qr_size;
835
- height = height / width * alignment_maxWidth_typeNumber, width = alignment_maxWidth_typeNumber,
836
- height > coverLevel_margin && (width = width / height * coverLevel_margin, height = coverLevel_margin),
837
- drawImageSize = {
861
+ if (this.qr = $qr_size$jscomp$68$$, this.options.image) {
862
+ $qr_size$jscomp$68$$ = await this.imageTools.getSize(this.options.image, this.options.imageOptions.crossOrigin);
863
+ let {imageOptions: $imageOptions$$, errorCorrectionPercent: $errorCorrectionPercent$$} = this.options;
864
+ if ($imageOptions$$.mode == $ImageMode$$.background) {
865
+ var $coverLevel_margin$jscomp$1_maxHeight$$ = this.options.backgroundOptions && this.options.backgroundOptions.margin || 0;
866
+ $alignment_maxWidth_typeNumber$$ = (this.options.width - 2 * $coverLevel_margin$jscomp$1_maxHeight$$ * $dotSize$jscomp$8$$) * $imageOptions$$.imageSize,
867
+ $coverLevel_margin$jscomp$1_maxHeight$$ = (this.options.height - 2 * $coverLevel_margin$jscomp$1_maxHeight$$ * $dotSize$jscomp$8$$) * $imageOptions$$.imageSize;
868
+ let {width: $width$jscomp$29$$, height: $height$jscomp$26$$} = $qr_size$jscomp$68$$;
869
+ $height$jscomp$26$$ = $height$jscomp$26$$ / $width$jscomp$29$$ * $alignment_maxWidth_typeNumber$$,
870
+ $width$jscomp$29$$ = $alignment_maxWidth_typeNumber$$, $height$jscomp$26$$ > $coverLevel_margin$jscomp$1_maxHeight$$ && ($width$jscomp$29$$ = $width$jscomp$29$$ / $height$jscomp$26$$ * $coverLevel_margin$jscomp$1_maxHeight$$,
871
+ $height$jscomp$26$$ = $coverLevel_margin$jscomp$1_maxHeight$$), $drawImageSize$$ = {
838
872
  hideXDots: 0,
839
873
  hideYDots: 0,
840
- width,
841
- height
874
+ width: $width$jscomp$29$$,
875
+ height: $height$jscomp$26$$
842
876
  };
843
- } else coverLevel_margin = imageOptions.imageSize * errorCorrectionPercent, alignment_maxWidth_typeNumber = QRUtil.getPatternPosition(alignment_maxWidth_typeNumber),
844
- drawImageSize = function({originalHeight, originalWidth, maxHiddenDots: JSCompiler_object_inline_x_16_hideMax_maxHiddenDots, maxHiddenAxisDots: JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper, dotSize, margin}) {
845
- if (0 >= originalHeight || 0 >= originalWidth || 0 >= JSCompiler_object_inline_x_16_hideMax_maxHiddenDots || 0 >= dotSize || 4 * margin ** 2 > JSCompiler_object_inline_x_16_hideMax_maxHiddenDots) return {
877
+ } else $coverLevel_margin$jscomp$1_maxHeight$$ = $imageOptions$$.imageSize * $errorCorrectionPercent$$,
878
+ $alignment_maxWidth_typeNumber$$ = QRUtil.getPatternPosition($alignment_maxWidth_typeNumber$$),
879
+ $drawImageSize$$ = function({originalHeight: $originalHeight$$, originalWidth: $originalWidth$$, maxHiddenDots: $JSCompiler_object_inline_x_16_hideMax_maxHiddenDots$$, maxHiddenAxisDots: $JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$, dotSize: $dotSize$jscomp$7$$, margin: $margin$$}) {
880
+ if (0 >= $originalHeight$$ || 0 >= $originalWidth$$ || 0 >= $JSCompiler_object_inline_x_16_hideMax_maxHiddenDots$$ || 0 >= $dotSize$jscomp$7$$ || 4 * $margin$$ ** 2 > $JSCompiler_object_inline_x_16_hideMax_maxHiddenDots$$) return {
846
881
  height: 0,
847
882
  width: 0,
848
883
  hideYDots: 0,
849
884
  hideXDots: 0
850
885
  };
851
- JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper && 0 == JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper % 2 && (JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper = Math.max(1, JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper - 1));
852
- var JSCompiler_object_inline_x_14_dimMax = Math.max(originalWidth, originalHeight), JSCompiler_object_inline_y_15_dimMin_hideMin = Math.min(originalWidth, originalHeight), lower_maxH_size = 0;
853
- JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper = (JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper || JSCompiler_object_inline_x_16_hideMax_maxHiddenDots) - 2 * margin;
886
+ $JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ && 0 == $JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ % 2 && ($JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ = Math.max(1, $JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ - 1));
887
+ var $JSCompiler_object_inline_x_14_dimMax$$ = Math.max($originalWidth$$, $originalHeight$$), $JSCompiler_object_inline_y_15_dimMin_hideMin$$ = Math.min($originalWidth$$, $originalHeight$$), $lower_maxH_size$jscomp$66$$ = 0;
888
+ $JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ = ($JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ || $JSCompiler_object_inline_x_16_hideMax_maxHiddenDots$$) - 2 * $margin$$;
854
889
  do {
855
- let size = lower_maxH_size + (JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper - lower_maxH_size) / 2, dotsMax = Math.max(1, Math.ceil(size + 2 * margin));
856
- 0 == dotsMax % 2 && dotsMax++;
857
- let dotsMin = Math.max(1, Math.ceil(size * JSCompiler_object_inline_y_15_dimMin_hideMin / JSCompiler_object_inline_x_14_dimMax + 2 * margin));
858
- 0 == dotsMin % 2 && dotsMin++, dotsMax * dotsMin > JSCompiler_object_inline_x_16_hideMax_maxHiddenDots ? JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper = size : lower_maxH_size = size;
859
- } while (.001 < Math.abs(lower_maxH_size - JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper));
860
- return 0 == (JSCompiler_object_inline_x_16_hideMax_maxHiddenDots = Math.max(1, Math.ceil(lower_maxH_size + 2 * margin))) % 2 && JSCompiler_object_inline_x_16_hideMax_maxHiddenDots++,
861
- 0 == (JSCompiler_object_inline_y_15_dimMin_hideMin = Math.max(1, Math.ceil(lower_maxH_size * JSCompiler_object_inline_y_15_dimMin_hideMin / JSCompiler_object_inline_x_14_dimMax + 2 * margin))) % 2 && JSCompiler_object_inline_y_15_dimMin_hideMin++,
862
- originalWidth > originalHeight ? JSCompiler_object_inline_x_14_dimMax = JSCompiler_object_inline_x_16_hideMax_maxHiddenDots : (JSCompiler_object_inline_x_14_dimMax = JSCompiler_object_inline_y_15_dimMin_hideMin,
863
- JSCompiler_object_inline_y_15_dimMin_hideMin = JSCompiler_object_inline_x_16_hideMax_maxHiddenDots),
864
- JSCompiler_object_inline_x_16_hideMax_maxHiddenDots = JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper = (JSCompiler_object_inline_x_14_dimMax - 2 * margin) * dotSize,
865
- (JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper = JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper * originalHeight / originalWidth) > (lower_maxH_size = (JSCompiler_object_inline_y_15_dimMin_hideMin - 2 * margin) * dotSize) && (JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper = lower_maxH_size,
866
- JSCompiler_object_inline_x_16_hideMax_maxHiddenDots = lower_maxH_size * originalWidth / originalHeight),
890
+ let $size$jscomp$67$$ = $lower_maxH_size$jscomp$66$$ + ($JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ - $lower_maxH_size$jscomp$66$$) / 2, $dotsMax$$ = Math.max(1, Math.ceil($size$jscomp$67$$ + 2 * $margin$$));
891
+ 0 == $dotsMax$$ % 2 && $dotsMax$$++;
892
+ let $dotsMin$$ = Math.max(1, Math.ceil($size$jscomp$67$$ * $JSCompiler_object_inline_y_15_dimMin_hideMin$$ / $JSCompiler_object_inline_x_14_dimMax$$ + 2 * $margin$$));
893
+ 0 == $dotsMin$$ % 2 && $dotsMin$$++, $dotsMax$$ * $dotsMin$$ > $JSCompiler_object_inline_x_16_hideMax_maxHiddenDots$$ ? $JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ = $size$jscomp$67$$ : $lower_maxH_size$jscomp$66$$ = $size$jscomp$67$$;
894
+ } while (.001 < Math.abs($lower_maxH_size$jscomp$66$$ - $JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$));
895
+ return 0 == ($JSCompiler_object_inline_x_16_hideMax_maxHiddenDots$$ = Math.max(1, Math.ceil($lower_maxH_size$jscomp$66$$ + 2 * $margin$$))) % 2 && $JSCompiler_object_inline_x_16_hideMax_maxHiddenDots$$++,
896
+ 0 == ($JSCompiler_object_inline_y_15_dimMin_hideMin$$ = Math.max(1, Math.ceil($lower_maxH_size$jscomp$66$$ * $JSCompiler_object_inline_y_15_dimMin_hideMin$$ / $JSCompiler_object_inline_x_14_dimMax$$ + 2 * $margin$$))) % 2 && $JSCompiler_object_inline_y_15_dimMin_hideMin$$++,
897
+ $originalWidth$$ > $originalHeight$$ ? $JSCompiler_object_inline_x_14_dimMax$$ = $JSCompiler_object_inline_x_16_hideMax_maxHiddenDots$$ : ($JSCompiler_object_inline_x_14_dimMax$$ = $JSCompiler_object_inline_y_15_dimMin_hideMin$$,
898
+ $JSCompiler_object_inline_y_15_dimMin_hideMin$$ = $JSCompiler_object_inline_x_16_hideMax_maxHiddenDots$$),
899
+ $JSCompiler_object_inline_x_16_hideMax_maxHiddenDots$$ = $JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ = ($JSCompiler_object_inline_x_14_dimMax$$ - 2 * $margin$$) * $dotSize$jscomp$7$$,
900
+ ($JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ = $JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ * $originalHeight$$ / $originalWidth$$) > ($lower_maxH_size$jscomp$66$$ = ($JSCompiler_object_inline_y_15_dimMin_hideMin$$ - 2 * $margin$$) * $dotSize$jscomp$7$$) && ($JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ = $lower_maxH_size$jscomp$66$$,
901
+ $JSCompiler_object_inline_x_16_hideMax_maxHiddenDots$$ = $lower_maxH_size$jscomp$66$$ * $originalWidth$$ / $originalHeight$$),
867
902
  {
868
- height: Math.round(JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper + 2 * margin * dotSize),
869
- width: Math.round(JSCompiler_object_inline_x_16_hideMax_maxHiddenDots + 2 * margin * dotSize),
870
- hideYDots: JSCompiler_object_inline_y_15_dimMin_hideMin,
871
- hideXDots: JSCompiler_object_inline_x_14_dimMax
903
+ height: Math.round($JSCompiler_object_inline_y_17_maxHiddenAxisDots_maxW_upper$$ + 2 * $margin$$ * $dotSize$jscomp$7$$),
904
+ width: Math.round($JSCompiler_object_inline_x_16_hideMax_maxHiddenDots$$ + 2 * $margin$$ * $dotSize$jscomp$7$$),
905
+ hideYDots: $JSCompiler_object_inline_y_15_dimMin_hideMin$$,
906
+ hideXDots: $JSCompiler_object_inline_x_14_dimMax$$
872
907
  };
873
908
  }({
874
- originalWidth: qr_size.width,
875
- originalHeight: qr_size.height,
876
- maxHiddenDots: Math.floor(coverLevel_margin * (count * count - 192 - 2 * (count - 16) - 25 * alignment_maxWidth_typeNumber.length ** 2)),
877
- maxHiddenAxisDots: count - 14,
878
- dotSize,
879
- margin: imageOptions.margin
909
+ originalWidth: $qr_size$jscomp$68$$.width,
910
+ originalHeight: $qr_size$jscomp$68$$.height,
911
+ maxHiddenDots: Math.floor($coverLevel_margin$jscomp$1_maxHeight$$ * ($count$jscomp$39$$ * $count$jscomp$39$$ - 192 - 2 * ($count$jscomp$39$$ - 16) - 25 * $alignment_maxWidth_typeNumber$$.length ** 2)),
912
+ maxHiddenAxisDots: $count$jscomp$39$$ - 14,
913
+ dotSize: $dotSize$jscomp$8$$,
914
+ margin: $imageOptions$$.margin
880
915
  });
881
916
  }
882
- this.drawBackground(), this.options.imageOptions.mode != ImageMode.overlay && this.options.image && 0 < drawImageSize.width && 0 < drawImageSize.height && await this.drawImage({
883
- width: drawImageSize.width,
884
- height: drawImageSize.height,
885
- count,
886
- dotSize
887
- }), this.drawDots(((i, j) => !(this.options.imageOptions.mode == ImageMode.center && i >= (count - drawImageSize.hideXDots) / 2 && i < (count + drawImageSize.hideXDots) / 2 && j >= (count - drawImageSize.hideYDots) / 2 && j < (count + drawImageSize.hideYDots) / 2 || 8 > i && 8 > j || i >= count - 8 && 8 > j || j >= count - 8 && 8 > i))),
888
- this.options.imageOptions.mode == ImageMode.overlay && this.options.image && 0 < drawImageSize.width && 0 < drawImageSize.height && await this.drawImage({
889
- width: drawImageSize.width,
890
- height: drawImageSize.height,
891
- count,
892
- dotSize
917
+ this.drawBackground(), this.options.imageOptions.mode != $ImageMode$$.overlay && this.options.image && 0 < $drawImageSize$$.width && 0 < $drawImageSize$$.height && await this.drawImage({
918
+ width: $drawImageSize$$.width,
919
+ height: $drawImageSize$$.height,
920
+ count: $count$jscomp$39$$,
921
+ dotSize: $dotSize$jscomp$8$$
922
+ }), this.drawDots((($i$jscomp$5$$, $j$$) => !(this.options.imageOptions.mode == $ImageMode$$.center && $i$jscomp$5$$ >= ($count$jscomp$39$$ - $drawImageSize$$.hideXDots) / 2 && $i$jscomp$5$$ < ($count$jscomp$39$$ + $drawImageSize$$.hideXDots) / 2 && $j$$ >= ($count$jscomp$39$$ - $drawImageSize$$.hideYDots) / 2 && $j$$ < ($count$jscomp$39$$ + $drawImageSize$$.hideYDots) / 2 || 8 > $i$jscomp$5$$ && 8 > $j$$ || $i$jscomp$5$$ >= $count$jscomp$39$$ - 8 && 8 > $j$$ || $j$$ >= $count$jscomp$39$$ - 8 && 8 > $i$jscomp$5$$))),
923
+ this.options.imageOptions.mode == $ImageMode$$.overlay && this.options.image && 0 < $drawImageSize$$.width && 0 < $drawImageSize$$.height && await this.drawImage({
924
+ width: $drawImageSize$$.width,
925
+ height: $drawImageSize$$.height,
926
+ count: $count$jscomp$39$$,
927
+ dotSize: $dotSize$jscomp$8$$
893
928
  }), this.drawCorners();
894
929
  }
895
930
  drawBackground() {
896
- let options = this.options;
897
- if (this._element && options.backgroundOptions) {
931
+ let $options$jscomp$36$$ = this.options;
932
+ if (this._element && $options$jscomp$36$$.backgroundOptions) {
898
933
  this.createColor({
899
- options: options.backgroundOptions.gradient,
900
- color: options.backgroundOptions.color,
934
+ options: $options$jscomp$36$$.backgroundOptions.gradient,
935
+ color: $options$jscomp$36$$.backgroundOptions.color,
901
936
  additionalRotation: 0,
902
937
  x: 0,
903
938
  y: 0,
904
- height: options.height,
905
- width: options.width,
939
+ height: $options$jscomp$36$$.height,
940
+ width: $options$jscomp$36$$.width,
906
941
  name: "background-color"
907
942
  });
908
- let size = Math.min(options.width, options.height), element = this.document.createElementNS("http://www.w3.org/2000/svg", "rect");
943
+ let $size$jscomp$69$$ = Math.min($options$jscomp$36$$.width, $options$jscomp$36$$.height), $element$jscomp$9$$ = this.document.createElementNS("http://www.w3.org/2000/svg", "rect");
909
944
  [this.backgroundMask, this.backgroundMaskGroup] = this.createMask("mask-background-color"),
910
- this.defs.appendChild(this.backgroundMask), element.setAttribute("x", numToAttr((options.width - size) / 2)),
911
- element.setAttribute("y", numToAttr((options.height - size) / 2)), element.setAttribute("width", numToAttr(size)),
912
- element.setAttribute("height", numToAttr(size)), element.setAttribute("rx", numToAttr(size / 2 * (options.backgroundOptions.round || 0))),
913
- this.backgroundMaskGroup.appendChild(element);
945
+ this.defs.appendChild(this.backgroundMask), $element$jscomp$9$$.setAttribute("x", $numToAttr$$(($options$jscomp$36$$.width - $size$jscomp$69$$) / 2)),
946
+ $element$jscomp$9$$.setAttribute("y", $numToAttr$$(($options$jscomp$36$$.height - $size$jscomp$69$$) / 2)),
947
+ $element$jscomp$9$$.setAttribute("width", $numToAttr$$($size$jscomp$69$$)), $element$jscomp$9$$.setAttribute("height", $numToAttr$$($size$jscomp$69$$)),
948
+ $element$jscomp$9$$.setAttribute("rx", $numToAttr$$($size$jscomp$69$$ / 2 * ($options$jscomp$36$$.backgroundOptions.round || 0))),
949
+ this.backgroundMaskGroup.appendChild($element$jscomp$9$$);
914
950
  }
915
951
  }
916
- drawDots(alignment) {
952
+ drawDots($alignment$jscomp$1_filter$jscomp$3$$) {
917
953
  if (!this.qr) throw "QR code is not defined";
918
- let options = this.options;
919
- var count = this.qr.getModuleCount();
920
- if (count > options.width || count > options.height) throw "The canvas is too small.";
921
- let dotSize = this.options.dotsOptions.size;
922
- var minSize_xFakeBeginning = Math.min(options.width, options.height);
923
- options.imageOptions.mode == ImageMode.background && (minSize_xFakeBeginning -= 2 * dotSize * (options.imageOptions.margin || 0));
924
- var colorCount_xBeginning = Math.floor((options.width - count * dotSize) / 2), yBeginning_yFakeBeginning = Math.floor((options.height - count * dotSize) / 2);
925
- let dot = new QRDot(options.dotsOptions.type, this.document), overlayDot = new QRDot(DotType.tinySquare, this.document), markerDot = new QRDot(DotType.square, this.document);
954
+ let $options$jscomp$37$$ = this.options;
955
+ var $count$jscomp$40_iAlign$$ = this.qr.getModuleCount();
956
+ if ($count$jscomp$40_iAlign$$ > $options$jscomp$37$$.width || $count$jscomp$40_iAlign$$ > $options$jscomp$37$$.height) throw "The canvas is too small.";
957
+ let $dotSize$jscomp$9$$ = this.options.dotsOptions.size;
958
+ var $minSize_xFakeBeginning$$ = Math.min($options$jscomp$37$$.width, $options$jscomp$37$$.height);
959
+ $options$jscomp$37$$.imageOptions.mode == $ImageMode$$.background && ($minSize_xFakeBeginning$$ -= 2 * $dotSize$jscomp$9$$ * ($options$jscomp$37$$.imageOptions.margin || 0));
960
+ var $colorCount_xBeginning$$ = Math.floor(($options$jscomp$37$$.width - $count$jscomp$40_iAlign$$ * $dotSize$jscomp$9$$) / 2), $yBeginning_yFakeBeginning$$ = Math.floor(($options$jscomp$37$$.height - $count$jscomp$40_iAlign$$ * $dotSize$jscomp$9$$) / 2);
961
+ let $dot$$ = new $QRDot$$($options$jscomp$37$$.dotsOptions.type, this.document), $overlayDot$$ = new $QRDot$$($DotType$$.tinySquare, this.document), $markerDot$$ = new $QRDot$$($DotType$$.square, this.document);
926
962
  [this.dotsMask, this.dotsMaskGroup] = this.createMask("mask-dot-color"), this.defs.appendChild(this.dotsMask),
927
- options.imageOptions.mode == ImageMode.background && ([this.lightDotsMask, this.lightDotsMaskGroup] = this.createMask("mask-light-dot-color"),
963
+ $options$jscomp$37$$.imageOptions.mode == $ImageMode$$.background && ([this.lightDotsMask, this.lightDotsMaskGroup] = this.createMask("mask-light-dot-color"),
928
964
  this.defs.appendChild(this.lightDotsMask));
929
- var fakeCount_margin = 0;
930
- let additionalDots = 0;
931
- fakeCount_margin = count, options.shape === ShapeType.circle ? (fakeCount_margin = this.options.backgroundOptions && this.options.backgroundOptions.margin || 0,
932
- additionalDots = Math.floor((minSize_xFakeBeginning / dotSize - count - 2 * fakeCount_margin) / 2),
933
- fakeCount_margin = count + 2 * additionalDots) : options.imageOptions.mode == ImageMode.background && (additionalDots = 1,
934
- fakeCount_margin = count + 2 * additionalDots), minSize_xFakeBeginning = colorCount_xBeginning - additionalDots * dotSize,
935
- yBeginning_yFakeBeginning -= additionalDots * dotSize, colorCount_xBeginning = count + 2 * additionalDots;
936
- let fakeMatrix = Array(fakeCount_margin);
937
- var center_jAlign = Math.floor(fakeCount_margin / 2);
938
- for (let i = 0; i < fakeCount_margin; i++) {
939
- fakeMatrix[i] = Array(fakeCount_margin);
940
- for (let j = 0; j < fakeCount_margin; j++) if (i > additionalDots - 1 && i < fakeCount_margin - additionalDots && j > additionalDots - 1 && j < fakeCount_margin - additionalDots) {
941
- let ii = i - additionalDots, jj = j - additionalDots;
942
- alignment && !alignment(ii, jj) ? fakeMatrix[i][j] = void 0 : fakeMatrix[i][j] = !!this.qr.isDark(jj, ii);
943
- } else fakeMatrix[i][j] = options.shape === ShapeType.circle && Math.sqrt((i - center_jAlign) * (i - center_jAlign) + (j - center_jAlign) * (j - center_jAlign)) > center_jAlign ? void 0 : i == additionalDots - 1 || i == fakeCount_margin - additionalDots || j == additionalDots - 1 || j == fakeCount_margin - additionalDots ? (j == additionalDots - 1 && (i < additionalDots + 8 || i > fakeCount_margin - additionalDots - 9) || j == fakeCount_margin - additionalDots && i < additionalDots + 8 || i == additionalDots - 1 && (j < additionalDots + 8 || j > fakeCount_margin - additionalDots - 9) || i == fakeCount_margin - additionalDots && j < additionalDots + 8) && void 0 : this.qr.isDark(0 > j - 2 * additionalDots ? j : j >= count ? j - 2 * additionalDots : j - additionalDots, 0 > i - 2 * additionalDots ? i : i >= count ? i - 2 * additionalDots : i - additionalDots);
965
+ var $fakeCount_margin$jscomp$2$$ = 0;
966
+ let $additionalDots$$ = 0;
967
+ $fakeCount_margin$jscomp$2$$ = $count$jscomp$40_iAlign$$, $options$jscomp$37$$.shape === $ShapeType$$.circle ? ($fakeCount_margin$jscomp$2$$ = this.options.backgroundOptions && this.options.backgroundOptions.margin || 0,
968
+ $additionalDots$$ = Math.floor(($minSize_xFakeBeginning$$ / $dotSize$jscomp$9$$ - $count$jscomp$40_iAlign$$ - 2 * $fakeCount_margin$jscomp$2$$) / 2),
969
+ $fakeCount_margin$jscomp$2$$ = $count$jscomp$40_iAlign$$ + 2 * $additionalDots$$) : $options$jscomp$37$$.imageOptions.mode == $ImageMode$$.background && ($additionalDots$$ = 1,
970
+ $fakeCount_margin$jscomp$2$$ = $count$jscomp$40_iAlign$$ + 2 * $additionalDots$$),
971
+ $minSize_xFakeBeginning$$ = $colorCount_xBeginning$$ - $additionalDots$$ * $dotSize$jscomp$9$$,
972
+ $yBeginning_yFakeBeginning$$ -= $additionalDots$$ * $dotSize$jscomp$9$$, $colorCount_xBeginning$$ = $count$jscomp$40_iAlign$$ + 2 * $additionalDots$$;
973
+ let $fakeMatrix$$ = Array($fakeCount_margin$jscomp$2$$);
974
+ var $center_jAlign$$ = Math.floor($fakeCount_margin$jscomp$2$$ / 2);
975
+ for (let $i$jscomp$6$$ = 0; $i$jscomp$6$$ < $fakeCount_margin$jscomp$2$$; $i$jscomp$6$$++) {
976
+ $fakeMatrix$$[$i$jscomp$6$$] = Array($fakeCount_margin$jscomp$2$$);
977
+ for (let $j$jscomp$1$$ = 0; $j$jscomp$1$$ < $fakeCount_margin$jscomp$2$$; $j$jscomp$1$$++) if ($i$jscomp$6$$ > $additionalDots$$ - 1 && $i$jscomp$6$$ < $fakeCount_margin$jscomp$2$$ - $additionalDots$$ && $j$jscomp$1$$ > $additionalDots$$ - 1 && $j$jscomp$1$$ < $fakeCount_margin$jscomp$2$$ - $additionalDots$$) {
978
+ let $ii$$ = $i$jscomp$6$$ - $additionalDots$$, $jj$$ = $j$jscomp$1$$ - $additionalDots$$;
979
+ $alignment$jscomp$1_filter$jscomp$3$$ && !$alignment$jscomp$1_filter$jscomp$3$$($ii$$, $jj$$) ? $fakeMatrix$$[$i$jscomp$6$$][$j$jscomp$1$$] = void 0 : $fakeMatrix$$[$i$jscomp$6$$][$j$jscomp$1$$] = !!this.qr.isDark($jj$$, $ii$$);
980
+ } else $fakeMatrix$$[$i$jscomp$6$$][$j$jscomp$1$$] = $options$jscomp$37$$.shape === $ShapeType$$.circle && Math.sqrt(($i$jscomp$6$$ - $center_jAlign$$) * ($i$jscomp$6$$ - $center_jAlign$$) + ($j$jscomp$1$$ - $center_jAlign$$) * ($j$jscomp$1$$ - $center_jAlign$$)) > $center_jAlign$$ ? void 0 : $i$jscomp$6$$ == $additionalDots$$ - 1 || $i$jscomp$6$$ == $fakeCount_margin$jscomp$2$$ - $additionalDots$$ || $j$jscomp$1$$ == $additionalDots$$ - 1 || $j$jscomp$1$$ == $fakeCount_margin$jscomp$2$$ - $additionalDots$$ ? ($j$jscomp$1$$ == $additionalDots$$ - 1 && ($i$jscomp$6$$ < $additionalDots$$ + 8 || $i$jscomp$6$$ > $fakeCount_margin$jscomp$2$$ - $additionalDots$$ - 9) || $j$jscomp$1$$ == $fakeCount_margin$jscomp$2$$ - $additionalDots$$ && $i$jscomp$6$$ < $additionalDots$$ + 8 || $i$jscomp$6$$ == $additionalDots$$ - 1 && ($j$jscomp$1$$ < $additionalDots$$ + 8 || $j$jscomp$1$$ > $fakeCount_margin$jscomp$2$$ - $additionalDots$$ - 9) || $i$jscomp$6$$ == $fakeCount_margin$jscomp$2$$ - $additionalDots$$ && $j$jscomp$1$$ < $additionalDots$$ + 8) && void 0 : this.qr.isDark(0 > $j$jscomp$1$$ - 2 * $additionalDots$$ ? $j$jscomp$1$$ : $j$jscomp$1$$ >= $count$jscomp$40_iAlign$$ ? $j$jscomp$1$$ - 2 * $additionalDots$$ : $j$jscomp$1$$ - $additionalDots$$, 0 > $i$jscomp$6$$ - 2 * $additionalDots$$ ? $i$jscomp$6$$ : $i$jscomp$6$$ >= $count$jscomp$40_iAlign$$ ? $i$jscomp$6$$ - 2 * $additionalDots$$ : $i$jscomp$6$$ - $additionalDots$$);
944
981
  }
945
- alignment = QRUtil.getPatternPosition((count - 17) / 4);
946
- for (let i = 0; i < fakeCount_margin; i++) {
947
- count = alignment.find((v => i - additionalDots > v - 3 && i - additionalDots < v + 3));
948
- for (let j = 0; j < fakeCount_margin; j++) center_jAlign = alignment.find((v => j - additionalDots > v - 3 && j - additionalDots < v + 3)),
949
- null != fakeMatrix[i][j] && (this.lightDotsMask && (dot = count && center_jAlign && (count != alignment[0] && center_jAlign != alignment[0] || center_jAlign != alignment[0] && center_jAlign != alignment[alignment.length - 1] || count != alignment[0] && count != alignment[alignment.length - 1]) ? markerDot : overlayDot),
950
- fakeMatrix[i][j] ? (dot.draw({
951
- x: minSize_xFakeBeginning + i * dotSize,
952
- y: yBeginning_yFakeBeginning + j * dotSize,
953
- size: dotSize,
954
- getNeighbor: (xOffset, yOffset) => !0 === fakeMatrix[i + xOffset]?.[j + yOffset]
955
- }), dot.element && this.dotsMaskGroup && this.dotsMaskGroup.appendChild(dot.element)) : this.lightDotsMask && (dot.draw({
956
- x: minSize_xFakeBeginning + i * dotSize,
957
- y: yBeginning_yFakeBeginning + j * dotSize,
958
- size: dotSize,
959
- getNeighbor: (xOffset, yOffset) => !1 === fakeMatrix[i + xOffset]?.[j + yOffset]
960
- }), dot.element && this.lightDotsMaskGroup && this.lightDotsMaskGroup.appendChild(dot.element)));
982
+ $alignment$jscomp$1_filter$jscomp$3$$ = QRUtil.getPatternPosition(($count$jscomp$40_iAlign$$ - 17) / 4);
983
+ for (let $i$jscomp$7$$ = 0; $i$jscomp$7$$ < $fakeCount_margin$jscomp$2$$; $i$jscomp$7$$++) {
984
+ $count$jscomp$40_iAlign$$ = $alignment$jscomp$1_filter$jscomp$3$$.find(($v$jscomp$2$$ => $i$jscomp$7$$ - $additionalDots$$ > $v$jscomp$2$$ - 3 && $i$jscomp$7$$ - $additionalDots$$ < $v$jscomp$2$$ + 3));
985
+ for (let $j$jscomp$2$$ = 0; $j$jscomp$2$$ < $fakeCount_margin$jscomp$2$$; $j$jscomp$2$$++) $center_jAlign$$ = $alignment$jscomp$1_filter$jscomp$3$$.find(($v$jscomp$3$$ => $j$jscomp$2$$ - $additionalDots$$ > $v$jscomp$3$$ - 3 && $j$jscomp$2$$ - $additionalDots$$ < $v$jscomp$3$$ + 3)),
986
+ null != $fakeMatrix$$[$i$jscomp$7$$][$j$jscomp$2$$] && (this.lightDotsMask && ($dot$$ = $count$jscomp$40_iAlign$$ && $center_jAlign$$ && ($count$jscomp$40_iAlign$$ != $alignment$jscomp$1_filter$jscomp$3$$[0] && $center_jAlign$$ != $alignment$jscomp$1_filter$jscomp$3$$[0] || $center_jAlign$$ != $alignment$jscomp$1_filter$jscomp$3$$[0] && $center_jAlign$$ != $alignment$jscomp$1_filter$jscomp$3$$[$alignment$jscomp$1_filter$jscomp$3$$.length - 1] || $count$jscomp$40_iAlign$$ != $alignment$jscomp$1_filter$jscomp$3$$[0] && $count$jscomp$40_iAlign$$ != $alignment$jscomp$1_filter$jscomp$3$$[$alignment$jscomp$1_filter$jscomp$3$$.length - 1]) ? $markerDot$$ : $overlayDot$$),
987
+ $fakeMatrix$$[$i$jscomp$7$$][$j$jscomp$2$$] ? ($dot$$.draw({
988
+ x: $minSize_xFakeBeginning$$ + $i$jscomp$7$$ * $dotSize$jscomp$9$$,
989
+ y: $yBeginning_yFakeBeginning$$ + $j$jscomp$2$$ * $dotSize$jscomp$9$$,
990
+ size: $dotSize$jscomp$9$$,
991
+ getNeighbor: ($xOffset$jscomp$1$$, $yOffset$jscomp$1$$) => !0 === $fakeMatrix$$[$i$jscomp$7$$ + $xOffset$jscomp$1$$]?.[$j$jscomp$2$$ + $yOffset$jscomp$1$$]
992
+ }), $dot$$.element && this.dotsMaskGroup && this.dotsMaskGroup.appendChild($dot$$.element)) : this.lightDotsMask && ($dot$$.draw({
993
+ x: $minSize_xFakeBeginning$$ + $i$jscomp$7$$ * $dotSize$jscomp$9$$,
994
+ y: $yBeginning_yFakeBeginning$$ + $j$jscomp$2$$ * $dotSize$jscomp$9$$,
995
+ size: $dotSize$jscomp$9$$,
996
+ getNeighbor: ($xOffset$$, $yOffset$$) => !1 === $fakeMatrix$$[$i$jscomp$7$$ + $xOffset$$]?.[$j$jscomp$2$$ + $yOffset$$]
997
+ }), $dot$$.element && this.lightDotsMaskGroup && this.lightDotsMaskGroup.appendChild($dot$$.element)));
961
998
  }
962
999
  this.lightDotsMask && this.createColor({
963
- options: options.imageOptions.fill.gradient,
964
- color: options.imageOptions.fill.color,
1000
+ options: $options$jscomp$37$$.imageOptions.fill.gradient,
1001
+ color: $options$jscomp$37$$.imageOptions.fill.color,
965
1002
  additionalRotation: 0,
966
- x: minSize_xFakeBeginning,
967
- y: yBeginning_yFakeBeginning,
968
- height: colorCount_xBeginning * dotSize,
969
- width: colorCount_xBeginning * dotSize,
1003
+ x: $minSize_xFakeBeginning$$,
1004
+ y: $yBeginning_yFakeBeginning$$,
1005
+ height: $colorCount_xBeginning$$ * $dotSize$jscomp$9$$,
1006
+ width: $colorCount_xBeginning$$ * $dotSize$jscomp$9$$,
970
1007
  name: "light-dot-color"
971
1008
  }), this.createColor({
972
- options: options.dotsOptions?.gradient,
973
- color: options.dotsOptions.color,
1009
+ options: $options$jscomp$37$$.dotsOptions?.gradient,
1010
+ color: $options$jscomp$37$$.dotsOptions.color,
974
1011
  additionalRotation: 0,
975
- x: minSize_xFakeBeginning,
976
- y: yBeginning_yFakeBeginning,
977
- height: colorCount_xBeginning * dotSize,
978
- width: colorCount_xBeginning * dotSize,
1012
+ x: $minSize_xFakeBeginning$$,
1013
+ y: $yBeginning_yFakeBeginning$$,
1014
+ height: $colorCount_xBeginning$$ * $dotSize$jscomp$9$$,
1015
+ width: $colorCount_xBeginning$$ * $dotSize$jscomp$9$$,
979
1016
  name: "dot-color"
980
1017
  });
981
1018
  }
982
1019
  drawCorners() {
983
1020
  if (!this.qr) throw "QR code is not defined";
984
- let options = this.options;
1021
+ let $options$jscomp$38$$ = this.options;
985
1022
  if (!this._element) throw "Element code is not defined";
986
- let count = this.qr.getModuleCount(), dotSize = this.options.dotsOptions.size, cornersSquareSize = 7 * dotSize, cornersDotSize = 3 * dotSize, xBeginning = Math.floor((options.width - count * dotSize) / 2), yBeginning = Math.floor((options.height - count * dotSize) / 2);
987
- [ [ 0, 0, 0 ], [ 1, 0, Math.PI / 2 ], [ 0, 1, -Math.PI / 2 ] ].forEach((([column_cornersDot, row, dot]) => {
988
- let x = xBeginning + column_cornersDot * dotSize * (count - 7), y = yBeginning + row * dotSize * (count - 7);
989
- var cornersDotMaskGroup_cornersSquareMask = this.dotsMask;
990
- let cornersSquareMaskGroup = this.dotsMaskGroup;
991
- var cornersDotMask_cornersSquare_dot = this.dotsMask;
992
- if (cornersDotMaskGroup_cornersSquareMask = this.dotsMaskGroup, (options.cornersSquareOptions?.gradient || options.cornersSquareOptions?.color) && ([cornersDotMaskGroup_cornersSquareMask, cornersSquareMaskGroup] = this.createMask(`mask-corners-square-color-${column_cornersDot}-${row}`),
993
- this.defs.appendChild(cornersDotMaskGroup_cornersSquareMask), cornersDotMask_cornersSquare_dot = cornersDotMaskGroup_cornersSquareMask,
994
- cornersDotMaskGroup_cornersSquareMask = cornersSquareMaskGroup, this.createColor({
995
- options: options.cornersSquareOptions?.gradient,
996
- color: options.cornersSquareOptions?.color,
997
- additionalRotation: dot,
998
- x,
999
- y,
1000
- height: cornersSquareSize,
1001
- width: cornersSquareSize,
1002
- name: `corners-square-color-${column_cornersDot}-${row}`
1003
- })), options.cornersSquareOptions?.type) (cornersDotMask_cornersSquare_dot = new QRCornerSquare(options.cornersSquareOptions.type, this.document)).draw({
1004
- x,
1005
- y,
1006
- size: cornersSquareSize,
1007
- rotation: dot
1008
- }), cornersDotMask_cornersSquare_dot.element && cornersSquareMaskGroup && cornersSquareMaskGroup.appendChild(cornersDotMask_cornersSquare_dot.element),
1009
- cornersDotMask_cornersSquare_dot.fill && this.lightDotsMaskGroup && this.lightDotsMaskGroup.appendChild(cornersDotMask_cornersSquare_dot.fill); else {
1010
- cornersDotMask_cornersSquare_dot = new QRDot(options.dotsOptions.type, this.document);
1011
- for (let i = 0; i < squareMask.length; i++) for (let j = 0; j < squareMask[i].length; j++) squareMask[i]?.[j] ? (cornersDotMask_cornersSquare_dot.draw({
1012
- x: x + i * dotSize,
1013
- y: y + j * dotSize,
1014
- size: dotSize,
1015
- getNeighbor: (xOffset, yOffset) => !!squareMask[i + xOffset]?.[j + yOffset]
1016
- }), cornersDotMask_cornersSquare_dot.element && cornersSquareMaskGroup && cornersSquareMaskGroup.appendChild(cornersDotMask_cornersSquare_dot.element)) : this.lightDotsMask && !dotMask[i]?.[j] && (cornersDotMask_cornersSquare_dot.draw({
1017
- x: x + i * dotSize,
1018
- y: y + j * dotSize,
1019
- size: dotSize,
1020
- getNeighbor: (xOffset, yOffset) => !squareMask[i + xOffset]?.[j + yOffset] && !dotMask[i + xOffset]?.[j + yOffset]
1021
- }), cornersDotMask_cornersSquare_dot.element && this.lightDotsMaskGroup && this.lightDotsMaskGroup.appendChild(cornersDotMask_cornersSquare_dot.element));
1022
- if (this.lightDotsMask) for (let i = -1; 8 > i; i++) for (let j = -1; 8 > j; j++) -1 != i && 7 != i && -1 != j && 7 != j || (cornersDotMask_cornersSquare_dot.draw({
1023
- x: x + i * dotSize,
1024
- y: y + j * dotSize,
1025
- size: dotSize,
1026
- getNeighbor: (ii, jj) => (jj = j + jj, -1 <= (ii = i + ii) && 7 >= ii && -1 <= jj && 7 >= jj && (-1 == ii || 7 == ii || -1 == jj || 7 == jj))
1027
- }), cornersDotMask_cornersSquare_dot.element && this.lightDotsMaskGroup && this.lightDotsMaskGroup.appendChild(cornersDotMask_cornersSquare_dot.element));
1023
+ let $count$jscomp$41$$ = this.qr.getModuleCount(), $dotSize$jscomp$10$$ = this.options.dotsOptions.size, $cornersSquareSize$$ = 7 * $dotSize$jscomp$10$$, $cornersDotSize$$ = 3 * $dotSize$jscomp$10$$, $xBeginning$jscomp$1$$ = Math.floor(($options$jscomp$38$$.width - $count$jscomp$41$$ * $dotSize$jscomp$10$$) / 2), $yBeginning$jscomp$1$$ = Math.floor(($options$jscomp$38$$.height - $count$jscomp$41$$ * $dotSize$jscomp$10$$) / 2);
1024
+ [ [ 0, 0, 0 ], [ 1, 0, Math.PI / 2 ], [ 0, 1, -Math.PI / 2 ] ].forEach((([$column_cornersDot$$, $row$$, $dot$jscomp$2_rotation$jscomp$27$$]) => {
1025
+ let $x$jscomp$133$$ = $xBeginning$jscomp$1$$ + $column_cornersDot$$ * $dotSize$jscomp$10$$ * ($count$jscomp$41$$ - 7), $y$jscomp$118$$ = $yBeginning$jscomp$1$$ + $row$$ * $dotSize$jscomp$10$$ * ($count$jscomp$41$$ - 7);
1026
+ var $cornersDotMaskGroup_cornersSquareMask$$ = this.dotsMask;
1027
+ let $cornersSquareMaskGroup$$ = this.dotsMaskGroup;
1028
+ var $cornersDotMask_cornersSquare_dot$jscomp$1$$ = this.dotsMask;
1029
+ if ($cornersDotMaskGroup_cornersSquareMask$$ = this.dotsMaskGroup, ($options$jscomp$38$$.cornersSquareOptions?.gradient || $options$jscomp$38$$.cornersSquareOptions?.color) && ([$cornersDotMaskGroup_cornersSquareMask$$, $cornersSquareMaskGroup$$] = this.createMask(`mask-corners-square-color-${$column_cornersDot$$}-${$row$$}`),
1030
+ this.defs.appendChild($cornersDotMaskGroup_cornersSquareMask$$), $cornersDotMask_cornersSquare_dot$jscomp$1$$ = $cornersDotMaskGroup_cornersSquareMask$$,
1031
+ $cornersDotMaskGroup_cornersSquareMask$$ = $cornersSquareMaskGroup$$, this.createColor({
1032
+ options: $options$jscomp$38$$.cornersSquareOptions?.gradient,
1033
+ color: $options$jscomp$38$$.cornersSquareOptions?.color,
1034
+ additionalRotation: $dot$jscomp$2_rotation$jscomp$27$$,
1035
+ x: $x$jscomp$133$$,
1036
+ y: $y$jscomp$118$$,
1037
+ height: $cornersSquareSize$$,
1038
+ width: $cornersSquareSize$$,
1039
+ name: `corners-square-color-${$column_cornersDot$$}-${$row$$}`
1040
+ })), $options$jscomp$38$$.cornersSquareOptions?.type) ($cornersDotMask_cornersSquare_dot$jscomp$1$$ = new $QRCornerSquare$$($options$jscomp$38$$.cornersSquareOptions.type, this.document)).draw({
1041
+ x: $x$jscomp$133$$,
1042
+ y: $y$jscomp$118$$,
1043
+ size: $cornersSquareSize$$,
1044
+ rotation: $dot$jscomp$2_rotation$jscomp$27$$
1045
+ }), $cornersDotMask_cornersSquare_dot$jscomp$1$$.element && $cornersSquareMaskGroup$$ && $cornersSquareMaskGroup$$.appendChild($cornersDotMask_cornersSquare_dot$jscomp$1$$.element),
1046
+ $cornersDotMask_cornersSquare_dot$jscomp$1$$.fill && this.lightDotsMaskGroup && this.lightDotsMaskGroup.appendChild($cornersDotMask_cornersSquare_dot$jscomp$1$$.fill); else {
1047
+ $cornersDotMask_cornersSquare_dot$jscomp$1$$ = new $QRDot$$($options$jscomp$38$$.dotsOptions.type, this.document);
1048
+ for (let $i$jscomp$8$$ = 0; $i$jscomp$8$$ < $squareMask$$.length; $i$jscomp$8$$++) for (let $j$jscomp$3$$ = 0; $j$jscomp$3$$ < $squareMask$$[$i$jscomp$8$$].length; $j$jscomp$3$$++) $squareMask$$[$i$jscomp$8$$]?.[$j$jscomp$3$$] ? ($cornersDotMask_cornersSquare_dot$jscomp$1$$.draw({
1049
+ x: $x$jscomp$133$$ + $i$jscomp$8$$ * $dotSize$jscomp$10$$,
1050
+ y: $y$jscomp$118$$ + $j$jscomp$3$$ * $dotSize$jscomp$10$$,
1051
+ size: $dotSize$jscomp$10$$,
1052
+ getNeighbor: ($xOffset$jscomp$3$$, $yOffset$jscomp$3$$) => !!$squareMask$$[$i$jscomp$8$$ + $xOffset$jscomp$3$$]?.[$j$jscomp$3$$ + $yOffset$jscomp$3$$]
1053
+ }), $cornersDotMask_cornersSquare_dot$jscomp$1$$.element && $cornersSquareMaskGroup$$ && $cornersSquareMaskGroup$$.appendChild($cornersDotMask_cornersSquare_dot$jscomp$1$$.element)) : this.lightDotsMask && !$dotMask$$[$i$jscomp$8$$]?.[$j$jscomp$3$$] && ($cornersDotMask_cornersSquare_dot$jscomp$1$$.draw({
1054
+ x: $x$jscomp$133$$ + $i$jscomp$8$$ * $dotSize$jscomp$10$$,
1055
+ y: $y$jscomp$118$$ + $j$jscomp$3$$ * $dotSize$jscomp$10$$,
1056
+ size: $dotSize$jscomp$10$$,
1057
+ getNeighbor: ($xOffset$jscomp$2$$, $yOffset$jscomp$2$$) => !$squareMask$$[$i$jscomp$8$$ + $xOffset$jscomp$2$$]?.[$j$jscomp$3$$ + $yOffset$jscomp$2$$] && !$dotMask$$[$i$jscomp$8$$ + $xOffset$jscomp$2$$]?.[$j$jscomp$3$$ + $yOffset$jscomp$2$$]
1058
+ }), $cornersDotMask_cornersSquare_dot$jscomp$1$$.element && this.lightDotsMaskGroup && this.lightDotsMaskGroup.appendChild($cornersDotMask_cornersSquare_dot$jscomp$1$$.element));
1059
+ if (this.lightDotsMask) for (let $i$jscomp$9$$ = -1; 8 > $i$jscomp$9$$; $i$jscomp$9$$++) for (let $j$jscomp$4$$ = -1; 8 > $j$jscomp$4$$; $j$jscomp$4$$++) -1 != $i$jscomp$9$$ && 7 != $i$jscomp$9$$ && -1 != $j$jscomp$4$$ && 7 != $j$jscomp$4$$ || ($cornersDotMask_cornersSquare_dot$jscomp$1$$.draw({
1060
+ x: $x$jscomp$133$$ + $i$jscomp$9$$ * $dotSize$jscomp$10$$,
1061
+ y: $y$jscomp$118$$ + $j$jscomp$4$$ * $dotSize$jscomp$10$$,
1062
+ size: $dotSize$jscomp$10$$,
1063
+ getNeighbor: ($ii$jscomp$1_xOffset$jscomp$4$$, $jj$jscomp$1_yOffset$jscomp$4$$) => ($jj$jscomp$1_yOffset$jscomp$4$$ = $j$jscomp$4$$ + $jj$jscomp$1_yOffset$jscomp$4$$,
1064
+ -1 <= ($ii$jscomp$1_xOffset$jscomp$4$$ = $i$jscomp$9$$ + $ii$jscomp$1_xOffset$jscomp$4$$) && 7 >= $ii$jscomp$1_xOffset$jscomp$4$$ && -1 <= $jj$jscomp$1_yOffset$jscomp$4$$ && 7 >= $jj$jscomp$1_yOffset$jscomp$4$$ && (-1 == $ii$jscomp$1_xOffset$jscomp$4$$ || 7 == $ii$jscomp$1_xOffset$jscomp$4$$ || -1 == $jj$jscomp$1_yOffset$jscomp$4$$ || 7 == $jj$jscomp$1_yOffset$jscomp$4$$))
1065
+ }), $cornersDotMask_cornersSquare_dot$jscomp$1$$.element && this.lightDotsMaskGroup && this.lightDotsMaskGroup.appendChild($cornersDotMask_cornersSquare_dot$jscomp$1$$.element));
1028
1066
  }
1029
- if ((options.cornersDotOptions?.gradient || options.cornersDotOptions?.color) && ([cornersDotMask_cornersSquare_dot, cornersDotMaskGroup_cornersSquareMask] = this.createMask(`mask-corners-dot-color-${column_cornersDot}-${row}`),
1030
- this.defs.appendChild(cornersDotMask_cornersSquare_dot), this.createColor({
1031
- options: options.cornersDotOptions?.gradient,
1032
- color: options.cornersDotOptions?.color,
1033
- additionalRotation: dot,
1034
- x: x + 2 * dotSize,
1035
- y: y + 2 * dotSize,
1036
- height: cornersDotSize,
1037
- width: cornersDotSize,
1038
- name: `corners-dot-color-${column_cornersDot}-${row}`
1039
- })), options.cornersDotOptions?.type) (column_cornersDot = new QRCornerDot(options.cornersDotOptions.type, this.document)).draw({
1040
- x: x + 2 * dotSize,
1041
- y: y + 2 * dotSize,
1042
- size: cornersDotSize,
1043
- rotation: dot
1044
- }), column_cornersDot.element && cornersDotMaskGroup_cornersSquareMask && cornersDotMaskGroup_cornersSquareMask.appendChild(column_cornersDot.element); else {
1045
- dot = new QRDot(options.dotsOptions.type, this.document);
1046
- for (let i = 0; i < dotMask.length; i++) for (let j = 0; j < dotMask[i].length; j++) dotMask[i]?.[j] && (dot.draw({
1047
- x: x + i * dotSize,
1048
- y: y + j * dotSize,
1049
- size: dotSize,
1050
- getNeighbor: (xOffset, yOffset) => !!dotMask[i + xOffset]?.[j + yOffset]
1051
- }), dot.element && cornersDotMaskGroup_cornersSquareMask && cornersDotMaskGroup_cornersSquareMask.appendChild(dot.element));
1067
+ if (($options$jscomp$38$$.cornersDotOptions?.gradient || $options$jscomp$38$$.cornersDotOptions?.color) && ([$cornersDotMask_cornersSquare_dot$jscomp$1$$, $cornersDotMaskGroup_cornersSquareMask$$] = this.createMask(`mask-corners-dot-color-${$column_cornersDot$$}-${$row$$}`),
1068
+ this.defs.appendChild($cornersDotMask_cornersSquare_dot$jscomp$1$$), this.createColor({
1069
+ options: $options$jscomp$38$$.cornersDotOptions?.gradient,
1070
+ color: $options$jscomp$38$$.cornersDotOptions?.color,
1071
+ additionalRotation: $dot$jscomp$2_rotation$jscomp$27$$,
1072
+ x: $x$jscomp$133$$ + 2 * $dotSize$jscomp$10$$,
1073
+ y: $y$jscomp$118$$ + 2 * $dotSize$jscomp$10$$,
1074
+ height: $cornersDotSize$$,
1075
+ width: $cornersDotSize$$,
1076
+ name: `corners-dot-color-${$column_cornersDot$$}-${$row$$}`
1077
+ })), $options$jscomp$38$$.cornersDotOptions?.type) ($column_cornersDot$$ = new $QRCornerDot$$($options$jscomp$38$$.cornersDotOptions.type, this.document)).draw({
1078
+ x: $x$jscomp$133$$ + 2 * $dotSize$jscomp$10$$,
1079
+ y: $y$jscomp$118$$ + 2 * $dotSize$jscomp$10$$,
1080
+ size: $cornersDotSize$$,
1081
+ rotation: $dot$jscomp$2_rotation$jscomp$27$$
1082
+ }), $column_cornersDot$$.element && $cornersDotMaskGroup_cornersSquareMask$$ && $cornersDotMaskGroup_cornersSquareMask$$.appendChild($column_cornersDot$$.element); else {
1083
+ $dot$jscomp$2_rotation$jscomp$27$$ = new $QRDot$$($options$jscomp$38$$.dotsOptions.type, this.document);
1084
+ for (let $i$jscomp$10$$ = 0; $i$jscomp$10$$ < $dotMask$$.length; $i$jscomp$10$$++) for (let $j$jscomp$5$$ = 0; $j$jscomp$5$$ < $dotMask$$[$i$jscomp$10$$].length; $j$jscomp$5$$++) $dotMask$$[$i$jscomp$10$$]?.[$j$jscomp$5$$] && ($dot$jscomp$2_rotation$jscomp$27$$.draw({
1085
+ x: $x$jscomp$133$$ + $i$jscomp$10$$ * $dotSize$jscomp$10$$,
1086
+ y: $y$jscomp$118$$ + $j$jscomp$5$$ * $dotSize$jscomp$10$$,
1087
+ size: $dotSize$jscomp$10$$,
1088
+ getNeighbor: ($xOffset$jscomp$5$$, $yOffset$jscomp$5$$) => !!$dotMask$$[$i$jscomp$10$$ + $xOffset$jscomp$5$$]?.[$j$jscomp$5$$ + $yOffset$jscomp$5$$]
1089
+ }), $dot$jscomp$2_rotation$jscomp$27$$.element && $cornersDotMaskGroup_cornersSquareMask$$ && $cornersDotMaskGroup_cornersSquareMask$$.appendChild($dot$jscomp$2_rotation$jscomp$27$$.element));
1052
1090
  }
1053
1091
  }));
1054
1092
  }
1055
- async drawImage({width: dw_width, height: dh_height, count, dotSize}) {
1056
- var image = this.options, dx = Math.floor((image.width - count * dotSize) / 2), encoding = Math.floor((image.height - count * dotSize) / 2), container_data = image.imageOptions.margin * dotSize;
1057
- if (image.imageOptions.mode == ImageMode.background && (container_data = 0), dx = dx + container_data + (count * dotSize - dw_width) / 2,
1058
- count = encoding + container_data + (count * dotSize - dh_height) / 2, dw_width -= 2 * container_data,
1059
- dh_height -= 2 * container_data, container_data = await this.imageTools.toDataURL(image.image || ""),
1060
- (image = this.document.createElementNS("http://www.w3.org/2000/svg", "image")).setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", container_data || ""),
1061
- container_data.startsWith("data:image/svg+xml;")) {
1062
- if (dotSize = (container_data = container_data.substring(19)).indexOf(","), encoding = container_data.substring(0, dotSize),
1063
- container_data = container_data.substring(dotSize + 1), "base64" === encoding) container_data = "function" == typeof atob ? atob(container_data) : Buffer.from(container_data, "base64").toString("utf8"); else container_data = "";
1064
- container_data && (container_data = (new DOMParser).parseFromString(container_data, "text/xml"),
1065
- (container_data = Array.from(container_data.getElementsByTagName("svg"))).length && (image = container_data[0]));
1093
+ async drawImage({width: $dw_width$jscomp$30$$, height: $dh_height$jscomp$27$$, count: $count$jscomp$42_dy$jscomp$4$$, dotSize: $dotSize$jscomp$11_i$jscomp$11$$}) {
1094
+ var $image$jscomp$4_options$jscomp$39$$ = this.options, $dx$jscomp$4_xBeginning$jscomp$2$$ = Math.floor(($image$jscomp$4_options$jscomp$39$$.width - $count$jscomp$42_dy$jscomp$4$$ * $dotSize$jscomp$11_i$jscomp$11$$) / 2), $encoding$jscomp$3_yBeginning$jscomp$2$$ = Math.floor(($image$jscomp$4_options$jscomp$39$$.height - $count$jscomp$42_dy$jscomp$4$$ * $dotSize$jscomp$11_i$jscomp$11$$) / 2), $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ = $image$jscomp$4_options$jscomp$39$$.imageOptions.margin * $dotSize$jscomp$11_i$jscomp$11$$;
1095
+ if ($image$jscomp$4_options$jscomp$39$$.imageOptions.mode == $ImageMode$$.background && ($container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ = 0),
1096
+ $dx$jscomp$4_xBeginning$jscomp$2$$ = $dx$jscomp$4_xBeginning$jscomp$2$$ + $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ + ($count$jscomp$42_dy$jscomp$4$$ * $dotSize$jscomp$11_i$jscomp$11$$ - $dw_width$jscomp$30$$) / 2,
1097
+ $count$jscomp$42_dy$jscomp$4$$ = $encoding$jscomp$3_yBeginning$jscomp$2$$ + $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ + ($count$jscomp$42_dy$jscomp$4$$ * $dotSize$jscomp$11_i$jscomp$11$$ - $dh_height$jscomp$27$$) / 2,
1098
+ $dw_width$jscomp$30$$ -= 2 * $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$,
1099
+ $dh_height$jscomp$27$$ -= 2 * $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$,
1100
+ $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ = await this.imageTools.toDataURL($image$jscomp$4_options$jscomp$39$$.image || ""),
1101
+ ($image$jscomp$4_options$jscomp$39$$ = this.document.createElementNS("http://www.w3.org/2000/svg", "image")).setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ || ""),
1102
+ $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$.startsWith("data:image/svg+xml;")) {
1103
+ if ($dotSize$jscomp$11_i$jscomp$11$$ = ($container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ = $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$.substring(19)).indexOf(","),
1104
+ $encoding$jscomp$3_yBeginning$jscomp$2$$ = $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$.substring(0, $dotSize$jscomp$11_i$jscomp$11$$),
1105
+ $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ = $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$.substring($dotSize$jscomp$11_i$jscomp$11$$ + 1),
1106
+ "base64" === $encoding$jscomp$3_yBeginning$jscomp$2$$) $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ = "function" == typeof atob ? atob($container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$) : Buffer.from($container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$, "base64").toString("utf8"); else $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ = "";
1107
+ $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ && ($container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ = (new DOMParser).parseFromString($container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$, "text/xml"),
1108
+ ($container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$ = Array.from($container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$.getElementsByTagName("svg"))).length && ($image$jscomp$4_options$jscomp$39$$ = $container_data$jscomp$80_imageUrl_margin$jscomp$3_rootEl$$[0]));
1066
1109
  }
1067
- image.setAttribute("x", numToAttr(dx)), image.setAttribute("y", numToAttr(count)),
1068
- image.setAttribute("width", `${numToAttr(dw_width)}px`), image.setAttribute("height", `${numToAttr(dh_height)}px`),
1069
- this._element.appendChild(image);
1070
- }
1071
- createColor({options, color, additionalRotation: additionalRotation_positiveRotation, x, y, height, width, name}) {
1072
- var size = width > height ? width : height;
1073
- let rect = this.document.createElementNS("http://www.w3.org/2000/svg", "rect");
1074
- if (rect.setAttribute("x", numToAttr(x)), rect.setAttribute("y", numToAttr(y)),
1075
- rect.setAttribute("height", numToAttr(height)), rect.setAttribute("width", numToAttr(width)),
1076
- rect.setAttribute("style", `mask:url(#mask-${name})`), options) {
1077
- let gradient;
1078
- if (options.type === GradientType.radial) gradient = this.document.createElementNS("http://www.w3.org/2000/svg", "radialGradient"),
1079
- gradient.setAttribute("id", name), gradient.setAttribute("gradientUnits", "userSpaceOnUse"),
1080
- gradient.setAttribute("fx", numToAttr(x + width / 2)), gradient.setAttribute("fy", numToAttr(y + height / 2)),
1081
- gradient.setAttribute("cx", numToAttr(x + width / 2)), gradient.setAttribute("cy", numToAttr(y + height / 2)),
1082
- gradient.setAttribute("r", numToAttr(size / 2)); else {
1083
- size = x + width / 2;
1084
- let y0 = y + height / 2;
1085
- x += width / 2, y += height / 2, 0 <= (additionalRotation_positiveRotation = ((color = ((options.rotation || 0) + additionalRotation_positiveRotation) % (2 * Math.PI)) + 2 * Math.PI) % (2 * Math.PI)) && additionalRotation_positiveRotation <= .25 * Math.PI || additionalRotation_positiveRotation > 1.75 * Math.PI && additionalRotation_positiveRotation <= 2 * Math.PI ? (size -= width / 2,
1086
- y0 -= height / 2 * Math.tan(color), x += width / 2, y += height / 2 * Math.tan(color)) : additionalRotation_positiveRotation > .25 * Math.PI && additionalRotation_positiveRotation <= .75 * Math.PI ? (y0 -= height / 2,
1087
- size -= width / 2 / Math.tan(color), y += height / 2, x += width / 2 / Math.tan(color)) : additionalRotation_positiveRotation > .75 * Math.PI && additionalRotation_positiveRotation <= 1.25 * Math.PI ? (size += width / 2,
1088
- y0 += height / 2 * Math.tan(color), x -= width / 2, y -= height / 2 * Math.tan(color)) : additionalRotation_positiveRotation > 1.25 * Math.PI && additionalRotation_positiveRotation <= 1.75 * Math.PI && (y0 += height / 2,
1089
- size += width / 2 / Math.tan(color), y -= height / 2, x -= width / 2 / Math.tan(color)),
1090
- gradient = this.document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"),
1091
- gradient.setAttribute("id", name), gradient.setAttribute("gradientUnits", "userSpaceOnUse"),
1092
- gradient.setAttribute("x1", numToAttr(size)), gradient.setAttribute("y1", numToAttr(y0)),
1093
- gradient.setAttribute("x2", numToAttr(x)), gradient.setAttribute("y2", numToAttr(y));
1110
+ $image$jscomp$4_options$jscomp$39$$.setAttribute("x", $numToAttr$$($dx$jscomp$4_xBeginning$jscomp$2$$)),
1111
+ $image$jscomp$4_options$jscomp$39$$.setAttribute("y", $numToAttr$$($count$jscomp$42_dy$jscomp$4$$)),
1112
+ $image$jscomp$4_options$jscomp$39$$.setAttribute("width", `${$numToAttr$$($dw_width$jscomp$30$$)}px`),
1113
+ $image$jscomp$4_options$jscomp$39$$.setAttribute("height", `${$numToAttr$$($dh_height$jscomp$27$$)}px`),
1114
+ this._element.appendChild($image$jscomp$4_options$jscomp$39$$);
1115
+ }
1116
+ createColor({options: $options$jscomp$40$$, color: $color$jscomp$3_rotation$jscomp$28$$, additionalRotation: $additionalRotation_positiveRotation$$, x: $x$jscomp$134_x1$jscomp$5$$, y: $y$jscomp$119_y1$jscomp$5$$, height: $height$jscomp$28$$, width: $width$jscomp$31$$, name: $name$jscomp$73$$}) {
1117
+ var $size$jscomp$70_x0$jscomp$2$$ = $width$jscomp$31$$ > $height$jscomp$28$$ ? $width$jscomp$31$$ : $height$jscomp$28$$;
1118
+ let $rect$$ = this.document.createElementNS("http://www.w3.org/2000/svg", "rect");
1119
+ if ($rect$$.setAttribute("x", $numToAttr$$($x$jscomp$134_x1$jscomp$5$$)), $rect$$.setAttribute("y", $numToAttr$$($y$jscomp$119_y1$jscomp$5$$)),
1120
+ $rect$$.setAttribute("height", $numToAttr$$($height$jscomp$28$$)), $rect$$.setAttribute("width", $numToAttr$$($width$jscomp$31$$)),
1121
+ $rect$$.setAttribute("style", `mask:url(#mask-${$name$jscomp$73$$})`), $options$jscomp$40$$) {
1122
+ let $gradient$jscomp$1$$;
1123
+ if ($options$jscomp$40$$.type === $GradientType$$.radial) $gradient$jscomp$1$$ = this.document.createElementNS("http://www.w3.org/2000/svg", "radialGradient"),
1124
+ $gradient$jscomp$1$$.setAttribute("id", $name$jscomp$73$$), $gradient$jscomp$1$$.setAttribute("gradientUnits", "userSpaceOnUse"),
1125
+ $gradient$jscomp$1$$.setAttribute("fx", $numToAttr$$($x$jscomp$134_x1$jscomp$5$$ + $width$jscomp$31$$ / 2)),
1126
+ $gradient$jscomp$1$$.setAttribute("fy", $numToAttr$$($y$jscomp$119_y1$jscomp$5$$ + $height$jscomp$28$$ / 2)),
1127
+ $gradient$jscomp$1$$.setAttribute("cx", $numToAttr$$($x$jscomp$134_x1$jscomp$5$$ + $width$jscomp$31$$ / 2)),
1128
+ $gradient$jscomp$1$$.setAttribute("cy", $numToAttr$$($y$jscomp$119_y1$jscomp$5$$ + $height$jscomp$28$$ / 2)),
1129
+ $gradient$jscomp$1$$.setAttribute("r", $numToAttr$$($size$jscomp$70_x0$jscomp$2$$ / 2)); else {
1130
+ $size$jscomp$70_x0$jscomp$2$$ = $x$jscomp$134_x1$jscomp$5$$ + $width$jscomp$31$$ / 2;
1131
+ let $y0$jscomp$2$$ = $y$jscomp$119_y1$jscomp$5$$ + $height$jscomp$28$$ / 2;
1132
+ $x$jscomp$134_x1$jscomp$5$$ += $width$jscomp$31$$ / 2, $y$jscomp$119_y1$jscomp$5$$ += $height$jscomp$28$$ / 2,
1133
+ 0 <= ($additionalRotation_positiveRotation$$ = (($color$jscomp$3_rotation$jscomp$28$$ = (($options$jscomp$40$$.rotation || 0) + $additionalRotation_positiveRotation$$) % (2 * Math.PI)) + 2 * Math.PI) % (2 * Math.PI)) && $additionalRotation_positiveRotation$$ <= .25 * Math.PI || $additionalRotation_positiveRotation$$ > 1.75 * Math.PI && $additionalRotation_positiveRotation$$ <= 2 * Math.PI ? ($size$jscomp$70_x0$jscomp$2$$ -= $width$jscomp$31$$ / 2,
1134
+ $y0$jscomp$2$$ -= $height$jscomp$28$$ / 2 * Math.tan($color$jscomp$3_rotation$jscomp$28$$),
1135
+ $x$jscomp$134_x1$jscomp$5$$ += $width$jscomp$31$$ / 2, $y$jscomp$119_y1$jscomp$5$$ += $height$jscomp$28$$ / 2 * Math.tan($color$jscomp$3_rotation$jscomp$28$$)) : $additionalRotation_positiveRotation$$ > .25 * Math.PI && $additionalRotation_positiveRotation$$ <= .75 * Math.PI ? ($y0$jscomp$2$$ -= $height$jscomp$28$$ / 2,
1136
+ $size$jscomp$70_x0$jscomp$2$$ -= $width$jscomp$31$$ / 2 / Math.tan($color$jscomp$3_rotation$jscomp$28$$),
1137
+ $y$jscomp$119_y1$jscomp$5$$ += $height$jscomp$28$$ / 2, $x$jscomp$134_x1$jscomp$5$$ += $width$jscomp$31$$ / 2 / Math.tan($color$jscomp$3_rotation$jscomp$28$$)) : $additionalRotation_positiveRotation$$ > .75 * Math.PI && $additionalRotation_positiveRotation$$ <= 1.25 * Math.PI ? ($size$jscomp$70_x0$jscomp$2$$ += $width$jscomp$31$$ / 2,
1138
+ $y0$jscomp$2$$ += $height$jscomp$28$$ / 2 * Math.tan($color$jscomp$3_rotation$jscomp$28$$),
1139
+ $x$jscomp$134_x1$jscomp$5$$ -= $width$jscomp$31$$ / 2, $y$jscomp$119_y1$jscomp$5$$ -= $height$jscomp$28$$ / 2 * Math.tan($color$jscomp$3_rotation$jscomp$28$$)) : $additionalRotation_positiveRotation$$ > 1.25 * Math.PI && $additionalRotation_positiveRotation$$ <= 1.75 * Math.PI && ($y0$jscomp$2$$ += $height$jscomp$28$$ / 2,
1140
+ $size$jscomp$70_x0$jscomp$2$$ += $width$jscomp$31$$ / 2 / Math.tan($color$jscomp$3_rotation$jscomp$28$$),
1141
+ $y$jscomp$119_y1$jscomp$5$$ -= $height$jscomp$28$$ / 2, $x$jscomp$134_x1$jscomp$5$$ -= $width$jscomp$31$$ / 2 / Math.tan($color$jscomp$3_rotation$jscomp$28$$)),
1142
+ $gradient$jscomp$1$$ = this.document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"),
1143
+ $gradient$jscomp$1$$.setAttribute("id", $name$jscomp$73$$), $gradient$jscomp$1$$.setAttribute("gradientUnits", "userSpaceOnUse"),
1144
+ $gradient$jscomp$1$$.setAttribute("x1", $numToAttr$$($size$jscomp$70_x0$jscomp$2$$)),
1145
+ $gradient$jscomp$1$$.setAttribute("y1", $numToAttr$$($y0$jscomp$2$$)), $gradient$jscomp$1$$.setAttribute("x2", $numToAttr$$($x$jscomp$134_x1$jscomp$5$$)),
1146
+ $gradient$jscomp$1$$.setAttribute("y2", $numToAttr$$($y$jscomp$119_y1$jscomp$5$$));
1094
1147
  }
1095
- options.colorStops.forEach((({offset, color}) => {
1096
- let stop = this.document.createElementNS("http://www.w3.org/2000/svg", "stop");
1097
- stop.setAttribute("offset", `${numToAttr(100 * offset)}%`), stop.setAttribute("stop-color", color),
1098
- gradient.appendChild(stop);
1099
- })), rect.setAttribute("fill", `url(#${name})`), this.defs.appendChild(gradient);
1100
- } else color && rect.setAttribute("fill", color);
1101
- this._element.appendChild(rect);
1102
- }
1103
- createMask(group_id) {
1104
- let options = this.options, mask = this.document.createElementNS("http://www.w3.org/2000/svg", "mask");
1105
- return mask.setAttribute("id", group_id), mask.setAttribute("maskUnits", "userSpaceOnUse"),
1106
- mask.setAttribute("x", "0"), mask.setAttribute("y", "0"), mask.setAttribute("width", numToAttr(options.width)),
1107
- mask.setAttribute("height", numToAttr(options.height)), (group_id = this.document.createElementNS("http://www.w3.org/2000/svg", "g")).setAttribute("fill", "#fff"),
1108
- mask.appendChild(group_id), [ mask, group_id ];
1148
+ $options$jscomp$40$$.colorStops.forEach((({offset: $offset$jscomp$26$$, color: $color$jscomp$4$$}) => {
1149
+ let $stop$$ = this.document.createElementNS("http://www.w3.org/2000/svg", "stop");
1150
+ $stop$$.setAttribute("offset", `${$numToAttr$$(100 * $offset$jscomp$26$$)}%`), $stop$$.setAttribute("stop-color", $color$jscomp$4$$),
1151
+ $gradient$jscomp$1$$.appendChild($stop$$);
1152
+ })), $rect$$.setAttribute("fill", `url(#${$name$jscomp$73$$})`), this.defs.appendChild($gradient$jscomp$1$$);
1153
+ } else $color$jscomp$3_rotation$jscomp$28$$ && $rect$$.setAttribute("fill", $color$jscomp$3_rotation$jscomp$28$$);
1154
+ this._element.appendChild($rect$$);
1155
+ }
1156
+ createMask($group_id$jscomp$5$$) {
1157
+ let $options$jscomp$41$$ = this.options, $mask$jscomp$7$$ = this.document.createElementNS("http://www.w3.org/2000/svg", "mask");
1158
+ return $mask$jscomp$7$$.setAttribute("id", $group_id$jscomp$5$$), $mask$jscomp$7$$.setAttribute("maskUnits", "userSpaceOnUse"),
1159
+ $mask$jscomp$7$$.setAttribute("x", "0"), $mask$jscomp$7$$.setAttribute("y", "0"),
1160
+ $mask$jscomp$7$$.setAttribute("width", $numToAttr$$($options$jscomp$41$$.width)),
1161
+ $mask$jscomp$7$$.setAttribute("height", $numToAttr$$($options$jscomp$41$$.height)),
1162
+ ($group_id$jscomp$5$$ = this.document.createElementNS("http://www.w3.org/2000/svg", "g")).setAttribute("fill", "#fff"),
1163
+ $mask$jscomp$7$$.appendChild($group_id$jscomp$5$$), [ $mask$jscomp$7$$, $group_id$jscomp$5$$ ];
1109
1164
  }
1110
1165
  }
1111
1166
 
1112
1167
  Object.assign(QRCodeMinimal.stringToBytesFuncs, stringToBytes_UTF8);
1113
1168
 
1114
- let QRCodeStyling$1 = class {
1169
+ let $QRCodeStyling$1$$ = class {
1115
1170
  get size() {
1116
1171
  if (this.qrSVG) return {
1117
1172
  width: this.qrSVG.width,
1118
1173
  height: this.qrSVG.height
1119
1174
  };
1120
1175
  }
1121
- constructor(options) {
1122
- this.options = options ? sanitizeOptions(mergeDeep(defaultOptions, options)) : defaultOptions,
1176
+ constructor($options$jscomp$42$$) {
1177
+ this.options = $options$jscomp$42$$ ? $sanitizeOptions$$($mergeDeep$$($defaultOptions$$, $options$jscomp$42$$)) : $defaultOptions$$,
1123
1178
  this.update();
1124
1179
  }
1125
- update(mode) {
1126
- this.container && (this.container.innerHTML = ""), this.options = mode ? sanitizeOptions(mergeDeep(this.options, mode)) : this.options,
1180
+ update($mode$jscomp$15_options$jscomp$43$$) {
1181
+ this.container && (this.container.innerHTML = ""), this.options = $mode$jscomp$15_options$jscomp$43$$ ? $sanitizeOptions$$($mergeDeep$$(this.options, $mode$jscomp$15_options$jscomp$43$$)) : this.options,
1127
1182
  this.options.data && (this.options.stringToBytesFuncs && (Object.assign(QRCodeMinimal.stringToBytesFuncs, this.options.stringToBytesFuncs),
1128
1183
  delete this.options.stringToBytesFuncs), this.qr = new QRCodeMinimal(this.options.qrOptions.typeNumber, this.options.qrOptions.errorCorrectionLevel),
1129
- mode = this.options.qrOptions.mode || function(data) {
1184
+ $mode$jscomp$15_options$jscomp$43$$ = this.options.qrOptions.mode || function($data$jscomp$79$$) {
1130
1185
  switch (!0) {
1131
- case /^[0-9]*$/.test(data):
1186
+ case /^[0-9]*$/.test($data$jscomp$79$$):
1132
1187
  return Mode.numeric;
1133
1188
 
1134
- case /^[0-9A-Z $%*+\-./:]*$/.test(data):
1189
+ case /^[0-9A-Z $%*+\-./:]*$/.test($data$jscomp$79$$):
1135
1190
  return Mode.alphanumeric;
1136
1191
 
1137
- case /[^\u0000-\u00ff]/.test(data):
1192
+ case /[^\u0000-\u00ff]/.test($data$jscomp$79$$):
1138
1193
  return Mode.unicode;
1139
1194
 
1140
1195
  default:
1141
1196
  return Mode.byte;
1142
1197
  }
1143
- }(this.options.data), this.qr.addData(this.options.data, mode), this.qr.make(),
1144
- this.setupSvg(), this.append(this.container));
1198
+ }(this.options.data), this.qr.addData(this.options.data, $mode$jscomp$15_options$jscomp$43$$),
1199
+ this.qr.make(), this.setupSvg(), this.append(this.container));
1145
1200
  }
1146
- append(container) {
1147
- container && (this.qrSVG?.element && container.appendChild(this.qrSVG.element),
1148
- this.container = container);
1201
+ append($container$jscomp$1$$) {
1202
+ $container$jscomp$1$$ && (this.qrSVG?.element && $container$jscomp$1$$.appendChild(this.qrSVG.element),
1203
+ this.container = $container$jscomp$1$$);
1149
1204
  }
1150
- applyExtension(extension) {
1151
- if (!extension) throw "Extension function should be defined.";
1152
- this.extension = extension, this.update();
1205
+ applyExtension($extension$$) {
1206
+ if (!$extension$$) throw "Extension function should be defined.";
1207
+ this.extension = $extension$$, this.update();
1153
1208
  }
1154
1209
  deleteExtension() {
1155
1210
  this.extension = void 0, this.update();
@@ -1161,16 +1216,17 @@ let QRCodeStyling$1 = class {
1161
1216
  }
1162
1217
  setupSvg() {
1163
1218
  if (this.qr) {
1164
- var count = this.qr.getModuleCount();
1165
- this.options.imageOptions.mode == ImageMode.background && this.options.shape != ShapeType.circle && (count += 2),
1166
- 0 == (count = Math.ceil((this.options.shape == ShapeType.circle ? Math.sqrt(2) : 1) * count)) % 2 && --count;
1167
- var margin = this.options.backgroundOptions && this.options.backgroundOptions.margin || 0;
1168
- this.options.imageOptions.mode == ImageMode.background && (margin += this.options.imageOptions.margin || 0),
1169
- count = Math.ceil(this.options.dotsOptions.size * (count + 2 * margin)), this.qrSVG = new QRSVG({
1219
+ var $count$jscomp$43_moduleCount_size$jscomp$71$$ = this.qr.getModuleCount();
1220
+ this.options.imageOptions.mode == $ImageMode$$.background && this.options.shape != $ShapeType$$.circle && ($count$jscomp$43_moduleCount_size$jscomp$71$$ += 2),
1221
+ 0 == ($count$jscomp$43_moduleCount_size$jscomp$71$$ = Math.ceil((this.options.shape == $ShapeType$$.circle ? Math.sqrt(2) : 1) * $count$jscomp$43_moduleCount_size$jscomp$71$$)) % 2 && --$count$jscomp$43_moduleCount_size$jscomp$71$$;
1222
+ var $margin$jscomp$4$$ = this.options.backgroundOptions && this.options.backgroundOptions.margin || 0;
1223
+ this.options.imageOptions.mode == $ImageMode$$.background && ($margin$jscomp$4$$ += this.options.imageOptions.margin || 0),
1224
+ $count$jscomp$43_moduleCount_size$jscomp$71$$ = Math.ceil(this.options.dotsOptions.size * ($count$jscomp$43_moduleCount_size$jscomp$71$$ + 2 * $margin$jscomp$4$$)),
1225
+ this.qrSVG = new $QRSVG$$({
1170
1226
  ...this.options,
1171
- width: count,
1172
- height: count,
1173
- errorCorrectionPercent: ErrorCorrectionPercents[this.options.qrOptions.errorCorrectionLevel]
1227
+ width: $count$jscomp$43_moduleCount_size$jscomp$71$$,
1228
+ height: $count$jscomp$43_moduleCount_size$jscomp$71$$,
1229
+ errorCorrectionPercent: $ErrorCorrectionPercents$$[this.options.qrOptions.errorCorrectionLevel]
1174
1230
  }), this.svgDrawingPromise = this.qrSVG.drawQR(this.qr).then((() => {
1175
1231
  this.qrSVG?.element && this.extension?.(this.qrSVG.element, this.options);
1176
1232
  }));
@@ -1178,37 +1234,38 @@ let QRCodeStyling$1 = class {
1178
1234
  }
1179
1235
  };
1180
1236
 
1181
- var FileExtension;
1237
+ var $FileExtension$$, $FileExtension$jscomp$inline_12$$ = $FileExtension$$ || ($FileExtension$$ = {});
1182
1238
 
1183
- (FileExtension = FileExtension || (FileExtension = {})).svg = "svg", FileExtension.png = "png",
1184
- FileExtension.jpeg = "jpeg", FileExtension.webp = "webp";
1239
+ $FileExtension$jscomp$inline_12$$.svg = "svg", $FileExtension$jscomp$inline_12$$.png = "png",
1240
+ $FileExtension$jscomp$inline_12$$.jpeg = "jpeg", $FileExtension$jscomp$inline_12$$.webp = "webp";
1185
1241
 
1186
- class QRCodeStyling extends QRCodeStyling$1 {
1187
- constructor(options) {
1188
- async function loadImage(buff) {
1189
- if ("string" == typeof buff) {
1190
- let pr = imageCache.get(buff);
1191
- return pr || (pr = fetch(buff).then((res => res.arrayBuffer().then((buff => Buffer.from(buff))).then((async data => ({
1192
- contentType: res.headers.get("Content-Type") || await fileTypeFromBuffer(data).then((r => r?.mime)),
1193
- data
1194
- }))))), imageCache.set(buff, pr), pr);
1242
+ class $QRCodeStyling$$ extends $QRCodeStyling$1$$ {
1243
+ constructor($options$jscomp$44$$) {
1244
+ async function $loadImage$$($buff$jscomp$1_url$jscomp$24$$) {
1245
+ if ("string" == typeof $buff$jscomp$1_url$jscomp$24$$) {
1246
+ let $pr$$ = $imageCache$$.get($buff$jscomp$1_url$jscomp$24$$);
1247
+ return $pr$$ || ($pr$$ = fetch($buff$jscomp$1_url$jscomp$24$$).then(($res$$ => $res$$.arrayBuffer().then(($buff$$ => Buffer.from($buff$$))).then((async $data$jscomp$81$$ => ({
1248
+ contentType: $res$$.headers.get("Content-Type") || await fileTypeFromBuffer($data$jscomp$81$$).then(($r$jscomp$1$$ => $r$jscomp$1$$?.mime)),
1249
+ data: $data$jscomp$81$$
1250
+ }))))), $imageCache$$.set($buff$jscomp$1_url$jscomp$24$$, $pr$$), $pr$$);
1195
1251
  }
1196
- return buff = Buffer.from(buff), {
1197
- contentType: await fileTypeFromBuffer(buff).then((r => r?.mime)),
1198
- data: buff
1252
+ return $buff$jscomp$1_url$jscomp$24$$ = Buffer.from($buff$jscomp$1_url$jscomp$24$$),
1253
+ {
1254
+ contentType: await fileTypeFromBuffer($buff$jscomp$1_url$jscomp$24$$).then(($r$jscomp$2$$ => $r$jscomp$2$$?.mime)),
1255
+ data: $buff$jscomp$1_url$jscomp$24$$
1199
1256
  };
1200
1257
  }
1201
- let dom = (new DOMImplementation).createDocument(null, ""), imageCache = new Map;
1258
+ let $dom$$ = (new DOMImplementation).createDocument(null, ""), $imageCache$$ = new Map;
1202
1259
  global.XMLSerializer = XMLSerializer$1, global.DOMParser = DOMParser$1, super({
1203
- ...options,
1204
- document: options.document || dom,
1205
- imageTools: options.imageTools || {
1206
- toDataURL: url => "string" == typeof url && url.startsWith("data:") ? Promise.resolve(url) : loadImage(url).then((({contentType, data}) => `data:${contentType?.replace("application/xml", "image/svg+xml")};base64,${data.toString("base64")}`)),
1207
- getSize: async data => (({data} = Buffer.isBuffer(options.image) ? {
1208
- data: options.image
1209
- } : await loadImage(data)), {
1210
- width: (data = await sharp(data).metadata()).width,
1211
- height: data.height
1260
+ ...$options$jscomp$44$$,
1261
+ document: $options$jscomp$44$$.document || $dom$$,
1262
+ imageTools: $options$jscomp$44$$.imageTools || {
1263
+ toDataURL: $url$jscomp$25$$ => "string" == typeof $url$jscomp$25$$ && $url$jscomp$25$$.startsWith("data:") ? Promise.resolve($url$jscomp$25$$) : $loadImage$$($url$jscomp$25$$).then((({contentType: $contentType$jscomp$4$$, data: $data$jscomp$82$$}) => `data:${$contentType$jscomp$4$$?.replace("application/xml", "image/svg+xml")};base64,${$data$jscomp$82$$.toString("base64")}`)),
1264
+ getSize: async $data$jscomp$83_meta_src$jscomp$5$$ => (({data: $data$jscomp$83_meta_src$jscomp$5$$} = Buffer.isBuffer($options$jscomp$44$$.image) ? {
1265
+ data: $options$jscomp$44$$.image
1266
+ } : await $loadImage$$($data$jscomp$83_meta_src$jscomp$5$$)), {
1267
+ width: ($data$jscomp$83_meta_src$jscomp$5$$ = await sharp($data$jscomp$83_meta_src$jscomp$5$$).metadata()).width,
1268
+ height: $data$jscomp$83_meta_src$jscomp$5$$.height
1212
1269
  })
1213
1270
  }
1214
1271
  });
@@ -1217,5 +1274,5 @@ class QRCodeStyling extends QRCodeStyling$1 {
1217
1274
 
1218
1275
  var browserUtils = void 0;
1219
1276
 
1220
- export { CornerDotType, CornerSquareType, DotType, ErrorCorrectionPercents, FileExtension, GradientType, ImageMode, QRCodeStyling, ShapeType, browserUtils };
1277
+ export { $CornerDotType$$ as CornerDotType, $CornerSquareType$$ as CornerSquareType, $DotType$$ as DotType, $ErrorCorrectionPercents$$ as ErrorCorrectionPercents, $FileExtension$$ as FileExtension, $GradientType$$ as GradientType, $ImageMode$$ as ImageMode, $QRCodeStyling$$ as QRCodeStyling, $ShapeType$$ as ShapeType, browserUtils };
1221
1278
  //# sourceMappingURL=qr-code-styling-node.js.map