@openclaw/zalouser 2026.7.1-beta.2 → 2026.7.1-beta.4

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 (401) hide show
  1. package/dist/{accounts.runtime-B2F5jsIG.js → accounts.runtime-BK4FKoae.js} +1 -1
  2. package/dist/{api-B5U4x8bt.js → api-Ckk_hPfU.js} +15 -23
  3. package/dist/api.js +5 -5
  4. package/dist/{channel-upZiqJWv.js → channel-C0ARGeer.js} +47 -18
  5. package/dist/channel-plugin-api.js +1 -1
  6. package/dist/{channel.runtime-B3igcfqh.js → channel.runtime-DYblgvY5.js} +2 -2
  7. package/dist/{channel.setup-CJlEzAJP.js → channel.setup-Ba0dtXCS.js} +2 -2
  8. package/dist/{monitor-aip0K1Yf.js → monitor-D3DfqQDG.js} +3 -3
  9. package/dist/runtime-api.js +5 -5
  10. package/dist/{send-wLAr1heH.js → send-D1GpX8wV.js} +10 -8
  11. package/dist/setup-plugin-api.js +1 -1
  12. package/dist/{setup-surface-DBnm8O4H.js → setup-surface-BsD-g2tO.js} +2 -2
  13. package/dist/{shared-DmWesmOn.js → shared-CqSIPdjp.js} +1 -1
  14. package/dist/{zalo-js-3qIiveMW.js → zalo-js-CygJB5qD.js} +10 -6
  15. package/node_modules/pako/README.md +9 -31
  16. package/node_modules/pako/dist/pako.es5.js +149 -77
  17. package/node_modules/pako/dist/pako.es5.min.js +2 -2
  18. package/node_modules/pako/dist/pako.esm.mjs +146 -78
  19. package/node_modules/pako/dist/pako.js +146 -78
  20. package/node_modules/pako/dist/pako.min.js +2 -2
  21. package/node_modules/pako/dist/pako_deflate.es5.js +85 -56
  22. package/node_modules/pako/dist/pako_deflate.es5.min.js +2 -2
  23. package/node_modules/pako/dist/pako_deflate.js +83 -55
  24. package/node_modules/pako/dist/pako_deflate.min.js +2 -2
  25. package/node_modules/pako/dist/pako_inflate.es5.js +62 -19
  26. package/node_modules/pako/dist/pako_inflate.es5.min.js +2 -2
  27. package/node_modules/pako/dist/pako_inflate.js +61 -21
  28. package/node_modules/pako/dist/pako_inflate.min.js +2 -2
  29. package/node_modules/pako/lib/deflate.js +16 -9
  30. package/node_modules/pako/lib/inflate.js +51 -14
  31. package/node_modules/pako/lib/utils/strings.js +1 -1
  32. package/node_modules/pako/lib/zlib/README +1 -1
  33. package/node_modules/pako/lib/zlib/deflate.js +65 -44
  34. package/node_modules/pako/lib/zlib/inflate.js +5 -2
  35. package/node_modules/pako/lib/zlib/inftrees.js +1 -1
  36. package/node_modules/pako/package.json +14 -5
  37. package/node_modules/semver/classes/range.js +6 -2
  38. package/node_modules/semver/package.json +1 -1
  39. package/node_modules/typebox/build/compile/validator.d.mts +2 -7
  40. package/node_modules/typebox/build/compile/validator.mjs +6 -36
  41. package/node_modules/typebox/build/error/errors.d.mts +1 -7
  42. package/node_modules/typebox/build/format/_idna.mjs +36 -6
  43. package/node_modules/typebox/build/format/_puny.mjs +4 -1
  44. package/node_modules/typebox/build/format/uuid.d.mts +2 -2
  45. package/node_modules/typebox/build/format/uuid.mjs +3 -3
  46. package/node_modules/typebox/build/guard/emit.d.mts +0 -4
  47. package/node_modules/typebox/build/guard/emit.mjs +0 -8
  48. package/node_modules/typebox/build/guard/guard.d.mts +4 -8
  49. package/node_modules/typebox/build/guard/guard.mjs +5 -13
  50. package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
  51. package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
  52. package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
  53. package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
  54. package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
  55. package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
  56. package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
  57. package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
  58. package/node_modules/typebox/build/schema/types/index.mjs +0 -1
  59. package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
  60. package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
  61. package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
  62. package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
  63. package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
  64. package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
  65. package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
  66. package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
  67. package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
  68. package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
  69. package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
  70. package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
  71. package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
  72. package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
  73. package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
  74. package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
  75. package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
  76. package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
  77. package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
  78. package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
  79. package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
  80. package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
  81. package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
  82. package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
  83. package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
  84. package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
  85. package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
  86. package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
  87. package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
  88. package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
  89. package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
  90. package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
  91. package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
  92. package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
  93. package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
  94. package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
  95. package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
  96. package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
  97. package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
  98. package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
  99. package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
  100. package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
  101. package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
  102. package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
  103. package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  104. package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  105. package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  106. package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  107. package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  108. package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  109. package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  110. package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  111. package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  112. package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  113. package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  114. package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  115. package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
  116. package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
  117. package/node_modules/typebox/build/type/action/index.d.mts +7 -4
  118. package/node_modules/typebox/build/type/action/index.mjs +7 -4
  119. package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
  120. package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
  121. package/node_modules/typebox/build/type/action/module.d.mts +8 -7
  122. package/node_modules/typebox/build/type/action/module.mjs +7 -6
  123. package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
  124. package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
  125. package/node_modules/typebox/build/type/action/with.d.mts +11 -0
  126. package/node_modules/typebox/build/type/action/with.mjs +11 -0
  127. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  128. package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
  129. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
  130. package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
  131. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
  132. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
  133. package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
  134. package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
  135. package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
  136. package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
  137. package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
  138. package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
  139. package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
  140. package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
  141. package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
  142. package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
  143. package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
  144. package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
  145. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
  146. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
  147. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
  148. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
  149. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
  150. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
  151. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
  152. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
  153. package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
  154. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
  155. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
  156. package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
  157. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  158. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
  159. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  160. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  161. package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
  162. package/node_modules/typebox/build/type/engine/index.mjs +2 -2
  163. package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
  164. package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
  165. package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
  166. package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
  167. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
  168. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
  169. package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
  170. package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
  171. package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
  172. package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
  173. package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
  174. package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
  175. package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
  176. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
  177. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
  178. package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
  179. package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
  180. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
  181. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
  182. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
  183. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
  184. package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
  185. package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
  186. package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
  187. package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
  188. package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
  189. package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
  190. package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  191. package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
  192. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
  193. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  194. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  195. package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
  196. package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
  197. package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
  198. package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
  199. package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
  200. package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
  201. package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
  202. package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
  203. package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
  204. package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
  205. package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
  206. package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  207. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
  208. package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
  209. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  210. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
  211. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  212. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  213. package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
  214. package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
  215. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  216. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  217. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
  218. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
  219. package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
  220. package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
  221. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
  222. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
  223. package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
  224. package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
  225. package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
  226. package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
  227. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
  228. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
  229. package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
  230. package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
  231. package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
  232. package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
  233. package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
  234. package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
  235. package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
  236. package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
  237. package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
  238. package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
  239. package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
  240. package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
  241. package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
  242. package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  243. package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
  244. package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
  245. package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
  246. package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
  247. package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
  248. package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
  249. package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
  250. package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
  251. package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
  252. package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
  253. package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
  254. package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
  255. package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
  256. package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  257. package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
  258. package/node_modules/typebox/build/type/extends/object.mjs +25 -3
  259. package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
  260. package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
  261. package/node_modules/typebox/build/type/extends/record.mjs +23 -0
  262. package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
  263. package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
  264. package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
  265. package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
  266. package/node_modules/typebox/build/type/extends/union.mjs +2 -2
  267. package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
  268. package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
  269. package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
  270. package/node_modules/typebox/build/type/script/parser.mjs +22 -22
  271. package/node_modules/typebox/build/type/script/script.d.mts +3 -4
  272. package/node_modules/typebox/build/type/script/script.mjs +3 -2
  273. package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
  274. package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  275. package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
  276. package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
  277. package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
  278. package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
  279. package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
  280. package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
  281. package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
  282. package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
  283. package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
  284. package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
  285. package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
  286. package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
  287. package/node_modules/typebox/build/type/types/call.d.mts +3 -3
  288. package/node_modules/typebox/build/type/types/call.mjs +3 -2
  289. package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
  290. package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  291. package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
  292. package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
  293. package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
  294. package/node_modules/typebox/build/type/types/enum.mjs +5 -0
  295. package/node_modules/typebox/build/type/types/index.d.mts +1 -4
  296. package/node_modules/typebox/build/type/types/index.mjs +1 -4
  297. package/node_modules/typebox/build/type/types/number.d.mts +1 -1
  298. package/node_modules/typebox/build/type/types/number.mjs +1 -1
  299. package/node_modules/typebox/build/type/types/record.d.mts +13 -7
  300. package/node_modules/typebox/build/type/types/record.mjs +15 -9
  301. package/node_modules/typebox/build/type/types/static.d.mts +2 -5
  302. package/node_modules/typebox/build/typebox.d.mts +4 -8
  303. package/node_modules/typebox/build/typebox.mjs +4 -8
  304. package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
  305. package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
  306. package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
  307. package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
  308. package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
  309. package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
  310. package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
  311. package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
  312. package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
  313. package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
  314. package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
  315. package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
  316. package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
  317. package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
  318. package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
  319. package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
  320. package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
  321. package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
  322. package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
  323. package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  324. package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
  325. package/node_modules/typebox/build/value/index.d.mts +0 -1
  326. package/node_modules/typebox/build/value/index.mjs +0 -1
  327. package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
  328. package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
  329. package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
  330. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
  331. package/node_modules/typebox/build/value/value.d.mts +0 -1
  332. package/node_modules/typebox/build/value/value.mjs +0 -1
  333. package/node_modules/typebox/package.json +25 -25
  334. package/node_modules/typebox/readme.md +97 -80
  335. package/npm-shrinkwrap.json +23 -13
  336. package/package.json +5 -5
  337. package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
  338. package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
  339. package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
  340. package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
  341. package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
  342. package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
  343. package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
  344. package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
  345. package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
  346. package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
  347. package/node_modules/typebox/build/type/action/options.d.mts +0 -11
  348. package/node_modules/typebox/build/type/action/options.mjs +0 -11
  349. package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
  350. package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
  351. package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
  352. package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
  353. package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
  354. package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
  355. package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
  356. package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
  357. package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
  358. package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
  359. package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
  360. package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
  361. package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
  362. package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
  363. package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
  364. package/node_modules/typebox/build/type/types/base.d.mts +0 -50
  365. package/node_modules/typebox/build/type/types/base.mjs +0 -84
  366. package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
  367. package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
  368. package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
  369. package/node_modules/typebox/build/type/types/promise.mjs +0 -29
  370. package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
  371. package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
  372. package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
  373. package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
  374. package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
  375. package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
  376. package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
  377. package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
  378. package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
  379. package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
  380. package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
  381. package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
  382. package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
  383. package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
  384. package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
  385. package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
  386. package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
  387. package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
  388. package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
  389. package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
  390. package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
  391. package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
  392. package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
  393. package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
  394. package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
  395. package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
  396. package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
  397. package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
  398. package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
  399. package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
  400. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
  401. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
