@oiz/stzh-components 3.1.0 → 3.2.0-beta1

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 (673) hide show
  1. package/dist/cjs/{app-globals-0699ef40.js → app-globals-efe6d21d.js} +2 -2
  2. package/dist/cjs/{app-globals-0699ef40.js.map → app-globals-efe6d21d.js.map} +1 -1
  3. package/dist/cjs/index-92254d32.js +28 -16
  4. package/dist/cjs/index.cjs.js.map +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/stzh-accordion_3.cjs.entry.js +24 -8
  7. package/dist/cjs/stzh-accordion_3.cjs.entry.js.map +1 -1
  8. package/dist/cjs/stzh-actions.cjs.entry.js +1 -1
  9. package/dist/cjs/stzh-anchornav.cjs.entry.js +4 -3
  10. package/dist/cjs/stzh-anchornav.cjs.entry.js.map +1 -1
  11. package/dist/cjs/stzh-app-bar.cjs.entry.js +48 -0
  12. package/dist/cjs/stzh-app-bar.cjs.entry.js.map +1 -0
  13. package/dist/cjs/stzh-appointments.cjs.entry.js +1 -1
  14. package/dist/cjs/stzh-audio.cjs.entry.js +1 -1
  15. package/dist/cjs/stzh-badge_3.cjs.entry.js +1 -1
  16. package/dist/cjs/stzh-card-navigation.cjs.entry.js +1 -1
  17. package/dist/cjs/stzh-card-searchresult.cjs.entry.js +1 -1
  18. package/dist/cjs/stzh-card-superteaser.cjs.entry.js +1 -1
  19. package/dist/cjs/stzh-card_2.cjs.entry.js +8 -2
  20. package/dist/cjs/stzh-card_2.cjs.entry.js.map +1 -1
  21. package/dist/cjs/stzh-carousel.cjs.entry.js +1 -1
  22. package/dist/cjs/stzh-checkbox.cjs.entry.js +1 -1
  23. package/dist/cjs/stzh-checkboxgroup.cjs.entry.js +1 -1
  24. package/dist/cjs/stzh-chip.cjs.entry.js +22 -32
  25. package/dist/cjs/stzh-chip.cjs.entry.js.map +1 -1
  26. package/dist/cjs/stzh-components.cjs.js +2 -2
  27. package/dist/cjs/stzh-contact-cv.cjs.entry.js +63 -0
  28. package/dist/cjs/stzh-contact-cv.cjs.entry.js.map +1 -0
  29. package/dist/cjs/stzh-contact.cjs.entry.js +5 -3
  30. package/dist/cjs/stzh-contact.cjs.entry.js.map +1 -1
  31. package/dist/cjs/stzh-container.cjs.entry.js +1 -1
  32. package/dist/cjs/stzh-container.cjs.entry.js.map +1 -1
  33. package/dist/cjs/stzh-cspace.cjs.entry.js +2 -2
  34. package/dist/cjs/stzh-cspace.cjs.entry.js.map +1 -1
  35. package/dist/cjs/stzh-cta.cjs.entry.js +1 -1
  36. package/dist/cjs/stzh-datatable.cjs.entry.js +1 -1
  37. package/dist/cjs/stzh-datepicker_3.cjs.entry.js +1 -1
  38. package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
  39. package/dist/cjs/stzh-daterange.cjs.entry.js +1 -1
  40. package/dist/cjs/stzh-details.cjs.entry.js +1 -1
  41. package/dist/cjs/stzh-dialog.cjs.entry.js +1 -1
  42. package/dist/cjs/stzh-dialog.cjs.entry.js.map +1 -1
  43. package/dist/cjs/stzh-disturber.cjs.entry.js +1 -1
  44. package/dist/cjs/stzh-dropdown.cjs.entry.js +1 -1
  45. package/dist/cjs/stzh-eventinfo.cjs.entry.js +1 -1
  46. package/dist/cjs/stzh-figure.cjs.entry.js +1 -1
  47. package/dist/cjs/stzh-footer.cjs.entry.js +2 -2
  48. package/dist/cjs/stzh-footer.cjs.entry.js.map +1 -1
  49. package/dist/cjs/stzh-ghettobox_3.cjs.entry.js +27 -19
  50. package/dist/cjs/stzh-ghettobox_3.cjs.entry.js.map +1 -1
  51. package/dist/cjs/stzh-header.cjs.entry.js +2 -2
  52. package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
  53. package/dist/cjs/stzh-homepage-service-highlights.cjs.entry.js +1 -1
  54. package/dist/cjs/stzh-homepage-service-highlights.cjs.entry.js.map +1 -1
  55. package/dist/cjs/stzh-iframe.cjs.entry.js +2881 -24
  56. package/dist/cjs/stzh-iframe.cjs.entry.js.map +1 -1
  57. package/dist/cjs/stzh-input.cjs.entry.js +8 -4
  58. package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
  59. package/dist/cjs/stzh-link.cjs.entry.js +1 -1
  60. package/dist/cjs/{stzh-list.cjs.entry.js → stzh-list_2.cjs.entry.js} +20 -1
  61. package/dist/cjs/stzh-list_2.cjs.entry.js.map +1 -0
  62. package/dist/cjs/stzh-menu_2.cjs.entry.js +1 -1
  63. package/dist/cjs/stzh-pagecontent.cjs.entry.js +1 -1
  64. package/dist/cjs/stzh-pagetitle-hero.cjs.entry.js +1 -1
  65. package/dist/cjs/stzh-pagetitle-home.cjs.entry.js +2 -2
  66. package/dist/cjs/stzh-pagetitle-home.cjs.entry.js.map +1 -1
  67. package/dist/cjs/stzh-pagetitle.cjs.entry.js +2 -2
  68. package/dist/cjs/stzh-pagetitle.cjs.entry.js.map +1 -1
  69. package/dist/cjs/stzh-panorama.cjs.entry.js +1 -1
  70. package/dist/cjs/stzh-panorama.cjs.entry.js.map +1 -1
  71. package/dist/cjs/stzh-pi-content-navigation.cjs.entry.js +1 -1
  72. package/dist/cjs/stzh-pi-pagetitle.cjs.entry.js +1 -1
  73. package/dist/cjs/stzh-pi-teaser.cjs.entry.js +1 -1
  74. package/dist/cjs/stzh-popover_2.cjs.entry.js +90 -67
  75. package/dist/cjs/stzh-popover_2.cjs.entry.js.map +1 -1
  76. package/dist/cjs/stzh-print_2.cjs.entry.js +1 -1
  77. package/dist/cjs/stzh-ratio.cjs.entry.js +1 -1
  78. package/dist/cjs/stzh-ratio.cjs.entry.js.map +1 -1
  79. package/dist/cjs/stzh-readspeaker.cjs.entry.js +1 -1
  80. package/dist/cjs/stzh-scrollup.cjs.entry.js +6 -6
  81. package/dist/cjs/stzh-scrollup.cjs.entry.js.map +1 -1
  82. package/dist/cjs/stzh-search.cjs.entry.js +1 -1
  83. package/dist/cjs/stzh-section.cjs.entry.js +1 -1
  84. package/dist/cjs/stzh-section.cjs.entry.js.map +1 -1
  85. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
  86. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
  87. package/dist/cjs/stzh-sticky-actions.cjs.entry.js +9 -8
  88. package/dist/cjs/stzh-sticky-actions.cjs.entry.js.map +1 -1
  89. package/dist/cjs/stzh-sticky.cjs.entry.js +1 -1
  90. package/dist/cjs/stzh-table.cjs.entry.js +1 -1
  91. package/dist/cjs/stzh-textandimage.cjs.entry.js +1 -1
  92. package/dist/cjs/stzh-timeline-item.cjs.entry.js +1 -1
  93. package/dist/cjs/stzh-toast.cjs.entry.js +1 -1
  94. package/dist/cjs/stzh-toggle.cjs.entry.js +1 -1
  95. package/dist/cjs/stzh-tooltip.cjs.entry.js +2 -2
  96. package/dist/cjs/stzh-tooltip.cjs.entry.js.map +1 -1
  97. package/dist/cjs/stzh-twocolumns.cjs.entry.js +1 -1
  98. package/dist/cjs/stzh-upload.cjs.entry.js +3101 -7
  99. package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
  100. package/dist/cjs/stzh-vbz-carousel.cjs.entry.js +1 -1
  101. package/dist/cjs/stzh-vbz-carousel.cjs.entry.js.map +1 -1
  102. package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js +25 -0
  103. package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js.map +1 -0
  104. package/dist/cjs/stzh-vbz-intro.cjs.entry.js +58 -0
  105. package/dist/cjs/stzh-vbz-intro.cjs.entry.js.map +1 -0
  106. package/dist/cjs/stzh-vbz-linechip.cjs.entry.js +1 -1
  107. package/dist/cjs/stzh-vbz-linechip.cjs.entry.js.map +1 -1
  108. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +33 -44
  109. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js.map +1 -1
  110. package/dist/cjs/{utils-d0fff87f.js → utils-d091c010.js} +40 -9
  111. package/dist/cjs/utils-d091c010.js.map +1 -0
  112. package/dist/collection/assets/i18n/de.json +22 -7
  113. package/dist/collection/assets/i18n/en.json +22 -7
  114. package/dist/collection/assets/media/icons/mono/construction.svg +1 -1
  115. package/dist/collection/assets/media/icons/mono/crop.svg +1 -0
  116. package/dist/collection/assets/meta/icons-preview.html +6 -1
  117. package/dist/collection/assets/mock/appl/mobiscan/publicEndpoint/image/retreive-pdf +5 -0
  118. package/dist/collection/assets/mock/appl/mobiscan/publicEndpoint/ping +3 -0
  119. package/dist/collection/assets/mock/appl/mobiscan/publicEndpoint/url +3 -0
  120. package/dist/collection/assets/mock/appl/mobiscan/rs/auth +4 -0
  121. package/dist/collection/assets/mock/appl/mobiscan/rs/config +5 -0
  122. package/dist/collection/assets/vendors/iframe-resizer/iframeResizer.contentWindow.js +1311 -0
  123. package/dist/collection/collection-manifest.json +4 -0
  124. package/dist/collection/components/stzh-accordion/stzh-accordion.css +39 -0
  125. package/dist/collection/components/stzh-accordion/stzh-accordion.js +20 -0
  126. package/dist/collection/components/stzh-accordion/stzh-accordion.js.map +1 -1
  127. package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.css +5 -0
  128. package/dist/collection/components/stzh-anchornav/stzh-anchornav.js +5 -4
  129. package/dist/collection/components/stzh-anchornav/stzh-anchornav.js.map +1 -1
  130. package/dist/collection/components/stzh-app-bar/stzh-app-bar.css +253 -0
  131. package/dist/collection/components/stzh-app-bar/stzh-app-bar.e2e.js +16 -0
  132. package/dist/collection/components/stzh-app-bar/stzh-app-bar.e2e.js.map +1 -0
  133. package/dist/collection/components/stzh-app-bar/stzh-app-bar.js +54 -0
  134. package/dist/collection/components/stzh-app-bar/stzh-app-bar.js.map +1 -0
  135. package/dist/collection/components/stzh-app-bar/stzh-app-bar.stories.js +45 -0
  136. package/dist/collection/components/stzh-cardlist/stzh-cardlist.css +5 -0
  137. package/dist/collection/components/stzh-cardlist/stzh-cardlist.js +9 -2
  138. package/dist/collection/components/stzh-cardlist/stzh-cardlist.js.map +1 -1
  139. package/dist/collection/components/stzh-chip/stzh-chip.js +23 -33
  140. package/dist/collection/components/stzh-chip/stzh-chip.js.map +1 -1
  141. package/dist/collection/components/stzh-contact/stzh-contact.css +47 -15
  142. package/dist/collection/components/stzh-contact/stzh-contact.js +21 -1
  143. package/dist/collection/components/stzh-contact/stzh-contact.js.map +1 -1
  144. package/dist/collection/components/stzh-contact/stzh-contact.stories.js +68 -49
  145. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.css +196 -0
  146. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.e2e.js +16 -0
  147. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.e2e.js.map +1 -0
  148. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.js +163 -0
  149. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.js.map +1 -0
  150. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.localization.js +2 -0
  151. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.localization.js.map +1 -0
  152. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.stories.js +52 -0
  153. package/dist/collection/components/stzh-container/stzh-container.css +2 -1
  154. package/dist/collection/components/stzh-cspace/stzh-cspace.css +53 -0
  155. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js +1 -1
  156. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js.map +1 -1
  157. package/dist/collection/components/stzh-footer/stzh-footer.css +10 -2
  158. package/dist/collection/components/stzh-header/stzh-header.css +19 -3
  159. package/dist/collection/components/stzh-homepage-service-highlights/stzh-homepage-service-highlights.css +14 -3
  160. package/dist/collection/components/stzh-homepage-service-highlights/stzh-homepage-service-highlights.stories.js +1 -1
  161. package/dist/collection/components/stzh-iframe/stzh-iframe.css +8 -1
  162. package/dist/collection/components/stzh-iframe/stzh-iframe.js +139 -26
  163. package/dist/collection/components/stzh-iframe/stzh-iframe.js.map +1 -1
  164. package/dist/collection/components/stzh-iframe/stzh-iframe.stories.js +30 -11
  165. package/dist/collection/components/stzh-input/stzh-input.css +1 -1
  166. package/dist/collection/components/stzh-input/stzh-input.js +8 -3
  167. package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
  168. package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.css +2 -1
  169. package/dist/collection/components/stzh-pagetitle-home/stzh-pagetitle-home.css +19 -0
  170. package/dist/collection/components/stzh-pagination/stzh-pagination.css +11 -1
  171. package/dist/collection/components/stzh-pagination/stzh-pagination.js +43 -6
  172. package/dist/collection/components/stzh-pagination/stzh-pagination.js.map +1 -1
  173. package/dist/collection/components/stzh-panorama/stzh-panorama.js +1 -1
  174. package/dist/collection/components/stzh-panorama/stzh-panorama.js.map +1 -1
  175. package/dist/collection/components/stzh-popover/stzh-popover.js +101 -75
  176. package/dist/collection/components/stzh-popover/stzh-popover.js.map +1 -1
  177. package/dist/collection/components/stzh-ratio/stzh-ratio.css +6 -0
  178. package/dist/collection/components/stzh-richtext/stzh-richtext.js +28 -20
  179. package/dist/collection/components/stzh-richtext/stzh-richtext.js.map +1 -1
  180. package/dist/collection/components/stzh-richtext/stzh-richtext.stories.js +15 -6
  181. package/dist/collection/components/stzh-scrollup/stzh-scrollup.js +6 -6
  182. package/dist/collection/components/stzh-scrollup/stzh-scrollup.js.map +1 -1
  183. package/dist/collection/components/stzh-section/stzh-section.css +134 -1
  184. package/dist/collection/components/stzh-section/stzh-section.js +2 -2
  185. package/dist/collection/components/stzh-section/stzh-section.js.map +1 -1
  186. package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +206 -22
  187. package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.css +4 -0
  188. package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js +11 -9
  189. package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js.map +1 -1
  190. package/dist/collection/components/stzh-tooltip/stzh-tooltip.css +8 -4
  191. package/dist/collection/components/stzh-upload/models/stzh-photographing-configuration.dto.js +2 -0
  192. package/dist/collection/components/stzh-upload/models/stzh-photographing-configuration.dto.js.map +1 -0
  193. package/dist/collection/components/stzh-upload/models/stzh-photographing-pdf-file.dto.js +3 -0
  194. package/dist/collection/components/stzh-upload/models/stzh-photographing-pdf-file.dto.js.map +1 -0
  195. package/dist/collection/components/stzh-upload/models/stzh-photographing-url-details.dto.js +2 -0
  196. package/dist/collection/components/stzh-upload/models/stzh-photographing-url-details.dto.js.map +1 -0
  197. package/dist/collection/components/stzh-upload/stzh-upload.css +84 -11
  198. package/dist/collection/components/stzh-upload/stzh-upload.js +274 -4
  199. package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
  200. package/dist/collection/components/stzh-upload/stzh-upload.localization.js.map +1 -1
  201. package/dist/collection/components/stzh-upload/stzh-upload.stories.js +13 -7
  202. package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.css +6 -4
  203. package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.stories.js +2 -5
  204. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.css +192 -0
  205. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.e2e.js +18 -0
  206. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.e2e.js.map +1 -0
  207. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js +26 -0
  208. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js.map +1 -0
  209. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.stories.js +39 -0
  210. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.css +341 -0
  211. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.e2e.js +16 -0
  212. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.e2e.js.map +1 -0
  213. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.js +110 -0
  214. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.js.map +1 -0
  215. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.localization.js +2 -0
  216. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.localization.js.map +1 -0
  217. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.stories.js +75 -0
  218. package/dist/collection/components/stzh-vbz-linechip/stzh-vbz-linechip.css +3 -3
  219. package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.stories.js +8 -10
  220. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.css +17 -21
  221. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js +34 -45
  222. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js.map +1 -1
  223. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.localization.js.map +1 -1
  224. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.stories.js +10 -12
  225. package/dist/collection/index.js.map +1 -1
  226. package/dist/collection/pages/mkz/mkz.e2e.js +16 -0
  227. package/dist/collection/pages/mkz/mkz.e2e.js.map +1 -0
  228. package/dist/collection/pages/upload-photographing/upload-photographing.e2e.js +16 -0
  229. package/dist/collection/pages/upload-photographing/upload-photographing.e2e.js.map +1 -0
  230. package/dist/collection/patterns/contact-accordion/contact-accordion.e2e.js +21 -0
  231. package/dist/collection/patterns/contact-accordion/contact-accordion.e2e.js.map +1 -0
  232. package/dist/collection/patterns/poi/poi.e2e.js +21 -0
  233. package/dist/collection/patterns/poi/poi.e2e.js.map +1 -0
  234. package/dist/collection/utils/utils.js +38 -8
  235. package/dist/collection/utils/utils.js.map +1 -1
  236. package/dist/components/index.js +1 -1
  237. package/dist/components/index2.js.map +1 -1
  238. package/dist/components/stzh-accordion-item2.js +1 -1
  239. package/dist/components/stzh-accordion-item2.js.map +1 -1
  240. package/dist/components/stzh-accordion2.js +17 -1
  241. package/dist/components/stzh-accordion2.js.map +1 -1
  242. package/dist/components/stzh-anchornav.js +4 -3
  243. package/dist/components/stzh-anchornav.js.map +1 -1
  244. package/dist/components/stzh-app-bar.d.ts +11 -0
  245. package/dist/components/stzh-app-bar.js +60 -0
  246. package/dist/components/stzh-app-bar.js.map +1 -0
  247. package/dist/components/stzh-cardlist2.js +9 -2
  248. package/dist/components/stzh-cardlist2.js.map +1 -1
  249. package/dist/components/stzh-chip2.js +22 -32
  250. package/dist/components/stzh-chip2.js.map +1 -1
  251. package/dist/components/stzh-contact-cv.d.ts +11 -0
  252. package/dist/components/stzh-contact-cv.js +102 -0
  253. package/dist/components/stzh-contact-cv.js.map +1 -0
  254. package/dist/components/stzh-contact.js +5 -2
  255. package/dist/components/stzh-contact.js.map +1 -1
  256. package/dist/components/stzh-container.js +1 -1
  257. package/dist/components/stzh-container.js.map +1 -1
  258. package/dist/components/stzh-cspace.js +1 -1
  259. package/dist/components/stzh-cspace.js.map +1 -1
  260. package/dist/components/stzh-datepicker2.js.map +1 -1
  261. package/dist/components/stzh-dialog.js +1 -226
  262. package/dist/components/stzh-dialog.js.map +1 -1
  263. package/dist/components/stzh-dialog2.js +230 -0
  264. package/dist/components/stzh-dialog2.js.map +1 -0
  265. package/dist/components/stzh-footer.js +1 -1
  266. package/dist/components/stzh-footer.js.map +1 -1
  267. package/dist/components/stzh-header.js +1 -1
  268. package/dist/components/stzh-header.js.map +1 -1
  269. package/dist/components/stzh-homepage-service-highlights.js +1 -1
  270. package/dist/components/stzh-homepage-service-highlights.js.map +1 -1
  271. package/dist/components/stzh-iframe2.js +2883 -23
  272. package/dist/components/stzh-iframe2.js.map +1 -1
  273. package/dist/components/stzh-input2.js +9 -4
  274. package/dist/components/stzh-input2.js.map +1 -1
  275. package/dist/components/stzh-list-item.js +1 -34
  276. package/dist/components/stzh-list-item.js.map +1 -1
  277. package/dist/{esm/stzh-list-item.entry.js → components/stzh-list-item2.js} +24 -9
  278. package/dist/components/stzh-list-item2.js.map +1 -0
  279. package/dist/components/stzh-list.js +1 -36
  280. package/dist/components/stzh-list.js.map +1 -1
  281. package/dist/{esm/stzh-list.entry.js → components/stzh-list2.js} +26 -9
  282. package/dist/components/stzh-list2.js.map +1 -0
  283. package/dist/components/stzh-pagetitle-home.js +1 -1
  284. package/dist/components/stzh-pagetitle-home.js.map +1 -1
  285. package/dist/components/stzh-pagetitle.js +1 -1
  286. package/dist/components/stzh-pagetitle.js.map +1 -1
  287. package/dist/components/stzh-pagination2.js +9 -6
  288. package/dist/components/stzh-pagination2.js.map +1 -1
  289. package/dist/components/stzh-panorama.js +1 -1
  290. package/dist/components/stzh-panorama.js.map +1 -1
  291. package/dist/components/stzh-popover2.js +93 -67
  292. package/dist/components/stzh-popover2.js.map +1 -1
  293. package/dist/components/stzh-ratio2.js +1 -1
  294. package/dist/components/stzh-ratio2.js.map +1 -1
  295. package/dist/components/stzh-richtext2.js +26 -18
  296. package/dist/components/stzh-richtext2.js.map +1 -1
  297. package/dist/components/stzh-scrollup.js +5 -5
  298. package/dist/components/stzh-scrollup.js.map +1 -1
  299. package/dist/components/stzh-section.js +1 -1
  300. package/dist/components/stzh-section.js.map +1 -1
  301. package/dist/components/stzh-share2.js +1 -1
  302. package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
  303. package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
  304. package/dist/components/stzh-sticky-actions.js +10 -8
  305. package/dist/components/stzh-sticky-actions.js.map +1 -1
  306. package/dist/components/stzh-tooltip2.js +1 -1
  307. package/dist/components/stzh-tooltip2.js.map +1 -1
  308. package/dist/components/stzh-upload.js +3127 -6
  309. package/dist/components/stzh-upload.js.map +1 -1
  310. package/dist/components/stzh-vbz-carousel.js +1 -1
  311. package/dist/components/stzh-vbz-carousel.js.map +1 -1
  312. package/dist/components/stzh-vbz-connection-finder.d.ts +11 -0
  313. package/dist/components/stzh-vbz-connection-finder.js +38 -0
  314. package/dist/components/stzh-vbz-connection-finder.js.map +1 -0
  315. package/dist/components/stzh-vbz-intro.d.ts +11 -0
  316. package/dist/components/stzh-vbz-intro.js +100 -0
  317. package/dist/components/stzh-vbz-intro.js.map +1 -0
  318. package/dist/components/stzh-vbz-linechip2.js +1 -1
  319. package/dist/components/stzh-vbz-linechip2.js.map +1 -1
  320. package/dist/components/stzh-vbz-majorticker.js +1 -1
  321. package/dist/components/stzh-vbz-ticker.js +33 -44
  322. package/dist/components/stzh-vbz-ticker.js.map +1 -1
  323. package/dist/components/utils.js +39 -9
  324. package/dist/components/utils.js.map +1 -1
  325. package/dist/esm/{app-globals-ab5b077d.js → app-globals-93678901.js} +2 -2
  326. package/dist/esm/{app-globals-ab5b077d.js.map → app-globals-93678901.js.map} +1 -1
  327. package/dist/esm/index-e3050b18.js +28 -16
  328. package/dist/esm/index.js.map +1 -1
  329. package/dist/esm/loader.js +2 -2
  330. package/dist/esm/stzh-accordion_3.entry.js +25 -9
  331. package/dist/esm/stzh-accordion_3.entry.js.map +1 -1
  332. package/dist/esm/stzh-actions.entry.js +1 -1
  333. package/dist/esm/stzh-anchornav.entry.js +4 -3
  334. package/dist/esm/stzh-anchornav.entry.js.map +1 -1
  335. package/dist/esm/stzh-app-bar.entry.js +44 -0
  336. package/dist/esm/stzh-app-bar.entry.js.map +1 -0
  337. package/dist/esm/stzh-appointments.entry.js +1 -1
  338. package/dist/esm/stzh-audio.entry.js +1 -1
  339. package/dist/esm/stzh-badge_3.entry.js +1 -1
  340. package/dist/esm/stzh-card-navigation.entry.js +1 -1
  341. package/dist/esm/stzh-card-searchresult.entry.js +1 -1
  342. package/dist/esm/stzh-card-superteaser.entry.js +1 -1
  343. package/dist/esm/stzh-card_2.entry.js +8 -2
  344. package/dist/esm/stzh-card_2.entry.js.map +1 -1
  345. package/dist/esm/stzh-carousel.entry.js +1 -1
  346. package/dist/esm/stzh-checkbox.entry.js +1 -1
  347. package/dist/esm/stzh-checkboxgroup.entry.js +1 -1
  348. package/dist/esm/stzh-chip.entry.js +22 -32
  349. package/dist/esm/stzh-chip.entry.js.map +1 -1
  350. package/dist/esm/stzh-components.js +2 -2
  351. package/dist/esm/stzh-contact-cv.entry.js +59 -0
  352. package/dist/esm/stzh-contact-cv.entry.js.map +1 -0
  353. package/dist/esm/stzh-contact.entry.js +5 -3
  354. package/dist/esm/stzh-contact.entry.js.map +1 -1
  355. package/dist/esm/stzh-container.entry.js +1 -1
  356. package/dist/esm/stzh-container.entry.js.map +1 -1
  357. package/dist/esm/stzh-cspace.entry.js +2 -2
  358. package/dist/esm/stzh-cspace.entry.js.map +1 -1
  359. package/dist/esm/stzh-cta.entry.js +1 -1
  360. package/dist/esm/stzh-datatable.entry.js +1 -1
  361. package/dist/esm/stzh-datepicker_3.entry.js +1 -1
  362. package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
  363. package/dist/esm/stzh-daterange.entry.js +1 -1
  364. package/dist/esm/stzh-details.entry.js +1 -1
  365. package/dist/esm/stzh-dialog.entry.js +1 -1
  366. package/dist/esm/stzh-dialog.entry.js.map +1 -1
  367. package/dist/esm/stzh-disturber.entry.js +1 -1
  368. package/dist/esm/stzh-dropdown.entry.js +1 -1
  369. package/dist/esm/stzh-eventinfo.entry.js +1 -1
  370. package/dist/esm/stzh-figure.entry.js +1 -1
  371. package/dist/esm/stzh-footer.entry.js +2 -2
  372. package/dist/esm/stzh-footer.entry.js.map +1 -1
  373. package/dist/esm/stzh-ghettobox_3.entry.js +27 -19
  374. package/dist/esm/stzh-ghettobox_3.entry.js.map +1 -1
  375. package/dist/esm/stzh-header.entry.js +2 -2
  376. package/dist/esm/stzh-header.entry.js.map +1 -1
  377. package/dist/esm/stzh-homepage-service-highlights.entry.js +1 -1
  378. package/dist/esm/stzh-homepage-service-highlights.entry.js.map +1 -1
  379. package/dist/esm/stzh-iframe.entry.js +2881 -24
  380. package/dist/esm/stzh-iframe.entry.js.map +1 -1
  381. package/dist/esm/stzh-input.entry.js +8 -4
  382. package/dist/esm/stzh-input.entry.js.map +1 -1
  383. package/dist/esm/stzh-link.entry.js +1 -1
  384. package/dist/esm/stzh-list_2.entry.js +41 -0
  385. package/dist/esm/stzh-list_2.entry.js.map +1 -0
  386. package/dist/esm/stzh-menu_2.entry.js +1 -1
  387. package/dist/esm/stzh-pagecontent.entry.js +1 -1
  388. package/dist/esm/stzh-pagetitle-hero.entry.js +1 -1
  389. package/dist/esm/stzh-pagetitle-home.entry.js +2 -2
  390. package/dist/esm/stzh-pagetitle-home.entry.js.map +1 -1
  391. package/dist/esm/stzh-pagetitle.entry.js +2 -2
  392. package/dist/esm/stzh-pagetitle.entry.js.map +1 -1
  393. package/dist/esm/stzh-panorama.entry.js +1 -1
  394. package/dist/esm/stzh-panorama.entry.js.map +1 -1
  395. package/dist/esm/stzh-pi-content-navigation.entry.js +1 -1
  396. package/dist/esm/stzh-pi-pagetitle.entry.js +1 -1
  397. package/dist/esm/stzh-pi-teaser.entry.js +1 -1
  398. package/dist/esm/stzh-popover_2.entry.js +91 -68
  399. package/dist/esm/stzh-popover_2.entry.js.map +1 -1
  400. package/dist/esm/stzh-print_2.entry.js +1 -1
  401. package/dist/esm/stzh-ratio.entry.js +1 -1
  402. package/dist/esm/stzh-ratio.entry.js.map +1 -1
  403. package/dist/esm/stzh-readspeaker.entry.js +1 -1
  404. package/dist/esm/stzh-scrollup.entry.js +6 -6
  405. package/dist/esm/stzh-scrollup.entry.js.map +1 -1
  406. package/dist/esm/stzh-search.entry.js +1 -1
  407. package/dist/esm/stzh-section.entry.js +1 -1
  408. package/dist/esm/stzh-section.entry.js.map +1 -1
  409. package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
  410. package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
  411. package/dist/esm/stzh-sticky-actions.entry.js +9 -8
  412. package/dist/esm/stzh-sticky-actions.entry.js.map +1 -1
  413. package/dist/esm/stzh-sticky.entry.js +1 -1
  414. package/dist/esm/stzh-table.entry.js +1 -1
  415. package/dist/esm/stzh-textandimage.entry.js +1 -1
  416. package/dist/esm/stzh-timeline-item.entry.js +1 -1
  417. package/dist/esm/stzh-toast.entry.js +1 -1
  418. package/dist/esm/stzh-toggle.entry.js +1 -1
  419. package/dist/esm/stzh-tooltip.entry.js +2 -2
  420. package/dist/esm/stzh-tooltip.entry.js.map +1 -1
  421. package/dist/esm/stzh-twocolumns.entry.js +1 -1
  422. package/dist/esm/stzh-upload.entry.js +3098 -4
  423. package/dist/esm/stzh-upload.entry.js.map +1 -1
  424. package/dist/esm/stzh-vbz-carousel.entry.js +1 -1
  425. package/dist/esm/stzh-vbz-carousel.entry.js.map +1 -1
  426. package/dist/esm/stzh-vbz-connection-finder.entry.js +21 -0
  427. package/dist/esm/stzh-vbz-connection-finder.entry.js.map +1 -0
  428. package/dist/esm/stzh-vbz-intro.entry.js +54 -0
  429. package/dist/esm/stzh-vbz-intro.entry.js.map +1 -0
  430. package/dist/esm/stzh-vbz-linechip.entry.js +1 -1
  431. package/dist/esm/stzh-vbz-linechip.entry.js.map +1 -1
  432. package/dist/esm/stzh-vbz-ticker.entry.js +33 -44
  433. package/dist/esm/stzh-vbz-ticker.entry.js.map +1 -1
  434. package/dist/esm/{utils-54aead01.js → utils-90658cfe.js} +40 -10
  435. package/dist/esm/utils-90658cfe.js.map +1 -0
  436. package/dist/stzh-components/assets/i18n/de.json +22 -7
  437. package/dist/stzh-components/assets/i18n/en.json +22 -7
  438. package/dist/stzh-components/assets/media/icons/mono/construction.svg +1 -1
  439. package/dist/stzh-components/assets/media/icons/mono/crop.svg +1 -0
  440. package/dist/stzh-components/assets/meta/icons-preview.html +6 -1
  441. package/dist/stzh-components/assets/mock/appl/mobiscan/publicEndpoint/image/retreive-pdf +5 -0
  442. package/dist/stzh-components/assets/mock/appl/mobiscan/publicEndpoint/ping +3 -0
  443. package/dist/stzh-components/assets/mock/appl/mobiscan/publicEndpoint/url +3 -0
  444. package/dist/stzh-components/assets/mock/appl/mobiscan/rs/auth +4 -0
  445. package/dist/stzh-components/assets/mock/appl/mobiscan/rs/config +5 -0
  446. package/dist/stzh-components/assets/vendors/iframe-resizer/iframeResizer.contentWindow.js +1311 -0
  447. package/dist/stzh-components/index.esm.js.map +1 -1
  448. package/dist/stzh-components/p-05127d71.entry.js +2 -0
  449. package/dist/stzh-components/p-05127d71.entry.js.map +1 -0
  450. package/dist/stzh-components/{p-9684b22d.entry.js → p-09480ffe.entry.js} +2 -2
  451. package/dist/stzh-components/{p-c877d32c.entry.js → p-0b0c7cb8.entry.js} +2 -2
  452. package/dist/stzh-components/p-0b0c7cb8.entry.js.map +1 -0
  453. package/dist/stzh-components/{p-161ae3d1.entry.js → p-0b15d79b.entry.js} +2 -2
  454. package/dist/stzh-components/p-109a885b.entry.js +2 -0
  455. package/dist/stzh-components/{p-2d7966cf.entry.js.map → p-109a885b.entry.js.map} +1 -1
  456. package/dist/stzh-components/{p-c1cd45e1.entry.js → p-12bffe97.entry.js} +2 -2
  457. package/dist/stzh-components/p-13cd7748.entry.js +2 -0
  458. package/dist/stzh-components/p-13cd7748.entry.js.map +1 -0
  459. package/dist/stzh-components/{p-27d5ad01.entry.js → p-16a2675e.entry.js} +2 -2
  460. package/dist/stzh-components/{p-75b79adf.entry.js → p-1cbf5c84.entry.js} +2 -2
  461. package/dist/stzh-components/p-1cbf5c84.entry.js.map +1 -0
  462. package/dist/stzh-components/{p-20db8d01.entry.js → p-1fd858a2.entry.js} +2 -2
  463. package/dist/stzh-components/p-1fd858a2.entry.js.map +1 -0
  464. package/dist/stzh-components/p-21c351b4.entry.js +2 -0
  465. package/dist/stzh-components/p-21c351b4.entry.js.map +1 -0
  466. package/dist/stzh-components/{p-59a1a257.entry.js → p-21f7064d.entry.js} +2 -2
  467. package/dist/stzh-components/p-21f7064d.entry.js.map +1 -0
  468. package/dist/stzh-components/p-23de5712.entry.js +2 -0
  469. package/dist/stzh-components/p-23de5712.entry.js.map +1 -0
  470. package/dist/stzh-components/{p-0fb40e48.entry.js → p-24ea178a.entry.js} +2 -2
  471. package/dist/stzh-components/{p-3f0d3919.entry.js → p-2812752a.entry.js} +2 -2
  472. package/dist/stzh-components/{p-68d33cd3.entry.js → p-29c1cb5c.entry.js} +2 -2
  473. package/dist/stzh-components/p-2d405b51.js +2 -0
  474. package/dist/stzh-components/{p-cc1f8acc.js.map → p-2d405b51.js.map} +1 -1
  475. package/dist/stzh-components/{p-801af922.entry.js → p-30a522e0.entry.js} +2 -2
  476. package/dist/stzh-components/{p-d10a6897.entry.js → p-30a7c058.entry.js} +2 -2
  477. package/dist/stzh-components/{p-7ca981d1.entry.js → p-3261eab4.entry.js} +2 -2
  478. package/dist/stzh-components/{p-5d4a2df0.entry.js → p-32cb5b94.entry.js} +2 -2
  479. package/dist/stzh-components/{p-97df1d9f.entry.js → p-346d2f3d.entry.js} +2 -2
  480. package/dist/stzh-components/p-346f8661.entry.js +2 -0
  481. package/dist/stzh-components/p-346f8661.entry.js.map +1 -0
  482. package/dist/stzh-components/{p-8f1dbd3b.entry.js → p-3912a256.entry.js} +2 -2
  483. package/dist/stzh-components/{p-6fdc4c74.entry.js → p-39acdb68.entry.js} +2 -2
  484. package/dist/stzh-components/p-3cc6f193.entry.js +2 -0
  485. package/dist/stzh-components/p-3cc6f193.entry.js.map +1 -0
  486. package/dist/stzh-components/{p-204a6e41.entry.js → p-466263ff.entry.js} +2 -2
  487. package/dist/stzh-components/p-466263ff.entry.js.map +1 -0
  488. package/dist/stzh-components/p-49d356da.entry.js +2 -0
  489. package/dist/stzh-components/p-49d356da.entry.js.map +1 -0
  490. package/dist/stzh-components/p-585551c1.entry.js +2 -0
  491. package/dist/stzh-components/p-585551c1.entry.js.map +1 -0
  492. package/dist/stzh-components/{p-edf77853.entry.js → p-63c76fd5.entry.js} +2 -2
  493. package/dist/stzh-components/{p-533fea0b.entry.js → p-67e61035.entry.js} +2 -2
  494. package/dist/stzh-components/p-6e0c8764.entry.js +2 -0
  495. package/dist/stzh-components/p-6e0c8764.entry.js.map +1 -0
  496. package/dist/stzh-components/{p-80fafa1d.entry.js → p-6fffe2c8.entry.js} +2 -2
  497. package/dist/stzh-components/p-7b14ef7a.entry.js +2 -0
  498. package/dist/stzh-components/p-7b14ef7a.entry.js.map +1 -0
  499. package/dist/stzh-components/{p-eb79f3ed.entry.js → p-82c53e4f.entry.js} +2 -2
  500. package/dist/stzh-components/p-85143b35.entry.js +2 -0
  501. package/dist/stzh-components/p-85143b35.entry.js.map +1 -0
  502. package/dist/stzh-components/{p-8e0a2441.entry.js → p-87f3052b.entry.js} +2 -2
  503. package/dist/stzh-components/{p-b566a2c0.entry.js → p-8a82bf60.entry.js} +2 -2
  504. package/dist/stzh-components/{p-9b43127f.entry.js → p-8b04698a.entry.js} +2 -2
  505. package/dist/stzh-components/p-8b3828e7.entry.js +2 -0
  506. package/dist/stzh-components/p-8b3828e7.entry.js.map +1 -0
  507. package/dist/stzh-components/{p-4db427d5.entry.js → p-8c4d543d.entry.js} +2 -2
  508. package/dist/stzh-components/p-8c4d543d.entry.js.map +1 -0
  509. package/dist/stzh-components/p-90772ec6.entry.js +2 -0
  510. package/dist/stzh-components/p-90772ec6.entry.js.map +1 -0
  511. package/dist/stzh-components/p-9bc12eff.entry.js +2 -0
  512. package/dist/stzh-components/p-9bc12eff.entry.js.map +1 -0
  513. package/dist/stzh-components/{p-7754870d.entry.js → p-9c1b3929.entry.js} +2 -2
  514. package/dist/stzh-components/{p-5c3fddec.entry.js → p-9c643610.entry.js} +2 -2
  515. package/dist/stzh-components/{p-5c3fddec.entry.js.map → p-9c643610.entry.js.map} +1 -1
  516. package/dist/stzh-components/{p-4f49450d.entry.js → p-9e4f0532.entry.js} +2 -2
  517. package/dist/stzh-components/p-9e4f0532.entry.js.map +1 -0
  518. package/dist/stzh-components/{p-cff05968.entry.js → p-a249f3f6.entry.js} +2 -2
  519. package/dist/stzh-components/{p-a2e9723b.entry.js → p-aa3e4203.entry.js} +2 -2
  520. package/dist/stzh-components/{p-f5821678.entry.js → p-ab5ee55b.entry.js} +2 -2
  521. package/dist/stzh-components/{p-ce99f5e8.entry.js → p-acef653a.entry.js} +2 -2
  522. package/dist/stzh-components/{p-c5dbf7ad.entry.js → p-b03f41c3.entry.js} +2 -2
  523. package/dist/stzh-components/p-b273f95c.entry.js +2 -0
  524. package/dist/stzh-components/p-b273f95c.entry.js.map +1 -0
  525. package/dist/stzh-components/{p-72c375c7.entry.js → p-b397337c.entry.js} +2 -2
  526. package/dist/stzh-components/p-b397337c.entry.js.map +1 -0
  527. package/dist/stzh-components/{p-ef21f4dc.entry.js → p-ba716237.entry.js} +2 -2
  528. package/dist/stzh-components/p-ba716237.entry.js.map +1 -0
  529. package/dist/stzh-components/p-bcaef6d7.entry.js +2 -0
  530. package/dist/stzh-components/{p-012dc71e.entry.js.map → p-bcaef6d7.entry.js.map} +1 -1
  531. package/dist/stzh-components/p-bdff55a6.entry.js +2 -0
  532. package/dist/stzh-components/{p-78a16599.entry.js.map → p-bdff55a6.entry.js.map} +1 -1
  533. package/dist/stzh-components/{p-ee82f53c.entry.js → p-c169f243.entry.js} +2 -2
  534. package/dist/stzh-components/{p-7d030c40.entry.js → p-c3816fd3.entry.js} +2 -2
  535. package/dist/stzh-components/{p-7aac960b.entry.js → p-ce6dbd52.entry.js} +2 -2
  536. package/dist/stzh-components/{p-50c1632e.entry.js → p-d0ecdd5b.entry.js} +2 -2
  537. package/dist/stzh-components/{p-50c1632e.entry.js.map → p-d0ecdd5b.entry.js.map} +1 -1
  538. package/dist/stzh-components/{p-722b9e40.entry.js → p-d46bbc8c.entry.js} +2 -2
  539. package/dist/stzh-components/{p-c9eecee7.entry.js → p-d48ecb2f.entry.js} +2 -2
  540. package/dist/stzh-components/{p-ea152ff3.entry.js → p-d7697cf8.entry.js} +2 -2
  541. package/dist/stzh-components/p-d789647a.entry.js +2 -0
  542. package/dist/stzh-components/p-d789647a.entry.js.map +1 -0
  543. package/dist/stzh-components/{p-472b3327.entry.js → p-d7f1ed07.entry.js} +2 -2
  544. package/dist/stzh-components/{p-afde3fcd.entry.js → p-d8265b82.entry.js} +2 -2
  545. package/dist/stzh-components/{p-afde3fcd.entry.js.map → p-d8265b82.entry.js.map} +1 -1
  546. package/dist/stzh-components/{p-56346206.entry.js → p-d9fa718c.entry.js} +2 -2
  547. package/dist/stzh-components/p-e30a5acc.js +2 -0
  548. package/dist/stzh-components/p-e30a5acc.js.map +1 -0
  549. package/dist/stzh-components/{p-f4ed8d7e.entry.js → p-ef47c976.entry.js} +2 -2
  550. package/dist/stzh-components/p-ef47c976.entry.js.map +1 -0
  551. package/dist/stzh-components/{p-66007952.entry.js → p-f34720e2.entry.js} +2 -2
  552. package/dist/stzh-components/p-f34720e2.entry.js.map +1 -0
  553. package/dist/stzh-components/p-ffbb7594.entry.js +2 -0
  554. package/dist/stzh-components/p-ffbb7594.entry.js.map +1 -0
  555. package/dist/stzh-components/stzh-components.css +206 -22
  556. package/dist/stzh-components/stzh-components.esm.js +1 -1
  557. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  558. package/dist/types/components/stzh-accordion/stzh-accordion.d.ts +3 -0
  559. package/dist/types/components/stzh-app-bar/stzh-app-bar.d.ts +15 -0
  560. package/dist/types/components/stzh-cardlist/stzh-cardlist.d.ts +1 -0
  561. package/dist/types/components/stzh-chip/stzh-chip.d.ts +1 -1
  562. package/dist/types/components/stzh-contact/stzh-contact.d.ts +2 -0
  563. package/dist/types/components/stzh-contact-cv/stzh-contact-cv.d.ts +23 -0
  564. package/dist/types/components/stzh-contact-cv/stzh-contact-cv.localization.d.ts +8 -0
  565. package/dist/types/components/stzh-datepicker/stzh-datepicker.d.ts +1 -1
  566. package/dist/types/components/stzh-iframe/stzh-iframe.d.ts +9 -1
  567. package/dist/types/components/stzh-input/stzh-input.d.ts +3 -0
  568. package/dist/types/components/stzh-pagination/stzh-pagination.d.ts +4 -0
  569. package/dist/types/components/stzh-popover/stzh-popover.d.ts +12 -3
  570. package/dist/types/components/stzh-section/stzh-section.d.ts +1 -1
  571. package/dist/types/components/stzh-sticky-actions/stzh-sticky-actions.d.ts +1 -0
  572. package/dist/types/components/stzh-upload/models/stzh-photographing-configuration.dto.d.ts +5 -0
  573. package/dist/types/components/stzh-upload/models/stzh-photographing-pdf-file.dto.d.ts +5 -0
  574. package/dist/types/components/stzh-upload/models/stzh-photographing-url-details.dto.d.ts +4 -0
  575. package/dist/types/components/stzh-upload/stzh-upload.d.ts +36 -0
  576. package/dist/types/components/stzh-upload/stzh-upload.localization.d.ts +6 -0
  577. package/dist/types/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.d.ts +7 -0
  578. package/dist/types/components/stzh-vbz-intro/stzh-vbz-intro.d.ts +15 -0
  579. package/dist/types/components/stzh-vbz-intro/stzh-vbz-intro.localization.d.ts +4 -0
  580. package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.d.ts +2 -1
  581. package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.localization.d.ts +1 -2
  582. package/dist/types/components.d.ts +186 -10
  583. package/dist/types/index.d.ts +4 -0
  584. package/dist/types/utils/utils.d.ts +7 -0
  585. package/dist/vscode-data.json +120 -1
  586. package/package.json +3 -1
  587. package/dist/cjs/stzh-list-item.cjs.entry.js +0 -27
  588. package/dist/cjs/stzh-list-item.cjs.entry.js.map +0 -1
  589. package/dist/cjs/stzh-list.cjs.entry.js.map +0 -1
  590. package/dist/cjs/utils-d0fff87f.js.map +0 -1
  591. package/dist/esm/stzh-list-item.entry.js.map +0 -1
  592. package/dist/esm/stzh-list.entry.js.map +0 -1
  593. package/dist/esm/utils-54aead01.js.map +0 -1
  594. package/dist/stzh-components/p-012dc71e.entry.js +0 -2
  595. package/dist/stzh-components/p-100d4052.entry.js +0 -2
  596. package/dist/stzh-components/p-100d4052.entry.js.map +0 -1
  597. package/dist/stzh-components/p-1f0e8499.entry.js +0 -2
  598. package/dist/stzh-components/p-1f0e8499.entry.js.map +0 -1
  599. package/dist/stzh-components/p-204a6e41.entry.js.map +0 -1
  600. package/dist/stzh-components/p-20db8d01.entry.js.map +0 -1
  601. package/dist/stzh-components/p-2d7966cf.entry.js +0 -2
  602. package/dist/stzh-components/p-4db427d5.entry.js.map +0 -1
  603. package/dist/stzh-components/p-4f49450d.entry.js.map +0 -1
  604. package/dist/stzh-components/p-523c0bb1.entry.js +0 -2
  605. package/dist/stzh-components/p-523c0bb1.entry.js.map +0 -1
  606. package/dist/stzh-components/p-52a914cd.entry.js +0 -2
  607. package/dist/stzh-components/p-52a914cd.entry.js.map +0 -1
  608. package/dist/stzh-components/p-59a1a257.entry.js.map +0 -1
  609. package/dist/stzh-components/p-648b7232.entry.js +0 -2
  610. package/dist/stzh-components/p-648b7232.entry.js.map +0 -1
  611. package/dist/stzh-components/p-66007952.entry.js.map +0 -1
  612. package/dist/stzh-components/p-6ab9dee8.entry.js +0 -2
  613. package/dist/stzh-components/p-6ab9dee8.entry.js.map +0 -1
  614. package/dist/stzh-components/p-6c2289da.entry.js +0 -2
  615. package/dist/stzh-components/p-6c2289da.entry.js.map +0 -1
  616. package/dist/stzh-components/p-72c375c7.entry.js.map +0 -1
  617. package/dist/stzh-components/p-75b79adf.entry.js.map +0 -1
  618. package/dist/stzh-components/p-771d370d.entry.js +0 -2
  619. package/dist/stzh-components/p-771d370d.entry.js.map +0 -1
  620. package/dist/stzh-components/p-77ba1f21.entry.js +0 -2
  621. package/dist/stzh-components/p-77ba1f21.entry.js.map +0 -1
  622. package/dist/stzh-components/p-78a16599.entry.js +0 -2
  623. package/dist/stzh-components/p-7e304ea3.js +0 -2
  624. package/dist/stzh-components/p-7e304ea3.js.map +0 -1
  625. package/dist/stzh-components/p-7efbb643.entry.js +0 -2
  626. package/dist/stzh-components/p-7efbb643.entry.js.map +0 -1
  627. package/dist/stzh-components/p-991309dd.entry.js +0 -2
  628. package/dist/stzh-components/p-991309dd.entry.js.map +0 -1
  629. package/dist/stzh-components/p-af7855ff.entry.js +0 -2
  630. package/dist/stzh-components/p-af7855ff.entry.js.map +0 -1
  631. package/dist/stzh-components/p-c877d32c.entry.js.map +0 -1
  632. package/dist/stzh-components/p-cc1f8acc.js +0 -2
  633. package/dist/stzh-components/p-cf856610.entry.js +0 -2
  634. package/dist/stzh-components/p-cf856610.entry.js.map +0 -1
  635. package/dist/stzh-components/p-ef21f4dc.entry.js.map +0 -1
  636. package/dist/stzh-components/p-f4ed8d7e.entry.js.map +0 -1
  637. package/dist/stzh-components/p-fdd6e755.entry.js +0 -2
  638. package/dist/stzh-components/p-fdd6e755.entry.js.map +0 -1
  639. /package/dist/stzh-components/{p-9684b22d.entry.js.map → p-09480ffe.entry.js.map} +0 -0
  640. /package/dist/stzh-components/{p-161ae3d1.entry.js.map → p-0b15d79b.entry.js.map} +0 -0
  641. /package/dist/stzh-components/{p-c1cd45e1.entry.js.map → p-12bffe97.entry.js.map} +0 -0
  642. /package/dist/stzh-components/{p-27d5ad01.entry.js.map → p-16a2675e.entry.js.map} +0 -0
  643. /package/dist/stzh-components/{p-0fb40e48.entry.js.map → p-24ea178a.entry.js.map} +0 -0
  644. /package/dist/stzh-components/{p-3f0d3919.entry.js.map → p-2812752a.entry.js.map} +0 -0
  645. /package/dist/stzh-components/{p-68d33cd3.entry.js.map → p-29c1cb5c.entry.js.map} +0 -0
  646. /package/dist/stzh-components/{p-801af922.entry.js.map → p-30a522e0.entry.js.map} +0 -0
  647. /package/dist/stzh-components/{p-d10a6897.entry.js.map → p-30a7c058.entry.js.map} +0 -0
  648. /package/dist/stzh-components/{p-7ca981d1.entry.js.map → p-3261eab4.entry.js.map} +0 -0
  649. /package/dist/stzh-components/{p-5d4a2df0.entry.js.map → p-32cb5b94.entry.js.map} +0 -0
  650. /package/dist/stzh-components/{p-97df1d9f.entry.js.map → p-346d2f3d.entry.js.map} +0 -0
  651. /package/dist/stzh-components/{p-8f1dbd3b.entry.js.map → p-3912a256.entry.js.map} +0 -0
  652. /package/dist/stzh-components/{p-6fdc4c74.entry.js.map → p-39acdb68.entry.js.map} +0 -0
  653. /package/dist/stzh-components/{p-edf77853.entry.js.map → p-63c76fd5.entry.js.map} +0 -0
  654. /package/dist/stzh-components/{p-533fea0b.entry.js.map → p-67e61035.entry.js.map} +0 -0
  655. /package/dist/stzh-components/{p-80fafa1d.entry.js.map → p-6fffe2c8.entry.js.map} +0 -0
  656. /package/dist/stzh-components/{p-eb79f3ed.entry.js.map → p-82c53e4f.entry.js.map} +0 -0
  657. /package/dist/stzh-components/{p-8e0a2441.entry.js.map → p-87f3052b.entry.js.map} +0 -0
  658. /package/dist/stzh-components/{p-b566a2c0.entry.js.map → p-8a82bf60.entry.js.map} +0 -0
  659. /package/dist/stzh-components/{p-9b43127f.entry.js.map → p-8b04698a.entry.js.map} +0 -0
  660. /package/dist/stzh-components/{p-7754870d.entry.js.map → p-9c1b3929.entry.js.map} +0 -0
  661. /package/dist/stzh-components/{p-cff05968.entry.js.map → p-a249f3f6.entry.js.map} +0 -0
  662. /package/dist/stzh-components/{p-a2e9723b.entry.js.map → p-aa3e4203.entry.js.map} +0 -0
  663. /package/dist/stzh-components/{p-f5821678.entry.js.map → p-ab5ee55b.entry.js.map} +0 -0
  664. /package/dist/stzh-components/{p-ce99f5e8.entry.js.map → p-acef653a.entry.js.map} +0 -0
  665. /package/dist/stzh-components/{p-c5dbf7ad.entry.js.map → p-b03f41c3.entry.js.map} +0 -0
  666. /package/dist/stzh-components/{p-ee82f53c.entry.js.map → p-c169f243.entry.js.map} +0 -0
  667. /package/dist/stzh-components/{p-7d030c40.entry.js.map → p-c3816fd3.entry.js.map} +0 -0
  668. /package/dist/stzh-components/{p-7aac960b.entry.js.map → p-ce6dbd52.entry.js.map} +0 -0
  669. /package/dist/stzh-components/{p-722b9e40.entry.js.map → p-d46bbc8c.entry.js.map} +0 -0
  670. /package/dist/stzh-components/{p-c9eecee7.entry.js.map → p-d48ecb2f.entry.js.map} +0 -0
  671. /package/dist/stzh-components/{p-ea152ff3.entry.js.map → p-d7697cf8.entry.js.map} +0 -0
  672. /package/dist/stzh-components/{p-472b3327.entry.js.map → p-d7f1ed07.entry.js.map} +0 -0
  673. /package/dist/stzh-components/{p-56346206.entry.js.map → p-d9fa718c.entry.js.map} +0 -0
