@wavemaker/angular-codegen 11.15.5-rc.647638 → 11.15.6-1.647697

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.
@@ -131194,11 +131194,22 @@ function requireConventions$1 () {
131194
131194
  XMLNS: 'http://www.w3.org/2000/xmlns/',
131195
131195
  });
131196
131196
 
131197
+ //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
131198
+ //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
131199
+ //[5] Name ::= NameStartChar (NameChar)*
131200
+ var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
131201
+ var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
131202
+ var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
131203
+ //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
131204
+
131197
131205
  conventions$1.assign = assign;
131198
131206
  conventions$1.find = find;
131199
131207
  conventions$1.freeze = freeze;
131200
131208
  conventions$1.MIME_TYPE = MIME_TYPE;
131201
131209
  conventions$1.NAMESPACE = NAMESPACE;
131210
+ conventions$1.nameStartChar = nameStartChar;
131211
+ conventions$1.nameChar = nameChar;
131212
+ conventions$1.tagNamePattern = tagNamePattern;
131202
131213
  return conventions$1;
131203
131214
  }
131204
131215
 
@@ -131211,6 +131222,7 @@ function requireDom$1 () {
131211
131222
 
131212
131223
  var find = conventions.find;
131213
131224
  var NAMESPACE = conventions.NAMESPACE;
131225
+ var tagNamePattern = conventions.tagNamePattern;
131214
131226
 
131215
131227
  /**
131216
131228
  * A prerequisite for `[].filter`, to drop elements that are empty
@@ -132850,6 +132862,9 @@ function requireDom$1 () {
132850
132862
  * @returns {string}
132851
132863
  * @throws {DOMException}
132852
132864
  * With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
132865
+ * - an Element's qualified name (including any namespace prefix) is not a valid XML QName,
132866
+ * - an attribute's qualified name (including a synthesized `xmlns:` namespace declaration) is
132867
+ * not a valid XML QName,
132853
132868
  * - a CDATASection node's data contains `"]]>"`,
132854
132869
  * - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
132855
132870
  * - a ProcessingInstruction's data contains `"?>"`,
@@ -132931,7 +132946,10 @@ function requireDom$1 () {
132931
132946
  * @see https://www.w3.org/TR/xml11/#AVNormalize
132932
132947
  * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
132933
132948
  */
132934
- function addSerializedAttribute(buf, qualifiedName, value) {
132949
+ function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
132950
+ if (requireWellFormed && !tagNamePattern.test(qualifiedName)) {
132951
+ throw new DOMException(INVALID_STATE_ERR, 'The attribute name "' + qualifiedName + '" is not a valid XML QName');
132952
+ }
132935
132953
  buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
132936
132954
  }
132937
132955
 
@@ -132997,6 +133015,9 @@ function requireDom$1 () {
132997
133015
  }
132998
133016
  }
132999
133017
 
133018
+ if (requireWellFormed && !tagNamePattern.test(prefixedNodeName)) {
133019
+ throw new DOMException(INVALID_STATE_ERR, 'The element name "' + prefixedNodeName + '" is not a valid XML QName');
133020
+ }
133000
133021
  buf.push('<', prefixedNodeName);
133001
133022
 
133002
133023
  // Build a fresh namespace snapshot for this element's children.
@@ -133016,7 +133037,7 @@ function requireDom$1 () {
133016
133037
  if (needNamespaceDefine(attr, html, childNs)) {
133017
133038
  var attrPrefix = attr.prefix || '';
133018
133039
  var uri = attr.namespaceURI;
133019
- addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
133040
+ addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri, requireWellFormed);
133020
133041
  childNs.push({ prefix: attrPrefix, namespace: uri });
133021
133042
  }
133022
133043
  // Apply nodeFilter and serialize the attribute.
@@ -133025,7 +133046,7 @@ function requireDom$1 () {
133025
133046
  if (typeof filteredAttr === 'string') {
133026
133047
  buf.push(filteredAttr);
133027
133048
  } else {
133028
- addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
133049
+ addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
133029
133050
  }
133030
133051
  }
133031
133052
  }
@@ -133034,7 +133055,7 @@ function requireDom$1 () {
133034
133055
  if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
133035
133056
  var nodePrefix = n.prefix || '';
133036
133057
  var uri = n.namespaceURI;
133037
- addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
133058
+ addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri, requireWellFormed);
133038
133059
  childNs.push({ prefix: nodePrefix, namespace: uri });
133039
133060
  }
133040
133061
 