@@ -1,5 +1,5 @@
1
1
 
2
- /*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
2
+ /*! pako 2.2.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
5
5
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -1365,7 +1365,7 @@
1365
1365
  Z_STREAM_END$3 = constants$2.Z_STREAM_END,
1366
1366
  Z_STREAM_ERROR$2 = constants$2.Z_STREAM_ERROR,
1367
1367
  Z_DATA_ERROR$2 = constants$2.Z_DATA_ERROR,
1368
- Z_BUF_ERROR$1 = constants$2.Z_BUF_ERROR,
1368
+ Z_BUF_ERROR$2 = constants$2.Z_BUF_ERROR,
1369
1369
  Z_DEFAULT_COMPRESSION$1 = constants$2.Z_DEFAULT_COMPRESSION,
1370
1370
  Z_FILTERED = constants$2.Z_FILTERED,
1371
1371
  Z_HUFFMAN_ONLY = constants$2.Z_HUFFMAN_ONLY,
@@ -1462,13 +1462,36 @@
1462
1462
  };
1463
1463
 
1464
1464
  /* eslint-disable new-cap */
1465
- var HASH_ZLIB = function HASH_ZLIB(s, prev, data) {
1465
+ var HASH = function HASH(s, prev, data) {
1466
1466
  return (prev << s.hash_shift ^ data) & s.hash_mask;
1467
1467
  };
1468
- // This hash causes less collisions, https://github.com/nodeca/pako/issues/135
1469
- // But breaks binary compatibility
1470
- //let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;
1471
- var HASH = HASH_ZLIB;
1468
+
1469
+ /* ===========================================================================
1470
+ * Insert string str in the dictionary and set match_head to the previous head
1471
+ * of the hash chain (the most recent string with same hash key). Return
1472
+ * the previous length of the hash chain.
1473
+ * IN assertion: all calls to INSERT_STRING are made with consecutive input
1474
+ * characters and the first MIN_MATCH bytes of str are valid (except for
1475
+ * the last MIN_MATCH-1 bytes of the input file).
1476
+ */
1477
+ var INSERT_STRING = function INSERT_STRING(s, str) {
1478
+ var h;
1479
+ if (s.legacy_hash) {
1480
+ /* UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]); */
1481
+ h = s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);
1482
+ } else {
1483
+ // ANZAC++ hash: reads 4 bytes, matches node.js zlib output (legacyHash
1484
+ // restores classic zlib hash). Faster, with fewer collisions.
1485
+ var w = s.window;
1486
+ // Read 4 bytes little-endian. Math.imul reproduces C uint32 overflow in
1487
+ // `(value * 66521 + 66521) >> 16` exactly.
1488
+ var value = w[str] | w[str + 1] << 8 | w[str + 2] << 16 | w[str + 3] << 24;
1489
+ h = s.ins_h = Math.imul(value, 66521) + 66521 >>> 16 & s.hash_mask;
1490
+ }
1491
+ var hash_head = s.prev[str & s.w_mask] = s.head[h];
1492
+ s.head[h] = str;
1493
+ return hash_head;
1494
+ };
1472
1495
 