@@ -1,7 +1,8 @@
1
- import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-e3050b18.js';
2
- import { i as isStzhElement, h as hasSlot } from './utils-54aead01.js';
1
+ import { r as registerInstance, c as createEvent, h, F as Fragment, a as Host, g as getElement } from './index-e3050b18.js';
2
+ import { g as getStzhEnvironment, i as isStzhElement, h as hasSlot } from './utils-90658cfe.js';
3
3
  import { t as tc } from './translation-utils-ffb7823c.js';
4
4
  import { S as StzhInputDescription } from './stzh-input-description-766446dc.js';
5
+ import { c as createCommonjsModule } from './_commonjsHelpers-4d8f6371.js';
5
6
  import './string-utils-e252977e.js';
6
7
 
7
8
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -10356,7 +10357,2880 @@ window.Dropzone = Dropzone;
10356
10357
  ;
10357
10358
  });
10358
10359
 
10359
- const stzhUploadCss = ":host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;}:host[hidden]{display:none}:host::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}stzh-upload{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;--list-grid-template-areas:var(\n --stzh-upload-list-grid-template-areas,\n \"list list list list\"\n );--list-grid-template-columns:var(\n --stzh-upload-list-grid-template-columns,\n repeat(4, minmax(0, 1fr))\n )}stzh-upload[hidden]{display:none}stzh-upload::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}stzh-upload::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}stzh-upload *,stzh-upload *::before,stzh-upload *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}stzh-upload .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}stzh-upload .stzh-fylingfocus-focused{outline-style:none !important}stzh-upload .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}@media screen and (min-width: 600px){stzh-upload{--list-grid-template-areas:var(\n --stzh-upload-list-grid-template-areas,\n \"list list list .\"\n )}}@media screen and (min-width: 900px){stzh-upload{--list-grid-template-areas:var(\n --stzh-upload-list-grid-template-areas,\n \"list list list list list . . .\"\n );--list-grid-template-columns:var(\n --stzh-upload-list-grid-template-columns,\n repeat(8, minmax(0, 1fr))\n )}}stzh-upload[disabled]:not([disabled=false]){--description-color:var(--stzh-color-grey70)}.stzh-upload{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);position:relative;color:var(--stzh-color-grey70);box-sizing:border-box;display:flex;flex-direction:column;}.stzh-upload__marker-symbol{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-upload__marker-text{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-upload__description-wrapper{display:flex;flex-direction:column-reverse;min-height:var(--description-min-height, var(--stzh-description-min-height, none))}.stzh-upload__error,.stzh-upload__description{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height)}.stzh-upload__error{color:var(--stzh-color-error60)}.stzh-upload__error-list{list-style:none;margin:0;padding:0}.stzh-upload__description{display:flex;align-items:flex-start;color:var(--stzh-input-description-color, var(--description-color, var(--stzh-color-coolgrey70)));transition:color var(--stzh-base-transition-animation-speed)}.stzh-upload__description-long{margin-right:var(--stzh-space-xxsmall);margin-top:0.125rem}@supports (font: -apple-system-body) and (-webkit-appearance: none){.stzh-upload__description-long{margin-top:0}}.stzh-upload__description-long-popover{--width:auto;--max-width:27.3125rem}.stzh-upload__description-long-button{display:flex;justify-content:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer}.stzh-upload stzh-icon.stzh-upload__description-long-icon{--size:var(--stzh-icon-size-xsmall)}.stzh-upload--has-error .stzh-upload__error,.stzh-upload--has-description .stzh-upload__description{margin-top:var(--stzh-space-xxxsmall)}.stzh-upload__label{font-family:var(--stzh-font-family-title);font-weight:var(--stzh-font-weight-title);font-style:var(--stzh-font-style-title);font-size:var(--stzh-font-curve-h4-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-h4-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-h4-default-text-letter-spacing);color:var(--stzh-heading-color);margin-bottom:var(--stzh-space-small)}@media screen and (min-width: 600px){.stzh-upload__label{font-size:var(--stzh-font-curve-h4-small-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-h4-small-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-h4-small-text-letter-spacing)}}@media screen and (min-width: 1260px){.stzh-upload__label{font-size:var(--stzh-font-curve-h4-large-font-size, var(--stzh-font-deci-font-size));line-height:var(--stzh-font-curve-h4-large-text-line-height, var(--stzh-font-deci-text-line-height));letter-spacing:var(--stzh-font-curve-h4-large-text-letter-spacing)}}@media screen and (min-width: 1600px){.stzh-upload__label{font-size:var(--stzh-font-curve-h4-ultra-font-size, var(--stzh-font-deca-font-size));line-height:var(--stzh-font-curve-h4-ultra-text-line-height, var(--stzh-font-deca-text-line-height));letter-spacing:var(--stzh-font-curve-h4-ultra-text-letter-spacing, var(--stzh-font-deca-text-letter-spacing))}}.stzh-upload__clickarea{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);padding:var(--stzh-space-xlarge);display:flex;flex-direction:column;align-items:center;gap:var(--stzh-space-medium);text-align:center;border:0.0625rem solid var(--stzh-color-black);background-color:var(--stzh-color-grey10);border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABMSURBVHgB7dexCgAQEIDhO2X2ih7NK5oNTEo3kFI3+L+Z/BnkNMXSZVFbVtmw663b/UGc6Sw6lb82z3W/AQDgJSSAAAIAgP+Afj8dD2mcJJvEMWjkAAAAAElFTkSuQmCC');border-image-slice:8;border-image-width:0.5rem;border-image-repeat:round;transition:background-color var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 900px){.stzh-upload__clickarea{padding:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-upload__clickarea{padding:var(--stzh-space-xxxlarge)}}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB5SURBVHgB7dsxCoQwFEXRl4Gp3aJLc4vWFtpbaCGC8M5ZQEIu/CYkY/ovey6s2zzywN36d97e/5dyAqTcOM/I05n7uvN5jUDK1QcAAAAA+rgTTDkBUk6AlBMg5QRIOQFSToCUEyAAAAAAZbwPSDkBUm74O1xOgJQ7AMC9JLtRTkNkAAAAAElFTkSuQmCC');border-image-slice:16}}.stzh-upload__heading-wrapper{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);display:flex;align-items:flex-start;gap:var(--stzh-space-medium);color:var(--stzh-color-grey90);transition:color var(--stzh-base-transition-animation-speed)}.stzh-upload__heading-inner-wrapper{display:flex;flex-direction:column;align-items:center;gap:var(--stzh-space-xsmall)}.stzh-upload__button-wrapper{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);display:flex;align-items:center;gap:var(--stzh-space-xsmall);color:var(--stzh-color-secondary60)}.stzh-upload__instructions{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height)}.stzh-upload stzh-icon.stzh-upload__delete-icon{display:none}.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter);column-gap:var(--stzh-grid-gutter);display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));grid-template-areas:var(--list-grid-template-areas);grid-template-columns:var(--list-grid-template-columns)}@media screen and (min-width: 600px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-small);column-gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-medium);column-gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 1260px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-large);column-gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 1600px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-ultra);column-gap:var(--stzh-grid-gutter-ultra)}}@media screen and (min-width: 900px){.stzh-upload__previews-wrapper{grid-template-columns:repeat(8, minmax(0, 1fr))}}@media screen and (min-width: 1260px){.stzh-upload__previews-wrapper{grid-template-columns:repeat(12, minmax(0, 1fr))}}.stzh-upload__previews-inner-wrapper{grid-area:list}.stzh-upload__preview{padding-top:var(--stzh-space-xsmall);padding-bottom:var(--stzh-space-xsmall);display:flex;align-items:center}@media screen and (min-width: 900px){.stzh-upload__preview{padding-top:var(--stzh-space-small)}}@media screen and (min-width: 1260px){.stzh-upload__preview{padding-top:var(--stzh-space-medium)}}@media screen and (min-width: 900px){.stzh-upload__preview{padding-bottom:var(--stzh-space-small)}}@media screen and (min-width: 1260px){.stzh-upload__preview{padding-bottom:var(--stzh-space-medium)}}.stzh-upload__preview.dz-error .stzh-upload__title,.stzh-upload__preview.dz-error .stzh-upload__link[href]:not([href=\"\"]),.stzh-upload__preview.dz-error .stzh-upload__link[href]:not([href=\"\"]):hover{color:var(--stzh-color-error60)}.stzh-upload__preview.dz-error .stzh-upload__error-message{display:block}.stzh-upload__preview.dz-error .stzh-upload__meta{display:none}.stzh-upload__preview.dz-complete:not(.dz-error) stzh-icon.stzh-upload__delete-icon-error{display:none}.stzh-upload__preview.dz-complete:not(.dz-error) stzh-icon.stzh-upload__delete-icon{display:inline-flex}.stzh-upload__preview.dz-complete .stzh-upload__info-wrapper-processing{display:none}.stzh-upload__preview.dz-complete .stzh-upload__info-wrapper-complete{display:flex}.stzh-upload__preview.dz-empty .stzh-upload__separator{display:none}.stzh-upload__preview.dz-empty .stzh-upload__size{display:none}.stzh-upload__details{flex-grow:1;display:flex;overflow:hidden}.stzh-upload__info-wrapper{flex-grow:1;display:flex;overflow:hidden}.stzh-upload__info-wrapper-processing,.stzh-upload__info-wrapper-complete{flex-grow:1;display:flex;flex-direction:column;justify-content:center;overflow:hidden}.stzh-upload__info-wrapper-complete{display:none}.stzh-upload__actions{flex-shrink:0;display:flex;align-items:center}.stzh-upload__actions:not(:empty){margin-left:var(--stzh-space-xsmall)}.stzh-upload__infos{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);display:flex;justify-content:space-between;align-items:center}.stzh-upload__title,.stzh-upload__subtitle{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.stzh-upload__title{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing)}.stzh-upload__link[href]:not([href=\"\"]){color:var(--stzh-link-color)}.stzh-upload__link[href]:not([href=\"\"]):hover{color:var(--stzh-link-hover-color)}.stzh-upload__meta{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);letter-spacing:0.01em;display:flex;align-items:center;gap:var(--stzh-space-xsmall)}.stzh-upload__info-wrapper-processing .stzh-upload__meta{display:none}.stzh-upload__size strong{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-upload__image{display:none}.stzh-upload__progress{display:block;height:0.375rem;background-color:var(--stzh-color-black20op);margin-top:var(--stzh-space-xsmall)}.stzh-upload__progress-bar{display:block;height:100%;width:0;background:var(--stzh-color-secondary40)}.stzh-upload__progress-text{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);letter-spacing:0.01em;margin-left:var(--stzh-space-medium);font-variant-numeric:tabular-nums}.stzh-upload__separator{width:0.0625rem;height:calc(100% - 0.25rem);background-color:currentColor}.stzh-upload__extension{text-transform:uppercase}.stzh-upload__extension:empty+.stzh-upload__separator{display:none}.stzh-upload__error-message{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);letter-spacing:0.01em;color:var(--stzh-color-error60);transition:color var(--stzh-base-transition-animation-speed);display:none}.stzh-upload.dz-started .stzh-upload__errors,.stzh-upload:has(.stzh-upload__preview) .stzh-upload__errors{margin-top:var(--stzh-space-medium)}.stzh-upload.dz-drag-hover .stzh-upload__clickarea{background-color:var(--stzh-color-secondary10);border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABMSURBVHgB7ddBCgAQEEDRGa7iRs7pRq4iVkqzIKVm4b81+VnIaMy1y6KVpLJh11u3+4M401l0Kn9tnut+AwDAS0gAAQQAAP8B/X46HlNzJxHDedWMAAAAAElFTkSuQmCC')}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.stzh-upload.dz-drag-hover .stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB5SURBVHgB7dvBCYQwFEXRl5lW7Mg67chWRPcudCGC8M4pICEX/iYk4z+vey5syzTywN36d97e/5dyAqTcOM/I05n7uvN5jUDK1QcAAAAA+rgTTDkBUk6AlBMg5QRIOQFSToCUEyAAAAAAZbwPSDkBUm74O1xOgJQ7AO1EJzEUHPSNAAAAAElFTkSuQmCC')}}.stzh-upload.dz-drag-hover .stzh-upload__heading-wrapper{color:var(--stzh-color-primary70)}.stzh-upload--has-hidden-progress .stzh-upload__progress,.stzh-upload--has-hidden-progress .stzh-upload__progress-text,.stzh-upload--has-hidden-progress-while-idle .stzh-upload__preview:not(.dz-processing) .stzh-upload__progress,.stzh-upload--has-hidden-progress-while-idle .stzh-upload__preview:not(.dz-processing) .stzh-upload__progress-text{display:none}.stzh-upload--has-hidden-progress .stzh-upload__info-wrapper-processing .stzh-upload__meta,.stzh-upload--has-hidden-progress-while-idle .stzh-upload__preview:not(.dz-processing) .stzh-upload__info-wrapper-processing .stzh-upload__meta{display:flex}.stzh-upload--is-invalid .stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABNSURBVHgB7dcxDgAQDEDRlt0p3P9ETmEXJol0IBJJB//NxI9BVEtMXRa5VZUNu9663R/Emc6iU/lr81z3GwAAXkICCCAAAPgP6PfT8QDnDCW4JpVRXgAAAABJRU5ErkJggg==')}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.stzh-upload--is-invalid .stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB5SURBVHgB7duxCYUwGIXRm/d6p3D/iZzCXrS30EIE4Z4zQEI++JuQjOU/7bkwb+vIA3fr33l7/1/KCZBy4zwjT2fu687nNQIpVx8AAAAA6ONOMOUESDkBUk6AlBMg5QRIOQFSToAAAAAAlPE+IOUESLnh73A5AVLuAFA3JdhPogvLAAAAAElFTkSuQmCC')}}.stzh-upload--has-error .stzh-upload__error,.stzh-upload--has-description .stzh-upload__description{margin-top:var(--stzh-space-small)}.stzh-upload--is-disabled .stzh-upload__clickarea{cursor:not-allowed;background-color:var(--stzh-color-grey10)}";
10360
+ // can-promise has a crash in some versions of react native that dont have
10361
+ // standard global objects
10362
+ // https://github.com/soldair/node-qrcode/issues/157
10363
+
10364
+ var canPromise = function () {
10365
+ return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then
10366
+ };
10367
+
10368
+ let toSJISFunction;
10369
+ const CODEWORDS_COUNT = [
10370
+ 0, // Not used
10371
+ 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,
10372
+ 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,
10373
+ 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,
10374
+ 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706
10375
+ ];
10376
+
10377
+ /**
10378
+ * Returns the QR Code size for the specified version
10379
+ *
10380
+ * @param {Number} version QR Code version
10381
+ * @return {Number} size of QR code
10382
+ */
10383
+ var getSymbolSize$1 = function getSymbolSize (version) {
10384
+ if (!version) throw new Error('"version" cannot be null or undefined')
10385
+ if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40')
10386
+ return version * 4 + 17
10387
+ };
10388
+
10389
+ /**
10390
+ * Returns the total number of codewords used to store data and EC information.
10391
+ *
10392
+ * @param {Number} version QR Code version
10393
+ * @return {Number} Data length in bits
10394
+ */
10395
+ var getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {
10396
+ return CODEWORDS_COUNT[version]
10397
+ };
10398
+
10399
+ /**
10400
+ * Encode data with Bose-Chaudhuri-Hocquenghem
10401
+ *
10402
+ * @param {Number} data Value to encode
10403
+ * @return {Number} Encoded value
10404
+ */
10405
+ var getBCHDigit = function (data) {
10406
+ let digit = 0;
10407
+
10408
+ while (data !== 0) {
10409
+ digit++;
10410
+ data >>>= 1;
10411
+ }
10412
+
10413
+ return digit
10414
+ };
10415
+
10416
+ var setToSJISFunction = function setToSJISFunction (f) {
10417
+ if (typeof f !== 'function') {
10418
+ throw new Error('"toSJISFunc" is not a valid function.')
10419
+ }
10420
+
10421
+ toSJISFunction = f;
10422
+ };
10423
+
10424
+ var isKanjiModeEnabled = function () {
10425
+ return typeof toSJISFunction !== 'undefined'
10426
+ };
10427
+
10428
+ var toSJIS = function toSJIS (kanji) {
10429
+ return toSJISFunction(kanji)
10430
+ };
10431
+
10432
+ var utils$1 = {
10433
+ getSymbolSize: getSymbolSize$1,
10434
+ getSymbolTotalCodewords: getSymbolTotalCodewords,
10435
+ getBCHDigit: getBCHDigit,
10436
+ setToSJISFunction: setToSJISFunction,
10437
+ isKanjiModeEnabled: isKanjiModeEnabled,
10438
+ toSJIS: toSJIS
10439
+ };
10440
+
10441
+ var errorCorrectionLevel = createCommonjsModule(function (module, exports) {
10442
+ exports.L = { bit: 1 };
10443
+ exports.M = { bit: 0 };
10444
+ exports.Q = { bit: 3 };
10445
+ exports.H = { bit: 2 };
10446
+
10447
+ function fromString (string) {
10448
+ if (typeof string !== 'string') {
10449
+ throw new Error('Param is not a string')
10450
+ }
10451
+
10452
+ const lcStr = string.toLowerCase();
10453
+
10454
+ switch (lcStr) {
10455
+ case 'l':
10456
+ case 'low':
10457
+ return exports.L
10458
+
10459
+ case 'm':
10460
+ case 'medium':
10461
+ return exports.M
10462
+
10463
+ case 'q':
10464
+ case 'quartile':
10465
+ return exports.Q
10466
+
10467
+ case 'h':
10468
+ case 'high':
10469
+ return exports.H
10470
+
10471
+ default:
10472
+ throw new Error('Unknown EC Level: ' + string)
10473
+ }
10474
+ }
10475
+
10476
+ exports.isValid = function isValid (level) {
10477
+ return level && typeof level.bit !== 'undefined' &&
10478
+ level.bit >= 0 && level.bit < 4
10479
+ };
10480
+
10481
+ exports.from = function from (value, defaultValue) {
10482
+ if (exports.isValid(value)) {
10483
+ return value
10484
+ }
10485
+
10486
+ try {
10487
+ return fromString(value)
10488
+ } catch (e) {
10489
+ return defaultValue
10490
+ }
10491
+ };
10492
+ });
10493
+
10494
+ function BitBuffer () {
10495
+ this.buffer = [];
10496
+ this.length = 0;
10497
+ }
10498
+
10499
+ BitBuffer.prototype = {
10500
+
10501
+ get: function (index) {
10502
+ const bufIndex = Math.floor(index / 8);
10503
+ return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1
10504
+ },
10505
+
10506
+ put: function (num, length) {
10507
+ for (let i = 0; i < length; i++) {
10508
+ this.putBit(((num >>> (length - i - 1)) & 1) === 1);
10509
+ }
10510
+ },
10511
+
10512
+ getLengthInBits: function () {
10513
+ return this.length
10514
+ },
10515
+
10516
+ putBit: function (bit) {
10517
+ const bufIndex = Math.floor(this.length / 8);
10518
+ if (this.buffer.length <= bufIndex) {
10519
+ this.buffer.push(0);
10520
+ }
10521
+
10522
+ if (bit) {
10523
+ this.buffer[bufIndex] |= (0x80 >>> (this.length % 8));
10524
+ }
10525
+
10526
+ this.length++;
10527
+ }
10528
+ };
10529
+
10530
+ var bitBuffer = BitBuffer;
10531
+
10532
+ /**
10533
+ * Helper class to handle QR Code symbol modules
10534
+ *
10535
+ * @param {Number} size Symbol size
10536
+ */
10537
+ function BitMatrix (size) {
10538
+ if (!size || size < 1) {
10539
+ throw new Error('BitMatrix size must be defined and greater than 0')
10540
+ }
10541
+
10542
+ this.size = size;
10543
+ this.data = new Uint8Array(size * size);
10544
+ this.reservedBit = new Uint8Array(size * size);
10545
+ }
10546
+
10547
+ /**
10548
+ * Set bit value at specified location
10549
+ * If reserved flag is set, this bit will be ignored during masking process
10550
+ *
10551
+ * @param {Number} row
10552
+ * @param {Number} col
10553
+ * @param {Boolean} value
10554
+ * @param {Boolean} reserved
10555
+ */
10556
+ BitMatrix.prototype.set = function (row, col, value, reserved) {
10557
+ const index = row * this.size + col;
10558
+ this.data[index] = value;
10559
+ if (reserved) this.reservedBit[index] = true;
10560
+ };
10561
+
10562
+ /**
10563
+ * Returns bit value at specified location
10564
+ *
10565
+ * @param {Number} row
10566
+ * @param {Number} col
10567
+ * @return {Boolean}
10568
+ */
10569
+ BitMatrix.prototype.get = function (row, col) {
10570
+ return this.data[row * this.size + col]
10571
+ };
10572
+
10573
+ /**
10574
+ * Applies xor operator at specified location
10575
+ * (used during masking process)
10576
+ *
10577
+ * @param {Number} row
10578
+ * @param {Number} col
10579
+ * @param {Boolean} value
10580
+ */
10581
+ BitMatrix.prototype.xor = function (row, col, value) {
10582
+ this.data[row * this.size + col] ^= value;
10583
+ };
10584
+
10585
+ /**
10586
+ * Check if bit at specified location is reserved
10587
+ *
10588
+ * @param {Number} row
10589
+ * @param {Number} col
10590
+ * @return {Boolean}
10591
+ */
10592
+ BitMatrix.prototype.isReserved = function (row, col) {
10593
+ return this.reservedBit[row * this.size + col]
10594
+ };
10595
+
10596
+ var bitMatrix = BitMatrix;
10597
+
10598
+ var alignmentPattern = createCommonjsModule(function (module, exports) {
10599
+ /**
10600
+ * Alignment pattern are fixed reference pattern in defined positions
10601
+ * in a matrix symbology, which enables the decode software to re-synchronise
10602
+ * the coordinate mapping of the image modules in the event of moderate amounts
10603
+ * of distortion of the image.
10604
+ *
10605
+ * Alignment patterns are present only in QR Code symbols of version 2 or larger
10606
+ * and their number depends on the symbol version.
10607
+ */
10608
+
10609
+ const getSymbolSize = utils$1.getSymbolSize;
10610
+
10611
+ /**
10612
+ * Calculate the row/column coordinates of the center module of each alignment pattern
10613
+ * for the specified QR Code version.
10614
+ *
10615
+ * The alignment patterns are positioned symmetrically on either side of the diagonal
10616
+ * running from the top left corner of the symbol to the bottom right corner.
10617
+ *
10618
+ * Since positions are simmetrical only half of the coordinates are returned.
10619
+ * Each item of the array will represent in turn the x and y coordinate.
10620
+ * @see {@link getPositions}
10621
+ *
10622
+ * @param {Number} version QR Code version
10623
+ * @return {Array} Array of coordinate
10624
+ */
10625
+ exports.getRowColCoords = function getRowColCoords (version) {
10626
+ if (version === 1) return []
10627
+
10628
+ const posCount = Math.floor(version / 7) + 2;
10629
+ const size = getSymbolSize(version);
10630
+ const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2;
10631
+ const positions = [size - 7]; // Last coord is always (size - 7)
10632
+
10633
+ for (let i = 1; i < posCount - 1; i++) {
10634
+ positions[i] = positions[i - 1] - intervals;
10635
+ }
10636
+
10637
+ positions.push(6); // First coord is always 6
10638
+
10639
+ return positions.reverse()
10640
+ };
10641
+
10642
+ /**
10643
+ * Returns an array containing the positions of each alignment pattern.
10644
+ * Each array's element represent the center point of the pattern as (x, y) coordinates
10645
+ *
10646
+ * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}
10647
+ * and filtering out the items that overlaps with finder pattern
10648
+ *
10649
+ * @example
10650
+ * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.
10651
+ * The alignment patterns, therefore, are to be centered on (row, column)
10652
+ * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).
10653
+ * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns
10654
+ * and are not therefore used for alignment patterns.
10655
+ *
10656
+ * let pos = getPositions(7)
10657
+ * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]
10658
+ *
10659
+ * @param {Number} version QR Code version
10660
+ * @return {Array} Array of coordinates
10661
+ */
10662
+ exports.getPositions = function getPositions (version) {
10663
+ const coords = [];
10664
+ const pos = exports.getRowColCoords(version);
10665
+ const posLength = pos.length;
10666
+
10667
+ for (let i = 0; i < posLength; i++) {
10668
+ for (let j = 0; j < posLength; j++) {
10669
+ // Skip if position is occupied by finder patterns
10670
+ if ((i === 0 && j === 0) || // top-left
10671
+ (i === 0 && j === posLength - 1) || // bottom-left
10672
+ (i === posLength - 1 && j === 0)) { // top-right
10673
+ continue
10674
+ }
10675
+
10676
+ coords.push([pos[i], pos[j]]);
10677
+ }
10678
+ }
10679
+
10680
+ return coords
10681
+ };
10682
+ });
10683
+
10684
+ const getSymbolSize = utils$1.getSymbolSize;
10685
+ const FINDER_PATTERN_SIZE = 7;
10686
+
10687
+ /**
10688
+ * Returns an array containing the positions of each finder pattern.
10689
+ * Each array's element represent the top-left point of the pattern as (x, y) coordinates
10690
+ *
10691
+ * @param {Number} version QR Code version
10692
+ * @return {Array} Array of coordinates
10693
+ */
10694
+ var getPositions = function getPositions (version) {
10695
+ const size = getSymbolSize(version);
10696
+
10697
+ return [
10698
+ // top-left
10699
+ [0, 0],
10700
+ // top-right
10701
+ [size - FINDER_PATTERN_SIZE, 0],
10702
+ // bottom-left
10703
+ [0, size - FINDER_PATTERN_SIZE]
10704
+ ]
10705
+ };
10706
+
10707
+ var finderPattern = {
10708
+ getPositions: getPositions
10709
+ };
10710
+
10711
+ var maskPattern = createCommonjsModule(function (module, exports) {
10712
+ /**
10713
+ * Data mask pattern reference
10714
+ * @type {Object}
10715
+ */
10716
+ exports.Patterns = {
10717
+ PATTERN000: 0,
10718
+ PATTERN001: 1,
10719
+ PATTERN010: 2,
10720
+ PATTERN011: 3,
10721
+ PATTERN100: 4,
10722
+ PATTERN101: 5,
10723
+ PATTERN110: 6,
10724
+ PATTERN111: 7
10725
+ };
10726
+
10727
+ /**
10728
+ * Weighted penalty scores for the undesirable features
10729
+ * @type {Object}
10730
+ */
10731
+ const PenaltyScores = {
10732
+ N1: 3,
10733
+ N2: 3,
10734
+ N3: 40,
10735
+ N4: 10
10736
+ };
10737
+
10738
+ /**
10739
+ * Check if mask pattern value is valid
10740
+ *
10741
+ * @param {Number} mask Mask pattern
10742
+ * @return {Boolean} true if valid, false otherwise
10743
+ */
10744
+ exports.isValid = function isValid (mask) {
10745
+ return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7
10746
+ };
10747
+
10748
+ /**
10749
+ * Returns mask pattern from a value.
10750
+ * If value is not valid, returns undefined
10751
+ *
10752
+ * @param {Number|String} value Mask pattern value
10753
+ * @return {Number} Valid mask pattern or undefined
10754
+ */
10755
+ exports.from = function from (value) {
10756
+ return exports.isValid(value) ? parseInt(value, 10) : undefined
10757
+ };
10758
+
10759
+ /**
10760
+ * Find adjacent modules in row/column with the same color
10761
+ * and assign a penalty value.
10762
+ *
10763
+ * Points: N1 + i
10764
+ * i is the amount by which the number of adjacent modules of the same color exceeds 5
10765
+ */
10766
+ exports.getPenaltyN1 = function getPenaltyN1 (data) {
10767
+ const size = data.size;
10768
+ let points = 0;
10769
+ let sameCountCol = 0;
10770
+ let sameCountRow = 0;
10771
+ let lastCol = null;
10772
+ let lastRow = null;
10773
+
10774
+ for (let row = 0; row < size; row++) {
10775
+ sameCountCol = sameCountRow = 0;
10776
+ lastCol = lastRow = null;
10777
+
10778
+ for (let col = 0; col < size; col++) {
10779
+ let module = data.get(row, col);
10780
+ if (module === lastCol) {
10781
+ sameCountCol++;
10782
+ } else {
10783
+ if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
10784
+ lastCol = module;
10785
+ sameCountCol = 1;
10786
+ }
10787
+
10788
+ module = data.get(col, row);
10789
+ if (module === lastRow) {
10790
+ sameCountRow++;
10791
+ } else {
10792
+ if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
10793
+ lastRow = module;
10794
+ sameCountRow = 1;
10795
+ }
10796
+ }
10797
+
10798
+ if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
10799
+ if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
10800
+ }
10801
+
10802
+ return points
10803
+ };
10804
+
10805
+ /**
10806
+ * Find 2x2 blocks with the same color and assign a penalty value
10807
+ *
10808
+ * Points: N2 * (m - 1) * (n - 1)
10809
+ */
10810
+ exports.getPenaltyN2 = function getPenaltyN2 (data) {
10811
+ const size = data.size;
10812
+ let points = 0;
10813
+
10814
+ for (let row = 0; row < size - 1; row++) {
10815
+ for (let col = 0; col < size - 1; col++) {
10816
+ const last = data.get(row, col) +
10817
+ data.get(row, col + 1) +
10818
+ data.get(row + 1, col) +
10819
+ data.get(row + 1, col + 1);
10820
+
10821
+ if (last === 4 || last === 0) points++;
10822
+ }
10823
+ }
10824
+
10825
+ return points * PenaltyScores.N2
10826
+ };
10827
+
10828
+ /**
10829
+ * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,
10830
+ * preceded or followed by light area 4 modules wide
10831
+ *
10832
+ * Points: N3 * number of pattern found
10833
+ */
10834
+ exports.getPenaltyN3 = function getPenaltyN3 (data) {
10835
+ const size = data.size;
10836
+ let points = 0;
10837
+ let bitsCol = 0;
10838
+ let bitsRow = 0;
10839
+
10840
+ for (let row = 0; row < size; row++) {
10841
+ bitsCol = bitsRow = 0;
10842
+ for (let col = 0; col < size; col++) {
10843
+ bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col);
10844
+ if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++;
10845
+
10846
+ bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row);
10847
+ if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++;
10848
+ }
10849
+ }
10850
+
10851
+ return points * PenaltyScores.N3
10852
+ };
10853
+
10854
+ /**
10855
+ * Calculate proportion of dark modules in entire symbol
10856
+ *
10857
+ * Points: N4 * k
10858
+ *
10859
+ * k is the rating of the deviation of the proportion of dark modules
10860
+ * in the symbol from 50% in steps of 5%
10861
+ */
10862
+ exports.getPenaltyN4 = function getPenaltyN4 (data) {
10863
+ let darkCount = 0;
10864
+ const modulesCount = data.data.length;
10865
+
10866
+ for (let i = 0; i < modulesCount; i++) darkCount += data.data[i];
10867
+
10868
+ const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10);
10869
+
10870
+ return k * PenaltyScores.N4
10871
+ };
10872
+
10873
+ /**
10874
+ * Return mask value at given position
10875
+ *
10876
+ * @param {Number} maskPattern Pattern reference value
10877
+ * @param {Number} i Row
10878
+ * @param {Number} j Column
10879
+ * @return {Boolean} Mask value
10880
+ */
10881
+ function getMaskAt (maskPattern, i, j) {
10882
+ switch (maskPattern) {
10883
+ case exports.Patterns.PATTERN000: return (i + j) % 2 === 0
10884
+ case exports.Patterns.PATTERN001: return i % 2 === 0
10885
+ case exports.Patterns.PATTERN010: return j % 3 === 0
10886
+ case exports.Patterns.PATTERN011: return (i + j) % 3 === 0
10887
+ case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0
10888
+ case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0
10889
+ case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0
10890
+ case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0
10891
+
10892
+ default: throw new Error('bad maskPattern:' + maskPattern)
10893
+ }
10894
+ }
10895
+
10896
+ /**
10897
+ * Apply a mask pattern to a BitMatrix
10898
+ *
10899
+ * @param {Number} pattern Pattern reference number
10900
+ * @param {BitMatrix} data BitMatrix data
10901
+ */
10902
+ exports.applyMask = function applyMask (pattern, data) {
10903
+ const size = data.size;
10904
+
10905
+ for (let col = 0; col < size; col++) {
10906
+ for (let row = 0; row < size; row++) {
10907
+ if (data.isReserved(row, col)) continue
10908
+ data.xor(row, col, getMaskAt(pattern, row, col));
10909
+ }
10910
+ }
10911
+ };
10912
+
10913
+ /**
10914
+ * Returns the best mask pattern for data
10915
+ *
10916
+ * @param {BitMatrix} data
10917
+ * @return {Number} Mask pattern reference number
10918
+ */
10919
+ exports.getBestMask = function getBestMask (data, setupFormatFunc) {
10920
+ const numPatterns = Object.keys(exports.Patterns).length;
10921
+ let bestPattern = 0;
10922
+ let lowerPenalty = Infinity;
10923
+
10924
+ for (let p = 0; p < numPatterns; p++) {
10925
+ setupFormatFunc(p);
10926
+ exports.applyMask(p, data);
10927
+
10928
+ // Calculate penalty
10929
+ const penalty =
10930
+ exports.getPenaltyN1(data) +
10931
+ exports.getPenaltyN2(data) +
10932
+ exports.getPenaltyN3(data) +
10933
+ exports.getPenaltyN4(data);
10934
+
10935
+ // Undo previously applied mask
10936
+ exports.applyMask(p, data);
10937
+
10938
+ if (penalty < lowerPenalty) {
10939
+ lowerPenalty = penalty;
10940
+ bestPattern = p;
10941
+ }
10942
+ }
10943
+
10944
+ return bestPattern
10945
+ };
10946
+ });
10947
+
10948
+ const EC_BLOCKS_TABLE = [
10949
+ // L M Q H
10950
+ 1, 1, 1, 1,
10951
+ 1, 1, 1, 1,
10952
+ 1, 1, 2, 2,
10953
+ 1, 2, 2, 4,
10954
+ 1, 2, 4, 4,
10955
+ 2, 4, 4, 4,
10956
+ 2, 4, 6, 5,
10957
+ 2, 4, 6, 6,
10958
+ 2, 5, 8, 8,
10959
+ 4, 5, 8, 8,
10960
+ 4, 5, 8, 11,
10961
+ 4, 8, 10, 11,
10962
+ 4, 9, 12, 16,
10963
+ 4, 9, 16, 16,
10964
+ 6, 10, 12, 18,
10965
+ 6, 10, 17, 16,
10966
+ 6, 11, 16, 19,
10967
+ 6, 13, 18, 21,
10968
+ 7, 14, 21, 25,
10969
+ 8, 16, 20, 25,
10970
+ 8, 17, 23, 25,
10971
+ 9, 17, 23, 34,
10972
+ 9, 18, 25, 30,
10973
+ 10, 20, 27, 32,
10974
+ 12, 21, 29, 35,
10975
+ 12, 23, 34, 37,
10976
+ 12, 25, 34, 40,
10977
+ 13, 26, 35, 42,
10978
+ 14, 28, 38, 45,
10979
+ 15, 29, 40, 48,
10980
+ 16, 31, 43, 51,
10981
+ 17, 33, 45, 54,
10982
+ 18, 35, 48, 57,
10983
+ 19, 37, 51, 60,
10984
+ 19, 38, 53, 63,
10985
+ 20, 40, 56, 66,
10986
+ 21, 43, 59, 70,
10987
+ 22, 45, 62, 74,
10988
+ 24, 47, 65, 77,
10989
+ 25, 49, 68, 81
10990
+ ];
10991
+
10992
+ const EC_CODEWORDS_TABLE = [
10993
+ // L M Q H
10994
+ 7, 10, 13, 17,
10995
+ 10, 16, 22, 28,
10996
+ 15, 26, 36, 44,
10997
+ 20, 36, 52, 64,
10998
+ 26, 48, 72, 88,
10999
+ 36, 64, 96, 112,
11000
+ 40, 72, 108, 130,
11001
+ 48, 88, 132, 156,
11002
+ 60, 110, 160, 192,
11003
+ 72, 130, 192, 224,
11004
+ 80, 150, 224, 264,
11005
+ 96, 176, 260, 308,
11006
+ 104, 198, 288, 352,
11007
+ 120, 216, 320, 384,
11008
+ 132, 240, 360, 432,
11009
+ 144, 280, 408, 480,
11010
+ 168, 308, 448, 532,
11011
+ 180, 338, 504, 588,
11012
+ 196, 364, 546, 650,
11013
+ 224, 416, 600, 700,
11014
+ 224, 442, 644, 750,
11015
+ 252, 476, 690, 816,
11016
+ 270, 504, 750, 900,
11017
+ 300, 560, 810, 960,
11018
+ 312, 588, 870, 1050,
11019
+ 336, 644, 952, 1110,
11020
+ 360, 700, 1020, 1200,
11021
+ 390, 728, 1050, 1260,
11022
+ 420, 784, 1140, 1350,
11023
+ 450, 812, 1200, 1440,
11024
+ 480, 868, 1290, 1530,
11025
+ 510, 924, 1350, 1620,
11026
+ 540, 980, 1440, 1710,
11027
+ 570, 1036, 1530, 1800,
11028
+ 570, 1064, 1590, 1890,
11029
+ 600, 1120, 1680, 1980,
11030
+ 630, 1204, 1770, 2100,
11031
+ 660, 1260, 1860, 2220,
11032
+ 720, 1316, 1950, 2310,
11033
+ 750, 1372, 2040, 2430
11034
+ ];
11035
+
11036
+ /**
11037
+ * Returns the number of error correction block that the QR Code should contain
11038
+ * for the specified version and error correction level.
11039
+ *
11040
+ * @param {Number} version QR Code version
11041
+ * @param {Number} errorCorrectionLevel Error correction level
11042
+ * @return {Number} Number of error correction blocks
11043
+ */
11044
+ var getBlocksCount = function getBlocksCount (version, errorCorrectionLevel$1) {
11045
+ switch (errorCorrectionLevel$1) {
11046
+ case errorCorrectionLevel.L:
11047
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]
11048
+ case errorCorrectionLevel.M:
11049
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]
11050
+ case errorCorrectionLevel.Q:
11051
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]
11052
+ case errorCorrectionLevel.H:
11053
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]
11054
+ default:
11055
+ return undefined
11056
+ }
11057
+ };
11058
+
11059
+ /**
11060
+ * Returns the number of error correction codewords to use for the specified
11061
+ * version and error correction level.
11062
+ *
11063
+ * @param {Number} version QR Code version
11064
+ * @param {Number} errorCorrectionLevel Error correction level
11065
+ * @return {Number} Number of error correction codewords
11066
+ */
11067
+ var getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel$1) {
11068
+ switch (errorCorrectionLevel$1) {
11069
+ case errorCorrectionLevel.L:
11070
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]
11071
+ case errorCorrectionLevel.M:
11072
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]
11073
+ case errorCorrectionLevel.Q:
11074
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]
11075
+ case errorCorrectionLevel.H:
11076
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]
11077
+ default:
11078
+ return undefined
11079
+ }
11080
+ };
11081
+
11082
+ var errorCorrectionCode = {
11083
+ getBlocksCount: getBlocksCount,
11084
+ getTotalCodewordsCount: getTotalCodewordsCount
11085
+ };
11086
+
11087
+ const EXP_TABLE = new Uint8Array(512);
11088
+ const LOG_TABLE = new Uint8Array(256)
11089
+ /**
11090
+ * Precompute the log and anti-log tables for faster computation later
11091
+ *
11092
+ * For each possible value in the galois field 2^8, we will pre-compute
11093
+ * the logarithm and anti-logarithm (exponential) of this value
11094
+ *
11095
+ * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}
11096
+ */
11097
+ ;(function initTables () {
11098
+ let x = 1;
11099
+ for (let i = 0; i < 255; i++) {
11100
+ EXP_TABLE[i] = x;
11101
+ LOG_TABLE[x] = i;
11102
+
11103
+ x <<= 1; // multiply by 2
11104
+
11105
+ // The QR code specification says to use byte-wise modulo 100011101 arithmetic.
11106
+ // This means that when a number is 256 or larger, it should be XORed with 0x11D.
11107
+ if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)
11108
+ x ^= 0x11D;
11109
+ }
11110
+ }
11111
+
11112
+ // Optimization: double the size of the anti-log table so that we don't need to mod 255 to
11113
+ // stay inside the bounds (because we will mainly use this table for the multiplication of
11114
+ // two GF numbers, no more).
11115
+ // @see {@link mul}
11116
+ for (let i = 255; i < 512; i++) {
11117
+ EXP_TABLE[i] = EXP_TABLE[i - 255];
11118
+ }
11119
+ }());
11120
+
11121
+ /**
11122
+ * Returns log value of n inside Galois Field
11123
+ *
11124
+ * @param {Number} n
11125
+ * @return {Number}
11126
+ */
11127
+ var log = function log (n) {
11128
+ if (n < 1) throw new Error('log(' + n + ')')
11129
+ return LOG_TABLE[n]
11130
+ };
11131
+
11132
+ /**
11133
+ * Returns anti-log value of n inside Galois Field
11134
+ *
11135
+ * @param {Number} n
11136
+ * @return {Number}
11137
+ */
11138
+ var exp = function exp (n) {
11139
+ return EXP_TABLE[n]
11140
+ };
11141
+
11142
+ /**
11143
+ * Multiplies two number inside Galois Field
11144
+ *
11145
+ * @param {Number} x
11146
+ * @param {Number} y
11147
+ * @return {Number}
11148
+ */
11149
+ var mul = function mul (x, y) {
11150
+ if (x === 0 || y === 0) return 0
11151
+
11152
+ // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized
11153
+ // @see {@link initTables}
11154
+ return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]
11155
+ };
11156
+
11157
+ var galoisField = {
11158
+ log: log,
11159
+ exp: exp,
11160
+ mul: mul
11161
+ };
11162
+
11163
+ var polynomial = createCommonjsModule(function (module, exports) {
11164
+ /**
11165
+ * Multiplies two polynomials inside Galois Field
11166
+ *
11167
+ * @param {Uint8Array} p1 Polynomial
11168
+ * @param {Uint8Array} p2 Polynomial
11169
+ * @return {Uint8Array} Product of p1 and p2
11170
+ */
11171
+ exports.mul = function mul (p1, p2) {
11172
+ const coeff = new Uint8Array(p1.length + p2.length - 1);
11173
+
11174
+ for (let i = 0; i < p1.length; i++) {
11175
+ for (let j = 0; j < p2.length; j++) {
11176
+ coeff[i + j] ^= galoisField.mul(p1[i], p2[j]);
11177
+ }
11178
+ }
11179
+
11180
+ return coeff
11181
+ };
11182
+
11183
+ /**
11184
+ * Calculate the remainder of polynomials division
11185
+ *
11186
+ * @param {Uint8Array} divident Polynomial
11187
+ * @param {Uint8Array} divisor Polynomial
11188
+ * @return {Uint8Array} Remainder
11189
+ */
11190
+ exports.mod = function mod (divident, divisor) {
11191
+ let result = new Uint8Array(divident);
11192
+
11193
+ while ((result.length - divisor.length) >= 0) {
11194
+ const coeff = result[0];
11195
+
11196
+ for (let i = 0; i < divisor.length; i++) {
11197
+ result[i] ^= galoisField.mul(divisor[i], coeff);
11198
+ }
11199
+
11200
+ // remove all zeros from buffer head
11201
+ let offset = 0;
11202
+ while (offset < result.length && result[offset] === 0) offset++;
11203
+ result = result.slice(offset);
11204
+ }
11205
+
11206
+ return result
11207
+ };
11208
+
11209
+ /**
11210
+ * Generate an irreducible generator polynomial of specified degree
11211
+ * (used by Reed-Solomon encoder)
11212
+ *
11213
+ * @param {Number} degree Degree of the generator polynomial
11214
+ * @return {Uint8Array} Buffer containing polynomial coefficients
11215
+ */
11216
+ exports.generateECPolynomial = function generateECPolynomial (degree) {
11217
+ let poly = new Uint8Array([1]);
11218
+ for (let i = 0; i < degree; i++) {
11219
+ poly = exports.mul(poly, new Uint8Array([1, galoisField.exp(i)]));
11220
+ }
11221
+
11222
+ return poly
11223
+ };
11224
+ });
11225
+
11226
+ function ReedSolomonEncoder (degree) {
11227
+ this.genPoly = undefined;
11228
+ this.degree = degree;
11229
+
11230
+ if (this.degree) this.initialize(this.degree);
11231
+ }
11232
+
11233
+ /**
11234
+ * Initialize the encoder.
11235
+ * The input param should correspond to the number of error correction codewords.
11236
+ *
11237
+ * @param {Number} degree
11238
+ */
11239
+ ReedSolomonEncoder.prototype.initialize = function initialize (degree) {
11240
+ // create an irreducible generator polynomial
11241
+ this.degree = degree;
11242
+ this.genPoly = polynomial.generateECPolynomial(this.degree);
11243
+ };
11244
+
11245
+ /**
11246
+ * Encodes a chunk of data
11247
+ *
11248
+ * @param {Uint8Array} data Buffer containing input data
11249
+ * @return {Uint8Array} Buffer containing encoded data
11250
+ */
11251
+ ReedSolomonEncoder.prototype.encode = function encode (data) {
11252
+ if (!this.genPoly) {
11253
+ throw new Error('Encoder not initialized')
11254
+ }
11255
+
11256
+ // Calculate EC for this data block
11257
+ // extends data size to data+genPoly size
11258
+ const paddedData = new Uint8Array(data.length + this.degree);
11259
+ paddedData.set(data);
11260
+
11261
+ // The error correction codewords are the remainder after dividing the data codewords
11262
+ // by a generator polynomial
11263
+ const remainder = polynomial.mod(paddedData, this.genPoly);
11264
+
11265
+ // return EC data blocks (last n byte, where n is the degree of genPoly)
11266
+ // If coefficients number in remainder are less than genPoly degree,
11267
+ // pad with 0s to the left to reach the needed number of coefficients
11268
+ const start = this.degree - remainder.length;
11269
+ if (start > 0) {
11270
+ const buff = new Uint8Array(this.degree);
11271
+ buff.set(remainder, start);
11272
+
11273
+ return buff
11274
+ }
11275
+
11276
+ return remainder
11277
+ };
11278
+
11279
+ var reedSolomonEncoder = ReedSolomonEncoder;
11280
+
11281
+ /**
11282
+ * Check if QR Code version is valid
11283
+ *
11284
+ * @param {Number} version QR Code version
11285
+ * @return {Boolean} true if valid version, false otherwise
11286
+ */
11287
+ var isValid = function isValid (version) {
11288
+ return !isNaN(version) && version >= 1 && version <= 40
11289
+ };
11290
+
11291
+ var versionCheck = {
11292
+ isValid: isValid
11293
+ };
11294
+
11295
+ const numeric = '[0-9]+';
11296
+ const alphanumeric = '[A-Z $%*+\\-./:]+';
11297
+ let kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +
11298
+ '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +
11299
+ '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +
11300
+ '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+';
11301
+ kanji = kanji.replace(/u/g, '\\u');
11302
+
11303
+ const byte = '(?:(?![A-Z0-9 $%*+\\-./:]|' + kanji + ')(?:.|[\r\n]))+';
11304
+
11305
+ var KANJI = new RegExp(kanji, 'g');
11306
+ var BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\-./:]+', 'g');
11307
+ var BYTE = new RegExp(byte, 'g');
11308
+ var NUMERIC = new RegExp(numeric, 'g');
11309
+ var ALPHANUMERIC = new RegExp(alphanumeric, 'g');
11310
+
11311
+ const TEST_KANJI = new RegExp('^' + kanji + '$');
11312
+ const TEST_NUMERIC = new RegExp('^' + numeric + '$');
11313
+ const TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\-./:]+$');
11314
+
11315
+ var testKanji = function testKanji (str) {
11316
+ return TEST_KANJI.test(str)
11317
+ };
11318
+
11319
+ var testNumeric = function testNumeric (str) {
11320
+ return TEST_NUMERIC.test(str)
11321
+ };
11322
+
11323
+ var testAlphanumeric = function testAlphanumeric (str) {
11324
+ return TEST_ALPHANUMERIC.test(str)
11325
+ };
11326
+
11327
+ var regex = {
11328
+ KANJI: KANJI,
11329
+ BYTE_KANJI: BYTE_KANJI,
11330
+ BYTE: BYTE,
11331
+ NUMERIC: NUMERIC,
11332
+ ALPHANUMERIC: ALPHANUMERIC,
11333
+ testKanji: testKanji,
11334
+ testNumeric: testNumeric,
11335
+ testAlphanumeric: testAlphanumeric
11336
+ };
11337
+
11338
+ var mode = createCommonjsModule(function (module, exports) {
11339
+ /**
11340
+ * Numeric mode encodes data from the decimal digit set (0 - 9)
11341
+ * (byte values 30HEX to 39HEX).
11342
+ * Normally, 3 data characters are represented by 10 bits.
11343
+ *
11344
+ * @type {Object}
11345
+ */
11346
+ exports.NUMERIC = {
11347
+ id: 'Numeric',
11348
+ bit: 1 << 0,
11349
+ ccBits: [10, 12, 14]
11350
+ };
11351
+
11352
+ /**
11353
+ * Alphanumeric mode encodes data from a set of 45 characters,
11354
+ * i.e. 10 numeric digits (0 - 9),
11355
+ * 26 alphabetic characters (A - Z),
11356
+ * and 9 symbols (SP, $, %, *, +, -, ., /, :).
11357
+ * Normally, two input characters are represented by 11 bits.
11358
+ *
11359
+ * @type {Object}
11360
+ */
11361
+ exports.ALPHANUMERIC = {
11362
+ id: 'Alphanumeric',
11363
+ bit: 1 << 1,
11364
+ ccBits: [9, 11, 13]
11365
+ };
11366
+
11367
+ /**
11368
+ * In byte mode, data is encoded at 8 bits per character.
11369
+ *
11370
+ * @type {Object}
11371
+ */
11372
+ exports.BYTE = {
11373
+ id: 'Byte',
11374
+ bit: 1 << 2,
11375
+ ccBits: [8, 16, 16]
11376
+ };
11377
+
11378
+ /**
11379
+ * The Kanji mode efficiently encodes Kanji characters in accordance with
11380
+ * the Shift JIS system based on JIS X 0208.
11381
+ * The Shift JIS values are shifted from the JIS X 0208 values.
11382
+ * JIS X 0208 gives details of the shift coded representation.
11383
+ * Each two-byte character value is compacted to a 13-bit binary codeword.
11384
+ *
11385
+ * @type {Object}
11386
+ */
11387
+ exports.KANJI = {
11388
+ id: 'Kanji',
11389
+ bit: 1 << 3,
11390
+ ccBits: [8, 10, 12]
11391
+ };
11392
+
11393
+ /**
11394
+ * Mixed mode will contain a sequences of data in a combination of any of
11395
+ * the modes described above
11396
+ *
11397
+ * @type {Object}
11398
+ */
11399
+ exports.MIXED = {
11400
+ bit: -1
11401
+ };
11402
+
11403
+ /**
11404
+ * Returns the number of bits needed to store the data length
11405
+ * according to QR Code specifications.
11406
+ *
11407
+ * @param {Mode} mode Data mode
11408
+ * @param {Number} version QR Code version
11409
+ * @return {Number} Number of bits
11410
+ */
11411
+ exports.getCharCountIndicator = function getCharCountIndicator (mode, version) {
11412
+ if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)
11413
+
11414
+ if (!versionCheck.isValid(version)) {
11415
+ throw new Error('Invalid version: ' + version)
11416
+ }
11417
+
11418
+ if (version >= 1 && version < 10) return mode.ccBits[0]
11419
+ else if (version < 27) return mode.ccBits[1]
11420
+ return mode.ccBits[2]
11421
+ };
11422
+
11423
+ /**
11424
+ * Returns the most efficient mode to store the specified data
11425
+ *
11426
+ * @param {String} dataStr Input data string
11427
+ * @return {Mode} Best mode
11428
+ */
11429
+ exports.getBestModeForData = function getBestModeForData (dataStr) {
11430
+ if (regex.testNumeric(dataStr)) return exports.NUMERIC
11431
+ else if (regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC
11432
+ else if (regex.testKanji(dataStr)) return exports.KANJI
11433
+ else return exports.BYTE
11434
+ };
11435
+
11436
+ /**
11437
+ * Return mode name as string
11438
+ *
11439
+ * @param {Mode} mode Mode object
11440
+ * @returns {String} Mode name
11441
+ */
11442
+ exports.toString = function toString (mode) {
11443
+ if (mode && mode.id) return mode.id
11444
+ throw new Error('Invalid mode')
11445
+ };
11446
+
11447
+ /**
11448
+ * Check if input param is a valid mode object
11449
+ *
11450
+ * @param {Mode} mode Mode object
11451
+ * @returns {Boolean} True if valid mode, false otherwise
11452
+ */
11453
+ exports.isValid = function isValid (mode) {
11454
+ return mode && mode.bit && mode.ccBits
11455
+ };
11456
+
11457
+ /**
11458
+ * Get mode object from its name
11459
+ *
11460
+ * @param {String} string Mode name
11461
+ * @returns {Mode} Mode object
11462
+ */
11463
+ function fromString (string) {
11464
+ if (typeof string !== 'string') {
11465
+ throw new Error('Param is not a string')
11466
+ }
11467
+
11468
+ const lcStr = string.toLowerCase();
11469
+
11470
+ switch (lcStr) {
11471
+ case 'numeric':
11472
+ return exports.NUMERIC
11473
+ case 'alphanumeric':
11474
+ return exports.ALPHANUMERIC
11475
+ case 'kanji':
11476
+ return exports.KANJI
11477
+ case 'byte':
11478
+ return exports.BYTE
11479
+ default:
11480
+ throw new Error('Unknown mode: ' + string)
11481
+ }
11482
+ }
11483
+
11484
+ /**
11485
+ * Returns mode from a value.
11486
+ * If value is not a valid mode, returns defaultValue
11487
+ *
11488
+ * @param {Mode|String} value Encoding mode
11489
+ * @param {Mode} defaultValue Fallback value
11490
+ * @return {Mode} Encoding mode
11491
+ */
11492
+ exports.from = function from (value, defaultValue) {
11493
+ if (exports.isValid(value)) {
11494
+ return value
11495
+ }
11496
+
11497
+ try {
11498
+ return fromString(value)
11499
+ } catch (e) {
11500
+ return defaultValue
11501
+ }
11502
+ };
11503
+ });
11504
+
11505
+ var version = createCommonjsModule(function (module, exports) {
11506
+ // Generator polynomial used to encode version information
11507
+ const G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0);
11508
+ const G18_BCH = utils$1.getBCHDigit(G18);
11509
+
11510
+ function getBestVersionForDataLength (mode, length, errorCorrectionLevel) {
11511
+ for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
11512
+ if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {
11513
+ return currentVersion
11514
+ }
11515
+ }
11516
+
11517
+ return undefined
11518
+ }
11519
+
11520
+ function getReservedBitsCount (mode$1, version) {
11521
+ // Character count indicator + mode indicator bits
11522
+ return mode.getCharCountIndicator(mode$1, version) + 4
11523
+ }
11524
+
11525
+ function getTotalBitsFromDataArray (segments, version) {
11526
+ let totalBits = 0;
11527
+
11528
+ segments.forEach(function (data) {
11529
+ const reservedBits = getReservedBitsCount(data.mode, version);
11530
+ totalBits += reservedBits + data.getBitsLength();
11531
+ });
11532
+
11533
+ return totalBits
11534
+ }
11535
+
11536
+ function getBestVersionForMixedData (segments, errorCorrectionLevel) {
11537
+ for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
11538
+ const length = getTotalBitsFromDataArray(segments, currentVersion);
11539
+ if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode.MIXED)) {
11540
+ return currentVersion
11541
+ }
11542
+ }
11543
+
11544
+ return undefined
11545
+ }
11546
+
11547
+ /**
11548
+ * Returns version number from a value.
11549
+ * If value is not a valid version, returns defaultValue
11550
+ *
11551
+ * @param {Number|String} value QR Code version
11552
+ * @param {Number} defaultValue Fallback value
11553
+ * @return {Number} QR Code version number
11554
+ */
11555
+ exports.from = function from (value, defaultValue) {
11556
+ if (versionCheck.isValid(value)) {
11557
+ return parseInt(value, 10)
11558
+ }
11559
+
11560
+ return defaultValue
11561
+ };
11562
+
11563
+ /**
11564
+ * Returns how much data can be stored with the specified QR code version
11565
+ * and error correction level
11566
+ *
11567
+ * @param {Number} version QR Code version (1-40)
11568
+ * @param {Number} errorCorrectionLevel Error correction level
11569
+ * @param {Mode} mode Data mode
11570
+ * @return {Number} Quantity of storable data
11571
+ */
11572
+ exports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode$1) {
11573
+ if (!versionCheck.isValid(version)) {
11574
+ throw new Error('Invalid QR Code version')
11575
+ }
11576
+
11577
+ // Use Byte mode as default
11578
+ if (typeof mode$1 === 'undefined') mode$1 = mode.BYTE;
11579
+
11580
+ // Total codewords for this QR code version (Data + Error correction)
11581
+ const totalCodewords = utils$1.getSymbolTotalCodewords(version);
11582
+
11583
+ // Total number of error correction codewords
11584
+ const ecTotalCodewords = errorCorrectionCode.getTotalCodewordsCount(version, errorCorrectionLevel);
11585
+
11586
+ // Total number of data codewords
11587
+ const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
11588
+
11589
+ if (mode$1 === mode.MIXED) return dataTotalCodewordsBits
11590
+
11591
+ const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode$1, version);
11592
+
11593
+ // Return max number of storable codewords
11594
+ switch (mode$1) {
11595
+ case mode.NUMERIC:
11596
+ return Math.floor((usableBits / 10) * 3)
11597
+
11598
+ case mode.ALPHANUMERIC:
11599
+ return Math.floor((usableBits / 11) * 2)
11600
+
11601
+ case mode.KANJI:
11602
+ return Math.floor(usableBits / 13)
11603
+
11604
+ case mode.BYTE:
11605
+ default:
11606
+ return Math.floor(usableBits / 8)
11607
+ }
11608
+ };
11609
+
11610
+ /**
11611
+ * Returns the minimum version needed to contain the amount of data
11612
+ *
11613
+ * @param {Segment} data Segment of data
11614
+ * @param {Number} [errorCorrectionLevel=H] Error correction level
11615
+ * @param {Mode} mode Data mode
11616
+ * @return {Number} QR Code version
11617
+ */
11618
+ exports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel$1) {
11619
+ let seg;
11620
+
11621
+ const ecl = errorCorrectionLevel.from(errorCorrectionLevel$1, errorCorrectionLevel.M);
11622
+
11623
+ if (Array.isArray(data)) {
11624
+ if (data.length > 1) {
11625
+ return getBestVersionForMixedData(data, ecl)
11626
+ }
11627
+
11628
+ if (data.length === 0) {
11629
+ return 1
11630
+ }
11631
+
11632
+ seg = data[0];
11633
+ } else {
11634
+ seg = data;
11635
+ }
11636
+
11637
+ return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)
11638
+ };
11639
+
11640
+ /**
11641
+ * Returns version information with relative error correction bits
11642
+ *
11643
+ * The version information is included in QR Code symbols of version 7 or larger.
11644
+ * It consists of an 18-bit sequence containing 6 data bits,
11645
+ * with 12 error correction bits calculated using the (18, 6) Golay code.
11646
+ *
11647
+ * @param {Number} version QR Code version
11648
+ * @return {Number} Encoded version info bits
11649
+ */
11650
+ exports.getEncodedBits = function getEncodedBits (version) {
11651
+ if (!versionCheck.isValid(version) || version < 7) {
11652
+ throw new Error('Invalid QR Code version')
11653
+ }
11654
+
11655
+ let d = version << 12;
11656
+
11657
+ while (utils$1.getBCHDigit(d) - G18_BCH >= 0) {
11658
+ d ^= (G18 << (utils$1.getBCHDigit(d) - G18_BCH));
11659
+ }
11660
+
11661
+ return (version << 12) | d
11662
+ };
11663
+ });
11664
+
11665
+ const G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0);
11666
+ const G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1);
11667
+ const G15_BCH = utils$1.getBCHDigit(G15);
11668
+
11669
+ /**
11670
+ * Returns format information with relative error correction bits
11671
+ *
11672
+ * The format information is a 15-bit sequence containing 5 data bits,
11673
+ * with 10 error correction bits calculated using the (15, 5) BCH code.
11674
+ *
11675
+ * @param {Number} errorCorrectionLevel Error correction level
11676
+ * @param {Number} mask Mask pattern
11677
+ * @return {Number} Encoded format information bits
11678
+ */
11679
+ var getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {
11680
+ const data = ((errorCorrectionLevel.bit << 3) | mask);
11681
+ let d = data << 10;
11682
+
11683
+ while (utils$1.getBCHDigit(d) - G15_BCH >= 0) {
11684
+ d ^= (G15 << (utils$1.getBCHDigit(d) - G15_BCH));
11685
+ }
11686
+
11687
+ // xor final data with mask pattern in order to ensure that
11688
+ // no combination of Error Correction Level and data mask pattern
11689
+ // will result in an all-zero data string
11690
+ return ((data << 10) | d) ^ G15_MASK
11691
+ };
11692
+
11693
+ var formatInfo = {
11694
+ getEncodedBits: getEncodedBits
11695
+ };
11696
+
11697
+ function NumericData (data) {
11698
+ this.mode = mode.NUMERIC;
11699
+ this.data = data.toString();
11700
+ }
11701
+
11702
+ NumericData.getBitsLength = function getBitsLength (length) {
11703
+ return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)
11704
+ };
11705
+
11706
+ NumericData.prototype.getLength = function getLength () {
11707
+ return this.data.length
11708
+ };
11709
+
11710
+ NumericData.prototype.getBitsLength = function getBitsLength () {
11711
+ return NumericData.getBitsLength(this.data.length)
11712
+ };
11713
+
11714
+ NumericData.prototype.write = function write (bitBuffer) {
11715
+ let i, group, value;
11716
+
11717
+ // The input data string is divided into groups of three digits,
11718
+ // and each group is converted to its 10-bit binary equivalent.
11719
+ for (i = 0; i + 3 <= this.data.length; i += 3) {
11720
+ group = this.data.substr(i, 3);
11721
+ value = parseInt(group, 10);
11722
+
11723
+ bitBuffer.put(value, 10);
11724
+ }
11725
+
11726
+ // If the number of input digits is not an exact multiple of three,
11727
+ // the final one or two digits are converted to 4 or 7 bits respectively.
11728
+ const remainingNum = this.data.length - i;
11729
+ if (remainingNum > 0) {
11730
+ group = this.data.substr(i);
11731
+ value = parseInt(group, 10);
11732
+
11733
+ bitBuffer.put(value, remainingNum * 3 + 1);
11734
+ }
11735
+ };
11736
+
11737
+ var numericData = NumericData;
11738
+
11739
+ /**
11740
+ * Array of characters available in alphanumeric mode
11741
+ *
11742
+ * As per QR Code specification, to each character
11743
+ * is assigned a value from 0 to 44 which in this case coincides
11744
+ * with the array index
11745
+ *
11746
+ * @type {Array}
11747
+ */
11748
+ const ALPHA_NUM_CHARS = [
11749
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
11750
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
11751
+ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
11752
+ ' ', '$', '%', '*', '+', '-', '.', '/', ':'
11753
+ ];
11754
+
11755
+ function AlphanumericData (data) {
11756
+ this.mode = mode.ALPHANUMERIC;
11757
+ this.data = data;
11758
+ }
11759
+
11760
+ AlphanumericData.getBitsLength = function getBitsLength (length) {
11761
+ return 11 * Math.floor(length / 2) + 6 * (length % 2)
11762
+ };
11763
+
11764
+ AlphanumericData.prototype.getLength = function getLength () {
11765
+ return this.data.length
11766
+ };
11767
+
11768
+ AlphanumericData.prototype.getBitsLength = function getBitsLength () {
11769
+ return AlphanumericData.getBitsLength(this.data.length)
11770
+ };
11771
+
11772
+ AlphanumericData.prototype.write = function write (bitBuffer) {
11773
+ let i;
11774
+
11775
+ // Input data characters are divided into groups of two characters
11776
+ // and encoded as 11-bit binary codes.
11777
+ for (i = 0; i + 2 <= this.data.length; i += 2) {
11778
+ // The character value of the first character is multiplied by 45
11779
+ let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45;
11780
+
11781
+ // The character value of the second digit is added to the product
11782
+ value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1]);
11783
+
11784
+ // The sum is then stored as 11-bit binary number
11785
+ bitBuffer.put(value, 11);
11786
+ }
11787
+
11788
+ // If the number of input data characters is not a multiple of two,
11789
+ // the character value of the final character is encoded as a 6-bit binary number.
11790
+ if (this.data.length % 2) {
11791
+ bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6);
11792
+ }
11793
+ };
11794
+
11795
+ var alphanumericData = AlphanumericData;
11796
+
11797
+ var encodeUtf8 = function encodeUtf8 (input) {
11798
+ var result = [];
11799
+ var size = input.length;
11800
+
11801
+ for (var index = 0; index < size; index++) {
11802
+ var point = input.charCodeAt(index);
11803
+
11804
+ if (point >= 0xD800 && point <= 0xDBFF && size > index + 1) {
11805
+ var second = input.charCodeAt(index + 1);
11806
+
11807
+ if (second >= 0xDC00 && second <= 0xDFFF) {
11808
+ // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
11809
+ point = (point - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
11810
+ index += 1;
11811
+ }
11812
+ }
11813
+
11814
+ // US-ASCII
11815
+ if (point < 0x80) {
11816
+ result.push(point);
11817
+ continue
11818
+ }
11819
+
11820
+ // 2-byte UTF-8
11821
+ if (point < 0x800) {
11822
+ result.push((point >> 6) | 192);
11823
+ result.push((point & 63) | 128);
11824
+ continue
11825
+ }
11826
+
11827
+ // 3-byte UTF-8
11828
+ if (point < 0xD800 || (point >= 0xE000 && point < 0x10000)) {
11829
+ result.push((point >> 12) | 224);
11830
+ result.push(((point >> 6) & 63) | 128);
11831
+ result.push((point & 63) | 128);
11832
+ continue
11833
+ }
11834
+
11835
+ // 4-byte UTF-8
11836
+ if (point >= 0x10000 && point <= 0x10FFFF) {
11837
+ result.push((point >> 18) | 240);
11838
+ result.push(((point >> 12) & 63) | 128);
11839
+ result.push(((point >> 6) & 63) | 128);
11840
+ result.push((point & 63) | 128);
11841
+ continue
11842
+ }
11843
+
11844
+ // Invalid character
11845
+ result.push(0xEF, 0xBF, 0xBD);
11846
+ }
11847
+
11848
+ return new Uint8Array(result).buffer
11849
+ };
11850
+
11851
+ function ByteData (data) {
11852
+ this.mode = mode.BYTE;
11853
+ if (typeof (data) === 'string') {
11854
+ data = encodeUtf8(data);
11855
+ }
11856
+ this.data = new Uint8Array(data);
11857
+ }
11858
+
11859
+ ByteData.getBitsLength = function getBitsLength (length) {
11860
+ return length * 8
11861
+ };
11862
+
11863
+ ByteData.prototype.getLength = function getLength () {
11864
+ return this.data.length
11865
+ };
11866
+
11867
+ ByteData.prototype.getBitsLength = function getBitsLength () {
11868
+ return ByteData.getBitsLength(this.data.length)
11869
+ };
11870
+
11871
+ ByteData.prototype.write = function (bitBuffer) {
11872
+ for (let i = 0, l = this.data.length; i < l; i++) {
11873
+ bitBuffer.put(this.data[i], 8);
11874
+ }
11875
+ };
11876
+
11877
+ var byteData = ByteData;
11878
+
11879
+ function KanjiData (data) {
11880
+ this.mode = mode.KANJI;
11881
+ this.data = data;
11882
+ }
11883
+
11884
+ KanjiData.getBitsLength = function getBitsLength (length) {
11885
+ return length * 13
11886
+ };
11887
+
11888
+ KanjiData.prototype.getLength = function getLength () {
11889
+ return this.data.length
11890
+ };
11891
+
11892
+ KanjiData.prototype.getBitsLength = function getBitsLength () {
11893
+ return KanjiData.getBitsLength(this.data.length)
11894
+ };
11895
+
11896
+ KanjiData.prototype.write = function (bitBuffer) {
11897
+ let i;
11898
+
11899
+ // In the Shift JIS system, Kanji characters are represented by a two byte combination.
11900
+ // These byte values are shifted from the JIS X 0208 values.
11901
+ // JIS X 0208 gives details of the shift coded representation.
11902
+ for (i = 0; i < this.data.length; i++) {
11903
+ let value = utils$1.toSJIS(this.data[i]);
11904
+
11905
+ // For characters with Shift JIS values from 0x8140 to 0x9FFC:
11906
+ if (value >= 0x8140 && value <= 0x9FFC) {
11907
+ // Subtract 0x8140 from Shift JIS value
11908
+ value -= 0x8140;
11909
+
11910
+ // For characters with Shift JIS values from 0xE040 to 0xEBBF
11911
+ } else if (value >= 0xE040 && value <= 0xEBBF) {
11912
+ // Subtract 0xC140 from Shift JIS value
11913
+ value -= 0xC140;
11914
+ } else {
11915
+ throw new Error(
11916
+ 'Invalid SJIS character: ' + this.data[i] + '\n' +
11917
+ 'Make sure your charset is UTF-8')
11918
+ }
11919
+
11920
+ // Multiply most significant byte of result by 0xC0
11921
+ // and add least significant byte to product
11922
+ value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff);
11923
+
11924
+ // Convert result to a 13-bit binary string
11925
+ bitBuffer.put(value, 13);
11926
+ }
11927
+ };
11928
+
11929
+ var kanjiData = KanjiData;
11930
+
11931
+ var dijkstra_1 = createCommonjsModule(function (module) {
11932
+
11933
+ /******************************************************************************
11934
+ * Created 2008-08-19.
11935
+ *
11936
+ * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.
11937
+ *
11938
+ * Copyright (C) 2008
11939
+ * Wyatt Baldwin <self@wyattbaldwin.com>
11940
+ * All rights reserved
11941
+ *
11942
+ * Licensed under the MIT license.
11943
+ *
11944
+ * http://www.opensource.org/licenses/mit-license.php
11945
+ *
11946
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11947
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11948
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
11949
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11950
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
11951
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
11952
+ * THE SOFTWARE.
11953
+ *****************************************************************************/
11954
+ var dijkstra = {
11955
+ single_source_shortest_paths: function(graph, s, d) {
11956
+ // Predecessor map for each node that has been encountered.
11957
+ // node ID => predecessor node ID
11958
+ var predecessors = {};
11959
+
11960
+ // Costs of shortest paths from s to all nodes encountered.
11961
+ // node ID => cost
11962
+ var costs = {};
11963
+ costs[s] = 0;
11964
+
11965
+ // Costs of shortest paths from s to all nodes encountered; differs from
11966
+ // `costs` in that it provides easy access to the node that currently has
11967
+ // the known shortest path from s.
11968
+ // XXX: Do we actually need both `costs` and `open`?
11969
+ var open = dijkstra.PriorityQueue.make();
11970
+ open.push(s, 0);
11971
+
11972
+ var closest,
11973
+ u, v,
11974
+ cost_of_s_to_u,
11975
+ adjacent_nodes,
11976
+ cost_of_e,
11977
+ cost_of_s_to_u_plus_cost_of_e,
11978
+ cost_of_s_to_v,
11979
+ first_visit;
11980
+ while (!open.empty()) {
11981
+ // In the nodes remaining in graph that have a known cost from s,
11982
+ // find the node, u, that currently has the shortest path from s.
11983
+ closest = open.pop();
11984
+ u = closest.value;
11985
+ cost_of_s_to_u = closest.cost;
11986
+
11987
+ // Get nodes adjacent to u...
11988
+ adjacent_nodes = graph[u] || {};
11989
+
11990
+ // ...and explore the edges that connect u to those nodes, updating
11991
+ // the cost of the shortest paths to any or all of those nodes as
11992
+ // necessary. v is the node across the current edge from u.
11993
+ for (v in adjacent_nodes) {
11994
+ if (adjacent_nodes.hasOwnProperty(v)) {
11995
+ // Get the cost of the edge running from u to v.
11996
+ cost_of_e = adjacent_nodes[v];
11997
+
11998
+ // Cost of s to u plus the cost of u to v across e--this is *a*
11999
+ // cost from s to v that may or may not be less than the current
12000
+ // known cost to v.
12001
+ cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;
12002
+
12003
+ // If we haven't visited v yet OR if the current known cost from s to
12004
+ // v is greater than the new cost we just found (cost of s to u plus
12005
+ // cost of u to v across e), update v's cost in the cost list and
12006
+ // update v's predecessor in the predecessor list (it's now u).
12007
+ cost_of_s_to_v = costs[v];
12008
+ first_visit = (typeof costs[v] === 'undefined');
12009
+ if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {
12010
+ costs[v] = cost_of_s_to_u_plus_cost_of_e;
12011
+ open.push(v, cost_of_s_to_u_plus_cost_of_e);
12012
+ predecessors[v] = u;
12013
+ }
12014
+ }
12015
+ }
12016
+ }
12017
+
12018
+ if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {
12019
+ var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');
12020
+ throw new Error(msg);
12021
+ }
12022
+
12023
+ return predecessors;
12024
+ },
12025
+
12026
+ extract_shortest_path_from_predecessor_list: function(predecessors, d) {
12027
+ var nodes = [];
12028
+ var u = d;
12029
+ while (u) {
12030
+ nodes.push(u);
12031
+ u = predecessors[u];
12032
+ }
12033
+ nodes.reverse();
12034
+ return nodes;
12035
+ },
12036
+
12037
+ find_path: function(graph, s, d) {
12038
+ var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);
12039
+ return dijkstra.extract_shortest_path_from_predecessor_list(
12040
+ predecessors, d);
12041
+ },
12042
+
12043
+ /**
12044
+ * A very naive priority queue implementation.
12045
+ */
12046
+ PriorityQueue: {
12047
+ make: function (opts) {
12048
+ var T = dijkstra.PriorityQueue,
12049
+ t = {},
12050
+ key;
12051
+ opts = opts || {};
12052
+ for (key in T) {
12053
+ if (T.hasOwnProperty(key)) {
12054
+ t[key] = T[key];
12055
+ }
12056
+ }
12057
+ t.queue = [];
12058
+ t.sorter = opts.sorter || T.default_sorter;
12059
+ return t;
12060
+ },
12061
+
12062
+ default_sorter: function (a, b) {
12063
+ return a.cost - b.cost;
12064
+ },
12065
+
12066
+ /**
12067
+ * Add a new item to the queue and ensure the highest priority element
12068
+ * is at the front of the queue.
12069
+ */
12070
+ push: function (value, cost) {
12071
+ var item = {value: value, cost: cost};
12072
+ this.queue.push(item);
12073
+ this.queue.sort(this.sorter);
12074
+ },
12075
+
12076
+ /**
12077
+ * Return the highest priority element in the queue.
12078
+ */
12079
+ pop: function () {
12080
+ return this.queue.shift();
12081
+ },
12082
+
12083
+ empty: function () {
12084
+ return this.queue.length === 0;
12085
+ }
12086
+ }
12087
+ };
12088
+
12089
+
12090
+ // node.js module exports
12091
+ {
12092
+ module.exports = dijkstra;
12093
+ }
12094
+ });
12095
+
12096
+ var segments = createCommonjsModule(function (module, exports) {
12097
+ /**
12098
+ * Returns UTF8 byte length
12099
+ *
12100
+ * @param {String} str Input string
12101
+ * @return {Number} Number of byte
12102
+ */
12103
+ function getStringByteLength (str) {
12104
+ return unescape(encodeURIComponent(str)).length
12105
+ }
12106
+
12107
+ /**
12108
+ * Get a list of segments of the specified mode
12109
+ * from a string
12110
+ *
12111
+ * @param {Mode} mode Segment mode
12112
+ * @param {String} str String to process
12113
+ * @return {Array} Array of object with segments data
12114
+ */
12115
+ function getSegments (regex, mode, str) {
12116
+ const segments = [];
12117
+ let result;
12118
+
12119
+ while ((result = regex.exec(str)) !== null) {
12120
+ segments.push({
12121
+ data: result[0],
12122
+ index: result.index,
12123
+ mode: mode,
12124
+ length: result[0].length
12125
+ });
12126
+ }
12127
+
12128
+ return segments
12129
+ }
12130
+
12131
+ /**
12132
+ * Extracts a series of segments with the appropriate
12133
+ * modes from a string
12134
+ *
12135
+ * @param {String} dataStr Input string
12136
+ * @return {Array} Array of object with segments data
12137
+ */
12138
+ function getSegmentsFromString (dataStr) {
12139
+ const numSegs = getSegments(regex.NUMERIC, mode.NUMERIC, dataStr);
12140
+ const alphaNumSegs = getSegments(regex.ALPHANUMERIC, mode.ALPHANUMERIC, dataStr);
12141
+ let byteSegs;
12142
+ let kanjiSegs;
12143
+
12144
+ if (utils$1.isKanjiModeEnabled()) {
12145
+ byteSegs = getSegments(regex.BYTE, mode.BYTE, dataStr);
12146
+ kanjiSegs = getSegments(regex.KANJI, mode.KANJI, dataStr);
12147
+ } else {
12148
+ byteSegs = getSegments(regex.BYTE_KANJI, mode.BYTE, dataStr);
12149
+ kanjiSegs = [];
12150
+ }
12151
+
12152
+ const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs);
12153
+
12154
+ return segs
12155
+ .sort(function (s1, s2) {
12156
+ return s1.index - s2.index
12157
+ })
12158
+ .map(function (obj) {
12159
+ return {
12160
+ data: obj.data,
12161
+ mode: obj.mode,
12162
+ length: obj.length
12163
+ }
12164
+ })
12165
+ }
12166
+
12167
+ /**
12168
+ * Returns how many bits are needed to encode a string of
12169
+ * specified length with the specified mode
12170
+ *
12171
+ * @param {Number} length String length
12172
+ * @param {Mode} mode Segment mode
12173
+ * @return {Number} Bit length
12174
+ */
12175
+ function getSegmentBitsLength (length, mode$1) {
12176
+ switch (mode$1) {
12177
+ case mode.NUMERIC:
12178
+ return numericData.getBitsLength(length)
12179
+ case mode.ALPHANUMERIC:
12180
+ return alphanumericData.getBitsLength(length)
12181
+ case mode.KANJI:
12182
+ return kanjiData.getBitsLength(length)
12183
+ case mode.BYTE:
12184
+ return byteData.getBitsLength(length)
12185
+ }
12186
+ }
12187
+
12188
+ /**
12189
+ * Merges adjacent segments which have the same mode
12190
+ *
12191
+ * @param {Array} segs Array of object with segments data
12192
+ * @return {Array} Array of object with segments data
12193
+ */
12194
+ function mergeSegments (segs) {
12195
+ return segs.reduce(function (acc, curr) {
12196
+ const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null;
12197
+ if (prevSeg && prevSeg.mode === curr.mode) {
12198
+ acc[acc.length - 1].data += curr.data;
12199
+ return acc
12200
+ }
12201
+
12202
+ acc.push(curr);
12203
+ return acc
12204
+ }, [])
12205
+ }
12206
+
12207
+ /**
12208
+ * Generates a list of all possible nodes combination which
12209
+ * will be used to build a segments graph.
12210
+ *
12211
+ * Nodes are divided by groups. Each group will contain a list of all the modes
12212
+ * in which is possible to encode the given text.
12213
+ *
12214
+ * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.
12215
+ * The group for '12345' will contain then 3 objects, one for each
12216
+ * possible encoding mode.
12217
+ *
12218
+ * Each node represents a possible segment.
12219
+ *
12220
+ * @param {Array} segs Array of object with segments data
12221
+ * @return {Array} Array of object with segments data
12222
+ */
12223
+ function buildNodes (segs) {
12224
+ const nodes = [];
12225
+ for (let i = 0; i < segs.length; i++) {
12226
+ const seg = segs[i];
12227
+
12228
+ switch (seg.mode) {
12229
+ case mode.NUMERIC:
12230
+ nodes.push([seg,
12231
+ { data: seg.data, mode: mode.ALPHANUMERIC, length: seg.length },
12232
+ { data: seg.data, mode: mode.BYTE, length: seg.length }
12233
+ ]);
12234
+ break
12235
+ case mode.ALPHANUMERIC:
12236
+ nodes.push([seg,
12237
+ { data: seg.data, mode: mode.BYTE, length: seg.length }
12238
+ ]);
12239
+ break
12240
+ case mode.KANJI:
12241
+ nodes.push([seg,
12242
+ { data: seg.data, mode: mode.BYTE, length: getStringByteLength(seg.data) }
12243
+ ]);
12244
+ break
12245
+ case mode.BYTE:
12246
+ nodes.push([
12247
+ { data: seg.data, mode: mode.BYTE, length: getStringByteLength(seg.data) }
12248
+ ]);
12249
+ }
12250
+ }
12251
+
12252
+ return nodes
12253
+ }
12254
+
12255
+ /**
12256
+ * Builds a graph from a list of nodes.
12257
+ * All segments in each node group will be connected with all the segments of
12258
+ * the next group and so on.
12259
+ *
12260
+ * At each connection will be assigned a weight depending on the
12261
+ * segment's byte length.
12262
+ *
12263
+ * @param {Array} nodes Array of object with segments data
12264
+ * @param {Number} version QR Code version
12265
+ * @return {Object} Graph of all possible segments
12266
+ */
12267
+ function buildGraph (nodes, version) {
12268
+ const table = {};
12269
+ const graph = { start: {} };
12270
+ let prevNodeIds = ['start'];
12271
+
12272
+ for (let i = 0; i < nodes.length; i++) {
12273
+ const nodeGroup = nodes[i];
12274
+ const currentNodeIds = [];
12275
+
12276
+ for (let j = 0; j < nodeGroup.length; j++) {
12277
+ const node = nodeGroup[j];
12278
+ const key = '' + i + j;
12279
+
12280
+ currentNodeIds.push(key);
12281
+ table[key] = { node: node, lastCount: 0 };
12282
+ graph[key] = {};
12283
+
12284
+ for (let n = 0; n < prevNodeIds.length; n++) {
12285
+ const prevNodeId = prevNodeIds[n];
12286
+
12287
+ if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {
12288
+ graph[prevNodeId][key] =
12289
+ getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -
12290
+ getSegmentBitsLength(table[prevNodeId].lastCount, node.mode);
12291
+
12292
+ table[prevNodeId].lastCount += node.length;
12293
+ } else {
12294
+ if (table[prevNodeId]) table[prevNodeId].lastCount = node.length;
12295
+
12296
+ graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +
12297
+ 4 + mode.getCharCountIndicator(node.mode, version); // switch cost
12298
+ }
12299
+ }
12300
+ }
12301
+
12302
+ prevNodeIds = currentNodeIds;
12303
+ }
12304
+
12305
+ for (let n = 0; n < prevNodeIds.length; n++) {
12306
+ graph[prevNodeIds[n]].end = 0;
12307
+ }
12308
+
12309
+ return { map: graph, table: table }
12310
+ }
12311
+
12312
+ /**
12313
+ * Builds a segment from a specified data and mode.
12314
+ * If a mode is not specified, the more suitable will be used.
12315
+ *
12316
+ * @param {String} data Input data
12317
+ * @param {Mode | String} modesHint Data mode
12318
+ * @return {Segment} Segment
12319
+ */
12320
+ function buildSingleSegment (data, modesHint) {
12321
+ let mode$1;
12322
+ const bestMode = mode.getBestModeForData(data);
12323
+
12324
+ mode$1 = mode.from(modesHint, bestMode);
12325
+
12326
+ // Make sure data can be encoded
12327
+ if (mode$1 !== mode.BYTE && mode$1.bit < bestMode.bit) {
12328
+ throw new Error('"' + data + '"' +
12329
+ ' cannot be encoded with mode ' + mode.toString(mode$1) +
12330
+ '.\n Suggested mode is: ' + mode.toString(bestMode))
12331
+ }
12332
+
12333
+ // Use Mode.BYTE if Kanji support is disabled
12334
+ if (mode$1 === mode.KANJI && !utils$1.isKanjiModeEnabled()) {
12335
+ mode$1 = mode.BYTE;
12336
+ }
12337
+
12338
+ switch (mode$1) {
12339
+ case mode.NUMERIC:
12340
+ return new numericData(data)
12341
+
12342
+ case mode.ALPHANUMERIC:
12343
+ return new alphanumericData(data)
12344
+
12345
+ case mode.KANJI:
12346
+ return new kanjiData(data)
12347
+
12348
+ case mode.BYTE:
12349
+ return new byteData(data)
12350
+ }
12351
+ }
12352
+
12353
+ /**
12354
+ * Builds a list of segments from an array.
12355
+ * Array can contain Strings or Objects with segment's info.
12356
+ *
12357
+ * For each item which is a string, will be generated a segment with the given
12358
+ * string and the more appropriate encoding mode.
12359
+ *
12360
+ * For each item which is an object, will be generated a segment with the given
12361
+ * data and mode.
12362
+ * Objects must contain at least the property "data".
12363
+ * If property "mode" is not present, the more suitable mode will be used.
12364
+ *
12365
+ * @param {Array} array Array of objects with segments data
12366
+ * @return {Array} Array of Segments
12367
+ */
12368
+ exports.fromArray = function fromArray (array) {
12369
+ return array.reduce(function (acc, seg) {
12370
+ if (typeof seg === 'string') {
12371
+ acc.push(buildSingleSegment(seg, null));
12372
+ } else if (seg.data) {
12373
+ acc.push(buildSingleSegment(seg.data, seg.mode));
12374
+ }
12375
+
12376
+ return acc
12377
+ }, [])
12378
+ };
12379
+
12380
+ /**
12381
+ * Builds an optimized sequence of segments from a string,
12382
+ * which will produce the shortest possible bitstream.
12383
+ *
12384
+ * @param {String} data Input string
12385
+ * @param {Number} version QR Code version
12386
+ * @return {Array} Array of segments
12387
+ */
12388
+ exports.fromString = function fromString (data, version) {
12389
+ const segs = getSegmentsFromString(data, utils$1.isKanjiModeEnabled());
12390
+
12391
+ const nodes = buildNodes(segs);
12392
+ const graph = buildGraph(nodes, version);
12393
+ const path = dijkstra_1.find_path(graph.map, 'start', 'end');
12394
+
12395
+ const optimizedSegs = [];
12396
+ for (let i = 1; i < path.length - 1; i++) {
12397
+ optimizedSegs.push(graph.table[path[i]].node);
12398
+ }
12399
+
12400
+ return exports.fromArray(mergeSegments(optimizedSegs))
12401
+ };
12402
+
12403
+ /**
12404
+ * Splits a string in various segments with the modes which
12405
+ * best represent their content.
12406
+ * The produced segments are far from being optimized.
12407
+ * The output of this function is only used to estimate a QR Code version
12408
+ * which may contain the data.
12409
+ *
12410
+ * @param {string} data Input string
12411
+ * @return {Array} Array of segments
12412
+ */
12413
+ exports.rawSplit = function rawSplit (data) {
12414
+ return exports.fromArray(
12415
+ getSegmentsFromString(data, utils$1.isKanjiModeEnabled())
12416
+ )
12417
+ };
12418
+ });
12419
+
12420
+ /**
12421
+ * QRCode for JavaScript
12422
+ *
12423
+ * modified by Ryan Day for nodejs support
12424
+ * Copyright (c) 2011 Ryan Day
12425
+ *
12426
+ * Licensed under the MIT license:
12427
+ * http://www.opensource.org/licenses/mit-license.php
12428
+ *
12429
+ //---------------------------------------------------------------------
12430
+ // QRCode for JavaScript
12431
+ //
12432
+ // Copyright (c) 2009 Kazuhiko Arase
12433
+ //
12434
+ // URL: http://www.d-project.com/
12435
+ //
12436
+ // Licensed under the MIT license:
12437
+ // http://www.opensource.org/licenses/mit-license.php
12438
+ //
12439
+ // The word "QR Code" is registered trademark of
12440
+ // DENSO WAVE INCORPORATED
12441
+ // http://www.denso-wave.com/qrcode/faqpatent-e.html
12442
+ //
12443
+ //---------------------------------------------------------------------
12444
+ */
12445
+
12446
+ /**
12447
+ * Add finder patterns bits to matrix
12448
+ *
12449
+ * @param {BitMatrix} matrix Modules matrix
12450
+ * @param {Number} version QR Code version
12451
+ */
12452
+ function setupFinderPattern (matrix, version) {
12453
+ const size = matrix.size;
12454
+ const pos = finderPattern.getPositions(version);
12455
+
12456
+ for (let i = 0; i < pos.length; i++) {
12457
+ const row = pos[i][0];
12458
+ const col = pos[i][1];
12459
+
12460
+ for (let r = -1; r <= 7; r++) {
12461
+ if (row + r <= -1 || size <= row + r) continue
12462
+
12463
+ for (let c = -1; c <= 7; c++) {
12464
+ if (col + c <= -1 || size <= col + c) continue
12465
+
12466
+ if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||
12467
+ (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||
12468
+ (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {
12469
+ matrix.set(row + r, col + c, true, true);
12470
+ } else {
12471
+ matrix.set(row + r, col + c, false, true);
12472
+ }
12473
+ }
12474
+ }
12475
+ }
12476
+ }
12477
+
12478
+ /**
12479
+ * Add timing pattern bits to matrix
12480
+ *
12481
+ * Note: this function must be called before {@link setupAlignmentPattern}
12482
+ *
12483
+ * @param {BitMatrix} matrix Modules matrix
12484
+ */
12485
+ function setupTimingPattern (matrix) {
12486
+ const size = matrix.size;
12487
+
12488
+ for (let r = 8; r < size - 8; r++) {
12489
+ const value = r % 2 === 0;
12490
+ matrix.set(r, 6, value, true);
12491
+ matrix.set(6, r, value, true);
12492
+ }
12493
+ }
12494
+
12495
+ /**
12496
+ * Add alignment patterns bits to matrix
12497
+ *
12498
+ * Note: this function must be called after {@link setupTimingPattern}
12499
+ *
12500
+ * @param {BitMatrix} matrix Modules matrix
12501
+ * @param {Number} version QR Code version
12502
+ */
12503
+ function setupAlignmentPattern (matrix, version) {
12504
+ const pos = alignmentPattern.getPositions(version);
12505
+
12506
+ for (let i = 0; i < pos.length; i++) {
12507
+ const row = pos[i][0];
12508
+ const col = pos[i][1];
12509
+
12510
+ for (let r = -2; r <= 2; r++) {
12511
+ for (let c = -2; c <= 2; c++) {
12512
+ if (r === -2 || r === 2 || c === -2 || c === 2 ||
12513
+ (r === 0 && c === 0)) {
12514
+ matrix.set(row + r, col + c, true, true);
12515
+ } else {
12516
+ matrix.set(row + r, col + c, false, true);
12517
+ }
12518
+ }
12519
+ }
12520
+ }
12521
+ }
12522
+
12523
+ /**
12524
+ * Add version info bits to matrix
12525
+ *
12526
+ * @param {BitMatrix} matrix Modules matrix
12527
+ * @param {Number} version QR Code version
12528
+ */
12529
+ function setupVersionInfo (matrix, version$1) {
12530
+ const size = matrix.size;
12531
+ const bits = version.getEncodedBits(version$1);
12532
+ let row, col, mod;
12533
+
12534
+ for (let i = 0; i < 18; i++) {
12535
+ row = Math.floor(i / 3);
12536
+ col = i % 3 + size - 8 - 3;
12537
+ mod = ((bits >> i) & 1) === 1;
12538
+
12539
+ matrix.set(row, col, mod, true);
12540
+ matrix.set(col, row, mod, true);
12541
+ }
12542
+ }
12543
+
12544
+ /**
12545
+ * Add format info bits to matrix
12546
+ *
12547
+ * @param {BitMatrix} matrix Modules matrix
12548
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
12549
+ * @param {Number} maskPattern Mask pattern reference value
12550
+ */
12551
+ function setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {
12552
+ const size = matrix.size;
12553
+ const bits = formatInfo.getEncodedBits(errorCorrectionLevel, maskPattern);
12554
+ let i, mod;
12555
+
12556
+ for (i = 0; i < 15; i++) {
12557
+ mod = ((bits >> i) & 1) === 1;
12558
+
12559
+ // vertical
12560
+ if (i < 6) {
12561
+ matrix.set(i, 8, mod, true);
12562
+ } else if (i < 8) {
12563
+ matrix.set(i + 1, 8, mod, true);
12564
+ } else {
12565
+ matrix.set(size - 15 + i, 8, mod, true);
12566
+ }
12567
+
12568
+ // horizontal
12569
+ if (i < 8) {
12570
+ matrix.set(8, size - i - 1, mod, true);
12571
+ } else if (i < 9) {
12572
+ matrix.set(8, 15 - i - 1 + 1, mod, true);
12573
+ } else {
12574
+ matrix.set(8, 15 - i - 1, mod, true);
12575
+ }
12576
+ }
12577
+
12578
+ // fixed module
12579
+ matrix.set(size - 8, 8, 1, true);
12580
+ }
12581
+
12582
+ /**
12583
+ * Add encoded data bits to matrix
12584
+ *
12585
+ * @param {BitMatrix} matrix Modules matrix
12586
+ * @param {Uint8Array} data Data codewords
12587
+ */
12588
+ function setupData (matrix, data) {
12589
+ const size = matrix.size;
12590
+ let inc = -1;
12591
+ let row = size - 1;
12592
+ let bitIndex = 7;
12593
+ let byteIndex = 0;
12594
+
12595
+ for (let col = size - 1; col > 0; col -= 2) {
12596
+ if (col === 6) col--;
12597
+
12598
+ while (true) {
12599
+ for (let c = 0; c < 2; c++) {
12600
+ if (!matrix.isReserved(row, col - c)) {
12601
+ let dark = false;
12602
+
12603
+ if (byteIndex < data.length) {
12604
+ dark = (((data[byteIndex] >>> bitIndex) & 1) === 1);
12605
+ }
12606
+
12607
+ matrix.set(row, col - c, dark);
12608
+ bitIndex--;
12609
+
12610
+ if (bitIndex === -1) {
12611
+ byteIndex++;
12612
+ bitIndex = 7;
12613
+ }
12614
+ }
12615
+ }
12616
+
12617
+ row += inc;
12618
+
12619
+ if (row < 0 || size <= row) {
12620
+ row -= inc;
12621
+ inc = -inc;
12622
+ break
12623
+ }
12624
+ }
12625
+ }
12626
+ }
12627
+
12628
+ /**
12629
+ * Create encoded codewords from data input
12630
+ *
12631
+ * @param {Number} version QR Code version
12632
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
12633
+ * @param {ByteData} data Data input
12634
+ * @return {Uint8Array} Buffer containing encoded codewords
12635
+ */
12636
+ function createData (version, errorCorrectionLevel, segments) {
12637
+ // Prepare data buffer
12638
+ const buffer = new bitBuffer();
12639
+
12640
+ segments.forEach(function (data) {
12641
+ // prefix data with mode indicator (4 bits)
12642
+ buffer.put(data.mode.bit, 4);
12643
+
12644
+ // Prefix data with character count indicator.
12645
+ // The character count indicator is a string of bits that represents the
12646
+ // number of characters that are being encoded.
12647
+ // The character count indicator must be placed after the mode indicator
12648
+ // and must be a certain number of bits long, depending on the QR version
12649
+ // and data mode
12650
+ // @see {@link Mode.getCharCountIndicator}.
12651
+ buffer.put(data.getLength(), mode.getCharCountIndicator(data.mode, version));
12652
+
12653
+ // add binary data sequence to buffer
12654
+ data.write(buffer);
12655
+ });
12656
+
12657
+ // Calculate required number of bits
12658
+ const totalCodewords = utils$1.getSymbolTotalCodewords(version);
12659
+ const ecTotalCodewords = errorCorrectionCode.getTotalCodewordsCount(version, errorCorrectionLevel);
12660
+ const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
12661
+
12662
+ // Add a terminator.
12663
+ // If the bit string is shorter than the total number of required bits,
12664
+ // a terminator of up to four 0s must be added to the right side of the string.
12665
+ // If the bit string is more than four bits shorter than the required number of bits,
12666
+ // add four 0s to the end.
12667
+ if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {
12668
+ buffer.put(0, 4);
12669
+ }
12670
+
12671
+ // If the bit string is fewer than four bits shorter, add only the number of 0s that
12672
+ // are needed to reach the required number of bits.
12673
+
12674
+ // After adding the terminator, if the number of bits in the string is not a multiple of 8,
12675
+ // pad the string on the right with 0s to make the string's length a multiple of 8.
12676
+ while (buffer.getLengthInBits() % 8 !== 0) {
12677
+ buffer.putBit(0);
12678
+ }
12679
+
12680
+ // Add pad bytes if the string is still shorter than the total number of required bits.
12681
+ // Extend the buffer to fill the data capacity of the symbol corresponding to
12682
+ // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)
12683
+ // and 00010001 (0x11) alternately.
12684
+ const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8;
12685
+ for (let i = 0; i < remainingByte; i++) {
12686
+ buffer.put(i % 2 ? 0x11 : 0xEC, 8);
12687
+ }
12688
+
12689
+ return createCodewords(buffer, version, errorCorrectionLevel)
12690
+ }
12691
+
12692
+ /**
12693
+ * Encode input data with Reed-Solomon and return codewords with
12694
+ * relative error correction bits
12695
+ *
12696
+ * @param {BitBuffer} bitBuffer Data to encode
12697
+ * @param {Number} version QR Code version
12698
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
12699
+ * @return {Uint8Array} Buffer containing encoded codewords
12700
+ */
12701
+ function createCodewords (bitBuffer, version, errorCorrectionLevel) {
12702
+ // Total codewords for this QR code version (Data + Error correction)
12703
+ const totalCodewords = utils$1.getSymbolTotalCodewords(version);
12704
+
12705
+ // Total number of error correction codewords
12706
+ const ecTotalCodewords = errorCorrectionCode.getTotalCodewordsCount(version, errorCorrectionLevel);
12707
+
12708
+ // Total number of data codewords
12709
+ const dataTotalCodewords = totalCodewords - ecTotalCodewords;
12710
+
12711
+ // Total number of blocks
12712
+ const ecTotalBlocks = errorCorrectionCode.getBlocksCount(version, errorCorrectionLevel);
12713
+
12714
+ // Calculate how many blocks each group should contain
12715
+ const blocksInGroup2 = totalCodewords % ecTotalBlocks;
12716
+ const blocksInGroup1 = ecTotalBlocks - blocksInGroup2;
12717
+
12718
+ const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks);
12719
+
12720
+ const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks);
12721
+ const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1;
12722
+
12723
+ // Number of EC codewords is the same for both groups
12724
+ const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1;
12725
+
12726
+ // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount
12727
+ const rs = new reedSolomonEncoder(ecCount);
12728
+
12729
+ let offset = 0;
12730
+ const dcData = new Array(ecTotalBlocks);
12731
+ const ecData = new Array(ecTotalBlocks);
12732
+ let maxDataSize = 0;
12733
+ const buffer = new Uint8Array(bitBuffer.buffer);
12734
+
12735
+ // Divide the buffer into the required number of blocks
12736
+ for (let b = 0; b < ecTotalBlocks; b++) {
12737
+ const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2;
12738
+
12739
+ // extract a block of data from buffer
12740
+ dcData[b] = buffer.slice(offset, offset + dataSize);
12741
+
12742
+ // Calculate EC codewords for this data block
12743
+ ecData[b] = rs.encode(dcData[b]);
12744
+
12745
+ offset += dataSize;
12746
+ maxDataSize = Math.max(maxDataSize, dataSize);
12747
+ }
12748
+
12749
+ // Create final data
12750
+ // Interleave the data and error correction codewords from each block
12751
+ const data = new Uint8Array(totalCodewords);
12752
+ let index = 0;
12753
+ let i, r;
12754
+
12755
+ // Add data codewords
12756
+ for (i = 0; i < maxDataSize; i++) {
12757
+ for (r = 0; r < ecTotalBlocks; r++) {
12758
+ if (i < dcData[r].length) {
12759
+ data[index++] = dcData[r][i];
12760
+ }
12761
+ }
12762
+ }
12763
+
12764
+ // Apped EC codewords
12765
+ for (i = 0; i < ecCount; i++) {
12766
+ for (r = 0; r < ecTotalBlocks; r++) {
12767
+ data[index++] = ecData[r][i];
12768
+ }
12769
+ }
12770
+
12771
+ return data
12772
+ }
12773
+
12774
+ /**
12775
+ * Build QR Code symbol
12776
+ *
12777
+ * @param {String} data Input string
12778
+ * @param {Number} version QR Code version
12779
+ * @param {ErrorCorretionLevel} errorCorrectionLevel Error level
12780
+ * @param {MaskPattern} maskPattern Mask pattern
12781
+ * @return {Object} Object containing symbol data
12782
+ */
12783
+ function createSymbol (data, version$1, errorCorrectionLevel, maskPattern$1) {
12784
+ let segments$1;
12785
+
12786
+ if (Array.isArray(data)) {
12787
+ segments$1 = segments.fromArray(data);
12788
+ } else if (typeof data === 'string') {
12789
+ let estimatedVersion = version$1;
12790
+
12791
+ if (!estimatedVersion) {
12792
+ const rawSegments = segments.rawSplit(data);
12793
+
12794
+ // Estimate best version that can contain raw splitted segments
12795
+ estimatedVersion = version.getBestVersionForData(rawSegments, errorCorrectionLevel);
12796
+ }
12797
+
12798
+ // Build optimized segments
12799
+ // If estimated version is undefined, try with the highest version
12800
+ segments$1 = segments.fromString(data, estimatedVersion || 40);
12801
+ } else {
12802
+ throw new Error('Invalid data')
12803
+ }
12804
+
12805
+ // Get the min version that can contain data
12806
+ const bestVersion = version.getBestVersionForData(segments$1, errorCorrectionLevel);
12807
+
12808
+ // If no version is found, data cannot be stored
12809
+ if (!bestVersion) {
12810
+ throw new Error('The amount of data is too big to be stored in a QR Code')
12811
+ }
12812
+
12813
+ // If not specified, use min version as default
12814
+ if (!version$1) {
12815
+ version$1 = bestVersion;
12816
+
12817
+ // Check if the specified version can contain the data
12818
+ } else if (version$1 < bestVersion) {
12819
+ throw new Error('\n' +
12820
+ 'The chosen QR Code version cannot contain this amount of data.\n' +
12821
+ 'Minimum version required to store current data is: ' + bestVersion + '.\n'
12822
+ )
12823
+ }
12824
+
12825
+ const dataBits = createData(version$1, errorCorrectionLevel, segments$1);
12826
+
12827
+ // Allocate matrix buffer
12828
+ const moduleCount = utils$1.getSymbolSize(version$1);
12829
+ const modules = new bitMatrix(moduleCount);
12830
+
12831
+ // Add function modules
12832
+ setupFinderPattern(modules, version$1);
12833
+ setupTimingPattern(modules);
12834
+ setupAlignmentPattern(modules, version$1);
12835
+
12836
+ // Add temporary dummy bits for format info just to set them as reserved.
12837
+ // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}
12838
+ // since the masking operation must be performed only on the encoding region.
12839
+ // These blocks will be replaced with correct values later in code.
12840
+ setupFormatInfo(modules, errorCorrectionLevel, 0);
12841
+
12842
+ if (version$1 >= 7) {
12843
+ setupVersionInfo(modules, version$1);
12844
+ }
12845
+
12846
+ // Add data codewords
12847
+ setupData(modules, dataBits);
12848
+
12849
+ if (isNaN(maskPattern$1)) {
12850
+ // Find best mask pattern
12851
+ maskPattern$1 = maskPattern.getBestMask(modules,
12852
+ setupFormatInfo.bind(null, modules, errorCorrectionLevel));
12853
+ }
12854
+
12855
+ // Apply mask pattern
12856
+ maskPattern.applyMask(maskPattern$1, modules);
12857
+
12858
+ // Replace format info bits with correct values
12859
+ setupFormatInfo(modules, errorCorrectionLevel, maskPattern$1);
12860
+
12861
+ return {
12862
+ modules: modules,
12863
+ version: version$1,
12864
+ errorCorrectionLevel: errorCorrectionLevel,
12865
+ maskPattern: maskPattern$1,
12866
+ segments: segments$1
12867
+ }
12868
+ }
12869
+
12870
+ /**
12871
+ * QR Code
12872
+ *
12873
+ * @param {String | Array} data Input data
12874
+ * @param {Object} options Optional configurations
12875
+ * @param {Number} options.version QR Code version
12876
+ * @param {String} options.errorCorrectionLevel Error correction level
12877
+ * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis
12878
+ */
12879
+ var create$1 = function create (data, options) {
12880
+ if (typeof data === 'undefined' || data === '') {
12881
+ throw new Error('No input text')
12882
+ }
12883
+
12884
+ let errorCorrectionLevel$1 = errorCorrectionLevel.M;
12885
+ let version$1;
12886
+ let mask;
12887
+
12888
+ if (typeof options !== 'undefined') {
12889
+ // Use higher error correction level as default
12890
+ errorCorrectionLevel$1 = errorCorrectionLevel.from(options.errorCorrectionLevel, errorCorrectionLevel.M);
12891
+ version$1 = version.from(options.version);
12892
+ mask = maskPattern.from(options.maskPattern);
12893
+
12894
+ if (options.toSJISFunc) {
12895
+ utils$1.setToSJISFunction(options.toSJISFunc);
12896
+ }
12897
+ }
12898
+
12899
+ return createSymbol(data, version$1, errorCorrectionLevel$1, mask)
12900
+ };
12901
+
12902
+ var qrcode = {
12903
+ create: create$1
12904
+ };
12905
+
12906
+ var utils = createCommonjsModule(function (module, exports) {
12907
+ function hex2rgba (hex) {
12908
+ if (typeof hex === 'number') {
12909
+ hex = hex.toString();
12910
+ }
12911
+
12912
+ if (typeof hex !== 'string') {
12913
+ throw new Error('Color should be defined as hex string')
12914
+ }
12915
+
12916
+ let hexCode = hex.slice().replace('#', '').split('');
12917
+ if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {
12918
+ throw new Error('Invalid hex color: ' + hex)
12919
+ }
12920
+
12921
+ // Convert from short to long form (fff -> ffffff)
12922
+ if (hexCode.length === 3 || hexCode.length === 4) {
12923
+ hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {
12924
+ return [c, c]
12925
+ }));
12926
+ }
12927
+
12928
+ // Add default alpha value
12929
+ if (hexCode.length === 6) hexCode.push('F', 'F');
12930
+
12931
+ const hexValue = parseInt(hexCode.join(''), 16);
12932
+
12933
+ return {
12934
+ r: (hexValue >> 24) & 255,
12935
+ g: (hexValue >> 16) & 255,
12936
+ b: (hexValue >> 8) & 255,
12937
+ a: hexValue & 255,
12938
+ hex: '#' + hexCode.slice(0, 6).join('')
12939
+ }
12940
+ }
12941
+
12942
+ exports.getOptions = function getOptions (options) {
12943
+ if (!options) options = {};
12944
+ if (!options.color) options.color = {};
12945
+
12946
+ const margin = typeof options.margin === 'undefined' ||
12947
+ options.margin === null ||
12948
+ options.margin < 0
12949
+ ? 4
12950
+ : options.margin;
12951
+
12952
+ const width = options.width && options.width >= 21 ? options.width : undefined;
12953
+ const scale = options.scale || 4;
12954
+
12955
+ return {
12956
+ width: width,
12957
+ scale: width ? 4 : scale,
12958
+ margin: margin,
12959
+ color: {
12960
+ dark: hex2rgba(options.color.dark || '#000000ff'),
12961
+ light: hex2rgba(options.color.light || '#ffffffff')
12962
+ },
12963
+ type: options.type,
12964
+ rendererOpts: options.rendererOpts || {}
12965
+ }
12966
+ };
12967
+
12968
+ exports.getScale = function getScale (qrSize, opts) {
12969
+ return opts.width && opts.width >= qrSize + opts.margin * 2
12970
+ ? opts.width / (qrSize + opts.margin * 2)
12971
+ : opts.scale
12972
+ };
12973
+
12974
+ exports.getImageWidth = function getImageWidth (qrSize, opts) {
12975
+ const scale = exports.getScale(qrSize, opts);
12976
+ return Math.floor((qrSize + opts.margin * 2) * scale)
12977
+ };
12978
+
12979
+ exports.qrToImageData = function qrToImageData (imgData, qr, opts) {
12980
+ const size = qr.modules.size;
12981
+ const data = qr.modules.data;
12982
+ const scale = exports.getScale(size, opts);
12983
+ const symbolSize = Math.floor((size + opts.margin * 2) * scale);
12984
+ const scaledMargin = opts.margin * scale;
12985
+ const palette = [opts.color.light, opts.color.dark];
12986
+
12987
+ for (let i = 0; i < symbolSize; i++) {
12988
+ for (let j = 0; j < symbolSize; j++) {
12989
+ let posDst = (i * symbolSize + j) * 4;
12990
+ let pxColor = opts.color.light;
12991
+
12992
+ if (i >= scaledMargin && j >= scaledMargin &&
12993
+ i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {
12994
+ const iSrc = Math.floor((i - scaledMargin) / scale);
12995
+ const jSrc = Math.floor((j - scaledMargin) / scale);
12996
+ pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0];
12997
+ }
12998
+
12999
+ imgData[posDst++] = pxColor.r;
13000
+ imgData[posDst++] = pxColor.g;
13001
+ imgData[posDst++] = pxColor.b;
13002
+ imgData[posDst] = pxColor.a;
13003
+ }
13004
+ }
13005
+ };
13006
+ });
13007
+
13008
+ var canvas = createCommonjsModule(function (module, exports) {
13009
+ function clearCanvas (ctx, canvas, size) {
13010
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
13011
+
13012
+ if (!canvas.style) canvas.style = {};
13013
+ canvas.height = size;
13014
+ canvas.width = size;
13015
+ canvas.style.height = size + 'px';
13016
+ canvas.style.width = size + 'px';
13017
+ }
13018
+
13019
+ function getCanvasElement () {
13020
+ try {
13021
+ return document.createElement('canvas')
13022
+ } catch (e) {
13023
+ throw new Error('You need to specify a canvas element')
13024
+ }
13025
+ }
13026
+
13027
+ exports.render = function render (qrData, canvas, options) {
13028
+ let opts = options;
13029
+ let canvasEl = canvas;
13030
+
13031
+ if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
13032
+ opts = canvas;
13033
+ canvas = undefined;
13034
+ }
13035
+
13036
+ if (!canvas) {
13037
+ canvasEl = getCanvasElement();
13038
+ }
13039
+
13040
+ opts = utils.getOptions(opts);
13041
+ const size = utils.getImageWidth(qrData.modules.size, opts);
13042
+
13043
+ const ctx = canvasEl.getContext('2d');
13044
+ const image = ctx.createImageData(size, size);
13045
+ utils.qrToImageData(image.data, qrData, opts);
13046
+
13047
+ clearCanvas(ctx, canvasEl, size);
13048
+ ctx.putImageData(image, 0, 0);
13049
+
13050
+ return canvasEl
13051
+ };
13052
+
13053
+ exports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {
13054
+ let opts = options;
13055
+
13056
+ if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
13057
+ opts = canvas;
13058
+ canvas = undefined;
13059
+ }
13060
+
13061
+ if (!opts) opts = {};
13062
+
13063
+ const canvasEl = exports.render(qrData, canvas, opts);
13064
+
13065
+ const type = opts.type || 'image/png';
13066
+ const rendererOpts = opts.rendererOpts || {};
13067
+
13068
+ return canvasEl.toDataURL(type, rendererOpts.quality)
13069
+ };
13070
+ });
13071
+
13072
+ function getColorAttrib (color, attrib) {
13073
+ const alpha = color.a / 255;
13074
+ const str = attrib + '="' + color.hex + '"';
13075
+
13076
+ return alpha < 1
13077
+ ? str + ' ' + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"'
13078
+ : str
13079
+ }
13080
+
13081
+ function svgCmd (cmd, x, y) {
13082
+ let str = cmd + x;
13083
+ if (typeof y !== 'undefined') str += ' ' + y;
13084
+
13085
+ return str
13086
+ }
13087
+
13088
+ function qrToPath (data, size, margin) {
13089
+ let path = '';
13090
+ let moveBy = 0;
13091
+ let newRow = false;
13092
+ let lineLength = 0;
13093
+
13094
+ for (let i = 0; i < data.length; i++) {
13095
+ const col = Math.floor(i % size);
13096
+ const row = Math.floor(i / size);
13097
+
13098
+ if (!col && !newRow) newRow = true;
13099
+
13100
+ if (data[i]) {
13101
+ lineLength++;
13102
+
13103
+ if (!(i > 0 && col > 0 && data[i - 1])) {
13104
+ path += newRow
13105
+ ? svgCmd('M', col + margin, 0.5 + row + margin)
13106
+ : svgCmd('m', moveBy, 0);
13107
+
13108
+ moveBy = 0;
13109
+ newRow = false;
13110
+ }
13111
+
13112
+ if (!(col + 1 < size && data[i + 1])) {
13113
+ path += svgCmd('h', lineLength);
13114
+ lineLength = 0;
13115
+ }
13116
+ } else {
13117
+ moveBy++;
13118
+ }
13119
+ }
13120
+
13121
+ return path
13122
+ }
13123
+
13124
+ var render = function render (qrData, options, cb) {
13125
+ const opts = utils.getOptions(options);
13126
+ const size = qrData.modules.size;
13127
+ const data = qrData.modules.data;
13128
+ const qrcodesize = size + opts.margin * 2;
13129
+
13130
+ const bg = !opts.color.light.a
13131
+ ? ''
13132
+ : '<path ' + getColorAttrib(opts.color.light, 'fill') +
13133
+ ' d="M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z"/>';
13134
+
13135
+ const path =
13136
+ '<path ' + getColorAttrib(opts.color.dark, 'stroke') +
13137
+ ' d="' + qrToPath(data, size, opts.margin) + '"/>';
13138
+
13139
+ const viewBox = 'viewBox="' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '"';
13140
+
13141
+ const width = !opts.width ? '' : 'width="' + opts.width + '" height="' + opts.width + '" ';
13142
+
13143
+ const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path + '</svg>\n';
13144
+
13145
+ if (typeof cb === 'function') {
13146
+ cb(null, svgTag);
13147
+ }
13148
+
13149
+ return svgTag
13150
+ };
13151
+
13152
+ var svgTag = {
13153
+ render: render
13154
+ };
13155
+
13156
+ function renderCanvas (renderFunc, canvas, text, opts, cb) {
13157
+ const args = [].slice.call(arguments, 1);
13158
+ const argsNum = args.length;
13159
+ const isLastArgCb = typeof args[argsNum - 1] === 'function';
13160
+
13161
+ if (!isLastArgCb && !canPromise()) {
13162
+ throw new Error('Callback required as last argument')
13163
+ }
13164
+
13165
+ if (isLastArgCb) {
13166
+ if (argsNum < 2) {
13167
+ throw new Error('Too few arguments provided')
13168
+ }
13169
+
13170
+ if (argsNum === 2) {
13171
+ cb = text;
13172
+ text = canvas;
13173
+ canvas = opts = undefined;
13174
+ } else if (argsNum === 3) {
13175
+ if (canvas.getContext && typeof cb === 'undefined') {
13176
+ cb = opts;
13177
+ opts = undefined;
13178
+ } else {
13179
+ cb = opts;
13180
+ opts = text;
13181
+ text = canvas;
13182
+ canvas = undefined;
13183
+ }
13184
+ }
13185
+ } else {
13186
+ if (argsNum < 1) {
13187
+ throw new Error('Too few arguments provided')
13188
+ }
13189
+
13190
+ if (argsNum === 1) {
13191
+ text = canvas;
13192
+ canvas = opts = undefined;
13193
+ } else if (argsNum === 2 && !canvas.getContext) {
13194
+ opts = text;
13195
+ text = canvas;
13196
+ canvas = undefined;
13197
+ }
13198
+
13199
+ return new Promise(function (resolve, reject) {
13200
+ try {
13201
+ const data = qrcode.create(text, opts);
13202
+ resolve(renderFunc(data, canvas, opts));
13203
+ } catch (e) {
13204
+ reject(e);
13205
+ }
13206
+ })
13207
+ }
13208
+
13209
+ try {
13210
+ const data = qrcode.create(text, opts);
13211
+ cb(null, renderFunc(data, canvas, opts));
13212
+ } catch (e) {
13213
+ cb(e);
13214
+ }
13215
+ }
13216
+
13217
+ var create = qrcode.create;
13218
+ var toCanvas = renderCanvas.bind(null, canvas.render);
13219
+ var toDataURL = renderCanvas.bind(null, canvas.renderToDataURL);
13220
+
13221
+ // only svg for now.
13222
+ var toString_1 = renderCanvas.bind(null, function (data, _, opts) {
13223
+ return svgTag.render(data, opts)
13224
+ });
13225
+
13226
+ var browser = {
13227
+ create: create,
13228
+ toCanvas: toCanvas,
13229
+ toDataURL: toDataURL,
13230
+ toString: toString_1
13231
+ };
13232
+
13233
+ const stzhUploadCss = ":host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;}:host[hidden]{display:none}:host::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}stzh-upload{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;--list-grid-template-areas:var(\n --stzh-upload-list-grid-template-areas,\n \"list list list list\"\n );--list-grid-template-columns:var(\n --stzh-upload-list-grid-template-columns,\n repeat(4, minmax(0, 1fr))\n )}stzh-upload[hidden]{display:none}stzh-upload::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}stzh-upload::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}stzh-upload *,stzh-upload *::before,stzh-upload *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}stzh-upload .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}stzh-upload .stzh-fylingfocus-focused{outline-style:none !important}stzh-upload .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}@media screen and (min-width: 600px){stzh-upload{--list-grid-template-areas:var(\n --stzh-upload-list-grid-template-areas,\n \"list list list .\"\n )}}@media screen and (min-width: 900px){stzh-upload{--list-grid-template-areas:var(\n --stzh-upload-list-grid-template-areas,\n \"list list list list list . . .\"\n );--list-grid-template-columns:var(\n --stzh-upload-list-grid-template-columns,\n repeat(8, minmax(0, 1fr))\n )}}stzh-upload[disabled]:not([disabled=false]){--description-color:var(--stzh-color-grey70)}.stzh-upload{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);position:relative;color:var(--stzh-color-grey70);box-sizing:border-box;display:flex;flex-direction:column;}.stzh-upload__marker-symbol{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-upload__marker-text{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-upload__description-wrapper{display:flex;flex-direction:column-reverse;min-height:var(--description-min-height, var(--stzh-description-min-height, none))}.stzh-upload__error,.stzh-upload__description{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height)}.stzh-upload__error{color:var(--stzh-color-error60)}.stzh-upload__error-list{list-style:none;margin:0;padding:0}.stzh-upload__description{display:flex;align-items:flex-start;color:var(--stzh-input-description-color, var(--description-color, var(--stzh-color-coolgrey70)));transition:color var(--stzh-base-transition-animation-speed)}.stzh-upload__description-long{margin-right:var(--stzh-space-xxsmall);margin-top:0.125rem}@supports (font: -apple-system-body) and (-webkit-appearance: none){.stzh-upload__description-long{margin-top:0}}.stzh-upload__description-long-popover{--width:auto;--max-width:27.3125rem}.stzh-upload__description-long-button{display:flex;justify-content:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer}.stzh-upload stzh-icon.stzh-upload__description-long-icon{--size:var(--stzh-icon-size-xsmall)}.stzh-upload--has-error .stzh-upload__error,.stzh-upload--has-description .stzh-upload__description{margin-top:var(--stzh-space-xxxsmall)}.stzh-upload__label{font-family:var(--stzh-font-family-title);font-weight:var(--stzh-font-weight-title);font-style:var(--stzh-font-style-title);font-size:var(--stzh-font-curve-h4-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-h4-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-h4-default-text-letter-spacing);color:var(--stzh-heading-color);margin-bottom:var(--stzh-space-small)}@media screen and (min-width: 600px){.stzh-upload__label{font-size:var(--stzh-font-curve-h4-small-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-h4-small-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-h4-small-text-letter-spacing)}}@media screen and (min-width: 1260px){.stzh-upload__label{font-size:var(--stzh-font-curve-h4-large-font-size, var(--stzh-font-deci-font-size));line-height:var(--stzh-font-curve-h4-large-text-line-height, var(--stzh-font-deci-text-line-height));letter-spacing:var(--stzh-font-curve-h4-large-text-letter-spacing)}}@media screen and (min-width: 1600px){.stzh-upload__label{font-size:var(--stzh-font-curve-h4-ultra-font-size, var(--stzh-font-deca-font-size));line-height:var(--stzh-font-curve-h4-ultra-text-line-height, var(--stzh-font-deca-text-line-height));letter-spacing:var(--stzh-font-curve-h4-ultra-text-letter-spacing, var(--stzh-font-deca-text-letter-spacing))}}.stzh-upload__clickarea{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);padding:var(--stzh-space-xlarge);display:flex;flex-direction:column;align-items:center;gap:var(--stzh-space-medium);text-align:center;border:0.0625rem solid var(--stzh-color-black);background-color:var(--stzh-color-grey10);border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABMSURBVHgB7dexCgAQEIDhO2X2ih7NK5oNTEo3kFI3+L+Z/BnkNMXSZVFbVtmw663b/UGc6Sw6lb82z3W/AQDgJSSAAAIAgP+Afj8dD2mcJJvEMWjkAAAAAElFTkSuQmCC');border-image-slice:8;border-image-width:0.5rem;border-image-repeat:round;transition:background-color var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 900px){.stzh-upload__clickarea{padding:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-upload__clickarea{padding:var(--stzh-space-xxxlarge)}}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB5SURBVHgB7dsxCoQwFEXRl4Gp3aJLc4vWFtpbaCGC8M5ZQEIu/CYkY/ovey6s2zzywN36d97e/5dyAqTcOM/I05n7uvN5jUDK1QcAAAAA+rgTTDkBUk6AlBMg5QRIOQFSToCUEyAAAAAAZbwPSDkBUm74O1xOgJQ7AMC9JLtRTkNkAAAAAElFTkSuQmCC');border-image-slice:16}}.stzh-upload__heading-wrapper{width:100%;font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);display:flex;align-items:flex-start;gap:var(--stzh-space-medium);color:var(--stzh-color-grey90);transition:color var(--stzh-base-transition-animation-speed)}.stzh-upload__heading-inner-wrapper{width:100%;display:flex;flex-direction:column;align-items:center;gap:var(--stzh-space-xsmall)}.stzh-upload__buttons-wrapper{display:flex;flex-direction:column;gap:var(--stzh-space-medium);width:100%}@media screen and (min-width: 900px){.stzh-upload__buttons-wrapper{flex-direction:row;justify-content:center}}.stzh-upload__button,.stzh-upload__button-scan{width:100%}.stzh-upload__hint-wrapper{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);display:flex;align-items:center;gap:var(--stzh-space-xsmall);color:var(--stzh-color-secondary60)}.stzh-upload__instructions{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height)}.stzh-upload stzh-icon.stzh-upload__delete-icon{display:none}.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter);column-gap:var(--stzh-grid-gutter);display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));grid-template-areas:var(--list-grid-template-areas);grid-template-columns:var(--list-grid-template-columns)}@media screen and (min-width: 600px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-small);column-gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-medium);column-gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 1260px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-large);column-gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 1600px){.stzh-upload__previews-wrapper{-moz-column-gap:var(--stzh-grid-gutter-ultra);column-gap:var(--stzh-grid-gutter-ultra)}}@media screen and (min-width: 900px){.stzh-upload__previews-wrapper{grid-template-columns:repeat(8, minmax(0, 1fr))}}@media screen and (min-width: 1260px){.stzh-upload__previews-wrapper{grid-template-columns:repeat(12, minmax(0, 1fr))}}.stzh-upload__previews-inner-wrapper{grid-area:list}.stzh-upload__preview{padding-top:var(--stzh-space-xsmall);padding-bottom:var(--stzh-space-xsmall);display:flex;align-items:center}@media screen and (min-width: 900px){.stzh-upload__preview{padding-top:var(--stzh-space-small)}}@media screen and (min-width: 1260px){.stzh-upload__preview{padding-top:var(--stzh-space-medium)}}@media screen and (min-width: 900px){.stzh-upload__preview{padding-bottom:var(--stzh-space-small)}}@media screen and (min-width: 1260px){.stzh-upload__preview{padding-bottom:var(--stzh-space-medium)}}.stzh-upload__preview.dz-error .stzh-upload__title,.stzh-upload__preview.dz-error .stzh-upload__link[href]:not([href=\"\"]),.stzh-upload__preview.dz-error .stzh-upload__link[href]:not([href=\"\"]):hover{color:var(--stzh-color-error60)}.stzh-upload__preview.dz-error .stzh-upload__error-message{display:block}.stzh-upload__preview.dz-error .stzh-upload__meta{display:none}.stzh-upload__preview.dz-complete:not(.dz-error) stzh-icon.stzh-upload__delete-icon-error{display:none}.stzh-upload__preview.dz-complete:not(.dz-error) stzh-icon.stzh-upload__delete-icon{display:inline-flex}.stzh-upload__preview.dz-complete .stzh-upload__info-wrapper-processing{display:none}.stzh-upload__preview.dz-complete .stzh-upload__info-wrapper-complete{display:flex}.stzh-upload__preview.dz-empty .stzh-upload__separator{display:none}.stzh-upload__preview.dz-empty .stzh-upload__size{display:none}.stzh-upload__details{flex-grow:1;display:flex;overflow:hidden}.stzh-upload__info-wrapper{flex-grow:1;display:flex;overflow:hidden}.stzh-upload__info-wrapper-processing,.stzh-upload__info-wrapper-complete{flex-grow:1;display:flex;flex-direction:column;justify-content:center;overflow:hidden}.stzh-upload__info-wrapper-complete{display:none}.stzh-upload__actions{flex-shrink:0;display:flex;align-items:center}.stzh-upload__actions:not(:empty){margin-left:var(--stzh-space-xsmall)}.stzh-upload__infos{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);display:flex;justify-content:space-between;align-items:center}.stzh-upload__title,.stzh-upload__subtitle{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.stzh-upload__title{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing)}.stzh-upload__link[href]:not([href=\"\"]){color:var(--stzh-link-color)}.stzh-upload__link[href]:not([href=\"\"]):hover{color:var(--stzh-link-hover-color)}.stzh-upload__meta{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);letter-spacing:0.01em;display:flex;align-items:center;gap:var(--stzh-space-xsmall)}.stzh-upload__info-wrapper-processing .stzh-upload__meta{display:none}.stzh-upload__size strong{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-upload__image{display:none}.stzh-upload__progress{display:block;height:0.375rem;background-color:var(--stzh-color-black20op);margin-top:var(--stzh-space-xsmall)}.stzh-upload__progress-bar{display:block;height:100%;width:0;background:var(--stzh-color-secondary40)}.stzh-upload__progress-text{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);letter-spacing:0.01em;margin-left:var(--stzh-space-medium);font-variant-numeric:tabular-nums}.stzh-upload__separator{width:0.0625rem;height:calc(100% - 0.25rem);background-color:currentColor}.stzh-upload__extension{text-transform:uppercase}.stzh-upload__extension:empty+.stzh-upload__separator{display:none}.stzh-upload__error-message{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);letter-spacing:0.01em;color:var(--stzh-color-error60);transition:color var(--stzh-base-transition-animation-speed);display:none}.stzh-upload.dz-started .stzh-upload__errors,.stzh-upload:has(.stzh-upload__preview) .stzh-upload__errors{margin-top:var(--stzh-space-medium)}.stzh-upload.dz-drag-hover .stzh-upload__clickarea{background-color:var(--stzh-color-secondary10);border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABMSURBVHgB7ddBCgAQEEDRGa7iRs7pRq4iVkqzIKVm4b81+VnIaMy1y6KVpLJh11u3+4M401l0Kn9tnut+AwDAS0gAAQQAAP8B/X46HlNzJxHDedWMAAAAAElFTkSuQmCC')}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.stzh-upload.dz-drag-hover .stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB5SURBVHgB7dvBCYQwFEXRl5lW7Mg67chWRPcudCGC8M4pICEX/iYk4z+vey5syzTywN36d97e/5dyAqTcOM/I05n7uvN5jUDK1QcAAAAA+rgTTDkBUk6AlBMg5QRIOQFSToCUEyAAAAAAZbwPSDkBUm74O1xOgJQ7AO1EJzEUHPSNAAAAAElFTkSuQmCC')}}.stzh-upload.dz-drag-hover .stzh-upload__heading-wrapper{color:var(--stzh-color-primary70)}.stzh-upload--has-hidden-progress .stzh-upload__progress,.stzh-upload--has-hidden-progress .stzh-upload__progress-text,.stzh-upload--has-hidden-progress-while-idle .stzh-upload__preview:not(.dz-processing) .stzh-upload__progress,.stzh-upload--has-hidden-progress-while-idle .stzh-upload__preview:not(.dz-processing) .stzh-upload__progress-text{display:none}.stzh-upload--has-hidden-progress .stzh-upload__info-wrapper-processing .stzh-upload__meta,.stzh-upload--has-hidden-progress-while-idle .stzh-upload__preview:not(.dz-processing) .stzh-upload__info-wrapper-processing .stzh-upload__meta{display:flex}.stzh-upload--is-invalid .stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABNSURBVHgB7dcxDgAQDEDRlt0p3P9ETmEXJol0IBJJB//NxI9BVEtMXRa5VZUNu9663R/Emc6iU/lr81z3GwAAXkICCCAAAPgP6PfT8QDnDCW4JpVRXgAAAABJRU5ErkJggg==')}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){.stzh-upload--is-invalid .stzh-upload__clickarea{border-image-source:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB5SURBVHgB7duxCYUwGIXRm/d6p3D/iZzCXrS30EIE4Z4zQEI++JuQjOU/7bkwb+vIA3fr33l7/1/KCZBy4zwjT2fu687nNQIpVx8AAAAA6ONOMOUESDkBUk6AlBMg5QRIOQFSToAAAAAAlPE+IOUESLnh73A5AVLuAFA3JdhPogvLAAAAAElFTkSuQmCC')}}.stzh-upload--has-error .stzh-upload__error,.stzh-upload--has-description .stzh-upload__description{margin-top:var(--stzh-space-small)}.stzh-upload--is-disabled .stzh-upload__clickarea{cursor:not-allowed;background-color:var(--stzh-color-grey10)}.stzh-upload-photographing__info:not(:last-child){padding-bottom:var(--stzh-space-xxlarge)}@media screen and (min-width: 900px){.stzh-upload-photographing__info:not(:last-child){padding-bottom:var(--stzh-space-xxxlarge)}}@media screen and (min-width: 1260px){.stzh-upload-photographing__info:not(:last-child){padding-bottom:var(--stzh-space-xxxxlarge)}}.stzh-upload-photographing__text-qrcode{display:grid;grid-template-columns:1fr auto;gap:var(--stzh-space-large)}.stzh-upload-photographing-qrcode{width:7.5rem;height:7.5rem}@media screen and (min-width: 1260px){.stzh-upload-photographing-qrcode{width:8.75rem;height:8.75rem}}.stzh-upload-photographing-link{margin-top:var(--stzh-space-medium);word-break:break-word}@media screen and (min-width: 900px){.stzh-upload-photographing-link{margin-top:var(--stzh-space-large)}}.stzh-upload-photographing__back-button{margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-upload-photographing__back-button{margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-upload-photographing__back-button{margin-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-upload-photographing__back-button{margin-bottom:var(--stzh-space-xxlarge)}}";
10360
13234
 
