@marshulll/openclaw-wecom 0.1.6 → 0.1.8

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 (677) hide show
  1. package/README.en.md +3 -0
  2. package/README.md +3 -0
  3. package/README.zh.md +3 -0
  4. package/docs/INSTALL.md +3 -0
  5. package/node_modules/fast-xml-parser/CHANGELOG.md +606 -0
  6. package/node_modules/fast-xml-parser/LICENSE +21 -0
  7. package/node_modules/fast-xml-parser/README.md +237 -0
  8. package/node_modules/fast-xml-parser/package.json +72 -0
  9. package/node_modules/fast-xml-parser/src/cli/cli.js +93 -0
  10. package/node_modules/fast-xml-parser/src/cli/man.js +12 -0
  11. package/node_modules/fast-xml-parser/src/cli/read.js +92 -0
  12. package/node_modules/fast-xml-parser/src/fxp.d.ts +418 -0
  13. package/node_modules/fast-xml-parser/src/fxp.js +11 -0
  14. package/node_modules/fast-xml-parser/src/ignoreAttributes.js +20 -0
  15. package/node_modules/fast-xml-parser/src/util.js +72 -0
  16. package/node_modules/fast-xml-parser/src/v5/CharsSymbol.js +16 -0
  17. package/node_modules/fast-xml-parser/src/v5/EntitiesParser.js +107 -0
  18. package/node_modules/fast-xml-parser/src/v5/OptionsBuilder.js +64 -0
  19. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/BaseOutputBuilder.js +71 -0
  20. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsArrBuilder.js +103 -0
  21. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsMinArrBuilder.js +102 -0
  22. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsObjBuilder.js +156 -0
  23. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/ParserOptionsBuilder.js +99 -0
  24. package/node_modules/fast-xml-parser/src/v5/Report.js +0 -0
  25. package/node_modules/fast-xml-parser/src/v5/TagPath.js +81 -0
  26. package/node_modules/fast-xml-parser/src/v5/TagPathMatcher.js +15 -0
  27. package/node_modules/fast-xml-parser/src/v5/XMLParser.js +85 -0
  28. package/node_modules/fast-xml-parser/src/v5/Xml2JsParser.js +237 -0
  29. package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +216 -0
  30. package/node_modules/fast-xml-parser/src/v5/XmlSpecialTagsReader.js +118 -0
  31. package/node_modules/fast-xml-parser/src/v5/inputSource/BufferSource.js +118 -0
  32. package/node_modules/fast-xml-parser/src/v5/inputSource/StringSource.js +123 -0
  33. package/node_modules/fast-xml-parser/src/v5/valueParsers/EntitiesParser.js +107 -0
  34. package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParser.js +23 -0
  35. package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParserExt.js +20 -0
  36. package/node_modules/fast-xml-parser/src/v5/valueParsers/currency.js +40 -0
  37. package/node_modules/fast-xml-parser/src/v5/valueParsers/join.js +14 -0
  38. package/node_modules/fast-xml-parser/src/v5/valueParsers/number.js +16 -0
  39. package/node_modules/fast-xml-parser/src/v5/valueParsers/trim.js +8 -0
  40. package/node_modules/fast-xml-parser/src/v6/CharsSymbol.js +16 -0
  41. package/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +104 -0
  42. package/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +61 -0
  43. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +69 -0
  44. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +103 -0
  45. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +100 -0
  46. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +154 -0
  47. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +94 -0
  48. package/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
  49. package/node_modules/fast-xml-parser/src/v6/TagPath.js +81 -0
  50. package/node_modules/fast-xml-parser/src/v6/TagPathMatcher.js +13 -0
  51. package/node_modules/fast-xml-parser/src/v6/XMLParser.js +83 -0
  52. package/node_modules/fast-xml-parser/src/v6/Xml2JsParser.js +235 -0
  53. package/node_modules/fast-xml-parser/src/v6/XmlPartReader.js +210 -0
  54. package/node_modules/fast-xml-parser/src/v6/XmlSpecialTagsReader.js +111 -0
  55. package/node_modules/fast-xml-parser/src/v6/inputSource/BufferSource.js +116 -0
  56. package/node_modules/fast-xml-parser/src/v6/inputSource/StringSource.js +121 -0
  57. package/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +105 -0
  58. package/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParser.js +22 -0
  59. package/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParserExt.js +19 -0
  60. package/node_modules/fast-xml-parser/src/v6/valueParsers/currency.js +38 -0
  61. package/node_modules/fast-xml-parser/src/v6/valueParsers/join.js +13 -0
  62. package/node_modules/fast-xml-parser/src/v6/valueParsers/number.js +14 -0
  63. package/node_modules/fast-xml-parser/src/v6/valueParsers/trim.js +6 -0
  64. package/node_modules/fast-xml-parser/src/validator.js +425 -0
  65. package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +286 -0
  66. package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +135 -0
  67. package/node_modules/fast-xml-parser/src/xmlbuilder/prettifyJs2Xml.js +0 -0
  68. package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +153 -0
  69. package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +48 -0
  70. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +606 -0
  71. package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +58 -0
  72. package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +113 -0
  73. package/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +25 -0
  74. package/node_modules/strnum/.vscode/launch.json +25 -0
  75. package/node_modules/strnum/CHANGELOG.md +22 -0
  76. package/node_modules/strnum/LICENSE +21 -0
  77. package/node_modules/strnum/README.md +97 -0
  78. package/node_modules/strnum/package.json +30 -0
  79. package/node_modules/strnum/strnum.js +111 -0
  80. package/node_modules/strnum/strnum.test.js +165 -0
  81. package/node_modules/zod/LICENSE +21 -0
  82. package/node_modules/zod/README.md +208 -0
  83. package/node_modules/zod/index.cjs +33 -0
  84. package/node_modules/zod/index.d.cts +4 -0
  85. package/node_modules/zod/index.d.ts +4 -0
  86. package/node_modules/zod/index.js +4 -0
  87. package/node_modules/zod/package.json +118 -0
  88. package/node_modules/zod/src/index.ts +4 -0
  89. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  90. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  91. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  92. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  93. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  94. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  95. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  96. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  97. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  98. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  99. package/node_modules/zod/src/v3/errors.ts +13 -0
  100. package/node_modules/zod/src/v3/external.ts +6 -0
  101. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  102. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  103. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  104. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  105. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  106. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  107. package/node_modules/zod/src/v3/index.ts +4 -0
  108. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  109. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  110. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  111. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  112. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  113. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  114. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  115. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  116. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  117. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  118. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  119. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  120. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  121. package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
  122. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  123. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  124. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  125. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  126. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  127. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  128. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  129. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  130. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  131. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  132. package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
  133. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  134. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  135. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  136. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  137. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  138. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  139. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  140. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  141. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  142. package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
  143. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  144. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  145. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  146. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  147. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  148. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  149. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  150. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  151. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  152. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  153. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  154. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  155. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  156. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  157. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  158. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  159. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  160. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  161. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  162. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  163. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  164. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  165. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  166. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  167. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  168. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  169. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  170. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  171. package/node_modules/zod/src/v3/types.ts +5136 -0
  172. package/node_modules/zod/src/v4/classic/checks.ts +30 -0
  173. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  174. package/node_modules/zod/src/v4/classic/compat.ts +66 -0
  175. package/node_modules/zod/src/v4/classic/errors.ts +75 -0
  176. package/node_modules/zod/src/v4/classic/external.ts +50 -0
  177. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  178. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  179. package/node_modules/zod/src/v4/classic/parse.ts +33 -0
  180. package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
  181. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  182. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  183. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  184. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  185. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  186. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  187. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  188. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  189. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
  190. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  191. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  192. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  193. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  194. package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  195. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
  196. package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
  197. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  198. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
  199. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  200. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
  201. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  202. package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
  203. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
  204. package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
  205. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  206. package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
  207. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  208. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  209. package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  210. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  211. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
  212. package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  213. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  214. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  215. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
  216. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  217. package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
  218. package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
  219. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
  220. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
  221. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  222. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
  223. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  224. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
  225. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  226. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  227. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  228. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  229. package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
  230. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
  231. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
  232. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  233. package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
  234. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  235. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
  236. package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
  237. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
  238. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
  239. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
  240. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
  241. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  242. package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
  243. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  244. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  245. package/node_modules/zod/src/v4/core/api.ts +1594 -0
  246. package/node_modules/zod/src/v4/core/checks.ts +1283 -0
  247. package/node_modules/zod/src/v4/core/config.ts +15 -0
  248. package/node_modules/zod/src/v4/core/core.ts +134 -0
  249. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  250. package/node_modules/zod/src/v4/core/errors.ts +424 -0
  251. package/node_modules/zod/src/v4/core/function.ts +176 -0
  252. package/node_modules/zod/src/v4/core/index.ts +15 -0
  253. package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
  254. package/node_modules/zod/src/v4/core/parse.ts +94 -0
  255. package/node_modules/zod/src/v4/core/regexes.ts +135 -0
  256. package/node_modules/zod/src/v4/core/registries.ts +96 -0
  257. package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
  258. package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
  259. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  260. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  261. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  262. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  263. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  264. package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
  265. package/node_modules/zod/src/v4/core/util.ts +775 -0
  266. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  267. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  268. package/node_modules/zod/src/v4/index.ts +4 -0
  269. package/node_modules/zod/src/v4/locales/ar.ts +125 -0
  270. package/node_modules/zod/src/v4/locales/az.ts +121 -0
  271. package/node_modules/zod/src/v4/locales/be.ts +184 -0
  272. package/node_modules/zod/src/v4/locales/ca.ts +127 -0
  273. package/node_modules/zod/src/v4/locales/cs.ts +142 -0
  274. package/node_modules/zod/src/v4/locales/de.ts +124 -0
  275. package/node_modules/zod/src/v4/locales/en.ts +127 -0
  276. package/node_modules/zod/src/v4/locales/eo.ts +125 -0
  277. package/node_modules/zod/src/v4/locales/es.ts +125 -0
  278. package/node_modules/zod/src/v4/locales/fa.ts +134 -0
  279. package/node_modules/zod/src/v4/locales/fi.ts +131 -0
  280. package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  281. package/node_modules/zod/src/v4/locales/fr.ts +124 -0
  282. package/node_modules/zod/src/v4/locales/he.ts +125 -0
  283. package/node_modules/zod/src/v4/locales/hu.ts +126 -0
  284. package/node_modules/zod/src/v4/locales/id.ts +125 -0
  285. package/node_modules/zod/src/v4/locales/index.ts +39 -0
  286. package/node_modules/zod/src/v4/locales/it.ts +125 -0
  287. package/node_modules/zod/src/v4/locales/ja.ts +122 -0
  288. package/node_modules/zod/src/v4/locales/kh.ts +126 -0
  289. package/node_modules/zod/src/v4/locales/ko.ts +131 -0
  290. package/node_modules/zod/src/v4/locales/mk.ts +127 -0
  291. package/node_modules/zod/src/v4/locales/ms.ts +124 -0
  292. package/node_modules/zod/src/v4/locales/nl.ts +126 -0
  293. package/node_modules/zod/src/v4/locales/no.ts +124 -0
  294. package/node_modules/zod/src/v4/locales/ota.ts +125 -0
  295. package/node_modules/zod/src/v4/locales/pl.ts +126 -0
  296. package/node_modules/zod/src/v4/locales/ps.ts +133 -0
  297. package/node_modules/zod/src/v4/locales/pt.ts +123 -0
  298. package/node_modules/zod/src/v4/locales/ru.ts +184 -0
  299. package/node_modules/zod/src/v4/locales/sl.ts +126 -0
  300. package/node_modules/zod/src/v4/locales/sv.ts +127 -0
  301. package/node_modules/zod/src/v4/locales/ta.ts +125 -0
  302. package/node_modules/zod/src/v4/locales/th.ts +126 -0
  303. package/node_modules/zod/src/v4/locales/tr.ts +121 -0
  304. package/node_modules/zod/src/v4/locales/ua.ts +126 -0
  305. package/node_modules/zod/src/v4/locales/ur.ts +126 -0
  306. package/node_modules/zod/src/v4/locales/vi.ts +125 -0
  307. package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  308. package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  309. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  310. package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
  311. package/node_modules/zod/src/v4/mini/external.ts +40 -0
  312. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  313. package/node_modules/zod/src/v4/mini/iso.ts +62 -0
  314. package/node_modules/zod/src/v4/mini/parse.ts +1 -0
  315. package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
  316. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  317. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  318. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  319. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  320. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  321. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  322. package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
  323. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  324. package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
  325. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  326. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  327. package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
  328. package/node_modules/zod/src/v4-mini/index.ts +1 -0
  329. package/node_modules/zod/v3/ZodError.cjs +138 -0
  330. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  331. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  332. package/node_modules/zod/v3/ZodError.js +133 -0
  333. package/node_modules/zod/v3/errors.cjs +17 -0
  334. package/node_modules/zod/v3/errors.d.cts +5 -0
  335. package/node_modules/zod/v3/errors.d.ts +5 -0
  336. package/node_modules/zod/v3/errors.js +9 -0
  337. package/node_modules/zod/v3/external.cjs +22 -0
  338. package/node_modules/zod/v3/external.d.cts +6 -0
  339. package/node_modules/zod/v3/external.d.ts +6 -0
  340. package/node_modules/zod/v3/external.js +6 -0
  341. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  342. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  343. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  344. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  345. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  346. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  347. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  348. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  349. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  350. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  351. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  352. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  353. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  354. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  355. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  356. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  357. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  358. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  359. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  360. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  361. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  362. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  363. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  364. package/node_modules/zod/v3/helpers/util.js +133 -0
  365. package/node_modules/zod/v3/index.cjs +33 -0
  366. package/node_modules/zod/v3/index.d.cts +4 -0
  367. package/node_modules/zod/v3/index.d.ts +4 -0
  368. package/node_modules/zod/v3/index.js +4 -0
  369. package/node_modules/zod/v3/locales/en.cjs +111 -0
  370. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  371. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  372. package/node_modules/zod/v3/locales/en.js +109 -0
  373. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  374. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  375. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  376. package/node_modules/zod/v3/standard-schema.js +1 -0
  377. package/node_modules/zod/v3/types.cjs +3775 -0
  378. package/node_modules/zod/v3/types.d.cts +1031 -0
  379. package/node_modules/zod/v3/types.d.ts +1031 -0
  380. package/node_modules/zod/v3/types.js +3693 -0
  381. package/node_modules/zod/v4/classic/checks.cjs +32 -0
  382. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  383. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  384. package/node_modules/zod/v4/classic/checks.js +1 -0
  385. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  386. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  387. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  388. package/node_modules/zod/v4/classic/coerce.js +17 -0
  389. package/node_modules/zod/v4/classic/compat.cjs +57 -0
  390. package/node_modules/zod/v4/classic/compat.d.cts +46 -0
  391. package/node_modules/zod/v4/classic/compat.d.ts +46 -0
  392. package/node_modules/zod/v4/classic/compat.js +27 -0
  393. package/node_modules/zod/v4/classic/errors.cjs +67 -0
  394. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  395. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  396. package/node_modules/zod/v4/classic/errors.js +41 -0
  397. package/node_modules/zod/v4/classic/external.cjs +70 -0
  398. package/node_modules/zod/v4/classic/external.d.cts +13 -0
  399. package/node_modules/zod/v4/classic/external.d.ts +13 -0
  400. package/node_modules/zod/v4/classic/external.js +18 -0
  401. package/node_modules/zod/v4/classic/index.cjs +33 -0
  402. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  403. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  404. package/node_modules/zod/v4/classic/index.js +4 -0
  405. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  406. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  407. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  408. package/node_modules/zod/v4/classic/iso.js +30 -0
  409. package/node_modules/zod/v4/classic/parse.cjs +32 -0
  410. package/node_modules/zod/v4/classic/parse.d.cts +23 -0
  411. package/node_modules/zod/v4/classic/parse.d.ts +23 -0
  412. package/node_modules/zod/v4/classic/parse.js +6 -0
  413. package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
  414. package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
  415. package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
  416. package/node_modules/zod/v4/classic/schemas.js +1006 -0
  417. package/node_modules/zod/v4/core/api.cjs +1039 -0
  418. package/node_modules/zod/v4/core/api.d.cts +284 -0
  419. package/node_modules/zod/v4/core/api.d.ts +284 -0
  420. package/node_modules/zod/v4/core/api.js +906 -0
  421. package/node_modules/zod/v4/core/checks.cjs +591 -0
  422. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  423. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  424. package/node_modules/zod/v4/core/checks.js +565 -0
  425. package/node_modules/zod/v4/core/core.cjs +67 -0
  426. package/node_modules/zod/v4/core/core.d.cts +49 -0
  427. package/node_modules/zod/v4/core/core.d.ts +49 -0
  428. package/node_modules/zod/v4/core/core.js +61 -0
  429. package/node_modules/zod/v4/core/doc.cjs +39 -0
  430. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  431. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  432. package/node_modules/zod/v4/core/doc.js +35 -0
  433. package/node_modules/zod/v4/core/errors.cjs +226 -0
  434. package/node_modules/zod/v4/core/errors.d.cts +208 -0
  435. package/node_modules/zod/v4/core/errors.d.ts +208 -0
  436. package/node_modules/zod/v4/core/errors.js +195 -0
  437. package/node_modules/zod/v4/core/function.cjs +102 -0
  438. package/node_modules/zod/v4/core/function.d.cts +52 -0
  439. package/node_modules/zod/v4/core/function.d.ts +52 -0
  440. package/node_modules/zod/v4/core/function.js +75 -0
  441. package/node_modules/zod/v4/core/index.cjs +44 -0
  442. package/node_modules/zod/v4/core/index.d.cts +15 -0
  443. package/node_modules/zod/v4/core/index.d.ts +15 -0
  444. package/node_modules/zod/v4/core/index.js +15 -0
  445. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  446. package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
  447. package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
  448. package/node_modules/zod/v4/core/json-schema.js +1 -0
  449. package/node_modules/zod/v4/core/parse.cjs +87 -0
  450. package/node_modules/zod/v4/core/parse.d.cts +25 -0
  451. package/node_modules/zod/v4/core/parse.d.ts +25 -0
  452. package/node_modules/zod/v4/core/parse.js +57 -0
  453. package/node_modules/zod/v4/core/regexes.cjs +103 -0
  454. package/node_modules/zod/v4/core/regexes.d.cts +62 -0
  455. package/node_modules/zod/v4/core/regexes.d.ts +62 -0
  456. package/node_modules/zod/v4/core/regexes.js +95 -0
  457. package/node_modules/zod/v4/core/registries.cjs +56 -0
  458. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  459. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  460. package/node_modules/zod/v4/core/registries.js +51 -0
  461. package/node_modules/zod/v4/core/schemas.cjs +1748 -0
  462. package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
  463. package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
  464. package/node_modules/zod/v4/core/schemas.js +1717 -0
  465. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  466. package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
  467. package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
  468. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  469. package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
  470. package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
  471. package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
  472. package/node_modules/zod/v4/core/to-json-schema.js +849 -0
  473. package/node_modules/zod/v4/core/util.cjs +539 -0
  474. package/node_modules/zod/v4/core/util.d.cts +183 -0
  475. package/node_modules/zod/v4/core/util.d.ts +183 -0
  476. package/node_modules/zod/v4/core/util.js +493 -0
  477. package/node_modules/zod/v4/core/versions.cjs +8 -0
  478. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  479. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  480. package/node_modules/zod/v4/core/versions.js +5 -0
  481. package/node_modules/zod/v4/index.cjs +22 -0
  482. package/node_modules/zod/v4/index.d.cts +3 -0
  483. package/node_modules/zod/v4/index.d.ts +3 -0
  484. package/node_modules/zod/v4/index.js +3 -0
  485. package/node_modules/zod/v4/locales/ar.cjs +142 -0
  486. package/node_modules/zod/v4/locales/ar.d.cts +4 -0
  487. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  488. package/node_modules/zod/v4/locales/ar.js +116 -0
  489. package/node_modules/zod/v4/locales/az.cjs +141 -0
  490. package/node_modules/zod/v4/locales/az.d.cts +4 -0
  491. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  492. package/node_modules/zod/v4/locales/az.js +115 -0
  493. package/node_modules/zod/v4/locales/be.cjs +190 -0
  494. package/node_modules/zod/v4/locales/be.d.cts +4 -0
  495. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  496. package/node_modules/zod/v4/locales/be.js +164 -0
  497. package/node_modules/zod/v4/locales/ca.cjs +144 -0
  498. package/node_modules/zod/v4/locales/ca.d.cts +4 -0
  499. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  500. package/node_modules/zod/v4/locales/ca.js +118 -0
  501. package/node_modules/zod/v4/locales/cs.cjs +161 -0
  502. package/node_modules/zod/v4/locales/cs.d.cts +4 -0
  503. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  504. package/node_modules/zod/v4/locales/cs.js +135 -0
  505. package/node_modules/zod/v4/locales/de.cjs +142 -0
  506. package/node_modules/zod/v4/locales/de.d.cts +4 -0
  507. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  508. package/node_modules/zod/v4/locales/de.js +116 -0
  509. package/node_modules/zod/v4/locales/en.cjs +145 -0
  510. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  511. package/node_modules/zod/v4/locales/en.d.ts +5 -0
  512. package/node_modules/zod/v4/locales/en.js +117 -0
  513. package/node_modules/zod/v4/locales/eo.cjs +144 -0
  514. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  515. package/node_modules/zod/v4/locales/eo.d.ts +5 -0
  516. package/node_modules/zod/v4/locales/eo.js +116 -0
  517. package/node_modules/zod/v4/locales/es.cjs +143 -0
  518. package/node_modules/zod/v4/locales/es.d.cts +4 -0
  519. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  520. package/node_modules/zod/v4/locales/es.js +117 -0
  521. package/node_modules/zod/v4/locales/fa.cjs +148 -0
  522. package/node_modules/zod/v4/locales/fa.d.cts +4 -0
  523. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  524. package/node_modules/zod/v4/locales/fa.js +122 -0
  525. package/node_modules/zod/v4/locales/fi.cjs +148 -0
  526. package/node_modules/zod/v4/locales/fi.d.cts +4 -0
  527. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  528. package/node_modules/zod/v4/locales/fi.js +122 -0
  529. package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
  530. package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
  531. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  532. package/node_modules/zod/v4/locales/fr-CA.js +117 -0
  533. package/node_modules/zod/v4/locales/fr.cjs +142 -0
  534. package/node_modules/zod/v4/locales/fr.d.cts +4 -0
  535. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  536. package/node_modules/zod/v4/locales/fr.js +116 -0
  537. package/node_modules/zod/v4/locales/he.cjs +143 -0
  538. package/node_modules/zod/v4/locales/he.d.cts +4 -0
  539. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  540. package/node_modules/zod/v4/locales/he.js +117 -0
  541. package/node_modules/zod/v4/locales/hu.cjs +143 -0
  542. package/node_modules/zod/v4/locales/hu.d.cts +4 -0
  543. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  544. package/node_modules/zod/v4/locales/hu.js +117 -0
  545. package/node_modules/zod/v4/locales/id.cjs +142 -0
  546. package/node_modules/zod/v4/locales/id.d.cts +4 -0
  547. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  548. package/node_modules/zod/v4/locales/id.js +116 -0
  549. package/node_modules/zod/v4/locales/index.cjs +84 -0
  550. package/node_modules/zod/v4/locales/index.d.cts +39 -0
  551. package/node_modules/zod/v4/locales/index.d.ts +39 -0
  552. package/node_modules/zod/v4/locales/index.js +39 -0
  553. package/node_modules/zod/v4/locales/it.cjs +143 -0
  554. package/node_modules/zod/v4/locales/it.d.cts +4 -0
  555. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  556. package/node_modules/zod/v4/locales/it.js +117 -0
  557. package/node_modules/zod/v4/locales/ja.cjs +141 -0
  558. package/node_modules/zod/v4/locales/ja.d.cts +4 -0
  559. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  560. package/node_modules/zod/v4/locales/ja.js +115 -0
  561. package/node_modules/zod/v4/locales/kh.cjs +143 -0
  562. package/node_modules/zod/v4/locales/kh.d.cts +4 -0
  563. package/node_modules/zod/v4/locales/kh.d.ts +4 -0
  564. package/node_modules/zod/v4/locales/kh.js +117 -0
  565. package/node_modules/zod/v4/locales/ko.cjs +147 -0
  566. package/node_modules/zod/v4/locales/ko.d.cts +4 -0
  567. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  568. package/node_modules/zod/v4/locales/ko.js +121 -0
  569. package/node_modules/zod/v4/locales/mk.cjs +144 -0
  570. package/node_modules/zod/v4/locales/mk.d.cts +4 -0
  571. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  572. package/node_modules/zod/v4/locales/mk.js +118 -0
  573. package/node_modules/zod/v4/locales/ms.cjs +142 -0
  574. package/node_modules/zod/v4/locales/ms.d.cts +4 -0
  575. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  576. package/node_modules/zod/v4/locales/ms.js +116 -0
  577. package/node_modules/zod/v4/locales/nl.cjs +143 -0
  578. package/node_modules/zod/v4/locales/nl.d.cts +4 -0
  579. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  580. package/node_modules/zod/v4/locales/nl.js +117 -0
  581. package/node_modules/zod/v4/locales/no.cjs +142 -0
  582. package/node_modules/zod/v4/locales/no.d.cts +4 -0
  583. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  584. package/node_modules/zod/v4/locales/no.js +116 -0
  585. package/node_modules/zod/v4/locales/ota.cjs +143 -0
  586. package/node_modules/zod/v4/locales/ota.d.cts +4 -0
  587. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  588. package/node_modules/zod/v4/locales/ota.js +117 -0
  589. package/node_modules/zod/v4/locales/pl.cjs +143 -0
  590. package/node_modules/zod/v4/locales/pl.d.cts +4 -0
  591. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  592. package/node_modules/zod/v4/locales/pl.js +117 -0
  593. package/node_modules/zod/v4/locales/ps.cjs +148 -0
  594. package/node_modules/zod/v4/locales/ps.d.cts +4 -0
  595. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  596. package/node_modules/zod/v4/locales/ps.js +122 -0
  597. package/node_modules/zod/v4/locales/pt.cjs +142 -0
  598. package/node_modules/zod/v4/locales/pt.d.cts +4 -0
  599. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  600. package/node_modules/zod/v4/locales/pt.js +116 -0
  601. package/node_modules/zod/v4/locales/ru.cjs +190 -0
  602. package/node_modules/zod/v4/locales/ru.d.cts +4 -0
  603. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  604. package/node_modules/zod/v4/locales/ru.js +164 -0
  605. package/node_modules/zod/v4/locales/sl.cjs +143 -0
  606. package/node_modules/zod/v4/locales/sl.d.cts +4 -0
  607. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  608. package/node_modules/zod/v4/locales/sl.js +117 -0
  609. package/node_modules/zod/v4/locales/sv.cjs +144 -0
  610. package/node_modules/zod/v4/locales/sv.d.cts +4 -0
  611. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  612. package/node_modules/zod/v4/locales/sv.js +118 -0
  613. package/node_modules/zod/v4/locales/ta.cjs +143 -0
  614. package/node_modules/zod/v4/locales/ta.d.cts +4 -0
  615. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  616. package/node_modules/zod/v4/locales/ta.js +117 -0
  617. package/node_modules/zod/v4/locales/th.cjs +143 -0
  618. package/node_modules/zod/v4/locales/th.d.cts +4 -0
  619. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  620. package/node_modules/zod/v4/locales/th.js +117 -0
  621. package/node_modules/zod/v4/locales/tr.cjs +143 -0
  622. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  623. package/node_modules/zod/v4/locales/tr.d.ts +5 -0
  624. package/node_modules/zod/v4/locales/tr.js +115 -0
  625. package/node_modules/zod/v4/locales/ua.cjs +143 -0
  626. package/node_modules/zod/v4/locales/ua.d.cts +4 -0
  627. package/node_modules/zod/v4/locales/ua.d.ts +4 -0
  628. package/node_modules/zod/v4/locales/ua.js +117 -0
  629. package/node_modules/zod/v4/locales/ur.cjs +143 -0
  630. package/node_modules/zod/v4/locales/ur.d.cts +4 -0
  631. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  632. package/node_modules/zod/v4/locales/ur.js +117 -0
  633. package/node_modules/zod/v4/locales/vi.cjs +142 -0
  634. package/node_modules/zod/v4/locales/vi.d.cts +4 -0
  635. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  636. package/node_modules/zod/v4/locales/vi.js +116 -0
  637. package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
  638. package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
  639. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  640. package/node_modules/zod/v4/locales/zh-CN.js +116 -0
  641. package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
  642. package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
  643. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  644. package/node_modules/zod/v4/locales/zh-TW.js +117 -0
  645. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  646. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  647. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  648. package/node_modules/zod/v4/mini/checks.js +1 -0
  649. package/node_modules/zod/v4/mini/coerce.cjs +47 -0
  650. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  651. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  652. package/node_modules/zod/v4/mini/coerce.js +17 -0
  653. package/node_modules/zod/v4/mini/external.cjs +62 -0
  654. package/node_modules/zod/v4/mini/external.d.cts +11 -0
  655. package/node_modules/zod/v4/mini/external.d.ts +11 -0
  656. package/node_modules/zod/v4/mini/external.js +13 -0
  657. package/node_modules/zod/v4/mini/index.cjs +32 -0
  658. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  659. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  660. package/node_modules/zod/v4/mini/index.js +3 -0
  661. package/node_modules/zod/v4/mini/iso.cjs +60 -0
  662. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  663. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  664. package/node_modules/zod/v4/mini/iso.js +30 -0
  665. package/node_modules/zod/v4/mini/parse.cjs +8 -0
  666. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  667. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  668. package/node_modules/zod/v4/mini/parse.js +1 -0
  669. package/node_modules/zod/v4/mini/schemas.cjs +839 -0
  670. package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
  671. package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
  672. package/node_modules/zod/v4/mini/schemas.js +732 -0
  673. package/node_modules/zod/v4-mini/index.cjs +17 -0
  674. package/node_modules/zod/v4-mini/index.d.cts +1 -0
  675. package/node_modules/zod/v4-mini/index.d.ts +1 -0
  676. package/node_modules/zod/v4-mini/index.js +1 -0
  677. package/package.json +5 -1