1473
1496
  /* =========================================================================
1474
1497
  * Flush as much pending output as possible. All deflate() output, except for
@@ -1718,7 +1741,20 @@
1718
1741
  s.lookahead += n;
1719
1742
 
1720
1743
  /* Initialize the hash value now that we have some input: */
1721
- if (s.lookahead + s.insert >= MIN_MATCH) {
1744
+ if (!s.legacy_hash) {
1745
+ /* The 4-byte hash reads one extra byte, so it needs one more available. */
1746
+ if (s.lookahead + s.insert > MIN_MATCH) {
1747
+ str = s.strstart - s.insert;
1748
+ while (s.insert) {
1749
+ INSERT_STRING(s, str);
1750
+ str++;
1751
+ s.insert--;
1752
+ if (s.lookahead + s.insert <= MIN_MATCH) {
1753
+ break;
1754
+ }
1755
+ }
1756
+ }
1757
+ } else if (s.lookahead + s.insert >= MIN_MATCH) {
1722
1758
  str = s.strstart - s.insert;
1723
1759
  s.ins_h = s.window[str];
1724
1760
 
@@ -1728,10 +1764,7 @@
1728
1764
  // Call update_hash() MIN_MATCH-3 more times
1729
1765
  //#endif
1730
1766
  while (s.insert) {
1731
- /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
1732
- s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);
1733
- s.prev[str & s.w_mask] = s.head[s.ins_h];
1734
- s.head[s.ins_h] = str;
1767
+ INSERT_STRING(s, str);
1735
1768
  str++;
1736
1769
  s.insert--;
1737
1770
  if (s.lookahead + s.insert < MIN_MATCH) {
@@ -2026,11 +2059,7 @@
2026
2059
  */
2027
2060
  hash_head = 0 /*NIL*/;
2028
2061
  if (s.lookahead >= MIN_MATCH) {
2029
- /*** INSERT_STRING(s, s.strstart, hash_head); ***/
2030
- s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
2031
- hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
2032
- s.head[s.ins_h] = s.strstart;
2033
- /***/
2062
+ hash_head = INSERT_STRING(s, s.strstart);
2034
2063
  }
2035
2064
 
2036
2065
  /* Find the longest match, discarding those <= prev_length.
@@ -2060,11 +2089,7 @@
2060
2089
  s.match_length--; /* string at strstart already in table */
2061
2090
  do {
2062
2091
  s.strstart++;
2063
- /*** INSERT_STRING(s, s.strstart, hash_head); ***/
2064
- s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
2065
- hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
2066
- s.head[s.ins_h] = s.strstart;
2067
- /***/
2092
+ hash_head = INSERT_STRING(s, s.strstart);
2068
2093
  /* strstart never exceeds WSIZE-MAX_MATCH, so there are
2069
2094
  * always MIN_MATCH bytes ahead.
2070
2095
  */
@@ -2073,16 +2098,18 @@
2073
2098
  } else {
2074
2099
  s.strstart += s.match_length;
2075
2100
  s.match_length = 0;
2076
- s.ins_h = s.window[s.strstart];
2077
- /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */
2078
- s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);
2079
-
2080
- //#if MIN_MATCH != 3
2081
- // Call UPDATE_HASH() MIN_MATCH-3 more times
2082
- //#endif
2083
- /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
2084
- * matter since it will be recomputed at next deflate call.
2085
- */
2101
+ if (s.legacy_hash) {
2102
+ s.ins_h = s.window[s.strstart];
2103
+ /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */
2104
+ s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);
2105
+
2106
+ //#if MIN_MATCH != 3
2107
+ // Call UPDATE_HASH() MIN_MATCH-3 more times
2108
+ //#endif
2109
+ /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
2110
+ * matter since it will be recomputed at next deflate call.
2111
+ */
2112
+ }
2086
2113
  }
2087
2114
  } else {
2088
2115
  /* No match, output a literal byte */
@@ -2157,11 +2184,7 @@
2157
2184
  */
2158
2185
  hash_head = 0 /*NIL*/;
2159
2186
  if (s.lookahead >= MIN_MATCH) {
2160
- /*** INSERT_STRING(s, s.strstart, hash_head); ***/
2161
- s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
2162
- hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
2163
- s.head[s.ins_h] = s.strstart;
2164
- /***/
2187
+ hash_head = INSERT_STRING(s, s.strstart);
2165
2188
  }
2166
2189
 
2167
2190
  /* Find the longest match, discarding those <= prev_length.
@@ -2205,11 +2228,7 @@
2205
2228
  s.prev_length -= 2;
2206
2229
  do {
2207
2230
  if (++s.strstart <= max_insert) {
2208
- /*** INSERT_STRING(s, s.strstart, hash_head); ***/
2209
- s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
2210
- hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
2211
- s.head[s.ins_h] = s.strstart;
2212
- /***/
2231
+ hash_head = INSERT_STRING(s, s.strstart);
2213
2232
  }
