node-red-contrib-tak-registration 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/node_modules/@types/geojson/README.md +1 -1
- package/node_modules/@types/geojson/index.d.ts +36 -2
- package/node_modules/@types/geojson/package.json +2 -2
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert.d.ts +14 -0
- package/node_modules/@types/node/async_hooks.d.ts +64 -2
- package/node_modules/@types/node/buffer.buffer.d.ts +117 -39
- package/node_modules/@types/node/buffer.d.ts +6 -13
- package/node_modules/@types/node/cluster.d.ts +1 -1
- package/node_modules/@types/node/constants.d.ts +14 -12
- package/node_modules/@types/node/crypto.d.ts +44 -10
- package/node_modules/@types/node/dgram.d.ts +10 -7
- package/node_modules/@types/node/diagnostics_channel.d.ts +20 -1
- package/node_modules/@types/node/fs/promises.d.ts +23 -26
- package/node_modules/@types/node/fs.d.ts +166 -125
- package/node_modules/@types/node/globals.d.ts +141 -338
- package/node_modules/@types/node/http.d.ts +25 -3
- package/node_modules/@types/node/http2.d.ts +3 -4
- package/node_modules/@types/node/https.d.ts +3 -1
- package/node_modules/@types/node/inspector.d.ts +36 -0
- package/node_modules/@types/node/module.d.ts +599 -236
- package/node_modules/@types/node/net.d.ts +44 -13
- package/node_modules/@types/node/package.json +9 -4
- package/node_modules/@types/node/perf_hooks.d.ts +5 -0
- package/node_modules/@types/node/process.d.ts +69 -2
- package/node_modules/@types/node/querystring.d.ts +2 -3
- package/node_modules/@types/node/readline.d.ts +6 -1
- package/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/node/sqlite.d.ts +291 -17
- package/node_modules/@types/node/stream/consumers.d.ts +32 -6
- package/node_modules/@types/node/stream/web.d.ts +9 -4
- package/node_modules/@types/node/stream.d.ts +936 -1000
- package/node_modules/@types/node/test.d.ts +169 -137
- package/node_modules/@types/node/timers/promises.d.ts +24 -13
- package/node_modules/@types/node/timers.d.ts +159 -112
- package/node_modules/@types/node/tls.d.ts +34 -1
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +110 -35
- package/node_modules/@types/node/util.d.ts +323 -110
- package/node_modules/@types/node/v8.d.ts +81 -0
- package/node_modules/@types/node/vm.d.ts +21 -6
- package/node_modules/@types/node/worker_threads.d.ts +1 -0
- package/node_modules/@types/node/zlib.d.ts +167 -36
- package/node_modules/axios/CHANGELOG.md +124 -0
- package/node_modules/axios/README.md +38 -16
- package/node_modules/axios/dist/axios.js +44 -39
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +43 -39
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +43 -39
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +74 -43
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +3 -2
- package/node_modules/axios/index.d.ts +5 -2
- package/node_modules/axios/lib/adapters/fetch.js +1 -1
- package/node_modules/axios/lib/adapters/http.js +1 -1
- package/node_modules/axios/lib/core/Axios.js +11 -2
- package/node_modules/axios/lib/core/AxiosHeaders.js +15 -3
- package/node_modules/axios/lib/core/buildFullPath.js +3 -2
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/formDataToStream.js +4 -3
- package/node_modules/axios/lib/helpers/resolveConfig.js +1 -1
- package/node_modules/axios/lib/platform/node/index.js +26 -0
- package/node_modules/axios/lib/utils.js +12 -28
- package/node_modules/axios/package.json +3 -3
- package/node_modules/bignumber.js/CHANGELOG.md +82 -1
- package/node_modules/bignumber.js/LICENCE.md +1 -1
- package/node_modules/bignumber.js/README.md +6 -4
- package/node_modules/bignumber.js/bignumber.d.mts +6 -0
- package/node_modules/bignumber.js/bignumber.d.ts +3 -1829
- package/node_modules/bignumber.js/bignumber.js +3 -3
- package/node_modules/bignumber.js/bignumber.mjs +3 -3
- package/node_modules/bignumber.js/package.json +17 -7
- package/node_modules/bignumber.js/types.d.ts +1821 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/es-set-tostringtag/.eslintrc +13 -0
- package/node_modules/es-set-tostringtag/.nycrc +9 -0
- package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
- package/node_modules/es-set-tostringtag/LICENSE +21 -0
- package/node_modules/es-set-tostringtag/README.md +53 -0
- package/node_modules/es-set-tostringtag/index.d.ts +10 -0
- package/node_modules/es-set-tostringtag/index.js +35 -0
- package/node_modules/es-set-tostringtag/package.json +78 -0
- package/node_modules/es-set-tostringtag/test/index.js +85 -0
- package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
- package/node_modules/fast-xml-parser/CHANGELOG.md +63 -0
- package/node_modules/fast-xml-parser/README.md +37 -51
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -0
- package/node_modules/fast-xml-parser/lib/fxp.d.cts +458 -0
- package/node_modules/fast-xml-parser/lib/fxp.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxparser.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -0
- package/node_modules/fast-xml-parser/package.json +36 -18
- package/node_modules/fast-xml-parser/src/cli/cli.js +12 -12
- package/node_modules/fast-xml-parser/src/cli/man.js +6 -1
- package/node_modules/fast-xml-parser/src/cli/read.js +30 -79
- package/node_modules/fast-xml-parser/src/fxp.d.ts +28 -1
- package/node_modules/fast-xml-parser/src/fxp.js +11 -8
- package/node_modules/fast-xml-parser/src/ignoreAttributes.js +2 -4
- package/node_modules/fast-xml-parser/src/util.js +14 -18
- package/node_modules/fast-xml-parser/src/{v5 → v6}/CharsSymbol.js +1 -1
- package/node_modules/fast-xml-parser/src/{v5 → v6}/EntitiesParser.js +3 -6
- package/node_modules/fast-xml-parser/src/{v5 → v6}/OptionsBuilder.js +3 -6
- package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/BaseOutputBuilder.js +1 -3
- package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/JsArrBuilder.js +3 -3
- package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/JsMinArrBuilder.js +3 -5
- package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/JsObjBuilder.js +3 -5
- package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/ParserOptionsBuilder.js +6 -11
- package/node_modules/fast-xml-parser/src/{v5 → v6}/TagPath.js +1 -1
- package/node_modules/fast-xml-parser/src/{v5 → v6}/TagPathMatcher.js +3 -5
- package/node_modules/fast-xml-parser/src/{v5 → v6}/XMLParser.js +3 -5
- package/node_modules/fast-xml-parser/src/{v5 → v6}/Xml2JsParser.js +8 -10
- package/node_modules/fast-xml-parser/src/{v5 → v6}/XmlPartReader.js +4 -10
- package/node_modules/fast-xml-parser/src/{v5 → v6}/XmlSpecialTagsReader.js +5 -12
- package/node_modules/fast-xml-parser/src/{v5 → v6}/inputSource/BufferSource.js +1 -3
- package/node_modules/fast-xml-parser/src/{v5 → v6}/inputSource/StringSource.js +1 -3
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/EntitiesParser.js +3 -5
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/booleanParser.js +1 -2
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/booleanParserExt.js +1 -2
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/currency.js +1 -3
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/join.js +1 -2
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/number.js +2 -4
- package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/trim.js +1 -3
- package/node_modules/fast-xml-parser/src/validator.js +5 -5
- package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +5 -4
- package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +1 -2
- package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +287 -71
- package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +3 -5
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +23 -23
- package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +21 -8
- package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +8 -2
- package/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +22 -7
- package/node_modules/form-data/lib/form_data.js +24 -22
- package/node_modules/form-data/package.json +17 -14
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +5 -0
- package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
- package/node_modules/has-tostringtag/LICENSE +21 -0
- package/node_modules/has-tostringtag/README.md +46 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +8 -0
- package/node_modules/has-tostringtag/package.json +108 -0
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +8 -0
- package/node_modules/has-tostringtag/test/index.js +21 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
- package/node_modules/has-tostringtag/test/tests.js +15 -0
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +40 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +92 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/long/README.md +93 -87
- package/node_modules/long/index.d.ts +2 -2
- package/node_modules/long/index.js +360 -246
- package/node_modules/long/package.json +12 -4
- package/node_modules/long/types.d.ts +474 -0
- package/node_modules/long/umd/index.d.ts +2 -456
- package/node_modules/long/umd/index.js +1585 -1395
- package/node_modules/long/umd/types.d.ts +474 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/protobufjs/dist/light/protobuf.js +531 -80
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +671 -144
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/index.d.ts +71 -13
- package/node_modules/protobufjs/package.json +4 -2
- package/node_modules/protobufjs/src/decoder.js +8 -10
- package/node_modules/protobufjs/src/encoder.js +1 -1
- package/node_modules/protobufjs/src/enum.js +25 -0
- package/node_modules/protobufjs/src/field.js +104 -28
- package/node_modules/protobufjs/src/namespace.js +124 -13
- package/node_modules/protobufjs/src/object.js +139 -4
- package/node_modules/protobufjs/src/oneof.js +19 -0
- package/node_modules/protobufjs/src/parse.js +139 -63
- package/node_modules/protobufjs/src/root.js +52 -15
- package/node_modules/protobufjs/src/service.js +23 -1
- package/node_modules/protobufjs/src/type.js +29 -4
- package/node_modules/protobufjs/src/util.js +4 -1
- package/node_modules/strnum/.github/SECURITY.md +5 -0
- package/node_modules/strnum/CHANGELOG.md +33 -0
- package/node_modules/strnum/README.md +14 -3
- package/node_modules/strnum/algo.stflow +84 -0
- package/node_modules/strnum/package.json +9 -2
- package/node_modules/strnum/strnum.js +72 -67
- package/node_modules/strnum/strnum.test.js +29 -6
- package/node_modules/strnum/test.js +9 -0
- package/node_modules/undici-types/dispatcher.d.ts +1 -0
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/readable.d.ts +5 -0
- package/node_modules/undici-types/webidl.d.ts +6 -0
- package/node_modules/uuid/README.md +12 -12
- package/node_modules/uuid/dist/cjs/types.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v1.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v1.js +1 -1
- package/node_modules/uuid/dist/cjs/v3.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v35.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v4.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v5.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v6.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v7.d.ts +1 -1
- package/node_modules/uuid/dist/cjs/v7.js +1 -1
- package/node_modules/uuid/dist/cjs-browser/types.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v1.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v1.js +1 -1
- package/node_modules/uuid/dist/cjs-browser/v3.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v35.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v4.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v5.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v6.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v7.d.ts +1 -1
- package/node_modules/uuid/dist/cjs-browser/v7.js +1 -1
- package/node_modules/uuid/dist/esm/types.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v1.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v1.js +1 -1
- package/node_modules/uuid/dist/esm/v3.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v35.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v4.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v5.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v6.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v7.d.ts +1 -1
- package/node_modules/uuid/dist/esm/v7.js +1 -1
- package/node_modules/uuid/dist/esm-browser/types.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v1.js +1 -1
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +1 -1
- package/node_modules/uuid/dist/esm-browser/v7.js +1 -1
- package/node_modules/uuid/package.json +1 -1
- package/package.json +7 -7
- package/tak-registration.html +4 -4
- package/tak-registration.js +16 -7
- package/node_modules/axios/SECURITY.md +0 -6
- /package/node_modules/fast-xml-parser/src/{v5 → v6}/Report.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"./lib/fxbuilder.min.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAoB,WAAID,IAExBD,EAAiB,WAAIC,GACtB,CATD,CASGK,MAAM,I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QH,KAAKmB,QAAQkB,gBACvE,OAAOrC,KAAKgG,UAAUI,GAAM,UAAU1B,EAAG,SAAS1E,KAAKkG,QACnD,GAAc,MAAX/F,EAAI,GACX,OAAQH,KAAKgG,UAAUI,GAAS,IAAMjG,EAAMsD,EAAS,IAAMzD,KAAKiG,WAEhE,IAAI7B,EAAYpE,KAAKmB,QAAQmC,kBAAkBnD,EAAKuE,GAGpD,MAAkB,MAFlBN,EAAYpE,KAAKqD,qBAAqBe,IAG7BpE,KAAKgG,UAAUI,GAAS,IAAMjG,EAAMsD,EAAUzD,KAAK8H,SAAS3H,GAAOH,KAAKiG,WAExEjG,KAAKgG,UAAUI,GAAS,IAAMjG,EAAMsD,EAAU,IAClDW,EACD,KAAOjE,EAAMH,KAAKiG,UAG1B,EAEAf,EAAQvE,UAAU0C,qBAAuB,SAASe,GAChD,GAAGA,GAAaA,EAAU7C,OAAS,GAAKvB,KAAKmB,QAAQkD,gBACnD,IAAK,IAAIxC,EAAE,EAAGA,EAAE7B,KAAKmB,QAAQmD,SAAS/C,OAAQM,IAAK,CACjD,IAAM0C,EAASvE,KAAKmB,QAAQmD,SAASzC,GACrCuC,EAAYA,EAAUI,QAAQD,EAAOE,MAAOF,EAAOG,IACrD,CAEF,OAAON,CACT,E","sources":["webpack://XMLBuilder/webpack/universalModuleDefinition","webpack://XMLBuilder/webpack/bootstrap","webpack://XMLBuilder/webpack/runtime/define property getters","webpack://XMLBuilder/webpack/runtime/hasOwnProperty shorthand","webpack://XMLBuilder/webpack/runtime/make namespace object","webpack://XMLBuilder/./src/xmlbuilder/orderedJs2Xml.js","webpack://XMLBuilder/./src/xmlbuilder/json2xml.js","webpack://XMLBuilder/./src/ignoreAttributes.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"XMLBuilder\"] = factory();\n\telse\n\t\troot[\"XMLBuilder\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const EOL = \"\\n\";\n\n/**\n * \n * @param {array} jArray \n * @param {any} options \n * @returns \n */\nexport default function toXml(jArray, options) {\n let indentation = \"\";\n if (options.format && options.indentBy.length > 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\n\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n if(tagName === undefined) continue;\n\n let newJPath = \"\";\n if (jPath.length === 0) newJPath = tagName\n else newJPath = `${jPath}.${tagName}`;\n\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += `<![CDATA[${tagObj[tagName][0][options.textNodeName]}]]>`;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + `<!--${tagObj[tagName][0][options.textNodeName]}-->`;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\"; //remove extra spacing\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode) xmlStr += tagStart + \">\";\n else xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}</${tagName}>`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"</\"))) {\n xmlStr += indentation + options.indentBy + tagValue + indentation;\n } else {\n xmlStr += tagValue;\n }\n xmlStr += `</${tagName}>`;\n }\n isPreviousElementTag = true;\n }\n\n return xmlStr;\n}\n\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if(!obj.hasOwnProperty(key)) continue;\n if (key !== \":@\") return key;\n }\n}\n\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if(!attrMap.hasOwnProperty(attr)) continue;\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\n\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName) return true;\n }\n return false;\n}\n\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\n","'use strict';\n//parse Empty Node as self closing node\nimport buildFromOrderedJs from './orderedJs2Xml.js';\nimport getIgnoreAttributesFn from \"../ignoreAttributes.js\";\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"'\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\n\nexport default function Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes)\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n}\n\nBuilder.prototype.build = function(jObj) {\n if(this.options.preserveOrder){\n return buildFromOrderedJs(jObj, this.options);\n }else {\n if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){\n jObj = {\n [this.options.arrayNodeName] : jObj\n }\n }\n return this.j2x(jObj, 0, []).val;\n }\n};\n\nBuilder.prototype.j2x = function(jObj, level, ajPath) {\n let attrStr = '';\n let val = '';\n const jPath = ajPath.join('.')\n for (let key in jObj) {\n if(!Object.prototype.hasOwnProperty.call(jObj, key)) continue;\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node only if it is not an attribute\n if (this.isAttribute(key)) {\n val += '';\n }\n } else if (jObj[key] === null) {\n // null attribute should be ignored by the attribute list, but should not cause the tag closing\n if (this.isAttribute(key)) {\n val += '';\n } else if (key === this.options.cdataPropName) {\n val += '';\n } else if (key[0] === '?') {\n val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n } else {\n val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n }\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextValNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr && !this.ignoreAttributesFn(attr, jPath)) {\n attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);\n } else if (!attr) {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n val += this.buildTextValNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n let listTagAttr = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n if(this.options.oneListGroup){\n const result = this.j2x(item, level + 1, ajPath.concat(key));\n listTagVal += result.val;\n if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {\n listTagAttr += result.attrStr\n }\n }else{\n listTagVal += this.processTextOrObjNode(item, key, level, ajPath)\n }\n } else {\n if (this.options.oneListGroup) {\n let textValue = this.options.tagValueProcessor(key, item);\n textValue = this.replaceEntitiesValue(textValue);\n listTagVal += textValue;\n } else {\n listTagVal += this.buildTextValNode(item, key, '', level);\n }\n }\n }\n if(this.options.oneListGroup){\n listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);\n }\n val += listTagVal;\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level, ajPath)\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nBuilder.prototype.buildAttrPairStr = function(attrName, val){\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode (object, key, level, ajPath) {\n const result = this.j2x(object, level + 1, ajPath.concat(key));\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\n\nBuilder.prototype.buildObjectNode = function(val, key, attrStr, level) {\n if(val === \"\"){\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n }else{\n\n let tagEndExp = '</' + key + this.tagEndChar;\n let piClosingChar = \"\";\n \n if(key[0] === \"?\") {\n piClosingChar = \"?\";\n tagEndExp = \"\";\n }\n \n // attrStr is an empty string in case the attribute came as undefined or null\n if ((attrStr || attrStr === '') && val.indexOf('<') === -1) {\n return ( this.indentate(level) + '<' + key + attrStr + piClosingChar + '>' + val + tagEndExp );\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `<!--${val}-->` + this.newLine;\n }else {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n val +\n this.indentate(level) + tagEndExp );\n }\n }\n}\n\nBuilder.prototype.closeTag = function(key){\n let closeTag = \"\";\n if(this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(!this.options.suppressUnpairedNode) closeTag = \"/\"\n }else if(this.options.suppressEmptyNode){ //empty\n closeTag = \"/\";\n }else{\n closeTag = `></${key}`\n }\n return closeTag;\n}\n\nfunction buildEmptyObjNode(val, key, attrStr, level) {\n if (val !== '') {\n return this.buildObjectNode(val, key, attrStr, level);\n } else {\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;\n // return this.buildTagStr(level,key, attrStr);\n }\n }\n}\n\nBuilder.prototype.buildTextValNode = function(val, key, attrStr, level) {\n if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {\n return this.indentate(level) + `<![CDATA[${val}]]>` + this.newLine;\n }else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `<!--${val}-->` + this.newLine;\n }else if(key[0] === \"?\") {//PI tag\n return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; \n }else{\n let textValue = this.options.tagValueProcessor(key, val);\n textValue = this.replaceEntitiesValue(textValue);\n \n if( textValue === ''){\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + attrStr + '>' +\n textValue +\n '</' + key + this.tagEndChar;\n }\n }\n}\n\nBuilder.prototype.replaceEntitiesValue = function(textValue){\n if(textValue && textValue.length > 0 && this.options.processEntities){\n for (let i=0; i<this.options.entities.length; i++) {\n const entity = this.options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\n\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\n\nfunction isAttribute(name /*, options*/) {\n if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\n\n","export default function getIgnoreAttributesFn(ignoreAttributes) {\n if (typeof ignoreAttributes === 'function') {\n return ignoreAttributes\n }\n if (Array.isArray(ignoreAttributes)) {\n return (attrName) => {\n for (const pattern of ignoreAttributes) {\n if (typeof pattern === 'string' && attrName === pattern) {\n return true\n }\n if (pattern instanceof RegExp && pattern.test(attrName)) {\n return true\n }\n }\n }\n }\n return () => false\n}"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","toXml","jArray","options","indentation","format","indentBy","length","arrToStr","arr","jPath","xmlStr","isPreviousElementTag","i","tagObj","tagName","propName","undefined","newJPath","textNodeName","cdataPropName","commentPropName","newIdentation","tagStart","attr_to_str","tagValue","unpairedTags","indexOf","suppressUnpairedNode","suppressEmptyNode","endsWith","includes","attStr","tempInd","piTextNodeName","tagText","isStopNode","replaceEntitiesValue","tagValueProcessor","keys","attrMap","attrStr","ignoreAttributes","attr","attrVal","attributeValueProcessor","suppressBooleanAttributes","substr","attributeNamePrefix","lastIndexOf","index","stopNodes","textValue","processEntities","entities","entity","replace","regex","val","defaultOptions","attributesGroupName","a","attrName","preserveOrder","RegExp","oneListGroup","Builder","assign","isAttribute","ignoreAttributesFn","Array","isArray","_step","_iterator","_createForOfIteratorHelperLoose","done","pattern","test","attrPrefixLen","processTextOrObjNode","indentate","tagEndChar","newLine","object","level","ajPath","result","j2x","concat","buildTextValNode","buildObjectNode","repeat","name","startsWith","build","jObj","buildFromOrderedJs","arrayNodeName","_jObj","join","Date","buildAttrPairStr","newval","arrLen","listTagVal","listTagAttr","j","item","Ks","L","closeTag","tagEndExp","piClosingChar"],"sourceRoot":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{XMLBuilder:()=>ft,XMLParser:()=>st,XMLValidator:()=>mt});const n=":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",i=new RegExp("^["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function s(t,e){const n=[];let i=e.exec(t);for(;i;){const s=[];s.startIndex=e.lastIndex-i[0].length;const r=i.length;for(let t=0;t<r;t++)s.push(i[t]);n.push(s),i=e.exec(t)}return n}const r=function(t){return!(null==i.exec(t))},o={allowBooleanAttributes:!1,unpairedTags:[]};function a(t,e){e=Object.assign({},o,e);const n=[];let i=!1,s=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o<t.length;o++)if("<"===t[o]&&"?"===t[o+1]){if(o+=2,o=u(t,o),o.err)return o}else{if("<"!==t[o]){if(l(t[o]))continue;return x("InvalidChar","char '"+t[o]+"' is not expected.",N(t,o))}{let a=o;if(o++,"!"===t[o]){o=h(t,o);continue}{let d=!1;"/"===t[o]&&(d=!0,o++);let f="";for(;o<t.length&&">"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)f+=t[o];if(f=f.trim(),"/"===f[f.length-1]&&(f=f.substring(0,f.length-1),o--),!r(f)){let e;return e=0===f.trim().length?"Invalid space after '<'.":"Tag '"+f+"' is an invalid name.",x("InvalidTag",e,N(t,o))}const p=c(t,o);if(!1===p)return x("InvalidAttr","Attributes for '"+f+"' have open quote.",N(t,o));let b=p.value;if(o=p.index,"/"===b[b.length-1]){const n=o-b.length;b=b.substring(0,b.length-1);const s=g(b,e);if(!0!==s)return x(s.err.code,s.err.msg,N(t,n+s.err.line));i=!0}else if(d){if(!p.tagClosed)return x("InvalidTag","Closing tag '"+f+"' doesn't have proper closing.",N(t,o));if(b.trim().length>0)return x("InvalidTag","Closing tag '"+f+"' can't have attributes or invalid starting.",N(t,a));if(0===n.length)return x("InvalidTag","Closing tag '"+f+"' has not been opened.",N(t,a));{const e=n.pop();if(f!==e.tagName){let n=N(t,e.tagStartPos);return x("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+f+"'.",N(t,a))}0==n.length&&(s=!0)}}else{const r=g(b,e);if(!0!==r)return x(r.err.code,r.err.msg,N(t,o-b.length+r.err.line));if(!0===s)return x("InvalidXml","Multiple possible root nodes found.",N(t,o));-1!==e.unpairedTags.indexOf(f)||n.push({tagName:f,tagStartPos:a}),i=!0}for(o++;o<t.length;o++)if("<"===t[o]){if("!"===t[o+1]){o++,o=h(t,o);continue}if("?"!==t[o+1])break;if(o=u(t,++o),o.err)return o}else if("&"===t[o]){const e=m(t,o);if(-1==e)return x("InvalidChar","char '&' is not expected.",N(t,o));o=e}else if(!0===s&&!l(t[o]))return x("InvalidXml","Extra text at the end",N(t,o));"<"===t[o]&&o--}}}return i?1==n.length?x("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",N(t,n[0].tagStartPos)):!(n.length>0)||x("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):x("InvalidXml","Start tag expected.",1)}function l(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function u(t,e){const n=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const i=t.substr(n,e-n);if(e>5&&"xml"===i)return x("InvalidXml","XML declaration allowed only at the start of the document.",N(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function h(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}const d='"',f="'";function c(t,e){let n="",i="",s=!1;for(;e<t.length;e++){if(t[e]===d||t[e]===f)""===i?i=t[e]:i!==t[e]||(i="");else if(">"===t[e]&&""===i){s=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:s}}const p=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function g(t,e){const n=s(t,p),i={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return x("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",E(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return x("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",E(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return x("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",E(n[t]));const s=n[t][2];if(!b(s))return x("InvalidAttr","Attribute '"+s+"' is an invalid name.",E(n[t]));if(i.hasOwnProperty(s))return x("InvalidAttr","Attribute '"+s+"' is repeated.",E(n[t]));i[s]=1}return!0}function m(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function x(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function b(t){return r(t)}function N(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function E(t){return t.startIndex+t[1].length}const v={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t},captureMetaData:!1};let y;y="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class T{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][y]={startIndex:e})}static getMetaDataSymbol(){return y}}function w(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,s=!1,r=!1,o="";for(;e<t.length;e++)if("<"!==t[e]||r)if(">"===t[e]){if(r?"-"===t[e-1]&&"-"===t[e-2]&&(r=!1,i--):i--,0===i)break}else"["===t[e]?s=!0:o+=t[e];else{if(s&&C(t,"!ENTITY",e)){let i,s;e+=7,[i,s,e]=O(t,e+1),-1===s.indexOf("&")&&(n[i]={regx:RegExp(`&${i};`,"g"),val:s})}else if(s&&C(t,"!ELEMENT",e)){e+=8;const{index:n}=S(t,e+1);e=n}else if(s&&C(t,"!ATTLIST",e))e+=8;else if(s&&C(t,"!NOTATION",e)){e+=9;const{index:n}=A(t,e+1);e=n}else{if(!C(t,"!--",e))throw new Error("Invalid DOCTYPE");r=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}const P=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function O(t,e){e=P(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e])&&'"'!==t[e]&&"'"!==t[e];)n+=t[e],e++;if($(n),e=P(t,e),"SYSTEM"===t.substring(e,e+6).toUpperCase())throw new Error("External entities are not supported");if("%"===t[e])throw new Error("Parameter entities are not supported");let i="";return[e,i]=I(t,e,"entity"),[n,i,--e]}function A(t,e){e=P(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;$(n),e=P(t,e);const i=t.substring(e,e+6).toUpperCase();if("SYSTEM"!==i&&"PUBLIC"!==i)throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);e+=i.length,e=P(t,e);let s=null,r=null;if("PUBLIC"===i)[e,s]=I(t,e,"publicIdentifier"),'"'!==t[e=P(t,e)]&&"'"!==t[e]||([e,r]=I(t,e,"systemIdentifier"));else if("SYSTEM"===i&&([e,r]=I(t,e,"systemIdentifier"),!r))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:s,systemIdentifier:r,index:--e}}function I(t,e,n){let i="";const s=t[e];if('"'!==s&&"'"!==s)throw new Error(`Expected quoted string, found "${s}"`);for(e++;e<t.length&&t[e]!==s;)i+=t[e],e++;if(t[e]!==s)throw new Error(`Unterminated ${n} value`);return[++e,i]}function S(t,e){e=P(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;if(!$(n))throw new Error(`Invalid element name: "${n}"`);let i="";if("E"===t[e=P(t,e)]&&C(t,"MPTY",e))e+=6;else if("A"===t[e]&&C(t,"NY",e))e+=4;else{if("("!==t[e])throw new Error(`Invalid Element Expression, found "${t[e]}"`);for(e++;e<t.length&&")"!==t[e];)i+=t[e],e++;if(")"!==t[e])throw new Error("Unterminated content model")}return{elementName:n,contentModel:i.trim(),index:e}}function C(t,e,n){for(let i=0;i<e.length;i++)if(e[i]!==t[n+i+1])return!1;return!0}function $(t){if(r(t))return t;throw new Error(`Invalid entity name ${t}`)}const j=/^[-+]?0x[a-fA-F0-9]+$/,D=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,V={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const M=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function _(t){return"function"==typeof t?t:Array.isArray(t)?e=>{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}class k{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,16))}},this.addExternalEntities=F,this.parseXml=X,this.parseTextData=L,this.resolveNameSpace=B,this.buildAttributesMap=G,this.isItStopNode=Z,this.replaceEntitiesValue=R,this.readStopNodeData=J,this.saveTextToParentTag=q,this.addChild=Y,this.ignoreAttributesFn=_(this.options.ignoreAttributes)}}function F(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:t[i]}}}function L(t,e,n,i,s,r,o){if(void 0!==t&&(this.options.trimValues&&!i&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,s,r);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?H(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function B(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const U=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function G(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=s(t,U),i=n.length,r={};for(let t=0;t<i;t++){const i=this.resolveNameSpace(n[t][1]);if(this.ignoreAttributesFn(i,e))continue;let s=n[t][4],o=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const t=this.options.attributeValueProcessor(i,s,e);r[o]=null==t?s:typeof t!=typeof s||t!==s?t:H(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[o]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=r,t}return r}}const X=function(t){t=t.replace(/\r\n?/g,"\n");const e=new T("!xml");let n=e,i="",s="";for(let r=0;r<t.length;r++)if("<"===t[r])if("/"===t[r+1]){const e=W(t,">",r,"Closing Tag is not closed.");let o=t.substring(r+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,s));const a=s.substring(s.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),n=this.tagsNodeStack.pop(),i="",r=e}else if("?"===t[r+1]){let e=z(t,r,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,s),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new T(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,s,e.tagName)),this.addChild(n,t,s,r)}r=e.closeIndex+1}else if("!--"===t.substr(r+1,3)){const e=W(t,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(r+4,e-2);i=this.saveTextToParentTag(i,n,s),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}r=e}else if("!D"===t.substr(r+1,2)){const e=w(t,r);this.docTypeEntities=e.entities,r=e.i}else if("!["===t.substr(r+1,2)){const e=W(t,"]]>",r,"CDATA is not closed.")-2,o=t.substring(r+9,e);i=this.saveTextToParentTag(i,n,s);let a=this.parseTextData(o,n.tagname,s,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,a),r=e+2}else{let o=z(t,r,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let u=o.tagExp,h=o.attrExpPresent,d=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,s,!1));const f=n;f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),a!==e.tagname&&(s+=s?"."+a:a);const c=r;if(this.isItStopNode(this.options.stopNodes,s,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),r=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))r=o.closeIndex;else{const n=this.readStopNodeData(t,l,d+1);if(!n)throw new Error(`Unexpected end of ${l}`);r=n.i,e=n.tagContent}const i=new T(a);a!==u&&h&&(i[":@"]=this.buildAttributesMap(u,s,a)),e&&(e=this.parseTextData(e,a,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,s,c)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new T(a);a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s,c),s=s.substr(0,s.lastIndexOf("."))}else{const t=new T(a);this.tagsNodeStack.push(n),a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s,c),n=t}i="",r=d}}else i+=t[r];return e.child};function Y(t,e,n,i){this.options.captureMetaData||(i=void 0);const s=this.options.updateTag(e.tagname,n,e[":@"]);!1===s||("string"==typeof s?(e.tagname=s,t.addChild(e,i)):t.addChild(e,i))}const R=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function q(t,e,n,i){return t&&(void 0===i&&(i=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Z(t,e,n){const i="*."+n;for(const n in t){const s=t[n];if(i===s||e===s)return!0}return!1}function W(t,e,n,i){const s=t.indexOf(e,n);if(-1===s)throw new Error(i);return s+e.length-1}function z(t,e,n,i=">"){const s=function(t,e,n=">"){let i,s="";for(let r=e;r<t.length;r++){let e=t[r];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===n[0]){if(!n[1])return{data:s,index:r};if(t[r+1]===n[1])return{data:s,index:r}}else"\t"===e&&(e=" ");s+=e}}(t,e+1,i);if(!s)return;let r=s.data;const o=s.index,a=r.search(/\s/);let l=r,u=!0;-1!==a&&(l=r.substring(0,a),r=r.substring(a+1).trimStart());const h=l;if(n){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),u=l!==s.data.substr(t+1))}return{tagName:l,tagExp:r,closeIndex:o,attrExpPresent:u,rawTagName:h}}function J(t,e,n){const i=n;let s=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const r=W(t,">",n,`${e} is not closed`);if(t.substring(n+2,r).trim()===e&&(s--,0===s))return{tagContent:t.substring(i,n),i:r};n=r}else if("?"===t[n+1])n=W(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=W(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=W(t,"]]>",n,"StopNode is not closed.")-2;else{const i=z(t,n,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&s++,n=i.closeIndex)}}function H(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&function(t,e={}){if(e=Object.assign({},V,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if("0"===t)return 0;if(e.hex&&j.test(n))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(n);if(-1!==n.search(/.+[eE].+/))return function(t,e,n){if(!n.eNotation)return t;const i=e.match(M);if(i){let s=i[1]||"";const r=-1===i[3].indexOf("e")?"E":"e",o=i[2],a=s?t[o.length+1]===r:t[o.length]===r;return o.length>1&&a?t:1!==o.length||!i[3].startsWith(`.${r}`)&&i[3][0]!==r?n.leadingZeros&&!a?(e=(i[1]||"")+i[3],Number(e)):t:Number(e)}return t}(t,n,e);{const s=D.exec(n);if(s){const r=s[1]||"",o=s[2];let a=(i=s[3])&&-1!==i.indexOf(".")?("."===(i=i.replace(/0+$/,""))?i="0":"."===i[0]?i="0"+i:"."===i[i.length-1]&&(i=i.substring(0,i.length-1)),i):i;const l=r?"."===t[o.length+1]:"."===t[o.length];if(!e.leadingZeros&&(o.length>1||1===o.length&&!l))return t;{const i=Number(n),s=String(i);if(0===i||-0===i)return i;if(-1!==s.search(/[eE]/))return e.eNotation?i:t;if(-1!==n.indexOf("."))return"0"===s||s===a||s===`${r}${a}`?i:t;let l=o?a:n;return o?l===s||r+l===s?i:t:l===s||l===r+s?i:t}}return t}var i}(t,n)}return void 0!==t?t:""}const K=T.getMetaDataSymbol();function Q(t,e){return tt(t,e)}function tt(t,e,n){let i;const s={};for(let r=0;r<t.length;r++){const o=t[r],a=et(o);let l="";if(l=void 0===n?a:n+"."+a,a===e.textNodeName)void 0===i?i=o[a]:i+=""+o[a];else{if(void 0===a)continue;if(o[a]){let t=tt(o[a],e,l);const n=it(t,e);void 0!==o[K]&&(t[K]=o[K]),o[":@"]?nt(t,o[":@"],l,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==s[a]&&s.hasOwnProperty(a)?(Array.isArray(s[a])||(s[a]=[s[a]]),s[a].push(t)):e.isArray(a,l,n)?s[a]=[t]:s[a]=t}}}return"string"==typeof i?i.length>0&&(s[e.textNodeName]=i):void 0!==i&&(s[e.textNodeName]=i),s}function et(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function nt(t,e,n,i){if(e){const s=Object.keys(e),r=s.length;for(let o=0;o<r;o++){const r=s[o];i.isArray(r,n+"."+r,!0,!0)?t[r]=[e[r]]:t[r]=e[r]}}}function it(t,e){const{textNodeName:n}=e,i=Object.keys(t).length;return 0===i||!(1!==i||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n])}class st{constructor(t){this.externalEntities={},this.options=function(t){return Object.assign({},v,t)}(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const n=a(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new k(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:Q(i,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return T.getMetaDataSymbol()}}function rt(t,e){let n="";return e.format&&e.indentBy.length>0&&(n="\n"),ot(t,e,"",n)}function ot(t,e,n,i){let s="",r=!1;for(let o=0;o<t.length;o++){const a=t[o],l=at(a);if(void 0===l)continue;let u="";if(u=0===n.length?l:`${n}.${l}`,l===e.textNodeName){let t=a[l];ut(u,e)||(t=e.tagValueProcessor(l,t),t=ht(t,e)),r&&(s+=i),s+=t,r=!1;continue}if(l===e.cdataPropName){r&&(s+=i),s+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,r=!1;continue}if(l===e.commentPropName){s+=i+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,r=!0;continue}if("?"===l[0]){const t=lt(a[":@"],e),n="?xml"===l?"":i;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",s+=n+`<${l}${o}${t}?>`,r=!0;continue}let h=i;""!==h&&(h+=e.indentBy);const d=i+`<${l}${lt(a[":@"],e)}`,f=ot(a[l],e,u,h);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?s+=d+">":s+=d+"/>":f&&0!==f.length||!e.suppressEmptyNode?f&&f.endsWith(">")?s+=d+`>${f}${i}</${l}>`:(s+=d+">",f&&""!==i&&(f.includes("/>")||f.includes("</"))?s+=i+e.indentBy+f+i:s+=f,s+=`</${l}>`):s+=d+"/>",r=!0}return s}function at(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];if(t.hasOwnProperty(i)&&":@"!==i)return i}}function lt(t,e){let n="";if(t&&!e.ignoreAttributes)for(let i in t){if(!t.hasOwnProperty(i))continue;let s=e.attributeValueProcessor(i,t[i]);s=ht(s,e),!0===s&&e.suppressBooleanAttributes?n+=` ${i.substr(e.attributeNamePrefix.length)}`:n+=` ${i.substr(e.attributeNamePrefix.length)}="${s}"`}return n}function ut(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let i in e.stopNodes)if(e.stopNodes[i]===t||e.stopNodes[i]==="*."+n)return!0;return!1}function ht(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const i=e.entities[n];t=t.replace(i.regex,i.val)}return t}const dt={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ft(t){this.options=Object.assign({},dt,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=_(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=gt),this.processTextOrObjNode=ct,this.options.format?(this.indentate=pt,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function ct(t,e,n,i){const s=this.j2x(t,n+1,i.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,s.attrStr,n):this.buildObjectNode(s.val,e,s.attrStr,n)}function pt(t){return this.options.indentBy.repeat(t)}function gt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}ft.prototype.build=function(t){return this.options.preserveOrder?rt(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},ft.prototype.j2x=function(t,e,n){let i="",s="";const r=n.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(s+="");else if(null===t[o])this.isAttribute(o)||o===this.options.cdataPropName?s+="":"?"===o[0]?s+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)s+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const n=this.isAttribute(o);if(n&&!this.ignoreAttributesFn(n,r))i+=this.buildAttrPairStr(n,""+t[o]);else if(!n)if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);s+=this.replaceEntitiesValue(e)}else s+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const i=t[o].length;let r="",a="";for(let l=0;l<i;l++){const i=t[o][l];if(void 0===i);else if(null===i)"?"===o[0]?s+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if("object"==typeof i)if(this.options.oneListGroup){const t=this.j2x(i,e+1,n.concat(o));r+=t.val,this.options.attributesGroupName&&i.hasOwnProperty(this.options.attributesGroupName)&&(a+=t.attrStr)}else r+=this.processTextOrObjNode(i,o,e,n);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(o,i);t=this.replaceEntitiesValue(t),r+=t}else r+=this.buildTextValNode(i,o,"",e)}this.options.oneListGroup&&(r=this.buildObjectNode(r,o,a,e)),s+=r}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const e=Object.keys(t[o]),n=e.length;for(let s=0;s<n;s++)i+=this.buildAttrPairStr(e[s],""+t[o][e[s]])}else s+=this.processTextOrObjNode(t[o],o,e,n);return{attrStr:i,val:s}},ft.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},ft.prototype.buildObjectNode=function(t,e,n,i){if(""===t)return"?"===e[0]?this.indentate(i)+"<"+e+n+"?"+this.tagEndChar:this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let s="</"+e+this.tagEndChar,r="";return"?"===e[0]&&(r="?",s=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===r.length?this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(i)+"<"+e+n+r+this.tagEndChar+t+this.indentate(i)+s:this.indentate(i)+"<"+e+n+r+">"+t+s}},ft.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},ft.prototype.buildTextValNode=function(t,e,n,i){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+s+"</"+e+this.tagEndChar}},ft.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t};const mt={validate:a};module.exports=e})();
|
|
@@ -0,0 +1,458 @@
|
|
|
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
|
+
* If true, adds a Symbol to all object nodes, accessible by {@link XMLParser.getMetaDataSymbol} with
|
|
216
|
+
* metadata about each the node in the XML file.
|
|
217
|
+
*/
|
|
218
|
+
captureMetaData?: boolean;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
type strnumOptions = {
|
|
222
|
+
hex: boolean;
|
|
223
|
+
leadingZeros: boolean,
|
|
224
|
+
skipLike?: RegExp,
|
|
225
|
+
eNotation?: boolean
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
type validationOptions = {
|
|
229
|
+
/**
|
|
230
|
+
* Whether to allow attributes without value
|
|
231
|
+
*
|
|
232
|
+
* Defaults to `false`
|
|
233
|
+
*/
|
|
234
|
+
allowBooleanAttributes?: boolean;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* List of tags without closing tags
|
|
238
|
+
*
|
|
239
|
+
* Defaults to `[]`
|
|
240
|
+
*/
|
|
241
|
+
unpairedTags?: string[];
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
type XmlBuilderOptions = {
|
|
245
|
+
/**
|
|
246
|
+
* Give a prefix to the attribute name in the resulting JS object
|
|
247
|
+
*
|
|
248
|
+
* Defaults to '@_'
|
|
249
|
+
*/
|
|
250
|
+
attributeNamePrefix?: string;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* A name to group all attributes of a tag under, or `false` to disable
|
|
254
|
+
*
|
|
255
|
+
* Defaults to `false`
|
|
256
|
+
*/
|
|
257
|
+
attributesGroupName?: false | string;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* The name of the next node in the resulting JS
|
|
261
|
+
*
|
|
262
|
+
* Defaults to `#text`
|
|
263
|
+
*/
|
|
264
|
+
textNodeName?: string;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Whether to ignore attributes when building
|
|
268
|
+
*
|
|
269
|
+
* When `true` - ignores all the attributes
|
|
270
|
+
*
|
|
271
|
+
* When `false` - builds all the attributes
|
|
272
|
+
*
|
|
273
|
+
* When `Array<string | RegExp>` - filters out attributes that match provided patterns
|
|
274
|
+
*
|
|
275
|
+
* When `Function` - calls the function for each attribute and filters out those for which the function returned `true`
|
|
276
|
+
*
|
|
277
|
+
* Defaults to `true`
|
|
278
|
+
*/
|
|
279
|
+
ignoreAttributes?: boolean | (string | RegExp)[] | ((attrName: string, jPath: string) => boolean);
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Give a property name to set CDATA values to instead of merging to tag's text value
|
|
283
|
+
*
|
|
284
|
+
* Defaults to `false`
|
|
285
|
+
*/
|
|
286
|
+
cdataPropName?: false | string;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* If set, parse comments and set as this property
|
|
290
|
+
*
|
|
291
|
+
* Defaults to `false`
|
|
292
|
+
*/
|
|
293
|
+
commentPropName?: false | string;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Whether to make output pretty instead of single line
|
|
297
|
+
*
|
|
298
|
+
* Defaults to `false`
|
|
299
|
+
*/
|
|
300
|
+
format?: boolean;
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* If `format` is set to `true`, sets the indent string
|
|
305
|
+
*
|
|
306
|
+
* Defaults to ` `
|
|
307
|
+
*/
|
|
308
|
+
indentBy?: string;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Give a name to a top-level array
|
|
312
|
+
*
|
|
313
|
+
* Defaults to `undefined`
|
|
314
|
+
*/
|
|
315
|
+
arrayNodeName?: string;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Create empty tags for tags with no text value
|
|
319
|
+
*
|
|
320
|
+
* Defaults to `false`
|
|
321
|
+
*/
|
|
322
|
+
suppressEmptyNode?: boolean;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Suppress an unpaired tag
|
|
326
|
+
*
|
|
327
|
+
* Defaults to `true`
|
|
328
|
+
*/
|
|
329
|
+
suppressUnpairedNode?: boolean;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Don't put a value for boolean attributes
|
|
333
|
+
*
|
|
334
|
+
* Defaults to `true`
|
|
335
|
+
*/
|
|
336
|
+
suppressBooleanAttributes?: boolean;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Preserve the order of tags in resulting JS object
|
|
340
|
+
*
|
|
341
|
+
* Defaults to `false`
|
|
342
|
+
*/
|
|
343
|
+
preserveOrder?: boolean;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* List of tags without closing tags
|
|
347
|
+
*
|
|
348
|
+
* Defaults to `[]`
|
|
349
|
+
*/
|
|
350
|
+
unpairedTags?: string[];
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Nodes to stop parsing at
|
|
354
|
+
*
|
|
355
|
+
* Defaults to `[]`
|
|
356
|
+
*/
|
|
357
|
+
stopNodes?: string[];
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Control how tag value should be parsed. Called only if tag value is not empty
|
|
361
|
+
*
|
|
362
|
+
* @returns {undefined|null} `undefined` or `null` to set original value.
|
|
363
|
+
* @returns {unknown}
|
|
364
|
+
*
|
|
365
|
+
* 1. Different value or value with different data type to set new value.
|
|
366
|
+
* 2. Same value to set parsed value if `parseTagValue: true`.
|
|
367
|
+
*
|
|
368
|
+
* Defaults to `(tagName, val, jPath, hasAttributes, isLeafNode) => val`
|
|
369
|
+
*/
|
|
370
|
+
tagValueProcessor?: (name: string, value: unknown) => unknown;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Control how attribute value should be parsed
|
|
374
|
+
*
|
|
375
|
+
* @param attrName
|
|
376
|
+
* @param attrValue
|
|
377
|
+
* @param jPath
|
|
378
|
+
* @returns {undefined|null} `undefined` or `null` to set original value
|
|
379
|
+
* @returns {unknown}
|
|
380
|
+
*
|
|
381
|
+
* Defaults to `(attrName, val, jPath) => val`
|
|
382
|
+
*/
|
|
383
|
+
attributeValueProcessor?: (name: string, value: unknown) => unknown;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Whether to process default and DOCTYPE entities
|
|
387
|
+
*
|
|
388
|
+
* Defaults to `true`
|
|
389
|
+
*/
|
|
390
|
+
processEntities?: boolean;
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
oneListGroup?: boolean;
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
type ESchema = string | object | Array<string|object>;
|
|
397
|
+
|
|
398
|
+
type ValidationError = {
|
|
399
|
+
err: {
|
|
400
|
+
code: string;
|
|
401
|
+
msg: string,
|
|
402
|
+
line: number,
|
|
403
|
+
col: number
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
declare class XMLParser {
|
|
408
|
+
constructor(options?: X2jOptions);
|
|
409
|
+
parse(xmlData: string | Buffer ,validationOptions?: validationOptions | boolean): any;
|
|
410
|
+
/**
|
|
411
|
+
* Add Entity which is not by default supported by this library
|
|
412
|
+
* @param entityIdentifier {string} Eg: 'ent' for &ent;
|
|
413
|
+
* @param entityValue {string} Eg: '\r'
|
|
414
|
+
*/
|
|
415
|
+
addEntity(entityIdentifier: string, entityValue: string): void;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Returns a Symbol that can be used to access the {@link XMLMetaData}
|
|
419
|
+
* property on a node.
|
|
420
|
+
*
|
|
421
|
+
* If Symbol is not available in the environment, an ordinary property is used
|
|
422
|
+
* and the name of the property is here returned.
|
|
423
|
+
*
|
|
424
|
+
* The XMLMetaData property is only present when {@link X2jOptions.captureMetaData}
|
|
425
|
+
* is true in the options.
|
|
426
|
+
*/
|
|
427
|
+
static getMetaDataSymbol() : Symbol;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
declare class XMLValidator{
|
|
431
|
+
static validate(xmlData: string, options?: validationOptions): true | ValidationError;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
declare class XMLBuilder {
|
|
435
|
+
constructor(options?: XmlBuilderOptions);
|
|
436
|
+
build(jObj: any): string;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* This object is available on nodes via the symbol {@link XMLParser.getMetaDataSymbol}
|
|
442
|
+
* when {@link X2jOptions.captureMetaData} is true.
|
|
443
|
+
*/
|
|
444
|
+
declare interface XMLMetaData {
|
|
445
|
+
/** The index, if available, of the character where the XML node began in the input stream. */
|
|
446
|
+
startIndex?: number;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
declare namespace fxp {
|
|
450
|
+
export {
|
|
451
|
+
XMLParser,
|
|
452
|
+
XMLValidator,
|
|
453
|
+
XMLBuilder,
|
|
454
|
+
XMLMetaData
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export = fxp;
|