@oiz/stzh-components 3.1.0 → 3.2.0-beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (673) hide show
  1. package/dist/cjs/{app-globals-0699ef40.js → app-globals-efe6d21d.js} +2 -2
  2. package/dist/cjs/{app-globals-0699ef40.js.map → app-globals-efe6d21d.js.map} +1 -1
  3. package/dist/cjs/index-92254d32.js +28 -16
  4. package/dist/cjs/index.cjs.js.map +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/stzh-accordion_3.cjs.entry.js +24 -8
  7. package/dist/cjs/stzh-accordion_3.cjs.entry.js.map +1 -1
  8. package/dist/cjs/stzh-actions.cjs.entry.js +1 -1
  9. package/dist/cjs/stzh-anchornav.cjs.entry.js +4 -3
  10. package/dist/cjs/stzh-anchornav.cjs.entry.js.map +1 -1
  11. package/dist/cjs/stzh-app-bar.cjs.entry.js +48 -0
  12. package/dist/cjs/stzh-app-bar.cjs.entry.js.map +1 -0
  13. package/dist/cjs/stzh-appointments.cjs.entry.js +1 -1
  14. package/dist/cjs/stzh-audio.cjs.entry.js +1 -1
  15. package/dist/cjs/stzh-badge_3.cjs.entry.js +1 -1
  16. package/dist/cjs/stzh-card-navigation.cjs.entry.js +1 -1
  17. package/dist/cjs/stzh-card-searchresult.cjs.entry.js +1 -1
  18. package/dist/cjs/stzh-card-superteaser.cjs.entry.js +1 -1
  19. package/dist/cjs/stzh-card_2.cjs.entry.js +8 -2
  20. package/dist/cjs/stzh-card_2.cjs.entry.js.map +1 -1
  21. package/dist/cjs/stzh-carousel.cjs.entry.js +1 -1
  22. package/dist/cjs/stzh-checkbox.cjs.entry.js +1 -1
  23. package/dist/cjs/stzh-checkboxgroup.cjs.entry.js +1 -1
  24. package/dist/cjs/stzh-chip.cjs.entry.js +22 -32
  25. package/dist/cjs/stzh-chip.cjs.entry.js.map +1 -1
  26. package/dist/cjs/stzh-components.cjs.js +2 -2
  27. package/dist/cjs/stzh-contact-cv.cjs.entry.js +63 -0
  28. package/dist/cjs/stzh-contact-cv.cjs.entry.js.map +1 -0
  29. package/dist/cjs/stzh-contact.cjs.entry.js +5 -3
  30. package/dist/cjs/stzh-contact.cjs.entry.js.map +1 -1
  31. package/dist/cjs/stzh-container.cjs.entry.js +1 -1
  32. package/dist/cjs/stzh-container.cjs.entry.js.map +1 -1
  33. package/dist/cjs/stzh-cspace.cjs.entry.js +2 -2
  34. package/dist/cjs/stzh-cspace.cjs.entry.js.map +1 -1
  35. package/dist/cjs/stzh-cta.cjs.entry.js +1 -1
  36. package/dist/cjs/stzh-datatable.cjs.entry.js +1 -1
  37. package/dist/cjs/stzh-datepicker_3.cjs.entry.js +1 -1
  38. package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
  39. package/dist/cjs/stzh-daterange.cjs.entry.js +1 -1
  40. package/dist/cjs/stzh-details.cjs.entry.js +1 -1
  41. package/dist/cjs/stzh-dialog.cjs.entry.js +1 -1
  42. package/dist/cjs/stzh-dialog.cjs.entry.js.map +1 -1
  43. package/dist/cjs/stzh-disturber.cjs.entry.js +1 -1
  44. package/dist/cjs/stzh-dropdown.cjs.entry.js +1 -1
  45. package/dist/cjs/stzh-eventinfo.cjs.entry.js +1 -1
  46. package/dist/cjs/stzh-figure.cjs.entry.js +1 -1
  47. package/dist/cjs/stzh-footer.cjs.entry.js +2 -2
  48. package/dist/cjs/stzh-footer.cjs.entry.js.map +1 -1
  49. package/dist/cjs/stzh-ghettobox_3.cjs.entry.js +27 -19
  50. package/dist/cjs/stzh-ghettobox_3.cjs.entry.js.map +1 -1
  51. package/dist/cjs/stzh-header.cjs.entry.js +2 -2
  52. package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
  53. package/dist/cjs/stzh-homepage-service-highlights.cjs.entry.js +1 -1
  54. package/dist/cjs/stzh-homepage-service-highlights.cjs.entry.js.map +1 -1
  55. package/dist/cjs/stzh-iframe.cjs.entry.js +2881 -24
  56. package/dist/cjs/stzh-iframe.cjs.entry.js.map +1 -1
  57. package/dist/cjs/stzh-input.cjs.entry.js +8 -4
  58. package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
  59. package/dist/cjs/stzh-link.cjs.entry.js +1 -1
  60. package/dist/cjs/{stzh-list.cjs.entry.js → stzh-list_2.cjs.entry.js} +20 -1
  61. package/dist/cjs/stzh-list_2.cjs.entry.js.map +1 -0
  62. package/dist/cjs/stzh-menu_2.cjs.entry.js +1 -1
  63. package/dist/cjs/stzh-pagecontent.cjs.entry.js +1 -1
  64. package/dist/cjs/stzh-pagetitle-hero.cjs.entry.js +1 -1
  65. package/dist/cjs/stzh-pagetitle-home.cjs.entry.js +2 -2
  66. package/dist/cjs/stzh-pagetitle-home.cjs.entry.js.map +1 -1
  67. package/dist/cjs/stzh-pagetitle.cjs.entry.js +2 -2
  68. package/dist/cjs/stzh-pagetitle.cjs.entry.js.map +1 -1
  69. package/dist/cjs/stzh-panorama.cjs.entry.js +1 -1
  70. package/dist/cjs/stzh-panorama.cjs.entry.js.map +1 -1
  71. package/dist/cjs/stzh-pi-content-navigation.cjs.entry.js +1 -1
  72. package/dist/cjs/stzh-pi-pagetitle.cjs.entry.js +1 -1
  73. package/dist/cjs/stzh-pi-teaser.cjs.entry.js +1 -1
  74. package/dist/cjs/stzh-popover_2.cjs.entry.js +90 -67
  75. package/dist/cjs/stzh-popover_2.cjs.entry.js.map +1 -1
  76. package/dist/cjs/stzh-print_2.cjs.entry.js +1 -1
  77. package/dist/cjs/stzh-ratio.cjs.entry.js +1 -1
  78. package/dist/cjs/stzh-ratio.cjs.entry.js.map +1 -1
  79. package/dist/cjs/stzh-readspeaker.cjs.entry.js +1 -1
  80. package/dist/cjs/stzh-scrollup.cjs.entry.js +6 -6
  81. package/dist/cjs/stzh-scrollup.cjs.entry.js.map +1 -1
  82. package/dist/cjs/stzh-search.cjs.entry.js +1 -1
  83. package/dist/cjs/stzh-section.cjs.entry.js +1 -1
  84. package/dist/cjs/stzh-section.cjs.entry.js.map +1 -1
  85. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
  86. package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
  87. package/dist/cjs/stzh-sticky-actions.cjs.entry.js +9 -8
  88. package/dist/cjs/stzh-sticky-actions.cjs.entry.js.map +1 -1
  89. package/dist/cjs/stzh-sticky.cjs.entry.js +1 -1
  90. package/dist/cjs/stzh-table.cjs.entry.js +1 -1
  91. package/dist/cjs/stzh-textandimage.cjs.entry.js +1 -1
  92. package/dist/cjs/stzh-timeline-item.cjs.entry.js +1 -1
  93. package/dist/cjs/stzh-toast.cjs.entry.js +1 -1
  94. package/dist/cjs/stzh-toggle.cjs.entry.js +1 -1
  95. package/dist/cjs/stzh-tooltip.cjs.entry.js +2 -2
  96. package/dist/cjs/stzh-tooltip.cjs.entry.js.map +1 -1
  97. package/dist/cjs/stzh-twocolumns.cjs.entry.js +1 -1
  98. package/dist/cjs/stzh-upload.cjs.entry.js +3101 -7
  99. package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
  100. package/dist/cjs/stzh-vbz-carousel.cjs.entry.js +1 -1
  101. package/dist/cjs/stzh-vbz-carousel.cjs.entry.js.map +1 -1
  102. package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js +25 -0
  103. package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js.map +1 -0
  104. package/dist/cjs/stzh-vbz-intro.cjs.entry.js +58 -0
  105. package/dist/cjs/stzh-vbz-intro.cjs.entry.js.map +1 -0
  106. package/dist/cjs/stzh-vbz-linechip.cjs.entry.js +1 -1
  107. package/dist/cjs/stzh-vbz-linechip.cjs.entry.js.map +1 -1
  108. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +33 -44
  109. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js.map +1 -1
  110. package/dist/cjs/{utils-d0fff87f.js → utils-d091c010.js} +40 -9
  111. package/dist/cjs/utils-d091c010.js.map +1 -0
  112. package/dist/collection/assets/i18n/de.json +22 -7
  113. package/dist/collection/assets/i18n/en.json +22 -7
  114. package/dist/collection/assets/media/icons/mono/construction.svg +1 -1
  115. package/dist/collection/assets/media/icons/mono/crop.svg +1 -0
  116. package/dist/collection/assets/meta/icons-preview.html +6 -1
  117. package/dist/collection/assets/mock/appl/mobiscan/publicEndpoint/image/retreive-pdf +5 -0
  118. package/dist/collection/assets/mock/appl/mobiscan/publicEndpoint/ping +3 -0
  119. package/dist/collection/assets/mock/appl/mobiscan/publicEndpoint/url +3 -0
  120. package/dist/collection/assets/mock/appl/mobiscan/rs/auth +4 -0
  121. package/dist/collection/assets/mock/appl/mobiscan/rs/config +5 -0
  122. package/dist/collection/assets/vendors/iframe-resizer/iframeResizer.contentWindow.js +1311 -0
  123. package/dist/collection/collection-manifest.json +4 -0
  124. package/dist/collection/components/stzh-accordion/stzh-accordion.css +39 -0
  125. package/dist/collection/components/stzh-accordion/stzh-accordion.js +20 -0
  126. package/dist/collection/components/stzh-accordion/stzh-accordion.js.map +1 -1
  127. package/dist/collection/components/stzh-accordion-item/stzh-accordion-item.css +5 -0
  128. package/dist/collection/components/stzh-anchornav/stzh-anchornav.js +5 -4
  129. package/dist/collection/components/stzh-anchornav/stzh-anchornav.js.map +1 -1
  130. package/dist/collection/components/stzh-app-bar/stzh-app-bar.css +253 -0
  131. package/dist/collection/components/stzh-app-bar/stzh-app-bar.e2e.js +16 -0
  132. package/dist/collection/components/stzh-app-bar/stzh-app-bar.e2e.js.map +1 -0
  133. package/dist/collection/components/stzh-app-bar/stzh-app-bar.js +54 -0
  134. package/dist/collection/components/stzh-app-bar/stzh-app-bar.js.map +1 -0
  135. package/dist/collection/components/stzh-app-bar/stzh-app-bar.stories.js +45 -0
  136. package/dist/collection/components/stzh-cardlist/stzh-cardlist.css +5 -0
  137. package/dist/collection/components/stzh-cardlist/stzh-cardlist.js +9 -2
  138. package/dist/collection/components/stzh-cardlist/stzh-cardlist.js.map +1 -1
  139. package/dist/collection/components/stzh-chip/stzh-chip.js +23 -33
  140. package/dist/collection/components/stzh-chip/stzh-chip.js.map +1 -1
  141. package/dist/collection/components/stzh-contact/stzh-contact.css +47 -15
  142. package/dist/collection/components/stzh-contact/stzh-contact.js +21 -1
  143. package/dist/collection/components/stzh-contact/stzh-contact.js.map +1 -1
  144. package/dist/collection/components/stzh-contact/stzh-contact.stories.js +68 -49
  145. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.css +196 -0
  146. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.e2e.js +16 -0
  147. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.e2e.js.map +1 -0
  148. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.js +163 -0
  149. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.js.map +1 -0
  150. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.localization.js +2 -0
  151. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.localization.js.map +1 -0
  152. package/dist/collection/components/stzh-contact-cv/stzh-contact-cv.stories.js +52 -0
  153. package/dist/collection/components/stzh-container/stzh-container.css +2 -1
  154. package/dist/collection/components/stzh-cspace/stzh-cspace.css +53 -0
  155. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js +1 -1
  156. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js.map +1 -1
  157. package/dist/collection/components/stzh-footer/stzh-footer.css +10 -2
  158. package/dist/collection/components/stzh-header/stzh-header.css +19 -3
  159. package/dist/collection/components/stzh-homepage-service-highlights/stzh-homepage-service-highlights.css +14 -3
  160. package/dist/collection/components/stzh-homepage-service-highlights/stzh-homepage-service-highlights.stories.js +1 -1
  161. package/dist/collection/components/stzh-iframe/stzh-iframe.css +8 -1
  162. package/dist/collection/components/stzh-iframe/stzh-iframe.js +139 -26
  163. package/dist/collection/components/stzh-iframe/stzh-iframe.js.map +1 -1
  164. package/dist/collection/components/stzh-iframe/stzh-iframe.stories.js +30 -11
  165. package/dist/collection/components/stzh-input/stzh-input.css +1 -1
  166. package/dist/collection/components/stzh-input/stzh-input.js +8 -3
  167. package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
  168. package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.css +2 -1
  169. package/dist/collection/components/stzh-pagetitle-home/stzh-pagetitle-home.css +19 -0
  170. package/dist/collection/components/stzh-pagination/stzh-pagination.css +11 -1
  171. package/dist/collection/components/stzh-pagination/stzh-pagination.js +43 -6
  172. package/dist/collection/components/stzh-pagination/stzh-pagination.js.map +1 -1
  173. package/dist/collection/components/stzh-panorama/stzh-panorama.js +1 -1
  174. package/dist/collection/components/stzh-panorama/stzh-panorama.js.map +1 -1
  175. package/dist/collection/components/stzh-popover/stzh-popover.js +101 -75
  176. package/dist/collection/components/stzh-popover/stzh-popover.js.map +1 -1
  177. package/dist/collection/components/stzh-ratio/stzh-ratio.css +6 -0
  178. package/dist/collection/components/stzh-richtext/stzh-richtext.js +28 -20
  179. package/dist/collection/components/stzh-richtext/stzh-richtext.js.map +1 -1
  180. package/dist/collection/components/stzh-richtext/stzh-richtext.stories.js +15 -6
  181. package/dist/collection/components/stzh-scrollup/stzh-scrollup.js +6 -6
  182. package/dist/collection/components/stzh-scrollup/stzh-scrollup.js.map +1 -1
  183. package/dist/collection/components/stzh-section/stzh-section.css +134 -1
  184. package/dist/collection/components/stzh-section/stzh-section.js +2 -2
  185. package/dist/collection/components/stzh-section/stzh-section.js.map +1 -1
  186. package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +206 -22
  187. package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.css +4 -0
  188. package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js +11 -9
  189. package/dist/collection/components/stzh-sticky-actions/stzh-sticky-actions.js.map +1 -1
  190. package/dist/collection/components/stzh-tooltip/stzh-tooltip.css +8 -4
  191. package/dist/collection/components/stzh-upload/models/stzh-photographing-configuration.dto.js +2 -0
  192. package/dist/collection/components/stzh-upload/models/stzh-photographing-configuration.dto.js.map +1 -0
  193. package/dist/collection/components/stzh-upload/models/stzh-photographing-pdf-file.dto.js +3 -0
  194. package/dist/collection/components/stzh-upload/models/stzh-photographing-pdf-file.dto.js.map +1 -0
  195. package/dist/collection/components/stzh-upload/models/stzh-photographing-url-details.dto.js +2 -0
  196. package/dist/collection/components/stzh-upload/models/stzh-photographing-url-details.dto.js.map +1 -0
  197. package/dist/collection/components/stzh-upload/stzh-upload.css +84 -11
  198. package/dist/collection/components/stzh-upload/stzh-upload.js +274 -4
  199. package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
  200. package/dist/collection/components/stzh-upload/stzh-upload.localization.js.map +1 -1
  201. package/dist/collection/components/stzh-upload/stzh-upload.stories.js +13 -7
  202. package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.css +6 -4
  203. package/dist/collection/components/stzh-vbz-carousel/stzh-vbz-carousel.stories.js +2 -5
  204. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.css +192 -0
  205. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.e2e.js +18 -0
  206. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.e2e.js.map +1 -0
  207. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js +26 -0
  208. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js.map +1 -0
  209. package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.stories.js +39 -0
  210. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.css +341 -0
  211. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.e2e.js +16 -0
  212. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.e2e.js.map +1 -0
  213. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.js +110 -0
  214. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.js.map +1 -0
  215. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.localization.js +2 -0
  216. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.localization.js.map +1 -0
  217. package/dist/collection/components/stzh-vbz-intro/stzh-vbz-intro.stories.js +75 -0
  218. package/dist/collection/components/stzh-vbz-linechip/stzh-vbz-linechip.css +3 -3
  219. package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.stories.js +8 -10
  220. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.css +17 -21
  221. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js +34 -45
  222. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js.map +1 -1
  223. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.localization.js.map +1 -1
  224. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.stories.js +10 -12
  225. package/dist/collection/index.js.map +1 -1
  226. package/dist/collection/pages/mkz/mkz.e2e.js +16 -0
  227. package/dist/collection/pages/mkz/mkz.e2e.js.map +1 -0
  228. package/dist/collection/pages/upload-photographing/upload-photographing.e2e.js +16 -0
  229. package/dist/collection/pages/upload-photographing/upload-photographing.e2e.js.map +1 -0
  230. package/dist/collection/patterns/contact-accordion/contact-accordion.e2e.js +21 -0
  231. package/dist/collection/patterns/contact-accordion/contact-accordion.e2e.js.map +1 -0
  232. package/dist/collection/patterns/poi/poi.e2e.js +21 -0
  233. package/dist/collection/patterns/poi/poi.e2e.js.map +1 -0
  234. package/dist/collection/utils/utils.js +38 -8
  235. package/dist/collection/utils/utils.js.map +1 -1
  236. package/dist/components/index.js +1 -1
  237. package/dist/components/index2.js.map +1 -1
  238. package/dist/components/stzh-accordion-item2.js +1 -1
  239. package/dist/components/stzh-accordion-item2.js.map +1 -1
  240. package/dist/components/stzh-accordion2.js +17 -1
  241. package/dist/components/stzh-accordion2.js.map +1 -1
  242. package/dist/components/stzh-anchornav.js +4 -3
  243. package/dist/components/stzh-anchornav.js.map +1 -1
  244. package/dist/components/stzh-app-bar.d.ts +11 -0
  245. package/dist/components/stzh-app-bar.js +60 -0
  246. package/dist/components/stzh-app-bar.js.map +1 -0
  247. package/dist/components/stzh-cardlist2.js +9 -2
  248. package/dist/components/stzh-cardlist2.js.map +1 -1
  249. package/dist/components/stzh-chip2.js +22 -32
  250. package/dist/components/stzh-chip2.js.map +1 -1
  251. package/dist/components/stzh-contact-cv.d.ts +11 -0
  252. package/dist/components/stzh-contact-cv.js +102 -0
  253. package/dist/components/stzh-contact-cv.js.map +1 -0
  254. package/dist/components/stzh-contact.js +5 -2
  255. package/dist/components/stzh-contact.js.map +1 -1
  256. package/dist/components/stzh-container.js +1 -1
  257. package/dist/components/stzh-container.js.map +1 -1
  258. package/dist/components/stzh-cspace.js +1 -1
  259. package/dist/components/stzh-cspace.js.map +1 -1
  260. package/dist/components/stzh-datepicker2.js.map +1 -1
  261. package/dist/components/stzh-dialog.js +1 -226
  262. package/dist/components/stzh-dialog.js.map +1 -1
  263. package/dist/components/stzh-dialog2.js +230 -0
  264. package/dist/components/stzh-dialog2.js.map +1 -0
  265. package/dist/components/stzh-footer.js +1 -1
  266. package/dist/components/stzh-footer.js.map +1 -1
  267. package/dist/components/stzh-header.js +1 -1
  268. package/dist/components/stzh-header.js.map +1 -1
  269. package/dist/components/stzh-homepage-service-highlights.js +1 -1
  270. package/dist/components/stzh-homepage-service-highlights.js.map +1 -1
  271. package/dist/components/stzh-iframe2.js +2883 -23
  272. package/dist/components/stzh-iframe2.js.map +1 -1
  273. package/dist/components/stzh-input2.js +9 -4
  274. package/dist/components/stzh-input2.js.map +1 -1
  275. package/dist/components/stzh-list-item.js +1 -34
  276. package/dist/components/stzh-list-item.js.map +1 -1
  277. package/dist/{esm/stzh-list-item.entry.js → components/stzh-list-item2.js} +24 -9
  278. package/dist/components/stzh-list-item2.js.map +1 -0
  279. package/dist/components/stzh-list.js +1 -36
  280. package/dist/components/stzh-list.js.map +1 -1
  281. package/dist/{esm/stzh-list.entry.js → components/stzh-list2.js} +26 -9
  282. package/dist/components/stzh-list2.js.map +1 -0
  283. package/dist/components/stzh-pagetitle-home.js +1 -1
  284. package/dist/components/stzh-pagetitle-home.js.map +1 -1
  285. package/dist/components/stzh-pagetitle.js +1 -1
  286. package/dist/components/stzh-pagetitle.js.map +1 -1
  287. package/dist/components/stzh-pagination2.js +9 -6
  288. package/dist/components/stzh-pagination2.js.map +1 -1
  289. package/dist/components/stzh-panorama.js +1 -1
  290. package/dist/components/stzh-panorama.js.map +1 -1
  291. package/dist/components/stzh-popover2.js +93 -67
  292. package/dist/components/stzh-popover2.js.map +1 -1
  293. package/dist/components/stzh-ratio2.js +1 -1
  294. package/dist/components/stzh-ratio2.js.map +1 -1
  295. package/dist/components/stzh-richtext2.js +26 -18
  296. package/dist/components/stzh-richtext2.js.map +1 -1
  297. package/dist/components/stzh-scrollup.js +5 -5
  298. package/dist/components/stzh-scrollup.js.map +1 -1
  299. package/dist/components/stzh-section.js +1 -1
  300. package/dist/components/stzh-section.js.map +1 -1
  301. package/dist/components/stzh-share2.js +1 -1
  302. package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
  303. package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
  304. package/dist/components/stzh-sticky-actions.js +10 -8
  305. package/dist/components/stzh-sticky-actions.js.map +1 -1
  306. package/dist/components/stzh-tooltip2.js +1 -1
  307. package/dist/components/stzh-tooltip2.js.map +1 -1
  308. package/dist/components/stzh-upload.js +3127 -6
  309. package/dist/components/stzh-upload.js.map +1 -1
  310. package/dist/components/stzh-vbz-carousel.js +1 -1
  311. package/dist/components/stzh-vbz-carousel.js.map +1 -1
  312. package/dist/components/stzh-vbz-connection-finder.d.ts +11 -0
  313. package/dist/components/stzh-vbz-connection-finder.js +38 -0
  314. package/dist/components/stzh-vbz-connection-finder.js.map +1 -0
  315. package/dist/components/stzh-vbz-intro.d.ts +11 -0
  316. package/dist/components/stzh-vbz-intro.js +100 -0
  317. package/dist/components/stzh-vbz-intro.js.map +1 -0
  318. package/dist/components/stzh-vbz-linechip2.js +1 -1
  319. package/dist/components/stzh-vbz-linechip2.js.map +1 -1
  320. package/dist/components/stzh-vbz-majorticker.js +1 -1
  321. package/dist/components/stzh-vbz-ticker.js +33 -44
  322. package/dist/components/stzh-vbz-ticker.js.map +1 -1
  323. package/dist/components/utils.js +39 -9
  324. package/dist/components/utils.js.map +1 -1
  325. package/dist/esm/{app-globals-ab5b077d.js → app-globals-93678901.js} +2 -2
  326. package/dist/esm/{app-globals-ab5b077d.js.map → app-globals-93678901.js.map} +1 -1
  327. package/dist/esm/index-e3050b18.js +28 -16
  328. package/dist/esm/index.js.map +1 -1
  329. package/dist/esm/loader.js +2 -2
  330. package/dist/esm/stzh-accordion_3.entry.js +25 -9
  331. package/dist/esm/stzh-accordion_3.entry.js.map +1 -1
  332. package/dist/esm/stzh-actions.entry.js +1 -1
  333. package/dist/esm/stzh-anchornav.entry.js +4 -3
  334. package/dist/esm/stzh-anchornav.entry.js.map +1 -1
  335. package/dist/esm/stzh-app-bar.entry.js +44 -0
  336. package/dist/esm/stzh-app-bar.entry.js.map +1 -0
  337. package/dist/esm/stzh-appointments.entry.js +1 -1
  338. package/dist/esm/stzh-audio.entry.js +1 -1
  339. package/dist/esm/stzh-badge_3.entry.js +1 -1
  340. package/dist/esm/stzh-card-navigation.entry.js +1 -1
  341. package/dist/esm/stzh-card-searchresult.entry.js +1 -1
  342. package/dist/esm/stzh-card-superteaser.entry.js +1 -1
  343. package/dist/esm/stzh-card_2.entry.js +8 -2
  344. package/dist/esm/stzh-card_2.entry.js.map +1 -1
  345. package/dist/esm/stzh-carousel.entry.js +1 -1
  346. package/dist/esm/stzh-checkbox.entry.js +1 -1
  347. package/dist/esm/stzh-checkboxgroup.entry.js +1 -1
  348. package/dist/esm/stzh-chip.entry.js +22 -32
  349. package/dist/esm/stzh-chip.entry.js.map +1 -1
  350. package/dist/esm/stzh-components.js +2 -2
  351. package/dist/esm/stzh-contact-cv.entry.js +59 -0
  352. package/dist/esm/stzh-contact-cv.entry.js.map +1 -0
  353. package/dist/esm/stzh-contact.entry.js +5 -3
  354. package/dist/esm/stzh-contact.entry.js.map +1 -1
  355. package/dist/esm/stzh-container.entry.js +1 -1
  356. package/dist/esm/stzh-container.entry.js.map +1 -1
  357. package/dist/esm/stzh-cspace.entry.js +2 -2
  358. package/dist/esm/stzh-cspace.entry.js.map +1 -1
  359. package/dist/esm/stzh-cta.entry.js +1 -1
  360. package/dist/esm/stzh-datatable.entry.js +1 -1
  361. package/dist/esm/stzh-datepicker_3.entry.js +1 -1
  362. package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
  363. package/dist/esm/stzh-daterange.entry.js +1 -1
  364. package/dist/esm/stzh-details.entry.js +1 -1
  365. package/dist/esm/stzh-dialog.entry.js +1 -1
  366. package/dist/esm/stzh-dialog.entry.js.map +1 -1
  367. package/dist/esm/stzh-disturber.entry.js +1 -1
  368. package/dist/esm/stzh-dropdown.entry.js +1 -1
  369. package/dist/esm/stzh-eventinfo.entry.js +1 -1
  370. package/dist/esm/stzh-figure.entry.js +1 -1
  371. package/dist/esm/stzh-footer.entry.js +2 -2
  372. package/dist/esm/stzh-footer.entry.js.map +1 -1
  373. package/dist/esm/stzh-ghettobox_3.entry.js +27 -19
  374. package/dist/esm/stzh-ghettobox_3.entry.js.map +1 -1
  375. package/dist/esm/stzh-header.entry.js +2 -2
  376. package/dist/esm/stzh-header.entry.js.map +1 -1
  377. package/dist/esm/stzh-homepage-service-highlights.entry.js +1 -1
  378. package/dist/esm/stzh-homepage-service-highlights.entry.js.map +1 -1
  379. package/dist/esm/stzh-iframe.entry.js +2881 -24
  380. package/dist/esm/stzh-iframe.entry.js.map +1 -1
  381. package/dist/esm/stzh-input.entry.js +8 -4
  382. package/dist/esm/stzh-input.entry.js.map +1 -1
  383. package/dist/esm/stzh-link.entry.js +1 -1
  384. package/dist/esm/stzh-list_2.entry.js +41 -0
  385. package/dist/esm/stzh-list_2.entry.js.map +1 -0
  386. package/dist/esm/stzh-menu_2.entry.js +1 -1
  387. package/dist/esm/stzh-pagecontent.entry.js +1 -1
  388. package/dist/esm/stzh-pagetitle-hero.entry.js +1 -1
  389. package/dist/esm/stzh-pagetitle-home.entry.js +2 -2
  390. package/dist/esm/stzh-pagetitle-home.entry.js.map +1 -1
  391. package/dist/esm/stzh-pagetitle.entry.js +2 -2
  392. package/dist/esm/stzh-pagetitle.entry.js.map +1 -1
  393. package/dist/esm/stzh-panorama.entry.js +1 -1
  394. package/dist/esm/stzh-panorama.entry.js.map +1 -1
  395. package/dist/esm/stzh-pi-content-navigation.entry.js +1 -1
  396. package/dist/esm/stzh-pi-pagetitle.entry.js +1 -1
  397. package/dist/esm/stzh-pi-teaser.entry.js +1 -1
  398. package/dist/esm/stzh-popover_2.entry.js +91 -68
  399. package/dist/esm/stzh-popover_2.entry.js.map +1 -1
  400. package/dist/esm/stzh-print_2.entry.js +1 -1
  401. package/dist/esm/stzh-ratio.entry.js +1 -1
  402. package/dist/esm/stzh-ratio.entry.js.map +1 -1
  403. package/dist/esm/stzh-readspeaker.entry.js +1 -1
  404. package/dist/esm/stzh-scrollup.entry.js +6 -6
  405. package/dist/esm/stzh-scrollup.entry.js.map +1 -1
  406. package/dist/esm/stzh-search.entry.js +1 -1
  407. package/dist/esm/stzh-section.entry.js +1 -1
  408. package/dist/esm/stzh-section.entry.js.map +1 -1
  409. package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
  410. package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
  411. package/dist/esm/stzh-sticky-actions.entry.js +9 -8
  412. package/dist/esm/stzh-sticky-actions.entry.js.map +1 -1
  413. package/dist/esm/stzh-sticky.entry.js +1 -1
  414. package/dist/esm/stzh-table.entry.js +1 -1
  415. package/dist/esm/stzh-textandimage.entry.js +1 -1
  416. package/dist/esm/stzh-timeline-item.entry.js +1 -1
  417. package/dist/esm/stzh-toast.entry.js +1 -1
  418. package/dist/esm/stzh-toggle.entry.js +1 -1
  419. package/dist/esm/stzh-tooltip.entry.js +2 -2
  420. package/dist/esm/stzh-tooltip.entry.js.map +1 -1
  421. package/dist/esm/stzh-twocolumns.entry.js +1 -1
  422. package/dist/esm/stzh-upload.entry.js +3098 -4
  423. package/dist/esm/stzh-upload.entry.js.map +1 -1
  424. package/dist/esm/stzh-vbz-carousel.entry.js +1 -1
  425. package/dist/esm/stzh-vbz-carousel.entry.js.map +1 -1
  426. package/dist/esm/stzh-vbz-connection-finder.entry.js +21 -0
  427. package/dist/esm/stzh-vbz-connection-finder.entry.js.map +1 -0
  428. package/dist/esm/stzh-vbz-intro.entry.js +54 -0
  429. package/dist/esm/stzh-vbz-intro.entry.js.map +1 -0
  430. package/dist/esm/stzh-vbz-linechip.entry.js +1 -1
  431. package/dist/esm/stzh-vbz-linechip.entry.js.map +1 -1
  432. package/dist/esm/stzh-vbz-ticker.entry.js +33 -44
  433. package/dist/esm/stzh-vbz-ticker.entry.js.map +1 -1
  434. package/dist/esm/{utils-54aead01.js → utils-90658cfe.js} +40 -10
  435. package/dist/esm/utils-90658cfe.js.map +1 -0
  436. package/dist/stzh-components/assets/i18n/de.json +22 -7
  437. package/dist/stzh-components/assets/i18n/en.json +22 -7
  438. package/dist/stzh-components/assets/media/icons/mono/construction.svg +1 -1
  439. package/dist/stzh-components/assets/media/icons/mono/crop.svg +1 -0
  440. package/dist/stzh-components/assets/meta/icons-preview.html +6 -1
  441. package/dist/stzh-components/assets/mock/appl/mobiscan/publicEndpoint/image/retreive-pdf +5 -0
  442. package/dist/stzh-components/assets/mock/appl/mobiscan/publicEndpoint/ping +3 -0
  443. package/dist/stzh-components/assets/mock/appl/mobiscan/publicEndpoint/url +3 -0
  444. package/dist/stzh-components/assets/mock/appl/mobiscan/rs/auth +4 -0
  445. package/dist/stzh-components/assets/mock/appl/mobiscan/rs/config +5 -0
  446. package/dist/stzh-components/assets/vendors/iframe-resizer/iframeResizer.contentWindow.js +1311 -0
  447. package/dist/stzh-components/index.esm.js.map +1 -1
  448. package/dist/stzh-components/p-05127d71.entry.js +2 -0
  449. package/dist/stzh-components/p-05127d71.entry.js.map +1 -0
  450. package/dist/stzh-components/{p-9684b22d.entry.js → p-09480ffe.entry.js} +2 -2
  451. package/dist/stzh-components/{p-c877d32c.entry.js → p-0b0c7cb8.entry.js} +2 -2
  452. package/dist/stzh-components/p-0b0c7cb8.entry.js.map +1 -0
  453. package/dist/stzh-components/{p-161ae3d1.entry.js → p-0b15d79b.entry.js} +2 -2
  454. package/dist/stzh-components/p-109a885b.entry.js +2 -0
  455. package/dist/stzh-components/{p-2d7966cf.entry.js.map → p-109a885b.entry.js.map} +1 -1
  456. package/dist/stzh-components/{p-c1cd45e1.entry.js → p-12bffe97.entry.js} +2 -2
  457. package/dist/stzh-components/p-13cd7748.entry.js +2 -0
  458. package/dist/stzh-components/p-13cd7748.entry.js.map +1 -0
  459. package/dist/stzh-components/{p-27d5ad01.entry.js → p-16a2675e.entry.js} +2 -2
  460. package/dist/stzh-components/{p-75b79adf.entry.js → p-1cbf5c84.entry.js} +2 -2
  461. package/dist/stzh-components/p-1cbf5c84.entry.js.map +1 -0
  462. package/dist/stzh-components/{p-20db8d01.entry.js → p-1fd858a2.entry.js} +2 -2
  463. package/dist/stzh-components/p-1fd858a2.entry.js.map +1 -0
  464. package/dist/stzh-components/p-21c351b4.entry.js +2 -0
  465. package/dist/stzh-components/p-21c351b4.entry.js.map +1 -0
  466. package/dist/stzh-components/{p-59a1a257.entry.js → p-21f7064d.entry.js} +2 -2
  467. package/dist/stzh-components/p-21f7064d.entry.js.map +1 -0
  468. package/dist/stzh-components/p-23de5712.entry.js +2 -0
  469. package/dist/stzh-components/p-23de5712.entry.js.map +1 -0
  470. package/dist/stzh-components/{p-0fb40e48.entry.js → p-24ea178a.entry.js} +2 -2
  471. package/dist/stzh-components/{p-3f0d3919.entry.js → p-2812752a.entry.js} +2 -2
  472. package/dist/stzh-components/{p-68d33cd3.entry.js → p-29c1cb5c.entry.js} +2 -2
  473. package/dist/stzh-components/p-2d405b51.js +2 -0
  474. package/dist/stzh-components/{p-cc1f8acc.js.map → p-2d405b51.js.map} +1 -1
  475. package/dist/stzh-components/{p-801af922.entry.js → p-30a522e0.entry.js} +2 -2
  476. package/dist/stzh-components/{p-d10a6897.entry.js → p-30a7c058.entry.js} +2 -2
  477. package/dist/stzh-components/{p-7ca981d1.entry.js → p-3261eab4.entry.js} +2 -2
  478. package/dist/stzh-components/{p-5d4a2df0.entry.js → p-32cb5b94.entry.js} +2 -2
  479. package/dist/stzh-components/{p-97df1d9f.entry.js → p-346d2f3d.entry.js} +2 -2
  480. package/dist/stzh-components/p-346f8661.entry.js +2 -0
  481. package/dist/stzh-components/p-346f8661.entry.js.map +1 -0
  482. package/dist/stzh-components/{p-8f1dbd3b.entry.js → p-3912a256.entry.js} +2 -2
  483. package/dist/stzh-components/{p-6fdc4c74.entry.js → p-39acdb68.entry.js} +2 -2
  484. package/dist/stzh-components/p-3cc6f193.entry.js +2 -0
  485. package/dist/stzh-components/p-3cc6f193.entry.js.map +1 -0
  486. package/dist/stzh-components/{p-204a6e41.entry.js → p-466263ff.entry.js} +2 -2
  487. package/dist/stzh-components/p-466263ff.entry.js.map +1 -0
  488. package/dist/stzh-components/p-49d356da.entry.js +2 -0
  489. package/dist/stzh-components/p-49d356da.entry.js.map +1 -0
  490. package/dist/stzh-components/p-585551c1.entry.js +2 -0
  491. package/dist/stzh-components/p-585551c1.entry.js.map +1 -0
  492. package/dist/stzh-components/{p-edf77853.entry.js → p-63c76fd5.entry.js} +2 -2
  493. package/dist/stzh-components/{p-533fea0b.entry.js → p-67e61035.entry.js} +2 -2
  494. package/dist/stzh-components/p-6e0c8764.entry.js +2 -0
  495. package/dist/stzh-components/p-6e0c8764.entry.js.map +1 -0
  496. package/dist/stzh-components/{p-80fafa1d.entry.js → p-6fffe2c8.entry.js} +2 -2
  497. package/dist/stzh-components/p-7b14ef7a.entry.js +2 -0
  498. package/dist/stzh-components/p-7b14ef7a.entry.js.map +1 -0
  499. package/dist/stzh-components/{p-eb79f3ed.entry.js → p-82c53e4f.entry.js} +2 -2
  500. package/dist/stzh-components/p-85143b35.entry.js +2 -0
  501. package/dist/stzh-components/p-85143b35.entry.js.map +1 -0
  502. package/dist/stzh-components/{p-8e0a2441.entry.js → p-87f3052b.entry.js} +2 -2
  503. package/dist/stzh-components/{p-b566a2c0.entry.js → p-8a82bf60.entry.js} +2 -2
  504. package/dist/stzh-components/{p-9b43127f.entry.js → p-8b04698a.entry.js} +2 -2
  505. package/dist/stzh-components/p-8b3828e7.entry.js +2 -0
  506. package/dist/stzh-components/p-8b3828e7.entry.js.map +1 -0
  507. package/dist/stzh-components/{p-4db427d5.entry.js → p-8c4d543d.entry.js} +2 -2
  508. package/dist/stzh-components/p-8c4d543d.entry.js.map +1 -0
  509. package/dist/stzh-components/p-90772ec6.entry.js +2 -0
  510. package/dist/stzh-components/p-90772ec6.entry.js.map +1 -0
  511. package/dist/stzh-components/p-9bc12eff.entry.js +2 -0
  512. package/dist/stzh-components/p-9bc12eff.entry.js.map +1 -0
  513. package/dist/stzh-components/{p-7754870d.entry.js → p-9c1b3929.entry.js} +2 -2
  514. package/dist/stzh-components/{p-5c3fddec.entry.js → p-9c643610.entry.js} +2 -2
  515. package/dist/stzh-components/{p-5c3fddec.entry.js.map → p-9c643610.entry.js.map} +1 -1
  516. package/dist/stzh-components/{p-4f49450d.entry.js → p-9e4f0532.entry.js} +2 -2
  517. package/dist/stzh-components/p-9e4f0532.entry.js.map +1 -0
  518. package/dist/stzh-components/{p-cff05968.entry.js → p-a249f3f6.entry.js} +2 -2
  519. package/dist/stzh-components/{p-a2e9723b.entry.js → p-aa3e4203.entry.js} +2 -2
  520. package/dist/stzh-components/{p-f5821678.entry.js → p-ab5ee55b.entry.js} +2 -2
  521. package/dist/stzh-components/{p-ce99f5e8.entry.js → p-acef653a.entry.js} +2 -2
  522. package/dist/stzh-components/{p-c5dbf7ad.entry.js → p-b03f41c3.entry.js} +2 -2
  523. package/dist/stzh-components/p-b273f95c.entry.js +2 -0
  524. package/dist/stzh-components/p-b273f95c.entry.js.map +1 -0
  525. package/dist/stzh-components/{p-72c375c7.entry.js → p-b397337c.entry.js} +2 -2
  526. package/dist/stzh-components/p-b397337c.entry.js.map +1 -0
  527. package/dist/stzh-components/{p-ef21f4dc.entry.js → p-ba716237.entry.js} +2 -2
  528. package/dist/stzh-components/p-ba716237.entry.js.map +1 -0
  529. package/dist/stzh-components/p-bcaef6d7.entry.js +2 -0
  530. package/dist/stzh-components/{p-012dc71e.entry.js.map → p-bcaef6d7.entry.js.map} +1 -1
  531. package/dist/stzh-components/p-bdff55a6.entry.js +2 -0
  532. package/dist/stzh-components/{p-78a16599.entry.js.map → p-bdff55a6.entry.js.map} +1 -1
  533. package/dist/stzh-components/{p-ee82f53c.entry.js → p-c169f243.entry.js} +2 -2
  534. package/dist/stzh-components/{p-7d030c40.entry.js → p-c3816fd3.entry.js} +2 -2
  535. package/dist/stzh-components/{p-7aac960b.entry.js → p-ce6dbd52.entry.js} +2 -2
  536. package/dist/stzh-components/{p-50c1632e.entry.js → p-d0ecdd5b.entry.js} +2 -2
  537. package/dist/stzh-components/{p-50c1632e.entry.js.map → p-d0ecdd5b.entry.js.map} +1 -1
  538. package/dist/stzh-components/{p-722b9e40.entry.js → p-d46bbc8c.entry.js} +2 -2
  539. package/dist/stzh-components/{p-c9eecee7.entry.js → p-d48ecb2f.entry.js} +2 -2
  540. package/dist/stzh-components/{p-ea152ff3.entry.js → p-d7697cf8.entry.js} +2 -2
  541. package/dist/stzh-components/p-d789647a.entry.js +2 -0
  542. package/dist/stzh-components/p-d789647a.entry.js.map +1 -0
  543. package/dist/stzh-components/{p-472b3327.entry.js → p-d7f1ed07.entry.js} +2 -2
  544. package/dist/stzh-components/{p-afde3fcd.entry.js → p-d8265b82.entry.js} +2 -2
  545. package/dist/stzh-components/{p-afde3fcd.entry.js.map → p-d8265b82.entry.js.map} +1 -1
  546. package/dist/stzh-components/{p-56346206.entry.js → p-d9fa718c.entry.js} +2 -2
  547. package/dist/stzh-components/p-e30a5acc.js +2 -0
  548. package/dist/stzh-components/p-e30a5acc.js.map +1 -0
  549. package/dist/stzh-components/{p-f4ed8d7e.entry.js → p-ef47c976.entry.js} +2 -2
  550. package/dist/stzh-components/p-ef47c976.entry.js.map +1 -0
  551. package/dist/stzh-components/{p-66007952.entry.js → p-f34720e2.entry.js} +2 -2
  552. package/dist/stzh-components/p-f34720e2.entry.js.map +1 -0
  553. package/dist/stzh-components/p-ffbb7594.entry.js +2 -0
  554. package/dist/stzh-components/p-ffbb7594.entry.js.map +1 -0
  555. package/dist/stzh-components/stzh-components.css +206 -22
  556. package/dist/stzh-components/stzh-components.esm.js +1 -1
  557. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  558. package/dist/types/components/stzh-accordion/stzh-accordion.d.ts +3 -0
  559. package/dist/types/components/stzh-app-bar/stzh-app-bar.d.ts +15 -0
  560. package/dist/types/components/stzh-cardlist/stzh-cardlist.d.ts +1 -0
  561. package/dist/types/components/stzh-chip/stzh-chip.d.ts +1 -1
  562. package/dist/types/components/stzh-contact/stzh-contact.d.ts +2 -0
  563. package/dist/types/components/stzh-contact-cv/stzh-contact-cv.d.ts +23 -0
  564. package/dist/types/components/stzh-contact-cv/stzh-contact-cv.localization.d.ts +8 -0
  565. package/dist/types/components/stzh-datepicker/stzh-datepicker.d.ts +1 -1
  566. package/dist/types/components/stzh-iframe/stzh-iframe.d.ts +9 -1
  567. package/dist/types/components/stzh-input/stzh-input.d.ts +3 -0
  568. package/dist/types/components/stzh-pagination/stzh-pagination.d.ts +4 -0
  569. package/dist/types/components/stzh-popover/stzh-popover.d.ts +12 -3
  570. package/dist/types/components/stzh-section/stzh-section.d.ts +1 -1
  571. package/dist/types/components/stzh-sticky-actions/stzh-sticky-actions.d.ts +1 -0
  572. package/dist/types/components/stzh-upload/models/stzh-photographing-configuration.dto.d.ts +5 -0
  573. package/dist/types/components/stzh-upload/models/stzh-photographing-pdf-file.dto.d.ts +5 -0
  574. package/dist/types/components/stzh-upload/models/stzh-photographing-url-details.dto.d.ts +4 -0
  575. package/dist/types/components/stzh-upload/stzh-upload.d.ts +36 -0
  576. package/dist/types/components/stzh-upload/stzh-upload.localization.d.ts +6 -0
  577. package/dist/types/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.d.ts +7 -0
  578. package/dist/types/components/stzh-vbz-intro/stzh-vbz-intro.d.ts +15 -0
  579. package/dist/types/components/stzh-vbz-intro/stzh-vbz-intro.localization.d.ts +4 -0
  580. package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.d.ts +2 -1
  581. package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.localization.d.ts +1 -2
  582. package/dist/types/components.d.ts +186 -10
  583. package/dist/types/index.d.ts +4 -0
  584. package/dist/types/utils/utils.d.ts +7 -0
  585. package/dist/vscode-data.json +120 -1
  586. package/package.json +3 -1
  587. package/dist/cjs/stzh-list-item.cjs.entry.js +0 -27
  588. package/dist/cjs/stzh-list-item.cjs.entry.js.map +0 -1
  589. package/dist/cjs/stzh-list.cjs.entry.js.map +0 -1
  590. package/dist/cjs/utils-d0fff87f.js.map +0 -1
  591. package/dist/esm/stzh-list-item.entry.js.map +0 -1
  592. package/dist/esm/stzh-list.entry.js.map +0 -1
  593. package/dist/esm/utils-54aead01.js.map +0 -1
  594. package/dist/stzh-components/p-012dc71e.entry.js +0 -2
  595. package/dist/stzh-components/p-100d4052.entry.js +0 -2
  596. package/dist/stzh-components/p-100d4052.entry.js.map +0 -1
  597. package/dist/stzh-components/p-1f0e8499.entry.js +0 -2
  598. package/dist/stzh-components/p-1f0e8499.entry.js.map +0 -1
  599. package/dist/stzh-components/p-204a6e41.entry.js.map +0 -1
  600. package/dist/stzh-components/p-20db8d01.entry.js.map +0 -1
  601. package/dist/stzh-components/p-2d7966cf.entry.js +0 -2
  602. package/dist/stzh-components/p-4db427d5.entry.js.map +0 -1
  603. package/dist/stzh-components/p-4f49450d.entry.js.map +0 -1
  604. package/dist/stzh-components/p-523c0bb1.entry.js +0 -2
  605. package/dist/stzh-components/p-523c0bb1.entry.js.map +0 -1
  606. package/dist/stzh-components/p-52a914cd.entry.js +0 -2
  607. package/dist/stzh-components/p-52a914cd.entry.js.map +0 -1
  608. package/dist/stzh-components/p-59a1a257.entry.js.map +0 -1
  609. package/dist/stzh-components/p-648b7232.entry.js +0 -2
  610. package/dist/stzh-components/p-648b7232.entry.js.map +0 -1
  611. package/dist/stzh-components/p-66007952.entry.js.map +0 -1
  612. package/dist/stzh-components/p-6ab9dee8.entry.js +0 -2
  613. package/dist/stzh-components/p-6ab9dee8.entry.js.map +0 -1
  614. package/dist/stzh-components/p-6c2289da.entry.js +0 -2
  615. package/dist/stzh-components/p-6c2289da.entry.js.map +0 -1
  616. package/dist/stzh-components/p-72c375c7.entry.js.map +0 -1
  617. package/dist/stzh-components/p-75b79adf.entry.js.map +0 -1
  618. package/dist/stzh-components/p-771d370d.entry.js +0 -2
  619. package/dist/stzh-components/p-771d370d.entry.js.map +0 -1
  620. package/dist/stzh-components/p-77ba1f21.entry.js +0 -2
  621. package/dist/stzh-components/p-77ba1f21.entry.js.map +0 -1
  622. package/dist/stzh-components/p-78a16599.entry.js +0 -2
  623. package/dist/stzh-components/p-7e304ea3.js +0 -2
  624. package/dist/stzh-components/p-7e304ea3.js.map +0 -1
  625. package/dist/stzh-components/p-7efbb643.entry.js +0 -2
  626. package/dist/stzh-components/p-7efbb643.entry.js.map +0 -1
  627. package/dist/stzh-components/p-991309dd.entry.js +0 -2
  628. package/dist/stzh-components/p-991309dd.entry.js.map +0 -1
  629. package/dist/stzh-components/p-af7855ff.entry.js +0 -2
  630. package/dist/stzh-components/p-af7855ff.entry.js.map +0 -1
  631. package/dist/stzh-components/p-c877d32c.entry.js.map +0 -1
  632. package/dist/stzh-components/p-cc1f8acc.js +0 -2
  633. package/dist/stzh-components/p-cf856610.entry.js +0 -2
  634. package/dist/stzh-components/p-cf856610.entry.js.map +0 -1
  635. package/dist/stzh-components/p-ef21f4dc.entry.js.map +0 -1
  636. package/dist/stzh-components/p-f4ed8d7e.entry.js.map +0 -1
  637. package/dist/stzh-components/p-fdd6e755.entry.js +0 -2
  638. package/dist/stzh-components/p-fdd6e755.entry.js.map +0 -1
  639. /package/dist/stzh-components/{p-9684b22d.entry.js.map → p-09480ffe.entry.js.map} +0 -0
  640. /package/dist/stzh-components/{p-161ae3d1.entry.js.map → p-0b15d79b.entry.js.map} +0 -0
  641. /package/dist/stzh-components/{p-c1cd45e1.entry.js.map → p-12bffe97.entry.js.map} +0 -0
  642. /package/dist/stzh-components/{p-27d5ad01.entry.js.map → p-16a2675e.entry.js.map} +0 -0
  643. /package/dist/stzh-components/{p-0fb40e48.entry.js.map → p-24ea178a.entry.js.map} +0 -0
  644. /package/dist/stzh-components/{p-3f0d3919.entry.js.map → p-2812752a.entry.js.map} +0 -0
  645. /package/dist/stzh-components/{p-68d33cd3.entry.js.map → p-29c1cb5c.entry.js.map} +0 -0
  646. /package/dist/stzh-components/{p-801af922.entry.js.map → p-30a522e0.entry.js.map} +0 -0
  647. /package/dist/stzh-components/{p-d10a6897.entry.js.map → p-30a7c058.entry.js.map} +0 -0
  648. /package/dist/stzh-components/{p-7ca981d1.entry.js.map → p-3261eab4.entry.js.map} +0 -0
  649. /package/dist/stzh-components/{p-5d4a2df0.entry.js.map → p-32cb5b94.entry.js.map} +0 -0
  650. /package/dist/stzh-components/{p-97df1d9f.entry.js.map → p-346d2f3d.entry.js.map} +0 -0
  651. /package/dist/stzh-components/{p-8f1dbd3b.entry.js.map → p-3912a256.entry.js.map} +0 -0
  652. /package/dist/stzh-components/{p-6fdc4c74.entry.js.map → p-39acdb68.entry.js.map} +0 -0
  653. /package/dist/stzh-components/{p-edf77853.entry.js.map → p-63c76fd5.entry.js.map} +0 -0
  654. /package/dist/stzh-components/{p-533fea0b.entry.js.map → p-67e61035.entry.js.map} +0 -0
  655. /package/dist/stzh-components/{p-80fafa1d.entry.js.map → p-6fffe2c8.entry.js.map} +0 -0
  656. /package/dist/stzh-components/{p-eb79f3ed.entry.js.map → p-82c53e4f.entry.js.map} +0 -0
  657. /package/dist/stzh-components/{p-8e0a2441.entry.js.map → p-87f3052b.entry.js.map} +0 -0
  658. /package/dist/stzh-components/{p-b566a2c0.entry.js.map → p-8a82bf60.entry.js.map} +0 -0
  659. /package/dist/stzh-components/{p-9b43127f.entry.js.map → p-8b04698a.entry.js.map} +0 -0
  660. /package/dist/stzh-components/{p-7754870d.entry.js.map → p-9c1b3929.entry.js.map} +0 -0
  661. /package/dist/stzh-components/{p-cff05968.entry.js.map → p-a249f3f6.entry.js.map} +0 -0
  662. /package/dist/stzh-components/{p-a2e9723b.entry.js.map → p-aa3e4203.entry.js.map} +0 -0
  663. /package/dist/stzh-components/{p-f5821678.entry.js.map → p-ab5ee55b.entry.js.map} +0 -0
  664. /package/dist/stzh-components/{p-ce99f5e8.entry.js.map → p-acef653a.entry.js.map} +0 -0
  665. /package/dist/stzh-components/{p-c5dbf7ad.entry.js.map → p-b03f41c3.entry.js.map} +0 -0
  666. /package/dist/stzh-components/{p-ee82f53c.entry.js.map → p-c169f243.entry.js.map} +0 -0
  667. /package/dist/stzh-components/{p-7d030c40.entry.js.map → p-c3816fd3.entry.js.map} +0 -0
  668. /package/dist/stzh-components/{p-7aac960b.entry.js.map → p-ce6dbd52.entry.js.map} +0 -0
  669. /package/dist/stzh-components/{p-722b9e40.entry.js.map → p-d46bbc8c.entry.js.map} +0 -0
  670. /package/dist/stzh-components/{p-c9eecee7.entry.js.map → p-d48ecb2f.entry.js.map} +0 -0
  671. /package/dist/stzh-components/{p-ea152ff3.entry.js.map → p-d7697cf8.entry.js.map} +0 -0
  672. /package/dist/stzh-components/{p-472b3327.entry.js.map → p-d7f1ed07.entry.js.map} +0 -0
  673. /package/dist/stzh-components/{p-56346206.entry.js.map → p-d9fa718c.entry.js.map} +0 -0
