@archipelagolab/lobi 1.0.0 → 1.0.5

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 (1165) hide show
  1. package/LICENSE +13 -17
  2. package/README.md +136 -0
  3. package/dist/APEv2Parser-6EMKXRZS.js +15 -0
  4. package/dist/APEv2Parser-6EMKXRZS.js.map +7 -0
  5. package/dist/AiffParser-E6XWRTXM.js +194 -0
  6. package/dist/AiffParser-E6XWRTXM.js.map +7 -0
  7. package/dist/AsfParser-WSOH2JQY.js +620 -0
  8. package/dist/AsfParser-WSOH2JQY.js.map +7 -0
  9. package/dist/DsdiffParser-EUWJ4YAR.js +192 -0
  10. package/dist/DsdiffParser-EUWJ4YAR.js.map +7 -0
  11. package/dist/DsfParser-R6TPBJIY.js +114 -0
  12. package/dist/DsfParser-R6TPBJIY.js.map +7 -0
  13. package/dist/FlacParser-VDASGZ3E.js +16 -0
  14. package/dist/FlacParser-VDASGZ3E.js.map +7 -0
  15. package/dist/MP4Parser-64RGJLUM.js +1145 -0
  16. package/dist/MP4Parser-64RGJLUM.js.map +7 -0
  17. package/dist/MatroskaParser-O6RXAKYA.js +662 -0
  18. package/dist/MatroskaParser-O6RXAKYA.js.map +7 -0
  19. package/dist/MpegParser-B6NX6DS3.js +652 -0
  20. package/dist/MpegParser-B6NX6DS3.js.map +7 -0
  21. package/dist/MusepackParser-WUBT63DS.js +331 -0
  22. package/dist/MusepackParser-WUBT63DS.js.map +7 -0
  23. package/dist/OggParser-ZY6E5C2P.js +448 -0
  24. package/dist/OggParser-ZY6E5C2P.js.map +7 -0
  25. package/dist/WavPackParser-5KTCSQEU.js +209 -0
  26. package/dist/WavPackParser-5KTCSQEU.js.map +7 -0
  27. package/dist/WaveParser-RZSHVQPZ.js +300 -0
  28. package/dist/WaveParser-RZSHVQPZ.js.map +7 -0
  29. package/dist/auth-presence.js +46 -0
  30. package/dist/auth-presence.js.map +7 -0
  31. package/dist/channel-plugin-api.js +79 -0
  32. package/dist/channel-plugin-api.js.map +7 -0
  33. package/dist/chunk-22WAAZ6I.js +114 -0
  34. package/dist/chunk-22WAAZ6I.js.map +7 -0
  35. package/dist/chunk-2A6HEFSO.js +676 -0
  36. package/dist/chunk-2A6HEFSO.js.map +7 -0
  37. package/dist/chunk-2KGHUHKU.js +169 -0
  38. package/dist/chunk-2KGHUHKU.js.map +7 -0
  39. package/dist/chunk-2NEQI4K6.js +171 -0
  40. package/dist/chunk-2NEQI4K6.js.map +7 -0
  41. package/dist/chunk-2OSJ3MTW.js +175 -0
  42. package/dist/chunk-2OSJ3MTW.js.map +7 -0
  43. package/dist/chunk-2Q626TDO.js +27 -0
  44. package/dist/chunk-2Q626TDO.js.map +7 -0
  45. package/dist/chunk-2U6OZ7N2.js +155 -0
  46. package/dist/chunk-2U6OZ7N2.js.map +7 -0
  47. package/dist/chunk-2Z4IOUDZ.js +129 -0
  48. package/dist/chunk-2Z4IOUDZ.js.map +7 -0
  49. package/dist/chunk-2ZEPAW7U.js +154 -0
  50. package/dist/chunk-2ZEPAW7U.js.map +7 -0
  51. package/dist/chunk-2ZI6JK5O.js +63 -0
  52. package/dist/chunk-2ZI6JK5O.js.map +7 -0
  53. package/dist/chunk-34UY6D6X.js +36 -0
  54. package/dist/chunk-34UY6D6X.js.map +7 -0
  55. package/dist/chunk-3JD6JSJD.js +111 -0
  56. package/dist/chunk-3JD6JSJD.js.map +7 -0
  57. package/dist/chunk-3TOEIHG5.js +314 -0
  58. package/dist/chunk-3TOEIHG5.js.map +7 -0
  59. package/dist/chunk-3TRKKAVT.js +130 -0
  60. package/dist/chunk-3TRKKAVT.js.map +7 -0
  61. package/dist/chunk-3UFTTK7C.js +418 -0
  62. package/dist/chunk-3UFTTK7C.js.map +7 -0
  63. package/dist/chunk-3XO6AAIC.js +25 -0
  64. package/dist/chunk-3XO6AAIC.js.map +7 -0
  65. package/dist/chunk-427SAQME.js +321 -0
  66. package/dist/chunk-427SAQME.js.map +7 -0
  67. package/dist/chunk-4JVNTZAI.js +80 -0
  68. package/dist/chunk-4JVNTZAI.js.map +7 -0
  69. package/dist/chunk-4O3BEYYM.js +187 -0
  70. package/dist/chunk-4O3BEYYM.js.map +7 -0
  71. package/dist/chunk-4Z2N4GW6.js +247 -0
  72. package/dist/chunk-4Z2N4GW6.js.map +7 -0
  73. package/dist/chunk-56HN4SH6.js +46 -0
  74. package/dist/chunk-56HN4SH6.js.map +7 -0
  75. package/dist/chunk-5APBBTGW.js +7 -0
  76. package/dist/chunk-5APBBTGW.js.map +7 -0
  77. package/dist/chunk-5LNGMBWW.js +93 -0
  78. package/dist/chunk-5LNGMBWW.js.map +7 -0
  79. package/dist/chunk-5XFQSYZ4.js +52 -0
  80. package/dist/chunk-5XFQSYZ4.js.map +7 -0
  81. package/dist/chunk-62N5N4AC.js +241 -0
  82. package/dist/chunk-62N5N4AC.js.map +7 -0
  83. package/dist/chunk-6HX3DEXK.js +178 -0
  84. package/dist/chunk-6HX3DEXK.js.map +7 -0
  85. package/dist/chunk-6NO5VEVV.js +18 -0
  86. package/dist/chunk-6NO5VEVV.js.map +7 -0
  87. package/dist/chunk-6PZGDVLR.js +465 -0
  88. package/dist/chunk-6PZGDVLR.js.map +7 -0
  89. package/dist/chunk-6SOGH3TW.js +163 -0
  90. package/dist/chunk-6SOGH3TW.js.map +7 -0
  91. package/dist/chunk-72TGY3LX.js +104 -0
  92. package/dist/chunk-72TGY3LX.js.map +7 -0
  93. package/dist/chunk-76IE55K7.js +392 -0
  94. package/dist/chunk-76IE55K7.js.map +7 -0
  95. package/dist/chunk-7F3242AO.js +86 -0
  96. package/dist/chunk-7F3242AO.js.map +7 -0
  97. package/dist/chunk-7FLQSTPG.js +57 -0
  98. package/dist/chunk-7FLQSTPG.js.map +7 -0
  99. package/dist/chunk-7MP46JBP.js +177 -0
  100. package/dist/chunk-7MP46JBP.js.map +7 -0
  101. package/dist/chunk-7MVZYR2T.js +87 -0
  102. package/dist/chunk-7MVZYR2T.js.map +7 -0
  103. package/dist/chunk-7N7ISMPG.js +50 -0
  104. package/dist/chunk-7N7ISMPG.js.map +7 -0
  105. package/dist/chunk-7S7LQQPX.js +127 -0
  106. package/dist/chunk-7S7LQQPX.js.map +7 -0
  107. package/dist/chunk-7TTNY5FK.js +21 -0
  108. package/dist/chunk-7TTNY5FK.js.map +7 -0
  109. package/dist/chunk-7W73QCTR.js +244 -0
  110. package/dist/chunk-7W73QCTR.js.map +7 -0
  111. package/dist/chunk-7XXLU33Y.js +76 -0
  112. package/dist/chunk-7XXLU33Y.js.map +7 -0
  113. package/dist/chunk-AAO7BQEV.js +258 -0
  114. package/dist/chunk-AAO7BQEV.js.map +7 -0
  115. package/dist/chunk-AH4MLRYT.js +91 -0
  116. package/dist/chunk-AH4MLRYT.js.map +7 -0
  117. package/dist/chunk-AHKR32FH.js +7 -0
  118. package/dist/chunk-AHKR32FH.js.map +7 -0
  119. package/dist/chunk-ALKRFDAW.js +94 -0
  120. package/dist/chunk-ALKRFDAW.js.map +7 -0
  121. package/dist/chunk-AQQGAE7N.js +12 -0
  122. package/dist/chunk-AQQGAE7N.js.map +7 -0
  123. package/dist/chunk-AWW3YUGJ.js +193 -0
  124. package/dist/chunk-AWW3YUGJ.js.map +7 -0
  125. package/dist/chunk-AX7VEEWJ.js +158 -0
  126. package/dist/chunk-AX7VEEWJ.js.map +7 -0
  127. package/dist/chunk-BAX7Q6GR.js +55 -0
  128. package/dist/chunk-BAX7Q6GR.js.map +7 -0
  129. package/dist/chunk-BBM6BR3Z.js +28 -0
  130. package/dist/chunk-BBM6BR3Z.js.map +7 -0
  131. package/dist/chunk-BHXZMHSX.js +109 -0
  132. package/dist/chunk-BHXZMHSX.js.map +7 -0
  133. package/dist/chunk-BIUXDLVY.js +62 -0
  134. package/dist/chunk-BIUXDLVY.js.map +7 -0
  135. package/dist/chunk-BMFZL2P4.js +97 -0
  136. package/dist/chunk-BMFZL2P4.js.map +7 -0
  137. package/dist/chunk-BQXEXK4H.js +114 -0
  138. package/dist/chunk-BQXEXK4H.js.map +7 -0
  139. package/dist/chunk-BU2CTWBG.js +30 -0
  140. package/dist/chunk-BU2CTWBG.js.map +7 -0
  141. package/dist/chunk-BVKSCLF7.js +195 -0
  142. package/dist/chunk-BVKSCLF7.js.map +7 -0
  143. package/dist/chunk-BWA3D22L.js +88 -0
  144. package/dist/chunk-BWA3D22L.js.map +7 -0
  145. package/dist/chunk-CE24RSPL.js +506 -0
  146. package/dist/chunk-CE24RSPL.js.map +7 -0
  147. package/dist/chunk-CETZGSCP.js +71 -0
  148. package/dist/chunk-CETZGSCP.js.map +7 -0
  149. package/dist/chunk-CGBWMONK.js +412 -0
  150. package/dist/chunk-CGBWMONK.js.map +7 -0
  151. package/dist/chunk-CPNIXMGX.js +127 -0
  152. package/dist/chunk-CPNIXMGX.js.map +7 -0
  153. package/dist/chunk-CSJO73LD.js +84 -0
  154. package/dist/chunk-CSJO73LD.js.map +7 -0
  155. package/dist/chunk-CTKBDSL6.js +81 -0
  156. package/dist/chunk-CTKBDSL6.js.map +7 -0
  157. package/dist/chunk-CY6WHUCW.js +54 -0
  158. package/dist/chunk-CY6WHUCW.js.map +7 -0
  159. package/dist/chunk-D7Q6Z74D.js +123 -0
  160. package/dist/chunk-D7Q6Z74D.js.map +7 -0
  161. package/dist/chunk-DZIM4OWK.js +17 -0
  162. package/dist/chunk-DZIM4OWK.js.map +7 -0
  163. package/dist/chunk-E3GC4V5V.js +30 -0
  164. package/dist/chunk-E3GC4V5V.js.map +7 -0
  165. package/dist/chunk-E5HPDHCW.js +34 -0
  166. package/dist/chunk-E5HPDHCW.js.map +7 -0
  167. package/dist/chunk-E75BJJZ2.js +635 -0
  168. package/dist/chunk-E75BJJZ2.js.map +7 -0
  169. package/dist/chunk-EE4DHUUZ.js +472 -0
  170. package/dist/chunk-EE4DHUUZ.js.map +7 -0
  171. package/dist/chunk-EHELTAAD.js +198 -0
  172. package/dist/chunk-EHELTAAD.js.map +7 -0
  173. package/dist/chunk-EKXPSI7Z.js +135 -0
  174. package/dist/chunk-EKXPSI7Z.js.map +7 -0
  175. package/dist/chunk-ERCH75SH.js +292 -0
  176. package/dist/chunk-ERCH75SH.js.map +7 -0
  177. package/dist/chunk-EVFWZGFL.js +235 -0
  178. package/dist/chunk-EVFWZGFL.js.map +7 -0
  179. package/dist/chunk-EVPBRKMZ.js +45 -0
  180. package/dist/chunk-EVPBRKMZ.js.map +7 -0
  181. package/dist/chunk-F6AFJHWV.js +45 -0
  182. package/dist/chunk-F6AFJHWV.js.map +7 -0
  183. package/dist/chunk-FG4NVFKM.js +455 -0
  184. package/dist/chunk-FG4NVFKM.js.map +7 -0
  185. package/dist/chunk-FHNEN6IR.js +14 -0
  186. package/dist/chunk-FHNEN6IR.js.map +7 -0
  187. package/dist/chunk-FQ4R7IOX.js +32 -0
  188. package/dist/chunk-FQ4R7IOX.js.map +7 -0
  189. package/dist/chunk-FQPYAPJJ.js +124 -0
  190. package/dist/chunk-FQPYAPJJ.js.map +7 -0
  191. package/dist/chunk-FQTLJO4W.js +335 -0
  192. package/dist/chunk-FQTLJO4W.js.map +7 -0
  193. package/dist/chunk-FVLJSB2W.js +124 -0
  194. package/dist/chunk-FVLJSB2W.js.map +7 -0
  195. package/dist/chunk-FYRKBNTI.js +18 -0
  196. package/dist/chunk-FYRKBNTI.js.map +7 -0
  197. package/dist/chunk-GD6L3SLC.js +30 -0
  198. package/dist/chunk-GD6L3SLC.js.map +7 -0
  199. package/dist/chunk-GI2ZANRY.js +24 -0
  200. package/dist/chunk-GI2ZANRY.js.map +7 -0
  201. package/dist/chunk-GK3XVKXT.js +737 -0
  202. package/dist/chunk-GK3XVKXT.js.map +7 -0
  203. package/dist/chunk-GKOWCDQV.js +699 -0
  204. package/dist/chunk-GKOWCDQV.js.map +7 -0
  205. package/dist/chunk-GLLRCKKE.js +26 -0
  206. package/dist/chunk-GLLRCKKE.js.map +7 -0
  207. package/dist/chunk-GNYG6I36.js +175 -0
  208. package/dist/chunk-GNYG6I36.js.map +7 -0
  209. package/dist/chunk-GVYGUH2V.js +7 -0
  210. package/dist/chunk-GVYGUH2V.js.map +7 -0
  211. package/dist/chunk-GZAGAWSU.js +28 -0
  212. package/dist/chunk-GZAGAWSU.js.map +7 -0
  213. package/dist/chunk-H23E72SB.js +163 -0
  214. package/dist/chunk-H23E72SB.js.map +7 -0
  215. package/dist/chunk-H6YVV7GE.js +22 -0
  216. package/dist/chunk-H6YVV7GE.js.map +7 -0
  217. package/dist/chunk-HDPICD3P.js +4890 -0
  218. package/dist/chunk-HDPICD3P.js.map +7 -0
  219. package/dist/chunk-HP5HMWOM.js +123 -0
  220. package/dist/chunk-HP5HMWOM.js.map +7 -0
  221. package/dist/chunk-HQSHS6IB.js +88 -0
  222. package/dist/chunk-HQSHS6IB.js.map +7 -0
  223. package/dist/chunk-HTV3R73W.js +51 -0
  224. package/dist/chunk-HTV3R73W.js.map +7 -0
  225. package/dist/chunk-IJCMYMZB.js +239 -0
  226. package/dist/chunk-IJCMYMZB.js.map +7 -0
  227. package/dist/chunk-INNENDEE.js +472 -0
  228. package/dist/chunk-INNENDEE.js.map +7 -0
  229. package/dist/chunk-IOTLSMEQ.js +177 -0
  230. package/dist/chunk-IOTLSMEQ.js.map +7 -0
  231. package/dist/chunk-IQYYEHSM.js +300 -0
  232. package/dist/chunk-IQYYEHSM.js.map +7 -0
  233. package/dist/chunk-IRA5NJ4Q.js +21 -0
  234. package/dist/chunk-IRA5NJ4Q.js.map +7 -0
  235. package/dist/chunk-IU7EXXK7.js +1662 -0
  236. package/dist/chunk-IU7EXXK7.js.map +7 -0
  237. package/dist/chunk-IUXAKDAY.js +102 -0
  238. package/dist/chunk-IUXAKDAY.js.map +7 -0
  239. package/dist/chunk-JMYIFYY5.js +233 -0
  240. package/dist/chunk-JMYIFYY5.js.map +7 -0
  241. package/dist/chunk-JSZBX2TA.js +5853 -0
  242. package/dist/chunk-JSZBX2TA.js.map +7 -0
  243. package/dist/chunk-KHFWQ334.js +138 -0
  244. package/dist/chunk-KHFWQ334.js.map +7 -0
  245. package/dist/chunk-KJW6JLM6.js +95 -0
  246. package/dist/chunk-KJW6JLM6.js.map +7 -0
  247. package/dist/chunk-KSEANSJE.js +40 -0
  248. package/dist/chunk-KSEANSJE.js.map +7 -0
  249. package/dist/chunk-KVU54E6W.js +63 -0
  250. package/dist/chunk-KVU54E6W.js.map +7 -0
  251. package/dist/chunk-L5OUVMHK.js +174 -0
  252. package/dist/chunk-L5OUVMHK.js.map +7 -0
  253. package/dist/chunk-LIVQ7GIO.js +86 -0
  254. package/dist/chunk-LIVQ7GIO.js.map +7 -0
  255. package/dist/chunk-LO4F6E3N.js +163 -0
  256. package/dist/chunk-LO4F6E3N.js.map +7 -0
  257. package/dist/chunk-LSVKDUNM.js +151 -0
  258. package/dist/chunk-LSVKDUNM.js.map +7 -0
  259. package/dist/chunk-LVMK2GPM.js +18 -0
  260. package/dist/chunk-LVMK2GPM.js.map +7 -0
  261. package/dist/chunk-LXVPETLK.js +1405 -0
  262. package/dist/chunk-LXVPETLK.js.map +7 -0
  263. package/dist/chunk-LZNW24OB.js +78 -0
  264. package/dist/chunk-LZNW24OB.js.map +7 -0
  265. package/dist/chunk-MAF6PSCJ.js +44 -0
  266. package/dist/chunk-MAF6PSCJ.js.map +7 -0
  267. package/dist/chunk-MBIX6Z7U.js +80 -0
  268. package/dist/chunk-MBIX6Z7U.js.map +7 -0
  269. package/dist/chunk-MDLLXMC3.js +183 -0
  270. package/dist/chunk-MDLLXMC3.js.map +7 -0
  271. package/dist/chunk-MEI5HTWV.js +127 -0
  272. package/dist/chunk-MEI5HTWV.js.map +7 -0
  273. package/dist/chunk-MH74AJ3A.js +82 -0
  274. package/dist/chunk-MH74AJ3A.js.map +7 -0
  275. package/dist/chunk-MIFIM4PI.js +163 -0
  276. package/dist/chunk-MIFIM4PI.js.map +7 -0
  277. package/dist/chunk-MISZB5QJ.js +22 -0
  278. package/dist/chunk-MISZB5QJ.js.map +7 -0
  279. package/dist/chunk-MJ27XQYG.js +125 -0
  280. package/dist/chunk-MJ27XQYG.js.map +7 -0
  281. package/dist/chunk-MLQY5SKR.js +52 -0
  282. package/dist/chunk-MLQY5SKR.js.map +7 -0
  283. package/dist/chunk-MTMHGC3G.js +39 -0
  284. package/dist/chunk-MTMHGC3G.js.map +7 -0
  285. package/dist/chunk-MWBAW3YV.js +244 -0
  286. package/dist/chunk-MWBAW3YV.js.map +7 -0
  287. package/dist/chunk-MZGGB2YT.js +50 -0
  288. package/dist/chunk-MZGGB2YT.js.map +7 -0
  289. package/dist/chunk-N5SNGZJV.js +217 -0
  290. package/dist/chunk-N5SNGZJV.js.map +7 -0
  291. package/dist/chunk-NGCTBYQ3.js +181 -0
  292. package/dist/chunk-NGCTBYQ3.js.map +7 -0
  293. package/dist/chunk-NMUX7SGU.js +676 -0
  294. package/dist/chunk-NMUX7SGU.js.map +7 -0
  295. package/dist/chunk-NO7GMLNU.js +292 -0
  296. package/dist/chunk-NO7GMLNU.js.map +7 -0
  297. package/dist/chunk-NTOGVX2Y.js +92 -0
  298. package/dist/chunk-NTOGVX2Y.js.map +7 -0
  299. package/dist/chunk-O5IVKDX7.js +30 -0
  300. package/dist/chunk-O5IVKDX7.js.map +7 -0
  301. package/dist/chunk-OFWMLQMU.js +7287 -0
  302. package/dist/chunk-OFWMLQMU.js.map +7 -0
  303. package/dist/chunk-OJ3ZUKBI.js +73 -0
  304. package/dist/chunk-OJ3ZUKBI.js.map +7 -0
  305. package/dist/chunk-OJTHE4B7.js +50 -0
  306. package/dist/chunk-OJTHE4B7.js.map +7 -0
  307. package/dist/chunk-OOYPYBTA.js +446 -0
  308. package/dist/chunk-OOYPYBTA.js.map +7 -0
  309. package/dist/chunk-OQP4W4AR.js +105 -0
  310. package/dist/chunk-OQP4W4AR.js.map +7 -0
  311. package/dist/chunk-OVTT2EKA.js +516 -0
  312. package/dist/chunk-OVTT2EKA.js.map +7 -0
  313. package/dist/chunk-P5N63LBS.js +94 -0
  314. package/dist/chunk-P5N63LBS.js.map +7 -0
  315. package/dist/chunk-PARITZ7F.js +28 -0
  316. package/dist/chunk-PARITZ7F.js.map +7 -0
  317. package/dist/chunk-PBQK4KY4.js +195 -0
  318. package/dist/chunk-PBQK4KY4.js.map +7 -0
  319. package/dist/chunk-PSL2AHIA.js +27 -0
  320. package/dist/chunk-PSL2AHIA.js.map +7 -0
  321. package/dist/chunk-Q5QT7JBM.js +92 -0
  322. package/dist/chunk-Q5QT7JBM.js.map +7 -0
  323. package/dist/chunk-Q7WA5DCR.js +62 -0
  324. package/dist/chunk-Q7WA5DCR.js.map +7 -0
  325. package/dist/chunk-QATEENP2.js +7 -0
  326. package/dist/chunk-QATEENP2.js.map +7 -0
  327. package/dist/chunk-QDT24CIA.js +485 -0
  328. package/dist/chunk-QDT24CIA.js.map +7 -0
  329. package/dist/chunk-QI3NB7D5.js +455 -0
  330. package/dist/chunk-QI3NB7D5.js.map +7 -0
  331. package/dist/chunk-QIDAVXSX.js +106 -0
  332. package/dist/chunk-QIDAVXSX.js.map +7 -0
  333. package/dist/chunk-QKIGQVP2.js +104 -0
  334. package/dist/chunk-QKIGQVP2.js.map +7 -0
  335. package/dist/chunk-QNJENPK2.js +81 -0
  336. package/dist/chunk-QNJENPK2.js.map +7 -0
  337. package/dist/chunk-REVXXWAS.js +31 -0
  338. package/dist/chunk-REVXXWAS.js.map +7 -0
  339. package/dist/chunk-RFH4HRZP.js +94 -0
  340. package/dist/chunk-RFH4HRZP.js.map +7 -0
  341. package/dist/chunk-RNGAGYCL.js +49 -0
  342. package/dist/chunk-RNGAGYCL.js.map +7 -0
  343. package/dist/chunk-RPCVN3JA.js +261 -0
  344. package/dist/chunk-RPCVN3JA.js.map +7 -0
  345. package/dist/chunk-RQQE5DDT.js +193 -0
  346. package/dist/chunk-RQQE5DDT.js.map +7 -0
  347. package/dist/chunk-RVOD3ESA.js +38 -0
  348. package/dist/chunk-RVOD3ESA.js.map +7 -0
  349. package/dist/chunk-SAOUP24A.js +70 -0
  350. package/dist/chunk-SAOUP24A.js.map +7 -0
  351. package/dist/chunk-SFZL2TCV.js +55 -0
  352. package/dist/chunk-SFZL2TCV.js.map +7 -0
  353. package/dist/chunk-SJPFUXBV.js +45 -0
  354. package/dist/chunk-SJPFUXBV.js.map +7 -0
  355. package/dist/chunk-SLIUQWAR.js +58 -0
  356. package/dist/chunk-SLIUQWAR.js.map +7 -0
  357. package/dist/chunk-SSEX66OL.js +39 -0
  358. package/dist/chunk-SSEX66OL.js.map +7 -0
  359. package/dist/chunk-SX2LOHOX.js +251 -0
  360. package/dist/chunk-SX2LOHOX.js.map +7 -0
  361. package/dist/chunk-T72EMFTX.js +74 -0
  362. package/dist/chunk-T72EMFTX.js.map +7 -0
  363. package/dist/chunk-TA2QJPPG.js +169 -0
  364. package/dist/chunk-TA2QJPPG.js.map +7 -0
  365. package/dist/chunk-TFEETDNY.js +78 -0
  366. package/dist/chunk-TFEETDNY.js.map +7 -0
  367. package/dist/chunk-THM2QV25.js +108 -0
  368. package/dist/chunk-THM2QV25.js.map +7 -0
  369. package/dist/chunk-TRWT2N6Z.js +15 -0
  370. package/dist/chunk-TRWT2N6Z.js.map +7 -0
  371. package/dist/chunk-TTXEM54Y.js +76 -0
  372. package/dist/chunk-TTXEM54Y.js.map +7 -0
  373. package/dist/chunk-U4LVIY5F.js +1405 -0
  374. package/dist/chunk-U4LVIY5F.js.map +7 -0
  375. package/dist/chunk-U767LCSG.js +78 -0
  376. package/dist/chunk-U767LCSG.js.map +7 -0
  377. package/dist/chunk-U7GKLHU6.js +120 -0
  378. package/dist/chunk-U7GKLHU6.js.map +7 -0
  379. package/dist/chunk-UAB5P5QO.js +60 -0
  380. package/dist/chunk-UAB5P5QO.js.map +7 -0
  381. package/dist/chunk-UEHPJQBL.js +38 -0
  382. package/dist/chunk-UEHPJQBL.js.map +7 -0
  383. package/dist/chunk-UIBV6IGR.js +31 -0
  384. package/dist/chunk-UIBV6IGR.js.map +7 -0
  385. package/dist/chunk-UIYFRUET.js +16352 -0
  386. package/dist/chunk-UIYFRUET.js.map +7 -0
  387. package/dist/chunk-UJS3TIVS.js +52 -0
  388. package/dist/chunk-UJS3TIVS.js.map +7 -0
  389. package/dist/chunk-UU5PSBSI.js +176 -0
  390. package/dist/chunk-UU5PSBSI.js.map +7 -0
  391. package/dist/chunk-UV63XYFU.js +173 -0
  392. package/dist/chunk-UV63XYFU.js.map +7 -0
  393. package/dist/chunk-UWPHOAOC.js +29 -0
  394. package/dist/chunk-UWPHOAOC.js.map +7 -0
  395. package/dist/chunk-UXDDOSJC.js +52 -0
  396. package/dist/chunk-UXDDOSJC.js.map +7 -0
  397. package/dist/chunk-V3VAOMCO.js +465 -0
  398. package/dist/chunk-V3VAOMCO.js.map +7 -0
  399. package/dist/chunk-VA7ENH2S.js +38 -0
  400. package/dist/chunk-VA7ENH2S.js.map +7 -0
  401. package/dist/chunk-VFPDFLVE.js +516 -0
  402. package/dist/chunk-VFPDFLVE.js.map +7 -0
  403. package/dist/chunk-VHG4FNIJ.js +93 -0
  404. package/dist/chunk-VHG4FNIJ.js.map +7 -0
  405. package/dist/chunk-VKOO6MIZ.js +51 -0
  406. package/dist/chunk-VKOO6MIZ.js.map +7 -0
  407. package/dist/chunk-VKXKRZG7.js +62 -0
  408. package/dist/chunk-VKXKRZG7.js.map +7 -0
  409. package/dist/chunk-VUOLPEUZ.js +7 -0
  410. package/dist/chunk-VUOLPEUZ.js.map +7 -0
  411. package/dist/chunk-W6SOBS7M.js +138 -0
  412. package/dist/chunk-W6SOBS7M.js.map +7 -0
  413. package/dist/chunk-WDOKKRTE.js +7 -0
  414. package/dist/chunk-WDOKKRTE.js.map +7 -0
  415. package/dist/chunk-WGXXKFN5.js +7 -0
  416. package/dist/chunk-WGXXKFN5.js.map +7 -0
  417. package/dist/chunk-WHPUUP3J.js +25 -0
  418. package/dist/chunk-WHPUUP3J.js.map +7 -0
  419. package/dist/chunk-XF7LD6VV.js +122 -0
  420. package/dist/chunk-XF7LD6VV.js.map +7 -0
  421. package/dist/chunk-XFTXM3RE.js +64 -0
  422. package/dist/chunk-XFTXM3RE.js.map +7 -0
  423. package/dist/chunk-XJABPO2T.js +235 -0
  424. package/dist/chunk-XJABPO2T.js.map +7 -0
  425. package/dist/chunk-XK6VF3H7.js +3586 -0
  426. package/dist/chunk-XK6VF3H7.js.map +7 -0
  427. package/dist/chunk-XQYIIPOJ.js +266 -0
  428. package/dist/chunk-XQYIIPOJ.js.map +7 -0
  429. package/dist/chunk-XZSAN55E.js +58 -0
  430. package/dist/chunk-XZSAN55E.js.map +7 -0
  431. package/dist/chunk-Y3KJR4OG.js +64 -0
  432. package/dist/chunk-Y3KJR4OG.js.map +7 -0
  433. package/dist/chunk-Y4JKH7FF.js +45 -0
  434. package/dist/chunk-Y4JKH7FF.js.map +7 -0
  435. package/dist/chunk-Y6CJN4ID.js +31 -0
  436. package/dist/chunk-Y6CJN4ID.js.map +7 -0
  437. package/dist/chunk-YABGJU5M.js +271 -0
  438. package/dist/chunk-YABGJU5M.js.map +7 -0
  439. package/dist/chunk-YEJH7ZC2.js +34 -0
  440. package/dist/chunk-YEJH7ZC2.js.map +7 -0
  441. package/dist/chunk-YFTE4H54.js +44117 -0
  442. package/dist/chunk-YFTE4H54.js.map +7 -0
  443. package/dist/chunk-YNJYMD43.js +392 -0
  444. package/dist/chunk-YNJYMD43.js.map +7 -0
  445. package/dist/chunk-YNYEQGVN.js +251 -0
  446. package/dist/chunk-YNYEQGVN.js.map +7 -0
  447. package/dist/chunk-YUPBD27Z.js +70 -0
  448. package/dist/chunk-YUPBD27Z.js.map +7 -0
  449. package/dist/chunk-YXJ52FD5.js +271 -0
  450. package/dist/chunk-YXJ52FD5.js.map +7 -0
  451. package/dist/chunk-YZGORRQN.js +3101 -0
  452. package/dist/chunk-YZGORRQN.js.map +7 -0
  453. package/dist/chunk-Z6IVJ6ZW.js +30 -0
  454. package/dist/chunk-Z6IVJ6ZW.js.map +7 -0
  455. package/dist/chunk-ZFC44XJJ.js +86 -0
  456. package/dist/chunk-ZFC44XJJ.js.map +7 -0
  457. package/dist/chunk-ZJDJC5TP.js +82 -0
  458. package/dist/chunk-ZJDJC5TP.js.map +7 -0
  459. package/dist/chunk-ZJGZNPDK.js +171 -0
  460. package/dist/chunk-ZJGZNPDK.js.map +7 -0
  461. package/dist/chunk-ZJHBJWZX.js +699 -0
  462. package/dist/chunk-ZJHBJWZX.js.map +7 -0
  463. package/dist/chunk-ZNOTD65D.js +95 -0
  464. package/dist/chunk-ZNOTD65D.js.map +7 -0
  465. package/dist/chunk-ZQ2QIFXW.js +122 -0
  466. package/dist/chunk-ZQ2QIFXW.js.map +7 -0
  467. package/dist/chunk-ZRMXPQGY.js +241 -0
  468. package/dist/chunk-ZRMXPQGY.js.map +7 -0
  469. package/dist/chunk-ZVEE5IDC.js +3101 -0
  470. package/dist/chunk-ZVEE5IDC.js.map +7 -0
  471. package/dist/cli-metadata.js +12 -0
  472. package/dist/cli-metadata.js.map +7 -0
  473. package/dist/contract-api.js +104 -0
  474. package/dist/contract-api.js.map +7 -0
  475. package/dist/dist-F3K7S5SS.js +549 -0
  476. package/dist/dist-F3K7S5SS.js.map +7 -0
  477. package/dist/helper-api.js +51 -0
  478. package/dist/helper-api.js.map +7 -0
  479. package/dist/index.js +71 -0
  480. package/dist/index.js.map +7 -0
  481. package/dist/magic-string.es-V5NOGTUV.js +1315 -0
  482. package/dist/magic-string.es-V5NOGTUV.js.map +7 -0
  483. package/dist/openclaw.plugin.json +23 -0
  484. package/dist/package.json +59 -0
  485. package/dist/plugin-entry.handlers.runtime-POD4CSHM.js +20 -0
  486. package/dist/plugin-entry.handlers.runtime-POD4CSHM.js.map +7 -0
  487. package/dist/plugin-entry.handlers.runtime-YOSG6V6U.js +20 -0
  488. package/dist/plugin-entry.handlers.runtime-YOSG6V6U.js.map +7 -0
  489. package/dist/runtime-api.js +104 -0
  490. package/dist/runtime-api.js.map +7 -0
  491. package/dist/rust-crypto-H35BXWUU.js +5323 -0
  492. package/dist/rust-crypto-H35BXWUU.js.map +7 -0
  493. package/dist/secret-contract-api.js +18 -0
  494. package/dist/secret-contract-api.js.map +7 -0
  495. package/dist/setup-entry.js +23 -0
  496. package/dist/setup-entry.js.map +7 -0
  497. package/dist/src/account-selection.js +19 -0
  498. package/dist/src/account-selection.js.map +7 -0
  499. package/dist/src/actions.js +24 -0
  500. package/dist/src/actions.js.map +7 -0
  501. package/dist/src/approval-auth.js +27 -0
  502. package/dist/src/approval-auth.js.map +7 -0
  503. package/dist/src/approval-handler.runtime.js +378 -0
  504. package/dist/src/approval-handler.runtime.js.map +7 -0
  505. package/dist/src/approval-ids.js +9 -0
  506. package/dist/src/approval-ids.js.map +7 -0
  507. package/dist/src/approval-native.js +28 -0
  508. package/dist/src/approval-native.js.map +7 -0
  509. package/dist/src/approval-reactions.js +20 -0
  510. package/dist/src/approval-reactions.js.map +7 -0
  511. package/dist/src/auth-precedence.js +8 -0
  512. package/dist/src/auth-precedence.js.map +7 -0
  513. package/dist/src/channel-account-paths.js +11 -0
  514. package/dist/src/channel-account-paths.js.map +7 -0
  515. package/dist/src/channel.js +74 -0
  516. package/dist/src/channel.js.map +7 -0
  517. package/dist/src/channel.runtime.js +82 -0
  518. package/dist/src/channel.runtime.js.map +7 -0
  519. package/dist/src/cli-metadata.js +8 -0
  520. package/dist/src/cli-metadata.js.map +7 -0
  521. package/dist/src/cli.js +936 -0
  522. package/dist/src/cli.js.map +7 -0
  523. package/dist/src/config-adapter.js +26 -0
  524. package/dist/src/config-adapter.js.map +7 -0
  525. package/dist/src/config-schema.js +8 -0
  526. package/dist/src/config-schema.js.map +7 -0
  527. package/dist/src/directory-live.js +35 -0
  528. package/dist/src/directory-live.js.map +7 -0
  529. package/dist/src/doctor-contract.js +11 -0
  530. package/dist/src/doctor-contract.js.map +7 -0
  531. package/dist/src/doctor.js +42 -0
  532. package/dist/src/doctor.js.map +7 -0
  533. package/dist/src/env-vars.js +12 -0
  534. package/dist/src/env-vars.js.map +7 -0
  535. package/dist/src/exec-approval-resolver.js +10 -0
  536. package/dist/src/exec-approval-resolver.js.map +7 -0
  537. package/dist/src/exec-approvals.js +51 -0
  538. package/dist/src/exec-approvals.js.map +7 -0
  539. package/dist/src/group-mentions.js +28 -0
  540. package/dist/src/group-mentions.js.map +7 -0
  541. package/dist/src/legacy-crypto-inspector-availability.js +8 -0
  542. package/dist/src/legacy-crypto-inspector-availability.js.map +7 -0
  543. package/dist/src/legacy-crypto.js +26 -0
  544. package/dist/src/legacy-crypto.js.map +7 -0
  545. package/dist/src/legacy-state.js +24 -0
  546. package/dist/src/legacy-state.js.map +7 -0
  547. package/dist/src/matrix/account-config.js +16 -0
  548. package/dist/src/matrix/account-config.js.map +7 -0
  549. package/dist/src/matrix/accounts.js +31 -0
  550. package/dist/src/matrix/accounts.js.map +7 -0
  551. package/dist/src/matrix/actions/client.js +40 -0
  552. package/dist/src/matrix/actions/client.js.map +7 -0
  553. package/dist/src/matrix/actions/devices.js +42 -0
  554. package/dist/src/matrix/actions/devices.js.map +7 -0
  555. package/dist/src/matrix/actions/limits.js +8 -0
  556. package/dist/src/matrix/actions/limits.js.map +7 -0
  557. package/dist/src/matrix/actions/messages.js +49 -0
  558. package/dist/src/matrix/actions/messages.js.map +7 -0
  559. package/dist/src/matrix/actions/pins.js +46 -0
  560. package/dist/src/matrix/actions/pins.js.map +7 -0
  561. package/dist/src/matrix/actions/polls.js +37 -0
  562. package/dist/src/matrix/actions/polls.js.map +7 -0
  563. package/dist/src/matrix/actions/profile.js +38 -0
  564. package/dist/src/matrix/actions/profile.js.map +7 -0
  565. package/dist/src/matrix/actions/reactions.js +40 -0
  566. package/dist/src/matrix/actions/reactions.js.map +7 -0
  567. package/dist/src/matrix/actions/room.js +40 -0
  568. package/dist/src/matrix/actions/room.js.map +7 -0
  569. package/dist/src/matrix/actions/summary.js +19 -0
  570. package/dist/src/matrix/actions/summary.js.map +7 -0
  571. package/dist/src/matrix/actions/types.js +13 -0
  572. package/dist/src/matrix/actions/types.js.map +7 -0
  573. package/dist/src/matrix/actions/verification.js +77 -0
  574. package/dist/src/matrix/actions/verification.js.map +7 -0
  575. package/dist/src/matrix/actions.js +126 -0
  576. package/dist/src/matrix/actions.js.map +7 -0
  577. package/dist/src/matrix/active-client.js +10 -0
  578. package/dist/src/matrix/active-client.js.map +7 -0
  579. package/dist/src/matrix/async-lock.js +8 -0
  580. package/dist/src/matrix/async-lock.js.map +7 -0
  581. package/dist/src/matrix/backup-health.js +10 -0
  582. package/dist/src/matrix/backup-health.js.map +7 -0
  583. package/dist/src/matrix/client/config-runtime-api.js +24 -0
  584. package/dist/src/matrix/client/config-runtime-api.js.map +7 -0
  585. package/dist/src/matrix/client/config-secret-input.runtime.js +11 -0
  586. package/dist/src/matrix/client/config-secret-input.runtime.js.map +7 -0
  587. package/dist/src/matrix/client/config.js +42 -0
  588. package/dist/src/matrix/client/config.js.map +7 -0
  589. package/dist/src/matrix/client/create-client.js +20 -0
  590. package/dist/src/matrix/client/create-client.js.map +7 -0
  591. package/dist/src/matrix/client/env-auth.js +26 -0
  592. package/dist/src/matrix/client/env-auth.js.map +7 -0
  593. package/dist/src/matrix/client/file-sync-store.js +23 -0
  594. package/dist/src/matrix/client/file-sync-store.js.map +7 -0
  595. package/dist/src/matrix/client/logging.js +17 -0
  596. package/dist/src/matrix/client/logging.js.map +7 -0
  597. package/dist/src/matrix/client/migration-snapshot.runtime.js +13 -0
  598. package/dist/src/matrix/client/migration-snapshot.runtime.js.map +7 -0
  599. package/dist/src/matrix/client/private-network-host.js +8 -0
  600. package/dist/src/matrix/client/private-network-host.js.map +7 -0
  601. package/dist/src/matrix/client/runtime.js +8 -0
  602. package/dist/src/matrix/client/runtime.js.map +7 -0
  603. package/dist/src/matrix/client/shared.js +34 -0
  604. package/dist/src/matrix/client/shared.js.map +7 -0
  605. package/dist/src/matrix/client/storage.js +26 -0
  606. package/dist/src/matrix/client/storage.js.map +7 -0
  607. package/dist/src/matrix/client/types.js +7 -0
  608. package/dist/src/matrix/client/types.js.map +7 -0
  609. package/dist/src/matrix/client-bootstrap.js +15 -0
  610. package/dist/src/matrix/client-bootstrap.js.map +7 -0
  611. package/dist/src/matrix/client-resolver.test-helpers.js +122 -0
  612. package/dist/src/matrix/client-resolver.test-helpers.js.map +7 -0
  613. package/dist/src/matrix/client.js +63 -0
  614. package/dist/src/matrix/client.js.map +7 -0
  615. package/dist/src/matrix/config-paths.js +12 -0
  616. package/dist/src/matrix/config-paths.js.map +7 -0
  617. package/dist/src/matrix/config-update.js +17 -0
  618. package/dist/src/matrix/config-update.js.map +7 -0
  619. package/dist/src/matrix/credentials-read.js +22 -0
  620. package/dist/src/matrix/credentials-read.js.map +7 -0
  621. package/dist/src/matrix/credentials-write.runtime.js +24 -0
  622. package/dist/src/matrix/credentials-write.runtime.js.map +7 -0
  623. package/dist/src/matrix/credentials.js +90 -0
  624. package/dist/src/matrix/credentials.js.map +7 -0
  625. package/dist/src/matrix/deps.js +12 -0
  626. package/dist/src/matrix/deps.js.map +7 -0
  627. package/dist/src/matrix/device-health.js +10 -0
  628. package/dist/src/matrix/device-health.js.map +7 -0
  629. package/dist/src/matrix/direct-management.js +18 -0
  630. package/dist/src/matrix/direct-management.js.map +7 -0
  631. package/dist/src/matrix/direct-room.js +18 -0
  632. package/dist/src/matrix/direct-room.js.map +7 -0
  633. package/dist/src/matrix/draft-stream.js +33 -0
  634. package/dist/src/matrix/draft-stream.js.map +7 -0
  635. package/dist/src/matrix/encryption-guidance.js +17 -0
  636. package/dist/src/matrix/encryption-guidance.js.map +7 -0
  637. package/dist/src/matrix/errors.js +12 -0
  638. package/dist/src/matrix/errors.js.map +7 -0
  639. package/dist/src/matrix/format.js +13 -0
  640. package/dist/src/matrix/format.js.map +7 -0
  641. package/dist/src/matrix/legacy-crypto-inspector.js +73 -0
  642. package/dist/src/matrix/legacy-crypto-inspector.js.map +7 -0
  643. package/dist/src/matrix/media-errors.js +12 -0
  644. package/dist/src/matrix/media-errors.js.map +7 -0
  645. package/dist/src/matrix/media-text.js +22 -0
  646. package/dist/src/matrix/media-text.js.map +7 -0
  647. package/dist/src/matrix/monitor/access-state.js +9 -0
  648. package/dist/src/matrix/monitor/access-state.js.map +7 -0
  649. package/dist/src/matrix/monitor/ack-config.js +10 -0
  650. package/dist/src/matrix/monitor/ack-config.js.map +7 -0
  651. package/dist/src/matrix/monitor/allowlist.js +12 -0
  652. package/dist/src/matrix/monitor/allowlist.js.map +7 -0
  653. package/dist/src/matrix/monitor/auto-join.js +9 -0
  654. package/dist/src/matrix/monitor/auto-join.js.map +7 -0
  655. package/dist/src/matrix/monitor/config.js +37 -0
  656. package/dist/src/matrix/monitor/config.js.map +7 -0
  657. package/dist/src/matrix/monitor/context-summary.js +13 -0
  658. package/dist/src/matrix/monitor/context-summary.js.map +7 -0
  659. package/dist/src/matrix/monitor/direct.js +13 -0
  660. package/dist/src/matrix/monitor/direct.js.map +7 -0
  661. package/dist/src/matrix/monitor/events.js +20 -0
  662. package/dist/src/matrix/monitor/events.js.map +7 -0
  663. package/dist/src/matrix/monitor/handler.js +76 -0
  664. package/dist/src/matrix/monitor/handler.js.map +7 -0
  665. package/dist/src/matrix/monitor/handler.test-helpers.js +268 -0
  666. package/dist/src/matrix/monitor/handler.test-helpers.js.map +7 -0
  667. package/dist/src/matrix/monitor/inbound-dedupe.js +17 -0
  668. package/dist/src/matrix/monitor/inbound-dedupe.js.map +7 -0
  669. package/dist/src/matrix/monitor/index.js +502 -0
  670. package/dist/src/matrix/monitor/index.js.map +7 -0
  671. package/dist/src/matrix/monitor/legacy-crypto-restore.js +99 -0
  672. package/dist/src/matrix/monitor/legacy-crypto-restore.js.map +7 -0
  673. package/dist/src/matrix/monitor/location.js +11 -0
  674. package/dist/src/matrix/monitor/location.js.map +7 -0
  675. package/dist/src/matrix/monitor/media.js +10 -0
  676. package/dist/src/matrix/monitor/media.js.map +7 -0
  677. package/dist/src/matrix/monitor/mentions.js +9 -0
  678. package/dist/src/matrix/monitor/mentions.js.map +7 -0
  679. package/dist/src/matrix/monitor/reaction-events.js +38 -0
  680. package/dist/src/matrix/monitor/reaction-events.js.map +7 -0
  681. package/dist/src/matrix/monitor/recent-invite.js +10 -0
  682. package/dist/src/matrix/monitor/recent-invite.js.map +7 -0
  683. package/dist/src/matrix/monitor/replies.js +33 -0
  684. package/dist/src/matrix/monitor/replies.js.map +7 -0
  685. package/dist/src/matrix/monitor/reply-context.js +14 -0
  686. package/dist/src/matrix/monitor/reply-context.js.map +7 -0
  687. package/dist/src/matrix/monitor/room-history.js +10 -0
  688. package/dist/src/matrix/monitor/room-history.js.map +7 -0
  689. package/dist/src/matrix/monitor/room-info.js +9 -0
  690. package/dist/src/matrix/monitor/room-info.js.map +7 -0
  691. package/dist/src/matrix/monitor/rooms.js +9 -0
  692. package/dist/src/matrix/monitor/rooms.js.map +7 -0
  693. package/dist/src/matrix/monitor/route.js +12 -0
  694. package/dist/src/matrix/monitor/route.js.map +7 -0
  695. package/dist/src/matrix/monitor/runtime-api.js +40 -0
  696. package/dist/src/matrix/monitor/runtime-api.js.map +7 -0
  697. package/dist/src/matrix/monitor/startup-verification.js +174 -0
  698. package/dist/src/matrix/monitor/startup-verification.js.map +7 -0
  699. package/dist/src/matrix/monitor/startup.js +9 -0
  700. package/dist/src/matrix/monitor/startup.js.map +7 -0
  701. package/dist/src/matrix/monitor/status.js +10 -0
  702. package/dist/src/matrix/monitor/status.js.map +7 -0
  703. package/dist/src/matrix/monitor/sync-lifecycle.js +9 -0
  704. package/dist/src/matrix/monitor/sync-lifecycle.js.map +7 -0
  705. package/dist/src/matrix/monitor/task-runner.js +8 -0
  706. package/dist/src/matrix/monitor/task-runner.js.map +7 -0
  707. package/dist/src/matrix/monitor/thread-context.js +14 -0
  708. package/dist/src/matrix/monitor/thread-context.js.map +7 -0
  709. package/dist/src/matrix/monitor/threads.js +16 -0
  710. package/dist/src/matrix/monitor/threads.js.map +7 -0
  711. package/dist/src/matrix/monitor/types.js +11 -0
  712. package/dist/src/matrix/monitor/types.js.map +7 -0
  713. package/dist/src/matrix/monitor/verification-events.js +13 -0
  714. package/dist/src/matrix/monitor/verification-events.js.map +7 -0
  715. package/dist/src/matrix/monitor/verification-utils.js +16 -0
  716. package/dist/src/matrix/monitor/verification-utils.js.map +7 -0
  717. package/dist/src/matrix/outbound-media-runtime.js +9 -0
  718. package/dist/src/matrix/outbound-media-runtime.js.map +7 -0
  719. package/dist/src/matrix/poll-summary.js +14 -0
  720. package/dist/src/matrix/poll-summary.js.map +7 -0
  721. package/dist/src/matrix/poll-types.js +55 -0
  722. package/dist/src/matrix/poll-types.js.map +7 -0
  723. package/dist/src/matrix/probe.js +9 -0
  724. package/dist/src/matrix/probe.js.map +7 -0
  725. package/dist/src/matrix/probe.runtime.js +30 -0
  726. package/dist/src/matrix/probe.runtime.js.map +7 -0
  727. package/dist/src/matrix/profile.js +16 -0
  728. package/dist/src/matrix/profile.js.map +7 -0
  729. package/dist/src/matrix/reaction-common.js +26 -0
  730. package/dist/src/matrix/reaction-common.js.map +7 -0
  731. package/dist/src/matrix/sdk/crypto-bootstrap.js +15 -0
  732. package/dist/src/matrix/sdk/crypto-bootstrap.js.map +7 -0
  733. package/dist/src/matrix/sdk/crypto-facade.js +8 -0
  734. package/dist/src/matrix/sdk/crypto-facade.js.map +7 -0
  735. package/dist/src/matrix/sdk/crypto-node.runtime.js +15 -0
  736. package/dist/src/matrix/sdk/crypto-node.runtime.js.map +7 -0
  737. package/dist/src/matrix/sdk/crypto-runtime.js +84 -0
  738. package/dist/src/matrix/sdk/crypto-runtime.js.map +7 -0
  739. package/dist/src/matrix/sdk/decrypt-bridge.js +11 -0
  740. package/dist/src/matrix/sdk/decrypt-bridge.js.map +7 -0
  741. package/dist/src/matrix/sdk/event-helpers.js +12 -0
  742. package/dist/src/matrix/sdk/event-helpers.js.map +7 -0
  743. package/dist/src/matrix/sdk/http-client.js +13 -0
  744. package/dist/src/matrix/sdk/http-client.js.map +7 -0
  745. package/dist/src/matrix/sdk/idb-persistence-lock.js +12 -0
  746. package/dist/src/matrix/sdk/idb-persistence-lock.js.map +7 -0
  747. package/dist/src/matrix/sdk/idb-persistence.js +13 -0
  748. package/dist/src/matrix/sdk/idb-persistence.js.map +7 -0
  749. package/dist/src/matrix/sdk/idb-persistence.test-helpers.js +83 -0
  750. package/dist/src/matrix/sdk/idb-persistence.test-helpers.js.map +7 -0
  751. package/dist/src/matrix/sdk/logger.js +15 -0
  752. package/dist/src/matrix/sdk/logger.js.map +7 -0
  753. package/dist/src/matrix/sdk/read-response-with-limit.js +8 -0
  754. package/dist/src/matrix/sdk/read-response-with-limit.js.map +7 -0
  755. package/dist/src/matrix/sdk/recovery-key-store.js +14 -0
  756. package/dist/src/matrix/sdk/recovery-key-store.js.map +7 -0
  757. package/dist/src/matrix/sdk/transport.js +13 -0
  758. package/dist/src/matrix/sdk/transport.js.map +7 -0
  759. package/dist/src/matrix/sdk/types.js +7 -0
  760. package/dist/src/matrix/sdk/types.js.map +7 -0
  761. package/dist/src/matrix/sdk/verification-manager.js +11 -0
  762. package/dist/src/matrix/sdk/verification-manager.js.map +7 -0
  763. package/dist/src/matrix/sdk/verification-status.js +12 -0
  764. package/dist/src/matrix/sdk/verification-status.js.map +7 -0
  765. package/dist/src/matrix/sdk.js +1375 -0
  766. package/dist/src/matrix/sdk.js.map +7 -0
  767. package/dist/src/matrix/send/client.js +14 -0
  768. package/dist/src/matrix/send/client.js.map +7 -0
  769. package/dist/src/matrix/send/formatting.js +29 -0
  770. package/dist/src/matrix/send/formatting.js.map +7 -0
  771. package/dist/src/matrix/send/media.js +26 -0
  772. package/dist/src/matrix/send/media.js.map +7 -0
  773. package/dist/src/matrix/send/targets.js +15 -0
  774. package/dist/src/matrix/send/targets.js.map +7 -0
  775. package/dist/src/matrix/send/types.js +17 -0
  776. package/dist/src/matrix/send/types.js.map +7 -0
  777. package/dist/src/matrix/send.js +51 -0
  778. package/dist/src/matrix/send.js.map +7 -0
  779. package/dist/src/matrix/session-store-metadata.js +15 -0
  780. package/dist/src/matrix/session-store-metadata.js.map +7 -0
  781. package/dist/src/matrix/startup-abort.js +14 -0
  782. package/dist/src/matrix/startup-abort.js.map +7 -0
  783. package/dist/src/matrix/sync-state.js +12 -0
  784. package/dist/src/matrix/sync-state.js.map +7 -0
  785. package/dist/src/matrix/target-ids.js +20 -0
  786. package/dist/src/matrix/target-ids.js.map +7 -0
  787. package/dist/src/matrix/thread-bindings-shared.js +34 -0
  788. package/dist/src/matrix/thread-bindings-shared.js.map +7 -0
  789. package/dist/src/matrix/thread-bindings.js +49 -0
  790. package/dist/src/matrix/thread-bindings.js.map +7 -0
  791. package/dist/src/matrix-migration.runtime.js +45 -0
  792. package/dist/src/matrix-migration.runtime.js.map +7 -0
  793. package/dist/src/migration-config.js +29 -0
  794. package/dist/src/migration-config.js.map +7 -0
  795. package/dist/src/migration-snapshot-backup.js +12 -0
  796. package/dist/src/migration-snapshot-backup.js.map +7 -0
  797. package/dist/src/migration-snapshot.js +38 -0
  798. package/dist/src/migration-snapshot.js.map +7 -0
  799. package/dist/src/onboarding.js +43 -0
  800. package/dist/src/onboarding.js.map +7 -0
  801. package/dist/src/onboarding.test-harness.js +124 -0
  802. package/dist/src/onboarding.test-harness.js.map +7 -0
  803. package/dist/src/outbound.js +33 -0
  804. package/dist/src/outbound.js.map +7 -0
  805. package/dist/src/plugin-entry.runtime.js +15 -0
  806. package/dist/src/plugin-entry.runtime.js.map +7 -0
  807. package/dist/src/profile-update.js +41 -0
  808. package/dist/src/profile-update.js.map +7 -0
  809. package/dist/src/record-shared.js +8 -0
  810. package/dist/src/record-shared.js.map +7 -0
  811. package/dist/src/resolve-targets.js +34 -0
  812. package/dist/src/resolve-targets.js.map +7 -0
  813. package/dist/src/resolver.js +8 -0
  814. package/dist/src/resolver.js.map +7 -0
  815. package/dist/src/runtime-api.js +120 -0
  816. package/dist/src/runtime-api.js.map +7 -0
  817. package/dist/src/runtime.js +10 -0
  818. package/dist/src/runtime.js.map +7 -0
  819. package/dist/src/secret-contract.js +13 -0
  820. package/dist/src/secret-contract.js.map +7 -0
  821. package/dist/src/session-route.js +25 -0
  822. package/dist/src/session-route.js.map +7 -0
  823. package/dist/src/setup-bootstrap.js +124 -0
  824. package/dist/src/setup-bootstrap.js.map +7 -0
  825. package/dist/src/setup-config.js +28 -0
  826. package/dist/src/setup-config.js.map +7 -0
  827. package/dist/src/setup-contract.js +16 -0
  828. package/dist/src/setup-contract.js.map +7 -0
  829. package/dist/src/setup-core.js +25 -0
  830. package/dist/src/setup-core.js.map +7 -0
  831. package/dist/src/setup-surface.js +45 -0
  832. package/dist/src/setup-surface.js.map +7 -0
  833. package/dist/src/startup-maintenance.js +29 -0
  834. package/dist/src/startup-maintenance.js.map +7 -0
  835. package/dist/src/storage-paths.js +24 -0
  836. package/dist/src/storage-paths.js.map +7 -0
  837. package/dist/src/test-helpers.js +49 -0
  838. package/dist/src/test-helpers.js.map +7 -0
  839. package/dist/src/test-mocks.js +40 -0
  840. package/dist/src/test-mocks.js.map +7 -0
  841. package/dist/src/test-runtime.js +65 -0
  842. package/dist/src/test-runtime.js.map +7 -0
  843. package/dist/src/tool-actions.js +68 -0
  844. package/dist/src/tool-actions.js.map +7 -0
  845. package/dist/src/tool-actions.runtime.js +73 -0
  846. package/dist/src/tool-actions.runtime.js.map +7 -0
  847. package/dist/src/types.js +7 -0
  848. package/dist/src/types.js.map +7 -0
  849. package/dist/test-api.js +82 -0
  850. package/dist/test-api.js.map +7 -0
  851. package/dist/thread-bindings-runtime.js +15 -0
  852. package/dist/thread-bindings-runtime.js.map +7 -0
  853. package/package.json +12 -6
  854. package/CHANGELOG.md +0 -164
  855. package/ENDOFFILE +0 -0
  856. package/EOF +0 -0
  857. package/SPEC-SUPPORT.md +0 -116
  858. package/YAMLEND +0 -0
  859. package/api.ts +0 -18
  860. package/archipelagolab-lobi-1.0.0.tgz +0 -0
  861. package/auth-presence.ts +0 -56
  862. package/channel-plugin-api.ts +0 -3
  863. package/cli-metadata.ts +0 -11
  864. package/contract-api.ts +0 -17
  865. package/docs/CHECKLIST.md +0 -83
  866. package/docs/FORK_SDK_GUIDE.md +0 -279
  867. package/helper-api.ts +0 -3
  868. package/index.test.ts +0 -61
  869. package/index.ts +0 -65
  870. package/plugin-entry.handlers.runtime.ts +0 -1
  871. package/runtime-api.ts +0 -54
  872. package/runtime-heavy-api.ts +0 -1
  873. package/scripts/migrate-to-lobi.sh +0 -72
  874. package/secret-contract-api.ts +0 -5
  875. package/setup-entry.ts +0 -13
  876. package/src/account-selection.test.ts +0 -124
  877. package/src/account-selection.ts +0 -226
  878. package/src/actions.account-propagation.test.ts +0 -251
  879. package/src/actions.test.ts +0 -251
  880. package/src/actions.ts +0 -336
  881. package/src/approval-auth.test.ts +0 -23
  882. package/src/approval-auth.ts +0 -25
  883. package/src/approval-handler.runtime.test.ts +0 -46
  884. package/src/approval-handler.runtime.ts +0 -400
  885. package/src/approval-ids.ts +0 -6
  886. package/src/approval-native.test.ts +0 -329
  887. package/src/approval-native.ts +0 -336
  888. package/src/approval-reactions.test.ts +0 -107
  889. package/src/approval-reactions.ts +0 -158
  890. package/src/auth-precedence.ts +0 -61
  891. package/src/channel-account-paths.ts +0 -92
  892. package/src/channel.account-paths.test.ts +0 -102
  893. package/src/channel.directory.test.ts +0 -601
  894. package/src/channel.resolve.test.ts +0 -38
  895. package/src/channel.runtime.ts +0 -16
  896. package/src/channel.setup.test.ts +0 -269
  897. package/src/channel.ts +0 -570
  898. package/src/cli-metadata.ts +0 -19
  899. package/src/cli.test.ts +0 -1015
  900. package/src/cli.ts +0 -1198
  901. package/src/config-adapter.ts +0 -41
  902. package/src/config-schema.test.ts +0 -90
  903. package/src/config-schema.ts +0 -114
  904. package/src/directory-live.test.ts +0 -200
  905. package/src/directory-live.ts +0 -238
  906. package/src/doctor-contract.ts +0 -287
  907. package/src/doctor.test.ts +0 -440
  908. package/src/doctor.ts +0 -262
  909. package/src/env-vars.ts +0 -92
  910. package/src/exec-approval-resolver.test.ts +0 -68
  911. package/src/exec-approval-resolver.ts +0 -23
  912. package/src/exec-approvals.test.ts +0 -483
  913. package/src/exec-approvals.ts +0 -290
  914. package/src/group-mentions.ts +0 -41
  915. package/src/legacy-crypto-inspector-availability.test.ts +0 -81
  916. package/src/legacy-crypto-inspector-availability.ts +0 -60
  917. package/src/legacy-crypto.test.ts +0 -234
  918. package/src/legacy-crypto.ts +0 -549
  919. package/src/legacy-state.test.ts +0 -86
  920. package/src/legacy-state.ts +0 -156
  921. package/src/matrix/account-config.ts +0 -150
  922. package/src/matrix/accounts.readiness.test.ts +0 -27
  923. package/src/matrix/accounts.test.ts +0 -757
  924. package/src/matrix/accounts.ts +0 -194
  925. package/src/matrix/actions/client.test.ts +0 -215
  926. package/src/matrix/actions/client.ts +0 -31
  927. package/src/matrix/actions/devices.test.ts +0 -114
  928. package/src/matrix/actions/devices.ts +0 -34
  929. package/src/matrix/actions/limits.test.ts +0 -15
  930. package/src/matrix/actions/limits.ts +0 -6
  931. package/src/matrix/actions/messages.test.ts +0 -289
  932. package/src/matrix/actions/messages.ts +0 -123
  933. package/src/matrix/actions/pins.test.ts +0 -74
  934. package/src/matrix/actions/pins.ts +0 -64
  935. package/src/matrix/actions/polls.test.ts +0 -71
  936. package/src/matrix/actions/polls.ts +0 -109
  937. package/src/matrix/actions/profile.test.ts +0 -109
  938. package/src/matrix/actions/profile.ts +0 -37
  939. package/src/matrix/actions/reactions.test.ts +0 -135
  940. package/src/matrix/actions/reactions.ts +0 -59
  941. package/src/matrix/actions/room.test.ts +0 -79
  942. package/src/matrix/actions/room.ts +0 -71
  943. package/src/matrix/actions/summary.test.ts +0 -87
  944. package/src/matrix/actions/summary.ts +0 -88
  945. package/src/matrix/actions/types.ts +0 -82
  946. package/src/matrix/actions/verification.test.ts +0 -105
  947. package/src/matrix/actions/verification.ts +0 -237
  948. package/src/matrix/actions.ts +0 -37
  949. package/src/matrix/active-client.ts +0 -26
  950. package/src/matrix/async-lock.ts +0 -18
  951. package/src/matrix/backup-health.ts +0 -115
  952. package/src/matrix/client/config-runtime-api.ts +0 -14
  953. package/src/matrix/client/config-secret-input.runtime.ts +0 -1
  954. package/src/matrix/client/config.ts +0 -982
  955. package/src/matrix/client/create-client.test.ts +0 -115
  956. package/src/matrix/client/create-client.ts +0 -101
  957. package/src/matrix/client/env-auth.ts +0 -6
  958. package/src/matrix/client/file-sync-store.test.ts +0 -265
  959. package/src/matrix/client/file-sync-store.ts +0 -289
  960. package/src/matrix/client/logging.ts +0 -123
  961. package/src/matrix/client/migration-snapshot.runtime.ts +0 -1
  962. package/src/matrix/client/private-network-host.ts +0 -56
  963. package/src/matrix/client/runtime.ts +0 -4
  964. package/src/matrix/client/shared.test.ts +0 -344
  965. package/src/matrix/client/shared.ts +0 -306
  966. package/src/matrix/client/storage.test.ts +0 -634
  967. package/src/matrix/client/storage.ts +0 -544
  968. package/src/matrix/client/types.ts +0 -50
  969. package/src/matrix/client-bootstrap.test.ts +0 -84
  970. package/src/matrix/client-bootstrap.ts +0 -164
  971. package/src/matrix/client-resolver.test-helpers.ts +0 -147
  972. package/src/matrix/client.test.ts +0 -1521
  973. package/src/matrix/client.ts +0 -23
  974. package/src/matrix/config-paths.ts +0 -31
  975. package/src/matrix/config-update.test.ts +0 -237
  976. package/src/matrix/config-update.ts +0 -291
  977. package/src/matrix/credentials-read.ts +0 -206
  978. package/src/matrix/credentials-write.runtime.ts +0 -26
  979. package/src/matrix/credentials.test.ts +0 -501
  980. package/src/matrix/credentials.ts +0 -95
  981. package/src/matrix/deps.test.ts +0 -74
  982. package/src/matrix/deps.ts +0 -225
  983. package/src/matrix/device-health.test.ts +0 -45
  984. package/src/matrix/device-health.ts +0 -31
  985. package/src/matrix/direct-management.test.ts +0 -350
  986. package/src/matrix/direct-management.ts +0 -347
  987. package/src/matrix/direct-room.test.ts +0 -61
  988. package/src/matrix/direct-room.ts +0 -128
  989. package/src/matrix/draft-stream.test.ts +0 -406
  990. package/src/matrix/draft-stream.ts +0 -216
  991. package/src/matrix/encryption-guidance.ts +0 -27
  992. package/src/matrix/errors.ts +0 -21
  993. package/src/matrix/format.test.ts +0 -340
  994. package/src/matrix/format.ts +0 -428
  995. package/src/matrix/legacy-crypto-inspector.ts +0 -95
  996. package/src/matrix/media-errors.ts +0 -20
  997. package/src/matrix/media-text.ts +0 -169
  998. package/src/matrix/monitor/access-state.test.ts +0 -45
  999. package/src/matrix/monitor/access-state.ts +0 -77
  1000. package/src/matrix/monitor/ack-config.test.ts +0 -57
  1001. package/src/matrix/monitor/ack-config.ts +0 -26
  1002. package/src/matrix/monitor/allowlist.test.ts +0 -45
  1003. package/src/matrix/monitor/allowlist.ts +0 -94
  1004. package/src/matrix/monitor/auto-join.test.ts +0 -203
  1005. package/src/matrix/monitor/auto-join.ts +0 -86
  1006. package/src/matrix/monitor/config.test.ts +0 -197
  1007. package/src/matrix/monitor/config.ts +0 -303
  1008. package/src/matrix/monitor/context-summary.ts +0 -43
  1009. package/src/matrix/monitor/direct.test.ts +0 -529
  1010. package/src/matrix/monitor/direct.ts +0 -270
  1011. package/src/matrix/monitor/events.test.ts +0 -1524
  1012. package/src/matrix/monitor/events.ts +0 -213
  1013. package/src/matrix/monitor/handler.body-for-agent.test.ts +0 -396
  1014. package/src/matrix/monitor/handler.group-history.test.ts +0 -648
  1015. package/src/matrix/monitor/handler.media-failure.test.ts +0 -267
  1016. package/src/matrix/monitor/handler.test-helpers.ts +0 -308
  1017. package/src/matrix/monitor/handler.test.ts +0 -2952
  1018. package/src/matrix/monitor/handler.thread-root-media.test.ts +0 -82
  1019. package/src/matrix/monitor/handler.ts +0 -1679
  1020. package/src/matrix/monitor/inbound-dedupe.test.ts +0 -146
  1021. package/src/matrix/monitor/inbound-dedupe.ts +0 -267
  1022. package/src/matrix/monitor/index.test.ts +0 -920
  1023. package/src/matrix/monitor/index.ts +0 -434
  1024. package/src/matrix/monitor/legacy-crypto-restore.test.ts +0 -206
  1025. package/src/matrix/monitor/legacy-crypto-restore.ts +0 -139
  1026. package/src/matrix/monitor/location.ts +0 -100
  1027. package/src/matrix/monitor/media.test.ts +0 -159
  1028. package/src/matrix/monitor/media.ts +0 -119
  1029. package/src/matrix/monitor/mentions.test.ts +0 -289
  1030. package/src/matrix/monitor/mentions.ts +0 -177
  1031. package/src/matrix/monitor/reaction-events.test.ts +0 -326
  1032. package/src/matrix/monitor/reaction-events.ts +0 -187
  1033. package/src/matrix/monitor/recent-invite.test.ts +0 -92
  1034. package/src/matrix/monitor/recent-invite.ts +0 -30
  1035. package/src/matrix/monitor/replies.test.ts +0 -265
  1036. package/src/matrix/monitor/replies.ts +0 -136
  1037. package/src/matrix/monitor/reply-context.test.ts +0 -276
  1038. package/src/matrix/monitor/reply-context.ts +0 -92
  1039. package/src/matrix/monitor/room-history.test.ts +0 -258
  1040. package/src/matrix/monitor/room-history.ts +0 -301
  1041. package/src/matrix/monitor/room-info.test.ts +0 -201
  1042. package/src/matrix/monitor/room-info.ts +0 -126
  1043. package/src/matrix/monitor/rooms.test.ts +0 -121
  1044. package/src/matrix/monitor/rooms.ts +0 -52
  1045. package/src/matrix/monitor/route.test.ts +0 -255
  1046. package/src/matrix/monitor/route.ts +0 -178
  1047. package/src/matrix/monitor/runtime-api.ts +0 -31
  1048. package/src/matrix/monitor/startup-verification.test.ts +0 -294
  1049. package/src/matrix/monitor/startup-verification.ts +0 -237
  1050. package/src/matrix/monitor/startup.test.ts +0 -257
  1051. package/src/matrix/monitor/startup.ts +0 -218
  1052. package/src/matrix/monitor/status.ts +0 -111
  1053. package/src/matrix/monitor/sync-lifecycle.test.ts +0 -224
  1054. package/src/matrix/monitor/sync-lifecycle.ts +0 -91
  1055. package/src/matrix/monitor/task-runner.ts +0 -38
  1056. package/src/matrix/monitor/thread-context.test.ts +0 -149
  1057. package/src/matrix/monitor/thread-context.ts +0 -108
  1058. package/src/matrix/monitor/threads.test.ts +0 -68
  1059. package/src/matrix/monitor/threads.ts +0 -85
  1060. package/src/matrix/monitor/types.ts +0 -30
  1061. package/src/matrix/monitor/verification-events.ts +0 -627
  1062. package/src/matrix/monitor/verification-utils.test.ts +0 -47
  1063. package/src/matrix/monitor/verification-utils.ts +0 -46
  1064. package/src/matrix/outbound-media-runtime.ts +0 -1
  1065. package/src/matrix/poll-summary.ts +0 -110
  1066. package/src/matrix/poll-types.test.ts +0 -205
  1067. package/src/matrix/poll-types.ts +0 -433
  1068. package/src/matrix/probe.runtime.ts +0 -4
  1069. package/src/matrix/probe.test.ts +0 -154
  1070. package/src/matrix/probe.ts +0 -96
  1071. package/src/matrix/profile.test.ts +0 -154
  1072. package/src/matrix/profile.ts +0 -184
  1073. package/src/matrix/reaction-common.test.ts +0 -96
  1074. package/src/matrix/reaction-common.ts +0 -147
  1075. package/src/matrix/sdk/crypto-bootstrap.test.ts +0 -505
  1076. package/src/matrix/sdk/crypto-bootstrap.ts +0 -341
  1077. package/src/matrix/sdk/crypto-facade.test.ts +0 -197
  1078. package/src/matrix/sdk/crypto-facade.ts +0 -207
  1079. package/src/matrix/sdk/crypto-node.runtime.test.ts +0 -27
  1080. package/src/matrix/sdk/crypto-node.runtime.ts +0 -9
  1081. package/src/matrix/sdk/crypto-runtime.ts +0 -11
  1082. package/src/matrix/sdk/decrypt-bridge.ts +0 -356
  1083. package/src/matrix/sdk/event-helpers.test.ts +0 -60
  1084. package/src/matrix/sdk/event-helpers.ts +0 -71
  1085. package/src/matrix/sdk/http-client.test.ts +0 -134
  1086. package/src/matrix/sdk/http-client.ts +0 -87
  1087. package/src/matrix/sdk/idb-persistence-lock.ts +0 -51
  1088. package/src/matrix/sdk/idb-persistence.lock-order.test.ts +0 -108
  1089. package/src/matrix/sdk/idb-persistence.test-helpers.ts +0 -88
  1090. package/src/matrix/sdk/idb-persistence.test.ts +0 -149
  1091. package/src/matrix/sdk/idb-persistence.ts +0 -283
  1092. package/src/matrix/sdk/logger.test.ts +0 -25
  1093. package/src/matrix/sdk/logger.ts +0 -108
  1094. package/src/matrix/sdk/read-response-with-limit.ts +0 -19
  1095. package/src/matrix/sdk/recovery-key-store.test.ts +0 -385
  1096. package/src/matrix/sdk/recovery-key-store.ts +0 -430
  1097. package/src/matrix/sdk/transport.test.ts +0 -161
  1098. package/src/matrix/sdk/transport.ts +0 -344
  1099. package/src/matrix/sdk/types.ts +0 -236
  1100. package/src/matrix/sdk/verification-manager.test.ts +0 -509
  1101. package/src/matrix/sdk/verification-manager.ts +0 -694
  1102. package/src/matrix/sdk/verification-status.ts +0 -23
  1103. package/src/matrix/sdk.test.ts +0 -2568
  1104. package/src/matrix/sdk.ts +0 -1789
  1105. package/src/matrix/send/client.test.ts +0 -174
  1106. package/src/matrix/send/client.ts +0 -90
  1107. package/src/matrix/send/formatting.ts +0 -189
  1108. package/src/matrix/send/media.ts +0 -244
  1109. package/src/matrix/send/targets.test.ts +0 -254
  1110. package/src/matrix/send/targets.ts +0 -104
  1111. package/src/matrix/send/types.ts +0 -134
  1112. package/src/matrix/send.test.ts +0 -958
  1113. package/src/matrix/send.ts +0 -609
  1114. package/src/matrix/session-store-metadata.ts +0 -108
  1115. package/src/matrix/startup-abort.ts +0 -44
  1116. package/src/matrix/sync-state.ts +0 -27
  1117. package/src/matrix/target-ids.ts +0 -102
  1118. package/src/matrix/thread-bindings-shared.ts +0 -201
  1119. package/src/matrix/thread-bindings.test.ts +0 -673
  1120. package/src/matrix/thread-bindings.ts +0 -577
  1121. package/src/matrix-migration.runtime.ts +0 -9
  1122. package/src/migration-config.test.ts +0 -228
  1123. package/src/migration-config.ts +0 -243
  1124. package/src/migration-snapshot-backup.ts +0 -117
  1125. package/src/migration-snapshot.test.ts +0 -184
  1126. package/src/migration-snapshot.ts +0 -55
  1127. package/src/onboarding.resolve.test.ts +0 -55
  1128. package/src/onboarding.test-harness.ts +0 -158
  1129. package/src/onboarding.test.ts +0 -665
  1130. package/src/onboarding.ts +0 -773
  1131. package/src/outbound.test.ts +0 -173
  1132. package/src/outbound.ts +0 -78
  1133. package/src/plugin-entry.runtime.js +0 -159
  1134. package/src/plugin-entry.runtime.test.ts +0 -108
  1135. package/src/plugin-entry.runtime.ts +0 -68
  1136. package/src/profile-update.ts +0 -68
  1137. package/src/record-shared.ts +0 -3
  1138. package/src/resolve-targets.test.ts +0 -178
  1139. package/src/resolve-targets.ts +0 -175
  1140. package/src/resolver.ts +0 -21
  1141. package/src/runtime-api.ts +0 -144
  1142. package/src/runtime.ts +0 -7
  1143. package/src/secret-contract.ts +0 -174
  1144. package/src/session-route.test.ts +0 -315
  1145. package/src/session-route.ts +0 -113
  1146. package/src/setup-bootstrap.ts +0 -94
  1147. package/src/setup-config.ts +0 -222
  1148. package/src/setup-contract.ts +0 -89
  1149. package/src/setup-core.test.ts +0 -326
  1150. package/src/setup-core.ts +0 -50
  1151. package/src/setup-surface.ts +0 -4
  1152. package/src/startup-maintenance.test.ts +0 -227
  1153. package/src/startup-maintenance.ts +0 -114
  1154. package/src/storage-paths.ts +0 -92
  1155. package/src/test-helpers.ts +0 -42
  1156. package/src/test-mocks.ts +0 -55
  1157. package/src/test-runtime.ts +0 -72
  1158. package/src/test-support/monitor-route-test-support.ts +0 -8
  1159. package/src/tool-actions.runtime.ts +0 -1
  1160. package/src/tool-actions.test.ts +0 -422
  1161. package/src/tool-actions.ts +0 -498
  1162. package/src/types.ts +0 -230
  1163. package/test-api.ts +0 -2
  1164. package/thread-bindings-runtime.ts +0 -4
  1165. package/tsconfig.json +0 -16
