@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
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
4
4
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
5
5
  //
@@ -1421,7 +1421,7 @@ const { _tr_init, _tr_stored_block, _tr_flush_block, _tr_tally, _tr_align } = tr
1421
1421
 
1422
1422
  const {
1423
1423
  Z_NO_FLUSH: Z_NO_FLUSH$2, Z_PARTIAL_FLUSH, Z_FULL_FLUSH: Z_FULL_FLUSH$1, Z_FINISH: Z_FINISH$3, Z_BLOCK: Z_BLOCK$1,
1424
- Z_OK: Z_OK$3, Z_STREAM_END: Z_STREAM_END$3, Z_STREAM_ERROR: Z_STREAM_ERROR$2, Z_DATA_ERROR: Z_DATA_ERROR$2, Z_BUF_ERROR: Z_BUF_ERROR$1,
1424
+ Z_OK: Z_OK$3, Z_STREAM_END: Z_STREAM_END$3, Z_STREAM_ERROR: Z_STREAM_ERROR$2, Z_DATA_ERROR: Z_DATA_ERROR$2, Z_BUF_ERROR: Z_BUF_ERROR$2,
1425
1425
  Z_DEFAULT_COMPRESSION: Z_DEFAULT_COMPRESSION$1,
1426
1426
  Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED, Z_DEFAULT_STRATEGY: Z_DEFAULT_STRATEGY$1,
1427
1427
  Z_UNKNOWN,
@@ -1520,11 +1520,35 @@ const slide_hash = (s) => {
1520
1520
  };
1521
1521
 
1522
1522
  /* eslint-disable new-cap */
1523
- let HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;
1524
- // This hash causes less collisions, https://github.com/nodeca/pako/issues/135
1525
- // But breaks binary compatibility
1526
- //let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;
1527
- let HASH = HASH_ZLIB;
1523
+ let HASH = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;
1524
+
1525
+
1526
+ /* ===========================================================================
1527
+ * Insert string str in the dictionary and set match_head to the previous head
1528
+ * of the hash chain (the most recent string with same hash key). Return
1529
+ * the previous length of the hash chain.
1530
+ * IN assertion: all calls to INSERT_STRING are made with consecutive input
1531
+ * characters and the first MIN_MATCH bytes of str are valid (except for
1532
+ * the last MIN_MATCH-1 bytes of the input file).
1533
+ */
1534
+ const INSERT_STRING = (s, str) => {
1535
+ let h;
1536
+ if (s.legacy_hash) {
1537
+ /* UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]); */
1538
+ h = s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);
1539
+ } else {
1540
+ // ANZAC++ hash: reads 4 bytes, matches node.js zlib output (legacyHash
1541
+ // restores classic zlib hash). Faster, with fewer collisions.
1542
+ const w = s.window;
1543
+ // Read 4 bytes little-endian. Math.imul reproduces C uint32 overflow in
1544
+ // `(value * 66521 + 66521) >> 16` exactly.
1545
+ const value = w[str] | (w[str + 1] << 8) | (w[str + 2] << 16) | (w[str + 3] << 24);
1546
+ h = s.ins_h = ((Math.imul(value, 66521) + 66521) >>> 16) & s.hash_mask;
1547
+ }
1548
+ const hash_head = s.prev[str & s.w_mask] = s.head[h];
1549
+ s.head[h] = str;
1550
+ return hash_head;
1551
+ };
1528
1552
 
1529
1553
 
1530
1554
  /* =========================================================================
@@ -1798,7 +1822,20 @@ const fill_window = (s) => {
1798
1822
  s.lookahead += n;
1799
1823
 
1800
1824
  /* Initialize the hash value now that we have some input: */
