@postnord/pn-marketweb-components 3.5.2 → 4.0.0

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 (1186) hide show
  1. package/cjs/FetchHelper-2d4c697c.js +85 -0
  2. package/cjs/FetchHelper-2d4c697c.js.map +1 -0
  3. package/cjs/HeadingTag-19376e1f.js +12 -0
  4. package/cjs/HeadingTag-19376e1f.js.map +1 -0
  5. package/cjs/LocalStorageService-e1ee3fac.js +66 -0
  6. package/cjs/LocalStorageService-e1ee3fac.js.map +1 -0
  7. package/cjs/{FetchHelper-e951824f.js → MarketWebContextService-0fdc43c8.js} +1 -82
  8. package/cjs/MarketWebContextService-0fdc43c8.js.map +1 -0
  9. package/cjs/alert_exclamation_circle-24f29a5b.js +8 -0
  10. package/cjs/alert_exclamation_circle-24f29a5b.js.map +1 -0
  11. package/cjs/angle_up-049ec1d8.js +12 -0
  12. package/cjs/angle_up-049ec1d8.js.map +1 -0
  13. package/cjs/close-9e014a80.js +8 -0
  14. package/cjs/close-9e014a80.js.map +1 -0
  15. package/cjs/{index-1d8c9211.js → index-4067c6a5.js} +2 -2
  16. package/cjs/{index-1d8c9211.js.map → index-4067c6a5.js.map} +1 -1
  17. package/cjs/{index-34e1c673.js → index-b02670c2.js} +65 -8
  18. package/cjs/index-b02670c2.js.map +1 -0
  19. package/cjs/index.cjs.js +1 -1
  20. package/cjs/loader.cjs.js +2 -2
  21. package/cjs/pn-address-autofill.cjs.entry.js +51 -75
  22. package/cjs/pn-address-autofill.cjs.entry.js.map +1 -1
  23. package/cjs/pn-animated-tile.cjs.entry.js +2 -2
  24. package/cjs/pn-animated-tile.cjs.entry.js.map +1 -1
  25. package/cjs/pn-app-banner.cjs.entry.js +3 -3
  26. package/cjs/pn-app-banner.cjs.entry.js.map +1 -1
  27. package/cjs/pn-bonus-progressbar-level.cjs.entry.js +2 -2
  28. package/cjs/pn-bonus-progressbar-level.cjs.entry.js.map +1 -1
  29. package/cjs/pn-bonus-progressbar.cjs.entry.js +2 -2
  30. package/cjs/pn-bonus-progressbar.cjs.entry.js.map +1 -1
  31. package/cjs/pn-breakpoints.cjs.entry.js +3 -3
  32. package/cjs/pn-breakpoints.cjs.entry.js.map +1 -1
  33. package/cjs/pn-chart.cjs.entry.js +2 -2
  34. package/cjs/pn-chart.cjs.entry.js.map +1 -1
  35. package/cjs/pn-charts-card.cjs.entry.js +2 -2
  36. package/cjs/pn-charts-card.cjs.entry.js.map +1 -1
  37. package/cjs/pn-chat-message_2.cjs.entry.js +346 -0
  38. package/cjs/pn-chat-message_2.cjs.entry.js.map +1 -0
  39. package/cjs/pn-chat.cjs.entry.js +474 -0
  40. package/cjs/pn-chat.cjs.entry.js.map +1 -0
  41. package/cjs/pn-chat.service-eaf6ed50.js +157 -0
  42. package/cjs/pn-chat.service-eaf6ed50.js.map +1 -0
  43. package/cjs/pn-choice-button.cjs.entry.js +2 -2
  44. package/cjs/pn-choice-button.cjs.entry.js.map +1 -1
  45. package/cjs/pn-cta-block.cjs.entry.js +2 -2
  46. package/cjs/pn-cta-block.cjs.entry.js.map +1 -1
  47. package/cjs/pn-customernumber-selector-option.cjs.entry.js +3 -3
  48. package/cjs/pn-customernumber-selector-option.cjs.entry.js.map +1 -1
  49. package/cjs/pn-customernumber-selector.cjs.entry.js +4 -9
  50. package/cjs/pn-customernumber-selector.cjs.entry.js.map +1 -1
  51. package/cjs/pn-date-and-time.cjs.entry.js +2 -2
  52. package/cjs/pn-date-and-time.cjs.entry.js.map +1 -1
  53. package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js +20 -8
  54. package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js.map +1 -1
  55. package/cjs/pn-dropdown-with-multi-input-rows-row.cjs.entry.js +2 -2
  56. package/cjs/pn-dropdown-with-multi-input-rows-row.cjs.entry.js.map +1 -1
  57. package/cjs/pn-dropdown-with-multi-input-rows.cjs.entry.js +2 -2
  58. package/cjs/pn-dropdown-with-multi-input-rows.cjs.entry.js.map +1 -1
  59. package/cjs/pn-filter-checkbox.cjs.entry.js +2 -2
  60. package/cjs/pn-filter-checkbox.cjs.entry.js.map +1 -1
  61. package/cjs/pn-find-price-result.cjs.entry.js +5 -5
  62. package/cjs/pn-find-price-result.cjs.entry.js.map +1 -1
  63. package/cjs/{pn-find-price-store-051e931b.js → pn-find-price-store-0c8256c7.js} +2 -2
  64. package/cjs/{pn-find-price-store-051e931b.js.map → pn-find-price-store-0c8256c7.js.map} +1 -1
  65. package/cjs/pn-find-price.cjs.entry.js +6 -6
  66. package/cjs/pn-find-price.cjs.entry.js.map +1 -1
  67. package/cjs/pn-find-service-and-price-result.cjs.entry.js +5 -5
  68. package/cjs/pn-find-service-and-price-result.cjs.entry.js.map +1 -1
  69. package/cjs/{pn-find-service-and-price-store-3cec3d31.js → pn-find-service-and-price-store-13f060e0.js} +2 -2
  70. package/cjs/{pn-find-service-and-price-store-3cec3d31.js.map → pn-find-service-and-price-store-13f060e0.js.map} +1 -1
  71. package/cjs/pn-find-service-and-price.cjs.entry.js +5 -5
  72. package/cjs/pn-find-service-and-price.cjs.entry.js.map +1 -1
  73. package/cjs/pn-hero-block-international.cjs.entry.js +3 -3
  74. package/cjs/pn-hero-block-international.cjs.entry.js.map +1 -1
  75. package/cjs/pn-language-selector_9.cjs.entry.js +25 -27
  76. package/cjs/pn-language-selector_9.cjs.entry.js.map +1 -1
  77. package/cjs/pn-level-up-modal.cjs.entry.js +77 -0
  78. package/cjs/pn-level-up-modal.cjs.entry.js.map +1 -0
  79. package/cjs/pn-level-up.cjs.entry.js +139 -0
  80. package/cjs/pn-level-up.cjs.entry.js.map +1 -0
  81. package/cjs/pn-level-up.service-0e8e67c2.js +71 -0
  82. package/cjs/pn-level-up.service-0e8e67c2.js.map +1 -0
  83. package/cjs/pn-line-shape.cjs.entry.js +2 -2
  84. package/cjs/pn-line-shape.cjs.entry.js.map +1 -1
  85. package/cjs/pn-link-list.cjs.entry.js +3 -3
  86. package/cjs/pn-link-list.cjs.entry.js.map +1 -1
  87. package/cjs/pn-mainnav-link.cjs.entry.js +5 -5
  88. package/cjs/pn-mainnav-link.cjs.entry.js.map +1 -1
  89. package/cjs/{pn-mainnav-store-1a8153fd.js → pn-mainnav-store-5732f3ca.js} +2 -2
  90. package/cjs/{pn-mainnav-store-1a8153fd.js.map → pn-mainnav-store-5732f3ca.js.map} +1 -1
  91. package/cjs/pn-market-web-components.cjs.js +2 -2
  92. package/cjs/pn-marketweb-icon.cjs.entry.js +3 -3
  93. package/cjs/pn-marketweb-icon.cjs.entry.js.map +1 -1
  94. package/cjs/pn-marketweb-input.cjs.entry.js +4 -6
  95. package/cjs/pn-marketweb-input.cjs.entry.js.map +1 -1
  96. package/cjs/pn-marketweb-search.cjs.entry.js +6 -5
  97. package/cjs/pn-marketweb-search.cjs.entry.js.map +1 -1
  98. package/cjs/pn-marketweb-sitefooter.cjs.entry.js +7 -10
  99. package/cjs/pn-marketweb-sitefooter.cjs.entry.js.map +1 -1
  100. package/cjs/{pn-marketweb-siteheader-login-button_5.cjs.entry.js → pn-marketweb-siteheader-login-button_4.cjs.entry.js} +8 -26
  101. package/cjs/pn-marketweb-siteheader-login-button_4.cjs.entry.js.map +1 -0
  102. package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +4 -4
  103. package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js.map +1 -1
  104. package/cjs/pn-marketweb-siteheader-login-mypage-button.cjs.entry.js +25 -0
  105. package/cjs/pn-marketweb-siteheader-login-mypage-button.cjs.entry.js.map +1 -0
  106. package/cjs/{pn-marketweb-siteheader-store-75853609.js → pn-marketweb-siteheader-store-ce9d9ac7.js} +2 -2
  107. package/cjs/{pn-marketweb-siteheader-store-75853609.js.map → pn-marketweb-siteheader-store-ce9d9ac7.js.map} +1 -1
  108. package/cjs/pn-marketweb-siteheader.cjs.entry.js +11 -10
  109. package/cjs/pn-marketweb-siteheader.cjs.entry.js.map +1 -1
  110. package/cjs/pn-marketweb-table.cjs.entry.js +459 -0
  111. package/cjs/pn-marketweb-table.cjs.entry.js.map +1 -0
  112. package/cjs/pn-media-block.cjs.entry.js +6 -6
  113. package/cjs/pn-media-block.cjs.entry.js.map +1 -1
  114. package/cjs/pn-multi-row-connected-dropdown-row.cjs.entry.js +2 -2
  115. package/cjs/pn-multi-row-connected-dropdown-row.cjs.entry.js.map +1 -1
  116. package/cjs/pn-multi-row-connected-dropdown.cjs.entry.js +2 -2
  117. package/cjs/pn-multi-row-connected-dropdown.cjs.entry.js.map +1 -1
  118. package/cjs/pn-multiple-input.cjs.entry.js +1 -1
  119. package/cjs/pn-parcel-tracker.cjs.entry.js +2 -2
  120. package/cjs/pn-parcel-tracker.cjs.entry.js.map +1 -1
  121. package/cjs/pn-pex-pricefinder.cjs.entry.js +3 -3
  122. package/cjs/pn-pex-pricefinder.cjs.entry.js.map +1 -1
  123. package/cjs/pn-play-on-scroll.cjs.entry.js +1 -1
  124. package/cjs/pn-product-card_3.cjs.entry.js +5 -5
  125. package/cjs/pn-product-card_3.cjs.entry.js.map +1 -1
  126. package/cjs/pn-product-pricelist-result.cjs.entry.js +4 -4
  127. package/cjs/pn-product-pricelist-result.cjs.entry.js.map +1 -1
  128. package/cjs/pn-product-pricelist.cjs.entry.js +6 -6
  129. package/cjs/pn-product-pricelist.cjs.entry.js.map +1 -1
  130. package/cjs/pn-product-tile-info_2.cjs.entry.js +4 -4
  131. package/cjs/pn-product-tile-info_2.cjs.entry.js.map +1 -1
  132. package/cjs/pn-product-tile.cjs.entry.js +3 -3
  133. package/cjs/pn-product-tile.cjs.entry.js.map +1 -1
  134. package/cjs/pn-profile-modal-customernumber.cjs.entry.js +3 -3
  135. package/cjs/pn-profile-modal-customernumber.cjs.entry.js.map +1 -1
  136. package/cjs/pn-profile-modal-profile.cjs.entry.js +6 -6
  137. package/cjs/pn-profile-modal-profile.cjs.entry.js.map +1 -1
  138. package/cjs/{pn-profile-modal-store-3b6fea24.js → pn-profile-modal-store-16f8092a.js} +2 -2
  139. package/cjs/{pn-profile-modal-store-3b6fea24.js.map → pn-profile-modal-store-16f8092a.js.map} +1 -1
  140. package/cjs/pn-profile-modal-type.cjs.entry.js +5 -5
  141. package/cjs/pn-profile-modal-type.cjs.entry.js.map +1 -1
  142. package/cjs/pn-profile-modal.cjs.entry.js +5 -5
  143. package/cjs/pn-profile-modal.cjs.entry.js.map +1 -1
  144. package/cjs/pn-profile-selector-option.cjs.entry.js +3 -3
  145. package/cjs/pn-profile-selector-option.cjs.entry.js.map +1 -1
  146. package/cjs/pn-profile-selector.cjs.entry.js +3 -3
  147. package/cjs/pn-profile-selector.cjs.entry.js.map +1 -1
  148. package/cjs/pn-proxio-findprice-result.cjs.entry.js +3 -3
  149. package/cjs/pn-proxio-findprice-result.cjs.entry.js.map +1 -1
  150. package/cjs/pn-proxio-findprice.cjs.entry.js +9 -8
  151. package/cjs/pn-proxio-findprice.cjs.entry.js.map +1 -1
  152. package/cjs/pn-proxio-pricegroup.cjs.entry.js +6 -5
  153. package/cjs/pn-proxio-pricegroup.cjs.entry.js.map +1 -1
  154. package/cjs/pn-proxio-productcard_4.cjs.entry.js +8 -8
  155. package/cjs/pn-proxio-productcard_4.cjs.entry.js.map +1 -1
  156. package/cjs/pn-qr-code-generator.cjs.entry.js +2945 -0
  157. package/cjs/pn-qr-code-generator.cjs.entry.js.map +1 -0
  158. package/cjs/pn-quick-cta.cjs.entry.js +2 -2
  159. package/cjs/pn-quick-cta.cjs.entry.js.map +1 -1
  160. package/cjs/pn-quote-card.cjs.entry.js +2 -2
  161. package/cjs/pn-quote-card.cjs.entry.js.map +1 -1
  162. package/cjs/pn-scroll_2.cjs.entry.js +2 -2
  163. package/cjs/pn-scroll_2.cjs.entry.js.map +1 -1
  164. package/cjs/pn-search.cjs.entry.js +54 -0
  165. package/cjs/pn-search.cjs.entry.js.map +1 -0
  166. package/cjs/pn-share-item.cjs.entry.js +2 -2
  167. package/cjs/pn-share-item.cjs.entry.js.map +1 -1
  168. package/cjs/pn-share.cjs.entry.js +2 -2
  169. package/cjs/pn-share.cjs.entry.js.map +1 -1
  170. package/cjs/pn-sidenav-level.cjs.entry.js +5 -5
  171. package/cjs/pn-sidenav-level.cjs.entry.js.map +1 -1
  172. package/cjs/pn-sidenav-link.cjs.entry.js +5 -5
  173. package/cjs/pn-sidenav-link.cjs.entry.js.map +1 -1
  174. package/cjs/{pn-sidenav-store-cf9c4996.js → pn-sidenav-store-236c8806.js} +2 -2
  175. package/cjs/{pn-sidenav-store-cf9c4996.js.map → pn-sidenav-store-236c8806.js.map} +1 -1
  176. package/cjs/pn-sidenav-togglebutton.cjs.entry.js +5 -5
  177. package/cjs/pn-sidenav-togglebutton.cjs.entry.js.map +1 -1
  178. package/cjs/pn-sidenav.cjs.entry.js +5 -5
  179. package/cjs/pn-sidenav.cjs.entry.js.map +1 -1
  180. package/cjs/pn-site-footer_3.cjs.entry.js +7 -7
  181. package/cjs/pn-site-footer_3.cjs.entry.js.map +1 -1
  182. package/cjs/pn-spotlight.cjs.entry.js +2 -2
  183. package/cjs/pn-spotlight.cjs.entry.js.map +1 -1
  184. package/cjs/pn-stats-info-data.cjs.entry.js +2 -2
  185. package/cjs/pn-stats-info-data.cjs.entry.js.map +1 -1
  186. package/cjs/pn-stats-info.cjs.entry.js +2 -2
  187. package/cjs/pn-stats-info.cjs.entry.js.map +1 -1
  188. package/cjs/pn-teaser-card.cjs.entry.js +5 -9
  189. package/cjs/pn-teaser-card.cjs.entry.js.map +1 -1
  190. package/cjs/pn-titletag.cjs.entry.js +3 -3
  191. package/cjs/pn-titletag.cjs.entry.js.map +1 -1
  192. package/cjs/pn-usp-promoter.cjs.entry.js +3 -3
  193. package/cjs/pn-usp-promoter.cjs.entry.js.map +1 -1
  194. package/cjs/pn-usp-simple.cjs.entry.js +56 -0
  195. package/cjs/pn-usp-simple.cjs.entry.js.map +1 -0
  196. package/collection/collection-manifest.json +10 -1
  197. package/collection/components/animation/pn-animated-tile/pn-animated-tile.css +25 -0
  198. package/collection/components/animation/pn-play-on-scroll/pn-video-overlay/pn-video-overlay.css +25 -0
  199. package/collection/components/cards/pn-quote-card/pn-line-shape/pn-line-shape.css +25 -0
  200. package/collection/components/cards/pn-quote-card/pn-quote-card.css +25 -0
  201. package/collection/components/cards/pn-teaser-card/pn-teaser-card.css +25 -0
  202. package/collection/components/cards/pn-teaser-card/pn-teaser-card.js +8 -11
  203. package/collection/components/cards/pn-teaser-card/pn-teaser-card.js.map +1 -1
  204. package/collection/components/cards/pn-teaser-card/pn-teaser-card.stories.js +3 -3
  205. package/collection/components/charts/pn-chart/pn-chart.css +25 -0
  206. package/collection/components/charts/pn-charts-card/pn-charts-card.css +25 -0
  207. package/collection/components/cta/pn-cta-block/pn-cta-block.css +25 -0
  208. package/collection/components/cta/pn-parcel-tracker/pn-parcel-tracker.css +25 -0
  209. package/collection/components/cta/pn-quick-cta/pn-quick-cta.css +25 -0
  210. package/collection/components/cta/pn-share/pn-share-item.css +25 -0
  211. package/collection/components/cta/pn-share/pn-share.css +25 -0
  212. package/collection/components/cta/pn-spotlight/pn-spotlight.css +25 -0
  213. package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.css +25 -0
  214. package/collection/components/data-visualization/pn-stats-info/pn-stats-info.css +25 -0
  215. package/collection/components/input/pn-address-autofill/pn-address-autofill.css +31 -1
  216. package/collection/components/input/pn-address-autofill/pn-address-autofill.js +58 -68
  217. package/collection/components/input/pn-address-autofill/pn-address-autofill.js.map +1 -1
  218. package/collection/components/input/pn-address-autofill/pn-address-autofill.stories.js +2 -1
  219. package/collection/components/input/pn-address-autofill/translations.js +6 -3
  220. package/collection/components/input/pn-address-autofill/translations.js.map +1 -1
  221. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar-level.css +25 -0
  222. package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.css +25 -0
  223. package/collection/components/input/pn-choice-button/pn-choice-button.css +25 -0
  224. package/collection/components/input/pn-date-and-time/pn-date-and-time.css +25 -0
  225. package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.css +25 -0
  226. package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js +18 -6
  227. package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js.map +1 -1
  228. package/collection/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows-row.css +25 -0
  229. package/collection/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows.css +25 -0
  230. package/collection/components/input/pn-filter-checkbox/pn-filter-checkbox.css +25 -0
  231. package/collection/components/input/pn-marketweb-input/pn-marketweb-input.css +25 -0
  232. package/collection/components/input/pn-marketweb-search/pn-marketweb-search.css +25 -0
  233. package/collection/components/input/pn-marketweb-search/pn-marketweb-search.js +4 -3
  234. package/collection/components/input/pn-marketweb-search/pn-marketweb-search.js.map +1 -1
  235. package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown-row.css +25 -0
  236. package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.css +25 -0
  237. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.css +50 -0
  238. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js +1 -1
  239. package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js.map +1 -1
  240. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.css +25 -0
  241. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.css +25 -0
  242. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.css +25 -0
  243. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +1 -0
  244. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js.map +1 -1
  245. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.css +25 -0
  246. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +1 -1
  247. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js.map +1 -1
  248. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.css +25 -0
  249. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.js +1 -37
  250. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.js.map +1 -1
  251. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.css +25 -0
  252. package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +4 -4
  253. package/collection/components/media/pn-media-block/pn-media-block.css +25 -0
  254. package/collection/components/media/pn-media-block/pn-media-block.js +8 -8
  255. package/collection/components/media/pn-media-block/pn-media-block.js.map +1 -1
  256. package/collection/components/media/pn-media-block/pn-media-block.stories.js +76 -76
  257. package/collection/components/minor/pn-app-banner/pn-app-banner.css +25 -0
  258. package/collection/components/minor/pn-app-banner/pn-app-banner.js +1 -1
  259. package/collection/components/minor/pn-marketweb-icon/pn-marketweb-icon.css +25 -0
  260. package/collection/components/minor/pn-marketweb-icon/pn-marketweb-icon.js +1 -1
  261. package/collection/components/minor/pn-swan/pn-swan.css +25 -0
  262. package/collection/components/minor/pn-swan/pn-swan.js +1 -1
  263. package/collection/components/minor/pn-titletag/pn-titletag.css +25 -0
  264. package/collection/components/minor/pn-titletag/pn-titletag.js +1 -1
  265. package/collection/components/navigation/pn-language-selector/pn-language-selector-option.css +50 -0
  266. package/collection/components/navigation/pn-language-selector/pn-language-selector-option.js +1 -1
  267. package/collection/components/navigation/pn-language-selector/pn-language-selector.css +50 -0
  268. package/collection/components/navigation/pn-language-selector/pn-language-selector.js +1 -1
  269. package/collection/components/navigation/pn-mainnav/pn-mainnav-level.css +25 -0
  270. package/collection/components/navigation/pn-mainnav/pn-mainnav-level.js +2 -2
  271. package/collection/components/navigation/pn-mainnav/pn-mainnav-link.css +25 -0
  272. package/collection/components/navigation/pn-mainnav/pn-mainnav-link.js +1 -1
  273. package/collection/components/navigation/pn-mainnav/pn-mainnav-list.css +25 -0
  274. package/collection/components/navigation/pn-mainnav/pn-mainnav-list.js +1 -1
  275. package/collection/components/navigation/pn-mainnav/pn-mainnav.css +25 -0
  276. package/collection/components/navigation/pn-mainnav/pn-mainnav.js +1 -1
  277. package/collection/components/navigation/pn-sidenav/pn-sidenav-level.css +25 -0
  278. package/collection/components/navigation/pn-sidenav/pn-sidenav-level.js +1 -1
  279. package/collection/components/navigation/pn-sidenav/pn-sidenav-link.css +25 -0
  280. package/collection/components/navigation/pn-sidenav/pn-sidenav-link.js +1 -1
  281. package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.css +25 -0
  282. package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.js +1 -1
  283. package/collection/components/navigation/pn-sidenav/pn-sidenav.css +25 -0
  284. package/collection/components/navigation/pn-sidenav/pn-sidenav.js +1 -1
  285. package/collection/components/navigation/pn-site-footer/pn-site-footer-col.css +50 -0
  286. package/collection/components/navigation/pn-site-footer/pn-site-footer-col.js +1 -1
  287. package/collection/components/navigation/pn-site-footer/pn-site-footer.css +50 -0
  288. package/collection/components/navigation/pn-site-footer/pn-site-footer.js +1 -1
  289. package/collection/components/navigation/pn-site-selector/pn-site-selector-item.css +25 -0
  290. package/collection/components/navigation/pn-site-selector/pn-site-selector-item.js +1 -1
  291. package/collection/components/navigation/pn-site-selector/pn-site-selector.css +25 -0
  292. package/collection/components/navigation/pn-site-selector/pn-site-selector.js +1 -1
  293. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.css +25 -0
  294. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.js +1 -1
  295. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.css +25 -0
  296. package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.js +1 -1
  297. package/collection/components/profile/pn-profile-modal/pn-profile-modal-customernumber.css +25 -0
  298. package/collection/components/profile/pn-profile-modal/pn-profile-modal-customernumber.js +1 -1
  299. package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.css +25 -0
  300. package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.js +2 -2
  301. package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.css +25 -0
  302. package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.js +1 -1
  303. package/collection/components/profile/pn-profile-modal/pn-profile-modal.css +25 -0
  304. package/collection/components/profile/pn-profile-modal/pn-profile-modal.js +1 -1
  305. package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.css +25 -0
  306. package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.js +1 -1
  307. package/collection/components/profile/pn-profile-selector/pn-profile-selector.css +25 -0
  308. package/collection/components/profile/pn-profile-selector/pn-profile-selector.js +1 -1
  309. package/collection/components/utilities/pn-breakpoints/pn-breakpoints.css +25 -0
  310. package/collection/components/utilities/pn-breakpoints/pn-breakpoints.js +1 -1
  311. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.css +146 -0
  312. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.js +118 -0
  313. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.js.map +1 -0
  314. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.stories.js +219 -0
  315. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.stories.js.map +1 -0
  316. package/collection/components/widgets/pn-chat/pn-chat-stories-constants.js +243 -0
  317. package/collection/components/widgets/pn-chat/pn-chat-stories-constants.js.map +1 -0
  318. package/collection/components/widgets/pn-chat/pn-chat.css +238 -0
  319. package/collection/components/widgets/pn-chat/pn-chat.js +840 -0
  320. package/collection/components/widgets/pn-chat/pn-chat.js.map +1 -0
  321. package/collection/components/widgets/pn-chat/pn-chat.models.js +2 -0
  322. package/collection/components/widgets/pn-chat/pn-chat.models.js.map +1 -0
  323. package/collection/components/widgets/pn-chat/pn-chat.service.js +151 -0
  324. package/collection/components/widgets/pn-chat/pn-chat.service.js.map +1 -0
  325. package/collection/components/widgets/pn-chat/pn-chat.stories.js +116 -0
  326. package/collection/components/widgets/pn-chat/pn-chat.stories.js.map +1 -0
  327. package/collection/components/widgets/pn-chat/translations.js +78 -0
  328. package/collection/components/widgets/pn-chat/translations.js.map +1 -0
  329. package/collection/components/widgets/pn-chat/types.js +2 -0
  330. package/collection/components/widgets/pn-chat/types.js.map +1 -0
  331. package/collection/components/widgets/pn-find-price/pn-find-price-result.css +25 -0
  332. package/collection/components/widgets/pn-find-price/pn-find-price-result.js +1 -1
  333. package/collection/components/widgets/pn-find-price/pn-find-price.css +25 -0
  334. package/collection/components/widgets/pn-find-price/pn-find-price.js +2 -2
  335. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.css +25 -0
  336. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.js +1 -1
  337. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.css +25 -0
  338. package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js +1 -1
  339. package/collection/components/widgets/pn-hero-block-international/pn-hero-block-international.css +25 -0
  340. package/collection/components/widgets/pn-hero-block-international/pn-hero-block-international.js +1 -1
  341. package/collection/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.css +94 -0
  342. package/collection/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.js +262 -0
  343. package/collection/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.js.map +1 -0
  344. package/collection/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.stories.js +31 -0
  345. package/collection/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.stories.js.map +1 -0
  346. package/collection/components/widgets/pn-level-up/pn-level-up.css +114 -0
  347. package/collection/components/widgets/pn-level-up/pn-level-up.js +476 -0
  348. package/collection/components/widgets/pn-level-up/pn-level-up.js.map +1 -0
  349. package/collection/components/widgets/pn-level-up/pn-level-up.models.js +2 -0
  350. package/collection/components/widgets/pn-level-up/pn-level-up.models.js.map +1 -0
  351. package/collection/components/widgets/pn-level-up/pn-level-up.service.js +65 -0
  352. package/collection/components/widgets/pn-level-up/pn-level-up.service.js.map +1 -0
  353. package/collection/components/widgets/pn-level-up/pn-level-up.stories.js +88 -0
  354. package/collection/components/widgets/pn-level-up/pn-level-up.stories.js.map +1 -0
  355. package/collection/components/widgets/pn-level-up/types.js +2 -0
  356. package/collection/components/widgets/pn-level-up/types.js.map +1 -0
  357. package/collection/components/widgets/pn-link-list/pn-link-list.css +25 -0
  358. package/collection/components/widgets/pn-link-list/pn-link-list.js +1 -1
  359. package/collection/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.css +96 -0
  360. package/collection/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.js +494 -0
  361. package/collection/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.js.map +1 -0
  362. package/collection/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.stories.js +82 -0
  363. package/collection/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.stories.js.map +1 -0
  364. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.css +255 -0
  365. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.js +701 -0
  366. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.js.map +1 -0
  367. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.service.js +38 -0
  368. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.service.js.map +1 -0
  369. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.stories.js +122 -0
  370. package/collection/components/widgets/pn-marketweb-table/pn-marketweb-table.stories.js.map +1 -0
  371. package/collection/components/widgets/pn-marketweb-table/translations.js +73 -0
  372. package/collection/components/widgets/pn-marketweb-table/translations.js.map +1 -0
  373. package/collection/components/widgets/pn-marketweb-table/types.js +2 -0
  374. package/collection/components/widgets/pn-marketweb-table/types.js.map +1 -0
  375. package/collection/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.css +25 -0
  376. package/collection/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.js +1 -1
  377. package/collection/components/widgets/pn-product-card/pn-product-card-info.css +25 -0
  378. package/collection/components/widgets/pn-product-card/pn-product-card-price.css +25 -0
  379. package/collection/components/widgets/pn-product-card/pn-product-card.css +25 -0
  380. package/collection/components/widgets/pn-product-card/pn-product-card.js +1 -1
  381. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.css +25 -0
  382. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.js +1 -1
  383. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.css +25 -0
  384. package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +2 -2
  385. package/collection/components/widgets/pn-product-tile/pn-product-tile-info.css +25 -0
  386. package/collection/components/widgets/pn-product-tile/pn-product-tile-info.js +1 -1
  387. package/collection/components/widgets/pn-product-tile/pn-product-tile-price.css +25 -0
  388. package/collection/components/widgets/pn-product-tile/pn-product-tile.css +25 -0
  389. package/collection/components/widgets/pn-product-tile/pn-product-tile.js +1 -1
  390. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.css +25 -0
  391. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.js +1 -1
  392. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.css +25 -0
  393. package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.js +3 -3
  394. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.css +25 -0
  395. package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +1 -1
  396. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.css +25 -0
  397. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.js +1 -1
  398. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.css +25 -0
  399. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.js +1 -1
  400. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.css +25 -0
  401. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.css +25 -0
  402. package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.js +1 -1
  403. package/collection/components/widgets/pn-qr-code-generator/pn-qr-code-generator.css +61 -0
  404. package/collection/components/widgets/pn-qr-code-generator/pn-qr-code-generator.js +198 -0
  405. package/collection/components/widgets/pn-qr-code-generator/pn-qr-code-generator.js.map +1 -0
  406. package/collection/components/widgets/pn-qr-code-generator/pn-qr-code-generator.stories.js +29 -0
  407. package/collection/components/widgets/pn-qr-code-generator/pn-qr-code-generator.stories.js.map +1 -0
  408. package/collection/components/widgets/pn-search/pn-search.css +140 -0
  409. package/collection/components/widgets/pn-search/pn-search.js +368 -0
  410. package/collection/components/widgets/pn-search/pn-search.js.map +1 -0
  411. package/collection/components/widgets/pn-search/pn-search.stories.js +54 -0
  412. package/collection/components/widgets/pn-search/pn-search.stories.js.map +1 -0
  413. package/collection/components/widgets/pn-usp-promoter/pn-usp-promoter.css +25 -0
  414. package/collection/components/widgets/pn-usp-promoter/pn-usp-promoter.js +1 -1
  415. package/collection/components/widgets/pn-usp-simple/pn-usp-simple.css +116 -0
  416. package/collection/components/widgets/pn-usp-simple/pn-usp-simple.js +269 -0
  417. package/collection/components/widgets/pn-usp-simple/pn-usp-simple.js.map +1 -0
  418. package/collection/components/widgets/pn-usp-simple/pn-usp-simple.stories.js +63 -0
  419. package/collection/components/widgets/pn-usp-simple/pn-usp-simple.stories.js.map +1 -0
  420. package/collection/globals/HeadingTag.js +2 -2
  421. package/collection/globals/HeadingTag.js.map +1 -1
  422. package/collection/globals/LocalStorageService.js +50 -0
  423. package/collection/globals/LocalStorageService.js.map +1 -0
  424. package/collection/globals/ScreensizeDetect.js +80 -0
  425. package/collection/globals/ScreensizeDetect.js.map +1 -0
  426. package/collection/globals/types.js +2 -0
  427. package/collection/globals/types.js.map +1 -0
  428. package/collection/utils/utils.js +11 -0
  429. package/collection/utils/utils.js.map +1 -1
  430. package/components/FetchHelper.js +1 -243
  431. package/components/FetchHelper.js.map +1 -1
  432. package/components/HeadingTag.js +10 -0
  433. package/components/HeadingTag.js.map +1 -0
  434. package/components/LocalStorageService.js +64 -0
  435. package/components/LocalStorageService.js.map +1 -0
  436. package/{esm/FetchHelper-746f2bb6.js → components/MarketWebContextService.js} +2 -82
  437. package/components/MarketWebContextService.js.map +1 -0
  438. package/components/alert_exclamation_circle.js +6 -0
  439. package/components/alert_exclamation_circle.js.map +1 -0
  440. package/components/angle_up.js +9 -0
  441. package/components/angle_up.js.map +1 -0
  442. package/components/close.js +6 -0
  443. package/components/close.js.map +1 -0
  444. package/components/pn-address-autofill.js +50 -73
  445. package/components/pn-address-autofill.js.map +1 -1
  446. package/components/pn-animated-tile.js +1 -1
  447. package/components/pn-animated-tile.js.map +1 -1
  448. package/components/pn-app-banner.js +2 -2
  449. package/components/pn-app-banner.js.map +1 -1
  450. package/components/pn-bonus-progressbar-level.js +1 -1
  451. package/components/pn-bonus-progressbar-level.js.map +1 -1
  452. package/components/pn-bonus-progressbar.js +1 -1
  453. package/components/pn-bonus-progressbar.js.map +1 -1
  454. package/components/pn-breakpoints.js +2 -2
  455. package/components/pn-breakpoints.js.map +1 -1
  456. package/components/pn-chart.js +1 -1
  457. package/components/pn-chart.js.map +1 -1
  458. package/components/pn-charts-card.js +1 -1
  459. package/components/pn-charts-card.js.map +1 -1
  460. package/components/pn-chat-message.d.ts +11 -0
  461. package/components/pn-chat-message.js +8 -0
  462. package/components/pn-chat-message.js.map +1 -0
  463. package/components/pn-chat-message2.js +69 -0
  464. package/components/pn-chat-message2.js.map +1 -0
  465. package/components/pn-chat.d.ts +11 -0
  466. package/components/pn-chat.js +534 -0
  467. package/components/pn-chat.js.map +1 -0
  468. package/components/pn-chat.service.js +155 -0
  469. package/components/pn-chat.service.js.map +1 -0
  470. package/components/pn-choice-button2.js +1 -1
  471. package/components/pn-choice-button2.js.map +1 -1
  472. package/components/pn-cta-block.js +1 -1
  473. package/components/pn-cta-block.js.map +1 -1
  474. package/components/pn-customernumber-selector-option.js +2 -2
  475. package/components/pn-customernumber-selector-option.js.map +1 -1
  476. package/components/pn-customernumber-selector.js +3 -8
  477. package/components/pn-customernumber-selector.js.map +1 -1
  478. package/components/pn-date-and-time.js +1 -1
  479. package/components/pn-date-and-time.js.map +1 -1
  480. package/components/pn-dropdown-choice-adds-row.js +19 -7
  481. package/components/pn-dropdown-choice-adds-row.js.map +1 -1
  482. package/components/pn-dropdown-with-multi-input-rows-row2.js +1 -1
  483. package/components/pn-dropdown-with-multi-input-rows-row2.js.map +1 -1
  484. package/components/pn-dropdown-with-multi-input-rows.js +1 -1
  485. package/components/pn-dropdown-with-multi-input-rows.js.map +1 -1
  486. package/components/pn-filter-checkbox2.js +1 -1
  487. package/components/pn-filter-checkbox2.js.map +1 -1
  488. package/components/pn-find-price-result2.js +2 -2
  489. package/components/pn-find-price-result2.js.map +1 -1
  490. package/components/pn-find-price.js +3 -3
  491. package/components/pn-find-price.js.map +1 -1
  492. package/components/pn-find-service-and-price-result2.js +2 -2
  493. package/components/pn-find-service-and-price-result2.js.map +1 -1
  494. package/components/pn-find-service-and-price.js +2 -2
  495. package/components/pn-find-service-and-price.js.map +1 -1
  496. package/components/pn-hero-block-international.js +2 -2
  497. package/components/pn-hero-block-international.js.map +1 -1
  498. package/components/pn-language-selector-option2.js +2 -2
  499. package/components/pn-language-selector-option2.js.map +1 -1
  500. package/components/pn-language-selector2.js +2 -2
  501. package/components/pn-language-selector2.js.map +1 -1
  502. package/components/pn-level-up-modal.d.ts +11 -0
  503. package/components/pn-level-up-modal.js +8 -0
  504. package/components/pn-level-up-modal.js.map +1 -0
  505. package/components/pn-level-up-modal2.js +170 -0
  506. package/components/pn-level-up-modal2.js.map +1 -0
  507. package/components/pn-level-up.d.ts +11 -0
  508. package/components/pn-level-up.js +185 -0
  509. package/components/pn-level-up.js.map +1 -0
  510. package/components/pn-line-shape.js +1 -1
  511. package/components/pn-line-shape.js.map +1 -1
  512. package/components/pn-link-list.js +2 -2
  513. package/components/pn-link-list.js.map +1 -1
  514. package/components/pn-mainnav-level2.js +3 -3
  515. package/components/pn-mainnav-level2.js.map +1 -1
  516. package/components/pn-mainnav-link2.js +2 -2
  517. package/components/pn-mainnav-link2.js.map +1 -1
  518. package/components/pn-mainnav-list2.js +2 -2
  519. package/components/pn-mainnav-list2.js.map +1 -1
  520. package/components/pn-mainnav2.js +3 -5
  521. package/components/pn-mainnav2.js.map +1 -1
  522. package/components/pn-marketweb-carousel.d.ts +11 -0
  523. package/components/pn-marketweb-carousel.js +8 -0
  524. package/components/pn-marketweb-carousel.js.map +1 -0
  525. package/components/pn-marketweb-carousel2.js +326 -0
  526. package/components/pn-marketweb-carousel2.js.map +1 -0
  527. package/components/pn-marketweb-icon.js +2 -2
  528. package/components/pn-marketweb-icon.js.map +1 -1
  529. package/components/pn-marketweb-input2.js +2 -4
  530. package/components/pn-marketweb-input2.js.map +1 -1
  531. package/components/pn-marketweb-search.js +1 -125
  532. package/components/pn-marketweb-search.js.map +1 -1
  533. package/components/pn-marketweb-search2.js +130 -0
  534. package/components/pn-marketweb-search2.js.map +1 -0
  535. package/components/pn-marketweb-sitefooter.js +6 -9
  536. package/components/pn-marketweb-sitefooter.js.map +1 -1
  537. package/components/pn-marketweb-siteheader-login-linklist2.js +1 -1
  538. package/components/pn-marketweb-siteheader-login-linklist2.js.map +1 -1
  539. package/components/pn-marketweb-siteheader-login-links2.js +1 -1
  540. package/components/pn-marketweb-siteheader-login-links2.js.map +1 -1
  541. package/components/pn-marketweb-siteheader-login-mypage-button.js +34 -1
  542. package/components/pn-marketweb-siteheader-login-mypage-button.js.map +1 -1
  543. package/components/pn-marketweb-siteheader-login-profileselection2.js +2 -1
  544. package/components/pn-marketweb-siteheader-login-profileselection2.js.map +1 -1
  545. package/components/pn-marketweb-siteheader-login2.js +8 -14
  546. package/components/pn-marketweb-siteheader-login2.js.map +1 -1
  547. package/components/pn-marketweb-siteheader-search2.js +1 -1
  548. package/components/pn-marketweb-siteheader-search2.js.map +1 -1
  549. package/components/pn-marketweb-siteheader-unified-login2.js +3 -13
  550. package/components/pn-marketweb-siteheader-unified-login2.js.map +1 -1
  551. package/components/pn-marketweb-siteheader.js +27 -32
  552. package/components/pn-marketweb-siteheader.js.map +1 -1
  553. package/components/pn-marketweb-table.d.ts +11 -0
  554. package/components/pn-marketweb-table.js +502 -0
  555. package/components/pn-marketweb-table.js.map +1 -0
  556. package/components/pn-media-block.js +6 -6
  557. package/components/pn-media-block.js.map +1 -1
  558. package/components/pn-multi-row-connected-dropdown-row2.js +1 -1
  559. package/components/pn-multi-row-connected-dropdown-row2.js.map +1 -1
  560. package/components/pn-multi-row-connected-dropdown.js +1 -1
  561. package/components/pn-multi-row-connected-dropdown.js.map +1 -1
  562. package/components/pn-parcel-tracker.js +1 -1
  563. package/components/pn-parcel-tracker.js.map +1 -1
  564. package/components/pn-pex-pricefinder.js +2 -2
  565. package/components/pn-pex-pricefinder.js.map +1 -1
  566. package/components/pn-product-card-info2.js +1 -1
  567. package/components/pn-product-card-info2.js.map +1 -1
  568. package/components/pn-product-card-price2.js +1 -1
  569. package/components/pn-product-card-price2.js.map +1 -1
  570. package/components/pn-product-card2.js +2 -2
  571. package/components/pn-product-card2.js.map +1 -1
  572. package/components/pn-product-pricelist-result.js +2 -2
  573. package/components/pn-product-pricelist-result.js.map +1 -1
  574. package/components/pn-product-pricelist.js +3 -3
  575. package/components/pn-product-pricelist.js.map +1 -1
  576. package/components/pn-product-tile-info2.js +2 -2
  577. package/components/pn-product-tile-info2.js.map +1 -1
  578. package/components/pn-product-tile-price2.js +1 -1
  579. package/components/pn-product-tile-price2.js.map +1 -1
  580. package/components/pn-product-tile.js +2 -2
  581. package/components/pn-product-tile.js.map +1 -1
  582. package/components/pn-profile-modal-customernumber.js +2 -2
  583. package/components/pn-profile-modal-customernumber.js.map +1 -1
  584. package/components/pn-profile-modal-profile.js +3 -3
  585. package/components/pn-profile-modal-profile.js.map +1 -1
  586. package/components/pn-profile-modal-type.js +2 -2
  587. package/components/pn-profile-modal-type.js.map +1 -1
  588. package/components/pn-profile-modal.js +2 -2
  589. package/components/pn-profile-modal.js.map +1 -1
  590. package/components/pn-profile-selector-option.js +2 -2
  591. package/components/pn-profile-selector-option.js.map +1 -1
  592. package/components/pn-profile-selector.js +2 -2
  593. package/components/pn-profile-selector.js.map +1 -1
  594. package/components/pn-proxio-findprice-result2.js +2 -2
  595. package/components/pn-proxio-findprice-result2.js.map +1 -1
  596. package/components/pn-proxio-findprice.js +6 -5
  597. package/components/pn-proxio-findprice.js.map +1 -1
  598. package/components/pn-proxio-pricegroup.js +4 -3
  599. package/components/pn-proxio-pricegroup.js.map +1 -1
  600. package/components/pn-proxio-productcard-description2.js +2 -2
  601. package/components/pn-proxio-productcard-description2.js.map +1 -1
  602. package/components/pn-proxio-productcard-information2.js +2 -2
  603. package/components/pn-proxio-productcard-information2.js.map +1 -1
  604. package/components/pn-proxio-productcard-pricelink2.js +1 -1
  605. package/components/pn-proxio-productcard-pricelink2.js.map +1 -1
  606. package/components/pn-proxio-productcard2.js +2 -2
  607. package/components/pn-proxio-productcard2.js.map +1 -1
  608. package/components/pn-qr-code-generator.d.ts +11 -0
  609. package/components/pn-qr-code-generator.js +8 -0
  610. package/components/pn-qr-code-generator.js.map +1 -0
  611. package/components/pn-qr-code-generator2.js +2967 -0
  612. package/components/pn-qr-code-generator2.js.map +1 -0
  613. package/components/pn-quick-cta.js +1 -1
  614. package/components/pn-quick-cta.js.map +1 -1
  615. package/components/pn-quote-card.js +1 -1
  616. package/components/pn-quote-card.js.map +1 -1
  617. package/components/pn-search.d.ts +11 -0
  618. package/components/pn-search.js +91 -0
  619. package/components/pn-search.js.map +1 -0
  620. package/components/pn-share-item2.js +1 -1
  621. package/components/pn-share-item2.js.map +1 -1
  622. package/components/pn-share.js +1 -1
  623. package/components/pn-share.js.map +1 -1
  624. package/components/pn-sidenav-level.js +2 -2
  625. package/components/pn-sidenav-level.js.map +1 -1
  626. package/components/pn-sidenav-link.js +2 -2
  627. package/components/pn-sidenav-link.js.map +1 -1
  628. package/components/pn-sidenav-togglebutton.js +2 -2
  629. package/components/pn-sidenav-togglebutton.js.map +1 -1
  630. package/components/pn-sidenav.js +2 -2
  631. package/components/pn-sidenav.js.map +1 -1
  632. package/components/pn-site-footer-col2.js +2 -2
  633. package/components/pn-site-footer-col2.js.map +1 -1
  634. package/components/pn-site-footer2.js +2 -2
  635. package/components/pn-site-footer2.js.map +1 -1
  636. package/components/pn-site-selector-item2.js +2 -2
  637. package/components/pn-site-selector-item2.js.map +1 -1
  638. package/components/pn-site-selector2.js +2 -2
  639. package/components/pn-site-selector2.js.map +1 -1
  640. package/components/pn-spotlight.js +1 -1
  641. package/components/pn-spotlight.js.map +1 -1
  642. package/components/pn-stats-info-data2.js +1 -1
  643. package/components/pn-stats-info-data2.js.map +1 -1
  644. package/components/pn-stats-info.js +1 -1
  645. package/components/pn-stats-info.js.map +1 -1
  646. package/components/pn-swan2.js +2 -2
  647. package/components/pn-swan2.js.map +1 -1
  648. package/components/pn-teaser-card.js +5 -9
  649. package/components/pn-teaser-card.js.map +1 -1
  650. package/components/pn-titletag2.js +2 -2
  651. package/components/pn-titletag2.js.map +1 -1
  652. package/components/pn-usp-promoter.js +2 -2
  653. package/components/pn-usp-promoter.js.map +1 -1
  654. package/components/pn-usp-simple.d.ts +11 -0
  655. package/components/pn-usp-simple.js +82 -0
  656. package/components/pn-usp-simple.js.map +1 -0
  657. package/components/pn-video-overlay2.js +1 -1
  658. package/components/pn-video-overlay2.js.map +1 -1
  659. package/esm/FetchHelper-4789695a.js +83 -0
  660. package/esm/FetchHelper-4789695a.js.map +1 -0
  661. package/esm/HeadingTag-e20016ab.js +10 -0
  662. package/esm/HeadingTag-e20016ab.js.map +1 -0
  663. package/esm/LocalStorageService-78b1794d.js +64 -0
  664. package/esm/LocalStorageService-78b1794d.js.map +1 -0
  665. package/esm/MarketWebContextService-16c15670.js +245 -0
  666. package/esm/MarketWebContextService-16c15670.js.map +1 -0
  667. package/esm/alert_exclamation_circle-f0fe7c7b.js +6 -0
  668. package/esm/alert_exclamation_circle-f0fe7c7b.js.map +1 -0
  669. package/esm/angle_up-b5f955ea.js +9 -0
  670. package/esm/angle_up-b5f955ea.js.map +1 -0
  671. package/esm/close-9e7bd787.js +6 -0
  672. package/esm/close-9e7bd787.js.map +1 -0
  673. package/esm/{index-89124075.js → index-ae60ebec.js} +2 -2
  674. package/esm/{index-89124075.js.map → index-ae60ebec.js.map} +1 -1
  675. package/esm/{index-51d67461.js → index-c311acd6.js} +65 -9
  676. package/esm/index-c311acd6.js.map +1 -0
  677. package/esm/index.js +1 -1
  678. package/esm/loader.js +3 -3
  679. package/esm/pn-address-autofill.entry.js +50 -74
  680. package/esm/pn-address-autofill.entry.js.map +1 -1
  681. package/esm/pn-animated-tile.entry.js +2 -2
  682. package/esm/pn-animated-tile.entry.js.map +1 -1
  683. package/esm/pn-app-banner.entry.js +3 -3
  684. package/esm/pn-app-banner.entry.js.map +1 -1
  685. package/esm/pn-bonus-progressbar-level.entry.js +2 -2
  686. package/esm/pn-bonus-progressbar-level.entry.js.map +1 -1
  687. package/esm/pn-bonus-progressbar.entry.js +2 -2
  688. package/esm/pn-bonus-progressbar.entry.js.map +1 -1
  689. package/esm/pn-breakpoints.entry.js +3 -3
  690. package/esm/pn-breakpoints.entry.js.map +1 -1
  691. package/esm/pn-chart.entry.js +2 -2
  692. package/esm/pn-chart.entry.js.map +1 -1
  693. package/esm/pn-charts-card.entry.js +2 -2
  694. package/esm/pn-charts-card.entry.js.map +1 -1
  695. package/esm/pn-chat-message_2.entry.js +341 -0
  696. package/esm/pn-chat-message_2.entry.js.map +1 -0
  697. package/esm/pn-chat.entry.js +470 -0
  698. package/esm/pn-chat.entry.js.map +1 -0
  699. package/esm/pn-chat.service-f4037d6f.js +155 -0
  700. package/esm/pn-chat.service-f4037d6f.js.map +1 -0
  701. package/esm/pn-choice-button.entry.js +2 -2
  702. package/esm/pn-choice-button.entry.js.map +1 -1
  703. package/esm/pn-cta-block.entry.js +2 -2
  704. package/esm/pn-cta-block.entry.js.map +1 -1
  705. package/esm/pn-customernumber-selector-option.entry.js +3 -3
  706. package/esm/pn-customernumber-selector-option.entry.js.map +1 -1
  707. package/esm/pn-customernumber-selector.entry.js +4 -9
  708. package/esm/pn-customernumber-selector.entry.js.map +1 -1
  709. package/esm/pn-date-and-time.entry.js +2 -2
  710. package/esm/pn-date-and-time.entry.js.map +1 -1
  711. package/esm/pn-dropdown-choice-adds-row.entry.js +20 -8
  712. package/esm/pn-dropdown-choice-adds-row.entry.js.map +1 -1
  713. package/esm/pn-dropdown-with-multi-input-rows-row.entry.js +2 -2
  714. package/esm/pn-dropdown-with-multi-input-rows-row.entry.js.map +1 -1
  715. package/esm/pn-dropdown-with-multi-input-rows.entry.js +2 -2
  716. package/esm/pn-dropdown-with-multi-input-rows.entry.js.map +1 -1
  717. package/esm/pn-filter-checkbox.entry.js +2 -2
  718. package/esm/pn-filter-checkbox.entry.js.map +1 -1
  719. package/esm/pn-find-price-result.entry.js +5 -5
  720. package/esm/pn-find-price-result.entry.js.map +1 -1
  721. package/esm/{pn-find-price-store-c9a9d3d4.js → pn-find-price-store-f97f2325.js} +2 -2
  722. package/esm/{pn-find-price-store-c9a9d3d4.js.map → pn-find-price-store-f97f2325.js.map} +1 -1
  723. package/esm/pn-find-price.entry.js +6 -6
  724. package/esm/pn-find-price.entry.js.map +1 -1
  725. package/esm/pn-find-service-and-price-result.entry.js +5 -5
  726. package/esm/pn-find-service-and-price-result.entry.js.map +1 -1
  727. package/esm/{pn-find-service-and-price-store-60aa5801.js → pn-find-service-and-price-store-6553566d.js} +2 -2
  728. package/esm/{pn-find-service-and-price-store-60aa5801.js.map → pn-find-service-and-price-store-6553566d.js.map} +1 -1
  729. package/esm/pn-find-service-and-price.entry.js +5 -5
  730. package/esm/pn-find-service-and-price.entry.js.map +1 -1
  731. package/esm/pn-hero-block-international.entry.js +3 -3
  732. package/esm/pn-hero-block-international.entry.js.map +1 -1
  733. package/esm/pn-language-selector_9.entry.js +25 -27
  734. package/esm/pn-language-selector_9.entry.js.map +1 -1
  735. package/esm/pn-level-up-modal.entry.js +73 -0
  736. package/esm/pn-level-up-modal.entry.js.map +1 -0
  737. package/esm/pn-level-up.entry.js +135 -0
  738. package/esm/pn-level-up.entry.js.map +1 -0
  739. package/esm/pn-level-up.service-5c602f23.js +69 -0
  740. package/esm/pn-level-up.service-5c602f23.js.map +1 -0
  741. package/esm/pn-line-shape.entry.js +2 -2
  742. package/esm/pn-line-shape.entry.js.map +1 -1
  743. package/esm/pn-link-list.entry.js +3 -3
  744. package/esm/pn-link-list.entry.js.map +1 -1
  745. package/esm/pn-mainnav-link.entry.js +5 -5
  746. package/esm/pn-mainnav-link.entry.js.map +1 -1
  747. package/esm/{pn-mainnav-store-9c42bc66.js → pn-mainnav-store-23387019.js} +2 -2
  748. package/esm/{pn-mainnav-store-9c42bc66.js.map → pn-mainnav-store-23387019.js.map} +1 -1
  749. package/esm/pn-market-web-components.js +3 -3
  750. package/esm/pn-marketweb-icon.entry.js +3 -3
  751. package/esm/pn-marketweb-icon.entry.js.map +1 -1
  752. package/esm/pn-marketweb-input.entry.js +3 -5
  753. package/esm/pn-marketweb-input.entry.js.map +1 -1
  754. package/esm/pn-marketweb-search.entry.js +6 -5
  755. package/esm/pn-marketweb-search.entry.js.map +1 -1
  756. package/esm/pn-marketweb-sitefooter.entry.js +6 -9
  757. package/esm/pn-marketweb-sitefooter.entry.js.map +1 -1
  758. package/esm/{pn-marketweb-siteheader-login-button_5.entry.js → pn-marketweb-siteheader-login-button_4.entry.js} +9 -26
  759. package/esm/pn-marketweb-siteheader-login-button_4.entry.js.map +1 -0
  760. package/esm/pn-marketweb-siteheader-login-linklist.entry.js +4 -4
  761. package/esm/pn-marketweb-siteheader-login-linklist.entry.js.map +1 -1
  762. package/esm/pn-marketweb-siteheader-login-mypage-button.entry.js +21 -0
  763. package/esm/pn-marketweb-siteheader-login-mypage-button.entry.js.map +1 -0
  764. package/esm/{pn-marketweb-siteheader-store-91f74255.js → pn-marketweb-siteheader-store-f60eb1e4.js} +2 -2
  765. package/esm/{pn-marketweb-siteheader-store-91f74255.js.map → pn-marketweb-siteheader-store-f60eb1e4.js.map} +1 -1
  766. package/esm/pn-marketweb-siteheader.entry.js +10 -9
  767. package/esm/pn-marketweb-siteheader.entry.js.map +1 -1
  768. package/esm/pn-marketweb-table.entry.js +455 -0
  769. package/esm/pn-marketweb-table.entry.js.map +1 -0
  770. package/esm/pn-media-block.entry.js +6 -6
  771. package/esm/pn-media-block.entry.js.map +1 -1
  772. package/esm/pn-multi-row-connected-dropdown-row.entry.js +2 -2
  773. package/esm/pn-multi-row-connected-dropdown-row.entry.js.map +1 -1
  774. package/esm/pn-multi-row-connected-dropdown.entry.js +2 -2
  775. package/esm/pn-multi-row-connected-dropdown.entry.js.map +1 -1
  776. package/esm/pn-multiple-input.entry.js +1 -1
  777. package/esm/pn-parcel-tracker.entry.js +2 -2
  778. package/esm/pn-parcel-tracker.entry.js.map +1 -1
  779. package/esm/pn-pex-pricefinder.entry.js +3 -3
  780. package/esm/pn-pex-pricefinder.entry.js.map +1 -1
  781. package/esm/pn-play-on-scroll.entry.js +1 -1
  782. package/esm/pn-product-card_3.entry.js +5 -5
  783. package/esm/pn-product-card_3.entry.js.map +1 -1
  784. package/esm/pn-product-pricelist-result.entry.js +4 -4
  785. package/esm/pn-product-pricelist-result.entry.js.map +1 -1
  786. package/esm/pn-product-pricelist.entry.js +6 -6
  787. package/esm/pn-product-pricelist.entry.js.map +1 -1
  788. package/esm/pn-product-tile-info_2.entry.js +4 -4
  789. package/esm/pn-product-tile-info_2.entry.js.map +1 -1
  790. package/esm/pn-product-tile.entry.js +3 -3
  791. package/esm/pn-product-tile.entry.js.map +1 -1
  792. package/esm/pn-profile-modal-customernumber.entry.js +3 -3
  793. package/esm/pn-profile-modal-customernumber.entry.js.map +1 -1
  794. package/esm/pn-profile-modal-profile.entry.js +6 -6
  795. package/esm/pn-profile-modal-profile.entry.js.map +1 -1
  796. package/esm/{pn-profile-modal-store-4655b124.js → pn-profile-modal-store-5d651bd5.js} +2 -2
  797. package/esm/{pn-profile-modal-store-4655b124.js.map → pn-profile-modal-store-5d651bd5.js.map} +1 -1
  798. package/esm/pn-profile-modal-type.entry.js +5 -5
  799. package/esm/pn-profile-modal-type.entry.js.map +1 -1
  800. package/esm/pn-profile-modal.entry.js +5 -5
  801. package/esm/pn-profile-modal.entry.js.map +1 -1
  802. package/esm/pn-profile-selector-option.entry.js +3 -3
  803. package/esm/pn-profile-selector-option.entry.js.map +1 -1
  804. package/esm/pn-profile-selector.entry.js +3 -3
  805. package/esm/pn-profile-selector.entry.js.map +1 -1
  806. package/esm/pn-proxio-findprice-result.entry.js +3 -3
  807. package/esm/pn-proxio-findprice-result.entry.js.map +1 -1
  808. package/esm/pn-proxio-findprice.entry.js +8 -7
  809. package/esm/pn-proxio-findprice.entry.js.map +1 -1
  810. package/esm/pn-proxio-pricegroup.entry.js +5 -4
  811. package/esm/pn-proxio-pricegroup.entry.js.map +1 -1
  812. package/esm/pn-proxio-productcard_4.entry.js +8 -8
  813. package/esm/pn-proxio-productcard_4.entry.js.map +1 -1
  814. package/esm/pn-qr-code-generator.entry.js +2941 -0
  815. package/esm/pn-qr-code-generator.entry.js.map +1 -0
  816. package/esm/pn-quick-cta.entry.js +2 -2
  817. package/esm/pn-quick-cta.entry.js.map +1 -1
  818. package/esm/pn-quote-card.entry.js +2 -2
  819. package/esm/pn-quote-card.entry.js.map +1 -1
  820. package/esm/pn-scroll_2.entry.js +2 -2
  821. package/esm/pn-scroll_2.entry.js.map +1 -1
  822. package/esm/pn-search.entry.js +50 -0
  823. package/esm/pn-search.entry.js.map +1 -0
  824. package/esm/pn-share-item.entry.js +2 -2
  825. package/esm/pn-share-item.entry.js.map +1 -1
  826. package/esm/pn-share.entry.js +2 -2
  827. package/esm/pn-share.entry.js.map +1 -1
  828. package/esm/pn-sidenav-level.entry.js +5 -5
  829. package/esm/pn-sidenav-level.entry.js.map +1 -1
  830. package/esm/pn-sidenav-link.entry.js +5 -5
  831. package/esm/pn-sidenav-link.entry.js.map +1 -1
  832. package/esm/{pn-sidenav-store-85bdb1e6.js → pn-sidenav-store-e2038d79.js} +2 -2
  833. package/esm/{pn-sidenav-store-85bdb1e6.js.map → pn-sidenav-store-e2038d79.js.map} +1 -1
  834. package/esm/pn-sidenav-togglebutton.entry.js +5 -5
  835. package/esm/pn-sidenav-togglebutton.entry.js.map +1 -1
  836. package/esm/pn-sidenav.entry.js +5 -5
  837. package/esm/pn-sidenav.entry.js.map +1 -1
  838. package/esm/pn-site-footer_3.entry.js +7 -7
  839. package/esm/pn-site-footer_3.entry.js.map +1 -1
  840. package/esm/pn-spotlight.entry.js +2 -2
  841. package/esm/pn-spotlight.entry.js.map +1 -1
  842. package/esm/pn-stats-info-data.entry.js +2 -2
  843. package/esm/pn-stats-info-data.entry.js.map +1 -1
  844. package/esm/pn-stats-info.entry.js +2 -2
  845. package/esm/pn-stats-info.entry.js.map +1 -1
  846. package/esm/pn-teaser-card.entry.js +5 -9
  847. package/esm/pn-teaser-card.entry.js.map +1 -1
  848. package/esm/pn-titletag.entry.js +3 -3
  849. package/esm/pn-titletag.entry.js.map +1 -1
  850. package/esm/pn-usp-promoter.entry.js +3 -3
  851. package/esm/pn-usp-promoter.entry.js.map +1 -1
  852. package/esm/pn-usp-simple.entry.js +52 -0
  853. package/esm/pn-usp-simple.entry.js.map +1 -0
  854. package/package.json +5 -3
  855. package/pn-market-web-components/index.esm.js +1 -1
  856. package/pn-market-web-components/index.esm.js.map +1 -1
  857. package/pn-market-web-components/p-015127bf.entry.js +2 -0
  858. package/pn-market-web-components/{p-c5772021.entry.js.map → p-015127bf.entry.js.map} +1 -1
  859. package/pn-market-web-components/p-04107723.entry.js +2 -0
  860. package/pn-market-web-components/p-04107723.entry.js.map +1 -0
  861. package/pn-market-web-components/p-08b473e0.entry.js +2 -0
  862. package/pn-market-web-components/{p-a38118be.entry.js.map → p-08b473e0.entry.js.map} +1 -1
  863. package/pn-market-web-components/p-0b5a125d.entry.js +2 -0
  864. package/pn-market-web-components/p-0b5a125d.entry.js.map +1 -0
  865. package/pn-market-web-components/p-0b920554.js +2 -0
  866. package/pn-market-web-components/p-0b920554.js.map +1 -0
  867. package/pn-market-web-components/p-0fc01d3f.entry.js +2 -0
  868. package/pn-market-web-components/{p-4fa5bc85.entry.js.map → p-0fc01d3f.entry.js.map} +1 -1
  869. package/pn-market-web-components/p-10776075.entry.js +2 -0
  870. package/pn-market-web-components/p-10776075.entry.js.map +1 -0
  871. package/pn-market-web-components/p-17c43a96.entry.js +2 -0
  872. package/pn-market-web-components/p-17c43a96.entry.js.map +1 -0
  873. package/pn-market-web-components/p-19bbac6d.entry.js +2 -0
  874. package/pn-market-web-components/{p-ea3d6f7e.entry.js.map → p-19bbac6d.entry.js.map} +1 -1
  875. package/pn-market-web-components/p-230ef9aa.entry.js +2 -0
  876. package/pn-market-web-components/{p-a419cd91.entry.js.map → p-230ef9aa.entry.js.map} +1 -1
  877. package/pn-market-web-components/p-268dc1fa.entry.js +2 -0
  878. package/pn-market-web-components/p-268dc1fa.entry.js.map +1 -0
  879. package/pn-market-web-components/p-28d2f7fa.entry.js +2 -0
  880. package/pn-market-web-components/p-28d2f7fa.entry.js.map +1 -0
  881. package/pn-market-web-components/p-292db484.entry.js +2 -0
  882. package/pn-market-web-components/{p-76e6708b.entry.js.map → p-292db484.entry.js.map} +1 -1
  883. package/pn-market-web-components/p-2a58d83b.entry.js +2 -0
  884. package/pn-market-web-components/{p-55643d76.entry.js.map → p-2a58d83b.entry.js.map} +1 -1
  885. package/pn-market-web-components/p-2c19edca.entry.js +2 -0
  886. package/pn-market-web-components/{p-72dbca40.entry.js.map → p-2c19edca.entry.js.map} +1 -1
  887. package/pn-market-web-components/p-2fd60147.entry.js +2 -0
  888. package/pn-market-web-components/p-2fd60147.entry.js.map +1 -0
  889. package/pn-market-web-components/p-3478f368.js +2 -0
  890. package/pn-market-web-components/p-3478f368.js.map +1 -0
  891. package/pn-market-web-components/p-34a98554.entry.js +2 -0
  892. package/pn-market-web-components/{p-cf39491b.entry.js.map → p-34a98554.entry.js.map} +1 -1
  893. package/pn-market-web-components/p-35847eda.entry.js +2 -0
  894. package/pn-market-web-components/{p-e6e012fb.entry.js.map → p-35847eda.entry.js.map} +1 -1
  895. package/pn-market-web-components/p-366fd15a.js +2 -0
  896. package/pn-market-web-components/p-366fd15a.js.map +1 -0
  897. package/pn-market-web-components/p-389a94e7.entry.js +2 -0
  898. package/pn-market-web-components/{p-190c6938.entry.js.map → p-389a94e7.entry.js.map} +1 -1
  899. package/pn-market-web-components/p-39b75c62.entry.js +2 -0
  900. package/pn-market-web-components/{p-530274ae.entry.js.map → p-39b75c62.entry.js.map} +1 -1
  901. package/pn-market-web-components/p-3d10bc37.entry.js +2 -0
  902. package/pn-market-web-components/{p-45d1e1be.entry.js.map → p-3d10bc37.entry.js.map} +1 -1
  903. package/pn-market-web-components/p-3e197670.entry.js +2 -0
  904. package/pn-market-web-components/{p-6a5f7dee.entry.js.map → p-3e197670.entry.js.map} +1 -1
  905. package/pn-market-web-components/p-40bce1b1.entry.js +2 -0
  906. package/pn-market-web-components/p-40bce1b1.entry.js.map +1 -0
  907. package/pn-market-web-components/p-41cdac85.entry.js +2 -0
  908. package/pn-market-web-components/{p-65ab3003.entry.js.map → p-41cdac85.entry.js.map} +1 -1
  909. package/pn-market-web-components/p-4aedb76c.entry.js +2 -0
  910. package/pn-market-web-components/{p-ea7b0d21.entry.js.map → p-4aedb76c.entry.js.map} +1 -1
  911. package/pn-market-web-components/p-4e924d13.entry.js +2 -0
  912. package/pn-market-web-components/p-4e924d13.entry.js.map +1 -0
  913. package/pn-market-web-components/p-4f639380.entry.js +2 -0
  914. package/pn-market-web-components/{p-aeeabb32.entry.js.map → p-4f639380.entry.js.map} +1 -1
  915. package/pn-market-web-components/p-51f136f3.entry.js +2 -0
  916. package/pn-market-web-components/p-51f136f3.entry.js.map +1 -0
  917. package/pn-market-web-components/p-542f949d.entry.js +2 -0
  918. package/pn-market-web-components/{p-77a35f5e.entry.js.map → p-542f949d.entry.js.map} +1 -1
  919. package/pn-market-web-components/p-5a981927.entry.js +2 -0
  920. package/pn-market-web-components/{p-b35cdbac.entry.js.map → p-5a981927.entry.js.map} +1 -1
  921. package/pn-market-web-components/p-5f4ccd8a.js +2 -0
  922. package/pn-market-web-components/p-5f4ccd8a.js.map +1 -0
  923. package/pn-market-web-components/p-60b77eed.entry.js +2 -0
  924. package/pn-market-web-components/{p-e916e99d.entry.js.map → p-60b77eed.entry.js.map} +1 -1
  925. package/pn-market-web-components/p-619f2143.entry.js +2 -0
  926. package/pn-market-web-components/{p-a6866467.entry.js.map → p-619f2143.entry.js.map} +1 -1
  927. package/pn-market-web-components/p-61bd81d7.entry.js +2 -0
  928. package/pn-market-web-components/{p-8c26b98d.entry.js.map → p-61bd81d7.entry.js.map} +1 -1
  929. package/pn-market-web-components/p-64851da0.entry.js +2 -0
  930. package/pn-market-web-components/{p-776f3d51.entry.js.map → p-64851da0.entry.js.map} +1 -1
  931. package/pn-market-web-components/p-659a4db5.entry.js +2 -0
  932. package/pn-market-web-components/{p-231b97e1.entry.js.map → p-659a4db5.entry.js.map} +1 -1
  933. package/pn-market-web-components/p-65a046be.entry.js +2 -0
  934. package/pn-market-web-components/{p-0ec8d040.entry.js.map → p-65a046be.entry.js.map} +1 -1
  935. package/pn-market-web-components/p-66da6e15.entry.js +2 -0
  936. package/pn-market-web-components/{p-62cabd1e.entry.js.map → p-66da6e15.entry.js.map} +1 -1
  937. package/pn-market-web-components/{p-65f243c1.js → p-6b1d045c.js} +2 -2
  938. package/pn-market-web-components/p-6b1d045c.js.map +1 -0
  939. package/pn-market-web-components/p-71db6836.entry.js +2 -0
  940. package/pn-market-web-components/{p-3fb8e665.entry.js.map → p-71db6836.entry.js.map} +1 -1
  941. package/pn-market-web-components/p-72828265.js +2 -0
  942. package/pn-market-web-components/p-72f57a04.entry.js +2 -0
  943. package/pn-market-web-components/{p-25d53df2.entry.js.map → p-72f57a04.entry.js.map} +1 -1
  944. package/pn-market-web-components/p-763a4e13.entry.js +2 -0
  945. package/pn-market-web-components/{p-fc157a1e.entry.js.map → p-763a4e13.entry.js.map} +1 -1
  946. package/pn-market-web-components/p-76c2c01f.js +2 -0
  947. package/pn-market-web-components/p-76c2c01f.js.map +1 -0
  948. package/pn-market-web-components/{p-e09a907b.js → p-793e1339.js} +2 -2
  949. package/pn-market-web-components/p-79e4715c.entry.js +2 -0
  950. package/pn-market-web-components/{p-6647d2c4.entry.js.map → p-79e4715c.entry.js.map} +1 -1
  951. package/pn-market-web-components/p-7b4f9fdf.entry.js +2 -0
  952. package/pn-market-web-components/{p-066e9db9.entry.js.map → p-7b4f9fdf.entry.js.map} +1 -1
  953. package/pn-market-web-components/p-7b7629c5.entry.js +2 -0
  954. package/pn-market-web-components/{p-24086c59.entry.js.map → p-7b7629c5.entry.js.map} +1 -1
  955. package/pn-market-web-components/p-7db6ef34.entry.js +2 -0
  956. package/pn-market-web-components/{p-4e3059dd.entry.js.map → p-7db6ef34.entry.js.map} +1 -1
  957. package/pn-market-web-components/p-809ed802.entry.js +2 -0
  958. package/pn-market-web-components/p-809ed802.entry.js.map +1 -0
  959. package/pn-market-web-components/p-82546a44.js +3 -0
  960. package/pn-market-web-components/p-82546a44.js.map +1 -0
  961. package/pn-market-web-components/p-84fc8e05.entry.js +2 -0
  962. package/pn-market-web-components/{p-25dfc349.entry.js.map → p-84fc8e05.entry.js.map} +1 -1
  963. package/pn-market-web-components/p-85b42b44.entry.js +2 -0
  964. package/pn-market-web-components/{p-e8278e9e.entry.js.map → p-85b42b44.entry.js.map} +1 -1
  965. package/pn-market-web-components/{p-2509d18d.js → p-8836de82.js} +2 -2
  966. package/pn-market-web-components/{p-560e5291.entry.js → p-8a651698.entry.js} +2 -2
  967. package/pn-market-web-components/p-8d78b631.js +2 -0
  968. package/pn-market-web-components/p-8d78b631.js.map +1 -0
  969. package/pn-market-web-components/p-8d874454.entry.js +2 -0
  970. package/pn-market-web-components/{p-b5a0275d.entry.js.map → p-8d874454.entry.js.map} +1 -1
  971. package/pn-market-web-components/p-8d98f709.entry.js +2 -0
  972. package/pn-market-web-components/{p-74fd7435.entry.js.map → p-8d98f709.entry.js.map} +1 -1
  973. package/pn-market-web-components/p-9088d3f5.entry.js +2 -0
  974. package/pn-market-web-components/{p-a72c2729.entry.js.map → p-9088d3f5.entry.js.map} +1 -1
  975. package/pn-market-web-components/p-920ce5f2.entry.js +2 -0
  976. package/pn-market-web-components/p-920ce5f2.entry.js.map +1 -0
  977. package/pn-market-web-components/{p-959a37d9.js → p-930e2943.js} +2 -2
  978. package/pn-market-web-components/p-9454075f.entry.js +2 -0
  979. package/pn-market-web-components/{p-45b8cadb.entry.js.map → p-9454075f.entry.js.map} +1 -1
  980. package/pn-market-web-components/p-95d32ab4.entry.js +2 -0
  981. package/pn-market-web-components/{p-758f1b53.entry.js.map → p-95d32ab4.entry.js.map} +1 -1
  982. package/pn-market-web-components/p-a079c496.js +2 -0
  983. package/pn-market-web-components/p-a079c496.js.map +1 -0
  984. package/pn-market-web-components/{p-eaee1dd6.entry.js → p-a73e4811.entry.js} +2 -2
  985. package/pn-market-web-components/{p-eaee1dd6.entry.js.map → p-a73e4811.entry.js.map} +1 -1
  986. package/pn-market-web-components/p-ad282b7c.entry.js +2 -0
  987. package/pn-market-web-components/{p-4d2ca281.entry.js.map → p-ad282b7c.entry.js.map} +1 -1
  988. package/pn-market-web-components/{p-155c2049.entry.js → p-ad9a7633.entry.js} +2 -2
  989. package/pn-market-web-components/p-b9590d81.entry.js +2 -0
  990. package/pn-market-web-components/{p-59549c74.entry.js.map → p-b9590d81.entry.js.map} +1 -1
  991. package/pn-market-web-components/p-c4e353b3.entry.js +2 -0
  992. package/pn-market-web-components/{p-5a1b6e6d.entry.js.map → p-c4e353b3.entry.js.map} +1 -1
  993. package/pn-market-web-components/p-c89cb749.entry.js +2 -0
  994. package/pn-market-web-components/{p-95519556.entry.js.map → p-c89cb749.entry.js.map} +1 -1
  995. package/pn-market-web-components/p-c9038b03.entry.js +2 -0
  996. package/pn-market-web-components/{p-64d0dbba.entry.js.map → p-c9038b03.entry.js.map} +1 -1
  997. package/pn-market-web-components/p-cbb1d57d.entry.js +2 -0
  998. package/pn-market-web-components/{p-6fdd5b5a.entry.js.map → p-cbb1d57d.entry.js.map} +1 -1
  999. package/pn-market-web-components/p-cc7c596e.entry.js +2 -0
  1000. package/pn-market-web-components/p-cc7c596e.entry.js.map +1 -0
  1001. package/pn-market-web-components/p-cda742ba.entry.js +2 -0
  1002. package/pn-market-web-components/p-cda742ba.entry.js.map +1 -0
  1003. package/pn-market-web-components/p-ce87ff8a.entry.js +2 -0
  1004. package/pn-market-web-components/{p-e2e3ac2f.entry.js.map → p-ce87ff8a.entry.js.map} +1 -1
  1005. package/pn-market-web-components/p-cf8a1fb9.js +2 -0
  1006. package/pn-market-web-components/p-cf8a1fb9.js.map +1 -0
  1007. package/pn-market-web-components/p-d17af75d.entry.js +2 -0
  1008. package/pn-market-web-components/{p-b693f78a.entry.js.map → p-d17af75d.entry.js.map} +1 -1
  1009. package/pn-market-web-components/p-d5c45da2.entry.js +2 -0
  1010. package/pn-market-web-components/{p-e5ae757f.entry.js.map → p-d5c45da2.entry.js.map} +1 -1
  1011. package/pn-market-web-components/p-d7170c0e.entry.js +2 -0
  1012. package/pn-market-web-components/{p-d0a085cc.entry.js.map → p-d7170c0e.entry.js.map} +1 -1
  1013. package/pn-market-web-components/p-d75a2f7c.entry.js +2 -0
  1014. package/pn-market-web-components/p-d75a2f7c.entry.js.map +1 -0
  1015. package/pn-market-web-components/p-daa74e60.entry.js +2 -0
  1016. package/pn-market-web-components/{p-7076038b.entry.js.map → p-daa74e60.entry.js.map} +1 -1
  1017. package/pn-market-web-components/p-dc2ee6f8.entry.js +2 -0
  1018. package/pn-market-web-components/p-dc2ee6f8.entry.js.map +1 -0
  1019. package/pn-market-web-components/p-e733f44f.entry.js +2 -0
  1020. package/pn-market-web-components/p-e733f44f.entry.js.map +1 -0
  1021. package/pn-market-web-components/p-e8622338.entry.js +2 -0
  1022. package/pn-market-web-components/{p-b9505c69.entry.js.map → p-e8622338.entry.js.map} +1 -1
  1023. package/pn-market-web-components/p-eb21f772.entry.js +2 -0
  1024. package/pn-market-web-components/p-eb21f772.entry.js.map +1 -0
  1025. package/pn-market-web-components/p-efab81a9.entry.js +2 -0
  1026. package/pn-market-web-components/p-efab81a9.entry.js.map +1 -0
  1027. package/pn-market-web-components/{p-278cda98.entry.js → p-f0df7694.entry.js} +4 -4
  1028. package/pn-market-web-components/{p-278cda98.entry.js.map → p-f0df7694.entry.js.map} +1 -1
  1029. package/pn-market-web-components/p-f21311ad.entry.js +2 -0
  1030. package/pn-market-web-components/{p-545c24c0.entry.js.map → p-f21311ad.entry.js.map} +1 -1
  1031. package/pn-market-web-components/p-f28059f4.entry.js +2 -0
  1032. package/pn-market-web-components/{p-856c235c.entry.js.map → p-f28059f4.entry.js.map} +1 -1
  1033. package/pn-market-web-components/p-f28d0971.entry.js +2 -0
  1034. package/pn-market-web-components/{p-54f3a3b6.entry.js.map → p-f28d0971.entry.js.map} +1 -1
  1035. package/pn-market-web-components/p-f4b14be8.entry.js +2 -0
  1036. package/pn-market-web-components/{p-1ec21bd6.entry.js.map → p-f4b14be8.entry.js.map} +1 -1
  1037. package/pn-market-web-components/p-f5d03222.entry.js +2 -0
  1038. package/pn-market-web-components/{p-90242f18.entry.js.map → p-f5d03222.entry.js.map} +1 -1
  1039. package/pn-market-web-components/{p-8af1b914.js → p-f9083b7a.js} +2 -2
  1040. package/pn-market-web-components/{p-cafe11a9.js → p-fb4cdf98.js} +2 -2
  1041. package/pn-market-web-components/p-fe466661.js +2 -0
  1042. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  1043. package/pn-market-web-components/pn-market-web-components.esm.js.map +1 -1
  1044. package/types/components/cards/pn-teaser-card/pn-teaser-card.d.ts +1 -1
  1045. package/types/components/input/pn-address-autofill/pn-address-autofill.d.ts +2 -3
  1046. package/types/components/input/pn-address-autofill/translations.d.ts +3 -0
  1047. package/types/components/input/pn-marketweb-search/pn-marketweb-search.d.ts +1 -1
  1048. package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.d.ts +0 -2
  1049. package/types/components/media/pn-media-block/pn-media-block.d.ts +1 -1
  1050. package/types/components/widgets/pn-chat/pn-chat-message/pn-chat-message.d.ts +10 -0
  1051. package/types/components/widgets/pn-chat/pn-chat-message/pn-chat-message.stories.d.ts +7 -0
  1052. package/types/components/widgets/pn-chat/pn-chat-stories-constants.d.ts +164 -0
  1053. package/types/components/widgets/pn-chat/pn-chat.d.ts +72 -0
  1054. package/types/components/widgets/pn-chat/pn-chat.models.d.ts +22 -0
  1055. package/types/components/widgets/pn-chat/pn-chat.service.d.ts +26 -0
  1056. package/types/components/widgets/pn-chat/pn-chat.stories.d.ts +8 -0
  1057. package/types/components/widgets/pn-chat/translations.d.ts +77 -0
  1058. package/types/components/widgets/pn-chat/types.d.ts +68 -0
  1059. package/types/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.d.ts +23 -0
  1060. package/types/components/widgets/pn-level-up/pn-level-up-modal/pn-level-up-modal.stories.d.ts +5 -0
  1061. package/types/components/widgets/pn-level-up/pn-level-up.d.ts +43 -0
  1062. package/types/components/widgets/pn-level-up/pn-level-up.models.d.ts +22 -0
  1063. package/types/components/widgets/pn-level-up/pn-level-up.service.d.ts +16 -0
  1064. package/types/components/widgets/pn-level-up/pn-level-up.stories.d.ts +7 -0
  1065. package/types/components/widgets/pn-level-up/types.d.ts +1 -0
  1066. package/types/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.d.ts +48 -0
  1067. package/types/components/widgets/pn-marketweb-carousel/pn-marketweb-carousel.stories.d.ts +7 -0
  1068. package/types/components/widgets/pn-marketweb-table/pn-marketweb-table.d.ts +55 -0
  1069. package/types/components/widgets/pn-marketweb-table/pn-marketweb-table.service.d.ts +11 -0
  1070. package/types/components/widgets/pn-marketweb-table/pn-marketweb-table.stories.d.ts +26 -0
  1071. package/types/components/widgets/pn-marketweb-table/translations.d.ts +72 -0
  1072. package/types/components/widgets/pn-marketweb-table/types.d.ts +38 -0
  1073. package/types/components/widgets/pn-qr-code-generator/pn-qr-code-generator.d.ts +23 -0
  1074. package/types/components/widgets/pn-qr-code-generator/pn-qr-code-generator.stories.d.ts +5 -0
  1075. package/types/components/widgets/pn-search/pn-search.d.ts +29 -0
  1076. package/types/components/widgets/pn-search/pn-search.stories.d.ts +7 -0
  1077. package/types/components/widgets/pn-usp-simple/pn-usp-simple.d.ts +19 -0
  1078. package/types/components/widgets/pn-usp-simple/pn-usp-simple.stories.d.ts +7 -0
  1079. package/types/components.d.ts +393 -8
  1080. package/types/globals/HeadingTag.d.ts +1 -1
  1081. package/types/globals/LocalStorageService.d.ts +14 -0
  1082. package/types/globals/ScreensizeDetect.d.ts +29 -0
  1083. package/types/globals/types.d.ts +18 -0
  1084. package/types/utils/utils.d.ts +1 -0
  1085. package/umd/pn-marketweb-init.js +1 -1
  1086. package/umd/pn-marketweb-salesforce.js +1 -1
  1087. package/vscode-data.json +677 -3
  1088. package/cjs/FetchHelper-e951824f.js.map +0 -1
  1089. package/cjs/index-34e1c673.js.map +0 -1
  1090. package/cjs/pn-marketweb-siteheader-login-button_5.cjs.entry.js.map +0 -1
  1091. package/components/pn-marketweb-siteheader-login-mypage-button2.js +0 -38
  1092. package/components/pn-marketweb-siteheader-login-mypage-button2.js.map +0 -1
  1093. package/esm/FetchHelper-746f2bb6.js.map +0 -1
  1094. package/esm/index-51d67461.js.map +0 -1
  1095. package/esm/pn-marketweb-siteheader-login-button_5.entry.js.map +0 -1
  1096. package/pn-market-web-components/p-066e9db9.entry.js +0 -2
  1097. package/pn-market-web-components/p-0ec8d040.entry.js +0 -2
  1098. package/pn-market-web-components/p-13190b30.js +0 -2
  1099. package/pn-market-web-components/p-190c6938.entry.js +0 -2
  1100. package/pn-market-web-components/p-1ec21bd6.entry.js +0 -2
  1101. package/pn-market-web-components/p-231b97e1.entry.js +0 -2
  1102. package/pn-market-web-components/p-23d69d70.entry.js +0 -2
  1103. package/pn-market-web-components/p-23d69d70.entry.js.map +0 -1
  1104. package/pn-market-web-components/p-24086c59.entry.js +0 -2
  1105. package/pn-market-web-components/p-25d53df2.entry.js +0 -2
  1106. package/pn-market-web-components/p-25dfc349.entry.js +0 -2
  1107. package/pn-market-web-components/p-2b03a4e1.entry.js +0 -2
  1108. package/pn-market-web-components/p-2b03a4e1.entry.js.map +0 -1
  1109. package/pn-market-web-components/p-3fb8e665.entry.js +0 -2
  1110. package/pn-market-web-components/p-45b8cadb.entry.js +0 -2
  1111. package/pn-market-web-components/p-45d1e1be.entry.js +0 -2
  1112. package/pn-market-web-components/p-4d2ca281.entry.js +0 -2
  1113. package/pn-market-web-components/p-4e3059dd.entry.js +0 -2
  1114. package/pn-market-web-components/p-4fa5bc85.entry.js +0 -2
  1115. package/pn-market-web-components/p-530274ae.entry.js +0 -2
  1116. package/pn-market-web-components/p-545c24c0.entry.js +0 -2
  1117. package/pn-market-web-components/p-54f3a3b6.entry.js +0 -2
  1118. package/pn-market-web-components/p-55643d76.entry.js +0 -2
  1119. package/pn-market-web-components/p-572c4d81.entry.js +0 -2
  1120. package/pn-market-web-components/p-572c4d81.entry.js.map +0 -1
  1121. package/pn-market-web-components/p-59549c74.entry.js +0 -2
  1122. package/pn-market-web-components/p-59cb7166.entry.js +0 -2
  1123. package/pn-market-web-components/p-59cb7166.entry.js.map +0 -1
  1124. package/pn-market-web-components/p-5a1b6e6d.entry.js +0 -2
  1125. package/pn-market-web-components/p-5d06e48f.entry.js +0 -2
  1126. package/pn-market-web-components/p-5d06e48f.entry.js.map +0 -1
  1127. package/pn-market-web-components/p-62cabd1e.entry.js +0 -2
  1128. package/pn-market-web-components/p-64d0dbba.entry.js +0 -2
  1129. package/pn-market-web-components/p-652f97b9.js +0 -2
  1130. package/pn-market-web-components/p-65ab3003.entry.js +0 -2
  1131. package/pn-market-web-components/p-65f243c1.js.map +0 -1
  1132. package/pn-market-web-components/p-6647d2c4.entry.js +0 -2
  1133. package/pn-market-web-components/p-6a5f7dee.entry.js +0 -2
  1134. package/pn-market-web-components/p-6fdd5b5a.entry.js +0 -2
  1135. package/pn-market-web-components/p-7076038b.entry.js +0 -2
  1136. package/pn-market-web-components/p-725aba56.entry.js +0 -2
  1137. package/pn-market-web-components/p-725aba56.entry.js.map +0 -1
  1138. package/pn-market-web-components/p-72dbca40.entry.js +0 -2
  1139. package/pn-market-web-components/p-74fd7435.entry.js +0 -2
  1140. package/pn-market-web-components/p-758f1b53.entry.js +0 -2
  1141. package/pn-market-web-components/p-76e6708b.entry.js +0 -2
  1142. package/pn-market-web-components/p-776f3d51.entry.js +0 -2
  1143. package/pn-market-web-components/p-77a35f5e.entry.js +0 -2
  1144. package/pn-market-web-components/p-7c3091eb.entry.js +0 -2
  1145. package/pn-market-web-components/p-7c3091eb.entry.js.map +0 -1
  1146. package/pn-market-web-components/p-856c235c.entry.js +0 -2
  1147. package/pn-market-web-components/p-8c26b98d.entry.js +0 -2
  1148. package/pn-market-web-components/p-90242f18.entry.js +0 -2
  1149. package/pn-market-web-components/p-94a69959.entry.js +0 -2
  1150. package/pn-market-web-components/p-94a69959.entry.js.map +0 -1
  1151. package/pn-market-web-components/p-95519556.entry.js +0 -2
  1152. package/pn-market-web-components/p-a38118be.entry.js +0 -2
  1153. package/pn-market-web-components/p-a419cd91.entry.js +0 -2
  1154. package/pn-market-web-components/p-a54a298b.entry.js +0 -2
  1155. package/pn-market-web-components/p-a54a298b.entry.js.map +0 -1
  1156. package/pn-market-web-components/p-a6866467.entry.js +0 -2
  1157. package/pn-market-web-components/p-a72c2729.entry.js +0 -2
  1158. package/pn-market-web-components/p-aeeabb32.entry.js +0 -2
  1159. package/pn-market-web-components/p-b35cdbac.entry.js +0 -2
  1160. package/pn-market-web-components/p-b5a0275d.entry.js +0 -2
  1161. package/pn-market-web-components/p-b693f78a.entry.js +0 -2
  1162. package/pn-market-web-components/p-b9340e9c.entry.js +0 -2
  1163. package/pn-market-web-components/p-b9340e9c.entry.js.map +0 -1
  1164. package/pn-market-web-components/p-b9505c69.entry.js +0 -2
  1165. package/pn-market-web-components/p-bb1c965e.js +0 -3
  1166. package/pn-market-web-components/p-bb1c965e.js.map +0 -1
  1167. package/pn-market-web-components/p-c5772021.entry.js +0 -2
  1168. package/pn-market-web-components/p-cf39491b.entry.js +0 -2
  1169. package/pn-market-web-components/p-d0a085cc.entry.js +0 -2
  1170. package/pn-market-web-components/p-e2e3ac2f.entry.js +0 -2
  1171. package/pn-market-web-components/p-e5ae757f.entry.js +0 -2
  1172. package/pn-market-web-components/p-e6e012fb.entry.js +0 -2
  1173. package/pn-market-web-components/p-e8278e9e.entry.js +0 -2
  1174. package/pn-market-web-components/p-e916e99d.entry.js +0 -2
  1175. package/pn-market-web-components/p-ea3d6f7e.entry.js +0 -2
  1176. package/pn-market-web-components/p-ea7b0d21.entry.js +0 -2
  1177. package/pn-market-web-components/p-fc157a1e.entry.js +0 -2
  1178. /package/pn-market-web-components/{p-652f97b9.js.map → p-72828265.js.map} +0 -0
  1179. /package/pn-market-web-components/{p-e09a907b.js.map → p-793e1339.js.map} +0 -0
  1180. /package/pn-market-web-components/{p-2509d18d.js.map → p-8836de82.js.map} +0 -0
  1181. /package/pn-market-web-components/{p-560e5291.entry.js.map → p-8a651698.entry.js.map} +0 -0
  1182. /package/pn-market-web-components/{p-959a37d9.js.map → p-930e2943.js.map} +0 -0
  1183. /package/pn-market-web-components/{p-155c2049.entry.js.map → p-ad9a7633.entry.js.map} +0 -0
  1184. /package/pn-market-web-components/{p-8af1b914.js.map → p-f9083b7a.js.map} +0 -0
  1185. /package/pn-market-web-components/{p-cafe11a9.js.map → p-fb4cdf98.js.map} +0 -0
  1186. /package/pn-market-web-components/{p-13190b30.js.map → p-fe466661.js.map} +0 -0
