@carbonenginejs/runtime-resource 0.1.0

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 (372) hide show
  1. package/FORMAT-PROVENANCE.md +135 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE +29 -0
  4. package/README.md +241 -0
  5. package/dist/CjsMotherLode.js +56 -0
  6. package/dist/CjsMotherLode.js.map +1 -0
  7. package/dist/CjsResMan.js +740 -0
  8. package/dist/CjsResMan.js.map +1 -0
  9. package/dist/CjsResManQueue.js +214 -0
  10. package/dist/CjsResManQueue.js.map +1 -0
  11. package/dist/CjsResource.js +366 -0
  12. package/dist/CjsResource.js.map +1 -0
  13. package/dist/CjsResourceSource.js +59 -0
  14. package/dist/CjsResourceSource.js.map +1 -0
  15. package/dist/_virtual/_rollupPluginBabelHelpers.js +153 -0
  16. package/dist/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  17. package/dist/format/CjsFormat.js +178 -0
  18. package/dist/format/CjsFormat.js.map +1 -0
  19. package/dist/format/CjsResourceProbe.js +269 -0
  20. package/dist/format/CjsResourceProbe.js.map +1 -0
  21. package/dist/format/payloadContract.js +173 -0
  22. package/dist/format/payloadContract.js.map +1 -0
  23. package/dist/formats/black/CjsBlackFormat.js +272 -0
  24. package/dist/formats/black/CjsBlackFormat.js.map +1 -0
  25. package/dist/formats/black/core/CjsBlackBinaryReader.js +153 -0
  26. package/dist/formats/black/core/CjsBlackBinaryReader.js.map +1 -0
  27. package/dist/formats/black/core/CjsBlackPropertyReaders.js +382 -0
  28. package/dist/formats/black/core/CjsBlackPropertyReaders.js.map +1 -0
  29. package/dist/formats/black/core/CjsBlackReader.js +760 -0
  30. package/dist/formats/black/core/CjsBlackReader.js.map +1 -0
  31. package/dist/formats/black/core/CjsBlackSchemaRegistry.js +433 -0
  32. package/dist/formats/black/core/CjsBlackSchemaRegistry.js.map +1 -0
  33. package/dist/formats/black/core/black-schema-v1-2026-07-11.json.js +4 -0
  34. package/dist/formats/black/core/black-schema-v1-2026-07-11.json.js.map +1 -0
  35. package/dist/formats/black/core/blackConstants.js +7 -0
  36. package/dist/formats/black/core/blackConstants.js.map +1 -0
  37. package/dist/formats/black/core/blackDefinitions.js +10 -0
  38. package/dist/formats/black/core/blackDefinitions.js.map +1 -0
  39. package/dist/formats/black/core/blackEnums.js +6 -0
  40. package/dist/formats/black/core/blackEnums.js.map +1 -0
  41. package/dist/formats/black/core/blackSchema.js +3 -0
  42. package/dist/formats/black/core/blackSchema.js.map +1 -0
  43. package/dist/formats/black/core/blackVersion.js +22 -0
  44. package/dist/formats/black/core/blackVersion.js.map +1 -0
  45. package/dist/formats/black/core/helpers.js +182 -0
  46. package/dist/formats/black/core/helpers.js.map +1 -0
  47. package/dist/formats/black/core/schema.js +4 -0
  48. package/dist/formats/black/core/schema.js.map +1 -0
  49. package/dist/formats/black/index.js +2 -0
  50. package/dist/formats/black/index.js.map +1 -0
  51. package/dist/formats/bnk/CjsBnkFormat.js +245 -0
  52. package/dist/formats/bnk/CjsBnkFormat.js.map +1 -0
  53. package/dist/formats/bnk/core/helpers.js +354 -0
  54. package/dist/formats/bnk/core/helpers.js.map +1 -0
  55. package/dist/formats/bnk/core/soundbanksInfo.js +246 -0
  56. package/dist/formats/bnk/core/soundbanksInfo.js.map +1 -0
  57. package/dist/formats/bnk/index.js +3 -0
  58. package/dist/formats/bnk/index.js.map +1 -0
  59. package/dist/formats/cmf/CjsCmfFormat.js +491 -0
  60. package/dist/formats/cmf/CjsCmfFormat.js.map +1 -0
  61. package/dist/formats/cmf/core/binary.js +118 -0
  62. package/dist/formats/cmf/core/binary.js.map +1 -0
  63. package/dist/formats/cmf/core/buffers.js +233 -0
  64. package/dist/formats/cmf/core/buffers.js.map +1 -0
  65. package/dist/formats/cmf/core/constants.js +47 -0
  66. package/dist/formats/cmf/core/constants.js.map +1 -0
  67. package/dist/formats/cmf/core/gr2Anim.js +453 -0
  68. package/dist/formats/cmf/core/gr2Anim.js.map +1 -0
  69. package/dist/formats/cmf/core/helpers.js +287 -0
  70. package/dist/formats/cmf/core/helpers.js.map +1 -0
  71. package/dist/formats/cmf/core/pack.js +276 -0
  72. package/dist/formats/cmf/core/pack.js.map +1 -0
  73. package/dist/formats/cmf/core/schema.js +364 -0
  74. package/dist/formats/cmf/core/schema.js.map +1 -0
  75. package/dist/formats/cmf/core/shared.js +268 -0
  76. package/dist/formats/cmf/core/shared.js.map +1 -0
  77. package/dist/formats/cmf/core/writer.js +517 -0
  78. package/dist/formats/cmf/core/writer.js.map +1 -0
  79. package/dist/formats/cmf/index.js +2 -0
  80. package/dist/formats/cmf/index.js.map +1 -0
  81. package/dist/formats/dds/CjsDdsFormat.js +187 -0
  82. package/dist/formats/dds/CjsDdsFormat.js.map +1 -0
  83. package/dist/formats/dds/core/helpers.js +812 -0
  84. package/dist/formats/dds/core/helpers.js.map +1 -0
  85. package/dist/formats/dds/index.js +2 -0
  86. package/dist/formats/dds/index.js.map +1 -0
  87. package/dist/formats/fbx/CjsFbxFormat.js +260 -0
  88. package/dist/formats/fbx/CjsFbxFormat.js.map +1 -0
  89. package/dist/formats/fbx/core/helpers.js +3901 -0
  90. package/dist/formats/fbx/core/helpers.js.map +1 -0
  91. package/dist/formats/fbx/index.js +2 -0
  92. package/dist/formats/fbx/index.js.map +1 -0
  93. package/dist/formats/flac/CjsFlacFormat.js +81 -0
  94. package/dist/formats/flac/CjsFlacFormat.js.map +1 -0
  95. package/dist/formats/flac/core/helpers.js +295 -0
  96. package/dist/formats/flac/core/helpers.js.map +1 -0
  97. package/dist/formats/flac/index.js +2 -0
  98. package/dist/formats/flac/index.js.map +1 -0
  99. package/dist/formats/gif/CjsGifFormat.js +81 -0
  100. package/dist/formats/gif/CjsGifFormat.js.map +1 -0
  101. package/dist/formats/gif/core/helpers.js +360 -0
  102. package/dist/formats/gif/core/helpers.js.map +1 -0
  103. package/dist/formats/gif/index.js +2 -0
  104. package/dist/formats/gif/index.js.map +1 -0
  105. package/dist/formats/gltf/CjsGltfFormat.js +284 -0
  106. package/dist/formats/gltf/CjsGltfFormat.js.map +1 -0
  107. package/dist/formats/gltf/core/helpers.js +292 -0
  108. package/dist/formats/gltf/core/helpers.js.map +1 -0
  109. package/dist/formats/gltf/core/json.js +79 -0
  110. package/dist/formats/gltf/core/json.js.map +1 -0
  111. package/dist/formats/gltf/core/parser.js +666 -0
  112. package/dist/formats/gltf/core/parser.js.map +1 -0
  113. package/dist/formats/gltf/core/targets.js +163 -0
  114. package/dist/formats/gltf/core/targets.js.map +1 -0
  115. package/dist/formats/gltf/index.js +2 -0
  116. package/dist/formats/gltf/index.js.map +1 -0
  117. package/dist/formats/index.js +23 -0
  118. package/dist/formats/index.js.map +1 -0
  119. package/dist/formats/jpeg/CjsJpegFormat.js +200 -0
  120. package/dist/formats/jpeg/CjsJpegFormat.js.map +1 -0
  121. package/dist/formats/jpeg/core/helpers.js +350 -0
  122. package/dist/formats/jpeg/core/helpers.js.map +1 -0
  123. package/dist/formats/jpeg/core/jpeg.js +377 -0
  124. package/dist/formats/jpeg/core/jpeg.js.map +1 -0
  125. package/dist/formats/jpeg/index.js +2 -0
  126. package/dist/formats/jpeg/index.js.map +1 -0
  127. package/dist/formats/mp3/CjsMp3Format.js +186 -0
  128. package/dist/formats/mp3/CjsMp3Format.js.map +1 -0
  129. package/dist/formats/mp3/core/helpers.js +338 -0
  130. package/dist/formats/mp3/core/helpers.js.map +1 -0
  131. package/dist/formats/mp3/index.js +2 -0
  132. package/dist/formats/mp3/index.js.map +1 -0
  133. package/dist/formats/mp4/CjsMp4Format.js +185 -0
  134. package/dist/formats/mp4/CjsMp4Format.js.map +1 -0
  135. package/dist/formats/mp4/core/helpers.js +449 -0
  136. package/dist/formats/mp4/core/helpers.js.map +1 -0
  137. package/dist/formats/mp4/index.js +2 -0
  138. package/dist/formats/mp4/index.js.map +1 -0
  139. package/dist/formats/obj/CjsObjFormat.js +247 -0
  140. package/dist/formats/obj/CjsObjFormat.js.map +1 -0
  141. package/dist/formats/obj/core/helpers.js +573 -0
  142. package/dist/formats/obj/core/helpers.js.map +1 -0
  143. package/dist/formats/obj/core/json.js +64 -0
  144. package/dist/formats/obj/core/json.js.map +1 -0
  145. package/dist/formats/obj/core/parser.js +321 -0
  146. package/dist/formats/obj/core/parser.js.map +1 -0
  147. package/dist/formats/obj/index.js +2 -0
  148. package/dist/formats/obj/index.js.map +1 -0
  149. package/dist/formats/ogg/CjsOggFormat.js +82 -0
  150. package/dist/formats/ogg/CjsOggFormat.js.map +1 -0
  151. package/dist/formats/ogg/core/helpers.js +387 -0
  152. package/dist/formats/ogg/core/helpers.js.map +1 -0
  153. package/dist/formats/ogg/core/imdct.js +178 -0
  154. package/dist/formats/ogg/core/imdct.js.map +1 -0
  155. package/dist/formats/ogg/core/vorbis.js +999 -0
  156. package/dist/formats/ogg/core/vorbis.js.map +1 -0
  157. package/dist/formats/ogg/index.js +2 -0
  158. package/dist/formats/ogg/index.js.map +1 -0
  159. package/dist/formats/png/CjsPngFormat.js +189 -0
  160. package/dist/formats/png/CjsPngFormat.js.map +1 -0
  161. package/dist/formats/png/core/helpers.js +583 -0
  162. package/dist/formats/png/core/helpers.js.map +1 -0
  163. package/dist/formats/png/index.js +2 -0
  164. package/dist/formats/png/index.js.map +1 -0
  165. package/dist/formats/red/CjsRedFormat.js +247 -0
  166. package/dist/formats/red/CjsRedFormat.js.map +1 -0
  167. package/dist/formats/red/core/CjsRedReader.js +201 -0
  168. package/dist/formats/red/core/CjsRedReader.js.map +1 -0
  169. package/dist/formats/red/core/blackDefinitions.js +3 -0
  170. package/dist/formats/red/core/blackDefinitions.js.map +1 -0
  171. package/dist/formats/red/core/helpers.js +136 -0
  172. package/dist/formats/red/core/helpers.js.map +1 -0
  173. package/dist/formats/red/core/redGraph.js +68 -0
  174. package/dist/formats/red/core/redGraph.js.map +1 -0
  175. package/dist/formats/red/core/schema.js +4 -0
  176. package/dist/formats/red/core/schema.js.map +1 -0
  177. package/dist/formats/red/index.js +2 -0
  178. package/dist/formats/red/index.js.map +1 -0
  179. package/dist/formats/stl/CjsStlFormat.js +304 -0
  180. package/dist/formats/stl/CjsStlFormat.js.map +1 -0
  181. package/dist/formats/stl/core/helpers.js +257 -0
  182. package/dist/formats/stl/core/helpers.js.map +1 -0
  183. package/dist/formats/stl/core/json.js +51 -0
  184. package/dist/formats/stl/core/json.js.map +1 -0
  185. package/dist/formats/stl/core/stl.js +544 -0
  186. package/dist/formats/stl/core/stl.js.map +1 -0
  187. package/dist/formats/stl/core/targets.js +163 -0
  188. package/dist/formats/stl/core/targets.js.map +1 -0
  189. package/dist/formats/stl/index.js +2 -0
  190. package/dist/formats/stl/index.js.map +1 -0
  191. package/dist/formats/tga/CjsTgaFormat.js +186 -0
  192. package/dist/formats/tga/CjsTgaFormat.js.map +1 -0
  193. package/dist/formats/tga/core/helpers.js +446 -0
  194. package/dist/formats/tga/core/helpers.js.map +1 -0
  195. package/dist/formats/tga/index.js +2 -0
  196. package/dist/formats/tga/index.js.map +1 -0
  197. package/dist/formats/wav/CjsWavFormat.js +186 -0
  198. package/dist/formats/wav/CjsWavFormat.js.map +1 -0
  199. package/dist/formats/wav/core/helpers.js +328 -0
  200. package/dist/formats/wav/core/helpers.js.map +1 -0
  201. package/dist/formats/wav/index.js +2 -0
  202. package/dist/formats/wav/index.js.map +1 -0
  203. package/dist/formats/webm/CjsWebmFormat.js +185 -0
  204. package/dist/formats/webm/CjsWebmFormat.js.map +1 -0
  205. package/dist/formats/webm/core/helpers.js +537 -0
  206. package/dist/formats/webm/core/helpers.js.map +1 -0
  207. package/dist/formats/webm/index.js +2 -0
  208. package/dist/formats/webm/index.js.map +1 -0
  209. package/dist/formats/webp/CjsWebpFormat.js +80 -0
  210. package/dist/formats/webp/CjsWebpFormat.js.map +1 -0
  211. package/dist/formats/webp/core/helpers.js +214 -0
  212. package/dist/formats/webp/core/helpers.js.map +1 -0
  213. package/dist/formats/webp/index.js +2 -0
  214. package/dist/formats/webp/index.js.map +1 -0
  215. package/dist/formats/wem/CjsWemFormat.js +197 -0
  216. package/dist/formats/wem/CjsWemFormat.js.map +1 -0
  217. package/dist/formats/wem/core/bitStream.js +259 -0
  218. package/dist/formats/wem/core/bitStream.js.map +1 -0
  219. package/dist/formats/wem/core/codebookLibrary.js +164 -0
  220. package/dist/formats/wem/core/codebookLibrary.js.map +1 -0
  221. package/dist/formats/wem/core/helpers.js +336 -0
  222. package/dist/formats/wem/core/helpers.js.map +1 -0
  223. package/dist/formats/wem/core/packedCodebooksAotuv603.js +30 -0
  224. package/dist/formats/wem/core/packedCodebooksAotuv603.js.map +1 -0
  225. package/dist/formats/wem/core/wemToOgg.js +485 -0
  226. package/dist/formats/wem/core/wemToOgg.js.map +1 -0
  227. package/dist/formats/wem/index.js +2 -0
  228. package/dist/formats/wem/index.js.map +1 -0
  229. package/dist/formats/yaml/CjsYamlFormat.js +77 -0
  230. package/dist/formats/yaml/CjsYamlFormat.js.map +1 -0
  231. package/dist/formats/yaml/core/CjsYamlReader.js +304 -0
  232. package/dist/formats/yaml/core/CjsYamlReader.js.map +1 -0
  233. package/dist/formats/yaml/core/helpers.js +160 -0
  234. package/dist/formats/yaml/core/helpers.js.map +1 -0
  235. package/dist/formats/yaml/index.js +2 -0
  236. package/dist/formats/yaml/index.js.map +1 -0
  237. package/dist/generated/resources/AudioGeometryResData.js +47 -0
  238. package/dist/generated/resources/AudioGeometryResData.js.map +1 -0
  239. package/dist/generated/resources/CmfVertexReader.js +46 -0
  240. package/dist/generated/resources/CmfVertexReader.js.map +1 -0
  241. package/dist/generated/resources/GStateBindingCallbackData.js +31 -0
  242. package/dist/generated/resources/GStateBindingCallbackData.js.map +1 -0
  243. package/dist/generated/resources/MeshDecalData.js +37 -0
  244. package/dist/generated/resources/MeshDecalData.js.map +1 -0
  245. package/dist/generated/resources/MeshDecalLodData.js +34 -0
  246. package/dist/generated/resources/MeshDecalLodData.js.map +1 -0
  247. package/dist/generated/resources/Tr2AsyncSave.js +46 -0
  248. package/dist/generated/resources/Tr2AsyncSave.js.map +1 -0
  249. package/dist/generated/resources/Tr2CmfContents.js +37 -0
  250. package/dist/generated/resources/Tr2CmfContents.js.map +1 -0
  251. package/dist/generated/resources/Tr2GrannyIntersectionResult.js +58 -0
  252. package/dist/generated/resources/Tr2GrannyIntersectionResult.js.map +1 -0
  253. package/dist/generated/resources/Tr2LoadPrepareFence.js +37 -0
  254. package/dist/generated/resources/Tr2LoadPrepareFence.js.map +1 -0
  255. package/dist/generated/resources/Tr2MaterialArea.js +34 -0
  256. package/dist/generated/resources/Tr2MaterialArea.js.map +1 -0
  257. package/dist/generated/resources/Tr2MaterialMesh.js +31 -0
  258. package/dist/generated/resources/Tr2MaterialMesh.js.map +1 -0
  259. package/dist/generated/resources/Tr2MaterialRes.js +34 -0
  260. package/dist/generated/resources/Tr2MaterialRes.js.map +1 -0
  261. package/dist/generated/resources/Tr2ShaderPermutation.js +43 -0
  262. package/dist/generated/resources/Tr2ShaderPermutation.js.map +1 -0
  263. package/dist/generated/resources/Tr2TextureLodManager.js +60 -0
  264. package/dist/generated/resources/Tr2TextureLodManager.js.map +1 -0
  265. package/dist/generated/resources/Tr2TextureLodUpdateRequest.js +37 -0
  266. package/dist/generated/resources/Tr2TextureLodUpdateRequest.js.map +1 -0
  267. package/dist/generated/resources/Tr2TexturePackChannel.js +37 -0
  268. package/dist/generated/resources/Tr2TexturePackChannel.js.map +1 -0
  269. package/dist/generated/resources/Tr2TexturePipeline.js +44 -0
  270. package/dist/generated/resources/Tr2TexturePipeline.js.map +1 -0
  271. package/dist/generated/resources/Tr2TexturePipelineParams.js +34 -0
  272. package/dist/generated/resources/Tr2TexturePipelineParams.js.map +1 -0
  273. package/dist/generated/resources/Tr2TexturePipelineStepCompress.js +40 -0
  274. package/dist/generated/resources/Tr2TexturePipelineStepCompress.js.map +1 -0
  275. package/dist/generated/resources/Tr2TexturePipelineStepLimitSize.js +34 -0
  276. package/dist/generated/resources/Tr2TexturePipelineStepLimitSize.js.map +1 -0
  277. package/dist/generated/resources/Tr2TexturePipelineStepLoad.js +31 -0
  278. package/dist/generated/resources/Tr2TexturePipelineStepLoad.js.map +1 -0
  279. package/dist/generated/resources/Tr2TexturePipelineStepPack.js +43 -0
  280. package/dist/generated/resources/Tr2TexturePipelineStepPack.js.map +1 -0
  281. package/dist/generated/resources/TriGeometryResAreaData.js +59 -0
  282. package/dist/generated/resources/TriGeometryResAreaData.js.map +1 -0
  283. package/dist/generated/resources/TriGeometryResJointData.js +38 -0
  284. package/dist/generated/resources/TriGeometryResJointData.js.map +1 -0
  285. package/dist/generated/resources/TriGeometryResLodData.js +88 -0
  286. package/dist/generated/resources/TriGeometryResLodData.js.map +1 -0
  287. package/dist/generated/resources/TriGeometryResMeshData.js +63 -0
  288. package/dist/generated/resources/TriGeometryResMeshData.js.map +1 -0
  289. package/dist/generated/resources/TriGeometryResSkeletonData.js +34 -0
  290. package/dist/generated/resources/TriGeometryResSkeletonData.js.map +1 -0
  291. package/dist/generated/resources/TriJointBinding.js +38 -0
  292. package/dist/generated/resources/TriJointBinding.js.map +1 -0
  293. package/dist/generated/resources/TriMorphTargetGeometryConstants.js +46 -0
  294. package/dist/generated/resources/TriMorphTargetGeometryConstants.js.map +1 -0
  295. package/dist/generated/resources/TriRtGeometryConstants.js +88 -0
  296. package/dist/generated/resources/TriRtGeometryConstants.js.map +1 -0
  297. package/dist/generated/resources/enums.js +18 -0
  298. package/dist/generated/resources/enums.js.map +1 -0
  299. package/dist/generated/resources/index.js +32 -0
  300. package/dist/generated/resources/index.js.map +1 -0
  301. package/dist/index.js +52 -0
  302. package/dist/index.js.map +1 -0
  303. package/dist/resourcePath.js +18 -0
  304. package/dist/resourcePath.js.map +1 -0
  305. package/dist/resourceStates.js +9 -0
  306. package/dist/resourceStates.js.map +1 -0
  307. package/dist/resources/Tr2EffectRes.js +71 -0
  308. package/dist/resources/Tr2EffectRes.js.map +1 -0
  309. package/dist/resources/Tr2GrannyStateRes.js +44 -0
  310. package/dist/resources/Tr2GrannyStateRes.js.map +1 -0
  311. package/dist/resources/Tr2ImageRes.js +114 -0
  312. package/dist/resources/Tr2ImageRes.js.map +1 -0
  313. package/dist/resources/Tr2LightProfileRes.js +40 -0
  314. package/dist/resources/Tr2LightProfileRes.js.map +1 -0
  315. package/dist/resources/TriGeometryRes.js +216 -0
  316. package/dist/resources/TriGeometryRes.js.map +1 -0
  317. package/dist/resources/TriGrannyRes.js +43 -0
  318. package/dist/resources/TriGrannyRes.js.map +1 -0
  319. package/dist/resources/TriTextureRes.js +304 -0
  320. package/dist/resources/TriTextureRes.js.map +1 -0
  321. package/dist/resources/resourceBoundary.js +47 -0
  322. package/dist/resources/resourceBoundary.js.map +1 -0
  323. package/dist/texture/CjsTextureArrayRes.js +406 -0
  324. package/dist/texture/CjsTextureArrayRes.js.map +1 -0
  325. package/dist/texture/CjsTextureParameterProxy.js +133 -0
  326. package/dist/texture/CjsTextureParameterProxy.js.map +1 -0
  327. package/format-notices/black/LICENSE +21 -0
  328. package/format-notices/black/NOTICE +47 -0
  329. package/format-notices/bnk/LICENSE +21 -0
  330. package/format-notices/bnk/NOTICE +17 -0
  331. package/format-notices/cmf/LICENSE +21 -0
  332. package/format-notices/cmf/NOTICE +36 -0
  333. package/format-notices/dds/LICENSE +21 -0
  334. package/format-notices/dds/NOTICE +14 -0
  335. package/format-notices/fbx/LICENSE +21 -0
  336. package/format-notices/fbx/NOTICE +14 -0
  337. package/format-notices/flac/LICENSE +21 -0
  338. package/format-notices/flac/NOTICE +14 -0
  339. package/format-notices/gif/LICENSE +21 -0
  340. package/format-notices/gif/NOTICE +14 -0
  341. package/format-notices/gltf/LICENSE +21 -0
  342. package/format-notices/gltf/NOTICE +27 -0
  343. package/format-notices/jpeg/LICENSE +21 -0
  344. package/format-notices/jpeg/NOTICE +14 -0
  345. package/format-notices/mp3/LICENSE +21 -0
  346. package/format-notices/mp3/NOTICE +14 -0
  347. package/format-notices/mp4/LICENSE +21 -0
  348. package/format-notices/mp4/NOTICE +14 -0
  349. package/format-notices/obj/LICENSE +21 -0
  350. package/format-notices/obj/NOTICE +26 -0
  351. package/format-notices/ogg/LICENSE +21 -0
  352. package/format-notices/ogg/NOTICE +28 -0
  353. package/format-notices/png/LICENSE +21 -0
  354. package/format-notices/png/NOTICE +14 -0
  355. package/format-notices/red/LICENSE +21 -0
  356. package/format-notices/red/NOTICE +31 -0
  357. package/format-notices/stl/LICENSE +21 -0
  358. package/format-notices/stl/NOTICE +21 -0
  359. package/format-notices/tga/LICENSE +21 -0
  360. package/format-notices/tga/NOTICE +14 -0
  361. package/format-notices/wav/LICENSE +21 -0
  362. package/format-notices/wav/NOTICE +14 -0
  363. package/format-notices/webm/LICENSE +21 -0
  364. package/format-notices/webm/NOTICE +14 -0
  365. package/format-notices/webp/LICENSE +21 -0
  366. package/format-notices/webp/NOTICE +14 -0
  367. package/format-notices/wem/LICENSE +57 -0
  368. package/format-notices/wem/NOTICE +33 -0
  369. package/format-notices/yaml/LICENSE +21 -0
  370. package/format-notices/yaml/NOTICE +44 -0
  371. package/package.json +51 -0
  372. package/resource-lifecycle.md +487 -0
