@cesium/engine 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 (1731) hide show
  1. package/Build/ThirdParty/Workers/basis_transcoder.js +2233 -0
  2. package/Build/ThirdParty/Workers/draco_decoder_nodejs.js +1872 -0
  3. package/Build/ThirdParty/Workers/package.json +1 -0
  4. package/Build/ThirdParty/Workers/pako_deflate.min.js +589 -0
  5. package/Build/ThirdParty/Workers/pako_inflate.min.js +798 -0
  6. package/Build/ThirdParty/Workers/z-worker-pako.js +503 -0
  7. package/Build/ThirdParty/basis_transcoder.wasm +0 -0
  8. package/Build/ThirdParty/draco_decoder.wasm +0 -0
  9. package/Build/ThirdParty/google-earth-dbroot-parser.js +8019 -0
  10. package/Build/Widget/CesiumWidget.css +120 -0
  11. package/Build/Widget/lighter.css +13 -0
  12. package/Build/Workers/ArcType-ce2e50ab.js +37 -0
  13. package/Build/Workers/AttributeCompression-4589338a.js +716 -0
  14. package/Build/Workers/AxisAlignedBoundingBox-bfb1234f.js +258 -0
  15. package/Build/Workers/BoundingRectangle-7ffc2153.js +369 -0
  16. package/Build/Workers/BoxGeometry-93f344a3.js +884 -0
  17. package/Build/Workers/Check-666ab1a0.js +290 -0
  18. package/Build/Workers/Color-0c5aaf47.js +2262 -0
  19. package/Build/Workers/ComponentDatatype-f7b11d02.js +341 -0
  20. package/Build/Workers/CoplanarPolygonGeometryLibrary-6597982a.js +132 -0
  21. package/Build/Workers/CorridorGeometryLibrary-2119580e.js +498 -0
  22. package/Build/Workers/CylinderGeometry-f9503c6d.js +467 -0
  23. package/Build/Workers/CylinderGeometryLibrary-372c07d8.js +63 -0
  24. package/Build/Workers/EllipseGeometry-fedf72d5.js +1304 -0
  25. package/Build/Workers/EllipseGeometryLibrary-4ea68687.js +366 -0
  26. package/Build/Workers/EllipseOutlineGeometry-e2ae6a35.js +443 -0
  27. package/Build/Workers/EllipsoidGeodesic-16de63ea.js +520 -0
  28. package/Build/Workers/EllipsoidGeometry-95c0330e.js +637 -0
  29. package/Build/Workers/EllipsoidOutlineGeometry-d6d2ceec.js +454 -0
  30. package/Build/Workers/EllipsoidRhumbLine-ae5e65e0.js +741 -0
  31. package/Build/Workers/EllipsoidTangentPlane-bfc674bf.js +373 -0
  32. package/Build/Workers/EncodedCartesian3-f473ea18.js +171 -0
  33. package/Build/Workers/FrustumGeometry-3bf2e4eb.js +2512 -0
  34. package/Build/Workers/GeometryAttribute-df5f473e.js +619 -0
  35. package/Build/Workers/GeometryAttributes-f06a2792.js +91 -0
  36. package/Build/Workers/GeometryInstance-aa75b4cf.js +121 -0
  37. package/Build/Workers/GeometryOffsetAttribute-04332ce7.js +16 -0
  38. package/Build/Workers/GeometryPipeline-f0e46c42.js +3690 -0
  39. package/Build/Workers/IndexDatatype-a55ceaa1.js +200 -0
  40. package/Build/Workers/IntersectionTests-9de29d51.js +1836 -0
  41. package/Build/Workers/Math-2dbd6b93.js +1330 -0
  42. package/Build/Workers/Matrix2-ce637455.js +7084 -0
  43. package/Build/Workers/Matrix3-4f4df527.js +4282 -0
  44. package/Build/Workers/OrientedBoundingBox-d3ff3d4d.js +1257 -0
  45. package/Build/Workers/Plane-b81241c2.js +309 -0
  46. package/Build/Workers/PolygonGeometryLibrary-6f4937bb.js +1074 -0
  47. package/Build/Workers/PolygonPipeline-774a8aaf.js +1341 -0
  48. package/Build/Workers/PolylinePipeline-2e2b015c.js +573 -0
  49. package/Build/Workers/PolylineVolumeGeometryLibrary-7ee1d449.js +781 -0
  50. package/Build/Workers/PrimitivePipeline-a9b7aae0.js +966 -0
  51. package/Build/Workers/RectangleGeometryLibrary-9aa6c8f6.js +280 -0
  52. package/Build/Workers/RuntimeError-06c93819.js +68 -0
  53. package/Build/Workers/TerrainEncoding-b52dcfc5.js +1227 -0
  54. package/Build/Workers/Transforms-2f755df8.js +14683 -0
  55. package/Build/Workers/VertexFormat-6b480673.js +312 -0
  56. package/Build/Workers/WallGeometryLibrary-ab19a93d.js +211 -0
  57. package/Build/Workers/WebGLConstants-a8cc3e8c.js +620 -0
  58. package/Build/Workers/WebMercatorProjection-9f25de49.js +151 -0
  59. package/Build/Workers/arrayRemoveDuplicates-c2038105.js +129 -0
  60. package/Build/Workers/cesiumWorkerBootstrapper.js +1273 -0
  61. package/Build/Workers/combine-ca22a614.js +82 -0
  62. package/Build/Workers/combineGeometry.js +17 -0
  63. package/Build/Workers/createBoxGeometry.js +12 -0
  64. package/Build/Workers/createBoxOutlineGeometry.js +313 -0
  65. package/Build/Workers/createCircleGeometry.js +213 -0
  66. package/Build/Workers/createCircleOutlineGeometry.js +160 -0
  67. package/Build/Workers/createCoplanarPolygonGeometry.js +586 -0
  68. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +236 -0
  69. package/Build/Workers/createCorridorGeometry.js +1407 -0
  70. package/Build/Workers/createCorridorOutlineGeometry.js +603 -0
  71. package/Build/Workers/createCylinderGeometry.js +12 -0
  72. package/Build/Workers/createCylinderOutlineGeometry.js +265 -0
  73. package/Build/Workers/createEllipseGeometry.js +14 -0
  74. package/Build/Workers/createEllipseOutlineGeometry.js +14 -0
  75. package/Build/Workers/createEllipsoidGeometry.js +12 -0
  76. package/Build/Workers/createEllipsoidOutlineGeometry.js +15 -0
  77. package/Build/Workers/createFrustumGeometry.js +12 -0
  78. package/Build/Workers/createFrustumOutlineGeometry.js +251 -0
  79. package/Build/Workers/createGeometry.js +55 -0
  80. package/Build/Workers/createGroundPolylineGeometry.js +2134 -0
  81. package/Build/Workers/createPlaneGeometry.js +250 -0
  82. package/Build/Workers/createPlaneOutlineGeometry.js +115 -0
  83. package/Build/Workers/createPolygonGeometry.js +1420 -0
  84. package/Build/Workers/createPolygonOutlineGeometry.js +683 -0
  85. package/Build/Workers/createPolylineGeometry.js +571 -0
  86. package/Build/Workers/createPolylineVolumeGeometry.js +411 -0
  87. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +301 -0
  88. package/Build/Workers/createRectangleGeometry.js +1476 -0
  89. package/Build/Workers/createRectangleOutlineGeometry.js +535 -0
  90. package/Build/Workers/createSimplePolylineGeometry.js +458 -0
  91. package/Build/Workers/createSphereGeometry.js +123 -0
  92. package/Build/Workers/createSphereOutlineGeometry.js +126 -0
  93. package/Build/Workers/createTaskProcessorWorker.js +127 -0
  94. package/Build/Workers/createVectorTileClampedPolylines.js +535 -0
  95. package/Build/Workers/createVectorTileGeometries.js +445 -0
  96. package/Build/Workers/createVectorTilePoints.js +79 -0
  97. package/Build/Workers/createVectorTilePolygons.js +406 -0
  98. package/Build/Workers/createVectorTilePolylines.js +254 -0
  99. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +640 -0
  100. package/Build/Workers/createVerticesFromHeightmap.js +2707 -0
  101. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +994 -0
  102. package/Build/Workers/createWallGeometry.js +623 -0
  103. package/Build/Workers/createWallOutlineGeometry.js +432 -0
  104. package/Build/Workers/decodeDraco.js +381 -0
  105. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +3668 -0
  106. package/Build/Workers/decodeI3S.js +1040 -0
  107. package/Build/Workers/defaultValue-0a909f67.js +51 -0
  108. package/Build/Workers/package.js +2 -0
  109. package/Build/Workers/transcodeKTX2.js +1516 -0
  110. package/Build/Workers/transferTypedArrayTest.js +18 -0
  111. package/Build/Workers/upsampleQuantizedTerrainMesh.js +1023 -0
  112. package/LICENSE.md +933 -0
  113. package/README.md +58 -0
  114. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1 -0
  115. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1 -0
  116. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1 -0
  117. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1 -0
  118. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1 -0
  119. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1 -0
  120. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1 -0
  121. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1 -0
  122. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1 -0
  123. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1 -0
  124. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1 -0
  125. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1 -0
  126. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1 -0
  127. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1 -0
  128. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1 -0
  129. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1 -0
  130. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1 -0
  131. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1 -0
  132. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1 -0
  133. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1 -0
  134. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_27.json +1 -0
  135. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1 -0
  136. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1 -0
  137. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1 -0
  138. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1 -0
  139. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1 -0
  140. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1 -0
  141. package/Source/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1 -0
  142. package/Source/Assets/Images/bing_maps_credit.png +0 -0
  143. package/Source/Assets/Images/cesium_credit.png +0 -0
  144. package/Source/Assets/Images/google_earth_credit.png +0 -0
  145. package/Source/Assets/Images/ion-credit.png +0 -0
  146. package/Source/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
  147. package/Source/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
  148. package/Source/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
  149. package/Source/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
  150. package/Source/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
  151. package/Source/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
  152. package/Source/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
  153. package/Source/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
  154. package/Source/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
  155. package/Source/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
  156. package/Source/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
  157. package/Source/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
  158. package/Source/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
  159. package/Source/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
  160. package/Source/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
  161. package/Source/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
  162. package/Source/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
  163. package/Source/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
  164. package/Source/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
  165. package/Source/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
  166. package/Source/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
  167. package/Source/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
  168. package/Source/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
  169. package/Source/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
  170. package/Source/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
  171. package/Source/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
  172. package/Source/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
  173. package/Source/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
  174. package/Source/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
  175. package/Source/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
  176. package/Source/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
  177. package/Source/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
  178. package/Source/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
  179. package/Source/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
  180. package/Source/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
  181. package/Source/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
  182. package/Source/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
  183. package/Source/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
  184. package/Source/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
  185. package/Source/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
  186. package/Source/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
  187. package/Source/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
  188. package/Source/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
  189. package/Source/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
  190. package/Source/Assets/Textures/NaturalEarthII/tilemapresource.xml +14 -0
  191. package/Source/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
  192. package/Source/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
  193. package/Source/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
  194. package/Source/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
  195. package/Source/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
  196. package/Source/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
  197. package/Source/Assets/Textures/maki/airfield.png +0 -0
  198. package/Source/Assets/Textures/maki/airport.png +0 -0
  199. package/Source/Assets/Textures/maki/alcohol-shop.png +0 -0
  200. package/Source/Assets/Textures/maki/america-football.png +0 -0
  201. package/Source/Assets/Textures/maki/art-gallery.png +0 -0
  202. package/Source/Assets/Textures/maki/bakery.png +0 -0
  203. package/Source/Assets/Textures/maki/bank.png +0 -0
  204. package/Source/Assets/Textures/maki/bar.png +0 -0
  205. package/Source/Assets/Textures/maki/baseball.png +0 -0
  206. package/Source/Assets/Textures/maki/basketball.png +0 -0
  207. package/Source/Assets/Textures/maki/beer.png +0 -0
  208. package/Source/Assets/Textures/maki/bicycle.png +0 -0
  209. package/Source/Assets/Textures/maki/building.png +0 -0
  210. package/Source/Assets/Textures/maki/bus.png +0 -0
  211. package/Source/Assets/Textures/maki/cafe.png +0 -0
  212. package/Source/Assets/Textures/maki/camera.png +0 -0
  213. package/Source/Assets/Textures/maki/campsite.png +0 -0
  214. package/Source/Assets/Textures/maki/car.png +0 -0
  215. package/Source/Assets/Textures/maki/cemetery.png +0 -0
  216. package/Source/Assets/Textures/maki/cesium.png +0 -0
  217. package/Source/Assets/Textures/maki/chemist.png +0 -0
  218. package/Source/Assets/Textures/maki/cinema.png +0 -0
  219. package/Source/Assets/Textures/maki/circle-stroked.png +0 -0
  220. package/Source/Assets/Textures/maki/circle.png +0 -0
  221. package/Source/Assets/Textures/maki/city.png +0 -0
  222. package/Source/Assets/Textures/maki/clothing-store.png +0 -0
  223. package/Source/Assets/Textures/maki/college.png +0 -0
  224. package/Source/Assets/Textures/maki/commercial.png +0 -0
  225. package/Source/Assets/Textures/maki/cricket.png +0 -0
  226. package/Source/Assets/Textures/maki/cross.png +0 -0
  227. package/Source/Assets/Textures/maki/dam.png +0 -0
  228. package/Source/Assets/Textures/maki/danger.png +0 -0
  229. package/Source/Assets/Textures/maki/disability.png +0 -0
  230. package/Source/Assets/Textures/maki/dog-park.png +0 -0
  231. package/Source/Assets/Textures/maki/embassy.png +0 -0
  232. package/Source/Assets/Textures/maki/emergency-telephone.png +0 -0
  233. package/Source/Assets/Textures/maki/entrance.png +0 -0
  234. package/Source/Assets/Textures/maki/farm.png +0 -0
  235. package/Source/Assets/Textures/maki/fast-food.png +0 -0
  236. package/Source/Assets/Textures/maki/ferry.png +0 -0
  237. package/Source/Assets/Textures/maki/fire-station.png +0 -0
  238. package/Source/Assets/Textures/maki/fuel.png +0 -0
  239. package/Source/Assets/Textures/maki/garden.png +0 -0
  240. package/Source/Assets/Textures/maki/gift.png +0 -0
  241. package/Source/Assets/Textures/maki/golf.png +0 -0
  242. package/Source/Assets/Textures/maki/grocery.png +0 -0
  243. package/Source/Assets/Textures/maki/hairdresser.png +0 -0
  244. package/Source/Assets/Textures/maki/harbor.png +0 -0
  245. package/Source/Assets/Textures/maki/heart.png +0 -0
  246. package/Source/Assets/Textures/maki/heliport.png +0 -0
  247. package/Source/Assets/Textures/maki/hospital.png +0 -0
  248. package/Source/Assets/Textures/maki/ice-cream.png +0 -0
  249. package/Source/Assets/Textures/maki/industrial.png +0 -0
  250. package/Source/Assets/Textures/maki/land-use.png +0 -0
  251. package/Source/Assets/Textures/maki/laundry.png +0 -0
  252. package/Source/Assets/Textures/maki/library.png +0 -0
  253. package/Source/Assets/Textures/maki/lighthouse.png +0 -0
  254. package/Source/Assets/Textures/maki/lodging.png +0 -0
  255. package/Source/Assets/Textures/maki/logging.png +0 -0
  256. package/Source/Assets/Textures/maki/london-underground.png +0 -0
  257. package/Source/Assets/Textures/maki/marker-stroked.png +0 -0
  258. package/Source/Assets/Textures/maki/marker.png +0 -0
  259. package/Source/Assets/Textures/maki/minefield.png +0 -0
  260. package/Source/Assets/Textures/maki/mobilephone.png +0 -0
  261. package/Source/Assets/Textures/maki/monument.png +0 -0
  262. package/Source/Assets/Textures/maki/museum.png +0 -0
  263. package/Source/Assets/Textures/maki/music.png +0 -0
  264. package/Source/Assets/Textures/maki/oil-well.png +0 -0
  265. package/Source/Assets/Textures/maki/park.png +0 -0
  266. package/Source/Assets/Textures/maki/park2.png +0 -0
  267. package/Source/Assets/Textures/maki/parking-garage.png +0 -0
  268. package/Source/Assets/Textures/maki/parking.png +0 -0
  269. package/Source/Assets/Textures/maki/pharmacy.png +0 -0
  270. package/Source/Assets/Textures/maki/pitch.png +0 -0
  271. package/Source/Assets/Textures/maki/place-of-worship.png +0 -0
  272. package/Source/Assets/Textures/maki/playground.png +0 -0
  273. package/Source/Assets/Textures/maki/police.png +0 -0
  274. package/Source/Assets/Textures/maki/polling-place.png +0 -0
  275. package/Source/Assets/Textures/maki/post.png +0 -0
  276. package/Source/Assets/Textures/maki/prison.png +0 -0
  277. package/Source/Assets/Textures/maki/rail-above.png +0 -0
  278. package/Source/Assets/Textures/maki/rail-light.png +0 -0
  279. package/Source/Assets/Textures/maki/rail-metro.png +0 -0
  280. package/Source/Assets/Textures/maki/rail-underground.png +0 -0
  281. package/Source/Assets/Textures/maki/rail.png +0 -0
  282. package/Source/Assets/Textures/maki/religious-christian.png +0 -0
  283. package/Source/Assets/Textures/maki/religious-jewish.png +0 -0
  284. package/Source/Assets/Textures/maki/religious-muslim.png +0 -0
  285. package/Source/Assets/Textures/maki/restaurant.png +0 -0
  286. package/Source/Assets/Textures/maki/roadblock.png +0 -0
  287. package/Source/Assets/Textures/maki/rocket.png +0 -0
  288. package/Source/Assets/Textures/maki/school.png +0 -0
  289. package/Source/Assets/Textures/maki/scooter.png +0 -0
  290. package/Source/Assets/Textures/maki/shop.png +0 -0
  291. package/Source/Assets/Textures/maki/skiing.png +0 -0
  292. package/Source/Assets/Textures/maki/slaughterhouse.png +0 -0
  293. package/Source/Assets/Textures/maki/soccer.png +0 -0
  294. package/Source/Assets/Textures/maki/square-stroked.png +0 -0
  295. package/Source/Assets/Textures/maki/square.png +0 -0
  296. package/Source/Assets/Textures/maki/star-stroked.png +0 -0
  297. package/Source/Assets/Textures/maki/star.png +0 -0
  298. package/Source/Assets/Textures/maki/suitcase.png +0 -0
  299. package/Source/Assets/Textures/maki/swimming.png +0 -0
  300. package/Source/Assets/Textures/maki/telephone.png +0 -0
  301. package/Source/Assets/Textures/maki/tennis.png +0 -0
  302. package/Source/Assets/Textures/maki/theatre.png +0 -0
  303. package/Source/Assets/Textures/maki/toilets.png +0 -0
  304. package/Source/Assets/Textures/maki/town-hall.png +0 -0
  305. package/Source/Assets/Textures/maki/town.png +0 -0
  306. package/Source/Assets/Textures/maki/triangle-stroked.png +0 -0
  307. package/Source/Assets/Textures/maki/triangle.png +0 -0
  308. package/Source/Assets/Textures/maki/village.png +0 -0
  309. package/Source/Assets/Textures/maki/warehouse.png +0 -0
  310. package/Source/Assets/Textures/maki/waste-basket.png +0 -0
  311. package/Source/Assets/Textures/maki/water.png +0 -0
  312. package/Source/Assets/Textures/maki/wetland.png +0 -0
  313. package/Source/Assets/Textures/maki/zoo.png +0 -0
  314. package/Source/Assets/Textures/moonSmall.jpg +0 -0
  315. package/Source/Assets/Textures/pin.svg +1 -0
  316. package/Source/Assets/Textures/waterNormals.jpg +0 -0
  317. package/Source/Assets/Textures/waterNormalsSmall.jpg +0 -0
  318. package/Source/Assets/approximateTerrainHeights.json +1 -0
  319. package/Source/Core/ApproximateTerrainHeights.js +256 -0
  320. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +728 -0
  321. package/Source/Core/ArcType.js +31 -0
  322. package/Source/Core/ArticulationStageType.js +23 -0
  323. package/Source/Core/AssociativeArray.js +127 -0
  324. package/Source/Core/AttributeCompression.js +527 -0
  325. package/Source/Core/AxisAlignedBoundingBox.js +259 -0
  326. package/Source/Core/BingMapsGeocoderService.js +107 -0
  327. package/Source/Core/BoundingRectangle.js +373 -0
  328. package/Source/Core/BoundingSphere.js +1505 -0
  329. package/Source/Core/BoxGeometry.js +893 -0
  330. package/Source/Core/BoxOutlineGeometry.js +314 -0
  331. package/Source/Core/Cartesian2.js +824 -0
  332. package/Source/Core/Cartesian3.js +1218 -0
  333. package/Source/Core/Cartesian4.js +980 -0
  334. package/Source/Core/Cartographic.js +302 -0
  335. package/Source/Core/CartographicGeocoderService.js +58 -0
  336. package/Source/Core/CatmullRomSpline.js +324 -0
  337. package/Source/Core/CesiumTerrainProvider.js +1318 -0
  338. package/Source/Core/Check.js +213 -0
  339. package/Source/Core/CircleGeometry.js +203 -0
  340. package/Source/Core/CircleOutlineGeometry.js +149 -0
  341. package/Source/Core/Clock.js +319 -0
  342. package/Source/Core/ClockRange.js +39 -0
  343. package/Source/Core/ClockStep.js +38 -0
  344. package/Source/Core/Color.js +2263 -0
  345. package/Source/Core/ColorGeometryInstanceAttribute.js +182 -0
  346. package/Source/Core/ComponentDatatype.js +340 -0
  347. package/Source/Core/CompressedTextureBuffer.js +114 -0
  348. package/Source/Core/ConstantSpline.js +119 -0
  349. package/Source/Core/CoplanarPolygonGeometry.js +599 -0
  350. package/Source/Core/CoplanarPolygonGeometryLibrary.js +132 -0
  351. package/Source/Core/CoplanarPolygonOutlineGeometry.js +237 -0
  352. package/Source/Core/CornerType.js +37 -0
  353. package/Source/Core/CorridorGeometry.js +1416 -0
  354. package/Source/Core/CorridorGeometryLibrary.js +501 -0
  355. package/Source/Core/CorridorOutlineGeometry.js +604 -0
  356. package/Source/Core/Credit.js +166 -0
  357. package/Source/Core/CubicRealPolynomial.js +238 -0
  358. package/Source/Core/CullingVolume.js +217 -0
  359. package/Source/Core/CustomHeightmapTerrainProvider.js +299 -0
  360. package/Source/Core/CylinderGeometry.js +479 -0
  361. package/Source/Core/CylinderGeometryLibrary.js +59 -0
  362. package/Source/Core/CylinderOutlineGeometry.js +269 -0
  363. package/Source/Core/DefaultProxy.js +26 -0
  364. package/Source/Core/DeveloperError.js +75 -0
  365. package/Source/Core/DistanceDisplayCondition.js +172 -0
  366. package/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js +181 -0
  367. package/Source/Core/DoubleEndedPriorityQueue.js +405 -0
  368. package/Source/Core/DoublyLinkedList.js +112 -0
  369. package/Source/Core/EarthOrientationParameters.js +431 -0
  370. package/Source/Core/EarthOrientationParametersSample.js +52 -0
  371. package/Source/Core/EasingFunction.js +257 -0
  372. package/Source/Core/EllipseGeometry.js +1325 -0
  373. package/Source/Core/EllipseGeometryLibrary.js +365 -0
  374. package/Source/Core/EllipseOutlineGeometry.js +454 -0
  375. package/Source/Core/Ellipsoid.js +804 -0
  376. package/Source/Core/EllipsoidGeodesic.js +523 -0
  377. package/Source/Core/EllipsoidGeometry.js +649 -0
  378. package/Source/Core/EllipsoidOutlineGeometry.js +464 -0
  379. package/Source/Core/EllipsoidRhumbLine.js +745 -0
  380. package/Source/Core/EllipsoidTangentPlane.js +383 -0
  381. package/Source/Core/EllipsoidTerrainProvider.js +230 -0
  382. package/Source/Core/EllipsoidalOccluder.js +559 -0
  383. package/Source/Core/EncodedCartesian3.js +170 -0
  384. package/Source/Core/Event.js +164 -0
  385. package/Source/Core/EventHelper.js +74 -0
  386. package/Source/Core/ExtrapolationType.js +34 -0
  387. package/Source/Core/FeatureDetection.js +411 -0
  388. package/Source/Core/FrustumGeometry.js +583 -0
  389. package/Source/Core/FrustumOutlineGeometry.js +254 -0
  390. package/Source/Core/Fullscreen.js +249 -0
  391. package/Source/Core/GeocodeType.js +24 -0
  392. package/Source/Core/GeocoderService.js +29 -0
  393. package/Source/Core/GeographicProjection.js +105 -0
  394. package/Source/Core/GeographicTilingScheme.js +251 -0
  395. package/Source/Core/Geometry.js +376 -0
  396. package/Source/Core/GeometryAttribute.js +138 -0
  397. package/Source/Core/GeometryAttributes.js +88 -0
  398. package/Source/Core/GeometryFactory.js +25 -0
  399. package/Source/Core/GeometryInstance.js +121 -0
  400. package/Source/Core/GeometryInstanceAttribute.js +138 -0
  401. package/Source/Core/GeometryOffsetAttribute.js +10 -0
  402. package/Source/Core/GeometryPipeline.js +3296 -0
  403. package/Source/Core/GeometryType.js +10 -0
  404. package/Source/Core/GoogleEarthEnterpriseMetadata.js +597 -0
  405. package/Source/Core/GoogleEarthEnterpriseTerrainData.js +607 -0
  406. package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +641 -0
  407. package/Source/Core/GoogleEarthEnterpriseTileInformation.js +136 -0
  408. package/Source/Core/GregorianDate.js +69 -0
  409. package/Source/Core/GroundPolylineGeometry.js +1658 -0
  410. package/Source/Core/HeadingPitchRange.js +60 -0
  411. package/Source/Core/HeadingPitchRoll.js +236 -0
  412. package/Source/Core/Heap.js +234 -0
  413. package/Source/Core/HeightmapEncoding.js +25 -0
  414. package/Source/Core/HeightmapTerrainData.js +925 -0
  415. package/Source/Core/HeightmapTessellator.js +535 -0
  416. package/Source/Core/HermitePolynomialApproximation.js +342 -0
  417. package/Source/Core/HermiteSpline.js +620 -0
  418. package/Source/Core/HilbertOrder.js +118 -0
  419. package/Source/Core/Iau2000Orientation.js +167 -0
  420. package/Source/Core/Iau2006XysData.js +277 -0
  421. package/Source/Core/Iau2006XysSample.js +32 -0
  422. package/Source/Core/IauOrientationAxes.js +105 -0
  423. package/Source/Core/IauOrientationParameters.js +54 -0
  424. package/Source/Core/IndexDatatype.js +199 -0
  425. package/Source/Core/InterpolationAlgorithm.js +65 -0
  426. package/Source/Core/InterpolationType.js +14 -0
  427. package/Source/Core/Intersect.js +34 -0
  428. package/Source/Core/IntersectionTests.js +1047 -0
  429. package/Source/Core/Intersections2D.js +358 -0
  430. package/Source/Core/Interval.js +25 -0
  431. package/Source/Core/Ion.js +57 -0
  432. package/Source/Core/IonGeocoderService.js +64 -0
  433. package/Source/Core/IonResource.js +270 -0
  434. package/Source/Core/Iso8601.js +54 -0
  435. package/Source/Core/JulianDate.js +1233 -0
  436. package/Source/Core/KTX2Transcoder.js +95 -0
  437. package/Source/Core/KeyboardEventModifier.js +32 -0
  438. package/Source/Core/LagrangePolynomialApproximation.js +71 -0
  439. package/Source/Core/LeapSecond.js +24 -0
  440. package/Source/Core/LinearApproximation.js +83 -0
  441. package/Source/Core/LinearSpline.js +166 -0
  442. package/Source/Core/ManagedArray.js +163 -0
  443. package/Source/Core/MapProjection.js +62 -0
  444. package/Source/Core/Math.js +1119 -0
  445. package/Source/Core/Matrix2.js +1092 -0
  446. package/Source/Core/Matrix3.js +1838 -0
  447. package/Source/Core/Matrix4.js +3232 -0
  448. package/Source/Core/MorphWeightSpline.js +161 -0
  449. package/Source/Core/MortonOrder.js +214 -0
  450. package/Source/Core/NearFarScalar.js +174 -0
  451. package/Source/Core/Occluder.js +732 -0
  452. package/Source/Core/OffsetGeometryInstanceAttribute.js +126 -0
  453. package/Source/Core/OpenCageGeocoderService.js +118 -0
  454. package/Source/Core/OrientedBoundingBox.js +1270 -0
  455. package/Source/Core/OrthographicFrustum.js +338 -0
  456. package/Source/Core/OrthographicOffCenterFrustum.js +463 -0
  457. package/Source/Core/Packable.js +40 -0
  458. package/Source/Core/PackableForInterpolation.js +43 -0
  459. package/Source/Core/PeliasGeocoderService.js +93 -0
  460. package/Source/Core/PerspectiveFrustum.js +439 -0
  461. package/Source/Core/PerspectiveOffCenterFrustum.js +523 -0
  462. package/Source/Core/PinBuilder.js +234 -0
  463. package/Source/Core/PixelFormat.js +493 -0
  464. package/Source/Core/Plane.js +312 -0
  465. package/Source/Core/PlaneGeometry.js +250 -0
  466. package/Source/Core/PlaneOutlineGeometry.js +113 -0
  467. package/Source/Core/PolygonGeometry.js +1436 -0
  468. package/Source/Core/PolygonGeometryLibrary.js +981 -0
  469. package/Source/Core/PolygonHierarchy.js +25 -0
  470. package/Source/Core/PolygonOutlineGeometry.js +692 -0
  471. package/Source/Core/PolygonPipeline.js +633 -0
  472. package/Source/Core/PolylineGeometry.js +578 -0
  473. package/Source/Core/PolylinePipeline.js +580 -0
  474. package/Source/Core/PolylineVolumeGeometry.js +417 -0
  475. package/Source/Core/PolylineVolumeGeometryLibrary.js +701 -0
  476. package/Source/Core/PolylineVolumeOutlineGeometry.js +299 -0
  477. package/Source/Core/PrimitiveType.js +107 -0
  478. package/Source/Core/Proxy.js +24 -0
  479. package/Source/Core/QuadraticRealPolynomial.js +147 -0
  480. package/Source/Core/QuantizedMeshTerrainData.js +772 -0
  481. package/Source/Core/QuarticRealPolynomial.js +342 -0
  482. package/Source/Core/Quaternion.js +1142 -0
  483. package/Source/Core/QuaternionSpline.js +155 -0
  484. package/Source/Core/Queue.js +126 -0
  485. package/Source/Core/Ray.js +80 -0
  486. package/Source/Core/Rectangle.js +982 -0
  487. package/Source/Core/RectangleCollisionChecker.js +95 -0
  488. package/Source/Core/RectangleGeometry.js +1489 -0
  489. package/Source/Core/RectangleGeometryLibrary.js +283 -0
  490. package/Source/Core/RectangleOutlineGeometry.js +537 -0
  491. package/Source/Core/ReferenceFrame.js +23 -0
  492. package/Source/Core/Request.js +192 -0
  493. package/Source/Core/RequestErrorEvent.js +58 -0
  494. package/Source/Core/RequestScheduler.js +520 -0
  495. package/Source/Core/RequestState.js +55 -0
  496. package/Source/Core/RequestType.js +39 -0
  497. package/Source/Core/Resource.js +2307 -0
  498. package/Source/Core/RuntimeError.js +65 -0
  499. package/Source/Core/S2Cell.js +811 -0
  500. package/Source/Core/ScreenSpaceEventHandler.js +1140 -0
  501. package/Source/Core/ScreenSpaceEventType.js +127 -0
  502. package/Source/Core/ShowGeometryInstanceAttribute.js +123 -0
  503. package/Source/Core/Simon1994PlanetaryPositions.js +682 -0
  504. package/Source/Core/SimplePolylineGeometry.js +457 -0
  505. package/Source/Core/SphereGeometry.js +118 -0
  506. package/Source/Core/SphereOutlineGeometry.js +120 -0
  507. package/Source/Core/Spherical.js +184 -0
  508. package/Source/Core/Spline.js +189 -0
  509. package/Source/Core/SteppedSpline.js +160 -0
  510. package/Source/Core/TaskProcessor.js +377 -0
  511. package/Source/Core/TerrainData.js +125 -0
  512. package/Source/Core/TerrainEncoding.js +607 -0
  513. package/Source/Core/TerrainExaggeration.js +49 -0
  514. package/Source/Core/TerrainMesh.js +156 -0
  515. package/Source/Core/TerrainProvider.js +461 -0
  516. package/Source/Core/TerrainQuantization.js +25 -0
  517. package/Source/Core/TileAvailability.js +564 -0
  518. package/Source/Core/TileEdge.js +14 -0
  519. package/Source/Core/TileProviderError.js +171 -0
  520. package/Source/Core/TilingScheme.js +132 -0
  521. package/Source/Core/TimeConstants.js +83 -0
  522. package/Source/Core/TimeInterval.js +438 -0
  523. package/Source/Core/TimeIntervalCollection.js +1136 -0
  524. package/Source/Core/TimeStandard.js +30 -0
  525. package/Source/Core/Tipsify.js +314 -0
  526. package/Source/Core/Transforms.js +1132 -0
  527. package/Source/Core/TranslationRotationScale.js +60 -0
  528. package/Source/Core/TridiagonalSystemSolver.js +113 -0
  529. package/Source/Core/TrustedServers.js +146 -0
  530. package/Source/Core/VRTheWorldTerrainProvider.js +450 -0
  531. package/Source/Core/VertexFormat.js +311 -0
  532. package/Source/Core/VideoSynchronizer.js +222 -0
  533. package/Source/Core/Visibility.js +34 -0
  534. package/Source/Core/VulkanConstants.js +286 -0
  535. package/Source/Core/WallGeometry.js +626 -0
  536. package/Source/Core/WallGeometryLibrary.js +212 -0
  537. package/Source/Core/WallOutlineGeometry.js +434 -0
  538. package/Source/Core/WebGLConstants.js +614 -0
  539. package/Source/Core/WebMercatorProjection.js +154 -0
  540. package/Source/Core/WebMercatorTilingScheme.js +297 -0
  541. package/Source/Core/WindingOrder.js +36 -0
  542. package/Source/Core/WireframeIndexGenerator.js +238 -0
  543. package/Source/Core/appendForwardSlash.js +10 -0
  544. package/Source/Core/arrayRemoveDuplicates.js +130 -0
  545. package/Source/Core/barycentricCoordinates.js +109 -0
  546. package/Source/Core/binarySearch.js +67 -0
  547. package/Source/Core/buildModuleUrl.js +151 -0
  548. package/Source/Core/cancelAnimationFrame.js +53 -0
  549. package/Source/Core/clone.js +32 -0
  550. package/Source/Core/combine.js +80 -0
  551. package/Source/Core/createGuid.js +22 -0
  552. package/Source/Core/createWorldTerrain.js +42 -0
  553. package/Source/Core/decodeGoogleEarthEnterpriseData.js +93 -0
  554. package/Source/Core/decodeVectorPolylinePositions.js +51 -0
  555. package/Source/Core/defaultValue.js +29 -0
  556. package/Source/Core/defer.js +44 -0
  557. package/Source/Core/defined.js +17 -0
  558. package/Source/Core/deprecationWarning.js +53 -0
  559. package/Source/Core/destroyObject.js +57 -0
  560. package/Source/Core/formatError.js +30 -0
  561. package/Source/Core/getAbsoluteUri.js +47 -0
  562. package/Source/Core/getBaseUri.js +47 -0
  563. package/Source/Core/getExtensionFromUri.js +38 -0
  564. package/Source/Core/getFilenameFromUri.js +32 -0
  565. package/Source/Core/getImageFromTypedArray.js +24 -0
  566. package/Source/Core/getImagePixels.js +43 -0
  567. package/Source/Core/getJsonFromTypedArray.js +21 -0
  568. package/Source/Core/getMagic.js +15 -0
  569. package/Source/Core/getStringFromTypedArray.js +166 -0
  570. package/Source/Core/getTimestamp.js +26 -0
  571. package/Source/Core/isBitSet.js +7 -0
  572. package/Source/Core/isBlobUri.js +22 -0
  573. package/Source/Core/isCrossOriginUrl.js +30 -0
  574. package/Source/Core/isDataUri.js +22 -0
  575. package/Source/Core/isLeapYear.js +23 -0
  576. package/Source/Core/loadAndExecuteScript.js +27 -0
  577. package/Source/Core/loadImageFromTypedArray.js +64 -0
  578. package/Source/Core/loadKTX2.js +104 -0
  579. package/Source/Core/mergeSort.js +111 -0
  580. package/Source/Core/objectToQuery.js +57 -0
  581. package/Source/Core/oneTimeWarning.js +52 -0
  582. package/Source/Core/parseResponseHeaders.js +37 -0
  583. package/Source/Core/pointInsideTriangle.js +39 -0
  584. package/Source/Core/queryToObject.js +60 -0
  585. package/Source/Core/requestAnimationFrame.js +83 -0
  586. package/Source/Core/resizeImageToNextPowerOfTwo.js +31 -0
  587. package/Source/Core/sampleTerrain.js +257 -0
  588. package/Source/Core/sampleTerrainMostDetailed.js +117 -0
  589. package/Source/Core/scaleToGeodeticSurface.js +147 -0
  590. package/Source/Core/subdivideArray.js +35 -0
  591. package/Source/Core/webGLConstantToGlslType.js +25 -0
  592. package/Source/Core/wrapFunction.js +26 -0
  593. package/Source/Core/writeTextToCanvas.js +222 -0
  594. package/Source/DataSources/BillboardGraphics.js +429 -0
  595. package/Source/DataSources/BillboardVisualizer.js +341 -0
  596. package/Source/DataSources/BoundingSphereState.js +26 -0
  597. package/Source/DataSources/BoxGeometryUpdater.js +325 -0
  598. package/Source/DataSources/BoxGraphics.js +213 -0
  599. package/Source/DataSources/CallbackProperty.js +111 -0
  600. package/Source/DataSources/Cesium3DTilesetGraphics.js +113 -0
  601. package/Source/DataSources/Cesium3DTilesetVisualizer.js +249 -0
  602. package/Source/DataSources/CheckerboardMaterialProperty.js +151 -0
  603. package/Source/DataSources/ColorMaterialProperty.js +106 -0
  604. package/Source/DataSources/CompositeEntityCollection.js +592 -0
  605. package/Source/DataSources/CompositeMaterialProperty.js +129 -0
  606. package/Source/DataSources/CompositePositionProperty.js +149 -0
  607. package/Source/DataSources/CompositeProperty.js +154 -0
  608. package/Source/DataSources/ConstantPositionProperty.js +146 -0
  609. package/Source/DataSources/ConstantProperty.js +116 -0
  610. package/Source/DataSources/CorridorGeometryUpdater.js +404 -0
  611. package/Source/DataSources/CorridorGraphics.js +328 -0
  612. package/Source/DataSources/CustomDataSource.js +173 -0
  613. package/Source/DataSources/CylinderGeometryUpdater.js +373 -0
  614. package/Source/DataSources/CylinderGraphics.js +265 -0
  615. package/Source/DataSources/CzmlDataSource.js +5141 -0
  616. package/Source/DataSources/DataSource.js +121 -0
  617. package/Source/DataSources/DataSourceClock.js +165 -0
  618. package/Source/DataSources/DataSourceCollection.js +336 -0
  619. package/Source/DataSources/DataSourceDisplay.js +510 -0
  620. package/Source/DataSources/DynamicGeometryBatch.js +56 -0
  621. package/Source/DataSources/DynamicGeometryUpdater.js +274 -0
  622. package/Source/DataSources/EllipseGeometryUpdater.js +430 -0
  623. package/Source/DataSources/EllipseGraphics.js +357 -0
  624. package/Source/DataSources/EllipsoidGeometryUpdater.js +710 -0
  625. package/Source/DataSources/EllipsoidGraphics.js +323 -0
  626. package/Source/DataSources/Entity.js +752 -0
  627. package/Source/DataSources/EntityCluster.js +997 -0
  628. package/Source/DataSources/EntityCollection.js +440 -0
  629. package/Source/DataSources/EntityView.js +426 -0
  630. package/Source/DataSources/GeoJsonDataSource.js +1064 -0
  631. package/Source/DataSources/GeometryUpdater.js +545 -0
  632. package/Source/DataSources/GeometryVisualizer.js +620 -0
  633. package/Source/DataSources/GpxDataSource.js +1023 -0
  634. package/Source/DataSources/GridMaterialProperty.js +198 -0
  635. package/Source/DataSources/GroundGeometryUpdater.js +232 -0
  636. package/Source/DataSources/ImageMaterialProperty.js +166 -0
  637. package/Source/DataSources/KmlCamera.js +13 -0
  638. package/Source/DataSources/KmlDataSource.js +4326 -0
  639. package/Source/DataSources/KmlLookAt.js +12 -0
  640. package/Source/DataSources/KmlTour.js +176 -0
  641. package/Source/DataSources/KmlTourFlyTo.js +109 -0
  642. package/Source/DataSources/KmlTourWait.js +52 -0
  643. package/Source/DataSources/LabelGraphics.js +430 -0
  644. package/Source/DataSources/LabelVisualizer.js +360 -0
  645. package/Source/DataSources/MaterialProperty.js +105 -0
  646. package/Source/DataSources/ModelGraphics.js +447 -0
  647. package/Source/DataSources/ModelVisualizer.js +548 -0
  648. package/Source/DataSources/NodeTransformationProperty.js +144 -0
  649. package/Source/DataSources/PathGraphics.js +163 -0
  650. package/Source/DataSources/PathVisualizer.js +759 -0
  651. package/Source/DataSources/PlaneGeometryUpdater.js +384 -0
  652. package/Source/DataSources/PlaneGraphics.js +210 -0
  653. package/Source/DataSources/PointGraphics.js +221 -0
  654. package/Source/DataSources/PointVisualizer.js +426 -0
  655. package/Source/DataSources/PolygonGeometryUpdater.js +575 -0
  656. package/Source/DataSources/PolygonGraphics.js +400 -0
  657. package/Source/DataSources/PolylineArrowMaterialProperty.js +104 -0
  658. package/Source/DataSources/PolylineDashMaterialProperty.js +168 -0
  659. package/Source/DataSources/PolylineGeometryUpdater.js +886 -0
  660. package/Source/DataSources/PolylineGlowMaterialProperty.js +146 -0
  661. package/Source/DataSources/PolylineGraphics.js +248 -0
  662. package/Source/DataSources/PolylineOutlineMaterialProperty.js +152 -0
  663. package/Source/DataSources/PolylineVisualizer.js +414 -0
  664. package/Source/DataSources/PolylineVolumeGeometryUpdater.js +304 -0
  665. package/Source/DataSources/PolylineVolumeGraphics.js +237 -0
  666. package/Source/DataSources/PositionProperty.js +133 -0
  667. package/Source/DataSources/PositionPropertyArray.js +187 -0
  668. package/Source/DataSources/Property.js +138 -0
  669. package/Source/DataSources/PropertyArray.js +147 -0
  670. package/Source/DataSources/PropertyBag.js +275 -0
  671. package/Source/DataSources/RectangleGeometryUpdater.js +422 -0
  672. package/Source/DataSources/RectangleGraphics.js +329 -0
  673. package/Source/DataSources/ReferenceProperty.js +365 -0
  674. package/Source/DataSources/Rotation.js +156 -0
  675. package/Source/DataSources/SampledPositionProperty.js +325 -0
  676. package/Source/DataSources/SampledProperty.js +834 -0
  677. package/Source/DataSources/ScaledPositionProperty.js +97 -0
  678. package/Source/DataSources/StaticGeometryColorBatch.js +570 -0
  679. package/Source/DataSources/StaticGeometryPerMaterialBatch.js +488 -0
  680. package/Source/DataSources/StaticGroundGeometryColorBatch.js +395 -0
  681. package/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js +426 -0
  682. package/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js +434 -0
  683. package/Source/DataSources/StaticOutlineGeometryBatch.js +466 -0
  684. package/Source/DataSources/StripeMaterialProperty.js +187 -0
  685. package/Source/DataSources/StripeOrientation.js +19 -0
  686. package/Source/DataSources/TerrainOffsetProperty.js +246 -0
  687. package/Source/DataSources/TimeIntervalCollectionPositionProperty.js +152 -0
  688. package/Source/DataSources/TimeIntervalCollectionProperty.js +136 -0
  689. package/Source/DataSources/VelocityOrientationProperty.js +154 -0
  690. package/Source/DataSources/VelocityVectorProperty.js +216 -0
  691. package/Source/DataSources/Visualizer.js +61 -0
  692. package/Source/DataSources/WallGeometryUpdater.js +275 -0
  693. package/Source/DataSources/WallGraphics.js +244 -0
  694. package/Source/DataSources/createMaterialPropertyDescriptor.js +35 -0
  695. package/Source/DataSources/createPropertyDescriptor.js +72 -0
  696. package/Source/DataSources/createRawPropertyDescriptor.js +13 -0
  697. package/Source/DataSources/exportKml.js +1519 -0
  698. package/Source/DataSources/getElement.js +26 -0
  699. package/Source/DataSources/heightReferenceOnEntityPropertyChanged.js +47 -0
  700. package/Source/Renderer/AutomaticUniforms.js +1625 -0
  701. package/Source/Renderer/Buffer.js +420 -0
  702. package/Source/Renderer/BufferUsage.js +19 -0
  703. package/Source/Renderer/ClearCommand.js +102 -0
  704. package/Source/Renderer/ComputeCommand.js +119 -0
  705. package/Source/Renderer/ComputeEngine.js +135 -0
  706. package/Source/Renderer/Context.js +1601 -0
  707. package/Source/Renderer/ContextLimits.js +297 -0
  708. package/Source/Renderer/CubeMap.js +631 -0
  709. package/Source/Renderer/CubeMapFace.js +361 -0
  710. package/Source/Renderer/DrawCommand.js +610 -0
  711. package/Source/Renderer/Framebuffer.js +448 -0
  712. package/Source/Renderer/FramebufferManager.js +497 -0
  713. package/Source/Renderer/MipmapHint.js +19 -0
  714. package/Source/Renderer/MultisampleFramebuffer.js +115 -0
  715. package/Source/Renderer/Pass.js +26 -0
  716. package/Source/Renderer/PassState.js +57 -0
  717. package/Source/Renderer/PixelDatatype.js +98 -0
  718. package/Source/Renderer/RenderState.js +996 -0
  719. package/Source/Renderer/Renderbuffer.js +103 -0
  720. package/Source/Renderer/RenderbufferFormat.js +42 -0
  721. package/Source/Renderer/Sampler.js +109 -0
  722. package/Source/Renderer/ShaderBuilder.js +593 -0
  723. package/Source/Renderer/ShaderCache.js +291 -0
  724. package/Source/Renderer/ShaderDestination.js +51 -0
  725. package/Source/Renderer/ShaderFunction.js +66 -0
  726. package/Source/Renderer/ShaderProgram.js +612 -0
  727. package/Source/Renderer/ShaderSource.js +519 -0
  728. package/Source/Renderer/ShaderStruct.js +55 -0
  729. package/Source/Renderer/Texture.js +1035 -0
  730. package/Source/Renderer/TextureCache.js +81 -0
  731. package/Source/Renderer/TextureMagnificationFilter.js +41 -0
  732. package/Source/Renderer/TextureMinificationFilter.js +94 -0
  733. package/Source/Renderer/TextureWrap.js +19 -0
  734. package/Source/Renderer/UniformState.js +1710 -0
  735. package/Source/Renderer/VertexArray.js +853 -0
  736. package/Source/Renderer/VertexArrayFacade.js +514 -0
  737. package/Source/Renderer/createUniform.js +419 -0
  738. package/Source/Renderer/createUniformArray.js +637 -0
  739. package/Source/Renderer/freezeRenderState.js +30 -0
  740. package/Source/Renderer/loadCubeMap.js +93 -0
  741. package/Source/Renderer/modernizeShader.js +242 -0
  742. package/Source/Scene/AlphaMode.js +33 -0
  743. package/Source/Scene/Appearance.js +204 -0
  744. package/Source/Scene/ArcGisMapServerImageryProvider.js +905 -0
  745. package/Source/Scene/AttributeType.js +200 -0
  746. package/Source/Scene/AutoExposure.js +387 -0
  747. package/Source/Scene/Axis.js +111 -0
  748. package/Source/Scene/B3dmParser.js +174 -0
  749. package/Source/Scene/BatchTable.js +636 -0
  750. package/Source/Scene/BatchTableHierarchy.js +556 -0
  751. package/Source/Scene/BatchTexture.js +574 -0
  752. package/Source/Scene/Billboard.js +1552 -0
  753. package/Source/Scene/BillboardCollection.js +2417 -0
  754. package/Source/Scene/BingMapsImageryProvider.js +855 -0
  755. package/Source/Scene/BingMapsStyle.js +93 -0
  756. package/Source/Scene/BlendEquation.js +53 -0
  757. package/Source/Scene/BlendFunction.js +129 -0
  758. package/Source/Scene/BlendOption.js +28 -0
  759. package/Source/Scene/BlendingState.js +73 -0
  760. package/Source/Scene/BoxEmitter.js +75 -0
  761. package/Source/Scene/BrdfLutGenerator.js +75 -0
  762. package/Source/Scene/BufferLoader.js +146 -0
  763. package/Source/Scene/Camera.js +3951 -0
  764. package/Source/Scene/CameraEventAggregator.js +565 -0
  765. package/Source/Scene/CameraEventType.js +47 -0
  766. package/Source/Scene/CameraFlightPath.js +576 -0
  767. package/Source/Scene/Cesium3DContentGroup.js +44 -0
  768. package/Source/Scene/Cesium3DTile.js +2115 -0
  769. package/Source/Scene/Cesium3DTileBatchTable.js +1176 -0
  770. package/Source/Scene/Cesium3DTileColorBlendMode.js +52 -0
  771. package/Source/Scene/Cesium3DTileContent.js +397 -0
  772. package/Source/Scene/Cesium3DTileContentFactory.js +104 -0
  773. package/Source/Scene/Cesium3DTileContentState.js +12 -0
  774. package/Source/Scene/Cesium3DTileContentType.js +160 -0
  775. package/Source/Scene/Cesium3DTileFeature.js +444 -0
  776. package/Source/Scene/Cesium3DTileFeatureTable.js +132 -0
  777. package/Source/Scene/Cesium3DTileOptimizationHint.js +13 -0
  778. package/Source/Scene/Cesium3DTileOptimizations.js +115 -0
  779. package/Source/Scene/Cesium3DTilePass.js +82 -0
  780. package/Source/Scene/Cesium3DTilePassState.js +52 -0
  781. package/Source/Scene/Cesium3DTilePointFeature.js +864 -0
  782. package/Source/Scene/Cesium3DTileRefine.js +29 -0
  783. package/Source/Scene/Cesium3DTileStyle.js +1475 -0
  784. package/Source/Scene/Cesium3DTileStyleEngine.js +78 -0
  785. package/Source/Scene/Cesium3DTileset.js +3158 -0
  786. package/Source/Scene/Cesium3DTilesetCache.js +82 -0
  787. package/Source/Scene/Cesium3DTilesetHeatmap.js +165 -0
  788. package/Source/Scene/Cesium3DTilesetMetadata.js +199 -0
  789. package/Source/Scene/Cesium3DTilesetMostDetailedTraversal.js +144 -0
  790. package/Source/Scene/Cesium3DTilesetStatistics.js +129 -0
  791. package/Source/Scene/Cesium3DTilesetTraversal.js +773 -0
  792. package/Source/Scene/CircleEmitter.js +62 -0
  793. package/Source/Scene/ClassificationPrimitive.js +1433 -0
  794. package/Source/Scene/ClassificationType.js +35 -0
  795. package/Source/Scene/ClippingPlane.js +184 -0
  796. package/Source/Scene/ClippingPlaneCollection.js +771 -0
  797. package/Source/Scene/CloudCollection.js +1050 -0
  798. package/Source/Scene/CloudType.js +33 -0
  799. package/Source/Scene/ColorBlendMode.js +33 -0
  800. package/Source/Scene/Composite3DTileContent.js +346 -0
  801. package/Source/Scene/ConditionsExpression.js +218 -0
  802. package/Source/Scene/ConeEmitter.js +62 -0
  803. package/Source/Scene/ContentMetadata.js +184 -0
  804. package/Source/Scene/CreditDisplay.js +610 -0
  805. package/Source/Scene/CullFace.js +33 -0
  806. package/Source/Scene/CumulusCloud.js +353 -0
  807. package/Source/Scene/DebugAppearance.js +268 -0
  808. package/Source/Scene/DebugCameraPrimitive.js +257 -0
  809. package/Source/Scene/DebugInspector.js +151 -0
  810. package/Source/Scene/DebugModelMatrixPrimitive.js +222 -0
  811. package/Source/Scene/DepthFunction.js +73 -0
  812. package/Source/Scene/DepthPlane.js +245 -0
  813. package/Source/Scene/DerivedCommand.js +433 -0
  814. package/Source/Scene/DeviceOrientationCameraController.js +120 -0
  815. package/Source/Scene/DirectionalLight.js +50 -0
  816. package/Source/Scene/DiscardEmptyTileImagePolicy.js +54 -0
  817. package/Source/Scene/DiscardMissingTileImagePolicy.js +148 -0
  818. package/Source/Scene/DracoLoader.js +76 -0
  819. package/Source/Scene/EllipsoidPrimitive.js +511 -0
  820. package/Source/Scene/EllipsoidSurfaceAppearance.js +282 -0
  821. package/Source/Scene/Empty3DTileContent.js +151 -0
  822. package/Source/Scene/Expression.js +2232 -0
  823. package/Source/Scene/ExpressionNodeType.js +25 -0
  824. package/Source/Scene/Fog.js +205 -0
  825. package/Source/Scene/FrameRateMonitor.js +384 -0
  826. package/Source/Scene/FrameState.js +419 -0
  827. package/Source/Scene/FrustumCommands.js +30 -0
  828. package/Source/Scene/Geometry3DTileContent.js +526 -0
  829. package/Source/Scene/GetFeatureInfoFormat.js +395 -0
  830. package/Source/Scene/Globe.js +1121 -0
  831. package/Source/Scene/GlobeDepth.js +378 -0
  832. package/Source/Scene/GlobeSurfaceShaderSet.js +413 -0
  833. package/Source/Scene/GlobeSurfaceTile.js +997 -0
  834. package/Source/Scene/GlobeSurfaceTileProvider.js +2818 -0
  835. package/Source/Scene/GlobeTranslucency.js +239 -0
  836. package/Source/Scene/GlobeTranslucencyFramebuffer.js +201 -0
  837. package/Source/Scene/GlobeTranslucencyState.js +1117 -0
  838. package/Source/Scene/GltfBufferViewLoader.js +268 -0
  839. package/Source/Scene/GltfDracoLoader.js +250 -0
  840. package/Source/Scene/GltfImageLoader.js +327 -0
  841. package/Source/Scene/GltfIndexBufferLoader.js +429 -0
  842. package/Source/Scene/GltfJsonLoader.js +301 -0
  843. package/Source/Scene/GltfLoader.js +2663 -0
  844. package/Source/Scene/GltfLoaderUtil.js +201 -0
  845. package/Source/Scene/GltfPipeline/ForEach.js +424 -0
  846. package/Source/Scene/GltfPipeline/addBuffer.js +30 -0
  847. package/Source/Scene/GltfPipeline/addDefaults.js +236 -0
  848. package/Source/Scene/GltfPipeline/addExtensionsRequired.js +24 -0
  849. package/Source/Scene/GltfPipeline/addExtensionsUsed.js +22 -0
  850. package/Source/Scene/GltfPipeline/addPipelineExtras.js +36 -0
  851. package/Source/Scene/GltfPipeline/addToArray.js +25 -0
  852. package/Source/Scene/GltfPipeline/findAccessorMinMax.js +71 -0
  853. package/Source/Scene/GltfPipeline/forEachTextureInMaterial.js +139 -0
  854. package/Source/Scene/GltfPipeline/getAccessorByteStride.js +29 -0
  855. package/Source/Scene/GltfPipeline/getComponentReader.js +147 -0
  856. package/Source/Scene/GltfPipeline/moveTechniqueRenderStates.js +138 -0
  857. package/Source/Scene/GltfPipeline/moveTechniquesToExtension.js +145 -0
  858. package/Source/Scene/GltfPipeline/numberOfComponentsForType.js +29 -0
  859. package/Source/Scene/GltfPipeline/parseGlb.js +122 -0
  860. package/Source/Scene/GltfPipeline/readAccessorPacked.js +54 -0
  861. package/Source/Scene/GltfPipeline/removeExtension.js +64 -0
  862. package/Source/Scene/GltfPipeline/removeExtensionsRequired.js +24 -0
  863. package/Source/Scene/GltfPipeline/removeExtensionsUsed.js +26 -0
  864. package/Source/Scene/GltfPipeline/removePipelineExtras.js +42 -0
  865. package/Source/Scene/GltfPipeline/removeUnusedElements.js +881 -0
  866. package/Source/Scene/GltfPipeline/updateAccessorComponentTypes.js +53 -0
  867. package/Source/Scene/GltfPipeline/updateVersion.js +1151 -0
  868. package/Source/Scene/GltfPipeline/usesExtension.js +18 -0
  869. package/Source/Scene/GltfStructuralMetadataLoader.js +504 -0
  870. package/Source/Scene/GltfTextureLoader.js +383 -0
  871. package/Source/Scene/GltfVertexBufferLoader.js +470 -0
  872. package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +758 -0
  873. package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +756 -0
  874. package/Source/Scene/GridImageryProvider.js +436 -0
  875. package/Source/Scene/GroundPolylinePrimitive.js +926 -0
  876. package/Source/Scene/GroundPrimitive.js +1040 -0
  877. package/Source/Scene/GroupMetadata.js +203 -0
  878. package/Source/Scene/HeightReference.js +28 -0
  879. package/Source/Scene/HorizontalOrigin.js +41 -0
  880. package/Source/Scene/I3SDataProvider.js +668 -0
  881. package/Source/Scene/I3SFeature.js +63 -0
  882. package/Source/Scene/I3SField.js +255 -0
  883. package/Source/Scene/I3SGeometry.js +409 -0
  884. package/Source/Scene/I3SLayer.js +365 -0
  885. package/Source/Scene/I3SNode.js +816 -0
  886. package/Source/Scene/I3dmParser.js +141 -0
  887. package/Source/Scene/ImageBasedLighting.js +510 -0
  888. package/Source/Scene/Imagery.js +120 -0
  889. package/Source/Scene/ImageryLayer.js +1541 -0
  890. package/Source/Scene/ImageryLayerCollection.js +621 -0
  891. package/Source/Scene/ImageryLayerFeatureInfo.js +112 -0
  892. package/Source/Scene/ImageryProvider.js +387 -0
  893. package/Source/Scene/ImageryState.js +14 -0
  894. package/Source/Scene/Implicit3DTileContent.js +1154 -0
  895. package/Source/Scene/ImplicitAvailabilityBitstream.js +137 -0
  896. package/Source/Scene/ImplicitMetadataView.js +178 -0
  897. package/Source/Scene/ImplicitSubdivisionScheme.js +48 -0
  898. package/Source/Scene/ImplicitSubtree.js +1146 -0
  899. package/Source/Scene/ImplicitSubtreeMetadata.js +191 -0
  900. package/Source/Scene/ImplicitTileCoordinates.js +647 -0
  901. package/Source/Scene/ImplicitTileset.js +263 -0
  902. package/Source/Scene/InstanceAttributeSemantic.js +79 -0
  903. package/Source/Scene/InvertClassification.js +382 -0
  904. package/Source/Scene/IonImageryProvider.js +555 -0
  905. package/Source/Scene/IonWorldImageryStyle.js +33 -0
  906. package/Source/Scene/JobScheduler.js +199 -0
  907. package/Source/Scene/JobType.js +10 -0
  908. package/Source/Scene/JsonMetadataTable.js +114 -0
  909. package/Source/Scene/Label.js +1588 -0
  910. package/Source/Scene/LabelCollection.js +994 -0
  911. package/Source/Scene/LabelStyle.js +33 -0
  912. package/Source/Scene/Light.js +34 -0
  913. package/Source/Scene/MapMode2D.js +23 -0
  914. package/Source/Scene/MapboxImageryProvider.js +448 -0
  915. package/Source/Scene/MapboxStyleImageryProvider.js +457 -0
  916. package/Source/Scene/Material.js +1742 -0
  917. package/Source/Scene/MaterialAppearance.js +334 -0
  918. package/Source/Scene/MetadataClass.js +167 -0
  919. package/Source/Scene/MetadataClassProperty.js +1104 -0
  920. package/Source/Scene/MetadataComponentType.js +448 -0
  921. package/Source/Scene/MetadataEntity.js +425 -0
  922. package/Source/Scene/MetadataEnum.js +186 -0
  923. package/Source/Scene/MetadataEnumValue.js +97 -0
  924. package/Source/Scene/MetadataSchema.js +173 -0
  925. package/Source/Scene/MetadataSchemaLoader.js +145 -0
  926. package/Source/Scene/MetadataSemantic.js +145 -0
  927. package/Source/Scene/MetadataTable.js +357 -0
  928. package/Source/Scene/MetadataTableProperty.js +859 -0
  929. package/Source/Scene/MetadataType.js +208 -0
  930. package/Source/Scene/Model/AlphaPipelineStage.js +52 -0
  931. package/Source/Scene/Model/B3dmLoader.js +379 -0
  932. package/Source/Scene/Model/BatchTexturePipelineStage.js +72 -0
  933. package/Source/Scene/Model/CPUStylingPipelineStage.js +77 -0
  934. package/Source/Scene/Model/ClassificationModelDrawCommand.js +533 -0
  935. package/Source/Scene/Model/ClassificationPipelineStage.js +132 -0
  936. package/Source/Scene/Model/CustomShader.js +473 -0
  937. package/Source/Scene/Model/CustomShaderMode.js +40 -0
  938. package/Source/Scene/Model/CustomShaderPipelineStage.js +654 -0
  939. package/Source/Scene/Model/CustomShaderTranslucencyMode.js +35 -0
  940. package/Source/Scene/Model/DequantizationPipelineStage.js +178 -0
  941. package/Source/Scene/Model/FeatureIdPipelineStage.js +504 -0
  942. package/Source/Scene/Model/GeoJsonLoader.js +722 -0
  943. package/Source/Scene/Model/GeometryPipelineStage.js +558 -0
  944. package/Source/Scene/Model/I3dmLoader.js +909 -0
  945. package/Source/Scene/Model/ImageBasedLightingPipelineStage.js +147 -0
  946. package/Source/Scene/Model/InstancingPipelineStage.js +1043 -0
  947. package/Source/Scene/Model/LightingModel.js +30 -0
  948. package/Source/Scene/Model/LightingPipelineStage.js +75 -0
  949. package/Source/Scene/Model/MaterialPipelineStage.js +510 -0
  950. package/Source/Scene/Model/MetadataPipelineStage.js +638 -0
  951. package/Source/Scene/Model/Model.js +2847 -0
  952. package/Source/Scene/Model/Model3DTileContent.js +451 -0
  953. package/Source/Scene/Model/ModelAlphaOptions.js +26 -0
  954. package/Source/Scene/Model/ModelAnimation.js +422 -0
  955. package/Source/Scene/Model/ModelAnimationChannel.js +293 -0
  956. package/Source/Scene/Model/ModelAnimationCollection.js +553 -0
  957. package/Source/Scene/Model/ModelArticulation.js +214 -0
  958. package/Source/Scene/Model/ModelArticulationStage.js +261 -0
  959. package/Source/Scene/Model/ModelClippingPlanesPipelineStage.js +126 -0
  960. package/Source/Scene/Model/ModelColorPipelineStage.js +99 -0
  961. package/Source/Scene/Model/ModelDrawCommand.js +864 -0
  962. package/Source/Scene/Model/ModelFeature.js +229 -0
  963. package/Source/Scene/Model/ModelFeatureTable.js +322 -0
  964. package/Source/Scene/Model/ModelLightingOptions.js +29 -0
  965. package/Source/Scene/Model/ModelMatrixUpdateStage.js +108 -0
  966. package/Source/Scene/Model/ModelNode.js +125 -0
  967. package/Source/Scene/Model/ModelRenderResources.js +106 -0
  968. package/Source/Scene/Model/ModelRuntimeNode.js +648 -0
  969. package/Source/Scene/Model/ModelRuntimePrimitive.js +340 -0
  970. package/Source/Scene/Model/ModelSceneGraph.js +968 -0
  971. package/Source/Scene/Model/ModelSilhouettePipelineStage.js +109 -0
  972. package/Source/Scene/Model/ModelSkin.js +180 -0
  973. package/Source/Scene/Model/ModelSplitterPipelineStage.js +66 -0
  974. package/Source/Scene/Model/ModelStatistics.js +197 -0
  975. package/Source/Scene/Model/ModelType.js +94 -0
  976. package/Source/Scene/Model/ModelUtility.js +386 -0
  977. package/Source/Scene/Model/MorphTargetsPipelineStage.js +249 -0
  978. package/Source/Scene/Model/NodeRenderResources.js +160 -0
  979. package/Source/Scene/Model/NodeStatisticsPipelineStage.js +75 -0
  980. package/Source/Scene/Model/PickingPipelineStage.js +219 -0
  981. package/Source/Scene/Model/PntsLoader.js +717 -0
  982. package/Source/Scene/Model/PointCloudStylingPipelineStage.js +396 -0
  983. package/Source/Scene/Model/PrimitiveOutlineGenerator.js +689 -0
  984. package/Source/Scene/Model/PrimitiveOutlinePipelineStage.js +99 -0
  985. package/Source/Scene/Model/PrimitiveRenderResources.js +297 -0
  986. package/Source/Scene/Model/PrimitiveStatisticsPipelineStage.js +253 -0
  987. package/Source/Scene/Model/SceneMode2DPipelineStage.js +301 -0
  988. package/Source/Scene/Model/SelectedFeatureIdPipelineStage.js +185 -0
  989. package/Source/Scene/Model/SkinningPipelineStage.js +118 -0
  990. package/Source/Scene/Model/StyleCommandsNeeded.js +29 -0
  991. package/Source/Scene/Model/TextureManager.js +244 -0
  992. package/Source/Scene/Model/TextureUniform.js +74 -0
  993. package/Source/Scene/Model/TilesetPipelineStage.js +73 -0
  994. package/Source/Scene/Model/UniformType.js +124 -0
  995. package/Source/Scene/Model/VaryingType.js +61 -0
  996. package/Source/Scene/Model/WireframePipelineStage.js +118 -0
  997. package/Source/Scene/Model/buildDrawCommand.js +153 -0
  998. package/Source/Scene/ModelAnimationLoop.js +33 -0
  999. package/Source/Scene/ModelAnimationState.js +9 -0
  1000. package/Source/Scene/ModelComponents.js +1466 -0
  1001. package/Source/Scene/Moon.js +174 -0
  1002. package/Source/Scene/Multiple3DTileContent.js +674 -0
  1003. package/Source/Scene/NeverTileDiscardPolicy.js +28 -0
  1004. package/Source/Scene/OIT.js +893 -0
  1005. package/Source/Scene/OctahedralProjectedCubeMap.js +456 -0
  1006. package/Source/Scene/OpenStreetMapImageryProvider.js +124 -0
  1007. package/Source/Scene/OrderedGroundPrimitiveCollection.js +219 -0
  1008. package/Source/Scene/Particle.js +155 -0
  1009. package/Source/Scene/ParticleBurst.js +51 -0
  1010. package/Source/Scene/ParticleEmitter.js +36 -0
  1011. package/Source/Scene/ParticleSystem.js +910 -0
  1012. package/Source/Scene/PerInstanceColorAppearance.js +296 -0
  1013. package/Source/Scene/PerformanceDisplay.js +120 -0
  1014. package/Source/Scene/PickDepth.js +105 -0
  1015. package/Source/Scene/PickDepthFramebuffer.js +79 -0
  1016. package/Source/Scene/PickFramebuffer.js +125 -0
  1017. package/Source/Scene/Picking.js +1316 -0
  1018. package/Source/Scene/PntsParser.js +480 -0
  1019. package/Source/Scene/PointCloud.js +1425 -0
  1020. package/Source/Scene/PointCloudEyeDomeLighting.js +279 -0
  1021. package/Source/Scene/PointCloudShading.js +113 -0
  1022. package/Source/Scene/PointPrimitive.js +668 -0
  1023. package/Source/Scene/PointPrimitiveCollection.js +1217 -0
  1024. package/Source/Scene/Polyline.js +431 -0
  1025. package/Source/Scene/PolylineCollection.js +1962 -0
  1026. package/Source/Scene/PolylineColorAppearance.js +224 -0
  1027. package/Source/Scene/PolylineMaterialAppearance.js +236 -0
  1028. package/Source/Scene/PostProcessStage.js +1023 -0
  1029. package/Source/Scene/PostProcessStageCollection.js +888 -0
  1030. package/Source/Scene/PostProcessStageComposite.js +362 -0
  1031. package/Source/Scene/PostProcessStageLibrary.js +838 -0
  1032. package/Source/Scene/PostProcessStageSampleMode.js +22 -0
  1033. package/Source/Scene/PostProcessStageTextureCache.js +454 -0
  1034. package/Source/Scene/Primitive.js +2536 -0
  1035. package/Source/Scene/PrimitiveCollection.js +467 -0
  1036. package/Source/Scene/PrimitiveLoadPlan.js +280 -0
  1037. package/Source/Scene/PrimitivePipeline.js +855 -0
  1038. package/Source/Scene/PrimitiveState.js +13 -0
  1039. package/Source/Scene/PropertyAttribute.js +160 -0
  1040. package/Source/Scene/PropertyAttributeProperty.js +165 -0
  1041. package/Source/Scene/PropertyTable.js +541 -0
  1042. package/Source/Scene/PropertyTexture.js +162 -0
  1043. package/Source/Scene/PropertyTextureProperty.js +263 -0
  1044. package/Source/Scene/QuadtreeOccluders.js +30 -0
  1045. package/Source/Scene/QuadtreePrimitive.js +1546 -0
  1046. package/Source/Scene/QuadtreeTile.js +539 -0
  1047. package/Source/Scene/QuadtreeTileLoadState.js +39 -0
  1048. package/Source/Scene/QuadtreeTileProvider.js +226 -0
  1049. package/Source/Scene/ResourceCache.js +810 -0
  1050. package/Source/Scene/ResourceCacheKey.js +567 -0
  1051. package/Source/Scene/ResourceCacheStatistics.js +183 -0
  1052. package/Source/Scene/ResourceLoader.js +139 -0
  1053. package/Source/Scene/ResourceLoaderState.js +48 -0
  1054. package/Source/Scene/SDFSettings.js +39 -0
  1055. package/Source/Scene/Scene.js +4498 -0
  1056. package/Source/Scene/SceneFramebuffer.js +106 -0
  1057. package/Source/Scene/SceneMode.js +56 -0
  1058. package/Source/Scene/SceneTransforms.js +466 -0
  1059. package/Source/Scene/SceneTransitioner.js +1111 -0
  1060. package/Source/Scene/ScreenSpaceCameraController.js +2933 -0
  1061. package/Source/Scene/ShadowMap.js +1958 -0
  1062. package/Source/Scene/ShadowMapShader.js +395 -0
  1063. package/Source/Scene/ShadowMode.js +78 -0
  1064. package/Source/Scene/ShadowVolumeAppearance.js +937 -0
  1065. package/Source/Scene/SingleTileImageryProvider.js +501 -0
  1066. package/Source/Scene/SkyAtmosphere.js +402 -0
  1067. package/Source/Scene/SkyBox.js +252 -0
  1068. package/Source/Scene/SphereEmitter.js +66 -0
  1069. package/Source/Scene/SplitDirection.js +34 -0
  1070. package/Source/Scene/Splitter.js +49 -0
  1071. package/Source/Scene/StencilConstants.js +37 -0
  1072. package/Source/Scene/StencilFunction.js +73 -0
  1073. package/Source/Scene/StencilOperation.js +73 -0
  1074. package/Source/Scene/StructuralMetadata.js +243 -0
  1075. package/Source/Scene/StyleExpression.js +86 -0
  1076. package/Source/Scene/Sun.js +359 -0
  1077. package/Source/Scene/SunLight.js +31 -0
  1078. package/Source/Scene/SunPostProcess.js +288 -0
  1079. package/Source/Scene/SupportedImageFormats.js +18 -0
  1080. package/Source/Scene/TerrainFillMesh.js +2220 -0
  1081. package/Source/Scene/TerrainState.js +13 -0
  1082. package/Source/Scene/TextureAtlas.js +556 -0
  1083. package/Source/Scene/TileBoundingRegion.js +490 -0
  1084. package/Source/Scene/TileBoundingS2Cell.js +703 -0
  1085. package/Source/Scene/TileBoundingSphere.js +167 -0
  1086. package/Source/Scene/TileBoundingVolume.js +68 -0
  1087. package/Source/Scene/TileCoordinatesImageryProvider.js +379 -0
  1088. package/Source/Scene/TileDiscardPolicy.js +34 -0
  1089. package/Source/Scene/TileImagery.js +130 -0
  1090. package/Source/Scene/TileMapServiceImageryProvider.js +403 -0
  1091. package/Source/Scene/TileMetadata.js +184 -0
  1092. package/Source/Scene/TileOrientedBoundingBox.js +219 -0
  1093. package/Source/Scene/TileReplacementQueue.js +119 -0
  1094. package/Source/Scene/TileSelectionResult.js +80 -0
  1095. package/Source/Scene/TileState.js +10 -0
  1096. package/Source/Scene/Tileset3DTileContent.js +158 -0
  1097. package/Source/Scene/TilesetMetadata.js +186 -0
  1098. package/Source/Scene/TimeDynamicImagery.js +308 -0
  1099. package/Source/Scene/TimeDynamicPointCloud.js +819 -0
  1100. package/Source/Scene/Tonemapper.js +52 -0
  1101. package/Source/Scene/TranslucentTileClassification.js +524 -0
  1102. package/Source/Scene/TweenCollection.js +588 -0
  1103. package/Source/Scene/UrlTemplateImageryProvider.js +1240 -0
  1104. package/Source/Scene/Vector3DTileBatch.js +37 -0
  1105. package/Source/Scene/Vector3DTileClampedPolylines.js +772 -0
  1106. package/Source/Scene/Vector3DTileContent.js +774 -0
  1107. package/Source/Scene/Vector3DTileGeometry.js +490 -0
  1108. package/Source/Scene/Vector3DTilePoints.js +529 -0
  1109. package/Source/Scene/Vector3DTilePolygons.js +479 -0
  1110. package/Source/Scene/Vector3DTilePolylines.js +676 -0
  1111. package/Source/Scene/Vector3DTilePrimitive.js +1282 -0
  1112. package/Source/Scene/VertexAttributeSemantic.js +273 -0
  1113. package/Source/Scene/VerticalOrigin.js +49 -0
  1114. package/Source/Scene/View.js +431 -0
  1115. package/Source/Scene/ViewportQuad.js +182 -0
  1116. package/Source/Scene/WebMapServiceImageryProvider.js +768 -0
  1117. package/Source/Scene/WebMapTileServiceImageryProvider.js +711 -0
  1118. package/Source/Scene/computeFlyToLocationForRectangle.js +69 -0
  1119. package/Source/Scene/createBillboardPointCallback.js +70 -0
  1120. package/Source/Scene/createElevationBandMaterial.js +585 -0
  1121. package/Source/Scene/createOsmBuildings.js +75 -0
  1122. package/Source/Scene/createTangentSpaceDebugPrimitive.js +116 -0
  1123. package/Source/Scene/createWorldImagery.js +38 -0
  1124. package/Source/Scene/findContentMetadata.js +54 -0
  1125. package/Source/Scene/findGroupMetadata.js +39 -0
  1126. package/Source/Scene/findTileMetadata.js +56 -0
  1127. package/Source/Scene/getBinaryAccessor.js +56 -0
  1128. package/Source/Scene/getClipAndStyleCode.js +34 -0
  1129. package/Source/Scene/getClippingFunction.js +163 -0
  1130. package/Source/Scene/hasExtension.js +19 -0
  1131. package/Source/Scene/parseBatchTable.js +439 -0
  1132. package/Source/Scene/parseBoundingVolumeSemantics.js +121 -0
  1133. package/Source/Scene/parseFeatureMetadataLegacy.js +139 -0
  1134. package/Source/Scene/parseStructuralMetadata.js +102 -0
  1135. package/Source/Scene/preprocess3DTileContent.js +94 -0
  1136. package/Source/Shaders/AdjustTranslucentFS.glsl +24 -0
  1137. package/Source/Shaders/AdjustTranslucentFS.js +26 -0
  1138. package/Source/Shaders/Appearances/AllMaterialAppearanceFS.glsl +29 -0
  1139. package/Source/Shaders/Appearances/AllMaterialAppearanceFS.js +31 -0
  1140. package/Source/Shaders/Appearances/AllMaterialAppearanceVS.glsl +26 -0
  1141. package/Source/Shaders/Appearances/AllMaterialAppearanceVS.js +28 -0
  1142. package/Source/Shaders/Appearances/BasicMaterialAppearanceFS.glsl +23 -0
  1143. package/Source/Shaders/Appearances/BasicMaterialAppearanceFS.js +25 -0
  1144. package/Source/Shaders/Appearances/BasicMaterialAppearanceVS.glsl +17 -0
  1145. package/Source/Shaders/Appearances/BasicMaterialAppearanceVS.js +19 -0
  1146. package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceFS.glsl +33 -0
  1147. package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceFS.js +35 -0
  1148. package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceVS.glsl +19 -0
  1149. package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceVS.js +21 -0
  1150. package/Source/Shaders/Appearances/PerInstanceColorAppearanceFS.glsl +24 -0
  1151. package/Source/Shaders/Appearances/PerInstanceColorAppearanceFS.js +26 -0
  1152. package/Source/Shaders/Appearances/PerInstanceColorAppearanceVS.glsl +20 -0
  1153. package/Source/Shaders/Appearances/PerInstanceColorAppearanceVS.js +22 -0
  1154. package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceFS.glsl +6 -0
  1155. package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceFS.js +8 -0
  1156. package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceVS.glsl +15 -0
  1157. package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceVS.js +17 -0
  1158. package/Source/Shaders/Appearances/PolylineColorAppearanceVS.glsl +28 -0
  1159. package/Source/Shaders/Appearances/PolylineColorAppearanceVS.js +30 -0
  1160. package/Source/Shaders/Appearances/PolylineMaterialAppearanceVS.glsl +33 -0
  1161. package/Source/Shaders/Appearances/PolylineMaterialAppearanceVS.js +35 -0
  1162. package/Source/Shaders/Appearances/TexturedMaterialAppearanceFS.glsl +25 -0
  1163. package/Source/Shaders/Appearances/TexturedMaterialAppearanceFS.js +27 -0
  1164. package/Source/Shaders/Appearances/TexturedMaterialAppearanceVS.glsl +20 -0
  1165. package/Source/Shaders/Appearances/TexturedMaterialAppearanceVS.js +22 -0
  1166. package/Source/Shaders/AtmosphereCommon.glsl +152 -0
  1167. package/Source/Shaders/AtmosphereCommon.js +154 -0
  1168. package/Source/Shaders/BillboardCollectionFS.glsl +208 -0
  1169. package/Source/Shaders/BillboardCollectionFS.js +210 -0
  1170. package/Source/Shaders/BillboardCollectionVS.glsl +434 -0
  1171. package/Source/Shaders/BillboardCollectionVS.js +436 -0
  1172. package/Source/Shaders/BrdfLutGeneratorFS.glsl +83 -0
  1173. package/Source/Shaders/BrdfLutGeneratorFS.js +85 -0
  1174. package/Source/Shaders/Builtin/Constants/degreesPerRadian.glsl +16 -0
  1175. package/Source/Shaders/Builtin/Constants/degreesPerRadian.js +18 -0
  1176. package/Source/Shaders/Builtin/Constants/depthRange.glsl +14 -0
  1177. package/Source/Shaders/Builtin/Constants/depthRange.js +16 -0
  1178. package/Source/Shaders/Builtin/Constants/epsilon1.glsl +7 -0
  1179. package/Source/Shaders/Builtin/Constants/epsilon1.js +9 -0
  1180. package/Source/Shaders/Builtin/Constants/epsilon2.glsl +7 -0
  1181. package/Source/Shaders/Builtin/Constants/epsilon2.js +9 -0
  1182. package/Source/Shaders/Builtin/Constants/epsilon3.glsl +7 -0
  1183. package/Source/Shaders/Builtin/Constants/epsilon3.js +9 -0
  1184. package/Source/Shaders/Builtin/Constants/epsilon4.glsl +7 -0
  1185. package/Source/Shaders/Builtin/Constants/epsilon4.js +9 -0
  1186. package/Source/Shaders/Builtin/Constants/epsilon5.glsl +7 -0
  1187. package/Source/Shaders/Builtin/Constants/epsilon5.js +9 -0
  1188. package/Source/Shaders/Builtin/Constants/epsilon6.glsl +7 -0
  1189. package/Source/Shaders/Builtin/Constants/epsilon6.js +9 -0
  1190. package/Source/Shaders/Builtin/Constants/epsilon7.glsl +7 -0
  1191. package/Source/Shaders/Builtin/Constants/epsilon7.js +9 -0
  1192. package/Source/Shaders/Builtin/Constants/infinity.glsl +7 -0
  1193. package/Source/Shaders/Builtin/Constants/infinity.js +9 -0
  1194. package/Source/Shaders/Builtin/Constants/oneOverPi.glsl +16 -0
  1195. package/Source/Shaders/Builtin/Constants/oneOverPi.js +18 -0
  1196. package/Source/Shaders/Builtin/Constants/oneOverTwoPi.glsl +16 -0
  1197. package/Source/Shaders/Builtin/Constants/oneOverTwoPi.js +18 -0
  1198. package/Source/Shaders/Builtin/Constants/passCesium3DTile.glsl +9 -0
  1199. package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +11 -0
  1200. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.glsl +9 -0
  1201. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +11 -0
  1202. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.glsl +9 -0
  1203. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +11 -0
  1204. package/Source/Shaders/Builtin/Constants/passClassification.glsl +9 -0
  1205. package/Source/Shaders/Builtin/Constants/passClassification.js +11 -0
  1206. package/Source/Shaders/Builtin/Constants/passCompute.glsl +9 -0
  1207. package/Source/Shaders/Builtin/Constants/passCompute.js +11 -0
  1208. package/Source/Shaders/Builtin/Constants/passEnvironment.glsl +9 -0
  1209. package/Source/Shaders/Builtin/Constants/passEnvironment.js +11 -0
  1210. package/Source/Shaders/Builtin/Constants/passGlobe.glsl +9 -0
  1211. package/Source/Shaders/Builtin/Constants/passGlobe.js +11 -0
  1212. package/Source/Shaders/Builtin/Constants/passOpaque.glsl +9 -0
  1213. package/Source/Shaders/Builtin/Constants/passOpaque.js +11 -0
  1214. package/Source/Shaders/Builtin/Constants/passOverlay.glsl +9 -0
  1215. package/Source/Shaders/Builtin/Constants/passOverlay.js +11 -0
  1216. package/Source/Shaders/Builtin/Constants/passTerrainClassification.glsl +9 -0
  1217. package/Source/Shaders/Builtin/Constants/passTerrainClassification.js +11 -0
  1218. package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +9 -0
  1219. package/Source/Shaders/Builtin/Constants/passTranslucent.js +11 -0
  1220. package/Source/Shaders/Builtin/Constants/pi.glsl +16 -0
  1221. package/Source/Shaders/Builtin/Constants/pi.js +18 -0
  1222. package/Source/Shaders/Builtin/Constants/piOverFour.glsl +16 -0
  1223. package/Source/Shaders/Builtin/Constants/piOverFour.js +18 -0
  1224. package/Source/Shaders/Builtin/Constants/piOverSix.glsl +16 -0
  1225. package/Source/Shaders/Builtin/Constants/piOverSix.js +18 -0
  1226. package/Source/Shaders/Builtin/Constants/piOverThree.glsl +16 -0
  1227. package/Source/Shaders/Builtin/Constants/piOverThree.js +18 -0
  1228. package/Source/Shaders/Builtin/Constants/piOverTwo.glsl +16 -0
  1229. package/Source/Shaders/Builtin/Constants/piOverTwo.js +18 -0
  1230. package/Source/Shaders/Builtin/Constants/radiansPerDegree.glsl +16 -0
  1231. package/Source/Shaders/Builtin/Constants/radiansPerDegree.js +18 -0
  1232. package/Source/Shaders/Builtin/Constants/sceneMode2D.glsl +11 -0
  1233. package/Source/Shaders/Builtin/Constants/sceneMode2D.js +13 -0
  1234. package/Source/Shaders/Builtin/Constants/sceneMode3D.glsl +11 -0
  1235. package/Source/Shaders/Builtin/Constants/sceneMode3D.js +13 -0
  1236. package/Source/Shaders/Builtin/Constants/sceneModeColumbusView.glsl +11 -0
  1237. package/Source/Shaders/Builtin/Constants/sceneModeColumbusView.js +13 -0
  1238. package/Source/Shaders/Builtin/Constants/sceneModeMorphing.glsl +11 -0
  1239. package/Source/Shaders/Builtin/Constants/sceneModeMorphing.js +13 -0
  1240. package/Source/Shaders/Builtin/Constants/solarRadius.glsl +13 -0
  1241. package/Source/Shaders/Builtin/Constants/solarRadius.js +15 -0
  1242. package/Source/Shaders/Builtin/Constants/threePiOver2.glsl +16 -0
  1243. package/Source/Shaders/Builtin/Constants/threePiOver2.js +18 -0
  1244. package/Source/Shaders/Builtin/Constants/twoPi.glsl +16 -0
  1245. package/Source/Shaders/Builtin/Constants/twoPi.js +18 -0
  1246. package/Source/Shaders/Builtin/Constants/webMercatorMaxLatitude.glsl +16 -0
  1247. package/Source/Shaders/Builtin/Constants/webMercatorMaxLatitude.js +18 -0
  1248. package/Source/Shaders/Builtin/CzmBuiltins.js +262 -0
  1249. package/Source/Shaders/Builtin/Functions/HSBToRGB.glsl +24 -0
  1250. package/Source/Shaders/Builtin/Functions/HSBToRGB.js +26 -0
  1251. package/Source/Shaders/Builtin/Functions/HSLToRGB.glsl +31 -0
  1252. package/Source/Shaders/Builtin/Functions/HSLToRGB.js +33 -0
  1253. package/Source/Shaders/Builtin/Functions/RGBToHSB.glsl +27 -0
  1254. package/Source/Shaders/Builtin/Functions/RGBToHSB.js +29 -0
  1255. package/Source/Shaders/Builtin/Functions/RGBToHSL.glsl +34 -0
  1256. package/Source/Shaders/Builtin/Functions/RGBToHSL.js +36 -0
  1257. package/Source/Shaders/Builtin/Functions/RGBToXYZ.glsl +30 -0
  1258. package/Source/Shaders/Builtin/Functions/RGBToXYZ.js +32 -0
  1259. package/Source/Shaders/Builtin/Functions/XYZToRGB.glsl +30 -0
  1260. package/Source/Shaders/Builtin/Functions/XYZToRGB.js +32 -0
  1261. package/Source/Shaders/Builtin/Functions/acesTonemapping.glsl +16 -0
  1262. package/Source/Shaders/Builtin/Functions/acesTonemapping.js +18 -0
  1263. package/Source/Shaders/Builtin/Functions/alphaWeight.glsl +11 -0
  1264. package/Source/Shaders/Builtin/Functions/alphaWeight.js +13 -0
  1265. package/Source/Shaders/Builtin/Functions/antialias.glsl +39 -0
  1266. package/Source/Shaders/Builtin/Functions/antialias.js +41 -0
  1267. package/Source/Shaders/Builtin/Functions/approximateSphericalCoordinates.glsl +18 -0
  1268. package/Source/Shaders/Builtin/Functions/approximateSphericalCoordinates.js +20 -0
  1269. package/Source/Shaders/Builtin/Functions/backFacing.glsl +13 -0
  1270. package/Source/Shaders/Builtin/Functions/backFacing.js +15 -0
  1271. package/Source/Shaders/Builtin/Functions/branchFreeTernary.glsl +71 -0
  1272. package/Source/Shaders/Builtin/Functions/branchFreeTernary.js +73 -0
  1273. package/Source/Shaders/Builtin/Functions/cascadeColor.glsl +8 -0
  1274. package/Source/Shaders/Builtin/Functions/cascadeColor.js +10 -0
  1275. package/Source/Shaders/Builtin/Functions/cascadeDistance.glsl +7 -0
  1276. package/Source/Shaders/Builtin/Functions/cascadeDistance.js +9 -0
  1277. package/Source/Shaders/Builtin/Functions/cascadeMatrix.glsl +10 -0
  1278. package/Source/Shaders/Builtin/Functions/cascadeMatrix.js +12 -0
  1279. package/Source/Shaders/Builtin/Functions/cascadeWeights.glsl +10 -0
  1280. package/Source/Shaders/Builtin/Functions/cascadeWeights.js +12 -0
  1281. package/Source/Shaders/Builtin/Functions/columbusViewMorph.glsl +12 -0
  1282. package/Source/Shaders/Builtin/Functions/columbusViewMorph.js +14 -0
  1283. package/Source/Shaders/Builtin/Functions/computePosition.glsl +22 -0
  1284. package/Source/Shaders/Builtin/Functions/computePosition.js +24 -0
  1285. package/Source/Shaders/Builtin/Functions/cosineAndSine.glsl +211 -0
  1286. package/Source/Shaders/Builtin/Functions/cosineAndSine.js +213 -0
  1287. package/Source/Shaders/Builtin/Functions/decompressTextureCoordinates.glsl +17 -0
  1288. package/Source/Shaders/Builtin/Functions/decompressTextureCoordinates.js +19 -0
  1289. package/Source/Shaders/Builtin/Functions/defaultPbrMaterial.glsl +16 -0
  1290. package/Source/Shaders/Builtin/Functions/defaultPbrMaterial.js +18 -0
  1291. package/Source/Shaders/Builtin/Functions/depthClamp.glsl +47 -0
  1292. package/Source/Shaders/Builtin/Functions/depthClamp.js +49 -0
  1293. package/Source/Shaders/Builtin/Functions/eastNorthUpToEyeCoordinates.glsl +33 -0
  1294. package/Source/Shaders/Builtin/Functions/eastNorthUpToEyeCoordinates.js +35 -0
  1295. package/Source/Shaders/Builtin/Functions/ellipsoidContainsPoint.glsl +12 -0
  1296. package/Source/Shaders/Builtin/Functions/ellipsoidContainsPoint.js +14 -0
  1297. package/Source/Shaders/Builtin/Functions/ellipsoidWgs84TextureCoordinates.glsl +10 -0
  1298. package/Source/Shaders/Builtin/Functions/ellipsoidWgs84TextureCoordinates.js +12 -0
  1299. package/Source/Shaders/Builtin/Functions/equalsEpsilon.glsl +36 -0
  1300. package/Source/Shaders/Builtin/Functions/equalsEpsilon.js +38 -0
  1301. package/Source/Shaders/Builtin/Functions/eyeOffset.glsl +20 -0
  1302. package/Source/Shaders/Builtin/Functions/eyeOffset.js +22 -0
  1303. package/Source/Shaders/Builtin/Functions/eyeToWindowCoordinates.glsl +32 -0
  1304. package/Source/Shaders/Builtin/Functions/eyeToWindowCoordinates.js +34 -0
  1305. package/Source/Shaders/Builtin/Functions/fastApproximateAtan.glsl +55 -0
  1306. package/Source/Shaders/Builtin/Functions/fastApproximateAtan.js +57 -0
  1307. package/Source/Shaders/Builtin/Functions/fog.glsl +38 -0
  1308. package/Source/Shaders/Builtin/Functions/fog.js +40 -0
  1309. package/Source/Shaders/Builtin/Functions/gammaCorrect.glsl +22 -0
  1310. package/Source/Shaders/Builtin/Functions/gammaCorrect.js +24 -0
  1311. package/Source/Shaders/Builtin/Functions/geodeticSurfaceNormal.glsl +16 -0
  1312. package/Source/Shaders/Builtin/Functions/geodeticSurfaceNormal.js +18 -0
  1313. package/Source/Shaders/Builtin/Functions/getDefaultMaterial.glsl +27 -0
  1314. package/Source/Shaders/Builtin/Functions/getDefaultMaterial.js +29 -0
  1315. package/Source/Shaders/Builtin/Functions/getLambertDiffuse.glsl +22 -0
  1316. package/Source/Shaders/Builtin/Functions/getLambertDiffuse.js +24 -0
  1317. package/Source/Shaders/Builtin/Functions/getSpecular.glsl +29 -0
  1318. package/Source/Shaders/Builtin/Functions/getSpecular.js +31 -0
  1319. package/Source/Shaders/Builtin/Functions/getWaterNoise.glsl +37 -0
  1320. package/Source/Shaders/Builtin/Functions/getWaterNoise.js +39 -0
  1321. package/Source/Shaders/Builtin/Functions/hue.glsl +30 -0
  1322. package/Source/Shaders/Builtin/Functions/hue.js +32 -0
  1323. package/Source/Shaders/Builtin/Functions/inverseGamma.glsl +12 -0
  1324. package/Source/Shaders/Builtin/Functions/inverseGamma.js +14 -0
  1325. package/Source/Shaders/Builtin/Functions/isEmpty.glsl +19 -0
  1326. package/Source/Shaders/Builtin/Functions/isEmpty.js +21 -0
  1327. package/Source/Shaders/Builtin/Functions/isFull.glsl +19 -0
  1328. package/Source/Shaders/Builtin/Functions/isFull.js +21 -0
  1329. package/Source/Shaders/Builtin/Functions/latitudeToWebMercatorFraction.glsl +21 -0
  1330. package/Source/Shaders/Builtin/Functions/latitudeToWebMercatorFraction.js +23 -0
  1331. package/Source/Shaders/Builtin/Functions/lineDistance.glsl +14 -0
  1332. package/Source/Shaders/Builtin/Functions/lineDistance.js +16 -0
  1333. package/Source/Shaders/Builtin/Functions/linearToSrgb.glsl +16 -0
  1334. package/Source/Shaders/Builtin/Functions/linearToSrgb.js +18 -0
  1335. package/Source/Shaders/Builtin/Functions/luminance.glsl +20 -0
  1336. package/Source/Shaders/Builtin/Functions/luminance.js +22 -0
  1337. package/Source/Shaders/Builtin/Functions/metersPerPixel.glsl +61 -0
  1338. package/Source/Shaders/Builtin/Functions/metersPerPixel.js +63 -0
  1339. package/Source/Shaders/Builtin/Functions/modelToWindowCoordinates.glsl +37 -0
  1340. package/Source/Shaders/Builtin/Functions/modelToWindowCoordinates.js +39 -0
  1341. package/Source/Shaders/Builtin/Functions/multiplyWithColorBalance.glsl +18 -0
  1342. package/Source/Shaders/Builtin/Functions/multiplyWithColorBalance.js +20 -0
  1343. package/Source/Shaders/Builtin/Functions/nearFarScalar.glsl +26 -0
  1344. package/Source/Shaders/Builtin/Functions/nearFarScalar.js +28 -0
  1345. package/Source/Shaders/Builtin/Functions/octDecode.glsl +83 -0
  1346. package/Source/Shaders/Builtin/Functions/octDecode.js +85 -0
  1347. package/Source/Shaders/Builtin/Functions/packDepth.glsl +18 -0
  1348. package/Source/Shaders/Builtin/Functions/packDepth.js +20 -0
  1349. package/Source/Shaders/Builtin/Functions/pbrLighting.glsl +99 -0
  1350. package/Source/Shaders/Builtin/Functions/pbrLighting.js +101 -0
  1351. package/Source/Shaders/Builtin/Functions/pbrMetallicRoughnessMaterial.glsl +37 -0
  1352. package/Source/Shaders/Builtin/Functions/pbrMetallicRoughnessMaterial.js +39 -0
  1353. package/Source/Shaders/Builtin/Functions/pbrSpecularGlossinessMaterial.glsl +30 -0
  1354. package/Source/Shaders/Builtin/Functions/pbrSpecularGlossinessMaterial.js +32 -0
  1355. package/Source/Shaders/Builtin/Functions/phong.glsl +63 -0
  1356. package/Source/Shaders/Builtin/Functions/phong.js +65 -0
  1357. package/Source/Shaders/Builtin/Functions/planeDistance.glsl +28 -0
  1358. package/Source/Shaders/Builtin/Functions/planeDistance.js +30 -0
  1359. package/Source/Shaders/Builtin/Functions/pointAlongRay.glsl +19 -0
  1360. package/Source/Shaders/Builtin/Functions/pointAlongRay.js +21 -0
  1361. package/Source/Shaders/Builtin/Functions/rayEllipsoidIntersectionInterval.glsl +83 -0
  1362. package/Source/Shaders/Builtin/Functions/rayEllipsoidIntersectionInterval.js +85 -0
  1363. package/Source/Shaders/Builtin/Functions/raySphereIntersectionInterval.glsl +36 -0
  1364. package/Source/Shaders/Builtin/Functions/raySphereIntersectionInterval.js +38 -0
  1365. package/Source/Shaders/Builtin/Functions/readDepth.glsl +4 -0
  1366. package/Source/Shaders/Builtin/Functions/readDepth.js +6 -0
  1367. package/Source/Shaders/Builtin/Functions/readNonPerspective.glsl +31 -0
  1368. package/Source/Shaders/Builtin/Functions/readNonPerspective.js +33 -0
  1369. package/Source/Shaders/Builtin/Functions/reverseLogDepth.glsl +11 -0
  1370. package/Source/Shaders/Builtin/Functions/reverseLogDepth.js +13 -0
  1371. package/Source/Shaders/Builtin/Functions/round.glsl +22 -0
  1372. package/Source/Shaders/Builtin/Functions/round.js +24 -0
  1373. package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.glsl +78 -0
  1374. package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.js +80 -0
  1375. package/Source/Shaders/Builtin/Functions/saturation.glsl +22 -0
  1376. package/Source/Shaders/Builtin/Functions/saturation.js +24 -0
  1377. package/Source/Shaders/Builtin/Functions/shadowDepthCompare.glsl +24 -0
  1378. package/Source/Shaders/Builtin/Functions/shadowDepthCompare.js +26 -0
  1379. package/Source/Shaders/Builtin/Functions/shadowVisibility.glsl +66 -0
  1380. package/Source/Shaders/Builtin/Functions/shadowVisibility.js +68 -0
  1381. package/Source/Shaders/Builtin/Functions/signNotZero.glsl +29 -0
  1382. package/Source/Shaders/Builtin/Functions/signNotZero.js +31 -0
  1383. package/Source/Shaders/Builtin/Functions/sphericalHarmonics.glsl +42 -0
  1384. package/Source/Shaders/Builtin/Functions/sphericalHarmonics.js +44 -0
  1385. package/Source/Shaders/Builtin/Functions/srgbToLinear.glsl +16 -0
  1386. package/Source/Shaders/Builtin/Functions/srgbToLinear.js +18 -0
  1387. package/Source/Shaders/Builtin/Functions/tangentToEyeSpaceMatrix.glsl +25 -0
  1388. package/Source/Shaders/Builtin/Functions/tangentToEyeSpaceMatrix.js +27 -0
  1389. package/Source/Shaders/Builtin/Functions/transformPlane.glsl +15 -0
  1390. package/Source/Shaders/Builtin/Functions/transformPlane.js +17 -0
  1391. package/Source/Shaders/Builtin/Functions/translateRelativeToEye.glsl +40 -0
  1392. package/Source/Shaders/Builtin/Functions/translateRelativeToEye.js +42 -0
  1393. package/Source/Shaders/Builtin/Functions/translucentPhong.glsl +27 -0
  1394. package/Source/Shaders/Builtin/Functions/translucentPhong.js +29 -0
  1395. package/Source/Shaders/Builtin/Functions/transpose.glsl +45 -0
  1396. package/Source/Shaders/Builtin/Functions/transpose.js +47 -0
  1397. package/Source/Shaders/Builtin/Functions/unpackDepth.glsl +16 -0
  1398. package/Source/Shaders/Builtin/Functions/unpackDepth.js +18 -0
  1399. package/Source/Shaders/Builtin/Functions/unpackFloat.glsl +24 -0
  1400. package/Source/Shaders/Builtin/Functions/unpackFloat.js +26 -0
  1401. package/Source/Shaders/Builtin/Functions/unpackUint.glsl +31 -0
  1402. package/Source/Shaders/Builtin/Functions/unpackUint.js +33 -0
  1403. package/Source/Shaders/Builtin/Functions/valueTransform.glsl +38 -0
  1404. package/Source/Shaders/Builtin/Functions/valueTransform.js +40 -0
  1405. package/Source/Shaders/Builtin/Functions/vertexLogDepth.glsl +64 -0
  1406. package/Source/Shaders/Builtin/Functions/vertexLogDepth.js +66 -0
  1407. package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.glsl +99 -0
  1408. package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.js +101 -0
  1409. package/Source/Shaders/Builtin/Functions/writeDepthClamp.glsl +27 -0
  1410. package/Source/Shaders/Builtin/Functions/writeDepthClamp.js +29 -0
  1411. package/Source/Shaders/Builtin/Functions/writeLogDepth.glsl +82 -0
  1412. package/Source/Shaders/Builtin/Functions/writeLogDepth.js +84 -0
  1413. package/Source/Shaders/Builtin/Functions/writeNonPerspective.glsl +32 -0
  1414. package/Source/Shaders/Builtin/Functions/writeNonPerspective.js +34 -0
  1415. package/Source/Shaders/Builtin/Structs/depthRangeStruct.glsl +9 -0
  1416. package/Source/Shaders/Builtin/Structs/depthRangeStruct.js +11 -0
  1417. package/Source/Shaders/Builtin/Structs/material.glsl +22 -0
  1418. package/Source/Shaders/Builtin/Structs/material.js +24 -0
  1419. package/Source/Shaders/Builtin/Structs/materialInput.glsl +28 -0
  1420. package/Source/Shaders/Builtin/Structs/materialInput.js +30 -0
  1421. package/Source/Shaders/Builtin/Structs/modelMaterial.glsl +29 -0
  1422. package/Source/Shaders/Builtin/Structs/modelMaterial.js +31 -0
  1423. package/Source/Shaders/Builtin/Structs/modelVertexOutput.glsl +16 -0
  1424. package/Source/Shaders/Builtin/Structs/modelVertexOutput.js +18 -0
  1425. package/Source/Shaders/Builtin/Structs/pbrParameters.glsl +16 -0
  1426. package/Source/Shaders/Builtin/Structs/pbrParameters.js +18 -0
  1427. package/Source/Shaders/Builtin/Structs/ray.glsl +11 -0
  1428. package/Source/Shaders/Builtin/Structs/ray.js +13 -0
  1429. package/Source/Shaders/Builtin/Structs/raySegment.glsl +27 -0
  1430. package/Source/Shaders/Builtin/Structs/raySegment.js +29 -0
  1431. package/Source/Shaders/Builtin/Structs/shadowParameters.glsl +15 -0
  1432. package/Source/Shaders/Builtin/Structs/shadowParameters.js +17 -0
  1433. package/Source/Shaders/CloudCollectionFS.glsl +263 -0
  1434. package/Source/Shaders/CloudCollectionFS.js +265 -0
  1435. package/Source/Shaders/CloudCollectionVS.glsl +48 -0
  1436. package/Source/Shaders/CloudCollectionVS.js +50 -0
  1437. package/Source/Shaders/CloudNoiseFS.glsl +92 -0
  1438. package/Source/Shaders/CloudNoiseFS.js +94 -0
  1439. package/Source/Shaders/CloudNoiseVS.glsl +18 -0
  1440. package/Source/Shaders/CloudNoiseVS.js +20 -0
  1441. package/Source/Shaders/CompareAndPackTranslucentDepth.glsl +12 -0
  1442. package/Source/Shaders/CompareAndPackTranslucentDepth.js +14 -0
  1443. package/Source/Shaders/CompositeOITFS.glsl +31 -0
  1444. package/Source/Shaders/CompositeOITFS.js +33 -0
  1445. package/Source/Shaders/DepthPlaneFS.glsl +36 -0
  1446. package/Source/Shaders/DepthPlaneFS.js +38 -0
  1447. package/Source/Shaders/DepthPlaneVS.glsl +11 -0
  1448. package/Source/Shaders/DepthPlaneVS.js +13 -0
  1449. package/Source/Shaders/EllipsoidFS.glsl +112 -0
  1450. package/Source/Shaders/EllipsoidFS.js +114 -0
  1451. package/Source/Shaders/EllipsoidVS.glsl +28 -0
  1452. package/Source/Shaders/EllipsoidVS.js +30 -0
  1453. package/Source/Shaders/FXAA3_11.glsl +648 -0
  1454. package/Source/Shaders/FXAA3_11.js +678 -0
  1455. package/Source/Shaders/GlobeFS.glsl +652 -0
  1456. package/Source/Shaders/GlobeFS.js +654 -0
  1457. package/Source/Shaders/GlobeVS.glsl +253 -0
  1458. package/Source/Shaders/GlobeVS.js +255 -0
  1459. package/Source/Shaders/GroundAtmosphere.glsl +18 -0
  1460. package/Source/Shaders/GroundAtmosphere.js +20 -0
  1461. package/Source/Shaders/Materials/AspectRampMaterial.glsl +11 -0
  1462. package/Source/Shaders/Materials/AspectRampMaterial.js +13 -0
  1463. package/Source/Shaders/Materials/BumpMapMaterial.glsl +29 -0
  1464. package/Source/Shaders/Materials/BumpMapMaterial.js +31 -0
  1465. package/Source/Shaders/Materials/CheckerboardMaterial.glsl +29 -0
  1466. package/Source/Shaders/Materials/CheckerboardMaterial.js +31 -0
  1467. package/Source/Shaders/Materials/DotMaterial.glsl +18 -0
  1468. package/Source/Shaders/Materials/DotMaterial.js +20 -0
  1469. package/Source/Shaders/Materials/ElevationBandMaterial.glsl +74 -0
  1470. package/Source/Shaders/Materials/ElevationBandMaterial.js +76 -0
  1471. package/Source/Shaders/Materials/ElevationContourMaterial.glsl +29 -0
  1472. package/Source/Shaders/Materials/ElevationContourMaterial.js +31 -0
  1473. package/Source/Shaders/Materials/ElevationRampMaterial.glsl +14 -0
  1474. package/Source/Shaders/Materials/ElevationRampMaterial.js +16 -0
  1475. package/Source/Shaders/Materials/FadeMaterial.glsl +37 -0
  1476. package/Source/Shaders/Materials/FadeMaterial.js +39 -0
  1477. package/Source/Shaders/Materials/GridMaterial.glsl +60 -0
  1478. package/Source/Shaders/Materials/GridMaterial.js +62 -0
  1479. package/Source/Shaders/Materials/NormalMapMaterial.glsl +19 -0
  1480. package/Source/Shaders/Materials/NormalMapMaterial.js +21 -0
  1481. package/Source/Shaders/Materials/PolylineArrowMaterial.glsl +66 -0
  1482. package/Source/Shaders/Materials/PolylineArrowMaterial.js +68 -0
  1483. package/Source/Shaders/Materials/PolylineDashMaterial.glsl +39 -0
  1484. package/Source/Shaders/Materials/PolylineDashMaterial.js +41 -0
  1485. package/Source/Shaders/Materials/PolylineGlowMaterial.glsl +25 -0
  1486. package/Source/Shaders/Materials/PolylineGlowMaterial.js +27 -0
  1487. package/Source/Shaders/Materials/PolylineOutlineMaterial.glsl +29 -0
  1488. package/Source/Shaders/Materials/PolylineOutlineMaterial.js +31 -0
  1489. package/Source/Shaders/Materials/RimLightingMaterial.glsl +21 -0
  1490. package/Source/Shaders/Materials/RimLightingMaterial.js +23 -0
  1491. package/Source/Shaders/Materials/SlopeRampMaterial.glsl +11 -0
  1492. package/Source/Shaders/Materials/SlopeRampMaterial.js +13 -0
  1493. package/Source/Shaders/Materials/StripeMaterial.glsl +24 -0
  1494. package/Source/Shaders/Materials/StripeMaterial.js +26 -0
  1495. package/Source/Shaders/Materials/Water.glsl +58 -0
  1496. package/Source/Shaders/Materials/Water.js +60 -0
  1497. package/Source/Shaders/Model/CPUStylingStageFS.glsl +49 -0
  1498. package/Source/Shaders/Model/CPUStylingStageFS.js +51 -0
  1499. package/Source/Shaders/Model/CPUStylingStageVS.glsl +30 -0
  1500. package/Source/Shaders/Model/CPUStylingStageVS.js +32 -0
  1501. package/Source/Shaders/Model/CustomShaderStageFS.glsl +18 -0
  1502. package/Source/Shaders/Model/CustomShaderStageFS.js +20 -0
  1503. package/Source/Shaders/Model/CustomShaderStageVS.glsl +19 -0
  1504. package/Source/Shaders/Model/CustomShaderStageVS.js +21 -0
  1505. package/Source/Shaders/Model/FeatureIdStageFS.glsl +4 -0
  1506. package/Source/Shaders/Model/FeatureIdStageFS.js +6 -0
  1507. package/Source/Shaders/Model/FeatureIdStageVS.glsl +6 -0
  1508. package/Source/Shaders/Model/FeatureIdStageVS.js +8 -0
  1509. package/Source/Shaders/Model/GeometryStageFS.glsl +25 -0
  1510. package/Source/Shaders/Model/GeometryStageFS.js +27 -0
  1511. package/Source/Shaders/Model/GeometryStageVS.glsl +42 -0
  1512. package/Source/Shaders/Model/GeometryStageVS.js +44 -0
  1513. package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +165 -0
  1514. package/Source/Shaders/Model/ImageBasedLightingStageFS.js +166 -0
  1515. package/Source/Shaders/Model/InstancingStageCommon.glsl +67 -0
  1516. package/Source/Shaders/Model/InstancingStageCommon.js +69 -0
  1517. package/Source/Shaders/Model/InstancingStageVS.glsl +18 -0
  1518. package/Source/Shaders/Model/InstancingStageVS.js +20 -0
  1519. package/Source/Shaders/Model/LegacyInstancingStageVS.glsl +20 -0
  1520. package/Source/Shaders/Model/LegacyInstancingStageVS.js +22 -0
  1521. package/Source/Shaders/Model/LightingStageFS.glsl +73 -0
  1522. package/Source/Shaders/Model/LightingStageFS.js +75 -0
  1523. package/Source/Shaders/Model/MaterialStageFS.glsl +226 -0
  1524. package/Source/Shaders/Model/MaterialStageFS.js +228 -0
  1525. package/Source/Shaders/Model/MetadataStageFS.glsl +9 -0
  1526. package/Source/Shaders/Model/MetadataStageFS.js +11 -0
  1527. package/Source/Shaders/Model/MetadataStageVS.glsl +10 -0
  1528. package/Source/Shaders/Model/MetadataStageVS.js +12 -0
  1529. package/Source/Shaders/Model/ModelClippingPlanesStageFS.glsl +88 -0
  1530. package/Source/Shaders/Model/ModelClippingPlanesStageFS.js +90 -0
  1531. package/Source/Shaders/Model/ModelColorStageFS.glsl +7 -0
  1532. package/Source/Shaders/Model/ModelColorStageFS.js +8 -0
  1533. package/Source/Shaders/Model/ModelFS.glsl +89 -0
  1534. package/Source/Shaders/Model/ModelFS.js +91 -0
  1535. package/Source/Shaders/Model/ModelSilhouetteStageFS.glsl +5 -0
  1536. package/Source/Shaders/Model/ModelSilhouetteStageFS.js +6 -0
  1537. package/Source/Shaders/Model/ModelSilhouetteStageVS.glsl +10 -0
  1538. package/Source/Shaders/Model/ModelSilhouetteStageVS.js +12 -0
  1539. package/Source/Shaders/Model/ModelSplitterStageFS.glsl +9 -0
  1540. package/Source/Shaders/Model/ModelSplitterStageFS.js +11 -0
  1541. package/Source/Shaders/Model/ModelVS.glsl +136 -0
  1542. package/Source/Shaders/Model/ModelVS.js +138 -0
  1543. package/Source/Shaders/Model/MorphTargetsStageVS.glsl +15 -0
  1544. package/Source/Shaders/Model/MorphTargetsStageVS.js +16 -0
  1545. package/Source/Shaders/Model/PointCloudStylingStageVS.glsl +45 -0
  1546. package/Source/Shaders/Model/PointCloudStylingStageVS.js +46 -0
  1547. package/Source/Shaders/Model/PrimitiveOutlineStageFS.glsl +16 -0
  1548. package/Source/Shaders/Model/PrimitiveOutlineStageFS.js +18 -0
  1549. package/Source/Shaders/Model/PrimitiveOutlineStageVS.glsl +3 -0
  1550. package/Source/Shaders/Model/PrimitiveOutlineStageVS.js +5 -0
  1551. package/Source/Shaders/Model/SelectedFeatureIdStageCommon.glsl +51 -0
  1552. package/Source/Shaders/Model/SelectedFeatureIdStageCommon.js +53 -0
  1553. package/Source/Shaders/Model/SkinningStageVS.glsl +18 -0
  1554. package/Source/Shaders/Model/SkinningStageVS.js +19 -0
  1555. package/Source/Shaders/OctahedralProjectionAtlasFS.glsl +89 -0
  1556. package/Source/Shaders/OctahedralProjectionAtlasFS.js +91 -0
  1557. package/Source/Shaders/OctahedralProjectionFS.glsl +14 -0
  1558. package/Source/Shaders/OctahedralProjectionFS.js +16 -0
  1559. package/Source/Shaders/OctahedralProjectionVS.glsl +10 -0
  1560. package/Source/Shaders/OctahedralProjectionVS.js +12 -0
  1561. package/Source/Shaders/PointPrimitiveCollectionFS.glsl +43 -0
  1562. package/Source/Shaders/PointPrimitiveCollectionFS.js +45 -0
  1563. package/Source/Shaders/PointPrimitiveCollectionVS.glsl +180 -0
  1564. package/Source/Shaders/PointPrimitiveCollectionVS.js +182 -0
  1565. package/Source/Shaders/PolylineCommon.glsl +176 -0
  1566. package/Source/Shaders/PolylineCommon.js +178 -0
  1567. package/Source/Shaders/PolylineFS.glsl +25 -0
  1568. package/Source/Shaders/PolylineFS.js +27 -0
  1569. package/Source/Shaders/PolylineShadowVolumeFS.glsl +90 -0
  1570. package/Source/Shaders/PolylineShadowVolumeFS.js +92 -0
  1571. package/Source/Shaders/PolylineShadowVolumeMorphFS.glsl +45 -0
  1572. package/Source/Shaders/PolylineShadowVolumeMorphFS.js +47 -0
  1573. package/Source/Shaders/PolylineShadowVolumeMorphVS.glsl +177 -0
  1574. package/Source/Shaders/PolylineShadowVolumeMorphVS.js +179 -0
  1575. package/Source/Shaders/PolylineShadowVolumeVS.glsl +168 -0
  1576. package/Source/Shaders/PolylineShadowVolumeVS.js +170 -0
  1577. package/Source/Shaders/PolylineVS.glsl +103 -0
  1578. package/Source/Shaders/PolylineVS.js +105 -0
  1579. package/Source/Shaders/PostProcessStages/AcesTonemappingStage.glsl +21 -0
  1580. package/Source/Shaders/PostProcessStages/AcesTonemappingStage.js +23 -0
  1581. package/Source/Shaders/PostProcessStages/AdditiveBlend.glsl +17 -0
  1582. package/Source/Shaders/PostProcessStages/AdditiveBlend.js +19 -0
  1583. package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.glsl +115 -0
  1584. package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.js +117 -0
  1585. package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.glsl +11 -0
  1586. package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.js +13 -0
  1587. package/Source/Shaders/PostProcessStages/BlackAndWhite.glsl +19 -0
  1588. package/Source/Shaders/PostProcessStages/BlackAndWhite.js +21 -0
  1589. package/Source/Shaders/PostProcessStages/BloomComposite.glsl +20 -0
  1590. package/Source/Shaders/PostProcessStages/BloomComposite.js +22 -0
  1591. package/Source/Shaders/PostProcessStages/BrightPass.glsl +30 -0
  1592. package/Source/Shaders/PostProcessStages/BrightPass.js +32 -0
  1593. package/Source/Shaders/PostProcessStages/Brightness.glsl +11 -0
  1594. package/Source/Shaders/PostProcessStages/Brightness.js +13 -0
  1595. package/Source/Shaders/PostProcessStages/CompositeTranslucentClassification.glsl +31 -0
  1596. package/Source/Shaders/PostProcessStages/CompositeTranslucentClassification.js +33 -0
  1597. package/Source/Shaders/PostProcessStages/ContrastBias.glsl +17 -0
  1598. package/Source/Shaders/PostProcessStages/ContrastBias.js +19 -0
  1599. package/Source/Shaders/PostProcessStages/DepthOfField.glsl +39 -0
  1600. package/Source/Shaders/PostProcessStages/DepthOfField.js +41 -0
  1601. package/Source/Shaders/PostProcessStages/DepthView.glsl +9 -0
  1602. package/Source/Shaders/PostProcessStages/DepthView.js +11 -0
  1603. package/Source/Shaders/PostProcessStages/DepthViewPacked.glsl +14 -0
  1604. package/Source/Shaders/PostProcessStages/DepthViewPacked.js +16 -0
  1605. package/Source/Shaders/PostProcessStages/EdgeDetection.glsl +60 -0
  1606. package/Source/Shaders/PostProcessStages/EdgeDetection.js +62 -0
  1607. package/Source/Shaders/PostProcessStages/FXAA.glsl +21 -0
  1608. package/Source/Shaders/PostProcessStages/FXAA.js +23 -0
  1609. package/Source/Shaders/PostProcessStages/FilmicTonemapping.glsl +36 -0
  1610. package/Source/Shaders/PostProcessStages/FilmicTonemapping.js +38 -0
  1611. package/Source/Shaders/PostProcessStages/GaussianBlur1D.glsl +47 -0
  1612. package/Source/Shaders/PostProcessStages/GaussianBlur1D.js +49 -0
  1613. package/Source/Shaders/PostProcessStages/LensFlare.glsl +153 -0
  1614. package/Source/Shaders/PostProcessStages/LensFlare.js +155 -0
  1615. package/Source/Shaders/PostProcessStages/ModifiedReinhardTonemapping.glsl +24 -0
  1616. package/Source/Shaders/PostProcessStages/ModifiedReinhardTonemapping.js +26 -0
  1617. package/Source/Shaders/PostProcessStages/NightVision.glsl +16 -0
  1618. package/Source/Shaders/PostProcessStages/NightVision.js +18 -0
  1619. package/Source/Shaders/PostProcessStages/PassThrough.glsl +8 -0
  1620. package/Source/Shaders/PostProcessStages/PassThrough.js +10 -0
  1621. package/Source/Shaders/PostProcessStages/PassThroughDepth.glsl +8 -0
  1622. package/Source/Shaders/PostProcessStages/PassThroughDepth.js +10 -0
  1623. package/Source/Shaders/PostProcessStages/PointCloudEyeDomeLighting.glsl +63 -0
  1624. package/Source/Shaders/PostProcessStages/PointCloudEyeDomeLighting.js +65 -0
  1625. package/Source/Shaders/PostProcessStages/ReinhardTonemapping.glsl +23 -0
  1626. package/Source/Shaders/PostProcessStages/ReinhardTonemapping.js +25 -0
  1627. package/Source/Shaders/PostProcessStages/Silhouette.glsl +11 -0
  1628. package/Source/Shaders/PostProcessStages/Silhouette.js +13 -0
  1629. package/Source/Shaders/ReprojectWebMercatorFS.glsl +8 -0
  1630. package/Source/Shaders/ReprojectWebMercatorFS.js +10 -0
  1631. package/Source/Shaders/ReprojectWebMercatorVS.glsl +12 -0
  1632. package/Source/Shaders/ReprojectWebMercatorVS.js +14 -0
  1633. package/Source/Shaders/ShadowVolumeAppearanceFS.glsl +165 -0
  1634. package/Source/Shaders/ShadowVolumeAppearanceFS.js +167 -0
  1635. package/Source/Shaders/ShadowVolumeAppearanceVS.glsl +101 -0
  1636. package/Source/Shaders/ShadowVolumeAppearanceVS.js +103 -0
  1637. package/Source/Shaders/ShadowVolumeFS.glsl +17 -0
  1638. package/Source/Shaders/ShadowVolumeFS.js +19 -0
  1639. package/Source/Shaders/SkyAtmosphereCommon.glsl +91 -0
  1640. package/Source/Shaders/SkyAtmosphereCommon.js +93 -0
  1641. package/Source/Shaders/SkyAtmosphereFS.glsl +64 -0
  1642. package/Source/Shaders/SkyAtmosphereFS.js +66 -0
  1643. package/Source/Shaders/SkyAtmosphereVS.glsl +30 -0
  1644. package/Source/Shaders/SkyAtmosphereVS.js +32 -0
  1645. package/Source/Shaders/SkyBoxFS.glsl +9 -0
  1646. package/Source/Shaders/SkyBoxFS.js +11 -0
  1647. package/Source/Shaders/SkyBoxVS.glsl +10 -0
  1648. package/Source/Shaders/SkyBoxVS.js +12 -0
  1649. package/Source/Shaders/SunFS.glsl +9 -0
  1650. package/Source/Shaders/SunFS.js +11 -0
  1651. package/Source/Shaders/SunTextureFS.glsl +55 -0
  1652. package/Source/Shaders/SunTextureFS.js +57 -0
  1653. package/Source/Shaders/SunVS.glsl +28 -0
  1654. package/Source/Shaders/SunVS.js +30 -0
  1655. package/Source/Shaders/Vector3DTileClampedPolylinesFS.glsl +52 -0
  1656. package/Source/Shaders/Vector3DTileClampedPolylinesFS.js +54 -0
  1657. package/Source/Shaders/Vector3DTileClampedPolylinesVS.glsl +85 -0
  1658. package/Source/Shaders/Vector3DTileClampedPolylinesVS.js +87 -0
  1659. package/Source/Shaders/Vector3DTilePolylinesVS.glsl +22 -0
  1660. package/Source/Shaders/Vector3DTilePolylinesVS.js +24 -0
  1661. package/Source/Shaders/VectorTileVS.glsl +9 -0
  1662. package/Source/Shaders/VectorTileVS.js +11 -0
  1663. package/Source/Shaders/ViewportQuadFS.glsl +16 -0
  1664. package/Source/Shaders/ViewportQuadFS.js +18 -0
  1665. package/Source/Shaders/ViewportQuadVS.glsl +10 -0
  1666. package/Source/Shaders/ViewportQuadVS.js +12 -0
  1667. package/Source/ThirdParty/Workers/basis_transcoder.js +21 -0
  1668. package/Source/ThirdParty/Workers/draco_decoder_nodejs.js +118 -0
  1669. package/Source/ThirdParty/Workers/package.json +1 -0
  1670. package/Source/ThirdParty/Workers/pako_deflate.min.js +2 -0
  1671. package/Source/ThirdParty/Workers/pako_inflate.min.js +2 -0
  1672. package/Source/ThirdParty/Workers/z-worker-pako.js +1 -0
  1673. package/Source/ThirdParty/basis_transcoder.wasm +0 -0
  1674. package/Source/ThirdParty/draco_decoder.wasm +0 -0
  1675. package/Source/ThirdParty/google-earth-dbroot-parser.js +8337 -0
  1676. package/Source/Widget/CesiumWidget.css +124 -0
  1677. package/Source/Widget/CesiumWidget.js +807 -0
  1678. package/Source/Widget/lighter.css +14 -0
  1679. package/Source/Workers/cesiumWorkerBootstrapper.js +2290 -0
  1680. package/Source/Workers/package.json +1 -0
  1681. package/Source/Workers/transferTypedArrayTest.js +22 -0
  1682. package/Source/WorkersES6/combineGeometry.js +14 -0
  1683. package/Source/WorkersES6/createBoxGeometry.js +10 -0
  1684. package/Source/WorkersES6/createBoxOutlineGeometry.js +10 -0
  1685. package/Source/WorkersES6/createCircleGeometry.js +18 -0
  1686. package/Source/WorkersES6/createCircleOutlineGeometry.js +18 -0
  1687. package/Source/WorkersES6/createCoplanarPolygonGeometry.js +10 -0
  1688. package/Source/WorkersES6/createCoplanarPolygonOutlineGeometry.js +15 -0
  1689. package/Source/WorkersES6/createCorridorGeometry.js +12 -0
  1690. package/Source/WorkersES6/createCorridorOutlineGeometry.js +17 -0
  1691. package/Source/WorkersES6/createCylinderGeometry.js +10 -0
  1692. package/Source/WorkersES6/createCylinderOutlineGeometry.js +10 -0
  1693. package/Source/WorkersES6/createEllipseGeometry.js +14 -0
  1694. package/Source/WorkersES6/createEllipseOutlineGeometry.js +14 -0
  1695. package/Source/WorkersES6/createEllipsoidGeometry.js +10 -0
  1696. package/Source/WorkersES6/createEllipsoidOutlineGeometry.js +13 -0
  1697. package/Source/WorkersES6/createFrustumGeometry.js +10 -0
  1698. package/Source/WorkersES6/createFrustumOutlineGeometry.js +10 -0
  1699. package/Source/WorkersES6/createGeometry.js +52 -0
  1700. package/Source/WorkersES6/createGroundPolylineGeometry.js +16 -0
  1701. package/Source/WorkersES6/createPlaneGeometry.js +10 -0
  1702. package/Source/WorkersES6/createPlaneOutlineGeometry.js +10 -0
  1703. package/Source/WorkersES6/createPolygonGeometry.js +12 -0
  1704. package/Source/WorkersES6/createPolygonOutlineGeometry.js +12 -0
  1705. package/Source/WorkersES6/createPolylineGeometry.js +12 -0
  1706. package/Source/WorkersES6/createPolylineVolumeGeometry.js +17 -0
  1707. package/Source/WorkersES6/createPolylineVolumeOutlineGeometry.js +22 -0
  1708. package/Source/WorkersES6/createRectangleGeometry.js +14 -0
  1709. package/Source/WorkersES6/createRectangleOutlineGeometry.js +17 -0
  1710. package/Source/WorkersES6/createSimplePolylineGeometry.js +17 -0
  1711. package/Source/WorkersES6/createSphereGeometry.js +10 -0
  1712. package/Source/WorkersES6/createSphereOutlineGeometry.js +10 -0
  1713. package/Source/WorkersES6/createTaskProcessorWorker.js +129 -0
  1714. package/Source/WorkersES6/createVectorTileClampedPolylines.js +541 -0
  1715. package/Source/WorkersES6/createVectorTileGeometries.js +414 -0
  1716. package/Source/WorkersES6/createVectorTilePoints.js +81 -0
  1717. package/Source/WorkersES6/createVectorTilePolygons.js +412 -0
  1718. package/Source/WorkersES6/createVectorTilePolylines.js +210 -0
  1719. package/Source/WorkersES6/createVerticesFromGoogleEarthEnterpriseBuffer.js +653 -0
  1720. package/Source/WorkersES6/createVerticesFromHeightmap.js +53 -0
  1721. package/Source/WorkersES6/createVerticesFromQuantizedTerrainMesh.js +549 -0
  1722. package/Source/WorkersES6/createWallGeometry.js +12 -0
  1723. package/Source/WorkersES6/createWallOutlineGeometry.js +12 -0
  1724. package/Source/WorkersES6/decodeDraco.js +381 -0
  1725. package/Source/WorkersES6/decodeGoogleEarthEnterprisePacket.js +268 -0
  1726. package/Source/WorkersES6/decodeI3S.js +1044 -0
  1727. package/Source/WorkersES6/transcodeKTX2.js +316 -0
  1728. package/Source/WorkersES6/upsampleQuantizedTerrainMesh.js +680 -0
  1729. package/index.d.ts +41767 -0
  1730. package/index.js +1085 -0
  1731. package/package.json +73 -0
