@pronto-tools-and-more/files 12.41.0 → 12.43.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. package/files/framework/src/default/storefront/buildInfo.json +4 -4
  2. package/files/framework/src/default/storefront/deep-link-landing/purple-deep-link-landing.js +1 -1
  3. package/files/framework/src/default/storefront/index.html +2 -2
  4. package/files/framework/src/default/storefront/modules/common.js +1 -1201
  5. package/files/framework/src/default/storefront/modules/main.js +1 -1
  6. package/files/framework/src/default/storefront/modules/styles.css +1 -1
  7. package/files/framework-latest/src/default/content/assets/FONTAWESOME_LICENSE.txt +34 -0
  8. package/files/framework-latest/src/default/content/assets/fonts/OpenSans-Bold.ttf +0 -0
  9. package/files/framework-latest/src/default/content/assets/fonts/OpenSans-BoldItalic.ttf +0 -0
  10. package/files/framework-latest/src/default/content/assets/fonts/OpenSans-ExtraBold.ttf +0 -0
  11. package/files/framework-latest/src/default/content/assets/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  12. package/files/framework-latest/src/default/content/assets/fonts/OpenSans-Italic.ttf +0 -0
  13. package/files/framework-latest/src/default/content/assets/fonts/OpenSans-Light.ttf +0 -0
  14. package/files/framework-latest/src/default/content/assets/fonts/OpenSans-LightItalic.ttf +0 -0
  15. package/files/framework-latest/src/default/content/assets/fonts/OpenSans-Regular.ttf +0 -0
  16. package/files/framework-latest/src/default/content/assets/fonts/OpenSans-SemiBold.ttf +0 -0
  17. package/files/framework-latest/src/default/content/assets/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  18. package/files/framework-latest/src/default/content/assets/fonts/RobotoSlab-Bold.ttf +0 -0
  19. package/files/framework-latest/src/default/content/assets/ic_arrow.svg +1 -0
  20. package/files/framework-latest/src/default/content/assets/ic_audio.svg +19 -0
  21. package/files/framework-latest/src/default/content/assets/ic_bookmark.svg +10 -0
  22. package/files/framework-latest/src/default/content/assets/ic_bookmark_active.svg +9 -0
  23. package/files/framework-latest/src/default/content/assets/ic_close.svg +16 -0
  24. package/files/framework-latest/src/default/content/assets/ic_download.svg +13 -0
  25. package/files/framework-latest/src/default/content/assets/ic_download_circle.svg +15 -0
  26. package/files/framework-latest/src/default/content/assets/ic_download_completed.svg +12 -0
  27. package/files/framework-latest/src/default/content/assets/ic_download_completed_circle.svg +12 -0
  28. package/files/framework-latest/src/default/content/assets/ic_downloading.svg +13 -0
  29. package/files/framework-latest/src/default/content/assets/ic_downloading_circle.svg +15 -0
  30. package/files/framework-latest/src/default/content/assets/ic_font_size.svg +1 -0
  31. package/files/framework-latest/src/default/content/assets/ic_left.svg +15 -0
  32. package/files/framework-latest/src/default/content/assets/ic_left_arrow.svg +11 -0
  33. package/files/framework-latest/src/default/content/assets/ic_night_mode.svg +20 -0
  34. package/files/framework-latest/src/default/content/assets/ic_night_mode_active.svg +20 -0
  35. package/files/framework-latest/src/default/content/assets/ic_overlay_loading.svg +13 -0
  36. package/files/framework-latest/src/default/content/assets/ic_pause.svg +19 -0
  37. package/files/framework-latest/src/default/content/assets/ic_play.svg +16 -0
  38. package/files/framework-latest/src/default/content/assets/ic_player.svg +19 -0
  39. package/files/framework-latest/src/default/content/assets/ic_player_active.svg +19 -0
  40. package/files/framework-latest/src/default/content/assets/ic_right.svg +15 -0
  41. package/files/framework-latest/src/default/content/assets/ic_right_arrow.svg +11 -0
  42. package/files/framework-latest/src/default/content/assets/ic_seek_back.svg +19 -0
  43. package/files/framework-latest/src/default/content/assets/ic_seek_forward.svg +19 -0
  44. package/files/framework-latest/src/default/content/assets/ic_settings.svg +16 -0
  45. package/files/framework-latest/src/default/content/assets/ic_share_android.svg +11 -0
  46. package/files/framework-latest/src/default/content/assets/ic_share_ios.svg +13 -0
  47. package/files/framework-latest/src/default/content/assets/ic_speech.svg +15 -0
  48. package/files/framework-latest/src/default/content/assets/ic_speech_female.svg +11 -0
  49. package/files/framework-latest/src/default/content/assets/ic_speech_male.svg +11 -0
  50. package/files/framework-latest/src/default/content/assets/ic_speech_rate.svg +11 -0
  51. package/files/framework-latest/src/default/content/assets/ic_toc.svg +22 -0
  52. package/files/framework-latest/src/default/content/assets/ic_video.svg +21 -0
  53. package/files/framework-latest/src/default/content/assets/ic_zoom.svg +1 -0
  54. package/files/framework-latest/src/default/content/assets/img/spinner.gif +0 -0
  55. package/files/framework-latest/src/default/content/assets/logo.png +0 -0
  56. package/files/framework-latest/src/default/content/assets/swiper/swiper-bundle.min.css +13 -0
  57. package/files/framework-latest/src/default/content/assets/swiper/swiper-bundle.min.js +1 -0
  58. package/files/framework-latest/src/default/content/assets/tail-spin.gif +0 -0
  59. package/files/framework-latest/src/default/content/assets/tail-spin.svg +32 -0
  60. package/files/framework-latest/src/default/content/core.css +29 -0
  61. package/files/framework-latest/src/default/content/core.js +10896 -0
  62. package/files/framework-latest/src/default/content/functions.css +2 -0
  63. package/files/framework-latest/src/default/content/functions.js +1 -0
  64. package/files/framework-latest/src/default/content/publish-press-author.css +407 -0
  65. package/files/framework-latest/src/default/content/publish-press-author.js +290 -0
  66. package/files/framework-latest/src/default/content/resources.json +1 -0
  67. package/files/framework-latest/src/default/content/theme.css +16 -0
  68. package/files/framework-latest/src/default/content/theme.js +720 -0
  69. package/files/framework-latest/src/default/content/tts.css +7 -0
  70. package/files/framework-latest/src/default/content/tts.js +5 -0
  71. package/files/framework-latest/src/default/content/uag.css +20 -0
  72. package/files/framework-latest/src/default/content/uag.js +166 -0
  73. package/files/framework-latest/src/default/info/css/style.css +328 -0
  74. package/files/framework-latest/src/default/info/font-awesome/HELP-US-OUT.txt +7 -0
  75. package/files/framework-latest/src/default/info/font-awesome/css/font-awesome.css +2337 -0
  76. package/files/framework-latest/src/default/info/font-awesome/css/font-awesome.min.css +4 -0
  77. package/files/framework-latest/src/default/info/font-awesome/fonts/FontAwesome.otf +0 -0
  78. package/files/framework-latest/src/default/info/font-awesome/fonts/fontawesome-webfont.eot +0 -0
  79. package/files/framework-latest/src/default/info/font-awesome/fonts/fontawesome-webfont.svg +2671 -0
  80. package/files/framework-latest/src/default/info/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
  81. package/files/framework-latest/src/default/info/font-awesome/fonts/fontawesome-webfont.woff +0 -0
  82. package/files/framework-latest/src/default/info/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
  83. package/files/framework-latest/src/default/info/font-awesome/less/animated.less +34 -0
  84. package/files/framework-latest/src/default/info/font-awesome/less/bordered-pulled.less +25 -0
  85. package/files/framework-latest/src/default/info/font-awesome/less/core.less +12 -0
  86. package/files/framework-latest/src/default/info/font-awesome/less/fixed-width.less +6 -0
  87. package/files/framework-latest/src/default/info/font-awesome/less/font-awesome.less +18 -0
  88. package/files/framework-latest/src/default/info/font-awesome/less/icons.less +789 -0
  89. package/files/framework-latest/src/default/info/font-awesome/less/larger.less +13 -0
  90. package/files/framework-latest/src/default/info/font-awesome/less/list.less +19 -0
  91. package/files/framework-latest/src/default/info/font-awesome/less/mixins.less +60 -0
  92. package/files/framework-latest/src/default/info/font-awesome/less/path.less +15 -0
  93. package/files/framework-latest/src/default/info/font-awesome/less/rotated-flipped.less +20 -0
  94. package/files/framework-latest/src/default/info/font-awesome/less/screen-reader.less +5 -0
  95. package/files/framework-latest/src/default/info/font-awesome/less/stacked.less +20 -0
  96. package/files/framework-latest/src/default/info/font-awesome/less/variables.less +800 -0
  97. package/files/framework-latest/src/default/info/font-awesome/scss/_animated.scss +34 -0
  98. package/files/framework-latest/src/default/info/font-awesome/scss/_bordered-pulled.scss +25 -0
  99. package/files/framework-latest/src/default/info/font-awesome/scss/_core.scss +12 -0
  100. package/files/framework-latest/src/default/info/font-awesome/scss/_fixed-width.scss +6 -0
  101. package/files/framework-latest/src/default/info/font-awesome/scss/_icons.scss +789 -0
  102. package/files/framework-latest/src/default/info/font-awesome/scss/_larger.scss +13 -0
  103. package/files/framework-latest/src/default/info/font-awesome/scss/_list.scss +19 -0
  104. package/files/framework-latest/src/default/info/font-awesome/scss/_mixins.scss +60 -0
  105. package/files/framework-latest/src/default/info/font-awesome/scss/_path.scss +15 -0
  106. package/files/framework-latest/src/default/info/font-awesome/scss/_rotated-flipped.scss +20 -0
  107. package/files/framework-latest/src/default/info/font-awesome/scss/_screen-reader.scss +5 -0
  108. package/files/framework-latest/src/default/info/font-awesome/scss/_stacked.scss +20 -0
  109. package/files/framework-latest/src/default/info/font-awesome/scss/_variables.scss +800 -0
  110. package/files/framework-latest/src/default/info/font-awesome/scss/font-awesome.scss +18 -0
  111. package/files/framework-latest/src/default/info/fonts/Roboto-Bold.ttf +0 -0
  112. package/files/framework-latest/src/default/info/fonts/Roboto-Italic.ttf +0 -0
  113. package/files/framework-latest/src/default/info/fonts/Roboto-Light.ttf +0 -0
  114. package/files/framework-latest/src/default/info/fonts/Roboto-LightItalic.ttf +0 -0
  115. package/files/framework-latest/src/default/info/fonts/Roboto-Medium.ttf +0 -0
  116. package/files/framework-latest/src/default/info/fonts/Roboto-MediumItalic.ttf +0 -0
  117. package/files/framework-latest/src/default/info/fonts/Roboto-Regular.ttf +0 -0
  118. package/files/framework-latest/src/default/info/img/banner.png +0 -0
  119. package/files/framework-latest/src/default/info/index.html +94 -0
  120. package/files/framework-latest/src/default/info/theme.css +181 -0
  121. package/files/framework-latest/src/default/menuicons/account.png +0 -0
  122. package/files/framework-latest/src/default/menuicons/account@2x.png +0 -0
  123. package/files/framework-latest/src/default/menuicons/account@3x.png +0 -0
  124. package/files/framework-latest/src/default/menuicons/bookmarks.png +0 -0
  125. package/files/framework-latest/src/default/menuicons/bookmarks@2x.png +0 -0
  126. package/files/framework-latest/src/default/menuicons/bookmarks@3x.png +0 -0
  127. package/files/framework-latest/src/default/menuicons/calendar.png +0 -0
  128. package/files/framework-latest/src/default/menuicons/calendar@2x.png +0 -0
  129. package/files/framework-latest/src/default/menuicons/calendar@3x.png +0 -0
  130. package/files/framework-latest/src/default/menuicons/chain.png +0 -0
  131. package/files/framework-latest/src/default/menuicons/chain@2x.png +0 -0
  132. package/files/framework-latest/src/default/menuicons/chain@3x.png +0 -0
  133. package/files/framework-latest/src/default/menuicons/feedback.png +0 -0
  134. package/files/framework-latest/src/default/menuicons/feedback@2x.png +0 -0
  135. package/files/framework-latest/src/default/menuicons/feedback@3x.png +0 -0
  136. package/files/framework-latest/src/default/menuicons/forum.png +0 -0
  137. package/files/framework-latest/src/default/menuicons/forum@2x.png +0 -0
  138. package/files/framework-latest/src/default/menuicons/forum@3x.png +0 -0
  139. package/files/framework-latest/src/default/menuicons/info.png +0 -0
  140. package/files/framework-latest/src/default/menuicons/kiosk.png +0 -0
  141. package/files/framework-latest/src/default/menuicons/kiosk@2x.png +0 -0
  142. package/files/framework-latest/src/default/menuicons/kiosk@3x.png +0 -0
  143. package/files/framework-latest/src/default/menuicons/legal.png +0 -0
  144. package/files/framework-latest/src/default/menuicons/legal@2x.png +0 -0
  145. package/files/framework-latest/src/default/menuicons/legal@3x.png +0 -0
  146. package/files/framework-latest/src/default/menuicons/login.png +0 -0
  147. package/files/framework-latest/src/default/menuicons/login@2x.png +0 -0
  148. package/files/framework-latest/src/default/menuicons/login@3x.png +0 -0
  149. package/files/framework-latest/src/default/menuicons/logout.png +0 -0
  150. package/files/framework-latest/src/default/menuicons/logout@2x.png +0 -0
  151. package/files/framework-latest/src/default/menuicons/logout@3x.png +0 -0
  152. package/files/framework-latest/src/default/menuicons/newsfeed.png +0 -0
  153. package/files/framework-latest/src/default/menuicons/newsfeed@2x.png +0 -0
  154. package/files/framework-latest/src/default/menuicons/newsfeed@3x.png +0 -0
  155. package/files/framework-latest/src/default/menuicons/newsstand.png +0 -0
  156. package/files/framework-latest/src/default/menuicons/newsstand@2x.png +0 -0
  157. package/files/framework-latest/src/default/menuicons/newsstand@3x.png +0 -0
  158. package/files/framework-latest/src/default/menuicons/purple.png +0 -0
  159. package/files/framework-latest/src/default/menuicons/purple@2x.png +0 -0
  160. package/files/framework-latest/src/default/menuicons/purple@3x.png +0 -0
  161. package/files/framework-latest/src/default/menuicons/restore.png +0 -0
  162. package/files/framework-latest/src/default/menuicons/restore@2x.png +0 -0
  163. package/files/framework-latest/src/default/menuicons/restore@3x.png +0 -0
  164. package/files/framework-latest/src/default/menuicons/settings.png +0 -0
  165. package/files/framework-latest/src/default/menuicons/share.png +0 -0
  166. package/files/framework-latest/src/default/menuicons/share@2x.png +0 -0
  167. package/files/framework-latest/src/default/menuicons/share@3x.png +0 -0
  168. package/files/framework-latest/src/default/menuicons/shop.png +0 -0
  169. package/files/framework-latest/src/default/menuicons/shop@2x.png +0 -0
  170. package/files/framework-latest/src/default/menuicons/shop@3x.png +0 -0
  171. package/files/framework-latest/src/default/menuicons/socialmedia.png +0 -0
  172. package/files/framework-latest/src/default/menuicons/socialmedia@2x.png +0 -0
  173. package/files/framework-latest/src/default/menuicons/socialmedia@3x.png +0 -0
  174. package/files/framework-latest/src/default/menuicons/subscriptions.png +0 -0
  175. package/files/framework-latest/src/default/menuicons/subscriptions@2x.png +0 -0
  176. package/files/framework-latest/src/default/menuicons/subscriptions@3x.png +0 -0
  177. package/files/framework-latest/src/default/menuicons/voucher.png +0 -0
  178. package/files/framework-latest/src/default/menuicons/voucher@2x.png +0 -0
  179. package/files/framework-latest/src/default/menuicons/voucher@3x.png +0 -0
  180. package/files/framework-latest/src/default/menuicons/website.png +0 -0
  181. package/files/framework-latest/src/default/menuicons/website@2x.png +0 -0
  182. package/files/framework-latest/src/default/menuicons/website@3x.png +0 -0
  183. package/files/framework-latest/src/default/onboarding/3rdpartylicenses.txt +574 -0
  184. package/files/framework-latest/src/default/onboarding/assets/config/message.json +7 -0
  185. package/files/framework-latest/src/default/onboarding/assets/config/onboarding.json +48 -0
  186. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_images/1_Welcome.png +0 -0
  187. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_images/2_MenuPhone.jpg +0 -0
  188. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_images/2_MenuTablet.jpg +0 -0
  189. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_images/3_NewsstandPhone.jpg +0 -0
  190. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_images/3_NewsstandTablet.jpg +0 -0
  191. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_images/4_PublicationPhone.jpg +0 -0
  192. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_images/4_PublicationTablet.jpg +0 -0
  193. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_images/5_NewsfeedPhone.jpg +0 -0
  194. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_images/5_NewsfeedTablet.jpg +0 -0
  195. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_images/6_FeaturesPhone.jpg +0 -0
  196. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_images/6_FeaturesTablet.jpg +0 -0
  197. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_videos/BLI_Cover-Image-Video_1.jpg +0 -0
  198. package/files/framework-latest/src/default/onboarding/assets/config/onboarding_videos/BLI_Cover-Image-Video_4.jpg +0 -0
  199. package/files/framework-latest/src/default/onboarding/assets/config/style.json +19 -0
  200. package/files/framework-latest/src/default/onboarding/assets/config/url.json +5 -0
  201. package/files/framework-latest/src/default/onboarding/assets/font/Ionicons/ionicons.ttf +0 -0
  202. package/files/framework-latest/src/default/onboarding/assets/font/OpenSans/OpenSans-Bold.ttf +0 -0
  203. package/files/framework-latest/src/default/onboarding/assets/font/OpenSans/OpenSans-BoldItalic.ttf +0 -0
  204. package/files/framework-latest/src/default/onboarding/assets/font/OpenSans/OpenSans-ExtraBold.ttf +0 -0
  205. package/files/framework-latest/src/default/onboarding/assets/font/OpenSans/OpenSans-ExtraBoldItalic.ttf +0 -0
  206. package/files/framework-latest/src/default/onboarding/assets/font/OpenSans/OpenSans-Italic.ttf +0 -0
  207. package/files/framework-latest/src/default/onboarding/assets/font/OpenSans/OpenSans-Light.ttf +0 -0
  208. package/files/framework-latest/src/default/onboarding/assets/font/OpenSans/OpenSans-LightItalic.ttf +0 -0
  209. package/files/framework-latest/src/default/onboarding/assets/font/OpenSans/OpenSans-Regular.ttf +0 -0
  210. package/files/framework-latest/src/default/onboarding/assets/font/OpenSans/OpenSans-SemiBold.ttf +0 -0
  211. package/files/framework-latest/src/default/onboarding/assets/font/OpenSans/OpenSans-SemiBoldItalic.ttf +0 -0
  212. package/files/framework-latest/src/default/onboarding/assets/font/fonts.css +73 -0
  213. package/files/framework-latest/src/default/onboarding/favicon.ico +0 -0
  214. package/files/framework-latest/src/default/onboarding/index.html +15 -0
  215. package/files/framework-latest/src/default/onboarding/main.js +1 -0
  216. package/files/framework-latest/src/default/onboarding/polyfills-es5.js +1 -0
  217. package/files/framework-latest/src/default/onboarding/polyfills.js +1 -0
  218. package/files/framework-latest/src/default/onboarding/runtime.js +1 -0
  219. package/files/framework-latest/src/default/onboarding/styles.css +1 -0
  220. package/files/framework-latest/src/default/onboarding/vendor.js +1 -0
  221. package/files/framework-latest/src/default/readmode/custom.js +40 -0
  222. package/files/framework-latest/src/default/readmode/ic_audio.svg +19 -0
  223. package/files/framework-latest/src/default/readmode/ic_close.svg +16 -0
  224. package/files/framework-latest/src/default/readmode/ic_font_size.svg +1 -0
  225. package/files/framework-latest/src/default/readmode/ic_night_mode.svg +20 -0
  226. package/files/framework-latest/src/default/readmode/ic_pause.svg +19 -0
  227. package/files/framework-latest/src/default/readmode/ic_play.svg +16 -0
  228. package/files/framework-latest/src/default/readmode/ic_speech.svg +15 -0
  229. package/files/framework-latest/src/default/readmode/ic_speech_female.svg +11 -0
  230. package/files/framework-latest/src/default/readmode/ic_speech_male.svg +11 -0
  231. package/files/framework-latest/src/default/storefront/3rdpartylicenses.txt +1065 -0
  232. package/files/framework-latest/src/default/storefront/assets/access.json +10 -0
  233. package/files/framework-latest/src/default/storefront/assets/banner/banner_not_found.jpg +0 -0
  234. package/files/framework-latest/src/default/storefront/assets/downloadOptions.json +1 -0
  235. package/files/framework-latest/src/default/storefront/assets/faq.html +87 -0
  236. package/files/framework-latest/src/default/storefront/assets/features.json +3 -0
  237. package/files/framework-latest/src/default/storefront/assets/generic-widget.json +1 -0
  238. package/files/framework-latest/src/default/storefront/assets/login.html +329 -0
  239. package/files/framework-latest/src/default/storefront/assets/submit.css +7 -0
  240. package/files/framework-latest/src/default/storefront/assets/subscription-benefits.json +11 -0
  241. package/files/framework-latest/src/default/storefront/assets/termsofuse.html +123 -0
  242. package/files/framework-latest/src/default/storefront/assets/tts_config.json +3 -0
  243. package/files/framework-latest/src/default/storefront/assets/urls.json +11 -0
  244. package/files/framework-latest/src/default/storefront/buildInfo.json +7 -0
  245. package/files/framework-latest/src/default/storefront/deep-link-landing/index.html +1 -0
  246. package/files/framework-latest/src/default/storefront/deep-link-landing/purple-deep-link-landing.js +842 -0
  247. package/files/framework-latest/src/default/storefront/deep-link-landing/purple-deep-link-landing.js.LICENSE.txt +13 -0
  248. package/files/framework-latest/src/default/storefront/index.html +22 -0
  249. package/files/framework-latest/src/default/storefront/modules/DS_logo.svg +1 -0
  250. package/files/framework-latest/src/default/storefront/modules/alphaMask.png +0 -0
  251. package/files/framework-latest/src/default/storefront/modules/btn_backward.png +0 -0
  252. package/files/framework-latest/src/default/storefront/modules/btn_first.png +0 -0
  253. package/files/framework-latest/src/default/storefront/modules/btn_forward.png +0 -0
  254. package/files/framework-latest/src/default/storefront/modules/btn_fullwidth.png +0 -0
  255. package/files/framework-latest/src/default/storefront/modules/btn_fullwidth_active.png +0 -0
  256. package/files/framework-latest/src/default/storefront/modules/btn_last.png +0 -0
  257. package/files/framework-latest/src/default/storefront/modules/btn_pin.png +0 -0
  258. package/files/framework-latest/src/default/storefront/modules/btn_toc.png +0 -0
  259. package/files/framework-latest/src/default/storefront/modules/btn_zoom.png +0 -0
  260. package/files/framework-latest/src/default/storefront/modules/btn_zoom_active.png +0 -0
  261. package/files/framework-latest/src/default/storefront/modules/common.js +1 -0
  262. package/files/framework-latest/src/default/storefront/modules/default-node_modules_angular_forms_fesm2022_forms_mjs.js +1 -0
  263. package/files/framework-latest/src/default/storefront/modules/default-projects_storefront_src_app_component_base-component_base-datacollection_component_ts-4706f8.js +1 -0
  264. package/files/framework-latest/src/default/storefront/modules/default-projects_storefront_src_app_component_content_content_module_ts.js +1 -0
  265. package/files/framework-latest/src/default/storefront/modules/default-projects_storefront_src_app_component_image_image_leandom_component_ts-projects_store-04fe61.js +1 -0
  266. package/files/framework-latest/src/default/storefront/modules/default-projects_storefront_src_app_component_image_image_leandom_component_ts-projects_store-571069.js +1 -0
  267. package/files/framework-latest/src/default/storefront/modules/default-projects_storefront_src_app_component_issue_issue_module_ts.js +1 -0
  268. package/files/framework-latest/src/default/storefront/modules/default-projects_storefront_src_app_service_tts_tts_service_ts.js +1 -0
  269. package/files/framework-latest/src/default/storefront/modules/ic_backward.svg +16 -0
  270. package/files/framework-latest/src/default/storefront/modules/ic_close.svg +16 -0
  271. package/files/framework-latest/src/default/storefront/modules/ic_forward.svg +16 -0
  272. package/files/framework-latest/src/default/storefront/modules/ic_fullscreen.png +0 -0
  273. package/files/framework-latest/src/default/storefront/modules/ic_fullscreen@2x.png +0 -0
  274. package/files/framework-latest/src/default/storefront/modules/ic_fullscreen@3x.png +0 -0
  275. package/files/framework-latest/src/default/storefront/modules/ic_overlay_loading.svg +13 -0
  276. package/files/framework-latest/src/default/storefront/modules/ic_pause.png +0 -0
  277. package/files/framework-latest/src/default/storefront/modules/ic_pause.svg +19 -0
  278. package/files/framework-latest/src/default/storefront/modules/ic_pause@2x.png +0 -0
  279. package/files/framework-latest/src/default/storefront/modules/ic_pause@3x.png +0 -0
  280. package/files/framework-latest/src/default/storefront/modules/ic_play.png +0 -0
  281. package/files/framework-latest/src/default/storefront/modules/ic_play.svg +16 -0
  282. package/files/framework-latest/src/default/storefront/modules/ic_play@2x.png +0 -0
  283. package/files/framework-latest/src/default/storefront/modules/ic_play@3x.png +0 -0
  284. package/files/framework-latest/src/default/storefront/modules/ic_player.svg +17 -0
  285. package/files/framework-latest/src/default/storefront/modules/ic_player_active.svg +17 -0
  286. package/files/framework-latest/src/default/storefront/modules/ic_refresh.svg +16 -0
  287. package/files/framework-latest/src/default/storefront/modules/ic_seek_back.svg +19 -0
  288. package/files/framework-latest/src/default/storefront/modules/ic_seek_forward.svg +19 -0
  289. package/files/framework-latest/src/default/storefront/modules/ic_settings.svg +16 -0
  290. package/files/framework-latest/src/default/storefront/modules/ic_smallscreen.png +0 -0
  291. package/files/framework-latest/src/default/storefront/modules/ic_smallscreen@2x.png +0 -0
  292. package/files/framework-latest/src/default/storefront/modules/ic_smallscreen@3x.png +0 -0
  293. package/files/framework-latest/src/default/storefront/modules/ic_speech.svg +15 -0
  294. package/files/framework-latest/src/default/storefront/modules/ic_speech_female.svg +11 -0
  295. package/files/framework-latest/src/default/storefront/modules/ic_speech_male.svg +11 -0
  296. package/files/framework-latest/src/default/storefront/modules/icon_close.png +0 -0
  297. package/files/framework-latest/src/default/storefront/modules/main.js +1 -0
  298. package/files/framework-latest/src/default/storefront/modules/node_modules_clientjs_dist_client_base_min_js.js +1 -0
  299. package/files/framework-latest/src/default/storefront/modules/node_modules_mustache_mustache_js.js +1 -0
  300. package/files/framework-latest/src/default/storefront/modules/node_modules_purple_web-player_dist_webPresenter_js_vendor_js.js +1 -0
  301. package/files/framework-latest/src/default/storefront/modules/node_modules_purple_web-player_dist_webPresenter_js_webPresenter_min_js.js +1 -0
  302. package/files/framework-latest/src/default/storefront/modules/polyfills.js +1 -0
  303. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_common-pipes_common-pipes_module_ts-projects_storefront_src_app_c-295cec.js +1 -0
  304. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_common-pipes_common-pipes_module_ts-projects_storefront_src_app_c-7956f0.js +1 -0
  305. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_common-pipes_common-pipes_module_ts-projects_storefront_src_app_c-94b9b6.js +1 -0
  306. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_action-executor_action-executor_module_ts.js +1 -0
  307. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_ad_ad_module_ts.js +1 -0
  308. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_app-menu-xml_app-menu-xml_module_ts.js +1 -0
  309. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_base-component_base-datacollection_component_ts-project-6cb588.js +1 -0
  310. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_bookmark_bookmark_module_ts.js +1 -0
  311. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_catalog-content_content-body_content-body_module_ts.js +1 -0
  312. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_catalog-content_content-featured-image_content-featured-c9ba26.js +1 -0
  313. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_category_category_module_ts.js +1 -0
  314. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_collection_collection_module_ts.js +1 -0
  315. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_component_module_ts.js +1 -0
  316. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_coupon_coupon_module_ts.js +1 -0
  317. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_dev-components_user-tag-testing_user-tag-testing_module_ts.js +1 -0
  318. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_download-issues_download-issues_module_ts.js +1 -0
  319. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_dropdown_dropdown_module_ts.js +1 -0
  320. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_embeddable-view_embeddable-view_module_ts.js +1 -0
  321. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_iframe_iframe_module_ts.js +1 -0
  322. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_issue-search-result_issue-search-result_module_ts.js +1 -0
  323. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_login_login_module_ts.js +1 -0
  324. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_menu_menu_module_ts.js +1 -0
  325. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_product_product_module_ts.js +1 -0
  326. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_publication-completion_publication-completion_module_ts.js +1 -0
  327. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_publication_publication_module_ts.js +1 -0
  328. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_recommendations_recommendations_module_ts.js +1 -0
  329. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_search-field_search-field_module_ts.js +1 -0
  330. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_subscription_subscription_module_ts.js +1 -0
  331. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_swiper_swiper_module_ts.js +1 -0
  332. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_ticker_ticker_module_ts.js +1 -0
  333. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_toggle_toggle_module_ts.js +1 -0
  334. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_toolbar_toolbar_module_ts.js +1 -0
  335. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_web-presenter_presenter_presenter_module_ts.js +1 -0
  336. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_component_widget_widget_module_ts.js +1 -0
  337. package/files/framework-latest/src/default/storefront/modules/projects_storefront_src_app_config_common_config_ts.js +1 -0
  338. package/files/framework-latest/src/default/storefront/modules/runtime.js +1 -0
  339. package/files/framework-latest/src/default/storefront/modules/styles.css +1 -0
  340. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ (self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["node_modules_purple_web-player_dist_webPresenter_js_webPresenter_min_js"],{7623:()=>{function PurplePlayer(e){return new PP.Player(e)}window.PP={NAME:"@purple/web-player",HOMEPAGE:"http://www.purplepublish.com",VERSION:"3.24.3",ZINDEX_VIEW:100,ZINDEX_TRANSITION:99,ZINDEX_ONHOLD:-1,FIT_INSIDE:"fitInside",MAGAZINE:"magazine",FIT_CONTAINER:"fitContainer",PDF:"pdf",OPEN_URL:"open",OPEN_FILE_URL:"openFile",OPEN_ACTION_URL:"openActionUrl",OPEN_WEB_URL:"openWebUrl",BTN_TARGET_TYPE_JUMPTOPAGE:"jumpToPage",CLOSE_ALL_POPUPS:"closeAllPopups",TOGGLE_POPUP:"togglePopup",BTN_TARGET_TYPE_SCENE:"jumpToScene",BTN_TARGET_TYPE_ELEMENT:"jumpToElement",NEXT_SCENE:"jumpToNextScene",PREVIOUS_SCENE:"jumpToPreviousScene",AUDIO_PLAY:"playAudio",AUDIO_PAUSE:"pauseAudio",AUDIO_STOP:"stopAudio",AUDIO_REWIND:"rewindAudio",SEEK_TO_SCENE:"sceneSeekTo",ANIMATION_END:"pp:animationend",POPUP_TOGGLE:"pp:popupToggle",ELEMENT_JUMP_TO:"pp:elementJumpTo",SCENE_JUMP_TO:"pp:sceneJumpTo",SCENE_JUMP_TO_NEXT:"pp:sceneJumpToNext",ALL_SCENES_PLAYED:"pp:allScenesPlayed",PLAYER_RESIZE:"pp:playerResize",PLAYER_JUMP_TO_PAGE:"pp:playerJumpToPage",SCROLLYTELLING_NEXT_PAGE:"pp:scrollyTellingNextPage",SCROLLYTELLING_JUMP_TO_PAGE:"pp:scrollyTellingJumpToPages",EXCLUDE_SHOW_PAGE:"pp:excludeShowPage",SEEK_TO:"pp:sceneSeekTo",TOC_OPEN:"pp:openToc",READY:"pp:ready",START:"pp:start",CONFIGURATION_LOADED:"pp:configurationLoaded",ASSETS_LOADED:"pp:assetsLoaded",PURPLEDIR:"",DEFAULT_PROJECT:"content",META_APP_ID:"app_id",META_ISSUE_ID:"issue_id",META_ISSUE_NAME:"issue_name",META_ISSUE_ALIAS:"issue_alias",META_ISSUE_PUB_DATE:"issue_pub_date",META_EXTERNAL_ISSUE_ID:"external_issue_id",META_PUBLICATION_ID:"publication_id",META_PUBLICATION_NAME:"publication_name",META_ENTITLEMENT_LOGIN:"entitlement_login",META_ENTITLEMENT_TOKEN:"entitlement_token",META_PAGE_ID:"page_id",META_PAGE_ALIAS:"page_alias",META_PAGE_LABEL:"page_label",META_PAGE_TITLE:"page_title",META_PAGE_INDEX:"page_index",META_PAGE_FILENAME:"page_filename",META_PAGE_NUMBER:"page_number",META_PLATFORM:"platform",META_LOCALE:"locale",META_MANAGER_BASE_URL:"manager_base_url",META_PREVIEW:"preview",META_DEVICE_OS:"device_os",DEFAULT_BREAKPOINTS:[{key:"phone",minScreenWidth:0},{key:"small_tablet",minScreenWidth:533},{key:"large_tablet",minScreenWidth:720}]},PP.i18n=new function(){function e(n,a){return a?n.replace(/\{(\d+)\}/g,function(){return a[arguments[1]]||"{"+arguments[1]+"}"}):n}var t={EXAMPLE:{de:"{0} und {1} macht {2}",en:"{0} and {1} makes {2}"},PAUSE:{de:"Pause",en:"Pause"},FULLSCREEN:{de:"Vollbild",en:"Fullscreen"},PLAY:{de:"Abspielen",en:"Play"},LOADING:{de:"Daten werden geladen",en:"Loading data"},RESOURCETYPE_image:{de:"Bild",en:"Image"},RESOURCETYPE_json:{de:"JSON",en:"JSON"},RESOURCETYPE_video:{de:"Video",en:"Video"},RESOURCETYPE_style:{de:"Layout-Daten",en:"Style"},UNSUPP_BROWSER_NO_FLASH:{de:"Ihr Browser wird nicht unterst\xfctzt und es ist kein Flash-Player installiert.",en:"Your browser is not supported and no Flash-Plugin is available."},WEBVIEW_PROBLEM:{de:"Der Webinhalt konnte nicht geladen werden. Bitte \xfcberpr\xfcfen Sie ihre Internetverbindung.",en:"Web content could not be loaded. Please check your internet connection."},TOC_TITLE:{de:"Inhaltsverzeichnis",en:"Table of contents"},PIN_ZOOM_TOOLTIP:{de:"Zoom Stufe festsetzen",en:"Fix zoom level"}},i="de",s="de";this.setLanguage=function(n){i=n},this.getLanguage=function(){return i},this.setDefaultLanguage=function(n){s=n},this.getDefaultLanguage=function(){return s},this.get=function(n,a){var o=t[n];return o?o[i]?e(o[i],a):o[s]?e(o[s],a):n:n},this.set=function(n,a,o){t[n]={de:a,en:o}}},PP.PKItem=function(e){var t,i,s,n,a,o,r,l,u,S=e.split("?")[0],f=e.split(":")[0],N="pkitem"===f;N&&(t=PP.Util.getUrlParameter("align",e),i=e.split("#")[1],s=S.split("//")[1].split("/")[0],n=S.split("//")[1].split("/")[1],r=S.split("//")[1].split("/")[2]),this.isPKItem=function(){return N},this.getProtocol=function(){return f},this.getElementID=function(){return i},this.getPageID=function(){return r},this.getPageAlias=function(){return l},this.getPageIndex=function(){return u},this.getIssue=function(){return n},this.getIssueAlias=function(){return a},this.getExternalIssueId=function(){return o},this.getAlign=function(){return t||"top_center"},this.getAuthority=function(){return s},this.setElementID=function(E){i=E},this.setPageID=function(E){r=E},this.setPageAlias=function(E){l=E},this.setPageIndex=function(E){u=E},this.setAlign=function(E){t=E},this.setProtocol=function(E){N="pkitem"===(f=E)},this.setIssueAlias=function(E){a=E},this.setExternalIssueId=function(E){o=E}},PP.PurpleLink=function(e){var t,i,s=e.split("?")[0],n=e.split(":")[0],a="purple"===n;a&&(t=PP.Util.getUrlParameter("align",e),i=e.split("#")[1]),this.getHref=function(){return s},this.getUri=function(){return e},this.isPurpleLink=function(){return a},this.getProtocol=function(){return n},this.getLevel=function(o){return s.split("//")[1].split("/")[o]},this.getAlign=function(){return t||"top_center"},this.getElementID=function(){return i}},PP.Util={isIOS:function(){return/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints},isAndroid:function(){return-1!==navigator.userAgent.toLowerCase().indexOf("android")},isFirefox:function(){return-1<navigator.userAgent.indexOf("Firefox")},isChrome:function(){return-1<navigator.userAgent.indexOf("Chrome")},isSafari:function(){var e=PP.Util.isChrome(),t=PP.Util.isAndroid(),i=PP.Util.isFirefox();return-1<navigator.userAgent.indexOf("Safari")&&!e&&!t&&!i},isUiWebView:function(){return/(iPhone|iPod|iPad).*AppleWebKit(?!.*Version)/i.test(navigator.userAgent)},isOpera:function(){return-1<navigator.userAgent.indexOf("Opera")},isIE:function(){return!!/MSIE 10/i.test(navigator.userAgent)||!(!/MSIE 9/i.test(navigator.userAgent)&&!/rv:11.0/i.test(navigator.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))},hasTouchSupport:function(){var e=!1;return(e="ontouchstart"in window||0<navigator.MaxTouchPoints||0<navigator.msMaxTouchPoints||e)&&!PP.Util.isIE()},pixelize:function(e){return parseInt(e)+"px"},purge:function(e){var t,i,s,n=e.attributes;if(n)for(t=n.length-1;0<=t;--t)"function"==typeof e.getAttribute(s=n[t].name)&&e.setAttribute(s,null);if(n=e.childNodes)for(i=n.length,t=0;t<i;t+=1)PP.Util.purge(e.childNodes[t])},isVisible:function(e){var t=$(e);if("hidden"!==t.css("visibility")&&"none"!==t.css("display")&&0<t.css("opacity")&&(!t.css("background-color")||PP.CSSParser.getOpacity(t.css("background-color")))&&0<=t.position().left+t.width()&&0<=t.position().top+t.height()&&t.position().left<=1024&&t.position().top<=1024&&0<t.width()&&0<t.height()){if(0<t.children().length){for(var i=!1,s=0;s<t.children().length;s++){var n=$(t.children()[s]);if(PP.Util.isVisible(n)){i=!0;break}}return!!i}return!0}return!1},deleteElement:function(e){e&&(PP.Util.purge(e[0]),e.unbind().html(""),e[0].parentNode.removeChild(e[0]))},getUrlParameter:function(e,t){for(var i=(t=(t=t||location.href).split("#")[0]).slice(t.indexOf("?")+1).split("&"),s=0;s<i.length;s++){var n=i[s].split("=");if(n[0]===e)return n[1]}},attachCSS:function(e){$("head").append('<link href="'+e+'" rel="stylesheet" id="purplePlayerStyles"/>'),$.get(e,function(t){var i=document.createElement("style"),s=(i.innerHTML="",t.match(/p\..*\{/g));if(s&&s.length){for(var a=0;a<s.length;a++){var o=s[a],r=(0<=(o=o.substring(0,o.indexOf("{"))).indexOf(" ")&&(o=o.substring(0,o.indexOf(" "))),t.indexOf(o)),l=(r=(r=t.substring(r)).substring(0,r.indexOf("}")+1)).indexOf("line-height");0<l&&(l=(r=r.substring(l+11)).substring(r.indexOf(":")+1,r.indexOf(";")),i.innerHTML+=o+" span:not(:empty){line-height:"+l+";}\n",i.innerHTML+=o+" span:not(:empty) span {line-height: 1;}\n"),i.innerHTML+=o+":not(:empty){line-height:0px;}\n"}document.head.appendChild(i)}})},getProjectPath:function(i){var t=i.resourcesDir;return"/"!==(t||((t=i.project)&&0!==t.indexOf("{{")||(t=this.getUrlParameter("project"))||console.error("No project found."),t=t||PP.DEFAULT_PROJECT),i=t).slice(-1)&&(i+="/"),i},isAbsolute:function(e){for(var t=["http://","https://"],i=0;i<t.length;i++)if(0===e.indexOf(t[i]))return!0;return!1},addSlash:function(e){return"/"!==e.slice(-1)&&(e+="/"),e},getScrollBarWidth:function(){var i,e=((i=document.createElement("p")).style.width="100%",i.style.height="200px",document.createElement("div")),t=(e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(i),document.body.appendChild(e),i.offsetWidth);return t===(e.style.overflow="scroll",i=i.offsetWidth)&&(i=e.clientWidth),document.body.removeChild(e),t-i},replaceAll:function(e,t,i){return e.replace(new RegExp(t,"g"),i)},sanitizeFormula:function(e){if(e){var t=e;if(0===(e=(e=(e=(e=(e=e.replace(/\s/g,"")).replace(/{{[a-zA-Z_$][0-9a-zA-Z_$]*}}/g,"")).replace(/\*|\+|\-|\//g,"")).replace(/\d+(\.(\d)+)?/g,"")).replace(/\(|\)/g,"")).length)return t.replace(/{|}/g,"")}},mapContentFitStrategy:function(e){return"fill-align-top"===e||"fill_align_top"===e||e===PP.MAGAZINE?PP.MAGAZINE:"fit_container"===e||"fit-container"===e||"fit_to_container"===e||"fit-to-container"===e||e===PP.FIT_CONTAINER?PP.FIT_CONTAINER:"pdf"===e?PP.PDF:PP.FIT_INSIDE},isImageTransparent:function(r,t,i){var s=document.createElement("CANVAS"),n=(document.body.appendChild(s),s.getContext("2d")),a=document.createElement("img"),o=(r=r.getAttribute("src"),(/\?/.test(r)?"&":"?")+"tmp="+(new Date).getTime());a.setAttribute("cross-origin","Anonymous"),a.setAttribute("src",r+o),s.setAttribute("width",a.width),s.setAttribute("height",a.height),n.drawImage(a,0,0),r=1;try{r=n.getImageData(i.offsetX,i.offsetY,1,1).data[3]}catch(l){}return s=null,r<=0},clickThroughElement:function(e,t,i){if(PP.Util.isIE()){$(e).css("display","none"),i.push(e);var s=document.elementFromPoint(t.clientX,t.clientY);if("none"!==$(s).css("pointer-events")){$(s).click();for(var n=i.length-1;0<=n;n--)$(i[n]).css("display","block")}else{var a=new jQuery.Event("click");a.clientX=t.clientX,a.clientY=t.clientY,a.offsetX=t.offsetX,a.offsetY=t.offsetY,$(s).css("display","none"),PP.Util.clickThroughElement(s,a,i)}}else $(e).css("pointer-events","none"),PP.Util.performClick(t),$(e).css("pointer-events","auto")},performClick:function(e){var t,i;PP.Util.hasTouchSupport()?(t=[{screenX:e.clientX,screenY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY}],i=new TouchEvent("touchstart",{touches:t}),document.elementFromPoint(e.clientX,e.clientY).dispatchEvent(i),i=new TouchEvent("touchend",{changedTouches:t}),document.elementFromPoint(e.clientX,e.clientY).dispatchEvent(i)):(t={clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,bubbles:!0},i=new MouseEvent("mousedown",t),document.elementFromPoint(e.clientX,e.clientY).dispatchEvent(i),i=new MouseEvent("mouseup",t),document.elementFromPoint(e.clientX,e.clientY).dispatchEvent(i))},postMessage:function(e,t,i,s,n){e.postMessage(JSON.stringify({callbackId:s,type:i,value:t,key:n}),"*")},receiveMessage:function(e){try{var t,i,s="object"==typeof e.data?e.data:JSON.parse(e.data);if(s.key&&s.type)switch(s.type){case"LOAD":PP.Util.postMessage(e.source,null,null,s.callbackId),$("pp-internal-browser-container .pp-reload").attr("disabled",!1),e.stopImmediatePropagation();break;case"CSS_URL":"purple-global-css"===s.key?PP.Util.postMessage(e.source,PP.externalConfig&&PP.externalConfig.globalFontsCss,null,s.callbackId):"purple-content-css"===s.key?PP.Util.postMessage(e.source,PP.externalConfig&&PP.externalConfig.contentCss,null,s.callbackId):PP.Util.postMessage(e.source,PP.externalConfig&&PP.externalConfig.fontsCss,null,s.callbackId),e.stopImmediatePropagation();break;case"RESOURCE_URL":PP.Util.postMessage(e.source,PP.externalUrlHandler(s.key),null,s.callbackId),e.stopImmediatePropagation();break;case"META":PP.Util.postMessage(e.source,PP.purple.metadata.getMetadata(s.key,null,s.pageId),s.type,s.callbackId),e.stopImmediatePropagation();break;case"STATE":s.value?(PP.purple.state.setState(s.key,s.value),e.stopImmediatePropagation()):"string"==typeof s.callbackId?(PP.Util.postMessage(e.source,PP.purple.state.getState(s.key,null),s.type,s.callbackId,s.key),e.stopImmediatePropagation()):s.value||"string"==typeof s.callbackId||(PP.purple.state.removeState(s.key),e.stopImmediatePropagation());break;case"ACTION_URL":var n=WP.instance.getCurrentPlayer();n.ctx.actionHandler.processAction({open:{URL:s.value}},null,n),e.stopImmediatePropagation();break;case"PAGES":PP.Util.postMessage(e.source,PP.purple.issue.getPages(),s.type,s.callbackId),e.stopImmediatePropagation();break;case"TOC":PP.Util.postMessage(e.source,PP.purple.issue.getToc(),s.type,s.callbackId),e.stopImmediatePropagation();break;case"ISSUE":if("PAGES"===s.key){PP.Util.postMessage(e.source,PP.purple.issue.getPages(),s.type,s.callbackId),e.stopImmediatePropagation();break}if("TOC"===s.key){PP.Util.postMessage(e.source,PP.purple.issue.getToc(),s.type,s.callbackId),e.stopImmediatePropagation();break}case"DOCUMENT_TITLE":$(".pp-internal-browser .pp-title").html(s.value),$(".pp-internal-browser .pp-reload").attr("disabled",!1),e.stopImmediatePropagation();break;case"CLOSE_VIEW":PP.purple.closeView(),e.stopImmediatePropagation();break;case"BROWSER":switch(s.key){case"DISPLAY_MODE":PP.Util.postMessage(e.source,PP.purple.appBrowser.getDisplayMode(),s.type,s.callbackId),e.stopImmediatePropagation();break;case"CONTROLS":PP.Util.postMessage(e.source,PP.purple.appBrowser.isControlsEnabled(),s.type,s.callbackId),e.stopImmediatePropagation();break;case"TITLE_BAR":PP.Util.postMessage(e.source,PP.purple.appBrowser.isTitleBarEnabled(),s.type,s.callbackId),e.stopImmediatePropagation();break;case"STATUS_BAR":PP.Util.postMessage(e.source,PP.purple.appBrowser.isStatusBarEnabled(),s.type,s.callbackId),e.stopImmediatePropagation()}break;case"TRACKING":switch(s.key){case"ACTION":PP.Util.Analytics.sendEvent(s.value.key,s.value.params),e.stopImmediatePropagation();break;case"VIEW":PP.Util.Analytics.sendView(s.value.key,s.value.params),e.stopImmediatePropagation();break;case"PURCHASE":PP.Util.Analytics.sendPurchase(s.value.key,s.value),e.stopImmediatePropagation()}case"RESIZE":s.webViewId&&(t="webView-"+s.webViewId,(i=document.getElementById(t))||((i=document.createElement("style")).id=t,document.head.appendChild(i)),i.innerHTML="@media print {#"+s.webViewId+" iframe {height: "+s.value+"px !important;}}");case"MEDIA":var a=PP.Util.getAudioContext();switch(s.key){case"START_AUDIO":a.src=s.value.url,a.title=s.value.displayName,a.playbackRate=parseFloat(a.getAttribute("playbackRate")),a.play().then(function(){},function(r){a.notifyFrames(function(l){PP.Util.postMessage(l,{displayName:a.title,url:a.src,playbackState:"ERROR",error:{code:a.error.code,message:a.error.message}},"AUDIO_STATUS",null,"AUDIO_STATUS")})}),e.stopImmediatePropagation();break;case"RESUME_AUDIO":a.play(),e.stopImmediatePropagation();break;case"PAUSE_AUDIO":a.pause(),e.stopImmediatePropagation();break;case"STOP_AUDIO":a.pause(),a.currentTime=0,a.src=null,a.title=null,a.sendStatus(e.source,"NONE"),a.sendProgress(e.source,-1,0),e.stopImmediatePropagation();break;case"SEEK_TO":a.currentTime=s.value/1e3,e.stopImmediatePropagation();break;case"RATE_AUDIO":s.value?(a.setAttribute("playbackRate",s.value),a.playbackRate=s.value):s.callbackId&&PP.Util.postMessage(e.source,parseFloat(a.getAttribute("playbackRate")),s.type,s.callbackId),e.stopImmediatePropagation();break;case"AUDIO_STATUS":var o="PLAYING";a.hasContent()?a.paused?o="READY":a.error&&(o="ERROR"):o="NONE",a.sendStatus(e.source,o),e.stopImmediatePropagation();break;case"AUDIO_PROGRESS":a.sendProgress(e.source,1e3*a.duration,1e3*a.currentTime),e.stopImmediatePropagation()}}}catch(r){console.log(r)}},isElementInViewport:function(e){for(var t=(e=$(e))[0].getBoundingClientRect(),i=t.left+t.width/2,s=t.top+t.height/2,n=e[0],a=[e[0]];"#document"!==n.parentNode.nodeName;)a.push(n.parentNode),n=n.parentNode;l=!0;for(var o=a.length-1;-1<o;o--){var r=a[o];if(r.clientHeight&&r.clientWidth){var l,u=r.getBoundingClientRect();if(!(l="none"!==r.style.display&&i>u.left&&i<u.right&&s>u.top&&s<u.bottom))break}}return l&&0<=s&&0<=i&&s<=(window.innerHeight||document.documentElement.clientHeight)&&i<=(window.innerWidth||document.documentElement.clientWidth)},getBreakPoint:function(e,t){for(var i,s=0;s<e.length;s++){var n=e[s];t>=n.minScreenWidth&&(i=n)}return i},getAudioContext:function(){var e=document.getElementById("purple-audio-context");return e||((e=document.createElement("audio")).id="purple-audio-context",document.body.append(e),e.notifyFrames=function(t){Array.from(window.frames).forEach(function(i){t(i)})},e.sendStatus=function(t,i){PP.Util.postMessage(t,{displayName:e.hasContent()?e.title:null,url:e.hasContent()?e.src:null,playbackState:i},"AUDIO_STATUS",null,"AUDIO_STATUS")},e.hasContent=function(){return!!e.src},e.sendProgress=function(t,i,s){PP.Util.postMessage(t,{currentTime:s,duration:isNaN(i)?-1:i},"AUDIO_PROGRESS",null,"AUDIO_PROGRESS")},e.addEventListener("playing",function(){e.error||e.notifyFrames(function(t){e.sendStatus(t,"PLAYING")})}),e.addEventListener("pause",function(){e.error||e.notifyFrames(function(t){e.sendStatus(t,e.src?"READY":"NONE")})}),e.addEventListener("timeupdate",function(){e.notifyFrames(function(t){e.sendProgress(t,1e3*e.duration,1e3*e.currentTime)})}),e.addEventListener("waiting",function(){e.notifyFrames(function(t){e.sendStatus(t,"LOADING")})})),e},debounce:function(e,t){var i;return function(){clearTimeout(i),i=setTimeout(function(){clearTimeout(i),e()},t)}}},PP.CSSParser={clean:function(e,t,i){var s,n,a,o={};return e&&(n=s=50,this.useDropShadow=t,this.useTextShadow=i,jQuery.each(e,function(r,l){switch(r){case"borderWidth":o.borderStyle="solid",o.borderWidth=parseFloat(l)+"px";break;case"borderColor":o.borderColor=PP.CSSParser.hexToRgba(l);break;case"borderRadius":o.borderRadius=parseFloat(l)+"px",o.webkitBorderRadius=parseFloat(l)+"px";break;case"backgroundColor":case"color":o[r]=PP.CSSParser.hexToRgba(l);break;case"x":o.left=parseFloat(l);break;case"y":o.top=parseFloat(l);break;case"height":case"width":case"paddingTop":case"paddingRight":case"paddingBottom":case"paddingLeft":o[r]=parseFloat(l);break;case"viewPosition":o["z-index"]=parseFloat(l);break;case"rotationCenterX":s=100*l;break;case"rotationCenterY":n=100*l;break;case"alpha":l<1&&(o.opacity=l);break;case"shadow":var u=this.createShadow(l,u=this.useDropShadow,i);jQuery.each(u,function(S,f){o[S]=f}.bind(o));break;default:"text/css"===e.type&&(o[r]=l)}}.bind(this)),50===s&&50===n||(o.transformOrigin=t=s+"% "+n+"%"),a=e.viewPosition,t=e.z)&&!a&&(o["z-index"]=parseFloat(t)),o},createShadow:function(e,t,i){var s={},n=e.shadowOffsetX+"px "+e.shadowOffsetY+"px "+e.shadowRadius+"px "+PP.CSSParser.HexAndOpacityToRgba(e.shadowColor,e.shadowOpacity);return t&&!0===t?(t="progid:DXImageTransform.Microsoft.Dropshadow(OffX="+e.shadowOffsetX+", OffY="+e.shadowOffsetY+', Color="'+e.shadowColor+'")',s["-webkit-filter"]="drop-shadow("+n+")",s["-moz-filter"]="drop-shadow("+n+")",s["-ms-filter"]=t,s.filter="drop-shadow("+n+")",s.boxShadow="",s.textShadow=""):i&&!0===i?(s["-webkit-filter"]="",s["-moz-filter"]="",s["-ms-filter"]="",s.filter="",s.boxShadow="",s.textShadow=n):(s["-webkit-filter"]="",s["-moz-filter"]="",s["-ms-filter"]="",s.filter="",s.boxShadow=n,s.textShadow=""),s},parseHex:function(e){var t={};return t.r=parseInt(e.substring(1,3),16),t.g=parseInt(e.substring(3,5),16),t.b=parseInt(e.substring(5,7),16),t.a=parseInt(e.substring(7,9),16)/255,t},hexToRgba:function(e){return e=this.parseHex(e),isNaN(e.a)&&(e.a=255),"rgba("+e.r+","+e.g+","+e.b+","+e.a+")"},HexAndOpacityToRgba:function(e,t){return void 0===t||(t=Math.floor(255*parseFloat(t)).toString(16),e=e.substr(0,7)+t),PP.CSSParser.hexToRgba(e)},isTransparent:function(e){var t=!1,i=document.createElement("canvas"),s=(i.setAttribute("width",100),i.setAttribute("height",100),i.setAttribute("style","display:none;"),i.setAttribute("class","pp-img-help-canvas"),document.body.appendChild(i),i.getContext("2d"));if(s.drawImage(e,0,0,100,100),void 0===i.getContext)return!1;for(var n=0;n<100;n++)for(var a=0;a<100;a++)if(0===s.getImageData(n,a,1,1).data[3]){t=!0;break}return $(".pp-img-help-canvas").remove(),t},isObjectInArray:function(e,t){return 0<=e.indexOf(t)},getOpacity:function(e){try{return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}catch(t){return 1}}},Function.prototype.bind||(Function.prototype.bind=function(e){var t=1<arguments.length?Array.prototype.splice.call(arguments,1):null,i=this;return function(){var s=arguments;return t&&(s=Array.prototype.concat.apply(t,arguments)),i.apply(e,s)}}),PP.Util.Timer=function(e,t){var i,s,n=t;this.pause=function(){window.clearTimeout(i),n-=new Date-s},this.resume=function(){s=new Date,window.clearTimeout(i),i=window.setTimeout(e,n)},this.clear=function(){window.clearTimeout(i)},this.isExpired=function(){return n<=0},this.resume()},PP.Util.Analytics={sendEvent:function(e,t){PP.externalConfig&&PP.externalConfig.analytics&&PP.externalConfig.analytics.sendEvent&&"function"==typeof PP.externalConfig.analytics.sendEvent&&PP.externalConfig.analytics.sendEvent(e,t)},sendView:function(e,t){PP.externalConfig&&PP.externalConfig.analytics&&PP.externalConfig.analytics.sendView&&"function"==typeof PP.externalConfig.analytics.sendView&&PP.externalConfig.analytics.sendView(e,t)},sendPurchase:function(e,t){PP.externalConfig&&PP.externalConfig.analytics&&PP.externalConfig.analytics.sendPurchase&&"function"==typeof PP.externalConfig.analytics.sendPurchase&&PP.externalConfig.analytics.sendPurchase(t)},sendPresenterPage:function(){var e,t,i,s;PP.purple&&PP.purple.metadata&&"WP"in window&&(e=PP.purple.metadata.getMetadata(PP.META_PAGE_ID),t=WP.instance.getPurpleData().getValidTocForPage({id:e}),i=PP.purple.metadata.getMetadata(PP.META_PUBLICATION_ID),s=PP.purple.metadata.getMetadata(PP.META_ISSUE_ID),s={CONTENT_ID:(i||"")+(i&&s?"/":"")+(i||""),CONTENT_NAME:PP.purple.metadata.getMetadata(PP.META_ISSUE_NAME),PAGE_ID:e,PAGE_ALIAS:PP.purple.metadata.getMetadata(PP.META_PAGE_ALIAS),PAGE_LABEL:PP.purple.metadata.getMetadata(PP.META_PAGE_LABEL),PAGE_INDEX:PP.purple.metadata.getMetadata(PP.META_PAGE_INDEX),PAGE_NUMBER:PP.purple.metadata.getMetadata(PP.META_PAGE_NUMBER),PAGE_TITLE:PP.purple.metadata.getMetadata(PP.META_PAGE_TITLE),PAGE_SECTION:t?t.section:""},PP.Util.Analytics.sendView(PP.Util.Analytics.VIEWS.PRESENTER_PAGE,s),PP.Util.Analytics.sendEvent(PP.Util.Analytics.EVENTS.PRESENTER_CONTENT_PAGE_OPENED,s))},sendPresenterContent:function(){var e,t;"purple"in window&&"WP"in window&&(e=PP.purple.metadata.getMetadata(PP.META_PUBLICATION_ID),t=PP.purple.metadata.getMetadata(PP.META_ISSUE_ID),PP.Util.Analytics.sendView(PP.Util.Analytics.VIEWS.PRESENTER_CONTENT,{CONTENT_ID:(e||"")+(e&&t?"/":"")+(e||""),CONTENT_NAME:PP.purple.metadata.getMetadata(PP.META_ISSUE_NAME)}),PP.Util.Analytics.sendEvent(PP.Util.Analytics.EVENTS.PRESENTER_ISSUE_CONTENT_OPENED,{CONTENT_ID:(e||"")+(e&&t?"/":"")+(e||""),CONTENT_NAME:PP.purple.metadata.getMetadata(PP.META_ISSUE_NAME)}))},sendOpenFailed:function(){var e,t;"purple"in window&&"WP"in window&&(e=PP.purple.metadata.getMetadata(PP.META_PUBLICATION_ID),t=PP.purple.metadata.getMetadata(PP.META_ISSUE_ID),PP.Util.Analytics.sendEvent(PP.Util.Analytics.EVENTS.PRESENTER_CONTENT_OPEN_FAILED,{CONTENT_ID:(e||"")+(e&&t?"/":"")+(e||""),CONTENT_NAME:PP.purple.metadata.getMetadata(PP.META_ISSUE_NAME)}))},sendUrlOpened:function(e){var t,i,s,n;"purple"in window&&"WP"in window&&(t=PP.purple.metadata.getMetadata(PP.META_PAGE_ID),i=WP.instance.getPurpleData().getValidTocForPage({id:t}),s=PP.purple.metadata.getMetadata(PP.META_PUBLICATION_ID),n=PP.purple.metadata.getMetadata(PP.META_ISSUE_ID),PP.Util.Analytics.sendEvent(PP.Util.Analytics.EVENTS.PRESENTER_CONTENT_URL_OPENED,{URL:e,CONTENT_ID:(s||"")+(s&&n?"/":"")+(s||""),CONTENT_NAME:PP.purple.metadata.getMetadata(PP.META_ISSUE_NAME),PAGE_ID:t,PAGE_ALIAS:PP.purple.metadata.getMetadata(PP.META_PAGE_ALIAS),PAGE_LABEL:PP.purple.metadata.getMetadata(PP.META_PAGE_LABEL),PAGE_INDEX:PP.purple.metadata.getMetadata(PP.META_PAGE_INDEX),PAGE_NUMBER:PP.purple.metadata.getMetadata(PP.META_PAGE_NUMBER),PAGE_TITLE:PP.purple.metadata.getMetadata(PP.META_PAGE_TITLE),PAGE_SECTION:i?i.section:""}))},EVENTS:{PRESENTER_CONTENT_TOC_OPENED:"PRESENTER_CONTENT_TOC_OPENED",PRESENTER_CONTENT_PREVIEW_TOC_OPENED:"PRESENTER_CONTENT_PREVIEW_TOC_OPENED",PRESENTER_ISSUE_CONTENT_OPENED:"PRESENTER_ISSUE_CONTENT_OPENED",PRESENTER_CONTENT_PAGE_OPENED:"PRESENTER_CONTENT_PAGE_OPENED",PRESENTER_CONTENT_OPEN_FAILED:"PRESENTER_CONTENT_OPEN_FAILED",PRESENTER_CONTENT_URL_OPENED:"PRESENTER_CONTENT_URL_OPENED"},VIEWS:{PRESENTER_PAGE:"PRESENTER_PAGE",PRESENTER_CONTENT:"PRESENTER_CONTENT",PRESENTER_CONTENT_TOC:"PRESENTER_CONTENT_TOC"}},function(){function e(h,P){for(var T=0,b=h.slice(Math.max(h.length-P,1)),x=0;x<b.length;x++)T+=b[x];return Math.ceil(T/P)}function t(h,P){this.el=h,this.$el=i(h),this.$contentEl=this.$el,this.$scrollContentEl=this.$el,this.props={vert:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetAttr:"top",overflowAttr:"overflow-y"},horiz:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetAttr:"left",overflowAttr:"overflow-x"}},this.tolerance=1,this.directions=["vert"],this.scrollDirection=this.directions[0],this.options=i.extend({},t.DEFAULTS,P),this.theme=this.options.css,this.init()}var i,s,n,a,o,r,l,u,S,f,N,E,w,g,m;i=window.jQuery,s=window,n=document,r="WebkitAppearance"in n.documentElement.style,l=[],f=!(u=[]),t.DEFAULTS={wrapContent:!0,autoHide:!0,css:{container:"simplebar",content:"simplebar-content",scrollContent:"simplebar-scroll-content",scrollbar:"simplebar-scrollbar",scrollbarTrack:"simplebar-track"}},E=!0,t.prototype.init=function(){var h;(o=PP.Util.getScrollBarWidth())&&0!==o||(o=20),this.directions=this.options.directions,this.scrollDirection=this.directions[0],this.scaleFactor=this.options.widget?this.options.widget.ctx.config.get("scaleFactor"):1,this.options.wrapContent&&this.$el.wrapInner('<div class="'+this.theme.scrollContent+'"><div class="'+this.theme.content+'"></div></div>'),this.$track={},this.$scrollbar={};for(var P=0;P<this.directions.length;P++)this.$el.prepend('<div class="'+this.theme.scrollbarTrack+" "+(h=this.directions[P])+'"><div class="'+this.theme.scrollbar+'"></div></div>'),this.$track[h]=this.$el.find("> ."+this.theme.scrollbarTrack+"."+h),this.$scrollbar[h]=this.$el.find("> ."+this.theme.scrollbarTrack+"."+h+" ."+this.theme.scrollbar);this.$scrollContentEl=this.$el.find("> ."+this.theme.scrollContent),this.$contentEl=this.$scrollContentEl.find("> ."+this.theme.content),this.resizeScrollContent(),this.$scrollContentEl.css("overflow","hidden");for(var T,b,x,C,c,d=0;d<this.directions.length;d++)this.$scrollContentEl.css(this.props[h=this.directions[d]].overflowAttr,"scroll");if(this.options.autoHide&&this.$el.on("mouseenter",i.proxy(this.flashScrollbar,this)),!0===this.options.paging)T=this.$scrollContentEl[0],b=i.proxy(this.mouseWheelHandler,this),C="",T.addEventListener?x="addEventListener":(x="attachEvent",C="on"),"DOMMouseScroll"==(c="onwheel"in n.createElement("div")?"wheel":n.onmousewheel!==a?"mousewheel":"DOMMouseScroll")?T[x](C+"MozMousePixelScroll",b,!1):T[x](C+c,b,!1),this.$scrollContentEl.on("mousedown touchstart",i.proxy(this.dragStartHandler,this)),this.$scrollContentEl.on("mousemove touchmove",i.proxy(this.dragMoveHandler,this)),this.$scrollContentEl.on("mouseup touchend mouseout",i.proxy(this.dragEndHandler,this)),this.$scrollContentEl.attr("tabindex",1).on("keydown",i.proxy(this.keyDownHandler,this));else for(this.$scrollContentEl.on("scroll touchmove",i.proxy(this.startScroll,this)),this.$scrollContentEl.on("touchstart",i.proxy(this.touchStart,this)),this.$scrollContentEl.on("touchend",i.proxy(this.touchEnd,this)),d=0;d<this.directions.length;d++)this.$scrollbar[this.directions[d]].on("mousedown touchstart",i.proxy(this.startDrag,this));this.resizeScrollbar(),this.hideScrollbar(!0),this.rightEdgeReached=!1,this.leftEdgeReached=!1},t.prototype.mouseWheelHandler=function(h){var P,x=(new Date).getTime(),T=("deltaX"in h&&"deltaY"in h?(-0!==h.deltaX&&0!==h.deltaX?(P=l,T="horiz"):-0!==h.deltaY&&0!==h.deltaY&&(P=u,T="vert"),b=-h.deltaY||-h.deltaX):"wheelDelta"in h&&(P=u,h.deltaY=b=-h.wheelDelta),-1<this.directions.indexOf(T)),b=(T&&(h.preventDefault?h.preventDefault():h.returnValue=!1),149<P.length&&P.shift(),P.push(Math.abs(b)),x-S);S=x,x=e(P=200<b?[]:P,10),e(P,70)<=x&&E&&T&&this.animateTo(h,!0)},t.prototype.dragStartHandler=function(h){this.$scrollContentEl[0].scrollWidth<=this.$scrollContentEl.width()||(1===h.button&&h.preventDefault(),N="touchstart"===h.type?{x:h.originalEvent.touches[0].pageX,y:h.originalEvent.touches[0].pageY}:{x:h.offsetX,y:h.offsetY},h.stopPropagation(),f=!0)},t.prototype.dragMoveHandler=function(h){var P;h.preventDefault(),f&&(100<(h="touchmove"===h.type?{x:h.originalEvent.touches[0].pageX,y:h.originalEvent.touches[0].pageY}:{x:h.offsetX,y:h.offsetY}).x-N.x?P={deltaX:-1,deltaY:0}:100<N.x-h.x?P={deltaX:1,deltaY:0}:100<h.y-N.y?P={deltaX:0,deltaY:-1}:100<N.y-h.y&&(P={deltaX:0,deltaY:1}),P)&&this.animateTo(P,!0)},t.prototype.dragEndHandler=function(h){f=!1},t.prototype.keyDownHandler=function(h){var P;switch(h.which){case 32:case 40:P={deltaX:0,deltaY:1};break;case 38:P={deltaX:0,deltaY:-1};break;case 39:P={deltaX:1,deltaY:0};break;case 37:P={deltaX:-1,deltaY:0}}P&&(this.animateTo(P,!0),h.stopPropagation(),h.preventDefault())},t.prototype.animateTo=function(h,P){var T,b,x,C,c;0!==h.deltaY&&-0!==h.deltaY&&-1<this.directions.indexOf("vert")?(T="scrollTop",b=parseFloat(this.options.widget.assetData.height),c=Math.ceil(this.$scrollContentEl.scrollTop()/b),C=this.options.widget.assetData.contentsHeight-b,b=0<h.deltaY?(c+1)*b:(c-1)*b,b=Math.min(b,C)):0!==h.deltaX&&-0!==h.deltaX&&-1<this.directions.indexOf("horiz")&&(T="scrollLeft",x=parseFloat(this.options.widget.assetData.width),c=Math.ceil(this.$scrollContentEl.scrollLeft()/x),C=this.options.widget.assetData.contentsWidth-x,b=0<h.deltaX?(c+1)*x:(c-1)*x,b=Math.min(b,C)),T&&(f=E=!1,b=Math.max(0,b),(c={})[T]=b,this.$scrollContentEl.animate(c,500,function(){this.options.widget.checkVideosPosition(h),this.showScrollbar(),setTimeout(function(){E=!0},50)}.bind(this)),P)&&(this.showScrollbar(),this.animateScrollbar("scrollTop"===T?"vert":"horiz",b))},t.prototype.startDrag=function(h){this.startedDrag=i(h.currentTarget),this.startedDrag.parent().hasClass("vert")?this.scrollDirection="vert":this.startedDrag.parent().hasClass("horiz")&&(this.scrollDirection="horiz"),h.preventDefault(),h.stopPropagation();var P=h.pageY;"horiz"===this.scrollDirection&&(P=h.pageX),this.dragOffset=P-this.$scrollbar[this.scrollDirection].offset()[this.props[this.scrollDirection].offsetAttr],i(n).on("mousemove",i.proxy(this.drag,this)),i(n).on("mouseup",i.proxy(this.endDrag,this))},t.prototype.drag=function(b){b.preventDefault(),b.stopPropagation();var P,T=b.pageY;"horiz"===this.scrollDirection&&(T=b.pageX),b=this.options.widget?this.options.widget.ctx.config.get("scaleFactor"):1,this.$el.hasClass("pp-popup")&&(b=this.options.widget.widget.currentScene.viewNode[0].offsetWidth/this.options.widget.widget.currentScene.viewNode[0].getBoundingClientRect().width),T=this.$el.hasClass("pp-stage")&&this.options.widget.currentScene&&this.options.widget.currentScene.viewNode?(P=(T-this.$track[this.scrollDirection].offset()[this.props[this.scrollDirection].offsetAttr]-this.dragOffset)/this.$track[this.scrollDirection][this.props[this.scrollDirection].sizeAttr](),this.options.widget.currentScene.viewNode[0][this.props[this.scrollDirection].scrollSizeAttr]/b):this.$el.hasClass("pp-popup")&&this.options.widget.widget.currentScene&&this.options.widget.widget.currentScene.viewNode?(P=(T-this.$track[this.scrollDirection].offset()[this.props[this.scrollDirection].offsetAttr]-this.dragOffset)/this.$track[this.scrollDirection][this.props[this.scrollDirection].sizeAttr](),this.options.widget.widget.currentScene.viewNode[0][this.props[this.scrollDirection].scrollSizeAttr]/b):(P=(T-this.$track[this.scrollDirection].offset()[this.props[this.scrollDirection].offsetAttr]-this.dragOffset)/this.$track[this.scrollDirection][this.props[this.scrollDirection].sizeAttr](),this.$contentEl[0][this.props[this.scrollDirection].scrollSizeAttr]/b),this.$scrollContentEl[this.props[this.scrollDirection].scrollOffsetAttr](b=P*T)},t.prototype.endDrag=function(){i(n).off("mousemove",this.drag),i(n).off("mouseup",this.endDrag)},t.prototype.resizeScrollbar=function(){if(0!==o){var h=this.options.widget?this.options.widget.ctx.config.get("scaleFactor"):1;this.$el.hasClass("pp-popup")&&this.options.widget.widget.currentScene&&(h=this.options.widget.widget.currentScene.viewNode[0].offsetWidth/this.options.widget.widget.currentScene.viewNode[0].getBoundingClientRect().width);for(var P=0;P<this.directions.length;P++){var T=this.directions[P],b=this.$scrollContentEl[this.props[T].scrollOffsetAttr](),x=this.$track[T][this.props[T].sizeAttr](),C=this.$el.hasClass("pp-stage")&&this.options.widget.currentScene&&this.options.widget.currentScene.viewNode?this.options.widget.currentScene.viewNode[this.props[T].sizeAttr]():this.$el.hasClass("pp-popup")&&this.options.widget.widget.currentScene&&this.options.widget.widget.currentScene.viewNode?this.options.widget.widget.currentScene.viewNode[this.props[T].sizeAttr]()/h:this.$contentEl[this.props[T].sizeAttr]();C-x>this.tolerance?(C=x/C,b=Math.round(C*b)+2,C=Math.floor(C*(x-2))-2,this.$scrollbar[T].css("horiz"===T?{left:b,width:C}:{top:b,height:C}),this.$track[T].show(),this.$scrollContentEl.css(this.props[T].overflowAttr,"scroll")):PP.Util.isIOS()||PP.Util.isAndroid()||(this.$track[T].hide(),this.$scrollContentEl.css(this.props[T].overflowAttr,"hidden")),"horiz"===T?this.$scrollbar[T].height(7/h):"vert"===T&&this.$scrollbar[T].width(7/h)}}},t.prototype.animateScrollbar=function(h,P){var T,b;-1<this.directions.indexOf(h)&&(b=this.options.widget?this.options.widget.ctx.config.get("scaleFactor"):1,b=(T=this.$track[h][this.props[h].sizeAttr]())/(this.$el.hasClass("pp-stage")&&this.options.widget.currentScene&&this.options.widget.currentScene.viewNode?this.options.widget.currentScene.viewNode[this.props[h].sizeAttr]():this.$el.hasClass("pp-popup")&&this.options.widget.widget.currentScene&&this.options.widget.widget.currentScene.viewNode?this.options.widget.widget.currentScene.viewNode[this.props[h].sizeAttr]()/b:this.$contentEl[this.props[h].sizeAttr]()),P=Math.round(b*P)+2,b=Math.floor(b*(T-2))-2,this.$scrollbar[h].animate("horiz"===h?{left:P,width:b}:{top:P,height:b}))},g=!(w={screenX:0,screenY:0}),t.prototype.touchStart=function(h){h.originalEvent.touches&&(w={screenX:(h=h.originalEvent.touches[0]).screenX,screenY:h.screenY},5<this.$scrollContentEl[0].scrollWidth-this.$scrollContentEl.width()&&(g=!0),this.rightEdgeReached=this.$scrollContentEl[0].scrollLeft>=(h=this.$scrollContentEl[0].scrollWidth-this.$scrollContentEl[0].clientWidth),this.leftEdgeReached=this.$scrollContentEl[0].scrollLeft<=0)},t.prototype.touchEnd=function(h){g=!1,w={screenX:0,screenY:0}},t.prototype.startScroll=function(h){var P;!this.ignore&&("touchmove"===h.type&&h.originalEvent.touches&&1===h.originalEvent.touches.length&&g&&(P=h.originalEvent.touches[0].screenX<w.screenX,this.options.widget)&&!this.options.widget.viewNode.parent().hasClass("pinch-zoomed")&&(P&&!this.rightEdgeReached||!P&&!this.leftEdgeReached)&&h.stopPropagation(),"hidden"!==h.target.style.overflow||"hidden"!==h.target.style["overflow-y"]&&"hidden"!==h.target.style["overflow-x"])&&(this.$el.trigger(h),this.flashScrollbar())},t.prototype.flashScrollbar=function(){this.resizeScrollbar(),this.showScrollbar()},t.prototype.showScrollbar=function(){for(var h=0;h<this.directions.length;h++){if(this.$scrollbar[this.directions[h]].fadeIn(),!this.options.autoHide)return;"number"==typeof this.flashTimeout&&s.clearTimeout(this.flashTimeout),this.flashTimeout=s.setTimeout(i.proxy(this.hideScrollbar,this),2e3)}},t.prototype.hideScrollbar=function(h){for(var P=0;P<this.directions.length;P++){var T=this.directions[P];h?(this.$scrollbar[T].hide(),this.$track[T].hide()):(this.$scrollbar[T].fadeOut(),this.$track[T].fadeOut()),"number"==typeof this.flashTimeout&&s.clearTimeout(this.flashTimeout)}},t.prototype.resizeScrollContent=function(){r||setTimeout(function(){this.$scrollContentEl.height(this.$el.height()),this.$scrollContentEl.width(this.$el.width());for(var h=0;h<this.directions.length;h++)"vert"===this.directions[h]?(this.$scrollContentEl.width(this.$el.width()+o),this.options.widget&&this.$contentEl.children().width(parseFloat(this.options.widget.assetData.contentsWidth)+o)):(this.$scrollContentEl.height(this.$el.height()+o),this.options.widget&&this.$contentEl.children().height(parseFloat(this.options.widget.assetData.contentsHeight)+o))}.bind(this),20)},t.prototype.recalculate=function(){this.resizeScrollContent(),this.resizeScrollbar()},t.prototype.getScrollElement=function(){return this.$scrollContentEl},t.prototype.getContentElement=function(){return this.$contentEl},i(s).on("load",function(){i("[data-simplebar-direction]").each(function(){i(this).simplebar()})}),m=i.fn.simplebar,i.fn.simplebar=function(h){var P,T=arguments;return void 0===h||"object"==typeof h?this.each(function(){i.data(this,"simplebar")||i.data(this,"simplebar",new t(this,h))}):"string"==typeof h?(this.each(function(){var b=i.data(this,"simplebar");b instanceof t&&"function"==typeof b[h]&&(P=b[h].apply(b,Array.prototype.slice.call(T,1))),"destroy"===h&&i.data(this,"simplebar",null)}),P!==a?P:this):void 0},i.fn.simplebar.Constructor=t,i.fn.simplebar.noConflict=function(){return i.fn.simplebar=m,this}}(),PP.State=function(){this._state="uninitialized"},PP.State.prototype={setState:function(e){this._state=e},getState:function(){return this._state},stateIsIn:function(e){return-1<jQuery.inArray(this.getState(),e)}},PP.Player=function(e){this.init(e)},PP.Player.prototype={result:null,init:function(e){var t;!e.hasEnvironment&&(t=PP.Util.getProjectPath(e),e.resourcesDir||(e.resourcesDir=t),t=PP.Util.getUrlParameter("dataFile"))&&(e.dataFile=t),this.startConfig=this.startConfig||e,this.config=new PP.Configuration(e),this.playerId=this.config.get("id"),this.getPlayerDiv().addClass("pp-player"),e.container||this.config.set("container",this.getPlayerDiv().parent()),this.container=$(this.config.get("container")),e.hasEnvironment||(t=this.config.resourceFileByFileName("text.css"),PP.Util.attachCSS(t)),this.config.get("aboutPurple")&&(this.contextMenue=new PP.ContextMenu(this.getPlayerDiv())),PP.i18n.setLanguage(this.config.get("language")),jQuery.cssNumber.animationIterationCount=!0,this.ctx={config:this.config,playerId:this.playerId,preloadedVideos:{},sizeIndicator:this.config.get("sizeIndicator"),deleteAtStop:this.config.get("deleteAtStop"),buildAssets:this.config.get("buildAssets"),actionHandler:new PP.Actions.ActionHandler,globalStates:{animation:new PP.State,view:new PP.State}},this.onResize=this.onResize.bind(this),this.stage=null,this.loadingTriggered=!this.config.get("avoidAutoLoad"),this.configurationLoaded=!1,this.stopped=!1,PP.StorytellingLoader.load(this.config.get("resourcesDir"),this.config.get("dataFile"),function(i){try{i.stage.loadingImageURL&&jQuery(".pp-progress").css("background-image","url("+this.config.resourceFileByFileName(i.stage.loadingImageURL)+")")}catch(n){console.log('Error while loading "loadingImageURL": '+n)}var s=this.getPlayerDiv().width()/i.stage.width;this.config.set("scaleFactor",s),this.config.set("data",i),this.showLoader(),this.resize(this.config.settings.width),this.config.get("showProgress")&&this.showProgress(),this.configurationLoaded=!0,$(this).trigger(PP.CONFIGURATION_LOADED)}.bind(this)),this.loadingTriggered&&!e.hasEnvironment&&this.start()},start:function(){var e=this.config.get("showPurchaseSuggestion");"true"!==e&&!0!==e||!this.config.get("purchaseSuggestionCallback")||this.config.get("purchaseSuggestionCallback")(this),this.stage&&this.stageViewNodeHandled?(this.stage.start(),this.stage.viewNode.trigger(PP.START,this)):this.configurationLoaded?this.loadAssets():$(this).on(PP.CONFIGURATION_LOADED,function(){this.loadAssets()})},onResize:function(){this.resize()},resize:function(e){this.resetStageAndScrollContent();var t=parseFloat(e),i=this.config.get("breakPointCallback"),s=this.config.get("breakPoints");void 0!==e?t?(this.resizePx(t),jQuery(window).off("resize orientationchange",this.onResize)):"auto"===e?(this.resizeAuto(),jQuery(window).on("resize orientationchange",this.onResize),i&&"function"==typeof i&&s&&s.length&&jQuery(window).on("resize orientationchange",function(n){var a=PP.Util.getBreakPoint(s,$(this.container).width());this.breakpoint!==a&&(this.breakpoint=a,i(this.breakpoint,n))}.bind(this))):"stage"===e&&(this.resizeStage(),jQuery(window).off("resize orientationchange",this.onResize)):this.resizeAuto(),this.stage&&this.stage.checkVideosPosition(),this.mobileZoom&&(this.mobileZoom.setInitialZoomFactor(this.factor),this.mobileZoom.reset())},resetStageAndScrollContent:function(){this.stage&&this.stage.viewNode&&(this.stage.viewNode.css({top:0,left:0,transform:"none"}),this.stage.viewNode.find("> .simplebar-scroll-content").css({top:0,left:0,transform:"none",width:"auto",height:"auto"}))},contentFitInside:function(){var e=this.container.width(),t=(!(t=this.config.get("maxContentWidth"))&&isNaN(t)||(e=Math.min(e,t)),this.container.height()),i=this.getInnerDimensions(),s=this.getOuterDimensions(),n=t,a=t/s.height,o=i.width*a;e<o&&(o=e,s.width*a>e)&&(a=e/s.width,n=Math.min(i.height*a,t)),this.getPlayerDiv().css("height",n),this.getPlayerDiv().css("width",o),this.factor=a,this.stage&&this.stage.viewNode&&(this.stage.viewNode.css({height:n/a,width:o/a,transform:"scale("+a+")",transformOrigin:"top left"}),(this.getPlayerDiv().hasClass("zoomed")||this.config.get("preventScrolling"))&&(this.stage.viewNode.css("height",i.height),this.stage.viewNode.css("width",i.width)),this.applyScrolling()),this.getPlayerDiv().css({top:Math.max((t-n)/2,0)}),this.ctx.config.set("scaleFactor",a),this.stage&&this.stage.resizeRec()},contentFitMagazine:function(){var e,t,i=this.config.get("maxContentWidth");i&&!isNaN(i)||(i=this.getOuterDimensions().width),e=(i=Math.min(this.container.width(),this.getOuterDimensions().width,i))/this.getOuterDimensions().width,t=Math.min(this.container.height(),this.getInnerDimensions().height*e),this.getPlayerDiv().css("width",i),this.getPlayerDiv().css("height",t),this.stage&&e&&this.stage.viewNode&&(this.factor=e,this.stage.viewNode.css({height:t/e,width:i/e,transform:"scale("+e+")",transformOrigin:"top left"}),this.config.get("preventScrolling")||this.applyScrolling(),this.getPlayerDiv().hasClass("zoomed")||this.config.get("preventScrolling"))&&(this.stage.viewNode.css("height",this.getInnerDimensions().height),this.stage.viewNode.css("width",this.getInnerDimensions().width)),this.ctx.config.set("scaleFactor",e),this.stage&&this.stage.resizeRec()},contentFitContainer:function(){var e,t=this.container.width(),i=(!(i=this.config.get("maxContentWidth"))&&isNaN(i)||(t=Math.min(t,i)),this.container.height());this.getPlayerDiv().css("width",t),e=this.container.width()/this.getOuterDimensions().width,this.getPlayerDiv().css("height",i),this.stage&&e&&this.stage.viewNode&&(this.factor=e,this.stage.viewNode.css("transform","scale("+this.factor+")"),this.stage.viewNode.css("transformOrigin","top left"),this.stage.width=t,this.stage.height=i,this.stage.viewNode.css("height",this.stage.height/e),this.stage.viewNode.css("width",this.stage.width/e),(this.getPlayerDiv().hasClass("zoomed")||this.config.get("preventScrolling"))&&(this.stage.viewNode.css("height",this.getInnerDimensions().height),this.stage.viewNode.css("width",this.getInnerDimensions().width)),this.applyScrolling()),this.ctx.config.set("scaleFactor",e),this.stage&&this.stage.resizeRec()},contentFitPdf:function(){var e,t,i,s=this.container.width(),n=(!(n=this.config.get("maxContentWidth"))&&isNaN(n)||(s=Math.min(s,n)),this.container.height()),a=this.getInnerDimensions(),o=this.getOuterDimensions();n<s?(e=(t=n)/a.height,s<(i=a.width*e)&&(e=(i=s)/a.width,t=a.height*e)):(e=(i=s)/o.width,n<(t=o.height*e)&&(e=(t=n)/o.height,i=Math.min(a.width*e,s))),this.getPlayerDiv().css("height",t),this.getPlayerDiv().css("width",i),this.factor=e,this.stage&&this.stage.viewNode&&(this.stage.viewNode.css({height:t/e,width:i/e,transform:"scale("+e+")",transformOrigin:"top left"}),(this.getPlayerDiv().hasClass("zoomed")||this.config.get("preventScrolling"))&&(this.stage.viewNode.css("height",a.height),this.stage.viewNode.css("width",a.width)),this.applyScrolling()),this.getPlayerDiv().css({top:Math.max((n-t)/2,0)}),this.ctx.config.set("scaleFactor",e),this.stage&&this.stage.resizeRec()},resizeAuto:function(){switch(this.config.get("contentFitStrategy")){case PP.PDF:this.contentFitPdf();break;case PP.MAGAZINE:this.contentFitMagazine();break;case PP.FIT_CONTAINER:this.contentFitContainer();break;default:this.contentFitInside()}this.fixScrollForSafari()},fixScrollForSafari:function(){var e,t;PP.Util.isSafari()&&this.stage&&this.stage.viewNode&&(e=this.stage.viewNode.find("> .simplebar-scroll-content"))[0]&&(e[0].scrollWidth>e.width()&&(t=this.stage.viewNode.width(),e.css("width",t-1),e.css("width","100%")),e[0].scrollHeight>e.height())&&(t=this.stage.viewNode.height(),e.css("height",t-1),e.css("height","100%"))},resizeStage:function(){this.getPlayerDiv().css("width",this.getOuterDimensions().width),this.getPlayerDiv().css("height",this.getOuterDimensions().height)},resizePx:function(e){this.getPlayerDiv().css("width",e),e/=this.getOuterDimensions().width,this.getPlayerDiv().css("height",this.getOuterDimensions().height*e),this.stage&&e&&this.stage.viewNode&&(this.factor=e,this.stage.viewNode.css("transform","scale("+this.factor+")"),this.stage.viewNode.css("transformOrigin","top left")),this.ctx.config.set("scaleFactor",e)},showLoader:function(){var e;this.getPlayerDiv().on("click",function(t){var i=jQuery(t.target);i.is("a")||i.parents("a").length||t.preventDefault()}),this.resize(this.config.settings.width),this.progressInfo&&0<this.progressInfo.parents("html").length?(this.progressInfo.show(),this.statusBar.show()):(this.progressInfo=this.getPlayerDiv().find(".pp-progress"),this.progressInfo[0]?this.statusBar=this.progressInfo.find(".pp-loaderStatus"):(this.progressInfo=jQuery('<div class="pp-progress">').appendTo(this.getPlayerDiv()),e=jQuery('<div class="pp-loaderBackground">').appendTo(this.progressInfo),e=jQuery('<div class="pp-loaderBarWrapper">').appendTo(e),e=jQuery('<div class="pp-loaderBar">').appendTo(e),this.statusBar=jQuery('<div class="pp-loaderStatus">').appendTo(e)))},hideLoader:function(){this.statusBar.hide()},showProgress:function(){this.progressInfo.show()},updateProgress:function(e){e=Math.floor(e.count/e.total*100),this.statusBar.css("width",e+"%")},hideProgress:function(){this.progressInfo.hide()},createClickOverlay:function(){this.clickOverlay=jQuery('<div class="pp-clickOverlay">'),PP.Util.isAndroid()||PP.Util.isIOS()||this.clickOverlay.appendTo(this.getPlayerDiv())},showClickOverlay:function(){this.clickOverlay.fadeIn(150)},hideClickOverlay:function(){this.clickOverlay.fadeOut(150)},loadAssets:function(e){this.showLoader(),this.buildStage();var t,i=this.stage.load(),s=t=i.count;this.ret||(this.ret=i.then(null,null,function(n){return{assetType:n,total:s,count:s- --t}})),this.ctx.config.get("lazyLoading")?this.ready(e):(this.ret.done(this.ready.bind(this,e)),this.ret&&this.ret.progress(this.updateProgress.bind(this)))},ready:function(e){delete this.ret,this.handleStageViewNode(),this.stage&&this.stage.viewNode&&this.stage.viewNode.trigger(PP.ASSETS_LOADED),e||(this.config.settings.autostart&&!0!==e?this.start():this.getPlayerDiv().one("click",this.stage.start.bind(this.stage)),this.getPlayerDiv().trigger(PP.READY,this))},buildStage:function(){var e;this.stage||(e=this.ctx.config.get("data").stage,this.stage=PP.WidgetTypes.Factory.createElement("stage",this.ctx,e),this.stage.isRoot=!0)},jumpToPage:function(e){e=$.extend(this.startConfig,{dataFile:this.config.resourceFileByFileName(e),autostart:!0}),this.result=null,this.getPlayerDiv().empty(),this.init(e)},stopScenes:function(){if(!this.stopped&&this.stage)for(var e=0;e<this.stage.childAssets.length;e++){var t=this.stage.childAssets[e];t instanceof PP.Scene&&t.stop()}},pause:function(){if(this.stage)for(var e=0;e<this.stage.childAssets.length;e++){var t=this.stage.childAssets[e];t instanceof PP.Scene&&t.pause()}},pauseMedia:function(){if(this.stage)for(var e=0;e<this.stage.childAssets.length;e++){var t=this.stage.childAssets[e];t instanceof PP.Scene&&t.pauseMedia()}},stopMedia:function(){if(this.stage)for(var e=0;e<this.stage.childAssets.length;e++){var t=this.stage.childAssets[e];t instanceof PP.Scene&&t.stopMedia()}},resumeMedia:function(){if(this.stage)for(var e=0;e<this.stage.childAssets.length;e++){var t=this.stage.childAssets[e];t instanceof PP.Scene&&t.viewNode&&t.resumeMedia()}},startWebviews:function(){if(this.stage)for(var e=0;e<this.stage.childAssets.length;e++){var t=this.stage.childAssets[e];t instanceof PP.Scene&&t.viewNode&&t.startWebviews()}},load:function(){this.stage&&this.stageViewNodeHandled||(this.configurationLoaded?this.loadAssets(!0):$(this).on(PP.CONFIGURATION_LOADED,function(){this.loadAssets(!0)}))},handleStageViewNode:function(e){this.stage&&!this.stageViewNodeHandled&&(this.stage.viewNode||this.stage.buildViewNode(),this.getPlayerDiv().append(this.stage.viewNode),this.resize(this.config.settings.width),this.stage.viewNode.on(PP.PLAYER_JUMP_TO_PAGE,function(t,i){this.config.get("jumpToPageCallback")&&this.config.get("jumpToPageCallback")(i.pageId,this.config,i.actions,i.doNotTrack)}.bind(this)),e||this.hideProgress(),this.stageViewNodeHandled=!0,this.stage.handleScrollBars())},applyScrolling:function(){},unload:function(){this.stage&&(this.stage.stop(),this.stopped=!0,this.stage.viewNode&&this.stage.viewNode.detach(),delete this.stage),$(this.getPlayerDiv()).find(".popupContainer").remove(),this.stageViewNodeHandled=!1,this.hideLoader(),this.config.get("showProgress")&&this.showProgress()},getZoom:function(){var e={max:1,min:1};return this.ctx.config.get("contentFitStrategy")!==PP.FIT_CONTAINER&&(this.ctx.config.get("data").stage.maxZoomFactor&&(e.max=parseFloat(this.ctx.config.get("data").stage.maxZoomFactor)),this.ctx.config.get("data").stage.minZoomFactor)&&(e.min=parseFloat(this.ctx.config.get("data").stage.minZoomFactor)),this.ctx.config.get("forceZoomMax")&&(e.max=this.ctx.config.get("forceZoomMax")),this.ctx.config.get("forceZoomMin")&&(e.min=this.ctx.config.get("forceZoomMin")),e},getOuterDimensions:function(){return{width:parseInt(this.config.get("data").stage.width),height:parseInt(this.config.get("data").stage.height)}},getInnerDimensions:function(){return{width:parseInt(this.config.get("data").stage.contentsWidth),height:parseInt(this.config.get("data").stage.contentsHeight)}},getPlayerDiv:function(){return $('.pp-player[id="'+this.playerId+'"]')},getStageScroller:function(){return this.stage&&this.stage.viewNode&&this.stage.viewNode.data().simplebar&&this.stage.viewNode.data().simplebar.$scrollContentEl}},PP.Configuration=function(e){this.init(e)},PP.Configuration.prototype={init:function(e){var t=this;if(!e)throw"Player must be initialized with arguments object.";var i={width:"auto",language:"en",autostart:!0,cssFile:null,cssFileName:null,data:null,dataFile:null,dataFileName:null,id:null,resourcesDir:null,showControlPanel:!0,showProgress:!0,dynamicCssCreation:!1,deleteAtStop:!1,buildAssets:!1,jumpToPageCallback:void 0,aboutPurple:!0,hasEnvironment:!1,lazyLoading:!1,preloadVideos:!0,contentFitStrategy:PP.FIT_INSIDE,container:$(window),webviewError:!0,preventScrolling:!1,pageIndex:null,pageLabel:null,pageAlias:null,pageNumber:null,title:null,appId:null,issueId:null,issueName:null,issueAlias:null,externalIssueId:null,publicationId:null,publicationName:null,entitlementLogin:null,entitlementToken:null,preview:!1,locale:"de_DE",managerBaseUrl:null,forceZoomMin:null,forceZoomMax:null,breakPoints:PP.DEFAULT_BREAKPOINTS,breakPointCallback:void 0,showPurchaseSuggestion:!1,purchaseSuggestionCallback:void 0,maxContentWidth:void 0},s=jQuery.extend({},i,e);this.checkDataFile(s),this.checkId(s),this.setScaleWidth(s),jQuery.each(["showControlPanel","autostart","showProgress"],function(n,a){var o;t.getParameterByName(a)&&(o=t.getParameterByName(a),s[a]="true"===o)}),s.contentFitStrategy=PP.Util.mapContentFitStrategy(e.contentFitStrategy),this.settings=s},checkDataFile:function(e){if(null===e.dataFile&&null===e.data)throw'Need "dataFile" as parameter'},checkId:function(e){if(!e.id)throw'JSPlayer has no "id".'},setScaleWidth:function(e){e.scaleWidth&&(e.width=e.scaleWidth)},get:function(e){return this.settings[e]},set:function(e,t){"data"===e&&(t=this.patchImageUrls(t)),this.settings[e]=t},patchImageUrls:function(e){var t=this.getElementsByKey(e,"image");return jQuery.each(t,jQuery.proxy(function(i,s){this.get("rewriteUrlMethodName")&&window[this.get("rewriteUrlMethodName")]&&(s.imageURL=window[this.get("rewriteUrlMethodName")](s.imageURL,s,this))},this)),e},resourceFileByName:function(e){return this.resourceFileByFileName(this.get(e))},resourceFileByFileName:function(e){return PP.externalConfig&&PP.externalConfig.urlHandler?PP.externalConfig.urlHandler(e):void 0===e?null:0===e.indexOf("data:")||this.isAbsolutePath(e)?e:this.transformDir(e)},transformDir:function(e){var t=PP.PURPLEDIR+this.get("resourcesDir");return""===t?e:t+"/"+e},isAbsolutePath:function(e){return 0===e.indexOf("http://")||0===e.indexOf("https://")||0===e.indexOf("/")},getParameterByName:function(e){return e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),null===(e=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(window.location.href))?"":decodeURIComponent(e[1].replace(/\+/g," "))},getPlayerDimensions:function(n){n=$("#"+n.playerId);var t=this.settings.data.stage.height,i=this.settings.data.stage.width,s=n.height();return n=n.width(),{height:t,width:i,computedHeight:s=!s&&n?t*(i/n):s,computedWidth:n=!n&&s?i*(t/s):n}},getElementsByKey:function(e,t){var i=[];return function s(n,a){for(var o in n)n.hasOwnProperty(o)&&(a.apply(this,[o,n[o]]),"object"==typeof n[o])&&s(n[o],a)}(e,function(s,n){s===t&&("array"===jQuery.type(n)?i=i.concat(n):"object"===jQuery.type(n)&&i.push(n))}),i}},PP.WidgetContainer=function(){},PP.WidgetContainer.prototype={scene:null,childAssets:null,result:null,init:function(){this.childAssets=[]},getWidgetById:function(e){return jQuery("#"+e).data("pp:controller")},load:function(){var e,t;return this.result||(e=[],t=0,jQuery.each(this.childAssets,function(){var i=this.load();this instanceof PP.WidgetTypes.Popup||(t+=i.count,e.push(i))}),this.result=jQuery.when.apply(jQuery,e),this.result.count=t),this.result},start:function(){jQuery.each(this.childAssets,function(){this.start()})},stop:function(){jQuery.each(this.childAssets,function(){this.stop(!0)})},pause:function(){jQuery.each(this.childAssets,function(){this.pause()})},resume:function(){jQuery.each(this.childAssets,function(){this.userPaused||this.resume()})},seekTo:function(e,t){$.each(this.childAssets,function(){this.viewNode&&this.viewNode.css("animationName","none")}),$.each(this.childAssets,function(){this.seekTo(e,t)})},numberOfAnimations:function(){for(var e=0,t=0;t<this.childAssets.length;t++)e+=this.childAssets[t].numberOfAnimations();return e},unloadVideos:function(){var e;this instanceof PP.WidgetTypes.Movie&&this.viewNode&&((e=this.viewNode.find("video")).prop("src",""),e.find("source").remove(),e.remove());for(var t=0;t<this.childAssets.length;t++)this.childAssets[t].unloadVideos()},resizeRec:function(){for(var e=0;e<this.childAssets.length;e++)this.childAssets[e].resizeRec()}},PP.WidgetTypes={},PP.WidgetTypes.Factory={typeMap:{},els:{},allElements:[],elementIdByAlias:{},addHandler:function(e,t){for(var i=0;i<t.length;i++)this.typeMap[t[i]]=e},createElement:function(e,t,i,s){var n=null;return i.uti=e,i.uti&&this.typeMap[i.uti]?(n=new this.typeMap[i.uti](t,i,s),this.els[i.uti]||(this.els[i.uti]=[]),this.els[i.uti].push(n),this.allElements[i.id]=n,i.alias&&(this.elementIdByAlias[i.alias]=i.id),n):(console.error("No handler found for uti "+i.uti,i),null)},getElementsFromCollection:function(e){var t={};return jQuery.each(e,function(i,s){"object"!==jQuery.type(s)&&"array"!==jQuery.type(s)||!this.typeMap[i]||(t[i]=s)}.bind(this)),t},getElementById:function(e){return this.allElements[e]},getElementByAlias:function(e){return(e=this.elementIdByAlias[e])?this.allElements[e]:void 0},getElementsByUTI:function(e){return this.els[e]}},PP.Scene=function(e,t,i){this.init(e,t,i)},PP.Scene.parent=PP.WidgetContainer.prototype,PP.Scene.prototype=jQuery.extend(Object.create(PP.WidgetContainer.prototype),{init:function(e,t,i){for(var s in PP.Scene.parent.init.call(this),this.ctx=e,this.sceneData=t,this.stage=i.stage,this.animationState="stopped",this.animationsEnded=0,this.duration=null,this.sceneId=this.sceneData.id,this.autoplay="true"===this.sceneData.autoplay,this.buildElements(),this.parseTransitionData(),this.sceneData.animationStrategy)this.sceneData.animationStrategy.hasOwnProperty(s)&&this.setAnimationStrategy(s,this.sceneData.animationStrategy[s]);this.sceneData.signalInput&&$("#"+this.ctx.playerId).on(this.sceneData.signalInput.outputRef,function(n,a){var o;a.type===PP.ScrollPositionSignal.SCROLL&&(a.target=this,a.property=this.sceneData.signalInput.property,a.formula=PP.Util.sanitizeFormula(this.sceneData.signalInput.formula),(o={})[PP.SEEK_TO]=a,this.ctx.actionHandler.processAction(o,this))}.bind(this))},buildElements:function(){var e=this,t=this.sceneData.widgets;t&&jQuery.each(t,function(i,s){"object"===jQuery.type(s)?e.buildElement(e.ctx,s,i):"array"===jQuery.type(s)&&jQuery.each(s,function(n,a){e.buildElement(e.ctx,a,i)})})},buildElement:function(e,t,i){(i=PP.WidgetTypes.Factory.createElement(i,e,t))&&(i.scene=this,i instanceof PP.WidgetTypes.Stage&&(i.parentStage=this.stage),this.childAssets.push(i))},addChildListeners:function(){jQuery.each(this.childAssets,function(e,t){t.viewNode.click(t.onClick)})},setParent:function(e){this.parentView=e},contains:function(e){for(var t=0;t<this.childAssets.length;t++)if(this.childAssets[t]===e)return!0;return!1},isCurrentScene:function(){return this.stage.currentScene.sceneId===this.sceneId},start:function(){this.ctx.deleteAtStop&&null===this.viewNode&&(this.buildViewNode(),this.addChildListeners()),this.isCurrentScene()&&"running"!==this.animationState&&("stopped"===this.animationState&&(this.transitionData&&"automatic"===this.transitionData.trigger&&this.setTimer(!0),PP.Scene.parent.start.call(this)),"paused"===this.animationState&&(this.resume(),PP.Scene.parent.resume.call(this)),this.animationState="running")},stop:function(){this.viewNode&&this.viewNode.removeClass("track0"),this.clearTimer(),PP.Scene.parent.stop.call(this),this.animationState="stopped";for(var e=this.animationsEnded=0;e<this.childAssets.length;e++)this.childAssets[e].stop();this.stopMedia(),this.ctx.deleteAtStop&&(PP.Util.deleteElement(this.viewNode),this.viewNode=null,this.isDrawn=!1)},pauseMedia:function(){for(var e=0;e<this.childAssets.length;e++){var t=this.childAssets[e];t instanceof PP.WidgetTypes.Movie||t instanceof PP.WidgetTypes.Audio?"playing"!==t.playbackState&&"paused"!==t.playbackState||t.pause():t.pauseMedia()}},stopMedia:function(){for(var e=0;e<this.childAssets.length;e++){var t=this.childAssets[e];t instanceof PP.WidgetTypes.Movie||t instanceof PP.WidgetTypes.Audio?t.stop():t instanceof PP.WidgetTypes.Popup?t.close():t.stopMedia()}},resumeMedia:function(){for(var e=0;e<this.childAssets.length;e++){var t=this.childAssets[e];t instanceof PP.WidgetTypes.Movie||t instanceof PP.WidgetTypes.Audio?"paused"===t.playbackState&&t.start():t.resumeMedia()}},restartMedia:function(){for(var e=0;e<this.childAssets.length;e++){var t=this.childAssets[e];t instanceof PP.WidgetTypes.Movie||t instanceof PP.WidgetTypes.Audio?"paused"!==t.playbackState&&"stopped"!==t.playbackState||(t.seekTo(0),t.start()):t.restartMedia()}},startWebviews:function(){for(var e=0;e<this.childAssets.length;e++){var t=this.childAssets[e];t instanceof PP.WidgetTypes.WebView?t.start():t.startWebviews()}},restart:function(){this.stop(),this.start()},resume:function(){"paused"!==this.animationState&&"stopped"!==this.animationState||this.isTimerExpired()||this.isCurrentScene()&&(this.resumeTimer(),PP.Scene.parent.resume.call(this),setTimeout(function(){this.stage.checkVideosPosition()}.bind(this)),this.animationState="running")},pause:function(){null!==this.animationState&&"paused"!==this.animationState&&("stopped"===this.animationState?this.clearTimer():(PP.Scene.parent.pause.call(this),this.pauseTimer(),this.animationState="paused"))},buildViewNode:function(e){var t,i,s="> .simplebar-scroll-content > .simplebar-content";this.viewNode?$(this.parentView).find("#"+this.sceneData.id).length<=0&&(0<this.parentView.find(s).length?this.viewNode.appendTo(this.parentView.find(s)):this.viewNode.appendTo(this.parentView)):(t={},jQuery.extend(t,PP.CSSParser.clean(this.sceneData)),this.sceneData.style&&"text/css"===this.sceneData.style.type?jQuery.extend(t,this.sceneData.style):jQuery.extend(t,PP.CSSParser.clean(this.sceneData.style)),this.viewNode=jQuery("<div>").attr({id:this.sceneData.id+(this.isStartScene?"__root":""),"data-nodetype":"scene","data-startScene":this.isStartScene}).css(t).addClass("pp-node"),e&&(this.viewNode.css({"z-index":PP.ZINDEX_ONHOLD,visibility:"hidden",opacity:0}),this.viewNode.addClass("inactive")),this.parentView||(this.parentView=this.stage.buildViewNode()),this.view=0<this.parentView.find(s).length?this.viewNode.appendTo(this.parentView.find(s)):this.viewNode.appendTo(this.parentView),this.ctx.config.get("contentFitStrategy")===PP.FIT_CONTAINER&&!0===this.stage.isRoot&&(this.view.css("height","100%"),this.view.css("width","100%")),i=this,jQuery(this.childAssets).each(function(n){this.bindToView(i.view)}))},parseTransitionData:function(){var e,t=this.sceneData.transitionToNext;this.transitionData={transitionType:"switchTransition"},t&&(e=t[t=(t=Object.keys(t))?t[0]:"switchTransition"],this.transitionData=e?{trigger:e.trigger,duration:parseFloat(e.duration)||0,transitionType:t,offset:e.offset||0,color:e.color||"#000000",fadeInTime:parseFloat(e.fadeInTime)||0,fadeOutTime:parseFloat(e.fadeOutTime)||0,backgroundColor:e.backgroundColor||"transparent"}:this.transitionData)},hide:function(){this.viewNode&&($(this.view).css({"transition-property":"none",visibility:"hidden",opacity:0}),$(this.view).unbind("transitionend"))},show:function(){this.viewNode&&($(this.view).css({visibility:"visible",opacity:1}),$(this.view).removeClass("inactive"))},setAnimationStrategy:function(e,t){var i=this;({timeControlledBy:function(s){var n=$("#"+this.ctx.playerId),a="textFrame:"+this.sceneData.id+":scroll";n.on(a,"#"+s,function(o,r){!1===i.autoplay&&this.seekTo(r)}.bind(this)),n.data(a,n.data(a)?n.data(a)+1:1)}})[e].call(this,t)},pauseTimer:function(){this.durationTimeout&&this.durationTimeout.pause()},resumeTimer:function(){this.durationTimeout&&this.durationTimeout.resume()},setTimer:function(e){var t=this.getDuration();this.clearTimer(),this.durationTimeout=new PP.Util.Timer(function(){if(e)if(this.sceneData.event){Array.isArray(this.sceneData.event)||(this.sceneData.event=[this.sceneData.event]);for(var i,s,n=[],a=0;a<this.sceneData.event.length;a++){var o=this.sceneData.event[a];if("exit"===o.type)if(o.actions&&o.actions.length)for(var r=0;r<o.actions.length;r++){var l=o.actions[r],u=l.type;if(u){(s={})[u]={};for(var S=Object.keys(l),f=0;f<S.length;f++)"type"!==(i=S[f])&&(s[u][i]=l[i]);n.push(s)}else n.push(l)}else for(var N=Object.keys(o),E=0;E<N.length;E++)"type"!==(i=N[E])&&((s={})[i]=o[i],n.push(s))}this.ctx.actionHandler.processActions(n,this)}else jQuery(this.viewNode).trigger(PP.SCENE_JUMP_TO_NEXT);else this.pause(),this.pauseMedia();this.clearTimer()}.bind(this),1e3*t)},clearTimer:function(){this.durationTimeout&&(this.durationTimeout.clear(),delete this.durationTimeout)},isTimerExpired:function(){return!!this.durationTimeout&&this.durationTimeout.isExpired()},getDuration:function(){return this.sceneData.duration?parseFloat(this.sceneData.duration):0}}),PP.WidgetTypes.Factory.addHandler(PP.Scene,["de.artifacts.purple.element.scene","scene"]),PP.Widget=function(e,t){this.init(e,t)},PP.Widget.parent=PP.WidgetContainer.prototype,PP.Widget.prototype=jQuery.extend(Object.create(PP.WidgetContainer.prototype),{viewNode:null,level:null,animationsEnded:0,startTime:null,timeline:null,lastScroll:0,init:function(e,t){PP.Widget.parent.init.call(this),this.ctx=e,this.assetData=t,this.width=Number(this.assetData.width),this.height=Number(this.assetData.height),this.computeBox()},computeBox:function(){this.assetData.style&&this.assetData.style.borderWidth?(this.innerWidth=this.width-2*this.assetData.style.borderWidth,this.innerHeight=this.height-2*this.assetData.style.borderWidth):(this.innerWidth=this.width,this.innerHeight=this.height)},getWidgetById:function(e){try{return jQuery("#"+e).data("pp:controller")}catch(t){}},createWidget:function(e){var t,i;for(i in e)e.hasOwnProperty(i)&&(t=i);var s=PP.WidgetTypes.Factory.createElement(t,this.ctx,Array.isArray(e[t])?e[t][0]:e[t]);return this.childAssets.push(s),s},start:function(){this.timeline?this.timeline.play():this.viewNode.trigger(PP.ANIMATION_END),PP.Widget.parent.start.call(this)},stop:function(){this.timeline&&(setTimeout(function(){this.timeline.seek(0,!1)}.bind(this),50),this.timeline.stop()),PP.Widget.parent.stop.call(this)},pause:function(){this.timeline&&this.timeline.pause(),PP.Widget.parent.pause.call(this)},seekTo:function(e,t){var i=t?this[t]:this.timeline;(i&&this.viewNode||this instanceof PP.WidgetTypes.Stage)&&(i&&(i.pause(),(e<0||!isFinite(e))&&(e=0),i.seek(e,!1)),PP.Widget.parent.seekTo.call(this,e,t))},getDuration:function(e){return(e=e&&this[e]?this[e]:this.timeline)?e.duration():0},resume:function(){this.viewNode&&(this.viewNode.css("animation-play-state","running"),this.timeline&&this.timeline.play(),PP.Widget.parent.resume.call(this))},buildViewNode:function(){var e=this.assetData;return e=jQuery("<div>").attr("id",e.id),this.viewNode=e,this.viewNode.data("pp:controller",this),this.applyEvents(),e.addClass("pp-node"),this.applyCSS(),this.getEnterEvent()&&this.getEnterEvent().keyFrameAnimation&&this.buildAnimation(),(e=this.getScrollytellingEvent())&&e.keyFrameAnimation&&this.buildAnimation(e,"scrollyTimeline"),this.applyClickThrough(),this.viewNode.on(PP.ANIMATION_END,function(){var t;this.isRoot||(t=this.viewNode.css("transform")).indexOf("translateZ")<0&&this.viewNode.css("transform",t+" translateZ(0px)")}.bind(this)),this.viewNode.on("scroll",this.checkVideosPosition.bind(this)),this.viewNode},checkVideosPosition:function(e){if(e&&e.timeStamp){if(e.timeStamp-this.lastScroll<41)return;this.lastScroll=e.timeStamp}this.viewNode&&this.viewNode.find(".pp-video").each(function(){var t=$(this).data("pp:controller");!t||"true"!==t.assetData.playbackMatchesVisibility||t.userPaused||"stopped"===t.playbackState&&"true"===t.assetData.autoplay&&!0===t.autoPlayDone||0<t.assetData.startDelay&&!t.startDelayElapsed||(PP.Util.isElementInViewport(this)?(t.resume(),t.autoPlayDone||(t.autoPlayDone=!0)):t.pause())})},applyEvents:function(){this.assetData.activate&&this.viewNode.css("cursor","pointer"),this.onSwipe=this.onSwipe.bind(this),this.onSwipeLeft=this.onSwipeLeft.bind(this),this.onSwipeRight=this.onSwipeRight.bind(this),this.onSwipeUp=this.onSwipeUp.bind(this),this.onSwipeDown=this.onSwipeDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.assetData.event&&(this.createSwipeSignal(),this.signal.addEventListener(PP.SwipeSignal.RIGHT,this.onSwipeRight),this.signal.addEventListener(PP.SwipeSignal.LEFT,this.onSwipeLeft),this.signal.addEventListener(PP.SwipeSignal.DOWN,this.onSwipeDown),this.signal.addEventListener(PP.SwipeSignal.UP,this.onSwipeUp)),this.assetData.activate&&this.viewNode.addClass("active"),PP.Util.hasTouchSupport()?(this.viewNode.on("touchstart",this.onTouchStart),this.viewNode.on("touchend",this.onTouchEnd)):PP.Util.isIE()?this.viewNode.on("click",this.onClick):(this.viewNode.on("mousedown",this.onMouseDown),this.viewNode.on("mouseup",this.onMouseUp)),this.assetData.signalInput&&$("#"+this.ctx.playerId).on(this.assetData.signalInput.outputRef,function(e,t){var i;t.type===PP.ScrollPositionSignal.SCROLL&&(t.target=this,t.property=this.assetData.signalInput.property,t.formula=PP.Util.sanitizeFormula(this.assetData.signalInput.formula),(i={})[PP.SEEK_TO]=t,this.ctx.actionHandler.processAction(i,this))}.bind(this))},applyClickThrough:function(){this.assetData.event&&!Array.isArray(this.assetData.event)&&(this.assetData.event=[this.assetData.event]);var e=!this.assetData.activate;if(e&&this.assetData.event)for(var t=0;t<this.assetData.event.length;t++){var i=this.assetData.event[t];if(i.type===PP.SwipeSignal.DOWN||i.type===PP.SwipeSignal.UP||i.type===PP.SwipeSignal.LEFT||i.type===PP.SwipeSignal.RIGHT){e=!1;break}}var s=0===parseFloat(this.assetData.alpha)||this.hasTransparentBackground(),n=!(this instanceof PP.WidgetTypes.Text&&this.assetData.textContent);s&&e&&n&&this.viewNode.css("pointer-events","none")},hasTransparentBackground:function(){return!(!this.assetData.style||!this.assetData.style.backgroundColor)&&0===PP.CSSParser.parseHex(this.assetData.style.backgroundColor).a},smoothScrollToAlignment:function(e,t,i){var s,n,a,o,r;e.viewNode&&(e=$(e.viewNode),n=s=0,a=PP.Util.getScrollBarWidth(),r=(o=this.ctx.config.getPlayerDimensions(this.ctx)).height/o.computedHeight,this.ctx.config.get("contentFitStrategy")===PP.MAGAZINE&&(r=o.width/o.computedWidth),o=e.position().left*r,r=e.position().top*r,"left"===t&&(s=o),"center"===t&&(s=(s=o)-(this.viewNode.width()-e.width())/2+a/2),"right"===t&&(s=o,s=(s-=this.viewNode.width())+e.width()+a),"top"===i&&(n=r),"center"===i&&(n=(n=r)-(this.viewNode.height()-e.height())/2+a/2),"bottom"===i&&(n=r,n=(n-=this.viewNode.height())+e.height()+a),this.smoothScrollToPosition(s,n))},smoothScrollToPosition:function(e,t){var i=$(this.viewNode);(i=0<$(this.viewNode).find("> .simplebar-scroll-content").length?$(this.viewNode).find("> .simplebar-scroll-content"):i).animate({scrollTop:t,scrollLeft:e},250)},applyCSS:function(){var e={},t=!1,i=!1;this instanceof PP.WidgetTypes.Image&&(t=!0),this instanceof PP.WidgetTypes.Text&&(i=!0),jQuery.extend(e,PP.CSSParser.clean(this.assetData,t,i)),jQuery.extend(e,PP.CSSParser.clean(this.assetData.style,t,i)),this.applyRotation(e),this.applyTransformOrigin(e),e=this.transformStyles(e),this instanceof PP.WidgetTypes.Image&&t&&PP.Util.isChrome()&&this.assetData.style.shadow&&(i=this.getMaxBounds(e),e.width=i.width,e.height=i.height,e.padding=i.padding,e.top=i.top,e.left=i.left),"match_parent"===this.assetData.layoutMode&&(e.width="100%",e.height="100%",e.top=0,e.left=0,this.scene)&&this.scene.viewNode&&!this.scene.stage.isRoot&&this.scene.viewNode.css({height:"100%",width:"100%"}),this.viewNode.css(e)},getMaxBounds:function(e){var o=0,t=(this.assetData.style.shadow.shadowOffsetX&&(o=Math.abs(parseFloat(this.assetData.style.shadow.shadowOffsetX))),this.assetData.style.shadow.shadowOffsetY&&(o=Math.abs(parseFloat(this.assetData.style.shadow.shadowOffsetY))),0),i=(this.assetData.style.shadow.shadowRadius&&(t=parseFloat(this.assetData.style.shadow.shadowRadius)),parseFloat(e.width)+2*o+2*t),s=parseFloat(e.height)+0+2*t,n=o+t,a=0+t;if((o=this.getEnterEvent())&&o.keyFrameAnimation&&o.keyFrameAnimation.keyFrame){var r=o.keyFrameAnimation.keyFrame;Array.isArray(r)||(r=[r]);for(var l=0;l<r.length;l++){var f,u=0,S=((f=r[l]).style.shadow.shadowOffsetX&&(u=Math.abs(parseFloat(f.style.shadow.shadowOffsetX))),0);s<(i<(f.style.shadow.shadowOffsetY&&(S=Math.abs(parseFloat(f.style.shadow.shadowOffsetY))),f.style.shadow.shadowRadius&&parseFloat(f.style.shadow.shadowRadius),f=parseFloat(e.width)+2*u+2*t)&&(i=f,n=u+t),f=parseFloat(e.height)+2*S+2*t)&&(s=f,a=S+t)}}return{left:this.assetData.x-n,top:this.assetData.y-a,width:i,height:s,padding:a+"px "+n+"px"}},getRotationInfo:function(e){var t="",i=!1;return e.rotationZ&&0!==e.rotationZ&&0!==parseFloat(e.rotationZ)&&(i=!0,t+="rotateZ("+e.rotationZ+"deg)"),e.rotationX&&0!==e.rotationX&&0!==parseFloat(e.rotationX)&&(i=!0,t+=" rotateX("+e.rotationX+"deg)"),e.rotationY&&0!==e.rotationY&&0!==parseFloat(e.rotationY)&&(i=!0,t+=" rotateY("+e.rotationY+"deg)"),{transform:t,rotated:i}},setBaseRotation:function(){this.baseRotation={},this.assetData.rotationZ&&0!==this.assetData.rotationZ&&(this.baseRotation.z=parseFloat(this.assetData.rotationZ)),this.assetData.rotationX&&0!==this.assetData.rotationX&&(this.baseRotation.x=parseFloat(this.assetData.rotationZ)),this.assetData.rotationY&&0!==this.assetData.rotationY&&(this.baseRotation.y=parseFloat(this.assetData.rotationZ))},applyRotation:function(e){var t=this.getRotationInfo(this.assetData);this.setBaseRotation(),t.rotated&&"match_parent"!==this.assetData.layoutMode?(jQuery.extend(e,{webkitTransform:t.transform,transform:t.transform}),this.viewNode.addClass("rotated")):this.viewNode.removeClass("rotated")},applyTransformOrigin:function(e){(e=e.transformOrigin)&&jQuery.each(e.split(" "),function(t,i){switch(t){case 0:case 1:parseFloat(i)}}),"match_parent"!==this.assetData.layoutMode&&(this.assetData.rotationCenterX&&Number(this.assetData.rotationCenterX),this.assetData.rotationCenterY)&&Number(this.assetData.rotationCenterY)},transformStyles:function(e){return e},resizeRec:function(){this.resizeResponsive();for(var e=0;e<this.childAssets.length;e++)this.childAssets[e].resizeRec()},resizeResponsive:function(){},resize:function(e,t){void 0!==e&&(this.width=Number(e)),void 0!==t&&(this.height=Number(t)),this.computeBox(),this.viewNode.css({width:this.width+"px",height:this.height+"px"})},bindToView:function(e){this.viewNode||this.buildViewNode(this.level,this.zindex),0===e.has(this.viewNode).size()&&(e.append(this.viewNode),this.handleScrollBars())},getEasing:function(e){var t;switch(e.timingFunction){case"ease-in-out":t=Power2.easeInOut;break;case"ease-out":t=Power2.easeOut;break;case"ease-in":t=Power2.easeIn;break;case"linear":t=Linear.easeNone;break;default:t=void 0}return t},buildAnimation:function(e,t){e=e||this.getEnterEvent(),t=t||"timeline",this.viewNode.addClass("hasAnimation");var i=e.keyFrameAnimation,s=i.keyFrame,n=this.viewNode,a=(this[t]=new TimelineMax({onComplete:function(){n.trigger(PP.ANIMATION_END)}}),"endless"===e.keyFrameAnimation.loop&&this[t].repeat(-1),"pingpong"===e.keyFrameAnimation.loop&&(this[t].repeat(-1),this[t].yoyo(!0)),parseFloat(this.assetData.x)),o=parseFloat(this.assetData.y),r=(this instanceof PP.WidgetTypes.Image&&PP.Util.isChrome()&&this.assetData.style.shadow&&(a=(e=this.getMaxBounds(this.assetData)).left,o=e.top),0),l=this.getEasing(i);Array.isArray(s)||(s=[s]);for(var u=0;u<s.length;u++){var S=s[u],f=this.buildKeyFrame(a,o,S,l);0===u&&0!==parseFloat(S.keyTime)&&this[t].to(this.viewNode.get(0),0,f),0===parseFloat(S.keyTime)&&(S.keyTime=1e-5),this[t].to(this.viewNode.get(0),S.keyTime-r,f),r=S.keyTime}this[t].addCallback(function(){this.viewNode.trigger(PP.ANIMATION_END)}.bind(this)),this[t].pause()},fixStartPosition:function(){var e,t,i,s;"match_parent"!==this.assetData.layoutMode&&(i=this.getEnterEvent())&&i.keyFrameAnimation&&(i=i.keyFrameAnimation,e=parseFloat(this.assetData.x),t=parseFloat(this.assetData.y),i)&&(i=i.keyFrame,(i=(i=Array.isArray(i)?i:[i])[0]).transform)&&(s=this.getRotationInfo(s={rotationZ:i.transform.rotateZ,rotationX:i.transform.rotateX,rotationY:i.transform.rotateY}),this.viewNode.css({top:t+parseFloat(i.transform.translateY),left:e+parseFloat(i.transform.translateX),webkitTransform:!!s.rotated&&s.transform,transform:!!s.rotated&&s.transform}),s.rotated?this.viewNode.addClass("rotated"):this.viewNode.removeClass("rotated"))},handleScrollBars:function(a){var t=[],i=!1,s=!1,n=!1;(a=a||this.assetData.scrollingOptions)&&(-1<a.indexOf("y")&&(i=!0),-1<a.indexOf("x")&&(s=!0),-1<a.indexOf("paging"))&&(n=!0),a=!0===this.assetData.allowsMagnification||"true"===this.assetData.allowsMagnification,(i||a)&&t.push("vert"),(s||a)&&t.push("horiz"),0<t.length&&(this.scrollArea?($(this.scrollArea).attr("data-simplebar-direction",""),$(this.scrollArea)):($(this.viewNode).attr("data-simplebar-direction",""),$(this.viewNode))).simplebar({directions:t,widget:this,paging:n})},buildKeyFrame:function(e,t,i,s){var n={},a=this.getEasing(i);if(n.ease=a||s,this.buildKeyframeTransform(e,t,n,i),i.alpha&&(n.alpha=i.alpha.value),i.style)for(var o in i.style)i.style.hasOwnProperty(o)&&this.buildKeyFrameProperty(n,i,o);return i.rotationCenter&&"match_parent"!==this.assetData.layoutMode&&(s=a=50,e=(a=i.rotationCenter.x?100*i.rotationCenter.x:a)+"% "+(s=i.rotationCenter.y?100*i.rotationCenter.y:s)+"%",n.transformOrigin=e),n},buildKeyframeTransform:function(e,t,i,s){var n=this.baseRotation&&this.baseRotation.z||0;s.transform&&"match_parent"!==this.assetData.layoutMode&&(i.left=e+parseFloat(s.transform.translateX)+"px",i.top=t+parseFloat(s.transform.translateY)+"px",i.rotation=parseFloat(s.transform.rotateZ)+n+"deg",i.scaleX=parseFloat(s.transform.scaleX),i.scaleY=parseFloat(s.transform.scaleY))},buildKeyFrameProperty:function(e,n,i){var s;n=n.style[i],"shadow"===i?(s=!1,this instanceof PP.WidgetTypes.Image&&(s=!0),s=PP.CSSParser.createShadow(n,s),jQuery.each(s,function(a,o){e[a]=o}.bind(e))):"borderWidth"===i?e[i]=n+"px":(n.indexOf&&0===n.indexOf("#")&&(n=PP.CSSParser.hexToRgba(n)),e[i]=n)},numberOfAnimations:function(){var e=0,t=this.getEnterEvent();return t&&t.keyFrameAnimation&&t.keyFrameAnimation instanceof Array?e+=t.keyFrameAnimation.length:e++,e},stopMedia:function(){for(var e=0;e<this.childAssets.length;e++){var t=this.childAssets[e];t instanceof PP.WidgetTypes.Movie||t instanceof PP.WidgetTypes.Audio?t.stop():t instanceof PP.WidgetTypes.Popup?t.close():t.stopMedia()}},pauseMedia:function(){for(var e=0;e<this.childAssets.length;e++){var t=this.childAssets[e];t instanceof PP.WidgetTypes.Movie||t instanceof PP.WidgetTypes.Audio?"playing"===t.playbackState||"paused"===t.playbackState?t.pause():t.stop():t.pauseMedia()}},restartMedia:function(){for(var e=0;e<this.childAssets.length;e++){var t=this.childAssets[e];t instanceof PP.WidgetTypes.Movie||t instanceof PP.WidgetTypes.Audio?(t.seekTo(0),t.start()):t.restartMedia()}},resumeMedia:function(){for(var e=0;e<this.childAssets.length;e++){var t=this.childAssets[e];t instanceof PP.WidgetTypes.Movie||t instanceof PP.WidgetTypes.Audio?"paused"===t.playbackState&&t.start():t.resumeMedia()}},startWebviews:function(){for(var e=0;e<this.childAssets.length;e++){var t=this.childAssets[e];t instanceof PP.WidgetTypes.WebView?t.start():t.startWebviews()}},getEnterEvent:function(){if(this.assetData.event){Array.isArray(this.assetData.event)||(this.assetData.event=[this.assetData.event]);for(var e=0;e<this.assetData.event.length;e++){var t=this.assetData.event[e];if("enter"===t.type)return t}}},getScrollytellingEvent:function(){if(this.assetData.event){Array.isArray(this.assetData.event)||(this.assetData.event=[this.assetData.event]);for(var e=0;e<this.assetData.event.length;e++){var t=this.assetData.event[e];if("scrollytelling"===t.type)return t}}},createSwipeSignal:function(){this.signal=new PP.SwipeSignal(this)},onTouchStart:function(e){e.originalEvent.touches&&1===e.originalEvent.touches.length?PP.clicked={time:new Date,coords:{x:e.originalEvent.touches[0].screenX,y:e.originalEvent.touches[0].screenY}}:e.preventDefault()},onTouchEnd:function(e){PP.clicked&&new Date-PP.clicked.time<500&&Math.abs(e.originalEvent.changedTouches[0].screenX-PP.clicked.coords.x)<10&&Math.abs(e.originalEvent.changedTouches[0].screenY-PP.clicked.coords.y)<10&&this.onClick(e)},onMouseDown:function(e){1===e.which&&(PP.clicked={time:new Date,coords:{x:e.screenX,y:e.screenY}})},onMouseUp:function(e){1===e.which&&PP.clicked&&new Date-PP.clicked.time<500&&Math.abs(e.screenX-PP.clicked.coords.x)<20&&Math.abs(e.screenY-PP.clicked.coords.y)<20&&("WP"in window&&WP.instance&&WP.instance.getScroller()&&WP.instance.getScroller().stop(),this.onClick(e))},onClick:function(e){e.preventDefault();var t,i,s=this.assetData;if(s.activate){var n=[];if(s.activate.length)for(var a=0;a<s.activate.length;a++){var o=s.activate[a],r=o.type;if(r){(i={})[r]={};for(var l=Object.keys(o),u=0;u<l.length;u++)"type"!==(t=l[u])&&(i[r][t]=o[t]);n.push(i)}else n.push(o)}else for(var S=Object.keys(s.activate),f=0;f<S.length;f++)"type"!==(t=S[f])&&((i={})[t]=s.activate[t],n.push(i));this.ctx.actionHandler.processActions(n,this)}this instanceof PP.WidgetTypes.Image&&!s.activate&&!s.tileSize&&PP.Util.isImageTransparent(this.imgElement[0],this,e)?PP.Util.clickThroughElement(this.viewNode,e,[]):e.stopPropagation()},isControlledByScrollytelling:function(){var e=!1,t=this.assetData.event;Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++)if("scrollytelling"===t[i].type){e=!0;break}return e},onSwipeRight:function(e){return this.onSwipe(PP.SwipeSignal.RIGHT)},onSwipeLeft:function(e){return this.onSwipe(PP.SwipeSignal.LEFT)},onSwipeUp:function(e){return this.onSwipe(PP.SwipeSignal.UP)},onSwipeDown:function(e){return this.onSwipe(PP.SwipeSignal.DOWN)},onSwipe:function(e){if(this.assetData.event){var t,i=this.assetData.event;Array.isArray(i)||(i=[i]);for(var s=0;s<i.length;s++)i[s].type===e&&(t=this.assetData.event[s]);for(var n=[],a=Object.keys(t),o=0;o<a.length;o++){var r,l=a[o];"type"!==l&&((r={})[l]=t[l],n.push(r))}this.ctx.actionHandler.processActions(n,this)}}}),PP.WidgetTypes.Stage=function(e,t){this.init(e,t)},PP.WidgetTypes.Stage.parent=PP.Widget.prototype,PP.WidgetTypes.Stage.prototype=jQuery.extend(Object.create(PP.Widget.prototype),{constructor:PP.WidgetTypes.Stage,init:function(e,t){PP.WidgetTypes.Stage.parent.init.call(this,e,t),this.currentSceneIndex=0,this.stageId=t.id,this.isRoot=!1,this.parentStage=void 0,this.onJumpToElement=this.onJumpToElement.bind(this),this.onJumpToScene=this.onJumpToScene.bind(this),this.onJumpToNextScene=this.onJumpToNextScene.bind(this),this.onTogglePopup=this.onTogglePopup.bind(this)},load:function(){if(this.assetData.widgets&&this.assetData.widgets.scene)for(var e=this.assetData.widgets.scene instanceof Array?this.assetData.widgets.scene:[this.assetData.widgets.scene],t=0;t<e.length;t++){var i=e[t];i=PP.WidgetTypes.Factory.createElement("de.artifacts.purple.element.scene",this.ctx,i,{stage:this}),this.hasScene(i)||this.childAssets.push(i)}return PP.WidgetTypes.Stage.parent.load.call(this)},buildViewNode:function(){var e=PP.WidgetTypes.Stage.parent.buildViewNode.call(this);e.attr({"data-nodetype":"stage"}),e.addClass("pp-stage");for(var t=0;t<this.childAssets.length;t++)this.childAssets[t].setParent(e);return e.on(PP.ELEMENT_JUMP_TO,this.onJumpToElement),e.on(PP.SCENE_JUMP_TO,this.onJumpToScene),e.on(PP.SCENE_JUMP_TO_NEXT,this.onJumpToNextScene),e.on(PP.POPUP_TOGGLE,this.onTogglePopup),this.currentScene=this.childAssets[this.currentSceneIndex],this.buildNeighborScenes(),this.currentScene&&this.currentScene.buildViewNode(),this.fixStartPosition(),e},onJumpToElement:function(e,s){var i=s.getElementID(),n=(s=s.getAlign()).split("_")[1],a=s.split("_")[0],o=PP.WidgetTypes.Factory.getElementById(i);if(o=o||PP.WidgetTypes.Factory.getElementByAlias(i))for(var r=((s=o.scene)!==this.currentScene&&this.jumpToScene(o.scene.sceneId),s.stage.getPath()),l=0;l<r.length;l++)r[l].smoothScrollToAlignment(i=0===l?o:r[l-1],n,a)},onJumpToScene:function(e,t,i){e&&e.stopPropagation(),this.currentScene.sceneId!==t&&(this.jumpToScene(t,i),this.buildNeighborScenes())},jumpToPreviousScene:function(e){this.childAssets&&this.childAssets.length||this.restoreStage(),this.currentSceneIndex=this.childAssets.indexOf(this.currentScene);var t=this.childAssets.indexOf(this.currentScene)-1,i=!1;if(t<0&&(e?(t=this.childAssets.length-1,i=!0):t=0),this.currentSceneIndex!==t)return this.jumpToScene(this.childAssets[t].sceneId,i).then(function(){this.buildNeighborScenes()}.bind(this))},restoreStage:function(){var e;this.parentStage&&($.each(this.parentStage.childAssets,function(t,i){if(i.sceneId===this.scene.sceneId&&i.childAssets)return $.each(i.childAssets,function(s,n){if(n.assetData.id===this.assetData.id)return e=n,!1}.bind(this)),!1}.bind(this)),e)&&$.each(["childAssets","currentScene","onClick","onSwipe","onSwipeDown","onSiwpeLeft","onSwipeRight","onSwipeUp","result"],function(t,i){this[i]=e[i]}.bind(this))},onJumpToNextScene:function(i,t){t=!0===t||"true"===t||"true"===this.assetData.loopScenes,i&&i.stopPropagation(),this.childAssets&&this.childAssets.length||this.restoreStage(),this.currentSceneIndex=this.childAssets.indexOf(this.currentScene),i=this.childAssets.indexOf(this.currentScene)+1;var s=!1;if(t&&i>=this.childAssets.length?s=!(i=0):i>=this.childAssets.length&&(i=this.currentSceneIndex),this.currentSceneIndex!==i)return this.jumpToScene(this.childAssets[i].sceneId,s).then(function(){this.buildNeighborScenes()}.bind(this));jQuery(this.viewNode).trigger(PP.ALL_SCENES_PLAYED)},onTogglePopup:function(e,t){return e&&e.stopPropagation(),!!(e=this.getWidgetById(t))&&e.toggle()},stop:function(){PP.WidgetTypes.Stage.parent.stop.call(this),this.currentScene&&this.currentScene.stop(),this.ctx.globalStates.animation.setState("stopped")},pause:function(){this.currentScene&&(PP.WidgetTypes.Stage.parent.pause.call(this),this.currentScene.pause(),this.ctx.globalStates.animation.setState("paused"))},start:function(){this.ctx.globalStates.animation.stateIsIn(["paused"])?(PP.WidgetTypes.Stage.parent.resume.call(this),this.currentScene.resume()):PP.WidgetTypes.Stage.parent.start.call(this),this.ctx.globalStates.animation.setState("playing")},restart:function(){this.ctx.globalStates.animation.stateIsIn(["playing","paused","stopped"])&&(this.stop(),this.start())},getPath:function(){var e=[];return e.push(this),this.parentStage?e.concat(this.parentStage.getPath()):e},gotoFirstScene:function(){this.jumpToScene(this.childAssets[0].sceneId)},getSceneContainingStage:function(e){for(var t=0;t<this.childAssets.length;t++){var i=this.childAssets[t];if(i.contains(e))return i}},getTransition:function(e,t,i){var s;return this.childAssets.indexOf(e)<this.childAssets.indexOf(t)?i?(s=t.transitionData).forward=!1:(s=e.transitionData).forward=!0:i?(s=e.transitionData).forward=!0:(s=t.transitionData).forward=!1,s},jumpToScene:function(e,o,i){i=i||$.Deferred();var s,n=this.getSceneById(e);if(this.currentScene===n&&"running"===this.currentScene.animationState)return i.resolve(),i.promise();if(o=this.createTransition(n,o))return o;(n=PP.WidgetTypes.Factory.getElementById(e)).viewNode||(n=n.stage.getSceneById(e)).viewNode||n.buildViewNode();var a=this.getPath(),r=(o=n.stage.getPath(),this.getOriginStage(a,o));if(r){for(s=0;s<a.length&&a[s]!==r;s++)a[s]!==this&&a[s].gotoFirstScene();return this.triggerLastStage(n,r,o,i)}},triggerLastStage:function(e,t,i,s){for(var n=0;n<i.length;n++){var a=i[n],o=0===n?e:a.getSceneContainingStage(i[n-1]);if(o?a.jumpToScene(o.sceneId,void 0,s):e.stage.jumpToScene(e.sceneId,void 0,s),i[n]===t)return}},createTransition:function(e,t){return!(!e||!this.currentScene)&&(t=this.getTransition(this.currentScene,e,t),t=new PP.Transition(this,this.currentScene,e,t),this.currentScene=e,this.currentSceneIndex=this.childAssets.indexOf(this.currentScene),e.stage=this,t.start())},getOriginStage:function(e,t){for(var i=0;i<e.length;i++){var s=e[i];if(-1!==t.indexOf(s))return s}return null},getSceneById:function(e){for(var t=this.childAssets.length;t--;)if(this.childAssets[t].sceneId===e)return this.childAssets[t];return!1},numberOfAnimations:function(){return PP.WidgetTypes.Stage.parent.numberOfAnimations.call(this)+(this.currentScene?this.currentScene.numberOfAnimations():0)},buildNeighborScenes:function(){for(var e=0;e<this.childAssets.length;e++)e!==this.currentSceneIndex+1&&e!==this.currentSceneIndex+2||this.childAssets[e].buildViewNode(!0)},hasScene:function(e){for(var t=0;t<this.childAssets.length;t++)if(this.childAssets[t].sceneId===e.sceneId)return!0;return!1}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.Stage,["de.artifacts.purple.element.stage","stage"]),PP.WidgetTypes.Image=function(e,t){this.init(e,t)},PP.WidgetTypes.Image.parent=PP.Widget.prototype,PP.WidgetTypes.Image.prototype=jQuery.extend(Object.create(PP.Widget.prototype),{constructor:PP.WidgetTypes.Image,result:null,load:function(){var e,t,i;return this.result||(e=jQuery.Deferred(),this.assetData.tileSize||!this.assetData.imageURL&&!this.assetData.contentURL?(e.notify(),e.resolve()):(t=this.getURL(),(i=new Image).src=this.ctx.config.resourceFileByFileName(t),i.onload=function(){this.assetData.style.shadow&&(this.isTransparent=!0),e.notify(),e.resolve("image",i),this.viewNode&&this.viewNode.css("pointer-events","auto")}.bind(this),i.onerror=function(s){var n=new XMLHttpRequest;n.open("GET",i.src),n.send(),n.addEventListener("load",function(a){PP.externalConfig&&PP.externalConfig.onResourceLoadError(n.status,this)}.bind(this)),e.notify(),e.resolve()}.bind(this)),this.result=e.promise(),this.result.count=1),this.result.promise()},buildViewNode:function(){var e=PP.WidgetTypes.Image.parent.buildViewNode.call(this);return e.attr({"data-nodetype":"image"}),this.assetData.tileSize?this.appendImageTiles(e):e.append(this.buildImageView(this.assetData.id+"_image")),this.fixStartPosition(),this.load(),this.result.then(function(){this.viewNode.css("pointer-events","auto")}.bind(this)),e},appendImageTiles:function(e){for(var t=parseInt(this.assetData.tileSize),i=parseInt(this.assetData.imageWidth),s=parseInt(this.assetData.imageHeight),n=parseInt(this.assetData.width),a=(parseInt(this.assetData.height),Math.ceil(i/t)),o=Math.ceil(s/t),r=i/n,l=0;l<o;l++){var u=t;l===o-1&&(u=s-t*l);for(var S=0;S<a;S++)e.append(this.buildTileImageView(S,l,S===a-1?i-t*S:t,u,t,r))}},buildTileImageView:function(e,t,i,s,n,a){var o,r,l;if(this.assetData.imageURL||this.assetData.contentURL)return r=(l=(o=this.getURL()).split("."))[l.length-2],l[l.length-2]=r+(r="_"+e+"_"+t),o=l.join("."),(l=jQuery("<img>").addClass("pp-image")).attr({id:this.assetData.id+"_image"+r,draggable:!1,src:this.ctx.config.resourceFileByFileName(o)}),l.css({position:"absolute",width:i/a,height:s/a,left:e*n/a,top:t*n/a}),l},isPDF:function(){return"de.artifacts.purple.element.pdf"===this.assetData.uti||"pdf"===this.assetData.uti},getURL:function(){var e,t=this.assetData.imageURL;return this.isPDF()&&(e=this.assetData.contentURL,this.assetData.pageIndex&&(e=e+"_"+this.assetData.pageIndex),t="png"===this.assetData.imageType?e+".png":e+".jpeg"),t},buildImageView:function(e){var t;if(this.assetData.imageURL||this.assetData.contentURL)return t=this.getURL(),this.imgElement=jQuery("<img>").addClass("pp-image"),this.imgElement.attr({id:e,draggable:!1,src:this.ctx.config.resourceFileByFileName(t)}),this.applyCSS(),this.imgElement},applyCSS:function(){PP.WidgetTypes.Image.parent.applyCSS.call(this),this.assetData.contentsWidth&&this.assetData.contentsHeight&&"match_parent"!==this.assetData.layoutMode&&($(this.imgElement).css({width:this.assetData.contentsWidth+"px",height:this.assetData.contentsHeight+"px"}),this.viewNode.css({overflow:"hidden"}))}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.Image,["de.artifacts.purple.element.image","de.artifacts.purple.element.button","public.image","image","pdf"]),PP.WidgetTypes.Movie=function(e,t){this.init(e,t)},PP.WidgetTypes.Movie.parent=PP.Widget.prototype,PP.WidgetTypes.Movie.prototype=jQuery.extend(Object.create(PP.Widget.prototype),{constructor:PP.WidgetTypes.Movie,videoView:null,playbackState:"stopped",userPaused:!1,autoPlayDone:!1,lastSeek:0,load:function(){var e;return(!this.assetData.contentURL||"mp4"===this.getType(this.ctx.config.resourceFileByFileName(this.assetData.contentURL)))&&(this.promise||(this.deferred=jQuery.Deferred(),this.promise=this.deferred.promise(),e=PP.PreloadManager.addToQueue({asset:this,playerId:this.ctx.config.settings.id}),this.promise.count=e?0:1),this.promise)},getType:function(e){return(e=(e=e.split("?")[0]).split("."))[e.length-1]},executeLoad:function(e){if(this.videoView&&!1!==this.ctx.config.get("preloadVideos")&&URL.createObjectURL)this.notifyPreloadManager();else{var t="",i=(this.videoView=jQuery("<video>"),this.assetData.contentURL&&(t=this.ctx.config.resourceFileByFileName(this.assetData.contentURL)),[]);if(this.assetData.resource)for(var s=this.assetData.resource,n=0;n<s.length;n++){var a=s[n];a["xlink:href"]!==this.assetData.contentURL&&i.push(a["xlink:href"])}this.promise||(this.deferred=jQuery.Deferred(),this.promise=this.deferred.promise()),!1===this.ctx.config.get("preloadVideos")&&!this.isControlledByScrollytelling()||!URL.createObjectURL?(this.setSourceElements(t,i,e),this.notifyPreloadManager()):this.downloadAsBlob(t,i,-1,e),PP.Util.isIOS()&&this.videoView.on("loadedmetadata",function(){this.play(),this.pause()}),this.videoView.on("canplay",function(){this.progresstextRemaining&&this.progresstextRemaining.html(this.getTimeString(this.videoView[0].duration)),this.fixVideoPosition()}.bind(this))}},notifyPreloadManager:function(){var e=this;e.deferred.resolve("video",e.videoView),e.viewNode&&e.viewNode.css("pointer-events","auto"),e.videoView&&e.videoView.css("pointer-events","auto"),e.resolved=!0,e.deferred.count=0},setSourceElements:function(e,t,i){var s,n=this;n.videoView.attr("src",e),e&&((s=jQuery("<source>")).attr("src",e),s.attr("type","video/"+n.getType(e)),n.videoView.append(s));for(var a=0;a<t.length;a++){var o=t[a],r=jQuery("<source>");r.attr("src",o),r.attr("type","video/"+n.getType(o)),n.videoView.append(r)}i.call(n)},downloadAsBlob:function(e,t,i,s){var n,a,o=this,r=this.videoView[0],l=-1<i?t[i]:e;l?((n=PP.PreloadManager.blobMap[l])||(n=jQuery.Deferred(),(a=new XMLHttpRequest).open("GET",l,!0),a.responseType="blob",PP.PreloadManager.blobMap[l]=n,a.onload=function(){var u;200===this.status&&(u=URL.createObjectURL(this.response),n.resolve(u))},a.onerror=function(){delete PP.PreloadManager.blobMap[l],o.notifyPreloadManager(),o.downloadAsBlob(e,t,i+1,s)},a.onreadystatechange=function(){var u;4===a.readyState&&(200===a.status?(u=URL.createObjectURL(this.response),n.resolve(u)):(delete PP.PreloadManager.blobMap[l],o.notifyPreloadManager(),o.downloadAsBlob(e,t,i+1,s)))},a.send()),jQuery.when(n.promise()).then(function(u){r.src=u,o.notifyPreloadManager(),s.call(o)})):(o.setSourceElements(e,t,s),o.notifyPreloadManager())},fixVideoPosition:function(){var e,t,i,s,n=this.videoView[0].videoWidth,a=this.videoView[0].videoHeight;"match_parent"===this.assetData.layoutMode?(this.viewNode.css("height","100%"),this.viewNode.css("width","100%")):(i=n/a)!=(s=(e=this.width)/(t=this.height))&&(i<s?(this.videoView.css("width",i=n*(t/a)),this.videoView.css("margin-left",(e-i)/2)):(this.videoView.css("height",s=a*(e/n)),this.videoView.css("margin-top",(t-s)/2)))},destroy:function(){var e;!this.videoView||!1!==this.ctx.config.get("preloadVideos")&&URL.createObjectURL||((e=this.videoView.get(0)).pause(0),e.src="",this.videoView.empty(),e.load(),this.videoView.remove())},buildViewNode:function(){return this.viewNode||(this.viewNode=PP.WidgetTypes.Movie.parent.buildViewNode.call(this),this.viewNode.addClass("pp-video"),PP.Util.isSafari()&&0===parseInt(this.assetData.viewPosition,10)&&this.viewNode.css({"z-index":-1})),this.videoView||(this.videoView=jQuery("<video>")),this.videoView.attr({id:this.assetData.id+"_video",loop:"true"===this.assetData.loop,playsinline:!0,muted:!0}),"true"===this.assetData.autoplay&&this.videoView.attr({autoplay:!0}),this.videoView.appendTo(this.viewNode),this.videoView.on("ended",function(){this.playbackState="stopped",this.fullScreen&&"leaveFullscreen"===this.assetData.stopBehavior&&this.exitFullScreen(this.videoView,this.viewNode)}.bind(this)),"true"!==this.assetData.showControls||this.isControlledByScrollytelling()||this.createControls(this.viewNode,this.videoView),this.fixStartPosition(),this.viewNode},setControlTimeout:function(){this.clearControlTimeout(!0),this.controlTimeout=window.setTimeout(function(){this.viewNode.find(".pp-video-controls").fadeOut(),delete this.controlTimeout}.bind(this),3e3)},clearControlTimeout:function(e){window.clearTimeout(this.controlTimeout),delete this.controlTimeout,e&&this.viewNode&&this.viewNode.find(".pp-video-controls").stop().fadeIn()},createControls:function(e,t){e.css("pointer-events","auto"),t.css("pointer-events","auto");var i,s=jQuery("<div>").addClass("pp-video-controls"),n=((s.appendTo(e),n=jQuery("<div>").addClass("pp-video pp-button pp-bigplay active")).appendTo(s),n.on("touchstart",function(l){l.stopPropagation()}),n.on("click",function(l){this.toggleVideoState(l),l.stopPropagation()}.bind(this)),jQuery("<div>").addClass("pp-controls")),a=this,o=("true"===this.assetData.allowWindowModeToggle&&(t[0].requestFullscreen||t[0].mozRequestFullScreen||t[0].webkitRequestFullscreen||t[0].msRequestFullscreen)&&((i=jQuery("<div>").addClass("pp-fullscreen pp-button active").attr({title:PP.i18n.get("FULLSCREEN")})).appendTo(n),i.on("touchstart",function(l){l.stopPropagation()}),i.on("click",function(l){a.fullScreen?a.exitFullScreen(t,e,l):a.enterFullScreen(t,e,l),"playing"===a.playbackState?a.setControlTimeout():a.clearControlTimeout(!0),l.stopPropagation()})),jQuery("<div>").addClass("timeline")),r=(o.appendTo(n),jQuery("<div>").addClass("progress"));r.appendTo(o),this.progresstext=jQuery("<div>").addClass("progresstext").html("00:00"),this.progresstext.appendTo(n),this.progresstextRemaining=jQuery("<div>").addClass("progresstext remaining"),this.progresstextRemaining.appendTo(n),this.progresstextRemaining.html(this.getTimeString(t[0].duration)),o.on("mousedown touchstart",function(l){l.stopPropagation();var u=l.offsetX;if(void 0===u)try{u=l.originalEvent.touches[0].pageX-l.originalEvent.touches[0].target.offsetLeft}catch(S){}this.seeking=!0,u=u/$(o).width()*this.videoView[0].duration,this.mediaSeekTo(u),"playing"===this.playbackState?this.setControlTimeout():this.clearControlTimeout(!0)}.bind(this)),s.on("mousemove touchmove",function(l){if(this.seeking){if(void 0===(S=l.clientX))try{S=l.originalEvent.touches[0].clientX}catch(f){}var u=this.fullScreen?1:this.ctx.config.get("scaleFactor"),S=(S-$(o).offset().left)/($(o).width()*u)*this.videoView[0].duration;this.mediaSeekTo(S),"playing"===this.playbackState?this.setControlTimeout():this.clearControlTimeout(!0)}}.bind(this)),s.on("mouseup touchend",function(l){this.seeking&&(this.seeking=!1,"playing"===this.playbackState?this.setControlTimeout():this.clearControlTimeout(!0),this.seekMouseUp=!0)}.bind(this)),n.appendTo(s),this.viewNode.on("touchstart",function(l){l.stopPropagation()}),this.videoView.on("touchstart",function(l){l.stopPropagation()}),this.viewNode.on("click",function(){this.fullScreen&&"playing"!==this.playbackState&&!this.seekMouseUp?(this.clearControlTimeout(!1),s.fadeToggle()):"playing"!==this.playbackState||this.controlTimeout||this.setControlTimeout(),this.seekMouseUp=!1}.bind(this)),t.on("play playing",function(){e.removeClass("paused"),e.addClass("playing")}),t.on("pause",function(l){e.removeClass("playing"),e.addClass("paused")}.bind(this)),t.on("ended",function(){e.removeClass("playing"),e.addClass("paused"),this.clearControlTimeout(!0)}.bind(this)),t.on("timeupdate",function(){r.css("width",Math.floor(100*t[0].currentTime/t[0].duration)+"%"),this.progresstext.html(this.getTimeString(t[0].currentTime))}.bind(this))},stop:function(e){if(this.videoView&&this.videoView[0])try{this.videoView[0].currentTime=0,this.videoView[0].pause()}catch(t){}this.playbackState="stopped",e&&(this.userPaused=!1,this.autoPlayDone=!1),PP.WidgetTypes.Movie.parent.stop.call(this)},pause:function(e){PP.WidgetTypes.Movie.parent.pause.call(this),this.timeout&&this.timeout.pause(),this.pauseVideo(e)},getMediaDuration:function(){return this.videoView[0]?this.videoView[0].duration:0},pauseVideo:function(e){this.videoView&&"playing"===this.playbackState&&(this.videoView[0].pause(),this.playbackState="paused",e)&&(this.userPaused=!0),this.clearControlTimeout(!0)},resume:function(){"mp4"!==this.getType(this.videoView[0].src)&&this.executeLoad(this.resume),PP.WidgetTypes.Movie.parent.resume.call(this),this.videoView&&("paused"===this.playbackState||"stopped"===this.playbackState&&"true"===this.assetData.autoplay&&!1===this.autoPlayDone)?(this.videoView[0].play(),this.playbackState="playing"):this.timeout&&this.timeout.resume()},toggleVideoState:function(e){"playing"===this.playbackState?this.pauseVideo(!0):this.startVideo(e)},startVideo:function(e){var t;this.videoView?this.videoView&&(this.fullScreen||"enterFullscreen"!==this.assetData.startBehavior||"stopped"!==this.playbackState||this.enterFullScreen(this.videoView,this.viewNode,e),this.timeout&&(this.timeout.clear(),delete this.timeout),this.userPaused=!1,(e=this.videoView[0].play())&&"function"==typeof e.then&&(t=this.videoView[0],e.then(function(){},function(i){console.log(i),$("body").one("mousedown",function(){setTimeout(function(){t.play()},50)})})),this.playbackState="playing",this.setControlTimeout()):this.executeLoad(this.startVideo)},start:function(){PP.WidgetTypes.Movie.parent.start.call(this),("true"!==this.assetData.autoplay||this.autoPlayDone)&&"paused"!==this.playbackState||this.userPaused||this.assetData.signalInput||(0<this.assetData.startDelay?this.timeout=new PP.Util.Timer(function(){this.startDelayElapsed=!0,this.assetData.playbackMatchesVisibility&&!PP.Util.isElementInViewport(this.videoView)||("true"===this.assetData.autoplay&&(this.autoPlayDone=!0),this.startVideo())}.bind(this),1e3*this.assetData.startDelay):this.assetData.playbackMatchesVisibility&&!PP.Util.isElementInViewport(this.videoView)||("true"===this.assetData.autoplay&&(this.autoPlayDone=!0),this.startVideo()))},mediaSeekTo:function(e){var t;40<=Date.now()-this.lastSeek&&(this.lastSeek=Date.now(),t=this.videoView?this.videoView[0]:{},$.isNumeric(t.duration))&&(t.currentTime=e)},enterFullScreen:function(e,t,i){i&&(i=!1,t[0].requestFullscreen?(i=!0,t[0].requestFullscreen()):t[0].mozRequestFullScreen?(i=!0,t[0].mozRequestFullScreen()):t[0].webkitRequestFullScreen?(i=!0,t[0].webkitRequestFullscreen()):t[0].msRequestFullscreen&&(i=!0,t[0].msRequestFullscreen()),!0===i)&&(t.addClass("fullscreen"),this.fullScreen=!0,jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange MSFullscreenChange",function(){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||this.exitFullScreen(e,t)}.bind(this)))},exitFullScreen:function(e,t){document.exitFullScreen?document.exitFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),t.removeClass("fullscreen"),jQuery(document).off("fullscreenchange mozfullscreenchange webkitfullscreenchange MSFullscreenChange"),this.fullScreen=!1,"playing"!==e.playbackState&&t.find(".pp-video-controls").fadeIn()},getTimeString:function(i){isNaN(i)&&(i=0),i=Math.floor(i);var s=Math.floor(i/60),t=Math.floor(s/60);return t&&(s%=t),s=(s=s<10?"0"+s:s)+":"+(i=(i%=60)<10?"0"+i:i),(t=0<t&&t<10?"0"+t:t)?t+":"+s:s}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.Movie,["de.artifacts.purple.element.movie","public.movie","video"]),PP.WidgetTypes.Rect=function(e,t){this.init(e,t)},PP.WidgetTypes.Rect.parent=PP.Widget.prototype,PP.WidgetTypes.Rect.prototype=jQuery.extend(Object.create(PP.Widget.prototype),{constructor:PP.WidgetTypes.Rect,buildViewNode:function(){var e=PP.WidgetTypes.Rect.parent.buildViewNode.call(this);return e.attr({"data-nodetype":"rect"}),e.addClass("pRect"),this.fixStartPosition(),e}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.Rect,["de.artifacts.purple.element.rect","rect"]),PP.WidgetTypes.Svg=function(e,t){this.init(e,t)},PP.WidgetTypes.Svg.parent=PP.Widget.prototype,PP.WidgetTypes.Svg.prototype=jQuery.extend(Object.create(PP.Widget.prototype),{constructor:PP.WidgetTypes.Svg,buildViewNode:function(){var e=PP.WidgetTypes.Svg.parent.buildViewNode.call(this);return e.attr({"data-nodetype":"svgimage"}),e.addClass("pSVG"),this.fixStartPosition(),e}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.Svg,["de.artifacts.purple.element.svg-image","public.svg-image"]),PP.WidgetTypes.Text=function(e,t){this.init(e,t)},PP.WidgetTypes.Text.parent=PP.Widget.prototype,PP.WidgetTypes.Text.prototype=jQuery.extend(Object.create(PP.Widget.prototype),{constructor:PP.WidgetTypes.Text,scrollArea:null,signal:null,buildViewNode:function(){var e=PP.WidgetTypes.Text.parent.buildViewNode.call(this),t=(e.attr({"data-nodetype":"text"}),this.assetData),i=(void 0!==t.contentURI&&void 0!==t.contentProperty&&""!==t.contentURI&&""!==t.contentProperty?jQuery.getJSON(t.contentURI,function(s){e.html(s[t.contentProperty])}):(this.setStyles(),this.setScrolling(e),t.span?e.html(t.span):(t.textContent=t.textContent.replace(/&amp;nbsp;/g,"&nbsp;"),t.textContent=PP.Util.replaceAll(t.textContent,"<br></br>","<br/>"),this.scrollArea=$("<div></div>").html(t.textContent).css({height:"100%"}),e.html(this.scrollArea).addClass("antiscroll-wrap"),this.assetData.scrollyTellingReferencedComposition&&this.scene.stage.viewNode.on(PP.ASSETS_LOADED,function(){this.signal instanceof PP.ScrollPositionSignal||this.createSignal()}.bind(this)))),this.viewNode.on("scroll",function(){this.onScroll()}.bind(this)),"true"!==this.assetData.fadeOut&&!0!==this.assetData.fadeOut||!this.assetData.scrollingOptions||(0<this.getMaxScroll(!0)?this.viewNode.addClass("fadeOut"):this.viewNode.removeClass("fadeOut")),this.createSvgMask(),this.fixStartPosition(),this);return this.viewNode.find("a").on("click",function(){return this.href&&(0==this.href.indexOf("http://")||0===this.href.indexOf("https://")||0===this.href.indexOf("tel:")||0===this.href.indexOf("mailto:")?window.open(this.href):i.ctx.actionHandler.processAction({open:{URL:this.href}},i)),!1}),0===this.viewNode.text().trim().length&&(this.viewNode.html(""),PP.Util.isVisible(this.viewNode)||this.viewNode.css("pointer-events","none")),e},createSvgMask:function(){var e,t;PP.Util.isFirefox()&&(t=this.assetData.width,e=this.assetData.height,"match_parent"===this.assetData.layoutMode&&(t=this.scene.viewNode.width(),e=this.scene.viewNode.height()),t=jQuery('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="0" height="0"><defs><linearGradient id="gradient-'+this.assetData.id+'" x1="0" y1="00%" x2 ="0" y2="100%"><stop stop-color="white" offset="0"/> <stop stop-color="white" offset="0.9"/> <stop stop-color="black" offset="1"/> </linearGradient><mask id="mask-'+this.assetData.id+'"><rect y="0" width="'+t+'" height="'+e+'" fill="url(#gradient-'+this.assetData.id+')" /></mask></defs></svg>'),this.viewNode.append(t),this.viewNode.css("mask","url(#mask-"+this.assetData.id+")"))},setStyles:function(){if(this.assetData.style){var e=jQuery("style.textFrame");if(0===e.length&&(e=jQuery('<style class="textFrame" type="text/css"></style>').appendTo("head")),this.assetData.style.text){for(var t=this.assetData.style.text.split("\n"),i=0;i<t.length;++i)t[i].trim()&&(t[i]="#"+this.assetData.id+" "+t[i]);e.append(t.join("\n"))}}},createSignal:function(){this.signal=new PP.ScrollPositionSignal(this),this.signal.addEventListener(PP.ScrollPositionSignal.MARK_UP,this.onMarkSignal.bind(this,"scroll_up")),this.signal.addEventListener(PP.ScrollPositionSignal.MARK_DOWN,this.onMarkSignal.bind(this,"scroll_down"))},onMarkSignal:function(e,t,i){var s=null;Array.isArray(i.marker.event)||(i.marker.event=[i.marker.event]);for(var n=0;n<i.marker.event.length;n++)if(i.marker.event[n].name===e){s=i.marker.event[n];break}null!==s&&this.ctx.actionHandler.processAction(s,this)},onScroll:function(){var e;"true"!==this.assetData.fadeOut&&!0!==this.assetData.fadeOut||(e=this.viewNode.find(".simplebar-scroll-content").get(0).scrollTop,this.getMaxScroll()<=e?this.viewNode.removeClass("fadeOut"):this.viewNode.addClass("fadeOut"))},getMaxScroll:function(e){if(!this.viewNode)return 0;e&&$("body").append(this.viewNode);var t=this.viewNode.find("span").last().get(0);return t?(t=t.offsetTop+t.offsetHeight-this.viewNode.get(0).offsetHeight,e&&this.viewNode.detach(),t):0},setScrolling:function(e){this.assetData.scrollingOptions||e.css("overflow","hidden")},start:function(){PP.WidgetTypes.Text.parent.start.call(this),"true"!==this.assetData.fadeOut&&!0!==this.assetData.fadeOut||!this.assetData.scrollingOptions||(0<this.getMaxScroll()?this.viewNode.addClass("fadeOut"):this.viewNode.removeClass("fadeOut"))},resizeResponsive:function(){PP.WidgetTypes.Text.parent.resizeResponsive.call(this),this.viewNode&&("true"===this.assetData.fadeOut||!0===this.assetData.fadeOut)&&this.assetData.scrollingOptions&&(0<this.getMaxScroll()?this.viewNode.addClass("fadeOut"):this.viewNode.removeClass("fadeOut"))}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.Text,["de.artifacts.purple.element.text","public.text","textFrame"]),PP.WidgetTypes.Button=function(e,t){this.init(e,t)},PP.WidgetTypes.Button.parent=PP.WidgetTypes.Image.prototype,PP.WidgetTypes.Button.prototype=jQuery.extend(Object.create(PP.WidgetTypes.Image.prototype),{constructor:PP.WidgetTypes.Button,init:function(e,t){t.imageURL=t.activeImageURL,PP.WidgetTypes.Button.parent.init.call(this,e,t)},buildViewNode:function(){var e=PP.WidgetTypes.Button.parent.buildViewNode.call(this);return e.attr({"data-nodetype":"button"}),e.addClass("pp-button"),this.fixStartPosition(),e}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.Button,["button"]),PP.WidgetTypes.Slider=function(e,t){this.init(e,t)},PP.WidgetTypes.Slider.parent=PP.Widget.prototype,PP.WidgetTypes.Slider.prototype=jQuery.extend(Object.create(PP.Widget.prototype),{constructor:PP.WidgetTypes.Slider,currentPage:0,controlsView:null,init:function(e,t){PP.WidgetTypes.Slider.parent.init.call(this,e,t),this.pages=t.pages,this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this)},buildViewNode:function(){var e=PP.WidgetTypes.Slider.parent.buildViewNode.call(this);return e.addClass("pp-slider"),this.contentView=jQuery('<div class="pp-content">').appendTo(e),this.assetData.pageIndicatorColor&&this.buildControlsView().appendTo(e),this.fixStartPosition(),e},buildControlsView:function(){var e=this.controlsView=jQuery('<div class="pp-controls">'),t=PP.CSSParser.hexToRgba(this.assetData.pageIndicatorColor);e.css("border-color",t);for(var i=0;i<this.pages;++i)jQuery('<div class="pp-indicator">').appendTo(e).click(this.moveTo.bind(this,i));return this.prevView=jQuery('<div class="pp-prev">').appendTo(e).click(this.prev.bind(this)),this.nextView=jQuery('<div class="pp-next">').appendTo(e).click(this.next.bind(this)),this.updateControls(),e},resize:function(e,t,i){PP.WidgetTypes.Slider.parent.resize.call(this,e,t),void 0!==i&&(this.pages=i,this.controlsView)&&this.controlsView.replaceWith(this.buildControlsView()),this.moveTo(this.currentPage,!0)},start:function(){PP.WidgetTypes.Slider.parent.start.call(this),this.viewNode.on("touchstart pointerdown MSPointerDown",this.onTouchStart),this.viewNode.on("touchmove pointermove MSPointerMove",this.onTouchMove),this.viewNode.on("touchend pointerup MSPointerUp",this.onTouchEnd)},stop:function(){this.viewNode.off("touchstart pointerdown MSPointerDown",this.onTouchStart),this.viewNode.off("touchmove pointermove MSPointerMove",this.onTouchMove),this.viewNode.off("touchend pointerup MSPointerUp",this.onTouchEnd),PP.WidgetTypes.Slider.parent.stop.call(this)},updateControls:function(){this.controlsView&&(this.controlsView.find(".pp-indicator").removeClass("pp-active").eq(this.currentPage).addClass("pp-active"),0===this.currentPage?this.prevView.removeClass("pp-active"):this.prevView.addClass("pp-active"),this.currentPage===this.pages-1?this.nextView.removeClass("pp-active"):this.nextView.addClass("pp-active"))},moveTo:function(e,t){(e=e<0?0:e)>=this.pages&&(e=this.pages-1);var i=this.currentPage;this.currentPage=e,this.contentView.css({webkitTransition:!0===t?"-webkit-transform 0.1s ease":"-webkit-transform .5s ease",transition:!0===t?"transform 0.1s ease":"transform .5s ease",webkitTransform:"translateX("+-e*this.width+"px)",transform:"translateX("+-e*this.width+"px)"}),this.updateControls(),i!==e&&this.viewNode.trigger("pp:pagechange",[this.currentPage])},next:function(){this.moveTo(this.currentPage+1)},prev:function(){this.moveTo(this.currentPage-1)},onTouchStart:function(e){var t;e.originalEvent.touches&&1===e.originalEvent.touches.length?this.touch={id:(t=e.originalEvent.targetTouches[0]).identifier,x:t.pageX,y:t.pageY}:e.originalEvent.pointerId&&(this.touch={id:e.originalEvent.pointerId,x:e.originalEvent.pageX,y:e.originalEvent.pageY})},onTouchMove:function(e){(e.originalEvent.touches&&1<e.originalEvent.touches.length||void 0!==e.originalEvent.pointerId&&this.touch.id!==e.originalEvent.pointerId)&&(this.touch=null);var t=this.getTouchDelta(e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]||e.originalEvent);t&&(Math.abs(t.y)>Math.abs(t.x)?this.touch=null:e.preventDefault())},onTouchEnd:function(e){var t=this.getTouchDelta(e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]||e.originalEvent);t&&(50<t.x?(this.prev(),e.preventDefault()):t.x<-50&&(this.next(),e.preventDefault())),this.touch=null},getTouchDelta:function(e){return this.touch?{x:e.pageX-this.touch.x,y:e.pageY-this.touch.y}:null}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.Slider,["de.artifacts.purple.element.slider","slider"]),PP.WidgetTypes.Gallery=function(e,t){this.init(e,t)},PP.WidgetTypes.Gallery.parent=PP.Widget.prototype,PP.WidgetTypes.Gallery.prototype=jQuery.extend(Object.create(PP.Widget.prototype),{constructor:PP.WidgetTypes.Gallery,thumbsTimer:0,previewsWidth:0,previewsHeight:0,thumbsWidth:0,thumbsHeight:0,inFullScreen:!1,touchScale:1,touchDistance:-1,enableMouseMove:!0,init:function(e,t){PP.WidgetTypes.Gallery.parent.init.call(this,e,t),this.previews=[],this.fullsizes=[],this.captions=[],this.thumbnails=[],this.showThumbnails="true"===this.assetData.showThumbnails,this.title=this.createWidget({textFrame:this.assetData.title});for(var i=this.assetData.galleryItem.length?this.assetData.galleryItem:[this.assetData.galleryItem],s=0;s<i.length;s++){var n,a=(n=i[s]).fullsizeImage?this.createWidget({image:n.fullsizeImage}):this.createWidget(n.widgets);this.fullsizes.push(a),this.previews.push(n.previewImage?this.createWidget({image:n.previewImage}):a),this.captions.push(n.caption?this.createWidget({textFrame:n.caption}):null),this.showThumbnails&&(a=this.createWidget({image:n.thumbnail}),this.thumbnails.push(a),this.thumbsWidth=Math.max(this.thumbsWidth,a.width),this.thumbsHeight=Math.max(this.thumbsHeight,a.height))}this.itemSlider=this.createWidget({slider:{pages:this.previews.length,width:this.previewsWidth,height:this.previewsHeight,pageIndicatorColor:this.showThumbnails?null:this.assetData.pageIndicatorColor}}),this.showThumbnails&&(this.thumbsSlider=this.createWidget({slider:{pages:1,height:this.thumbsHeight+60,pageIndicatorColor:this.assetData.pageIndicatorColor}})),this.onPageChange=this.onPageChange.bind(this),this.onResize=this.onResize.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onFullScreenChange=this.onFullScreenChange.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onDoubleClick=this.onDoubleClick.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this)},buildViewNode:function(){var e=PP.WidgetTypes.Gallery.parent.buildViewNode.call(this),t=(e.attr({"data-nodetype":"imagegallery"}),e.addClass("pp-gallery"),this.title.buildViewNode().addClass("pp-title"));return t.css({textAlign:"center",paddingTop:"11px",fontWeight:"bold"}),e.append(t),jQuery('<div class="pp-close">').appendTo(e).click(this.exitFullScreen.bind(this)),e.append(this.buildItemView()),this.showThumbnails&&e.append(this.buildThumbnailsView()),this.resize(),this.fixStartPosition(),e},buildItemView:function(){var e=this.itemSlider.buildViewNode(),t=(e.on("pp:pagechange",this.onPageChange),e.find(".pp-content"));t.addClass("pp-items");for(var i=0;i<this.previews.length;i++){var s=this.previews[i],n=jQuery('<div class="pp-item">').appendTo(t);n.append(s.buildViewNode()),s!==this.fullsizes[i]&&n.append(this.fullsizes[i].buildViewNode().hide()),this.captions[i]&&this.captions[i].buildViewNode().appendTo(n).css({top:"auto",bottom:this.showThumbnails?0:"30px",backgroundColor:"rgba(255,255,255,0.8)",marginBottom:"5px",padding:"10px"})}return e.on("dblclick",this.onDoubleClick),e},buildThumbnailsView:function(){var e=this.thumbsSlider.buildViewNode(),t=(e.addClass("pp-thumbnails"),e.find(".pp-content")),i=this.itemSlider,s=PP.CSSParser.hexToRgba(this.assetData.thumbnailBorderColor);return t.css("border-color",s),this.thumbnails.forEach(function(n,a){var o=jQuery('<div class="pp-thumbnail">').appendTo(t).append(n.buildViewNode());o.css({width:n.width+20+"px",height:n.height+20+"px"}),a||o.addClass("pp-active"),o.click(i.moveTo.bind(i,a))}),e},start:function(){PP.WidgetTypes.Gallery.parent.start.call(this),this.itemSlider.viewNode.on("touchstart pointerdown MSPointerDown",this.onTouchStart),this.itemSlider.viewNode.on("touchmove pointermove MSPointerMove",this.onTouchMove),this.itemSlider.viewNode.on("touchend pointerup MSPointerUp",this.onTouchEnd)},stop:function(){this.itemSlider.viewNode.off("touchstart pointerdown MSPointerDown",this.onTouchStart),this.itemSlider.viewNode.off("touchmove pointermove MSPointerMove",this.onTouchMove),this.itemSlider.viewNode.off("touchend pointerup MSPointerUp",this.onTouchEnd),PP.WidgetTypes.Gallery.parent.stop.call(this)},resize:function(e,t){PP.WidgetTypes.Gallery.parent.resize.call(this,e,t);for(var i,s=this.inFullScreen?this.width:this.innerWidth,n=this.inFullScreen?this.height:this.innerHeight,a=(this.previewsWidth=s,this.previewsHeight=n-this.title.height,this.previewsHeight-=this.showThumbnails?this.inFullScreen?0:this.thumbsHeight+60:30,this.itemSlider.resize(this.previewsWidth,this.previewsHeight),this.inFullScreen?this.fullsizes:this.previews),o=0;o<a.length;o++){var l,r=(e=this.previewsWidth)/(i=a[o]).width;i.viewNode.css({webkitTransform:"scale("+(l=(l=(t=this.previewsHeight-(this.captions[o]?this.captions[o].height:0))/i.height)<r?l:r)+","+l+")",transform:"scale("+l+","+l+")",left:(e-i.width)/2+"px",top:(t-i.height)/2+"px"})}this.showThumbnails&&(this.thumbsPerPage=Math.floor(s/(this.thumbsWidth+24)),this.thumbsSlider.resize(e=this.thumbsPerPage*(this.thumbsWidth+24),void 0,Math.ceil(this.thumbnails.length/this.thumbsPerPage)),this.thumbsSlider.viewNode.css("left",(s-e)/2+"px"))},enterFullScreen:function(){if(!this.inFullScreen){this.inFullScreen=!0,document.documentElement.requestFullscreen?document.documentElement.requestFullscreen():document.documentElement.mozRequestFullScreen?document.documentElement.mozRequestFullScreen():document.documentElement.webkitRequestFullscreen&&document.documentElement.webkitRequestFullscreen(),jQuery("body").addClass("pp-fullscreen"),this.viewNode.addClass("pp-fullscreen").css({backgroundColor:this.assetData.fullscreenBackgroundColor?PP.CSSParser.hexToRgba(this.assetData.fullscreenBackgroundColor):"transparent"}),this.resize(jQuery(window).width(),jQuery(window).height());for(var e=0;e<this.previews.length;e++)this.previews[e].viewNode.hide(),this.fullsizes[e].viewNode.show();jQuery(window).on("resize orientationchange",this.onResize),jQuery(document).on("keydown",this.onKeyDown),jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange",this.onFullScreenChange),"true"===this.assetData.showCloseButton&&this.viewNode.find("> .pp-close").show(),this.showThumbnails&&(this.itemSlider.viewNode.on("mousemove",this.onMouseMove),this.thumbsSlider.viewNode.on("mouseenter",this.showThumbs.bind(this,0)),this.thumbsSlider.viewNode.on("mouseleave",this.showThumbs.bind(this,1e3)),this.showThumbs(2e3))}},exitFullScreen:function(){if(this.inFullScreen){this.inFullScreen=!1,jQuery(window).off("resize orientationchange",this.onResize),jQuery(document).off("keydown",this.onKeyDown),jQuery(document).off("fullscreenchange mozfullscreenchange webkitfullscreenchange",this.onFullScreenChange),document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),jQuery("body").removeClass("pp-fullscreen"),this.viewNode.removeClass("pp-fullscreen").css({backgroundColor:this.assetData.style.backgroundColor?PP.CSSParser.hexToRgba(this.assetData.style.backgroundColor):"transparent"}),this.resize(this.assetData.width,this.assetData.height);for(var e=0;e<this.previews.length;e++){var t=this.previews[e];this.fullsizes[e].viewNode.hide(),t.viewNode.show()}this.viewNode.find("> .pp-close").hide(),this.showThumbnails&&(this.itemSlider.viewNode.off("mousemove"),this.thumbsSlider.viewNode.off("mouseenter"),this.thumbsSlider.viewNode.off("mouseleave"),this.showThumbs())}},toggleFullScreen:function(){this.inFullScreen?this.exitFullScreen():this.enterFullScreen()},showThumbs:function(e){this.showThumbnails&&(this.thumbsSlider.viewNode.removeClass("pp-hidden"),window.clearTimeout(this.thumbsTimer),e)&&this.inFullScreen&&(this.thumbsTimer=window.setTimeout(this.hideThumbs.bind(this),e))},hideThumbs:function(){this.inFullScreen&&this.showThumbnails&&this.thumbsSlider.viewNode.addClass("pp-hidden")},toggleThumbs:function(){this.inFullScreen&&this.showThumbnails&&(window.clearTimeout(this.thumbsTimer),this.thumbsSlider.viewNode.toggleClass("pp-hidden"))},onPageChange:function(){var e=this.itemSlider.currentPage;this.showThumbnails&&(this.thumbsSlider.viewNode.find(".pp-thumbnail").removeClass("pp-active").eq(e).addClass("pp-active"),this.thumbsSlider.moveTo(Math.floor(e/this.thumbsPerPage)))},onDoubleClick:function(e){jQuery(e.target).parent().is(".pp-controls")||this.toggleFullScreen()},onResize:function(){this.resize(jQuery(window).width(),jQuery(window).height())},onKeyDown:function(e){switch(e.keyCode){case 37:this.itemSlider.prev();break;case 39:this.itemSlider.next()}},onMouseMove:function(){this.enableMouseMove&&this.showThumbs(2e3)},onFullScreenChange:function(){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||this.exitFullScreen()},onTouchStart:function(e){this.onTouchMove(e),window.clearTimeout(this.disableTimer),this.enableMouseMove=!1},onTouchMove:function(e){var t=this.getTouchList(e);1<t.length&&(-1===this.touchDistance?this.touchDistance=Math.pow(t[0].pageX-t[1].pageX,2)+Math.pow(t[0].pageY-t[1].pageY,2):this.touchScale=(Math.pow(t[0].pageX-t[1].pageX,2)+Math.pow(t[0].pageY-t[1].pageY,2))/this.touchDistance),(this.inFullScreen||1<t.length)&&e.preventDefault()},onTouchEnd:function(e){e.isDefaultPrevented()||this.toggleThumbs(),this.onTouchMove(e),1.5<this.touchScale?this.enterFullScreen():this.touchScale<.5&&this.exitFullScreen(),this.touchScale=1,this.touchDistance=-1,this.touches=null;var t=this;window.clearTimeout(this.disableTimer),this.disableTimer=window.setTimeout(function(){t.enableMouseMove=!0},500)},getTouchList:function(e){if((e=e.originalEvent).touches)this.touches=e.touches;else{this.touches=this.touches||[];for(var t=0;t<this.touches.length;t++)if(this.touches[t].pointerId===e.pointerId)return this.touches[t]=e,this.touches;this.touches.push(e)}return this.touches}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.Gallery,["de.artifacts.purple.element.gallery","gallery"]),PP.WidgetTypes.Popup=function(e,t){this.init(e,t)},PP.WidgetTypes.Popup.parent=PP.Widget.prototype,PP.WidgetTypes.Popup.prototype=jQuery.extend(Object.create(PP.Widget.prototype),{constructor:PP.WidgetTypes.Popup,isOpen:!1,init:function(e,t){PP.WidgetTypes.Popup.parent.init.call(this,e,t),this.widget=this.createWidget(Array.isArray(t.widgets)?t.widgets[0]:t.widgets),this.childAssets.push(this.widget),this.modal=!this.assetData.enableStageInteraction,this.widget.parentStage=PP.WidgetTypes.Factory.getElementById(e.config.get("id")),this.onClick=this.onClick.bind(this)},buildViewNode:function(){var e=PP.WidgetTypes.Popup.parent.buildViewNode.call(this);return e.attr({"data-nodetype":"popup"}),this.modal&&(e.addClass("pp-popup"),e.on("click touchstart",this.onClick)),this.widget.buildViewNode(),this.fixStartPosition(),e},onClick:function(e){(this.viewNode.is(e.target)||this.viewNode.find("> .simplebar-scroll-content").is(e.target))&&(this.close(),e.stopPropagation())},start:function(){this.isOpen&&PP.WidgetTypes.Popup.parent.start.call(this)},stop:function(){this.isOpen&&(this.close(),this.isOpen=!1,PP.WidgetTypes.Popup.parent.stop.call(this))},pause:function(){this.isOpen&&PP.WidgetTypes.Popup.parent.pause.call(this)},resume:function(){this.isOpen&&PP.WidgetTypes.Popup.parent.resume.call(this)},open:function(){var t=$.Deferred();return this.isOpen?t.reject():(this.isOpen=!0,this.widget.viewNode||this.widget.buildViewNode(),0<this.viewNode.find("> .simplebar-scroll-content > .simplebar-content").length?this.widget.viewNode.appendTo(this.viewNode.find("> .simplebar-scroll-content > .simplebar-content")):this.widget.viewNode.appendTo(this.viewNode),0<parseFloat(this.assetData.fadeInDuration)?(this.useContentFitStrategy(),this.viewNode.fadeIn(1e3*this.assetData.fadeInDuration,function(){this.widget.start(),t.resolve()}.bind(this))):(this.viewNode.css({opacity:1,display:"block"}),this.widget.start(),this.useContentFitStrategy(),t.resolve())),t.promise()},useContentFitStrategy:function(){var e=this.assetData.fullscreenMode;e&&"off"!==e&&("fillToWidth"===e&&this.fillToWidth(),"fillInside"===e)&&this.fillInside()},fillInside:function(o,t){var i,s,n,r=o&&o.width&&0<o.width?o.width:$(window).width(),a=(o=o&&o.height&&0<o.height?o.height:$(window).height(),(document.body.dispatchEvent(new CustomEvent("disableScrolling")),l=$("#"+this.ctx.playerId)).find(".popupContainer")),u=l.css("top"),l=(a.length||(a=$('<div class="popupContainer"></div>'),l.append(a)),this.viewNode.addClass("player pp-player"),a.append(this.viewNode),this.viewNode.width(r),this.viewNode.height(o),this.viewNode.css("left",-1*(r/2-l.width()/2)),this.viewNode.css("top","-"+u),this.viewNode.css("position","absolute"),this.viewNode.css("z-index",3),this.viewNode.css("margin",0),this.widget.viewNode.addClass("hasAnimation"),r=(a=parseFloat(this.widget.assetData.width))/(o=parseFloat(this.widget.assetData.height)),this.viewNode.width());u=this.viewNode.height(),"match_parent"!==this.widget.assetData.layoutMode&&(l/u<r?(i=l/a,s=(l-a)/2,n=t?0:(u-o*i)/2,this.widget.viewNode.css({transform:"scale("+i+")"})):(s=(l-a)/2,n=0,this.widget.viewNode.css({transform:"scale("+(i=u/o)+")"})),this.widget.viewNode.css("transform-origin","top"),this.widget.viewNode.css("left",s),this.widget.viewNode.css("top",n))},fillToWidth:function(n,t){var i,a=n&&n.width&&0<n.width?n.width:$(window).width(),s=(n=n&&n.height&&0<n.height?n.height:$(window).height(),document.body.dispatchEvent(new CustomEvent("disableScrolling")),PP.WidgetTypes.Popup.parent.handleScrollBars.call(this,["y"]),$("#"+this.ctx.playerId)),o=((u=s.find(".popupContainer")).length||(u=$('<div class="popupContainer"></div>'),s.append(u)),this.viewNode.addClass("player pp-player"),u.append(this.viewNode),this.viewNode.width(a),this.viewNode.height(n),this.viewNode.css("left",-1*(a/2-s.width()/2)),this.viewNode.css("top",0),this.viewNode.css("position","absolute"),this.viewNode.css("z-index",3),this.viewNode.css("margin",0),this.widget.viewNode.addClass("hasAnimation"),a=(u=parseFloat(this.widget.assetData.width))/(n=parseFloat(this.widget.assetData.height)),this.viewNode.width()),r=this.viewNode.height(),l=u/o,u=(o-u)/2;t?i=0:(i=a<o/r?0:(r-n/l)/2,i-=parseFloat(s.css("top"))),"match_parent"!==this.widget.assetData.layoutMode&&(this.widget.viewNode.css({top:i+"px",left:u+"px"}),this.widget.viewNode.css({transform:"scale("+1/l+")"}),this.widget.viewNode.css("transform-origin","top"))},close:function(){var e=$.Deferred();return this.isOpen?(this.isOpen=!1,0<parseFloat(this.assetData.fadeOutDuration)?this.viewNode.fadeOut(1e3*this.assetData.fadeOutDuration,function(){this.widget.stop(),e.resolve()}.bind(this)):(this.widget.stop(),this.viewNode.css({opacity:0,display:"none"}),e.resolve()),document.body.dispatchEvent(new CustomEvent("enableScrolling"))):e.reject(),e.promise()},toggle:function(){return this.isOpen?this.close():this.open()},resizeResponsive:function(){this.isOpen&&this.useContentFitStrategy()}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.Popup,["de.artifacts.purple.element.popup","de.artifacts.purple.element.popup","public.popup","popup"]),PP.WidgetTypes.WebView=function(e,t){this.init(e,t)},PP.WidgetTypes.WebView.parent=PP.Widget.prototype,PP.WidgetTypes.WebView.prototype=jQuery.extend(Object.create(PP.Widget.prototype),{constructor:PP.WidgetTypes.WebView,init:function(e,t){PP.WidgetTypes.WebView.parent.init.call(this,e,t)},buildViewNode:function(){var e,t=PP.WidgetTypes.WebView.parent.buildViewNode.call(this),i=(t.attr({"data-nodetype":"webview"}),t.addClass("pWebView"),this.webView=document.createElement("iframe"),t.append(this.webView),this.fixStartPosition(),this.assetData);return i.contentURL?(0===i.contentURL.indexOf("http://")||0===i.contentURL.indexOf("https://")?(this.webView.src=i.contentURL+(-1<i.contentURL.indexOf("?")?"&":"?")+"purplePageId="+this.ctx.playerId,this.webView.src=this.webView.src+"&purpleWebViewId="+this.assetData.id,this.ctx.config.get("webviewError")&&this.buildFallbackView(this.viewNode,i.contentURL)):(e=this.ctx.config.resourceFileByFileName(i.contentURL),this.webView.src=e+(-1<e.indexOf("?")?"&":"?")+"purplePageId="+this.ctx.playerId,this.webView.src=this.webView.src+"&purpleWebViewId="+this.assetData.id),PP.externalConfig.frameEventHandlers&&PP.externalConfig.frameEventHandlers.load&&this.webView.addEventListener("load",function(){PP.externalConfig.frameEventHandlers.load(this)}),this.viewNode.css("pointer-events","auto")):console.error("URL missing",i),t},buildFallbackView:function(e){this.fallbackView=jQuery("<div>"),this.fallbackView.css({width:"100%",position:"absolute",zIndex:0,top:50,left:0,opacity:0}),this.fallbackView.html(PP.i18n.get("WEBVIEW_PROBLEM")),e.append(this.fallbackView)},start:function(){PP.WidgetTypes.WebView.parent.start.call(this),this.fallbackView&&setTimeout(function(){this.fallbackView.css({display:"block",opacity:0}),this.fallbackView.animate({opacity:1},500)}.bind(this),3e3)},resizeResponsive:function(){var e,t;PP.WidgetTypes.WebView.parent.resizeResponsive.call(this),!0!==this.assetData.responsiveContent&&"true"!==this.assetData.responsiveContent||(t={transform:"scale("+1/(e=this.ctx.config.get("scaleFactor"))+")",transformOrigin:"0 0"},"match_parent"===this.assetData.layoutMode?(t.width=100*e+"%",t.height=100*e+"%"):(t.width=parseFloat(this.assetData.width)*e,t.height=parseFloat(this.assetData.height)*e),$(this.webView).css(t),$(this.webView).addClass("hasAnimation"))}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.WebView,["de.artifacts.purple.element.webView","webView"]),PP.WidgetTypes.Audio=function(e,t){this.init(e,t)},PP.WidgetTypes.Audio.parent=PP.Widget.prototype,PP.WidgetTypes.Audio.prototype=jQuery.extend(Object.create(PP.Widget.prototype),{constructor:PP.WidgetTypes.Audio,WebkitAudio:window.webkitAudioContext,AudioCtx:window.AudioContext,context:null,audio:null,sound:null,playbackState:"stopped",load:function(){var e,t,i;return this.result||(e=jQuery.Deferred(),this.result=e.promise(),this.result.count=1,t=this.ctx.config.resourceFileByFileName(this.assetData.contentURL),(i=this).context?new PP.BufferLoader(this.context,[t],function(s){i.sound=i.context.createBufferSource({loop:!0}),i.sound.buffer=s[0],i.assetData.loop&&(i.sound.loop=!0),i.sound.connect(i.context.destination),e.notify(),e.resolve("audio",i.sound)}).load():(this.audio=jQuery("<audio>"),this.audio.attr({preload:"auto",src:t,loop:"true"===i.assetData.loop}),this.audio.on("canplaythrough",function(){i.audio.off("canplaythrough"),e.notify(),e.resolve("audio",i.audio)}),this.audio.on("error",function(){i.audio.off("error"),e.notify(),e.resolve("audio",i.audio)}))),this.result},stop:function(){this.pause(),this.audio&&(this.audio.get(0).currentTime=0),this.playbackState="stopped"},pause:function(e){this.timeout&&(this.timeout.clear(),delete this.timeout),this.sound?this.sound.stop?this.sound.stop(0):this.sound.noteOff(0):this.audio[0].pause(),e&&(this.userPaused=!0),this.playbackState="paused"},resume:function(){this.sound?this.sound.start?this.sound.start(0):this.sound.noteOn(0):this.audio[0].play(),this.userPaused=!1,this.playbackState="playing"},start:function(){PP.WidgetTypes.Audio.parent.start.call(this),"true"!==this.assetData.autoplay||this.assetData.signalInput||this.userPaused||(this.sound?this.sound.start?this.sound.start(this.context.currentTime+Number(this.assetData.startDelay)):this.sound.noteOn(this.context.currentTime+Number(this.assetData.startDelay)):this.assetData.startDelay?this.timeout=new PP.Util.Timer(this.resume.bind(this),1e3*this.assetData.startDelay):this.resume(),this.userPaused=!1,this.playbackState="playing")},mediaSeekTo:function(e){!$.isNumeric(this.getMediaDuration())||this.sound||(this.audio[0].currentTime=e)},getMediaDuration:function(){return(this.sound||this.audio[0]).duration}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.Audio,["de.artifacts.purple.element.audio","public.audio","audio"]),PP.BufferLoader=function(e,t,i){this.context=e,this.urlList=t,this.onload=i,this.bufferList=[],this.loadCount=0},PP.BufferLoader.prototype={constructor:PP.BufferLoader,loadBuffer:function(e,t){var i=new XMLHttpRequest,s=(i.open("GET",e,!0),i.responseType="arraybuffer",this);i.onload=function(){s.context.decodeAudioData(i.response,function(n){n?(s.bufferList[t]=n,++s.loadCount===s.urlList.length&&s.onload(s.bufferList)):alert("error decoding file data: "+e)},function(n){console.error("decodeAudioData error",n)})},i.onerror=function(){alert("BufferLoader: XHR error")},i.send()},load:function(){for(var e=0;e<this.urlList.length;++e)this.loadBuffer(this.urlList[e],e)}},PP.WidgetTypes.MovieClip=function(e,t){this.init(e,t)},PP.WidgetTypes.MovieClip.parent=PP.Widget.prototype,PP.WidgetTypes.MovieClip.prototype=jQuery.extend(Object.create(PP.Widget.prototype),{constructor:PP.WidgetTypes.MovieClip,result:null,currentFrame:0,frames:0,sequenceTimeline:null,deferred:null,textureAtlas:null,animation:null,load:function(){var e;return this.result||(this.deferred=jQuery.Deferred(),this.assetData.jsonURL&&(e=this.ctx.config.resourceFileByFileName(this.assetData.jsonURL),$.ajax({url:e}).done(function(t){var i;this.textureAtlas="String"===t.constructor.name?JSON.parse(t):t,this.textureAtlas.meta.image?(t=this.textureAtlas.meta.image,(i=new Image).src=this.ctx.config.resourceFileByFileName(t),i.onload=function(){this.deferred.notify(),this.deferred.resolve()}.bind(this)):(this.deferred.notify(),this.deferred.resolve())}.bind(this))),this.result=this.deferred.promise(),this.result.count=1),this.result.promise()},buildViewNode:function(){var e=PP.WidgetTypes.Image.parent.buildViewNode.call(this);return e.attr({"data-nodetype":"video"}),e.append(this.buildImageView(this.assetData.id+"_image")),this.fixStartPosition(),e},buildImageView:function(e){var t=this.ctx.config.resourceFileByFileName(t=this.textureAtlas.meta.image);return this.containerElement=document.createElement("div"),this.containerElement.className="pp-movieclip",this.containerElement.id=e,this.containerElement.style.backgroundImage="url("+t+")",this.buildSequence(),this.applyCSS(),$(this.containerElement)},buildSequence:function(){var e,t,i=1/this.assetData.fps,s=parseFloat(this.assetData.delay),n=!0;this.animation=new TimelineMax;for(var a=0;a<this.textureAtlas.frames.length;a++)e=this.getFrame(a),(t={}).backgroundPosition=-e.frame.x+"px "+-e.frame.y+"px",e.trimmed?(t.marginTop=e.spriteSourceSize.y+"px",t.marginLeft=e.spriteSourceSize.x+"px"):(t.marginTop="0px",t.marginLeft="0px"),t.height=e.frame.h+"px",t.width=e.frame.w+"px",t.ease=new SteppedEase(1),this.animation.to(this.containerElement,i+(n?s:0),t),n=!1},getFrame:function(e){for(var t=""+e,i=(e=this.textureAtlas.meta.image.split(".")[0],this.textureAtlas.meta.image.split(".")[1]);t.length<5;)t="0"+t;t=e+"_"+t+"."+i;for(var s=0;s<this.textureAtlas.frames.length;s++)if(this.textureAtlas.frames[s].filename===t)return this.textureAtlas.frames[s];console.error("frame not found with key = "+t)}}),PP.WidgetTypes.Factory.addHandler(PP.WidgetTypes.MovieClip,["de.artifacts.purple.element.movieclip","MovieClip"]),PP.Transition=function(e,t,i,s){this.parentScene=e,this.fromScene=t,this.toScene=i,this.transitionData=s},PP.Transition.prototype={start:function(){if(this.toScene.buildViewNode(!0),!this.transitionData)return this.hardcut();switch(this.transitionData.transitionType){case"switchTransition":default:return this.hardcut();case"crossFadeTransition":return this.crossfade();case"fadeThroughColorTransition":return this.colorfade();case"parallaxTransition":return this.parallax()}},executeTrigger:function(){if(this.transitionData)return!(!this.transitionData.trigger||"wait"!==this.transitionData.trigger)||void 0},hardcut:function(){var e=$.Deferred();return this.fromScene.stop(),setTimeout(function(){this.toScene.view.css("transition","none"),this.fromScene.view.css("transition","none"),this.toScene.view.css("z-index",PP.ZINDEX_ONHOLD),this.fromScene!==this.toScene&&this.toScene.view.css("visibility","hidden"),this.checkAutoplay(),this.fromScene.view&&(this.fromScene.view.css({"z-index":PP.ZINDEX_ONHOLD,visibility:"hidden",opacity:0}),this.fromScene.view.addClass("inactive")),this.toScene.view&&(this.toScene.view.css({"z-index":PP.ZINDEX_VIEW,visibility:"visible",opacity:1}),this.toScene.view.removeClass("inactive")),this.fromScene.view.on("transitionend",this.transitionend),this.toScene.view.on("transitionend",function(){this.checkAutoplay(),this.toScene.view.unbind("transitionend")}.bind(this)),e.resolve()}.bind(this),10),e.promise()},crossfade:function(){var t,e=$.Deferred();return this.fromScene.view.css({transition:t="opacity "+this.transitionData.duration+"s cubic-bezier("+(t=this.transitionData.offset||.5)+",0.5,"+(.5+.5*t)+",0.75)"}),this.toScene.view.css({transition:t}),this.fromScene.view.on("transitionend",this.transitionend),this.toScene.view.unbind("transitionend"),this.toScene.view.on("transitionend",function(){this.checkAutoplay(),this.toScene.view.unbind("transitionend"),e.resolve()}.bind(this)),this.toScene.view.css("opacity",0),setTimeout(function(){this.toScene.buildViewNode(),this.toScene.view.css("z-index",PP.ZINDEX_ONHOLD),this.fromScene.stop(),this.fromScene.view.css({"z-index":PP.ZINDEX_ONHOLD,visibility:"visible"}),this.fromScene.view.addClass("inactive"),this.toScene.view.css({"z-index":PP.ZINDEX_VIEW,visibility:"visible"}),this.toScene.view.removeClass("inactive"),this.fromScene.view.css({opacity:0}),this.toScene.view.css({opacity:1})}.bind(this),10),e.promise()},colorfade:function(){var e=$.Deferred(),t=this.transitionData.fadeOutTime,i=this.transitionData.fadeInTime,s=$(document.createElement("div")),n=(s.addClass("pp-colorblend"),s.css({opacity:0,transitionDuration:i+"s",backgroundColor:PP.CSSParser.hexToRgba(this.transitionData.color)}),this.parentScene.viewNode.append(s),function(){this.fromScene.stop(),this.toScene.buildViewNode(),this.toScene.view.css({visibility:"visible",opacity:1}),this.toScene.view.removeClass("inactive"),this.fromScene.view.css("visibility","hidden"),this.fromScene.view.addClass("inactive"),s.unbind("transitionend"),s.on("transitionend",function(){s.unbind("transitionend"),s.remove(),this.checkAutoplay()}.bind(this)),s.css({transitionDuration:t+"s",opacity:0}),e.resolve()}.bind(this));return this.toScene.view.css("visibility","hidden"),this.toScene.view.addClass("inactive"),this.fromScene.view.css("z-index",PP.ZINDEX_ONHOLD),this.toScene.view.css("z-index",PP.ZINDEX_ONHOLD),s.css("z-index",PP.ZINDEX_ONHOLD),setTimeout(function(){s.css({opacity:1}),s.unbind("transitionend"),s.on("transitionend",n)}.bind(this),10),e.promise()},parallax:function(){var e=$.Deferred(),t=(this.transitionData.parallax=this.transitionData.parallax||{},this.transitionData.duration||.5),i=this.transitionData.forward,s=i?this.toScene:this.fromScene,n="top "+t+"s cubic-bezier("+((i?this.fromScene:this.toScene).viewNode.css({zIndex:PP.ZINDEX_VIEW,transition:"default"}),s.viewNode.css({zIndex:PP.ZINDEX_TRANSITION,transition:"default"}),this.toScene.viewNode.css({top:i?s.view.get(0).offsetHeight/2:-s.view.get(0).offsetHeight+"px"}),(s=this.transitionData.offset||.5)+",0.5,")+(.5+.5*s)+",0.75)";return this.toScene.buildViewNode(),this.fromScene.stop(),this.fromScene.viewNode.css({visibility:"visible",opacity:1}),this.fromScene.viewNode.addClass("inactive"),this.toScene.viewNode.css({visibility:"visible",opacity:1}),setTimeout(function(){this.toScene.viewNode.removeClass("inactive"),this.fromScene.viewNode.on("transitionend",this.transitionend),this.toScene.viewNode.on("transitionend",function(){window.clearTimeout(this.fallbackTimeout),this.checkAutoplay(),this.transitionEnded=!0,this.toScene.viewNode.unbind("transitionend"),e.resolve()}.bind(this)),setTimeout(function(){i?(this.toScene.viewNode.css({transition:n,top:"0px"}),this.fromScene.viewNode.css({transition:n,top:-this.fromScene.viewNode.get(0).offsetHeight+"px"})):(this.fromScene.viewNode.css({transition:n,top:this.fromScene.viewNode.get(0).offsetHeight/2+"px"}),this.toScene.viewNode.css({transition:n,top:"0px"}))}.bind(this),1)}.bind(this),1),this.fallbackTimeout=setTimeout(function(){this.transitionEnded||(this.checkAutoplay(),this.toScene.viewNode.unbind("transitionend"),window.clearTimeout(this.fallbackTimeout),e.resolve())}.bind(this),1e3*t+10),e.promise()},transitionend:function(){$(this).css("visibility","hidden"),$(this).css({top:"0px"}),$(this).unbind("transitionend")},wait:function(e){return jQuery.Deferred(function(t){window.setTimeout(t.resolve,e)}).promise()},checkAutoplay:function(){!0===this.toScene.autoplay&&(this.toScene.restartMedia(),this.toScene.start())}},PP.ContextMenu=function(n){var t,i=!1,s=document.createElement("div");function a(r){r.target===s||function(l,u){for(var S=u.parentNode;S;){if(S===l)return 1;S=S.parentNode}}(s,r.target)||o()}function o(){i&&t&&(i=!1,t.removeChild(s))}return s.className="pp-contextMenu",s.oncontextmenu=function(){return!1},$(document).on("mousedown",a),n.on("contextmenu",function(r){var l;return r.preventDefault(),3!==r.which||i?o():(l=r.pageX,r=r.pageY,t=$("body").get(0),i=!0,t.appendChild(s),s.style.left=l+"px",s.style.top=r+"px"),!1}),n=document.createElement("div"),s.appendChild(n),n.className="pp-contextItem",n.innerHTML="About "+PP.NAME+" ...",$(n).on("click",function(r){r.preventDefault(),r.stopPropagation(),o(),window.open(PP.HOMEPAGE,"_blank")}),n=document.createElement("div"),s.appendChild(n),n.className="pp-contextItem",n.innerHTML="Version "+PP.VERSION,$(n).on("click",function(r){r.preventDefault(),r.stopPropagation(),o()}),this.destroy=function(){$(document).off("mousedown",a)},this},PP.PreloadManager=PP.PreloadManager||new function(){this.maxConnections=8,this.activeAssets=[],this.assetsQueue=[],this.blobMap={},this.usedAssets=[];var e=this;this.onPageChange=function(t){this.clear(t);for(var i=0;i<this.usedAssets.length;i++){var s=this.usedAssets[i];s.playerId===t&&this.addToQueue(s)}},this.addToQueue=function(t){return this.assetsQueue.push(t),this.checkLoadNext()},this.checkLoadNext=function(){var t,i;return this.activeAssets.length<this.maxConnections&&0<this.assetsQueue.length&&!!(t=this.assetsQueue[this.assetsQueue.length-1])&&(i=this.indexOf(this.assetsQueue,t),this.assetsQueue.splice(i,1),this.activeAssets.push(t),t.asset.executeLoad(this.onComplete),!0)},this.cancel=function(){},this.onComplete=function(){var t;-1!==e.indexOf(e.assetsQueue,this)&&(t=e.indexOf(e.assetsQueue,this),e.assetsQueue.splice(t,1)),-1!==e.indexOf(e.activeAssets,this)&&(t=e.indexOf(e.activeAssets,this),e.activeAssets.splice(t,1)),e.checkLoadNext.apply(e)},this.clear=function(t){for(var i=this.assetsQueue.concat(this.activeAssets),s=0;s<i.length;s++)i[s].asset.ctx.config.get("id")!==t&&(i[s].asset.destroy(),-1===this.indexOf(this.usedAssets,i[s].asset))&&this.usedAssets.push(i[s]);this.assetsQueue=[],this.activeAssets=[]},this.indexOf=function(t,i){for(var s=0;s<t.length;s++)if(t[s].asset===i)return s;return-1}},PP.StorytellingLoader=new function(){var e=[];this.addRawData=function(t,i){e[t]=i},this.load=function(t,i,s){i=i||PP.Util.getUrlParameter("dataFile"),e[i]?s(e[i]):(t=PP.Util.isAbsolute(i)?i:PP.PURPLEDIR+PP.Util.addSlash(t)+i,jQuery.getJSON(t).then(function(n,a){404===a?console.error("404: Storytelling json not found"):s(n)}))}},PP.Actions=PP.Actions||{},PP.Actions.ActionHandler=function(){this.actions={},this.actions[PP.BTN_TARGET_TYPE_ELEMENT]=PP.Actions.JumpToElementAction,this.actions[PP.BTN_TARGET_TYPE_SCENE]=PP.Actions.JumpToSceneAction,this.actions[PP.BTN_TARGET_TYPE_JUMPTOPAGE]=PP.Actions.JumpToPageAction,this.actions[PP.CLOSE_ALL_POPUPS]=PP.Actions.CloseAllPopupsAction,this.actions[PP.TOGGLE_POPUP]=PP.Actions.TogglePopupAction,this.actions[PP.OPEN_URL]=PP.Actions.OpenURLAction,this.actions[PP.OPEN_ACTION_URL]=PP.Actions.OpenURLAction,this.actions[PP.OPEN_FILE_URL]=PP.Actions.OpenURLAction,this.actions[PP.OPEN_WEB_URL]=PP.Actions.OpenURLAction,this.actions[PP.NEXT_SCENE]=PP.Actions.JumpToNextSceneAction,this.actions[PP.PREVIOUS_SCENE]=PP.Actions.JumpToPreviousSceneAction,this.actions[PP.AUDIO_PLAY]=PP.Actions.AudioPlayAction,this.actions[PP.AUDIO_STOP]=PP.Actions.AudioStopAction,this.actions[PP.AUDIO_PAUSE]=PP.Actions.AudioPauseAction,this.actions[PP.AUDIO_REWIND]=PP.Actions.AudioRewindAction,this.actions[PP.SEEK_TO]=PP.Actions.SeekToAction},PP.Actions.ActionHandler.prototype.processAction=function(e,t,i,s,n){var a=this.getActionClass(e);return!a||new a(e,t,i,s,n).process()},PP.Actions.ActionHandler.prototype.processActionChained=function(e,t,i,s){if(e=this.processAction(e,t,i,!1,s),s.length)return!0===e?this.processActionChained(s[0],t,i,s.slice(1)):e&&e.then?e.then(function(){return this.processActionChained(s[0],t,i,s.slice(1))}.bind(this)):void 0},PP.Actions.ActionHandler.prototype.processActions=function(e,t,i){return this.processActionChained(e[0],t,i,e.slice(1))},PP.Actions.ActionHandler.prototype.getActionClass=function(e){for(var t in this.actions)if(this.actions.hasOwnProperty(t)&&e[t])return this.actions[t];for(t in e)if(e.hasOwnProperty(t)){console.error("Action not supported: "+t);break}},PP.Actions.CloseAllPopupsAction=function(e,t){this.assetData=e,this.widget=t},PP.Actions.CloseAllPopupsAction.prototype.process=function(){for(var e=PP.WidgetTypes.Factory.getElementsByUTI("popup"),t=[],i=0;i<e.length;i++)e[i].isOpen&&t.push(e[i].close());return $.when.apply($,t)},PP.Actions.JumpToElementAction=function(e,t){this.assetData=e,this.widget=t},PP.Actions.JumpToElementAction.prototype.process=function(){var e=new PP.PKItem(this.assetData.open.URL);this.widget.viewNode.trigger(PP.ELEMENT_JUMP_TO,this.processPKItem(e))},PP.Actions.JumpToElementAction.prototype.processPKItem=function(e){return this.widget.ctx.config.get("hasEnvironment")&&e.getPageID()?this.widget.viewNode.trigger(PP.SCROLLYTELLING_JUMP_TO_PAGE,e):this.widget.viewNode.trigger(PP.ELEMENT_JUMP_TO,e),!0},PP.Actions.JumpToPageAction=function(e,t,i,s,n){this.assetData=e,this.widget=t,this.actions=n},PP.Actions.JumpToPageAction.prototype.process=function(){return this.widget.viewNode.trigger(PP.PLAYER_JUMP_TO_PAGE,{pageId:this.assetData[PP.BTN_TARGET_TYPE_JUMPTOPAGE].pageID,actions:this.actions,doNotTrack:!0}),!1},PP.Actions.JumpToSceneAction=function(e,t){this.assetData=e,this.widget=t},PP.Actions.JumpToSceneAction.prototype.process=function(){return this.widget instanceof PP.WidgetTypes.Stage?this.widget.jumpToScene(this.assetData[PP.BTN_TARGET_TYPE_SCENE].sceneID):this.widget&&this.widget.viewNode?(this.widget.viewNode.trigger(PP.SCENE_JUMP_TO,this.assetData[PP.BTN_TARGET_TYPE_SCENE].sceneID),!0):void 0},PP.Actions.OpenURLAction=function(e,t,i,s){this.assetData=e,this.widget=t,this.player=i,this.propagate=!s},PP.Actions.OpenURLAction.prototype.process=function(){var e=this.getUrl(),t=e.URL,i=(PP.Util.Analytics.sendUrlOpened(t),new PP.PKItem(t)),s=new PP.PurpleLink(t);return i.isPKItem()?(this.processPKItem(i),!0):s.isPurpleLink()?(this.processPurpleLink(s),!0):0!==t.indexOf("pkapp://")&&void this.processWebUrl(e)},PP.Actions.OpenURLAction.prototype.processWebUrl=function(e){var t,i,s=e.URL;if(PP.externalConfig&&PP.externalConfig.onOpenUrl&&"function"==typeof PP.externalConfig.onOpenUrl&&!1===PP.externalConfig.onOpenUrl(s))return!1;this.widget&&0!==s.indexOf("http://")&&0!==s.indexOf("https://")&&0!==s.indexOf("tel:")&&0!==s.indexOf("mailto:")&&(s=this.widget.ctx.config.resourceFileByFileName(s)),this.getType()===PP.OPEN_WEB_URL&&"_internal"===e.target||this.getType()===PP.OPEN_FILE_URL&&"external"!==e.target?(t="true"===e.showNavigation||!0===e.showNavigation,i="true"===e.showTitleBar||!0===e.showTitleBar,e="modal"===e.mode,PP.InternalBrowser.start(s,this.widget.ctx.config.get("container"),t,i,e,PP.externalConfig.frameEventHandlers)):window.open(s)},PP.Actions.OpenURLAction.prototype.processPKItem=function(e){this.widget?this.widget.ctx.config.get("hasEnvironment")&&e.getPageID()?this.widget.viewNode.trigger(PP.SCROLLYTELLING_JUMP_TO_PAGE,e):this.widget.viewNode.trigger(PP.ELEMENT_JUMP_TO,e):this.player.stage.viewNode.trigger(PP.ELEMENT_JUMP_TO,e)},PP.Actions.OpenURLAction.prototype.processPurpleLink=function(e){var t,i,s,n,a,o,r=new PP.PKItem(""),l=(r.setProtocol("pkitem"),(this.widget||this.player.stage).viewNode),u=0;switch(PP.purple&&PP.purple.metadata&&(t=PP.purple.metadata.getMetadata(PP.META_ISSUE_ID),i=PP.purple.metadata.getMetadata(PP.META_ISSUE_ALIAS),n=PP.purple.metadata.getMetadata(PP.META_PAGE_ID),a=PP.purple.metadata.getMetadata(PP.META_PAGE_ALIAS),o=PP.purple.metadata.getMetadata(PP.META_PAGE_INDEX),s=PP.purple.metadata.getMetadata(PP.META_EXTERNAL_ISSUE_ID)),e.getLevel(u)){case"content":switch(e.getLevel(++u)){case"toc":"open"===e.getLevel(++u)?("WP"in window&&WP.instance&&WP.instance.container?WP.instance.container:l).trigger(PP.TOC_OPEN):this.handleExternally(e.getUri());break;case"page":switch(e.getLevel(++u)){case"index":r.setPageIndex(e.getLevel(++u)),l.trigger(PP.SCROLLYTELLING_JUMP_TO_PAGE,r);break;case"alias":r.setPageAlias(e.getLevel(++u)),l.trigger(PP.SCROLLYTELLING_JUMP_TO_PAGE,r);break;default:r.setPageID(e.getLevel(u)),l.trigger(PP.SCROLLYTELLING_JUMP_TO_PAGE,r)}break;default:this.handleExternally(e.getUri())}break;case"kiosk":if("issue"===e.getLevel(++u)){("alias"===e.getLevel(++u)||"by_external_id"===e.getLevel(u))&&u++;var S=e.getLevel(u);if("current"===S||S===t||S===i||S===s)switch(e.getLevel(++u)){case"open":r.setPageID(n),r.setElementID(e.getElementID()),l.trigger(PP.SCROLLYTELLING_JUMP_TO_PAGE,r);break;case"page":var f=!1,N=!1,E=("alias"===e.getLevel(++u)?(f=!0,u++):"index"===e.getLevel(u)&&(N=!0,u++),e.getLevel(u));"current"===E||E===n||E===a||E===o?r.setPageID(n):f?r.setPageAlias(E):N?r.setPageIndex(E):r.setPageID(E),r.setElementID(e.getElementID()),r.setAlign(e.getAlign()),l.trigger(PP.SCROLLYTELLING_JUMP_TO_PAGE,r)}else this.handleExternally(e.getUri())}else this.handleExternally(e.getUri());break;case"app":if("open"===e.getLevel(1)&&"external"===e.getLevel(2)&&"url"===e.getLevel(3)){this.processWebUrl({URL:decodeURIComponent(e.getLevel(4))});break}default:this.handleExternally(e.getUri())}},PP.Actions.OpenURLAction.prototype.getUrl=function(){for(var e=[PP.OPEN_URL,PP.OPEN_ACTION_URL,PP.OPEN_FILE_URL,PP.OPEN_WEB_URL],t=0;t<e.length;t++){var i=e[t];if(this.assetData[i])return this.assetData[i]}},PP.Actions.OpenURLAction.prototype.getType=function(){for(var e=[PP.OPEN_URL,PP.OPEN_ACTION_URL,PP.OPEN_FILE_URL,PP.OPEN_WEB_URL],t=0;t<e.length;t++){var i=e[t];if(this.assetData[i])return i}},PP.Actions.OpenURLAction.prototype.handleExternally=function(e){this.propagate&&PP.externalConfig&&"function"==typeof PP.externalConfig.openActionUrl&&PP.externalConfig.openActionUrl(e)},PP.Actions.TogglePopupAction=function(e,t){this.assetData=e,this.widget=t},PP.Actions.TogglePopupAction.prototype.process=function(){return this.widget.onTogglePopup?this.widget.onTogglePopup(!1,this.assetData.togglePopup.popupID):(this.widget.viewNode.trigger(PP.POPUP_TOGGLE,this.assetData.togglePopup.popupID),!0)},PP.Actions.JumpToNextSceneAction=function(e,t){this.assetData=e[PP.NEXT_SCENE],this.widget=t},PP.Actions.JumpToNextSceneAction.prototype.process=function(){var e,t=this.assetData.loop;return(e=this.assetData.stageID?PP.WidgetTypes.Factory.getElementById(this.assetData.stageID):e)||(this.widget instanceof PP.WidgetTypes.Stage?e=this.widget:this.widget.scene&&(e=this.widget.scene.stage)),!!e&&e.onJumpToNextScene(void 0,t)},PP.Actions.JumpToPreviousSceneAction=function(e,t){this.assetData=e[PP.PREVIOUS_SCENE],this.widget=t},PP.Actions.JumpToPreviousSceneAction.prototype.process=function(){var e,t=this.assetData.loop;return(e=this.assetData.stageID?PP.WidgetTypes.Factory.getElementById(this.assetData.stageID):e)||(this.widget instanceof PP.WidgetTypes.Stage?e=this.widget:this.widget.scene&&(e=this.widget.scene.stage)),!!e&&e.jumpToPreviousScene(t)},PP.Actions.AudioPlayAction=function(e,t){this.assetData=e,this.widget=t},PP.Actions.AudioPlayAction.prototype.process=function(){var e=this.assetData.playAudio.audioID;return!!(e=PP.WidgetTypes.Factory.getElementById(e)).resume&&(e.resume(),!0)},PP.Actions.AudioStopAction=function(e,t){this.assetData=e,this.widget=t},PP.Actions.AudioStopAction.prototype.process=function(){var e=this.assetData.stopAudio.audioID;return!!(e=PP.WidgetTypes.Factory.getElementById(e)).stop&&(e.stop(),!0)},PP.Actions.AudioPauseAction=function(e,t){this.assetData=e,this.widget=t},PP.Actions.AudioPauseAction.prototype.process=function(){var e=this.assetData.pauseAudio.audioID;return!!(e=PP.WidgetTypes.Factory.getElementById(e)).pause&&(e.pause(!0),!0)},PP.Actions.AudioRewindAction=function(e,t){this.assetData=e,this.widget=t},PP.Actions.AudioRewindAction.prototype.process=function(){var e=this.assetData.rewindControl.audioID;return!(!(e=PP.WidgetTypes.Factory.getElementById(e)).stop||!e.resume||(e.stop(),e.resume(),0))},PP.Actions.SeekToAction=function(e,t){this.assetData=e,this.widget=t},PP.Actions.SeekToAction.prototype.process=function(){var data=this.assetData[PP.SEEK_TO].data,target=this.assetData[PP.SEEK_TO].target,property=this.assetData[PP.SEEK_TO].property,formula=this.assetData[PP.SEEK_TO].formula,targetTime=0,startDelay=0,contentOffsetMin=(target.assetData&&(startDelay=parseFloat(target.assetData.startDelay),startDelay="number"==typeof startDelay&&0<startDelay?startDelay:0),data.contentOffsetMin),contentOffsetMax=data.contentOffsetMax,contentOffsetAbs=data.contentOffsetAbs,contentOffsetRel=data.contentOffsetRel,duration;switch(property){case"currentAnimationTime":duration=target.getDuration();break;case"currentMediaTime":duration=target.getMediaDuration()+startDelay}try{if(!formula)return void console.error("no formula");targetTime=eval(formula)}catch(e){return void console.error("incorrect formula")}if(target&&target.sceneData&&duration&&PP.WidgetContainer.prototype.seekTo.call(target,targetTime,"scrollyTimeline"),target&&target.assetData&&duration)switch(property){case"currentAnimationTime":return target.seekTo(targetTime),!0;case"currentMediaTime":return target.mediaSeekTo(Math.max(0,targetTime-startDelay)),!0}},PP.SignalManager=new function(){this.getSignal=function(e){var t=PP.WidgetTypes.Factory.getElementById(e);if(t&&t.signal)return t.signal;console.error("Signal not found for Element: "+e)}},PP.BaseSignal=function(){throw new Error("PP.BaseSignal can not be instantiated.")},PP.BaseSignal.prototype={addEventListener:function(e,t){this.callbacks||(this.callbacks=[]);var i={};i.e=e,i.c=t,this.callbacks.push(i)},removeEventListener:function(e,t){if(this.callbacks)for(var i,s=0;s<this.callbacks.length;s++)(i=this.callbacks[s]).e!==e||t&&i.c!==t||(this.callbacks.splice(s),s--)},unbind:function(){this.callbacks=[]},dispatchEvent:function(e,t){if(this.callbacks)for(var i,s=0;s<this.callbacks.length;s++)(i=this.callbacks[s]).e===e&&i.c(this,t)}},PP.ScrollPositionSignal=function(e){this.init(e)},PP.ScrollPositionSignal.SCROLL="scroll",PP.ScrollPositionSignal.MARK_UP="mark_up",PP.ScrollPositionSignal.MARK_DOWN="mark_down",PP.ScrollPositionSignal.prototype=jQuery.extend(Object.create(PP.BaseSignal.prototype),{widget:null,init:function(e){if(this.widget=e,this.scrollArea=this.widget.scrollArea.find(".simplebar-scroll-content"),!(this.widget instanceof PP.WidgetTypes.Text))throw"Scrollytelling is only supported for textWidget";if(0!==(e=this.widget.assetData.scrollyTellingReferencedComposition).indexOf("ppe_")&&(e="ppe_"+e),e=this.widget.getWidgetById(e)){Array.isArray(this.widget.assetData.marker)||(this.widget.assetData.marker=[this.widget.assetData.marker]);for(var t="",i=0;i<this.widget.assetData.marker.length;i++){var s=this.widget.assetData.marker[i];s&&(t+='[name="'+s.name+'"]',i<this.widget.assetData.marker.length-1)&&(t+=",")}var o=this.widget.viewNode.find(t),n=[],a=(o.addClass("scrollyTellingTrigger"),this.markers={},0);jQuery.each(o,function(r,l){n.indexOf($(l).attr("name"))<0&&(this.markers[this.widget.assetData.marker[a].name]={index:a+1,marker:this.widget.assetData.marker[a],node:l,active:!1},n.push($(l).attr("name")),a++)}.bind(this)),this.markerTriggerOffset=parseFloat(this.widget.assetData.markerTriggerOffset),this.markers.first=o={index:0,marker:{name:"first",event:[{name:"scroll_down",jumpToScene:{sceneID:e.childAssets[0].sceneId}}]},active:!0},this.currentMarker=o,this.mapMarkersAndOutputs(),this.createSignalDispatchers()}},mapMarkersAndOutputs:function(){if(this.widget.assetData.textScrollingOutput){Array.isArray(this.widget.assetData.textScrollingOutput)||(this.widget.assetData.textScrollingOutput=[this.widget.assetData.textScrollingOutput]);for(var e=0;e<this.widget.assetData.textScrollingOutput.length;e++){var t=this.widget.assetData.textScrollingOutput[e],i=t.startMarker?this.markers[t.startMarker]:this.markers.first;i&&(i.scrollingOutput={endMarker:this.markers[t.endMarker],id:t.id},i.scrollingOutput.endMarker=this.markers[t.endMarker])}}},createSignalDispatchers:function(){this.lastScrollTop=0,this.lastScrollEvent=0,this.widget.scrollArea.on("scroll",function(e){(0===e.timeStamp||e.timeStamp>this.lastScrollEvent)&&(this.createSignalDispatcherMark(),this.createSignalDispatcherScroll(),this.lastScrollEvent=e.timeStamp)}.bind(this))},createSignalDispatcherMark:function(){this.downwards=(e=this.scrollArea).scrollTop()<this.lastScrollTop,this.lastScrollTop=e.scrollTop();var e=(e=$("#"+this.widget.ctx.playerId).find("> .pp-stage")[0]).getBoundingClientRect().width/e.offsetWidth,t=(this.widget.ctx.config.set("scaleFactor",e),this.getNextMarker()),i=this.getPrevMarker();null!==t&&$(t.node).position().top<(this.widget.scrollArea.height()*this.markerTriggerOffset-$(t.node).height()/2)*e&&!this.downwards?(this.currentMarker=t,this.hitMarker=this.currentMarker,this.dispatchEvent(PP.ScrollPositionSignal.MARK_UP,this.hitMarker)):null!==i&&$(this.currentMarker.node).position().top>(this.widget.scrollArea.height()*this.markerTriggerOffset-$(this.currentMarker.node).height()/2)*e&&this.downwards&&(this.hitMarker=this.currentMarker,this.currentMarker=i,this.dispatchEvent(PP.ScrollPositionSignal.MARK_DOWN,this.hitMarker))},createSignalDispatcherScroll:function(){var e=this.scrollArea,t=e.height(),i=this.widget.signal.markerTriggerOffset,s=e.scrollTop(),n=$("#"+this.widget.ctx.playerId);jQuery.each(this.markers,function(a,o){var r,l,u;o.scrollingOutput&&o.index<=this.currentMarker.index&&(o.scrollingOutput.endMarker&&o.scrollingOutput.endMarker.index>this.currentMarker.index||!o.scrollingOutput.endMarker)&&(l=(r=o.node?$(o.node):void 0)?r.height():0,r=r?r[0].offsetTop+l/2:t*i,l=(l=o.scrollingOutput.endMarker)?l.node.offsetTop+$(l.node).height()/2:e[0].scrollHeight-(1-i)*t,u=s+t*i,u={type:PP.ScrollPositionSignal.SCROLL,data:{marker:o,contentOffsetMin:r,contentOffsetMax:l,contentOffsetAbs:u,contentOffsetRel:(u-r)/(l-r)}},n.trigger(o.scrollingOutput.id,u))}.bind(this))},getPrevMarker:function(){return this.getMarkerByIndex(this.currentMarker.index-1)},getNextMarker:function(){return this.getMarkerByIndex(this.currentMarker.index+1)},getMarkerByIndex:function(e){for(var t=$.map(this.markers,function(s,n){return[s]}),i=0;i<t.length;i++)if(t[i].index===e)return t[i];return null}}),PP.SwipeSignal=function(e){this.init(e)},PP.SwipeSignal.LEFT="swipe_left",PP.SwipeSignal.RIGHT="swipe_right",PP.SwipeSignal.UP="swipe_up",PP.SwipeSignal.DOWN="swipe_down",PP.SwipeSignal.prototype=jQuery.extend(Object.create(PP.BaseSignal.prototype),{widget:null,init:function(e){var t=[PP.SwipeSignal.LEFT,PP.SwipeSignal.RIGHT,PP.SwipeSignal.UP,PP.SwipeSignal.DOWN];if(this.widget=e,this.widget.assetData.event){Array.isArray(this.widget.assetData.event)||(this.widget.assetData.event=[this.widget.assetData.event]);for(var i=0;i<this.widget.assetData.event.length;i++){var s=this.widget.assetData.event[i];-1<t.indexOf(s.type)&&this.createSwipeDispatcher(s.type,PP.Util.hasTouchSupport())}}},createSwipeDispatcher:function(e,t){t?this.createSwipeDispatcherTouch(e):this.createSwipeDispatcherClick(e)},createSwipeDispatcherTouch:function(e){var t=!1,i=0,s=null,n=$(this.widget.viewNode);n.on("touchstart MSPointerDown",function(a){a.preventDefault(),a.stopPropagation(),t=!0,s={x:a.originalEvent.touches[0].pageX,y:a.originalEvent.touches[0].pageY},i=(new Date).getTime()}),n.on("touchend MSPointerUp",function(l){l.preventDefault(),l.stopPropagation();var o=(new Date).getTime()-i,r=l.originalEvent.changedTouches[0].pageX,u=(l=l.originalEvent.changedTouches[0].pageY,l=(r={direction:{x:r>s.x?PP.SwipeSignal.RIGHT:PP.SwipeSignal.LEFT,y:l>s.y?PP.SwipeSignal.DOWN:PP.SwipeSignal.UP},offset:{x:Math.abs(r-s.x),y:Math.abs(l-s.y)}}).direction.x,r.offset.x);r.offset.y>r.offset.x&&(l=r.direction.y,u=r.offset.y),l===e&&(100<=u?this.dispatchEvent(l):o<250&&n.trigger("click")),i=0,t=!1,s=null}.bind(this)),n.on("touchmove MSPointerMove",function(a){t&&(a.preventDefault(),a.stopPropagation())})},createSwipeDispatcherClick:function(e){var t=$('<div class="pp-swipe-button">');t.addClass(e),t.css("cursor","pointer"),t.on("click",function(i){i.preventDefault(),i.stopPropagation(),this.dispatchEvent(e)}.bind(this)),this.widget.viewNode.append(t)}}),PurplePlayer.version=PP.VERSION,PurplePlayer.showInfo=function(){console.log("%c "+PP.NAME+" ","background: #4f388d; color: #ffffff"),console.log("%c version: "+PP.VERSION,"color: #4f388d;"),console.log("%c web: "+PP.HOMEPAGE,"color: #4f388d;")},PurplePlayer.showConfig=function(){console.log("%c CONFIG ","background: #4f388d; color: #ffffff"),console.log("%c PURPLEDIR: "+PP.PURPLEDIR,"color: #4f388d;")},PP.InternalBrowser={start:function(g,t,i,s,n,a){$(".pp-internal-browser-container").remove();var o,r,l,u,S,f,N=$('<div class="pp-internal-browser-container">'),E=$('<div class="pp-internal-browser">'),w=$('<div class="pp-frame-wrapper">'),m=(g=$('<iframe src="'+g+'">'))[0];n?(N.addClass("pp-mode-modal"),w.addClass("pp-mode-modal")):$(t).css("filter","blur(3px)"),i&&(r=0,S=u=l=!(o=-1),n=$('<div class="pp-navbar pp-bar"><button class="pp-reload" disabled="disabled"></button><button class="pp-back" disabled="disabled"></button><button class="pp-forward" disabled="disabled"></button></div>'),E.append(n),w.addClass("pp-navbar-enabled"),n.find(".pp-reload").on("click touchstart",function(){S=!0;try{m.contentDocument.location.reload()}catch(h){PP.Util.postMessage(m.contentWindow,"RELOAD","RELOAD",null,"RELOAD"),a&&a.reload&&a&&a.reload(m)}}),n.find(".pp-back").on("click touchstart",function(){u=!0,o--,r++;try{m.contentWindow.history.back()}catch(h){PP.Util.postMessage(m.contentWindow,"HISTORY_BACK","HISTORY_BACK",null,"HISTORY_BACK"),a&&a.back&&a&&a.back(m)}}),n.find(".pp-forward").on("click touchstart",function(){l=!0,r--,o++;try{m.contentWindow.history.forward()}catch(h){PP.Util.postMessage(m.contentWindow,"HISTORY_FORWARD","HISTORY_FORWARD",null,"HISTORY_FORWARD"),a&&a.forward&&a&&a.forward(m)}}),n.on("click touchstart",function(h){h.stopPropagation()}),g.on("load",function(){l||u||S||(o++,r=0),S=u=l=!1;try{m.contentDocument.getElementsByTagName("body")}catch(h){PP.Util.postMessage(m.contentWindow,"DOCUMENT_TITLE","DOCUMENT_TITLE",null,"DOCUMENT_TITLE")}0<o?N.find(".pp-back").attr("disabled",!1):N.find(".pp-back").attr("disabled",!0),0<r?N.find(".pp-forward").attr("disabled",!1):N.find(".pp-forward").attr("disabled",!0)})),s&&(f=$('<div class="pp-titlebar pp-bar"><button class="pp-close"></button><div class="pp-title"></div></div>'),E.append(f),w.addClass("pp-titlebar-enabled"),f.find(".pp-close").on("click",function(){N.remove(),this.widget&&this.widget.ctx.config.get("container").css("filter",""),a&&a.close&&a.close(m)}.bind(this)),g.on("load",function(){try{f.find(".pp-title").html(m.contentDocument.title)}catch(h){PP.Util.postMessage(m.contentWindow,"DOCUMENT_TITLE","DOCUMENT_TITLE",null,"DOCUMENT_TITLE"),a&&a.title&&a.title(m)}}),f.on("click touchstart",function(h){h.stopPropagation()})),N.on("click touchstart",function(){N.remove(),$(t).css("filter","")}),w.append(g),E.append(w),N.append(E),m.addEventListener("load",function(){a&&a.load&&a&&a.load(m)}),$("body").append(N)},stop:function(e){$(".pp-internal-browser-container").remove(),$(e).css("filter","")}},window.WP={},WP.init=function(e,t,i,s){if(e=$(e),t&&PP)for(var n in PP.externalConfig||(PP.externalConfig={}),t)PP.externalConfig[n]=t[n];var a=[];if(i&&0<=i.length)for(var o=0;o<i.length;o++){var r=i[o];!WP[r]||PP.externalConfig&&r.toLowerCase()in PP.externalConfig&&!1===PP.externalConfig[r.toLowerCase()]||a.push(WP[r])}else PP.externalConfig&&"controls"in PP.externalConfig&&!1===PP.externalConfig.controls||a.push(WP.Controls),PP.externalConfig&&"zooming"in PP.externalConfig&&!1===PP.externalConfig.zooming||(PP.Util.isAndroid()||PP.Util.isIOS()?a.push(WP.MobileZooming):a.push(WP.Zooming));PP.externalUrlHandler=function(l){return PP.externalConfig&&PP.externalConfig.urlHandler?PP.externalConfig.urlHandler(l):l},WP.instance=new WP.WebPresenter(e[0],function(){WP.instance.runPlugins(a),s&&"function"==typeof s&&s()}),window.addEventListener("message",PP.Util.receiveMessage)},WP.CONFIG={direction:"horizontal"},WP.PLUGINS=[],WP.WebPresenter=function(e,t){this.container=$(e),this.getConfigValue=function(c,d){var p=c.toLowerCase();if(PP.externalConfig){if(!0===(c=PP.externalConfig[c])||"true"===c)return!0;if(!1===c||"false"===c)return!1;if(c)return c}return"false"!==(c=$(e).data(p))&&!1!==c&&("true"===c||!0===c||c||d)},this.addExternalConfigs=function(c){if(PP.externalConfig)for(var d=0;d<c.length;d++){var p=c[d];PP.externalConfig[p]&&(P[p]=PP.externalConfig[p])}};var i,s=(s=PP.Util.getUrlParameter("project"))||this.getConfigValue("project",""),n=(n=this.getConfigValue("contentFit",void 0))||this.getConfigValue("contentFitStrategy",WP.Scaler.FIT_INSIDE),a=this.getConfigValue("playerSpace",void 0),o=this.getConfigValue("lazyLoading",!1),r=this.getConfigValue("aboutPurple",!0),l=this.getConfigValue("preventScrolling",!1),u=this.getConfigValue("preventSwiping",!1),S=this.getConfigValue("preloadVideos",!1),f=this.getConfigValue("webviewError",!0),N=this.getConfigValue("forceZoomMin",void 0),E=this.getConfigValue("forceZoomMax",void 0),w=this.getConfigValue("virtual",!0),g=this.getConfigValue("maxContentWidth",void 0),m=(this.breakpoints=this.getConfigValue("breakpoints",PP.DEFAULT_BREAKPOINTS),this.breakpoint=PP.Util.getBreakPoint(this.breakpoints,this.container.width()),this.players=[],PP.PURPLEDIR+s+"/"),h=(PP.Util.attachCSS(PP.externalUrlHandler(m+"text.css")),document.createElement("div")),P=(h.className="presenterContainer",e.appendChild(h),this.pluginContainer=document.createElement("div"),this.pluginContainer.className="pluginContainer",this.playersLoaded=0,e.appendChild(this.pluginContainer),{}),T=(P.lazyLoading=o,P.preloadVideos=S,P.webviewError=f,P.aboutPurple=r,P.preventScrolling=l,P.forceZoomMin=N,P.forceZoomMax=E,P.maxContentWidth=g,this.addExternalConfigs(["appId","issueId","issueName","issueAlias","issuePubDate","externalIssueId","publicationId","publicationName","entitlementLogin","entitlementToken","preview","locale","managerBaseUrl","purchaseSuggestionCallback","fontsCss","maxContentWidth"]),PP.externalConfig&&PP.externalConfig.contentFit&&(PP.externalConfig.contentFitStrategy=PP.externalConfig.contentFit),P.contentFit=PP.Util.mapContentFitStrategy(n),new WP.PurpleData({directory:m})),b=new WP.PurplePlayerFactory(s,P),x=new WP.ExcludeOverlay(b),C=[];this.loadingDone=function(){var c=T.getPages(),d=$('<div class="webPresenter_scroller pp-transition swiper-wrapper">');h.appendChild(d[0]),C=b.buildPages(c,d[0],this),(this.players=C).length<2&&(u=!0),i=new WP.Scroller({direction:WP.CONFIG.direction,container:h,preventSwiping:u,spaceBetween:a,virtual:w,tracking:!0},this),this.scaler=new WP.Scaler(this,C,n),this.resizeCurrentPlayer=this.scaler.resizeCurrentPlayer.bind(this.scaler),this.resizePlayers=function(){for(var y=0;y<C.length;y++)C[y].player.resize()}.bind(this);for(var p=0;p<C.length;p++)$(C[p].player).on(PP.CONFIGURATION_LOADED,function(y){this.playerInited(y)}.bind(this)),this.attachListeners(C[p]);T.getIncludedPages().length<=0&&T.getExcludedPages()[0]&&this.getExcludeOverlay().showPage(T.getExcludedPages()[0])},this.playerInited=function(){var c,d,p;this.playersLoaded++,this.playersLoaded==C.length&&(i.init(),this.getScroller().scrollToIndex(),this.getScroller().addEventListener("swipe",this.loadCurrentPlayer),$(window).on("resize orientationchange",this.resizeCurrentPlayer),$(window).on("resize orientationchange",this.resizeContent),$(window).on("resize orientationchange",i.update),this.scaler.resizeCurrentPlayer(),w?this.loadVisiblePlayers(0):this.unloadUnusedPlayer(0,1),this.hideClickOverlays(0),PP.externalConfig&&PP.externalConfig.actionUrl&&(c=PP.externalConfig.actionUrl,PP.externalConfig.jumpToElement&&(c+="#"+PP.externalConfig.jumpToElement),(d=WP.instance.getCurrentPlayer()).getPlayerDiv().on(PP.READY,function(){d.ctx.actionHandler.processAction({open:{URL:c}},null,d,!0)})),this.addKeyListener(),t(),(p=document.createEvent("Event")).initEvent("purplePlayerLoadingDone",!0,!0),document.dispatchEvent(p),PP.Util.Analytics.sendPresenterContent(),PP.Util.Analytics.sendPresenterPage())},this.resizeContent=function(c){window.clearTimeout(this.resizeTimer),this.resizeTimer=window.setTimeout(function(){var d=PP.Util.getBreakPoint(this.breakpoints,this.container.width());this.breakpoint!==d&&(this.breakpoint=d,PP.externalConfig)&&PP.externalConfig.onBreakPoint&&"function"==typeof PP.externalConfig.onBreakPoint&&PP.externalConfig.onBreakPoint(this.breakpoint,c)}.bind(this),200)}.bind(this),this.scrollyTellingNextPage=function(c){this.getScroller().swipeRight()},this.scrollyTellingNextPageListener=this.scrollyTellingNextPage.bind(this),this.jumpToElement=function(c,d){var p,y,I,L,F,A;d.isPKItem&&d.isPKItem()&&(I=d.getPageID(),L=d.getPageAlias(),F=d.getPageIndex(),I?y=T.getPageById(I):L?(p=T.getPageWithAlias(L))&&(y=T.getPageById(p.id)):(F||0===F)&&(p=T.getPageAtIndex(F))&&(y=T.getPageById(p.id)),y)&&y.page&&(this.jumpToPageId(y.page.id),!0===y.included?(A=C[this.getScroller().getIndex()].player).stageViewNodeHandled?A.stage.onJumpToElement({},d):$(A.getPlayerDiv()).on(PP.READY,function(){A.stage.onJumpToElement({},d),$(A.getPlayerDiv()).off(PP.READY)}):$(this.getExcludeOverlay().player.element).on(PP.READY,function(){this.getExcludeOverlay().player.player.stage.onJumpToElement({},d),$(this.getExcludeOverlay().player.element).off(PP.READY)}.bind(this)))},this.jumpToElementListener=function(c,d){this.jumpToElement(c,d)}.bind(this),this.getNode=function(){return this.pluginContainer},this.getScroller=function(){return i},this.getExcludeOverlay=function(){return x},this.getProjectPath=function(){return m},this.getPurpleData=function(){return T},this.getElement=function(){return h},this.attachListeners=function(c){this.detachListeners(c),c.element.on(PP.SCROLLYTELLING_JUMP_TO_PAGE,this.jumpToElementListener),c.element.on(PP.SCROLLYTELLING_NEXT_PAGE,this.scrollyTellingNextPageListener)},this.detachListeners=function(c){c.element.off(PP.SCROLLYTELLING_NEXT_PAGE),c.element.off(PP.SCROLLYTELLING_JUMP_TO_PAGE)},this.loadCurrentPlayer=function(c){var d;c.index!==c.lastIndex&&(d=C[c.index].player,(!document.body.contains(d.getPlayerDiv()[0])||d.stage&&d.stage.viewNode&&!document.body.contains(d.stage.viewNode[0]))&&(d.stageViewNodeHandled=!1),C[c.index].element=d.getPlayerDiv(),this.attachListeners(C[c.index]),d.mobileZoom&&d.mobileZoom.reset(),d.start(),w?this.loadVisiblePlayers(c.index):this.unloadUnusedPlayer(c.index,1),this.onChangePage(d)),this.hideClickOverlays(c.index),C[c.lastIndex].player.pause()}.bind(this),this.getCurrentPlayer=function(){return this.getExcludeOverlay().player?(this.getExcludeOverlay().player.player.excluded=!0,this.getExcludeOverlay().player.player):C[i.getIndex()]?C[i.getIndex()].player:null},this.loadVisiblePlayers=function(c){for(var d,p=0;p<C.length;p++)p!==c&&(d=C[p].player,(!document.body.contains(d.getPlayerDiv()[0])||d.stage&&d.stage.viewNode&&!document.body.contains(d.stage.viewNode[0]))&&(d.stageViewNodeHandled=!1),C[c].element=d.getPlayerDiv(),d.getPlayerDiv())&&document.body.contains(d.getPlayerDiv()[0])&&d.load()},this.unloadUnusedPlayer=function(c,d){for(var p=0;p<C.length;p++)p<c-d||c+d<p?C[p].player.unload():p!==c&&C[p].player.load()},this.hideClickOverlays=function(c){for(var d=0;d<C.length;d++)C[d].player.clickOverlay&&(d===c?C[d].player.hideClickOverlay():C[d].player.showClickOverlay())}.bind(this),T.load(this.loadingDone.bind(this)),this.jumpToPageId=function(L,d,p,y){var I;this.getPluginByName("Controls"),!0===(L=T.getPageById(L)).included?(x.hide(),i.scrollToIndex(L.index,y)):L.page&&x.showPage(L.page),p&&p.length&&(I=WP.instance.getCurrentPlayer()).getPlayerDiv().on(PP.START,function(){var F=I.ctx.actionHandler.processActions(p,I.stage,I);F?F.then(function(){I.getPlayerDiv().off(PP.START)}):I.getPlayerDiv().off(PP.START)})},this.openToc=function(){var c=this.getPluginByName("Controls").instance;c&&c.toggleToc()},this.openTocListener=this.openToc.bind(this),this.container.on(PP.TOC_OPEN,this.openTocListener),this.runPlugins=function(c){for(var d=0;d<c.length;d++){var p=c[d].NAME,y=p.toLowerCase(),I=this.getPluginByName(p);!I||"false"===$(e).data(y)||!1===$(e).data(y)||PP.externalConfig&&!1===PP.externalConfig[p]||(I.instance=new I.create(this))}},this.getPluginByName=function(c){for(var d=0;d<WP.PLUGINS.length;d++){var p=WP.PLUGINS[d];if(p.name==c)return p}},this.onChangePage=function(){var c=this.getCurrentPlayer();PP.PreloadManager.onPageChange(c.playerId)},this.keyListener=function(c){switch(c.keyCode){case 87:case 37:c.shiftKey?i.scrollToIndex(0):i.swipeLeft();break;case 65:i.swipeLeft();break;case 83:case 39:c.shiftKey?i.scrollToEnd():i.swipeRight();break;case 68:case 32:i.swipeRight();break;case 35:i.scrollToEnd();break;case 36:i.scrollToIndex(0)}}.bind(this),this.addKeyListener=function(){document.querySelector("body").addEventListener("keydown",this.keyListener)},this.removeKeyListener=function(){document.querySelector("body").removeEventListener("keydown",this.keyListener)},this.destroyPlugins=function(){for(var c=0;c<WP.PLUGINS.length;c++){var d=WP.PLUGINS[c];d.instance&&d.instance.destroy&&"function"==typeof d.instance.destroy&&d.instance.destroy()}},this.destroy=function(){var c=this.getScroller();c&&c.removeEventListeners(),this.destroyPlugins(),this.removeKeyListener(),window.removeEventListener("message",PP.Util.receiveMessage),$(window).off("resize orientationchange",this.resizeCurrentPlayer),$(window).off("resize orientationchange",this.resizeContent),this.container.empty()}},WP.Scroller=function(e,t){var i,s=!1,n=e.container,a=0,o=0,r={swipe:[],sizeChange:[],init:[],swipestart:[]},l=$(e.container).find(".swiper-wrapper"),u=this;function S(){i.updateSize(),i.updateSlides(),i.slideTo(a)}e.preventSwiping&&l.addClass("swiper-no-swiping"),this.enabled=!0,this.disable=function(){i&&this.enabled&&(i.detachEvents(),$(window).on("resize orientationchange",S),this.enabled=!1)}.bind(this),this.enable=function(){i&&!this.enabled&&(i.attachEvents(),$(window).off("resize orientationchange",S),this.enabled=!0)}.bind(this),this.init=function(){if(e.virtual){for(var f=[],N=0;N<t.players.length;N++)f.push(t.players[N].element[0].outerHTML);s={slides:f,cache:!1}}else for(N=0;N<t.players.length;N++){var E=$('<div class="swiper-slide">'),w=(E.append(t.players[N].element),l.append(E),t.players[N].player.createClickOverlay(),this);t.players[N].player.clickOverlay.on("click",function(){w.scrollToIndex(this)}.bind(N))}i=new Swiper(n,{slidesPerView:s?1:"auto",centeredSlides:!0,spaceBetween:e.spaceBetween||100,virtual:s,noSwiping:!0,threshold:10,shortSwipes:!1,longSwipesMs:50,longSwipesRatio:.05,on:{init:function(){var g=t.players[this.activeIndex].player;s?(t.players[this.activeIndex].element=g.getPlayerDiv(),t.attachListeners(t.players[this.activeIndex])):t.resizePlayers(),g.stageViewNodeHandled=!1,g.start(),$(n).find(".swiper-wrapper").addClass("initialized"),u.dispatchEvent("init"),setTimeout(function(){i.update()})},slideChangeTransitionStart:function(){i&&(this.timeout&&(clearTimeout(this.timeout),delete this.timeout),this.dispatchEvent("swipestart",!0))}.bind(this),slideChangeTransitionEnd:function(){var g;i&&(a=i.activeIndex,s&&0===a&&o!==a&&(g=$(".swiper-wrapper")).prepend(g.find(".swiper-slide-active")),e.tracking&&PP.Util.Analytics.sendPresenterPage(),this.timeout&&(clearTimeout(this.timeout),delete this.timeout),this.update(),this.dispatchEvent("swipe"))}.bind(this),touchMove:function(g){PP.Util.isUiWebView()&&(this.timeout&&(clearTimeout(this.timeout),delete this.timeout),this.timeout=setTimeout(function(){this.scrollToIndex()}.bind(this),600))}.bind(this)}}),this.scrollToIndex(0),document.body.addEventListener("disableScrolling",this.disable),document.body.addEventListener("enableScrolling",this.enable)},this.getIndex=function(){return a},this.getLength=function(){return(e.virtual?i.virtual:i).slides.length},this.scrollToEnd=function(){this.scrollToIndex(this.getLength()-1)},this.scrollToIndex=function(f){(f=void 0===f?a:f)==a-2&&i.slideTo(f+1),i.slideTo(f),a=f},this.dispatchEvent=function(f,N){for(var E=r[f],w=0;w<E.length;w++)E[w]({index:a,lastIndex:o});N||(o=a)},this.addEventListener=function(f,N){-1==(f=r[f]).indexOf(N)&&f.push(N)},this.removeEventListener=function(f,N){-1!=(f=r[f]).indexOf(N)&&f.splice(N,1)},this.removeEventListeners=function(){document.body.removeEventListener("disableScrolling",this.disable),document.body.removeEventListener("enableScrolling",this.enable),this.disable()},this.swipeLeft=function(){a-=0===a?0:1,this.scrollToIndex()},this.swipeRight=function(){a+=a+1>=this.getLength()?0:1,this.scrollToIndex()},this.update=function(){(e.virtual?i.virtual:i).update()},this.stop=function(){var f=document.createEvent("MouseEvents");f.initEvent("mouseup",!0,!0),i&&(i.$el[0].dispatchEvent(f),i.update())}},WP.Scaler=function(e,t,i){this.wp=e,this.player=t,this.responseTime=200,this.strategy=PP.Util.mapContentFitStrategy(i)},WP.Scaler.FIT_INSIDE="fitInside",WP.Scaler.FILL="fill",WP.Scaler.FILL_ALIGN_TOP="fill-align-top",WP.Scaler.FIT_CONTAINER="fitContainer",WP.Scaler.DEFAULT=WP.Scaler.FIT_INSIDE,WP.Scaler.prototype.resizeCurrentPlayer=function(e){window.clearTimeout(this.resizeTimer),this.resizeTimer=window.setTimeout(function(){this.player[this.wp.getScroller().getIndex()].player.resize()}.bind(this),this.responseTime),e&&((e=this.player[this.wp.getScroller().getIndex()].player).resize(),e.stage)&&e.stage.viewNode&&e.stage.viewNode.data().simplebar&&e.stage.viewNode.data().simplebar.recalculate()},WP.PurplePlayerFactory=function(e,t){this.project=e,this.config=t},WP.PurplePlayerFactory.prototype.buildPages=function(e){for(var t,i=[],s=0;s<e.length;s++)"true"!==(t=e[s]).excludeFromPaging&&(t=this.createPlayer(t,0!==s),i.push(t));return i},WP.PurplePlayerFactory.prototype.createPlayer=function(e,t){var i=e.id;return{element:this.createElement(i),player:PurplePlayer({id:i,resourcesDir:this.project,dataFile:e.URL,autostart:!0,avoidAutoLoad:t,showControlPanel:!1,showProgress:!0,rewriteUrlMethodName:PP.REWRITEURLNAME,sizeIndicator:"height",jumpToPageCallback:WP.instance.jumpToPageId.bind(WP.instance),hasEnvironment:!0,lazyLoading:this.config.lazyLoading,preloadVideos:this.config.preloadVideos,contentFitStrategy:this.getContentFitStrategy(e),webviewError:this.config.webviewError,aboutPurple:this.config.aboutPurple,preventScrolling:this.config.preventScrolling,container:$(WP.instance.getElement()),pageIndex:e.pageIndex,pageLabel:e.pageLabel,pageAlias:e.alias,pageNumber:e.pageNumber,title:e.title,appId:this.config.appId,issueId:this.config.issueId,issueName:this.config.issueName,issueAlias:this.config.issueAlias,issuePubDate:this.config.issuePubDate,externalIssueId:this.config.externalIssueId,publicationId:this.config.publicationId,publicationName:this.config.publicationName,entitlementLogin:this.config.entitlementLogin,entitlementToken:this.config.entitlementToken,preview:this.config.preview,locale:this.config.locale,managerBaseUrl:this.config.managerBaseUrl,forceZoomMin:this.config.forceZoomMin,forceZoomMax:this.config.forceZoomMax,showPurchaseSuggestion:e.showPurchaseSuggestion,purchaseSuggestionCallback:this.config.purchaseSuggestionCallback,maxContentWidth:this.config.maxContentWidth})}},WP.PurplePlayerFactory.prototype.getContentFitStrategy=function(e){return e.contentsFitStrategy?PP.Util.mapContentFitStrategy(e.contentsFitStrategy):this.config.contentFit},WP.PurplePlayerFactory.prototype.createElement=function(e){return(e=$('<div class="player page pp-player" id="'+e+'"></div>')).html('<div class="pp-progress"><div class="pp-loaderBackground"><div class="pp-loaderBarWrapper"><div class="pp-loaderBar"><div class="pp-loaderStatus" style="width: 0;"></div></div></div></div></div>'),e},WP.PurpleData=function(e){var t,i,s=PP.externalUrlHandler(e.directory+"pages.xml"),n=[],a=[],o=[],r=[],l=PP.externalUrlHandler(e.directory+"TOC.xml"),u=!1,S=!1,f=!1;function N(w,g){PP.Util.Analytics.sendOpenFailed(),PP.externalConfig&&"function"==typeof PP.externalConfig.onLoadError&&PP.externalConfig.onLoadError(w,g)}function E(w,g,m,h){switch(m){case"number":return g in w?parseInt(w[g]):h;case"string":return g in w?""+w[g]:h;case"boolean":return g in w?!0===w[g]||"true"===w[g]:h}}this.load=function(w){t=w,$.ajax({type:"GET",url:s,dataType:"xml",success:this.parsePages.bind(this),error:function(g,m,h){f||(f=!0,N(g.status,"pages.xml")),console.error("PurpleData.js",s+" - "+h)}}),$.ajax({type:"GET",url:l,dataType:"xml",success:this.parseTOC.bind(this),error:function(g,m,h){f||(f=!0,N(g.status,"TOC.xml")),console.error("PurpleData.js",l+" - "+h)}})},this.parsePages=function(w,g,m){var h,P;i=m.getResponseHeader("packageId"),S||(P=0,$(w).find("array").each(function(){w=this,$(w).find("bean").each(function(){var T=$(this);(h={}).id=T.attr("id"),$(T).find("property").each(function(){var b=$(this);h[b.attr("name")]=b.attr("value")}),void 0!==h.URL&&(-1!=h.URL.indexOf("pkmedia:/")&&(h.URL=h.URL.split("pkmedia:/")[1]),h.URL=PP.externalUrlHandler(h.URL.replace(new RegExp(".stxml$"),".json"))),n.push(h),("true"===h.excludeFromPaging?o:a).push(h),P++})}),0===P&&!1===f&&(f=!0,N(null,"page")),S=!0,this.checkLoadingDone())},this.parseTOC=function(w){var g;u||($(w).find("array").each(function(){w=this,$(w).find("bean").each(function(){var m=$(this);(g={}).id=m.attr("id"),$(m).find("property").each(function(){var h=$(this),P=h.attr("value");"thumbnailURL"===h.attr("name")?(void 0!==P&&-1!=P.indexOf("pkmedia://")&&(P=P.split("pkmedia://")[1]),g.thumbnailURL=P):"page"===h.attr("name")?g.page=h.attr("ref"):"title"===h.attr("name")?g.title=P:"shortTitle"===h.attr("name")?g.shortTitle=P:"section"===h.attr("name")?g.section=P:"alias"===h.attr("name")?g.alias=P:"teaser"===h.attr("name")&&(g.teaser=P)}),r.push(g)})}),u=!0,this.checkLoadingDone())},this.checkLoadingDone=function(){if(u&&S){for(var w=0;w<r.length;w++)for(var g=r[w],m=0;m<n.length;m++){var h=n[m];h.id==g.page&&(h.tocData=g)}t()}},this.getPages=function(){return n},this.getIncludedPages=function(){return a},this.getExcludedPages=function(){return o},this.getTocData=function(){return r},this.getPageById=function(w){var g={page:null,index:-1,included:!0},m=this.getIndexOfIncludedPageId(w);return 0<=m?(g.page=a[m],g.index=m,g.included=!0):(m=this.getIndexOfExcludedPageId(w),g.page=o[m],g.index=m,g.included=!1),g},this.getIndexOfPageId=function(w){for(var g=0;g<n.length;g++)if(n[g].id===w)return g;return-1},this.getIndexOfIncludedPageId=function(w){for(var g=0;g<a.length;g++)if(a[g].id===w)return g;return-1},this.getIndexOfExcludedPageId=function(w){for(var g=0;g<o.length;g++)if(o[g].id===w)return g;return-1},this.getIndexOfTocItem=function(w){return r.indexOf(w)},this.getPageAtIndex=function(w){return n[w]},this.getIncludedPageAtIndex=function(w){return a[w]},this.getExcludedPageAtIndex=function(w){return o[w]},this.getValidTocForPage=function(w){for(var g=this.getIndexOfPageId(w.id);0<=g;){var m=this.getPageAtIndex(g);if(m&&m.tocData)return m.tocData;g--}return r[0]},this.getPageWithAlias=function(w){for(var g=0;g<n.length;g++)if(n[g].alias===w)return n[g]},this.getPagesForInterface=function(){for(var w=[],g=0;g<n.length;g++){var m={id:E(m=n[g],"id","string",null),pageIndex:E(m,"pageIndex","number",null),pageNumber:E(m,"pageNumber","number",null),pageLabel:E(m,"pageLabel","string",null),title:E(m,"title","string",null),shortTitle:E(m,"shortTitle","string",null),alias:E(m,"alias","string",null),showPurchaseSuggestion:E(m,"showPurchaseSuggestion","boolean",!1),placeHolder:E(m,"placeHolder","boolean",!1),excludeFromPaging:E(m,"excludeFromPaging","boolean",!1),thumbnailURL:"pkmedia://"+E(m,"thumbnailURL","string",null),sharingEnabled:E(m,"sharingEnabled","boolean",!1),sharingText:E(m,"sharingText","string",null),sharingURL:E(m,"sharingURL","string",null),customData:E(m,"customData","string",null)};w.push(m)}return w},this.getTocForInterface=function(){for(var w=[],g=0;g<r.length;g++){var m={pageId:E(m=r[g],"page","string",null),title:E(m,"title","string",null),section:E(m,"section","string",null),shortTitle:E(m,"shortTitle","string",null),pageAlias:E(m,"alias","string",null),thumbnailURL:"pkmedia://"+E(m,"thumbnailURL","string",null),teaser:E(m,"teaser","string",null)};w.push(m)}return w},this.getPackageId=function(){return i}},WP.BasePlugin=function(){},WP.BasePlugin.prototype={init:function(e){this.wp=e,this.active=!1,this.node=document.createElement("div")},activate:function(){this.wp.getNode().appendChild(this.node),this.active=!0},deactivate:function(){this.node.parentNode&&this.wp.getNode().removeChild(this.node),this.active=!1}},WP.Controls=function(e){var t_pageLabelsEnabled=e.getConfigValue("tocPageLabelsEnabled",!1),t_largeThumbs="large"===e.getConfigValue("tocStyle"),t_ellipsizeTitles=e.getConfigValue("tocEllipsizeTitles",!0),i=(this.init(e),this.node.id="wp_controls",this.activate(),document.createElement("div")),s=(i.className="leftImage",document.createElement("div")),n=(s.className="rightImage",document.createElement("div")),a=(n.className="wp-button firstPageBtn",document.createElement("div")),o=(a.className="wp-button lastPageBtn",document.createElement("div")),r=document.createElement("div"),l=document.createElement("div"),u=document.createElement("div"),S=document.createElement("div"),f=document.createElement("div"),N=(u.appendChild(S),u.appendChild(f),e.getProjectPath()),E=!1,w=[],g=!1,m=!1,h=!1,P=void 0,T=function(A){var O,_,M,V,R,Q,z=document.createElement("div"),Y=e.getPurpleData().getPageById(A.page).page;Y&&(z.className="wp-toc-entry",z.purpleData=A,(O=document.createElement("div")).className="wp-toc-label-wrapper",(_=document.createElement("div")).className="wp-toc-label",_.innerHTML=Y.pageLabel,O.appendChild(_),z.appendChild(O),(_=document.createElement("div")).className="wp-toc-thumbnail",_.style.backgroundImage="url("+PP.externalUrlHandler(N+A.thumbnailURL)+")",z.appendChild(_),(O=document.createElement("div")).className="wp-toc-texts-wrapper",(_=document.createElement("div")).className="wp-toc-texts",(M=document.createElement("div")).className="wp-toc-title",V=A.title,R=document.createElement("div"),Q=A.section,R.className="wp-toc-section",Q&&(R.innerHTML=Q),M&&(M.innerHTML=V),_.appendChild(R),_.appendChild(M),O.appendChild(_),z.appendChild(O),(f.getElementsByClassName("simplebar-content")[0]||f).appendChild(z),w.push(z),z.addEventListener("click",b),Y.pageLabel&&0<Y.pageLabel.length&&(g=!0),A.title&&0<A.title.length&&(h=!0),A.thumbnailURL)&&0<A.thumbnailURL.length&&(m=!0)};this.onDisableScrolling=function(A){A&&A.detail&&A.detail.keepButtons||(this.controlsHidden=!0,$(this.node).hide())}.bind(this),this.onEnableScrolling=function(){this.controlsHidden=!1,$(this.node).show()}.bind(this);var b=function(){y(),setTimeout(function(){for(var A,O,_=0;_<w.length;_++)this==w[_]&&(A=e.getPurpleData().getIndexOfIncludedPageId(this.purpleData.page),O=e.getPurpleData().getIndexOfExcludedPageId(this.purpleData.page),0<=A?(e.getExcludeOverlay().hide(),e.getScroller().scrollToIndex(A,!0)):e.getExcludeOverlay().showPage(e.getPurpleData().getExcludedPageAtIndex(O)),C(_))}.bind(this),200)},x=function(A){this.controlsHidden||F(),(A=e.getPurpleData().getIncludedPageAtIndex(A.index))&&A.tocData&&this.highlightImage(e.getPurpleData().getIndexOfTocItem(A.tocData))},C=function(A){for(var O=0;O<w.length;O++)A===O?(w[O].className="wp-toc-entry active",P=w[O]):w[O].className="wp-toc-entry";I()},c=(this.highlightImage=C,function(A){A.preventDefault(),A.stopPropagation(),e.getScroller().swipeLeft()}),d=function(A){A.preventDefault(),A.stopPropagation(),e.getScroller().swipeRight()},p=function(){if(r.className.indexOf("active")<0)u.style.height=0;else{for(var A=0;A<w.length;A++){var O=w[A];if(t_ellipsizeTitles&&O.purpleData&&O.purpleData.title){V=_=void 0;for(var _=O.getElementsByClassName("wp-toc-title")[0],V=(_.innerHTML=O.purpleData.title).split(" ");1<_.scrollHeight-_.offsetHeight&&V.length;)V.pop(),_.innerHTML=V.join(" ")+"..."}}var R=(f.getElementsByClassName("simplebar-content")[0]||f).scrollHeight;u.style.height=Math.min(R+f.offsetTop,e.container.height()-parseFloat($(u).css("paddingBottom")))+"px"}},y=function(){var A;E?(o.className="wp-button toc",r.className="wp-toc-container",u.style.height=0):(A={CONTENT_ID:PP.purple.metadata.getMetadata(PP.META_PUBLICATION_ID)+"/"+PP.purple.metadata.getMetadata(PP.META_ISSUE_ID),CONTENT_NAME:PP.purple.metadata.getMetadata(PP.META_ISSUE_NAME)},PP.purple.metadata.getMetadata(PP.META_PREVIEW)?PP.Util.Analytics.sendEvent(PP.Util.Analytics.EVENTS.PRESENTER_CONTENT_PREVIEW_TOC_OPENED,A):PP.Util.Analytics.sendEvent(PP.Util.Analytics.EVENTS.PRESENTER_CONTENT_TOC_OPENED,A),PP.Util.Analytics.sendView(PP.Util.Analytics.VIEWS.PRESENTER_CONTENT_TOC,A),r.className="wp-toc-container active",o.className="wp-button toc active",setTimeout(function(){I()},300)),p(),E=!E,PP.externalConfig&&PP.externalConfig.onTocOpened&&"function"==typeof PP.externalConfig.onTocOpened&&PP.externalConfig.onTocOpened(E)},I=function(){E&&P&&!PP.Util.isElementInViewport(P)&&((f.getElementsByClassName("simplebar-scroll-content")[0]||f).scrollTop=P.offsetTop)},L=(this.toggleToc=y,function(A){A.preventDefault(),A.stopPropagation(),y()}),F=function(){var A=e.getScroller();0===A.getIndex()?($(i).addClass("inactive"),$(n).addClass("inactive")):($(i).removeClass("inactive"),$(n).removeClass("inactive")),A.getIndex()+1>=A.getLength()?($(s).addClass("inactive"),$(a).addClass("inactive")):($(s).removeClass("inactive"),$(a).removeClass("inactive"))};this.destroy=function(){document.body.removeEventListener("disableScrolling",this.onDisableScrolling),document.body.removeEventListener("enableScrolling",this.onEnableScrolling),$(window).off("resize orientationchange",p)},function(){i.className="wp-button left",i.addEventListener("click",c),s.className="wp-button right",s.addEventListener("click",d),(PP.Util.isIOS()||PP.Util.isAndroid())&&(i.style.display="none",s.style.display="none"),o.className="wp-button toc",o.addEventListener("click",L),r.className="wp-toc-container",l.className="wp-toc-backdrop",u.className="wp-toc",S.className="wp-toc-header",f.className="wp-toc-entries",S.innerHTML=PP.i18n.get("TOC_TITLE");var A=document.createElement("div");A.className="toc-close",S.appendChild(A),A.addEventListener("click",y),r.appendChild(l),r.appendChild(u),n.addEventListener("click",function(M){M.preventDefault(),M.stopPropagation(),e.getScroller().scrollToIndex(0)}),a.addEventListener("click",function(M){M.preventDefault(),M.stopPropagation(),e.getScroller().scrollToEnd()}),this.node.appendChild(i),this.node.appendChild(s),this.node.appendChild(o),this.node.appendChild(n),this.node.appendChild(a),this.node.appendChild(r),PP.Util.isAndroid()||PP.Util.isIOS()?$(f).css({"overflow-y":"scroll","-webkit-overflow-scrolling":"touch"}):$(f).simplebar({directions:["vert"]});for(var O=e.getPurpleData().getTocData(),_=0;_<O.length;_++)T(O[_]);g&&t_pageLabelsEnabled&&(f.className+=" with-labels"),m&&(f.className+=" with-thumbnails"),h&&(f.className+=" with-titles"),t_largeThumbs&&(f.className+=" large-thumbs"),F(),e.getScroller().addEventListener("swipe",x.bind(this)),e.getScroller().addEventListener("sizeChange",x.bind(this)),this.controlsHidden=!1,document.body.addEventListener("disableScrolling",this.onDisableScrolling),document.body.addEventListener("enableScrolling",this.onEnableScrolling),$(window).on("resize orientationchange",p),l.addEventListener("mousedown",y),l.addEventListener("touchstart",y),u.addEventListener("wheel",function(M){M.stopPropagation()}),this.highlightImage(0)}.call(this)},WP.Controls.prototype=jQuery.extend(Object.create(WP.BasePlugin.prototype),{}),WP.Controls.NAME="Controls",WP.PLUGINS.push({name:WP.Controls.NAME,create:WP.Controls}),WP.FullscreenButton=function(e){this.init(e),this.node.className="wp-fullscreenButton",this.activate(),(e=document.createElement("div")).className="fsImg",this.node.appendChild(e),this.node.requestFullScreen||this.node.mozRequestFullScreen||this.node.webkitRequestFullScreen?$(e).on("click",function(t){this.node.requestFullScreen?document.fullScreen?document.exitFullScreen():this.node.requestFullscreen():this.node.mozRequestFullScreen?document.mozFullScreen?document.mozCancelFullScreen():this.node.mozRequestFullScreen():this.node.webkitRequestFullScreen&&(document.webkitIsFullScreen?document.webkitCancelFullScreen():this.node.webkitRequestFullScreen())}.bind(this)):e.style.display="none"},WP.FullscreenButton.prototype=jQuery.extend(Object.create(WP.BasePlugin.prototype),{}),WP.FullscreenButton.NAME="Fullscreen",WP.PLUGINS.push({name:WP.FullscreenButton.NAME,create:WP.FullscreenButton}),WP.Zooming=function(e){this.init(e),this.node.className="wp-zoomButton",this.activate();var t,i=!1,s=!1,n={},a=1,o=1,r=1,l=0,u=0,S=!1,f=!1,N=!1,E=document.createElement("div"),w=(E.className="zoomImg",$(E).on("click",function(){f?(S?se:ee)():(f=!0,$(m).addClass("visible"),$(E).addClass("active"),$(".webPresenter").css("cursor","move")),g||O(1)}),$(E).css("transition","transform 0.25s linear"),this.node.appendChild(E),document.createElement("div")),g=(w.className="fullWidthImg",$(w).on("click",L),$(w).css("transition","transform 0.25s linear"),this.node.appendChild(w),!1),m=document.createElement("div"),h=document.createElement("div"),P=document.createElement("div"),T=document.createElement("div"),b=document.createElement("div"),x=document.createElement("div"),C=document.createElement("div"),c=document.createElement("div"),d=document.createElement("div"),p=document.createElement("div"),y=document.createElement("div"),I=(y.className="pinBtn",document.createElement("div"));function L(){var v,D;N?(F(),ee(!0)):(N=!0,$(w).addClass("active"),D=e.getCurrentPlayer().getInnerDimensions().width,v=e.getCurrentPlayer().config.get("scaleFactor"),D=($(window).width()-140)/D/v,O(D=a<D?a:D),S=!0,$(y).addClass("active"),te(1/0))}function F(){N=!1,$(w).removeClass("active")}function A(v){t=v?$(".wp-exclude-overlay > .pp-player"):$(".webPresenter_scroller .swiper-slide-active .page")}function O(v,D){s&&(H.init(),r=v||a,$(".swiper-slide-active > .page").addClass("zoomed"),$(".wp-exclude-overlay > .page").addClass("zoomed"),A(e.getCurrentPlayer().excluded),D?(v=r,u=l=0,n.x=0,n.y=0,1!==(D=ne(t.css("transform"))).scale&&(l=D.translateX/D.scale,u=D.translateY/D.scale,n.x=D.translateX,n.y=D.translateY),M(v,l,u)):M(r,l,u),R(),g=!0,e.getScroller().disable(),i=!1,$(document).on("mousedown touchstart MSPointerDown",Q),$(document).on("mousemove touchmove MSPointerMove",z),$(document).on("mouseup touchend MSPointerUp",Y),H.getPosFromZoom(),e.resizeCurrentPlayer(!0))}function _(v){return!v||isNaN(v)?1:v}function M(v,D,k){v="scale("+v+") translateX("+_(D)+"px) translateY("+_(k)+"px)",t.css("transform",v)}function V(v,D,k){var U=D,B=k,Z=e.getCurrentPlayer().config.get("contentFitStrategy")===PP.MAGAZINE,W=e.getCurrentPlayer().getInnerDimensions().width,J=e.getCurrentPlayer().getInnerDimensions().height,G=e.getCurrentPlayer().config.get("scaleFactor"),X=$(window).width(),j=$(window).height(),q=j/J,K=parseFloat(t.css("margin-top"));return q=J*q*v,(W=1/v*(X+(W*G*v-X)/2))-20/v<D?n.x=(U=W-20/v)*v:D<-1*W+20/v&&(n.x=(U=-1*W+20/v)*v),(X=1/v*(j+(q-j)/2)-K-j/v)-20/v<k?n.y=(B=X-20/v)*v:k<-1*(X=Z?J*G+j*(1/v*.5-.5)+K:X)+20/v&&(n.y=(B=-1*X+20/v)*v),{newTranslateX:U,newTranslateY:B}}function R(v){var D,k=e.getCurrentPlayer().getInnerDimensions().height;e.getCurrentPlayer().stage&&e.getCurrentPlayer().stage.viewNode&&(D=e.getCurrentPlayer().stage.viewNode.find("> .simplebar-scroll-content"),v?D.css("height",""):(D.height(k),e.getCurrentPlayer().stage.viewNode.height(k)))}I.className="pinImg",y.appendChild(I),$(y).on("click",function(){S=!S,$(y).toggleClass("active",S)}),m.className="wp-zoomSlider",p.className="line",b.className="border_small",x.className="border_small",C.className="border_small",c.className="border_small",d.className="border_small",P.className="border",h.className="border",T.className="dragable",P.style.bottom="0px",P.style.marginBottom="-25px",P.innerHtml="+",h.innerHtml="-",$(P).html("+"),$(h).html("-"),$(h).on("click",function(){var v;o<=r-.25&&(r-=.25,F(),H.getPosFromZoom(),t)&&(v=V(r,l,u),M(r,l=v.newTranslateX,u=v.newTranslateY),R())}),$(P).on("click",function(){var v;r+.25<=a&&(r+=.25,F(),H.getPosFromZoom(),t)&&(v=V(r,l,u),M(r,l=v.newTranslateX,u=v.newTranslateY),R())}),m.appendChild(p),m.appendChild(b),m.appendChild(x),m.appendChild(C),m.appendChild(c),m.appendChild(d),m.appendChild(h),m.appendChild(P),m.appendChild(T),this.node.appendChild(m),this.node.appendChild(y);var Q=function(v){v.preventDefault(),i=!0,n={x:v.clientX,y:v.clientY},t.on("click",function(D){D.stopPropagation(),D.preventDefault()})},z=function(v){var D,k,U;i&&t&&1!=r&&(D=ne(t.css("transform")),t.css("transition-property","none"),k=v.clientX-n.x,U=v.clientY-n.y,n.x=v.clientX,n.y=v.clientY,l=D.translateX/r+Math.floor(k/r),u=D.translateY/r+Math.floor(U/r),M(r,l,u),v.preventDefault())},Y=function(v){var D;t&&(t.css("transition-property","transform, opacity"),D=V(r,l,u),u=1==r?l=0:(l=D.newTranslateX,D.newTranslateY),n={},M(r,l,u)),i=!1},H=new function(){function v(W){Z&&(W.stopPropagation(),W.preventDefault(),k=K+(W=W.clientY-J),k=Math.max(G,k),k=Math.min(j,k),T.style.top=k+"px",t&&(M(r,l,u),R()),W=(k-G)/B,r=W=(W/=100)*U+o)}function D(W){Z&&(K=k,Z=!1,t.css("transition-property","transform, opacity"),$(T).css("transition-property","top"))}var k,U,B,Z=!1,J=-1,G=14,j=.15*$(window).height()-36,K=G;function q(){j=.25*$(window).height()-28,B=(j-G)/100,H.getPosFromZoom()}$(T).on("mousedown touchstart MSPointerDown",function(W){W.preventDefault(),W.stopPropagation(),O(r),Z=!0,J=W.clientY,t.css("transition-property","none")}),$(document).on("mousemove touchmove MSPointerMove",v),$(document).on("mouseup touchend MSPointerUp",D),this.init=function(){B=(j-G)/100,U=a-o,document.body.addEventListener("enableScrolling",function(){t&&document.body.dispatchEvent(new CustomEvent("disableScrolling",{detail:{keepButtons:!0}}))})},this.getPosFromZoom=function(){var W=(W=r-o)/U*100*B;K=k=W+=G,T.style.top=k+"px"},$(window).on("resize orientationchange",q),this.destroy=function(){$(window).off("resize orientationchange",q),$(document).off("mousemove touchmove MSPointerMove",v),$(document).off("mouseup touchend MSPointerUp",D)}};function ee(v){var D,k;(g||v)&&(v=l,D=u,l=u=0,r=1,t&&(M(1,0,0),R(!0)),n={},$(".swiper-slide > .page").removeClass("zoomed"),$(".wp-exclude-overlay > .page").removeClass("zoomed"),g=!1,t=t&&void 0,e.getScroller().enable(),H.getPosFromZoom(),e.resizeCurrentPlayer(!0),(k=e.getCurrentPlayer().getStageScroller())&&(v&&k.scrollLeft(-1*v),D)&&k.scrollTop(-1*D),se(),F(),$(document).off("mousedown touchstart MSPointerDown",Q),$(document).off("mousemove touchmove MSPointerMove",z),$(document).off("mouseup touchend MSPointerUp",Y))}function se(){f=!1,$(m).removeClass("visible"),$(E).removeClass("active"),$(".webPresenter").css("cursor","default")}function ie(){var v=e.getCurrentPlayer().getZoom();v.max===v.min?($(".wp-zoomButton").removeClass("visible"),s=!1):(s=!0,$(".wp-zoomButton").addClass("visible"),v.max&&(a=v.max),v.min&&(o=v.min)),H.init(),H.getPosFromZoom()}function ne(v){var D,k=0,U=0,B=1;return v&&(D=new RegExp("matrix\\((.*)\\)"),D=(v=v.match(D))&&v[1])&&(D=D.split(","),B=parseFloat(D[0]),k=parseFloat(D[D.length-2]),U=parseFloat(D[D.length-1])),{translateX:k,translateY:U,scale:B}}function ae(v){switch(v.keyCode){case 13:L();break;case 27:g&&(t.css("transition-property","transform, opacity"),ee());break;case 33:case 38:te(50);break;case 34:case 40:te(-50)}}function oe(v){var D;v.ctrlKey?(D=v.deltaY,event.preventDefault(),s&&(0<D?o<=r-.25&&(O(r-.25),F()):r+.25<=a&&(O(r+.25),F()))):te(-v.deltaY)}function te(v){s&&g&&1!=r&&(v=V(r,l,u+v),M(r,l=v.newTranslateX,u=v.newTranslateY),R())}e.getScroller().addEventListener("swipestart",function(v,D){ie(),A(),1!==r&&S?(O(r,!0),te(1/0)):ee(!0)}),e.getExcludeOverlay().overlay.on(PP.EXCLUDE_SHOW_PAGE,function(){r=1,ee(),ie(),A(!0)}),e.getCurrentPlayer()&&(e.getCurrentPlayer().configurationLoaded?ie():e.getCurrentPlayer().getPlayerDiv().on(PP.READY,function(){ie()}));const re=PP.Util.debounce(function(){const v=t;v&&v.css("-webkit-backface-visibility","hidden"),setTimeout(function(){v&&v.css("-webkit-backface-visibility","initial")},50)},100);window.addEventListener("wheel",oe,{passive:!1}),PP.Util.isSafari()&&window.addEventListener("wheel",re),document.querySelector("body").addEventListener("keydown",ae),this.destroy=function(){document.querySelector("body").removeEventListener("keydown",ae),$(document).off("mousedown touchstart MSPointerDown",Q),$(document).off("mousemove touchmove MSPointerMove",z),$(document).off("mouseup touchend MSPointerUp",Y),window.removeEventListener("wheel",oe),window.removeEventListener("wheel",re),H.destroy()}},WP.Zooming.prototype=jQuery.extend(Object.create(WP.BasePlugin.prototype),{}),WP.Zooming.NAME="Zooming",WP.PLUGINS.push({name:WP.Zooming.NAME,create:WP.Zooming}),WP.MobileZooming=function(e){function t(c,d,p){var y=document.createEvent("HTMLEvents");y.initEvent(d,!0,!1),y.data=p,c.dispatchEvent(y)}var i,s,n,a,o,r,l,u,S,f,N,E,w=!1,g=[],m=null,h=0,P=null;function T(c,d,p){this.el=c,this.zoomFactor=1,this.lastScale=1,this.offset={x:0,y:0},this.options=Object.assign({},this.defaults,p),this.container=d,this.initialZoomFactor=1,this.setupMarkup(),this.bindEvents(),this.update(),this.enable()}function b(c,d){return c+d}T.prototype={defaults:{tapZoomFactor:2,zoomOutFactor:1.2,animationDuration:300,maxZoom:4,minZoom:.5,lockDragAxis:!1,use2d:!0,zoomedEventName:"pz_zoomed",zoomResetEventName:"pz_zoomreset",zoomStartEventName:"pz_zoomstart",zoomEndEventName:"pz_zoomend",dragStartEventName:"pz_dragstart",dragEndEventName:"pz_dragend",doubleTapEventName:"pz_doubletap"},startDecelAnim:function(){var c,d,p,y;g.length&&(d=(y=g[g.length-1]).x-(c=g[0]).x,p=y.y-c.y,i=d/(y=(y.time-c.time)/15)||0,s=p/y||0,1<Math.abs(i)||1<Math.abs(s))&&(w=!0,requestAnimationFrame(this.stepDecelAnim.bind(this)))},stepDecelAnim:function(){var c;w&&(i*=.92,s*=.92,c={x:0,y:0,inBounds:!0},.3<Math.abs(i)||.3<Math.abs(s)||!c.inBounds?(this.addOffset({x:i,y:s}),this.update(),requestAnimationFrame(this.stepDecelAnim.bind(this))):w=!1)},detachEventListeners:function(){this.el.removeEventListener("touchstart",f),this.el.removeEventListener("touchmove",N),this.el.removeEventListener("touchend",E)},handleZoomStart:function(c){var d;t(this.el,this.options.zoomStartEventName),this.stopAnimation(),this.lastScale=1,this.nthZoom=0,this.stage=$(this.el).find("> .pp-stage")[0],this.stage&&(this.stage.style.overflow="visible",this.scrollContent=$(this.el).find("> .pp-stage > .simplebar-scroll-content")[0],this.scrollContent)&&(d=this.getInitialZoomFactor()*this.zoomFactor,this.offset.x=this.scrollContent.scrollLeft*d,this.offset.y=this.scrollContent.scrollTop*d)},handleZoom:function(p,d){p=this.getTouchCenter(this.getTouches(p));var y=d/this.lastScale;this.lastScale=d,this.nthZoom+=1,3<this.nthZoom&&(this.scale(y,p),this.drag(p,this.lastZoomCenter)),this.lastZoomCenter=p},handleZoomEnd:function(){t(this.el,this.options.zoomEndEventName,{zoomFactor:this.zoomFactor}),this.end()},handleDragStart:function(c){t(this.el,this.options.dragStartEventName),this.stopAnimation(),this.lastDragPosition=!1,g=[],this.handleDrag(c)},handleDrag:function(c){if(1<this.zoomFactor){c=this.getTouches(c)[0],this.drag(c,this.lastDragPosition),this.lastDragPosition=c,c=this.offset.x;for(var d=this.offset.y,p=Date.now();0<g.length&&!(p-g[0].time<=100);)g.shift();g.push({x:c,y:d,time:p})}},handleDragEnd:function(){t(this.el,this.options.dragEndEventName),"touchend"===event.type&&this.startDecelAnim(),this.end()},canDrag:function(){return!(.99<(c=this.zoomFactor)&&c<1.01);var c},drag:function(c,d){d&&(this.options.lockDragAxis?Math.abs(c.x-d.x)>Math.abs(c.y-d.y)?this.addOffset({x:-(c.x-d.x),y:0}):this.addOffset({y:-(c.y-d.y),x:0}):this.addOffset({y:-(c.y-d.y),x:-(c.x-d.x)}))},scaleTo:function(c,d){this.scale(c/this.zoomFactor,d)},scale:function(c,d){c=this.scaleZoomFactor(c),this.addOffset({x:(c-1)*(d.x+this.offset.x),y:(c-1)*(d.y+this.offset.y)})},scaleZoomFactor:function(c){var d=this.zoomFactor;return this.zoomFactor*=c,this.zoomFactor=Math.min(this.options.maxZoom,Math.max(this.zoomFactor,this.options.minZoom)),this.zoomFactor/d},getTouchCenter:function(c){return this.getVectorAvg(c)},getVectorAvg:function(c){return{x:c.map(function(d){return d.x}).reduce(b)/c.length,y:c.map(function(d){return d.y}).reduce(b)/c.length}},addOffset:function(c){isNaN(c.x)||(this.offset={x:this.offset.x+c.x,y:this.offset.y+c.y})},sanitize:function(){this.zoomFactor<this.options.zoomOutFactor&&this.zoomOutAnimation()},zoomOutAnimation:function(){var c=this.zoomFactor,d=this.getCurrentZoomCenter(),p=function(y){this.scaleTo(c+y*(1-c),d)}.bind(this);this.animate(this.options.animationDuration,p,this.swing)},updateAspectRatio:function(){this.setContainerY(this.getContainerX()/this.getAspectRatio())},getInitialZoomFactor:function(){return this.initialZoomFactor},setInitialZoomFactor:function(c){this.initialZoomFactor=c},getAspectRatio:function(){return this.el.offsetWidth/this.el.offsetHeight},getCurrentZoomCenter:function(){var c,p,d=(d=(d=this.offset.x)/(c=(c=this.container.offsetWidth*this.zoomFactor)-d-this.container.offsetWidth))*this.container.offsetWidth/(1+d),y=(y=(y=this.offset.y)/(p=(p=this.container.offsetHeight*this.zoomFactor)-y-this.container.offsetHeight))*this.container.offsetHeight/(1+y);return{x:d=0==c?this.container.offsetWidth:d,y:y=0==p?this.container.offsetHeight:y}},getTouches:function(c){var d=this.container.getBoundingClientRect(),p=d.top+document.body.scrollTop,y=d.left+document.body.scrollLeft;return Array.prototype.slice.call(c.touches).map(function(I){return{x:I.pageX-y,y:I.pageY-p}})},animate:function(c,d,p,y){var I=(new Date).getTime(),L=function(){var F,A;this.inAnimation&&(A=(F=(new Date).getTime()-I)/c,c<=F?(d(1),y&&y(),this.update(),this.stopAnimation(),this.update()):(p&&(A=p(A)),d(A),this.update(),requestAnimationFrame(L)))}.bind(this);this.inAnimation=!0,requestAnimationFrame(L)},stopAnimation:function(){this.inAnimation=!1},swing:function(c){return-Math.cos(c*Math.PI)/2+.5},getContainerX:function(){return this.container.offsetWidth},getContainerY:function(){return this.container.offsetHeight},setContainerY:function(c){return this.container.style.height=c+"px"},setupMarkup:function(){this.container=this.el.parentNode,this.el.style.webkitTransformOrigin="0% 0%",this.el.style.mozTransformOrigin="0% 0%",this.el.style.msTransformOrigin="0% 0%",this.el.style.oTransformOrigin="0% 0%",this.el.style.transformOrigin="0% 0%",PP.Util.isAndroid()&&(this.el.style.transition="transform 200ms ease-out")},end:function(){t(this.el,this.options.zoomEndEventName,{zoomFactor:this.zoomFactor}),this.sanitize(),this.update()},bindEvents:function(){x(this.container,this),window.addEventListener("resize",this.update.bind(this))},update:function(){var c,d,p,y,I=!1;if(!this.updatePlaned)return this.updatePlaned=!0,c=this.getInitialZoomFactor()*this.zoomFactor,d=this.offset.x/c,p=this.offset.y/c,y="scale("+c+") translateX(-50%) translateY(-50%)",this.scrollContent&&(I=d<0?d:d>this.scrollContent.scrollWidth&&d-this.scrollContent.scrollWidth),setTimeout(function(){this.updatePlaned=!1,this.stage&&(this.stage.style.webkitTransform=y,this.stage.style.mozTransform=y,this.stage.style.msTransform=y,this.stage.style.oTransform=y,this.stage.style.transform=y,this.stage.style.left="50%",this.stage.style.top="50%",this.scrollContent)&&(this.scrollContent.style.width=this.container.clientWidth/c+"px",this.scrollContent.style.height=this.container.clientHeight/c+"px",this.scrollContent.scrollLeft=d,this.scrollContent.scrollTop=p,this.scrollContent.style.left="50%",this.scrollContent.style.top="50%",this.scrollContent.style.transform="translateX(-50%) translateY(-50%)",this.scrollContent.style.maxHeight="100%",this.scrollContent.style.maxWidth="100%"),1===this.zoomFactor?t(this.el,this.options.zoomResetEventName):t(this.el,this.options.zoomedEventName,{zoomFactor:this.zoomFactor})}.bind(this),PP.Util.isAndroid()?50:0),I},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},reset:function(){1!==this.zoomFactor&&(g=[],this.zoomOutAnimation())}};var x=function(c,d){n=function(p,y){if(m!==p){if(m&&!p)switch(m){case"zoom":d.handleZoomEnd(y);break;case"drag":d.handleDragEnd(y)}switch(p){case"zoom":d.handleZoomStart(y);break;case"drag":d.handleDragStart(y)}}m=p},a=function(p){2===h?n("zoom"):1===h&&d.canDrag()?n("drag",p):n(null,p)},o=function(p){return Array.from(p).map(function(y){return{x:y.pageX,y:y.pageY}})},r=function(L,y){var I=L.x-y.x;return L=L.y-y.y,Math.sqrt(I*I+L*L)},l=function(p,y){return p=r(p[0],p[1]),r(y[0],y[1])/p},u=function(p){p.stopPropagation(),p.preventDefault()},S=!0,N=function(p){if(d.enabled){if(S)a(p),m&&u(p),P=o(p.touches);else{switch(m){case"zoom":d.handleZoom(p,l(P,o(p.touches)));break;case"drag":d.handleDrag(p)}var y,I;!m||!1!==(y=d.update())&&void 0!==y&&(I=o(p.touches)[0].x<P[0].x,y<0&&!I||0<y&&I)||u(p)}S=!1}},E=function(p){d.enabled&&(h=p.touches.length,a(p))},c.addEventListener("touchstart",f=function(p){d.enabled&&(S=!0,2===(h=p.touches.length)?d.handleZoomStart(p):1!==d.zoomFactor&&d.handleDragStart(p))}),c.addEventListener("touchmove",N),c.addEventListener("touchend",E)};function C(c){var d=c.player.getZoom(),p=c.player.getPlayerDiv();d.max>d.min&&(c.player.mobileZoom&&(c.player.mobileZoom.reset(),c.player.mobileZoom.detachEventListeners(),c.player.mobileZoom.disable(),delete c.player.mobileZoom),c.player.mobileZoom=new T(p[0],e.container[0],{maxZoom:d.max,minZoom:d.min}),c.player.resetStageAndScrollContent(),c.player.resize("auto"),p[0].addEventListener("pz_zoomed",function(){this.element.addClass("pinch-zoomed")}.bind(c)),p[0].addEventListener("pz_zoomreset",function(){this.element.removeClass("pinch-zoomed")}.bind(c)))}e.getScroller().addEventListener("swipe",function(c){c.index!==c.lastIndex&&(C(e.players[c.index]),c=e.players[c.lastIndex])&&c.player.mobileZoom&&(c.player.mobileZoom.reset(),c.player.mobileZoom.detachEventListeners(),c.player.mobileZoom.disable(),delete c.player.mobileZoom)}),C(e.players[e.getScroller().getIndex()])},WP.MobileZooming.prototype=jQuery.extend(Object.create(WP.BasePlugin.prototype),{}),WP.MobileZooming.NAME="MobileZooming",WP.PLUGINS.push({name:WP.MobileZooming.NAME,create:WP.MobileZooming}),WP.ExcludeOverlay=function(e){this.overlay=jQuery('<div class="wp-exclude-overlay"></div>'),this.container=jQuery('<div class="wp-exclude-container"></div>'),this.container.append(this.overlay),$(".presenterContainer").append(this.container),this.factory=e,this.container.on("touchmove mousemove",function(t){t.stopPropagation()})},WP.ExcludeOverlay.prototype.showPage=function(e){this.show(),this.overlay.empty(),e=this.factory.createPlayer(e,!0),this.player=e,this.overlay.append(this.player.element),this.player.player.stageViewNodeHandled=!1,$(e.element).on(PP.SCROLLYTELLING_NEXT_PAGE,function(t){this.scrollyTellingNextPage(t)}.bind(WP.instance)),$(e.element).on(PP.SCROLLYTELLING_JUMP_TO_PAGE,function(t,i){this.jumpToElement(t,i)}.bind(WP.instance)),$(e.element).on(PP.READY,function(){this.overlay.trigger(PP.EXCLUDE_SHOW_PAGE)}.bind(this)),PP.Util.Analytics.sendPresenterPage(),this.player.player.start()},WP.ExcludeOverlay.prototype.hide=function(){document.body.dispatchEvent(new CustomEvent("enableScrolling")),this.container.fadeOut(),this.player&&(delete this.player,PP.Util.Analytics.sendPresenterPage())},WP.ExcludeOverlay.prototype.show=function(){document.body.dispatchEvent(new CustomEvent("disableScrolling")),this.container.fadeIn()},PP.purple={metadata:{getMetadata:function(e,t,i){var s=null;switch(e){case PP.META_APP_ID:s=WP.instance.getConfigValue("appId");break;case PP.META_DEVICE_OS:s=window.navigator.platform;break;case PP.META_ENTITLEMENT_LOGIN:s=WP.instance.getConfigValue("entitlementLogin");break;case PP.META_ENTITLEMENT_TOKEN:s=WP.instance.getConfigValue("entitlementToken");break;case PP.META_ISSUE_ID:s=WP.instance.getConfigValue("issueId");break;case PP.META_ISSUE_PUB_DATE:s=WP.instance.getConfigValue("issuePubDate");break;case PP.META_ISSUE_NAME:s=WP.instance.getConfigValue("issueName");break;case PP.META_ISSUE_ALIAS:s=WP.instance.getConfigValue("issueAlias");break;case PP.META_EXTERNAL_ISSUE_ID:s=WP.instance.getConfigValue("externalIssueId");break;case PP.META_LOCALE:s=WP.instance.getConfigValue("locale");break;case PP.META_MANAGER_BASE_URL:s=WP.instance.getConfigValue("managerBaseUrl");break;case PP.META_PAGE_ALIAS:s=(n=WP.instance.getPurpleData().getPageById(i).page)?n.pageAlias:WP.instance.getCurrentPlayer().config.get("pageAlias");break;case PP.META_PAGE_LABEL:s=(n=WP.instance.getPurpleData().getPageById(i).page)?n.pageLabel:WP.instance.getCurrentPlayer().config.get("pageLabel");break;case PP.META_PAGE_FILENAME:var n,a,o=a=(a=(n=WP.instance.getPurpleData().getPageById(i).page)?n.URL:WP.instance.getCurrentPlayer().config.get("dataFile")).substring(a.lastIndexOf("/")+1);s=o=-1<a.indexOf(".json?")?a.substring(0,a.indexOf(".json?")+5):o;break;case PP.META_PAGE_ID:s=(n=WP.instance.getPurpleData().getPageById(i).page)?n.id:WP.instance.getCurrentPlayer().config.get("id");break;case PP.META_PAGE_INDEX:s=(n=WP.instance.getPurpleData().getPageById(i).page)?n.pageIndex:WP.instance.getCurrentPlayer().config.get("pageIndex");break;case PP.META_PAGE_NUMBER:s=(n=WP.instance.getPurpleData().getPageById(i).page)?n.pageNumber:WP.instance.getCurrentPlayer().config.get("pageNumber");break;case PP.META_PAGE_TITLE:s=(n=WP.instance.getPurpleData().getPageById(i).page)?n.title:WP.instance.getCurrentPlayer().config.get("title");break;case PP.META_PREVIEW:s=WP.instance.getConfigValue("preview");break;case PP.META_PLATFORM:s="web";break;case PP.META_PUBLICATION_ID:s=WP.instance.getConfigValue("publicationId");break;case PP.META_PUBLICATION_NAME:s=WP.instance.getConfigValue("publicationName")}return t?t(s):s}},state:{setState:function(e,t){var i=WP.instance.getCurrentPlayer().config.get("appId");localStorage.setItem("purple-"+i+"_"+e,t)},getState:function(e,t){var i=WP.instance.getCurrentPlayer().config.get("appId");return i=localStorage.getItem("purple-"+i+"_"+e),t?t(i):i},removeState:function(e){var t=WP.instance.getCurrentPlayer().config.get("appId");localStorage.removeItem("purple-"+t+"_"+e)}},issue:{getPages:function(e){var t=WP.instance.getPurpleData().getPagesForInterface();return e?e(t):t},getToc:function(e){var t=WP.instance.getPurpleData().getTocForInterface();return e?e(t):t}},closeView:function(){$(".pp-internal-browser-container").remove(),WP.instance.getCurrentPlayer().container.css("filter","")},appBrowser:{getDisplayMode:function(e){var t=$(".pp-internal-browser-container .pp-frame-wrapper").hasClass("pp-mode-modal")?"modal":"embedded";return e?e(t):t},isTitleBarEnabled:function(e){var t=$(".pp-internal-browser-container .pp-frame-wrapper").hasClass("pp-titlebar-enabled");return e?e(t):t},isControlsEnabled:function(e){var t=$(".pp-internal-browser-container .pp-frame-wrapper").hasClass("pp-navbar-enabled");return e?e(t):t},isStatusBarEnabled:function(e){return!!e&&e(!1)}}}}}]);