2214
2233
  } while (--s.prev_length !== 0);
2215
2234
  s.match_available = 0;
@@ -2518,6 +2537,7 @@
2518
2537
  this.head = null; /* Heads of the hash chains or NIL. */
2519
2538
 
2520
2539
  this.ins_h = 0; /* hash index of string to be inserted */
2540
+ this.legacy_hash = 0; /* use classic zlib hash instead of default ANZAC++ */
2521
2541
  this.hash_size = 0; /* number of elements in hash table */
2522
2542
  this.hash_bits = 0; /* log2(hash_size) */
2523
2543
  this.hash_mask = 0; /* hash_size-1 */
@@ -2715,7 +2735,7 @@
2715
2735
  strm.state.gzhead = head;
2716
2736
  return Z_OK$3;
2717
2737
  };
2718
- var deflateInit2 = function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {
2738
+ var deflateInit2 = function deflateInit2(strm, level, method, windowBits, memLevel, strategy, legacyHash) {
2719
2739
  if (!strm) {
2720
2740
  // === Z_NULL
2721
2741
  return Z_STREAM_ERROR$2;
@@ -2750,7 +2770,12 @@
2750
2770
  s.w_bits = windowBits;
2751
2771
  s.w_size = 1 << s.w_bits;
2752
2772
  s.w_mask = s.w_size - 1;
2773
+ s.legacy_hash = legacyHash ? 1 : 0;
2753
2774
  s.hash_bits = memLevel + 7;
2775
+ /* ANZAC++ hash needs >= 15 hash bits to span its 4 read bytes. */
2776
+ if (!s.legacy_hash && s.hash_bits < 15) {
2777
+ s.hash_bits = 15;
2778
+ }
2754
2779
  s.hash_size = 1 << s.hash_bits;
2755
2780
  s.hash_mask = s.hash_size - 1;
2756
2781
  s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);
@@ -2832,7 +2857,7 @@
2832
2857
  }
2833
2858
  var s = strm.state;
2834
2859
  if (!strm.output || strm.avail_in !== 0 && !strm.input || s.status === FINISH_STATE && flush !== Z_FINISH$3) {
2835
- return err(strm, strm.avail_out === 0 ? Z_BUF_ERROR$1 : Z_STREAM_ERROR$2);
2860
+ return err(strm, strm.avail_out === 0 ? Z_BUF_ERROR$2 : Z_STREAM_ERROR$2);
2836
2861
  }
2837
2862
  var old_flush = s.last_flush;
2838
2863
  s.last_flush = flush;
@@ -2856,12 +2881,12 @@
2856
2881
  * returning Z_STREAM_END instead of Z_BUF_ERROR.
2857
2882
  */
2858
2883
  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH$3) {
2859
- return err(strm, Z_BUF_ERROR$1);
2884
+ return err(strm, Z_BUF_ERROR$2);
2860
2885
  }