@@ -1,8 +1,2808 @@
1
1
  import { r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-e3050b18.js';
2
2
  import { j as js_cookie } from './js.cookie-b91f3f59.js';
3
- import './_commonjsHelpers-4d8f6371.js';
3
+ import { c as createCommonjsModule } from './_commonjsHelpers-4d8f6371.js';
4
+ import { g as getStzhEnvironment, S as StzhEnvironmentEnum } from './utils-90658cfe.js';
5
+ import './string-utils-e252977e.js';
4
6
 
5
- const stzhIframeCss = ".sc-stzh-iframe-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-iframe-h{display:none}.sc-stzh-iframe-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-iframe-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-iframe-h *.sc-stzh-iframe,.sc-stzh-iframe-h *.sc-stzh-iframe::before,.sc-stzh-iframe-h *.sc-stzh-iframe::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-iframe-h .has-focus.sc-stzh-iframe{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-iframe-h .stzh-fylingfocus-focused.sc-stzh-iframe{outline-style:none !important}.sc-stzh-iframe-h .stzh-fylingfocus-focused.sc-stzh-iframe::-moz-focus-inner{border:0 !important}.sc-stzh-iframe-h{position:relative}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=preview-logo]{width:100%}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=preview-image]{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text]{margin:0}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p{margin:0}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p:not(:last-child){margin-bottom:var(--stzh-space-small)}@media screen and (min-width: 900px){.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p:not(:last-child){margin-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p:not(:last-child){margin-bottom:var(--stzh-space-large)}}.stzh-iframe__iframe.sc-stzh-iframe,.stzh-iframe__cookiewall.sc-stzh-iframe,.stzh-iframe__preview.sc-stzh-iframe{position:absolute;top:0;left:0;width:100%;height:100%}.stzh-iframe__iframe.sc-stzh-iframe,.stzh-iframe__preview.sc-stzh-iframe{border:none}.stzh-iframe__preview.sc-stzh-iframe,.stzh-iframe__cookiewall.sc-stzh-iframe{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--stzh-space-medium);visibility:hidden}.stzh-iframe__preview.is-visible.sc-stzh-iframe,.stzh-iframe__cookiewall.is-visible.sc-stzh-iframe{visibility:visible}.stzh-iframe__preview.sc-stzh-iframe{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;background-color:var(--stzh-color-grey20)}.stzh-iframe__preview-image-wrapper.sc-stzh-iframe:not(:empty)+.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{display:none}.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{top:var(--stzh-space-xlarge);left:var(--stzh-space-xlarge);position:absolute;width:45%}@media screen and (min-width: 900px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{top:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{top:var(--stzh-space-xxxlarge)}}@media screen and (min-width: 900px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{left:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{left:var(--stzh-space-xxxlarge)}}.stzh-iframe__preview-run.sc-stzh-iframe{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background-color:var(--stzh-color-primary);color:var(--stzh-color-white);display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--stzh-form-input-small-height);height:var(--stzh-form-input-small-height);visibility:hidden;transition:background-color var(--stzh-base-transition-animation-speed)}.stzh-iframe__preview-run.is-visible.sc-stzh-iframe{visibility:visible}@media screen and (min-width: 900px){.stzh-iframe__preview-run.sc-stzh-iframe{width:var(--stzh-form-input-height);height:var(--stzh-form-input-height)}}.stzh-iframe__preview.sc-stzh-iframe:hover .stzh-iframe__preview-run.sc-stzh-iframe{background-color:var(--stzh-color-secondary60)}@media screen and (min-width: 900px){.stzh-iframe__preview-run-icon.sc-stzh-iframe{--size:var(--stzh-icon-size-large)}}.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-medium);padding-right:var(--stzh-space-medium);z-index:2;text-align:center;background-color:var(--stzh-color-black60op);color:var(--stzh-color-white)}@media screen and (min-width: 600px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-xxlarge)}}@media screen and (min-width: 600px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-right:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-right:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter);column-gap:var(--stzh-grid-gutter);display:grid;grid-template-areas:\". content content content content content content .\";grid-template-columns:repeat(8, minmax(0, 1fr));padding-left:0;padding-right:0}}@media screen and (min-width: 900px) and (min-width: 600px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-small);column-gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px) and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-medium);column-gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 900px) and (min-width: 1260px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-large);column-gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 900px) and (min-width: 1600px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-ultra);column-gap:var(--stzh-grid-gutter-ultra)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-content.sc-stzh-iframe{grid-area:content}}.stzh-iframe__cookiewall-text.sc-stzh-iframe{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);padding-top:var(--stzh-space-small);padding-bottom:var(--stzh-space-small);margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-top:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-top:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-bottom:var(--stzh-space-large)}}@media screen and (min-width: 600px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{margin-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{margin-bottom:var(--stzh-space-xxlarge)}}.stzh-iframe__cookiewall-close.sc-stzh-iframe{top:0;right:0;position:absolute;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;display:flex;align-items:center;justify-content:center;padding:var(--stzh-space-xsmall);background-color:transparent;color:var(--stzh-color-white);cursor:pointer}";
7
+ var iframeResizer$1 = createCommonjsModule(function (module) {
8
+ /*
9
+ * File: iframeResizer.js
10
+ * Desc: Force iframes to size to content.
11
+ * Requires: iframeResizer.contentWindow.js to be loaded into the target frame.
12
+ * Doc: https://iframe-resizer.com
13
+ * Author: David J. Bradshaw - info@iframe-resizer.com
14
+ */
15
+
16
+ console.info(`
17
+ IFRAME-RESIZER
18
+
19
+ Iframe-Resizer 5 is now available via the following two packages:
20
+
21
+ * @iframe-resizer/parent
22
+ * @iframe-resizer/child
23
+
24
+ Additionally their are also new versions of iframe-resizer for React, Vue, and jQuery.
25
+
26
+ Version 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.
27
+
28
+ Please see https://iframe-resizer.com/upgrade for more details.
29
+ `)
30
+
31
+ // eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names
32
+ ;(function (undefined$1) {
33
+ if (typeof window === 'undefined') return // don't run for server side render
34
+
35
+ // var VERSION = '4.3.11'
36
+
37
+ var count = 0,
38
+ destroyObserver,
39
+ logEnabled = false,
40
+ hiddenCheckEnabled = false,
41
+ msgHeader = 'message',
42
+ msgHeaderLen = msgHeader.length,
43
+ msgId = '[iFrameSizer]', // Must match iframe msg ID
44
+ msgIdLen = msgId.length,
45
+ pagePosition = null,
46
+ requestAnimationFrame = window.requestAnimationFrame,
47
+ resetRequiredMethods = Object.freeze({
48
+ max: 1,
49
+ scroll: 1,
50
+ bodyScroll: 1,
51
+ documentElementScroll: 1
52
+ }),
53
+ settings = {},
54
+ timer = null,
55
+ defaults = Object.freeze({
56
+ autoResize: true,
57
+ bodyBackground: null,
58
+ bodyMargin: null,
59
+ bodyMarginV1: 8,
60
+ bodyPadding: null,
61
+ checkOrigin: true,
62
+ inPageLinks: false,
63
+ enablePublicMethods: true,
64
+ heightCalculationMethod: 'bodyOffset',
65
+ id: 'iFrameResizer',
66
+ interval: 32,
67
+ license: '1jqr0si6pnt',
68
+ log: false,
69
+ maxHeight: Infinity,
70
+ maxWidth: Infinity,
71
+ minHeight: 0,
72
+ minWidth: 0,
73
+ mouseEvents: true,
74
+ resizeFrom: 'parent',
75
+ scrolling: false,
76
+ sizeHeight: true,
77
+ sizeWidth: false,
78
+ warningTimeout: 5000,
79
+ tolerance: 0,
80
+ widthCalculationMethod: 'scroll',
81
+ onClose: function () {
82
+ return true
83
+ },
84
+ onClosed: function () {},
85
+ onInit: function () {},
86
+ onMessage: function () {
87
+ warn('onMessage function not defined');
88
+ },
89
+ onMouseEnter: function () {},
90
+ onMouseLeave: function () {},
91
+ onResized: function () {},
92
+ onScroll: function () {
93
+ return true
94
+ }
95
+ });
96
+
97
+ function getMutationObserver() {
98
+ return (
99
+ window.MutationObserver ||
100
+ window.WebKitMutationObserver ||
101
+ window.MozMutationObserver
102
+ )
103
+ }
104
+
105
+ function addEventListener(el, evt, func) {
106
+ el.addEventListener(evt, func, false);
107
+ }
108
+
109
+ function removeEventListener(el, evt, func) {
110
+ el.removeEventListener(evt, func, false);
111
+ }
112
+
113
+ function setupRequestAnimationFrame() {
114
+ var vendors = ['moz', 'webkit', 'o', 'ms'];
115
+ var x;
116
+
117
+ // Remove vendor prefixing if prefixed and break early if not
118
+ for (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) {
119
+ requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
120
+ }
121
+
122
+ if (requestAnimationFrame) {
123
+ // Firefox extension content-scripts have a globalThis object that is not the same as window.
124
+ // Binding `requestAnimationFrame` to window allows the function to work and prevents errors
125
+ // being thrown when run in that context, and should be a no-op in every other context.
126
+ requestAnimationFrame = requestAnimationFrame.bind(window);
127
+ } else {
128
+ log('setup', 'RequestAnimationFrame not supported');
129
+ }
130
+ }
131
+
132
+ function getMyID(iframeId) {
133
+ var retStr = 'Host page: ' + iframeId;
134
+
135
+ if (window.top !== window.self) {
136
+ retStr =
137
+ window.parentIFrame && window.parentIFrame.getId
138
+ ? window.parentIFrame.getId() + ': ' + iframeId
139
+ : 'Nested host page: ' + iframeId;
140
+ }
141
+
142
+ return retStr
143
+ }
144
+
145
+ function formatLogHeader(iframeId) {
146
+ return msgId + '[' + getMyID(iframeId) + ']'
147
+ }
148
+
149
+ function isLogEnabled(iframeId) {
150
+ return settings[iframeId] ? settings[iframeId].log : logEnabled
151
+ }
152
+
153
+ function log(iframeId, msg) {
154
+ output('log', iframeId, msg, isLogEnabled(iframeId));
155
+ }
156
+
157
+ function info(iframeId, msg) {
158
+ output('info', iframeId, msg, isLogEnabled(iframeId));
159
+ }
160
+
161
+ function warn(iframeId, msg) {
162
+ output('warn', iframeId, msg, true);
163
+ }
164
+
165
+ function output(type, iframeId, msg, enabled) {
166
+ if (true === enabled && 'object' === typeof window.console) {
167
+ // eslint-disable-next-line no-console
168
+ console[type](formatLogHeader(iframeId), msg);
169
+ }
170
+ }
171
+
172
+ function iFrameListener(event) {
173
+ function resizeIFrame() {
174
+ function resize() {
175
+ setSize(messageData);
176
+ setPagePosition(iframeId);
177
+ on('onResized', messageData);
178
+ }
179
+
180
+ ensureInRange('Height');
181
+ ensureInRange('Width');
182
+
183
+ syncResize(resize, messageData, 'init');
184
+ }
185
+
186
+ function processMsg() {
187
+ var data = msg.slice(msgIdLen).split(':');
188
+ var height = data[1] ? parseInt(data[1], 10) : 0;
189
+ var iframe = settings[data[0]] && settings[data[0]].iframe;
190
+ var compStyle = getComputedStyle(iframe);
191
+
192
+ return {
193
+ iframe: iframe,
194
+ id: data[0],
195
+ height: height + getPaddingEnds(compStyle) + getBorderEnds(compStyle),
196
+ width: data[2],
197
+ type: data[3]
198
+ }
199
+ }
200
+
201
+ function getPaddingEnds(compStyle) {
202
+ if (compStyle.boxSizing !== 'border-box') {
203
+ return 0
204
+ }
205
+ var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0;
206
+ var bot = compStyle.paddingBottom
207
+ ? parseInt(compStyle.paddingBottom, 10)
208
+ : 0;
209
+ return top + bot
210
+ }
211
+
212
+ function getBorderEnds(compStyle) {
213
+ if (compStyle.boxSizing !== 'border-box') {
214
+ return 0
215
+ }
216
+ var top = compStyle.borderTopWidth
217
+ ? parseInt(compStyle.borderTopWidth, 10)
218
+ : 0;
219
+ var bot = compStyle.borderBottomWidth
220
+ ? parseInt(compStyle.borderBottomWidth, 10)
221
+ : 0;
222
+ return top + bot
223
+ }
224
+
225
+ function ensureInRange(Dimension) {
226
+ var max = Number(settings[iframeId]['max' + Dimension]),
227
+ min = Number(settings[iframeId]['min' + Dimension]),
228
+ dimension = Dimension.toLowerCase(),
229
+ size = Number(messageData[dimension]);
230
+
231
+ log(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max);
232
+
233
+ if (size < min) {
234
+ size = min;
235
+ log(iframeId, 'Set ' + dimension + ' to min value');
236
+ }
237
+
238
+ if (size > max) {
239
+ size = max;
240
+ log(iframeId, 'Set ' + dimension + ' to max value');
241
+ }
242
+
243
+ messageData[dimension] = '' + size;
244
+ }
245
+
246
+ function isMessageFromIFrame() {
247
+ function checkAllowedOrigin() {
248
+ function checkList() {
249
+ var i = 0,
250
+ retCode = false;
251
+
252
+ log(
253
+ iframeId,
254
+ 'Checking connection is from allowed list of origins: ' +
255
+ checkOrigin
256
+ );
257
+
258
+ for (; i < checkOrigin.length; i++) {
259
+ if (checkOrigin[i] === origin) {
260
+ retCode = true;
261
+ break
262
+ }
263
+ }
264
+ return retCode
265
+ }
266
+
267
+ function checkSingle() {
268
+ var remoteHost = settings[iframeId] && settings[iframeId].remoteHost;
269
+ log(iframeId, 'Checking connection is from: ' + remoteHost);
270
+ return origin === remoteHost
271
+ }
272
+
273
+ return checkOrigin.constructor === Array ? checkList() : checkSingle()
274
+ }
275
+
276
+ var origin = event.origin,
277
+ checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin;
278
+
279
+ if (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) {
280
+ throw new Error(
281
+ 'Unexpected message received from: ' +
282
+ origin +
283
+ ' for ' +
284
+ messageData.iframe.id +
285
+ '. Message was: ' +
286
+ event.data +
287
+ '. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.'
288
+ )
289
+ }
290
+
291
+ return true
292
+ }
293
+
294
+ function isMessageForUs() {
295
+ return (
296
+ msgId === ('' + msg).slice(0, msgIdLen) &&
297
+ msg.slice(msgIdLen).split(':')[0] in settings
298
+ ) // ''+Protects against non-string msg
299
+ }
300
+
301
+ function isMessageFromMetaParent() {
302
+ // Test if this message is from a parent above us. This is an ugly test, however, updating
303
+ // the message format would break backwards compatibility.
304
+ var retCode = messageData.type in { true: 1, false: 1, undefined: 1 };
305
+
306
+ if (retCode) {
307
+ log(iframeId, 'Ignoring init message from meta parent page');
308
+ }
309
+
310
+ return retCode
311
+ }
312
+
313
+ function getMsgBody(offset) {
314
+ return msg.slice(msg.indexOf(':') + msgHeaderLen + offset)
315
+ }
316
+
317
+ function forwardMsgFromIFrame(msgBody) {
318
+ log(
319
+ iframeId,
320
+ 'onMessage passed: {iframe: ' +
321
+ messageData.iframe.id +
322
+ ', message: ' +
323
+ msgBody +
324
+ '}'
325
+ );
326
+
327
+ on('onMessage', {
328
+ iframe: messageData.iframe,
329
+ message: JSON.parse(msgBody)
330
+ });
331
+
332
+ log(iframeId, '--');
333
+ }
334
+
335
+ function getPageInfo() {
336
+ var bodyPosition = document.body.getBoundingClientRect(),
337
+ iFramePosition = messageData.iframe.getBoundingClientRect();
338
+
339
+ return JSON.stringify({
340
+ iframeHeight: iFramePosition.height,
341
+ iframeWidth: iFramePosition.width,
342
+ clientHeight: Math.max(
343
+ document.documentElement.clientHeight,
344
+ window.innerHeight || 0
345
+ ),
346
+ clientWidth: Math.max(
347
+ document.documentElement.clientWidth,
348
+ window.innerWidth || 0
349
+ ),
350
+ offsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10),
351
+ offsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10),
352
+ scrollTop: window.pageYOffset,
353
+ scrollLeft: window.pageXOffset,
354
+ documentHeight: document.documentElement.clientHeight,
355
+ documentWidth: document.documentElement.clientWidth,
356
+ windowHeight: window.innerHeight,
357
+ windowWidth: window.innerWidth
358
+ })
359
+ }
360
+
361
+ function sendPageInfoToIframe(iframe, iframeId) {
362
+ function debouncedTrigger() {
363
+ trigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId);
364
+ }
365
+ debounceFrameEvents(debouncedTrigger, 32, iframeId);
366
+ }
367
+
368
+ function startPageInfoMonitor() {
369
+ function setListener(type, func) {
370
+ function sendPageInfo() {
371
+ if (settings[id]) {
372
+ sendPageInfoToIframe(settings[id].iframe, id);
373
+ } else {
374
+ stop();
375
+ }
376
+ }
377
+ ['scroll', 'resize'].forEach(function (evt) {
378
+ log(id, type + evt + ' listener for sendPageInfo');
379
+ func(window, evt, sendPageInfo);
380
+ });
381
+ }
382
+
383
+ function stop() {
384
+ setListener('Remove ', removeEventListener);
385
+ }
386
+
387
+ function start() {
388
+ setListener('Add ', addEventListener);
389
+ }
390
+
391
+ var id = iframeId; // Create locally scoped copy of iFrame ID
392
+
393
+ start();
394
+
395
+ if (settings[id]) {
396
+ settings[id].stopPageInfo = stop;
397
+ }
398
+ }
399
+
400
+ function stopPageInfoMonitor() {
401
+ if (settings[iframeId] && settings[iframeId].stopPageInfo) {
402
+ settings[iframeId].stopPageInfo();
403
+ delete settings[iframeId].stopPageInfo;
404
+ }
405
+ }
406
+
407
+ function checkIFrameExists() {
408
+ var retBool = true;
409
+
410
+ if (null === messageData.iframe) {
411
+ warn(iframeId, 'IFrame (' + messageData.id + ') not found');
412
+ retBool = false;
413
+ }
414
+ return retBool
415
+ }
416
+
417
+ function getElementPosition(target) {
418
+ var iFramePosition = target.getBoundingClientRect();
419
+
420
+ getPagePosition(iframeId);
421
+
422
+ return {
423
+ x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),
424
+ y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))
425
+ }
426
+ }
427
+
428
+ function scrollRequestFromChild(addOffset) {
429
+ /* istanbul ignore next */ // Not testable in Karma
430
+ function reposition() {
431
+ pagePosition = newPosition;
432
+ scrollTo();
433
+ log(iframeId, '--');
434
+ }
435
+
436
+ function calcOffset() {
437
+ return {
438
+ x: Number(messageData.width) + offset.x,
439
+ y: Number(messageData.height) + offset.y
440
+ }
441
+ }
442
+
443
+ function scrollParent() {
444
+ if (window.parentIFrame) {
445
+ window.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](
446
+ newPosition.x,
447
+ newPosition.y
448
+ );
449
+ } else {
450
+ warn(
451
+ iframeId,
452
+ 'Unable to scroll to requested position, window.parentIFrame not found'
453
+ );
454
+ }
455
+ }
456
+
457
+ var offset = addOffset
458
+ ? getElementPosition(messageData.iframe)
459
+ : { x: 0, y: 0 },
460
+ newPosition = calcOffset();
461
+
462
+ log(
463
+ iframeId,
464
+ 'Reposition requested from iFrame (offset x:' +
465
+ offset.x +
466
+ ' y:' +
467
+ offset.y +
468
+ ')'
469
+ );
470
+
471
+ if (window.top === window.self) {
472
+ reposition();
473
+ } else {
474
+ scrollParent();
475
+ }
476
+ }
477
+
478
+ function scrollTo() {
479
+ if (false === on('onScroll', pagePosition)) {
480
+ unsetPagePosition();
481
+ } else {
482
+ setPagePosition(iframeId);
483
+ }
484
+ }
485
+
486
+ function findTarget(location) {
487
+ function jumpToTarget() {
488
+ var jumpPosition = getElementPosition(target);
489
+
490
+ log(
491
+ iframeId,
492
+ 'Moving to in page link (#' +
493
+ hash +
494
+ ') at x: ' +
495
+ jumpPosition.x +
496
+ ' y: ' +
497
+ jumpPosition.y
498
+ );
499
+ pagePosition = {
500
+ x: jumpPosition.x,
501
+ y: jumpPosition.y
502
+ };
503
+
504
+ scrollTo();
505
+ log(iframeId, '--');
506
+ }
507
+
508
+ function jumpToParent() {
509
+ if (window.parentIFrame) {
510
+ window.parentIFrame.moveToAnchor(hash);
511
+ } else {
512
+ log(
513
+ iframeId,
514
+ 'In page link #' +
515
+ hash +
516
+ ' not found and window.parentIFrame not found'
517
+ );
518
+ }
519
+ }
520
+
521
+ var hash = location.split('#')[1] || '',
522
+ hashData = decodeURIComponent(hash),
523
+ target =
524
+ document.getElementById(hashData) ||
525
+ document.getElementsByName(hashData)[0];
526
+
527
+ if (target) {
528
+ jumpToTarget();
529
+ } else if (window.top === window.self) {
530
+ log(iframeId, 'In page link #' + hash + ' not found');
531
+ } else {
532
+ jumpToParent();
533
+ }
534
+ }
535
+
536
+ function onMouse(event) {
537
+ var mousePos = {};
538
+
539
+ if (Number(messageData.width) === 0 && Number(messageData.height) === 0) {
540
+ var data = getMsgBody(9).split(':');
541
+ mousePos = {
542
+ x: data[1],
543
+ y: data[0]
544
+ };
545
+ } else {
546
+ mousePos = {
547
+ x: messageData.width,
548
+ y: messageData.height
549
+ };
550
+ }
551
+
552
+ on(event, {
553
+ iframe: messageData.iframe,
554
+ screenX: Number(mousePos.x),
555
+ screenY: Number(mousePos.y),
556
+ type: messageData.type
557
+ });
558
+ }
559
+
560
+ function on(funcName, val) {
561
+ return chkEvent(iframeId, funcName, val)
562
+ }
563
+
564
+ function actionMsg() {
565
+ if (settings[iframeId] && settings[iframeId].firstRun) firstRun();
566
+
567
+ switch (messageData.type) {
568
+ case 'close': {
569
+ closeIFrame(messageData.iframe);
570
+ break
571
+ }
572
+
573
+ case 'message': {
574
+ forwardMsgFromIFrame(getMsgBody(6));
575
+ break
576
+ }
577
+
578
+ case 'mouseenter': {
579
+ onMouse('onMouseEnter');
580
+ break
581
+ }
582
+
583
+ case 'mouseleave': {
584
+ onMouse('onMouseLeave');
585
+ break
586
+ }
587
+
588
+ case 'autoResize': {
589
+ settings[iframeId].autoResize = JSON.parse(getMsgBody(9));
590
+ break
591
+ }
592
+
593
+ case 'scrollTo': {
594
+ scrollRequestFromChild(false);
595
+ break
596
+ }
597
+
598
+ case 'scrollToOffset': {
599
+ scrollRequestFromChild(true);
600
+ break
601
+ }
602
+
603
+ case 'pageInfo': {
604
+ sendPageInfoToIframe(
605
+ settings[iframeId] && settings[iframeId].iframe,
606
+ iframeId
607
+ );
608
+ startPageInfoMonitor();
609
+ break
610
+ }
611
+
612
+ case 'pageInfoStop': {
613
+ stopPageInfoMonitor();
614
+ break
615
+ }
616
+
617
+ case 'inPageLink': {
618
+ findTarget(getMsgBody(9));
619
+ break
620
+ }
621
+
622
+ case 'reset': {
623
+ resetIFrame(messageData);
624
+ break
625
+ }
626
+
627
+ case 'init': {
628
+ resizeIFrame();
629
+ on('onInit', messageData.iframe);
630
+ break
631
+ }
632
+
633
+ default: {
634
+ if (
635
+ Number(messageData.width) === 0 &&
636
+ Number(messageData.height) === 0
637
+ ) {
638
+ warn(
639
+ 'Unsupported message received (' +
640
+ messageData.type +
641
+ '), this is likely due to the iframe containing a later ' +
642
+ 'version of iframe-resizer than the parent page'
643
+ );
644
+ } else {
645
+ resizeIFrame();
646
+ }
647
+ }
648
+ }
649
+ }
650
+
651
+ function hasSettings(iframeId) {
652
+ var retBool = true;
653
+
654
+ if (!settings[iframeId]) {
655
+ retBool = false;
656
+ warn(
657
+ messageData.type +
658
+ ' No settings for ' +
659
+ iframeId +
660
+ '. Message was: ' +
661
+ msg
662
+ );
663
+ }
664
+
665
+ return retBool
666
+ }
667
+
668
+ function iFrameReadyMsgReceived() {
669
+ // eslint-disable-next-line no-restricted-syntax, guard-for-in
670
+ for (var iframeId in settings) {
671
+ trigger(
672
+ 'iFrame requested init',
673
+ createOutgoingMsg(iframeId),
674
+ settings[iframeId].iframe,
675
+ iframeId
676
+ );
677
+ }
678
+ }
679
+
680
+ function firstRun() {
681
+ if (settings[iframeId]) {
682
+ settings[iframeId].firstRun = false;
683
+ }
684
+ }
685
+
686
+ var msg = event.data,
687
+ messageData = {},
688
+ iframeId = null;
689
+
690
+ if ('[iFrameResizerChild]Ready' === msg) {
691
+ iFrameReadyMsgReceived();
692
+ } else if (isMessageForUs()) {
693
+ messageData = processMsg();
694
+ iframeId = messageData.id;
695
+ if (settings[iframeId]) {
696
+ settings[iframeId].loaded = true;
697
+ }
698
+
699
+ if (!isMessageFromMetaParent() && hasSettings(iframeId)) {
700
+ log(iframeId, 'Received: ' + msg);
701
+
702
+ if (checkIFrameExists() && isMessageFromIFrame()) {
703
+ actionMsg();
704
+ }
705
+ }
706
+ } else {
707
+ info(iframeId, 'Ignored: ' + msg);
708
+ }
709
+ }
710
+
711
+ function chkEvent(iframeId, funcName, val) {
712
+ var func = null,
713
+ retVal = null;
714
+
715
+ if (settings[iframeId]) {
716
+ func = settings[iframeId][funcName];
717
+
718
+ if ('function' === typeof func) {
719
+ retVal = func(val);
720
+ } else {
721
+ throw new TypeError(
722
+ funcName + ' on iFrame[' + iframeId + '] is not a function'
723
+ )
724
+ }
725
+ }
726
+
727
+ return retVal
728
+ }
729
+
730
+ function removeIframeListeners(iframe) {
731
+ var iframeId = iframe.id;
732
+ delete settings[iframeId];
733
+ }
734
+
735
+ function closeIFrame(iframe) {
736
+ var iframeId = iframe.id;
737
+ if (chkEvent(iframeId, 'onClose', iframeId) === false) {
738
+ log(iframeId, 'Close iframe cancelled by onClose event');
739
+ return
740
+ }
741
+ log(iframeId, 'Removing iFrame: ' + iframeId);
742
+
743
+ try {
744
+ // Catch race condition error with React
745
+ if (iframe.parentNode) {
746
+ iframe.parentNode.removeChild(iframe);
747
+ }
748
+ } catch (error) {
749
+ warn(error);
750
+ }
751
+
752
+ chkEvent(iframeId, 'onClosed', iframeId);
753
+ log(iframeId, '--');
754
+ removeIframeListeners(iframe);
755
+ if (destroyObserver) {
756
+ destroyObserver.disconnect();
757
+ destroyObserver = null;
758
+ }
759
+ }
760
+
761
+ function getPagePosition(iframeId) {
762
+ if (null === pagePosition) {
763
+ pagePosition = {
764
+ x:
765
+ window.pageXOffset === undefined$1
766
+ ? document.documentElement.scrollLeft
767
+ : window.pageXOffset,
768
+ y:
769
+ window.pageYOffset === undefined$1
770
+ ? document.documentElement.scrollTop
771
+ : window.pageYOffset
772
+ };
773
+ log(
774
+ iframeId,
775
+ 'Get page position: ' + pagePosition.x + ',' + pagePosition.y
776
+ );
777
+ }
778
+ }
779
+
780
+ function setPagePosition(iframeId) {
781
+ if (null !== pagePosition) {
782
+ window.scrollTo(pagePosition.x, pagePosition.y);
783
+ log(
784
+ iframeId,
785
+ 'Set page position: ' + pagePosition.x + ',' + pagePosition.y
786
+ );
787
+ unsetPagePosition();
788
+ }
789
+ }
790
+
791
+ function unsetPagePosition() {
792
+ pagePosition = null;
793
+ }
794
+
795
+ function resetIFrame(messageData) {
796
+ function reset() {
797
+ setSize(messageData);
798
+ trigger('reset', 'reset', messageData.iframe, messageData.id);
799
+ }
800
+
801
+ log(
802
+ messageData.id,
803
+ 'Size reset requested by ' +
804
+ ('init' === messageData.type ? 'host page' : 'iFrame')
805
+ );
806
+ getPagePosition(messageData.id);
807
+ syncResize(reset, messageData, 'reset');
808
+ }
809
+
810
+ function setSize(messageData) {
811
+ function setDimension(dimension) {
812
+ if (!messageData.id) {
813
+ log('undefined', 'messageData id not set');
814
+ return
815
+ }
816
+ messageData.iframe.style[dimension] = messageData[dimension] + 'px';
817
+ log(
818
+ messageData.id,
819
+ 'IFrame (' +
820
+ iframeId +
821
+ ') ' +
822
+ dimension +
823
+ ' set to ' +
824
+ messageData[dimension] +
825
+ 'px'
826
+ );
827
+ }
828
+
829
+ function chkZero(dimension) {
830
+ // FireFox sets dimension of hidden iFrames to zero.
831
+ // So if we detect that set up an event to check for
832
+ // when iFrame becomes visible.
833
+
834
+ /* istanbul ignore next */ // Not testable in PhantomJS
835
+ if (!hiddenCheckEnabled && '0' === messageData[dimension]) {
836
+ hiddenCheckEnabled = true;
837
+ log(iframeId, 'Hidden iFrame detected, creating visibility listener');
838
+ fixHiddenIFrames();
839
+ }
840
+ }
841
+
842
+ function processDimension(dimension) {
843
+ setDimension(dimension);
844
+ chkZero(dimension);
845
+ }
846
+
847
+ var iframeId = messageData.iframe.id;
848
+
849
+ if (settings[iframeId]) {
850
+ if (settings[iframeId].sizeHeight) {
851
+ processDimension('height');
852
+ }
853
+ if (settings[iframeId].sizeWidth) {
854
+ processDimension('width');
855
+ }
856
+ }
857
+ }
858
+
859
+ function syncResize(func, messageData, doNotSync) {
860
+ /* istanbul ignore if */ // Not testable in PhantomJS
861
+ if (
862
+ doNotSync !== messageData.type &&
863
+ requestAnimationFrame &&
864
+ // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
865
+ !window.jasmine
866
+ ) {
867
+ log(messageData.id, 'Requesting animation frame');
868
+ requestAnimationFrame(func);
869
+ } else {
870
+ func();
871
+ }
872
+ }
873
+
874
+ function trigger(calleeMsg, msg, iframe, id, noResponseWarning) {
875
+ function postMessageToIFrame() {
876
+ var target = settings[id] && settings[id].targetOrigin;
877
+ log(
878
+ id,
879
+ '[' +
880
+ calleeMsg +
881
+ '] Sending msg to iframe[' +
882
+ id +
883
+ '] (' +
884
+ msg +
885
+ ') targetOrigin: ' +
886
+ target
887
+ );
888
+ iframe.contentWindow.postMessage(msgId + msg, target);
889
+ }
890
+
891
+ function iFrameNotFound() {
892
+ warn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found');
893
+ }
894
+
895
+ function chkAndSend() {
896
+ if (
897
+ iframe &&
898
+ 'contentWindow' in iframe &&
899
+ null !== iframe.contentWindow
900
+ ) {
901
+ // Null test for PhantomJS
902
+ postMessageToIFrame();
903
+ } else {
904
+ iFrameNotFound();
905
+ }
906
+ }
907
+
908
+ function warnOnNoResponse() {
909
+ function warning() {
910
+ if (settings[id] && !settings[id].loaded && !errorShown) {
911
+ errorShown = true;
912
+ warn(
913
+ id,
914
+ 'IFrame has not responded within ' +
915
+ settings[id].warningTimeout / 1000 +
916
+ ' seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.'
917
+ );
918
+ }
919
+ }
920
+
921
+ if (
922
+ !!noResponseWarning &&
923
+ settings[id] &&
924
+ !!settings[id].warningTimeout
925
+ ) {
926
+ settings[id].msgTimeout = setTimeout(
927
+ warning,
928
+ settings[id].warningTimeout
929
+ );
930
+ }
931
+ }
932
+
933
+ var errorShown = false;
934
+
935
+ id = id || iframe.id;
936
+
937
+ if (settings[id]) {
938
+ chkAndSend();
939
+ warnOnNoResponse();
940
+ }
941
+ }
942
+
943
+ function createOutgoingMsg(iframeId) {
944
+ return (
945
+ iframeId +
946
+ ':' +
947
+ settings[iframeId].bodyMarginV1 +
948
+ ':' +
949
+ settings[iframeId].sizeWidth +
950
+ ':' +
951
+ settings[iframeId].log +
952
+ ':' +
953
+ settings[iframeId].interval +
954
+ ':' +
955
+ settings[iframeId].enablePublicMethods +
956
+ ':' +
957
+ settings[iframeId].autoResize +
958
+ ':' +
959
+ settings[iframeId].bodyMargin +
960
+ ':' +
961
+ settings[iframeId].heightCalculationMethod +
962
+ ':' +
963
+ settings[iframeId].bodyBackground +
964
+ ':' +
965
+ settings[iframeId].bodyPadding +
966
+ ':' +
967
+ settings[iframeId].tolerance +
968
+ ':' +
969
+ settings[iframeId].inPageLinks +
970
+ ':' +
971
+ settings[iframeId].resizeFrom +
972
+ ':' +
973
+ settings[iframeId].widthCalculationMethod +
974
+ ':' +
975
+ settings[iframeId].mouseEvents
976
+ )
977
+ }
978
+
979
+ function isNumber(value) {
980
+ return typeof value === 'number'
981
+ }
982
+
983
+ function setupIFrame(iframe, options) {
984
+ function setLimits() {
985
+ function addStyle(style) {
986
+ var styleValue = settings[iframeId][style];
987
+ if (Infinity !== styleValue && 0 !== styleValue) {
988
+ iframe.style[style] = isNumber(styleValue)
989
+ ? styleValue + 'px'
990
+ : styleValue;
991
+ log(iframeId, 'Set ' + style + ' = ' + iframe.style[style]);
992
+ }
993
+ }
994
+
995
+ function chkMinMax(dimension) {
996
+ if (
997
+ settings[iframeId]['min' + dimension] >
998
+ settings[iframeId]['max' + dimension]
999
+ ) {
1000
+ throw new Error(
1001
+ 'Value for min' +
1002
+ dimension +
1003
+ ' can not be greater than max' +
1004
+ dimension
1005
+ )
1006
+ }
1007
+ }
1008
+
1009
+ chkMinMax('Height');
1010
+ chkMinMax('Width');
1011
+
1012
+ addStyle('maxHeight');
1013
+ addStyle('minHeight');
1014
+ addStyle('maxWidth');
1015
+ addStyle('minWidth');
1016
+ }
1017
+
1018
+ function newId() {
1019
+ var id = (options && options.id) || defaults.id + count++;
1020
+ if (null !== document.getElementById(id)) {
1021
+ id += count++;
1022
+ }
1023
+ return id
1024
+ }
1025
+
1026
+ function ensureHasId(iframeId) {
1027
+ if (typeof iframeId !== 'string') {
1028
+ throw new TypeError('Invaild id for iFrame. Expected String')
1029
+ }
1030
+
1031
+ if ('' === iframeId) {
1032
+ // eslint-disable-next-line no-multi-assign
1033
+ iframe.id = iframeId = newId();
1034
+ logEnabled = (options || {}).log;
1035
+ log(
1036
+ iframeId,
1037
+ 'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')'
1038
+ );
1039
+ }
1040
+
1041
+ return iframeId
1042
+ }
1043
+
1044
+ function setScrolling() {
1045
+ log(
1046
+ iframeId,
1047
+ 'IFrame scrolling ' +
1048
+ (settings[iframeId] && settings[iframeId].scrolling
1049
+ ? 'enabled'
1050
+ : 'disabled') +
1051
+ ' for ' +
1052
+ iframeId
1053
+ );
1054
+ iframe.style.overflow =
1055
+ false === (settings[iframeId] && settings[iframeId].scrolling)
1056
+ ? 'hidden'
1057
+ : 'auto';
1058
+ switch (settings[iframeId] && settings[iframeId].scrolling) {
1059
+ case 'omit': {
1060
+ break
1061
+ }
1062
+
1063
+ case true: {
1064
+ iframe.scrolling = 'yes';
1065
+ break
1066
+ }
1067
+
1068
+ case false: {
1069
+ iframe.scrolling = 'no';
1070
+ break
1071
+ }
1072
+
1073
+ default: {
1074
+ iframe.scrolling = settings[iframeId]
1075
+ ? settings[iframeId].scrolling
1076
+ : 'no';
1077
+ }
1078
+ }
1079
+ }
1080
+
1081
+ // The V1 iFrame script expects an int, where as in V2 expects a CSS
1082
+ // string value such as '1px 3em', so if we have an int for V2, set V1=V2
1083
+ // and then convert V2 to a string PX value.
1084
+ function setupBodyMarginValues() {
1085
+ if (
1086
+ 'number' ===
1087
+ typeof (settings[iframeId] && settings[iframeId].bodyMargin) ||
1088
+ '0' === (settings[iframeId] && settings[iframeId].bodyMargin)
1089
+ ) {
1090
+ settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin;
1091
+ settings[iframeId].bodyMargin =
1092
+ '' + settings[iframeId].bodyMargin + 'px';
1093
+ }
1094
+ }
1095
+
1096
+ function checkReset() {
1097
+ // Reduce scope of firstRun to function, because IE8's JS execution
1098
+ // context stack is borked and this value gets externally
1099
+ // changed midway through running this function!!!
1100
+ var firstRun = settings[iframeId] && settings[iframeId].firstRun,
1101
+ resetRequertMethod =
1102
+ settings[iframeId] &&
1103
+ settings[iframeId].heightCalculationMethod in resetRequiredMethods;
1104
+
1105
+ if (!firstRun && resetRequertMethod) {
1106
+ resetIFrame({ iframe: iframe, height: 0, width: 0, type: 'init' });
1107
+ }
1108
+ }
1109
+
1110
+ function setupIFrameObject() {
1111
+ if (settings[iframeId]) {
1112
+ settings[iframeId].iframe.iFrameResizer = {
1113
+ close: closeIFrame.bind(null, settings[iframeId].iframe),
1114
+
1115
+ removeListeners: removeIframeListeners.bind(
1116
+ null,
1117
+ settings[iframeId].iframe
1118
+ ),
1119
+
1120
+ resize: trigger.bind(
1121
+ null,
1122
+ 'Window resize',
1123
+ 'resize',
1124
+ settings[iframeId].iframe
1125
+ ),
1126
+
1127
+ moveToAnchor: function (anchor) {
1128
+ trigger(
1129
+ 'Move to anchor',
1130
+ 'moveToAnchor:' + anchor,
1131
+ settings[iframeId].iframe,
1132
+ iframeId
1133
+ );
1134
+ },
1135
+
1136
+ sendMessage: function (message) {
1137
+ message = JSON.stringify(message);
1138
+ trigger(
1139
+ 'Send Message',
1140
+ 'message:' + message,
1141
+ settings[iframeId].iframe,
1142
+ iframeId
1143
+ );
1144
+ }
1145
+ };
1146
+ }
1147
+ }
1148
+
1149
+ // We have to call trigger twice, as we can not be sure if all
1150
+ // iframes have completed loading when this code runs. The
1151
+ // event listener also catches the page changing in the iFrame.
1152
+ function init(msg) {
1153
+ function iFrameLoaded() {
1154
+ trigger('iFrame.onload', msg, iframe, undefined$1, true);
1155
+ checkReset();
1156
+ }
1157
+
1158
+ function createDestroyObserver(MutationObserver) {
1159
+ if (!iframe.parentNode) {
1160
+ return null
1161
+ }
1162
+
1163
+ var destroyObserver = new MutationObserver(function (mutations) {
1164
+ mutations.forEach(function (mutation) {
1165
+ var removedNodes = Array.prototype.slice.call(mutation.removedNodes); // Transform NodeList into an Array
1166
+ removedNodes.forEach(function (removedNode) {
1167
+ if (removedNode === iframe) {
1168
+ closeIFrame(iframe);
1169
+ }
1170
+ });
1171
+ });
1172
+ });
1173
+ destroyObserver.observe(iframe.parentNode, {
1174
+ childList: true
1175
+ });
1176
+ return destroyObserver
1177
+ }
1178
+
1179
+ var MutationObserver = getMutationObserver();
1180
+ if (MutationObserver) {
1181
+ destroyObserver = createDestroyObserver(MutationObserver);
1182
+ }
1183
+
1184
+ addEventListener(iframe, 'load', iFrameLoaded);
1185
+ trigger('init', msg, iframe, undefined$1, true);
1186
+ }
1187
+
1188
+ function checkOptions(options) {
1189
+ if ('object' !== typeof options) {
1190
+ throw new TypeError('Options is not an object')
1191
+ }
1192
+ }
1193
+
1194
+ function copyOptions(options) {
1195
+ // eslint-disable-next-line no-restricted-syntax
1196
+ for (var option in defaults) {
1197
+ if (Object.prototype.hasOwnProperty.call(defaults, option)) {
1198
+ settings[iframeId][option] = Object.prototype.hasOwnProperty.call(
1199
+ options,
1200
+ option
1201
+ )
1202
+ ? options[option]
1203
+ : defaults[option];
1204
+ }
1205
+ }
1206
+ }
1207
+
1208
+ function getTargetOrigin(remoteHost) {
1209
+ return '' === remoteHost ||
1210
+ null !== remoteHost.match(/^(about:blank|javascript:|file:\/\/)/)
1211
+ ? '*'
1212
+ : remoteHost
1213
+ }
1214
+
1215
+ function depricate(key) {
1216
+ var splitName = key.split('Callback');
1217
+
1218
+ if (splitName.length === 2) {
1219
+ var name =
1220
+ 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
1221
+ this[name] = this[key];
1222
+ delete this[key];
1223
+ warn(
1224
+ iframeId,
1225
+ "Deprecated: '" +
1226
+ key +
1227
+ "' has been renamed '" +
1228
+ name +
1229
+ "'. The old method will be removed in the next major version."
1230
+ );
1231
+ }
1232
+ }
1233
+
1234
+ function processOptions(options) {
1235
+ options = options || {};
1236
+
1237
+ settings[iframeId] = Object.create(null); // Protect against prototype attacks
1238
+ settings[iframeId].iframe = iframe;
1239
+ settings[iframeId].firstRun = true;
1240
+ settings[iframeId].remoteHost =
1241
+ iframe.src && iframe.src.split('/').slice(0, 3).join('/');
1242
+
1243
+ checkOptions(options);
1244
+ Object.keys(options).forEach(depricate, options);
1245
+ copyOptions(options);
1246
+
1247
+ if (settings[iframeId]) {
1248
+ settings[iframeId].targetOrigin =
1249
+ true === settings[iframeId].checkOrigin
1250
+ ? getTargetOrigin(settings[iframeId].remoteHost)
1251
+ : '*';
1252
+ }
1253
+ }
1254
+
1255
+ function beenHere() {
1256
+ return iframeId in settings && 'iFrameResizer' in iframe
1257
+ }
1258
+
1259
+ var iframeId = ensureHasId(iframe.id);
1260
+
1261
+ if (beenHere()) {
1262
+ warn(iframeId, 'Ignored iFrame, already setup.');
1263
+ } else {
1264
+ processOptions(options);
1265
+ setScrolling();
1266
+ setLimits();
1267
+ setupBodyMarginValues();
1268
+ init(createOutgoingMsg(iframeId));
1269
+ setupIFrameObject();
1270
+ }
1271
+ }
1272
+
1273
+ function debouce(fn, time) {
1274
+ if (null === timer) {
1275
+ timer = setTimeout(function () {
1276
+ timer = null;
1277
+ fn();
1278
+ }, time);
1279
+ }
1280
+ }
1281
+
1282
+ var frameTimer = {};
1283
+ function debounceFrameEvents(fn, time, frameId) {
1284
+ if (!frameTimer[frameId]) {
1285
+ frameTimer[frameId] = setTimeout(function () {
1286
+ frameTimer[frameId] = null;
1287
+ fn();
1288
+ }, time);
1289
+ }
1290
+ }
1291
+
1292
+ // Not testable in PhantomJS
1293
+ /* istanbul ignore next */
1294
+
1295
+ function fixHiddenIFrames() {
1296
+ function checkIFrames() {
1297
+ function checkIFrame(settingId) {
1298
+ function chkDimension(dimension) {
1299
+ return (
1300
+ '0px' ===
1301
+ (settings[settingId] && settings[settingId].iframe.style[dimension])
1302
+ )
1303
+ }
1304
+
1305
+ function isVisible(el) {
1306
+ return null !== el.offsetParent
1307
+ }
1308
+
1309
+ if (
1310
+ settings[settingId] &&
1311
+ isVisible(settings[settingId].iframe) &&
1312
+ (chkDimension('height') || chkDimension('width'))
1313
+ ) {
1314
+ trigger(
1315
+ 'Visibility change',
1316
+ 'resize',
1317
+ settings[settingId].iframe,
1318
+ settingId
1319
+ );
1320
+ }
1321
+ }
1322
+
1323
+ Object.keys(settings).forEach(function (key) {
1324
+ checkIFrame(key);
1325
+ });
1326
+ }
1327
+
1328
+ function mutationObserved(mutations) {
1329
+ log(
1330
+ 'window',
1331
+ 'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type
1332
+ );
1333
+ debouce(checkIFrames, 16);
1334
+ }
1335
+
1336
+ function createMutationObserver() {
1337
+ var target = document.querySelector('body'),
1338
+ config = {
1339
+ attributes: true,
1340
+ attributeOldValue: false,
1341
+ characterData: true,
1342
+ characterDataOldValue: false,
1343
+ childList: true,
1344
+ subtree: true
1345
+ },
1346
+ observer = new MutationObserver(mutationObserved);
1347
+
1348
+ observer.observe(target, config);
1349
+ }
1350
+
1351
+ var MutationObserver = getMutationObserver();
1352
+ if (MutationObserver) {
1353
+ createMutationObserver();
1354
+ }
1355
+ }
1356
+
1357
+ function resizeIFrames(event) {
1358
+ function resize() {
1359
+ sendTriggerMsg('Window ' + event, 'resize');
1360
+ }
1361
+
1362
+ log('window', 'Trigger event: ' + event);
1363
+ debouce(resize, 16);
1364
+ }
1365
+
1366
+ // Not testable in PhantomJS
1367
+ /* istanbul ignore next */
1368
+ function tabVisible() {
1369
+ function resize() {
1370
+ sendTriggerMsg('Tab Visible', 'resize');
1371
+ }
1372
+
1373
+ if ('hidden' !== document.visibilityState) {
1374
+ log('document', 'Trigger event: Visibility change');
1375
+ debouce(resize, 16);
1376
+ }
1377
+ }
1378
+
1379
+ function sendTriggerMsg(eventName, event) {
1380
+ function isIFrameResizeEnabled(iframeId) {
1381
+ return (
1382
+ settings[iframeId] &&
1383
+ 'parent' === settings[iframeId].resizeFrom &&
1384
+ settings[iframeId].autoResize &&
1385
+ !settings[iframeId].firstRun
1386
+ )
1387
+ }
1388
+
1389
+ Object.keys(settings).forEach(function (iframeId) {
1390
+ if (isIFrameResizeEnabled(iframeId)) {
1391
+ trigger(eventName, event, settings[iframeId].iframe, iframeId);
1392
+ }
1393
+ });
1394
+ }
1395
+
1396
+ function setupEventListeners() {
1397
+ addEventListener(window, 'message', iFrameListener);
1398
+
1399
+ addEventListener(window, 'resize', function () {
1400
+ resizeIFrames('resize');
1401
+ });
1402
+
1403
+ addEventListener(document, 'visibilitychange', tabVisible);
1404
+
1405
+ addEventListener(document, '-webkit-visibilitychange', tabVisible);
1406
+ }
1407
+
1408
+ function factory() {
1409
+ function init(options, element) {
1410
+ function chkType() {
1411
+ if (!element.tagName) {
1412
+ throw new TypeError('Object is not a valid DOM element')
1413
+ } else if ('IFRAME' !== element.tagName.toUpperCase()) {
1414
+ throw new TypeError(
1415
+ 'Expected <IFRAME> tag, found <' + element.tagName + '>'
1416
+ )
1417
+ }
1418
+ }
1419
+
1420
+ if (element) {
1421
+ chkType();
1422
+ setupIFrame(element, options);
1423
+ iFrames.push(element);
1424
+ }
1425
+ }
1426
+
1427
+ function warnDeprecatedOptions(options) {
1428
+ if (options && options.enablePublicMethods) {
1429
+ warn(
1430
+ 'enablePublicMethods option has been removed, public methods are now always available in the iFrame'
1431
+ );
1432
+ }
1433
+ }
1434
+
1435
+ var iFrames;
1436
+
1437
+ setupRequestAnimationFrame();
1438
+ setupEventListeners();
1439
+
1440
+ return function iFrameResizeF(options, target) {
1441
+ iFrames = []; // Only return iFrames past in on this call
1442
+
1443
+ warnDeprecatedOptions(options);
1444
+
1445
+ switch (typeof target) {
1446
+ case 'undefined':
1447
+ case 'string': {
1448
+ Array.prototype.forEach.call(
1449
+ document.querySelectorAll(target || 'iframe'),
1450
+ init.bind(undefined$1, options)
1451
+ );
1452
+ break
1453
+ }
1454
+
1455
+ case 'object': {
1456
+ init(options, target);
1457
+ break
1458
+ }
1459
+
1460
+ default: {
1461
+ throw new TypeError('Unexpected data type (' + typeof target + ')')
1462
+ }
1463
+ }
1464
+
1465
+ return iFrames
1466
+ }
1467
+ }
1468
+
1469
+ function createJQueryPublicMethod($) {
1470
+ if (!$.fn) {
1471
+ info('', 'Unable to bind to jQuery, it is not fully loaded.');
1472
+ } else if (!$.fn.iFrameResize) {
1473
+ $.fn.iFrameResize = function $iFrameResizeF(options) {
1474
+ function init(index, element) {
1475
+ setupIFrame(element, options);
1476
+ }
1477
+
1478
+ return this.filter('iframe').each(init).end()
1479
+ };
1480
+ }
1481
+ }
1482
+
1483
+ if (window.jQuery !== undefined$1) {
1484
+ createJQueryPublicMethod(window.jQuery);
1485
+ }
1486
+
1487
+ if (typeof undefined$1 === 'function' && undefined$1.amd) {
1488
+ undefined$1([], factory);
1489
+ } else {
1490
+ // Node for browserfy
1491
+ module.exports = factory();
1492
+ }
1493
+ window.iFrameResize = window.iFrameResize || factory();
1494
+ })();
1495
+ });
1496
+
1497
+ var iframeResizer_contentWindow = createCommonjsModule(function (module) {
1498
+ (function (undefined$1) {
1499
+ if (typeof window === 'undefined') return // don't run for server side render
1500
+
1501
+ var autoResize = true,
1502
+ base = 10,
1503
+ bodyBackground = '',
1504
+ bodyMargin = 0,
1505
+ bodyMarginStr = '',
1506
+ bodyObserver = null,
1507
+ bodyPadding = '',
1508
+ calculateWidth = false,
1509
+ doubleEventList = { resize: 1, click: 1 },
1510
+ eventCancelTimer = 128,
1511
+ firstRun = true,
1512
+ height = 1,
1513
+ heightCalcModeDefault = 'bodyOffset',
1514
+ heightCalcMode = heightCalcModeDefault,
1515
+ initLock = true,
1516
+ initMsg = '',
1517
+ inPageLinks = {},
1518
+ interval = 32,
1519
+ intervalTimer = null,
1520
+ logging = false,
1521
+ mouseEvents = false,
1522
+ msgID = '[iFrameSizer]', // Must match host page msg ID
1523
+ msgIdLen = msgID.length,
1524
+ myID = '',
1525
+ resetRequiredMethods = {
1526
+ max: 1,
1527
+ min: 1,
1528
+ bodyScroll: 1,
1529
+ documentElementScroll: 1
1530
+ },
1531
+ resizeFrom = 'child',
1532
+ target = window.parent,
1533
+ targetOriginDefault = '*',
1534
+ tolerance = 0,
1535
+ triggerLocked = false,
1536
+ triggerLockedTimer = null,
1537
+ throttledTimer = 16,
1538
+ width = 1,
1539
+ widthCalcModeDefault = 'scroll',
1540
+ widthCalcMode = widthCalcModeDefault,
1541
+ win = window,
1542
+ onMessage = function () {
1543
+ warn('onMessage function not defined');
1544
+ },
1545
+ onReady = function () {},
1546
+ onPageInfo = function () {},
1547
+ customCalcMethods = {
1548
+ height: function () {
1549
+ warn('Custom height calculation function not defined');
1550
+ return document.documentElement.offsetHeight
1551
+ },
1552
+ width: function () {
1553
+ warn('Custom width calculation function not defined');
1554
+ return document.body.scrollWidth
1555
+ }
1556
+ },
1557
+ eventHandlersByName = {},
1558
+ passiveSupported = false;
1559
+
1560
+ function noop() {}
1561
+
1562
+ try {
1563
+ var options = Object.create(
1564
+ {},
1565
+ {
1566
+ passive: {
1567
+ // eslint-disable-next-line getter-return
1568
+ get: function () {
1569
+ passiveSupported = true;
1570
+ }
1571
+ }
1572
+ }
1573
+ );
1574
+ window.addEventListener('test', noop, options);
1575
+ window.removeEventListener('test', noop, options);
1576
+ } catch (error) {
1577
+ /* */
1578
+ }
1579
+
1580
+ function addEventListener(el, evt, func, options) {
1581
+ el.addEventListener(evt, func, passiveSupported ? options || {} : false);
1582
+ }
1583
+
1584
+ function removeEventListener(el, evt, func) {
1585
+ el.removeEventListener(evt, func, false);
1586
+ }
1587
+
1588
+ function capitalizeFirstLetter(string) {
1589
+ return string.charAt(0).toUpperCase() + string.slice(1)
1590
+ }
1591
+
1592
+ // Based on underscore.js
1593
+ function throttle(func) {
1594
+ var context,
1595
+ args,
1596
+ result,
1597
+ timeout = null,
1598
+ previous = 0,
1599
+ later = function () {
1600
+ previous = Date.now();
1601
+ timeout = null;
1602
+ result = func.apply(context, args);
1603
+ if (!timeout) {
1604
+ // eslint-disable-next-line no-multi-assign
1605
+ context = args = null;
1606
+ }
1607
+ };
1608
+
1609
+ return function () {
1610
+ var now = Date.now();
1611
+
1612
+ if (!previous) {
1613
+ previous = now;
1614
+ }
1615
+
1616
+ var remaining = throttledTimer - (now - previous);
1617
+
1618
+ context = this;
1619
+ args = arguments;
1620
+
1621
+ if (remaining <= 0 || remaining > throttledTimer) {
1622
+ if (timeout) {
1623
+ clearTimeout(timeout);
1624
+ timeout = null;
1625
+ }
1626
+
1627
+ previous = now;
1628
+ result = func.apply(context, args);
1629
+
1630
+ if (!timeout) {
1631
+ // eslint-disable-next-line no-multi-assign
1632
+ context = args = null;
1633
+ }
1634
+ } else if (!timeout) {
1635
+ timeout = setTimeout(later, remaining);
1636
+ }
1637
+
1638
+ return result
1639
+ }
1640
+ }
1641
+
1642
+ function formatLogMsg(msg) {
1643
+ return msgID + '[' + myID + '] ' + msg
1644
+ }
1645
+
1646
+ function log(msg) {
1647
+ if (logging && 'object' === typeof window.console) {
1648
+ // eslint-disable-next-line no-console
1649
+ console.log(formatLogMsg(msg));
1650
+ }
1651
+ }
1652
+
1653
+ function warn(msg) {
1654
+ if ('object' === typeof window.console) {
1655
+ // eslint-disable-next-line no-console
1656
+ console.warn(formatLogMsg(msg));
1657
+ }
1658
+ }
1659
+
1660
+ function init() {
1661
+ readDataFromParent();
1662
+ log('Initialising iFrame (' + window.location.href + ')');
1663
+ readDataFromPage();
1664
+ setMargin();
1665
+ setBodyStyle('background', bodyBackground);
1666
+ setBodyStyle('padding', bodyPadding);
1667
+ injectClearFixIntoBodyElement();
1668
+ checkHeightMode();
1669
+ checkWidthMode();
1670
+ stopInfiniteResizingOfIFrame();
1671
+ setupPublicMethods();
1672
+ setupMouseEvents();
1673
+ startEventListeners();
1674
+ inPageLinks = setupInPageLinks();
1675
+ sendSize('init', 'Init message from host page');
1676
+ onReady();
1677
+ }
1678
+
1679
+ function readDataFromParent() {
1680
+ function strBool(str) {
1681
+ return 'true' === str
1682
+ }
1683
+
1684
+ var data = initMsg.slice(msgIdLen).split(':');
1685
+
1686
+ myID = data[0];
1687
+ bodyMargin = undefined$1 === data[1] ? bodyMargin : Number(data[1]); // For V1 compatibility
1688
+ calculateWidth = undefined$1 === data[2] ? calculateWidth : strBool(data[2]);
1689
+ logging = undefined$1 === data[3] ? logging : strBool(data[3]);
1690
+ interval = undefined$1 === data[4] ? interval : Number(data[4]);
1691
+ autoResize = undefined$1 === data[6] ? autoResize : strBool(data[6]);
1692
+ bodyMarginStr = data[7];
1693
+ heightCalcMode = undefined$1 === data[8] ? heightCalcMode : data[8];
1694
+ bodyBackground = data[9];
1695
+ bodyPadding = data[10];
1696
+ tolerance = undefined$1 === data[11] ? tolerance : Number(data[11]);
1697
+ inPageLinks.enable = undefined$1 === data[12] ? false : strBool(data[12]);
1698
+ resizeFrom = undefined$1 === data[13] ? resizeFrom : data[13];
1699
+ widthCalcMode = undefined$1 === data[14] ? widthCalcMode : data[14];
1700
+ mouseEvents = undefined$1 === data[15] ? mouseEvents : strBool(data[15]);
1701
+ }
1702
+
1703
+ function depricate(key) {
1704
+ var splitName = key.split('Callback');
1705
+
1706
+ if (splitName.length === 2) {
1707
+ var name =
1708
+ 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
1709
+ this[name] = this[key];
1710
+ delete this[key];
1711
+ warn(
1712
+ "Deprecated: '" +
1713
+ key +
1714
+ "' has been renamed '" +
1715
+ name +
1716
+ "'. The old method will be removed in the next major version."
1717
+ );
1718
+ }
1719
+ }
1720
+
1721
+ function readDataFromPage() {
1722
+ function readData() {
1723
+ var data = window.iFrameResizer;
1724
+
1725
+ log('Reading data from page: ' + JSON.stringify(data));
1726
+ Object.keys(data).forEach(depricate, data);
1727
+
1728
+ onMessage = 'onMessage' in data ? data.onMessage : onMessage;
1729
+ onReady = 'onReady' in data ? data.onReady : onReady;
1730
+ targetOriginDefault =
1731
+ 'targetOrigin' in data ? data.targetOrigin : targetOriginDefault;
1732
+ heightCalcMode =
1733
+ 'heightCalculationMethod' in data
1734
+ ? data.heightCalculationMethod
1735
+ : heightCalcMode;
1736
+ widthCalcMode =
1737
+ 'widthCalculationMethod' in data
1738
+ ? data.widthCalculationMethod
1739
+ : widthCalcMode;
1740
+ }
1741
+
1742
+ function setupCustomCalcMethods(calcMode, calcFunc) {
1743
+ if ('function' === typeof calcMode) {
1744
+ log('Setup custom ' + calcFunc + 'CalcMethod');
1745
+ customCalcMethods[calcFunc] = calcMode;
1746
+ calcMode = 'custom';
1747
+ }
1748
+
1749
+ return calcMode
1750
+ }
1751
+
1752
+ if (
1753
+ 'iFrameResizer' in window &&
1754
+ Object === window.iFrameResizer.constructor
1755
+ ) {
1756
+ readData();
1757
+ heightCalcMode = setupCustomCalcMethods(heightCalcMode, 'height');
1758
+ widthCalcMode = setupCustomCalcMethods(widthCalcMode, 'width');
1759
+ }
1760
+
1761
+ log('TargetOrigin for parent set to: ' + targetOriginDefault);
1762
+ }
1763
+
1764
+ function chkCSS(attr, value) {
1765
+ if (-1 !== value.indexOf('-')) {
1766
+ warn('Negative CSS value ignored for ' + attr);
1767
+ value = '';
1768
+ }
1769
+ return value
1770
+ }
1771
+
1772
+ function setBodyStyle(attr, value) {
1773
+ if (undefined$1 !== value && '' !== value && 'null' !== value) {
1774
+ document.body.style[attr] = value;
1775
+ log('Body ' + attr + ' set to "' + value + '"');
1776
+ }
1777
+ }
1778
+
1779
+ function setMargin() {
1780
+ // If called via V1 script, convert bodyMargin from int to str
1781
+ if (undefined$1 === bodyMarginStr) {
1782
+ bodyMarginStr = bodyMargin + 'px';
1783
+ }
1784
+
1785
+ setBodyStyle('margin', chkCSS('margin', bodyMarginStr));
1786
+ }
1787
+
1788
+ function stopInfiniteResizingOfIFrame() {
1789
+ document.documentElement.style.height = '';
1790
+ document.body.style.height = '';
1791
+ log('HTML & body height set to "auto"');
1792
+ }
1793
+
1794
+ function manageTriggerEvent(options) {
1795
+ var listener = {
1796
+ add: function (eventName) {
1797
+ function handleEvent() {
1798
+ sendSize(options.eventName, options.eventType);
1799
+ }
1800
+
1801
+ eventHandlersByName[eventName] = handleEvent;
1802
+
1803
+ addEventListener(window, eventName, handleEvent, { passive: true });
1804
+ },
1805
+ remove: function (eventName) {
1806
+ var handleEvent = eventHandlersByName[eventName];
1807
+ delete eventHandlersByName[eventName];
1808
+
1809
+ removeEventListener(window, eventName, handleEvent);
1810
+ }
1811
+ };
1812
+
1813
+ if (options.eventNames && Array.prototype.map) {
1814
+ options.eventName = options.eventNames[0];
1815
+ options.eventNames.map(listener[options.method]);
1816
+ } else {
1817
+ listener[options.method](options.eventName);
1818
+ }
1819
+
1820
+ log(
1821
+ capitalizeFirstLetter(options.method) +
1822
+ ' event listener: ' +
1823
+ options.eventType
1824
+ );
1825
+ }
1826
+
1827
+ function manageEventListeners(method) {
1828
+ manageTriggerEvent({
1829
+ method: method,
1830
+ eventType: 'Animation Start',
1831
+ eventNames: ['animationstart', 'webkitAnimationStart']
1832
+ });
1833
+ manageTriggerEvent({
1834
+ method: method,
1835
+ eventType: 'Animation Iteration',
1836
+ eventNames: ['animationiteration', 'webkitAnimationIteration']
1837
+ });
1838
+ manageTriggerEvent({
1839
+ method: method,
1840
+ eventType: 'Animation End',
1841
+ eventNames: ['animationend', 'webkitAnimationEnd']
1842
+ });
1843
+ manageTriggerEvent({
1844
+ method: method,
1845
+ eventType: 'Input',
1846
+ eventName: 'input'
1847
+ });
1848
+ manageTriggerEvent({
1849
+ method: method,
1850
+ eventType: 'Mouse Up',
1851
+ eventName: 'mouseup'
1852
+ });
1853
+ manageTriggerEvent({
1854
+ method: method,
1855
+ eventType: 'Mouse Down',
1856
+ eventName: 'mousedown'
1857
+ });
1858
+ manageTriggerEvent({
1859
+ method: method,
1860
+ eventType: 'Orientation Change',
1861
+ eventName: 'orientationchange'
1862
+ });
1863
+ manageTriggerEvent({
1864
+ method: method,
1865
+ eventType: 'Print',
1866
+ eventNames: ['afterprint', 'beforeprint']
1867
+ });
1868
+ manageTriggerEvent({
1869
+ method: method,
1870
+ eventType: 'Ready State Change',
1871
+ eventName: 'readystatechange'
1872
+ });
1873
+ manageTriggerEvent({
1874
+ method: method,
1875
+ eventType: 'Touch Start',
1876
+ eventName: 'touchstart'
1877
+ });
1878
+ manageTriggerEvent({
1879
+ method: method,
1880
+ eventType: 'Touch End',
1881
+ eventName: 'touchend'
1882
+ });
1883
+ manageTriggerEvent({
1884
+ method: method,
1885
+ eventType: 'Touch Cancel',
1886
+ eventName: 'touchcancel'
1887
+ });
1888
+ manageTriggerEvent({
1889
+ method: method,
1890
+ eventType: 'Transition Start',
1891
+ eventNames: [
1892
+ 'transitionstart',
1893
+ 'webkitTransitionStart',
1894
+ 'MSTransitionStart',
1895
+ 'oTransitionStart',
1896
+ 'otransitionstart'
1897
+ ]
1898
+ });
1899
+ manageTriggerEvent({
1900
+ method: method,
1901
+ eventType: 'Transition Iteration',
1902
+ eventNames: [
1903
+ 'transitioniteration',
1904
+ 'webkitTransitionIteration',
1905
+ 'MSTransitionIteration',
1906
+ 'oTransitionIteration',
1907
+ 'otransitioniteration'
1908
+ ]
1909
+ });
1910
+ manageTriggerEvent({
1911
+ method: method,
1912
+ eventType: 'Transition End',
1913
+ eventNames: [
1914
+ 'transitionend',
1915
+ 'webkitTransitionEnd',
1916
+ 'MSTransitionEnd',
1917
+ 'oTransitionEnd',
1918
+ 'otransitionend'
1919
+ ]
1920
+ });
1921
+ if ('child' === resizeFrom) {
1922
+ manageTriggerEvent({
1923
+ method: method,
1924
+ eventType: 'IFrame Resized',
1925
+ eventName: 'resize'
1926
+ });
1927
+ }
1928
+ }
1929
+
1930
+ function checkCalcMode(calcMode, calcModeDefault, modes, type) {
1931
+ if (calcModeDefault !== calcMode) {
1932
+ if (!(calcMode in modes)) {
1933
+ warn(
1934
+ calcMode + ' is not a valid option for ' + type + 'CalculationMethod.'
1935
+ );
1936
+ calcMode = calcModeDefault;
1937
+ }
1938
+ log(type + ' calculation method set to "' + calcMode + '"');
1939
+ }
1940
+
1941
+ return calcMode
1942
+ }
1943
+
1944
+ function checkHeightMode() {
1945
+ heightCalcMode = checkCalcMode(
1946
+ heightCalcMode,
1947
+ heightCalcModeDefault,
1948
+ getHeight,
1949
+ 'height'
1950
+ );
1951
+ }
1952
+
1953
+ function checkWidthMode() {
1954
+ widthCalcMode = checkCalcMode(
1955
+ widthCalcMode,
1956
+ widthCalcModeDefault,
1957
+ getWidth,
1958
+ 'width'
1959
+ );
1960
+ }
1961
+
1962
+ function startEventListeners() {
1963
+ if (true === autoResize) {
1964
+ manageEventListeners('add');
1965
+ setupMutationObserver();
1966
+ } else {
1967
+ log('Auto Resize disabled');
1968
+ }
1969
+ }
1970
+
1971
+ // function stopMsgsToParent() {
1972
+ // log('Disable outgoing messages')
1973
+ // sendPermit = false
1974
+ // }
1975
+
1976
+ // function removeMsgListener() {
1977
+ // log('Remove event listener: Message')
1978
+ // removeEventListener(window, 'message', receiver)
1979
+ // }
1980
+
1981
+ function disconnectMutationObserver() {
1982
+ if (null !== bodyObserver) {
1983
+ /* istanbul ignore next */ // Not testable in PhantonJS
1984
+ bodyObserver.disconnect();
1985
+ }
1986
+ }
1987
+
1988
+ function stopEventListeners() {
1989
+ manageEventListeners('remove');
1990
+ disconnectMutationObserver();
1991
+ clearInterval(intervalTimer);
1992
+ }
1993
+
1994
+ // function teardown() {
1995
+ // stopMsgsToParent()
1996
+ // removeMsgListener()
1997
+ // if (true === autoResize) stopEventListeners()
1998
+ // }
1999
+
2000
+ function injectClearFixIntoBodyElement() {
2001
+ var clearFix = document.createElement('div');
2002
+ clearFix.style.clear = 'both';
2003
+ // Guard against the following having been globally redefined in CSS.
2004
+ clearFix.style.display = 'block';
2005
+ clearFix.style.height = '0';
2006
+ document.body.appendChild(clearFix);
2007
+ }
2008
+
2009
+ function setupInPageLinks() {
2010
+ function getPagePosition() {
2011
+ return {
2012
+ x:
2013
+ window.pageXOffset === undefined$1
2014
+ ? document.documentElement.scrollLeft
2015
+ : window.pageXOffset,
2016
+ y:
2017
+ window.pageYOffset === undefined$1
2018
+ ? document.documentElement.scrollTop
2019
+ : window.pageYOffset
2020
+ }
2021
+ }
2022
+
2023
+ function getElementPosition(el) {
2024
+ var elPosition = el.getBoundingClientRect(),
2025
+ pagePosition = getPagePosition();
2026
+
2027
+ return {
2028
+ x: parseInt(elPosition.left, 10) + parseInt(pagePosition.x, 10),
2029
+ y: parseInt(elPosition.top, 10) + parseInt(pagePosition.y, 10)
2030
+ }
2031
+ }
2032
+
2033
+ function findTarget(location) {
2034
+ function jumpToTarget(target) {
2035
+ var jumpPosition = getElementPosition(target);
2036
+
2037
+ log(
2038
+ 'Moving to in page link (#' +
2039
+ hash +
2040
+ ') at x: ' +
2041
+ jumpPosition.x +
2042
+ ' y: ' +
2043
+ jumpPosition.y
2044
+ );
2045
+ sendMsg(jumpPosition.y, jumpPosition.x, 'scrollToOffset'); // X&Y reversed at sendMsg uses height/width
2046
+ }
2047
+
2048
+ var hash = location.split('#')[1] || location, // Remove # if present
2049
+ hashData = decodeURIComponent(hash),
2050
+ target =
2051
+ document.getElementById(hashData) ||
2052
+ document.getElementsByName(hashData)[0];
2053
+
2054
+ if (undefined$1 === target) {
2055
+ log(
2056
+ 'In page link (#' +
2057
+ hash +
2058
+ ') not found in iFrame, so sending to parent'
2059
+ );
2060
+ sendMsg(0, 0, 'inPageLink', '#' + hash);
2061
+ } else {
2062
+ jumpToTarget(target);
2063
+ }
2064
+ }
2065
+
2066
+ function checkLocationHash() {
2067
+ var hash = window.location.hash;
2068
+ var href = window.location.href;
2069
+
2070
+ if ('' !== hash && '#' !== hash) {
2071
+ findTarget(href);
2072
+ }
2073
+ }
2074
+
2075
+ function bindAnchors() {
2076
+ function setupLink(el) {
2077
+ function linkClicked(e) {
2078
+ e.preventDefault();
2079
+
2080
+ /* jshint validthis:true */
2081
+ findTarget(this.getAttribute('href'));
2082
+ }
2083
+
2084
+ if ('#' !== el.getAttribute('href')) {
2085
+ addEventListener(el, 'click', linkClicked);
2086
+ }
2087
+ }
2088
+
2089
+ Array.prototype.forEach.call(
2090
+ document.querySelectorAll('a[href^="#"]'),
2091
+ setupLink
2092
+ );
2093
+ }
2094
+
2095
+ function bindLocationHash() {
2096
+ addEventListener(window, 'hashchange', checkLocationHash);
2097
+ }
2098
+
2099
+ function initCheck() {
2100
+ // Check if page loaded with location hash after init resize
2101
+ setTimeout(checkLocationHash, eventCancelTimer);
2102
+ }
2103
+
2104
+ function enableInPageLinks() {
2105
+ /* istanbul ignore else */ // Not testable in phantonJS
2106
+ if (Array.prototype.forEach && document.querySelectorAll) {
2107
+ log('Setting up location.hash handlers');
2108
+ bindAnchors();
2109
+ bindLocationHash();
2110
+ initCheck();
2111
+ } else {
2112
+ warn(
2113
+ 'In page linking not fully supported in this browser! (See README.md for IE8 workaround)'
2114
+ );
2115
+ }
2116
+ }
2117
+
2118
+ if (inPageLinks.enable) {
2119
+ enableInPageLinks();
2120
+ } else {
2121
+ log('In page linking not enabled');
2122
+ }
2123
+
2124
+ return {
2125
+ findTarget: findTarget
2126
+ }
2127
+ }
2128
+
2129
+ function setupMouseEvents() {
2130
+ if (mouseEvents !== true) return
2131
+
2132
+ function sendMouse(e) {
2133
+ sendMsg(0, 0, e.type, e.screenY + ':' + e.screenX);
2134
+ }
2135
+
2136
+ function addMouseListener(evt, name) {
2137
+ log('Add event listener: ' + name);
2138
+ addEventListener(window.document, evt, sendMouse);
2139
+ }
2140
+
2141
+ addMouseListener('mouseenter', 'Mouse Enter');
2142
+ addMouseListener('mouseleave', 'Mouse Leave');
2143
+ }
2144
+
2145
+ function setupPublicMethods() {
2146
+ log('Enable public methods');
2147
+
2148
+ win.parentIFrame = {
2149
+ autoResize: function autoResizeF(resize) {
2150
+ if (true === resize && false === autoResize) {
2151
+ autoResize = true;
2152
+ startEventListeners();
2153
+ } else if (false === resize && true === autoResize) {
2154
+ autoResize = false;
2155
+ stopEventListeners();
2156
+ }
2157
+ sendMsg(0, 0, 'autoResize', JSON.stringify(autoResize));
2158
+ return autoResize
2159
+ },
2160
+
2161
+ close: function closeF() {
2162
+ sendMsg(0, 0, 'close');
2163
+ // teardown()
2164
+ },
2165
+
2166
+ getId: function getIdF() {
2167
+ return myID
2168
+ },
2169
+
2170
+ getPageInfo: function getPageInfoF(callback) {
2171
+ if ('function' === typeof callback) {
2172
+ onPageInfo = callback;
2173
+ sendMsg(0, 0, 'pageInfo');
2174
+ } else {
2175
+ onPageInfo = function () {};
2176
+ sendMsg(0, 0, 'pageInfoStop');
2177
+ }
2178
+ },
2179
+
2180
+ moveToAnchor: function moveToAnchorF(hash) {
2181
+ inPageLinks.findTarget(hash);
2182
+ },
2183
+
2184
+ reset: function resetF() {
2185
+ resetIFrame('parentIFrame.reset');
2186
+ },
2187
+
2188
+ scrollTo: function scrollToF(x, y) {
2189
+ sendMsg(y, x, 'scrollTo'); // X&Y reversed at sendMsg uses height/width
2190
+ },
2191
+
2192
+ scrollToOffset: function scrollToF(x, y) {
2193
+ sendMsg(y, x, 'scrollToOffset'); // X&Y reversed at sendMsg uses height/width
2194
+ },
2195
+
2196
+ sendMessage: function sendMessageF(msg, targetOrigin) {
2197
+ sendMsg(0, 0, 'message', JSON.stringify(msg), targetOrigin);
2198
+ },
2199
+
2200
+ setHeightCalculationMethod: function setHeightCalculationMethodF(
2201
+ heightCalculationMethod
2202
+ ) {
2203
+ heightCalcMode = heightCalculationMethod;
2204
+ checkHeightMode();
2205
+ },
2206
+
2207
+ setWidthCalculationMethod: function setWidthCalculationMethodF(
2208
+ widthCalculationMethod
2209
+ ) {
2210
+ widthCalcMode = widthCalculationMethod;
2211
+ checkWidthMode();
2212
+ },
2213
+
2214
+ setTargetOrigin: function setTargetOriginF(targetOrigin) {
2215
+ log('Set targetOrigin: ' + targetOrigin);
2216
+ targetOriginDefault = targetOrigin;
2217
+ },
2218
+
2219
+ size: function sizeF(customHeight, customWidth) {
2220
+ var valString =
2221
+ '' + (customHeight || '') + (customWidth ? ',' + customWidth : '');
2222
+ sendSize(
2223
+ 'size',
2224
+ 'parentIFrame.size(' + valString + ')',
2225
+ customHeight,
2226
+ customWidth
2227
+ );
2228
+ }
2229
+ };
2230
+ }
2231
+
2232
+ function initInterval() {
2233
+ if (0 !== interval) {
2234
+ log('setInterval: ' + interval + 'ms');
2235
+ intervalTimer = setInterval(function () {
2236
+ sendSize('interval', 'setInterval: ' + interval);
2237
+ }, Math.abs(interval));
2238
+ }
2239
+ }
2240
+
2241
+ // Not testable in PhantomJS
2242
+ /* istanbul ignore next */
2243
+ function setupBodyMutationObserver() {
2244
+ function addImageLoadListners(mutation) {
2245
+ function addImageLoadListener(element) {
2246
+ if (false === element.complete) {
2247
+ log('Attach listeners to ' + element.src);
2248
+ element.addEventListener('load', imageLoaded, false);
2249
+ element.addEventListener('error', imageError, false);
2250
+ elements.push(element);
2251
+ }
2252
+ }
2253
+
2254
+ if (mutation.type === 'attributes' && mutation.attributeName === 'src') {
2255
+ addImageLoadListener(mutation.target);
2256
+ } else if (mutation.type === 'childList') {
2257
+ Array.prototype.forEach.call(
2258
+ mutation.target.querySelectorAll('img'),
2259
+ addImageLoadListener
2260
+ );
2261
+ }
2262
+ }
2263
+
2264
+ function removeFromArray(element) {
2265
+ elements.splice(elements.indexOf(element), 1);
2266
+ }
2267
+
2268
+ function removeImageLoadListener(element) {
2269
+ log('Remove listeners from ' + element.src);
2270
+ element.removeEventListener('load', imageLoaded, false);
2271
+ element.removeEventListener('error', imageError, false);
2272
+ removeFromArray(element);
2273
+ }
2274
+
2275
+ function imageEventTriggered(event, type, typeDesc) {
2276
+ removeImageLoadListener(event.target);
2277
+ sendSize(type, typeDesc + ': ' + event.target.src);
2278
+ }
2279
+
2280
+ function imageLoaded(event) {
2281
+ imageEventTriggered(event, 'imageLoad', 'Image loaded');
2282
+ }
2283
+
2284
+ function imageError(event) {
2285
+ imageEventTriggered(event, 'imageLoadFailed', 'Image load failed');
2286
+ }
2287
+
2288
+ function mutationObserved(mutations) {
2289
+ sendSize(
2290
+ 'mutationObserver',
2291
+ 'mutationObserver: ' + mutations[0].target + ' ' + mutations[0].type
2292
+ );
2293
+
2294
+ // Deal with WebKit / Blink asyncing image loading when tags are injected into the page
2295
+ mutations.forEach(addImageLoadListners);
2296
+ }
2297
+
2298
+ function createMutationObserver() {
2299
+ var target = document.querySelector('body'),
2300
+ config = {
2301
+ attributes: true,
2302
+ attributeOldValue: false,
2303
+ characterData: true,
2304
+ characterDataOldValue: false,
2305
+ childList: true,
2306
+ subtree: true
2307
+ };
2308
+
2309
+ observer = new MutationObserver(mutationObserved);
2310
+
2311
+ log('Create body MutationObserver');
2312
+ observer.observe(target, config);
2313
+
2314
+ return observer
2315
+ }
2316
+
2317
+ var elements = [],
2318
+ MutationObserver =
2319
+ window.MutationObserver || window.WebKitMutationObserver,
2320
+ observer = createMutationObserver();
2321
+
2322
+ return {
2323
+ disconnect: function () {
2324
+ if ('disconnect' in observer) {
2325
+ log('Disconnect body MutationObserver');
2326
+ observer.disconnect();
2327
+ elements.forEach(removeImageLoadListener);
2328
+ }
2329
+ }
2330
+ }
2331
+ }
2332
+
2333
+ function setupMutationObserver() {
2334
+ var forceIntervalTimer = 0 > interval;
2335
+
2336
+ // Not testable in PhantomJS
2337
+ /* istanbul ignore if */ if (
2338
+ window.MutationObserver ||
2339
+ window.WebKitMutationObserver
2340
+ ) {
2341
+ if (forceIntervalTimer) {
2342
+ initInterval();
2343
+ } else {
2344
+ bodyObserver = setupBodyMutationObserver();
2345
+ }
2346
+ } else {
2347
+ log('MutationObserver not supported in this browser!');
2348
+ initInterval();
2349
+ }
2350
+ }
2351
+
2352
+ // document.documentElement.offsetHeight is not reliable, so
2353
+ // we have to jump through hoops to get a better value.
2354
+ function getComputedStyle(prop, el) {
2355
+ var retVal = 0;
2356
+ el = el || document.body; // Not testable in phantonJS
2357
+
2358
+ retVal = document.defaultView.getComputedStyle(el, null);
2359
+ retVal = null === retVal ? 0 : retVal[prop];
2360
+
2361
+ return parseInt(retVal, base)
2362
+ }
2363
+
2364
+ function chkEventThottle(timer) {
2365
+ if (timer > throttledTimer / 2) {
2366
+ throttledTimer = 2 * timer;
2367
+ log('Event throttle increased to ' + throttledTimer + 'ms');
2368
+ }
2369
+ }
2370
+
2371
+ // Idea from https://github.com/guardian/iframe-messenger
2372
+ function getMaxElement(side, elements) {
2373
+ var elementsLength = elements.length,
2374
+ elVal = 0,
2375
+ maxVal = 0,
2376
+ Side = capitalizeFirstLetter(side),
2377
+ timer = Date.now();
2378
+
2379
+ for (var i = 0; i < elementsLength; i++) {
2380
+ elVal =
2381
+ elements[i].getBoundingClientRect()[side] +
2382
+ getComputedStyle('margin' + Side, elements[i]);
2383
+ if (elVal > maxVal) {
2384
+ maxVal = elVal;
2385
+ }
2386
+ }
2387
+
2388
+ timer = Date.now() - timer;
2389
+
2390
+ log('Parsed ' + elementsLength + ' HTML elements');
2391
+ log('Element position calculated in ' + timer + 'ms');
2392
+
2393
+ chkEventThottle(timer);
2394
+
2395
+ return maxVal
2396
+ }
2397
+
2398
+ function getAllMeasurements(dimensions) {
2399
+ return [
2400
+ dimensions.bodyOffset(),
2401
+ dimensions.bodyScroll(),
2402
+ dimensions.documentElementOffset(),
2403
+ dimensions.documentElementScroll()
2404
+ ]
2405
+ }
2406
+
2407
+ function getTaggedElements(side, tag) {
2408
+ function noTaggedElementsFound() {
2409
+ warn('No tagged elements (' + tag + ') found on page');
2410
+ return document.querySelectorAll('body *')
2411
+ }
2412
+
2413
+ var elements = document.querySelectorAll('[' + tag + ']');
2414
+
2415
+ if (elements.length === 0) noTaggedElementsFound();
2416
+
2417
+ return getMaxElement(side, elements)
2418
+ }
2419
+
2420
+ function getAllElements() {
2421
+ return document.querySelectorAll('body *')
2422
+ }
2423
+
2424
+ var getHeight = {
2425
+ bodyOffset: function getBodyOffsetHeight() {
2426
+ return (
2427
+ document.body.offsetHeight +
2428
+ getComputedStyle('marginTop') +
2429
+ getComputedStyle('marginBottom')
2430
+ )
2431
+ },
2432
+
2433
+ offset: function () {
2434
+ return getHeight.bodyOffset() // Backwards compatibility
2435
+ },
2436
+
2437
+ bodyScroll: function getBodyScrollHeight() {
2438
+ return document.body.scrollHeight
2439
+ },
2440
+
2441
+ custom: function getCustomWidth() {
2442
+ return customCalcMethods.height()
2443
+ },
2444
+
2445
+ documentElementOffset: function getDEOffsetHeight() {
2446
+ return document.documentElement.offsetHeight
2447
+ },
2448
+
2449
+ documentElementScroll: function getDEScrollHeight() {
2450
+ return document.documentElement.scrollHeight
2451
+ },
2452
+
2453
+ max: function getMaxHeight() {
2454
+ return Math.max.apply(null, getAllMeasurements(getHeight))
2455
+ },
2456
+
2457
+ min: function getMinHeight() {
2458
+ return Math.min.apply(null, getAllMeasurements(getHeight))
2459
+ },
2460
+
2461
+ grow: function growHeight() {
2462
+ return getHeight.max() // Run max without the forced downsizing
2463
+ },
2464
+
2465
+ lowestElement: function getBestHeight() {
2466
+ return Math.max(
2467
+ getHeight.bodyOffset() || getHeight.documentElementOffset(),
2468
+ getMaxElement('bottom', getAllElements())
2469
+ )
2470
+ },
2471
+
2472
+ taggedElement: function getTaggedElementsHeight() {
2473
+ return getTaggedElements('bottom', 'data-iframe-height')
2474
+ }
2475
+ },
2476
+ getWidth = {
2477
+ bodyScroll: function getBodyScrollWidth() {
2478
+ return document.body.scrollWidth
2479
+ },
2480
+
2481
+ bodyOffset: function getBodyOffsetWidth() {
2482
+ return document.body.offsetWidth
2483
+ },
2484
+
2485
+ custom: function getCustomWidth() {
2486
+ return customCalcMethods.width()
2487
+ },
2488
+
2489
+ documentElementScroll: function getDEScrollWidth() {
2490
+ return document.documentElement.scrollWidth
2491
+ },
2492
+
2493
+ documentElementOffset: function getDEOffsetWidth() {
2494
+ return document.documentElement.offsetWidth
2495
+ },
2496
+
2497
+ scroll: function getMaxWidth() {
2498
+ return Math.max(getWidth.bodyScroll(), getWidth.documentElementScroll())
2499
+ },
2500
+
2501
+ max: function getMaxWidth() {
2502
+ return Math.max.apply(null, getAllMeasurements(getWidth))
2503
+ },
2504
+
2505
+ min: function getMinWidth() {
2506
+ return Math.min.apply(null, getAllMeasurements(getWidth))
2507
+ },
2508
+
2509
+ rightMostElement: function rightMostElement() {
2510
+ return getMaxElement('right', getAllElements())
2511
+ },
2512
+
2513
+ taggedElement: function getTaggedElementsWidth() {
2514
+ return getTaggedElements('right', 'data-iframe-width')
2515
+ }
2516
+ };
2517
+
2518
+ function sizeIFrame(
2519
+ triggerEvent,
2520
+ triggerEventDesc,
2521
+ customHeight,
2522
+ customWidth
2523
+ ) {
2524
+ function resizeIFrame() {
2525
+ height = currentHeight;
2526
+ width = currentWidth;
2527
+
2528
+ sendMsg(height, width, triggerEvent);
2529
+ }
2530
+
2531
+ function isSizeChangeDetected() {
2532
+ function checkTolarance(a, b) {
2533
+ var retVal = Math.abs(a - b) <= tolerance;
2534
+ return !retVal
2535
+ }
2536
+
2537
+ currentHeight =
2538
+ undefined$1 === customHeight ? getHeight[heightCalcMode]() : customHeight;
2539
+ currentWidth =
2540
+ undefined$1 === customWidth ? getWidth[widthCalcMode]() : customWidth;
2541
+
2542
+ return (
2543
+ checkTolarance(height, currentHeight) ||
2544
+ (calculateWidth && checkTolarance(width, currentWidth))
2545
+ )
2546
+ }
2547
+
2548
+ function isForceResizableEvent() {
2549
+ return !(triggerEvent in { init: 1, interval: 1, size: 1 })
2550
+ }
2551
+
2552
+ function isForceResizableCalcMode() {
2553
+ return (
2554
+ heightCalcMode in resetRequiredMethods ||
2555
+ (calculateWidth && widthCalcMode in resetRequiredMethods)
2556
+ )
2557
+ }
2558
+
2559
+ function logIgnored() {
2560
+ log('No change in size detected');
2561
+ }
2562
+
2563
+ function checkDownSizing() {
2564
+ if (isForceResizableEvent() && isForceResizableCalcMode()) {
2565
+ resetIFrame(triggerEventDesc);
2566
+ } else if (!(triggerEvent in { interval: 1 })) {
2567
+ logIgnored();
2568
+ }
2569
+ }
2570
+
2571
+ var currentHeight, currentWidth;
2572
+
2573
+ if (isSizeChangeDetected() || 'init' === triggerEvent) {
2574
+ lockTrigger();
2575
+ resizeIFrame();
2576
+ } else {
2577
+ checkDownSizing();
2578
+ }
2579
+ }
2580
+
2581
+ var sizeIFrameThrottled = throttle(sizeIFrame);
2582
+
2583
+ function sendSize(triggerEvent, triggerEventDesc, customHeight, customWidth) {
2584
+ function recordTrigger() {
2585
+ if (!(triggerEvent in { reset: 1, resetPage: 1, init: 1 })) {
2586
+ log('Trigger event: ' + triggerEventDesc);
2587
+ }
2588
+ }
2589
+
2590
+ function isDoubleFiredEvent() {
2591
+ return triggerLocked && triggerEvent in doubleEventList
2592
+ }
2593
+
2594
+ if (isDoubleFiredEvent()) {
2595
+ log('Trigger event cancelled: ' + triggerEvent);
2596
+ } else {
2597
+ recordTrigger();
2598
+ if (triggerEvent === 'init') {
2599
+ sizeIFrame(triggerEvent, triggerEventDesc, customHeight, customWidth);
2600
+ } else {
2601
+ sizeIFrameThrottled(
2602
+ triggerEvent,
2603
+ triggerEventDesc,
2604
+ customHeight,
2605
+ customWidth
2606
+ );
2607
+ }
2608
+ }
2609
+ }
2610
+
2611
+ function lockTrigger() {
2612
+ if (!triggerLocked) {
2613
+ triggerLocked = true;
2614
+ log('Trigger event lock on');
2615
+ }
2616
+ clearTimeout(triggerLockedTimer);
2617
+ triggerLockedTimer = setTimeout(function () {
2618
+ triggerLocked = false;
2619
+ log('Trigger event lock off');
2620
+ log('--');
2621
+ }, eventCancelTimer);
2622
+ }
2623
+
2624
+ function triggerReset(triggerEvent) {
2625
+ height = getHeight[heightCalcMode]();
2626
+ width = getWidth[widthCalcMode]();
2627
+
2628
+ sendMsg(height, width, triggerEvent);
2629
+ }
2630
+
2631
+ function resetIFrame(triggerEventDesc) {
2632
+ var hcm = heightCalcMode;
2633
+ heightCalcMode = heightCalcModeDefault;
2634
+
2635
+ log('Reset trigger event: ' + triggerEventDesc);
2636
+ lockTrigger();
2637
+ triggerReset('reset');
2638
+
2639
+ heightCalcMode = hcm;
2640
+ }
2641
+
2642
+ function sendMsg(height, width, triggerEvent, msg, targetOrigin) {
2643
+ function setTargetOrigin() {
2644
+ if (undefined$1 === targetOrigin) {
2645
+ targetOrigin = targetOriginDefault;
2646
+ } else {
2647
+ log('Message targetOrigin: ' + targetOrigin);
2648
+ }
2649
+ }
2650
+
2651
+ function sendToParent() {
2652
+ var size = height + ':' + width,
2653
+ message =
2654
+ myID +
2655
+ ':' +
2656
+ size +
2657
+ ':' +
2658
+ triggerEvent +
2659
+ (undefined$1 === msg ? '' : ':' + msg);
2660
+
2661
+ log('Sending message to host page (' + message + ')');
2662
+ target.postMessage(msgID + message, targetOrigin);
2663
+ }
2664
+
2665
+ {
2666
+ setTargetOrigin();
2667
+ sendToParent();
2668
+ }
2669
+ }
2670
+
2671
+ function receiver(event) {
2672
+ var processRequestFromParent = {
2673
+ init: function initFromParent() {
2674
+ initMsg = event.data;
2675
+ target = event.source;
2676
+
2677
+ init();
2678
+ firstRun = false;
2679
+ setTimeout(function () {
2680
+ initLock = false;
2681
+ }, eventCancelTimer);
2682
+ },
2683
+
2684
+ reset: function resetFromParent() {
2685
+ if (initLock) {
2686
+ log('Page reset ignored by init');
2687
+ } else {
2688
+ log('Page size reset by host page');
2689
+ triggerReset('resetPage');
2690
+ }
2691
+ },
2692
+
2693
+ resize: function resizeFromParent() {
2694
+ sendSize('resizeParent', 'Parent window requested size check');
2695
+ },
2696
+
2697
+ moveToAnchor: function moveToAnchorF() {
2698
+ inPageLinks.findTarget(getData());
2699
+ },
2700
+ inPageLink: function inPageLinkF() {
2701
+ this.moveToAnchor();
2702
+ }, // Backward compatibility
2703
+
2704
+ pageInfo: function pageInfoFromParent() {
2705
+ var msgBody = getData();
2706
+ log('PageInfoFromParent called from parent: ' + msgBody);
2707
+ onPageInfo(JSON.parse(msgBody));
2708
+ log(' --');
2709
+ },
2710
+
2711
+ message: function messageFromParent() {
2712
+ var msgBody = getData();
2713
+
2714
+ log('onMessage called from parent: ' + msgBody);
2715
+ // eslint-disable-next-line sonarjs/no-extra-arguments
2716
+ onMessage(JSON.parse(msgBody));
2717
+ log(' --');
2718
+ }
2719
+ };
2720
+
2721
+ function isMessageForUs() {
2722
+ return msgID === ('' + event.data).slice(0, msgIdLen) // ''+ Protects against non-string messages
2723
+ }
2724
+
2725
+ function getMessageType() {
2726
+ return event.data.split(']')[1].split(':')[0]
2727
+ }
2728
+
2729
+ function getData() {
2730
+ return event.data.slice(event.data.indexOf(':') + 1)
2731
+ }
2732
+
2733
+ function isMiddleTier() {
2734
+ return (
2735
+ (!(module.exports) &&
2736
+ 'iFrameResize' in window) ||
2737
+ (window.jQuery !== undefined$1 &&
2738
+ 'iFrameResize' in window.jQuery.prototype)
2739
+ )
2740
+ }
2741
+
2742
+ function isInitMsg() {
2743
+ // Test if this message is from a child below us. This is an ugly test, however, updating
2744
+ // the message format would break backwards compatibility.
2745
+ return event.data.split(':')[2] in { true: 1, false: 1 }
2746
+ }
2747
+
2748
+ function callFromParent() {
2749
+ var messageType = getMessageType();
2750
+
2751
+ if (messageType in processRequestFromParent) {
2752
+ processRequestFromParent[messageType]();
2753
+ } else if (!isMiddleTier() && !isInitMsg()) {
2754
+ warn('Unexpected message (' + event.data + ')');
2755
+ }
2756
+ }
2757
+
2758
+ function processMessage() {
2759
+ if (false === firstRun) {
2760
+ callFromParent();
2761
+ } else if (isInitMsg()) {
2762
+ processRequestFromParent.init();
2763
+ } else {
2764
+ log(
2765
+ 'Ignored message of type "' +
2766
+ getMessageType() +
2767
+ '". Received before initialization.'
2768
+ );
2769
+ }
2770
+ }
2771
+
2772
+ if (isMessageForUs()) {
2773
+ processMessage();
2774
+ }
2775
+ }
2776
+
2777
+ // Normally the parent kicks things off when it detects the iFrame has loaded.
2778
+ // If this script is async-loaded, then tell parent page to retry init.
2779
+ function chkLateLoaded() {
2780
+ if ('loading' !== document.readyState) {
2781
+ window.parent.postMessage('[iFrameResizerChild]Ready', '*');
2782
+ }
2783
+ }
2784
+
2785
+ // Setup if not already running
2786
+ if (!('iframeResizer' in window)) {
2787
+ window.iframeChildListener = function (data) {
2788
+ receiver({ data, sameDomian: true });
2789
+ };
2790
+ addEventListener(window, 'message', receiver);
2791
+ addEventListener(window, 'readystatechange', chkLateLoaded);
2792
+ chkLateLoaded();
2793
+ }
2794
+
2795
+
2796
+ })();
2797
+ });
2798
+
2799
+ var iframeResizer = {
2800
+ iframeResize: iframeResizer$1,
2801
+ iframeResizer: iframeResizer$1, // Backwards compatibility
2802
+ contentWindow: iframeResizer_contentWindow
2803
+ };
2804
+
2805
+ const stzhIframeCss = ".sc-stzh-iframe-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-iframe-h{display:none}.sc-stzh-iframe-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-iframe-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-iframe-h *.sc-stzh-iframe,.sc-stzh-iframe-h *.sc-stzh-iframe::before,.sc-stzh-iframe-h *.sc-stzh-iframe::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-iframe-h .has-focus.sc-stzh-iframe{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-iframe-h .stzh-fylingfocus-focused.sc-stzh-iframe{outline-style:none !important}.sc-stzh-iframe-h .stzh-fylingfocus-focused.sc-stzh-iframe::-moz-focus-inner{border:0 !important}.sc-stzh-iframe-h{position:relative}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=preview-logo]{width:100%}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=preview-image]{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text]{margin:0}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p{margin:0}.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p:not(:last-child){margin-bottom:var(--stzh-space-small)}@media screen and (min-width: 900px){.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p:not(:last-child){margin-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.sc-stzh-iframe-h .sc-stzh-iframe-s>[slot=cookiewall-text] p:not(:last-child){margin-bottom:var(--stzh-space-large)}}.stzh-iframe.sc-stzh-iframe{width:100%;height:100%}.stzh-iframe__iframe.sc-stzh-iframe{width:100%}.stzh-iframe__cookiewall.sc-stzh-iframe,.stzh-iframe__preview.sc-stzh-iframe{position:absolute;top:0;left:0;width:100%;height:100%}.stzh-iframe__iframe.sc-stzh-iframe,.stzh-iframe__preview.sc-stzh-iframe{border:none}.stzh-iframe__preview.sc-stzh-iframe,.stzh-iframe__cookiewall.sc-stzh-iframe{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--stzh-space-medium);visibility:hidden}.stzh-iframe__preview.is-visible.sc-stzh-iframe,.stzh-iframe__cookiewall.is-visible.sc-stzh-iframe{visibility:visible}.stzh-iframe__preview.sc-stzh-iframe{z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;background-color:var(--stzh-color-grey20)}.stzh-iframe__preview-image-wrapper.sc-stzh-iframe:not(:empty)+.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{display:none}.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{top:var(--stzh-space-xlarge);left:var(--stzh-space-xlarge);position:absolute;width:45%}@media screen and (min-width: 900px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{top:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{top:var(--stzh-space-xxxlarge)}}@media screen and (min-width: 900px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{left:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__preview-logo-wrapper.sc-stzh-iframe{left:var(--stzh-space-xxxlarge)}}.stzh-iframe__preview-run.sc-stzh-iframe{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background-color:var(--stzh-color-primary);color:var(--stzh-color-white);display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--stzh-form-input-small-height);height:var(--stzh-form-input-small-height);visibility:hidden;transition:background-color var(--stzh-base-transition-animation-speed)}.stzh-iframe__preview-run.is-visible.sc-stzh-iframe{visibility:visible}@media screen and (min-width: 900px){.stzh-iframe__preview-run.sc-stzh-iframe{width:var(--stzh-form-input-height);height:var(--stzh-form-input-height)}}.stzh-iframe__preview.sc-stzh-iframe:hover .stzh-iframe__preview-run.sc-stzh-iframe{background-color:var(--stzh-color-secondary60)}@media screen and (min-width: 900px){.stzh-iframe__preview-run-icon.sc-stzh-iframe{--size:var(--stzh-icon-size-large)}}.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-medium);padding-right:var(--stzh-space-medium);z-index:2;text-align:center;background-color:var(--stzh-color-black60op);color:var(--stzh-color-white)}@media screen and (min-width: 600px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-left:var(--stzh-space-xxlarge)}}@media screen and (min-width: 600px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-right:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-right:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall.sc-stzh-iframe{padding-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter);column-gap:var(--stzh-grid-gutter);display:grid;grid-template-areas:\". content content content content content content .\";grid-template-columns:repeat(8, minmax(0, 1fr));padding-left:0;padding-right:0}}@media screen and (min-width: 900px) and (min-width: 600px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-small);column-gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px) and (min-width: 900px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-medium);column-gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 900px) and (min-width: 1260px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-large);column-gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 900px) and (min-width: 1600px){.stzh-iframe__cookiewall.sc-stzh-iframe{-moz-column-gap:var(--stzh-grid-gutter-ultra);column-gap:var(--stzh-grid-gutter-ultra)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-content.sc-stzh-iframe{grid-area:content}}.stzh-iframe__cookiewall-text.sc-stzh-iframe{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);padding-top:var(--stzh-space-small);padding-bottom:var(--stzh-space-small);margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-top:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-top:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{padding-bottom:var(--stzh-space-large)}}@media screen and (min-width: 600px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{margin-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-iframe__cookiewall-text.sc-stzh-iframe{margin-bottom:var(--stzh-space-xxlarge)}}.stzh-iframe__cookiewall-close.sc-stzh-iframe{top:0;right:0;position:absolute;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;display:flex;align-items:center;justify-content:center;padding:var(--stzh-space-xsmall);background-color:transparent;color:var(--stzh-color-white);cursor:pointer}";
6
2806
 
