create-swdg-frontend 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 (427) hide show
  1. package/README.md +39 -0
  2. package/bin/index.js +248 -0
  3. package/package.json +29 -0
  4. package/template/.husky/commit-msg +42 -0
  5. package/template/.husky/pre-commit +2 -0
  6. package/template/.husky/prepare-commit-msg +1 -0
  7. package/template/.lintstagedrc +5 -0
  8. package/template/.prettierignore +26 -0
  9. package/template/.prettierrc.cjs +10 -0
  10. package/template/.stylelintignore +1 -0
  11. package/template/.stylelintrc.json +6 -0
  12. package/template/README.md +36 -0
  13. package/template/commitlint.config.cjs +64 -0
  14. package/template/eslint.config.js +96 -0
  15. package/template/index.html +17 -0
  16. package/template/interface/user.ts +5 -0
  17. package/template/package.json +84 -0
  18. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1012 -0
  19. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1012 -0
  20. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1012 -0
  21. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1012 -0
  22. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1012 -0
  23. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1012 -0
  24. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1012 -0
  25. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1012 -0
  26. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1012 -0
  27. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1012 -0
  28. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1012 -0
  29. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1012 -0
  30. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1012 -0
  31. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1012 -0
  32. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1012 -0
  33. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1012 -0
  34. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1012 -0
  35. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1012 -0
  36. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1012 -0
  37. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1012 -0
  38. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_27.json +438 -0
  39. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1012 -0
  40. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1012 -0
  41. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1012 -0
  42. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1012 -0
  43. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1012 -0
  44. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1012 -0
  45. package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1012 -0
  46. package/template/public/Cesium1.119/Assets/Images/bing_maps_credit.png +0 -0
  47. package/template/public/Cesium1.119/Assets/Images/cesium_credit.png +0 -0
  48. package/template/public/Cesium1.119/Assets/Images/google_earth_credit.png +0 -0
  49. package/template/public/Cesium1.119/Assets/Images/ion-credit.png +0 -0
  50. package/template/public/Cesium1.119/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
  51. package/template/public/Cesium1.119/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
  52. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
  53. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
  54. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
  55. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
  56. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
  57. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
  58. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
  59. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
  60. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
  61. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
  62. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
  63. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
  64. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
  65. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
  66. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
  67. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
  68. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
  69. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
  70. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
  71. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
  72. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
  73. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
  74. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
  75. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
  76. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
  77. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
  78. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
  79. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
  80. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
  81. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
  82. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
  83. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
  84. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
  85. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
  86. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
  87. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
  88. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
  89. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
  90. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
  91. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
  92. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
  93. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
  94. package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/tilemapresource.xml +14 -0
  95. package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
  96. package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
  97. package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
  98. package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
  99. package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
  100. package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
  101. package/template/public/Cesium1.119/Assets/Textures/maki/airfield.png +0 -0
  102. package/template/public/Cesium1.119/Assets/Textures/maki/airport.png +0 -0
  103. package/template/public/Cesium1.119/Assets/Textures/maki/alcohol-shop.png +0 -0
  104. package/template/public/Cesium1.119/Assets/Textures/maki/america-football.png +0 -0
  105. package/template/public/Cesium1.119/Assets/Textures/maki/art-gallery.png +0 -0
  106. package/template/public/Cesium1.119/Assets/Textures/maki/bakery.png +0 -0
  107. package/template/public/Cesium1.119/Assets/Textures/maki/bank.png +0 -0
  108. package/template/public/Cesium1.119/Assets/Textures/maki/bar.png +0 -0
  109. package/template/public/Cesium1.119/Assets/Textures/maki/baseball.png +0 -0
  110. package/template/public/Cesium1.119/Assets/Textures/maki/basketball.png +0 -0
  111. package/template/public/Cesium1.119/Assets/Textures/maki/beer.png +0 -0
  112. package/template/public/Cesium1.119/Assets/Textures/maki/bicycle.png +0 -0
  113. package/template/public/Cesium1.119/Assets/Textures/maki/building.png +0 -0
  114. package/template/public/Cesium1.119/Assets/Textures/maki/bus.png +0 -0
  115. package/template/public/Cesium1.119/Assets/Textures/maki/cafe.png +0 -0
  116. package/template/public/Cesium1.119/Assets/Textures/maki/camera.png +0 -0
  117. package/template/public/Cesium1.119/Assets/Textures/maki/campsite.png +0 -0
  118. package/template/public/Cesium1.119/Assets/Textures/maki/car.png +0 -0
  119. package/template/public/Cesium1.119/Assets/Textures/maki/cemetery.png +0 -0
  120. package/template/public/Cesium1.119/Assets/Textures/maki/cesium.png +0 -0
  121. package/template/public/Cesium1.119/Assets/Textures/maki/chemist.png +0 -0
  122. package/template/public/Cesium1.119/Assets/Textures/maki/cinema.png +0 -0
  123. package/template/public/Cesium1.119/Assets/Textures/maki/circle-stroked.png +0 -0
  124. package/template/public/Cesium1.119/Assets/Textures/maki/circle.png +0 -0
  125. package/template/public/Cesium1.119/Assets/Textures/maki/city.png +0 -0
  126. package/template/public/Cesium1.119/Assets/Textures/maki/clothing-store.png +0 -0
  127. package/template/public/Cesium1.119/Assets/Textures/maki/college.png +0 -0
  128. package/template/public/Cesium1.119/Assets/Textures/maki/commercial.png +0 -0
  129. package/template/public/Cesium1.119/Assets/Textures/maki/cricket.png +0 -0
  130. package/template/public/Cesium1.119/Assets/Textures/maki/cross.png +0 -0
  131. package/template/public/Cesium1.119/Assets/Textures/maki/dam.png +0 -0
  132. package/template/public/Cesium1.119/Assets/Textures/maki/danger.png +0 -0
  133. package/template/public/Cesium1.119/Assets/Textures/maki/disability.png +0 -0
  134. package/template/public/Cesium1.119/Assets/Textures/maki/dog-park.png +0 -0
  135. package/template/public/Cesium1.119/Assets/Textures/maki/embassy.png +0 -0
  136. package/template/public/Cesium1.119/Assets/Textures/maki/emergency-telephone.png +0 -0
  137. package/template/public/Cesium1.119/Assets/Textures/maki/entrance.png +0 -0
  138. package/template/public/Cesium1.119/Assets/Textures/maki/farm.png +0 -0
  139. package/template/public/Cesium1.119/Assets/Textures/maki/fast-food.png +0 -0
  140. package/template/public/Cesium1.119/Assets/Textures/maki/ferry.png +0 -0
  141. package/template/public/Cesium1.119/Assets/Textures/maki/fire-station.png +0 -0
  142. package/template/public/Cesium1.119/Assets/Textures/maki/fuel.png +0 -0
  143. package/template/public/Cesium1.119/Assets/Textures/maki/garden.png +0 -0
  144. package/template/public/Cesium1.119/Assets/Textures/maki/gift.png +0 -0
  145. package/template/public/Cesium1.119/Assets/Textures/maki/golf.png +0 -0
  146. package/template/public/Cesium1.119/Assets/Textures/maki/grocery.png +0 -0
  147. package/template/public/Cesium1.119/Assets/Textures/maki/hairdresser.png +0 -0
  148. package/template/public/Cesium1.119/Assets/Textures/maki/harbor.png +0 -0
  149. package/template/public/Cesium1.119/Assets/Textures/maki/heart.png +0 -0
  150. package/template/public/Cesium1.119/Assets/Textures/maki/heliport.png +0 -0
  151. package/template/public/Cesium1.119/Assets/Textures/maki/hospital.png +0 -0
  152. package/template/public/Cesium1.119/Assets/Textures/maki/ice-cream.png +0 -0
  153. package/template/public/Cesium1.119/Assets/Textures/maki/industrial.png +0 -0
  154. package/template/public/Cesium1.119/Assets/Textures/maki/land-use.png +0 -0
  155. package/template/public/Cesium1.119/Assets/Textures/maki/laundry.png +0 -0
  156. package/template/public/Cesium1.119/Assets/Textures/maki/library.png +0 -0
  157. package/template/public/Cesium1.119/Assets/Textures/maki/lighthouse.png +0 -0
  158. package/template/public/Cesium1.119/Assets/Textures/maki/lodging.png +0 -0
  159. package/template/public/Cesium1.119/Assets/Textures/maki/logging.png +0 -0
  160. package/template/public/Cesium1.119/Assets/Textures/maki/london-underground.png +0 -0
  161. package/template/public/Cesium1.119/Assets/Textures/maki/marker-stroked.png +0 -0
  162. package/template/public/Cesium1.119/Assets/Textures/maki/marker.png +0 -0
  163. package/template/public/Cesium1.119/Assets/Textures/maki/minefield.png +0 -0
  164. package/template/public/Cesium1.119/Assets/Textures/maki/mobilephone.png +0 -0
  165. package/template/public/Cesium1.119/Assets/Textures/maki/monument.png +0 -0
  166. package/template/public/Cesium1.119/Assets/Textures/maki/museum.png +0 -0
  167. package/template/public/Cesium1.119/Assets/Textures/maki/music.png +0 -0
  168. package/template/public/Cesium1.119/Assets/Textures/maki/oil-well.png +0 -0
  169. package/template/public/Cesium1.119/Assets/Textures/maki/park.png +0 -0
  170. package/template/public/Cesium1.119/Assets/Textures/maki/park2.png +0 -0
  171. package/template/public/Cesium1.119/Assets/Textures/maki/parking-garage.png +0 -0
  172. package/template/public/Cesium1.119/Assets/Textures/maki/parking.png +0 -0
  173. package/template/public/Cesium1.119/Assets/Textures/maki/pharmacy.png +0 -0
  174. package/template/public/Cesium1.119/Assets/Textures/maki/pitch.png +0 -0
  175. package/template/public/Cesium1.119/Assets/Textures/maki/place-of-worship.png +0 -0
  176. package/template/public/Cesium1.119/Assets/Textures/maki/playground.png +0 -0
  177. package/template/public/Cesium1.119/Assets/Textures/maki/police.png +0 -0
  178. package/template/public/Cesium1.119/Assets/Textures/maki/polling-place.png +0 -0
  179. package/template/public/Cesium1.119/Assets/Textures/maki/post.png +0 -0
  180. package/template/public/Cesium1.119/Assets/Textures/maki/prison.png +0 -0
  181. package/template/public/Cesium1.119/Assets/Textures/maki/rail-above.png +0 -0
  182. package/template/public/Cesium1.119/Assets/Textures/maki/rail-light.png +0 -0
  183. package/template/public/Cesium1.119/Assets/Textures/maki/rail-metro.png +0 -0
  184. package/template/public/Cesium1.119/Assets/Textures/maki/rail-underground.png +0 -0
  185. package/template/public/Cesium1.119/Assets/Textures/maki/rail.png +0 -0
  186. package/template/public/Cesium1.119/Assets/Textures/maki/religious-christian.png +0 -0
  187. package/template/public/Cesium1.119/Assets/Textures/maki/religious-jewish.png +0 -0
  188. package/template/public/Cesium1.119/Assets/Textures/maki/religious-muslim.png +0 -0
  189. package/template/public/Cesium1.119/Assets/Textures/maki/restaurant.png +0 -0
  190. package/template/public/Cesium1.119/Assets/Textures/maki/roadblock.png +0 -0
  191. package/template/public/Cesium1.119/Assets/Textures/maki/rocket.png +0 -0
  192. package/template/public/Cesium1.119/Assets/Textures/maki/school.png +0 -0
  193. package/template/public/Cesium1.119/Assets/Textures/maki/scooter.png +0 -0
  194. package/template/public/Cesium1.119/Assets/Textures/maki/shop.png +0 -0
  195. package/template/public/Cesium1.119/Assets/Textures/maki/skiing.png +0 -0
  196. package/template/public/Cesium1.119/Assets/Textures/maki/slaughterhouse.png +0 -0
  197. package/template/public/Cesium1.119/Assets/Textures/maki/soccer.png +0 -0
  198. package/template/public/Cesium1.119/Assets/Textures/maki/square-stroked.png +0 -0
  199. package/template/public/Cesium1.119/Assets/Textures/maki/square.png +0 -0
  200. package/template/public/Cesium1.119/Assets/Textures/maki/star-stroked.png +0 -0
  201. package/template/public/Cesium1.119/Assets/Textures/maki/star.png +0 -0
  202. package/template/public/Cesium1.119/Assets/Textures/maki/suitcase.png +0 -0
  203. package/template/public/Cesium1.119/Assets/Textures/maki/swimming.png +0 -0
  204. package/template/public/Cesium1.119/Assets/Textures/maki/telephone.png +0 -0
  205. package/template/public/Cesium1.119/Assets/Textures/maki/tennis.png +0 -0
  206. package/template/public/Cesium1.119/Assets/Textures/maki/theatre.png +0 -0
  207. package/template/public/Cesium1.119/Assets/Textures/maki/toilets.png +0 -0
  208. package/template/public/Cesium1.119/Assets/Textures/maki/town-hall.png +0 -0
  209. package/template/public/Cesium1.119/Assets/Textures/maki/town.png +0 -0
  210. package/template/public/Cesium1.119/Assets/Textures/maki/triangle-stroked.png +0 -0
  211. package/template/public/Cesium1.119/Assets/Textures/maki/triangle.png +0 -0
  212. package/template/public/Cesium1.119/Assets/Textures/maki/village.png +0 -0
  213. package/template/public/Cesium1.119/Assets/Textures/maki/warehouse.png +0 -0
  214. package/template/public/Cesium1.119/Assets/Textures/maki/waste-basket.png +0 -0
  215. package/template/public/Cesium1.119/Assets/Textures/maki/water.png +0 -0
  216. package/template/public/Cesium1.119/Assets/Textures/maki/wetland.png +0 -0
  217. package/template/public/Cesium1.119/Assets/Textures/maki/zoo.png +0 -0
  218. package/template/public/Cesium1.119/Assets/Textures/moonSmall.jpg +0 -0
  219. package/template/public/Cesium1.119/Assets/Textures/pin.svg +1 -0
  220. package/template/public/Cesium1.119/Assets/Textures/waterNormals.jpg +0 -0
  221. package/template/public/Cesium1.119/Assets/Textures/waterNormalsSmall.jpg +0 -0
  222. package/template/public/Cesium1.119/Assets/approximateTerrainHeights.json +10924 -0
  223. package/template/public/Cesium1.119/Cesium.js +185772 -0
  224. package/template/public/Cesium1.119/ThirdParty/Workers/package.json +3 -0
  225. package/template/public/Cesium1.119/ThirdParty/Workers/pako_deflate.min.js +1681 -0
  226. package/template/public/Cesium1.119/ThirdParty/Workers/pako_inflate.min.js +1489 -0
  227. package/template/public/Cesium1.119/ThirdParty/Workers/z-worker-pako.js +1070 -0
  228. package/template/public/Cesium1.119/ThirdParty/basis_transcoder.wasm +0 -0
  229. package/template/public/Cesium1.119/ThirdParty/draco_decoder.wasm +0 -0
  230. package/template/public/Cesium1.119/ThirdParty/google-earth-dbroot-parser.js +11424 -0
  231. package/template/public/Cesium1.119/Widgets/Animation/Animation.css +127 -0
  232. package/template/public/Cesium1.119/Widgets/Animation/lighter.css +78 -0
  233. package/template/public/Cesium1.119/Widgets/BaseLayerPicker/BaseLayerPicker.css +112 -0
  234. package/template/public/Cesium1.119/Widgets/BaseLayerPicker/lighter.css +28 -0
  235. package/template/public/Cesium1.119/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +104 -0
  236. package/template/public/Cesium1.119/Widgets/CesiumInspector/CesiumInspector.css +115 -0
  237. package/template/public/Cesium1.119/Widgets/CesiumWidget/CesiumWidget.css +119 -0
  238. package/template/public/Cesium1.119/Widgets/CesiumWidget/lighter.css +14 -0
  239. package/template/public/Cesium1.119/Widgets/FullscreenButton/FullscreenButton.css +8 -0
  240. package/template/public/Cesium1.119/Widgets/Geocoder/Geocoder.css +72 -0
  241. package/template/public/Cesium1.119/Widgets/Geocoder/lighter.css +17 -0
  242. package/template/public/Cesium1.119/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +27 -0
  243. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
  244. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
  245. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
  246. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
  247. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
  248. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
  249. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
  250. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
  251. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
  252. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
  253. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
  254. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
  255. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
  256. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
  257. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
  258. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
  259. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
  260. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
  261. package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
  262. package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/Mouse.svg +84 -0
  263. package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseLeft.svg +76 -0
  264. package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseMiddle.svg +76 -0
  265. package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseRight.svg +76 -0
  266. package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/Touch.svg +120 -0
  267. package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchDrag.svg +129 -0
  268. package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchRotate.svg +76 -0
  269. package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchTilt.svg +135 -0
  270. package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchZoom.svg +74 -0
  271. package/template/public/Cesium1.119/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
  272. package/template/public/Cesium1.119/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
  273. package/template/public/Cesium1.119/Widgets/Images/TimelineIcons.png +0 -0
  274. package/template/public/Cesium1.119/Widgets/Images/info-loading.gif +0 -0
  275. package/template/public/Cesium1.119/Widgets/InfoBox/InfoBox.css +94 -0
  276. package/template/public/Cesium1.119/Widgets/InfoBox/InfoBoxDescription.css +178 -0
  277. package/template/public/Cesium1.119/Widgets/NavigationHelpButton/NavigationHelpButton.css +95 -0
  278. package/template/public/Cesium1.119/Widgets/NavigationHelpButton/lighter.css +38 -0
  279. package/template/public/Cesium1.119/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +15 -0
  280. package/template/public/Cesium1.119/Widgets/ProjectionPicker/ProjectionPicker.css +46 -0
  281. package/template/public/Cesium1.119/Widgets/SceneModePicker/SceneModePicker.css +72 -0
  282. package/template/public/Cesium1.119/Widgets/SelectionIndicator/SelectionIndicator.css +22 -0
  283. package/template/public/Cesium1.119/Widgets/Timeline/Timeline.css +103 -0
  284. package/template/public/Cesium1.119/Widgets/Timeline/lighter.css +18 -0
  285. package/template/public/Cesium1.119/Widgets/VRButton/VRButton.css +8 -0
  286. package/template/public/Cesium1.119/Widgets/Viewer/Viewer.css +107 -0
  287. package/template/public/Cesium1.119/Widgets/VoxelInspector/VoxelInspector.css +18 -0
  288. package/template/public/Cesium1.119/Widgets/lighter.css +246 -0
  289. package/template/public/Cesium1.119/Widgets/lighterShared.css +46 -0
  290. package/template/public/Cesium1.119/Widgets/shared.css +103 -0
  291. package/template/public/Cesium1.119/Widgets/widgets.css +1376 -0
  292. package/template/public/Cesium1.119/Workers/chunk-3C7WC463.js +611 -0
  293. package/template/public/Cesium1.119/Workers/chunk-3JW36LZF.js +166 -0
  294. package/template/public/Cesium1.119/Workers/chunk-4BTGX3WJ.js +264 -0
  295. package/template/public/Cesium1.119/Workers/chunk-4WRMLZA7.js +128 -0
  296. package/template/public/Cesium1.119/Workers/chunk-7Z5IIKOJ.js +8046 -0
  297. package/template/public/Cesium1.119/Workers/chunk-ABGXSJNX.js +341 -0
  298. package/template/public/Cesium1.119/Workers/chunk-AMQUWUD4.js +269 -0
  299. package/template/public/Cesium1.119/Workers/chunk-ATPDRNKI.js +28 -0
  300. package/template/public/Cesium1.119/Workers/chunk-BMHPVZ4H.js +199 -0
  301. package/template/public/Cesium1.119/Workers/chunk-CBEO3SHS.js +1102 -0
  302. package/template/public/Cesium1.119/Workers/chunk-CV7DLCWG.js +485 -0
  303. package/template/public/Cesium1.119/Workers/chunk-DQO6B4EQ.js +76 -0
  304. package/template/public/Cesium1.119/Workers/chunk-ED3TLP6D.js +91 -0
  305. package/template/public/Cesium1.119/Workers/chunk-EFZKO5RU.js +42 -0
  306. package/template/public/Cesium1.119/Workers/chunk-F5IHREXR.js +2678 -0
  307. package/template/public/Cesium1.119/Workers/chunk-FKRG4HDY.js +516 -0
  308. package/template/public/Cesium1.119/Workers/chunk-FYOYUPXG.js +399 -0
  309. package/template/public/Cesium1.119/Workers/chunk-GFN7NNSJ.js +65 -0
  310. package/template/public/Cesium1.119/Workers/chunk-HEEMUCG6.js +92 -0
  311. package/template/public/Cesium1.119/Workers/chunk-HSWA4OEL.js +672 -0
  312. package/template/public/Cesium1.119/Workers/chunk-IAC5XVZV.js +287 -0
  313. package/template/public/Cesium1.119/Workers/chunk-II4VNKYR.js +50 -0
  314. package/template/public/Cesium1.119/Workers/chunk-ILGBPNP6.js +28 -0
  315. package/template/public/Cesium1.119/Workers/chunk-IRH46BDL.js +124 -0
  316. package/template/public/Cesium1.119/Workers/chunk-IUA6FAOZ.js +31 -0
  317. package/template/public/Cesium1.119/Workers/chunk-K4ASOM65.js +331 -0
  318. package/template/public/Cesium1.119/Workers/chunk-KCIZBVXL.js +258 -0
  319. package/template/public/Cesium1.119/Workers/chunk-KF5NF354.js +162 -0
  320. package/template/public/Cesium1.119/Workers/chunk-KRKI6AAO.js +773 -0
  321. package/template/public/Cesium1.119/Workers/chunk-KZNJOCYU.js +162 -0
  322. package/template/public/Cesium1.119/Workers/chunk-O5IJ3OGP.js +857 -0
  323. package/template/public/Cesium1.119/Workers/chunk-OO23RBLX.js +183 -0
  324. package/template/public/Cesium1.119/Workers/chunk-P37AI2DW.js +85 -0
  325. package/template/public/Cesium1.119/Workers/chunk-PDMQLSBL.js +108 -0
  326. package/template/public/Cesium1.119/Workers/chunk-PEYJTJPE.js +73 -0
  327. package/template/public/Cesium1.119/Workers/chunk-POASMU2N.js +2372 -0
  328. package/template/public/Cesium1.119/Workers/chunk-PXCJYT2S.js +73 -0
  329. package/template/public/Cesium1.119/Workers/chunk-Q6L7X3LP.js +538 -0
  330. package/template/public/Cesium1.119/Workers/chunk-QB3MDM4J.js +1670 -0
  331. package/template/public/Cesium1.119/Workers/chunk-R6KGAEF6.js +392 -0
  332. package/template/public/Cesium1.119/Workers/chunk-RXTBM4OI.js +57 -0
  333. package/template/public/Cesium1.119/Workers/chunk-SB224QGV.js +72 -0
  334. package/template/public/Cesium1.119/Workers/chunk-T6BE4RZK.js +37 -0
  335. package/template/public/Cesium1.119/Workers/chunk-TAMCUKAR.js +814 -0
  336. package/template/public/Cesium1.119/Workers/chunk-TMSETF7M.js +579 -0
  337. package/template/public/Cesium1.119/Workers/chunk-TOGHF3VN.js +376 -0
  338. package/template/public/Cesium1.119/Workers/chunk-UH2WFNTA.js +111 -0
  339. package/template/public/Cesium1.119/Workers/chunk-V7JEDBOE.js +573 -0
  340. package/template/public/Cesium1.119/Workers/chunk-VBIROZR5.js +633 -0
  341. package/template/public/Cesium1.119/Workers/chunk-W23CU777.js +271 -0
  342. package/template/public/Cesium1.119/Workers/chunk-X5IHHI6X.js +173 -0
  343. package/template/public/Cesium1.119/Workers/chunk-XHX2UPDO.js +217 -0
  344. package/template/public/Cesium1.119/Workers/combineGeometry.js +53 -0
  345. package/template/public/Cesium1.119/Workers/createBoxGeometry.js +45 -0
  346. package/template/public/Cesium1.119/Workers/createBoxOutlineGeometry.js +189 -0
  347. package/template/public/Cesium1.119/Workers/createCircleGeometry.js +148 -0
  348. package/template/public/Cesium1.119/Workers/createCircleOutlineGeometry.js +105 -0
  349. package/template/public/Cesium1.119/Workers/createCoplanarPolygonGeometry.js +293 -0
  350. package/template/public/Cesium1.119/Workers/createCoplanarPolygonOutlineGeometry.js +143 -0
  351. package/template/public/Cesium1.119/Workers/createCorridorGeometry.js +830 -0
  352. package/template/public/Cesium1.119/Workers/createCorridorOutlineGeometry.js +417 -0
  353. package/template/public/Cesium1.119/Workers/createCylinderGeometry.js +47 -0
  354. package/template/public/Cesium1.119/Workers/createCylinderOutlineGeometry.js +170 -0
  355. package/template/public/Cesium1.119/Workers/createEllipseGeometry.js +58 -0
  356. package/template/public/Cesium1.119/Workers/createEllipseOutlineGeometry.js +51 -0
  357. package/template/public/Cesium1.119/Workers/createEllipsoidGeometry.js +46 -0
  358. package/template/public/Cesium1.119/Workers/createEllipsoidOutlineGeometry.js +45 -0
  359. package/template/public/Cesium1.119/Workers/createFrustumGeometry.js +45 -0
  360. package/template/public/Cesium1.119/Workers/createFrustumOutlineGeometry.js +164 -0
  361. package/template/public/Cesium1.119/Workers/createGeometry.js +159 -0
  362. package/template/public/Cesium1.119/Workers/createGroundPolylineGeometry.js +911 -0
  363. package/template/public/Cesium1.119/Workers/createPlaneGeometry.js +185 -0
  364. package/template/public/Cesium1.119/Workers/createPlaneOutlineGeometry.js +93 -0
  365. package/template/public/Cesium1.119/Workers/createPolygonGeometry.js +884 -0
  366. package/template/public/Cesium1.119/Workers/createPolygonOutlineGeometry.js +359 -0
  367. package/template/public/Cesium1.119/Workers/createPolylineGeometry.js +349 -0
  368. package/template/public/Cesium1.119/Workers/createPolylineVolumeGeometry.js +262 -0
  369. package/template/public/Cesium1.119/Workers/createPolylineVolumeOutlineGeometry.js +177 -0
  370. package/template/public/Cesium1.119/Workers/createRectangleGeometry.js +787 -0
  371. package/template/public/Cesium1.119/Workers/createRectangleOutlineGeometry.js +299 -0
  372. package/template/public/Cesium1.119/Workers/createSimplePolylineGeometry.js +294 -0
  373. package/template/public/Cesium1.119/Workers/createSphereGeometry.js +84 -0
  374. package/template/public/Cesium1.119/Workers/createSphereOutlineGeometry.js +83 -0
  375. package/template/public/Cesium1.119/Workers/createTaskProcessorWorker.js +28 -0
  376. package/template/public/Cesium1.119/Workers/createVectorTileClampedPolylines.js +289 -0
  377. package/template/public/Cesium1.119/Workers/createVectorTileGeometries.js +258 -0
  378. package/template/public/Cesium1.119/Workers/createVectorTilePoints.js +79 -0
  379. package/template/public/Cesium1.119/Workers/createVectorTilePolygons.js +275 -0
  380. package/template/public/Cesium1.119/Workers/createVectorTilePolylines.js +176 -0
  381. package/template/public/Cesium1.119/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +375 -0
  382. package/template/public/Cesium1.119/Workers/createVerticesFromHeightmap.js +1772 -0
  383. package/template/public/Cesium1.119/Workers/createVerticesFromQuantizedTerrainMesh.js +425 -0
  384. package/template/public/Cesium1.119/Workers/createWallGeometry.js +320 -0
  385. package/template/public/Cesium1.119/Workers/createWallOutlineGeometry.js +229 -0
  386. package/template/public/Cesium1.119/Workers/decodeDraco.js +227 -0
  387. package/template/public/Cesium1.119/Workers/decodeGoogleEarthEnterprisePacket.js +1836 -0
  388. package/template/public/Cesium1.119/Workers/decodeI3S.js +924 -0
  389. package/template/public/Cesium1.119/Workers/transcodeKTX2.js +3180 -0
  390. package/template/public/Cesium1.119/Workers/transferTypedArrayTest.js +34 -0
  391. package/template/public/Cesium1.119/Workers/upsampleQuantizedTerrainMesh.js +534 -0
  392. package/template/public/Cesium1.119/index.cjs +185632 -0
  393. package/template/public/Cesium1.119/index.js +182874 -0
  394. package/template/public/vite.svg +1 -0
  395. package/template/scripts/gen-api.cjs +178 -0
  396. package/template/src/App.vue +6 -0
  397. package/template/src/api/README.md +3 -0
  398. package/template/src/assets/favicon.svg +49 -0
  399. package/template/src/components/Body/index.vue +16 -0
  400. package/template/src/components/Header/index.vue +8 -0
  401. package/template/src/directive/focus.ts +9 -0
  402. package/template/src/layout/BasicLayout.vue +28 -0
  403. package/template/src/main.ts +33 -0
  404. package/template/src/router/index.ts +24 -0
  405. package/template/src/stores/README.md +3 -0
  406. package/template/src/stores/useCounter.ts +12 -0
  407. package/template/src/styles/alerts.less +85 -0
  408. package/template/src/styles/global.css +326 -0
  409. package/template/src/utils/alert.ts +58 -0
  410. package/template/src/utils/components.ts +21 -0
  411. package/template/src/utils/composables/useAlert.ts +14 -0
  412. package/template/src/views/Test/index.vue +23 -0
  413. package/template/src/views/index.vue +9 -0
  414. package/template/src/vite-env.d.ts +1 -0
  415. package/template/swdg/bin/index.js +23 -0
  416. package/template/swdg/package.json +27 -0
  417. package/template/tests/README.md +6 -0
  418. package/template/tests/e2e/README.md +3 -0
  419. package/template/tests/setup.ts +1 -0
  420. package/template/tests/unit/example.test.ts +7 -0
  421. package/template/tests/utils/helpers.ts +1 -0
  422. package/template/tsconfig.json +51 -0
  423. package/template/tsconfig.node.json +11 -0
  424. package/template/types/README.md +3 -0
  425. package/template/types/global.d.ts +9 -0
  426. package/template/vite.config.ts +75 -0
  427. package/template/vitest.config.ts +9 -0