2861
2886
 
2862
2887
  /* User must not provide more input after the first FINISH: */
2863
2888
  if (s.status === FINISH_STATE && strm.avail_in !== 0) {
2864
- return err(strm, Z_BUF_ERROR$1);
2889
+ return err(strm, Z_BUF_ERROR$2);
2865
2890
  }
2866
2891
 
2867
2892
  /* Write the header */
@@ -3223,10 +3248,7 @@
3223
3248
  var str = s.strstart;
3224
3249
  var n = s.lookahead - (MIN_MATCH - 1);
3225
3250
  do {
3226
- /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
3227
- s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);
3228
- s.prev[str & s.w_mask] = s.head[s.ins_h];
3229
- s.head[s.ins_h] = str;
3251
+ INSERT_STRING(s, str);
3230
3252
  str++;
3231
3253
  } while (--n);
3232
3254
  s.strstart = str;
@@ -3352,7 +3374,7 @@
3352
3374
  for (var q = 0; q < 256; q++) {
3353
3375
  _utf8len[q] = q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1;
3354
3376
  }
3355
- _utf8len[254] = _utf8len[254] = 1; // Invalid sequence start
3377
+ _utf8len[254] = _utf8len[255] = 1; // Invalid sequence start
3356
3378
 
3357
3379
  // convert string to array (typed, when possible)