7
2807
  const COOKIE_PREFIX_CONFIRM = "stzh-components-iframe-confirm";
8
2808
  let iframeCounter = 0;
@@ -18,24 +2818,25 @@ const StzhIframe = class {
18
2818
  this.iframeElement.focus();
19
2819
  this.updateFocus = false;
20
2820
  }
2821
+ this.initializeIframeResizing();
21
2822
  };
22
2823
  this.handleCookiewallCloseClick = () => {
23
2824
  this.updateFocus = true;
24
2825
  this.view = "preview";
25
2826
  this.stzhViewChange.emit({
26
2827
  component: "stzh-iframe",
27
- value: this.view
2828
+ value: this.view,
28
2829
  });
29
2830
  };
30
2831
  this.handleCookiewallConfirmClick = () => {
31
2832
  js_cookie.set(`${COOKIE_PREFIX_CONFIRM}-${this.cookie}`, "1", {
32
- expires: this.cookieExpires || null
2833
+ expires: this.cookieExpires || null,
33
2834
  });
34
2835
  this.updateFocus = true;
35
2836
  this.view = "iframe";
36
2837
  this.stzhViewChange.emit({
37
2838
  component: "stzh-iframe",
38
- value: this.view
2839
+ value: this.view,
39
2840
  });
40
2841
  };
