@kitware/vtk.js 19.2.13 → 19.3.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 (717) hide show
  1. package/Common/Core/Base64.js +1 -1
  2. package/Common/Core/CellArray.js +2 -3
  3. package/Common/Core/ClassHierarchy.js +1 -1
  4. package/Common/Core/DataArray/Constants.js +1 -2
  5. package/Common/Core/DataArray.js +3 -4
  6. package/Common/Core/Endian.js +1 -2
  7. package/Common/Core/ImageHelper.js +1 -1
  8. package/Common/Core/LookupTable.js +1 -2
  9. package/Common/Core/MatrixBuilder.js +1 -1
  10. package/Common/Core/Points.js +1 -2
  11. package/Common/Core/PriorityQueue.js +1 -2
  12. package/Common/Core/ProgressHandler.js +1 -2
  13. package/Common/Core/ScalarsToColors/Constants.js +1 -2
  14. package/Common/Core/ScalarsToColors.js +2 -3
  15. package/Common/Core/StringArray.js +1 -2
  16. package/Common/Core/URLExtract.js +1 -1
  17. package/Common/Core/VariantArray.js +1 -2
  18. package/Common/Core.js +1 -1
  19. package/Common/DataModel/BoundingBox.js +2 -3
  20. package/Common/DataModel/Box.js +2 -3
  21. package/Common/DataModel/CardinalSpline1D.js +1 -2
  22. package/Common/DataModel/Cell.js +1 -2
  23. package/Common/DataModel/CellLinks.js +26 -27
  24. package/Common/DataModel/CellTypes/Constants.js +1 -2
  25. package/Common/DataModel/CellTypes.js +2 -3
  26. package/Common/DataModel/Cone.js +1 -2
  27. package/Common/DataModel/Cylinder.js +2 -3
  28. package/Common/DataModel/DataSet/Constants.js +1 -2
  29. package/Common/DataModel/DataSet.js +2 -3
  30. package/Common/DataModel/DataSetAttributes/Constants.js +1 -2
  31. package/Common/DataModel/DataSetAttributes/FieldData.js +1 -2
  32. package/Common/DataModel/DataSetAttributes.js +2 -3
  33. package/Common/DataModel/ITKHelper.js +1 -1
  34. package/Common/DataModel/ImageData.js +1 -2
  35. package/Common/DataModel/ImplicitBoolean/Constants.js +1 -2
  36. package/Common/DataModel/ImplicitBoolean.js +2 -3
  37. package/Common/DataModel/KochanekSpline1D.js +1 -2
  38. package/Common/DataModel/Line/Constants.js +1 -2
  39. package/Common/DataModel/Line.js +2 -3
  40. package/Common/DataModel/Molecule.js +1 -2
  41. package/Common/DataModel/PiecewiseFunction.js +1 -2
  42. package/Common/DataModel/Plane.js +2 -3
  43. package/Common/DataModel/PointSet.js +1 -2
  44. package/Common/DataModel/PolyData/Constants.js +1 -2
  45. package/Common/DataModel/PolyData.js +1 -2
  46. package/Common/DataModel/Polygon.js +1 -2
  47. package/Common/DataModel/SelectionNode/Constants.js +1 -2
  48. package/Common/DataModel/SelectionNode.js +2 -3
  49. package/Common/DataModel/Sphere.js +2 -3
  50. package/Common/DataModel/Spline1D.js +1 -2
  51. package/Common/DataModel/Spline3D/Constants.js +1 -2
  52. package/Common/DataModel/Spline3D.js +1 -2
  53. package/Common/DataModel/StructuredData/Constants.js +1 -2
  54. package/Common/DataModel/StructuredData.js +2 -3
  55. package/Common/DataModel/Triangle.js +2 -3
  56. package/Common/DataModel.js +1 -1
  57. package/Common/System/MobileVR/headsets.js +1 -1
  58. package/Common/System/MobileVR.js +1 -1
  59. package/Common/System/TimerLog.js +1 -2
  60. package/Common/System.js +1 -1
  61. package/Common/Transform/LandmarkTransform/Constants.js +1 -2
  62. package/Common/Transform/LandmarkTransform.js +2 -3
  63. package/Common/Transform.js +1 -1
  64. package/Common/index.js +1 -1
  65. package/Filters/Core/Cutter.js +3 -4
  66. package/Filters/Core.js +1 -1
  67. package/Filters/Cornerstone/ImageDataToCornerstoneImage.js +1 -2
  68. package/Filters/Cornerstone.js +1 -1
  69. package/Filters/General/AppendPolyData.js +1 -2
  70. package/Filters/General/Calculator.js +2 -3
  71. package/Filters/General/ClosedPolyLineToSurfaceFilter.js +1 -2
  72. package/Filters/General/ImageCropFilter.js +1 -2
  73. package/Filters/General/ImageMarchingCubes/caseTable.js +1 -1
  74. package/Filters/General/ImageMarchingCubes.js +1 -2
  75. package/Filters/General/ImageMarchingSquares/caseTable.js +1 -1
  76. package/Filters/General/ImageMarchingSquares.js +1 -2
  77. package/Filters/General/ImageOutlineFilter.js +1 -2
  78. package/Filters/General/ImageSliceFilter.js +1 -2
  79. package/Filters/General/ImageStreamline.js +1 -2
  80. package/Filters/General/LineFilter.js +1 -2
  81. package/Filters/General/MoleculeToRepresentation.js +1 -2
  82. package/Filters/General/OutlineFilter.js +1 -2
  83. package/Filters/General/PaintFilter/PaintFilter.worker.js +3 -3
  84. package/Filters/General/PaintFilter.js +3 -4
  85. package/Filters/General/ScalarToRGBA.js +1 -2
  86. package/Filters/General/TriangleFilter.js +1 -2
  87. package/Filters/General/TubeFilter/Constants.js +1 -2
  88. package/Filters/General/TubeFilter.js +1 -2
  89. package/Filters/General/WarpScalar.js +1 -2
  90. package/Filters/General/WindowedSincPolyDataFilter.js +43 -44
  91. package/Filters/General.js +1 -1
  92. package/Filters/Sources/Arrow2DSource/Constants.js +1 -2
  93. package/Filters/Sources/Arrow2DSource.js +2 -3
  94. package/Filters/Sources/ArrowSource.js +1 -2
  95. package/Filters/Sources/CircleSource.js +2 -3
  96. package/Filters/Sources/ConcentricCylinderSource.js +1 -2
  97. package/Filters/Sources/ConeSource.js +1 -2
  98. package/Filters/Sources/CubeSource.js +1 -2
  99. package/Filters/Sources/Cursor3D.js +12 -13
  100. package/Filters/Sources/CylinderSource.js +1 -2
  101. package/Filters/Sources/ImageGridSource.js +1 -2
  102. package/Filters/Sources/LineSource.js +1 -2
  103. package/Filters/Sources/PlaneSource.js +1 -2
  104. package/Filters/Sources/PointSource.js +1 -2
  105. package/Filters/Sources/RTAnalyticSource.js +1 -2
  106. package/Filters/Sources/SLICSource.js +1 -2
  107. package/Filters/Sources/SphereSource.js +1 -2
  108. package/Filters/Sources/ViewFinderSource.js +1 -2
  109. package/Filters/Sources.js +1 -1
  110. package/Filters/Texture/TextureMapToPlane.js +1 -2
  111. package/Filters/Texture/TextureMapToSphere.js +1 -2
  112. package/Filters/Texture.js +1 -1
  113. package/Filters/index.js +1 -1
  114. package/IO/Core/BinaryHelper.js +1 -1
  115. package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js +1 -1
  116. package/IO/Core/DataAccessHelper/HttpDataAccessHelper.js +1 -1
  117. package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js +3 -3
  118. package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js +1 -1
  119. package/IO/Core/DataAccessHelper.js +1 -2
  120. package/IO/Core/HttpDataSetReader.js +1 -2
  121. package/IO/Core/HttpDataSetSeriesReader.js +1 -2
  122. package/IO/Core/HttpSceneLoader.js +2 -3
  123. package/IO/Core/ImageStream/DefaultProtocol.js +1 -1
  124. package/IO/Core/ImageStream/ViewStream.js +1 -2
  125. package/IO/Core/ImageStream.js +1 -2
  126. package/IO/Core/ResourceLoader.js +1 -2
  127. package/IO/Core/Serializer/ArraySerializer.js +1 -2
  128. package/IO/Core/Serializer/FieldDataSerializer.js +1 -1
  129. package/IO/Core/Serializer/ImageDataSerializer.js +1 -1
  130. package/IO/Core/Serializer/PolyDataSerializer.js +1 -1
  131. package/IO/Core/Serializer.js +1 -1
  132. package/IO/Core/WSLinkClient.js +1 -2
  133. package/IO/Core/ZipMultiDataSetReader.js +3 -4
  134. package/IO/Core/ZipMultiDataSetWriter.js +3 -4
  135. package/IO/Core.js +1 -1
  136. package/IO/Geometry/DracoReader.js +1 -2
  137. package/IO/Geometry/PLYReader.js +1 -2
  138. package/IO/Geometry/STLReader.js +1 -2
  139. package/IO/Geometry/STLWriter/Constants.js +1 -2
  140. package/IO/Geometry/STLWriter.js +2 -3
  141. package/IO/Geometry.js +1 -1
  142. package/IO/Legacy/LegacyAsciiParser.js +1 -1
  143. package/IO/Legacy/PolyDataReader.js +1 -2
  144. package/IO/Legacy.js +1 -1
  145. package/IO/Misc/ElevationReader.js +1 -2
  146. package/IO/Misc/HttpDataSetLODsLoader.js +1 -2
  147. package/IO/Misc/ITKImageReader.js +1 -2
  148. package/IO/Misc/ITKPolyDataReader.js +1 -2
  149. package/IO/Misc/JSONNucleoReader.js +1 -2
  150. package/IO/Misc/JSONReader.js +1 -2
  151. package/IO/Misc/MTLReader.js +2 -3
  152. package/IO/Misc/OBJReader.js +1 -2
  153. package/IO/Misc/PDBReader.js +1 -2
  154. package/IO/Misc/SkyboxReader.js +3 -4
  155. package/IO/Misc.js +1 -1
  156. package/IO/XML/XMLImageDataReader.js +1 -2
  157. package/IO/XML/XMLImageDataWriter.js +2 -3
  158. package/IO/XML/XMLPolyDataReader.js +1 -2
  159. package/IO/XML/XMLPolyDataWriter.js +2 -3
  160. package/IO/XML/XMLReader.js +1 -2
  161. package/IO/XML/XMLWriter/Constants.js +1 -2
  162. package/IO/XML/XMLWriter.js +4 -4
  163. package/IO/XML.js +1 -1
  164. package/IO/index.js +1 -1
  165. package/Imaging/Core/AbstractImageInterpolator/Constants.js +1 -2
  166. package/Imaging/Core/AbstractImageInterpolator/InterpolationInfo.js +2 -3
  167. package/Imaging/Core/AbstractImageInterpolator.js +2 -3
  168. package/Imaging/Core/ImageInterpolator.js +2 -3
  169. package/Imaging/Core/ImagePointDataIterator.js +1 -2
  170. package/Imaging/Core/ImageReslice/Constants.js +1 -2
  171. package/Imaging/Core/ImageReslice.js +2 -3
  172. package/Imaging/Core.js +1 -1
  173. package/Imaging/Hybrid/SampleFunction.js +2 -3
  174. package/Imaging/Hybrid.js +1 -1
  175. package/Imaging/index.js +1 -1
  176. package/Interaction/Animations/TimeStepBasedAnimationHandler.js +2 -3
  177. package/Interaction/Manipulators/CompositeCameraManipulator.js +1 -2
  178. package/Interaction/Manipulators/CompositeGestureManipulator.js +1 -2
  179. package/Interaction/Manipulators/CompositeKeyboardManipulator.js +1 -2
  180. package/Interaction/Manipulators/CompositeMouseManipulator.js +1 -2
  181. package/Interaction/Manipulators/CompositeVRManipulator.js +1 -2
  182. package/Interaction/Manipulators/GestureCameraManipulator.js +1 -2
  183. package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -2
  184. package/Interaction/Manipulators/MouseBoxSelectorManipulator.js +3 -4
  185. package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -2
  186. package/Interaction/Manipulators/MouseCameraSliceManipulator.js +1 -2
  187. package/Interaction/Manipulators/MouseCameraTrackballFirstPersonManipulator.js +1 -2
  188. package/Interaction/Manipulators/MouseCameraTrackballMultiRotateManipulator.js +1 -2
  189. package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -2
  190. package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -2
  191. package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -2
  192. package/Interaction/Manipulators/MouseCameraTrackballZoomManipulator.js +1 -2
  193. package/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator.js +1 -2
  194. package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -2
  195. package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -2
  196. package/Interaction/Manipulators/MouseRangeManipulator.js +1 -2
  197. package/Interaction/Manipulators/VRButtonPanManipulator.js +1 -2
  198. package/Interaction/Manipulators.js +1 -1
  199. package/Interaction/Misc/DeviceOrientationToCamera.js +1 -1
  200. package/Interaction/Misc.js +1 -1
  201. package/Interaction/Style/InteractorStyleImage.js +1 -2
  202. package/Interaction/Style/InteractorStyleMPRSlice.js +1 -2
  203. package/Interaction/Style/InteractorStyleManipulator/Presets.js +1 -1
  204. package/Interaction/Style/InteractorStyleManipulator.js +2 -3
  205. package/Interaction/Style/InteractorStyleRemoteMouse.js +2 -3
  206. package/Interaction/Style/InteractorStyleTrackballCamera.js +1 -2
  207. package/Interaction/Style/InteractorStyleUnicam.js +1 -2
  208. package/Interaction/Style.js +1 -1
  209. package/Interaction/UI/CornerAnnotation.js +1 -2
  210. package/Interaction/UI/FPSMonitor.js +2 -3
  211. package/Interaction/UI/Icons.js +1 -1
  212. package/Interaction/UI/Slider/Constants.js +1 -2
  213. package/Interaction/UI/Slider.js +2 -3
  214. package/Interaction/UI/VolumeController.js +1 -2
  215. package/Interaction/UI.js +1 -1
  216. package/Interaction/Widgets/AbstractWidget.js +2 -3
  217. package/Interaction/Widgets/DistanceRepresentation.js +2 -3
  218. package/Interaction/Widgets/DistanceWidget.js +2 -3
  219. package/Interaction/Widgets/HandleRepresentation/Constants.js +1 -2
  220. package/Interaction/Widgets/HandleRepresentation.js +2 -3
  221. package/Interaction/Widgets/HandleWidget/Constants.js +1 -2
  222. package/Interaction/Widgets/HandleWidget.js +2 -3
  223. package/Interaction/Widgets/ImageCroppingRegionsRepresentation.js +1 -2
  224. package/Interaction/Widgets/ImageCroppingRegionsWidget/Constants.js +1 -1
  225. package/Interaction/Widgets/ImageCroppingRegionsWidget.js +2 -3
  226. package/Interaction/Widgets/LabelRepresentation/Constants.js +1 -2
  227. package/Interaction/Widgets/LabelRepresentation.js +3 -4
  228. package/Interaction/Widgets/LabelWidget.js +2 -3
  229. package/Interaction/Widgets/LineRepresentation/Constants.js +1 -2
  230. package/Interaction/Widgets/LineRepresentation.js +2 -3
  231. package/Interaction/Widgets/LineWidget/Constants.js +1 -2
  232. package/Interaction/Widgets/LineWidget.js +2 -3
  233. package/Interaction/Widgets/OrientationMarkerWidget/Constants.js +1 -1
  234. package/Interaction/Widgets/OrientationMarkerWidget.js +2 -3
  235. package/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +3 -3
  236. package/Interaction/Widgets/PiecewiseGaussianWidget.js +15 -16
  237. package/Interaction/Widgets/PointPlacer.js +1 -2
  238. package/Interaction/Widgets/ResliceCursor/ResliceCursor/Constants.js +1 -2
  239. package/Interaction/Widgets/ResliceCursor/ResliceCursor.js +2 -3
  240. package/Interaction/Widgets/ResliceCursor/ResliceCursorActor/Constants.js +1 -2
  241. package/Interaction/Widgets/ResliceCursor/ResliceCursorActor.js +2 -3
  242. package/Interaction/Widgets/ResliceCursor/ResliceCursorLineRepresentation.js +1 -2
  243. package/Interaction/Widgets/ResliceCursor/ResliceCursorPolyDataAlgorithm.js +2 -3
  244. package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation.js +1 -2
  245. package/Interaction/Widgets/ResliceCursor/ResliceCursorWidget/Constants.js +1 -2
  246. package/Interaction/Widgets/ResliceCursor/ResliceCursorWidget.js +2 -3
  247. package/Interaction/Widgets/SphereHandleRepresentation.js +2 -3
  248. package/Interaction/Widgets/WidgetRepresentation.js +1 -2
  249. package/Interaction/Widgets.js +1 -1
  250. package/Interaction/index.js +1 -1
  251. package/Proxy/Animation/AbstractAnimationProxy.js +1 -2
  252. package/Proxy/Animation/AnimationProxyManager.js +1 -2
  253. package/Proxy/Animation/TimeStepBasedAnimationHandlerProxy.js +1 -2
  254. package/Proxy/Core/AbstractRepresentationProxy.js +1 -1
  255. package/Proxy/Core/LookupTableProxy/Constants.js +1 -1
  256. package/Proxy/Core/LookupTableProxy.js +1 -2
  257. package/Proxy/Core/PiecewiseFunctionProxy/Constants.js +1 -1
  258. package/Proxy/Core/PiecewiseFunctionProxy.js +2 -3
  259. package/Proxy/Core/ProxyManager/core.js +2 -2
  260. package/Proxy/Core/ProxyManager/properties.js +2 -2
  261. package/Proxy/Core/ProxyManager/state.js +2 -2
  262. package/Proxy/Core/ProxyManager/view.js +1 -1
  263. package/Proxy/Core/ProxyManager.js +1 -2
  264. package/Proxy/Core/SourceProxy.js +1 -2
  265. package/Proxy/Core/View2DProxy.js +1 -2
  266. package/Proxy/Core/ViewProxy.js +4 -4
  267. package/Proxy/Core.js +1 -1
  268. package/Proxy/Representations/GeometryRepresentationProxy.js +1 -2
  269. package/Proxy/Representations/GlyphRepresentationProxy.js +1 -2
  270. package/Proxy/Representations/MoleculeRepresentationProxy.js +1 -2
  271. package/Proxy/Representations/SkyboxRepresentationProxy.js +1 -2
  272. package/Proxy/Representations/SliceRepresentationProxy.js +2 -3
  273. package/Proxy/Representations/SlicedGeometryRepresentationProxy.js +1 -2
  274. package/Proxy/Representations/VolumeRepresentationProxy.js +1 -2
  275. package/Proxy/Representations.js +1 -1
  276. package/Proxy/index.js +1 -1
  277. package/Rendering/Core/AbstractMapper.js +1 -2
  278. package/Rendering/Core/AbstractMapper3D.js +1 -2
  279. package/Rendering/Core/AbstractPicker.js +1 -2
  280. package/Rendering/Core/Actor.js +2 -3
  281. package/Rendering/Core/Actor2D.js +1 -2
  282. package/Rendering/Core/AnnotatedCubeActor/Presets.js +1 -1
  283. package/Rendering/Core/AnnotatedCubeActor.js +2 -3
  284. package/Rendering/Core/AxesActor.js +2 -3
  285. package/Rendering/Core/Camera.js +1 -2
  286. package/Rendering/Core/CellPicker.js +2 -3
  287. package/Rendering/Core/ColorTransferFunction/ColorMaps.js +1 -1
  288. package/Rendering/Core/ColorTransferFunction/ColorMapsLite.js +1 -1
  289. package/Rendering/Core/ColorTransferFunction/Constants.js +1 -2
  290. package/Rendering/Core/ColorTransferFunction.js +2 -3
  291. package/Rendering/Core/Coordinate/Constants.js +1 -2
  292. package/Rendering/Core/Coordinate.js +2 -3
  293. package/Rendering/Core/CubeAxesActor.js +2 -3
  294. package/Rendering/Core/Follower.js +2 -3
  295. package/Rendering/Core/Glyph3DMapper/Constants.js +1 -2
  296. package/Rendering/Core/Glyph3DMapper.js +2 -3
  297. package/Rendering/Core/HardwareSelector.js +1 -2
  298. package/Rendering/Core/ImageMapper/Constants.js +1 -2
  299. package/Rendering/Core/ImageMapper.js +2 -3
  300. package/Rendering/Core/ImageProperty/Constants.js +1 -2
  301. package/Rendering/Core/ImageProperty.js +1 -2
  302. package/Rendering/Core/ImageSlice.js +1 -2
  303. package/Rendering/Core/InteractorObserver.js +2 -3
  304. package/Rendering/Core/InteractorStyle/Constants.js +1 -2
  305. package/Rendering/Core/InteractorStyle.js +2 -3
  306. package/Rendering/Core/Light.js +1 -2
  307. package/Rendering/Core/Mapper/CoincidentTopologyHelper.js +1 -2
  308. package/Rendering/Core/Mapper/Constants.js +1 -2
  309. package/Rendering/Core/Mapper/Static.js +1 -2
  310. package/Rendering/Core/Mapper.js +2 -3
  311. package/Rendering/Core/Picker.js +2 -3
  312. package/Rendering/Core/PixelSpaceCallbackMapper.js +1 -2
  313. package/Rendering/Core/PointPicker.js +1 -9
  314. package/Rendering/Core/Prop.js +1 -2
  315. package/Rendering/Core/Prop3D.js +1 -2
  316. package/Rendering/Core/Property/Constants.js +1 -2
  317. package/Rendering/Core/Property.js +2 -3
  318. package/Rendering/Core/Property2D.js +1 -2
  319. package/Rendering/Core/RenderWindow.js +1 -2
  320. package/Rendering/Core/RenderWindowInteractor/Constants.js +1 -2
  321. package/Rendering/Core/RenderWindowInteractor.js +2 -3
  322. package/Rendering/Core/Renderer.js +2 -3
  323. package/Rendering/Core/ScalarBarActor.js +2 -3
  324. package/Rendering/Core/Skybox.js +1 -2
  325. package/Rendering/Core/SphereMapper.js +1 -2
  326. package/Rendering/Core/StickMapper.js +1 -2
  327. package/Rendering/Core/SurfaceLICInterface/Constants.js +1 -2
  328. package/Rendering/Core/SurfaceLICInterface.js +1 -2
  329. package/Rendering/Core/SurfaceLICMapper.js +1 -2
  330. package/Rendering/Core/Texture.js +1 -2
  331. package/Rendering/Core/Viewport.js +1 -2
  332. package/Rendering/Core/Volume.js +1 -2
  333. package/Rendering/Core/VolumeMapper/Constants.js +1 -2
  334. package/Rendering/Core/VolumeMapper.js +1 -2
  335. package/Rendering/Core/VolumeProperty/Constants.js +1 -2
  336. package/Rendering/Core/VolumeProperty.js +2 -3
  337. package/Rendering/Core.js +2 -2
  338. package/Rendering/Misc/CanvasView.js +1 -2
  339. package/Rendering/Misc/FullScreenRenderWindow.js +1 -2
  340. package/Rendering/Misc/GenericRenderWindow.js +1 -2
  341. package/Rendering/Misc/RemoteView.js +1 -2
  342. package/Rendering/Misc/RenderWindowWithControlBar.js +2 -3
  343. package/Rendering/Misc/SynchronizableRenderWindow/vtkObjectManager.js +2 -2
  344. package/Rendering/Misc/SynchronizableRenderWindow.js +3 -4
  345. package/Rendering/Misc/TextureLODsDownloader.js +1 -2
  346. package/Rendering/Misc.js +1 -1
  347. package/Rendering/OpenGL/Actor.js +2 -3
  348. package/Rendering/OpenGL/Actor2D.js +2 -3
  349. package/Rendering/OpenGL/BufferObject/Constants.js +1 -2
  350. package/Rendering/OpenGL/BufferObject.js +2 -3
  351. package/Rendering/OpenGL/Camera.js +2 -3
  352. package/Rendering/OpenGL/CellArrayBufferObject.js +2 -4
  353. package/Rendering/OpenGL/Convolution2DPass.js +1 -2
  354. package/Rendering/OpenGL/ForwardPass.js +1 -2
  355. package/Rendering/OpenGL/Framebuffer.js +2 -3
  356. package/Rendering/OpenGL/Glyph3DMapper.js +3 -4
  357. package/Rendering/OpenGL/HardwareSelector/Constants.js +1 -2
  358. package/Rendering/OpenGL/HardwareSelector.js +2 -3
  359. package/Rendering/OpenGL/Helper.js +1 -2
  360. package/Rendering/OpenGL/ImageMapper.js +2 -3
  361. package/Rendering/OpenGL/ImageSlice.js +2 -3
  362. package/Rendering/OpenGL/PixelSpaceCallbackMapper.js +1 -2
  363. package/Rendering/OpenGL/PolyDataMapper.js +2 -3
  364. package/Rendering/OpenGL/RadialDistortionPass.js +1 -2
  365. package/Rendering/OpenGL/RenderWindow.js +1 -2
  366. package/Rendering/OpenGL/Renderer.js +2 -3
  367. package/Rendering/OpenGL/ReplacementShaderMapper.js +1 -1
  368. package/Rendering/OpenGL/Shader.js +1 -2
  369. package/Rendering/OpenGL/ShaderCache.js +1 -2
  370. package/Rendering/OpenGL/ShaderProgram.js +1 -1
  371. package/Rendering/OpenGL/Skybox.js +2 -3
  372. package/Rendering/OpenGL/SphereMapper.js +2 -3
  373. package/Rendering/OpenGL/StickMapper.js +2 -3
  374. package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D/pingpong.js +1 -2
  375. package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D.js +1 -2
  376. package/Rendering/OpenGL/SurfaceLIC/SurfaceLICInterface.js +1 -2
  377. package/Rendering/OpenGL/SurfaceLIC/SurfaceLICMapper.js +3 -4
  378. package/Rendering/OpenGL/SurfaceLIC.js +1 -1
  379. package/Rendering/OpenGL/Texture/Constants.js +1 -2
  380. package/Rendering/OpenGL/Texture.js +3 -4
  381. package/Rendering/OpenGL/TextureUnitManager.js +1 -2
  382. package/Rendering/OpenGL/VertexArrayObject.js +1 -2
  383. package/Rendering/OpenGL/ViewNodeFactory.js +1 -2
  384. package/Rendering/OpenGL/Volume.js +2 -3
  385. package/Rendering/OpenGL/VolumeMapper.js +3 -4
  386. package/Rendering/OpenGL.js +1 -1
  387. package/Rendering/SceneGraph/RenderPass.js +1 -2
  388. package/Rendering/SceneGraph/RenderWindowViewNode.js +1 -2
  389. package/Rendering/SceneGraph/ViewNode.js +1 -1
  390. package/Rendering/SceneGraph/ViewNodeFactory.js +1 -2
  391. package/Rendering/SceneGraph.js +1 -1
  392. package/Rendering/WebGPU/Actor.js +1 -2
  393. package/Rendering/WebGPU/BindGroup.js +1 -2
  394. package/Rendering/WebGPU/Buffer.js +2 -3
  395. package/Rendering/WebGPU/BufferManager/Constants.js +1 -2
  396. package/Rendering/WebGPU/BufferManager.js +3 -4
  397. package/Rendering/WebGPU/Camera.js +1 -2
  398. package/Rendering/WebGPU/Device.js +2 -3
  399. package/Rendering/WebGPU/ForwardPass.js +1 -2
  400. package/Rendering/WebGPU/FullScreenQuad.js +1 -2
  401. package/Rendering/WebGPU/Glyph3DMapper.js +3 -4
  402. package/Rendering/WebGPU/HardwareSelectionPass.js +1 -2
  403. package/Rendering/WebGPU/HardwareSelector.js +1 -2
  404. package/Rendering/WebGPU/MapperHelper.js +1 -2
  405. package/Rendering/WebGPU/OpaquePass.js +2 -4
  406. package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -2
  407. package/Rendering/WebGPU/Pipeline.js +2 -3
  408. package/Rendering/WebGPU/PixelSpaceCallbackMapper.js +1 -2
  409. package/Rendering/WebGPU/PolyDataMapper.js +3 -4
  410. package/Rendering/WebGPU/RenderEncoder.js +2 -3
  411. package/Rendering/WebGPU/RenderWindow.js +11 -3
  412. package/Rendering/WebGPU/Renderer.js +2 -3
  413. package/Rendering/WebGPU/Sampler.js +1 -2
  414. package/Rendering/WebGPU/ShaderCache.js +1 -2
  415. package/Rendering/WebGPU/ShaderDescription.js +1 -2
  416. package/Rendering/WebGPU/ShaderModule.js +1 -1
  417. package/Rendering/WebGPU/SphereMapper.js +1 -2
  418. package/Rendering/WebGPU/StickMapper.js +1 -2
  419. package/Rendering/WebGPU/StorageBuffer.js +1 -2
  420. package/Rendering/WebGPU/Texture.js +2 -3
  421. package/Rendering/WebGPU/TextureManager.js +24 -7
  422. package/Rendering/WebGPU/TextureView.js +19 -4
  423. package/Rendering/WebGPU/Types.js +83 -42
  424. package/Rendering/WebGPU/UniformBuffer.js +1 -2
  425. package/Rendering/WebGPU/VertexInput.js +2 -3
  426. package/Rendering/WebGPU/ViewNodeFactory.js +1 -2
  427. package/Rendering/WebGPU/Volume.js +1 -2
  428. package/Rendering/WebGPU/VolumePass.js +2 -3
  429. package/Rendering/WebGPU/VolumePassFSQ.js +4 -4
  430. package/Rendering/WebGPU.js +1 -1
  431. package/Rendering/index.js +1 -1
  432. package/ThirdParty/index.js +2 -2
  433. package/Utilities/DataGenerator/convert-cli.js +10 -8
  434. package/Utilities/ExampleRunner/example-runner-cli.js +2 -1
  435. package/Utilities/ExampleRunner/template-config.js +8 -6
  436. package/Utilities/TestResults/TESTS-Chrome_Headless_93.0.4577.63_(Linux_x86_64).xml +1058 -1058
  437. package/Utilities/XMLConverter/xml2json-cli.js +5 -4
  438. package/Widgets/Core/AbstractWidget/Constants.js +1 -2
  439. package/Widgets/Core/AbstractWidget.js +1 -2
  440. package/Widgets/Core/AbstractWidgetFactory.js +2 -3
  441. package/Widgets/Core/StateBuilder/boundsMixin.js +1 -2
  442. package/Widgets/Core/StateBuilder/colorMixin.js +1 -2
  443. package/Widgets/Core/StateBuilder/cornerMixin.js +1 -2
  444. package/Widgets/Core/StateBuilder/directionMixin.js +1 -2
  445. package/Widgets/Core/StateBuilder/manipulatorMixin.js +1 -2
  446. package/Widgets/Core/StateBuilder/nameMixin.js +1 -2
  447. package/Widgets/Core/StateBuilder/orientationMixin.js +1 -2
  448. package/Widgets/Core/StateBuilder/originMixin.js +1 -2
  449. package/Widgets/Core/StateBuilder/scale1Mixin.js +1 -2
  450. package/Widgets/Core/StateBuilder/scale3Mixin.js +1 -2
  451. package/Widgets/Core/StateBuilder/shapeMixin.js +1 -2
  452. package/Widgets/Core/StateBuilder/textMixin.js +1 -2
  453. package/Widgets/Core/StateBuilder/visibleMixin.js +1 -2
  454. package/Widgets/Core/StateBuilder.js +1 -2
  455. package/Widgets/Core/WidgetManager/Constants.js +1 -2
  456. package/Widgets/Core/WidgetManager.js +1 -2
  457. package/Widgets/Core/WidgetState.js +1 -2
  458. package/Widgets/Core.js +1 -1
  459. package/Widgets/Manipulators/LineManipulator.js +1 -2
  460. package/Widgets/Manipulators/PlaneManipulator.js +1 -2
  461. package/Widgets/Manipulators/TrackballManipulator.js +1 -2
  462. package/Widgets/Manipulators.js +1 -1
  463. package/Widgets/Representations/ArrowHandleRepresentation.js +2 -3
  464. package/Widgets/Representations/CircleContextRepresentation.js +1 -2
  465. package/Widgets/Representations/ContextRepresentation.js +2 -3
  466. package/Widgets/Representations/ConvexFaceContextRepresentation.js +1 -2
  467. package/Widgets/Representations/CroppingOutlineRepresentation.js +1 -2
  468. package/Widgets/Representations/CubeHandleRepresentation.js +1 -2
  469. package/Widgets/Representations/HandleRepresentation.js +2 -3
  470. package/Widgets/Representations/ImplicitPlaneRepresentation.js +1 -2
  471. package/Widgets/Representations/OutlineContextRepresentation.js +1 -2
  472. package/Widgets/Representations/PolyLineRepresentation.js +2 -3
  473. package/Widgets/Representations/RectangleContextRepresentation.js +1 -2
  474. package/Widgets/Representations/ResliceCursorContextRepresentation.js +2 -3
  475. package/Widgets/Representations/SphereHandleRepresentation.js +1 -2
  476. package/Widgets/Representations/SplineContextRepresentation.js +1 -2
  477. package/Widgets/Representations/WidgetRepresentation/Constants.js +1 -2
  478. package/Widgets/Representations/WidgetRepresentation.js +1 -2
  479. package/Widgets/Representations.js +1 -1
  480. package/Widgets/SVG/SVGLandmarkRepresentation.js +2 -3
  481. package/Widgets/SVG/SVGRepresentation.js +3 -2
  482. package/Widgets/Widgets3D/AngleWidget/behavior.js +1 -1
  483. package/Widgets/Widgets3D/AngleWidget/state.js +1 -1
  484. package/Widgets/Widgets3D/AngleWidget.js +1 -2
  485. package/Widgets/Widgets3D/DistanceWidget/behavior.js +1 -1
  486. package/Widgets/Widgets3D/DistanceWidget/state.js +1 -1
  487. package/Widgets/Widgets3D/DistanceWidget.js +1 -2
  488. package/Widgets/Widgets3D/EllipseWidget/behavior.js +2 -2
  489. package/Widgets/Widgets3D/EllipseWidget/state.js +1 -1
  490. package/Widgets/Widgets3D/EllipseWidget.js +2 -3
  491. package/Widgets/Widgets3D/ImageCroppingWidget/behavior.js +1 -1
  492. package/Widgets/Widgets3D/ImageCroppingWidget/state.js +1 -1
  493. package/Widgets/Widgets3D/ImageCroppingWidget.js +1 -2
  494. package/Widgets/Widgets3D/ImplicitPlaneWidget.js +1 -2
  495. package/Widgets/Widgets3D/InteractiveOrientationWidget/behavior.js +2 -2
  496. package/Widgets/Widgets3D/InteractiveOrientationWidget/state.js +1 -2
  497. package/Widgets/Widgets3D/InteractiveOrientationWidget.js +1 -2
  498. package/Widgets/Widgets3D/LineWidget/Constants.js +1 -2
  499. package/Widgets/Widgets3D/LineWidget/behavior.js +2 -2
  500. package/Widgets/Widgets3D/LineWidget/state.js +1 -1
  501. package/Widgets/Widgets3D/LineWidget.js +1 -2
  502. package/Widgets/Widgets3D/PaintWidget.js +1 -2
  503. package/Widgets/Widgets3D/PolyLineWidget/behavior.js +1 -1
  504. package/Widgets/Widgets3D/PolyLineWidget/state.js +1 -1
  505. package/Widgets/Widgets3D/PolyLineWidget.js +1 -2
  506. package/Widgets/Widgets3D/RectangleWidget/behavior.js +2 -2
  507. package/Widgets/Widgets3D/RectangleWidget/state.js +1 -1
  508. package/Widgets/Widgets3D/RectangleWidget.js +2 -3
  509. package/Widgets/Widgets3D/ResliceCursorWidget/Constants.js +1 -2
  510. package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
  511. package/Widgets/Widgets3D/ResliceCursorWidget/state.js +1 -1
  512. package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -2
  513. package/Widgets/Widgets3D/ShapeWidget/Constants.js +1 -2
  514. package/Widgets/Widgets3D/ShapeWidget/behavior.js +2 -2
  515. package/Widgets/Widgets3D/ShapeWidget.js +1 -2
  516. package/Widgets/Widgets3D/SplineWidget/behavior.js +1 -1
  517. package/Widgets/Widgets3D/SplineWidget/state.js +1 -1
  518. package/Widgets/Widgets3D/SplineWidget.js +1 -2
  519. package/Widgets/Widgets3D.js +1 -1
  520. package/Widgets/index.js +1 -1
  521. package/_vendor/base64-js/index.js_commonjs-exports +1 -0
  522. package/_vendor/blueimp-md5/js/md5.js_commonjs-module +3 -0
  523. package/_vendor/define-properties/index.js_commonjs-proxy +1 -1
  524. package/_vendor/globalthis/implementation.browser.js_commonjs-module +3 -0
  525. package/_vendor/globalthis/implementation.browser.js_commonjs-proxy +1 -1
  526. package/_vendor/globalthis/polyfill.js_commonjs-proxy +1 -1
  527. package/_vendor/globalthis/shim.js_commonjs-proxy +2 -1
  528. package/_vendor/jszip/dist/jszip.min.js_commonjs-module +3 -0
  529. package/_vendor/object-keys/implementation.js_commonjs-proxy +1 -1
  530. package/_vendor/object-keys/index.js_commonjs-proxy +1 -1
  531. package/_vendor/object-keys/isArguments.js_commonjs-proxy +1 -1
  532. package/_vendor/seedrandom/lib/alea.js_commonjs-module +3 -0
  533. package/_vendor/seedrandom/lib/alea.js_commonjs-proxy +1 -1
  534. package/_vendor/seedrandom/lib/tychei.js_commonjs-module +3 -0
  535. package/_vendor/seedrandom/lib/tychei.js_commonjs-proxy +1 -1
  536. package/_vendor/seedrandom/lib/xor128.js_commonjs-module +3 -0
  537. package/_vendor/seedrandom/lib/xor128.js_commonjs-proxy +1 -1
  538. package/_vendor/seedrandom/lib/xor4096.js_commonjs-module +3 -0
  539. package/_vendor/seedrandom/lib/xor4096.js_commonjs-proxy +1 -1
  540. package/_vendor/seedrandom/lib/xorshift7.js_commonjs-module +3 -0
  541. package/_vendor/seedrandom/lib/xorshift7.js_commonjs-proxy +1 -1
  542. package/_vendor/seedrandom/lib/xorwow.js_commonjs-module +3 -0
  543. package/_vendor/seedrandom/lib/xorwow.js_commonjs-proxy +1 -1
  544. package/_vendor/seedrandom/seedrandom.js_commonjs-module +3 -0
  545. package/_vendor/seedrandom/seedrandom.js_commonjs-proxy +1 -1
  546. package/_vendor/webworker-promise/lib/register.js_commonjs-module +3 -0
  547. package/_vendor/webworker-promise/lib/tiny-emitter.js_commonjs-proxy +1 -1
  548. package/_vendor/webworker-promise/src/tiny-emitter.js_commonjs-proxy +1 -0
  549. package/_vendor/xmlbuilder2/lib/xmlbuilder2.min.js_commonjs-module +3 -0
  550. package/_virtual/commonjsHelpers.js +3 -4
  551. package/_virtual/{polyfill-node_buffer.js → polyfill-node.buffer.js} +1 -1
  552. package/_virtual/{polyfill-node_global.js → polyfill-node.global.js} +0 -0
  553. package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +1 -1
  554. package/_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +1 -1
  555. package/macros.js +4 -5
  556. package/package.json +54 -55
  557. package/vendor/base64-js/index.js +1 -87
  558. package/vendor/blueimp-md5/js/md5.js +6 -3
  559. package/vendor/d3-array/src/ascending.js +1 -1
  560. package/vendor/d3-array/src/bisect.js +2 -1
  561. package/vendor/d3-array/src/bisector.js +21 -23
  562. package/vendor/d3-array/src/mode.js +1 -0
  563. package/vendor/d3-scale/src/continuous.js +2 -2
  564. package/vendor/d3-time/src/ticks.js +1 -0
  565. package/vendor/define-properties/index.js +2 -1
  566. package/vendor/globalthis/implementation.browser.js +4 -9
  567. package/vendor/globalthis/index.js +13 -6
  568. package/vendor/globalthis/polyfill.js +6 -3
  569. package/vendor/globalthis/shim.js +12 -9
  570. package/vendor/jszip/dist/jszip.min.js +11 -0
  571. package/vendor/object-keys/index.js +2 -2
  572. package/vendor/pako/dist/pako.esm.mjs +397 -388
  573. package/vendor/seedrandom/index.js +28 -21
  574. package/vendor/seedrandom/lib/alea.js +4 -5
  575. package/vendor/seedrandom/lib/tychei.js +4 -5
  576. package/vendor/seedrandom/lib/xor128.js +4 -5
  577. package/vendor/seedrandom/lib/xor4096.js +4 -5
  578. package/vendor/seedrandom/lib/xorshift7.js +4 -5
  579. package/vendor/seedrandom/lib/xorwow.js +4 -5
  580. package/vendor/seedrandom/seedrandom.js +4 -5
  581. package/vendor/webworker-promise/lib/register.js +14 -8
  582. package/vendor/webworker-promise/src/index.js +110 -0
  583. package/vendor/webworker-promise/src/tiny-emitter.js +51 -0
  584. package/vendor/xmlbuilder2/lib/xmlbuilder2.min.js +6 -7
  585. package/vtk.js +2 -3
  586. package/_vendor/base64-js/index.js_commonjs-proxy +0 -1
  587. package/_vendor/buffer/index.js_commonjs-proxy +0 -1
  588. package/_vendor/ieee754/index.js_commonjs-proxy +0 -1
  589. package/_vendor/immediate/lib/browser.js_commonjs-proxy +0 -1
  590. package/_vendor/inherits/inherits_browser.js_commonjs-proxy +0 -1
  591. package/_vendor/jszip/lib/base64.js_commonjs-proxy +0 -1
  592. package/_vendor/jszip/lib/compressedObject.js_commonjs-proxy +0 -1
  593. package/_vendor/jszip/lib/compressions.js_commonjs-proxy +0 -1
  594. package/_vendor/jszip/lib/crc32.js_commonjs-proxy +0 -1
  595. package/_vendor/jszip/lib/defaults.js_commonjs-proxy +0 -1
  596. package/_vendor/jszip/lib/external.js_commonjs-proxy +0 -1
  597. package/_vendor/jszip/lib/flate.js_commonjs-proxy +0 -1
  598. package/_vendor/jszip/lib/generate/ZipFileWorker.js_commonjs-proxy +0 -1
  599. package/_vendor/jszip/lib/generate/index.js_commonjs-proxy +0 -1
  600. package/_vendor/jszip/lib/load.js_commonjs-proxy +0 -1
  601. package/_vendor/jszip/lib/nodejs/NodejsStreamInputAdapter.js_commonjs-proxy +0 -1
  602. package/_vendor/jszip/lib/nodejs/NodejsStreamOutputAdapter.js_commonjs-proxy +0 -1
  603. package/_vendor/jszip/lib/nodejsUtils.js_commonjs-proxy +0 -1
  604. package/_vendor/jszip/lib/object.js_commonjs-proxy +0 -1
  605. package/_vendor/jszip/lib/readable-stream-browser.js_commonjs-proxy +0 -1
  606. package/_vendor/jszip/lib/reader/ArrayReader.js_commonjs-proxy +0 -1
  607. package/_vendor/jszip/lib/reader/DataReader.js_commonjs-proxy +0 -1
  608. package/_vendor/jszip/lib/reader/NodeBufferReader.js_commonjs-proxy +0 -1
  609. package/_vendor/jszip/lib/reader/StringReader.js_commonjs-proxy +0 -1
  610. package/_vendor/jszip/lib/reader/Uint8ArrayReader.js_commonjs-proxy +0 -1
  611. package/_vendor/jszip/lib/reader/readerFor.js_commonjs-proxy +0 -1
  612. package/_vendor/jszip/lib/signature.js_commonjs-proxy +0 -1
  613. package/_vendor/jszip/lib/stream/ConvertWorker.js_commonjs-proxy +0 -1
  614. package/_vendor/jszip/lib/stream/Crc32Probe.js_commonjs-proxy +0 -1
  615. package/_vendor/jszip/lib/stream/DataLengthProbe.js_commonjs-proxy +0 -1
  616. package/_vendor/jszip/lib/stream/DataWorker.js_commonjs-proxy +0 -1
  617. package/_vendor/jszip/lib/stream/GenericWorker.js_commonjs-proxy +0 -1
  618. package/_vendor/jszip/lib/stream/StreamHelper.js_commonjs-proxy +0 -1
  619. package/_vendor/jszip/lib/support.js_commonjs-proxy +0 -1
  620. package/_vendor/jszip/lib/utf8.js_commonjs-proxy +0 -1
  621. package/_vendor/jszip/lib/utils.js_commonjs-proxy +0 -1
  622. package/_vendor/jszip/lib/zipEntries.js_commonjs-proxy +0 -1
  623. package/_vendor/jszip/lib/zipEntry.js_commonjs-proxy +0 -1
  624. package/_vendor/jszip/lib/zipObject.js_commonjs-proxy +0 -1
  625. package/_vendor/jszip/node_modules/pako/index.js_commonjs-proxy +0 -1
  626. package/_vendor/jszip/node_modules/pako/lib/deflate.js_commonjs-proxy +0 -1
  627. package/_vendor/jszip/node_modules/pako/lib/inflate.js_commonjs-proxy +0 -1
  628. package/_vendor/jszip/node_modules/pako/lib/utils/common.js_commonjs-proxy +0 -1
  629. package/_vendor/jszip/node_modules/pako/lib/utils/strings.js_commonjs-proxy +0 -1
  630. package/_vendor/jszip/node_modules/pako/lib/zlib/adler32.js_commonjs-proxy +0 -1
  631. package/_vendor/jszip/node_modules/pako/lib/zlib/constants.js_commonjs-proxy +0 -1
  632. package/_vendor/jszip/node_modules/pako/lib/zlib/crc32.js_commonjs-proxy +0 -1
  633. package/_vendor/jszip/node_modules/pako/lib/zlib/deflate.js_commonjs-proxy +0 -1
  634. package/_vendor/jszip/node_modules/pako/lib/zlib/gzheader.js_commonjs-proxy +0 -1
  635. package/_vendor/jszip/node_modules/pako/lib/zlib/inffast.js_commonjs-proxy +0 -1
  636. package/_vendor/jszip/node_modules/pako/lib/zlib/inflate.js_commonjs-proxy +0 -1
  637. package/_vendor/jszip/node_modules/pako/lib/zlib/inftrees.js_commonjs-proxy +0 -1
  638. package/_vendor/jszip/node_modules/pako/lib/zlib/messages.js_commonjs-proxy +0 -1
  639. package/_vendor/jszip/node_modules/pako/lib/zlib/trees.js_commonjs-proxy +0 -1
  640. package/_vendor/jszip/node_modules/pako/lib/zlib/zstream.js_commonjs-proxy +0 -1
  641. package/_vendor/lie/lib/browser.js_commonjs-proxy +0 -1
  642. package/_vendor/safe-buffer/index.js_commonjs-proxy +0 -1
  643. package/_vendor/set-immediate-shim/index.js_commonjs-proxy +0 -1
  644. package/_vendor/util/support/isBufferBrowser.js_commonjs-proxy +0 -1
  645. package/_virtual/_polyfill-node_stream.js_commonjs-proxy.js +0 -6
  646. package/_virtual/polyfill-node__buffer_list.js +0 -59
  647. package/_virtual/polyfill-node__stream_duplex.js +0 -44
  648. package/_virtual/polyfill-node__stream_passthrough.js +0 -15
  649. package/_virtual/polyfill-node__stream_readable.js +0 -896
  650. package/_virtual/polyfill-node__stream_transform.js +0 -132
  651. package/_virtual/polyfill-node__stream_writable.js +0 -480
  652. package/_virtual/polyfill-node_process.js +0 -225
  653. package/_virtual/polyfill-node_stream.js +0 -120
  654. package/vendor/buffer/index.js +0 -2112
  655. package/vendor/events/events.js +0 -457
  656. package/vendor/ieee754/index.js +0 -92
  657. package/vendor/immediate/lib/browser.js +0 -72
  658. package/vendor/inherits/inherits_browser.js +0 -29
  659. package/vendor/jszip/lib/base64.js +0 -113
  660. package/vendor/jszip/lib/compressedObject.js +0 -74
  661. package/vendor/jszip/lib/compressions.js +0 -20
  662. package/vendor/jszip/lib/crc32.js +0 -77
  663. package/vendor/jszip/lib/defaults.js +0 -25
  664. package/vendor/jszip/lib/external.js +0 -22
  665. package/vendor/jszip/lib/flate.js +0 -96
  666. package/vendor/jszip/lib/generate/ZipFileWorker.js +0 -540
  667. package/vendor/jszip/lib/generate/index.js +0 -61
  668. package/vendor/jszip/lib/index.js +0 -58
  669. package/vendor/jszip/lib/load.js +0 -82
  670. package/vendor/jszip/lib/nodejs/NodejsStreamInputAdapter.js +0 -74
  671. package/vendor/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +0 -45
  672. package/vendor/jszip/lib/nodejsUtils.js +0 -59
  673. package/vendor/jszip/lib/object.js +0 -389
  674. package/vendor/jszip/lib/readable-stream-browser.js +0 -14
  675. package/vendor/jszip/lib/reader/ArrayReader.js +0 -58
  676. package/vendor/jszip/lib/reader/DataReader.js +0 -117
  677. package/vendor/jszip/lib/reader/NodeBufferReader.js +0 -20
  678. package/vendor/jszip/lib/reader/StringReader.js +0 -39
  679. package/vendor/jszip/lib/reader/Uint8ArrayReader.js +0 -23
  680. package/vendor/jszip/lib/reader/readerFor.js +0 -28
  681. package/vendor/jszip/lib/signature.js +0 -17
  682. package/vendor/jszip/lib/stream/ConvertWorker.js +0 -26
  683. package/vendor/jszip/lib/stream/Crc32Probe.js +0 -24
  684. package/vendor/jszip/lib/stream/DataLengthProbe.js +0 -28
  685. package/vendor/jszip/lib/stream/DataWorker.js +0 -116
  686. package/vendor/jszip/lib/stream/GenericWorker.js +0 -263
  687. package/vendor/jszip/lib/stream/StreamHelper.js +0 -214
  688. package/vendor/jszip/lib/support.js +0 -45
  689. package/vendor/jszip/lib/utf8.js +0 -284
  690. package/vendor/jszip/lib/utils.js +0 -486
  691. package/vendor/jszip/lib/zipEntries.js +0 -257
  692. package/vendor/jszip/lib/zipEntry.js +0 -293
  693. package/vendor/jszip/lib/zipObject.js +0 -133
  694. package/vendor/jszip/node_modules/pako/index.js +0 -18
  695. package/vendor/jszip/node_modules/pako/lib/deflate.js +0 -406
  696. package/vendor/jszip/node_modules/pako/lib/inflate.js +0 -429
  697. package/vendor/jszip/node_modules/pako/lib/utils/common.js +0 -110
  698. package/vendor/jszip/node_modules/pako/lib/utils/strings.js +0 -192
  699. package/vendor/jszip/node_modules/pako/lib/zlib/adler32.js +0 -51
  700. package/vendor/jszip/node_modules/pako/lib/zlib/constants.js +0 -68
  701. package/vendor/jszip/node_modules/pako/lib/zlib/crc32.js +0 -59
  702. package/vendor/jszip/node_modules/pako/lib/zlib/deflate.js +0 -1892
  703. package/vendor/jszip/node_modules/pako/lib/zlib/gzheader.js +0 -58
  704. package/vendor/jszip/node_modules/pako/lib/zlib/inffast.js +0 -345
  705. package/vendor/jszip/node_modules/pako/lib/zlib/inflate.js +0 -1572
  706. package/vendor/jszip/node_modules/pako/lib/zlib/inftrees.js +0 -345
  707. package/vendor/jszip/node_modules/pako/lib/zlib/messages.js +0 -32
  708. package/vendor/jszip/node_modules/pako/lib/zlib/trees.js +0 -1232
  709. package/vendor/jszip/node_modules/pako/lib/zlib/zstream.js +0 -47
  710. package/vendor/lie/lib/browser.js +0 -274
  711. package/vendor/process/browser.js +0 -190
  712. package/vendor/safe-buffer/index.js +0 -69
  713. package/vendor/set-immediate-shim/index.js +0 -8
  714. package/vendor/string_decoder/lib/string_decoder.js +0 -276
  715. package/vendor/util/support/isBufferBrowser.js +0 -8
  716. package/vendor/util/util.js +0 -706
  717. package/vendor/webworker-promise/lib/index.js +0 -172