3358
3380
  var string2buf = function string2buf(str) {
@@ -3582,6 +3604,16 @@
3582
3604
 
3583
3605
  /* ===========================================================================*/
3584
3606
 
3607
+ var defaultOptions$1 = {
3608
+ level: Z_DEFAULT_COMPRESSION,
3609
+ method: Z_DEFLATED$1,
3610
+ chunkSize: 16384,
3611
+ windowBits: 15,
3612
+ memLevel: 8,
3613
+ strategy: Z_DEFAULT_STRATEGY,
3614
+ legacyHash: true
3615
+ };
3616
+
3585
3617
  /**
3586
3618
  * class Deflate
3587
3619
  *
@@ -3635,6 +3667,10 @@
3635
3667
  * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
3636
3668
  * for more information on these.
3637
3669
  *
3670
+ * - `legacyHash` (Boolean) - use the classic zlib hash (default), which matches
3671
+ * canonical zlib output byte-for-byte. Set to `false` to use the faster
3672
+ * ANZAC++ hash, which matches recent (chromium) node.js output instead.
3673
+ *
3638
3674
  * Additional options, for internal needs:
3639
3675
  *
3640
3676
  * - `chunkSize` - size of generated data chunks (16K by default)
@@ -3667,14 +3703,7 @@
3667
3703
  * ```
3668
3704
  **/
3669
3705
  function Deflate$1(options) {
3670
- this.options = common.assign({
3671
- level: Z_DEFAULT_COMPRESSION,
3672
- method: Z_DEFLATED$1,
3673
- chunkSize: 16384,
3674
- windowBits: 15,
3675
- memLevel: 8,
3676
- strategy: Z_DEFAULT_STRATEGY
3677
- }, options || {});
3706
+ this.options = common.assign({}, defaultOptions$1, options || {});
3678
3707
  var opt = this.options;
3679
3708
  if (opt.raw && opt.windowBits > 0) {
3680
3709
  opt.windowBits = -opt.windowBits;
@@ -3688,7 +3717,7 @@
3688
3717
 
3689
3718
  this.strm = new zstream();
3690
3719
  this.strm.avail_out = 0;
3691
- var status = deflate_1$2.deflateInit2(this.strm, opt.level, opt.method, opt.windowBits, opt.memLevel, opt.strategy);
3720
+ var status = deflate_1$2.deflateInit2(this.strm, opt.level, opt.method, opt.windowBits, opt.memLevel, opt.strategy, opt.legacyHash);
3692
3721
  if (status !== Z_OK$2) {
3693
3722
  throw new Error(messages[status]);
3694
3723
  }
@@ -4282,7 +4311,7 @@
4282
4311
  var lbase = new Uint16Array([/* Length codes 257..285 base */
4283
4312
  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0]);
4284
4313
  var lext = new Uint8Array([/* Length codes 257..285 extra */
4285
- 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78]);
4314
+ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 199, 75]);
4286
4315
  var dbase = new Uint16Array([/* Distance codes 0..29 base */
4287
4316
  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0]);
4288
4317
  var dext = new Uint8Array([/* Distance codes 0..29 extra */
@@ -4605,7 +4634,7 @@
4605
4634
  Z_STREAM_ERROR$1 = constants$2.Z_STREAM_ERROR,
4606
4635
  Z_DATA_ERROR$1 = constants$2.Z_DATA_ERROR,
4607
4636
  Z_MEM_ERROR$1 = constants$2.Z_MEM_ERROR,
4608
- Z_BUF_ERROR = constants$2.Z_BUF_ERROR,
4637
+ Z_BUF_ERROR$1 = constants$2.Z_BUF_ERROR,
4609
4638
  Z_DEFLATED = constants$2.Z_DEFLATED;
4610
4639
 
4611
4640
  /* STATES ====================================================================*/
@@ -4897,10 +4926,14 @@
4897
4926
 
4898
4927
  /* if it hasn't been done already, allocate space for the window */
4899
4928
  if (state.window === null) {
4929
+ state.window = new Uint8Array(1 << state.wbits);
4930
+ }
4931
+
4932
+ /* if window not in use yet, initialize */
4933
+ if (state.wsize === 0) {
4900
4934
  state.wsize = 1 << state.wbits;
4901
4935
  state.wnext = 0;
4902
4936
  state.whave = 0;
4903
- state.window = new Uint8Array(state.wsize);
4904
4937
  }
4905
4938
 
4906
4939
  /* copy state->wsize or less output bytes into the circular window */
@@ -6104,7 +6137,7 @@
6104
6137
  }
6105
6138
  strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
6106
6139
  if ((_in === 0 && _out === 0 || flush === Z_FINISH$1) && ret === Z_OK$1) {
6107
- ret = Z_BUF_ERROR;
6140
+ ret = Z_BUF_ERROR$1;
6108
6141
  }
6109
6142
  return ret;
6110
6143
  };
@@ -6272,10 +6305,17 @@
6272
6305
  Z_NEED_DICT = constants$2.Z_NEED_DICT,
6273
6306
  Z_STREAM_ERROR = constants$2.Z_STREAM_ERROR,
6274
6307
  Z_DATA_ERROR = constants$2.Z_DATA_ERROR,
6275
- Z_MEM_ERROR = constants$2.Z_MEM_ERROR;
6308
+ Z_MEM_ERROR = constants$2.Z_MEM_ERROR,
6309
+ Z_BUF_ERROR = constants$2.Z_BUF_ERROR;
6276
6310
 
6277
6311
  /* ===========================================================================*/
6278
6312
 
6313
+ var defaultOptions = {
6314
+ chunkSize: 1024 * 64,
6315
+ windowBits: 15,
6316
+ to: ''
6317
+ };
6318
+
6279
6319
  /**
6280
6320
  * class Inflate
6281
6321
  *
@@ -6353,11 +6393,7 @@
6353
6393
  * ```
6354
6394
  **/
6355
6395
  function Inflate$1(options) {
6356
- this.options = common.assign({
6357
- chunkSize: 1024 * 64,
6358
- windowBits: 15,
6359
- to: ''
6360
- }, options || {});
6396
+ this.options = common.assign({}, defaultOptions, options || {});
6361
6397
  var opt = this.options;
6362
6398
 
6363
6399
  // Force window size for `raw` data, if not set directly,
@@ -6473,8 +6509,16 @@
6473
6509
  }
6474
6510
  }
