luckyphoenix 1.0.5 → 1.0.7

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 (588) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -4
  3. package/alist-web/README.md +34 -0
  4. package/alist-web/assets/2fa-legacy.3350d44d.js +1 -0
  5. package/alist-web/assets/2fa.0dab7189.js +1 -0
  6. package/alist-web/assets/About-legacy.e1597551.js +1 -0
  7. package/alist-web/assets/About.11e2f3bb.js +1 -0
  8. package/alist-web/assets/AddOrEdit-legacy.2a02db88.js +1 -0
  9. package/alist-web/assets/AddOrEdit-legacy.432f6c0e.js +1 -0
  10. package/alist-web/assets/AddOrEdit-legacy.6ac6f516.js +1 -0
  11. package/alist-web/assets/AddOrEdit.79c069f9.js +1 -0
  12. package/alist-web/assets/AddOrEdit.e641a9bd.js +1 -0
  13. package/alist-web/assets/AddOrEdit.f0ec5bf9.js +1 -0
  14. package/alist-web/assets/Common-legacy.5144e9c0.js +1 -0
  15. package/alist-web/assets/Common.6eff9060.js +1 -0
  16. package/alist-web/assets/Copy-legacy.3d846482.js +1 -0
  17. package/alist-web/assets/Copy.d1980101.js +1 -0
  18. package/alist-web/assets/DeletePopover-legacy.1906395c.js +1 -0
  19. package/alist-web/assets/DeletePopover.f7887d88.js +1 -0
  20. package/alist-web/assets/File-legacy.889dd355.js +1 -0
  21. package/alist-web/assets/File.23490613.js +1 -0
  22. package/alist-web/assets/Folder-legacy.a4550db5.js +29 -0
  23. package/alist-web/assets/Folder.7e9202ae.js +179 -0
  24. package/alist-web/assets/Folder.b511ba9e.css +1 -0
  25. package/alist-web/assets/FolderTree-legacy.2cffdb64.js +1 -0
  26. package/alist-web/assets/FolderTree.3d6d889d.js +1 -0
  27. package/alist-web/assets/Grid-legacy.a63ef469.js +1 -0
  28. package/alist-web/assets/Grid.7759c684.js +1 -0
  29. package/alist-web/assets/GridItem-legacy.2300a556.js +1 -0
  30. package/alist-web/assets/GridItem.5502f946.js +1 -0
  31. package/alist-web/assets/ImageWithError-legacy.184872e5.js +1 -0
  32. package/alist-web/assets/ImageWithError.fbebe083.js +1 -0
  33. package/alist-web/assets/Images-legacy.47953965.js +1 -0
  34. package/alist-web/assets/Images.cc1e423a.js +1 -0
  35. package/alist-web/assets/Layout-legacy.bbe308ea.js +1 -0
  36. package/alist-web/assets/Layout.683e33e3.js +6 -0
  37. package/alist-web/assets/List-legacy.dc5a2a38.js +1 -0
  38. package/alist-web/assets/List.249d43e3.js +1 -0
  39. package/alist-web/assets/Messenger-legacy.15747cf4.js +1 -0
  40. package/alist-web/assets/Messenger.0de50ee8.js +1 -0
  41. package/alist-web/assets/Metas-legacy.9a37ad69.js +1 -0
  42. package/alist-web/assets/Metas.94282135.js +1 -0
  43. package/alist-web/assets/Other-legacy.1defd90b.js +1 -0
  44. package/alist-web/assets/Other.c698471d.js +1 -0
  45. package/alist-web/assets/PackageDownload-legacy.13e43bb9.js +1 -0
  46. package/alist-web/assets/PackageDownload.89e4ecc4.js +1 -0
  47. package/alist-web/assets/Paginator-legacy.6f9f1dcb.js +1 -0
  48. package/alist-web/assets/Paginator.758bcfa3.js +1 -0
  49. package/alist-web/assets/Password-legacy.5e5cbd20.js +1 -0
  50. package/alist-web/assets/Password.500d1886.js +1 -0
  51. package/alist-web/assets/Profile-legacy.ccf1ddd4.js +1 -0
  52. package/alist-web/assets/Profile.33671ffe.js +1 -0
  53. package/alist-web/assets/ResponsiveGrid-legacy.d58d4dfe.js +1 -0
  54. package/alist-web/assets/ResponsiveGrid.04e247e9.js +1 -0
  55. package/alist-web/assets/S3-legacy.fb41a1b8.js +1 -0
  56. package/alist-web/assets/S3.135ba8ad.js +1 -0
  57. package/alist-web/assets/SettingItem-legacy.51bf5808.js +1 -0
  58. package/alist-web/assets/SettingItem.d9757149.js +1 -0
  59. package/alist-web/assets/SourceHanSansCN-Bold.b5627435.woff2 +0 -0
  60. package/alist-web/assets/Storages-legacy.6fe86e3a.js +1 -0
  61. package/alist-web/assets/Storages.22e89c36.js +1 -0
  62. package/alist-web/assets/Tasks-legacy.bcf4e457.js +1 -0
  63. package/alist-web/assets/Tasks.f607862a.js +1 -0
  64. package/alist-web/assets/TimesNewRoman.d9fb32eb.ttf +0 -0
  65. package/alist-web/assets/Upload-legacy.7dd2be21.js +1 -0
  66. package/alist-web/assets/Upload-legacy.cb936202.js +1 -0
  67. package/alist-web/assets/Upload.4c54bcbf.js +1 -0
  68. package/alist-web/assets/Upload.d35bb47b.js +1 -0
  69. package/alist-web/assets/Users-legacy.b992a339.js +1 -0
  70. package/alist-web/assets/Users.7eb39296.js +1 -0
  71. package/alist-web/assets/Wether-legacy.66b7b0d3.js +1 -0
  72. package/alist-web/assets/Wether.f17d6a97.js +1 -0
  73. package/alist-web/assets/_commonjs-dynamic-modules-legacy.cf19cda3.js +1 -0
  74. package/alist-web/assets/_commonjs-dynamic-modules.30ae7933.js +1 -0
  75. package/alist-web/assets/aliyun_office-legacy.7e1c4ff6.js +1 -0
  76. package/alist-web/assets/aliyun_office.627eb2ac.js +1 -0
  77. package/alist-web/assets/aliyun_video-legacy.dfd303c5.js +1 -0
  78. package/alist-web/assets/aliyun_video.681fb5ee.js +1 -0
  79. package/alist-web/assets/asciinema-legacy.554330ec.js +1 -0
  80. package/alist-web/assets/asciinema.53412307.css +1 -0
  81. package/alist-web/assets/asciinema.a6e925e9.js +7 -0
  82. package/alist-web/assets/audio-legacy.d6ef56f6.js +1 -0
  83. package/alist-web/assets/audio.0cad5cce.js +154 -0
  84. package/alist-web/assets/audio.e5b5af14.css +1 -0
  85. package/alist-web/assets/backup-restore-legacy.f4c8daf0.js +1 -0
  86. package/alist-web/assets/backup-restore.db700ca0.js +1 -0
  87. package/alist-web/assets/entry-legacy.01f22349.js +1 -0
  88. package/alist-web/assets/entry-legacy.31390e6c.js +1 -0
  89. package/alist-web/assets/entry-legacy.5119e4e8.js +1 -0
  90. package/alist-web/assets/entry-legacy.d3b909f7.js +1 -0
  91. package/alist-web/assets/entry-legacy.e017de3e.js +1 -0
  92. package/alist-web/assets/entry-legacy.eec15c4b.js +1 -0
  93. package/alist-web/assets/entry-legacy.fa23a37d.js +1 -0
  94. package/alist-web/assets/entry.2eaf5bb3.js +5 -0
  95. package/alist-web/assets/entry.371138c7.js +7 -0
  96. package/alist-web/assets/entry.5c41c532.js +5 -0
  97. package/alist-web/assets/entry.6cce3889.js +5 -0
  98. package/alist-web/assets/entry.8acdb7f9.js +9 -0
  99. package/alist-web/assets/entry.abb9e6ed.js +5 -0
  100. package/alist-web/assets/entry.e83ea613.js +6 -0
  101. package/alist-web/assets/helper-legacy.646eb2d9.js +1 -0
  102. package/alist-web/assets/helper.d54883e3.js +1 -0
  103. package/alist-web/assets/hls-legacy.9e0f7edb.js +379 -0
  104. package/alist-web/assets/hls.1623c369.js +49 -0
  105. package/alist-web/assets/html-legacy.fa26963f.js +1 -0
  106. package/alist-web/assets/html.8b79f6ca.js +1 -0
  107. package/alist-web/assets/icon-legacy.2d7c0a16.js +1 -0
  108. package/alist-web/assets/icon.94f94d81.js +37 -0
  109. package/alist-web/assets/image-legacy.236a9cca.js +1 -0
  110. package/alist-web/assets/image.82ca8574.js +1 -0
  111. package/alist-web/assets/index-legacy.0bd3a7f2.js +1 -0
  112. package/alist-web/assets/index-legacy.40b50240.js +1 -0
  113. package/alist-web/assets/index-legacy.61172c95.js +1 -0
  114. package/alist-web/assets/index-legacy.840e3d82.js +18 -0
  115. package/alist-web/assets/index-legacy.91fe7355.js +1 -0
  116. package/alist-web/assets/index-legacy.a7c40fe3.js +22 -0
  117. package/alist-web/assets/index-legacy.d72e643a.js +1 -0
  118. package/alist-web/assets/index-legacy.efef9df2.js +1 -0
  119. package/alist-web/assets/index-legacy.fb7fb711.js +1 -0
  120. package/alist-web/assets/index.0adfc44b.js +1 -0
  121. package/alist-web/assets/index.26f5b473.js +14 -0
  122. package/alist-web/assets/index.72e3f724.js +1 -0
  123. package/alist-web/assets/index.7409b67a.js +1 -0
  124. package/alist-web/assets/index.952b63b2.js +1 -0
  125. package/alist-web/assets/index.afa471fc.js +1 -0
  126. package/alist-web/assets/index.c15f7469.js +2 -0
  127. package/alist-web/assets/index.c4c82a28.css +1 -0
  128. package/alist-web/assets/index.dcae211e.js +1 -0
  129. package/alist-web/assets/index.fae3cea4.js +333 -0
  130. package/alist-web/assets/indexes-legacy.2c89d2d8.js +1 -0
  131. package/alist-web/assets/indexes.9cb6f537.js +2 -0
  132. package/alist-web/assets/ipa-legacy.7a49e0e2.js +1 -0
  133. package/alist-web/assets/ipa.97543f5f.js +1 -0
  134. package/alist-web/assets/item_type-legacy.d1f1c701.js +1 -0
  135. package/alist-web/assets/item_type.be442da4.js +1 -0
  136. package/alist-web/assets/lg.22b72ba5.ttf +0 -0
  137. package/alist-web/assets/lg.f2fe1c00.svg +54 -0
  138. package/alist-web/assets/lg.fefc5c0d.woff +0 -0
  139. package/alist-web/assets/loading.298ad3ff.gif +0 -0
  140. package/alist-web/assets/markdown-legacy.164943d8.js +1 -0
  141. package/alist-web/assets/markdown.3a932f53.js +1 -0
  142. package/alist-web/assets/markdown_with_word_wrap-legacy.5e032546.js +1 -0
  143. package/alist-web/assets/markdown_with_word_wrap.0efe2540.js +1 -0
  144. package/alist-web/assets/offline_download-legacy.11c4744c.js +1 -0
  145. package/alist-web/assets/offline_download.940ca54b.js +1 -0
  146. package/alist-web/assets/plist-legacy.c76fc720.js +1 -0
  147. package/alist-web/assets/plist.3c9cbb1a.js +1 -0
  148. package/alist-web/assets/polyfills-legacy.5f28c7ae.js +1 -0
  149. package/alist-web/assets/subtitles-octopus-worker.62892886.wasm +0 -0
  150. package/alist-web/assets/subtitles-octopus-worker.f95f2186.js +1 -0
  151. package/alist-web/assets/text-editor-legacy.6e126724.js +1 -0
  152. package/alist-web/assets/text-editor.45600bb2.js +11 -0
  153. package/alist-web/assets/url-legacy.e95c5b8b.js +1 -0
  154. package/alist-web/assets/url.f7914d75.js +1 -0
  155. package/alist-web/assets/useTitle-legacy.e942225f.js +1 -0
  156. package/alist-web/assets/useTitle.630c0b7f.js +1 -0
  157. package/alist-web/assets/video-legacy.5198eeb8.js +135 -0
  158. package/alist-web/assets/video.afae2b68.js +9 -0
  159. package/alist-web/assets/video360-legacy.227ed7df.js +16 -0
  160. package/alist-web/assets/video360.c8385eb2.js +18 -0
  161. package/alist-web/assets/video360.f0192288.css +1 -0
  162. package/alist-web/assets/video_box-legacy.d60b6928.js +7 -0
  163. package/alist-web/assets/video_box.bfb0d4a5.js +18 -0
  164. package/alist-web/assets/webauthn-json.browser-ponyfill-legacy.8ddd819a.js +1 -0
  165. package/alist-web/assets/webauthn-json.browser-ponyfill.1c672167.js +1 -0
  166. package/alist-web/images/figplayer.webp +0 -0
  167. package/alist-web/images/fileball.webp +0 -0
  168. package/alist-web/images/iina.webp +0 -0
  169. package/alist-web/images/infuse.webp +0 -0
  170. package/alist-web/images/mxplayer-pro.webp +0 -0
  171. package/alist-web/images/mxplayer.webp +0 -0
  172. package/alist-web/images/nplayer.webp +0 -0
  173. package/alist-web/images/omniplayer.webp +0 -0
  174. package/alist-web/images/potplayer.webp +0 -0
  175. package/alist-web/images/vlc.webp +0 -0
  176. package/alist-web/index.html +81 -0
  177. package/alist-web/package.json +95 -0
  178. package/alist-web/static/epub.js/epub.min.js +1 -0
  179. package/alist-web/static/epub.js/jszip.min.js +13 -0
  180. package/alist-web/static/epub.js/v0.3.93 +0 -0
  181. package/alist-web/static/epub.js/viewer.html +467 -0
  182. package/alist-web/static/manifest.json +13 -0
  183. package/alist-web/static/pdf.js/build/pdf.mjs +22873 -0
  184. package/alist-web/static/pdf.js/build/pdf.mjs.map +1 -0
  185. package/alist-web/static/pdf.js/build/pdf.sandbox.mjs +218 -0
  186. package/alist-web/static/pdf.js/build/pdf.sandbox.mjs.map +1 -0
  187. package/alist-web/static/pdf.js/build/pdf.worker.mjs +58008 -0
  188. package/alist-web/static/pdf.js/build/pdf.worker.mjs.map +1 -0
  189. package/alist-web/static/pdf.js/v5.3.93 +0 -0
  190. package/alist-web/static/pdf.js/web/cmaps/78-EUC-H.bcmap +0 -0
  191. package/alist-web/static/pdf.js/web/cmaps/78-EUC-V.bcmap +0 -0
  192. package/alist-web/static/pdf.js/web/cmaps/78-H.bcmap +0 -0
  193. package/alist-web/static/pdf.js/web/cmaps/78-RKSJ-H.bcmap +0 -0
  194. package/alist-web/static/pdf.js/web/cmaps/78-RKSJ-V.bcmap +0 -0
  195. package/alist-web/static/pdf.js/web/cmaps/78-V.bcmap +0 -0
  196. package/alist-web/static/pdf.js/web/cmaps/78ms-RKSJ-H.bcmap +0 -0
  197. package/alist-web/static/pdf.js/web/cmaps/78ms-RKSJ-V.bcmap +0 -0
  198. package/alist-web/static/pdf.js/web/cmaps/83pv-RKSJ-H.bcmap +0 -0
  199. package/alist-web/static/pdf.js/web/cmaps/90ms-RKSJ-H.bcmap +0 -0
  200. package/alist-web/static/pdf.js/web/cmaps/90ms-RKSJ-V.bcmap +0 -0
  201. package/alist-web/static/pdf.js/web/cmaps/90msp-RKSJ-H.bcmap +0 -0
  202. package/alist-web/static/pdf.js/web/cmaps/90msp-RKSJ-V.bcmap +0 -0
  203. package/alist-web/static/pdf.js/web/cmaps/90pv-RKSJ-H.bcmap +0 -0
  204. package/alist-web/static/pdf.js/web/cmaps/90pv-RKSJ-V.bcmap +0 -0
  205. package/alist-web/static/pdf.js/web/cmaps/Add-H.bcmap +0 -0
  206. package/alist-web/static/pdf.js/web/cmaps/Add-RKSJ-H.bcmap +0 -0
  207. package/alist-web/static/pdf.js/web/cmaps/Add-RKSJ-V.bcmap +0 -0
  208. package/alist-web/static/pdf.js/web/cmaps/Add-V.bcmap +0 -0
  209. package/alist-web/static/pdf.js/web/cmaps/Adobe-CNS1-0.bcmap +0 -0
  210. package/alist-web/static/pdf.js/web/cmaps/Adobe-CNS1-1.bcmap +0 -0
  211. package/alist-web/static/pdf.js/web/cmaps/Adobe-CNS1-2.bcmap +0 -0
  212. package/alist-web/static/pdf.js/web/cmaps/Adobe-CNS1-3.bcmap +0 -0
  213. package/alist-web/static/pdf.js/web/cmaps/Adobe-CNS1-4.bcmap +0 -0
  214. package/alist-web/static/pdf.js/web/cmaps/Adobe-CNS1-5.bcmap +0 -0
  215. package/alist-web/static/pdf.js/web/cmaps/Adobe-CNS1-6.bcmap +0 -0
  216. package/alist-web/static/pdf.js/web/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  217. package/alist-web/static/pdf.js/web/cmaps/Adobe-GB1-0.bcmap +0 -0
  218. package/alist-web/static/pdf.js/web/cmaps/Adobe-GB1-1.bcmap +0 -0
  219. package/alist-web/static/pdf.js/web/cmaps/Adobe-GB1-2.bcmap +0 -0
  220. package/alist-web/static/pdf.js/web/cmaps/Adobe-GB1-3.bcmap +0 -0
  221. package/alist-web/static/pdf.js/web/cmaps/Adobe-GB1-4.bcmap +0 -0
  222. package/alist-web/static/pdf.js/web/cmaps/Adobe-GB1-5.bcmap +0 -0
  223. package/alist-web/static/pdf.js/web/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  224. package/alist-web/static/pdf.js/web/cmaps/Adobe-Japan1-0.bcmap +0 -0
  225. package/alist-web/static/pdf.js/web/cmaps/Adobe-Japan1-1.bcmap +0 -0
  226. package/alist-web/static/pdf.js/web/cmaps/Adobe-Japan1-2.bcmap +0 -0
  227. package/alist-web/static/pdf.js/web/cmaps/Adobe-Japan1-3.bcmap +0 -0
  228. package/alist-web/static/pdf.js/web/cmaps/Adobe-Japan1-4.bcmap +0 -0
  229. package/alist-web/static/pdf.js/web/cmaps/Adobe-Japan1-5.bcmap +0 -0
  230. package/alist-web/static/pdf.js/web/cmaps/Adobe-Japan1-6.bcmap +0 -0
  231. package/alist-web/static/pdf.js/web/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  232. package/alist-web/static/pdf.js/web/cmaps/Adobe-Korea1-0.bcmap +0 -0
  233. package/alist-web/static/pdf.js/web/cmaps/Adobe-Korea1-1.bcmap +0 -0
  234. package/alist-web/static/pdf.js/web/cmaps/Adobe-Korea1-2.bcmap +0 -0
  235. package/alist-web/static/pdf.js/web/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  236. package/alist-web/static/pdf.js/web/cmaps/B5-H.bcmap +0 -0
  237. package/alist-web/static/pdf.js/web/cmaps/B5-V.bcmap +0 -0
  238. package/alist-web/static/pdf.js/web/cmaps/B5pc-H.bcmap +0 -0
  239. package/alist-web/static/pdf.js/web/cmaps/B5pc-V.bcmap +0 -0
  240. package/alist-web/static/pdf.js/web/cmaps/CNS-EUC-H.bcmap +0 -0
  241. package/alist-web/static/pdf.js/web/cmaps/CNS-EUC-V.bcmap +0 -0
  242. package/alist-web/static/pdf.js/web/cmaps/CNS1-H.bcmap +0 -0
  243. package/alist-web/static/pdf.js/web/cmaps/CNS1-V.bcmap +0 -0
  244. package/alist-web/static/pdf.js/web/cmaps/CNS2-H.bcmap +0 -0
  245. package/alist-web/static/pdf.js/web/cmaps/CNS2-V.bcmap +3 -0
  246. package/alist-web/static/pdf.js/web/cmaps/ETHK-B5-H.bcmap +0 -0
  247. package/alist-web/static/pdf.js/web/cmaps/ETHK-B5-V.bcmap +0 -0
  248. package/alist-web/static/pdf.js/web/cmaps/ETen-B5-H.bcmap +0 -0
  249. package/alist-web/static/pdf.js/web/cmaps/ETen-B5-V.bcmap +0 -0
  250. package/alist-web/static/pdf.js/web/cmaps/ETenms-B5-H.bcmap +3 -0
  251. package/alist-web/static/pdf.js/web/cmaps/ETenms-B5-V.bcmap +0 -0
  252. package/alist-web/static/pdf.js/web/cmaps/EUC-H.bcmap +0 -0
  253. package/alist-web/static/pdf.js/web/cmaps/EUC-V.bcmap +0 -0
  254. package/alist-web/static/pdf.js/web/cmaps/Ext-H.bcmap +0 -0
  255. package/alist-web/static/pdf.js/web/cmaps/Ext-RKSJ-H.bcmap +0 -0
  256. package/alist-web/static/pdf.js/web/cmaps/Ext-RKSJ-V.bcmap +0 -0
  257. package/alist-web/static/pdf.js/web/cmaps/Ext-V.bcmap +0 -0
  258. package/alist-web/static/pdf.js/web/cmaps/GB-EUC-H.bcmap +0 -0
  259. package/alist-web/static/pdf.js/web/cmaps/GB-EUC-V.bcmap +0 -0
  260. package/alist-web/static/pdf.js/web/cmaps/GB-H.bcmap +4 -0
  261. package/alist-web/static/pdf.js/web/cmaps/GB-V.bcmap +0 -0
  262. package/alist-web/static/pdf.js/web/cmaps/GBK-EUC-H.bcmap +0 -0
  263. package/alist-web/static/pdf.js/web/cmaps/GBK-EUC-V.bcmap +0 -0
  264. package/alist-web/static/pdf.js/web/cmaps/GBK2K-H.bcmap +0 -0
  265. package/alist-web/static/pdf.js/web/cmaps/GBK2K-V.bcmap +0 -0
  266. package/alist-web/static/pdf.js/web/cmaps/GBKp-EUC-H.bcmap +0 -0
  267. package/alist-web/static/pdf.js/web/cmaps/GBKp-EUC-V.bcmap +0 -0
  268. package/alist-web/static/pdf.js/web/cmaps/GBT-EUC-H.bcmap +0 -0
  269. package/alist-web/static/pdf.js/web/cmaps/GBT-EUC-V.bcmap +0 -0
  270. package/alist-web/static/pdf.js/web/cmaps/GBT-H.bcmap +0 -0
  271. package/alist-web/static/pdf.js/web/cmaps/GBT-V.bcmap +0 -0
  272. package/alist-web/static/pdf.js/web/cmaps/GBTpc-EUC-H.bcmap +0 -0
  273. package/alist-web/static/pdf.js/web/cmaps/GBTpc-EUC-V.bcmap +0 -0
  274. package/alist-web/static/pdf.js/web/cmaps/GBpc-EUC-H.bcmap +0 -0
  275. package/alist-web/static/pdf.js/web/cmaps/GBpc-EUC-V.bcmap +0 -0
  276. package/alist-web/static/pdf.js/web/cmaps/H.bcmap +0 -0
  277. package/alist-web/static/pdf.js/web/cmaps/HKdla-B5-H.bcmap +0 -0
  278. package/alist-web/static/pdf.js/web/cmaps/HKdla-B5-V.bcmap +0 -0
  279. package/alist-web/static/pdf.js/web/cmaps/HKdlb-B5-H.bcmap +0 -0
  280. package/alist-web/static/pdf.js/web/cmaps/HKdlb-B5-V.bcmap +0 -0
  281. package/alist-web/static/pdf.js/web/cmaps/HKgccs-B5-H.bcmap +0 -0
  282. package/alist-web/static/pdf.js/web/cmaps/HKgccs-B5-V.bcmap +0 -0
  283. package/alist-web/static/pdf.js/web/cmaps/HKm314-B5-H.bcmap +0 -0
  284. package/alist-web/static/pdf.js/web/cmaps/HKm314-B5-V.bcmap +0 -0
  285. package/alist-web/static/pdf.js/web/cmaps/HKm471-B5-H.bcmap +0 -0
  286. package/alist-web/static/pdf.js/web/cmaps/HKm471-B5-V.bcmap +0 -0
  287. package/alist-web/static/pdf.js/web/cmaps/HKscs-B5-H.bcmap +0 -0
  288. package/alist-web/static/pdf.js/web/cmaps/HKscs-B5-V.bcmap +0 -0
  289. package/alist-web/static/pdf.js/web/cmaps/Hankaku.bcmap +0 -0
  290. package/alist-web/static/pdf.js/web/cmaps/Hiragana.bcmap +0 -0
  291. package/alist-web/static/pdf.js/web/cmaps/KSC-EUC-H.bcmap +0 -0
  292. package/alist-web/static/pdf.js/web/cmaps/KSC-EUC-V.bcmap +0 -0
  293. package/alist-web/static/pdf.js/web/cmaps/KSC-H.bcmap +0 -0
  294. package/alist-web/static/pdf.js/web/cmaps/KSC-Johab-H.bcmap +0 -0
  295. package/alist-web/static/pdf.js/web/cmaps/KSC-Johab-V.bcmap +0 -0
  296. package/alist-web/static/pdf.js/web/cmaps/KSC-V.bcmap +0 -0
  297. package/alist-web/static/pdf.js/web/cmaps/KSCms-UHC-H.bcmap +0 -0
  298. package/alist-web/static/pdf.js/web/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  299. package/alist-web/static/pdf.js/web/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  300. package/alist-web/static/pdf.js/web/cmaps/KSCms-UHC-V.bcmap +0 -0
  301. package/alist-web/static/pdf.js/web/cmaps/KSCpc-EUC-H.bcmap +0 -0
  302. package/alist-web/static/pdf.js/web/cmaps/KSCpc-EUC-V.bcmap +0 -0
  303. package/alist-web/static/pdf.js/web/cmaps/Katakana.bcmap +0 -0
  304. package/alist-web/static/pdf.js/web/cmaps/LICENSE +36 -0
  305. package/alist-web/static/pdf.js/web/cmaps/NWP-H.bcmap +0 -0
  306. package/alist-web/static/pdf.js/web/cmaps/NWP-V.bcmap +0 -0
  307. package/alist-web/static/pdf.js/web/cmaps/RKSJ-H.bcmap +0 -0
  308. package/alist-web/static/pdf.js/web/cmaps/RKSJ-V.bcmap +0 -0
  309. package/alist-web/static/pdf.js/web/cmaps/Roman.bcmap +0 -0
  310. package/alist-web/static/pdf.js/web/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  311. package/alist-web/static/pdf.js/web/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  312. package/alist-web/static/pdf.js/web/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  313. package/alist-web/static/pdf.js/web/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  314. package/alist-web/static/pdf.js/web/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  315. package/alist-web/static/pdf.js/web/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  316. package/alist-web/static/pdf.js/web/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  317. package/alist-web/static/pdf.js/web/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  318. package/alist-web/static/pdf.js/web/cmaps/UniGB-UCS2-H.bcmap +0 -0
  319. package/alist-web/static/pdf.js/web/cmaps/UniGB-UCS2-V.bcmap +0 -0
  320. package/alist-web/static/pdf.js/web/cmaps/UniGB-UTF16-H.bcmap +0 -0
  321. package/alist-web/static/pdf.js/web/cmaps/UniGB-UTF16-V.bcmap +0 -0
  322. package/alist-web/static/pdf.js/web/cmaps/UniGB-UTF32-H.bcmap +0 -0
  323. package/alist-web/static/pdf.js/web/cmaps/UniGB-UTF32-V.bcmap +0 -0
  324. package/alist-web/static/pdf.js/web/cmaps/UniGB-UTF8-H.bcmap +0 -0
  325. package/alist-web/static/pdf.js/web/cmaps/UniGB-UTF8-V.bcmap +0 -0
  326. package/alist-web/static/pdf.js/web/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  327. package/alist-web/static/pdf.js/web/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  328. package/alist-web/static/pdf.js/web/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  329. package/alist-web/static/pdf.js/web/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  330. package/alist-web/static/pdf.js/web/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  331. package/alist-web/static/pdf.js/web/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  332. package/alist-web/static/pdf.js/web/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  333. package/alist-web/static/pdf.js/web/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  334. package/alist-web/static/pdf.js/web/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  335. package/alist-web/static/pdf.js/web/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  336. package/alist-web/static/pdf.js/web/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  337. package/alist-web/static/pdf.js/web/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  338. package/alist-web/static/pdf.js/web/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  339. package/alist-web/static/pdf.js/web/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  340. package/alist-web/static/pdf.js/web/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  341. package/alist-web/static/pdf.js/web/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  342. package/alist-web/static/pdf.js/web/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  343. package/alist-web/static/pdf.js/web/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  344. package/alist-web/static/pdf.js/web/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  345. package/alist-web/static/pdf.js/web/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  346. package/alist-web/static/pdf.js/web/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  347. package/alist-web/static/pdf.js/web/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  348. package/alist-web/static/pdf.js/web/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  349. package/alist-web/static/pdf.js/web/cmaps/UniKS-UCS2-H.bcmap +0 -0
  350. package/alist-web/static/pdf.js/web/cmaps/UniKS-UCS2-V.bcmap +0 -0
  351. package/alist-web/static/pdf.js/web/cmaps/UniKS-UTF16-H.bcmap +0 -0
  352. package/alist-web/static/pdf.js/web/cmaps/UniKS-UTF16-V.bcmap +0 -0
  353. package/alist-web/static/pdf.js/web/cmaps/UniKS-UTF32-H.bcmap +0 -0
  354. package/alist-web/static/pdf.js/web/cmaps/UniKS-UTF32-V.bcmap +0 -0
  355. package/alist-web/static/pdf.js/web/cmaps/UniKS-UTF8-H.bcmap +0 -0
  356. package/alist-web/static/pdf.js/web/cmaps/UniKS-UTF8-V.bcmap +0 -0
  357. package/alist-web/static/pdf.js/web/cmaps/V.bcmap +0 -0
  358. package/alist-web/static/pdf.js/web/cmaps/WP-Symbol.bcmap +0 -0
  359. package/alist-web/static/pdf.js/web/compressed.tracemonkey-pldi-09.pdf +0 -0
  360. package/alist-web/static/pdf.js/web/debugger.css +114 -0
  361. package/alist-web/static/pdf.js/web/debugger.mjs +627 -0
  362. package/alist-web/static/pdf.js/web/iccs/CGATS001Compat-v2-micro.icc +0 -0
  363. package/alist-web/static/pdf.js/web/iccs/LICENSE +116 -0
  364. package/alist-web/static/pdf.js/web/images/altText_add.svg +3 -0
  365. package/alist-web/static/pdf.js/web/images/altText_disclaimer.svg +3 -0
  366. package/alist-web/static/pdf.js/web/images/altText_done.svg +3 -0
  367. package/alist-web/static/pdf.js/web/images/altText_spinner.svg +30 -0
  368. package/alist-web/static/pdf.js/web/images/altText_warning.svg +3 -0
  369. package/alist-web/static/pdf.js/web/images/annotation-check.svg +11 -0
  370. package/alist-web/static/pdf.js/web/images/annotation-comment.svg +16 -0
  371. package/alist-web/static/pdf.js/web/images/annotation-help.svg +26 -0
  372. package/alist-web/static/pdf.js/web/images/annotation-insert.svg +10 -0
  373. package/alist-web/static/pdf.js/web/images/annotation-key.svg +11 -0
  374. package/alist-web/static/pdf.js/web/images/annotation-newparagraph.svg +11 -0
  375. package/alist-web/static/pdf.js/web/images/annotation-noicon.svg +7 -0
  376. package/alist-web/static/pdf.js/web/images/annotation-note.svg +42 -0
  377. package/alist-web/static/pdf.js/web/images/annotation-paperclip.svg +6 -0
  378. package/alist-web/static/pdf.js/web/images/annotation-paragraph.svg +16 -0
  379. package/alist-web/static/pdf.js/web/images/annotation-pushpin.svg +7 -0
  380. package/alist-web/static/pdf.js/web/images/cursor-editorFreeHighlight.svg +6 -0
  381. package/alist-web/static/pdf.js/web/images/cursor-editorFreeText.svg +3 -0
  382. package/alist-web/static/pdf.js/web/images/cursor-editorInk.svg +4 -0
  383. package/alist-web/static/pdf.js/web/images/cursor-editorTextHighlight.svg +8 -0
  384. package/alist-web/static/pdf.js/web/images/editor-toolbar-delete.svg +5 -0
  385. package/alist-web/static/pdf.js/web/images/editor-toolbar-edit.svg +3 -0
  386. package/alist-web/static/pdf.js/web/images/findbarButton-next.svg +3 -0
  387. package/alist-web/static/pdf.js/web/images/findbarButton-previous.svg +3 -0
  388. package/alist-web/static/pdf.js/web/images/gv-toolbarButton-download.svg +3 -0
  389. package/alist-web/static/pdf.js/web/images/loading-icon.gif +0 -0
  390. package/alist-web/static/pdf.js/web/images/loading.svg +1 -0
  391. package/alist-web/static/pdf.js/web/images/messageBar_closingButton.svg +3 -0
  392. package/alist-web/static/pdf.js/web/images/messageBar_info.svg +3 -0
  393. package/alist-web/static/pdf.js/web/images/messageBar_warning.svg +3 -0
  394. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-documentProperties.svg +3 -0
  395. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-firstPage.svg +3 -0
  396. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-handTool.svg +3 -0
  397. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-lastPage.svg +3 -0
  398. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-rotateCcw.svg +3 -0
  399. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-rotateCw.svg +3 -0
  400. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-scrollHorizontal.svg +3 -0
  401. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-scrollPage.svg +3 -0
  402. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-scrollVertical.svg +3 -0
  403. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-scrollWrapped.svg +3 -0
  404. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-selectTool.svg +3 -0
  405. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-spreadEven.svg +3 -0
  406. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-spreadNone.svg +3 -0
  407. package/alist-web/static/pdf.js/web/images/secondaryToolbarButton-spreadOdd.svg +3 -0
  408. package/alist-web/static/pdf.js/web/images/toolbarButton-bookmark.svg +3 -0
  409. package/alist-web/static/pdf.js/web/images/toolbarButton-currentOutlineItem.svg +3 -0
  410. package/alist-web/static/pdf.js/web/images/toolbarButton-download.svg +4 -0
  411. package/alist-web/static/pdf.js/web/images/toolbarButton-editorFreeText.svg +5 -0
  412. package/alist-web/static/pdf.js/web/images/toolbarButton-editorHighlight.svg +6 -0
  413. package/alist-web/static/pdf.js/web/images/toolbarButton-editorInk.svg +4 -0
  414. package/alist-web/static/pdf.js/web/images/toolbarButton-editorSignature.svg +6 -0
  415. package/alist-web/static/pdf.js/web/images/toolbarButton-editorStamp.svg +8 -0
  416. package/alist-web/static/pdf.js/web/images/toolbarButton-menuArrow.svg +3 -0
  417. package/alist-web/static/pdf.js/web/images/toolbarButton-openFile.svg +3 -0
  418. package/alist-web/static/pdf.js/web/images/toolbarButton-pageDown.svg +3 -0
  419. package/alist-web/static/pdf.js/web/images/toolbarButton-pageUp.svg +3 -0
  420. package/alist-web/static/pdf.js/web/images/toolbarButton-presentationMode.svg +3 -0
  421. package/alist-web/static/pdf.js/web/images/toolbarButton-print.svg +3 -0
  422. package/alist-web/static/pdf.js/web/images/toolbarButton-search.svg +3 -0
  423. package/alist-web/static/pdf.js/web/images/toolbarButton-secondaryToolbarToggle.svg +3 -0
  424. package/alist-web/static/pdf.js/web/images/toolbarButton-sidebarToggle.svg +3 -0
  425. package/alist-web/static/pdf.js/web/images/toolbarButton-viewAttachments.svg +3 -0
  426. package/alist-web/static/pdf.js/web/images/toolbarButton-viewLayers.svg +3 -0
  427. package/alist-web/static/pdf.js/web/images/toolbarButton-viewOutline.svg +3 -0
  428. package/alist-web/static/pdf.js/web/images/toolbarButton-viewThumbnail.svg +3 -0
  429. package/alist-web/static/pdf.js/web/images/toolbarButton-zoomIn.svg +3 -0
  430. package/alist-web/static/pdf.js/web/images/toolbarButton-zoomOut.svg +3 -0
  431. package/alist-web/static/pdf.js/web/images/treeitem-collapsed.svg +1 -0
  432. package/alist-web/static/pdf.js/web/images/treeitem-expanded.svg +1 -0
  433. package/alist-web/static/pdf.js/web/locale/ach/viewer.ftl +275 -0
  434. package/alist-web/static/pdf.js/web/locale/af/viewer.ftl +262 -0
  435. package/alist-web/static/pdf.js/web/locale/an/viewer.ftl +307 -0
  436. package/alist-web/static/pdf.js/web/locale/ar/viewer.ftl +627 -0
  437. package/alist-web/static/pdf.js/web/locale/ast/viewer.ftl +251 -0
  438. package/alist-web/static/pdf.js/web/locale/az/viewer.ftl +307 -0
  439. package/alist-web/static/pdf.js/web/locale/be/viewer.ftl +618 -0
  440. package/alist-web/static/pdf.js/web/locale/bg/viewer.ftl +451 -0
  441. package/alist-web/static/pdf.js/web/locale/bn/viewer.ftl +297 -0
  442. package/alist-web/static/pdf.js/web/locale/bo/viewer.ftl +297 -0
  443. package/alist-web/static/pdf.js/web/locale/br/viewer.ftl +370 -0
  444. package/alist-web/static/pdf.js/web/locale/brx/viewer.ftl +268 -0
  445. package/alist-web/static/pdf.js/web/locale/bs/viewer.ftl +273 -0
  446. package/alist-web/static/pdf.js/web/locale/ca/viewer.ftl +343 -0
  447. package/alist-web/static/pdf.js/web/locale/cak/viewer.ftl +341 -0
  448. package/alist-web/static/pdf.js/web/locale/ckb/viewer.ftl +292 -0
  449. package/alist-web/static/pdf.js/web/locale/cs/viewer.ftl +621 -0
  450. package/alist-web/static/pdf.js/web/locale/cy/viewer.ftl +627 -0
  451. package/alist-web/static/pdf.js/web/locale/da/viewer.ftl +615 -0
  452. package/alist-web/static/pdf.js/web/locale/de/viewer.ftl +615 -0
  453. package/alist-web/static/pdf.js/web/locale/dsb/viewer.ftl +621 -0
  454. package/alist-web/static/pdf.js/web/locale/el/viewer.ftl +615 -0
  455. package/alist-web/static/pdf.js/web/locale/en-CA/viewer.ftl +610 -0
  456. package/alist-web/static/pdf.js/web/locale/en-GB/viewer.ftl +615 -0
  457. package/alist-web/static/pdf.js/web/locale/en-US/viewer.ftl +640 -0
  458. package/alist-web/static/pdf.js/web/locale/eo/viewer.ftl +615 -0
  459. package/alist-web/static/pdf.js/web/locale/es-AR/viewer.ftl +615 -0
  460. package/alist-web/static/pdf.js/web/locale/es-CL/viewer.ftl +615 -0
  461. package/alist-web/static/pdf.js/web/locale/es-ES/viewer.ftl +615 -0
  462. package/alist-web/static/pdf.js/web/locale/es-MX/viewer.ftl +580 -0
  463. package/alist-web/static/pdf.js/web/locale/et/viewer.ftl +319 -0
  464. package/alist-web/static/pdf.js/web/locale/eu/viewer.ftl +619 -0
  465. package/alist-web/static/pdf.js/web/locale/fa/viewer.ftl +378 -0
  466. package/alist-web/static/pdf.js/web/locale/ff/viewer.ftl +297 -0
  467. package/alist-web/static/pdf.js/web/locale/fi/viewer.ftl +615 -0
  468. package/alist-web/static/pdf.js/web/locale/fr/viewer.ftl +611 -0
  469. package/alist-web/static/pdf.js/web/locale/fur/viewer.ftl +615 -0
  470. package/alist-web/static/pdf.js/web/locale/fy-NL/viewer.ftl +615 -0
  471. package/alist-web/static/pdf.js/web/locale/ga-IE/viewer.ftl +263 -0
  472. package/alist-web/static/pdf.js/web/locale/gd/viewer.ftl +343 -0
  473. package/alist-web/static/pdf.js/web/locale/gl/viewer.ftl +414 -0
  474. package/alist-web/static/pdf.js/web/locale/gn/viewer.ftl +614 -0
  475. package/alist-web/static/pdf.js/web/locale/gu-IN/viewer.ftl +297 -0
  476. package/alist-web/static/pdf.js/web/locale/he/viewer.ftl +615 -0
  477. package/alist-web/static/pdf.js/web/locale/hi-IN/viewer.ftl +297 -0
  478. package/alist-web/static/pdf.js/web/locale/hr/viewer.ftl +552 -0
  479. package/alist-web/static/pdf.js/web/locale/hsb/viewer.ftl +621 -0
  480. package/alist-web/static/pdf.js/web/locale/hu/viewer.ftl +615 -0
  481. package/alist-web/static/pdf.js/web/locale/hy-AM/viewer.ftl +314 -0
  482. package/alist-web/static/pdf.js/web/locale/hye/viewer.ftl +318 -0
  483. package/alist-web/static/pdf.js/web/locale/ia/viewer.ftl +615 -0
  484. package/alist-web/static/pdf.js/web/locale/id/viewer.ftl +603 -0
  485. package/alist-web/static/pdf.js/web/locale/is/viewer.ftl +600 -0
  486. package/alist-web/static/pdf.js/web/locale/it/viewer.ftl +615 -0
  487. package/alist-web/static/pdf.js/web/locale/ja/viewer.ftl +603 -0
  488. package/alist-web/static/pdf.js/web/locale/ka/viewer.ftl +615 -0
  489. package/alist-web/static/pdf.js/web/locale/kab/viewer.ftl +595 -0
  490. package/alist-web/static/pdf.js/web/locale/kk/viewer.ftl +595 -0
  491. package/alist-web/static/pdf.js/web/locale/km/viewer.ftl +273 -0
  492. package/alist-web/static/pdf.js/web/locale/kn/viewer.ftl +263 -0
  493. package/alist-web/static/pdf.js/web/locale/ko/viewer.ftl +603 -0
  494. package/alist-web/static/pdf.js/web/locale/lij/viewer.ftl +297 -0
  495. package/alist-web/static/pdf.js/web/locale/lo/viewer.ftl +343 -0
  496. package/alist-web/static/pdf.js/web/locale/locale.json +1 -0
  497. package/alist-web/static/pdf.js/web/locale/lt/viewer.ftl +318 -0
  498. package/alist-web/static/pdf.js/web/locale/ltg/viewer.ftl +296 -0
  499. package/alist-web/static/pdf.js/web/locale/lv/viewer.ftl +297 -0
  500. package/alist-web/static/pdf.js/web/locale/meh/viewer.ftl +137 -0
  501. package/alist-web/static/pdf.js/web/locale/mk/viewer.ftl +265 -0
  502. package/alist-web/static/pdf.js/web/locale/ml/viewer.ftl +524 -0
  503. package/alist-web/static/pdf.js/web/locale/mr/viewer.ftl +289 -0
  504. package/alist-web/static/pdf.js/web/locale/ms/viewer.ftl +297 -0
  505. package/alist-web/static/pdf.js/web/locale/my/viewer.ftl +256 -0
  506. package/alist-web/static/pdf.js/web/locale/nb-NO/viewer.ftl +614 -0
  507. package/alist-web/static/pdf.js/web/locale/ne-NP/viewer.ftl +284 -0
  508. package/alist-web/static/pdf.js/web/locale/nl/viewer.ftl +615 -0
  509. package/alist-web/static/pdf.js/web/locale/nn-NO/viewer.ftl +609 -0
  510. package/alist-web/static/pdf.js/web/locale/oc/viewer.ftl +436 -0
  511. package/alist-web/static/pdf.js/web/locale/pa-IN/viewer.ftl +615 -0
  512. package/alist-web/static/pdf.js/web/locale/pl/viewer.ftl +618 -0
  513. package/alist-web/static/pdf.js/web/locale/pt-BR/viewer.ftl +615 -0
  514. package/alist-web/static/pdf.js/web/locale/pt-PT/viewer.ftl +615 -0
  515. package/alist-web/static/pdf.js/web/locale/rm/viewer.ftl +615 -0
  516. package/alist-web/static/pdf.js/web/locale/ro/viewer.ftl +302 -0
  517. package/alist-web/static/pdf.js/web/locale/ru/viewer.ftl +618 -0
  518. package/alist-web/static/pdf.js/web/locale/sat/viewer.ftl +355 -0
  519. package/alist-web/static/pdf.js/web/locale/sc/viewer.ftl +394 -0
  520. package/alist-web/static/pdf.js/web/locale/scn/viewer.ftl +124 -0
  521. package/alist-web/static/pdf.js/web/locale/sco/viewer.ftl +314 -0
  522. package/alist-web/static/pdf.js/web/locale/si/viewer.ftl +301 -0
  523. package/alist-web/static/pdf.js/web/locale/sk/viewer.ftl +621 -0
  524. package/alist-web/static/pdf.js/web/locale/skr/viewer.ftl +524 -0
  525. package/alist-web/static/pdf.js/web/locale/sl/viewer.ftl +621 -0
  526. package/alist-web/static/pdf.js/web/locale/son/viewer.ftl +256 -0
  527. package/alist-web/static/pdf.js/web/locale/sq/viewer.ftl +606 -0
  528. package/alist-web/static/pdf.js/web/locale/sr/viewer.ftl +451 -0
  529. package/alist-web/static/pdf.js/web/locale/sv-SE/viewer.ftl +615 -0
  530. package/alist-web/static/pdf.js/web/locale/szl/viewer.ftl +307 -0
  531. package/alist-web/static/pdf.js/web/locale/ta/viewer.ftl +273 -0
  532. package/alist-web/static/pdf.js/web/locale/te/viewer.ftl +289 -0
  533. package/alist-web/static/pdf.js/web/locale/tg/viewer.ftl +615 -0
  534. package/alist-web/static/pdf.js/web/locale/th/viewer.ftl +603 -0
  535. package/alist-web/static/pdf.js/web/locale/tl/viewer.ftl +307 -0
  536. package/alist-web/static/pdf.js/web/locale/tr/viewer.ftl +615 -0
  537. package/alist-web/static/pdf.js/web/locale/trs/viewer.ftl +247 -0
  538. package/alist-web/static/pdf.js/web/locale/uk/viewer.ftl +618 -0
  539. package/alist-web/static/pdf.js/web/locale/ur/viewer.ftl +298 -0
  540. package/alist-web/static/pdf.js/web/locale/uz/viewer.ftl +237 -0
  541. package/alist-web/static/pdf.js/web/locale/vi/viewer.ftl +603 -0
  542. package/alist-web/static/pdf.js/web/locale/wo/viewer.ftl +177 -0
  543. package/alist-web/static/pdf.js/web/locale/xh/viewer.ftl +262 -0
  544. package/alist-web/static/pdf.js/web/locale/zh-CN/viewer.ftl +603 -0
  545. package/alist-web/static/pdf.js/web/locale/zh-TW/viewer.ftl +603 -0
  546. package/alist-web/static/pdf.js/web/standard_fonts/FoxitDingbats.pfb +0 -0
  547. package/alist-web/static/pdf.js/web/standard_fonts/FoxitFixed.pfb +0 -0
  548. package/alist-web/static/pdf.js/web/standard_fonts/FoxitFixedBold.pfb +0 -0
  549. package/alist-web/static/pdf.js/web/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
  550. package/alist-web/static/pdf.js/web/standard_fonts/FoxitFixedItalic.pfb +0 -0
  551. package/alist-web/static/pdf.js/web/standard_fonts/FoxitSerif.pfb +0 -0
  552. package/alist-web/static/pdf.js/web/standard_fonts/FoxitSerifBold.pfb +0 -0
  553. package/alist-web/static/pdf.js/web/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
  554. package/alist-web/static/pdf.js/web/standard_fonts/FoxitSerifItalic.pfb +0 -0
  555. package/alist-web/static/pdf.js/web/standard_fonts/FoxitSymbol.pfb +0 -0
  556. package/alist-web/static/pdf.js/web/standard_fonts/LICENSE_FOXIT +27 -0
  557. package/alist-web/static/pdf.js/web/standard_fonts/LICENSE_LIBERATION +102 -0
  558. package/alist-web/static/pdf.js/web/standard_fonts/LiberationSans-Bold.ttf +0 -0
  559. package/alist-web/static/pdf.js/web/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
  560. package/alist-web/static/pdf.js/web/standard_fonts/LiberationSans-Italic.ttf +0 -0
  561. package/alist-web/static/pdf.js/web/standard_fonts/LiberationSans-Regular.ttf +0 -0
  562. package/alist-web/static/pdf.js/web/viewer.css +6438 -0
  563. package/alist-web/static/pdf.js/web/viewer.html +737 -0
  564. package/alist-web/static/pdf.js/web/viewer.mjs +17076 -0
  565. package/alist-web/static/pdf.js/web/viewer.mjs.map +1 -0
  566. package/alist-web/static/pdf.js/web/wasm/LICENSE_OPENJPEG +39 -0
  567. package/alist-web/static/pdf.js/web/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
  568. package/alist-web/static/pdf.js/web/wasm/LICENSE_PDFJS_QCMS +22 -0
  569. package/alist-web/static/pdf.js/web/wasm/LICENSE_QCMS +21 -0
  570. package/alist-web/static/pdf.js/web/wasm/openjpeg.wasm +0 -0
  571. package/alist-web/static/pdf.js/web/wasm/openjpeg_nowasm_fallback.js +29 -0
  572. package/alist-web/static/pdf.js/web/wasm/qcms_bg.wasm +0 -0
  573. package/alist-web/streamer/mitm.html +186 -0
  574. package/alist-web/streamer/sw.js +141 -0
  575. package/css/alist_skin_v2.css +410 -410
  576. package/css/alist_skin_v3.css +216 -218
  577. package/css/alist_wallpaper.css +49 -48
  578. package/css/colorful.css +65 -65
  579. package/css/font-awesome.css +10569 -10568
  580. package/css/lxgw-style.css +12 -6
  581. package/css/lxgwwenkai-bold.css +873 -873
  582. package/css/lxgwwenkai-light.css +873 -873
  583. package/css/lxgwwenkai-regular.css +873 -873
  584. package/css/lxgwwenkaimono-bold.css +873 -873
  585. package/css/lxgwwenkaimono-light.css +873 -873
  586. package/css/lxgwwenkaimono-regular.css +873 -873
  587. package/package.json +2 -2
  588. package/favicon.ico +0 -0