1801
- if (s.lookahead + s.insert >= MIN_MATCH) {
1825
+ if (!s.legacy_hash) {
1826
+ /* The 4-byte hash reads one extra byte, so it needs one more available. */
1827
+ if (s.lookahead + s.insert > MIN_MATCH) {
1828
+ str = s.strstart - s.insert;
1829
+ while (s.insert) {
1830
+ INSERT_STRING(s, str);
1831
+ str++;
1832
+ s.insert--;
1833
+ if (s.lookahead + s.insert <= MIN_MATCH) {
1834
+ break;
1835
+ }
1836
+ }
1837
+ }
1838
+ } else if (s.lookahead + s.insert >= MIN_MATCH) {
1802
1839
  str = s.strstart - s.insert;
1803
1840
  s.ins_h = s.window[str];
1804
1841
 
@@ -1808,11 +1845,7 @@ const fill_window = (s) => {
1808
1845
  // Call update_hash() MIN_MATCH-3 more times
1809
1846
  //#endif
1810
1847
  while (s.insert) {
1811
- /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
1812
- s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);
1813
-
1814
- s.prev[str & s.w_mask] = s.head[s.ins_h];
1815
- s.head[s.ins_h] = str;
1848
+ INSERT_STRING(s, str);
1816
1849
  str++;
1817
1850
  s.insert--;
1818
1851
  if (s.lookahead + s.insert < MIN_MATCH) {
@@ -2110,11 +2143,7 @@ const deflate_fast = (s, flush) => {
2110
2143
  */
2111
2144
  hash_head = 0/*NIL*/;
2112
2145
  if (s.lookahead >= MIN_MATCH) {
2113
- /*** INSERT_STRING(s, s.strstart, hash_head); ***/
2114
- s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
2115
- hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
2116
- s.head[s.ins_h] = s.strstart;
2117
- /***/
2146
+ hash_head = INSERT_STRING(s, s.strstart);
2118
2147
  }
2119
2148
 
2120
2149
  /* Find the longest match, discarding those <= prev_length.
@@ -2144,11 +2173,7 @@ const deflate_fast = (s, flush) => {
2144
2173
  s.match_length--; /* string at strstart already in table */
2145
2174
  do {
2146
2175
  s.strstart++;
2147
- /*** INSERT_STRING(s, s.strstart, hash_head); ***/
2148
- s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
2149
- hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
2150
- s.head[s.ins_h] = s.strstart;
2151
- /***/
2176
+ hash_head = INSERT_STRING(s, s.strstart);
2152
2177
  /* strstart never exceeds WSIZE-MAX_MATCH, so there are
2153
2178
  * always MIN_MATCH bytes ahead.
2154
2179
  */
@@ -2158,16 +2183,18 @@ const deflate_fast = (s, flush) => {
2158
2183
  {
2159
2184
  s.strstart += s.match_length;
2160
2185
  s.match_length = 0;
2161
- s.ins_h = s.window[s.strstart];
2162
- /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */
2163
- s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);
2186
+ if (s.legacy_hash) {
2187
+ s.ins_h = s.window[s.strstart];
2188
+ /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */
2189
+ s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);
2164
2190
 
2165
2191
  //#if MIN_MATCH != 3
2166
2192
  // Call UPDATE_HASH() MIN_MATCH-3 more times
2167
2193
  //#endif
2168
- /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
2169
- * matter since it will be recomputed at next deflate call.
2170
- */
2194
+ /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
2195
+ * matter since it will be recomputed at next deflate call.
2196
+ */
2197
+ }
2171
2198
  }
2172
2199
  } else {
2173
2200
  /* No match, output a literal byte */
@@ -2240,11 +2267,7 @@ const deflate_slow = (s, flush) => {
2240
2267
  */
2241
2268
  hash_head = 0/*NIL*/;
2242
2269
  if (s.lookahead >= MIN_MATCH) {
2243
- /*** INSERT_STRING(s, s.strstart, hash_head); ***/
2244
- s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
2245
- hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
2246
- s.head[s.ins_h] = s.strstart;
2247
- /***/
2270
+ hash_head = INSERT_STRING(s, s.strstart);
2248
2271
  }
2249
2272
 
2250
2273
  /* Find the longest match, discarding those <= prev_length.
@@ -2292,11 +2315,7 @@ const deflate_slow = (s, flush) => {
2292
2315
  s.prev_length -= 2;
2293
2316
  do {
2294
2317
  if (++s.strstart <= max_insert) {
2295
- /*** INSERT_STRING(s, s.strstart, hash_head); ***/
2296
- s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
2297
- hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
2298
- s.head[s.ins_h] = s.strstart;
2299
- /***/
2318
+ hash_head = INSERT_STRING(s, s.strstart);
2300
2319
  }
2301
2320
  } while (--s.prev_length !== 0);
2302
2321
  s.match_available = 0;
@@ -2621,6 +2640,7 @@ function DeflateState() {
2621
2640
  this.head = null; /* Heads of the hash chains or NIL. */
2622
2641
 
2623
2642
  this.ins_h = 0; /* hash index of string to be inserted */
2643
+ this.legacy_hash = 0; /* use classic zlib hash instead of default ANZAC++ */
2624
2644
  this.hash_size = 0; /* number of elements in hash table */
2625
2645
  this.hash_bits = 0; /* log2(hash_size) */
2626
2646
  this.hash_mask = 0; /* hash_size-1 */
@@ -2843,7 +2863,7 @@ const deflateSetHeader = (strm, head) => {
2843
2863
  };
2844
2864
 
2845
2865
 
2846
- const deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {
2866
+ const deflateInit2 = (strm, level, method, windowBits, memLevel, strategy, legacyHash) => {
2847
2867
 
2848
2868
  if (!strm) { // === Z_NULL
2849
2869
  return Z_STREAM_ERROR$2;
@@ -2889,7 +2909,13 @@ const deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {
2889
2909
  s.w_size = 1 << s.w_bits;
2890
2910
  s.w_mask = s.w_size - 1;
2891
2911
 
2912
+ s.legacy_hash = legacyHash ? 1 : 0;
2913
+
2892
2914
  s.hash_bits = memLevel + 7;
2915
+ /* ANZAC++ hash needs >= 15 hash bits to span its 4 read bytes. */
2916
+ if (!s.legacy_hash && s.hash_bits < 15) {
2917
+ s.hash_bits = 15;
2918
+ }
2893
2919
  s.hash_size = 1 << s.hash_bits;
2894
2920
  s.hash_mask = s.hash_size - 1;
2895
2921
  s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);
@@ -2981,7 +3007,7 @@ const deflate$2 = (strm, flush) => {
2981
3007
  if (!strm.output ||
2982
3008
  (strm.avail_in !== 0 && !strm.input) ||
2983
3009
  (s.status === FINISH_STATE && flush !== Z_FINISH$3)) {
2984
- return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR$1 : Z_STREAM_ERROR$2);
3010
+ return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR$2 : Z_STREAM_ERROR$2);
2985
3011
  }
2986
3012
 
2987
3013
  const old_flush = s.last_flush;
@@ -3007,12 +3033,12 @@ const deflate$2 = (strm, flush) => {
3007
3033
  */
3008
3034
  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&
3009
3035
  flush !== Z_FINISH$3) {
3010
- return err(strm, Z_BUF_ERROR$1);
3036
+ return err(strm, Z_BUF_ERROR$2);
3011
3037
  }
3012
3038
 
3013
3039
  /* User must not provide more input after the first FINISH: */
3014
3040
  if (s.status === FINISH_STATE && strm.avail_in !== 0) {
3015
- return err(strm, Z_BUF_ERROR$1);
3041
+ return err(strm, Z_BUF_ERROR$2);
3016
3042
  }
3017
3043
 
3018
3044
  /* Write the header */
@@ -3393,12 +3419,7 @@ const deflateSetDictionary = (strm, dictionary) => {
3393
3419
  let str = s.strstart;
3394
3420
  let n = s.lookahead - (MIN_MATCH - 1);
3395
3421
  do {
3396
- /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
3397
- s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);
3398
-
3399
- s.prev[str & s.w_mask] = s.head[s.ins_h];
3400
-
3401
- s.head[s.ins_h] = str;
3422
+ INSERT_STRING(s, str);
3402
3423
  str++;
3403
3424
  } while (--n);
3404
3425
  s.strstart = str;
@@ -3522,7 +3543,7 @@ const _utf8len = new Uint8Array(256);
3522
3543
  for (let q = 0; q < 256; q++) {
3523
3544
  _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);
3524
3545
  }
3525
- _utf8len[254] = _utf8len[254] = 1; // Invalid sequence start
3546
+ _utf8len[254] = _utf8len[255] = 1; // Invalid sequence start
3526
3547
 
3527
3548
 
3528
3549
  // convert string to array (typed, when possible)
@@ -3743,6 +3764,15 @@ const {
3743
3764
 
3744
3765
  /* ===========================================================================*/
3745
3766
 
3767
+ const defaultOptions$1 = {
3768
+ level: Z_DEFAULT_COMPRESSION,
3769
+ method: Z_DEFLATED$1,
3770
+ chunkSize: 16384,
3771
+ windowBits: 15,
3772
+ memLevel: 8,
3773
+ strategy: Z_DEFAULT_STRATEGY,
3774
+ legacyHash: true
3775
+ };
3746
3776
 
3747
3777
  /**
3748
3778
  * class Deflate
@@ -3798,6 +3828,10 @@ const {
3798
3828
  * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
3799
3829
  * for more information on these.
3800
3830
  *
3831
+ * - `legacyHash` (Boolean) - use the classic zlib hash (default), which matches
3832
+ * canonical zlib output byte-for-byte. Set to `false` to use the faster
3833
+ * ANZAC++ hash, which matches recent (chromium) node.js output instead.
3834
+ *
3801
3835
  * Additional options, for internal needs:
3802
3836
  *
3803
3837
  * - `chunkSize` - size of generated data chunks (16K by default)
@@ -3830,14 +3864,7 @@ const {
3830
3864
  * ```
3831
3865
  **/
3832
3866
  function Deflate$1(options) {
3833
- this.options = common.assign({
3834
- level: Z_DEFAULT_COMPRESSION,
3835
- method: Z_DEFLATED$1,
3836
- chunkSize: 16384,
3837
- windowBits: 15,
3838
- memLevel: 8,
3839
- strategy: Z_DEFAULT_STRATEGY
3840
- }, options || {});
3867
+ this.options = common.assign({}, defaultOptions$1, options || {});
3841
3868
 
3842
3869
  let opt = this.options;
3843
3870
 
@@ -3863,7 +3890,8 @@ function Deflate$1(options) {
3863
3890
  opt.method,
3864
3891
  opt.windowBits,
3865
3892
  opt.memLevel,
3866
- opt.strategy
3893
+ opt.strategy,
3894
+ opt.legacyHash
3867
3895
  );
3868
3896
 
3869
3897
  if (status !== Z_OK$2) {
@@ -4486,7 +4514,7 @@ const lbase = new Uint16Array([ /* Length codes 257..285 base */
4486
4514
 
4487
4515
  const lext = new Uint8Array([ /* Length codes 257..285 extra */
4488
4516
  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
4489
- 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78
4517
+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 199, 75
4490
4518
  ]);
4491
4519
 
4492
4520
  const dbase = new Uint16Array([ /* Distance codes 0..29 base */
@@ -4823,7 +4851,7 @@ const DISTS = 2;
4823
4851
 
4824
4852
  const {
4825
4853
  Z_FINISH: Z_FINISH$1, Z_BLOCK, Z_TREES,
4826
- Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR: Z_MEM_ERROR$1, Z_BUF_ERROR,
4854
+ Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR: Z_MEM_ERROR$1, Z_BUF_ERROR: Z_BUF_ERROR$1,
4827
4855
  Z_DEFLATED
4828
4856
  } = constants$2;
4829
4857
 
@@ -5133,11 +5161,14 @@ const updatewindow = (strm, src, end, copy) => {
5133
5161
 
5134
5162
  /* if it hasn't been done already, allocate space for the window */
5135
5163
  if (state.window === null) {
5164
+ state.window = new Uint8Array(1 << state.wbits);
5165
+ }
5166
+
5167
+ /* if window not in use yet, initialize */
5168
+ if (state.wsize === 0) {
5136
5169
  state.wsize = 1 << state.wbits;
5137
5170
  state.wnext = 0;
5138
5171
  state.whave = 0;
5139
-
5140
- state.window = new Uint8Array(state.wsize);
5141
5172
  }
5142
5173
 
5143
5174
  /* copy state->wsize or less output bytes into the circular window */
@@ -6263,7 +6294,7 @@ const inflate$2 = (strm, flush) => {
6263
6294
  (state.mode === TYPE ? 128 : 0) +
6264
6295
  (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
6265
6296
  if (((_in === 0 && _out === 0) || flush === Z_FINISH$1) && ret === Z_OK$1) {
6266
- ret = Z_BUF_ERROR;
6297
+ ret = Z_BUF_ERROR$1;
6267
6298
  }
6268
6299
  return ret;
6269
6300
  };
@@ -6435,11 +6466,16 @@ const toString = Object.prototype.toString;
6435
6466
 
6436
6467
  const {
6437
6468
  Z_NO_FLUSH, Z_FINISH,
6438
- Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR
6469
+ Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR, Z_BUF_ERROR
6439
6470
  } = constants$2;
6440
6471
 
6441
6472
  /* ===========================================================================*/
6442
6473
 
6474
+ const defaultOptions = {
6475
+ chunkSize: 1024 * 64,
6476
+ windowBits: 15,
6477
+ to: ''
6478
+ };
6443
6479
 
6444
6480
  /**
6445
6481
  * class Inflate
@@ -6519,11 +6555,7 @@ const {
6519
6555
  * ```
6520
6556
  **/
6521
6557
  function Inflate$1(options) {
6522
- this.options = common.assign({
6523
- chunkSize: 1024 * 64,
6524
- windowBits: 15,
6525
- to: ''
6526
- }, options || {});
6558
+ this.options = common.assign({}, defaultOptions, options || {});
6527
6559
 
6528
6560
  const opt = this.options;
6529
6561
 
@@ -6654,11 +6686,19 @@ Inflate$1.prototype.push = function (data, flush_mode) {
6654
6686
  }
6655
6687
  }
6656
6688
 
6657
- // Skip snyc markers if more data follows and not raw mode
6689
+ // Only the gzip format defines concatenated members (RFC 1952: a gzip file
6690
+ // is "a series of members"). A zlib stream (RFC 1950) ends after its
6691
+ // ADLER32, and a raw DEFLATE stream (RFC 1951) ends after its final block -
6692
+ // neither format allows anything to follow, so bytes after the end are not
6693
+ // ours to interpret and must be left in the input. Restart decoding only
6694
+ // for a gzip member: `state.flags` is non-zero only once a gzip header has
6695
+ // actually been decoded (it stays 0 for a zlib member, even when the format
6696
+ // was auto-detected and the gzip bit of `wrap` is set). A trailing zero
6697
+ // byte is padding, not the start of a member (no member can begin with 0).
6658
6698
  while (strm.avail_in > 0 &&
6659
6699
  status === Z_STREAM_END &&
6660
- strm.state.wrap > 0 &&
6661
- data[strm.next_in] !== 0)
6700
+ (strm.state.wrap & 2) && strm.state.flags !== 0 &&
6701
+ strm.input[strm.next_in] !== 0)
6662
6702
  {
6663
6703
  inflate_1$2.inflateReset(strm);
6664
6704
  status = inflate_1$2.inflate(strm, _flush_mode);
@@ -6679,7 +6719,9 @@ Inflate$1.prototype.push = function (data, flush_mode) {
6679
6719
  last_avail_out = strm.avail_out;
6680
6720
 
6681
6721
  if (strm.next_out) {
6682
- if (strm.avail_out === 0 || status === Z_STREAM_END) {
6722
+ // Flush output if buffer is full, stream ended, or an explicit flush was
6723
+ // requested (e.g. Z_SYNC_FLUSH) - to push out the tail, same as node's zlib.
6724
+ if (strm.avail_out === 0 || status === Z_STREAM_END || _flush_mode > 0) {
6683
6725
 
6684
6726
  if (this.options.to === 'string') {
6685
6727
 
@@ -6697,12 +6739,22 @@ Inflate$1.prototype.push = function (data, flush_mode) {
6697
6739
 
6698
6740
  } else {
6699
6741
  this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));
6742
+
6743
+ // Force a fresh output buffer on next iteration / next push, so the
6744
+ // already emitted tail is not sent again.
6745
+ strm.avail_out = 0;
6746
+ strm.next_out = 0;
6700
6747
  }
6701
6748
  }
6702
6749
  }
6703
6750
 
6704
- // Must repeat iteration if out buffer is full
6705
- if (status === Z_OK && last_avail_out === 0) continue;
6751
+ // A full output buffer means there may be more to produce - allocate a new
6752
+ // one and call inflate again. The status depends on the flush mode: with
6753
+ // Z_NO_FLUSH a full buffer is reported as Z_OK, but with Z_FINISH the same
6754
+ // situation is reported as Z_BUF_ERROR ("could not make progress now",
6755
+ // non-fatal) even though output is still pending. Both must continue; the
6756
+ // distinction that matters is purely "was the output buffer exhausted".
6757
+ if ((status === Z_OK || status === Z_BUF_ERROR) && last_avail_out === 0) continue;
6706
6758
 
6707
6759
  // Finalize if end of stream reached.
6708
6760
  if (status === Z_STREAM_END) {
@@ -6712,7 +6764,23 @@ Inflate$1.prototype.push = function (data, flush_mode) {
6712
6764
  return true;
6713
6765
  }
6714
6766
 
6715
- if (strm.avail_in === 0) break;
6767
+ if (strm.avail_in === 0) {
6768
+ // Input is exhausted. If the caller declared this the end of the stream
6769
+ // (Z_FINISH) but we never saw Z_STREAM_END, the compressed data ended
6770
+ // before its terminating marker - i.e. it is truncated/incomplete. That
6771
+ // is an error: returning the partial output as success would be
6772
+ // indistinguishable from a complete decode, hiding the data loss. Report
6773
+ // it via Z_BUF_ERROR. (Reached only when the output buffer still had room
6774
+ // - a full buffer is handled by the `continue` above - so this genuinely
6775
+ // means "ran out of input", not "ran out of output".)
6776
+ if (_flush_mode === Z_FINISH) {
6777
+ status = inflate_1$2.inflateEnd(this.strm);
6778
+ this.onEnd(status === Z_OK ? Z_BUF_ERROR : status);
6779
+ this.ended = true;
6780
+ return false;
6781
+ }
6782
+ break;
6783
+ }
6716
6784
  }
6717
6785
 
6718
6786
  return true;
@@ -6798,7 +6866,7 @@ Inflate$1.prototype.onEnd = function (status) {
6798
6866
  function inflate$1(input, options) {
6799
6867
  const inflator = new Inflate$1(options);
6800
6868
 
6801
- inflator.push(input);
6869
+ inflator.push(input, true);
6802
6870
 
6803
6871
  // That will never happens, if you don't cheat with options :)
6804
6872
  if (inflator.err) throw inflator.msg || messages[inflator.err];