10361
13235
  window.Dropzone.autoDiscover = false;
10362
13236
  const ATTR_NAME = "data-dz-name";
@@ -10392,9 +13266,35 @@ const StzhUpload = class {
10392
13266
  this.stzhComplete = createEvent(this, "stzhComplete", 7);
10393
13267
  this.stzhCompleteMultiple = createEvent(this, "stzhCompleteMultiple", 7);
10394
13268
  this._existingFiles = [];
13269
+ this.PHOTOGRAPHING_BASE_URL = "/appl/mobiscan/rs";
13270
+ this.PHOTOGRAPHING_ENDPOINTS = {
13271
+ PING: "/ping",
13272
+ URL: "/url",
13273
+ IMAGE: "/image",
13274
+ CONFIG: "/config",
13275
+ AUTH: "/auth",
13276
+ };
10395
13277
  this.handleReset = () => {
10396
13278
  this.removeAllFiles(true);
10397
13279
  };
13280
+ this.closePhotographingWebsocketConnection = () => {
13281
+ this.photographingWebsocket.close();
13282
+ };
13283
+ this.onButtonScanClick = event => {
13284
+ event.preventDefault();
13285
+ event.stopPropagation();
13286
+ this.photographingOverlayElement.show().then();
13287
+ if (this.isPhotographingAvailable) {
13288
+ this.startPhotographingUserSession()
13289
+ .then()
13290
+ .catch(photographingUserSessionException => {
13291
+ console.error("photographingUserSessionException", photographingUserSessionException);
13292
+ });
13293
+ }
13294
+ };
13295
+ this.closePhotographingOverlay = async () => {
13296
+ this.photographingOverlayElement.hide().catch();
13297
+ };
10398
13298
  this.filesize = function (size) {
10399
13299
  let selectedSize = 0;
10400
13300
  let selectedUnit = "b";
@@ -10422,6 +13322,8 @@ const StzhUpload = class {
10422
13322
  this.heading = "";
10423
13323
  this.description = "";
10424
13324
  this.button = "";
13325
+ this.buttonScan = "";
13326
+ this.photographingEnabled = false;
10425
13327
  this.url = "";
10426
13328
  this.method = "post";
10427
13329
  this.withCredentials = false;
@@ -10456,6 +13358,13 @@ const StzhUpload = class {
10456
13358
  this.hiddenInputContainer = undefined;
10457
13359
  this.preventHiddenInputClear = false;
10458
13360
  this.localization = undefined;
13361
+ this.environment = undefined;
13362
+ this.isPhotographingAvailable = false;
13363
+ this.photographingUrlDetails = undefined;
13364
+ this.photographingHost = undefined;
13365
+ this.photographingConfig = undefined;
13366
+ this.photographingWebsocket = undefined;
13367
+ this.photographingToken = undefined;
10459
13368
  }
10460
13369
  resetListener(event) {
10461
13370
  if (event.target.contains(this.element)) {
@@ -10526,6 +13435,164 @@ const StzhUpload = class {
10526
13435
  async removeAllFiles(cancelIfNecessary = false, force = false) {
10527
13436
  return this.dropzone.removeAllFiles(cancelIfNecessary, force);
10528
13437
  }
13438
+ async getToken() {
13439
+ if (this.photographingToken &&
13440
+ this.photographingToken.access_token &&
13441
+ Date.now() < this.photographingToken.expires_in) {
13442
+ return this.photographingToken;
13443
+ }
13444
+ else {
13445
+ return await this.requestPhotographingToken();
13446
+ }
13447
+ }
13448
+ async requestPhotographingToken() {
13449
+ try {
13450
+ const response = await fetch(`${this.photographingHost}${this.PHOTOGRAPHING_BASE_URL}${this.PHOTOGRAPHING_ENDPOINTS.AUTH}`);
13451
+ if (!response.ok) {
13452
+ throw new Error("Token retrieval failed");
13453
+ }
13454
+ const parsedResponse = await response.json();
13455
+ this.photographingToken = {
13456
+ access_token: parsedResponse.access_token,
13457
+ expires_in: Date.now() + parsedResponse.expires_in * 1000,
13458
+ };
13459
+ return this.photographingToken;
13460
+ }
13461
+ catch (error) {
13462
+ console.error("Token retrieval failed", error);
13463
+ throw new Error("Token retrieval failed");
13464
+ }
13465
+ }
13466
+ async initializePhotographingWithEnvironment(environment) {
13467
+ this.photographingHost = this.getPhotographingHostForEnvironment(environment);
13468
+ await this.setPhotographingConfig();
13469
+ if (this.photographingConfig) {
13470
+ await this.checkPhotographingAvailability();
13471
+ }
13472
+ }
13473
+ async startPhotographingUserSession() {
13474
+ try {
13475
+ const response = await fetch(`${this.photographingConfig.publicEndpoint}${this.PHOTOGRAPHING_ENDPOINTS.URL}`, await this.getPhotographingHttpOptionsWithToken());
13476
+ if (!response.ok) ;
13477
+ else {
13478
+ const url = await response.json();
13479
+ const urlObject = new URL(url.url);
13480
+ const params = new URLSearchParams(urlObject.search);
13481
+ this.photographingUrlDetails = {
13482
+ url: url.url,
13483
+ userId: params.get("id"),
13484
+ };
13485
+ try {
13486
+ await browser.toCanvas(this.photographingQrcodeElement, url.url);
13487
+ }
13488
+ catch (error) {
13489
+ console.error("Error generating QR code:", error);
13490
+ }
13491
+ await this.establishPhotographingWebsocketConnection();
13492
+ }
13493
+ }
13494
+ catch (startPhotographingUserSessionException) {
13495
+ console.error(`StzhUpload.startPhotographingUserSession() - startPhotographingUserSessionException:`, startPhotographingUserSessionException);
13496
+ }
13497
+ }
13498
+ async retreivePhotographingPdf() {
13499
+ try {
13500
+ const response = await fetch(`${this.photographingConfig.publicEndpoint}${this.PHOTOGRAPHING_ENDPOINTS.IMAGE}/retreive-pdf?id=${this.photographingUrlDetails.userId}`, await this.getPhotographingHttpOptionsWithToken());
13501
+ if (!response.ok) {
13502
+ console.error(`StzhUpload.retreivePhotographingPdf() - HTTP error! status: ${response.status}`);
13503
+ }
13504
+ else {
13505
+ const parsedResponse = await response.json();
13506
+ const file = await this.fetchFile(parsedResponse.downloadLink);
13507
+ this.dropzone.addFile(file);
13508
+ await this.closePhotographingOverlay();
13509
+ }
13510
+ }
13511
+ catch (retreivePhotographingPdfException) {
13512
+ console.error(`StzhUpload.retreivePhotographingPdf() - retreivePhotographingPdfException:`, retreivePhotographingPdfException);
13513
+ }
13514
+ }
13515
+ async fetchFile(url) {
13516
+ const response = await fetch(url);
13517
+ const blob = await response.blob();
13518
+ const fileName = url.split("/").pop();
13519
+ const cleanFileName = fileName.split("?")[0];
13520
+ if (blob.type === "application/octet-stream") {
13521
+ return new File([blob], cleanFileName, { type: "application/pdf" });
13522
+ }
13523
+ return new File([blob], cleanFileName, { type: blob.type });
13524
+ }
13525
+ async establishPhotographingWebsocketConnection() {
13526
+ this.photographingWebsocket = new WebSocket(`${this.photographingConfig.wsClientUrl}${this.photographingUrlDetails.userId}`, ["chat", (await this.getToken()).access_token]);
13527
+ this.photographingWebsocket.onopen = () => {
13528
+ setInterval(() => {
13529
+ this.sendPhotographingWebsocketMessage("Ping");
13530
+ }, 20000);
13531
+ };
13532
+ this.photographingWebsocket.onmessage = async (event) => {
13533
+ const message = event.data;
13534
+ if (message === "retreivePdf") {
13535
+ await this.retreivePhotographingPdf();
13536
+ }
13537
+ };
13538
+ this.photographingWebsocket.onerror = error => {
13539
+ console.error("WebSocket error: ", error);
13540
+ };
13541
+ }
13542
+ sendPhotographingWebsocketMessage(message) {
13543
+ this.photographingWebsocket.send(message);
13544
+ }
13545
+ async getPhotographingHttpOptionsWithToken() {
13546
+ const token = await this.getToken();
13547
+ return {
13548
+ headers: {
13549
+ Authorization: `Bearer ${token.access_token}`,
13550
+ },
13551
+ };
13552
+ }
13553
+ async checkPhotographingAvailability() {
13554
+ try {
13555
+ const response = await fetch(`${this.photographingConfig.publicEndpoint}${this.PHOTOGRAPHING_ENDPOINTS.PING}`, await this.getPhotographingHttpOptionsWithToken());
13556
+ if (!response.ok) {
13557
+ console.error(`StzhUpload.isAvailable() - HTTP error! status: ${response.status}`);
13558
+ this.isPhotographingAvailable = false;
13559
+ }
13560
+ else {
13561
+ this.isPhotographingAvailable = true;
13562
+ }
13563
+ }
13564
+ catch (isAvailableException) {
13565
+ console.error(`StzhUpload.isAvailable() - isAvailableException:`, isAvailableException);
13566
+ this.isPhotographingAvailable = false;
13567
+ }
13568
+ }
13569
+ async setPhotographingConfig() {
13570
+ try {
13571
+ const response = await fetch(`${this.photographingHost}${this.PHOTOGRAPHING_BASE_URL}${this.PHOTOGRAPHING_ENDPOINTS.CONFIG}`);
13572
+ if (!response.ok) {
13573
+ console.error(`StzhUpload.getConfig() - HTTP error! status: ${response.status}`);
13574
+ }
13575
+ else {
13576
+ this.photographingConfig = await response.json();
13577
+ }
13578
+ }
13579
+ catch (getConfigException) {
13580
+ console.error(`StzhUpload.getConfig() - getConfigException:`, getConfigException);
13581
+ }
13582
+ }
13583
+ getPhotographingHostForEnvironment(environment) {
13584
+ switch (environment) {
13585
+ case "DEV":
13586
+ return "https://www.test.stadt-zuerich.loc";
13587
+ case "UAT":
13588
+ return "https://www.integ.stadt-zuerich.ch";
13589
+ case "PROD":
13590
+ return "https://www.stadt-zuerich.ch";
13591
+ case "UNKNOWN":
13592
+ this.PHOTOGRAPHING_BASE_URL = `/stzh-components/assets/mock${this.PHOTOGRAPHING_BASE_URL}`;
13593
+ return `${window.location.origin}`;
13594
+ }
13595
+ }
10529
13596
  async componentWillLoad() {
10530
13597
  this.uploadId = `stzh-upload-${uploadCounter++}`;
10531
13598
  this.existingFilesWatcher(this.existingFiles);
@@ -10533,6 +13600,12 @@ const StzhUpload = class {
10533
13600
  if (!this.localization) {
10534
13601
  this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, "upload");
10535
13602
  }
13603
+ this.environment = getStzhEnvironment();
13604
+ if (this.photographingEnabled) {
13605
+ this.initializePhotographingWithEnvironment(this.environment).catch(initializePhotographingWithEnvironmentException => {
13606
+ console.error("initializePhotographingWithEnvironmentException", initializePhotographingWithEnvironmentException);
13607
+ });
13608
+ }
10536
13609
  }
10537
13610
  componentDidRender() {
10538
13611
  if (this.dropzone) {
@@ -10593,6 +13666,24 @@ const StzhUpload = class {
10593
13666
  dictResponseError: this.localization.responseError,
10594
13667
  dictInvalidFileType: this.localization.invalidFileType,
10595
13668
  dictFileTooBig: this.localization.fileTooBig,
13669
+ // Called when a file is dropped to the dropzone
13670
+ // Receives `event`
13671
+ drop: e => {
13672
+ var _a;
13673
+ // Merge files in hidden input.
13674
+ if (this.preventHiddenInputClear) {
13675
+ const hiddenFileInput = (_a = this.hiddenInputContainerElement) === null || _a === void 0 ? void 0 : _a.querySelector("input");
13676
+ const dataTransfer = new DataTransfer();
13677
+ for (let i = 0; i < hiddenFileInput.files.length; i++) {
13678
+ dataTransfer.items.add(hiddenFileInput.files[i]);
13679
+ }
13680
+ for (const file of e.dataTransfer.files) {
13681
+ dataTransfer.items.add(file);
13682
+ }
13683
+ hiddenFileInput.files = dataTransfer.files;
13684
+ }
13685
+ return this.element.classList.remove("dz-drag-hover");
13686
+ },
10596
13687
  // Called when a file is added to the queue
10597
13688
  // Receives `file`
10598
13689
  // Taken from https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L594
@@ -10898,7 +13989,10 @@ const StzhUpload = class {
10898
13989
  "stzh-upload--has-error": errorUsed,
10899
13990
  "stzh-upload--has-instructions": !!this.description || !!this.localization.description,
10900
13991
  };
10901
- return (h(Host, { "is-invalid": this.invalid || errorUsed }, h("div", { class: classes, ref: el => (this.dropzoneElement = el) }, h("div", { ref: el => (this.hiddenInputContainerElement = el) }), h("div", { id: `${this.uploadId}-label` }, this.label && h("div", { class: "stzh-upload__label" }, this.label)), h("div", { class: "stzh-upload__clickarea", ref: el => (this.clickareaElement = el) }, h("div", { class: "stzh-upload__heading-wrapper" }, h("div", { class: "stzh-upload__heading-inner-wrapper" }, h("div", { class: "stzh-upload__heading" }, this.heading ? this.heading : this.localization.heading), h("div", { class: "stzh-upload__button-wrapper" }, h("span", null, this.localization.buttonIntro), h("stzh-link", { class: "stzh-upload__button", ref: el => (this.linkElement = el), size: "inherit", variant: "secondary", a11yDescribedby: `${this.uploadId}-label ${this.uploadId}-instruction ${this.uploadId}-description`, disabled: this.disabled, a11yControls: `${this.uploadId}-previews` }, this.button ? this.button : tc(this.localization.button, this.maxFiles)))), h("stzh-icon", { class: "stzh-upload__heading-icon", name: "upload" })), h("div", { class: "stzh-upload__instructions", id: `${this.uploadId}-instruction` }, this.description ? this.description : tc(this.localization.description, this.maxFiles))), ((_b = this._error) === null || _b === void 0 ? void 0 : _b.length) > 0 && (h(StzhInputDescription, { classPrefix: "stzh-upload", id: `${this.uploadId}-description`, error: this._error })), h("div", { id: `${this.uploadId}-previews`, class: "stzh-upload__previews-wrapper" }, h("div", { class: "stzh-upload__previews-inner-wrapper" }, h("div", { class: "stzh-upload__errors", ref: el => (this.errorsElement = el) }), h("div", { class: "stzh-upload__previews dropzone-previews", ref: el => (this.previewsElement = el) }))))));
13992
+ const description = this.description ? this.description : this.localization.description;
13993
+ return (h(Host, { "is-invalid": this.invalid || errorUsed }, h("div", { class: classes, ref: el => (this.dropzoneElement = el) }, h("div", { ref: el => (this.hiddenInputContainerElement = el) }), h("div", { id: `${this.uploadId}-label` }, this.label && h("div", { class: "stzh-upload__label" }, this.label)), h("div", { class: "stzh-upload__clickarea", ref: el => (this.clickareaElement = el) }, h("div", { class: "stzh-upload__heading-wrapper" }, h("div", { class: "stzh-upload__heading-inner-wrapper" }, h("div", { class: "stzh-upload__heading" }, this.heading ? this.heading : this.localization.heading), h("div", { class: "stzh-upload__buttons-wrapper" }, h("stzh-button", { class: "stzh-upload__button", variant: "secondary", size: "small", ref: el => (this.linkElement = el), label: this.button ? this.button : tc(this.localization.button, this.maxFiles), a11yDescribedby: `${this.uploadId}-label ${this.uploadId}-instruction ${this.uploadId}-description`, disabled: this.disabled, a11yControls: `${this.uploadId}-previews` }, h("stzh-icon", { slot: "icon", name: "upload" })), this.isPhotographingAvailable && (h("stzh-button", { class: "stzh-upload__button-scan", variant: "secondary", size: "small", label: this.buttonScan ? this.buttonScan : tc(this.localization.buttonScan, this.maxFiles), onClick: this.onButtonScanClick }, h("stzh-icon", { slot: "icon", name: "camera" })))), h("div", { class: "stzh-upload__hint-wrapper" }, h("span", null, this.localization.buttonIntro)))), h("div", { class: "stzh-upload__instructions", id: `${this.uploadId}-instruction` }, description
13994
+ .replace("{{fileformats}}", this.acceptedFiles ? this.acceptedFiles : "Alle")
13995
+ .replace("{{filesize}}", `${this.maxFilesize}`))), ((_b = this._error) === null || _b === void 0 ? void 0 : _b.length) > 0 && (h(StzhInputDescription, { classPrefix: "stzh-upload", id: `${this.uploadId}-description`, error: this._error })), h("div", { id: `${this.uploadId}-previews`, class: "stzh-upload__previews-wrapper" }, h("div", { class: "stzh-upload__previews-inner-wrapper" }, h("div", { class: "stzh-upload__errors", ref: el => (this.errorsElement = el) }), h("div", { class: "stzh-upload__previews dropzone-previews", ref: el => (this.previewsElement = el) })))), h("stzh-dialog", { ref: el => (this.photographingOverlayElement = el), onStzhClose: this.closePhotographingWebsocketConnection }, h("stzh-button", { class: "stzh-upload-photographing__back-button", icon: "arrow-left", size: "small", variant: "tertiary-plain", "no-padding-left": "true", "no-padding-right": "true", onClick: this.closePhotographingOverlay }, this.localization.back), this.isPhotographingAvailable && (h(Fragment, null, h("div", { class: "stzh-upload-photographing__info" }, h("stzh-heading", { level: "3" }, this.localization.photographingTitle1), h("div", { class: "stzh-upload-photographing__text-qrcode" }, h("div", null, h("stzh-text", null, this.localization.photographingText1), !!this.photographingUrlDetails && (h("stzh-link", { class: "stzh-upload-photographing-link", href: this.photographingUrlDetails.url, target: "_blank" }, this.photographingUrlDetails.url))), h("canvas", { class: "stzh-upload-photographing-qrcode", ref: el => (this.photographingQrcodeElement = el) }))), h("div", { class: "stzh-upload-photographing__info" }, h("stzh-heading", { level: "3" }, this.localization.photographingTitle2), h("stzh-text", null, this.localization.photographingText2)))))));
10902
13996
  }
10903
13997
  get element() { return getElement(this); }
10904
13998
  static get watchers() { return {