@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,8 +1,12 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { i as isStzhElement, h as hasSlot } from './utils.js';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
2
+ import { g as getStzhEnvironment, i as isStzhElement, h as hasSlot } from './utils.js';
3
3
  import { t as tc } from './translation-utils.js';
4
4
  import { S as StzhInputDescription } from './stzh-input-description.js';
5
- import { d as defineCustomElement$6 } from './stzh-badge2.js';
5
+ import { c as createCommonjsModule } from './_commonjsHelpers.js';
6
+ import { d as defineCustomElement$9 } from './stzh-badge2.js';
7
+ import { d as defineCustomElement$8 } from './stzh-button2.js';
8
+ import { d as defineCustomElement$7 } from './stzh-dialog2.js';
9
+ import { d as defineCustomElement$6 } from './stzh-heading2.js';
6
10
  import { d as defineCustomElement$5 } from './stzh-icon2.js';
7
11
  import { d as defineCustomElement$4 } from './stzh-link2.js';
8
12
  import { d as defineCustomElement$3 } from './stzh-popover2.js';
@@ -10360,7 +10364,2880 @@ window.Dropzone = Dropzone;
10360
10364
  ;
10361
10365
  });
10362
10366
 
10363
- 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)}";
10367
+ // can-promise has a crash in some versions of react native that dont have
10368
+ // standard global objects
10369
+ // https://github.com/soldair/node-qrcode/issues/157
10370
+
10371
+ var canPromise = function () {
10372
+ return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then
10373
+ };
10374
+
10375
+ let toSJISFunction;
10376
+ const CODEWORDS_COUNT = [
10377
+ 0, // Not used
10378
+ 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,
10379
+ 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,
10380
+ 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,
10381
+ 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706
10382
+ ];
10383
+
10384
+ /**
10385
+ * Returns the QR Code size for the specified version
10386
+ *
10387
+ * @param {Number} version QR Code version
10388
+ * @return {Number} size of QR code
10389
+ */
10390
+ var getSymbolSize$1 = function getSymbolSize (version) {
10391
+ if (!version) throw new Error('"version" cannot be null or undefined')
10392
+ if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40')
10393
+ return version * 4 + 17
10394
+ };
10395
+
10396
+ /**
10397
+ * Returns the total number of codewords used to store data and EC information.
10398
+ *
10399
+ * @param {Number} version QR Code version
10400
+ * @return {Number} Data length in bits
10401
+ */
10402
+ var getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {
10403
+ return CODEWORDS_COUNT[version]
10404
+ };
10405
+
10406
+ /**
10407
+ * Encode data with Bose-Chaudhuri-Hocquenghem
10408
+ *
10409
+ * @param {Number} data Value to encode
10410
+ * @return {Number} Encoded value
10411
+ */
10412
+ var getBCHDigit = function (data) {
10413
+ let digit = 0;
10414
+
10415
+ while (data !== 0) {
10416
+ digit++;
10417
+ data >>>= 1;
10418
+ }
10419
+
10420
+ return digit
10421
+ };
10422
+
10423
+ var setToSJISFunction = function setToSJISFunction (f) {
10424
+ if (typeof f !== 'function') {
10425
+ throw new Error('"toSJISFunc" is not a valid function.')
10426
+ }
10427
+
10428
+ toSJISFunction = f;
10429
+ };
10430
+
10431
+ var isKanjiModeEnabled = function () {
10432
+ return typeof toSJISFunction !== 'undefined'
10433
+ };
10434
+
10435
+ var toSJIS = function toSJIS (kanji) {
10436
+ return toSJISFunction(kanji)
10437
+ };
10438
+
10439
+ var utils$1 = {
10440
+ getSymbolSize: getSymbolSize$1,
10441
+ getSymbolTotalCodewords: getSymbolTotalCodewords,
10442
+ getBCHDigit: getBCHDigit,
10443
+ setToSJISFunction: setToSJISFunction,
10444
+ isKanjiModeEnabled: isKanjiModeEnabled,
10445
+ toSJIS: toSJIS
10446
+ };
10447
+
10448
+ var errorCorrectionLevel = createCommonjsModule(function (module, exports) {
10449
+ exports.L = { bit: 1 };
10450
+ exports.M = { bit: 0 };
10451
+ exports.Q = { bit: 3 };
10452
+ exports.H = { bit: 2 };
10453
+
10454
+ function fromString (string) {
10455
+ if (typeof string !== 'string') {
10456
+ throw new Error('Param is not a string')
10457
+ }
10458
+
10459
+ const lcStr = string.toLowerCase();
10460
+
10461
+ switch (lcStr) {
10462
+ case 'l':
10463
+ case 'low':
10464
+ return exports.L
10465
+
10466
+ case 'm':
10467
+ case 'medium':
10468
+ return exports.M
10469
+
10470
+ case 'q':
10471
+ case 'quartile':
10472
+ return exports.Q
10473
+
10474
+ case 'h':
10475
+ case 'high':
10476
+ return exports.H
10477
+
10478
+ default:
10479
+ throw new Error('Unknown EC Level: ' + string)
10480
+ }
10481
+ }
10482
+
10483
+ exports.isValid = function isValid (level) {
10484
+ return level && typeof level.bit !== 'undefined' &&
10485
+ level.bit >= 0 && level.bit < 4
10486
+ };
10487
+
10488
+ exports.from = function from (value, defaultValue) {
10489
+ if (exports.isValid(value)) {
10490
+ return value
10491
+ }
10492
+
10493
+ try {
10494
+ return fromString(value)
10495
+ } catch (e) {
10496
+ return defaultValue
10497
+ }
10498
+ };
10499
+ });
10500
+
10501
+ function BitBuffer () {
10502
+ this.buffer = [];
10503
+ this.length = 0;
10504
+ }
10505
+
10506
+ BitBuffer.prototype = {
10507
+
10508
+ get: function (index) {
10509
+ const bufIndex = Math.floor(index / 8);
10510
+ return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1
10511
+ },
10512
+
10513
+ put: function (num, length) {
10514
+ for (let i = 0; i < length; i++) {
10515
+ this.putBit(((num >>> (length - i - 1)) & 1) === 1);
10516
+ }
10517
+ },
10518
+
10519
+ getLengthInBits: function () {
10520
+ return this.length
10521
+ },
10522
+
10523
+ putBit: function (bit) {
10524
+ const bufIndex = Math.floor(this.length / 8);
10525
+ if (this.buffer.length <= bufIndex) {
10526
+ this.buffer.push(0);
10527
+ }
10528
+
10529
+ if (bit) {
10530
+ this.buffer[bufIndex] |= (0x80 >>> (this.length % 8));
10531
+ }
10532
+
10533
+ this.length++;
10534
+ }
10535
+ };
10536
+
10537
+ var bitBuffer = BitBuffer;
10538
+
10539
+ /**
10540
+ * Helper class to handle QR Code symbol modules
10541
+ *
10542
+ * @param {Number} size Symbol size
10543
+ */
10544
+ function BitMatrix (size) {
10545
+ if (!size || size < 1) {
10546
+ throw new Error('BitMatrix size must be defined and greater than 0')
10547
+ }
10548
+
10549
+ this.size = size;
10550
+ this.data = new Uint8Array(size * size);
10551
+ this.reservedBit = new Uint8Array(size * size);
10552
+ }
10553
+
10554
+ /**
10555
+ * Set bit value at specified location
10556
+ * If reserved flag is set, this bit will be ignored during masking process
10557
+ *
10558
+ * @param {Number} row
10559
+ * @param {Number} col
10560
+ * @param {Boolean} value
10561
+ * @param {Boolean} reserved
10562
+ */
10563
+ BitMatrix.prototype.set = function (row, col, value, reserved) {
10564
+ const index = row * this.size + col;
10565
+ this.data[index] = value;
10566
+ if (reserved) this.reservedBit[index] = true;
10567
+ };
10568
+
10569
+ /**
10570
+ * Returns bit value at specified location
10571
+ *
10572
+ * @param {Number} row
10573
+ * @param {Number} col
10574
+ * @return {Boolean}
10575
+ */
10576
+ BitMatrix.prototype.get = function (row, col) {
10577
+ return this.data[row * this.size + col]
10578
+ };
10579
+
10580
+ /**
10581
+ * Applies xor operator at specified location
10582
+ * (used during masking process)
10583
+ *
10584
+ * @param {Number} row
10585
+ * @param {Number} col
10586
+ * @param {Boolean} value
10587
+ */
10588
+ BitMatrix.prototype.xor = function (row, col, value) {
10589
+ this.data[row * this.size + col] ^= value;
10590
+ };
10591
+
10592
+ /**
10593
+ * Check if bit at specified location is reserved
10594
+ *
10595
+ * @param {Number} row
10596
+ * @param {Number} col
10597
+ * @return {Boolean}
10598
+ */
10599
+ BitMatrix.prototype.isReserved = function (row, col) {
10600
+ return this.reservedBit[row * this.size + col]
10601
+ };
10602
+
10603
+ var bitMatrix = BitMatrix;
10604
+
10605
+ var alignmentPattern = createCommonjsModule(function (module, exports) {
10606
+ /**
10607
+ * Alignment pattern are fixed reference pattern in defined positions
10608
+ * in a matrix symbology, which enables the decode software to re-synchronise
10609
+ * the coordinate mapping of the image modules in the event of moderate amounts
10610
+ * of distortion of the image.
10611
+ *
10612
+ * Alignment patterns are present only in QR Code symbols of version 2 or larger
10613
+ * and their number depends on the symbol version.
10614
+ */
10615
+
10616
+ const getSymbolSize = utils$1.getSymbolSize;
10617
+
10618
+ /**
10619
+ * Calculate the row/column coordinates of the center module of each alignment pattern
10620
+ * for the specified QR Code version.
10621
+ *
10622
+ * The alignment patterns are positioned symmetrically on either side of the diagonal
10623
+ * running from the top left corner of the symbol to the bottom right corner.
10624
+ *
10625
+ * Since positions are simmetrical only half of the coordinates are returned.
10626
+ * Each item of the array will represent in turn the x and y coordinate.
10627
+ * @see {@link getPositions}
10628
+ *
10629
+ * @param {Number} version QR Code version
10630
+ * @return {Array} Array of coordinate
10631
+ */
10632
+ exports.getRowColCoords = function getRowColCoords (version) {
10633
+ if (version === 1) return []
10634
+
10635
+ const posCount = Math.floor(version / 7) + 2;
10636
+ const size = getSymbolSize(version);
10637
+ const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2;
10638
+ const positions = [size - 7]; // Last coord is always (size - 7)
10639
+
10640
+ for (let i = 1; i < posCount - 1; i++) {
10641
+ positions[i] = positions[i - 1] - intervals;
10642
+ }
10643
+
10644
+ positions.push(6); // First coord is always 6
10645
+
10646
+ return positions.reverse()
10647
+ };
10648
+
10649
+ /**
10650
+ * Returns an array containing the positions of each alignment pattern.
10651
+ * Each array's element represent the center point of the pattern as (x, y) coordinates
10652
+ *
10653
+ * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}
10654
+ * and filtering out the items that overlaps with finder pattern
10655
+ *
10656
+ * @example
10657
+ * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.
10658
+ * The alignment patterns, therefore, are to be centered on (row, column)
10659
+ * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).
10660
+ * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns
10661
+ * and are not therefore used for alignment patterns.
10662
+ *
10663
+ * let pos = getPositions(7)
10664
+ * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]
10665
+ *
10666
+ * @param {Number} version QR Code version
10667
+ * @return {Array} Array of coordinates
10668
+ */
10669
+ exports.getPositions = function getPositions (version) {
10670
+ const coords = [];
10671
+ const pos = exports.getRowColCoords(version);
10672
+ const posLength = pos.length;
10673
+
10674
+ for (let i = 0; i < posLength; i++) {
10675
+ for (let j = 0; j < posLength; j++) {
10676
+ // Skip if position is occupied by finder patterns
10677
+ if ((i === 0 && j === 0) || // top-left
10678
+ (i === 0 && j === posLength - 1) || // bottom-left
10679
+ (i === posLength - 1 && j === 0)) { // top-right
10680
+ continue
10681
+ }
10682
+
10683
+ coords.push([pos[i], pos[j]]);
10684
+ }
10685
+ }
10686
+
10687
+ return coords
10688
+ };
10689
+ });
10690
+
10691
+ const getSymbolSize = utils$1.getSymbolSize;
10692
+ const FINDER_PATTERN_SIZE = 7;
10693
+
10694
+ /**
10695
+ * Returns an array containing the positions of each finder pattern.
10696
+ * Each array's element represent the top-left point of the pattern as (x, y) coordinates
10697
+ *
10698
+ * @param {Number} version QR Code version
10699
+ * @return {Array} Array of coordinates
10700
+ */
10701
+ var getPositions = function getPositions (version) {
10702
+ const size = getSymbolSize(version);
10703
+
10704
+ return [
10705
+ // top-left
10706
+ [0, 0],
10707
+ // top-right
10708
+ [size - FINDER_PATTERN_SIZE, 0],
10709
+ // bottom-left
10710
+ [0, size - FINDER_PATTERN_SIZE]
10711
+ ]
10712
+ };
10713
+
10714
+ var finderPattern = {
10715
+ getPositions: getPositions
10716
+ };
10717
+
10718
+ var maskPattern = createCommonjsModule(function (module, exports) {
10719
+ /**
10720
+ * Data mask pattern reference
10721
+ * @type {Object}
10722
+ */
10723
+ exports.Patterns = {
10724
+ PATTERN000: 0,
10725
+ PATTERN001: 1,
10726
+ PATTERN010: 2,
10727
+ PATTERN011: 3,
10728
+ PATTERN100: 4,
10729
+ PATTERN101: 5,
10730
+ PATTERN110: 6,
10731
+ PATTERN111: 7
10732
+ };
10733
+
10734
+ /**
10735
+ * Weighted penalty scores for the undesirable features
10736
+ * @type {Object}
10737
+ */
10738
+ const PenaltyScores = {
10739
+ N1: 3,
10740
+ N2: 3,
10741
+ N3: 40,
10742
+ N4: 10
10743
+ };
10744
+
10745
+ /**
10746
+ * Check if mask pattern value is valid
10747
+ *
10748
+ * @param {Number} mask Mask pattern
10749
+ * @return {Boolean} true if valid, false otherwise
10750
+ */
10751
+ exports.isValid = function isValid (mask) {
10752
+ return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7
10753
+ };
10754
+
10755
+ /**
10756
+ * Returns mask pattern from a value.
10757
+ * If value is not valid, returns undefined
10758
+ *
10759
+ * @param {Number|String} value Mask pattern value
10760
+ * @return {Number} Valid mask pattern or undefined
10761
+ */
10762
+ exports.from = function from (value) {
10763
+ return exports.isValid(value) ? parseInt(value, 10) : undefined
10764
+ };
10765
+
10766
+ /**
10767
+ * Find adjacent modules in row/column with the same color
10768
+ * and assign a penalty value.
10769
+ *
10770
+ * Points: N1 + i
10771
+ * i is the amount by which the number of adjacent modules of the same color exceeds 5
10772
+ */
10773
+ exports.getPenaltyN1 = function getPenaltyN1 (data) {
10774
+ const size = data.size;
10775
+ let points = 0;
10776
+ let sameCountCol = 0;
10777
+ let sameCountRow = 0;
10778
+ let lastCol = null;
10779
+ let lastRow = null;
10780
+
10781
+ for (let row = 0; row < size; row++) {
10782
+ sameCountCol = sameCountRow = 0;
10783
+ lastCol = lastRow = null;
10784
+
10785
+ for (let col = 0; col < size; col++) {
10786
+ let module = data.get(row, col);
10787
+ if (module === lastCol) {
10788
+ sameCountCol++;
10789
+ } else {
10790
+ if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
10791
+ lastCol = module;
10792
+ sameCountCol = 1;
10793
+ }
10794
+
10795
+ module = data.get(col, row);
10796
+ if (module === lastRow) {
10797
+ sameCountRow++;
10798
+ } else {
10799
+ if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
10800
+ lastRow = module;
10801
+ sameCountRow = 1;
10802
+ }
10803
+ }
10804
+
10805
+ if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
10806
+ if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
10807
+ }
10808
+
10809
+ return points
10810
+ };
10811
+
10812
+ /**
10813
+ * Find 2x2 blocks with the same color and assign a penalty value
10814
+ *
10815
+ * Points: N2 * (m - 1) * (n - 1)
10816
+ */
10817
+ exports.getPenaltyN2 = function getPenaltyN2 (data) {
10818
+ const size = data.size;
10819
+ let points = 0;
10820
+
10821
+ for (let row = 0; row < size - 1; row++) {
10822
+ for (let col = 0; col < size - 1; col++) {
10823
+ const last = data.get(row, col) +
10824
+ data.get(row, col + 1) +
10825
+ data.get(row + 1, col) +
10826
+ data.get(row + 1, col + 1);
10827
+
10828
+ if (last === 4 || last === 0) points++;
10829
+ }
10830
+ }
10831
+
10832
+ return points * PenaltyScores.N2
10833
+ };
10834
+
10835
+ /**
10836
+ * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,
10837
+ * preceded or followed by light area 4 modules wide
10838
+ *
10839
+ * Points: N3 * number of pattern found
10840
+ */
10841
+ exports.getPenaltyN3 = function getPenaltyN3 (data) {
10842
+ const size = data.size;
10843
+ let points = 0;
10844
+ let bitsCol = 0;
10845
+ let bitsRow = 0;
10846
+
10847
+ for (let row = 0; row < size; row++) {
10848
+ bitsCol = bitsRow = 0;
10849
+ for (let col = 0; col < size; col++) {
10850
+ bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col);
10851
+ if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++;
10852
+
10853
+ bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row);
10854
+ if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++;
10855
+ }
10856
+ }
10857
+
10858
+ return points * PenaltyScores.N3
10859
+ };
10860
+
10861
+ /**
10862
+ * Calculate proportion of dark modules in entire symbol
10863
+ *
10864
+ * Points: N4 * k
10865
+ *
10866
+ * k is the rating of the deviation of the proportion of dark modules
10867
+ * in the symbol from 50% in steps of 5%
10868
+ */
10869
+ exports.getPenaltyN4 = function getPenaltyN4 (data) {
10870
+ let darkCount = 0;
10871
+ const modulesCount = data.data.length;
10872
+
10873
+ for (let i = 0; i < modulesCount; i++) darkCount += data.data[i];
10874
+
10875
+ const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10);
10876
+
10877
+ return k * PenaltyScores.N4
10878
+ };
10879
+
10880
+ /**
10881
+ * Return mask value at given position
10882
+ *
10883
+ * @param {Number} maskPattern Pattern reference value
10884
+ * @param {Number} i Row
10885
+ * @param {Number} j Column
10886
+ * @return {Boolean} Mask value
10887
+ */
10888
+ function getMaskAt (maskPattern, i, j) {
10889
+ switch (maskPattern) {
10890
+ case exports.Patterns.PATTERN000: return (i + j) % 2 === 0
10891
+ case exports.Patterns.PATTERN001: return i % 2 === 0
10892
+ case exports.Patterns.PATTERN010: return j % 3 === 0
10893
+ case exports.Patterns.PATTERN011: return (i + j) % 3 === 0
10894
+ case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0
10895
+ case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0
10896
+ case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0
10897
+ case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0
10898
+
10899
+ default: throw new Error('bad maskPattern:' + maskPattern)
10900
+ }
10901
+ }
10902
+
10903
+ /**
10904
+ * Apply a mask pattern to a BitMatrix
10905
+ *
10906
+ * @param {Number} pattern Pattern reference number
10907
+ * @param {BitMatrix} data BitMatrix data
10908
+ */
10909
+ exports.applyMask = function applyMask (pattern, data) {
10910
+ const size = data.size;
10911
+
10912
+ for (let col = 0; col < size; col++) {
10913
+ for (let row = 0; row < size; row++) {
10914
+ if (data.isReserved(row, col)) continue
10915
+ data.xor(row, col, getMaskAt(pattern, row, col));
10916
+ }
10917
+ }
10918
+ };
10919
+
10920
+ /**
10921
+ * Returns the best mask pattern for data
10922
+ *
10923
+ * @param {BitMatrix} data
10924
+ * @return {Number} Mask pattern reference number
10925
+ */
10926
+ exports.getBestMask = function getBestMask (data, setupFormatFunc) {
10927
+ const numPatterns = Object.keys(exports.Patterns).length;
10928
+ let bestPattern = 0;
10929
+ let lowerPenalty = Infinity;
10930
+
10931
+ for (let p = 0; p < numPatterns; p++) {
10932
+ setupFormatFunc(p);
10933
+ exports.applyMask(p, data);
10934
+
10935
+ // Calculate penalty
10936
+ const penalty =
10937
+ exports.getPenaltyN1(data) +
10938
+ exports.getPenaltyN2(data) +
10939
+ exports.getPenaltyN3(data) +
10940
+ exports.getPenaltyN4(data);
10941
+
10942
+ // Undo previously applied mask
10943
+ exports.applyMask(p, data);
10944
+
10945
+ if (penalty < lowerPenalty) {
10946
+ lowerPenalty = penalty;
10947
+ bestPattern = p;
10948
+ }
10949
+ }
10950
+
10951
+ return bestPattern
10952
+ };
10953
+ });
10954
+
10955
+ const EC_BLOCKS_TABLE = [
10956
+ // L M Q H
10957
+ 1, 1, 1, 1,
10958
+ 1, 1, 1, 1,
10959
+ 1, 1, 2, 2,
10960
+ 1, 2, 2, 4,
10961
+ 1, 2, 4, 4,
10962
+ 2, 4, 4, 4,
10963
+ 2, 4, 6, 5,
10964
+ 2, 4, 6, 6,
10965
+ 2, 5, 8, 8,
10966
+ 4, 5, 8, 8,
10967
+ 4, 5, 8, 11,
10968
+ 4, 8, 10, 11,
10969
+ 4, 9, 12, 16,
10970
+ 4, 9, 16, 16,
10971
+ 6, 10, 12, 18,
10972
+ 6, 10, 17, 16,
10973
+ 6, 11, 16, 19,
10974
+ 6, 13, 18, 21,
10975
+ 7, 14, 21, 25,
10976
+ 8, 16, 20, 25,
10977
+ 8, 17, 23, 25,
10978
+ 9, 17, 23, 34,
10979
+ 9, 18, 25, 30,
10980
+ 10, 20, 27, 32,
10981
+ 12, 21, 29, 35,
10982
+ 12, 23, 34, 37,
10983
+ 12, 25, 34, 40,
10984
+ 13, 26, 35, 42,
10985
+ 14, 28, 38, 45,
10986
+ 15, 29, 40, 48,
10987
+ 16, 31, 43, 51,
10988
+ 17, 33, 45, 54,
10989
+ 18, 35, 48, 57,
10990
+ 19, 37, 51, 60,
10991
+ 19, 38, 53, 63,
10992
+ 20, 40, 56, 66,
10993
+ 21, 43, 59, 70,
10994
+ 22, 45, 62, 74,
10995
+ 24, 47, 65, 77,
10996
+ 25, 49, 68, 81
10997
+ ];
10998
+
10999
+ const EC_CODEWORDS_TABLE = [
11000
+ // L M Q H
11001
+ 7, 10, 13, 17,
11002
+ 10, 16, 22, 28,
11003
+ 15, 26, 36, 44,
11004
+ 20, 36, 52, 64,
11005
+ 26, 48, 72, 88,
11006
+ 36, 64, 96, 112,
11007
+ 40, 72, 108, 130,
11008
+ 48, 88, 132, 156,
11009
+ 60, 110, 160, 192,
11010
+ 72, 130, 192, 224,
11011
+ 80, 150, 224, 264,
11012
+ 96, 176, 260, 308,
11013
+ 104, 198, 288, 352,
11014
+ 120, 216, 320, 384,
11015
+ 132, 240, 360, 432,
11016
+ 144, 280, 408, 480,
11017
+ 168, 308, 448, 532,
11018
+ 180, 338, 504, 588,
11019
+ 196, 364, 546, 650,
11020
+ 224, 416, 600, 700,
11021
+ 224, 442, 644, 750,
11022
+ 252, 476, 690, 816,
11023
+ 270, 504, 750, 900,
11024
+ 300, 560, 810, 960,
11025
+ 312, 588, 870, 1050,
11026
+ 336, 644, 952, 1110,
11027
+ 360, 700, 1020, 1200,
11028
+ 390, 728, 1050, 1260,
11029
+ 420, 784, 1140, 1350,
11030
+ 450, 812, 1200, 1440,
11031
+ 480, 868, 1290, 1530,
11032
+ 510, 924, 1350, 1620,
11033
+ 540, 980, 1440, 1710,
11034
+ 570, 1036, 1530, 1800,
11035
+ 570, 1064, 1590, 1890,
11036
+ 600, 1120, 1680, 1980,
11037
+ 630, 1204, 1770, 2100,
11038
+ 660, 1260, 1860, 2220,
11039
+ 720, 1316, 1950, 2310,
11040
+ 750, 1372, 2040, 2430
11041
+ ];
11042
+
11043
+ /**
11044
+ * Returns the number of error correction block that the QR Code should contain
11045
+ * for the specified version and error correction level.
11046
+ *
11047
+ * @param {Number} version QR Code version
11048
+ * @param {Number} errorCorrectionLevel Error correction level
11049
+ * @return {Number} Number of error correction blocks
11050
+ */
11051
+ var getBlocksCount = function getBlocksCount (version, errorCorrectionLevel$1) {
11052
+ switch (errorCorrectionLevel$1) {
11053
+ case errorCorrectionLevel.L:
11054
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]
11055
+ case errorCorrectionLevel.M:
11056
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]
11057
+ case errorCorrectionLevel.Q:
11058
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]
11059
+ case errorCorrectionLevel.H:
11060
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]
11061
+ default:
11062
+ return undefined
11063
+ }
11064
+ };
11065
+
11066
+ /**
11067
+ * Returns the number of error correction codewords to use for the specified
11068
+ * version and error correction level.
11069
+ *
11070
+ * @param {Number} version QR Code version
11071
+ * @param {Number} errorCorrectionLevel Error correction level
11072
+ * @return {Number} Number of error correction codewords
11073
+ */
11074
+ var getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel$1) {
11075
+ switch (errorCorrectionLevel$1) {
11076
+ case errorCorrectionLevel.L:
11077
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]
11078
+ case errorCorrectionLevel.M:
11079
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]
11080
+ case errorCorrectionLevel.Q:
11081
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]
11082
+ case errorCorrectionLevel.H:
11083
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]
11084
+ default:
11085
+ return undefined
11086
+ }
11087
+ };
11088
+
11089
+ var errorCorrectionCode = {
11090
+ getBlocksCount: getBlocksCount,
11091
+ getTotalCodewordsCount: getTotalCodewordsCount
11092
+ };
11093
+
11094
+ const EXP_TABLE = new Uint8Array(512);
11095
+ const LOG_TABLE = new Uint8Array(256)
11096
+ /**
11097
+ * Precompute the log and anti-log tables for faster computation later
11098
+ *
11099
+ * For each possible value in the galois field 2^8, we will pre-compute
11100
+ * the logarithm and anti-logarithm (exponential) of this value
11101
+ *
11102
+ * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}
11103
+ */
11104
+ ;(function initTables () {
11105
+ let x = 1;
11106
+ for (let i = 0; i < 255; i++) {
11107
+ EXP_TABLE[i] = x;
11108
+ LOG_TABLE[x] = i;
11109
+
11110
+ x <<= 1; // multiply by 2
11111
+
11112
+ // The QR code specification says to use byte-wise modulo 100011101 arithmetic.
11113
+ // This means that when a number is 256 or larger, it should be XORed with 0x11D.
11114
+ if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)
11115
+ x ^= 0x11D;
11116
+ }
11117
+ }
11118
+
11119
+ // Optimization: double the size of the anti-log table so that we don't need to mod 255 to
11120
+ // stay inside the bounds (because we will mainly use this table for the multiplication of
11121
+ // two GF numbers, no more).
11122
+ // @see {@link mul}
11123
+ for (let i = 255; i < 512; i++) {
11124
+ EXP_TABLE[i] = EXP_TABLE[i - 255];
11125
+ }
11126
+ }());
11127
+
11128
+ /**
11129
+ * Returns log value of n inside Galois Field
11130
+ *
11131
+ * @param {Number} n
11132
+ * @return {Number}
11133
+ */
11134
+ var log = function log (n) {
11135
+ if (n < 1) throw new Error('log(' + n + ')')
11136
+ return LOG_TABLE[n]
11137
+ };
11138
+
11139
+ /**
11140
+ * Returns anti-log value of n inside Galois Field
11141
+ *
11142
+ * @param {Number} n
11143
+ * @return {Number}
11144
+ */
11145
+ var exp = function exp (n) {
11146
+ return EXP_TABLE[n]
11147
+ };
11148
+
11149
+ /**
11150
+ * Multiplies two number inside Galois Field
11151
+ *
11152
+ * @param {Number} x
11153
+ * @param {Number} y
11154
+ * @return {Number}
11155
+ */
11156
+ var mul = function mul (x, y) {
11157
+ if (x === 0 || y === 0) return 0
11158
+
11159
+ // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized
11160
+ // @see {@link initTables}
11161
+ return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]
11162
+ };
11163
+
11164
+ var galoisField = {
11165
+ log: log,
11166
+ exp: exp,
11167
+ mul: mul
11168
+ };
11169
+
11170
+ var polynomial = createCommonjsModule(function (module, exports) {
11171
+ /**
11172
+ * Multiplies two polynomials inside Galois Field
11173
+ *
11174
+ * @param {Uint8Array} p1 Polynomial
11175
+ * @param {Uint8Array} p2 Polynomial
11176
+ * @return {Uint8Array} Product of p1 and p2
11177
+ */
11178
+ exports.mul = function mul (p1, p2) {
11179
+ const coeff = new Uint8Array(p1.length + p2.length - 1);
11180
+
11181
+ for (let i = 0; i < p1.length; i++) {
11182
+ for (let j = 0; j < p2.length; j++) {
11183
+ coeff[i + j] ^= galoisField.mul(p1[i], p2[j]);
11184
+ }
11185
+ }
11186
+
11187
+ return coeff
11188
+ };
11189
+
11190
+ /**
11191
+ * Calculate the remainder of polynomials division
11192
+ *
11193
+ * @param {Uint8Array} divident Polynomial
11194
+ * @param {Uint8Array} divisor Polynomial
11195
+ * @return {Uint8Array} Remainder
11196
+ */
11197
+ exports.mod = function mod (divident, divisor) {
11198
+ let result = new Uint8Array(divident);
11199
+
11200
+ while ((result.length - divisor.length) >= 0) {
11201
+ const coeff = result[0];
11202
+
11203
+ for (let i = 0; i < divisor.length; i++) {
11204
+ result[i] ^= galoisField.mul(divisor[i], coeff);
11205
+ }
11206
+
11207
+ // remove all zeros from buffer head
11208
+ let offset = 0;
11209
+ while (offset < result.length && result[offset] === 0) offset++;
11210
+ result = result.slice(offset);
11211
+ }
11212
+
11213
+ return result
11214
+ };
11215
+
11216
+ /**
11217
+ * Generate an irreducible generator polynomial of specified degree
11218
+ * (used by Reed-Solomon encoder)
11219
+ *
11220
+ * @param {Number} degree Degree of the generator polynomial
11221
+ * @return {Uint8Array} Buffer containing polynomial coefficients
11222
+ */
11223
+ exports.generateECPolynomial = function generateECPolynomial (degree) {
11224
+ let poly = new Uint8Array([1]);
11225
+ for (let i = 0; i < degree; i++) {
11226
+ poly = exports.mul(poly, new Uint8Array([1, galoisField.exp(i)]));
11227
+ }
11228
+
11229
+ return poly
11230
+ };
11231
+ });
11232
+
11233
+ function ReedSolomonEncoder (degree) {
11234
+ this.genPoly = undefined;
11235
+ this.degree = degree;
11236
+
11237
+ if (this.degree) this.initialize(this.degree);
11238
+ }
11239
+
11240
+ /**
11241
+ * Initialize the encoder.
11242
+ * The input param should correspond to the number of error correction codewords.
11243
+ *
11244
+ * @param {Number} degree
11245
+ */
11246
+ ReedSolomonEncoder.prototype.initialize = function initialize (degree) {
11247
+ // create an irreducible generator polynomial
11248
+ this.degree = degree;
11249
+ this.genPoly = polynomial.generateECPolynomial(this.degree);
11250
+ };
11251
+
11252
+ /**
11253
+ * Encodes a chunk of data
11254
+ *
11255
+ * @param {Uint8Array} data Buffer containing input data
11256
+ * @return {Uint8Array} Buffer containing encoded data
11257
+ */
11258
+ ReedSolomonEncoder.prototype.encode = function encode (data) {
11259
+ if (!this.genPoly) {
11260
+ throw new Error('Encoder not initialized')
11261
+ }
11262
+
11263
+ // Calculate EC for this data block
11264
+ // extends data size to data+genPoly size
11265
+ const paddedData = new Uint8Array(data.length + this.degree);
11266
+ paddedData.set(data);
11267
+
11268
+ // The error correction codewords are the remainder after dividing the data codewords
11269
+ // by a generator polynomial
11270
+ const remainder = polynomial.mod(paddedData, this.genPoly);
11271
+
11272
+ // return EC data blocks (last n byte, where n is the degree of genPoly)
11273
+ // If coefficients number in remainder are less than genPoly degree,
11274
+ // pad with 0s to the left to reach the needed number of coefficients
11275
+ const start = this.degree - remainder.length;
11276
+ if (start > 0) {
11277
+ const buff = new Uint8Array(this.degree);
11278
+ buff.set(remainder, start);
11279
+
11280
+ return buff
11281
+ }
11282
+
11283
+ return remainder
11284
+ };
11285
+
11286
+ var reedSolomonEncoder = ReedSolomonEncoder;
11287
+
11288
+ /**
11289
+ * Check if QR Code version is valid
11290
+ *
11291
+ * @param {Number} version QR Code version
11292
+ * @return {Boolean} true if valid version, false otherwise
11293
+ */
11294
+ var isValid = function isValid (version) {
11295
+ return !isNaN(version) && version >= 1 && version <= 40
11296
+ };
11297
+
11298
+ var versionCheck = {
11299
+ isValid: isValid
11300
+ };
11301
+
11302
+ const numeric = '[0-9]+';
11303
+ const alphanumeric = '[A-Z $%*+\\-./:]+';
11304
+ let kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +
11305
+ '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +
11306
+ '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +
11307
+ '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+';
11308
+ kanji = kanji.replace(/u/g, '\\u');
11309
+
11310
+ const byte = '(?:(?![A-Z0-9 $%*+\\-./:]|' + kanji + ')(?:.|[\r\n]))+';
11311
+
11312
+ var KANJI = new RegExp(kanji, 'g');
11313
+ var BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\-./:]+', 'g');
11314
+ var BYTE = new RegExp(byte, 'g');
11315
+ var NUMERIC = new RegExp(numeric, 'g');
11316
+ var ALPHANUMERIC = new RegExp(alphanumeric, 'g');
11317
+
11318
+ const TEST_KANJI = new RegExp('^' + kanji + '$');
11319
+ const TEST_NUMERIC = new RegExp('^' + numeric + '$');
11320
+ const TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\-./:]+$');
11321
+
11322
+ var testKanji = function testKanji (str) {
11323
+ return TEST_KANJI.test(str)
11324
+ };
11325
+
11326
+ var testNumeric = function testNumeric (str) {
11327
+ return TEST_NUMERIC.test(str)
11328
+ };
11329
+
11330
+ var testAlphanumeric = function testAlphanumeric (str) {
11331
+ return TEST_ALPHANUMERIC.test(str)
11332
+ };
11333
+
11334
+ var regex = {
11335
+ KANJI: KANJI,
11336
+ BYTE_KANJI: BYTE_KANJI,
11337
+ BYTE: BYTE,
11338
+ NUMERIC: NUMERIC,
11339
+ ALPHANUMERIC: ALPHANUMERIC,
11340
+ testKanji: testKanji,
11341
+ testNumeric: testNumeric,
11342
+ testAlphanumeric: testAlphanumeric
11343
+ };
11344
+
11345
+ var mode = createCommonjsModule(function (module, exports) {
11346
+ /**
11347
+ * Numeric mode encodes data from the decimal digit set (0 - 9)
11348
+ * (byte values 30HEX to 39HEX).
11349
+ * Normally, 3 data characters are represented by 10 bits.
11350
+ *
11351
+ * @type {Object}
11352
+ */
11353
+ exports.NUMERIC = {
11354
+ id: 'Numeric',
11355
+ bit: 1 << 0,
11356
+ ccBits: [10, 12, 14]
11357
+ };
11358
+
11359
+ /**
11360
+ * Alphanumeric mode encodes data from a set of 45 characters,
11361
+ * i.e. 10 numeric digits (0 - 9),
11362
+ * 26 alphabetic characters (A - Z),
11363
+ * and 9 symbols (SP, $, %, *, +, -, ., /, :).
11364
+ * Normally, two input characters are represented by 11 bits.
11365
+ *
11366
+ * @type {Object}
11367
+ */
11368
+ exports.ALPHANUMERIC = {
11369
+ id: 'Alphanumeric',
11370
+ bit: 1 << 1,
11371
+ ccBits: [9, 11, 13]
11372
+ };
11373
+
11374
+ /**
11375
+ * In byte mode, data is encoded at 8 bits per character.
11376
+ *
11377
+ * @type {Object}
11378
+ */
11379
+ exports.BYTE = {
11380
+ id: 'Byte',
11381
+ bit: 1 << 2,
11382
+ ccBits: [8, 16, 16]
11383
+ };
11384
+
11385
+ /**
11386
+ * The Kanji mode efficiently encodes Kanji characters in accordance with
11387
+ * the Shift JIS system based on JIS X 0208.
11388
+ * The Shift JIS values are shifted from the JIS X 0208 values.
11389
+ * JIS X 0208 gives details of the shift coded representation.
11390
+ * Each two-byte character value is compacted to a 13-bit binary codeword.
11391
+ *
11392
+ * @type {Object}
11393
+ */
11394
+ exports.KANJI = {
11395
+ id: 'Kanji',
11396
+ bit: 1 << 3,
11397
+ ccBits: [8, 10, 12]
11398
+ };
11399
+
11400
+ /**
11401
+ * Mixed mode will contain a sequences of data in a combination of any of
11402
+ * the modes described above
11403
+ *
11404
+ * @type {Object}
11405
+ */
11406
+ exports.MIXED = {
11407
+ bit: -1
11408
+ };
11409
+
11410
+ /**
11411
+ * Returns the number of bits needed to store the data length
11412
+ * according to QR Code specifications.
11413
+ *
11414
+ * @param {Mode} mode Data mode
11415
+ * @param {Number} version QR Code version
11416
+ * @return {Number} Number of bits
11417
+ */
11418
+ exports.getCharCountIndicator = function getCharCountIndicator (mode, version) {
11419
+ if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)
11420
+
11421
+ if (!versionCheck.isValid(version)) {
11422
+ throw new Error('Invalid version: ' + version)
11423
+ }
11424
+
11425
+ if (version >= 1 && version < 10) return mode.ccBits[0]
11426
+ else if (version < 27) return mode.ccBits[1]
11427
+ return mode.ccBits[2]
11428
+ };
11429
+
11430
+ /**
11431
+ * Returns the most efficient mode to store the specified data
11432
+ *
11433
+ * @param {String} dataStr Input data string
11434
+ * @return {Mode} Best mode
11435
+ */
11436
+ exports.getBestModeForData = function getBestModeForData (dataStr) {
11437
+ if (regex.testNumeric(dataStr)) return exports.NUMERIC
11438
+ else if (regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC
11439
+ else if (regex.testKanji(dataStr)) return exports.KANJI
11440
+ else return exports.BYTE
11441
+ };
11442
+
11443
+ /**
11444
+ * Return mode name as string
11445
+ *
11446
+ * @param {Mode} mode Mode object
11447
+ * @returns {String} Mode name
11448
+ */
11449
+ exports.toString = function toString (mode) {
11450
+ if (mode && mode.id) return mode.id
11451
+ throw new Error('Invalid mode')
11452
+ };
11453
+
11454
+ /**
11455
+ * Check if input param is a valid mode object
11456
+ *
11457
+ * @param {Mode} mode Mode object
11458
+ * @returns {Boolean} True if valid mode, false otherwise
11459
+ */
11460
+ exports.isValid = function isValid (mode) {
11461
+ return mode && mode.bit && mode.ccBits
11462
+ };
11463
+
11464
+ /**
11465
+ * Get mode object from its name
11466
+ *
11467
+ * @param {String} string Mode name
11468
+ * @returns {Mode} Mode object
11469
+ */
11470
+ function fromString (string) {
11471
+ if (typeof string !== 'string') {
11472
+ throw new Error('Param is not a string')
11473
+ }
11474
+
11475
+ const lcStr = string.toLowerCase();
11476
+
11477
+ switch (lcStr) {
11478
+ case 'numeric':
11479
+ return exports.NUMERIC
11480
+ case 'alphanumeric':
11481
+ return exports.ALPHANUMERIC
11482
+ case 'kanji':
11483
+ return exports.KANJI
11484
+ case 'byte':
11485
+ return exports.BYTE
11486
+ default:
11487
+ throw new Error('Unknown mode: ' + string)
11488
+ }
11489
+ }
11490
+
11491
+ /**
11492
+ * Returns mode from a value.
11493
+ * If value is not a valid mode, returns defaultValue
11494
+ *
11495
+ * @param {Mode|String} value Encoding mode
11496
+ * @param {Mode} defaultValue Fallback value
11497
+ * @return {Mode} Encoding mode
11498
+ */
11499
+ exports.from = function from (value, defaultValue) {
11500
+ if (exports.isValid(value)) {
11501
+ return value
11502
+ }
11503
+
11504
+ try {
11505
+ return fromString(value)
11506
+ } catch (e) {
11507
+ return defaultValue
11508
+ }
11509
+ };
11510
+ });
11511
+
11512
+ var version = createCommonjsModule(function (module, exports) {
11513
+ // Generator polynomial used to encode version information
11514
+ const G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0);
11515
+ const G18_BCH = utils$1.getBCHDigit(G18);
11516
+
11517
+ function getBestVersionForDataLength (mode, length, errorCorrectionLevel) {
11518
+ for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
11519
+ if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {
11520
+ return currentVersion
11521
+ }
11522
+ }
11523
+
11524
+ return undefined
11525
+ }
11526
+
11527
+ function getReservedBitsCount (mode$1, version) {
11528
+ // Character count indicator + mode indicator bits
11529
+ return mode.getCharCountIndicator(mode$1, version) + 4
11530
+ }
11531
+
11532
+ function getTotalBitsFromDataArray (segments, version) {
11533
+ let totalBits = 0;
11534
+
11535
+ segments.forEach(function (data) {
11536
+ const reservedBits = getReservedBitsCount(data.mode, version);
11537
+ totalBits += reservedBits + data.getBitsLength();
11538
+ });
11539
+
11540
+ return totalBits
11541
+ }
11542
+
11543
+ function getBestVersionForMixedData (segments, errorCorrectionLevel) {
11544
+ for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
11545
+ const length = getTotalBitsFromDataArray(segments, currentVersion);
11546
+ if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode.MIXED)) {
11547
+ return currentVersion
11548
+ }
11549
+ }
11550
+
11551
+ return undefined
11552
+ }
11553
+
11554
+ /**
11555
+ * Returns version number from a value.
11556
+ * If value is not a valid version, returns defaultValue
11557
+ *
11558
+ * @param {Number|String} value QR Code version
11559
+ * @param {Number} defaultValue Fallback value
11560
+ * @return {Number} QR Code version number
11561
+ */
11562
+ exports.from = function from (value, defaultValue) {
11563
+ if (versionCheck.isValid(value)) {
11564
+ return parseInt(value, 10)
11565
+ }
11566
+
11567
+ return defaultValue
11568
+ };
11569
+
11570
+ /**
11571
+ * Returns how much data can be stored with the specified QR code version
11572
+ * and error correction level
11573
+ *
11574
+ * @param {Number} version QR Code version (1-40)
11575
+ * @param {Number} errorCorrectionLevel Error correction level
11576
+ * @param {Mode} mode Data mode
11577
+ * @return {Number} Quantity of storable data
11578
+ */
11579
+ exports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode$1) {
11580
+ if (!versionCheck.isValid(version)) {
11581
+ throw new Error('Invalid QR Code version')
11582
+ }
11583
+
11584
+ // Use Byte mode as default
11585
+ if (typeof mode$1 === 'undefined') mode$1 = mode.BYTE;
11586
+
11587
+ // Total codewords for this QR code version (Data + Error correction)
11588
+ const totalCodewords = utils$1.getSymbolTotalCodewords(version);
11589
+
11590
+ // Total number of error correction codewords
11591
+ const ecTotalCodewords = errorCorrectionCode.getTotalCodewordsCount(version, errorCorrectionLevel);
11592
+
11593
+ // Total number of data codewords
11594
+ const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
11595
+
11596
+ if (mode$1 === mode.MIXED) return dataTotalCodewordsBits
11597
+
11598
+ const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode$1, version);
11599
+
11600
+ // Return max number of storable codewords
11601
+ switch (mode$1) {
11602
+ case mode.NUMERIC:
11603
+ return Math.floor((usableBits / 10) * 3)
11604
+
11605
+ case mode.ALPHANUMERIC:
11606
+ return Math.floor((usableBits / 11) * 2)
11607
+
11608
+ case mode.KANJI:
11609
+ return Math.floor(usableBits / 13)
11610
+
11611
+ case mode.BYTE:
11612
+ default:
11613
+ return Math.floor(usableBits / 8)
11614
+ }
11615
+ };
11616
+
11617
+ /**
11618
+ * Returns the minimum version needed to contain the amount of data
11619
+ *
11620
+ * @param {Segment} data Segment of data
11621
+ * @param {Number} [errorCorrectionLevel=H] Error correction level
11622
+ * @param {Mode} mode Data mode
11623
+ * @return {Number} QR Code version
11624
+ */
11625
+ exports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel$1) {
11626
+ let seg;
11627
+
11628
+ const ecl = errorCorrectionLevel.from(errorCorrectionLevel$1, errorCorrectionLevel.M);
11629
+
11630
+ if (Array.isArray(data)) {
11631
+ if (data.length > 1) {
11632
+ return getBestVersionForMixedData(data, ecl)
11633
+ }
11634
+
11635
+ if (data.length === 0) {
11636
+ return 1
11637
+ }
11638
+
11639
+ seg = data[0];
11640
+ } else {
11641
+ seg = data;
11642
+ }
11643
+
11644
+ return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)
11645
+ };
11646
+
11647
+ /**
11648
+ * Returns version information with relative error correction bits
11649
+ *
11650
+ * The version information is included in QR Code symbols of version 7 or larger.
11651
+ * It consists of an 18-bit sequence containing 6 data bits,
11652
+ * with 12 error correction bits calculated using the (18, 6) Golay code.
11653
+ *
11654
+ * @param {Number} version QR Code version
11655
+ * @return {Number} Encoded version info bits
11656
+ */
11657
+ exports.getEncodedBits = function getEncodedBits (version) {
11658
+ if (!versionCheck.isValid(version) || version < 7) {
11659
+ throw new Error('Invalid QR Code version')
11660
+ }
11661
+
11662
+ let d = version << 12;
11663
+
11664
+ while (utils$1.getBCHDigit(d) - G18_BCH >= 0) {
11665
+ d ^= (G18 << (utils$1.getBCHDigit(d) - G18_BCH));
11666
+ }
11667
+
11668
+ return (version << 12) | d
11669
+ };
11670
+ });
11671
+
11672
+ const G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0);
11673
+ const G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1);
11674
+ const G15_BCH = utils$1.getBCHDigit(G15);
11675
+
11676
+ /**
11677
+ * Returns format information with relative error correction bits
11678
+ *
11679
+ * The format information is a 15-bit sequence containing 5 data bits,
11680
+ * with 10 error correction bits calculated using the (15, 5) BCH code.
11681
+ *
11682
+ * @param {Number} errorCorrectionLevel Error correction level
11683
+ * @param {Number} mask Mask pattern
11684
+ * @return {Number} Encoded format information bits
11685
+ */
11686
+ var getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {
11687
+ const data = ((errorCorrectionLevel.bit << 3) | mask);
11688
+ let d = data << 10;
11689
+
11690
+ while (utils$1.getBCHDigit(d) - G15_BCH >= 0) {
11691
+ d ^= (G15 << (utils$1.getBCHDigit(d) - G15_BCH));
11692
+ }
11693
+
11694
+ // xor final data with mask pattern in order to ensure that
11695
+ // no combination of Error Correction Level and data mask pattern
11696
+ // will result in an all-zero data string
11697
+ return ((data << 10) | d) ^ G15_MASK
11698
+ };
11699
+
11700
+ var formatInfo = {
11701
+ getEncodedBits: getEncodedBits
11702
+ };
11703
+
11704
+ function NumericData (data) {
11705
+ this.mode = mode.NUMERIC;
11706
+ this.data = data.toString();
11707
+ }
11708
+
11709
+ NumericData.getBitsLength = function getBitsLength (length) {
11710
+ return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)
11711
+ };
11712
+
11713
+ NumericData.prototype.getLength = function getLength () {
11714
+ return this.data.length
11715
+ };
11716
+
11717
+ NumericData.prototype.getBitsLength = function getBitsLength () {
11718
+ return NumericData.getBitsLength(this.data.length)
11719
+ };
11720
+
11721
+ NumericData.prototype.write = function write (bitBuffer) {
11722
+ let i, group, value;
11723
+
11724
+ // The input data string is divided into groups of three digits,
11725
+ // and each group is converted to its 10-bit binary equivalent.
11726
+ for (i = 0; i + 3 <= this.data.length; i += 3) {
11727
+ group = this.data.substr(i, 3);
11728
+ value = parseInt(group, 10);
11729
+
11730
+ bitBuffer.put(value, 10);
11731
+ }
11732
+
11733
+ // If the number of input digits is not an exact multiple of three,
11734
+ // the final one or two digits are converted to 4 or 7 bits respectively.
11735
+ const remainingNum = this.data.length - i;
11736
+ if (remainingNum > 0) {
11737
+ group = this.data.substr(i);
11738
+ value = parseInt(group, 10);
11739
+
11740
+ bitBuffer.put(value, remainingNum * 3 + 1);
11741
+ }
11742
+ };
11743
+
11744
+ var numericData = NumericData;
11745
+
11746
+ /**
11747
+ * Array of characters available in alphanumeric mode
11748
+ *
11749
+ * As per QR Code specification, to each character
11750
+ * is assigned a value from 0 to 44 which in this case coincides
11751
+ * with the array index
11752
+ *
11753
+ * @type {Array}
11754
+ */
11755
+ const ALPHA_NUM_CHARS = [
11756
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
11757
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
11758
+ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
11759
+ ' ', '$', '%', '*', '+', '-', '.', '/', ':'
11760
+ ];
11761
+
11762
+ function AlphanumericData (data) {
11763
+ this.mode = mode.ALPHANUMERIC;
11764
+ this.data = data;
11765
+ }
11766
+
11767
+ AlphanumericData.getBitsLength = function getBitsLength (length) {
11768
+ return 11 * Math.floor(length / 2) + 6 * (length % 2)
11769
+ };
11770
+
11771
+ AlphanumericData.prototype.getLength = function getLength () {
11772
+ return this.data.length
11773
+ };
11774
+
11775
+ AlphanumericData.prototype.getBitsLength = function getBitsLength () {
11776
+ return AlphanumericData.getBitsLength(this.data.length)
11777
+ };
11778
+
11779
+ AlphanumericData.prototype.write = function write (bitBuffer) {
11780
+ let i;
11781
+
11782
+ // Input data characters are divided into groups of two characters
11783
+ // and encoded as 11-bit binary codes.
11784
+ for (i = 0; i + 2 <= this.data.length; i += 2) {
11785
+ // The character value of the first character is multiplied by 45
11786
+ let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45;
11787
+
11788
+ // The character value of the second digit is added to the product
11789
+ value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1]);
11790
+
11791
+ // The sum is then stored as 11-bit binary number
11792
+ bitBuffer.put(value, 11);
11793
+ }
11794
+
11795
+ // If the number of input data characters is not a multiple of two,
11796
+ // the character value of the final character is encoded as a 6-bit binary number.
11797
+ if (this.data.length % 2) {
11798
+ bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6);
11799
+ }
11800
+ };
11801
+
11802
+ var alphanumericData = AlphanumericData;
11803
+
11804
+ var encodeUtf8 = function encodeUtf8 (input) {
11805
+ var result = [];
11806
+ var size = input.length;
11807
+
11808
+ for (var index = 0; index < size; index++) {
11809
+ var point = input.charCodeAt(index);
11810
+
11811
+ if (point >= 0xD800 && point <= 0xDBFF && size > index + 1) {
11812
+ var second = input.charCodeAt(index + 1);
11813
+
11814
+ if (second >= 0xDC00 && second <= 0xDFFF) {
11815
+ // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
11816
+ point = (point - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
11817
+ index += 1;
11818
+ }
11819
+ }
11820
+
11821
+ // US-ASCII
11822
+ if (point < 0x80) {
11823
+ result.push(point);
11824
+ continue
11825
+ }
11826
+
11827
+ // 2-byte UTF-8
11828
+ if (point < 0x800) {
11829
+ result.push((point >> 6) | 192);
11830
+ result.push((point & 63) | 128);
11831
+ continue
11832
+ }
11833
+
11834
+ // 3-byte UTF-8
11835
+ if (point < 0xD800 || (point >= 0xE000 && point < 0x10000)) {
11836
+ result.push((point >> 12) | 224);
11837
+ result.push(((point >> 6) & 63) | 128);
11838
+ result.push((point & 63) | 128);
11839
+ continue
11840
+ }
11841
+
11842
+ // 4-byte UTF-8
11843
+ if (point >= 0x10000 && point <= 0x10FFFF) {
11844
+ result.push((point >> 18) | 240);
11845
+ result.push(((point >> 12) & 63) | 128);
11846
+ result.push(((point >> 6) & 63) | 128);
11847
+ result.push((point & 63) | 128);
11848
+ continue
11849
+ }
11850
+
11851
+ // Invalid character
11852
+ result.push(0xEF, 0xBF, 0xBD);
11853
+ }
11854
+
11855
+ return new Uint8Array(result).buffer
11856
+ };
11857
+
11858
+ function ByteData (data) {
11859
+ this.mode = mode.BYTE;
11860
+ if (typeof (data) === 'string') {
11861
+ data = encodeUtf8(data);
11862
+ }
11863
+ this.data = new Uint8Array(data);
11864
+ }
11865
+
11866
+ ByteData.getBitsLength = function getBitsLength (length) {
11867
+ return length * 8
11868
+ };
11869
+
11870
+ ByteData.prototype.getLength = function getLength () {
11871
+ return this.data.length
11872
+ };
11873
+
11874
+ ByteData.prototype.getBitsLength = function getBitsLength () {
11875
+ return ByteData.getBitsLength(this.data.length)
11876
+ };
11877
+
11878
+ ByteData.prototype.write = function (bitBuffer) {
11879
+ for (let i = 0, l = this.data.length; i < l; i++) {
11880
+ bitBuffer.put(this.data[i], 8);
11881
+ }
11882
+ };
11883
+
11884
+ var byteData = ByteData;
11885
+
11886
+ function KanjiData (data) {
11887
+ this.mode = mode.KANJI;
11888
+ this.data = data;
11889
+ }
11890
+
11891
+ KanjiData.getBitsLength = function getBitsLength (length) {
11892
+ return length * 13
11893
+ };
11894
+
11895
+ KanjiData.prototype.getLength = function getLength () {
11896
+ return this.data.length
11897
+ };
11898
+
11899
+ KanjiData.prototype.getBitsLength = function getBitsLength () {
11900
+ return KanjiData.getBitsLength(this.data.length)
11901
+ };
11902
+
11903
+ KanjiData.prototype.write = function (bitBuffer) {
11904
+ let i;
11905
+
11906
+ // In the Shift JIS system, Kanji characters are represented by a two byte combination.
11907
+ // These byte values are shifted from the JIS X 0208 values.
11908
+ // JIS X 0208 gives details of the shift coded representation.
11909
+ for (i = 0; i < this.data.length; i++) {
11910
+ let value = utils$1.toSJIS(this.data[i]);
11911
+
11912
+ // For characters with Shift JIS values from 0x8140 to 0x9FFC:
11913
+ if (value >= 0x8140 && value <= 0x9FFC) {
11914
+ // Subtract 0x8140 from Shift JIS value
11915
+ value -= 0x8140;
11916
+
11917
+ // For characters with Shift JIS values from 0xE040 to 0xEBBF
11918
+ } else if (value >= 0xE040 && value <= 0xEBBF) {
11919
+ // Subtract 0xC140 from Shift JIS value
11920
+ value -= 0xC140;
11921
+ } else {
11922
+ throw new Error(
11923
+ 'Invalid SJIS character: ' + this.data[i] + '\n' +
11924
+ 'Make sure your charset is UTF-8')
11925
+ }
11926
+
11927
+ // Multiply most significant byte of result by 0xC0
11928
+ // and add least significant byte to product
11929
+ value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff);
11930
+
11931
+ // Convert result to a 13-bit binary string
11932
+ bitBuffer.put(value, 13);
11933
+ }
11934
+ };
11935
+
11936
+ var kanjiData = KanjiData;
11937
+
11938
+ var dijkstra_1 = createCommonjsModule(function (module) {
11939
+
11940
+ /******************************************************************************
11941
+ * Created 2008-08-19.
11942
+ *
11943
+ * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.
11944
+ *
11945
+ * Copyright (C) 2008
11946
+ * Wyatt Baldwin <self@wyattbaldwin.com>
11947
+ * All rights reserved
11948
+ *
11949
+ * Licensed under the MIT license.
11950
+ *
11951
+ * http://www.opensource.org/licenses/mit-license.php
11952
+ *
11953
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11954
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11955
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
11956
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11957
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
11958
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
11959
+ * THE SOFTWARE.
11960
+ *****************************************************************************/
11961
+ var dijkstra = {
11962
+ single_source_shortest_paths: function(graph, s, d) {
11963
+ // Predecessor map for each node that has been encountered.
11964
+ // node ID => predecessor node ID
11965
+ var predecessors = {};
11966
+
11967
+ // Costs of shortest paths from s to all nodes encountered.
11968
+ // node ID => cost
11969
+ var costs = {};
11970
+ costs[s] = 0;
11971
+
11972
+ // Costs of shortest paths from s to all nodes encountered; differs from
11973
+ // `costs` in that it provides easy access to the node that currently has
11974
+ // the known shortest path from s.
11975
+ // XXX: Do we actually need both `costs` and `open`?
11976
+ var open = dijkstra.PriorityQueue.make();
11977
+ open.push(s, 0);
11978
+
11979
+ var closest,
11980
+ u, v,
11981
+ cost_of_s_to_u,
11982
+ adjacent_nodes,
11983
+ cost_of_e,
11984
+ cost_of_s_to_u_plus_cost_of_e,
11985
+ cost_of_s_to_v,
11986
+ first_visit;
11987
+ while (!open.empty()) {
11988
+ // In the nodes remaining in graph that have a known cost from s,
11989
+ // find the node, u, that currently has the shortest path from s.
11990
+ closest = open.pop();
11991
+ u = closest.value;
11992
+ cost_of_s_to_u = closest.cost;
11993
+
11994
+ // Get nodes adjacent to u...
11995
+ adjacent_nodes = graph[u] || {};
11996
+
11997
+ // ...and explore the edges that connect u to those nodes, updating
11998
+ // the cost of the shortest paths to any or all of those nodes as
11999
+ // necessary. v is the node across the current edge from u.
12000
+ for (v in adjacent_nodes) {
12001
+ if (adjacent_nodes.hasOwnProperty(v)) {
12002
+ // Get the cost of the edge running from u to v.
12003
+ cost_of_e = adjacent_nodes[v];
12004
+
12005
+ // Cost of s to u plus the cost of u to v across e--this is *a*
12006
+ // cost from s to v that may or may not be less than the current
12007
+ // known cost to v.
12008
+ cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;
12009
+
12010
+ // If we haven't visited v yet OR if the current known cost from s to
12011
+ // v is greater than the new cost we just found (cost of s to u plus
12012
+ // cost of u to v across e), update v's cost in the cost list and
12013
+ // update v's predecessor in the predecessor list (it's now u).
12014
+ cost_of_s_to_v = costs[v];
12015
+ first_visit = (typeof costs[v] === 'undefined');
12016
+ if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {
12017
+ costs[v] = cost_of_s_to_u_plus_cost_of_e;
12018
+ open.push(v, cost_of_s_to_u_plus_cost_of_e);
12019
+ predecessors[v] = u;
12020
+ }
12021
+ }
12022
+ }
12023
+ }
12024
+
12025
+ if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {
12026
+ var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');
12027
+ throw new Error(msg);
12028
+ }
12029
+
12030
+ return predecessors;
12031
+ },
12032
+
12033
+ extract_shortest_path_from_predecessor_list: function(predecessors, d) {
12034
+ var nodes = [];
12035
+ var u = d;
12036
+ while (u) {
12037
+ nodes.push(u);
12038
+ u = predecessors[u];
12039
+ }
12040
+ nodes.reverse();
12041
+ return nodes;
12042
+ },
12043
+
12044
+ find_path: function(graph, s, d) {
12045
+ var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);
12046
+ return dijkstra.extract_shortest_path_from_predecessor_list(
12047
+ predecessors, d);
12048
+ },
12049
+
12050
+ /**
12051
+ * A very naive priority queue implementation.
12052
+ */
12053
+ PriorityQueue: {
12054
+ make: function (opts) {
12055
+ var T = dijkstra.PriorityQueue,
12056
+ t = {},
12057
+ key;
12058
+ opts = opts || {};
12059
+ for (key in T) {
12060
+ if (T.hasOwnProperty(key)) {
12061
+ t[key] = T[key];
12062
+ }
12063
+ }
12064
+ t.queue = [];
12065
+ t.sorter = opts.sorter || T.default_sorter;
12066
+ return t;
12067
+ },
12068
+
12069
+ default_sorter: function (a, b) {
12070
+ return a.cost - b.cost;
12071
+ },
12072
+
12073
+ /**
12074
+ * Add a new item to the queue and ensure the highest priority element
12075
+ * is at the front of the queue.
12076
+ */
12077
+ push: function (value, cost) {
12078
+ var item = {value: value, cost: cost};
12079
+ this.queue.push(item);
12080
+ this.queue.sort(this.sorter);
12081
+ },
12082
+
12083
+ /**
12084
+ * Return the highest priority element in the queue.
12085
+ */
12086
+ pop: function () {
12087
+ return this.queue.shift();
12088
+ },
12089
+
12090
+ empty: function () {
12091
+ return this.queue.length === 0;
12092
+ }
12093
+ }
12094
+ };
12095
+
12096
+
12097
+ // node.js module exports
12098
+ {
12099
+ module.exports = dijkstra;
12100
+ }
12101
+ });
12102
+
12103
+ var segments = createCommonjsModule(function (module, exports) {
12104
+ /**
12105
+ * Returns UTF8 byte length
12106
+ *
12107
+ * @param {String} str Input string
12108
+ * @return {Number} Number of byte
12109
+ */
12110
+ function getStringByteLength (str) {
12111
+ return unescape(encodeURIComponent(str)).length
12112
+ }
12113
+
12114
+ /**
12115
+ * Get a list of segments of the specified mode
12116
+ * from a string
12117
+ *
12118
+ * @param {Mode} mode Segment mode
12119
+ * @param {String} str String to process
12120
+ * @return {Array} Array of object with segments data
12121
+ */
12122
+ function getSegments (regex, mode, str) {
12123
+ const segments = [];
12124
+ let result;
12125
+
12126
+ while ((result = regex.exec(str)) !== null) {
12127
+ segments.push({
12128
+ data: result[0],
12129
+ index: result.index,
12130
+ mode: mode,
12131
+ length: result[0].length
12132
+ });
12133
+ }
12134
+
12135
+ return segments
12136
+ }
12137
+
12138
+ /**
12139
+ * Extracts a series of segments with the appropriate
12140
+ * modes from a string
12141
+ *
12142
+ * @param {String} dataStr Input string
12143
+ * @return {Array} Array of object with segments data
12144
+ */
12145
+ function getSegmentsFromString (dataStr) {
12146
+ const numSegs = getSegments(regex.NUMERIC, mode.NUMERIC, dataStr);
12147
+ const alphaNumSegs = getSegments(regex.ALPHANUMERIC, mode.ALPHANUMERIC, dataStr);
12148
+ let byteSegs;
12149
+ let kanjiSegs;
12150
+
12151
+ if (utils$1.isKanjiModeEnabled()) {
12152
+ byteSegs = getSegments(regex.BYTE, mode.BYTE, dataStr);
12153
+ kanjiSegs = getSegments(regex.KANJI, mode.KANJI, dataStr);
12154
+ } else {
12155
+ byteSegs = getSegments(regex.BYTE_KANJI, mode.BYTE, dataStr);
12156
+ kanjiSegs = [];
12157
+ }
12158
+
12159
+ const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs);
12160
+
12161
+ return segs
12162
+ .sort(function (s1, s2) {
12163
+ return s1.index - s2.index
12164
+ })
12165
+ .map(function (obj) {
12166
+ return {
12167
+ data: obj.data,
12168
+ mode: obj.mode,
12169
+ length: obj.length
12170
+ }
12171
+ })
12172
+ }
12173
+
12174
+ /**
12175
+ * Returns how many bits are needed to encode a string of
12176
+ * specified length with the specified mode
12177
+ *
12178
+ * @param {Number} length String length
12179
+ * @param {Mode} mode Segment mode
12180
+ * @return {Number} Bit length
12181
+ */
12182
+ function getSegmentBitsLength (length, mode$1) {
12183
+ switch (mode$1) {
12184
+ case mode.NUMERIC:
12185
+ return numericData.getBitsLength(length)
12186
+ case mode.ALPHANUMERIC:
12187
+ return alphanumericData.getBitsLength(length)
12188
+ case mode.KANJI:
12189
+ return kanjiData.getBitsLength(length)
12190
+ case mode.BYTE:
12191
+ return byteData.getBitsLength(length)
12192
+ }
12193
+ }
12194
+
12195
+ /**
12196
+ * Merges adjacent segments which have the same mode
12197
+ *
12198
+ * @param {Array} segs Array of object with segments data
12199
+ * @return {Array} Array of object with segments data
12200
+ */
12201
+ function mergeSegments (segs) {
12202
+ return segs.reduce(function (acc, curr) {
12203
+ const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null;
12204
+ if (prevSeg && prevSeg.mode === curr.mode) {
12205
+ acc[acc.length - 1].data += curr.data;
12206
+ return acc
12207
+ }
12208
+
12209
+ acc.push(curr);
12210
+ return acc
12211
+ }, [])
12212
+ }
12213
+
12214
+ /**
12215
+ * Generates a list of all possible nodes combination which
12216
+ * will be used to build a segments graph.
12217
+ *
12218
+ * Nodes are divided by groups. Each group will contain a list of all the modes
12219
+ * in which is possible to encode the given text.
12220
+ *
12221
+ * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.
12222
+ * The group for '12345' will contain then 3 objects, one for each
12223
+ * possible encoding mode.
12224
+ *
12225
+ * Each node represents a possible segment.
12226
+ *
12227
+ * @param {Array} segs Array of object with segments data
12228
+ * @return {Array} Array of object with segments data
12229
+ */
12230
+ function buildNodes (segs) {
12231
+ const nodes = [];
12232
+ for (let i = 0; i < segs.length; i++) {
12233
+ const seg = segs[i];
12234
+
12235
+ switch (seg.mode) {
12236
+ case mode.NUMERIC:
12237
+ nodes.push([seg,
12238
+ { data: seg.data, mode: mode.ALPHANUMERIC, length: seg.length },
12239
+ { data: seg.data, mode: mode.BYTE, length: seg.length }
12240
+ ]);
12241
+ break
12242
+ case mode.ALPHANUMERIC:
12243
+ nodes.push([seg,
12244
+ { data: seg.data, mode: mode.BYTE, length: seg.length }
12245
+ ]);
12246
+ break
12247
+ case mode.KANJI:
12248
+ nodes.push([seg,
12249
+ { data: seg.data, mode: mode.BYTE, length: getStringByteLength(seg.data) }
12250
+ ]);
12251
+ break
12252
+ case mode.BYTE:
12253
+ nodes.push([
12254
+ { data: seg.data, mode: mode.BYTE, length: getStringByteLength(seg.data) }
12255
+ ]);
12256
+ }
12257
+ }
12258
+
12259
+ return nodes
12260
+ }
12261
+
12262
+ /**
12263
+ * Builds a graph from a list of nodes.
12264
+ * All segments in each node group will be connected with all the segments of
12265
+ * the next group and so on.
12266
+ *
12267
+ * At each connection will be assigned a weight depending on the
12268
+ * segment's byte length.
12269
+ *
12270
+ * @param {Array} nodes Array of object with segments data
12271
+ * @param {Number} version QR Code version
12272
+ * @return {Object} Graph of all possible segments
12273
+ */
12274
+ function buildGraph (nodes, version) {
12275
+ const table = {};
12276
+ const graph = { start: {} };
12277
+ let prevNodeIds = ['start'];
12278
+
12279
+ for (let i = 0; i < nodes.length; i++) {
12280
+ const nodeGroup = nodes[i];
12281
+ const currentNodeIds = [];
12282
+
12283
+ for (let j = 0; j < nodeGroup.length; j++) {
12284
+ const node = nodeGroup[j];
12285
+ const key = '' + i + j;
12286
+
12287
+ currentNodeIds.push(key);
12288
+ table[key] = { node: node, lastCount: 0 };
12289
+ graph[key] = {};
12290
+
12291
+ for (let n = 0; n < prevNodeIds.length; n++) {
12292
+ const prevNodeId = prevNodeIds[n];
12293
+
12294
+ if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {
12295
+ graph[prevNodeId][key] =
12296
+ getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -
12297
+ getSegmentBitsLength(table[prevNodeId].lastCount, node.mode);
12298
+
12299
+ table[prevNodeId].lastCount += node.length;
12300
+ } else {
12301
+ if (table[prevNodeId]) table[prevNodeId].lastCount = node.length;
12302
+
12303
+ graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +
12304
+ 4 + mode.getCharCountIndicator(node.mode, version); // switch cost
12305
+ }
12306
+ }
12307
+ }
12308
+
12309
+ prevNodeIds = currentNodeIds;
12310
+ }
12311
+
12312
+ for (let n = 0; n < prevNodeIds.length; n++) {
12313
+ graph[prevNodeIds[n]].end = 0;
12314
+ }
12315
+
12316
+ return { map: graph, table: table }
12317
+ }
12318
+
12319
+ /**
12320
+ * Builds a segment from a specified data and mode.
12321
+ * If a mode is not specified, the more suitable will be used.
12322
+ *
12323
+ * @param {String} data Input data
12324
+ * @param {Mode | String} modesHint Data mode
12325
+ * @return {Segment} Segment
12326
+ */
12327
+ function buildSingleSegment (data, modesHint) {
12328
+ let mode$1;
12329
+ const bestMode = mode.getBestModeForData(data);
12330
+
12331
+ mode$1 = mode.from(modesHint, bestMode);
12332
+
12333
+ // Make sure data can be encoded
12334
+ if (mode$1 !== mode.BYTE && mode$1.bit < bestMode.bit) {
12335
+ throw new Error('"' + data + '"' +
12336
+ ' cannot be encoded with mode ' + mode.toString(mode$1) +
12337
+ '.\n Suggested mode is: ' + mode.toString(bestMode))
12338
+ }
12339
+
12340
+ // Use Mode.BYTE if Kanji support is disabled
12341
+ if (mode$1 === mode.KANJI && !utils$1.isKanjiModeEnabled()) {
12342
+ mode$1 = mode.BYTE;
12343
+ }
12344
+
12345
+ switch (mode$1) {
12346
+ case mode.NUMERIC:
12347
+ return new numericData(data)
12348
+
12349
+ case mode.ALPHANUMERIC:
12350
+ return new alphanumericData(data)
12351
+
12352
+ case mode.KANJI:
12353
+ return new kanjiData(data)
12354
+
12355
+ case mode.BYTE:
12356
+ return new byteData(data)
12357
+ }
12358
+ }
12359
+
12360
+ /**
12361
+ * Builds a list of segments from an array.
12362
+ * Array can contain Strings or Objects with segment's info.
12363
+ *
12364
+ * For each item which is a string, will be generated a segment with the given
12365
+ * string and the more appropriate encoding mode.
12366
+ *
12367
+ * For each item which is an object, will be generated a segment with the given
12368
+ * data and mode.
12369
+ * Objects must contain at least the property "data".
12370
+ * If property "mode" is not present, the more suitable mode will be used.
12371
+ *
12372
+ * @param {Array} array Array of objects with segments data
12373
+ * @return {Array} Array of Segments
12374
+ */
12375
+ exports.fromArray = function fromArray (array) {
12376
+ return array.reduce(function (acc, seg) {
12377
+ if (typeof seg === 'string') {
12378
+ acc.push(buildSingleSegment(seg, null));
12379
+ } else if (seg.data) {
12380
+ acc.push(buildSingleSegment(seg.data, seg.mode));
12381
+ }
12382
+
12383
+ return acc
12384
+ }, [])
12385
+ };
12386
+
12387
+ /**
12388
+ * Builds an optimized sequence of segments from a string,
12389
+ * which will produce the shortest possible bitstream.
12390
+ *
12391
+ * @param {String} data Input string
12392
+ * @param {Number} version QR Code version
12393
+ * @return {Array} Array of segments
12394
+ */
12395
+ exports.fromString = function fromString (data, version) {
12396
+ const segs = getSegmentsFromString(data, utils$1.isKanjiModeEnabled());
12397
+
12398
+ const nodes = buildNodes(segs);
12399
+ const graph = buildGraph(nodes, version);
12400
+ const path = dijkstra_1.find_path(graph.map, 'start', 'end');
12401
+
12402
+ const optimizedSegs = [];
12403
+ for (let i = 1; i < path.length - 1; i++) {
12404
+ optimizedSegs.push(graph.table[path[i]].node);
12405
+ }
12406
+
12407
+ return exports.fromArray(mergeSegments(optimizedSegs))
12408
+ };
12409
+
12410
+ /**
12411
+ * Splits a string in various segments with the modes which
12412
+ * best represent their content.
12413
+ * The produced segments are far from being optimized.
12414
+ * The output of this function is only used to estimate a QR Code version
12415
+ * which may contain the data.
12416
+ *
12417
+ * @param {string} data Input string
12418
+ * @return {Array} Array of segments
12419
+ */
12420
+ exports.rawSplit = function rawSplit (data) {
12421
+ return exports.fromArray(
12422
+ getSegmentsFromString(data, utils$1.isKanjiModeEnabled())
12423
+ )
12424
+ };
12425
+ });
12426
+
12427
+ /**
12428
+ * QRCode for JavaScript
12429
+ *
12430
+ * modified by Ryan Day for nodejs support
12431
+ * Copyright (c) 2011 Ryan Day
12432
+ *
12433
+ * Licensed under the MIT license:
12434
+ * http://www.opensource.org/licenses/mit-license.php
12435
+ *
12436
+ //---------------------------------------------------------------------
12437
+ // QRCode for JavaScript
12438
+ //
12439
+ // Copyright (c) 2009 Kazuhiko Arase
12440
+ //
12441
+ // URL: http://www.d-project.com/
12442
+ //
12443
+ // Licensed under the MIT license:
12444
+ // http://www.opensource.org/licenses/mit-license.php
12445
+ //
12446
+ // The word "QR Code" is registered trademark of
12447
+ // DENSO WAVE INCORPORATED
12448
+ // http://www.denso-wave.com/qrcode/faqpatent-e.html
12449
+ //
12450
+ //---------------------------------------------------------------------
12451
+ */
12452
+
12453
+ /**
12454
+ * Add finder patterns bits to matrix
12455
+ *
12456
+ * @param {BitMatrix} matrix Modules matrix
12457
+ * @param {Number} version QR Code version
12458
+ */
12459
+ function setupFinderPattern (matrix, version) {
12460
+ const size = matrix.size;
12461
+ const pos = finderPattern.getPositions(version);
12462
+
12463
+ for (let i = 0; i < pos.length; i++) {
12464
+ const row = pos[i][0];
12465
+ const col = pos[i][1];
12466
+
12467
+ for (let r = -1; r <= 7; r++) {
12468
+ if (row + r <= -1 || size <= row + r) continue
12469
+
12470
+ for (let c = -1; c <= 7; c++) {
12471
+ if (col + c <= -1 || size <= col + c) continue
12472
+
12473
+ if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||
12474
+ (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||
12475
+ (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {
12476
+ matrix.set(row + r, col + c, true, true);
12477
+ } else {
12478
+ matrix.set(row + r, col + c, false, true);
12479
+ }
12480
+ }
12481
+ }
12482
+ }
12483
+ }
12484
+
12485
+ /**
12486
+ * Add timing pattern bits to matrix
12487
+ *
12488
+ * Note: this function must be called before {@link setupAlignmentPattern}
12489
+ *
12490
+ * @param {BitMatrix} matrix Modules matrix
12491
+ */
12492
+ function setupTimingPattern (matrix) {
12493
+ const size = matrix.size;
12494
+
12495
+ for (let r = 8; r < size - 8; r++) {
12496
+ const value = r % 2 === 0;
12497
+ matrix.set(r, 6, value, true);
12498
+ matrix.set(6, r, value, true);
12499
+ }
12500
+ }
12501
+
12502
+ /**
12503
+ * Add alignment patterns bits to matrix
12504
+ *
12505
+ * Note: this function must be called after {@link setupTimingPattern}
12506
+ *
12507
+ * @param {BitMatrix} matrix Modules matrix
12508
+ * @param {Number} version QR Code version
12509
+ */
12510
+ function setupAlignmentPattern (matrix, version) {
12511
+ const pos = alignmentPattern.getPositions(version);
12512
+
12513
+ for (let i = 0; i < pos.length; i++) {
12514
+ const row = pos[i][0];
12515
+ const col = pos[i][1];
12516
+
12517
+ for (let r = -2; r <= 2; r++) {
12518
+ for (let c = -2; c <= 2; c++) {
12519
+ if (r === -2 || r === 2 || c === -2 || c === 2 ||
12520
+ (r === 0 && c === 0)) {
12521
+ matrix.set(row + r, col + c, true, true);
12522
+ } else {
12523
+ matrix.set(row + r, col + c, false, true);
12524
+ }
12525
+ }
12526
+ }
12527
+ }
12528
+ }
12529
+
12530
+ /**
12531
+ * Add version info bits to matrix
12532
+ *
12533
+ * @param {BitMatrix} matrix Modules matrix
12534
+ * @param {Number} version QR Code version
12535
+ */
12536
+ function setupVersionInfo (matrix, version$1) {
12537
+ const size = matrix.size;
12538
+ const bits = version.getEncodedBits(version$1);
12539
+ let row, col, mod;
12540
+
12541
+ for (let i = 0; i < 18; i++) {
12542
+ row = Math.floor(i / 3);
12543
+ col = i % 3 + size - 8 - 3;
12544
+ mod = ((bits >> i) & 1) === 1;
12545
+
12546
+ matrix.set(row, col, mod, true);
12547
+ matrix.set(col, row, mod, true);
12548
+ }
12549
+ }
12550
+
12551
+ /**
12552
+ * Add format info bits to matrix
12553
+ *
12554
+ * @param {BitMatrix} matrix Modules matrix
12555
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
12556
+ * @param {Number} maskPattern Mask pattern reference value
12557
+ */
12558
+ function setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {
12559
+ const size = matrix.size;
12560
+ const bits = formatInfo.getEncodedBits(errorCorrectionLevel, maskPattern);
12561
+ let i, mod;
12562
+
12563
+ for (i = 0; i < 15; i++) {
12564
+ mod = ((bits >> i) & 1) === 1;
12565
+
12566
+ // vertical
12567
+ if (i < 6) {
12568
+ matrix.set(i, 8, mod, true);
12569
+ } else if (i < 8) {
12570
+ matrix.set(i + 1, 8, mod, true);
12571
+ } else {
12572
+ matrix.set(size - 15 + i, 8, mod, true);
12573
+ }
12574
+
12575
+ // horizontal
12576
+ if (i < 8) {
12577
+ matrix.set(8, size - i - 1, mod, true);
12578
+ } else if (i < 9) {
12579
+ matrix.set(8, 15 - i - 1 + 1, mod, true);
12580
+ } else {
12581
+ matrix.set(8, 15 - i - 1, mod, true);
12582
+ }
12583
+ }
12584
+
12585
+ // fixed module
12586
+ matrix.set(size - 8, 8, 1, true);
12587
+ }
12588
+
12589
+ /**
12590
+ * Add encoded data bits to matrix
12591
+ *
12592
+ * @param {BitMatrix} matrix Modules matrix
12593
+ * @param {Uint8Array} data Data codewords
12594
+ */
12595
+ function setupData (matrix, data) {
12596
+ const size = matrix.size;
12597
+ let inc = -1;
12598
+ let row = size - 1;
12599
+ let bitIndex = 7;
12600
+ let byteIndex = 0;
12601
+
12602
+ for (let col = size - 1; col > 0; col -= 2) {
12603
+ if (col === 6) col--;
12604
+
12605
+ while (true) {
12606
+ for (let c = 0; c < 2; c++) {
12607
+ if (!matrix.isReserved(row, col - c)) {
12608
+ let dark = false;
12609
+
12610
+ if (byteIndex < data.length) {
12611
+ dark = (((data[byteIndex] >>> bitIndex) & 1) === 1);
12612
+ }
12613
+
12614
+ matrix.set(row, col - c, dark);
12615
+ bitIndex--;
12616
+
12617
+ if (bitIndex === -1) {
12618
+ byteIndex++;
12619
+ bitIndex = 7;
12620
+ }
12621
+ }
12622
+ }
12623
+
12624
+ row += inc;
12625
+
12626
+ if (row < 0 || size <= row) {
12627
+ row -= inc;
12628
+ inc = -inc;
12629
+ break
12630
+ }
12631
+ }
12632
+ }
12633
+ }
12634
+
12635
+ /**
12636
+ * Create encoded codewords from data input
12637
+ *
12638
+ * @param {Number} version QR Code version
12639
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
12640
+ * @param {ByteData} data Data input
12641
+ * @return {Uint8Array} Buffer containing encoded codewords
12642
+ */
12643
+ function createData (version, errorCorrectionLevel, segments) {
12644
+ // Prepare data buffer
12645
+ const buffer = new bitBuffer();
12646
+
12647
+ segments.forEach(function (data) {
12648
+ // prefix data with mode indicator (4 bits)
12649
+ buffer.put(data.mode.bit, 4);
12650
+
12651
+ // Prefix data with character count indicator.
12652
+ // The character count indicator is a string of bits that represents the
12653
+ // number of characters that are being encoded.
12654
+ // The character count indicator must be placed after the mode indicator
12655
+ // and must be a certain number of bits long, depending on the QR version
12656
+ // and data mode
12657
+ // @see {@link Mode.getCharCountIndicator}.
12658
+ buffer.put(data.getLength(), mode.getCharCountIndicator(data.mode, version));
12659
+
12660
+ // add binary data sequence to buffer
12661
+ data.write(buffer);
12662
+ });
12663
+
12664
+ // Calculate required number of bits
12665
+ const totalCodewords = utils$1.getSymbolTotalCodewords(version);
12666
+ const ecTotalCodewords = errorCorrectionCode.getTotalCodewordsCount(version, errorCorrectionLevel);
12667
+ const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
12668
+
12669
+ // Add a terminator.
12670
+ // If the bit string is shorter than the total number of required bits,
12671
+ // a terminator of up to four 0s must be added to the right side of the string.
12672
+ // If the bit string is more than four bits shorter than the required number of bits,
12673
+ // add four 0s to the end.
12674
+ if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {
12675
+ buffer.put(0, 4);
12676
+ }
12677
+
12678
+ // If the bit string is fewer than four bits shorter, add only the number of 0s that
12679
+ // are needed to reach the required number of bits.
12680
+
12681
+ // After adding the terminator, if the number of bits in the string is not a multiple of 8,
12682
+ // pad the string on the right with 0s to make the string's length a multiple of 8.
12683
+ while (buffer.getLengthInBits() % 8 !== 0) {
12684
+ buffer.putBit(0);
12685
+ }
12686
+
12687
+ // Add pad bytes if the string is still shorter than the total number of required bits.
12688
+ // Extend the buffer to fill the data capacity of the symbol corresponding to
12689
+ // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)
12690
+ // and 00010001 (0x11) alternately.
12691
+ const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8;
12692
+ for (let i = 0; i < remainingByte; i++) {
12693
+ buffer.put(i % 2 ? 0x11 : 0xEC, 8);
12694
+ }
12695
+
12696
+ return createCodewords(buffer, version, errorCorrectionLevel)
12697
+ }
12698
+
12699
+ /**
12700
+ * Encode input data with Reed-Solomon and return codewords with
12701
+ * relative error correction bits
12702
+ *
12703
+ * @param {BitBuffer} bitBuffer Data to encode
12704
+ * @param {Number} version QR Code version
12705
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
12706
+ * @return {Uint8Array} Buffer containing encoded codewords
12707
+ */
12708
+ function createCodewords (bitBuffer, version, errorCorrectionLevel) {
12709
+ // Total codewords for this QR code version (Data + Error correction)
12710
+ const totalCodewords = utils$1.getSymbolTotalCodewords(version);
12711
+
12712
+ // Total number of error correction codewords
12713
+ const ecTotalCodewords = errorCorrectionCode.getTotalCodewordsCount(version, errorCorrectionLevel);
12714
+
12715
+ // Total number of data codewords
12716
+ const dataTotalCodewords = totalCodewords - ecTotalCodewords;
12717
+
12718
+ // Total number of blocks
12719
+ const ecTotalBlocks = errorCorrectionCode.getBlocksCount(version, errorCorrectionLevel);
12720
+
12721
+ // Calculate how many blocks each group should contain
12722
+ const blocksInGroup2 = totalCodewords % ecTotalBlocks;
12723
+ const blocksInGroup1 = ecTotalBlocks - blocksInGroup2;
12724
+
12725
+ const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks);
12726
+
12727
+ const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks);
12728
+ const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1;
12729
+
12730
+ // Number of EC codewords is the same for both groups
12731
+ const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1;
12732
+
12733
+ // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount
12734
+ const rs = new reedSolomonEncoder(ecCount);
12735
+
12736
+ let offset = 0;
12737
+ const dcData = new Array(ecTotalBlocks);
12738
+ const ecData = new Array(ecTotalBlocks);
12739
+ let maxDataSize = 0;
12740
+ const buffer = new Uint8Array(bitBuffer.buffer);
12741
+
12742
+ // Divide the buffer into the required number of blocks
12743
+ for (let b = 0; b < ecTotalBlocks; b++) {
12744
+ const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2;
12745
+
12746
+ // extract a block of data from buffer
12747
+ dcData[b] = buffer.slice(offset, offset + dataSize);
12748
+
12749
+ // Calculate EC codewords for this data block
12750
+ ecData[b] = rs.encode(dcData[b]);
12751
+
12752
+ offset += dataSize;
12753
+ maxDataSize = Math.max(maxDataSize, dataSize);
12754
+ }
12755
+
12756
+ // Create final data
12757
+ // Interleave the data and error correction codewords from each block
12758
+ const data = new Uint8Array(totalCodewords);
12759
+ let index = 0;
12760
+ let i, r;
12761
+
12762
+ // Add data codewords
12763
+ for (i = 0; i < maxDataSize; i++) {
12764
+ for (r = 0; r < ecTotalBlocks; r++) {
12765
+ if (i < dcData[r].length) {
12766
+ data[index++] = dcData[r][i];
12767
+ }
12768
+ }
12769
+ }
12770
+
12771
+ // Apped EC codewords
12772
+ for (i = 0; i < ecCount; i++) {
12773
+ for (r = 0; r < ecTotalBlocks; r++) {
12774
+ data[index++] = ecData[r][i];
12775
+ }
12776
+ }
12777
+
12778
+ return data
12779
+ }
12780
+
12781
+ /**
12782
+ * Build QR Code symbol
12783
+ *
12784
+ * @param {String} data Input string
12785
+ * @param {Number} version QR Code version
12786
+ * @param {ErrorCorretionLevel} errorCorrectionLevel Error level
12787
+ * @param {MaskPattern} maskPattern Mask pattern
12788
+ * @return {Object} Object containing symbol data
12789
+ */
12790
+ function createSymbol (data, version$1, errorCorrectionLevel, maskPattern$1) {
12791
+ let segments$1;
12792
+
12793
+ if (Array.isArray(data)) {
12794
+ segments$1 = segments.fromArray(data);
12795
+ } else if (typeof data === 'string') {
12796
+ let estimatedVersion = version$1;
12797
+
12798
+ if (!estimatedVersion) {
12799
+ const rawSegments = segments.rawSplit(data);
12800
+
12801
+ // Estimate best version that can contain raw splitted segments
12802
+ estimatedVersion = version.getBestVersionForData(rawSegments, errorCorrectionLevel);
12803
+ }
12804
+
12805
+ // Build optimized segments
12806
+ // If estimated version is undefined, try with the highest version
12807
+ segments$1 = segments.fromString(data, estimatedVersion || 40);
12808
+ } else {
12809
+ throw new Error('Invalid data')
12810
+ }
12811
+
12812
+ // Get the min version that can contain data
12813
+ const bestVersion = version.getBestVersionForData(segments$1, errorCorrectionLevel);
12814
+
12815
+ // If no version is found, data cannot be stored
12816
+ if (!bestVersion) {
12817
+ throw new Error('The amount of data is too big to be stored in a QR Code')
12818
+ }
12819
+
12820
+ // If not specified, use min version as default
12821
+ if (!version$1) {
12822
+ version$1 = bestVersion;
12823
+
12824
+ // Check if the specified version can contain the data
12825
+ } else if (version$1 < bestVersion) {
12826
+ throw new Error('\n' +
12827
+ 'The chosen QR Code version cannot contain this amount of data.\n' +
12828
+ 'Minimum version required to store current data is: ' + bestVersion + '.\n'
12829
+ )
12830
+ }
12831
+
12832
+ const dataBits = createData(version$1, errorCorrectionLevel, segments$1);
12833
+
12834
+ // Allocate matrix buffer
12835
+ const moduleCount = utils$1.getSymbolSize(version$1);
12836
+ const modules = new bitMatrix(moduleCount);
12837
+
12838
+ // Add function modules
12839
+ setupFinderPattern(modules, version$1);
12840
+ setupTimingPattern(modules);
12841
+ setupAlignmentPattern(modules, version$1);
12842
+
12843
+ // Add temporary dummy bits for format info just to set them as reserved.
12844
+ // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}
12845
+ // since the masking operation must be performed only on the encoding region.
12846
+ // These blocks will be replaced with correct values later in code.
12847
+ setupFormatInfo(modules, errorCorrectionLevel, 0);
12848
+
12849
+ if (version$1 >= 7) {
12850
+ setupVersionInfo(modules, version$1);
12851
+ }
12852
+
12853
+ // Add data codewords
12854
+ setupData(modules, dataBits);
12855
+
12856
+ if (isNaN(maskPattern$1)) {
12857
+ // Find best mask pattern
12858
+ maskPattern$1 = maskPattern.getBestMask(modules,
12859
+ setupFormatInfo.bind(null, modules, errorCorrectionLevel));
12860
+ }
12861
+
12862
+ // Apply mask pattern
12863
+ maskPattern.applyMask(maskPattern$1, modules);
12864
+
12865
+ // Replace format info bits with correct values
12866
+ setupFormatInfo(modules, errorCorrectionLevel, maskPattern$1);
12867
+
12868
+ return {
12869
+ modules: modules,
12870
+ version: version$1,
12871
+ errorCorrectionLevel: errorCorrectionLevel,
12872
+ maskPattern: maskPattern$1,
12873
+ segments: segments$1
12874
+ }
12875
+ }
12876
+
12877
+ /**
12878
+ * QR Code
12879
+ *
12880
+ * @param {String | Array} data Input data
12881
+ * @param {Object} options Optional configurations
12882
+ * @param {Number} options.version QR Code version
12883
+ * @param {String} options.errorCorrectionLevel Error correction level
12884
+ * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis
12885
+ */
12886
+ var create$1 = function create (data, options) {
12887
+ if (typeof data === 'undefined' || data === '') {
12888
+ throw new Error('No input text')
12889
+ }
12890
+
12891
+ let errorCorrectionLevel$1 = errorCorrectionLevel.M;
12892
+ let version$1;
12893
+ let mask;
12894
+
12895
+ if (typeof options !== 'undefined') {
12896
+ // Use higher error correction level as default
12897
+ errorCorrectionLevel$1 = errorCorrectionLevel.from(options.errorCorrectionLevel, errorCorrectionLevel.M);
12898
+ version$1 = version.from(options.version);
12899
+ mask = maskPattern.from(options.maskPattern);
12900
+
12901
+ if (options.toSJISFunc) {
12902
+ utils$1.setToSJISFunction(options.toSJISFunc);
12903
+ }
12904
+ }
12905
+
12906
+ return createSymbol(data, version$1, errorCorrectionLevel$1, mask)
12907
+ };
12908
+
12909
+ var qrcode = {
12910
+ create: create$1
12911
+ };
12912
+
12913
+ var utils = createCommonjsModule(function (module, exports) {
12914
+ function hex2rgba (hex) {
12915
+ if (typeof hex === 'number') {
12916
+ hex = hex.toString();
12917
+ }
12918
+
12919
+ if (typeof hex !== 'string') {
12920
+ throw new Error('Color should be defined as hex string')
12921
+ }
12922
+
12923
+ let hexCode = hex.slice().replace('#', '').split('');
12924
+ if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {
12925
+ throw new Error('Invalid hex color: ' + hex)
12926
+ }
12927
+
12928
+ // Convert from short to long form (fff -> ffffff)
12929
+ if (hexCode.length === 3 || hexCode.length === 4) {
12930
+ hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {
12931
+ return [c, c]
12932
+ }));
12933
+ }
12934
+
12935
+ // Add default alpha value
12936
+ if (hexCode.length === 6) hexCode.push('F', 'F');
12937
+
12938
+ const hexValue = parseInt(hexCode.join(''), 16);
12939
+
12940
+ return {
12941
+ r: (hexValue >> 24) & 255,
12942
+ g: (hexValue >> 16) & 255,
12943
+ b: (hexValue >> 8) & 255,
12944
+ a: hexValue & 255,
12945
+ hex: '#' + hexCode.slice(0, 6).join('')
12946
+ }
12947
+ }
12948
+
12949
+ exports.getOptions = function getOptions (options) {
12950
+ if (!options) options = {};
12951
+ if (!options.color) options.color = {};
12952
+
12953
+ const margin = typeof options.margin === 'undefined' ||
12954
+ options.margin === null ||
12955
+ options.margin < 0
12956
+ ? 4
12957
+ : options.margin;
12958
+
12959
+ const width = options.width && options.width >= 21 ? options.width : undefined;
12960
+ const scale = options.scale || 4;
12961
+
12962
+ return {
12963
+ width: width,
12964
+ scale: width ? 4 : scale,
12965
+ margin: margin,
12966
+ color: {
12967
+ dark: hex2rgba(options.color.dark || '#000000ff'),
12968
+ light: hex2rgba(options.color.light || '#ffffffff')
12969
+ },
12970
+ type: options.type,
12971
+ rendererOpts: options.rendererOpts || {}
12972
+ }
12973
+ };
12974
+
12975
+ exports.getScale = function getScale (qrSize, opts) {
12976
+ return opts.width && opts.width >= qrSize + opts.margin * 2
12977
+ ? opts.width / (qrSize + opts.margin * 2)
12978
+ : opts.scale
12979
+ };
12980
+
12981
+ exports.getImageWidth = function getImageWidth (qrSize, opts) {
12982
+ const scale = exports.getScale(qrSize, opts);
12983
+ return Math.floor((qrSize + opts.margin * 2) * scale)
12984
+ };
12985
+
12986
+ exports.qrToImageData = function qrToImageData (imgData, qr, opts) {
12987
+ const size = qr.modules.size;
12988
+ const data = qr.modules.data;
12989
+ const scale = exports.getScale(size, opts);
12990
+ const symbolSize = Math.floor((size + opts.margin * 2) * scale);
12991
+ const scaledMargin = opts.margin * scale;
12992
+ const palette = [opts.color.light, opts.color.dark];
12993
+
12994
+ for (let i = 0; i < symbolSize; i++) {
12995
+ for (let j = 0; j < symbolSize; j++) {
12996
+ let posDst = (i * symbolSize + j) * 4;
12997
+ let pxColor = opts.color.light;
12998
+
12999
+ if (i >= scaledMargin && j >= scaledMargin &&
13000
+ i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {
13001
+ const iSrc = Math.floor((i - scaledMargin) / scale);
13002
+ const jSrc = Math.floor((j - scaledMargin) / scale);
13003
+ pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0];
13004
+ }
13005
+
13006
+ imgData[posDst++] = pxColor.r;
13007
+ imgData[posDst++] = pxColor.g;
13008
+ imgData[posDst++] = pxColor.b;
13009
+ imgData[posDst] = pxColor.a;
13010
+ }
13011
+ }
13012
+ };
13013
+ });
13014
+
13015
+ var canvas = createCommonjsModule(function (module, exports) {
13016
+ function clearCanvas (ctx, canvas, size) {
13017
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
13018
+
13019
+ if (!canvas.style) canvas.style = {};
13020
+ canvas.height = size;
13021
+ canvas.width = size;
13022
+ canvas.style.height = size + 'px';
13023
+ canvas.style.width = size + 'px';
13024
+ }
13025
+
13026
+ function getCanvasElement () {
13027
+ try {
13028
+ return document.createElement('canvas')
13029
+ } catch (e) {
13030
+ throw new Error('You need to specify a canvas element')
13031
+ }
13032
+ }
13033
+
13034
+ exports.render = function render (qrData, canvas, options) {
13035
+ let opts = options;
13036
+ let canvasEl = canvas;
13037
+
13038
+ if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
13039
+ opts = canvas;
13040
+ canvas = undefined;
13041
+ }
13042
+
13043
+ if (!canvas) {
13044
+ canvasEl = getCanvasElement();
13045
+ }
13046
+
13047
+ opts = utils.getOptions(opts);
13048
+ const size = utils.getImageWidth(qrData.modules.size, opts);
13049
+
13050
+ const ctx = canvasEl.getContext('2d');
13051
+ const image = ctx.createImageData(size, size);
13052
+ utils.qrToImageData(image.data, qrData, opts);
13053
+
13054
+ clearCanvas(ctx, canvasEl, size);
13055
+ ctx.putImageData(image, 0, 0);
13056
+
13057
+ return canvasEl
13058
+ };
13059
+
13060
+ exports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {
13061
+ let opts = options;
13062
+
13063
+ if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
13064
+ opts = canvas;
13065
+ canvas = undefined;
13066
+ }
13067
+
13068
+ if (!opts) opts = {};
13069
+
13070
+ const canvasEl = exports.render(qrData, canvas, opts);
13071
+
13072
+ const type = opts.type || 'image/png';
13073
+ const rendererOpts = opts.rendererOpts || {};
13074
+
13075
+ return canvasEl.toDataURL(type, rendererOpts.quality)
13076
+ };
13077
+ });
13078
+
13079
+ function getColorAttrib (color, attrib) {
13080
+ const alpha = color.a / 255;
13081
+ const str = attrib + '="' + color.hex + '"';
13082
+
13083
+ return alpha < 1
13084
+ ? str + ' ' + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"'
13085
+ : str
13086
+ }
13087
+
13088
+ function svgCmd (cmd, x, y) {
13089
+ let str = cmd + x;
13090
+ if (typeof y !== 'undefined') str += ' ' + y;
13091
+
13092
+ return str
13093
+ }
13094
+
13095
+ function qrToPath (data, size, margin) {
13096
+ let path = '';
13097
+ let moveBy = 0;
13098
+ let newRow = false;
13099
+ let lineLength = 0;
13100
+
13101
+ for (let i = 0; i < data.length; i++) {
13102
+ const col = Math.floor(i % size);
13103
+ const row = Math.floor(i / size);
13104
+
13105
+ if (!col && !newRow) newRow = true;
13106
+
13107
+ if (data[i]) {
13108
+ lineLength++;
13109
+
13110
+ if (!(i > 0 && col > 0 && data[i - 1])) {
13111
+ path += newRow
13112
+ ? svgCmd('M', col + margin, 0.5 + row + margin)
13113
+ : svgCmd('m', moveBy, 0);
13114
+
13115
+ moveBy = 0;
13116
+ newRow = false;
13117
+ }
13118
+
13119
+ if (!(col + 1 < size && data[i + 1])) {
13120
+ path += svgCmd('h', lineLength);
13121
+ lineLength = 0;
13122
+ }
13123
+ } else {
13124
+ moveBy++;
13125
+ }
13126
+ }
13127
+
13128
+ return path
13129
+ }
13130
+
13131
+ var render = function render (qrData, options, cb) {
13132
+ const opts = utils.getOptions(options);
13133
+ const size = qrData.modules.size;
13134
+ const data = qrData.modules.data;
13135
+ const qrcodesize = size + opts.margin * 2;
13136
+
13137
+ const bg = !opts.color.light.a
13138
+ ? ''
13139
+ : '<path ' + getColorAttrib(opts.color.light, 'fill') +
13140
+ ' d="M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z"/>';
13141
+
13142
+ const path =
13143
+ '<path ' + getColorAttrib(opts.color.dark, 'stroke') +
13144
+ ' d="' + qrToPath(data, size, opts.margin) + '"/>';
13145
+
13146
+ const viewBox = 'viewBox="' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '"';
13147
+
13148
+ const width = !opts.width ? '' : 'width="' + opts.width + '" height="' + opts.width + '" ';
13149
+
13150
+ const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path + '</svg>\n';
13151
+
13152
+ if (typeof cb === 'function') {
13153
+ cb(null, svgTag);
13154
+ }
13155
+
13156
+ return svgTag
13157
+ };
13158
+
13159
+ var svgTag = {
13160
+ render: render
13161
+ };
13162
+
13163
+ function renderCanvas (renderFunc, canvas, text, opts, cb) {
13164
+ const args = [].slice.call(arguments, 1);
13165
+ const argsNum = args.length;
13166
+ const isLastArgCb = typeof args[argsNum - 1] === 'function';
13167
+
13168
+ if (!isLastArgCb && !canPromise()) {
13169
+ throw new Error('Callback required as last argument')
13170
+ }
13171
+
13172
+ if (isLastArgCb) {
13173
+ if (argsNum < 2) {
13174
+ throw new Error('Too few arguments provided')
13175
+ }
13176
+
13177
+ if (argsNum === 2) {
13178
+ cb = text;
13179
+ text = canvas;
13180
+ canvas = opts = undefined;
13181
+ } else if (argsNum === 3) {
13182
+ if (canvas.getContext && typeof cb === 'undefined') {
13183
+ cb = opts;
13184
+ opts = undefined;
13185
+ } else {
13186
+ cb = opts;
13187
+ opts = text;
13188
+ text = canvas;
13189
+ canvas = undefined;
13190
+ }
13191
+ }
13192
+ } else {
13193
+ if (argsNum < 1) {
13194
+ throw new Error('Too few arguments provided')
13195
+ }
13196
+
13197
+ if (argsNum === 1) {
13198
+ text = canvas;
13199
+ canvas = opts = undefined;
13200
+ } else if (argsNum === 2 && !canvas.getContext) {
13201
+ opts = text;
13202
+ text = canvas;
13203
+ canvas = undefined;
13204
+ }
13205
+
13206
+ return new Promise(function (resolve, reject) {
13207
+ try {
13208
+ const data = qrcode.create(text, opts);
13209
+ resolve(renderFunc(data, canvas, opts));
13210
+ } catch (e) {
13211
+ reject(e);
13212
+ }
13213
+ })
13214
+ }
13215
+
13216
+ try {
13217
+ const data = qrcode.create(text, opts);
13218
+ cb(null, renderFunc(data, canvas, opts));
13219
+ } catch (e) {
13220
+ cb(e);
13221
+ }
13222
+ }
13223
+
13224
+ var create = qrcode.create;
13225
+ var toCanvas = renderCanvas.bind(null, canvas.render);
13226
+ var toDataURL = renderCanvas.bind(null, canvas.renderToDataURL);
13227
+
13228
+ // only svg for now.
13229
+ var toString_1 = renderCanvas.bind(null, function (data, _, opts) {
13230
+ return svgTag.render(data, opts)
13231
+ });
13232
+
13233
+ var browser = {
13234
+ create: create,
13235
+ toCanvas: toCanvas,
13236
+ toDataURL: toDataURL,
13237
+ toString: toString_1
13238
+ };
13239
+
13240
+ 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)}}";
10364
13241
 
