@pokash/n8n-nodes-ksef 0.2.16 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (645) hide show
  1. package/package.json +10 -11
  2. package/node_modules/@oozcitak/dom/LICENSE +0 -21
  3. package/node_modules/@oozcitak/dom/README.md +0 -32
  4. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.d.ts +0 -21
  5. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js +0 -79
  6. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js.map +0 -1
  7. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.d.ts +0 -8
  8. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js +0 -23
  9. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js.map +0 -1
  10. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.d.ts +0 -8
  11. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js +0 -76
  12. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js.map +0 -1
  13. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.d.ts +0 -19
  14. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js +0 -140
  15. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js.map +0 -1
  16. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.d.ts +0 -192
  17. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js +0 -303
  18. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js.map +0 -1
  19. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.d.ts +0 -61
  20. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js +0 -108
  21. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js.map +0 -1
  22. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.d.ts +0 -72
  23. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js +0 -288
  24. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js.map +0 -1
  25. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.d.ts +0 -21
  26. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js +0 -61
  27. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js.map +0 -1
  28. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.d.ts +0 -29
  29. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js +0 -161
  30. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js.map +0 -1
  31. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.d.ts +0 -121
  32. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js +0 -608
  33. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js.map +0 -1
  34. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.d.ts +0 -146
  35. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js +0 -995
  36. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js.map +0 -1
  37. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.d.ts +0 -33
  38. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js +0 -142
  39. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js.map +0 -1
  40. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.d.ts +0 -66
  41. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js +0 -1173
  42. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js.map +0 -1
  43. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.d.ts +0 -43
  44. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js +0 -276
  45. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js.map +0 -1
  46. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.d.ts +0 -25
  47. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js +0 -85
  48. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js.map +0 -1
  49. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.d.ts +0 -68
  50. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js +0 -543
  51. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js.map +0 -1
  52. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.d.ts +0 -15
  53. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js +0 -105
  54. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js.map +0 -1
  55. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.d.ts +0 -27
  56. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js +0 -125
  57. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js.map +0 -1
  58. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.d.ts +0 -9
  59. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js +0 -69
  60. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js.map +0 -1
  61. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.d.ts +0 -82
  62. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js +0 -829
  63. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js.map +0 -1
  64. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.d.ts +0 -8
  65. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js +0 -21
  66. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js.map +0 -1
  67. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.d.ts +0 -57
  68. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js +0 -316
  69. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js.map +0 -1
  70. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.d.ts +0 -30
  71. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js +0 -226
  72. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js.map +0 -1
  73. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.d.ts +0 -8
  74. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js +0 -62
  75. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js.map +0 -1
  76. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.d.ts +0 -268
  77. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js +0 -853
  78. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js.map +0 -1
  79. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.d.ts +0 -17
  80. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js +0 -147
  81. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js.map +0 -1
  82. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.d.ts +0 -8
  83. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js +0 -14
  84. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js.map +0 -1
  85. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.d.ts +0 -25
  86. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js +0 -164
  87. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js.map +0 -1
  88. package/node_modules/@oozcitak/dom/lib/algorithm/index.d.ts +0 -28
  89. package/node_modules/@oozcitak/dom/lib/algorithm/index.js +0 -34
  90. package/node_modules/@oozcitak/dom/lib/algorithm/index.js.map +0 -1
  91. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.d.ts +0 -15
  92. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js +0 -32
  93. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js.map +0 -1
  94. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.d.ts +0 -23
  95. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js +0 -59
  96. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js.map +0 -1
  97. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.d.ts +0 -23
  98. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js +0 -70
  99. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js.map +0 -1
  100. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.d.ts +0 -45
  101. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js +0 -118
  102. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js.map +0 -1
  103. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.d.ts +0 -21
  104. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js +0 -51
  105. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js.map +0 -1
  106. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.d.ts +0 -35
  107. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js +0 -132
  108. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js.map +0 -1
  109. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.d.ts +0 -16
  110. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js +0 -165
  111. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js.map +0 -1
  112. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.d.ts +0 -21
  113. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js +0 -52
  114. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js.map +0 -1
  115. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.d.ts +0 -16
  116. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js +0 -60
  117. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js.map +0 -1
  118. package/node_modules/@oozcitak/dom/lib/dom/DOMException.d.ts +0 -171
  119. package/node_modules/@oozcitak/dom/lib/dom/DOMException.js +0 -347
  120. package/node_modules/@oozcitak/dom/lib/dom/DOMException.js.map +0 -1
  121. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.d.ts +0 -48
  122. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js +0 -100
  123. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js.map +0 -1
  124. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.d.ts +0 -29
  125. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js +0 -149
  126. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js.map +0 -1
  127. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.d.ts +0 -46
  128. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js +0 -312
  129. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js.map +0 -1
  130. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.d.ts +0 -32
  131. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js +0 -103
  132. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js.map +0 -1
  133. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.d.ts +0 -116
  134. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js +0 -545
  135. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js.map +0 -1
  136. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.d.ts +0 -11
  137. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js +0 -17
  138. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js.map +0 -1
  139. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.d.ts +0 -39
  140. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js +0 -109
  141. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js.map +0 -1
  142. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.d.ts +0 -132
  143. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js +0 -714
  144. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js.map +0 -1
  145. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.d.ts +0 -74
  146. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.js +0 -313
  147. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.js.map +0 -1
  148. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.d.ts +0 -30
  149. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js +0 -133
  150. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js.map +0 -1
  151. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.d.ts +0 -44
  152. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js +0 -157
  153. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js.map +0 -1
  154. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.d.ts +0 -22
  155. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js +0 -184
  156. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js.map +0 -1
  157. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.d.ts +0 -73
  158. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js +0 -116
  159. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js.map +0 -1
  160. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.d.ts +0 -34
  161. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js +0 -112
  162. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js.map +0 -1
  163. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.d.ts +0 -50
  164. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js +0 -64
  165. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js.map +0 -1
  166. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.d.ts +0 -252
  167. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js +0 -891
  168. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js.map +0 -1
  169. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.d.ts +0 -34
  170. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js +0 -86
  171. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js.map +0 -1
  172. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.d.ts +0 -46
  173. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js +0 -198
  174. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js.map +0 -1
  175. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.d.ts +0 -49
  176. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js +0 -188
  177. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js.map +0 -1
  178. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.d.ts +0 -12
  179. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js +0 -53
  180. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js.map +0 -1
  181. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.d.ts +0 -9
  182. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js +0 -31
  183. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js.map +0 -1
  184. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.d.ts +0 -24
  185. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js +0 -158
  186. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js.map +0 -1
  187. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.d.ts +0 -25
  188. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js +0 -59
  189. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js.map +0 -1
  190. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.d.ts +0 -71
  191. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js +0 -649
  192. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js.map +0 -1
  193. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.d.ts +0 -33
  194. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js +0 -82
  195. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js.map +0 -1
  196. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.d.ts +0 -16
  197. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js +0 -35
  198. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js.map +0 -1
  199. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.d.ts +0 -13
  200. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js +0 -48
  201. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js.map +0 -1
  202. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.d.ts +0 -28
  203. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.js +0 -109
  204. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.js.map +0 -1
  205. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.d.ts +0 -23
  206. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js +0 -41
  207. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js.map +0 -1
  208. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.d.ts +0 -36
  209. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js +0 -249
  210. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js.map +0 -1
  211. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.d.ts +0 -26
  212. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js +0 -57
  213. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js.map +0 -1
  214. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.d.ts +0 -11
  215. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js +0 -31
  216. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js.map +0 -1
  217. package/node_modules/@oozcitak/dom/lib/dom/index.d.ts +0 -36
  218. package/node_modules/@oozcitak/dom/lib/dom/index.js +0 -102
  219. package/node_modules/@oozcitak/dom/lib/dom/index.js.map +0 -1
  220. package/node_modules/@oozcitak/dom/lib/dom/interfaces.d.ts +0 -2218
  221. package/node_modules/@oozcitak/dom/lib/dom/interfaces.js +0 -91
  222. package/node_modules/@oozcitak/dom/lib/dom/interfaces.js.map +0 -1
  223. package/node_modules/@oozcitak/dom/lib/index.d.ts +0 -3
  224. package/node_modules/@oozcitak/dom/lib/index.js +0 -11
  225. package/node_modules/@oozcitak/dom/lib/index.js.map +0 -1
  226. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.d.ts +0 -11
  227. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js +0 -37
  228. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js.map +0 -1
  229. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.d.ts +0 -26
  230. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js +0 -240
  231. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js.map +0 -1
  232. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.d.ts +0 -159
  233. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js +0 -512
  234. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js.map +0 -1
  235. package/node_modules/@oozcitak/dom/lib/parser/index.d.ts +0 -1
  236. package/node_modules/@oozcitak/dom/lib/parser/index.js +0 -6
  237. package/node_modules/@oozcitak/dom/lib/parser/index.js.map +0 -1
  238. package/node_modules/@oozcitak/dom/lib/parser/interfaces.d.ts +0 -131
  239. package/node_modules/@oozcitak/dom/lib/parser/interfaces.js +0 -18
  240. package/node_modules/@oozcitak/dom/lib/parser/interfaces.js.map +0 -1
  241. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.d.ts +0 -27
  242. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js +0 -56
  243. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js.map +0 -1
  244. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.d.ts +0 -52
  245. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js +0 -151
  246. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js.map +0 -1
  247. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.d.ts +0 -166
  248. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js +0 -1479
  249. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js.map +0 -1
  250. package/node_modules/@oozcitak/dom/lib/serializer/index.d.ts +0 -1
  251. package/node_modules/@oozcitak/dom/lib/serializer/index.js +0 -6
  252. package/node_modules/@oozcitak/dom/lib/serializer/index.js.map +0 -1
  253. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.d.ts +0 -15
  254. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.js +0 -3
  255. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.js.map +0 -1
  256. package/node_modules/@oozcitak/dom/lib/util/Cast.d.ts +0 -12
  257. package/node_modules/@oozcitak/dom/lib/util/Cast.js +0 -26
  258. package/node_modules/@oozcitak/dom/lib/util/Cast.js.map +0 -1
  259. package/node_modules/@oozcitak/dom/lib/util/EmptySet.d.ts +0 -13
  260. package/node_modules/@oozcitak/dom/lib/util/EmptySet.js +0 -61
  261. package/node_modules/@oozcitak/dom/lib/util/EmptySet.js.map +0 -1
  262. package/node_modules/@oozcitak/dom/lib/util/Guard.d.ts +0 -135
  263. package/node_modules/@oozcitak/dom/lib/util/Guard.js +0 -192
  264. package/node_modules/@oozcitak/dom/lib/util/Guard.js.map +0 -1
  265. package/node_modules/@oozcitak/dom/lib/util/index.d.ts +0 -3
  266. package/node_modules/@oozcitak/dom/lib/util/index.js +0 -9
  267. package/node_modules/@oozcitak/dom/lib/util/index.js.map +0 -1
  268. package/node_modules/@oozcitak/dom/package.json +0 -72
  269. package/node_modules/@oozcitak/infra/LICENSE +0 -21
  270. package/node_modules/@oozcitak/infra/README.md +0 -13
  271. package/node_modules/@oozcitak/infra/lib/Base64.d.ts +0 -12
  272. package/node_modules/@oozcitak/infra/lib/Base64.js +0 -82
  273. package/node_modules/@oozcitak/infra/lib/Base64.js.map +0 -1
  274. package/node_modules/@oozcitak/infra/lib/Byte.d.ts +0 -6
  275. package/node_modules/@oozcitak/infra/lib/Byte.js +0 -15
  276. package/node_modules/@oozcitak/infra/lib/Byte.js.map +0 -1
  277. package/node_modules/@oozcitak/infra/lib/ByteSequence.d.ts +0 -45
  278. package/node_modules/@oozcitak/infra/lib/ByteSequence.js +0 -171
  279. package/node_modules/@oozcitak/infra/lib/ByteSequence.js.map +0 -1
  280. package/node_modules/@oozcitak/infra/lib/CodePoints.d.ts +0 -82
  281. package/node_modules/@oozcitak/infra/lib/CodePoints.js +0 -85
  282. package/node_modules/@oozcitak/infra/lib/CodePoints.js.map +0 -1
  283. package/node_modules/@oozcitak/infra/lib/JSON.d.ts +0 -24
  284. package/node_modules/@oozcitak/infra/lib/JSON.js +0 -123
  285. package/node_modules/@oozcitak/infra/lib/JSON.js.map +0 -1
  286. package/node_modules/@oozcitak/infra/lib/List.d.ts +0 -101
  287. package/node_modules/@oozcitak/infra/lib/List.js +0 -325
  288. package/node_modules/@oozcitak/infra/lib/List.js.map +0 -1
  289. package/node_modules/@oozcitak/infra/lib/Map.d.ts +0 -87
  290. package/node_modules/@oozcitak/infra/lib/Map.js +0 -308
  291. package/node_modules/@oozcitak/infra/lib/Map.js.map +0 -1
  292. package/node_modules/@oozcitak/infra/lib/Namespace.d.ts +0 -6
  293. package/node_modules/@oozcitak/infra/lib/Namespace.js +0 -9
  294. package/node_modules/@oozcitak/infra/lib/Namespace.js.map +0 -1
  295. package/node_modules/@oozcitak/infra/lib/Queue.d.ts +0 -13
  296. package/node_modules/@oozcitak/infra/lib/Queue.js +0 -22
  297. package/node_modules/@oozcitak/infra/lib/Queue.js.map +0 -1
  298. package/node_modules/@oozcitak/infra/lib/Set.d.ts +0 -136
  299. package/node_modules/@oozcitak/infra/lib/Set.js +0 -467
  300. package/node_modules/@oozcitak/infra/lib/Set.js.map +0 -1
  301. package/node_modules/@oozcitak/infra/lib/Stack.d.ts +0 -13
  302. package/node_modules/@oozcitak/infra/lib/Stack.js +0 -22
  303. package/node_modules/@oozcitak/infra/lib/Stack.js.map +0 -1
  304. package/node_modules/@oozcitak/infra/lib/String.d.ts +0 -129
  305. package/node_modules/@oozcitak/infra/lib/String.js +0 -472
  306. package/node_modules/@oozcitak/infra/lib/String.js.map +0 -1
  307. package/node_modules/@oozcitak/infra/lib/index.d.ts +0 -13
  308. package/node_modules/@oozcitak/infra/lib/index.js +0 -34
  309. package/node_modules/@oozcitak/infra/lib/index.js.map +0 -1
  310. package/node_modules/@oozcitak/infra/package.json +0 -54
  311. package/node_modules/@oozcitak/url/LICENSE +0 -21
  312. package/node_modules/@oozcitak/url/README.md +0 -27
  313. package/node_modules/@oozcitak/url/lib/URLAlgorithm.d.ts +0 -267
  314. package/node_modules/@oozcitak/url/lib/URLAlgorithm.js +0 -2758
  315. package/node_modules/@oozcitak/url/lib/URLAlgorithm.js.map +0 -1
  316. package/node_modules/@oozcitak/url/lib/URLImpl.d.ts +0 -53
  317. package/node_modules/@oozcitak/url/lib/URLImpl.js +0 -377
  318. package/node_modules/@oozcitak/url/lib/URLImpl.js.map +0 -1
  319. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.d.ts +0 -38
  320. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js +0 -303
  321. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js.map +0 -1
  322. package/node_modules/@oozcitak/url/lib/index.d.ts +0 -2
  323. package/node_modules/@oozcitak/url/lib/index.js +0 -7
  324. package/node_modules/@oozcitak/url/lib/index.js.map +0 -1
  325. package/node_modules/@oozcitak/url/lib/interfaces.d.ts +0 -195
  326. package/node_modules/@oozcitak/url/lib/interfaces.js +0 -31
  327. package/node_modules/@oozcitak/url/lib/interfaces.js.map +0 -1
  328. package/node_modules/@oozcitak/url/package.json +0 -55
  329. package/node_modules/@oozcitak/util/LICENSE +0 -21
  330. package/node_modules/@oozcitak/util/README.md +0 -10
  331. package/node_modules/@oozcitak/util/lib/CompareCache.d.ts +0 -32
  332. package/node_modules/@oozcitak/util/lib/CompareCache.js +0 -59
  333. package/node_modules/@oozcitak/util/lib/CompareCache.js.map +0 -1
  334. package/node_modules/@oozcitak/util/lib/FixedSizeSet.d.ts +0 -64
  335. package/node_modules/@oozcitak/util/lib/FixedSizeSet.js +0 -174
  336. package/node_modules/@oozcitak/util/lib/FixedSizeSet.js.map +0 -1
  337. package/node_modules/@oozcitak/util/lib/Lazy.d.ts +0 -18
  338. package/node_modules/@oozcitak/util/lib/Lazy.js +0 -34
  339. package/node_modules/@oozcitak/util/lib/Lazy.js.map +0 -1
  340. package/node_modules/@oozcitak/util/lib/ObjectCache.d.ts +0 -71
  341. package/node_modules/@oozcitak/util/lib/ObjectCache.js +0 -181
  342. package/node_modules/@oozcitak/util/lib/ObjectCache.js.map +0 -1
  343. package/node_modules/@oozcitak/util/lib/StringWalker.d.ts +0 -49
  344. package/node_modules/@oozcitak/util/lib/StringWalker.js +0 -105
  345. package/node_modules/@oozcitak/util/lib/StringWalker.js.map +0 -1
  346. package/node_modules/@oozcitak/util/lib/index.d.ts +0 -178
  347. package/node_modules/@oozcitak/util/lib/index.js +0 -439
  348. package/node_modules/@oozcitak/util/lib/index.js.map +0 -1
  349. package/node_modules/@oozcitak/util/package.json +0 -50
  350. package/node_modules/@xmldom/is-dom-node/LICENSE.md +0 -21
  351. package/node_modules/@xmldom/is-dom-node/README.md +0 -91
  352. package/node_modules/@xmldom/is-dom-node/dist/index.d.ts +0 -33
  353. package/node_modules/@xmldom/is-dom-node/dist/index.js +0 -91
  354. package/node_modules/@xmldom/is-dom-node/dist/index.js.map +0 -1
  355. package/node_modules/@xmldom/is-dom-node/package.json +0 -69
  356. package/node_modules/@xmldom/xmldom/CHANGELOG.md +0 -468
  357. package/node_modules/@xmldom/xmldom/LICENSE +0 -8
  358. package/node_modules/@xmldom/xmldom/SECURITY.md +0 -50
  359. package/node_modules/@xmldom/xmldom/index.d.ts +0 -43
  360. package/node_modules/@xmldom/xmldom/lib/.eslintrc.yml +0 -2
  361. package/node_modules/@xmldom/xmldom/lib/conventions.js +0 -203
  362. package/node_modules/@xmldom/xmldom/lib/dom-parser.js +0 -322
  363. package/node_modules/@xmldom/xmldom/lib/dom.js +0 -1879
  364. package/node_modules/@xmldom/xmldom/lib/entities.js +0 -2166
  365. package/node_modules/@xmldom/xmldom/lib/index.js +0 -4
  366. package/node_modules/@xmldom/xmldom/lib/sax.js +0 -662
  367. package/node_modules/@xmldom/xmldom/package.json +0 -71
  368. package/node_modules/@xmldom/xmldom/readme.md +0 -356
  369. package/node_modules/esprima/ChangeLog +0 -235
  370. package/node_modules/esprima/LICENSE.BSD +0 -21
  371. package/node_modules/esprima/README.md +0 -46
  372. package/node_modules/esprima/bin/esparse.js +0 -139
  373. package/node_modules/esprima/bin/esvalidate.js +0 -236
  374. package/node_modules/esprima/dist/esprima.js +0 -6709
  375. package/node_modules/esprima/package.json +0 -112
  376. package/node_modules/node-forge/LICENSE +0 -331
  377. package/node_modules/node-forge/README.md +0 -2071
  378. package/node_modules/node-forge/dist/forge.all.min.js +0 -2
  379. package/node_modules/node-forge/dist/forge.all.min.js.map +0 -1
  380. package/node_modules/node-forge/dist/forge.min.js +0 -2
  381. package/node_modules/node-forge/dist/forge.min.js.map +0 -1
  382. package/node_modules/node-forge/dist/prime.worker.min.js +0 -2
  383. package/node_modules/node-forge/dist/prime.worker.min.js.map +0 -1
  384. package/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
  385. package/node_modules/node-forge/lib/aes.js +0 -1091
  386. package/node_modules/node-forge/lib/aesCipherSuites.js +0 -282
  387. package/node_modules/node-forge/lib/asn1-validator.js +0 -91
  388. package/node_modules/node-forge/lib/asn1.js +0 -1503
  389. package/node_modules/node-forge/lib/baseN.js +0 -186
  390. package/node_modules/node-forge/lib/cipher.js +0 -230
  391. package/node_modules/node-forge/lib/cipherModes.js +0 -999
  392. package/node_modules/node-forge/lib/des.js +0 -496
  393. package/node_modules/node-forge/lib/ed25519.js +0 -1072
  394. package/node_modules/node-forge/lib/forge.js +0 -13
  395. package/node_modules/node-forge/lib/form.js +0 -149
  396. package/node_modules/node-forge/lib/hmac.js +0 -146
  397. package/node_modules/node-forge/lib/http.js +0 -1346
  398. package/node_modules/node-forge/lib/index.all.js +0 -16
  399. package/node_modules/node-forge/lib/index.js +0 -33
  400. package/node_modules/node-forge/lib/jsbn.js +0 -1264
  401. package/node_modules/node-forge/lib/kem.js +0 -168
  402. package/node_modules/node-forge/lib/log.js +0 -319
  403. package/node_modules/node-forge/lib/md.all.js +0 -13
  404. package/node_modules/node-forge/lib/md.js +0 -11
  405. package/node_modules/node-forge/lib/md5.js +0 -289
  406. package/node_modules/node-forge/lib/mgf.js +0 -12
  407. package/node_modules/node-forge/lib/mgf1.js +0 -57
  408. package/node_modules/node-forge/lib/oids.js +0 -179
  409. package/node_modules/node-forge/lib/pbe.js +0 -1023
  410. package/node_modules/node-forge/lib/pbkdf2.js +0 -211
  411. package/node_modules/node-forge/lib/pem.js +0 -237
  412. package/node_modules/node-forge/lib/pkcs1.js +0 -276
  413. package/node_modules/node-forge/lib/pkcs12.js +0 -1078
  414. package/node_modules/node-forge/lib/pkcs7.js +0 -1260
  415. package/node_modules/node-forge/lib/pkcs7asn1.js +0 -410
  416. package/node_modules/node-forge/lib/pki.js +0 -102
  417. package/node_modules/node-forge/lib/prime.js +0 -297
  418. package/node_modules/node-forge/lib/prime.worker.js +0 -168
  419. package/node_modules/node-forge/lib/prng.js +0 -419
  420. package/node_modules/node-forge/lib/pss.js +0 -241
  421. package/node_modules/node-forge/lib/random.js +0 -191
  422. package/node_modules/node-forge/lib/rc2.js +0 -410
  423. package/node_modules/node-forge/lib/rsa.js +0 -1949
  424. package/node_modules/node-forge/lib/sha1.js +0 -319
  425. package/node_modules/node-forge/lib/sha256.js +0 -327
  426. package/node_modules/node-forge/lib/sha512.js +0 -561
  427. package/node_modules/node-forge/lib/socket.js +0 -287
  428. package/node_modules/node-forge/lib/ssh.js +0 -236
  429. package/node_modules/node-forge/lib/tls.js +0 -4282
  430. package/node_modules/node-forge/lib/tlssocket.js +0 -249
  431. package/node_modules/node-forge/lib/util.js +0 -2652
  432. package/node_modules/node-forge/lib/x509.js +0 -3242
  433. package/node_modules/node-forge/lib/xhr.js +0 -738
  434. package/node_modules/node-forge/package.json +0 -123
  435. package/node_modules/sprintf-js/.npmignore +0 -1
  436. package/node_modules/sprintf-js/LICENSE +0 -24
  437. package/node_modules/sprintf-js/README.md +0 -88
  438. package/node_modules/sprintf-js/bower.json +0 -14
  439. package/node_modules/sprintf-js/demo/angular.html +0 -20
  440. package/node_modules/sprintf-js/dist/angular-sprintf.min.js +0 -4
  441. package/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +0 -1
  442. package/node_modules/sprintf-js/dist/angular-sprintf.min.map +0 -1
  443. package/node_modules/sprintf-js/dist/sprintf.min.js +0 -4
  444. package/node_modules/sprintf-js/dist/sprintf.min.js.map +0 -1
  445. package/node_modules/sprintf-js/dist/sprintf.min.map +0 -1
  446. package/node_modules/sprintf-js/gruntfile.js +0 -36
  447. package/node_modules/sprintf-js/package.json +0 -22
  448. package/node_modules/sprintf-js/src/angular-sprintf.js +0 -18
  449. package/node_modules/sprintf-js/src/sprintf.js +0 -208
  450. package/node_modules/sprintf-js/test/test.js +0 -82
  451. package/node_modules/xml-crypto/LICENSE +0 -22
  452. package/node_modules/xml-crypto/README.md +0 -557
  453. package/node_modules/xml-crypto/lib/c14n-canonicalization.d.ts +0 -39
  454. package/node_modules/xml-crypto/lib/c14n-canonicalization.js +0 -230
  455. package/node_modules/xml-crypto/lib/c14n-canonicalization.js.map +0 -1
  456. package/node_modules/xml-crypto/lib/enveloped-signature.d.ts +0 -7
  457. package/node_modules/xml-crypto/lib/enveloped-signature.js +0 -43
  458. package/node_modules/xml-crypto/lib/enveloped-signature.js.map +0 -1
  459. package/node_modules/xml-crypto/lib/exclusive-canonicalization.d.ts +0 -38
  460. package/node_modules/xml-crypto/lib/exclusive-canonicalization.js +0 -246
  461. package/node_modules/xml-crypto/lib/exclusive-canonicalization.js.map +0 -1
  462. package/node_modules/xml-crypto/lib/hash-algorithms.d.ts +0 -13
  463. package/node_modules/xml-crypto/lib/hash-algorithms.js +0 -47
  464. package/node_modules/xml-crypto/lib/hash-algorithms.js.map +0 -1
  465. package/node_modules/xml-crypto/lib/index.d.ts +0 -5
  466. package/node_modules/xml-crypto/lib/index.js +0 -28
  467. package/node_modules/xml-crypto/lib/index.js.map +0 -1
  468. package/node_modules/xml-crypto/lib/signature-algorithms.d.ts +0 -47
  469. package/node_modules/xml-crypto/lib/signature-algorithms.js +0 -86
  470. package/node_modules/xml-crypto/lib/signature-algorithms.js.map +0 -1
  471. package/node_modules/xml-crypto/lib/signed-xml.d.ts +0 -225
  472. package/node_modules/xml-crypto/lib/signed-xml.js +0 -960
  473. package/node_modules/xml-crypto/lib/signed-xml.js.map +0 -1
  474. package/node_modules/xml-crypto/lib/types.d.ts +0 -125
  475. package/node_modules/xml-crypto/lib/types.js +0 -57
  476. package/node_modules/xml-crypto/lib/types.js.map +0 -1
  477. package/node_modules/xml-crypto/lib/utils.d.ts +0 -65
  478. package/node_modules/xml-crypto/lib/utils.js +0 -256
  479. package/node_modules/xml-crypto/lib/utils.js.map +0 -1
  480. package/node_modules/xml-crypto/node_modules/xpath/LICENSE +0 -22
  481. package/node_modules/xml-crypto/node_modules/xpath/README.md +0 -133
  482. package/node_modules/xml-crypto/node_modules/xpath/docs/XPathEvaluator.md +0 -62
  483. package/node_modules/xml-crypto/node_modules/xpath/docs/XPathResult.md +0 -47
  484. package/node_modules/xml-crypto/node_modules/xpath/docs/function resolvers.md +0 -88
  485. package/node_modules/xml-crypto/node_modules/xpath/docs/namespace resolvers.md +0 -69
  486. package/node_modules/xml-crypto/node_modules/xpath/docs/parsed expressions.md +0 -21
  487. package/node_modules/xml-crypto/node_modules/xpath/docs/variable resolvers.md +0 -89
  488. package/node_modules/xml-crypto/node_modules/xpath/docs/xpath methods.md +0 -39
  489. package/node_modules/xml-crypto/node_modules/xpath/package.json +0 -39
  490. package/node_modules/xml-crypto/node_modules/xpath/test.js +0 -1186
  491. package/node_modules/xml-crypto/node_modules/xpath/xpath.d.ts +0 -51
  492. package/node_modules/xml-crypto/node_modules/xpath/xpath.js +0 -4938
  493. package/node_modules/xml-crypto/package.json +0 -73
  494. package/node_modules/xmlbuilder2/CHANGELOG.md +0 -309
  495. package/node_modules/xmlbuilder2/LICENSE +0 -21
  496. package/node_modules/xmlbuilder2/README.md +0 -183
  497. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.d.ts +0 -236
  498. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.js +0 -108
  499. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.js.map +0 -1
  500. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.d.ts +0 -17
  501. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.js +0 -26
  502. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.js.map +0 -1
  503. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.d.ts +0 -124
  504. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js +0 -782
  505. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js.map +0 -1
  506. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.d.ts +0 -143
  507. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.js +0 -841
  508. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.js.map +0 -1
  509. package/node_modules/xmlbuilder2/lib/builder/dom.d.ts +0 -8
  510. package/node_modules/xmlbuilder2/lib/builder/dom.js +0 -67
  511. package/node_modules/xmlbuilder2/lib/builder/dom.js.map +0 -1
  512. package/node_modules/xmlbuilder2/lib/builder/index.d.ts +0 -4
  513. package/node_modules/xmlbuilder2/lib/builder/index.js +0 -15
  514. package/node_modules/xmlbuilder2/lib/builder/index.js.map +0 -1
  515. package/node_modules/xmlbuilder2/lib/constants.d.ts +0 -1
  516. package/node_modules/xmlbuilder2/lib/constants.js +0 -4
  517. package/node_modules/xmlbuilder2/lib/constants.js.map +0 -1
  518. package/node_modules/xmlbuilder2/lib/index.d.ts +0 -1
  519. package/node_modules/xmlbuilder2/lib/index.js +0 -10
  520. package/node_modules/xmlbuilder2/lib/index.js.map +0 -1
  521. package/node_modules/xmlbuilder2/lib/interfaces.d.ts +0 -1355
  522. package/node_modules/xmlbuilder2/lib/interfaces.js +0 -76
  523. package/node_modules/xmlbuilder2/lib/interfaces.js.map +0 -1
  524. package/node_modules/xmlbuilder2/lib/readers/BaseReader.d.ts +0 -109
  525. package/node_modules/xmlbuilder2/lib/readers/BaseReader.js +0 -167
  526. package/node_modules/xmlbuilder2/lib/readers/BaseReader.js.map +0 -1
  527. package/node_modules/xmlbuilder2/lib/readers/JSONReader.d.ts +0 -14
  528. package/node_modules/xmlbuilder2/lib/readers/JSONReader.js +0 -38
  529. package/node_modules/xmlbuilder2/lib/readers/JSONReader.js.map +0 -1
  530. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.d.ts +0 -15
  531. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.js +0 -168
  532. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.js.map +0 -1
  533. package/node_modules/xmlbuilder2/lib/readers/XMLReader.d.ts +0 -14
  534. package/node_modules/xmlbuilder2/lib/readers/XMLReader.js +0 -206
  535. package/node_modules/xmlbuilder2/lib/readers/XMLReader.js.map +0 -1
  536. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.d.ts +0 -14
  537. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.js +0 -44
  538. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.js.map +0 -1
  539. package/node_modules/xmlbuilder2/lib/readers/index.d.ts +0 -4
  540. package/node_modules/xmlbuilder2/lib/readers/index.js +0 -11
  541. package/node_modules/xmlbuilder2/lib/readers/index.js.map +0 -1
  542. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.d.ts +0 -110
  543. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.js +0 -23
  544. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.js.map +0 -1
  545. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.d.ts +0 -276
  546. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.js +0 -1603
  547. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.js.map +0 -1
  548. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.d.ts +0 -68
  549. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.js +0 -172
  550. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.js.map +0 -1
  551. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.d.ts +0 -67
  552. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.js +0 -222
  553. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.js.map +0 -1
  554. package/node_modules/xmlbuilder2/lib/writers/MapWriter.d.ts +0 -27
  555. package/node_modules/xmlbuilder2/lib/writers/MapWriter.js +0 -84
  556. package/node_modules/xmlbuilder2/lib/writers/MapWriter.js.map +0 -1
  557. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.d.ts +0 -56
  558. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.js +0 -483
  559. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.js.map +0 -1
  560. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.d.ts +0 -51
  561. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.js +0 -165
  562. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.js.map +0 -1
  563. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.d.ts +0 -60
  564. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.js +0 -236
  565. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.js.map +0 -1
  566. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.d.ts +0 -61
  567. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.js +0 -161
  568. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.js.map +0 -1
  569. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.d.ts +0 -55
  570. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.js +0 -186
  571. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.js.map +0 -1
  572. package/node_modules/xmlbuilder2/lib/writers/index.d.ts +0 -5
  573. package/node_modules/xmlbuilder2/lib/writers/index.js +0 -13
  574. package/node_modules/xmlbuilder2/lib/writers/index.js.map +0 -1
  575. package/node_modules/xmlbuilder2/lib/xmlbuilder2.min.js +0 -8
  576. package/node_modules/xmlbuilder2/node_modules/argparse/CHANGELOG.md +0 -185
  577. package/node_modules/xmlbuilder2/node_modules/argparse/LICENSE +0 -21
  578. package/node_modules/xmlbuilder2/node_modules/argparse/README.md +0 -257
  579. package/node_modules/xmlbuilder2/node_modules/argparse/index.js +0 -3
  580. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/append/constant.js +0 -47
  581. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/append.js +0 -53
  582. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/count.js +0 -40
  583. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/help.js +0 -47
  584. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store/constant.js +0 -43
  585. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store/false.js +0 -27
  586. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store/true.js +0 -26
  587. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store.js +0 -50
  588. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/subparsers.js +0 -149
  589. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/version.js +0 -47
  590. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action.js +0 -146
  591. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action_container.js +0 -482
  592. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argparse.js +0 -14
  593. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument/error.js +0 -50
  594. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument/exclusive.js +0 -54
  595. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument/group.js +0 -75
  596. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument_parser.js +0 -1161
  597. package/node_modules/xmlbuilder2/node_modules/argparse/lib/const.js +0 -21
  598. package/node_modules/xmlbuilder2/node_modules/argparse/lib/help/added_formatters.js +0 -87
  599. package/node_modules/xmlbuilder2/node_modules/argparse/lib/help/formatter.js +0 -795
  600. package/node_modules/xmlbuilder2/node_modules/argparse/lib/namespace.js +0 -76
  601. package/node_modules/xmlbuilder2/node_modules/argparse/lib/utils.js +0 -57
  602. package/node_modules/xmlbuilder2/node_modules/argparse/package.json +0 -34
  603. package/node_modules/xmlbuilder2/node_modules/js-yaml/CHANGELOG.md +0 -557
  604. package/node_modules/xmlbuilder2/node_modules/js-yaml/LICENSE +0 -21
  605. package/node_modules/xmlbuilder2/node_modules/js-yaml/README.md +0 -299
  606. package/node_modules/xmlbuilder2/node_modules/js-yaml/bin/js-yaml.js +0 -132
  607. package/node_modules/xmlbuilder2/node_modules/js-yaml/dist/js-yaml.js +0 -3989
  608. package/node_modules/xmlbuilder2/node_modules/js-yaml/dist/js-yaml.min.js +0 -1
  609. package/node_modules/xmlbuilder2/node_modules/js-yaml/index.js +0 -7
  610. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/common.js +0 -59
  611. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/dumper.js +0 -850
  612. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/exception.js +0 -43
  613. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/loader.js +0 -1644
  614. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/mark.js +0 -76
  615. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/core.js +0 -18
  616. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +0 -25
  617. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +0 -28
  618. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +0 -17
  619. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/json.js +0 -25
  620. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema.js +0 -108
  621. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/binary.js +0 -138
  622. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/bool.js +0 -35
  623. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/float.js +0 -116
  624. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/int.js +0 -173
  625. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/function.js +0 -93
  626. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +0 -60
  627. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +0 -28
  628. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/map.js +0 -8
  629. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/merge.js +0 -12
  630. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/null.js +0 -34
  631. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/omap.js +0 -44
  632. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/pairs.js +0 -53
  633. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/seq.js +0 -8
  634. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/set.js +0 -29
  635. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/str.js +0 -8
  636. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +0 -88
  637. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type.js +0 -61
  638. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml.js +0 -39
  639. package/node_modules/xmlbuilder2/node_modules/js-yaml/package.json +0 -49
  640. package/node_modules/xmlbuilder2/package.json +0 -82
  641. package/node_modules/xpath/LICENSE +0 -22
  642. package/node_modules/xpath/README.md +0 -133
  643. package/node_modules/xpath/package.json +0 -43
  644. package/node_modules/xpath/xpath.d.ts +0 -51
  645. package/node_modules/xpath/xpath.js +0 -5041