6475
6511
 
6476
- // Skip snyc markers if more data follows and not raw mode
6477
- while (strm.avail_in > 0 && status === Z_STREAM_END && strm.state.wrap > 0 && data[strm.next_in] !== 0) {
6512
+ // Only the gzip format defines concatenated members (RFC 1952: a gzip file
6513
+ // is "a series of members"). A zlib stream (RFC 1950) ends after its
6514
+ // ADLER32, and a raw DEFLATE stream (RFC 1951) ends after its final block -
6515
+ // neither format allows anything to follow, so bytes after the end are not
6516
+ // ours to interpret and must be left in the input. Restart decoding only
6517
+ // for a gzip member: `state.flags` is non-zero only once a gzip header has
6518
+ // actually been decoded (it stays 0 for a zlib member, even when the format
6519
+ // was auto-detected and the gzip bit of `wrap` is set). A trailing zero
6520
+ // byte is padding, not the start of a member (no member can begin with 0).
6521
+ while (strm.avail_in > 0 && status === Z_STREAM_END && strm.state.wrap & 2 && strm.state.flags !== 0 && strm.input[strm.next_in] !== 0) {
6478
6522
  inflate_1$2.inflateReset(strm);
6479
6523
  status = inflate_1$2.inflate(strm, _flush_mode);
6480
6524
  }
@@ -6492,7 +6536,9 @@
6492
6536
  // to align utf8 strings boundaries.
6493
6537
  last_avail_out = strm.avail_out;
6494
6538
  if (strm.next_out) {
6495
- if (strm.avail_out === 0 || status === Z_STREAM_END) {
6539
+ // Flush output if buffer is full, stream ended, or an explicit flush was
6540
+ // requested (e.g. Z_SYNC_FLUSH) - to push out the tail, same as node's zlib.
6541
+ if (strm.avail_out === 0 || status === Z_STREAM_END || _flush_mode > 0) {
6496
6542
  if (this.options.to === 'string') {
6497
6543
  var next_out_utf8 = strings.utf8border(strm.output, strm.next_out);
6498
6544
  var tail = strm.next_out - next_out_utf8;
@@ -6505,12 +6551,22 @@
6505
6551
  this.onData(utf8str);
6506
6552
  } else {
6507
6553
  this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));
6554
+
6555
+ // Force a fresh output buffer on next iteration / next push, so the
6556
+ // already emitted tail is not sent again.
6557
+ strm.avail_out = 0;
6558
+ strm.next_out = 0;
6508
6559
  }
6509
6560
  }
6510
6561
  }
