lakutata 2.0.82 → 2.0.83
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/com/docker.cjs +1 -1
- package/com/docker.mjs +1 -1
- package/decorator/orm.cjs +84 -84
- package/decorator/orm.mjs +42 -128
- package/orm.cjs +871 -1408
- package/orm.mjs +712 -1462
- package/package.json +1 -1
- package/src/components/Database.cjs +2 -2
- package/src/components/Database.mjs +6 -6
- package/src/components/cacher/Cacher.cjs +129 -129
- package/src/components/cacher/Cacher.mjs +117 -117
- package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +303 -312
- package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +304 -313
- package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.cjs +12 -12
- package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.mjs +11 -11
- package/src/components/cacher/adapters/CreateMongoCacheAdapter.cjs +16 -16
- package/src/components/cacher/adapters/CreateMongoCacheAdapter.mjs +14 -14
- package/src/components/cacher/adapters/CreateMysqlCacheAdapter.cjs +11 -11
- package/src/components/cacher/adapters/CreateMysqlCacheAdapter.mjs +11 -11
- package/src/components/cacher/adapters/CreatePostgresCacheAdapter.cjs +12 -12
- package/src/components/cacher/adapters/CreatePostgresCacheAdapter.mjs +13 -13
- package/src/components/cacher/adapters/CreateRedisCacheAdapter.cjs +2 -2
- package/src/components/cacher/adapters/CreateRedisCacheAdapter.mjs +2 -2
- package/src/components/cacher/adapters/CreateSqliteCacheAdapter.cjs +10 -10
- package/src/components/cacher/adapters/CreateSqliteCacheAdapter.mjs +10 -10
- package/src/components/cacher/lib/IsDriverPackageInstalled.cjs +2 -2
- package/src/components/cacher/lib/IsDriverPackageInstalled.mjs +5 -5
- package/src/components/docker/ConnectionOptionsBuilder.cjs +11 -11
- package/src/components/docker/ConnectionOptionsBuilder.mjs +7 -7
- package/src/components/docker/Docker.cjs +5067 -4956
- package/src/components/docker/Docker.mjs +4982 -4871
- package/src/components/docker/lib/DockerContainer.cjs +1 -1
- package/src/components/docker/lib/DockerContainer.mjs +1 -1
- package/src/components/docker/lib/DockerContainerTTY.cjs +1 -1
- package/src/components/docker/lib/DockerContainerTTY.mjs +1 -1
- package/src/components/docker/lib/ParseEnvToRecord.cjs +2 -2
- package/src/components/docker/lib/ParseEnvToRecord.mjs +12 -12
- package/src/components/docker/lib/ParseRepositoryTag.cjs +9 -9
- package/src/components/docker/lib/ParseRepositoryTag.mjs +11 -11
- package/src/components/entrypoint/Entrypoint.cjs +1678 -2168
- package/src/components/entrypoint/Entrypoint.mjs +1680 -2170
- package/src/components/monitor/AliveMonitor.cjs +2 -2
- package/src/components/monitor/AliveMonitor.mjs +2 -2
- package/src/components/monitor/MemoryMonitor.cjs +3 -3
- package/src/decorators/asst/After.cjs +3 -3
- package/src/decorators/asst/After.mjs +2 -2
- package/src/decorators/asst/Before.cjs +2 -2
- package/src/decorators/asst/Before.mjs +4 -4
- package/src/decorators/ctrl/CLIAction.cjs +2 -2
- package/src/decorators/ctrl/CLIAction.mjs +7 -7
- package/src/decorators/ctrl/HTTPAction.cjs +6 -6
- package/src/decorators/ctrl/HTTPAction.mjs +4 -4
- package/src/decorators/ctrl/ServiceAction.cjs +3 -3
- package/src/decorators/ctrl/ServiceAction.mjs +4 -4
- package/src/decorators/ctrl/http/DELETE.cjs +2 -2
- package/src/decorators/ctrl/http/DELETE.mjs +2 -2
- package/src/decorators/ctrl/http/GET.cjs +2 -2
- package/src/decorators/ctrl/http/GET.mjs +2 -2
- package/src/decorators/ctrl/http/HEAD.cjs +2 -2
- package/src/decorators/ctrl/http/HEAD.mjs +2 -2
- package/src/decorators/ctrl/http/OPTIONS.cjs +2 -2
- package/src/decorators/ctrl/http/OPTIONS.mjs +2 -2
- package/src/decorators/ctrl/http/PATCH.cjs +2 -2
- package/src/decorators/ctrl/http/PATCH.mjs +2 -2
- package/src/decorators/ctrl/http/POST.cjs +2 -2
- package/src/decorators/ctrl/http/POST.mjs +2 -2
- package/src/decorators/ctrl/http/PUT.cjs +2 -2
- package/src/decorators/ctrl/http/PUT.mjs +2 -2
- package/src/decorators/di/Autoload.cjs +2 -2
- package/src/decorators/di/Autoload.mjs +2 -2
- package/src/decorators/di/Configurable.cjs +3 -3
- package/src/decorators/di/Configurable.mjs +2 -2
- package/src/decorators/di/Inject.cjs +6 -6
- package/src/decorators/di/Inject.mjs +11 -11
- package/src/decorators/di/Lifetime.cjs +18 -18
- package/src/decorators/di/Lifetime.mjs +13 -13
- package/src/decorators/dto/Accept.cjs +3 -3
- package/src/decorators/dto/Accept.mjs +2 -2
- package/src/decorators/dto/Expect.cjs +2 -2
- package/src/decorators/dto/Expect.mjs +3 -3
- package/src/decorators/dto/IndexSignature.cjs +2 -2
- package/src/decorators/dto/IndexSignature.mjs +3 -3
- package/src/decorators/dto/Return.cjs +3 -3
- package/src/decorators/dto/Return.mjs +2 -2
- package/src/decorators/orm/AfterInsert.cjs +26 -4
- package/src/decorators/orm/AfterInsert.mjs +25 -5
- package/src/decorators/orm/AfterLoad.cjs +26 -4
- package/src/decorators/orm/AfterLoad.mjs +25 -5
- package/src/decorators/orm/AfterRecover.cjs +26 -4
- package/src/decorators/orm/AfterRecover.mjs +25 -5
- package/src/decorators/orm/AfterRemove.cjs +26 -4
- package/src/decorators/orm/AfterRemove.mjs +25 -5
- package/src/decorators/orm/AfterSoftRemove.cjs +26 -4
- package/src/decorators/orm/AfterSoftRemove.mjs +25 -5
- package/src/decorators/orm/AfterUpdate.cjs +26 -4
- package/src/decorators/orm/AfterUpdate.mjs +25 -5
- package/src/decorators/orm/BeforeInsert.cjs +26 -4
- package/src/decorators/orm/BeforeInsert.mjs +25 -5
- package/src/decorators/orm/BeforeRecover.cjs +26 -4
- package/src/decorators/orm/BeforeRecover.mjs +25 -5
- package/src/decorators/orm/BeforeRemove.cjs +26 -4
- package/src/decorators/orm/BeforeRemove.mjs +25 -5
- package/src/decorators/orm/BeforeSoftRemove.cjs +26 -4
- package/src/decorators/orm/BeforeSoftRemove.mjs +25 -5
- package/src/decorators/orm/BeforeUpdate.cjs +26 -4
- package/src/decorators/orm/BeforeUpdate.mjs +25 -5
- package/src/decorators/orm/Check.cjs +29 -4
- package/src/decorators/orm/Check.mjs +28 -5
- package/src/decorators/orm/ChildEntity.cjs +29 -4
- package/src/decorators/orm/ChildEntity.mjs +28 -5
- package/src/decorators/orm/Column.cjs +61 -4
- package/src/decorators/orm/Column.mjs +61 -6
- package/src/decorators/orm/CreateDateColumn.cjs +25 -4
- package/src/decorators/orm/CreateDateColumn.mjs +24 -5
- package/src/decorators/orm/DeleteDateColumn.cjs +25 -4
- package/src/decorators/orm/DeleteDateColumn.mjs +23 -4
- package/src/decorators/orm/Entity.cjs +35 -4
- package/src/decorators/orm/Entity.mjs +33 -4
- package/src/decorators/orm/EventSubscriber.cjs +22 -4
- package/src/decorators/orm/EventSubscriber.mjs +21 -5
- package/src/decorators/orm/Exclusion.cjs +29 -4
- package/src/decorators/orm/Exclusion.mjs +28 -5
- package/src/decorators/orm/Generated.cjs +24 -4
- package/src/decorators/orm/Generated.mjs +23 -5
- package/src/decorators/orm/Index.cjs +41 -4
- package/src/decorators/orm/Index.mjs +41 -6
- package/src/decorators/orm/JoinColumn.cjs +29 -4
- package/src/decorators/orm/JoinColumn.mjs +28 -5
- package/src/decorators/orm/JoinTable.cjs +30 -4
- package/src/decorators/orm/JoinTable.mjs +28 -4
- package/src/decorators/orm/ManyToMany.cjs +42 -4
- package/src/decorators/orm/ManyToMany.mjs +40 -4
- package/src/decorators/orm/ManyToOne.cjs +42 -4
- package/src/decorators/orm/ManyToOne.mjs +40 -4
- package/src/decorators/orm/ObjectIdColumn.cjs +28 -4
- package/src/decorators/orm/ObjectIdColumn.mjs +27 -5
- package/src/decorators/orm/OneToMany.cjs +34 -4
- package/src/decorators/orm/OneToMany.mjs +34 -6
- package/src/decorators/orm/OneToOne.cjs +42 -4
- package/src/decorators/orm/OneToOne.mjs +40 -4
- package/src/decorators/orm/PrimaryColumn.cjs +49 -4
- package/src/decorators/orm/PrimaryColumn.mjs +49 -6
- package/src/decorators/orm/PrimaryGeneratedColumn.cjs +54 -4
- package/src/decorators/orm/PrimaryGeneratedColumn.mjs +54 -6
- package/src/decorators/orm/RelationId.cjs +26 -4
- package/src/decorators/orm/RelationId.mjs +25 -5
- package/src/decorators/orm/TableInheritance.cjs +26 -4
- package/src/decorators/orm/TableInheritance.mjs +25 -5
- package/src/decorators/orm/Tree.cjs +24 -4
- package/src/decorators/orm/Tree.mjs +23 -5
- package/src/decorators/orm/TreeChildren.cjs +31 -4
- package/src/decorators/orm/TreeChildren.mjs +29 -4
- package/src/decorators/orm/TreeLevelColumn.cjs +25 -4
- package/src/decorators/orm/TreeLevelColumn.mjs +23 -4
- package/src/decorators/orm/TreeParent.cjs +31 -4
- package/src/decorators/orm/TreeParent.mjs +29 -4
- package/src/decorators/orm/Unique.cjs +44 -4
- package/src/decorators/orm/Unique.mjs +44 -6
- package/src/decorators/orm/UpdateDateColumn.cjs +25 -4
- package/src/decorators/orm/UpdateDateColumn.mjs +24 -5
- package/src/decorators/orm/VersionColumn.cjs +25 -4
- package/src/decorators/orm/VersionColumn.mjs +24 -5
- package/src/decorators/orm/ViewColumn.cjs +25 -4
- package/src/decorators/orm/ViewColumn.mjs +24 -5
- package/src/decorators/orm/ViewEntity.cjs +34 -4
- package/src/decorators/orm/ViewEntity.mjs +33 -5
- package/src/decorators/orm/VirtualColumn.cjs +42 -4
- package/src/decorators/orm/VirtualColumn.mjs +40 -4
- package/src/lib/base/EventEmitter.cjs +1195 -1202
- package/src/lib/base/EventEmitter.mjs +1195 -1202
- package/src/lib/base/async-constructor/Append.cjs +11 -11
- package/src/lib/base/async-constructor/Append.mjs +7 -7
- package/src/lib/base/internal/BasicInfo.cjs +10 -10
- package/src/lib/base/internal/BasicInfo.mjs +9 -9
- package/src/lib/base/internal/CamelCase.cjs +4 -4
- package/src/lib/base/internal/CamelCase.mjs +11 -11
- package/src/lib/base/internal/ConfigurableRecordsInjection.cjs +19 -19
- package/src/lib/base/internal/ConfigurableRecordsInjection.mjs +18 -18
- package/src/lib/base/internal/ConstructorSymbol.cjs +10 -10
- package/src/lib/base/internal/ConstructorSymbol.mjs +8 -8
- package/src/lib/base/internal/ControllerEntrypoint.cjs +65 -65
- package/src/lib/base/internal/ControllerEntrypoint.mjs +36 -36
- package/src/lib/base/internal/DataValidator.cjs +185 -174
- package/src/lib/base/internal/DataValidator.mjs +230 -219
- package/src/lib/base/internal/GetActionDTOAndOptions.cjs +9 -9
- package/src/lib/base/internal/GetActionDTOAndOptions.mjs +10 -10
- package/src/lib/base/internal/IEEE754.cjs +74 -74
- package/src/lib/base/internal/IEEE754.mjs +70 -70
- package/src/lib/base/internal/MethodAssistantFunction.cjs +28 -28
- package/src/lib/base/internal/MethodAssistantFunction.mjs +38 -38
- package/src/lib/base/internal/MethodValidation.cjs +25 -25
- package/src/lib/base/internal/MethodValidation.mjs +20 -20
- package/src/lib/base/internal/ObjectConfiguration.cjs +10 -10
- package/src/lib/base/internal/ObjectConfiguration.mjs +15 -15
- package/src/lib/base/internal/ObjectContainer.cjs +7 -7
- package/src/lib/base/internal/ObjectContainer.mjs +6 -6
- package/src/lib/base/internal/ObjectInjection.cjs +16 -16
- package/src/lib/base/internal/ObjectInjection.mjs +13 -13
- package/src/lib/base/internal/ObjectLifetime.cjs +10 -10
- package/src/lib/base/internal/ObjectLifetime.mjs +9 -9
- package/src/lib/base/internal/ObjectWeakRefs.cjs +11 -11
- package/src/lib/base/internal/ObjectWeakRefs.mjs +9 -9
- package/src/lib/base/internal/PatternManager.cjs +739 -744
- package/src/lib/base/internal/PatternManager.mjs +743 -748
- package/src/lib/base/internal/StringifyPattern.cjs +26 -26
- package/src/lib/base/internal/StringifyPattern.mjs +26 -26
- package/src/lib/base/internal/ThrowWarning.cjs +2 -2
- package/src/lib/base/internal/ThrowWarning.mjs +2 -2
- package/src/lib/core/Alias.cjs +5 -5
- package/src/lib/core/Application.cjs +115 -128
- package/src/lib/core/Application.mjs +135 -148
- package/src/lib/helpers/ArrayToSet.cjs +2 -2
- package/src/lib/helpers/ArrayToSet.mjs +3 -3
- package/src/lib/helpers/As.cjs +2 -2
- package/src/lib/helpers/As.mjs +2 -2
- package/src/lib/helpers/ConvertArrayLikeToIterable.cjs +3 -3
- package/src/lib/helpers/ConvertArrayLikeToIterable.mjs +3 -3
- package/src/lib/helpers/ConvertArrayLikeToStream.cjs +2 -2
- package/src/lib/helpers/ConvertArrayLikeToStream.mjs +2 -2
- package/src/lib/helpers/Delay.cjs +2 -2
- package/src/lib/helpers/Delay.mjs +2 -2
- package/src/lib/helpers/DevNull.cjs +2 -2
- package/src/lib/helpers/DevNull.mjs +2 -2
- package/src/lib/helpers/GetObjectNestingDepth.cjs +12 -12
- package/src/lib/helpers/GetObjectNestingDepth.mjs +11 -11
- package/src/lib/helpers/GetObjectPropertyPaths.cjs +7 -7
- package/src/lib/helpers/GetObjectPropertyPaths.mjs +9 -9
- package/src/lib/helpers/Glob.cjs +890 -890
- package/src/lib/helpers/Glob.mjs +889 -889
- package/src/lib/helpers/GraceExit.cjs +3 -3
- package/src/lib/helpers/GraceExit.mjs +7 -7
- package/src/lib/helpers/HexToIEEE754.cjs +4 -4
- package/src/lib/helpers/HexToIEEE754.mjs +2 -2
- package/src/lib/helpers/HexToSigned.cjs +5 -5
- package/src/lib/helpers/HexToSigned.mjs +4 -4
- package/src/lib/helpers/HexToUnsigned.cjs +2 -2
- package/src/lib/helpers/HexToUnsigned.mjs +2 -2
- package/src/lib/helpers/IEEE754ToHex.cjs +5 -5
- package/src/lib/helpers/IEEE754ToHex.mjs +5 -5
- package/src/lib/helpers/IsAbortError.cjs +2 -2
- package/src/lib/helpers/IsAbortError.mjs +3 -3
- package/src/lib/helpers/IsEmptyObject.cjs +3 -3
- package/src/lib/helpers/IsEmptyObject.mjs +3 -3
- package/src/lib/helpers/IsExists.cjs +5 -5
- package/src/lib/helpers/IsExists.mjs +4 -4
- package/src/lib/helpers/IsHtml.cjs +8 -18
- package/src/lib/helpers/IsHtml.mjs +8 -18
- package/src/lib/helpers/IsNativeFunction.cjs +2 -2
- package/src/lib/helpers/IsNativeFunction.mjs +2 -2
- package/src/lib/helpers/IsPath.cjs +2 -2
- package/src/lib/helpers/IsPath.mjs +5 -5
- package/src/lib/helpers/IsPromise.cjs +2 -2
- package/src/lib/helpers/IsPromise.mjs +2 -2
- package/src/lib/helpers/IsPromiseLike.cjs +5 -5
- package/src/lib/helpers/IsPromiseLike.mjs +6 -6
- package/src/lib/helpers/IsXML.cjs +1531 -1525
- package/src/lib/helpers/IsXML.mjs +1527 -1521
- package/src/lib/helpers/MD5.cjs +2 -2
- package/src/lib/helpers/MD5.mjs +2 -2
- package/src/lib/helpers/MergeArray.cjs +3 -3
- package/src/lib/helpers/MergeArray.mjs +3 -3
- package/src/lib/helpers/MergeMap.cjs +3 -3
- package/src/lib/helpers/MergeMap.mjs +3 -3
- package/src/lib/helpers/MergeSet.cjs +2 -2
- package/src/lib/helpers/MergeSet.mjs +3 -3
- package/src/lib/helpers/NoCase.cjs +27 -27
- package/src/lib/helpers/NoCase.mjs +24 -24
- package/src/lib/helpers/NonceStr.cjs +2 -2
- package/src/lib/helpers/NonceStr.mjs +2 -2
- package/src/lib/helpers/ObjectConstructor.cjs +2 -2
- package/src/lib/helpers/ObjectConstructor.mjs +4 -4
- package/src/lib/helpers/ObjectHash.cjs +377 -384
- package/src/lib/helpers/ObjectHash.mjs +373 -380
- package/src/lib/helpers/ObjectParentConstructor.cjs +2 -2
- package/src/lib/helpers/ObjectParentConstructor.mjs +5 -5
- package/src/lib/helpers/ObjectParentConstructors.cjs +6 -6
- package/src/lib/helpers/ObjectParentConstructors.mjs +2 -2
- package/src/lib/helpers/ObjectPrototype.cjs +2 -2
- package/src/lib/helpers/ObjectPrototype.mjs +2 -2
- package/src/lib/helpers/ObjectToMap.cjs +2 -2
- package/src/lib/helpers/ObjectToMap.mjs +3 -3
- package/src/lib/helpers/Paginator.cjs +2 -2
- package/src/lib/helpers/Paginator.mjs +6 -6
- package/src/lib/helpers/RandomString.cjs +148 -169
- package/src/lib/helpers/RandomString.mjs +145 -166
- package/src/lib/helpers/SHA1.cjs +2 -2
- package/src/lib/helpers/SHA1.mjs +2 -2
- package/src/lib/helpers/SHA256.cjs +2 -2
- package/src/lib/helpers/SHA256.mjs +2 -2
- package/src/lib/helpers/SetToArray.cjs +2 -2
- package/src/lib/helpers/SetToArray.mjs +2 -2
- package/src/lib/helpers/SignedToHex.cjs +4 -4
- package/src/lib/helpers/SignedToHex.mjs +4 -4
- package/src/lib/helpers/SortArray.cjs +16 -16
- package/src/lib/helpers/SortArray.mjs +15 -15
- package/src/lib/helpers/SortKeys.cjs +41 -41
- package/src/lib/helpers/SortKeys.mjs +41 -41
- package/src/lib/helpers/SortObject.cjs +2 -2
- package/src/lib/helpers/SortObject.mjs +2 -2
- package/src/lib/helpers/Templating.cjs +25 -25
- package/src/lib/helpers/Templating.mjs +25 -25
- package/src/lib/helpers/URLBuilder.cjs +355 -355
- package/src/lib/helpers/URLBuilder.mjs +349 -349
- package/src/lib/helpers/UniqueArray.cjs +3 -3
- package/src/lib/helpers/UniqueArray.mjs +2 -2
- package/src/lib/helpers/UnsignedToHex.cjs +3 -3
- package/src/lib/helpers/UnsignedToHex.mjs +3 -3
- package/src/lib/ioc/DependencyInjectionContainer.cjs +106 -106
- package/src/lib/ioc/DependencyInjectionContainer.mjs +122 -122
- package/src/lib/ioc/FunctionTokenizer.cjs +115 -115
- package/src/lib/ioc/FunctionTokenizer.mjs +102 -102
- package/src/lib/ioc/Lifetime.cjs +5 -5
- package/src/lib/ioc/Lifetime.mjs +5 -5
- package/src/lib/ioc/ListModules.cjs +5298 -5221
- package/src/lib/ioc/ListModules.mjs +5258 -5181
- package/src/lib/ioc/LoadModules.cjs +56 -56
- package/src/lib/ioc/LoadModules.mjs +69 -69
- package/src/lib/ioc/ParamParser.cjs +30 -30
- package/src/lib/ioc/ParamParser.mjs +41 -41
- package/src/lib/ioc/Resolvers.cjs +87 -87
- package/src/lib/ioc/Resolvers.mjs +109 -109
- package/src/lib/ioc/Utils.cjs +12 -12
- package/src/lib/ioc/Utils.mjs +18 -18
- package/src/lib/validation/VLD.cjs +4025 -4202
- package/src/lib/validation/VLD.mjs +2972 -3149
- package/src/providers/Database.cjs +2 -2
- package/src/providers/Database.mjs +7 -7
- package/src/providers/PasswordHash.cjs +330 -330
- package/src/providers/PasswordHash.mjs +397 -397
- package/src/providers/migration/GenerateMigration.cjs +2 -2
- package/src/providers/migration/GenerateMigration.mjs +2 -2
- package/vendor/Package.1.cjs +256 -256
- package/vendor/Package.1.mjs +254 -254
- package/vendor/Package.112.cjs +42157 -42076
- package/vendor/Package.112.mjs +42222 -42081
- package/vendor/Package.13.cjs +36 -36
- package/vendor/Package.13.mjs +24 -24
- package/vendor/Package.16.cjs +12351 -12233
- package/vendor/Package.16.mjs +12348 -12230
- package/vendor/Package.17.cjs +924 -924
- package/vendor/Package.17.mjs +943 -943
- package/vendor/Package.18.cjs +48229 -20
- package/vendor/Package.18.mjs +48192 -24
- package/vendor/Package.2.cjs +5824 -5853
- package/vendor/Package.2.mjs +5780 -5809
- package/vendor/Package.3.cjs +60 -60
- package/vendor/Package.3.mjs +85 -85
- package/vendor/Package.4.cjs +874 -884
- package/vendor/Package.4.mjs +877 -887
- package/vendor/Package.5.cjs +15 -19
- package/vendor/Package.5.mjs +10 -14
- package/vendor/Package.6.cjs +2058 -2067
- package/vendor/Package.6.mjs +2064 -2073
- package/vendor/Package.610.cjs +9 -9
- package/vendor/Package.611.cjs +39 -39
- package/vendor/Package.611.mjs +22 -22
- package/vendor/Package.612.cjs +33 -33
- package/vendor/Package.612.mjs +17 -17
- package/vendor/Package.613.cjs +62 -62
- package/vendor/Package.613.mjs +29 -29
- package/vendor/Package.62.cjs +295 -298
- package/vendor/Package.62.mjs +278 -281
- package/vendor/Package.63.cjs +354 -354
- package/vendor/Package.63.mjs +229 -229
- package/vendor/Package.64.cjs +74 -74
- package/vendor/Package.64.mjs +74 -74
- package/vendor/Package.65.cjs +1851 -1858
- package/vendor/Package.65.mjs +1693 -1700
- package/vendor/Package.66.cjs +16 -16
- package/vendor/Package.66.mjs +16 -16
- package/vendor/Package.67.cjs +87 -87
- package/vendor/Package.67.mjs +85 -85
- package/vendor/Package.68.cjs +14 -14
- package/vendor/Package.68.mjs +6 -6
- package/vendor/Package.69.cjs +8 -8
- package/vendor/Package.7.cjs +3 -3
- package/vendor/Package.7.mjs +3 -3
- package/vendor/Package.9.cjs +124 -138
- package/vendor/Package.9.mjs +121 -135
- package/vendor/TypeDef.internal.3.d.ts +0 -14
- package/vendor/Package.19.cjs +0 -37
- package/vendor/Package.19.mjs +0 -35
- package/vendor/Package.20.cjs +0 -37
- package/vendor/Package.20.mjs +0 -35
- package/vendor/Package.21.cjs +0 -37
- package/vendor/Package.21.mjs +0 -35
- package/vendor/Package.22.cjs +0 -37
- package/vendor/Package.22.mjs +0 -35
- package/vendor/Package.23.cjs +0 -37
- package/vendor/Package.23.mjs +0 -35
- package/vendor/Package.24.cjs +0 -37
- package/vendor/Package.24.mjs +0 -35
- package/vendor/Package.25.cjs +0 -37
- package/vendor/Package.25.mjs +0 -35
- package/vendor/Package.26.cjs +0 -37
- package/vendor/Package.26.mjs +0 -35
- package/vendor/Package.27.cjs +0 -37
- package/vendor/Package.27.mjs +0 -35
- package/vendor/Package.28.cjs +0 -37
- package/vendor/Package.28.mjs +0 -35
- package/vendor/Package.29.cjs +0 -40
- package/vendor/Package.29.mjs +0 -38
- package/vendor/Package.30.cjs +0 -41
- package/vendor/Package.30.mjs +0 -39
- package/vendor/Package.31.cjs +0 -72
- package/vendor/Package.31.mjs +0 -70
- package/vendor/Package.32.cjs +0 -37
- package/vendor/Package.32.mjs +0 -35
- package/vendor/Package.33.cjs +0 -37
- package/vendor/Package.33.mjs +0 -35
- package/vendor/Package.34.cjs +0 -46
- package/vendor/Package.34.mjs +0 -44
- package/vendor/Package.35.cjs +0 -34
- package/vendor/Package.35.mjs +0 -32
- package/vendor/Package.36.cjs +0 -40
- package/vendor/Package.36.mjs +0 -38
- package/vendor/Package.37.cjs +0 -36
- package/vendor/Package.37.mjs +0 -34
- package/vendor/Package.38.cjs +0 -52
- package/vendor/Package.38.mjs +0 -50
- package/vendor/Package.39.cjs +0 -41
- package/vendor/Package.39.mjs +0 -39
- package/vendor/Package.40.cjs +0 -42
- package/vendor/Package.40.mjs +0 -40
- package/vendor/Package.41.cjs +0 -53
- package/vendor/Package.41.mjs +0 -51
- package/vendor/Package.42.cjs +0 -53
- package/vendor/Package.42.mjs +0 -51
- package/vendor/Package.43.cjs +0 -40
- package/vendor/Package.43.mjs +0 -38
- package/vendor/Package.44.cjs +0 -46
- package/vendor/Package.44.mjs +0 -44
- package/vendor/Package.45.cjs +0 -53
- package/vendor/Package.45.mjs +0 -51
- package/vendor/Package.46.cjs +0 -59
- package/vendor/Package.46.mjs +0 -57
- package/vendor/Package.47.cjs +0 -65
- package/vendor/Package.47.mjs +0 -63
- package/vendor/Package.48.cjs +0 -38
- package/vendor/Package.48.mjs +0 -36
- package/vendor/Package.49.cjs +0 -38
- package/vendor/Package.49.mjs +0 -36
- package/vendor/Package.50.cjs +0 -36
- package/vendor/Package.50.mjs +0 -34
- package/vendor/Package.51.cjs +0 -43
- package/vendor/Package.51.mjs +0 -41
- package/vendor/Package.52.cjs +0 -37
- package/vendor/Package.52.mjs +0 -35
- package/vendor/Package.53.cjs +0 -43
- package/vendor/Package.53.mjs +0 -41
- package/vendor/Package.54.cjs +0 -55
- package/vendor/Package.54.mjs +0 -53
- package/vendor/Package.55.cjs +0 -37
- package/vendor/Package.55.mjs +0 -35
- package/vendor/Package.56.cjs +0 -37
- package/vendor/Package.56.mjs +0 -35
- package/vendor/Package.57.cjs +0 -37
- package/vendor/Package.57.mjs +0 -35
- package/vendor/Package.58.cjs +0 -45
- package/vendor/Package.58.mjs +0 -43
- package/vendor/Package.59.cjs +0 -53
- package/vendor/Package.59.mjs +0 -51
- package/vendor/Package.60.cjs +0 -47649
- package/vendor/Package.60.mjs +0 -47606
|
@@ -4,1763 +4,1769 @@ Object.defineProperty(exports, Symbol.toStringTag, {
|
|
|
4
4
|
value: "Module"
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const t = require("../../../vendor/Package.5.cjs");
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var e = {};
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var n = {};
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
(
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const n = new RegExp("^" + r + "$");
|
|
24
|
-
const getAllMatches = function(e, t) {
|
|
13
|
+
(function(t) {
|
|
14
|
+
"use strict";
|
|
15
|
+
const e = ":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";
|
|
16
|
+
const n = e + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
|
|
17
|
+
const s = "[" + e + "][" + n + "]*";
|
|
18
|
+
const i = new RegExp("^" + s + "$");
|
|
19
|
+
const r = function(t, e) {
|
|
20
|
+
const n = [];
|
|
21
|
+
let s = e.exec(t);
|
|
22
|
+
while (s) {
|
|
25
23
|
const i = [];
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const s = r.length;
|
|
31
|
-
for (let e = 0; e < s; e++) {
|
|
32
|
-
n.push(r[e]);
|
|
33
|
-
}
|
|
34
|
-
i.push(n);
|
|
35
|
-
r = t.exec(e);
|
|
24
|
+
i.startIndex = e.lastIndex - s[0].length;
|
|
25
|
+
const r = s.length;
|
|
26
|
+
for (let t = 0; t < r; t++) {
|
|
27
|
+
i.push(s[t]);
|
|
36
28
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
e
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
29
|
+
n.push(i);
|
|
30
|
+
s = e.exec(t);
|
|
31
|
+
}
|
|
32
|
+
return n;
|
|
33
|
+
};
|
|
34
|
+
const o = function(t) {
|
|
35
|
+
const e = i.exec(t);
|
|
36
|
+
return !(e === null || typeof e === "undefined");
|
|
37
|
+
};
|
|
38
|
+
t.isExist = function(t) {
|
|
39
|
+
return typeof t !== "undefined";
|
|
40
|
+
};
|
|
41
|
+
t.isEmptyObject = function(t) {
|
|
42
|
+
return Object.keys(t).length === 0;
|
|
43
|
+
};
|
|
44
|
+
t.merge = function(t, e, n) {
|
|
45
|
+
if (e) {
|
|
46
|
+
const s = Object.keys(e);
|
|
47
|
+
const i = s.length;
|
|
48
|
+
for (let r = 0; r < i; r++) {
|
|
49
|
+
if (n === "strict") {
|
|
50
|
+
t[s[r]] = [ e[s[r]] ];
|
|
51
|
+
} else {
|
|
52
|
+
t[s[r]] = e[s[r]];
|
|
59
53
|
}
|
|
60
54
|
}
|
|
61
|
-
}
|
|
62
|
-
e.getValue = function(t) {
|
|
63
|
-
if (e.isExist(t)) {
|
|
64
|
-
return t;
|
|
65
|
-
} else {
|
|
66
|
-
return "";
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
e.isName = isName;
|
|
70
|
-
e.getAllMatches = getAllMatches;
|
|
71
|
-
e.nameRegexp = r;
|
|
72
|
-
})(i);
|
|
73
|
-
return i;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
var n;
|
|
77
|
-
|
|
78
|
-
function requireValidator() {
|
|
79
|
-
if (n) return t;
|
|
80
|
-
n = 1;
|
|
81
|
-
"use strict";
|
|
82
|
-
const e = requireUtil();
|
|
83
|
-
const i = {
|
|
84
|
-
allowBooleanAttributes: false,
|
|
85
|
-
unpairedTags: []
|
|
55
|
+
}
|
|
86
56
|
};
|
|
87
|
-
t.
|
|
88
|
-
t
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (e[0] === "\ufeff") {
|
|
93
|
-
e = e.substr(1);
|
|
57
|
+
t.getValue = function(e) {
|
|
58
|
+
if (t.isExist(e)) {
|
|
59
|
+
return e;
|
|
60
|
+
} else {
|
|
61
|
+
return "";
|
|
94
62
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
63
|
+
};
|
|
64
|
+
t.isName = o;
|
|
65
|
+
t.getAllMatches = r;
|
|
66
|
+
t.nameRegexp = s;
|
|
67
|
+
})(n);
|
|
68
|
+
|
|
69
|
+
const s = t.getDefaultExportFromCjs(n);
|
|
70
|
+
|
|
71
|
+
"use strict";
|
|
72
|
+
|
|
73
|
+
const i = n;
|
|
74
|
+
|
|
75
|
+
const r = {
|
|
76
|
+
allowBooleanAttributes: false,
|
|
77
|
+
unpairedTags: []
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var o = e.validate = function(t, e) {
|
|
81
|
+
e = Object.assign({}, r, e);
|
|
82
|
+
const n = [];
|
|
83
|
+
let s = false;
|
|
84
|
+
let i = false;
|
|
85
|
+
if (t[0] === "\ufeff") {
|
|
86
|
+
t = t.substr(1);
|
|
87
|
+
}
|
|
88
|
+
for (let r = 0; r < t.length; r++) {
|
|
89
|
+
if (t[r] === "<" && t[r + 1] === "?") {
|
|
90
|
+
r += 2;
|
|
91
|
+
r = l(t, r);
|
|
92
|
+
if (r.err) return r;
|
|
93
|
+
} else if (t[r] === "<") {
|
|
94
|
+
let o = r;
|
|
95
|
+
r++;
|
|
96
|
+
if (t[r] === "!") {
|
|
97
|
+
r = u(t, r);
|
|
98
|
+
continue;
|
|
99
|
+
} else {
|
|
100
|
+
let f = false;
|
|
101
|
+
if (t[r] === "/") {
|
|
102
|
+
f = true;
|
|
103
|
+
r++;
|
|
104
|
+
}
|
|
105
|
+
let c = "";
|
|
106
|
+
for (;r < t.length && t[r] !== ">" && t[r] !== " " && t[r] !== "\t" && t[r] !== "\n" && t[r] !== "\r"; r++) {
|
|
107
|
+
c += t[r];
|
|
108
|
+
}
|
|
109
|
+
c = c.trim();
|
|
110
|
+
if (c[c.length - 1] === "/") {
|
|
111
|
+
c = c.substring(0, c.length - 1);
|
|
112
|
+
r--;
|
|
113
|
+
}
|
|
114
|
+
if (!b(c)) {
|
|
115
|
+
let e;
|
|
116
|
+
if (c.trim().length === 0) {
|
|
117
|
+
e = "Invalid space after '<'.";
|
|
118
|
+
} else {
|
|
119
|
+
e = "Tag '" + c + "' is an invalid name.";
|
|
115
120
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
return x("InvalidTag", e, E(t, r));
|
|
122
|
+
}
|
|
123
|
+
const d = h(t, r);
|
|
124
|
+
if (d === false) {
|
|
125
|
+
return x("InvalidAttr", "Attributes for '" + c + "' have open quote.", E(t, r));
|
|
126
|
+
}
|
|
127
|
+
let g = d.value;
|
|
128
|
+
r = d.index;
|
|
129
|
+
if (g[g.length - 1] === "/") {
|
|
130
|
+
const n = r - g.length;
|
|
131
|
+
g = g.substring(0, g.length - 1);
|
|
132
|
+
const i = p(g, e);
|
|
133
|
+
if (i === true) {
|
|
134
|
+
s = true;
|
|
135
|
+
} else {
|
|
136
|
+
return x(i.err.code, i.err.msg, E(t, n + i.err.line));
|
|
120
137
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
138
|
+
} else if (f) {
|
|
139
|
+
if (!d.tagClosed) {
|
|
140
|
+
return x("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", E(t, r));
|
|
141
|
+
} else if (g.trim().length > 0) {
|
|
142
|
+
return x("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", E(t, o));
|
|
143
|
+
} else if (n.length === 0) {
|
|
144
|
+
return x("InvalidTag", "Closing tag '" + c + "' has not been opened.", E(t, o));
|
|
145
|
+
} else {
|
|
146
|
+
const e = n.pop();
|
|
147
|
+
if (c !== e.tagName) {
|
|
148
|
+
let n = E(t, e.tagStartPos);
|
|
149
|
+
return x("InvalidTag", "Expected closing tag '" + e.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", E(t, o));
|
|
150
|
+
}
|
|
151
|
+
if (n.length == 0) {
|
|
152
|
+
i = true;
|
|
127
153
|
}
|
|
128
|
-
return getErrorObject("InvalidTag", t, getLineNumberForPosition(e, i));
|
|
129
154
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
155
|
+
} else {
|
|
156
|
+
const a = p(g, e);
|
|
157
|
+
if (a !== true) {
|
|
158
|
+
return x(a.err.code, a.err.msg, E(t, r - g.length + a.err.line));
|
|
133
159
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if (!
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
} else if (r
|
|
151
|
-
|
|
160
|
+
if (i === true) {
|
|
161
|
+
return x("InvalidXml", "Multiple possible root nodes found.", E(t, r));
|
|
162
|
+
} else if (e.unpairedTags.indexOf(c) !== -1) {} else {
|
|
163
|
+
n.push({
|
|
164
|
+
tagName: c,
|
|
165
|
+
tagStartPos: o
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
s = true;
|
|
169
|
+
}
|
|
170
|
+
for (r++; r < t.length; r++) {
|
|
171
|
+
if (t[r] === "<") {
|
|
172
|
+
if (t[r + 1] === "!") {
|
|
173
|
+
r++;
|
|
174
|
+
r = u(t, r);
|
|
175
|
+
continue;
|
|
176
|
+
} else if (t[r + 1] === "?") {
|
|
177
|
+
r = l(t, ++r);
|
|
178
|
+
if (r.err) return r;
|
|
152
179
|
} else {
|
|
153
|
-
|
|
154
|
-
if (l !== t.tagName) {
|
|
155
|
-
let i = getLineNumberForPosition(e, t.tagStartPos);
|
|
156
|
-
return getErrorObject("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + i.line + ", col " + i.col + ") instead of closing tag '" + l + "'.", getLineNumberForPosition(e, o));
|
|
157
|
-
}
|
|
158
|
-
if (r.length == 0) {
|
|
159
|
-
s = true;
|
|
160
|
-
}
|
|
180
|
+
break;
|
|
161
181
|
}
|
|
182
|
+
} else if (t[r] === "&") {
|
|
183
|
+
const e = m(t, r);
|
|
184
|
+
if (e == -1) return x("InvalidChar", "char '&' is not expected.", E(t, r));
|
|
185
|
+
r = e;
|
|
162
186
|
} else {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
return getErrorObject(a.err.code, a.err.msg, getLineNumberForPosition(e, i - f.length + a.err.line));
|
|
166
|
-
}
|
|
167
|
-
if (s === true) {
|
|
168
|
-
return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(e, i));
|
|
169
|
-
} else if (t.unpairedTags.indexOf(l) !== -1) {} else {
|
|
170
|
-
r.push({
|
|
171
|
-
tagName: l,
|
|
172
|
-
tagStartPos: o
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
n = true;
|
|
176
|
-
}
|
|
177
|
-
for (i++; i < e.length; i++) {
|
|
178
|
-
if (e[i] === "<") {
|
|
179
|
-
if (e[i + 1] === "!") {
|
|
180
|
-
i++;
|
|
181
|
-
i = readCommentAndCDATA(e, i);
|
|
182
|
-
continue;
|
|
183
|
-
} else if (e[i + 1] === "?") {
|
|
184
|
-
i = readPI(e, ++i);
|
|
185
|
-
if (i.err) return i;
|
|
186
|
-
} else {
|
|
187
|
-
break;
|
|
188
|
-
}
|
|
189
|
-
} else if (e[i] === "&") {
|
|
190
|
-
const t = validateAmpersand(e, i);
|
|
191
|
-
if (t == -1) return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(e, i));
|
|
192
|
-
i = t;
|
|
193
|
-
} else {
|
|
194
|
-
if (s === true && !isWhiteSpace(e[i])) {
|
|
195
|
-
return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(e, i));
|
|
196
|
-
}
|
|
187
|
+
if (i === true && !a(t[r])) {
|
|
188
|
+
return x("InvalidXml", "Extra text at the end", E(t, r));
|
|
197
189
|
}
|
|
198
190
|
}
|
|
199
|
-
if (e[i] === "<") {
|
|
200
|
-
i--;
|
|
201
|
-
}
|
|
202
191
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
continue;
|
|
192
|
+
if (t[r] === "<") {
|
|
193
|
+
r--;
|
|
206
194
|
}
|
|
207
|
-
return getErrorObject("InvalidChar", "char '" + e[i] + "' is not expected.", getLineNumberForPosition(e, i));
|
|
208
195
|
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
} else if (r.length == 1) {
|
|
213
|
-
return getErrorObject("InvalidTag", "Unclosed tag '" + r[0].tagName + "'.", getLineNumberForPosition(e, r[0].tagStartPos));
|
|
214
|
-
} else if (r.length > 0) {
|
|
215
|
-
return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(r.map((e => e.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", {
|
|
216
|
-
line: 1,
|
|
217
|
-
col: 1
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
return true;
|
|
221
|
-
};
|
|
222
|
-
function isWhiteSpace(e) {
|
|
223
|
-
return e === " " || e === "\t" || e === "\n" || e === "\r";
|
|
224
|
-
}
|
|
225
|
-
function readPI(e, t) {
|
|
226
|
-
const i = t;
|
|
227
|
-
for (;t < e.length; t++) {
|
|
228
|
-
if (e[t] == "?" || e[t] == " ") {
|
|
229
|
-
const r = e.substr(i, t - i);
|
|
230
|
-
if (t > 5 && r === "xml") {
|
|
231
|
-
return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(e, t));
|
|
232
|
-
} else if (e[t] == "?" && e[t + 1] == ">") {
|
|
233
|
-
t++;
|
|
234
|
-
break;
|
|
235
|
-
} else {
|
|
236
|
-
continue;
|
|
237
|
-
}
|
|
196
|
+
} else {
|
|
197
|
+
if (a(t[r])) {
|
|
198
|
+
continue;
|
|
238
199
|
}
|
|
200
|
+
return x("InvalidChar", "char '" + t[r] + "' is not expected.", E(t, r));
|
|
239
201
|
}
|
|
240
|
-
return t;
|
|
241
202
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
203
|
+
if (!s) {
|
|
204
|
+
return x("InvalidXml", "Start tag expected.", 1);
|
|
205
|
+
} else if (n.length == 1) {
|
|
206
|
+
return x("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", E(t, n[0].tagStartPos));
|
|
207
|
+
} else if (n.length > 0) {
|
|
208
|
+
return x("InvalidXml", "Invalid '" + JSON.stringify(n.map((t => t.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", {
|
|
209
|
+
line: 1,
|
|
210
|
+
col: 1
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
return true;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
function a(t) {
|
|
217
|
+
return t === " " || t === "\t" || t === "\n" || t === "\r";
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function l(t, e) {
|
|
221
|
+
const n = e;
|
|
222
|
+
for (;e < t.length; e++) {
|
|
223
|
+
if (t[e] == "?" || t[e] == " ") {
|
|
224
|
+
const s = t.substr(n, e - n);
|
|
225
|
+
if (e > 5 && s === "xml") {
|
|
226
|
+
return x("InvalidXml", "XML declaration allowed only at the start of the document.", E(t, e));
|
|
227
|
+
} else if (t[e] == "?" && t[e + 1] == ">") {
|
|
228
|
+
e++;
|
|
229
|
+
break;
|
|
230
|
+
} else {
|
|
231
|
+
continue;
|
|
268
232
|
}
|
|
269
233
|
}
|
|
270
|
-
return t;
|
|
271
234
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
235
|
+
return e;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function u(t, e) {
|
|
239
|
+
if (t.length > e + 5 && t[e + 1] === "-" && t[e + 2] === "-") {
|
|
240
|
+
for (e += 3; e < t.length; e++) {
|
|
241
|
+
if (t[e] === "-" && t[e + 1] === "-" && t[e + 2] === ">") {
|
|
242
|
+
e += 2;
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
} else if (t.length > e + 8 && t[e + 1] === "D" && t[e + 2] === "O" && t[e + 3] === "C" && t[e + 4] === "T" && t[e + 5] === "Y" && t[e + 6] === "P" && t[e + 7] === "E") {
|
|
247
|
+
let n = 1;
|
|
248
|
+
for (e += 8; e < t.length; e++) {
|
|
249
|
+
if (t[e] === "<") {
|
|
250
|
+
n++;
|
|
251
|
+
} else if (t[e] === ">") {
|
|
252
|
+
n--;
|
|
253
|
+
if (n === 0) {
|
|
288
254
|
break;
|
|
289
255
|
}
|
|
290
256
|
}
|
|
291
|
-
i += e[t];
|
|
292
257
|
}
|
|
293
|
-
|
|
294
|
-
|
|
258
|
+
} else if (t.length > e + 9 && t[e + 1] === "[" && t[e + 2] === "C" && t[e + 3] === "D" && t[e + 4] === "A" && t[e + 5] === "T" && t[e + 6] === "A" && t[e + 7] === "[") {
|
|
259
|
+
for (e += 8; e < t.length; e++) {
|
|
260
|
+
if (t[e] === "]" && t[e + 1] === "]" && t[e + 2] === ">") {
|
|
261
|
+
e += 2;
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
295
264
|
}
|
|
296
|
-
return {
|
|
297
|
-
value: i,
|
|
298
|
-
index: t,
|
|
299
|
-
tagClosed: o
|
|
300
|
-
};
|
|
301
265
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
if (
|
|
316
|
-
|
|
266
|
+
return e;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
const f = '"';
|
|
270
|
+
|
|
271
|
+
const c = "'";
|
|
272
|
+
|
|
273
|
+
function h(t, e) {
|
|
274
|
+
let n = "";
|
|
275
|
+
let s = "";
|
|
276
|
+
let i = false;
|
|
277
|
+
for (;e < t.length; e++) {
|
|
278
|
+
if (t[e] === f || t[e] === c) {
|
|
279
|
+
if (s === "") {
|
|
280
|
+
s = t[e];
|
|
281
|
+
} else if (s !== t[e]) {} else {
|
|
282
|
+
s = "";
|
|
317
283
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
284
|
+
} else if (t[e] === ">") {
|
|
285
|
+
if (s === "") {
|
|
286
|
+
i = true;
|
|
287
|
+
break;
|
|
322
288
|
}
|
|
323
289
|
}
|
|
324
|
-
|
|
290
|
+
n += t[e];
|
|
325
291
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
if (e[t] === "x") {
|
|
329
|
-
t++;
|
|
330
|
-
i = /[\da-fA-F]/;
|
|
331
|
-
}
|
|
332
|
-
for (;t < e.length; t++) {
|
|
333
|
-
if (e[t] === ";") return t;
|
|
334
|
-
if (!e[t].match(i)) break;
|
|
335
|
-
}
|
|
336
|
-
return -1;
|
|
292
|
+
if (s !== "") {
|
|
293
|
+
return false;
|
|
337
294
|
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
295
|
+
return {
|
|
296
|
+
value: n,
|
|
297
|
+
index: e,
|
|
298
|
+
tagClosed: i
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const d = new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
|
|
303
|
+
|
|
304
|
+
function p(t, e) {
|
|
305
|
+
const n = i.getAllMatches(t, d);
|
|
306
|
+
const s = {};
|
|
307
|
+
for (let t = 0; t < n.length; t++) {
|
|
308
|
+
if (n[t][1].length === 0) {
|
|
309
|
+
return x("InvalidAttr", "Attribute '" + n[t][2] + "' has no space in starting.", v(n[t]));
|
|
310
|
+
} else if (n[t][3] !== undefined && n[t][4] === undefined) {
|
|
311
|
+
return x("InvalidAttr", "Attribute '" + n[t][2] + "' is without value.", v(n[t]));
|
|
312
|
+
} else if (n[t][3] === undefined && !e.allowBooleanAttributes) {
|
|
313
|
+
return x("InvalidAttr", "boolean attribute '" + n[t][2] + "' is not allowed.", v(n[t]));
|
|
314
|
+
}
|
|
315
|
+
const i = n[t][2];
|
|
316
|
+
if (!N(i)) {
|
|
317
|
+
return x("InvalidAttr", "Attribute '" + i + "' is an invalid name.", v(n[t]));
|
|
318
|
+
}
|
|
319
|
+
if (!s.hasOwnProperty(i)) {
|
|
320
|
+
s[i] = 1;
|
|
321
|
+
} else {
|
|
322
|
+
return x("InvalidAttr", "Attribute '" + i + "' is repeated.", v(n[t]));
|
|
350
323
|
}
|
|
351
|
-
return t;
|
|
352
324
|
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
function validateAttrName(t) {
|
|
364
|
-
return e.isName(t);
|
|
325
|
+
return true;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
function g(t, e) {
|
|
329
|
+
let n = /\d/;
|
|
330
|
+
if (t[e] === "x") {
|
|
331
|
+
e++;
|
|
332
|
+
n = /[\da-fA-F]/;
|
|
365
333
|
}
|
|
366
|
-
|
|
367
|
-
|
|
334
|
+
for (;e < t.length; e++) {
|
|
335
|
+
if (t[e] === ";") return e;
|
|
336
|
+
if (!t[e].match(n)) break;
|
|
368
337
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
338
|
+
return -1;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function m(t, e) {
|
|
342
|
+
e++;
|
|
343
|
+
if (t[e] === ";") return -1;
|
|
344
|
+
if (t[e] === "#") {
|
|
345
|
+
e++;
|
|
346
|
+
return g(t, e);
|
|
375
347
|
}
|
|
376
|
-
|
|
377
|
-
|
|
348
|
+
let n = 0;
|
|
349
|
+
for (;e < t.length; e++, n++) {
|
|
350
|
+
if (t[e].match(/\w/) && n < 20) continue;
|
|
351
|
+
if (t[e] === ";") break;
|
|
352
|
+
return -1;
|
|
378
353
|
}
|
|
379
|
-
return
|
|
354
|
+
return e;
|
|
380
355
|
}
|
|
381
356
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
const e = {
|
|
390
|
-
preserveOrder: false,
|
|
391
|
-
attributeNamePrefix: "@_",
|
|
392
|
-
attributesGroupName: false,
|
|
393
|
-
textNodeName: "#text",
|
|
394
|
-
ignoreAttributes: true,
|
|
395
|
-
removeNSPrefix: false,
|
|
396
|
-
allowBooleanAttributes: false,
|
|
397
|
-
parseTagValue: true,
|
|
398
|
-
parseAttributeValue: false,
|
|
399
|
-
trimValues: true,
|
|
400
|
-
cdataPropName: false,
|
|
401
|
-
numberParseOptions: {
|
|
402
|
-
hex: true,
|
|
403
|
-
leadingZeros: true,
|
|
404
|
-
eNotation: true
|
|
405
|
-
},
|
|
406
|
-
tagValueProcessor: function(e, t) {
|
|
407
|
-
return t;
|
|
408
|
-
},
|
|
409
|
-
attributeValueProcessor: function(e, t) {
|
|
410
|
-
return t;
|
|
411
|
-
},
|
|
412
|
-
stopNodes: [],
|
|
413
|
-
alwaysCreateTextNode: false,
|
|
414
|
-
isArray: () => false,
|
|
415
|
-
commentPropName: false,
|
|
416
|
-
unpairedTags: [],
|
|
417
|
-
processEntities: true,
|
|
418
|
-
htmlEntities: false,
|
|
419
|
-
ignoreDeclaration: false,
|
|
420
|
-
ignorePiTags: false,
|
|
421
|
-
transformTagName: false,
|
|
422
|
-
transformAttributeName: false,
|
|
423
|
-
updateTag: function(e, t, i) {
|
|
424
|
-
return e;
|
|
357
|
+
function x(t, e, n) {
|
|
358
|
+
return {
|
|
359
|
+
err: {
|
|
360
|
+
code: t,
|
|
361
|
+
msg: e,
|
|
362
|
+
line: n.line || n,
|
|
363
|
+
col: n.col
|
|
425
364
|
}
|
|
426
365
|
};
|
|
427
|
-
|
|
428
|
-
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
function N(t) {
|
|
369
|
+
return i.isName(t);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
function b(t) {
|
|
373
|
+
return i.isName(t);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
function E(t, e) {
|
|
377
|
+
const n = t.substring(0, e).split(/\r?\n/);
|
|
378
|
+
return {
|
|
379
|
+
line: n.length,
|
|
380
|
+
col: n[n.length - 1].length + 1
|
|
429
381
|
};
|
|
430
|
-
s.buildOptions = buildOptions;
|
|
431
|
-
s.defaultOptions = e;
|
|
432
|
-
return s;
|
|
433
382
|
}
|
|
434
383
|
|
|
435
|
-
|
|
384
|
+
function v(t) {
|
|
385
|
+
return t.startIndex + t[1].length;
|
|
386
|
+
}
|
|
436
387
|
|
|
437
|
-
var
|
|
388
|
+
var y = {};
|
|
438
389
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
390
|
+
const T = {
|
|
391
|
+
preserveOrder: false,
|
|
392
|
+
attributeNamePrefix: "@_",
|
|
393
|
+
attributesGroupName: false,
|
|
394
|
+
textNodeName: "#text",
|
|
395
|
+
ignoreAttributes: true,
|
|
396
|
+
removeNSPrefix: false,
|
|
397
|
+
allowBooleanAttributes: false,
|
|
398
|
+
parseTagValue: true,
|
|
399
|
+
parseAttributeValue: false,
|
|
400
|
+
trimValues: true,
|
|
401
|
+
cdataPropName: false,
|
|
402
|
+
numberParseOptions: {
|
|
403
|
+
hex: true,
|
|
404
|
+
leadingZeros: true,
|
|
405
|
+
eNotation: true
|
|
406
|
+
},
|
|
407
|
+
tagValueProcessor: function(t, e) {
|
|
408
|
+
return e;
|
|
409
|
+
},
|
|
410
|
+
attributeValueProcessor: function(t, e) {
|
|
411
|
+
return e;
|
|
412
|
+
},
|
|
413
|
+
stopNodes: [],
|
|
414
|
+
alwaysCreateTextNode: false,
|
|
415
|
+
isArray: () => false,
|
|
416
|
+
commentPropName: false,
|
|
417
|
+
unpairedTags: [],
|
|
418
|
+
processEntities: true,
|
|
419
|
+
htmlEntities: false,
|
|
420
|
+
ignoreDeclaration: false,
|
|
421
|
+
ignorePiTags: false,
|
|
422
|
+
transformTagName: false,
|
|
423
|
+
transformAttributeName: false,
|
|
424
|
+
updateTag: function(t, e, n) {
|
|
425
|
+
return t;
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
const O = function(t) {
|
|
430
|
+
return Object.assign({}, T, t);
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
var P = y.buildOptions = O;
|
|
434
|
+
|
|
435
|
+
var w = y.defaultOptions = T;
|
|
436
|
+
|
|
437
|
+
"use strict";
|
|
438
|
+
|
|
439
|
+
class XmlNode {
|
|
440
|
+
constructor(t) {
|
|
441
|
+
this.tagname = t;
|
|
442
|
+
this.child = [];
|
|
443
|
+
this[":@"] = {};
|
|
444
|
+
}
|
|
445
|
+
add(t, e) {
|
|
446
|
+
if (t === "__proto__") t = "#__proto__";
|
|
447
|
+
this.child.push({
|
|
448
|
+
[t]: e
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
addChild(t) {
|
|
452
|
+
if (t.tagname === "__proto__") t.tagname = "#__proto__";
|
|
453
|
+
if (t[":@"] && Object.keys(t[":@"]).length > 0) {
|
|
451
454
|
this.child.push({
|
|
452
|
-
[
|
|
455
|
+
[t.tagname]: t.child,
|
|
456
|
+
[":@"]: t[":@"]
|
|
457
|
+
});
|
|
458
|
+
} else {
|
|
459
|
+
this.child.push({
|
|
460
|
+
[t.tagname]: t.child
|
|
453
461
|
});
|
|
454
|
-
}
|
|
455
|
-
addChild(e) {
|
|
456
|
-
if (e.tagname === "__proto__") e.tagname = "#__proto__";
|
|
457
|
-
if (e[":@"] && Object.keys(e[":@"]).length > 0) {
|
|
458
|
-
this.child.push({
|
|
459
|
-
[e.tagname]: e.child,
|
|
460
|
-
[":@"]: e[":@"]
|
|
461
|
-
});
|
|
462
|
-
} else {
|
|
463
|
-
this.child.push({
|
|
464
|
-
[e.tagname]: e.child
|
|
465
|
-
});
|
|
466
|
-
}
|
|
467
462
|
}
|
|
468
463
|
}
|
|
469
|
-
a = XmlNode;
|
|
470
|
-
return a;
|
|
471
464
|
}
|
|
472
465
|
|
|
473
|
-
var
|
|
466
|
+
var A = XmlNode;
|
|
474
467
|
|
|
475
|
-
|
|
468
|
+
const C = t.getDefaultExportFromCjs(A);
|
|
476
469
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
const
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
s = false;
|
|
505
|
-
r--;
|
|
506
|
-
}
|
|
507
|
-
} else {
|
|
508
|
-
r--;
|
|
509
|
-
}
|
|
510
|
-
if (r === 0) {
|
|
511
|
-
break;
|
|
470
|
+
const I = n;
|
|
471
|
+
|
|
472
|
+
function j(t, e) {
|
|
473
|
+
const n = {};
|
|
474
|
+
if (t[e + 3] === "O" && t[e + 4] === "C" && t[e + 5] === "T" && t[e + 6] === "Y" && t[e + 7] === "P" && t[e + 8] === "E") {
|
|
475
|
+
e = e + 9;
|
|
476
|
+
let s = 1;
|
|
477
|
+
let i = false, r = false;
|
|
478
|
+
let o = "";
|
|
479
|
+
for (;e < t.length; e++) {
|
|
480
|
+
if (t[e] === "<" && !r) {
|
|
481
|
+
if (i && D(t, e)) {
|
|
482
|
+
e += 7;
|
|
483
|
+
let s, i;
|
|
484
|
+
[s, i, e] = S(t, e + 1);
|
|
485
|
+
if (i.indexOf("&") === -1) n[_(s)] = {
|
|
486
|
+
regx: RegExp(`&${s};`, "g"),
|
|
487
|
+
val: i
|
|
488
|
+
};
|
|
489
|
+
} else if (i && V(t, e)) e += 8; else if (i && k(t, e)) e += 8; else if (i && $(t, e)) e += 9; else if (F) r = true; else throw new Error("Invalid DOCTYPE");
|
|
490
|
+
s++;
|
|
491
|
+
o = "";
|
|
492
|
+
} else if (t[e] === ">") {
|
|
493
|
+
if (r) {
|
|
494
|
+
if (t[e - 1] === "-" && t[e - 2] === "-") {
|
|
495
|
+
r = false;
|
|
496
|
+
s--;
|
|
512
497
|
}
|
|
513
|
-
} else if (e[t] === "[") {
|
|
514
|
-
n = true;
|
|
515
498
|
} else {
|
|
516
|
-
|
|
499
|
+
s--;
|
|
517
500
|
}
|
|
501
|
+
if (s === 0) {
|
|
502
|
+
break;
|
|
503
|
+
}
|
|
504
|
+
} else if (t[e] === "[") {
|
|
505
|
+
i = true;
|
|
506
|
+
} else {
|
|
507
|
+
o += t[e];
|
|
518
508
|
}
|
|
519
|
-
if (r !== 0) {
|
|
520
|
-
throw new Error(`Unclosed DOCTYPE`);
|
|
521
|
-
}
|
|
522
|
-
} else {
|
|
523
|
-
throw new Error(`Invalid Tag instead of DOCTYPE`);
|
|
524
509
|
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
i: t
|
|
528
|
-
};
|
|
529
|
-
}
|
|
530
|
-
function readEntityExp(e, t) {
|
|
531
|
-
let i = "";
|
|
532
|
-
for (;t < e.length && (e[t] !== "'" && e[t] !== '"'); t++) {
|
|
533
|
-
i += e[t];
|
|
510
|
+
if (s !== 0) {
|
|
511
|
+
throw new Error(`Unclosed DOCTYPE`);
|
|
534
512
|
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
const r = e[t++];
|
|
538
|
-
let n = "";
|
|
539
|
-
for (;t < e.length && e[t] !== r; t++) {
|
|
540
|
-
n += e[t];
|
|
541
|
-
}
|
|
542
|
-
return [ i, n, t ];
|
|
513
|
+
} else {
|
|
514
|
+
throw new Error(`Invalid Tag instead of DOCTYPE`);
|
|
543
515
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
return false;
|
|
555
|
-
}
|
|
556
|
-
function isAttlist(e, t) {
|
|
557
|
-
if (e[t + 1] === "!" && e[t + 2] === "A" && e[t + 3] === "T" && e[t + 4] === "T" && e[t + 5] === "L" && e[t + 6] === "I" && e[t + 7] === "S" && e[t + 8] === "T") return true;
|
|
558
|
-
return false;
|
|
559
|
-
}
|
|
560
|
-
function isNotation(e, t) {
|
|
561
|
-
if (e[t + 1] === "!" && e[t + 2] === "N" && e[t + 3] === "O" && e[t + 4] === "T" && e[t + 5] === "A" && e[t + 6] === "T" && e[t + 7] === "I" && e[t + 8] === "O" && e[t + 9] === "N") return true;
|
|
562
|
-
return false;
|
|
516
|
+
return {
|
|
517
|
+
entities: n,
|
|
518
|
+
i: e
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
function S(t, e) {
|
|
523
|
+
let n = "";
|
|
524
|
+
for (;e < t.length && (t[e] !== "'" && t[e] !== '"'); e++) {
|
|
525
|
+
n += t[e];
|
|
563
526
|
}
|
|
564
|
-
|
|
565
|
-
|
|
527
|
+
n = n.trim();
|
|
528
|
+
if (n.indexOf(" ") !== -1) throw new Error("External entites are not supported");
|
|
529
|
+
const s = t[e++];
|
|
530
|
+
let i = "";
|
|
531
|
+
for (;e < t.length && t[e] !== s; e++) {
|
|
532
|
+
i += t[e];
|
|
566
533
|
}
|
|
567
|
-
|
|
568
|
-
return u;
|
|
534
|
+
return [ n, i, e ];
|
|
569
535
|
}
|
|
570
536
|
|
|
571
|
-
|
|
537
|
+
function F(t, e) {
|
|
538
|
+
if (t[e + 1] === "!" && t[e + 2] === "-" && t[e + 3] === "-") return true;
|
|
539
|
+
return false;
|
|
540
|
+
}
|
|
572
541
|
|
|
573
|
-
|
|
542
|
+
function D(t, e) {
|
|
543
|
+
if (t[e + 1] === "!" && t[e + 2] === "E" && t[e + 3] === "N" && t[e + 4] === "T" && t[e + 5] === "I" && t[e + 6] === "T" && t[e + 7] === "Y") return true;
|
|
544
|
+
return false;
|
|
545
|
+
}
|
|
574
546
|
|
|
575
|
-
function
|
|
576
|
-
if (
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
547
|
+
function V(t, e) {
|
|
548
|
+
if (t[e + 1] === "!" && t[e + 2] === "E" && t[e + 3] === "L" && t[e + 4] === "E" && t[e + 5] === "M" && t[e + 6] === "E" && t[e + 7] === "N" && t[e + 8] === "T") return true;
|
|
549
|
+
return false;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
function k(t, e) {
|
|
553
|
+
if (t[e + 1] === "!" && t[e + 2] === "A" && t[e + 3] === "T" && t[e + 4] === "T" && t[e + 5] === "L" && t[e + 6] === "I" && t[e + 7] === "S" && t[e + 8] === "T") return true;
|
|
554
|
+
return false;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
function $(t, e) {
|
|
558
|
+
if (t[e + 1] === "!" && t[e + 2] === "N" && t[e + 3] === "O" && t[e + 4] === "T" && t[e + 5] === "A" && t[e + 6] === "T" && t[e + 7] === "I" && t[e + 8] === "O" && t[e + 9] === "N") return true;
|
|
559
|
+
return false;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
function _(t) {
|
|
563
|
+
if (I.isName(t)) return t; else throw new Error(`Invalid entity name ${t}`);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
var L = j;
|
|
567
|
+
|
|
568
|
+
const M = t.getDefaultExportFromCjs(L);
|
|
569
|
+
|
|
570
|
+
const X = /^[-+]?0x[a-fA-F0-9]+$/;
|
|
571
|
+
|
|
572
|
+
const B = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/;
|
|
573
|
+
|
|
574
|
+
const G = {
|
|
575
|
+
hex: true,
|
|
576
|
+
leadingZeros: true,
|
|
577
|
+
decimalPoint: ".",
|
|
578
|
+
eNotation: true
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
function R(t, e = {}) {
|
|
582
|
+
e = Object.assign({}, G, e);
|
|
583
|
+
if (!t || typeof t !== "string") return t;
|
|
584
|
+
let n = t.trim();
|
|
585
|
+
if (e.skipLike !== undefined && e.skipLike.test(n)) return t; else if (t === "0") return 0; else if (e.hex && X.test(n)) {
|
|
586
|
+
return Z(n, 16);
|
|
587
|
+
} else if (n.search(/[eE]/) !== -1) {
|
|
588
|
+
const s = n.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);
|
|
589
|
+
if (s) {
|
|
590
|
+
if (e.leadingZeros) {
|
|
591
|
+
n = (s[1] || "") + s[3];
|
|
603
592
|
} else {
|
|
604
|
-
|
|
593
|
+
if (s[2] === "0" && s[3][0] === ".") {} else {
|
|
594
|
+
return t;
|
|
595
|
+
}
|
|
605
596
|
}
|
|
597
|
+
return e.eNotation ? Number(n) : t;
|
|
606
598
|
} else {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
599
|
+
return t;
|
|
600
|
+
}
|
|
601
|
+
} else {
|
|
602
|
+
const s = B.exec(n);
|
|
603
|
+
if (s) {
|
|
604
|
+
const i = s[1];
|
|
605
|
+
const r = s[2];
|
|
606
|
+
let o = U(s[3]);
|
|
607
|
+
if (!e.leadingZeros && r.length > 0 && i && n[2] !== ".") return t; else if (!e.leadingZeros && r.length > 0 && !i && n[1] !== ".") return t; else if (e.leadingZeros && r === t) return 0; else {
|
|
608
|
+
const s = Number(n);
|
|
609
|
+
const a = "" + s;
|
|
610
|
+
if (a.search(/[eE]/) !== -1) {
|
|
611
|
+
if (e.eNotation) return s; else return t;
|
|
612
|
+
} else if (n.indexOf(".") !== -1) {
|
|
613
|
+
if (a === "0" && o === "") return s; else if (a === o) return s; else if (i && a === "-" + o) return s; else return t;
|
|
614
|
+
}
|
|
615
|
+
if (r) {
|
|
616
|
+
return o === a || i + o === a ? s : t;
|
|
617
|
+
} else {
|
|
618
|
+
return n === a || n === i + a ? s : t;
|
|
625
619
|
}
|
|
626
|
-
} else {
|
|
627
|
-
return r;
|
|
628
620
|
}
|
|
621
|
+
} else {
|
|
622
|
+
return t;
|
|
629
623
|
}
|
|
630
624
|
}
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
return
|
|
638
|
-
}
|
|
639
|
-
function parse_int(e, t) {
|
|
640
|
-
if (parseInt) return parseInt(e, t); else if (Number.parseInt) return Number.parseInt(e, t); else if (window && window.parseInt) return window.parseInt(e, t); else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
function U(t) {
|
|
628
|
+
if (t && t.indexOf(".") !== -1) {
|
|
629
|
+
t = t.replace(/0+$/, "");
|
|
630
|
+
if (t === ".") t = "0"; else if (t[0] === ".") t = "0" + t; else if (t[t.length - 1] === ".") t = t.substr(0, t.length - 1);
|
|
631
|
+
return t;
|
|
641
632
|
}
|
|
642
|
-
|
|
643
|
-
return d;
|
|
633
|
+
return t;
|
|
644
634
|
}
|
|
645
635
|
|
|
646
|
-
|
|
636
|
+
function Z(t, e) {
|
|
637
|
+
if (parseInt) return parseInt(t, e); else if (Number.parseInt) return Number.parseInt(t, e); else if (window && window.parseInt) return window.parseInt(t, e); else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
|
638
|
+
}
|
|
647
639
|
|
|
648
|
-
var
|
|
640
|
+
var Y = R;
|
|
649
641
|
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
return true;
|
|
662
|
-
}
|
|
663
|
-
if (i instanceof RegExp && i.test(t)) {
|
|
664
|
-
return true;
|
|
665
|
-
}
|
|
642
|
+
const q = t.getDefaultExportFromCjs(Y);
|
|
643
|
+
|
|
644
|
+
function W(t) {
|
|
645
|
+
if (typeof t === "function") {
|
|
646
|
+
return t;
|
|
647
|
+
}
|
|
648
|
+
if (Array.isArray(t)) {
|
|
649
|
+
return e => {
|
|
650
|
+
for (const n of t) {
|
|
651
|
+
if (typeof n === "string" && e === n) {
|
|
652
|
+
return true;
|
|
666
653
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
654
|
+
if (n instanceof RegExp && n.test(e)) {
|
|
655
|
+
return true;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
};
|
|
670
659
|
}
|
|
671
|
-
|
|
672
|
-
return g;
|
|
660
|
+
return () => false;
|
|
673
661
|
}
|
|
674
662
|
|
|
675
|
-
var
|
|
663
|
+
var z = W;
|
|
676
664
|
|
|
677
|
-
|
|
665
|
+
const J = t.getDefaultExportFromCjs(z);
|
|
678
666
|
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
667
|
+
"use strict";
|
|
668
|
+
|
|
669
|
+
const H = n;
|
|
670
|
+
|
|
671
|
+
const K = A;
|
|
672
|
+
|
|
673
|
+
const Q = L;
|
|
674
|
+
|
|
675
|
+
const tt = Y;
|
|
676
|
+
|
|
677
|
+
const et = z;
|
|
678
|
+
|
|
679
|
+
let nt = class OrderedObjParser {
|
|
680
|
+
constructor(t) {
|
|
681
|
+
this.options = t;
|
|
682
|
+
this.currentNode = null;
|
|
683
|
+
this.tagsNodeStack = [];
|
|
684
|
+
this.docTypeEntities = {};
|
|
685
|
+
this.lastEntities = {
|
|
686
|
+
apos: {
|
|
687
|
+
regex: /&(apos|#39|#x27);/g,
|
|
688
|
+
val: "'"
|
|
689
|
+
},
|
|
690
|
+
gt: {
|
|
691
|
+
regex: /&(gt|#62|#x3E);/g,
|
|
692
|
+
val: ">"
|
|
693
|
+
},
|
|
694
|
+
lt: {
|
|
695
|
+
regex: /&(lt|#60|#x3C);/g,
|
|
696
|
+
val: "<"
|
|
697
|
+
},
|
|
698
|
+
quot: {
|
|
699
|
+
regex: /&(quot|#34|#x22);/g,
|
|
700
|
+
val: '"'
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
this.ampEntity = {
|
|
704
|
+
regex: /&(amp|#38|#x26);/g,
|
|
705
|
+
val: "&"
|
|
706
|
+
};
|
|
707
|
+
this.htmlEntities = {
|
|
708
|
+
space: {
|
|
709
|
+
regex: /&(nbsp|#160);/g,
|
|
710
|
+
val: " "
|
|
711
|
+
},
|
|
712
|
+
cent: {
|
|
713
|
+
regex: /&(cent|#162);/g,
|
|
714
|
+
val: "¢"
|
|
715
|
+
},
|
|
716
|
+
pound: {
|
|
717
|
+
regex: /&(pound|#163);/g,
|
|
718
|
+
val: "£"
|
|
719
|
+
},
|
|
720
|
+
yen: {
|
|
721
|
+
regex: /&(yen|#165);/g,
|
|
722
|
+
val: "¥"
|
|
723
|
+
},
|
|
724
|
+
euro: {
|
|
725
|
+
regex: /&(euro|#8364);/g,
|
|
726
|
+
val: "€"
|
|
727
|
+
},
|
|
728
|
+
copyright: {
|
|
729
|
+
regex: /&(copy|#169);/g,
|
|
730
|
+
val: "©"
|
|
731
|
+
},
|
|
732
|
+
reg: {
|
|
733
|
+
regex: /&(reg|#174);/g,
|
|
734
|
+
val: "®"
|
|
735
|
+
},
|
|
736
|
+
inr: {
|
|
737
|
+
regex: /&(inr|#8377);/g,
|
|
738
|
+
val: "₹"
|
|
739
|
+
},
|
|
740
|
+
num_dec: {
|
|
741
|
+
regex: /&#([0-9]{1,7});/g,
|
|
742
|
+
val: (t, e) => String.fromCharCode(Number.parseInt(e, 10))
|
|
743
|
+
},
|
|
744
|
+
num_hex: {
|
|
745
|
+
regex: /&#x([0-9a-fA-F]{1,6});/g,
|
|
746
|
+
val: (t, e) => String.fromCharCode(Number.parseInt(e, 16))
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
this.addExternalEntities = st;
|
|
750
|
+
this.parseXml = lt;
|
|
751
|
+
this.parseTextData = it;
|
|
752
|
+
this.resolveNameSpace = rt;
|
|
753
|
+
this.buildAttributesMap = at;
|
|
754
|
+
this.isItStopNode = ht;
|
|
755
|
+
this.replaceEntitiesValue = ft;
|
|
756
|
+
this.readStopNodeData = mt;
|
|
757
|
+
this.saveTextToParentTag = ct;
|
|
758
|
+
this.addChild = ut;
|
|
759
|
+
this.ignoreAttributesFn = et(this.options.ignoreAttributes);
|
|
770
760
|
}
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
function st(t) {
|
|
764
|
+
const e = Object.keys(t);
|
|
765
|
+
for (let n = 0; n < e.length; n++) {
|
|
766
|
+
const s = e[n];
|
|
767
|
+
this.lastEntities[s] = {
|
|
768
|
+
regex: new RegExp("&" + s + ";", "g"),
|
|
769
|
+
val: t[s]
|
|
770
|
+
};
|
|
780
771
|
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
function it(t, e, n, s, i, r, o) {
|
|
775
|
+
if (t !== undefined) {
|
|
776
|
+
if (this.options.trimValues && !s) {
|
|
777
|
+
t = t.trim();
|
|
778
|
+
}
|
|
779
|
+
if (t.length > 0) {
|
|
780
|
+
if (!o) t = this.replaceEntitiesValue(t);
|
|
781
|
+
const s = this.options.tagValueProcessor(e, t, n, i, r);
|
|
782
|
+
if (s === null || s === undefined) {
|
|
783
|
+
return t;
|
|
784
|
+
} else if (typeof s !== typeof t || s !== t) {
|
|
785
|
+
return s;
|
|
786
|
+
} else if (this.options.trimValues) {
|
|
787
|
+
return xt(t, this.options.parseTagValue, this.options.numberParseOptions);
|
|
788
|
+
} else {
|
|
789
|
+
const e = t.trim();
|
|
790
|
+
if (e === t) {
|
|
791
|
+
return xt(t, this.options.parseTagValue, this.options.numberParseOptions);
|
|
795
792
|
} else {
|
|
796
|
-
|
|
797
|
-
if (t === e) {
|
|
798
|
-
return parseValue(e, this.options.parseTagValue, this.options.numberParseOptions);
|
|
799
|
-
} else {
|
|
800
|
-
return e;
|
|
801
|
-
}
|
|
793
|
+
return t;
|
|
802
794
|
}
|
|
803
795
|
}
|
|
804
796
|
}
|
|
805
797
|
}
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
function rt(t) {
|
|
801
|
+
if (this.options.removeNSPrefix) {
|
|
802
|
+
const e = t.split(":");
|
|
803
|
+
const n = t.charAt(0) === "/" ? "/" : "";
|
|
804
|
+
if (e[0] === "xmlns") {
|
|
805
|
+
return "";
|
|
806
|
+
}
|
|
807
|
+
if (e.length === 2) {
|
|
808
|
+
t = n + e[1];
|
|
816
809
|
}
|
|
817
|
-
return e;
|
|
818
810
|
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
811
|
+
return t;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
const ot = new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
|
|
815
|
+
|
|
816
|
+
function at(t, e, n) {
|
|
817
|
+
if (this.options.ignoreAttributes !== true && typeof t === "string") {
|
|
818
|
+
const n = H.getAllMatches(t, ot);
|
|
819
|
+
const s = n.length;
|
|
820
|
+
const i = {};
|
|
821
|
+
for (let t = 0; t < s; t++) {
|
|
822
|
+
const s = this.resolveNameSpace(n[t][1]);
|
|
823
|
+
if (this.ignoreAttributesFn(s, e)) {
|
|
824
|
+
continue;
|
|
825
|
+
}
|
|
826
|
+
let r = n[t][4];
|
|
827
|
+
let o = this.options.attributeNamePrefix + s;
|
|
828
|
+
if (s.length) {
|
|
829
|
+
if (this.options.transformAttributeName) {
|
|
830
|
+
o = this.options.transformAttributeName(o);
|
|
829
831
|
}
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
s = this.options.transformAttributeName(s);
|
|
832
|
+
if (o === "__proto__") o = "#__proto__";
|
|
833
|
+
if (r !== undefined) {
|
|
834
|
+
if (this.options.trimValues) {
|
|
835
|
+
r = r.trim();
|
|
835
836
|
}
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
o[s] = n;
|
|
845
|
-
} else if (typeof e !== typeof n || e !== n) {
|
|
846
|
-
o[s] = e;
|
|
847
|
-
} else {
|
|
848
|
-
o[s] = parseValue(n, this.options.parseAttributeValue, this.options.numberParseOptions);
|
|
849
|
-
}
|
|
850
|
-
} else if (this.options.allowBooleanAttributes) {
|
|
851
|
-
o[s] = true;
|
|
837
|
+
r = this.replaceEntitiesValue(r);
|
|
838
|
+
const t = this.options.attributeValueProcessor(s, r, e);
|
|
839
|
+
if (t === null || t === undefined) {
|
|
840
|
+
i[o] = r;
|
|
841
|
+
} else if (typeof t !== typeof r || t !== r) {
|
|
842
|
+
i[o] = t;
|
|
843
|
+
} else {
|
|
844
|
+
i[o] = xt(r, this.options.parseAttributeValue, this.options.numberParseOptions);
|
|
852
845
|
}
|
|
846
|
+
} else if (this.options.allowBooleanAttributes) {
|
|
847
|
+
i[o] = true;
|
|
853
848
|
}
|
|
854
849
|
}
|
|
855
|
-
if (!Object.keys(o).length) {
|
|
856
|
-
return;
|
|
857
|
-
}
|
|
858
|
-
if (this.options.attributesGroupName) {
|
|
859
|
-
const e = {};
|
|
860
|
-
e[this.options.attributesGroupName] = o;
|
|
861
|
-
return e;
|
|
862
|
-
}
|
|
863
|
-
return o;
|
|
864
850
|
}
|
|
851
|
+
if (!Object.keys(i).length) {
|
|
852
|
+
return;
|
|
853
|
+
}
|
|
854
|
+
if (this.options.attributesGroupName) {
|
|
855
|
+
const t = {};
|
|
856
|
+
t[this.options.attributesGroupName] = i;
|
|
857
|
+
return t;
|
|
858
|
+
}
|
|
859
|
+
return i;
|
|
865
860
|
}
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
if (this.options.transformTagName) {
|
|
885
|
-
i = this.options.transformTagName(i);
|
|
886
|
-
}
|
|
887
|
-
if (n) {
|
|
888
|
-
s = this.saveTextToParentTag(s, n, o);
|
|
889
|
-
}
|
|
890
|
-
const r = o.substring(o.lastIndexOf(".") + 1);
|
|
891
|
-
if (i && this.options.unpairedTags.indexOf(i) !== -1) {
|
|
892
|
-
throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);
|
|
893
|
-
}
|
|
894
|
-
let l = 0;
|
|
895
|
-
if (r && this.options.unpairedTags.indexOf(r) !== -1) {
|
|
896
|
-
l = o.lastIndexOf(".", o.lastIndexOf(".") - 1);
|
|
897
|
-
this.tagsNodeStack.pop();
|
|
898
|
-
} else {
|
|
899
|
-
l = o.lastIndexOf(".");
|
|
900
|
-
}
|
|
901
|
-
o = o.substring(0, l);
|
|
902
|
-
n = this.tagsNodeStack.pop();
|
|
903
|
-
s = "";
|
|
904
|
-
a = t;
|
|
905
|
-
} else if (e[a + 1] === "?") {
|
|
906
|
-
let i = readTagExp(e, a, false, "?>");
|
|
907
|
-
if (!i) throw new Error("Pi Tag is not closed.");
|
|
908
|
-
s = this.saveTextToParentTag(s, n, o);
|
|
909
|
-
if (this.options.ignoreDeclaration && i.tagName === "?xml" || this.options.ignorePiTags) {} else {
|
|
910
|
-
const e = new t(i.tagName);
|
|
911
|
-
e.add(this.options.textNodeName, "");
|
|
912
|
-
if (i.tagName !== i.tagExp && i.attrExpPresent) {
|
|
913
|
-
e[":@"] = this.buildAttributesMap(i.tagExp, o, i.tagName);
|
|
914
|
-
}
|
|
915
|
-
this.addChild(n, e, o);
|
|
916
|
-
}
|
|
917
|
-
a = i.closeIndex + 1;
|
|
918
|
-
} else if (e.substr(a + 1, 3) === "!--") {
|
|
919
|
-
const t = findClosingIndex(e, "--\x3e", a + 4, "Comment is not closed.");
|
|
920
|
-
if (this.options.commentPropName) {
|
|
921
|
-
const i = e.substring(a + 4, t - 2);
|
|
922
|
-
s = this.saveTextToParentTag(s, n, o);
|
|
923
|
-
n.add(this.options.commentPropName, [ {
|
|
924
|
-
[this.options.textNodeName]: i
|
|
925
|
-
} ]);
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
const lt = function(t) {
|
|
864
|
+
t = t.replace(/\r\n?/g, "\n");
|
|
865
|
+
const e = new K("!xml");
|
|
866
|
+
let n = e;
|
|
867
|
+
let s = "";
|
|
868
|
+
let i = "";
|
|
869
|
+
for (let r = 0; r < t.length; r++) {
|
|
870
|
+
const o = t[r];
|
|
871
|
+
if (o === "<") {
|
|
872
|
+
if (t[r + 1] === "/") {
|
|
873
|
+
const e = pt(t, ">", r, "Closing Tag is not closed.");
|
|
874
|
+
let o = t.substring(r + 2, e).trim();
|
|
875
|
+
if (this.options.removeNSPrefix) {
|
|
876
|
+
const t = o.indexOf(":");
|
|
877
|
+
if (t !== -1) {
|
|
878
|
+
o = o.substr(t + 1);
|
|
926
879
|
}
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
880
|
+
}
|
|
881
|
+
if (this.options.transformTagName) {
|
|
882
|
+
o = this.options.transformTagName(o);
|
|
883
|
+
}
|
|
884
|
+
if (n) {
|
|
885
|
+
s = this.saveTextToParentTag(s, n, i);
|
|
886
|
+
}
|
|
887
|
+
const a = i.substring(i.lastIndexOf(".") + 1);
|
|
888
|
+
if (o && this.options.unpairedTags.indexOf(o) !== -1) {
|
|
889
|
+
throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);
|
|
890
|
+
}
|
|
891
|
+
let l = 0;
|
|
892
|
+
if (a && this.options.unpairedTags.indexOf(a) !== -1) {
|
|
893
|
+
l = i.lastIndexOf(".", i.lastIndexOf(".") - 1);
|
|
894
|
+
this.tagsNodeStack.pop();
|
|
895
|
+
} else {
|
|
896
|
+
l = i.lastIndexOf(".");
|
|
897
|
+
}
|
|
898
|
+
i = i.substring(0, l);
|
|
899
|
+
n = this.tagsNodeStack.pop();
|
|
900
|
+
s = "";
|
|
901
|
+
r = e;
|
|
902
|
+
} else if (t[r + 1] === "?") {
|
|
903
|
+
let e = gt(t, r, false, "?>");
|
|
904
|
+
if (!e) throw new Error("Pi Tag is not closed.");
|
|
905
|
+
s = this.saveTextToParentTag(s, n, i);
|
|
906
|
+
if (this.options.ignoreDeclaration && e.tagName === "?xml" || this.options.ignorePiTags) {} else {
|
|
907
|
+
const t = new K(e.tagName);
|
|
908
|
+
t.add(this.options.textNodeName, "");
|
|
909
|
+
if (e.tagName !== e.tagExp && e.attrExpPresent) {
|
|
910
|
+
t[":@"] = this.buildAttributesMap(e.tagExp, i, e.tagName);
|
|
944
911
|
}
|
|
945
|
-
|
|
912
|
+
this.addChild(n, t, i);
|
|
913
|
+
}
|
|
914
|
+
r = e.closeIndex + 1;
|
|
915
|
+
} else if (t.substr(r + 1, 3) === "!--") {
|
|
916
|
+
const e = pt(t, "--\x3e", r + 4, "Comment is not closed.");
|
|
917
|
+
if (this.options.commentPropName) {
|
|
918
|
+
const o = t.substring(r + 4, e - 2);
|
|
919
|
+
s = this.saveTextToParentTag(s, n, i);
|
|
920
|
+
n.add(this.options.commentPropName, [ {
|
|
921
|
+
[this.options.textNodeName]: o
|
|
922
|
+
} ]);
|
|
923
|
+
}
|
|
924
|
+
r = e;
|
|
925
|
+
} else if (t.substr(r + 1, 2) === "!D") {
|
|
926
|
+
const e = Q(t, r);
|
|
927
|
+
this.docTypeEntities = e.entities;
|
|
928
|
+
r = e.i;
|
|
929
|
+
} else if (t.substr(r + 1, 2) === "![") {
|
|
930
|
+
const e = pt(t, "]]>", r, "CDATA is not closed.") - 2;
|
|
931
|
+
const o = t.substring(r + 9, e);
|
|
932
|
+
s = this.saveTextToParentTag(s, n, i);
|
|
933
|
+
let a = this.parseTextData(o, n.tagname, i, true, false, true, true);
|
|
934
|
+
if (a == undefined) a = "";
|
|
935
|
+
if (this.options.cdataPropName) {
|
|
936
|
+
n.add(this.options.cdataPropName, [ {
|
|
937
|
+
[this.options.textNodeName]: o
|
|
938
|
+
} ]);
|
|
946
939
|
} else {
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
940
|
+
n.add(this.options.textNodeName, a);
|
|
941
|
+
}
|
|
942
|
+
r = e + 2;
|
|
943
|
+
} else {
|
|
944
|
+
let o = gt(t, r, this.options.removeNSPrefix);
|
|
945
|
+
let a = o.tagName;
|
|
946
|
+
const l = o.rawTagName;
|
|
947
|
+
let u = o.tagExp;
|
|
948
|
+
let f = o.attrExpPresent;
|
|
949
|
+
let c = o.closeIndex;
|
|
950
|
+
if (this.options.transformTagName) {
|
|
951
|
+
a = this.options.transformTagName(a);
|
|
952
|
+
}
|
|
953
|
+
if (n && s) {
|
|
954
|
+
if (n.tagname !== "!xml") {
|
|
955
|
+
s = this.saveTextToParentTag(s, n, i, false);
|
|
955
956
|
}
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
957
|
+
}
|
|
958
|
+
const h = n;
|
|
959
|
+
if (h && this.options.unpairedTags.indexOf(h.tagname) !== -1) {
|
|
960
|
+
n = this.tagsNodeStack.pop();
|
|
961
|
+
i = i.substring(0, i.lastIndexOf("."));
|
|
962
|
+
}
|
|
963
|
+
if (a !== e.tagname) {
|
|
964
|
+
i += i ? "." + a : a;
|
|
965
|
+
}
|
|
966
|
+
if (this.isItStopNode(this.options.stopNodes, i, a)) {
|
|
967
|
+
let e = "";
|
|
968
|
+
if (u.length > 0 && u.lastIndexOf("/") === u.length - 1) {
|
|
969
|
+
if (a[a.length - 1] === "/") {
|
|
970
|
+
a = a.substr(0, a.length - 1);
|
|
971
|
+
i = i.substr(0, i.length - 1);
|
|
972
|
+
u = a;
|
|
973
|
+
} else {
|
|
974
|
+
u = u.substr(0, u.length - 1);
|
|
959
975
|
}
|
|
976
|
+
r = o.closeIndex;
|
|
977
|
+
} else if (this.options.unpairedTags.indexOf(a) !== -1) {
|
|
978
|
+
r = o.closeIndex;
|
|
979
|
+
} else {
|
|
980
|
+
const n = this.readStopNodeData(t, l, c + 1);
|
|
981
|
+
if (!n) throw new Error(`Unexpected end of ${l}`);
|
|
982
|
+
r = n.i;
|
|
983
|
+
e = n.tagContent;
|
|
960
984
|
}
|
|
961
|
-
const
|
|
962
|
-
if (
|
|
963
|
-
|
|
964
|
-
o = o.substring(0, o.lastIndexOf("."));
|
|
985
|
+
const s = new K(a);
|
|
986
|
+
if (a !== u && f) {
|
|
987
|
+
s[":@"] = this.buildAttributesMap(u, i, a);
|
|
965
988
|
}
|
|
966
|
-
if (
|
|
967
|
-
|
|
989
|
+
if (e) {
|
|
990
|
+
e = this.parseTextData(e, a, i, true, f, true, true);
|
|
968
991
|
}
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
}
|
|
979
|
-
a = i.closeIndex;
|
|
980
|
-
} else if (this.options.unpairedTags.indexOf(l) !== -1) {
|
|
981
|
-
a = i.closeIndex;
|
|
992
|
+
i = i.substr(0, i.lastIndexOf("."));
|
|
993
|
+
s.add(this.options.textNodeName, e);
|
|
994
|
+
this.addChild(n, s, i);
|
|
995
|
+
} else {
|
|
996
|
+
if (u.length > 0 && u.lastIndexOf("/") === u.length - 1) {
|
|
997
|
+
if (a[a.length - 1] === "/") {
|
|
998
|
+
a = a.substr(0, a.length - 1);
|
|
999
|
+
i = i.substr(0, i.length - 1);
|
|
1000
|
+
u = a;
|
|
982
1001
|
} else {
|
|
983
|
-
|
|
984
|
-
if (!t) throw new Error(`Unexpected end of ${u}`);
|
|
985
|
-
a = t.i;
|
|
986
|
-
r = t.tagContent;
|
|
1002
|
+
u = u.substr(0, u.length - 1);
|
|
987
1003
|
}
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
s[":@"] = this.buildAttributesMap(f, o, l);
|
|
1004
|
+
if (this.options.transformTagName) {
|
|
1005
|
+
a = this.options.transformTagName(a);
|
|
991
1006
|
}
|
|
992
|
-
|
|
993
|
-
|
|
1007
|
+
const t = new K(a);
|
|
1008
|
+
if (a !== u && f) {
|
|
1009
|
+
t[":@"] = this.buildAttributesMap(u, i, a);
|
|
994
1010
|
}
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
this.addChild(n, s, o);
|
|
1011
|
+
this.addChild(n, t, i);
|
|
1012
|
+
i = i.substr(0, i.lastIndexOf("."));
|
|
998
1013
|
} else {
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
f = l;
|
|
1004
|
-
} else {
|
|
1005
|
-
f = f.substr(0, f.length - 1);
|
|
1006
|
-
}
|
|
1007
|
-
if (this.options.transformTagName) {
|
|
1008
|
-
l = this.options.transformTagName(l);
|
|
1009
|
-
}
|
|
1010
|
-
const e = new t(l);
|
|
1011
|
-
if (l !== f && d) {
|
|
1012
|
-
e[":@"] = this.buildAttributesMap(f, o, l);
|
|
1013
|
-
}
|
|
1014
|
-
this.addChild(n, e, o);
|
|
1015
|
-
o = o.substr(0, o.lastIndexOf("."));
|
|
1016
|
-
} else {
|
|
1017
|
-
const e = new t(l);
|
|
1018
|
-
this.tagsNodeStack.push(n);
|
|
1019
|
-
if (l !== f && d) {
|
|
1020
|
-
e[":@"] = this.buildAttributesMap(f, o, l);
|
|
1021
|
-
}
|
|
1022
|
-
this.addChild(n, e, o);
|
|
1023
|
-
n = e;
|
|
1014
|
+
const t = new K(a);
|
|
1015
|
+
this.tagsNodeStack.push(n);
|
|
1016
|
+
if (a !== u && f) {
|
|
1017
|
+
t[":@"] = this.buildAttributesMap(u, i, a);
|
|
1024
1018
|
}
|
|
1025
|
-
|
|
1026
|
-
|
|
1019
|
+
this.addChild(n, t, i);
|
|
1020
|
+
n = t;
|
|
1027
1021
|
}
|
|
1022
|
+
s = "";
|
|
1023
|
+
r = c;
|
|
1028
1024
|
}
|
|
1029
|
-
} else {
|
|
1030
|
-
s += e[a];
|
|
1031
1025
|
}
|
|
1032
|
-
}
|
|
1033
|
-
return r.child;
|
|
1034
|
-
};
|
|
1035
|
-
function addChild(e, t, i) {
|
|
1036
|
-
const r = this.options.updateTag(t.tagname, i, t[":@"]);
|
|
1037
|
-
if (r === false) {} else if (typeof r === "string") {
|
|
1038
|
-
t.tagname = r;
|
|
1039
|
-
e.addChild(t);
|
|
1040
1026
|
} else {
|
|
1041
|
-
|
|
1027
|
+
s += t[r];
|
|
1042
1028
|
}
|
|
1043
1029
|
}
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1030
|
+
return e.child;
|
|
1031
|
+
};
|
|
1032
|
+
|
|
1033
|
+
function ut(t, e, n) {
|
|
1034
|
+
const s = this.options.updateTag(e.tagname, n, e[":@"]);
|
|
1035
|
+
if (s === false) {} else if (typeof s === "string") {
|
|
1036
|
+
e.tagname = s;
|
|
1037
|
+
t.addChild(e);
|
|
1038
|
+
} else {
|
|
1039
|
+
t.addChild(e);
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
const ft = function(t) {
|
|
1044
|
+
if (this.options.processEntities) {
|
|
1045
|
+
for (let e in this.docTypeEntities) {
|
|
1046
|
+
const n = this.docTypeEntities[e];
|
|
1047
|
+
t = t.replace(n.regx, n.val);
|
|
1048
|
+
}
|
|
1049
|
+
for (let e in this.lastEntities) {
|
|
1050
|
+
const n = this.lastEntities[e];
|
|
1051
|
+
t = t.replace(n.regex, n.val);
|
|
1052
|
+
}
|
|
1053
|
+
if (this.options.htmlEntities) {
|
|
1054
|
+
for (let e in this.htmlEntities) {
|
|
1055
|
+
const n = this.htmlEntities[e];
|
|
1056
|
+
t = t.replace(n.regex, n.val);
|
|
1059
1057
|
}
|
|
1060
|
-
e = e.replace(this.ampEntity.regex, this.ampEntity.val);
|
|
1061
|
-
}
|
|
1062
|
-
return e;
|
|
1063
|
-
};
|
|
1064
|
-
function saveTextToParentTag(e, t, i, r) {
|
|
1065
|
-
if (e) {
|
|
1066
|
-
if (r === undefined) r = t.child.length === 0;
|
|
1067
|
-
e = this.parseTextData(e, t.tagname, i, false, t[":@"] ? Object.keys(t[":@"]).length !== 0 : false, r);
|
|
1068
|
-
if (e !== undefined && e !== "") t.add(this.options.textNodeName, e);
|
|
1069
|
-
e = "";
|
|
1070
1058
|
}
|
|
1071
|
-
|
|
1059
|
+
t = t.replace(this.ampEntity.regex, this.ampEntity.val);
|
|
1072
1060
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1061
|
+
return t;
|
|
1062
|
+
};
|
|
1063
|
+
|
|
1064
|
+
function ct(t, e, n, s) {
|
|
1065
|
+
if (t) {
|
|
1066
|
+
if (s === undefined) s = e.child.length === 0;
|
|
1067
|
+
t = this.parseTextData(t, e.tagname, n, false, e[":@"] ? Object.keys(e[":@"]).length !== 0 : false, s);
|
|
1068
|
+
if (t !== undefined && t !== "") e.add(this.options.textNodeName, t);
|
|
1069
|
+
t = "";
|
|
1080
1070
|
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1071
|
+
return t;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
function ht(t, e, n) {
|
|
1075
|
+
const s = "*." + n;
|
|
1076
|
+
for (const n in t) {
|
|
1077
|
+
const i = t[n];
|
|
1078
|
+
if (s === i || e === i) return true;
|
|
1079
|
+
}
|
|
1080
|
+
return false;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
function dt(t, e, n = ">") {
|
|
1084
|
+
let s;
|
|
1085
|
+
let i = "";
|
|
1086
|
+
for (let r = e; r < t.length; r++) {
|
|
1087
|
+
let e = t[r];
|
|
1088
|
+
if (s) {
|
|
1089
|
+
if (e === s) s = "";
|
|
1090
|
+
} else if (e === '"' || e === "'") {
|
|
1091
|
+
s = e;
|
|
1092
|
+
} else if (e === n[0]) {
|
|
1093
|
+
if (n[1]) {
|
|
1094
|
+
if (t[r + 1] === n[1]) {
|
|
1099
1095
|
return {
|
|
1100
|
-
data:
|
|
1101
|
-
index:
|
|
1096
|
+
data: i,
|
|
1097
|
+
index: r
|
|
1102
1098
|
};
|
|
1103
1099
|
}
|
|
1104
|
-
} else
|
|
1105
|
-
|
|
1100
|
+
} else {
|
|
1101
|
+
return {
|
|
1102
|
+
data: i,
|
|
1103
|
+
index: r
|
|
1104
|
+
};
|
|
1106
1105
|
}
|
|
1107
|
-
|
|
1106
|
+
} else if (e === "\t") {
|
|
1107
|
+
e = " ";
|
|
1108
1108
|
}
|
|
1109
|
+
i += e;
|
|
1109
1110
|
}
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
function pt(t, e, n, s) {
|
|
1114
|
+
const i = t.indexOf(e, n);
|
|
1115
|
+
if (i === -1) {
|
|
1116
|
+
throw new Error(s);
|
|
1117
|
+
} else {
|
|
1118
|
+
return i + e.length - 1;
|
|
1117
1119
|
}
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
function gt(t, e, n, s = ">") {
|
|
1123
|
+
const i = dt(t, e + 1, s);
|
|
1124
|
+
if (!i) return;
|
|
1125
|
+
let r = i.data;
|
|
1126
|
+
const o = i.index;
|
|
1127
|
+
const a = r.search(/\s/);
|
|
1128
|
+
let l = r;
|
|
1129
|
+
let u = true;
|
|
1130
|
+
if (a !== -1) {
|
|
1131
|
+
l = r.substring(0, a);
|
|
1132
|
+
r = r.substring(a + 1).trimStart();
|
|
1133
|
+
}
|
|
1134
|
+
const f = l;
|
|
1135
|
+
if (n) {
|
|
1136
|
+
const t = l.indexOf(":");
|
|
1137
|
+
if (t !== -1) {
|
|
1138
|
+
l = l.substr(t + 1);
|
|
1139
|
+
u = l !== i.data.substr(t + 1);
|
|
1137
1140
|
}
|
|
1138
|
-
return {
|
|
1139
|
-
tagName: l,
|
|
1140
|
-
tagExp: s,
|
|
1141
|
-
closeIndex: o,
|
|
1142
|
-
attrExpPresent: u,
|
|
1143
|
-
rawTagName: f
|
|
1144
|
-
};
|
|
1145
1141
|
}
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1142
|
+
return {
|
|
1143
|
+
tagName: l,
|
|
1144
|
+
tagExp: r,
|
|
1145
|
+
closeIndex: o,
|
|
1146
|
+
attrExpPresent: u,
|
|
1147
|
+
rawTagName: f
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
function mt(t, e, n) {
|
|
1152
|
+
const s = n;
|
|
1153
|
+
let i = 1;
|
|
1154
|
+
for (;n < t.length; n++) {
|
|
1155
|
+
if (t[n] === "<") {
|
|
1156
|
+
if (t[n + 1] === "/") {
|
|
1157
|
+
const r = pt(t, ">", n, `${e} is not closed`);
|
|
1158
|
+
let o = t.substring(n + 2, r).trim();
|
|
1159
|
+
if (o === e) {
|
|
1160
|
+
i--;
|
|
1161
|
+
if (i === 0) {
|
|
1162
|
+
return {
|
|
1163
|
+
tagContent: t.substring(s, n),
|
|
1164
|
+
i: r
|
|
1165
|
+
};
|
|
1162
1166
|
}
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
i = r.closeIndex;
|
|
1167
|
+
}
|
|
1168
|
+
n = r;
|
|
1169
|
+
} else if (t[n + 1] === "?") {
|
|
1170
|
+
const e = pt(t, "?>", n + 1, "StopNode is not closed.");
|
|
1171
|
+
n = e;
|
|
1172
|
+
} else if (t.substr(n + 1, 3) === "!--") {
|
|
1173
|
+
const e = pt(t, "--\x3e", n + 3, "StopNode is not closed.");
|
|
1174
|
+
n = e;
|
|
1175
|
+
} else if (t.substr(n + 1, 2) === "![") {
|
|
1176
|
+
const e = pt(t, "]]>", n, "StopNode is not closed.") - 2;
|
|
1177
|
+
n = e;
|
|
1178
|
+
} else {
|
|
1179
|
+
const s = gt(t, n, ">");
|
|
1180
|
+
if (s) {
|
|
1181
|
+
const t = s && s.tagName;
|
|
1182
|
+
if (t === e && s.tagExp[s.tagExp.length - 1] !== "/") {
|
|
1183
|
+
i++;
|
|
1181
1184
|
}
|
|
1185
|
+
n = s.closeIndex;
|
|
1182
1186
|
}
|
|
1183
1187
|
}
|
|
1184
1188
|
}
|
|
1185
1189
|
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
function xt(t, e, n) {
|
|
1193
|
+
if (e && typeof t === "string") {
|
|
1194
|
+
const e = t.trim();
|
|
1195
|
+
if (e === "true") return true; else if (e === "false") return false; else return tt(t, n);
|
|
1196
|
+
} else {
|
|
1197
|
+
if (H.isExist(t)) {
|
|
1198
|
+
return t;
|
|
1190
1199
|
} else {
|
|
1191
|
-
|
|
1192
|
-
return t;
|
|
1193
|
-
} else {
|
|
1194
|
-
return "";
|
|
1195
|
-
}
|
|
1200
|
+
return "";
|
|
1196
1201
|
}
|
|
1197
1202
|
}
|
|
1198
|
-
h = OrderedObjParser;
|
|
1199
|
-
return h;
|
|
1200
1203
|
}
|
|
1201
1204
|
|
|
1202
|
-
var
|
|
1205
|
+
var Nt = nt;
|
|
1203
1206
|
|
|
1204
|
-
|
|
1207
|
+
const bt = t.getDefaultExportFromCjs(Nt);
|
|
1205
1208
|
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1209
|
+
var Et = {};
|
|
1210
|
+
|
|
1211
|
+
"use strict";
|
|
1212
|
+
|
|
1213
|
+
function vt(t, e) {
|
|
1214
|
+
return yt(t, e);
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
function yt(t, e, n) {
|
|
1218
|
+
let s;
|
|
1219
|
+
const i = {};
|
|
1220
|
+
for (let r = 0; r < t.length; r++) {
|
|
1221
|
+
const o = t[r];
|
|
1222
|
+
const a = Tt(o);
|
|
1223
|
+
let l = "";
|
|
1224
|
+
if (n === undefined) l = a; else l = n + "." + a;
|
|
1225
|
+
if (a === e.textNodeName) {
|
|
1226
|
+
if (s === undefined) s = o[a]; else s += "" + o[a];
|
|
1227
|
+
} else if (a === undefined) {
|
|
1228
|
+
continue;
|
|
1229
|
+
} else if (o[a]) {
|
|
1230
|
+
let t = yt(o[a], e, l);
|
|
1231
|
+
const n = Pt(t, e);
|
|
1232
|
+
if (o[":@"]) {
|
|
1233
|
+
Ot(t, o[":@"], l, e);
|
|
1234
|
+
} else if (Object.keys(t).length === 1 && t[e.textNodeName] !== undefined && !e.alwaysCreateTextNode) {
|
|
1235
|
+
t = t[e.textNodeName];
|
|
1236
|
+
} else if (Object.keys(t).length === 0) {
|
|
1237
|
+
if (e.alwaysCreateTextNode) t[e.textNodeName] = ""; else t = "";
|
|
1238
|
+
}
|
|
1239
|
+
if (i[a] !== undefined && i.hasOwnProperty(a)) {
|
|
1240
|
+
if (!Array.isArray(i[a])) {
|
|
1241
|
+
i[a] = [ i[a] ];
|
|
1234
1242
|
}
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
n[a].push(e);
|
|
1243
|
+
i[a].push(t);
|
|
1244
|
+
} else {
|
|
1245
|
+
if (e.isArray(a, l, n)) {
|
|
1246
|
+
i[a] = [ t ];
|
|
1240
1247
|
} else {
|
|
1241
|
-
|
|
1242
|
-
n[a] = [ e ];
|
|
1243
|
-
} else {
|
|
1244
|
-
n[a] = e;
|
|
1245
|
-
}
|
|
1248
|
+
i[a] = t;
|
|
1246
1249
|
}
|
|
1247
1250
|
}
|
|
1248
1251
|
}
|
|
1249
|
-
if (typeof r === "string") {
|
|
1250
|
-
if (r.length > 0) n[t.textNodeName] = r;
|
|
1251
|
-
} else if (r !== undefined) n[t.textNodeName] = r;
|
|
1252
|
-
return n;
|
|
1253
1252
|
}
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1253
|
+
if (typeof s === "string") {
|
|
1254
|
+
if (s.length > 0) i[e.textNodeName] = s;
|
|
1255
|
+
} else if (s !== undefined) i[e.textNodeName] = s;
|
|
1256
|
+
return i;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
function Tt(t) {
|
|
1260
|
+
const e = Object.keys(t);
|
|
1261
|
+
for (let t = 0; t < e.length; t++) {
|
|
1262
|
+
const n = e[t];
|
|
1263
|
+
if (n !== ":@") return n;
|
|
1260
1264
|
}
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
function Ot(t, e, n, s) {
|
|
1268
|
+
if (e) {
|
|
1269
|
+
const i = Object.keys(e);
|
|
1270
|
+
const r = i.length;
|
|
1271
|
+
for (let o = 0; o < r; o++) {
|
|
1272
|
+
const r = i[o];
|
|
1273
|
+
if (s.isArray(r, n + "." + r, true, true)) {
|
|
1274
|
+
t[r] = [ e[r] ];
|
|
1275
|
+
} else {
|
|
1276
|
+
t[r] = e[r];
|
|
1272
1277
|
}
|
|
1273
1278
|
}
|
|
1274
1279
|
}
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
return
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
function Pt(t, e) {
|
|
1283
|
+
const {textNodeName: n} = e;
|
|
1284
|
+
const s = Object.keys(t).length;
|
|
1285
|
+
if (s === 0) {
|
|
1286
|
+
return true;
|
|
1287
|
+
}
|
|
1288
|
+
if (s === 1 && (t[n] || typeof t[n] === "boolean" || t[n] === 0)) {
|
|
1289
|
+
return true;
|
|
1285
1290
|
}
|
|
1286
|
-
|
|
1287
|
-
return b;
|
|
1291
|
+
return false;
|
|
1288
1292
|
}
|
|
1289
1293
|
|
|
1290
|
-
var
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1294
|
+
var wt = Et.prettify = vt;
|
|
1295
|
+
|
|
1296
|
+
const {buildOptions: At} = y;
|
|
1297
|
+
|
|
1298
|
+
const Ct = Nt;
|
|
1299
|
+
|
|
1300
|
+
const {prettify: It} = Et;
|
|
1301
|
+
|
|
1302
|
+
const jt = e;
|
|
1303
|
+
|
|
1304
|
+
let St = class XMLParser {
|
|
1305
|
+
constructor(t) {
|
|
1306
|
+
this.externalEntities = {};
|
|
1307
|
+
this.options = At(t);
|
|
1308
|
+
}
|
|
1309
|
+
parse(t, e) {
|
|
1310
|
+
if (typeof t === "string") {} else if (t.toString) {
|
|
1311
|
+
t = t.toString();
|
|
1312
|
+
} else {
|
|
1313
|
+
throw new Error("XML data is accepted in String or Bytes[] form.");
|
|
1305
1314
|
}
|
|
1306
|
-
|
|
1307
|
-
if (
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
throw
|
|
1311
|
-
}
|
|
1312
|
-
if (n) {
|
|
1313
|
-
if (n === true) n = {};
|
|
1314
|
-
const t = r.validate(e, n);
|
|
1315
|
-
if (t !== true) {
|
|
1316
|
-
throw Error(`${t.err.msg}:${t.err.line}:${t.err.col}`);
|
|
1317
|
-
}
|
|
1315
|
+
if (e) {
|
|
1316
|
+
if (e === true) e = {};
|
|
1317
|
+
const n = jt.validate(t, e);
|
|
1318
|
+
if (n !== true) {
|
|
1319
|
+
throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
|
|
1318
1320
|
}
|
|
1319
|
-
const s = new t(this.options);
|
|
1320
|
-
s.addExternalEntities(this.externalEntities);
|
|
1321
|
-
const o = s.parseXml(e);
|
|
1322
|
-
if (this.options.preserveOrder || o === undefined) return o; else return i(o, this.options);
|
|
1323
1321
|
}
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1322
|
+
const n = new Ct(this.options);
|
|
1323
|
+
n.addExternalEntities(this.externalEntities);
|
|
1324
|
+
const s = n.parseXml(t);
|
|
1325
|
+
if (this.options.preserveOrder || s === undefined) return s; else return It(s, this.options);
|
|
1326
|
+
}
|
|
1327
|
+
addEntity(t, e) {
|
|
1328
|
+
if (e.indexOf("&") !== -1) {
|
|
1329
|
+
throw new Error("Entity value can't have '&'");
|
|
1330
|
+
} else if (t.indexOf("&") !== -1 || t.indexOf(";") !== -1) {
|
|
1331
|
+
throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");
|
|
1332
|
+
} else if (e === "&") {
|
|
1333
|
+
throw new Error("An entity with value '&' is not permitted");
|
|
1334
|
+
} else {
|
|
1335
|
+
this.externalEntities[t] = e;
|
|
1334
1336
|
}
|
|
1335
1337
|
}
|
|
1336
|
-
|
|
1337
|
-
return N;
|
|
1338
|
-
}
|
|
1338
|
+
};
|
|
1339
1339
|
|
|
1340
|
-
var
|
|
1340
|
+
var Ft = St;
|
|
1341
1341
|
|
|
1342
|
-
|
|
1342
|
+
const Dt = t.getDefaultExportFromCjs(Ft);
|
|
1343
1343
|
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
e = replaceEntitiesValue(e, t);
|
|
1369
|
-
}
|
|
1370
|
-
if (s) {
|
|
1371
|
-
n += r;
|
|
1372
|
-
}
|
|
1373
|
-
n += e;
|
|
1374
|
-
s = false;
|
|
1375
|
-
continue;
|
|
1376
|
-
} else if (l === t.cdataPropName) {
|
|
1377
|
-
if (s) {
|
|
1378
|
-
n += r;
|
|
1379
|
-
}
|
|
1380
|
-
n += `<![CDATA[${a[l][0][t.textNodeName]}]]>`;
|
|
1381
|
-
s = false;
|
|
1382
|
-
continue;
|
|
1383
|
-
} else if (l === t.commentPropName) {
|
|
1384
|
-
n += r + `\x3c!--${a[l][0][t.textNodeName]}--\x3e`;
|
|
1385
|
-
s = true;
|
|
1386
|
-
continue;
|
|
1387
|
-
} else if (l[0] === "?") {
|
|
1388
|
-
const e = attr_to_str(a[":@"], t);
|
|
1389
|
-
const i = l === "?xml" ? "" : r;
|
|
1390
|
-
let o = a[l][0][t.textNodeName];
|
|
1391
|
-
o = o.length !== 0 ? " " + o : "";
|
|
1392
|
-
n += i + `<${l}${o}${e}?>`;
|
|
1393
|
-
s = true;
|
|
1394
|
-
continue;
|
|
1344
|
+
const Vt = "\n";
|
|
1345
|
+
|
|
1346
|
+
function kt(t, e) {
|
|
1347
|
+
let n = "";
|
|
1348
|
+
if (e.format && e.indentBy.length > 0) {
|
|
1349
|
+
n = Vt;
|
|
1350
|
+
}
|
|
1351
|
+
return $t(t, e, "", n);
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
function $t(t, e, n, s) {
|
|
1355
|
+
let i = "";
|
|
1356
|
+
let r = false;
|
|
1357
|
+
for (let o = 0; o < t.length; o++) {
|
|
1358
|
+
const a = t[o];
|
|
1359
|
+
const l = _t(a);
|
|
1360
|
+
if (l === undefined) continue;
|
|
1361
|
+
let u = "";
|
|
1362
|
+
if (n.length === 0) u = l; else u = `${n}.${l}`;
|
|
1363
|
+
if (l === e.textNodeName) {
|
|
1364
|
+
let t = a[l];
|
|
1365
|
+
if (!Mt(u, e)) {
|
|
1366
|
+
t = e.tagValueProcessor(l, t);
|
|
1367
|
+
t = Xt(t, e);
|
|
1395
1368
|
}
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1369
|
+
if (r) {
|
|
1370
|
+
i += s;
|
|
1371
|
+
}
|
|
1372
|
+
i += t;
|
|
1373
|
+
r = false;
|
|
1374
|
+
continue;
|
|
1375
|
+
} else if (l === e.cdataPropName) {
|
|
1376
|
+
if (r) {
|
|
1377
|
+
i += s;
|
|
1399
1378
|
}
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1379
|
+
i += `<![CDATA[${a[l][0][e.textNodeName]}]]>`;
|
|
1380
|
+
r = false;
|
|
1381
|
+
continue;
|
|
1382
|
+
} else if (l === e.commentPropName) {
|
|
1383
|
+
i += s + `\x3c!--${a[l][0][e.textNodeName]}--\x3e`;
|
|
1384
|
+
r = true;
|
|
1385
|
+
continue;
|
|
1386
|
+
} else if (l[0] === "?") {
|
|
1387
|
+
const t = Lt(a[":@"], e);
|
|
1388
|
+
const n = l === "?xml" ? "" : s;
|
|
1389
|
+
let o = a[l][0][e.textNodeName];
|
|
1390
|
+
o = o.length !== 0 ? " " + o : "";
|
|
1391
|
+
i += n + `<${l}${o}${t}?>`;
|
|
1392
|
+
r = true;
|
|
1393
|
+
continue;
|
|
1394
|
+
}
|
|
1395
|
+
let f = s;
|
|
1396
|
+
if (f !== "") {
|
|
1397
|
+
f += e.indentBy;
|
|
1398
|
+
}
|
|
1399
|
+
const c = Lt(a[":@"], e);
|
|
1400
|
+
const h = s + `<${l}${c}`;
|
|
1401
|
+
const d = $t(a[l], e, u, f);
|
|
1402
|
+
if (e.unpairedTags.indexOf(l) !== -1) {
|
|
1403
|
+
if (e.suppressUnpairedNode) i += h + ">"; else i += h + "/>";
|
|
1404
|
+
} else if ((!d || d.length === 0) && e.suppressEmptyNode) {
|
|
1405
|
+
i += h + "/>";
|
|
1406
|
+
} else if (d && d.endsWith(">")) {
|
|
1407
|
+
i += h + `>${d}${s}</${l}>`;
|
|
1408
|
+
} else {
|
|
1409
|
+
i += h + ">";
|
|
1410
|
+
if (d && s !== "" && (d.includes("/>") || d.includes("</"))) {
|
|
1411
|
+
i += s + e.indentBy + d + s;
|
|
1409
1412
|
} else {
|
|
1410
|
-
|
|
1411
|
-
if (g && r !== "" && (g.includes("/>") || g.includes("</"))) {
|
|
1412
|
-
n += r + t.indentBy + g + r;
|
|
1413
|
-
} else {
|
|
1414
|
-
n += g;
|
|
1415
|
-
}
|
|
1416
|
-
n += `</${l}>`;
|
|
1413
|
+
i += d;
|
|
1417
1414
|
}
|
|
1418
|
-
|
|
1415
|
+
i += `</${l}>`;
|
|
1419
1416
|
}
|
|
1420
|
-
|
|
1417
|
+
r = true;
|
|
1421
1418
|
}
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1419
|
+
return i;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
function _t(t) {
|
|
1423
|
+
const e = Object.keys(t);
|
|
1424
|
+
for (let n = 0; n < e.length; n++) {
|
|
1425
|
+
const s = e[n];
|
|
1426
|
+
if (!t.hasOwnProperty(s)) continue;
|
|
1427
|
+
if (s !== ":@") return s;
|
|
1429
1428
|
}
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
function Lt(t, e) {
|
|
1432
|
+
let n = "";
|
|
1433
|
+
if (t && !e.ignoreAttributes) {
|
|
1434
|
+
for (let s in t) {
|
|
1435
|
+
if (!t.hasOwnProperty(s)) continue;
|
|
1436
|
+
let i = e.attributeValueProcessor(s, t[s]);
|
|
1437
|
+
i = Xt(i, e);
|
|
1438
|
+
if (i === true && e.suppressBooleanAttributes) {
|
|
1439
|
+
n += ` ${s.substr(e.attributeNamePrefix.length)}`;
|
|
1440
|
+
} else {
|
|
1441
|
+
n += ` ${s.substr(e.attributeNamePrefix.length)}="${i}"`;
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
|
-
return i;
|
|
1445
1444
|
}
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1445
|
+
return n;
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
function Mt(t, e) {
|
|
1449
|
+
t = t.substr(0, t.length - e.textNodeName.length - 1);
|
|
1450
|
+
let n = t.substr(t.lastIndexOf(".") + 1);
|
|
1451
|
+
for (let s in e.stopNodes) {
|
|
1452
|
+
if (e.stopNodes[s] === t || e.stopNodes[s] === "*." + n) return true;
|
|
1453
1453
|
}
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1454
|
+
return false;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
function Xt(t, e) {
|
|
1458
|
+
if (t && t.length > 0 && e.processEntities) {
|
|
1459
|
+
for (let n = 0; n < e.entities.length; n++) {
|
|
1460
|
+
const s = e.entities[n];
|
|
1461
|
+
t = t.replace(s.regex, s.val);
|
|
1460
1462
|
}
|
|
1461
|
-
return e;
|
|
1462
1463
|
}
|
|
1463
|
-
|
|
1464
|
-
return v;
|
|
1464
|
+
return t;
|
|
1465
1465
|
}
|
|
1466
1466
|
|
|
1467
|
-
var
|
|
1467
|
+
var Bt = kt;
|
|
1468
1468
|
|
|
1469
|
-
|
|
1469
|
+
const Gt = t.getDefaultExportFromCjs(Bt);
|
|
1470
1470
|
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1471
|
+
"use strict";
|
|
1472
|
+
|
|
1473
|
+
const Rt = Bt;
|
|
1474
|
+
|
|
1475
|
+
const Ut = z;
|
|
1476
|
+
|
|
1477
|
+
const Zt = {
|
|
1478
|
+
attributeNamePrefix: "@_",
|
|
1479
|
+
attributesGroupName: false,
|
|
1480
|
+
textNodeName: "#text",
|
|
1481
|
+
ignoreAttributes: true,
|
|
1482
|
+
cdataPropName: false,
|
|
1483
|
+
format: false,
|
|
1484
|
+
indentBy: " ",
|
|
1485
|
+
suppressEmptyNode: false,
|
|
1486
|
+
suppressUnpairedNode: true,
|
|
1487
|
+
suppressBooleanAttributes: true,
|
|
1488
|
+
tagValueProcessor: function(t, e) {
|
|
1489
|
+
return e;
|
|
1490
|
+
},
|
|
1491
|
+
attributeValueProcessor: function(t, e) {
|
|
1492
|
+
return e;
|
|
1493
|
+
},
|
|
1494
|
+
preserveOrder: false,
|
|
1495
|
+
commentPropName: false,
|
|
1496
|
+
unpairedTags: [],
|
|
1497
|
+
entities: [ {
|
|
1498
|
+
regex: new RegExp("&", "g"),
|
|
1499
|
+
val: "&"
|
|
1500
|
+
}, {
|
|
1501
|
+
regex: new RegExp(">", "g"),
|
|
1502
|
+
val: ">"
|
|
1503
|
+
}, {
|
|
1504
|
+
regex: new RegExp("<", "g"),
|
|
1505
|
+
val: "<"
|
|
1506
|
+
}, {
|
|
1507
|
+
regex: new RegExp("'", "g"),
|
|
1508
|
+
val: "'"
|
|
1509
|
+
}, {
|
|
1510
|
+
regex: new RegExp('"', "g"),
|
|
1511
|
+
val: """
|
|
1512
|
+
} ],
|
|
1513
|
+
processEntities: true,
|
|
1514
|
+
stopNodes: [],
|
|
1515
|
+
oneListGroup: false
|
|
1516
|
+
};
|
|
1517
|
+
|
|
1518
|
+
function Yt(t) {
|
|
1519
|
+
this.options = Object.assign({}, Zt, t);
|
|
1520
|
+
if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {
|
|
1521
|
+
this.isAttribute = function() {
|
|
1522
|
+
return false;
|
|
1523
|
+
};
|
|
1524
|
+
} else {
|
|
1525
|
+
this.ignoreAttributesFn = Ut(this.options.ignoreAttributes);
|
|
1526
|
+
this.attrPrefixLen = this.options.attributeNamePrefix.length;
|
|
1527
|
+
this.isAttribute = Jt;
|
|
1528
|
+
}
|
|
1529
|
+
this.processTextOrObjNode = qt;
|
|
1530
|
+
if (this.options.format) {
|
|
1531
|
+
this.indentate = zt;
|
|
1532
|
+
this.tagEndChar = ">\n";
|
|
1533
|
+
this.newLine = "\n";
|
|
1534
|
+
} else {
|
|
1535
|
+
this.indentate = function() {
|
|
1536
|
+
return "";
|
|
1537
|
+
};
|
|
1538
|
+
this.tagEndChar = ">";
|
|
1539
|
+
this.newLine = "";
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
Yt.prototype.build = function(t) {
|
|
1544
|
+
if (this.options.preserveOrder) {
|
|
1545
|
+
return Rt(t, this.options);
|
|
1546
|
+
} else {
|
|
1547
|
+
if (Array.isArray(t) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {
|
|
1548
|
+
t = {
|
|
1549
|
+
[this.options.arrayNodeName]: t
|
|
1536
1550
|
};
|
|
1537
|
-
this.tagEndChar = ">";
|
|
1538
|
-
this.newLine = "";
|
|
1539
1551
|
}
|
|
1552
|
+
return this.j2x(t, 0, []).val;
|
|
1540
1553
|
}
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1554
|
+
};
|
|
1555
|
+
|
|
1556
|
+
Yt.prototype.j2x = function(t, e, n) {
|
|
1557
|
+
let s = "";
|
|
1558
|
+
let i = "";
|
|
1559
|
+
const r = n.join(".");
|
|
1560
|
+
for (let o in t) {
|
|
1561
|
+
if (!Object.prototype.hasOwnProperty.call(t, o)) continue;
|
|
1562
|
+
if (typeof t[o] === "undefined") {
|
|
1563
|
+
if (this.isAttribute(o)) {
|
|
1564
|
+
i += "";
|
|
1549
1565
|
}
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1566
|
+
} else if (t[o] === null) {
|
|
1567
|
+
if (this.isAttribute(o)) {
|
|
1568
|
+
i += "";
|
|
1569
|
+
} else if (o === this.options.cdataPropName) {
|
|
1570
|
+
i += "";
|
|
1571
|
+
} else if (o[0] === "?") {
|
|
1572
|
+
i += this.indentate(e) + "<" + o + "?" + this.tagEndChar;
|
|
1573
|
+
} else {
|
|
1574
|
+
i += this.indentate(e) + "<" + o + "/" + this.tagEndChar;
|
|
1575
|
+
}
|
|
1576
|
+
} else if (t[o] instanceof Date) {
|
|
1577
|
+
i += this.buildTextValNode(t[o], o, "", e);
|
|
1578
|
+
} else if (typeof t[o] !== "object") {
|
|
1579
|
+
const n = this.isAttribute(o);
|
|
1580
|
+
if (n && !this.ignoreAttributesFn(n, r)) {
|
|
1581
|
+
s += this.buildAttrPairStr(n, "" + t[o]);
|
|
1582
|
+
} else if (!n) {
|
|
1583
|
+
if (o === this.options.textNodeName) {
|
|
1584
|
+
let e = this.options.tagValueProcessor(o, "" + t[o]);
|
|
1585
|
+
i += this.replaceEntitiesValue(e);
|
|
1570
1586
|
} else {
|
|
1571
|
-
|
|
1572
|
-
}
|
|
1573
|
-
} else if (e[o] instanceof Date) {
|
|
1574
|
-
n += this.buildTextValNode(e[o], o, "", t);
|
|
1575
|
-
} else if (typeof e[o] !== "object") {
|
|
1576
|
-
const i = this.isAttribute(o);
|
|
1577
|
-
if (i && !this.ignoreAttributesFn(i, s)) {
|
|
1578
|
-
r += this.buildAttrPairStr(i, "" + e[o]);
|
|
1579
|
-
} else if (!i) {
|
|
1580
|
-
if (o === this.options.textNodeName) {
|
|
1581
|
-
let t = this.options.tagValueProcessor(o, "" + e[o]);
|
|
1582
|
-
n += this.replaceEntitiesValue(t);
|
|
1583
|
-
} else {
|
|
1584
|
-
n += this.buildTextValNode(e[o], o, "", t);
|
|
1585
|
-
}
|
|
1587
|
+
i += this.buildTextValNode(t[o], o, "", e);
|
|
1586
1588
|
}
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
} else {
|
|
1603
|
-
s += this.processTextOrObjNode(r, o, t, i);
|
|
1589
|
+
}
|
|
1590
|
+
} else if (Array.isArray(t[o])) {
|
|
1591
|
+
const s = t[o].length;
|
|
1592
|
+
let r = "";
|
|
1593
|
+
let a = "";
|
|
1594
|
+
for (let l = 0; l < s; l++) {
|
|
1595
|
+
const s = t[o][l];
|
|
1596
|
+
if (typeof s === "undefined") {} else if (s === null) {
|
|
1597
|
+
if (o[0] === "?") i += this.indentate(e) + "<" + o + "?" + this.tagEndChar; else i += this.indentate(e) + "<" + o + "/" + this.tagEndChar;
|
|
1598
|
+
} else if (typeof s === "object") {
|
|
1599
|
+
if (this.options.oneListGroup) {
|
|
1600
|
+
const t = this.j2x(s, e + 1, n.concat(o));
|
|
1601
|
+
r += t.val;
|
|
1602
|
+
if (this.options.attributesGroupName && s.hasOwnProperty(this.options.attributesGroupName)) {
|
|
1603
|
+
a += t.attrStr;
|
|
1604
1604
|
}
|
|
1605
1605
|
} else {
|
|
1606
|
-
|
|
1607
|
-
let e = this.options.tagValueProcessor(o, r);
|
|
1608
|
-
e = this.replaceEntitiesValue(e);
|
|
1609
|
-
s += e;
|
|
1610
|
-
} else {
|
|
1611
|
-
s += this.buildTextValNode(r, o, "", t);
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1615
|
-
if (this.options.oneListGroup) {
|
|
1616
|
-
s = this.buildObjectNode(s, o, a, t);
|
|
1617
|
-
}
|
|
1618
|
-
n += s;
|
|
1619
|
-
} else {
|
|
1620
|
-
if (this.options.attributesGroupName && o === this.options.attributesGroupName) {
|
|
1621
|
-
const t = Object.keys(e[o]);
|
|
1622
|
-
const i = t.length;
|
|
1623
|
-
for (let n = 0; n < i; n++) {
|
|
1624
|
-
r += this.buildAttrPairStr(t[n], "" + e[o][t[n]]);
|
|
1606
|
+
r += this.processTextOrObjNode(s, o, e, n);
|
|
1625
1607
|
}
|
|
1626
1608
|
} else {
|
|
1627
|
-
|
|
1609
|
+
if (this.options.oneListGroup) {
|
|
1610
|
+
let t = this.options.tagValueProcessor(o, s);
|
|
1611
|
+
t = this.replaceEntitiesValue(t);
|
|
1612
|
+
r += t;
|
|
1613
|
+
} else {
|
|
1614
|
+
r += this.buildTextValNode(s, o, "", e);
|
|
1615
|
+
}
|
|
1628
1616
|
}
|
|
1629
1617
|
}
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
attrStr: r,
|
|
1633
|
-
val: n
|
|
1634
|
-
};
|
|
1635
|
-
};
|
|
1636
|
-
Builder.prototype.buildAttrPairStr = function(e, t) {
|
|
1637
|
-
t = this.options.attributeValueProcessor(e, "" + t);
|
|
1638
|
-
t = this.replaceEntitiesValue(t);
|
|
1639
|
-
if (this.options.suppressBooleanAttributes && t === "true") {
|
|
1640
|
-
return " " + e;
|
|
1641
|
-
} else return " " + e + '="' + t + '"';
|
|
1642
|
-
};
|
|
1643
|
-
function processTextOrObjNode(e, t, i, r) {
|
|
1644
|
-
const n = this.j2x(e, i + 1, r.concat(t));
|
|
1645
|
-
if (e[this.options.textNodeName] !== undefined && Object.keys(e).length === 1) {
|
|
1646
|
-
return this.buildTextValNode(e[this.options.textNodeName], t, n.attrStr, i);
|
|
1647
|
-
} else {
|
|
1648
|
-
return this.buildObjectNode(n.val, t, n.attrStr, i);
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
Builder.prototype.buildObjectNode = function(e, t, i, r) {
|
|
1652
|
-
if (e === "") {
|
|
1653
|
-
if (t[0] === "?") return this.indentate(r) + "<" + t + i + "?" + this.tagEndChar; else {
|
|
1654
|
-
return this.indentate(r) + "<" + t + i + this.closeTag(t) + this.tagEndChar;
|
|
1618
|
+
if (this.options.oneListGroup) {
|
|
1619
|
+
r = this.buildObjectNode(r, o, a, e);
|
|
1655
1620
|
}
|
|
1621
|
+
i += r;
|
|
1656
1622
|
} else {
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
if ((i || i === "") && e.indexOf("<") === -1) {
|
|
1664
|
-
return this.indentate(r) + "<" + t + i + s + ">" + e + n;
|
|
1665
|
-
} else if (this.options.commentPropName !== false && t === this.options.commentPropName && s.length === 0) {
|
|
1666
|
-
return this.indentate(r) + `\x3c!--${e}--\x3e` + this.newLine;
|
|
1623
|
+
if (this.options.attributesGroupName && o === this.options.attributesGroupName) {
|
|
1624
|
+
const e = Object.keys(t[o]);
|
|
1625
|
+
const n = e.length;
|
|
1626
|
+
for (let i = 0; i < n; i++) {
|
|
1627
|
+
s += this.buildAttrPairStr(e[i], "" + t[o][e[i]]);
|
|
1628
|
+
}
|
|
1667
1629
|
} else {
|
|
1668
|
-
|
|
1630
|
+
i += this.processTextOrObjNode(t[o], o, e, n);
|
|
1669
1631
|
}
|
|
1670
1632
|
}
|
|
1633
|
+
}
|
|
1634
|
+
return {
|
|
1635
|
+
attrStr: s,
|
|
1636
|
+
val: i
|
|
1671
1637
|
};
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1638
|
+
};
|
|
1639
|
+
|
|
1640
|
+
Yt.prototype.buildAttrPairStr = function(t, e) {
|
|
1641
|
+
e = this.options.attributeValueProcessor(t, "" + e);
|
|
1642
|
+
e = this.replaceEntitiesValue(e);
|
|
1643
|
+
if (this.options.suppressBooleanAttributes && e === "true") {
|
|
1644
|
+
return " " + t;
|
|
1645
|
+
} else return " " + t + '="' + e + '"';
|
|
1646
|
+
};
|
|
1647
|
+
|
|
1648
|
+
function qt(t, e, n, s) {
|
|
1649
|
+
const i = this.j2x(t, n + 1, s.concat(e));
|
|
1650
|
+
if (t[this.options.textNodeName] !== undefined && Object.keys(t).length === 1) {
|
|
1651
|
+
return this.buildTextValNode(t[this.options.textNodeName], e, i.attrStr, n);
|
|
1652
|
+
} else {
|
|
1653
|
+
return this.buildObjectNode(i.val, e, i.attrStr, n);
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
Yt.prototype.buildObjectNode = function(t, e, n, s) {
|
|
1658
|
+
if (t === "") {
|
|
1659
|
+
if (e[0] === "?") return this.indentate(s) + "<" + e + n + "?" + this.tagEndChar; else {
|
|
1660
|
+
return this.indentate(s) + "<" + e + n + this.closeTag(e) + this.tagEndChar;
|
|
1680
1661
|
}
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
if (e
|
|
1685
|
-
|
|
1662
|
+
} else {
|
|
1663
|
+
let i = "</" + e + this.tagEndChar;
|
|
1664
|
+
let r = "";
|
|
1665
|
+
if (e[0] === "?") {
|
|
1666
|
+
r = "?";
|
|
1667
|
+
i = "";
|
|
1668
|
+
}
|
|
1669
|
+
if ((n || n === "") && t.indexOf("<") === -1) {
|
|
1670
|
+
return this.indentate(s) + "<" + e + n + r + ">" + t + i;
|
|
1671
|
+
} else if (this.options.commentPropName !== false && e === this.options.commentPropName && r.length === 0) {
|
|
1672
|
+
return this.indentate(s) + `\x3c!--${t}--\x3e` + this.newLine;
|
|
1686
1673
|
} else {
|
|
1687
|
-
|
|
1688
|
-
return this.indentate(r) + "<" + t + i + "/" + this.tagEndChar;
|
|
1689
|
-
}
|
|
1674
|
+
return this.indentate(s) + "<" + e + n + r + this.tagEndChar + t + this.indentate(s) + i;
|
|
1690
1675
|
}
|
|
1691
1676
|
}
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
if (e
|
|
1711
|
-
|
|
1712
|
-
const i = this.options.entities[t];
|
|
1713
|
-
e = e.replace(i.regex, i.val);
|
|
1714
|
-
}
|
|
1677
|
+
};
|
|
1678
|
+
|
|
1679
|
+
Yt.prototype.closeTag = function(t) {
|
|
1680
|
+
let e = "";
|
|
1681
|
+
if (this.options.unpairedTags.indexOf(t) !== -1) {
|
|
1682
|
+
if (!this.options.suppressUnpairedNode) e = "/";
|
|
1683
|
+
} else if (this.options.suppressEmptyNode) {
|
|
1684
|
+
e = "/";
|
|
1685
|
+
} else {
|
|
1686
|
+
e = `></${t}`;
|
|
1687
|
+
}
|
|
1688
|
+
return e;
|
|
1689
|
+
};
|
|
1690
|
+
|
|
1691
|
+
function Wt(t, e, n, s) {
|
|
1692
|
+
if (t !== "") {
|
|
1693
|
+
return this.buildObjectNode(t, e, n, s);
|
|
1694
|
+
} else {
|
|
1695
|
+
if (e[0] === "?") return this.indentate(s) + "<" + e + n + "?" + this.tagEndChar; else {
|
|
1696
|
+
return this.indentate(s) + "<" + e + n + "/" + this.tagEndChar;
|
|
1715
1697
|
}
|
|
1716
|
-
return e;
|
|
1717
|
-
};
|
|
1718
|
-
function indentate(e) {
|
|
1719
|
-
return this.options.indentBy.repeat(e);
|
|
1720
1698
|
}
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
Yt.prototype.buildTextValNode = function(t, e, n, s) {
|
|
1702
|
+
if (this.options.cdataPropName !== false && e === this.options.cdataPropName) {
|
|
1703
|
+
return this.indentate(s) + `<![CDATA[${t}]]>` + this.newLine;
|
|
1704
|
+
} else if (this.options.commentPropName !== false && e === this.options.commentPropName) {
|
|
1705
|
+
return this.indentate(s) + `\x3c!--${t}--\x3e` + this.newLine;
|
|
1706
|
+
} else if (e[0] === "?") {
|
|
1707
|
+
return this.indentate(s) + "<" + e + n + "?" + this.tagEndChar;
|
|
1708
|
+
} else {
|
|
1709
|
+
let i = this.options.tagValueProcessor(e, t);
|
|
1710
|
+
i = this.replaceEntitiesValue(i);
|
|
1711
|
+
if (i === "") {
|
|
1712
|
+
return this.indentate(s) + "<" + e + n + this.closeTag(e) + this.tagEndChar;
|
|
1724
1713
|
} else {
|
|
1725
|
-
return
|
|
1714
|
+
return this.indentate(s) + "<" + e + n + ">" + i + "</" + e + this.tagEndChar;
|
|
1726
1715
|
}
|
|
1727
1716
|
}
|
|
1728
|
-
|
|
1729
|
-
return T;
|
|
1730
|
-
}
|
|
1717
|
+
};
|
|
1731
1718
|
|
|
1732
|
-
|
|
1719
|
+
Yt.prototype.replaceEntitiesValue = function(t) {
|
|
1720
|
+
if (t && t.length > 0 && this.options.processEntities) {
|
|
1721
|
+
for (let e = 0; e < this.options.entities.length; e++) {
|
|
1722
|
+
const n = this.options.entities[e];
|
|
1723
|
+
t = t.replace(n.regex, n.val);
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
return t;
|
|
1727
|
+
};
|
|
1733
1728
|
|
|
1734
|
-
|
|
1729
|
+
function zt(t) {
|
|
1730
|
+
return this.options.indentBy.repeat(t);
|
|
1731
|
+
}
|
|
1735
1732
|
|
|
1736
|
-
function
|
|
1737
|
-
if (
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
const i = requireJson2xml();
|
|
1743
|
-
A = {
|
|
1744
|
-
XMLParser: t,
|
|
1745
|
-
XMLValidator: e,
|
|
1746
|
-
XMLBuilder: i
|
|
1747
|
-
};
|
|
1748
|
-
return A;
|
|
1733
|
+
function Jt(t) {
|
|
1734
|
+
if (t.startsWith(this.options.attributeNamePrefix) && t !== this.options.textNodeName) {
|
|
1735
|
+
return t.substr(this.attrPrefixLen);
|
|
1736
|
+
} else {
|
|
1737
|
+
return false;
|
|
1738
|
+
}
|
|
1749
1739
|
}
|
|
1750
1740
|
|
|
1751
|
-
var
|
|
1741
|
+
var Ht = Yt;
|
|
1742
|
+
|
|
1743
|
+
const Kt = t.getDefaultExportFromCjs(Ht);
|
|
1744
|
+
|
|
1745
|
+
"use strict";
|
|
1746
|
+
|
|
1747
|
+
const Qt = e;
|
|
1748
|
+
|
|
1749
|
+
const te = Ft;
|
|
1750
|
+
|
|
1751
|
+
const ee = Ht;
|
|
1752
|
+
|
|
1753
|
+
var ne = {
|
|
1754
|
+
XMLParser: te,
|
|
1755
|
+
XMLValidator: Qt,
|
|
1756
|
+
XMLBuilder: ee
|
|
1757
|
+
};
|
|
1752
1758
|
|
|
1753
|
-
const
|
|
1759
|
+
const se = t.getDefaultExportFromCjs(ne);
|
|
1754
1760
|
|
|
1755
|
-
function
|
|
1761
|
+
function ie(t) {
|
|
1756
1762
|
try {
|
|
1757
|
-
|
|
1763
|
+
ne.XMLValidator.validate(t, {
|
|
1758
1764
|
allowBooleanAttributes: true
|
|
1759
1765
|
});
|
|
1760
1766
|
return true;
|
|
1761
|
-
} catch (
|
|
1767
|
+
} catch (t) {
|
|
1762
1768
|
return false;
|
|
1763
1769
|
}
|
|
1764
1770
|
}
|
|
1765
1771
|
|
|
1766
|
-
exports.IsXML =
|
|
1772
|
+
exports.IsXML = ie;
|