@@ -1,1572 +0,0 @@
1
- import { c as common } from '../utils/common.js';
2
- import { a as adler32_1 } from './adler32.js';
3
- import { c as crc32_1 } from './crc32.js';
4
- import { i as inffast } from './inffast.js';
5
- import { i as inftrees } from './inftrees.js';
6
-
7
- // (C) 1995-2013 Jean-loup Gailly and Mark Adler
8
- // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
9
- //
10
- // This software is provided 'as-is', without any express or implied
11
- // warranty. In no event will the authors be held liable for any damages
12
- // arising from the use of this software.
13
- //
14
- // Permission is granted to anyone to use this software for any purpose,
15
- // including commercial applications, and to alter it and redistribute it
16
- // freely, subject to the following restrictions:
17
- //
18
- // 1. The origin of this software must not be misrepresented; you must not
19
- // claim that you wrote the original software. If you use this software
20
- // in a product, an acknowledgment in the product documentation would be
21
- // appreciated but is not required.
22
- // 2. Altered source versions must be plainly marked as such, and must not be
23
- // misrepresented as being the original software.
24
- // 3. This notice may not be removed or altered from any source distribution.
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
- var CODES = 0;
33
- var LENS = 1;
34
- var DISTS = 2;
35
-
36
- /* Public constants ==========================================================*/
37
- /* ===========================================================================*/
38
-
39
-
40
- /* Allowed flush values; see deflate() and inflate() below for details */
41
- //var Z_NO_FLUSH = 0;
42
- //var Z_PARTIAL_FLUSH = 1;
43
- //var Z_SYNC_FLUSH = 2;
44
- //var Z_FULL_FLUSH = 3;
45
- var Z_FINISH = 4;
46
- var Z_BLOCK = 5;
47
- var Z_TREES = 6;
48
-
49
-
50
- /* Return codes for the compression/decompression functions. Negative values
51
- * are errors, positive values are used for special but normal events.
52
- */
53
- var Z_OK = 0;
54
- var Z_STREAM_END = 1;
55
- var Z_NEED_DICT = 2;
56
- //var Z_ERRNO = -1;
57
- var Z_STREAM_ERROR = -2;
58
- var Z_DATA_ERROR = -3;
59
- var Z_MEM_ERROR = -4;
60
- var Z_BUF_ERROR = -5;
61
- //var Z_VERSION_ERROR = -6;
62
-
63
- /* The deflate compression method */
64
- var Z_DEFLATED = 8;
65
-
66
-
67
- /* STATES ====================================================================*/
68
- /* ===========================================================================*/
69
-
70
-
71
- var HEAD = 1; /* i: waiting for magic header */
72
- var FLAGS = 2; /* i: waiting for method and flags (gzip) */
73
- var TIME = 3; /* i: waiting for modification time (gzip) */
74
- var OS = 4; /* i: waiting for extra flags and operating system (gzip) */
75
- var EXLEN = 5; /* i: waiting for extra length (gzip) */
76
- var EXTRA = 6; /* i: waiting for extra bytes (gzip) */
77
- var NAME = 7; /* i: waiting for end of file name (gzip) */
78
- var COMMENT = 8; /* i: waiting for end of comment (gzip) */
79
- var HCRC = 9; /* i: waiting for header crc (gzip) */
80
- var DICTID = 10; /* i: waiting for dictionary check value */
81
- var DICT = 11; /* waiting for inflateSetDictionary() call */
82
- var TYPE = 12; /* i: waiting for type bits, including last-flag bit */
83
- var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */
84
- var STORED = 14; /* i: waiting for stored size (length and complement) */
85
- var COPY_ = 15; /* i/o: same as COPY below, but only first time in */
86
- var COPY = 16; /* i/o: waiting for input or output to copy stored block */
87
- var TABLE = 17; /* i: waiting for dynamic block table lengths */
88
- var LENLENS = 18; /* i: waiting for code length code lengths */
89
- var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */
90
- var LEN_ = 20; /* i: same as LEN below, but only first time in */
91
- var LEN = 21; /* i: waiting for length/lit/eob code */
92
- var LENEXT = 22; /* i: waiting for length extra bits */
93
- var DIST = 23; /* i: waiting for distance code */
94
- var DISTEXT = 24; /* i: waiting for distance extra bits */
95
- var MATCH = 25; /* o: waiting for output space to copy string */
96
- var LIT = 26; /* o: waiting for output space to write literal */
97
- var CHECK = 27; /* i: waiting for 32-bit check value */
98
- var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */
99
- var DONE = 29; /* finished check, done -- remain here until reset */
100
- var BAD = 30; /* got a data error -- remain here until reset */
101
- var MEM = 31; /* got an inflate() memory error -- remain here until reset */
102
- var SYNC = 32; /* looking for synchronization bytes to restart inflate() */
103
-
104
- /* ===========================================================================*/
105
-
106
-
107
-
108
- var ENOUGH_LENS = 852;
109
- var ENOUGH_DISTS = 592;
110
- //var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
111
-
112
- var MAX_WBITS = 15;
113
- /* 32K LZ77 window */
114
- var DEF_WBITS = MAX_WBITS;
115
-
116
-
117
- function zswap32(q) {
118
- return (((q >>> 24) & 0xff) +
119
- ((q >>> 8) & 0xff00) +
120
- ((q & 0xff00) << 8) +
121
- ((q & 0xff) << 24));
122
- }
123
-
124
-
125
- function InflateState() {
126
- this.mode = 0; /* current inflate mode */
127
- this.last = false; /* true if processing last block */
128
- this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */
129
- this.havedict = false; /* true if dictionary provided */
130
- this.flags = 0; /* gzip header method and flags (0 if zlib) */
131
- this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */
132
- this.check = 0; /* protected copy of check value */
133
- this.total = 0; /* protected copy of output count */
134
- // TODO: may be {}
135
- this.head = null; /* where to save gzip header information */
136
-
137
- /* sliding window */
138
- this.wbits = 0; /* log base 2 of requested window size */
139
- this.wsize = 0; /* window size or zero if not using window */
140
- this.whave = 0; /* valid bytes in the window */
141
- this.wnext = 0; /* window write index */
142
- this.window = null; /* allocated sliding window, if needed */
143
-
144
- /* bit accumulator */
145
- this.hold = 0; /* input bit accumulator */
146
- this.bits = 0; /* number of bits in "in" */
147
-
148
- /* for string and stored block copying */
149
- this.length = 0; /* literal or length of data to copy */
150
- this.offset = 0; /* distance back to copy string from */
151
-
152
- /* for table and code decoding */
153
- this.extra = 0; /* extra bits needed */
154
-
155
- /* fixed and dynamic code tables */
156
- this.lencode = null; /* starting table for length/literal codes */
157
- this.distcode = null; /* starting table for distance codes */
158
- this.lenbits = 0; /* index bits for lencode */
159
- this.distbits = 0; /* index bits for distcode */
160
-
161
- /* dynamic table building */
162
- this.ncode = 0; /* number of code length code lengths */
163
- this.nlen = 0; /* number of length code lengths */
164
- this.ndist = 0; /* number of distance code lengths */
165
- this.have = 0; /* number of code lengths in lens[] */
166
- this.next = null; /* next available space in codes[] */
167
-
168
- this.lens = new common.Buf16(320); /* temporary storage for code lengths */
169
- this.work = new common.Buf16(288); /* work area for code table building */
170
-
171
- /*
172
- because we don't have pointers in js, we use lencode and distcode directly
173
- as buffers so we don't need codes
174
- */
175
- //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */
176
- this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */
177
- this.distdyn = null; /* dynamic table for distance codes (JS specific) */
178
- this.sane = 0; /* if false, allow invalid distance too far */
179
- this.back = 0; /* bits back of last unprocessed length/lit */
180
- this.was = 0; /* initial length of match */
181
- }
182
-
183
- function inflateResetKeep(strm) {
184
- var state;
185
-
186
- if (!strm || !strm.state) { return Z_STREAM_ERROR; }
187
- state = strm.state;
188
- strm.total_in = strm.total_out = state.total = 0;
189
- strm.msg = ''; /*Z_NULL*/
190
- if (state.wrap) { /* to support ill-conceived Java test suite */
191
- strm.adler = state.wrap & 1;
192
- }
193
- state.mode = HEAD;
194
- state.last = 0;
195
- state.havedict = 0;
196
- state.dmax = 32768;
197
- state.head = null/*Z_NULL*/;
198
- state.hold = 0;
199
- state.bits = 0;
200
- //state.lencode = state.distcode = state.next = state.codes;
201
- state.lencode = state.lendyn = new common.Buf32(ENOUGH_LENS);
202
- state.distcode = state.distdyn = new common.Buf32(ENOUGH_DISTS);
203
-
204
- state.sane = 1;
205
- state.back = -1;
206
- //Tracev((stderr, "inflate: reset\n"));
207
- return Z_OK;
208
- }
209
-
210
- function inflateReset(strm) {
211
- var state;
212
-
213
- if (!strm || !strm.state) { return Z_STREAM_ERROR; }
214
- state = strm.state;
215
- state.wsize = 0;
216
- state.whave = 0;
217
- state.wnext = 0;
218
- return inflateResetKeep(strm);
219
-
220
- }
221
-
222
- function inflateReset2(strm, windowBits) {
223
- var wrap;
224
- var state;
225
-
226
- /* get the state */
227
- if (!strm || !strm.state) { return Z_STREAM_ERROR; }
228
- state = strm.state;
229
-
230
- /* extract wrap request from windowBits parameter */
231
- if (windowBits < 0) {
232
- wrap = 0;
233
- windowBits = -windowBits;
234
- }
235
- else {
236
- wrap = (windowBits >> 4) + 1;
237
- if (windowBits < 48) {
238
- windowBits &= 15;
239
- }
240
- }
241
-
242
- /* set number of window bits, free window if different */
243
- if (windowBits && (windowBits < 8 || windowBits > 15)) {
244
- return Z_STREAM_ERROR;
245
- }
246
- if (state.window !== null && state.wbits !== windowBits) {
247
- state.window = null;
248
- }
249
-
250
- /* update state and reset the rest of it */
251
- state.wrap = wrap;
252
- state.wbits = windowBits;
253
- return inflateReset(strm);
254
- }
255
-
256
- function inflateInit2(strm, windowBits) {
257
- var ret;
258
- var state;
259
-
260
- if (!strm) { return Z_STREAM_ERROR; }
261
- //strm.msg = Z_NULL; /* in case we return an error */
262
-
263
- state = new InflateState();
264
-
265
- //if (state === Z_NULL) return Z_MEM_ERROR;
266
- //Tracev((stderr, "inflate: allocated\n"));
267
- strm.state = state;
268
- state.window = null/*Z_NULL*/;
269
- ret = inflateReset2(strm, windowBits);
270
- if (ret !== Z_OK) {
271
- strm.state = null/*Z_NULL*/;
272
- }
273
- return ret;
274
- }
275
-
276
- function inflateInit(strm) {
277
- return inflateInit2(strm, DEF_WBITS);
278
- }
279
-
280
-
281
- /*
282
- Return state with length and distance decoding tables and index sizes set to
283
- fixed code decoding. Normally this returns fixed tables from inffixed.h.
284
- If BUILDFIXED is defined, then instead this routine builds the tables the
285
- first time it's called, and returns those tables the first time and
286
- thereafter. This reduces the size of the code by about 2K bytes, in
287
- exchange for a little execution time. However, BUILDFIXED should not be
288
- used for threaded applications, since the rewriting of the tables and virgin
289
- may not be thread-safe.
290
- */
291
- var virgin = true;
292
-
293
- var lenfix, distfix; // We have no pointers in JS, so keep tables separate
294
-
295
- function fixedtables(state) {
296
- /* build fixed huffman tables if first call (may not be thread safe) */
297
- if (virgin) {
298
- var sym;
299
-
300
- lenfix = new common.Buf32(512);
301
- distfix = new common.Buf32(32);
302
-
303
- /* literal/length table */
304
- sym = 0;
305
- while (sym < 144) { state.lens[sym++] = 8; }
306
- while (sym < 256) { state.lens[sym++] = 9; }
307
- while (sym < 280) { state.lens[sym++] = 7; }
308
- while (sym < 288) { state.lens[sym++] = 8; }
309
-
310
- inftrees(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });
311
-
312
- /* distance table */
313
- sym = 0;
314
- while (sym < 32) { state.lens[sym++] = 5; }
315
-
316
- inftrees(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });
317
-
318
- /* do this just once */
319
- virgin = false;
320
- }
321
-
322
- state.lencode = lenfix;
323
- state.lenbits = 9;
324
- state.distcode = distfix;
325
- state.distbits = 5;
326
- }
327
-
328
-
329
- /*
330
- Update the window with the last wsize (normally 32K) bytes written before
331
- returning. If window does not exist yet, create it. This is only called
332
- when a window is already in use, or when output has been written during this
333
- inflate call, but the end of the deflate stream has not been reached yet.
334
- It is also called to create a window for dictionary data when a dictionary
335
- is loaded.
336
-
337
- Providing output buffers larger than 32K to inflate() should provide a speed
338
- advantage, since only the last 32K of output is copied to the sliding window
339
- upon return from inflate(), and since all distances after the first 32K of
340
- output will fall in the output data, making match copies simpler and faster.
341
- The advantage may be dependent on the size of the processor's data caches.
342
- */
343
- function updatewindow(strm, src, end, copy) {
344
- var dist;
345
- var state = strm.state;
346
-
347
- /* if it hasn't been done already, allocate space for the window */
348
- if (state.window === null) {
349
- state.wsize = 1 << state.wbits;
350
- state.wnext = 0;
351
- state.whave = 0;
352
-
353
- state.window = new common.Buf8(state.wsize);
354
- }
355
-
356
- /* copy state->wsize or less output bytes into the circular window */
357
- if (copy >= state.wsize) {
358
- common.arraySet(state.window, src, end - state.wsize, state.wsize, 0);
359
- state.wnext = 0;
360
- state.whave = state.wsize;
361
- }
362
- else {
363
- dist = state.wsize - state.wnext;
364
- if (dist > copy) {
365
- dist = copy;
366
- }
367
- //zmemcpy(state->window + state->wnext, end - copy, dist);
368
- common.arraySet(state.window, src, end - copy, dist, state.wnext);
369
- copy -= dist;
370
- if (copy) {
371
- //zmemcpy(state->window, end - copy, copy);
372
- common.arraySet(state.window, src, end - copy, copy, 0);
373
- state.wnext = copy;
374
- state.whave = state.wsize;
375
- }
376
- else {
377
- state.wnext += dist;
378
- if (state.wnext === state.wsize) { state.wnext = 0; }
379
- if (state.whave < state.wsize) { state.whave += dist; }
380
- }
381
- }
382
- return 0;
383
- }
384
-
385
- function inflate(strm, flush) {
386
- var state;
387
- var input, output; // input/output buffers
388
- var next; /* next input INDEX */
389
- var put; /* next output INDEX */
390
- var have, left; /* available input and output */
391
- var hold; /* bit buffer */
392
- var bits; /* bits in bit buffer */
393
- var _in, _out; /* save starting available input and output */
394
- var copy; /* number of stored or match bytes to copy */
395
- var from; /* where to copy match bytes from */
396
- var from_source;
397
- var here = 0; /* current decoding table entry */
398
- var here_bits, here_op, here_val; // paked "here" denormalized (JS specific)
399
- //var last; /* parent table entry */
400
- var last_bits, last_op, last_val; // paked "last" denormalized (JS specific)
401
- var len; /* length to copy for repeats, bits to drop */
402
- var ret; /* return code */
403
- var hbuf = new common.Buf8(4); /* buffer for gzip header crc calculation */
404
- var opts;
405
-
406
- var n; // temporary var for NEED_BITS
407
-
408
- var order = /* permutation of code lengths */
409
- [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];
410
-
411
-
412
- if (!strm || !strm.state || !strm.output ||
413
- (!strm.input && strm.avail_in !== 0)) {
414
- return Z_STREAM_ERROR;
415
- }
416
-
417
- state = strm.state;
418
- if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */
419
-
420
-
421
- //--- LOAD() ---
422
- put = strm.next_out;
423
- output = strm.output;
424
- left = strm.avail_out;
425
- next = strm.next_in;
426
- input = strm.input;
427
- have = strm.avail_in;
428
- hold = state.hold;
429
- bits = state.bits;
430
- //---
431
-
432
- _in = have;
433
- _out = left;
434
- ret = Z_OK;
435
-
436
- inf_leave: // goto emulation
437
- for (;;) {
438
- switch (state.mode) {
439
- case HEAD:
440
- if (state.wrap === 0) {
441
- state.mode = TYPEDO;
442
- break;
443
- }
444
- //=== NEEDBITS(16);
445
- while (bits < 16) {
446
- if (have === 0) { break inf_leave; }
447
- have--;
448
- hold += input[next++] << bits;
449
- bits += 8;
450
- }
451
- //===//
452
- if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */
453
- state.check = 0/*crc32(0L, Z_NULL, 0)*/;
454
- //=== CRC2(state.check, hold);
455
- hbuf[0] = hold & 0xff;
456
- hbuf[1] = (hold >>> 8) & 0xff;
457
- state.check = crc32_1(state.check, hbuf, 2, 0);
458
- //===//
459
-
460
- //=== INITBITS();
461
- hold = 0;
462
- bits = 0;
463
- //===//
464
- state.mode = FLAGS;
465
- break;
466
- }
467
- state.flags = 0; /* expect zlib header */
468
- if (state.head) {
469
- state.head.done = false;
470
- }
471
- if (!(state.wrap & 1) || /* check if zlib header allowed */
472
- (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {
473
- strm.msg = 'incorrect header check';
474
- state.mode = BAD;
475
- break;
476
- }
477
- if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {
478
- strm.msg = 'unknown compression method';
479
- state.mode = BAD;
480
- break;
481
- }
482
- //--- DROPBITS(4) ---//
483
- hold >>>= 4;
484
- bits -= 4;
485
- //---//
486
- len = (hold & 0x0f)/*BITS(4)*/ + 8;
487
- if (state.wbits === 0) {
488
- state.wbits = len;
489
- }
490
- else if (len > state.wbits) {
491
- strm.msg = 'invalid window size';
492
- state.mode = BAD;
493
- break;
494
- }
495
- state.dmax = 1 << len;
496
- //Tracev((stderr, "inflate: zlib header ok\n"));
497
- strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
498
- state.mode = hold & 0x200 ? DICTID : TYPE;
499
- //=== INITBITS();
500
- hold = 0;
501
- bits = 0;
502
- //===//
503
- break;
504
- case FLAGS:
505
- //=== NEEDBITS(16); */
506
- while (bits < 16) {
507
- if (have === 0) { break inf_leave; }
508
- have--;
509
- hold += input[next++] << bits;
510
- bits += 8;
511
- }
512
- //===//
513
- state.flags = hold;
514
- if ((state.flags & 0xff) !== Z_DEFLATED) {
515
- strm.msg = 'unknown compression method';
516
- state.mode = BAD;
517
- break;
518
- }
519
- if (state.flags & 0xe000) {
520
- strm.msg = 'unknown header flags set';
521
- state.mode = BAD;
522
- break;
523
- }
524
- if (state.head) {
525
- state.head.text = ((hold >> 8) & 1);
526
- }
527
- if (state.flags & 0x0200) {
528
- //=== CRC2(state.check, hold);
529
- hbuf[0] = hold & 0xff;
530
- hbuf[1] = (hold >>> 8) & 0xff;
531
- state.check = crc32_1(state.check, hbuf, 2, 0);
532
- //===//
533
- }
534
- //=== INITBITS();
535
- hold = 0;
536
- bits = 0;
537
- //===//
538
- state.mode = TIME;
539
- /* falls through */
540
- case TIME:
541
- //=== NEEDBITS(32); */
542
- while (bits < 32) {
543
- if (have === 0) { break inf_leave; }
544
- have--;
545
- hold += input[next++] << bits;
546
- bits += 8;
547
- }
548
- //===//
549
- if (state.head) {
550
- state.head.time = hold;
551
- }
552
- if (state.flags & 0x0200) {
553
- //=== CRC4(state.check, hold)
554
- hbuf[0] = hold & 0xff;
555
- hbuf[1] = (hold >>> 8) & 0xff;
556
- hbuf[2] = (hold >>> 16) & 0xff;
557
- hbuf[3] = (hold >>> 24) & 0xff;
558
- state.check = crc32_1(state.check, hbuf, 4, 0);
559
- //===
560
- }
561
- //=== INITBITS();
562
- hold = 0;
563
- bits = 0;
564
- //===//
565
- state.mode = OS;
566
- /* falls through */
567
- case OS:
568
- //=== NEEDBITS(16); */
569
- while (bits < 16) {
570
- if (have === 0) { break inf_leave; }
571
- have--;
572
- hold += input[next++] << bits;
573
- bits += 8;
574
- }
575
- //===//
576
- if (state.head) {
577
- state.head.xflags = (hold & 0xff);
578
- state.head.os = (hold >> 8);
579
- }
580
- if (state.flags & 0x0200) {
581
- //=== CRC2(state.check, hold);
582
- hbuf[0] = hold & 0xff;
583
- hbuf[1] = (hold >>> 8) & 0xff;
584
- state.check = crc32_1(state.check, hbuf, 2, 0);
585
- //===//
586
- }
587
- //=== INITBITS();
588
- hold = 0;
589
- bits = 0;
590
- //===//
591
- state.mode = EXLEN;
592
- /* falls through */
593
- case EXLEN:
594
- if (state.flags & 0x0400) {
595
- //=== NEEDBITS(16); */
596
- while (bits < 16) {
597
- if (have === 0) { break inf_leave; }
598
- have--;
599
- hold += input[next++] << bits;
600
- bits += 8;
601
- }
602
- //===//
603
- state.length = hold;
604
- if (state.head) {
605
- state.head.extra_len = hold;
606
- }
607
- if (state.flags & 0x0200) {
608
- //=== CRC2(state.check, hold);
609
- hbuf[0] = hold & 0xff;
610
- hbuf[1] = (hold >>> 8) & 0xff;
611
- state.check = crc32_1(state.check, hbuf, 2, 0);
612
- //===//
613
- }
614
- //=== INITBITS();
615
- hold = 0;
616
- bits = 0;
617
- //===//
618
- }
619
- else if (state.head) {
620
- state.head.extra = null/*Z_NULL*/;
621
- }
622
- state.mode = EXTRA;
623
- /* falls through */
624
- case EXTRA:
625
- if (state.flags & 0x0400) {
626
- copy = state.length;
627
- if (copy > have) { copy = have; }
628
- if (copy) {
629
- if (state.head) {
630
- len = state.head.extra_len - state.length;
631
- if (!state.head.extra) {
632
- // Use untyped array for more convenient processing later
633
- state.head.extra = new Array(state.head.extra_len);
634
- }
635
- common.arraySet(
636
- state.head.extra,
637
- input,
638
- next,
639
- // extra field is limited to 65536 bytes
640
- // - no need for additional size check
641
- copy,
642
- /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
643
- len
644
- );
645
- //zmemcpy(state.head.extra + len, next,
646
- // len + copy > state.head.extra_max ?
647
- // state.head.extra_max - len : copy);
648
- }
649
- if (state.flags & 0x0200) {
650
- state.check = crc32_1(state.check, input, copy, next);
651
- }
652
- have -= copy;
653
- next += copy;
654
- state.length -= copy;
655
- }
656
- if (state.length) { break inf_leave; }
657
- }
658
- state.length = 0;
659
- state.mode = NAME;
660
- /* falls through */
661
- case NAME:
662
- if (state.flags & 0x0800) {
663
- if (have === 0) { break inf_leave; }
664
- copy = 0;
665
- do {
666
- // TODO: 2 or 1 bytes?
667
- len = input[next + copy++];
668
- /* use constant limit because in js we should not preallocate memory */
669
- if (state.head && len &&
670
- (state.length < 65536 /*state.head.name_max*/)) {
671
- state.head.name += String.fromCharCode(len);
672
- }
673
- } while (len && copy < have);
674
-
675
- if (state.flags & 0x0200) {
676
- state.check = crc32_1(state.check, input, copy, next);
677
- }
678
- have -= copy;
679
- next += copy;
680
- if (len) { break inf_leave; }
681
- }
682
- else if (state.head) {
683
- state.head.name = null;
684
- }
685
- state.length = 0;
686
- state.mode = COMMENT;
687
- /* falls through */
688
- case COMMENT:
689
- if (state.flags & 0x1000) {
690
- if (have === 0) { break inf_leave; }
691
- copy = 0;
692
- do {
693
- len = input[next + copy++];
694
- /* use constant limit because in js we should not preallocate memory */
695
- if (state.head && len &&
696
- (state.length < 65536 /*state.head.comm_max*/)) {
697
- state.head.comment += String.fromCharCode(len);
698
- }
699
- } while (len && copy < have);
700
- if (state.flags & 0x0200) {
701
- state.check = crc32_1(state.check, input, copy, next);
702
- }
703
- have -= copy;
704
- next += copy;
705
- if (len) { break inf_leave; }
706
- }
707
- else if (state.head) {
708
- state.head.comment = null;
709
- }
710
- state.mode = HCRC;
711
- /* falls through */
712
- case HCRC:
713
- if (state.flags & 0x0200) {
714
- //=== NEEDBITS(16); */
715
- while (bits < 16) {
716
- if (have === 0) { break inf_leave; }
717
- have--;
718
- hold += input[next++] << bits;
719
- bits += 8;
720
- }
721
- //===//
722
- if (hold !== (state.check & 0xffff)) {
723
- strm.msg = 'header crc mismatch';
724
- state.mode = BAD;
725
- break;
726
- }
727
- //=== INITBITS();
728
- hold = 0;
729
- bits = 0;
730
- //===//
731
- }
732
- if (state.head) {
733
- state.head.hcrc = ((state.flags >> 9) & 1);
734
- state.head.done = true;
735
- }
736
- strm.adler = state.check = 0;
737
- state.mode = TYPE;
738
- break;
739
- case DICTID:
740
- //=== NEEDBITS(32); */
741
- while (bits < 32) {
742
- if (have === 0) { break inf_leave; }
743
- have--;
744
- hold += input[next++] << bits;
745
- bits += 8;
746
- }
747
- //===//
748
- strm.adler = state.check = zswap32(hold);
749
- //=== INITBITS();
750
- hold = 0;
751
- bits = 0;
752
- //===//
753
- state.mode = DICT;
754
- /* falls through */
755
- case DICT:
756
- if (state.havedict === 0) {
757
- //--- RESTORE() ---
758
- strm.next_out = put;
759
- strm.avail_out = left;
760
- strm.next_in = next;
761
- strm.avail_in = have;
762
- state.hold = hold;
763
- state.bits = bits;
764
- //---
765
- return Z_NEED_DICT;
766
- }
767
- strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
768
- state.mode = TYPE;
769
- /* falls through */
770
- case TYPE:
771
- if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }
772
- /* falls through */
773
- case TYPEDO:
774
- if (state.last) {
775
- //--- BYTEBITS() ---//
776
- hold >>>= bits & 7;
777
- bits -= bits & 7;
778
- //---//
779
- state.mode = CHECK;
780
- break;
781
- }
782
- //=== NEEDBITS(3); */
783
- while (bits < 3) {
784
- if (have === 0) { break inf_leave; }
785
- have--;
786
- hold += input[next++] << bits;
787
- bits += 8;
788
- }
789
- //===//
790
- state.last = (hold & 0x01)/*BITS(1)*/;
791
- //--- DROPBITS(1) ---//
792
- hold >>>= 1;
793
- bits -= 1;
794
- //---//
795
-
796
- switch ((hold & 0x03)/*BITS(2)*/) {
797
- case 0: /* stored block */
798
- //Tracev((stderr, "inflate: stored block%s\n",
799
- // state.last ? " (last)" : ""));
800
- state.mode = STORED;
801
- break;
802
- case 1: /* fixed block */
803
- fixedtables(state);
804
- //Tracev((stderr, "inflate: fixed codes block%s\n",
805
- // state.last ? " (last)" : ""));
806
- state.mode = LEN_; /* decode codes */
807
- if (flush === Z_TREES) {
808
- //--- DROPBITS(2) ---//
809
- hold >>>= 2;
810
- bits -= 2;
811
- //---//
812
- break inf_leave;
813
- }
814
- break;
815
- case 2: /* dynamic block */
816
- //Tracev((stderr, "inflate: dynamic codes block%s\n",
817
- // state.last ? " (last)" : ""));
818
- state.mode = TABLE;
819
- break;
820
- case 3:
821
- strm.msg = 'invalid block type';
822
- state.mode = BAD;
823
- }
824
- //--- DROPBITS(2) ---//
825
- hold >>>= 2;
826
- bits -= 2;
827
- //---//
828
- break;
829
- case STORED:
830
- //--- BYTEBITS() ---// /* go to byte boundary */
831
- hold >>>= bits & 7;
832
- bits -= bits & 7;
833
- //---//
834
- //=== NEEDBITS(32); */
835
- while (bits < 32) {
836
- if (have === 0) { break inf_leave; }
837
- have--;
838
- hold += input[next++] << bits;
839
- bits += 8;
840
- }
841
- //===//
842
- if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {
843
- strm.msg = 'invalid stored block lengths';
844
- state.mode = BAD;
845
- break;
846
- }
847
- state.length = hold & 0xffff;
848
- //Tracev((stderr, "inflate: stored length %u\n",
849
- // state.length));
850
- //=== INITBITS();
851
- hold = 0;
852
- bits = 0;
853
- //===//
854
- state.mode = COPY_;
855
- if (flush === Z_TREES) { break inf_leave; }
856
- /* falls through */
857
- case COPY_:
858
- state.mode = COPY;
859
- /* falls through */
860
- case COPY:
861
- copy = state.length;
862
- if (copy) {
863
- if (copy > have) { copy = have; }
864
- if (copy > left) { copy = left; }
865
- if (copy === 0) { break inf_leave; }
866
- //--- zmemcpy(put, next, copy); ---
867
- common.arraySet(output, input, next, copy, put);
868
- //---//
869
- have -= copy;
870
- next += copy;
871
- left -= copy;
872
- put += copy;
873
- state.length -= copy;
874
- break;
875
- }
876
- //Tracev((stderr, "inflate: stored end\n"));
877
- state.mode = TYPE;
878
- break;
879
- case TABLE:
880
- //=== NEEDBITS(14); */
881
- while (bits < 14) {
882
- if (have === 0) { break inf_leave; }
883
- have--;
884
- hold += input[next++] << bits;
885
- bits += 8;
886
- }
887
- //===//
888
- state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;
889
- //--- DROPBITS(5) ---//
890
- hold >>>= 5;
891
- bits -= 5;
892
- //---//
893
- state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;
894
- //--- DROPBITS(5) ---//
895
- hold >>>= 5;
896
- bits -= 5;
897
- //---//
898
- state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;
899
- //--- DROPBITS(4) ---//
900
- hold >>>= 4;
901
- bits -= 4;
902
- //---//
903
- //#ifndef PKZIP_BUG_WORKAROUND
904
- if (state.nlen > 286 || state.ndist > 30) {
905
- strm.msg = 'too many length or distance symbols';
906
- state.mode = BAD;
907
- break;
908
- }
909
- //#endif
910
- //Tracev((stderr, "inflate: table sizes ok\n"));
911
- state.have = 0;
912
- state.mode = LENLENS;
913
- /* falls through */
914
- case LENLENS:
915
- while (state.have < state.ncode) {
916
- //=== NEEDBITS(3);
917
- while (bits < 3) {
918
- if (have === 0) { break inf_leave; }
919
- have--;
920
- hold += input[next++] << bits;
921
- bits += 8;
922
- }
923
- //===//
924
- state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);
925
- //--- DROPBITS(3) ---//
926
- hold >>>= 3;
927
- bits -= 3;
928
- //---//
929
- }
930
- while (state.have < 19) {
931
- state.lens[order[state.have++]] = 0;
932
- }
933
- // We have separate tables & no pointers. 2 commented lines below not needed.
934
- //state.next = state.codes;
935
- //state.lencode = state.next;
936
- // Switch to use dynamic table
937
- state.lencode = state.lendyn;
938
- state.lenbits = 7;
939
-
940
- opts = { bits: state.lenbits };
941
- ret = inftrees(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);
942
- state.lenbits = opts.bits;
943
-
944
- if (ret) {
945
- strm.msg = 'invalid code lengths set';
946
- state.mode = BAD;
947
- break;
948
- }
949
- //Tracev((stderr, "inflate: code lengths ok\n"));
950
- state.have = 0;
951
- state.mode = CODELENS;
952
- /* falls through */
953
- case CODELENS:
954
- while (state.have < state.nlen + state.ndist) {
955
- for (;;) {
956
- here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/
957
- here_bits = here >>> 24;
958
- here_op = (here >>> 16) & 0xff;
959
- here_val = here & 0xffff;
960
-
961
- if ((here_bits) <= bits) { break; }
962
- //--- PULLBYTE() ---//
963
- if (have === 0) { break inf_leave; }
964
- have--;
965
- hold += input[next++] << bits;
966
- bits += 8;
967
- //---//
968
- }
969
- if (here_val < 16) {
970
- //--- DROPBITS(here.bits) ---//
971
- hold >>>= here_bits;
972
- bits -= here_bits;
973
- //---//
974
- state.lens[state.have++] = here_val;
975
- }
976
- else {
977
- if (here_val === 16) {
978
- //=== NEEDBITS(here.bits + 2);
979
- n = here_bits + 2;
980
- while (bits < n) {
981
- if (have === 0) { break inf_leave; }
982
- have--;
983
- hold += input[next++] << bits;
984
- bits += 8;
985
- }
986
- //===//
987
- //--- DROPBITS(here.bits) ---//
988
- hold >>>= here_bits;
989
- bits -= here_bits;
990
- //---//
991
- if (state.have === 0) {
992
- strm.msg = 'invalid bit length repeat';
993
- state.mode = BAD;
994
- break;
995
- }
996
- len = state.lens[state.have - 1];
997
- copy = 3 + (hold & 0x03);//BITS(2);
998
- //--- DROPBITS(2) ---//
999
- hold >>>= 2;
1000
- bits -= 2;
1001
- //---//
1002
- }
1003
- else if (here_val === 17) {
1004
- //=== NEEDBITS(here.bits + 3);
1005
- n = here_bits + 3;
1006
- while (bits < n) {
1007
- if (have === 0) { break inf_leave; }
1008
- have--;
1009
- hold += input[next++] << bits;
1010
- bits += 8;
1011
- }
1012
- //===//
1013
- //--- DROPBITS(here.bits) ---//
1014
- hold >>>= here_bits;
1015
- bits -= here_bits;
1016
- //---//
1017
- len = 0;
1018
- copy = 3 + (hold & 0x07);//BITS(3);
1019
- //--- DROPBITS(3) ---//
1020
- hold >>>= 3;
1021
- bits -= 3;
1022
- //---//
1023
- }
1024
- else {
1025
- //=== NEEDBITS(here.bits + 7);
1026
- n = here_bits + 7;
1027
- while (bits < n) {
1028
- if (have === 0) { break inf_leave; }
1029
- have--;
1030
- hold += input[next++] << bits;
1031
- bits += 8;
1032
- }
1033
- //===//
1034
- //--- DROPBITS(here.bits) ---//
1035
- hold >>>= here_bits;
1036
- bits -= here_bits;
1037
- //---//
1038
- len = 0;
1039
- copy = 11 + (hold & 0x7f);//BITS(7);
1040
- //--- DROPBITS(7) ---//
1041
- hold >>>= 7;
1042
- bits -= 7;
1043
- //---//
1044
- }
1045
- if (state.have + copy > state.nlen + state.ndist) {
1046
- strm.msg = 'invalid bit length repeat';
1047
- state.mode = BAD;
1048
- break;
1049
- }
1050
- while (copy--) {
1051
- state.lens[state.have++] = len;
1052
- }
1053
- }
1054
- }
1055
-
1056
- /* handle error breaks in while */
1057
- if (state.mode === BAD) { break; }
1058
-
1059
- /* check for end-of-block code (better have one) */
1060
- if (state.lens[256] === 0) {
1061
- strm.msg = 'invalid code -- missing end-of-block';
1062
- state.mode = BAD;
1063
- break;
1064
- }
1065
-
1066
- /* build code tables -- note: do not change the lenbits or distbits
1067
- values here (9 and 6) without reading the comments in inftrees.h
1068
- concerning the ENOUGH constants, which depend on those values */
1069
- state.lenbits = 9;
1070
-
1071
- opts = { bits: state.lenbits };
1072
- ret = inftrees(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);
1073
- // We have separate tables & no pointers. 2 commented lines below not needed.
1074
- // state.next_index = opts.table_index;
1075
- state.lenbits = opts.bits;
1076
- // state.lencode = state.next;
1077
-
1078
- if (ret) {
1079
- strm.msg = 'invalid literal/lengths set';
1080
- state.mode = BAD;
1081
- break;
1082
- }
1083
-
1084
- state.distbits = 6;
1085
- //state.distcode.copy(state.codes);
1086
- // Switch to use dynamic table
1087
- state.distcode = state.distdyn;
1088
- opts = { bits: state.distbits };
1089
- ret = inftrees(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);
1090
- // We have separate tables & no pointers. 2 commented lines below not needed.
1091
- // state.next_index = opts.table_index;
1092
- state.distbits = opts.bits;
1093
- // state.distcode = state.next;
1094
-
1095
- if (ret) {
1096
- strm.msg = 'invalid distances set';
1097
- state.mode = BAD;
1098
- break;
1099
- }
1100
- //Tracev((stderr, 'inflate: codes ok\n'));
1101
- state.mode = LEN_;
1102
- if (flush === Z_TREES) { break inf_leave; }
1103
- /* falls through */
1104
- case LEN_:
1105
- state.mode = LEN;
1106
- /* falls through */
1107
- case LEN:
1108
- if (have >= 6 && left >= 258) {
1109
- //--- RESTORE() ---
1110
- strm.next_out = put;
1111
- strm.avail_out = left;
1112
- strm.next_in = next;
1113
- strm.avail_in = have;
1114
- state.hold = hold;
1115
- state.bits = bits;
1116
- //---
1117
- inffast(strm, _out);
1118
- //--- LOAD() ---
1119
- put = strm.next_out;
1120
- output = strm.output;
1121
- left = strm.avail_out;
1122
- next = strm.next_in;
1123
- input = strm.input;
1124
- have = strm.avail_in;
1125
- hold = state.hold;
1126
- bits = state.bits;
1127
- //---
1128
-
1129
- if (state.mode === TYPE) {
1130
- state.back = -1;
1131
- }
1132
- break;
1133
- }
1134
- state.back = 0;
1135
- for (;;) {
1136
- here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/
1137
- here_bits = here >>> 24;
1138
- here_op = (here >>> 16) & 0xff;
1139
- here_val = here & 0xffff;
1140
-
1141
- if (here_bits <= bits) { break; }
1142
- //--- PULLBYTE() ---//
1143
- if (have === 0) { break inf_leave; }
1144
- have--;
1145
- hold += input[next++] << bits;
1146
- bits += 8;
1147
- //---//
1148
- }
1149
- if (here_op && (here_op & 0xf0) === 0) {
1150
- last_bits = here_bits;
1151
- last_op = here_op;
1152
- last_val = here_val;
1153
- for (;;) {
1154
- here = state.lencode[last_val +
1155
- ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
1156
- here_bits = here >>> 24;
1157
- here_op = (here >>> 16) & 0xff;
1158
- here_val = here & 0xffff;
1159
-
1160
- if ((last_bits + here_bits) <= bits) { break; }
1161
- //--- PULLBYTE() ---//
1162
- if (have === 0) { break inf_leave; }
1163
- have--;
1164
- hold += input[next++] << bits;
1165
- bits += 8;
1166
- //---//
1167
- }
1168
- //--- DROPBITS(last.bits) ---//
1169
- hold >>>= last_bits;
1170
- bits -= last_bits;
1171
- //---//
1172
- state.back += last_bits;
1173
- }
1174
- //--- DROPBITS(here.bits) ---//
1175
- hold >>>= here_bits;
1176
- bits -= here_bits;
1177
- //---//
1178
- state.back += here_bits;
1179
- state.length = here_val;
1180
- if (here_op === 0) {
1181
- //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
1182
- // "inflate: literal '%c'\n" :
1183
- // "inflate: literal 0x%02x\n", here.val));
1184
- state.mode = LIT;
1185
- break;
1186
- }
1187
- if (here_op & 32) {
1188
- //Tracevv((stderr, "inflate: end of block\n"));
1189
- state.back = -1;
1190
- state.mode = TYPE;
1191
- break;
1192
- }
1193
- if (here_op & 64) {
1194
- strm.msg = 'invalid literal/length code';
1195
- state.mode = BAD;
1196
- break;
1197
- }
1198
- state.extra = here_op & 15;
1199
- state.mode = LENEXT;
1200
- /* falls through */
1201
- case LENEXT:
1202
- if (state.extra) {
1203
- //=== NEEDBITS(state.extra);
1204
- n = state.extra;
1205
- while (bits < n) {
1206
- if (have === 0) { break inf_leave; }
1207
- have--;
1208
- hold += input[next++] << bits;
1209
- bits += 8;
1210
- }
1211
- //===//
1212
- state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
1213
- //--- DROPBITS(state.extra) ---//
1214
- hold >>>= state.extra;
1215
- bits -= state.extra;
1216
- //---//
1217
- state.back += state.extra;
1218
- }
1219
- //Tracevv((stderr, "inflate: length %u\n", state.length));
1220
- state.was = state.length;
1221
- state.mode = DIST;
1222
- /* falls through */
1223
- case DIST:
1224
- for (;;) {
1225
- here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/
1226
- here_bits = here >>> 24;
1227
- here_op = (here >>> 16) & 0xff;
1228
- here_val = here & 0xffff;
1229
-
1230
- if ((here_bits) <= bits) { break; }
1231
- //--- PULLBYTE() ---//
1232
- if (have === 0) { break inf_leave; }
1233
- have--;
1234
- hold += input[next++] << bits;
1235
- bits += 8;
1236
- //---//
1237
- }
1238
- if ((here_op & 0xf0) === 0) {
1239
- last_bits = here_bits;
1240
- last_op = here_op;
1241
- last_val = here_val;
1242
- for (;;) {
1243
- here = state.distcode[last_val +
1244
- ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
1245
- here_bits = here >>> 24;
1246
- here_op = (here >>> 16) & 0xff;
1247
- here_val = here & 0xffff;
1248
-
1249
- if ((last_bits + here_bits) <= bits) { break; }
1250
- //--- PULLBYTE() ---//
1251
- if (have === 0) { break inf_leave; }
1252
- have--;
1253
- hold += input[next++] << bits;
1254
- bits += 8;
1255
- //---//
1256
- }
1257
- //--- DROPBITS(last.bits) ---//
1258
- hold >>>= last_bits;
1259
- bits -= last_bits;
1260
- //---//
1261
- state.back += last_bits;
1262
- }
1263
- //--- DROPBITS(here.bits) ---//
1264
- hold >>>= here_bits;
1265
- bits -= here_bits;
1266
- //---//
1267
- state.back += here_bits;
1268
- if (here_op & 64) {
1269
- strm.msg = 'invalid distance code';
1270
- state.mode = BAD;
1271
- break;
1272
- }
1273
- state.offset = here_val;
1274
- state.extra = (here_op) & 15;
1275
- state.mode = DISTEXT;
1276
- /* falls through */
1277
- case DISTEXT:
1278
- if (state.extra) {
1279
- //=== NEEDBITS(state.extra);
1280
- n = state.extra;
1281
- while (bits < n) {
1282
- if (have === 0) { break inf_leave; }
1283
- have--;
1284
- hold += input[next++] << bits;
1285
- bits += 8;
1286
- }
1287
- //===//
1288
- state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
1289
- //--- DROPBITS(state.extra) ---//
1290
- hold >>>= state.extra;
1291
- bits -= state.extra;
1292
- //---//
1293
- state.back += state.extra;
1294
- }
1295
- //#ifdef INFLATE_STRICT
1296
- if (state.offset > state.dmax) {
1297
- strm.msg = 'invalid distance too far back';
1298
- state.mode = BAD;
1299
- break;
1300
- }
1301
- //#endif
1302
- //Tracevv((stderr, "inflate: distance %u\n", state.offset));
1303
- state.mode = MATCH;
1304
- /* falls through */
1305
- case MATCH:
1306
- if (left === 0) { break inf_leave; }
1307
- copy = _out - left;
1308
- if (state.offset > copy) { /* copy from window */
1309
- copy = state.offset - copy;
1310
- if (copy > state.whave) {
1311
- if (state.sane) {
1312
- strm.msg = 'invalid distance too far back';
1313
- state.mode = BAD;
1314
- break;
1315
- }
1316
- // (!) This block is disabled in zlib defaults,
1317
- // don't enable it for binary compatibility
1318
- //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
1319
- // Trace((stderr, "inflate.c too far\n"));
1320
- // copy -= state.whave;
1321
- // if (copy > state.length) { copy = state.length; }
1322
- // if (copy > left) { copy = left; }
1323
- // left -= copy;
1324
- // state.length -= copy;
1325
- // do {
1326
- // output[put++] = 0;
1327
- // } while (--copy);
1328
- // if (state.length === 0) { state.mode = LEN; }
1329
- // break;
1330
- //#endif
1331
- }
1332
- if (copy > state.wnext) {
1333
- copy -= state.wnext;
1334
- from = state.wsize - copy;
1335
- }
1336
- else {
1337
- from = state.wnext - copy;
1338
- }
1339
- if (copy > state.length) { copy = state.length; }
1340
- from_source = state.window;
1341
- }
1342
- else { /* copy from output */
1343
- from_source = output;
1344
- from = put - state.offset;
1345
- copy = state.length;
1346
- }
1347
- if (copy > left) { copy = left; }
1348
- left -= copy;
1349
- state.length -= copy;
1350
- do {
1351
- output[put++] = from_source[from++];
1352
- } while (--copy);
1353
- if (state.length === 0) { state.mode = LEN; }
1354
- break;
1355
- case LIT:
1356
- if (left === 0) { break inf_leave; }
1357
- output[put++] = state.length;
1358
- left--;
1359
- state.mode = LEN;
1360
- break;
1361
- case CHECK:
1362
- if (state.wrap) {
1363
- //=== NEEDBITS(32);
1364
- while (bits < 32) {
1365
- if (have === 0) { break inf_leave; }
1366
- have--;
1367
- // Use '|' instead of '+' to make sure that result is signed
1368
- hold |= input[next++] << bits;
1369
- bits += 8;
1370
- }
1371
- //===//
1372
- _out -= left;
1373
- strm.total_out += _out;
1374
- state.total += _out;
1375
- if (_out) {
1376
- strm.adler = state.check =
1377
- /*UPDATE(state.check, put - _out, _out);*/
1378
- (state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out));
1379
-
1380
- }
1381
- _out = left;
1382
- // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
1383
- if ((state.flags ? hold : zswap32(hold)) !== state.check) {
1384
- strm.msg = 'incorrect data check';
1385
- state.mode = BAD;
1386
- break;
1387
- }
1388
- //=== INITBITS();
1389
- hold = 0;
1390
- bits = 0;
1391
- //===//
1392
- //Tracev((stderr, "inflate: check matches trailer\n"));
1393
- }
1394
- state.mode = LENGTH;
1395
- /* falls through */
1396
- case LENGTH:
1397
- if (state.wrap && state.flags) {
1398
- //=== NEEDBITS(32);
1399
- while (bits < 32) {
1400
- if (have === 0) { break inf_leave; }
1401
- have--;
1402
- hold += input[next++] << bits;
1403
- bits += 8;
1404
- }
1405
- //===//
1406
- if (hold !== (state.total & 0xffffffff)) {
1407
- strm.msg = 'incorrect length check';
1408
- state.mode = BAD;
1409
- break;
1410
- }
1411
- //=== INITBITS();
1412
- hold = 0;
1413
- bits = 0;
1414
- //===//
1415
- //Tracev((stderr, "inflate: length matches trailer\n"));
1416
- }
1417
- state.mode = DONE;
1418
- /* falls through */
1419
- case DONE:
1420
- ret = Z_STREAM_END;
1421
- break inf_leave;
1422
- case BAD:
1423
- ret = Z_DATA_ERROR;
1424
- break inf_leave;
1425
- case MEM:
1426
- return Z_MEM_ERROR;
1427
- case SYNC:
1428
- /* falls through */
1429
- default:
1430
- return Z_STREAM_ERROR;
1431
- }
1432
- }
1433
-
1434
- // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"
1435
-
1436
- /*
1437
- Return from inflate(), updating the total counts and the check value.
1438
- If there was no progress during the inflate() call, return a buffer
1439
- error. Call updatewindow() to create and/or update the window state.
1440
- Note: a memory error from inflate() is non-recoverable.
1441
- */
1442
-
1443
- //--- RESTORE() ---
1444
- strm.next_out = put;
1445
- strm.avail_out = left;
1446
- strm.next_in = next;
1447
- strm.avail_in = have;
1448
- state.hold = hold;
1449
- state.bits = bits;
1450
- //---
1451
-
1452
- if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&
1453
- (state.mode < CHECK || flush !== Z_FINISH))) {
1454
- if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;
1455
- }
1456
- _in -= strm.avail_in;
1457
- _out -= strm.avail_out;
1458
- strm.total_in += _in;
1459
- strm.total_out += _out;
1460
- state.total += _out;
1461
- if (state.wrap && _out) {
1462
- strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
1463
- (state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out));
1464
- }
1465
- strm.data_type = state.bits + (state.last ? 64 : 0) +
1466
- (state.mode === TYPE ? 128 : 0) +
1467
- (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
1468
- if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {
1469
- ret = Z_BUF_ERROR;
1470
- }
1471
- return ret;
1472
- }
1473
-
1474
- function inflateEnd(strm) {
1475
-
1476
- if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
1477
- return Z_STREAM_ERROR;
1478
- }
1479
-
1480
- var state = strm.state;
1481
- if (state.window) {
1482
- state.window = null;
1483
- }
1484
- strm.state = null;
1485
- return Z_OK;
1486
- }
1487
-
1488
- function inflateGetHeader(strm, head) {
1489
- var state;
1490
-
1491
- /* check state */
1492
- if (!strm || !strm.state) { return Z_STREAM_ERROR; }
1493
- state = strm.state;
1494
- if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }
1495
-
1496
- /* save header structure */
1497
- state.head = head;
1498
- head.done = false;
1499
- return Z_OK;
1500
- }
1501
-
1502
- function inflateSetDictionary(strm, dictionary) {
1503
- var dictLength = dictionary.length;
1504
-
1505
- var state;
1506
- var dictid;
1507
- var ret;
1508
-
1509
- /* check state */
1510
- if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }
1511
- state = strm.state;
1512
-
1513
- if (state.wrap !== 0 && state.mode !== DICT) {
1514
- return Z_STREAM_ERROR;
1515
- }
1516
-
1517
- /* check for correct dictionary identifier */
1518
- if (state.mode === DICT) {
1519
- dictid = 1; /* adler32(0, null, 0)*/
1520
- /* dictid = adler32(dictid, dictionary, dictLength); */
1521
- dictid = adler32_1(dictid, dictionary, dictLength, 0);
1522
- if (dictid !== state.check) {
1523
- return Z_DATA_ERROR;
1524
- }
1525
- }
1526
- /* copy dictionary to window using updatewindow(), which will amend the
1527
- existing dictionary if appropriate */
1528
- ret = updatewindow(strm, dictionary, dictLength, dictLength);
1529
- if (ret) {
1530
- state.mode = MEM;
1531
- return Z_MEM_ERROR;
1532
- }
1533
- state.havedict = 1;
1534
- // Tracev((stderr, "inflate: dictionary set\n"));
1535
- return Z_OK;
1536
- }
1537
-
1538
- var inflateReset_1 = inflateReset;
1539
- var inflateReset2_1 = inflateReset2;
1540
- var inflateResetKeep_1 = inflateResetKeep;
1541
- var inflateInit_1 = inflateInit;
1542
- var inflateInit2_1 = inflateInit2;
1543
- var inflate_2 = inflate;
1544
- var inflateEnd_1 = inflateEnd;
1545
- var inflateGetHeader_1 = inflateGetHeader;
1546
- var inflateSetDictionary_1 = inflateSetDictionary;
1547
- var inflateInfo = 'pako inflate (from Nodeca project)';
1548
-
1549
- /* Not implemented
1550
- exports.inflateCopy = inflateCopy;
1551
- exports.inflateGetDictionary = inflateGetDictionary;
1552
- exports.inflateMark = inflateMark;
1553
- exports.inflatePrime = inflatePrime;
1554
- exports.inflateSync = inflateSync;
1555
- exports.inflateSyncPoint = inflateSyncPoint;
1556
- exports.inflateUndermine = inflateUndermine;
1557
- */
1558
-
1559
- var inflate_1 = {
1560
- inflateReset: inflateReset_1,
1561
- inflateReset2: inflateReset2_1,
1562
- inflateResetKeep: inflateResetKeep_1,
1563
- inflateInit: inflateInit_1,
1564
- inflateInit2: inflateInit2_1,
1565
- inflate: inflate_2,
1566
- inflateEnd: inflateEnd_1,
1567
- inflateGetHeader: inflateGetHeader_1,
1568
- inflateSetDictionary: inflateSetDictionary_1,
1569
- inflateInfo: inflateInfo
1570
- };
1571
-
1572
- export { inflate_1 as i };