10365
13242
  window.Dropzone.autoDiscover = false;
10366
13243
  const ATTR_NAME = "data-dz-name";
@@ -10397,9 +13274,35 @@ const StzhUpload$1 = /*@__PURE__*/ proxyCustomElement(class StzhUpload extends H
10397
13274
  this.stzhComplete = createEvent(this, "stzhComplete", 7);
10398
13275
  this.stzhCompleteMultiple = createEvent(this, "stzhCompleteMultiple", 7);
10399
13276
  this._existingFiles = [];
13277
+ this.PHOTOGRAPHING_BASE_URL = "/appl/mobiscan/rs";
13278
+ this.PHOTOGRAPHING_ENDPOINTS = {
13279
+ PING: "/ping",
13280
+ URL: "/url",
13281
+ IMAGE: "/image",
13282
+ CONFIG: "/config",
13283
+ AUTH: "/auth",
13284
+ };
10400
13285
  this.handleReset = () => {
10401
13286
  this.removeAllFiles(true);
10402
13287
  };
13288
+ this.closePhotographingWebsocketConnection = () => {
13289
+ this.photographingWebsocket.close();
13290
+ };
13291
+ this.onButtonScanClick = event => {
13292
+ event.preventDefault();
13293
+ event.stopPropagation();
13294
+ this.photographingOverlayElement.show().then();
13295
+ if (this.isPhotographingAvailable) {
13296
+ this.startPhotographingUserSession()
13297
+ .then()
13298
+ .catch(photographingUserSessionException => {
13299
+ console.error("photographingUserSessionException", photographingUserSessionException);
13300
+ });
13301
+ }
13302
+ };
13303
+ this.closePhotographingOverlay = async () => {
13304
+ this.photographingOverlayElement.hide().catch();
13305
+ };
10403
13306
  this.filesize = function (size) {
10404
13307
  let selectedSize = 0;
10405
13308
  let selectedUnit = "b";
@@ -10427,6 +13330,8 @@ const StzhUpload$1 = /*@__PURE__*/ proxyCustomElement(class StzhUpload extends H
10427
13330
  this.heading = "";
10428
13331
  this.description = "";
10429
13332
  this.button = "";
13333
+ this.buttonScan = "";
13334
+ this.photographingEnabled = false;
10430
13335
  this.url = "";
10431
13336
  this.method = "post";
10432
13337
  this.withCredentials = false;
@@ -10461,6 +13366,13 @@ const StzhUpload$1 = /*@__PURE__*/ proxyCustomElement(class StzhUpload extends H
10461
13366
  this.hiddenInputContainer = undefined;
10462
13367
  this.preventHiddenInputClear = false;
10463
13368
  this.localization = undefined;
13369
+ this.environment = undefined;
13370
+ this.isPhotographingAvailable = false;
13371
+ this.photographingUrlDetails = undefined;
13372
+ this.photographingHost = undefined;
13373
+ this.photographingConfig = undefined;
13374
+ this.photographingWebsocket = undefined;
13375
+ this.photographingToken = undefined;
10464
13376
  }
10465
13377
  resetListener(event) {
10466
13378
  if (event.target.contains(this.element)) {
@@ -10531,6 +13443,164 @@ const StzhUpload$1 = /*@__PURE__*/ proxyCustomElement(class StzhUpload extends H
10531
13443
  async removeAllFiles(cancelIfNecessary = false, force = false) {
10532
13444
  return this.dropzone.removeAllFiles(cancelIfNecessary, force);
10533
13445
  }
13446
+ async getToken() {
13447
+ if (this.photographingToken &&
13448
+ this.photographingToken.access_token &&
13449
+ Date.now() < this.photographingToken.expires_in) {
13450
+ return this.photographingToken;
13451
+ }
13452
+ else {
13453
+ return await this.requestPhotographingToken();
13454
+ }
13455
+ }
13456
+ async requestPhotographingToken() {
13457
+ try {
13458
+ const response = await fetch(`${this.photographingHost}${this.PHOTOGRAPHING_BASE_URL}${this.PHOTOGRAPHING_ENDPOINTS.AUTH}`);
13459
+ if (!response.ok) {
13460
+ throw new Error("Token retrieval failed");
13461
+ }
13462
+ const parsedResponse = await response.json();
13463
+ this.photographingToken = {
13464
+ access_token: parsedResponse.access_token,
13465
+ expires_in: Date.now() + parsedResponse.expires_in * 1000,
13466
+ };
13467
+ return this.photographingToken;
13468
+ }
13469
+ catch (error) {
13470
+ console.error("Token retrieval failed", error);
13471
+ throw new Error("Token retrieval failed");
13472
+ }
13473
+ }
13474
+ async initializePhotographingWithEnvironment(environment) {
13475
+ this.photographingHost = this.getPhotographingHostForEnvironment(environment);
13476
+ await this.setPhotographingConfig();
13477
+ if (this.photographingConfig) {
13478
+ await this.checkPhotographingAvailability();
13479
+ }
13480
+ }
13481
+ async startPhotographingUserSession() {
13482
+ try {
13483
+ const response = await fetch(`${this.photographingConfig.publicEndpoint}${this.PHOTOGRAPHING_ENDPOINTS.URL}`, await this.getPhotographingHttpOptionsWithToken());
13484
+ if (!response.ok) ;
13485
+ else {
13486
+ const url = await response.json();
13487
+ const urlObject = new URL(url.url);
13488
+ const params = new URLSearchParams(urlObject.search);
13489
+ this.photographingUrlDetails = {
13490
+ url: url.url,
13491
+ userId: params.get("id"),
13492
+ };
13493
+ try {
13494
+ await browser.toCanvas(this.photographingQrcodeElement, url.url);
13495
+ }
13496
+ catch (error) {
13497
+ console.error("Error generating QR code:", error);
13498
+ }
13499
+ await this.establishPhotographingWebsocketConnection();
13500
+ }
13501
+ }
13502
+ catch (startPhotographingUserSessionException) {
13503
+ console.error(`StzhUpload.startPhotographingUserSession() - startPhotographingUserSessionException:`, startPhotographingUserSessionException);
13504
+ }
13505
+ }
13506
+ async retreivePhotographingPdf() {
13507
+ try {
13508
+ const response = await fetch(`${this.photographingConfig.publicEndpoint}${this.PHOTOGRAPHING_ENDPOINTS.IMAGE}/retreive-pdf?id=${this.photographingUrlDetails.userId}`, await this.getPhotographingHttpOptionsWithToken());
13509
+ if (!response.ok) {
13510
+ console.error(`StzhUpload.retreivePhotographingPdf() - HTTP error! status: ${response.status}`);
13511
+ }
13512
+ else {
13513
+ const parsedResponse = await response.json();
13514
+ const file = await this.fetchFile(parsedResponse.downloadLink);
13515
+ this.dropzone.addFile(file);
13516
+ await this.closePhotographingOverlay();
13517
+ }
13518
+ }
13519
+ catch (retreivePhotographingPdfException) {
13520
+ console.error(`StzhUpload.retreivePhotographingPdf() - retreivePhotographingPdfException:`, retreivePhotographingPdfException);
13521
+ }
13522
+ }
13523
+ async fetchFile(url) {
13524
+ const response = await fetch(url);
13525
+ const blob = await response.blob();
13526
+ const fileName = url.split("/").pop();
13527
+ const cleanFileName = fileName.split("?")[0];
13528
+ if (blob.type === "application/octet-stream") {
13529
+ return new File([blob], cleanFileName, { type: "application/pdf" });
13530
+ }
13531
+ return new File([blob], cleanFileName, { type: blob.type });
13532
+ }
13533
+ async establishPhotographingWebsocketConnection() {
13534
+ this.photographingWebsocket = new WebSocket(`${this.photographingConfig.wsClientUrl}${this.photographingUrlDetails.userId}`, ["chat", (await this.getToken()).access_token]);
13535
+ this.photographingWebsocket.onopen = () => {
13536
+ setInterval(() => {
13537
+ this.sendPhotographingWebsocketMessage("Ping");
13538
+ }, 20000);
13539
+ };
13540
+ this.photographingWebsocket.onmessage = async (event) => {
13541
+ const message = event.data;
13542
+ if (message === "retreivePdf") {
13543
+ await this.retreivePhotographingPdf();
13544
+ }
13545
+ };
13546
+ this.photographingWebsocket.onerror = error => {
13547
+ console.error("WebSocket error: ", error);
13548
+ };
13549
+ }
13550
+ sendPhotographingWebsocketMessage(message) {
13551
+ this.photographingWebsocket.send(message);
13552
+ }
13553
+ async getPhotographingHttpOptionsWithToken() {
13554
+ const token = await this.getToken();
13555
+ return {
13556
+ headers: {
13557
+ Authorization: `Bearer ${token.access_token}`,
13558
+ },
13559
+ };
13560
+ }
13561
+ async checkPhotographingAvailability() {
13562
+ try {
13563
+ const response = await fetch(`${this.photographingConfig.publicEndpoint}${this.PHOTOGRAPHING_ENDPOINTS.PING}`, await this.getPhotographingHttpOptionsWithToken());
13564
+ if (!response.ok) {
13565
+ console.error(`StzhUpload.isAvailable() - HTTP error! status: ${response.status}`);
13566
+ this.isPhotographingAvailable = false;
13567
+ }
13568
+ else {
13569
+ this.isPhotographingAvailable = true;
13570
+ }
13571
+ }
13572
+ catch (isAvailableException) {
13573
+ console.error(`StzhUpload.isAvailable() - isAvailableException:`, isAvailableException);
13574
+ this.isPhotographingAvailable = false;
13575
+ }
13576
+ }
13577
+ async setPhotographingConfig() {
13578
+ try {
13579
+ const response = await fetch(`${this.photographingHost}${this.PHOTOGRAPHING_BASE_URL}${this.PHOTOGRAPHING_ENDPOINTS.CONFIG}`);
13580
+ if (!response.ok) {
13581
+ console.error(`StzhUpload.getConfig() - HTTP error! status: ${response.status}`);
13582
+ }
13583
+ else {
13584
+ this.photographingConfig = await response.json();
13585
+ }
13586
+ }
13587
+ catch (getConfigException) {
13588
+ console.error(`StzhUpload.getConfig() - getConfigException:`, getConfigException);
13589
+ }
13590
+ }
13591
+ getPhotographingHostForEnvironment(environment) {
13592
+ switch (environment) {
13593
+ case "DEV":
13594
+ return "https://www.test.stadt-zuerich.loc";
13595
+ case "UAT":
13596
+ return "https://www.integ.stadt-zuerich.ch";
13597
+ case "PROD":
13598
+ return "https://www.stadt-zuerich.ch";
13599
+ case "UNKNOWN":
13600
+ this.PHOTOGRAPHING_BASE_URL = `/stzh-components/assets/mock${this.PHOTOGRAPHING_BASE_URL}`;
13601
+ return `${window.location.origin}`;
13602
+ }
13603
+ }
10534
13604
  async componentWillLoad() {
10535
13605
  this.uploadId = `stzh-upload-${uploadCounter++}`;
10536
13606
  this.existingFilesWatcher(this.existingFiles);
@@ -10538,6 +13608,12 @@ const StzhUpload$1 = /*@__PURE__*/ proxyCustomElement(class StzhUpload extends H
10538
13608
  if (!this.localization) {
10539
13609
  this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, "upload");
10540
13610
  }
13611
+ this.environment = getStzhEnvironment();
13612
+ if (this.photographingEnabled) {
13613
+ this.initializePhotographingWithEnvironment(this.environment).catch(initializePhotographingWithEnvironmentException => {
13614
+ console.error("initializePhotographingWithEnvironmentException", initializePhotographingWithEnvironmentException);
13615
+ });
13616
+ }
10541
13617
  }
10542
13618
  componentDidRender() {
10543
13619
  if (this.dropzone) {
@@ -10598,6 +13674,24 @@ const StzhUpload$1 = /*@__PURE__*/ proxyCustomElement(class StzhUpload extends H
10598
13674
  dictResponseError: this.localization.responseError,
10599
13675
  dictInvalidFileType: this.localization.invalidFileType,
10600
13676
  dictFileTooBig: this.localization.fileTooBig,
13677
+ // Called when a file is dropped to the dropzone
13678
+ // Receives `event`
13679
+ drop: e => {
13680
+ var _a;
13681
+ // Merge files in hidden input.
13682
+ if (this.preventHiddenInputClear) {
13683
+ const hiddenFileInput = (_a = this.hiddenInputContainerElement) === null || _a === void 0 ? void 0 : _a.querySelector("input");
13684
+ const dataTransfer = new DataTransfer();
13685
+ for (let i = 0; i < hiddenFileInput.files.length; i++) {
13686
+ dataTransfer.items.add(hiddenFileInput.files[i]);
13687
+ }
13688
+ for (const file of e.dataTransfer.files) {
13689
+ dataTransfer.items.add(file);
13690
+ }
13691
+ hiddenFileInput.files = dataTransfer.files;
13692
+ }
13693
+ return this.element.classList.remove("dz-drag-hover");
13694
+ },
10601
13695
  // Called when a file is added to the queue
10602
13696
  // Receives `file`
10603
13697
  // Taken from https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L594
@@ -10903,7 +13997,10 @@ const StzhUpload$1 = /*@__PURE__*/ proxyCustomElement(class StzhUpload extends H
10903
13997
  "stzh-upload--has-error": errorUsed,
10904
13998
  "stzh-upload--has-instructions": !!this.description || !!this.localization.description,
10905
13999
  };
10906
- 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) }))))));
14000
+ const description = this.description ? this.description : this.localization.description;
14001
+ 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
14002
+ .replace("{{fileformats}}", this.acceptedFiles ? this.acceptedFiles : "Alle")
14003
+ .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)))))));
10907
14004
  }