6511
6562
 
6512
- // Must repeat iteration if out buffer is full
6513
- if (status === Z_OK && last_avail_out === 0) continue;
6563
+ // A full output buffer means there may be more to produce - allocate a new
6564
+ // one and call inflate again. The status depends on the flush mode: with
6565
+ // Z_NO_FLUSH a full buffer is reported as Z_OK, but with Z_FINISH the same
6566
+ // situation is reported as Z_BUF_ERROR ("could not make progress now",
6567
+ // non-fatal) even though output is still pending. Both must continue; the
6568
+ // distinction that matters is purely "was the output buffer exhausted".
6569
+ if ((status === Z_OK || status === Z_BUF_ERROR) && last_avail_out === 0) continue;
6514
6570
 
6515
6571
  // Finalize if end of stream reached.
6516
6572
  if (status === Z_STREAM_END) {
@@ -6519,7 +6575,23 @@
6519
6575
  this.ended = true;
6520
6576
  return true;
6521
6577
  }
6522
- if (strm.avail_in === 0) break;
6578
+ if (strm.avail_in === 0) {
6579
+ // Input is exhausted. If the caller declared this the end of the stream
6580
+ // (Z_FINISH) but we never saw Z_STREAM_END, the compressed data ended
6581
+ // before its terminating marker - i.e. it is truncated/incomplete. That
6582
+ // is an error: returning the partial output as success would be
6583
+ // indistinguishable from a complete decode, hiding the data loss. Report
6584
+ // it via Z_BUF_ERROR. (Reached only when the output buffer still had room
6585
+ // - a full buffer is handled by the `continue` above - so this genuinely
6586
+ // means "ran out of input", not "ran out of output".)
6587
+ if (_flush_mode === Z_FINISH) {
6588
+ status = inflate_1$2.inflateEnd(this.strm);
6589
+ this.onEnd(status === Z_OK ? Z_BUF_ERROR : status);
6590
+ this.ended = true;
6591
+ return false;
6592
+ }
6593
+ break;
6594
+ }
6523
6595
  }
6524
6596
  return true;
6525
6597
  };
@@ -6600,7 +6672,7 @@
6600
6672
  **/
6601
6673
  function inflate$1(input, options) {
6602
6674
  var inflator = new Inflate$1(options);
6603
- inflator.push(input);
6675
+ inflator.push(input, true);
6604
6676
 
6605
6677
  // That will never happens, if you don't cheat with options :)
6606
6678
  if (inflator.err) throw inflator.msg || messages[inflator.err];