@@ -133067,7 +133088,7 @@ function requireDom$1 () {
133067
133088
  return { ns: ns.slice(), isHTML: html, tag: null };
133068
133089
 
133069
133090
  case ATTRIBUTE_NODE:
133070
- addSerializedAttribute(buf, n.name, n.value);
133091
+ addSerializedAttribute(buf, n.name, n.value, requireWellFormed);
133071
133092
  return null;
133072
133093
 
133073
133094
  case TEXT_NODE:
@@ -135524,14 +135545,8 @@ function requireSax$1 () {
135524
135545
  if (hasRequiredSax$1) return sax$1;
135525
135546
  hasRequiredSax$1 = 1;
135526
135547
  var NAMESPACE = requireConventions$1().NAMESPACE;
135548
+ var tagNamePattern = requireConventions$1().tagNamePattern;
135527
135549
 
135528
- //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
135529
- //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
135530
- //[5] Name ::= NameStartChar (NameChar)*
135531
- var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
135532
- var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
135533
- var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
135534
- //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
135535
135550
  //var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
135536
135551
 
135537
135552
  //S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
@@ -143009,7 +143024,7 @@ function requireMomentTimezone$1 () {
143009
143024
  hasRequiredMomentTimezone$1 = 1;
143010
143025
  (function (module) {
143011
143026
  //! moment-timezone.js
143012
- //! version : 0.6.2
143027
+ //! version : 0.6.3
143013
143028
  //! Copyright (c) JS Foundation and other contributors
143014
143029
  //! license : MIT
143015
143030
  //! github.com/moment/moment-timezone
@@ -143035,7 +143050,7 @@ function requireMomentTimezone$1 () {
143035
143050
  // return moment;
143036
143051
  // }
143037
143052
 
143038
- var VERSION = "0.6.2",
143053
+ var VERSION = "0.6.3",
143039
143054
  zones = {},
143040
143055
  links = {},
143041
143056
  countries = {},
@@ -188246,11 +188261,22 @@ function requireConventions () {
188246
188261
  XMLNS: 'http://www.w3.org/2000/xmlns/',
188247
188262
  });
188248
188263
 
188264
+ //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
188265
+ //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
188266
+ //[5] Name ::= NameStartChar (NameChar)*
188267
+ var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
188268
+ var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
188269
+ var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
188270
+ //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
188271
+
188249
188272
  conventions.assign = assign;
188250
188273
  conventions.find = find;
188251
188274
  conventions.freeze = freeze;
188252
188275
  conventions.MIME_TYPE = MIME_TYPE;
188253
188276
  conventions.NAMESPACE = NAMESPACE;
188277
+ conventions.nameStartChar = nameStartChar;
188278
+ conventions.nameChar = nameChar;
188279
+ conventions.tagNamePattern = tagNamePattern;
188254
188280
  return conventions;
188255
188281
  }
188256
188282
 
@@ -188263,6 +188289,7 @@ function requireDom () {
188263
188289
 
188264
188290
  var find = conventions.find;
188265
188291
  var NAMESPACE = conventions.NAMESPACE;
188292
+ var tagNamePattern = conventions.tagNamePattern;
188266
188293
 
188267
188294
  /**
188268
188295
  * A prerequisite for `[].filter`, to drop elements that are empty
@@ -189902,6 +189929,9 @@ function requireDom () {
189902
189929
  * @returns {string}
189903
189930
  * @throws {DOMException}
189904
189931
  * With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
189932
+ * - an Element's qualified name (including any namespace prefix) is not a valid XML QName,
189933
+ * - an attribute's qualified name (including a synthesized `xmlns:` namespace declaration) is
189934
+ * not a valid XML QName,
189905
189935
  * - a CDATASection node's data contains `"]]>"`,
189906
189936
  * - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
189907
189937
  * - a ProcessingInstruction's data contains `"?>"`,
@@ -189983,7 +190013,10 @@ function requireDom () {
189983
190013
  * @see https://www.w3.org/TR/xml11/#AVNormalize
189984
190014
  * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
189985
190015
  */
189986
- function addSerializedAttribute(buf, qualifiedName, value) {
190016
+ function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
190017
+ if (requireWellFormed && !tagNamePattern.test(qualifiedName)) {
190018
+ throw new DOMException(INVALID_STATE_ERR, 'The attribute name "' + qualifiedName + '" is not a valid XML QName');
190019
+ }
189987
190020
  buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
189988
190021
  }
189989
190022
 
@@ -190049,6 +190082,9 @@ function requireDom () {
190049
190082
  }
190050
190083
  }
190051
190084
 
190085
+ if (requireWellFormed && !tagNamePattern.test(prefixedNodeName)) {
190086
+ throw new DOMException(INVALID_STATE_ERR, 'The element name "' + prefixedNodeName + '" is not a valid XML QName');
190087
+ }
190052
190088
  buf.push('<', prefixedNodeName);
190053
190089
 
190054
190090
  // Build a fresh namespace snapshot for this element's children.
@@ -190068,7 +190104,7 @@ function requireDom () {
190068
190104
  if (needNamespaceDefine(attr, html, childNs)) {
190069
190105
  var attrPrefix = attr.prefix || '';
190070
190106
  var uri = attr.namespaceURI;
190071
- addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
190107
+ addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri, requireWellFormed);
190072
190108
  childNs.push({ prefix: attrPrefix, namespace: uri });
190073
190109
  }
190074
190110
  // Apply nodeFilter and serialize the attribute.
@@ -190077,7 +190113,7 @@ function requireDom () {
190077
190113
  if (typeof filteredAttr === 'string') {
190078
190114
  buf.push(filteredAttr);
190079
190115
  } else {
190080
- addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
190116
+ addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
190081
190117
  }
190082
190118
  }
190083
190119
  }
@@ -190086,7 +190122,7 @@ function requireDom () {
190086
190122
  if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
190087
190123
  var nodePrefix = n.prefix || '';
190088
190124
  var uri = n.namespaceURI;
190089
- addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
190125
+ addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri, requireWellFormed);
190090
190126
  childNs.push({ prefix: nodePrefix, namespace: uri });
190091
190127
  }
190092
190128
 
@@ -190119,7 +190155,7 @@ function requireDom () {
190119
190155
  return { ns: ns.slice(), isHTML: html, tag: null };
190120
190156
 
190121
190157
  case ATTRIBUTE_NODE:
190122
- addSerializedAttribute(buf, n.name, n.value);
190158
+ addSerializedAttribute(buf, n.name, n.value, requireWellFormed);
190123
190159
  return null;
190124
190160
 
190125
190161
  case TEXT_NODE:
@@ -192576,14 +192612,8 @@ function requireSax () {
192576
192612
  if (hasRequiredSax) return sax;
192577
192613
  hasRequiredSax = 1;
192578
192614
  var NAMESPACE = requireConventions().NAMESPACE;
192615
+ var tagNamePattern = requireConventions().tagNamePattern;
192579
192616
 
192580
- //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
192581
- //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
192582
- //[5] Name ::= NameStartChar (NameChar)*
192583
- var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
192584
- var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
192585
- var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
192586
- //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
192587
192617
  //var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
192588
192618
 
192589
192619
  //S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
@@ -200061,7 +200091,7 @@ function requireMomentTimezone () {
200061
200091
  hasRequiredMomentTimezone = 1;
200062
200092
  (function (module) {
200063
200093
  //! moment-timezone.js
200064
- //! version : 0.6.2
200094
+ //! version : 0.6.3
200065
200095
  //! Copyright (c) JS Foundation and other contributors
200066
200096
  //! license : MIT
200067
200097
  //! github.com/moment/moment-timezone
@@ -200087,7 +200117,7 @@ function requireMomentTimezone () {
200087
200117
  // return moment;
200088
200118
  // }
200089
200119
 
200090
- var VERSION = "0.6.2",
200120
+ var VERSION = "0.6.3",
200091
200121
  zones = {},
200092
200122
  links = {},
200093
200123
  countries = {},
@@ -37722,11 +37722,22 @@ function requireConventions () {
37722
37722
  XMLNS: 'http://www.w3.org/2000/xmlns/',
37723
37723
  });
37724
37724
 
37725
+ //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
37726
+ //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
37727
+ //[5] Name ::= NameStartChar (NameChar)*
37728
+ var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
37729
+ var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
37730
+ var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
37731
+ //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
37732
+
37725
37733
  conventions.assign = assign;
37726
37734
  conventions.find = find;
37727
37735
  conventions.freeze = freeze;
37728
37736
  conventions.MIME_TYPE = MIME_TYPE;
37729
37737
  conventions.NAMESPACE = NAMESPACE;
37738
+ conventions.nameStartChar = nameStartChar;
37739
+ conventions.nameChar = nameChar;
37740
+ conventions.tagNamePattern = tagNamePattern;
37730
37741
  return conventions;
37731
37742
  }
37732
37743
 
@@ -37739,6 +37750,7 @@ function requireDom () {
37739
37750
 
37740
37751
  var find = conventions.find;
37741
37752
  var NAMESPACE = conventions.NAMESPACE;
37753
+ var tagNamePattern = conventions.tagNamePattern;
37742
37754
 
37743
37755
  /**
37744
37756
  * A prerequisite for `[].filter`, to drop elements that are empty
@@ -39378,6 +39390,9 @@ function requireDom () {
39378
39390
  * @returns {string}
39379
39391
  * @throws {DOMException}
39380
39392
  * With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
39393
+ * - an Element's qualified name (including any namespace prefix) is not a valid XML QName,
39394
+ * - an attribute's qualified name (including a synthesized `xmlns:` namespace declaration) is
39395
+ * not a valid XML QName,
39381
39396
  * - a CDATASection node's data contains `"]]>"`,
39382
39397
  * - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
39383
39398
  * - a ProcessingInstruction's data contains `"?>"`,
@@ -39459,7 +39474,10 @@ function requireDom () {
39459
39474
  * @see https://www.w3.org/TR/xml11/#AVNormalize
39460
39475
  * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
39461
39476
  */
39462
- function addSerializedAttribute(buf, qualifiedName, value) {
39477
+ function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
39478
+ if (requireWellFormed && !tagNamePattern.test(qualifiedName)) {
39479
+ throw new DOMException(INVALID_STATE_ERR, 'The attribute name "' + qualifiedName + '" is not a valid XML QName');
39480
+ }
39463
39481
  buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
39464
39482
  }
39465
39483
 
@@ -39525,6 +39543,9 @@ function requireDom () {
39525
39543
  }
39526
39544
  }
39527
39545
 
39546
+ if (requireWellFormed && !tagNamePattern.test(prefixedNodeName)) {
39547
+ throw new DOMException(INVALID_STATE_ERR, 'The element name "' + prefixedNodeName + '" is not a valid XML QName');
39548
+ }
39528
39549
  buf.push('<', prefixedNodeName);
39529
39550
 
39530
39551
  // Build a fresh namespace snapshot for this element's children.
@@ -39544,7 +39565,7 @@ function requireDom () {
39544
39565
  if (needNamespaceDefine(attr, html, childNs)) {
39545
39566
  var attrPrefix = attr.prefix || '';
39546
39567
  var uri = attr.namespaceURI;
39547
- addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
39568
+ addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri, requireWellFormed);
39548
39569
  childNs.push({ prefix: attrPrefix, namespace: uri });
39549
39570
  }
39550
39571
  // Apply nodeFilter and serialize the attribute.
@@ -39553,7 +39574,7 @@ function requireDom () {
39553
39574
  if (typeof filteredAttr === 'string') {
39554
39575
  buf.push(filteredAttr);
39555
39576
  } else {
39556
- addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
39577
+ addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
39557
39578
  }
39558
39579
  }
39559
39580
  }
@@ -39562,7 +39583,7 @@ function requireDom () {
39562
39583
  if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
39563
39584
  var nodePrefix = n.prefix || '';
39564
39585
  var uri = n.namespaceURI;
39565
- addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
39586
+ addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri, requireWellFormed);
39566
39587
  childNs.push({ prefix: nodePrefix, namespace: uri });
39567
39588
  }
39568
39589
 
@@ -39595,7 +39616,7 @@ function requireDom () {
39595
39616
  return { ns: ns.slice(), isHTML: html, tag: null };
39596
39617
 
39597
39618
  case ATTRIBUTE_NODE:
39598
- addSerializedAttribute(buf, n.name, n.value);
39619
+ addSerializedAttribute(buf, n.name, n.value, requireWellFormed);
39599
39620
  return null;
39600
39621
 
39601
39622
  case TEXT_NODE:
@@ -42052,14 +42073,8 @@ function requireSax () {
42052
42073
  if (hasRequiredSax) return sax;
42053
42074
  hasRequiredSax = 1;
42054
42075
  var NAMESPACE = requireConventions().NAMESPACE;
42076
+ var tagNamePattern = requireConventions().tagNamePattern;
42055
42077
 
42056
- //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
42057
- //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
42058
- //[5] Name ::= NameStartChar (NameChar)*
42059
- var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
42060
- var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
42061
- var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
42062
- //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
42063
42078
  //var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
42064
42079
 
42065
42080
  //S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
@@ -49537,7 +49552,7 @@ function requireMomentTimezone () {
49537
49552
  hasRequiredMomentTimezone = 1;
49538
49553
  (function (module) {
49539
49554
  //! moment-timezone.js
49540
- //! version : 0.6.2
49555
+ //! version : 0.6.3
49541
49556
  //! Copyright (c) JS Foundation and other contributors
49542
49557
  //! license : MIT
49543
49558
  //! github.com/moment/moment-timezone
@@ -49563,7 +49578,7 @@ function requireMomentTimezone () {
49563
49578
  // return moment;
49564
49579
  // }
49565
49580
 
49566
- var VERSION = "0.6.2",
49581
+ var VERSION = "0.6.3",
49567
49582
  zones = {},
49568
49583
  links = {},
49569
49584
  countries = {},