@@ -0,0 +1,2967 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+
3
+ var browser = {};
4
+
5
+ // can-promise has a crash in some versions of react native that dont have
6
+ // standard global objects
7
+ // https://github.com/soldair/node-qrcode/issues/157
8
+
9
+ var canPromise$1 = function () {
10
+ return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then
11
+ };
12
+
13
+ var qrcode = {};
14
+
15
+ var utils$1 = {};
16
+
17
+ let toSJISFunction;
18
+ const CODEWORDS_COUNT = [
19
+ 0, // Not used
20
+ 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,
21
+ 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,
22
+ 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,
23
+ 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706
24
+ ];
25
+
26
+ /**
27
+ * Returns the QR Code size for the specified version
28
+ *
29
+ * @param {Number} version QR Code version
30
+ * @return {Number} size of QR code
31
+ */
32
+ utils$1.getSymbolSize = function getSymbolSize (version) {
33
+ if (!version) throw new Error('"version" cannot be null or undefined')
34
+ if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40')
35
+ return version * 4 + 17
36
+ };
37
+
38
+ /**
39
+ * Returns the total number of codewords used to store data and EC information.
40
+ *
41
+ * @param {Number} version QR Code version
42
+ * @return {Number} Data length in bits
43
+ */
44
+ utils$1.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {
45
+ return CODEWORDS_COUNT[version]
46
+ };
47
+
48
+ /**
49
+ * Encode data with Bose-Chaudhuri-Hocquenghem
50
+ *
51
+ * @param {Number} data Value to encode
52
+ * @return {Number} Encoded value
53
+ */
54
+ utils$1.getBCHDigit = function (data) {
55
+ let digit = 0;
56
+
57
+ while (data !== 0) {
58
+ digit++;
59
+ data >>>= 1;
60
+ }
61
+
62
+ return digit
63
+ };
64
+
65
+ utils$1.setToSJISFunction = function setToSJISFunction (f) {
66
+ if (typeof f !== 'function') {
67
+ throw new Error('"toSJISFunc" is not a valid function.')
68
+ }
69
+
70
+ toSJISFunction = f;
71
+ };
72
+
73
+ utils$1.isKanjiModeEnabled = function () {
74
+ return typeof toSJISFunction !== 'undefined'
75
+ };
76
+
77
+ utils$1.toSJIS = function toSJIS (kanji) {
78
+ return toSJISFunction(kanji)
79
+ };
80
+
81
+ var errorCorrectionLevel = {};
82
+
83
+ (function (exports) {
84
+ exports.L = { bit: 1 };
85
+ exports.M = { bit: 0 };
86
+ exports.Q = { bit: 3 };
87
+ exports.H = { bit: 2 };
88
+
89
+ function fromString (string) {
90
+ if (typeof string !== 'string') {
91
+ throw new Error('Param is not a string')
92
+ }
93
+
94
+ const lcStr = string.toLowerCase();
95
+
96
+ switch (lcStr) {
97
+ case 'l':
98
+ case 'low':
99
+ return exports.L
100
+
101
+ case 'm':
102
+ case 'medium':
103
+ return exports.M
104
+
105
+ case 'q':
106
+ case 'quartile':
107
+ return exports.Q
108
+
109
+ case 'h':
110
+ case 'high':
111
+ return exports.H
112
+
113
+ default:
114
+ throw new Error('Unknown EC Level: ' + string)
115
+ }
116
+ }
117
+
118
+ exports.isValid = function isValid (level) {
119
+ return level && typeof level.bit !== 'undefined' &&
120
+ level.bit >= 0 && level.bit < 4
121
+ };
122
+
123
+ exports.from = function from (value, defaultValue) {
124
+ if (exports.isValid(value)) {
125
+ return value
126
+ }
127
+
128
+ try {
129
+ return fromString(value)
130
+ } catch (e) {
131
+ return defaultValue
132
+ }
133
+ };
134
+ }(errorCorrectionLevel));
135
+
136
+ function BitBuffer$1 () {
137
+ this.buffer = [];
138
+ this.length = 0;
139
+ }
140
+
141
+ BitBuffer$1.prototype = {
142
+
143
+ get: function (index) {
144
+ const bufIndex = Math.floor(index / 8);
145
+ return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1
146
+ },
147
+
148
+ put: function (num, length) {
149
+ for (let i = 0; i < length; i++) {
150
+ this.putBit(((num >>> (length - i - 1)) & 1) === 1);
151
+ }
152
+ },
153
+
154
+ getLengthInBits: function () {
155
+ return this.length
156
+ },
157
+
158
+ putBit: function (bit) {
159
+ const bufIndex = Math.floor(this.length / 8);
160
+ if (this.buffer.length <= bufIndex) {
161
+ this.buffer.push(0);
162
+ }
163
+
164
+ if (bit) {
165
+ this.buffer[bufIndex] |= (0x80 >>> (this.length % 8));
166
+ }
167
+
168
+ this.length++;
169
+ }
170
+ };
171
+
172
+ var bitBuffer = BitBuffer$1;
173
+
174
+ /**
175
+ * Helper class to handle QR Code symbol modules
176
+ *
177
+ * @param {Number} size Symbol size
178
+ */
179
+
180
+ function BitMatrix$1 (size) {
181
+ if (!size || size < 1) {
182
+ throw new Error('BitMatrix size must be defined and greater than 0')
183
+ }
184
+
185
+ this.size = size;
186
+ this.data = new Uint8Array(size * size);
187
+ this.reservedBit = new Uint8Array(size * size);
188
+ }
189
+
190
+ /**
191
+ * Set bit value at specified location
192
+ * If reserved flag is set, this bit will be ignored during masking process
193
+ *
194
+ * @param {Number} row
195
+ * @param {Number} col
196
+ * @param {Boolean} value
197
+ * @param {Boolean} reserved
198
+ */
199
+ BitMatrix$1.prototype.set = function (row, col, value, reserved) {
200
+ const index = row * this.size + col;
201
+ this.data[index] = value;
202
+ if (reserved) this.reservedBit[index] = true;
203
+ };
204
+
205
+ /**
206
+ * Returns bit value at specified location
207
+ *
208
+ * @param {Number} row
209
+ * @param {Number} col
210
+ * @return {Boolean}
211
+ */
212
+ BitMatrix$1.prototype.get = function (row, col) {
213
+ return this.data[row * this.size + col]
214
+ };
215
+
216
+ /**
217
+ * Applies xor operator at specified location
218
+ * (used during masking process)
219
+ *
220
+ * @param {Number} row
221
+ * @param {Number} col
222
+ * @param {Boolean} value
223
+ */
224
+ BitMatrix$1.prototype.xor = function (row, col, value) {
225
+ this.data[row * this.size + col] ^= value;
226
+ };
227
+
228
+ /**
229
+ * Check if bit at specified location is reserved
230
+ *
231
+ * @param {Number} row
232
+ * @param {Number} col
233
+ * @return {Boolean}
234
+ */
235
+ BitMatrix$1.prototype.isReserved = function (row, col) {
236
+ return this.reservedBit[row * this.size + col]
237
+ };
238
+
239
+ var bitMatrix = BitMatrix$1;
240
+
241
+ var alignmentPattern = {};
242
+
243
+ /**
244
+ * Alignment pattern are fixed reference pattern in defined positions
245
+ * in a matrix symbology, which enables the decode software to re-synchronise
246
+ * the coordinate mapping of the image modules in the event of moderate amounts
247
+ * of distortion of the image.
248
+ *
249
+ * Alignment patterns are present only in QR Code symbols of version 2 or larger
250
+ * and their number depends on the symbol version.
251
+ */
252
+
253
+ (function (exports) {
254
+ const getSymbolSize = utils$1.getSymbolSize;
255
+
256
+ /**
257
+ * Calculate the row/column coordinates of the center module of each alignment pattern
258
+ * for the specified QR Code version.
259
+ *
260
+ * The alignment patterns are positioned symmetrically on either side of the diagonal
261
+ * running from the top left corner of the symbol to the bottom right corner.
262
+ *
263
+ * Since positions are simmetrical only half of the coordinates are returned.
264
+ * Each item of the array will represent in turn the x and y coordinate.
265
+ * @see {@link getPositions}
266
+ *
267
+ * @param {Number} version QR Code version
268
+ * @return {Array} Array of coordinate
269
+ */
270
+ exports.getRowColCoords = function getRowColCoords (version) {
271
+ if (version === 1) return []
272
+
273
+ const posCount = Math.floor(version / 7) + 2;
274
+ const size = getSymbolSize(version);
275
+ const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2;
276
+ const positions = [size - 7]; // Last coord is always (size - 7)
277
+
278
+ for (let i = 1; i < posCount - 1; i++) {
279
+ positions[i] = positions[i - 1] - intervals;
280
+ }
281
+
282
+ positions.push(6); // First coord is always 6
283
+
284
+ return positions.reverse()
285
+ };
286
+
287
+ /**
288
+ * Returns an array containing the positions of each alignment pattern.
289
+ * Each array's element represent the center point of the pattern as (x, y) coordinates
290
+ *
291
+ * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}
292
+ * and filtering out the items that overlaps with finder pattern
293
+ *
294
+ * @example
295
+ * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.
296
+ * The alignment patterns, therefore, are to be centered on (row, column)
297
+ * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).
298
+ * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns
299
+ * and are not therefore used for alignment patterns.
300
+ *
301
+ * let pos = getPositions(7)
302
+ * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]
303
+ *
304
+ * @param {Number} version QR Code version
305
+ * @return {Array} Array of coordinates
306
+ */
307
+ exports.getPositions = function getPositions (version) {
308
+ const coords = [];
309
+ const pos = exports.getRowColCoords(version);
310
+ const posLength = pos.length;
311
+
312
+ for (let i = 0; i < posLength; i++) {
313
+ for (let j = 0; j < posLength; j++) {
314
+ // Skip if position is occupied by finder patterns
315
+ if ((i === 0 && j === 0) || // top-left
316
+ (i === 0 && j === posLength - 1) || // bottom-left
317
+ (i === posLength - 1 && j === 0)) { // top-right
318
+ continue
319
+ }
320
+
321
+ coords.push([pos[i], pos[j]]);
322
+ }
323
+ }
324
+
325
+ return coords
326
+ };
327
+ }(alignmentPattern));
328
+
329
+ var finderPattern = {};
330
+
331
+ const getSymbolSize = utils$1.getSymbolSize;
332
+ const FINDER_PATTERN_SIZE = 7;
333
+
334
+ /**
335
+ * Returns an array containing the positions of each finder pattern.
336
+ * Each array's element represent the top-left point of the pattern as (x, y) coordinates
337
+ *
338
+ * @param {Number} version QR Code version
339
+ * @return {Array} Array of coordinates
340
+ */
341
+ finderPattern.getPositions = function getPositions (version) {
342
+ const size = getSymbolSize(version);
343
+
344
+ return [
345
+ // top-left
346
+ [0, 0],
347
+ // top-right
348
+ [size - FINDER_PATTERN_SIZE, 0],
349
+ // bottom-left
350
+ [0, size - FINDER_PATTERN_SIZE]
351
+ ]
352
+ };
353
+
354
+ var maskPattern = {};
355
+
356
+ /**
357
+ * Data mask pattern reference
358
+ * @type {Object}
359
+ */
360
+
361
+ (function (exports) {
362
+ exports.Patterns = {
363
+ PATTERN000: 0,
364
+ PATTERN001: 1,
365
+ PATTERN010: 2,
366
+ PATTERN011: 3,
367
+ PATTERN100: 4,
368
+ PATTERN101: 5,
369
+ PATTERN110: 6,
370
+ PATTERN111: 7
371
+ };
372
+
373
+ /**
374
+ * Weighted penalty scores for the undesirable features
375
+ * @type {Object}
376
+ */
377
+ const PenaltyScores = {
378
+ N1: 3,
379
+ N2: 3,
380
+ N3: 40,
381
+ N4: 10
382
+ };
383
+
384
+ /**
385
+ * Check if mask pattern value is valid
386
+ *
387
+ * @param {Number} mask Mask pattern
388
+ * @return {Boolean} true if valid, false otherwise
389
+ */
390
+ exports.isValid = function isValid (mask) {
391
+ return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7
392
+ };
393
+
394
+ /**
395
+ * Returns mask pattern from a value.
396
+ * If value is not valid, returns undefined
397
+ *
398
+ * @param {Number|String} value Mask pattern value
399
+ * @return {Number} Valid mask pattern or undefined
400
+ */
401
+ exports.from = function from (value) {
402
+ return exports.isValid(value) ? parseInt(value, 10) : undefined
403
+ };
404
+
405
+ /**
406
+ * Find adjacent modules in row/column with the same color
407
+ * and assign a penalty value.
408
+ *
409
+ * Points: N1 + i
410
+ * i is the amount by which the number of adjacent modules of the same color exceeds 5
411
+ */
412
+ exports.getPenaltyN1 = function getPenaltyN1 (data) {
413
+ const size = data.size;
414
+ let points = 0;
415
+ let sameCountCol = 0;
416
+ let sameCountRow = 0;
417
+ let lastCol = null;
418
+ let lastRow = null;
419
+
420
+ for (let row = 0; row < size; row++) {
421
+ sameCountCol = sameCountRow = 0;
422
+ lastCol = lastRow = null;
423
+
424
+ for (let col = 0; col < size; col++) {
425
+ let module = data.get(row, col);
426
+ if (module === lastCol) {
427
+ sameCountCol++;
428
+ } else {
429
+ if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
430
+ lastCol = module;
431
+ sameCountCol = 1;
432
+ }
433
+
434
+ module = data.get(col, row);
435
+ if (module === lastRow) {
436
+ sameCountRow++;
437
+ } else {
438
+ if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
439
+ lastRow = module;
440
+ sameCountRow = 1;
441
+ }
442
+ }
443
+
444
+ if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5);
445
+ if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5);
446
+ }
447
+
448
+ return points
449
+ };
450
+
451
+ /**
452
+ * Find 2x2 blocks with the same color and assign a penalty value
453
+ *
454
+ * Points: N2 * (m - 1) * (n - 1)
455
+ */
456
+ exports.getPenaltyN2 = function getPenaltyN2 (data) {
457
+ const size = data.size;
458
+ let points = 0;
459
+
460
+ for (let row = 0; row < size - 1; row++) {
461
+ for (let col = 0; col < size - 1; col++) {
462
+ const last = data.get(row, col) +
463
+ data.get(row, col + 1) +
464
+ data.get(row + 1, col) +
465
+ data.get(row + 1, col + 1);
466
+
467
+ if (last === 4 || last === 0) points++;
468
+ }
469
+ }
470
+
471
+ return points * PenaltyScores.N2
472
+ };
473
+
474
+ /**
475
+ * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,
476
+ * preceded or followed by light area 4 modules wide
477
+ *
478
+ * Points: N3 * number of pattern found
479
+ */
480
+ exports.getPenaltyN3 = function getPenaltyN3 (data) {
481
+ const size = data.size;
482
+ let points = 0;
483
+ let bitsCol = 0;
484
+ let bitsRow = 0;
485
+
486
+ for (let row = 0; row < size; row++) {
487
+ bitsCol = bitsRow = 0;
488
+ for (let col = 0; col < size; col++) {
489
+ bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col);
490
+ if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++;
491
+
492
+ bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row);
493
+ if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++;
494
+ }
495
+ }
496
+
497
+ return points * PenaltyScores.N3
498
+ };
499
+
500
+ /**
501
+ * Calculate proportion of dark modules in entire symbol
502
+ *
503
+ * Points: N4 * k
504
+ *
505
+ * k is the rating of the deviation of the proportion of dark modules
506
+ * in the symbol from 50% in steps of 5%
507
+ */
508
+ exports.getPenaltyN4 = function getPenaltyN4 (data) {
509
+ let darkCount = 0;
510
+ const modulesCount = data.data.length;
511
+
512
+ for (let i = 0; i < modulesCount; i++) darkCount += data.data[i];
513
+
514
+ const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10);
515
+
516
+ return k * PenaltyScores.N4
517
+ };
518
+
519
+ /**
520
+ * Return mask value at given position
521
+ *
522
+ * @param {Number} maskPattern Pattern reference value
523
+ * @param {Number} i Row
524
+ * @param {Number} j Column
525
+ * @return {Boolean} Mask value
526
+ */
527
+ function getMaskAt (maskPattern, i, j) {
528
+ switch (maskPattern) {
529
+ case exports.Patterns.PATTERN000: return (i + j) % 2 === 0
530
+ case exports.Patterns.PATTERN001: return i % 2 === 0
531
+ case exports.Patterns.PATTERN010: return j % 3 === 0
532
+ case exports.Patterns.PATTERN011: return (i + j) % 3 === 0
533
+ case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0
534
+ case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0
535
+ case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0
536
+ case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0
537
+
538
+ default: throw new Error('bad maskPattern:' + maskPattern)
539
+ }
540
+ }
541
+
542
+ /**
543
+ * Apply a mask pattern to a BitMatrix
544
+ *
545
+ * @param {Number} pattern Pattern reference number
546
+ * @param {BitMatrix} data BitMatrix data
547
+ */
548
+ exports.applyMask = function applyMask (pattern, data) {
549
+ const size = data.size;
550
+
551
+ for (let col = 0; col < size; col++) {
552
+ for (let row = 0; row < size; row++) {
553
+ if (data.isReserved(row, col)) continue
554
+ data.xor(row, col, getMaskAt(pattern, row, col));
555
+ }
556
+ }
557
+ };
558
+
559
+ /**
560
+ * Returns the best mask pattern for data
561
+ *
562
+ * @param {BitMatrix} data
563
+ * @return {Number} Mask pattern reference number
564
+ */
565
+ exports.getBestMask = function getBestMask (data, setupFormatFunc) {
566
+ const numPatterns = Object.keys(exports.Patterns).length;
567
+ let bestPattern = 0;
568
+ let lowerPenalty = Infinity;
569
+
570
+ for (let p = 0; p < numPatterns; p++) {
571
+ setupFormatFunc(p);
572
+ exports.applyMask(p, data);
573
+
574
+ // Calculate penalty
575
+ const penalty =
576
+ exports.getPenaltyN1(data) +
577
+ exports.getPenaltyN2(data) +
578
+ exports.getPenaltyN3(data) +
579
+ exports.getPenaltyN4(data);
580
+
581
+ // Undo previously applied mask
582
+ exports.applyMask(p, data);
583
+
584
+ if (penalty < lowerPenalty) {
585
+ lowerPenalty = penalty;
586
+ bestPattern = p;
587
+ }
588
+ }
589
+
590
+ return bestPattern
591
+ };
592
+ }(maskPattern));
593
+
594
+ var errorCorrectionCode = {};
595
+
596
+ const ECLevel$1 = errorCorrectionLevel;
597
+
598
+ const EC_BLOCKS_TABLE = [
599
+ // L M Q H
600
+ 1, 1, 1, 1,
601
+ 1, 1, 1, 1,
602
+ 1, 1, 2, 2,
603
+ 1, 2, 2, 4,
604
+ 1, 2, 4, 4,
605
+ 2, 4, 4, 4,
606
+ 2, 4, 6, 5,
607
+ 2, 4, 6, 6,
608
+ 2, 5, 8, 8,
609
+ 4, 5, 8, 8,
610
+ 4, 5, 8, 11,
611
+ 4, 8, 10, 11,
612
+ 4, 9, 12, 16,
613
+ 4, 9, 16, 16,
614
+ 6, 10, 12, 18,
615
+ 6, 10, 17, 16,
616
+ 6, 11, 16, 19,
617
+ 6, 13, 18, 21,
618
+ 7, 14, 21, 25,
619
+ 8, 16, 20, 25,
620
+ 8, 17, 23, 25,
621
+ 9, 17, 23, 34,
622
+ 9, 18, 25, 30,
623
+ 10, 20, 27, 32,
624
+ 12, 21, 29, 35,
625
+ 12, 23, 34, 37,
626
+ 12, 25, 34, 40,
627
+ 13, 26, 35, 42,
628
+ 14, 28, 38, 45,
629
+ 15, 29, 40, 48,
630
+ 16, 31, 43, 51,
631
+ 17, 33, 45, 54,
632
+ 18, 35, 48, 57,
633
+ 19, 37, 51, 60,
634
+ 19, 38, 53, 63,
635
+ 20, 40, 56, 66,
636
+ 21, 43, 59, 70,
637
+ 22, 45, 62, 74,
638
+ 24, 47, 65, 77,
639
+ 25, 49, 68, 81
640
+ ];
641
+
642
+ const EC_CODEWORDS_TABLE = [
643
+ // L M Q H
644
+ 7, 10, 13, 17,
645
+ 10, 16, 22, 28,
646
+ 15, 26, 36, 44,
647
+ 20, 36, 52, 64,
648
+ 26, 48, 72, 88,
649
+ 36, 64, 96, 112,
650
+ 40, 72, 108, 130,
651
+ 48, 88, 132, 156,
652
+ 60, 110, 160, 192,
653
+ 72, 130, 192, 224,
654
+ 80, 150, 224, 264,
655
+ 96, 176, 260, 308,
656
+ 104, 198, 288, 352,
657
+ 120, 216, 320, 384,
658
+ 132, 240, 360, 432,
659
+ 144, 280, 408, 480,
660
+ 168, 308, 448, 532,
661
+ 180, 338, 504, 588,
662
+ 196, 364, 546, 650,
663
+ 224, 416, 600, 700,
664
+ 224, 442, 644, 750,
665
+ 252, 476, 690, 816,
666
+ 270, 504, 750, 900,
667
+ 300, 560, 810, 960,
668
+ 312, 588, 870, 1050,
669
+ 336, 644, 952, 1110,
670
+ 360, 700, 1020, 1200,
671
+ 390, 728, 1050, 1260,
672
+ 420, 784, 1140, 1350,
673
+ 450, 812, 1200, 1440,
674
+ 480, 868, 1290, 1530,
675
+ 510, 924, 1350, 1620,
676
+ 540, 980, 1440, 1710,
677
+ 570, 1036, 1530, 1800,
678
+ 570, 1064, 1590, 1890,
679
+ 600, 1120, 1680, 1980,
680
+ 630, 1204, 1770, 2100,
681
+ 660, 1260, 1860, 2220,
682
+ 720, 1316, 1950, 2310,
683
+ 750, 1372, 2040, 2430
684
+ ];
685
+
686
+ /**
687
+ * Returns the number of error correction block that the QR Code should contain
688
+ * for the specified version and error correction level.
689
+ *
690
+ * @param {Number} version QR Code version
691
+ * @param {Number} errorCorrectionLevel Error correction level
692
+ * @return {Number} Number of error correction blocks
693
+ */
694
+ errorCorrectionCode.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) {
695
+ switch (errorCorrectionLevel) {
696
+ case ECLevel$1.L:
697
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]
698
+ case ECLevel$1.M:
699
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]
700
+ case ECLevel$1.Q:
701
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]
702
+ case ECLevel$1.H:
703
+ return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]
704
+ default:
705
+ return undefined
706
+ }
707
+ };
708
+
709
+ /**
710
+ * Returns the number of error correction codewords to use for the specified
711
+ * version and error correction level.
712
+ *
713
+ * @param {Number} version QR Code version
714
+ * @param {Number} errorCorrectionLevel Error correction level
715
+ * @return {Number} Number of error correction codewords
716
+ */
717
+ errorCorrectionCode.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) {
718
+ switch (errorCorrectionLevel) {
719
+ case ECLevel$1.L:
720
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]
721
+ case ECLevel$1.M:
722
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]
723
+ case ECLevel$1.Q:
724
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]
725
+ case ECLevel$1.H:
726
+ return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]
727
+ default:
728
+ return undefined
729
+ }
730
+ };
731
+
732
+ var polynomial = {};
733
+
734
+ var galoisField = {};
735
+
736
+ const EXP_TABLE = new Uint8Array(512);
737
+ const LOG_TABLE = new Uint8Array(256)
738
+ /**
739
+ * Precompute the log and anti-log tables for faster computation later
740
+ *
741
+ * For each possible value in the galois field 2^8, we will pre-compute
742
+ * the logarithm and anti-logarithm (exponential) of this value
743
+ *
744
+ * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}
745
+ */
746
+ ;(function initTables () {
747
+ let x = 1;
748
+ for (let i = 0; i < 255; i++) {
749
+ EXP_TABLE[i] = x;
750
+ LOG_TABLE[x] = i;
751
+
752
+ x <<= 1; // multiply by 2
753
+
754
+ // The QR code specification says to use byte-wise modulo 100011101 arithmetic.
755
+ // This means that when a number is 256 or larger, it should be XORed with 0x11D.
756
+ if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)
757
+ x ^= 0x11D;
758
+ }
759
+ }
760
+
761
+ // Optimization: double the size of the anti-log table so that we don't need to mod 255 to
762
+ // stay inside the bounds (because we will mainly use this table for the multiplication of
763
+ // two GF numbers, no more).
764
+ // @see {@link mul}
765
+ for (let i = 255; i < 512; i++) {
766
+ EXP_TABLE[i] = EXP_TABLE[i - 255];
767
+ }
768
+ }());
769
+
770
+ /**
771
+ * Returns log value of n inside Galois Field
772
+ *
773
+ * @param {Number} n
774
+ * @return {Number}
775
+ */
776
+ galoisField.log = function log (n) {
777
+ if (n < 1) throw new Error('log(' + n + ')')
778
+ return LOG_TABLE[n]
779
+ };
780
+
781
+ /**
782
+ * Returns anti-log value of n inside Galois Field
783
+ *
784
+ * @param {Number} n
785
+ * @return {Number}
786
+ */
787
+ galoisField.exp = function exp (n) {
788
+ return EXP_TABLE[n]
789
+ };
790
+
791
+ /**
792
+ * Multiplies two number inside Galois Field
793
+ *
794
+ * @param {Number} x
795
+ * @param {Number} y
796
+ * @return {Number}
797
+ */
798
+ galoisField.mul = function mul (x, y) {
799
+ if (x === 0 || y === 0) return 0
800
+
801
+ // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized
802
+ // @see {@link initTables}
803
+ return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]
804
+ };
805
+
806
+ (function (exports) {
807
+ const GF = galoisField;
808
+
809
+ /**
810
+ * Multiplies two polynomials inside Galois Field
811
+ *
812
+ * @param {Uint8Array} p1 Polynomial
813
+ * @param {Uint8Array} p2 Polynomial
814
+ * @return {Uint8Array} Product of p1 and p2
815
+ */
816
+ exports.mul = function mul (p1, p2) {
817
+ const coeff = new Uint8Array(p1.length + p2.length - 1);
818
+
819
+ for (let i = 0; i < p1.length; i++) {
820
+ for (let j = 0; j < p2.length; j++) {
821
+ coeff[i + j] ^= GF.mul(p1[i], p2[j]);
822
+ }
823
+ }
824
+
825
+ return coeff
826
+ };
827
+
828
+ /**
829
+ * Calculate the remainder of polynomials division
830
+ *
831
+ * @param {Uint8Array} divident Polynomial
832
+ * @param {Uint8Array} divisor Polynomial
833
+ * @return {Uint8Array} Remainder
834
+ */
835
+ exports.mod = function mod (divident, divisor) {
836
+ let result = new Uint8Array(divident);
837
+
838
+ while ((result.length - divisor.length) >= 0) {
839
+ const coeff = result[0];
840
+
841
+ for (let i = 0; i < divisor.length; i++) {
842
+ result[i] ^= GF.mul(divisor[i], coeff);
843
+ }
844
+
845
+ // remove all zeros from buffer head
846
+ let offset = 0;
847
+ while (offset < result.length && result[offset] === 0) offset++;
848
+ result = result.slice(offset);
849
+ }
850
+
851
+ return result
852
+ };
853
+
854
+ /**
855
+ * Generate an irreducible generator polynomial of specified degree
856
+ * (used by Reed-Solomon encoder)
857
+ *
858
+ * @param {Number} degree Degree of the generator polynomial
859
+ * @return {Uint8Array} Buffer containing polynomial coefficients
860
+ */
861
+ exports.generateECPolynomial = function generateECPolynomial (degree) {
862
+ let poly = new Uint8Array([1]);
863
+ for (let i = 0; i < degree; i++) {
864
+ poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)]));
865
+ }
866
+
867
+ return poly
868
+ };
869
+ }(polynomial));
870
+
871
+ const Polynomial = polynomial;
872
+
873
+ function ReedSolomonEncoder$1 (degree) {
874
+ this.genPoly = undefined;
875
+ this.degree = degree;
876
+
877
+ if (this.degree) this.initialize(this.degree);
878
+ }
879
+
880
+ /**
881
+ * Initialize the encoder.
882
+ * The input param should correspond to the number of error correction codewords.
883
+ *
884
+ * @param {Number} degree
885
+ */
886
+ ReedSolomonEncoder$1.prototype.initialize = function initialize (degree) {
887
+ // create an irreducible generator polynomial
888
+ this.degree = degree;
889
+ this.genPoly = Polynomial.generateECPolynomial(this.degree);
890
+ };
891
+
892
+ /**
893
+ * Encodes a chunk of data
894
+ *
895
+ * @param {Uint8Array} data Buffer containing input data
896
+ * @return {Uint8Array} Buffer containing encoded data
897
+ */
898
+ ReedSolomonEncoder$1.prototype.encode = function encode (data) {
899
+ if (!this.genPoly) {
900
+ throw new Error('Encoder not initialized')
901
+ }
902
+
903
+ // Calculate EC for this data block
904
+ // extends data size to data+genPoly size
905
+ const paddedData = new Uint8Array(data.length + this.degree);
906
+ paddedData.set(data);
907
+
908
+ // The error correction codewords are the remainder after dividing the data codewords
909
+ // by a generator polynomial
910
+ const remainder = Polynomial.mod(paddedData, this.genPoly);
911
+
912
+ // return EC data blocks (last n byte, where n is the degree of genPoly)
913
+ // If coefficients number in remainder are less than genPoly degree,
914
+ // pad with 0s to the left to reach the needed number of coefficients
915
+ const start = this.degree - remainder.length;
916
+ if (start > 0) {
917
+ const buff = new Uint8Array(this.degree);
918
+ buff.set(remainder, start);
919
+
920
+ return buff
921
+ }
922
+
923
+ return remainder
924
+ };
925
+
926
+ var reedSolomonEncoder = ReedSolomonEncoder$1;
927
+
928
+ var version = {};
929
+
930
+ var mode = {};
931
+
932
+ var versionCheck = {};
933
+
934
+ /**
935
+ * Check if QR Code version is valid
936
+ *
937
+ * @param {Number} version QR Code version
938
+ * @return {Boolean} true if valid version, false otherwise
939
+ */
940
+
941
+ versionCheck.isValid = function isValid (version) {
942
+ return !isNaN(version) && version >= 1 && version <= 40
943
+ };
944
+
945
+ var regex = {};
946
+
947
+ const numeric = '[0-9]+';
948
+ const alphanumeric = '[A-Z $%*+\\-./:]+';
949
+ let kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +
950
+ '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +
951
+ '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +
952
+ '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+';
953
+ kanji = kanji.replace(/u/g, '\\u');
954
+
955
+ const byte = '(?:(?![A-Z0-9 $%*+\\-./:]|' + kanji + ')(?:.|[\r\n]))+';
956
+
957
+ regex.KANJI = new RegExp(kanji, 'g');
958
+ regex.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\-./:]+', 'g');
959
+ regex.BYTE = new RegExp(byte, 'g');
960
+ regex.NUMERIC = new RegExp(numeric, 'g');
961
+ regex.ALPHANUMERIC = new RegExp(alphanumeric, 'g');
962
+
963
+ const TEST_KANJI = new RegExp('^' + kanji + '$');
964
+ const TEST_NUMERIC = new RegExp('^' + numeric + '$');
965
+ const TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\-./:]+$');
966
+
967
+ regex.testKanji = function testKanji (str) {
968
+ return TEST_KANJI.test(str)
969
+ };
970
+
971
+ regex.testNumeric = function testNumeric (str) {
972
+ return TEST_NUMERIC.test(str)
973
+ };
974
+
975
+ regex.testAlphanumeric = function testAlphanumeric (str) {
976
+ return TEST_ALPHANUMERIC.test(str)
977
+ };
978
+
979
+ (function (exports) {
980
+ const VersionCheck = versionCheck;
981
+ const Regex = regex;
982
+
983
+ /**
984
+ * Numeric mode encodes data from the decimal digit set (0 - 9)
985
+ * (byte values 30HEX to 39HEX).
986
+ * Normally, 3 data characters are represented by 10 bits.
987
+ *
988
+ * @type {Object}
989
+ */
990
+ exports.NUMERIC = {
991
+ id: 'Numeric',
992
+ bit: 1 << 0,
993
+ ccBits: [10, 12, 14]
994
+ };
995
+
996
+ /**
997
+ * Alphanumeric mode encodes data from a set of 45 characters,
998
+ * i.e. 10 numeric digits (0 - 9),
999
+ * 26 alphabetic characters (A - Z),
1000
+ * and 9 symbols (SP, $, %, *, +, -, ., /, :).
1001
+ * Normally, two input characters are represented by 11 bits.
1002
+ *
1003
+ * @type {Object}
1004
+ */
1005
+ exports.ALPHANUMERIC = {
1006
+ id: 'Alphanumeric',
1007
+ bit: 1 << 1,
1008
+ ccBits: [9, 11, 13]
1009
+ };
1010
+
1011
+ /**
1012
+ * In byte mode, data is encoded at 8 bits per character.
1013
+ *
1014
+ * @type {Object}
1015
+ */
1016
+ exports.BYTE = {
1017
+ id: 'Byte',
1018
+ bit: 1 << 2,
1019
+ ccBits: [8, 16, 16]
1020
+ };
1021
+
1022
+ /**
1023
+ * The Kanji mode efficiently encodes Kanji characters in accordance with
1024
+ * the Shift JIS system based on JIS X 0208.
1025
+ * The Shift JIS values are shifted from the JIS X 0208 values.
1026
+ * JIS X 0208 gives details of the shift coded representation.
1027
+ * Each two-byte character value is compacted to a 13-bit binary codeword.
1028
+ *
1029
+ * @type {Object}
1030
+ */
1031
+ exports.KANJI = {
1032
+ id: 'Kanji',
1033
+ bit: 1 << 3,
1034
+ ccBits: [8, 10, 12]
1035
+ };
1036
+
1037
+ /**
1038
+ * Mixed mode will contain a sequences of data in a combination of any of
1039
+ * the modes described above
1040
+ *
1041
+ * @type {Object}
1042
+ */
1043
+ exports.MIXED = {
1044
+ bit: -1
1045
+ };
1046
+
1047
+ /**
1048
+ * Returns the number of bits needed to store the data length
1049
+ * according to QR Code specifications.
1050
+ *
1051
+ * @param {Mode} mode Data mode
1052
+ * @param {Number} version QR Code version
1053
+ * @return {Number} Number of bits
1054
+ */
1055
+ exports.getCharCountIndicator = function getCharCountIndicator (mode, version) {
1056
+ if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)
1057
+
1058
+ if (!VersionCheck.isValid(version)) {
1059
+ throw new Error('Invalid version: ' + version)
1060
+ }
1061
+
1062
+ if (version >= 1 && version < 10) return mode.ccBits[0]
1063
+ else if (version < 27) return mode.ccBits[1]
1064
+ return mode.ccBits[2]
1065
+ };
1066
+
1067
+ /**
1068
+ * Returns the most efficient mode to store the specified data
1069
+ *
1070
+ * @param {String} dataStr Input data string
1071
+ * @return {Mode} Best mode
1072
+ */
1073
+ exports.getBestModeForData = function getBestModeForData (dataStr) {
1074
+ if (Regex.testNumeric(dataStr)) return exports.NUMERIC
1075
+ else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC
1076
+ else if (Regex.testKanji(dataStr)) return exports.KANJI
1077
+ else return exports.BYTE
1078
+ };
1079
+
1080
+ /**
1081
+ * Return mode name as string
1082
+ *
1083
+ * @param {Mode} mode Mode object
1084
+ * @returns {String} Mode name
1085
+ */
1086
+ exports.toString = function toString (mode) {
1087
+ if (mode && mode.id) return mode.id
1088
+ throw new Error('Invalid mode')
1089
+ };
1090
+
1091
+ /**
1092
+ * Check if input param is a valid mode object
1093
+ *
1094
+ * @param {Mode} mode Mode object
1095
+ * @returns {Boolean} True if valid mode, false otherwise
1096
+ */
1097
+ exports.isValid = function isValid (mode) {
1098
+ return mode && mode.bit && mode.ccBits
1099
+ };
1100
+
1101
+ /**
1102
+ * Get mode object from its name
1103
+ *
1104
+ * @param {String} string Mode name
1105
+ * @returns {Mode} Mode object
1106
+ */
1107
+ function fromString (string) {
1108
+ if (typeof string !== 'string') {
1109
+ throw new Error('Param is not a string')
1110
+ }
1111
+
1112
+ const lcStr = string.toLowerCase();
1113
+
1114
+ switch (lcStr) {
1115
+ case 'numeric':
1116
+ return exports.NUMERIC
1117
+ case 'alphanumeric':
1118
+ return exports.ALPHANUMERIC
1119
+ case 'kanji':
1120
+ return exports.KANJI
1121
+ case 'byte':
1122
+ return exports.BYTE
1123
+ default:
1124
+ throw new Error('Unknown mode: ' + string)
1125
+ }
1126
+ }
1127
+
1128
+ /**
1129
+ * Returns mode from a value.
1130
+ * If value is not a valid mode, returns defaultValue
1131
+ *
1132
+ * @param {Mode|String} value Encoding mode
1133
+ * @param {Mode} defaultValue Fallback value
1134
+ * @return {Mode} Encoding mode
1135
+ */
1136
+ exports.from = function from (value, defaultValue) {
1137
+ if (exports.isValid(value)) {
1138
+ return value
1139
+ }
1140
+
1141
+ try {
1142
+ return fromString(value)
1143
+ } catch (e) {
1144
+ return defaultValue
1145
+ }
1146
+ };
1147
+ }(mode));
1148
+
1149
+ (function (exports) {
1150
+ const Utils = utils$1;
1151
+ const ECCode = errorCorrectionCode;
1152
+ const ECLevel = errorCorrectionLevel;
1153
+ const Mode = mode;
1154
+ const VersionCheck = versionCheck;
1155
+
1156
+ // Generator polynomial used to encode version information
1157
+ const G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0);
1158
+ const G18_BCH = Utils.getBCHDigit(G18);
1159
+
1160
+ function getBestVersionForDataLength (mode, length, errorCorrectionLevel) {
1161
+ for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
1162
+ if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {
1163
+ return currentVersion
1164
+ }
1165
+ }
1166
+
1167
+ return undefined
1168
+ }
1169
+
1170
+ function getReservedBitsCount (mode, version) {
1171
+ // Character count indicator + mode indicator bits
1172
+ return Mode.getCharCountIndicator(mode, version) + 4
1173
+ }
1174
+
1175
+ function getTotalBitsFromDataArray (segments, version) {
1176
+ let totalBits = 0;
1177
+
1178
+ segments.forEach(function (data) {
1179
+ const reservedBits = getReservedBitsCount(data.mode, version);
1180
+ totalBits += reservedBits + data.getBitsLength();
1181
+ });
1182
+
1183
+ return totalBits
1184
+ }
1185
+
1186
+ function getBestVersionForMixedData (segments, errorCorrectionLevel) {
1187
+ for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
1188
+ const length = getTotalBitsFromDataArray(segments, currentVersion);
1189
+ if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {
1190
+ return currentVersion
1191
+ }
1192
+ }
1193
+
1194
+ return undefined
1195
+ }
1196
+
1197
+ /**
1198
+ * Returns version number from a value.
1199
+ * If value is not a valid version, returns defaultValue
1200
+ *
1201
+ * @param {Number|String} value QR Code version
1202
+ * @param {Number} defaultValue Fallback value
1203
+ * @return {Number} QR Code version number
1204
+ */
1205
+ exports.from = function from (value, defaultValue) {
1206
+ if (VersionCheck.isValid(value)) {
1207
+ return parseInt(value, 10)
1208
+ }
1209
+
1210
+ return defaultValue
1211
+ };
1212
+
1213
+ /**
1214
+ * Returns how much data can be stored with the specified QR code version
1215
+ * and error correction level
1216
+ *
1217
+ * @param {Number} version QR Code version (1-40)
1218
+ * @param {Number} errorCorrectionLevel Error correction level
1219
+ * @param {Mode} mode Data mode
1220
+ * @return {Number} Quantity of storable data
1221
+ */
1222
+ exports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode) {
1223
+ if (!VersionCheck.isValid(version)) {
1224
+ throw new Error('Invalid QR Code version')
1225
+ }
1226
+
1227
+ // Use Byte mode as default
1228
+ if (typeof mode === 'undefined') mode = Mode.BYTE;
1229
+
1230
+ // Total codewords for this QR code version (Data + Error correction)
1231
+ const totalCodewords = Utils.getSymbolTotalCodewords(version);
1232
+
1233
+ // Total number of error correction codewords
1234
+ const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel);
1235
+
1236
+ // Total number of data codewords
1237
+ const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
1238
+
1239
+ if (mode === Mode.MIXED) return dataTotalCodewordsBits
1240
+
1241
+ const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version);
1242
+
1243
+ // Return max number of storable codewords
1244
+ switch (mode) {
1245
+ case Mode.NUMERIC:
1246
+ return Math.floor((usableBits / 10) * 3)
1247
+
1248
+ case Mode.ALPHANUMERIC:
1249
+ return Math.floor((usableBits / 11) * 2)
1250
+
1251
+ case Mode.KANJI:
1252
+ return Math.floor(usableBits / 13)
1253
+
1254
+ case Mode.BYTE:
1255
+ default:
1256
+ return Math.floor(usableBits / 8)
1257
+ }
1258
+ };
1259
+
1260
+ /**
1261
+ * Returns the minimum version needed to contain the amount of data
1262
+ *
1263
+ * @param {Segment} data Segment of data
1264
+ * @param {Number} [errorCorrectionLevel=H] Error correction level
1265
+ * @param {Mode} mode Data mode
1266
+ * @return {Number} QR Code version
1267
+ */
1268
+ exports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel) {
1269
+ let seg;
1270
+
1271
+ const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M);
1272
+
1273
+ if (Array.isArray(data)) {
1274
+ if (data.length > 1) {
1275
+ return getBestVersionForMixedData(data, ecl)
1276
+ }
1277
+
1278
+ if (data.length === 0) {
1279
+ return 1
1280
+ }
1281
+
1282
+ seg = data[0];
1283
+ } else {
1284
+ seg = data;
1285
+ }
1286
+
1287
+ return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)
1288
+ };
1289
+
1290
+ /**
1291
+ * Returns version information with relative error correction bits
1292
+ *
1293
+ * The version information is included in QR Code symbols of version 7 or larger.
1294
+ * It consists of an 18-bit sequence containing 6 data bits,
1295
+ * with 12 error correction bits calculated using the (18, 6) Golay code.
1296
+ *
1297
+ * @param {Number} version QR Code version
1298
+ * @return {Number} Encoded version info bits
1299
+ */
1300
+ exports.getEncodedBits = function getEncodedBits (version) {
1301
+ if (!VersionCheck.isValid(version) || version < 7) {
1302
+ throw new Error('Invalid QR Code version')
1303
+ }
1304
+
1305
+ let d = version << 12;
1306
+
1307
+ while (Utils.getBCHDigit(d) - G18_BCH >= 0) {
1308
+ d ^= (G18 << (Utils.getBCHDigit(d) - G18_BCH));
1309
+ }
1310
+
1311
+ return (version << 12) | d
1312
+ };
1313
+ }(version));
1314
+
1315
+ var formatInfo = {};
1316
+
1317
+ const Utils$3 = utils$1;
1318
+
1319
+ const G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0);
1320
+ const G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1);
1321
+ const G15_BCH = Utils$3.getBCHDigit(G15);
1322
+
1323
+ /**
1324
+ * Returns format information with relative error correction bits
1325
+ *
1326
+ * The format information is a 15-bit sequence containing 5 data bits,
1327
+ * with 10 error correction bits calculated using the (15, 5) BCH code.
1328
+ *
1329
+ * @param {Number} errorCorrectionLevel Error correction level
1330
+ * @param {Number} mask Mask pattern
1331
+ * @return {Number} Encoded format information bits
1332
+ */
1333
+ formatInfo.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {
1334
+ const data = ((errorCorrectionLevel.bit << 3) | mask);
1335
+ let d = data << 10;
1336
+
1337
+ while (Utils$3.getBCHDigit(d) - G15_BCH >= 0) {
1338
+ d ^= (G15 << (Utils$3.getBCHDigit(d) - G15_BCH));
1339
+ }
1340
+
1341
+ // xor final data with mask pattern in order to ensure that
1342
+ // no combination of Error Correction Level and data mask pattern
1343
+ // will result in an all-zero data string
1344
+ return ((data << 10) | d) ^ G15_MASK
1345
+ };
1346
+
1347
+ var segments = {};
1348
+
1349
+ const Mode$4 = mode;
1350
+
1351
+ function NumericData (data) {
1352
+ this.mode = Mode$4.NUMERIC;
1353
+ this.data = data.toString();
1354
+ }
1355
+
1356
+ NumericData.getBitsLength = function getBitsLength (length) {
1357
+ return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)
1358
+ };
1359
+
1360
+ NumericData.prototype.getLength = function getLength () {
1361
+ return this.data.length
1362
+ };
1363
+
1364
+ NumericData.prototype.getBitsLength = function getBitsLength () {
1365
+ return NumericData.getBitsLength(this.data.length)
1366
+ };
1367
+
1368
+ NumericData.prototype.write = function write (bitBuffer) {
1369
+ let i, group, value;
1370
+
1371
+ // The input data string is divided into groups of three digits,
1372
+ // and each group is converted to its 10-bit binary equivalent.
1373
+ for (i = 0; i + 3 <= this.data.length; i += 3) {
1374
+ group = this.data.substr(i, 3);
1375
+ value = parseInt(group, 10);
1376
+
1377
+ bitBuffer.put(value, 10);
1378
+ }
1379
+
1380
+ // If the number of input digits is not an exact multiple of three,
1381
+ // the final one or two digits are converted to 4 or 7 bits respectively.
1382
+ const remainingNum = this.data.length - i;
1383
+ if (remainingNum > 0) {
1384
+ group = this.data.substr(i);
1385
+ value = parseInt(group, 10);
1386
+
1387
+ bitBuffer.put(value, remainingNum * 3 + 1);
1388
+ }
1389
+ };
1390
+
1391
+ var numericData = NumericData;
1392
+
1393
+ const Mode$3 = mode;
1394
+
1395
+ /**
1396
+ * Array of characters available in alphanumeric mode
1397
+ *
1398
+ * As per QR Code specification, to each character
1399
+ * is assigned a value from 0 to 44 which in this case coincides
1400
+ * with the array index
1401
+ *
1402
+ * @type {Array}
1403
+ */
1404
+ const ALPHA_NUM_CHARS = [
1405
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
1406
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
1407
+ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
1408
+ ' ', '$', '%', '*', '+', '-', '.', '/', ':'
1409
+ ];
1410
+
1411
+ function AlphanumericData (data) {
1412
+ this.mode = Mode$3.ALPHANUMERIC;
1413
+ this.data = data;
1414
+ }
1415
+
1416
+ AlphanumericData.getBitsLength = function getBitsLength (length) {
1417
+ return 11 * Math.floor(length / 2) + 6 * (length % 2)
1418
+ };
1419
+
1420
+ AlphanumericData.prototype.getLength = function getLength () {
1421
+ return this.data.length
1422
+ };
1423
+
1424
+ AlphanumericData.prototype.getBitsLength = function getBitsLength () {
1425
+ return AlphanumericData.getBitsLength(this.data.length)
1426
+ };
1427
+
1428
+ AlphanumericData.prototype.write = function write (bitBuffer) {
1429
+ let i;
1430
+
1431
+ // Input data characters are divided into groups of two characters
1432
+ // and encoded as 11-bit binary codes.
1433
+ for (i = 0; i + 2 <= this.data.length; i += 2) {
1434
+ // The character value of the first character is multiplied by 45
1435
+ let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45;
1436
+
1437
+ // The character value of the second digit is added to the product
1438
+ value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1]);
1439
+
1440
+ // The sum is then stored as 11-bit binary number
1441
+ bitBuffer.put(value, 11);
1442
+ }
1443
+
1444
+ // If the number of input data characters is not a multiple of two,
1445
+ // the character value of the final character is encoded as a 6-bit binary number.
1446
+ if (this.data.length % 2) {
1447
+ bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6);
1448
+ }
1449
+ };
1450
+
1451
+ var alphanumericData = AlphanumericData;
1452
+
1453
+ const Mode$2 = mode;
1454
+
1455
+ function ByteData (data) {
1456
+ this.mode = Mode$2.BYTE;
1457
+ if (typeof (data) === 'string') {
1458
+ this.data = new TextEncoder().encode(data);
1459
+ } else {
1460
+ this.data = new Uint8Array(data);
1461
+ }
1462
+ }
1463
+
1464
+ ByteData.getBitsLength = function getBitsLength (length) {
1465
+ return length * 8
1466
+ };
1467
+
1468
+ ByteData.prototype.getLength = function getLength () {
1469
+ return this.data.length
1470
+ };
1471
+
1472
+ ByteData.prototype.getBitsLength = function getBitsLength () {
1473
+ return ByteData.getBitsLength(this.data.length)
1474
+ };
1475
+
1476
+ ByteData.prototype.write = function (bitBuffer) {
1477
+ for (let i = 0, l = this.data.length; i < l; i++) {
1478
+ bitBuffer.put(this.data[i], 8);
1479
+ }
1480
+ };
1481
+
1482
+ var byteData = ByteData;
1483
+
1484
+ const Mode$1 = mode;
1485
+ const Utils$2 = utils$1;
1486
+
1487
+ function KanjiData (data) {
1488
+ this.mode = Mode$1.KANJI;
1489
+ this.data = data;
1490
+ }
1491
+
1492
+ KanjiData.getBitsLength = function getBitsLength (length) {
1493
+ return length * 13
1494
+ };
1495
+
1496
+ KanjiData.prototype.getLength = function getLength () {
1497
+ return this.data.length
1498
+ };
1499
+
1500
+ KanjiData.prototype.getBitsLength = function getBitsLength () {
1501
+ return KanjiData.getBitsLength(this.data.length)
1502
+ };
1503
+
1504
+ KanjiData.prototype.write = function (bitBuffer) {
1505
+ let i;
1506
+
1507
+ // In the Shift JIS system, Kanji characters are represented by a two byte combination.
1508
+ // These byte values are shifted from the JIS X 0208 values.
1509
+ // JIS X 0208 gives details of the shift coded representation.
1510
+ for (i = 0; i < this.data.length; i++) {
1511
+ let value = Utils$2.toSJIS(this.data[i]);
1512
+
1513
+ // For characters with Shift JIS values from 0x8140 to 0x9FFC:
1514
+ if (value >= 0x8140 && value <= 0x9FFC) {
1515
+ // Subtract 0x8140 from Shift JIS value
1516
+ value -= 0x8140;
1517
+
1518
+ // For characters with Shift JIS values from 0xE040 to 0xEBBF
1519
+ } else if (value >= 0xE040 && value <= 0xEBBF) {
1520
+ // Subtract 0xC140 from Shift JIS value
1521
+ value -= 0xC140;
1522
+ } else {
1523
+ throw new Error(
1524
+ 'Invalid SJIS character: ' + this.data[i] + '\n' +
1525
+ 'Make sure your charset is UTF-8')
1526
+ }
1527
+
1528
+ // Multiply most significant byte of result by 0xC0
1529
+ // and add least significant byte to product
1530
+ value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff);
1531
+
1532
+ // Convert result to a 13-bit binary string
1533
+ bitBuffer.put(value, 13);
1534
+ }
1535
+ };
1536
+
1537
+ var kanjiData = KanjiData;
1538
+
1539
+ var dijkstra = {exports: {}};
1540
+
1541
+ (function (module) {
1542
+
1543
+ /******************************************************************************
1544
+ * Created 2008-08-19.
1545
+ *
1546
+ * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.
1547
+ *
1548
+ * Copyright (C) 2008
1549
+ * Wyatt Baldwin <self@wyattbaldwin.com>
1550
+ * All rights reserved
1551
+ *
1552
+ * Licensed under the MIT license.
1553
+ *
1554
+ * http://www.opensource.org/licenses/mit-license.php
1555
+ *
1556
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1557
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1558
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1559
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1560
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1561
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1562
+ * THE SOFTWARE.
1563
+ *****************************************************************************/
1564
+ var dijkstra = {
1565
+ single_source_shortest_paths: function(graph, s, d) {
1566
+ // Predecessor map for each node that has been encountered.
1567
+ // node ID => predecessor node ID
1568
+ var predecessors = {};
1569
+
1570
+ // Costs of shortest paths from s to all nodes encountered.
1571
+ // node ID => cost
1572
+ var costs = {};
1573
+ costs[s] = 0;
1574
+
1575
+ // Costs of shortest paths from s to all nodes encountered; differs from
1576
+ // `costs` in that it provides easy access to the node that currently has
1577
+ // the known shortest path from s.
1578
+ // XXX: Do we actually need both `costs` and `open`?
1579
+ var open = dijkstra.PriorityQueue.make();
1580
+ open.push(s, 0);
1581
+
1582
+ var closest,
1583
+ u, v,
1584
+ cost_of_s_to_u,
1585
+ adjacent_nodes,
1586
+ cost_of_e,
1587
+ cost_of_s_to_u_plus_cost_of_e,
1588
+ cost_of_s_to_v,
1589
+ first_visit;
1590
+ while (!open.empty()) {
1591
+ // In the nodes remaining in graph that have a known cost from s,
1592
+ // find the node, u, that currently has the shortest path from s.
1593
+ closest = open.pop();
1594
+ u = closest.value;
1595
+ cost_of_s_to_u = closest.cost;
1596
+
1597
+ // Get nodes adjacent to u...
1598
+ adjacent_nodes = graph[u] || {};
1599
+
1600
+ // ...and explore the edges that connect u to those nodes, updating
1601
+ // the cost of the shortest paths to any or all of those nodes as
1602
+ // necessary. v is the node across the current edge from u.
1603
+ for (v in adjacent_nodes) {
1604
+ if (adjacent_nodes.hasOwnProperty(v)) {
1605
+ // Get the cost of the edge running from u to v.
1606
+ cost_of_e = adjacent_nodes[v];
1607
+
1608
+ // Cost of s to u plus the cost of u to v across e--this is *a*
1609
+ // cost from s to v that may or may not be less than the current
1610
+ // known cost to v.
1611
+ cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;
1612
+
1613
+ // If we haven't visited v yet OR if the current known cost from s to
1614
+ // v is greater than the new cost we just found (cost of s to u plus
1615
+ // cost of u to v across e), update v's cost in the cost list and
1616
+ // update v's predecessor in the predecessor list (it's now u).
1617
+ cost_of_s_to_v = costs[v];
1618
+ first_visit = (typeof costs[v] === 'undefined');
1619
+ if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {
1620
+ costs[v] = cost_of_s_to_u_plus_cost_of_e;
1621
+ open.push(v, cost_of_s_to_u_plus_cost_of_e);
1622
+ predecessors[v] = u;
1623
+ }
1624
+ }
1625
+ }
1626
+ }
1627
+
1628
+ if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {
1629
+ var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');
1630
+ throw new Error(msg);
1631
+ }
1632
+
1633
+ return predecessors;
1634
+ },
1635
+
1636
+ extract_shortest_path_from_predecessor_list: function(predecessors, d) {
1637
+ var nodes = [];
1638
+ var u = d;
1639
+ while (u) {
1640
+ nodes.push(u);
1641
+ u = predecessors[u];
1642
+ }
1643
+ nodes.reverse();
1644
+ return nodes;
1645
+ },
1646
+
1647
+ find_path: function(graph, s, d) {
1648
+ var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);
1649
+ return dijkstra.extract_shortest_path_from_predecessor_list(
1650
+ predecessors, d);
1651
+ },
1652
+
1653
+ /**
1654
+ * A very naive priority queue implementation.
1655
+ */
1656
+ PriorityQueue: {
1657
+ make: function (opts) {
1658
+ var T = dijkstra.PriorityQueue,
1659
+ t = {},
1660
+ key;
1661
+ opts = opts || {};
1662
+ for (key in T) {
1663
+ if (T.hasOwnProperty(key)) {
1664
+ t[key] = T[key];
1665
+ }
1666
+ }
1667
+ t.queue = [];
1668
+ t.sorter = opts.sorter || T.default_sorter;
1669
+ return t;
1670
+ },
1671
+
1672
+ default_sorter: function (a, b) {
1673
+ return a.cost - b.cost;
1674
+ },
1675
+
1676
+ /**
1677
+ * Add a new item to the queue and ensure the highest priority element
1678
+ * is at the front of the queue.
1679
+ */
1680
+ push: function (value, cost) {
1681
+ var item = {value: value, cost: cost};
1682
+ this.queue.push(item);
1683
+ this.queue.sort(this.sorter);
1684
+ },
1685
+
1686
+ /**
1687
+ * Return the highest priority element in the queue.
1688
+ */
1689
+ pop: function () {
1690
+ return this.queue.shift();
1691
+ },
1692
+
1693
+ empty: function () {
1694
+ return this.queue.length === 0;
1695
+ }
1696
+ }
1697
+ };
1698
+
1699
+
1700
+ // node.js module exports
1701
+ {
1702
+ module.exports = dijkstra;
1703
+ }
1704
+ }(dijkstra));
1705
+
1706
+ (function (exports) {
1707
+ const Mode = mode;
1708
+ const NumericData = numericData;
1709
+ const AlphanumericData = alphanumericData;
1710
+ const ByteData = byteData;
1711
+ const KanjiData = kanjiData;
1712
+ const Regex = regex;
1713
+ const Utils = utils$1;
1714
+ const dijkstra$1 = dijkstra.exports;
1715
+
1716
+ /**
1717
+ * Returns UTF8 byte length
1718
+ *
1719
+ * @param {String} str Input string
1720
+ * @return {Number} Number of byte
1721
+ */
1722
+ function getStringByteLength (str) {
1723
+ return unescape(encodeURIComponent(str)).length
1724
+ }
1725
+
1726
+ /**
1727
+ * Get a list of segments of the specified mode
1728
+ * from a string
1729
+ *
1730
+ * @param {Mode} mode Segment mode
1731
+ * @param {String} str String to process
1732
+ * @return {Array} Array of object with segments data
1733
+ */
1734
+ function getSegments (regex, mode, str) {
1735
+ const segments = [];
1736
+ let result;
1737
+
1738
+ while ((result = regex.exec(str)) !== null) {
1739
+ segments.push({
1740
+ data: result[0],
1741
+ index: result.index,
1742
+ mode: mode,
1743
+ length: result[0].length
1744
+ });
1745
+ }
1746
+
1747
+ return segments
1748
+ }
1749
+
1750
+ /**
1751
+ * Extracts a series of segments with the appropriate
1752
+ * modes from a string
1753
+ *
1754
+ * @param {String} dataStr Input string
1755
+ * @return {Array} Array of object with segments data
1756
+ */
1757
+ function getSegmentsFromString (dataStr) {
1758
+ const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr);
1759
+ const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr);
1760
+ let byteSegs;
1761
+ let kanjiSegs;
1762
+
1763
+ if (Utils.isKanjiModeEnabled()) {
1764
+ byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr);
1765
+ kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr);
1766
+ } else {
1767
+ byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr);
1768
+ kanjiSegs = [];
1769
+ }
1770
+
1771
+ const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs);
1772
+
1773
+ return segs
1774
+ .sort(function (s1, s2) {
1775
+ return s1.index - s2.index
1776
+ })
1777
+ .map(function (obj) {
1778
+ return {
1779
+ data: obj.data,
1780
+ mode: obj.mode,
1781
+ length: obj.length
1782
+ }
1783
+ })
1784
+ }
1785
+
1786
+ /**
1787
+ * Returns how many bits are needed to encode a string of
1788
+ * specified length with the specified mode
1789
+ *
1790
+ * @param {Number} length String length
1791
+ * @param {Mode} mode Segment mode
1792
+ * @return {Number} Bit length
1793
+ */
1794
+ function getSegmentBitsLength (length, mode) {
1795
+ switch (mode) {
1796
+ case Mode.NUMERIC:
1797
+ return NumericData.getBitsLength(length)
1798
+ case Mode.ALPHANUMERIC:
1799
+ return AlphanumericData.getBitsLength(length)
1800
+ case Mode.KANJI:
1801
+ return KanjiData.getBitsLength(length)
1802
+ case Mode.BYTE:
1803
+ return ByteData.getBitsLength(length)
1804
+ }
1805
+ }
1806
+
1807
+ /**
1808
+ * Merges adjacent segments which have the same mode
1809
+ *
1810
+ * @param {Array} segs Array of object with segments data
1811
+ * @return {Array} Array of object with segments data
1812
+ */
1813
+ function mergeSegments (segs) {
1814
+ return segs.reduce(function (acc, curr) {
1815
+ const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null;
1816
+ if (prevSeg && prevSeg.mode === curr.mode) {
1817
+ acc[acc.length - 1].data += curr.data;
1818
+ return acc
1819
+ }
1820
+
1821
+ acc.push(curr);
1822
+ return acc
1823
+ }, [])
1824
+ }
1825
+
1826
+ /**
1827
+ * Generates a list of all possible nodes combination which
1828
+ * will be used to build a segments graph.
1829
+ *
1830
+ * Nodes are divided by groups. Each group will contain a list of all the modes
1831
+ * in which is possible to encode the given text.
1832
+ *
1833
+ * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.
1834
+ * The group for '12345' will contain then 3 objects, one for each
1835
+ * possible encoding mode.
1836
+ *
1837
+ * Each node represents a possible segment.
1838
+ *
1839
+ * @param {Array} segs Array of object with segments data
1840
+ * @return {Array} Array of object with segments data
1841
+ */
1842
+ function buildNodes (segs) {
1843
+ const nodes = [];
1844
+ for (let i = 0; i < segs.length; i++) {
1845
+ const seg = segs[i];
1846
+
1847
+ switch (seg.mode) {
1848
+ case Mode.NUMERIC:
1849
+ nodes.push([seg,
1850
+ { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },
1851
+ { data: seg.data, mode: Mode.BYTE, length: seg.length }
1852
+ ]);
1853
+ break
1854
+ case Mode.ALPHANUMERIC:
1855
+ nodes.push([seg,
1856
+ { data: seg.data, mode: Mode.BYTE, length: seg.length }
1857
+ ]);
1858
+ break
1859
+ case Mode.KANJI:
1860
+ nodes.push([seg,
1861
+ { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }
1862
+ ]);
1863
+ break
1864
+ case Mode.BYTE:
1865
+ nodes.push([
1866
+ { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }
1867
+ ]);
1868
+ }
1869
+ }
1870
+
1871
+ return nodes
1872
+ }
1873
+
1874
+ /**
1875
+ * Builds a graph from a list of nodes.
1876
+ * All segments in each node group will be connected with all the segments of
1877
+ * the next group and so on.
1878
+ *
1879
+ * At each connection will be assigned a weight depending on the
1880
+ * segment's byte length.
1881
+ *
1882
+ * @param {Array} nodes Array of object with segments data
1883
+ * @param {Number} version QR Code version
1884
+ * @return {Object} Graph of all possible segments
1885
+ */
1886
+ function buildGraph (nodes, version) {
1887
+ const table = {};
1888
+ const graph = { start: {} };
1889
+ let prevNodeIds = ['start'];
1890
+
1891
+ for (let i = 0; i < nodes.length; i++) {
1892
+ const nodeGroup = nodes[i];
1893
+ const currentNodeIds = [];
1894
+
1895
+ for (let j = 0; j < nodeGroup.length; j++) {
1896
+ const node = nodeGroup[j];
1897
+ const key = '' + i + j;
1898
+
1899
+ currentNodeIds.push(key);
1900
+ table[key] = { node: node, lastCount: 0 };
1901
+ graph[key] = {};
1902
+
1903
+ for (let n = 0; n < prevNodeIds.length; n++) {
1904
+ const prevNodeId = prevNodeIds[n];
1905
+
1906
+ if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {
1907
+ graph[prevNodeId][key] =
1908
+ getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -
1909
+ getSegmentBitsLength(table[prevNodeId].lastCount, node.mode);
1910
+
1911
+ table[prevNodeId].lastCount += node.length;
1912
+ } else {
1913
+ if (table[prevNodeId]) table[prevNodeId].lastCount = node.length;
1914
+
1915
+ graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +
1916
+ 4 + Mode.getCharCountIndicator(node.mode, version); // switch cost
1917
+ }
1918
+ }
1919
+ }
1920
+
1921
+ prevNodeIds = currentNodeIds;
1922
+ }
1923
+
1924
+ for (let n = 0; n < prevNodeIds.length; n++) {
1925
+ graph[prevNodeIds[n]].end = 0;
1926
+ }
1927
+
1928
+ return { map: graph, table: table }
1929
+ }
1930
+
1931
+ /**
1932
+ * Builds a segment from a specified data and mode.
1933
+ * If a mode is not specified, the more suitable will be used.
1934
+ *
1935
+ * @param {String} data Input data
1936
+ * @param {Mode | String} modesHint Data mode
1937
+ * @return {Segment} Segment
1938
+ */
1939
+ function buildSingleSegment (data, modesHint) {
1940
+ let mode;
1941
+ const bestMode = Mode.getBestModeForData(data);
1942
+
1943
+ mode = Mode.from(modesHint, bestMode);
1944
+
1945
+ // Make sure data can be encoded
1946
+ if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {
1947
+ throw new Error('"' + data + '"' +
1948
+ ' cannot be encoded with mode ' + Mode.toString(mode) +
1949
+ '.\n Suggested mode is: ' + Mode.toString(bestMode))
1950
+ }
1951
+
1952
+ // Use Mode.BYTE if Kanji support is disabled
1953
+ if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {
1954
+ mode = Mode.BYTE;
1955
+ }
1956
+
1957
+ switch (mode) {
1958
+ case Mode.NUMERIC:
1959
+ return new NumericData(data)
1960
+
1961
+ case Mode.ALPHANUMERIC:
1962
+ return new AlphanumericData(data)
1963
+
1964
+ case Mode.KANJI:
1965
+ return new KanjiData(data)
1966
+
1967
+ case Mode.BYTE:
1968
+ return new ByteData(data)
1969
+ }
1970
+ }
1971
+
1972
+ /**
1973
+ * Builds a list of segments from an array.
1974
+ * Array can contain Strings or Objects with segment's info.
1975
+ *
1976
+ * For each item which is a string, will be generated a segment with the given
1977
+ * string and the more appropriate encoding mode.
1978
+ *
1979
+ * For each item which is an object, will be generated a segment with the given
1980
+ * data and mode.
1981
+ * Objects must contain at least the property "data".
1982
+ * If property "mode" is not present, the more suitable mode will be used.
1983
+ *
1984
+ * @param {Array} array Array of objects with segments data
1985
+ * @return {Array} Array of Segments
1986
+ */
1987
+ exports.fromArray = function fromArray (array) {
1988
+ return array.reduce(function (acc, seg) {
1989
+ if (typeof seg === 'string') {
1990
+ acc.push(buildSingleSegment(seg, null));
1991
+ } else if (seg.data) {
1992
+ acc.push(buildSingleSegment(seg.data, seg.mode));
1993
+ }
1994
+
1995
+ return acc
1996
+ }, [])
1997
+ };
1998
+
1999
+ /**
2000
+ * Builds an optimized sequence of segments from a string,
2001
+ * which will produce the shortest possible bitstream.
2002
+ *
2003
+ * @param {String} data Input string
2004
+ * @param {Number} version QR Code version
2005
+ * @return {Array} Array of segments
2006
+ */
2007
+ exports.fromString = function fromString (data, version) {
2008
+ const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled());
2009
+
2010
+ const nodes = buildNodes(segs);
2011
+ const graph = buildGraph(nodes, version);
2012
+ const path = dijkstra$1.find_path(graph.map, 'start', 'end');
2013
+
2014
+ const optimizedSegs = [];
2015
+ for (let i = 1; i < path.length - 1; i++) {
2016
+ optimizedSegs.push(graph.table[path[i]].node);
2017
+ }
2018
+
2019
+ return exports.fromArray(mergeSegments(optimizedSegs))
2020
+ };
2021
+
2022
+ /**
2023
+ * Splits a string in various segments with the modes which
2024
+ * best represent their content.
2025
+ * The produced segments are far from being optimized.
2026
+ * The output of this function is only used to estimate a QR Code version
2027
+ * which may contain the data.
2028
+ *
2029
+ * @param {string} data Input string
2030
+ * @return {Array} Array of segments
2031
+ */
2032
+ exports.rawSplit = function rawSplit (data) {
2033
+ return exports.fromArray(
2034
+ getSegmentsFromString(data, Utils.isKanjiModeEnabled())
2035
+ )
2036
+ };
2037
+ }(segments));
2038
+
2039
+ const Utils$1 = utils$1;
2040
+ const ECLevel = errorCorrectionLevel;
2041
+ const BitBuffer = bitBuffer;
2042
+ const BitMatrix = bitMatrix;
2043
+ const AlignmentPattern = alignmentPattern;
2044
+ const FinderPattern = finderPattern;
2045
+ const MaskPattern = maskPattern;
2046
+ const ECCode = errorCorrectionCode;
2047
+ const ReedSolomonEncoder = reedSolomonEncoder;
2048
+ const Version = version;
2049
+ const FormatInfo = formatInfo;
2050
+ const Mode = mode;
2051
+ const Segments = segments;
2052
+
2053
+ /**
2054
+ * QRCode for JavaScript
2055
+ *
2056
+ * modified by Ryan Day for nodejs support
2057
+ * Copyright (c) 2011 Ryan Day
2058
+ *
2059
+ * Licensed under the MIT license:
2060
+ * http://www.opensource.org/licenses/mit-license.php
2061
+ *
2062
+ //---------------------------------------------------------------------
2063
+ // QRCode for JavaScript
2064
+ //
2065
+ // Copyright (c) 2009 Kazuhiko Arase
2066
+ //
2067
+ // URL: http://www.d-project.com/
2068
+ //
2069
+ // Licensed under the MIT license:
2070
+ // http://www.opensource.org/licenses/mit-license.php
2071
+ //
2072
+ // The word "QR Code" is registered trademark of
2073
+ // DENSO WAVE INCORPORATED
2074
+ // http://www.denso-wave.com/qrcode/faqpatent-e.html
2075
+ //
2076
+ //---------------------------------------------------------------------
2077
+ */
2078
+
2079
+ /**
2080
+ * Add finder patterns bits to matrix
2081
+ *
2082
+ * @param {BitMatrix} matrix Modules matrix
2083
+ * @param {Number} version QR Code version
2084
+ */
2085
+ function setupFinderPattern (matrix, version) {
2086
+ const size = matrix.size;
2087
+ const pos = FinderPattern.getPositions(version);
2088
+
2089
+ for (let i = 0; i < pos.length; i++) {
2090
+ const row = pos[i][0];
2091
+ const col = pos[i][1];
2092
+
2093
+ for (let r = -1; r <= 7; r++) {
2094
+ if (row + r <= -1 || size <= row + r) continue
2095
+
2096
+ for (let c = -1; c <= 7; c++) {
2097
+ if (col + c <= -1 || size <= col + c) continue
2098
+
2099
+ if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||
2100
+ (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||
2101
+ (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {
2102
+ matrix.set(row + r, col + c, true, true);
2103
+ } else {
2104
+ matrix.set(row + r, col + c, false, true);
2105
+ }
2106
+ }
2107
+ }
2108
+ }
2109
+ }
2110
+
2111
+ /**
2112
+ * Add timing pattern bits to matrix
2113
+ *
2114
+ * Note: this function must be called before {@link setupAlignmentPattern}
2115
+ *
2116
+ * @param {BitMatrix} matrix Modules matrix
2117
+ */
2118
+ function setupTimingPattern (matrix) {
2119
+ const size = matrix.size;
2120
+
2121
+ for (let r = 8; r < size - 8; r++) {
2122
+ const value = r % 2 === 0;
2123
+ matrix.set(r, 6, value, true);
2124
+ matrix.set(6, r, value, true);
2125
+ }
2126
+ }
2127
+
2128
+ /**
2129
+ * Add alignment patterns bits to matrix
2130
+ *
2131
+ * Note: this function must be called after {@link setupTimingPattern}
2132
+ *
2133
+ * @param {BitMatrix} matrix Modules matrix
2134
+ * @param {Number} version QR Code version
2135
+ */
2136
+ function setupAlignmentPattern (matrix, version) {
2137
+ const pos = AlignmentPattern.getPositions(version);
2138
+
2139
+ for (let i = 0; i < pos.length; i++) {
2140
+ const row = pos[i][0];
2141
+ const col = pos[i][1];
2142
+
2143
+ for (let r = -2; r <= 2; r++) {
2144
+ for (let c = -2; c <= 2; c++) {
2145
+ if (r === -2 || r === 2 || c === -2 || c === 2 ||
2146
+ (r === 0 && c === 0)) {
2147
+ matrix.set(row + r, col + c, true, true);
2148
+ } else {
2149
+ matrix.set(row + r, col + c, false, true);
2150
+ }
2151
+ }
2152
+ }
2153
+ }
2154
+ }
2155
+
2156
+ /**
2157
+ * Add version info bits to matrix
2158
+ *
2159
+ * @param {BitMatrix} matrix Modules matrix
2160
+ * @param {Number} version QR Code version
2161
+ */
2162
+ function setupVersionInfo (matrix, version) {
2163
+ const size = matrix.size;
2164
+ const bits = Version.getEncodedBits(version);
2165
+ let row, col, mod;
2166
+
2167
+ for (let i = 0; i < 18; i++) {
2168
+ row = Math.floor(i / 3);
2169
+ col = i % 3 + size - 8 - 3;
2170
+ mod = ((bits >> i) & 1) === 1;
2171
+
2172
+ matrix.set(row, col, mod, true);
2173
+ matrix.set(col, row, mod, true);
2174
+ }
2175
+ }
2176
+
2177
+ /**
2178
+ * Add format info bits to matrix
2179
+ *
2180
+ * @param {BitMatrix} matrix Modules matrix
2181
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
2182
+ * @param {Number} maskPattern Mask pattern reference value
2183
+ */
2184
+ function setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {
2185
+ const size = matrix.size;
2186
+ const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern);
2187
+ let i, mod;
2188
+
2189
+ for (i = 0; i < 15; i++) {
2190
+ mod = ((bits >> i) & 1) === 1;
2191
+
2192
+ // vertical
2193
+ if (i < 6) {
2194
+ matrix.set(i, 8, mod, true);
2195
+ } else if (i < 8) {
2196
+ matrix.set(i + 1, 8, mod, true);
2197
+ } else {
2198
+ matrix.set(size - 15 + i, 8, mod, true);
2199
+ }
2200
+
2201
+ // horizontal
2202
+ if (i < 8) {
2203
+ matrix.set(8, size - i - 1, mod, true);
2204
+ } else if (i < 9) {
2205
+ matrix.set(8, 15 - i - 1 + 1, mod, true);
2206
+ } else {
2207
+ matrix.set(8, 15 - i - 1, mod, true);
2208
+ }
2209
+ }
2210
+
2211
+ // fixed module
2212
+ matrix.set(size - 8, 8, 1, true);
2213
+ }
2214
+
2215
+ /**
2216
+ * Add encoded data bits to matrix
2217
+ *
2218
+ * @param {BitMatrix} matrix Modules matrix
2219
+ * @param {Uint8Array} data Data codewords
2220
+ */
2221
+ function setupData (matrix, data) {
2222
+ const size = matrix.size;
2223
+ let inc = -1;
2224
+ let row = size - 1;
2225
+ let bitIndex = 7;
2226
+ let byteIndex = 0;
2227
+
2228
+ for (let col = size - 1; col > 0; col -= 2) {
2229
+ if (col === 6) col--;
2230
+
2231
+ while (true) {
2232
+ for (let c = 0; c < 2; c++) {
2233
+ if (!matrix.isReserved(row, col - c)) {
2234
+ let dark = false;
2235
+
2236
+ if (byteIndex < data.length) {
2237
+ dark = (((data[byteIndex] >>> bitIndex) & 1) === 1);
2238
+ }
2239
+
2240
+ matrix.set(row, col - c, dark);
2241
+ bitIndex--;
2242
+
2243
+ if (bitIndex === -1) {
2244
+ byteIndex++;
2245
+ bitIndex = 7;
2246
+ }
2247
+ }
2248
+ }
2249
+
2250
+ row += inc;
2251
+
2252
+ if (row < 0 || size <= row) {
2253
+ row -= inc;
2254
+ inc = -inc;
2255
+ break
2256
+ }
2257
+ }
2258
+ }
2259
+ }
2260
+
2261
+ /**
2262
+ * Create encoded codewords from data input
2263
+ *
2264
+ * @param {Number} version QR Code version
2265
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
2266
+ * @param {ByteData} data Data input
2267
+ * @return {Uint8Array} Buffer containing encoded codewords
2268
+ */
2269
+ function createData (version, errorCorrectionLevel, segments) {
2270
+ // Prepare data buffer
2271
+ const buffer = new BitBuffer();
2272
+
2273
+ segments.forEach(function (data) {
2274
+ // prefix data with mode indicator (4 bits)
2275
+ buffer.put(data.mode.bit, 4);
2276
+
2277
+ // Prefix data with character count indicator.
2278
+ // The character count indicator is a string of bits that represents the
2279
+ // number of characters that are being encoded.
2280
+ // The character count indicator must be placed after the mode indicator
2281
+ // and must be a certain number of bits long, depending on the QR version
2282
+ // and data mode
2283
+ // @see {@link Mode.getCharCountIndicator}.
2284
+ buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version));
2285
+
2286
+ // add binary data sequence to buffer
2287
+ data.write(buffer);
2288
+ });
2289
+
2290
+ // Calculate required number of bits
2291
+ const totalCodewords = Utils$1.getSymbolTotalCodewords(version);
2292
+ const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel);
2293
+ const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8;
2294
+
2295
+ // Add a terminator.
2296
+ // If the bit string is shorter than the total number of required bits,
2297
+ // a terminator of up to four 0s must be added to the right side of the string.
2298
+ // If the bit string is more than four bits shorter than the required number of bits,
2299
+ // add four 0s to the end.
2300
+ if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {
2301
+ buffer.put(0, 4);
2302
+ }
2303
+
2304
+ // If the bit string is fewer than four bits shorter, add only the number of 0s that
2305
+ // are needed to reach the required number of bits.
2306
+
2307
+ // After adding the terminator, if the number of bits in the string is not a multiple of 8,
2308
+ // pad the string on the right with 0s to make the string's length a multiple of 8.
2309
+ while (buffer.getLengthInBits() % 8 !== 0) {
2310
+ buffer.putBit(0);
2311
+ }
2312
+
2313
+ // Add pad bytes if the string is still shorter than the total number of required bits.
2314
+ // Extend the buffer to fill the data capacity of the symbol corresponding to
2315
+ // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)
2316
+ // and 00010001 (0x11) alternately.
2317
+ const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8;
2318
+ for (let i = 0; i < remainingByte; i++) {
2319
+ buffer.put(i % 2 ? 0x11 : 0xEC, 8);
2320
+ }
2321
+
2322
+ return createCodewords(buffer, version, errorCorrectionLevel)
2323
+ }
2324
+
2325
+ /**
2326
+ * Encode input data with Reed-Solomon and return codewords with
2327
+ * relative error correction bits
2328
+ *
2329
+ * @param {BitBuffer} bitBuffer Data to encode
2330
+ * @param {Number} version QR Code version
2331
+ * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
2332
+ * @return {Uint8Array} Buffer containing encoded codewords
2333
+ */
2334
+ function createCodewords (bitBuffer, version, errorCorrectionLevel) {
2335
+ // Total codewords for this QR code version (Data + Error correction)
2336
+ const totalCodewords = Utils$1.getSymbolTotalCodewords(version);
2337
+
2338
+ // Total number of error correction codewords
2339
+ const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel);
2340
+
2341
+ // Total number of data codewords
2342
+ const dataTotalCodewords = totalCodewords - ecTotalCodewords;
2343
+
2344
+ // Total number of blocks
2345
+ const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel);
2346
+
2347
+ // Calculate how many blocks each group should contain
2348
+ const blocksInGroup2 = totalCodewords % ecTotalBlocks;
2349
+ const blocksInGroup1 = ecTotalBlocks - blocksInGroup2;
2350
+
2351
+ const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks);
2352
+
2353
+ const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks);
2354
+ const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1;
2355
+
2356
+ // Number of EC codewords is the same for both groups
2357
+ const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1;
2358
+
2359
+ // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount
2360
+ const rs = new ReedSolomonEncoder(ecCount);
2361
+
2362
+ let offset = 0;
2363
+ const dcData = new Array(ecTotalBlocks);
2364
+ const ecData = new Array(ecTotalBlocks);
2365
+ let maxDataSize = 0;
2366
+ const buffer = new Uint8Array(bitBuffer.buffer);
2367
+
2368
+ // Divide the buffer into the required number of blocks
2369
+ for (let b = 0; b < ecTotalBlocks; b++) {
2370
+ const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2;
2371
+
2372
+ // extract a block of data from buffer
2373
+ dcData[b] = buffer.slice(offset, offset + dataSize);
2374
+
2375
+ // Calculate EC codewords for this data block
2376
+ ecData[b] = rs.encode(dcData[b]);
2377
+
2378
+ offset += dataSize;
2379
+ maxDataSize = Math.max(maxDataSize, dataSize);
2380
+ }
2381
+
2382
+ // Create final data
2383
+ // Interleave the data and error correction codewords from each block
2384
+ const data = new Uint8Array(totalCodewords);
2385
+ let index = 0;
2386
+ let i, r;
2387
+
2388
+ // Add data codewords
2389
+ for (i = 0; i < maxDataSize; i++) {
2390
+ for (r = 0; r < ecTotalBlocks; r++) {
2391
+ if (i < dcData[r].length) {
2392
+ data[index++] = dcData[r][i];
2393
+ }
2394
+ }
2395
+ }
2396
+
2397
+ // Apped EC codewords
2398
+ for (i = 0; i < ecCount; i++) {
2399
+ for (r = 0; r < ecTotalBlocks; r++) {
2400
+ data[index++] = ecData[r][i];
2401
+ }
2402
+ }
2403
+
2404
+ return data
2405
+ }
2406
+
2407
+ /**
2408
+ * Build QR Code symbol
2409
+ *
2410
+ * @param {String} data Input string
2411
+ * @param {Number} version QR Code version
2412
+ * @param {ErrorCorretionLevel} errorCorrectionLevel Error level
2413
+ * @param {MaskPattern} maskPattern Mask pattern
2414
+ * @return {Object} Object containing symbol data
2415
+ */
2416
+ function createSymbol (data, version, errorCorrectionLevel, maskPattern) {
2417
+ let segments;
2418
+
2419
+ if (Array.isArray(data)) {
2420
+ segments = Segments.fromArray(data);
2421
+ } else if (typeof data === 'string') {
2422
+ let estimatedVersion = version;
2423
+
2424
+ if (!estimatedVersion) {
2425
+ const rawSegments = Segments.rawSplit(data);
2426
+
2427
+ // Estimate best version that can contain raw splitted segments
2428
+ estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel);
2429
+ }
2430
+
2431
+ // Build optimized segments
2432
+ // If estimated version is undefined, try with the highest version
2433
+ segments = Segments.fromString(data, estimatedVersion || 40);
2434
+ } else {
2435
+ throw new Error('Invalid data')
2436
+ }
2437
+
2438
+ // Get the min version that can contain data
2439
+ const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel);
2440
+
2441
+ // If no version is found, data cannot be stored
2442
+ if (!bestVersion) {
2443
+ throw new Error('The amount of data is too big to be stored in a QR Code')
2444
+ }
2445
+
2446
+ // If not specified, use min version as default
2447
+ if (!version) {
2448
+ version = bestVersion;
2449
+
2450
+ // Check if the specified version can contain the data
2451
+ } else if (version < bestVersion) {
2452
+ throw new Error('\n' +
2453
+ 'The chosen QR Code version cannot contain this amount of data.\n' +
2454
+ 'Minimum version required to store current data is: ' + bestVersion + '.\n'
2455
+ )
2456
+ }
2457
+
2458
+ const dataBits = createData(version, errorCorrectionLevel, segments);
2459
+
2460
+ // Allocate matrix buffer
2461
+ const moduleCount = Utils$1.getSymbolSize(version);
2462
+ const modules = new BitMatrix(moduleCount);
2463
+
2464
+ // Add function modules
2465
+ setupFinderPattern(modules, version);
2466
+ setupTimingPattern(modules);
2467
+ setupAlignmentPattern(modules, version);
2468
+
2469
+ // Add temporary dummy bits for format info just to set them as reserved.
2470
+ // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}
2471
+ // since the masking operation must be performed only on the encoding region.
2472
+ // These blocks will be replaced with correct values later in code.
2473
+ setupFormatInfo(modules, errorCorrectionLevel, 0);
2474
+
2475
+ if (version >= 7) {
2476
+ setupVersionInfo(modules, version);
2477
+ }
2478
+
2479
+ // Add data codewords
2480
+ setupData(modules, dataBits);
2481
+
2482
+ if (isNaN(maskPattern)) {
2483
+ // Find best mask pattern
2484
+ maskPattern = MaskPattern.getBestMask(modules,
2485
+ setupFormatInfo.bind(null, modules, errorCorrectionLevel));
2486
+ }
2487
+
2488
+ // Apply mask pattern
2489
+ MaskPattern.applyMask(maskPattern, modules);
2490
+
2491
+ // Replace format info bits with correct values
2492
+ setupFormatInfo(modules, errorCorrectionLevel, maskPattern);
2493
+
2494
+ return {
2495
+ modules: modules,
2496
+ version: version,
2497
+ errorCorrectionLevel: errorCorrectionLevel,
2498
+ maskPattern: maskPattern,
2499
+ segments: segments
2500
+ }
2501
+ }
2502
+
2503
+ /**
2504
+ * QR Code
2505
+ *
2506
+ * @param {String | Array} data Input data
2507
+ * @param {Object} options Optional configurations
2508
+ * @param {Number} options.version QR Code version
2509
+ * @param {String} options.errorCorrectionLevel Error correction level
2510
+ * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis
2511
+ */
2512
+ qrcode.create = function create (data, options) {
2513
+ if (typeof data === 'undefined' || data === '') {
2514
+ throw new Error('No input text')
2515
+ }
2516
+
2517
+ let errorCorrectionLevel = ECLevel.M;
2518
+ let version;
2519
+ let mask;
2520
+
2521
+ if (typeof options !== 'undefined') {
2522
+ // Use higher error correction level as default
2523
+ errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M);
2524
+ version = Version.from(options.version);
2525
+ mask = MaskPattern.from(options.maskPattern);
2526
+
2527
+ if (options.toSJISFunc) {
2528
+ Utils$1.setToSJISFunction(options.toSJISFunc);
2529
+ }
2530
+ }
2531
+
2532
+ return createSymbol(data, version, errorCorrectionLevel, mask)
2533
+ };
2534
+
2535
+ var canvas = {};
2536
+
2537
+ var utils = {};
2538
+
2539
+ (function (exports) {
2540
+ function hex2rgba (hex) {
2541
+ if (typeof hex === 'number') {
2542
+ hex = hex.toString();
2543
+ }
2544
+
2545
+ if (typeof hex !== 'string') {
2546
+ throw new Error('Color should be defined as hex string')
2547
+ }
2548
+
2549
+ let hexCode = hex.slice().replace('#', '').split('');
2550
+ if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {
2551
+ throw new Error('Invalid hex color: ' + hex)
2552
+ }
2553
+
2554
+ // Convert from short to long form (fff -> ffffff)
2555
+ if (hexCode.length === 3 || hexCode.length === 4) {
2556
+ hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {
2557
+ return [c, c]
2558
+ }));
2559
+ }
2560
+
2561
+ // Add default alpha value
2562
+ if (hexCode.length === 6) hexCode.push('F', 'F');
2563
+
2564
+ const hexValue = parseInt(hexCode.join(''), 16);
2565
+
2566
+ return {
2567
+ r: (hexValue >> 24) & 255,
2568
+ g: (hexValue >> 16) & 255,
2569
+ b: (hexValue >> 8) & 255,
2570
+ a: hexValue & 255,
2571
+ hex: '#' + hexCode.slice(0, 6).join('')
2572
+ }
2573
+ }
2574
+
2575
+ exports.getOptions = function getOptions (options) {
2576
+ if (!options) options = {};
2577
+ if (!options.color) options.color = {};
2578
+
2579
+ const margin = typeof options.margin === 'undefined' ||
2580
+ options.margin === null ||
2581
+ options.margin < 0
2582
+ ? 4
2583
+ : options.margin;
2584
+
2585
+ const width = options.width && options.width >= 21 ? options.width : undefined;
2586
+ const scale = options.scale || 4;
2587
+
2588
+ return {
2589
+ width: width,
2590
+ scale: width ? 4 : scale,
2591
+ margin: margin,
2592
+ color: {
2593
+ dark: hex2rgba(options.color.dark || '#000000ff'),
2594
+ light: hex2rgba(options.color.light || '#ffffffff')
2595
+ },
2596
+ type: options.type,
2597
+ rendererOpts: options.rendererOpts || {}
2598
+ }
2599
+ };
2600
+
2601
+ exports.getScale = function getScale (qrSize, opts) {
2602
+ return opts.width && opts.width >= qrSize + opts.margin * 2
2603
+ ? opts.width / (qrSize + opts.margin * 2)
2604
+ : opts.scale
2605
+ };
2606
+
2607
+ exports.getImageWidth = function getImageWidth (qrSize, opts) {
2608
+ const scale = exports.getScale(qrSize, opts);
2609
+ return Math.floor((qrSize + opts.margin * 2) * scale)
2610
+ };
2611
+
2612
+ exports.qrToImageData = function qrToImageData (imgData, qr, opts) {
2613
+ const size = qr.modules.size;
2614
+ const data = qr.modules.data;
2615
+ const scale = exports.getScale(size, opts);
2616
+ const symbolSize = Math.floor((size + opts.margin * 2) * scale);
2617
+ const scaledMargin = opts.margin * scale;
2618
+ const palette = [opts.color.light, opts.color.dark];
2619
+
2620
+ for (let i = 0; i < symbolSize; i++) {
2621
+ for (let j = 0; j < symbolSize; j++) {
2622
+ let posDst = (i * symbolSize + j) * 4;
2623
+ let pxColor = opts.color.light;
2624
+
2625
+ if (i >= scaledMargin && j >= scaledMargin &&
2626
+ i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {
2627
+ const iSrc = Math.floor((i - scaledMargin) / scale);
2628
+ const jSrc = Math.floor((j - scaledMargin) / scale);
2629
+ pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0];
2630
+ }
2631
+
2632
+ imgData[posDst++] = pxColor.r;
2633
+ imgData[posDst++] = pxColor.g;
2634
+ imgData[posDst++] = pxColor.b;
2635
+ imgData[posDst] = pxColor.a;
2636
+ }
2637
+ }
2638
+ };
2639
+ }(utils));
2640
+
2641
+ (function (exports) {
2642
+ const Utils = utils;
2643
+
2644
+ function clearCanvas (ctx, canvas, size) {
2645
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
2646
+
2647
+ if (!canvas.style) canvas.style = {};
2648
+ canvas.height = size;
2649
+ canvas.width = size;
2650
+ canvas.style.height = size + 'px';
2651
+ canvas.style.width = size + 'px';
2652
+ }
2653
+
2654
+ function getCanvasElement () {
2655
+ try {
2656
+ return document.createElement('canvas')
2657
+ } catch (e) {
2658
+ throw new Error('You need to specify a canvas element')
2659
+ }
2660
+ }
2661
+
2662
+ exports.render = function render (qrData, canvas, options) {
2663
+ let opts = options;
2664
+ let canvasEl = canvas;
2665
+
2666
+ if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
2667
+ opts = canvas;
2668
+ canvas = undefined;
2669
+ }
2670
+
2671
+ if (!canvas) {
2672
+ canvasEl = getCanvasElement();
2673
+ }
2674
+
2675
+ opts = Utils.getOptions(opts);
2676
+ const size = Utils.getImageWidth(qrData.modules.size, opts);
2677
+
2678
+ const ctx = canvasEl.getContext('2d');
2679
+ const image = ctx.createImageData(size, size);
2680
+ Utils.qrToImageData(image.data, qrData, opts);
2681
+
2682
+ clearCanvas(ctx, canvasEl, size);
2683
+ ctx.putImageData(image, 0, 0);
2684
+
2685
+ return canvasEl
2686
+ };
2687
+
2688
+ exports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {
2689
+ let opts = options;
2690
+
2691
+ if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
2692
+ opts = canvas;
2693
+ canvas = undefined;
2694
+ }
2695
+
2696
+ if (!opts) opts = {};
2697
+
2698
+ const canvasEl = exports.render(qrData, canvas, opts);
2699
+
2700
+ const type = opts.type || 'image/png';
2701
+ const rendererOpts = opts.rendererOpts || {};
2702
+
2703
+ return canvasEl.toDataURL(type, rendererOpts.quality)
2704
+ };
2705
+ }(canvas));
2706
+
2707
+ var svgTag = {};
2708
+
2709
+ const Utils = utils;
2710
+
2711
+ function getColorAttrib (color, attrib) {
2712
+ const alpha = color.a / 255;
2713
+ const str = attrib + '="' + color.hex + '"';
2714
+
2715
+ return alpha < 1
2716
+ ? str + ' ' + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"'
2717
+ : str
2718
+ }
2719
+
2720
+ function svgCmd (cmd, x, y) {
2721
+ let str = cmd + x;
2722
+ if (typeof y !== 'undefined') str += ' ' + y;
2723
+
2724
+ return str
2725
+ }
2726
+
2727
+ function qrToPath (data, size, margin) {
2728
+ let path = '';
2729
+ let moveBy = 0;
2730
+ let newRow = false;
2731
+ let lineLength = 0;
2732
+
2733
+ for (let i = 0; i < data.length; i++) {
2734
+ const col = Math.floor(i % size);
2735
+ const row = Math.floor(i / size);
2736
+
2737
+ if (!col && !newRow) newRow = true;
2738
+
2739
+ if (data[i]) {
2740
+ lineLength++;
2741
+
2742
+ if (!(i > 0 && col > 0 && data[i - 1])) {
2743
+ path += newRow
2744
+ ? svgCmd('M', col + margin, 0.5 + row + margin)
2745
+ : svgCmd('m', moveBy, 0);
2746
+
2747
+ moveBy = 0;
2748
+ newRow = false;
2749
+ }
2750
+
2751
+ if (!(col + 1 < size && data[i + 1])) {
2752
+ path += svgCmd('h', lineLength);
2753
+ lineLength = 0;
2754
+ }
2755
+ } else {
2756
+ moveBy++;
2757
+ }
2758
+ }
2759
+
2760
+ return path
2761
+ }
2762
+
2763
+ svgTag.render = function render (qrData, options, cb) {
2764
+ const opts = Utils.getOptions(options);
2765
+ const size = qrData.modules.size;
2766
+ const data = qrData.modules.data;
2767
+ const qrcodesize = size + opts.margin * 2;
2768
+
2769
+ const bg = !opts.color.light.a
2770
+ ? ''
2771
+ : '<path ' + getColorAttrib(opts.color.light, 'fill') +
2772
+ ' d="M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z"/>';
2773
+
2774
+ const path =
2775
+ '<path ' + getColorAttrib(opts.color.dark, 'stroke') +
2776
+ ' d="' + qrToPath(data, size, opts.margin) + '"/>';
2777
+
2778
+ const viewBox = 'viewBox="' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '"';
2779
+
2780
+ const width = !opts.width ? '' : 'width="' + opts.width + '" height="' + opts.width + '" ';
2781
+
2782
+ const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path + '</svg>\n';
2783
+
2784
+ if (typeof cb === 'function') {
2785
+ cb(null, svgTag);
2786
+ }
2787
+
2788
+ return svgTag
2789
+ };
2790
+
2791
+ const canPromise = canPromise$1;
2792
+
2793
+ const QRCode = qrcode;
2794
+ const CanvasRenderer = canvas;
2795
+ const SvgRenderer = svgTag;
2796
+
2797
+ function renderCanvas (renderFunc, canvas, text, opts, cb) {
2798
+ const args = [].slice.call(arguments, 1);
2799
+ const argsNum = args.length;
2800
+ const isLastArgCb = typeof args[argsNum - 1] === 'function';
2801
+
2802
+ if (!isLastArgCb && !canPromise()) {
2803
+ throw new Error('Callback required as last argument')
2804
+ }
2805
+
2806
+ if (isLastArgCb) {
2807
+ if (argsNum < 2) {
2808
+ throw new Error('Too few arguments provided')
2809
+ }
2810
+
2811
+ if (argsNum === 2) {
2812
+ cb = text;
2813
+ text = canvas;
2814
+ canvas = opts = undefined;
2815
+ } else if (argsNum === 3) {
2816
+ if (canvas.getContext && typeof cb === 'undefined') {
2817
+ cb = opts;
2818
+ opts = undefined;
2819
+ } else {
2820
+ cb = opts;
2821
+ opts = text;
2822
+ text = canvas;
2823
+ canvas = undefined;
2824
+ }
2825
+ }
2826
+ } else {
2827
+ if (argsNum < 1) {
2828
+ throw new Error('Too few arguments provided')
2829
+ }
2830
+
2831
+ if (argsNum === 1) {
2832
+ text = canvas;
2833
+ canvas = opts = undefined;
2834
+ } else if (argsNum === 2 && !canvas.getContext) {
2835
+ opts = text;
2836
+ text = canvas;
2837
+ canvas = undefined;
2838
+ }
2839
+
2840
+ return new Promise(function (resolve, reject) {
2841
+ try {
2842
+ const data = QRCode.create(text, opts);
2843
+ resolve(renderFunc(data, canvas, opts));
2844
+ } catch (e) {
2845
+ reject(e);
2846
+ }
2847
+ })
2848
+ }
2849
+
2850
+ try {
2851
+ const data = QRCode.create(text, opts);
2852
+ cb(null, renderFunc(data, canvas, opts));
2853
+ } catch (e) {
2854
+ cb(e);
2855
+ }
2856
+ }
2857
+
2858
+ browser.create = QRCode.create;
2859
+ browser.toCanvas = renderCanvas.bind(null, CanvasRenderer.render);
2860
+ browser.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL);
2861
+
2862
+ // only svg for now.
2863
+ browser.toString = renderCanvas.bind(null, function (data, _, opts) {
2864
+ return SvgRenderer.render(data, opts)
2865
+ });
2866
+
2867
+ const pnQrCodeGeneratorCss = "pn-button-dropdown .pn-button-dropdown>pn-button>.pn-button{min-height:initial}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}@media screen and (max-width: 767px){.sr-only-mobile{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}}pn-qr-code-generator{display:block;text-align:center}pn-qr-code-generator canvas{border:1px solid #d3cecb;transition:filter 0.3s ease;width:20rem;height:20rem}pn-qr-code-generator canvas.outdated{filter:grayscale(100%)}pn-qr-code-generator .timer{margin-top:1rem;text-align:center;font-size:1.4rem;color:#2d2013}pn-qr-code-generator .outdated-message{color:#a70707}pn-qr-code-generator .qr-button__wrapper{background:transparent;border:none;padding:0;width:20rem;height:20rem}pn-qr-code-generator .qr-button__wrapper:focus,pn-qr-code-generator .qr-button__wrapper:focus-visible{outline-color:#005d92}";
2868
+ const PnQrCodeGeneratorStyle0 = pnQrCodeGeneratorCss;
2869
+
2870
+ const QrCodeGenerator = /*@__PURE__*/ proxyCustomElement(class QrCodeGenerator extends HTMLElement {
2871
+ constructor() {
2872
+ super();
2873
+ this.__registerHost();
2874
+ this.url = undefined;
2875
+ this.countdownSeconds = -1;
2876
+ this.outdatedMessage = undefined;
2877
+ this.expiresInMessage = undefined;
2878
+ this.updateCodeEverySecond = true;
2879
+ this.ariaLabel = undefined;
2880
+ this.remainingSeconds = undefined;
2881
+ this.isOutdated = false;
2882
+ this.isFullscreen = false;
2883
+ }
2884
+ canvasRef;
2885
+ timer;
2886
+ urlWithSegment;
2887
+ gray900 = '#2d2013';
2888
+ blackHex = '#000';
2889
+ whiteHex = '#fff';
2890
+ componentWillLoad() {
2891
+ this.urlWithSegment = this.url + '#';
2892
+ this.remainingSeconds = this.countdownSeconds;
2893
+ }
2894
+ componentDidLoad() {
2895
+ this.generateQRCode();
2896
+ if (this.countdownSeconds !== -1) {
2897
+ this.startCountdown();
2898
+ }
2899
+ }
2900
+ generateQRCode(urlSegment = '') {
2901
+ if (this.url && this.canvasRef) {
2902
+ this.urlWithSegment += urlSegment;
2903
+ browser.toCanvas(this.canvasRef, this.urlWithSegment, {
2904
+ width: 200,
2905
+ color: {
2906
+ dark: this.isOutdated ? this.gray900 : this.blackHex,
2907
+ light: this.isOutdated ? this.gray900 : this.whiteHex,
2908
+ },
2909
+ }, error => {
2910
+ if (error)
2911
+ console.error(error);
2912
+ });
2913
+ }
2914
+ }
2915
+ startCountdown() {
2916
+ this.timer = setInterval(() => {
2917
+ if (this.remainingSeconds > 0) {
2918
+ this.remainingSeconds--;
2919
+ this.generateQRCode('p');
2920
+ }
2921
+ else {
2922
+ clearInterval(this.timer);
2923
+ this.isOutdated = true;
2924
+ this.generateQRCode();
2925
+ }
2926
+ }, 1000);
2927
+ }
2928
+ disconnectedCallback() {
2929
+ clearInterval(this.timer);
2930
+ }
2931
+ render() {
2932
+ return (h("div", { key: 'e0bc37a181c7787812bbd052877cf1c0ecffe4c9' }, h("button", { key: '6486b7b7e94493ba8cf32d6cef7e9224c119a8ea', class: "qr-button__wrapper", "aria-label": this.ariaLabel }, h("canvas", { key: 'e66b827b3a7b92b3cf250e73b0dade3675fad9b7', class: this.isOutdated ? 'outdated' : '', ref: el => (this.canvasRef = el) })), this.countdownSeconds !== -1 && h("div", { key: '122ba7328a26fb6116ffc5b6c9b3a4cdcc24b8a2', class: "timer" }, this.isOutdated && h("span", { key: 'da1c41fe27834b3fdfcc08f456ab0f53e13a9a12', class: "outdated-message" }, this.outdatedMessage), !this.isOutdated && this.expiresInMessage && h("span", { key: 'c6515a6aa7491e02267f82f55abac7388ed68d15' }, this.expiresInMessage, " ", this.remainingSeconds))));
2933
+ }
2934
+ static get watchers() { return {
2935
+ "url": ["generateQRCode"]
2936
+ }; }
2937
+ static get style() { return PnQrCodeGeneratorStyle0; }
2938
+ }, [0, "pn-qr-code-generator", {
2939
+ "url": [1],
2940
+ "countdownSeconds": [2, "countdown-seconds"],
2941
+ "outdatedMessage": [1, "outdated-message"],
2942
+ "expiresInMessage": [1, "expires-in-message"],
2943
+ "updateCodeEverySecond": [4, "update-code-every-second"],
2944
+ "ariaLabel": [1, "aria-label"],
2945
+ "remainingSeconds": [32],
2946
+ "isOutdated": [32],
2947
+ "isFullscreen": [32]
2948
+ }, undefined, {
2949
+ "url": ["generateQRCode"]
2950
+ }]);
2951
+ function defineCustomElement() {
2952
+ if (typeof customElements === "undefined") {
2953
+ return;
2954
+ }
2955
+ const components = ["pn-qr-code-generator"];
2956
+ components.forEach(tagName => { switch (tagName) {
2957
+ case "pn-qr-code-generator":
2958
+ if (!customElements.get(tagName)) {
2959
+ customElements.define(tagName, QrCodeGenerator);
2960
+ }
2961
+ break;
2962
+ } });
2963
+ }
2964
+
2965
+ export { QrCodeGenerator as Q, defineCustomElement as d };
2966
+
2967
+ //# sourceMappingURL=pn-qr-code-generator2.js.map