anyfile-cli 0.0.0-stage → 0.2.1

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 (354) hide show
  1. package/LICENSE +177 -0
  2. package/README.md +55 -2
  3. package/SKILL.md +101 -0
  4. package/chunks/browser-probe-5STDX455.mjs +17 -0
  5. package/chunks/browser-probe-F5RX44T3.mjs +24 -0
  6. package/chunks/chunk-2C34VMNV.mjs +108 -0
  7. package/chunks/chunk-3OZ56PUH.mjs +97 -0
  8. package/chunks/chunk-3YRWCQGV.mjs +38 -0
  9. package/chunks/chunk-53MJMIN4.mjs +23 -0
  10. package/chunks/chunk-5LOC7IST.mjs +372 -0
  11. package/chunks/chunk-5XTYLZF3.mjs +559 -0
  12. package/chunks/chunk-5ZHDYRGV.mjs +64 -0
  13. package/chunks/chunk-6CQL4K2K.mjs +21 -0
  14. package/chunks/chunk-6EVJJFOH.mjs +243 -0
  15. package/chunks/chunk-6NWSQGYE.mjs +68 -0
  16. package/chunks/chunk-7O5JLQE7.mjs +1 -0
  17. package/chunks/chunk-A6AQI6DF.mjs +321 -0
  18. package/chunks/chunk-AYF63UBE.mjs +79 -0
  19. package/chunks/chunk-B27PR6Q4.mjs +17 -0
  20. package/chunks/chunk-BP7LORL4.mjs +13 -0
  21. package/chunks/chunk-BVCRJLCD.mjs +109 -0
  22. package/chunks/chunk-CLSEE3VA.mjs +28 -0
  23. package/chunks/chunk-CO2ZAQIK.mjs +52 -0
  24. package/chunks/chunk-CQWM5GMU.mjs +167 -0
  25. package/chunks/chunk-CZFFYCMJ.mjs +136 -0
  26. package/chunks/chunk-D3CS6TIK.mjs +419 -0
  27. package/chunks/chunk-DJLFVMDJ.mjs +807 -0
  28. package/chunks/chunk-DJXVCKIO.mjs +30 -0
  29. package/chunks/chunk-EMXODK3K.mjs +94 -0
  30. package/chunks/chunk-EOJ7ZCDK.mjs +227 -0
  31. package/chunks/chunk-H4TBN22D.mjs +100 -0
  32. package/chunks/chunk-HI7TURZM.mjs +2256 -0
  33. package/chunks/chunk-HUSX3ZU3.mjs +58 -0
  34. package/chunks/chunk-IC3G2XE2.mjs +436 -0
  35. package/chunks/chunk-IGEGIF35.mjs +2034 -0
  36. package/chunks/chunk-IZGTVZHE.mjs +90 -0
  37. package/chunks/chunk-J4G7LUPA.mjs +117 -0
  38. package/chunks/chunk-JBAJW66L.mjs +4220 -0
  39. package/chunks/chunk-JKQUF2MM.mjs +438 -0
  40. package/chunks/chunk-KAMPC5TK.mjs +131 -0
  41. package/chunks/chunk-KSKEMJVC.mjs +145 -0
  42. package/chunks/chunk-LRHHRZLE.mjs +29 -0
  43. package/chunks/chunk-M37ZOAUG.mjs +93 -0
  44. package/chunks/chunk-MG7LUDXO.mjs +187 -0
  45. package/chunks/chunk-NGVHHTQD.mjs +125 -0
  46. package/chunks/chunk-NQ7J2NH6.mjs +50 -0
  47. package/chunks/chunk-NUMNHVSI.mjs +60 -0
  48. package/chunks/chunk-ORJ3DN65.mjs +58 -0
  49. package/chunks/chunk-QOUEBPPL.mjs +15 -0
  50. package/chunks/chunk-QR3Y3UKM.mjs +194 -0
  51. package/chunks/chunk-RFKYE7SE.mjs +50 -0
  52. package/chunks/chunk-SH57XOAV.mjs +33 -0
  53. package/chunks/chunk-TB5ISPA4.mjs +1 -0
  54. package/chunks/chunk-UGAU3V4V.mjs +206 -0
  55. package/chunks/chunk-WDN6NMVU.mjs +36 -0
  56. package/chunks/chunk-WWTLSPEG.mjs +3999 -0
  57. package/chunks/chunk-XDW56XVX.mjs +69 -0
  58. package/chunks/chunk-XRT7TAAY.mjs +27 -0
  59. package/chunks/chunk-XTW4HNIJ.mjs +418 -0
  60. package/chunks/chunk-YPLWNGCC.mjs +17 -0
  61. package/chunks/chunk-ZBR7RQQE.mjs +64 -0
  62. package/chunks/chunk-ZUHJIGHP.mjs +300 -0
  63. package/chunks/deflate-IINN6MRE.mjs +19 -0
  64. package/chunks/jpeg-N3DSYEAQ.mjs +964 -0
  65. package/chunks/jxl_oxide_wasm-3UN6G3YN.mjs +589 -0
  66. package/chunks/lerc-5LP7Q554.mjs +2086 -0
  67. package/chunks/lzw-Z2ZZBEWD.mjs +137 -0
  68. package/chunks/packbits-3S2JASDB.mjs +34 -0
  69. package/chunks/pdf.worker-PUGU2NS2.mjs +67416 -0
  70. package/chunks/probe-22WNVZ3I.mjs +17 -0
  71. package/chunks/probe-2P4CTFCY.mjs +14 -0
  72. package/chunks/probe-2QBNDPYK.mjs +18 -0
  73. package/chunks/probe-34TOVXUI.mjs +11 -0
  74. package/chunks/probe-3W2HOWBM.mjs +20 -0
  75. package/chunks/probe-42OBMD35.mjs +23 -0
  76. package/chunks/probe-43RVHUBG.mjs +17 -0
  77. package/chunks/probe-4O362IEX.mjs +18 -0
  78. package/chunks/probe-4WF34ZXS.mjs +11 -0
  79. package/chunks/probe-5ZITS3T5.mjs +40 -0
  80. package/chunks/probe-5ZS5DHFP.mjs +21 -0
  81. package/chunks/probe-62RFYKCP.mjs +14 -0
  82. package/chunks/probe-64JTFRH4.mjs +41 -0
  83. package/chunks/probe-6YJQJJ3R.mjs +518 -0
  84. package/chunks/probe-6YMOOV53.mjs +39 -0
  85. package/chunks/probe-BYBD2WAK.mjs +239 -0
  86. package/chunks/probe-CZZNJOHV.mjs +20 -0
  87. package/chunks/probe-DJMPK6HU.mjs +11 -0
  88. package/chunks/probe-FMWIF4LX.mjs +33 -0
  89. package/chunks/probe-FYPH6CYY.mjs +206 -0
  90. package/chunks/probe-G6PPXKBE.mjs +15 -0
  91. package/chunks/probe-GJ5OUOQ3.mjs +32 -0
  92. package/chunks/probe-H6J7TUY2.mjs +95 -0
  93. package/chunks/probe-IGZ47OE3.mjs +68 -0
  94. package/chunks/probe-IL5HO3OK.mjs +46 -0
  95. package/chunks/probe-INYCDZHO.mjs +27 -0
  96. package/chunks/probe-JFH545GO.mjs +11 -0
  97. package/chunks/probe-JZYDRITV.mjs +18 -0
  98. package/chunks/probe-K3WW5O5K.mjs +26 -0
  99. package/chunks/probe-KB4T466L.mjs +70 -0
  100. package/chunks/probe-KY7SIIXD.mjs +13 -0
  101. package/chunks/probe-L2P263WT.mjs +16 -0
  102. package/chunks/probe-LEP3RQPD.mjs +11 -0
  103. package/chunks/probe-M2QWULOI.mjs +119 -0
  104. package/chunks/probe-M7AYZBD3.mjs +35 -0
  105. package/chunks/probe-MEN3BMBB.mjs +22 -0
  106. package/chunks/probe-MNIGKDWT.mjs +163 -0
  107. package/chunks/probe-NFVFWB4M.mjs +56 -0
  108. package/chunks/probe-NJGSTL6R.mjs +161 -0
  109. package/chunks/probe-O73EHWT3.mjs +14 -0
  110. package/chunks/probe-OG2XYCG2.mjs +25 -0
  111. package/chunks/probe-OTKJKTNS.mjs +10 -0
  112. package/chunks/probe-OZKO3C2V.mjs +27 -0
  113. package/chunks/probe-PBL4KITG.mjs +12 -0
  114. package/chunks/probe-PEFZNH2T.mjs +21 -0
  115. package/chunks/probe-R4SSEXES.mjs +27 -0
  116. package/chunks/probe-RCAUVV27.mjs +29 -0
  117. package/chunks/probe-RPGBKGPI.mjs +20 -0
  118. package/chunks/probe-S2I46SEO.mjs +10 -0
  119. package/chunks/probe-SGDD4U4Q.mjs +165 -0
  120. package/chunks/probe-SPQO5LHI.mjs +9 -0
  121. package/chunks/probe-TBR6UGRZ.mjs +19 -0
  122. package/chunks/probe-TNKNILAW.mjs +21 -0
  123. package/chunks/probe-TVRJBPXH.mjs +48 -0
  124. package/chunks/probe-UESMTUQ5.mjs +33 -0
  125. package/chunks/probe-VDXFEZ5Q.mjs +16 -0
  126. package/chunks/probe-VX7JCDW6.mjs +39 -0
  127. package/chunks/probe-W7M55OPE.mjs +64 -0
  128. package/chunks/probe-XUBTIWGE.mjs +13 -0
  129. package/chunks/probe-ZF7KIRHO.mjs +36 -0
  130. package/chunks/raw-JJRPYAXO.mjs +16 -0
  131. package/chunks/tiff-metadata-7MWLNVW2.mjs +2990 -0
  132. package/chunks/webimage-D6XSCCTJ.mjs +56 -0
  133. package/chunks/zip-reader-YUGANW4Z.mjs +92 -0
  134. package/chunks/zstd-AH2S24PU.mjs +121 -0
  135. package/cli-main.mjs +297 -0
  136. package/cli.mjs +3 -0
  137. package/extractors/apple-plist.mjs +145 -0
  138. package/extractors/archive-metadata-viewer.mjs +1401 -0
  139. package/extractors/bittorrent-metadata.mjs +369 -0
  140. package/extractors/calendar-contacts.mjs +328 -0
  141. package/extractors/camera-raw.mjs +201 -0
  142. package/extractors/chm-reader.mjs +1842 -0
  143. package/extractors/comic-book-reader.mjs +307 -0
  144. package/extractors/design-source.mjs +1801 -0
  145. package/extractors/dev-array-viewer.mjs +825 -0
  146. package/extractors/dev-native-binary-viewer.mjs +1661 -0
  147. package/extractors/dev-source-map-viewer.mjs +416 -0
  148. package/extractors/dev-wasm-viewer.mjs +506 -0
  149. package/extractors/dicom.mjs +383 -0
  150. package/extractors/djvu-reader.mjs +337 -0
  151. package/extractors/duckdb-data.mjs +49174 -0
  152. package/extractors/epub-reader.mjs +222 -0
  153. package/extractors/excel-workbook.mjs +27057 -0
  154. package/extractors/fictionbook-reader.mjs +362 -0
  155. package/extractors/font-viewer.mjs +441 -0
  156. package/extractors/general-raster.mjs +444 -0
  157. package/extractors/hdr-image.mjs +1685 -0
  158. package/extractors/http-archive.mjs +306 -0
  159. package/extractors/ifc.mjs +341 -0
  160. package/extractors/iwork.mjs +640 -0
  161. package/extractors/microsoft-project.mjs +174 -0
  162. package/extractors/mind-map.mjs +607 -0
  163. package/extractors/ml-weights.mjs +649 -0
  164. package/extractors/modern-raster.mjs +620 -0
  165. package/extractors/ofd-reader.mjs +973 -0
  166. package/extractors/outlook-pst.mjs +997 -0
  167. package/extractors/pdfjs-pdf.mjs +32056 -0
  168. package/extractors/photoshop-document.mjs +17448 -0
  169. package/extractors/safe-svg.mjs +163 -0
  170. package/extractors/scientific-data.mjs +2041 -0
  171. package/extractors/sqlite-database.mjs +333 -0
  172. package/extractors/statistical-data.mjs +297 -0
  173. package/extractors/visio.mjs +141 -0
  174. package/extractors/x509-certificate.mjs +588 -0
  175. package/extractors/xps-reader.mjs +896 -0
  176. package/index.mjs +83 -0
  177. package/licenses/dicom-parser/1.8.21/LICENSE +21 -0
  178. package/licenses/libraw-wasm/1.6.0/COPYRIGHT.LibRaw +27 -0
  179. package/licenses/libraw-wasm/1.6.0/LICENSE.Emscripten +102 -0
  180. package/licenses/libraw-wasm/1.6.0/LICENSE.LibRaw-CDDL-1.0 +340 -0
  181. package/licenses/libraw-wasm/1.6.0/LICENSE.Little-CMS-MIT +22 -0
  182. package/licenses/libraw-wasm/1.6.0/LICENSE.libpng +134 -0
  183. package/licenses/libraw-wasm/1.6.0/LICENSE.libraw-wasm-ISC +15 -0
  184. package/licenses/libraw-wasm/1.6.0/LICENSE.zlib +22 -0
  185. package/licenses/libraw-wasm/1.6.0/NOTICE.IJG-libjpeg +49 -0
  186. package/licenses/libraw-wasm/1.6.0/SOURCE.md +25 -0
  187. package/licenses/libraw-wasm/1.6.0/THIRD_PARTY_NOTICES.md +14 -0
  188. package/licenses/mediabunny/1.55.3/MPL-2.0.txt +373 -0
  189. package/licenses/mediabunny/1.55.3/SOURCE.md +16 -0
  190. package/licenses/openskp/1.3.0/LICENSE +21 -0
  191. package/package.json +34 -4
  192. package/renderer-host/assets/ColladaComposer-TCm9fgZa.js +1 -0
  193. package/renderer-host/assets/ColladaParser-BHTzbhBz.js +3 -0
  194. package/renderer-host/assets/FBXLoader-D1vDnL3o.js +8 -0
  195. package/renderer-host/assets/agent-CKvDbj87.js +1 -0
  196. package/renderer-host/assets/amf-BkE--DNX.js +1 -0
  197. package/renderer-host/assets/animation-Dt0WW2cB.js +1 -0
  198. package/renderer-host/assets/archive-client-CL5yOgwH.js +1 -0
  199. package/renderer-host/assets/archive.worker-CcLnJ9FC.js +1 -0
  200. package/renderer-host/assets/audio-visualizer-CiyGNhY2.js +1 -0
  201. package/renderer-host/assets/basedecoder-BuG7fe0q.js +1 -0
  202. package/renderer-host/assets/book-source-28BQcBKR.js +1 -0
  203. package/renderer-host/assets/book-worker-DUt14LJO.js +1 -0
  204. package/renderer-host/assets/browser-C0pGRq_c.js +1 -0
  205. package/renderer-host/assets/client-CU2ERPtk.js +1 -0
  206. package/renderer-host/assets/container-inspection-ekEPWWcy.js +1 -0
  207. package/renderer-host/assets/data-table-OJQe3aN5.js +1 -0
  208. package/renderer-host/assets/decode-hBroL8C1.js +1 -0
  209. package/renderer-host/assets/decode-tiff-CP1xdrF_.js +5 -0
  210. package/renderer-host/assets/decoder-worker-B0sdTVlF.js +1 -0
  211. package/renderer-host/assets/decoder-worker-CBiHE971.js +3 -0
  212. package/renderer-host/assets/decoder-worker-Cr5oP97p.js +5 -0
  213. package/renderer-host/assets/decoder-worker-DIdLFebY.js +11 -0
  214. package/renderer-host/assets/decoder-worker-DLeuEYxq.js +1 -0
  215. package/renderer-host/assets/decoder.worker-BXAaF0Qj.js +1 -0
  216. package/renderer-host/assets/decoder.worker-yaM6uups.js +1 -0
  217. package/renderer-host/assets/deflate-DPjr4M2G.js +1 -0
  218. package/renderer-host/assets/deflate-S3QmZI-f.js +1 -0
  219. package/renderer-host/assets/dual-track-playback-CxjGms-W.js +1 -0
  220. package/renderer-host/assets/ext-searchbox-BIdon51Z.js +164 -0
  221. package/renderer-host/assets/ffmpeg-playback-DzCJz9Ny.js +1 -0
  222. package/renderer-host/assets/gltf-PozNLKNg.js +1 -0
  223. package/renderer-host/assets/hdf5.worker-BO3TrRup.js +1 -0
  224. package/renderer-host/assets/heif-worker-CC9DI3ZR.js +1 -0
  225. package/renderer-host/assets/id3-uzaDmDwy.js +1 -0
  226. package/renderer-host/assets/ifc.worker-KIbgAIsy.js +1 -0
  227. package/renderer-host/assets/image-load-SK3ULGWm.js +1 -0
  228. package/renderer-host/assets/index-DtiyOy_J.js +2 -0
  229. package/renderer-host/assets/jpeg-AGQ46WDa.js +1 -0
  230. package/renderer-host/assets/jpeg-Dm0yBuYB.js +1 -0
  231. package/renderer-host/assets/jszip.min-DCdQ6XWv.js +2 -0
  232. package/renderer-host/assets/jxl_oxide_wasm-BJKDqoXP.js +1 -0
  233. package/renderer-host/assets/jxl_oxide_wasm_bg-C5JqlrFv.wasm +0 -0
  234. package/renderer-host/assets/kernel.worker-B58X9XWu.js +1 -0
  235. package/renderer-host/assets/kernel.worker-BcQYKb39.js +8 -0
  236. package/renderer-host/assets/kernel.worker-BdWmPdqg.js +1 -0
  237. package/renderer-host/assets/kernel.worker-C7qxomuK.js +1 -0
  238. package/renderer-host/assets/kernel.worker-D88TbQnz.js +1 -0
  239. package/renderer-host/assets/laz-Lt10LsWd.js +1 -0
  240. package/renderer-host/assets/lerc-BxVqCKaH.js +3 -0
  241. package/renderer-host/assets/lerc-Cuor-Zm2.js +1 -0
  242. package/renderer-host/assets/lzw-D2FslT4L.js +1 -0
  243. package/renderer-host/assets/lzw-DODNa9l5.js +1 -0
  244. package/renderer-host/assets/mediabunny-viewer-BniHVEWJ.js +16 -0
  245. package/renderer-host/assets/model-Drd3vqcF.js +1 -0
  246. package/renderer-host/assets/obj-B3p81LL2.js +9 -0
  247. package/renderer-host/assets/off-QQbiKPTX.js +1 -0
  248. package/renderer-host/assets/ogg-probe-C2TT74FL.js +1 -0
  249. package/renderer-host/assets/ogg-viewer-Dc8K-tas.js +9 -0
  250. package/renderer-host/assets/packbits-DCimUQ1T.js +1 -0
  251. package/renderer-host/assets/paged-C8AQD7sX.js +319 -0
  252. package/renderer-host/assets/pako.esm-0UYEm1Jg.js +2 -0
  253. package/renderer-host/assets/pako.esm-CtVA0R7W.js +1 -0
  254. package/renderer-host/assets/pdf.worker.min-CHFwMXne.mjs +29 -0
  255. package/renderer-host/assets/ply-C3_RRA7n.js +2 -0
  256. package/renderer-host/assets/points.worker-CA8v75dl.js +2 -0
  257. package/renderer-host/assets/probe-asf-C_UpCBly.js +14 -0
  258. package/renderer-host/assets/range-reader-BMfLhWcp.js +1 -0
  259. package/renderer-host/assets/raw-A-vJRPpa.js +1 -0
  260. package/renderer-host/assets/resource-cache-CHocY8K3.js +1 -0
  261. package/renderer-host/assets/resources-6AmS6O5e.js +1 -0
  262. package/renderer-host/assets/rolldown-runtime-Dd_uD5pT.js +1 -0
  263. package/renderer-host/assets/safe-content-CWHf8jex.js +1 -0
  264. package/renderer-host/assets/sanitize-D56ODnaM.js +1 -0
  265. package/renderer-host/assets/scene-adapter-CaCLr1am.js +1 -0
  266. package/renderer-host/assets/scene.worker-CJViWLYo.js +24 -0
  267. package/renderer-host/assets/scene.worker-D7koFZY8.js +2 -0
  268. package/renderer-host/assets/skp-adapter-jl6q24fW.js +1 -0
  269. package/renderer-host/assets/skp.worker-D9ujTXFV.js +1 -0
  270. package/renderer-host/assets/src-1Won7FxU.js +88 -0
  271. package/renderer-host/assets/src-3RoHqOkA.js +7 -0
  272. package/renderer-host/assets/src-4zBOL6Jt.js +1 -0
  273. package/renderer-host/assets/src-6v8-hoR3.js +24 -0
  274. package/renderer-host/assets/src-8Jx9gbII.js +1 -0
  275. package/renderer-host/assets/src-B1WA0dRu.js +64 -0
  276. package/renderer-host/assets/src-B5ijbemo.js +9 -0
  277. package/renderer-host/assets/src-B8DH2GJe.js +17 -0
  278. package/renderer-host/assets/src-B9t_iEO3.js +58 -0
  279. package/renderer-host/assets/src-BCC58C0X.js +1 -0
  280. package/renderer-host/assets/src-BCwENs26.js +1 -0
  281. package/renderer-host/assets/src-BEirBh4c.js +27 -0
  282. package/renderer-host/assets/src-BHR6n7Fj.js +1 -0
  283. package/renderer-host/assets/src-BIlLq0QT.js +169 -0
  284. package/renderer-host/assets/src-BKlK1jcN.js +1 -0
  285. package/renderer-host/assets/src-BN0FUJhs.js +8 -0
  286. package/renderer-host/assets/src-BWElAdlq.js +52 -0
  287. package/renderer-host/assets/src-BXg11IjY.js +4 -0
  288. package/renderer-host/assets/src-BbBdnTjJ.js +2 -0
  289. package/renderer-host/assets/src-BbFZbZsL.js +2 -0
  290. package/renderer-host/assets/src-BdPbFRd-.js +24 -0
  291. package/renderer-host/assets/src-BpbGaBrT.js +182 -0
  292. package/renderer-host/assets/src-BwIl76_H.js +7 -0
  293. package/renderer-host/assets/src-C2e6QJIj.js +10 -0
  294. package/renderer-host/assets/src-C2gNidHF.js +989 -0
  295. package/renderer-host/assets/src-C9Uz3C-q.js +432 -0
  296. package/renderer-host/assets/src-CBUhG6W5.js +7 -0
  297. package/renderer-host/assets/src-CQDGi3Qa.js +10 -0
  298. package/renderer-host/assets/src-CRLCRg0N.js +21 -0
  299. package/renderer-host/assets/src-CS5rqxBy.js +10 -0
  300. package/renderer-host/assets/src-CWZdSJQw.js +7 -0
  301. package/renderer-host/assets/src-CXnpsVpU.js +27 -0
  302. package/renderer-host/assets/src-CnhXvqQY.js +8 -0
  303. package/renderer-host/assets/src-CpExg0ZA.js +9 -0
  304. package/renderer-host/assets/src-CrLmL3wU.js +5 -0
  305. package/renderer-host/assets/src-CrYEJ5uz.js +2 -0
  306. package/renderer-host/assets/src-D-iIkSqZ.js +222 -0
  307. package/renderer-host/assets/src-D6sH9uTT.js +23 -0
  308. package/renderer-host/assets/src-D8zHDJh_.js +10 -0
  309. package/renderer-host/assets/src-D9OFaPNV.js +1 -0
  310. package/renderer-host/assets/src-DCI_ff7c.js +1 -0
  311. package/renderer-host/assets/src-DCrbiTpH.js +18 -0
  312. package/renderer-host/assets/src-DK8DvtMd.js +115 -0
  313. package/renderer-host/assets/src-DWGlOVjt.js +17 -0
  314. package/renderer-host/assets/src-DbvEX_Ct.js +6 -0
  315. package/renderer-host/assets/src-Dezc2dj1.js +1 -0
  316. package/renderer-host/assets/src-Dh5VD1lL.js +11 -0
  317. package/renderer-host/assets/src-DlwABqw5.js +1 -0
  318. package/renderer-host/assets/src-DlxETlTh.js +44 -0
  319. package/renderer-host/assets/src-Dmd6BvBh.js +387 -0
  320. package/renderer-host/assets/src-DpgvaJNJ.js +24 -0
  321. package/renderer-host/assets/src-DpjRB2sv.js +1 -0
  322. package/renderer-host/assets/src-Dvn41FR7.js +90 -0
  323. package/renderer-host/assets/src-DwcPYp7X.js +1 -0
  324. package/renderer-host/assets/src-HUxhcDlO.js +2 -0
  325. package/renderer-host/assets/src-Jhqg3J8L.js +2 -0
  326. package/renderer-host/assets/src-MO5bLsLj.js +4126 -0
  327. package/renderer-host/assets/src-N8XBQaK4.js +20 -0
  328. package/renderer-host/assets/src-XZ_0U972.js +1 -0
  329. package/renderer-host/assets/src-Y6mXl4vh.js +29 -0
  330. package/renderer-host/assets/src-b9aXVJde.js +100 -0
  331. package/renderer-host/assets/src-d2U6neq8.js +37 -0
  332. package/renderer-host/assets/src-hCrza_Lf.js +1 -0
  333. package/renderer-host/assets/src-jUGjKzOV.js +1 -0
  334. package/renderer-host/assets/src-rJN_jaC5.js +1 -0
  335. package/renderer-host/assets/src-vOBd-1zk.js +5 -0
  336. package/renderer-host/assets/src-wrrVkfrK.js +1 -0
  337. package/renderer-host/assets/src-yCrAObB-.js +1 -0
  338. package/renderer-host/assets/src-zrBiCtay.js +7 -0
  339. package/renderer-host/assets/stl-adapter-CLkWHoOn.js +1 -0
  340. package/renderer-host/assets/stl.worker-C-anHijM.js +1 -0
  341. package/renderer-host/assets/three-mf-BSrcsdQD.js +2 -0
  342. package/renderer-host/assets/webimage-zQMH-_zR.js +1 -0
  343. package/renderer-host/assets/webm-14HHwfWy.js +1 -0
  344. package/renderer-host/assets/worker-QK2gViTu.js +1 -0
  345. package/renderer-host/assets/x6-dng-worker-CNf3zUP-.js +1 -0
  346. package/renderer-host/assets/xml.browser-CC8-XAyN.js +1 -0
  347. package/renderer-host/assets/zip-core-base-DD8akpjq.js +1 -0
  348. package/renderer-host/assets/zip-core-custom-CfPFs1lw.js +1 -0
  349. package/renderer-host/assets/zip-source-CLF3Hfcg.js +1 -0
  350. package/renderer-host/assets/zstd-CmwSLjHB.js +1 -0
  351. package/renderer-host/assets/zstd-i4Jwubnx.js +1 -0
  352. package/renderer-host/index.html +65 -0
  353. package/vendor-manifest.json +1433 -0
  354. package/worker.mjs +262 -0