@@ -0,0 +1,1145 @@
1
+ import "./chunk-5APBBTGW.js";
2
+ import {
3
+ TrackType
4
+ } from "./chunk-KSEANSJE.js";
5
+ import {
6
+ Genres
7
+ } from "./chunk-3TOEIHG5.js";
8
+ import {
9
+ FourCcToken
10
+ } from "./chunk-427SAQME.js";
11
+ import "./chunk-E75BJJZ2.js";
12
+ import "./chunk-LSVKDUNM.js";
13
+ import {
14
+ getBit,
15
+ uint8ArrayToHex
16
+ } from "./chunk-EHELTAAD.js";
17
+ import {
18
+ BasicParser,
19
+ INT16_BE,
20
+ INT24_BE,
21
+ INT32_BE,
22
+ INT8,
23
+ StringType,
24
+ UINT16_BE,
25
+ UINT24_BE,
26
+ UINT32_BE,
27
+ UINT64_BE,
28
+ UINT8,
29
+ Uint8ArrayType,
30
+ lib_exports,
31
+ makeUnexpectedFileContentError,
32
+ require_src,
33
+ textDecode
34
+ } from "./chunk-IU7EXXK7.js";
35
+ import {
36
+ __toESM,
37
+ init_shims
38
+ } from "./chunk-7FLQSTPG.js";
39
+
40
+ // ../../node_modules/music-metadata/lib/mp4/MP4Parser.js
41
+ init_shims();
42
+ var import_debug3 = __toESM(require_src(), 1);
43
+
44
+ // ../../node_modules/music-metadata/lib/mp4/Atom.js
45
+ init_shims();
46
+ var import_debug2 = __toESM(require_src(), 1);
47
+
48
+ // ../../node_modules/music-metadata/lib/mp4/AtomToken.js
49
+ init_shims();
50
+ var import_debug = __toESM(require_src(), 1);
51
+ var debug = (0, import_debug.default)("music-metadata:parser:MP4:atom");
52
+ var Mp4ContentError = class extends makeUnexpectedFileContentError("MP4") {
53
+ };
54
+ var Header = {
55
+ len: 8,
56
+ get: (buf, off) => {
57
+ const length = UINT32_BE.get(buf, off);
58
+ if (length < 0)
59
+ throw new Mp4ContentError("Invalid atom header length");
60
+ return {
61
+ length: BigInt(length),
62
+ name: new StringType(4, "latin1").get(buf, off + 4)
63
+ };
64
+ },
65
+ put: (buf, off, hdr) => {
66
+ UINT32_BE.put(buf, off, Number(hdr.length));
67
+ return FourCcToken.put(buf, off + 4, hdr.name);
68
+ }
69
+ };
70
+ var ExtendedSize = UINT64_BE;
71
+ var ftyp = {
72
+ len: 4,
73
+ get: (buf, off) => {
74
+ return {
75
+ type: new StringType(4, "ascii").get(buf, off)
76
+ };
77
+ }
78
+ };
79
+ var FixedLengthAtom = class {
80
+ /**
81
+ *
82
+ * @param {number} len Length as specified in the size field
83
+ * @param {number} expLen Total length of sum of specified fields in the standard
84
+ * @param atomId Atom ID
85
+ */
86
+ constructor(len, expLen, atomId) {
87
+ if (len < expLen) {
88
+ throw new Mp4ContentError(`Atom ${atomId} expected to be ${expLen}, but specifies ${len} bytes long.`);
89
+ }
90
+ if (len > expLen) {
91
+ debug(`Warning: atom ${atomId} expected to be ${expLen}, but was actually ${len} bytes long.`);
92
+ }
93
+ this.len = len;
94
+ }
95
+ };
96
+ var SecondsSinceMacEpoch = {
97
+ len: 4,
98
+ get: (buf, off) => {
99
+ const secondsSinceUnixEpoch = UINT32_BE.get(buf, off) - 2082844800;
100
+ return new Date(secondsSinceUnixEpoch * 1e3);
101
+ }
102
+ };
103
+ var MdhdAtom = class extends FixedLengthAtom {
104
+ constructor(len) {
105
+ super(len, 24, "mdhd");
106
+ }
107
+ get(buf, off) {
108
+ return {
109
+ version: UINT8.get(buf, off + 0),
110
+ flags: UINT24_BE.get(buf, off + 1),
111
+ creationTime: SecondsSinceMacEpoch.get(buf, off + 4),
112
+ modificationTime: SecondsSinceMacEpoch.get(buf, off + 8),
113
+ timeScale: UINT32_BE.get(buf, off + 12),
114
+ duration: UINT32_BE.get(buf, off + 16),
115
+ language: UINT16_BE.get(buf, off + 20),
116
+ quality: UINT16_BE.get(buf, off + 22)
117
+ };
118
+ }
119
+ };
120
+ var MvhdAtom = class extends FixedLengthAtom {
121
+ constructor(len) {
122
+ super(len, 100, "mvhd");
123
+ }
124
+ get(buf, off) {
125
+ return {
126
+ version: UINT8.get(buf, off),
127
+ flags: UINT24_BE.get(buf, off + 1),
128
+ creationTime: SecondsSinceMacEpoch.get(buf, off + 4),
129
+ modificationTime: SecondsSinceMacEpoch.get(buf, off + 8),
130
+ timeScale: UINT32_BE.get(buf, off + 12),
131
+ duration: UINT32_BE.get(buf, off + 16),
132
+ preferredRate: UINT32_BE.get(buf, off + 20),
133
+ preferredVolume: UINT16_BE.get(buf, off + 24),
134
+ // ignore reserver: 10 bytes
135
+ // ignore matrix structure: 36 bytes
136
+ previewTime: UINT32_BE.get(buf, off + 72),
137
+ previewDuration: UINT32_BE.get(buf, off + 76),
138
+ posterTime: UINT32_BE.get(buf, off + 80),
139
+ selectionTime: UINT32_BE.get(buf, off + 84),
140
+ selectionDuration: UINT32_BE.get(buf, off + 88),
141
+ currentTime: UINT32_BE.get(buf, off + 92),
142
+ nextTrackID: UINT32_BE.get(buf, off + 96)
143
+ };
144
+ }
145
+ };
146
+ var DataAtom = class {
147
+ constructor(len) {
148
+ this.len = len;
149
+ }
150
+ get(buf, off) {
151
+ return {
152
+ type: {
153
+ set: UINT8.get(buf, off + 0),
154
+ type: UINT24_BE.get(buf, off + 1)
155
+ },
156
+ locale: UINT24_BE.get(buf, off + 4),
157
+ value: new Uint8ArrayType(this.len - 8).get(buf, off + 8)
158
+ };
159
+ }
160
+ };
161
+ var NameAtom = class {
162
+ constructor(len) {
163
+ this.len = len;
164
+ }
165
+ get(buf, off) {
166
+ return {
167
+ version: UINT8.get(buf, off),
168
+ flags: UINT24_BE.get(buf, off + 1),
169
+ name: new StringType(this.len - 4, "utf-8").get(buf, off + 4)
170
+ };
171
+ }
172
+ };
173
+ var TrackHeaderAtom = class {
174
+ constructor(len) {
175
+ this.len = len;
176
+ }
177
+ get(buf, off) {
178
+ return {
179
+ version: UINT8.get(buf, off),
180
+ flags: UINT24_BE.get(buf, off + 1),
181
+ creationTime: SecondsSinceMacEpoch.get(buf, off + 4),
182
+ modificationTime: SecondsSinceMacEpoch.get(buf, off + 8),
183
+ trackId: UINT32_BE.get(buf, off + 12),
184
+ // reserved 4 bytes
185
+ duration: UINT32_BE.get(buf, off + 20),
186
+ layer: UINT16_BE.get(buf, off + 24),
187
+ alternateGroup: UINT16_BE.get(buf, off + 26),
188
+ volume: UINT16_BE.get(buf, off + 28)
189
+ // ToDo: fixed point
190
+ // ToDo: add remaining fields
191
+ };
192
+ }
193
+ };
194
+ var stsdHeader = {
195
+ len: 8,
196
+ get: (buf, off) => {
197
+ return {
198
+ version: UINT8.get(buf, off),
199
+ flags: UINT24_BE.get(buf, off + 1),
200
+ numberOfEntries: UINT32_BE.get(buf, off + 4)
201
+ };
202
+ }
203
+ };
204
+ var SampleDescriptionTable = class {
205
+ constructor(len) {
206
+ this.len = len;
207
+ }
208
+ get(buf, off) {
209
+ const descrLen = this.len - 12;
210
+ return {
211
+ dataFormat: FourCcToken.get(buf, off),
212
+ dataReferenceIndex: UINT16_BE.get(buf, off + 10),
213
+ description: descrLen > 0 ? new Uint8ArrayType(descrLen).get(buf, off + 12) : void 0
214
+ };
215
+ }
216
+ };
217
+ var StsdAtom = class {
218
+ constructor(len) {
219
+ this.len = len;
220
+ }
221
+ get(buf, off) {
222
+ const header = stsdHeader.get(buf, off);
223
+ off += stsdHeader.len;
224
+ const table = [];
225
+ for (let n = 0; n < header.numberOfEntries; ++n) {
226
+ const size = UINT32_BE.get(buf, off);
227
+ off += UINT32_BE.len;
228
+ table.push(new SampleDescriptionTable(size - UINT32_BE.len).get(buf, off));
229
+ off += size;
230
+ }
231
+ return {
232
+ header,
233
+ table
234
+ };
235
+ }
236
+ };
237
+ var SoundSampleDescriptionVersion = {
238
+ len: 8,
239
+ get(buf, off) {
240
+ return {
241
+ version: INT16_BE.get(buf, off),
242
+ revision: INT16_BE.get(buf, off + 2),
243
+ vendor: INT32_BE.get(buf, off + 4)
244
+ };
245
+ }
246
+ };
247
+ var SoundSampleDescriptionV0 = {
248
+ len: 12,
249
+ get(buf, off) {
250
+ return {
251
+ numAudioChannels: INT16_BE.get(buf, off + 0),
252
+ sampleSize: INT16_BE.get(buf, off + 2),
253
+ compressionId: INT16_BE.get(buf, off + 4),
254
+ packetSize: INT16_BE.get(buf, off + 6),
255
+ sampleRate: UINT16_BE.get(buf, off + 8) + UINT16_BE.get(buf, off + 10) / 1e4
256
+ };
257
+ }
258
+ };
259
+ var SimpleTableAtom = class {
260
+ constructor(len, token) {
261
+ this.len = len;
262
+ this.token = token;
263
+ }
264
+ get(buf, off) {
265
+ const nrOfEntries = INT32_BE.get(buf, off + 4);
266
+ return {
267
+ version: INT8.get(buf, off + 0),
268
+ flags: INT24_BE.get(buf, off + 1),
269
+ numberOfEntries: nrOfEntries,
270
+ entries: readTokenTable(buf, this.token, off + 8, this.len - 8, nrOfEntries)
271
+ };
272
+ }
273
+ };
274
+ var TimeToSampleToken = {
275
+ len: 8,
276
+ get(buf, off) {
277
+ return {
278
+ count: INT32_BE.get(buf, off + 0),
279
+ duration: INT32_BE.get(buf, off + 4)
280
+ };
281
+ }
282
+ };
283
+ var SttsAtom = class extends SimpleTableAtom {
284
+ constructor(len) {
285
+ super(len, TimeToSampleToken);
286
+ }
287
+ };
288
+ var SampleToChunkToken = {
289
+ len: 12,
290
+ get(buf, off) {
291
+ return {
292
+ firstChunk: INT32_BE.get(buf, off),
293
+ samplesPerChunk: INT32_BE.get(buf, off + 4),
294
+ sampleDescriptionId: INT32_BE.get(buf, off + 8)
295
+ };
296
+ }
297
+ };
298
+ var StscAtom = class extends SimpleTableAtom {
299
+ constructor(len) {
300
+ super(len, SampleToChunkToken);
301
+ }
302
+ };
303
+ var StszAtom = class {
304
+ constructor(len) {
305
+ this.len = len;
306
+ }
307
+ get(buf, off) {
308
+ const nrOfEntries = INT32_BE.get(buf, off + 8);
309
+ return {
310
+ version: INT8.get(buf, off),
311
+ flags: INT24_BE.get(buf, off + 1),
312
+ sampleSize: INT32_BE.get(buf, off + 4),
313
+ numberOfEntries: nrOfEntries,
314
+ entries: readTokenTable(buf, INT32_BE, off + 12, this.len - 12, nrOfEntries)
315
+ };
316
+ }
317
+ };
318
+ var StcoAtom = class extends SimpleTableAtom {
319
+ constructor(len) {
320
+ super(len, INT32_BE);
321
+ this.len = len;
322
+ }
323
+ };
324
+ var ChapterText = class {
325
+ constructor(len) {
326
+ this.len = len;
327
+ }
328
+ get(buf, off) {
329
+ const titleLen = INT16_BE.get(buf, off + 0);
330
+ const str = new StringType(titleLen, "utf-8");
331
+ return str.get(buf, off + 2);
332
+ }
333
+ };
334
+ function readTokenTable(buf, token, off, remainingLen, numberOfEntries) {
335
+ debug(`remainingLen=${remainingLen}, numberOfEntries=${numberOfEntries} * token-len=${token.len}`);
336
+ if (remainingLen === 0)
337
+ return [];
338
+ if (remainingLen !== numberOfEntries * token.len)
339
+ throw new Mp4ContentError("mismatch number-of-entries with remaining atom-length");
340
+ const entries = [];
341
+ for (let n = 0; n < numberOfEntries; ++n) {
342
+ entries.push(token.get(buf, off));
343
+ off += token.len;
344
+ }
345
+ return entries;
346
+ }
347
+ var TrackFragmentHeaderBox = class {
348
+ constructor(len) {
349
+ this.len = len;
350
+ }
351
+ get(buf, off) {
352
+ const flagOffset = off + 1;
353
+ const header = {
354
+ version: INT8.get(buf, off),
355
+ flags: {
356
+ baseDataOffsetPresent: getBit(buf, flagOffset + 2, 0),
357
+ sampleDescriptionIndexPresent: getBit(buf, flagOffset + 2, 1),
358
+ defaultSampleDurationPresent: getBit(buf, flagOffset + 2, 3),
359
+ defaultSampleSizePresent: getBit(buf, flagOffset + 2, 4),
360
+ defaultSampleFlagsPresent: getBit(buf, flagOffset + 2, 5),
361
+ defaultDurationIsEmpty: getBit(buf, flagOffset, 0),
362
+ defaultBaseIsMoof: getBit(buf, flagOffset, 1)
363
+ },
364
+ trackId: UINT32_BE.get(buf, 4)
365
+ };
366
+ let dynOffset = 8;
367
+ if (header.flags.baseDataOffsetPresent) {
368
+ header.baseDataOffset = UINT64_BE.get(buf, dynOffset);
369
+ dynOffset += 8;
370
+ }
371
+ if (header.flags.sampleDescriptionIndexPresent) {
372
+ header.sampleDescriptionIndex = UINT32_BE.get(buf, dynOffset);
373
+ dynOffset += 4;
374
+ }
375
+ if (header.flags.defaultSampleDurationPresent) {
376
+ header.defaultSampleDuration = UINT32_BE.get(buf, dynOffset);
377
+ dynOffset += 4;
378
+ }
379
+ if (header.flags.defaultSampleSizePresent) {
380
+ header.defaultSampleSize = UINT32_BE.get(buf, dynOffset);
381
+ dynOffset += 4;
382
+ }
383
+ if (header.flags.defaultSampleFlagsPresent) {
384
+ header.defaultSampleFlags = UINT32_BE.get(buf, dynOffset);
385
+ }
386
+ return header;
387
+ }
388
+ };
389
+ var TrackRunBox = class {
390
+ constructor(len) {
391
+ this.len = len;
392
+ }
393
+ get(buf, off) {
394
+ const flagOffset = off + 1;
395
+ const trun = {
396
+ version: INT8.get(buf, off),
397
+ flags: {
398
+ dataOffsetPresent: getBit(buf, flagOffset + 2, 0),
399
+ firstSampleFlagsPresent: getBit(buf, flagOffset + 2, 2),
400
+ sampleDurationPresent: getBit(buf, flagOffset + 1, 0),
401
+ sampleSizePresent: getBit(buf, flagOffset + 1, 1),
402
+ sampleFlagsPresent: getBit(buf, flagOffset + 1, 2),
403
+ sampleCompositionTimeOffsetsPresent: getBit(buf, flagOffset + 1, 3)
404
+ },
405
+ sampleCount: UINT32_BE.get(buf, off + 4),
406
+ samples: []
407
+ };
408
+ let dynOffset = off + 8;
409
+ if (trun.flags.dataOffsetPresent) {
410
+ trun.dataOffset = UINT32_BE.get(buf, dynOffset);
411
+ dynOffset += 4;
412
+ }
413
+ if (trun.flags.firstSampleFlagsPresent) {
414
+ trun.firstSampleFlags = UINT32_BE.get(buf, dynOffset);
415
+ dynOffset += 4;
416
+ }
417
+ for (let n = 0; n < trun.sampleCount; ++n) {
418
+ if (dynOffset >= this.len) {
419
+ debug("TrackRunBox size mismatch");
420
+ break;
421
+ }
422
+ const sample = {};
423
+ if (trun.flags.sampleDurationPresent) {
424
+ sample.sampleDuration = UINT32_BE.get(buf, dynOffset);
425
+ dynOffset += 4;
426
+ }
427
+ if (trun.flags.sampleSizePresent) {
428
+ sample.sampleSize = UINT32_BE.get(buf, dynOffset);
429
+ dynOffset += 4;
430
+ }
431
+ if (trun.flags.sampleFlagsPresent) {
432
+ sample.sampleFlags = UINT32_BE.get(buf, dynOffset);
433
+ dynOffset += 4;
434
+ }
435
+ if (trun.flags.sampleCompositionTimeOffsetsPresent) {
436
+ sample.sampleCompositionTimeOffset = UINT32_BE.get(buf, dynOffset);
437
+ dynOffset += 4;
438
+ }
439
+ trun.samples.push(sample);
440
+ }
441
+ return trun;
442
+ }
443
+ };
444
+ var HandlerBox = class {
445
+ constructor(len) {
446
+ this.len = len;
447
+ }
448
+ get(buf, off) {
449
+ const _flagOffset = off + 1;
450
+ const charTypeToken = new StringType(4, "utf-8");
451
+ return {
452
+ version: INT8.get(buf, off),
453
+ flags: UINT24_BE.get(buf, off + 1),
454
+ componentType: charTypeToken.get(buf, off + 4),
455
+ handlerType: charTypeToken.get(buf, off + 8),
456
+ componentName: new StringType(this.len - 28, "utf-8").get(buf, off + 28)
457
+ };
458
+ }
459
+ };
460
+ var ChapterTrackReferenceBox = class {
461
+ constructor(len) {
462
+ this.len = len;
463
+ }
464
+ get(buf, off) {
465
+ let dynOffset = 0;
466
+ const trackIds = [];
467
+ while (dynOffset < this.len) {
468
+ trackIds.push(UINT32_BE.get(buf, off + dynOffset));
469
+ dynOffset += 4;
470
+ }
471
+ return trackIds;
472
+ }
473
+ };
474
+
475
+ // ../../node_modules/music-metadata/lib/mp4/Atom.js
476
+ var debug2 = (0, import_debug2.default)("music-metadata:parser:MP4:Atom");
477
+ var Atom = class _Atom {
478
+ static async readAtom(tokenizer, dataHandler, parent, remaining) {
479
+ const offset = tokenizer.position;
480
+ debug2(`Reading next token on offset=${offset}...`);
481
+ const header = await tokenizer.readToken(Header);
482
+ const extended = header.length === 1n;
483
+ if (extended) {
484
+ header.length = await tokenizer.readToken(ExtendedSize);
485
+ }
486
+ const atomBean = new _Atom(header, extended, parent);
487
+ const payloadLength = atomBean.getPayloadLength(remaining);
488
+ debug2(`parse atom name=${atomBean.atomPath}, extended=${atomBean.extended}, offset=${offset}, len=${atomBean.header.length}`);
489
+ await atomBean.readData(tokenizer, dataHandler, payloadLength);
490
+ return atomBean;
491
+ }
492
+ constructor(header, extended, parent) {
493
+ this.header = header;
494
+ this.extended = extended;
495
+ this.parent = parent;
496
+ this.children = [];
497
+ this.atomPath = (this.parent ? `${this.parent.atomPath}.` : "") + this.header.name;
498
+ }
499
+ getHeaderLength() {
500
+ return this.extended ? 16 : 8;
501
+ }
502
+ getPayloadLength(remaining) {
503
+ return (this.header.length === 0n ? remaining : Number(this.header.length)) - this.getHeaderLength();
504
+ }
505
+ async readAtoms(tokenizer, dataHandler, size) {
506
+ while (size > 0) {
507
+ const atomBean = await _Atom.readAtom(tokenizer, dataHandler, this, size);
508
+ this.children.push(atomBean);
509
+ size -= atomBean.header.length === 0n ? size : Number(atomBean.header.length);
510
+ }
511
+ }
512
+ async readData(tokenizer, dataHandler, remaining) {
513
+ switch (this.header.name) {
514
+ // "Container" atoms, contains nested atoms
515
+ case "moov":
516
+ // The Movie Atom: contains other atoms
517
+ case "udta":
518
+ // User defined atom
519
+ case "mdia":
520
+ // Media atom
521
+ case "minf":
522
+ // Media Information Atom
523
+ case "stbl":
524
+ // The Sample Table Atom
525
+ case "<id>":
526
+ case "ilst":
527
+ case "tref":
528
+ case "moof":
529
+ return this.readAtoms(tokenizer, dataHandler, this.getPayloadLength(remaining));
530
+ case "meta": {
531
+ const peekHeader = await tokenizer.peekToken(Header);
532
+ const paddingLength = peekHeader.name === "hdlr" ? 0 : 4;
533
+ await tokenizer.ignore(paddingLength);
534
+ return this.readAtoms(tokenizer, dataHandler, this.getPayloadLength(remaining) - paddingLength);
535
+ }
536
+ default:
537
+ return dataHandler(this, remaining);
538
+ }
539
+ }
540
+ };
541
+
542
+ // ../../node_modules/music-metadata/lib/mp4/MP4Parser.js
543
+ var debug3 = (0, import_debug3.default)("music-metadata:parser:MP4");
544
+ var tagFormat = "iTunes";
545
+ var encoderDict = {
546
+ raw: {
547
+ lossy: false,
548
+ format: "raw"
549
+ },
550
+ MAC3: {
551
+ lossy: true,
552
+ format: "MACE 3:1"
553
+ },
554
+ MAC6: {
555
+ lossy: true,
556
+ format: "MACE 6:1"
557
+ },
558
+ ima4: {
559
+ lossy: true,
560
+ format: "IMA 4:1"
561
+ },
562
+ ulaw: {
563
+ lossy: true,
564
+ format: "uLaw 2:1"
565
+ },
566
+ alaw: {
567
+ lossy: true,
568
+ format: "uLaw 2:1"
569
+ },
570
+ Qclp: {
571
+ lossy: true,
572
+ format: "QUALCOMM PureVoice"
573
+ },
574
+ ".mp3": {
575
+ lossy: true,
576
+ format: "MPEG-1 layer 3"
577
+ },
578
+ alac: {
579
+ lossy: false,
580
+ format: "ALAC"
581
+ },
582
+ "ac-3": {
583
+ lossy: true,
584
+ format: "AC-3"
585
+ },
586
+ mp4a: {
587
+ lossy: true,
588
+ format: "MPEG-4/AAC"
589
+ },
590
+ mp4s: {
591
+ lossy: true,
592
+ format: "MP4S"
593
+ },
594
+ // Closed Captioning Media, https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-SW87
595
+ c608: {
596
+ lossy: true,
597
+ format: "CEA-608"
598
+ },
599
+ c708: {
600
+ lossy: true,
601
+ format: "CEA-708"
602
+ }
603
+ };
604
+ function distinct(value, index, self) {
605
+ return self.indexOf(value) === index;
606
+ }
607
+ var MP4Parser = class _MP4Parser extends BasicParser {
608
+ constructor() {
609
+ super(...arguments);
610
+ this.tracks = /* @__PURE__ */ new Map();
611
+ this.hasVideoTrack = false;
612
+ this.hasAudioTrack = true;
613
+ this.atomParsers = {
614
+ /**
615
+ * Parse movie header (mvhd) atom
616
+ * Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-56313
617
+ */
618
+ mvhd: async (len) => {
619
+ const mvhd = await this.tokenizer.readToken(new MvhdAtom(len));
620
+ this.metadata.setFormat("creationTime", mvhd.creationTime);
621
+ this.metadata.setFormat("modificationTime", mvhd.modificationTime);
622
+ },
623
+ chap: async (len) => {
624
+ const td = this.getTrackDescription();
625
+ const trackIds = [];
626
+ while (len >= UINT32_BE.len) {
627
+ trackIds.push(await this.tokenizer.readNumber(UINT32_BE));
628
+ len -= UINT32_BE.len;
629
+ }
630
+ td.chapterList = trackIds;
631
+ },
632
+ /**
633
+ * Parse mdat atom.
634
+ * Will scan for chapters
635
+ */
636
+ mdat: async (len) => {
637
+ if (this.options.includeChapters) {
638
+ const trackWithChapters = [...this.tracks.values()].filter((track) => track.chapterList);
639
+ if (trackWithChapters.length === 1) {
640
+ const chapterTrackIds = trackWithChapters[0].chapterList;
641
+ const chapterTracks = [...this.tracks.values()].filter((track) => chapterTrackIds.indexOf(track.header.trackId) !== -1);
642
+ if (chapterTracks.length === 1) {
643
+ return this.parseChapterTrack(chapterTracks[0], trackWithChapters[0], len);
644
+ }
645
+ }
646
+ }
647
+ await this.tokenizer.ignore(len);
648
+ },
649
+ ftyp: async (len) => {
650
+ const types = [];
651
+ while (len > 0) {
652
+ const ftype = await this.tokenizer.readToken(ftyp);
653
+ len -= ftyp.len;
654
+ const value = ftype.type.replace(/\W/g, "");
655
+ if (value.length > 0) {
656
+ types.push(value);
657
+ }
658
+ }
659
+ debug3(`ftyp: ${types.join("/")}`);
660
+ const x = types.filter(distinct).join("/");
661
+ this.metadata.setFormat("container", x);
662
+ },
663
+ /**
664
+ * Parse sample description atom
665
+ */
666
+ stsd: async (len) => {
667
+ const stsd = await this.tokenizer.readToken(new StsdAtom(len));
668
+ const trackDescription = this.getTrackDescription();
669
+ trackDescription.soundSampleDescription = stsd.table.map((dfEntry) => this.parseSoundSampleDescription(dfEntry));
670
+ },
671
+ /**
672
+ * Parse sample-sizes atom ('stsz')
673
+ */
674
+ stsz: async (len) => {
675
+ const stsz = await this.tokenizer.readToken(new StszAtom(len));
676
+ const td = this.getTrackDescription();
677
+ td.sampleSize = stsz.sampleSize;
678
+ td.sampleSizeTable = stsz.entries;
679
+ },
680
+ date: async (len) => {
681
+ const date = await this.tokenizer.readToken(new StringType(len, "utf-8"));
682
+ await this.addTag("date", date);
683
+ }
684
+ };
685
+ }
686
+ static read_BE_Integer(array, signed) {
687
+ const integerType = (signed ? "INT" : "UINT") + array.length * 8 + (array.length > 1 ? "_BE" : "");
688
+ const token = lib_exports[integerType];
689
+ if (!token) {
690
+ throw new Mp4ContentError(`Token for integer type not found: "${integerType}"`);
691
+ }
692
+ return Number(token.get(array, 0));
693
+ }
694
+ async parse() {
695
+ this.hasVideoTrack = false;
696
+ this.hasAudioTrack = true;
697
+ this.tracks.clear();
698
+ let remainingFileSize = this.tokenizer.fileInfo.size || 0;
699
+ while (!this.tokenizer.fileInfo.size || remainingFileSize > 0) {
700
+ try {
701
+ const token = await this.tokenizer.peekToken(Header);
702
+ if (token.name === "\0\0\0\0") {
703
+ const errMsg = `Error at offset=${this.tokenizer.position}: box.id=0`;
704
+ debug3(errMsg);
705
+ this.addWarning(errMsg);
706
+ break;
707
+ }
708
+ } catch (error) {
709
+ if (error instanceof Error) {
710
+ const errMsg = `Error at offset=${this.tokenizer.position}: ${error.message}`;
711
+ debug3(errMsg);
712
+ this.addWarning(errMsg);
713
+ } else
714
+ throw error;
715
+ break;
716
+ }
717
+ const rootAtom = await Atom.readAtom(this.tokenizer, (atom, remaining) => this.handleAtom(atom, remaining), null, remainingFileSize);
718
+ remainingFileSize -= rootAtom.header.length === BigInt(0) ? remainingFileSize : Number(rootAtom.header.length);
719
+ }
720
+ const formatList = [];
721
+ this.tracks.forEach((track) => {
722
+ const trackFormats = [];
723
+ track.soundSampleDescription.forEach((ssd) => {
724
+ const streamInfo = {};
725
+ const encoderInfo = encoderDict[ssd.dataFormat];
726
+ if (encoderInfo) {
727
+ trackFormats.push(encoderInfo.format);
728
+ streamInfo.codecName = encoderInfo.format;
729
+ } else {
730
+ streamInfo.codecName = `<${ssd.dataFormat}>`;
731
+ }
732
+ if (ssd.description) {
733
+ const { description } = ssd;
734
+ if (description.sampleRate > 0) {
735
+ streamInfo.type = TrackType.audio;
736
+ streamInfo.audio = {
737
+ samplingFrequency: description.sampleRate,
738
+ bitDepth: description.sampleSize,
739
+ channels: description.numAudioChannels
740
+ };
741
+ }
742
+ }
743
+ this.metadata.addStreamInfo(streamInfo);
744
+ });
745
+ if (trackFormats.length >= 1) {
746
+ formatList.push(trackFormats.join("/"));
747
+ }
748
+ });
749
+ if (formatList.length > 0) {
750
+ this.metadata.setFormat("codec", formatList.filter(distinct).join("+"));
751
+ }
752
+ const audioTracks = [...this.tracks.values()].filter((track) => {
753
+ return track.soundSampleDescription.length >= 1 && track.soundSampleDescription[0].description && track.soundSampleDescription[0].description.numAudioChannels > 0;
754
+ });
755
+ for (const audioTrack of audioTracks) {
756
+ if (audioTrack.media.header && audioTrack.media.header.timeScale > 0) {
757
+ audioTrack.sampleRate = audioTrack.media.header.timeScale;
758
+ if (audioTrack.media.header.duration > 0) {
759
+ debug3("Using duration defined on audio track");
760
+ audioTrack.samples = audioTrack.media.header.duration;
761
+ audioTrack.duration = audioTrack.samples / audioTrack.sampleRate;
762
+ }
763
+ if (audioTrack.fragments.length > 0) {
764
+ debug3("Calculate duration defined in track fragments");
765
+ let totalTimeUnits = 0;
766
+ audioTrack.sizeInBytes = 0;
767
+ for (const fragment of audioTrack.fragments) {
768
+ for (const sample of fragment.trackRun.samples) {
769
+ const dur = sample.sampleDuration ?? fragment.header.defaultSampleDuration ?? 0;
770
+ const size = sample.sampleSize ?? fragment.header.defaultSampleSize ?? 0;
771
+ if (dur === 0) {
772
+ throw new Error("Missing sampleDuration and no defaultSampleDuration in track fragment header");
773
+ }
774
+ if (size === 0) {
775
+ throw new Error("Missing sampleSize and no defaultSampleSize in track fragment header");
776
+ }
777
+ totalTimeUnits += dur;
778
+ audioTrack.sizeInBytes += size;
779
+ }
780
+ }
781
+ if (!audioTrack.samples) {
782
+ audioTrack.samples = totalTimeUnits;
783
+ }
784
+ if (!audioTrack.duration) {
785
+ audioTrack.duration = totalTimeUnits / audioTrack.sampleRate;
786
+ }
787
+ } else if (audioTrack.sampleSizeTable.length > 0) {
788
+ audioTrack.sizeInBytes = audioTrack.sampleSizeTable.reduce((sum, n) => sum + n, 0);
789
+ }
790
+ }
791
+ const ssd = audioTrack.soundSampleDescription[0];
792
+ if (ssd.description && audioTrack.media.header) {
793
+ this.metadata.setFormat("sampleRate", ssd.description.sampleRate);
794
+ this.metadata.setFormat("bitsPerSample", ssd.description.sampleSize);
795
+ this.metadata.setFormat("numberOfChannels", ssd.description.numAudioChannels);
796
+ if (audioTrack.media.header.timeScale === 0 && audioTrack.timeToSampleTable.length > 0) {
797
+ const totalSampleSize = audioTrack.timeToSampleTable.map((ttstEntry) => ttstEntry.count * ttstEntry.duration).reduce((total, sampleSize) => total + sampleSize);
798
+ audioTrack.duration = totalSampleSize / ssd.description.sampleRate;
799
+ }
800
+ }
801
+ const encoderInfo = encoderDict[ssd.dataFormat];
802
+ if (encoderInfo) {
803
+ this.metadata.setFormat("lossless", !encoderInfo.lossy);
804
+ }
805
+ }
806
+ if (audioTracks.length >= 1) {
807
+ const firstAudioTrack = audioTracks[0];
808
+ if (firstAudioTrack.duration) {
809
+ this.metadata.setFormat("duration", firstAudioTrack.duration);
810
+ if (firstAudioTrack.sizeInBytes) {
811
+ this.metadata.setFormat("bitrate", 8 * firstAudioTrack.sizeInBytes / firstAudioTrack.duration);
812
+ }
813
+ }
814
+ }
815
+ this.metadata.setFormat("hasAudio", this.hasAudioTrack);
816
+ this.metadata.setFormat("hasVideo", this.hasVideoTrack);
817
+ }
818
+ async handleAtom(atom, remaining) {
819
+ if (atom.parent) {
820
+ switch (atom.parent.header.name) {
821
+ case "ilst":
822
+ case "<id>":
823
+ return this.parseMetadataItemData(atom);
824
+ case "moov":
825
+ switch (atom.header.name) {
826
+ case "trak":
827
+ return this.parseTrackBox(atom);
828
+ case "udta":
829
+ return this.parseTrackBox(atom);
830
+ }
831
+ break;
832
+ case "moof":
833
+ switch (atom.header.name) {
834
+ case "traf":
835
+ return this.parseTrackFragmentBox(atom);
836
+ }
837
+ }
838
+ }
839
+ if (this.atomParsers[atom.header.name]) {
840
+ return this.atomParsers[atom.header.name](remaining);
841
+ }
842
+ debug3(`No parser for atom path=${atom.atomPath}, payload-len=${remaining}, ignoring atom`);
843
+ await this.tokenizer.ignore(remaining);
844
+ }
845
+ getTrackDescription() {
846
+ const tracks = [...this.tracks.values()];
847
+ return tracks[tracks.length - 1];
848
+ }
849
+ async addTag(id, value) {
850
+ await this.metadata.addTag(tagFormat, id, value);
851
+ }
852
+ addWarning(message) {
853
+ debug3(`Warning: ${message}`);
854
+ this.metadata.addWarning(message);
855
+ }
856
+ /**
857
+ * Parse data of Meta-item-list-atom (item of 'ilst' atom)
858
+ * @param metaAtom
859
+ * Ref: https://developer.apple.com/library/content/documentation/QuickTime/QTFF/Metadata/Metadata.html#//apple_ref/doc/uid/TP40000939-CH1-SW8
860
+ */
861
+ parseMetadataItemData(metaAtom) {
862
+ let tagKey = metaAtom.header.name;
863
+ return metaAtom.readAtoms(this.tokenizer, async (child, remaining) => {
864
+ const payLoadLength = child.getPayloadLength(remaining);
865
+ switch (child.header.name) {
866
+ case "data":
867
+ return this.parseValueAtom(tagKey, child);
868
+ case "name":
869
+ // name atom (optional)
870
+ case "mean":
871
+ case "rate": {
872
+ const name = await this.tokenizer.readToken(new NameAtom(payLoadLength));
873
+ tagKey += `:${name.name}`;
874
+ break;
875
+ }
876
+ default: {
877
+ const uint8Array = await this.tokenizer.readToken(new Uint8ArrayType(payLoadLength));
878
+ this.addWarning(`Unsupported meta-item: ${tagKey}[${child.header.name}] => value=${uint8ArrayToHex(uint8Array)} ascii=${textDecode(uint8Array, "ascii")}`);
879
+ }
880
+ }
881
+ }, metaAtom.getPayloadLength(0));
882
+ }
883
+ async parseValueAtom(tagKey, metaAtom) {
884
+ const dataAtom = await this.tokenizer.readToken(new DataAtom(Number(metaAtom.header.length) - Header.len));
885
+ if (dataAtom.type.set !== 0) {
886
+ throw new Mp4ContentError(`Unsupported type-set != 0: ${dataAtom.type.set}`);
887
+ }
888
+ switch (dataAtom.type.type) {
889
+ case 0:
890
+ switch (tagKey) {
891
+ case "trkn":
892
+ case "disk": {
893
+ const num = UINT8.get(dataAtom.value, 3);
894
+ const of = UINT8.get(dataAtom.value, 5);
895
+ await this.addTag(tagKey, `${num}/${of}`);
896
+ break;
897
+ }
898
+ case "gnre": {
899
+ const genreInt = UINT8.get(dataAtom.value, 1);
900
+ const genreStr = Genres[genreInt - 1];
901
+ await this.addTag(tagKey, genreStr);
902
+ break;
903
+ }
904
+ case "rate": {
905
+ const rate = textDecode(dataAtom.value, "ascii");
906
+ await this.addTag(tagKey, rate);
907
+ break;
908
+ }
909
+ default:
910
+ debug3(`unknown proprietary value type for: ${metaAtom.atomPath}`);
911
+ }
912
+ break;
913
+ case 1:
914
+ // UTF-8: Without any count or NULL terminator
915
+ case 18:
916
+ await this.addTag(tagKey, textDecode(dataAtom.value));
917
+ break;
918
+ case 13:
919
+ if (this.options.skipCovers)
920
+ break;
921
+ await this.addTag(tagKey, {
922
+ format: "image/jpeg",
923
+ data: Uint8Array.from(dataAtom.value)
924
+ });
925
+ break;
926
+ case 14:
927
+ if (this.options.skipCovers)
928
+ break;
929
+ await this.addTag(tagKey, {
930
+ format: "image/png",
931
+ data: Uint8Array.from(dataAtom.value)
932
+ });
933
+ break;
934
+ case 21:
935
+ await this.addTag(tagKey, _MP4Parser.read_BE_Integer(dataAtom.value, true));
936
+ break;
937
+ case 22:
938
+ await this.addTag(tagKey, _MP4Parser.read_BE_Integer(dataAtom.value, false));
939
+ break;
940
+ case 65:
941
+ await this.addTag(tagKey, UINT8.get(dataAtom.value, 0));
942
+ break;
943
+ case 66:
944
+ await this.addTag(tagKey, UINT16_BE.get(dataAtom.value, 0));
945
+ break;
946
+ case 67:
947
+ await this.addTag(tagKey, UINT32_BE.get(dataAtom.value, 0));
948
+ break;
949
+ default:
950
+ this.addWarning(`atom key=${tagKey}, has unknown well-known-type (data-type): ${dataAtom.type.type}`);
951
+ }
952
+ }
953
+ async parseTrackBox(trakBox) {
954
+ const track = {
955
+ media: {},
956
+ fragments: []
957
+ };
958
+ await trakBox.readAtoms(this.tokenizer, async (child, remaining) => {
959
+ const payLoadLength = child.getPayloadLength(remaining);
960
+ switch (child.header.name) {
961
+ case "chap": {
962
+ const chap = await this.tokenizer.readToken(new ChapterTrackReferenceBox(remaining));
963
+ track.chapterList = chap;
964
+ break;
965
+ }
966
+ case "tkhd":
967
+ track.header = await this.tokenizer.readToken(new TrackHeaderAtom(payLoadLength));
968
+ break;
969
+ case "hdlr":
970
+ track.handler = await this.tokenizer.readToken(new HandlerBox(payLoadLength));
971
+ track.isAudio = () => track.handler.handlerType === "audi" || track.handler.handlerType === "soun";
972
+ track.isVideo = () => track.handler.handlerType === "vide";
973
+ if (track.isAudio()) {
974
+ this.hasAudioTrack = true;
975
+ } else if (track.isVideo()) {
976
+ this.hasVideoTrack = true;
977
+ }
978
+ break;
979
+ case "mdhd": {
980
+ const mdhd_data = await this.tokenizer.readToken(new MdhdAtom(payLoadLength));
981
+ track.media.header = mdhd_data;
982
+ break;
983
+ }
984
+ case "stco": {
985
+ const stco = await this.tokenizer.readToken(new StcoAtom(payLoadLength));
986
+ track.chunkOffsetTable = stco.entries;
987
+ break;
988
+ }
989
+ case "stsc": {
990
+ const stsc = await this.tokenizer.readToken(new StscAtom(payLoadLength));
991
+ track.sampleToChunkTable = stsc.entries;
992
+ break;
993
+ }
994
+ case "stsd": {
995
+ const stsd = await this.tokenizer.readToken(new StsdAtom(payLoadLength));
996
+ track.soundSampleDescription = stsd.table.map((dfEntry) => this.parseSoundSampleDescription(dfEntry));
997
+ break;
998
+ }
999
+ case "stts": {
1000
+ const stts = await this.tokenizer.readToken(new SttsAtom(payLoadLength));
1001
+ track.timeToSampleTable = stts.entries;
1002
+ break;
1003
+ }
1004
+ case "stsz": {
1005
+ const stsz = await this.tokenizer.readToken(new StszAtom(payLoadLength));
1006
+ track.sampleSize = stsz.sampleSize;
1007
+ track.sampleSizeTable = stsz.entries;
1008
+ break;
1009
+ }
1010
+ case "dinf":
1011
+ case "vmhd":
1012
+ case "smhd":
1013
+ debug3(`Ignoring: ${child.header.name}`);
1014
+ await this.tokenizer.ignore(payLoadLength);
1015
+ break;
1016
+ default: {
1017
+ debug3(`Unexpected track box: ${child.header.name}`);
1018
+ await this.tokenizer.ignore(payLoadLength);
1019
+ }
1020
+ }
1021
+ }, trakBox.getPayloadLength(0));
1022
+ this.tracks.set(track.header.trackId, track);
1023
+ }
1024
+ parseTrackFragmentBox(trafBox) {
1025
+ let tfhd;
1026
+ return trafBox.readAtoms(this.tokenizer, async (child, remaining) => {
1027
+ const payLoadLength = child.getPayloadLength(remaining);
1028
+ switch (child.header.name) {
1029
+ case "tfhd": {
1030
+ const fragmentHeaderBox = new TrackFragmentHeaderBox(child.getPayloadLength(remaining));
1031
+ tfhd = await this.tokenizer.readToken(fragmentHeaderBox);
1032
+ break;
1033
+ }
1034
+ case "tfdt":
1035
+ await this.tokenizer.ignore(payLoadLength);
1036
+ break;
1037
+ case "trun": {
1038
+ const trackRunBox = new TrackRunBox(payLoadLength);
1039
+ const trun = await this.tokenizer.readToken(trackRunBox);
1040
+ if (tfhd) {
1041
+ const track = this.tracks.get(tfhd.trackId);
1042
+ track?.fragments.push({ header: tfhd, trackRun: trun });
1043
+ }
1044
+ break;
1045
+ }
1046
+ default: {
1047
+ debug3(`Unexpected box: ${child.header.name}`);
1048
+ await this.tokenizer.ignore(payLoadLength);
1049
+ }
1050
+ }
1051
+ }, trafBox.getPayloadLength(0));
1052
+ }
1053
+ /**
1054
+ * @param sampleDescription
1055
+ * Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-128916
1056
+ */
1057
+ parseSoundSampleDescription(sampleDescription) {
1058
+ const ssd = {
1059
+ dataFormat: sampleDescription.dataFormat,
1060
+ dataReferenceIndex: sampleDescription.dataReferenceIndex
1061
+ };
1062
+ let offset = 0;
1063
+ if (sampleDescription.description) {
1064
+ const version = SoundSampleDescriptionVersion.get(sampleDescription.description, offset);
1065
+ offset += SoundSampleDescriptionVersion.len;
1066
+ if (version.version === 0 || version.version === 1) {
1067
+ ssd.description = SoundSampleDescriptionV0.get(sampleDescription.description, offset);
1068
+ } else {
1069
+ debug3(`Warning: sound-sample-description ${version} not implemented`);
1070
+ }
1071
+ }
1072
+ return ssd;
1073
+ }
1074
+ async parseChapterTrack(chapterTrack, track, len) {
1075
+ if (!chapterTrack.sampleSize) {
1076
+ if (chapterTrack.chunkOffsetTable.length !== chapterTrack.sampleSizeTable.length)
1077
+ throw new Error("Expected equal chunk-offset-table & sample-size-table length.");
1078
+ }
1079
+ const chapters = [];
1080
+ for (let i = 0; i < chapterTrack.chunkOffsetTable.length && len > 0; ++i) {
1081
+ const start = chapterTrack.timeToSampleTable.slice(0, i).reduce((acc, cur) => acc + cur.duration, 0);
1082
+ const chunkOffset = chapterTrack.chunkOffsetTable[i];
1083
+ const nextChunkLen = chunkOffset - this.tokenizer.position;
1084
+ const sampleSize = chapterTrack.sampleSize > 0 ? chapterTrack.sampleSize : chapterTrack.sampleSizeTable[i];
1085
+ len -= nextChunkLen + sampleSize;
1086
+ if (len < 0)
1087
+ throw new Mp4ContentError("Chapter chunk exceeding token length");
1088
+ await this.tokenizer.ignore(nextChunkLen);
1089
+ const title = await this.tokenizer.readToken(new ChapterText(sampleSize));
1090
+ debug3(`Chapter ${i + 1}: ${title}`);
1091
+ const chapter = {
1092
+ title,
1093
+ timeScale: chapterTrack.media.header ? chapterTrack.media.header.timeScale : 0,
1094
+ start,
1095
+ sampleOffset: this.findSampleOffset(track, this.tokenizer.position)
1096
+ };
1097
+ debug3(`Chapter title=${chapter.title}, offset=${chapter.sampleOffset}/${track.header.duration}`);
1098
+ chapters.push(chapter);
1099
+ }
1100
+ this.metadata.setFormat("chapters", chapters);
1101
+ await this.tokenizer.ignore(len);
1102
+ }
1103
+ findSampleOffset(track, chapterOffset) {
1104
+ let chunkIndex = 0;
1105
+ while (chunkIndex < track.chunkOffsetTable.length && track.chunkOffsetTable[chunkIndex] < chapterOffset) {
1106
+ ++chunkIndex;
1107
+ }
1108
+ return this.getChunkDuration(chunkIndex + 1, track);
1109
+ }
1110
+ getChunkDuration(chunkId, track) {
1111
+ let ttsi = 0;
1112
+ let ttsc = track.timeToSampleTable[ttsi].count;
1113
+ let ttsd = track.timeToSampleTable[ttsi].duration;
1114
+ let curChunkId = 1;
1115
+ let samplesPerChunk = this.getSamplesPerChunk(curChunkId, track.sampleToChunkTable);
1116
+ let totalDuration = 0;
1117
+ while (curChunkId < chunkId) {
1118
+ const nrOfSamples = Math.min(ttsc, samplesPerChunk);
1119
+ totalDuration += nrOfSamples * ttsd;
1120
+ ttsc -= nrOfSamples;
1121
+ samplesPerChunk -= nrOfSamples;
1122
+ if (samplesPerChunk === 0) {
1123
+ ++curChunkId;
1124
+ samplesPerChunk = this.getSamplesPerChunk(curChunkId, track.sampleToChunkTable);
1125
+ } else {
1126
+ ++ttsi;
1127
+ ttsc = track.timeToSampleTable[ttsi].count;
1128
+ ttsd = track.timeToSampleTable[ttsi].duration;
1129
+ }
1130
+ }
1131
+ return totalDuration;
1132
+ }
1133
+ getSamplesPerChunk(chunkId, stcTable) {
1134
+ for (let i = 0; i < stcTable.length - 1; ++i) {
1135
+ if (chunkId >= stcTable[i].firstChunk && chunkId < stcTable[i + 1].firstChunk) {
1136
+ return stcTable[i].samplesPerChunk;
1137
+ }
1138
+ }
1139
+ return stcTable[stcTable.length - 1].samplesPerChunk;
1140
+ }
1141
+ };
1142
+ export {
1143
+ MP4Parser
1144
+ };
1145
+ //# sourceMappingURL=MP4Parser-64RGJLUM.js.map