@@ -0,0 +1,80 @@
1
+ import { DEFAULT_VALUES, normalizeValues, readWithValues, inspectWithValues, isSupportedWithValues, toJsonValue, isWebP, toBytes, OUTPUT_RAW, OUTPUT_JSON } from './core/helpers.js';
2
+
3
+ const FORMAT_NAME = "CjsWebpFormat";
4
+ class CjsWebpFormat {
5
+ #values = DEFAULT_VALUES;
6
+ constructor(options = {}) {
7
+ this.SetValues(options);
8
+ }
9
+ SetValues(options = {}) {
10
+ this.#values = normalizeValues(this.#values, {
11
+ inputType: "webp",
12
+ ...options
13
+ }, FORMAT_NAME);
14
+ return this;
15
+ }
16
+ GetValues(options = {}) {
17
+ return normalizeValues(this.#values, {
18
+ inputType: "webp",
19
+ ...options
20
+ }, FORMAT_NAME);
21
+ }
22
+ Read(input, options = {}) {
23
+ return readWithValues(input, this.GetValues(options));
24
+ }
25
+ async ReadAsync(input, options = {}) {
26
+ return this.Read(input, options);
27
+ }
28
+ Inspect(input, options = {}) {
29
+ return inspectWithValues(input, this.GetValues(options));
30
+ }
31
+ IsSupported(input, options = {}) {
32
+ return isSupportedWithValues(input, this.GetValues(options));
33
+ }
34
+ ToJSON(value) {
35
+ return toJsonValue(value);
36
+ }
37
+ static read(input, options = {}) {
38
+ return readWithValues(input, normalizeValues(DEFAULT_VALUES, {
39
+ inputType: "webp",
40
+ ...options
41
+ }, FORMAT_NAME));
42
+ }
43
+ static async readAsync(input, options = {}) {
44
+ return CjsWebpFormat.read(input, options);
45
+ }
46
+ static inspect(input, options = {}) {
47
+ return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, {
48
+ inputType: "webp",
49
+ ...options
50
+ }, FORMAT_NAME));
51
+ }
52
+ static isSupported(input, options = {}) {
53
+ return isSupportedWithValues(input, normalizeValues(DEFAULT_VALUES, {
54
+ inputType: "webp",
55
+ ...options
56
+ }, FORMAT_NAME));
57
+ }
58
+ static toJSON(value) {
59
+ return toJsonValue(value);
60
+ }
61
+ static isWebP(input) {
62
+ try {
63
+ return isWebP(toBytes(input));
64
+ } catch {
65
+ return false;
66
+ }
67
+ }
68
+ static OUTPUT_RAW = OUTPUT_RAW;
69
+ static OUTPUT_JSON = OUTPUT_JSON;
70
+ static OUTPUT_WEBP_JSON = "webpJson";
71
+ static type = Object.freeze(["image"]);
72
+ static mediaTypes = Object.freeze(["image"]);
73
+ static inputTypes = Object.freeze(["webp"]);
74
+ static outputTypes = Object.freeze([]);
75
+ static debugOutputTypes = Object.freeze(["webpJson", OUTPUT_RAW]);
76
+ static implementationStatus = "metadata-only";
77
+ }
78
+
79
+ export { CjsWebpFormat };
80
+ //# sourceMappingURL=CjsWebpFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CjsWebpFormat.js","sources":["../../../../src/formats/webp/CjsWebpFormat.js"],"sourcesContent":["import {\n DEFAULT_VALUES,\n OUTPUT_JSON,\n OUTPUT_RAW,\n inspectWithValues,\n isSupportedWithValues,\n isWebP,\n normalizeValues,\n readWithValues,\n toBytes,\n toJsonValue\n} from \"./core/helpers.js\";\n\nconst FORMAT_NAME = \"CjsWebpFormat\";\n\nexport class CjsWebpFormat\n{\n #values = DEFAULT_VALUES;\n\n constructor(options = {})\n {\n this.SetValues(options);\n }\n\n SetValues(options = {})\n {\n this.#values = normalizeValues(this.#values, { inputType: \"webp\", ...options }, FORMAT_NAME);\n return this;\n }\n\n GetValues(options = {})\n {\n return normalizeValues(this.#values, { inputType: \"webp\", ...options }, FORMAT_NAME);\n }\n\n Read(input, options = {})\n {\n return readWithValues(input, this.GetValues(options));\n }\n\n async ReadAsync(input, options = {})\n {\n return this.Read(input, options);\n }\n\n Inspect(input, options = {})\n {\n return inspectWithValues(input, this.GetValues(options));\n }\n\n IsSupported(input, options = {})\n {\n return isSupportedWithValues(input, this.GetValues(options));\n }\n\n ToJSON(value)\n {\n return toJsonValue(value);\n }\n\n static read(input, options = {})\n {\n return readWithValues(input, normalizeValues(DEFAULT_VALUES, { inputType: \"webp\", ...options }, FORMAT_NAME));\n }\n\n static async readAsync(input, options = {})\n {\n return CjsWebpFormat.read(input, options);\n }\n\n static inspect(input, options = {})\n {\n return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, { inputType: \"webp\", ...options }, FORMAT_NAME));\n }\n\n static isSupported(input, options = {})\n {\n return isSupportedWithValues(input, normalizeValues(DEFAULT_VALUES, { inputType: \"webp\", ...options }, FORMAT_NAME));\n }\n\n static toJSON(value)\n {\n return toJsonValue(value);\n }\n\n static isWebP(input)\n {\n try\n {\n return isWebP(toBytes(input));\n }\n catch\n {\n return false;\n }\n }\n\n static OUTPUT_RAW = OUTPUT_RAW;\n static OUTPUT_JSON = OUTPUT_JSON;\n static OUTPUT_WEBP_JSON = \"webpJson\";\n static type = Object.freeze([ \"image\" ]);\n static mediaTypes = Object.freeze([ \"image\" ]);\n static inputTypes = Object.freeze([ \"webp\" ]);\n static outputTypes = Object.freeze([]);\n static debugOutputTypes = Object.freeze([ \"webpJson\", OUTPUT_RAW ]);\n static implementationStatus = \"metadata-only\";\n}\n\nexport default CjsWebpFormat;\n"],"names":["FORMAT_NAME","CjsWebpFormat","DEFAULT_VALUES","constructor","options","SetValues","normalizeValues","inputType","GetValues","Read","input","readWithValues","ReadAsync","Inspect","inspectWithValues","IsSupported","isSupportedWithValues","ToJSON","value","toJsonValue","read","readAsync","inspect","isSupported","toJSON","isWebP","toBytes","OUTPUT_RAW","OUTPUT_JSON","OUTPUT_WEBP_JSON","type","Object","freeze","mediaTypes","inputTypes","outputTypes","debugOutputTypes","implementationStatus"],"mappings":";;AAaA,MAAMA,WAAW,GAAG,eAAe;AAE5B,MAAMC,aAAa,CAC1B;EACI,OAAO,GAAGC,cAAc;AAExBC,EAAAA,WAAWA,CAACC,OAAO,GAAG,EAAE,EACxB;AACI,IAAA,IAAI,CAACC,SAAS,CAACD,OAAO,CAAC;AAC3B,EAAA;AAEAC,EAAAA,SAASA,CAACD,OAAO,GAAG,EAAE,EACtB;IACI,IAAI,CAAC,OAAO,GAAGE,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE;AAAEC,MAAAA,SAAS,EAAE,MAAM;MAAE,GAAGH;KAAS,EAAEJ,WAAW,CAAC;AAC5F,IAAA,OAAO,IAAI;AACf,EAAA;AAEAQ,EAAAA,SAASA,CAACJ,OAAO,GAAG,EAAE,EACtB;AACI,IAAA,OAAOE,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE;AAAEC,MAAAA,SAAS,EAAE,MAAM;MAAE,GAAGH;KAAS,EAAEJ,WAAW,CAAC;AACxF,EAAA;AAEAS,EAAAA,IAAIA,CAACC,KAAK,EAAEN,OAAO,GAAG,EAAE,EACxB;IACI,OAAOO,cAAc,CAACD,KAAK,EAAE,IAAI,CAACF,SAAS,CAACJ,OAAO,CAAC,CAAC;AACzD,EAAA;EAEA,MAAMQ,SAASA,CAACF,KAAK,EAAEN,OAAO,GAAG,EAAE,EACnC;AACI,IAAA,OAAO,IAA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;MAAE,GAAGH;KAAS,EAAEJ,WAAW,CAAC,CAAC;AACxH,EAAA;EAEA,OAAOwB,MAAMA,CAACN,KAAK,EACnB;IACI,OAAOC,WAAW,CAACD,KAAK,CAAC;AAC7B,EAAA;EAEA,OAAOO,MAAMA,CAACf,KAAK,EACnB;IACI,IACA;AACI,MAAA,OAAOe,MAAM,CAACC,OAAO,CAAChB,KAAK,CAAC,CAAC;AACjC,IAAA,CAAC,CACD,MACA;AACI,MAAA,OAAO,KAAK;AAChB,IAAA;AACJ,EAAA;EAEA,OAAOiB,UAAU,GAAGA,UAAU;EAC9B,OAAOC,WAAW,GAAGA,WAAW;EAChC,OAAOC,gBAAgB,GAAG,UAAU;EACpC,OAAOC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAE,OAAO,CAAE,CAAC;EACxC,OAAOC,UAAU,GAAGF,MAAM,CAACC,MAAM,CAAC,CAAE,OAAO,CAAE,CAAC;EAC9C,OAAOE,UAAU,GAAGH,MAAM,CAACC,MAAM,CAAC,CAAE,MAAM,CAAE,CAAC;AAC7C,EAAA,OAAOG,WAAW,GAAGJ,MAAM,CAACC,MAAM,CAAC,EAAE,CAAC;EACtC,OAAOI,gBAAgB,GAAGL,MAAM,CAACC,MAAM,CAAC,CAAE,UAAU,EAAEL,UAAU,CAAE,CAAC;EACnE,OAAOU,oBAAoB,GAAG,eAAe;AACjD;;;;"}
@@ -0,0 +1,214 @@
1
+ const OUTPUT_RAW = "raw";
2
+ const OUTPUT_JSON = "json";
3
+ const DEFAULT_VALUES = Object.freeze({
4
+ emit: OUTPUT_RAW,
5
+ inputType: "webp",
6
+ source: ""
7
+ });
8
+ function normalizeValues(base = DEFAULT_VALUES, options = {}, readerName = "CjsWebpFormat") {
9
+ if (!options || typeof options !== "object" || Array.isArray(options)) {
10
+ throw new TypeError(`${readerName}: options must be an object`);
11
+ }
12
+ const allowed = new Set(["emit", "inputType", "source"]);
13
+ for (const key of Object.keys(options)) {
14
+ if (!allowed.has(key)) throw new TypeError(`${readerName}: unknown option ${JSON.stringify(key)}`);
15
+ }
16
+ const values = {
17
+ ...DEFAULT_VALUES,
18
+ ...(base || {}),
19
+ ...options
20
+ };
21
+ if (![OUTPUT_RAW, OUTPUT_JSON, "webpJson"].includes(values.emit)) {
22
+ throw new TypeError(`${readerName}: unknown emit value ${JSON.stringify(values.emit)}`);
23
+ }
24
+ return values;
25
+ }
26
+ function toBytes(input) {
27
+ if (input instanceof Uint8Array) return input;
28
+ if (input instanceof ArrayBuffer) return new Uint8Array(input);
29
+ if (ArrayBuffer.isView(input)) return new Uint8Array(input.buffer, input.byteOffset, input.byteLength);
30
+ throw new TypeError("WebP input must be Uint8Array, ArrayBuffer, or a view");
31
+ }
32
+ function isWebP(bytes) {
33
+ return bytes.byteLength >= 12 && ascii(bytes, 0, 4) === "RIFF" && ascii(bytes, 8, 4) === "WEBP";
34
+ }
35
+ function inspectWithValues(input, values = DEFAULT_VALUES, expectedType = "webp") {
36
+ const bytes = toBytes(input);
37
+ if (!isWebP(bytes)) throw new TypeError("CjsWebpFormat: input is not a RIFF WebP container");
38
+ const metadata = inspectWebP(bytes);
39
+ if (expectedType && metadata.sourceFormat !== expectedType) {
40
+ throw new TypeError(`CjsWebpFormat: expected ${expectedType}, got ${metadata.sourceFormat}`);
41
+ }
42
+ return {
43
+ ...metadata,
44
+ byteLength: bytes.byteLength,
45
+ source: values.source || "buffer"
46
+ };
47
+ }
48
+ function isSupportedWithValues(input, values = DEFAULT_VALUES) {
49
+ try {
50
+ const metadata = inspectWithValues(input, values);
51
+ return {
52
+ format: "webp",
53
+ source: values.source || "buffer",
54
+ supported: "partial",
55
+ confidence: 1,
56
+ preferred: "raw",
57
+ reason: "WebP container and image metadata are recognized; software RGBA decode is not implemented.",
58
+ metadata,
59
+ variants: [{
60
+ kind: "raw",
61
+ payloadType: "raw",
62
+ codec: "webp",
63
+ mimeType: "image/webp",
64
+ supported: true,
65
+ containerOnly: true,
66
+ isDecoded: false,
67
+ rgbaDecodeSupported: false
68
+ }, {
69
+ kind: "rgba",
70
+ payloadType: "rgba",
71
+ codec: "rgba8unorm",
72
+ supported: false,
73
+ reason: "WebP software RGBA decode is not implemented yet."
74
+ }],
75
+ warnings: [],
76
+ errors: []
77
+ };
78
+ } catch (error) {
79
+ return {
80
+ format: "webp",
81
+ source: values.source || "buffer",
82
+ supported: "none",
83
+ confidence: 0,
84
+ preferred: "",
85
+ reason: error.message,
86
+ metadata: null,
87
+ variants: [],
88
+ warnings: [],
89
+ errors: [error.message]
90
+ };
91
+ }
92
+ }
93
+ function readWithValues(input, values = DEFAULT_VALUES) {
94
+ const bytes = toBytes(input);
95
+ const metadata = inspectWithValues(bytes, values);
96
+ if (values.emit === OUTPUT_RAW) {
97
+ return {
98
+ payloadType: "raw",
99
+ sourceFormat: "webp",
100
+ mimeType: "image/webp",
101
+ containerOnly: true,
102
+ isDecoded: false,
103
+ rgbaDecodeSupported: false,
104
+ metadata,
105
+ bytes
106
+ };
107
+ }
108
+ if (values.emit === OUTPUT_JSON || values.emit === "webpJson") return metadata;
109
+ const error = new Error(`webp: emit "${values.emit}" is not implemented yet`);
110
+ error.code = "CJS_FORMAT_OUTPUT_NOT_IMPLEMENTED";
111
+ throw error;
112
+ }
113
+ function toJsonValue(value) {
114
+ if (value instanceof Uint8Array) return {
115
+ byteLength: value.byteLength
116
+ };
117
+ if (Array.isArray(value)) return value.map(toJsonValue);
118
+ if (value && typeof value === "object") {
119
+ const output = {};
120
+ for (const [key, entry] of Object.entries(value)) output[key] = toJsonValue(entry);
121
+ return output;
122
+ }
123
+ return value;
124
+ }
125
+ function inspectWebP(bytes) {
126
+ const riffLength = readU32LE(bytes, 4);
127
+ const chunks = [];
128
+ let width = 0;
129
+ let height = 0;
130
+ let codec = "webp";
131
+ let hasAlpha = false;
132
+ let animated = false;
133
+ const animationFrames = [];
134
+ let offset = 12;
135
+ while (offset + 8 <= bytes.byteLength) {
136
+ const type = ascii(bytes, offset, 4);
137
+ const size = readU32LE(bytes, offset + 4);
138
+ const dataOffset = offset + 8;
139
+ if (dataOffset + size > bytes.byteLength) throw new Error(`webp: ${type} chunk is truncated`);
140
+ chunks.push({
141
+ type,
142
+ byteOffset: dataOffset,
143
+ byteLength: size
144
+ });
145
+ if (type === "VP8 ") {
146
+ codec = "vp8";
147
+ if (size >= 10 && bytes[dataOffset + 3] === 0x9d && bytes[dataOffset + 4] === 0x01 && bytes[dataOffset + 5] === 0x2a) {
148
+ width = readU16LE(bytes, dataOffset + 6) & 0x3fff;
149
+ height = readU16LE(bytes, dataOffset + 8) & 0x3fff;
150
+ }
151
+ } else if (type === "VP8L") {
152
+ codec = "vp8l";
153
+ if (size >= 5 && bytes[dataOffset] === 0x2f) {
154
+ width = 1 + (bytes[dataOffset + 1] | (bytes[dataOffset + 2] & 0x3f) << 8);
155
+ height = 1 + (bytes[dataOffset + 2] >>> 6 | bytes[dataOffset + 3] << 2 | (bytes[dataOffset + 4] & 0x0f) << 10);
156
+ hasAlpha = true;
157
+ }
158
+ } else if (type === "VP8X") {
159
+ codec = "vp8x";
160
+ if (size >= 10) {
161
+ const flags = bytes[dataOffset];
162
+ hasAlpha = !!(flags & 0x10);
163
+ animated = !!(flags & 0x02);
164
+ width = 1 + readU24LE(bytes, dataOffset + 4);
165
+ height = 1 + readU24LE(bytes, dataOffset + 7);
166
+ }
167
+ } else if (type === "ALPH") hasAlpha = true;else if (type === "ANIM") animated = true;else if (type === "ANMF") {
168
+ animated = true;
169
+ if (size >= 16) {
170
+ animationFrames.push({
171
+ x: readU24LE(bytes, dataOffset),
172
+ y: readU24LE(bytes, dataOffset + 3),
173
+ width: 1 + readU24LE(bytes, dataOffset + 6),
174
+ height: 1 + readU24LE(bytes, dataOffset + 9),
175
+ durationMs: readU24LE(bytes, dataOffset + 12),
176
+ flags: bytes[dataOffset + 15]
177
+ });
178
+ }
179
+ }
180
+ offset = dataOffset + size + (size & 1);
181
+ }
182
+ return {
183
+ payloadType: "image",
184
+ mediaTypes: ["image"],
185
+ sourceFormat: "webp",
186
+ container: "riff",
187
+ riffLength,
188
+ codec,
189
+ width,
190
+ height,
191
+ hasAlpha,
192
+ animated,
193
+ animationFrameCount: animationFrames.length,
194
+ animationDurationMs: animationFrames.reduce((sum, frame) => sum + frame.durationMs, 0),
195
+ animationFrames,
196
+ isCompressed: true,
197
+ chunks
198
+ };
199
+ }
200
+ function ascii(bytes, offset, length) {
201
+ return String.fromCharCode(...bytes.subarray(offset, offset + length));
202
+ }
203
+ function readU16LE(bytes, offset) {
204
+ return bytes[offset] | bytes[offset + 1] << 8;
205
+ }
206
+ function readU24LE(bytes, offset) {
207
+ return bytes[offset] | bytes[offset + 1] << 8 | bytes[offset + 2] << 16;
208
+ }
209
+ function readU32LE(bytes, offset) {
210
+ return (bytes[offset] | bytes[offset + 1] << 8 | bytes[offset + 2] << 16 | bytes[offset + 3] * 0x1000000) >>> 0;
211
+ }
212
+
213
+ export { DEFAULT_VALUES, OUTPUT_JSON, OUTPUT_RAW, inspectWithValues, isSupportedWithValues, isWebP, normalizeValues, readWithValues, toBytes, toJsonValue };
214
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sources":["../../../../../src/formats/webp/core/helpers.js"],"sourcesContent":["export const OUTPUT_RAW = \"raw\";\nexport const OUTPUT_JSON = \"json\";\n\nexport const DEFAULT_VALUES = Object.freeze({\n emit: OUTPUT_RAW,\n inputType: \"webp\",\n source: \"\"\n});\n\nexport function normalizeValues(base = DEFAULT_VALUES, options = {}, readerName = \"CjsWebpFormat\")\n{\n if (!options || typeof options !== \"object\" || Array.isArray(options))\n {\n throw new TypeError(`${readerName}: options must be an object`);\n }\n const allowed = new Set([ \"emit\", \"inputType\", \"source\" ]);\n for (const key of Object.keys(options))\n {\n if (!allowed.has(key)) throw new TypeError(`${readerName}: unknown option ${JSON.stringify(key)}`);\n }\n const values = { ...DEFAULT_VALUES, ...(base || {}), ...options };\n if (![ OUTPUT_RAW, OUTPUT_JSON, \"webpJson\" ].includes(values.emit))\n {\n throw new TypeError(`${readerName}: unknown emit value ${JSON.stringify(values.emit)}`);\n }\n return values;\n}\n\nexport function toBytes(input)\n{\n if (input instanceof Uint8Array) return input;\n if (input instanceof ArrayBuffer) return new Uint8Array(input);\n if (ArrayBuffer.isView(input)) return new Uint8Array(input.buffer, input.byteOffset, input.byteLength);\n throw new TypeError(\"WebP input must be Uint8Array, ArrayBuffer, or a view\");\n}\n\nexport function isWebP(bytes)\n{\n return bytes.byteLength >= 12 &&\n ascii(bytes, 0, 4) === \"RIFF\" && ascii(bytes, 8, 4) === \"WEBP\";\n}\n\nexport function inspectWithValues(input, values = DEFAULT_VALUES, expectedType = \"webp\")\n{\n const bytes = toBytes(input);\n if (!isWebP(bytes)) throw new TypeError(\"CjsWebpFormat: input is not a RIFF WebP container\");\n const metadata = inspectWebP(bytes);\n if (expectedType && metadata.sourceFormat !== expectedType)\n {\n throw new TypeError(`CjsWebpFormat: expected ${expectedType}, got ${metadata.sourceFormat}`);\n }\n return { ...metadata, byteLength: bytes.byteLength, source: values.source || \"buffer\" };\n}\n\nexport function isSupportedWithValues(input, values = DEFAULT_VALUES)\n{\n try\n {\n const metadata = inspectWithValues(input, values);\n return {\n format: \"webp\",\n source: values.source || \"buffer\",\n supported: \"partial\",\n confidence: 1,\n preferred: \"raw\",\n reason: \"WebP container and image metadata are recognized; software RGBA decode is not implemented.\",\n metadata,\n variants: [\n {\n kind: \"raw\",\n payloadType: \"raw\",\n codec: \"webp\",\n mimeType: \"image/webp\",\n supported: true,\n containerOnly: true,\n isDecoded: false,\n rgbaDecodeSupported: false\n },\n { kind: \"rgba\", payloadType: \"rgba\", codec: \"rgba8unorm\", supported: false, reason: \"WebP software RGBA decode is not implemented yet.\" }\n ],\n warnings: [],\n errors: []\n };\n }\n catch (error)\n {\n return {\n format: \"webp\",\n source: values.source || \"buffer\",\n supported: \"none\",\n confidence: 0,\n preferred: \"\",\n reason: error.message,\n metadata: null,\n variants: [],\n warnings: [],\n errors: [ error.message ]\n };\n }\n}\n\nexport function readWithValues(input, values = DEFAULT_VALUES)\n{\n const bytes = toBytes(input);\n const metadata = inspectWithValues(bytes, values);\n if (values.emit === OUTPUT_RAW)\n {\n return {\n payloadType: \"raw\",\n sourceFormat: \"webp\",\n mimeType: \"image/webp\",\n containerOnly: true,\n isDecoded: false,\n rgbaDecodeSupported: false,\n metadata,\n bytes\n };\n }\n if (values.emit === OUTPUT_JSON || values.emit === \"webpJson\") return metadata;\n const error = new Error(`webp: emit \"${values.emit}\" is not implemented yet`);\n error.code = \"CJS_FORMAT_OUTPUT_NOT_IMPLEMENTED\";\n throw error;\n}\n\nexport function toJsonValue(value)\n{\n if (value instanceof Uint8Array) return { byteLength: value.byteLength };\n if (Array.isArray(value)) return value.map(toJsonValue);\n if (value && typeof value === \"object\")\n {\n const output = {};\n for (const [ key, entry ] of Object.entries(value)) output[key] = toJsonValue(entry);\n return output;\n }\n return value;\n}\n\nfunction inspectWebP(bytes)\n{\n const riffLength = readU32LE(bytes, 4);\n const chunks = [];\n let width = 0;\n let height = 0;\n let codec = \"webp\";\n let hasAlpha = false;\n let animated = false;\n const animationFrames = [];\n let offset = 12;\n while (offset + 8 <= bytes.byteLength)\n {\n const type = ascii(bytes, offset, 4);\n const size = readU32LE(bytes, offset + 4);\n const dataOffset = offset + 8;\n if (dataOffset + size > bytes.byteLength) throw new Error(`webp: ${type} chunk is truncated`);\n chunks.push({ type, byteOffset: dataOffset, byteLength: size });\n if (type === \"VP8 \")\n {\n codec = \"vp8\";\n if (size >= 10 && bytes[dataOffset + 3] === 0x9d && bytes[dataOffset + 4] === 0x01 && bytes[dataOffset + 5] === 0x2a)\n {\n width = readU16LE(bytes, dataOffset + 6) & 0x3fff;\n height = readU16LE(bytes, dataOffset + 8) & 0x3fff;\n }\n }\n else if (type === \"VP8L\")\n {\n codec = \"vp8l\";\n if (size >= 5 && bytes[dataOffset] === 0x2f)\n {\n width = 1 + (bytes[dataOffset + 1] | ((bytes[dataOffset + 2] & 0x3f) << 8));\n height = 1 + ((bytes[dataOffset + 2] >>> 6) | (bytes[dataOffset + 3] << 2) | ((bytes[dataOffset + 4] & 0x0f) << 10));\n hasAlpha = true;\n }\n }\n else if (type === \"VP8X\")\n {\n codec = \"vp8x\";\n if (size >= 10)\n {\n const flags = bytes[dataOffset];\n hasAlpha = !!(flags & 0x10);\n animated = !!(flags & 0x02);\n width = 1 + readU24LE(bytes, dataOffset + 4);\n height = 1 + readU24LE(bytes, dataOffset + 7);\n }\n }\n else if (type === \"ALPH\") hasAlpha = true;\n else if (type === \"ANIM\") animated = true;\n else if (type === \"ANMF\")\n {\n animated = true;\n if (size >= 16)\n {\n animationFrames.push({\n x: readU24LE(bytes, dataOffset),\n y: readU24LE(bytes, dataOffset + 3),\n width: 1 + readU24LE(bytes, dataOffset + 6),\n height: 1 + readU24LE(bytes, dataOffset + 9),\n durationMs: readU24LE(bytes, dataOffset + 12),\n flags: bytes[dataOffset + 15]\n });\n }\n }\n offset = dataOffset + size + (size & 1);\n }\n return {\n payloadType: \"image\",\n mediaTypes: [ \"image\" ],\n sourceFormat: \"webp\",\n container: \"riff\",\n riffLength,\n codec,\n width,\n height,\n hasAlpha,\n animated,\n animationFrameCount: animationFrames.length,\n animationDurationMs: animationFrames.reduce((sum, frame) => sum + frame.durationMs, 0),\n animationFrames,\n isCompressed: true,\n chunks\n };\n}\n\nfunction ascii(bytes, offset, length)\n{\n return String.fromCharCode(...bytes.subarray(offset, offset + length));\n}\n\nfunction readU16LE(bytes, offset)\n{\n return bytes[offset] | (bytes[offset + 1] << 8);\n}\n\nfunction readU24LE(bytes, offset)\n{\n return bytes[offset] | (bytes[offset + 1] << 8) | (bytes[offset + 2] << 16);\n}\n\nfunction readU32LE(bytes, offset)\n{\n return (bytes[offset] | (bytes[offset + 1] << 8) | (bytes[offset + 2] << 16) | (bytes[offset + 3] * 0x1000000)) >>> 0;\n}\n"],"names":["OUTPUT_RAW","OUTPUT_JSON","DEFAULT_VALUES","Object","freeze","emit","inputType","source","normalizeValues","base","options","readerName","Array","isArray","TypeError","allowed","Set","key","keys","has","JSON","stringify","values","includes","toBytes","input","Uint8Array","ArrayBuffer","isView","buffer","byteOffset","byteLength","isWebP","bytes","ascii","inspectWithValues","expectedType","metadata","inspectWebP","sourceFormat","isSupportedWithValues","format","supported","confidence","preferred","reason","variants","kind","payloadType","codec","mimeType","containerOnly","isDecoded","rgbaDecodeSupported","warnings","errors","error","message","readWithValues","Error","code","toJsonValue","value","map","output","entry","entries","riffLength","readU32LE","chunks","width","height","hasAlpha","animated","animationFrames","offset","type","size","dataOffset","push","readU16LE","flags","readU24LE","x","y","durationMs","mediaTypes","container","animationFrameCount","length","animationDurationMs","reduce","sum","frame","isCompressed","String","fromCharCode","subarray"],"mappings":"AAAO,MAAMA,UAAU,GAAG;AACnB,MAAMC,WAAW,GAAG;MAEdC,cAAc,GAAGC,MAAM,CAACC,MAAM,CAAC;AACxCC,EAAAA,IAAI,EAAEL,UAAU;AAChBM,EAAAA,SAAS,EAAE,MAAM;AACjBC,EAAAA,MAAM,EAAE;AACZ,CAAC;AAEM,SAASC,eAAeA,CAACC,IAAI,GAAGP,cAAc,EAAEQ,OAAO,GAAG,EAAE,EAAEC,UAAU,GAAG,eAAe,EACjG;AACI,EAAA,IAAI,CAACD,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,OAAO,CAAC,EACrE;AACI,IAAA,MAAM,IAAII,SAAS,CAAC,CAAA,EAAGH,UAAU,6BAA6B,CAAC;AACnE,EAAA;AACA,EAAA,MAAMI,OAAO,GAAG,IAAIC,GAAG,CAAC,CAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAE,CAAC;EAC1D,KAAK,MAAMC,GAAG,IAAId,MAAM,CAACe,IAAI,CAACR,OAAO,CAAC,EACtC;IACI,IAAI,CAACK,OAAO,CAACI,GAAG,CAACF,GAAG,CAAC,EAAE,MAAM,IAAIH,SAAS,CA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C,MAAM,GAAG,CAAC,CAAC,IAAI,CAAE;AACnD;AAEA,SAASO,SAASA,CAACjD,KAAK,EAAE0C,MAAM,EAChC;EACI,OAAO1C,KAAK,CAAC0C,MAAM,CAAC,GAAI1C,KAAK,CAAC0C,MAAM,GAAG,CAAC,CAAC,IAAI,CAAE,GAAI1C,KAAK,CAAC0C,MAAM,GAAG,CAAC,CAAC,IAAI,EAAG;AAC/E;AAEA,SAASP,SAASA,CAACnC,KAAK,EAAE0C,MAAM,EAChC;AACI,EAAA,OAAO,CAAC1C,KAAK,CAAC0C,MAAM,CAAC,GAAI1C,KAAK,CAAC0C,MAAM,GAAG,CAAC,CAAC,IAAI,CAAE,GAAI1C,KAAK,CAAC0C,MAAM,GAAG,CAAC,CAAC,IAAI,EAAG,GAAI1C,KAAK,CAAC0C,MAAM,GAAG,CAAC,CAAC,GAAG,SAAU,MAAM,CAAC;AACzH;;;;"}
@@ -0,0 +1,2 @@
1
+ export { CjsWebpFormat, CjsWebpFormat as default } from './CjsWebpFormat.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,197 @@
1
+ import { DEFAULT_VALUES, normalizeValues, readWithValues, inspectWithValues, isSupportedWithValues, toJsonValue, isWEM, toBytes, OUTPUT_OGG, OUTPUT_RAW, OUTPUT_JSON, OUTPUT_WEM_JSON, WEM_CODEC_NAMES } from './core/helpers.js';
2
+
3
+ const FORMAT_NAME = "CjsWemFormat";
4
+
5
+ /**
6
+ * Reader for Audiokinetic Wwise media (.wem) containers.
7
+ *
8
+ * Inspection identifies the codec, channel/rate layout, and Vorbis duration
9
+ * without decoding audio data. Read emits the container bytes untouched;
10
+ * decode/transcode targets are deliberately out of scope for this reader.
11
+ */
12
+ class CjsWemFormat {
13
+ #values = DEFAULT_VALUES;
14
+
15
+ /**
16
+ * Create a reusable wem format profile.
17
+ *
18
+ * @param {object} [options] Default read/inspect options.
19
+ */
20
+ constructor(options = {}) {
21
+ this.SetValues(options);
22
+ }
23
+
24
+ /**
25
+ * Merge options into this profile.
26
+ *
27
+ * @param {object} [options] Values to merge.
28
+ * @returns {CjsWemFormat} This format profile.
29
+ */
30
+ SetValues(options = {}) {
31
+ this.#values = normalizeValues(this.#values, options, FORMAT_NAME);
32
+ return this;
33
+ }
34
+
35
+ /**
36
+ * Get normalized profile values with optional per-call overrides.
37
+ *
38
+ * @param {object} [options] Per-call values.
39
+ * @returns {object} Normalized read values.
40
+ */
41
+ GetValues(options = {}) {
42
+ return normalizeValues(this.#values, options, FORMAT_NAME);
43
+ }
44
+
45
+ /**
46
+ * Read wem bytes with this profile.
47
+ *
48
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
49
+ * @param {object} [options] Per-call values.
50
+ * @returns {object} GPU-free raw/debug payload for the selected emit target.
51
+ */
52
+ Read(input, options = {}) {
53
+ return readWithValues(input, this.GetValues(options));
54
+ }
55
+
56
+ /**
57
+ * Read wem bytes asynchronously with this profile.
58
+ *
59
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
60
+ * @param {object} [options] Per-call values.
61
+ * @returns {Promise<object>} GPU-free raw/debug payload for the selected emit target.
62
+ */
63
+ async ReadAsync(input, options = {}) {
64
+ return this.Read(input, options);
65
+ }
66
+
67
+ /**
68
+ * Inspect wem bytes without decoding audio data.
69
+ *
70
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
71
+ * @param {object} [options] Per-call values.
72
+ * @returns {object} Wwise container metadata.
73
+ */
74
+ Inspect(input, options = {}) {
75
+ return inspectWithValues(input, this.GetValues(options));
76
+ }
77
+
78
+ /**
79
+ * Report whether wem input and requested output variants are supported.
80
+ *
81
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
82
+ * @param {object} [options] Per-call values.
83
+ * @returns {object} Support/probe report.
84
+ */
85
+ IsSupported(input, options = {}) {
86
+ return isSupportedWithValues(input, this.GetValues(options));
87
+ }
88
+
89
+ /**
90
+ * Convert format output into JSON-compatible debug data.
91
+ *
92
+ * @param {any} value Format output.
93
+ * @returns {any} JSON-compatible value.
94
+ */
95
+ ToJSON(value) {
96
+ return toJsonValue(value);
97
+ }
98
+
99
+ /**
100
+ * One-shot wem read.
101
+ *
102
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
103
+ * @param {object} [options] Read options.
104
+ * @returns {object} GPU-free raw/debug payload for the selected emit target.
105
+ */
106
+ static read(input, options = {}) {
107
+ return readWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
108
+ }
109
+
110
+ /**
111
+ * One-shot asynchronous wem read.
112
+ *
113
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
114
+ * @param {object} [options] Read options.
115
+ * @returns {Promise<object>} GPU-free raw/debug payload for the selected emit target.
116
+ */
117
+ static async readAsync(input, options = {}) {
118
+ return CjsWemFormat.read(input, options);
119
+ }
120
+
121
+ /**
122
+ * One-shot wem inspection.
123
+ *
124
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
125
+ * @param {object} [options] Inspect options.
126
+ * @returns {object} Wwise container metadata.
127
+ */
128
+ static inspect(input, options = {}) {
129
+ return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
130
+ }
131
+
132
+ /**
133
+ * One-shot wem support probe.
134
+ *
135
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
136
+ * @param {object} [options] Probe options.
137
+ * @returns {object} Support/probe report.
138
+ */
139
+ static isSupported(input, options = {}) {
140
+ return isSupportedWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
141
+ }
142
+
143
+ /**
144
+ * Convert format output into JSON-compatible debug data.
145
+ *
146
+ * @param {any} value Format output.
147
+ * @returns {any} JSON-compatible value.
148
+ */
149
+ static toJSON(value) {
150
+ return toJsonValue(value);
151
+ }
152
+
153
+ /**
154
+ * Test whether bytes look like a Wwise media container.
155
+ *
156
+ * @param {Uint8Array|ArrayBuffer|DataView} input Candidate wem bytes.
157
+ * @returns {boolean} True when RIFF/RIFX WAVE signatures are present.
158
+ */
159
+ static isWEM(input) {
160
+ try {
161
+ return isWEM(toBytes(input));
162
+ } catch {
163
+ return false;
164
+ }
165
+ }
166
+
167
+ /**
168
+ * Repack Wwise Vorbis wem bytes into a standard Ogg Vorbis stream.
169
+ *
170
+ * Lossless container transform (no audio decode/re-encode); output plays
171
+ * natively where Ogg Vorbis is supported. Equivalent to
172
+ * `read(input, { emit: "ogg" })`.
173
+ *
174
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
175
+ * @param {object} [options] Options, including a `codebooks` override.
176
+ * @returns {object} Ogg payload with bytes, timing, and loop metadata.
177
+ */
178
+ static toOgg(input, options = {}) {
179
+ return CjsWemFormat.read(input, {
180
+ ...options,
181
+ emit: OUTPUT_OGG
182
+ });
183
+ }
184
+ static OUTPUT_RAW = OUTPUT_RAW;
185
+ static OUTPUT_JSON = OUTPUT_JSON;
186
+ static OUTPUT_WEM_JSON = OUTPUT_WEM_JSON;
187
+ static OUTPUT_OGG = OUTPUT_OGG;
188
+ static CODEC_NAMES = WEM_CODEC_NAMES;
189
+ static type = Object.freeze(["audio"]);
190
+ static mediaTypes = Object.freeze(["audio"]);
191
+ static inputTypes = Object.freeze(["wem"]);
192
+ static outputTypes = Object.freeze([OUTPUT_RAW, OUTPUT_OGG]);
193
+ static debugOutputTypes = Object.freeze([OUTPUT_WEM_JSON, OUTPUT_RAW]);
194
+ }
195
+
196
+ export { CjsWemFormat };
197
+ //# sourceMappingURL=CjsWemFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CjsWemFormat.js","sources":["../../../../src/formats/wem/CjsWemFormat.js"],"sourcesContent":["import {\n DEFAULT_VALUES,\n OUTPUT_JSON,\n OUTPUT_OGG,\n OUTPUT_RAW,\n OUTPUT_WEM_JSON,\n WEM_CODEC_NAMES,\n inspectWithValues,\n isSupportedWithValues,\n isWEM,\n normalizeValues,\n readWithValues,\n toBytes,\n toJsonValue\n} from \"./core/helpers.js\";\n\nconst FORMAT_NAME = \"CjsWemFormat\";\n\n/**\n * Reader for Audiokinetic Wwise media (.wem) containers.\n *\n * Inspection identifies the codec, channel/rate layout, and Vorbis duration\n * without decoding audio data. Read emits the container bytes untouched;\n * decode/transcode targets are deliberately out of scope for this reader.\n */\nexport class CjsWemFormat\n{\n #values = DEFAULT_VALUES;\n\n /**\n * Create a reusable wem format profile.\n *\n * @param {object} [options] Default read/inspect options.\n */\n constructor(options = {})\n {\n this.SetValues(options);\n }\n\n /**\n * Merge options into this profile.\n *\n * @param {object} [options] Values to merge.\n * @returns {CjsWemFormat} This format profile.\n */\n SetValues(options = {})\n {\n this.#values = normalizeValues(this.#values, options, FORMAT_NAME);\n return this;\n }\n\n /**\n * Get normalized profile values with optional per-call overrides.\n *\n * @param {object} [options] Per-call values.\n * @returns {object} Normalized read values.\n */\n GetValues(options = {})\n {\n return normalizeValues(this.#values, options, FORMAT_NAME);\n }\n\n /**\n * Read wem bytes with this profile.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} GPU-free raw/debug payload for the selected emit target.\n */\n Read(input, options = {})\n {\n return readWithValues(input, this.GetValues(options));\n }\n\n /**\n * Read wem bytes asynchronously with this profile.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Per-call values.\n * @returns {Promise<object>} GPU-free raw/debug payload for the selected emit target.\n */\n async ReadAsync(input, options = {})\n {\n return this.Read(input, options);\n }\n\n /**\n * Inspect wem bytes without decoding audio data.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} Wwise container metadata.\n */\n Inspect(input, options = {})\n {\n return inspectWithValues(input, this.GetValues(options));\n }\n\n /**\n * Report whether wem input and requested output variants are supported.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} Support/probe report.\n */\n IsSupported(input, options = {})\n {\n return isSupportedWithValues(input, this.GetValues(options));\n }\n\n /**\n * Convert format output into JSON-compatible debug data.\n *\n * @param {any} value Format output.\n * @returns {any} JSON-compatible value.\n */\n ToJSON(value)\n {\n return toJsonValue(value);\n }\n\n /**\n * One-shot wem read.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Read options.\n * @returns {object} GPU-free raw/debug payload for the selected emit target.\n */\n static read(input, options = {})\n {\n return readWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\n }\n\n /**\n * One-shot asynchronous wem read.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Read options.\n * @returns {Promise<object>} GPU-free raw/debug payload for the selected emit target.\n */\n static async readAsync(input, options = {})\n {\n return CjsWemFormat.read(input, options);\n }\n\n /**\n * One-shot wem inspection.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Inspect options.\n * @returns {object} Wwise container metadata.\n */\n static inspect(input, options = {})\n {\n return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\n }\n\n /**\n * One-shot wem support probe.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Probe options.\n * @returns {object} Support/probe report.\n */\n static isSupported(input, options = {})\n {\n return isSupportedWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\n }\n\n /**\n * Convert format output into JSON-compatible debug data.\n *\n * @param {any} value Format output.\n * @returns {any} JSON-compatible value.\n */\n static toJSON(value)\n {\n return toJsonValue(value);\n }\n\n /**\n * Test whether bytes look like a Wwise media container.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Candidate wem bytes.\n * @returns {boolean} True when RIFF/RIFX WAVE signatures are present.\n */\n static isWEM(input)\n {\n try\n {\n return isWEM(toBytes(input));\n }\n catch\n {\n return false;\n }\n }\n\n /**\n * Repack Wwise Vorbis wem bytes into a standard Ogg Vorbis stream.\n *\n * Lossless container transform (no audio decode/re-encode); output plays\n * natively where Ogg Vorbis is supported. Equivalent to\n * `read(input, { emit: \"ogg\" })`.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Options, including a `codebooks` override.\n * @returns {object} Ogg payload with bytes, timing, and loop metadata.\n */\n static toOgg(input, options = {})\n {\n return CjsWemFormat.read(input, { ...options, emit: OUTPUT_OGG });\n }\n\n static OUTPUT_RAW = OUTPUT_RAW;\n static OUTPUT_JSON = OUTPUT_JSON;\n static OUTPUT_WEM_JSON = OUTPUT_WEM_JSON;\n static OUTPUT_OGG = OUTPUT_OGG;\n static CODEC_NAMES = WEM_CODEC_NAMES;\n static type = Object.freeze([ \"audio\" ]);\n static mediaTypes = Object.freeze([ \"audio\" ]);\n static inputTypes = Object.freeze([ \"wem\" ]);\n static outputTypes = Object.freeze([ OUTPUT_RAW, OUTPUT_OGG ]);\n static debugOutputTypes = Object.freeze([ OUTPUT_WEM_JSON, OUTPUT_RAW ]);\n}\n\nexport default CjsWemFormat;\n"],"names":["FORMAT_NAME","CjsWemFormat","DEFAULT_VALUES","constructor","options","SetValues","normalizeValues","GetValues","Read","input","readWithValues","ReadAsync","Inspect","inspectWithValues","IsSupported","isSupportedWithValues","ToJSON","value","toJsonValue","read","readAsync","inspect","isSupported","toJSON","isWEM","toBytes","toOgg","emit","OUTPUT_OGG","OUTPUT_RAW","OUTPUT_JSON","OUTPUT_WEM_JSON","CODEC_NAMES","WEM_CODEC_NAMES","type","Object","freeze","mediaTypes","inputTypes","outputTypes","debugOutputTypes"],"mappings":";;AAgBA,MAAMA,WAAW,GAAG,cAAc;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,CACzB;EACI,OAAO,GAAGC,cAAc;;AAExB;AACJ;AACA;AACA;AACA;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