10908
14005
  get element() { return this; }
10909
14006
  static get watchers() { return {
@@ -10922,6 +14019,8 @@ const StzhUpload$1 = /*@__PURE__*/ proxyCustomElement(class StzhUpload extends H
10922
14019
  "heading": [1],
10923
14020
  "description": [1],
10924
14021
  "button": [1],
14022
+ "buttonScan": [1, "button-scan"],
14023
+ "photographingEnabled": [1028, "photographing-enabled"],
10925
14024
  "url": [1],
10926
14025
  "method": [1],
10927
14026
  "withCredentials": [4, "with-credentials"],
@@ -10952,6 +14051,13 @@ const StzhUpload$1 = /*@__PURE__*/ proxyCustomElement(class StzhUpload extends H
10952
14051
  "hiddenInputContainer": [1, "hidden-input-container"],
10953
14052
  "preventHiddenInputClear": [4, "prevent-hidden-input-clear"],
10954
14053
  "localization": [16],
14054
+ "environment": [32],
14055
+ "isPhotographingAvailable": [32],
14056
+ "photographingUrlDetails": [32],
14057
+ "photographingHost": [32],
14058
+ "photographingConfig": [32],
14059
+ "photographingWebsocket": [32],
14060
+ "photographingToken": [32],
10955
14061
  "processQueue": [64],
10956
14062
  "removeFile": [64],
10957
14063
  "removeAllFiles": [64]
@@ -10967,7 +14073,7 @@ function defineCustomElement$1() {
10967
14073
  if (typeof customElements === "undefined") {
10968
14074
  return;
10969
14075
  }
10970
- const components = ["stzh-upload", "stzh-badge", "stzh-icon", "stzh-link", "stzh-popover", "stzh-text"];
14076
+ const components = ["stzh-upload", "stzh-badge", "stzh-button", "stzh-dialog", "stzh-heading", "stzh-icon", "stzh-link", "stzh-popover", "stzh-text"];
10971
14077
  components.forEach(tagName => { switch (tagName) {
10972
14078
  case "stzh-upload":
10973
14079
  if (!customElements.get(tagName)) {
@@ -10975,6 +14081,21 @@ function defineCustomElement$1() {
10975
14081
  }
10976
14082
  break;
10977
14083
  case "stzh-badge":
14084
+ if (!customElements.get(tagName)) {
14085
+ defineCustomElement$9();
14086
+ }
14087
+ break;
14088
+ case "stzh-button":
14089
+ if (!customElements.get(tagName)) {
14090
+ defineCustomElement$8();
14091
+ }
14092
+ break;
14093
+ case "stzh-dialog":
14094
+ if (!customElements.get(tagName)) {
14095
+ defineCustomElement$7();
14096
+ }
14097
+ break;
14098
+ case "stzh-heading":
10978
14099
  if (!customElements.get(tagName)) {
10979
14100
  defineCustomElement$6();
10980
14101
  }