@@ -0,0 +1,3180 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.119
5
+ *
6
+ * Copyright 2011-2022 Cesium Contributors
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ *
20
+ * Columbus View (Pat. Pend.)
21
+ *
22
+ * Portions licensed separately.
23
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
+ */
25
+
26
+ import { a as rn } from "./chunk-PXCJYT2S.js";
27
+ import { a as M } from "./chunk-3C7WC463.js";
28
+ import { a as ie } from "./chunk-II4VNKYR.js";
29
+ import { a as _n } from "./chunk-IUA6FAOZ.js";
30
+ import { b as nn } from "./chunk-UH2WFNTA.js";
31
+ import { a as Gt, c as sr, d as or, e as ge } from "./chunk-PEYJTJPE.js";
32
+ var Rn = sr((it, pt) => {
33
+ var Nt = (function () {
34
+ var i =
35
+ typeof document < "u" && document.currentScript
36
+ ? document.currentScript.src
37
+ : void 0;
38
+ return (
39
+ typeof __filename < "u" && (i = i || __filename),
40
+ function (f) {
41
+ f = f || {};
42
+ var r = typeof f < "u" ? f : {},
43
+ B,
44
+ l;
45
+ r.ready = new Promise(function (e, t) {
46
+ ((B = e), (l = t));
47
+ });
48
+ var p = {},
49
+ C;
50
+ for (C in r) r.hasOwnProperty(C) && (p[C] = r[C]);
51
+ var U = [],
52
+ y = "./this.program",
53
+ m = function (e, t) {
54
+ throw t;
55
+ },
56
+ V = !1,
57
+ d = !1,
58
+ P = !1,
59
+ Q = !1;
60
+ ((V = typeof window == "object"),
61
+ (d = typeof importScripts == "function"),
62
+ (P =
63
+ typeof process == "object" &&
64
+ typeof process.versions == "object" &&
65
+ typeof process.versions.node == "string"),
66
+ (Q = !V && !P && !d));
67
+ var u = "";
68
+ function X(e) {
69
+ return r.locateFile ? r.locateFile(e, u) : u + e;
70
+ }
71
+ var se, le, W, J, g, Fe;
72
+ P
73
+ ? (d ? (u = Gt("path").dirname(u) + "/") : (u = __dirname + "/"),
74
+ (se = function (t, n) {
75
+ return (
76
+ g || (g = Gt("fs")),
77
+ Fe || (Fe = Gt("path")),
78
+ (t = Fe.normalize(t)),
79
+ g.readFileSync(t, n ? null : "utf8")
80
+ );
81
+ }),
82
+ (W = function (t) {
83
+ var n = se(t, !0);
84
+ return (n.buffer || (n = new Uint8Array(n)), Se(n.buffer), n);
85
+ }),
86
+ process.argv.length > 1 &&
87
+ (y = process.argv[1].replace(/\\/g, "/")),
88
+ (U = process.argv.slice(2)),
89
+ process.on("uncaughtException", function (e) {
90
+ if (!(e instanceof rr)) throw e;
91
+ }),
92
+ process.on("unhandledRejection", Me),
93
+ (m = function (e) {
94
+ process.exit(e);
95
+ }),
96
+ (r.inspect = function () {
97
+ return "[Emscripten Module object]";
98
+ }))
99
+ : Q
100
+ ? (typeof read < "u" &&
101
+ (se = function (t) {
102
+ return read(t);
103
+ }),
104
+ (W = function (t) {
105
+ var n;
106
+ return typeof readbuffer == "function"
107
+ ? new Uint8Array(readbuffer(t))
108
+ : ((n = read(t, "binary")), Se(typeof n == "object"), n);
109
+ }),
110
+ typeof scriptArgs < "u"
111
+ ? (U = scriptArgs)
112
+ : typeof arguments < "u" && (U = arguments),
113
+ typeof quit == "function" &&
114
+ (m = function (e) {
115
+ quit(e);
116
+ }),
117
+ typeof print < "u" &&
118
+ (typeof console > "u" && (console = {}),
119
+ (console.log = print),
120
+ (console.warn = console.error =
121
+ typeof printErr < "u" ? printErr : print)))
122
+ : (V || d) &&
123
+ (d
124
+ ? (u = self.location.href)
125
+ : typeof document < "u" &&
126
+ document.currentScript &&
127
+ (u = document.currentScript.src),
128
+ i && (u = i),
129
+ u.indexOf("blob:") !== 0
130
+ ? (u = u.substr(0, u.lastIndexOf("/") + 1))
131
+ : (u = ""),
132
+ (se = function (e) {
133
+ var t = new XMLHttpRequest();
134
+ return (t.open("GET", e, !1), t.send(null), t.responseText);
135
+ }),
136
+ d &&
137
+ (W = function (e) {
138
+ var t = new XMLHttpRequest();
139
+ return (
140
+ t.open("GET", e, !1),
141
+ (t.responseType = "arraybuffer"),
142
+ t.send(null),
143
+ new Uint8Array(t.response)
144
+ );
145
+ }),
146
+ (le = function (e, t, n) {
147
+ var _ = new XMLHttpRequest();
148
+ (_.open("GET", e, !0),
149
+ (_.responseType = "arraybuffer"),
150
+ (_.onload = function () {
151
+ if (_.status == 200 || (_.status == 0 && _.response)) {
152
+ t(_.response);
153
+ return;
154
+ }
155
+ n();
156
+ }),
157
+ (_.onerror = n),
158
+ _.send(null));
159
+ }),
160
+ (J = function (e) {
161
+ document.title = e;
162
+ }));
163
+ var st = r.print || console.log.bind(console),
164
+ ee = r.printErr || console.warn.bind(console);
165
+ for (C in p) p.hasOwnProperty(C) && (r[C] = p[C]);
166
+ ((p = null),
167
+ r.arguments && (U = r.arguments),
168
+ r.thisProgram && (y = r.thisProgram),
169
+ r.quit && (m = r.quit));
170
+ var De = 0,
171
+ Ie = function (e) {
172
+ De = e;
173
+ },
174
+ ae;
175
+ r.wasmBinary && (ae = r.wasmBinary);
176
+ var ot = r.noExitRuntime || !0;
177
+ typeof WebAssembly != "object" && Me("no native wasm support detected");
178
+ var ce,
179
+ de = !1,
180
+ be;
181
+ function Se(e, t) {
182
+ e || Me("Assertion failed: " + t);
183
+ }
184
+ var we = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0;
185
+ function He(e, t, n) {
186
+ for (var _ = t + n, s = t; e[s] && !(s >= _); ) ++s;
187
+ if (s - t > 16 && e.subarray && we)
188
+ return we.decode(e.subarray(t, s));
189
+ for (var a = ""; t < s; ) {
190
+ var c = e[t++];
191
+ if (!(c & 128)) {
192
+ a += String.fromCharCode(c);
193
+ continue;
194
+ }
195
+ var o = e[t++] & 63;
196
+ if ((c & 224) == 192) {
197
+ a += String.fromCharCode(((c & 31) << 6) | o);
198
+ continue;
199
+ }
200
+ var R = e[t++] & 63;
201
+ if (
202
+ ((c & 240) == 224
203
+ ? (c = ((c & 15) << 12) | (o << 6) | R)
204
+ : (c = ((c & 7) << 18) | (o << 12) | (R << 6) | (e[t++] & 63)),
205
+ c < 65536)
206
+ )
207
+ a += String.fromCharCode(c);
208
+ else {
209
+ var T = c - 65536;
210
+ a += String.fromCharCode(55296 | (T >> 10), 56320 | (T & 1023));
211
+ }
212
+ }
213
+ return a;
214
+ }
215
+ function Xe(e, t) {
216
+ return e ? He(D, e, t) : "";
217
+ }
218
+ function Rt(e, t, n, _) {
219
+ if (!(_ > 0)) return 0;
220
+ for (var s = n, a = n + _ - 1, c = 0; c < e.length; ++c) {
221
+ var o = e.charCodeAt(c);
222
+ if (o >= 55296 && o <= 57343) {
223
+ var R = e.charCodeAt(++c);
224
+ o = (65536 + ((o & 1023) << 10)) | (R & 1023);
225
+ }
226
+ if (o <= 127) {
227
+ if (n >= a) break;
228
+ t[n++] = o;
229
+ } else if (o <= 2047) {
230
+ if (n + 1 >= a) break;
231
+ ((t[n++] = 192 | (o >> 6)), (t[n++] = 128 | (o & 63)));
232
+ } else if (o <= 65535) {
233
+ if (n + 2 >= a) break;
234
+ ((t[n++] = 224 | (o >> 12)),
235
+ (t[n++] = 128 | ((o >> 6) & 63)),
236
+ (t[n++] = 128 | (o & 63)));
237
+ } else {
238
+ if (n + 3 >= a) break;
239
+ ((t[n++] = 240 | (o >> 18)),
240
+ (t[n++] = 128 | ((o >> 12) & 63)),
241
+ (t[n++] = 128 | ((o >> 6) & 63)),
242
+ (t[n++] = 128 | (o & 63)));
243
+ }
244
+ }
245
+ return ((t[n] = 0), n - s);
246
+ }
247
+ function L(e, t, n) {
248
+ return Rt(e, D, t, n);
249
+ }
250
+ function j(e) {
251
+ for (var t = 0, n = 0; n < e.length; ++n) {
252
+ var _ = e.charCodeAt(n);
253
+ (_ >= 55296 &&
254
+ _ <= 57343 &&
255
+ (_ = (65536 + ((_ & 1023) << 10)) | (e.charCodeAt(++n) & 1023)),
256
+ _ <= 127
257
+ ? ++t
258
+ : _ <= 2047
259
+ ? (t += 2)
260
+ : _ <= 65535
261
+ ? (t += 3)
262
+ : (t += 4));
263
+ }
264
+ return t;
265
+ }
266
+ var Ae =
267
+ typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0;
268
+ function at(e, t) {
269
+ for (var n = e, _ = n >> 1, s = _ + t / 2; !(_ >= s) && Ge[_]; ) ++_;
270
+ if (((n = _ << 1), n - e > 32 && Ae))
271
+ return Ae.decode(D.subarray(e, n));
272
+ for (var a = "", c = 0; !(c >= t / 2); ++c) {
273
+ var o = fe[(e + c * 2) >> 1];
274
+ if (o == 0) break;
275
+ a += String.fromCharCode(o);
276
+ }
277
+ return a;
278
+ }
279
+ function xe(e, t, n) {
280
+ if ((n === void 0 && (n = 2147483647), n < 2)) return 0;
281
+ n -= 2;
282
+ for (
283
+ var _ = t, s = n < e.length * 2 ? n / 2 : e.length, a = 0;
284
+ a < s;
285
+ ++a
286
+ ) {
287
+ var c = e.charCodeAt(a);
288
+ ((fe[t >> 1] = c), (t += 2));
289
+ }
290
+ return ((fe[t >> 1] = 0), t - _);
291
+ }
292
+ function Tn(e) {
293
+ return e.length * 2;
294
+ }
295
+ function un(e, t) {
296
+ for (var n = 0, _ = ""; !(n >= t / 4); ) {
297
+ var s = H[(e + n * 4) >> 2];
298
+ if (s == 0) break;
299
+ if ((++n, s >= 65536)) {
300
+ var a = s - 65536;
301
+ _ += String.fromCharCode(55296 | (a >> 10), 56320 | (a & 1023));
302
+ } else _ += String.fromCharCode(s);
303
+ }
304
+ return _;
305
+ }
306
+ function On(e, t, n) {
307
+ if ((n === void 0 && (n = 2147483647), n < 4)) return 0;
308
+ for (var _ = t, s = _ + n - 4, a = 0; a < e.length; ++a) {
309
+ var c = e.charCodeAt(a);
310
+ if (c >= 55296 && c <= 57343) {
311
+ var o = e.charCodeAt(++a);
312
+ c = (65536 + ((c & 1023) << 10)) | (o & 1023);
313
+ }
314
+ if (((H[t >> 2] = c), (t += 4), t + 4 > s)) break;
315
+ }
316
+ return ((H[t >> 2] = 0), t - _);
317
+ }
318
+ function ln(e) {
319
+ for (var t = 0, n = 0; n < e.length; ++n) {
320
+ var _ = e.charCodeAt(n);
321
+ (_ >= 55296 && _ <= 57343 && ++n, (t += 4));
322
+ }
323
+ return t;
324
+ }
325
+ function Mn(e, t) {
326
+ return (e % t > 0 && (e += t - (e % t)), e);
327
+ }
328
+ var ct, ke, D, fe, Ge, H, Y, Pt, Et;
329
+ function vt(e) {
330
+ ((ct = e),
331
+ (r.HEAP8 = ke = new Int8Array(e)),
332
+ (r.HEAP16 = fe = new Int16Array(e)),
333
+ (r.HEAP32 = H = new Int32Array(e)),
334
+ (r.HEAPU8 = D = new Uint8Array(e)),
335
+ (r.HEAPU16 = Ge = new Uint16Array(e)),
336
+ (r.HEAPU32 = Y = new Uint32Array(e)),
337
+ (r.HEAPF32 = Pt = new Float32Array(e)),
338
+ (r.HEAPF64 = Et = new Float64Array(e)));
339
+ }
340
+ var ur = r.INITIAL_MEMORY || 16777216,
341
+ Ve,
342
+ ht = [],
343
+ Ut = [],
344
+ Kn = [],
345
+ yt = [],
346
+ Bn = !1;
347
+ function Cn() {
348
+ if (r.preRun)
349
+ for (
350
+ typeof r.preRun == "function" && (r.preRun = [r.preRun]);
351
+ r.preRun.length;
352
+ )
353
+ Gn(r.preRun.shift());
354
+ $e(ht);
355
+ }
356
+ function Fn() {
357
+ ((Bn = !0), $e(Ut));
358
+ }
359
+ function dn() {
360
+ $e(Kn);
361
+ }
362
+ function Sn() {
363
+ if (r.postRun)
364
+ for (
365
+ typeof r.postRun == "function" && (r.postRun = [r.postRun]);
366
+ r.postRun.length;
367
+ )
368
+ Nn(r.postRun.shift());
369
+ $e(yt);
370
+ }
371
+ function Gn(e) {
372
+ ht.unshift(e);
373
+ }
374
+ function Vn(e) {
375
+ Ut.unshift(e);
376
+ }
377
+ function Nn(e) {
378
+ yt.unshift(e);
379
+ }
380
+ var Te = 0,
381
+ At = null,
382
+ Ne = null;
383
+ function pn(e) {
384
+ (Te++, r.monitorRunDependencies && r.monitorRunDependencies(Te));
385
+ }
386
+ function Pn(e) {
387
+ if (
388
+ (Te--,
389
+ r.monitorRunDependencies && r.monitorRunDependencies(Te),
390
+ Te == 0 && (At !== null && (clearInterval(At), (At = null)), Ne))
391
+ ) {
392
+ var t = Ne;
393
+ ((Ne = null), t());
394
+ }
395
+ }
396
+ ((r.preloadedImages = {}), (r.preloadedAudios = {}));
397
+ function Me(e) {
398
+ (r.onAbort && r.onAbort(e),
399
+ (e += ""),
400
+ ee(e),
401
+ (de = !0),
402
+ (be = 1),
403
+ (e =
404
+ "abort(" + e + "). Build with -s ASSERTIONS=1 for more info."));
405
+ var t = new WebAssembly.RuntimeError(e);
406
+ throw (l(t), t);
407
+ }
408
+ function gt(e, t) {
409
+ return String.prototype.startsWith
410
+ ? e.startsWith(t)
411
+ : e.indexOf(t) === 0;
412
+ }
413
+ var En = "data:application/octet-stream;base64,";
414
+ function Lt(e) {
415
+ return gt(e, En);
416
+ }
417
+ var vn = "file://";
418
+ function mt(e) {
419
+ return gt(e, vn);
420
+ }
421
+ var x = "basis_transcoder.wasm";
422
+ Lt(x) || (x = X(x));
423
+ function Dt(e) {
424
+ try {
425
+ if (e == x && ae) return new Uint8Array(ae);
426
+ if (W) return W(e);
427
+ throw "both async and sync fetching of the wasm failed";
428
+ } catch (t) {
429
+ Me(t);
430
+ }
431
+ }
432
+ function hn() {
433
+ if (!ae && (V || d)) {
434
+ if (typeof fetch == "function" && !mt(x))
435
+ return fetch(x, { credentials: "same-origin" })
436
+ .then(function (e) {
437
+ if (!e.ok)
438
+ throw "failed to load wasm binary file at '" + x + "'";
439
+ return e.arrayBuffer();
440
+ })
441
+ .catch(function () {
442
+ return Dt(x);
443
+ });
444
+ if (le)
445
+ return new Promise(function (e, t) {
446
+ le(
447
+ x,
448
+ function (n) {
449
+ e(new Uint8Array(n));
450
+ },
451
+ t,
452
+ );
453
+ });
454
+ }
455
+ return Promise.resolve().then(function () {
456
+ return Dt(x);
457
+ });
458
+ }
459
+ function Un() {
460
+ var e = { a: er };
461
+ function t(c, o) {
462
+ var R = c.exports;
463
+ ((r.asm = R),
464
+ (ce = r.asm.K),
465
+ vt(ce.buffer),
466
+ (Ve = r.asm.O),
467
+ Vn(r.asm.L),
468
+ Pn("wasm-instantiate"));
469
+ }
470
+ pn("wasm-instantiate");
471
+ function n(c) {
472
+ t(c.instance);
473
+ }
474
+ function _(c) {
475
+ return hn()
476
+ .then(function (o) {
477
+ var R = WebAssembly.instantiate(o, e);
478
+ return R;
479
+ })
480
+ .then(c, function (o) {
481
+ (ee("failed to asynchronously prepare wasm: " + o), Me(o));
482
+ });
483
+ }
484
+ function s() {
485
+ return !ae &&
486
+ typeof WebAssembly.instantiateStreaming == "function" &&
487
+ !Lt(x) &&
488
+ !mt(x) &&
489
+ typeof fetch == "function"
490
+ ? fetch(x, { credentials: "same-origin" }).then(function (c) {
491
+ var o = WebAssembly.instantiateStreaming(c, e);
492
+ return o.then(n, function (R) {
493
+ return (
494
+ ee("wasm streaming compile failed: " + R),
495
+ ee("falling back to ArrayBuffer instantiation"),
496
+ _(n)
497
+ );
498
+ });
499
+ })
500
+ : _(n);
501
+ }
502
+ if (r.instantiateWasm)
503
+ try {
504
+ var a = r.instantiateWasm(e, t);
505
+ return a;
506
+ } catch (c) {
507
+ return (
508
+ ee("Module.instantiateWasm callback failed with error: " + c),
509
+ !1
510
+ );
511
+ }
512
+ return (s().catch(l), {});
513
+ }
514
+ function $e(e) {
515
+ for (; e.length > 0; ) {
516
+ var t = e.shift();
517
+ if (typeof t == "function") {
518
+ t(r);
519
+ continue;
520
+ }
521
+ var n = t.func;
522
+ typeof n == "number"
523
+ ? t.arg === void 0
524
+ ? Ve.get(n)()
525
+ : Ve.get(n)(t.arg)
526
+ : n(t.arg === void 0 ? null : t.arg);
527
+ }
528
+ }
529
+ var We = {};
530
+ function je(e) {
531
+ for (; e.length; ) {
532
+ var t = e.pop(),
533
+ n = e.pop();
534
+ n(t);
535
+ }
536
+ }
537
+ function pe(e) {
538
+ return this.fromWireType(Y[e >> 2]);
539
+ }
540
+ var Ke = {},
541
+ ue = {},
542
+ ze = {},
543
+ yn = 48,
544
+ gn = 57;
545
+ function Ye(e) {
546
+ if (e === void 0) return "_unknown";
547
+ e = e.replace(/[^a-zA-Z0-9_]/g, "$");
548
+ var t = e.charCodeAt(0);
549
+ return t >= yn && t <= gn ? "_" + e : e;
550
+ }
551
+ function qe(e, t) {
552
+ return (
553
+ (e = Ye(e)),
554
+ new Function(
555
+ "body",
556
+ "return function " +
557
+ e +
558
+ `() {
559
+ "use strict"; return body.apply(this, arguments);
560
+ };
561
+ `,
562
+ )(t)
563
+ );
564
+ }
565
+ function ft(e, t) {
566
+ var n = qe(t, function (_) {
567
+ ((this.name = t), (this.message = _));
568
+ var s = new Error(_).stack;
569
+ s !== void 0 &&
570
+ (this.stack =
571
+ this.toString() +
572
+ `
573
+ ` +
574
+ s.replace(/^Error(:[^\n]*)?\n/, ""));
575
+ });
576
+ return (
577
+ (n.prototype = Object.create(e.prototype)),
578
+ (n.prototype.constructor = n),
579
+ (n.prototype.toString = function () {
580
+ return this.message === void 0
581
+ ? this.name
582
+ : this.name + ": " + this.message;
583
+ }),
584
+ n
585
+ );
586
+ }
587
+ var It = void 0;
588
+ function Ze(e) {
589
+ throw new It(e);
590
+ }
591
+ function oe(e, t, n) {
592
+ e.forEach(function (o) {
593
+ ze[o] = t;
594
+ });
595
+ function _(o) {
596
+ var R = n(o);
597
+ R.length !== e.length && Ze("Mismatched type converter count");
598
+ for (var T = 0; T < e.length; ++T) q(e[T], R[T]);
599
+ }
600
+ var s = new Array(t.length),
601
+ a = [],
602
+ c = 0;
603
+ (t.forEach(function (o, R) {
604
+ ue.hasOwnProperty(o)
605
+ ? (s[R] = ue[o])
606
+ : (a.push(o),
607
+ Ke.hasOwnProperty(o) || (Ke[o] = []),
608
+ Ke[o].push(function () {
609
+ ((s[R] = ue[o]), ++c, c === a.length && _(s));
610
+ }));
611
+ }),
612
+ a.length === 0 && _(s));
613
+ }
614
+ function Ln(e) {
615
+ var t = We[e];
616
+ delete We[e];
617
+ var n = t.rawConstructor,
618
+ _ = t.rawDestructor,
619
+ s = t.fields,
620
+ a = s
621
+ .map(function (c) {
622
+ return c.getterReturnType;
623
+ })
624
+ .concat(
625
+ s.map(function (c) {
626
+ return c.setterArgumentType;
627
+ }),
628
+ );
629
+ oe([e], a, function (c) {
630
+ var o = {};
631
+ return (
632
+ s.forEach(function (R, T) {
633
+ var O = R.fieldName,
634
+ K = c[T],
635
+ G = R.getter,
636
+ N = R.getterContext,
637
+ h = c[T + s.length],
638
+ I = R.setter,
639
+ $ = R.setterContext;
640
+ o[O] = {
641
+ read: function (Z) {
642
+ return K.fromWireType(G(N, Z));
643
+ },
644
+ write: function (Z, ye) {
645
+ var re = [];
646
+ (I($, Z, h.toWireType(re, ye)), je(re));
647
+ },
648
+ };
649
+ }),
650
+ [
651
+ {
652
+ name: t.name,
653
+ fromWireType: function (R) {
654
+ var T = {};
655
+ for (var O in o) T[O] = o[O].read(R);
656
+ return (_(R), T);
657
+ },
658
+ toWireType: function (R, T) {
659
+ for (var O in o)
660
+ if (!(O in T))
661
+ throw new TypeError('Missing field: "' + O + '"');
662
+ var K = n();
663
+ for (O in o) o[O].write(K, T[O]);
664
+ return (R !== null && R.push(_, K), K);
665
+ },
666
+ argPackAdvance: 8,
667
+ readValueFromPointer: pe,
668
+ destructorFunction: _,
669
+ },
670
+ ]
671
+ );
672
+ });
673
+ }
674
+ function Qe(e) {
675
+ switch (e) {
676
+ case 1:
677
+ return 0;
678
+ case 2:
679
+ return 1;
680
+ case 4:
681
+ return 2;
682
+ case 8:
683
+ return 3;
684
+ default:
685
+ throw new TypeError("Unknown type size: " + e);
686
+ }
687
+ }
688
+ function mn() {
689
+ for (var e = new Array(256), t = 0; t < 256; ++t)
690
+ e[t] = String.fromCharCode(t);
691
+ bt = e;
692
+ }
693
+ var bt = void 0;
694
+ function v(e) {
695
+ for (var t = "", n = e; D[n]; ) t += bt[D[n++]];
696
+ return t;
697
+ }
698
+ var Be = void 0;
699
+ function S(e) {
700
+ throw new Be(e);
701
+ }
702
+ function q(e, t, n) {
703
+ if (((n = n || {}), !("argPackAdvance" in t)))
704
+ throw new TypeError(
705
+ "registerType registeredInstance requires argPackAdvance",
706
+ );
707
+ var _ = t.name;
708
+ if (
709
+ (e ||
710
+ S('type "' + _ + '" must have a positive integer typeid pointer'),
711
+ ue.hasOwnProperty(e))
712
+ ) {
713
+ if (n.ignoreDuplicateRegistrations) return;
714
+ S("Cannot register type '" + _ + "' twice");
715
+ }
716
+ if (((ue[e] = t), delete ze[e], Ke.hasOwnProperty(e))) {
717
+ var s = Ke[e];
718
+ (delete Ke[e],
719
+ s.forEach(function (a) {
720
+ a();
721
+ }));
722
+ }
723
+ }
724
+ function Dn(e, t, n, _, s) {
725
+ var a = Qe(n);
726
+ ((t = v(t)),
727
+ q(e, {
728
+ name: t,
729
+ fromWireType: function (c) {
730
+ return !!c;
731
+ },
732
+ toWireType: function (c, o) {
733
+ return o ? _ : s;
734
+ },
735
+ argPackAdvance: 8,
736
+ readValueFromPointer: function (c) {
737
+ var o;
738
+ if (n === 1) o = ke;
739
+ else if (n === 2) o = fe;
740
+ else if (n === 4) o = H;
741
+ else throw new TypeError("Unknown boolean type size: " + t);
742
+ return this.fromWireType(o[c >> a]);
743
+ },
744
+ destructorFunction: null,
745
+ }));
746
+ }
747
+ function In(e) {
748
+ if (!(this instanceof Re) || !(e instanceof Re)) return !1;
749
+ for (
750
+ var t = this.$$.ptrType.registeredClass,
751
+ n = this.$$.ptr,
752
+ _ = e.$$.ptrType.registeredClass,
753
+ s = e.$$.ptr;
754
+ t.baseClass;
755
+ )
756
+ ((n = t.upcast(n)), (t = t.baseClass));
757
+ for (; _.baseClass; ) ((s = _.upcast(s)), (_ = _.baseClass));
758
+ return t === _ && n === s;
759
+ }
760
+ function bn(e) {
761
+ return {
762
+ count: e.count,
763
+ deleteScheduled: e.deleteScheduled,
764
+ preservePointerOnDelete: e.preservePointerOnDelete,
765
+ ptr: e.ptr,
766
+ ptrType: e.ptrType,
767
+ smartPtr: e.smartPtr,
768
+ smartPtrType: e.smartPtrType,
769
+ };
770
+ }
771
+ function Tt(e) {
772
+ function t(n) {
773
+ return n.$$.ptrType.registeredClass.name;
774
+ }
775
+ S(t(e) + " instance already deleted");
776
+ }
777
+ var ut = !1;
778
+ function wt(e) {}
779
+ function wn(e) {
780
+ e.smartPtr
781
+ ? e.smartPtrType.rawDestructor(e.smartPtr)
782
+ : e.ptrType.registeredClass.rawDestructor(e.ptr);
783
+ }
784
+ function Ht(e) {
785
+ e.count.value -= 1;
786
+ var t = e.count.value === 0;
787
+ t && wn(e);
788
+ }
789
+ function Pe(e) {
790
+ return typeof FinalizationGroup > "u"
791
+ ? ((Pe = function (t) {
792
+ return t;
793
+ }),
794
+ e)
795
+ : ((ut = new FinalizationGroup(function (t) {
796
+ for (var n = t.next(); !n.done; n = t.next()) {
797
+ var _ = n.value;
798
+ _.ptr
799
+ ? Ht(_)
800
+ : console.warn("object already deleted: " + _.ptr);
801
+ }
802
+ })),
803
+ (Pe = function (t) {
804
+ return (ut.register(t, t.$$, t.$$), t);
805
+ }),
806
+ (wt = function (t) {
807
+ ut.unregister(t.$$);
808
+ }),
809
+ Pe(e));
810
+ }
811
+ function Hn() {
812
+ if ((this.$$.ptr || Tt(this), this.$$.preservePointerOnDelete))
813
+ return ((this.$$.count.value += 1), this);
814
+ var e = Pe(
815
+ Object.create(Object.getPrototypeOf(this), {
816
+ $$: { value: bn(this.$$) },
817
+ }),
818
+ );
819
+ return ((e.$$.count.value += 1), (e.$$.deleteScheduled = !1), e);
820
+ }
821
+ function Xn() {
822
+ (this.$$.ptr || Tt(this),
823
+ this.$$.deleteScheduled &&
824
+ !this.$$.preservePointerOnDelete &&
825
+ S("Object already scheduled for deletion"),
826
+ wt(this),
827
+ Ht(this.$$),
828
+ this.$$.preservePointerOnDelete ||
829
+ ((this.$$.smartPtr = void 0), (this.$$.ptr = void 0)));
830
+ }
831
+ function xn() {
832
+ return !this.$$.ptr;
833
+ }
834
+ var Ee = void 0,
835
+ ve = [];
836
+ function Ot() {
837
+ for (; ve.length; ) {
838
+ var e = ve.pop();
839
+ ((e.$$.deleteScheduled = !1), e.delete());
840
+ }
841
+ }
842
+ function kn() {
843
+ return (
844
+ this.$$.ptr || Tt(this),
845
+ this.$$.deleteScheduled &&
846
+ !this.$$.preservePointerOnDelete &&
847
+ S("Object already scheduled for deletion"),
848
+ ve.push(this),
849
+ ve.length === 1 && Ee && Ee(Ot),
850
+ (this.$$.deleteScheduled = !0),
851
+ this
852
+ );
853
+ }
854
+ function $n() {
855
+ ((Re.prototype.isAliasOf = In),
856
+ (Re.prototype.clone = Hn),
857
+ (Re.prototype.delete = Xn),
858
+ (Re.prototype.isDeleted = xn),
859
+ (Re.prototype.deleteLater = kn));
860
+ }
861
+ function Re() {}
862
+ var Xt = {};
863
+ function xt(e, t, n) {
864
+ if (e[t].overloadTable === void 0) {
865
+ var _ = e[t];
866
+ ((e[t] = function () {
867
+ return (
868
+ e[t].overloadTable.hasOwnProperty(arguments.length) ||
869
+ S(
870
+ "Function '" +
871
+ n +
872
+ "' called with an invalid number of arguments (" +
873
+ arguments.length +
874
+ ") - expects one of (" +
875
+ e[t].overloadTable +
876
+ ")!",
877
+ ),
878
+ e[t].overloadTable[arguments.length].apply(this, arguments)
879
+ );
880
+ }),
881
+ (e[t].overloadTable = []),
882
+ (e[t].overloadTable[_.argCount] = _));
883
+ }
884
+ }
885
+ function lt(e, t, n) {
886
+ r.hasOwnProperty(e)
887
+ ? ((n === void 0 ||
888
+ (r[e].overloadTable !== void 0 &&
889
+ r[e].overloadTable[n] !== void 0)) &&
890
+ S("Cannot register public name '" + e + "' twice"),
891
+ xt(r, e, e),
892
+ r.hasOwnProperty(n) &&
893
+ S(
894
+ "Cannot register multiple overloads of a function with the same number of arguments (" +
895
+ n +
896
+ ")!",
897
+ ),
898
+ (r[e].overloadTable[n] = t))
899
+ : ((r[e] = t), n !== void 0 && (r[e].numArguments = n));
900
+ }
901
+ function Wn(e, t, n, _, s, a, c, o) {
902
+ ((this.name = e),
903
+ (this.constructor = t),
904
+ (this.instancePrototype = n),
905
+ (this.rawDestructor = _),
906
+ (this.baseClass = s),
907
+ (this.getActualType = a),
908
+ (this.upcast = c),
909
+ (this.downcast = o),
910
+ (this.pureVirtualFunctions = []));
911
+ }
912
+ function Mt(e, t, n) {
913
+ for (; t !== n; )
914
+ (t.upcast ||
915
+ S(
916
+ "Expected null or instance of " +
917
+ n.name +
918
+ ", got an instance of " +
919
+ t.name,
920
+ ),
921
+ (e = t.upcast(e)),
922
+ (t = t.baseClass));
923
+ return e;
924
+ }
925
+ function jn(e, t) {
926
+ if (t === null)
927
+ return (
928
+ this.isReference && S("null is not a valid " + this.name),
929
+ 0
930
+ );
931
+ (t.$$ || S('Cannot pass "' + Ce(t) + '" as a ' + this.name),
932
+ t.$$.ptr ||
933
+ S(
934
+ "Cannot pass deleted object as a pointer of type " + this.name,
935
+ ));
936
+ var n = t.$$.ptrType.registeredClass,
937
+ _ = Mt(t.$$.ptr, n, this.registeredClass);
938
+ return _;
939
+ }
940
+ function zn(e, t) {
941
+ var n;
942
+ if (t === null)
943
+ return (
944
+ this.isReference && S("null is not a valid " + this.name),
945
+ this.isSmartPointer
946
+ ? ((n = this.rawConstructor()),
947
+ e !== null && e.push(this.rawDestructor, n),
948
+ n)
949
+ : 0
950
+ );
951
+ (t.$$ || S('Cannot pass "' + Ce(t) + '" as a ' + this.name),
952
+ t.$$.ptr ||
953
+ S("Cannot pass deleted object as a pointer of type " + this.name),
954
+ !this.isConst &&
955
+ t.$$.ptrType.isConst &&
956
+ S(
957
+ "Cannot convert argument of type " +
958
+ (t.$$.smartPtrType
959
+ ? t.$$.smartPtrType.name
960
+ : t.$$.ptrType.name) +
961
+ " to parameter type " +
962
+ this.name,
963
+ ));
964
+ var _ = t.$$.ptrType.registeredClass;
965
+ if (
966
+ ((n = Mt(t.$$.ptr, _, this.registeredClass)), this.isSmartPointer)
967
+ )
968
+ switch (
969
+ (t.$$.smartPtr === void 0 &&
970
+ S("Passing raw pointer to smart pointer is illegal"),
971
+ this.sharingPolicy)
972
+ ) {
973
+ case 0:
974
+ t.$$.smartPtrType === this
975
+ ? (n = t.$$.smartPtr)
976
+ : S(
977
+ "Cannot convert argument of type " +
978
+ (t.$$.smartPtrType
979
+ ? t.$$.smartPtrType.name
980
+ : t.$$.ptrType.name) +
981
+ " to parameter type " +
982
+ this.name,
983
+ );
984
+ break;
985
+ case 1:
986
+ n = t.$$.smartPtr;
987
+ break;
988
+ case 2:
989
+ if (t.$$.smartPtrType === this) n = t.$$.smartPtr;
990
+ else {
991
+ var s = t.clone();
992
+ ((n = this.rawShare(
993
+ n,
994
+ ne(function () {
995
+ s.delete();
996
+ }),
997
+ )),
998
+ e !== null && e.push(this.rawDestructor, n));
999
+ }
1000
+ break;
1001
+ default:
1002
+ S("Unsupporting sharing policy");
1003
+ }
1004
+ return n;
1005
+ }
1006
+ function Yn(e, t) {
1007
+ if (t === null)
1008
+ return (
1009
+ this.isReference && S("null is not a valid " + this.name),
1010
+ 0
1011
+ );
1012
+ (t.$$ || S('Cannot pass "' + Ce(t) + '" as a ' + this.name),
1013
+ t.$$.ptr ||
1014
+ S("Cannot pass deleted object as a pointer of type " + this.name),
1015
+ t.$$.ptrType.isConst &&
1016
+ S(
1017
+ "Cannot convert argument of type " +
1018
+ t.$$.ptrType.name +
1019
+ " to parameter type " +
1020
+ this.name,
1021
+ ));
1022
+ var n = t.$$.ptrType.registeredClass,
1023
+ _ = Mt(t.$$.ptr, n, this.registeredClass);
1024
+ return _;
1025
+ }
1026
+ function qn(e) {
1027
+ return (this.rawGetPointee && (e = this.rawGetPointee(e)), e);
1028
+ }
1029
+ function Zn(e) {
1030
+ this.rawDestructor && this.rawDestructor(e);
1031
+ }
1032
+ function Qn(e) {
1033
+ e !== null && e.delete();
1034
+ }
1035
+ function kt(e, t, n) {
1036
+ if (t === n) return e;
1037
+ if (n.baseClass === void 0) return null;
1038
+ var _ = kt(e, t, n.baseClass);
1039
+ return _ === null ? null : n.downcast(_);
1040
+ }
1041
+ function Jn() {
1042
+ return Object.keys(he).length;
1043
+ }
1044
+ function e_() {
1045
+ var e = [];
1046
+ for (var t in he) he.hasOwnProperty(t) && e.push(he[t]);
1047
+ return e;
1048
+ }
1049
+ function t_(e) {
1050
+ ((Ee = e), ve.length && Ee && Ee(Ot));
1051
+ }
1052
+ function n_() {
1053
+ ((r.getInheritedInstanceCount = Jn),
1054
+ (r.getLiveInheritedInstances = e_),
1055
+ (r.flushPendingDeletes = Ot),
1056
+ (r.setDelayFunction = t_));
1057
+ }
1058
+ var he = {};
1059
+ function __(e, t) {
1060
+ for (t === void 0 && S("ptr should not be undefined"); e.baseClass; )
1061
+ ((t = e.upcast(t)), (e = e.baseClass));
1062
+ return t;
1063
+ }
1064
+ function r_(e, t) {
1065
+ return ((t = __(e, t)), he[t]);
1066
+ }
1067
+ function Je(e, t) {
1068
+ (!t.ptrType || !t.ptr) &&
1069
+ Ze("makeClassHandle requires ptr and ptrType");
1070
+ var n = !!t.smartPtrType,
1071
+ _ = !!t.smartPtr;
1072
+ return (
1073
+ n !== _ && Ze("Both smartPtrType and smartPtr must be specified"),
1074
+ (t.count = { value: 1 }),
1075
+ Pe(Object.create(e, { $$: { value: t } }))
1076
+ );
1077
+ }
1078
+ function i_(e) {
1079
+ var t = this.getPointee(e);
1080
+ if (!t) return (this.destructor(e), null);
1081
+ var n = r_(this.registeredClass, t);
1082
+ if (n !== void 0) {
1083
+ if (n.$$.count.value === 0)
1084
+ return ((n.$$.ptr = t), (n.$$.smartPtr = e), n.clone());
1085
+ var _ = n.clone();
1086
+ return (this.destructor(e), _);
1087
+ }
1088
+ function s() {
1089
+ return this.isSmartPointer
1090
+ ? Je(this.registeredClass.instancePrototype, {
1091
+ ptrType: this.pointeeType,
1092
+ ptr: t,
1093
+ smartPtrType: this,
1094
+ smartPtr: e,
1095
+ })
1096
+ : Je(this.registeredClass.instancePrototype, {
1097
+ ptrType: this,
1098
+ ptr: e,
1099
+ });
1100
+ }
1101
+ var a = this.registeredClass.getActualType(t),
1102
+ c = Xt[a];
1103
+ if (!c) return s.call(this);
1104
+ var o;
1105
+ this.isConst ? (o = c.constPointerType) : (o = c.pointerType);
1106
+ var R = kt(t, this.registeredClass, o.registeredClass);
1107
+ return R === null
1108
+ ? s.call(this)
1109
+ : this.isSmartPointer
1110
+ ? Je(o.registeredClass.instancePrototype, {
1111
+ ptrType: o,
1112
+ ptr: R,
1113
+ smartPtrType: this,
1114
+ smartPtr: e,
1115
+ })
1116
+ : Je(o.registeredClass.instancePrototype, { ptrType: o, ptr: R });
1117
+ }
1118
+ function s_() {
1119
+ ((te.prototype.getPointee = qn),
1120
+ (te.prototype.destructor = Zn),
1121
+ (te.prototype.argPackAdvance = 8),
1122
+ (te.prototype.readValueFromPointer = pe),
1123
+ (te.prototype.deleteObject = Qn),
1124
+ (te.prototype.fromWireType = i_));
1125
+ }
1126
+ function te(e, t, n, _, s, a, c, o, R, T, O) {
1127
+ ((this.name = e),
1128
+ (this.registeredClass = t),
1129
+ (this.isReference = n),
1130
+ (this.isConst = _),
1131
+ (this.isSmartPointer = s),
1132
+ (this.pointeeType = a),
1133
+ (this.sharingPolicy = c),
1134
+ (this.rawGetPointee = o),
1135
+ (this.rawConstructor = R),
1136
+ (this.rawShare = T),
1137
+ (this.rawDestructor = O),
1138
+ !s && t.baseClass === void 0
1139
+ ? _
1140
+ ? ((this.toWireType = jn), (this.destructorFunction = null))
1141
+ : ((this.toWireType = Yn), (this.destructorFunction = null))
1142
+ : (this.toWireType = zn));
1143
+ }
1144
+ function $t(e, t, n) {
1145
+ (r.hasOwnProperty(e) || Ze("Replacing nonexistant public symbol"),
1146
+ r[e].overloadTable !== void 0 && n !== void 0
1147
+ ? (r[e].overloadTable[n] = t)
1148
+ : ((r[e] = t), (r[e].argCount = n)));
1149
+ }
1150
+ function o_(e, t, n) {
1151
+ var _ = r["dynCall_" + e];
1152
+ return n && n.length ? _.apply(null, [t].concat(n)) : _.call(null, t);
1153
+ }
1154
+ function R_(e, t, n) {
1155
+ return e.indexOf("j") != -1 ? o_(e, t, n) : Ve.get(t).apply(null, n);
1156
+ }
1157
+ function a_(e, t) {
1158
+ var n = [];
1159
+ return function () {
1160
+ n.length = arguments.length;
1161
+ for (var _ = 0; _ < arguments.length; _++) n[_] = arguments[_];
1162
+ return R_(e, t, n);
1163
+ };
1164
+ }
1165
+ function z(e, t) {
1166
+ e = v(e);
1167
+ function n() {
1168
+ return e.indexOf("j") != -1 ? a_(e, t) : Ve.get(t);
1169
+ }
1170
+ var _ = n();
1171
+ return (
1172
+ typeof _ != "function" &&
1173
+ S("unknown function pointer with signature " + e + ": " + t),
1174
+ _
1175
+ );
1176
+ }
1177
+ var Wt = void 0;
1178
+ function jt(e) {
1179
+ var t = Qt(e),
1180
+ n = v(t);
1181
+ return (_e(t), n);
1182
+ }
1183
+ function et(e, t) {
1184
+ var n = [],
1185
+ _ = {};
1186
+ function s(a) {
1187
+ if (!_[a] && !ue[a]) {
1188
+ if (ze[a]) {
1189
+ ze[a].forEach(s);
1190
+ return;
1191
+ }
1192
+ (n.push(a), (_[a] = !0));
1193
+ }
1194
+ }
1195
+ throw (t.forEach(s), new Wt(e + ": " + n.map(jt).join([", "])));
1196
+ }
1197
+ function c_(e, t, n, _, s, a, c, o, R, T, O, K, G) {
1198
+ ((O = v(O)),
1199
+ (a = z(s, a)),
1200
+ o && (o = z(c, o)),
1201
+ T && (T = z(R, T)),
1202
+ (G = z(K, G)));
1203
+ var N = Ye(O);
1204
+ (lt(N, function () {
1205
+ et("Cannot construct " + O + " due to unbound types", [_]);
1206
+ }),
1207
+ oe([e, t, n], _ ? [_] : [], function (h) {
1208
+ h = h[0];
1209
+ var I, $;
1210
+ _
1211
+ ? ((I = h.registeredClass), ($ = I.instancePrototype))
1212
+ : ($ = Re.prototype);
1213
+ var Z = qe(N, function () {
1214
+ if (Object.getPrototypeOf(this) !== ye)
1215
+ throw new Be("Use 'new' to construct " + O);
1216
+ if (re.constructor_body === void 0)
1217
+ throw new Be(O + " has no accessible constructor");
1218
+ var tn = re.constructor_body[arguments.length];
1219
+ if (tn === void 0)
1220
+ throw new Be(
1221
+ "Tried to invoke ctor of " +
1222
+ O +
1223
+ " with invalid number of parameters (" +
1224
+ arguments.length +
1225
+ ") - expected (" +
1226
+ Object.keys(re.constructor_body).toString() +
1227
+ ") parameters instead!",
1228
+ );
1229
+ return tn.apply(this, arguments);
1230
+ }),
1231
+ ye = Object.create($, { constructor: { value: Z } });
1232
+ Z.prototype = ye;
1233
+ var re = new Wn(O, Z, ye, G, I, a, o, T),
1234
+ ir = new te(O, re, !0, !1, !1),
1235
+ Jt = new te(O + "*", re, !1, !1, !1),
1236
+ en = new te(O + " const*", re, !1, !0, !1);
1237
+ return (
1238
+ (Xt[e] = { pointerType: Jt, constPointerType: en }),
1239
+ $t(N, Z),
1240
+ [ir, Jt, en]
1241
+ );
1242
+ }));
1243
+ }
1244
+ function Kt(e, t) {
1245
+ for (var n = [], _ = 0; _ < e; _++) n.push(H[(t >> 2) + _]);
1246
+ return n;
1247
+ }
1248
+ function A_(e, t, n, _, s, a) {
1249
+ Se(t > 0);
1250
+ var c = Kt(t, n);
1251
+ s = z(_, s);
1252
+ var o = [a],
1253
+ R = [];
1254
+ oe([], [e], function (T) {
1255
+ T = T[0];
1256
+ var O = "constructor " + T.name;
1257
+ if (
1258
+ (T.registeredClass.constructor_body === void 0 &&
1259
+ (T.registeredClass.constructor_body = []),
1260
+ T.registeredClass.constructor_body[t - 1] !== void 0)
1261
+ )
1262
+ throw new Be(
1263
+ "Cannot register multiple constructors with identical number of parameters (" +
1264
+ (t - 1) +
1265
+ ") for class '" +
1266
+ T.name +
1267
+ "'! Overload resolution is currently only performed using the parameter count, not actual type info!",
1268
+ );
1269
+ return (
1270
+ (T.registeredClass.constructor_body[t - 1] = function () {
1271
+ et("Cannot construct " + T.name + " due to unbound types", c);
1272
+ }),
1273
+ oe([], c, function (K) {
1274
+ return (
1275
+ (T.registeredClass.constructor_body[t - 1] = function () {
1276
+ (arguments.length !== t - 1 &&
1277
+ S(
1278
+ O +
1279
+ " called with " +
1280
+ arguments.length +
1281
+ " arguments, expected " +
1282
+ (t - 1),
1283
+ ),
1284
+ (R.length = 0),
1285
+ (o.length = t));
1286
+ for (var N = 1; N < t; ++N)
1287
+ o[N] = K[N].toWireType(R, arguments[N - 1]);
1288
+ var h = s.apply(null, o);
1289
+ return (je(R), K[0].fromWireType(h));
1290
+ }),
1291
+ []
1292
+ );
1293
+ }),
1294
+ []
1295
+ );
1296
+ });
1297
+ }
1298
+ function zt(e, t) {
1299
+ if (!(e instanceof Function))
1300
+ throw new TypeError(
1301
+ "new_ called with constructor type " +
1302
+ typeof e +
1303
+ " which is not a function",
1304
+ );
1305
+ var n = qe(e.name || "unknownFunctionName", function () {});
1306
+ n.prototype = e.prototype;
1307
+ var _ = new n(),
1308
+ s = e.apply(_, t);
1309
+ return s instanceof Object ? s : _;
1310
+ }
1311
+ function Yt(e, t, n, _, s) {
1312
+ var a = t.length;
1313
+ a < 2 &&
1314
+ S(
1315
+ "argTypes array size mismatch! Must at least get return value and 'this' types!",
1316
+ );
1317
+ for (
1318
+ var c = t[1] !== null && n !== null, o = !1, R = 1;
1319
+ R < t.length;
1320
+ ++R
1321
+ )
1322
+ if (t[R] !== null && t[R].destructorFunction === void 0) {
1323
+ o = !0;
1324
+ break;
1325
+ }
1326
+ for (
1327
+ var T = t[0].name !== "void", O = "", K = "", R = 0;
1328
+ R < a - 2;
1329
+ ++R
1330
+ )
1331
+ ((O += (R !== 0 ? ", " : "") + "arg" + R),
1332
+ (K += (R !== 0 ? ", " : "") + "arg" + R + "Wired"));
1333
+ var G =
1334
+ "return function " +
1335
+ Ye(e) +
1336
+ "(" +
1337
+ O +
1338
+ `) {
1339
+ if (arguments.length !== ` +
1340
+ (a - 2) +
1341
+ `) {
1342
+ throwBindingError('function ` +
1343
+ e +
1344
+ " called with ' + arguments.length + ' arguments, expected " +
1345
+ (a - 2) +
1346
+ ` args!');
1347
+ }
1348
+ `;
1349
+ o &&
1350
+ (G += `var destructors = [];
1351
+ `);
1352
+ var N = o ? "destructors" : "null",
1353
+ h = [
1354
+ "throwBindingError",
1355
+ "invoker",
1356
+ "fn",
1357
+ "runDestructors",
1358
+ "retType",
1359
+ "classParam",
1360
+ ],
1361
+ I = [S, _, s, je, t[0], t[1]];
1362
+ c &&
1363
+ (G +=
1364
+ "var thisWired = classParam.toWireType(" +
1365
+ N +
1366
+ `, this);
1367
+ `);
1368
+ for (var R = 0; R < a - 2; ++R)
1369
+ ((G +=
1370
+ "var arg" +
1371
+ R +
1372
+ "Wired = argType" +
1373
+ R +
1374
+ ".toWireType(" +
1375
+ N +
1376
+ ", arg" +
1377
+ R +
1378
+ "); // " +
1379
+ t[R + 2].name +
1380
+ `
1381
+ `),
1382
+ h.push("argType" + R),
1383
+ I.push(t[R + 2]));
1384
+ if (
1385
+ (c && (K = "thisWired" + (K.length > 0 ? ", " : "") + K),
1386
+ (G +=
1387
+ (T ? "var rv = " : "") +
1388
+ "invoker(fn" +
1389
+ (K.length > 0 ? ", " : "") +
1390
+ K +
1391
+ `);
1392
+ `),
1393
+ o)
1394
+ )
1395
+ G += `runDestructors(destructors);
1396
+ `;
1397
+ else
1398
+ for (var R = c ? 1 : 2; R < t.length; ++R) {
1399
+ var $ = R === 1 ? "thisWired" : "arg" + (R - 2) + "Wired";
1400
+ t[R].destructorFunction !== null &&
1401
+ ((G +=
1402
+ $ +
1403
+ "_dtor(" +
1404
+ $ +
1405
+ "); // " +
1406
+ t[R].name +
1407
+ `
1408
+ `),
1409
+ h.push($ + "_dtor"),
1410
+ I.push(t[R].destructorFunction));
1411
+ }
1412
+ (T &&
1413
+ (G += `var ret = retType.fromWireType(rv);
1414
+ return ret;
1415
+ `),
1416
+ (G += `}
1417
+ `),
1418
+ h.push(G));
1419
+ var Z = zt(Function, h).apply(null, I);
1420
+ return Z;
1421
+ }
1422
+ function f_(e, t, n, _, s, a, c, o) {
1423
+ var R = Kt(n, _);
1424
+ ((t = v(t)),
1425
+ (a = z(s, a)),
1426
+ oe([], [e], function (T) {
1427
+ T = T[0];
1428
+ var O = T.name + "." + t;
1429
+ o && T.registeredClass.pureVirtualFunctions.push(t);
1430
+ function K() {
1431
+ et("Cannot call " + O + " due to unbound types", R);
1432
+ }
1433
+ var G = T.registeredClass.instancePrototype,
1434
+ N = G[t];
1435
+ return (
1436
+ N === void 0 ||
1437
+ (N.overloadTable === void 0 &&
1438
+ N.className !== T.name &&
1439
+ N.argCount === n - 2)
1440
+ ? ((K.argCount = n - 2), (K.className = T.name), (G[t] = K))
1441
+ : (xt(G, t, O), (G[t].overloadTable[n - 2] = K)),
1442
+ oe([], R, function (h) {
1443
+ var I = Yt(O, h, T, a, c);
1444
+ return (
1445
+ G[t].overloadTable === void 0
1446
+ ? ((I.argCount = n - 2), (G[t] = I))
1447
+ : (G[t].overloadTable[n - 2] = I),
1448
+ []
1449
+ );
1450
+ }),
1451
+ []
1452
+ );
1453
+ }));
1454
+ }
1455
+ function T_(e, t, n) {
1456
+ ((e = v(e)),
1457
+ oe([], [t], function (_) {
1458
+ return ((_ = _[0]), (r[e] = _.fromWireType(n)), []);
1459
+ }));
1460
+ }
1461
+ var Bt = [],
1462
+ k = [
1463
+ {},
1464
+ { value: void 0 },
1465
+ { value: null },
1466
+ { value: !0 },
1467
+ { value: !1 },
1468
+ ];
1469
+ function Ct(e) {
1470
+ e > 4 && --k[e].refcount === 0 && ((k[e] = void 0), Bt.push(e));
1471
+ }
1472
+ function u_() {
1473
+ for (var e = 0, t = 5; t < k.length; ++t) k[t] !== void 0 && ++e;
1474
+ return e;
1475
+ }
1476
+ function O_() {
1477
+ for (var e = 5; e < k.length; ++e) if (k[e] !== void 0) return k[e];
1478
+ return null;
1479
+ }
1480
+ function l_() {
1481
+ ((r.count_emval_handles = u_), (r.get_first_emval = O_));
1482
+ }
1483
+ function ne(e) {
1484
+ switch (e) {
1485
+ case void 0:
1486
+ return 1;
1487
+ case null:
1488
+ return 2;
1489
+ case !0:
1490
+ return 3;
1491
+ case !1:
1492
+ return 4;
1493
+ default: {
1494
+ var t = Bt.length ? Bt.pop() : k.length;
1495
+ return ((k[t] = { refcount: 1, value: e }), t);
1496
+ }
1497
+ }
1498
+ }
1499
+ function M_(e, t) {
1500
+ ((t = v(t)),
1501
+ q(e, {
1502
+ name: t,
1503
+ fromWireType: function (n) {
1504
+ var _ = k[n].value;
1505
+ return (Ct(n), _);
1506
+ },
1507
+ toWireType: function (n, _) {
1508
+ return ne(_);
1509
+ },
1510
+ argPackAdvance: 8,
1511
+ readValueFromPointer: pe,
1512
+ destructorFunction: null,
1513
+ }));
1514
+ }
1515
+ function K_(e, t, n) {
1516
+ switch (t) {
1517
+ case 0:
1518
+ return function (_) {
1519
+ var s = n ? ke : D;
1520
+ return this.fromWireType(s[_]);
1521
+ };
1522
+ case 1:
1523
+ return function (_) {
1524
+ var s = n ? fe : Ge;
1525
+ return this.fromWireType(s[_ >> 1]);
1526
+ };
1527
+ case 2:
1528
+ return function (_) {
1529
+ var s = n ? H : Y;
1530
+ return this.fromWireType(s[_ >> 2]);
1531
+ };
1532
+ default:
1533
+ throw new TypeError("Unknown integer type: " + e);
1534
+ }
1535
+ }
1536
+ function B_(e, t, n, _) {
1537
+ var s = Qe(n);
1538
+ t = v(t);
1539
+ function a() {}
1540
+ ((a.values = {}),
1541
+ q(e, {
1542
+ name: t,
1543
+ constructor: a,
1544
+ fromWireType: function (c) {
1545
+ return this.constructor.values[c];
1546
+ },
1547
+ toWireType: function (c, o) {
1548
+ return o.value;
1549
+ },
1550
+ argPackAdvance: 8,
1551
+ readValueFromPointer: K_(t, s, _),
1552
+ destructorFunction: null,
1553
+ }),
1554
+ lt(t, a));
1555
+ }
1556
+ function tt(e, t) {
1557
+ var n = ue[e];
1558
+ return (n === void 0 && S(t + " has unknown type " + jt(e)), n);
1559
+ }
1560
+ function C_(e, t, n) {
1561
+ var _ = tt(e, "enum");
1562
+ t = v(t);
1563
+ var s = _.constructor,
1564
+ a = Object.create(_.constructor.prototype, {
1565
+ value: { value: n },
1566
+ constructor: { value: qe(_.name + "_" + t, function () {}) },
1567
+ });
1568
+ ((s.values[n] = a), (s[t] = a));
1569
+ }
1570
+ function Ce(e) {
1571
+ if (e === null) return "null";
1572
+ var t = typeof e;
1573
+ return t === "object" || t === "array" || t === "function"
1574
+ ? e.toString()
1575
+ : "" + e;
1576
+ }
1577
+ function F_(e, t) {
1578
+ switch (t) {
1579
+ case 2:
1580
+ return function (n) {
1581
+ return this.fromWireType(Pt[n >> 2]);
1582
+ };
1583
+ case 3:
1584
+ return function (n) {
1585
+ return this.fromWireType(Et[n >> 3]);
1586
+ };
1587
+ default:
1588
+ throw new TypeError("Unknown float type: " + e);
1589
+ }
1590
+ }
1591
+ function d_(e, t, n) {
1592
+ var _ = Qe(n);
1593
+ ((t = v(t)),
1594
+ q(e, {
1595
+ name: t,
1596
+ fromWireType: function (s) {
1597
+ return s;
1598
+ },
1599
+ toWireType: function (s, a) {
1600
+ if (typeof a != "number" && typeof a != "boolean")
1601
+ throw new TypeError(
1602
+ 'Cannot convert "' + Ce(a) + '" to ' + this.name,
1603
+ );
1604
+ return a;
1605
+ },
1606
+ argPackAdvance: 8,
1607
+ readValueFromPointer: F_(t, _),
1608
+ destructorFunction: null,
1609
+ }));
1610
+ }
1611
+ function S_(e, t, n, _, s, a) {
1612
+ var c = Kt(t, n);
1613
+ ((e = v(e)),
1614
+ (s = z(_, s)),
1615
+ lt(
1616
+ e,
1617
+ function () {
1618
+ et("Cannot call " + e + " due to unbound types", c);
1619
+ },
1620
+ t - 1,
1621
+ ),
1622
+ oe([], c, function (o) {
1623
+ var R = [o[0], null].concat(o.slice(1));
1624
+ return ($t(e, Yt(e, R, null, s, a), t - 1), []);
1625
+ }));
1626
+ }
1627
+ function G_(e, t, n) {
1628
+ switch (t) {
1629
+ case 0:
1630
+ return n
1631
+ ? function (s) {
1632
+ return ke[s];
1633
+ }
1634
+ : function (s) {
1635
+ return D[s];
1636
+ };
1637
+ case 1:
1638
+ return n
1639
+ ? function (s) {
1640
+ return fe[s >> 1];
1641
+ }
1642
+ : function (s) {
1643
+ return Ge[s >> 1];
1644
+ };
1645
+ case 2:
1646
+ return n
1647
+ ? function (s) {
1648
+ return H[s >> 2];
1649
+ }
1650
+ : function (s) {
1651
+ return Y[s >> 2];
1652
+ };
1653
+ default:
1654
+ throw new TypeError("Unknown integer type: " + e);
1655
+ }
1656
+ }
1657
+ function V_(e, t, n, _, s) {
1658
+ ((t = v(t)), s === -1 && (s = 4294967295));
1659
+ var a = Qe(n),
1660
+ c = function (T) {
1661
+ return T;
1662
+ };
1663
+ if (_ === 0) {
1664
+ var o = 32 - 8 * n;
1665
+ c = function (T) {
1666
+ return (T << o) >>> o;
1667
+ };
1668
+ }
1669
+ var R = t.indexOf("unsigned") != -1;
1670
+ q(e, {
1671
+ name: t,
1672
+ fromWireType: c,
1673
+ toWireType: function (T, O) {
1674
+ if (typeof O != "number" && typeof O != "boolean")
1675
+ throw new TypeError(
1676
+ 'Cannot convert "' + Ce(O) + '" to ' + this.name,
1677
+ );
1678
+ if (O < _ || O > s)
1679
+ throw new TypeError(
1680
+ 'Passing a number "' +
1681
+ Ce(O) +
1682
+ '" from JS side to C/C++ side to an argument of type "' +
1683
+ t +
1684
+ '", which is outside the valid range [' +
1685
+ _ +
1686
+ ", " +
1687
+ s +
1688
+ "]!",
1689
+ );
1690
+ return R ? O >>> 0 : O | 0;
1691
+ },
1692
+ argPackAdvance: 8,
1693
+ readValueFromPointer: G_(t, a, _ !== 0),
1694
+ destructorFunction: null,
1695
+ });
1696
+ }
1697
+ function N_(e, t, n) {
1698
+ var _ = [
1699
+ Int8Array,
1700
+ Uint8Array,
1701
+ Int16Array,
1702
+ Uint16Array,
1703
+ Int32Array,
1704
+ Uint32Array,
1705
+ Float32Array,
1706
+ Float64Array,
1707
+ ],
1708
+ s = _[t];
1709
+ function a(c) {
1710
+ c = c >> 2;
1711
+ var o = Y,
1712
+ R = o[c],
1713
+ T = o[c + 1];
1714
+ return new s(ct, T, R);
1715
+ }
1716
+ ((n = v(n)),
1717
+ q(
1718
+ e,
1719
+ {
1720
+ name: n,
1721
+ fromWireType: a,
1722
+ argPackAdvance: 8,
1723
+ readValueFromPointer: a,
1724
+ },
1725
+ { ignoreDuplicateRegistrations: !0 },
1726
+ ));
1727
+ }
1728
+ function p_(e, t) {
1729
+ t = v(t);
1730
+ var n = t === "std::string";
1731
+ q(e, {
1732
+ name: t,
1733
+ fromWireType: function (_) {
1734
+ var s = Y[_ >> 2],
1735
+ a;
1736
+ if (n)
1737
+ for (var c = _ + 4, o = 0; o <= s; ++o) {
1738
+ var R = _ + 4 + o;
1739
+ if (o == s || D[R] == 0) {
1740
+ var T = R - c,
1741
+ O = Xe(c, T);
1742
+ (a === void 0 ? (a = O) : ((a += "\0"), (a += O)),
1743
+ (c = R + 1));
1744
+ }
1745
+ }
1746
+ else {
1747
+ for (var K = new Array(s), o = 0; o < s; ++o)
1748
+ K[o] = String.fromCharCode(D[_ + 4 + o]);
1749
+ a = K.join("");
1750
+ }
1751
+ return (_e(_), a);
1752
+ },
1753
+ toWireType: function (_, s) {
1754
+ s instanceof ArrayBuffer && (s = new Uint8Array(s));
1755
+ var a,
1756
+ c = typeof s == "string";
1757
+ (c ||
1758
+ s instanceof Uint8Array ||
1759
+ s instanceof Uint8ClampedArray ||
1760
+ s instanceof Int8Array ||
1761
+ S("Cannot pass non-string to std::string"),
1762
+ n && c
1763
+ ? (a = function () {
1764
+ return j(s);
1765
+ })
1766
+ : (a = function () {
1767
+ return s.length;
1768
+ }));
1769
+ var o = a(),
1770
+ R = dt(4 + o + 1);
1771
+ if (((Y[R >> 2] = o), n && c)) L(s, R + 4, o + 1);
1772
+ else if (c)
1773
+ for (var T = 0; T < o; ++T) {
1774
+ var O = s.charCodeAt(T);
1775
+ (O > 255 &&
1776
+ (_e(R),
1777
+ S(
1778
+ "String has UTF-16 code units that do not fit in 8 bits",
1779
+ )),
1780
+ (D[R + 4 + T] = O));
1781
+ }
1782
+ else for (var T = 0; T < o; ++T) D[R + 4 + T] = s[T];
1783
+ return (_ !== null && _.push(_e, R), R);
1784
+ },
1785
+ argPackAdvance: 8,
1786
+ readValueFromPointer: pe,
1787
+ destructorFunction: function (_) {
1788
+ _e(_);
1789
+ },
1790
+ });
1791
+ }
1792
+ function P_(e, t, n) {
1793
+ n = v(n);
1794
+ var _, s, a, c, o;
1795
+ (t === 2
1796
+ ? ((_ = at),
1797
+ (s = xe),
1798
+ (c = Tn),
1799
+ (a = function () {
1800
+ return Ge;
1801
+ }),
1802
+ (o = 1))
1803
+ : t === 4 &&
1804
+ ((_ = un),
1805
+ (s = On),
1806
+ (c = ln),
1807
+ (a = function () {
1808
+ return Y;
1809
+ }),
1810
+ (o = 2)),
1811
+ q(e, {
1812
+ name: n,
1813
+ fromWireType: function (R) {
1814
+ for (
1815
+ var T = Y[R >> 2], O = a(), K, G = R + 4, N = 0;
1816
+ N <= T;
1817
+ ++N
1818
+ ) {
1819
+ var h = R + 4 + N * t;
1820
+ if (N == T || O[h >> o] == 0) {
1821
+ var I = h - G,
1822
+ $ = _(G, I);
1823
+ (K === void 0 ? (K = $) : ((K += "\0"), (K += $)),
1824
+ (G = h + t));
1825
+ }
1826
+ }
1827
+ return (_e(R), K);
1828
+ },
1829
+ toWireType: function (R, T) {
1830
+ typeof T != "string" &&
1831
+ S("Cannot pass non-string to C++ string type " + n);
1832
+ var O = c(T),
1833
+ K = dt(4 + O + t);
1834
+ return (
1835
+ (Y[K >> 2] = O >> o),
1836
+ s(T, K + 4, O + t),
1837
+ R !== null && R.push(_e, K),
1838
+ K
1839
+ );
1840
+ },
1841
+ argPackAdvance: 8,
1842
+ readValueFromPointer: pe,
1843
+ destructorFunction: function (R) {
1844
+ _e(R);
1845
+ },
1846
+ }));
1847
+ }
1848
+ function E_(e, t, n, _, s, a) {
1849
+ We[e] = {
1850
+ name: v(t),
1851
+ rawConstructor: z(n, _),
1852
+ rawDestructor: z(s, a),
1853
+ fields: [],
1854
+ };
1855
+ }
1856
+ function v_(e, t, n, _, s, a, c, o, R, T) {
1857
+ We[e].fields.push({
1858
+ fieldName: v(t),
1859
+ getterReturnType: n,
1860
+ getter: z(_, s),
1861
+ getterContext: a,
1862
+ setterArgumentType: c,
1863
+ setter: z(o, R),
1864
+ setterContext: T,
1865
+ });
1866
+ }
1867
+ function h_(e, t) {
1868
+ ((t = v(t)),
1869
+ q(e, {
1870
+ isVoid: !0,
1871
+ name: t,
1872
+ argPackAdvance: 0,
1873
+ fromWireType: function () {},
1874
+ toWireType: function (n, _) {},
1875
+ }));
1876
+ }
1877
+ function Ue(e) {
1878
+ return (e || S("Cannot use deleted val. handle = " + e), k[e].value);
1879
+ }
1880
+ function U_(e, t, n) {
1881
+ ((e = Ue(e)), (t = tt(t, "emval::as")));
1882
+ var _ = [],
1883
+ s = ne(_);
1884
+ return ((H[n >> 2] = s), t.toWireType(_, e));
1885
+ }
1886
+ var y_ = {};
1887
+ function nt(e) {
1888
+ var t = y_[e];
1889
+ return t === void 0 ? v(e) : t;
1890
+ }
1891
+ var Ft = [];
1892
+ function g_(e, t, n, _) {
1893
+ ((e = Ft[e]), (t = Ue(t)), (n = nt(n)), e(t, n, null, _));
1894
+ }
1895
+ function qt() {
1896
+ return typeof globalThis == "object"
1897
+ ? globalThis
1898
+ : (function () {
1899
+ return Function;
1900
+ })()("return this")();
1901
+ }
1902
+ function L_(e) {
1903
+ return e === 0 ? ne(qt()) : ((e = nt(e)), ne(qt()[e]));
1904
+ }
1905
+ function m_(e) {
1906
+ var t = Ft.length;
1907
+ return (Ft.push(e), t);
1908
+ }
1909
+ function D_(e, t) {
1910
+ for (var n = new Array(e), _ = 0; _ < e; ++_)
1911
+ n[_] = tt(H[(t >> 2) + _], "parameter " + _);
1912
+ return n;
1913
+ }
1914
+ function I_(e, t) {
1915
+ for (
1916
+ var n = D_(e, t),
1917
+ _ = n[0],
1918
+ s =
1919
+ _.name +
1920
+ "_$" +
1921
+ n
1922
+ .slice(1)
1923
+ .map(function (N) {
1924
+ return N.name;
1925
+ })
1926
+ .join("_") +
1927
+ "$",
1928
+ a = ["retType"],
1929
+ c = [_],
1930
+ o = "",
1931
+ R = 0;
1932
+ R < e - 1;
1933
+ ++R
1934
+ )
1935
+ ((o += (R !== 0 ? ", " : "") + "arg" + R),
1936
+ a.push("argType" + R),
1937
+ c.push(n[1 + R]));
1938
+ for (
1939
+ var T = Ye("methodCaller_" + s),
1940
+ O =
1941
+ "return function " +
1942
+ T +
1943
+ `(handle, name, destructors, args) {
1944
+ `,
1945
+ K = 0,
1946
+ R = 0;
1947
+ R < e - 1;
1948
+ ++R
1949
+ )
1950
+ ((O +=
1951
+ " var arg" +
1952
+ R +
1953
+ " = argType" +
1954
+ R +
1955
+ ".readValueFromPointer(args" +
1956
+ (K ? "+" + K : "") +
1957
+ `);
1958
+ `),
1959
+ (K += n[R + 1].argPackAdvance));
1960
+ O +=
1961
+ " var rv = handle[name](" +
1962
+ o +
1963
+ `);
1964
+ `;
1965
+ for (var R = 0; R < e - 1; ++R)
1966
+ n[R + 1].deleteObject &&
1967
+ (O +=
1968
+ " argType" +
1969
+ R +
1970
+ ".deleteObject(arg" +
1971
+ R +
1972
+ `);
1973
+ `);
1974
+ (_.isVoid ||
1975
+ (O += ` return retType.toWireType(destructors, rv);
1976
+ `),
1977
+ (O += `};
1978
+ `),
1979
+ a.push(O));
1980
+ var G = zt(Function, a).apply(null, c);
1981
+ return m_(G);
1982
+ }
1983
+ function b_(e) {
1984
+ return ((e = nt(e)), ne(r[e]));
1985
+ }
1986
+ function w_(e, t) {
1987
+ return ((e = Ue(e)), (t = Ue(t)), ne(e[t]));
1988
+ }
1989
+ function H_(e) {
1990
+ e > 4 && (k[e].refcount += 1);
1991
+ }
1992
+ function X_(e) {
1993
+ for (var t = "", n = 0; n < e; ++n)
1994
+ t += (n !== 0 ? ", " : "") + "arg" + n;
1995
+ for (
1996
+ var _ =
1997
+ "return function emval_allocator_" +
1998
+ e +
1999
+ `(constructor, argTypes, args) {
2000
+ `,
2001
+ n = 0;
2002
+ n < e;
2003
+ ++n
2004
+ )
2005
+ _ +=
2006
+ "var argType" +
2007
+ n +
2008
+ " = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + " +
2009
+ n +
2010
+ '], "parameter ' +
2011
+ n +
2012
+ `");
2013
+ var arg` +
2014
+ n +
2015
+ " = argType" +
2016
+ n +
2017
+ `.readValueFromPointer(args);
2018
+ args += argType` +
2019
+ n +
2020
+ `['argPackAdvance'];
2021
+ `;
2022
+ return (
2023
+ (_ +=
2024
+ "var obj = new constructor(" +
2025
+ t +
2026
+ `);
2027
+ return __emval_register(obj);
2028
+ }
2029
+ `),
2030
+ new Function(
2031
+ "requireRegisteredType",
2032
+ "Module",
2033
+ "__emval_register",
2034
+ _,
2035
+ )(tt, r, ne)
2036
+ );
2037
+ }
2038
+ var Zt = {};
2039
+ function x_(e, t, n, _) {
2040
+ e = Ue(e);
2041
+ var s = Zt[t];
2042
+ return (s || ((s = X_(t)), (Zt[t] = s)), s(e, n, _));
2043
+ }
2044
+ function k_(e) {
2045
+ return ne(nt(e));
2046
+ }
2047
+ function $_(e) {
2048
+ var t = k[e].value;
2049
+ (je(t), Ct(e));
2050
+ }
2051
+ function W_() {
2052
+ Me();
2053
+ }
2054
+ function j_(e, t, n) {
2055
+ D.copyWithin(e, t, t + n);
2056
+ }
2057
+ function z_(e) {
2058
+ try {
2059
+ return (
2060
+ ce.grow((e - ct.byteLength + 65535) >>> 16),
2061
+ vt(ce.buffer),
2062
+ 1
2063
+ );
2064
+ } catch {}
2065
+ }
2066
+ function Y_(e) {
2067
+ var t = D.length;
2068
+ e = e >>> 0;
2069
+ var n = 2147483648;
2070
+ if (e > n) return !1;
2071
+ for (var _ = 1; _ <= 4; _ *= 2) {
2072
+ var s = t * (1 + 0.2 / _);
2073
+ s = Math.min(s, e + 100663296);
2074
+ var a = Math.min(n, Mn(Math.max(e, s), 65536)),
2075
+ c = z_(a);
2076
+ if (c) return !0;
2077
+ }
2078
+ return !1;
2079
+ }
2080
+ var _t = {
2081
+ mappings: {},
2082
+ buffers: [null, [], []],
2083
+ printChar: function (e, t) {
2084
+ var n = _t.buffers[e];
2085
+ t === 0 || t === 10
2086
+ ? ((e === 1 ? st : ee)(He(n, 0)), (n.length = 0))
2087
+ : n.push(t);
2088
+ },
2089
+ varargs: void 0,
2090
+ get: function () {
2091
+ _t.varargs += 4;
2092
+ var e = H[(_t.varargs - 4) >> 2];
2093
+ return e;
2094
+ },
2095
+ getStr: function (e) {
2096
+ var t = Xe(e);
2097
+ return t;
2098
+ },
2099
+ get64: function (e, t) {
2100
+ return e;
2101
+ },
2102
+ };
2103
+ function q_(e) {
2104
+ return 0;
2105
+ }
2106
+ function Z_(e, t, n, _, s) {}
2107
+ function Q_(e, t, n, _) {
2108
+ for (var s = 0, a = 0; a < n; a++) {
2109
+ for (
2110
+ var c = H[(t + a * 8) >> 2], o = H[(t + (a * 8 + 4)) >> 2], R = 0;
2111
+ R < o;
2112
+ R++
2113
+ )
2114
+ _t.printChar(e, D[c + R]);
2115
+ s += o;
2116
+ }
2117
+ return ((H[_ >> 2] = s), 0);
2118
+ }
2119
+ function J_(e) {
2120
+ Ie(e | 0);
2121
+ }
2122
+ ((It = r.InternalError = ft(Error, "InternalError")),
2123
+ mn(),
2124
+ (Be = r.BindingError = ft(Error, "BindingError")),
2125
+ $n(),
2126
+ s_(),
2127
+ n_(),
2128
+ (Wt = r.UnboundTypeError = ft(Error, "UnboundTypeError")),
2129
+ l_());
2130
+ var er = {
2131
+ t: Ln,
2132
+ I: Dn,
2133
+ x: c_,
2134
+ w: A_,
2135
+ d: f_,
2136
+ k: T_,
2137
+ H: M_,
2138
+ n: B_,
2139
+ a: C_,
2140
+ A: d_,
2141
+ i: S_,
2142
+ j: V_,
2143
+ h: N_,
2144
+ B: p_,
2145
+ v: P_,
2146
+ u: E_,
2147
+ c: v_,
2148
+ J: h_,
2149
+ m: U_,
2150
+ s: g_,
2151
+ b: Ct,
2152
+ y: L_,
2153
+ p: I_,
2154
+ r: b_,
2155
+ e: w_,
2156
+ g: H_,
2157
+ q: x_,
2158
+ f: k_,
2159
+ l: $_,
2160
+ o: W_,
2161
+ E: j_,
2162
+ F: Y_,
2163
+ G: q_,
2164
+ C: Z_,
2165
+ z: Q_,
2166
+ D: J_,
2167
+ },
2168
+ Or = Un(),
2169
+ tr = (r.___wasm_call_ctors = function () {
2170
+ return (tr = r.___wasm_call_ctors = r.asm.L).apply(null, arguments);
2171
+ }),
2172
+ dt = (r._malloc = function () {
2173
+ return (dt = r._malloc = r.asm.M).apply(null, arguments);
2174
+ }),
2175
+ _e = (r._free = function () {
2176
+ return (_e = r._free = r.asm.N).apply(null, arguments);
2177
+ }),
2178
+ Qt = (r.___getTypeName = function () {
2179
+ return (Qt = r.___getTypeName = r.asm.P).apply(null, arguments);
2180
+ }),
2181
+ nr = (r.___embind_register_native_and_builtin_types = function () {
2182
+ return (nr = r.___embind_register_native_and_builtin_types =
2183
+ r.asm.Q).apply(null, arguments);
2184
+ }),
2185
+ _r = (r.dynCall_jiji = function () {
2186
+ return (_r = r.dynCall_jiji = r.asm.R).apply(null, arguments);
2187
+ }),
2188
+ rt;
2189
+ function rr(e) {
2190
+ ((this.name = "ExitStatus"),
2191
+ (this.message = "Program terminated with exit(" + e + ")"),
2192
+ (this.status = e));
2193
+ }
2194
+ Ne = function e() {
2195
+ (rt || St(), rt || (Ne = e));
2196
+ };
2197
+ function St(e) {
2198
+ if (((e = e || U), Te > 0 || (Cn(), Te > 0))) return;
2199
+ function t() {
2200
+ rt ||
2201
+ ((rt = !0),
2202
+ (r.calledRun = !0),
2203
+ !de &&
2204
+ (Fn(),
2205
+ dn(),
2206
+ B(r),
2207
+ r.onRuntimeInitialized && r.onRuntimeInitialized(),
2208
+ Sn()));
2209
+ }
2210
+ r.setStatus
2211
+ ? (r.setStatus("Running..."),
2212
+ setTimeout(function () {
2213
+ (setTimeout(function () {
2214
+ r.setStatus("");
2215
+ }, 1),
2216
+ t());
2217
+ }, 1))
2218
+ : t();
2219
+ }
2220
+ if (((r.run = St), r.preInit))
2221
+ for (
2222
+ typeof r.preInit == "function" && (r.preInit = [r.preInit]);
2223
+ r.preInit.length > 0;
2224
+ )
2225
+ r.preInit.pop()();
2226
+ return (St(), f.ready);
2227
+ }
2228
+ );
2229
+ })();
2230
+ typeof it == "object" && typeof pt == "object"
2231
+ ? (pt.exports = Nt)
2232
+ : typeof define == "function" && define.amd
2233
+ ? define([], function () {
2234
+ return Nt;
2235
+ })
2236
+ : typeof it == "object" && (it.BASIS = Nt);
2237
+ });
2238
+ var F = {
2239
+ UNSIGNED_BYTE: M.UNSIGNED_BYTE,
2240
+ UNSIGNED_SHORT: M.UNSIGNED_SHORT,
2241
+ UNSIGNED_INT: M.UNSIGNED_INT,
2242
+ FLOAT: M.FLOAT,
2243
+ HALF_FLOAT: M.HALF_FLOAT_OES,
2244
+ UNSIGNED_INT_24_8: M.UNSIGNED_INT_24_8,
2245
+ UNSIGNED_SHORT_4_4_4_4: M.UNSIGNED_SHORT_4_4_4_4,
2246
+ UNSIGNED_SHORT_5_5_5_1: M.UNSIGNED_SHORT_5_5_5_1,
2247
+ UNSIGNED_SHORT_5_6_5: M.UNSIGNED_SHORT_5_6_5,
2248
+ };
2249
+ F.toWebGLConstant = function (i, f) {
2250
+ switch (i) {
2251
+ case F.UNSIGNED_BYTE:
2252
+ return M.UNSIGNED_BYTE;
2253
+ case F.UNSIGNED_SHORT:
2254
+ return M.UNSIGNED_SHORT;
2255
+ case F.UNSIGNED_INT:
2256
+ return M.UNSIGNED_INT;
2257
+ case F.FLOAT:
2258
+ return M.FLOAT;
2259
+ case F.HALF_FLOAT:
2260
+ return f.webgl2 ? M.HALF_FLOAT : M.HALF_FLOAT_OES;
2261
+ case F.UNSIGNED_INT_24_8:
2262
+ return M.UNSIGNED_INT_24_8;
2263
+ case F.UNSIGNED_SHORT_4_4_4_4:
2264
+ return M.UNSIGNED_SHORT_4_4_4_4;
2265
+ case F.UNSIGNED_SHORT_5_5_5_1:
2266
+ return M.UNSIGNED_SHORT_5_5_5_1;
2267
+ case F.UNSIGNED_SHORT_5_6_5:
2268
+ return F.UNSIGNED_SHORT_5_6_5;
2269
+ }
2270
+ };
2271
+ F.isPacked = function (i) {
2272
+ return (
2273
+ i === F.UNSIGNED_INT_24_8 ||
2274
+ i === F.UNSIGNED_SHORT_4_4_4_4 ||
2275
+ i === F.UNSIGNED_SHORT_5_5_5_1 ||
2276
+ i === F.UNSIGNED_SHORT_5_6_5
2277
+ );
2278
+ };
2279
+ F.sizeInBytes = function (i) {
2280
+ switch (i) {
2281
+ case F.UNSIGNED_BYTE:
2282
+ return 1;
2283
+ case F.UNSIGNED_SHORT:
2284
+ case F.UNSIGNED_SHORT_4_4_4_4:
2285
+ case F.UNSIGNED_SHORT_5_5_5_1:
2286
+ case F.UNSIGNED_SHORT_5_6_5:
2287
+ case F.HALF_FLOAT:
2288
+ return 2;
2289
+ case F.UNSIGNED_INT:
2290
+ case F.FLOAT:
2291
+ case F.UNSIGNED_INT_24_8:
2292
+ return 4;
2293
+ }
2294
+ };
2295
+ F.validate = function (i) {
2296
+ return (
2297
+ i === F.UNSIGNED_BYTE ||
2298
+ i === F.UNSIGNED_SHORT ||
2299
+ i === F.UNSIGNED_INT ||
2300
+ i === F.FLOAT ||
2301
+ i === F.HALF_FLOAT ||
2302
+ i === F.UNSIGNED_INT_24_8 ||
2303
+ i === F.UNSIGNED_SHORT_4_4_4_4 ||
2304
+ i === F.UNSIGNED_SHORT_5_5_5_1 ||
2305
+ i === F.UNSIGNED_SHORT_5_6_5
2306
+ );
2307
+ };
2308
+ var b = Object.freeze(F);
2309
+ var A = {
2310
+ DEPTH_COMPONENT: M.DEPTH_COMPONENT,
2311
+ DEPTH_STENCIL: M.DEPTH_STENCIL,
2312
+ ALPHA: M.ALPHA,
2313
+ RED: M.RED,
2314
+ RG: M.RG,
2315
+ RGB: M.RGB,
2316
+ RGBA: M.RGBA,
2317
+ LUMINANCE: M.LUMINANCE,
2318
+ LUMINANCE_ALPHA: M.LUMINANCE_ALPHA,
2319
+ RGB_DXT1: M.COMPRESSED_RGB_S3TC_DXT1_EXT,
2320
+ RGBA_DXT1: M.COMPRESSED_RGBA_S3TC_DXT1_EXT,
2321
+ RGBA_DXT3: M.COMPRESSED_RGBA_S3TC_DXT3_EXT,
2322
+ RGBA_DXT5: M.COMPRESSED_RGBA_S3TC_DXT5_EXT,
2323
+ RGB_PVRTC_4BPPV1: M.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,
2324
+ RGB_PVRTC_2BPPV1: M.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,
2325
+ RGBA_PVRTC_4BPPV1: M.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,
2326
+ RGBA_PVRTC_2BPPV1: M.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,
2327
+ RGBA_ASTC: M.COMPRESSED_RGBA_ASTC_4x4_WEBGL,
2328
+ RGB_ETC1: M.COMPRESSED_RGB_ETC1_WEBGL,
2329
+ RGB8_ETC2: M.COMPRESSED_RGB8_ETC2,
2330
+ RGBA8_ETC2_EAC: M.COMPRESSED_RGBA8_ETC2_EAC,
2331
+ RGBA_BC7: M.COMPRESSED_RGBA_BPTC_UNORM,
2332
+ };
2333
+ A.componentsLength = function (i) {
2334
+ switch (i) {
2335
+ case A.RGB:
2336
+ return 3;
2337
+ case A.RGBA:
2338
+ return 4;
2339
+ case A.LUMINANCE_ALPHA:
2340
+ case A.RG:
2341
+ return 2;
2342
+ case A.ALPHA:
2343
+ case A.RED:
2344
+ case A.LUMINANCE:
2345
+ return 1;
2346
+ default:
2347
+ return 1;
2348
+ }
2349
+ };
2350
+ A.validate = function (i) {
2351
+ return (
2352
+ i === A.DEPTH_COMPONENT ||
2353
+ i === A.DEPTH_STENCIL ||
2354
+ i === A.ALPHA ||
2355
+ i === A.RED ||
2356
+ i === A.RG ||
2357
+ i === A.RGB ||
2358
+ i === A.RGBA ||
2359
+ i === A.LUMINANCE ||
2360
+ i === A.LUMINANCE_ALPHA ||
2361
+ i === A.RGB_DXT1 ||
2362
+ i === A.RGBA_DXT1 ||
2363
+ i === A.RGBA_DXT3 ||
2364
+ i === A.RGBA_DXT5 ||
2365
+ i === A.RGB_PVRTC_4BPPV1 ||
2366
+ i === A.RGB_PVRTC_2BPPV1 ||
2367
+ i === A.RGBA_PVRTC_4BPPV1 ||
2368
+ i === A.RGBA_PVRTC_2BPPV1 ||
2369
+ i === A.RGBA_ASTC ||
2370
+ i === A.RGB_ETC1 ||
2371
+ i === A.RGB8_ETC2 ||
2372
+ i === A.RGBA8_ETC2_EAC ||
2373
+ i === A.RGBA_BC7
2374
+ );
2375
+ };
2376
+ A.isColorFormat = function (i) {
2377
+ return (
2378
+ i === A.RED ||
2379
+ i === A.ALPHA ||
2380
+ i === A.RGB ||
2381
+ i === A.RGBA ||
2382
+ i === A.LUMINANCE ||
2383
+ i === A.LUMINANCE_ALPHA
2384
+ );
2385
+ };
2386
+ A.isDepthFormat = function (i) {
2387
+ return i === A.DEPTH_COMPONENT || i === A.DEPTH_STENCIL;
2388
+ };
2389
+ A.isCompressedFormat = function (i) {
2390
+ return (
2391
+ i === A.RGB_DXT1 ||
2392
+ i === A.RGBA_DXT1 ||
2393
+ i === A.RGBA_DXT3 ||
2394
+ i === A.RGBA_DXT5 ||
2395
+ i === A.RGB_PVRTC_4BPPV1 ||
2396
+ i === A.RGB_PVRTC_2BPPV1 ||
2397
+ i === A.RGBA_PVRTC_4BPPV1 ||
2398
+ i === A.RGBA_PVRTC_2BPPV1 ||
2399
+ i === A.RGBA_ASTC ||
2400
+ i === A.RGB_ETC1 ||
2401
+ i === A.RGB8_ETC2 ||
2402
+ i === A.RGBA8_ETC2_EAC ||
2403
+ i === A.RGBA_BC7
2404
+ );
2405
+ };
2406
+ A.isDXTFormat = function (i) {
2407
+ return (
2408
+ i === A.RGB_DXT1 ||
2409
+ i === A.RGBA_DXT1 ||
2410
+ i === A.RGBA_DXT3 ||
2411
+ i === A.RGBA_DXT5
2412
+ );
2413
+ };
2414
+ A.isPVRTCFormat = function (i) {
2415
+ return (
2416
+ i === A.RGB_PVRTC_4BPPV1 ||
2417
+ i === A.RGB_PVRTC_2BPPV1 ||
2418
+ i === A.RGBA_PVRTC_4BPPV1 ||
2419
+ i === A.RGBA_PVRTC_2BPPV1
2420
+ );
2421
+ };
2422
+ A.isASTCFormat = function (i) {
2423
+ return i === A.RGBA_ASTC;
2424
+ };
2425
+ A.isETC1Format = function (i) {
2426
+ return i === A.RGB_ETC1;
2427
+ };
2428
+ A.isETC2Format = function (i) {
2429
+ return i === A.RGB8_ETC2 || i === A.RGBA8_ETC2_EAC;
2430
+ };
2431
+ A.isBC7Format = function (i) {
2432
+ return i === A.RGBA_BC7;
2433
+ };
2434
+ A.compressedTextureSizeInBytes = function (i, f, r) {
2435
+ switch (i) {
2436
+ case A.RGB_DXT1:
2437
+ case A.RGBA_DXT1:
2438
+ case A.RGB_ETC1:
2439
+ case A.RGB8_ETC2:
2440
+ return Math.floor((f + 3) / 4) * Math.floor((r + 3) / 4) * 8;
2441
+ case A.RGBA_DXT3:
2442
+ case A.RGBA_DXT5:
2443
+ case A.RGBA_ASTC:
2444
+ case A.RGBA8_ETC2_EAC:
2445
+ return Math.floor((f + 3) / 4) * Math.floor((r + 3) / 4) * 16;
2446
+ case A.RGB_PVRTC_4BPPV1:
2447
+ case A.RGBA_PVRTC_4BPPV1:
2448
+ return Math.floor((Math.max(f, 8) * Math.max(r, 8) * 4 + 7) / 8);
2449
+ case A.RGB_PVRTC_2BPPV1:
2450
+ case A.RGBA_PVRTC_2BPPV1:
2451
+ return Math.floor((Math.max(f, 16) * Math.max(r, 8) * 2 + 7) / 8);
2452
+ case A.RGBA_BC7:
2453
+ return Math.ceil(f / 4) * Math.ceil(r / 4) * 16;
2454
+ default:
2455
+ return 0;
2456
+ }
2457
+ };
2458
+ A.textureSizeInBytes = function (i, f, r, B) {
2459
+ let l = A.componentsLength(i);
2460
+ return (b.isPacked(f) && (l = 1), l * b.sizeInBytes(f) * r * B);
2461
+ };
2462
+ A.alignmentInBytes = function (i, f, r) {
2463
+ let B = A.textureSizeInBytes(i, f, r, 1) % 4;
2464
+ return B === 0 ? 4 : B === 2 ? 2 : 1;
2465
+ };
2466
+ A.createTypedArray = function (i, f, r, B) {
2467
+ let l,
2468
+ p = b.sizeInBytes(f);
2469
+ p === Uint8Array.BYTES_PER_ELEMENT
2470
+ ? (l = Uint8Array)
2471
+ : p === Uint16Array.BYTES_PER_ELEMENT
2472
+ ? (l = Uint16Array)
2473
+ : p === Float32Array.BYTES_PER_ELEMENT && f === b.FLOAT
2474
+ ? (l = Float32Array)
2475
+ : (l = Uint32Array);
2476
+ let C = A.componentsLength(i) * r * B;
2477
+ return new l(C);
2478
+ };
2479
+ A.flipY = function (i, f, r, B, l) {
2480
+ if (l === 1) return i;
2481
+ let p = A.createTypedArray(f, r, B, l),
2482
+ C = A.componentsLength(f),
2483
+ U = B * C;
2484
+ for (let y = 0; y < l; ++y) {
2485
+ let m = y * B * C,
2486
+ V = (l - y - 1) * B * C;
2487
+ for (let d = 0; d < U; ++d) p[V + d] = i[m + d];
2488
+ }
2489
+ return p;
2490
+ };
2491
+ A.toInternalFormat = function (i, f, r) {
2492
+ if (!r.webgl2) return i;
2493
+ if (i === A.DEPTH_STENCIL) return M.DEPTH24_STENCIL8;
2494
+ if (i === A.DEPTH_COMPONENT) {
2495
+ if (f === b.UNSIGNED_SHORT) return M.DEPTH_COMPONENT16;
2496
+ if (f === b.UNSIGNED_INT) return M.DEPTH_COMPONENT24;
2497
+ }
2498
+ if (f === b.FLOAT)
2499
+ switch (i) {
2500
+ case A.RGBA:
2501
+ return M.RGBA32F;
2502
+ case A.RGB:
2503
+ return M.RGB32F;
2504
+ case A.RG:
2505
+ return M.RG32F;
2506
+ case A.RED:
2507
+ return M.R32F;
2508
+ }
2509
+ if (f === b.HALF_FLOAT)
2510
+ switch (i) {
2511
+ case A.RGBA:
2512
+ return M.RGBA16F;
2513
+ case A.RGB:
2514
+ return M.RGB16F;
2515
+ case A.RG:
2516
+ return M.RG16F;
2517
+ case A.RED:
2518
+ return M.R16F;
2519
+ }
2520
+ return i;
2521
+ };
2522
+ var E = Object.freeze(A);
2523
+ var Rr = {
2524
+ VK_FORMAT_UNDEFINED: 0,
2525
+ VK_FORMAT_R4G4_UNORM_PACK8: 1,
2526
+ VK_FORMAT_R4G4B4A4_UNORM_PACK16: 2,
2527
+ VK_FORMAT_B4G4R4A4_UNORM_PACK16: 3,
2528
+ VK_FORMAT_R5G6B5_UNORM_PACK16: 4,
2529
+ VK_FORMAT_B5G6R5_UNORM_PACK16: 5,
2530
+ VK_FORMAT_R5G5B5A1_UNORM_PACK16: 6,
2531
+ VK_FORMAT_B5G5R5A1_UNORM_PACK16: 7,
2532
+ VK_FORMAT_A1R5G5B5_UNORM_PACK16: 8,
2533
+ VK_FORMAT_R8_UNORM: 9,
2534
+ VK_FORMAT_R8_SNORM: 10,
2535
+ VK_FORMAT_R8_USCALED: 11,
2536
+ VK_FORMAT_R8_SSCALED: 12,
2537
+ VK_FORMAT_R8_UINT: 13,
2538
+ VK_FORMAT_R8_SINT: 14,
2539
+ VK_FORMAT_R8_SRGB: 15,
2540
+ VK_FORMAT_R8G8_UNORM: 16,
2541
+ VK_FORMAT_R8G8_SNORM: 17,
2542
+ VK_FORMAT_R8G8_USCALED: 18,
2543
+ VK_FORMAT_R8G8_SSCALED: 19,
2544
+ VK_FORMAT_R8G8_UINT: 20,
2545
+ VK_FORMAT_R8G8_SINT: 21,
2546
+ VK_FORMAT_R8G8_SRGB: 22,
2547
+ VK_FORMAT_R8G8B8_UNORM: 23,
2548
+ VK_FORMAT_R8G8B8_SNORM: 24,
2549
+ VK_FORMAT_R8G8B8_USCALED: 25,
2550
+ VK_FORMAT_R8G8B8_SSCALED: 26,
2551
+ VK_FORMAT_R8G8B8_UINT: 27,
2552
+ VK_FORMAT_R8G8B8_SINT: 28,
2553
+ VK_FORMAT_R8G8B8_SRGB: 29,
2554
+ VK_FORMAT_B8G8R8_UNORM: 30,
2555
+ VK_FORMAT_B8G8R8_SNORM: 31,
2556
+ VK_FORMAT_B8G8R8_USCALED: 32,
2557
+ VK_FORMAT_B8G8R8_SSCALED: 33,
2558
+ VK_FORMAT_B8G8R8_UINT: 34,
2559
+ VK_FORMAT_B8G8R8_SINT: 35,
2560
+ VK_FORMAT_B8G8R8_SRGB: 36,
2561
+ VK_FORMAT_R8G8B8A8_UNORM: 37,
2562
+ VK_FORMAT_R8G8B8A8_SNORM: 38,
2563
+ VK_FORMAT_R8G8B8A8_USCALED: 39,
2564
+ VK_FORMAT_R8G8B8A8_SSCALED: 40,
2565
+ VK_FORMAT_R8G8B8A8_UINT: 41,
2566
+ VK_FORMAT_R8G8B8A8_SINT: 42,
2567
+ VK_FORMAT_R8G8B8A8_SRGB: 43,
2568
+ VK_FORMAT_B8G8R8A8_UNORM: 44,
2569
+ VK_FORMAT_B8G8R8A8_SNORM: 45,
2570
+ VK_FORMAT_B8G8R8A8_USCALED: 46,
2571
+ VK_FORMAT_B8G8R8A8_SSCALED: 47,
2572
+ VK_FORMAT_B8G8R8A8_UINT: 48,
2573
+ VK_FORMAT_B8G8R8A8_SINT: 49,
2574
+ VK_FORMAT_B8G8R8A8_SRGB: 50,
2575
+ VK_FORMAT_A8B8G8R8_UNORM_PACK32: 51,
2576
+ VK_FORMAT_A8B8G8R8_SNORM_PACK32: 52,
2577
+ VK_FORMAT_A8B8G8R8_USCALED_PACK32: 53,
2578
+ VK_FORMAT_A8B8G8R8_SSCALED_PACK32: 54,
2579
+ VK_FORMAT_A8B8G8R8_UINT_PACK32: 55,
2580
+ VK_FORMAT_A8B8G8R8_SINT_PACK32: 56,
2581
+ VK_FORMAT_A8B8G8R8_SRGB_PACK32: 57,
2582
+ VK_FORMAT_A2R10G10B10_UNORM_PACK32: 58,
2583
+ VK_FORMAT_A2R10G10B10_SNORM_PACK32: 59,
2584
+ VK_FORMAT_A2R10G10B10_USCALED_PACK32: 60,
2585
+ VK_FORMAT_A2R10G10B10_SSCALED_PACK32: 61,
2586
+ VK_FORMAT_A2R10G10B10_UINT_PACK32: 62,
2587
+ VK_FORMAT_A2R10G10B10_SINT_PACK32: 63,
2588
+ VK_FORMAT_A2B10G10R10_UNORM_PACK32: 64,
2589
+ VK_FORMAT_A2B10G10R10_SNORM_PACK32: 65,
2590
+ VK_FORMAT_A2B10G10R10_USCALED_PACK32: 66,
2591
+ VK_FORMAT_A2B10G10R10_SSCALED_PACK32: 67,
2592
+ VK_FORMAT_A2B10G10R10_UINT_PACK32: 68,
2593
+ VK_FORMAT_A2B10G10R10_SINT_PACK32: 69,
2594
+ VK_FORMAT_R16_UNORM: 70,
2595
+ VK_FORMAT_R16_SNORM: 71,
2596
+ VK_FORMAT_R16_USCALED: 72,
2597
+ VK_FORMAT_R16_SSCALED: 73,
2598
+ VK_FORMAT_R16_UINT: 74,
2599
+ VK_FORMAT_R16_SINT: 75,
2600
+ VK_FORMAT_R16_SFLOAT: 76,
2601
+ VK_FORMAT_R16G16_UNORM: 77,
2602
+ VK_FORMAT_R16G16_SNORM: 78,
2603
+ VK_FORMAT_R16G16_USCALED: 79,
2604
+ VK_FORMAT_R16G16_SSCALED: 80,
2605
+ VK_FORMAT_R16G16_UINT: 81,
2606
+ VK_FORMAT_R16G16_SINT: 82,
2607
+ VK_FORMAT_R16G16_SFLOAT: 83,
2608
+ VK_FORMAT_R16G16B16_UNORM: 84,
2609
+ VK_FORMAT_R16G16B16_SNORM: 85,
2610
+ VK_FORMAT_R16G16B16_USCALED: 86,
2611
+ VK_FORMAT_R16G16B16_SSCALED: 87,
2612
+ VK_FORMAT_R16G16B16_UINT: 88,
2613
+ VK_FORMAT_R16G16B16_SINT: 89,
2614
+ VK_FORMAT_R16G16B16_SFLOAT: 90,
2615
+ VK_FORMAT_R16G16B16A16_UNORM: 91,
2616
+ VK_FORMAT_R16G16B16A16_SNORM: 92,
2617
+ VK_FORMAT_R16G16B16A16_USCALED: 93,
2618
+ VK_FORMAT_R16G16B16A16_SSCALED: 94,
2619
+ VK_FORMAT_R16G16B16A16_UINT: 95,
2620
+ VK_FORMAT_R16G16B16A16_SINT: 96,
2621
+ VK_FORMAT_R16G16B16A16_SFLOAT: 97,
2622
+ VK_FORMAT_R32_UINT: 98,
2623
+ VK_FORMAT_R32_SINT: 99,
2624
+ VK_FORMAT_R32_SFLOAT: 100,
2625
+ VK_FORMAT_R32G32_UINT: 101,
2626
+ VK_FORMAT_R32G32_SINT: 102,
2627
+ VK_FORMAT_R32G32_SFLOAT: 103,
2628
+ VK_FORMAT_R32G32B32_UINT: 104,
2629
+ VK_FORMAT_R32G32B32_SINT: 105,
2630
+ VK_FORMAT_R32G32B32_SFLOAT: 106,
2631
+ VK_FORMAT_R32G32B32A32_UINT: 107,
2632
+ VK_FORMAT_R32G32B32A32_SINT: 108,
2633
+ VK_FORMAT_R32G32B32A32_SFLOAT: 109,
2634
+ VK_FORMAT_R64_UINT: 110,
2635
+ VK_FORMAT_R64_SINT: 111,
2636
+ VK_FORMAT_R64_SFLOAT: 112,
2637
+ VK_FORMAT_R64G64_UINT: 113,
2638
+ VK_FORMAT_R64G64_SINT: 114,
2639
+ VK_FORMAT_R64G64_SFLOAT: 115,
2640
+ VK_FORMAT_R64G64B64_UINT: 116,
2641
+ VK_FORMAT_R64G64B64_SINT: 117,
2642
+ VK_FORMAT_R64G64B64_SFLOAT: 118,
2643
+ VK_FORMAT_R64G64B64A64_UINT: 119,
2644
+ VK_FORMAT_R64G64B64A64_SINT: 120,
2645
+ VK_FORMAT_R64G64B64A64_SFLOAT: 121,
2646
+ VK_FORMAT_B10G11R11_UFLOAT_PACK32: 122,
2647
+ VK_FORMAT_E5B9G9R9_UFLOAT_PACK32: 123,
2648
+ VK_FORMAT_D16_UNORM: 124,
2649
+ VK_FORMAT_X8_D24_UNORM_PACK32: 125,
2650
+ VK_FORMAT_D32_SFLOAT: 126,
2651
+ VK_FORMAT_S8_UINT: 127,
2652
+ VK_FORMAT_D16_UNORM_S8_UINT: 128,
2653
+ VK_FORMAT_D24_UNORM_S8_UINT: 129,
2654
+ VK_FORMAT_D32_SFLOAT_S8_UINT: 130,
2655
+ VK_FORMAT_BC1_RGB_UNORM_BLOCK: 131,
2656
+ VK_FORMAT_BC1_RGB_SRGB_BLOCK: 132,
2657
+ VK_FORMAT_BC1_RGBA_UNORM_BLOCK: 133,
2658
+ VK_FORMAT_BC1_RGBA_SRGB_BLOCK: 134,
2659
+ VK_FORMAT_BC2_UNORM_BLOCK: 135,
2660
+ VK_FORMAT_BC2_SRGB_BLOCK: 136,
2661
+ VK_FORMAT_BC3_UNORM_BLOCK: 137,
2662
+ VK_FORMAT_BC3_SRGB_BLOCK: 138,
2663
+ VK_FORMAT_BC4_UNORM_BLOCK: 139,
2664
+ VK_FORMAT_BC4_SNORM_BLOCK: 140,
2665
+ VK_FORMAT_BC5_UNORM_BLOCK: 141,
2666
+ VK_FORMAT_BC5_SNORM_BLOCK: 142,
2667
+ VK_FORMAT_BC6H_UFLOAT_BLOCK: 143,
2668
+ VK_FORMAT_BC6H_SFLOAT_BLOCK: 144,
2669
+ VK_FORMAT_BC7_UNORM_BLOCK: 145,
2670
+ VK_FORMAT_BC7_SRGB_BLOCK: 146,
2671
+ VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: 147,
2672
+ VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK: 148,
2673
+ VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK: 149,
2674
+ VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK: 150,
2675
+ VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK: 151,
2676
+ VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK: 152,
2677
+ VK_FORMAT_EAC_R11_UNORM_BLOCK: 153,
2678
+ VK_FORMAT_EAC_R11_SNORM_BLOCK: 154,
2679
+ VK_FORMAT_EAC_R11G11_UNORM_BLOCK: 155,
2680
+ VK_FORMAT_EAC_R11G11_SNORM_BLOCK: 156,
2681
+ VK_FORMAT_ASTC_4x4_UNORM_BLOCK: 157,
2682
+ VK_FORMAT_ASTC_4x4_SRGB_BLOCK: 158,
2683
+ VK_FORMAT_ASTC_5x4_UNORM_BLOCK: 159,
2684
+ VK_FORMAT_ASTC_5x4_SRGB_BLOCK: 160,
2685
+ VK_FORMAT_ASTC_5x5_UNORM_BLOCK: 161,
2686
+ VK_FORMAT_ASTC_5x5_SRGB_BLOCK: 162,
2687
+ VK_FORMAT_ASTC_6x5_UNORM_BLOCK: 163,
2688
+ VK_FORMAT_ASTC_6x5_SRGB_BLOCK: 164,
2689
+ VK_FORMAT_ASTC_6x6_UNORM_BLOCK: 165,
2690
+ VK_FORMAT_ASTC_6x6_SRGB_BLOCK: 166,
2691
+ VK_FORMAT_ASTC_8x5_UNORM_BLOCK: 167,
2692
+ VK_FORMAT_ASTC_8x5_SRGB_BLOCK: 168,
2693
+ VK_FORMAT_ASTC_8x6_UNORM_BLOCK: 169,
2694
+ VK_FORMAT_ASTC_8x6_SRGB_BLOCK: 170,
2695
+ VK_FORMAT_ASTC_8x8_UNORM_BLOCK: 171,
2696
+ VK_FORMAT_ASTC_8x8_SRGB_BLOCK: 172,
2697
+ VK_FORMAT_ASTC_10x5_UNORM_BLOCK: 173,
2698
+ VK_FORMAT_ASTC_10x5_SRGB_BLOCK: 174,
2699
+ VK_FORMAT_ASTC_10x6_UNORM_BLOCK: 175,
2700
+ VK_FORMAT_ASTC_10x6_SRGB_BLOCK: 176,
2701
+ VK_FORMAT_ASTC_10x8_UNORM_BLOCK: 177,
2702
+ VK_FORMAT_ASTC_10x8_SRGB_BLOCK: 178,
2703
+ VK_FORMAT_ASTC_10x10_UNORM_BLOCK: 179,
2704
+ VK_FORMAT_ASTC_10x10_SRGB_BLOCK: 180,
2705
+ VK_FORMAT_ASTC_12x10_UNORM_BLOCK: 181,
2706
+ VK_FORMAT_ASTC_12x10_SRGB_BLOCK: 182,
2707
+ VK_FORMAT_ASTC_12x12_UNORM_BLOCK: 183,
2708
+ VK_FORMAT_ASTC_12x12_SRGB_BLOCK: 184,
2709
+ VK_FORMAT_G8B8G8R8_422_UNORM: 1000156e3,
2710
+ VK_FORMAT_B8G8R8G8_422_UNORM: 1000156001,
2711
+ VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM: 1000156002,
2712
+ VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: 1000156003,
2713
+ VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM: 1000156004,
2714
+ VK_FORMAT_G8_B8R8_2PLANE_422_UNORM: 1000156005,
2715
+ VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM: 1000156006,
2716
+ VK_FORMAT_R10X6_UNORM_PACK16: 1000156007,
2717
+ VK_FORMAT_R10X6G10X6_UNORM_2PACK16: 1000156008,
2718
+ VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16: 1000156009,
2719
+ VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16: 1000156010,
2720
+ VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16: 1000156011,
2721
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16: 1000156012,
2722
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16: 1000156013,
2723
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16: 1000156014,
2724
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16: 1000156015,
2725
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16: 1000156016,
2726
+ VK_FORMAT_R12X4_UNORM_PACK16: 1000156017,
2727
+ VK_FORMAT_R12X4G12X4_UNORM_2PACK16: 1000156018,
2728
+ VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16: 1000156019,
2729
+ VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16: 1000156020,
2730
+ VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16: 1000156021,
2731
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16: 1000156022,
2732
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16: 1000156023,
2733
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16: 1000156024,
2734
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16: 1000156025,
2735
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16: 1000156026,
2736
+ VK_FORMAT_G16B16G16R16_422_UNORM: 1000156027,
2737
+ VK_FORMAT_B16G16R16G16_422_UNORM: 1000156028,
2738
+ VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM: 1000156029,
2739
+ VK_FORMAT_G16_B16R16_2PLANE_420_UNORM: 1000156030,
2740
+ VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM: 1000156031,
2741
+ VK_FORMAT_G16_B16R16_2PLANE_422_UNORM: 1000156032,
2742
+ VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM: 1000156033,
2743
+ VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG: 1000054e3,
2744
+ VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG: 1000054001,
2745
+ VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG: 1000054002,
2746
+ VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG: 1000054003,
2747
+ VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG: 1000054004,
2748
+ VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG: 1000054005,
2749
+ VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG: 1000054006,
2750
+ VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG: 1000054007,
2751
+ VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT: 1000066e3,
2752
+ VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT: 1000066001,
2753
+ VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT: 1000066002,
2754
+ VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT: 1000066003,
2755
+ VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT: 1000066004,
2756
+ VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT: 1000066005,
2757
+ VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT: 1000066006,
2758
+ VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT: 1000066007,
2759
+ VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT: 1000066008,
2760
+ VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT: 1000066009,
2761
+ VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT: 1000066010,
2762
+ VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT: 1000066011,
2763
+ VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT: 1000066012,
2764
+ VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT: 1000066013,
2765
+ VK_FORMAT_G8B8G8R8_422_UNORM_KHR: 1000156e3,
2766
+ VK_FORMAT_B8G8R8G8_422_UNORM_KHR: 1000156001,
2767
+ VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR: 1000156002,
2768
+ VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR: 1000156003,
2769
+ VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR: 1000156004,
2770
+ VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR: 1000156005,
2771
+ VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR: 1000156006,
2772
+ VK_FORMAT_R10X6_UNORM_PACK16_KHR: 1000156007,
2773
+ VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR: 1000156008,
2774
+ VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR: 1000156009,
2775
+ VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR: 1000156010,
2776
+ VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR: 1000156011,
2777
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR: 1000156012,
2778
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR: 1000156013,
2779
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR: 1000156014,
2780
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR: 1000156015,
2781
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR: 1000156016,
2782
+ VK_FORMAT_R12X4_UNORM_PACK16_KHR: 1000156017,
2783
+ VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR: 1000156018,
2784
+ VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR: 1000156019,
2785
+ VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR: 1000156020,
2786
+ VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR: 1000156021,
2787
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR: 1000156022,
2788
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR: 1000156023,
2789
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR: 1000156024,
2790
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR: 1000156025,
2791
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR: 1000156026,
2792
+ VK_FORMAT_G16B16G16R16_422_UNORM_KHR: 1000156027,
2793
+ VK_FORMAT_B16G16R16G16_422_UNORM_KHR: 1000156028,
2794
+ VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR: 1000156029,
2795
+ VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR: 1000156030,
2796
+ VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR: 1000156031,
2797
+ VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR: 1000156032,
2798
+ VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR: 1000156033,
2799
+ },
2800
+ Le = Object.freeze(Rr);
2801
+ var Vt = class {
2802
+ constructor() {
2803
+ ((this.vkFormat = 0),
2804
+ (this.typeSize = 1),
2805
+ (this.pixelWidth = 0),
2806
+ (this.pixelHeight = 0),
2807
+ (this.pixelDepth = 0),
2808
+ (this.layerCount = 0),
2809
+ (this.faceCount = 1),
2810
+ (this.supercompressionScheme = 0),
2811
+ (this.levels = []),
2812
+ (this.dataFormatDescriptor = [
2813
+ {
2814
+ vendorId: 0,
2815
+ descriptorType: 0,
2816
+ descriptorBlockSize: 0,
2817
+ versionNumber: 2,
2818
+ colorModel: 0,
2819
+ colorPrimaries: 1,
2820
+ transferFunction: 2,
2821
+ flags: 0,
2822
+ texelBlockDimension: [0, 0, 0, 0],
2823
+ bytesPlane: [0, 0, 0, 0, 0, 0, 0, 0],
2824
+ samples: [],
2825
+ },
2826
+ ]),
2827
+ (this.keyValue = {}),
2828
+ (this.globalData = null));
2829
+ }
2830
+ },
2831
+ Oe = class {
2832
+ constructor(f, r, B, l) {
2833
+ ((this._dataView = void 0),
2834
+ (this._littleEndian = void 0),
2835
+ (this._offset = void 0),
2836
+ (this._dataView = new DataView(f.buffer, f.byteOffset + r, B)),
2837
+ (this._littleEndian = l),
2838
+ (this._offset = 0));
2839
+ }
2840
+ _nextUint8() {
2841
+ let f = this._dataView.getUint8(this._offset);
2842
+ return ((this._offset += 1), f);
2843
+ }
2844
+ _nextUint16() {
2845
+ let f = this._dataView.getUint16(this._offset, this._littleEndian);
2846
+ return ((this._offset += 2), f);
2847
+ }
2848
+ _nextUint32() {
2849
+ let f = this._dataView.getUint32(this._offset, this._littleEndian);
2850
+ return ((this._offset += 4), f);
2851
+ }
2852
+ _nextUint64() {
2853
+ let f = this._dataView.getUint32(this._offset, this._littleEndian),
2854
+ r = this._dataView.getUint32(this._offset + 4, this._littleEndian),
2855
+ B = f + 2 ** 32 * r;
2856
+ return ((this._offset += 8), B);
2857
+ }
2858
+ _nextInt32() {
2859
+ let f = this._dataView.getInt32(this._offset, this._littleEndian);
2860
+ return ((this._offset += 4), f);
2861
+ }
2862
+ _nextUint8Array(f) {
2863
+ let r = new Uint8Array(
2864
+ this._dataView.buffer,
2865
+ this._dataView.byteOffset + this._offset,
2866
+ f,
2867
+ );
2868
+ return ((this._offset += f), r);
2869
+ }
2870
+ _skip(f) {
2871
+ return ((this._offset += f), this);
2872
+ }
2873
+ _scan(f, r = 0) {
2874
+ let B = this._offset,
2875
+ l = 0;
2876
+ for (; this._dataView.getUint8(this._offset) !== r && l < f; )
2877
+ (l++, this._offset++);
2878
+ return (
2879
+ l < f && this._offset++,
2880
+ new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + B, l)
2881
+ );
2882
+ }
2883
+ };
2884
+ var dr = new Uint8Array([0]),
2885
+ w = [171, 75, 84, 88, 32, 50, 48, 187, 13, 10, 26, 10];
2886
+ function sn(i) {
2887
+ return typeof TextDecoder < "u"
2888
+ ? new TextDecoder().decode(i)
2889
+ : Buffer.from(i).toString("utf8");
2890
+ }
2891
+ function on(i) {
2892
+ let f = new Uint8Array(i.buffer, i.byteOffset, w.length);
2893
+ if (
2894
+ f[0] !== w[0] ||
2895
+ f[1] !== w[1] ||
2896
+ f[2] !== w[2] ||
2897
+ f[3] !== w[3] ||
2898
+ f[4] !== w[4] ||
2899
+ f[5] !== w[5] ||
2900
+ f[6] !== w[6] ||
2901
+ f[7] !== w[7] ||
2902
+ f[8] !== w[8] ||
2903
+ f[9] !== w[9] ||
2904
+ f[10] !== w[10] ||
2905
+ f[11] !== w[11]
2906
+ )
2907
+ throw new Error("Missing KTX 2.0 identifier.");
2908
+ let r = new Vt(),
2909
+ B = 17 * Uint32Array.BYTES_PER_ELEMENT,
2910
+ l = new Oe(i, w.length, B, !0);
2911
+ ((r.vkFormat = l._nextUint32()),
2912
+ (r.typeSize = l._nextUint32()),
2913
+ (r.pixelWidth = l._nextUint32()),
2914
+ (r.pixelHeight = l._nextUint32()),
2915
+ (r.pixelDepth = l._nextUint32()),
2916
+ (r.layerCount = l._nextUint32()),
2917
+ (r.faceCount = l._nextUint32()));
2918
+ let p = l._nextUint32();
2919
+ r.supercompressionScheme = l._nextUint32();
2920
+ let C = l._nextUint32(),
2921
+ U = l._nextUint32(),
2922
+ y = l._nextUint32(),
2923
+ m = l._nextUint32(),
2924
+ V = l._nextUint64(),
2925
+ d = l._nextUint64(),
2926
+ P = p * 3 * 8,
2927
+ Q = new Oe(i, w.length + B, P, !0);
2928
+ for (let L = 0; L < p; L++)
2929
+ r.levels.push({
2930
+ levelData: new Uint8Array(
2931
+ i.buffer,
2932
+ i.byteOffset + Q._nextUint64(),
2933
+ Q._nextUint64(),
2934
+ ),
2935
+ uncompressedByteLength: Q._nextUint64(),
2936
+ });
2937
+ let u = new Oe(i, C, U, !0),
2938
+ X = {
2939
+ vendorId: u._skip(4)._nextUint16(),
2940
+ descriptorType: u._nextUint16(),
2941
+ versionNumber: u._nextUint16(),
2942
+ descriptorBlockSize: u._nextUint16(),
2943
+ colorModel: u._nextUint8(),
2944
+ colorPrimaries: u._nextUint8(),
2945
+ transferFunction: u._nextUint8(),
2946
+ flags: u._nextUint8(),
2947
+ texelBlockDimension: [
2948
+ u._nextUint8(),
2949
+ u._nextUint8(),
2950
+ u._nextUint8(),
2951
+ u._nextUint8(),
2952
+ ],
2953
+ bytesPlane: [
2954
+ u._nextUint8(),
2955
+ u._nextUint8(),
2956
+ u._nextUint8(),
2957
+ u._nextUint8(),
2958
+ u._nextUint8(),
2959
+ u._nextUint8(),
2960
+ u._nextUint8(),
2961
+ u._nextUint8(),
2962
+ ],
2963
+ samples: [],
2964
+ },
2965
+ W = (X.descriptorBlockSize / 4 - 6) / 4;
2966
+ for (let L = 0; L < W; L++) {
2967
+ let j = {
2968
+ bitOffset: u._nextUint16(),
2969
+ bitLength: u._nextUint8(),
2970
+ channelType: u._nextUint8(),
2971
+ samplePosition: [
2972
+ u._nextUint8(),
2973
+ u._nextUint8(),
2974
+ u._nextUint8(),
2975
+ u._nextUint8(),
2976
+ ],
2977
+ sampleLower: -1 / 0,
2978
+ sampleUpper: 1 / 0,
2979
+ };
2980
+ (j.channelType & 64
2981
+ ? ((j.sampleLower = u._nextInt32()), (j.sampleUpper = u._nextInt32()))
2982
+ : ((j.sampleLower = u._nextUint32()), (j.sampleUpper = u._nextUint32())),
2983
+ (X.samples[L] = j));
2984
+ }
2985
+ ((r.dataFormatDescriptor.length = 0), r.dataFormatDescriptor.push(X));
2986
+ let J = new Oe(i, y, m, !0);
2987
+ for (; J._offset < m; ) {
2988
+ let L = J._nextUint32(),
2989
+ j = J._scan(L),
2990
+ Ae = sn(j);
2991
+ if (
2992
+ ((r.keyValue[Ae] = J._nextUint8Array(L - j.byteLength - 1)),
2993
+ Ae.match(/^ktx/i))
2994
+ ) {
2995
+ let xe = sn(r.keyValue[Ae]);
2996
+ r.keyValue[Ae] = xe.substring(0, xe.lastIndexOf("\0"));
2997
+ }
2998
+ let at = L % 4 ? 4 - (L % 4) : 0;
2999
+ J._skip(at);
3000
+ }
3001
+ if (d <= 0) return r;
3002
+ let g = new Oe(i, V, d, !0),
3003
+ Fe = g._nextUint16(),
3004
+ st = g._nextUint16(),
3005
+ ee = g._nextUint32(),
3006
+ De = g._nextUint32(),
3007
+ Ie = g._nextUint32(),
3008
+ ae = g._nextUint32(),
3009
+ ot = [];
3010
+ for (let L = 0; L < p; L++)
3011
+ ot.push({
3012
+ imageFlags: g._nextUint32(),
3013
+ rgbSliceByteOffset: g._nextUint32(),
3014
+ rgbSliceByteLength: g._nextUint32(),
3015
+ alphaSliceByteOffset: g._nextUint32(),
3016
+ alphaSliceByteLength: g._nextUint32(),
3017
+ });
3018
+ let ce = V + g._offset,
3019
+ de = ce + ee,
3020
+ be = de + De,
3021
+ Se = be + Ie,
3022
+ we = new Uint8Array(i.buffer, i.byteOffset + ce, ee),
3023
+ He = new Uint8Array(i.buffer, i.byteOffset + de, De),
3024
+ Xe = new Uint8Array(i.buffer, i.byteOffset + be, Ie),
3025
+ Rt = new Uint8Array(i.buffer, i.byteOffset + Se, ae);
3026
+ return (
3027
+ (r.globalData = {
3028
+ endpointCount: Fe,
3029
+ selectorCount: st,
3030
+ imageDescs: ot,
3031
+ endpointsData: we,
3032
+ selectorsData: He,
3033
+ tablesData: Xe,
3034
+ extendedData: Rt,
3035
+ }),
3036
+ r
3037
+ );
3038
+ }
3039
+ var an = or(Rn(), 1),
3040
+ cn = [
3041
+ "positiveX",
3042
+ "negativeX",
3043
+ "positiveY",
3044
+ "negativeY",
3045
+ "positiveZ",
3046
+ "negativeZ",
3047
+ ],
3048
+ An = 163,
3049
+ fn = 166,
3050
+ me;
3051
+ function ar(i, f) {
3052
+ nn.typeOf.object("transcoderModule", me);
3053
+ let r = i.ktx2Buffer,
3054
+ B = i.supportedTargetFormats,
3055
+ l;
3056
+ try {
3057
+ l = on(r);
3058
+ } catch {
3059
+ throw new ie("Invalid KTX2 file.");
3060
+ }
3061
+ if (l.layerCount !== 0)
3062
+ throw new ie("KTX2 texture arrays are not supported.");
3063
+ if (l.pixelDepth !== 0) throw new ie("KTX2 3D textures are unsupported.");
3064
+ let p = l.dataFormatDescriptor[0],
3065
+ C = new Array(l.levelCount);
3066
+ return (
3067
+ l.vkFormat === 0 && (p.colorModel === An || p.colorModel === fn)
3068
+ ? Ar(r, l, B, me, f, C)
3069
+ : (f.push(r.buffer), cr(l, C)),
3070
+ C
3071
+ );
3072
+ }
3073
+ function cr(i, f) {
3074
+ let r = i.vkFormat === Le.VK_FORMAT_R8G8B8_SRGB ? E.RGB : E.RGBA,
3075
+ B;
3076
+ i.vkFormat === Le.VK_FORMAT_R8G8B8A8_UNORM
3077
+ ? (B = b.UNSIGNED_BYTE)
3078
+ : i.vkFormat === Le.VK_FORMAT_R16G16B16A16_SFLOAT
3079
+ ? (B = b.HALF_FLOAT)
3080
+ : i.vkFormat === Le.VK_FORMAT_R32G32B32A32_SFLOAT && (B = b.FLOAT);
3081
+ for (let l = 0; l < i.levels.length; ++l) {
3082
+ let p = {};
3083
+ f[l] = p;
3084
+ let C = i.levels[l].levelData,
3085
+ U = i.pixelWidth >> l,
3086
+ y = i.pixelHeight >> l,
3087
+ m = U * y * E.componentsLength(r);
3088
+ for (let V = 0; V < i.faceCount; ++V) {
3089
+ let d = C.byteOffset + m * i.typeSize * V,
3090
+ P;
3091
+ (!ge(B) || b.sizeInBytes(B) === 1
3092
+ ? (P = new Uint8Array(C.buffer, d, m))
3093
+ : b.sizeInBytes(B) === 2
3094
+ ? (P = new Uint16Array(C.buffer, d, m))
3095
+ : (P = new Float32Array(C.buffer, d, m)),
3096
+ (p[cn[V]] = {
3097
+ internalFormat: r,
3098
+ datatype: B,
3099
+ width: U,
3100
+ height: y,
3101
+ levelBuffer: P,
3102
+ }));
3103
+ }
3104
+ }
3105
+ }
3106
+ function Ar(i, f, r, B, l, p) {
3107
+ let C = new B.KTX2File(i),
3108
+ U = C.getWidth(),
3109
+ y = C.getHeight(),
3110
+ m = C.getLevels(),
3111
+ V = C.getHasAlpha();
3112
+ if (!(U > 0) || !(y > 0) || !(m > 0))
3113
+ throw (C.close(), C.delete(), new ie("Invalid KTX2 file"));
3114
+ let d,
3115
+ P,
3116
+ Q = f.dataFormatDescriptor[0],
3117
+ u = B.transcoder_texture_format;
3118
+ if (Q.colorModel === An)
3119
+ if (r.etc)
3120
+ ((d = V ? E.RGBA8_ETC2_EAC : E.RGB8_ETC2),
3121
+ (P = V ? u.cTFETC2_RGBA : u.cTFETC1_RGB));
3122
+ else if (r.etc1 && !V) ((d = E.RGB_ETC1), (P = u.cTFETC1_RGB));
3123
+ else if (r.s3tc)
3124
+ ((d = V ? E.RGBA_DXT5 : E.RGB_DXT1),
3125
+ (P = V ? u.cTFBC3_RGBA : u.cTFBC1_RGB));
3126
+ else if (r.pvrtc)
3127
+ ((d = V ? E.RGBA_PVRTC_4BPPV1 : E.RGB_PVRTC_4BPPV1),
3128
+ (P = V ? u.cTFPVRTC1_4_RGBA : u.cTFPVRTC1_4_RGB));
3129
+ else if (r.astc) ((d = E.RGBA_ASTC), (P = u.cTFASTC_4x4_RGBA));
3130
+ else if (r.bc7) ((d = E.RGBA_BC7), (P = u.cTFBC7_RGBA));
3131
+ else
3132
+ throw new ie(
3133
+ "No transcoding format target available for ETC1S compressed ktx2.",
3134
+ );
3135
+ else if (Q.colorModel === fn)
3136
+ if (r.astc) ((d = E.RGBA_ASTC), (P = u.cTFASTC_4x4_RGBA));
3137
+ else if (r.bc7) ((d = E.RGBA_BC7), (P = u.cTFBC7_RGBA));
3138
+ else if (r.s3tc)
3139
+ ((d = V ? E.RGBA_DXT5 : E.RGB_DXT1),
3140
+ (P = V ? u.cTFBC3_RGBA : u.cTFBC1_RGB));
3141
+ else if (r.etc)
3142
+ ((d = V ? E.RGBA8_ETC2_EAC : E.RGB8_ETC2),
3143
+ (P = V ? u.cTFETC2_RGBA : u.cTFETC1_RGB));
3144
+ else if (r.etc1 && !V) ((d = E.RGB_ETC1), (P = u.cTFETC1_RGB));
3145
+ else if (r.pvrtc)
3146
+ ((d = V ? E.RGBA_PVRTC_4BPPV1 : E.RGB_PVRTC_4BPPV1),
3147
+ (P = V ? u.cTFPVRTC1_4_RGBA : u.cTFPVRTC1_4_RGB));
3148
+ else
3149
+ throw new ie(
3150
+ "No transcoding format target available for UASTC compressed ktx2.",
3151
+ );
3152
+ if (!C.startTranscoding())
3153
+ throw (C.close(), C.delete(), new ie("startTranscoding() failed"));
3154
+ for (let X = 0; X < f.levels.length; ++X) {
3155
+ let se = {};
3156
+ ((p[X] = se), (U = f.pixelWidth >> X), (y = f.pixelHeight >> X));
3157
+ let le = C.getImageTranscodedSizeInBytes(X, 0, 0, P.value),
3158
+ W = new Uint8Array(le),
3159
+ J = C.transcodeImage(W, X, 0, 0, P.value, 0, -1, -1);
3160
+ if (!ge(J)) throw new ie("transcodeImage() failed.");
3161
+ (l.push(W.buffer),
3162
+ (se[cn[0]] = { internalFormat: d, width: U, height: y, levelBuffer: W }));
3163
+ }
3164
+ return (C.close(), C.delete(), p);
3165
+ }
3166
+ async function fr(i, f) {
3167
+ let r = i.webAssemblyConfig,
3168
+ B = _n(an.default, self.BASIS);
3169
+ return (
3170
+ ge(r.wasmBinaryFile) ? (me = await B(r)) : (me = await B()),
3171
+ me.initializeBasis(),
3172
+ !0
3173
+ );
3174
+ }
3175
+ function Tr(i, f) {
3176
+ let r = i.webAssemblyConfig;
3177
+ return ge(r) ? fr(i, f) : ar(i, f);
3178
+ }
3179
+ var yr = rn(Tr);
3180
+ export { yr as default };