@emailmaker/filemanager 0.10.81 → 0.10.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (496) hide show
  1. package/129.533eb7b36d92578d2ead.js +3893 -0
  2. package/583.177f1aa2edb14f5f073e.js +2978 -0
  3. package/assets/image-editor/images/samples/sample4.json +871 -871
  4. package/assets/image-editor/images/stickers/beach/0.svg +25 -25
  5. package/assets/image-editor/images/stickers/beach/1.svg +14 -14
  6. package/assets/image-editor/images/stickers/beach/10.svg +34 -34
  7. package/assets/image-editor/images/stickers/beach/11.svg +27 -27
  8. package/assets/image-editor/images/stickers/beach/12.svg +10 -10
  9. package/assets/image-editor/images/stickers/beach/13.svg +25 -25
  10. package/assets/image-editor/images/stickers/beach/14.svg +16 -16
  11. package/assets/image-editor/images/stickers/beach/15.svg +14 -14
  12. package/assets/image-editor/images/stickers/beach/16.svg +44 -44
  13. package/assets/image-editor/images/stickers/beach/17.svg +35 -35
  14. package/assets/image-editor/images/stickers/beach/18.svg +32 -32
  15. package/assets/image-editor/images/stickers/beach/19.svg +23 -23
  16. package/assets/image-editor/images/stickers/beach/2.svg +14 -14
  17. package/assets/image-editor/images/stickers/beach/20.svg +24 -24
  18. package/assets/image-editor/images/stickers/beach/21.svg +11 -11
  19. package/assets/image-editor/images/stickers/beach/3.svg +26 -26
  20. package/assets/image-editor/images/stickers/beach/4.svg +25 -25
  21. package/assets/image-editor/images/stickers/beach/5.svg +22 -22
  22. package/assets/image-editor/images/stickers/beach/6.svg +20 -20
  23. package/assets/image-editor/images/stickers/beach/7.svg +32 -32
  24. package/assets/image-editor/images/stickers/beach/8.svg +28 -28
  25. package/assets/image-editor/images/stickers/beach/9.svg +18 -18
  26. package/assets/image-editor/images/stickers/categories/beach.svg +17 -17
  27. package/assets/image-editor/images/stickers/categories/clouds.svg +14 -14
  28. package/assets/image-editor/images/stickers/categories/doodles.svg +12 -12
  29. package/assets/image-editor/images/stickers/categories/emoticon.svg +9 -9
  30. package/assets/image-editor/images/stickers/categories/landmark.svg +19 -19
  31. package/assets/image-editor/images/stickers/categories/speech-bubble.svg +5 -5
  32. package/assets/image-editor/images/stickers/categories/star.svg +5 -5
  33. package/assets/image-editor/images/stickers/categories/transportation.svg +17 -17
  34. package/assets/image-editor/images/stickers/doodles/0.svg +201 -201
  35. package/assets/image-editor/images/stickers/doodles/1.svg +255 -255
  36. package/assets/image-editor/images/stickers/doodles/10.svg +160 -160
  37. package/assets/image-editor/images/stickers/doodles/11.svg +393 -393
  38. package/assets/image-editor/images/stickers/doodles/12.svg +293 -293
  39. package/assets/image-editor/images/stickers/doodles/13.svg +251 -251
  40. package/assets/image-editor/images/stickers/doodles/14.svg +370 -370
  41. package/assets/image-editor/images/stickers/doodles/15.svg +194 -194
  42. package/assets/image-editor/images/stickers/doodles/16.svg +383 -383
  43. package/assets/image-editor/images/stickers/doodles/17.svg +346 -346
  44. package/assets/image-editor/images/stickers/doodles/18.svg +286 -286
  45. package/assets/image-editor/images/stickers/doodles/19.svg +241 -241
  46. package/assets/image-editor/images/stickers/doodles/2.svg +227 -227
  47. package/assets/image-editor/images/stickers/doodles/20.svg +330 -330
  48. package/assets/image-editor/images/stickers/doodles/21.svg +200 -200
  49. package/assets/image-editor/images/stickers/doodles/22.svg +308 -308
  50. package/assets/image-editor/images/stickers/doodles/23.svg +518 -518
  51. package/assets/image-editor/images/stickers/doodles/24.svg +207 -207
  52. package/assets/image-editor/images/stickers/doodles/25.svg +260 -260
  53. package/assets/image-editor/images/stickers/doodles/26.svg +380 -380
  54. package/assets/image-editor/images/stickers/doodles/27.svg +222 -222
  55. package/assets/image-editor/images/stickers/doodles/28.svg +164 -164
  56. package/assets/image-editor/images/stickers/doodles/29.svg +271 -271
  57. package/assets/image-editor/images/stickers/doodles/3.svg +272 -272
  58. package/assets/image-editor/images/stickers/doodles/30.svg +283 -283
  59. package/assets/image-editor/images/stickers/doodles/31.svg +257 -257
  60. package/assets/image-editor/images/stickers/doodles/32.svg +276 -276
  61. package/assets/image-editor/images/stickers/doodles/33.svg +198 -198
  62. package/assets/image-editor/images/stickers/doodles/34.svg +314 -314
  63. package/assets/image-editor/images/stickers/doodles/35.svg +236 -236
  64. package/assets/image-editor/images/stickers/doodles/36.svg +273 -273
  65. package/assets/image-editor/images/stickers/doodles/37.svg +284 -284
  66. package/assets/image-editor/images/stickers/doodles/38.svg +167 -167
  67. package/assets/image-editor/images/stickers/doodles/39.svg +381 -381
  68. package/assets/image-editor/images/stickers/doodles/4.svg +216 -216
  69. package/assets/image-editor/images/stickers/doodles/40.svg +198 -198
  70. package/assets/image-editor/images/stickers/doodles/41.svg +259 -259
  71. package/assets/image-editor/images/stickers/doodles/42.svg +371 -371
  72. package/assets/image-editor/images/stickers/doodles/43.svg +198 -198
  73. package/assets/image-editor/images/stickers/doodles/44.svg +174 -174
  74. package/assets/image-editor/images/stickers/doodles/45.svg +178 -178
  75. package/assets/image-editor/images/stickers/doodles/46.svg +211 -211
  76. package/assets/image-editor/images/stickers/doodles/47.svg +195 -195
  77. package/assets/image-editor/images/stickers/doodles/48.svg +293 -293
  78. package/assets/image-editor/images/stickers/doodles/49.svg +191 -191
  79. package/assets/image-editor/images/stickers/doodles/5.svg +179 -179
  80. package/assets/image-editor/images/stickers/doodles/50.svg +323 -323
  81. package/assets/image-editor/images/stickers/doodles/51.svg +308 -308
  82. package/assets/image-editor/images/stickers/doodles/52.svg +162 -162
  83. package/assets/image-editor/images/stickers/doodles/53.svg +263 -263
  84. package/assets/image-editor/images/stickers/doodles/54.svg +175 -175
  85. package/assets/image-editor/images/stickers/doodles/55.svg +177 -177
  86. package/assets/image-editor/images/stickers/doodles/56.svg +160 -160
  87. package/assets/image-editor/images/stickers/doodles/57.svg +115 -115
  88. package/assets/image-editor/images/stickers/doodles/58.svg +327 -327
  89. package/assets/image-editor/images/stickers/doodles/59.svg +197 -197
  90. package/assets/image-editor/images/stickers/doodles/6.svg +388 -388
  91. package/assets/image-editor/images/stickers/doodles/60.svg +414 -414
  92. package/assets/image-editor/images/stickers/doodles/61.svg +287 -287
  93. package/assets/image-editor/images/stickers/doodles/62.svg +193 -193
  94. package/assets/image-editor/images/stickers/doodles/63.svg +329 -329
  95. package/assets/image-editor/images/stickers/doodles/64.svg +150 -150
  96. package/assets/image-editor/images/stickers/doodles/65.svg +275 -275
  97. package/assets/image-editor/images/stickers/doodles/66.svg +174 -174
  98. package/assets/image-editor/images/stickers/doodles/67.svg +343 -343
  99. package/assets/image-editor/images/stickers/doodles/68.svg +242 -242
  100. package/assets/image-editor/images/stickers/doodles/69.svg +160 -160
  101. package/assets/image-editor/images/stickers/doodles/7.svg +194 -194
  102. package/assets/image-editor/images/stickers/doodles/70.svg +365 -365
  103. package/assets/image-editor/images/stickers/doodles/71.svg +454 -454
  104. package/assets/image-editor/images/stickers/doodles/72.svg +162 -162
  105. package/assets/image-editor/images/stickers/doodles/73.svg +393 -393
  106. package/assets/image-editor/images/stickers/doodles/74.svg +206 -206
  107. package/assets/image-editor/images/stickers/doodles/75.svg +275 -275
  108. package/assets/image-editor/images/stickers/doodles/76.svg +350 -350
  109. package/assets/image-editor/images/stickers/doodles/77.svg +323 -323
  110. package/assets/image-editor/images/stickers/doodles/78.svg +316 -316
  111. package/assets/image-editor/images/stickers/doodles/79.svg +503 -503
  112. package/assets/image-editor/images/stickers/doodles/8.svg +185 -185
  113. package/assets/image-editor/images/stickers/doodles/80.svg +235 -235
  114. package/assets/image-editor/images/stickers/doodles/81.svg +184 -184
  115. package/assets/image-editor/images/stickers/doodles/82.svg +246 -246
  116. package/assets/image-editor/images/stickers/doodles/83.svg +125 -125
  117. package/assets/image-editor/images/stickers/doodles/84.svg +168 -168
  118. package/assets/image-editor/images/stickers/doodles/85.svg +138 -138
  119. package/assets/image-editor/images/stickers/doodles/86.svg +223 -223
  120. package/assets/image-editor/images/stickers/doodles/87.svg +475 -475
  121. package/assets/image-editor/images/stickers/doodles/88.svg +172 -172
  122. package/assets/image-editor/images/stickers/doodles/89.svg +199 -199
  123. package/assets/image-editor/images/stickers/doodles/9.svg +368 -368
  124. package/assets/image-editor/images/stickers/doodles/90.svg +298 -298
  125. package/assets/image-editor/images/stickers/doodles/91.svg +176 -176
  126. package/assets/image-editor/images/stickers/doodles/92.svg +152 -152
  127. package/assets/image-editor/images/stickers/doodles/93.svg +206 -206
  128. package/assets/image-editor/images/stickers/doodles/94.svg +202 -202
  129. package/assets/image-editor/images/stickers/doodles/95.svg +114 -114
  130. package/assets/image-editor/images/stickers/doodles/96.svg +149 -149
  131. package/assets/image-editor/images/stickers/doodles/97.svg +197 -197
  132. package/assets/image-editor/images/stickers/doodles/98.svg +397 -397
  133. package/assets/image-editor/images/stickers/doodles/99.svg +502 -502
  134. package/assets/image-editor/images/stickers/emoticons/afro-1.svg +122 -122
  135. package/assets/image-editor/images/stickers/emoticons/afro.svg +85 -85
  136. package/assets/image-editor/images/stickers/emoticons/agent.svg +114 -114
  137. package/assets/image-editor/images/stickers/emoticons/alien-1.svg +60 -60
  138. package/assets/image-editor/images/stickers/emoticons/alien.svg +64 -64
  139. package/assets/image-editor/images/stickers/emoticons/angel.svg +47 -47
  140. package/assets/image-editor/images/stickers/emoticons/angry-1.svg +83 -83
  141. package/assets/image-editor/images/stickers/emoticons/angry-2.svg +48 -48
  142. package/assets/image-editor/images/stickers/emoticons/angry-3.svg +45 -45
  143. package/assets/image-editor/images/stickers/emoticons/angry-4.svg +52 -52
  144. package/assets/image-editor/images/stickers/emoticons/angry-5.svg +62 -62
  145. package/assets/image-editor/images/stickers/emoticons/angry.svg +78 -78
  146. package/assets/image-editor/images/stickers/emoticons/arguing.svg +49 -49
  147. package/assets/image-editor/images/stickers/emoticons/arrogant.svg +98 -98
  148. package/assets/image-editor/images/stickers/emoticons/asian-1.svg +52 -52
  149. package/assets/image-editor/images/stickers/emoticons/asian.svg +54 -54
  150. package/assets/image-editor/images/stickers/emoticons/avatar.svg +49 -49
  151. package/assets/image-editor/images/stickers/emoticons/baby-1.svg +51 -51
  152. package/assets/image-editor/images/stickers/emoticons/baby-2.svg +54 -54
  153. package/assets/image-editor/images/stickers/emoticons/baby.svg +66 -66
  154. package/assets/image-editor/images/stickers/emoticons/bully.svg +68 -68
  155. package/assets/image-editor/images/stickers/emoticons/burglar.svg +75 -75
  156. package/assets/image-editor/images/stickers/emoticons/businessman.svg +52 -52
  157. package/assets/image-editor/images/stickers/emoticons/cheeky-1.svg +83 -83
  158. package/assets/image-editor/images/stickers/emoticons/cheeky.svg +73 -73
  159. package/assets/image-editor/images/stickers/emoticons/clown.svg +75 -75
  160. package/assets/image-editor/images/stickers/emoticons/confused-1.svg +74 -74
  161. package/assets/image-editor/images/stickers/emoticons/confused-2.svg +55 -55
  162. package/assets/image-editor/images/stickers/emoticons/confused-3.svg +45 -45
  163. package/assets/image-editor/images/stickers/emoticons/confused.svg +66 -66
  164. package/assets/image-editor/images/stickers/emoticons/creepy.svg +60 -60
  165. package/assets/image-editor/images/stickers/emoticons/crying-1.svg +55 -55
  166. package/assets/image-editor/images/stickers/emoticons/crying-2.svg +83 -83
  167. package/assets/image-editor/images/stickers/emoticons/crying-3.svg +53 -53
  168. package/assets/image-editor/images/stickers/emoticons/crying.svg +59 -59
  169. package/assets/image-editor/images/stickers/emoticons/dazed-1.svg +63 -63
  170. package/assets/image-editor/images/stickers/emoticons/dazed-2.svg +51 -51
  171. package/assets/image-editor/images/stickers/emoticons/dazed-3.svg +55 -55
  172. package/assets/image-editor/images/stickers/emoticons/dazed.svg +56 -56
  173. package/assets/image-editor/images/stickers/emoticons/dead-1.svg +61 -61
  174. package/assets/image-editor/images/stickers/emoticons/dead-2.svg +80 -80
  175. package/assets/image-editor/images/stickers/emoticons/dead-3.svg +66 -66
  176. package/assets/image-editor/images/stickers/emoticons/dead-4.svg +54 -54
  177. package/assets/image-editor/images/stickers/emoticons/dead-5.svg +52 -52
  178. package/assets/image-editor/images/stickers/emoticons/dead-6.svg +53 -53
  179. package/assets/image-editor/images/stickers/emoticons/dead.svg +54 -54
  180. package/assets/image-editor/images/stickers/emoticons/desperate-1.svg +47 -47
  181. package/assets/image-editor/images/stickers/emoticons/desperate.svg +75 -75
  182. package/assets/image-editor/images/stickers/emoticons/detective.svg +75 -75
  183. package/assets/image-editor/images/stickers/emoticons/dissapointment.svg +70 -70
  184. package/assets/image-editor/images/stickers/emoticons/doctor.svg +61 -61
  185. package/assets/image-editor/images/stickers/emoticons/drunk.svg +55 -55
  186. package/assets/image-editor/images/stickers/emoticons/dumb.svg +50 -50
  187. package/assets/image-editor/images/stickers/emoticons/emo-1.svg +104 -104
  188. package/assets/image-editor/images/stickers/emoticons/emo-2.svg +111 -111
  189. package/assets/image-editor/images/stickers/emoticons/emo.svg +56 -56
  190. package/assets/image-editor/images/stickers/emoticons/emoticon.svg +84 -84
  191. package/assets/image-editor/images/stickers/emoticons/evil.svg +59 -59
  192. package/assets/image-editor/images/stickers/emoticons/faint-1.svg +75 -75
  193. package/assets/image-editor/images/stickers/emoticons/faint.svg +84 -84
  194. package/assets/image-editor/images/stickers/emoticons/flirt-1.svg +81 -81
  195. package/assets/image-editor/images/stickers/emoticons/flirt-2.svg +68 -68
  196. package/assets/image-editor/images/stickers/emoticons/flirt.svg +71 -71
  197. package/assets/image-editor/images/stickers/emoticons/flirty.svg +60 -60
  198. package/assets/image-editor/images/stickers/emoticons/gangster.svg +54 -54
  199. package/assets/image-editor/images/stickers/emoticons/geek-1.svg +76 -76
  200. package/assets/image-editor/images/stickers/emoticons/geek.svg +69 -69
  201. package/assets/image-editor/images/stickers/emoticons/gentleman-1.svg +82 -82
  202. package/assets/image-editor/images/stickers/emoticons/gentleman-2.svg +58 -58
  203. package/assets/image-editor/images/stickers/emoticons/gentleman-3.svg +54 -54
  204. package/assets/image-editor/images/stickers/emoticons/gentleman-4.svg +59 -59
  205. package/assets/image-editor/images/stickers/emoticons/gentleman.svg +57 -57
  206. package/assets/image-editor/images/stickers/emoticons/ginger.svg +55 -55
  207. package/assets/image-editor/images/stickers/emoticons/girl-1.svg +70 -70
  208. package/assets/image-editor/images/stickers/emoticons/girl.svg +73 -73
  209. package/assets/image-editor/images/stickers/emoticons/goofy-1.svg +46 -46
  210. package/assets/image-editor/images/stickers/emoticons/goofy-2.svg +79 -79
  211. package/assets/image-editor/images/stickers/emoticons/goofy-3.svg +79 -79
  212. package/assets/image-editor/images/stickers/emoticons/goofy-4.svg +46 -46
  213. package/assets/image-editor/images/stickers/emoticons/goofy.svg +79 -79
  214. package/assets/image-editor/images/stickers/emoticons/grubby-1.svg +114 -114
  215. package/assets/image-editor/images/stickers/emoticons/grubby.svg +165 -165
  216. package/assets/image-editor/images/stickers/emoticons/happy-1.svg +49 -49
  217. package/assets/image-editor/images/stickers/emoticons/happy-10.svg +62 -62
  218. package/assets/image-editor/images/stickers/emoticons/happy-11.svg +55 -55
  219. package/assets/image-editor/images/stickers/emoticons/happy-12.svg +53 -53
  220. package/assets/image-editor/images/stickers/emoticons/happy-13.svg +58 -58
  221. package/assets/image-editor/images/stickers/emoticons/happy-14.svg +62 -62
  222. package/assets/image-editor/images/stickers/emoticons/happy-15.svg +49 -49
  223. package/assets/image-editor/images/stickers/emoticons/happy-16.svg +49 -49
  224. package/assets/image-editor/images/stickers/emoticons/happy-2.svg +71 -71
  225. package/assets/image-editor/images/stickers/emoticons/happy-3.svg +74 -74
  226. package/assets/image-editor/images/stickers/emoticons/happy-4.svg +77 -77
  227. package/assets/image-editor/images/stickers/emoticons/happy-5.svg +52 -52
  228. package/assets/image-editor/images/stickers/emoticons/happy-6.svg +54 -54
  229. package/assets/image-editor/images/stickers/emoticons/happy-7.svg +58 -58
  230. package/assets/image-editor/images/stickers/emoticons/happy-8.svg +42 -42
  231. package/assets/image-editor/images/stickers/emoticons/happy-9.svg +45 -45
  232. package/assets/image-editor/images/stickers/emoticons/happy.svg +48 -48
  233. package/assets/image-editor/images/stickers/emoticons/harry-potter.svg +68 -68
  234. package/assets/image-editor/images/stickers/emoticons/heisenberg.svg +80 -80
  235. package/assets/image-editor/images/stickers/emoticons/hipster-1.svg +118 -118
  236. package/assets/image-editor/images/stickers/emoticons/hipster-2.svg +49 -49
  237. package/assets/image-editor/images/stickers/emoticons/hipster.svg +48 -48
  238. package/assets/image-editor/images/stickers/emoticons/in-love-1.svg +62 -62
  239. package/assets/image-editor/images/stickers/emoticons/in-love-2.svg +48 -48
  240. package/assets/image-editor/images/stickers/emoticons/in-love-3.svg +49 -49
  241. package/assets/image-editor/images/stickers/emoticons/in-love-4.svg +50 -50
  242. package/assets/image-editor/images/stickers/emoticons/in-love-5.svg +49 -49
  243. package/assets/image-editor/images/stickers/emoticons/in-love-6.svg +53 -53
  244. package/assets/image-editor/images/stickers/emoticons/in-love.svg +57 -57
  245. package/assets/image-editor/images/stickers/emoticons/japan.svg +79 -79
  246. package/assets/image-editor/images/stickers/emoticons/jew.svg +83 -83
  247. package/assets/image-editor/images/stickers/emoticons/joyful-1.svg +72 -72
  248. package/assets/image-editor/images/stickers/emoticons/joyful-2.svg +45 -45
  249. package/assets/image-editor/images/stickers/emoticons/joyful.svg +47 -47
  250. package/assets/image-editor/images/stickers/emoticons/kiss-1.svg +48 -48
  251. package/assets/image-editor/images/stickers/emoticons/kiss-2.svg +59 -59
  252. package/assets/image-editor/images/stickers/emoticons/kiss-3.svg +53 -53
  253. package/assets/image-editor/images/stickers/emoticons/kiss-4.svg +59 -59
  254. package/assets/image-editor/images/stickers/emoticons/kiss.svg +67 -67
  255. package/assets/image-editor/images/stickers/emoticons/laughing-1.svg +54 -54
  256. package/assets/image-editor/images/stickers/emoticons/laughing-2.svg +57 -57
  257. package/assets/image-editor/images/stickers/emoticons/laughing-3.svg +55 -55
  258. package/assets/image-editor/images/stickers/emoticons/laughing.svg +56 -56
  259. package/assets/image-editor/images/stickers/emoticons/listening.svg +55 -55
  260. package/assets/image-editor/images/stickers/emoticons/love.svg +74 -74
  261. package/assets/image-editor/images/stickers/emoticons/manly.svg +75 -75
  262. package/assets/image-editor/images/stickers/emoticons/miserly-1.svg +90 -90
  263. package/assets/image-editor/images/stickers/emoticons/miserly.svg +82 -82
  264. package/assets/image-editor/images/stickers/emoticons/nerd-1.svg +88 -88
  265. package/assets/image-editor/images/stickers/emoticons/nerd-2.svg +73 -73
  266. package/assets/image-editor/images/stickers/emoticons/nerd-3.svg +60 -60
  267. package/assets/image-editor/images/stickers/emoticons/nerd-4.svg +70 -70
  268. package/assets/image-editor/images/stickers/emoticons/nerd.svg +88 -88
  269. package/assets/image-editor/images/stickers/emoticons/ninja.svg +51 -51
  270. package/assets/image-editor/images/stickers/emoticons/pirate-1.svg +92 -92
  271. package/assets/image-editor/images/stickers/emoticons/pirate-2.svg +48 -48
  272. package/assets/image-editor/images/stickers/emoticons/pirate.svg +286 -286
  273. package/assets/image-editor/images/stickers/emoticons/punk-1.svg +134 -134
  274. package/assets/image-editor/images/stickers/emoticons/punk-2.svg +153 -153
  275. package/assets/image-editor/images/stickers/emoticons/punk.svg +82 -82
  276. package/assets/image-editor/images/stickers/emoticons/rapper.svg +51 -51
  277. package/assets/image-editor/images/stickers/emoticons/relieved.svg +56 -56
  278. package/assets/image-editor/images/stickers/emoticons/rich-1.svg +59 -59
  279. package/assets/image-editor/images/stickers/emoticons/rich-2.svg +93 -93
  280. package/assets/image-editor/images/stickers/emoticons/rich.svg +88 -88
  281. package/assets/image-editor/images/stickers/emoticons/rockstar.svg +177 -177
  282. package/assets/image-editor/images/stickers/emoticons/sad-1.svg +43 -43
  283. package/assets/image-editor/images/stickers/emoticons/sad-2.svg +49 -49
  284. package/assets/image-editor/images/stickers/emoticons/sad-3.svg +49 -49
  285. package/assets/image-editor/images/stickers/emoticons/sad-4.svg +49 -49
  286. package/assets/image-editor/images/stickers/emoticons/sad-5.svg +45 -45
  287. package/assets/image-editor/images/stickers/emoticons/sad-6.svg +47 -47
  288. package/assets/image-editor/images/stickers/emoticons/sad.svg +47 -47
  289. package/assets/image-editor/images/stickers/emoticons/scared-1.svg +79 -79
  290. package/assets/image-editor/images/stickers/emoticons/scared-2.svg +59 -59
  291. package/assets/image-editor/images/stickers/emoticons/scared-3.svg +52 -52
  292. package/assets/image-editor/images/stickers/emoticons/scared.svg +45 -45
  293. package/assets/image-editor/images/stickers/emoticons/sceptic-1.svg +59 -59
  294. package/assets/image-editor/images/stickers/emoticons/sceptic-2.svg +80 -80
  295. package/assets/image-editor/images/stickers/emoticons/sceptic-3.svg +59 -59
  296. package/assets/image-editor/images/stickers/emoticons/sceptic-4.svg +46 -46
  297. package/assets/image-editor/images/stickers/emoticons/sceptic-5.svg +43 -43
  298. package/assets/image-editor/images/stickers/emoticons/sceptic-6.svg +42 -42
  299. package/assets/image-editor/images/stickers/emoticons/sceptic-7.svg +50 -50
  300. package/assets/image-editor/images/stickers/emoticons/sceptic.svg +44 -44
  301. package/assets/image-editor/images/stickers/emoticons/secret.svg +48 -48
  302. package/assets/image-editor/images/stickers/emoticons/shocked-1.svg +67 -67
  303. package/assets/image-editor/images/stickers/emoticons/shocked-2.svg +44 -44
  304. package/assets/image-editor/images/stickers/emoticons/shocked-3.svg +48 -48
  305. package/assets/image-editor/images/stickers/emoticons/shocked.svg +46 -46
  306. package/assets/image-editor/images/stickers/emoticons/sick-1.svg +55 -55
  307. package/assets/image-editor/images/stickers/emoticons/sick-2.svg +48 -48
  308. package/assets/image-editor/images/stickers/emoticons/sick-3.svg +49 -49
  309. package/assets/image-editor/images/stickers/emoticons/sick-4.svg +52 -52
  310. package/assets/image-editor/images/stickers/emoticons/sick.svg +52 -52
  311. package/assets/image-editor/images/stickers/emoticons/silent.svg +43 -43
  312. package/assets/image-editor/images/stickers/emoticons/skeleton.svg +64 -64
  313. package/assets/image-editor/images/stickers/emoticons/smile.svg +43 -43
  314. package/assets/image-editor/images/stickers/emoticons/smiling-1.svg +47 -47
  315. package/assets/image-editor/images/stickers/emoticons/smiling.svg +75 -75
  316. package/assets/image-editor/images/stickers/emoticons/smoked.svg +131 -131
  317. package/assets/image-editor/images/stickers/emoticons/smug-1.svg +74 -74
  318. package/assets/image-editor/images/stickers/emoticons/smug-2.svg +82 -82
  319. package/assets/image-editor/images/stickers/emoticons/smug-3.svg +71 -71
  320. package/assets/image-editor/images/stickers/emoticons/smug-4.svg +50 -50
  321. package/assets/image-editor/images/stickers/emoticons/smug-5.svg +64 -64
  322. package/assets/image-editor/images/stickers/emoticons/smug-6.svg +82 -82
  323. package/assets/image-editor/images/stickers/emoticons/smug.svg +96 -96
  324. package/assets/image-editor/images/stickers/emoticons/sporty.svg +68 -68
  325. package/assets/image-editor/images/stickers/emoticons/stunned.svg +72 -72
  326. package/assets/image-editor/images/stickers/emoticons/superhero-1.svg +60 -60
  327. package/assets/image-editor/images/stickers/emoticons/superhero-2.svg +47 -47
  328. package/assets/image-editor/images/stickers/emoticons/superhero-3.svg +48 -48
  329. package/assets/image-editor/images/stickers/emoticons/superhero-4.svg +52 -52
  330. package/assets/image-editor/images/stickers/emoticons/superhero.svg +45 -45
  331. package/assets/image-editor/images/stickers/emoticons/surprised-1.svg +47 -47
  332. package/assets/image-editor/images/stickers/emoticons/surprised.svg +58 -58
  333. package/assets/image-editor/images/stickers/emoticons/thinking.svg +43 -43
  334. package/assets/image-editor/images/stickers/emoticons/tired-1.svg +78 -78
  335. package/assets/image-editor/images/stickers/emoticons/tired-2.svg +65 -65
  336. package/assets/image-editor/images/stickers/emoticons/tired-3.svg +59 -59
  337. package/assets/image-editor/images/stickers/emoticons/tired.svg +83 -83
  338. package/assets/image-editor/images/stickers/emoticons/tough-1.svg +65 -65
  339. package/assets/image-editor/images/stickers/emoticons/tough.svg +158 -158
  340. package/assets/image-editor/images/stickers/emoticons/trendy.svg +57 -57
  341. package/assets/image-editor/images/stickers/emoticons/vampire-1.svg +56 -56
  342. package/assets/image-editor/images/stickers/emoticons/vampire.svg +59 -59
  343. package/assets/image-editor/images/stickers/emoticons/wink-1.svg +54 -54
  344. package/assets/image-editor/images/stickers/emoticons/wink-2.svg +64 -64
  345. package/assets/image-editor/images/stickers/emoticons/wink.svg +73 -73
  346. package/assets/image-editor/images/stickers/emoticons/winking-1.svg +52 -52
  347. package/assets/image-editor/images/stickers/emoticons/winking.svg +43 -43
  348. package/assets/image-editor/images/stickers/emoticons/yawning-1.svg +62 -62
  349. package/assets/image-editor/images/stickers/emoticons/yawning-2.svg +51 -51
  350. package/assets/image-editor/images/stickers/emoticons/yawning-3.svg +51 -51
  351. package/assets/image-editor/images/stickers/emoticons/yawning.svg +73 -73
  352. package/assets/image-editor/images/stickers/emoticons/yelling.svg +80 -80
  353. package/assets/image-editor/images/stickers/emoticons/zombie.svg +65 -65
  354. package/assets/image-editor/images/stickers/landmarks/0.svg +38 -38
  355. package/assets/image-editor/images/stickers/landmarks/1.svg +46 -46
  356. package/assets/image-editor/images/stickers/landmarks/10.svg +18 -18
  357. package/assets/image-editor/images/stickers/landmarks/11.svg +81 -81
  358. package/assets/image-editor/images/stickers/landmarks/12.svg +77 -77
  359. package/assets/image-editor/images/stickers/landmarks/13.svg +42 -42
  360. package/assets/image-editor/images/stickers/landmarks/14.svg +78 -78
  361. package/assets/image-editor/images/stickers/landmarks/15.svg +84 -84
  362. package/assets/image-editor/images/stickers/landmarks/16.svg +87 -87
  363. package/assets/image-editor/images/stickers/landmarks/17.svg +60 -60
  364. package/assets/image-editor/images/stickers/landmarks/18.svg +30 -30
  365. package/assets/image-editor/images/stickers/landmarks/19.svg +36 -36
  366. package/assets/image-editor/images/stickers/landmarks/2.svg +28 -28
  367. package/assets/image-editor/images/stickers/landmarks/20.svg +137 -137
  368. package/assets/image-editor/images/stickers/landmarks/21.svg +63 -63
  369. package/assets/image-editor/images/stickers/landmarks/22.svg +26 -26
  370. package/assets/image-editor/images/stickers/landmarks/23.svg +52 -52
  371. package/assets/image-editor/images/stickers/landmarks/24.svg +56 -56
  372. package/assets/image-editor/images/stickers/landmarks/25.svg +40 -40
  373. package/assets/image-editor/images/stickers/landmarks/26.svg +34 -34
  374. package/assets/image-editor/images/stickers/landmarks/27.svg +32 -32
  375. package/assets/image-editor/images/stickers/landmarks/28.svg +19 -19
  376. package/assets/image-editor/images/stickers/landmarks/29.svg +23 -23
  377. package/assets/image-editor/images/stickers/landmarks/3.svg +36 -36
  378. package/assets/image-editor/images/stickers/landmarks/30.svg +36 -36
  379. package/assets/image-editor/images/stickers/landmarks/31.svg +27 -27
  380. package/assets/image-editor/images/stickers/landmarks/32.svg +25 -25
  381. package/assets/image-editor/images/stickers/landmarks/33.svg +29 -29
  382. package/assets/image-editor/images/stickers/landmarks/34.svg +72 -72
  383. package/assets/image-editor/images/stickers/landmarks/35.svg +18 -18
  384. package/assets/image-editor/images/stickers/landmarks/36.svg +45 -45
  385. package/assets/image-editor/images/stickers/landmarks/37.svg +46 -46
  386. package/assets/image-editor/images/stickers/landmarks/38.svg +44 -44
  387. package/assets/image-editor/images/stickers/landmarks/39.svg +23 -23
  388. package/assets/image-editor/images/stickers/landmarks/4.svg +33 -33
  389. package/assets/image-editor/images/stickers/landmarks/40.svg +25 -25
  390. package/assets/image-editor/images/stickers/landmarks/41.svg +69 -69
  391. package/assets/image-editor/images/stickers/landmarks/42.svg +75 -75
  392. package/assets/image-editor/images/stickers/landmarks/43.svg +44 -44
  393. package/assets/image-editor/images/stickers/landmarks/44.svg +65 -65
  394. package/assets/image-editor/images/stickers/landmarks/45.svg +19 -19
  395. package/assets/image-editor/images/stickers/landmarks/46.svg +47 -47
  396. package/assets/image-editor/images/stickers/landmarks/47.svg +544 -544
  397. package/assets/image-editor/images/stickers/landmarks/48.svg +162 -162
  398. package/assets/image-editor/images/stickers/landmarks/49.svg +70 -70
  399. package/assets/image-editor/images/stickers/landmarks/5.svg +36 -36
  400. package/assets/image-editor/images/stickers/landmarks/50.svg +52 -52
  401. package/assets/image-editor/images/stickers/landmarks/51.svg +110 -110
  402. package/assets/image-editor/images/stickers/landmarks/52.svg +41 -41
  403. package/assets/image-editor/images/stickers/landmarks/53.svg +74 -74
  404. package/assets/image-editor/images/stickers/landmarks/54.svg +36 -36
  405. package/assets/image-editor/images/stickers/landmarks/55.svg +84 -84
  406. package/assets/image-editor/images/stickers/landmarks/56.svg +93 -93
  407. package/assets/image-editor/images/stickers/landmarks/57.svg +67 -67
  408. package/assets/image-editor/images/stickers/landmarks/58.svg +101 -101
  409. package/assets/image-editor/images/stickers/landmarks/59.svg +47 -47
  410. package/assets/image-editor/images/stickers/landmarks/6.svg +59 -59
  411. package/assets/image-editor/images/stickers/landmarks/60.svg +134 -134
  412. package/assets/image-editor/images/stickers/landmarks/61.svg +79 -79
  413. package/assets/image-editor/images/stickers/landmarks/62.svg +43 -43
  414. package/assets/image-editor/images/stickers/landmarks/63.svg +83 -83
  415. package/assets/image-editor/images/stickers/landmarks/64.svg +99 -99
  416. package/assets/image-editor/images/stickers/landmarks/65.svg +79 -79
  417. package/assets/image-editor/images/stickers/landmarks/66.svg +37 -37
  418. package/assets/image-editor/images/stickers/landmarks/67.svg +82 -82
  419. package/assets/image-editor/images/stickers/landmarks/68.svg +216 -216
  420. package/assets/image-editor/images/stickers/landmarks/69.svg +17 -17
  421. package/assets/image-editor/images/stickers/landmarks/7.svg +16 -16
  422. package/assets/image-editor/images/stickers/landmarks/70.svg +45 -45
  423. package/assets/image-editor/images/stickers/landmarks/71.svg +37 -37
  424. package/assets/image-editor/images/stickers/landmarks/72.svg +28 -28
  425. package/assets/image-editor/images/stickers/landmarks/73.svg +25 -25
  426. package/assets/image-editor/images/stickers/landmarks/74.svg +23 -23
  427. package/assets/image-editor/images/stickers/landmarks/75.svg +88 -88
  428. package/assets/image-editor/images/stickers/landmarks/76.svg +25 -25
  429. package/assets/image-editor/images/stickers/landmarks/77.svg +23 -23
  430. package/assets/image-editor/images/stickers/landmarks/78.svg +63 -63
  431. package/assets/image-editor/images/stickers/landmarks/79.svg +25 -25
  432. package/assets/image-editor/images/stickers/landmarks/8.svg +52 -52
  433. package/assets/image-editor/images/stickers/landmarks/80.svg +29 -29
  434. package/assets/image-editor/images/stickers/landmarks/81.svg +44 -44
  435. package/assets/image-editor/images/stickers/landmarks/82.svg +83 -83
  436. package/assets/image-editor/images/stickers/landmarks/83.svg +65 -65
  437. package/assets/image-editor/images/stickers/landmarks/84.svg +31 -31
  438. package/assets/image-editor/images/stickers/landmarks/85.svg +30 -30
  439. package/assets/image-editor/images/stickers/landmarks/86.svg +26 -26
  440. package/assets/image-editor/images/stickers/landmarks/87.svg +132 -132
  441. package/assets/image-editor/images/stickers/landmarks/88.svg +93 -93
  442. package/assets/image-editor/images/stickers/landmarks/89.svg +91 -91
  443. package/assets/image-editor/images/stickers/landmarks/9.svg +70 -70
  444. package/assets/image-editor/images/stickers/landmarks/90.svg +65 -65
  445. package/assets/image-editor/images/stickers/landmarks/91.svg +36 -36
  446. package/assets/image-editor/images/stickers/landmarks/92.svg +66 -66
  447. package/assets/image-editor/images/stickers/landmarks/93.svg +65 -65
  448. package/assets/image-editor/images/stickers/landmarks/94.svg +28 -28
  449. package/assets/image-editor/images/stickers/landmarks/95.svg +31 -31
  450. package/assets/image-editor/images/stickers/landmarks/96.svg +25 -25
  451. package/assets/image-editor/images/stickers/landmarks/97.svg +31 -31
  452. package/assets/image-editor/images/stickers/landmarks/98.svg +52 -52
  453. package/assets/image-editor/images/stickers/landmarks/99.svg +56 -56
  454. package/assets/image-editor/images/stickers/transportation/0.svg +26 -26
  455. package/assets/image-editor/images/stickers/transportation/1.svg +10 -10
  456. package/assets/image-editor/images/stickers/transportation/10.svg +16 -16
  457. package/assets/image-editor/images/stickers/transportation/11.svg +30 -30
  458. package/assets/image-editor/images/stickers/transportation/12.svg +22 -22
  459. package/assets/image-editor/images/stickers/transportation/13.svg +24 -24
  460. package/assets/image-editor/images/stickers/transportation/14.svg +19 -19
  461. package/assets/image-editor/images/stickers/transportation/15.svg +23 -23
  462. package/assets/image-editor/images/stickers/transportation/16.svg +25 -25
  463. package/assets/image-editor/images/stickers/transportation/17.svg +34 -34
  464. package/assets/image-editor/images/stickers/transportation/18.svg +29 -29
  465. package/assets/image-editor/images/stickers/transportation/19.svg +24 -24
  466. package/assets/image-editor/images/stickers/transportation/2.svg +27 -27
  467. package/assets/image-editor/images/stickers/transportation/20.svg +25 -25
  468. package/assets/image-editor/images/stickers/transportation/21.svg +22 -22
  469. package/assets/image-editor/images/stickers/transportation/3.svg +18 -18
  470. package/assets/image-editor/images/stickers/transportation/4.svg +24 -24
  471. package/assets/image-editor/images/stickers/transportation/5.svg +15 -15
  472. package/assets/image-editor/images/stickers/transportation/6.svg +25 -25
  473. package/assets/image-editor/images/stickers/transportation/7.svg +17 -17
  474. package/assets/image-editor/images/stickers/transportation/8.svg +28 -28
  475. package/assets/image-editor/images/stickers/transportation/9.svg +23 -23
  476. package/components/ImageCodeGenerator/ImageCodeGenerator.d.ts +4 -0
  477. package/constants/index.d.ts +2 -0
  478. package/debug-script.js +445 -445
  479. package/file-manager-IconsTab-ww_epetO.js +2 -0
  480. package/file-manager-ImageCodeGenerator-BxkI9HtY.js +2 -0
  481. package/file-manager-JsBarcode-CMRzMjTV.js +2 -0
  482. package/file-manager-index-CqMa6hmd.js +2 -0
  483. package/{file-manager-index-C27hSl1b.js → file-manager-index-Du1En8uk.js} +9 -9
  484. package/file-manager.css +160 -6
  485. package/file-manager.esm.js +1 -1
  486. package/file-manager.js +45820 -45720
  487. package/{fm-icons-tab.4e78e0d23b307449840c.js → fm-icons-tab.60bc2670cf092ed76cd0.js} +16 -12
  488. package/fm-image-code-generator.1f6c519dd7ec020319ad.js +371 -0
  489. package/mockServiceWorker.js +344 -344
  490. package/notification.d.ts +636 -636
  491. package/package.json +30 -30
  492. package/sample-files.json +104 -104
  493. package/suppress-resize-observer-errors.js +60 -60
  494. package/test-pixie-loading.html +108 -108
  495. package/types.d.ts +20 -2
  496. package/file-manager-IconsTab-DBlHkjOe.js +0 -2