41
2842
  this.handlePreviewClick = () => {
@@ -49,18 +2850,21 @@ const StzhIframe = class {
49
2850
  }
50
2851
  this.stzhViewChange.emit({
51
2852
  component: "stzh-iframe",
52
- value: this.view
2853
+ value: this.view,
53
2854
  });
54
2855
  };
55
2856
  this.localization = undefined;
56
2857
  this.iframeId = undefined;
57
2858
  this.iframeErrorText = undefined;
2859
+ this.iframeResizerVariant = "None";
2860
+ this.iframeResizerHeightCorrection = undefined;
2861
+ this.iframeResizerSecondlevelDomain = undefined;
58
2862
  this.name = undefined;
59
2863
  this.sandbox = undefined;
60
2864
  this.referrerpolicy = undefined;
61
2865
  this.allow = "autoplay; fullscreen";
62
- this.width = undefined;
63
- this.height = undefined;
2866
+ this.width = "100%";
2867
+ this.height = "100%";
64
2868
  this.src = "";
65
2869
  this.cookie = undefined;
66
2870
  this.cookieExpires = 365;
@@ -86,13 +2890,70 @@ const StzhIframe = class {
86
2890
  this._src = null;
87
2891
  }
88
2892
  }
2893
+ initializeIframeResizing() {
2894
+ switch (this.iframeResizerVariant) {
2895
+ case "None":
2896
+ return;
2897
+ case "PostMessage":
2898
+ console.log("iFrameResizeModule", iframeResizer);
2899
+ iframeResizer.iframeResize({ log: getStzhEnvironment() !== StzhEnvironmentEnum.PROD, checkOrigin: false }, this.iframeElement);
2900
+ break;
2901
+ case "SameSecondLevelDomain":
2902
+ if (!this.iframeResizerSecondlevelDomain) {
2903
+ console.log("stzh-iframe:", "property 'iframeSecondlevelDomain' not filled out.");
2904
+ }
2905
+ this.setupIframeAutoSizing({
2906
+ frameId: this.iframeId,
2907
+ heightCorrection: this.iframeResizerHeightCorrection || 0,
2908
+ hasSameDomain: false,
2909
+ secondLevelDomain: this.iframeResizerSecondlevelDomain,
2910
+ });
2911
+ break;
2912
+ }
2913
+ }
2914
+ setupIframeAutoSizing(config) {
2915
+ const createResizer = (iframe, config) => {
2916
+ return () => {
2917
+ var _a;
2918
+ try {
2919
+ const newHeight = ((_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document.body.scrollHeight) || 0;
2920
+ if (newHeight > 0) {
2921
+ iframe.style.height = `${newHeight + config.heightCorrection}px`;
2922
+ }
2923
+ }
2924
+ catch (error) {
2925
+ console.warn("stzh-iframe:", "Resizing not possible, perhaps due to cross-domain restrictions:", error);
2926
+ }
2927
+ };
2928
+ };
2929
+ if (!config.hasSameDomain) {
2930
+ document.domain = config.secondLevelDomain;
2931
+ }
2932
+ const iframe = document.getElementById(config.frameId);
2933
+ if (!iframe) {
2934
+ console.error(`Iframe with ID ${config.frameId} not found`);
2935
+ return;
2936
+ }
2937
+ const resizer = createResizer(iframe, config);
2938
+ window.addEventListener("resize", resizer);
2939
+ iframe.addEventListener("load", resizer);
2940
+ iframe.addEventListener("blur", resizer);
2941
+ iframe.addEventListener("readystatechange", resizer); // hack for internet explorer...
2942
+ try {
2943
+ // this might go wrong on IE, if iframe hasn't fully loaded yet, but it doesn't matter.
2944
+ resizer();
2945
+ }
2946
+ catch (error) {
2947
+ console.warn("Initial resize failed, likely due to iframe not being fully loaded yet:", error);
2948
+ }
2949
+ }
89
2950
  async componentWillLoad() {
90
2951
  this.internalId = `stzh-iframe-${iframeCounter++}`;
91
2952
  const cookieAccepted = js_cookie.get(`${COOKIE_PREFIX_CONFIRM}-${this.cookie}`) || false;
92
- if (((!this.cookie || cookieAccepted) && (this.skipPreviewIfCookieAccepted || this.skipPreview))
93
- || (!this.cookie && this.skipPreview)) {
2953
+ if (((!this.cookie || cookieAccepted) && (this.skipPreviewIfCookieAccepted || this.skipPreview)) ||
2954
+ (!this.cookie && this.skipPreview)) {
94
2955
  this.stzhPreviewSkip.emit({
95
- component: "stzh-iframe"
2956
+ component: "stzh-iframe",
96
2957
  });
97
2958
  this.view = "iframe";
98
2959
  }
@@ -121,22 +2982,18 @@ const StzhIframe = class {
121
2982
  const classes = {
122
2983
  "stzh-iframe": true,
123
2984
  };
124
- return (h(Host, null, h("div", { class: classes }, this.view === "iframe" &&
125
- h("iframe", { id: this.iframeId, name: this.name, sandbox: this.sandbox, referrerPolicy: this.referrerpolicy, width: this.width, height: this.height, ref: (el) => (this.iframeElement = el), class: "stzh-iframe__iframe", src: this._src, allow: this.allow, onLoad: this.handleIframeLoad }, this.iframeErrorText), h("button", { ref: (el) => (this.previewButtonElement = el), onClick: this.handlePreviewClick, "aria-label": this.previewLabel || this.localization.defaultPreviewLabel,
2985
+ return (h(Host, null, h("div", { class: classes }, this.view === "iframe" && (h("iframe", { id: this.iframeId, name: this.name, sandbox: this.sandbox, referrerPolicy: this.referrerpolicy, width: this.width, height: this.height, ref: el => (this.iframeElement = el), class: "stzh-iframe__iframe", src: this._src, allow: this.allow, onLoad: this.handleIframeLoad }, this.iframeErrorText)), h("button", { ref: el => (this.previewButtonElement = el), onClick: this.handlePreviewClick, "aria-label": this.previewLabel || this.localization.defaultPreviewLabel,
126
2986
  // disabled={this.view === "cookiewall"}
127
2987
  class: {
128
2988
  "stzh-iframe__preview": true,
129
- "is-visible": this.view === "preview" || this.view === "cookiewall"
130
- } }, h("div", { class: "stzh-iframe__preview-image-wrapper" }, h("slot", { name: "preview-image" })), h("div", { class: "stzh-iframe__preview-logo-wrapper" }, h("slot", { name: "preview-logo" })), this.previewIcon &&
131
- h("div", { class: {
132
- "stzh-iframe__preview-run": true,
133
- "is-visible": this.view === "preview"
134
- } }, h("stzh-icon", { class: "stzh-iframe__preview-run-icon", name: this.previewIcon }))), this.cookie &&
135
- h("div", { class: {
136
- "stzh-iframe__cookiewall": true,
137
- "is-visible": this.view === "cookiewall"
138
- } }, h("div", { class: "stzh-iframe__cookiewall-content" }, h("div", { class: "stzh-iframe__cookiewall-text", id: `${this.internalId}-cookiewall-text` }, this.cookieConfirmText ? this.cookieConfirmText : h("slot", { name: "cookiewall-text" })), h("stzh-button", { ref: (el) => (this.confirmButtonElement = el), class: "stzh-iframe__cookiewall-button", size: "small", a11yDescribedby: `${this.internalId}-cookiewall-text`, icon: this.cookieConfirmIcon, label: this.cookieConfirmLabel || this.localization.defaultConfirmLabel, onClick: this.handleCookiewallConfirmClick })), !this.skipPreview &&
139
- h("button", { class: "stzh-iframe__cookiewall-close", onClick: this.handleCookiewallCloseClick, "aria-label": this.localization.confirmCloseLabel }, h("stzh-icon", { class: "stzh-iframe__cookiewall-close-icon", name: "close" }))))));
2989
+ "is-visible": this.view === "preview" || this.view === "cookiewall",
2990
+ } }, h("div", { class: "stzh-iframe__preview-image-wrapper" }, h("slot", { name: "preview-image" })), h("div", { class: "stzh-iframe__preview-logo-wrapper" }, h("slot", { name: "preview-logo" })), this.previewIcon && (h("div", { class: {
2991
+ "stzh-iframe__preview-run": true,
2992
+ "is-visible": this.view === "preview",
2993
+ } }, h("stzh-icon", { class: "stzh-iframe__preview-run-icon", name: this.previewIcon })))), this.cookie && (h("div", { class: {
2994
+ "stzh-iframe__cookiewall": true,
2995
+ "is-visible": this.view === "cookiewall",
2996
+ } }, h("div", { class: "stzh-iframe__cookiewall-content" }, h("div", { class: "stzh-iframe__cookiewall-text", id: `${this.internalId}-cookiewall-text` }, this.cookieConfirmText ? this.cookieConfirmText : h("slot", { name: "cookiewall-text" })), h("stzh-button", { ref: el => (this.confirmButtonElement = el), class: "stzh-iframe__cookiewall-button", size: "small", a11yDescribedby: `${this.internalId}-cookiewall-text`, icon: this.cookieConfirmIcon, label: this.cookieConfirmLabel || this.localization.defaultConfirmLabel, onClick: this.handleCookiewallConfirmClick })), !this.skipPreview && (h("button", { class: "stzh-iframe__cookiewall-close", onClick: this.handleCookiewallCloseClick, "aria-label": this.localization.confirmCloseLabel }, h("stzh-icon", { class: "stzh-iframe__cookiewall-close-icon", name: "close" }))))))));
140
2997
  }
141
2998
  get element() { return getElement(this); }
142
2999
  static get watchers() { return {