@@ -0,0 +1,18 @@
1
+ import{a1 as Nt,o as Ge,aJ as He,e as ke,m as We,h as St,a7 as qt,c9 as Ye,ca as Xe,ai as oe}from"./index.fae3cea4.js";import{V as Ke}from"./video_box.bfb0d4a5.js";import{O as je}from"./icon.94f94d81.js";import"./_commonjs-dynamic-modules.30ae7933.js";import"./index.0adfc44b.js";import"./Layout.683e33e3.js";import"./useTitle.630c0b7f.js";import"./index.952b63b2.js";import"./FolderTree.3d6d889d.js";import"./index.afa471fc.js";/*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */function qe(i){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&i[t],s=0;if(e)return e.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&s>=i.length&&(i=void 0),{value:i&&i[s++],done:!i}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $e(i,t){var e=typeof Symbol=="function"&&i[Symbol.iterator];if(!e)return i;var s=e.call(i),n,r=[],o;try{for(;(t===void 0||t-- >0)&&!(n=s.next()).done;)r.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(e=s.return)&&e.call(s)}finally{if(o)throw o.error}}return r}function wt(){for(var i=[],t=0;t<arguments.length;t++)i=i.concat($e(arguments[t]));return i}var lt=function(i){return typeof i>"u"},Ut=function(){function i(e,s){var n,r;if(this._canceled=!1,s)try{for(var o=qe(Object.keys(s)),a=o.next();!a.done;a=o.next()){var h=a.value;this[h]=s[h]}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}this.eventType=e}var t=i.prototype;return t.stop=function(){this._canceled=!0},t.isCanceled=function(){return this._canceled},i}(),P=function(){function i(){this._eventHandler={}}var t=i.prototype;return t.trigger=function(e){for(var s=[],n=1;n<arguments.length;n++)s[n-1]=arguments[n];var r=e instanceof Ut?e.eventType:e,o=wt(this._eventHandler[r]||[]);return o.length<=0?this:(e instanceof Ut?(e.currentTarget=this,o.forEach(function(a){a(e)})):o.forEach(function(a){a.apply(void 0,wt(s))}),this)},t.once=function(e,s){var n=this;if(typeof e=="object"&&lt(s)){var r=e;for(var o in r)this.once(o,r[o]);return this}else if(typeof e=="string"&&typeof s=="function"){var a=function(){for(var h=[],l=0;l<arguments.length;l++)h[l]=arguments[l];s.apply(void 0,wt(h)),n.off(e,a)};this.on(e,a)}return this},t.hasOn=function(e){return!!this._eventHandler[e]},t.on=function(e,s){if(typeof e=="object"&&lt(s)){var n=e;for(var r in n)this.on(r,n[r]);return this}else if(typeof e=="string"&&typeof s=="function"){var o=this._eventHandler[e];lt(o)&&(this._eventHandler[e]=[],o=this._eventHandler[e]),o.push(s)}return this},t.off=function(e,s){if(lt(e))return this._eventHandler={},this;if(lt(s)){if(typeof e=="string")return delete this._eventHandler[e],this;var n=e;for(var r in n)this.off(r,n[r]);return this}var o=this._eventHandler[e];if(o){for(var a=o.length,h=0;h<a;++h)if(o[h]===s){o.splice(h,1),a<=1&&delete this._eventHandler[e];break}}return this},i.VERSION="3.0.5",i}(),ct=Ut,Y=1e-6,w=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var i=0,t=arguments.length;t--;)i+=arguments[t]*arguments[t];return Math.sqrt(i)});function Ze(){var i=new w(9);return w!=Float32Array&&(i[1]=0,i[2]=0,i[3]=0,i[5]=0,i[6]=0,i[7]=0),i[0]=1,i[4]=1,i[8]=1,i}function ft(){var i=new w(16);return w!=Float32Array&&(i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0),i[0]=1,i[5]=1,i[10]=1,i[15]=1,i}function Je(i){return i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=1,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=1,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i}function ae(i,t,e){var s=t[0],n=t[1],r=t[2],o=t[3],a=t[4],h=t[5],l=t[6],c=t[7],_=t[8],E=t[9],f=t[10],p=t[11],v=t[12],g=t[13],R=t[14],C=t[15],y=e[0],T=e[1],m=e[2],b=e[3];return i[0]=y*s+T*a+m*_+b*v,i[1]=y*n+T*h+m*E+b*g,i[2]=y*r+T*l+m*f+b*R,i[3]=y*o+T*c+m*p+b*C,y=e[4],T=e[5],m=e[6],b=e[7],i[4]=y*s+T*a+m*_+b*v,i[5]=y*n+T*h+m*E+b*g,i[6]=y*r+T*l+m*f+b*R,i[7]=y*o+T*c+m*p+b*C,y=e[8],T=e[9],m=e[10],b=e[11],i[8]=y*s+T*a+m*_+b*v,i[9]=y*n+T*h+m*E+b*g,i[10]=y*r+T*l+m*f+b*R,i[11]=y*o+T*c+m*p+b*C,y=e[12],T=e[13],m=e[14],b=e[15],i[12]=y*s+T*a+m*_+b*v,i[13]=y*n+T*h+m*E+b*g,i[14]=y*r+T*l+m*f+b*R,i[15]=y*o+T*c+m*p+b*C,i}function Qe(i,t,e,s){var n=t[0],r=t[1],o=t[2],a=t[3],h=n+n,l=r+r,c=o+o,_=n*h,E=n*l,f=n*c,p=r*l,v=r*c,g=o*c,R=a*h,C=a*l,y=a*c,T=s[0],m=s[1],b=s[2];return i[0]=(1-(p+g))*T,i[1]=(E+y)*T,i[2]=(f-C)*T,i[3]=0,i[4]=(E-y)*m,i[5]=(1-(_+g))*m,i[6]=(v+R)*m,i[7]=0,i[8]=(f+C)*b,i[9]=(v-R)*b,i[10]=(1-(_+p))*b,i[11]=0,i[12]=e[0],i[13]=e[1],i[14]=e[2],i[15]=1,i}function ts(i,t,e,s,n){var r=1/Math.tan(t/2),o;return i[0]=r/e,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=r,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[11]=-1,i[12]=0,i[13]=0,i[15]=0,n!=null&&n!==1/0?(o=1/(s-n),i[10]=(n+s)*o,i[14]=2*n*s*o):(i[10]=-1,i[14]=-2*s),i}var es=ts;function ss(i,t,e,s){var n,r,o,a,h,l,c,_,E,f,p=t[0],v=t[1],g=t[2],R=s[0],C=s[1],y=s[2],T=e[0],m=e[1],b=e[2];return Math.abs(p-T)<Y&&Math.abs(v-m)<Y&&Math.abs(g-b)<Y?Je(i):(c=p-T,_=v-m,E=g-b,f=1/Math.hypot(c,_,E),c*=f,_*=f,E*=f,n=C*E-y*_,r=y*c-R*E,o=R*_-C*c,f=Math.hypot(n,r,o),f?(f=1/f,n*=f,r*=f,o*=f):(n=0,r=0,o=0),a=_*o-E*r,h=E*n-c*o,l=c*r-_*n,f=Math.hypot(a,h,l),f?(f=1/f,a*=f,h*=f,l*=f):(a=0,h=0,l=0),i[0]=n,i[1]=a,i[2]=c,i[3]=0,i[4]=r,i[5]=h,i[6]=_,i[7]=0,i[8]=o,i[9]=l,i[10]=E,i[11]=0,i[12]=-(n*p+r*v+o*g),i[13]=-(a*p+h*v+l*g),i[14]=-(c*p+_*v+E*g),i[15]=1,i)}function B(){var i=new w(3);return w!=Float32Array&&(i[0]=0,i[1]=0,i[2]=0),i}function Ft(i){var t=i[0],e=i[1],s=i[2];return Math.hypot(t,e,s)}function I(i,t,e){var s=new w(3);return s[0]=i,s[1]=t,s[2]=e,s}function is(i,t){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i}function ns(i,t,e){return i[0]=t[0]-e[0],i[1]=t[1]-e[1],i[2]=t[2]-e[2],i}function rs(i,t,e){return i[0]=t[0]*e,i[1]=t[1]*e,i[2]=t[2]*e,i}function he(i,t){var e=t[0],s=t[1],n=t[2],r=e*e+s*s+n*n;return r>0&&(r=1/Math.sqrt(r)),i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i}function le(i,t){return i[0]*t[0]+i[1]*t[1]+i[2]*t[2]}function Q(i,t,e){var s=t[0],n=t[1],r=t[2],o=e[0],a=e[1],h=e[2];return i[0]=n*h-r*a,i[1]=r*o-s*h,i[2]=s*a-n*o,i}function $t(i,t,e){var s=t[0],n=t[1],r=t[2],o=e[3]*s+e[7]*n+e[11]*r+e[15];return o=o||1,i[0]=(e[0]*s+e[4]*n+e[8]*r+e[12])/o,i[1]=(e[1]*s+e[5]*n+e[9]*r+e[13])/o,i[2]=(e[2]*s+e[6]*n+e[10]*r+e[14])/o,i}function F(i,t,e){var s=e[0],n=e[1],r=e[2],o=e[3],a=t[0],h=t[1],l=t[2],c=n*l-r*h,_=r*a-s*l,E=s*h-n*a,f=n*E-r*_,p=r*c-s*E,v=s*_-n*c,g=o*2;return c*=g,_*=g,E*=g,f*=2,p*=2,v*=2,i[0]=a+c+f,i[1]=h+_+p,i[2]=l+E+v,i}var os=Ft;(function(){var i=B();return function(t,e,s,n,r,o){var a,h;for(e||(e=3),s||(s=0),n?h=Math.min(n*e+s,t.length):h=t.length,a=s;a<h;a+=e)i[0]=t[a],i[1]=t[a+1],i[2]=t[a+2],r(i,i,o),t[a]=i[0],t[a+1]=i[1],t[a+2]=i[2];return t}})();function as(){var i=new w(4);return w!=Float32Array&&(i[0]=0,i[1]=0,i[2]=0,i[3]=0),i}function hs(i){var t=new w(4);return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t}function ls(i,t,e,s){var n=new w(4);return n[0]=i,n[1]=t,n[2]=e,n[3]=s,n}function cs(i,t){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i}function us(i,t,e,s,n){return i[0]=t,i[1]=e,i[2]=s,i[3]=n,i}function _s(i,t){var e=t[0],s=t[1],n=t[2],r=t[3],o=e*e+s*s+n*n+r*r;return o>0&&(o=1/Math.sqrt(o)),i[0]=e*o,i[1]=s*o,i[2]=n*o,i[3]=r*o,i}function ds(i,t){var e=i[0],s=i[1],n=i[2],r=i[3],o=t[0],a=t[1],h=t[2],l=t[3];return Math.abs(e-o)<=Y*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(s-a)<=Y*Math.max(1,Math.abs(s),Math.abs(a))&&Math.abs(n-h)<=Y*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(r-l)<=Y*Math.max(1,Math.abs(r),Math.abs(l))}(function(){var i=as();return function(t,e,s,n,r,o){var a,h;for(e||(e=4),s||(s=0),n?h=Math.min(n*e+s,t.length):h=t.length,a=s;a<h;a+=e)i[0]=t[a],i[1]=t[a+1],i[2]=t[a+2],i[3]=t[a+3],r(i,i,o),t[a]=i[0],t[a+1]=i[1],t[a+2]=i[2],t[a+3]=i[3];return t}})();function G(){var i=new w(4);return w!=Float32Array&&(i[0]=0,i[1]=0,i[2]=0),i[3]=1,i}function ce(i){return i[0]=0,i[1]=0,i[2]=0,i[3]=1,i}function fs(i,t,e){e=e*.5;var s=Math.sin(e);return i[0]=s*t[0],i[1]=s*t[1],i[2]=s*t[2],i[3]=Math.cos(e),i}function Zt(i,t,e){var s=t[0],n=t[1],r=t[2],o=t[3],a=e[0],h=e[1],l=e[2],c=e[3];return i[0]=s*c+o*a+n*l-r*h,i[1]=n*c+o*h+r*a-s*l,i[2]=r*c+o*l+s*h-n*a,i[3]=o*c-s*a-n*h-r*l,i}function ue(i,t,e){e*=.5;var s=t[0],n=t[1],r=t[2],o=t[3],a=Math.sin(e),h=Math.cos(e);return i[0]=s*h+o*a,i[1]=n*h+r*a,i[2]=r*h-n*a,i[3]=o*h-s*a,i}function _e(i,t,e){e*=.5;var s=t[0],n=t[1],r=t[2],o=t[3],a=Math.sin(e),h=Math.cos(e);return i[0]=s*h-r*a,i[1]=n*h+o*a,i[2]=r*h+s*a,i[3]=o*h-n*a,i}function de(i,t,e){e*=.5;var s=t[0],n=t[1],r=t[2],o=t[3],a=Math.sin(e),h=Math.cos(e);return i[0]=s*h+n*a,i[1]=n*h-s*a,i[2]=r*h+o*a,i[3]=o*h-r*a,i}function vt(i,t,e,s){var n=t[0],r=t[1],o=t[2],a=t[3],h=e[0],l=e[1],c=e[2],_=e[3],E,f,p,v,g;return f=n*h+r*l+o*c+a*_,f<0&&(f=-f,h=-h,l=-l,c=-c,_=-_),1-f>Y?(E=Math.acos(f),p=Math.sin(E),v=Math.sin((1-s)*E)/p,g=Math.sin(s*E)/p):(v=1-s,g=s),i[0]=v*n+g*h,i[1]=v*r+g*l,i[2]=v*o+g*c,i[3]=v*a+g*_,i}function Es(i,t){var e=t[0]+t[4]+t[8],s;if(e>0)s=Math.sqrt(e+1),i[3]=.5*s,s=.5/s,i[0]=(t[5]-t[7])*s,i[1]=(t[6]-t[2])*s,i[2]=(t[1]-t[3])*s;else{var n=0;t[4]>t[0]&&(n=1),t[8]>t[n*3+n]&&(n=2);var r=(n+1)%3,o=(n+2)%3;s=Math.sqrt(t[n*3+n]-t[r*3+r]-t[o*3+o]+1),i[n]=.5*s,s=.5/s,i[3]=(t[r*3+o]-t[o*3+r])*s,i[r]=(t[r*3+n]+t[n*3+r])*s,i[o]=(t[o*3+n]+t[n*3+o])*s}return i}var ut=hs,ms=ls,ps=cs,gs=us,tt=_s,Jt=ds;(function(){var i=B(),t=I(1,0,0),e=I(0,1,0);return function(s,n,r){var o=le(n,r);return o<-.999999?(Q(i,t,n),os(i)<1e-6&&Q(i,e,n),he(i,i),fs(s,i,Math.PI),s):o>.999999?(s[0]=0,s[1]=0,s[2]=0,s[3]=1,s):(Q(i,n,r),s[0]=i[0],s[1]=i[1],s[2]=i[2],s[3]=1+o,tt(s,s))}})();(function(){var i=G(),t=G();return function(e,s,n,r,o,a){return vt(i,s,o,a),vt(t,n,r,a),vt(e,i,t,2*a*(1-a)),e}})();(function(){var i=Ze();return function(t,e,s,n){return i[0]=s[0],i[3]=s[1],i[6]=s[2],i[1]=n[0],i[4]=n[1],i[7]=n[2],i[2]=-e[0],i[5]=-e[1],i[8]=-e[2],tt(t,Es(t,i))}})();function vs(){var i=new w(2);return w!=Float32Array&&(i[0]=0,i[1]=0),i}function Ts(i,t){var e=new w(2);return e[0]=i,e[1]=t,e}(function(){var i=vs();return function(t,e,s,n,r,o){var a,h;for(e||(e=2),s||(s=0),n?h=Math.min(n*e+s,t.length):h=t.length,a=s;a<h;a+=e)i[0]=t[a],i[1]=t[a+1],r(i,i,o),t[a]=i[0],t[a+1]=i[1];return t}})();var Bt=function(i,t){return Bt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,s){e.__proto__=s}||function(e,s){for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])},Bt(i,t)};function nt(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Bt(i,t);function e(){this.constructor=i}i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var st=function(){return st=Object.assign||function(t){for(var e,s=1,n=arguments.length;s<n;s++){e=arguments[s];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},st.apply(this,arguments)};function ys(){for(var i=0,t=0,e=arguments.length;t<e;t++)i+=arguments[t].length;for(var s=Array(i),n=0,t=0;t<e;t++)for(var r=arguments[t],o=0,a=r.length;o<a;o++,n++)s[n]=r[o];return s}var Gt=typeof window<"u",Rs=Gt?window.navigator.userAgent:"",bs=Gt?"getComputedStyle"in window:!1,Cs=/MSIE|Trident|Windows Phone|Edge/.test(Rs),Os=Gt?"addEventListener"in document:!1,Vt="width",_t="height";function Tt(i,t){return i.getAttribute(t)||""}function Rt(i){return[].slice.call(i)}function Is(i,t){return t===void 0&&(t="data-"),!!i.getAttribute(t+"width")}function fe(i,t){return t===void 0&&(t="data-"),"loading"in i&&i.getAttribute("loading")==="lazy"||!!i.getAttribute(t+"lazy")}function Ls(i,t){return t===void 0&&(t="data-"),!!i.getAttribute(t+"skip")}function Ee(i,t,e){Os?i.addEventListener(t,e,!1):i.attachEvent?i.attachEvent("on"+t,e):i["on"+t]=e}function me(i,t,e){i.removeEventListener?i.removeEventListener(t,e,!1):i.detachEvent?i.detachEvent("on"+t,e):i["on"+t]=null}function As(i){return pe(i,"Width")}function Ns(i){return pe(i,"Height")}function Ss(i){return(bs?window.getComputedStyle(i):i.currentStyle)||{}}function pe(i,t){var e=i["client"+t]||i["offset"+t];return parseFloat(e||Ss(i)[t.toLowerCase()])||0}function ws(i,t,e){var s=Rt(i.querySelectorAll(ys(["["+e+"skip] ["+e+"width]"],t.map(function(n){return["["+e+"skip] "+n,n+"["+e+"skip]","["+e+"width] "+n].join(", ")})).join(", ")));return Rt(i.querySelectorAll("["+e+"width], "+t.join(", "))).filter(function(n){return s.indexOf(n)===-1})}var et=[];function ge(i,t){!et.length&&Ee(window,"resize",Te),i.__PREFIX__=t,et.push(i),ve(i)}function Ps(i,t){var e=et.indexOf(i);if(!(e<0)){var s=Tt(i,t+"fixed");delete i.__PREFIX__,i.style[s===_t?Vt:_t]="",et.splice(e,1),!et.length&&me(window,"resize",Te)}}function ve(i,t){t===void 0&&(t="data-");var e=i.__PREFIX__||t,s=parseInt(Tt(i,""+e+Vt),10)||0,n=parseInt(Tt(i,""+e+_t),10)||0,r=Tt(i,e+"fixed");if(r===_t){var o=Ns(i)||n;i.style[Vt]=s/n*o+"px"}else{var o=As(i)||s;i.style[_t]=n/s*o+"px"}}function Te(){et.forEach(function(i){ve(i)})}var Ht=function(i){nt(t,i);function t(s,n){n===void 0&&(n={});var r=i.call(this)||this;r.isReady=!1,r.isPreReady=!1,r.hasDataSize=!1,r.hasLoading=!1,r.isSkip=!1,r.onCheck=function(a){if(r.clear(),a&&a.type==="error"&&r.onError(r.element),!(r.hasLoading&&r.checkElement())){var h=!r.hasDataSize&&!r.hasLoading;r.onReady(h)}},r.options=st({prefix:"data-"},n),r.element=s;var o=r.options.prefix;return r.hasDataSize=Is(s,o),r.isSkip=Ls(s,o),r.hasLoading=fe(s,o),r}var e=t.prototype;return e.check=function(){return this.isSkip||!this.checkElement()?(this.onAlreadyReady(!0),!1):(this.hasDataSize&&ge(this.element,this.options.prefix),(this.hasDataSize||this.hasLoading)&&this.onAlreadyPreReady(),!0)},e.addEvents=function(){var s=this,n=this.element;this.constructor.EVENTS.forEach(function(r){Ee(n,r,s.onCheck)})},e.clear=function(){var s=this,n=this.element;this.constructor.EVENTS.forEach(function(r){me(n,r,s.onCheck)}),this.removeAutoSizer()},e.destroy=function(){this.clear(),this.off()},e.removeAutoSizer=function(){if(this.hasDataSize){var s=this.options.prefix;Ps(this.element,s)}},e.onError=function(s){this.trigger("error",{element:this.element,target:s})},e.onPreReady=function(){this.isPreReady||(this.isPreReady=!0,this.trigger("preReady",{element:this.element,hasLoading:this.hasLoading,isSkip:this.isSkip}))},e.onReady=function(s){this.isReady||(s=!this.isPreReady&&s,s&&(this.isPreReady=!0),this.removeAutoSizer(),this.isReady=!0,this.trigger("ready",{element:this.element,withPreReady:s,hasLoading:this.hasLoading,isSkip:this.isSkip}))},e.onAlreadyError=function(s){var n=this;setTimeout(function(){n.onError(s)})},e.onAlreadyPreReady=function(){var s=this;setTimeout(function(){s.onPreReady()})},e.onAlreadyReady=function(s){var n=this;setTimeout(function(){n.onReady(s)})},t.EVENTS=[],t}(P),xs=function(i){nt(t,i);function t(){return i!==null&&i.apply(this,arguments)||this}var e=t.prototype;return e.setHasLoading=function(s){this.hasLoading=s},e.check=function(){return this.isSkip?(this.onAlreadyReady(!0),!1):(this.hasDataSize?(ge(this.element,this.options.prefix),this.onAlreadyPreReady()):this.trigger("requestChildren"),!0)},e.checkElement=function(){return!0},e.destroy=function(){this.clear(),this.trigger("requestDestroy"),this.off()},e.onAlreadyPreReady=function(){i.prototype.onAlreadyPreReady.call(this),this.trigger("reqeustReadyChildren")},t.EVENTS=[],t}(Ht),Ds=function(i){nt(t,i);function t(s){s===void 0&&(s={});var n=i.call(this)||this;return n.readyCount=0,n.preReadyCount=0,n.totalCount=0,n.totalErrorCount=0,n.isPreReadyOver=!0,n.elementInfos=[],n.options=st({loaders:{},prefix:"data-"},s),n}var e=t.prototype;return e.check=function(s){var n=this,r=this.options.prefix;this.clear(),this.elementInfos=Rt(s).map(function(a,h){var l=n.getLoader(a,{prefix:r});return l.check(),l.on("error",function(c){n.onError(h,c.target)}).on("preReady",function(c){var _=n.elementInfos[h];_.hasLoading=c.hasLoading,_.isSkip=c.isSkip;var E=n.checkPreReady(h);n.onPreReadyElement(h),E&&n.onPreReady()}).on("ready",function(c){var _=c.withPreReady,E=c.hasLoading,f=c.isSkip,p=n.elementInfos[h];p.hasLoading=E,p.isSkip=f;var v=_&&n.checkPreReady(h),g=n.checkReady(h);_&&n.onPreReadyElement(h),n.onReadyElement(h),v&&n.onPreReady(),g&&n.onReady()}),{loader:l,element:a,hasLoading:!1,hasError:!1,isPreReady:!1,isReady:!1,isSkip:!1}});var o=this.elementInfos.length;return this.totalCount=o,o||setTimeout(function(){n.onPreReady(),n.onReady()}),this},e.getTotalCount=function(){return this.totalCount},e.isPreReady=function(){return this.elementInfos.every(function(s){return s.isPreReady})},e.isReady=function(){return this.elementInfos.every(function(s){return s.isReady})},e.hasError=function(){return this.totalErrorCount>0},e.clear=function(){this.isPreReadyOver=!1,this.totalCount=0,this.preReadyCount=0,this.readyCount=0,this.totalErrorCount=0,this.elementInfos.forEach(function(s){s.loader&&s.loader.destroy()}),this.elementInfos=[]},e.destroy=function(){this.clear(),this.off()},e.getLoader=function(s,n){var r=this,o=s.tagName.toLowerCase(),a=this.options.loaders,h=n.prefix,l=Object.keys(a);if(a[o])return new a[o](s,n);var c=new xs(s,n),_=Rt(s.querySelectorAll(l.join(", ")));c.setHasLoading(_.some(function(p){return fe(p,h)}));var E=!1,f=this.clone().on("error",function(p){c.onError(p.target)}).on("ready",function(){c.onReady(E)});return c.on("requestChildren",function(){var p=ws(s,l,r.options.prefix);f.check(p).on("preReady",function(v){E=v.isReady,E||c.onPreReady()})}).on("reqeustReadyChildren",function(){f.check(_)}).on("requestDestroy",function(){f.destroy()}),c},e.clone=function(){return new t(st({},this.options))},e.checkPreReady=function(s){return this.elementInfos[s].isPreReady=!0,++this.preReadyCount,!(this.preReadyCount<this.totalCount)},e.checkReady=function(s){return this.elementInfos[s].isReady=!0,++this.readyCount,!(this.readyCount<this.totalCount)},e.onError=function(s,n){var r=this.elementInfos[s];r.hasError=!0,this.trigger(new ct("error",{element:r.element,index:s,target:n,errorCount:this.getErrorCount(),totalErrorCount:++this.totalErrorCount}))},e.onPreReadyElement=function(s){var n=this.elementInfos[s];this.trigger(new ct("preReadyElement",{element:n.element,index:s,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:n.hasLoading,isSkip:n.isSkip}))},e.onPreReady=function(){this.isPreReadyOver=!0,this.trigger(new ct("preReady",{readyCount:this.readyCount,totalCount:this.totalCount,isReady:this.isReady(),hasLoading:this.hasLoading()}))},e.onReadyElement=function(s){var n=this.elementInfos[s];this.trigger(new ct("readyElement",{index:s,element:n.element,hasError:n.hasError,errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:n.hasLoading,isPreReadyOver:this.isPreReadyOver,isSkip:n.isSkip}))},e.onReady=function(){this.trigger(new ct("ready",{errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,totalCount:this.totalCount}))},e.getErrorCount=function(){return this.elementInfos.filter(function(s){return s.hasError}).length},e.hasLoading=function(){return this.elementInfos.some(function(s){return s.hasLoading})},t}(P),Ms=function(i){nt(t,i);function t(){return i!==null&&i.apply(this,arguments)||this}var e=t.prototype;return e.checkElement=function(){var s=this.element,n=s.getAttribute("src");if(s.complete){if(n)return s.naturalWidth||this.onAlreadyError(s),!1;this.onAlreadyPreReady()}return this.addEvents(),Cs&&s.setAttribute("src",n),!0},t.EVENTS=["load","error"],t}(Ht),Us=function(i){nt(t,i);function t(){return i!==null&&i.apply(this,arguments)||this}var e=t.prototype;return e.checkElement=function(){var s=this.element;return s.readyState>=1?!1:s.error?(this.onAlreadyError(s),!1):(this.addEvents(),!0)},t.EVENTS=["loadedmetadata","error"],t}(Ht),Fs=function(i){nt(t,i);function t(e){return e===void 0&&(e={}),i.call(this,st({loaders:{img:Ms,video:Us}},e))||this}return t}(Ds);const Bs=Fs;function M(i,t,e,s){function n(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function a(c){try{l(s.next(c))}catch(_){o(_)}}function h(c){try{l(s.throw(c))}catch(_){o(_)}}function l(c){c.done?r(c.value):n(c.value).then(a,h)}l((s=s.apply(i,t||[])).next())})}class H extends Error{constructor(t,e){super(t),Object.setPrototypeOf(this,H.prototype),this.name="View360Error",this.code=e}}const Vs={WRONG_TYPE:0,WRONG_OPTION:1,ELEMENT_NOT_FOUND:2,CANVAS_NOT_FOUND:3,WEBGL_NOT_SUPPORTED:4,FAILED_CREATE_CONTEXT_2D:5,PROVIDE_PROJECTION_FIRST:6,FAILED_LINKING_PROGRAM:7,INSUFFICIENT_ARGS:8},zs={WRONG_TYPE:(i,t)=>`${typeof i} is not a ${t.map(e=>`"${e}"`).join(" or ")}.`,WRONG_OPTION:(i,t)=>`Bad option: given "${i}" for option "${t}".`,ELEMENT_NOT_FOUND:i=>`Element with selector "${i}" not found.`,CANVAS_NOT_FOUND:"The canvas element was not found inside the given root element.",WEBGL_NOT_SUPPORTED:"WebGL is not supported on this browser.",FAILED_CREATE_CONTEXT_2D:"Failed to create canvas 2D context",PROVIDE_PROJECTION_FIRST:'"projection" should be provided before initialization.',FAILED_LINKING_PROGRAM:(i,t)=>`Failed linking WebGL program - "${i}
15
+ Shader compile Log: ${t}`,INSUFFICIENT_ARGS:(i,t)=>`Insufficient arguments: given "${i}" for "${t}".`};var U={CODES:Vs,MESSAGES:zs};const u={MOUSE_DOWN:"mousedown",MOUSE_MOVE:"mousemove",MOUSE_UP:"mouseup",TOUCH_START:"touchstart",TOUCH_MOVE:"touchmove",TOUCH_END:"touchend",WHEEL:"wheel",RESIZE:"resize",CONTEXT_MENU:"contextmenu",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_UP:"pointerup",POINTER_CANCEL:"pointercancel",POINTER_ENTER:"pointerenter",POINTER_LEAVE:"pointerleave",KEY_DOWN:"keydown",KEY_UP:"keyup",LOAD:"load",ERROR:"error",CLICK:"click",DOUBLE_CLICK:"dblclick",CONTEXT_CREATE_ERROR:"webglcontextcreationerror",CONTEXT_LOST:"webglcontextlost",CONTEXT_RESTORED:"webglcontextrestored",DEVICE_ORIENTATION:"deviceorientation",DEVICE_MOTION:"devicemotion",ORIENTATION_CHANGE:"orientationchange",VIDEO_PLAY:"play",VIDEO_PAUSE:"pause",VIDEO_LOADED_DATA:"loadeddata",VIDEO_VOLUME_CHANGE:"volumechange",VIDEO_TIME_UPDATE:"timeupdate",VIDEO_DURATION_CHANGE:"durationchange",VIDEO_CAN_PLAYTHROUGH:"canplaythrough",TRANSITION_END:"transitionend",XR_END:"end"},z="div",Ot="button";var zt;(function(i){i[i.LEFT=0]="LEFT",i[i.MIDDLE=1]="MIDDLE",i[i.RIGHT=2]="RIGHT"})(zt||(zt={}));const W={GRAB:"grab",GRABBING:"grabbing",NONE:""},Qt=["LEFT","UP","RIGHT","DOWN"];var bt;(function(i){i[i.LEFT=37]="LEFT",i[i.UP=38]="UP",i[i.RIGHT=39]="RIGHT",i[i.DOWN=40]="DOWN"})(bt||(bt={}));const Gs=32,ye={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"},Hs=" ",te=["requestFullscreen","webkitRequestFullscreen","webkitRequestFullScreen","webkitCancelFullScreen","mozRequestFullScreen","msRequestFullscreen"],ks=["fullscreenElement","webkitFullscreenElement","webkitCurrentFullScreenElement","mozFullScreenElement","msFullscreenElement"],Ws=["exitFullscreen","webkitExitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"],Ct=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],X={CONTAINER:"view360-container",CANVAS:"view360-canvas",CTX_LOST:"view360-ctx-lost",IN_VR:"view360-vr-presenting",HOTSPOT_CONTAINER:"view360-hotspots",HOTSPOT:"view360-hotspot",HOTSPOT_VISIBLE:"view360-hotspot-visible",HOTSPOT_FLIP_X:"view360-hotspot-flip-x",HOTSPOT_FLIP_Y:"view360-hotspot-flip-y"},O={READY:"ready",LOAD_START:"loadStart",LOAD:"load",PROJECTION_CHANGE:"projectionChange",RESIZE:"resize",BEFORE_RENDER:"beforeRender",RENDER:"render",INPUT_START:"inputStart",INPUT_END:"inputEnd",VIEW_CHANGE:"viewChange",STATIC_CLICK:"staticClick",VR_START:"vrStart",VR_END:"vrEnd"},Ys={LINEAR:i=>i,SINE_WAVE:i=>Math.sin(i*Math.PI*2),EASE_OUT_CUBIC:i=>1-Math.pow(1-i,3),EASE_OUT_BOUNCE:i=>i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375};var Pt;const Re={CHANGE:"change",ANIMATION_END:"animationEnd"},Xs={UPDATE:"update"},d={INPUT_START:"inputStart",CHANGE:"change",INPUT_END:"inputEnd",ENABLE:"enable",DISABLE:"disable",STATIC_CLICK:"staticClick"},N=Math.PI/180,Z=180/Math.PI,pt=Ys.EASE_OUT_CUBIC,gt=300,It={min:-1/0,max:1/0},be={min:-90,max:90},Ks={min:.6,max:10};var ee;(function(i){i[i.ZERO=0]="ZERO",i[i.CW_90=1]="CW_90",i[i.CCW_90=2]="CCW_90",i[i.CW_180=3]="CW_180"})(ee||(ee={}));const $="view360videotimechange",xt="http://www.w3.org/2000/svg",se="immersive-vr",ie="local",ne=(Pt=Number.EPSILON)!==null&&Pt!==void 0?Pt:2220446049250313e-31,kt=i=>typeof i=="string",js=i=>!!i&&i.nodeType===Node.ELEMENT_NODE,V=(i,t=z)=>{const e=document.createElement(t);return e.classList.add(i),e},Ce=(i,t)=>{let e=null;if(kt(i)){const n=(t||document).querySelector(i);if(!n)return null;e=n}else js(i)&&(e=i);return e},qs=(i,t)=>{const e=Ce(i,t);if(!e)throw kt(i)?new H(U.MESSAGES.ELEMENT_NOT_FOUND(i),U.CODES.ELEMENT_NOT_FOUND):new H(U.MESSAGES.WRONG_TYPE(i,["HTMLElement","string"]),U.CODES.WRONG_TYPE);return e},$s=(i,t)=>{const e=i.querySelector(t);if(!e)throw new H(U.MESSAGES.CANVAS_NOT_FOUND,U.CODES.CANVAS_NOT_FOUND);return e},S=(i,t,e)=>Math.max(Math.min(i,e),t),Oe=(i,t,e)=>i*(1-e)+t*e,it=(i,t,e)=>{const s=Math.abs(e-t);if(i<t){const n=(t-i)%s;i=e-n}else if(i>e){const n=(i-e)%s;i=t+n}return i},Zs=(i,t)=>{for(let e=0;e<i.length;e++)if(t(i[e]))return e;return-1},x=i=>typeof i=="object"?i:{},yt=(i,t)=>Math.atan(Math.tan(i*.5)/t)*2,dt=()=>{if(!document)return!1;for(const i of ks)if(document[i])return!0;return!1},Ie=()=>window.isSecureContext&&!!DeviceMotionEvent&&"requestPermission"in DeviceMotionEvent,Js=(i,t)=>{const e=Math.tan(N*i*.5),s=Math.tan(N*t*.5);return e/s},re=(i,t,e,s)=>{ce(i);const n=.01,r=S(e,-90+n,90-n);return _e(i,i,t*N),ue(i,i,r*N),de(i,i,s*N),i},Le=i=>{const t=i[0],e=i[1],s=i[2],n=i[3],r=t*t,o=e*e,a=s*s,h=n*n,l=r+o+a+h,c=t*n-e*s;let _,E;if(c>.499995*l)_=Math.PI/2,E=2*Math.atan2(e,t);else if(c<-.499995*l)_=-Math.PI/2,E=-2*Math.atan2(e,t);else{const f=I(0,0,1),p=I(0,1,0);F(f,f,i),F(p,p,i);const v=Math.sqrt(f[0]*f[0]+f[2]*f[2]);_=Math.atan2(-f[1],v),E=Math.atan2(f[0],f[2])}return{pitch:S(_*Z,-90,90),yaw:it(E*Z,0,360)}};class Et{get val(){return this._val}get start(){return this._start}get end(){return this._end}get progress(){return this._progress}get activated(){return this._activated}get duration(){return this._duration}set duration(t){this._duration=t}get loop(){return this._loop}set loop(t){this._loop=t}get range(){return this._range}get easing(){return this._easing}set easing(t){this._easing=t}constructor({duration:t=gt,loop:e=!1,range:s={min:0,max:1},easing:n=pt}={}){this._duration=t,this._loop=e,this._range=s,this._easing=n,this._activated=!1,this.reset(0)}update(t){if(!this._activated)return this._val=this._end,0;const e=this._start,s=this._end,n=this._duration,r=this._val,o=this._loop,a=this._progress+t/n;this._progress=o?it(a,0,1):S(a,0,1);const h=this._easing(this._progress);return this._val=Oe(e,s,h),!o&&this._progress>=1&&(this._activated=!1),this._val-r}reset(t){const e=this._range,s=S(t,e.min,e.max);this._start=s,this._end=s,this._val=s,this._progress=0,this._activated=!1}add(t){const e=this._range;this._start=S(this._start+t,e.min,e.max),this._end=S(this._end+t,e.min,e.max),this._val=S(this._val+t,e.min,e.max)}setNewEndByDelta(t){const e=this._range;this._start=this._val,this._end=S(this._end+t,e.min,e.max),this._progress=0,this._activated=!0}setRange(t,e){this._start=S(this._start,t,e),this._end=S(this._end,t,e),this._range={min:t,max:e}}}class Qs{get duration(){return this._motion.duration}set duration(t){this._motion.duration=t}get easing(){return this._motion.easing}set easing(t){this._motion.easing=t}constructor(t,e,s,{duration:n=gt,easing:r=pt}={}){this._camera=t,this._motion=new Et({duration:n,easing:r,range:{min:0,max:1}}),this._from=e,this._to=s,this._finishPromise=new Promise(o=>{this._finish=o}),this._motion.setNewEndByDelta(1)}getFinishPromise(){return this._finishPromise}update(t){const e=this._camera,s=this._from,n=this._to,r=this._motion;r.update(t);const o=r.val,a=G(),h=Oe(s.zoom,n.zoom,o);vt(a,s.rotation,n.rotation,o),e.rotate(a,h),o>=1&&this._finish()}}class ti extends P{get aspect(){return this._aspect}get changed(){return this._changed}get yawRange(){return this._initialYawRange}set yawRange(t){this._initialYawRange=t}get pitchRange(){return this._initialPitchRange}set pitchRange(t){this._initialPitchRange=t}get zoomRange(){return this._initialZoomRange}set zoomRange(t){this._initialZoomRange=t}constructor({initialYaw:t,initialPitch:e,initialZoom:s,yawRange:n,pitchRange:r,zoomRange:o,fov:a}){super(),this.yaw=t,this.pitch=e,this.zoom=s,this.rollOffset=0,this.initialYaw=t,this.initialPitch=e,this.initialZoom=s,this.position=B(),this.animation=null,this._up=I(0,1,0),this._aspect=1,this._initialYawRange=n,this._initialPitchRange=r,this._initialZoomRange=o,this._yawRange=n,this._pitchRange=r,this._zoomRange=o,this.quaternion=G(),this._updateQuaternion(),this.viewMatrix=ft(),this.projectionMatrix=ft(),this.fov=a,this._maxRenderHeight=-1}destroy(){this.off()}resize(t,e){const s=this._aspect;this._aspect=t/e,this._aspect!==s&&this.updateMatrix()}lookAt({yaw:t=this.yaw,pitch:e=this.pitch,zoom:s=this.zoom}){const n=ut(this.quaternion),r=this.zoom;this.yaw=it(t,0,360),this.pitch=S(e,-90,90),this.zoom=s,this._updateQuaternion();const o=Math.abs(s-r);(!Jt(this.quaternion,n)||o>=ne*10)&&this.updateMatrix()}rotate(t,e=this.zoom){const s=tt(G(),t),n=Jt(this.quaternion,s);ps(this.quaternion,s);const r=this.zoom,{yaw:o,pitch:a}=Le(s);this.yaw=o,this.pitch=a,this.zoom=e;const h=Math.abs(e-r);(!n||h>=ne*10)&&this.updateMatrix()}animateTo({yaw:t=this.yaw,pitch:e=this.pitch,zoom:s=this.zoom,duration:n=0,easing:r=pt}={}){return M(this,void 0,void 0,function*(){if(this.yaw===t&&this.pitch===e&&this.zoom===s)return;const o={rotation:ut(this.quaternion),zoom:this.zoom},a={rotation:re(G(),t,e,this.rollOffset),zoom:s},h=new Qs(this,o,a,{duration:n,easing:r}),l=h.getFinishPromise();return this.animation=h,l.then(()=>{this.animation=null,this.trigger(Re.ANIMATION_END,{animation:h})}),l})}restrictYawRange(t,e){this._yawRange={min:t,max:e}}restrictPitchRange(t,e){this._pitchRange={min:t,max:e}}restrictZoomRange(t,e){this._zoomRange={min:t,max:e}}restrictRenderHeight(t){this._maxRenderHeight=t}resetRange(){this._yawRange=this._initialYawRange,this._pitchRange=this._initialPitchRange,this._zoomRange=this._initialZoomRange,this._maxRenderHeight=-1}getYawRange(t){const e=this._yawRange,s=this._maxRenderHeight;if(!e)return It;const n=this.getHorizontalFov(t)*.5;let r=e.min,o=e.max;if(s>0){const a=yt(n*N,this._aspect),h=s*.5,l=Math.tan(a),c=Math.sqrt((1+h*h)/(1+l*l)),_=Math.atan(Math.tan(n*N)*c)*Z;r=e.min+_,o=e.max-_}return r>o&&(r=0,o=0),{min:r,max:o}}getPitchRange(t){const e=this._pitchRange,s=this._maxRenderHeight;if(!e)return be;let n=e.min,r=e.max;if(s>0){const o=this.getVerticalFov(t)*.5;n=e.min+o,r=e.max-o}return n>r&&(n=0,r=0),{min:Math.max(n,-90),max:Math.min(r,90)}}getZoomRange(){var t;const e=(t=this._zoomRange)!==null&&t!==void 0?t:Ks,s=this.getHorizontalFov(e.max),n=this.getHorizontalFov(e.min),r=this.getHorizontalFov(this.zoom);return{min:Math.max(s,1),max:Math.min(n,180),current:r}}getHorizontalFov(t=this.zoom){return this._getZoomedHorizontalFov(t)*Z}getVerticalFov(t=this.zoom){const e=this._aspect,s=this._getZoomedHorizontalFov(t);return yt(s,e)*Z}fovToZoom(t){const e=this.fov,s=Math.tan(N*e*.5),n=Math.tan(N*t*.5);return s/n}updateMatrix(){const t=this._up,e=this._aspect,s=this.viewMatrix,n=this.projectionMatrix,r=this.position,o=this.quaternion,a=B(),h=I(0,0,-1);F(h,h,o),F(a,t,o);const l=this._getZoomedHorizontalFov(),c=yt(l,e);ss(s,r,h,a),es(n,c,e,.1,100),this._changed=!0}onFrameRender(){this._changed=!1}_updateQuaternion(){re(this.quaternion,this.yaw,this.pitch,this.rollOffset)}_getZoomedHorizontalFov(t=this.zoom){return 2*Math.atan(Math.tan(N*this.fov*.5)/t)}}class Ae extends P{constructor(){super(),this._onMouseDown=t=>{const e=this._el;!e||t.button!==zt.LEFT||(t.preventDefault(),e.focus?e.focus():window.focus(),this._prevPos[0]=t.clientX,this._prevPos[1]=t.clientY,window.addEventListener(u.MOUSE_MOVE,this._onMouseMove,!1),window.addEventListener(u.MOUSE_UP,this._onMouseUp,!1),this.trigger(d.INPUT_START,{srcEvent:t,isTouch:!1,isKeyboard:!1}))},this._onMouseMove=t=>{t.preventDefault();const e=t.clientX,s=t.clientY,n=this._prevPos,r=e-n[0],o=s-n[1];this.trigger(d.CHANGE,{delta:{x:r,y:o},isTouch:!1,isKeyboard:!1}),n[0]=e,n[1]=s},this._onMouseUp=()=>{this._prevPos[0]=0,this._prevPos[1]=0,window.removeEventListener(u.MOUSE_MOVE,this._onMouseMove,!1),window.removeEventListener(u.MOUSE_UP,this._onMouseUp,!1),this.trigger(d.INPUT_END,{isTouch:!1,isKeyboard:!1,scrolling:!1})},this._el=null,this._prevPos=[0,0]}enable(t){this._el||(t.addEventListener(u.MOUSE_DOWN,this._onMouseDown),this._el=t)}disable(){const t=this._el;!t||(t.removeEventListener(u.MOUSE_DOWN,this._onMouseDown),window.removeEventListener(u.MOUSE_MOVE,this._onMouseMove,!1),window.removeEventListener(u.MOUSE_UP,this._onMouseUp,!1),this._el=null)}}class Ne extends P{get scrollable(){return this._scrollable}set scrollable(t){this._scrollable=t}constructor(){super(),this._onTouchStart=t=>{if(t.touches.length>1||this._scrolling)return;const e=t.touches[0];this._isFirstTouch=!0,this._prevPos[0]=e.clientX,this._prevPos[1]=e.clientY,this.trigger(d.INPUT_START,{srcEvent:t,isTouch:!0,isKeyboard:!1})},this._onTouchMove=t=>{if(t.touches.length>1||this._scrolling)return;const e=t.touches[0],s=this._scrollable,n=this._prevPos,r=e.clientX,o=e.clientY,a=r-n[0],h=o-n[1];if(this._isFirstTouch){if(s&&!dt()&&Math.abs(h)>Math.abs(a)){this._scrolling=!0;return}this._isFirstTouch=!1}t.cancelable!==!1&&t.preventDefault(),this.trigger(d.CHANGE,{delta:{x:a,y:h},isTouch:!0,isKeyboard:!1}),n[0]=r,n[1]=o},this._onTouchEnd=t=>{if(t.touches.length!==0)return;const e=t.touches[0],s=this._prevPos;e?(s[0]=e.clientX,s[1]=e.clientY):(s[0]=0,s[1]=0,this.trigger(d.INPUT_END,{isTouch:!0,isKeyboard:!1,scrolling:this._scrolling})),t.cancelable!==!1&&t.preventDefault(),this._scrolling=!1},this._el=null,this._prevPos=[0,0],this._isFirstTouch=!1,this._scrolling=!1,this._scrollable=!1}enable(t){this._el||(t.addEventListener(u.TOUCH_START,this._onTouchStart,{passive:!1}),t.addEventListener(u.TOUCH_MOVE,this._onTouchMove,{passive:!1}),t.addEventListener(u.TOUCH_END,this._onTouchEnd),this._el=t)}disable(){const t=this._el;!t||(t.removeEventListener(u.TOUCH_START,this._onTouchStart),t.removeEventListener(u.TOUCH_MOVE,this._onTouchMove),t.removeEventListener(u.TOUCH_END,this._onTouchEnd),this._el=null)}}class ei extends P{get active(){const t=this._pressed;return t.LEFT||t.UP||t.RIGHT||t.DOWN}constructor(){super(),this._onKeyDown=t=>{if(t.location!==KeyboardEvent.DOM_KEY_LOCATION_STANDARD)return;this._updateKeyPress(t,!0);const e=this._getPressedKeyCount();e<=0||(t.preventDefault(),e===1&&!t.repeat&&this.trigger(d.INPUT_START,{srcEvent:t,isTouch:!1,isKeyboard:!0}))},this._onKeyUp=t=>{t.location!==KeyboardEvent.DOM_KEY_LOCATION_STANDARD||(this._updateKeyPress(t,!1),this._getPressedKeyCount()>0)||this.trigger(d.INPUT_END,{isTouch:!1,isKeyboard:!0,scrolling:!1})},this._el=null,this._clearPressedKeys()}enable(t){this._el||(t.addEventListener(u.KEY_DOWN,this._onKeyDown),t.addEventListener(u.KEY_UP,this._onKeyUp),this._el=t,this._clearPressedKeys())}disable(){const t=this._el;!t||(t.removeEventListener(u.KEY_DOWN,this._onKeyDown),t.removeEventListener(u.KEY_UP,this._onKeyUp),this._el=null,this._clearPressedKeys())}update(){const t=this._getDeltaByPressedKeys();(t.x!==0||t.y!==0)&&this.trigger(d.CHANGE,{delta:t,isTouch:!1,isKeyboard:!0})}_clearPressedKeys(){this._pressed=Qt.reduce((t,e)=>Object.assign(Object.assign({},t),{[e]:!1}),{})}_updateKeyPress(t,e){const s=this._pressed,n=t.keyCode!=null?bt[t.keyCode]:ye[t.key];!n||(s[n]=e)}_getPressedKeyCount(){return Qt.filter(t=>this._pressed[t]).length}_getDeltaByPressedKeys(){const t=this._pressed;let e=0,s=0;return t.LEFT&&(e+=1),t.RIGHT&&(e-=1),t.UP&&(s+=1),t.DOWN&&(s-=1),{x:e,y:s}}}class si extends P{get enabled(){return this._enabled}get enableBlocked(){return this._enableBlocked}get animating(){return this._keyboardInput.active||this._xMotion.activated||this._yMotion.activated}get yaw(){return this._xMotion}get pitch(){return this._yMotion}get scrollable(){return this._touchInput.scrollable}set scrollable(t){this._touchInput.scrollable=t}get pointerScale(){return this._pointerScale}set pointerScale(t){this._pointerScale=t}get keyboardScale(){return this._keyboardScale}set keyboardScale(t){this._keyboardScale=t}get duration(){return this._duration}set duration(t){this._duration=t,this._xMotion.duration=t,this._yMotion.duration=t}get easing(){return this._easing}set easing(t){this._easing=t,this._xMotion.easing=t,this._yMotion.easing=t}get disablePitch(){return this._disablePitch}set disablePitch(t){this._disablePitch=t}get disableYaw(){return this._disableYaw}set disableYaw(t){this._disableYaw=t}get disableKeyboard(){return this._disableKeyboard}set disableKeyboard(t){this._disableKeyboard=t}constructor(t,e,{duration:s=gt,easing:n=pt,pointerScale:r=[1,1],keyboardScale:o=[1,1],disablePitch:a=!1,disableYaw:h=!1,disableKeyboard:l=!1}={}){super(),this._onInputStart=c=>{this._changedWhileDragging=!1,this.trigger(d.INPUT_START,Object.assign(Object.assign({},c),{inputType:"rotate"}))},this._onChange=c=>{const _=c.delta,E=1/this._zoomScale,f=this._screenScale,p=this._keyboardScale,v=this._pointerScale;let g;c.isKeyboard?g=[p[0]*E,p[1]*E]:g=[v[0]*f[0]*E,v[1]*f[1]*E];const R=_.x*g[0],C=_.y*g[1];this._xMotion.setNewEndByDelta(R),this._yMotion.setNewEndByDelta(C),this._changedWhileDragging=!0},this._onInputEnd=c=>{this.trigger(d.INPUT_END,Object.assign(Object.assign({},c),{inputType:"rotate"})),!this._changedWhileDragging&&!c.isKeyboard&&!c.scrolling&&this.trigger(d.STATIC_CLICK,{isTouch:c.isTouch}),this._changedWhileDragging=!1},this._controlEl=t,this._pointerScale=r,this._keyboardScale=o,this._duration=s,this._easing=n,this._disablePitch=a,this._disableYaw=h,this._disableKeyboard=l,this._enableBlocked=e,this._mouseInput=new Ae,this._touchInput=new Ne,this._keyboardInput=new ei,this._xMotion=new Et({duration:s,range:It,easing:n}),this._yMotion=new Et({duration:s,range:be,easing:n}),this._screenScale=[1,1],this._zoomScale=1,this._enabled=!1,this._changedWhileDragging=!1,this._bindInputs()}destroy(){this.disable(),this._mouseInput.off(),this._touchInput.off(),this._keyboardInput.off(),this.off(),this._changedWhileDragging=!1}update(t){if(!this._enabled)return;const e=this._xMotion,s=this._yMotion,n=this._keyboardInput;this._disableKeyboard||n.update(),this._disablePitch||s.update(t),this._disableYaw||e.update(t)}updateRange(t,e){const s=t.getYawRange(e),n=t.getPitchRange(e);this._xMotion.setRange(s.min,s.max),this._yMotion.setRange(n.min,n.max)}setZoomScale(t){this._zoomScale=t}resize(t,e,s,n){const r=yt(t*N,e)*Z;this._screenScale[0]=t/s,this._screenScale[1]=r/n}enable(){if(this._enabled)return;const t=this._controlEl;this._mouseInput.enable(t),this._touchInput.enable(t),this._keyboardInput.enable(t),this._enabled=!0,this._enableBlocked=!1,this.trigger(d.ENABLE,{control:this,updateCursor:!0})}disable(){!this._enabled||(this._mouseInput.disable(),this._touchInput.disable(),this._keyboardInput.disable(),this._enabled=!1,this.trigger(d.DISABLE,{updateCursor:!0}))}sync(t){this.updateRange(t,t.zoom),this._xMotion.reset(t.yaw),this._yMotion.reset(t.pitch)}_bindInputs(){const t=this._mouseInput,e=this._touchInput,s=this._keyboardInput;t.on(d.INPUT_START,this._onInputStart),t.on(d.CHANGE,this._onChange),t.on(d.INPUT_END,this._onInputEnd),e.on(d.INPUT_START,this._onInputStart),e.on(d.CHANGE,this._onChange),e.on(d.INPUT_END,this._onInputEnd),s.on(d.INPUT_START,this._onInputStart),s.on(d.CHANGE,this._onChange),s.on(d.INPUT_END,this._onInputEnd)}}class ii extends P{get scrollable(){return this._scrollable}set scrollable(t){this._scrollable=t}constructor(){super(),this._onWheel=t=>{const e=this._scrollable;if(t.deltaY===0||e)return;t.preventDefault(),t.stopPropagation(),this._inputTimer<0?this.trigger(d.INPUT_START,{srcEvent:t,isTouch:!1,isKeyboard:!1}):this._clearTimer();const s=this._baseScale*t.deltaY;this.trigger(d.CHANGE,{delta:s,isTouch:!1,isKeyboard:!1}),this._inputTimer=window.setTimeout(()=>{this.trigger(d.INPUT_END,{isTouch:!1,isKeyboard:!1,scrolling:!1}),this._inputTimer=-1},gt)},this._el=null,this._baseScale=.04,this._scrollable=!1,this._inputTimer=-1}enable(t){this._el||(t.addEventListener(u.WHEEL,this._onWheel,{passive:!1,capture:!1}),this._el=t,this._clearTimer())}disable(){const t=this._el;!t||(t.removeEventListener(u.WHEEL,this._onWheel,!1),this._el=null,this._clearTimer())}_clearTimer(){window.clearTimeout(this._inputTimer),this._inputTimer=-1}}class ni extends P{constructor(){super(),this._onTouchMove=t=>{const e=t.touches;if(e.length!==2||!t.cancelable)return;t.preventDefault(),t.stopPropagation();const s=this._prevDistance,n=[e[0].pageX-e[1].pageX,e[0].pageY-e[1].pageY],r=Math.sqrt(n[0]*n[0]+n[1]*n[1])*this._baseScale,o=this._isFirstTouch?0:r-s;this._isFirstTouch&&this.trigger(d.INPUT_START,{srcEvent:t,isTouch:!0,isKeyboard:!1}),this._prevDistance=r,this._isFirstTouch=!1,this.trigger(d.CHANGE,{delta:o,isTouch:!0,isKeyboard:!1})},this._onTouchEnd=t=>{t.touches.length===0&&(this._isFirstTouch||this.trigger(d.INPUT_END,{isTouch:!0,isKeyboard:!1,scrolling:!1}),this._prevDistance=-1,this._isFirstTouch=!0)},this._el=null,this._baseScale=-.2,this._prevDistance=-1,this._isFirstTouch=!0}enable(t){this._el||(t.addEventListener(u.TOUCH_MOVE,this._onTouchMove,{passive:!1,capture:!1}),t.addEventListener(u.TOUCH_END,this._onTouchEnd),this._el=t,this._prevDistance=-1,this._isFirstTouch=!0)}disable(){const t=this._el;!t||(t.removeEventListener(u.TOUCH_MOVE,this._onTouchMove,!1),t.removeEventListener(u.TOUCH_END,this._onTouchEnd),this._el=null)}}class ri extends P{get enabled(){return this._enabled}get enableBlocked(){return this._enableBlocked}get animating(){return this._motion.activated}get zoom(){return this._motion.val}get scrollable(){return this._wheelInput.scrollable}set scrollable(t){this._wheelInput.scrollable=t}get range(){return this._motion.range}get scale(){return this._scale}set scale(t){this._scale=t}get duration(){return this._motion.duration}get easing(){return this._motion.easing}constructor(t,e,{scale:s=1,duration:n=gt,easing:r=pt}={}){super(),this._onInputStart=o=>{this.trigger(d.INPUT_START,Object.assign(Object.assign({},o),{inputType:"zoom"}))},this._onChange=({delta:o})=>{const a=this._scale,h=o*a;this._motion.setNewEndByDelta(h)},this._onInputEnd=o=>{this.trigger(d.INPUT_END,Object.assign(Object.assign({},o),{inputType:"zoom"}))},this._scale=s,this._controlEl=t,this._enableBlocked=e,this._wheelInput=new ii,this._pinchInput=new ni,this._motion=new Et({duration:n,easing:r,range:It}),this._enabled=!1,this._bindInputs()}destroy(){this.disable(),this._wheelInput.off(),this._pinchInput.off(),this.off()}update(t){if(!this._enabled)return;this._motion.update(t)}enable(){if(this._enabled)return;const t=this._controlEl;this._wheelInput.enable(t),this._pinchInput.enable(t),this._enabled=!0,this._enableBlocked=!1,this.trigger(d.ENABLE,{control:this,updateCursor:!1})}disable(){!this._enabled||(this._wheelInput.disable(),this._pinchInput.disable(),this._enabled=!1,this.trigger(d.DISABLE,{updateCursor:!1}))}sync(t){const e=this._motion,s=t.getZoomRange();e.setRange(s.min,s.max),e.reset(s.current)}_bindInputs(){const t=this._wheelInput,e=this._pinchInput;t.on(d.INPUT_START,this._onInputStart),t.on(d.CHANGE,this._onChange),t.on(d.INPUT_END,this._onInputEnd),e.on(d.INPUT_START,this._onInputStart),e.on(d.CHANGE,this._onChange),e.on(d.INPUT_END,this._onInputEnd)}}const D={PITCH_DELTA:1,YAW_DELTA_BY_ROLL:2,YAW_DELTA_BY_YAW:3};D[D.PITCH_DELTA]={targetAxis:[0,1,0],meshPoint:[0,0,1]};D[D.YAW_DELTA_BY_ROLL]={targetAxis:[0,1,0],meshPoint:[1,0,0]};D[D.YAW_DELTA_BY_YAW]={targetAxis:[1,0,0],meshPoint:[0,0,1]};class oi extends P{get enabled(){return this._enabled}get orientationUpdated(){return this._orientationUpdated}get ignoreRoll(){return this._ignoreRoll}set ignoreRoll(t){this._ignoreRoll=t}constructor(){super(),this._onDeviceOrientation=t=>{const e=this._orientation,{alpha:s,beta:n,gamma:r}=t;s==null||n==null||r==null||(e.alpha=s,e.beta=n,e.gamma=r,this._orientationUpdated=!0,this._needsCalibrate&&(this._needsCalibrate=!1,this._calibrateSensor()))},this._updateScreenOrientation=()=>{window.screen&&window.screen.orientation&&window.screen.orientation.angle!==void 0?this._screenOrientation=screen.orientation.angle:window.orientation!==void 0?this._screenOrientation=window.orientation>=0?window.orientation:360+window.orientation:this._screenOrientation=0},this.quaternion=G(),this._orientation={alpha:0,beta:90,gamma:0},this._yawOrigin=0,this._yawOffset=0,this._orientationUpdated=!1,this._screenOrientation=0,this._needsCalibrate=!0,this._enabled=!1}enable(){this._enabled||(window.addEventListener(u.DEVICE_ORIENTATION,this._onDeviceOrientation),window.addEventListener(u.ORIENTATION_CHANGE,this._updateScreenOrientation),this._updateScreenOrientation(),this._orientationUpdated=!1,this._needsCalibrate=!0,this._enabled=!0)}disable(){!this._enabled||(window.removeEventListener(u.DEVICE_ORIENTATION,this._onDeviceOrientation),window.removeEventListener(u.ORIENTATION_CHANGE,this._updateScreenOrientation),this._enabled=!1)}update(){this._updateRotation(),this._orientationUpdated=!1}collectDelta(){if(!this._orientationUpdated)return{pitch:0,yaw:0};const t=ut(this.quaternion);return this._updateRotation(),this._orientationUpdated=!1,this._toEulerDelta(t,this.quaternion)}setInitialRotation(t){this._yawOrigin=t}_calibrateSensor(){const t=this._yawOrigin,e=this.quaternion;this._yawOffset=0,this._updateRotation();const{yaw:s}=Le(e);this._yawOffset=s-t,this._updateRotation(),this._needsCalibrate=!1}_updateRotation(){const t=this.quaternion,{alpha:e,beta:s,gamma:n}=this._orientation;ce(t),_e(t,t,(e-this._yawOffset)*N),ue(t,t,s*N),de(t,t,-n*N);const r=G(),o=-this._screenOrientation*.5*N,a=ms(-Math.sqrt(.5),0,0,Math.sqrt(.5));gs(r,0,Math.sin(o),0,Math.cos(o)),Zt(t,t,r),Zt(t,t,a),tt(t,t)}_toEulerDelta(t,e){return{yaw:this._getDeltaYaw(t,e),pitch:this._getDeltaPitch(t,e)}}_getDeltaYaw(t,e){const s=this._getRotationDelta(t,e,D.YAW_DELTA_BY_YAW);return this._getRotationDelta(t,e,D.YAW_DELTA_BY_ROLL)*Math.sin(this._extractPitchFromQuat(e))+s}_getDeltaPitch(t,e){return this._getRotationDelta(t,e,D.PITCH_DELTA)}_getRotationDelta(t,e,s){const n=I(D[s].targetAxis[0],D[s].targetAxis[1],D[s].targetAxis[2]),r=D[s].meshPoint,o=ut(t),a=ut(e);tt(o,o),tt(a,a);let h=I(0,0,1),l=I(0,0,1);F(h,h,o),F(l,l,a),F(n,n,a);const _=le(n,Q(B(),h,l))>0?1:-1,E=I(r[0],r[1],r[2]);let f;s!==D.YAW_DELTA_BY_YAW?f=I(0,_,0):f=I(_,0,0),F(E,E,a),F(f,f,a);const p=E,v=f,g=B();Q(g,p,v),he(g,g);const R=g[0],C=g[1],y=g[2];l=I(r[0],r[1],r[2]),F(l,l,a),h=I(r[0],r[1],r[2]),F(h,h,o);let T=Math.abs(h[0]*R+h[1]*C+h[2]*y);const m=B();ns(m,h,rs(B(),g,T));let b=(m[0]*l[0]+m[1]*l[1]+m[2]*l[2])/(Ft(m)*Ft(l));b>1&&(b=1);const Lt=Math.acos(b),rt=Q(B(),l,m);T=R*rt[0]+C*rt[1]+y*rt[2];let ot;return s!==D.YAW_DELTA_BY_YAW?ot=T>0?1:-1:ot=T<0?1:-1,Lt*ot*_*Z}_extractPitchFromQuat(t){const e=I(0,0,1);return F(e,e,t),-1*Math.atan2(e[1],Math.sqrt(Math.pow(e[0],2)+Math.pow(e[2],2)))}}class mt extends P{get enabled(){return this._input.enabled}get enableBlocked(){return this._enableBlocked}get animating(){return this._input.enabled&&this._input.orientationUpdated}get ignoreRoll(){return this._ignoreRoll}set ignoreRoll(t){this._ignoreRoll=t}static isAvailable(){return M(this,void 0,void 0,function*(){if(!DeviceMotionEvent)return!1;let t;const e=()=>new Promise(n=>{t=r=>{n(r.rotationRate&&r.rotationRate.alpha!=null)},window.addEventListener(u.DEVICE_MOTION,t)}),s=()=>new Promise(n=>{setTimeout(()=>n(!1),1e3)});return Promise.race([e(),s()]).then(n=>(window.removeEventListener(u.DEVICE_MOTION,t),n))})}static requestSensorPermission(){return M(this,void 0,void 0,function*(){return Ie()?DeviceMotionEvent.requestPermission().then(t=>t==="granted").catch(()=>!1):!0})}constructor(t,{ignoreRoll:e=!0}={}){super(),this._enableBlocked=t,this._ignoreRoll=e,this._input=new oi}destroy(){this.disable(),this._input.off(),this.off()}update(t,e,s,n){this._ignoreRoll?this._updateYawPitch(t,e,s,n):this._updateQuaternion(t,n)}enable(){this._input.enabled||(this._input.enable(),this._enableBlocked=!1,this.trigger(d.ENABLE,{control:this,updateCursor:!1}))}disable(){!this._input.enabled||(this._input.disable(),this.trigger(d.DISABLE,{updateCursor:!1}))}sync(){}_updateYawPitch(t,e,s,n){const r=this._input;if(!r.enabled)return;const{yaw:o,pitch:a}=r.collectDelta();e.add(o),s.add(a),t.lookAt({yaw:e.val,pitch:s.val,zoom:n})}_updateQuaternion(t,e){const s=this._input;!s.enabled||(s.update(),t.rotate(s.quaternion,e))}}class ai{get useGrabCursor(){return this._useGrabCursor}set useGrabCursor(t){t!==this._useGrabCursor&&(this._useGrabCursor=t,t&&this._enabled?this._setCursor(W.GRAB):t||this._setCursor(W.NONE))}get disableContextMenu(){return this._disableContextMenu}set disableContextMenu(t){t!==this._disableContextMenu&&(this._disableContextMenu=t,t&&this._enabled?this._blockContextMenu():t||this._restoreContextMenu())}get scrollable(){return this._rotateControl.scrollable}set scrollable(t){this._rotateControl.scrollable=t}get wheelScrollable(){return this._zoomControl.scrollable}set wheelScrollable(t){this._zoomControl.scrollable=t}get ignoreZoomScale(){return this._ignoreZoomScale}set ignoreZoomScale(t){this._ignoreZoomScale=t}get enabled(){return this._enabled}get rotate(){return this._rotateControl}get zoom(){return this._zoomControl}get gyro(){return this._gyroControl}get animating(){return this._rotateControl.animating||this._zoomControl.animating||this._gyroControl.animating}constructor(t,e,{useGrabCursor:s,scrollable:n,wheelScrollable:r,disableContextMenu:o,rotate:a,zoom:h,gyro:l}){this._preventContextMenu=c=>{c.preventDefault()},this._onInputStart=c=>{this._useGrabCursor&&!c.isKeyboard&&this._setCursor(W.GRABBING)},this._onInputEnd=c=>{this._useGrabCursor&&!c.isKeyboard&&this._setCursor(W.GRAB)},this._onEnable=({control:c,updateCursor:_})=>{_&&this._useGrabCursor&&this._setCursor(W.GRAB),c.sync(this._camera)},this._onDisable=({updateCursor:c})=>{c&&this._setCursor(W.NONE)},this._onCameraAnimationEnd=({animation:c})=>{c.getFinishPromise().then(()=>{this.sync()})},this._useGrabCursor=s,this._disableContextMenu=o,this._camera=e,this._controlEl=t,this._ignoreZoomScale=!1,this._enabled=!1,this._rotateControl=new si(t,!a,x(a)),this._zoomControl=new ri(t,!h,x(h)),this._gyroControl=new mt(!l,x(l)),this._rotateControl.scrollable=n,this._zoomControl.scrollable=r,this._bindEvents()}destroy(){this.disable(),this._rotateControl.destroy(),this._zoomControl.destroy(),this._setCursor(W.NONE)}resize(t,e){const s=this._camera;this._rotateControl.resize(s.fov,s.aspect,t,e)}enable(){return M(this,void 0,void 0,function*(){this._enabled||(this._rotateControl.enableBlocked||this._rotateControl.enable(),this._zoomControl.enableBlocked||this._zoomControl.enable(),this._gyroControl.enableBlocked||(yield mt.isAvailable())&&this._gyroControl.enable(),this.sync(),this._disableContextMenu&&this._blockContextMenu(),this._enabled=!0)})}disable(){!this._enabled||(this._rotateControl.disable(),this._zoomControl.disable(),this._gyroControl.disable(),this._restoreContextMenu(),this._enabled=!1)}update(t){const e=this._camera,s=this._rotateControl,n=this._zoomControl,r=this._gyroControl;n.update(t);const o=Js(e.fov,n.zoom),a=this._ignoreZoomScale?1:Math.max(o,1);s.setZoomScale(a),s.updateRange(e,o),s.update(t);const h=s.yaw,l=s.pitch;r.enabled?r.update(e,h,l,o):e.lookAt({yaw:h.val,pitch:l.val,zoom:o})}sync(){const t=this._camera;this._zoomControl.sync(t),this._rotateControl.sync(t)}_blockContextMenu(){this._controlEl.addEventListener(u.CONTEXT_MENU,this._preventContextMenu)}_restoreContextMenu(){this._controlEl.removeEventListener(u.CONTEXT_MENU,this._preventContextMenu)}_setCursor(t){if(!this._useGrabCursor&&t!==W.NONE)return;const e=this._controlEl;e.style.cursor=t}_bindEvents(){const t=this._rotateControl,e=this._zoomControl;t.on(d.INPUT_START,this._onInputStart),t.on(d.INPUT_END,this._onInputEnd),t.on(d.ENABLE,this._onEnable),t.on(d.DISABLE,this._onDisable),e.on(d.ENABLE,this._onEnable),e.on(d.DISABLE,this._onDisable),this._camera.on(Re.ANIMATION_END,this._onCameraAnimationEnd)}}class Se{constructor({width:t,height:e,flipY:s}){this.width=t,this.height=e,this.flipY=s,this.wrapS=WebGLRenderingContext.CLAMP_TO_EDGE,this.wrapT=WebGLRenderingContext.CLAMP_TO_EDGE}destroy(){}isVideo(){return!1}isCube(){return!1}}class we extends Se{constructor({source:t,width:e,height:s,flipY:n}){super({width:e,height:s,flipY:n}),this.source=t}}class hi extends we{destroy(){const t=this.source;t.pause(),t.removeAttribute("src"),t.load()}isVideo(){return!0}isPaused(){const t=this.source;return t.paused||t.ended||t.readyState<=2}hasAudio(){const t=this.source;return t.audioTracks?t.audioTracks.length>0:t.webkitAudioDecodedByteCount!=null?t.webkitAudioDecodedByteCount>0:t.mozHasAudio!=null?t.mozHasAudio:!0}}class li extends Se{constructor({sources:t,width:e,height:s,flipY:n}){super({width:e,height:s,flipY:n}),this.sources=t}isCube(){return!0}}class ci{constructor(){this._loadChecker=new Bs}load(t,e){return M(this,void 0,void 0,function*(){if(e)return this.loadVideo(t,x(e));if(Array.isArray(t)&&t.length>1)return this.loadCubeImage(t);{const s=Array.isArray(t)?t[0]:t;return this.loadImage(s)}})}loadImage(t){return M(this,void 0,void 0,function*(){const e=this._toImageArray(t);return this._load(e,s=>{const n=e[0];s(new we({source:n,width:n.naturalWidth,height:n.naturalHeight,flipY:!0}))})})}loadCubeImage(t){return M(this,void 0,void 0,function*(){const e=this._toImageArray(t);return this._load(e,s=>{s(new li({sources:e,width:e[0].naturalWidth,height:e[0].naturalHeight,flipY:!1}))})})}loadVideo(t,e){return M(this,void 0,void 0,function*(){const s=Object.assign({autoplay:!0,muted:!0,loop:!1,volume:1},e),n=this._toVideoElement(t,s);return this._load([n],r=>{const{autoplay:o,muted:a}=s;n.currentTime=0,o&&a&&n.play().catch(()=>{}),r(new hi({source:n,width:n.videoWidth,height:n.videoHeight,flipY:!0}))})})}_load(t,e){const s=this._loadChecker;return new Promise((n,r)=>{s.once("ready",o=>{o.errorCount>0||e(n)}),s.once("error",r),s.check(t)})}_toImageArray(t){return(Array.isArray(t)?t:[t]).map(s=>{if(kt(s)){const n=new Image;return n.crossOrigin="anonymous",n.src=s,n}else return s})}_toVideoElement(t,{muted:e,loop:s,volume:n}){if(t instanceof HTMLVideoElement)return t;const r=document.createElement("video");return r.crossOrigin="anonymous",r.playsInline=!0,r.setAttribute("webkit-playsinline",""),r.muted=e,r.volume=n,r.loop=s,Array.isArray(t)?t.forEach(a=>this._appendSourceElement(r,a)):this._appendSourceElement(r,t),r.querySelectorAll("source").length>0&&r.readyState<1&&r.load(),r}_appendSourceElement(t,e){if(e instanceof HTMLSourceElement)return e;const s=document.createElement("source");s.src=e,t.appendChild(s)}}class ui{constructor(t,e=window){this.maxDeltaTime=t,this._context=e,this._rafId=-1,this._rafTimer=-1,this._lastUpdateTime=-1}start(t){const e=this._context;if(!e||!t||this._rafId>=0||this._rafTimer>=0)return;const s=(n,r)=>{const o=Date.now(),a=Math.min(o-this._lastUpdateTime,this.maxDeltaTime*1e3);t(a,r),this._lastUpdateTime=o,this._rafId=e.requestAnimationFrame(s)};this._lastUpdateTime=Date.now(),this._rafId=e.requestAnimationFrame(s)}stop(){this._rafId>=0&&this._context.cancelAnimationFrame(this._rafId),this._rafTimer>=0&&clearTimeout(this._rafTimer),this._rafId=-1,this._rafTimer=-1}changeContext(t){this.stop(),this._context=t}}class _i{get useResizeObserver(){return this._useResizeObserver}get enabled(){return this._enabled}constructor(t,e){this._skipFirstResize=(()=>{let s=!0;return()=>{if(s){s=!1;return}this._onResize()}})(),this._useResizeObserver=t,this._enabled=!1,this._resizeObserver=null,this._onResize=e}enable(t){if(this._enabled&&this.disable(),this._useResizeObserver&&!!window.ResizeObserver){const e=t.getBoundingClientRect(),s=e.width!==0||e.height!==0,n=new ResizeObserver(s?this._skipFirstResize:this._onResize);n.observe(t),this._resizeObserver=n}else window.addEventListener(u.RESIZE,this._onResize);return this._enabled=!0,this}disable(){if(!this._enabled)return this;const t=this._resizeObserver;return t?(t.disconnect(),this._resizeObserver=null):window.removeEventListener(u.RESIZE,this._onResize),this._enabled=!1,this}}class di{get enabled(){return this._enabled}get enableBlocked(){return this._enableBlocked}get playing(){return this._enabled&&!this._interrupted}get delay(){return this._delay}set delay(t){this._delay=t}get delayOnMouseLeave(){return this._delayOnMouseLeave}set delayOnMouseLeave(t){this._delayOnMouseLeave=t}get speed(){return this._speed}set speed(t){this._speed=t}get pauseOnHover(){return this._pauseOnHover}set pauseOnHover(t){this._pauseOnHover=t}get canInterrupt(){return this._canInterrupt}set canInterrupt(t){this._canInterrupt=t}get disableOnInterrupt(){return this._disableOnInterrupt}set disableOnInterrupt(t){this._disableOnInterrupt=t}constructor(t,e,s){this._onInputStart=()=>{!this._canInterrupt||(this._interrupted=!0,this._clearTimeout())},this._onInputEnd=()=>{this._setUninterruptedAfterDelay(this._delay)},this._onGyroEnable=()=>{this.disable()},this._onMouseEnter=()=>{!this._pauseOnHover||(this._interrupted=!0,this._hovering=!0)},this._onMouseLeave=()=>{!this._pauseOnHover||(this._hovering=!1,this._setUninterruptedAfterDelay(this._delayOnMouseLeave))},this._camera=t.camera,this._control=t.control,this._element=e,this._enabled=!1,this._interrupted=!1,this._interruptionTimer=-1,this._hovering=!1;const{delay:n=2e3,delayOnMouseLeave:r=0,speed:o=1,pauseOnHover:a=!1,canInterrupt:h=!0,disableOnInterrupt:l=!1}=x(s);this._enableBlocked=!s,this._delay=n,this._delayOnMouseLeave=r,this._speed=o,this._pauseOnHover=a,this._canInterrupt=h,this._disableOnInterrupt=l}destroy(){this.disable()}update(t){if(!this._enabled)return;if(this._interrupted){this._disableOnInterrupt&&this.disable();return}const e=this._camera,s=-this._speed*t/100;e.yaw=it(e.yaw+s,0,360)}enable(){const t=this._control,e=this._element;this._enabled||t.gyro.enabled||(t.rotate.on(d.INPUT_START,this._onInputStart),t.rotate.on(d.INPUT_END,this._onInputEnd),t.zoom.on(d.INPUT_START,this._onInputStart),t.zoom.on(d.INPUT_END,this._onInputEnd),t.gyro.on(d.ENABLE,this._onGyroEnable),e.addEventListener(u.MOUSE_ENTER,this._onMouseEnter,!1),e.addEventListener(u.MOUSE_LEAVE,this._onMouseLeave,!1),this._enabled=!0,this._enableBlocked=!1)}enableAfterDelay(){this.enable(),this._interrupted=!0,this._setUninterruptedAfterDelay(this._delay)}disable(){if(!this._enabled)return;const t=this._control,e=this._element;t.rotate.off(d.INPUT_START,this._onInputStart),t.rotate.off(d.INPUT_END,this._onInputEnd),t.zoom.off(d.INPUT_START,this._onInputStart),t.zoom.off(d.INPUT_END,this._onInputEnd),t.gyro.off(d.ENABLE,this._onGyroEnable),e.removeEventListener(u.MOUSE_ENTER,this._onMouseEnter,!1),e.removeEventListener(u.MOUSE_LEAVE,this._onMouseLeave,!1),this._enabled=!1,this._interrupted=!1,this._hovering=!1,this._clearTimeout()}_setUninterruptedAfterDelay(t){this._hovering||(this._clearTimeout(),t>0?this._interruptionTimer=window.setTimeout(()=>{this._interrupted=!1,this._interruptionTimer=-1},t):(this._interrupted=!1,this._interruptionTimer=-1))}_clearTimeout(){this._interruptionTimer>=0&&(window.clearTimeout(this._interruptionTimer),this._interruptionTimer=-1)}}class fi extends P{constructor(t,e={}){super(),this.destroy=()=>{this.exit(),this.off()},this._onSessionEnd=()=>{this.exit(),this.trigger(O.VR_END)},this._xrSession=null,this._xrRefSpace=null,this._ctx=t,this._options=e}isAvailable(){return M(this,void 0,void 0,function*(){const t=window.navigator.xr;return t?t.isSessionSupported(se).then(e=>e).catch(()=>!1):!1})}enter(){return M(this,void 0,void 0,function*(){const t=this._ctx,e=window.navigator.xr;if(!e)return;yield mt.requestSensorPermission();const s=Object.assign({requiredFeatures:[ie]},this._options);yield t.makeXRCompatible();const n=yield e.requestSession(se,s);t.bindXRLayer(n);const r=yield n.requestReferenceSpace(ie);this._setSession(n,r),this.trigger(O.VR_START,{session:n})})}exit(){const t=this._xrSession;t&&t.end().catch(()=>{}),this._xrSession=null,this._xrRefSpace=null}canRender(t){const e=this._xrRefSpace;return e?!!t.getViewerPose(e):!1}getEyeParams(t){const e=t.session,s=t.getViewerPose(this._xrRefSpace);if(!s)return null;const n=e.renderState.baseLayer;return n?s.views.map(r=>{const o=n.getViewport(r),a=r.transform.inverse.matrix;return{viewport:o,vMatrix:a,pMatrix:r.projectionMatrix}}):null}_setSession(t,e){this._xrSession=t,this._xrRefSpace=e,t.addEventListener(u.XR_END,this._onSessionEnd)}}class Dt{constructor(t,e){this.element=t,this.position=e}}class Ei{constructor(t,e,{zoom:s=!1}){this._containerEl=Ce(`.${X.HOTSPOT_CONTAINER}`,t),this._renderer=e,this._hotspots=[],this._zoom=s}refresh(){const t=this._containerEl;if(!t)return;const e=[].slice.apply(t.querySelectorAll(`.${X.HOTSPOT}`));this._hotspots=e.map(s=>this._parseHotspot(s))}render(t){const e=this._hotspots,s=this._renderer.width*.5,n=this._renderer.height*.5,r=t.zoom,o="translate(-50%, -50%)",a=this._zoom?`scale(${r})`:"";e.forEach(h=>{const l=h.position,c=B();if(is(c,l),$t(c,c,t.viewMatrix),$t(c,c,t.projectionMatrix),c[2]>1||c[2]<0){h.element.classList.remove(X.HOTSPOT_VISIBLE);return}const _=Ts(c[0]*s+s,-c[1]*n+n);h.element.classList.add(X.HOTSPOT_VISIBLE),h.element.style.transform=[o,`translate(${_[0]}px, ${_[1]}px)`,a].join(" ")})}_parseHotspot(t){const e=t.dataset.yaw,s=t.dataset.pitch,n=t.dataset.position;if(e||s){const r=e?parseFloat(e):0,o=s?parseFloat(s):0,a=this._yawPitchToVec3(r,o);return new Dt(t,a)}else if(n){const r=n.split(" ").map(o=>parseFloat(o));if(r.length<3)throw new H(U.MESSAGES.INSUFFICIENT_ARGS(n,'hotspot attribute "data-position"'),U.CODES.INSUFFICIENT_ARGS);return new Dt(t,I(r[0],r[1],r[2]))}else{const r=I(0,0,-1);return new Dt(t,r)}}_yawPitchToVec3(t,e){const s=t*N,n=e*N,r=B();return r[1]=Math.sin(n),r[2]=Math.cos(n),r[0]=r[2]*Math.sin(-s),r[2]=-r[2]*Math.cos(-s),r}}class mi{get count(){return this.geometry.indicies.count}constructor(t,e,s){this.obj=t,this.geometry=e,this.buffers=s}}class pi{get canvas(){return this._canvas}get maxTextureSize(){return this._maxTextureSize}get isWebGL2(){return this._isWebGL2}get supportVAO(){return this._isWebGL2||!!this._extensions.vao}get lost(){return this._contextLost}get debug(){return this._debug}constructor(t,e){this._onContextLost=()=>{this._canvas.classList.add(X.CTX_LOST),this._contextLost=!0},this._onContextRestore=()=>{this._canvas.classList.remove(X.CTX_LOST),this._contextLost=!1},this._canvas=t,this._contextLost=!1,this._debug=e,this._extensions={vao:null,loseContext:null}}init(){const t=this._canvas,{gl:e,isWebGL2:s}=this._getContext(t);this._gl=e,this._maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),this._isWebGL2=s,this._isWebGL2||(this._extensions.vao=e.getExtension("OES_vertex_array_object")),this._extensions.loseContext=e.getExtension("WEBGL_lose_context"),t.addEventListener(u.CONTEXT_LOST,this._onContextLost),t.addEventListener(u.CONTEXT_RESTORED,this._onContextRestore)}destroy(){const t=this._gl,e=this._canvas;t&&(t.bindBuffer(t.ARRAY_BUFFER,null),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)),e.removeEventListener(u.CONTEXT_LOST,this._onContextLost),e.removeEventListener(u.CONTEXT_RESTORED,this._onContextRestore)}forceLoseContext(){const t=this._extensions.loseContext;!t||t.loseContext()}forceRestoreContext(){const t=this._extensions.loseContext;!t||t.restoreContext()}clear(){const t=this._gl;t.clear(t.COLOR_BUFFER_BIT)}resize(){const t=this._gl;t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight)}viewport(t,e,s,n){this._gl.viewport(t,e,s,n)}createVAO(t,e){const s=this._createNativeVAO(),n=new mi(s,t,{indicies:this._createBuffer(),position:this._createBuffer(),uv:this._createBuffer()});return s&&(this._bindNativeVAO(s),this._supplyGeometryData(n,e),this._bindNativeVAO(null),this._unbindBuffers()),n}draw(t,e){const s=this._gl;t.obj?this._bindNativeVAO(t.obj):this._supplyGeometryData(t,e),s.drawElements(s.TRIANGLES,t.count,s.UNSIGNED_SHORT,0),t.obj?this._bindNativeVAO(null):this._unbindBuffers()}releaseVAO(t){t.obj&&this._deleteNativeVAO(t.obj),this._deleteBuffer(t.buffers.indicies),this._deleteBuffer(t.buffers.position),this._deleteBuffer(t.buffers.uv)}getUniformLocations(t,e){const s=this._gl,n=Object.keys(e).reduce((r,o)=>(r[o]=s.getUniformLocation(t,o),r),{});return Object.assign(Object.assign({},this._getCommonUniformLocations(t)),n)}updateCommonUniforms(t,e,s){const n=this._gl,r=s.uniformLocations,o=t.matrix,a=ft();ae(a,e.viewMatrix,o),n.uniformMatrix4fv(r.uMVMatrix,!1,a),n.uniformMatrix4fv(r.uPMatrix,!1,e.projectionMatrix)}updateVRUniforms(t,e,s,n){const r=this._gl,o=t.uniformLocations;r.uniformMatrix4fv(o.uMVMatrix,!1,e),r.uniformMatrix4fv(o.uPMatrix,!1,s),o.uEye&&r.uniform1f(o.uEye,n)}updateUniforms(t){const e=this._gl,s=t.uniforms,n=t.uniformLocations;for(const r in s){const o=s[r],a=n[r];!o||o.needsUpdate&&o.update(e,a,this._isWebGL2)}}releaseShaderResources(t){const e=this._gl,s=t.uniforms;for(const n in s){const r=s[n];!r||r.needsUpdate&&r.destroy(e)}e.deleteProgram(t.program)}useProgram(t){this._gl.useProgram(t.program)}createProgram(t,e){const s=this._gl,n=s.createProgram(),r=this._compileShader(s.VERTEX_SHADER,t),o=this._compileShader(s.FRAGMENT_SHADER,e);if(s.attachShader(n,r),s.attachShader(n,o),s.bindAttribLocation(n,0,"position"),s.bindAttribLocation(n,1,"uv"),s.linkProgram(n),this._debug&&!s.getProgramParameter(n,s.LINK_STATUS)){let a=null;throw s.getShaderParameter(r,s.COMPILE_STATUS)?s.getShaderParameter(o,s.COMPILE_STATUS)||(a=s.getShaderInfoLog(o)):a=s.getShaderInfoLog(r),new H(U.MESSAGES.FAILED_LINKING_PROGRAM(s.getProgramInfoLog(n),a),U.CODES.FAILED_LINKING_PROGRAM)}return s.deleteShader(r),s.deleteShader(o),n}createWebGLTexture(t){const e=this._gl,s=e.createTexture();if(e.bindTexture(e.TEXTURE_2D,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,t.wrapS),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,t.wrapT),!t.isVideo()&&this._isWebGL2){const n=e;n.texStorage2D(n.TEXTURE_2D,1,n.RGBA8,t.width,t.height)}return s}createWebGLCubeTexture(t,e){const s=this._gl,n=s.createTexture();if(s.bindTexture(s.TEXTURE_CUBE_MAP,n),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_MAG_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_WRAP_S,t.wrapS),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_WRAP_T,t.wrapT),this._isWebGL2){const r=s;r.texStorage2D(r.TEXTURE_CUBE_MAP,1,r.RGBA8,e,e)}return n}makeXRCompatible(){return M(this,void 0,void 0,function*(){const t=this._gl,e=t.getContextAttributes();e&&e.xrCompatible!==!0&&(yield t.makeXRCompatible())})}bindXRLayer(t){const e=this._gl,s=new XRWebGLLayer(t,e);t.updateRenderState({baseLayer:s})}bindXRFrame(t){const e=this._gl,n=t.session.renderState.baseLayer;e.bindFramebuffer(e.FRAMEBUFFER,n.framebuffer)}useDefaultFrameBuffer(){const t=this._gl;t.bindFramebuffer(t.FRAMEBUFFER,null)}_createBuffer(){return this._gl.createBuffer()}_deleteBuffer(t){return this._gl.deleteBuffer(t)}_createNativeVAO(){const t=this._gl;if(this._isWebGL2)return t.createVertexArray();{const e=this._extensions.vao;return(e==null?void 0:e.createVertexArrayOES())||null}}_bindNativeVAO(t){const e=this._gl;if(this._isWebGL2)e.bindVertexArray(t);else{const s=this._extensions.vao;s==null||s.bindVertexArrayOES(t)}}_deleteNativeVAO(t){const e=this._gl;if(this._isWebGL2)e.deleteVertexArray(t);else{const s=this._extensions.vao;s==null||s.deleteVertexArrayOES(t)}}_supplyGeometryData(t,e){const s=t.geometry;this._supplyIndiciesData(s.indicies,t.buffers.indicies),this._supplyAttributeData(s.vertices,e.program,"position",t.buffers.position),this._supplyAttributeData(s.uvs,e.program,"uv",t.buffers.uv)}_unbindBuffers(){const t=this._gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null),t.bindBuffer(t.ARRAY_BUFFER,null)}_supplyIndiciesData(t,e){const s=this._gl;s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e),s.bufferData(s.ELEMENT_ARRAY_BUFFER,t.data,s.STATIC_DRAW)}_supplyAttributeData(t,e,s,n){const r=this._gl,o=r.getAttribLocation(e,s);o<0||(r.bindBuffer(r.ARRAY_BUFFER,n),r.bufferData(r.ARRAY_BUFFER,t.data,r.STATIC_DRAW),r.vertexAttribPointer(o,t.itemSize,r.FLOAT,!1,0,0),r.enableVertexAttribArray(o))}_compileShader(t,e){const s=this._gl,n=s.createShader(t);return s.shaderSource(n,e),s.compileShader(n),n}_getCommonUniformLocations(t){const e=this._gl;return{uMVMatrix:e.getUniformLocation(t,"uMVMatrix"),uPMatrix:e.getUniformLocation(t,"uPMatrix")}}_getContext(t){const e=["webgl2","webgl","experimental-webgl","webkit-3d","moz-webgl"];let s=null,n=!1;const r={preserveDrawingBuffer:!1,antialias:!1},o=a=>a.statusMessage;t.addEventListener(u.CONTEXT_CREATE_ERROR,o);for(const a of e){try{s=t.getContext(a,r),n=a==="webgl2"}catch{}if(s)break}if(t.removeEventListener(u.CONTEXT_CREATE_ERROR,o),!s)throw new H(U.MESSAGES.WEBGL_NOT_SUPPORTED,U.CODES.WEBGL_NOT_SUPPORTED);return{gl:s,isWebGL2:n}}}class gi{get canvas(){return this._canvas}get width(){return this._elementSize.x}get height(){return this._elementSize.y}get pixelRatio(){return this._pixelRatio}get aspect(){return this._elementSize.x/this._elementSize.y}constructor(t,e){this._canvas=t,this._elementSize={x:0,y:0},this._pixelRatio=1,this.ctx=new pi(t,e)}destroy(){const t=this._canvas;this.ctx.destroy(),t.width=1,t.height=1}resize(){const t=this._canvas,e=this._elementSize,s=window.devicePixelRatio;e.x=t.clientWidth,e.y=t.clientHeight,t.width=e.x*s,t.height=e.y*s,this._pixelRatio=s,this.ctx.resize()}render(t,e){const s=this.ctx;s.lost||(s.clear(),s.useProgram(t.program),s.updateCommonUniforms(t,e,t.program),t.update({camera:e}),s.updateUniforms(t.program),s.draw(t.vao,t.program))}renderVR(t,e,s){const n=this.ctx,r=e.getEyeParams(s);!r||!t||(n.bindXRFrame(s),n.useProgram(t.program),n.updateUniforms(t.program),r.forEach((o,a)=>{const h=o.viewport,l=ae(ft(),o.vMatrix,t.matrix);n.viewport(h.x,h.y,h.width,h.height),n.updateVRUniforms(t.program,l,o.pMatrix,a),n.draw(t.vao,t.program)}))}}class Pe extends P{get rootEl(){return this._rootEl}get renderer(){return this._renderer}get camera(){return this._camera}get control(){return this._control}get vr(){return this._vr}get hotspot(){return this._hotspot}get plugins(){return this._plugins}get projection(){return this._projection}set projection(t){this._initialized&&t?this.load(t):this._projection=t}get mesh(){return this._mesh}get initialized(){return this._initialized}get autoplay(){return this._autoplay}get autoInit(){return this._autoInit}get autoResize(){return this._autoResize}get canvasSelector(){return this._canvasSelector}get useResizeObserver(){return this._useResizeObserver}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._renderer.canvas;this._tabIndex=t,t!=null?e.tabIndex=t:e.removeAttribute("tabindex")}get maxDeltaTime(){return this._animator.maxDeltaTime}set maxDeltaTime(t){this._animator.maxDeltaTime=t}get debug(){return this._debug}set debug(t){this._debug=t}get initialYaw(){return this._camera.initialYaw}set initialYaw(t){this._camera.initialYaw=t}get initialPitch(){return this._camera.initialPitch}set initialPitch(t){this._camera.initialPitch=t}get initialZoom(){return this._camera.initialZoom}set initialZoom(t){this._camera.initialZoom=t}get yawRange(){return this._camera.yawRange}set yawRange(t){this._camera.yawRange=t,this._projection&&this._projection.updateCamera(this._camera)}get pitchRange(){return this._camera.pitchRange}set pitchRange(t){this._camera.pitchRange=t,this._projection&&this._projection.updateCamera(this._camera)}get zoomRange(){return this._camera.zoomRange}set zoomRange(t){this._camera.zoomRange=t,this._projection&&this._projection.updateCamera(this._camera)}get fov(){return this._camera.fov}set fov(t){const e=this._camera,s=this._control;e.fov=t,e.updateMatrix(),s.sync()}get rotate(){return this._control.rotate}get zoom(){return this._control.zoom}get gyro(){return this._control.gyro}get useGrabCursor(){return this._control.useGrabCursor}set useGrabCursor(t){this._control.useGrabCursor=t}get disableContextMenu(){return this._control.disableContextMenu}set disableContextMenu(t){this._control.disableContextMenu=t}get scrollable(){return this._control.scrollable}set scrollable(t){this._control.scrollable=t}get wheelScrollable(){return this._control.wheelScrollable}set wheelScrollable(t){this._control.wheelScrollable=t}constructor(t,{projection:e=null,initialYaw:s=0,initialPitch:n=0,initialZoom:r=1,yawRange:o=null,pitchRange:a=null,zoomRange:h=null,fov:l=90,useGrabCursor:c=!0,disableContextMenu:_=!1,rotate:E=!0,zoom:f=!0,gyro:p=!1,scrollable:v=!0,wheelScrollable:g=!1,autoplay:R=!1,hotspot:C={},autoInit:y=!0,autoResize:T=!0,canvasSelector:m="canvas",useResizeObserver:b=!0,on:Lt={},plugins:rt=[],maxDeltaTime:ot=1/30,tabIndex:Xt=0,debug:Kt=!1}={}){super(),this.renderFrame=J=>{const A=this._camera,at=this._renderer,j=this._control,q=this._hotspot,ht=this._autoplay,jt=this._mesh;!jt||(this._emit(O.BEFORE_RENDER),ht.playing&&(ht.update(J),j.sync()),A.animation?A.animation.update(J):j.update(J),at.render(jt,A),q.render(A),A.changed&&this._emit(O.VIEW_CHANGE,{yaw:A.yaw,pitch:A.pitch,zoom:A.zoom,quaternion:[A.quaternion[0],A.quaternion[1],A.quaternion[2],A.quaternion[3]]}),A.onFrameRender(),this._emit(O.RENDER))},this._renderFrameOnDemand=J=>{const A=this._camera,at=this._control,j=this._autoplay,q=this._mesh,ht=q==null?void 0:q.getTexture();!this._initialized||!ht||!A.animation&&!at.animating&&!j.playing&&!ht.isVideo()||this.renderFrame(J)},this._renderVRFrame=(J,A)=>{const at=this._vr,j=this._mesh,q=this._renderer;!j||(this._emit(O.BEFORE_RENDER),q.renderVR(j,at,A),this._emit(O.RENDER))},this._rootEl=qs(t),this._plugins=rt,this._initialized=!1,this._autoInit=y,this._autoResize=T,this._canvasSelector=m,this._useResizeObserver=b,this._tabIndex=Xt,this._debug=Kt;const At=$s(this._rootEl,m);this._renderer=new gi(At,Kt),this._camera=new ti({initialYaw:s,initialPitch:n,initialZoom:r,fov:l,yawRange:o,pitchRange:a,zoomRange:h}),this._control=new ai(At,this._camera,{useGrabCursor:c,scrollable:v,wheelScrollable:g,disableContextMenu:_,rotate:E,zoom:f,gyro:p}),this._animator=new ui(ot),this._autoplay=new di(this,At,R),this._projection=e,this._mesh=null,this._autoResizer=new _i(b,()=>this.resize()),this._vr=new fi(this._renderer.ctx),this._hotspot=new Ei(this._rootEl,this._renderer,C),this._addEventHandlers(Lt),e&&y&&this.init()}destroy(){this._camera.destroy(),this._animator.stop(),this._renderer.destroy(),this._control.destroy(),this._autoResizer.disable(),this._mesh&&(this._mesh.destroy(this._renderer.ctx),this._mesh=null),this._plugins.forEach(t=>t.destroy(this)),this._initialized=!1}init(){return M(this,void 0,void 0,function*(){if(!this._projection)throw new H(U.MESSAGES.PROVIDE_PROJECTION_FIRST,U.CODES.PROVIDE_PROJECTION_FIRST);const t=this._renderer,e=this._camera,s=this._control,n=this._animator,r=this._hotspot,o=this._projection,a=t.canvas;this._bindComponentEvents(),t.ctx.init(),this._resizeComponents(),e.updateMatrix(),this._autoResize&&this._autoResizer.enable(a),this._autoplay.enableBlocked||this._autoplay.enable(),this._plugins.forEach(l=>{l.init(this)});const h=yield this._loadTexture(o);this._applyProjection(o,h),r.refresh(),n.start(this._renderFrameOnDemand),yield s.enable(),this._tabIndex!=null&&!a.hasAttribute("tabIndex")&&(a.tabIndex=this._tabIndex),this._initialized=!0,this.renderFrame(0),this._emit(O.READY)})}load(t){return M(this,void 0,void 0,function*(){if(!t)return!1;if(this._initialized){const e=yield this._loadTexture(t);this._applyProjection(t,e),this.renderFrame(0)}else this._projection=t,this.init();return!0})}resize(){if(!this._initialized)return;this._resizeComponents(),this.renderFrame(0);const{width:t,height:e}=this._renderer;this._emit(O.RESIZE,{width:t,height:e})}addPlugins(...t){this._initialized&&t.forEach(e=>{e.init(this)}),this._plugins.push(...t)}removePlugins(...t){t.forEach(e=>{const s=this._plugins.indexOf(e);s<0||(e.destroy(this),this._plugins.splice(s,1))})}_emit(t,...e){const s=e?e[0]:{};this.trigger(t,Object.assign({type:t,target:this},s))}_applyProjection(t,e){const s=this._camera,n=this._control,r=this._renderer,o=this._mesh;o&&o.destroy(r.ctx);const a=t.createMesh(r.ctx,e);t.updateCamera(s),t.updateControl(n),this._mesh=a,this._emit(O.PROJECTION_CHANGE,{projection:t})}_loadTexture(t){return M(this,void 0,void 0,function*(){const e=new ci,{src:s,video:n}=t;this._emit(O.LOAD_START,{src:s,video:n});const r=yield e.load(s,n);return this._emit(O.LOAD,{src:s,video:n}),r})}_resizeComponents(){const t=this._renderer,e=this._camera,s=this._control;t.resize(),e.resize(t.width,t.height),s.resize(t.width,t.height)}_addEventHandlers(t){Object.keys(t).forEach(e=>{this.on(e,t[e])})}_bindComponentEvents(){const t=this._rootEl,e=this._control,s=this._animator,n=this._renderer,r=this._vr;[d.STATIC_CLICK,d.INPUT_START,d.INPUT_END].forEach(a=>{e.rotate.on(a,h=>{this._emit(a,h)}),e.zoom.on(a,h=>{this._emit(a,h)})}),r.on(O.VR_START,a=>{t.classList.add(X.IN_VR),s.changeContext(a.session),s.start(this._renderVRFrame),this._emit(O.VR_START)}),r.on(O.VR_END,()=>{t.classList.remove(X.IN_VR),n.ctx.useDefaultFrameBuffer(),s.changeContext(window),s.start(this._renderFrameOnDemand),this.resize(),this._emit(O.VR_END)})}}Pe.VERSION="4.0.0-beta.7";class vi extends P{constructor(){super(),this.matrix=ft(),this.rotation=G(),this.position=I(0,0,0),this.scale=I(1,1,1)}updateMatrix(){Qe(this.matrix,this.rotation,this.position,this.scale)}update(t){this.trigger(Xs.UPDATE,t)}}class K{constructor(t){this.position=t.position,this.order=t.order}}const xe={CONTROLS_ROOT:"view360-controls",CONTROLS_BG:"view360-controls-background",CONTROLS_MAIN:"view360-controls-main",CONTROLS_TOP:"view360-controls-top",CONTROLS_BOTTOM:"view360-controls-bottom",CONTROLS_MID:"view360-controls-mid",CONTROLS_LEFT:"view360-controls-left",CONTROLS_RIGHT:"view360-controls-right",CONTROLS_FLOAT_LEFT:"view360-controls-float-left",CONTROLS_FLOAT_RIGHT:"view360-controls-float-right",CONTROLS_BUTTON:"view360-controls-button",PROGRESS_ROOT:"view360-controls-progress",VOLUME_ROOT:"view360-controls-volume",RANGE_ROOT:"view360-range",RANGE_TRACK:"view360-range-track",RANGE_THUMB:"view360-range-thumb",RANGE_FILLER:"view360-range-filler",PLAY_BUTTON:"view360-controls-play",PAUSE_BUTTON:"view360-controls-pause",UNMUTED_BUTTON:"view360-controls-unmuted",MUTED_BUTTON:"view360-controls-muted",FULLSCREEN_BUTTON:"view360-controls-fullscreen",FULLSCREEN_EXIT_BUTTON:"view360-controls-fullscreen-exit",VR_BUTTON:"view360-controls-vr",GYRO_ENABLED:"view360-controls-gyro-enabled",GYRO_DISABLED:"view360-controls-gyro-disabled",VIDEO_TIME_DISPLAY:"view360-controls-time",PIEVIEW_ROOT:"view360-controls-pie",FIXED:"view360-controls-fixed",UNAVAILABLE:"view360-controls-unavailable",HIDDEN:"view360-controls-hidden"},k={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",MAIN_TOP:"main-top",MAIN_BOTTOM:"main-bottom",MAIN_LEFT:"main-left",MAIN_RIGHT:"main-right"};class De extends P{constructor(){super(),this._onHold=({srcEvent:r,isTouch:o})=>{var a;const h=this._bbox;if(!h)return;const l=o?r.touches[0].pageX:r.pageX,c=h.x+((a=window.scrollX)!==null&&a!==void 0?a:window.pageXOffset),_=S(l,c,c+h.width),E=(_-c)/h.width;this._motion.reset(_),this.thumbEl.classList.add(this._fixedClass),this.trigger(d.INPUT_START,E)},this._onChange=({delta:r})=>{var o;const a=this._motion,h=this._bbox;if(!h)return;a.setNewEndByDelta(r.x),a.update(1);const l=h.x+((o=window.scrollX)!==null&&o!==void 0?o:window.pageXOffset),_=(S(a.val,l,l+h.width)-l)/h.width;this.trigger(d.CHANGE,_)},this._onRelease=()=>{!this._bbox||(this.thumbEl.classList.remove(this._fixedClass),this.trigger(d.INPUT_END))};const t=document.createElement(z),e=document.createElement(z),s=document.createElement(z),n=document.createElement(z);t.draggable=!1,e.appendChild(n),e.appendChild(s),t.appendChild(e),this.rootEl=t,this.trackEl=e,this.thumbEl=s,this.fillerEl=n,this._mouseInput=new Ae,this._touchInput=new Ne,this._motion=new Et({duration:1,range:It,easing:r=>r}),this._bbox={x:0,y:0,width:0,height:0,left:0,right:0,bottom:0,top:0},this._fixedClass=xe.FIXED}init(t){const e=this._mouseInput,s=this._touchInput;this.rootEl.classList.add(t.RANGE_ROOT),this.trackEl.classList.add(t.RANGE_TRACK),this.thumbEl.classList.add(t.RANGE_THUMB),this.fillerEl.classList.add(t.RANGE_FILLER),this._fixedClass=t.FIXED,e.on(d.INPUT_START,this._onHold),s.on(d.INPUT_START,this._onHold),e.on(d.INPUT_END,this._onRelease),s.on(d.INPUT_END,this._onRelease),e.on(d.CHANGE,this._onChange),s.on(d.CHANGE,this._onChange),e.enable(this.rootEl),s.enable(this.rootEl),this.resize()}destroy(){const t=this._mouseInput,e=this._touchInput;this.rootEl.className="",this.trackEl.className="",this.thumbEl.className="",this.fillerEl.className="",t.off(),e.off(),t.disable(),e.disable()}resize(){this._bbox=this.trackEl.getBoundingClientRect()}updateStyle(t){const e=this._bbox.width,s=S(t,0,1);this.fillerEl.style.width=`${s*100}%`,this.thumbEl.style.transform=`translateX(${s*e}px)`}}class Ti extends K{get element(){return this._rangeControl.rootEl}constructor({position:t=k.MAIN_TOP,order:e=9999}={}){super({position:t,order:e}),this._onResize=()=>{this._rangeControl.resize()},this._onTimeUpdate=()=>{const s=this._video;!s||(this._currentTime=s.source.currentTime,this._rangeControl.updateStyle(this._currentTime/this._duration))},this._onDurationChange=()=>{const s=this._video;!s||(this._duration=s.source.duration,this._rangeControl.updateStyle(this._currentTime/this._duration))},this._onHold=s=>{const n=this._video,r=this._controlBar;if(!n||!r)return;const o=n.isPaused();n.source.pause();const a=n.source.duration*s;n.source.currentTime=a,n.source.dispatchEvent(new CustomEvent($,{detail:{time:a}})),r.rootEl.classList.add(r.className.FIXED),this._wasPaused=!this._playPromise&&o},this._onControl=s=>{const n=this._video;if(!n)return;const r=n.source.duration*s;n.source.currentTime=r,n.source.dispatchEvent(new CustomEvent($,{detail:{time:r}}))},this._onRelease=()=>{const s=this._video,n=this._controlBar;s&&n&&!this._wasPaused&&!this._playPromise&&(this._playPromise=s.source.play().catch(()=>{}),this._playPromise.then(()=>{this._playPromise=null}),n.rootEl.classList.remove(n.className.FIXED)),this._wasPaused=!1},this.position=t,this.order=e,this._controlBar=null,this._rangeControl=new De,this._video=null,this._wasPaused=!1,this._currentTime=0,this._duration=0,this._playPromise=null}init(t,e){var s;const n=(s=t.mesh)===null||s===void 0?void 0:s.getTexture(),r=this.element,o=this._rangeControl,a=e.className.UNAVAILABLE;if(!n||!n.isVideo()){r.classList.add(a);return}r.classList.remove(a),r.classList.add(e.className.PROGRESS_ROOT),t.on(O.RESIZE,this._onResize),n.source.addEventListener(u.VIDEO_TIME_UPDATE,this._onTimeUpdate),n.source.addEventListener(u.VIDEO_DURATION_CHANGE,this._onDurationChange),n.source.addEventListener($,this._onTimeUpdate),o.init(e.className),o.on(d.INPUT_START,this._onHold),o.on(d.CHANGE,this._onControl),o.on(d.INPUT_END,this._onRelease),this._video=n,this._currentTime=n.source.currentTime,this._duration=n.source.duration,this._controlBar=e,o.updateStyle(this._currentTime/this._duration)}destroy(t){const e=this._video;t.off(O.RESIZE,this._onResize),e&&(e.source.removeEventListener(u.VIDEO_TIME_UPDATE,this._onTimeUpdate),e.source.removeEventListener(u.VIDEO_DURATION_CHANGE,this._onDurationChange),e.source.removeEventListener($,this._onTimeUpdate)),this._rangeControl.destroy(),this._video=null,this._playPromise=null}}class yi extends K{constructor({position:t=k.MAIN_LEFT,order:e=9999}={}){super({position:t,order:e}),this._onClick=()=>{const s=this._video;!s||(this._paused?s.source.play():s.source.pause())},this._onPlay=()=>{if(!this._controlBar)return;const s=this.element,n=this._controlBar.className;s.classList.add(n.PAUSE_BUTTON),s.classList.remove(n.PLAY_BUTTON),s.title="Pause Video",this._paused=!1},this._onPause=()=>{if(!this._controlBar)return;const s=this.element,n=this._controlBar.className;s.classList.add(n.PLAY_BUTTON),s.classList.remove(n.PAUSE_BUTTON),s.title="Play Video",this._paused=!0},this.element=document.createElement(Ot),this._video=null,this._paused=!0,this._controlBar=null}init(t,e){var s;const n=this.element,r=(s=t.mesh)===null||s===void 0?void 0:s.getTexture(),o=e.className,a=o.UNAVAILABLE;if(!r||!r.isVideo()){n.classList.add(a);return}n.classList.add(o.CONTROLS_BUTTON),n.classList.remove(a);const h=r.isPaused();this._video=r,this._paused=h,this._controlBar=e,h?this._onPause():this._onPlay(),n.addEventListener(u.CLICK,this._onClick),r.source.addEventListener(u.VIDEO_PLAY,this._onPlay),r.source.addEventListener(u.VIDEO_PAUSE,this._onPause)}destroy(){const t=this._video,e=this.element;!t||(e.className="",e.removeEventListener(u.CLICK,this._onClick),t.source.removeEventListener(u.VIDEO_PLAY,this._onPlay),t.source.removeEventListener(u.VIDEO_PAUSE,this._onPause),this._video=null,this._paused=!0,this._controlBar=null)}}class Ri extends K{get element(){return this._rootEl}constructor({position:t=k.MAIN_RIGHT,order:e=9999}={}){super({position:t,order:e}),this._onResize=()=>{this._rangeControl.resize(),this._updateDisplay()},this._onClick=()=>{const s=this._video;!s||this._rootEl.disabled||(s.source.muted=!s.source.muted)},this._onVolumeChange=()=>{const s=this._buttonEl,n=this._video,r=this._controlBar;if(!n||!r)return;const o=r.className;n.source.muted||n.source.volume===0?(s.classList.add(o.MUTED_BUTTON),s.classList.remove(o.UNMUTED_BUTTON)):(s.classList.add(o.UNMUTED_BUTTON),s.classList.remove(o.MUTED_BUTTON)),this._updateDisplay()},this._onHold=s=>{const n=this._video,r=this._controlBar;if(!n||!r)return;const o=r.className;n.source.volume=s,this._rootEl.classList.add(o.FIXED),r.containerEl.classList.add(o.FIXED),this._updateDisplay()},this._onChange=s=>{const n=this._video;!n||(n.source.volume=s,s>0?n.source.muted=!1:n.source.muted=!0,this._updateDisplay())},this._onRelease=()=>{const s=this._controlBar;if(!s)return;const n=s.className;this._rootEl.classList.remove(n.FIXED),s.containerEl.classList.remove(n.FIXED)},this._updateDisplay=()=>{const s=this._video,n=this._rootEl;if(!s)return;if(!s.hasAudio()){n.disabled=!0;return}n.disabled=!1;const r=s.source.muted?0:s.source.volume;this._rangeControl.updateStyle(r)},this._controlBar=null,this._rangeControl=new De,this._createElements(),this._video=null}init(t,e){var s;const n=(s=t.mesh)===null||s===void 0?void 0:s.getTexture(),r=this._rootEl,o=this._buttonEl,a=this._rangeControl,h=e.className,l=h.UNAVAILABLE;if(!n||!n.isVideo()){r.classList.add(l);return}r.classList.remove(l),r.classList.add(h.CONTROLS_BUTTON),r.classList.add(h.VOLUME_ROOT),o.classList.add(h.CONTROLS_BUTTON),n.source.muted?o.classList.add(h.MUTED_BUTTON):o.classList.add(h.UNMUTED_BUTTON),t.on(O.RESIZE,this._onResize),r.addEventListener(u.TRANSITION_END,this._onResize),o.addEventListener(u.CLICK,this._onClick),n.source.addEventListener(u.VIDEO_VOLUME_CHANGE,this._onVolumeChange),n.source.addEventListener(u.VIDEO_LOADED_DATA,this._updateDisplay),n.source.addEventListener(u.VIDEO_CAN_PLAYTHROUGH,this._updateDisplay),a.init(h),a.on(d.INPUT_START,this._onHold),a.on(d.CHANGE,this._onChange),a.on(d.INPUT_END,this._onRelease),this._controlBar=e,this._video=n,this._updateDisplay()}destroy(t){const e=this._video,s=this._buttonEl,n=this._rootEl;n.className="",s.className="",t.off(O.RESIZE,this._onResize),n.removeEventListener(u.TRANSITION_END,this._onResize),s.removeEventListener(u.CLICK,this._onClick),e&&(e.source.removeEventListener(u.VIDEO_VOLUME_CHANGE,this._onVolumeChange),e.source.removeEventListener(u.VIDEO_LOADED_DATA,this._updateDisplay),e.source.removeEventListener(u.VIDEO_CAN_PLAYTHROUGH,this._updateDisplay)),this._controlBar=null,this._rangeControl.destroy(),this._video=null}_createElements(){const t=document.createElement(Ot),e=document.createElement(z);t.appendChild(this._rangeControl.rootEl),t.appendChild(e),t.title="Toggle Mute",this._rootEl=t,this._buttonEl=e}}class bi extends K{constructor({position:t=k.MAIN_RIGHT,order:e=9999}={}){super({position:t,order:e}),this._onClick=()=>{const s=this._targetEl;!s||(dt()?this._exitFullscreen():this._requestFullscreen(s))},this._onFullscreenChange=()=>{const s=this.element,n=this._controlBar;if(!n)return;const r=n.className;dt()?(s.classList.add(r.FULLSCREEN_EXIT_BUTTON),s.classList.remove(r.FULLSCREEN_BUTTON)):(s.classList.add(r.FULLSCREEN_BUTTON),s.classList.remove(r.FULLSCREEN_EXIT_BUTTON))},this.element=document.createElement(Ot),this.element.title="Toggle Fullscreen",this._controlBar=null,this._targetEl=null}init(t,e){const s=this.element,n=e.className;if(!this._fullscreenAvailable()){s.classList.add(n.UNAVAILABLE);return}s.classList.add(n.CONTROLS_BUTTON),s.classList.remove(n.UNAVAILABLE),s.addEventListener(u.CLICK,this._onClick),this._addFullscreenHandlers(),dt()?s.classList.add(n.FULLSCREEN_EXIT_BUTTON):s.classList.add(n.FULLSCREEN_BUTTON),this._controlBar=e,this._targetEl=t.rootEl}destroy(){const t=this.element;t.className="",t.removeEventListener(u.CLICK,this._onClick),this._removeFullscreenHandlers(),this._controlBar=null,this._targetEl=null}_fullscreenAvailable(){return te.some(t=>!!document[t])}_requestFullscreen(t){for(const e of te){const s=t[e];if(s){s.call(t);return}}}_exitFullscreen(){for(const t of Ws){const e=document[t];if(e){e.call(document);return}}}_addFullscreenHandlers(){Ct.forEach(t=>{document.addEventListener(t,this._onFullscreenChange)})}_removeFullscreenHandlers(){Ct.forEach(t=>{document.removeEventListener(t,this._onFullscreenChange)})}}class Ci extends K{constructor({position:t=k.MAIN_LEFT,order:e=9999}={}){super({position:t,order:e}),this._onTimeUpdate=()=>{const s=this._video;!s||(this._currentTime=s.source.currentTime,this._updateDisplay())},this._onDurationChange=()=>{const s=this._video;!s||(this._duration=s.source.duration,this._updateDisplay())},this._onCustomTimeChange=s=>{this._currentTime=s.detail.time,this._updateDisplay()},this.element=document.createElement(z),this._video=null,this._currentTime=0,this._duration=0}init(t,e){var s;const n=(s=t.mesh)===null||s===void 0?void 0:s.getTexture(),r=this.element,o=e.className;if(!n||!n.isVideo()){r.classList.add(o.UNAVAILABLE);return}r.classList.add(o.VIDEO_TIME_DISPLAY),r.classList.remove(o.UNAVAILABLE),n.source.addEventListener(u.VIDEO_TIME_UPDATE,this._onTimeUpdate),n.source.addEventListener(u.VIDEO_DURATION_CHANGE,this._onDurationChange),n.source.addEventListener($,this._onCustomTimeChange),this._video=n,this._currentTime=n.source.currentTime,this._duration=n.source.duration,this._updateDisplay()}destroy(){const t=this._video;!t||(this.element.className="",t.source.removeEventListener(u.VIDEO_TIME_UPDATE,this._onTimeUpdate),t.source.removeEventListener(u.VIDEO_DURATION_CHANGE,this._onDurationChange),t.source.removeEventListener($,this._onCustomTimeChange),this._video=null)}_updateDisplay(){const t=this._currentTime,e=Math.floor(t/60),s=Math.floor(t-e*60),n=s<10?`0${s}`:s,r=this._duration,o=Math.floor(r/60),a=Math.floor(r-o*60),h=a<10?`0${a}`:a;this.element.innerText=`${e}:${n} / ${o}:${h}`}}class Oi extends K{constructor({resetCamera:t=!0,position:e=k.TOP_RIGHT,order:s=9999}={}){super({position:e,order:s}),this._onClick=()=>{const n=this._viewer,r=this.resetCamera;if(!n||!r)return;const{yaw:o=n.initialYaw,pitch:a=n.initialPitch,zoom:h=n.initialZoom,duration:l=500}=x(r);n.camera.animateTo({yaw:o,pitch:a,zoom:h,duration:l})},this._updatePie=({target:n})=>{const r=this._piePathEl,o=this._rangeCircleEl,a=n.camera,h=a.getHorizontalFov(),l=a.getYawRange(a.zoom),c=h*.5,_=24*Math.PI,E=_*h/360,f=_*(a.yaw+c+90)/360;if(r.setAttribute("stroke-dasharray",`${E} ${_-E}`),r.setAttribute("stroke-dashoffset",`${f}`),isFinite(l.min)&&isFinite(l.max)){const p=45*Math.PI,v=(it(l.min,-180,180)-c)/360,g=(it(l.max,-180,180)+c)/360,R=p*Math.abs(g-v),C=-p*(v-.25);o.setAttribute("stroke-dasharray",`${R} ${p-R}`),o.setAttribute("stroke-dashoffset",`${C}`)}else o.setAttribute("stroke-dasharray",""),o.setAttribute("stroke-dashoffset","")},this.element=document.createElement(z),this.element.title="Reset view",this.resetCamera=t,this._createPieElements(),this._viewer=null}init(t,e){const s=this.element;t.initialized?this._updatePie({target:t}):t.once(O.READY,this._updatePie);const n=e.className.PIEVIEW_ROOT;s.classList.add(n),this.resetCamera&&s.addEventListener(u.CLICK,this._onClick),t.on(O.VIEW_CHANGE,this._updatePie),this._viewer=t}destroy(t){const e=this.element;e.removeEventListener(u.CLICK,this._onClick),e.className="",t.off(O.READY,this._updatePie),t.off(O.VIEW_CHANGE,this._updatePie),this._viewer=null}_createPieElements(){const t=this.element,e=document.createElementNS(xt,"svg");e.setAttribute("viewBox","0 0 48 48"),e.setAttribute("width","100%"),e.setAttribute("height","100%");const s=document.createElementNS(xt,"circle");s.setAttribute("stroke","currentColor"),s.setAttribute("fill","transparent"),s.setAttribute("cx","24"),s.setAttribute("cy","24"),s.setAttribute("r","12"),s.setAttribute("stroke-width","24"),e.appendChild(s);const n=document.createElementNS(xt,"circle");n.setAttribute("stroke","currentColor"),n.setAttribute("fill","transparent"),n.setAttribute("cx","24"),n.setAttribute("cy","24"),n.setAttribute("r","22.5"),n.setAttribute("stroke-width","3"),e.appendChild(n),t.appendChild(e),this._piePathEl=s,this._rangeCircleEl=n}}class Ii extends K{constructor({position:t=k.MAIN_RIGHT,order:e=9999}={}){super({position:t,order:e}),this._onClick=()=>{const s=this._viewer;!s||s.vr.enter()},this.element=document.createElement(Ot),this.element.title="Enter VR",this._viewer=null}init(t,e){const s=this.element,n=e.className;s.classList.add(n.UNAVAILABLE),s.classList.add(n.VR_BUTTON),s.classList.add(n.CONTROLS_BUTTON),t.vr.isAvailable().then(r=>{r&&s.classList.remove(n.UNAVAILABLE)}),s.addEventListener(u.CLICK,this._onClick),this._viewer=t}destroy(){const t=this.element;t.className="",t.removeEventListener(u.CLICK,this._onClick),this._viewer=null}}class Li extends K{constructor({position:t=k.MAIN_RIGHT,order:e=9999}={}){super({position:t,order:e}),this._onClick=()=>{const s=this._viewer,n=this._controlBar;if(!s||!n)return;const r=s.control.gyro;r.enabled?r.disable():mt.requestSensorPermission().then(o=>{o?r.enable():this.element.classList.add(n.className.UNAVAILABLE)})},this._updateStyle=()=>{const s=this.element,n=this._viewer,r=this._controlBar;if(!n||!r)return;const o=n.control.gyro,a=r.className;o.enabled?(s.classList.add(a.GYRO_ENABLED),s.classList.remove(a.GYRO_DISABLED)):(s.classList.add(a.GYRO_DISABLED),s.classList.remove(a.GYRO_ENABLED))},this.element=document.createElement(z),this.element.title="Toggle gyroscope control"}init(t,e){const s=this.element,n=e.className;s.addEventListener(u.CLICK,this._onClick),s.classList.add(n.CONTROLS_BUTTON),s.classList.add(n.UNAVAILABLE);const r=()=>{s.classList.remove(n.UNAVAILABLE),t.control.gyro.on(d.ENABLE,this._updateStyle),t.control.gyro.on(d.DISABLE,this._updateStyle)};Ie()?r():mt.isAvailable().then(o=>{!o||r()}),this._controlBar=e,this._viewer=t,this._updateStyle()}destroy(t){const e=this.element;t.control.gyro.off(d.ENABLE,this._updateStyle),t.control.gyro.off(d.DISABLE,this._updateStyle),e.removeEventListener(u.CLICK,this._onClick),e.className="",this._controlBar=null,this._viewer=null}}class Ai{get enabled(){return!!this._targetEl}get hidden(){return this._controlBar.containerEl.classList.contains(this._hiddenClass)}get _hiddenClass(){return this._controlBar.className.HIDDEN}get _fixedClass(){return this._controlBar.className.FIXED}constructor(t,{initialDelay:e=3e3,delay:s=0,idleDelay:n=3e3}){this._onMouseEnter=()=>{this._isCursorInside=!0,this.show()},this._onMouseLeave=()=>{this._isCursorInside=!1,this._hideAfterDelay()},this._onMouseMove=()=>{!this._isFullscreen||this.showTemporaliy()},this._onHold=r=>{this._isGrabbing=!0,r.pointerType==="mouse"&&(this._isCursorInside=!0),window.addEventListener(u.MOUSE_UP,this._onRelease),this.show()},this._onRelease=()=>{this._isGrabbing=!1,window.removeEventListener(u.MOUSE_UP,this._onRelease),this._hideAfterDelay()},this._onVideoPlay=()=>{!this._targetEl||this._controlBar.containerEl.classList.remove(this._fixedClass)},this._onVideoPause=()=>{!this._targetEl||this._controlBar.containerEl.classList.add(this._fixedClass)},this._onFullscreenChange=()=>{this._isFullscreen=dt(),this._isFullscreen&&this._hideAfterDelay()},this._controlBar=t,this._initialDelay=e,this._delay=s,this._idleDelay=n,this._timer=-1,this._isCursorInside=!1,this._isGrabbing=!1,this._isFullscreen=!1,this._video=null,this._targetEl=null}enable(t){var e;this._targetEl&&this.disable(t);const s=this._initialDelay,n=t.rootEl;this._targetEl=t.rootEl,this._timer=window.setTimeout(()=>{this.hide()},s),n.addEventListener(u.MOUSE_DOWN,this._onHold),n.addEventListener(u.MOUSE_ENTER,this._onMouseEnter),n.addEventListener(u.MOUSE_MOVE,this._onMouseMove),n.addEventListener(u.MOUSE_LEAVE,this._onMouseLeave),this._addFullscreenHandlers();const r=(e=t.mesh)===null||e===void 0?void 0:e.getTexture();!r||!r.isVideo()||(r.isPaused()&&this._controlBar.containerEl.classList.add(this._fixedClass),r.source.addEventListener(u.VIDEO_PLAY,this._onVideoPlay),r.source.addEventListener(u.VIDEO_PAUSE,this._onVideoPause),this._video=r)}disable(t){if(!this._targetEl)return;const e=this._controlBar,s=t.rootEl,n=this._video;s.removeEventListener(u.MOUSE_DOWN,this._onHold),window.removeEventListener(u.MOUSE_UP,this._onRelease),s.removeEventListener(u.MOUSE_ENTER,this._onMouseEnter),s.removeEventListener(u.MOUSE_MOVE,this._onMouseMove),s.removeEventListener(u.MOUSE_LEAVE,this._onMouseLeave),this._removeFullscreenHandlers(),window.clearTimeout(this._timer),e.containerEl.classList.remove(this._fixedClass),n&&(n.source.removeEventListener(u.VIDEO_PLAY,this._onVideoPlay),n.source.removeEventListener(u.VIDEO_PAUSE,this._onVideoPause)),this._isCursorInside=!1,this._isGrabbing=!1,this._video=null,this._targetEl=null}show(){this._clearHideTimer(),this._controlBar.containerEl.classList.remove(this._hiddenClass)}showTemporaliy(){this.show(),this._hideAfterDelay(this._idleDelay)}hide(){this._clearHideTimer(),this._controlBar.containerEl.classList.add(this._hiddenClass)}_clearHideTimer(){this._timer&&(window.clearTimeout(this._timer),this._timer=-1)}_hideAfterDelay(t=this._delay){this._isGrabbing||!this._isFullscreen&&this._isCursorInside||(this._clearHideTimer(),t<=0?this.hide():this._timer=window.setTimeout(()=>{this.hide()},t))}_addFullscreenHandlers(){Ct.forEach(t=>{document.addEventListener(t,this._onFullscreenChange)})}_removeFullscreenHandlers(){Ct.forEach(t=>{document.removeEventListener(t,this._onFullscreenChange)})}}class Ni{constructor(){this._onKeyDown=t=>{const e=this._video;if(!e)return;t.preventDefault(),t.stopPropagation();const s=e.source,n=t.keyCode!=null?bt[t.keyCode]:ye[t.key];switch(n){case"LEFT":case"RIGHT":return this._changeVideoTime(s,n==="RIGHT");case"UP":case"DOWN":return this._changeVideoVolume(s,n==="UP")}(t.keyCode===Gs||t.key===Hs)&&this._toggleVideo(e)}}enable(t,e){this._video=e,t.addEventListener(u.KEY_DOWN,this._onKeyDown,!0)}disable(t){this._video=null,t.removeEventListener(u.KEY_DOWN,this._onKeyDown,!0)}_changeVideoTime(t,e){const s=e?5:-5;t.currentTime+=s,t.dispatchEvent(new CustomEvent($,{detail:{time:t.currentTime}}))}_changeVideoVolume(t,e){const s=e?.1:-.1;t.muted?t.volume=S(s,0,1):t.volume=S(t.volume+s,0,1),t.volume>0?t.muted=!1:t.muted=!0}_toggleVideo(t){t.isPaused()?t.source.play():t.source.pause()}}class L{get rootEl(){return this._rootEl}get containerEl(){return this._containerEl}get backgroundEl(){return this._bgEl}get items(){return this._items}get customItems(){return this._customItems}constructor({autoHide:t,showBackground:e,clickToPlay:s=!0,keyboardControls:n=!0,progressBar:r=!0,playButton:o=!0,volumeButton:a=!0,fullscreenButton:h=!0,videoTime:l=!0,pieView:c=!0,vrButton:_=!0,gyroButton:E=!0,className:f={},customItems:p=[]}={}){var v;this._onStaticClick=({target:R,isTouch:C})=>{var y;const T=this._autoHider;if(C){if(!T.enabled)return;T.hidden?T.showTemporaliy():T.hide()}else{if(!this.clickToPlay)return;const m=(y=R.mesh)===null||y===void 0?void 0:y.getTexture();if(!m||!m.isVideo())return;m.isPaused()?m.source.play():m.source.pause()}},this._onNewSrcLoad=({target:R})=>{const C=this._items;this._updateBackground(R),this._updateAutoHide(R),this._updateKeyboardHandler(R),Object.keys(C).forEach(y=>{C[y].forEach(m=>{m.destroy(R,this),m.init(R,this)})})},this.autoHide=t,this.showBackground=e,this.clickToPlay=s,this.keyboardControls=n,this.progressBar=r,this.playButton=o,this.volumeButton=a,this.fullscreenButton=h,this.videoTime=l,this.pieView=c,this.vrButton=_,this.gyroButton=E,this.className=Object.assign(Object.assign({},L.DEFAULT_CLASS),f);const g=(v=f.CONTROLS_ROOT)!==null&&v!==void 0?v:L.DEFAULT_CLASS.CONTROLS_ROOT;this._rootEl=V(g),this._createPositionWrappers(),this._items=Object.keys(L.POSITION).reduce((R,C)=>(R[L.POSITION[C]]=[],R),{}),this._customItems=p,this._autoHider=new Ai(this,x(t)),this._videoControl=new Ni,p.forEach(R=>{this._items[R.position].push(R)})}init(t){const e=t.rootEl,s=this._rootEl,n=this._createDefaultItems();this._updateBackground(t),this._updateAutoHide(t),this._updateKeyboardHandler(t),e.appendChild(s),this._addItem(t,n),this._addItem(t,this._customItems),t.on(O.PROJECTION_CHANGE,this._onNewSrcLoad),t.on(O.STATIC_CLICK,this._onStaticClick)}destroy(t){const e=t.rootEl,s=this._rootEl,n=this._items;s.parentElement===e&&e.removeChild(s),Object.keys(n).forEach(r=>{n[r].forEach(a=>{a.destroy(t,this)}),n[r]=[]}),this._clearItemElements(),this._autoHider.disable(t),this._videoControl.disable(e),t.off(O.PROJECTION_CHANGE,this._onNewSrcLoad),t.off(O.STATIC_CLICK,this._onStaticClick)}_addItem(t,e){for(const s of e){const n=this._items[s.position],r=this._wrapperEl[s.position],o=Zs(n,a=>a.order>s.order);if(o>=0){const a=n[o].element;n.splice(o,0,s),r.insertBefore(s.element,a)}else n.push(s),r.appendChild(s.element);s.init(t,this)}}_createPositionWrappers(){const t=Object.assign(Object.assign({},L.DEFAULT_CLASS),this.className),e=this._rootEl,s=V(t.CONTROLS_BG),n=V(t.CONTROLS_FLOAT_LEFT),r=V(t.CONTROLS_FLOAT_RIGHT);e.appendChild(n),e.appendChild(r);const o=V(t.CONTROLS_MAIN),a=V(t.CONTROLS_TOP),h=V(t.CONTROLS_BOTTOM),l=V(t.CONTROLS_MID),c=V(t.CONTROLS_LEFT),_=V(t.CONTROLS_RIGHT);l.appendChild(c),l.appendChild(_),o.appendChild(s),o.appendChild(a),o.appendChild(l),o.appendChild(h),e.appendChild(o),this._bgEl=s,this._containerEl=o,this._wrapperEl={[L.POSITION.MAIN_TOP]:a,[L.POSITION.MAIN_LEFT]:c,[L.POSITION.MAIN_RIGHT]:_,[L.POSITION.MAIN_BOTTOM]:h,[L.POSITION.TOP_LEFT]:n,[L.POSITION.TOP_RIGHT]:r}}_clearItemElements(){Object.keys(L.POSITION).map(e=>L.POSITION[e]).map(e=>this._wrapperEl[e]).forEach(e=>{for(;e.firstChild;)e.removeChild(e.firstChild)})}_updateAutoHide(t){var e;const s=this.autoHide,n=this._autoHider;if(s!=null)s?n.enable(t):n.disable(t);else{const r=(e=t.mesh)===null||e===void 0?void 0:e.getTexture();r&&r.isVideo()?n.enable(t):n.disable(t)}}_updateBackground(t){var e,s;const n=this._bgEl,r=this.showBackground,o=(e=this.className.HIDDEN)!==null&&e!==void 0?e:L.DEFAULT_CLASS.HIDDEN;if(r!=null)r?n.classList.remove(o):n.classList.add(o);else{const a=(s=t.mesh)===null||s===void 0?void 0:s.getTexture();a&&a.isVideo()?n.classList.remove(o):n.classList.add(o)}}_updateKeyboardHandler(t){var e;const s=t.rootEl,n=this._videoControl,r=(e=t.mesh)===null||e===void 0?void 0:e.getTexture();this.keyboardControls&&r&&r.isVideo()?n.enable(s,r):n.disable(s)}_createDefaultItems(){const t=[];return this.progressBar&&t.push(new Ti(x(this.progressBar))),this.playButton&&t.push(new yi(x(this.playButton))),this.volumeButton&&t.push(new Ri(x(this.volumeButton))),this.gyroButton&&t.push(new Li(x(this.gyroButton))),this.vrButton&&t.push(new Ii(x(this.vrButton))),this.fullscreenButton&&t.push(new bi(x(this.fullscreenButton))),this.videoTime&&t.push(new Ci(x(this.videoTime))),this.pieView&&t.push(new Oi(x(this.pieView))),t}}L.DEFAULT_CLASS=xe;L.POSITION=k;class Me{constructor({src:t,video:e=!1}){this.src=t,this.video=e}updateCamera(t){t.resetRange()}updateControl(t){t.ignoreZoomScale=!1}}class Wt{constructor(){this.needsUpdate=!0}destroy(t){}}class Ue extends vi{constructor(t,e){super(),this.vao=t,this.program=e}destroy(t){t.releaseVAO(this.vao),t.releaseShaderResources(this.program)}getTexture(){return this.program.uniforms.uTexture.texture}}class Fe{constructor(t,e,s,n){this.program=t.createProgram(e,s),this.uniforms=n,this.uniformLocations=t.getUniformLocations(this.program,n)}}class Mt{constructor(t,e){this.data=t,this.itemSize=e,this.count=t.length/e}}class Si{constructor(t,e,s){this.vertices=new Mt(new Float32Array(t),3),this.indicies=new Mt(new Uint16Array(e),1),this.uvs=new Mt(new Float32Array(s),2)}}class Be extends Wt{constructor(t,e){super(),this.texture=e,this._webglTexture=t.createWebGLTexture(e)}destroy(t){this.texture.destroy(),t.deleteTexture(this._webglTexture)}update(t,e,s){const n=this.texture,r=n.isVideo();t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,n.flipY),t.uniform1i(e,0),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,this._webglTexture),!r&&s?t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,n.source):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n.source),r||(this.needsUpdate=!1)}}var wi=`#define GLSLIFY 1
16
+ attribute vec3 position;attribute vec2 uv;uniform mat4 uMVMatrix;uniform mat4 uPMatrix;varying highp vec2 vUV;void main(){vUV=uv;gl_Position=uPMatrix*uMVMatrix*vec4(position,1.0);}`,Ve=`#define GLSLIFY 1
17
+ uniform sampler2D uTexture;varying highp vec2 vUV;void main(){gl_FragColor=texture2D(uTexture,vUV.st);}`;class ze extends Si{constructor(){const s=-.5*Math.PI,n=[],r=[],o=[];let a,h;for(a=0;a<=60;a++){const l=(a/60-.5)*Math.PI,c=Math.sin(l),_=Math.cos(l);for(h=0;h<=60;h++){const E=(h/60-.5)*2*Math.PI+s,f=Math.sin(E),v=Math.cos(E)*_,g=c,R=f*_,C=h/60,y=a/60;if(n.push(C,y),r.push(v,g,R),h!==60&&a!==60){const T=a*61+h,m=T+60+1;o.push(T,T+1,m,m,T+1,m+1)}}}super(r,o,n)}}class Pi extends Me{constructor(t){super(t)}createMesh(t,e){const s={uTexture:new Be(t,e)},n=new ze,r=new Fe(t,wi,Ve,s),o=t.createVAO(n,r);return new Ue(o,r)}}class xi extends Wt{constructor(t){super(),this.val=t}update(t,e){t.uniform1f(e,this.val),this.needsUpdate=!1}}class Di extends Wt{constructor(t){super(),this.val=t}update(t,e){t.uniform4fv(e,this.val.reduce((s,n)=>[...s,...n],[])),this.needsUpdate=!1}}var Mi=`#define GLSLIFY 1
18
+ attribute vec3 position;attribute vec2 uv;uniform mat4 uMVMatrix;uniform mat4 uPMatrix;uniform vec4 uTexScaleOffset[2];uniform float uEye;varying highp vec2 vUV;void main(){vec4 scaleOffset=uTexScaleOffset[int(uEye)];vUV=uv.xy*scaleOffset.xy+scaleOffset.zw;gl_Position=uPMatrix*uMVMatrix*vec4(position,1.0);}`;class Yt extends Me{constructor(t){super(t),this._mode=t.mode}createMesh(t,e){let s,n;switch(this._mode){case Yt.MODE.LEFT_RIGHT:s=[.5,1,0,0],n=[.5,1,.5,0];break;default:s=[1,.5,0,0],n=[1,.5,0,.5]}const r={uTexture:new Be(t,e),uEye:new xi(0),uTexScaleOffset:new Di([s,n])},o=new ze,a=new Fe(t,Mi,Ve,r),h=t.createVAO(o,a);return new Ue(h,a)}}Yt.MODE={LEFT_RIGHT:"left_right",TOP_BOTTOM:"top_bottom"};const Ui=oe('<canvas class="view360-canvas"></canvas>'),Fi=oe('<video id="view360-video" playsinline crossorigin="anonymous" style="display: none;"></video>'),ji=()=>{let i=Nt.objs.filter(n=>n.type===je.VIDEO);i.length===0&&(i=[Nt.obj]);let t;Ge(()=>{const n=document.getElementById("view360-container"),r=document.getElementById("view360-video");n&&r&&(t=new Pe(n,{projection:new Pi({src:r,video:{autoplay:He("video_autoplay")}}),plugins:[new L({pieView:{order:0},gyroButton:{position:"top-right",order:1},vrButton:{position:"top-right",order:2}})]}))}),ke(()=>t==null?void 0:t.destroy());const[e,s]=We(!1);return St(Ke,{onAutoNextChange:s,get children(){return St(qt,{w:"$full",h:"60vh",id:"video360-player",get children(){return St(qt,{w:"100%",h:"100%",id:"view360-container",className:"view360-container",get children(){return[Ui.cloneNode(!0),(()=>{const n=Fi.cloneNode(!0);return Ye(()=>Xe(n,"src",Nt.raw_url)),n})()]}})}})}})};export{ji as default};
@@ -0,0 +1 @@
1
+ .view360-container{position:relative;touch-action:pan-y;overflow:hidden}.view360-canvas{position:absolute;left:0;top:0;width:100%;height:100%;-ms-user-select:none;user-select:none;-webkit-user-drag:none}.view360-canvas.ctx-lost{text-indent:.001px}.view360-container.is-1by1,.view360-container.is-square{padding-top:100%}.view360-container.is-5by4{padding-top:80%}.view360-container.is-4by3{padding-top:75%}.view360-container.is-3by2{padding-top:66.6666%}.view360-container.is-5by3{padding-top:60%}.view360-container.is-16by9{padding-top:56.25%}.view360-container.is-2by1{padding-top:50%}.view360-container.is-3by1{padding-top:33.3333%}.view360-container.is-4by5{padding-top:125%}.view360-container.is-3by4{padding-top:133.3333%}.view360-container.is-2by3{padding-top:150%}.view360-container.is-3by5{padding-top:166.6666%}.view360-container.is-9by16{padding-top:177.7777%}.view360-container.is-1by2{padding-top:200%}.view360-container.is-1by3{padding-top:300%}.view360-container:-ms-fullscreen{padding-top:0}.view360-container:fullscreen{padding-top:0}.view360-controls{position:absolute;top:0;left:0;width:100%;height:100%;padding:0;margin:0;border:0;pointer-events:none;-ms-user-select:none;user-select:none;-webkit-user-drag:none;z-index:1}.view360-main.view360-vr-presenting .view360-controls{display:none}.view360-controls-float-left,.view360-controls-float-right{position:absolute;display:flex;flex-direction:column}.view360-controls-float-left{left:0;top:0}.view360-controls-float-right{right:0;top:0}.view360-controls-main{position:absolute;bottom:0;left:0;width:100%;opacity:1;transition:none}.view360-controls-main.view360-controls-hidden{opacity:0;transition:opacity .5s}.view360-controls-main.view360-controls-hidden *{pointer-events:none}.view360-controls-main.view360-controls-fixed{opacity:1}.view360-controls-background{width:100%;height:calc(100% + 32px);position:absolute;left:0;bottom:0;background-image:linear-gradient(0deg,#323232,rgba(50,50,50,0))}.view360-controls-background.view360-controls-hidden{display:none}.view360-controls-mid{display:flex;flex-direction:row;position:relative}.view360-controls-left{display:flex;flex:1;justify-content:flex-start;align-items:center;flex-direction:row}.view360-controls-right,.view360-controls-bottom{display:flex;align-items:center;flex-direction:row}.view360-controls-button{display:inline-block;background-color:transparent;cursor:pointer;border:0;position:relative;background-size:24px 24px;background-origin:content-box;background-repeat:no-repeat;box-sizing:border-box;pointer-events:all;border-radius:20px;transition:opacity .25s;width:40px;height:40px;margin:6px;padding:8px;opacity:.8}.view360-controls-button:hover{opacity:1}.view360-controls-button.view360-controls-vr{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='48' width='48' viewBox='0 0 100 100'%3E%3Cg%3E%3Cpath d='M5,30 L95,30 L95,80 L55,80 L50,70 L45,80 L5,80 L5,30' fill='transparent' stroke='%23fff' stroke-width='8' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M5,30 L15,10 L85,10 L95,30' fill='transparent' stroke='%23fff' stroke-width='8' stroke-linejoin='round' stroke-linecap='round'/%3E%3Ccircle cx='30' cy='55' r='10' stroke='%23fff' stroke-width='8' fill='transparent' /%3E%3Ccircle cx='70' cy='55' r='10' stroke='%23fff' stroke-width='8' fill='transparent' /%3E%3C/g%3E%3C/svg%3E")}.view360-controls-button.view360-controls-play{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' stroke-width='2' stroke='%23fff' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M7 4v16l13 -8z'%3E%3C/path%3E%3C/svg%3E")}.view360-controls-button.view360-controls-pause{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' stroke-width='2' stroke='%23fff' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Crect x='6' y='5' width='4' height='14' rx='1'%3E%3C/rect%3E%3Crect x='14' y='5' width='4' height='14' rx='1'%3E%3C/rect%3E%3C/svg%3E")}.view360-controls-button.view360-controls-unmuted{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' stroke-width='2' stroke='%23fff' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M15 8a5 5 0 0 1 0 8'%3E%3C/path%3E%3Cpath d='M17.7 5a9 9 0 0 1 0 14'%3E%3C/path%3E%3Cpath d='M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a0.8 .8 0 0 1 1.5 .5v14a0.8 .8 0 0 1 -1.5 .5l-3.5 -4.5'%3E%3C/path%3E%3C/svg%3E")}.view360-controls-button.view360-controls-muted{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' stroke-width='2' stroke='%23fff' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a0.8 .8 0 0 1 1.5 .5v14a0.8 .8 0 0 1 -1.5 .5l-3.5 -4.5'%3E%3C/path%3E%3Cpath d='M16 10l4 4m0 -4l-4 4'%3E%3C/path%3E%3C/svg%3E")}.view360-controls-button.view360-controls-fullscreen{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' stroke-width='2' stroke='%23fff' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M4 8v-2a2 2 0 0 1 2 -2h2'%3E%3C/path%3E%3Cpath d='M4 16v2a2 2 0 0 0 2 2h2'%3E%3C/path%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v2'%3E%3C/path%3E%3Cpath d='M16 20h2a2 2 0 0 0 2 -2v-2'%3E%3C/path%3E%3C/svg%3E")}.view360-controls-button.view360-controls-fullscreen-exit{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' stroke-width='2' stroke='%23fff' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'%3E%3C/path%3E%3Cpath d='M15 19v-2a2 2 0 0 1 2 -2h2'%3E%3C/path%3E%3Cpath d='M15 5v2a2 2 0 0 0 2 2h2'%3E%3C/path%3E%3Cpath d='M5 15h2a2 2 0 0 1 2 2v2'%3E%3C/path%3E%3Cpath d='M5 9h2a2 2 0 0 0 2 -2v-2'%3E%3C/path%3E%3C/svg%3E")}.view360-controls-button.view360-controls-gyro-enabled{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='48' width='48'%3E%3Cpath fill='%23fff' d='M22.5 7.6v2.95q-1 .15-1.975.475-.975.325-1.875.825L16.5 9.7q1.35-.9 2.875-1.4 1.525-.5 3.125-.7Zm15.35 15.35q-.2 1.6-.7 3.125-.5 1.525-1.4 2.875L33.6 26.8q.5-.9.825-1.875.325-.975.475-1.975Zm3.8 20.45L1.3 3.05 3.45.9 43.8 41.25ZM7 41.4q-1.25 0-2.125-.875T4 38.4v-8.6h3v8.6h8.6v3ZM41 13V4.4h-8.6v-3H41q1.25 0 2.125.875T44 4.4V13ZM4 13V4.4q0-.55.2-1.1t.6-1l2.1 2.1V13Zm28.4 28.4v-3h8.5l2.1 2.1q-.4.45-.925.675-.525.225-1.075.225Zm-21.2-37-3-3h7.4v3ZM44 37.2l-3-3v-4.4h3ZM10.15 22.95h2.95q.5 3.7 3.1 6.3 2.6 2.6 6.3 3.1v2.95q-4.9-.55-8.35-4-3.45-3.45-4-8.35Zm4-11.35 2.1 2.05q-1.3 1.3-2.1 2.9-.8 1.6-1.05 3.4h-2.95q.25-2.4 1.275-4.525Q12.45 13.3 14.15 11.6ZM31.8 29.2l2.05 2.1q-1.7 1.7-3.825 2.725Q27.9 35.05 25.5 35.3v-2.95q1.8-.25 3.4-1.05 1.6-.8 2.9-2.1ZM25.5 7.6q4.9.55 8.35 4 3.45 3.45 4 8.35H34.9q-.5-3.7-3.1-6.3-2.6-2.6-6.3-3.1Z'/%3E%3C/svg%3E")}.view360-controls-button.view360-controls-gyro-disabled{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='48' width='48'%3E%3Cpath fill='%23fff' d='M7 44q-1.2 0-2.1-.9Q4 42.2 4 41v-8.6h3V41h8.6v3ZM4 15.6V7q0-1.2.9-2.1Q5.8 4 7 4h8.6v3H7v8.6Zm18.5 22.25q-4.9-.55-8.35-4-3.45-3.45-4-8.35h2.95q.5 3.7 3.125 6.3 2.625 2.6 6.275 3.1ZM10.15 22.5q.55-4.9 4-8.35 3.45-3.45 8.35-4v2.95q-3.7.5-6.3 3.1-2.6 2.6-3.1 6.3Zm13.85 5q-1.45 0-2.475-1.025Q20.5 25.45 20.5 24q0-1.45 1.025-2.475Q22.55 20.5 24 20.5q1.45 0 2.475 1.025Q27.5 22.55 27.5 24q0 1.45-1.025 2.475Q25.45 27.5 24 27.5Zm1.5 10.35V34.9q3.7-.5 6.3-3.125 2.6-2.625 3.1-6.275h2.95q-.55 4.9-4 8.35-3.45 3.45-8.35 4Zm9.4-15.35q-.5-3.7-3.1-6.3-2.6-2.6-6.3-3.1v-2.95q4.9.55 8.35 4 3.45 3.45 4 8.35ZM32.4 44v-3H41v-8.6h3V41q0 1.2-.9 2.1-.9.9-2.1.9ZM41 15.6V7h-8.6V4H41q1.2 0 2.1.9.9.9.9 2.1v8.6Z'/%3E%3C/svg%3E")}.view360-controls-time{display:inline-block;vertical-align:top;white-space:nowrap;color:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;font-weight:400;font-size:14px;z-index:1}.view360-controls-time:first-child{padding:0 16px}.view360-controls-progress{flex:1;width:100%;padding:0 16px;box-sizing:border-box}.view360-controls-progress:not(:first-child){padding-left:0}.view360-controls-bottom .view360-controls-progress{padding-bottom:20px}.view360-controls-volume{display:inline-flex;flex-direction:row;align-items:center;transition:width .25s,background-color .25s;overflow:hidden}.view360-controls-volume:not(:disabled).view360-controls-fixed,.view360-controls-volume:not(:disabled):hover{width:112px}.view360-controls-volume .view360-range{flex:1;height:100%;padding:0}.view360-controls-volume .view360-range .view360-range-track{width:calc(100% - 12px);transform:translate(-4px)}.view360-controls-volume .view360-controls-button{margin:0;padding:0;width:24px;height:24px;flex-shrink:0}.view360-controls-volume:disabled{opacity:.5;pointer-events:none}.view360-controls-volume:disabled *{pointer-events:none}.view360-controls-pie{width:36px;height:36px;margin:6px;padding:0;border-radius:18px;opacity:.8;pointer-events:all;cursor:pointer;color:#fff;position:relative;transition:opacity .25s}.view360-controls-pie>svg{position:absolute;top:0;left:0;width:100%;height:100%}.view360-controls-pie:hover{opacity:1}.view360-range{position:relative;cursor:pointer;pointer-events:all;display:flex;justify-content:center;align-items:center;touch-action:pan-y}.view360-range:hover .view360-range-thumb{opacity:1}.view360-range-track{width:100%;height:4px;border-radius:4px;position:relative;background-color:rgba(230,230,230,.4)}.view360-range-filler,.view360-range-load{position:absolute;left:0;top:0;width:0;height:100%;border-radius:4px}.view360-range-filler{background-color:#fff}.view360-range-load{background-color:#757575}.view360-range-thumb{width:13px;height:13px;position:absolute;top:-5px;left:-6.5px;border-radius:50%;background-color:#fff;box-sizing:border-box;transition:opacity .25s;opacity:0}.view360-range-thumb.view360-controls-fixed{opacity:1}.view360-controls-unavailable{display:none!important}@media screen and (max-width:768px){.view360-controls-button{background-size:18px 18px;width:30px;height:30px;margin:4.5px;padding:6px;border-radius:15px}.view360-controls-volume .view360-controls-button{width:18px;height:18px}.view360-controls-volume:not(:disabled).view360-controls-fixed,.view360-controls-volume:not(:disabled):hover{width:84px}.view360-controls-pie{width:27px;height:27px;margin:4.5px;padding:0;border-radius:13.5px}}.view360-spinner{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,.15)}.view360-spinner-ring{top:0;left:0;padding:0;margin:0;width:64px;height:64px;box-sizing:content-box;background-color:transparent;border-style:solid;border-radius:50%;border-width:10px;border-color:#fff;border-bottom-color:transparent;animation:view360-spin-animation 1.2s linear infinite}@keyframes view360-spin-animation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.view360-container.view360-vr-presenting{width:100vw;height:100vh;position:fixed;left:0;top:0;z-index:9999}.view360-hotspots{width:100%;height:100%;position:absolute;top:0;left:0;pointer-events:none}.view360-hotspot{pointer-events:none;visibility:hidden;position:absolute;top:0;left:0}.view360-hotspot-visible{visibility:visible;pointer-events:all}.view360-controls-main,.view360-controls-float-left,.view360-controls-float-right{pointer-events:all!important}.view360-controls-top .view360-range{height:8px!important}