@@ -0,0 +1,3668 @@
1
+ define(['./Check-666ab1a0', './RuntimeError-06c93819', './defaultValue-0a909f67', './createTaskProcessorWorker'], (function (Check, RuntimeError, defaultValue, createTaskProcessorWorker) { 'use strict';
2
+
3
+ const compressedMagic$1 = 0x7468dead;
4
+ const compressedMagicSwap$1 = 0xadde6874;
5
+
6
+ /**
7
+ * Decodes data that is received from the Google Earth Enterprise server.
8
+ *
9
+ * @param {ArrayBuffer} key The key used during decoding.
10
+ * @param {ArrayBuffer} data The data to be decoded.
11
+ *
12
+ * @private
13
+ */
14
+ function decodeGoogleEarthEnterpriseData(key, data) {
15
+ if (decodeGoogleEarthEnterpriseData.passThroughDataForTesting) {
16
+ return data;
17
+ }
18
+
19
+ //>>includeStart('debug', pragmas.debug);
20
+ Check.Check.typeOf.object("key", key);
21
+ Check.Check.typeOf.object("data", data);
22
+ //>>includeEnd('debug');
23
+
24
+ const keyLength = key.byteLength;
25
+ if (keyLength === 0 || keyLength % 4 !== 0) {
26
+ throw new RuntimeError.RuntimeError(
27
+ "The length of key must be greater than 0 and a multiple of 4."
28
+ );
29
+ }
30
+
31
+ const dataView = new DataView(data);
32
+ const magic = dataView.getUint32(0, true);
33
+ if (magic === compressedMagic$1 || magic === compressedMagicSwap$1) {
34
+ // Occasionally packets don't come back encoded, so just return
35
+ return data;
36
+ }
37
+
38
+ const keyView = new DataView(key);
39
+
40
+ let dp = 0;
41
+ const dpend = data.byteLength;
42
+ const dpend64 = dpend - (dpend % 8);
43
+ const kpend = keyLength;
44
+ let kp;
45
+ let off = 8;
46
+
47
+ // This algorithm is intentionally asymmetric to make it more difficult to
48
+ // guess. Security through obscurity. :-(
49
+
50
+ // while we have a full uint64 (8 bytes) left to do
51
+ // assumes buffer is 64bit aligned (or processor doesn't care)
52
+ while (dp < dpend64) {
53
+ // rotate the key each time through by using the offets 16,0,8,16,0,8,...
54
+ off = (off + 8) % 24;
55
+ kp = off;
56
+
57
+ // run through one key length xor'ing one uint64 at a time
58
+ // then drop out to rotate the key for the next bit
59
+ while (dp < dpend64 && kp < kpend) {
60
+ dataView.setUint32(
61
+ dp,
62
+ dataView.getUint32(dp, true) ^ keyView.getUint32(kp, true),
63
+ true
64
+ );
65
+ dataView.setUint32(
66
+ dp + 4,
67
+ dataView.getUint32(dp + 4, true) ^ keyView.getUint32(kp + 4, true),
68
+ true
69
+ );
70
+ dp += 8;
71
+ kp += 24;
72
+ }
73
+ }
74
+
75
+ // now the remaining 1 to 7 bytes
76
+ if (dp < dpend) {
77
+ if (kp >= kpend) {
78
+ // rotate the key one last time (if necessary)
79
+ off = (off + 8) % 24;
80
+ kp = off;
81
+ }
82
+
83
+ while (dp < dpend) {
84
+ dataView.setUint8(dp, dataView.getUint8(dp) ^ keyView.getUint8(kp));
85
+ dp++;
86
+ kp++;
87
+ }
88
+ }
89
+ }
90
+
91
+ decodeGoogleEarthEnterpriseData.passThroughDataForTesting = false;
92
+
93
+ /**
94
+ * @private
95
+ */
96
+ function isBitSet(bits, mask) {
97
+ return (bits & mask) !== 0;
98
+ }
99
+
100
+ // Bitmask for checking tile properties
101
+ const childrenBitmasks = [0x01, 0x02, 0x04, 0x08];
102
+ const anyChildBitmask = 0x0f;
103
+ const cacheFlagBitmask = 0x10; // True if there is a child subtree
104
+ const imageBitmask = 0x40;
105
+ const terrainBitmask = 0x80;
106
+
107
+ /**
108
+ * Contains information about each tile from a Google Earth Enterprise server
109
+ *
110
+ * @param {Number} bits Bitmask that contains the type of data and available children for each tile.
111
+ * @param {Number} cnodeVersion Version of the request for subtree metadata.
112
+ * @param {Number} imageryVersion Version of the request for imagery tile.
113
+ * @param {Number} terrainVersion Version of the request for terrain tile.
114
+ * @param {Number} imageryProvider Id of imagery provider.
115
+ * @param {Number} terrainProvider Id of terrain provider.
116
+ *
117
+ * @private
118
+ */
119
+ function GoogleEarthEnterpriseTileInformation(
120
+ bits,
121
+ cnodeVersion,
122
+ imageryVersion,
123
+ terrainVersion,
124
+ imageryProvider,
125
+ terrainProvider
126
+ ) {
127
+ this._bits = bits;
128
+ this.cnodeVersion = cnodeVersion;
129
+ this.imageryVersion = imageryVersion;
130
+ this.terrainVersion = terrainVersion;
131
+ this.imageryProvider = imageryProvider;
132
+ this.terrainProvider = terrainProvider;
133
+ this.ancestorHasTerrain = false; // Set it later once we find its parent
134
+ this.terrainState = undefined;
135
+ }
136
+
137
+ /**
138
+ * Creates GoogleEarthEnterpriseTileInformation from an object
139
+ *
140
+ * @param {Object} info Object to be cloned
141
+ * @param {GoogleEarthEnterpriseTileInformation} [result] The object onto which to store the result.
142
+ * @returns {GoogleEarthEnterpriseTileInformation} The modified result parameter or a new GoogleEarthEnterpriseTileInformation instance if none was provided.
143
+ */
144
+ GoogleEarthEnterpriseTileInformation.clone = function (info, result) {
145
+ if (!defaultValue.defined(result)) {
146
+ result = new GoogleEarthEnterpriseTileInformation(
147
+ info._bits,
148
+ info.cnodeVersion,
149
+ info.imageryVersion,
150
+ info.terrainVersion,
151
+ info.imageryProvider,
152
+ info.terrainProvider
153
+ );
154
+ } else {
155
+ result._bits = info._bits;
156
+ result.cnodeVersion = info.cnodeVersion;
157
+ result.imageryVersion = info.imageryVersion;
158
+ result.terrainVersion = info.terrainVersion;
159
+ result.imageryProvider = info.imageryProvider;
160
+ result.terrainProvider = info.terrainProvider;
161
+ }
162
+ result.ancestorHasTerrain = info.ancestorHasTerrain;
163
+ result.terrainState = info.terrainState;
164
+
165
+ return result;
166
+ };
167
+
168
+ /**
169
+ * Sets the parent for the tile
170
+ *
171
+ * @param {GoogleEarthEnterpriseTileInformation} parent Parent tile
172
+ */
173
+ GoogleEarthEnterpriseTileInformation.prototype.setParent = function (parent) {
174
+ this.ancestorHasTerrain = parent.ancestorHasTerrain || this.hasTerrain();
175
+ };
176
+
177
+ /**
178
+ * Gets whether a subtree is available
179
+ *
180
+ * @returns {Boolean} true if subtree is available, false otherwise.
181
+ */
182
+ GoogleEarthEnterpriseTileInformation.prototype.hasSubtree = function () {
183
+ return isBitSet(this._bits, cacheFlagBitmask);
184
+ };
185
+
186
+ /**
187
+ * Gets whether imagery is available
188
+ *
189
+ * @returns {Boolean} true if imagery is available, false otherwise.
190
+ */
191
+ GoogleEarthEnterpriseTileInformation.prototype.hasImagery = function () {
192
+ return isBitSet(this._bits, imageBitmask);
193
+ };
194
+
195
+ /**
196
+ * Gets whether terrain is available
197
+ *
198
+ * @returns {Boolean} true if terrain is available, false otherwise.
199
+ */
200
+ GoogleEarthEnterpriseTileInformation.prototype.hasTerrain = function () {
201
+ return isBitSet(this._bits, terrainBitmask);
202
+ };
203
+
204
+ /**
205
+ * Gets whether any children are present
206
+ *
207
+ * @returns {Boolean} true if any children are available, false otherwise.
208
+ */
209
+ GoogleEarthEnterpriseTileInformation.prototype.hasChildren = function () {
210
+ return isBitSet(this._bits, anyChildBitmask);
211
+ };
212
+
213
+ /**
214
+ * Gets whether a specified child is available
215
+ *
216
+ * @param {Number} index Index of child tile
217
+ *
218
+ * @returns {Boolean} true if child is available, false otherwise
219
+ */
220
+ GoogleEarthEnterpriseTileInformation.prototype.hasChild = function (index) {
221
+ return isBitSet(this._bits, childrenBitmasks[index]);
222
+ };
223
+
224
+ /**
225
+ * Gets bitmask containing children
226
+ *
227
+ * @returns {Number} Children bitmask
228
+ */
229
+ GoogleEarthEnterpriseTileInformation.prototype.getChildBitmask = function () {
230
+ return this._bits & anyChildBitmask;
231
+ };
232
+
233
+ var inflate$3 = {};
234
+
235
+ var inflate$2 = {};
236
+
237
+ // Note: adler32 takes 12% for level 0 and 2% for level 6.
238
+ // It isn't worth it to make additional optimizations as in original.
239
+ // Small size is preferable.
240
+
241
+ // (C) 1995-2013 Jean-loup Gailly and Mark Adler
242
+ // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
243
+ //
244
+ // This software is provided 'as-is', without any express or implied
245
+ // warranty. In no event will the authors be held liable for any damages
246
+ // arising from the use of this software.
247
+ //
248
+ // Permission is granted to anyone to use this software for any purpose,
249
+ // including commercial applications, and to alter it and redistribute it
250
+ // freely, subject to the following restrictions:
251
+ //
252
+ // 1. The origin of this software must not be misrepresented; you must not
253
+ // claim that you wrote the original software. If you use this software
254
+ // in a product, an acknowledgment in the product documentation would be
255
+ // appreciated but is not required.
256
+ // 2. Altered source versions must be plainly marked as such, and must not be
257
+ // misrepresented as being the original software.
258
+ // 3. This notice may not be removed or altered from any source distribution.
259
+
260
+ const adler32$1 = (adler, buf, len, pos) => {
261
+ let s1 = (adler & 0xffff) |0,
262
+ s2 = ((adler >>> 16) & 0xffff) |0,
263
+ n = 0;
264
+
265
+ while (len !== 0) {
266
+ // Set limit ~ twice less than 5552, to keep
267
+ // s2 in 31-bits, because we force signed ints.
268
+ // in other case %= will fail.
269
+ n = len > 2000 ? 2000 : len;
270
+ len -= n;
271
+
272
+ do {
273
+ s1 = (s1 + buf[pos++]) |0;
274
+ s2 = (s2 + s1) |0;
275
+ } while (--n);
276
+
277
+ s1 %= 65521;
278
+ s2 %= 65521;
279
+ }
280
+
281
+ return (s1 | (s2 << 16)) |0;
282
+ };
283
+
284
+
285
+ var adler32_1 = adler32$1;
286
+
287
+ // Note: we can't get significant speed boost here.
288
+ // So write code to minimize size - no pregenerated tables
289
+ // and array tools dependencies.
290
+
291
+ // (C) 1995-2013 Jean-loup Gailly and Mark Adler
292
+ // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
293
+ //
294
+ // This software is provided 'as-is', without any express or implied
295
+ // warranty. In no event will the authors be held liable for any damages
296
+ // arising from the use of this software.
297
+ //
298
+ // Permission is granted to anyone to use this software for any purpose,
299
+ // including commercial applications, and to alter it and redistribute it
300
+ // freely, subject to the following restrictions:
301
+ //
302
+ // 1. The origin of this software must not be misrepresented; you must not
303
+ // claim that you wrote the original software. If you use this software
304
+ // in a product, an acknowledgment in the product documentation would be
305
+ // appreciated but is not required.
306
+ // 2. Altered source versions must be plainly marked as such, and must not be
307
+ // misrepresented as being the original software.
308
+ // 3. This notice may not be removed or altered from any source distribution.
309
+
310
+ // Use ordinary array, since untyped makes no boost here
311
+ const makeTable = () => {
312
+ let c, table = [];
313
+
314
+ for (var n = 0; n < 256; n++) {
315
+ c = n;
316
+ for (var k = 0; k < 8; k++) {
317
+ c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
318
+ }
319
+ table[n] = c;
320
+ }
321
+
322
+ return table;
323
+ };
324
+
325
+ // Create table on load. Just 255 signed longs. Not a problem.
326
+ const crcTable = new Uint32Array(makeTable());
327
+
328
+
329
+ const crc32$1 = (crc, buf, len, pos) => {
330
+ const t = crcTable;
331
+ const end = pos + len;
332
+
333
+ crc ^= -1;
334
+
335
+ for (let i = pos; i < end; i++) {
336
+ crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
337
+ }
338
+
339
+ return (crc ^ (-1)); // >>> 0;
340
+ };
341
+
342
+
343
+ var crc32_1 = crc32$1;
344
+
345
+ // (C) 1995-2013 Jean-loup Gailly and Mark Adler
346
+ // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
347
+ //
348
+ // This software is provided 'as-is', without any express or implied
349
+ // warranty. In no event will the authors be held liable for any damages
350
+ // arising from the use of this software.
351
+ //
352
+ // Permission is granted to anyone to use this software for any purpose,
353
+ // including commercial applications, and to alter it and redistribute it
354
+ // freely, subject to the following restrictions:
355
+ //
356
+ // 1. The origin of this software must not be misrepresented; you must not
357
+ // claim that you wrote the original software. If you use this software
358
+ // in a product, an acknowledgment in the product documentation would be
359
+ // appreciated but is not required.
360
+ // 2. Altered source versions must be plainly marked as such, and must not be
361
+ // misrepresented as being the original software.
362
+ // 3. This notice may not be removed or altered from any source distribution.
363
+
364
+ // See state defs from inflate.js
365
+ const BAD$1 = 30; /* got a data error -- remain here until reset */
366
+ const TYPE$1 = 12; /* i: waiting for type bits, including last-flag bit */
367
+
368
+ /*
369
+ Decode literal, length, and distance codes and write out the resulting
370
+ literal and match bytes until either not enough input or output is
371
+ available, an end-of-block is encountered, or a data error is encountered.
372
+ When large enough input and output buffers are supplied to inflate(), for
373
+ example, a 16K input buffer and a 64K output buffer, more than 95% of the
374
+ inflate execution time is spent in this routine.
375
+
376
+ Entry assumptions:
377
+
378
+ state.mode === LEN
379
+ strm.avail_in >= 6
380
+ strm.avail_out >= 258
381
+ start >= strm.avail_out
382
+ state.bits < 8
383
+
384
+ On return, state.mode is one of:
385
+
386
+ LEN -- ran out of enough output space or enough available input
387
+ TYPE -- reached end of block code, inflate() to interpret next block
388
+ BAD -- error in block data
389
+
390
+ Notes:
391
+
392
+ - The maximum input bits used by a length/distance pair is 15 bits for the
393
+ length code, 5 bits for the length extra, 15 bits for the distance code,
394
+ and 13 bits for the distance extra. This totals 48 bits, or six bytes.
395
+ Therefore if strm.avail_in >= 6, then there is enough input to avoid
396
+ checking for available input while decoding.
397
+
398
+ - The maximum bytes that a single length/distance pair can output is 258
399
+ bytes, which is the maximum length that can be coded. inflate_fast()
400
+ requires strm.avail_out >= 258 for each loop to avoid checking for
401
+ output space.
402
+ */
403
+ var inffast = function inflate_fast(strm, start) {
404
+ let _in; /* local strm.input */
405
+ let last; /* have enough input while in < last */
406
+ let _out; /* local strm.output */
407
+ let beg; /* inflate()'s initial strm.output */
408
+ let end; /* while out < end, enough space available */
409
+ //#ifdef INFLATE_STRICT
410
+ let dmax; /* maximum distance from zlib header */
411
+ //#endif
412
+ let wsize; /* window size or zero if not using window */
413
+ let whave; /* valid bytes in the window */
414
+ let wnext; /* window write index */
415
+ // Use `s_window` instead `window`, avoid conflict with instrumentation tools
416
+ let s_window; /* allocated sliding window, if wsize != 0 */
417
+ let hold; /* local strm.hold */
418
+ let bits; /* local strm.bits */
419
+ let lcode; /* local strm.lencode */
420
+ let dcode; /* local strm.distcode */
421
+ let lmask; /* mask for first level of length codes */
422
+ let dmask; /* mask for first level of distance codes */
423
+ let here; /* retrieved table entry */
424
+ let op; /* code bits, operation, extra bits, or */
425
+ /* window position, window bytes to copy */
426
+ let len; /* match length, unused bytes */
427
+ let dist; /* match distance */
428
+ let from; /* where to copy match from */
429
+ let from_source;
430
+
431
+
432
+ let input, output; // JS specific, because we have no pointers
433
+
434
+ /* copy state to local variables */
435
+ const state = strm.state;
436
+ //here = state.here;
437
+ _in = strm.next_in;
438
+ input = strm.input;
439
+ last = _in + (strm.avail_in - 5);
440
+ _out = strm.next_out;
441
+ output = strm.output;
442
+ beg = _out - (start - strm.avail_out);
443
+ end = _out + (strm.avail_out - 257);
444
+ //#ifdef INFLATE_STRICT
445
+ dmax = state.dmax;
446
+ //#endif
447
+ wsize = state.wsize;
448
+ whave = state.whave;
449
+ wnext = state.wnext;
450
+ s_window = state.window;
451
+ hold = state.hold;
452
+ bits = state.bits;
453
+ lcode = state.lencode;
454
+ dcode = state.distcode;
455
+ lmask = (1 << state.lenbits) - 1;
456
+ dmask = (1 << state.distbits) - 1;
457
+
458
+
459
+ /* decode literals and length/distances until end-of-block or not enough
460
+ input data or output space */
461
+
462
+ top:
463
+ do {
464
+ if (bits < 15) {
465
+ hold += input[_in++] << bits;
466
+ bits += 8;
467
+ hold += input[_in++] << bits;
468
+ bits += 8;
469
+ }
470
+
471
+ here = lcode[hold & lmask];
472
+
473
+ dolen:
474
+ for (;;) { // Goto emulation
475
+ op = here >>> 24/*here.bits*/;
476
+ hold >>>= op;
477
+ bits -= op;
478
+ op = (here >>> 16) & 0xff/*here.op*/;
479
+ if (op === 0) { /* literal */
480
+ //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
481
+ // "inflate: literal '%c'\n" :
482
+ // "inflate: literal 0x%02x\n", here.val));
483
+ output[_out++] = here & 0xffff/*here.val*/;
484
+ }
485
+ else if (op & 16) { /* length base */
486
+ len = here & 0xffff/*here.val*/;
487
+ op &= 15; /* number of extra bits */
488
+ if (op) {
489
+ if (bits < op) {
490
+ hold += input[_in++] << bits;
491
+ bits += 8;
492
+ }
493
+ len += hold & ((1 << op) - 1);
494
+ hold >>>= op;
495
+ bits -= op;
496
+ }
497
+ //Tracevv((stderr, "inflate: length %u\n", len));
498
+ if (bits < 15) {
499
+ hold += input[_in++] << bits;
500
+ bits += 8;
501
+ hold += input[_in++] << bits;
502
+ bits += 8;
503
+ }
504
+ here = dcode[hold & dmask];
505
+
506
+ dodist:
507
+ for (;;) { // goto emulation
508
+ op = here >>> 24/*here.bits*/;
509
+ hold >>>= op;
510
+ bits -= op;
511
+ op = (here >>> 16) & 0xff/*here.op*/;
512
+
513
+ if (op & 16) { /* distance base */
514
+ dist = here & 0xffff/*here.val*/;
515
+ op &= 15; /* number of extra bits */
516
+ if (bits < op) {
517
+ hold += input[_in++] << bits;
518
+ bits += 8;
519
+ if (bits < op) {
520
+ hold += input[_in++] << bits;
521
+ bits += 8;
522
+ }
523
+ }
524
+ dist += hold & ((1 << op) - 1);
525
+ //#ifdef INFLATE_STRICT
526
+ if (dist > dmax) {
527
+ strm.msg = 'invalid distance too far back';
528
+ state.mode = BAD$1;
529
+ break top;
530
+ }
531
+ //#endif
532
+ hold >>>= op;
533
+ bits -= op;
534
+ //Tracevv((stderr, "inflate: distance %u\n", dist));
535
+ op = _out - beg; /* max distance in output */
536
+ if (dist > op) { /* see if copy from window */
537
+ op = dist - op; /* distance back in window */
538
+ if (op > whave) {
539
+ if (state.sane) {
540
+ strm.msg = 'invalid distance too far back';
541
+ state.mode = BAD$1;
542
+ break top;
543
+ }
544
+
545
+ // (!) This block is disabled in zlib defaults,
546
+ // don't enable it for binary compatibility
547
+ //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
548
+ // if (len <= op - whave) {
549
+ // do {
550
+ // output[_out++] = 0;
551
+ // } while (--len);
552
+ // continue top;
553
+ // }
554
+ // len -= op - whave;
555
+ // do {
556
+ // output[_out++] = 0;
557
+ // } while (--op > whave);
558
+ // if (op === 0) {
559
+ // from = _out - dist;
560
+ // do {
561
+ // output[_out++] = output[from++];
562
+ // } while (--len);
563
+ // continue top;
564
+ // }
565
+ //#endif
566
+ }
567
+ from = 0; // window index
568
+ from_source = s_window;
569
+ if (wnext === 0) { /* very common case */
570
+ from += wsize - op;
571
+ if (op < len) { /* some from window */
572
+ len -= op;
573
+ do {
574
+ output[_out++] = s_window[from++];
575
+ } while (--op);
576
+ from = _out - dist; /* rest from output */
577
+ from_source = output;
578
+ }
579
+ }
580
+ else if (wnext < op) { /* wrap around window */
581
+ from += wsize + wnext - op;
582
+ op -= wnext;
583
+ if (op < len) { /* some from end of window */
584
+ len -= op;
585
+ do {
586
+ output[_out++] = s_window[from++];
587
+ } while (--op);
588
+ from = 0;
589
+ if (wnext < len) { /* some from start of window */
590
+ op = wnext;
591
+ len -= op;
592
+ do {
593
+ output[_out++] = s_window[from++];
594
+ } while (--op);
595
+ from = _out - dist; /* rest from output */
596
+ from_source = output;
597
+ }
598
+ }
599
+ }
600
+ else { /* contiguous in window */
601
+ from += wnext - op;
602
+ if (op < len) { /* some from window */
603
+ len -= op;
604
+ do {
605
+ output[_out++] = s_window[from++];
606
+ } while (--op);
607
+ from = _out - dist; /* rest from output */
608
+ from_source = output;
609
+ }
610
+ }
611
+ while (len > 2) {
612
+ output[_out++] = from_source[from++];
613
+ output[_out++] = from_source[from++];
614
+ output[_out++] = from_source[from++];
615
+ len -= 3;
616
+ }
617
+ if (len) {
618
+ output[_out++] = from_source[from++];
619
+ if (len > 1) {
620
+ output[_out++] = from_source[from++];
621
+ }
622
+ }
623
+ }
624
+ else {
625
+ from = _out - dist; /* copy direct from output */
626
+ do { /* minimum length is three */
627
+ output[_out++] = output[from++];
628
+ output[_out++] = output[from++];
629
+ output[_out++] = output[from++];
630
+ len -= 3;
631
+ } while (len > 2);
632
+ if (len) {
633
+ output[_out++] = output[from++];
634
+ if (len > 1) {
635
+ output[_out++] = output[from++];
636
+ }
637
+ }
638
+ }
639
+ }
640
+ else if ((op & 64) === 0) { /* 2nd level distance code */
641
+ here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
642
+ continue dodist;
643
+ }
644
+ else {
645
+ strm.msg = 'invalid distance code';
646
+ state.mode = BAD$1;
647
+ break top;
648
+ }
649
+
650
+ break; // need to emulate goto via "continue"
651
+ }
652
+ }
653
+ else if ((op & 64) === 0) { /* 2nd level length code */
654
+ here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
655
+ continue dolen;
656
+ }
657
+ else if (op & 32) { /* end-of-block */
658
+ //Tracevv((stderr, "inflate: end of block\n"));
659
+ state.mode = TYPE$1;
660
+ break top;
661
+ }
662
+ else {
663
+ strm.msg = 'invalid literal/length code';
664
+ state.mode = BAD$1;
665
+ break top;
666
+ }
667
+
668
+ break; // need to emulate goto via "continue"
669
+ }
670
+ } while (_in < last && _out < end);
671
+
672
+ /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
673
+ len = bits >> 3;
674
+ _in -= len;
675
+ bits -= len << 3;
676
+ hold &= (1 << bits) - 1;
677
+
678
+ /* update state and return */
679
+ strm.next_in = _in;
680
+ strm.next_out = _out;
681
+ strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
682
+ strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
683
+ state.hold = hold;
684
+ state.bits = bits;
685
+ return;
686
+ };
687
+
688
+ // (C) 1995-2013 Jean-loup Gailly and Mark Adler
689
+ // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
690
+ //
691
+ // This software is provided 'as-is', without any express or implied
692
+ // warranty. In no event will the authors be held liable for any damages
693
+ // arising from the use of this software.
694
+ //
695
+ // Permission is granted to anyone to use this software for any purpose,
696
+ // including commercial applications, and to alter it and redistribute it
697
+ // freely, subject to the following restrictions:
698
+ //
699
+ // 1. The origin of this software must not be misrepresented; you must not
700
+ // claim that you wrote the original software. If you use this software
701
+ // in a product, an acknowledgment in the product documentation would be
702
+ // appreciated but is not required.
703
+ // 2. Altered source versions must be plainly marked as such, and must not be
704
+ // misrepresented as being the original software.
705
+ // 3. This notice may not be removed or altered from any source distribution.
706
+
707
+ const MAXBITS = 15;
708
+ const ENOUGH_LENS$1 = 852;
709
+ const ENOUGH_DISTS$1 = 592;
710
+ //const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
711
+
712
+ const CODES$1 = 0;
713
+ const LENS$1 = 1;
714
+ const DISTS$1 = 2;
715
+
716
+ const lbase = new Uint16Array([ /* Length codes 257..285 base */
717
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
718
+ 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
719
+ ]);
720
+
721
+ const lext = new Uint8Array([ /* Length codes 257..285 extra */
722
+ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
723
+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78
724
+ ]);
725
+
726
+ const dbase = new Uint16Array([ /* Distance codes 0..29 base */
727
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
728
+ 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
729
+ 8193, 12289, 16385, 24577, 0, 0
730
+ ]);
731
+
732
+ const dext = new Uint8Array([ /* Distance codes 0..29 extra */
733
+ 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
734
+ 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
735
+ 28, 28, 29, 29, 64, 64
736
+ ]);
737
+
738
+ const inflate_table$1 = (type, lens, lens_index, codes, table, table_index, work, opts) =>
739
+ {
740
+ const bits = opts.bits;
741
+ //here = opts.here; /* table entry for duplication */
742
+
743
+ let len = 0; /* a code's length in bits */
744
+ let sym = 0; /* index of code symbols */
745
+ let min = 0, max = 0; /* minimum and maximum code lengths */
746
+ let root = 0; /* number of index bits for root table */
747
+ let curr = 0; /* number of index bits for current table */
748
+ let drop = 0; /* code bits to drop for sub-table */
749
+ let left = 0; /* number of prefix codes available */
750
+ let used = 0; /* code entries in table used */
751
+ let huff = 0; /* Huffman code */
752
+ let incr; /* for incrementing code, index */
753
+ let fill; /* index for replicating entries */
754
+ let low; /* low bits for current root entry */
755
+ let mask; /* mask for low root bits */
756
+ let next; /* next available space in table */
757
+ let base = null; /* base value table to use */
758
+ let base_index = 0;
759
+ // let shoextra; /* extra bits table to use */
760
+ let end; /* use base and extra for symbol > end */
761
+ const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */
762
+ const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */
763
+ let extra = null;
764
+ let extra_index = 0;
765
+
766
+ let here_bits, here_op, here_val;
767
+
768
+ /*
769
+ Process a set of code lengths to create a canonical Huffman code. The
770
+ code lengths are lens[0..codes-1]. Each length corresponds to the
771
+ symbols 0..codes-1. The Huffman code is generated by first sorting the
772
+ symbols by length from short to long, and retaining the symbol order
773
+ for codes with equal lengths. Then the code starts with all zero bits
774
+ for the first code of the shortest length, and the codes are integer
775
+ increments for the same length, and zeros are appended as the length
776
+ increases. For the deflate format, these bits are stored backwards
777
+ from their more natural integer increment ordering, and so when the
778
+ decoding tables are built in the large loop below, the integer codes
779
+ are incremented backwards.
780
+
781
+ This routine assumes, but does not check, that all of the entries in
782
+ lens[] are in the range 0..MAXBITS. The caller must assure this.
783
+ 1..MAXBITS is interpreted as that code length. zero means that that
784
+ symbol does not occur in this code.
785
+
786
+ The codes are sorted by computing a count of codes for each length,
787
+ creating from that a table of starting indices for each length in the
788
+ sorted table, and then entering the symbols in order in the sorted
789
+ table. The sorted table is work[], with that space being provided by
790
+ the caller.
791
+
792
+ The length counts are used for other purposes as well, i.e. finding
793
+ the minimum and maximum length codes, determining if there are any
794
+ codes at all, checking for a valid set of lengths, and looking ahead
795
+ at length counts to determine sub-table sizes when building the
796
+ decoding tables.
797
+ */
798
+
799
+ /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
800
+ for (len = 0; len <= MAXBITS; len++) {
801
+ count[len] = 0;
802
+ }
803
+ for (sym = 0; sym < codes; sym++) {
804
+ count[lens[lens_index + sym]]++;
805
+ }
806
+
807
+ /* bound code lengths, force root to be within code lengths */
808
+ root = bits;
809
+ for (max = MAXBITS; max >= 1; max--) {
810
+ if (count[max] !== 0) { break; }
811
+ }
812
+ if (root > max) {
813
+ root = max;
814
+ }
815
+ if (max === 0) { /* no symbols to code at all */
816
+ //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */
817
+ //table.bits[opts.table_index] = 1; //here.bits = (var char)1;
818
+ //table.val[opts.table_index++] = 0; //here.val = (var short)0;
819
+ table[table_index++] = (1 << 24) | (64 << 16) | 0;
820
+
821
+
822
+ //table.op[opts.table_index] = 64;
823
+ //table.bits[opts.table_index] = 1;
824
+ //table.val[opts.table_index++] = 0;
825
+ table[table_index++] = (1 << 24) | (64 << 16) | 0;
826
+
827
+ opts.bits = 1;
828
+ return 0; /* no symbols, but wait for decoding to report error */
829
+ }
830
+ for (min = 1; min < max; min++) {
831
+ if (count[min] !== 0) { break; }
832
+ }
833
+ if (root < min) {
834
+ root = min;
835
+ }
836
+
837
+ /* check for an over-subscribed or incomplete set of lengths */
838
+ left = 1;
839
+ for (len = 1; len <= MAXBITS; len++) {
840
+ left <<= 1;
841
+ left -= count[len];
842
+ if (left < 0) {
843
+ return -1;
844
+ } /* over-subscribed */
845
+ }
846
+ if (left > 0 && (type === CODES$1 || max !== 1)) {
847
+ return -1; /* incomplete set */
848
+ }
849
+
850
+ /* generate offsets into symbol table for each length for sorting */
851
+ offs[1] = 0;
852
+ for (len = 1; len < MAXBITS; len++) {
853
+ offs[len + 1] = offs[len] + count[len];
854
+ }
855
+
856
+ /* sort symbols by length, by symbol order within each length */
857
+ for (sym = 0; sym < codes; sym++) {
858
+ if (lens[lens_index + sym] !== 0) {
859
+ work[offs[lens[lens_index + sym]]++] = sym;
860
+ }
861
+ }
862
+
863
+ /*
864
+ Create and fill in decoding tables. In this loop, the table being
865
+ filled is at next and has curr index bits. The code being used is huff
866
+ with length len. That code is converted to an index by dropping drop
867
+ bits off of the bottom. For codes where len is less than drop + curr,
868
+ those top drop + curr - len bits are incremented through all values to
869
+ fill the table with replicated entries.
870
+
871
+ root is the number of index bits for the root table. When len exceeds
872
+ root, sub-tables are created pointed to by the root entry with an index
873
+ of the low root bits of huff. This is saved in low to check for when a
874
+ new sub-table should be started. drop is zero when the root table is
875
+ being filled, and drop is root when sub-tables are being filled.
876
+
877
+ When a new sub-table is needed, it is necessary to look ahead in the
878
+ code lengths to determine what size sub-table is needed. The length
879
+ counts are used for this, and so count[] is decremented as codes are
880
+ entered in the tables.
881
+
882
+ used keeps track of how many table entries have been allocated from the
883
+ provided *table space. It is checked for LENS and DIST tables against
884
+ the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
885
+ the initial root table size constants. See the comments in inftrees.h
886
+ for more information.
887
+
888
+ sym increments through all symbols, and the loop terminates when
889
+ all codes of length max, i.e. all codes, have been processed. This
890
+ routine permits incomplete codes, so another loop after this one fills
891
+ in the rest of the decoding tables with invalid code markers.
892
+ */
893
+
894
+ /* set up for code type */
895
+ // poor man optimization - use if-else instead of switch,
896
+ // to avoid deopts in old v8
897
+ if (type === CODES$1) {
898
+ base = extra = work; /* dummy value--not used */
899
+ end = 19;
900
+
901
+ } else if (type === LENS$1) {
902
+ base = lbase;
903
+ base_index -= 257;
904
+ extra = lext;
905
+ extra_index -= 257;
906
+ end = 256;
907
+
908
+ } else { /* DISTS */
909
+ base = dbase;
910
+ extra = dext;
911
+ end = -1;
912
+ }
913
+
914
+ /* initialize opts for loop */
915
+ huff = 0; /* starting code */
916
+ sym = 0; /* starting code symbol */
917
+ len = min; /* starting code length */
918
+ next = table_index; /* current table to fill in */
919
+ curr = root; /* current table index bits */
920
+ drop = 0; /* current bits to drop from code for index */
921
+ low = -1; /* trigger new sub-table when len > root */
922
+ used = 1 << root; /* use root table entries */
923
+ mask = used - 1; /* mask for comparing low */
924
+
925
+ /* check available table space */
926
+ if ((type === LENS$1 && used > ENOUGH_LENS$1) ||
927
+ (type === DISTS$1 && used > ENOUGH_DISTS$1)) {
928
+ return 1;
929
+ }
930
+
931
+ /* process all codes and make table entries */
932
+ for (;;) {
933
+ /* create table entry */
934
+ here_bits = len - drop;
935
+ if (work[sym] < end) {
936
+ here_op = 0;
937
+ here_val = work[sym];
938
+ }
939
+ else if (work[sym] > end) {
940
+ here_op = extra[extra_index + work[sym]];
941
+ here_val = base[base_index + work[sym]];
942
+ }
943
+ else {
944
+ here_op = 32 + 64; /* end of block */
945
+ here_val = 0;
946
+ }
947
+
948
+ /* replicate for those indices with low len bits equal to huff */
949
+ incr = 1 << (len - drop);
950
+ fill = 1 << curr;
951
+ min = fill; /* save offset to next table */
952
+ do {
953
+ fill -= incr;
954
+ table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;
955
+ } while (fill !== 0);
956
+
957
+ /* backwards increment the len-bit code huff */
958
+ incr = 1 << (len - 1);
959
+ while (huff & incr) {
960
+ incr >>= 1;
961
+ }
962
+ if (incr !== 0) {
963
+ huff &= incr - 1;
964
+ huff += incr;
965
+ } else {
966
+ huff = 0;
967
+ }
968
+
969
+ /* go to next symbol, update count, len */
970
+ sym++;
971
+ if (--count[len] === 0) {
972
+ if (len === max) { break; }
973
+ len = lens[lens_index + work[sym]];
974
+ }
975
+
976
+ /* create new sub-table if needed */
977
+ if (len > root && (huff & mask) !== low) {
978
+ /* if first time, transition to sub-tables */
979
+ if (drop === 0) {
980
+ drop = root;
981
+ }
982
+
983
+ /* increment past last table */
984
+ next += min; /* here min is 1 << curr */
985
+
986
+ /* determine length of next table */
987
+ curr = len - drop;
988
+ left = 1 << curr;
989
+ while (curr + drop < max) {
990
+ left -= count[curr + drop];
991
+ if (left <= 0) { break; }
992
+ curr++;
993
+ left <<= 1;
994
+ }
995
+
996
+ /* check for enough space */
997
+ used += 1 << curr;
998
+ if ((type === LENS$1 && used > ENOUGH_LENS$1) ||
999
+ (type === DISTS$1 && used > ENOUGH_DISTS$1)) {
1000
+ return 1;
1001
+ }
1002
+
1003
+ /* point entry in root table to sub-table */
1004
+ low = huff & mask;
1005
+ /*table.op[low] = curr;
1006
+ table.bits[low] = root;
1007
+ table.val[low] = next - opts.table_index;*/
1008
+ table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;
1009
+ }
1010
+ }
1011
+
1012
+ /* fill in remaining table entry if code is incomplete (guaranteed to have
1013
+ at most one remaining entry, since if the code is incomplete, the
1014
+ maximum code length that was allowed to get this far is one bit) */
1015
+ if (huff !== 0) {
1016
+ //table.op[next + huff] = 64; /* invalid code marker */
1017
+ //table.bits[next + huff] = len - drop;
1018
+ //table.val[next + huff] = 0;
1019
+ table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;
1020
+ }
1021
+
1022
+ /* set return parameters */
1023
+ //opts.table_index += used;
1024
+ opts.bits = root;
1025
+ return 0;
1026
+ };
1027
+
1028
+
1029
+ var inftrees = inflate_table$1;
1030
+
1031
+ // (C) 1995-2013 Jean-loup Gailly and Mark Adler
1032
+ // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
1033
+ //
1034
+ // This software is provided 'as-is', without any express or implied
1035
+ // warranty. In no event will the authors be held liable for any damages
1036
+ // arising from the use of this software.
1037
+ //
1038
+ // Permission is granted to anyone to use this software for any purpose,
1039
+ // including commercial applications, and to alter it and redistribute it
1040
+ // freely, subject to the following restrictions:
1041
+ //
1042
+ // 1. The origin of this software must not be misrepresented; you must not
1043
+ // claim that you wrote the original software. If you use this software
1044
+ // in a product, an acknowledgment in the product documentation would be
1045
+ // appreciated but is not required.
1046
+ // 2. Altered source versions must be plainly marked as such, and must not be
1047
+ // misrepresented as being the original software.
1048
+ // 3. This notice may not be removed or altered from any source distribution.
1049
+
1050
+ var constants = {
1051
+
1052
+ /* Allowed flush values; see deflate() and inflate() below for details */
1053
+ Z_NO_FLUSH: 0,
1054
+ Z_PARTIAL_FLUSH: 1,
1055
+ Z_SYNC_FLUSH: 2,
1056
+ Z_FULL_FLUSH: 3,
1057
+ Z_FINISH: 4,
1058
+ Z_BLOCK: 5,
1059
+ Z_TREES: 6,
1060
+
1061
+ /* Return codes for the compression/decompression functions. Negative values
1062
+ * are errors, positive values are used for special but normal events.
1063
+ */
1064
+ Z_OK: 0,
1065
+ Z_STREAM_END: 1,
1066
+ Z_NEED_DICT: 2,
1067
+ Z_ERRNO: -1,
1068
+ Z_STREAM_ERROR: -2,
1069
+ Z_DATA_ERROR: -3,
1070
+ Z_MEM_ERROR: -4,
1071
+ Z_BUF_ERROR: -5,
1072
+ //Z_VERSION_ERROR: -6,
1073
+
1074
+ /* compression levels */
1075
+ Z_NO_COMPRESSION: 0,
1076
+ Z_BEST_SPEED: 1,
1077
+ Z_BEST_COMPRESSION: 9,
1078
+ Z_DEFAULT_COMPRESSION: -1,
1079
+
1080
+
1081
+ Z_FILTERED: 1,
1082
+ Z_HUFFMAN_ONLY: 2,
1083
+ Z_RLE: 3,
1084
+ Z_FIXED: 4,
1085
+ Z_DEFAULT_STRATEGY: 0,
1086
+
1087
+ /* Possible values of the data_type field (though see inflate()) */
1088
+ Z_BINARY: 0,
1089
+ Z_TEXT: 1,
1090
+ //Z_ASCII: 1, // = Z_TEXT (deprecated)
1091
+ Z_UNKNOWN: 2,
1092
+
1093
+ /* The deflate compression method */
1094
+ Z_DEFLATED: 8
1095
+ //Z_NULL: null // Use -1 or null inline, depending on var type
1096
+ };
1097
+
1098
+ // (C) 1995-2013 Jean-loup Gailly and Mark Adler
1099
+ // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
1100
+ //
1101
+ // This software is provided 'as-is', without any express or implied
1102
+ // warranty. In no event will the authors be held liable for any damages
1103
+ // arising from the use of this software.
1104
+ //
1105
+ // Permission is granted to anyone to use this software for any purpose,
1106
+ // including commercial applications, and to alter it and redistribute it
1107
+ // freely, subject to the following restrictions:
1108
+ //
1109
+ // 1. The origin of this software must not be misrepresented; you must not
1110
+ // claim that you wrote the original software. If you use this software
1111
+ // in a product, an acknowledgment in the product documentation would be
1112
+ // appreciated but is not required.
1113
+ // 2. Altered source versions must be plainly marked as such, and must not be
1114
+ // misrepresented as being the original software.
1115
+ // 3. This notice may not be removed or altered from any source distribution.
1116
+
1117
+ const adler32 = adler32_1;
1118
+ const crc32 = crc32_1;
1119
+ const inflate_fast = inffast;
1120
+ const inflate_table = inftrees;
1121
+
1122
+ const CODES = 0;
1123
+ const LENS = 1;
1124
+ const DISTS = 2;
1125
+
1126
+ /* Public constants ==========================================================*/
1127
+ /* ===========================================================================*/
1128
+
1129
+ const {
1130
+ Z_FINISH: Z_FINISH$1, Z_BLOCK, Z_TREES,
1131
+ Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR: Z_MEM_ERROR$1, Z_BUF_ERROR,
1132
+ Z_DEFLATED
1133
+ } = constants;
1134
+
1135
+
1136
+ /* STATES ====================================================================*/
1137
+ /* ===========================================================================*/
1138
+
1139
+
1140
+ const HEAD = 1; /* i: waiting for magic header */
1141
+ const FLAGS = 2; /* i: waiting for method and flags (gzip) */
1142
+ const TIME = 3; /* i: waiting for modification time (gzip) */
1143
+ const OS = 4; /* i: waiting for extra flags and operating system (gzip) */
1144
+ const EXLEN = 5; /* i: waiting for extra length (gzip) */
1145
+ const EXTRA = 6; /* i: waiting for extra bytes (gzip) */
1146
+ const NAME = 7; /* i: waiting for end of file name (gzip) */
1147
+ const COMMENT = 8; /* i: waiting for end of comment (gzip) */
1148
+ const HCRC = 9; /* i: waiting for header crc (gzip) */
1149
+ const DICTID = 10; /* i: waiting for dictionary check value */
1150
+ const DICT = 11; /* waiting for inflateSetDictionary() call */
1151
+ const TYPE = 12; /* i: waiting for type bits, including last-flag bit */
1152
+ const TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */
1153
+ const STORED = 14; /* i: waiting for stored size (length and complement) */
1154
+ const COPY_ = 15; /* i/o: same as COPY below, but only first time in */
1155
+ const COPY = 16; /* i/o: waiting for input or output to copy stored block */
1156
+ const TABLE = 17; /* i: waiting for dynamic block table lengths */
1157
+ const LENLENS = 18; /* i: waiting for code length code lengths */
1158
+ const CODELENS = 19; /* i: waiting for length/lit and distance code lengths */
1159
+ const LEN_ = 20; /* i: same as LEN below, but only first time in */
1160
+ const LEN = 21; /* i: waiting for length/lit/eob code */
1161
+ const LENEXT = 22; /* i: waiting for length extra bits */
1162
+ const DIST = 23; /* i: waiting for distance code */
1163
+ const DISTEXT = 24; /* i: waiting for distance extra bits */
1164
+ const MATCH = 25; /* o: waiting for output space to copy string */
1165
+ const LIT = 26; /* o: waiting for output space to write literal */
1166
+ const CHECK = 27; /* i: waiting for 32-bit check value */
1167
+ const LENGTH = 28; /* i: waiting for 32-bit length (gzip) */
1168
+ const DONE = 29; /* finished check, done -- remain here until reset */
1169
+ const BAD = 30; /* got a data error -- remain here until reset */
1170
+ const MEM = 31; /* got an inflate() memory error -- remain here until reset */
1171
+ const SYNC = 32; /* looking for synchronization bytes to restart inflate() */
1172
+
1173
+ /* ===========================================================================*/
1174
+
1175
+
1176
+
1177
+ const ENOUGH_LENS = 852;
1178
+ const ENOUGH_DISTS = 592;
1179
+ //const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
1180
+
1181
+ const MAX_WBITS = 15;
1182
+ /* 32K LZ77 window */
1183
+ const DEF_WBITS = MAX_WBITS;
1184
+
1185
+
1186
+ const zswap32 = (q) => {
1187
+
1188
+ return (((q >>> 24) & 0xff) +
1189
+ ((q >>> 8) & 0xff00) +
1190
+ ((q & 0xff00) << 8) +
1191
+ ((q & 0xff) << 24));
1192
+ };
1193
+
1194
+
1195
+ function InflateState() {
1196
+ this.mode = 0; /* current inflate mode */
1197
+ this.last = false; /* true if processing last block */
1198
+ this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */
1199
+ this.havedict = false; /* true if dictionary provided */
1200
+ this.flags = 0; /* gzip header method and flags (0 if zlib) */
1201
+ this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */
1202
+ this.check = 0; /* protected copy of check value */
1203
+ this.total = 0; /* protected copy of output count */
1204
+ // TODO: may be {}
1205
+ this.head = null; /* where to save gzip header information */
1206
+
1207
+ /* sliding window */
1208
+ this.wbits = 0; /* log base 2 of requested window size */
1209
+ this.wsize = 0; /* window size or zero if not using window */
1210
+ this.whave = 0; /* valid bytes in the window */
1211
+ this.wnext = 0; /* window write index */
1212
+ this.window = null; /* allocated sliding window, if needed */
1213
+
1214
+ /* bit accumulator */
1215
+ this.hold = 0; /* input bit accumulator */
1216
+ this.bits = 0; /* number of bits in "in" */
1217
+
1218
+ /* for string and stored block copying */
1219
+ this.length = 0; /* literal or length of data to copy */
1220
+ this.offset = 0; /* distance back to copy string from */
1221
+
1222
+ /* for table and code decoding */
1223
+ this.extra = 0; /* extra bits needed */
1224
+
1225
+ /* fixed and dynamic code tables */
1226
+ this.lencode = null; /* starting table for length/literal codes */
1227
+ this.distcode = null; /* starting table for distance codes */
1228
+ this.lenbits = 0; /* index bits for lencode */
1229
+ this.distbits = 0; /* index bits for distcode */
1230
+
1231
+ /* dynamic table building */
1232
+ this.ncode = 0; /* number of code length code lengths */
1233
+ this.nlen = 0; /* number of length code lengths */
1234
+ this.ndist = 0; /* number of distance code lengths */
1235
+ this.have = 0; /* number of code lengths in lens[] */
1236
+ this.next = null; /* next available space in codes[] */
1237
+
1238
+ this.lens = new Uint16Array(320); /* temporary storage for code lengths */
1239
+ this.work = new Uint16Array(288); /* work area for code table building */
1240
+
1241
+ /*
1242
+ because we don't have pointers in js, we use lencode and distcode directly
1243
+ as buffers so we don't need codes
1244
+ */
1245
+ //this.codes = new Int32Array(ENOUGH); /* space for code tables */
1246
+ this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */
1247
+ this.distdyn = null; /* dynamic table for distance codes (JS specific) */
1248
+ this.sane = 0; /* if false, allow invalid distance too far */
1249
+ this.back = 0; /* bits back of last unprocessed length/lit */
1250
+ this.was = 0; /* initial length of match */
1251
+ }
1252
+
1253
+
1254
+ const inflateResetKeep = (strm) => {
1255
+
1256
+ if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }
1257
+ const state = strm.state;
1258
+ strm.total_in = strm.total_out = state.total = 0;
1259
+ strm.msg = ''; /*Z_NULL*/
1260
+ if (state.wrap) { /* to support ill-conceived Java test suite */
1261
+ strm.adler = state.wrap & 1;
1262
+ }
1263
+ state.mode = HEAD;
1264
+ state.last = 0;
1265
+ state.havedict = 0;
1266
+ state.dmax = 32768;
1267
+ state.head = null/*Z_NULL*/;
1268
+ state.hold = 0;
1269
+ state.bits = 0;
1270
+ //state.lencode = state.distcode = state.next = state.codes;
1271
+ state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS);
1272
+ state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS);
1273
+
1274
+ state.sane = 1;
1275
+ state.back = -1;
1276
+ //Tracev((stderr, "inflate: reset\n"));
1277
+ return Z_OK$1;
1278
+ };
1279
+
1280
+
1281
+ const inflateReset = (strm) => {
1282
+
1283
+ if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }
1284
+ const state = strm.state;
1285
+ state.wsize = 0;
1286
+ state.whave = 0;
1287
+ state.wnext = 0;
1288
+ return inflateResetKeep(strm);
1289
+
1290
+ };
1291
+
1292
+
1293
+ const inflateReset2 = (strm, windowBits) => {
1294
+ let wrap;
1295
+
1296
+ /* get the state */
1297
+ if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }
1298
+ const state = strm.state;
1299
+
1300
+ /* extract wrap request from windowBits parameter */
1301
+ if (windowBits < 0) {
1302
+ wrap = 0;
1303
+ windowBits = -windowBits;
1304
+ }
1305
+ else {
1306
+ wrap = (windowBits >> 4) + 1;
1307
+ if (windowBits < 48) {
1308
+ windowBits &= 15;
1309
+ }
1310
+ }
1311
+
1312
+ /* set number of window bits, free window if different */
1313
+ if (windowBits && (windowBits < 8 || windowBits > 15)) {
1314
+ return Z_STREAM_ERROR$1;
1315
+ }
1316
+ if (state.window !== null && state.wbits !== windowBits) {
1317
+ state.window = null;
1318
+ }
1319
+
1320
+ /* update state and reset the rest of it */
1321
+ state.wrap = wrap;
1322
+ state.wbits = windowBits;
1323
+ return inflateReset(strm);
1324
+ };
1325
+
1326
+
1327
+ const inflateInit2 = (strm, windowBits) => {
1328
+
1329
+ if (!strm) { return Z_STREAM_ERROR$1; }
1330
+ //strm.msg = Z_NULL; /* in case we return an error */
1331
+
1332
+ const state = new InflateState();
1333
+
1334
+ //if (state === Z_NULL) return Z_MEM_ERROR;
1335
+ //Tracev((stderr, "inflate: allocated\n"));
1336
+ strm.state = state;
1337
+ state.window = null/*Z_NULL*/;
1338
+ const ret = inflateReset2(strm, windowBits);
1339
+ if (ret !== Z_OK$1) {
1340
+ strm.state = null/*Z_NULL*/;
1341
+ }
1342
+ return ret;
1343
+ };
1344
+
1345
+
1346
+ const inflateInit = (strm) => {
1347
+
1348
+ return inflateInit2(strm, DEF_WBITS);
1349
+ };
1350
+
1351
+
1352
+ /*
1353
+ Return state with length and distance decoding tables and index sizes set to
1354
+ fixed code decoding. Normally this returns fixed tables from inffixed.h.
1355
+ If BUILDFIXED is defined, then instead this routine builds the tables the
1356
+ first time it's called, and returns those tables the first time and
1357
+ thereafter. This reduces the size of the code by about 2K bytes, in
1358
+ exchange for a little execution time. However, BUILDFIXED should not be
1359
+ used for threaded applications, since the rewriting of the tables and virgin
1360
+ may not be thread-safe.
1361
+ */
1362
+ let virgin = true;
1363
+
1364
+ let lenfix, distfix; // We have no pointers in JS, so keep tables separate
1365
+
1366
+
1367
+ const fixedtables = (state) => {
1368
+
1369
+ /* build fixed huffman tables if first call (may not be thread safe) */
1370
+ if (virgin) {
1371
+ lenfix = new Int32Array(512);
1372
+ distfix = new Int32Array(32);
1373
+
1374
+ /* literal/length table */
1375
+ let sym = 0;
1376
+ while (sym < 144) { state.lens[sym++] = 8; }
1377
+ while (sym < 256) { state.lens[sym++] = 9; }
1378
+ while (sym < 280) { state.lens[sym++] = 7; }
1379
+ while (sym < 288) { state.lens[sym++] = 8; }
1380
+
1381
+ inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });
1382
+
1383
+ /* distance table */
1384
+ sym = 0;
1385
+ while (sym < 32) { state.lens[sym++] = 5; }
1386
+
1387
+ inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });
1388
+
1389
+ /* do this just once */
1390
+ virgin = false;
1391
+ }
1392
+
1393
+ state.lencode = lenfix;
1394
+ state.lenbits = 9;
1395
+ state.distcode = distfix;
1396
+ state.distbits = 5;
1397
+ };
1398
+
1399
+
1400
+ /*
1401
+ Update the window with the last wsize (normally 32K) bytes written before
1402
+ returning. If window does not exist yet, create it. This is only called
1403
+ when a window is already in use, or when output has been written during this
1404
+ inflate call, but the end of the deflate stream has not been reached yet.
1405
+ It is also called to create a window for dictionary data when a dictionary
1406
+ is loaded.
1407
+
1408
+ Providing output buffers larger than 32K to inflate() should provide a speed
1409
+ advantage, since only the last 32K of output is copied to the sliding window
1410
+ upon return from inflate(), and since all distances after the first 32K of
1411
+ output will fall in the output data, making match copies simpler and faster.
1412
+ The advantage may be dependent on the size of the processor's data caches.
1413
+ */
1414
+ const updatewindow = (strm, src, end, copy) => {
1415
+
1416
+ let dist;
1417
+ const state = strm.state;
1418
+
1419
+ /* if it hasn't been done already, allocate space for the window */
1420
+ if (state.window === null) {
1421
+ state.wsize = 1 << state.wbits;
1422
+ state.wnext = 0;
1423
+ state.whave = 0;
1424
+
1425
+ state.window = new Uint8Array(state.wsize);
1426
+ }
1427
+
1428
+ /* copy state->wsize or less output bytes into the circular window */
1429
+ if (copy >= state.wsize) {
1430
+ state.window.set(src.subarray(end - state.wsize, end), 0);
1431
+ state.wnext = 0;
1432
+ state.whave = state.wsize;
1433
+ }
1434
+ else {
1435
+ dist = state.wsize - state.wnext;
1436
+ if (dist > copy) {
1437
+ dist = copy;
1438
+ }
1439
+ //zmemcpy(state->window + state->wnext, end - copy, dist);
1440
+ state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);
1441
+ copy -= dist;
1442
+ if (copy) {
1443
+ //zmemcpy(state->window, end - copy, copy);
1444
+ state.window.set(src.subarray(end - copy, end), 0);
1445
+ state.wnext = copy;
1446
+ state.whave = state.wsize;
1447
+ }
1448
+ else {
1449
+ state.wnext += dist;
1450
+ if (state.wnext === state.wsize) { state.wnext = 0; }
1451
+ if (state.whave < state.wsize) { state.whave += dist; }
1452
+ }
1453
+ }
1454
+ return 0;
1455
+ };
1456
+
1457
+
1458
+ const inflate$1 = (strm, flush) => {
1459
+
1460
+ let state;
1461
+ let input, output; // input/output buffers
1462
+ let next; /* next input INDEX */
1463
+ let put; /* next output INDEX */
1464
+ let have, left; /* available input and output */
1465
+ let hold; /* bit buffer */
1466
+ let bits; /* bits in bit buffer */
1467
+ let _in, _out; /* save starting available input and output */
1468
+ let copy; /* number of stored or match bytes to copy */
1469
+ let from; /* where to copy match bytes from */
1470
+ let from_source;
1471
+ let here = 0; /* current decoding table entry */
1472
+ let here_bits, here_op, here_val; // paked "here" denormalized (JS specific)
1473
+ //let last; /* parent table entry */
1474
+ let last_bits, last_op, last_val; // paked "last" denormalized (JS specific)
1475
+ let len; /* length to copy for repeats, bits to drop */
1476
+ let ret; /* return code */
1477
+ const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */
1478
+ let opts;
1479
+
1480
+ let n; // temporary variable for NEED_BITS
1481
+
1482
+ const order = /* permutation of code lengths */
1483
+ new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);
1484
+
1485
+
1486
+ if (!strm || !strm.state || !strm.output ||
1487
+ (!strm.input && strm.avail_in !== 0)) {
1488
+ return Z_STREAM_ERROR$1;
1489
+ }
1490
+
1491
+ state = strm.state;
1492
+ if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */
1493
+
1494
+
1495
+ //--- LOAD() ---
1496
+ put = strm.next_out;
1497
+ output = strm.output;
1498
+ left = strm.avail_out;
1499
+ next = strm.next_in;
1500
+ input = strm.input;
1501
+ have = strm.avail_in;
1502
+ hold = state.hold;
1503
+ bits = state.bits;
1504
+ //---
1505
+
1506
+ _in = have;
1507
+ _out = left;
1508
+ ret = Z_OK$1;
1509
+
1510
+ inf_leave: // goto emulation
1511
+ for (;;) {
1512
+ switch (state.mode) {
1513
+ case HEAD:
1514
+ if (state.wrap === 0) {
1515
+ state.mode = TYPEDO;
1516
+ break;
1517
+ }
1518
+ //=== NEEDBITS(16);
1519
+ while (bits < 16) {
1520
+ if (have === 0) { break inf_leave; }
1521
+ have--;
1522
+ hold += input[next++] << bits;
1523
+ bits += 8;
1524
+ }
1525
+ //===//
1526
+ if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */
1527
+ state.check = 0/*crc32(0L, Z_NULL, 0)*/;
1528
+ //=== CRC2(state.check, hold);
1529
+ hbuf[0] = hold & 0xff;
1530
+ hbuf[1] = (hold >>> 8) & 0xff;
1531
+ state.check = crc32(state.check, hbuf, 2, 0);
1532
+ //===//
1533
+
1534
+ //=== INITBITS();
1535
+ hold = 0;
1536
+ bits = 0;
1537
+ //===//
1538
+ state.mode = FLAGS;
1539
+ break;
1540
+ }
1541
+ state.flags = 0; /* expect zlib header */
1542
+ if (state.head) {
1543
+ state.head.done = false;
1544
+ }
1545
+ if (!(state.wrap & 1) || /* check if zlib header allowed */
1546
+ (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {
1547
+ strm.msg = 'incorrect header check';
1548
+ state.mode = BAD;
1549
+ break;
1550
+ }
1551
+ if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {
1552
+ strm.msg = 'unknown compression method';
1553
+ state.mode = BAD;
1554
+ break;
1555
+ }
1556
+ //--- DROPBITS(4) ---//
1557
+ hold >>>= 4;
1558
+ bits -= 4;
1559
+ //---//
1560
+ len = (hold & 0x0f)/*BITS(4)*/ + 8;
1561
+ if (state.wbits === 0) {
1562
+ state.wbits = len;
1563
+ }
1564
+ else if (len > state.wbits) {
1565
+ strm.msg = 'invalid window size';
1566
+ state.mode = BAD;
1567
+ break;
1568
+ }
1569
+
1570
+ // !!! pako patch. Force use `options.windowBits` if passed.
1571
+ // Required to always use max window size by default.
1572
+ state.dmax = 1 << state.wbits;
1573
+ //state.dmax = 1 << len;
1574
+
1575
+ //Tracev((stderr, "inflate: zlib header ok\n"));
1576
+ strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
1577
+ state.mode = hold & 0x200 ? DICTID : TYPE;
1578
+ //=== INITBITS();
1579
+ hold = 0;
1580
+ bits = 0;
1581
+ //===//
1582
+ break;
1583
+ case FLAGS:
1584
+ //=== NEEDBITS(16); */
1585
+ while (bits < 16) {
1586
+ if (have === 0) { break inf_leave; }
1587
+ have--;
1588
+ hold += input[next++] << bits;
1589
+ bits += 8;
1590
+ }
1591
+ //===//
1592
+ state.flags = hold;
1593
+ if ((state.flags & 0xff) !== Z_DEFLATED) {
1594
+ strm.msg = 'unknown compression method';
1595
+ state.mode = BAD;
1596
+ break;
1597
+ }
1598
+ if (state.flags & 0xe000) {
1599
+ strm.msg = 'unknown header flags set';
1600
+ state.mode = BAD;
1601
+ break;
1602
+ }
1603
+ if (state.head) {
1604
+ state.head.text = ((hold >> 8) & 1);
1605
+ }
1606
+ if (state.flags & 0x0200) {
1607
+ //=== CRC2(state.check, hold);
1608
+ hbuf[0] = hold & 0xff;
1609
+ hbuf[1] = (hold >>> 8) & 0xff;
1610
+ state.check = crc32(state.check, hbuf, 2, 0);
1611
+ //===//
1612
+ }
1613
+ //=== INITBITS();
1614
+ hold = 0;
1615
+ bits = 0;
1616
+ //===//
1617
+ state.mode = TIME;
1618
+ /* falls through */
1619
+ case TIME:
1620
+ //=== NEEDBITS(32); */
1621
+ while (bits < 32) {
1622
+ if (have === 0) { break inf_leave; }
1623
+ have--;
1624
+ hold += input[next++] << bits;
1625
+ bits += 8;
1626
+ }
1627
+ //===//
1628
+ if (state.head) {
1629
+ state.head.time = hold;
1630
+ }
1631
+ if (state.flags & 0x0200) {
1632
+ //=== CRC4(state.check, hold)
1633
+ hbuf[0] = hold & 0xff;
1634
+ hbuf[1] = (hold >>> 8) & 0xff;
1635
+ hbuf[2] = (hold >>> 16) & 0xff;
1636
+ hbuf[3] = (hold >>> 24) & 0xff;
1637
+ state.check = crc32(state.check, hbuf, 4, 0);
1638
+ //===
1639
+ }
1640
+ //=== INITBITS();
1641
+ hold = 0;
1642
+ bits = 0;
1643
+ //===//
1644
+ state.mode = OS;
1645
+ /* falls through */
1646
+ case OS:
1647
+ //=== NEEDBITS(16); */
1648
+ while (bits < 16) {
1649
+ if (have === 0) { break inf_leave; }
1650
+ have--;
1651
+ hold += input[next++] << bits;
1652
+ bits += 8;
1653
+ }
1654
+ //===//
1655
+ if (state.head) {
1656
+ state.head.xflags = (hold & 0xff);
1657
+ state.head.os = (hold >> 8);
1658
+ }
1659
+ if (state.flags & 0x0200) {
1660
+ //=== CRC2(state.check, hold);
1661
+ hbuf[0] = hold & 0xff;
1662
+ hbuf[1] = (hold >>> 8) & 0xff;
1663
+ state.check = crc32(state.check, hbuf, 2, 0);
1664
+ //===//
1665
+ }
1666
+ //=== INITBITS();
1667
+ hold = 0;
1668
+ bits = 0;
1669
+ //===//
1670
+ state.mode = EXLEN;
1671
+ /* falls through */
1672
+ case EXLEN:
1673
+ if (state.flags & 0x0400) {
1674
+ //=== NEEDBITS(16); */
1675
+ while (bits < 16) {
1676
+ if (have === 0) { break inf_leave; }
1677
+ have--;
1678
+ hold += input[next++] << bits;
1679
+ bits += 8;
1680
+ }
1681
+ //===//
1682
+ state.length = hold;
1683
+ if (state.head) {
1684
+ state.head.extra_len = hold;
1685
+ }
1686
+ if (state.flags & 0x0200) {
1687
+ //=== CRC2(state.check, hold);
1688
+ hbuf[0] = hold & 0xff;
1689
+ hbuf[1] = (hold >>> 8) & 0xff;
1690
+ state.check = crc32(state.check, hbuf, 2, 0);
1691
+ //===//
1692
+ }
1693
+ //=== INITBITS();
1694
+ hold = 0;
1695
+ bits = 0;
1696
+ //===//
1697
+ }
1698
+ else if (state.head) {
1699
+ state.head.extra = null/*Z_NULL*/;
1700
+ }
1701
+ state.mode = EXTRA;
1702
+ /* falls through */
1703
+ case EXTRA:
1704
+ if (state.flags & 0x0400) {
1705
+ copy = state.length;
1706
+ if (copy > have) { copy = have; }
1707
+ if (copy) {
1708
+ if (state.head) {
1709
+ len = state.head.extra_len - state.length;
1710
+ if (!state.head.extra) {
1711
+ // Use untyped array for more convenient processing later
1712
+ state.head.extra = new Uint8Array(state.head.extra_len);
1713
+ }
1714
+ state.head.extra.set(
1715
+ input.subarray(
1716
+ next,
1717
+ // extra field is limited to 65536 bytes
1718
+ // - no need for additional size check
1719
+ next + copy
1720
+ ),
1721
+ /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
1722
+ len
1723
+ );
1724
+ //zmemcpy(state.head.extra + len, next,
1725
+ // len + copy > state.head.extra_max ?
1726
+ // state.head.extra_max - len : copy);
1727
+ }
1728
+ if (state.flags & 0x0200) {
1729
+ state.check = crc32(state.check, input, copy, next);
1730
+ }
1731
+ have -= copy;
1732
+ next += copy;
1733
+ state.length -= copy;
1734
+ }
1735
+ if (state.length) { break inf_leave; }
1736
+ }
1737
+ state.length = 0;
1738
+ state.mode = NAME;
1739
+ /* falls through */
1740
+ case NAME:
1741
+ if (state.flags & 0x0800) {
1742
+ if (have === 0) { break inf_leave; }
1743
+ copy = 0;
1744
+ do {
1745
+ // TODO: 2 or 1 bytes?
1746
+ len = input[next + copy++];
1747
+ /* use constant limit because in js we should not preallocate memory */
1748
+ if (state.head && len &&
1749
+ (state.length < 65536 /*state.head.name_max*/)) {
1750
+ state.head.name += String.fromCharCode(len);
1751
+ }
1752
+ } while (len && copy < have);
1753
+
1754
+ if (state.flags & 0x0200) {
1755
+ state.check = crc32(state.check, input, copy, next);
1756
+ }
1757
+ have -= copy;
1758
+ next += copy;
1759
+ if (len) { break inf_leave; }
1760
+ }
1761
+ else if (state.head) {
1762
+ state.head.name = null;
1763
+ }
1764
+ state.length = 0;
1765
+ state.mode = COMMENT;
1766
+ /* falls through */
1767
+ case COMMENT:
1768
+ if (state.flags & 0x1000) {
1769
+ if (have === 0) { break inf_leave; }
1770
+ copy = 0;
1771
+ do {
1772
+ len = input[next + copy++];
1773
+ /* use constant limit because in js we should not preallocate memory */
1774
+ if (state.head && len &&
1775
+ (state.length < 65536 /*state.head.comm_max*/)) {
1776
+ state.head.comment += String.fromCharCode(len);
1777
+ }
1778
+ } while (len && copy < have);
1779
+ if (state.flags & 0x0200) {
1780
+ state.check = crc32(state.check, input, copy, next);
1781
+ }
1782
+ have -= copy;
1783
+ next += copy;
1784
+ if (len) { break inf_leave; }
1785
+ }
1786
+ else if (state.head) {
1787
+ state.head.comment = null;
1788
+ }
1789
+ state.mode = HCRC;
1790
+ /* falls through */
1791
+ case HCRC:
1792
+ if (state.flags & 0x0200) {
1793
+ //=== NEEDBITS(16); */
1794
+ while (bits < 16) {
1795
+ if (have === 0) { break inf_leave; }
1796
+ have--;
1797
+ hold += input[next++] << bits;
1798
+ bits += 8;
1799
+ }
1800
+ //===//
1801
+ if (hold !== (state.check & 0xffff)) {
1802
+ strm.msg = 'header crc mismatch';
1803
+ state.mode = BAD;
1804
+ break;
1805
+ }
1806
+ //=== INITBITS();
1807
+ hold = 0;
1808
+ bits = 0;
1809
+ //===//
1810
+ }
1811
+ if (state.head) {
1812
+ state.head.hcrc = ((state.flags >> 9) & 1);
1813
+ state.head.done = true;
1814
+ }
1815
+ strm.adler = state.check = 0;
1816
+ state.mode = TYPE;
1817
+ break;
1818
+ case DICTID:
1819
+ //=== NEEDBITS(32); */
1820
+ while (bits < 32) {
1821
+ if (have === 0) { break inf_leave; }
1822
+ have--;
1823
+ hold += input[next++] << bits;
1824
+ bits += 8;
1825
+ }
1826
+ //===//
1827
+ strm.adler = state.check = zswap32(hold);
1828
+ //=== INITBITS();
1829
+ hold = 0;
1830
+ bits = 0;
1831
+ //===//
1832
+ state.mode = DICT;
1833
+ /* falls through */
1834
+ case DICT:
1835
+ if (state.havedict === 0) {
1836
+ //--- RESTORE() ---
1837
+ strm.next_out = put;
1838
+ strm.avail_out = left;
1839
+ strm.next_in = next;
1840
+ strm.avail_in = have;
1841
+ state.hold = hold;
1842
+ state.bits = bits;
1843
+ //---
1844
+ return Z_NEED_DICT$1;
1845
+ }
1846
+ strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
1847
+ state.mode = TYPE;
1848
+ /* falls through */
1849
+ case TYPE:
1850
+ if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }
1851
+ /* falls through */
1852
+ case TYPEDO:
1853
+ if (state.last) {
1854
+ //--- BYTEBITS() ---//
1855
+ hold >>>= bits & 7;
1856
+ bits -= bits & 7;
1857
+ //---//
1858
+ state.mode = CHECK;
1859
+ break;
1860
+ }
1861
+ //=== NEEDBITS(3); */
1862
+ while (bits < 3) {
1863
+ if (have === 0) { break inf_leave; }
1864
+ have--;
1865
+ hold += input[next++] << bits;
1866
+ bits += 8;
1867
+ }
1868
+ //===//
1869
+ state.last = (hold & 0x01)/*BITS(1)*/;
1870
+ //--- DROPBITS(1) ---//
1871
+ hold >>>= 1;
1872
+ bits -= 1;
1873
+ //---//
1874
+
1875
+ switch ((hold & 0x03)/*BITS(2)*/) {
1876
+ case 0: /* stored block */
1877
+ //Tracev((stderr, "inflate: stored block%s\n",
1878
+ // state.last ? " (last)" : ""));
1879
+ state.mode = STORED;
1880
+ break;
1881
+ case 1: /* fixed block */
1882
+ fixedtables(state);
1883
+ //Tracev((stderr, "inflate: fixed codes block%s\n",
1884
+ // state.last ? " (last)" : ""));
1885
+ state.mode = LEN_; /* decode codes */
1886
+ if (flush === Z_TREES) {
1887
+ //--- DROPBITS(2) ---//
1888
+ hold >>>= 2;
1889
+ bits -= 2;
1890
+ //---//
1891
+ break inf_leave;
1892
+ }
1893
+ break;
1894
+ case 2: /* dynamic block */
1895
+ //Tracev((stderr, "inflate: dynamic codes block%s\n",
1896
+ // state.last ? " (last)" : ""));
1897
+ state.mode = TABLE;
1898
+ break;
1899
+ case 3:
1900
+ strm.msg = 'invalid block type';
1901
+ state.mode = BAD;
1902
+ }
1903
+ //--- DROPBITS(2) ---//
1904
+ hold >>>= 2;
1905
+ bits -= 2;
1906
+ //---//
1907
+ break;
1908
+ case STORED:
1909
+ //--- BYTEBITS() ---// /* go to byte boundary */
1910
+ hold >>>= bits & 7;
1911
+ bits -= bits & 7;
1912
+ //---//
1913
+ //=== NEEDBITS(32); */
1914
+ while (bits < 32) {
1915
+ if (have === 0) { break inf_leave; }
1916
+ have--;
1917
+ hold += input[next++] << bits;
1918
+ bits += 8;
1919
+ }
1920
+ //===//
1921
+ if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {
1922
+ strm.msg = 'invalid stored block lengths';
1923
+ state.mode = BAD;
1924
+ break;
1925
+ }
1926
+ state.length = hold & 0xffff;
1927
+ //Tracev((stderr, "inflate: stored length %u\n",
1928
+ // state.length));
1929
+ //=== INITBITS();
1930
+ hold = 0;
1931
+ bits = 0;
1932
+ //===//
1933
+ state.mode = COPY_;
1934
+ if (flush === Z_TREES) { break inf_leave; }
1935
+ /* falls through */
1936
+ case COPY_:
1937
+ state.mode = COPY;
1938
+ /* falls through */
1939
+ case COPY:
1940
+ copy = state.length;
1941
+ if (copy) {
1942
+ if (copy > have) { copy = have; }
1943
+ if (copy > left) { copy = left; }
1944
+ if (copy === 0) { break inf_leave; }
1945
+ //--- zmemcpy(put, next, copy); ---
1946
+ output.set(input.subarray(next, next + copy), put);
1947
+ //---//
1948
+ have -= copy;
1949
+ next += copy;
1950
+ left -= copy;
1951
+ put += copy;
1952
+ state.length -= copy;
1953
+ break;
1954
+ }
1955
+ //Tracev((stderr, "inflate: stored end\n"));
1956
+ state.mode = TYPE;
1957
+ break;
1958
+ case TABLE:
1959
+ //=== NEEDBITS(14); */
1960
+ while (bits < 14) {
1961
+ if (have === 0) { break inf_leave; }
1962
+ have--;
1963
+ hold += input[next++] << bits;
1964
+ bits += 8;
1965
+ }
1966
+ //===//
1967
+ state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;
1968
+ //--- DROPBITS(5) ---//
1969
+ hold >>>= 5;
1970
+ bits -= 5;
1971
+ //---//
1972
+ state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;
1973
+ //--- DROPBITS(5) ---//
1974
+ hold >>>= 5;
1975
+ bits -= 5;
1976
+ //---//
1977
+ state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;
1978
+ //--- DROPBITS(4) ---//
1979
+ hold >>>= 4;
1980
+ bits -= 4;
1981
+ //---//
1982
+ //#ifndef PKZIP_BUG_WORKAROUND
1983
+ if (state.nlen > 286 || state.ndist > 30) {
1984
+ strm.msg = 'too many length or distance symbols';
1985
+ state.mode = BAD;
1986
+ break;
1987
+ }
1988
+ //#endif
1989
+ //Tracev((stderr, "inflate: table sizes ok\n"));
1990
+ state.have = 0;
1991
+ state.mode = LENLENS;
1992
+ /* falls through */
1993
+ case LENLENS:
1994
+ while (state.have < state.ncode) {
1995
+ //=== NEEDBITS(3);
1996
+ while (bits < 3) {
1997
+ if (have === 0) { break inf_leave; }
1998
+ have--;
1999
+ hold += input[next++] << bits;
2000
+ bits += 8;
2001
+ }
2002
+ //===//
2003
+ state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);
2004
+ //--- DROPBITS(3) ---//
2005
+ hold >>>= 3;
2006
+ bits -= 3;
2007
+ //---//
2008
+ }
2009
+ while (state.have < 19) {
2010
+ state.lens[order[state.have++]] = 0;
2011
+ }
2012
+ // We have separate tables & no pointers. 2 commented lines below not needed.
2013
+ //state.next = state.codes;
2014
+ //state.lencode = state.next;
2015
+ // Switch to use dynamic table
2016
+ state.lencode = state.lendyn;
2017
+ state.lenbits = 7;
2018
+
2019
+ opts = { bits: state.lenbits };
2020
+ ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);
2021
+ state.lenbits = opts.bits;
2022
+
2023
+ if (ret) {
2024
+ strm.msg = 'invalid code lengths set';
2025
+ state.mode = BAD;
2026
+ break;
2027
+ }
2028
+ //Tracev((stderr, "inflate: code lengths ok\n"));
2029
+ state.have = 0;
2030
+ state.mode = CODELENS;
2031
+ /* falls through */
2032
+ case CODELENS:
2033
+ while (state.have < state.nlen + state.ndist) {
2034
+ for (;;) {
2035
+ here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/
2036
+ here_bits = here >>> 24;
2037
+ here_op = (here >>> 16) & 0xff;
2038
+ here_val = here & 0xffff;
2039
+
2040
+ if ((here_bits) <= bits) { break; }
2041
+ //--- PULLBYTE() ---//
2042
+ if (have === 0) { break inf_leave; }
2043
+ have--;
2044
+ hold += input[next++] << bits;
2045
+ bits += 8;
2046
+ //---//
2047
+ }
2048
+ if (here_val < 16) {
2049
+ //--- DROPBITS(here.bits) ---//
2050
+ hold >>>= here_bits;
2051
+ bits -= here_bits;
2052
+ //---//
2053
+ state.lens[state.have++] = here_val;
2054
+ }
2055
+ else {
2056
+ if (here_val === 16) {
2057
+ //=== NEEDBITS(here.bits + 2);
2058
+ n = here_bits + 2;
2059
+ while (bits < n) {
2060
+ if (have === 0) { break inf_leave; }
2061
+ have--;
2062
+ hold += input[next++] << bits;
2063
+ bits += 8;
2064
+ }
2065
+ //===//
2066
+ //--- DROPBITS(here.bits) ---//
2067
+ hold >>>= here_bits;
2068
+ bits -= here_bits;
2069
+ //---//
2070
+ if (state.have === 0) {
2071
+ strm.msg = 'invalid bit length repeat';
2072
+ state.mode = BAD;
2073
+ break;
2074
+ }
2075
+ len = state.lens[state.have - 1];
2076
+ copy = 3 + (hold & 0x03);//BITS(2);
2077
+ //--- DROPBITS(2) ---//
2078
+ hold >>>= 2;
2079
+ bits -= 2;
2080
+ //---//
2081
+ }
2082
+ else if (here_val === 17) {
2083
+ //=== NEEDBITS(here.bits + 3);
2084
+ n = here_bits + 3;
2085
+ while (bits < n) {
2086
+ if (have === 0) { break inf_leave; }
2087
+ have--;
2088
+ hold += input[next++] << bits;
2089
+ bits += 8;
2090
+ }
2091
+ //===//
2092
+ //--- DROPBITS(here.bits) ---//
2093
+ hold >>>= here_bits;
2094
+ bits -= here_bits;
2095
+ //---//
2096
+ len = 0;
2097
+ copy = 3 + (hold & 0x07);//BITS(3);
2098
+ //--- DROPBITS(3) ---//
2099
+ hold >>>= 3;
2100
+ bits -= 3;
2101
+ //---//
2102
+ }
2103
+ else {
2104
+ //=== NEEDBITS(here.bits + 7);
2105
+ n = here_bits + 7;
2106
+ while (bits < n) {
2107
+ if (have === 0) { break inf_leave; }
2108
+ have--;
2109
+ hold += input[next++] << bits;
2110
+ bits += 8;
2111
+ }
2112
+ //===//
2113
+ //--- DROPBITS(here.bits) ---//
2114
+ hold >>>= here_bits;
2115
+ bits -= here_bits;
2116
+ //---//
2117
+ len = 0;
2118
+ copy = 11 + (hold & 0x7f);//BITS(7);
2119
+ //--- DROPBITS(7) ---//
2120
+ hold >>>= 7;
2121
+ bits -= 7;
2122
+ //---//
2123
+ }
2124
+ if (state.have + copy > state.nlen + state.ndist) {
2125
+ strm.msg = 'invalid bit length repeat';
2126
+ state.mode = BAD;
2127
+ break;
2128
+ }
2129
+ while (copy--) {
2130
+ state.lens[state.have++] = len;
2131
+ }
2132
+ }
2133
+ }
2134
+
2135
+ /* handle error breaks in while */
2136
+ if (state.mode === BAD) { break; }
2137
+
2138
+ /* check for end-of-block code (better have one) */
2139
+ if (state.lens[256] === 0) {
2140
+ strm.msg = 'invalid code -- missing end-of-block';
2141
+ state.mode = BAD;
2142
+ break;
2143
+ }
2144
+
2145
+ /* build code tables -- note: do not change the lenbits or distbits
2146
+ values here (9 and 6) without reading the comments in inftrees.h
2147
+ concerning the ENOUGH constants, which depend on those values */
2148
+ state.lenbits = 9;
2149
+
2150
+ opts = { bits: state.lenbits };
2151
+ ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);
2152
+ // We have separate tables & no pointers. 2 commented lines below not needed.
2153
+ // state.next_index = opts.table_index;
2154
+ state.lenbits = opts.bits;
2155
+ // state.lencode = state.next;
2156
+
2157
+ if (ret) {
2158
+ strm.msg = 'invalid literal/lengths set';
2159
+ state.mode = BAD;
2160
+ break;
2161
+ }
2162
+
2163
+ state.distbits = 6;
2164
+ //state.distcode.copy(state.codes);
2165
+ // Switch to use dynamic table
2166
+ state.distcode = state.distdyn;
2167
+ opts = { bits: state.distbits };
2168
+ ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);
2169
+ // We have separate tables & no pointers. 2 commented lines below not needed.
2170
+ // state.next_index = opts.table_index;
2171
+ state.distbits = opts.bits;
2172
+ // state.distcode = state.next;
2173
+
2174
+ if (ret) {
2175
+ strm.msg = 'invalid distances set';
2176
+ state.mode = BAD;
2177
+ break;
2178
+ }
2179
+ //Tracev((stderr, 'inflate: codes ok\n'));
2180
+ state.mode = LEN_;
2181
+ if (flush === Z_TREES) { break inf_leave; }
2182
+ /* falls through */
2183
+ case LEN_:
2184
+ state.mode = LEN;
2185
+ /* falls through */
2186
+ case LEN:
2187
+ if (have >= 6 && left >= 258) {
2188
+ //--- RESTORE() ---
2189
+ strm.next_out = put;
2190
+ strm.avail_out = left;
2191
+ strm.next_in = next;
2192
+ strm.avail_in = have;
2193
+ state.hold = hold;
2194
+ state.bits = bits;
2195
+ //---
2196
+ inflate_fast(strm, _out);
2197
+ //--- LOAD() ---
2198
+ put = strm.next_out;
2199
+ output = strm.output;
2200
+ left = strm.avail_out;
2201
+ next = strm.next_in;
2202
+ input = strm.input;
2203
+ have = strm.avail_in;
2204
+ hold = state.hold;
2205
+ bits = state.bits;
2206
+ //---
2207
+
2208
+ if (state.mode === TYPE) {
2209
+ state.back = -1;
2210
+ }
2211
+ break;
2212
+ }
2213
+ state.back = 0;
2214
+ for (;;) {
2215
+ here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/
2216
+ here_bits = here >>> 24;
2217
+ here_op = (here >>> 16) & 0xff;
2218
+ here_val = here & 0xffff;
2219
+
2220
+ if (here_bits <= bits) { break; }
2221
+ //--- PULLBYTE() ---//
2222
+ if (have === 0) { break inf_leave; }
2223
+ have--;
2224
+ hold += input[next++] << bits;
2225
+ bits += 8;
2226
+ //---//
2227
+ }
2228
+ if (here_op && (here_op & 0xf0) === 0) {
2229
+ last_bits = here_bits;
2230
+ last_op = here_op;
2231
+ last_val = here_val;
2232
+ for (;;) {
2233
+ here = state.lencode[last_val +
2234
+ ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
2235
+ here_bits = here >>> 24;
2236
+ here_op = (here >>> 16) & 0xff;
2237
+ here_val = here & 0xffff;
2238
+
2239
+ if ((last_bits + here_bits) <= bits) { break; }
2240
+ //--- PULLBYTE() ---//
2241
+ if (have === 0) { break inf_leave; }
2242
+ have--;
2243
+ hold += input[next++] << bits;
2244
+ bits += 8;
2245
+ //---//
2246
+ }
2247
+ //--- DROPBITS(last.bits) ---//
2248
+ hold >>>= last_bits;
2249
+ bits -= last_bits;
2250
+ //---//
2251
+ state.back += last_bits;
2252
+ }
2253
+ //--- DROPBITS(here.bits) ---//
2254
+ hold >>>= here_bits;
2255
+ bits -= here_bits;
2256
+ //---//
2257
+ state.back += here_bits;
2258
+ state.length = here_val;
2259
+ if (here_op === 0) {
2260
+ //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
2261
+ // "inflate: literal '%c'\n" :
2262
+ // "inflate: literal 0x%02x\n", here.val));
2263
+ state.mode = LIT;
2264
+ break;
2265
+ }
2266
+ if (here_op & 32) {
2267
+ //Tracevv((stderr, "inflate: end of block\n"));
2268
+ state.back = -1;
2269
+ state.mode = TYPE;
2270
+ break;
2271
+ }
2272
+ if (here_op & 64) {
2273
+ strm.msg = 'invalid literal/length code';
2274
+ state.mode = BAD;
2275
+ break;
2276
+ }
2277
+ state.extra = here_op & 15;
2278
+ state.mode = LENEXT;
2279
+ /* falls through */
2280
+ case LENEXT:
2281
+ if (state.extra) {
2282
+ //=== NEEDBITS(state.extra);
2283
+ n = state.extra;
2284
+ while (bits < n) {
2285
+ if (have === 0) { break inf_leave; }
2286
+ have--;
2287
+ hold += input[next++] << bits;
2288
+ bits += 8;
2289
+ }
2290
+ //===//
2291
+ state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
2292
+ //--- DROPBITS(state.extra) ---//
2293
+ hold >>>= state.extra;
2294
+ bits -= state.extra;
2295
+ //---//
2296
+ state.back += state.extra;
2297
+ }
2298
+ //Tracevv((stderr, "inflate: length %u\n", state.length));
2299
+ state.was = state.length;
2300
+ state.mode = DIST;
2301
+ /* falls through */
2302
+ case DIST:
2303
+ for (;;) {
2304
+ here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/
2305
+ here_bits = here >>> 24;
2306
+ here_op = (here >>> 16) & 0xff;
2307
+ here_val = here & 0xffff;
2308
+
2309
+ if ((here_bits) <= bits) { break; }
2310
+ //--- PULLBYTE() ---//
2311
+ if (have === 0) { break inf_leave; }
2312
+ have--;
2313
+ hold += input[next++] << bits;
2314
+ bits += 8;
2315
+ //---//
2316
+ }
2317
+ if ((here_op & 0xf0) === 0) {
2318
+ last_bits = here_bits;
2319
+ last_op = here_op;
2320
+ last_val = here_val;
2321
+ for (;;) {
2322
+ here = state.distcode[last_val +
2323
+ ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
2324
+ here_bits = here >>> 24;
2325
+ here_op = (here >>> 16) & 0xff;
2326
+ here_val = here & 0xffff;
2327
+
2328
+ if ((last_bits + here_bits) <= bits) { break; }
2329
+ //--- PULLBYTE() ---//
2330
+ if (have === 0) { break inf_leave; }
2331
+ have--;
2332
+ hold += input[next++] << bits;
2333
+ bits += 8;
2334
+ //---//
2335
+ }
2336
+ //--- DROPBITS(last.bits) ---//
2337
+ hold >>>= last_bits;
2338
+ bits -= last_bits;
2339
+ //---//
2340
+ state.back += last_bits;
2341
+ }
2342
+ //--- DROPBITS(here.bits) ---//
2343
+ hold >>>= here_bits;
2344
+ bits -= here_bits;
2345
+ //---//
2346
+ state.back += here_bits;
2347
+ if (here_op & 64) {
2348
+ strm.msg = 'invalid distance code';
2349
+ state.mode = BAD;
2350
+ break;
2351
+ }
2352
+ state.offset = here_val;
2353
+ state.extra = (here_op) & 15;
2354
+ state.mode = DISTEXT;
2355
+ /* falls through */
2356
+ case DISTEXT:
2357
+ if (state.extra) {
2358
+ //=== NEEDBITS(state.extra);
2359
+ n = state.extra;
2360
+ while (bits < n) {
2361
+ if (have === 0) { break inf_leave; }
2362
+ have--;
2363
+ hold += input[next++] << bits;
2364
+ bits += 8;
2365
+ }
2366
+ //===//
2367
+ state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
2368
+ //--- DROPBITS(state.extra) ---//
2369
+ hold >>>= state.extra;
2370
+ bits -= state.extra;
2371
+ //---//
2372
+ state.back += state.extra;
2373
+ }
2374
+ //#ifdef INFLATE_STRICT
2375
+ if (state.offset > state.dmax) {
2376
+ strm.msg = 'invalid distance too far back';
2377
+ state.mode = BAD;
2378
+ break;
2379
+ }
2380
+ //#endif
2381
+ //Tracevv((stderr, "inflate: distance %u\n", state.offset));
2382
+ state.mode = MATCH;
2383
+ /* falls through */
2384
+ case MATCH:
2385
+ if (left === 0) { break inf_leave; }
2386
+ copy = _out - left;
2387
+ if (state.offset > copy) { /* copy from window */
2388
+ copy = state.offset - copy;
2389
+ if (copy > state.whave) {
2390
+ if (state.sane) {
2391
+ strm.msg = 'invalid distance too far back';
2392
+ state.mode = BAD;
2393
+ break;
2394
+ }
2395
+ // (!) This block is disabled in zlib defaults,
2396
+ // don't enable it for binary compatibility
2397
+ //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
2398
+ // Trace((stderr, "inflate.c too far\n"));
2399
+ // copy -= state.whave;
2400
+ // if (copy > state.length) { copy = state.length; }
2401
+ // if (copy > left) { copy = left; }
2402
+ // left -= copy;
2403
+ // state.length -= copy;
2404
+ // do {
2405
+ // output[put++] = 0;
2406
+ // } while (--copy);
2407
+ // if (state.length === 0) { state.mode = LEN; }
2408
+ // break;
2409
+ //#endif
2410
+ }
2411
+ if (copy > state.wnext) {
2412
+ copy -= state.wnext;
2413
+ from = state.wsize - copy;
2414
+ }
2415
+ else {
2416
+ from = state.wnext - copy;
2417
+ }
2418
+ if (copy > state.length) { copy = state.length; }
2419
+ from_source = state.window;
2420
+ }
2421
+ else { /* copy from output */
2422
+ from_source = output;
2423
+ from = put - state.offset;
2424
+ copy = state.length;
2425
+ }
2426
+ if (copy > left) { copy = left; }
2427
+ left -= copy;
2428
+ state.length -= copy;
2429
+ do {
2430
+ output[put++] = from_source[from++];
2431
+ } while (--copy);
2432
+ if (state.length === 0) { state.mode = LEN; }
2433
+ break;
2434
+ case LIT:
2435
+ if (left === 0) { break inf_leave; }
2436
+ output[put++] = state.length;
2437
+ left--;
2438
+ state.mode = LEN;
2439
+ break;
2440
+ case CHECK:
2441
+ if (state.wrap) {
2442
+ //=== NEEDBITS(32);
2443
+ while (bits < 32) {
2444
+ if (have === 0) { break inf_leave; }
2445
+ have--;
2446
+ // Use '|' instead of '+' to make sure that result is signed
2447
+ hold |= input[next++] << bits;
2448
+ bits += 8;
2449
+ }
2450
+ //===//
2451
+ _out -= left;
2452
+ strm.total_out += _out;
2453
+ state.total += _out;
2454
+ if (_out) {
2455
+ strm.adler = state.check =
2456
+ /*UPDATE(state.check, put - _out, _out);*/
2457
+ (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));
2458
+
2459
+ }
2460
+ _out = left;
2461
+ // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
2462
+ if ((state.flags ? hold : zswap32(hold)) !== state.check) {
2463
+ strm.msg = 'incorrect data check';
2464
+ state.mode = BAD;
2465
+ break;
2466
+ }
2467
+ //=== INITBITS();
2468
+ hold = 0;
2469
+ bits = 0;
2470
+ //===//
2471
+ //Tracev((stderr, "inflate: check matches trailer\n"));
2472
+ }
2473
+ state.mode = LENGTH;
2474
+ /* falls through */
2475
+ case LENGTH:
2476
+ if (state.wrap && state.flags) {
2477
+ //=== NEEDBITS(32);
2478
+ while (bits < 32) {
2479
+ if (have === 0) { break inf_leave; }
2480
+ have--;
2481
+ hold += input[next++] << bits;
2482
+ bits += 8;
2483
+ }
2484
+ //===//
2485
+ if (hold !== (state.total & 0xffffffff)) {
2486
+ strm.msg = 'incorrect length check';
2487
+ state.mode = BAD;
2488
+ break;
2489
+ }
2490
+ //=== INITBITS();
2491
+ hold = 0;
2492
+ bits = 0;
2493
+ //===//
2494
+ //Tracev((stderr, "inflate: length matches trailer\n"));
2495
+ }
2496
+ state.mode = DONE;
2497
+ /* falls through */
2498
+ case DONE:
2499
+ ret = Z_STREAM_END$1;
2500
+ break inf_leave;
2501
+ case BAD:
2502
+ ret = Z_DATA_ERROR$1;
2503
+ break inf_leave;
2504
+ case MEM:
2505
+ return Z_MEM_ERROR$1;
2506
+ case SYNC:
2507
+ /* falls through */
2508
+ default:
2509
+ return Z_STREAM_ERROR$1;
2510
+ }
2511
+ }
2512
+
2513
+ // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"
2514
+
2515
+ /*
2516
+ Return from inflate(), updating the total counts and the check value.
2517
+ If there was no progress during the inflate() call, return a buffer
2518
+ error. Call updatewindow() to create and/or update the window state.
2519
+ Note: a memory error from inflate() is non-recoverable.
2520
+ */
2521
+
2522
+ //--- RESTORE() ---
2523
+ strm.next_out = put;
2524
+ strm.avail_out = left;
2525
+ strm.next_in = next;
2526
+ strm.avail_in = have;
2527
+ state.hold = hold;
2528
+ state.bits = bits;
2529
+ //---
2530
+
2531
+ if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&
2532
+ (state.mode < CHECK || flush !== Z_FINISH$1))) {
2533
+ if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;
2534
+ }
2535
+ _in -= strm.avail_in;
2536
+ _out -= strm.avail_out;
2537
+ strm.total_in += _in;
2538
+ strm.total_out += _out;
2539
+ state.total += _out;
2540
+ if (state.wrap && _out) {
2541
+ strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
2542
+ (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));
2543
+ }
2544
+ strm.data_type = state.bits + (state.last ? 64 : 0) +
2545
+ (state.mode === TYPE ? 128 : 0) +
2546
+ (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
2547
+ if (((_in === 0 && _out === 0) || flush === Z_FINISH$1) && ret === Z_OK$1) {
2548
+ ret = Z_BUF_ERROR;
2549
+ }
2550
+ return ret;
2551
+ };
2552
+
2553
+
2554
+ const inflateEnd = (strm) => {
2555
+
2556
+ if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
2557
+ return Z_STREAM_ERROR$1;
2558
+ }
2559
+
2560
+ let state = strm.state;
2561
+ if (state.window) {
2562
+ state.window = null;
2563
+ }
2564
+ strm.state = null;
2565
+ return Z_OK$1;
2566
+ };
2567
+
2568
+
2569
+ const inflateGetHeader = (strm, head) => {
2570
+
2571
+ /* check state */
2572
+ if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }
2573
+ const state = strm.state;
2574
+ if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }
2575
+
2576
+ /* save header structure */
2577
+ state.head = head;
2578
+ head.done = false;
2579
+ return Z_OK$1;
2580
+ };
2581
+
2582
+
2583
+ const inflateSetDictionary = (strm, dictionary) => {
2584
+ const dictLength = dictionary.length;
2585
+
2586
+ let state;
2587
+ let dictid;
2588
+ let ret;
2589
+
2590
+ /* check state */
2591
+ if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR$1; }
2592
+ state = strm.state;
2593
+
2594
+ if (state.wrap !== 0 && state.mode !== DICT) {
2595
+ return Z_STREAM_ERROR$1;
2596
+ }
2597
+
2598
+ /* check for correct dictionary identifier */
2599
+ if (state.mode === DICT) {
2600
+ dictid = 1; /* adler32(0, null, 0)*/
2601
+ /* dictid = adler32(dictid, dictionary, dictLength); */
2602
+ dictid = adler32(dictid, dictionary, dictLength, 0);
2603
+ if (dictid !== state.check) {
2604
+ return Z_DATA_ERROR$1;
2605
+ }
2606
+ }
2607
+ /* copy dictionary to window using updatewindow(), which will amend the
2608
+ existing dictionary if appropriate */
2609
+ ret = updatewindow(strm, dictionary, dictLength, dictLength);
2610
+ if (ret) {
2611
+ state.mode = MEM;
2612
+ return Z_MEM_ERROR$1;
2613
+ }
2614
+ state.havedict = 1;
2615
+ // Tracev((stderr, "inflate: dictionary set\n"));
2616
+ return Z_OK$1;
2617
+ };
2618
+
2619
+
2620
+ inflate$2.inflateReset = inflateReset;
2621
+ inflate$2.inflateReset2 = inflateReset2;
2622
+ inflate$2.inflateResetKeep = inflateResetKeep;
2623
+ inflate$2.inflateInit = inflateInit;
2624
+ inflate$2.inflateInit2 = inflateInit2;
2625
+ inflate$2.inflate = inflate$1;
2626
+ inflate$2.inflateEnd = inflateEnd;
2627
+ inflate$2.inflateGetHeader = inflateGetHeader;
2628
+ inflate$2.inflateSetDictionary = inflateSetDictionary;
2629
+ inflate$2.inflateInfo = 'pako inflate (from Nodeca project)';
2630
+
2631
+ var common = {};
2632
+
2633
+ const _has = (obj, key) => {
2634
+ return Object.prototype.hasOwnProperty.call(obj, key);
2635
+ };
2636
+
2637
+ common.assign = function (obj /*from1, from2, from3, ...*/) {
2638
+ const sources = Array.prototype.slice.call(arguments, 1);
2639
+ while (sources.length) {
2640
+ const source = sources.shift();
2641
+ if (!source) { continue; }
2642
+
2643
+ if (typeof source !== 'object') {
2644
+ throw new TypeError(source + 'must be non-object');
2645
+ }
2646
+
2647
+ for (const p in source) {
2648
+ if (_has(source, p)) {
2649
+ obj[p] = source[p];
2650
+ }
2651
+ }
2652
+ }
2653
+
2654
+ return obj;
2655
+ };
2656
+
2657
+
2658
+ // Join array of chunks to single array.
2659
+ common.flattenChunks = (chunks) => {
2660
+ // calculate data length
2661
+ let len = 0;
2662
+
2663
+ for (let i = 0, l = chunks.length; i < l; i++) {
2664
+ len += chunks[i].length;
2665
+ }
2666
+
2667
+ // join chunks
2668
+ const result = new Uint8Array(len);
2669
+
2670
+ for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {
2671
+ let chunk = chunks[i];
2672
+ result.set(chunk, pos);
2673
+ pos += chunk.length;
2674
+ }
2675
+
2676
+ return result;
2677
+ };
2678
+
2679
+ var strings$1 = {};
2680
+
2681
+ // Quick check if we can use fast array to bin string conversion
2682
+ //
2683
+ // - apply(Array) can fail on Android 2.2
2684
+ // - apply(Uint8Array) can fail on iOS 5.1 Safari
2685
+ //
2686
+ let STR_APPLY_UIA_OK = true;
2687
+
2688
+ try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }
2689
+
2690
+
2691
+ // Table with utf8 lengths (calculated by first byte of sequence)
2692
+ // Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
2693
+ // because max possible codepoint is 0x10ffff
2694
+ const _utf8len = new Uint8Array(256);
2695
+ for (let q = 0; q < 256; q++) {
2696
+ _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);
2697
+ }
2698
+ _utf8len[254] = _utf8len[254] = 1; // Invalid sequence start
2699
+
2700
+
2701
+ // convert string to array (typed, when possible)
2702
+ strings$1.string2buf = (str) => {
2703
+ if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) {
2704
+ return new TextEncoder().encode(str);
2705
+ }
2706
+
2707
+ let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;
2708
+
2709
+ // count binary size
2710
+ for (m_pos = 0; m_pos < str_len; m_pos++) {
2711
+ c = str.charCodeAt(m_pos);
2712
+ if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
2713
+ c2 = str.charCodeAt(m_pos + 1);
2714
+ if ((c2 & 0xfc00) === 0xdc00) {
2715
+ c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
2716
+ m_pos++;
2717
+ }
2718
+ }
2719
+ buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
2720
+ }
2721
+
2722
+ // allocate buffer
2723
+ buf = new Uint8Array(buf_len);
2724
+
2725
+ // convert
2726
+ for (i = 0, m_pos = 0; i < buf_len; m_pos++) {
2727
+ c = str.charCodeAt(m_pos);
2728
+ if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
2729
+ c2 = str.charCodeAt(m_pos + 1);
2730
+ if ((c2 & 0xfc00) === 0xdc00) {
2731
+ c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
2732
+ m_pos++;
2733
+ }
2734
+ }
2735
+ if (c < 0x80) {
2736
+ /* one byte */
2737
+ buf[i++] = c;
2738
+ } else if (c < 0x800) {
2739
+ /* two bytes */
2740
+ buf[i++] = 0xC0 | (c >>> 6);
2741
+ buf[i++] = 0x80 | (c & 0x3f);
2742
+ } else if (c < 0x10000) {
2743
+ /* three bytes */
2744
+ buf[i++] = 0xE0 | (c >>> 12);
2745
+ buf[i++] = 0x80 | (c >>> 6 & 0x3f);
2746
+ buf[i++] = 0x80 | (c & 0x3f);
2747
+ } else {
2748
+ /* four bytes */
2749
+ buf[i++] = 0xf0 | (c >>> 18);
2750
+ buf[i++] = 0x80 | (c >>> 12 & 0x3f);
2751
+ buf[i++] = 0x80 | (c >>> 6 & 0x3f);
2752
+ buf[i++] = 0x80 | (c & 0x3f);
2753
+ }
2754
+ }
2755
+
2756
+ return buf;
2757
+ };
2758
+
2759
+ // Helper
2760
+ const buf2binstring = (buf, len) => {
2761
+ // On Chrome, the arguments in a function call that are allowed is `65534`.
2762
+ // If the length of the buffer is smaller than that, we can use this optimization,
2763
+ // otherwise we will take a slower path.
2764
+ if (len < 65534) {
2765
+ if (buf.subarray && STR_APPLY_UIA_OK) {
2766
+ return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));
2767
+ }
2768
+ }
2769
+
2770
+ let result = '';
2771
+ for (let i = 0; i < len; i++) {
2772
+ result += String.fromCharCode(buf[i]);
2773
+ }
2774
+ return result;
2775
+ };
2776
+
2777
+
2778
+ // convert array to string
2779
+ strings$1.buf2string = (buf, max) => {
2780
+ const len = max || buf.length;
2781
+
2782
+ if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) {
2783
+ return new TextDecoder().decode(buf.subarray(0, max));
2784
+ }
2785
+
2786
+ let i, out;
2787
+
2788
+ // Reserve max possible length (2 words per char)
2789
+ // NB: by unknown reasons, Array is significantly faster for
2790
+ // String.fromCharCode.apply than Uint16Array.
2791
+ const utf16buf = new Array(len * 2);
2792
+
2793
+ for (out = 0, i = 0; i < len;) {
2794
+ let c = buf[i++];
2795
+ // quick process ascii
2796
+ if (c < 0x80) { utf16buf[out++] = c; continue; }
2797
+
2798
+ let c_len = _utf8len[c];
2799
+ // skip 5 & 6 byte codes
2800
+ if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }
2801
+
2802
+ // apply mask on first byte
2803
+ c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
2804
+ // join the rest
2805
+ while (c_len > 1 && i < len) {
2806
+ c = (c << 6) | (buf[i++] & 0x3f);
2807
+ c_len--;
2808
+ }
2809
+
2810
+ // terminated by end of string?
2811
+ if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }
2812
+
2813
+ if (c < 0x10000) {
2814
+ utf16buf[out++] = c;
2815
+ } else {
2816
+ c -= 0x10000;
2817
+ utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
2818
+ utf16buf[out++] = 0xdc00 | (c & 0x3ff);
2819
+ }
2820
+ }
2821
+
2822
+ return buf2binstring(utf16buf, out);
2823
+ };
2824
+
2825
+
2826
+ // Calculate max possible position in utf8 buffer,
2827
+ // that will not break sequence. If that's not possible
2828
+ // - (very small limits) return max size as is.
2829
+ //
2830
+ // buf[] - utf8 bytes array
2831
+ // max - length limit (mandatory);
2832
+ strings$1.utf8border = (buf, max) => {
2833
+
2834
+ max = max || buf.length;
2835
+ if (max > buf.length) { max = buf.length; }
2836
+
2837
+ // go back from last position, until start of sequence found
2838
+ let pos = max - 1;
2839
+ while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }
2840
+
2841
+ // Very small and broken sequence,
2842
+ // return max, because we should return something anyway.
2843
+ if (pos < 0) { return max; }
2844
+
2845
+ // If we came to start of buffer - that means buffer is too small,
2846
+ // return max too.
2847
+ if (pos === 0) { return max; }
2848
+
2849
+ return (pos + _utf8len[buf[pos]] > max) ? pos : max;
2850
+ };
2851
+
2852
+ // (C) 1995-2013 Jean-loup Gailly and Mark Adler
2853
+ // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
2854
+ //
2855
+ // This software is provided 'as-is', without any express or implied
2856
+ // warranty. In no event will the authors be held liable for any damages
2857
+ // arising from the use of this software.
2858
+ //
2859
+ // Permission is granted to anyone to use this software for any purpose,
2860
+ // including commercial applications, and to alter it and redistribute it
2861
+ // freely, subject to the following restrictions:
2862
+ //
2863
+ // 1. The origin of this software must not be misrepresented; you must not
2864
+ // claim that you wrote the original software. If you use this software
2865
+ // in a product, an acknowledgment in the product documentation would be
2866
+ // appreciated but is not required.
2867
+ // 2. Altered source versions must be plainly marked as such, and must not be
2868
+ // misrepresented as being the original software.
2869
+ // 3. This notice may not be removed or altered from any source distribution.
2870
+
2871
+ var messages = {
2872
+ 2: 'need dictionary', /* Z_NEED_DICT 2 */
2873
+ 1: 'stream end', /* Z_STREAM_END 1 */
2874
+ 0: '', /* Z_OK 0 */
2875
+ '-1': 'file error', /* Z_ERRNO (-1) */
2876
+ '-2': 'stream error', /* Z_STREAM_ERROR (-2) */
2877
+ '-3': 'data error', /* Z_DATA_ERROR (-3) */
2878
+ '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */
2879
+ '-5': 'buffer error', /* Z_BUF_ERROR (-5) */
2880
+ '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */
2881
+ };
2882
+
2883
+ // (C) 1995-2013 Jean-loup Gailly and Mark Adler
2884
+ // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
2885
+ //
2886
+ // This software is provided 'as-is', without any express or implied
2887
+ // warranty. In no event will the authors be held liable for any damages
2888
+ // arising from the use of this software.
2889
+ //
2890
+ // Permission is granted to anyone to use this software for any purpose,
2891
+ // including commercial applications, and to alter it and redistribute it
2892
+ // freely, subject to the following restrictions:
2893
+ //
2894
+ // 1. The origin of this software must not be misrepresented; you must not
2895
+ // claim that you wrote the original software. If you use this software
2896
+ // in a product, an acknowledgment in the product documentation would be
2897
+ // appreciated but is not required.
2898
+ // 2. Altered source versions must be plainly marked as such, and must not be
2899
+ // misrepresented as being the original software.
2900
+ // 3. This notice may not be removed or altered from any source distribution.
2901
+
2902
+ function ZStream$1() {
2903
+ /* next input byte */
2904
+ this.input = null; // JS specific, because we have no pointers
2905
+ this.next_in = 0;
2906
+ /* number of bytes available at input */
2907
+ this.avail_in = 0;
2908
+ /* total number of input bytes read so far */
2909
+ this.total_in = 0;
2910
+ /* next output byte should be put there */
2911
+ this.output = null; // JS specific, because we have no pointers
2912
+ this.next_out = 0;
2913
+ /* remaining free space at output */
2914
+ this.avail_out = 0;
2915
+ /* total number of bytes output so far */
2916
+ this.total_out = 0;
2917
+ /* last error message, NULL if no error */
2918
+ this.msg = ''/*Z_NULL*/;
2919
+ /* not visible by applications */
2920
+ this.state = null;
2921
+ /* best guess about the data type: binary or text */
2922
+ this.data_type = 2/*Z_UNKNOWN*/;
2923
+ /* adler32 value of the uncompressed data */
2924
+ this.adler = 0;
2925
+ }
2926
+
2927
+ var zstream = ZStream$1;
2928
+
2929
+ // (C) 1995-2013 Jean-loup Gailly and Mark Adler
2930
+ // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
2931
+ //
2932
+ // This software is provided 'as-is', without any express or implied
2933
+ // warranty. In no event will the authors be held liable for any damages
2934
+ // arising from the use of this software.
2935
+ //
2936
+ // Permission is granted to anyone to use this software for any purpose,
2937
+ // including commercial applications, and to alter it and redistribute it
2938
+ // freely, subject to the following restrictions:
2939
+ //
2940
+ // 1. The origin of this software must not be misrepresented; you must not
2941
+ // claim that you wrote the original software. If you use this software
2942
+ // in a product, an acknowledgment in the product documentation would be
2943
+ // appreciated but is not required.
2944
+ // 2. Altered source versions must be plainly marked as such, and must not be
2945
+ // misrepresented as being the original software.
2946
+ // 3. This notice may not be removed or altered from any source distribution.
2947
+
2948
+ function GZheader$1() {
2949
+ /* true if compressed data believed to be text */
2950
+ this.text = 0;
2951
+ /* modification time */
2952
+ this.time = 0;
2953
+ /* extra flags (not used when writing a gzip file) */
2954
+ this.xflags = 0;
2955
+ /* operating system */
2956
+ this.os = 0;
2957
+ /* pointer to extra field or Z_NULL if none */
2958
+ this.extra = null;
2959
+ /* extra field length (valid if extra != Z_NULL) */
2960
+ this.extra_len = 0; // Actually, we don't need it in JS,
2961
+ // but leave for few code modifications
2962
+
2963
+ //
2964
+ // Setup limits is not necessary because in js we should not preallocate memory
2965
+ // for inflate use constant limit in 65536 bytes
2966
+ //
2967
+
2968
+ /* space at extra (only when reading header) */
2969
+ // this.extra_max = 0;
2970
+ /* pointer to zero-terminated file name or Z_NULL */
2971
+ this.name = '';
2972
+ /* space at name (only when reading header) */
2973
+ // this.name_max = 0;
2974
+ /* pointer to zero-terminated comment or Z_NULL */
2975
+ this.comment = '';
2976
+ /* space at comment (only when reading header) */
2977
+ // this.comm_max = 0;
2978
+ /* true if there was or will be a header crc */
2979
+ this.hcrc = 0;
2980
+ /* true when done reading gzip header (not used when writing a gzip file) */
2981
+ this.done = false;
2982
+ }
2983
+
2984
+ var gzheader = GZheader$1;
2985
+
2986
+ const zlib_inflate = inflate$2;
2987
+ const utils = common;
2988
+ const strings = strings$1;
2989
+ const msg = messages;
2990
+ const ZStream = zstream;
2991
+ const GZheader = gzheader;
2992
+
2993
+ const toString = Object.prototype.toString;
2994
+
2995
+ /* Public constants ==========================================================*/
2996
+ /* ===========================================================================*/
2997
+
2998
+ const {
2999
+ Z_NO_FLUSH, Z_FINISH,
3000
+ Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR
3001
+ } = constants;
3002
+
3003
+ /* ===========================================================================*/
3004
+
3005
+
3006
+ /**
3007
+ * class Inflate
3008
+ *
3009
+ * Generic JS-style wrapper for zlib calls. If you don't need
3010
+ * streaming behaviour - use more simple functions: [[inflate]]
3011
+ * and [[inflateRaw]].
3012
+ **/
3013
+
3014
+ /* internal
3015
+ * inflate.chunks -> Array
3016
+ *
3017
+ * Chunks of output data, if [[Inflate#onData]] not overridden.
3018
+ **/
3019
+
3020
+ /**
3021
+ * Inflate.result -> Uint8Array|String
3022
+ *
3023
+ * Uncompressed result, generated by default [[Inflate#onData]]
3024
+ * and [[Inflate#onEnd]] handlers. Filled after you push last chunk
3025
+ * (call [[Inflate#push]] with `Z_FINISH` / `true` param).
3026
+ **/
3027
+
3028
+ /**
3029
+ * Inflate.err -> Number
3030
+ *
3031
+ * Error code after inflate finished. 0 (Z_OK) on success.
3032
+ * Should be checked if broken data possible.
3033
+ **/
3034
+
3035
+ /**
3036
+ * Inflate.msg -> String
3037
+ *
3038
+ * Error message, if [[Inflate.err]] != 0
3039
+ **/
3040
+
3041
+
3042
+ /**
3043
+ * new Inflate(options)
3044
+ * - options (Object): zlib inflate options.
3045
+ *
3046
+ * Creates new inflator instance with specified params. Throws exception
3047
+ * on bad params. Supported options:
3048
+ *
3049
+ * - `windowBits`
3050
+ * - `dictionary`
3051
+ *
3052
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
3053
+ * for more information on these.
3054
+ *
3055
+ * Additional options, for internal needs:
3056
+ *
3057
+ * - `chunkSize` - size of generated data chunks (16K by default)
3058
+ * - `raw` (Boolean) - do raw inflate
3059
+ * - `to` (String) - if equal to 'string', then result will be converted
3060
+ * from utf8 to utf16 (javascript) string. When string output requested,
3061
+ * chunk length can differ from `chunkSize`, depending on content.
3062
+ *
3063
+ * By default, when no options set, autodetect deflate/gzip data format via
3064
+ * wrapper header.
3065
+ *
3066
+ * ##### Example:
3067
+ *
3068
+ * ```javascript
3069
+ * const pako = require('pako')
3070
+ * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])
3071
+ * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);
3072
+ *
3073
+ * const inflate = new pako.Inflate({ level: 3});
3074
+ *
3075
+ * inflate.push(chunk1, false);
3076
+ * inflate.push(chunk2, true); // true -> last chunk
3077
+ *
3078
+ * if (inflate.err) { throw new Error(inflate.err); }
3079
+ *
3080
+ * console.log(inflate.result);
3081
+ * ```
3082
+ **/
3083
+ function Inflate(options) {
3084
+ this.options = utils.assign({
3085
+ chunkSize: 1024 * 64,
3086
+ windowBits: 15,
3087
+ to: ''
3088
+ }, options || {});
3089
+
3090
+ const opt = this.options;
3091
+
3092
+ // Force window size for `raw` data, if not set directly,
3093
+ // because we have no header for autodetect.
3094
+ if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {
3095
+ opt.windowBits = -opt.windowBits;
3096
+ if (opt.windowBits === 0) { opt.windowBits = -15; }
3097
+ }
3098
+
3099
+ // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate
3100
+ if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&
3101
+ !(options && options.windowBits)) {
3102
+ opt.windowBits += 32;
3103
+ }
3104
+
3105
+ // Gzip header has no info about windows size, we can do autodetect only
3106
+ // for deflate. So, if window size not set, force it to max when gzip possible
3107
+ if ((opt.windowBits > 15) && (opt.windowBits < 48)) {
3108
+ // bit 3 (16) -> gzipped data
3109
+ // bit 4 (32) -> autodetect gzip/deflate
3110
+ if ((opt.windowBits & 15) === 0) {
3111
+ opt.windowBits |= 15;
3112
+ }
3113
+ }
3114
+
3115
+ this.err = 0; // error code, if happens (0 = Z_OK)
3116
+ this.msg = ''; // error message
3117
+ this.ended = false; // used to avoid multiple onEnd() calls
3118
+ this.chunks = []; // chunks of compressed data
3119
+
3120
+ this.strm = new ZStream();
3121
+ this.strm.avail_out = 0;
3122
+
3123
+ let status = zlib_inflate.inflateInit2(
3124
+ this.strm,
3125
+ opt.windowBits
3126
+ );
3127
+
3128
+ if (status !== Z_OK) {
3129
+ throw new Error(msg[status]);
3130
+ }
3131
+
3132
+ this.header = new GZheader();
3133
+
3134
+ zlib_inflate.inflateGetHeader(this.strm, this.header);
3135
+
3136
+ // Setup dictionary
3137
+ if (opt.dictionary) {
3138
+ // Convert data if needed
3139
+ if (typeof opt.dictionary === 'string') {
3140
+ opt.dictionary = strings.string2buf(opt.dictionary);
3141
+ } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {
3142
+ opt.dictionary = new Uint8Array(opt.dictionary);
3143
+ }
3144
+ if (opt.raw) { //In raw mode we need to set the dictionary early
3145
+ status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);
3146
+ if (status !== Z_OK) {
3147
+ throw new Error(msg[status]);
3148
+ }
3149
+ }
3150
+ }
3151
+ }
3152
+
3153
+ /**
3154
+ * Inflate#push(data[, flush_mode]) -> Boolean
3155
+ * - data (Uint8Array|ArrayBuffer): input data
3156
+ * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE
3157
+ * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,
3158
+ * `true` means Z_FINISH.
3159
+ *
3160
+ * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with
3161
+ * new output chunks. Returns `true` on success. If end of stream detected,
3162
+ * [[Inflate#onEnd]] will be called.
3163
+ *
3164
+ * `flush_mode` is not needed for normal operation, because end of stream
3165
+ * detected automatically. You may try to use it for advanced things, but
3166
+ * this functionality was not tested.
3167
+ *
3168
+ * On fail call [[Inflate#onEnd]] with error code and return false.
3169
+ *
3170
+ * ##### Example
3171
+ *
3172
+ * ```javascript
3173
+ * push(chunk, false); // push one of data chunks
3174
+ * ...
3175
+ * push(chunk, true); // push last chunk
3176
+ * ```
3177
+ **/
3178
+ Inflate.prototype.push = function (data, flush_mode) {
3179
+ const strm = this.strm;
3180
+ const chunkSize = this.options.chunkSize;
3181
+ const dictionary = this.options.dictionary;
3182
+ let status, _flush_mode, last_avail_out;
3183
+
3184
+ if (this.ended) return false;
3185
+
3186
+ if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;
3187
+ else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;
3188
+
3189
+ // Convert data if needed
3190
+ if (toString.call(data) === '[object ArrayBuffer]') {
3191
+ strm.input = new Uint8Array(data);
3192
+ } else {
3193
+ strm.input = data;
3194
+ }
3195
+
3196
+ strm.next_in = 0;
3197
+ strm.avail_in = strm.input.length;
3198
+
3199
+ for (;;) {
3200
+ if (strm.avail_out === 0) {
3201
+ strm.output = new Uint8Array(chunkSize);
3202
+ strm.next_out = 0;
3203
+ strm.avail_out = chunkSize;
3204
+ }
3205
+
3206
+ status = zlib_inflate.inflate(strm, _flush_mode);
3207
+
3208
+ if (status === Z_NEED_DICT && dictionary) {
3209
+ status = zlib_inflate.inflateSetDictionary(strm, dictionary);
3210
+
3211
+ if (status === Z_OK) {
3212
+ status = zlib_inflate.inflate(strm, _flush_mode);
3213
+ } else if (status === Z_DATA_ERROR) {
3214
+ // Replace code with more verbose
3215
+ status = Z_NEED_DICT;
3216
+ }
3217
+ }
3218
+
3219
+ // Skip snyc markers if more data follows and not raw mode
3220
+ while (strm.avail_in > 0 &&
3221
+ status === Z_STREAM_END &&
3222
+ strm.state.wrap > 0 &&
3223
+ data[strm.next_in] !== 0)
3224
+ {
3225
+ zlib_inflate.inflateReset(strm);
3226
+ status = zlib_inflate.inflate(strm, _flush_mode);
3227
+ }
3228
+
3229
+ switch (status) {
3230
+ case Z_STREAM_ERROR:
3231
+ case Z_DATA_ERROR:
3232
+ case Z_NEED_DICT:
3233
+ case Z_MEM_ERROR:
3234
+ this.onEnd(status);
3235
+ this.ended = true;
3236
+ return false;
3237
+ }
3238
+
3239
+ // Remember real `avail_out` value, because we may patch out buffer content
3240
+ // to align utf8 strings boundaries.
3241
+ last_avail_out = strm.avail_out;
3242
+
3243
+ if (strm.next_out) {
3244
+ if (strm.avail_out === 0 || status === Z_STREAM_END) {
3245
+
3246
+ if (this.options.to === 'string') {
3247
+
3248
+ let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);
3249
+
3250
+ let tail = strm.next_out - next_out_utf8;
3251
+ let utf8str = strings.buf2string(strm.output, next_out_utf8);
3252
+
3253
+ // move tail & realign counters
3254
+ strm.next_out = tail;
3255
+ strm.avail_out = chunkSize - tail;
3256
+ if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);
3257
+
3258
+ this.onData(utf8str);
3259
+
3260
+ } else {
3261
+ this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));
3262
+ }
3263
+ }
3264
+ }
3265
+
3266
+ // Must repeat iteration if out buffer is full
3267
+ if (status === Z_OK && last_avail_out === 0) continue;
3268
+
3269
+ // Finalize if end of stream reached.
3270
+ if (status === Z_STREAM_END) {
3271
+ status = zlib_inflate.inflateEnd(this.strm);
3272
+ this.onEnd(status);
3273
+ this.ended = true;
3274
+ return true;
3275
+ }
3276
+
3277
+ if (strm.avail_in === 0) break;
3278
+ }
3279
+
3280
+ return true;
3281
+ };
3282
+
3283
+
3284
+ /**
3285
+ * Inflate#onData(chunk) -> Void
3286
+ * - chunk (Uint8Array|String): output data. When string output requested,
3287
+ * each chunk will be string.
3288
+ *
3289
+ * By default, stores data blocks in `chunks[]` property and glue
3290
+ * those in `onEnd`. Override this handler, if you need another behaviour.
3291
+ **/
3292
+ Inflate.prototype.onData = function (chunk) {
3293
+ this.chunks.push(chunk);
3294
+ };
3295
+
3296
+
3297
+ /**
3298
+ * Inflate#onEnd(status) -> Void
3299
+ * - status (Number): inflate status. 0 (Z_OK) on success,
3300
+ * other if not.
3301
+ *
3302
+ * Called either after you tell inflate that the input stream is
3303
+ * complete (Z_FINISH). By default - join collected chunks,
3304
+ * free memory and fill `results` / `err` properties.
3305
+ **/
3306
+ Inflate.prototype.onEnd = function (status) {
3307
+ // On success - join
3308
+ if (status === Z_OK) {
3309
+ if (this.options.to === 'string') {
3310
+ this.result = this.chunks.join('');
3311
+ } else {
3312
+ this.result = utils.flattenChunks(this.chunks);
3313
+ }
3314
+ }
3315
+ this.chunks = [];
3316
+ this.err = status;
3317
+ this.msg = this.strm.msg;
3318
+ };
3319
+
3320
+
3321
+ /**
3322
+ * inflate(data[, options]) -> Uint8Array|String
3323
+ * - data (Uint8Array): input data to decompress.
3324
+ * - options (Object): zlib inflate options.
3325
+ *
3326
+ * Decompress `data` with inflate/ungzip and `options`. Autodetect
3327
+ * format via wrapper header by default. That's why we don't provide
3328
+ * separate `ungzip` method.
3329
+ *
3330
+ * Supported options are:
3331
+ *
3332
+ * - windowBits
3333
+ *
3334
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
3335
+ * for more information.
3336
+ *
3337
+ * Sugar (options):
3338
+ *
3339
+ * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
3340
+ * negative windowBits implicitly.
3341
+ * - `to` (String) - if equal to 'string', then result will be converted
3342
+ * from utf8 to utf16 (javascript) string. When string output requested,
3343
+ * chunk length can differ from `chunkSize`, depending on content.
3344
+ *
3345
+ *
3346
+ * ##### Example:
3347
+ *
3348
+ * ```javascript
3349
+ * const pako = require('pako');
3350
+ * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));
3351
+ * let output;
3352
+ *
3353
+ * try {
3354
+ * output = pako.inflate(input);
3355
+ * } catch (err) {
3356
+ * console.log(err);
3357
+ * }
3358
+ * ```
3359
+ **/
3360
+ function inflate(input, options) {
3361
+ const inflator = new Inflate(options);
3362
+
3363
+ inflator.push(input);
3364
+
3365
+ // That will never happens, if you don't cheat with options :)
3366
+ if (inflator.err) throw inflator.msg || msg[inflator.err];
3367
+
3368
+ return inflator.result;
3369
+ }
3370
+
3371
+
3372
+ /**
3373
+ * inflateRaw(data[, options]) -> Uint8Array|String
3374
+ * - data (Uint8Array): input data to decompress.
3375
+ * - options (Object): zlib inflate options.
3376
+ *
3377
+ * The same as [[inflate]], but creates raw data, without wrapper
3378
+ * (header and adler32 crc).
3379
+ **/
3380
+ function inflateRaw(input, options) {
3381
+ options = options || {};
3382
+ options.raw = true;
3383
+ return inflate(input, options);
3384
+ }
3385
+
3386
+
3387
+ /**
3388
+ * ungzip(data[, options]) -> Uint8Array|String
3389
+ * - data (Uint8Array): input data to decompress.
3390
+ * - options (Object): zlib inflate options.
3391
+ *
3392
+ * Just shortcut to [[inflate]], because it autodetects format
3393
+ * by header.content. Done for convenience.
3394
+ **/
3395
+
3396
+
3397
+ inflate$3.Inflate = Inflate;
3398
+ inflate$3.inflate = inflate;
3399
+ inflate$3.inflateRaw = inflateRaw;
3400
+ inflate$3.ungzip = inflate;
3401
+ inflate$3.constants = constants;
3402
+
3403
+ // Datatype sizes
3404
+ const sizeOfUint16 = Uint16Array.BYTES_PER_ELEMENT;
3405
+ const sizeOfInt32 = Int32Array.BYTES_PER_ELEMENT;
3406
+ const sizeOfUint32 = Uint32Array.BYTES_PER_ELEMENT;
3407
+
3408
+ const Types = {
3409
+ METADATA: 0,
3410
+ TERRAIN: 1,
3411
+ DBROOT: 2,
3412
+ };
3413
+
3414
+ Types.fromString = function (s) {
3415
+ if (s === "Metadata") {
3416
+ return Types.METADATA;
3417
+ } else if (s === "Terrain") {
3418
+ return Types.TERRAIN;
3419
+ } else if (s === "DbRoot") {
3420
+ return Types.DBROOT;
3421
+ }
3422
+ };
3423
+
3424
+ function decodeGoogleEarthEnterprisePacket(parameters, transferableObjects) {
3425
+ const type = Types.fromString(parameters.type);
3426
+ let buffer = parameters.buffer;
3427
+ decodeGoogleEarthEnterpriseData(parameters.key, buffer);
3428
+
3429
+ const uncompressedTerrain = uncompressPacket(buffer);
3430
+ buffer = uncompressedTerrain.buffer;
3431
+ const length = uncompressedTerrain.length;
3432
+
3433
+ switch (type) {
3434
+ case Types.METADATA:
3435
+ return processMetadata(buffer, length, parameters.quadKey);
3436
+ case Types.TERRAIN:
3437
+ return processTerrain(buffer, length, transferableObjects);
3438
+ case Types.DBROOT:
3439
+ transferableObjects.push(buffer);
3440
+ return {
3441
+ buffer: buffer,
3442
+ };
3443
+ }
3444
+ }
3445
+
3446
+ const qtMagic = 32301;
3447
+
3448
+ function processMetadata(buffer, totalSize, quadKey) {
3449
+ const dv = new DataView(buffer);
3450
+ let offset = 0;
3451
+ const magic = dv.getUint32(offset, true);
3452
+ offset += sizeOfUint32;
3453
+ if (magic !== qtMagic) {
3454
+ throw new RuntimeError.RuntimeError("Invalid magic");
3455
+ }
3456
+
3457
+ const dataTypeId = dv.getUint32(offset, true);
3458
+ offset += sizeOfUint32;
3459
+ if (dataTypeId !== 1) {
3460
+ throw new RuntimeError.RuntimeError("Invalid data type. Must be 1 for QuadTreePacket");
3461
+ }
3462
+
3463
+ // Tile format version
3464
+ const quadVersion = dv.getUint32(offset, true);
3465
+ offset += sizeOfUint32;
3466
+ if (quadVersion !== 2) {
3467
+ throw new RuntimeError.RuntimeError(
3468
+ "Invalid QuadTreePacket version. Only version 2 is supported."
3469
+ );
3470
+ }
3471
+
3472
+ const numInstances = dv.getInt32(offset, true);
3473
+ offset += sizeOfInt32;
3474
+
3475
+ const dataInstanceSize = dv.getInt32(offset, true);
3476
+ offset += sizeOfInt32;
3477
+ if (dataInstanceSize !== 32) {
3478
+ throw new RuntimeError.RuntimeError("Invalid instance size.");
3479
+ }
3480
+
3481
+ const dataBufferOffset = dv.getInt32(offset, true);
3482
+ offset += sizeOfInt32;
3483
+
3484
+ const dataBufferSize = dv.getInt32(offset, true);
3485
+ offset += sizeOfInt32;
3486
+
3487
+ const metaBufferSize = dv.getInt32(offset, true);
3488
+ offset += sizeOfInt32;
3489
+
3490
+ // Offset from beginning of packet (instances + current offset)
3491
+ if (dataBufferOffset !== numInstances * dataInstanceSize + offset) {
3492
+ throw new RuntimeError.RuntimeError("Invalid dataBufferOffset");
3493
+ }
3494
+
3495
+ // Verify the packets is all there header + instances + dataBuffer + metaBuffer
3496
+ if (dataBufferOffset + dataBufferSize + metaBufferSize !== totalSize) {
3497
+ throw new RuntimeError.RuntimeError("Invalid packet offsets");
3498
+ }
3499
+
3500
+ // Read all the instances
3501
+ const instances = [];
3502
+ for (let i = 0; i < numInstances; ++i) {
3503
+ const bitfield = dv.getUint8(offset);
3504
+ ++offset;
3505
+
3506
+ ++offset; // 2 byte align
3507
+
3508
+ const cnodeVersion = dv.getUint16(offset, true);
3509
+ offset += sizeOfUint16;
3510
+
3511
+ const imageVersion = dv.getUint16(offset, true);
3512
+ offset += sizeOfUint16;
3513
+
3514
+ const terrainVersion = dv.getUint16(offset, true);
3515
+ offset += sizeOfUint16;
3516
+
3517
+ // Number of channels stored in the dataBuffer
3518
+ offset += sizeOfUint16;
3519
+
3520
+ offset += sizeOfUint16; // 4 byte align
3521
+
3522
+ // Channel type offset into dataBuffer
3523
+ offset += sizeOfInt32;
3524
+
3525
+ // Channel version offset into dataBuffer
3526
+ offset += sizeOfInt32;
3527
+
3528
+ offset += 8; // Ignore image neighbors for now
3529
+
3530
+ // Data providers
3531
+ const imageProvider = dv.getUint8(offset++);
3532
+ const terrainProvider = dv.getUint8(offset++);
3533
+ offset += sizeOfUint16; // 4 byte align
3534
+
3535
+ instances.push(
3536
+ new GoogleEarthEnterpriseTileInformation(
3537
+ bitfield,
3538
+ cnodeVersion,
3539
+ imageVersion,
3540
+ terrainVersion,
3541
+ imageProvider,
3542
+ terrainProvider
3543
+ )
3544
+ );
3545
+ }
3546
+
3547
+ const tileInfo = [];
3548
+ let index = 0;
3549
+
3550
+ function populateTiles(parentKey, parent, level) {
3551
+ let isLeaf = false;
3552
+ if (level === 4) {
3553
+ if (parent.hasSubtree()) {
3554
+ return; // We have a subtree, so just return
3555
+ }
3556
+
3557
+ isLeaf = true; // No subtree, so set all children to null
3558
+ }
3559
+ for (let i = 0; i < 4; ++i) {
3560
+ const childKey = parentKey + i.toString();
3561
+ if (isLeaf) {
3562
+ // No subtree so set all children to null
3563
+ tileInfo[childKey] = null;
3564
+ } else if (level < 4) {
3565
+ // We are still in the middle of the subtree, so add child
3566
+ // only if their bits are set, otherwise set child to null.
3567
+ if (!parent.hasChild(i)) {
3568
+ tileInfo[childKey] = null;
3569
+ } else {
3570
+ if (index === numInstances) {
3571
+ console.log("Incorrect number of instances");
3572
+ return;
3573
+ }
3574
+
3575
+ const instance = instances[index++];
3576
+ tileInfo[childKey] = instance;
3577
+ populateTiles(childKey, instance, level + 1);
3578
+ }
3579
+ }
3580
+ }
3581
+ }
3582
+
3583
+ let level = 0;
3584
+ const root = instances[index++];
3585
+ if (quadKey === "") {
3586
+ // Root tile has data at its root and one less level
3587
+ ++level;
3588
+ } else {
3589
+ tileInfo[quadKey] = root; // This will only contain the child bitmask
3590
+ }
3591
+
3592
+ populateTiles(quadKey, root, level);
3593
+
3594
+ return tileInfo;
3595
+ }
3596
+
3597
+ const numMeshesPerPacket = 5;
3598
+ const numSubMeshesPerMesh = 4;
3599
+
3600
+ // Each terrain packet will have 5 meshes - each containg 4 sub-meshes:
3601
+ // 1 even level mesh and its 4 odd level children.
3602
+ // Any remaining bytes after the 20 sub-meshes contains water surface meshes,
3603
+ // which are ignored.
3604
+ function processTerrain(buffer, totalSize, transferableObjects) {
3605
+ const dv = new DataView(buffer);
3606
+
3607
+ // Find the sub-meshes.
3608
+ const advanceMesh = function (pos) {
3609
+ for (let sub = 0; sub < numSubMeshesPerMesh; ++sub) {
3610
+ const size = dv.getUint32(pos, true);
3611
+ pos += sizeOfUint32;
3612
+ pos += size;
3613
+ if (pos > totalSize) {
3614
+ throw new RuntimeError.RuntimeError("Malformed terrain packet found.");
3615
+ }
3616
+ }
3617
+ return pos;
3618
+ };
3619
+
3620
+ let offset = 0;
3621
+ const terrainMeshes = [];
3622
+ while (terrainMeshes.length < numMeshesPerPacket) {
3623
+ const start = offset;
3624
+ offset = advanceMesh(offset);
3625
+ const mesh = buffer.slice(start, offset);
3626
+ transferableObjects.push(mesh);
3627
+ terrainMeshes.push(mesh);
3628
+ }
3629
+
3630
+ return terrainMeshes;
3631
+ }
3632
+
3633
+ const compressedMagic = 0x7468dead;
3634
+ const compressedMagicSwap = 0xadde6874;
3635
+
3636
+ function uncompressPacket(data) {
3637
+ // The layout of this decoded data is
3638
+ // Magic Uint32
3639
+ // Size Uint32
3640
+ // [GZipped chunk of Size bytes]
3641
+
3642
+ // Pullout magic and verify we have the correct data
3643
+ const dv = new DataView(data);
3644
+ let offset = 0;
3645
+ const magic = dv.getUint32(offset, true);
3646
+ offset += sizeOfUint32;
3647
+ if (magic !== compressedMagic && magic !== compressedMagicSwap) {
3648
+ throw new RuntimeError.RuntimeError("Invalid magic");
3649
+ }
3650
+
3651
+ // Get the size of the compressed buffer - the endianness depends on which magic was used
3652
+ const size = dv.getUint32(offset, magic === compressedMagic);
3653
+ offset += sizeOfUint32;
3654
+
3655
+ const compressedPacket = new Uint8Array(data, offset);
3656
+ const uncompressedPacket = inflate$3.inflate(compressedPacket);
3657
+
3658
+ if (uncompressedPacket.length !== size) {
3659
+ throw new RuntimeError.RuntimeError("Size of packet doesn't match header");
3660
+ }
3661
+
3662
+ return uncompressedPacket;
3663
+ }
3664
+ var decodeGoogleEarthEnterprisePacket$1 = createTaskProcessorWorker(decodeGoogleEarthEnterprisePacket);
3665
+
3666
+ return decodeGoogleEarthEnterprisePacket$1;
3667
+
3668
+ }));