@@ -0,0 +1,3893 @@
1
+ "use strict";
2
+ (Object(typeof self !== "undefined" ? self : this)["webpackChunkfileManager"] = Object(typeof self !== "undefined" ? self : this)["webpackChunkfileManager"] || []).push([[129],{
3
+
4
+ /***/ 23:
5
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "__esModule", ({
10
+ value: true
11
+ }));
12
+
13
+ var _MSI2 = __webpack_require__(3551);
14
+
15
+ var _MSI3 = _interopRequireDefault(_MSI2);
16
+
17
+ var _checksums = __webpack_require__(291);
18
+
19
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+
21
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
22
+
23
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
24
+
25
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
26
+
27
+ var MSI1010 = function (_MSI) {
28
+ _inherits(MSI1010, _MSI);
29
+
30
+ function MSI1010(data, options) {
31
+ _classCallCheck(this, MSI1010);
32
+
33
+ data += (0, _checksums.mod10)(data);
34
+ data += (0, _checksums.mod10)(data);
35
+ return _possibleConstructorReturn(this, (MSI1010.__proto__ || Object.getPrototypeOf(MSI1010)).call(this, data, options));
36
+ }
37
+
38
+ return MSI1010;
39
+ }(_MSI3.default);
40
+
41
+ exports["default"] = MSI1010;
42
+
43
+ /***/ }),
44
+
45
+ /***/ 291:
46
+ /***/ ((__unused_webpack_module, exports) => {
47
+
48
+
49
+
50
+ Object.defineProperty(exports, "__esModule", ({
51
+ value: true
52
+ }));
53
+ exports.mod10 = mod10;
54
+ exports.mod11 = mod11;
55
+ function mod10(number) {
56
+ var sum = 0;
57
+ for (var i = 0; i < number.length; i++) {
58
+ var n = parseInt(number[i]);
59
+ if ((i + number.length) % 2 === 0) {
60
+ sum += n;
61
+ } else {
62
+ sum += n * 2 % 10 + Math.floor(n * 2 / 10);
63
+ }
64
+ }
65
+ return (10 - sum % 10) % 10;
66
+ }
67
+
68
+ function mod11(number) {
69
+ var sum = 0;
70
+ var weights = [2, 3, 4, 5, 6, 7];
71
+ for (var i = 0; i < number.length; i++) {
72
+ var n = parseInt(number[number.length - 1 - i]);
73
+ sum += weights[i % weights.length] * n;
74
+ }
75
+ return (11 - sum % 11) % 11;
76
+ }
77
+
78
+ /***/ }),
79
+
80
+ /***/ 739:
81
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
82
+
83
+
84
+
85
+ Object.defineProperty(exports, "__esModule", ({
86
+ value: true
87
+ }));
88
+
89
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
90
+
91
+ var _constants = __webpack_require__(1135);
92
+
93
+ var _Barcode2 = __webpack_require__(2444);
94
+
95
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
96
+
97
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
98
+
99
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
100
+
101
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
102
+
103
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
104
+
105
+ var ITF = function (_Barcode) {
106
+ _inherits(ITF, _Barcode);
107
+
108
+ function ITF() {
109
+ _classCallCheck(this, ITF);
110
+
111
+ return _possibleConstructorReturn(this, (ITF.__proto__ || Object.getPrototypeOf(ITF)).apply(this, arguments));
112
+ }
113
+
114
+ _createClass(ITF, [{
115
+ key: 'valid',
116
+ value: function valid() {
117
+ return this.data.search(/^([0-9]{2})+$/) !== -1;
118
+ }
119
+ }, {
120
+ key: 'encode',
121
+ value: function encode() {
122
+ var _this2 = this;
123
+
124
+ // Calculate all the digit pairs
125
+ var encoded = this.data.match(/.{2}/g).map(function (pair) {
126
+ return _this2.encodePair(pair);
127
+ }).join('');
128
+
129
+ return {
130
+ data: _constants.START_BIN + encoded + _constants.END_BIN,
131
+ text: this.text
132
+ };
133
+ }
134
+
135
+ // Calculate the data of a number pair
136
+
137
+ }, {
138
+ key: 'encodePair',
139
+ value: function encodePair(pair) {
140
+ var second = _constants.BINARIES[pair[1]];
141
+
142
+ return _constants.BINARIES[pair[0]].split('').map(function (first, idx) {
143
+ return (first === '1' ? '111' : '1') + (second[idx] === '1' ? '000' : '0');
144
+ }).join('');
145
+ }
146
+ }]);
147
+
148
+ return ITF;
149
+ }(_Barcode3.default);
150
+
151
+ exports["default"] = ITF;
152
+
153
+ /***/ }),
154
+
155
+ /***/ 892:
156
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
157
+
158
+
159
+
160
+ Object.defineProperty(exports, "__esModule", ({
161
+ value: true
162
+ }));
163
+
164
+ var _optionsFromStrings = __webpack_require__(9796);
165
+
166
+ var _optionsFromStrings2 = _interopRequireDefault(_optionsFromStrings);
167
+
168
+ var _defaults = __webpack_require__(5099);
169
+
170
+ var _defaults2 = _interopRequireDefault(_defaults);
171
+
172
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
173
+
174
+ function getOptionsFromElement(element) {
175
+ var options = {};
176
+ for (var property in _defaults2.default) {
177
+ if (_defaults2.default.hasOwnProperty(property)) {
178
+ // jsbarcode-*
179
+ if (element.hasAttribute("jsbarcode-" + property.toLowerCase())) {
180
+ options[property] = element.getAttribute("jsbarcode-" + property.toLowerCase());
181
+ }
182
+
183
+ // data-*
184
+ if (element.hasAttribute("data-" + property.toLowerCase())) {
185
+ options[property] = element.getAttribute("data-" + property.toLowerCase());
186
+ }
187
+ }
188
+ }
189
+
190
+ options["value"] = element.getAttribute("jsbarcode-value") || element.getAttribute("data-value");
191
+
192
+ // Since all atributes are string they need to be converted to integers
193
+ options = (0, _optionsFromStrings2.default)(options);
194
+
195
+ return options;
196
+ }
197
+
198
+ exports["default"] = getOptionsFromElement;
199
+
200
+ /***/ }),
201
+
202
+ /***/ 1087:
203
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
204
+
205
+
206
+
207
+ Object.defineProperty(exports, "__esModule", ({
208
+ value: true
209
+ }));
210
+
211
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
212
+
213
+ var _constants = __webpack_require__(6929);
214
+
215
+ var _Barcode2 = __webpack_require__(2444);
216
+
217
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
218
+
219
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
220
+
221
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
222
+
223
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
224
+
225
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
226
+ // https://en.wikipedia.org/wiki/Code_93#Detailed_outline
227
+
228
+ var CODE93 = function (_Barcode) {
229
+ _inherits(CODE93, _Barcode);
230
+
231
+ function CODE93(data, options) {
232
+ _classCallCheck(this, CODE93);
233
+
234
+ return _possibleConstructorReturn(this, (CODE93.__proto__ || Object.getPrototypeOf(CODE93)).call(this, data, options));
235
+ }
236
+
237
+ _createClass(CODE93, [{
238
+ key: 'valid',
239
+ value: function valid() {
240
+ return (/^[0-9A-Z\-. $/+%]+$/.test(this.data)
241
+ );
242
+ }
243
+ }, {
244
+ key: 'encode',
245
+ value: function encode() {
246
+ var symbols = this.data.split('').flatMap(function (c) {
247
+ return _constants.MULTI_SYMBOLS[c] || c;
248
+ });
249
+ var encoded = symbols.map(function (s) {
250
+ return CODE93.getEncoding(s);
251
+ }).join('');
252
+
253
+ // Compute checksum symbols
254
+ var csumC = CODE93.checksum(symbols, 20);
255
+ var csumK = CODE93.checksum(symbols.concat(csumC), 15);
256
+
257
+ return {
258
+ text: this.text,
259
+ data:
260
+ // Add the start bits
261
+ CODE93.getEncoding('\xff') +
262
+ // Add the encoded bits
263
+ encoded +
264
+ // Add the checksum
265
+ CODE93.getEncoding(csumC) + CODE93.getEncoding(csumK) +
266
+ // Add the stop bits
267
+ CODE93.getEncoding('\xff') +
268
+ // Add the termination bit
269
+ '1'
270
+ };
271
+ }
272
+
273
+ // Get the binary encoding of a symbol
274
+
275
+ }], [{
276
+ key: 'getEncoding',
277
+ value: function getEncoding(symbol) {
278
+ return _constants.BINARIES[CODE93.symbolValue(symbol)];
279
+ }
280
+
281
+ // Get the symbol for a symbol value
282
+
283
+ }, {
284
+ key: 'getSymbol',
285
+ value: function getSymbol(symbolValue) {
286
+ return _constants.SYMBOLS[symbolValue];
287
+ }
288
+
289
+ // Get the symbol value of a symbol
290
+
291
+ }, {
292
+ key: 'symbolValue',
293
+ value: function symbolValue(symbol) {
294
+ return _constants.SYMBOLS.indexOf(symbol);
295
+ }
296
+
297
+ // Calculate a checksum symbol
298
+
299
+ }, {
300
+ key: 'checksum',
301
+ value: function checksum(symbols, maxWeight) {
302
+ var csum = symbols.slice().reverse().reduce(function (sum, symbol, idx) {
303
+ var weight = idx % maxWeight + 1;
304
+ return sum + CODE93.symbolValue(symbol) * weight;
305
+ }, 0);
306
+
307
+ return CODE93.getSymbol(csum % 47);
308
+ }
309
+ }]);
310
+
311
+ return CODE93;
312
+ }(_Barcode3.default);
313
+
314
+ exports["default"] = CODE93;
315
+
316
+ /***/ }),
317
+
318
+ /***/ 1133:
319
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
320
+
321
+
322
+
323
+ Object.defineProperty(exports, "__esModule", ({
324
+ value: true
325
+ }));
326
+ exports.codabar = undefined;
327
+
328
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
329
+
330
+ var _Barcode2 = __webpack_require__(2444);
331
+
332
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
333
+
334
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
335
+
336
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
337
+
338
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
339
+
340
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding specification:
341
+ // http://www.barcodeisland.com/codabar.phtml
342
+
343
+ var codabar = function (_Barcode) {
344
+ _inherits(codabar, _Barcode);
345
+
346
+ function codabar(data, options) {
347
+ _classCallCheck(this, codabar);
348
+
349
+ if (data.search(/^[0-9\-\$\:\.\+\/]+$/) === 0) {
350
+ data = "A" + data + "A";
351
+ }
352
+
353
+ var _this = _possibleConstructorReturn(this, (codabar.__proto__ || Object.getPrototypeOf(codabar)).call(this, data.toUpperCase(), options));
354
+
355
+ _this.text = _this.options.text || _this.text.replace(/[A-D]/g, '');
356
+ return _this;
357
+ }
358
+
359
+ _createClass(codabar, [{
360
+ key: "valid",
361
+ value: function valid() {
362
+ return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/) !== -1;
363
+ }
364
+ }, {
365
+ key: "encode",
366
+ value: function encode() {
367
+ var result = [];
368
+ var encodings = this.getEncodings();
369
+ for (var i = 0; i < this.data.length; i++) {
370
+ result.push(encodings[this.data.charAt(i)]);
371
+ // for all characters except the last, append a narrow-space ("0")
372
+ if (i !== this.data.length - 1) {
373
+ result.push("0");
374
+ }
375
+ }
376
+ return {
377
+ text: this.text,
378
+ data: result.join('')
379
+ };
380
+ }
381
+ }, {
382
+ key: "getEncodings",
383
+ value: function getEncodings() {
384
+ return {
385
+ "0": "101010011",
386
+ "1": "101011001",
387
+ "2": "101001011",
388
+ "3": "110010101",
389
+ "4": "101101001",
390
+ "5": "110101001",
391
+ "6": "100101011",
392
+ "7": "100101101",
393
+ "8": "100110101",
394
+ "9": "110100101",
395
+ "-": "101001101",
396
+ "$": "101100101",
397
+ ":": "1101011011",
398
+ "/": "1101101011",
399
+ ".": "1101101101",
400
+ "+": "1011011011",
401
+ "A": "1011001001",
402
+ "B": "1001001011",
403
+ "C": "1010010011",
404
+ "D": "1010011001"
405
+ };
406
+ }
407
+ }]);
408
+
409
+ return codabar;
410
+ }(_Barcode3.default);
411
+
412
+ exports.codabar = codabar;
413
+
414
+ /***/ }),
415
+
416
+ /***/ 1135:
417
+ /***/ ((__unused_webpack_module, exports) => {
418
+
419
+
420
+
421
+ Object.defineProperty(exports, "__esModule", ({
422
+ value: true
423
+ }));
424
+ var START_BIN = exports.START_BIN = '1010';
425
+ var END_BIN = exports.END_BIN = '11101';
426
+
427
+ var BINARIES = exports.BINARIES = ['00110', '10001', '01001', '11000', '00101', '10100', '01100', '00011', '10010', '01010'];
428
+
429
+ /***/ }),
430
+
431
+ /***/ 1271:
432
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
433
+
434
+
435
+
436
+ Object.defineProperty(exports, "__esModule", ({
437
+ value: true
438
+ }));
439
+
440
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
441
+
442
+ var _CODE2 = __webpack_require__(1087);
443
+
444
+ var _CODE3 = _interopRequireDefault(_CODE2);
445
+
446
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
447
+
448
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
449
+
450
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
451
+
452
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation
453
+ // https://en.wikipedia.org/wiki/Code_93#Full_ASCII_Code_93
454
+
455
+ var CODE93FullASCII = function (_CODE) {
456
+ _inherits(CODE93FullASCII, _CODE);
457
+
458
+ function CODE93FullASCII(data, options) {
459
+ _classCallCheck(this, CODE93FullASCII);
460
+
461
+ return _possibleConstructorReturn(this, (CODE93FullASCII.__proto__ || Object.getPrototypeOf(CODE93FullASCII)).call(this, data, options));
462
+ }
463
+
464
+ _createClass(CODE93FullASCII, [{
465
+ key: 'valid',
466
+ value: function valid() {
467
+ return (/^[\x00-\x7f]+$/.test(this.data)
468
+ );
469
+ }
470
+ }]);
471
+
472
+ return CODE93FullASCII;
473
+ }(_CODE3.default);
474
+
475
+ exports["default"] = CODE93FullASCII;
476
+
477
+ /***/ }),
478
+
479
+ /***/ 1428:
480
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
481
+
482
+
483
+
484
+ Object.defineProperty(exports, "__esModule", ({
485
+ value: true
486
+ }));
487
+ exports.CODE39 = undefined;
488
+
489
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
490
+
491
+ var _Barcode2 = __webpack_require__(2444);
492
+
493
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
494
+
495
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
496
+
497
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
498
+
499
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
500
+
501
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
502
+ // https://en.wikipedia.org/wiki/Code_39#Encoding
503
+
504
+ var CODE39 = function (_Barcode) {
505
+ _inherits(CODE39, _Barcode);
506
+
507
+ function CODE39(data, options) {
508
+ _classCallCheck(this, CODE39);
509
+
510
+ data = data.toUpperCase();
511
+
512
+ // Calculate mod43 checksum if enabled
513
+ if (options.mod43) {
514
+ data += getCharacter(mod43checksum(data));
515
+ }
516
+
517
+ return _possibleConstructorReturn(this, (CODE39.__proto__ || Object.getPrototypeOf(CODE39)).call(this, data, options));
518
+ }
519
+
520
+ _createClass(CODE39, [{
521
+ key: "encode",
522
+ value: function encode() {
523
+ // First character is always a *
524
+ var result = getEncoding("*");
525
+
526
+ // Take every character and add the binary representation to the result
527
+ for (var i = 0; i < this.data.length; i++) {
528
+ result += getEncoding(this.data[i]) + "0";
529
+ }
530
+
531
+ // Last character is always a *
532
+ result += getEncoding("*");
533
+
534
+ return {
535
+ data: result,
536
+ text: this.text
537
+ };
538
+ }
539
+ }, {
540
+ key: "valid",
541
+ value: function valid() {
542
+ return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1;
543
+ }
544
+ }]);
545
+
546
+ return CODE39;
547
+ }(_Barcode3.default);
548
+
549
+ // All characters. The position in the array is the (checksum) value
550
+
551
+
552
+ var characters = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "-", ".", " ", "$", "/", "+", "%", "*"];
553
+
554
+ // The decimal representation of the characters, is converted to the
555
+ // corresponding binary with the getEncoding function
556
+ var encodings = [20957, 29783, 23639, 30485, 20951, 29813, 23669, 20855, 29789, 23645, 29975, 23831, 30533, 22295, 30149, 24005, 21623, 29981, 23837, 22301, 30023, 23879, 30545, 22343, 30161, 24017, 21959, 30065, 23921, 22385, 29015, 18263, 29141, 17879, 29045, 18293, 17783, 29021, 18269, 17477, 17489, 17681, 20753, 35770];
557
+
558
+ // Get the binary representation of a character by converting the encodings
559
+ // from decimal to binary
560
+ function getEncoding(character) {
561
+ return getBinary(characterValue(character));
562
+ }
563
+
564
+ function getBinary(characterValue) {
565
+ return encodings[characterValue].toString(2);
566
+ }
567
+
568
+ function getCharacter(characterValue) {
569
+ return characters[characterValue];
570
+ }
571
+
572
+ function characterValue(character) {
573
+ return characters.indexOf(character);
574
+ }
575
+
576
+ function mod43checksum(data) {
577
+ var checksum = 0;
578
+ for (var i = 0; i < data.length; i++) {
579
+ checksum += characterValue(data[i]);
580
+ }
581
+
582
+ checksum = checksum % 43;
583
+ return checksum;
584
+ }
585
+
586
+ exports.CODE39 = CODE39;
587
+
588
+ /***/ }),
589
+
590
+ /***/ 1490:
591
+ /***/ ((__unused_webpack_module, exports) => {
592
+
593
+
594
+
595
+ Object.defineProperty(exports, "__esModule", ({
596
+ value: true
597
+ }));
598
+
599
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
600
+
601
+ exports["default"] = function (old, replaceObj) {
602
+ return _extends({}, old, replaceObj);
603
+ };
604
+
605
+ /***/ }),
606
+
607
+ /***/ 1509:
608
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
609
+
610
+
611
+
612
+ Object.defineProperty(exports, "__esModule", ({
613
+ value: true
614
+ }));
615
+ exports.CODE128C = exports.CODE128B = exports.CODE128A = exports.CODE128 = undefined;
616
+
617
+ var _CODE128_AUTO = __webpack_require__(4845);
618
+
619
+ var _CODE128_AUTO2 = _interopRequireDefault(_CODE128_AUTO);
620
+
621
+ var _CODE128A = __webpack_require__(3804);
622
+
623
+ var _CODE128A2 = _interopRequireDefault(_CODE128A);
624
+
625
+ var _CODE128B = __webpack_require__(3541);
626
+
627
+ var _CODE128B2 = _interopRequireDefault(_CODE128B);
628
+
629
+ var _CODE128C = __webpack_require__(5798);
630
+
631
+ var _CODE128C2 = _interopRequireDefault(_CODE128C);
632
+
633
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
634
+
635
+ exports.CODE128 = _CODE128_AUTO2.default;
636
+ exports.CODE128A = _CODE128A2.default;
637
+ exports.CODE128B = _CODE128B2.default;
638
+ exports.CODE128C = _CODE128C2.default;
639
+
640
+ /***/ }),
641
+
642
+ /***/ 1687:
643
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
644
+
645
+
646
+
647
+ Object.defineProperty(exports, "__esModule", ({
648
+ value: true
649
+ }));
650
+
651
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
652
+
653
+ var _merge = __webpack_require__(1490);
654
+
655
+ var _merge2 = _interopRequireDefault(_merge);
656
+
657
+ var _shared = __webpack_require__(6258);
658
+
659
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
660
+
661
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
662
+
663
+ var CanvasRenderer = function () {
664
+ function CanvasRenderer(canvas, encodings, options) {
665
+ _classCallCheck(this, CanvasRenderer);
666
+
667
+ this.canvas = canvas;
668
+ this.encodings = encodings;
669
+ this.options = options;
670
+ }
671
+
672
+ _createClass(CanvasRenderer, [{
673
+ key: "render",
674
+ value: function render() {
675
+ // Abort if the browser does not support HTML5 canvas
676
+ if (!this.canvas.getContext) {
677
+ throw new Error('The browser does not support canvas.');
678
+ }
679
+
680
+ this.prepareCanvas();
681
+ for (var i = 0; i < this.encodings.length; i++) {
682
+ var encodingOptions = (0, _merge2.default)(this.options, this.encodings[i].options);
683
+
684
+ this.drawCanvasBarcode(encodingOptions, this.encodings[i]);
685
+ this.drawCanvasText(encodingOptions, this.encodings[i]);
686
+
687
+ this.moveCanvasDrawing(this.encodings[i]);
688
+ }
689
+
690
+ this.restoreCanvas();
691
+ }
692
+ }, {
693
+ key: "prepareCanvas",
694
+ value: function prepareCanvas() {
695
+ // Get the canvas context
696
+ var ctx = this.canvas.getContext("2d");
697
+
698
+ ctx.save();
699
+
700
+ (0, _shared.calculateEncodingAttributes)(this.encodings, this.options, ctx);
701
+ var totalWidth = (0, _shared.getTotalWidthOfEncodings)(this.encodings);
702
+ var maxHeight = (0, _shared.getMaximumHeightOfEncodings)(this.encodings);
703
+
704
+ this.canvas.width = totalWidth + this.options.marginLeft + this.options.marginRight;
705
+
706
+ this.canvas.height = maxHeight;
707
+
708
+ // Paint the canvas
709
+ ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
710
+ if (this.options.background) {
711
+ ctx.fillStyle = this.options.background;
712
+ ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);
713
+ }
714
+
715
+ ctx.translate(this.options.marginLeft, 0);
716
+ }
717
+ }, {
718
+ key: "drawCanvasBarcode",
719
+ value: function drawCanvasBarcode(options, encoding) {
720
+ // Get the canvas context
721
+ var ctx = this.canvas.getContext("2d");
722
+
723
+ var binary = encoding.data;
724
+
725
+ // Creates the barcode out of the encoded binary
726
+ var yFrom;
727
+ if (options.textPosition == "top") {
728
+ yFrom = options.marginTop + options.fontSize + options.textMargin;
729
+ } else {
730
+ yFrom = options.marginTop;
731
+ }
732
+
733
+ ctx.fillStyle = options.lineColor;
734
+
735
+ for (var b = 0; b < binary.length; b++) {
736
+ var x = b * options.width + encoding.barcodePadding;
737
+
738
+ if (binary[b] === "1") {
739
+ ctx.fillRect(x, yFrom, options.width, options.height);
740
+ } else if (binary[b]) {
741
+ ctx.fillRect(x, yFrom, options.width, options.height * binary[b]);
742
+ }
743
+ }
744
+ }
745
+ }, {
746
+ key: "drawCanvasText",
747
+ value: function drawCanvasText(options, encoding) {
748
+ // Get the canvas context
749
+ var ctx = this.canvas.getContext("2d");
750
+
751
+ var font = options.fontOptions + " " + options.fontSize + "px " + options.font;
752
+
753
+ // Draw the text if displayValue is set
754
+ if (options.displayValue) {
755
+ var x, y;
756
+
757
+ if (options.textPosition == "top") {
758
+ y = options.marginTop + options.fontSize - options.textMargin;
759
+ } else {
760
+ y = options.height + options.textMargin + options.marginTop + options.fontSize;
761
+ }
762
+
763
+ ctx.font = font;
764
+
765
+ // Draw the text in the correct X depending on the textAlign option
766
+ if (options.textAlign == "left" || encoding.barcodePadding > 0) {
767
+ x = 0;
768
+ ctx.textAlign = 'left';
769
+ } else if (options.textAlign == "right") {
770
+ x = encoding.width - 1;
771
+ ctx.textAlign = 'right';
772
+ }
773
+ // In all other cases, center the text
774
+ else {
775
+ x = encoding.width / 2;
776
+ ctx.textAlign = 'center';
777
+ }
778
+
779
+ ctx.fillText(encoding.text, x, y);
780
+ }
781
+ }
782
+ }, {
783
+ key: "moveCanvasDrawing",
784
+ value: function moveCanvasDrawing(encoding) {
785
+ var ctx = this.canvas.getContext("2d");
786
+
787
+ ctx.translate(encoding.width, 0);
788
+ }
789
+ }, {
790
+ key: "restoreCanvas",
791
+ value: function restoreCanvas() {
792
+ // Get the canvas context
793
+ var ctx = this.canvas.getContext("2d");
794
+
795
+ ctx.restore();
796
+ }
797
+ }]);
798
+
799
+ return CanvasRenderer;
800
+ }();
801
+
802
+ exports["default"] = CanvasRenderer;
803
+
804
+ /***/ }),
805
+
806
+ /***/ 1886:
807
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
808
+
809
+
810
+
811
+ Object.defineProperty(exports, "__esModule", ({
812
+ value: true
813
+ }));
814
+ exports.GenericBarcode = undefined;
815
+
816
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
817
+
818
+ var _Barcode2 = __webpack_require__(2444);
819
+
820
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
821
+
822
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
823
+
824
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
825
+
826
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
827
+
828
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
829
+
830
+ var GenericBarcode = function (_Barcode) {
831
+ _inherits(GenericBarcode, _Barcode);
832
+
833
+ function GenericBarcode(data, options) {
834
+ _classCallCheck(this, GenericBarcode);
835
+
836
+ return _possibleConstructorReturn(this, (GenericBarcode.__proto__ || Object.getPrototypeOf(GenericBarcode)).call(this, data, options)); // Sets this.data and this.text
837
+ }
838
+
839
+ // Return the corresponding binary numbers for the data provided
840
+
841
+
842
+ _createClass(GenericBarcode, [{
843
+ key: "encode",
844
+ value: function encode() {
845
+ return {
846
+ data: "10101010101010101010101010101010101010101",
847
+ text: this.text
848
+ };
849
+ }
850
+
851
+ // Resturn true/false if the string provided is valid for this encoder
852
+
853
+ }, {
854
+ key: "valid",
855
+ value: function valid() {
856
+ return true;
857
+ }
858
+ }]);
859
+
860
+ return GenericBarcode;
861
+ }(_Barcode3.default);
862
+
863
+ exports.GenericBarcode = GenericBarcode;
864
+
865
+ /***/ }),
866
+
867
+ /***/ 2444:
868
+ /***/ ((__unused_webpack_module, exports) => {
869
+
870
+
871
+
872
+ Object.defineProperty(exports, "__esModule", ({
873
+ value: true
874
+ }));
875
+
876
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
877
+
878
+ var Barcode = function Barcode(data, options) {
879
+ _classCallCheck(this, Barcode);
880
+
881
+ this.data = data;
882
+ this.text = options.text || data;
883
+ this.options = options;
884
+ };
885
+
886
+ exports["default"] = Barcode;
887
+
888
+ /***/ }),
889
+
890
+ /***/ 2689:
891
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
892
+
893
+
894
+
895
+ Object.defineProperty(exports, "__esModule", ({
896
+ value: true
897
+ }));
898
+ exports.ITF14 = exports.ITF = undefined;
899
+
900
+ var _ITF = __webpack_require__(739);
901
+
902
+ var _ITF2 = _interopRequireDefault(_ITF);
903
+
904
+ var _ITF3 = __webpack_require__(8122);
905
+
906
+ var _ITF4 = _interopRequireDefault(_ITF3);
907
+
908
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
909
+
910
+ exports.ITF = _ITF2.default;
911
+ exports.ITF14 = _ITF4.default;
912
+
913
+ /***/ }),
914
+
915
+ /***/ 2700:
916
+ /***/ ((__unused_webpack_module, exports) => {
917
+
918
+
919
+
920
+ Object.defineProperty(exports, "__esModule", ({
921
+ value: true
922
+ }));
923
+
924
+ var _SET_BY_CODE;
925
+
926
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
927
+
928
+ // constants for internal usage
929
+ var SET_A = exports.SET_A = 0;
930
+ var SET_B = exports.SET_B = 1;
931
+ var SET_C = exports.SET_C = 2;
932
+
933
+ // Special characters
934
+ var SHIFT = exports.SHIFT = 98;
935
+ var START_A = exports.START_A = 103;
936
+ var START_B = exports.START_B = 104;
937
+ var START_C = exports.START_C = 105;
938
+ var MODULO = exports.MODULO = 103;
939
+ var STOP = exports.STOP = 106;
940
+ var FNC1 = exports.FNC1 = 207;
941
+
942
+ // Get set by start code
943
+ var SET_BY_CODE = exports.SET_BY_CODE = (_SET_BY_CODE = {}, _defineProperty(_SET_BY_CODE, START_A, SET_A), _defineProperty(_SET_BY_CODE, START_B, SET_B), _defineProperty(_SET_BY_CODE, START_C, SET_C), _SET_BY_CODE);
944
+
945
+ // Get next set by code
946
+ var SWAP = exports.SWAP = {
947
+ 101: SET_A,
948
+ 100: SET_B,
949
+ 99: SET_C
950
+ };
951
+
952
+ var A_START_CHAR = exports.A_START_CHAR = String.fromCharCode(208); // START_A + 105
953
+ var B_START_CHAR = exports.B_START_CHAR = String.fromCharCode(209); // START_B + 105
954
+ var C_START_CHAR = exports.C_START_CHAR = String.fromCharCode(210); // START_C + 105
955
+
956
+ // 128A (Code Set A)
957
+ // ASCII characters 00 to 95 (0–9, A–Z and control codes), special characters, and FNC 1–4
958
+ var A_CHARS = exports.A_CHARS = "[\x00-\x5F\xC8-\xCF]";
959
+
960
+ // 128B (Code Set B)
961
+ // ASCII characters 32 to 127 (0–9, A–Z, a–z), special characters, and FNC 1–4
962
+ var B_CHARS = exports.B_CHARS = "[\x20-\x7F\xC8-\xCF]";
963
+
964
+ // 128C (Code Set C)
965
+ // 00–99 (encodes two digits with a single code point) and FNC1
966
+ var C_CHARS = exports.C_CHARS = "(\xCF*[0-9]{2}\xCF*)";
967
+
968
+ // CODE128 includes 107 symbols:
969
+ // 103 data symbols, 3 start symbols (A, B and C), and 1 stop symbol (the last one)
970
+ // Each symbol consist of three black bars (1) and three white spaces (0).
971
+ var BARS = exports.BARS = [11011001100, 11001101100, 11001100110, 10010011000, 10010001100, 10001001100, 10011001000, 10011000100, 10001100100, 11001001000, 11001000100, 11000100100, 10110011100, 10011011100, 10011001110, 10111001100, 10011101100, 10011100110, 11001110010, 11001011100, 11001001110, 11011100100, 11001110100, 11101101110, 11101001100, 11100101100, 11100100110, 11101100100, 11100110100, 11100110010, 11011011000, 11011000110, 11000110110, 10100011000, 10001011000, 10001000110, 10110001000, 10001101000, 10001100010, 11010001000, 11000101000, 11000100010, 10110111000, 10110001110, 10001101110, 10111011000, 10111000110, 10001110110, 11101110110, 11010001110, 11000101110, 11011101000, 11011100010, 11011101110, 11101011000, 11101000110, 11100010110, 11101101000, 11101100010, 11100011010, 11101111010, 11001000010, 11110001010, 10100110000, 10100001100, 10010110000, 10010000110, 10000101100, 10000100110, 10110010000, 10110000100, 10011010000, 10011000010, 10000110100, 10000110010, 11000010010, 11001010000, 11110111010, 11000010100, 10001111010, 10100111100, 10010111100, 10010011110, 10111100100, 10011110100, 10011110010, 11110100100, 11110010100, 11110010010, 11011011110, 11011110110, 11110110110, 10101111000, 10100011110, 10001011110, 10111101000, 10111100010, 11110101000, 11110100010, 10111011110, 10111101110, 11101011110, 11110101110, 11010000100, 11010010000, 11010011100, 1100011101011];
972
+
973
+ /***/ }),
974
+
975
+ /***/ 2727:
976
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
977
+
978
+
979
+
980
+ Object.defineProperty(exports, "__esModule", ({
981
+ value: true
982
+ }));
983
+
984
+ var _canvas = __webpack_require__(1687);
985
+
986
+ var _canvas2 = _interopRequireDefault(_canvas);
987
+
988
+ var _svg = __webpack_require__(5965);
989
+
990
+ var _svg2 = _interopRequireDefault(_svg);
991
+
992
+ var _object = __webpack_require__(3528);
993
+
994
+ var _object2 = _interopRequireDefault(_object);
995
+
996
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
997
+
998
+ exports["default"] = { CanvasRenderer: _canvas2.default, SVGRenderer: _svg2.default, ObjectRenderer: _object2.default };
999
+
1000
+ /***/ }),
1001
+
1002
+ /***/ 2889:
1003
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1004
+
1005
+
1006
+
1007
+ Object.defineProperty(exports, "__esModule", ({
1008
+ value: true
1009
+ }));
1010
+ exports.pharmacode = undefined;
1011
+
1012
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1013
+
1014
+ var _Barcode2 = __webpack_require__(2444);
1015
+
1016
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
1017
+
1018
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1019
+
1020
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1021
+
1022
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
1023
+
1024
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation
1025
+ // http://www.gomaro.ch/ftproot/Laetus_PHARMA-CODE.pdf
1026
+
1027
+ var pharmacode = function (_Barcode) {
1028
+ _inherits(pharmacode, _Barcode);
1029
+
1030
+ function pharmacode(data, options) {
1031
+ _classCallCheck(this, pharmacode);
1032
+
1033
+ var _this = _possibleConstructorReturn(this, (pharmacode.__proto__ || Object.getPrototypeOf(pharmacode)).call(this, data, options));
1034
+
1035
+ _this.number = parseInt(data, 10);
1036
+ return _this;
1037
+ }
1038
+
1039
+ _createClass(pharmacode, [{
1040
+ key: "encode",
1041
+ value: function encode() {
1042
+ var z = this.number;
1043
+ var result = "";
1044
+
1045
+ // http://i.imgur.com/RMm4UDJ.png
1046
+ // (source: http://www.gomaro.ch/ftproot/Laetus_PHARMA-CODE.pdf, page: 34)
1047
+ while (!isNaN(z) && z != 0) {
1048
+ if (z % 2 === 0) {
1049
+ // Even
1050
+ result = "11100" + result;
1051
+ z = (z - 2) / 2;
1052
+ } else {
1053
+ // Odd
1054
+ result = "100" + result;
1055
+ z = (z - 1) / 2;
1056
+ }
1057
+ }
1058
+
1059
+ // Remove the two last zeroes
1060
+ result = result.slice(0, -2);
1061
+
1062
+ return {
1063
+ data: result,
1064
+ text: this.text
1065
+ };
1066
+ }
1067
+ }, {
1068
+ key: "valid",
1069
+ value: function valid() {
1070
+ return this.number >= 3 && this.number <= 131070;
1071
+ }
1072
+ }]);
1073
+
1074
+ return pharmacode;
1075
+ }(_Barcode3.default);
1076
+
1077
+ exports.pharmacode = pharmacode;
1078
+
1079
+ /***/ }),
1080
+
1081
+ /***/ 3528:
1082
+ /***/ ((__unused_webpack_module, exports) => {
1083
+
1084
+
1085
+
1086
+ Object.defineProperty(exports, "__esModule", ({
1087
+ value: true
1088
+ }));
1089
+
1090
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1091
+
1092
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1093
+
1094
+ var ObjectRenderer = function () {
1095
+ function ObjectRenderer(object, encodings, options) {
1096
+ _classCallCheck(this, ObjectRenderer);
1097
+
1098
+ this.object = object;
1099
+ this.encodings = encodings;
1100
+ this.options = options;
1101
+ }
1102
+
1103
+ _createClass(ObjectRenderer, [{
1104
+ key: "render",
1105
+ value: function render() {
1106
+ this.object.encodings = this.encodings;
1107
+ }
1108
+ }]);
1109
+
1110
+ return ObjectRenderer;
1111
+ }();
1112
+
1113
+ exports["default"] = ObjectRenderer;
1114
+
1115
+ /***/ }),
1116
+
1117
+ /***/ 3541:
1118
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1119
+
1120
+
1121
+
1122
+ Object.defineProperty(exports, "__esModule", ({
1123
+ value: true
1124
+ }));
1125
+
1126
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1127
+
1128
+ var _CODE2 = __webpack_require__(3651);
1129
+
1130
+ var _CODE3 = _interopRequireDefault(_CODE2);
1131
+
1132
+ var _constants = __webpack_require__(2700);
1133
+
1134
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1135
+
1136
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1137
+
1138
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
1139
+
1140
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
1141
+
1142
+ var CODE128B = function (_CODE) {
1143
+ _inherits(CODE128B, _CODE);
1144
+
1145
+ function CODE128B(string, options) {
1146
+ _classCallCheck(this, CODE128B);
1147
+
1148
+ return _possibleConstructorReturn(this, (CODE128B.__proto__ || Object.getPrototypeOf(CODE128B)).call(this, _constants.B_START_CHAR + string, options));
1149
+ }
1150
+
1151
+ _createClass(CODE128B, [{
1152
+ key: 'valid',
1153
+ value: function valid() {
1154
+ return new RegExp('^' + _constants.B_CHARS + '+$').test(this.data);
1155
+ }
1156
+ }]);
1157
+
1158
+ return CODE128B;
1159
+ }(_CODE3.default);
1160
+
1161
+ exports["default"] = CODE128B;
1162
+
1163
+ /***/ }),
1164
+
1165
+ /***/ 3551:
1166
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1167
+
1168
+
1169
+
1170
+ Object.defineProperty(exports, "__esModule", ({
1171
+ value: true
1172
+ }));
1173
+
1174
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1175
+
1176
+ var _Barcode2 = __webpack_require__(2444);
1177
+
1178
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
1179
+
1180
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1181
+
1182
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1183
+
1184
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
1185
+
1186
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation
1187
+ // https://en.wikipedia.org/wiki/MSI_Barcode#Character_set_and_binary_lookup
1188
+
1189
+ var MSI = function (_Barcode) {
1190
+ _inherits(MSI, _Barcode);
1191
+
1192
+ function MSI(data, options) {
1193
+ _classCallCheck(this, MSI);
1194
+
1195
+ return _possibleConstructorReturn(this, (MSI.__proto__ || Object.getPrototypeOf(MSI)).call(this, data, options));
1196
+ }
1197
+
1198
+ _createClass(MSI, [{
1199
+ key: "encode",
1200
+ value: function encode() {
1201
+ // Start bits
1202
+ var ret = "110";
1203
+
1204
+ for (var i = 0; i < this.data.length; i++) {
1205
+ // Convert the character to binary (always 4 binary digits)
1206
+ var digit = parseInt(this.data[i]);
1207
+ var bin = digit.toString(2);
1208
+ bin = addZeroes(bin, 4 - bin.length);
1209
+
1210
+ // Add 100 for every zero and 110 for every 1
1211
+ for (var b = 0; b < bin.length; b++) {
1212
+ ret += bin[b] == "0" ? "100" : "110";
1213
+ }
1214
+ }
1215
+
1216
+ // End bits
1217
+ ret += "1001";
1218
+
1219
+ return {
1220
+ data: ret,
1221
+ text: this.text
1222
+ };
1223
+ }
1224
+ }, {
1225
+ key: "valid",
1226
+ value: function valid() {
1227
+ return this.data.search(/^[0-9]+$/) !== -1;
1228
+ }
1229
+ }]);
1230
+
1231
+ return MSI;
1232
+ }(_Barcode3.default);
1233
+
1234
+ function addZeroes(number, n) {
1235
+ for (var i = 0; i < n; i++) {
1236
+ number = "0" + number;
1237
+ }
1238
+ return number;
1239
+ }
1240
+
1241
+ exports["default"] = MSI;
1242
+
1243
+ /***/ }),
1244
+
1245
+ /***/ 3623:
1246
+ /***/ ((__unused_webpack_module, exports) => {
1247
+
1248
+
1249
+
1250
+ Object.defineProperty(exports, "__esModule", ({
1251
+ value: true
1252
+ }));
1253
+ exports["default"] = fixOptions;
1254
+
1255
+
1256
+ function fixOptions(options) {
1257
+ // Fix the margins
1258
+ options.marginTop = options.marginTop || options.margin;
1259
+ options.marginBottom = options.marginBottom || options.margin;
1260
+ options.marginRight = options.marginRight || options.margin;
1261
+ options.marginLeft = options.marginLeft || options.margin;
1262
+
1263
+ return options;
1264
+ }
1265
+
1266
+ /***/ }),
1267
+
1268
+ /***/ 3651:
1269
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1270
+
1271
+
1272
+
1273
+ Object.defineProperty(exports, "__esModule", ({
1274
+ value: true
1275
+ }));
1276
+
1277
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1278
+
1279
+ var _Barcode2 = __webpack_require__(2444);
1280
+
1281
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
1282
+
1283
+ var _constants = __webpack_require__(2700);
1284
+
1285
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1286
+
1287
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1288
+
1289
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
1290
+
1291
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
1292
+
1293
+ // This is the master class,
1294
+ // it does require the start code to be included in the string
1295
+ var CODE128 = function (_Barcode) {
1296
+ _inherits(CODE128, _Barcode);
1297
+
1298
+ function CODE128(data, options) {
1299
+ _classCallCheck(this, CODE128);
1300
+
1301
+ // Get array of ascii codes from data
1302
+ var _this = _possibleConstructorReturn(this, (CODE128.__proto__ || Object.getPrototypeOf(CODE128)).call(this, data.substring(1), options));
1303
+
1304
+ _this.bytes = data.split('').map(function (char) {
1305
+ return char.charCodeAt(0);
1306
+ });
1307
+ return _this;
1308
+ }
1309
+
1310
+ _createClass(CODE128, [{
1311
+ key: 'valid',
1312
+ value: function valid() {
1313
+ // ASCII value ranges 0-127, 200-211
1314
+ return (/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)
1315
+ );
1316
+ }
1317
+
1318
+ // The public encoding function
1319
+
1320
+ }, {
1321
+ key: 'encode',
1322
+ value: function encode() {
1323
+ var bytes = this.bytes;
1324
+ // Remove the start code from the bytes and set its index
1325
+ var startIndex = bytes.shift() - 105;
1326
+ // Get start set by index
1327
+ var startSet = _constants.SET_BY_CODE[startIndex];
1328
+
1329
+ if (startSet === undefined) {
1330
+ throw new RangeError('The encoding does not start with a start character.');
1331
+ }
1332
+
1333
+ if (this.shouldEncodeAsEan128() === true) {
1334
+ bytes.unshift(_constants.FNC1);
1335
+ }
1336
+
1337
+ // Start encode with the right type
1338
+ var encodingResult = CODE128.next(bytes, 1, startSet);
1339
+
1340
+ return {
1341
+ text: this.text === this.data ? this.text.replace(/[^\x20-\x7E]/g, '') : this.text,
1342
+ data:
1343
+ // Add the start bits
1344
+ CODE128.getBar(startIndex) +
1345
+ // Add the encoded bits
1346
+ encodingResult.result +
1347
+ // Add the checksum
1348
+ CODE128.getBar((encodingResult.checksum + startIndex) % _constants.MODULO) +
1349
+ // Add the end bits
1350
+ CODE128.getBar(_constants.STOP)
1351
+ };
1352
+ }
1353
+
1354
+ // GS1-128/EAN-128
1355
+
1356
+ }, {
1357
+ key: 'shouldEncodeAsEan128',
1358
+ value: function shouldEncodeAsEan128() {
1359
+ var isEAN128 = this.options.ean128 || false;
1360
+ if (typeof isEAN128 === 'string') {
1361
+ isEAN128 = isEAN128.toLowerCase() === 'true';
1362
+ }
1363
+ return isEAN128;
1364
+ }
1365
+
1366
+ // Get a bar symbol by index
1367
+
1368
+ }], [{
1369
+ key: 'getBar',
1370
+ value: function getBar(index) {
1371
+ return _constants.BARS[index] ? _constants.BARS[index].toString() : '';
1372
+ }
1373
+
1374
+ // Correct an index by a set and shift it from the bytes array
1375
+
1376
+ }, {
1377
+ key: 'correctIndex',
1378
+ value: function correctIndex(bytes, set) {
1379
+ if (set === _constants.SET_A) {
1380
+ var charCode = bytes.shift();
1381
+ return charCode < 32 ? charCode + 64 : charCode - 32;
1382
+ } else if (set === _constants.SET_B) {
1383
+ return bytes.shift() - 32;
1384
+ } else {
1385
+ return (bytes.shift() - 48) * 10 + bytes.shift() - 48;
1386
+ }
1387
+ }
1388
+ }, {
1389
+ key: 'next',
1390
+ value: function next(bytes, pos, set) {
1391
+ if (!bytes.length) {
1392
+ return { result: '', checksum: 0 };
1393
+ }
1394
+
1395
+ var nextCode = void 0,
1396
+ index = void 0;
1397
+
1398
+ // Special characters
1399
+ if (bytes[0] >= 200) {
1400
+ index = bytes.shift() - 105;
1401
+ var nextSet = _constants.SWAP[index];
1402
+
1403
+ // Swap to other set
1404
+ if (nextSet !== undefined) {
1405
+ nextCode = CODE128.next(bytes, pos + 1, nextSet);
1406
+ }
1407
+ // Continue on current set but encode a special character
1408
+ else {
1409
+ // Shift
1410
+ if ((set === _constants.SET_A || set === _constants.SET_B) && index === _constants.SHIFT) {
1411
+ // Convert the next character so that is encoded correctly
1412
+ bytes[0] = set === _constants.SET_A ? bytes[0] > 95 ? bytes[0] - 96 : bytes[0] : bytes[0] < 32 ? bytes[0] + 96 : bytes[0];
1413
+ }
1414
+ nextCode = CODE128.next(bytes, pos + 1, set);
1415
+ }
1416
+ }
1417
+ // Continue encoding
1418
+ else {
1419
+ index = CODE128.correctIndex(bytes, set);
1420
+ nextCode = CODE128.next(bytes, pos + 1, set);
1421
+ }
1422
+
1423
+ // Get the correct binary encoding and calculate the weight
1424
+ var enc = CODE128.getBar(index);
1425
+ var weight = index * pos;
1426
+
1427
+ return {
1428
+ result: enc + nextCode.result,
1429
+ checksum: weight + nextCode.checksum
1430
+ };
1431
+ }
1432
+ }]);
1433
+
1434
+ return CODE128;
1435
+ }(_Barcode3.default);
1436
+
1437
+ exports["default"] = CODE128;
1438
+
1439
+ /***/ }),
1440
+
1441
+ /***/ 3781:
1442
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1443
+
1444
+
1445
+
1446
+ Object.defineProperty(exports, "__esModule", ({
1447
+ value: true
1448
+ }));
1449
+
1450
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1451
+
1452
+ var _encoder = __webpack_require__(6350);
1453
+
1454
+ var _encoder2 = _interopRequireDefault(_encoder);
1455
+
1456
+ var _Barcode2 = __webpack_require__(2444);
1457
+
1458
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
1459
+
1460
+ var _UPC = __webpack_require__(7960);
1461
+
1462
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1463
+
1464
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1465
+
1466
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
1467
+
1468
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
1469
+ // https://en.wikipedia.org/wiki/Universal_Product_Code#Encoding
1470
+ //
1471
+ // UPC-E documentation:
1472
+ // https://en.wikipedia.org/wiki/Universal_Product_Code#UPC-E
1473
+
1474
+ var EXPANSIONS = ["XX00000XXX", "XX10000XXX", "XX20000XXX", "XXX00000XX", "XXXX00000X", "XXXXX00005", "XXXXX00006", "XXXXX00007", "XXXXX00008", "XXXXX00009"];
1475
+
1476
+ var PARITIES = [["EEEOOO", "OOOEEE"], ["EEOEOO", "OOEOEE"], ["EEOOEO", "OOEEOE"], ["EEOOOE", "OOEEEO"], ["EOEEOO", "OEOOEE"], ["EOOEEO", "OEEOOE"], ["EOOOEE", "OEEEOO"], ["EOEOEO", "OEOEOE"], ["EOEOOE", "OEOEEO"], ["EOOEOE", "OEEOEO"]];
1477
+
1478
+ var UPCE = function (_Barcode) {
1479
+ _inherits(UPCE, _Barcode);
1480
+
1481
+ function UPCE(data, options) {
1482
+ _classCallCheck(this, UPCE);
1483
+
1484
+ var _this = _possibleConstructorReturn(this, (UPCE.__proto__ || Object.getPrototypeOf(UPCE)).call(this, data, options));
1485
+ // Code may be 6 or 8 digits;
1486
+ // A 7 digit code is ambiguous as to whether the extra digit
1487
+ // is a UPC-A check or number system digit.
1488
+
1489
+
1490
+ _this.isValid = false;
1491
+ if (data.search(/^[0-9]{6}$/) !== -1) {
1492
+ _this.middleDigits = data;
1493
+ _this.upcA = expandToUPCA(data, "0");
1494
+ _this.text = options.text || '' + _this.upcA[0] + data + _this.upcA[_this.upcA.length - 1];
1495
+ _this.isValid = true;
1496
+ } else if (data.search(/^[01][0-9]{7}$/) !== -1) {
1497
+ _this.middleDigits = data.substring(1, data.length - 1);
1498
+ _this.upcA = expandToUPCA(_this.middleDigits, data[0]);
1499
+
1500
+ if (_this.upcA[_this.upcA.length - 1] === data[data.length - 1]) {
1501
+ _this.isValid = true;
1502
+ } else {
1503
+ // checksum mismatch
1504
+ return _possibleConstructorReturn(_this);
1505
+ }
1506
+ } else {
1507
+ return _possibleConstructorReturn(_this);
1508
+ }
1509
+
1510
+ _this.displayValue = options.displayValue;
1511
+
1512
+ // Make sure the font is not bigger than the space between the guard bars
1513
+ if (options.fontSize > options.width * 10) {
1514
+ _this.fontSize = options.width * 10;
1515
+ } else {
1516
+ _this.fontSize = options.fontSize;
1517
+ }
1518
+
1519
+ // Make the guard bars go down half the way of the text
1520
+ _this.guardHeight = options.height + _this.fontSize / 2 + options.textMargin;
1521
+ return _this;
1522
+ }
1523
+
1524
+ _createClass(UPCE, [{
1525
+ key: 'valid',
1526
+ value: function valid() {
1527
+ return this.isValid;
1528
+ }
1529
+ }, {
1530
+ key: 'encode',
1531
+ value: function encode() {
1532
+ if (this.options.flat) {
1533
+ return this.flatEncoding();
1534
+ } else {
1535
+ return this.guardedEncoding();
1536
+ }
1537
+ }
1538
+ }, {
1539
+ key: 'flatEncoding',
1540
+ value: function flatEncoding() {
1541
+ var result = "";
1542
+
1543
+ result += "101";
1544
+ result += this.encodeMiddleDigits();
1545
+ result += "010101";
1546
+
1547
+ return {
1548
+ data: result,
1549
+ text: this.text
1550
+ };
1551
+ }
1552
+ }, {
1553
+ key: 'guardedEncoding',
1554
+ value: function guardedEncoding() {
1555
+ var result = [];
1556
+
1557
+ // Add the UPC-A number system digit beneath the quiet zone
1558
+ if (this.displayValue) {
1559
+ result.push({
1560
+ data: "00000000",
1561
+ text: this.text[0],
1562
+ options: { textAlign: "left", fontSize: this.fontSize }
1563
+ });
1564
+ }
1565
+
1566
+ // Add the guard bars
1567
+ result.push({
1568
+ data: "101",
1569
+ options: { height: this.guardHeight }
1570
+ });
1571
+
1572
+ // Add the 6 UPC-E digits
1573
+ result.push({
1574
+ data: this.encodeMiddleDigits(),
1575
+ text: this.text.substring(1, 7),
1576
+ options: { fontSize: this.fontSize }
1577
+ });
1578
+
1579
+ // Add the end bits
1580
+ result.push({
1581
+ data: "010101",
1582
+ options: { height: this.guardHeight }
1583
+ });
1584
+
1585
+ // Add the UPC-A check digit beneath the quiet zone
1586
+ if (this.displayValue) {
1587
+ result.push({
1588
+ data: "00000000",
1589
+ text: this.text[7],
1590
+ options: { textAlign: "right", fontSize: this.fontSize }
1591
+ });
1592
+ }
1593
+
1594
+ return result;
1595
+ }
1596
+ }, {
1597
+ key: 'encodeMiddleDigits',
1598
+ value: function encodeMiddleDigits() {
1599
+ var numberSystem = this.upcA[0];
1600
+ var checkDigit = this.upcA[this.upcA.length - 1];
1601
+ var parity = PARITIES[parseInt(checkDigit)][parseInt(numberSystem)];
1602
+ return (0, _encoder2.default)(this.middleDigits, parity);
1603
+ }
1604
+ }]);
1605
+
1606
+ return UPCE;
1607
+ }(_Barcode3.default);
1608
+
1609
+ function expandToUPCA(middleDigits, numberSystem) {
1610
+ var lastUpcE = parseInt(middleDigits[middleDigits.length - 1]);
1611
+ var expansion = EXPANSIONS[lastUpcE];
1612
+
1613
+ var result = "";
1614
+ var digitIndex = 0;
1615
+ for (var i = 0; i < expansion.length; i++) {
1616
+ var c = expansion[i];
1617
+ if (c === 'X') {
1618
+ result += middleDigits[digitIndex++];
1619
+ } else {
1620
+ result += c;
1621
+ }
1622
+ }
1623
+
1624
+ result = '' + numberSystem + result;
1625
+ return '' + result + (0, _UPC.checksum)(result);
1626
+ }
1627
+
1628
+ exports["default"] = UPCE;
1629
+
1630
+ /***/ }),
1631
+
1632
+ /***/ 3804:
1633
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1634
+
1635
+
1636
+
1637
+ Object.defineProperty(exports, "__esModule", ({
1638
+ value: true
1639
+ }));
1640
+
1641
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1642
+
1643
+ var _CODE2 = __webpack_require__(3651);
1644
+
1645
+ var _CODE3 = _interopRequireDefault(_CODE2);
1646
+
1647
+ var _constants = __webpack_require__(2700);
1648
+
1649
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1650
+
1651
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1652
+
1653
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
1654
+
1655
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
1656
+
1657
+ var CODE128A = function (_CODE) {
1658
+ _inherits(CODE128A, _CODE);
1659
+
1660
+ function CODE128A(string, options) {
1661
+ _classCallCheck(this, CODE128A);
1662
+
1663
+ return _possibleConstructorReturn(this, (CODE128A.__proto__ || Object.getPrototypeOf(CODE128A)).call(this, _constants.A_START_CHAR + string, options));
1664
+ }
1665
+
1666
+ _createClass(CODE128A, [{
1667
+ key: 'valid',
1668
+ value: function valid() {
1669
+ return new RegExp('^' + _constants.A_CHARS + '+$').test(this.data);
1670
+ }
1671
+ }]);
1672
+
1673
+ return CODE128A;
1674
+ }(_CODE3.default);
1675
+
1676
+ exports["default"] = CODE128A;
1677
+
1678
+ /***/ }),
1679
+
1680
+ /***/ 4205:
1681
+ /***/ ((__unused_webpack_module, exports) => {
1682
+
1683
+
1684
+
1685
+ Object.defineProperty(exports, "__esModule", ({
1686
+ value: true
1687
+ }));
1688
+
1689
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1690
+
1691
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1692
+
1693
+ /*eslint no-console: 0 */
1694
+
1695
+ var ErrorHandler = function () {
1696
+ function ErrorHandler(api) {
1697
+ _classCallCheck(this, ErrorHandler);
1698
+
1699
+ this.api = api;
1700
+ }
1701
+
1702
+ _createClass(ErrorHandler, [{
1703
+ key: "handleCatch",
1704
+ value: function handleCatch(e) {
1705
+ // If babel supported extending of Error in a correct way instanceof would be used here
1706
+ if (e.name === "InvalidInputException") {
1707
+ if (this.api._options.valid !== this.api._defaults.valid) {
1708
+ this.api._options.valid(false);
1709
+ } else {
1710
+ throw e.message;
1711
+ }
1712
+ } else {
1713
+ throw e;
1714
+ }
1715
+
1716
+ this.api.render = function () {};
1717
+ }
1718
+ }, {
1719
+ key: "wrapBarcodeCall",
1720
+ value: function wrapBarcodeCall(func) {
1721
+ try {
1722
+ var result = func.apply(undefined, arguments);
1723
+ this.api._options.valid(true);
1724
+ return result;
1725
+ } catch (e) {
1726
+ this.handleCatch(e);
1727
+
1728
+ return this.api;
1729
+ }
1730
+ }
1731
+ }]);
1732
+
1733
+ return ErrorHandler;
1734
+ }();
1735
+
1736
+ exports["default"] = ErrorHandler;
1737
+
1738
+ /***/ }),
1739
+
1740
+ /***/ 4250:
1741
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1742
+
1743
+
1744
+
1745
+ Object.defineProperty(exports, "__esModule", ({
1746
+ value: true
1747
+ }));
1748
+
1749
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1750
+
1751
+ var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
1752
+
1753
+ var _constants = __webpack_require__(6575);
1754
+
1755
+ var _EAN2 = __webpack_require__(4754);
1756
+
1757
+ var _EAN3 = _interopRequireDefault(_EAN2);
1758
+
1759
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1760
+
1761
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1762
+
1763
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
1764
+
1765
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
1766
+ // https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Binary_encoding_of_data_digits_into_EAN-13_barcode
1767
+
1768
+ // Calculate the checksum digit
1769
+ // https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Calculation_of_checksum_digit
1770
+ var checksum = function checksum(number) {
1771
+ var res = number.substr(0, 12).split('').map(function (n) {
1772
+ return +n;
1773
+ }).reduce(function (sum, a, idx) {
1774
+ return idx % 2 ? sum + a * 3 : sum + a;
1775
+ }, 0);
1776
+
1777
+ return (10 - res % 10) % 10;
1778
+ };
1779
+
1780
+ var EAN13 = function (_EAN) {
1781
+ _inherits(EAN13, _EAN);
1782
+
1783
+ function EAN13(data, options) {
1784
+ _classCallCheck(this, EAN13);
1785
+
1786
+ // Add checksum if it does not exist
1787
+ if (data.search(/^[0-9]{12}$/) !== -1) {
1788
+ data += checksum(data);
1789
+ }
1790
+
1791
+ // Adds a last character to the end of the barcode
1792
+ var _this = _possibleConstructorReturn(this, (EAN13.__proto__ || Object.getPrototypeOf(EAN13)).call(this, data, options));
1793
+
1794
+ _this.lastChar = options.lastChar;
1795
+ return _this;
1796
+ }
1797
+
1798
+ _createClass(EAN13, [{
1799
+ key: 'valid',
1800
+ value: function valid() {
1801
+ return this.data.search(/^[0-9]{13}$/) !== -1 && +this.data[12] === checksum(this.data);
1802
+ }
1803
+ }, {
1804
+ key: 'leftText',
1805
+ value: function leftText() {
1806
+ return _get(EAN13.prototype.__proto__ || Object.getPrototypeOf(EAN13.prototype), 'leftText', this).call(this, 1, 6);
1807
+ }
1808
+ }, {
1809
+ key: 'leftEncode',
1810
+ value: function leftEncode() {
1811
+ var data = this.data.substr(1, 6);
1812
+ var structure = _constants.EAN13_STRUCTURE[this.data[0]];
1813
+ return _get(EAN13.prototype.__proto__ || Object.getPrototypeOf(EAN13.prototype), 'leftEncode', this).call(this, data, structure);
1814
+ }
1815
+ }, {
1816
+ key: 'rightText',
1817
+ value: function rightText() {
1818
+ return _get(EAN13.prototype.__proto__ || Object.getPrototypeOf(EAN13.prototype), 'rightText', this).call(this, 7, 6);
1819
+ }
1820
+ }, {
1821
+ key: 'rightEncode',
1822
+ value: function rightEncode() {
1823
+ var data = this.data.substr(7, 6);
1824
+ return _get(EAN13.prototype.__proto__ || Object.getPrototypeOf(EAN13.prototype), 'rightEncode', this).call(this, data, 'RRRRRR');
1825
+ }
1826
+
1827
+ // The "standard" way of printing EAN13 barcodes with guard bars
1828
+
1829
+ }, {
1830
+ key: 'encodeGuarded',
1831
+ value: function encodeGuarded() {
1832
+ var data = _get(EAN13.prototype.__proto__ || Object.getPrototypeOf(EAN13.prototype), 'encodeGuarded', this).call(this);
1833
+
1834
+ // Extend data with left digit & last character
1835
+ if (this.options.displayValue) {
1836
+ data.unshift({
1837
+ data: '000000000000',
1838
+ text: this.text.substr(0, 1),
1839
+ options: { textAlign: 'left', fontSize: this.fontSize }
1840
+ });
1841
+
1842
+ if (this.options.lastChar) {
1843
+ data.push({
1844
+ data: '00'
1845
+ });
1846
+ data.push({
1847
+ data: '00000',
1848
+ text: this.options.lastChar,
1849
+ options: { fontSize: this.fontSize }
1850
+ });
1851
+ }
1852
+ }
1853
+
1854
+ return data;
1855
+ }
1856
+ }]);
1857
+
1858
+ return EAN13;
1859
+ }(_EAN3.default);
1860
+
1861
+ exports["default"] = EAN13;
1862
+
1863
+ /***/ }),
1864
+
1865
+ /***/ 4754:
1866
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1867
+
1868
+
1869
+
1870
+ Object.defineProperty(exports, "__esModule", ({
1871
+ value: true
1872
+ }));
1873
+
1874
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
1875
+
1876
+ var _constants = __webpack_require__(6575);
1877
+
1878
+ var _encoder = __webpack_require__(6350);
1879
+
1880
+ var _encoder2 = _interopRequireDefault(_encoder);
1881
+
1882
+ var _Barcode2 = __webpack_require__(2444);
1883
+
1884
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
1885
+
1886
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1887
+
1888
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1889
+
1890
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
1891
+
1892
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
1893
+
1894
+ // Base class for EAN8 & EAN13
1895
+ var EAN = function (_Barcode) {
1896
+ _inherits(EAN, _Barcode);
1897
+
1898
+ function EAN(data, options) {
1899
+ _classCallCheck(this, EAN);
1900
+
1901
+ // Make sure the font is not bigger than the space between the guard bars
1902
+ var _this = _possibleConstructorReturn(this, (EAN.__proto__ || Object.getPrototypeOf(EAN)).call(this, data, options));
1903
+
1904
+ _this.fontSize = !options.flat && options.fontSize > options.width * 10 ? options.width * 10 : options.fontSize;
1905
+
1906
+ // Make the guard bars go down half the way of the text
1907
+ _this.guardHeight = options.height + _this.fontSize / 2 + options.textMargin;
1908
+ return _this;
1909
+ }
1910
+
1911
+ _createClass(EAN, [{
1912
+ key: 'encode',
1913
+ value: function encode() {
1914
+ return this.options.flat ? this.encodeFlat() : this.encodeGuarded();
1915
+ }
1916
+ }, {
1917
+ key: 'leftText',
1918
+ value: function leftText(from, to) {
1919
+ return this.text.substr(from, to);
1920
+ }
1921
+ }, {
1922
+ key: 'leftEncode',
1923
+ value: function leftEncode(data, structure) {
1924
+ return (0, _encoder2.default)(data, structure);
1925
+ }
1926
+ }, {
1927
+ key: 'rightText',
1928
+ value: function rightText(from, to) {
1929
+ return this.text.substr(from, to);
1930
+ }
1931
+ }, {
1932
+ key: 'rightEncode',
1933
+ value: function rightEncode(data, structure) {
1934
+ return (0, _encoder2.default)(data, structure);
1935
+ }
1936
+ }, {
1937
+ key: 'encodeGuarded',
1938
+ value: function encodeGuarded() {
1939
+ var textOptions = { fontSize: this.fontSize };
1940
+ var guardOptions = { height: this.guardHeight };
1941
+
1942
+ return [{ data: _constants.SIDE_BIN, options: guardOptions }, { data: this.leftEncode(), text: this.leftText(), options: textOptions }, { data: _constants.MIDDLE_BIN, options: guardOptions }, { data: this.rightEncode(), text: this.rightText(), options: textOptions }, { data: _constants.SIDE_BIN, options: guardOptions }];
1943
+ }
1944
+ }, {
1945
+ key: 'encodeFlat',
1946
+ value: function encodeFlat() {
1947
+ var data = [_constants.SIDE_BIN, this.leftEncode(), _constants.MIDDLE_BIN, this.rightEncode(), _constants.SIDE_BIN];
1948
+
1949
+ return {
1950
+ data: data.join(''),
1951
+ text: this.text
1952
+ };
1953
+ }
1954
+ }]);
1955
+
1956
+ return EAN;
1957
+ }(_Barcode3.default);
1958
+
1959
+ exports["default"] = EAN;
1960
+
1961
+ /***/ }),
1962
+
1963
+ /***/ 4802:
1964
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1965
+
1966
+
1967
+
1968
+ Object.defineProperty(exports, "__esModule", ({
1969
+ value: true
1970
+ }));
1971
+
1972
+ var _constants = __webpack_require__(2700);
1973
+
1974
+ // Match Set functions
1975
+ var matchSetALength = function matchSetALength(string) {
1976
+ return string.match(new RegExp('^' + _constants.A_CHARS + '*'))[0].length;
1977
+ };
1978
+ var matchSetBLength = function matchSetBLength(string) {
1979
+ return string.match(new RegExp('^' + _constants.B_CHARS + '*'))[0].length;
1980
+ };
1981
+ var matchSetC = function matchSetC(string) {
1982
+ return string.match(new RegExp('^' + _constants.C_CHARS + '*'))[0];
1983
+ };
1984
+
1985
+ // CODE128A or CODE128B
1986
+ function autoSelectFromAB(string, isA) {
1987
+ var ranges = isA ? _constants.A_CHARS : _constants.B_CHARS;
1988
+ var untilC = string.match(new RegExp('^(' + ranges + '+?)(([0-9]{2}){2,})([^0-9]|$)'));
1989
+
1990
+ if (untilC) {
1991
+ return untilC[1] + String.fromCharCode(204) + autoSelectFromC(string.substring(untilC[1].length));
1992
+ }
1993
+
1994
+ var chars = string.match(new RegExp('^' + ranges + '+'))[0];
1995
+
1996
+ if (chars.length === string.length) {
1997
+ return string;
1998
+ }
1999
+
2000
+ return chars + String.fromCharCode(isA ? 205 : 206) + autoSelectFromAB(string.substring(chars.length), !isA);
2001
+ }
2002
+
2003
+ // CODE128C
2004
+ function autoSelectFromC(string) {
2005
+ var cMatch = matchSetC(string);
2006
+ var length = cMatch.length;
2007
+
2008
+ if (length === string.length) {
2009
+ return string;
2010
+ }
2011
+
2012
+ string = string.substring(length);
2013
+
2014
+ // Select A/B depending on the longest match
2015
+ var isA = matchSetALength(string) >= matchSetBLength(string);
2016
+ return cMatch + String.fromCharCode(isA ? 206 : 205) + autoSelectFromAB(string, isA);
2017
+ }
2018
+
2019
+ // Detect Code Set (A, B or C) and format the string
2020
+
2021
+ exports["default"] = function (string) {
2022
+ var newString = void 0;
2023
+ var cLength = matchSetC(string).length;
2024
+
2025
+ // Select 128C if the string start with enough digits
2026
+ if (cLength >= 2) {
2027
+ newString = _constants.C_START_CHAR + autoSelectFromC(string);
2028
+ } else {
2029
+ // Select A/B depending on the longest match
2030
+ var isA = matchSetALength(string) > matchSetBLength(string);
2031
+ newString = (isA ? _constants.A_START_CHAR : _constants.B_START_CHAR) + autoSelectFromAB(string, isA);
2032
+ }
2033
+
2034
+ return newString.replace(/[\xCD\xCE]([^])[\xCD\xCE]/, // Any sequence between 205 and 206 characters
2035
+ function (match, char) {
2036
+ return String.fromCharCode(203) + char;
2037
+ });
2038
+ };
2039
+
2040
+ /***/ }),
2041
+
2042
+ /***/ 4845:
2043
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2044
+
2045
+
2046
+
2047
+ Object.defineProperty(exports, "__esModule", ({
2048
+ value: true
2049
+ }));
2050
+
2051
+ var _CODE2 = __webpack_require__(3651);
2052
+
2053
+ var _CODE3 = _interopRequireDefault(_CODE2);
2054
+
2055
+ var _auto = __webpack_require__(4802);
2056
+
2057
+ var _auto2 = _interopRequireDefault(_auto);
2058
+
2059
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2060
+
2061
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2062
+
2063
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
2064
+
2065
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
2066
+
2067
+ var CODE128AUTO = function (_CODE) {
2068
+ _inherits(CODE128AUTO, _CODE);
2069
+
2070
+ function CODE128AUTO(data, options) {
2071
+ _classCallCheck(this, CODE128AUTO);
2072
+
2073
+ // ASCII value ranges 0-127, 200-211
2074
+ if (/^[\x00-\x7F\xC8-\xD3]+$/.test(data)) {
2075
+ var _this = _possibleConstructorReturn(this, (CODE128AUTO.__proto__ || Object.getPrototypeOf(CODE128AUTO)).call(this, (0, _auto2.default)(data), options));
2076
+ } else {
2077
+ var _this = _possibleConstructorReturn(this, (CODE128AUTO.__proto__ || Object.getPrototypeOf(CODE128AUTO)).call(this, data, options));
2078
+ }
2079
+ return _possibleConstructorReturn(_this);
2080
+ }
2081
+
2082
+ return CODE128AUTO;
2083
+ }(_CODE3.default);
2084
+
2085
+ exports["default"] = CODE128AUTO;
2086
+
2087
+ /***/ }),
2088
+
2089
+ /***/ 5099:
2090
+ /***/ ((__unused_webpack_module, exports) => {
2091
+
2092
+
2093
+
2094
+ Object.defineProperty(exports, "__esModule", ({
2095
+ value: true
2096
+ }));
2097
+ var defaults = {
2098
+ width: 2,
2099
+ height: 100,
2100
+ format: "auto",
2101
+ displayValue: true,
2102
+ fontOptions: "",
2103
+ font: "monospace",
2104
+ text: undefined,
2105
+ textAlign: "center",
2106
+ textPosition: "bottom",
2107
+ textMargin: 2,
2108
+ fontSize: 20,
2109
+ background: "#ffffff",
2110
+ lineColor: "#000000",
2111
+ margin: 10,
2112
+ marginTop: undefined,
2113
+ marginBottom: undefined,
2114
+ marginLeft: undefined,
2115
+ marginRight: undefined,
2116
+ valid: function valid() {}
2117
+ };
2118
+
2119
+ exports["default"] = defaults;
2120
+
2121
+ /***/ }),
2122
+
2123
+ /***/ 5726:
2124
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2125
+
2126
+
2127
+
2128
+ Object.defineProperty(exports, "__esModule", ({
2129
+ value: true
2130
+ }));
2131
+ exports.UPCE = exports.UPC = exports.EAN2 = exports.EAN5 = exports.EAN8 = exports.EAN13 = undefined;
2132
+
2133
+ var _EAN = __webpack_require__(4250);
2134
+
2135
+ var _EAN2 = _interopRequireDefault(_EAN);
2136
+
2137
+ var _EAN3 = __webpack_require__(8784);
2138
+
2139
+ var _EAN4 = _interopRequireDefault(_EAN3);
2140
+
2141
+ var _EAN5 = __webpack_require__(8075);
2142
+
2143
+ var _EAN6 = _interopRequireDefault(_EAN5);
2144
+
2145
+ var _EAN7 = __webpack_require__(7570);
2146
+
2147
+ var _EAN8 = _interopRequireDefault(_EAN7);
2148
+
2149
+ var _UPC = __webpack_require__(7960);
2150
+
2151
+ var _UPC2 = _interopRequireDefault(_UPC);
2152
+
2153
+ var _UPCE = __webpack_require__(3781);
2154
+
2155
+ var _UPCE2 = _interopRequireDefault(_UPCE);
2156
+
2157
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2158
+
2159
+ exports.EAN13 = _EAN2.default;
2160
+ exports.EAN8 = _EAN4.default;
2161
+ exports.EAN5 = _EAN6.default;
2162
+ exports.EAN2 = _EAN8.default;
2163
+ exports.UPC = _UPC2.default;
2164
+ exports.UPCE = _UPCE2.default;
2165
+
2166
+ /***/ }),
2167
+
2168
+ /***/ 5798:
2169
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2170
+
2171
+
2172
+
2173
+ Object.defineProperty(exports, "__esModule", ({
2174
+ value: true
2175
+ }));
2176
+
2177
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
2178
+
2179
+ var _CODE2 = __webpack_require__(3651);
2180
+
2181
+ var _CODE3 = _interopRequireDefault(_CODE2);
2182
+
2183
+ var _constants = __webpack_require__(2700);
2184
+
2185
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2186
+
2187
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2188
+
2189
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
2190
+
2191
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
2192
+
2193
+ var CODE128C = function (_CODE) {
2194
+ _inherits(CODE128C, _CODE);
2195
+
2196
+ function CODE128C(string, options) {
2197
+ _classCallCheck(this, CODE128C);
2198
+
2199
+ return _possibleConstructorReturn(this, (CODE128C.__proto__ || Object.getPrototypeOf(CODE128C)).call(this, _constants.C_START_CHAR + string, options));
2200
+ }
2201
+
2202
+ _createClass(CODE128C, [{
2203
+ key: 'valid',
2204
+ value: function valid() {
2205
+ return new RegExp('^' + _constants.C_CHARS + '+$').test(this.data);
2206
+ }
2207
+ }]);
2208
+
2209
+ return CODE128C;
2210
+ }(_CODE3.default);
2211
+
2212
+ exports["default"] = CODE128C;
2213
+
2214
+ /***/ }),
2215
+
2216
+ /***/ 5965:
2217
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2218
+
2219
+
2220
+
2221
+ Object.defineProperty(exports, "__esModule", ({
2222
+ value: true
2223
+ }));
2224
+
2225
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
2226
+
2227
+ var _merge = __webpack_require__(1490);
2228
+
2229
+ var _merge2 = _interopRequireDefault(_merge);
2230
+
2231
+ var _shared = __webpack_require__(6258);
2232
+
2233
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2234
+
2235
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2236
+
2237
+ var svgns = "http://www.w3.org/2000/svg";
2238
+
2239
+ var SVGRenderer = function () {
2240
+ function SVGRenderer(svg, encodings, options) {
2241
+ _classCallCheck(this, SVGRenderer);
2242
+
2243
+ this.svg = svg;
2244
+ this.encodings = encodings;
2245
+ this.options = options;
2246
+ this.document = options.xmlDocument || document;
2247
+ }
2248
+
2249
+ _createClass(SVGRenderer, [{
2250
+ key: "render",
2251
+ value: function render() {
2252
+ var currentX = this.options.marginLeft;
2253
+
2254
+ this.prepareSVG();
2255
+ for (var i = 0; i < this.encodings.length; i++) {
2256
+ var encoding = this.encodings[i];
2257
+ var encodingOptions = (0, _merge2.default)(this.options, encoding.options);
2258
+
2259
+ var group = this.createGroup(currentX, encodingOptions.marginTop, this.svg);
2260
+
2261
+ this.setGroupOptions(group, encodingOptions);
2262
+
2263
+ this.drawSvgBarcode(group, encodingOptions, encoding);
2264
+ this.drawSVGText(group, encodingOptions, encoding);
2265
+
2266
+ currentX += encoding.width;
2267
+ }
2268
+ }
2269
+ }, {
2270
+ key: "prepareSVG",
2271
+ value: function prepareSVG() {
2272
+ // Clear the SVG
2273
+ while (this.svg.firstChild) {
2274
+ this.svg.removeChild(this.svg.firstChild);
2275
+ }
2276
+
2277
+ (0, _shared.calculateEncodingAttributes)(this.encodings, this.options);
2278
+ var totalWidth = (0, _shared.getTotalWidthOfEncodings)(this.encodings);
2279
+ var maxHeight = (0, _shared.getMaximumHeightOfEncodings)(this.encodings);
2280
+
2281
+ var width = totalWidth + this.options.marginLeft + this.options.marginRight;
2282
+ this.setSvgAttributes(width, maxHeight);
2283
+
2284
+ if (this.options.background) {
2285
+ this.drawRect(0, 0, width, maxHeight, this.svg).setAttribute("fill", this.options.background);
2286
+ }
2287
+ }
2288
+ }, {
2289
+ key: "drawSvgBarcode",
2290
+ value: function drawSvgBarcode(parent, options, encoding) {
2291
+ var binary = encoding.data;
2292
+
2293
+ // Creates the barcode out of the encoded binary
2294
+ var yFrom;
2295
+ if (options.textPosition == "top") {
2296
+ yFrom = options.fontSize + options.textMargin;
2297
+ } else {
2298
+ yFrom = 0;
2299
+ }
2300
+
2301
+ var barWidth = 0;
2302
+ var x = 0;
2303
+ for (var b = 0; b < binary.length; b++) {
2304
+ x = b * options.width + encoding.barcodePadding;
2305
+
2306
+ if (binary[b] === "1") {
2307
+ barWidth++;
2308
+ } else if (barWidth > 0) {
2309
+ this.drawRect(x - options.width * barWidth, yFrom, options.width * barWidth, options.height, parent);
2310
+ barWidth = 0;
2311
+ }
2312
+ }
2313
+
2314
+ // Last draw is needed since the barcode ends with 1
2315
+ if (barWidth > 0) {
2316
+ this.drawRect(x - options.width * (barWidth - 1), yFrom, options.width * barWidth, options.height, parent);
2317
+ }
2318
+ }
2319
+ }, {
2320
+ key: "drawSVGText",
2321
+ value: function drawSVGText(parent, options, encoding) {
2322
+ var textElem = this.document.createElementNS(svgns, 'text');
2323
+
2324
+ // Draw the text if displayValue is set
2325
+ if (options.displayValue) {
2326
+ var x, y;
2327
+
2328
+ textElem.setAttribute("font-family", options.font);
2329
+ textElem.setAttribute("font-size", options.fontSize);
2330
+ if (options.fontOptions.includes("bold")) {
2331
+ textElem.setAttribute("font-weight", "bold");
2332
+ }
2333
+ if (options.fontOptions.includes("italic")) {
2334
+ textElem.setAttribute("font-style", "italic");
2335
+ }
2336
+
2337
+ if (options.textPosition == "top") {
2338
+ y = options.fontSize - options.textMargin;
2339
+ } else {
2340
+ y = options.height + options.textMargin + options.fontSize;
2341
+ }
2342
+
2343
+ // Draw the text in the correct X depending on the textAlign option
2344
+ if (options.textAlign == "left" || encoding.barcodePadding > 0) {
2345
+ x = 0;
2346
+ textElem.setAttribute("text-anchor", "start");
2347
+ } else if (options.textAlign == "right") {
2348
+ x = encoding.width - 1;
2349
+ textElem.setAttribute("text-anchor", "end");
2350
+ }
2351
+ // In all other cases, center the text
2352
+ else {
2353
+ x = encoding.width / 2;
2354
+ textElem.setAttribute("text-anchor", "middle");
2355
+ }
2356
+
2357
+ textElem.setAttribute("x", x);
2358
+ textElem.setAttribute("y", y);
2359
+
2360
+ textElem.appendChild(this.document.createTextNode(encoding.text));
2361
+
2362
+ parent.appendChild(textElem);
2363
+ }
2364
+ }
2365
+ }, {
2366
+ key: "setSvgAttributes",
2367
+ value: function setSvgAttributes(width, height) {
2368
+ var svg = this.svg;
2369
+ svg.setAttribute("width", width + "px");
2370
+ svg.setAttribute("height", height + "px");
2371
+ svg.setAttribute("x", "0px");
2372
+ svg.setAttribute("y", "0px");
2373
+ svg.setAttribute("viewBox", "0 0 " + width + " " + height);
2374
+
2375
+ svg.setAttribute("xmlns", svgns);
2376
+ svg.setAttribute("version", "1.1");
2377
+ }
2378
+ }, {
2379
+ key: "createGroup",
2380
+ value: function createGroup(x, y, parent) {
2381
+ var group = this.document.createElementNS(svgns, 'g');
2382
+ group.setAttribute("transform", "translate(" + x + ", " + y + ")");
2383
+
2384
+ parent.appendChild(group);
2385
+
2386
+ return group;
2387
+ }
2388
+ }, {
2389
+ key: "setGroupOptions",
2390
+ value: function setGroupOptions(group, options) {
2391
+ group.setAttribute("fill", options.lineColor);
2392
+ }
2393
+ }, {
2394
+ key: "drawRect",
2395
+ value: function drawRect(x, y, width, height, parent) {
2396
+ var rect = this.document.createElementNS(svgns, 'rect');
2397
+
2398
+ rect.setAttribute("x", x);
2399
+ rect.setAttribute("y", y);
2400
+ rect.setAttribute("width", width);
2401
+ rect.setAttribute("height", height);
2402
+
2403
+ parent.appendChild(rect);
2404
+
2405
+ return rect;
2406
+ }
2407
+ }]);
2408
+
2409
+ return SVGRenderer;
2410
+ }();
2411
+
2412
+ exports["default"] = SVGRenderer;
2413
+
2414
+ /***/ }),
2415
+
2416
+ /***/ 6065:
2417
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2418
+
2419
+
2420
+
2421
+ Object.defineProperty(exports, "__esModule", ({
2422
+ value: true
2423
+ }));
2424
+
2425
+ var _MSI2 = __webpack_require__(3551);
2426
+
2427
+ var _MSI3 = _interopRequireDefault(_MSI2);
2428
+
2429
+ var _checksums = __webpack_require__(291);
2430
+
2431
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2432
+
2433
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2434
+
2435
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
2436
+
2437
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
2438
+
2439
+ var MSI11 = function (_MSI) {
2440
+ _inherits(MSI11, _MSI);
2441
+
2442
+ function MSI11(data, options) {
2443
+ _classCallCheck(this, MSI11);
2444
+
2445
+ return _possibleConstructorReturn(this, (MSI11.__proto__ || Object.getPrototypeOf(MSI11)).call(this, data + (0, _checksums.mod11)(data), options));
2446
+ }
2447
+
2448
+ return MSI11;
2449
+ }(_MSI3.default);
2450
+
2451
+ exports["default"] = MSI11;
2452
+
2453
+ /***/ }),
2454
+
2455
+ /***/ 6129:
2456
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2457
+
2458
+
2459
+
2460
+ var _barcodes = __webpack_require__(9368);
2461
+
2462
+ var _barcodes2 = _interopRequireDefault(_barcodes);
2463
+
2464
+ var _merge = __webpack_require__(1490);
2465
+
2466
+ var _merge2 = _interopRequireDefault(_merge);
2467
+
2468
+ var _linearizeEncodings = __webpack_require__(8165);
2469
+
2470
+ var _linearizeEncodings2 = _interopRequireDefault(_linearizeEncodings);
2471
+
2472
+ var _fixOptions = __webpack_require__(3623);
2473
+
2474
+ var _fixOptions2 = _interopRequireDefault(_fixOptions);
2475
+
2476
+ var _getRenderProperties = __webpack_require__(8179);
2477
+
2478
+ var _getRenderProperties2 = _interopRequireDefault(_getRenderProperties);
2479
+
2480
+ var _optionsFromStrings = __webpack_require__(9796);
2481
+
2482
+ var _optionsFromStrings2 = _interopRequireDefault(_optionsFromStrings);
2483
+
2484
+ var _ErrorHandler = __webpack_require__(4205);
2485
+
2486
+ var _ErrorHandler2 = _interopRequireDefault(_ErrorHandler);
2487
+
2488
+ var _exceptions = __webpack_require__(8157);
2489
+
2490
+ var _defaults = __webpack_require__(5099);
2491
+
2492
+ var _defaults2 = _interopRequireDefault(_defaults);
2493
+
2494
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2495
+
2496
+ // The protype of the object returned from the JsBarcode() call
2497
+
2498
+
2499
+ // Help functions
2500
+ var API = function API() {};
2501
+
2502
+ // The first call of the library API
2503
+ // Will return an object with all barcodes calls and the data that is used
2504
+ // by the renderers
2505
+
2506
+
2507
+ // Default values
2508
+
2509
+
2510
+ // Exceptions
2511
+ // Import all the barcodes
2512
+ var JsBarcode = function JsBarcode(element, text, options) {
2513
+ var api = new API();
2514
+
2515
+ if (typeof element === "undefined") {
2516
+ throw Error("No element to render on was provided.");
2517
+ }
2518
+
2519
+ // Variables that will be pased through the API calls
2520
+ api._renderProperties = (0, _getRenderProperties2.default)(element);
2521
+ api._encodings = [];
2522
+ api._options = _defaults2.default;
2523
+ api._errorHandler = new _ErrorHandler2.default(api);
2524
+
2525
+ // If text is set, use the simple syntax (render the barcode directly)
2526
+ if (typeof text !== "undefined") {
2527
+ options = options || {};
2528
+
2529
+ if (!options.format) {
2530
+ options.format = autoSelectBarcode();
2531
+ }
2532
+
2533
+ api.options(options)[options.format](text, options).render();
2534
+ }
2535
+
2536
+ return api;
2537
+ };
2538
+
2539
+ // To make tests work TODO: remove
2540
+ JsBarcode.getModule = function (name) {
2541
+ return _barcodes2.default[name];
2542
+ };
2543
+
2544
+ // Register all barcodes
2545
+ for (var name in _barcodes2.default) {
2546
+ if (_barcodes2.default.hasOwnProperty(name)) {
2547
+ // Security check if the propery is a prototype property
2548
+ registerBarcode(_barcodes2.default, name);
2549
+ }
2550
+ }
2551
+ function registerBarcode(barcodes, name) {
2552
+ API.prototype[name] = API.prototype[name.toUpperCase()] = API.prototype[name.toLowerCase()] = function (text, options) {
2553
+ var api = this;
2554
+ return api._errorHandler.wrapBarcodeCall(function () {
2555
+ // Ensure text is options.text
2556
+ options.text = typeof options.text === 'undefined' ? undefined : '' + options.text;
2557
+
2558
+ var newOptions = (0, _merge2.default)(api._options, options);
2559
+ newOptions = (0, _optionsFromStrings2.default)(newOptions);
2560
+ var Encoder = barcodes[name];
2561
+ var encoded = encode(text, Encoder, newOptions);
2562
+ api._encodings.push(encoded);
2563
+
2564
+ return api;
2565
+ });
2566
+ };
2567
+ }
2568
+
2569
+ // encode() handles the Encoder call and builds the binary string to be rendered
2570
+ function encode(text, Encoder, options) {
2571
+ // Ensure that text is a string
2572
+ text = "" + text;
2573
+
2574
+ var encoder = new Encoder(text, options);
2575
+
2576
+ // If the input is not valid for the encoder, throw error.
2577
+ // If the valid callback option is set, call it instead of throwing error
2578
+ if (!encoder.valid()) {
2579
+ throw new _exceptions.InvalidInputException(encoder.constructor.name, text);
2580
+ }
2581
+
2582
+ // Make a request for the binary data (and other infromation) that should be rendered
2583
+ var encoded = encoder.encode();
2584
+
2585
+ // Encodings can be nestled like [[1-1, 1-2], 2, [3-1, 3-2]
2586
+ // Convert to [1-1, 1-2, 2, 3-1, 3-2]
2587
+ encoded = (0, _linearizeEncodings2.default)(encoded);
2588
+
2589
+ // Merge
2590
+ for (var i = 0; i < encoded.length; i++) {
2591
+ encoded[i].options = (0, _merge2.default)(options, encoded[i].options);
2592
+ }
2593
+
2594
+ return encoded;
2595
+ }
2596
+
2597
+ function autoSelectBarcode() {
2598
+ // If CODE128 exists. Use it
2599
+ if (_barcodes2.default["CODE128"]) {
2600
+ return "CODE128";
2601
+ }
2602
+
2603
+ // Else, take the first (probably only) barcode
2604
+ return Object.keys(_barcodes2.default)[0];
2605
+ }
2606
+
2607
+ // Sets global encoder options
2608
+ // Added to the api by the JsBarcode function
2609
+ API.prototype.options = function (options) {
2610
+ this._options = (0, _merge2.default)(this._options, options);
2611
+ return this;
2612
+ };
2613
+
2614
+ // Will create a blank space (usually in between barcodes)
2615
+ API.prototype.blank = function (size) {
2616
+ var zeroes = new Array(size + 1).join("0");
2617
+ this._encodings.push({ data: zeroes });
2618
+ return this;
2619
+ };
2620
+
2621
+ // Initialize JsBarcode on all HTML elements defined.
2622
+ API.prototype.init = function () {
2623
+ // Should do nothing if no elements where found
2624
+ if (!this._renderProperties) {
2625
+ return;
2626
+ }
2627
+
2628
+ // Make sure renderProperies is an array
2629
+ if (!Array.isArray(this._renderProperties)) {
2630
+ this._renderProperties = [this._renderProperties];
2631
+ }
2632
+
2633
+ var renderProperty;
2634
+ for (var i in this._renderProperties) {
2635
+ renderProperty = this._renderProperties[i];
2636
+ var options = (0, _merge2.default)(this._options, renderProperty.options);
2637
+
2638
+ if (options.format == "auto") {
2639
+ options.format = autoSelectBarcode();
2640
+ }
2641
+
2642
+ this._errorHandler.wrapBarcodeCall(function () {
2643
+ var text = options.value;
2644
+ var Encoder = _barcodes2.default[options.format.toUpperCase()];
2645
+ var encoded = encode(text, Encoder, options);
2646
+
2647
+ render(renderProperty, encoded, options);
2648
+ });
2649
+ }
2650
+ };
2651
+
2652
+ // The render API call. Calls the real render function.
2653
+ API.prototype.render = function () {
2654
+ if (!this._renderProperties) {
2655
+ throw new _exceptions.NoElementException();
2656
+ }
2657
+
2658
+ if (Array.isArray(this._renderProperties)) {
2659
+ for (var i = 0; i < this._renderProperties.length; i++) {
2660
+ render(this._renderProperties[i], this._encodings, this._options);
2661
+ }
2662
+ } else {
2663
+ render(this._renderProperties, this._encodings, this._options);
2664
+ }
2665
+
2666
+ return this;
2667
+ };
2668
+
2669
+ API.prototype._defaults = _defaults2.default;
2670
+
2671
+ // Prepares the encodings and calls the renderer
2672
+ function render(renderProperties, encodings, options) {
2673
+ encodings = (0, _linearizeEncodings2.default)(encodings);
2674
+
2675
+ for (var i = 0; i < encodings.length; i++) {
2676
+ encodings[i].options = (0, _merge2.default)(options, encodings[i].options);
2677
+ (0, _fixOptions2.default)(encodings[i].options);
2678
+ }
2679
+
2680
+ (0, _fixOptions2.default)(options);
2681
+
2682
+ var Renderer = renderProperties.renderer;
2683
+ var renderer = new Renderer(renderProperties.element, encodings, options);
2684
+ renderer.render();
2685
+
2686
+ if (renderProperties.afterRender) {
2687
+ renderProperties.afterRender();
2688
+ }
2689
+ }
2690
+
2691
+ // Export to browser
2692
+ if (typeof window !== "undefined") {
2693
+ window.JsBarcode = JsBarcode;
2694
+ }
2695
+
2696
+ // Export to jQuery
2697
+ /*global jQuery */
2698
+ if (typeof jQuery !== 'undefined') {
2699
+ jQuery.fn.JsBarcode = function (content, options) {
2700
+ var elementArray = [];
2701
+ jQuery(this).each(function () {
2702
+ elementArray.push(this);
2703
+ });
2704
+ return JsBarcode(elementArray, content, options);
2705
+ };
2706
+ }
2707
+
2708
+ // Export to commonJS
2709
+ module.exports = JsBarcode;
2710
+
2711
+ /***/ }),
2712
+
2713
+ /***/ 6258:
2714
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2715
+
2716
+
2717
+
2718
+ Object.defineProperty(exports, "__esModule", ({
2719
+ value: true
2720
+ }));
2721
+ exports.getTotalWidthOfEncodings = exports.calculateEncodingAttributes = exports.getBarcodePadding = exports.getEncodingHeight = exports.getMaximumHeightOfEncodings = undefined;
2722
+
2723
+ var _merge = __webpack_require__(1490);
2724
+
2725
+ var _merge2 = _interopRequireDefault(_merge);
2726
+
2727
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2728
+
2729
+ function getEncodingHeight(encoding, options) {
2730
+ return options.height + (options.displayValue && encoding.text.length > 0 ? options.fontSize + options.textMargin : 0) + options.marginTop + options.marginBottom;
2731
+ }
2732
+
2733
+ function getBarcodePadding(textWidth, barcodeWidth, options) {
2734
+ if (options.displayValue && barcodeWidth < textWidth) {
2735
+ if (options.textAlign == "center") {
2736
+ return Math.floor((textWidth - barcodeWidth) / 2);
2737
+ } else if (options.textAlign == "left") {
2738
+ return 0;
2739
+ } else if (options.textAlign == "right") {
2740
+ return Math.floor(textWidth - barcodeWidth);
2741
+ }
2742
+ }
2743
+ return 0;
2744
+ }
2745
+
2746
+ function calculateEncodingAttributes(encodings, barcodeOptions, context) {
2747
+ for (var i = 0; i < encodings.length; i++) {
2748
+ var encoding = encodings[i];
2749
+ var options = (0, _merge2.default)(barcodeOptions, encoding.options);
2750
+
2751
+ // Calculate the width of the encoding
2752
+ var textWidth;
2753
+ if (options.displayValue) {
2754
+ textWidth = messureText(encoding.text, options, context);
2755
+ } else {
2756
+ textWidth = 0;
2757
+ }
2758
+
2759
+ var barcodeWidth = encoding.data.length * options.width;
2760
+ encoding.width = Math.ceil(Math.max(textWidth, barcodeWidth));
2761
+
2762
+ encoding.height = getEncodingHeight(encoding, options);
2763
+
2764
+ encoding.barcodePadding = getBarcodePadding(textWidth, barcodeWidth, options);
2765
+ }
2766
+ }
2767
+
2768
+ function getTotalWidthOfEncodings(encodings) {
2769
+ var totalWidth = 0;
2770
+ for (var i = 0; i < encodings.length; i++) {
2771
+ totalWidth += encodings[i].width;
2772
+ }
2773
+ return totalWidth;
2774
+ }
2775
+
2776
+ function getMaximumHeightOfEncodings(encodings) {
2777
+ var maxHeight = 0;
2778
+ for (var i = 0; i < encodings.length; i++) {
2779
+ if (encodings[i].height > maxHeight) {
2780
+ maxHeight = encodings[i].height;
2781
+ }
2782
+ }
2783
+ return maxHeight;
2784
+ }
2785
+
2786
+ function messureText(string, options, context) {
2787
+ var ctx;
2788
+
2789
+ if (context) {
2790
+ ctx = context;
2791
+ } else if (typeof document !== "undefined") {
2792
+ ctx = document.createElement("canvas").getContext("2d");
2793
+ } else {
2794
+ // If the text cannot be messured we will return 0.
2795
+ // This will make some barcode with big text render incorrectly
2796
+ return 0;
2797
+ }
2798
+ ctx.font = options.fontOptions + " " + options.fontSize + "px " + options.font;
2799
+
2800
+ // Calculate the width of the encoding
2801
+ var measureTextResult = ctx.measureText(string);
2802
+ if (!measureTextResult) {
2803
+ // Some implementations don't implement measureText and return undefined.
2804
+ // If the text cannot be measured we will return 0.
2805
+ // This will make some barcode with big text render incorrectly
2806
+ return 0;
2807
+ }
2808
+ var size = measureTextResult.width;
2809
+ return size;
2810
+ }
2811
+
2812
+ exports.getMaximumHeightOfEncodings = getMaximumHeightOfEncodings;
2813
+ exports.getEncodingHeight = getEncodingHeight;
2814
+ exports.getBarcodePadding = getBarcodePadding;
2815
+ exports.calculateEncodingAttributes = calculateEncodingAttributes;
2816
+ exports.getTotalWidthOfEncodings = getTotalWidthOfEncodings;
2817
+
2818
+ /***/ }),
2819
+
2820
+ /***/ 6338:
2821
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2822
+
2823
+
2824
+
2825
+ Object.defineProperty(exports, "__esModule", ({
2826
+ value: true
2827
+ }));
2828
+
2829
+ var _MSI2 = __webpack_require__(3551);
2830
+
2831
+ var _MSI3 = _interopRequireDefault(_MSI2);
2832
+
2833
+ var _checksums = __webpack_require__(291);
2834
+
2835
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2836
+
2837
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2838
+
2839
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
2840
+
2841
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
2842
+
2843
+ var MSI10 = function (_MSI) {
2844
+ _inherits(MSI10, _MSI);
2845
+
2846
+ function MSI10(data, options) {
2847
+ _classCallCheck(this, MSI10);
2848
+
2849
+ return _possibleConstructorReturn(this, (MSI10.__proto__ || Object.getPrototypeOf(MSI10)).call(this, data + (0, _checksums.mod10)(data), options));
2850
+ }
2851
+
2852
+ return MSI10;
2853
+ }(_MSI3.default);
2854
+
2855
+ exports["default"] = MSI10;
2856
+
2857
+ /***/ }),
2858
+
2859
+ /***/ 6350:
2860
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2861
+
2862
+
2863
+
2864
+ Object.defineProperty(exports, "__esModule", ({
2865
+ value: true
2866
+ }));
2867
+
2868
+ var _constants = __webpack_require__(6575);
2869
+
2870
+ // Encode data string
2871
+ var encode = function encode(data, structure, separator) {
2872
+ var encoded = data.split('').map(function (val, idx) {
2873
+ return _constants.BINARIES[structure[idx]];
2874
+ }).map(function (val, idx) {
2875
+ return val ? val[data[idx]] : '';
2876
+ });
2877
+
2878
+ if (separator) {
2879
+ var last = data.length - 1;
2880
+ encoded = encoded.map(function (val, idx) {
2881
+ return idx < last ? val + separator : val;
2882
+ });
2883
+ }
2884
+
2885
+ return encoded.join('');
2886
+ };
2887
+
2888
+ exports["default"] = encode;
2889
+
2890
+ /***/ }),
2891
+
2892
+ /***/ 6575:
2893
+ /***/ ((__unused_webpack_module, exports) => {
2894
+
2895
+
2896
+
2897
+ Object.defineProperty(exports, "__esModule", ({
2898
+ value: true
2899
+ }));
2900
+ // Standard start end and middle bits
2901
+ var SIDE_BIN = exports.SIDE_BIN = '101';
2902
+ var MIDDLE_BIN = exports.MIDDLE_BIN = '01010';
2903
+
2904
+ var BINARIES = exports.BINARIES = {
2905
+ 'L': [// The L (left) type of encoding
2906
+ '0001101', '0011001', '0010011', '0111101', '0100011', '0110001', '0101111', '0111011', '0110111', '0001011'],
2907
+ 'G': [// The G type of encoding
2908
+ '0100111', '0110011', '0011011', '0100001', '0011101', '0111001', '0000101', '0010001', '0001001', '0010111'],
2909
+ 'R': [// The R (right) type of encoding
2910
+ '1110010', '1100110', '1101100', '1000010', '1011100', '1001110', '1010000', '1000100', '1001000', '1110100'],
2911
+ 'O': [// The O (odd) encoding for UPC-E
2912
+ '0001101', '0011001', '0010011', '0111101', '0100011', '0110001', '0101111', '0111011', '0110111', '0001011'],
2913
+ 'E': [// The E (even) encoding for UPC-E
2914
+ '0100111', '0110011', '0011011', '0100001', '0011101', '0111001', '0000101', '0010001', '0001001', '0010111']
2915
+ };
2916
+
2917
+ // Define the EAN-2 structure
2918
+ var EAN2_STRUCTURE = exports.EAN2_STRUCTURE = ['LL', 'LG', 'GL', 'GG'];
2919
+
2920
+ // Define the EAN-5 structure
2921
+ var EAN5_STRUCTURE = exports.EAN5_STRUCTURE = ['GGLLL', 'GLGLL', 'GLLGL', 'GLLLG', 'LGGLL', 'LLGGL', 'LLLGG', 'LGLGL', 'LGLLG', 'LLGLG'];
2922
+
2923
+ // Define the EAN-13 structure
2924
+ var EAN13_STRUCTURE = exports.EAN13_STRUCTURE = ['LLLLLL', 'LLGLGG', 'LLGGLG', 'LLGGGL', 'LGLLGG', 'LGGLLG', 'LGGGLL', 'LGLGLG', 'LGLGGL', 'LGGLGL'];
2925
+
2926
+ /***/ }),
2927
+
2928
+ /***/ 6929:
2929
+ /***/ ((__unused_webpack_module, exports) => {
2930
+
2931
+
2932
+
2933
+ Object.defineProperty(exports, "__esModule", ({
2934
+ value: true
2935
+ }));
2936
+ // The position in the array is the (checksum) value
2937
+ var SYMBOLS = exports.SYMBOLS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%',
2938
+ // Only used for csum and multi-symbols character encodings
2939
+ '($)', '(%)', '(/)', '(+)',
2940
+ // Start/Stop
2941
+ '\xff'];
2942
+
2943
+ // Order matches SYMBOLS array
2944
+ var BINARIES = exports.BINARIES = ['100010100', '101001000', '101000100', '101000010', '100101000', '100100100', '100100010', '101010000', '100010010', '100001010', '110101000', '110100100', '110100010', '110010100', '110010010', '110001010', '101101000', '101100100', '101100010', '100110100', '100011010', '101011000', '101001100', '101000110', '100101100', '100010110', '110110100', '110110010', '110101100', '110100110', '110010110', '110011010', '101101100', '101100110', '100110110', '100111010', '100101110', '111010100', '111010010', '111001010', '101101110', '101110110', '110101110', '100100110', '111011010', '111010110', '100110010', '101011110'];
2945
+
2946
+ // Multi-symbol characters (Full ASCII Code 93)
2947
+ var MULTI_SYMBOLS = exports.MULTI_SYMBOLS = {
2948
+ '\x00': ['(%)', 'U'],
2949
+ '\x01': ['($)', 'A'],
2950
+ '\x02': ['($)', 'B'],
2951
+ '\x03': ['($)', 'C'],
2952
+ '\x04': ['($)', 'D'],
2953
+ '\x05': ['($)', 'E'],
2954
+ '\x06': ['($)', 'F'],
2955
+ '\x07': ['($)', 'G'],
2956
+ '\x08': ['($)', 'H'],
2957
+ '\x09': ['($)', 'I'],
2958
+ '\x0a': ['($)', 'J'],
2959
+ '\x0b': ['($)', 'K'],
2960
+ '\x0c': ['($)', 'L'],
2961
+ '\x0d': ['($)', 'M'],
2962
+ '\x0e': ['($)', 'N'],
2963
+ '\x0f': ['($)', 'O'],
2964
+ '\x10': ['($)', 'P'],
2965
+ '\x11': ['($)', 'Q'],
2966
+ '\x12': ['($)', 'R'],
2967
+ '\x13': ['($)', 'S'],
2968
+ '\x14': ['($)', 'T'],
2969
+ '\x15': ['($)', 'U'],
2970
+ '\x16': ['($)', 'V'],
2971
+ '\x17': ['($)', 'W'],
2972
+ '\x18': ['($)', 'X'],
2973
+ '\x19': ['($)', 'Y'],
2974
+ '\x1a': ['($)', 'Z'],
2975
+ '\x1b': ['(%)', 'A'],
2976
+ '\x1c': ['(%)', 'B'],
2977
+ '\x1d': ['(%)', 'C'],
2978
+ '\x1e': ['(%)', 'D'],
2979
+ '\x1f': ['(%)', 'E'],
2980
+ '!': ['(/)', 'A'],
2981
+ '"': ['(/)', 'B'],
2982
+ '#': ['(/)', 'C'],
2983
+ '&': ['(/)', 'F'],
2984
+ '\'': ['(/)', 'G'],
2985
+ '(': ['(/)', 'H'],
2986
+ ')': ['(/)', 'I'],
2987
+ '*': ['(/)', 'J'],
2988
+ ',': ['(/)', 'L'],
2989
+ ':': ['(/)', 'Z'],
2990
+ ';': ['(%)', 'F'],
2991
+ '<': ['(%)', 'G'],
2992
+ '=': ['(%)', 'H'],
2993
+ '>': ['(%)', 'I'],
2994
+ '?': ['(%)', 'J'],
2995
+ '@': ['(%)', 'V'],
2996
+ '[': ['(%)', 'K'],
2997
+ '\\': ['(%)', 'L'],
2998
+ ']': ['(%)', 'M'],
2999
+ '^': ['(%)', 'N'],
3000
+ '_': ['(%)', 'O'],
3001
+ '`': ['(%)', 'W'],
3002
+ 'a': ['(+)', 'A'],
3003
+ 'b': ['(+)', 'B'],
3004
+ 'c': ['(+)', 'C'],
3005
+ 'd': ['(+)', 'D'],
3006
+ 'e': ['(+)', 'E'],
3007
+ 'f': ['(+)', 'F'],
3008
+ 'g': ['(+)', 'G'],
3009
+ 'h': ['(+)', 'H'],
3010
+ 'i': ['(+)', 'I'],
3011
+ 'j': ['(+)', 'J'],
3012
+ 'k': ['(+)', 'K'],
3013
+ 'l': ['(+)', 'L'],
3014
+ 'm': ['(+)', 'M'],
3015
+ 'n': ['(+)', 'N'],
3016
+ 'o': ['(+)', 'O'],
3017
+ 'p': ['(+)', 'P'],
3018
+ 'q': ['(+)', 'Q'],
3019
+ 'r': ['(+)', 'R'],
3020
+ 's': ['(+)', 'S'],
3021
+ 't': ['(+)', 'T'],
3022
+ 'u': ['(+)', 'U'],
3023
+ 'v': ['(+)', 'V'],
3024
+ 'w': ['(+)', 'W'],
3025
+ 'x': ['(+)', 'X'],
3026
+ 'y': ['(+)', 'Y'],
3027
+ 'z': ['(+)', 'Z'],
3028
+ '{': ['(%)', 'P'],
3029
+ '|': ['(%)', 'Q'],
3030
+ '}': ['(%)', 'R'],
3031
+ '~': ['(%)', 'S'],
3032
+ '\x7f': ['(%)', 'T']
3033
+ };
3034
+
3035
+ /***/ }),
3036
+
3037
+ /***/ 7052:
3038
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3039
+
3040
+
3041
+
3042
+ Object.defineProperty(exports, "__esModule", ({
3043
+ value: true
3044
+ }));
3045
+
3046
+ var _MSI2 = __webpack_require__(3551);
3047
+
3048
+ var _MSI3 = _interopRequireDefault(_MSI2);
3049
+
3050
+ var _checksums = __webpack_require__(291);
3051
+
3052
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3053
+
3054
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3055
+
3056
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
3057
+
3058
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
3059
+
3060
+ var MSI1110 = function (_MSI) {
3061
+ _inherits(MSI1110, _MSI);
3062
+
3063
+ function MSI1110(data, options) {
3064
+ _classCallCheck(this, MSI1110);
3065
+
3066
+ data += (0, _checksums.mod11)(data);
3067
+ data += (0, _checksums.mod10)(data);
3068
+ return _possibleConstructorReturn(this, (MSI1110.__proto__ || Object.getPrototypeOf(MSI1110)).call(this, data, options));
3069
+ }
3070
+
3071
+ return MSI1110;
3072
+ }(_MSI3.default);
3073
+
3074
+ exports["default"] = MSI1110;
3075
+
3076
+ /***/ }),
3077
+
3078
+ /***/ 7570:
3079
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3080
+
3081
+
3082
+
3083
+ Object.defineProperty(exports, "__esModule", ({
3084
+ value: true
3085
+ }));
3086
+
3087
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
3088
+
3089
+ var _constants = __webpack_require__(6575);
3090
+
3091
+ var _encoder = __webpack_require__(6350);
3092
+
3093
+ var _encoder2 = _interopRequireDefault(_encoder);
3094
+
3095
+ var _Barcode2 = __webpack_require__(2444);
3096
+
3097
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
3098
+
3099
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3100
+
3101
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3102
+
3103
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
3104
+
3105
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
3106
+ // https://en.wikipedia.org/wiki/EAN_2#Encoding
3107
+
3108
+ var EAN2 = function (_Barcode) {
3109
+ _inherits(EAN2, _Barcode);
3110
+
3111
+ function EAN2(data, options) {
3112
+ _classCallCheck(this, EAN2);
3113
+
3114
+ return _possibleConstructorReturn(this, (EAN2.__proto__ || Object.getPrototypeOf(EAN2)).call(this, data, options));
3115
+ }
3116
+
3117
+ _createClass(EAN2, [{
3118
+ key: 'valid',
3119
+ value: function valid() {
3120
+ return this.data.search(/^[0-9]{2}$/) !== -1;
3121
+ }
3122
+ }, {
3123
+ key: 'encode',
3124
+ value: function encode() {
3125
+ // Choose the structure based on the number mod 4
3126
+ var structure = _constants.EAN2_STRUCTURE[parseInt(this.data) % 4];
3127
+ return {
3128
+ // Start bits + Encode the two digits with 01 in between
3129
+ data: '1011' + (0, _encoder2.default)(this.data, structure, '01'),
3130
+ text: this.text
3131
+ };
3132
+ }
3133
+ }]);
3134
+
3135
+ return EAN2;
3136
+ }(_Barcode3.default);
3137
+
3138
+ exports["default"] = EAN2;
3139
+
3140
+ /***/ }),
3141
+
3142
+ /***/ 7960:
3143
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3144
+
3145
+
3146
+
3147
+ Object.defineProperty(exports, "__esModule", ({
3148
+ value: true
3149
+ }));
3150
+
3151
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
3152
+
3153
+ exports.checksum = checksum;
3154
+
3155
+ var _encoder = __webpack_require__(6350);
3156
+
3157
+ var _encoder2 = _interopRequireDefault(_encoder);
3158
+
3159
+ var _Barcode2 = __webpack_require__(2444);
3160
+
3161
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
3162
+
3163
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3164
+
3165
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3166
+
3167
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
3168
+
3169
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
3170
+ // https://en.wikipedia.org/wiki/Universal_Product_Code#Encoding
3171
+
3172
+ var UPC = function (_Barcode) {
3173
+ _inherits(UPC, _Barcode);
3174
+
3175
+ function UPC(data, options) {
3176
+ _classCallCheck(this, UPC);
3177
+
3178
+ // Add checksum if it does not exist
3179
+ if (data.search(/^[0-9]{11}$/) !== -1) {
3180
+ data += checksum(data);
3181
+ }
3182
+
3183
+ var _this = _possibleConstructorReturn(this, (UPC.__proto__ || Object.getPrototypeOf(UPC)).call(this, data, options));
3184
+
3185
+ _this.displayValue = options.displayValue;
3186
+
3187
+ // Make sure the font is not bigger than the space between the guard bars
3188
+ if (options.fontSize > options.width * 10) {
3189
+ _this.fontSize = options.width * 10;
3190
+ } else {
3191
+ _this.fontSize = options.fontSize;
3192
+ }
3193
+
3194
+ // Make the guard bars go down half the way of the text
3195
+ _this.guardHeight = options.height + _this.fontSize / 2 + options.textMargin;
3196
+ return _this;
3197
+ }
3198
+
3199
+ _createClass(UPC, [{
3200
+ key: "valid",
3201
+ value: function valid() {
3202
+ return this.data.search(/^[0-9]{12}$/) !== -1 && this.data[11] == checksum(this.data);
3203
+ }
3204
+ }, {
3205
+ key: "encode",
3206
+ value: function encode() {
3207
+ if (this.options.flat) {
3208
+ return this.flatEncoding();
3209
+ } else {
3210
+ return this.guardedEncoding();
3211
+ }
3212
+ }
3213
+ }, {
3214
+ key: "flatEncoding",
3215
+ value: function flatEncoding() {
3216
+ var result = "";
3217
+
3218
+ result += "101";
3219
+ result += (0, _encoder2.default)(this.data.substr(0, 6), "LLLLLL");
3220
+ result += "01010";
3221
+ result += (0, _encoder2.default)(this.data.substr(6, 6), "RRRRRR");
3222
+ result += "101";
3223
+
3224
+ return {
3225
+ data: result,
3226
+ text: this.text
3227
+ };
3228
+ }
3229
+ }, {
3230
+ key: "guardedEncoding",
3231
+ value: function guardedEncoding() {
3232
+ var result = [];
3233
+
3234
+ // Add the first digit
3235
+ if (this.displayValue) {
3236
+ result.push({
3237
+ data: "00000000",
3238
+ text: this.text.substr(0, 1),
3239
+ options: { textAlign: "left", fontSize: this.fontSize }
3240
+ });
3241
+ }
3242
+
3243
+ // Add the guard bars
3244
+ result.push({
3245
+ data: "101" + (0, _encoder2.default)(this.data[0], "L"),
3246
+ options: { height: this.guardHeight }
3247
+ });
3248
+
3249
+ // Add the left side
3250
+ result.push({
3251
+ data: (0, _encoder2.default)(this.data.substr(1, 5), "LLLLL"),
3252
+ text: this.text.substr(1, 5),
3253
+ options: { fontSize: this.fontSize }
3254
+ });
3255
+
3256
+ // Add the middle bits
3257
+ result.push({
3258
+ data: "01010",
3259
+ options: { height: this.guardHeight }
3260
+ });
3261
+
3262
+ // Add the right side
3263
+ result.push({
3264
+ data: (0, _encoder2.default)(this.data.substr(6, 5), "RRRRR"),
3265
+ text: this.text.substr(6, 5),
3266
+ options: { fontSize: this.fontSize }
3267
+ });
3268
+
3269
+ // Add the end bits
3270
+ result.push({
3271
+ data: (0, _encoder2.default)(this.data[11], "R") + "101",
3272
+ options: { height: this.guardHeight }
3273
+ });
3274
+
3275
+ // Add the last digit
3276
+ if (this.displayValue) {
3277
+ result.push({
3278
+ data: "00000000",
3279
+ text: this.text.substr(11, 1),
3280
+ options: { textAlign: "right", fontSize: this.fontSize }
3281
+ });
3282
+ }
3283
+
3284
+ return result;
3285
+ }
3286
+ }]);
3287
+
3288
+ return UPC;
3289
+ }(_Barcode3.default);
3290
+
3291
+ // Calulate the checksum digit
3292
+ // https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Calculation_of_checksum_digit
3293
+
3294
+
3295
+ function checksum(number) {
3296
+ var result = 0;
3297
+
3298
+ var i;
3299
+ for (i = 1; i < 11; i += 2) {
3300
+ result += parseInt(number[i]);
3301
+ }
3302
+ for (i = 0; i < 11; i += 2) {
3303
+ result += parseInt(number[i]) * 3;
3304
+ }
3305
+
3306
+ return (10 - result % 10) % 10;
3307
+ }
3308
+
3309
+ exports["default"] = UPC;
3310
+
3311
+ /***/ }),
3312
+
3313
+ /***/ 8075:
3314
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3315
+
3316
+
3317
+
3318
+ Object.defineProperty(exports, "__esModule", ({
3319
+ value: true
3320
+ }));
3321
+
3322
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
3323
+
3324
+ var _constants = __webpack_require__(6575);
3325
+
3326
+ var _encoder = __webpack_require__(6350);
3327
+
3328
+ var _encoder2 = _interopRequireDefault(_encoder);
3329
+
3330
+ var _Barcode2 = __webpack_require__(2444);
3331
+
3332
+ var _Barcode3 = _interopRequireDefault(_Barcode2);
3333
+
3334
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3335
+
3336
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3337
+
3338
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
3339
+
3340
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
3341
+ // https://en.wikipedia.org/wiki/EAN_5#Encoding
3342
+
3343
+ var checksum = function checksum(data) {
3344
+ var result = data.split('').map(function (n) {
3345
+ return +n;
3346
+ }).reduce(function (sum, a, idx) {
3347
+ return idx % 2 ? sum + a * 9 : sum + a * 3;
3348
+ }, 0);
3349
+ return result % 10;
3350
+ };
3351
+
3352
+ var EAN5 = function (_Barcode) {
3353
+ _inherits(EAN5, _Barcode);
3354
+
3355
+ function EAN5(data, options) {
3356
+ _classCallCheck(this, EAN5);
3357
+
3358
+ return _possibleConstructorReturn(this, (EAN5.__proto__ || Object.getPrototypeOf(EAN5)).call(this, data, options));
3359
+ }
3360
+
3361
+ _createClass(EAN5, [{
3362
+ key: 'valid',
3363
+ value: function valid() {
3364
+ return this.data.search(/^[0-9]{5}$/) !== -1;
3365
+ }
3366
+ }, {
3367
+ key: 'encode',
3368
+ value: function encode() {
3369
+ var structure = _constants.EAN5_STRUCTURE[checksum(this.data)];
3370
+ return {
3371
+ data: '1011' + (0, _encoder2.default)(this.data, structure, '01'),
3372
+ text: this.text
3373
+ };
3374
+ }
3375
+ }]);
3376
+
3377
+ return EAN5;
3378
+ }(_Barcode3.default);
3379
+
3380
+ exports["default"] = EAN5;
3381
+
3382
+ /***/ }),
3383
+
3384
+ /***/ 8122:
3385
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3386
+
3387
+
3388
+
3389
+ Object.defineProperty(exports, "__esModule", ({
3390
+ value: true
3391
+ }));
3392
+
3393
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
3394
+
3395
+ var _ITF2 = __webpack_require__(739);
3396
+
3397
+ var _ITF3 = _interopRequireDefault(_ITF2);
3398
+
3399
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3400
+
3401
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3402
+
3403
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
3404
+
3405
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
3406
+
3407
+ // Calculate the checksum digit
3408
+ var checksum = function checksum(data) {
3409
+ var res = data.substr(0, 13).split('').map(function (num) {
3410
+ return parseInt(num, 10);
3411
+ }).reduce(function (sum, n, idx) {
3412
+ return sum + n * (3 - idx % 2 * 2);
3413
+ }, 0);
3414
+
3415
+ return Math.ceil(res / 10) * 10 - res;
3416
+ };
3417
+
3418
+ var ITF14 = function (_ITF) {
3419
+ _inherits(ITF14, _ITF);
3420
+
3421
+ function ITF14(data, options) {
3422
+ _classCallCheck(this, ITF14);
3423
+
3424
+ // Add checksum if it does not exist
3425
+ if (data.search(/^[0-9]{13}$/) !== -1) {
3426
+ data += checksum(data);
3427
+ }
3428
+ return _possibleConstructorReturn(this, (ITF14.__proto__ || Object.getPrototypeOf(ITF14)).call(this, data, options));
3429
+ }
3430
+
3431
+ _createClass(ITF14, [{
3432
+ key: 'valid',
3433
+ value: function valid() {
3434
+ return this.data.search(/^[0-9]{14}$/) !== -1 && +this.data[13] === checksum(this.data);
3435
+ }
3436
+ }]);
3437
+
3438
+ return ITF14;
3439
+ }(_ITF3.default);
3440
+
3441
+ exports["default"] = ITF14;
3442
+
3443
+ /***/ }),
3444
+
3445
+ /***/ 8157:
3446
+ /***/ ((__unused_webpack_module, exports) => {
3447
+
3448
+
3449
+
3450
+ Object.defineProperty(exports, "__esModule", ({
3451
+ value: true
3452
+ }));
3453
+
3454
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3455
+
3456
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
3457
+
3458
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
3459
+
3460
+ var InvalidInputException = function (_Error) {
3461
+ _inherits(InvalidInputException, _Error);
3462
+
3463
+ function InvalidInputException(symbology, input) {
3464
+ _classCallCheck(this, InvalidInputException);
3465
+
3466
+ var _this = _possibleConstructorReturn(this, (InvalidInputException.__proto__ || Object.getPrototypeOf(InvalidInputException)).call(this));
3467
+
3468
+ _this.name = "InvalidInputException";
3469
+
3470
+ _this.symbology = symbology;
3471
+ _this.input = input;
3472
+
3473
+ _this.message = '"' + _this.input + '" is not a valid input for ' + _this.symbology;
3474
+ return _this;
3475
+ }
3476
+
3477
+ return InvalidInputException;
3478
+ }(Error);
3479
+
3480
+ var InvalidElementException = function (_Error2) {
3481
+ _inherits(InvalidElementException, _Error2);
3482
+
3483
+ function InvalidElementException() {
3484
+ _classCallCheck(this, InvalidElementException);
3485
+
3486
+ var _this2 = _possibleConstructorReturn(this, (InvalidElementException.__proto__ || Object.getPrototypeOf(InvalidElementException)).call(this));
3487
+
3488
+ _this2.name = "InvalidElementException";
3489
+ _this2.message = "Not supported type to render on";
3490
+ return _this2;
3491
+ }
3492
+
3493
+ return InvalidElementException;
3494
+ }(Error);
3495
+
3496
+ var NoElementException = function (_Error3) {
3497
+ _inherits(NoElementException, _Error3);
3498
+
3499
+ function NoElementException() {
3500
+ _classCallCheck(this, NoElementException);
3501
+
3502
+ var _this3 = _possibleConstructorReturn(this, (NoElementException.__proto__ || Object.getPrototypeOf(NoElementException)).call(this));
3503
+
3504
+ _this3.name = "NoElementException";
3505
+ _this3.message = "No element to render on.";
3506
+ return _this3;
3507
+ }
3508
+
3509
+ return NoElementException;
3510
+ }(Error);
3511
+
3512
+ exports.InvalidInputException = InvalidInputException;
3513
+ exports.InvalidElementException = InvalidElementException;
3514
+ exports.NoElementException = NoElementException;
3515
+
3516
+ /***/ }),
3517
+
3518
+ /***/ 8165:
3519
+ /***/ ((__unused_webpack_module, exports) => {
3520
+
3521
+
3522
+
3523
+ Object.defineProperty(exports, "__esModule", ({
3524
+ value: true
3525
+ }));
3526
+ exports["default"] = linearizeEncodings;
3527
+
3528
+ // Encodings can be nestled like [[1-1, 1-2], 2, [3-1, 3-2]
3529
+ // Convert to [1-1, 1-2, 2, 3-1, 3-2]
3530
+
3531
+ function linearizeEncodings(encodings) {
3532
+ var linearEncodings = [];
3533
+ function nextLevel(encoded) {
3534
+ if (Array.isArray(encoded)) {
3535
+ for (var i = 0; i < encoded.length; i++) {
3536
+ nextLevel(encoded[i]);
3537
+ }
3538
+ } else {
3539
+ encoded.text = encoded.text || "";
3540
+ encoded.data = encoded.data || "";
3541
+ linearEncodings.push(encoded);
3542
+ }
3543
+ }
3544
+ nextLevel(encodings);
3545
+
3546
+ return linearEncodings;
3547
+ }
3548
+
3549
+ /***/ }),
3550
+
3551
+ /***/ 8179:
3552
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3553
+
3554
+
3555
+
3556
+ Object.defineProperty(exports, "__esModule", ({
3557
+ value: true
3558
+ }));
3559
+
3560
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /* global HTMLImageElement */
3561
+ /* global HTMLCanvasElement */
3562
+ /* global SVGElement */
3563
+
3564
+ var _getOptionsFromElement = __webpack_require__(892);
3565
+
3566
+ var _getOptionsFromElement2 = _interopRequireDefault(_getOptionsFromElement);
3567
+
3568
+ var _renderers = __webpack_require__(2727);
3569
+
3570
+ var _renderers2 = _interopRequireDefault(_renderers);
3571
+
3572
+ var _exceptions = __webpack_require__(8157);
3573
+
3574
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3575
+
3576
+ // Takes an element and returns an object with information about how
3577
+ // it should be rendered
3578
+ // This could also return an array with these objects
3579
+ // {
3580
+ // element: The element that the renderer should draw on
3581
+ // renderer: The name of the renderer
3582
+ // afterRender (optional): If something has to done after the renderer
3583
+ // completed, calls afterRender (function)
3584
+ // options (optional): Options that can be defined in the element
3585
+ // }
3586
+
3587
+ function getRenderProperties(element) {
3588
+ // If the element is a string, query select call again
3589
+ if (typeof element === "string") {
3590
+ return querySelectedRenderProperties(element);
3591
+ }
3592
+ // If element is array. Recursivly call with every object in the array
3593
+ else if (Array.isArray(element)) {
3594
+ var returnArray = [];
3595
+ for (var i = 0; i < element.length; i++) {
3596
+ returnArray.push(getRenderProperties(element[i]));
3597
+ }
3598
+ return returnArray;
3599
+ }
3600
+ // If element, render on canvas and set the uri as src
3601
+ else if (typeof HTMLCanvasElement !== 'undefined' && element instanceof HTMLImageElement) {
3602
+ return newCanvasRenderProperties(element);
3603
+ }
3604
+ // If SVG
3605
+ else if (element && element.nodeName && element.nodeName.toLowerCase() === 'svg' || typeof SVGElement !== 'undefined' && element instanceof SVGElement) {
3606
+ return {
3607
+ element: element,
3608
+ options: (0, _getOptionsFromElement2.default)(element),
3609
+ renderer: _renderers2.default.SVGRenderer
3610
+ };
3611
+ }
3612
+ // If canvas (in browser)
3613
+ else if (typeof HTMLCanvasElement !== 'undefined' && element instanceof HTMLCanvasElement) {
3614
+ return {
3615
+ element: element,
3616
+ options: (0, _getOptionsFromElement2.default)(element),
3617
+ renderer: _renderers2.default.CanvasRenderer
3618
+ };
3619
+ }
3620
+ // If canvas (in node)
3621
+ else if (element && element.getContext) {
3622
+ return {
3623
+ element: element,
3624
+ renderer: _renderers2.default.CanvasRenderer
3625
+ };
3626
+ } else if (element && (typeof element === "undefined" ? "undefined" : _typeof(element)) === 'object' && !element.nodeName) {
3627
+ return {
3628
+ element: element,
3629
+ renderer: _renderers2.default.ObjectRenderer
3630
+ };
3631
+ } else {
3632
+ throw new _exceptions.InvalidElementException();
3633
+ }
3634
+ }
3635
+
3636
+ function querySelectedRenderProperties(string) {
3637
+ var selector = document.querySelectorAll(string);
3638
+ if (selector.length === 0) {
3639
+ return undefined;
3640
+ } else {
3641
+ var returnArray = [];
3642
+ for (var i = 0; i < selector.length; i++) {
3643
+ returnArray.push(getRenderProperties(selector[i]));
3644
+ }
3645
+ return returnArray;
3646
+ }
3647
+ }
3648
+
3649
+ function newCanvasRenderProperties(imgElement) {
3650
+ var canvas = document.createElement('canvas');
3651
+ return {
3652
+ element: canvas,
3653
+ options: (0, _getOptionsFromElement2.default)(imgElement),
3654
+ renderer: _renderers2.default.CanvasRenderer,
3655
+ afterRender: function afterRender() {
3656
+ imgElement.setAttribute("src", canvas.toDataURL());
3657
+ }
3658
+ };
3659
+ }
3660
+
3661
+ exports["default"] = getRenderProperties;
3662
+
3663
+ /***/ }),
3664
+
3665
+ /***/ 8248:
3666
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3667
+
3668
+
3669
+
3670
+ Object.defineProperty(exports, "__esModule", ({
3671
+ value: true
3672
+ }));
3673
+ exports.MSI1110 = exports.MSI1010 = exports.MSI11 = exports.MSI10 = exports.MSI = undefined;
3674
+
3675
+ var _MSI = __webpack_require__(3551);
3676
+
3677
+ var _MSI2 = _interopRequireDefault(_MSI);
3678
+
3679
+ var _MSI3 = __webpack_require__(6338);
3680
+
3681
+ var _MSI4 = _interopRequireDefault(_MSI3);
3682
+
3683
+ var _MSI5 = __webpack_require__(6065);
3684
+
3685
+ var _MSI6 = _interopRequireDefault(_MSI5);
3686
+
3687
+ var _MSI7 = __webpack_require__(23);
3688
+
3689
+ var _MSI8 = _interopRequireDefault(_MSI7);
3690
+
3691
+ var _MSI9 = __webpack_require__(7052);
3692
+
3693
+ var _MSI10 = _interopRequireDefault(_MSI9);
3694
+
3695
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3696
+
3697
+ exports.MSI = _MSI2.default;
3698
+ exports.MSI10 = _MSI4.default;
3699
+ exports.MSI11 = _MSI6.default;
3700
+ exports.MSI1010 = _MSI8.default;
3701
+ exports.MSI1110 = _MSI10.default;
3702
+
3703
+ /***/ }),
3704
+
3705
+ /***/ 8784:
3706
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3707
+
3708
+
3709
+
3710
+ Object.defineProperty(exports, "__esModule", ({
3711
+ value: true
3712
+ }));
3713
+
3714
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
3715
+
3716
+ var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
3717
+
3718
+ var _EAN2 = __webpack_require__(4754);
3719
+
3720
+ var _EAN3 = _interopRequireDefault(_EAN2);
3721
+
3722
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3723
+
3724
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3725
+
3726
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
3727
+
3728
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
3729
+ // http://www.barcodeisland.com/ean8.phtml
3730
+
3731
+ // Calculate the checksum digit
3732
+ var checksum = function checksum(number) {
3733
+ var res = number.substr(0, 7).split('').map(function (n) {
3734
+ return +n;
3735
+ }).reduce(function (sum, a, idx) {
3736
+ return idx % 2 ? sum + a : sum + a * 3;
3737
+ }, 0);
3738
+
3739
+ return (10 - res % 10) % 10;
3740
+ };
3741
+
3742
+ var EAN8 = function (_EAN) {
3743
+ _inherits(EAN8, _EAN);
3744
+
3745
+ function EAN8(data, options) {
3746
+ _classCallCheck(this, EAN8);
3747
+
3748
+ // Add checksum if it does not exist
3749
+ if (data.search(/^[0-9]{7}$/) !== -1) {
3750
+ data += checksum(data);
3751
+ }
3752
+
3753
+ return _possibleConstructorReturn(this, (EAN8.__proto__ || Object.getPrototypeOf(EAN8)).call(this, data, options));
3754
+ }
3755
+
3756
+ _createClass(EAN8, [{
3757
+ key: 'valid',
3758
+ value: function valid() {
3759
+ return this.data.search(/^[0-9]{8}$/) !== -1 && +this.data[7] === checksum(this.data);
3760
+ }
3761
+ }, {
3762
+ key: 'leftText',
3763
+ value: function leftText() {
3764
+ return _get(EAN8.prototype.__proto__ || Object.getPrototypeOf(EAN8.prototype), 'leftText', this).call(this, 0, 4);
3765
+ }
3766
+ }, {
3767
+ key: 'leftEncode',
3768
+ value: function leftEncode() {
3769
+ var data = this.data.substr(0, 4);
3770
+ return _get(EAN8.prototype.__proto__ || Object.getPrototypeOf(EAN8.prototype), 'leftEncode', this).call(this, data, 'LLLL');
3771
+ }
3772
+ }, {
3773
+ key: 'rightText',
3774
+ value: function rightText() {
3775
+ return _get(EAN8.prototype.__proto__ || Object.getPrototypeOf(EAN8.prototype), 'rightText', this).call(this, 4, 4);
3776
+ }
3777
+ }, {
3778
+ key: 'rightEncode',
3779
+ value: function rightEncode() {
3780
+ var data = this.data.substr(4, 4);
3781
+ return _get(EAN8.prototype.__proto__ || Object.getPrototypeOf(EAN8.prototype), 'rightEncode', this).call(this, data, 'RRRR');
3782
+ }
3783
+ }]);
3784
+
3785
+ return EAN8;
3786
+ }(_EAN3.default);
3787
+
3788
+ exports["default"] = EAN8;
3789
+
3790
+ /***/ }),
3791
+
3792
+ /***/ 9368:
3793
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3794
+
3795
+
3796
+
3797
+ Object.defineProperty(exports, "__esModule", ({
3798
+ value: true
3799
+ }));
3800
+
3801
+ var _CODE = __webpack_require__(1428);
3802
+
3803
+ var _CODE2 = __webpack_require__(1509);
3804
+
3805
+ var _EAN_UPC = __webpack_require__(5726);
3806
+
3807
+ var _ITF = __webpack_require__(2689);
3808
+
3809
+ var _MSI = __webpack_require__(8248);
3810
+
3811
+ var _pharmacode = __webpack_require__(2889);
3812
+
3813
+ var _codabar = __webpack_require__(1133);
3814
+
3815
+ var _CODE3 = __webpack_require__(9852);
3816
+
3817
+ var _GenericBarcode = __webpack_require__(1886);
3818
+
3819
+ exports["default"] = {
3820
+ CODE39: _CODE.CODE39,
3821
+ CODE128: _CODE2.CODE128, CODE128A: _CODE2.CODE128A, CODE128B: _CODE2.CODE128B, CODE128C: _CODE2.CODE128C,
3822
+ EAN13: _EAN_UPC.EAN13, EAN8: _EAN_UPC.EAN8, EAN5: _EAN_UPC.EAN5, EAN2: _EAN_UPC.EAN2, UPC: _EAN_UPC.UPC, UPCE: _EAN_UPC.UPCE,
3823
+ ITF14: _ITF.ITF14,
3824
+ ITF: _ITF.ITF,
3825
+ MSI: _MSI.MSI, MSI10: _MSI.MSI10, MSI11: _MSI.MSI11, MSI1010: _MSI.MSI1010, MSI1110: _MSI.MSI1110,
3826
+ pharmacode: _pharmacode.pharmacode,
3827
+ codabar: _codabar.codabar,
3828
+ CODE93: _CODE3.CODE93, CODE93FullASCII: _CODE3.CODE93FullASCII,
3829
+ GenericBarcode: _GenericBarcode.GenericBarcode
3830
+ };
3831
+
3832
+ /***/ }),
3833
+
3834
+ /***/ 9796:
3835
+ /***/ ((__unused_webpack_module, exports) => {
3836
+
3837
+
3838
+
3839
+ Object.defineProperty(exports, "__esModule", ({
3840
+ value: true
3841
+ }));
3842
+ exports["default"] = optionsFromStrings;
3843
+
3844
+ // Convert string to integers/booleans where it should be
3845
+
3846
+ function optionsFromStrings(options) {
3847
+ var intOptions = ["width", "height", "textMargin", "fontSize", "margin", "marginTop", "marginBottom", "marginLeft", "marginRight"];
3848
+
3849
+ for (var intOption in intOptions) {
3850
+ if (intOptions.hasOwnProperty(intOption)) {
3851
+ intOption = intOptions[intOption];
3852
+ if (typeof options[intOption] === "string") {
3853
+ options[intOption] = parseInt(options[intOption], 10);
3854
+ }
3855
+ }
3856
+ }
3857
+
3858
+ if (typeof options["displayValue"] === "string") {
3859
+ options["displayValue"] = options["displayValue"] != "false";
3860
+ }
3861
+
3862
+ return options;
3863
+ }
3864
+
3865
+ /***/ }),
3866
+
3867
+ /***/ 9852:
3868
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3869
+
3870
+
3871
+
3872
+ Object.defineProperty(exports, "__esModule", ({
3873
+ value: true
3874
+ }));
3875
+ exports.CODE93FullASCII = exports.CODE93 = undefined;
3876
+
3877
+ var _CODE = __webpack_require__(1087);
3878
+
3879
+ var _CODE2 = _interopRequireDefault(_CODE);
3880
+
3881
+ var _CODE93FullASCII = __webpack_require__(1271);
3882
+
3883
+ var _CODE93FullASCII2 = _interopRequireDefault(_CODE93FullASCII);
3884
+
3885
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3886
+
3887
+ exports.CODE93 = _CODE2.default;
3888
+ exports.CODE93FullASCII = _CODE93FullASCII2.default;
3889
+
3890
+ /***/ })
3891
+
3892
+ }]);
3893
+ //# sourceMappingURL=129.533eb7b36d92578d2ead.js.map