@@ -1,1479 +0,0 @@
1
- "use strict";
2
- var __values = (this && this.__values) || function(o) {
3
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4
- if (m) return m.call(o);
5
- if (o && typeof o.length === "number") return {
6
- next: function () {
7
- if (o && i >= o.length) o = void 0;
8
- return { value: o && o[i++], done: !o };
9
- }
10
- };
11
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- var interfaces_1 = require("../dom/interfaces");
15
- var LocalNameSet_1 = require("./LocalNameSet");
16
- var NamespacePrefixMap_1 = require("./NamespacePrefixMap");
17
- var DOMException_1 = require("../dom/DOMException");
18
- var infra_1 = require("@oozcitak/infra");
19
- var algorithm_1 = require("../algorithm");
20
- /**
21
- * Represents an XML serializer.
22
- *
23
- * Implements: https://www.w3.org/TR/DOM-Parsing/#serializing
24
- */
25
- var XMLSerializerImpl = /** @class */ (function () {
26
- function XMLSerializerImpl() {
27
- }
28
- /** @inheritdoc */
29
- XMLSerializerImpl.prototype.serializeToString = function (root) {
30
- /**
31
- * The serializeToString(root) method must produce an XML serialization
32
- * of root passing a value of false for the require well-formed parameter,
33
- * and return the result.
34
- */
35
- return this._xmlSerialization(root, false);
36
- };
37
- /**
38
- * Produces an XML serialization of the given node.
39
- *
40
- * @param node - node to serialize
41
- * @param requireWellFormed - whether to check conformance
42
- */
43
- XMLSerializerImpl.prototype._xmlSerialization = function (node, requireWellFormed) {
44
- // To increase performance, use a namespace-aware serializer only if the
45
- // document has namespaced elements
46
- if (node._nodeDocument === undefined || node._nodeDocument._hasNamespaces) {
47
- /** From: https://w3c.github.io/DOM-Parsing/#xml-serialization
48
- *
49
- * 1. Let namespace be a context namespace with value null.
50
- * The context namespace tracks the XML serialization algorithm's current
51
- * default namespace. The context namespace is changed when either an Element
52
- * Node has a default namespace declaration, or the algorithm generates a
53
- * default namespace declaration for the Element Node to match its own
54
- * namespace. The algorithm assumes no namespace (null) to start.
55
- * 2. Let prefix map be a new namespace prefix map.
56
- * 3. Add the XML namespace with prefix value "xml" to prefix map.
57
- * 4. Let prefix index be a generated namespace prefix index with value 1.
58
- * The generated namespace prefix index is used to generate a new unique
59
- * prefix value when no suitable existing namespace prefix is available to
60
- * serialize a node's namespaceURI (or the namespaceURI of one of node's
61
- * attributes). See the generate a prefix algorithm.
62
- */
63
- var namespace = null;
64
- var prefixMap = new NamespacePrefixMap_1.NamespacePrefixMap();
65
- prefixMap.set("xml", infra_1.namespace.XML);
66
- var prefixIndex = { value: 1 };
67
- /**
68
- * 5. Return the result of running the XML serialization algorithm on node
69
- * passing the context namespace namespace, namespace prefix map prefix map,
70
- * generated namespace prefix index reference to prefix index, and the
71
- * flag require well-formed. If an exception occurs during the execution
72
- * of the algorithm, then catch that exception and throw an
73
- * "InvalidStateError" DOMException.
74
- */
75
- try {
76
- return this._serializeNodeNS(node, namespace, prefixMap, prefixIndex, requireWellFormed);
77
- }
78
- catch (_a) {
79
- throw new DOMException_1.InvalidStateError();
80
- }
81
- }
82
- else {
83
- try {
84
- return this._serializeNode(node, requireWellFormed);
85
- }
86
- catch (_b) {
87
- throw new DOMException_1.InvalidStateError();
88
- }
89
- }
90
- };
91
- /**
92
- * Produces an XML serialization of a node.
93
- *
94
- * @param node - node to serialize
95
- * @param namespace - context namespace
96
- * @param prefixMap - namespace prefix map
97
- * @param prefixIndex - generated namespace prefix index
98
- * @param requireWellFormed - whether to check conformance
99
- */
100
- XMLSerializerImpl.prototype._serializeNodeNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) {
101
- switch (node.nodeType) {
102
- case interfaces_1.NodeType.Element:
103
- return this._serializeElementNS(node, namespace, prefixMap, prefixIndex, requireWellFormed);
104
- case interfaces_1.NodeType.Document:
105
- return this._serializeDocumentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed);
106
- case interfaces_1.NodeType.Comment:
107
- return this._serializeComment(node, requireWellFormed);
108
- case interfaces_1.NodeType.Text:
109
- return this._serializeText(node, requireWellFormed);
110
- case interfaces_1.NodeType.DocumentFragment:
111
- return this._serializeDocumentFragmentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed);
112
- case interfaces_1.NodeType.DocumentType:
113
- return this._serializeDocumentType(node, requireWellFormed);
114
- case interfaces_1.NodeType.ProcessingInstruction:
115
- return this._serializeProcessingInstruction(node, requireWellFormed);
116
- case interfaces_1.NodeType.CData:
117
- return this._serializeCData(node, requireWellFormed);
118
- default:
119
- throw new Error("Unknown node type: " + node.nodeType);
120
- }
121
- };
122
- /**
123
- * Produces an XML serialization of a node.
124
- *
125
- * @param node - node to serialize
126
- * @param requireWellFormed - whether to check conformance
127
- */
128
- XMLSerializerImpl.prototype._serializeNode = function (node, requireWellFormed) {
129
- switch (node.nodeType) {
130
- case interfaces_1.NodeType.Element:
131
- return this._serializeElement(node, requireWellFormed);
132
- case interfaces_1.NodeType.Document:
133
- return this._serializeDocument(node, requireWellFormed);
134
- case interfaces_1.NodeType.Comment:
135
- return this._serializeComment(node, requireWellFormed);
136
- case interfaces_1.NodeType.Text:
137
- return this._serializeText(node, requireWellFormed);
138
- case interfaces_1.NodeType.DocumentFragment:
139
- return this._serializeDocumentFragment(node, requireWellFormed);
140
- case interfaces_1.NodeType.DocumentType:
141
- return this._serializeDocumentType(node, requireWellFormed);
142
- case interfaces_1.NodeType.ProcessingInstruction:
143
- return this._serializeProcessingInstruction(node, requireWellFormed);
144
- case interfaces_1.NodeType.CData:
145
- return this._serializeCData(node, requireWellFormed);
146
- default:
147
- throw new Error("Unknown node type: " + node.nodeType);
148
- }
149
- };
150
- /**
151
- * Produces an XML serialization of an element node.
152
- *
153
- * @param node - node to serialize
154
- * @param namespace - context namespace
155
- * @param prefixMap - namespace prefix map
156
- * @param prefixIndex - generated namespace prefix index
157
- * @param requireWellFormed - whether to check conformance
158
- */
159
- XMLSerializerImpl.prototype._serializeElementNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) {
160
- var e_1, _a;
161
- /**
162
- * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node
163
- *
164
- * 1. If the require well-formed flag is set (its value is true), and this
165
- * node's localName attribute contains the character ":" (U+003A COLON) or
166
- * does not match the XML Name production, then throw an exception; the
167
- * serialization of this node would not be a well-formed element.
168
- */
169
- if (requireWellFormed && (node.localName.indexOf(":") !== -1 ||
170
- !algorithm_1.xml_isName(node.localName))) {
171
- throw new Error("Node local name contains invalid characters (well-formed required).");
172
- }
173
- /**
174
- * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN).
175
- * 3. Let qualified name be an empty string.
176
- * 4. Let skip end tag be a boolean flag with value false.
177
- * 5. Let ignore namespace definition attribute be a boolean flag with value
178
- * false.
179
- * 6. Given prefix map, copy a namespace prefix map and let map be the
180
- * result.
181
- * 7. Let local prefixes map be an empty map. The map has unique Node prefix
182
- * strings as its keys, with corresponding namespaceURI Node values as the
183
- * map's key values (in this map, the null namespace is represented by the
184
- * empty string).
185
- *
186
- * _Note:_ This map is local to each element. It is used to ensure there
187
- * are no conflicting prefixes should a new namespace prefix attribute need
188
- * to be generated. It is also used to enable skipping of duplicate prefix
189
- * definitions when writing an element's attributes: the map allows the
190
- * algorithm to distinguish between a prefix in the namespace prefix map
191
- * that might be locally-defined (to the current Element) and one that is
192
- * not.
193
- * 8. Let local default namespace be the result of recording the namespace
194
- * information for node given map and local prefixes map.
195
- *
196
- * _Note:_ The above step will update map with any found namespace prefix
197
- * definitions, add the found prefix definitions to the local prefixes map
198
- * and return a local default namespace value defined by a default namespace
199
- * attribute if one exists. Otherwise it returns null.
200
- * 9. Let inherited ns be a copy of namespace.
201
- * 10. Let ns be the value of node's namespaceURI attribute.
202
- */
203
- var markup = "<";
204
- var qualifiedName = '';
205
- var skipEndTag = false;
206
- var ignoreNamespaceDefinitionAttribute = false;
207
- var map = prefixMap.copy();
208
- var localPrefixesMap = {};
209
- var localDefaultNamespace = this._recordNamespaceInformation(node, map, localPrefixesMap);
210
- var inheritedNS = namespace;
211
- var ns = node.namespaceURI;
212
- /** 11. If inherited ns is equal to ns, then: */
213
- if (inheritedNS === ns) {
214
- /**
215
- * 11.1. If local default namespace is not null, then set ignore
216
- * namespace definition attribute to true.
217
- */
218
- if (localDefaultNamespace !== null) {
219
- ignoreNamespaceDefinitionAttribute = true;
220
- }
221
- /**
222
- * 11.2. If ns is the XML namespace, then append to qualified name the
223
- * concatenation of the string "xml:" and the value of node's localName.
224
- * 11.3. Otherwise, append to qualified name the value of node's
225
- * localName. The node's prefix if it exists, is dropped.
226
- */
227
- if (ns === infra_1.namespace.XML) {
228
- qualifiedName = 'xml:' + node.localName;
229
- }
230
- else {
231
- qualifiedName = node.localName;
232
- }
233
- /** 11.4. Append the value of qualified name to markup. */
234
- markup += qualifiedName;
235
- }
236
- else {
237
- /**
238
- * 12. Otherwise, inherited ns is not equal to ns (the node's own
239
- * namespace is different from the context namespace of its parent).
240
- * Run these sub-steps:
241
- *
242
- * 12.1. Let prefix be the value of node's prefix attribute.
243
- * 12.2. Let candidate prefix be the result of retrieving a preferred
244
- * prefix string prefix from map given namespace ns. The above may return
245
- * null if no namespace key ns exists in map.
246
- */
247
- var prefix = node.prefix;
248
- /**
249
- * We don't need to run "retrieving a preferred prefix string" algorithm if
250
- * the element has no prefix and its namespace matches to the default
251
- * namespace.
252
- * See: https://github.com/web-platform-tests/wpt/pull/16703
253
- */
254
- var candidatePrefix = null;
255
- if (prefix !== null || ns !== localDefaultNamespace) {
256
- candidatePrefix = map.get(prefix, ns);
257
- }
258
- /**
259
- * 12.3. If the value of prefix matches "xmlns", then run the following
260
- * steps:
261
- */
262
- if (prefix === "xmlns") {
263
- /**
264
- * 12.3.1. If the require well-formed flag is set, then throw an error.
265
- * An Element with prefix "xmlns" will not legally round-trip in a
266
- * conforming XML parser.
267
- */
268
- if (requireWellFormed) {
269
- throw new Error("An element cannot have the 'xmlns' prefix (well-formed required).");
270
- }
271
- /**
272
- * 12.3.2. Let candidate prefix be the value of prefix.
273
- */
274
- candidatePrefix = prefix;
275
- }
276
- /**
277
- * 12.4.Found a suitable namespace prefix: if candidate prefix is not
278
- * null (a namespace prefix is defined which maps to ns), then:
279
- */
280
- if (candidatePrefix !== null) {
281
- /**
282
- * The following may serialize a different prefix than the Element's
283
- * existing prefix if it already had one. However, the retrieving a
284
- * preferred prefix string algorithm already tried to match the
285
- * existing prefix if possible.
286
- *
287
- * 12.4.1. Append to qualified name the concatenation of candidate
288
- * prefix, ":" (U+003A COLON), and node's localName. There exists on
289
- * this node or the node's ancestry a namespace prefix definition that
290
- * defines the node's namespace.
291
- * 12.4.2. If the local default namespace is not null (there exists a
292
- * locally-defined default namespace declaration attribute) and its
293
- * value is not the XML namespace, then let inherited ns get the value
294
- * of local default namespace unless the local default namespace is the
295
- * empty string in which case let it get null (the context namespace
296
- * is changed to the declared default, rather than this node's own
297
- * namespace).
298
- *
299
- * _Note:_ Any default namespace definitions or namespace prefixes that
300
- * define the XML namespace are omitted when serializing this node's
301
- * attributes.
302
- */
303
- qualifiedName = candidatePrefix + ':' + node.localName;
304
- if (localDefaultNamespace !== null && localDefaultNamespace !== infra_1.namespace.XML) {
305
- inheritedNS = localDefaultNamespace || null;
306
- }
307
- /**
308
- * 12.4.3. Append the value of qualified name to markup.
309
- */
310
- markup += qualifiedName;
311
- /** 12.5. Otherwise, if prefix is not null, then: */
312
- }
313
- else if (prefix !== null) {
314
- /**
315
- * _Note:_ By this step, there is no namespace or prefix mapping
316
- * declaration in this node (or any parent node visited by this
317
- * algorithm) that defines prefix otherwise the step labelled Found
318
- * a suitable namespace prefix would have been followed. The sub-steps
319
- * that follow will create a new namespace prefix declaration for prefix
320
- * and ensure that prefix does not conflict with an existing namespace
321
- * prefix declaration of the same localName in node's attribute list.
322
- *
323
- * 12.5.1. If the local prefixes map contains a key matching prefix,
324
- * then let prefix be the result of generating a prefix providing as
325
- * input map, ns, and prefix index.
326
- */
327
- if (prefix in localPrefixesMap) {
328
- prefix = this._generatePrefix(ns, map, prefixIndex);
329
- }
330
- /**
331
- * 12.5.2. Add prefix to map given namespace ns.
332
- * 12.5.3. Append to qualified name the concatenation of prefix, ":"
333
- * (U+003A COLON), and node's localName.
334
- * 12.5.4. Append the value of qualified name to markup.
335
- */
336
- map.set(prefix, ns);
337
- qualifiedName += prefix + ':' + node.localName;
338
- markup += qualifiedName;
339
- /**
340
- * 12.5.5. Append the following to markup, in the order listed:
341
- *
342
- * _Note:_ The following serializes a namespace prefix declaration for
343
- * prefix which was just added to the map.
344
- *
345
- * 12.5.5.1. " " (U+0020 SPACE);
346
- * 12.5.5.2. The string "xmlns:";
347
- * 12.5.5.3. The value of prefix;
348
- * 12.5.5.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
349
- * 12.5.5.5. The result of serializing an attribute value given ns and
350
- * the require well-formed flag as input;
351
- * 12.5.5.6. """ (U+0022 QUOTATION MARK).
352
- */
353
- markup += " xmlns:" + prefix + "=\"" +
354
- this._serializeAttributeValue(ns, requireWellFormed) + "\"";
355
- /**
356
- * 12.5.5.7. If local default namespace is not null (there exists a
357
- * locally-defined default namespace declaration attribute), then
358
- * let inherited ns get the value of local default namespace unless the
359
- * local default namespace is the empty string in which case let it get
360
- * null.
361
- */
362
- if (localDefaultNamespace !== null) {
363
- inheritedNS = localDefaultNamespace || null;
364
- }
365
- /**
366
- * 12.6. Otherwise, if local default namespace is null, or local
367
- * default namespace is not null and its value is not equal to ns, then:
368
- */
369
- }
370
- else if (localDefaultNamespace === null ||
371
- (localDefaultNamespace !== null && localDefaultNamespace !== ns)) {
372
- /**
373
- * _Note:_ At this point, the namespace for this node still needs to be
374
- * serialized, but there's no prefix (or candidate prefix) available; the
375
- * following uses the default namespace declaration to define the
376
- * namespace--optionally replacing an existing default declaration
377
- * if present.
378
- *
379
- * 12.6.1. Set the ignore namespace definition attribute flag to true.
380
- * 12.6.2. Append to qualified name the value of node's localName.
381
- * 12.6.3. Let the value of inherited ns be ns.
382
- *
383
- * _Note:_ The new default namespace will be used in the serialization
384
- * to define this node's namespace and act as the context namespace for
385
- * its children.
386
- */
387
- ignoreNamespaceDefinitionAttribute = true;
388
- qualifiedName += node.localName;
389
- inheritedNS = ns;
390
- /**
391
- * 12.6.4. Append the value of qualified name to markup.
392
- */
393
- markup += qualifiedName;
394
- /**
395
- * 12.6.5. Append the following to markup, in the order listed:
396
- *
397
- * _Note:_ The following serializes the new (or replacement) default
398
- * namespace definition.
399
- *
400
- * 12.6.5.1. " " (U+0020 SPACE);
401
- * 12.6.5.2. The string "xmlns";
402
- * 12.6.5.3. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
403
- * 12.6.5.4. The result of serializing an attribute value given ns
404
- * and the require well-formed flag as input;
405
- * 12.6.5.5. """ (U+0022 QUOTATION MARK).
406
- */
407
- markup += " xmlns" + "=\"" +
408
- this._serializeAttributeValue(ns, requireWellFormed) + "\"";
409
- /**
410
- * 12.7. Otherwise, the node has a local default namespace that matches
411
- * ns. Append to qualified name the value of node's localName, let the
412
- * value of inherited ns be ns, and append the value of qualified name
413
- * to markup.
414
- */
415
- }
416
- else {
417
- qualifiedName += node.localName;
418
- inheritedNS = ns;
419
- markup += qualifiedName;
420
- }
421
- }
422
- /**
423
- * 13. Append to markup the result of the XML serialization of node's
424
- * attributes given map, prefix index, local prefixes map, ignore namespace
425
- * definition attribute flag, and require well-formed flag.
426
- */
427
- markup += this._serializeAttributesNS(node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed);
428
- /**
429
- * 14. If ns is the HTML namespace, and the node's list of children is
430
- * empty, and the node's localName matches any one of the following void
431
- * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed",
432
- * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta",
433
- * "param", "source", "track", "wbr"; then append the following to markup,
434
- * in the order listed:
435
- * 14.1. " " (U+0020 SPACE);
436
- * 14.2. "/" (U+002F SOLIDUS).
437
- * and set the skip end tag flag to true.
438
- * 15. If ns is not the HTML namespace, and the node's list of children is
439
- * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end
440
- * tag flag to true.
441
- * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup.
442
- */
443
- var isHTML = (ns === infra_1.namespace.HTML);
444
- if (isHTML && node.childNodes.length === 0 &&
445
- XMLSerializerImpl._VoidElementNames.has(node.localName)) {
446
- markup += " /";
447
- skipEndTag = true;
448
- }
449
- else if (!isHTML && node.childNodes.length === 0) {
450
- markup += "/";
451
- skipEndTag = true;
452
- }
453
- markup += ">";
454
- /**
455
- * 17. If the value of skip end tag is true, then return the value of markup
456
- * and skip the remaining steps. The node is a leaf-node.
457
- */
458
- if (skipEndTag)
459
- return markup;
460
- /**
461
- * 18. If ns is the HTML namespace, and the node's localName matches the
462
- * string "template", then this is a template element. Append to markup the
463
- * result of XML serializing a DocumentFragment node given the template
464
- * element's template contents (a DocumentFragment), providing inherited
465
- * ns, map, prefix index, and the require well-formed flag.
466
- *
467
- * _Note:_ This allows template content to round-trip, given the rules for
468
- * parsing XHTML documents.
469
- *
470
- * 19. Otherwise, append to markup the result of running the XML
471
- * serialization algorithm on each of node's children, in tree order,
472
- * providing inherited ns, map, prefix index, and the require well-formed
473
- * flag.
474
- */
475
- if (isHTML && node.localName === "template") {
476
- // TODO: serialize template contents
477
- }
478
- else {
479
- try {
480
- for (var _b = __values(node._children || node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
481
- var childNode = _c.value;
482
- markup += this._serializeNodeNS(childNode, inheritedNS, map, prefixIndex, requireWellFormed);
483
- }
484
- }
485
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
486
- finally {
487
- try {
488
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
489
- }
490
- finally { if (e_1) throw e_1.error; }
491
- }
492
- }
493
- /**
494
- * 20. Append the following to markup, in the order listed:
495
- * 20.1. "</" (U+003C LESS-THAN SIGN, U+002F SOLIDUS);
496
- * 20.2. The value of qualified name;
497
- * 20.3. ">" (U+003E GREATER-THAN SIGN).
498
- */
499
- markup += "</" + qualifiedName + ">";
500
- /**
501
- * 21. Return the value of markup.
502
- */
503
- return markup;
504
- };
505
- /**
506
- * Produces an XML serialization of a document node.
507
- *
508
- * @param node - node to serialize
509
- * @param namespace - context namespace
510
- * @param prefixMap - namespace prefix map
511
- * @param prefixIndex - generated namespace prefix index
512
- * @param requireWellFormed - whether to check conformance
513
- */
514
- XMLSerializerImpl.prototype._serializeDocumentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) {
515
- var e_2, _a;
516
- /**
517
- * If the require well-formed flag is set (its value is true), and this node
518
- * has no documentElement (the documentElement attribute's value is null),
519
- * then throw an exception; the serialization of this node would not be a
520
- * well-formed document.
521
- */
522
- if (requireWellFormed && node.documentElement === null) {
523
- throw new Error("Missing document element (well-formed required).");
524
- }
525
- /**
526
- * Otherwise, run the following steps:
527
- * 1. Let serialized document be an empty string.
528
- * 2. For each child child of node, in tree order, run the XML
529
- * serialization algorithm on the child passing along the provided
530
- * arguments, and append the result to serialized document.
531
- *
532
- * _Note:_ This will serialize any number of ProcessingInstruction and
533
- * Comment nodes both before and after the Document's documentElement node,
534
- * including at most one DocumentType node. (Text nodes are not allowed as
535
- * children of the Document.)
536
- *
537
- * 3. Return the value of serialized document.
538
- */
539
- var serializedDocument = "";
540
- try {
541
- for (var _b = __values(node._children || node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
542
- var childNode = _c.value;
543
- serializedDocument += this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed);
544
- }
545
- }
546
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
547
- finally {
548
- try {
549
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
550
- }
551
- finally { if (e_2) throw e_2.error; }
552
- }
553
- return serializedDocument;
554
- };
555
- /**
556
- * Produces an XML serialization of a comment node.
557
- *
558
- * @param node - node to serialize
559
- * @param requireWellFormed - whether to check conformance
560
- */
561
- XMLSerializerImpl.prototype._serializeComment = function (node, requireWellFormed) {
562
- /**
563
- * If the require well-formed flag is set (its value is true), and node's
564
- * data contains characters that are not matched by the XML Char production
565
- * or contains "--" (two adjacent U+002D HYPHEN-MINUS characters) or that
566
- * ends with a "-" (U+002D HYPHEN-MINUS) character, then throw an exception;
567
- * the serialization of this node's data would not be well-formed.
568
- */
569
- if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) ||
570
- node.data.indexOf("--") !== -1 || node.data.endsWith("-"))) {
571
- throw new Error("Comment data contains invalid characters (well-formed required).");
572
- }
573
- /**
574
- * Otherwise, return the concatenation of "<!--", node's data, and "-->".
575
- */
576
- return "<!--" + node.data + "-->";
577
- };
578
- /**
579
- * Produces an XML serialization of a text node.
580
- *
581
- * @param node - node to serialize
582
- * @param requireWellFormed - whether to check conformance
583
- * @param level - current depth of the XML tree
584
- */
585
- XMLSerializerImpl.prototype._serializeText = function (node, requireWellFormed) {
586
- /**
587
- * 1. If the require well-formed flag is set (its value is true), and
588
- * node's data contains characters that are not matched by the XML Char
589
- * production, then throw an exception; the serialization of this node's
590
- * data would not be well-formed.
591
- */
592
- if (requireWellFormed && !algorithm_1.xml_isLegalChar(node.data)) {
593
- throw new Error("Text data contains invalid characters (well-formed required).");
594
- }
595
- /**
596
- * 2. Let markup be the value of node's data.
597
- * 3. Replace any occurrences of "&" in markup by "&amp;".
598
- * 4. Replace any occurrences of "<" in markup by "&lt;".
599
- * 5. Replace any occurrences of ">" in markup by "&gt;".
600
- * 6. Return the value of markup.
601
- */
602
- var result = "";
603
- for (var i = 0; i < node.data.length; i++) {
604
- var c = node.data[i];
605
- if (c === "&")
606
- result += "&amp;";
607
- else if (c === "<")
608
- result += "&lt;";
609
- else if (c === ">")
610
- result += "&gt;";
611
- else
612
- result += c;
613
- }
614
- return result;
615
- };
616
- /**
617
- * Produces an XML serialization of a document fragment node.
618
- *
619
- * @param node - node to serialize
620
- * @param namespace - context namespace
621
- * @param prefixMap - namespace prefix map
622
- * @param prefixIndex - generated namespace prefix index
623
- * @param requireWellFormed - whether to check conformance
624
- */
625
- XMLSerializerImpl.prototype._serializeDocumentFragmentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) {
626
- var e_3, _a;
627
- /**
628
- * 1. Let markup the empty string.
629
- * 2. For each child child of node, in tree order, run the XML serialization
630
- * algorithm on the child given namespace, prefix map, a reference to prefix
631
- * index, and flag require well-formed. Concatenate the result to markup.
632
- * 3. Return the value of markup.
633
- */
634
- var markup = "";
635
- try {
636
- for (var _b = __values(node._children || node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
637
- var childNode = _c.value;
638
- markup += this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed);
639
- }
640
- }
641
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
642
- finally {
643
- try {
644
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
645
- }
646
- finally { if (e_3) throw e_3.error; }
647
- }
648
- return markup;
649
- };
650
- /**
651
- * Produces an XML serialization of a document type node.
652
- *
653
- * @param node - node to serialize
654
- * @param requireWellFormed - whether to check conformance
655
- */
656
- XMLSerializerImpl.prototype._serializeDocumentType = function (node, requireWellFormed) {
657
- /**
658
- * 1. If the require well-formed flag is true and the node's publicId
659
- * attribute contains characters that are not matched by the XML PubidChar
660
- * production, then throw an exception; the serialization of this node
661
- * would not be a well-formed document type declaration.
662
- */
663
- if (requireWellFormed && !algorithm_1.xml_isPubidChar(node.publicId)) {
664
- throw new Error("DocType public identifier does not match PubidChar construct (well-formed required).");
665
- }
666
- /**
667
- * 2. If the require well-formed flag is true and the node's systemId
668
- * attribute contains characters that are not matched by the XML Char
669
- * production or that contains both a """ (U+0022 QUOTATION MARK) and a
670
- * "'" (U+0027 APOSTROPHE), then throw an exception; the serialization
671
- * of this node would not be a well-formed document type declaration.
672
- */
673
- if (requireWellFormed &&
674
- (!algorithm_1.xml_isLegalChar(node.systemId) ||
675
- (node.systemId.indexOf('"') !== -1 && node.systemId.indexOf("'") !== -1))) {
676
- throw new Error("DocType system identifier contains invalid characters (well-formed required).");
677
- }
678
- /**
679
- * 3. Let markup be an empty string.
680
- * 4. Append the string "<!DOCTYPE" to markup.
681
- * 5. Append " " (U+0020 SPACE) to markup.
682
- * 6. Append the value of the node's name attribute to markup. For a node
683
- * belonging to an HTML document, the value will be all lowercase.
684
- * 7. If the node's publicId is not the empty string then append the
685
- * following, in the order listed, to markup:
686
- * 7.1. " " (U+0020 SPACE);
687
- * 7.2. The string "PUBLIC";
688
- * 7.3. " " (U+0020 SPACE);
689
- * 7.4. """ (U+0022 QUOTATION MARK);
690
- * 7.5. The value of the node's publicId attribute;
691
- * 7.6. """ (U+0022 QUOTATION MARK).
692
- * 8. If the node's systemId is not the empty string and the node's publicId
693
- * is set to the empty string, then append the following, in the order
694
- * listed, to markup:
695
- * 8.1. " " (U+0020 SPACE);
696
- * 8.2. The string "SYSTEM".
697
- * 9. If the node's systemId is not the empty string then append the
698
- * following, in the order listed, to markup:
699
- * 9.2. " " (U+0020 SPACE);
700
- * 9.3. """ (U+0022 QUOTATION MARK);
701
- * 9.3. The value of the node's systemId attribute;
702
- * 9.4. """ (U+0022 QUOTATION MARK).
703
- * 10. Append ">" (U+003E GREATER-THAN SIGN) to markup.
704
- * 11. Return the value of markup.
705
- */
706
- return node.publicId && node.systemId ?
707
- "<!DOCTYPE " + node.name + " PUBLIC \"" + node.publicId + "\" \"" + node.systemId + "\">"
708
- : node.publicId ?
709
- "<!DOCTYPE " + node.name + " PUBLIC \"" + node.publicId + "\">"
710
- : node.systemId ?
711
- "<!DOCTYPE " + node.name + " SYSTEM \"" + node.systemId + "\">"
712
- :
713
- "<!DOCTYPE " + node.name + ">";
714
- };
715
- /**
716
- * Produces an XML serialization of a processing instruction node.
717
- *
718
- * @param node - node to serialize
719
- * @param requireWellFormed - whether to check conformance
720
- */
721
- XMLSerializerImpl.prototype._serializeProcessingInstruction = function (node, requireWellFormed) {
722
- /**
723
- * 1. If the require well-formed flag is set (its value is true), and node's
724
- * target contains a ":" (U+003A COLON) character or is an ASCII
725
- * case-insensitive match for the string "xml", then throw an exception;
726
- * the serialization of this node's target would not be well-formed.
727
- */
728
- if (requireWellFormed && (node.target.indexOf(":") !== -1 || (/^xml$/i).test(node.target))) {
729
- throw new Error("Processing instruction target contains invalid characters (well-formed required).");
730
- }
731
- /**
732
- * 2. If the require well-formed flag is set (its value is true), and node's
733
- * data contains characters that are not matched by the XML Char production
734
- * or contains the string "?>" (U+003F QUESTION MARK,
735
- * U+003E GREATER-THAN SIGN), then throw an exception; the serialization of
736
- * this node's data would not be well-formed.
737
- */
738
- if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) ||
739
- node.data.indexOf("?>") !== -1)) {
740
- throw new Error("Processing instruction data contains invalid characters (well-formed required).");
741
- }
742
- /**
743
- * 3. Let markup be the concatenation of the following, in the order listed:
744
- * 3.1. "<?" (U+003C LESS-THAN SIGN, U+003F QUESTION MARK);
745
- * 3.2. The value of node's target;
746
- * 3.3. " " (U+0020 SPACE);
747
- * 3.4. The value of node's data;
748
- * 3.5. "?>" (U+003F QUESTION MARK, U+003E GREATER-THAN SIGN).
749
- * 4. Return the value of markup.
750
- */
751
- return "<?" + (node.data === "" ? node.target : node.target + " " + node.data) + "?>";
752
- };
753
- /**
754
- * Produces an XML serialization of a CDATA node.
755
- *
756
- * @param node - node to serialize
757
- * @param requireWellFormed - whether to check conformance
758
- */
759
- XMLSerializerImpl.prototype._serializeCData = function (node, requireWellFormed) {
760
- if (requireWellFormed && (node.data.indexOf("]]>") !== -1)) {
761
- throw new Error("CDATA contains invalid characters (well-formed required).");
762
- }
763
- return "<![CDATA[" + node.data + "]]>";
764
- };
765
- /**
766
- * Produces an XML serialization of the attributes of an element node.
767
- *
768
- * @param node - node to serialize
769
- * @param map - namespace prefix map
770
- * @param prefixIndex - generated namespace prefix index
771
- * @param localPrefixesMap - local prefixes map
772
- * @param ignoreNamespaceDefinitionAttribute - whether to ignore namespace
773
- * attributes
774
- * @param requireWellFormed - whether to check conformance
775
- */
776
- XMLSerializerImpl.prototype._serializeAttributesNS = function (node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed) {
777
- var e_4, _a;
778
- /**
779
- * 1. Let result be the empty string.
780
- * 2. Let localname set be a new empty namespace localname set. This
781
- * localname set will contain tuples of unique attribute namespaceURI and
782
- * localName pairs, and is populated as each attr is processed. This set is
783
- * used to [optionally] enforce the well-formed constraint that an element
784
- * cannot have two attributes with the same namespaceURI and localName.
785
- * This can occur when two otherwise identical attributes on the same
786
- * element differ only by their prefix values.
787
- */
788
- var result = "";
789
- var localNameSet = requireWellFormed ? new LocalNameSet_1.LocalNameSet() : undefined;
790
- try {
791
- /**
792
- * 3. Loop: For each attribute attr in element's attributes, in the order
793
- * they are specified in the element's attribute list:
794
- */
795
- for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
796
- var attr = _c.value;
797
- // Optimize common case
798
- if (!ignoreNamespaceDefinitionAttribute && !requireWellFormed && attr.namespaceURI === null) {
799
- result += " " + attr.localName + "=\"" +
800
- this._serializeAttributeValue(attr.value, requireWellFormed) + "\"";
801
- continue;
802
- }
803
- /**
804
- * 3.1. If the require well-formed flag is set (its value is true), and the
805
- * localname set contains a tuple whose values match those of a new tuple
806
- * consisting of attr's namespaceURI attribute and localName attribute,
807
- * then throw an exception; the serialization of this attr would fail to
808
- * produce a well-formed element serialization.
809
- */
810
- if (requireWellFormed && localNameSet && localNameSet.has(attr.namespaceURI, attr.localName)) {
811
- throw new Error("Element contains duplicate attributes (well-formed required).");
812
- }
813
- /**
814
- * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and
815
- * localName attribute, and add it to the localname set.
816
- * 3.3. Let attribute namespace be the value of attr's namespaceURI value.
817
- * 3.4. Let candidate prefix be null.
818
- */
819
- if (requireWellFormed && localNameSet)
820
- localNameSet.set(attr.namespaceURI, attr.localName);
821
- var attributeNamespace = attr.namespaceURI;
822
- var candidatePrefix = null;
823
- /** 3.5. If attribute namespace is not null, then run these sub-steps: */
824
- if (attributeNamespace !== null) {
825
- /**
826
- * 3.5.1. Let candidate prefix be the result of retrieving a preferred
827
- * prefix string from map given namespace attribute namespace with
828
- * preferred prefix being attr's prefix value.
829
- */
830
- candidatePrefix = map.get(attr.prefix, attributeNamespace);
831
- /**
832
- * 3.5.2. If the value of attribute namespace is the XMLNS namespace,
833
- * then run these steps:
834
- */
835
- if (attributeNamespace === infra_1.namespace.XMLNS) {
836
- /**
837
- * 3.5.2.1. If any of the following are true, then stop running these
838
- * steps and goto Loop to visit the next attribute:
839
- * - the attr's value is the XML namespace;
840
- * _Note:_ The XML namespace cannot be redeclared and survive
841
- * round-tripping (unless it defines the prefix "xml"). To avoid this
842
- * problem, this algorithm always prefixes elements in the XML
843
- * namespace with "xml" and drops any related definitions as seen
844
- * in the above condition.
845
- * - the attr's prefix is null and the ignore namespace definition
846
- * attribute flag is true (the Element's default namespace attribute
847
- * should be skipped);
848
- * - the attr's prefix is not null and either
849
- * * the attr's localName is not a key contained in the local
850
- * prefixes map, or
851
- * * the attr's localName is present in the local prefixes map but
852
- * the value of the key does not match attr's value
853
- * and furthermore that the attr's localName (as the prefix to find)
854
- * is found in the namespace prefix map given the namespace consisting
855
- * of the attr's value (the current namespace prefix definition was
856
- * exactly defined previously--on an ancestor element not the current
857
- * element whose attributes are being processed).
858
- */
859
- if (attr.value === infra_1.namespace.XML ||
860
- (attr.prefix === null && ignoreNamespaceDefinitionAttribute) ||
861
- (attr.prefix !== null && (!(attr.localName in localPrefixesMap) ||
862
- localPrefixesMap[attr.localName] !== attr.value) &&
863
- map.has(attr.localName, attr.value)))
864
- continue;
865
- /**
866
- * 3.5.2.2. If the require well-formed flag is set (its value is true),
867
- * and the value of attr's value attribute matches the XMLNS
868
- * namespace, then throw an exception; the serialization of this
869
- * attribute would produce invalid XML because the XMLNS namespace
870
- * is reserved and cannot be applied as an element's namespace via
871
- * XML parsing.
872
- *
873
- * _Note:_ DOM APIs do allow creation of elements in the XMLNS
874
- * namespace but with strict qualifications.
875
- */
876
- if (requireWellFormed && attr.value === infra_1.namespace.XMLNS) {
877
- throw new Error("XMLNS namespace is reserved (well-formed required).");
878
- }
879
- /**
880
- * 3.5.2.3. If the require well-formed flag is set (its value is true),
881
- * and the value of attr's value attribute is the empty string, then
882
- * throw an exception; namespace prefix declarations cannot be used
883
- * to undeclare a namespace (use a default namespace declaration
884
- * instead).
885
- */
886
- if (requireWellFormed && attr.value === '') {
887
- throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).");
888
- }
889
- /**
890
- * 3.5.2.4. the attr's prefix matches the string "xmlns", then let
891
- * candidate prefix be the string "xmlns".
892
- */
893
- if (attr.prefix === 'xmlns')
894
- candidatePrefix = 'xmlns';
895
- /**
896
- * 3.5.3. Otherwise, the attribute namespace is not the XMLNS namespace.
897
- * Run these steps:
898
- *
899
- * _Note:_ The (candidatePrefix === null) check is not in the spec.
900
- * We deviate from the spec here. Otherwise a prefix is generated for
901
- * all attributes with namespaces.
902
- */
903
- }
904
- else if (candidatePrefix === null) {
905
- if (attr.prefix !== null &&
906
- (!map.hasPrefix(attr.prefix) ||
907
- map.has(attr.prefix, attributeNamespace))) {
908
- /**
909
- * Check if we can use the attribute's own prefix.
910
- * We deviate from the spec here.
911
- * TODO: This is not an efficient way of searching for prefixes.
912
- * Follow developments to the spec.
913
- */
914
- candidatePrefix = attr.prefix;
915
- }
916
- else {
917
- /**
918
- * 3.5.3.1. Let candidate prefix be the result of generating a prefix
919
- * providing map, attribute namespace, and prefix index as input.
920
- */
921
- candidatePrefix = this._generatePrefix(attributeNamespace, map, prefixIndex);
922
- }
923
- /**
924
- * 3.5.3.2. Append the following to result, in the order listed:
925
- * 3.5.3.2.1. " " (U+0020 SPACE);
926
- * 3.5.3.2.2. The string "xmlns:";
927
- * 3.5.3.2.3. The value of candidate prefix;
928
- * 3.5.3.2.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
929
- * 3.5.3.2.5. The result of serializing an attribute value given
930
- * attribute namespace and the require well-formed flag as input;
931
- * 3.5.3.2.6. """ (U+0022 QUOTATION MARK).
932
- */
933
- result += " xmlns:" + candidatePrefix + "=\"" +
934
- this._serializeAttributeValue(attributeNamespace, requireWellFormed) + "\"";
935
- }
936
- }
937
- /**
938
- * 3.6. Append a " " (U+0020 SPACE) to result.
939
- * 3.7. If candidate prefix is not null, then append to result the
940
- * concatenation of candidate prefix with ":" (U+003A COLON).
941
- */
942
- result += " ";
943
- if (candidatePrefix !== null) {
944
- result += candidatePrefix + ':';
945
- }
946
- /**
947
- * 3.8. If the require well-formed flag is set (its value is true), and
948
- * this attr's localName attribute contains the character
949
- * ":" (U+003A COLON) or does not match the XML Name production or
950
- * equals "xmlns" and attribute namespace is null, then throw an
951
- * exception; the serialization of this attr would not be a
952
- * well-formed attribute.
953
- */
954
- if (requireWellFormed && (attr.localName.indexOf(":") !== -1 ||
955
- !algorithm_1.xml_isName(attr.localName) ||
956
- (attr.localName === "xmlns" && attributeNamespace === null))) {
957
- throw new Error("Attribute local name contains invalid characters (well-formed required).");
958
- }
959
- /**
960
- * 3.9. Append the following strings to result, in the order listed:
961
- * 3.9.1. The value of attr's localName;
962
- * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
963
- * 3.9.3. The result of serializing an attribute value given attr's value
964
- * attribute and the require well-formed flag as input;
965
- * 3.9.4. """ (U+0022 QUOTATION MARK).
966
- */
967
- result += attr.localName + "=\"" +
968
- this._serializeAttributeValue(attr.value, requireWellFormed) + "\"";
969
- }
970
- }
971
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
972
- finally {
973
- try {
974
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
975
- }
976
- finally { if (e_4) throw e_4.error; }
977
- }
978
- /**
979
- * 4. Return the value of result.
980
- */
981
- return result;
982
- };
983
- /**
984
- * Records namespace information for the given element and returns the
985
- * default namespace attribute value.
986
- *
987
- * @param node - element node to process
988
- * @param map - namespace prefix map
989
- * @param localPrefixesMap - local prefixes map
990
- */
991
- XMLSerializerImpl.prototype._recordNamespaceInformation = function (node, map, localPrefixesMap) {
992
- var e_5, _a;
993
- /**
994
- * 1. Let default namespace attr value be null.
995
- */
996
- var defaultNamespaceAttrValue = null;
997
- try {
998
- /**
999
- * 2. Main: For each attribute attr in element's attributes, in the order
1000
- * they are specified in the element's attribute list:
1001
- */
1002
- for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
1003
- var attr = _c.value;
1004
- /**
1005
- * _Note:_ The following conditional steps find namespace prefixes. Only
1006
- * attributes in the XMLNS namespace are considered (e.g., attributes made
1007
- * to look like namespace declarations via
1008
- * setAttribute("xmlns:pretend-prefix", "pretend-namespace") are not
1009
- * included).
1010
- */
1011
- /** 2.1. Let attribute namespace be the value of attr's namespaceURI value. */
1012
- var attributeNamespace = attr.namespaceURI;
1013
- /** 2.2. Let attribute prefix be the value of attr's prefix. */
1014
- var attributePrefix = attr.prefix;
1015
- /** 2.3. If the attribute namespace is the XMLNS namespace, then: */
1016
- if (attributeNamespace === infra_1.namespace.XMLNS) {
1017
- /**
1018
- * 2.3.1. If attribute prefix is null, then attr is a default namespace
1019
- * declaration. Set the default namespace attr value to attr's value and
1020
- * stop running these steps, returning to Main to visit the next
1021
- * attribute.
1022
- */
1023
- if (attributePrefix === null) {
1024
- defaultNamespaceAttrValue = attr.value;
1025
- continue;
1026
- /**
1027
- * 2.3.2. Otherwise, the attribute prefix is not null and attr is a
1028
- * namespace prefix definition. Run the following steps:
1029
- */
1030
- }
1031
- else {
1032
- /** 2.3.2.1. Let prefix definition be the value of attr's localName. */
1033
- var prefixDefinition = attr.localName;
1034
- /** 2.3.2.2. Let namespace definition be the value of attr's value. */
1035
- var namespaceDefinition = attr.value;
1036
- /**
1037
- * 2.3.2.3. If namespace definition is the XML namespace, then stop
1038
- * running these steps, and return to Main to visit the next
1039
- * attribute.
1040
- *
1041
- * _Note:_ XML namespace definitions in prefixes are completely
1042
- * ignored (in order to avoid unnecessary work when there might be
1043
- * prefix conflicts). XML namespaced elements are always handled
1044
- * uniformly by prefixing (and overriding if necessary) the element's
1045
- * localname with the reserved "xml" prefix.
1046
- */
1047
- if (namespaceDefinition === infra_1.namespace.XML) {
1048
- continue;
1049
- }
1050
- /**
1051
- * 2.3.2.4. If namespace definition is the empty string (the
1052
- * declarative form of having no namespace), then let namespace
1053
- * definition be null instead.
1054
- */
1055
- if (namespaceDefinition === '') {
1056
- namespaceDefinition = null;
1057
- }
1058
- /**
1059
- * 2.3.2.5. If prefix definition is found in map given the namespace
1060
- * namespace definition, then stop running these steps, and return to
1061
- * Main to visit the next attribute.
1062
- *
1063
- * _Note:_ This step avoids adding duplicate prefix definitions for
1064
- * the same namespace in the map. This has the side-effect of avoiding
1065
- * later serialization of duplicate namespace prefix declarations in
1066
- * any descendant nodes.
1067
- */
1068
- if (map.has(prefixDefinition, namespaceDefinition)) {
1069
- continue;
1070
- }
1071
- /**
1072
- * 2.3.2.6. Add the prefix prefix definition to map given namespace
1073
- * namespace definition.
1074
- */
1075
- map.set(prefixDefinition, namespaceDefinition);
1076
- /**
1077
- * 2.3.2.7. Add the value of prefix definition as a new key to the
1078
- * local prefixes map, with the namespace definition as the key's
1079
- * value replacing the value of null with the empty string if
1080
- * applicable.
1081
- */
1082
- localPrefixesMap[prefixDefinition] = namespaceDefinition || '';
1083
- }
1084
- }
1085
- }
1086
- }
1087
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
1088
- finally {
1089
- try {
1090
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1091
- }
1092
- finally { if (e_5) throw e_5.error; }
1093
- }
1094
- /**
1095
- * 3. Return the value of default namespace attr value.
1096
- *
1097
- * _Note:_ The empty string is a legitimate return value and is not
1098
- * converted to null.
1099
- */
1100
- return defaultNamespaceAttrValue;
1101
- };
1102
- /**
1103
- * Generates a new prefix for the given namespace.
1104
- *
1105
- * @param newNamespace - a namespace to generate prefix for
1106
- * @param prefixMap - namespace prefix map
1107
- * @param prefixIndex - generated namespace prefix index
1108
- */
1109
- XMLSerializerImpl.prototype._generatePrefix = function (newNamespace, prefixMap, prefixIndex) {
1110
- /**
1111
- * 1. Let generated prefix be the concatenation of the string "ns" and the
1112
- * current numerical value of prefix index.
1113
- * 2. Let the value of prefix index be incremented by one.
1114
- * 3. Add to map the generated prefix given the new namespace namespace.
1115
- * 4. Return the value of generated prefix.
1116
- */
1117
- var generatedPrefix = "ns" + prefixIndex.value;
1118
- prefixIndex.value++;
1119
- prefixMap.set(generatedPrefix, newNamespace);
1120
- return generatedPrefix;
1121
- };
1122
- /**
1123
- * Produces an XML serialization of an attribute value.
1124
- *
1125
- * @param value - attribute value
1126
- * @param requireWellFormed - whether to check conformance
1127
- */
1128
- XMLSerializerImpl.prototype._serializeAttributeValue = function (value, requireWellFormed) {
1129
- /**
1130
- * From: https://w3c.github.io/DOM-Parsing/#dfn-serializing-an-attribute-value
1131
- *
1132
- * 1. If the require well-formed flag is set (its value is true), and
1133
- * attribute value contains characters that are not matched by the XML Char
1134
- * production, then throw an exception; the serialization of this attribute
1135
- * value would fail to produce a well-formed element serialization.
1136
- */
1137
- if (requireWellFormed && value !== null && !algorithm_1.xml_isLegalChar(value)) {
1138
- throw new Error("Invalid characters in attribute value.");
1139
- }
1140
- /**
1141
- * 2. If attribute value is null, then return the empty string.
1142
- */
1143
- if (value === null)
1144
- return "";
1145
- /**
1146
- * 3. Otherwise, attribute value is a string. Return the value of attribute
1147
- * value, first replacing any occurrences of the following:
1148
- * - "&" with "&amp;"
1149
- * - """ with "&quot;"
1150
- * - "<" with "&lt;"
1151
- * - ">" with "&gt;"
1152
- * NOTE
1153
- * This matches behavior present in browsers, and goes above and beyond the
1154
- * grammar requirement in the XML specification's AttValue production by
1155
- * also replacing ">" characters.
1156
- */
1157
- var result = "";
1158
- for (var i = 0; i < value.length; i++) {
1159
- var c = value[i];
1160
- if (c === "\"")
1161
- result += "&quot;";
1162
- else if (c === "&")
1163
- result += "&amp;";
1164
- else if (c === "<")
1165
- result += "&lt;";
1166
- else if (c === ">")
1167
- result += "&gt;";
1168
- else
1169
- result += c;
1170
- }
1171
- return result;
1172
- };
1173
- /**
1174
- * Produces an XML serialization of an element node.
1175
- *
1176
- * @param node - node to serialize
1177
- * @param requireWellFormed - whether to check conformance
1178
- */
1179
- XMLSerializerImpl.prototype._serializeElement = function (node, requireWellFormed) {
1180
- var e_6, _a;
1181
- /**
1182
- * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node
1183
- *
1184
- * 1. If the require well-formed flag is set (its value is true), and this
1185
- * node's localName attribute contains the character ":" (U+003A COLON) or
1186
- * does not match the XML Name production, then throw an exception; the
1187
- * serialization of this node would not be a well-formed element.
1188
- */
1189
- if (requireWellFormed && (node.localName.indexOf(":") !== -1 ||
1190
- !algorithm_1.xml_isName(node.localName))) {
1191
- throw new Error("Node local name contains invalid characters (well-formed required).");
1192
- }
1193
- /**
1194
- * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN).
1195
- * 3. Let qualified name be an empty string.
1196
- * 4. Let skip end tag be a boolean flag with value false.
1197
- * 5. Let ignore namespace definition attribute be a boolean flag with value
1198
- * false.
1199
- * 6. Given prefix map, copy a namespace prefix map and let map be the
1200
- * result.
1201
- * 7. Let local prefixes map be an empty map. The map has unique Node prefix
1202
- * strings as its keys, with corresponding namespaceURI Node values as the
1203
- * map's key values (in this map, the null namespace is represented by the
1204
- * empty string).
1205
- *
1206
- * _Note:_ This map is local to each element. It is used to ensure there
1207
- * are no conflicting prefixes should a new namespace prefix attribute need
1208
- * to be generated. It is also used to enable skipping of duplicate prefix
1209
- * definitions when writing an element's attributes: the map allows the
1210
- * algorithm to distinguish between a prefix in the namespace prefix map
1211
- * that might be locally-defined (to the current Element) and one that is
1212
- * not.
1213
- * 8. Let local default namespace be the result of recording the namespace
1214
- * information for node given map and local prefixes map.
1215
- *
1216
- * _Note:_ The above step will update map with any found namespace prefix
1217
- * definitions, add the found prefix definitions to the local prefixes map
1218
- * and return a local default namespace value defined by a default namespace
1219
- * attribute if one exists. Otherwise it returns null.
1220
- * 9. Let inherited ns be a copy of namespace.
1221
- * 10. Let ns be the value of node's namespaceURI attribute.
1222
- */
1223
- var skipEndTag = false;
1224
- /** 11. If inherited ns is equal to ns, then: */
1225
- /**
1226
- * 11.1. If local default namespace is not null, then set ignore
1227
- * namespace definition attribute to true.
1228
- * 11.2. If ns is the XML namespace, then append to qualified name the
1229
- * concatenation of the string "xml:" and the value of node's localName.
1230
- * 11.3. Otherwise, append to qualified name the value of node's
1231
- * localName. The node's prefix if it exists, is dropped.
1232
- */
1233
- var qualifiedName = node.localName;
1234
- /** 11.4. Append the value of qualified name to markup. */
1235
- var markup = "<" + qualifiedName;
1236
- /**
1237
- * 13. Append to markup the result of the XML serialization of node's
1238
- * attributes given map, prefix index, local prefixes map, ignore namespace
1239
- * definition attribute flag, and require well-formed flag.
1240
- */
1241
- markup += this._serializeAttributes(node, requireWellFormed);
1242
- /**
1243
- * 14. If ns is the HTML namespace, and the node's list of children is
1244
- * empty, and the node's localName matches any one of the following void
1245
- * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed",
1246
- * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta",
1247
- * "param", "source", "track", "wbr"; then append the following to markup,
1248
- * in the order listed:
1249
- * 14.1. " " (U+0020 SPACE);
1250
- * 14.2. "/" (U+002F SOLIDUS).
1251
- * and set the skip end tag flag to true.
1252
- * 15. If ns is not the HTML namespace, and the node's list of children is
1253
- * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end
1254
- * tag flag to true.
1255
- * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup.
1256
- */
1257
- if (node._children.size === 0) {
1258
- markup += "/";
1259
- skipEndTag = true;
1260
- }
1261
- markup += ">";
1262
- /**
1263
- * 17. If the value of skip end tag is true, then return the value of markup
1264
- * and skip the remaining steps. The node is a leaf-node.
1265
- */
1266
- if (skipEndTag)
1267
- return markup;
1268
- try {
1269
- /**
1270
- * 18. If ns is the HTML namespace, and the node's localName matches the
1271
- * string "template", then this is a template element. Append to markup the
1272
- * result of XML serializing a DocumentFragment node given the template
1273
- * element's template contents (a DocumentFragment), providing inherited
1274
- * ns, map, prefix index, and the require well-formed flag.
1275
- *
1276
- * _Note:_ This allows template content to round-trip, given the rules for
1277
- * parsing XHTML documents.
1278
- *
1279
- * 19. Otherwise, append to markup the result of running the XML
1280
- * serialization algorithm on each of node's children, in tree order,
1281
- * providing inherited ns, map, prefix index, and the require well-formed
1282
- * flag.
1283
- */
1284
- for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) {
1285
- var childNode = _c.value;
1286
- markup += this._serializeNode(childNode, requireWellFormed);
1287
- }
1288
- }
1289
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
1290
- finally {
1291
- try {
1292
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1293
- }
1294
- finally { if (e_6) throw e_6.error; }
1295
- }
1296
- /**
1297
- * 20. Append the following to markup, in the order listed:
1298
- * 20.1. "</" (U+003C LESS-THAN SIGN, U+002F SOLIDUS);
1299
- * 20.2. The value of qualified name;
1300
- * 20.3. ">" (U+003E GREATER-THAN SIGN).
1301
- */
1302
- markup += "</" + qualifiedName + ">";
1303
- /**
1304
- * 21. Return the value of markup.
1305
- */
1306
- return markup;
1307
- };
1308
- /**
1309
- * Produces an XML serialization of a document node.
1310
- *
1311
- * @param node - node to serialize
1312
- * @param requireWellFormed - whether to check conformance
1313
- */
1314
- XMLSerializerImpl.prototype._serializeDocument = function (node, requireWellFormed) {
1315
- var e_7, _a;
1316
- /**
1317
- * If the require well-formed flag is set (its value is true), and this node
1318
- * has no documentElement (the documentElement attribute's value is null),
1319
- * then throw an exception; the serialization of this node would not be a
1320
- * well-formed document.
1321
- */
1322
- if (requireWellFormed && node.documentElement === null) {
1323
- throw new Error("Missing document element (well-formed required).");
1324
- }
1325
- /**
1326
- * Otherwise, run the following steps:
1327
- * 1. Let serialized document be an empty string.
1328
- * 2. For each child child of node, in tree order, run the XML
1329
- * serialization algorithm on the child passing along the provided
1330
- * arguments, and append the result to serialized document.
1331
- *
1332
- * _Note:_ This will serialize any number of ProcessingInstruction and
1333
- * Comment nodes both before and after the Document's documentElement node,
1334
- * including at most one DocumentType node. (Text nodes are not allowed as
1335
- * children of the Document.)
1336
- *
1337
- * 3. Return the value of serialized document.
1338
- */
1339
- var serializedDocument = "";
1340
- try {
1341
- for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) {
1342
- var childNode = _c.value;
1343
- serializedDocument += this._serializeNode(childNode, requireWellFormed);
1344
- }
1345
- }
1346
- catch (e_7_1) { e_7 = { error: e_7_1 }; }
1347
- finally {
1348
- try {
1349
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1350
- }
1351
- finally { if (e_7) throw e_7.error; }
1352
- }
1353
- return serializedDocument;
1354
- };
1355
- /**
1356
- * Produces an XML serialization of a document fragment node.
1357
- *
1358
- * @param node - node to serialize
1359
- * @param requireWellFormed - whether to check conformance
1360
- */
1361
- XMLSerializerImpl.prototype._serializeDocumentFragment = function (node, requireWellFormed) {
1362
- var e_8, _a;
1363
- /**
1364
- * 1. Let markup the empty string.
1365
- * 2. For each child child of node, in tree order, run the XML serialization
1366
- * algorithm on the child given namespace, prefix map, a reference to prefix
1367
- * index, and flag require well-formed. Concatenate the result to markup.
1368
- * 3. Return the value of markup.
1369
- */
1370
- var markup = "";
1371
- try {
1372
- for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) {
1373
- var childNode = _c.value;
1374
- markup += this._serializeNode(childNode, requireWellFormed);
1375
- }
1376
- }
1377
- catch (e_8_1) { e_8 = { error: e_8_1 }; }
1378
- finally {
1379
- try {
1380
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1381
- }
1382
- finally { if (e_8) throw e_8.error; }
1383
- }
1384
- return markup;
1385
- };
1386
- /**
1387
- * Produces an XML serialization of the attributes of an element node.
1388
- *
1389
- * @param node - node to serialize
1390
- * @param requireWellFormed - whether to check conformance
1391
- */
1392
- XMLSerializerImpl.prototype._serializeAttributes = function (node, requireWellFormed) {
1393
- var e_9, _a;
1394
- /**
1395
- * 1. Let result be the empty string.
1396
- * 2. Let localname set be a new empty namespace localname set. This
1397
- * localname set will contain tuples of unique attribute namespaceURI and
1398
- * localName pairs, and is populated as each attr is processed. This set is
1399
- * used to [optionally] enforce the well-formed constraint that an element
1400
- * cannot have two attributes with the same namespaceURI and localName.
1401
- * This can occur when two otherwise identical attributes on the same
1402
- * element differ only by their prefix values.
1403
- */
1404
- var result = "";
1405
- var localNameSet = requireWellFormed ? {} : undefined;
1406
- try {
1407
- /**
1408
- * 3. Loop: For each attribute attr in element's attributes, in the order
1409
- * they are specified in the element's attribute list:
1410
- */
1411
- for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
1412
- var attr = _c.value;
1413
- /**
1414
- * 3.1. If the require well-formed flag is set (its value is true), and the
1415
- * localname set contains a tuple whose values match those of a new tuple
1416
- * consisting of attr's namespaceURI attribute and localName attribute,
1417
- * then throw an exception; the serialization of this attr would fail to
1418
- * produce a well-formed element serialization.
1419
- */
1420
- if (requireWellFormed && localNameSet && (attr.localName in localNameSet)) {
1421
- throw new Error("Element contains duplicate attributes (well-formed required).");
1422
- }
1423
- /**
1424
- * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and
1425
- * localName attribute, and add it to the localname set.
1426
- * 3.3. Let attribute namespace be the value of attr's namespaceURI value.
1427
- * 3.4. Let candidate prefix be null.
1428
- */
1429
- if (requireWellFormed && localNameSet)
1430
- localNameSet[attr.localName] = true;
1431
- /** 3.5. If attribute namespace is not null, then run these sub-steps: */
1432
- /**
1433
- * 3.6. Append a " " (U+0020 SPACE) to result.
1434
- * 3.7. If candidate prefix is not null, then append to result the
1435
- * concatenation of candidate prefix with ":" (U+003A COLON).
1436
- */
1437
- /**
1438
- * 3.8. If the require well-formed flag is set (its value is true), and
1439
- * this attr's localName attribute contains the character
1440
- * ":" (U+003A COLON) or does not match the XML Name production or
1441
- * equals "xmlns" and attribute namespace is null, then throw an
1442
- * exception; the serialization of this attr would not be a
1443
- * well-formed attribute.
1444
- */
1445
- if (requireWellFormed && (attr.localName.indexOf(":") !== -1 ||
1446
- !algorithm_1.xml_isName(attr.localName))) {
1447
- throw new Error("Attribute local name contains invalid characters (well-formed required).");
1448
- }
1449
- /**
1450
- * 3.9. Append the following strings to result, in the order listed:
1451
- * 3.9.1. The value of attr's localName;
1452
- * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
1453
- * 3.9.3. The result of serializing an attribute value given attr's value
1454
- * attribute and the require well-formed flag as input;
1455
- * 3.9.4. """ (U+0022 QUOTATION MARK).
1456
- */
1457
- result += " " + attr.localName + "=\"" +
1458
- this._serializeAttributeValue(attr.value, requireWellFormed) + "\"";
1459
- }
1460
- }
1461
- catch (e_9_1) { e_9 = { error: e_9_1 }; }
1462
- finally {
1463
- try {
1464
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1465
- }
1466
- finally { if (e_9) throw e_9.error; }
1467
- }
1468
- /**
1469
- * 4. Return the value of result.
1470
- */
1471
- return result;
1472
- };
1473
- XMLSerializerImpl._VoidElementNames = new Set(['area', 'base', 'basefont',
1474
- 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen',
1475
- 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']);
1476
- return XMLSerializerImpl;
1477
- }());
1478
- exports.XMLSerializerImpl = XMLSerializerImpl;
1479
- //# sourceMappingURL=XMLSerializerImpl.js.map