@@ -0,0 +1,69 @@
1
+ import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
2
+ import {
3
+ ViewerError
4
+ } from "./chunk-IC3G2XE2.mjs";
5
+
6
+ // ../plugins/archive/src/binary.ts
7
+ var utf8 = new TextDecoder("utf-8", { fatal: false });
8
+ function view(bytes) {
9
+ return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
10
+ }
11
+ function ascii(bytes) {
12
+ return String.fromCharCode(...bytes);
13
+ }
14
+ function text(bytes) {
15
+ return utf8.decode(bytes);
16
+ }
17
+ function hex(value, width = 8) {
18
+ return `0x${(value >>> 0).toString(16).padStart(width, "0")}`;
19
+ }
20
+ function formatBytes(value) {
21
+ if (!Number.isFinite(value)) return "\u2014";
22
+ return new Intl.NumberFormat(void 0).format(value);
23
+ }
24
+ function readUint64(data, offset, littleEndian = true) {
25
+ const value = data.getBigUint64(offset, littleEndian);
26
+ if (value > BigInt(Number.MAX_SAFE_INTEGER)) {
27
+ throw new ViewerError("resource-limit", "\u5143\u6570\u636E\u4E2D\u7684 64 \u4F4D\u6570\u503C\u8D85\u51FA\u6D4F\u89C8\u5668\u5B89\u5168\u8303\u56F4\u3002");
28
+ }
29
+ return Number(value);
30
+ }
31
+ function readVarint(bytes, state) {
32
+ let result = 0;
33
+ let scale = 1;
34
+ for (let count = 0; count < 9 && state.offset < bytes.length; count += 1) {
35
+ const byte = bytes[state.offset++];
36
+ result += (byte & 127) * scale;
37
+ if (result > Number.MAX_SAFE_INTEGER) {
38
+ throw new ViewerError("resource-limit", "\u7D22\u5F15\u6570\u503C\u8D85\u51FA\u6D4F\u89C8\u5668\u5B89\u5168\u8303\u56F4\u3002");
39
+ }
40
+ if ((byte & 128) === 0) return result;
41
+ scale *= 128;
42
+ }
43
+ throw new ViewerError("invalid-file", "\u538B\u7F29\u7D22\u5F15\u5305\u542B\u65E0\u6548\u7684\u53D8\u957F\u6574\u6570\u3002");
44
+ }
45
+ function crc32(bytes) {
46
+ let crc = 4294967295;
47
+ for (const byte of bytes) {
48
+ crc ^= byte;
49
+ for (let bit = 0; bit < 8; bit += 1) {
50
+ crc = crc >>> 1 ^ (crc & 1 ? 3988292384 : 0);
51
+ }
52
+ }
53
+ return (crc ^ 4294967295) >>> 0;
54
+ }
55
+ function dangerousPath(path) {
56
+ return /^(?:[a-zA-Z]:[\\/]|[\\/])/.test(path) || path.split(/[\\/]+/).includes("..");
57
+ }
58
+
59
+ export {
60
+ view,
61
+ ascii,
62
+ text,
63
+ hex,
64
+ formatBytes,
65
+ readUint64,
66
+ readVarint,
67
+ crc32,
68
+ dangerousPath
69
+ };
@@ -0,0 +1,27 @@
1
+ import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
2
+ import {
3
+ ViewerError
4
+ } from "./chunk-IC3G2XE2.mjs";
5
+
6
+ // ../plugins/fictionbook/src/encoding.ts
7
+ var FB2_NAMESPACE = "http://www.gribuser.ru/xml/fictionbook/2.0";
8
+ function decodeFb2(bytes, stream = false) {
9
+ const utf16 = bytes[0] === 255 && bytes[1] === 254 || bytes[0] === 60 && bytes[1] === 0 ? "utf-16le" : bytes[0] === 254 && bytes[1] === 255 || bytes[0] === 0 && bytes[1] === 60 ? "utf-16be" : void 0;
10
+ const header = new TextDecoder(utf16 ?? "ascii").decode(bytes.subarray(0, 512));
11
+ const declared = /^\s*<\?xml\s[^?]*encoding\s*=\s*["']([^"']+)["']/i.exec(header)?.[1].toLowerCase();
12
+ const encoding = utf16 ?? declared ?? "utf-8";
13
+ if (!/^(utf-8|utf-16le|utf-16be|windows-1251)$/.test(encoding))
14
+ throw new ViewerError("invalid-file", "Unsupported FB2 encoding.");
15
+ return new TextDecoder(encoding, { fatal: true }).decode(bytes, { stream });
16
+ }
17
+ function singleFb2(names) {
18
+ const files = [...names].filter((name) => !name.endsWith("/"));
19
+ const books = files.filter((name) => /\.fb2$/i.test(name));
20
+ return books.length === 1 ? books[0] : void 0;
21
+ }
22
+
23
+ export {
24
+ FB2_NAMESPACE,
25
+ decodeFb2,
26
+ singleFb2
27
+ };
@@ -0,0 +1,418 @@
1
+ import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
2
+ import {
3
+ __export
4
+ } from "./chunk-ORJ3DN65.mjs";
5
+
6
+ // ../../node_modules/.pnpm/geotiff@3.0.5/node_modules/geotiff/dist-module/globals.js
7
+ var globals_exports = {};
8
+ __export(globals_exports, {
9
+ ExtraSamplesValues: () => ExtraSamplesValues,
10
+ LercAddCompression: () => LercAddCompression,
11
+ LercParameters: () => LercParameters,
12
+ fieldTagTypes: () => fieldTagTypes,
13
+ fieldTypeSizes: () => fieldTypeSizes,
14
+ fieldTypes: () => fieldTypes,
15
+ geoKeyNames: () => geoKeyNames,
16
+ geoKeys: () => geoKeys,
17
+ getFieldTypeSize: () => getFieldTypeSize,
18
+ getTag: () => getTag,
19
+ photometricInterpretations: () => photometricInterpretations,
20
+ registerTag: () => registerTag,
21
+ resolveTag: () => resolveTag,
22
+ tagDefinitions: () => tagDefinitions,
23
+ tagDictionary: () => tagDictionary,
24
+ tags: () => tags
25
+ });
26
+ var fieldTypes = {
27
+ BYTE: (
28
+ /** @type {1} */
29
+ 1
30
+ ),
31
+ ASCII: (
32
+ /** @type {2} */
33
+ 2
34
+ ),
35
+ SHORT: (
36
+ /** @type {3} */
37
+ 3
38
+ ),
39
+ LONG: (
40
+ /** @type {4} */
41
+ 4
42
+ ),
43
+ RATIONAL: (
44
+ /** @type {5} */
45
+ 5
46
+ ),
47
+ SBYTE: (
48
+ /** @type {6} */
49
+ 6
50
+ ),
51
+ UNDEFINED: (
52
+ /** @type {7} */
53
+ 7
54
+ ),
55
+ SSHORT: (
56
+ /** @type {8} */
57
+ 8
58
+ ),
59
+ SLONG: (
60
+ /** @type {9} */
61
+ 9
62
+ ),
63
+ SRATIONAL: (
64
+ /** @type {10} */
65
+ 10
66
+ ),
67
+ FLOAT: (
68
+ /** @type {11} */
69
+ 11
70
+ ),
71
+ DOUBLE: (
72
+ /** @type {12} */
73
+ 12
74
+ ),
75
+ // IFD offset, suggested by https://owl.phy.queensu.ca/~phil/exiftool/standards.html
76
+ IFD: (
77
+ /** @type {13} */
78
+ 13
79
+ ),
80
+ // introduced by BigTIFF
81
+ LONG8: (
82
+ /** @type {16} */
83
+ 16
84
+ ),
85
+ SLONG8: (
86
+ /** @type {17} */
87
+ 17
88
+ ),
89
+ IFD8: (
90
+ /** @type {18} */
91
+ 18
92
+ )
93
+ };
94
+ var fieldTypeSizes = (
95
+ /** @type {const} */
96
+ {
97
+ [fieldTypes.BYTE]: 1,
98
+ [fieldTypes.ASCII]: 1,
99
+ [fieldTypes.SBYTE]: 1,
100
+ [fieldTypes.UNDEFINED]: 1,
101
+ [fieldTypes.SHORT]: 2,
102
+ [fieldTypes.SSHORT]: 2,
103
+ [fieldTypes.LONG]: 4,
104
+ [fieldTypes.SLONG]: 4,
105
+ [fieldTypes.FLOAT]: 4,
106
+ [fieldTypes.IFD]: 4,
107
+ [fieldTypes.RATIONAL]: 8,
108
+ [fieldTypes.SRATIONAL]: 8,
109
+ [fieldTypes.DOUBLE]: 8,
110
+ [fieldTypes.LONG8]: 8,
111
+ [fieldTypes.SLONG8]: 8,
112
+ [fieldTypes.IFD8]: 8
113
+ }
114
+ );
115
+ function getFieldTypeSize(fieldType) {
116
+ const size = fieldTypeSizes[fieldType];
117
+ if (size === void 0) {
118
+ throw new RangeError(`Invalid field type: ${fieldType}`);
119
+ }
120
+ return size;
121
+ }
122
+ var tagDictionary = (
123
+ /** @type {const} */
124
+ {
125
+ NewSubfileType: { tag: 254, type: fieldTypes.LONG, eager: true },
126
+ SubfileType: { tag: 255, type: fieldTypes.SHORT, eager: true },
127
+ ImageWidth: { tag: 256, type: fieldTypes.SHORT, eager: true },
128
+ ImageLength: { tag: 257, type: fieldTypes.SHORT, eager: true },
129
+ BitsPerSample: { tag: 258, type: fieldTypes.SHORT, isArray: true, eager: true },
130
+ Compression: { tag: 259, type: fieldTypes.SHORT, eager: true },
131
+ PhotometricInterpretation: { tag: 262, type: fieldTypes.SHORT, eager: true },
132
+ Threshholding: { tag: 263, type: fieldTypes.SHORT },
133
+ CellWidth: { tag: 264, type: fieldTypes.SHORT },
134
+ CellLength: { tag: 265, type: fieldTypes.SHORT },
135
+ FillOrder: { tag: 266, type: fieldTypes.SHORT },
136
+ DocumentName: { tag: 269, type: fieldTypes.ASCII },
137
+ ImageDescription: { tag: 270, type: fieldTypes.ASCII },
138
+ Make: { tag: 271, type: fieldTypes.ASCII },
139
+ Model: { tag: 272, type: fieldTypes.ASCII },
140
+ StripOffsets: { tag: 273, type: fieldTypes.SHORT, isArray: true },
141
+ Orientation: { tag: 274, type: fieldTypes.SHORT },
142
+ SamplesPerPixel: { tag: 277, type: fieldTypes.SHORT, eager: true },
143
+ RowsPerStrip: { tag: 278, type: fieldTypes.SHORT, eager: true },
144
+ StripByteCounts: { tag: 279, type: fieldTypes.LONG, isArray: true },
145
+ MinSampleValue: { tag: 280, type: fieldTypes.SHORT, isArray: true },
146
+ MaxSampleValue: { tag: 281, type: fieldTypes.SHORT, isArray: true },
147
+ XResolution: { tag: 282, type: fieldTypes.RATIONAL },
148
+ YResolution: { tag: 283, type: fieldTypes.RATIONAL },
149
+ PlanarConfiguration: { tag: 284, type: fieldTypes.SHORT, eager: true },
150
+ PageName: { tag: 285, type: fieldTypes.ASCII },
151
+ XPosition: { tag: 286, type: fieldTypes.RATIONAL },
152
+ YPosition: { tag: 287, type: fieldTypes.RATIONAL },
153
+ FreeOffsets: { tag: 288, type: fieldTypes.LONG },
154
+ FreeByteCounts: { tag: 289, type: fieldTypes.LONG },
155
+ GrayResponseUnit: { tag: 290, type: fieldTypes.SHORT },
156
+ GrayResponseCurve: { tag: 291, type: fieldTypes.SHORT, isArray: true },
157
+ T4Options: { tag: 292, type: fieldTypes.LONG },
158
+ T6Options: { tag: 293, type: fieldTypes.LONG },
159
+ ResolutionUnit: { tag: 296, type: fieldTypes.SHORT },
160
+ PageNumber: { tag: 297, type: fieldTypes.SHORT, isArray: true },
161
+ TransferFunction: { tag: 301, type: fieldTypes.SHORT, isArray: true },
162
+ Software: { tag: 305, type: fieldTypes.ASCII },
163
+ DateTime: { tag: 306, type: fieldTypes.ASCII },
164
+ Artist: { tag: 315, type: fieldTypes.ASCII },
165
+ HostComputer: { tag: 316, type: fieldTypes.ASCII },
166
+ Predictor: { tag: 317, type: fieldTypes.SHORT },
167
+ WhitePoint: { tag: 318, type: fieldTypes.RATIONAL, isArray: true },
168
+ PrimaryChromaticities: { tag: 319, type: fieldTypes.RATIONAL, isArray: true },
169
+ ColorMap: { tag: 320, type: fieldTypes.SHORT, isArray: true },
170
+ HalftoneHints: { tag: 321, type: fieldTypes.SHORT, isArray: true },
171
+ TileWidth: { tag: 322, type: fieldTypes.SHORT, eager: true },
172
+ TileLength: { tag: 323, type: fieldTypes.SHORT, eager: true },
173
+ TileOffsets: { tag: 324, type: fieldTypes.LONG, isArray: true },
174
+ TileByteCounts: { tag: 325, type: fieldTypes.SHORT, isArray: true },
175
+ InkSet: { tag: 332, type: fieldTypes.SHORT },
176
+ InkNames: { tag: 333, type: fieldTypes.ASCII },
177
+ NumberOfInks: { tag: 334, type: fieldTypes.SHORT },
178
+ DotRange: { tag: 336, type: fieldTypes.BYTE, isArray: true },
179
+ TargetPrinter: { tag: 337, type: fieldTypes.ASCII },
180
+ ExtraSamples: { tag: 338, type: fieldTypes.BYTE, isArray: true, eager: true },
181
+ SampleFormat: { tag: 339, type: fieldTypes.SHORT, isArray: true, eager: true },
182
+ SMinSampleValue: { tag: 340, isArray: true },
183
+ SMaxSampleValue: { tag: 341, isArray: true },
184
+ TransferRange: { tag: 342, type: fieldTypes.SHORT, isArray: true },
185
+ JPEGProc: { tag: 512, type: fieldTypes.SHORT },
186
+ JPEGInterchangeFormat: { tag: 513, type: fieldTypes.LONG },
187
+ JPEGInterchangeFormatLngth: { tag: 514, type: fieldTypes.LONG },
188
+ JPEGRestartInterval: { tag: 515, type: fieldTypes.SHORT },
189
+ JPEGLosslessPredictors: { tag: 517, type: fieldTypes.SHORT, isArray: true },
190
+ JPEGPointTransforms: { tag: 518, type: fieldTypes.SHORT, isArray: true },
191
+ JPEGQTables: { tag: 519, type: fieldTypes.LONG, isArray: true },
192
+ JPEGDCTables: { tag: 520, type: fieldTypes.LONG, isArray: true },
193
+ JPEGACTables: { tag: 521, type: fieldTypes.LONG, isArray: true },
194
+ YCbCrCoefficients: { tag: 529, type: fieldTypes.RATIONAL, isArray: true },
195
+ YCbCrSubSampling: { tag: 530, type: fieldTypes.SHORT, isArray: true },
196
+ YCbCrPositioning: { tag: 531, type: fieldTypes.SHORT },
197
+ ReferenceBlackWhite: { tag: 532, type: fieldTypes.LONG, isArray: true },
198
+ Copyright: { tag: 33432, type: fieldTypes.ASCII },
199
+ BadFaxLines: { tag: 326 },
200
+ CleanFaxData: { tag: 327 },
201
+ ClipPath: { tag: 343 },
202
+ ConsecutiveBadFaxLines: { tag: 328 },
203
+ Decode: { tag: 433 },
204
+ DefaultImageColor: { tag: 434 },
205
+ Indexed: { tag: 346 },
206
+ JPEGTables: { tag: 347, isArray: true, eager: true },
207
+ StripRowCounts: { tag: 559, isArray: true },
208
+ SubIFDs: { tag: 330, isArray: true },
209
+ XClipPathUnits: { tag: 344 },
210
+ YClipPathUnits: { tag: 345 },
211
+ ApertureValue: { tag: 37378 },
212
+ ColorSpace: { tag: 40961 },
213
+ DateTimeDigitized: { tag: 36868 },
214
+ DateTimeOriginal: { tag: 36867 },
215
+ ExifIFD: { tag: 34665, name: "Exif IFD", type: fieldTypes.LONG },
216
+ ExifVersion: { tag: 36864 },
217
+ ExposureTime: { tag: 33434 },
218
+ FileSource: { tag: 41728 },
219
+ Flash: { tag: 37385 },
220
+ FlashpixVersion: { tag: 40960 },
221
+ FNumber: { tag: 33437 },
222
+ ImageUniqueID: { tag: 42016 },
223
+ LightSource: { tag: 37384 },
224
+ MakerNote: { tag: 37500 },
225
+ ShutterSpeedValue: { tag: 37377 },
226
+ UserComment: { tag: 37510 },
227
+ IPTC: { tag: 33723 },
228
+ CZ_LSMINFO: { tag: 34412 },
229
+ ICCProfile: { tag: 34675, name: "ICC Profile" },
230
+ XMP: { tag: 700 },
231
+ GDAL_METADATA: { tag: 42112 },
232
+ GDAL_NODATA: { tag: 42113, type: fieldTypes.ASCII, eager: true },
233
+ Photoshop: { tag: 34377 },
234
+ ModelPixelScale: { tag: 33550, type: fieldTypes.DOUBLE, isArray: true, eager: true },
235
+ ModelTiepoint: { tag: 33922, type: fieldTypes.DOUBLE, isArray: true, eager: true },
236
+ ModelTransformation: { tag: 34264, type: fieldTypes.DOUBLE, isArray: true, eager: true },
237
+ GeoKeyDirectory: { tag: 34735, type: fieldTypes.SHORT, isArray: true, eager: true },
238
+ GeoDoubleParams: { tag: 34736, type: fieldTypes.DOUBLE, isArray: true, eager: true },
239
+ GeoAsciiParams: { tag: 34737, type: fieldTypes.ASCII, eager: true },
240
+ LercParameters: { tag: 50674, eager: true }
241
+ }
242
+ );
243
+ var tags = {};
244
+ var tagDefinitions = {};
245
+ function registerTag(tag, name, type, isArray = false, eager = false) {
246
+ tags[name] = tag;
247
+ tagDefinitions[tag] = { tag, name, type: typeof type === "string" ? fieldTypes[type] : type, isArray, eager };
248
+ }
249
+ for (const [key, value] of Object.entries(tagDictionary)) {
250
+ const entry = (
251
+ /** @type {TagDictionaryEntry} */
252
+ value
253
+ );
254
+ registerTag(entry.tag, entry.name || key, entry.type, entry.isArray, entry.eager);
255
+ }
256
+ function resolveTag(tagIdentifier) {
257
+ if (typeof tagIdentifier === "number") {
258
+ return tagIdentifier;
259
+ }
260
+ return tags[tagIdentifier];
261
+ }
262
+ function getTag(tagIdentifier) {
263
+ return tagDefinitions[resolveTag(tagIdentifier)];
264
+ }
265
+ var fieldTagTypes = {
266
+ 256: "SHORT",
267
+ 257: "SHORT",
268
+ 258: "SHORT",
269
+ 259: "SHORT",
270
+ 262: "SHORT",
271
+ 270: "ASCII",
272
+ 271: "ASCII",
273
+ 272: "ASCII",
274
+ 273: "LONG",
275
+ 274: "SHORT",
276
+ 277: "SHORT",
277
+ 278: "LONG",
278
+ 279: "LONG",
279
+ 282: "RATIONAL",
280
+ 283: "RATIONAL",
281
+ 284: "SHORT",
282
+ 286: "SHORT",
283
+ 287: "RATIONAL",
284
+ 296: "SHORT",
285
+ 297: "SHORT",
286
+ 305: "ASCII",
287
+ 306: "ASCII",
288
+ 315: "ASCII",
289
+ 338: "SHORT",
290
+ 339: "SHORT",
291
+ 513: "LONG",
292
+ 514: "LONG",
293
+ 1024: "SHORT",
294
+ 1025: "SHORT",
295
+ 1026: "ASCII",
296
+ 2048: "SHORT",
297
+ 2049: "ASCII",
298
+ 2052: "SHORT",
299
+ 2054: "SHORT",
300
+ 2057: "DOUBLE",
301
+ 2059: "DOUBLE",
302
+ 2060: "SHORT",
303
+ 3072: "SHORT",
304
+ 3073: "ASCII",
305
+ 3076: "SHORT",
306
+ 4096: "SHORT",
307
+ 4097: "ASCII",
308
+ 4099: "SHORT",
309
+ 33432: "ASCII",
310
+ 33550: "DOUBLE",
311
+ 33922: "DOUBLE",
312
+ 34264: "DOUBLE",
313
+ 34665: "LONG",
314
+ 34735: "SHORT",
315
+ 34736: "DOUBLE",
316
+ 34737: "ASCII",
317
+ 42113: "ASCII"
318
+ };
319
+ var photometricInterpretations = {
320
+ WhiteIsZero: 0,
321
+ BlackIsZero: 1,
322
+ RGB: 2,
323
+ Palette: 3,
324
+ TransparencyMask: 4,
325
+ CMYK: 5,
326
+ YCbCr: 6,
327
+ CIELab: 8,
328
+ ICCLab: 9
329
+ };
330
+ var ExtraSamplesValues = {
331
+ Unspecified: 0,
332
+ Assocalpha: 1,
333
+ Unassalpha: 2
334
+ };
335
+ var LercParameters = {
336
+ Version: 0,
337
+ AddCompression: 1
338
+ };
339
+ var LercAddCompression = {
340
+ None: 0,
341
+ Deflate: 1,
342
+ Zstandard: 2
343
+ };
344
+ var geoKeyNames = (
345
+ /** @type {const} */
346
+ {
347
+ 1024: "GTModelTypeGeoKey",
348
+ 1025: "GTRasterTypeGeoKey",
349
+ 1026: "GTCitationGeoKey",
350
+ 2048: "GeographicTypeGeoKey",
351
+ 2049: "GeogCitationGeoKey",
352
+ 2050: "GeogGeodeticDatumGeoKey",
353
+ 2051: "GeogPrimeMeridianGeoKey",
354
+ 2052: "GeogLinearUnitsGeoKey",
355
+ 2053: "GeogLinearUnitSizeGeoKey",
356
+ 2054: "GeogAngularUnitsGeoKey",
357
+ 2055: "GeogAngularUnitSizeGeoKey",
358
+ 2056: "GeogEllipsoidGeoKey",
359
+ 2057: "GeogSemiMajorAxisGeoKey",
360
+ 2058: "GeogSemiMinorAxisGeoKey",
361
+ 2059: "GeogInvFlatteningGeoKey",
362
+ 2060: "GeogAzimuthUnitsGeoKey",
363
+ 2061: "GeogPrimeMeridianLongGeoKey",
364
+ 2062: "GeogTOWGS84GeoKey",
365
+ 3072: "ProjectedCSTypeGeoKey",
366
+ 3073: "PCSCitationGeoKey",
367
+ 3074: "ProjectionGeoKey",
368
+ 3075: "ProjCoordTransGeoKey",
369
+ 3076: "ProjLinearUnitsGeoKey",
370
+ 3077: "ProjLinearUnitSizeGeoKey",
371
+ 3078: "ProjStdParallel1GeoKey",
372
+ 3079: "ProjStdParallel2GeoKey",
373
+ 3080: "ProjNatOriginLongGeoKey",
374
+ 3081: "ProjNatOriginLatGeoKey",
375
+ 3082: "ProjFalseEastingGeoKey",
376
+ 3083: "ProjFalseNorthingGeoKey",
377
+ 3084: "ProjFalseOriginLongGeoKey",
378
+ 3085: "ProjFalseOriginLatGeoKey",
379
+ 3086: "ProjFalseOriginEastingGeoKey",
380
+ 3087: "ProjFalseOriginNorthingGeoKey",
381
+ 3088: "ProjCenterLongGeoKey",
382
+ 3089: "ProjCenterLatGeoKey",
383
+ 3090: "ProjCenterEastingGeoKey",
384
+ 3091: "ProjCenterNorthingGeoKey",
385
+ 3092: "ProjScaleAtNatOriginGeoKey",
386
+ 3093: "ProjScaleAtCenterGeoKey",
387
+ 3094: "ProjAzimuthAngleGeoKey",
388
+ 3095: "ProjStraightVertPoleLongGeoKey",
389
+ 3096: "ProjRectifiedGridAngleGeoKey",
390
+ 4096: "VerticalCSTypeGeoKey",
391
+ 4097: "VerticalCitationGeoKey",
392
+ 4098: "VerticalDatumGeoKey",
393
+ 4099: "VerticalUnitsGeoKey"
394
+ }
395
+ );
396
+ var geoKeys = (
397
+ /** @type {Record<GeoKeyName, number>} */
398
+ {}
399
+ );
400
+ for (const [key, name] of Object.entries(geoKeyNames)) {
401
+ geoKeys[
402
+ /** @type {GeoKeyName} */
403
+ name
404
+ ] = parseInt(key, 10);
405
+ }
406
+
407
+ export {
408
+ fieldTypes,
409
+ getFieldTypeSize,
410
+ tagDefinitions,
411
+ resolveTag,
412
+ photometricInterpretations,
413
+ ExtraSamplesValues,
414
+ LercParameters,
415
+ LercAddCompression,
416
+ geoKeyNames,
417
+ globals_exports
418
+ };
@@ -0,0 +1,17 @@
1
+ import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
2
+ import {
3
+ readBlob
4
+ } from "./chunk-IC3G2XE2.mjs";
5
+
6
+ // ../plugins/pdf/src/probe.ts
7
+ var PDF_HEADER_BYTES = 1024;
8
+ async function probePdf({ file, signal }) {
9
+ const header = new TextDecoder("latin1").decode(
10
+ (await readBlob(file.slice(0, PDF_HEADER_BYTES), signal)).buffer
11
+ );
12
+ return header.includes("%PDF-") ? 4 : 0;
13
+ }
14
+
15
+ export {
16
+ probePdf
17
+ };
@@ -0,0 +1,64 @@
1
+ import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
2
+ import {
3
+ RangeReader,
4
+ readDirectoryLayout
5
+ } from "./chunk-KSKEMJVC.mjs";
6
+ import {
7
+ view
8
+ } from "./chunk-XDW56XVX.mjs";
9
+ import {
10
+ ViewerError
11
+ } from "./chunk-IC3G2XE2.mjs";
12
+
13
+ // ../plugins/archive/src/zip-catalog.ts
14
+ var BOOK_ZIP_LIMITS = {
15
+ entries: 1e4,
16
+ directory: 4 * 1024 * 1024,
17
+ entry: 32 * 1024 * 1024,
18
+ expanded: 2 * 1024 ** 3,
19
+ ratio: 1e3
20
+ };
21
+ function safeBookPath(path) {
22
+ return !!path && !/[\\\x00-\x1f:]/.test(path) && !path.startsWith("/") && !path.split("/").some((part) => part === ".." || part === ".") && path.length <= 2048;
23
+ }
24
+ async function readBookZipCatalog(file, signal) {
25
+ const reader = new RangeReader(file, signal, 5 * 1024 * 1024);
26
+ if (file.size > 2 * 1024 ** 3)
27
+ throw new ViewerError("resource-limit", "ZIP file limit exceeded.");
28
+ const signature = await reader.read(0, 4, "header");
29
+ if (view(signature).getUint32(0, true) !== 67324752)
30
+ throw new ViewerError("invalid-file", "Invalid ZIP signature.");
31
+ const layout = await readDirectoryLayout(reader);
32
+ if (layout.split) throw new ViewerError("invalid-file", "Split ZIP is not supported.");
33
+ if (layout.entryCount > BOOK_ZIP_LIMITS.entries || layout.directoryLength > BOOK_ZIP_LIMITS.directory) {
34
+ throw new ViewerError("resource-limit", "ZIP index limit exceeded.");
35
+ }
36
+ const bytes = await reader.read(layout.directoryOffset, layout.directoryLength, "directory");
37
+ const data = view(bytes);
38
+ const names = /* @__PURE__ */ new Set();
39
+ let offset = 0;
40
+ for (let i = 0; i < layout.entryCount; i++) {
41
+ reader.throwIfAborted();
42
+ if (offset + 46 > bytes.length || data.getUint32(offset, true) !== 33639248)
43
+ throw new ViewerError("invalid-file", "Invalid ZIP directory.");
44
+ const length = data.getUint16(offset + 28, true);
45
+ const end = offset + 46 + length;
46
+ const next = end + data.getUint16(offset + 30, true) + data.getUint16(offset + 32, true);
47
+ if (next > bytes.length) throw new ViewerError("invalid-file", "Truncated ZIP directory.");
48
+ const rawName = bytes.subarray(offset + 46, end);
49
+ const name = data.getUint16(offset + 8, true) & 2048 ? new TextDecoder("utf-8", { fatal: true }).decode(rawName) : Array.from(rawName, (byte) => String.fromCharCode(byte)).join("");
50
+ if (!safeBookPath(name) || names.has(name))
51
+ throw new ViewerError("invalid-file", "Unsafe or duplicate ZIP path.");
52
+ names.add(name);
53
+ offset = next;
54
+ }
55
+ if (offset !== bytes.length)
56
+ throw new ViewerError("invalid-file", "Unexpected ZIP directory data.");
57
+ return { names, layout };
58
+ }
59
+
60
+ export {
61
+ BOOK_ZIP_LIMITS,
62
+ safeBookPath,
63
+ readBookZipCatalog
64
+ };