@@ -0,0 +1,418 @@
1
+ type X2jOptions = {
2
+ /**
3
+ * Preserve the order of tags in resulting JS object
4
+ *
5
+ * Defaults to `false`
6
+ */
7
+ preserveOrder?: boolean;
8
+
9
+ /**
10
+ * Give a prefix to the attribute name in the resulting JS object
11
+ *
12
+ * Defaults to '@_'
13
+ */
14
+ attributeNamePrefix?: string;
15
+
16
+ /**
17
+ * A name to group all attributes of a tag under, or `false` to disable
18
+ *
19
+ * Defaults to `false`
20
+ */
21
+ attributesGroupName?: false | string;
22
+
23
+ /**
24
+ * The name of the next node in the resulting JS
25
+ *
26
+ * Defaults to `#text`
27
+ */
28
+ textNodeName?: string;
29
+
30
+ /**
31
+ * Whether to ignore attributes when parsing
32
+ *
33
+ * When `true` - ignores all the attributes
34
+ *
35
+ * When `false` - parses all the attributes
36
+ *
37
+ * When `Array<string | RegExp>` - filters out attributes that match provided patterns
38
+ *
39
+ * When `Function` - calls the function for each attribute and filters out those for which the function returned `true`
40
+ *
41
+ * Defaults to `true`
42
+ */
43
+ ignoreAttributes?: boolean | (string | RegExp)[] | ((attrName: string, jPath: string) => boolean);
44
+
45
+ /**
46
+ * Whether to remove namespace string from tag and attribute names
47
+ *
48
+ * Defaults to `false`
49
+ */
50
+ removeNSPrefix?: boolean;
51
+
52
+ /**
53
+ * Whether to allow attributes without value
54
+ *
55
+ * Defaults to `false`
56
+ */
57
+ allowBooleanAttributes?: boolean;
58
+
59
+ /**
60
+ * Whether to parse tag value with `strnum` package
61
+ *
62
+ * Defaults to `true`
63
+ */
64
+ parseTagValue?: boolean;
65
+
66
+ /**
67
+ * Whether to parse tag value with `strnum` package
68
+ *
69
+ * Defaults to `false`
70
+ */
71
+ parseAttributeValue?: boolean;
72
+
73
+ /**
74
+ * Whether to remove surrounding whitespace from tag or attribute value
75
+ *
76
+ * Defaults to `true`
77
+ */
78
+ trimValues?: boolean;
79
+
80
+ /**
81
+ * Give a property name to set CDATA values to instead of merging to tag's text value
82
+ *
83
+ * Defaults to `false`
84
+ */
85
+ cdataPropName?: false | string;
86
+
87
+ /**
88
+ * If set, parse comments and set as this property
89
+ *
90
+ * Defaults to `false`
91
+ */
92
+ commentPropName?: false | string;
93
+
94
+ /**
95
+ * Control how tag value should be parsed. Called only if tag value is not empty
96
+ *
97
+ * @returns {undefined|null} `undefined` or `null` to set original value.
98
+ * @returns {unknown}
99
+ *
100
+ * 1. Different value or value with different data type to set new value.
101
+ * 2. Same value to set parsed value if `parseTagValue: true`.
102
+ *
103
+ * Defaults to `(tagName, val, jPath, hasAttributes, isLeafNode) => val`
104
+ */
105
+ tagValueProcessor?: (tagName: string, tagValue: string, jPath: string, hasAttributes: boolean, isLeafNode: boolean) => unknown;
106
+
107
+ /**
108
+ * Control how attribute value should be parsed
109
+ *
110
+ * @param attrName
111
+ * @param attrValue
112
+ * @param jPath
113
+ * @returns {undefined|null} `undefined` or `null` to set original value
114
+ * @returns {unknown}
115
+ *
116
+ * Defaults to `(attrName, val, jPath) => val`
117
+ */
118
+ attributeValueProcessor?: (attrName: string, attrValue: string, jPath: string) => unknown;
119
+
120
+ /**
121
+ * Options to pass to `strnum` for parsing numbers
122
+ *
123
+ * Defaults to `{ hex: true, leadingZeros: true, eNotation: true }`
124
+ */
125
+ numberParseOptions?: strnumOptions;
126
+
127
+ /**
128
+ * Nodes to stop parsing at
129
+ *
130
+ * Defaults to `[]`
131
+ */
132
+ stopNodes?: string[];
133
+
134
+ /**
135
+ * List of tags without closing tags
136
+ *
137
+ * Defaults to `[]`
138
+ */
139
+ unpairedTags?: string[];
140
+
141
+ /**
142
+ * Whether to always create a text node
143
+ *
144
+ * Defaults to `false`
145
+ */
146
+ alwaysCreateTextNode?: boolean;
147
+
148
+ /**
149
+ * Determine whether a tag should be parsed as an array
150
+ *
151
+ * @param tagName
152
+ * @param jPath
153
+ * @param isLeafNode
154
+ * @param isAttribute
155
+ * @returns {boolean}
156
+ *
157
+ * Defaults to `() => false`
158
+ */
159
+ isArray?: (tagName: string, jPath: string, isLeafNode: boolean, isAttribute: boolean) => boolean;
160
+
161
+ /**
162
+ * Whether to process default and DOCTYPE entities
163
+ *
164
+ * Defaults to `true`
165
+ */
166
+ processEntities?: boolean;
167
+
168
+ /**
169
+ * Whether to process HTML entities
170
+ *
171
+ * Defaults to `false`
172
+ */
173
+ htmlEntities?: boolean;
174
+
175
+ /**
176
+ * Whether to ignore the declaration tag from output
177
+ *
178
+ * Defaults to `false`
179
+ */
180
+ ignoreDeclaration?: boolean;
181
+
182
+ /**
183
+ * Whether to ignore Pi tags
184
+ *
185
+ * Defaults to `false`
186
+ */
187
+ ignorePiTags?: boolean;
188
+
189
+ /**
190
+ * Transform tag names
191
+ *
192
+ * Defaults to `false`
193
+ */
194
+ transformTagName?: ((tagName: string) => string) | false;
195
+
196
+ /**
197
+ * Transform attribute names
198
+ *
199
+ * Defaults to `false`
200
+ */
201
+ transformAttributeName?: ((attributeName: string) => string) | false;
202
+
203
+ /**
204
+ * Change the tag name when a different name is returned. Skip the tag from parsed result when false is returned.
205
+ * Modify `attrs` object to control attributes for the given tag.
206
+ *
207
+ * @returns {string} new tag name.
208
+ * @returns false to skip the tag
209
+ *
210
+ * Defaults to `(tagName, jPath, attrs) => tagName`
211
+ */
212
+ updateTag?: (tagName: string, jPath: string, attrs: {[k: string]: string}) => string | boolean;
213
+ };
214
+
215
+ type strnumOptions = {
216
+ hex: boolean;
217
+ leadingZeros: boolean,
218
+ skipLike?: RegExp,
219
+ eNotation?: boolean
220
+ }
221
+
222
+ type validationOptions = {
223
+ /**
224
+ * Whether to allow attributes without value
225
+ *
226
+ * Defaults to `false`
227
+ */
228
+ allowBooleanAttributes?: boolean;
229
+
230
+ /**
231
+ * List of tags without closing tags
232
+ *
233
+ * Defaults to `[]`
234
+ */
235
+ unpairedTags?: string[];
236
+ };
237
+
238
+ type XmlBuilderOptions = {
239
+ /**
240
+ * Give a prefix to the attribute name in the resulting JS object
241
+ *
242
+ * Defaults to '@_'
243
+ */
244
+ attributeNamePrefix?: string;
245
+
246
+ /**
247
+ * A name to group all attributes of a tag under, or `false` to disable
248
+ *
249
+ * Defaults to `false`
250
+ */
251
+ attributesGroupName?: false | string;
252
+
253
+ /**
254
+ * The name of the next node in the resulting JS
255
+ *
256
+ * Defaults to `#text`
257
+ */
258
+ textNodeName?: string;
259
+
260
+ /**
261
+ * Whether to ignore attributes when building
262
+ *
263
+ * When `true` - ignores all the attributes
264
+ *
265
+ * When `false` - builds all the attributes
266
+ *
267
+ * When `Array<string | RegExp>` - filters out attributes that match provided patterns
268
+ *
269
+ * When `Function` - calls the function for each attribute and filters out those for which the function returned `true`
270
+ *
271
+ * Defaults to `true`
272
+ */
273
+ ignoreAttributes?: boolean | (string | RegExp)[] | ((attrName: string, jPath: string) => boolean);
274
+
275
+ /**
276
+ * Give a property name to set CDATA values to instead of merging to tag's text value
277
+ *
278
+ * Defaults to `false`
279
+ */
280
+ cdataPropName?: false | string;
281
+
282
+ /**
283
+ * If set, parse comments and set as this property
284
+ *
285
+ * Defaults to `false`
286
+ */
287
+ commentPropName?: false | string;
288
+
289
+ /**
290
+ * Whether to make output pretty instead of single line
291
+ *
292
+ * Defaults to `false`
293
+ */
294
+ format?: boolean;
295
+
296
+
297
+ /**
298
+ * If `format` is set to `true`, sets the indent string
299
+ *
300
+ * Defaults to ` `
301
+ */
302
+ indentBy?: string;
303
+
304
+ /**
305
+ * Give a name to a top-level array
306
+ *
307
+ * Defaults to `undefined`
308
+ */
309
+ arrayNodeName?: string;
310
+
311
+ /**
312
+ * Create empty tags for tags with no text value
313
+ *
314
+ * Defaults to `false`
315
+ */
316
+ suppressEmptyNode?: boolean;
317
+
318
+ /**
319
+ * Suppress an unpaired tag
320
+ *
321
+ * Defaults to `true`
322
+ */
323
+ suppressUnpairedNode?: boolean;
324
+
325
+ /**
326
+ * Don't put a value for boolean attributes
327
+ *
328
+ * Defaults to `true`
329
+ */
330
+ suppressBooleanAttributes?: boolean;
331
+
332
+ /**
333
+ * Preserve the order of tags in resulting JS object
334
+ *
335
+ * Defaults to `false`
336
+ */
337
+ preserveOrder?: boolean;
338
+
339
+ /**
340
+ * List of tags without closing tags
341
+ *
342
+ * Defaults to `[]`
343
+ */
344
+ unpairedTags?: string[];
345
+
346
+ /**
347
+ * Nodes to stop parsing at
348
+ *
349
+ * Defaults to `[]`
350
+ */
351
+ stopNodes?: string[];
352
+
353
+ /**
354
+ * Control how tag value should be parsed. Called only if tag value is not empty
355
+ *
356
+ * @returns {undefined|null} `undefined` or `null` to set original value.
357
+ * @returns {unknown}
358
+ *
359
+ * 1. Different value or value with different data type to set new value.
360
+ * 2. Same value to set parsed value if `parseTagValue: true`.
361
+ *
362
+ * Defaults to `(tagName, val, jPath, hasAttributes, isLeafNode) => val`
363
+ */
364
+ tagValueProcessor?: (name: string, value: unknown) => unknown;
365
+
366
+ /**
367
+ * Control how attribute value should be parsed
368
+ *
369
+ * @param attrName
370
+ * @param attrValue
371
+ * @param jPath
372
+ * @returns {undefined|null} `undefined` or `null` to set original value
373
+ * @returns {unknown}
374
+ *
375
+ * Defaults to `(attrName, val, jPath) => val`
376
+ */
377
+ attributeValueProcessor?: (name: string, value: unknown) => unknown;
378
+
379
+ /**
380
+ * Whether to process default and DOCTYPE entities
381
+ *
382
+ * Defaults to `true`
383
+ */
384
+ processEntities?: boolean;
385
+
386
+
387
+ oneListGroup?: boolean;
388
+ };
389
+
390
+ type ESchema = string | object | Array<string|object>;
391
+
392
+ type ValidationError = {
393
+ err: {
394
+ code: string;
395
+ msg: string,
396
+ line: number,
397
+ col: number
398
+ };
399
+ };
400
+
401
+ export class XMLParser {
402
+ constructor(options?: X2jOptions);
403
+ parse(xmlData: string | Buffer ,validationOptions?: validationOptions | boolean): any;
404
+ /**
405
+ * Add Entity which is not by default supported by this library
406
+ * @param entityIdentifier {string} Eg: 'ent' for &ent;
407
+ * @param entityValue {string} Eg: '\r'
408
+ */
409
+ addEntity(entityIdentifier: string, entityValue: string): void;
410
+ }
411
+
412
+ export class XMLValidator{
413
+ static validate( xmlData: string, options?: validationOptions): true | ValidationError;
414
+ }
415
+ export class XMLBuilder {
416
+ constructor(options?: XmlBuilderOptions);
417
+ build(jObj: any): any;
418
+ }
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ const validator = require('./validator');
4
+ const XMLParser = require('./xmlparser/XMLParser');
5
+ const XMLBuilder = require('./xmlbuilder/json2xml');
6
+
7
+ module.exports = {
8
+ XMLParser: XMLParser,
9
+ XMLValidator: validator,
10
+ XMLBuilder: XMLBuilder
11
+ }
@@ -0,0 +1,20 @@
1
+ function getIgnoreAttributesFn(ignoreAttributes) {
2
+ if (typeof ignoreAttributes === 'function') {
3
+ return ignoreAttributes
4
+ }
5
+ if (Array.isArray(ignoreAttributes)) {
6
+ return (attrName) => {
7
+ for (const pattern of ignoreAttributes) {
8
+ if (typeof pattern === 'string' && attrName === pattern) {
9
+ return true
10
+ }
11
+ if (pattern instanceof RegExp && pattern.test(attrName)) {
12
+ return true
13
+ }
14
+ }
15
+ }
16
+ }
17
+ return () => false
18
+ }
19
+
20
+ module.exports = getIgnoreAttributesFn
@@ -0,0 +1,72 @@
1
+ 'use strict';
2
+
3
+ const nameStartChar = ':A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
4
+ const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040';
5
+ const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*'
6
+ const regexName = new RegExp('^' + nameRegexp + '$');
7
+
8
+ const getAllMatches = function(string, regex) {
9
+ const matches = [];
10
+ let match = regex.exec(string);
11
+ while (match) {
12
+ const allmatches = [];
13
+ allmatches.startIndex = regex.lastIndex - match[0].length;
14
+ const len = match.length;
15
+ for (let index = 0; index < len; index++) {
16
+ allmatches.push(match[index]);
17
+ }
18
+ matches.push(allmatches);
19
+ match = regex.exec(string);
20
+ }
21
+ return matches;
22
+ };
23
+
24
+ const isName = function(string) {
25
+ const match = regexName.exec(string);
26
+ return !(match === null || typeof match === 'undefined');
27
+ };
28
+
29
+ exports.isExist = function(v) {
30
+ return typeof v !== 'undefined';
31
+ };
32
+
33
+ exports.isEmptyObject = function(obj) {
34
+ return Object.keys(obj).length === 0;
35
+ };
36
+
37
+ /**
38
+ * Copy all the properties of a into b.
39
+ * @param {*} target
40
+ * @param {*} a
41
+ */
42
+ exports.merge = function(target, a, arrayMode) {
43
+ if (a) {
44
+ const keys = Object.keys(a); // will return an array of own properties
45
+ const len = keys.length; //don't make it inline
46
+ for (let i = 0; i < len; i++) {
47
+ if (arrayMode === 'strict') {
48
+ target[keys[i]] = [ a[keys[i]] ];
49
+ } else {
50
+ target[keys[i]] = a[keys[i]];
51
+ }
52
+ }
53
+ }
54
+ };
55
+ /* exports.merge =function (b,a){
56
+ return Object.assign(b,a);
57
+ } */
58
+
59
+ exports.getValue = function(v) {
60
+ if (exports.isExist(v)) {
61
+ return v;
62
+ } else {
63
+ return '';
64
+ }
65
+ };
66
+
67
+ // const fakeCall = function(a) {return a;};
68
+ // const fakeCallNoReturn = function() {};
69
+
70
+ exports.isName = isName;
71
+ exports.getAllMatches = getAllMatches;
72
+ exports.nameRegexp = nameRegexp;
@@ -0,0 +1,16 @@
1
+ modules.export = {
2
+ "<" : "<", //tag start
3
+ ">" : ">", //tag end
4
+ "/" : "/", //close tag
5
+ "!" : "!", //comment or docttype
6
+ "!--" : "!--", //comment
7
+ "-->" : "-->", //comment end
8
+ "?" : "?", //pi
9
+ "?>" : "?>", //pi end
10
+ "?xml" : "?xml", //pi end
11
+ "![" : "![", //cdata
12
+ "]]>" : "]]>", //cdata end
13
+ "[" : "[",
14
+ "-" : "-",
15
+ "D" : "D",
16
+ }
@@ -0,0 +1,107 @@
1
+ const ampEntity = { regex: /&(amp|#38|#x26);/g, val : "&"};
2
+ const htmlEntities = {
3
+ "space": { regex: /&(nbsp|#160);/g, val: " " },
4
+ // "lt" : { regex: /&(lt|#60);/g, val: "<" },
5
+ // "gt" : { regex: /&(gt|#62);/g, val: ">" },
6
+ // "amp" : { regex: /&(amp|#38);/g, val: "&" },
7
+ // "quot" : { regex: /&(quot|#34);/g, val: "\"" },
8
+ // "apos" : { regex: /&(apos|#39);/g, val: "'" },
9
+ "cent" : { regex: /&(cent|#162);/g, val: "¢" },
10
+ "pound" : { regex: /&(pound|#163);/g, val: "£" },
11
+ "yen" : { regex: /&(yen|#165);/g, val: "¥" },
12
+ "euro" : { regex: /&(euro|#8364);/g, val: "€" },
13
+ "copyright" : { regex: /&(copy|#169);/g, val: "©" },
14
+ "reg" : { regex: /&(reg|#174);/g, val: "®" },
15
+ "inr" : { regex: /&(inr|#8377);/g, val: "₹" },
16
+ "num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },
17
+ "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 16)) },
18
+ };
19
+
20
+ class EntitiesParser{
21
+ constructor(replaceHtmlEntities) {
22
+ this.replaceHtmlEntities = replaceHtmlEntities;
23
+ this.docTypeEntities = {};
24
+ this.lastEntities = {
25
+ "apos" : { regex: /&(apos|#39|#x27);/g, val : "'"},
26
+ "gt" : { regex: /&(gt|#62|#x3E);/g, val : ">"},
27
+ "lt" : { regex: /&(lt|#60|#x3C);/g, val : "<"},
28
+ "quot" : { regex: /&(quot|#34|#x22);/g, val : "\""},
29
+ };
30
+ }
31
+
32
+ addExternalEntities(externalEntities){
33
+ const entKeys = Object.keys(externalEntities);
34
+ for (let i = 0; i < entKeys.length; i++) {
35
+ const ent = entKeys[i];
36
+ this.addExternalEntity(ent,externalEntities[ent])
37
+ }
38
+ }
39
+ addExternalEntity(key,val){
40
+ validateEntityName(key);
41
+ if(val.indexOf("&") !== -1) {
42
+ reportWarning(`Entity ${key} is not added as '&' is found in value;`)
43
+ return;
44
+ }else{
45
+ this.lastEntities[ent] = {
46
+ regex: new RegExp("&"+key+";","g"),
47
+ val : val
48
+ }
49
+ }
50
+ }
51
+
52
+ addDocTypeEntities(entities){
53
+ const entKeys = Object.keys(entities);
54
+ for (let i = 0; i < entKeys.length; i++) {
55
+ const ent = entKeys[i];
56
+ this.docTypeEntities[ent] = {
57
+ regex: new RegExp("&"+ent+";","g"),
58
+ val : entities[ent]
59
+ }
60
+ }
61
+ }
62
+
63
+ parse(val){
64
+ return this.replaceEntitiesValue(val)
65
+ }
66
+
67
+ /**
68
+ * 1. Replace DOCTYPE entities
69
+ * 2. Replace external entities
70
+ * 3. Replace HTML entities if asked
71
+ * @param {string} val
72
+ */
73
+ replaceEntitiesValue(val){
74
+ if(typeof val === "string" && val.length > 0){
75
+ for(let entityName in this.docTypeEntities){
76
+ const entity = this.docTypeEntities[entityName];
77
+ val = val.replace( entity.regx, entity.val);
78
+ }
79
+ for(let entityName in this.lastEntities){
80
+ const entity = this.lastEntities[entityName];
81
+ val = val.replace( entity.regex, entity.val);
82
+ }
83
+ if(this.replaceHtmlEntities){
84
+ for(let entityName in htmlEntities){
85
+ const entity = htmlEntities[entityName];
86
+ val = val.replace( entity.regex, entity.val);
87
+ }
88
+ }
89
+ val = val.replace( ampEntity.regex, ampEntity.val);
90
+ }
91
+ return val;
92
+ }
93
+ };
94
+
95
+ //an entity name should not contains special characters that may be used in regex
96
+ //Eg !?\\\/[]$%{}^&*()<>
97
+ const specialChar = "!?\\\/[]$%{}^&*()<>|+";
98
+
99
+ function validateEntityName(name){
100
+ for (let i = 0; i < specialChar.length; i++) {
101
+ const ch = specialChar[i];
102
+ if(name.indexOf(ch) !== -1) throw new Error(`Invalid character ${ch} in entity name`);
103
+ }
104
+ return name;
105
+ }
106
+
107
+ module.exports = EntitiesParser;
@@ -0,0 +1,64 @@
1
+
2
+ const JsObjOutputBuilder = require("./OutputBuilders/JsObjBuilder");
3
+
4
+ const defaultOptions = {
5
+ preserveOrder: false,
6
+ removeNSPrefix: false, // remove NS from tag name or attribute name if true
7
+ //ignoreRootElement : false,
8
+ stopNodes: [], //nested tags will not be parsed even for errors
9
+ // isArray: () => false, //User will set it
10
+ htmlEntities: false,
11
+ // skipEmptyListItem: false
12
+ tags:{
13
+ unpaired: [],
14
+ nameFor:{
15
+ cdata: false,
16
+ comment: false,
17
+ text: '#text'
18
+ },
19
+ separateTextProperty: false,
20
+ },
21
+ attributes:{
22
+ ignore: false,
23
+ booleanType: true,
24
+ entities: true,
25
+ },
26
+
27
+ // select: ["img[src]"],
28
+ // stop: ["anim", "[ads]"]
29
+ only: [], // rest tags will be skipped. It will result in flat array
30
+ hierarchy: false, //will be used when a particular tag is set to be parsed.
31
+ skip: [], // will be skipped from parse result. on('skip') will be triggered
32
+
33
+ select: [], // on('select', tag => tag ) will be called if match
34
+ stop: [], //given tagPath will not be parsed. innerXML will be set as string value
35
+ OutputBuilder: new JsObjOutputBuilder(),
36
+ };
37
+
38
+ const buildOptions = function(options) {
39
+ const finalOptions = { ... defaultOptions};
40
+ copyProperties(finalOptions,options)
41
+ return finalOptions;
42
+ };
43
+
44
+ function copyProperties(target, source) {
45
+ for (let key in source) {
46
+ if (source.hasOwnProperty(key)) {
47
+ if (key === 'OutputBuilder') {
48
+ target[key] = source[key];
49
+ }else if (typeof source[key] === 'object' && !Array.isArray(source[key])) {
50
+ // Recursively copy nested properties
51
+ if (typeof target[key] === 'undefined') {
52
+ target[key] = {};
53
+ }
54
+ copyProperties(target[key], source[key]);
55
+ } else {
56
+ // Copy non-nested properties
57
+ target[key] = source[key];
58
+ }
59
+ }
60
+ }
61
+ }
62
+
63
+ exports.buildOptions = buildOptions;
64
+ exports.defaultOptions = defaultOptions;