@internetarchive/bookreader 5.0.0-18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (428) hide show
  1. package/.eslintrc.js +58 -0
  2. package/.gitattributes +2 -0
  3. package/.github/ISSUE_TEMPLATE/bug.md +32 -0
  4. package/.github/ISSUE_TEMPLATE/feature-request.md +30 -0
  5. package/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +15 -0
  6. package/.github/dependabot.yml +8 -0
  7. package/.github/workflows/node.js.yml +37 -0
  8. package/.github/workflows/npm-publish.yml +47 -0
  9. package/.testcaferc.json +5 -0
  10. package/BookReader/BookReader.css +2983 -0
  11. package/BookReader/BookReader.js +3 -0
  12. package/BookReader/BookReader.js.LICENSE.txt +117 -0
  13. package/BookReader/BookReader.js.map +1 -0
  14. package/BookReader/bookreader-component-bundle.js +1436 -0
  15. package/BookReader/bookreader-component-bundle.js.LICENSE.txt +27 -0
  16. package/BookReader/bookreader-component-bundle.js.map +1 -0
  17. package/BookReader/icons/1up.svg +1 -0
  18. package/BookReader/icons/2up.svg +1 -0
  19. package/BookReader/icons/advance.svg +3 -0
  20. package/BookReader/icons/chevron-right.svg +1 -0
  21. package/BookReader/icons/close-circle-dark.svg +1 -0
  22. package/BookReader/icons/close-circle.svg +1 -0
  23. package/BookReader/icons/fullscreen.svg +1 -0
  24. package/BookReader/icons/fullscreen_exit.svg +1 -0
  25. package/BookReader/icons/hamburger.svg +1 -0
  26. package/BookReader/icons/left-arrow.svg +1 -0
  27. package/BookReader/icons/magnify-minus.svg +1 -0
  28. package/BookReader/icons/magnify-plus.svg +1 -0
  29. package/BookReader/icons/magnify.svg +1 -0
  30. package/BookReader/icons/pause.svg +1 -0
  31. package/BookReader/icons/play.svg +1 -0
  32. package/BookReader/icons/playback-speed.svg +1 -0
  33. package/BookReader/icons/read-aloud.svg +1 -0
  34. package/BookReader/icons/review.svg +3 -0
  35. package/BookReader/icons/thumbnails.svg +1 -0
  36. package/BookReader/icons/volume-full.svg +1 -0
  37. package/BookReader/images/BRicons.png +0 -0
  38. package/BookReader/images/BRicons.svg +5 -0
  39. package/BookReader/images/BRicons_ia.png +0 -0
  40. package/BookReader/images/back_pages.png +0 -0
  41. package/BookReader/images/book_bottom_icon.png +0 -0
  42. package/BookReader/images/book_down_icon.png +0 -0
  43. package/BookReader/images/book_left_icon.png +0 -0
  44. package/BookReader/images/book_leftmost_icon.png +0 -0
  45. package/BookReader/images/book_right_icon.png +0 -0
  46. package/BookReader/images/book_rightmost_icon.png +0 -0
  47. package/BookReader/images/book_top_icon.png +0 -0
  48. package/BookReader/images/book_up_icon.png +0 -0
  49. package/BookReader/images/books_graphic.svg +1 -0
  50. package/BookReader/images/booksplit.png +0 -0
  51. package/BookReader/images/control_pause_icon.png +0 -0
  52. package/BookReader/images/control_play_icon.png +0 -0
  53. package/BookReader/images/embed_icon.png +0 -0
  54. package/BookReader/images/icon-home-ia.png +0 -0
  55. package/BookReader/images/icon_OL-logo-xs.png +0 -0
  56. package/BookReader/images/icon_alert-xs.png +0 -0
  57. package/BookReader/images/icon_book.svg +1 -0
  58. package/BookReader/images/icon_bookmark.svg +1 -0
  59. package/BookReader/images/icon_close-pop.png +0 -0
  60. package/BookReader/images/icon_download.png +0 -0
  61. package/BookReader/images/icon_gear.svg +1 -0
  62. package/BookReader/images/icon_hamburger.svg +1 -0
  63. package/BookReader/images/icon_home.png +0 -0
  64. package/BookReader/images/icon_home.svg +1 -0
  65. package/BookReader/images/icon_home_ia.png +0 -0
  66. package/BookReader/images/icon_indicator.png +0 -0
  67. package/BookReader/images/icon_info.svg +1 -0
  68. package/BookReader/images/icon_one_page.svg +1 -0
  69. package/BookReader/images/icon_pause.svg +1 -0
  70. package/BookReader/images/icon_play.svg +1 -0
  71. package/BookReader/images/icon_playback-rate.svg +1 -0
  72. package/BookReader/images/icon_return.png +0 -0
  73. package/BookReader/images/icon_search_button.svg +1 -0
  74. package/BookReader/images/icon_share.svg +1 -0
  75. package/BookReader/images/icon_skip-ahead.svg +1 -0
  76. package/BookReader/images/icon_skip-back.svg +2 -0
  77. package/BookReader/images/icon_speaker.svg +1 -0
  78. package/BookReader/images/icon_speaker_open.svg +1 -0
  79. package/BookReader/images/icon_thumbnails.svg +1 -0
  80. package/BookReader/images/icon_toc.svg +1 -0
  81. package/BookReader/images/icon_two_pages.svg +1 -0
  82. package/BookReader/images/icon_zoomer.png +0 -0
  83. package/BookReader/images/loading.gif +0 -0
  84. package/BookReader/images/logo_icon.png +0 -0
  85. package/BookReader/images/marker_chap-off.png +0 -0
  86. package/BookReader/images/marker_chap-off.svg +1 -0
  87. package/BookReader/images/marker_chap-off_ia.png +0 -0
  88. package/BookReader/images/marker_chap-on.png +0 -0
  89. package/BookReader/images/marker_chap-on.svg +1 -0
  90. package/BookReader/images/marker_srch-on.svg +1 -0
  91. package/BookReader/images/marker_srchchap-off.png +0 -0
  92. package/BookReader/images/marker_srchchap-on.png +0 -0
  93. package/BookReader/images/nav_control-dn.png +0 -0
  94. package/BookReader/images/nav_control-dn_ia.png +0 -0
  95. package/BookReader/images/nav_control-up.png +0 -0
  96. package/BookReader/images/nav_control-up_ia.png +0 -0
  97. package/BookReader/images/nav_control.png +0 -0
  98. package/BookReader/images/one_page_mode_icon.png +0 -0
  99. package/BookReader/images/paper-badge.png +0 -0
  100. package/BookReader/images/print_icon.png +0 -0
  101. package/BookReader/images/progressbar.gif +0 -0
  102. package/BookReader/images/right_edges.png +0 -0
  103. package/BookReader/images/slider.png +0 -0
  104. package/BookReader/images/slider_ia.png +0 -0
  105. package/BookReader/images/thumbnail_mode_icon.png +0 -0
  106. package/BookReader/images/transparent.png +0 -0
  107. package/BookReader/images/two_page_mode_icon.png +0 -0
  108. package/BookReader/images/zoom_in_icon.png +0 -0
  109. package/BookReader/images/zoom_out_icon.png +0 -0
  110. package/BookReader/jquery-1.10.1.js +2 -0
  111. package/BookReader/jquery-1.10.1.js.LICENSE.txt +24 -0
  112. package/BookReader/plugins/plugin.archive_analytics.js +2 -0
  113. package/BookReader/plugins/plugin.archive_analytics.js.map +1 -0
  114. package/BookReader/plugins/plugin.autoplay.js +2 -0
  115. package/BookReader/plugins/plugin.autoplay.js.map +1 -0
  116. package/BookReader/plugins/plugin.chapters.js +2 -0
  117. package/BookReader/plugins/plugin.chapters.js.map +1 -0
  118. package/BookReader/plugins/plugin.iframe.js +2 -0
  119. package/BookReader/plugins/plugin.iframe.js.map +1 -0
  120. package/BookReader/plugins/plugin.mobile_nav.js +2 -0
  121. package/BookReader/plugins/plugin.mobile_nav.js.map +1 -0
  122. package/BookReader/plugins/plugin.resume.js +2 -0
  123. package/BookReader/plugins/plugin.resume.js.map +1 -0
  124. package/BookReader/plugins/plugin.search.js +2 -0
  125. package/BookReader/plugins/plugin.search.js.map +1 -0
  126. package/BookReader/plugins/plugin.text_selection.js +2 -0
  127. package/BookReader/plugins/plugin.text_selection.js.map +1 -0
  128. package/BookReader/plugins/plugin.tts.js +3 -0
  129. package/BookReader/plugins/plugin.tts.js.LICENSE.txt +27 -0
  130. package/BookReader/plugins/plugin.tts.js.map +1 -0
  131. package/BookReader/plugins/plugin.url.js +2 -0
  132. package/BookReader/plugins/plugin.url.js.map +1 -0
  133. package/BookReader/plugins/plugin.vendor-fullscreen.js +2 -0
  134. package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -0
  135. package/BookReaderDemo/BookReaderDemo.css +41 -0
  136. package/BookReaderDemo/BookReaderJSAdvanced.js +115 -0
  137. package/BookReaderDemo/BookReaderJSAutoplay.js +56 -0
  138. package/BookReaderDemo/BookReaderJSSimple.js +55 -0
  139. package/BookReaderDemo/IIIFBookReader.js +207 -0
  140. package/BookReaderDemo/assets/v5/Bookreader-logo-cool-grad.svg +1 -0
  141. package/BookReaderDemo/assets/v5/Bookreader-logo-flat.svg +1 -0
  142. package/BookReaderDemo/assets/v5/Bookreader-logo-hex-cool-grad.png +0 -0
  143. package/BookReaderDemo/assets/v5/Bookreader-logo-hex-flat.png +0 -0
  144. package/BookReaderDemo/assets/v5/Bookreader-logo-lines.png +0 -0
  145. package/BookReaderDemo/assets/v5/Bookreader-logo-lines.svg +1 -0
  146. package/BookReaderDemo/assets/v5/Bookreader-logo-warm.svg +1 -0
  147. package/BookReaderDemo/assets/v5/bookreader-logo-renders@1x.png +0 -0
  148. package/BookReaderDemo/assets/v5/bookreader-logo-renders@2x.png +0 -0
  149. package/BookReaderDemo/assets/v5/bookreader-v5-screenshot.png +0 -0
  150. package/BookReaderDemo/bookreader-template-bundle.js +7178 -0
  151. package/BookReaderDemo/demo-advanced.html +32 -0
  152. package/BookReaderDemo/demo-autoplay.html +38 -0
  153. package/BookReaderDemo/demo-embed-iframe-src.html +84 -0
  154. package/BookReaderDemo/demo-embed.html +26 -0
  155. package/BookReaderDemo/demo-fullscreen-mobile.html +36 -0
  156. package/BookReaderDemo/demo-fullscreen.html +33 -0
  157. package/BookReaderDemo/demo-iiif.html +34 -0
  158. package/BookReaderDemo/demo-iiif.js +26 -0
  159. package/BookReaderDemo/demo-internetarchive.html +74 -0
  160. package/BookReaderDemo/demo-multiple.html +43 -0
  161. package/BookReaderDemo/demo-preview-pages.html +1092 -0
  162. package/BookReaderDemo/demo-simple.html +34 -0
  163. package/BookReaderDemo/demo-vendor-fullscreen.html +36 -0
  164. package/BookReaderDemo/immersion-1up.html +64 -0
  165. package/BookReaderDemo/immersion-mode.html +35 -0
  166. package/BookReaderDemo/toggle_controls.html +53 -0
  167. package/BookReaderDemo/view_mode.html +39 -0
  168. package/BookReaderDemo/viewmode-cycle.html +41 -0
  169. package/CHANGELOG.md +540 -0
  170. package/CONTRIBUTING.md +7 -0
  171. package/LICENSE +661 -0
  172. package/README.md +205 -0
  173. package/babel.config.js +18 -0
  174. package/codecov.yml +17 -0
  175. package/index.html +31 -0
  176. package/jsconfig.json +14 -0
  177. package/karma.conf.js +23 -0
  178. package/package.json +129 -0
  179. package/screenshot.png +0 -0
  180. package/scripts/postversion.js +10 -0
  181. package/scripts/preversion.js +14 -0
  182. package/scripts/version.js +26 -0
  183. package/src/BookNavigator/BookModel.js +14 -0
  184. package/src/BookNavigator/BookNavigator.js +468 -0
  185. package/src/BookNavigator/assets/book-loader.js +27 -0
  186. package/src/BookNavigator/assets/bookmark-colors.js +15 -0
  187. package/src/BookNavigator/assets/button-base.js +61 -0
  188. package/src/BookNavigator/assets/icon_checkmark.js +6 -0
  189. package/src/BookNavigator/assets/icon_close.js +3 -0
  190. package/src/BookNavigator/assets/icon_sort_asc.js +5 -0
  191. package/src/BookNavigator/assets/icon_sort_desc.js +5 -0
  192. package/src/BookNavigator/assets/icon_sort_neutral.js +5 -0
  193. package/src/BookNavigator/assets/icon_volumes.js +11 -0
  194. package/src/BookNavigator/bookmarks/bookmark-button.js +64 -0
  195. package/src/BookNavigator/bookmarks/bookmark-edit.js +215 -0
  196. package/src/BookNavigator/bookmarks/bookmarks-list.js +285 -0
  197. package/src/BookNavigator/bookmarks/bookmarks-loginCTA.js +28 -0
  198. package/src/BookNavigator/bookmarks/bookmarks-provider.js +53 -0
  199. package/src/BookNavigator/bookmarks/ia-bookmarks.js +500 -0
  200. package/src/BookNavigator/br-fullscreen-mgr.js +83 -0
  201. package/src/BookNavigator/delete-modal-actions.js +49 -0
  202. package/src/BookNavigator/downloads/downloads-provider.js +76 -0
  203. package/src/BookNavigator/downloads/downloads.js +138 -0
  204. package/src/BookNavigator/search/a-search-result.js +55 -0
  205. package/src/BookNavigator/search/search-provider.js +180 -0
  206. package/src/BookNavigator/search/search-results.js +360 -0
  207. package/src/BookNavigator/visual-adjustments/visual-adjustments-provider.js +93 -0
  208. package/src/BookNavigator/visual-adjustments/visual-adjustments.js +280 -0
  209. package/src/BookNavigator/volumes/volumes-provider.js +83 -0
  210. package/src/BookNavigator/volumes/volumes.js +178 -0
  211. package/src/BookReader/BookModel.js +518 -0
  212. package/src/BookReader/DebugConsole.js +54 -0
  213. package/src/BookReader/ImageCache.js +116 -0
  214. package/src/BookReader/Mode1Up.js +90 -0
  215. package/src/BookReader/Mode1UpLit.js +434 -0
  216. package/src/BookReader/Mode2Up.js +1372 -0
  217. package/src/BookReader/ModeSmoothZoom.js +177 -0
  218. package/src/BookReader/ModeThumb.js +336 -0
  219. package/src/BookReader/Navbar/Navbar.js +339 -0
  220. package/src/BookReader/PageContainer.js +120 -0
  221. package/src/BookReader/ReduceSet.js +26 -0
  222. package/src/BookReader/Toolbar/Toolbar.js +384 -0
  223. package/src/BookReader/events.js +20 -0
  224. package/src/BookReader/options.js +320 -0
  225. package/src/BookReader/utils/HTMLDimensionsCacher.js +44 -0
  226. package/src/BookReader/utils/classes.js +36 -0
  227. package/src/BookReader/utils.js +240 -0
  228. package/src/BookReader.js +2546 -0
  229. package/src/BookReaderComponent/BookReaderComponent.js +112 -0
  230. package/src/ItemNavigator/ItemNavigator.js +376 -0
  231. package/src/ItemNavigator/providers/sharing.js +33 -0
  232. package/src/assets/icons/1up.svg +12 -0
  233. package/src/assets/icons/2up.svg +15 -0
  234. package/src/assets/icons/advance.svg +26 -0
  235. package/src/assets/icons/chevron-right.svg +1 -0
  236. package/src/assets/icons/close-circle-dark.svg +1 -0
  237. package/src/assets/icons/close-circle.svg +1 -0
  238. package/src/assets/icons/fullscreen.svg +17 -0
  239. package/src/assets/icons/fullscreen_exit.svg +17 -0
  240. package/src/assets/icons/hamburger.svg +15 -0
  241. package/src/assets/icons/left-arrow.svg +12 -0
  242. package/src/assets/icons/magnify-minus.svg +16 -0
  243. package/src/assets/icons/magnify-plus.svg +17 -0
  244. package/src/assets/icons/magnify.svg +15 -0
  245. package/src/assets/icons/pause.svg +23 -0
  246. package/src/assets/icons/play.svg +22 -0
  247. package/src/assets/icons/playback-speed.svg +34 -0
  248. package/src/assets/icons/read-aloud.svg +22 -0
  249. package/src/assets/icons/review.svg +22 -0
  250. package/src/assets/icons/thumbnails.svg +17 -0
  251. package/src/assets/icons/volume-full.svg +22 -0
  252. package/src/assets/images/BRicons.png +0 -0
  253. package/src/assets/images/BRicons.svg +94 -0
  254. package/src/assets/images/BRicons_ia.png +0 -0
  255. package/src/assets/images/back_pages.png +0 -0
  256. package/src/assets/images/book_bottom_icon.png +0 -0
  257. package/src/assets/images/book_down_icon.png +0 -0
  258. package/src/assets/images/book_left_icon.png +0 -0
  259. package/src/assets/images/book_leftmost_icon.png +0 -0
  260. package/src/assets/images/book_right_icon.png +0 -0
  261. package/src/assets/images/book_rightmost_icon.png +0 -0
  262. package/src/assets/images/book_top_icon.png +0 -0
  263. package/src/assets/images/book_up_icon.png +0 -0
  264. package/src/assets/images/books_graphic.svg +177 -0
  265. package/src/assets/images/booksplit.png +0 -0
  266. package/src/assets/images/control_pause_icon.png +0 -0
  267. package/src/assets/images/control_play_icon.png +0 -0
  268. package/src/assets/images/embed_icon.png +0 -0
  269. package/src/assets/images/icon-home-ia.png +0 -0
  270. package/src/assets/images/icon_OL-logo-xs.png +0 -0
  271. package/src/assets/images/icon_alert-xs.png +0 -0
  272. package/src/assets/images/icon_book.svg +12 -0
  273. package/src/assets/images/icon_bookmark.svg +12 -0
  274. package/src/assets/images/icon_close-pop.png +0 -0
  275. package/src/assets/images/icon_download.png +0 -0
  276. package/src/assets/images/icon_gear.svg +14 -0
  277. package/src/assets/images/icon_hamburger.svg +20 -0
  278. package/src/assets/images/icon_home.png +0 -0
  279. package/src/assets/images/icon_home.svg +21 -0
  280. package/src/assets/images/icon_home_ia.png +0 -0
  281. package/src/assets/images/icon_indicator.png +0 -0
  282. package/src/assets/images/icon_info.svg +11 -0
  283. package/src/assets/images/icon_one_page.svg +8 -0
  284. package/src/assets/images/icon_pause.svg +1 -0
  285. package/src/assets/images/icon_play.svg +1 -0
  286. package/src/assets/images/icon_playback-rate.svg +15 -0
  287. package/src/assets/images/icon_return.png +0 -0
  288. package/src/assets/images/icon_search_button.svg +8 -0
  289. package/src/assets/images/icon_share.svg +9 -0
  290. package/src/assets/images/icon_skip-ahead.svg +6 -0
  291. package/src/assets/images/icon_skip-back.svg +13 -0
  292. package/src/assets/images/icon_speaker.svg +18 -0
  293. package/src/assets/images/icon_speaker_open.svg +10 -0
  294. package/src/assets/images/icon_thumbnails.svg +12 -0
  295. package/src/assets/images/icon_toc.svg +5 -0
  296. package/src/assets/images/icon_two_pages.svg +9 -0
  297. package/src/assets/images/icon_zoomer.png +0 -0
  298. package/src/assets/images/loading.gif +0 -0
  299. package/src/assets/images/logo_icon.png +0 -0
  300. package/src/assets/images/marker_chap-off.png +0 -0
  301. package/src/assets/images/marker_chap-off.svg +11 -0
  302. package/src/assets/images/marker_chap-off_ia.png +0 -0
  303. package/src/assets/images/marker_chap-on.png +0 -0
  304. package/src/assets/images/marker_chap-on.svg +11 -0
  305. package/src/assets/images/marker_srch-on.svg +11 -0
  306. package/src/assets/images/marker_srchchap-off.png +0 -0
  307. package/src/assets/images/marker_srchchap-on.png +0 -0
  308. package/src/assets/images/nav_control-dn.png +0 -0
  309. package/src/assets/images/nav_control-dn_ia.png +0 -0
  310. package/src/assets/images/nav_control-up.png +0 -0
  311. package/src/assets/images/nav_control-up_ia.png +0 -0
  312. package/src/assets/images/nav_control.png +0 -0
  313. package/src/assets/images/one_page_mode_icon.png +0 -0
  314. package/src/assets/images/paper-badge.png +0 -0
  315. package/src/assets/images/print_icon.png +0 -0
  316. package/src/assets/images/progressbar.gif +0 -0
  317. package/src/assets/images/right_edges.png +0 -0
  318. package/src/assets/images/slider.png +0 -0
  319. package/src/assets/images/slider_ia.png +0 -0
  320. package/src/assets/images/thumbnail_mode_icon.png +0 -0
  321. package/src/assets/images/transparent.png +0 -0
  322. package/src/assets/images/two_page_mode_icon.png +0 -0
  323. package/src/assets/images/zoom_in_icon.png +0 -0
  324. package/src/assets/images/zoom_out_icon.png +0 -0
  325. package/src/css/BookReader.scss +89 -0
  326. package/src/css/_BRBookmarks.scss +29 -0
  327. package/src/css/_BRComponent.scss +13 -0
  328. package/src/css/_BRfloat.scss +197 -0
  329. package/src/css/_BRicon.scss +48 -0
  330. package/src/css/_BRmain.scss +251 -0
  331. package/src/css/_BRnav.scss +382 -0
  332. package/src/css/_BRpages.scss +139 -0
  333. package/src/css/_BRsearch.scss +226 -0
  334. package/src/css/_BRtoolbar.scss +84 -0
  335. package/src/css/_BRvendor.scss +5 -0
  336. package/src/css/_MobileNav.scss +194 -0
  337. package/src/css/_TextSelection.scss +32 -0
  338. package/src/css/_colorbox.scss +52 -0
  339. package/src/css/_controls.scss +244 -0
  340. package/src/css/_icons.scss +121 -0
  341. package/src/dragscrollable-br.js +261 -0
  342. package/src/jquery-wrapper.js +4 -0
  343. package/src/plugins/plugin.archive_analytics.js +86 -0
  344. package/src/plugins/plugin.autoplay.js +129 -0
  345. package/src/plugins/plugin.chapters.js +251 -0
  346. package/src/plugins/plugin.iframe.js +48 -0
  347. package/src/plugins/plugin.mobile_nav.js +287 -0
  348. package/src/plugins/plugin.resume.js +68 -0
  349. package/src/plugins/plugin.text_selection.js +291 -0
  350. package/src/plugins/plugin.url.js +198 -0
  351. package/src/plugins/plugin.vendor-fullscreen.js +247 -0
  352. package/src/plugins/search/plugin.search.js +439 -0
  353. package/src/plugins/search/view.js +440 -0
  354. package/src/plugins/tts/AbstractTTSEngine.js +242 -0
  355. package/src/plugins/tts/FestivalTTSEngine.js +169 -0
  356. package/src/plugins/tts/PageChunk.js +107 -0
  357. package/src/plugins/tts/PageChunkIterator.js +163 -0
  358. package/src/plugins/tts/WebTTSEngine.js +352 -0
  359. package/src/plugins/tts/plugin.tts.js +335 -0
  360. package/src/plugins/tts/tooltip_dict.js +15 -0
  361. package/src/plugins/tts/utils.js +91 -0
  362. package/src/util/browserSniffing.js +30 -0
  363. package/src/util/debouncer.js +26 -0
  364. package/src/util/docCookies.js +67 -0
  365. package/src/util/strings.js +34 -0
  366. package/tests/BookReader/BookModel.test.js +312 -0
  367. package/tests/BookReader/BookReaderPublicFunctions.test.js +164 -0
  368. package/tests/BookReader/DebugConsole.test.js +25 -0
  369. package/tests/BookReader/ImageCache.test.js +150 -0
  370. package/tests/BookReader/Mode1UpLit.test.js +87 -0
  371. package/tests/BookReader/Mode2Up.test.js +245 -0
  372. package/tests/BookReader/ModeSmoothZoom.test.js +149 -0
  373. package/tests/BookReader/Navbar/Navbar.test.js +169 -0
  374. package/tests/BookReader/PageContainer.test.js +187 -0
  375. package/tests/BookReader/ReduceSet.test.js +38 -0
  376. package/tests/BookReader/Toolbar/Toolbar.test.js +26 -0
  377. package/tests/BookReader/utils/HTMLDimensionsCacher.test.js +59 -0
  378. package/tests/BookReader/utils/classes.test.js +88 -0
  379. package/tests/BookReader/utils.test.js +136 -0
  380. package/tests/BookReader.options.test.js +39 -0
  381. package/tests/BookReader.test.js +301 -0
  382. package/tests/e2e/README.md +75 -0
  383. package/tests/e2e/autoplay.test.js +13 -0
  384. package/tests/e2e/base.test.js +35 -0
  385. package/tests/e2e/helpers/base.js +263 -0
  386. package/tests/e2e/helpers/debug.js +13 -0
  387. package/tests/e2e/helpers/desktopSearch.js +72 -0
  388. package/tests/e2e/helpers/mobileSearch.js +85 -0
  389. package/tests/e2e/helpers/mockSearch.js +93 -0
  390. package/tests/e2e/helpers/rightToLeft.js +29 -0
  391. package/tests/e2e/ia-production/ia-prod-base.js +17 -0
  392. package/tests/e2e/models/BookReader.js +11 -0
  393. package/tests/e2e/models/Navigation.js +56 -0
  394. package/tests/e2e/rightToLeft.test.js +20 -0
  395. package/tests/e2e/viewmode.test.js +37 -0
  396. package/tests/karma/BookNavigator/book-navigator.test.js +180 -0
  397. package/tests/karma/BookNavigator/bookmarks/bookmark-edit.test.js +133 -0
  398. package/tests/karma/BookNavigator/bookmarks/bookmarks-list.test.js +222 -0
  399. package/tests/karma/BookNavigator/downloads/downloads-provider.test.js +64 -0
  400. package/tests/karma/BookNavigator/downloads/downloads.test.js +54 -0
  401. package/tests/karma/BookNavigator/search/search-provider.test.js +23 -0
  402. package/tests/karma/BookNavigator/search/search-results.test.js +240 -0
  403. package/tests/karma/BookNavigator/sharing/sharing-provider.test.js +40 -0
  404. package/tests/karma/BookNavigator/visual-adjustments.test.js +201 -0
  405. package/tests/karma/BookNavigator/volumes/volumes-provider.test.js +160 -0
  406. package/tests/karma/BookNavigator/volumes/volumes.test.js +98 -0
  407. package/tests/plugins/plugin.archive_analytics.test.js +23 -0
  408. package/tests/plugins/plugin.autoplay.test.js +52 -0
  409. package/tests/plugins/plugin.chapters.test.js +130 -0
  410. package/tests/plugins/plugin.iframe.test.js +42 -0
  411. package/tests/plugins/plugin.mobile_nav.test.js +66 -0
  412. package/tests/plugins/plugin.resume.test.js +98 -0
  413. package/tests/plugins/plugin.text_selection.test.js +193 -0
  414. package/tests/plugins/plugin.url.test.js +129 -0
  415. package/tests/plugins/plugin.vendor-fullscreen.test.js +65 -0
  416. package/tests/plugins/search/plugin.search.test.js +173 -0
  417. package/tests/plugins/search/plugin.search.view.test.js +106 -0
  418. package/tests/plugins/tts/AbstractTTSEngine.test.js +153 -0
  419. package/tests/plugins/tts/FestivalTTSEngine.test.js +59 -0
  420. package/tests/plugins/tts/PageChunk.test.js +57 -0
  421. package/tests/plugins/tts/PageChunkIterator.test.js +179 -0
  422. package/tests/plugins/tts/WebTTSEngine.test.js +126 -0
  423. package/tests/plugins/tts/utils.test.js +133 -0
  424. package/tests/util/browserSniffing.test.js +56 -0
  425. package/tests/util/docCookies.test.js +15 -0
  426. package/tests/util/strings.test.js +63 -0
  427. package/tests/utils.js +80 -0
  428. package/webpack.config.js +85 -0
@@ -0,0 +1,3 @@
1
+ /*! For license information please see BookReader.js.LICENSE.txt */
2
+ (function(){var __webpack_modules__={7570:function(e,t,n){"use strict";n(5666),n(1539),n(9714),n(5827),n(2222),n(1249),n(6833),n(7327),n(7941),n(4916),n(6992),n(8783),n(3948),n(285),n(4765),n(7042),n(9826),n(6699),n(2023),n(8674),n(3123),n(5306),n(9600),n(2526),n(1817),n(2165),n(1038),n(8309),n(3762),n(6891),n(6177),n(5557),function(e){var t=function(e,t){for(var n=e.split(" "),i=new Array,r=0;r<n.length;r++)i.push(n[r]+t);return i.join(" ")},n=function(e){var t,n;if(void 0!==e.clientX)t=e.clientX,n=e.clientY;else if(void 0!==e.screenX)t=e.screenX,n=e.screenY;else if(void 0!==e.targetTouches)t=e.targetTouches[0].pageX,n=e.targetTouches[0].pageY;else if(void 0===e.originalEvent){var i="";for(var r in e)i+=", "+r+": "+e[r];console.error("don't understand x and y for "+e.type+" event: "+i)}else void 0!==e.originalEvent.clientX?(t=e.originalEvent.clientX,n=e.originalEvent.clientY):void 0!==e.originalEvent.screenX?(t=e.originalEvent.screenX,n=e.originalEvent.screenY):void 0!==e.originalEvent.targetTouches&&(t=e.originalEvent.targetTouches[0].pageX,n=e.originalEvent.targetTouches[0].pageY);return{left:t,top:n}};e.fn.dragscrollable=function(i){var r=e(this),o=e.extend({dragSelector:">:first",acceptPropagatedEvent:!0,preventDefault:!0,dragstart:"mousedown touchstart",dragcontinue:"mousemove touchmove",dragend:"mouseup touchend",dragMinDistance:5,namespace:".ds",scrollWindow:!1},i||{});o.dragstart=t(o.dragstart,o.namespace),o.dragcontinue=t(o.dragcontinue,o.namespace);var a,s=function(){return!!("ontouchstart"in window)||!!("msmaxtouchpoints"in window.navigator)},u={dragStartHandler:function(t){return!!s()||!(t.which>1||!t.data.acceptPropagatedEvent&&t.target!=this)&&(t.data.firstCoord=n(t),t.data.lastCoord=t.data.firstCoord,r.bind(o.dragcontinue,t.data,u.dragContinueHandler),a=function(e){e.data=t.data,u.dragEndHandler(e)},e.each(o.dragend.split(" "),(function(e,t){r.get(0).addEventListener(t,a,!0)})),t.data.preventDefault?(t.preventDefault(),!1):void 0)},dragContinueHandler:function(t){if(s())return!0;var i=n(t),r=i.left-t.data.lastCoord.left,o=i.top-t.data.lastCoord.top,a=t.data.scrollable;return t.data.scrollWindow&&(a=e(window)),a.scrollLeft(a.scrollLeft()-r),a.scrollTop(a.scrollTop()-o),t.data.lastCoord=i,t.data.preventDefault?(t.preventDefault(),!1):void 0},dragEndHandler:function(t){if(s())return!0;r.unbind(o.dragcontinue).unbind(o.dragend),e.each(o.dragend.split(" "),(function(e,t){r.get(0).removeEventListener(t,a,!0)}));var n={left:Math.abs(t.data.lastCoord.left-t.data.firstCoord.left),top:Math.abs(t.data.lastCoord.top-t.data.firstCoord.top)},i=Math.max(n.left,n.top);return t.data.preventDefault&&i>o.dragMinDistance?(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),!1):void 0}};return this.each((function(){var t={scrollable:e(this),acceptPropagatedEvent:o.acceptPropagatedEvent,preventDefault:o.preventDefault,scrollWindow:o.scrollWindow};e(this).find(o.dragSelector).bind(o.dragstart,t,u.dragStartHandler)}))},e.fn.removedragscrollable=function(t){return void 0===t&&(t=".ds"),this.each((function(){e(document).find("*").andSelf().unbind(t)}))}}(n(3609));var i=n(5685);function r(e,t,n,i,r,o){var a,s=(a=e.prototype[t],function(){return a.apply(o(this),arguments)});Object.defineProperty(i.prototype,r,{get:function(){return s},set:function(i){e.prototype[t]=function(){var t=this instanceof e?n(this):this;return i.apply(t,arguments)},s=i}})}n(4747),n(6227);var o={fragmentChange:"fragmentChange",PostInit:"PostInit",stop:"stop",resize:"resize",navToggled:"navToggled",fullscreenToggled:"fullscreenToggled",zoomOut:"zoomOut",zoomIn:"zoomIn","1PageViewSelected":"1PageViewSelected","2PageViewSelected":"2PageViewSelected","3PageViewSelected":"3PageViewSelected",mobileNavOpen:"mobileNavOpen"},a=n(3609);function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=t,this.$root=null,this.$nav=null,this.maxPageNum=null,this.minimumControls=["viewmode"],this.maximumControls=["book_left","book_right","zoom_in","zoom_out","onepg","twopg","thumb"]}var t,n;return t=e,(n=[{key:"controlFor",value:function(e){var t=this.br.options.controls[e];return t.visible?t.template?"<li>".concat(t.template(this.br),"</li>"):'<li>\n <button class="BRicon '.concat(t.className,'" title="').concat(t.label,'">\n <div class="icon icon-').concat(t.iconClassName,'"></div>\n <span class="tooltip">').concat(t.label,"</span>\n </button>\n </li>"):""}},{key:"_renderControls",value:function(){var e=this;return["bookLeft","bookRight","onePage","twoPage","thumbnail","viewmode","zoomOut","zoomIn","fullScreen"].map((function(t){return e.controlFor(t)})).join("")}},{key:"_bindViewModeButton",value:function(){var e=this,t=this.br,n=t.options.controls.viewmode,i=[{mode:t.constMode1up,className:"onepg",title:"One-page view"},{mode:t.constMode2up,className:"twopg",title:"Two-page view"},{mode:t.constModeThumb,className:"thumb",title:"Thumbnail view"}].filter((function(e){return!n.excludedModes.includes(e.mode)})),r=i.map((function(e){return e.mode}));n.excludedModes.includes(t.mode)&&t.switchMode(r[0]);for(var s=r.indexOf(t.mode),u=0;u<=s;u++)r.push(r.shift());i.length<2&&this.$nav.find(".".concat(n.className)).remove(),this.br.bind(o.PostInit,(function(){var o=e.$nav.find(".".concat(n.className)).off(".bindNavigationHandlers").on("click",(function(n){var o=r.shift(),s=i.find((function(e){return e.mode===o})),u=i.find((function(e){return e.mode===r[0]}));r.push(o),t.viewModeOrder=r,e.updateViewModeButton(a(n.currentTarget),u.className,u.title),t.switchMode(s.mode)})),s=i.find((function(e){return e.mode===r[0]}));e.updateViewModeButton(o,s.className,s.title)}))}},{key:"updateViewModeButton",value:function(e,t,n){e.attr("title",n).find(".icon").removeClass().addClass("icon icon-".concat(t)).end().find(".tooltip").text(n)}},{key:"switchNavbarControls",value:function(){"linerNotes"!==this.br.options.bookType&&(this.br.refs.$brContainer.prop("clientWidth")<640?this.showMinimumNavbarControls():this.showMaximumNavbarControls())}},{key:"showMinimumNavbarControls",value:function(){this.minimumControls.forEach((function(e){var t=document.querySelector(".controls .".concat(e));t&&t.classList.remove("hide")})),this.maximumControls.forEach((function(e){var t=document.querySelector(".controls .".concat(e));t&&t.classList.add("hide")}))}},{key:"showMaximumNavbarControls",value:function(){this.maximumControls.forEach((function(e){var t=document.querySelector(".controls .".concat(e));t&&t.classList.remove("hide")})),this.minimumControls.forEach((function(e){var t=document.querySelector(".controls .".concat(e));t&&t.classList.add("hide")}))}},{key:"init",value:function(){var e=this,t=this.br,n=t.options.navbarTitle,i="rl"===t.pageProgression,r=i?"book_flip_next":"book_flip_prev",o=i?"book_flip_prev":"book_flip_next";this.br.options.controls.bookLeft.className="book_left ".concat(r),this.br.options.controls.bookRight.className="book_right ".concat(o),t.refs.$BRfooter=this.$root=a('<div class="BRfooter"></div>'),t.refs.$BRnav=this.$nav=a('<div class="BRnav BRnavDesktop">\n '.concat(n?'<div class="BRnavTitle">'.concat(n,"</div>"):"",'\n <nav class="BRcontrols">\n <ul class="controls">\n <li class="scrubber">\n <div class="BRnavpos">\n <div class="BRpager"></div>\n <div class="BRnavline"></div>\n </div>\n <p><span class=\'BRcurrentpage\'></span></p>\n </li>\n ').concat(this._renderControls(),"\n </ul>\n </nav>\n </div>")),this.$root.append(this.$nav),t.refs.$br.append(this.$root);var s=this.$root.find(".BRpager").slider({animate:!0,min:0,max:t.getNumLeafs()-1,value:t.currentIndex(),range:"min"});return s.on("slide",(function(t,n){return e.updateNavPageNum(n.value),!0})),s.on("slidechange",(function(n,i){return e.updateNavPageNum(i.value),s.data("swallowchange")?s.data("swallowchange",!1):t.jumpToIndex(i.value),!0})),t.options.controls.viewmode.visible&&this._bindViewModeButton(),this.updateNavPageNum(t.currentIndex()),this.$nav}},{key:"initEmbed",value:function(){var e=this.br,t=(window.location+"").replace("?ui=embed","").replace("/stream/","/details/").replace("#","/"),n=e.showLogo?'<a class="logo" href="'.concat(e.logoURL,'" target="_blank"></a>'):"";e.refs.$BRfooter=this.$root=a('<div class="BRfooter"></div>'),e.refs.$BRnav=this.$nav=a('<div class="BRnav BRnavEmbed">\n '.concat(n,'\n <span class="BRembedreturn">\n <a href="').concat(t,'" target="_blank">').concat(e.bookTitle,'</a>\n </span>\n <span class="BRtoolbarbuttons">\n <button class="BRicon book_left"></button>\n <button class="BRicon book_right"></button>\n <button class="BRicon full"></button>\n </span>\n </div>')),this.$root.append(this.$nav),e.refs.$br.append(this.$root)}},{key:"getNavPageNumString",value:function(e){var t=this.br,n=t.getPageNum(e),i=(t.getPageProp(e,"pageType"),t.getNumLeafs());if(!this.maxPageNum){for(var r,o=0,a=0;a<i;a++)r=t.getPageNum(a),!isNaN(r)&&r>o&&(o=r);this.maxPageNum=o}return c(e,i,n,0,this.maxPageNum)}},{key:"updateNavPageNum",value:function(e){this.$root.find(".BRcurrentpage").html(this.getNavPageNumString(e))}},{key:"updateNavIndex",value:function(e){e=void 0!==e?e:this.br.currentIndex(),this.$root.find(".BRpager").data("swallowchange",!0).slider("value",e)}}])&&s(t.prototype,n),e}();function c(e,t,n,i,r){if("n"==n[0])return"(".concat(e+1," of ").concat(t,")");var o=r?" of ".concat(r):"";return"".concat(n).concat(o)}var l={defaults:null,padding:10,ui:"full",uiAutoHide:!1,thumbRowBuffer:1,thumbColumns:6,thumbMaxLoading:4,thumbPadding:10,flipSpeed:"fast",showToolbar:!0,showNavbar:!0,navBarTitle:"",showLogo:!0,logoURL:"https://archive.org",imagesBaseURL:"/BookReader/images/",reduceSet:"pow2",reductionFactors:[{reduce:.25,autofit:null},{reduce:.5,autofit:null},{reduce:1,autofit:null},{reduce:2,autofit:null},{reduce:3,autofit:null},{reduce:4,autofit:null},{reduce:6,autofit:null}],onePage:{autofit:"auto"},twoPage:{coverInternalPadding:0,coverExternalPadding:0,bookSpineDivWidth:64,autofit:"auto"},onePageMinBreakpoint:800,bookTitle:"",bookUrl:null,bookUrlText:null,bookUrlTitle:null,enableBookTitleLink:!0,bookLanguage:null,metadata:[],thumbnail:null,bookUrlMoreInfo:null,enableExperimentalControls:!1,el:"#BookReader",pageProgression:"lr",ppi:500,protected:!1,plugins:{textSelection:null},vars:{},data:[],getNumLeafs:null,getPageWidth:null,getPageHeight:null,getPageURI:null,getPageSide:null,getSpreadIndices:null,getPageNum:null,getPageProp:null,leafNumToIndex:null,getEmbedCode:null,controls:{bookLeft:{visible:!0,label:"Flip left",className:"book_left",iconClassName:"left-arrow"},bookRight:{visible:!0,label:"Flip right",className:"book_right",iconClassName:"left-arrow hflip"},onePage:{visible:!0,label:"One-page view",className:"onepg",iconClassName:"onepg"},twoPage:{visible:!0,label:"Two-page view",className:"twopg",iconClassName:"twopg"},thumbnail:{visible:!0,label:"Thumbnail view",className:"thumb",iconClassName:"thumb"},viewmode:{visible:!0,className:"viewmode",excludedModes:[]},zoomOut:{visible:!0,label:"Zoom out",className:"zoom_out",iconClassName:"magnify"},zoomIn:{visible:!0,label:"Zoom in",className:"zoom_in",iconClassName:"magnify plus"},fullScreen:{visible:!0,label:"Toggle fullscreen",className:"full",iconClassName:"fullscreen"}},startFullscreen:!1,autoResize:!0,useSrcSet:!1},h=n(105),d=(n(6977),n(4581),n(3609));function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function f(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var g=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=t}var t,n;return t=e,(n=[{key:"buildToolbarElement",value:function(){var e=this.br,t=e.showLogo?'\n <span class="BRtoolbarSection BRtoolbarSectionLogo">\n <a class="logo" href="'.concat(e.logoURL,'"></a>\n </span>'):"";e.refs.$BRtoolbar=d('\n <div class="BRtoolbar header">\n <div class="BRtoolbarbuttons">\n <div class="BRtoolbarLeft">\n '.concat(t,'\n <span class="BRtoolbarSection BRtoolbarSectionTitle"></span>\n </div>\n <div class="BRtoolbarRight">\n <span class="BRtoolbarSection BRtoolbarSectionInfo">\n <button class="BRpill info js-tooltip">Info</button>\n <button class="BRpill share js-tooltip">Share</button>\n </span>\n </div>\n </div>\n </div>'));var n=e.refs.$BRtoolbar.find(".BRtoolbarSectionTitle");return e.bookUrl&&e.options.enableBookTitleLink?n.append(d("<a>").attr({href:e.bookUrl,title:e.bookUrlTitle}).addClass("BRreturn").html(e.bookUrlText||e.bookTitle)):e.bookTitle&&n.append(e.bookUrlText||e.bookTitle),e.refs.$BRtoolbar}},{key:"initToolbar",value:function(e,t){var n=this.br;n.refs.$br.append(this.buildToolbarElement()),n.$(".BRnavCntl").addClass("BRup"),n.$(".pause").hide(),this.updateToolbarZoom(n.reduce),n.refs.$BRtoolbar.append(),n.canSwitchToMode(n.constMode2up)||n.$(".two_page_mode, .play, .pause").hide(),n.canSwitchToMode(n.constModeThumb)||n.$(".thumbnail_mode").hide(),n.canSwitchToMode(n.constMode2up)||n.canSwitchToMode(n.constModeThumb)||n.$(".one_page_mode").hide(),d('<div style="display: none;"></div>').append(m()).append(v()).appendTo(n.refs.$br),n.$(".BRinfo .BRfloatTitle a").attr({href:n.bookUrl}).text(n.bookTitle).addClass("title"),this.buildInfoDiv(n.$(".BRinfo")),this.buildShareDiv(n.$(".BRshare")),n.$(".share").colorbox({inline:!0,opacity:"0.5",href:n.$(".BRshare"),onLoad:function(){n.trigger(o.stop),n.$(".BRpageviewValue").val(window.location.href)}}),n.$(".info").colorbox({inline:!0,opacity:"0.5",href:n.$(".BRinfo"),onLoad:function(){n.trigger(o.stop)}})}},{key:"updateToolbarZoom",value:function(e){var t,n=this.br,i=n.mode==n.constMode2up?n.twoPage.autofit:n.onePage.autofit;t=i?i.slice(0,1).toUpperCase()+i.slice(1):(100/e).toFixed(2).replace(/0+$/,"").replace(/\.$/,"")+"%",n.$(".BRzoom").text(t)}},{key:"buildShareDiv",value:function(e){var t=this,n=this.br,i=document.location+"",r=(i+"").replace(/#.*/,""),o=n.getEmbedCode?'\n <div class="share-embed">\n <p class="share-embed-prompt">Copy and paste one of these options to share this book elsewhere.</p>\n <form method="post" action="">\n <fieldset class="fieldset-share-pageview">\n <label for="pageview">Link to this page view</label>\n <input type="text" name="pageview" class="BRpageviewValue" value="'.concat(i,'"/>\n </fieldset>\n <fieldset class="fieldset-share-book-link">\n <label for="booklink">Link to the book</label>\n <input type="text" name="booklink" class="booklink" value="').concat(r,'"/>\n </fieldset>\n <fieldset class="fieldset-embed">\n <label for="iframe">Embed a mini Book Reader</label>\n <fieldset class="sub">\n <label class="sub">\n <input type="radio" name="pages" value="').concat(n.constMode1up,'" checked="checked"/>\n 1 page\n </label>\n <label class="sub">\n <input type="radio" name="pages" value="').concat(n.constMode2up,'"/>\n 2 pages\n </label>\n <label class="sub">\n <input type="checkbox" name="thispage" value="thispage"/>\n Open to this page?\n </label>\n </fieldset>\n <textarea cols="30" rows="4" name="iframe" class="BRframeEmbed"></textarea>\n </fieldset>\n </form>\n </div>'):"",a=d('\n <div class="share-title">Share this book</div>\n <div class="share-social">\n <label class="sub open-to-this-page">\n <input class="thispage-social" type="checkbox" />\n Open to this page?\n </label>\n <div><button class="BRaction share facebook-share-button"><i class="BRicon fb" /> Facebook</button></div>\n <div><button class="BRaction share twitter-share-button"><i class="BRicon twitter" /> Twitter</button></div>\n <div><button class="BRaction share email-share-button"><i class="BRicon email" /> Email</button></div>\n </div>\n '.concat(o,'\n <div class="BRfloatFoot">\n <button class="share-finished" type="button" onclick="$.fn.colorbox.close();">Finished</button>\n </div>'));a.appendTo(e),a.find(".fieldset-embed input").on("change",(function(e){var t=d(e.target).parents("form:first"),i={};i.mode=d(t.find(".fieldset-embed input[name=pages]:checked")).val(),t.find(".fieldset-embed input[name=thispage]").prop("checked")&&(i.page=n.getPageNum(n.currentIndex())),n.getEmbedCode&&t.find(".BRframeEmbed").val(n.getEmbedCode("480px","430px",i))})),a.find("input, textarea").on("focus",(function(e){return e.target.select()})),a.find(".facebook-share-button").click((function(){b("https://www.facebook.com/sharer.php?"+d.param({u:t._getSocialShareUrl()}),600,400,"Share")})),a.find(".twitter-share-button").click((function(){b("https://twitter.com/intent/tweet?"+d.param({url:t._getSocialShareUrl(),text:n.bookTitle}),600,400,"Share")})),a.find(".email-share-button").click((function(){var e="".concat(n.bookTitle,"\n\n").concat(t._getSocialShareUrl());window.location.href="mailto:?subject=".concat(encodeURI(n.bookTitle),"&body=").concat(encodeURI(e))})),a.find("input[name=thispage]").trigger("change"),a.appendTo(e)}},{key:"_getSocialShareUrl",value:function(){return this.br.$(".thispage-social").prop("checked")?window.location.href:"".concat(document.location.protocol,"//").concat(window.location.hostname).concat(window.location.pathname)}},{key:"buildInfoDiv",value:function(e){var t=this.br;e.find(".BRfloatBody, .BRfloatCover, .BRfloatFoot").remove();var n=d('<div class="BRinfoLeftCol"></div>');t.thumbnail&&n.append(d('\n <div class="BRimageW">\n <img src="'.concat(t.thumbnail,'" alt="').concat((0,i.escapeHTML)(t.bookTitle),'" />\n </div>')));var r,o=d('<div class="BRinfoRightCol">'),a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t.metadata);try{for(a.s();!(r=a.n()).done;){var s=r.value,u=s.extraValueClass,c=void 0===u?"":u,l=s.label,h=s.value,f="Title"===l?(0,i.escapeHTML)(h):h;o.append(d('\n <div class="BRinfoValueWrapper">\n <div class="BRinfoLabel">'.concat(l,'</div>\n <div class="BRinfoValue ').concat(c,'">').concat(f,"</div>\n </div>")))}}catch(e){a.e(e)}finally{a.f()}var g=t.bookUrlMoreInfo?t.bookUrlMoreInfo:t.bookTitle;g&&t.bookUrl&&o.append(d('\n <div class="BRinfoValueWrapper">\n <div class="BRinfoMoreInfoWrapper">\n <a class="BRinfoMoreInfo" href="'.concat(t.bookUrl,'">\n ').concat((0,i.escapeHTML)(g),"\n </a>\n </div>\n </div>")));var v=d('<div class="BRfloatFoot BRinfoFooter"></div>'),m=d('<div class="BRinfoW mv20-lg">').append([n,o,d('<br style="clear:both"/>')]);e.append(m,v).addClass("wide")}},{key:"getToolBarHeight",value:function(){var e=this.br.refs.$BRtoolbar;return e&&"block"===e.css("display")?e.outerHeight()+parseInt(e.css("top")):0}}])&&f(t.prototype,n),e}();function v(){return d('\n <div class="BRfloat BRinfo">\n <div class="BRfloatHead">About this book\n <button class="floatShut" href="javascript:;" onclick="$.fn.colorbox.close();"><span class="shift">Close</span></button>\n </div>\n <div class="BRfloatBody">\n <div class="BRfloatCover"></div>\n <div class="BRfloatMeta">\n <div class="BRfloatTitle">\n <h2><a /></h2>\n </div>\n </div>\n </div>\n <div class="BRfloatFoot">\n <a href="https://openlibrary.org/dev/docs/bookreader">About the BookReader</a>\n </div>\n </div>')}function m(){return d('\n <div class="BRfloat BRshare">\n <div class="BRfloatHead">\n Share\n <button class="floatShut" href="javascript:;" onclick="$.fn.colorbox.close();"><span class="shift">Close</span></button>\n </div>\n </div>')}function b(e,t,n,i){var r=null!=window.screenLeft?window.screenLeft:screen.left,o=null!=window.screenTop?window.screenTop:screen.top,a=(window.innerWidth||document.documentElement.clientWidth||screen.width)/2-t/2+r,s=(window.innerHeight||document.documentElement.clientHeight||screen.height)/2-n/2+o,u="status=1,width=".concat(t,",height=").concat(n,",top=").concat(s,",left=").concat(a);window.open(e,i,u)}function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function P(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),e}n(2707),n(4553),n(6535),n(9244);var k=function(){function e(t){var n,i;_(this,e),this.br=t,this.reduceSet=t.reduceSet,this.ppi=null!==(n=null===(i=t.options)||void 0===i?void 0:i.ppi)&&void 0!==n?n:l.ppi,this._medianPageSize=null,this._medianPageSizePixels=null,this._getDataFlattenedCached=null}return P(e,[{key:"getMedianPageSize",value:function(){if(this._medianPageSizePixels)return this._medianPageSizePixels;for(var e=[],t=[],n=0;n<this.getNumLeafs();n++)e.push(this.getPageWidth(n)),t.push(this.getPageHeight(n));return e.sort(),t.sort(),this._medianPageSizePixels={width:e[Math.floor(e.length/2)],height:t[Math.floor(t.length/2)]},this._medianPageSizePixels}},{key:"getMedianPageSizeInches",value:function(){if(this._medianPageSize)return this._medianPageSize;var e,t=[],n=[],i=y(this.pagesIterator());try{for(i.s();!(e=i.n()).done;){var r=e.value;t.push(r.widthInches),n.push(r.heightInches)}}catch(e){i.e(e)}finally{i.f()}return t.sort(),n.sort(),this._medianPageSize={width:t[Math.floor(t.length/2)],height:n[Math.floor(n.length/2)]},this._medianPageSize}},{key:"_getPageWidth",value:function(e){return e=(0,i.clamp)(e,0,this.getNumLeafs()-1),this.getPageWidth(e)}},{key:"_getPageHeight",value:function(e){var t=(0,i.clamp)(e,0,this.getNumLeafs()-1);return this.getPageHeight(t)}},{key:"getPageIndex",value:function(e){var t=this.getPageIndices(e);return t.length?t[t.length-1]:void 0}},{key:"getPageIndices",value:function(e){var t=[];if("n"==e.slice(0,1))try{var n=e.slice(1,e.length),i=parseInt(n);return t.push(i),t}catch(e){}for(var r=0;r<this.getNumLeafs();r++)this.getPageNum(r)==e&&t.push(r);return t}},{key:"getPageName",value:function(e){return"Page "+this.getPageNum(e)}},{key:"getNumLeafs",value:function(){return void 0!==this.br.numLeafs?this.br.numLeafs:this._getDataFlattened().length}},{key:"getPageWidth",value:function(e){return this.getPageProp(e,"width")}},{key:"getPageHeight",value:function(e){return this.getPageProp(e,"height")}},{key:"getPageURI",value:function(e,t,n){return this.getPageProp(e,"viewable",!0)?this.getPageProp(e,"uri"):"/bookreader/static/preview-default.png"}},{key:"getPageSide",value:function(e){return this.getPageProp(e,"pageSide")||(e%2==0?"R":"L")}},{key:"getPageNum",value:function(e){var t=this.getPageProp(e,"pageNum");return void 0===t?"n".concat(e):t}},{key:"getPageProp",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return this._getDataProp(e,t,n)}},{key:"getSpreadIndices",value:function(e){return"rl"==this.br.pageProgression?"R"==this.getPageSide(e)?[e+1,e]:[e,e-1]:"L"==this.getPageSide(e)?[e,e+1]:[e-1,e]}},{key:"leafNumToIndex",value:function(e){var t=this._getDataFlattened().findIndex((function(t){return t.leafNum==e}));return t>-1?t:e}},{key:"parsePageString",value:function(e){var t,n=/^leaf(\d+)/.exec(e);return n?null===(t=this.leafNumToIndex(parseInt(n[1],10)))&&(t=void 0):t=this.getPageIndex(e),t}},{key:"getPage",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getNumLeafs();if(t||!(e<0||e>=n))return e<0&&e>=-n&&(e+=n),new C(this,e%=n)}},{key:"pagesIterator",value:regeneratorRuntime.mark((function e(){var t,n,i,r,o,a,s,u,c,l=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=l.length>0&&void 0!==l[0]?l[0]:{},n=t.start,i=void 0===n?0:n,r=t.end,o=void 0===r?1/0:r,a=t.combineConsecutiveUnviewables,s=void 0!==a&&a,i=Math.max(0,i),o=Math.min(o,this.getNumLeafs()),u=i;case 4:if(!(u<o)){e.next=13;break}if(c=this.getPage(u),!s||!c.isConsecutiveUnviewable){e.next=8;break}return e.abrupt("continue",10);case 8:return e.next=10,c;case 10:u++,e.next=4;break;case 13:case"end":return e.stop()}}),e,this)}))},{key:"_getDataFlattened",value:function(){if(this._getDataFlattenedCached&&this._getDataFlattenedCached[1]===this.br.data.length)return this._getDataFlattenedCached[0];var e=null,t=null,n=0,i=this.br.data.flatMap((function(i){return i.map((function(r){return r.pageSide||(r.pageSide=null===e?2===i.length?"L":"R":"L"===e?"R":"L"),e=r.pageSide,!1===r.viewable?r.unviewablesStart=null===t?t=n:t:t=null,n++,r}))}));return this._getDataFlattenedCached=[i,this.br.data.length],i}},{key:"_getDataProp",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this._getDataFlattened(),r=isNaN(e)||e<0||e>=i.length;return r||void 0===i[e][t]?n:i[e][t]}}]),e}(),C=function(){function e(t,n){_(this,e),this.ppi=t._getDataProp(n,"ppi",t.ppi),this.book=t,this.index=n,this.width=t.getPageWidth(n),this.widthInches=this.width/this.ppi,this.height=t.getPageHeight(n),this.heightInches=this.height/this.ppi,this.pageSide=t.getPageSide(n),this.leafNum=t._getDataProp(n,"leafNum",this.index),this.isViewable=t._getDataProp(n,"viewable",!0),this.unviewablesStart=t._getDataProp(n,"unviewablesStart")||null,this.isConsecutiveUnviewable=!this.isViewable&&this.unviewablesStart!=this.index,this._rawData=this.book._getDataFlattened()[this.index]}return P(e,[{key:"makeViewable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.isViewable!=e)if(e){this._rawData.viewable=!0,delete this._rawData.unviewablesStart;var t,n=y(this.book.pagesIterator({start:this.index+1}));try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.isViewable)break;i._rawData.unviewablesStart=this.index+1}}catch(e){n.e(e)}finally{n.f()}}else{this._rawData.viewable=!1,this._rawData.unviewablesStart=this.prev&&!this.prev.isViewable?this.prev.unviewablesStart:this.index;var r,o=y(this.book.pagesIterator({start:this.index+1}));try{for(o.s();!(r=o.n()).done;){var a=r.value;if(!a.isViewable)break;a._rawData.unviewablesStart=this._rawData.unviewablesStart}}catch(e){o.e(e)}finally{o.f()}}}},{key:"prev",get:function(){return this.findPrev()}},{key:"next",get:function(){return this.findNext()}},{key:"getURI",value:function(e,t){return this.book.getPageURI(this.index,e,t)}},{key:"getURISrcSet",value:function(e){for(var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=this.book.reduceSet,r=i.floor(e),o=i.decr(r),a=[],s=o;s>=1;s=i.decr(s))a.push(s);return a.map((function(e){return"".concat(t.getURI(e,n)," ").concat(r/e,"x")})).join(", ")}},{key:"findNext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.combineConsecutiveUnviewables,n=void 0!==t&&t;return this.book.pagesIterator({start:this.index+1,combineConsecutiveUnviewables:n}).next().value}},{key:"findPrev",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.combineConsecutiveUnviewables,i=void 0!==n&&n;if(0!=this.index){if(i){if(this.isConsecutiveUnviewable)return this.book.getPage(this.unviewablesStart);var r=new e(this.book,this.index-1);return r.isViewable?r:r.findPrev({combineConsecutiveUnviewables:i})}return new e(this.book,this.index-1)}}}]),e}(),S=(n(4819),n(5003),n(6649),n(6078),n(561),n(3680),n(3706),n(2703),n(9601),n(2419),n(3371),n(9653),n(489),n(2148)),T=n(4971);const E=new WeakMap,I=(0,T.XM)((e=>t=>{if(!(t instanceof T._l)||t instanceof T.sL||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");const{committer:n}=t,{style:i}=n.element;let r=E.get(t);void 0===r&&(i.cssText=n.strings.join(" "),E.set(t,r=new Set)),r.forEach((t=>{t in e||(r.delete(t),-1===t.indexOf("-")?i[t]=null:i.removeProperty(t))}));for(const t in e)r.add(t),-1===t.indexOf("-")?i[t]=e[t]:i.setProperty(t,e[t])}));n(2420);var R=n(840),M=n.n(R);function L(e,t,n,i,r,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function O(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){L(o,i,r,a,s,"next",e)}function s(e){L(o,i,r,a,s,"throw",e)}a(void 0)}))}}function N(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var D=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),A(this,"_preventEvent",(function(e){return e.preventDefault(),!1})),A(this,"_pinchStart",(function(){var e,t;n.oldScale=1,n.mode.$visibleWorld.style.willChange="transform",n.detachCtrlZoom(),null===(e=(t=n.mode).detachScrollListeners)||void 0===e||e.call(t)})),A(this,"_pinchMove",function(){var e=O(regeneratorRuntime.mark((function e(t){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.lastEvent=t,n.pinchMoveFrame||(i=null,n.pinchMoveFramePromise=new Promise((function(e){return i=e})),n.pinchMoveFrame=n.bufferFn((function(){n.updateScaleCenter({clientX:n.lastEvent.center.x,clientY:n.lastEvent.center.y}),n.mode.scale*=n.lastEvent.scale/n.oldScale,n.oldScale=n.lastEvent.scale,n.pinchMoveFrame=null,i()})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),A(this,"_pinchEnd",O(regeneratorRuntime.mark((function e(){var t,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.pinchMoveFramePromise;case 2:n.mode.scaleCenter={x:.5,y:.5},n.oldScale=1,n.mode.$visibleWorld.style.willChange="auto",n.attachCtrlZoom(),null===(t=(i=n.mode).attachScrollListeners)||void 0===t||t.call(i);case 7:case"end":return e.stop()}}),e)})))),A(this,"_pinchCancel",O(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n._pinchEnd();case 2:case"end":return e.stop()}}),e)})))),A(this,"_handleCtrlWheel",(function(e){if(e.ctrlKey){e.preventDefault();var t=/Mac/i.test(navigator.platform)?.045:.03;n.updateScaleCenter(e),n.mode.scale*=1-Math.sign(e.deltaY)*t}})),this.mode=t,this.pinchMoveFrame=null,this.pinchMoveFramePromise=Promise.resolve(),this.oldScale=1,this.lastEvent=null,this.attached=!1,this.bufferFn=window.requestAnimationFrame.bind(window),delete M().defaults.cssProps.userSelect,this.hammer=new(M().Manager)(this.mode.$container,{touchAction:"pan-x pan-y"}),this.hammer.add(new(M().Pinch))}var t,n;return t=e,(n=[{key:"attach",value:function(){this.attached||(this.attachCtrlZoom(),this.mode.$container.addEventListener("gesturestart",this._preventEvent),this.mode.$container.addEventListener("gesturechange",this._preventEvent),this.mode.$container.addEventListener("gestureend",this._preventEvent),this.hammer.on("pinchstart",this._pinchStart),this.hammer.on("pinchmove",this._pinchMove),this.hammer.on("pinchend",this._pinchEnd),this.hammer.on("pinchcancel",this._pinchCancel),this.attached=!0)}},{key:"detach",value:function(){this.detachCtrlZoom(),this.mode.$container.removeEventListener("gesturestart",this._preventEvent),this.mode.$container.removeEventListener("gesturechange",this._preventEvent),this.mode.$container.removeEventListener("gestureend",this._preventEvent),this.hammer.off("pinchstart",this._pinchStart),this.hammer.off("pinchmove",this._pinchMove),this.hammer.off("pinchend",this._pinchEnd),this.hammer.off("pinchcancel",this._pinchCancel),this.attached=!1}},{key:"attachCtrlZoom",value:function(){window.addEventListener("wheel",this._handleCtrlWheel,{passive:!1})}},{key:"detachCtrlZoom",value:function(){window.removeEventListener("wheel",this._handleCtrlWheel)}},{key:"updateScaleCenter",value:function(e){var t=e.clientX,n=e.clientY,i=this.mode.htmlDimensionsCacher.boundingClientRect;this.mode.scaleCenter={x:(t-i.left)/this.mode.htmlDimensionsCacher.clientWidth,y:(n-i.top)/this.mode.htmlDimensionsCacher.clientHeight}}}])&&N(t.prototype,n),e}();function B(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var F,j=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),U(this,"clientWidth",100),U(this,"clientHeight",100),U(this,"boundingClientRect",{top:0,left:0}),U(this,"updateClientSizes",(function(){var e=n.element.getBoundingClientRect();n.clientWidth=n.element.clientWidth,n.clientHeight=n.element.clientHeight,n.boundingClientRect.top=e.top,n.boundingClientRect.left=e.left})),U(this,"debouncedUpdateClientSizes",(0,i.debounce)(this.updateClientSizes,150,!1)),this.element=t}var t,n;return t=e,(n=[{key:"attachResizeListener",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.addEventListener("resize",this.debouncedUpdateClientSizes)}},{key:"detachResizeListener",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.removeEventListener("resize",this.debouncedUpdateClientSizes)}}])&&B(t.prototype,n),e}();function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function W(e){return function(e){if(Array.isArray(e))return ee(e)}(e)||te(e)||Q(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function V(e,t){if(t&&("object"===$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return H(e)}function H(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(){q=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(n){t.forEach((function(t){t.kind===n&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var n=e.prototype;["method","field"].forEach((function(i){t.forEach((function(t){var r=t.placement;if(t.kind===i&&("static"===r||"prototype"===r)){var o="static"===r?e:n;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var n=t.descriptor;if("field"===t.kind){var i=t.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,t.key,n)},decorateClass:function(e,t){var n=[],i=[],r={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,r)}),this),e.forEach((function(e){if(!G(e))return n.push(e);var t=this.decorateElement(e,r);n.push(t.element),n.push.apply(n,t.extras),i.push.apply(i,t.finishers)}),this),!t)return{elements:n,finishers:i};var o=this.decorateConstructor(n,t);return i.push.apply(i,o.finishers),o.finishers=i,o},addElementPlacement:function(e,t,n){var i=t[e.placement];if(!n&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,t){for(var n=[],i=[],r=e.decorators,o=r.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),u=this.toElementFinisherExtras((0,r[o])(s)||s);e=u.element,this.addElementPlacement(e,t),u.finisher&&i.push(u.finisher);var c=u.extras;if(c){for(var l=0;l<c.length;l++)this.addElementPlacement(c[l],t);n.push.apply(n,c)}}return{element:e,finishers:i,extras:n}},decorateConstructor:function(e,t){for(var n=[],i=t.length-1;i>=0;i--){var r=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(r)||r);if(void 0!==o.finisher&&n.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:n}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||te(t)||Q(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var n=J(e.key),i=String(e.placement);if("static"!==i&&"prototype"!==i&&"own"!==i)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+i+'"');var r=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:n,placement:i,descriptor:Object.assign({},r)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(r,"get","The property descriptor of a field descriptor"),this.disallowProperty(r,"set","The property descriptor of a field descriptor"),this.disallowProperty(r,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:K(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var n=K(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:n}},runClassFinishers:function(e,t){for(var n=0;n<t.length;n++){var i=(0,t[n])(e);if(void 0!==i){if("function"!=typeof i)throw new TypeError("Finishers must return a constructor.");e=i}}return e},disallowProperty:function(e,t,n){if(void 0!==e[t])throw new TypeError(n+" can't have a ."+t+" property.")}};return e}function X(e){var t,n=J(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var i={kind:"field"===e.kind?"field":"method",key:n,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(i.decorators=e.decorators),"field"===e.kind&&(i.initializer=e.value),i}function Y(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function G(e){return e.decorators&&e.decorators.length}function Z(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function K(e,t){var n=e[t];if(void 0!==n&&"function"!=typeof n)throw new TypeError("Expected '"+t+"' to be a function");return n}function J(e){var t=function(e,t){if("object"!==$(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==$(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===$(t)?t:String(t)}function Q(e,t){if(e){if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(e,t):void 0}}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function te(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ne(e,t,n){return(ne="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ie(e)););return e}(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(n):r.value}})(e,t,n||e)}function ie(e){return(ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var re,oe,ae,se,ue,ce=(re=[(0,S.Mo)("br-mode-1up")],oe=S.oi,ae=q(),se=function(e,t){var n=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&z(e,t)}(o,t);var n,i,r=(n=o,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ie(n);if(i){var r=ie(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return V(this,e)});function o(t,n){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i=r.call(this),e(H(i)),i.book=t,i.br=n,i}return o}(t);return{F:n,d:[{kind:"field",key:"br",value:void 0},{kind:"field",decorators:[(0,S.Cb)({type:Object})],key:"book",value:void 0},{kind:"field",decorators:[(0,S.Cb)({type:Array})],key:"pages",value:function(){return[]}},{kind:"field",decorators:[(0,S.Cb)({type:Object})],key:"pageTops",value:function(){return{}}},{kind:"field",key:"screenDPI",value:function(){return(0,i.calcScreenDPI)()}},{kind:"field",key:"realWorldReduce",value:function(){return 1}},{kind:"field",decorators:[(0,S.Cb)({type:Number})],key:"scale",value:function(){return 1}},{kind:"field",decorators:[(0,S.Cb)({type:Object})],key:"scaleCenter",value:function(){return{x:.5,y:.5}}},{kind:"field",decorators:[(0,S.Cb)({type:Object})],key:"visibleRegion",value:function(){return{top:0,left:0,width:100,height:100}}},{kind:"field",decorators:[(0,S.Cb)({type:Array,hasChanged:i.arrChanged})],key:"visiblePages",value:function(){return[]}},{kind:"field",decorators:[(0,S.Cb)({type:Array})],key:"renderedPages",value:function(){return[]}},{kind:"field",key:"pageContainerCache",value:function(){return{}}},{kind:"field",decorators:[(0,S.IO)(".br-mode-1up__world")],key:"$world",value:void 0},{kind:"field",key:"worldDimensions",value:function(){return{width:100,height:100}}},{kind:"get",key:"worldStyle",value:function(){var e=this.worldUnitsToRenderedPixels;return{width:e(this.worldDimensions.width)+"px",height:e(this.worldDimensions.height)+"px"}}},{kind:"get",key:"$container",value:function(){return this}},{kind:"field",decorators:[(0,S.IO)(".br-mode-1up__visible-world")],key:"$visibleWorld",value:void 0},{kind:"field",key:"htmlDimensionsCacher",value:function(){return new j(this)}},{kind:"field",key:"smoothZoomer",value:function(){return new D(this)}},{kind:"field",key:"SPACING_IN",value:function(){return.2}},{kind:"field",key:"ZOOM_FACTOR",value:function(){return 1.1}},{kind:"method",key:"jumpToIndex",value:function(e){var t=this,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).smooth,i=void 0!==n&&n;i&&(this.style.scrollBehavior="smooth"),this.scrollTop=this.worldUnitsToVisiblePixels(this.pageTops[e]-this.SPACING_IN/2),i&&setTimeout((function(){return t.style.scrollBehavior=""}),100)}},{kind:"method",key:"zoomIn",value:function(){this.scale*=this.ZOOM_FACTOR}},{kind:"method",key:"zoomOut",value:function(){this.scale*=1/this.ZOOM_FACTOR}},{kind:"method",key:"firstUpdated",value:function(e){ne(ie(n.prototype),"firstUpdated",this).call(this,e),this.htmlDimensionsCacher.updateClientSizes(),this.smoothZoomer.attach()}},{kind:"method",key:"initFirstRender",value:function(e){var t=this.book.getPage(e);this.scale=this.computeDefaultScale(t)}},{kind:"method",key:"updated",value:function(e){if(e.has("book")&&(this.pages=(0,i.genToArray)(this.book.pagesIterator({combineConsecutiveUnviewables:!0}))),e.has("pages")&&(this.worldDimensions=this.computeWorldDimensions(),this.pageTops=this.computePageTops(this.pages,this.SPACING_IN)),e.has("visibleRegion")&&(this.visiblePages=this.computeVisiblePages()),e.has("visiblePages")&&(this.throttledUpdateRenderedPages(),this.br.displayedIndices=this.visiblePages.map((function(e){return e.index})),this.br.updateFirstIndex(this.br.displayedIndices[0]),this.br.updateNavIndexThrottled()),e.has("scale")){var t=e.get("scale");this.$visibleWorld.style.transform="scale(".concat(this.scale,")"),this.updateViewportOnZoom(this.scale,t),this.$world.style.transform="scale(".concat(this.scale,")")}}},{kind:"method",key:"connectedCallback",value:function(){ne(ie(n.prototype),"connectedCallback",this).call(this),this.htmlDimensionsCacher.attachResizeListener(),this.attachScrollListeners(),this.smoothZoomer.attach()}},{kind:"method",key:"disconnectedCallback",value:function(){this.htmlDimensionsCacher.detachResizeListener(),this.detachScrollListeners(),this.smoothZoomer.detach(),ne(ie(n.prototype),"disconnectedCallback",this).call(this)}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"field",key:"worldUnitsToRenderedPixels",value:function(){var e=this;return function(t){return t*e.screenDPI/e.realWorldReduce}}},{kind:"field",key:"renderedPixelsToWorldUnits",value:function(){var e=this;return function(t){return t*e.realWorldReduce/e.screenDPI}}},{kind:"field",key:"renderedPixelsToVisiblePixels",value:function(){var e=this;return function(t){return t*e.scale}}},{kind:"field",key:"visiblePixelsToRenderedPixels",value:function(){var e=this;return function(t){return t/e.scale}}},{kind:"field",key:"worldUnitsToVisiblePixels",value:function(){var e=this;return function(t){return e.renderedPixelsToVisiblePixels(e.worldUnitsToRenderedPixels(t))}}},{kind:"field",key:"visiblePixelsToWorldUnits",value:function(){var e=this;return function(t){return e.renderedPixelsToWorldUnits(e.visiblePixelsToRenderedPixels(t))}}},{kind:"method",key:"render",value:function(){var e,t,n=this;return(0,S.dy)(F||(e=['\n <div class="br-mode-1up__world" style=','></div>\n <div class="br-mode-1up__visible-world">\n ',"\n </div>"],t||(t=e.slice(0)),F=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),I(this.worldStyle),this.renderedPages.map((function(e){return n.renderPage(e)})))}},{kind:"field",key:"createPageContainer",value:function(){var e=this;return function(t){return e.pageContainerCache[t.index]||(e.pageContainerCache[t.index]=e.br._createPageContainer(t.index))}}},{kind:"field",key:"renderPage",value:function(){var e=this;return function(t){var n=e.worldUnitsToRenderedPixels,i=e.worldUnitsToVisiblePixels,r=e.visiblePixelsToWorldUnits(e.htmlDimensionsCacher.clientWidth),o=n(t.widthInches),a=n(t.heightInches),s=Math.max(e.SPACING_IN,(r-t.widthInches)/2),u=e.pageTops[t.index],c="translate(".concat(n(s),"px, ").concat(n(u),"px)"),l=e.createPageContainer(t).update({dimensions:{width:o,height:a,top:0,left:0},reduce:t.width/i(t.widthInches)}).$container[0];return l.style.transform=c,l}}},{kind:"field",key:"updateVisibleRegion",value:function(){var e=this;return function(){var t=e.scrollTop,n=e.scrollLeft,i=e.htmlDimensionsCacher.clientWidth,r=e.htmlDimensionsCacher.clientHeight,o=e.visiblePixelsToWorldUnits;e.visibleRegion={top:o(t),height:o(r),left:o(n),width:o(i)}}}},{kind:"method",key:"computeRenderedPages",value:function(){var e,t;return[null===(e=this.visiblePages[0])||void 0===e?void 0:e.prev].concat(W(this.visiblePages),[null===(t=this.visiblePages[this.visiblePages.length-1])||void 0===t?void 0:t.next]).filter((function(e){return e})).slice(0,10)}},{kind:"field",key:"throttledUpdateRenderedPages",value:function(){var e=this;return(0,i.throttle)((function(){e.renderedPages=e.computeRenderedPages(),e.requestUpdate()}),100,null)}},{kind:"method",key:"computePageTops",value:function(e,t){var n,i={},r=t,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Q(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;i[a.index]=r,r+=a.heightInches+t}}catch(e){o.e(e)}finally{o.f()}return i}},{kind:"method",key:"computeDefaultScale",value:function(e){var t=this.visiblePixelsToWorldUnits(this.htmlDimensionsCacher.clientWidth);return Math.min(1,t/(e.widthInches+2*this.SPACING_IN))}},{kind:"method",key:"computeWorldDimensions",value:function(){return{width:Math.max.apply(Math,W(this.pages.map((function(e){return e.widthInches}))))+2*this.SPACING_IN,height:(0,i.sum)(this.pages.map((function(e){return e.heightInches})))+(this.pages.length+1)*this.SPACING_IN}}},{kind:"method",key:"computeVisiblePages",value:function(){var e=this;return this.pages.filter((function(t){var n=e.pageTops[t.index],i=n+t.heightInches,r=e.visibleRegion.top;return n<=r+e.visibleRegion.height&&i>=r}))}},{kind:"method",key:"updateViewportOnZoom",value:function(e,t){var n=this,i=n.scrollTop,r=n.scrollLeft,o=this.htmlDimensionsCacher.clientWidth,a=this.htmlDimensionsCacher.clientHeight,s=e/t,u=this.scaleCenter.x,c=this.scaleCenter.y,l=s*(r+u*o),h=s*(i+c*a);n.scrollTop=h-c*a,n.scrollLeft=l-u*o,this.updateVisibleRegion()}},{kind:"field",key:"attachScrollListeners",value:function(){var e=this;return function(){e.addEventListener("scroll",e.updateVisibleRegion,{passive:!0})}}},{kind:"field",key:"detachScrollListeners",value:function(){var e=this;return function(){e.removeEventListener("scroll",e.updateVisibleRegion)}}}]}}((function(e){ae.initializeInstanceElements(e,ue.elements)}),oe),ue=ae.decorateClass(function(e){for(var t=[],n=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},i=0;i<e.length;i++){var r,o=e[i];if("method"===o.kind&&(r=t.find(n)))if(Z(o.descriptor)||Z(r.descriptor)){if(G(o)||G(r))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");r.descriptor=o.descriptor}else{if(G(o)){if(G(r))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");r.decorators=o.decorators}Y(o,r)}else t.push(o)}return t}(se.d.map(X)),re),ae.initializeClassElements(se.F,ue.elements),ae.runClassFinishers(se.F,ue.finishers)),le=n(3609);function he(e,t,n,i,r,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function de(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){he(o,i,r,a,s,"next",e)}function s(e){he(o,i,r,a,s,"throw",e)}a(void 0)}))}}function pe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var fe=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=t,this.book=n,this.mode1UpLit=new ce(n,t),this.$el=le(this.mode1UpLit).addClass("br-mode-1up BRmode1up"),this.everShown=!1}var t,n;return t=e,(n=[{key:"$brContainer",get:function(){return this.br.refs.$brContainer}},{key:"prepare",value:function(){var e=this,t=this.br.currentIndex();this.$brContainer.empty().css({overflow:"hidden"}).append(this.$el),setTimeout(de(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.everShown){n.next=6;break}return e.mode1UpLit.initFirstRender(t),e.everShown=!0,n.next=5,e.mode1UpLit.requestUpdate();case 5:le(e.mode1UpLit).dragscrollable({preventDefault:!0,dragSelector:".br-mode-1up__visible-world",dragstart:"mousedown",dragcontinue:"mousemove",dragend:"mouseup"});case 6:e.mode1UpLit.jumpToIndex(t);case 7:case"end":return n.stop()}}),n)})))),this.br.updateBrClasses()}},{key:"jumpToIndex",value:function(e,t,n,i){var r=Math.abs(this.br.currentIndex()-e),o=!i&&r<=4;this.mode1UpLit.jumpToIndex(e,{smooth:o})}},{key:"zoom",value:function(e){"in"==e?this.mode1UpLit.zoomIn():this.mode1UpLit.zoomOut()}},{key:"resizePageView",value:function(){this.mode1UpLit.htmlDimensionsCacher.updateClientSizes(),this.mode1UpLit.requestUpdate()}}])&&pe(t.prototype,n),e}(),ge=(n(9337),n(3609));function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ye(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var we=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=t,this.book=n,this.leafEdgeL=null,this.leafEdgeR=null,this.pageContainers={},this.smoothZoomer=null,this._scale=1,this.scaleCenter={x:.5,y:.5}}var t,n;return t=e,(n=[{key:"$container",get:function(){return this.br.refs.$brContainer[0]}},{key:"$visibleWorld",get:function(){var e;return null===(e=this.br.refs.$brTwoPageView)||void 0===e?void 0:e[0]}},{key:"scale",get:function(){return this._scale},set:function(e){this.$visibleWorld.style.transform="scale(".concat(e,")"),this.updateViewportOnZoom(e,this._scale),this._scale=e}},{key:"jumpToIndex",value:function(e){e<Math.min(this.br.twoPage.currentIndexL,this.br.twoPage.currentIndexR)?this.flipBackToIndex(e):e>Math.max(this.br.twoPage.currentIndexL,this.br.twoPage.currentIndexR)&&this.flipFwdToIndex(e)}},{key:"drawLeafs",value:function(){var e=this.br.refs.$brTwoPageView,t=this.br.twoPage.currentIndexL,n=this.br.twoPage.currentIndexR;this.createPageContainer(t).$container.css(this.leftLeafCss).appendTo(e),this.createPageContainer(n).$container.css(this.rightLeafCss).appendTo(e),this.displayedIndices=[this.br.twoPage.currentIndexL,this.br.twoPage.currentIndexR],this.br.displayedIndices=this.displayedIndices,this.br.updateToolbarZoom(this.br.reduce),this.br.trigger("pageChanged")}},{key:"zoom",value:function(e){this.br.stopFlipAnimations(),this.calculateReductionFactors();var t=this.br.nextReduce(this.br.reduce,e,this.br.twoPage.reductionFactors);if(this.br.reduce!=t.reduce||this.br.twoPage.autofit!=t.autofit){this.br.twoPage.autofit=t.autofit,this.br.reduce=t.reduce,this.br.pageScale=this.br.reduce;var n=this.getViewCenter();this.prepareTwoPageView(n.percentageX,n.percentageY,!0)}}},{key:"resizeSpread",value:function(){var e,t,n,i;this.br.resizeBRcontainer(!1),this.calculateSpreadSize(),null===(e=this.br.refs)||void 0===e||e.$brTwoPageView.css(this.mainContainerCss),this.centerView(),ge(this.br.twoPage.coverDiv).css(this.spreadCoverCss);var r=this.br.refs.$brTwoPageView;null===(t=r.find(".BRleafEdgeR"))||void 0===t||t.css(this.leafEdgeRCss),null===(n=r.find(".BRleafEdgeL"))||void 0===n||n.css(this.leafEdgeLCss),null===(i=r.find(".BRgutter"))||void 0===i||i.css(this.spineCss);var o=this.br.twoPage.currentIndexL,a=this.br.twoPage.currentIndexR;this.pageContainers[o].$container.css(this.leftLeafCss),this.pageContainers[a].$container.css(this.rightLeafCss)}},{key:"prepareTwoPageView",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.br.reduce,a=this.br.displayedIndices;this.br.refs.$brContainer.empty(),this.br.refs.$brContainer.css("overflow","auto");var s=(0,i.clamp)(this.br.firstIndex,this.br.firstDisplayableIndex(),this.br.lastDisplayableIndex()),u=this.book.getSpreadIndices(s);this.br.twoPage.currentIndexL=u[0],this.br.twoPage.currentIndexR=u[1],this.calculateSpreadSize();var c=o==this.br.reduce,l=a==this.br.displayedIndices,h=!l||l&&!c;(r||h)&&(this.prunePageContainers(),this.prefetch()),this.br.refs.$brTwoPageView=this.br.refs.$brTwoPageView||ge('<div class="BRtwopageview"></div>');var d=this.br.refs.$brTwoPageView;d.empty(),d[0].style.transformOrigin="0 0",this.br.refs.$brContainer.append(d),this.br.refs.$brContainer.dragscrollable({preventDefault:!0,dragstart:"mousedown",dragcontinue:"mousemove",dragend:"mouseup"}),this.attachMouseHandlers(),null===(n=this.br.refs)||void 0===n||n.$brTwoPageView.css(this.mainContainerCss),this.br.twoPage.totalWidth<this.br.refs.$brContainer.prop("clientWidth")&&(e=.5),this.br.twoPage.totalHeight<this.br.refs.$brContainer.prop("clientHeight")&&(t=.5),this.centerView(e,t),this.br.twoPage.coverDiv=document.createElement("div"),ge(this.br.twoPage.coverDiv).attr("class","BRbookcover").css(this.spreadCoverCss).appendTo(this.br.refs.$brTwoPageView),this.leafEdgeR=document.createElement("div"),this.leafEdgeR.className="BRleafEdgeR",ge(this.leafEdgeR).css(this.leafEdgeRCss).appendTo(this.br.refs.$brTwoPageView),this.leafEdgeL=document.createElement("div"),this.leafEdgeL.className="BRleafEdgeL",ge(this.leafEdgeL).css(this.leafEdgeLCss).appendTo(this.br.refs.$brTwoPageView);var p=document.createElement("div");ge(p).attr("class","BRgutter").css(this.spineCss).appendTo(this.br.refs.$brTwoPageView),this.preparePopUp(),this.br.displayedIndices=[],this.drawLeafs(),this.br.updateToolbarZoom(this.br.reduce),this.br.updateBrClasses(),this.smoothZoomer=this.smoothZoomer||new D(this),this.smoothZoomer.attach(),this.htmlDimensionsCacher=this.htmlDimensionsCacher||new j(this.$container)}},{key:"unprepare",value:function(){this.smoothZoomer.detach()}},{key:"updateViewportOnZoom",value:function(e,t){var n,i,r=this.br.refs.$brContainer[0],o=r.scrollTop,a=r.scrollLeft,s=this.htmlDimensionsCacher.clientWidth,u=this.htmlDimensionsCacher.clientHeight,c=e/t,l=this.scaleCenter.x,h=this.scaleCenter.y,d=c*(a+l*s),p=c*(o+h*u);r.scrollTop=p-h*u,r.scrollLeft=d-l*s,null===(n=this.pageContainers[this.br.twoPage.currentIndexL])||void 0===n||n.update({reduce:this.br.reduce/e}),null===(i=this.pageContainers[this.br.twoPage.currentIndexR])||void 0===i||i.update({reduce:this.br.reduce/e})}},{key:"prunePageContainers",value:function(){for(var e in this.pageContainers)e!=this.br.twoPage.currentIndexL&&e!=this.br.twoPage.currentIndexR&&ge(this.pageContainers[e].$container).remove(),(e<this.br.twoPage.currentIndexL-4||e>this.br.twoPage.currentIndexR+4)&&delete this.pageContainers[e]}},{key:"preparePopUp",value:function(){var e=this;this.br.twoPagePopUp=document.createElement("div"),this.br.twoPagePopUp.className="BRtwoPagePopUp",ge(this.br.twoPagePopUp).css({zIndex:"1000"}).appendTo(this.br.refs.$brContainer),ge(this.br.twoPagePopUp).hide();for(var t=[{$leafEdge:ge(this.leafEdgeL),jumpIndexForPageX:this.jumpIndexForLeftEdgePageX.bind(this),leftOffset:function(){return 120-ge(e.br.twoPagePopUp).width()}},{$leafEdge:ge(this.leafEdgeR),jumpIndexForPageX:this.jumpIndexForRightEdgePageX.bind(this),leftOffset:function(){return-120}}],n=function(){var t=a[r],n=t.$leafEdge,s=t.jumpIndexForPageX,u=t.leftOffset;n.on("mouseenter",(function(){return ge(e.br.twoPagePopUp).show()})),n.on("mouseleave",(function(){return ge(e.br.twoPagePopUp).hide()})),n.on("click",(function(t){e.br.trigger(o.stop),e.br.jumpToIndex(s(t.pageX))})),n.on("mousemove",(function(t){var n=(0,i.clamp)(s(t.pageX),0,e.book.getNumLeafs()-1);ge(e.br.twoPagePopUp).text("View ".concat(e.book.getPageName(n))),ge(e.br.twoPagePopUp).css({left:"".concat(t.pageX-e.br.refs.$brContainer.offset().left+e.br.refs.$brContainer.scrollLeft()+u(),"px"),top:"".concat(t.pageY-e.br.refs.$brContainer.offset().top+e.br.refs.$brContainer.scrollTop(),"px")})}))},r=0,a=t;r<a.length;r++)n()}},{key:"setSpreadIndices",value:function(){var e=(0,i.clamp)(this.br.firstIndex,this.br.firstDisplayableIndex(),this.br.lastDisplayableIndex()),t=this.book.getSpreadIndices(e);this.br.twoPage.currentIndexL=t[0],this.br.twoPage.currentIndexR=t[1]}},{key:"calculateSpreadSize",value:function(){var e,t=this.br.twoPage.currentIndexL,n=this.br.twoPage.currentIndexR;e=this.br.twoPage.autofit?this.getIdealSpreadSize(t,n):this.getSpreadSizeFromReduce(t,n,this.br.reduce),this.br.twoPage.height=e.height||0,this.br.twoPage.width=e.width||0,this.br.twoPage.scaledWL=this.getPageWidth(t)||0,this.br.twoPage.scaledWR=this.getPageWidth(n)||0,this.br.twoPage.edgeWidth=e.totalLeafEdgeWidth,this.br.twoPage.leafEdgeWidthL=this.br.leafEdgeWidth(this.br.twoPage.currentIndexL),this.br.twoPage.leafEdgeWidthR=this.br.twoPage.edgeWidth-this.br.twoPage.leafEdgeWidthL,this.br.twoPage.bookCoverDivWidth=this.coverWidth(this.br.twoPage.scaledWL+this.br.twoPage.scaledWR),this.br.twoPage.bookCoverDivHeight=this.br.twoPage.height+2*this.br.twoPage.coverInternalPadding;var i=this.gutterOffsetForIndex(t),r=this.br.twoPage.scaledWL-i+this.br.twoPage.leafEdgeWidthL,o=this.br.twoPage.scaledWR+i+this.br.twoPage.leafEdgeWidthR,a=Math.max(r,o);this.br.twoPage.totalWidth=2*(a+this.br.twoPage.coverInternalPadding+this.br.twoPage.coverExternalPadding),this.br.twoPage.totalHeight=this.br.twoPage.height+2*(this.br.twoPage.coverInternalPadding+this.br.twoPage.coverExternalPadding),this.br.twoPage.middle=this.br.twoPage.totalWidth>>1,this.br.twoPage.gutter=this.br.twoPage.middle+this.gutterOffsetForIndex(t),this.br.twoPage.bookCoverDivLeft=this.br.twoPage.gutter-this.br.twoPage.scaledWL-this.br.twoPage.leafEdgeWidthL-this.br.twoPage.coverInternalPadding,this.br.twoPage.bookCoverDivTop=this.br.twoPage.coverExternalPadding,this.br.twoPage.bookSpineDivHeight=this.br.twoPage.height+2*this.br.twoPage.coverInternalPadding,this.br.twoPage.bookSpineDivLeft=this.br.twoPage.middle-(this.br.twoPage.bookSpineDivWidth>>1),this.br.twoPage.bookSpineDivTop=this.br.twoPage.bookCoverDivTop,this.br.reduce=e.reduce<0?this.br.reduce:e.reduce}},{key:"getIdealSpreadSize",value:function(e,t){var n,i={},r=this.book._getPageHeight(e),o=this.book._getPageWidth(e),a=this.book._getPageHeight(t),s=r/o,u=a/this.book._getPageWidth(t);n=Math.abs(s-1.5)<Math.abs(u-1.5)?s:u;var c=Math.floor(.1*this.book.getNumLeafs()),l=Math.floor(.1*this.br.refs.$brContainer.prop("clientWidth"));i.totalLeafEdgeWidth=Math.min(c,l);var h=2*(this.br.twoPage.coverInternalPadding+this.br.twoPage.coverExternalPadding)+i.totalLeafEdgeWidth,d=2*(this.br.twoPage.coverInternalPadding+this.br.twoPage.coverExternalPadding);return i.width=this.br.refs.$brContainer.width()-h>>1,i.width=i.width>10?i.width-10:1,i.height=this.br.refs.$brContainer.height()-d,i.height=i.height>15?i.height-15:1,i.height/n<=i.width?i.width=Math.floor(i.height/n)||1:i.height=Math.floor(i.width*n)||1,i.reduce=Math.round((r+a)/2/i.height),i}},{key:"getSpreadSizeFromReduce",value:function(e,t,n){var i={},r=Math.floor(.1*this.book.getNumLeafs()),o=Math.floor(.1*this.br.refs.$brContainer.prop("clientWidth"));i.totalLeafEdgeWidth=Math.min(r,o);var a=this.book._getPageWidth(e)+this.book._getPageWidth(t),s=this.book._getPageHeight(e)+this.book._getPageHeight(t);return i.height=Math.floor(s/2/this.br.reduce),i.width=Math.floor(a/2/this.br.reduce),i.reduce=n,i}},{key:"getAutofitReduce",value:function(){return this.getIdealSpreadSize(this.br.twoPage.currentIndexL,this.br.twoPage.currentIndexR).reduce}},{key:"isZoomedIn",value:function(){var e=!1;return"auto"!=this.br.twoPage.autofit&&this.br.reduce<this.getAutofitReduce()&&(e=!0),e}},{key:"calculateReductionFactors",value:function(){this.br.twoPage.reductionFactors=this.br.reductionFactors.concat([{reduce:this.getIdealSpreadSize(this.br.twoPage.currentIndexL,this.br.twoPage.currentIndexR).reduce,autofit:"auto"}]),this.br.twoPage.reductionFactors.sort(this.br._reduceSort)}},{key:"setCursor",value:function(){console.warn("Call to deprecated method, Mode2Up.setCursor. No-op.")}},{key:"flipBackToIndex",value:function(e){if(this.br.constMode1up!=this.br.mode&&!this.br.animating)if(null==this.br.leafEdgeTmp){if(null==e){var t=this.br.twoPage,n=t.currentIndexL,i=t.currentIndexR,r=Math.min(n,i),o=this.book.getPage(r).findPrev({combineConsecutiveUnviewables:!0});if(!o)return;e=o.index,"R"==o.pageSide&&e--}this.br.updateNavIndexThrottled(e);var a=this.book.getSpreadIndices(e);a[0]<this.br.firstDisplayableIndex()||a[1]<this.br.firstDisplayableIndex()||(this.br.animating=!0,"rl"!=this.br.pageProgression?(this.prepareFlipLeftToRight(a[0],a[1]),this.flipLeftToRight(a[0],a[1])):(this.prepareFlipRightToLeft(a[0],a[1]),this.flipRightToLeft(a[0],a[1])))}else alert("error: leafEdgeTmp should be null!")}},{key:"flipLeftToRight",value:function(e,t){var n=this;this.br.refs.$brContainer.addClass("BRpageFlipping");var i=this.br.twoPage.currentIndexL,r=this.br.leafEdgeWidth(this.br.twoPage.currentIndexL),o=this.br.leafEdgeWidth(e),a=r-o,s=this.getPageWidth(i),u=this.getPageWidth(e),c=this.getPageWidth(t),l=this.top(),h=this.br.twoPage.middle+this.gutterOffsetForIndex(e),d=this.br.refs.$brTwoPageView,p=h-s-a;this.br.leafEdgeTmp=document.createElement("div"),this.br.leafEdgeTmp.className="BRleafEdgeTmp",ge(this.br.leafEdgeTmp).css({width:"".concat(a,"px"),height:"".concat(this.br.twoPage.height,"px"),left:"".concat(p,"px"),top:"".concat(l,"px"),zIndex:1e3}).appendTo(d),ge(this.leafEdgeL).css({width:"".concat(o,"px"),left:"".concat(h-s-o,"px")});var f=this.pageContainers[i].$container.offset().left,g="".concat(d.prop("clientWidth")-f-this.pageContainers[i].$container.width()+d.offset().left-2,"px");this.pageContainers[i].$container.css({right:g,left:""}),ge(this.br.leafEdgeTmp).animate({left:h},this.br.flipSpeed,"easeInSine"),this.pageContainers[i].$container.animate({width:"0px"},this.br.flipSpeed,"easeInSine",(function(){ge(n.br.leafEdgeTmp).animate({left:"".concat(h+c,"px")},n.br.flipSpeed,"easeOutSine"),n.br.$(".BRgutter").css({left:"".concat(h-.5*n.br.twoPage.bookSpineDivWidth,"px")}),n.pageContainers[t].$container.animate({width:"".concat(c,"px")},n.br.flipSpeed,"easeOutSine",(function(){var i;n.pageContainers[e].$container.css("zIndex",2),ge(n.leafEdgeR).css({width:"".concat(n.br.twoPage.edgeWidth-o,"px"),left:"".concat(h+c,"px")}),ge(n.leafEdgeL).css({width:"".concat(o,"px"),left:"".concat(h-u-o,"px")}),ge(n.br.twoPage.coverDiv).css({width:"".concat(n.coverWidth(u+c),"px"),left:"".concat(h-u-o-n.br.twoPage.coverInternalPadding,"px")}),ge(n.br.leafEdgeTmp).remove(),n.br.leafEdgeTmp=null,n.br.twoPage.currentIndexL=e,n.br.twoPage.currentIndexR=t,n.br.twoPage.scaledWL=u,n.br.twoPage.scaledWR=c,n.br.twoPage.gutter=h,n.br.updateFirstIndex(n.br.twoPage.currentIndexL),n.br.displayedIndices=[e,t],n.prunePageContainers(),n.br.animating=!1,n.resizeSpread(),n.br.animationFinishedCallback&&(n.br.animationFinishedCallback(),n.br.animationFinishedCallback=null),n.br.refs.$brContainer.removeClass("BRpageFlipping"),null===(i=n.br.textSelectionPlugin)||void 0===i||i.stopPageFlip(n.br.refs.$brContainer),n.centerView(),n.br.trigger("pageChanged"),n.prunePageContainers(),n.createPageContainer(e-2),n.createPageContainer(t-2),n.createPageContainer(e-3),n.createPageContainer(t-3)}))}))}},{key:"createPageContainer",value:function(e){return this.pageContainers[e]||(this.pageContainers[e]=this.br._createPageContainer(e)),this.pageContainers[e].update({reduce:this.br.reduce/this.scale}),this.pageContainers[e]}},{key:"flipFwdToIndex",value:function(e){if(!this.br.animating)if(null==this.br.leafEdgeTmp){if(null==e){var t=this.br.twoPage,n=t.currentIndexL,i=t.currentIndexR,r=Math.max(n,i),o=this.book.getPage(r).findNext({combineConsecutiveUnviewables:!0});if(!o)return;e=o.index}if(!(e>this.br.lastDisplayableIndex())){this.br.updateNavIndexThrottled(e),this.br.animating=!0;var a=this.book.getSpreadIndices(e);"rl"!=this.br.pageProgression?(this.prepareFlipRightToLeft(a[0],a[1]),this.flipRightToLeft(a[0],a[1])):(this.prepareFlipLeftToRight(a[0],a[1]),this.flipLeftToRight(a[0],a[1]))}}else alert("error: leafEdgeTmp should be null!")}},{key:"flipRightToLeft",value:function(e,t){var n=this;this.br.refs.$brContainer.addClass("BRpageFlipping");var i=this.br.leafEdgeWidth(this.br.twoPage.currentIndexL),r=this.br.twoPage.edgeWidth-i,o=this.br.leafEdgeWidth(e),a=this.br.twoPage.edgeWidth-o,s=r-a,u=this.top(),c=this.getPageWidth(this.br.twoPage.currentIndexR),l=this.br.twoPage.middle+this.gutterOffsetForIndex(e),h=this.br.refs.$brTwoPageView;this.br.leafEdgeTmp=document.createElement("div"),this.br.leafEdgeTmp.className="BRleafEdgeTmp",ge(this.br.leafEdgeTmp).css({width:"".concat(s,"px"),height:"".concat(this.br.twoPage.height,"px"),left:"".concat(l+c,"px"),top:"".concat(u,"px"),zIndex:1e3}).appendTo(h);var d=this.getPageWidth(e),p=this.getPageWidth(t);ge(this.leafEdgeR).css({width:"".concat(a,"px"),left:"".concat(l+p,"px")});var f=this.br.flipSpeed;ge(this.br.leafEdgeTmp).animate({left:l},f,"easeInSine"),this.pageContainers[this.br.twoPage.currentIndexR].$container.animate({width:"0px"},f,"easeInSine",(function(){n.br.$("BRgutter").css({left:"".concat(l-.5*n.br.twoPage.bookSpineDivWidth,"px")}),ge(n.br.leafEdgeTmp).animate({left:"".concat(l-d-s,"px")},f,"easeOutSine"),n.pageContainers[e].$container.animate({width:"".concat(d,"px")},f,"easeOutSine",(function(){var i;n.pageContainers[t].$container.css("zIndex",2),ge(n.leafEdgeL).css({width:"".concat(o,"px"),left:"".concat(l-d-o,"px")}),ge(n.br.twoPage.coverDiv).css({width:"".concat(n.coverWidth(d+p),"px"),left:"".concat(l-d-o-n.br.twoPage.coverInternalPadding,"px")}),ge(n.br.leafEdgeTmp).remove(),n.br.leafEdgeTmp=null,n.br.twoPage.currentIndexL=e,n.br.twoPage.currentIndexR=t,n.br.twoPage.scaledWL=d,n.br.twoPage.scaledWR=p,n.br.twoPage.gutter=l,n.br.updateFirstIndex(n.br.twoPage.currentIndexL),n.br.displayedIndices=[e,t],n.prunePageContainers(),n.br.animating=!1,n.resizeSpread(),n.br.animationFinishedCallback&&(n.br.animationFinishedCallback(),n.br.animationFinishedCallback=null),n.br.refs.$brContainer.removeClass("BRpageFlipping"),null===(i=n.br.textSelectionPlugin)||void 0===i||i.stopPageFlip(n.br.refs.$brContainer),n.centerView(),n.br.trigger("pageChanged"),n.prunePageContainers(),n.createPageContainer(e+2),n.createPageContainer(t+2),n.createPageContainer(e+3),n.createPageContainer(t+3)}))}))}},{key:"attachMouseHandlers",value:function(){var e=this;this.br.refs.$brTwoPageView.off("mouseup").on("mouseup",(function(t){if(3==t.which)return!e.br.protected;var n=ge(t.target).closest(".BRpagecontainer");"L"==n.data("side")?e.br.left():"R"==n.data("side")&&e.br.right()}))}},{key:"prepareFlipLeftToRight",value:function(e,t){this.createPageContainer(e,!0),this.createPageContainer(t,!0);var n=this.br.refs.$brTwoPageView,i=this.book._getPageHeight(e),r=this.book._getPageWidth(e),o=this.br.twoPage.middle,a=this.top(),s=this.br.twoPage.height*r/i,u=o+this.gutterOffsetForIndex(e),c={left:"".concat(u-s,"px"),right:"",top:"".concat(a,"px"),height:this.br.twoPage.height,width:"".concat(s,"px"),zIndex:1};this.pageContainers[e].$container.css(c).appendTo(n);var l={left:"".concat(u,"px"),right:"",top:"".concat(a,"px"),height:this.br.twoPage.height,width:"0",zIndex:2};this.pageContainers[t].$container.css(l).appendTo(n)}},{key:"prepareFlipRightToLeft",value:function(e,t){this.createPageContainer(e,!0),this.createPageContainer(t,!0);var n=this.br.refs.$brTwoPageView,i=this.book._getPageHeight(t),r=this.book._getPageWidth(t),o=this.br.twoPage.middle,a=this.top(),s=this.br.twoPage.height*r/i,u=o+this.gutterOffsetForIndex(e);ge(this.pageContainers[t].$container).css({left:"".concat(u,"px"),top:"".concat(a,"px"),height:this.br.twoPage.height,width:"".concat(s,"px"),zIndex:1}).appendTo(n),i=this.book._getPageHeight(e),r=this.book._getPageWidth(e),s=this.br.twoPage.height*r/i,ge(this.pageContainers[e].$container).css({right:"".concat(n.prop("clientWidth")-u,"px"),top:"".concat(a,"px"),height:this.br.twoPage.height,width:"0px",zIndex:2}).appendTo(n)}},{key:"getPageWidth",value:function(e){var t=this.book._getPageHeight(e),n=this.book._getPageWidth(e);return Math.floor(this.br.twoPage.height*n/t)}},{key:"gutter",value:function(){return this.br.twoPage.middle+this.gutterOffsetForIndex(this.br.twoPage.currentIndexL)}},{key:"top",value:function(){return this.br.twoPage.coverExternalPadding+this.br.twoPage.coverInternalPadding}},{key:"coverWidth",value:function(e){return e+this.br.twoPage.edgeWidth+2*this.br.twoPage.coverInternalPadding}},{key:"getViewCenter",value:function(){var e=this.br.refs,t=e.$brContainer,n=e.$brTwoPageView,i={},r=t.offset(),o=n.offset();return i.percentageX=(r.left-o.left+(t.prop("clientWidth")>>1))/this.br.twoPage.totalWidth,i.percentageY=(r.top-o.top+(t.prop("clientHeight")>>1))/this.br.twoPage.totalHeight,i}},{key:"centerView",value:function(e,t){void 0===e&&(e=.5),void 0===t&&(t=.5);var n=this.br.refs.$brTwoPageView.width(),i=this.br.refs.$brContainer.prop("clientWidth"),r=e*n,o=this.br.refs.$brTwoPageView.height(),a=this.br.refs.$brContainer.prop("clientHeight"),s=t*o;n<i?this.br.refs.$brTwoPageView.css("left","".concat((i>>1)-r,"px")):(this.br.refs.$brTwoPageView.css("left",0),this.br.refs.$brContainer.scrollLeft(r-(i>>1))),o<a?this.br.refs.$brTwoPageView.css("top","".concat((a>>1)-s,"px")):(this.br.refs.$brTwoPageView.css("top",0),this.br.refs.$brContainer.scrollTop(s-(a>>1)))}},{key:"flipAreaHeight",value:function(){return Math.floor(this.br.twoPage.height)}},{key:"flipAreaWidth",value:function(){var e=.15*this.br.twoPage.width;return Math.floor((0,i.clamp)(e,10,100))}},{key:"flipAreaTop",value:function(){return Math.floor(this.br.twoPage.bookCoverDivTop+this.br.twoPage.coverInternalPadding)}},{key:"leftFlipAreaLeft",value:function(){return Math.floor(this.br.twoPage.gutter-this.br.twoPage.scaledWL)}},{key:"rightFlipAreaLeft",value:function(){return Math.floor(this.br.twoPage.gutter+this.br.twoPage.scaledWR-this.flipAreaWidth())}},{key:"setHilightCss",value:function(e,t,n,i,r,o){var a,s=this.book._getPageHeight(t),u=this.book._getPageWidth(t),c=this.br.twoPage.height/s,l=Math.floor(u*c),h=this.gutter();a="L"==this.book.getPageSide(t)?h-l:h;var d=this.top();ge(e).css({width:"".concat((i-n)*c,"px"),height:"".concat((o-r)*c,"px"),left:"".concat(a+n*c,"px"),top:"".concat(d+r*c,"px")})}},{key:"gutterOffsetForIndex",value:function(e){var t=Math.floor((e/this.book.getNumLeafs()-.5)*this.br.twoPage.edgeWidth);return"rl"==this.br.pageProgression&&(t*=-1),t}},{key:"leafEdgeWidth",value:function(e){return"L"==this.book.getPageSide(e)&&"rl"!=this.br.pageProgression?Math.floor(e/this.book.getNumLeafs()*this.br.twoPage.edgeWidth+.5):Math.floor((1-e/this.book.getNumLeafs())*this.br.twoPage.edgeWidth+.5)}},{key:"jumpIndexForLeftEdgePageX",value:function(e){var t;return"rl"!=this.br.pageProgression?(t=this.br.twoPage.currentIndexL-10*(ge(this.leafEdgeL).offset().left+ge(this.leafEdgeL).width()-e),t=(0,i.clamp)(Math.round(t),this.br.firstDisplayableIndex(),this.br.twoPage.currentIndexL-2)):(t=this.br.twoPage.currentIndexL+10*(ge(this.leafEdgeL).offset().left+ge(this.leafEdgeL).width()-e),t=(0,i.clamp)(Math.round(t),this.br.twoPage.currentIndexL+2,this.br.lastDisplayableIndex()))}},{key:"jumpIndexForRightEdgePageX",value:function(e){var t;return"rl"!=this.br.pageProgression?(t=this.br.twoPage.currentIndexL+10*(e-ge(this.leafEdgeR).offset().left),t=(0,i.clamp)(Math.round(t),this.br.twoPage.currentIndexL+2,this.br.lastDisplayableIndex())):(t=this.br.twoPage.currentIndexL-10*(e-ge(this.leafEdgeR).offset().left),t=(0,i.clamp)(Math.round(t),this.br.firstDisplayableIndex(),this.br.twoPage.currentIndexL-2))}},{key:"prefetch",value:function(){for(var e=Math.max,t=Math.min,n=this.book,i=this.br.twoPage,r=i.currentIndexL,o=i.currentIndexR,a=n.getPage(e(0,t(r,o))),s=n.getPage(e(r,o)),u=0;u<4;u++)a&&(this.createPageContainer(a.index),a=a.findPrev({combineConsecutiveUnviewables:!0})),s&&(this.createPageContainer(s.index),s=s.findNext({combineConsecutiveUnviewables:!0}))}},{key:"baseLeafCss",get:function(){return{position:"absolute",right:"",top:"".concat(this.top(),"px"),zIndex:2}}},{key:"heightCss",get:function(){return{height:"".concat(this.br.twoPage.height,"px")}}},{key:"leftLeafCss",get:function(){return me(me(me({},this.baseLeafCss),this.heightCss),{},{left:"".concat(this.br.twoPage.gutter-this.br.twoPage.scaledWL,"px"),width:"".concat(this.br.twoPage.scaledWL,"px")})}},{key:"leafEdgeLCss",get:function(){return me(me({},this.heightCss),{},{width:"".concat(this.br.twoPage.leafEdgeWidthL,"px"),left:"".concat(this.br.twoPage.bookCoverDivLeft+this.br.twoPage.coverInternalPadding,"px"),top:"".concat(this.br.twoPage.bookCoverDivTop+this.br.twoPage.coverInternalPadding,"px"),border:0===this.br.twoPage.leafEdgeWidthL?"none":null})}},{key:"rightLeafCss",get:function(){return me(me(me({},this.baseLeafCss),this.heightCss),{},{left:"".concat(this.br.twoPage.gutter,"px"),width:"".concat(this.br.twoPage.scaledWR,"px")})}},{key:"leafEdgeRCss",get:function(){return me(me({},this.heightCss),{},{width:"".concat(this.br.twoPage.leafEdgeWidthR,"px"),left:"".concat(this.br.twoPage.scaledWL+this.br.twoPage.scaledWR+this.br.twoPage.leafEdgeWidthL,"px"),top:"".concat(this.br.twoPage.bookCoverDivTop+this.br.twoPage.coverInternalPadding,"px"),border:0===this.br.twoPage.leafEdgeWidthR?"none":null})}},{key:"mainContainerCss",get:function(){return{height:"".concat(this.br.twoPage.totalHeight,"px"),width:"".concat(this.br.twoPage.totalWidth,"px"),position:"absolute"}}},{key:"spreadCoverCss",get:function(){return{width:"".concat(this.br.twoPage.bookCoverDivWidth,"px"),height:"".concat(this.br.twoPage.bookCoverDivHeight,"px"),visibility:"visible"}}},{key:"spineCss",get:function(){return{width:"".concat(this.br.twoPage.bookSpineDivWidth,"px"),height:"".concat(this.br.twoPage.bookSpineDivHeight,"px"),left:"".concat(this.br.twoPage.gutter-this.br.twoPage.bookSpineDivWidth/2,"px"),top:"".concat(this.br.twoPage.bookSpineDivTop,"px")}}}])&&ye(t.prototype,n),e}(),_e=n(3609);function xe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ke(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Ce=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=t,this.book=n}var t,n;return t=e,(n=[{key:"drawLeafs",value:function(e){var t,n,r,a=this,s=Math.floor,u=this.book,c=this.br.refs.$brContainer.prop("scrollWidth")-20,l=0,h=0,d=0,p=0,f=0,g=[],v=xe(u.pagesIterator({combineConsecutiveUnviewables:!0}));try{for(v.s();!(r=v.n()).done;){var m=r.value,b=this.br.thumbWidth;l+(b+this.br.thumbPadding)>c&&(p++,l=0,f=0),g[p]||(g[p]={}),g[p].leafs||(g[p].leafs=[],g[p].height=0,g[p].top=0),g[p].leafs[f]={num:m.index,left:l},(t=s(m.height*this.br.thumbWidth/m.width))>g[p].height&&(g[p].height=t),0===f&&(h+=this.br.thumbPadding+g[p].height),(l+=b+this.br.thumbPadding)>d&&(d=l),f++,m.index==e&&(n=h-this.br.thumbPadding-g[p].height)}}catch(e){v.e(e)}finally{v.f()}this.br.refs.$brPageViewEl.height(h);var y=s((this.br.refs.$brContainer.prop("scrollWidth")-d)/2)-14;void 0!==n&&this.br.refs.$brContainer.scrollTop(n);for(var w=this.br.refs.$brContainer.prop("scrollTop"),_=w+this.br.refs.$brContainer.height(),x=0,P=0,k=[],C=[],S=u.getNumLeafs()-1,T=0,E=0;E<g.length;E++)g[E]&&(P+=this.br.thumbPadding+g[E].height,(x>=w&&x<=_||P>=w&&P<=_||x<=w&&P>=_)&&(k.push(E),g[E].leafs[0].num<S&&(S=g[E].leafs[0].num),g[E].leafs[g[E].leafs.length-1].num>T&&(T=g[E].leafs[g[E].leafs.length-1].num)),x>g[E].top&&(g[E].top=x),x=P);for(var I=k[0],R=k[k.length-1],M=1;M<this.br.thumbRowBuffer+1;M++)R+M<g.length&&k.push(R+M);for(var L=1;L<this.br.thumbRowBuffer;L++)I-L>=0&&k.push(I-L);k.sort();for(var O=0,N=k;O<N.length;O++){var A=N[O];if((0,i.notInArray)(A,this.br.displayedRows)){if(!g[A])continue;var D,B=xe(g[A].leafs);try{var U=function(){var e=D.value,t=e.num,n=e.left,i=a.br.thumbWidth,r=s(u.getPageHeight(t)*a.br.thumbWidth/u.getPageWidth(t)),l=g[A].top,h=n+y;"rl"==a.br.pageProgression&&(h=c-i-h),h+=a.br.thumbPadding,C.push(t);var d=s(u.getPageWidth(t)/a.br.thumbWidth),p=2*Math.round(d/2),f=a.br._createPageContainer(t).update({dimensions:{width:i,height:r,top:l,left:h},reduce:p});f.$container.data("leaf",t).on("mouseup",(function(e){a.br.updateFirstIndex(t,{suppressFragmentChange:!0}),a.br.switchMode(a.br.constMode1up,{suppressFragmentChange:!0});var n=a.br.viewModeOrder.shift();a.br.viewModeOrder.push(n),a.br.updateViewModeButton(_e(".viewmode"),"twopg","Two-page view"),a.br.trigger(o.fragmentChange),e.stopPropagation()})),a.br.refs.$brPageViewEl.append(f.$container)};for(B.s();!(D=B.n()).done;)U()}catch(e){B.e(e)}finally{B.f()}}}var F,j=xe(this.br.displayedRows);try{for(j.s();!(F=j.n()).done;){var $=F.value;if((0,i.notInArray)($,k)){var W,z,V=xe(null===(W=g[$])||void 0===W?void 0:W.leafs);try{for(V.s();!(z=V.n()).done;){var H,q=z.value.num;null!=C&&C.includes(q)||null===(H=this.br.$(".pagediv".concat(q)))||void 0===H||H.remove()}}catch(e){V.e(e)}finally{V.f()}}}}catch(e){j.e(e)}finally{j.f()}var X=this.br.currentIndex();X<S?this.br.updateFirstIndex(S):X>T&&this.br.updateFirstIndex(T),this.br.displayedRows=k.slice(),this.br.$(".BRpagedivthumb_highlight").removeClass("BRpagedivthumb_highlight"),this.br.$(".pagediv"+this.br.currentIndex()).addClass("BRpagedivthumb_highlight"),this.br.updateToolbarZoom(this.br.reduce)}},{key:"lazyLoadImage",value:function(e){var t=_e(e).data("leaf"),n=_e(e).data("reduce"),i=this.br.imageCache.image(t,n),r=_e(e).parent();_e(r).append(i),_e(e).remove()}},{key:"zoom",value:function(e){var t=this.br.thumbColumns;switch(e){case-1:this.br.thumbColumns+=1;break;case 1:this.br.thumbColumns-=1}this.br.thumbColumns=(0,i.clamp)(this.br.thumbColumns,2,8),this.br.thumbColumns!=t&&(this.br.displayedRows=[],this.prepare())}},{key:"getThumbnailWidth",value:function(e){var t=(e+1)*this.br.thumbPadding,n=(this.br.refs.$brPageViewEl.width()-t)/(e+.5),i=Math.floor(n);return i>0?i:100}},{key:"prepare",value:function(){this.br.refs.$brContainer.empty(),this.br.refs.$brContainer.css({overflowY:"scroll",overflowX:"auto"}),this.br.refs.$brPageViewEl=_e("<div class='BRpageview'></div>"),this.br.refs.$brContainer.append(this.br.refs.$brPageViewEl),this.br.refs.$brContainer.dragscrollable({preventDefault:!0}),this.br.bindGestures(this.br.refs.$brContainer),this.br.thumbWidth=this.getThumbnailWidth(this.br.thumbColumns),this.br.reduce=this.book.getPageWidth(0)/this.br.thumbWidth,this.br.displayedRows=[],this.drawLeafs(this.br.currentIndex()),this.br.updateBrClasses()}},{key:"jumpToIndex",value:function(e){for(var t=this,n=Math.floor,i=this.book,r=this.br.refs.$brContainer.prop("scrollWidth")-20,o=this.br.thumbWidth,a=0,s=0,u=0,c=0,l=0,h=0;h<=e;h++){s+(o+this.br.thumbPadding)>r&&(s=0,c=0,l=0);var d=n(i.getPageHeight(l)*this.br.thumbWidth/i.getPageWidth(l));d>c&&(c=d),0==l&&(a=u,u+=this.br.thumbPadding+c),s+=o+this.br.thumbPadding,l++}this.br.updateFirstIndex(e),this.br.refs.$brContainer.prop("scrollTop")==a?this.br.drawLeafs():(this.br.animating=!0,this.br.refs.$brContainer.stop(!0).animate({scrollTop:a},"fast",(function(){t.br.animating=!1})))}}])&&ke(t.prototype,n),e}(),Se=(n(4914),{floor:Math.floor,decr:function(e){return e-1}}),Te={floor:function(e){return Math.pow(2,Math.floor(Math.log2(Math.max(1,e))))},decr:function(e){return Math.pow(2,Math.log2(e)-1)}},Ee={pow2:Te,integer:Se},Ie=n(3609);function Re(e){return function(e){if(Array.isArray(e))return Me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Me(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Ne=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.useSrcSet,r=void 0!==i&&i,o=n.reduceSet,a=void 0===o?Te:o;Le(this,e),this.book=t,this.useSrcSet=r,this.reduceSet=a,this.cache={},this.defaultScale=8}var t,n;return t=e,(n=[{key:"image",value:function(e,t){var n=(this.cache[e]||[]).filter((function(e){return e.loaded&&e.reduce<=t}));if(n.length){var i=Math.max.apply(Math,Re(n.map((function(e){return e.reduce}))));return this._serveImageElement(e,i)}return this._serveImageElement(e,t)}},{key:"imageLoaded",value:function(e,t){var n,i,r=null===(n=this.cache[e])||void 0===n?void 0:n.find((function(e){return e.reduce<=t}));return null!==(i=null==r?void 0:r.loaded)&&void 0!==i&&i}},{key:"getBestLoadedReduce",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,i=(null===(t=this.cache[e])||void 0===t?void 0:t.filter((function(e){return e.loaded})))||[];if(!i.length)return null;var r=i.filter((function(e){return e.reduce>=n}));if(r.length)return Math.min.apply(Math,Re(r.map((function(e){return e.reduce}))));var o=i.filter((function(e){return e.reduce<n}));return Math.max.apply(Math,Re(o.map((function(e){return e.reduce}))))}},{key:"_serveImageElement",value:function(e,t){var n,i=this.reduceSet.floor(t),r=null===(n=this.cache[e])||void 0===n?void 0:n.find((function(e){return e.reduce==i}));r||(r={reduce:i,loaded:!1},(this.cache[e]||(this.cache[e]=[])).push(r));var o=this.book.getPage(e),a=Ie("<img />",{class:"BRpageimage",alt:"Book page image",src:o.getURI(i,0)}).data("reduce",i);return this.useSrcSet&&a.attr("srcset",o.getURISrcSet(i)),r.loaded||a.one("load",(function(){return r.loaded=!0})),a}}])&&Oe(t.prototype,n),e}(),Ae=n(9860),De=n(3609),Be=n(3609);function Ue(e,t,n,i,r,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function Fe(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){Ue(o,i,r,a,s,"next",e)}function s(e){Ue(o,i,r,a,s,"throw",e)}a(void 0)}))}}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function $e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Be.extend(!0,{},$e.defaultOptions,e,$e.optionOverrides);this.setup(t)}function We(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,o=function(e){return e.br},a=function(e){return e._overrideable[t]};r(e,n,o,$e,i,a)}-1!=location.toString().indexOf("_debugShowConsole=true")&&De((function(){return(new h.E).init()})),$e.version="5.0.0-18",$e.constMode1up=1,$e.constMode2up=2,$e.constModeThumb=3,$e.imageCache=null,$e.constNavAnimationDuration=300,$e.constResizeAnimationDuration=100,$e.eventNames=o,$e.defaultOptions=l,$e.optionOverrides={},$e.prototype.setup=function(e){this.options=e,this.numLeafs=void 0,this.enableSearch=!1,this.viewModeOrder=[],this.suppressFragmentChange=!1,this.animationFinishedCallback=null,this.constMode1up=$e.constMode1up,this.constMode2up=$e.constMode2up,this.constModeThumb=$e.constModeThumb,this.reduce=8,this.defaults=e.defaults,this.padding=e.padding,this.reduceSet=Ee[e.reduceSet],this.reduceSet||(console.warn("Invalid reduceSet ".concat(e.reduceSet,". Ignoring.")),this.reduceSet=Ee[l.reduceSet]),this.mode=null,this.prevReadMode=null,this.ui=e.ui,this.uiAutoHide=e.uiAutoHide,this.thumbWidth=100,this.thumbRowBuffer=e.thumbRowBuffer,this.thumbColumns=e.thumbColumns,this.thumbMaxLoading=e.thumbMaxLoading,this.thumbPadding=e.thumbPadding,this.displayedRows=[],this.displayedIndices=[],this.imgs={},this.prefetchedImgs={},this.animating=!1,this.flipSpeed=e.flipSpeed,this.flipDelay=e.flipDelay,this.twoPagePopUp=null,this.leafEdgeTmp=null,this.firstIndex=null,this.lastDisplayableIndex2up=null,this.isFullscreenActive=!1,this.lastScroll=null,this.showLogo=e.showLogo,this.logoURL=e.logoURL,this.imagesBaseURL=e.imagesBaseURL,this.reductionFactors=e.reductionFactors,this.onePage=e.onePage,this.twoPage=e.twoPage,this.onePageMinBreakpoint=e.onePageMinBreakpoint,this.bookTitle=e.bookTitle,this.bookUrl=e.bookUrl,this.bookUrlText=e.bookUrlText,this.bookUrlTitle=e.bookUrlTitle,this.titleLeaf=e.titleLeaf,this.metadata=e.metadata,this.thumbnail=e.thumbnail,this.bookUrlMoreInfo=e.bookUrlMoreInfo,this.enableExperimentalControls=e.enableExperimentalControls,this.el=e.el,this.pageProgression=e.pageProgression,this.protected=e.protected,this.getEmbedCode=e.getEmbedCode,this.popup=null,this.data=e.data,e.getNumLeafs&&($e.prototype.getNumLeafs=e.getNumLeafs),e.getPageWidth&&($e.prototype.getPageWidth=e.getPageWidth),e.getPageHeight&&($e.prototype.getPageHeight=e.getPageHeight),e.getPageURI&&($e.prototype.getPageURI=e.getPageURI),e.getPageSide&&($e.prototype.getPageSide=e.getPageSide),e.getPageNum&&($e.prototype.getPageNum=e.getPageNum),e.getPageProp&&($e.prototype.getPageProp=e.getPageProp),e.getSpreadIndices&&($e.prototype.getSpreadIndices=e.getSpreadIndices),e.leafNumToIndex&&($e.prototype.leafNumToIndex=e.leafNumToIndex),this.refs={},this._models={book:new k(this)},this._components={navbar:new u(this),toolbar:new g(this)},this._modes={mode1Up:new fe(this,this._models.book),mode2Up:new we(this,this._models.book),modeThumb:new Ce(this,this._models.book)},this._overrideable={"_models.book":this._models.book,"_components.navbar":this._components.navbar,"_components.toolbar":this._components.toolbar,"_modes.mode1Up":this._modes.mode1Up,"_modes.mode2Up":this._modes.mode2Up,"_modes.modeThumb":this._modes.modeThumb},this.imageCache=new Ne(this._models.book,{useSrcSet:this.options.useSrcSet,reduceSet:this.reduceSet})},$e.prototype.getActivePageContainerElements=function(){var e=Object.values(this._modes.mode2Up.pageContainers).map((function(e){return e.$container[0]})).concat(Object.values(this._modes.mode1Up.mode1UpLit.pageContainerCache).map((function(e){return e.$container[0]})));return this.mode==this.constModeThumb&&(e=e.concat(this.$(".BRpagecontainer").toArray())),e},$e.prototype.getActivePageContainerElementsForIndex=function(e){var t,n,i,r,o;return[null===(t=this._modes.mode2Up.pageContainers[e])||void 0===t||null===(n=t.$container)||void 0===n?void 0:n[0],null===(i=this._modes.mode1Up.mode1UpLit.pageContainerCache[e])||void 0===i||null===(r=i.$container)||void 0===r?void 0:r[0]].concat((o=this.mode==this.constModeThumb?this.$(".pagediv".concat(e)).toArray():[],function(e){if(Array.isArray(e))return je(e)}(o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e,t){if(e){if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?je(e,t):void 0}}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())).filter((function(e){return e}))},Object.defineProperty($e.prototype,"activeMode",{get:function(){return{1:this._modes.mode1Up,2:this._modes.mode2Up,3:this._modes.modeThumb}[this.mode]}}),Object.defineProperty($e.prototype,"leafEdgeL",{get:function(){return this._modes.mode2Up.leafEdgeL},set:function(e){this._modes.mode2Up.leafEdgeL=e}}),Object.defineProperty($e.prototype,"leafEdgeR",{get:function(){return this._modes.mode2Up.leafEdgeR},set:function(e){this._modes.mode2Up.leafEdgeR=e}}),$e.util=i,$e.prototype.extendParams=function(e,t){var n=De.extend({},t);if(void 0!==n.page){var i=this._models.book.parsePageString(n.page);isNaN(i)||(n.index=i),delete n.page}De.extend(e,n)},$e.prototype.initParams=function(){var e={init:!0,pageFound:!1,fragmentChange:!1};if(void 0!==this.titleLeaf&&this._models.book.getNumLeafs()>2?e.index=this._models.book.leafNumToIndex(this.titleLeaf):e.index=0,this.defaults){var t=this.paramsFromFragment(this.defaults);void 0!==t.page&&(e.pageFound=!0),this.extendParams(e,t)}if(this.options.enablePageResume){var n=this.getResumeValue();null!==n&&(e.index!==n&&(e.fragmentChange=!0),e.index=n)}if(this.options.enableUrlPlugin){var r=this.paramsFromFragment(this.urlReadFragment());!Object.keys(r).length&&this.urlReadHashFragment()&&"history"===this.options.urlMode&&(r=this.paramsFromFragment(this.urlReadHashFragment())),Object.keys(r).length&&(void 0!==r.page&&(e.pageFound=!0),this.extendParams(e,r),e.fragmentChange=!0)}if(this.options.enableSearch&&(this.options.goToFirstResult=!e.pageFound,!this.options.initialSearchTerm))if(e.search)this.options.initialSearchTerm=e.search,this.searchTerm=e.search;else{var o=new URLSearchParams(this.readQueryString()).get("q");o&&(this.options.initialSearchTerm=i.decodeURIComponentPlus(o))}return this.suppressFragmentChange=!e.fragmentChange,e},$e.prototype.getLocationSearch=function(){return window.location.search},$e.prototype.getLocationHash=function(){return window.location.hash},$e.prototype.readQueryString=function(){var e=this.getLocationSearch();if(e)return e;var t=this.getLocationHash(),n=t.search(/\?\w+=/);return n>-1?t.slice(n):""},$e.prototype.getInitialMode=function(e){var t,n=De(window).width();return t=void 0!==e.mode?e.mode:"full"==this.ui&&this.enableMobileNav&&this.isFullscreenActive&&n<=this.onePageMinBreakpoint?this.constMode1up:this.constMode2up,this.canSwitchToMode(t)||(t=this.constMode1up),t},$e.prototype.init=function(){this.init.initComplete=!1,this.pageScale=this.reduce;var e=this.initParams();this.firstIndex=e.index?e.index:0,this.isTouchDevice=!!("ontouchstart"in window)||!!("msmaxtouchpoints"in window.navigator),this.refs.$br=De(this.el).empty().removeClass().addClass("ui-"+this.ui).addClass("br-ui-"+this.ui).addClass("BookReader"),this.isTouchDevice?this.refs.$br.addClass("touch"):this.refs.$br.addClass("no-touch"),this.refs.$brContainer=De("<div class='BRcontainer' dir='ltr'></div>"),this.refs.$br.append(this.refs.$brContainer),e.mode=this.getInitialMode(e),this.mode=e.mode,"embed"==this.ui&&this.options.showNavbar?this.initEmbedNavbar():(this.options.showToolbar&&this.initToolbar(this.mode,this.ui),this.options.showNavbar&&this.initNavbar()),this.switchNavbarControls(),this.resizeBRcontainer(),this.updateFromParams(e),this.initUIStrings(),this.bindNavigationHandlers(),this.setupKeyListeners(),this.lastScroll=(new Date).getTime(),this.refs.$brContainer.bind("scroll",this,(function(e){e.data.lastScroll=(new Date).getTime(),e.data.constModeThumb==e.data.mode&&e.data.drawLeafsThrottled()})),this.options.autoResize&&(De(window).bind("resize",this,(function(e){e.data.resize()})),De(window).on("orientationchange",this,function(e){e.data.resize()}.bind(this))),this.protected&&this.$(".BRicon.share").hide(),this.options.initialSearchTerm||(this.suppressFragmentChange=!1),this.init.initComplete=!0,this.trigger($e.eventNames.PostInit),this.options.startFullscreen&&this.toggleFullscreen()},$e.prototype.trigger=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n="BookReader:"+e;De(document).trigger(n,t),i.polyfillCustomEvent(window),window.dispatchEvent(new CustomEvent(n,{bubbles:!0,composed:!0,detail:{props:t}}))},$e.prototype.bind=function(e,t){De(document).bind("BookReader:"+e,t)},$e.prototype.unbind=function(e,t){De(document).unbind("BookReader:"+e,t)},$e.prototype.resize=function(){if(this.init.initComplete){if(this.resizeBRcontainer(),this.switchNavbarControls(),this.constMode1up==this.mode)"none"!=this.onePage.autofit?(this.resizePageView1up(),this.centerPageView()):(this.centerPageView(),this.displayedIndices=[],this.drawLeafsThrottled());else if(this.constModeThumb==this.mode)this.prepareThumbnailView();else if(this.twoPage.autofit)this.prepareTwoPageView();else{var e=this.twoPageGetViewCenter(),t=!1;this.twoPage.totalWidth<this.refs.$brContainer.prop("clientWidth")&&(e.percentageX=.5,t=!0),this.twoPage.totalHeight<this.refs.$brContainer.prop("clientHeight")&&(e.percentageY=.5,t=!0),t&&this.twoPageCenterView(e.percentageX,e.percentageY)}this.trigger($e.eventNames.resize)}},$e.prototype.setupKeyListeners=function(){var e=this;De(document).keydown((function(t){switch(t.keyCode){case 33:case 38:i.isInputActive()||e.constMode2up!=e.mode||(t.preventDefault(),e.prev());break;case 40:case 34:i.isInputActive()||e.constMode2up!=e.mode||(t.preventDefault(),e.next());break;case 35:i.isInputActive()||(t.preventDefault(),e.last());break;case 36:i.isInputActive()||(t.preventDefault(),e.first());break;case 37:i.isInputActive()||e.constModeThumb==e.mode||(t.preventDefault(),e.left());break;case 39:i.isInputActive()||e.constModeThumb==e.mode||(t.preventDefault(),e.right());break;case 189:case 173:case 109:i.isInputActive()||(t.preventDefault(),e.zoom(-1));break;case 187:case 61:case 107:i.isInputActive()||(t.preventDefault(),e.zoom(1))}}))},$e.prototype.drawLeafs=function(){this.constMode1up==this.mode||(this.constModeThumb==this.mode?this.drawLeafsThumbnail():this.drawLeafsTwoPage())},$e.prototype._createPageContainer=function(e){return new Ae._z(this._models.book.getPage(e,!1),{isProtected:this.protected,imageCache:this.imageCache,loadingImage:this.imagesBaseURL+"loading.gif"})},$e.prototype.bindGestures=function(e){var t=this,n=1;e.unbind("touchmove").bind("touchmove",(function(e){e.originalEvent.cancelable&&(n=e.originalEvent.touches.length),e.stopPropagation()})),e.unbind("gesturechange").bind("gesturechange",(function(e){e.preventDefault(),2!==n||(new Date).getTime()-t.lastScroll<500||(e.originalEvent.scale>1.5?t.zoom(1):e.originalEvent.scale<.6&&t.zoom(-1))}))},$e.prototype.drawLeafsThumbnail=Ce.prototype.drawLeafs,We(Ce,"_modes.modeThumb","drawLeafs","drawLeafsThumbnail"),$e.prototype.lazyLoadThumbnails=Ce.prototype.lazyLoadThumbnails,We(Ce,"_modes.modeThumb","lazyLoadThumbnails","lazyLoadThumbnails"),$e.prototype.lazyLoadImage=Ce.prototype.lazyLoadImage,We(Ce,"_modes.modeThumb","lazyLoadImage","lazyLoadImage"),$e.prototype.zoomThumb=Ce.prototype.zoom,We(Ce,"_modes.modeThumb","zoom","zoomThumb"),$e.prototype.getThumbnailWidth=Ce.prototype.getThumbnailWidth,We(Ce,"_modes.modeThumb","getThumbnailWidth","getThumbnailWidth"),$e.prototype.prepareThumbnailView=Ce.prototype.prepare,We(Ce,"_modes.modeThumb","prepare","prepareThumbnailView"),$e.prototype.drawLeafsThrottled=i.throttle($e.prototype.drawLeafs,250),$e.prototype.zoom=function(e){var t;switch(this.mode){case this.constMode1up:1==e?this.zoom1up("in"):this.zoom1up("out");break;case this.constMode2up:1==e?this.zoom2up("in"):this.zoom2up("out");break;case this.constModeThumb:this.zoomThumb(e)}null===(t=this.textSelectionPlugin)||void 0===t||t.stopPageFlip(this.refs.$brContainer)},$e.prototype.resizeBRcontainer=function(e){e?this.refs.$brContainer.animate({top:this.getToolBarHeight(),bottom:this.getFooterHeight()},this.constResizeAnimationDuration,"linear"):this.refs.$brContainer.css({top:this.getToolBarHeight(),bottom:this.getFooterHeight()})},$e.prototype.centerPageView=function(){var e=this.refs.$brContainer.prop("scrollWidth"),t=this.refs.$brContainer.prop("clientWidth");e>t&&this.refs.$brContainer.prop("scrollLeft",(e-t)/2)},$e.prototype.quantizeReduce=function(e,t){for(var n=t[0].reduce,i=Math.abs(e-n),r=1;r<t.length;r++){var o=Math.abs(e-t[r].reduce);o<i&&(i=o,n=t[r].reduce)}return n},$e.prototype.nextReduce=function(e,t,n){if("in"===t){for(var i=0,r=1;r<n.length;r++)n[r].reduce<e&&(i=r);return n[i]}if("out"===t){for(var o=n.length-1,a=o,s=o;s>=0;s--)n[s].reduce>e&&(a=s);return n[a]}if("auto"===t){var u=n.find((function(e){return"auto"==e.autofit}));if(u)return u;for(var c=n.filter((function(e){var t=e.autofit;return"height"==t||"width"==t})),l=null,h=0;h<c.length;h++)(null===l||l.reduce<c[h].reduce)&&(l=c[h]);if(l)return l}else if("height"===t||"width"===t){var d=n.find((function(e){return e.autofit==t}));if(d)return d}return n[0]},$e.prototype._reduceSort=function(e,t){return e.reduce-t.reduce},$e.prototype.jumpToPage=function(e){var t=this._models.book.parsePageString(e);return void 0!==t&&(this.jumpToIndex(t),!0)},$e.prototype._isIndexDisplayed=function(e){return this.constMode1up==this.mode?this.displayedIndices.slice(1,-1).includes(e):this.displayedIndices?this.displayedIndices.includes(e):this.currentIndex()==e},$e.prototype.jumpToIndex=function(e,t,n,i){var r=this._models.book.getPage(e);if(!r.isViewable&&r.unviewablesStart!=r.index){var o=this._isIndexDisplayed(r.unviewablesStart)?r.findNext({combineConsecutiveUnviewables:!0}).index:r.unviewablesStart;return this.jumpToIndex(o,t,n,i)}this.trigger($e.eventNames.stop),this.constMode2up==this.mode?this._modes.mode2Up.jumpToIndex(e):this.constModeThumb==this.mode?this._modes.modeThumb.jumpToIndex(e):this._modes.mode1Up.jumpToIndex(e,t,n,i)},$e.prototype.getPrevReadMode=function(e){return e===$e.constMode1up||e===$e.constMode2up?e:null===this.prevReadMode?$e.constMode1up:void 0},$e.prototype.switchMode=function(e){var t,n,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.suppressFragmentChange,a=void 0!==o&&o,s=r.init,u=void 0!==s&&s,c=r.pageFound,l=void 0!==c&&c;if(this.init.initComplete){if(e===this.mode)return;if(!this.canSwitchToMode(e))return}this.trigger($e.eventNames.stop),this.prevReadMode=this.getPrevReadMode(this.mode),this.mode!=e&&(null===(n=(i=this.activeMode).unprepare)||void 0===n||n.call(i)),this.mode=e,this.pageScale!==this.reduce&&(this.reduce=this.pageScale),this.constMode1up==e?this.prepareOnePageView():this.constModeThumb==e?(this.reduce=this.quantizeReduce(this.reduce,this.reductionFactors),this.prepareThumbnailView()):(!u&&l||this.setSpreadIndices(),this.twoPageCalculateReductionFactors(),this.prepareTwoPageView(),this.twoPageCenterView(.5,.5)),this.suppressFragmentChange||a||this.trigger($e.eventNames.fragmentChange);var h=e+"PageViewSelected";this.trigger($e.eventNames[h]),null===(t=this.textSelectionPlugin)||void 0===t||t.stopPageFlip(this.refs.$brContainer)},$e.prototype.updateBrClasses=function(){var e={};e[this.constMode1up]="BRmode1up",e[this.constMode2up]="BRmode2Up",e[this.constModeThumb]="BRmodeThumb",this.refs.$br.removeClass("BRmode1up BRmode2Up BRmodeThumb").addClass(e[this.mode]),this.isFullscreen()?(this.refs.$br.addClass("fullscreenActive"),De(document.body).addClass("BRfullscreenActive")):(this.refs.$br.removeClass("fullscreenActive"),De(document.body).removeClass("BRfullscreenActive"))},$e.prototype.isFullscreen=function(){return this.isFullscreenActive},$e.prototype.toggleFullscreen=Fe(regeneratorRuntime.mark((function e(){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=!(n.length>0&&void 0!==n[0])||n[0],!this.isFullscreen()){e.next=6;break}return e.next=4,this.exitFullScreen();case 4:e.next=8;break;case 6:return e.next=8,this.enterFullscreen(t);case 8:case"end":return e.stop()}}),e,this)}))),$e.prototype.enterFullscreen=Fe(regeneratorRuntime.mark((function e(){var t,n,i,r=this,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!(o.length>0&&void 0!==o[0])||o[0],i=this.currentIndex(),this.refs.$brContainer.css("opacity",0),n&&(this._fullscreenCloseHandler=function(e){27===e.keyCode&&r.toggleFullscreen()},De(document).keyup(this._fullscreenCloseHandler)),De(window).width()<=this.onePageMinBreakpoint&&this.switchMode(this.constMode1up),this.isFullscreenActive=!0,this.animating=!0,e.next=10,new Promise((function(e){return r.refs.$brContainer.animate({opacity:1},"fast","linear",e)}));case 10:if(this.resize(),!(this.activeMode instanceof fe)){e.next=15;break}return this.activeMode.mode1UpLit.scale=this.activeMode.mode1UpLit.computeDefaultScale(this._models.book.getPage(i)),e.next=15,this.activeMode.mode1UpLit.requestUpdate();case 15:this.jumpToIndex(i),this.animating=!1,null===(t=this.textSelectionPlugin)||void 0===t||t.stopPageFlip(this.refs.$brContainer),this.trigger($e.eventNames.fullscreenToggled);case 19:case"end":return e.stop()}}),e,this)}))),$e.prototype.exitFullScreen=Fe(regeneratorRuntime.mark((function e(){var t,n,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.refs.$brContainer.css("opacity",0),De(document).unbind("keyup",this._fullscreenCloseHandler),n=De(window).width(),this.options.controls.twoPage.visible&&n<=this.onePageMinBreakpoint&&this.switchMode(this.constMode2up),this.isFullscreenActive=!1,this.updateBrClasses(),this.animating=!0,e.next=10,new Promise((function(e){return i.refs.$brContainer.animate({opacity:1},"fast","linear",e)}));case 10:if(this.resize(),!(this.activeMode instanceof fe)){e.next=15;break}return this.activeMode.mode1UpLit.scale=this.activeMode.mode1UpLit.computeDefaultScale(this._models.book.getPage(this.currentIndex())),e.next=15,this.activeMode.mode1UpLit.requestUpdate();case 15:this.animating=!1,null===(t=this.textSelectionPlugin)||void 0===t||t.stopPageFlip(this.refs.$brContainer),this.trigger($e.eventNames.fullscreenToggled);case 18:case"end":return e.stop()}}),e,this)}))),$e.prototype.currentIndex=function(){if(this.mode==this.constMode1up||this.mode==this.constModeThumb)return this.firstIndex;if(this.mode==this.constMode2up)return i.clamp(this.firstIndex,0,this._models.book.getNumLeafs()-1);throw"currentIndex called for unimplemented mode "+this.mode},$e.prototype.updateFirstIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.suppressFragmentChange,i=void 0!==n&&n;this.firstIndex!==e&&(this.firstIndex=e,this.suppressFragmentChange||i||this.trigger($e.eventNames.fragmentChange),this.options.initialSearchTerm&&!i&&(this.suppressFragmentChange=!1),this.trigger("pageChanged"),this.updateNavIndexThrottled(e))},$e.prototype.right=function(){"rl"!=this.pageProgression?this.next():this.prev()},$e.prototype.rightmost=function(){"rl"!=this.pageProgression?this.last():this.first()},$e.prototype.left=function(){"rl"!=this.pageProgression?this.prev():this.next()},$e.prototype.leftmost=function(){"rl"!=this.pageProgression?this.first():this.last()},$e.prototype.next=function(){this.constMode2up==this.mode?(this.trigger($e.eventNames.stop),this.flipFwdToIndex(null)):this.firstIndex<this.lastDisplayableIndex()&&this.jumpToIndex(this.firstIndex+1)},$e.prototype.prev=function(){this.firstIndex<1||(this.constMode2up==this.mode?(this.trigger($e.eventNames.stop),this.flipBackToIndex(null)):this.firstIndex>=1&&this.jumpToIndex(this.firstIndex-1))},$e.prototype.first=function(){this.jumpToIndex(this.firstDisplayableIndex())},$e.prototype.last=function(){this.jumpToIndex(this.lastDisplayableIndex())},$e.prototype.scrollDown=function(){return De.inArray(this.mode,[this.constMode1up,this.constModeThumb])>=0&&(this.mode==this.constMode1up&&this.reduce>=this.onePageGetAutofitHeight()?this.next():(this.refs.$brContainer.stop(!0).animate({scrollTop:"+="+this._scrollAmount()+"px"},400,"easeInOutExpo"),!0))},$e.prototype.scrollUp=function(){return De.inArray(this.mode,[this.constMode1up,this.constModeThumb])>=0&&(this.mode==this.constMode1up&&this.reduce>=this.onePageGetAutofitHeight()?this.prev():(this.refs.$brContainer.stop(!0).animate({scrollTop:"-="+this._scrollAmount()+"px"},400,"easeInOutExpo"),!0))},$e.prototype._scrollAmount=function(){return this.constMode1up==this.mode?parseInt(this.refs.$brContainer.prop("clientHeight")-this._models.book.getPageHeight(this.currentIndex())/this.reduce*.03):parseInt(.9*this.refs.$brContainer.prop("clientHeight"))},$e.prototype.prefetchImg=function(){var e=Fe(regeneratorRuntime.mark((function e(t){var n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.length>1&&void 0!==n[1]&&n[1],console.warn("Call to deprecated function: BookReader.prefetchImg. No-op.");case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$e.prototype.pruneUnusedImgs=function(){console.warn("Call to deprecated function: BookReader.pruneUnused. No-op.")},$e.prototype.prepareOnePageView=fe.prototype.prepare,We(fe,"_modes.mode1Up","prepare","prepareOnePageView"),$e.prototype.zoom1up=fe.prototype.zoom,We(fe,"_modes.mode1Up","zoom","zoom1up"),$e.prototype.resizePageView1up=fe.prototype.resizePageView,We(fe,"_modes.mode1Up","resizePageView","resizePageView1up"),$e.prototype.onePageCalculateViewDimensions=fe.prototype.calculateViewDimensions,We(fe,"_modes.mode1Up","calculateViewDimensions","onePageCalculateViewDimensions"),$e.prototype.zoom2up=we.prototype.zoom,We(we,"_modes.mode2Up","zoom","zoom2up"),$e.prototype.twoPageGetAutofitReduce=we.prototype.getAutofitReduce,We(we,"_modes.mode2Up","getAutofitReduce","twoPageGetAutofitReduce"),$e.prototype.flipBackToIndex=we.prototype.flipBackToIndex,We(we,"_modes.mode2Up","flipBackToIndex","flipBackToIndex"),$e.prototype.flipFwdToIndex=we.prototype.flipFwdToIndex,We(we,"_modes.mode2Up","flipFwdToIndex","flipFwdToIndex"),$e.prototype.setHilightCss2UP=we.prototype.setHilightCss,We(we,"_modes.mode2Up","setHilightCss","setHilightCss2UP"),$e.prototype.drawLeafsTwoPage=we.prototype.drawLeafs,We(we,"_modes.mode2Up","drawLeafs","drawLeafsTwoPage"),$e.prototype.prepareTwoPageView=we.prototype.prepareTwoPageView,We(we,"_modes.mode2Up","prepareTwoPageView","prepareTwoPageView"),$e.prototype.prepareTwoPagePopUp=we.prototype.preparePopUp,We(we,"_modes.mode2Up","preparePopUp","prepareTwoPagePopUp"),$e.prototype.calculateSpreadSize=we.prototype.calculateSpreadSize,We(we,"_modes.mode2Up","calculateSpreadSize","calculateSpreadSize"),$e.prototype.getIdealSpreadSize=we.prototype.getIdealSpreadSize,We(we,"_modes.mode2Up","getIdealSpreadSize","getIdealSpreadSize"),$e.prototype.getSpreadSizeFromReduce=we.prototype.getSpreadSizeFromReduce,We(we,"_modes.mode2Up","getSpreadSizeFromReduce","getSpreadSizeFromReduce"),$e.prototype.twoPageIsZoomedIn=we.prototype.isZoomedIn,We(we,"_modes.mode2Up","isZoomedIn","twoPageIsZoomedIn"),$e.prototype.twoPageCalculateReductionFactors=we.prototype.calculateReductionFactors,We(we,"_modes.mode2Up","calculateReductionFactors","twoPageCalculateReductionFactors"),$e.prototype.twoPageSetCursor=we.prototype.setCursor,We(we,"_modes.mode2Up","setCursor","twoPageSetCursor"),$e.prototype.flipLeftToRight=we.prototype.flipLeftToRight,We(we,"_modes.mode2Up","flipLeftToRight","flipLeftToRight"),$e.prototype.flipRightToLeft=we.prototype.flipRightToLeft,We(we,"_modes.mode2Up","flipRightToLeft","flipRightToLeft"),$e.prototype.prepareFlipLeftToRight=we.prototype.prepareFlipLeftToRight,We(we,"_modes.mode2Up","prepareFlipLeftToRight","prepareFlipLeftToRight"),$e.prototype.prepareFlipRightToLeft=we.prototype.prepareFlipRightToLeft,We(we,"_modes.mode2Up","prepareFlipRightToLeft","prepareFlipRightToLeft"),$e.prototype.getPageWidth2UP=we.prototype.getPageWidth,We(we,"_modes.mode2Up","getPageWidth","getPageWidth2UP"),$e.prototype.twoPageGutter=we.prototype.gutter,We(we,"_modes.mode2Up","gutter","twoPageGutter"),$e.prototype.twoPageTop=we.prototype.top,We(we,"_modes.mode2Up","top","twoPageTop"),$e.prototype.twoPageCoverWidth=we.prototype.coverWidth,We(we,"_modes.mode2Up","coverWidth","twoPageCoverWidth"),$e.prototype.twoPageGetViewCenter=we.prototype.getViewCenter,We(we,"_modes.mode2Up","getViewCenter","twoPageGetViewCenter"),$e.prototype.twoPageCenterView=we.prototype.centerView,We(we,"_modes.mode2Up","centerView","twoPageCenterView"),$e.prototype.twoPageFlipAreaHeight=we.prototype.flipAreaHeight,We(we,"_modes.mode2Up","flipAreaHeight","twoPageFlipAreaHeight"),$e.prototype.twoPageFlipAreaWidth=we.prototype.flipAreaWidth,We(we,"_modes.mode2Up","flipAreaWidth","twoPageFlipAreaWidth"),$e.prototype.twoPageFlipAreaTop=we.prototype.flipAreaTop,We(we,"_modes.mode2Up","flipAreaTop","twoPageFlipAreaTop"),$e.prototype.twoPageLeftFlipAreaLeft=we.prototype.leftFlipAreaLeft,We(we,"_modes.mode2Up","leftFlipAreaLeft","twoPageLeftFlipAreaLeft"),$e.prototype.twoPageRightFlipAreaLeft=we.prototype.rightFlipAreaLeft,We(we,"_modes.mode2Up","rightFlipAreaLeft","twoPageRightFlipAreaLeft"),$e.prototype.gutterOffsetForIndex=we.prototype.gutterOffsetForIndex,We(we,"_modes.mode2Up","gutterOffsetForIndex","gutterOffsetForIndex"),$e.prototype.leafEdgeWidth=we.prototype.leafEdgeWidth,We(we,"_modes.mode2Up","leafEdgeWidth","leafEdgeWidth"),$e.prototype.jumpIndexForLeftEdgePageX=we.prototype.jumpIndexForLeftEdgePageX,We(we,"_modes.mode2Up","jumpIndexForLeftEdgePageX","jumpIndexForLeftEdgePageX"),$e.prototype.jumpIndexForRightEdgePageX=we.prototype.jumpIndexForRightEdgePageX,We(we,"_modes.mode2Up","jumpIndexForRightEdgePageX","jumpIndexForRightEdgePageX"),$e.prototype.prefetch=we.prototype.prefetch,We(we,"_modes.mode2Up","prefetch","prefetch"),$e.prototype.setSpreadIndices=we.prototype.setSpreadIndices,We(we,"_modes.mode2Up","setSpreadIndices","setSpreadIndices"),$e.prototype.stopFlipAnimations=function(){this.trigger($e.eventNames.stop),this.leafEdgeTmp&&De(this.leafEdgeTmp).stop(!1,!0),Be.each(this._modes.mode2Up.pageContainers,(function(){De(this.$container).stop(!1,!0)})),this.leafEdgeTmp&&De(this.leafEdgeTmp).stop(!1,!0),Be.each(this._modes.mode2Up.pageContainers,(function(){De(this.$container).stop(!1,!0)}))},$e.prototype.initNavbar=u.prototype.init,We(u,"_components.navbar","init","initNavbar"),$e.prototype.switchNavbarControls=u.prototype.switchNavbarControls,We(u,"_components.navbar","switchNavbarControls"),$e.prototype.updateViewModeButton=u.prototype.updateViewModeButton,We(u,"_components.navbar","updateViewModeButton"),$e.prototype.getNavPageNumString=u.prototype.getNavPageNumString,We(u,"_components.navbar","getNavPageNumString"),$e.prototype.initEmbedNavbar=u.prototype.initEmbed,We(u,"_components.navbar","initEmbed","initEmbedNavbar"),$e.prototype.getNavPageNumHtml=c,$e.prototype.updateNavPageNum=u.prototype.updateNavPageNum,We(u,"_components.navbar","updateNavPageNum"),$e.prototype.updateNavIndex=u.prototype.updateNavIndex,We(u,"_components.navbar","updateNavIndex"),$e.prototype.updateNavIndexThrottled=i.throttle($e.prototype.updateNavIndex,250,!1),$e.prototype.updateNavIndexDebounced=i.debounce($e.prototype.updateNavIndex,500,!1),$e.prototype.buildToolbarElement=g.prototype.buildToolbarElement,We(g,"_components.toolbar","buildToolbarElement"),$e.prototype.initToolbar=g.prototype.initToolbar,We(g,"_components.toolbar","initToolbar"),$e.prototype.buildShareDiv=g.prototype.buildShareDiv,We(g,"_components.toolbar","buildShareDiv"),$e.prototype.buildInfoDiv=g.prototype.buildInfoDiv,We(g,"_components.toolbar","buildInfoDiv"),$e.prototype.getToolBarHeight=g.prototype.getToolBarHeight,We(g,"_components.toolbar","getToolBarHeight"),$e.prototype.updateToolbarZoom=g.prototype.updateToolbarZoom,We(g,"_components.toolbar","updateToolbarZoom"),$e.prototype.blankInfoDiv=v,$e.prototype.blankShareDiv=m,$e.prototype.createPopup=b,$e.prototype.bindNavigationHandlers=function(){var e=this,t=this,n=this.$(".BRicon").add(".BRmobileMenu .BRicon"),i={book_left:function(){e.trigger($e.eventNames.stop),e.left()},book_right:function(){e.trigger($e.eventNames.stop),e.right()},book_up:function(){De.inArray(e.mode,[e.constMode1up,e.constModeThumb])>=0?e.scrollUp():e.prev()},book_down:function(){De.inArray(e.mode,[e.constMode1up,e.constModeThumb])>=0?e.scrollDown():e.next()},book_top:this.first.bind(this),book_bottom:this.last.bind(this),book_leftmost:this.leftmost.bind(this),book_rightmost:this.rightmost.bind(this),onepg:function(){e.switchMode(t.constMode1up)},thumb:function(){e.switchMode(t.constModeThumb)},twopg:function(){e.switchMode(t.constMode2up)},zoom_in:function(){e.trigger($e.eventNames.stop),e.zoom(1),e.trigger($e.eventNames.zoomIn)},zoom_out:function(){e.trigger($e.eventNames.stop),e.zoom(-1),e.trigger($e.eventNames.zoomOut)},full:function(){if("embed"==e.ui){var t=e.$(".BRembedreturn a").attr("href");window.open(t)}else e.toggleFullscreen()}};n.filter(".fit").bind("fit",(function(){}));var r=function(e){n.filter(".".concat(e)).on("click.bindNavigationHandlers",(function(){return i[e](),!1}))};for(var o in i)r(o);var a=this.$(".BRnavCntlBtm"),s=this.$(".BRnavCntlTop");this.$(".BRnavCntl").click((function(){var e=[];a.hasClass("BRdn")?(t.refs.$BRtoolbar&&e.push(t.refs.$BRtoolbar.animate({top:-1*t.getToolBarHeight()}).promise()),e.push(t.$(".BRfooter").animate({bottom:-1*t.getFooterHeight()}).promise()),a.addClass("BRup").removeClass("BRdn"),s.addClass("BRdn").removeClass("BRup"),t.$(".BRnavCntlBtm.BRnavCntl").animate({height:"45px"}),t.$(".BRnavCntl").delay(1e3).animate({opacity:.75},1e3)):(t.refs.$BRtoolbar&&e.push(t.refs.$BRtoolbar.animate({top:0}).promise()),e.push(t.$(".BRfooter").animate({bottom:0}).promise()),a.addClass("BRdn").removeClass("BRup"),s.addClass("BRup").removeClass("BRdn"),t.$(".BRnavCntlBtm.BRnavCntl").animate({height:"30px"}),t.$(".BRvavCntl").animate({opacity:1})),De.when.apply(De,e).done((function(){t.mode==t.constMode2up&&null!=t.twoPage.autofit&&"none"!=t.twoPage.autofit||t.mode==t.constMode1up&&null!=t.onePage.autofit&&"none"!=t.onePage.autofit?t.resize():t.resizeBRcontainer()}))})),a.mouseover((function(){De(this).hasClass("BRup")&&t.$(".BRnavCntl").animate({opacity:1},250)})).mouseleave((function(){De(this).hasClass("BRup")&&t.$(".BRnavCntl").animate({opacity:.75},250)})),s.mouseover((function(){De(this).hasClass("BRdn")&&t.$(".BRnavCntl").animate({opacity:1},250)})).mouseleave((function(){De(this).hasClass("BRdn")&&t.$(".BRnavCntl").animate({opacity:.75},250)})),this.initSwipeData(),De(document).off("mousemove.navigation",this.el),De(document).on("mousemove.navigation",this.el,{br:this},this.navigationMousemoveHandler),De(document).off("mousedown.swipe",".BRpageimage"),De(document).on("mousedown.swipe",".BRpageimage",{br:this},this.swipeMousedownHandler),this.bindMozTouchHandlers()},$e.prototype.unbindNavigationHandlers=function(){De(document).off("mousemove.navigation",this.el)},$e.prototype.navigationMousemoveHandler=function(e){if(e.data.br.uiAutoHide){var t=De(document).height()-75;e.pageY<76||e.pageY>t?e.data.br.hideNavigation():e.data.br.showNavigation()}},$e.prototype.initSwipeData=function(e,t){this._swipe={mightBeSwiping:!1,didSwipe:!1,mightBeDraggin:!1,didDrag:!1,startTime:(new Date).getTime(),startX:e,startY:t,lastX:e,lastY:t,deltaX:0,deltaY:0,deltaT:0}},$e.prototype.swipeMousedownHandler=function(e){var t=e.data.br;return 3==e.which?!t.protected:(De(e.target).bind("mouseout.swipe",{br:t},t.swipeMouseupHandler).bind("mouseup.swipe",{br:t},t.swipeMouseupHandler).bind("mousemove.swipe",{br:t},t.swipeMousemoveHandler),t.initSwipeData(e.clientX,e.clientY),t._swipe.mightBeSwiping=!0,t._swipe.mightBeDragging=!0,e.preventDefault(),e.returnValue=!1,e.cancelBubble=!0,!1)},$e.prototype.swipeMousemoveHandler=function(e){var t=e.data.br,n=t._swipe;if(n.mightBeSwiping){n.deltaX=e.clientX-n.startX,n.deltaY=e.clientY-n.startY,n.deltaT=(new Date).getTime()-n.startTime;var i=Math.abs(n.deltaX),r=Math.abs(n.deltaY),o=Math.min(t.refs.$br.width()/5,80);return i>r&&i>o&&n.deltaT<400&&(n.mightBeSwiping=!1,n.didSwipe=!0,t.mode==t.constMode2up&&(n.deltaX<0?t.right():t.left())),n.deltaT>400&&!n.didSwipe&&n.mightBeDragging&&(n.didDrag=!0,t.refs.$brContainer.scrollTop(t.refs.$brContainer.scrollTop()-e.clientY+n.lastY).scrollLeft(t.refs.$brContainer.scrollLeft()-e.clientX+n.lastX)),n.lastX=e.clientX,n.lastY=e.clientY,e.preventDefault(),e.returnValue=!1,e.cancelBubble=!0,!1}},$e.prototype.swipeMouseupHandler=function(e){var t=e.data.br._swipe;return t.mightBeSwiping=!1,t.mightBeDragging=!1,De(e.target).unbind("mouseout.swipe").unbind("mouseup.swipe").unbind("mousemove.swipe"),!t.didSwipe&&!t.didDrag||(e.preventDefault(),e.returnValue=!1,e.cancelBubble=!0,!1)},$e.prototype.bindMozTouchHandlers=function(){var e=this;this.refs.$br.bind("MozTouchDown",(function(t){this.mode==e.constMode2up&&t.preventDefault()})).bind("MozTouchMove",(function(t){this.mode==e.constMode2up&&t.preventDefault()})).bind("MozTouchUp",(function(t){this.mode==e.constMode2up&&t.preventDefault()}))},$e.prototype.navigationIsVisible=function(){return 0==this.refs.$BRtoolbar.position().top},$e.prototype.setNavigationView=function(e){var t=this.constNavAnimationDuration,n="linear",i=function(){this.constMode2up!==this.mode&&this.resizeBRcontainer(!0),this.trigger($e.eventNames.navToggled)}.bind(this),r=0,o=0;e?(r=-1*this.getToolBarHeight(),o=-1*this.getFooterHeight(),this.refs.$BRtoolbar.addClass("js-menu-hide"),this.refs.$BRfooter.addClass("js-menu-hide")):(this.refs.$BRtoolbar.removeClass("js-menu-hide"),this.refs.$BRfooter.removeClass("js-menu-hide")),this.refs.$BRtoolbar.animate({top:r},t,n,i),this.refs.$BRfooter.animate({bottom:o},t,n,i)},$e.prototype.hideNavigation=function(){this.navigationIsVisible()&&this.setNavigationView(!0)},$e.prototype.showNavigation=function(){this.navigationIsVisible()||this.setNavigationView()},$e.prototype.firstDisplayableIndex=function(){return this.mode!=this.constMode2up?0:"rl"!=this.pageProgression?"L"==this._models.book.getPageSide(0)?0:-1:"R"==this._models.book.getPageSide(0)?0:-1},$e.prototype.lastDisplayableIndex=function(){var e=this._models.book.getNumLeafs()-1;return this.mode!=this.constMode2up?e:"rl"!=this.pageProgression?"R"==this._models.book.getPageSide(e)?e:e+1:"L"==this._models.book.getPageSide(e)?e:e+1},$e.prototype.getMedianPageSize=k.prototype.getMedianPageSize,We(k,"_models.book","getMedianPageSize"),$e.prototype._getPageWidth=k.prototype._getPageWidth,We(k,"_models.book","_getPageWidth"),$e.prototype._getPageHeight=k.prototype._getPageHeight,We(k,"_models.book","_getPageHeight"),$e.prototype.getPageIndex=k.prototype.getPageIndex,We(k,"_models.book","getPageIndex"),$e.prototype.getPageIndices=k.prototype.getPageIndices,We(k,"_models.book","getPageIndices"),$e.prototype.getPageName=k.prototype.getPageName,We(k,"_models.book","getPageName"),$e.prototype.getNumLeafs=k.prototype.getNumLeafs,We(k,"_models.book","getNumLeafs"),$e.prototype.getPageWidth=k.prototype.getPageWidth,We(k,"_models.book","getPageWidth"),$e.prototype.getPageHeight=k.prototype.getPageHeight,We(k,"_models.book","getPageHeight"),$e.prototype.getPageURI=k.prototype.getPageURI,We(k,"_models.book","getPageURI"),$e.prototype.getPageSide=k.prototype.getPageSide,We(k,"_models.book","getPageSide"),$e.prototype.getPageNum=k.prototype.getPageNum,We(k,"_models.book","getPageNum"),$e.prototype.getPageProp=k.prototype.getPageProp,We(k,"_models.book","getPageProp"),$e.prototype.getSpreadIndices=k.prototype.getSpreadIndices,We(k,"_models.book","getSpreadIndices"),$e.prototype.leafNumToIndex=k.prototype.leafNumToIndex,We(k,"_models.book","leafNumToIndex"),$e.prototype.parsePageString=k.prototype.parsePageString,We(k,"_models.book","parsePageString"),$e.prototype._getDataFlattened=k.prototype._getDataFlattened,We(k,"_models.book","_getDataFlattened"),$e.prototype._getDataProp=k.prototype._getDataProp,We(k,"_models.book","_getDataProp"),$e.prototype.updateFromParams=function(e){var t=e.mode,n=void 0===t?0:t,i=e.init,r=void 0!==i&&i,o=e.fragmentChange,a=void 0!==o&&o;n&&this.switchMode(n,{init:r,suppressFragmentChange:!a}),void 0!==e.index?e.index!=this.currentIndex()&&this.jumpToIndex(e.index):void 0!==e.page&&e.page!=this._models.book.getPageNum(this.currentIndex())&&this.jumpToPage(e.page),this.enableSearch&&void 0!==e.search&&this.searchTerm!==e.search&&this.$(".BRsearchInput").val(e.search),this.enableThemesPlugin&&void 0!==e.theme&&this.updateTheme(e.theme)},$e.prototype.canSwitchToMode=function(e){return e!=this.constMode2up&&e!=this.constModeThumb||!(this._models.book.getNumLeafs()<2)},$e.prototype._getPageURISrcset=function(e,t,n){var i=this._models.book.getPage(e,!1);return i?(void 0===t&&(t=i.height/this.twoPage.height),i.getURISrcSet(t,n)):""},$e.prototype._getPageURI=function(e,t,n){var i=this._models.book.getPage(e,!1);return i?(void 0===t&&(t=i.height/this.twoPage.height),i.getURI(t,n)):this.imagesBaseURL+"transparent.png"},$e.prototype.showProgressPopup=function(e,t){var n=this;if(!this.popup){if(this.popup=document.createElement("div"),De(this.popup).prop("className","BRprogresspopup"),"function"==typeof t){var i=document.createElement("button");i.setAttribute("title","close"),i.setAttribute("class","close-popup");var r=document.createElement("span");r.setAttribute("class","icon icon-close-dark"),De(i).append(r),i.addEventListener("click",(function(){t(),n.removeProgressPopup()})),De(this.popup).append(i)}var o=document.createElement("div");if(De(o).css({height:"20px"}).prop("className","BRprogressbar"),De(this.popup).append(o),e){var a=document.createElement("div");a.innerHTML=e,De(this.popup).append(a)}De(this.popup).appendTo(this.refs.$br)}},$e.prototype.removeProgressPopup=function(){De(this.popup).remove(),this.$(".BRprogresspopup").remove(),this.popup=null},$e.prototype.initUIStrings=function(){var e={".logo":"Go to Archive.org",".zoom_in":"Zoom in",".zoom_out":"Zoom out",".onepg":"One-page view",".twopg":"Two-page view",".thumb":"Thumbnail view",".print":"Print this page",".embed":"Embed BookReader",".link":"Link to this book (and page)",".bookmark":"Bookmark this page",".share":"Share this book",".info":"About this book",".full":"Toggle fullscreen",".book_left":"Flip left",".book_right":"Flip right",".book_up":"Page up",".book_down":"Page down",".play":"Play",".pause":"Pause",".BRdn":"Show/hide nav bar",".BRup":"Show/hide nav bar",".book_top":"First page",".book_bottom":"Last page",".book_leftmost":"First page",".book_rightmost":"Last page"};for(var t in"rl"==this.pageProgression&&(e[".book_leftmost"]="Last page",e[".book_rightmost"]="First page"),e)this.$(t).prop("title",e[t])},$e.prototype.reloadImages=function(){this.refs.$brContainer.find("img").each((function(e,t){if(!t.complete||0===t.naturalHeight){var n=t.src;t.src="",setTimeout((function(){t.src=n}),1e3)}}))},$e.prototype.getFooterHeight=function(){var e=this.mode==this.constMode2up?this.refs.$BRfooter:this.refs.$BRnav;if(e&&this.refs.$BRfooter){var t=e.outerHeight(),n=parseInt(this.refs.$BRfooter.css("bottom"));if(!isNaN(t)&&!isNaN(n))return t+n}return 0},$e.prototype.paramsFromCurrent=function(){var e={},t=this.currentIndex(),n=this._models.book.getPageNum(t);return(0===n||n)&&(e.page=n),e.index=t,e.mode=this.mode,this.enableSearch&&(e.search=this.searchTerm),e},$e.prototype.paramsFromFragment=function(e){var t={};"#"==e.substr(0,1)&&(e=e.substr(1));var n=parseInt(/^\d+$/.exec(e));if(!isNaN(n))return t.index=n,t;for(var r=e.split("/"),o={},a=0;a<r.length;a+=2)o[r[a]]=r[a+1];return"1up"==o.mode?t.mode=this.constMode1up:"2up"==o.mode?t.mode=this.constMode2up:"thumb"==o.mode&&(t.mode=this.constModeThumb),void 0!==o.page&&(t.page=o.page),null!=o.search&&(t.search=i.decodeURIComponentPlus(o.search)),null!=o.theme&&(t.theme=o.theme),t},$e.prototype.fragmentFromParams=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hash",n="/",r=[];if(void 0!==e.page?r.push("page",e.page):void 0!==e.index&&r.push("page","n"+e.index),void 0!==e.mode)if(e.mode==this.constMode1up)r.push("mode","1up");else if(e.mode==this.constMode2up)r.push("mode","2up");else{if(e.mode!=this.constModeThumb)throw"fragmentFromParams called with unknown mode "+e.mode;r.push("mode","thumb")}return e.search&&"hash"===t&&r.push("search",e.search),i.encodeURIComponentPlus(r.join(n)).replace(/%2F/g,"/")},$e.prototype.queryStringFromParams=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hash",i=new URLSearchParams(t);e.search&&"history"===n&&i.set("q",e.search);var r=i.toString();return r?"?"+r:""},$e.prototype.$=function(e){return this.refs.$br.find(e)},Be.curCSS=function(e,t,n){return Be(e).css(t,n)},window.BookReader=$e},105:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{E:function(){return DebugConsole}});var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(9826),core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_0__),core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9600),core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(1249),core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_2__),$=__webpack_require__(3609);function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}var DebugConsole=function(){function DebugConsole(){_classCallCheck(this,DebugConsole),this.currentRun=0}return _createClass(DebugConsole,[{key:"init",value:function init(){var _this=this;this.$log=$('<div id="_debugLog" style="width: 100%; height: 300px; overflow: auto" />'),$(document.body).prepend(this.$log),this.$form=$('\n <form>\n <input style="width:100%; font-family: monospace;" id="_debugLogInput">\n </form>'),this.$log.append(this.$form),this.$form.submit((function(ev){ev.preventDefault();var result=eval(_this.$form.find("input").val());_this.logToScreen([result])}));var _realLog=console.log.bind(console);console.log=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];_realLog.apply(void 0,t),_this.logToScreen(t)},window.onerror=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _this.logToScreen(t)}}},{key:"logToScreen",value:function(e){var t=e.map(JSON.stringify).join(","),n=this.$log.children(".log-entry:last-child");n.find(".entry-code").html()==t?n.find(".count").text("(".concat(++this.currentRun,")")):(this.currentRun=1,this.$log.append($('\n <div class="log-entry">\n <code class="count"></code> <code class="entry-code">'.concat(t,"</code>\n </div>"))))}}]),DebugConsole}()},9860:function(e,t,n){"use strict";n.d(t,{_z:function(){return a},hy:function(){return s},Tm:function(){return u}}),n(5666),n(5827),n(9600),n(2222),n(1539),n(9714),n(4747),n(8674);var i=n(3609);function r(e,t,n,i,r,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=function(){function e(t,n){var r=n.isProtected,o=n.imageCache,a=n.loadingImage;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.page=t,this.imageCache=o,this.loadingImage=a,this.$container=i("<div />",{class:"BRpagecontainer ".concat(t?"pagediv".concat(t.index):"BRemptypage"),css:{position:"absolute"}}).attr("data-side",null==t?void 0:t.pageSide),r&&(this.$container.append(i('<div class="BRscreen" />')),this.$container.addClass("protected")),this.$img=null}var t,n;return t=e,(n=[{key:"update",value:function(e){var t,n=e.dimensions,o=void 0===n?null:n,a=e.reduce,s=void 0===a?null:a;if(o&&this.$container.css(o),null!=s&&this.page){var u=this.imageCache.imageLoaded(this.page.index,s),c=!u&&this.imageCache.getBestLoadedReduce(this.page.index,s);null===(t=this.$img)||void 0===t||t.remove(),this.$img=this.imageCache.image(this.page.index,s).prependTo(this.$container);var l=[];return u||(this.$container.addClass("BRpageloading"),l.push('url("'.concat(this.loadingImage,'") center/20px no-repeat'))),c&&l.push('url("'.concat(this.page.getURI(c,0),'") center/100% 100% no-repeat')),u||this.$img.css("background",l.join(",")).one("loadend",function(){var e,t=(e=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i(t.target).css({background:""}),i(t.target).parent().removeClass("BRpageloading");case 2:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}()),this}}}])&&o(t.prototype,n),e}();function s(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("viewBox","0 0 ".concat(e.width," ").concat(e.height)),n.setAttribute("class","BRPageLayer ".concat(t)),n.setAttribute("preserveAspectRatio","none"),n}function u(e,t,n,r){var o=r.querySelector(".".concat(e)),a=o||s(n,e);if(!o){var u=r.querySelector(".BRpageimage");u?i(a).insertAfter(u):i(a).prependTo(r)}t.forEach((function(e){return a.appendChild((n=(t=e).l,i=t.r,r=t.b,o=t.t,(s=document.createElementNS("http://www.w3.org/2000/svg","rect")).setAttribute("x",n.toString()),s.setAttribute("y",o.toString()),s.setAttribute("width",(i-n).toString()),s.setAttribute("height",(r-o).toString()),s));var t,n,i,r,o,s}))}},5685:function(e,t,n){"use strict";function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function r(e){e.bind("mousedown",(function(){return!1})),e[0].onselectstart=function(){return!1}}function o(e,t,n){return Math.min(Math.max(e,t),n)}function a(e,t){return e/t*100+"%"}function s(e,t){return!t.includes(e)}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.activeElement;return t&&null!=n&&n.shadowRoot?u(n.shadowRoot,!0):n}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=u(e);return"INPUT"==(null==t?void 0:t.tagName)||"TEXTAREA"==(null==t?void 0:t.tagName)}function l(e){var t=e.contentWindow||e.contentDocument;return t.document||t}function h(e){return e.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}function d(e){return decodeURIComponent(e).replace(/\+/g," ")}function p(e){return encodeURIComponent(e).replace(/%20/g,"+")}function f(e,t,n){var i;return function(){var r=this,o=arguments,a=function(){i=null,n||e.apply(r,o)},s=n&&!i;clearTimeout(i),i=setTimeout(a,t),s&&e.apply(r,o)}}function g(e,t,n){var i,r;return t||(t=250),n&&(i=+new Date),function(){var n=this,o=+new Date,a=arguments;i&&o<i+t?(clearTimeout(r),r=setTimeout((function(){i=o,e.apply(n,a)}),t)):(i=o,e.apply(n,a))}}function v(e){if("function"==typeof e.CustomEvent)return!1;e.CustomEvent=m}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bubbles,i=void 0!==n&&n,r=t.cancelable,o=void 0!==r&&r,a=t.detail,s=void 0===a?null:a,u=document.createEvent("CustomEvent");return u.initCustomEvent(e,i,o,s),u}function b(){var e=document.createElement("div");e.style.width="1in",document.body.appendChild(e);var t=e.offsetWidth;document.body.removeChild(e);var n=1.25*t;return 0==n?100:n}function y(e){return e.reduce((function(e,t){return e+t}),0)}function w(e){var t,n=[],r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;n.push(o)}}catch(e){r.e(e)}finally{r.f()}return n}function _(e,t){return e.length==t.length&&e.every((function(e,n){return e==t[n]}))}function x(e,t){return e&&t&&!_(e,t)}n.r(t),n.d(t,{disableSelect:function(){return r},clamp:function(){return o},cssPercentage:function(){return a},notInArray:function(){return s},getActiveElement:function(){return u},isInputActive:function(){return c},getIFrameDocument:function(){return l},escapeHTML:function(){return h},decodeURIComponentPlus:function(){return d},encodeURIComponentPlus:function(){return p},debounce:function(){return f},throttle:function(){return g},polyfillCustomEvent:function(){return v},PolyfilledCustomEvent:function(){return m},calcScreenDPI:function(){return b},sum:function(){return y},genToArray:function(){return w},arrEquals:function(){return _},arrChanged:function(){return x}}),n(6699),n(2023),n(4916),n(5306),n(5827),n(7042),n(1539),n(8309),n(1038),n(8783),n(2526),n(1817),n(2165),n(6992),n(3948)},3099:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6077:function(e,t,n){var i=n(111);e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},1223:function(e,t,n){var i=n(5112),r=n(30),o=n(3070),a=i("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:r(null)}),e.exports=function(e){s[a][e]=!0}},1530:function(e,t,n){"use strict";var i=n(8710).charAt;e.exports=function(e,t,n){return t+(n?i(e,t).length:1)}},5787:function(e){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},9670:function(e,t,n){var i=n(111);e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},8533:function(e,t,n){"use strict";var i=n(2092).forEach,r=n(9341)("forEach");e.exports=r?[].forEach:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}},8457:function(e,t,n){"use strict";var i=n(9974),r=n(7908),o=n(3411),a=n(7659),s=n(7466),u=n(6135),c=n(1246);e.exports=function(e){var t,n,l,h,d,p,f=r(e),g="function"==typeof this?this:Array,v=arguments.length,m=v>1?arguments[1]:void 0,b=void 0!==m,y=c(f),w=0;if(b&&(m=i(m,v>2?arguments[2]:void 0,2)),null==y||g==Array&&a(y))for(n=new g(t=s(f.length));t>w;w++)p=b?m(f[w],w):f[w],u(n,w,p);else for(d=(h=y.call(f)).next,n=new g;!(l=d.call(h)).done;w++)p=b?o(h,m,[l.value,w],!0):l.value,u(n,w,p);return n.length=w,n}},1318:function(e,t,n){var i=n(5656),r=n(7466),o=n(1400),a=function(e){return function(t,n,a){var s,u=i(t),c=r(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:function(e,t,n){var i=n(9974),r=n(8361),o=n(7908),a=n(7466),s=n(5417),u=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,l=4==e,h=6==e,d=7==e,p=5==e||h;return function(f,g,v,m){for(var b,y,w=o(f),_=r(w),x=i(g,v,3),P=a(_.length),k=0,C=m||s,S=t?C(f,P):n||d?C(f,0):void 0;P>k;k++)if((p||k in _)&&(y=x(b=_[k],k,w),e))if(t)S[k]=y;else if(y)switch(e){case 3:return!0;case 5:return b;case 6:return k;case 2:u.call(S,b)}else switch(e){case 4:return!1;case 7:u.call(S,b)}return h?-1:c||l?l:S}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},1194:function(e,t,n){var i=n(7293),r=n(5112),o=n(7392),a=r("species");e.exports=function(e){return o>=51||!i((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:function(e,t,n){"use strict";var i=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))}},3671:function(e,t,n){var i=n(3099),r=n(7908),o=n(8361),a=n(7466),s=function(e){return function(t,n,s,u){i(n);var c=r(t),l=o(c),h=a(c.length),d=e?h-1:0,p=e?-1:1;if(s<2)for(;;){if(d in l){u=l[d],d+=p;break}if(d+=p,e?d<0:h<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?d>=0:h>d;d+=p)d in l&&(u=n(u,l[d],d,c));return u}};e.exports={left:s(!1),right:s(!0)}},4362:function(e){var t=Math.floor,n=function(e,o){var a=e.length,s=t(a/2);return a<8?i(e,o):r(n(e.slice(0,s),o),n(e.slice(s),o),o)},i=function(e,t){for(var n,i,r=e.length,o=1;o<r;){for(i=o,n=e[o];i&&t(e[i-1],n)>0;)e[i]=e[--i];i!==o++&&(e[i]=n)}return e},r=function(e,t,n){for(var i=e.length,r=t.length,o=0,a=0,s=[];o<i||a<r;)o<i&&a<r?s.push(n(e[o],t[a])<=0?e[o++]:t[a++]):s.push(o<i?e[o++]:t[a++]);return s};e.exports=n},7475:function(e,t,n){var i=n(111),r=n(3157),o=n(5112)("species");e.exports=function(e){var t;return r(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!r(t.prototype)?i(t)&&null===(t=t[o])&&(t=void 0):t=void 0),void 0===t?Array:t}},5417:function(e,t,n){var i=n(7475);e.exports=function(e,t){return new(i(e))(0===t?0:t)}},3411:function(e,t,n){var i=n(9670),r=n(9212);e.exports=function(e,t,n,o){try{return o?t(i(n)[0],n[1]):t(n)}catch(t){throw r(e),t}}},7072:function(e,t,n){var i=n(5112)("iterator"),r=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){r=!0}};a[i]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var o={};o[i]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},4326:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},648:function(e,t,n){var i=n(1694),r=n(4326),o=n(5112)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=i?r:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?r(t):"Object"==(i=r(t))&&"function"==typeof t.callee?"Arguments":i}},9920:function(e,t,n){var i=n(6656),r=n(3887),o=n(1236),a=n(3070);e.exports=function(e,t){for(var n=r(t),s=a.f,u=o.f,c=0;c<n.length;c++){var l=n[c];i(e,l)||s(e,l,u(t,l))}}},4964:function(e,t,n){var i=n(5112)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[i]=!1,"/./"[e](t)}catch(e){}}return!1}},8544:function(e,t,n){var i=n(7293);e.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4994:function(e,t,n){"use strict";var i=n(3383).IteratorPrototype,r=n(30),o=n(9114),a=n(8003),s=n(7497),u=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=r(i,{next:o(1,n)}),a(e,c,!1,!0),s[c]=u,e}},8880:function(e,t,n){var i=n(9781),r=n(3070),o=n(9114);e.exports=i?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},9114:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:function(e,t,n){"use strict";var i=n(4948),r=n(3070),o=n(9114);e.exports=function(e,t,n){var a=i(t);a in e?r.f(e,a,o(0,n)):e[a]=n}},8709:function(e,t,n){"use strict";var i=n(9670),r=n(2140);e.exports=function(e){if(i(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw TypeError("Incorrect hint");return r(this,e)}},654:function(e,t,n){"use strict";var i=n(2109),r=n(4994),o=n(9518),a=n(7674),s=n(8003),u=n(8880),c=n(1320),l=n(5112),h=n(1913),d=n(7497),p=n(3383),f=p.IteratorPrototype,g=p.BUGGY_SAFARI_ITERATORS,v=l("iterator"),m="keys",b="values",y="entries",w=function(){return this};e.exports=function(e,t,n,l,p,_,x){r(n,t,l);var P,k,C,S=function(e){if(e===p&&M)return M;if(!g&&e in I)return I[e];switch(e){case m:case b:case y:return function(){return new n(this,e)}}return function(){return new n(this)}},T=t+" Iterator",E=!1,I=e.prototype,R=I[v]||I["@@iterator"]||p&&I[p],M=!g&&R||S(p),L="Array"==t&&I.entries||R;if(L&&(P=o(L.call(new e)),f!==Object.prototype&&P.next&&(h||o(P)===f||(a?a(P,f):"function"!=typeof P[v]&&u(P,v,w)),s(P,T,!0,!0),h&&(d[T]=w))),p==b&&R&&R.name!==b&&(E=!0,M=function(){return R.call(this)}),h&&!x||I[v]===M||u(I,v,M),d[t]=M,p)if(k={values:S(b),keys:_?M:S(m),entries:S(y)},x)for(C in k)(g||E||!(C in I))&&c(I,C,k[C]);else i({target:t,proto:!0,forced:g||E},k);return k}},7235:function(e,t,n){var i=n(857),r=n(6656),o=n(6061),a=n(3070).f;e.exports=function(e){var t=i.Symbol||(i.Symbol={});r(t,e)||a(t,e,{value:o.f(e)})}},9781:function(e,t,n){var i=n(7293);e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:function(e,t,n){var i=n(7854),r=n(111),o=i.document,a=r(o)&&r(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},8324:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8886:function(e,t,n){var i=n(8113).match(/firefox\/(\d+)/i);e.exports=!!i&&+i[1]},7871:function(e){e.exports="object"==typeof window},256:function(e,t,n){var i=n(8113);e.exports=/MSIE|Trident/.test(i)},1528:function(e,t,n){var i=n(8113),r=n(7854);e.exports=/ipad|iphone|ipod/i.test(i)&&void 0!==r.Pebble},8334:function(e,t,n){var i=n(8113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},5268:function(e,t,n){var i=n(4326),r=n(7854);e.exports="process"==i(r.process)},1036:function(e,t,n){var i=n(8113);e.exports=/web0s(?!.*chrome)/i.test(i)},8113:function(e,t,n){var i=n(5005);e.exports=i("navigator","userAgent")||""},7392:function(e,t,n){var i,r,o=n(7854),a=n(8113),s=o.process,u=o.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l?r=(i=l.split("."))[0]<4?1:i[0]+i[1]:a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(r=i[1]),e.exports=r&&+r},8008:function(e,t,n){var i=n(8113).match(/AppleWebKit\/(\d+)\./);e.exports=!!i&&+i[1]},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(e,t,n){var i=n(7854),r=n(1236).f,o=n(8880),a=n(1320),s=n(3505),u=n(9920),c=n(4705);e.exports=function(e,t){var n,l,h,d,p,f=e.target,g=e.global,v=e.stat;if(n=g?i:v?i[f]||s(f,{}):(i[f]||{}).prototype)for(l in t){if(d=t[l],h=e.noTargetGet?(p=r(n,l))&&p.value:n[l],!c(g?l:f+(v?".":"#")+l,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;u(d,h)}(e.sham||h&&h.sham)&&o(d,"sham",!0),a(n,l,d,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:function(e,t,n){"use strict";n(4916);var i=n(1320),r=n(2261),o=n(7293),a=n(5112),s=n(8880),u=a("species"),c=RegExp.prototype;e.exports=function(e,t,n,l){var h=a(e),d=!o((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),p=d&&!o((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!d||!p||n){var f=/./[h],g=t(h,""[e],(function(e,t,n,i,o){var a=t.exec;return a===r||a===c.exec?d&&!o?{done:!0,value:f.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}}));i(String.prototype,e,g[0]),i(c,h,g[1])}l&&s(c[h],"sham",!0)}},6790:function(e,t,n){"use strict";var i=n(3157),r=n(7466),o=n(9974),a=function(e,t,n,s,u,c,l,h){for(var d,p=u,f=0,g=!!l&&o(l,h,3);f<s;){if(f in n){if(d=g?g(n[f],f,t):n[f],c>0&&i(d))p=a(e,t,d,r(d.length),p,c-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[p]=d}p++}f++}return p};e.exports=a},6677:function(e,t,n){var i=n(7293);e.exports=!i((function(){return Object.isExtensible(Object.preventExtensions({}))}))},9974:function(e,t,n){var i=n(3099);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},7065:function(e,t,n){"use strict";var i=n(3099),r=n(111),o=[].slice,a={},s=function(e,t,n){if(!(t in a)){for(var i=[],r=0;r<t;r++)i[r]="a["+r+"]";a[t]=Function("C,a","return new C("+i.join(",")+")")}return a[t](e,n)};e.exports=Function.bind||function(e){var t=i(this),n=o.call(arguments,1),a=function(){var i=n.concat(o.call(arguments));return this instanceof a?s(t,i.length,i):t.apply(e,i)};return r(t.prototype)&&(a.prototype=t.prototype),a}},5005:function(e,t,n){var i=n(7854),r=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?r(i[e]):i[e]&&i[e][t]}},1246:function(e,t,n){var i=n(648),r=n(7497),o=n(5112)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||r[i(e)]}},8554:function(e,t,n){var i=n(9670),r=n(1246);e.exports=function(e){var t=r(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return i(t.call(e))}},647:function(e,t,n){var i=n(7908),r=Math.floor,o="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,u,c,l){var h=n+e.length,d=u.length,p=s;return void 0!==c&&(c=i(c),p=a),o.call(l,p,(function(i,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(h);case"<":a=c[o.slice(1,-1)];break;default:var s=+o;if(0===s)return i;if(s>d){var l=r(s/10);return 0===l?i:l<=d?void 0===u[l-1]?o.charAt(1):u[l-1]+o.charAt(1):i}a=u[s-1]}return void 0===a?"":a}))}},7854:function(e,t,n){var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6656:function(e,t,n){var i=n(7908),r={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return r.call(i(e),t)}},3501:function(e){e.exports={}},842:function(e,t,n){var i=n(7854);e.exports=function(e,t){var n=i.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},490:function(e,t,n){var i=n(5005);e.exports=i("document","documentElement")},4664:function(e,t,n){var i=n(9781),r=n(7293),o=n(317);e.exports=!i&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:function(e,t,n){var i=n(7293),r=n(4326),o="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?o.call(e,""):Object(e)}:Object},9587:function(e,t,n){var i=n(111),r=n(7674);e.exports=function(e,t,n){var o,a;return r&&"function"==typeof(o=t.constructor)&&o!==n&&i(a=o.prototype)&&a!==n.prototype&&r(e,a),e}},2788:function(e,t,n){var i=n(5465),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(e){return r.call(e)}),e.exports=i.inspectSource},2423:function(e,t,n){var i=n(2109),r=n(3501),o=n(111),a=n(6656),s=n(3070).f,u=n(8006),c=n(1156),l=n(9711),h=n(6677),d=!1,p=l("meta"),f=0,g=Object.isExtensible||function(){return!0},v=function(e){s(e,p,{value:{objectID:"O"+f++,weakData:{}}})},m=e.exports={enable:function(){m.enable=function(){},d=!0;var e=u.f,t=[].splice,n={};n[p]=1,e(n).length&&(u.f=function(n){for(var i=e(n),r=0,o=i.length;r<o;r++)if(i[r]===p){t.call(i,r,1);break}return i},i({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,p)){if(!g(e))return"F";if(!t)return"E";v(e)}return e[p].objectID},getWeakData:function(e,t){if(!a(e,p)){if(!g(e))return!0;if(!t)return!1;v(e)}return e[p].weakData},onFreeze:function(e){return h&&d&&g(e)&&!a(e,p)&&v(e),e}};r[p]=!0},9909:function(e,t,n){var i,r,o,a=n(8536),s=n(7854),u=n(111),c=n(8880),l=n(6656),h=n(5465),d=n(6200),p=n(3501),f="Object already initialized",g=s.WeakMap;if(a||h.state){var v=h.state||(h.state=new g),m=v.get,b=v.has,y=v.set;i=function(e,t){if(b.call(v,e))throw new TypeError(f);return t.facade=e,y.call(v,e,t),t},r=function(e){return m.call(v,e)||{}},o=function(e){return b.call(v,e)}}else{var w=d("state");p[w]=!0,i=function(e,t){if(l(e,w))throw new TypeError(f);return t.facade=e,c(e,w,t),t},r=function(e){return l(e,w)?e[w]:{}},o=function(e){return l(e,w)}}e.exports={set:i,get:r,has:o,enforce:function(e){return o(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},7659:function(e,t,n){var i=n(5112),r=n(7497),o=i("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[o]===e)}},3157:function(e,t,n){var i=n(4326);e.exports=Array.isArray||function(e){return"Array"==i(e)}},4705:function(e,t,n){var i=n(7293),r=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==c||n!=u&&("function"==typeof t?i(t):!!t)},a=o.normalize=function(e){return String(e).replace(r,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},111:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},1913:function(e){e.exports=!1},7850:function(e,t,n){var i=n(111),r=n(4326),o=n(5112)("match");e.exports=function(e){var t;return i(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==r(e))}},2190:function(e,t,n){var i=n(5005),r=n(3307);e.exports=r?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return"function"==typeof t&&Object(e)instanceof t}},408:function(e,t,n){var i=n(9670),r=n(7659),o=n(7466),a=n(9974),s=n(1246),u=n(9212),c=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var l,h,d,p,f,g,v,m=n&&n.that,b=!(!n||!n.AS_ENTRIES),y=!(!n||!n.IS_ITERATOR),w=!(!n||!n.INTERRUPTED),_=a(t,m,1+b+w),x=function(e){return l&&u(l),new c(!0,e)},P=function(e){return b?(i(e),w?_(e[0],e[1],x):_(e[0],e[1])):w?_(e,x):_(e)};if(y)l=e;else{if("function"!=typeof(h=s(e)))throw TypeError("Target is not iterable");if(r(h)){for(d=0,p=o(e.length);p>d;d++)if((f=P(e[d]))&&f instanceof c)return f;return new c(!1)}l=h.call(e)}for(g=l.next;!(v=g.call(l)).done;){try{f=P(v.value)}catch(e){throw u(l),e}if("object"==typeof f&&f&&f instanceof c)return f}return new c(!1)}},9212:function(e,t,n){var i=n(9670);e.exports=function(e){var t=e.return;if(void 0!==t)return i(t.call(e)).value}},3383:function(e,t,n){"use strict";var i,r,o,a=n(7293),s=n(9518),u=n(8880),c=n(6656),l=n(5112),h=n(1913),d=l("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(r=s(s(o)))!==Object.prototype&&(i=r):p=!0);var f=null==i||a((function(){var e={};return i[d].call(e)!==e}));f&&(i={}),h&&!f||c(i,d)||u(i,d,(function(){return this})),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:p}},7497:function(e){e.exports={}},4310:function(e){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},5948:function(e,t,n){var i,r,o,a,s,u,c,l,h=n(7854),d=n(1236).f,p=n(261).set,f=n(8334),g=n(1528),v=n(1036),m=n(5268),b=h.MutationObserver||h.WebKitMutationObserver,y=h.document,w=h.process,_=h.Promise,x=d(h,"queueMicrotask"),P=x&&x.value;P||(i=function(){var e,t;for(m&&(e=w.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(e){throw r?a():o=void 0,e}}o=void 0,e&&e.enter()},f||m||v||!b||!y?!g&&_&&_.resolve?((c=_.resolve(void 0)).constructor=_,l=c.then,a=function(){l.call(c,i)}):a=m?function(){w.nextTick(i)}:function(){p.call(h,i)}:(s=!0,u=y.createTextNode(""),new b(i).observe(u,{characterData:!0}),a=function(){u.data=s=!s})),e.exports=P||function(e){var t={fn:e,next:void 0};o&&(o.next=t),r||(r=t,a()),o=t}},3366:function(e,t,n){var i=n(7854);e.exports=i.Promise},133:function(e,t,n){var i=n(7392),r=n(7293);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},590:function(e,t,n){var i=n(7293),r=n(5112),o=n(1913),a=r("iterator");e.exports=!i((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,i){t.delete("b"),n+=i+e})),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8536:function(e,t,n){var i=n(7854),r=n(2788),o=i.WeakMap;e.exports="function"==typeof o&&/native code/.test(r(o))},8523:function(e,t,n){"use strict";var i=n(3099),r=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)};e.exports.f=function(e){return new r(e)}},3929:function(e,t,n){var i=n(7850);e.exports=function(e){if(i(e))throw TypeError("The method doesn't accept regular expressions");return e}},1574:function(e,t,n){"use strict";var i=n(9781),r=n(7293),o=n(1956),a=n(5181),s=n(5296),u=n(7908),c=n(8361),l=Object.assign,h=Object.defineProperty;e.exports=!l||r((function(){if(i&&1!==l({b:1},l(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||o(l({},t)).join("")!=r}))?function(e,t){for(var n=u(e),r=arguments.length,l=1,h=a.f,d=s.f;r>l;)for(var p,f=c(arguments[l++]),g=h?o(f).concat(h(f)):o(f),v=g.length,m=0;v>m;)p=g[m++],i&&!d.call(f,p)||(n[p]=f[p]);return n}:l},30:function(e,t,n){var i,r=n(9670),o=n(6048),a=n(748),s=n(3501),u=n(490),c=n(317),l=n(6200)("IE_PROTO"),h=function(){},d=function(e){return"<script>"+e+"<\/script>"},p=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},f=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}var e,t;f="undefined"!=typeof document?document.domain&&i?p(i):((t=c("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):p(i);for(var n=a.length;n--;)delete f.prototype[a[n]];return f()};s[l]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h.prototype=r(e),n=new h,h.prototype=null,n[l]=e):n=f(),void 0===t?n:o(n,t)}},6048:function(e,t,n){var i=n(9781),r=n(3070),o=n(9670),a=n(1956);e.exports=i?Object.defineProperties:function(e,t){o(e);for(var n,i=a(t),s=i.length,u=0;s>u;)r.f(e,n=i[u++],t[n]);return e}},3070:function(e,t,n){var i=n(9781),r=n(4664),o=n(9670),a=n(4948),s=Object.defineProperty;t.f=i?s:function(e,t,n){if(o(e),t=a(t),o(n),r)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},1236:function(e,t,n){var i=n(9781),r=n(5296),o=n(9114),a=n(5656),s=n(4948),u=n(6656),c=n(4664),l=Object.getOwnPropertyDescriptor;t.f=i?l:function(e,t){if(e=a(e),t=s(t),c)try{return l(e,t)}catch(e){}if(u(e,t))return o(!r.f.call(e,t),e[t])}},1156:function(e,t,n){var i=n(5656),r=n(8006).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return r(e)}catch(e){return a.slice()}}(e):r(i(e))}},8006:function(e,t,n){var i=n(6324),r=n(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},5181:function(e,t){t.f=Object.getOwnPropertySymbols},9518:function(e,t,n){var i=n(6656),r=n(7908),o=n(6200),a=n(8544),s=o("IE_PROTO"),u=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=r(e),i(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},6324:function(e,t,n){var i=n(6656),r=n(5656),o=n(1318).indexOf,a=n(3501);e.exports=function(e,t){var n,s=r(e),u=0,c=[];for(n in s)!i(a,n)&&i(s,n)&&c.push(n);for(;t.length>u;)i(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},1956:function(e,t,n){var i=n(6324),r=n(748);e.exports=Object.keys||function(e){return i(e,r)}},5296:function(e,t){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);t.f=r?function(e){var t=i(this,e);return!!t&&t.enumerable}:n},7674:function(e,t,n){var i=n(9670),r=n(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return i(n),r(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},4699:function(e,t,n){var i=n(9781),r=n(1956),o=n(5656),a=n(5296).f,s=function(e){return function(t){for(var n,s=o(t),u=r(s),c=u.length,l=0,h=[];c>l;)n=u[l++],i&&!a.call(s,n)||h.push(e?[n,s[n]]:s[n]);return h}};e.exports={entries:s(!0),values:s(!1)}},288:function(e,t,n){"use strict";var i=n(1694),r=n(648);e.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},2140:function(e,t,n){var i=n(111);e.exports=function(e,t){var n,r;if("string"===t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if("string"!==t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},3887:function(e,t,n){var i=n(5005),r=n(8006),o=n(5181),a=n(9670);e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},857:function(e,t,n){var i=n(7854);e.exports=i},2534:function(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},9478:function(e,t,n){var i=n(9670),r=n(111),o=n(8523);e.exports=function(e,t){if(i(e),r(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},2248:function(e,t,n){var i=n(1320);e.exports=function(e,t,n){for(var r in t)i(e,r,t[r],n);return e}},1320:function(e,t,n){var i=n(7854),r=n(8880),o=n(6656),a=n(3505),s=n(2788),u=n(9909),c=u.get,l=u.enforce,h=String(String).split("String");(e.exports=function(e,t,n,s){var u,c=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||r(n,"name",t),(u=l(n)).source||(u.source=h.join("string"==typeof t?t:""))),e!==i?(c?!p&&e[t]&&(d=!0):delete e[t],d?e[t]=n:r(e,t,n)):d?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},7651:function(e,t,n){var i=n(4326),r=n(2261);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},2261:function(e,t,n){"use strict";var i,r,o=n(1340),a=n(7066),s=n(2999),u=n(2309),c=n(30),l=n(9909).get,h=n(9441),d=n(8173),p=RegExp.prototype.exec,f=u("native-string-replace",String.prototype.replace),g=p,v=(i=/a/,r=/b*/g,p.call(i,"a"),p.call(r,"a"),0!==i.lastIndex||0!==r.lastIndex),m=s.UNSUPPORTED_Y||s.BROKEN_CARET,b=void 0!==/()??/.exec("")[1];(v||b||m||h||d)&&(g=function(e){var t,n,i,r,s,u,h,d=this,y=l(d),w=o(e),_=y.raw;if(_)return _.lastIndex=d.lastIndex,t=g.call(_,w),d.lastIndex=_.lastIndex,t;var x=y.groups,P=m&&d.sticky,k=a.call(d),C=d.source,S=0,T=w;if(P&&(-1===(k=k.replace("y","")).indexOf("g")&&(k+="g"),T=w.slice(d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==w.charAt(d.lastIndex-1))&&(C="(?: "+C+")",T=" "+T,S++),n=new RegExp("^(?:"+C+")",k)),b&&(n=new RegExp("^"+C+"$(?!\\s)",k)),v&&(i=d.lastIndex),r=p.call(P?n:d,T),P?r?(r.input=r.input.slice(S),r[0]=r[0].slice(S),r.index=d.lastIndex,d.lastIndex+=r[0].length):d.lastIndex=0:v&&r&&(d.lastIndex=d.global?r.index+r[0].length:i),b&&r&&r.length>1&&f.call(r[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(r[s]=void 0)})),r&&x)for(r.groups=u=c(null),s=0;s<x.length;s++)u[(h=x[s])[0]]=r[h[1]];return r}),e.exports=g},7066:function(e,t,n){"use strict";var i=n(9670);e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},2999:function(e,t,n){var i=n(7293),r=n(7854).RegExp;t.UNSUPPORTED_Y=i((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=i((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},9441:function(e,t,n){var i=n(7293),r=n(7854).RegExp;e.exports=i((function(){var e=r(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},8173:function(e,t,n){var i=n(7293),r=n(7854).RegExp;e.exports=i((function(){var e=r("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},4488:function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},1150:function(e){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},3505:function(e,t,n){var i=n(7854);e.exports=function(e,t){try{Object.defineProperty(i,e,{value:t,configurable:!0,writable:!0})}catch(n){i[e]=t}return t}},6340:function(e,t,n){"use strict";var i=n(5005),r=n(3070),o=n(5112),a=n(9781),s=o("species");e.exports=function(e){var t=i(e),n=r.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},8003:function(e,t,n){var i=n(3070).f,r=n(6656),o=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,o)&&i(e,o,{configurable:!0,value:t})}},6200:function(e,t,n){var i=n(2309),r=n(9711),o=i("keys");e.exports=function(e){return o[e]||(o[e]=r(e))}},5465:function(e,t,n){var i=n(7854),r=n(3505),o="__core-js_shared__",a=i[o]||r(o,{});e.exports=a},2309:function(e,t,n){var i=n(1913),r=n(5465);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.16.2",mode:i?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(e,t,n){var i=n(9670),r=n(3099),o=n(5112)("species");e.exports=function(e,t){var n,a=i(e).constructor;return void 0===a||null==(n=i(a)[o])?t:r(n)}},8710:function(e,t,n){var i=n(9958),r=n(1340),o=n(4488),a=function(e){return function(t,n){var a,s,u=r(o(t)),c=i(n),l=u.length;return c<0||c>=l?e?"":void 0:(a=u.charCodeAt(c))<55296||a>56319||c+1===l||(s=u.charCodeAt(c+1))<56320||s>57343?e?u.charAt(c):a:e?u.slice(c,c+2):s-56320+(a-55296<<10)+65536}};e.exports={codeAt:a(!1),charAt:a(!0)}},3197:function(e){"use strict";var t=2147483647,n=/[^\0-\u007E]/,i=/[.\u3002\uFF0E\uFF61]/g,r="Overflow: input needs wider integers to process",o=Math.floor,a=String.fromCharCode,s=function(e){return e+22+75*(e<26)},u=function(e,t,n){var i=0;for(e=n?o(e/700):e>>1,e+=o(e/t);e>455;i+=36)e=o(e/35);return o(i+36*e/(e+38))},c=function(e){var n,i,c=[],l=(e=function(e){for(var t=[],n=0,i=e.length;n<i;){var r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&r)<<10)+(1023&o)+65536):(t.push(r),n--)}else t.push(r)}return t}(e)).length,h=128,d=0,p=72;for(n=0;n<e.length;n++)(i=e[n])<128&&c.push(a(i));var f=c.length,g=f;for(f&&c.push("-");g<l;){var v=t;for(n=0;n<e.length;n++)(i=e[n])>=h&&i<v&&(v=i);var m=g+1;if(v-h>o((t-d)/m))throw RangeError(r);for(d+=(v-h)*m,h=v,n=0;n<e.length;n++){if((i=e[n])<h&&++d>t)throw RangeError(r);if(i==h){for(var b=d,y=36;;y+=36){var w=y<=p?1:y>=p+26?26:y-p;if(b<w)break;var _=b-w,x=36-w;c.push(a(s(w+_%x))),b=o(_/x)}c.push(a(s(b))),p=u(d,m,g==f),d=0,++g}}++d,++h}return c.join("")};e.exports=function(e){var t,r,o=[],a=e.toLowerCase().replace(i,".").split(".");for(t=0;t<a.length;t++)r=a[t],o.push(n.test(r)?"xn--"+c(r):r);return o.join(".")}},8415:function(e,t,n){"use strict";var i=n(9958),r=n(1340),o=n(4488);e.exports=function(e){var t=r(o(this)),n="",a=i(e);if(a<0||a==1/0)throw RangeError("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},3111:function(e,t,n){var i=n(4488),r=n(1340),o="["+n(1361)+"]",a=RegExp("^"+o+o+"*"),s=RegExp(o+o+"*$"),u=function(e){return function(t){var n=r(i(t));return 1&e&&(n=n.replace(a,"")),2&e&&(n=n.replace(s,"")),n}};e.exports={start:u(1),end:u(2),trim:u(3)}},261:function(e,t,n){var i,r,o,a,s=n(7854),u=n(7293),c=n(9974),l=n(490),h=n(317),d=n(8334),p=n(5268),f=s.setImmediate,g=s.clearImmediate,v=s.process,m=s.MessageChannel,b=s.Dispatch,y=0,w={};try{i=s.location}catch(e){}var _=function(e){if(w.hasOwnProperty(e)){var t=w[e];delete w[e],t()}},x=function(e){return function(){_(e)}},P=function(e){_(e.data)},k=function(e){s.postMessage(String(e),i.protocol+"//"+i.host)};f&&g||(f=function(e){for(var t=[],n=arguments.length,i=1;n>i;)t.push(arguments[i++]);return w[++y]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(y),y},g=function(e){delete w[e]},p?r=function(e){v.nextTick(x(e))}:b&&b.now?r=function(e){b.now(x(e))}:m&&!d?(a=(o=new m).port2,o.port1.onmessage=P,r=c(a.postMessage,a,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts&&i&&"file:"!==i.protocol&&!u(k)?(r=k,s.addEventListener("message",P,!1)):r="onreadystatechange"in h("script")?function(e){l.appendChild(h("script")).onreadystatechange=function(){l.removeChild(this),_(e)}}:function(e){setTimeout(x(e),0)}),e.exports={set:f,clear:g}},863:function(e,t,n){var i=n(4326);e.exports=function(e){if("number"!=typeof e&&"Number"!=i(e))throw TypeError("Incorrect invocation");return+e}},1400:function(e,t,n){var i=n(9958),r=Math.max,o=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):o(n,t)}},5656:function(e,t,n){var i=n(8361),r=n(4488);e.exports=function(e){return i(r(e))}},9958:function(e){var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},7466:function(e,t,n){var i=n(9958),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},7908:function(e,t,n){var i=n(4488);e.exports=function(e){return Object(i(e))}},7593:function(e,t,n){var i=n(111),r=n(2190),o=n(2140),a=n(5112)("toPrimitive");e.exports=function(e,t){if(!i(e)||r(e))return e;var n,s=e[a];if(void 0!==s){if(void 0===t&&(t="default"),n=s.call(e,t),!i(n)||r(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},4948:function(e,t,n){var i=n(7593),r=n(2190);e.exports=function(e){var t=i(e,"string");return r(t)?t:String(t)}},1694:function(e,t,n){var i={};i[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(i)},1340:function(e,t,n){var i=n(2190);e.exports=function(e){if(i(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)}},9711:function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},3307:function(e,t,n){var i=n(133);e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:function(e,t,n){var i=n(5112);t.f=i},5112:function(e,t,n){var i=n(7854),r=n(2309),o=n(6656),a=n(9711),s=n(133),u=n(3307),c=r("wks"),l=i.Symbol,h=u?l:l&&l.withoutSetter||a;e.exports=function(e){return o(c,e)&&(s||"string"==typeof c[e])||(s&&o(l,e)?c[e]=l[e]:c[e]=h("Symbol."+e)),c[e]}},1361:function(e){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},2222:function(e,t,n){"use strict";var i=n(2109),r=n(7293),o=n(3157),a=n(111),s=n(7908),u=n(7466),c=n(6135),l=n(5417),h=n(1194),d=n(5112),p=n(7392),f=d("isConcatSpreadable"),g=9007199254740991,v="Maximum allowed index exceeded",m=p>=51||!r((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),b=h("concat"),y=function(e){if(!a(e))return!1;var t=e[f];return void 0!==t?!!t:o(e)};i({target:"Array",proto:!0,forced:!m||!b},{concat:function(e){var t,n,i,r,o,a=s(this),h=l(a,0),d=0;for(t=-1,i=arguments.length;t<i;t++)if(y(o=-1===t?a:arguments[t])){if(d+(r=u(o.length))>g)throw TypeError(v);for(n=0;n<r;n++,d++)n in o&&c(h,d,o[n])}else{if(d>=g)throw TypeError(v);c(h,d++,o)}return h.length=d,h}})},7327:function(e,t,n){"use strict";var i=n(2109),r=n(2092).filter;i({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},4553:function(e,t,n){"use strict";var i=n(2109),r=n(2092).findIndex,o=n(1223),a="findIndex",s=!0;a in[]&&Array(1).findIndex((function(){s=!1})),i({target:"Array",proto:!0,forced:s},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},9826:function(e,t,n){"use strict";var i=n(2109),r=n(2092).find,o=n(1223),a="find",s=!0;a in[]&&Array(1).find((function(){s=!1})),i({target:"Array",proto:!0,forced:s},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},6535:function(e,t,n){"use strict";var i=n(2109),r=n(6790),o=n(7908),a=n(7466),s=n(3099),u=n(5417);i({target:"Array",proto:!0},{flatMap:function(e){var t,n=o(this),i=a(n.length);return s(e),(t=u(n,0)).length=r(t,n,n,i,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},1038:function(e,t,n){var i=n(2109),r=n(8457);i({target:"Array",stat:!0,forced:!n(7072)((function(e){Array.from(e)}))},{from:r})},6699:function(e,t,n){"use strict";var i=n(2109),r=n(1318).includes,o=n(1223);i({target:"Array",proto:!0},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},6992:function(e,t,n){"use strict";var i=n(5656),r=n(1223),o=n(7497),a=n(9909),s=n(654),u="Array Iterator",c=a.set,l=a.getterFor(u);e.exports=s(Array,"Array",(function(e,t){c(this,{type:u,target:i(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},9600:function(e,t,n){"use strict";var i=n(2109),r=n(8361),o=n(5656),a=n(9341),s=[].join,u=r!=Object,c=a("join",",");i({target:"Array",proto:!0,forced:u||!c},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},1249:function(e,t,n){"use strict";var i=n(2109),r=n(2092).map;i({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},5827:function(e,t,n){"use strict";var i=n(2109),r=n(3671).left,o=n(9341),a=n(7392),s=n(5268);i({target:"Array",proto:!0,forced:!o("reduce")||!s&&a>79&&a<83},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},7042:function(e,t,n){"use strict";var i=n(2109),r=n(111),o=n(3157),a=n(1400),s=n(7466),u=n(5656),c=n(6135),l=n(5112),h=n(1194)("slice"),d=l("species"),p=[].slice,f=Math.max;i({target:"Array",proto:!0,forced:!h},{slice:function(e,t){var n,i,l,h=u(this),g=s(h.length),v=a(e,g),m=a(void 0===t?g:t,g);if(o(h)&&("function"!=typeof(n=h.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[d])&&(n=void 0):n=void 0,n===Array||void 0===n))return p.call(h,v,m);for(i=new(void 0===n?Array:n)(f(m-v,0)),l=0;v<m;v++,l++)v in h&&c(i,l,h[v]);return i.length=l,i}})},2707:function(e,t,n){"use strict";var i=n(2109),r=n(3099),o=n(7908),a=n(7466),s=n(1340),u=n(7293),c=n(4362),l=n(9341),h=n(8886),d=n(256),p=n(7392),f=n(8008),g=[],v=g.sort,m=u((function(){g.sort(void 0)})),b=u((function(){g.sort(null)})),y=l("sort"),w=!u((function(){if(p)return p<70;if(!(h&&h>3)){if(d)return!0;if(f)return f<603;var e,t,n,i,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)g.push({k:t+i,v:n})}for(g.sort((function(e,t){return t.v-e.v})),i=0;i<g.length;i++)t=g[i].k.charAt(0),r.charAt(r.length-1)!==t&&(r+=t);return"DGBEFHACIJK"!==r}}));i({target:"Array",proto:!0,forced:m||!b||!y||!w},{sort:function(e){void 0!==e&&r(e);var t=o(this);if(w)return void 0===e?v.call(t):v.call(t,e);var n,i,u=[],l=a(t.length);for(i=0;i<l;i++)i in t&&u.push(t[i]);for(n=(u=c(u,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:s(t)>s(n)?1:-1}}(e))).length,i=0;i<n;)t[i]=u[i++];for(;i<l;)delete t[i++];return t}})},561:function(e,t,n){"use strict";var i=n(2109),r=n(1400),o=n(9958),a=n(7466),s=n(7908),u=n(5417),c=n(6135),l=n(1194)("splice"),h=Math.max,d=Math.min,p=9007199254740991,f="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!l},{splice:function(e,t){var n,i,l,g,v,m,b=s(this),y=a(b.length),w=r(e,y),_=arguments.length;if(0===_?n=i=0:1===_?(n=0,i=y-w):(n=_-2,i=d(h(o(t),0),y-w)),y+n-i>p)throw TypeError(f);for(l=u(b,i),g=0;g<i;g++)(v=w+g)in b&&c(l,g,b[v]);if(l.length=i,n<i){for(g=w;g<y-i;g++)m=g+n,(v=g+i)in b?b[m]=b[v]:delete b[m];for(g=y;g>y-i+n;g--)delete b[g-1]}else if(n>i)for(g=y-i;g>w;g--)m=g+n-1,(v=g+i-1)in b?b[m]=b[v]:delete b[m];for(g=0;g<n;g++)b[g+w]=arguments[g+2];return b.length=y-i+n,l}})},9244:function(e,t,n){n(1223)("flatMap")},6078:function(e,t,n){var i=n(8880),r=n(8709),o=n(5112)("toPrimitive"),a=Date.prototype;o in a||i(a,o,r)},8309:function(e,t,n){var i=n(9781),r=n(3070).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/,u="name";i&&!(u in o)&&r(o,u,{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},3706:function(e,t,n){var i=n(7854);n(8003)(i.JSON,"JSON",!0)},4914:function(e,t,n){var i=n(2109),r=Math.log,o=Math.LN2;i({target:"Math",stat:!0},{log2:function(e){return r(e)/o}})},2420:function(e,t,n){n(2109)({target:"Math",stat:!0},{sign:n(4310)})},2703:function(e,t,n){n(8003)(Math,"Math",!0)},9653:function(e,t,n){"use strict";var i=n(9781),r=n(7854),o=n(4705),a=n(1320),s=n(6656),u=n(4326),c=n(9587),l=n(2190),h=n(7593),d=n(7293),p=n(30),f=n(8006).f,g=n(1236).f,v=n(3070).f,m=n(3111).trim,b="Number",y=r.Number,w=y.prototype,_=u(p(w))==b,x=function(e){if(l(e))throw TypeError("Cannot convert a Symbol value to a number");var t,n,i,r,o,a,s,u,c=h(e,"number");if("string"==typeof c&&c.length>2)if(43===(t=(c=m(c)).charCodeAt(0))||45===t){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+c}for(a=(o=c.slice(2)).length,s=0;s<a;s++)if((u=o.charCodeAt(s))<48||u>r)return NaN;return parseInt(o,i)}return+c};if(o(b,!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var P,k=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof k&&(_?d((function(){w.valueOf.call(n)})):u(n)!=b)?c(new y(x(t)),n,k):x(t)},C=i?f(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),S=0;C.length>S;S++)s(y,P=C[S])&&!s(k,P)&&v(k,P,g(y,P));k.prototype=w,w.constructor=k,a(r,b,k)}},6977:function(e,t,n){"use strict";var i=n(2109),r=n(9958),o=n(863),a=n(8415),s=n(7293),u=1..toFixed,c=Math.floor,l=function(e,t,n){return 0===t?n:t%2==1?l(e,t-1,n*e):l(e*e,t/2,n)},h=function(e,t,n){for(var i=-1,r=n;++i<6;)r+=t*e[i],e[i]=r%1e7,r=c(r/1e7)},d=function(e,t){for(var n=6,i=0;--n>=0;)i+=e[n],e[n]=c(i/t),i=i%t*1e7},p=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var i=String(e[t]);n=""===n?i:n+a.call("0",7-i.length)+i}return n};i({target:"Number",proto:!0,forced:u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){u.call({})}))},{toFixed:function(e){var t,n,i,s,u=o(this),c=r(e),f=[0,0,0,0,0,0],g="",v="0";if(c<0||c>20)throw RangeError("Incorrect fraction digits");if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(g="-",u=-u),u>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(u*l(2,69,1))-69)<0?u*l(2,-t,1):u/l(2,t,1),n*=4503599627370496,(t=52-t)>0){for(h(f,0,n),i=c;i>=7;)h(f,1e7,0),i-=7;for(h(f,l(10,i,1),0),i=t-1;i>=23;)d(f,1<<23),i-=23;d(f,1<<i),h(f,1,1),d(f,2),v=p(f)}else h(f,0,n),h(f,1<<-t,0),v=p(f)+a.call("0",c);return c>0?g+((s=v.length)<=c?"0."+a.call("0",c-s)+v:v.slice(0,s-c)+"."+v.slice(s-c)):g+v}})},9601:function(e,t,n){var i=n(2109),r=n(1574);i({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},3371:function(e,t,n){var i=n(2109),r=n(6677),o=n(7293),a=n(111),s=n(2423).onFreeze,u=Object.freeze;i({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!r},{freeze:function(e){return u&&a(e)?u(s(e)):e}})},5003:function(e,t,n){var i=n(2109),r=n(7293),o=n(5656),a=n(1236).f,s=n(9781),u=r((function(){a(1)}));i({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},9337:function(e,t,n){var i=n(2109),r=n(9781),o=n(3887),a=n(5656),s=n(1236),u=n(6135);i({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,n,i=a(e),r=s.f,c=o(i),l={},h=0;c.length>h;)void 0!==(n=r(i,t=c[h++]))&&u(l,t,n);return l}})},489:function(e,t,n){var i=n(2109),r=n(7293),o=n(7908),a=n(9518),s=n(8544);i({target:"Object",stat:!0,forced:r((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},7941:function(e,t,n){var i=n(2109),r=n(7908),o=n(1956);i({target:"Object",stat:!0,forced:n(7293)((function(){o(1)}))},{keys:function(e){return o(r(e))}})},1539:function(e,t,n){var i=n(1694),r=n(1320),o=n(288);i||r(Object.prototype,"toString",o,{unsafe:!0})},6833:function(e,t,n){var i=n(2109),r=n(4699).values;i({target:"Object",stat:!0},{values:function(e){return r(e)}})},8674:function(e,t,n){"use strict";var i,r,o,a,s=n(2109),u=n(1913),c=n(7854),l=n(5005),h=n(3366),d=n(1320),p=n(2248),f=n(7674),g=n(8003),v=n(6340),m=n(111),b=n(3099),y=n(5787),w=n(2788),_=n(408),x=n(7072),P=n(6707),k=n(261).set,C=n(5948),S=n(9478),T=n(842),E=n(8523),I=n(2534),R=n(9909),M=n(4705),L=n(5112),O=n(7871),N=n(5268),A=n(7392),D=L("species"),B="Promise",U=R.get,F=R.set,j=R.getterFor(B),$=h&&h.prototype,W=h,z=$,V=c.TypeError,H=c.document,q=c.process,X=E.f,Y=X,G=!!(H&&H.createEvent&&c.dispatchEvent),Z="function"==typeof PromiseRejectionEvent,K="unhandledrejection",J=!1,Q=M(B,(function(){var e=w(W),t=e!==String(W);if(!t&&66===A)return!0;if(u&&!z.finally)return!0;if(A>=51&&/native code/.test(e))return!1;var n=new W((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};return(n.constructor={})[D]=i,!(J=n.then((function(){}))instanceof i)||!t&&O&&!Z})),ee=Q||!x((function(e){W.all(e).catch((function(){}))})),te=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},ne=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;C((function(){for(var i=e.value,r=1==e.state,o=0;n.length>o;){var a,s,u,c=n[o++],l=r?c.ok:c.fail,h=c.resolve,d=c.reject,p=c.domain;try{l?(r||(2===e.rejection&&ae(e),e.rejection=1),!0===l?a=i:(p&&p.enter(),a=l(i),p&&(p.exit(),u=!0)),a===c.promise?d(V("Promise-chain cycle")):(s=te(a))?s.call(a,h,d):h(a)):d(i)}catch(e){p&&!u&&p.exit(),d(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&re(e)}))}},ie=function(e,t,n){var i,r;G?((i=H.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),c.dispatchEvent(i)):i={promise:t,reason:n},!Z&&(r=c["on"+e])?r(i):e===K&&T("Unhandled promise rejection",n)},re=function(e){k.call(c,(function(){var t,n=e.facade,i=e.value;if(oe(e)&&(t=I((function(){N?q.emit("unhandledRejection",i,n):ie(K,n,i)})),e.rejection=N||oe(e)?2:1,t.error))throw t.value}))},oe=function(e){return 1!==e.rejection&&!e.parent},ae=function(e){k.call(c,(function(){var t=e.facade;N?q.emit("rejectionHandled",t):ie("rejectionhandled",t,e.value)}))},se=function(e,t,n){return function(i){e(t,i,n)}},ue=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,ne(e,!0))},ce=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw V("Promise can't be resolved itself");var i=te(t);i?C((function(){var n={done:!1};try{i.call(t,se(ce,n,e),se(ue,n,e))}catch(t){ue(n,t,e)}})):(e.value=t,e.state=1,ne(e,!1))}catch(t){ue({done:!1},t,e)}}};if(Q&&(z=(W=function(e){y(this,W,B),b(e),i.call(this);var t=U(this);try{e(se(ce,t),se(ue,t))}catch(e){ue(t,e)}}).prototype,(i=function(e){F(this,{type:B,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(z,{then:function(e,t){var n=j(this),i=X(P(this,W));return i.ok="function"!=typeof e||e,i.fail="function"==typeof t&&t,i.domain=N?q.domain:void 0,n.parent=!0,n.reactions.push(i),0!=n.state&&ne(n,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),r=function(){var e=new i,t=U(e);this.promise=e,this.resolve=se(ce,t),this.reject=se(ue,t)},E.f=X=function(e){return e===W||e===o?new r(e):Y(e)},!u&&"function"==typeof h&&$!==Object.prototype)){a=$.then,J||(d($,"then",(function(e,t){var n=this;return new W((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),d($,"catch",z.catch,{unsafe:!0}));try{delete $.constructor}catch(e){}f&&f($,z)}s({global:!0,wrap:!0,forced:Q},{Promise:W}),g(W,B,!1,!0),v(B),o=l(B),s({target:B,stat:!0,forced:Q},{reject:function(e){var t=X(this);return t.reject.call(void 0,e),t.promise}}),s({target:B,stat:!0,forced:u||Q},{resolve:function(e){return S(u&&this===o?W:this,e)}}),s({target:B,stat:!0,forced:ee},{all:function(e){var t=this,n=X(t),i=n.resolve,r=n.reject,o=I((function(){var n=b(t.resolve),o=[],a=0,s=1;_(e,(function(e){var u=a++,c=!1;o.push(void 0),s++,n.call(t,e).then((function(e){c||(c=!0,o[u]=e,--s||i(o))}),r)})),--s||i(o)}));return o.error&&r(o.value),n.promise},race:function(e){var t=this,n=X(t),i=n.reject,r=I((function(){var r=b(t.resolve);_(e,(function(e){r.call(t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}})},2419:function(e,t,n){var i=n(2109),r=n(5005),o=n(3099),a=n(9670),s=n(111),u=n(30),c=n(7065),l=n(7293),h=r("Reflect","construct"),d=l((function(){function e(){}return!(h((function(){}),[],e)instanceof e)})),p=!l((function(){h((function(){}))})),f=d||p;i({target:"Reflect",stat:!0,forced:f,sham:f},{construct:function(e,t){o(e),a(t);var n=arguments.length<3?e:o(arguments[2]);if(p&&!d)return h(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var i=[null];return i.push.apply(i,t),new(c.apply(e,i))}var r=n.prototype,l=u(s(r)?r:Object.prototype),f=Function.apply.call(e,l,t);return s(f)?f:l}})},4819:function(e,t,n){var i=n(2109),r=n(111),o=n(9670),a=n(6656),s=n(1236),u=n(9518);i({target:"Reflect",stat:!0},{get:function e(t,n){var i,c,l=arguments.length<3?t:arguments[2];return o(t)===l?t[n]:(i=s.f(t,n))?a(i,"value")?i.value:void 0===i.get?void 0:i.get.call(l):r(c=u(t))?e(c,n,l):void 0}})},4916:function(e,t,n){"use strict";var i=n(2109),r=n(2261);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},9714:function(e,t,n){"use strict";var i=n(1320),r=n(9670),o=n(1340),a=n(7293),s=n(7066),u="toString",c=RegExp.prototype,l=c.toString,h=a((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),d=l.name!=u;(h||d)&&i(RegExp.prototype,u,(function(){var e=r(this),t=o(e.source),n=e.flags;return"/"+t+"/"+o(void 0===n&&e instanceof RegExp&&!("flags"in c)?s.call(e):n)}),{unsafe:!0})},2023:function(e,t,n){"use strict";var i=n(2109),r=n(3929),o=n(4488),a=n(1340);i({target:"String",proto:!0,forced:!n(4964)("includes")},{includes:function(e){return!!~a(o(this)).indexOf(a(r(e)),arguments.length>1?arguments[1]:void 0)}})},8783:function(e,t,n){"use strict";var i=n(8710).charAt,r=n(1340),o=n(9909),a=n(654),s="String Iterator",u=o.set,c=o.getterFor(s);a(String,"String",(function(e){u(this,{type:s,string:r(e),index:0})}),(function(){var e,t=c(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=i(n,r),t.index+=e.length,{value:e,done:!1})}))},5306:function(e,t,n){"use strict";var i=n(7007),r=n(7293),o=n(9670),a=n(9958),s=n(7466),u=n(1340),c=n(4488),l=n(1530),h=n(647),d=n(7651),p=n(5112)("replace"),f=Math.max,g=Math.min,v="$0"==="a".replace(/./,"$0"),m=!!/./[p]&&""===/./[p]("a","$0");i("replace",(function(e,t,n){var i=m?"$":"$0";return[function(e,n){var i=c(this),r=null==e?void 0:e[p];return void 0!==r?r.call(e,i,n):t.call(u(i),e,n)},function(e,r){var c=o(this),p=u(e);if("string"==typeof r&&-1===r.indexOf(i)&&-1===r.indexOf("$<")){var v=n(t,c,p,r);if(v.done)return v.value}var m="function"==typeof r;m||(r=u(r));var b=c.global;if(b){var y=c.unicode;c.lastIndex=0}for(var w=[];;){var _=d(c,p);if(null===_)break;if(w.push(_),!b)break;""===u(_[0])&&(c.lastIndex=l(p,s(c.lastIndex),y))}for(var x,P="",k=0,C=0;C<w.length;C++){_=w[C];for(var S=u(_[0]),T=f(g(a(_.index),p.length),0),E=[],I=1;I<_.length;I++)E.push(void 0===(x=_[I])?x:String(x));var R=_.groups;if(m){var M=[S].concat(E,T,p);void 0!==R&&M.push(R);var L=u(r.apply(void 0,M))}else L=h(S,p,T,E,R,r);T>=k&&(P+=p.slice(k,T)+L,k=T+S.length)}return P+p.slice(k)}]}),!!r((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!v||m)},4765:function(e,t,n){"use strict";var i=n(7007),r=n(9670),o=n(4488),a=n(1150),s=n(1340),u=n(7651);i("search",(function(e,t,n){return[function(t){var n=o(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,n):new RegExp(t)[e](s(n))},function(e){var i=r(this),o=s(e),c=n(t,i,o);if(c.done)return c.value;var l=i.lastIndex;a(l,0)||(i.lastIndex=0);var h=u(i,o);return a(i.lastIndex,l)||(i.lastIndex=l),null===h?-1:h.index}]}))},3123:function(e,t,n){"use strict";var i=n(7007),r=n(7850),o=n(9670),a=n(4488),s=n(6707),u=n(1530),c=n(7466),l=n(1340),h=n(7651),d=n(2261),p=n(2999),f=n(7293),g=p.UNSUPPORTED_Y,v=[].push,m=Math.min,b=4294967295;i("split",(function(e,t,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var i=l(a(this)),o=void 0===n?b:n>>>0;if(0===o)return[];if(void 0===e)return[i];if(!r(e))return t.call(i,e,o);for(var s,u,c,h=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,g=new RegExp(e.source,p+"g");(s=d.call(g,i))&&!((u=g.lastIndex)>f&&(h.push(i.slice(f,s.index)),s.length>1&&s.index<i.length&&v.apply(h,s.slice(1)),c=s[0].length,f=u,h.length>=o));)g.lastIndex===s.index&&g.lastIndex++;return f===i.length?!c&&g.test("")||h.push(""):h.push(i.slice(f)),h.length>o?h.slice(0,o):h}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var r=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,r,n):i.call(l(r),t,n)},function(e,r){var a=o(this),d=l(e),p=n(i,a,d,r,i!==t);if(p.done)return p.value;var f=s(a,RegExp),v=a.unicode,y=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(g?"g":"y"),w=new f(g?"^(?:"+a.source+")":a,y),_=void 0===r?b:r>>>0;if(0===_)return[];if(0===d.length)return null===h(w,d)?[d]:[];for(var x=0,P=0,k=[];P<d.length;){w.lastIndex=g?0:P;var C,S=h(w,g?d.slice(P):d);if(null===S||(C=m(c(w.lastIndex+(g?P:0)),d.length))===x)P=u(d,P,v);else{if(k.push(d.slice(x,P)),k.length===_)return k;for(var T=1;T<=S.length-1;T++)if(k.push(S[T]),k.length===_)return k;P=x=C}}return k.push(d.slice(x)),k}]}),!!f((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),g)},1817:function(e,t,n){"use strict";var i=n(2109),r=n(9781),o=n(7854),a=n(6656),s=n(111),u=n(3070).f,c=n(9920),l=o.Symbol;if(r&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var h={},d=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof d?new l(e):void 0===e?l():l(e);return""===e&&(h[t]=!0),t};c(d,l);var p=d.prototype=l.prototype;p.constructor=d;var f=p.toString,g="Symbol(test)"==String(l("test")),v=/^Symbol\((.*)\)[^)]+$/;u(p,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=f.call(e);if(a(h,e))return"";var n=g?t.slice(7,-1):t.replace(v,"$1");return""===n?void 0:n}}),i({global:!0,forced:!0},{Symbol:d})}},2165:function(e,t,n){n(7235)("iterator")},2526:function(e,t,n){"use strict";var i=n(2109),r=n(7854),o=n(5005),a=n(1913),s=n(9781),u=n(133),c=n(7293),l=n(6656),h=n(3157),d=n(111),p=n(2190),f=n(9670),g=n(7908),v=n(5656),m=n(4948),b=n(1340),y=n(9114),w=n(30),_=n(1956),x=n(8006),P=n(1156),k=n(5181),C=n(1236),S=n(3070),T=n(5296),E=n(8880),I=n(1320),R=n(2309),M=n(6200),L=n(3501),O=n(9711),N=n(5112),A=n(6061),D=n(7235),B=n(8003),U=n(9909),F=n(2092).forEach,j=M("hidden"),$="Symbol",W=N("toPrimitive"),z=U.set,V=U.getterFor($),H=Object.prototype,q=r.Symbol,X=o("JSON","stringify"),Y=C.f,G=S.f,Z=P.f,K=T.f,J=R("symbols"),Q=R("op-symbols"),ee=R("string-to-symbol-registry"),te=R("symbol-to-string-registry"),ne=R("wks"),ie=r.QObject,re=!ie||!ie.prototype||!ie.prototype.findChild,oe=s&&c((function(){return 7!=w(G({},"a",{get:function(){return G(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=Y(H,t);i&&delete H[t],G(e,t,n),i&&e!==H&&G(H,t,i)}:G,ae=function(e,t){var n=J[e]=w(q.prototype);return z(n,{type:$,tag:e,description:t}),s||(n.description=t),n},se=function(e,t,n){e===H&&se(Q,t,n),f(e);var i=m(t);return f(n),l(J,i)?(n.enumerable?(l(e,j)&&e[j][i]&&(e[j][i]=!1),n=w(n,{enumerable:y(0,!1)})):(l(e,j)||G(e,j,y(1,{})),e[j][i]=!0),oe(e,i,n)):G(e,i,n)},ue=function(e,t){f(e);var n=v(t),i=_(n).concat(de(n));return F(i,(function(t){s&&!ce.call(n,t)||se(e,t,n[t])})),e},ce=function(e){var t=m(e),n=K.call(this,t);return!(this===H&&l(J,t)&&!l(Q,t))&&(!(n||!l(this,t)||!l(J,t)||l(this,j)&&this[j][t])||n)},le=function(e,t){var n=v(e),i=m(t);if(n!==H||!l(J,i)||l(Q,i)){var r=Y(n,i);return!r||!l(J,i)||l(n,j)&&n[j][i]||(r.enumerable=!0),r}},he=function(e){var t=Z(v(e)),n=[];return F(t,(function(e){l(J,e)||l(L,e)||n.push(e)})),n},de=function(e){var t=e===H,n=Z(t?Q:v(e)),i=[];return F(n,(function(e){!l(J,e)||t&&!l(H,e)||i.push(J[e])})),i};u||(I((q=function(){if(this instanceof q)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?b(arguments[0]):void 0,t=O(e),n=function(e){this===H&&n.call(Q,e),l(this,j)&&l(this[j],t)&&(this[j][t]=!1),oe(this,t,y(1,e))};return s&&re&&oe(H,t,{configurable:!0,set:n}),ae(t,e)}).prototype,"toString",(function(){return V(this).tag})),I(q,"withoutSetter",(function(e){return ae(O(e),e)})),T.f=ce,S.f=se,C.f=le,x.f=P.f=he,k.f=de,A.f=function(e){return ae(N(e),e)},s&&(G(q.prototype,"description",{configurable:!0,get:function(){return V(this).description}}),a||I(H,"propertyIsEnumerable",ce,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:q}),F(_(ne),(function(e){D(e)})),i({target:$,stat:!0,forced:!u},{for:function(e){var t=b(e);if(l(ee,t))return ee[t];var n=q(t);return ee[t]=n,te[n]=t,n},keyFor:function(e){if(!p(e))throw TypeError(e+" is not a symbol");if(l(te,e))return te[e]},useSetter:function(){re=!0},useSimple:function(){re=!1}}),i({target:"Object",stat:!0,forced:!u,sham:!s},{create:function(e,t){return void 0===t?w(e):ue(w(e),t)},defineProperty:se,defineProperties:ue,getOwnPropertyDescriptor:le}),i({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:he,getOwnPropertySymbols:de}),i({target:"Object",stat:!0,forced:c((function(){k.f(1)}))},{getOwnPropertySymbols:function(e){return k.f(g(e))}}),X&&i({target:"JSON",stat:!0,forced:!u||c((function(){var e=q();return"[null]"!=X([e])||"{}"!=X({a:e})||"{}"!=X(Object(e))}))},{stringify:function(e,t,n){for(var i,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(i=t,(d(t)||void 0!==e)&&!p(e))return h(t)||(t=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!p(t))return t}),r[1]=t,X.apply(null,r)}}),q.prototype[W]||E(q.prototype,W,q.prototype.valueOf),B(q,$),L[j]=!0},6649:function(e,t,n){n(7235)("toPrimitive")},3680:function(e,t,n){n(7235)("toStringTag")},4747:function(e,t,n){var i=n(7854),r=n(8324),o=n(8533),a=n(8880);for(var s in r){var u=i[s],c=u&&u.prototype;if(c&&c.forEach!==o)try{a(c,"forEach",o)}catch(e){c.forEach=o}}},3948:function(e,t,n){var i=n(7854),r=n(8324),o=n(6992),a=n(8880),s=n(5112),u=s("iterator"),c=s("toStringTag"),l=o.values;for(var h in r){var d=i[h],p=d&&d.prototype;if(p){if(p[u]!==l)try{a(p,u,l)}catch(e){p[u]=l}if(p[c]||a(p,c,h),r[h])for(var f in o)if(p[f]!==o[f])try{a(p,f,o[f])}catch(e){p[f]=o[f]}}}},1637:function(e,t,n){"use strict";n(6992);var i=n(2109),r=n(5005),o=n(590),a=n(1320),s=n(2248),u=n(8003),c=n(4994),l=n(9909),h=n(5787),d=n(6656),p=n(9974),f=n(648),g=n(9670),v=n(111),m=n(1340),b=n(30),y=n(9114),w=n(8554),_=n(1246),x=n(5112),P=r("fetch"),k=r("Request"),C=k&&k.prototype,S=r("Headers"),T=x("iterator"),E="URLSearchParams",I="URLSearchParamsIterator",R=l.set,M=l.getterFor(E),L=l.getterFor(I),O=/\+/g,N=Array(4),A=function(e){return N[e-1]||(N[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},D=function(e){try{return decodeURIComponent(e)}catch(t){return e}},B=function(e){var t=e.replace(O," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(A(n--),D);return t}},U=/[!'()~]|%20/g,F={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},j=function(e){return F[e]},$=function(e){return encodeURIComponent(e).replace(U,j)},W=function(e,t){if(t)for(var n,i,r=t.split("&"),o=0;o<r.length;)(n=r[o++]).length&&(i=n.split("="),e.push({key:B(i.shift()),value:B(i.join("="))}))},z=function(e){this.entries.length=0,W(this.entries,e)},V=function(e,t){if(e<t)throw TypeError("Not enough arguments")},H=c((function(e,t){R(this,{type:I,iterator:w(M(e).entries),kind:t})}),"Iterator",(function(){var e=L(this),t=e.kind,n=e.iterator.next(),i=n.value;return n.done||(n.value="keys"===t?i.key:"values"===t?i.value:[i.key,i.value]),n})),q=function(){h(this,q,E);var e,t,n,i,r,o,a,s,u,c=arguments.length>0?arguments[0]:void 0,l=this,p=[];if(R(l,{type:E,entries:p,updateURL:function(){},updateSearchParams:z}),void 0!==c)if(v(c))if("function"==typeof(e=_(c)))for(n=(t=e.call(c)).next;!(i=n.call(t)).done;){if((a=(o=(r=w(g(i.value))).next).call(r)).done||(s=o.call(r)).done||!o.call(r).done)throw TypeError("Expected sequence with length 2");p.push({key:m(a.value),value:m(s.value)})}else for(u in c)d(c,u)&&p.push({key:u,value:m(c[u])});else W(p,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:m(c))},X=q.prototype;if(s(X,{append:function(e,t){V(arguments.length,2);var n=M(this);n.entries.push({key:m(e),value:m(t)}),n.updateURL()},delete:function(e){V(arguments.length,1);for(var t=M(this),n=t.entries,i=m(e),r=0;r<n.length;)n[r].key===i?n.splice(r,1):r++;t.updateURL()},get:function(e){V(arguments.length,1);for(var t=M(this).entries,n=m(e),i=0;i<t.length;i++)if(t[i].key===n)return t[i].value;return null},getAll:function(e){V(arguments.length,1);for(var t=M(this).entries,n=m(e),i=[],r=0;r<t.length;r++)t[r].key===n&&i.push(t[r].value);return i},has:function(e){V(arguments.length,1);for(var t=M(this).entries,n=m(e),i=0;i<t.length;)if(t[i++].key===n)return!0;return!1},set:function(e,t){V(arguments.length,1);for(var n,i=M(this),r=i.entries,o=!1,a=m(e),s=m(t),u=0;u<r.length;u++)(n=r[u]).key===a&&(o?r.splice(u--,1):(o=!0,n.value=s));o||r.push({key:a,value:s}),i.updateURL()},sort:function(){var e,t,n,i=M(this),r=i.entries,o=r.slice();for(r.length=0,n=0;n<o.length;n++){for(e=o[n],t=0;t<n;t++)if(r[t].key>e.key){r.splice(t,0,e);break}t===n&&r.push(e)}i.updateURL()},forEach:function(e){for(var t,n=M(this).entries,i=p(e,arguments.length>1?arguments[1]:void 0,3),r=0;r<n.length;)i((t=n[r++]).value,t.key,this)},keys:function(){return new H(this,"keys")},values:function(){return new H(this,"values")},entries:function(){return new H(this,"entries")}},{enumerable:!0}),a(X,T,X.entries),a(X,"toString",(function(){for(var e,t=M(this).entries,n=[],i=0;i<t.length;)e=t[i++],n.push($(e.key)+"="+$(e.value));return n.join("&")}),{enumerable:!0}),u(q,E),i({global:!0,forced:!o},{URLSearchParams:q}),!o&&"function"==typeof S){var Y=function(e){if(v(e)){var t,n=e.body;if(f(n)===E)return(t=e.headers?new S(e.headers):new S).has("content-type")||t.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),b(e,{body:y(0,String(n)),headers:y(0,t)})}return e};if("function"==typeof P&&i({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return P(e,arguments.length>1?Y(arguments[1]):{})}}),"function"==typeof k){var G=function(e){return h(this,G,"Request"),new k(e,arguments.length>1?Y(arguments[1]):{})};C.constructor=G,G.prototype=C,i({global:!0,forced:!0},{Request:G})}}e.exports={URLSearchParams:q,getState:M}},285:function(e,t,n){"use strict";n(8783);var i,r=n(2109),o=n(9781),a=n(590),s=n(7854),u=n(6048),c=n(1320),l=n(5787),h=n(6656),d=n(1574),p=n(8457),f=n(8710).codeAt,g=n(3197),v=n(1340),m=n(8003),b=n(1637),y=n(9909),w=s.URL,_=b.URLSearchParams,x=b.getState,P=y.set,k=y.getterFor("URL"),C=Math.floor,S=Math.pow,T="Invalid scheme",E="Invalid host",I="Invalid port",R=/[A-Za-z]/,M=/[\d+-.A-Za-z]/,L=/\d/,O=/^0x/i,N=/^[0-7]+$/,A=/^\d+$/,D=/^[\dA-Fa-f]+$/,B=/[\0\t\n\r #%/:<>?@[\\\]^|]/,U=/[\0\t\n\r #/:<>?@[\\\]^|]/,F=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,j=/[\t\n\r]/g,$=function(e,t){var n,i,r;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return E;if(!(n=z(t.slice(1,-1))))return E;e.host=n}else if(K(e)){if(t=g(t),B.test(t))return E;if(null===(n=W(t)))return E;e.host=n}else{if(U.test(t))return E;for(n="",i=p(t),r=0;r<i.length;r++)n+=G(i[r],H);e.host=n}},W=function(e){var t,n,i,r,o,a,s,u=e.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(t=u.length)>4)return e;for(n=[],i=0;i<t;i++){if(""==(r=u[i]))return e;if(o=10,r.length>1&&"0"==r.charAt(0)&&(o=O.test(r)?16:8,r=r.slice(8==o?1:2)),""===r)a=0;else{if(!(10==o?A:8==o?N:D).test(r))return e;a=parseInt(r,o)}n.push(a)}for(i=0;i<t;i++)if(a=n[i],i==t-1){if(a>=S(256,5-t))return null}else if(a>255)return null;for(s=n.pop(),i=0;i<n.length;i++)s+=n[i]*S(256,3-i);return s},z=function(e){var t,n,i,r,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,d=function(){return e.charAt(h)};if(":"==d()){if(":"!=e.charAt(1))return;h+=2,l=++c}for(;d();){if(8==c)return;if(":"!=d()){for(t=n=0;n<4&&D.test(d());)t=16*t+parseInt(d(),16),h++,n++;if("."==d()){if(0==n)return;if(h-=n,c>6)return;for(i=0;d();){if(r=null,i>0){if(!("."==d()&&i<4))return;h++}if(!L.test(d()))return;for(;L.test(d());){if(o=parseInt(d(),10),null===r)r=o;else{if(0==r)return;r=10*r+o}if(r>255)return;h++}u[c]=256*u[c]+r,2!=++i&&4!=i||c++}if(4!=i)return;break}if(":"==d()){if(h++,!d())return}else if(d())return;u[c++]=t}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u},V=function(e){var t,n,i,r;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=C(e/256);return t.join(".")}if("object"==typeof e){for(t="",i=function(e){for(var t=null,n=1,i=null,r=0,o=0;o<8;o++)0!==e[o]?(r>n&&(t=i,n=r),i=null,r=0):(null===i&&(i=o),++r);return r>n&&(t=i,n=r),t}(e),n=0;n<8;n++)r&&0===e[n]||(r&&(r=!1),i===n?(t+=n?":":"::",r=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},H={},q=d({},H,{" ":1,'"':1,"<":1,">":1,"`":1}),X=d({},q,{"#":1,"?":1,"{":1,"}":1}),Y=d({},X,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),G=function(e,t){var n=f(e,0);return n>32&&n<127&&!h(t,e)?e:encodeURIComponent(e)},Z={ftp:21,file:null,http:80,https:443,ws:80,wss:443},K=function(e){return h(Z,e.scheme)},J=function(e){return""!=e.username||""!=e.password},Q=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},ee=function(e,t){var n;return 2==e.length&&R.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},te=function(e){var t;return e.length>1&&ee(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},ne=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&ee(t[0],!0)||t.pop()},ie=function(e){return"."===e||"%2e"===e.toLowerCase()},re={},oe={},ae={},se={},ue={},ce={},le={},he={},de={},pe={},fe={},ge={},ve={},me={},be={},ye={},we={},_e={},xe={},Pe={},ke={},Ce=function(e,t,n,r){var o,a,s,u,c,l=n||re,d=0,f="",g=!1,v=!1,m=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(F,"")),t=t.replace(j,""),o=p(t);d<=o.length;){switch(a=o[d],l){case re:if(!a||!R.test(a)){if(n)return T;l=ae;continue}f+=a.toLowerCase(),l=oe;break;case oe:if(a&&(M.test(a)||"+"==a||"-"==a||"."==a))f+=a.toLowerCase();else{if(":"!=a){if(n)return T;f="",l=ae,d=0;continue}if(n&&(K(e)!=h(Z,f)||"file"==f&&(J(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=f,n)return void(K(e)&&Z[e.scheme]==e.port&&(e.port=null));f="","file"==e.scheme?l=me:K(e)&&r&&r.scheme==e.scheme?l=se:K(e)?l=he:"/"==o[d+1]?(l=ue,d++):(e.cannotBeABaseURL=!0,e.path.push(""),l=xe)}break;case ae:if(!r||r.cannotBeABaseURL&&"#"!=a)return T;if(r.cannotBeABaseURL&&"#"==a){e.scheme=r.scheme,e.path=r.path.slice(),e.query=r.query,e.fragment="",e.cannotBeABaseURL=!0,l=ke;break}l="file"==r.scheme?me:ce;continue;case se:if("/"!=a||"/"!=o[d+1]){l=ce;continue}l=de,d++;break;case ue:if("/"==a){l=pe;break}l=_e;continue;case ce:if(e.scheme=r.scheme,a==i)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query;else if("/"==a||"\\"==a&&K(e))l=le;else if("?"==a)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query="",l=Pe;else{if("#"!=a){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.path.pop(),l=_e;continue}e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query,e.fragment="",l=ke}break;case le:if(!K(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,l=_e;continue}l=pe}else l=de;break;case he:if(l=de,"/"!=a||"/"!=f.charAt(d+1))continue;d++;break;case de:if("/"!=a&&"\\"!=a){l=pe;continue}break;case pe:if("@"==a){g&&(f="%40"+f),g=!0,s=p(f);for(var b=0;b<s.length;b++){var y=s[b];if(":"!=y||m){var w=G(y,Y);m?e.password+=w:e.username+=w}else m=!0}f=""}else if(a==i||"/"==a||"?"==a||"#"==a||"\\"==a&&K(e)){if(g&&""==f)return"Invalid authority";d-=p(f).length+1,f="",l=fe}else f+=a;break;case fe:case ge:if(n&&"file"==e.scheme){l=ye;continue}if(":"!=a||v){if(a==i||"/"==a||"?"==a||"#"==a||"\\"==a&&K(e)){if(K(e)&&""==f)return E;if(n&&""==f&&(J(e)||null!==e.port))return;if(u=$(e,f))return u;if(f="",l=we,n)return;continue}"["==a?v=!0:"]"==a&&(v=!1),f+=a}else{if(""==f)return E;if(u=$(e,f))return u;if(f="",l=ve,n==ge)return}break;case ve:if(!L.test(a)){if(a==i||"/"==a||"?"==a||"#"==a||"\\"==a&&K(e)||n){if(""!=f){var _=parseInt(f,10);if(_>65535)return I;e.port=K(e)&&_===Z[e.scheme]?null:_,f=""}if(n)return;l=we;continue}return I}f+=a;break;case me:if(e.scheme="file","/"==a||"\\"==a)l=be;else{if(!r||"file"!=r.scheme){l=_e;continue}if(a==i)e.host=r.host,e.path=r.path.slice(),e.query=r.query;else if("?"==a)e.host=r.host,e.path=r.path.slice(),e.query="",l=Pe;else{if("#"!=a){te(o.slice(d).join(""))||(e.host=r.host,e.path=r.path.slice(),ne(e)),l=_e;continue}e.host=r.host,e.path=r.path.slice(),e.query=r.query,e.fragment="",l=ke}}break;case be:if("/"==a||"\\"==a){l=ye;break}r&&"file"==r.scheme&&!te(o.slice(d).join(""))&&(ee(r.path[0],!0)?e.path.push(r.path[0]):e.host=r.host),l=_e;continue;case ye:if(a==i||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&ee(f))l=_e;else if(""==f){if(e.host="",n)return;l=we}else{if(u=$(e,f))return u;if("localhost"==e.host&&(e.host=""),n)return;f="",l=we}continue}f+=a;break;case we:if(K(e)){if(l=_e,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=i&&(l=_e,"/"!=a))continue}else e.fragment="",l=ke;else e.query="",l=Pe;break;case _e:if(a==i||"/"==a||"\\"==a&&K(e)||!n&&("?"==a||"#"==a)){if(".."===(c=(c=f).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(ne(e),"/"==a||"\\"==a&&K(e)||e.path.push("")):ie(f)?"/"==a||"\\"==a&&K(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&ee(f)&&(e.host&&(e.host=""),f=f.charAt(0)+":"),e.path.push(f)),f="","file"==e.scheme&&(a==i||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",l=Pe):"#"==a&&(e.fragment="",l=ke)}else f+=G(a,X);break;case xe:"?"==a?(e.query="",l=Pe):"#"==a?(e.fragment="",l=ke):a!=i&&(e.path[0]+=G(a,H));break;case Pe:n||"#"!=a?a!=i&&("'"==a&&K(e)?e.query+="%27":e.query+="#"==a?"%23":G(a,H)):(e.fragment="",l=ke);break;case ke:a!=i&&(e.fragment+=G(a,q))}d++}},Se=function(e){var t,n,i=l(this,Se,"URL"),r=arguments.length>1?arguments[1]:void 0,a=v(e),s=P(i,{type:"URL"});if(void 0!==r)if(r instanceof Se)t=k(r);else if(n=Ce(t={},v(r)))throw TypeError(n);if(n=Ce(s,a,null,t))throw TypeError(n);var u=s.searchParams=new _,c=x(u);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(u)||null},o||(i.href=Ee.call(i),i.origin=Ie.call(i),i.protocol=Re.call(i),i.username=Me.call(i),i.password=Le.call(i),i.host=Oe.call(i),i.hostname=Ne.call(i),i.port=Ae.call(i),i.pathname=De.call(i),i.search=Be.call(i),i.searchParams=Ue.call(i),i.hash=Fe.call(i))},Te=Se.prototype,Ee=function(){var e=k(this),t=e.scheme,n=e.username,i=e.password,r=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==r?(c+="//",J(e)&&(c+=n+(i?":"+i:"")+"@"),c+=V(r),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},Ie=function(){var e=k(this),t=e.scheme,n=e.port;if("blob"==t)try{return new Se(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&K(e)?t+"://"+V(e.host)+(null!==n?":"+n:""):"null"},Re=function(){return k(this).scheme+":"},Me=function(){return k(this).username},Le=function(){return k(this).password},Oe=function(){var e=k(this),t=e.host,n=e.port;return null===t?"":null===n?V(t):V(t)+":"+n},Ne=function(){var e=k(this).host;return null===e?"":V(e)},Ae=function(){var e=k(this).port;return null===e?"":String(e)},De=function(){var e=k(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Be=function(){var e=k(this).query;return e?"?"+e:""},Ue=function(){return k(this).searchParams},Fe=function(){var e=k(this).fragment;return e?"#"+e:""},je=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&u(Te,{href:je(Ee,(function(e){var t=k(this),n=v(e),i=Ce(t,n);if(i)throw TypeError(i);x(t.searchParams).updateSearchParams(t.query)})),origin:je(Ie),protocol:je(Re,(function(e){var t=k(this);Ce(t,v(e)+":",re)})),username:je(Me,(function(e){var t=k(this),n=p(v(e));if(!Q(t)){t.username="";for(var i=0;i<n.length;i++)t.username+=G(n[i],Y)}})),password:je(Le,(function(e){var t=k(this),n=p(v(e));if(!Q(t)){t.password="";for(var i=0;i<n.length;i++)t.password+=G(n[i],Y)}})),host:je(Oe,(function(e){var t=k(this);t.cannotBeABaseURL||Ce(t,v(e),fe)})),hostname:je(Ne,(function(e){var t=k(this);t.cannotBeABaseURL||Ce(t,v(e),ge)})),port:je(Ae,(function(e){var t=k(this);Q(t)||(""==(e=v(e))?t.port=null:Ce(t,e,ve))})),pathname:je(De,(function(e){var t=k(this);t.cannotBeABaseURL||(t.path=[],Ce(t,v(e),we))})),search:je(Be,(function(e){var t=k(this);""==(e=v(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",Ce(t,e,Pe)),x(t.searchParams).updateSearchParams(t.query)})),searchParams:je(Ue),hash:je(Fe,(function(e){var t=k(this);""!=(e=v(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",Ce(t,e,ke)):t.fragment=null}))}),c(Te,"toJSON",(function(){return Ee.call(this)}),{enumerable:!0}),c(Te,"toString",(function(){return Ee.call(this)}),{enumerable:!0}),w){var $e=w.createObjectURL,We=w.revokeObjectURL;$e&&c(Se,"createObjectURL",(function(e){return $e.apply(w,arguments)})),We&&c(Se,"revokeObjectURL",(function(e){return We.apply(w,arguments)}))}m(Se,"URL"),r({global:!0,forced:!a,sham:!o},{URL:Se})},840:function(e,t,n){var i;!function(r,o,a,s){"use strict";var u,c=["","webkit","Moz","MS","ms","o"],l=o.createElement("div"),h=Math.round,d=Math.abs,p=Date.now;function f(e,t,n){return setTimeout(_(e,n),t)}function g(e,t,n){return!!Array.isArray(e)&&(v(e,n[t],n),!0)}function v(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==s)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function m(e,t,n){var i="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),e.apply(this,arguments)}}u="function"!=typeof Object.assign?function(e){if(e===s||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==s&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign;var b=m((function(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;)(!n||n&&e[i[r]]===s)&&(e[i[r]]=t[i[r]]),r++;return e}),"extend","Use `assign`."),y=m((function(e,t){return b(e,t,!0)}),"merge","Use `assign`.");function w(e,t,n){var i,r=t.prototype;(i=e.prototype=Object.create(r)).constructor=e,i._super=r,n&&u(i,n)}function _(e,t){return function(){return e.apply(t,arguments)}}function x(e,t){return"function"==typeof e?e.apply(t&&t[0]||s,t):e}function P(e,t){return e===s?t:e}function k(e,t,n){v(E(t),(function(t){e.addEventListener(t,n,!1)}))}function C(e,t,n){v(E(t),(function(t){e.removeEventListener(t,n,!1)}))}function S(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function T(e,t){return e.indexOf(t)>-1}function E(e){return e.trim().split(/\s+/g)}function I(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function R(e){return Array.prototype.slice.call(e,0)}function M(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];I(r,a)<0&&i.push(e[o]),r[o]=a,o++}return n&&(i=t?i.sort((function(e,n){return e[t]>n[t]})):i.sort()),i}function L(e,t){for(var n,i,r=t[0].toUpperCase()+t.slice(1),o=0;o<c.length;){if((i=(n=c[o])?n+r:t)in e)return i;o++}return s}var O=1;function N(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||r}var A="ontouchstart"in r,D=L(r,"PointerEvent")!==s,B=A&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),U="touch",F="mouse",j=["x","y"],$=["clientX","clientY"];function W(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){x(e.options.enable,[e])&&n.handler(t)},this.init()}function z(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=1&t&&i-r==0,a=12&t&&i-r==0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=V(t)),r>1&&!n.firstMultiple?n.firstMultiple=V(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,u=a?a.center:o.center,c=t.center=H(i);t.timeStamp=p(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=G(u,c),t.distance=Y(u,c),function(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}(n,t),t.offsetDirection=X(t.deltaX,t.deltaY);var l,h,f=q(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=f.x,t.overallVelocityY=f.y,t.overallVelocity=d(f.x)>d(f.y)?f.x:f.y,t.scale=a?(l=a.pointers,Y((h=i)[0],h[1],$)/Y(l[0],l[1],$)):1,t.rotation=a?function(e,t){return G(t[1],t[0],$)+G(e[1],e[0],$)}(a.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,r,o,a=e.lastInterval||t,u=t.timeStamp-a.timeStamp;if(8!=t.eventType&&(u>25||a.velocity===s)){var c=t.deltaX-a.deltaX,l=t.deltaY-a.deltaY,h=q(u,c,l);i=h.x,r=h.y,n=d(h.x)>d(h.y)?h.x:h.y,o=X(c,l),e.lastInterval=t}else n=a.velocity,i=a.velocityX,r=a.velocityY,o=a.direction;t.velocity=n,t.velocityX=i,t.velocityY=r,t.direction=o}(n,t);var g=e.element;S(t.srcEvent.target,g)&&(g=t.srcEvent.target),t.target=g}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function V(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:h(e.pointers[n].clientX),clientY:h(e.pointers[n].clientY)},n++;return{timeStamp:p(),pointers:t,center:H(t),deltaX:e.deltaX,deltaY:e.deltaY}}function H(e){var t=e.length;if(1===t)return{x:h(e[0].clientX),y:h(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:h(n/t),y:h(i/t)}}function q(e,t,n){return{x:t/e||0,y:n/e||0}}function X(e,t){return e===t?1:d(e)>=d(t)?e<0?2:4:t<0?8:16}function Y(e,t,n){n||(n=j);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function G(e,t,n){n||(n=j);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}W.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(N(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(N(this.element),this.evWin,this.domHandler)}};var Z={mousedown:1,mousemove:2,mouseup:4},K="mousedown",J="mousemove mouseup";function Q(){this.evEl=K,this.evWin=J,this.pressed=!1,W.apply(this,arguments)}w(Q,W,{handler:function(e){var t=Z[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:F,srcEvent:e}))}});var ee={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},te={2:U,3:"pen",4:F,5:"kinect"},ne="pointerdown",ie="pointermove pointerup pointercancel";function re(){this.evEl=ne,this.evWin=ie,W.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(ne="MSPointerDown",ie="MSPointerMove MSPointerUp MSPointerCancel"),w(re,W,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=ee[i],o=te[e.pointerType]||e.pointerType,a=o==U,s=I(t,e.pointerId,"pointerId");1&r&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&r&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var oe={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ae="touchstart",se="touchstart touchmove touchend touchcancel";function ue(){this.evTarget=ae,this.evWin=se,this.started=!1,W.apply(this,arguments)}function ce(e,t){var n=R(e.touches),i=R(e.changedTouches);return 12&t&&(n=M(n.concat(i),"identifier",!0)),[n,i]}w(ue,W,{handler:function(e){var t=oe[e.type];if(1===t&&(this.started=!0),this.started){var n=ce.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:U,srcEvent:e})}}});var le={touchstart:1,touchmove:2,touchend:4,touchcancel:8},he="touchstart touchmove touchend touchcancel";function de(){this.evTarget=he,this.targetIds={},W.apply(this,arguments)}function pe(e,t){var n=R(e.touches),i=this.targetIds;if(3&t&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,a=R(e.changedTouches),s=[],u=this.target;if(o=n.filter((function(e){return S(e.target,u)})),1===t)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<a.length;)i[a[r].identifier]&&s.push(a[r]),12&t&&delete i[a[r].identifier],r++;return s.length?[M(o.concat(s),"identifier",!0),s]:void 0}function fe(){W.apply(this,arguments);var e=_(this.handler,this);this.touch=new de(this.manager,e),this.mouse=new Q(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function ge(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,ve.call(this,t)):12&e&&ve.call(this,t)}function ve(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout((function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)}),2500)}}function me(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),a=Math.abs(n-r.y);if(o<=25&&a<=25)return!0}return!1}w(de,W,{handler:function(e){var t=le[e.type],n=pe.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:U,srcEvent:e})}}),w(fe,W,{handler:function(e,t,n){var i=n.pointerType==U,r=n.pointerType==F;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)ge.call(this,t,n);else if(r&&me.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var be=L(l.style,"touchAction"),ye=be!==s,we="compute",_e="auto",xe="manipulation",Pe="none",ke="pan-x",Ce="pan-y",Se=function(){if(!ye)return!1;var e={},t=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){e[n]=!t||r.CSS.supports("touch-action",n)})),e}();function Te(e,t){this.manager=e,this.set(t)}Te.prototype={set:function(e){e==we&&(e=this.compute()),ye&&this.manager.element.style&&Se[e]&&(this.manager.element.style[be]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return v(this.manager.recognizers,(function(t){x(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(T(e,Pe))return Pe;var t=T(e,ke),n=T(e,Ce);return t&&n?Pe:t||n?t?ke:Ce:T(e,xe)?xe:_e}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=T(i,Pe)&&!Se.none,o=T(i,Ce)&&!Se["pan-y"],a=T(i,ke)&&!Se["pan-x"];if(r){var s=1===e.pointers.length,u=e.distance<2,c=e.deltaTime<250;if(s&&u&&c)return}if(!a||!o)return r||o&&6&n||a&&24&n?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var Ee=32;function Ie(e){this.options=u({},this.defaults,e||{}),this.id=O++,this.manager=null,this.options.enable=P(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Re(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Me(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function Le(e,t){var n=t.manager;return n?n.get(e):e}function Oe(){Ie.apply(this,arguments)}function Ne(){Oe.apply(this,arguments),this.pX=null,this.pY=null}function Ae(){Oe.apply(this,arguments)}function De(){Ie.apply(this,arguments),this._timer=null,this._input=null}function Be(){Oe.apply(this,arguments)}function Ue(){Oe.apply(this,arguments)}function Fe(){Ie.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function je(e,t){return(t=t||{}).recognizers=P(t.recognizers,je.defaults.preset),new $e(e,t)}function $e(e,t){this.options=u({},je.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new(this.options.inputClass||(D?re:B?de:A?fe:Q))(this,z),this.touchAction=new Te(this,this.options.touchAction),We(this,!0),v(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function We(e,t){var n,i=e.element;i.style&&(v(e.options.cssProps,(function(r,o){n=L(i.style,o),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Ie.prototype={defaults:{},set:function(e){return u(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(g(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Le(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return g(e,"dropRecognizeWith",this)||(e=Le(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(g(e,"requireFailure",this))return this;var t=this.requireFail;return-1===I(t,e=Le(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(g(e,"dropRequireFailure",this))return this;e=Le(e,this);var t=I(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+Re(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+Re(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=Ee},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=u({},e);if(!x(this.options.enable,[this,t]))return this.reset(),void(this.state=Ee);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},w(Oe,Ie,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=6&t,r=this.attrTest(e);return i&&(8&n||!r)?16|t:i||r?4&n?8|t:2&t?4|t:2:Ee}}),w(Ne,Oe,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(Ce),24&e&&t.push(ke),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(6&t.direction?(r=0===o?1:o<0?2:4,n=o!=this.pX,i=Math.abs(e.deltaX)):(r=0===a?1:a<0?8:16,n=a!=this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},attrTest:function(e){return Oe.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Me(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),w(Ae,Oe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Pe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),w(De,Ie,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[_e]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!i||!n||12&e.eventType&&!r)this.reset();else if(1&e.eventType)this.reset(),this._timer=f((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return Ee},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),w(Be,Oe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Pe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),w(Ue,Oe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Ne.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:24&n&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&d(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Me(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),w(Fe,Ie,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[xe]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(i&&r&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||Y(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0==this.count%t.taps)return this.hasRequireFailures()?(this._timer=f((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return Ee},failTimeout:function(){return this._timer=f((function(){this.state=Ee}),this.options.interval,this),Ee},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),je.VERSION="2.0.7",je.defaults={domEvents:!1,touchAction:we,enable:!0,inputTarget:null,inputClass:null,preset:[[Be,{enable:!1}],[Ae,{enable:!1},["rotate"]],[Ue,{direction:6}],[Ne,{direction:6},["swipe"]],[Fe],[Fe,{event:"doubletap",taps:2},["tap"]],[De]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},$e.prototype={set:function(e){return u(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var i=this.recognizers,r=t.curRecognizer;(!r||r&&8&r.state)&&(r=t.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===t.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&14&n.state&&(r=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Ie)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(g(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(g(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=I(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==s&&t!==s){var n=this.handlers;return v(E(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==s){var n=this.handlers;return v(E(e),(function(e){t?n[e]&&n[e].splice(I(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var n=o.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},destroy:function(){this.element&&We(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(je,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Ee,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:$e,Input:W,TouchAction:Te,TouchInput:de,MouseInput:Q,PointerEventInput:re,TouchMouseInput:fe,SingleTouchInput:ue,Recognizer:Ie,AttrRecognizer:Oe,Tap:Fe,Pan:Ne,Swipe:Ue,Pinch:Ae,Rotate:Be,Press:De,on:k,off:C,each:v,merge:y,extend:b,assign:u,inherit:w,bindFn:_,prefixed:L}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=je,(i=function(){return je}.call(t,n,t,e))===s||(e.exports=i)}(window,document)},4581:function(e,t,n){!function(e,t,n){var i,r,o,a,s,u,c,l,h,d,p,f,g,v,m,b,y,w,_,x,P,k,C,S,T,E,I,R,M,L,O,N,A,D={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return e(this).attr("href")},title:function(){return this.title},createImg:function(){var t=new Image,n=e(this).data("cbox-img-attrs");return"object"==typeof n&&e.each(n,(function(e,n){t[e]=n})),t},createIframe:function(){var n=t.createElement("iframe"),i=e(this).data("cbox-iframe-attrs");return"object"==typeof i&&e.each(i,(function(e,t){n[e]=t})),"frameBorder"in n&&(n.frameBorder=0),"allowTransparency"in n&&(n.allowTransparency="true"),n.name=(new Date).getTime(),n.allowFullscreen=!0,n}},B="colorbox",U="cboxElement",F="cbox_load",j="cbox_complete",$="cbox_cleanup",W="cbox_closed",z="cbox_purge",V=e("<a/>"),H="div",q=0,X={};function Y(n,i,r){var o=t.createElement(n);return i&&(o.id="cbox"+i),r&&(o.style.cssText=r),e(o)}function G(){return n.innerHeight?n.innerHeight:e(n).height()}function Z(t,n){n!==Object(n)&&(n={}),this.cache={},this.el=t,this.value=function(t){var i;return void 0===this.cache[t]&&(void 0!==(i=e(this.el).attr("data-cbox-"+t))?this.cache[t]=i:void 0!==n[t]?this.cache[t]=n[t]:void 0!==D[t]&&(this.cache[t]=D[t])),this.cache[t]},this.get=function(t){var n=this.value(t);return e.isFunction(n)?n.call(this.el,this):n}}function K(e){var t=h.length,n=(E+e)%t;return n<0?t+n:n}function J(e,t){return Math.round((/%/.test(e)?("x"===t?d.width():G())/100:1)*parseInt(e,10))}function Q(e,t){return e.get("photo")||e.get("photoRegex").test(t)}function ee(e,t){return e.get("retinaUrl")&&n.devicePixelRatio>1?t.replace(e.get("photoRegex"),e.get("retinaSuffix")):t}function te(e){"contains"in r[0]&&!r[0].contains(e.target)&&e.target!==i[0]&&(e.stopPropagation(),r.focus())}function ne(e){ne.str!==e&&(r.add(i).removeClass(ne.str).addClass(e),ne.str=e)}function ie(n){e(t).trigger(n),V.triggerHandler(n)}var re=function(){var e,t,n="cboxSlideshow_",i="click.cbox";function o(){clearTimeout(t)}function a(){(P.get("loop")||h[E+1])&&(o(),t=setTimeout(N.next,P.get("slideshowSpeed")))}function s(){b.html(P.get("slideshowStop")).unbind(i).one(i,u),V.bind(j,a).bind(F,o),r.removeClass(n+"off").addClass(n+"on")}function u(){o(),V.unbind(j,a).unbind(F,o),b.html(P.get("slideshowStart")).unbind(i).one(i,(function(){N.next(),s()})),r.removeClass(n+"on").addClass(n+"off")}function c(){e=!1,b.hide(),o(),V.unbind(j,a).unbind(F,o),r.removeClass(n+"off "+n+"on")}return function(){e?P.get("slideshow")||(V.unbind($,c),c()):P.get("slideshow")&&h[1]&&(e=!0,V.one($,c),P.get("slideshowAuto")?s():u(),b.show())}}();function oe(o){var d,m;if(!L){if(d=e(o).data(B),P=new Z(o,d),m=P.get("rel"),E=0,m&&!1!==m&&"nofollow"!==m?(h=e(".cboxElement").filter((function(){return new Z(this,e.data(this,B)).get("rel")===m})),-1===(E=h.index(P.el))&&(h=h.add(P.el),E=h.length-1)):h=e(P.el),!R){R=M=!0,ne(P.get("className")),r.css({visibility:"hidden",display:"block",opacity:""}),p=Y(H,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),a.css({width:"",height:""}).append(p),k=s.height()+l.height()+a.outerHeight(!0)-a.height(),C=u.width()+c.width()+a.outerWidth(!0)-a.width(),S=p.outerHeight(!0),T=p.outerWidth(!0);var b=J(P.get("initialWidth"),"x"),y=J(P.get("initialHeight"),"y"),w=P.get("maxWidth"),A=P.get("maxHeight");P.w=Math.max((!1!==w?Math.min(b,J(w,"x")):b)-T-C,0),P.h=Math.max((!1!==A?Math.min(y,J(A,"y")):y)-S-k,0),p.css({width:"",height:P.h}),N.position(),ie("cbox_open"),P.get("onOpen"),x.add(v).hide(),r.focus(),P.get("trapFocus")&&t.addEventListener&&(t.addEventListener("focus",te,!0),V.one(W,(function(){t.removeEventListener("focus",te,!0)}))),P.get("returnFocus")&&V.one(W,(function(){e(P.el).focus()}))}var D=parseFloat(P.get("opacity"));i.css({opacity:D==D?D:"",cursor:P.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),P.get("closeButton")?_.html(P.get("close")).appendTo(a):_.appendTo("<div/>"),function(){var t,i,r,o=N.prep,a=++q;if(M=!0,I=!1,ie(z),ie(F),P.get("onLoad"),P.h=P.get("height")?J(P.get("height"),"y")-S-k:P.get("innerHeight")&&J(P.get("innerHeight"),"y"),P.w=P.get("width")?J(P.get("width"),"x")-T-C:P.get("innerWidth")&&J(P.get("innerWidth"),"x"),P.mw=P.w,P.mh=P.h,P.get("maxWidth")&&(P.mw=J(P.get("maxWidth"),"x")-T-C,P.mw=P.w&&P.w<P.mw?P.w:P.mw),P.get("maxHeight")&&(P.mh=J(P.get("maxHeight"),"y")-S-k,P.mh=P.h&&P.h<P.mh?P.h:P.mh),t=P.get("href"),O=setTimeout((function(){g.show()}),100),P.get("inline")){var s=e(t).eq(0);r=e("<div>").hide().insertBefore(s),V.one(z,(function(){r.replaceWith(s)})),o(s)}else P.get("iframe")?o(" "):P.get("html")?o(P.get("html")):Q(P,t)?(t=ee(P,t),I=P.get("createImg"),e(I).addClass("cboxPhoto").bind("error.cbox",(function(){o(Y(H,"Error").html(P.get("imgError")))})).one("load",(function(){a===q&&setTimeout((function(){var t;P.get("retinaImage")&&n.devicePixelRatio>1&&(I.height=I.height/n.devicePixelRatio,I.width=I.width/n.devicePixelRatio),P.get("scalePhotos")&&(i=function(){I.height-=I.height*t,I.width-=I.width*t},P.mw&&I.width>P.mw&&(t=(I.width-P.mw)/I.width,i()),P.mh&&I.height>P.mh&&(t=(I.height-P.mh)/I.height,i())),P.h&&(I.style.marginTop=Math.max(P.mh-I.height,0)/2+"px"),h[1]&&(P.get("loop")||h[E+1])&&(I.style.cursor="pointer",e(I).bind("click.cbox",(function(){N.next()}))),I.style.width=I.width+"px",I.style.height=I.height+"px",o(I)}),1)})),I.src=t):t&&f.load(t,P.get("data"),(function(t,n){a===q&&o("error"===n?Y(H,"Error").html(P.get("xhrError")):e(this).contents())}))}()}}function ae(){r||(A=!1,d=e(n),r=Y(H).attr({id:B,class:!1===e.support.opacity?"cboxIE":"",role:"dialog",tabindex:"-1"}).hide(),i=Y(H,"Overlay").hide(),g=e([Y(H,"LoadingOverlay")[0],Y(H,"LoadingGraphic")[0]]),o=Y(H,"Wrapper"),a=Y(H,"Content").append(v=Y(H,"Title"),m=Y(H,"Current"),w=e('<button type="button"/>').attr({id:"cboxPrevious"}),y=e('<button type="button"/>').attr({id:"cboxNext"}),b=e('<button type="button"/>').attr({id:"cboxSlideshow"}),g),_=e('<button type="button"/>').attr({id:"cboxClose"}),o.append(Y(H).append(Y(H,"TopLeft"),s=Y(H,"TopCenter"),Y(H,"TopRight")),Y(H,!1,"clear:left").append(u=Y(H,"MiddleLeft"),a,c=Y(H,"MiddleRight")),Y(H,!1,"clear:left").append(Y(H,"BottomLeft"),l=Y(H,"BottomCenter"),Y(H,"BottomRight"))).find("div div").css({float:"left"}),f=Y(H,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),x=y.add(w).add(m).add(b)),t.body&&!r.parent().length&&e(t.body).append(i,r.append(o,f))}e.colorbox||(e(ae),(N=e.fn.colorbox=e.colorbox=function(n,o){var a=this;return n=n||{},e.isFunction(a)&&(a=e("<a/>"),n.open=!0),a[0]?(ae(),function(){function n(e){e.which>1||e.shiftKey||e.altKey||e.metaKey||e.ctrlKey||(e.preventDefault(),oe(this))}return!!r&&(A||(A=!0,y.click((function(){N.next()})),w.click((function(){N.prev()})),_.click((function(){N.close()})),i.click((function(){P.get("overlayClose")&&N.close()})),e(t).bind("keydown.cbox",(function(e){var t=e.keyCode;R&&P.get("escKey")&&27===t&&(e.preventDefault(),N.close()),R&&P.get("arrowKey")&&h[1]&&!e.altKey&&(37===t?(e.preventDefault(),w.click()):39===t&&(e.preventDefault(),y.click()))})),e.isFunction(e.fn.on)?e(t).on("click.cbox",".cboxElement",n):e(".cboxElement").live("click.cbox",n)),!0)}()&&(o&&(n.onComplete=o),a.each((function(){var t=e.data(this,B)||{};e.data(this,B,e.extend(t,n))})).addClass(U),new Z(a[0],n).get("open")&&oe(a[0])),a):a}).position=function(t,n){var i,h,p,f=0,g=0,v=r.offset();function m(){s[0].style.width=l[0].style.width=a[0].style.width=parseInt(r[0].style.width,10)-C+"px",a[0].style.height=u[0].style.height=c[0].style.height=parseInt(r[0].style.height,10)-k+"px"}if(d.unbind("resize.cbox"),r.css({top:-9e4,left:-9e4}),h=d.scrollTop(),p=d.scrollLeft(),P.get("fixed")?(v.top-=h,v.left-=p,r.css({position:"fixed"})):(f=h,g=p,r.css({position:"absolute"})),!1!==P.get("right")?g+=Math.max(d.width()-P.w-T-C-J(P.get("right"),"x"),0):!1!==P.get("left")?g+=J(P.get("left"),"x"):g+=Math.round(Math.max(d.width()-P.w-T-C,0)/2),!1!==P.get("bottom")?f+=Math.max(G()-P.h-S-k-J(P.get("bottom"),"y"),0):!1!==P.get("top")?f+=J(P.get("top"),"y"):f+=Math.round(Math.max(G()-P.h-S-k,0)/2),r.css({top:v.top,left:v.left,visibility:"visible"}),o[0].style.width=o[0].style.height="9999px",i={width:P.w+T+C,height:P.h+S+k,top:f,left:g},t){var b=0;e.each(i,(function(e){i[e]===X[e]||(b=t)})),t=b}X=i,t||r.css(i),r.dequeue().animate(i,{duration:t||0,complete:function(){m(),M=!1,o[0].style.width=P.w+T+C+"px",o[0].style.height=P.h+S+k+"px",P.get("reposition")&&setTimeout((function(){d.bind("resize.cbox",N.position)}),1),e.isFunction(n)&&n()},step:m})},N.resize=function(e){var t;R&&((e=e||{}).width&&(P.w=J(e.width,"x")-T-C),e.innerWidth&&(P.w=J(e.innerWidth,"x")),p.css({width:P.w}),e.height&&(P.h=J(e.height,"y")-S-k),e.innerHeight&&(P.h=J(e.innerHeight,"y")),e.innerHeight||e.height||(t=p.scrollTop(),p.css({height:"auto"}),P.h=p.height()),p.css({height:P.h}),t&&p.scrollTop(t),N.position("none"===P.get("transition")?0:P.get("speed")))},N.prep=function(n){if(R){var i,o="none"===P.get("transition")?0:P.get("speed");p.remove(),(p=Y(H,"LoadedContent").append(n)).hide().appendTo(f.show()).css({width:(P.w=P.w||p.width(),P.w=P.mw&&P.mw<P.w?P.mw:P.w,P.w),overflow:P.get("scrolling")?"auto":"hidden"}).css({height:(P.h=P.h||p.height(),P.h=P.mh&&P.mh<P.h?P.mh:P.h,P.h)}).prependTo(a),f.hide(),e(I).css({float:"none"}),ne(P.get("className")),i=function(){var n,i,a=h.length;function s(){!1===e.support.opacity&&r[0].style.removeAttribute("filter")}R&&(i=function(){clearTimeout(O),g.hide(),ie(j),P.get("onComplete")},v.html(P.get("title")).show(),p.show(),a>1?("string"==typeof P.get("current")&&m.html(P.get("current").replace("{current}",E+1).replace("{total}",a)).show(),y[P.get("loop")||E<a-1?"show":"hide"]().html(P.get("next")),w[P.get("loop")||E?"show":"hide"]().html(P.get("previous")),re(),P.get("preloading")&&e.each([K(-1),K(1)],(function(){var n=h[this],i=new Z(n,e.data(n,B)),r=i.get("href");r&&Q(i,r)&&(r=ee(i,r),t.createElement("img").src=r)}))):x.hide(),P.get("iframe")?(n=P.get("createIframe"),P.get("scrolling")||(n.scrolling="no"),e(n).attr({src:P.get("href"),class:"cboxIframe"}).one("load",i).appendTo(p),V.one(z,(function(){n.src="//about:blank"})),P.get("fastIframe")&&e(n).trigger("load")):i(),"fade"===P.get("transition")?r.fadeTo(o,1,s):s())},"fade"===P.get("transition")?r.fadeTo(o,0,(function(){N.position(0,i)})):N.position(o,i)}},N.next=function(){!M&&h[1]&&(P.get("loop")||h[E+1])&&(E=K(1),oe(h[E]))},N.prev=function(){!M&&h[1]&&(P.get("loop")||E)&&(E=K(-1),oe(h[E]))},N.close=function(){R&&!L&&(L=!0,R=!1,ie($),P.get("onCleanup"),d.unbind(".cbox"),i.fadeTo(P.get("fadeOut")||0,0),r.stop().fadeTo(P.get("fadeOut")||0,0,(function(){r.hide(),i.hide(),ie(z),p.remove(),setTimeout((function(){L=!1,ie(W),P.get("onClosed")}),1)})))},N.remove=function(){r&&(r.stop(),e.colorbox.close(),r.stop(!1,!0).remove(),i.remove(),L=!1,r=null,e(".cboxElement").removeData(B).removeClass(U),e(t).unbind("click.cbox").unbind("keydown.cbox"))},N.element=function(){return e(P.el)},N.settings=D)}(n(3609),document,window)},5557:function(e,t,n){!function(e){if(e.support.touch="ontouchend"in document,e.support.touch){var t,n=e.ui.mouse.prototype,i=n._mouseInit,r=n._mouseDestroy;n._touchStart=function(e){!t&&this._mouseCapture(e.originalEvent.changedTouches[0])&&(t=!0,this._touchMoved=!1,o(e,"mouseover"),o(e,"mousemove"),o(e,"mousedown"))},n._touchMove=function(e){t&&(this._touchMoved=!0,o(e,"mousemove"))},n._touchEnd=function(e){t&&(o(e,"mouseup"),o(e,"mouseout"),this._touchMoved||o(e,"click"),t=!1)},n._mouseInit=function(){var t=this;t.element.bind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),i.call(t)},n._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),r.call(t)}}function o(e,t){if(!(e.originalEvent.touches.length>1)){e.preventDefault();var n=e.originalEvent.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent(t,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}}}(n(3609))},3762:function(e,t,n){var i,r,o;r=[n(3609),n(5592)],void 0===(o="function"==typeof(i=function(e){var t,n="ui-effects-",i="ui-effects-style",r="ui-effects-animated",o=e;return e.effects={effect:{}},function(e,t){var n,i=/^([\-+])=\s*(\d+\.?\d*)/,r=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],o=e.Color=function(t,n,i,r){return new e.Color.fn.parse(t,n,i,r)},a={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},s={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},u=o.support={},c=e("<p>")[0],l=e.each;function h(e,t,n){var i=s[t.type]||{};return null==e?n||!t.def?null:t.def:(e=i.floor?~~e:parseFloat(e),isNaN(e)?t.def:i.mod?(e+i.mod)%i.mod:0>e?0:i.max<e?i.max:e)}function d(t){var i=o(),s=i._rgba=[];return t=t.toLowerCase(),l(r,(function(e,n){var r,o=n.re.exec(t),u=o&&n.parse(o),c=n.space||"rgba";if(u)return r=i[c](u),i[a[c].cache]=r[a[c].cache],s=i._rgba=r._rgba,!1})),s.length?("0,0,0,0"===s.join()&&e.extend(s,n.transparent),i):n[t]}function p(e,t,n){return 6*(n=(n+1)%1)<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}c.style.cssText="background-color:rgba(1,1,1,.5)",u.rgba=c.style.backgroundColor.indexOf("rgba")>-1,l(a,(function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}})),o.fn=e.extend(o.prototype,{parse:function(i,r,s,u){if(i===t)return this._rgba=[null,null,null,null],this;(i.jquery||i.nodeType)&&(i=e(i).css(r),r=t);var c=this,p=e.type(i),f=this._rgba=[];return r!==t&&(i=[i,r,s,u],p="array"),"string"===p?this.parse(d(i)||n._default):"array"===p?(l(a.rgba.props,(function(e,t){f[t.idx]=h(i[t.idx],t)})),this):"object"===p?(l(a,i instanceof o?function(e,t){i[t.cache]&&(c[t.cache]=i[t.cache].slice())}:function(t,n){var r=n.cache;l(n.props,(function(e,t){if(!c[r]&&n.to){if("alpha"===e||null==i[e])return;c[r]=n.to(c._rgba)}c[r][t.idx]=h(i[e],t,!0)})),c[r]&&e.inArray(null,c[r].slice(0,3))<0&&(c[r][3]=1,n.from&&(c._rgba=n.from(c[r])))}),this):void 0},is:function(e){var t=o(e),n=!0,i=this;return l(a,(function(e,r){var o,a=t[r.cache];return a&&(o=i[r.cache]||r.to&&r.to(i._rgba)||[],l(r.props,(function(e,t){if(null!=a[t.idx])return n=a[t.idx]===o[t.idx]}))),n})),n},_space:function(){var e=[],t=this;return l(a,(function(n,i){t[i.cache]&&e.push(n)})),e.pop()},transition:function(e,t){var n=o(e),i=n._space(),r=a[i],u=0===this.alpha()?o("transparent"):this,c=u[r.cache]||r.to(u._rgba),d=c.slice();return n=n[r.cache],l(r.props,(function(e,i){var r=i.idx,o=c[r],a=n[r],u=s[i.type]||{};null!==a&&(null===o?d[r]=a:(u.mod&&(a-o>u.mod/2?o+=u.mod:o-a>u.mod/2&&(o-=u.mod)),d[r]=h((a-o)*t+o,i)))})),this[i](d)},blend:function(t){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),r=o(t)._rgba;return o(e.map(n,(function(e,t){return(1-i)*r[t]+i*e})))},toRgbaString:function(){var t="rgba(",n=e.map(this._rgba,(function(e,t){return null==e?t>2?1:0:e}));return 1===n[3]&&(n.pop(),t="rgb("),t+n.join()+")"},toHslaString:function(){var t="hsla(",n=e.map(this.hsla(),(function(e,t){return null==e&&(e=t>2?1:0),t&&t<3&&(e=Math.round(100*e)+"%"),e}));return 1===n[3]&&(n.pop(),t="hsl("),t+n.join()+")"},toHexString:function(t){var n=this._rgba.slice(),i=n.pop();return t&&n.push(~~(255*i)),"#"+e.map(n,(function(e){return 1===(e=(e||0).toString(16)).length?"0"+e:e})).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),o.fn.parse.prototype=o.fn,a.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,n,i=e[0]/255,r=e[1]/255,o=e[2]/255,a=e[3],s=Math.max(i,r,o),u=Math.min(i,r,o),c=s-u,l=s+u,h=.5*l;return t=u===s?0:i===s?60*(r-o)/c+360:r===s?60*(o-i)/c+120:60*(i-r)/c+240,n=0===c?0:h<=.5?c/l:c/(2-l),[Math.round(t)%360,n,h,null==a?1:a]},a.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,n=e[1],i=e[2],r=e[3],o=i<=.5?i*(1+n):i+n-i*n,a=2*i-o;return[Math.round(255*p(a,o,t+1/3)),Math.round(255*p(a,o,t)),Math.round(255*p(a,o,t-1/3)),r]},l(a,(function(n,r){var a=r.props,s=r.cache,u=r.to,c=r.from;o.fn[n]=function(n){if(u&&!this[s]&&(this[s]=u(this._rgba)),n===t)return this[s].slice();var i,r=e.type(n),d="array"===r||"object"===r?n:arguments,p=this[s].slice();return l(a,(function(e,t){var n=d["object"===r?e:t.idx];null==n&&(n=p[t.idx]),p[t.idx]=h(n,t)})),c?((i=o(c(p)))[s]=p,i):o(p)},l(a,(function(t,r){o.fn[t]||(o.fn[t]=function(o){var a,s=e.type(o),u="alpha"===t?this._hsla?"hsla":"rgba":n,c=this[u](),l=c[r.idx];return"undefined"===s?l:("function"===s&&(o=o.call(this,l),s=e.type(o)),null==o&&r.empty?this:("string"===s&&(a=i.exec(o))&&(o=l+parseFloat(a[2])*("+"===a[1]?1:-1)),c[r.idx]=o,this[u](c)))})}))})),o.hook=function(t){var n=t.split(" ");l(n,(function(t,n){e.cssHooks[n]={set:function(t,i){var r,a,s="";if("transparent"!==i&&("string"!==e.type(i)||(r=d(i)))){if(i=o(r||i),!u.rgba&&1!==i._rgba[3]){for(a="backgroundColor"===n?t.parentNode:t;(""===s||"transparent"===s)&&a&&a.style;)try{s=e.css(a,"backgroundColor"),a=a.parentNode}catch(e){}i=i.blend(s&&"transparent"!==s?s:"_default")}i=i.toRgbaString()}try{t.style[n]=i}catch(e){}}},e.fx.step[n]=function(t){t.colorInit||(t.start=o(t.elem,n),t.end=o(t.end),t.colorInit=!0),e.cssHooks[n].set(t.elem,t.start.transition(t.end,t.pos))}}))},o.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),e.cssHooks.borderColor={expand:function(e){var t={};return l(["Top","Right","Bottom","Left"],(function(n,i){t["border"+i+"Color"]=e})),t}},n=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(o),function(){var t,n=["add","remove","toggle"],i={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function r(t){var n,i,r=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)"string"==typeof r[n=r[i]]&&(o[e.camelCase(n)]=r[n]);else for(n in r)"string"==typeof r[n]&&(o[n]=r[n]);return o}e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(t,n){e.fx.step[n]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(o.style(e.elem,n,e.end),e.setAttr=!0)}})),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(t,o,a,s){var u=e.speed(o,a,s);return this.queue((function(){var o,a=e(this),s=a.attr("class")||"",c=u.children?a.find("*").addBack():a;c=c.map((function(){return{el:e(this),start:r(this)}})),(o=function(){e.each(n,(function(e,n){t[n]&&a[n+"Class"](t[n])}))})(),c=c.map((function(){return this.end=r(this.el[0]),this.diff=function(t,n){var r,o,a={};for(r in n)o=n[r],t[r]!==o&&(i[r]||!e.fx.step[r]&&isNaN(parseFloat(o))||(a[r]=o));return a}(this.start,this.end),this})),a.attr("class",s),c=c.map((function(){var t=this,n=e.Deferred(),i=e.extend({},u,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,i),n.promise()})),e.when.apply(e,c.get()).done((function(){o(),e.each(arguments,(function(){var t=this.el;e.each(this.diff,(function(e){t.css(e,"")}))})),u.complete.call(a[0])}))}))},e.fn.extend({addClass:(t=e.fn.addClass,function(n,i,r,o){return i?e.effects.animateClass.call(this,{add:n},i,r,o):t.apply(this,arguments)}),removeClass:function(t){return function(n,i,r,o){return arguments.length>1?e.effects.animateClass.call(this,{remove:n},i,r,o):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(n,i,r,o,a){return"boolean"==typeof i||void 0===i?r?e.effects.animateClass.call(this,i?{add:n}:{remove:n},r,o,a):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:n},i,r,o)}}(e.fn.toggleClass),switchClass:function(t,n,i,r,o){return e.effects.animateClass.call(this,{add:n,remove:t},i,r,o)}})}(),function(){var t;function o(t,n,i,r){return e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},null==n&&(n={}),e.isFunction(n)&&(r=n,i=null,n={}),("number"==typeof n||e.fx.speeds[n])&&(r=i,i=n,n={}),e.isFunction(i)&&(r=i,i=null),n&&e.extend(t,n),i=i||n.duration,t.duration=e.fx.off?0:"number"==typeof i?i:i in e.fx.speeds?e.fx.speeds[i]:e.fx.speeds._default,t.complete=r||n.complete,t}function a(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||"string"==typeof t&&!e.effects.effect[t]||!!e.isFunction(t)||"object"==typeof t&&!t.effect}function s(e,t){var n=t.outerWidth(),i=t.outerHeight(),r=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,n,i,0];return{top:parseFloat(r[1])||0,right:"auto"===r[2]?n:parseFloat(r[2]),bottom:"auto"===r[3]?i:parseFloat(r[3]),left:parseFloat(r[4])||0}}e.expr&&e.expr.filters&&e.expr.filters.animated&&(e.expr.filters.animated=(t=e.expr.filters.animated,function(n){return!!e(n).data(r)||t(n)})),!1!==e.uiBackCompat&&e.extend(e.effects,{save:function(e,t){for(var i=0,r=t.length;i<r;i++)null!==t[i]&&e.data(n+t[i],e[0].style[t[i]])},restore:function(e,t){for(var i,r=0,o=t.length;r<o;r++)null!==t[r]&&(i=e.data(n+t[r]),e.css(t[r],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var n={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},i=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:t.width(),height:t.height()},o=document.activeElement;try{o.id}catch(e){o=document.body}return t.wrap(i),(t[0]===o||e.contains(t[0],o))&&e(o).trigger("focus"),i=t.parent(),"static"===t.css("position")?(i.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],(function(e,i){n[i]=t.css(i),isNaN(parseInt(n[i],10))&&(n[i]="auto")})),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(r),i.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).trigger("focus")),t}}),e.extend(e.effects,{version:"1.12.1",define:function(t,n,i){return i||(i=n,n="effect"),e.effects.effect[t]=i,e.effects.effect[t].mode=n,i},scaledDimensions:function(e,t,n){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var i="horizontal"!==n?(t||100)/100:1,r="vertical"!==n?(t||100)/100:1;return{height:e.height()*r,width:e.width()*i,outerHeight:e.outerHeight()*r,outerWidth:e.outerWidth()*i}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,n){var i=e.queue();t>1&&i.splice.apply(i,[1,0].concat(i.splice(t,n))),e.dequeue()},saveStyle:function(e){e.data(i,e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data(i)||"",e.removeData(i)},mode:function(e,t){var n=e.is(":hidden");return"toggle"===t&&(t=n?"show":"hide"),(n?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var n,i;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=e[1]/t.width}return{x:i,y:n}},createPlaceholder:function(t){var i,r=t.css("position"),o=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(r)&&(r="absolute",i=e("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(n+"placeholder",i)),t.css({position:r,left:o.left,top:o.top}),i},removePlaceholder:function(e){var t=n+"placeholder",i=e.data(t);i&&(i.remove(),e.removeData(t))},cleanUp:function(t){e.effects.restoreStyle(t),e.effects.removePlaceholder(t)},setTransition:function(t,n,i,r){return r=r||{},e.each(n,(function(e,n){var o=t.cssUnit(n);o[0]>0&&(r[n]=o[0]*i+o[1])})),r}}),e.fn.extend({effect:function(){var t=o.apply(this,arguments),n=e.effects.effect[t.effect],i=n.mode,a=t.queue,s=a||"fx",u=t.complete,c=t.mode,l=[],h=function(t){var n=e(this),o=e.effects.mode(n,c)||i;n.data(r,!0),l.push(o),i&&("show"===o||o===i&&"hide"===o)&&n.show(),i&&"none"===o||e.effects.saveStyle(n),e.isFunction(t)&&t()};if(e.fx.off||!n)return c?this[c](t.duration,u):this.each((function(){u&&u.call(this)}));function d(o){var a=e(this);function s(){e.isFunction(u)&&u.call(a[0]),e.isFunction(o)&&o()}t.mode=l.shift(),!1===e.uiBackCompat||i?"none"===t.mode?(a[c](),s()):n.call(a[0],t,(function(){a.removeData(r),e.effects.cleanUp(a),"hide"===t.mode&&a.hide(),s()})):(a.is(":hidden")?"hide"===c:"show"===c)?(a[c](),s()):n.call(a[0],t,s)}return!1===a?this.each(h).each(d):this.queue(s,h).queue(s,d)},show:function(e){return function(t){if(a(t))return e.apply(this,arguments);var n=o.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(e.fn.show),hide:function(e){return function(t){if(a(t))return e.apply(this,arguments);var n=o.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(e.fn.hide),toggle:function(e){return function(t){if(a(t)||"boolean"==typeof t)return e.apply(this,arguments);var n=o.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(e.fn.toggle),cssUnit:function(t){var n=this.css(t),i=[];return e.each(["em","px","%","pt"],(function(e,t){n.indexOf(t)>0&&(i=[parseFloat(n),t])})),i},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):s(this.css("clip"),this)},transfer:function(t,n){var i=e(this),r=e(t.to),o="fixed"===r.css("position"),a=e("body"),s=o?a.scrollTop():0,u=o?a.scrollLeft():0,c=r.offset(),l={top:c.top-s,left:c.left-u,height:r.innerHeight(),width:r.innerWidth()},h=i.offset(),d=e("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(t.className).css({top:h.top-s,left:h.left-u,height:i.innerHeight(),width:i.innerWidth(),position:o?"fixed":"absolute"}).animate(l,t.duration,t.easing,(function(){d.remove(),e.isFunction(n)&&n()}))}}),e.fx.step.clip=function(t){t.clipInit||(t.start=e(t.elem).cssClip(),"string"==typeof t.end&&(t.end=s(t.end,t.elem)),t.clipInit=!0),e(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),t={},e.each(["Quad","Cubic","Quart","Quint","Expo"],(function(e,n){t[n]=function(t){return Math.pow(t,e+2)}})),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,(function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?n(2*e)/2:1-n(-2*e+2)/2}})),e.effects})?i.apply(t,r):i)||(e.exports=o)},1870:function(e,t,n){var i,r,o;r=[n(3609),n(5592)],void 0===(o="function"==typeof(i=function(e){return e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())})?i.apply(t,r):i)||(e.exports=o)},7053:function(e,t,n){var i,r,o;r=[n(3609),n(5592)],void 0===(o="function"==typeof(i=function(e){return e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?i.apply(t,r):i)||(e.exports=o)},5592:function(e,t,n){var i,r,o;r=[n(3609)],void 0===(o="function"==typeof(i=function(e){return e.ui=e.ui||{},e.ui.version="1.12.1"})?i.apply(t,r):i)||(e.exports=o)},6891:function(e,t,n){var i,r,o;r=[n(3609),n(5592)],void 0===(o="function"==typeof(i=function(e){var t,n=0,i=Array.prototype.slice;return e.cleanData=(t=e.cleanData,function(n){var i,r,o;for(o=0;null!=(r=n[o]);o++)try{(i=e._data(r,"events"))&&i.remove&&e(r).triggerHandler("remove")}catch(e){}t(n)}),e.widget=function(t,n,i){var r,o,a,s={},u=t.split(".")[0],c=u+"-"+(t=t.split(".")[1]);return i||(i=n,n=e.Widget),e.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr[":"][c.toLowerCase()]=function(t){return!!e.data(t,c)},e[u]=e[u]||{},r=e[u][t],o=e[u][t]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,r,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),(a=new n).options=e.widget.extend({},a.options),e.each(i,(function(t,i){e.isFunction(i)?s[t]=function(){function e(){return n.prototype[t].apply(this,arguments)}function r(e){return n.prototype[t].apply(this,e)}return function(){var t,n=this._super,o=this._superApply;return this._super=e,this._superApply=r,t=i.apply(this,arguments),this._super=n,this._superApply=o,t}}():s[t]=i})),o.prototype=e.widget.extend(a,{widgetEventPrefix:r&&a.widgetEventPrefix||t},s,{constructor:o,namespace:u,widgetName:t,widgetFullName:c}),r?(e.each(r._childConstructors,(function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,o,n._proto)})),delete r._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var n,r,o=i.call(arguments,1),a=0,s=o.length;a<s;a++)for(n in o[a])r=o[a][n],o[a].hasOwnProperty(n)&&void 0!==r&&(e.isPlainObject(r)?t[n]=e.isPlainObject(t[n])?e.widget.extend({},t[n],r):e.widget.extend({},r):t[n]=r);return t},e.widget.bridge=function(t,n){var r=n.prototype.widgetFullName||t;e.fn[t]=function(o){var a="string"==typeof o,s=i.call(arguments,1),u=this;return a?this.length||"instance"!==o?this.each((function(){var n,i=e.data(this,r);return"instance"===o?(u=i,!1):i?e.isFunction(i[o])&&"_"!==o.charAt(0)?(n=i[o].apply(i,s))!==i&&void 0!==n?(u=n&&n.jquery?u.pushStack(n.get()):n,!1):void 0:e.error("no such method '"+o+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")})):u=void 0:(s.length&&(o=e.widget.extend.apply(null,[o].concat(s))),this.each((function(){var t=e.data(this,r);t?(t.option(o||{}),t._init&&t._init()):e.data(this,r,new n(o,this))}))),u}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,(function(e,n){t._removeClass(n,e)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,r,o,a=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(a={},i=t.split("."),t=i.shift(),i.length){for(r=a[t]=e.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)r[i[o]]=r[i[o]]||{},r=r[i[o]];if(t=i.pop(),1===arguments.length)return void 0===r[t]?null:r[t];r[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];a[t]=n}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var n,i,r;for(n in t)r=this.classesElementLookup[n],t[n]!==this.options.classes[n]&&r&&r.length&&(i=e(r.get()),this._removeClass(r,n),i.addClass(this._classes({element:i,keys:n,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){var n=[],i=this;function r(r,o){var a,s;for(s=0;s<r.length;s++)a=i.classesElementLookup[r[s]]||e(),a=t.add?e(e.unique(a.get().concat(t.element.get()))):e(a.not(t.element).get()),i.classesElementLookup[r[s]]=a,n.push(r[s]),o&&t.classes[r[s]]&&n.push(t.classes[r[s]])}return t=e.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&r(t.keys.match(/\S+/g)||[],!0),t.extra&&r(t.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(t){var n=this;e.each(n.classesElementLookup,(function(i,r){-1!==e.inArray(t.target,r)&&(n.classesElementLookup[i]=e(r.not(t.target).get()))}))},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,i){i="boolean"==typeof i?i:n;var r="string"==typeof e||null===e,o={extra:r?t:n,keys:r?e:t,element:r?this.element:e,add:i};return o.element.toggleClass(this._classes(o),i),this},_on:function(t,n,i){var r,o=this;"boolean"!=typeof t&&(i=n,n=t,t=!1),i?(n=r=e(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,r=this.widget()),e.each(i,(function(i,a){function s(){if(t||!0!==o.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(s.guid=a.guid=a.guid||s.guid||e.guid++);var u=i.match(/^([\w:-]*)\s*(.*)$/),c=u[1]+o.eventNamespace,l=u[2];l?r.on(c,l,s):n.on(c,s)}))},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(n).off(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){var n=this;return setTimeout((function(){return("string"==typeof e?n[e]:e).apply(n,arguments)}),t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,n,i){var r,o,a=this.options[t];if(i=i||{},(n=e.Event(n)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(r in o)r in n||(n[r]=o[r]);return this.element.trigger(n,i),!(e.isFunction(a)&&!1===a.apply(this.element[0],[n].concat(i))||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},(function(t,n){e.Widget.prototype["_"+t]=function(i,r,o){var a;"string"==typeof r&&(r={effect:r});var s=r?!0===r||"number"==typeof r?n:r.effect||n:t;"number"==typeof(r=r||{})&&(r={duration:r}),a=!e.isEmptyObject(r),r.complete=o,r.delay&&i.delay(r.delay),a&&e.effects&&e.effects.effect[s]?i[t](r):s!==t&&i[s]?i[s](r.duration,r.easing,o):i.queue((function(n){e(this)[t](),o&&o.call(i[0]),n()}))}})),e.widget})?i.apply(t,r):i)||(e.exports=o)},6177:function(e,t,n){var i,r,o;r=[n(3609),n(1870),n(5592),n(6891)],void 0===(o="function"==typeof(i=function(e){var t=!1;return e(document).on("mouseup",(function(){t=!1})),e.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,(function(e){return t._mouseDown(e)})).on("click."+this.widgetName,(function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!t){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var i=this,r=1===n.which,o=!("string"!=typeof this.options.cancel||!n.target.nodeName)&&e(n.target).closest(this.options.cancel).length;return!(r&&!o&&this._mouseCapture(n)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){i.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=!1!==this._mouseStart(n),!this._mouseStarted)?(n.preventDefault(),0):(!0===e.data(n.target,this.widgetName+".preventClickEvent")&&e.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),t=!0,0)))}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(n){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,n.target===this._mouseDownEvent.target&&e.data(n.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(n)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,t=!1,n.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})?i.apply(t,r):i)||(e.exports=o)},6227:function(e,t,n){var i,r,o;r=[n(3609),n(6177),n(7053),n(5592),n(6891)],void 0===(o="function"==typeof(i=function(e){return e.widget("ui.slider",e.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,n,i=this.options,r=this.element.find(".ui-slider-handle"),o=[];for(n=i.values&&i.values.length||1,r.length>n&&(r.slice(n).remove(),r=r.slice(0,n)),t=r.length;t<n;t++)o.push("<span tabindex='0'></span>");this.handles=r.add(e(o.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each((function(t){e(this).data("ui-slider-handle-index",t).attr("tabIndex",0)}))},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=e("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var n,i,r,o,a,s,u,c=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(n),r=this._valueMax()-this._valueMin()+1,this.handles.each((function(t){var n=Math.abs(i-c.values(t));(r>n||r===n&&(t===c._lastChangedValue||c.values(t)===l.min))&&(r=n,o=e(this),a=t)})),!1!==this._start(t,a)&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),s=o.offset(),u=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:t.pageX-s.left-o.width()/2,top:t.pageY-s.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,a,i),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,i,r,o;return"horizontal"===this.orientation?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(i=n/t)>1&&(i=1),i<0&&(i=0),"vertical"===this.orientation&&(i=1-i),r=this._valueMax()-this._valueMin(),o=this._valueMin()+i*r,this._trimAlignValue(o)},_uiHash:function(e,t,n){var i={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(i.value=void 0!==t?t:this.values(e),i.values=n||this.values()),i},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,n){var i,r=this.value(),o=this.values();this._hasMultipleValues()&&(i=this.values(t?0:1),r=this.values(t),2===this.options.values.length&&!0===this.options.range&&(n=0===t?Math.min(i,n):Math.max(i,n)),o[t]=n),n!==r&&!1!==this._trigger("slide",e,this._uiHash(t,n,o))&&(this._hasMultipleValues()?this.values(t,n):this.value(n))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,n){var i,r,o;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this._hasMultipleValues()?this._values(t):this.value();for(i=this.options.values,r=arguments[0],o=0;o<i.length;o+=1)i[o]=this._trimAlignValue(r[o]),this._change(null,o);this._refreshValue()},_setOption:function(t,n){var i,r=0;switch("range"===t&&!0===this.options.range&&("min"===n?(this.options.value=this._values(0),this.options.values=null):"max"===n&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(r=this.options.values.length),this._super(t,n),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(n),this.handles.css("horizontal"===n?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=r-1;i>=0;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){var e=this.options.value;return this._trimAlignValue(e)},_values:function(e){var t,n,i;if(arguments.length)return t=this.options.values[e],this._trimAlignValue(t);if(this._hasMultipleValues()){for(n=this.options.values.slice(),i=0;i<n.length;i+=1)n[i]=this._trimAlignValue(n[i]);return n}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,i=e-n;return 2*Math.abs(n)>=t&&(i+=n>0?t:-t),parseFloat(i.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),n=this.options.step;(e=Math.round((e-t)/n)*n+t)>this.options.max&&(e-=n),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return-1===n?0:t.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,n,i,r,o,a=this.options.range,s=this.options,u=this,c=!this._animateOff&&s.animate,l={};this._hasMultipleValues()?this.handles.each((function(i){n=(u.values(i)-u._valueMin())/(u._valueMax()-u._valueMin())*100,l["horizontal"===u.orientation?"left":"bottom"]=n+"%",e(this).stop(1,1)[c?"animate":"css"](l,s.animate),!0===u.options.range&&("horizontal"===u.orientation?(0===i&&u.range.stop(1,1)[c?"animate":"css"]({left:n+"%"},s.animate),1===i&&u.range[c?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:s.animate})):(0===i&&u.range.stop(1,1)[c?"animate":"css"]({bottom:n+"%"},s.animate),1===i&&u.range[c?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:s.animate}))),t=n})):(i=this.value(),r=this._valueMin(),o=this._valueMax(),n=o!==r?(i-r)/(o-r)*100:0,l["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[c?"animate":"css"](l,s.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:n+"%"},s.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:100-n+"%"},s.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:n+"%"},s.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:100-n+"%"},s.animate))},_handleEvents:{keydown:function(t){var n,i,r,o=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(e(t.target),null,"ui-state-active"),!1===this._start(t,o)))return}switch(r=this.options.step,n=i=this._hasMultipleValues()?this.values(o):this.value(),t.keyCode){case e.ui.keyCode.HOME:i=this._valueMin();break;case e.ui.keyCode.END:i=this._valueMax();break;case e.ui.keyCode.PAGE_UP:i=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(n===this._valueMax())return;i=this._trimAlignValue(n+r);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(n===this._valueMin())return;i=this._trimAlignValue(n-r)}this._slide(t,o,i)},keyup:function(t){var n=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,n),this._change(t,n),this._removeClass(e(t.target),null,"ui-state-active"))}}})})?i.apply(t,r):i)||(e.exports=o)},5666:function(e){var t=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var r=t&&t.prototype instanceof v?t:v,o=Object.create(r.prototype),a=new E(i||[]);return o._invoke=function(e,t,n){var i=h;return function(r,o){if(i===p)throw new Error("Generator is already running");if(i===f){if("throw"===r)throw o;return R()}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var u=l(e,t,n);if("normal"===u.type){if(i=n.done?f:d,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=f,n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",f="completed",g={};function v(){}function m(){}function b(){}var y={};u(y,o,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(I([])));_&&_!==n&&i.call(_,o)&&(y=_);var x=b.prototype=v.prototype=Object.create(y);function P(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(r,o,a,s){var u=l(e[r],e,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&i.call(h,"__await")?t.resolve(h.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var r;this._invoke=function(e,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}}function C(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=l(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,g;var o=r.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:R}}function R(){return{value:t,done:!0}}return m.prototype=b,u(x,"constructor",b),u(b,"constructor",m),m.displayName=u(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},P(k.prototype),u(k.prototype,a,(function(){return this})),e.AsyncIterator=k,e.async=function(t,n,i,r,o){void 0===o&&(o=Promise);var a=new k(c(t,n,i,r),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(x),u(x,s,"Generator"),u(x,o,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=I,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(i,r){return s.type="throw",s.arg=e,n.next=i,r&&(n.method="next",n.arg=t),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:I(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},3609:function(e){"use strict";e.exports=jQuery},2148:function(e,t,n){"use strict";n.d(t,{oi:function(){return O},iv:function(){return M},Mo:function(){return _},dy:function(){return h.dy},Cb:function(){return P},IO:function(){return k}});var i=n(2105),r=n(4557);function o(e,t){const{element:{content:n},parts:i}=e,r=document.createTreeWalker(n,133,null,!1);let o=s(i),a=i[o],u=-1,c=0;const l=[];let h=null;for(;r.nextNode();){u++;const e=r.currentNode;for(e.previousSibling===h&&(h=null),t.has(e)&&(l.push(e),null===h&&(h=e)),null!==h&&c++;void 0!==a&&a.index===u;)a.index=null!==h?-1:a.index-c,o=s(i,o),a=i[o]}l.forEach((e=>e.parentNode.removeChild(e)))}const a=e=>{let t=11===e.nodeType?0:1;const n=document.createTreeWalker(e,133,null,!1);for(;n.nextNode();)t++;return t},s=(e,t=-1)=>{for(let n=t+1;n<e.length;n++){const t=e[n];if((0,r.pC)(t))return n}return-1};var u=n(8952),c=n(7630),l=n(1622),h=n(4971);const d=(e,t)=>`${e}--${t}`;let p=!0;void 0===window.ShadyCSS?p=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),p=!1);const f=e=>t=>{const n=d(t.type,e);let i=c.r.get(n);void 0===i&&(i={stringsArray:new WeakMap,keyString:new Map},c.r.set(n,i));let o=i.stringsArray.get(t.strings);if(void 0!==o)return o;const a=t.strings.join(r.Jw);if(o=i.keyString.get(a),void 0===o){const n=t.getTemplateElement();p&&window.ShadyCSS.prepareTemplateDom(n,e),o=new r.YS(t,n),i.keyString.set(a,o)}return i.stringsArray.set(t.strings,o),o},g=["html","svg"],v=new Set;window.JSCompiler_renameProperty=(e,t)=>e;const m={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},b=(e,t)=>t!==e&&(t==t||e==e),y={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:b};class w extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();const e=[];return this._classProperties.forEach(((t,n)=>{const i=this._attributeNameForProperty(n,t);void 0!==i&&(this._attributeToPropertyMap.set(i,n),e.push(i))})),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach(((e,t)=>this._classProperties.set(t,e)))}}static createProperty(e,t=y){if(this._ensureClassProperties(),this._classProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e))return;const n="symbol"==typeof e?Symbol():`__${e}`,i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Object.defineProperty(this.prototype,e,i)}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(i){const r=this[e];this[t]=i,this.requestUpdateInternal(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||y}static finalize(){const e=Object.getPrototypeOf(this);if(e.hasOwnProperty("finalized")||e.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const e=this.properties,t=[...Object.getOwnPropertyNames(e),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]];for(const n of t)this.createProperty(n,e[n])}}static _attributeNameForProperty(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t,n=b){return n(e,t)}static _propertyValueFromAttribute(e,t){const n=t.type,i=t.converter||m,r="function"==typeof i?i:i.fromAttribute;return r?r(e,n):e}static _propertyValueToAttribute(e,t){if(void 0===t.reflect)return;const n=t.type,i=t.converter;return(i&&i.toAttribute||m.toAttribute)(e,n)}initialize(){this._updateState=0,this._updatePromise=new Promise((e=>this._enableUpdatingResolver=e)),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach(((e,t)=>{if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,e)}}))}_applyInstanceProperties(){this._instanceProperties.forEach(((e,t)=>this[t]=e)),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,n){t!==n&&this._attributeToProperty(e,n)}_propertyToAttribute(e,t,n=y){const i=this.constructor,r=i._attributeNameForProperty(e,n);if(void 0!==r){const e=i._propertyValueToAttribute(t,n);if(void 0===e)return;this._updateState=8|this._updateState,null==e?this.removeAttribute(r):this.setAttribute(r,e),this._updateState=-9&this._updateState}}_attributeToProperty(e,t){if(8&this._updateState)return;const n=this.constructor,i=n._attributeToPropertyMap.get(e);if(void 0!==i){const e=n.getPropertyOptions(i);this._updateState=16|this._updateState,this[i]=n._propertyValueFromAttribute(t,e),this._updateState=-17&this._updateState}}requestUpdateInternal(e,t,n){let i=!0;if(void 0!==e){const r=this.constructor;n=n||r.getPropertyOptions(e),r._valueHasChanged(this[e],t,n.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==n.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,n))):i=!1}!this._hasRequestedUpdate&&i&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,t){return this.requestUpdateInternal(e,t),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(e){}const e=this.performUpdate();return null!=e&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let e=!1;const t=this._changedProperties;try{e=this.shouldUpdate(t),e?this.update(t):this._markUpdated()}catch(t){throw e=!1,this._markUpdated(),t}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach(((e,t)=>this._propertyToAttribute(t,this[t],e))),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}}w.finalized=!0;const _=e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:n,elements:i}=t;return{kind:n,elements:i,finisher(t){window.customElements.define(e,t)}}})(e,t),x=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?Object.assign(Object.assign({},t),{finisher(n){n.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(n){n.createProperty(t.key,e)}};function P(e){return(t,n)=>void 0!==n?((e,t,n)=>{t.constructor.createProperty(n,e)})(e,t,n):x(e,t)}function k(e,t){return(n,i)=>{const r={get(){return this.renderRoot.querySelector(e)},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof i?Symbol():`__${i}`;r.get=function(){return void 0===this[t]&&(this[t]=this.renderRoot.querySelector(e)),this[t]}}return void 0!==i?C(r,n,i):S(r,n)}}const C=(e,t,n)=>{Object.defineProperty(t,n,e)},S=(e,t)=>({kind:"method",placement:"prototype",key:t.key,descriptor:e}),T=Element.prototype;T.msMatchesSelector||T.webkitMatchesSelector;const E=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I=Symbol();class R{constructor(e,t){if(t!==I)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(E?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const M=(e,...t)=>{const n=t.reduce(((t,n,i)=>t+(e=>{if(e instanceof R)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[i+1]),e[0]);return new R(n,I)};(window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");const L={};class O extends w{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(Array.isArray(e)){const t=(e,n)=>e.reduceRight(((e,n)=>Array.isArray(n)?t(n,e):(e.add(n),e)),n),n=t(e,new Set),i=[];n.forEach((e=>i.unshift(e))),this._styles=i}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map((e=>{if(e instanceof CSSStyleSheet&&!E){const t=Array.prototype.slice.call(e.cssRules).reduce(((e,t)=>e+t.cssText),"");return new R(String(t),I)}return e}))}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?E?this.renderRoot.adoptedStyleSheets=e.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map((e=>e.cssText)),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==L&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)})))}render(){return L}}O.finalized=!0,O.render=(e,t,n)=>{if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");const r=n.scopeName,h=u.L.has(t),m=p&&11===t.nodeType&&!!t.host,b=m&&!v.has(r),y=b?document.createDocumentFragment():t;if((0,u.s)(e,y,Object.assign({templateFactory:f(r)},n)),b){const e=u.L.get(y);u.L.delete(y);((e,t,n)=>{v.add(e);const i=n?n.element:document.createElement("template"),r=t.querySelectorAll("style"),{length:u}=r;if(0===u)return void window.ShadyCSS.prepareTemplateStyles(i,e);const l=document.createElement("style");for(let e=0;e<u;e++){const t=r[e];t.parentNode.removeChild(t),l.textContent+=t.textContent}(e=>{g.forEach((t=>{const n=c.r.get(d(t,e));void 0!==n&&n.keyString.forEach((e=>{const{element:{content:t}}=e,n=new Set;Array.from(t.querySelectorAll("style")).forEach((e=>{n.add(e)})),o(e,n)}))}))})(e);const h=i.content;n?function(e,t,n=null){const{element:{content:i},parts:r}=e;if(null==n)return void i.appendChild(t);const o=document.createTreeWalker(i,133,null,!1);let u=s(r),c=0,l=-1;for(;o.nextNode();)for(l++,o.currentNode===n&&(c=a(t),n.parentNode.insertBefore(t,n));-1!==u&&r[u].index===l;){if(c>0){for(;-1!==u;)r[u].index+=c,u=s(r,u);return}u=s(r,u)}}(n,l,h.firstChild):h.insertBefore(l,h.firstChild),window.ShadyCSS.prepareTemplateStyles(i,e);const p=h.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==p)t.insertBefore(p.cloneNode(!0),t.firstChild);else if(n){h.insertBefore(l,h.firstChild);const e=new Set;e.add(l),o(n,e)}})(r,y,e.value instanceof l.R?e.value.template:void 0),(0,i.r4)(t,t.firstChild),t.appendChild(y),u.L.set(t,e)}!h&&m&&window.ShadyCSS.styleElement(t.host)}},7229:function(e,t,n){"use strict";n.d(t,{X:function(){return r},w:function(){return o}});const i=new WeakMap,r=e=>(...t)=>{const n=e(...t);return i.set(n,!0),n},o=e=>"function"==typeof e&&i.has(e)},2105:function(e,t,n){"use strict";n.d(t,{eC:function(){return i},V:function(){return r},r4:function(){return o}});const i="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,r=(e,t,n=null,i=null)=>{for(;t!==n;){const n=t.nextSibling;e.insertBefore(t,i),t=n}},o=(e,t,n=null)=>{for(;t!==n;){const n=t.nextSibling;e.removeChild(t),t=n}}},5356:function(e,t,n){"use strict";n.d(t,{J:function(){return i},L:function(){return r}});const i={},r={}},3602:function(e,t,n){"use strict";n.d(t,{pt:function(){return c},QG:function(){return h},_l:function(){return d},nt:function(){return p},JG:function(){return f},m:function(){return g},sL:function(){return v},K1:function(){return b}});var i=n(7229),r=n(2105),o=n(5356),a=n(1622),s=n(8817),u=n(4557);const c=e=>null===e||!("object"==typeof e||"function"==typeof e),l=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class h{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new d(this)}_getValue(){const e=this.strings,t=e.length-1,n=this.parts;if(1===t&&""===e[0]&&""===e[1]){const e=n[0].value;if("symbol"==typeof e)return String(e);if("string"==typeof e||!l(e))return e}let i="";for(let r=0;r<t;r++){i+=e[r];const t=n[r];if(void 0!==t){const e=t.value;if(c(e)||!l(e))i+="string"==typeof e?e:String(e);else for(const t of e)i+="string"==typeof t?t:String(t)}}return i+=e[t],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class d{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===o.J||c(e)&&e===this.value||(this.value=e,(0,i.w)(e)||(this.committer.dirty=!0))}commit(){for(;(0,i.w)(this.value);){const e=this.value;this.value=o.J,e(this)}this.value!==o.J&&this.committer.commit()}}class p{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild((0,u.IW)()),this.endNode=e.appendChild((0,u.IW)())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=(0,u.IW)()),e.__insert(this.endNode=(0,u.IW)())}insertAfterPart(e){e.__insert(this.startNode=(0,u.IW)()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(null===this.startNode.parentNode)return;for(;(0,i.w)(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=o.J,e(this)}const e=this.__pendingValue;e!==o.J&&(c(e)?e!==this.value&&this.__commitText(e):e instanceof s.j?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):l(e)?this.__commitIterable(e):e===o.L?(this.value=o.L,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof a.R&&this.value.template===t)this.value.update(e.values);else{const n=new a.R(t,e.processor,this.options),i=n._clone();n.update(e.values),this.__commitNode(i),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,i=0;for(const r of e)n=t[i],void 0===n&&(n=new p(this.options),t.push(n),0===i?n.appendIntoPart(this):n.insertAfterPart(t[i-1])),n.setValue(r),n.commit(),i++;i<t.length&&(t.length=i,this.clear(n&&n.endNode))}clear(e=this.startNode){(0,r.r4)(this.startNode.parentNode,e.nextSibling,this.endNode)}}class f{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;(0,i.w)(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=o.J,e(this)}if(this.__pendingValue===o.J)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=o.J}}class g extends h{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new v(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class v extends d{}let m=!1;(()=>{try{const e={get capture(){return m=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class b{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;(0,i.w)(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=o.J,e(this)}if(this.__pendingValue===o.J)return;const e=this.__pendingValue,t=this.value,n=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),r=null!=e&&(null==t||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),r&&(this.__options=y(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=o.J}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const y=e=>e&&(m?{capture:e.capture,passive:e.passive,once:e.once}:e.capture)},8952:function(e,t,n){"use strict";n.d(t,{L:function(){return a},s:function(){return s}});var i=n(2105),r=n(3602),o=n(7630);const a=new WeakMap,s=(e,t,n)=>{let s=a.get(t);void 0===s&&((0,i.r4)(t,t.firstChild),a.set(t,s=new r.nt(Object.assign({templateFactory:o.t},n))),s.appendInto(t)),s.setValue(e),s.commit()}},7630:function(e,t,n){"use strict";n.d(t,{t:function(){return r},r:function(){return o}});var i=n(4557);function r(e){let t=o.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},o.set(e.type,t));let n=t.stringsArray.get(e.strings);if(void 0!==n)return n;const r=e.strings.join(i.Jw);return n=t.keyString.get(r),void 0===n&&(n=new i.YS(e,e.getTemplateElement()),t.keyString.set(r,n)),t.stringsArray.set(e.strings,n),n}const o=new Map},1622:function(e,t,n){"use strict";n.d(t,{R:function(){return o}});var i=n(2105),r=n(4557);class o{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this.options=n}update(e){let t=0;for(const n of this.__parts)void 0!==n&&n.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=i.eC?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],n=this.template.parts,o=document.createTreeWalker(e,133,null,!1);let a,s=0,u=0,c=o.nextNode();for(;s<n.length;)if(a=n[s],(0,r.pC)(a)){for(;u<a.index;)u++,"TEMPLATE"===c.nodeName&&(t.push(c),o.currentNode=c.content),null===(c=o.nextNode())&&(o.currentNode=t.pop(),c=o.nextNode());if("node"===a.type){const e=this.processor.handleTextExpression(this.options);e.insertAfterNode(c.previousSibling),this.__parts.push(e)}else this.__parts.push(...this.processor.handleAttributeExpressions(c,a.name,a.strings,this.options));s++}else this.__parts.push(void 0),s++;return i.eC&&(document.adoptNode(e),customElements.upgrade(e)),e}}},8817:function(e,t,n){"use strict";n.d(t,{j:function(){return a}}),n(2105);var i=n(4557);const r=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),o=` ${i.Jw} `;class a{constructor(e,t,n,i){this.strings=e,this.values=t,this.type=n,this.processor=i}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let r=0;r<e;r++){const e=this.strings[r],a=e.lastIndexOf("\x3c!--");n=(a>-1||n)&&-1===e.indexOf("--\x3e",a+1);const s=i.W5.exec(e);t+=null===s?e+(n?o:i.N):e.substr(0,s.index)+s[1]+s[2]+i.$E+s[3]+i.Jw}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return void 0!==r&&(t=r.createHTML(t)),e.innerHTML=t,e}}},4557:function(e,t,n){"use strict";n.d(t,{Jw:function(){return i},N:function(){return r},$E:function(){return a},YS:function(){return s},pC:function(){return c},IW:function(){return l},W5:function(){return h}});const i=`{{lit-${String(Math.random()).slice(2)}}}`,r=`\x3c!--${i}--\x3e`,o=new RegExp(`${i}|${r}`),a="$lit$";class s{constructor(e,t){this.parts=[],this.element=t;const n=[],r=[],s=document.createTreeWalker(t.content,133,null,!1);let c=0,d=-1,p=0;const{strings:f,values:{length:g}}=e;for(;p<g;){const e=s.nextNode();if(null!==e){if(d++,1===e.nodeType){if(e.hasAttributes()){const t=e.attributes,{length:n}=t;let i=0;for(let e=0;e<n;e++)u(t[e].name,a)&&i++;for(;i-- >0;){const t=f[p],n=h.exec(t)[2],i=n.toLowerCase()+a,r=e.getAttribute(i);e.removeAttribute(i);const s=r.split(o);this.parts.push({type:"attribute",index:d,name:n,strings:s}),p+=s.length-1}}"TEMPLATE"===e.tagName&&(r.push(e),s.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(i)>=0){const i=e.parentNode,r=t.split(o),s=r.length-1;for(let t=0;t<s;t++){let n,o=r[t];if(""===o)n=l();else{const e=h.exec(o);null!==e&&u(e[2],a)&&(o=o.slice(0,e.index)+e[1]+e[2].slice(0,-a.length)+e[3]),n=document.createTextNode(o)}i.insertBefore(n,e),this.parts.push({type:"node",index:++d})}""===r[s]?(i.insertBefore(l(),e),n.push(e)):e.data=r[s],p+=s}}else if(8===e.nodeType)if(e.data===i){const t=e.parentNode;null!==e.previousSibling&&d!==c||(d++,t.insertBefore(l(),e)),c=d,this.parts.push({type:"node",index:d}),null===e.nextSibling?e.data="":(n.push(e),d--),p++}else{let t=-1;for(;-1!==(t=e.data.indexOf(i,t+1));)this.parts.push({type:"node",index:-1}),p++}}else s.currentNode=r.pop()}for(const e of n)e.parentNode.removeChild(e)}}const u=(e,t)=>{const n=e.length-t.length;return n>=0&&e.slice(n)===t},c=e=>-1!==e.index,l=()=>document.createComment(""),h=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/},4971:function(e,t,n){"use strict";n.d(t,{_l:function(){return i._l},nt:function(){return i.nt},sL:function(){return i.sL},IW:function(){return l.IW},XM:function(){return a.X},dy:function(){return h},Ld:function(){return u.L},r4:function(){return s.r4},sY:function(){return c.s},V:function(){return s.V}});var i=n(3602);const r=new class{handleAttributeExpressions(e,t,n,r){const o=t[0];return"."===o?new i.m(e,t.slice(1),n).parts:"@"===o?[new i.K1(e,t.slice(1),r.eventContext)]:"?"===o?[new i.JG(e,t.slice(1),n)]:new i.QG(e,t,n).parts}handleTextExpression(e){return new i.nt(e)}};var o=n(8817),a=n(7229),s=n(2105),u=n(5356),c=n(8952),l=(n(7630),n(1622),n(4557));"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.3.0");const h=(e,...t)=>new o.j(e,t,"html",r)}},__webpack_module_cache__={},deferred;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.m=__webpack_modules__,deferred=[],__webpack_require__.O=function(e,t,n,i){if(!t){var r=1/0;for(u=0;u<deferred.length;u++){t=deferred[u][0],n=deferred[u][1],i=deferred[u][2];for(var o=!0,a=0;a<t.length;a++)(!1&i||r>=i)&&Object.keys(__webpack_require__.O).every((function(e){return __webpack_require__.O[e](t[a])}))?t.splice(a--,1):(o=!1,i<r&&(r=i));if(o){deferred.splice(u--,1);var s=n();void 0!==s&&(e=s)}}return e}i=i||0;for(var u=deferred.length;u>0&&deferred[u-1][2]>i;u--)deferred[u]=deferred[u-1];deferred[u]=[t,n,i]},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e={898:0};__webpack_require__.O.j=function(t){return 0===e[t]};var t=function(t,n){var i,r,o=n[0],a=n[1],s=n[2],u=0;if(o.some((function(t){return 0!==e[t]}))){for(i in a)__webpack_require__.o(a,i)&&(__webpack_require__.m[i]=a[i]);if(s)var c=s(__webpack_require__)}for(t&&t(n);u<o.length;u++)r=o[u],__webpack_require__.o(e,r)&&e[r]&&e[r][0](),e[o[u]]=0;return __webpack_require__.O(c)},n=self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var __webpack_exports__=__webpack_require__(7570);__webpack_exports__=__webpack_require__.O(__webpack_exports__)})();
3
+ //# sourceMappingURL=BookReader.js.map