@wavemaker/angular-codegen 11.15.4-rc.647493 → 11.15.5-1.647717

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.
@@ -35719,6 +35719,9 @@ const getDataSource = (dataSetExpr) => {
35719
35719
  if (parts[0] === 'Variables' || parts[0] === 'Widgets') {
35720
35720
  return `${parts[0]}.${parts[1]}`;
35721
35721
  }
35722
+ if (parts[0] === 'App' && parts[1] === 'activePage' && parts[2] === 'Variables' && parts[3]) {
35723
+ return `App.activePage.Variables.${parts[3]}`;
35724
+ }
35722
35725
  };
35723
35726
  const widgetChildAttrs = (() => {
35724
35727
  const childAttrs = new Map();
@@ -37719,11 +37722,22 @@ function requireConventions () {
37719
37722
  XMLNS: 'http://www.w3.org/2000/xmlns/',
37720
37723
  });
37721
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
+
37722
37733
  conventions.assign = assign;
37723
37734
  conventions.find = find;
37724
37735
  conventions.freeze = freeze;
37725
37736
  conventions.MIME_TYPE = MIME_TYPE;
37726
37737
  conventions.NAMESPACE = NAMESPACE;
37738
+ conventions.nameStartChar = nameStartChar;
37739
+ conventions.nameChar = nameChar;
37740
+ conventions.tagNamePattern = tagNamePattern;
37727
37741
  return conventions;
37728
37742
  }
37729
37743
 
@@ -37736,6 +37750,7 @@ function requireDom () {
37736
37750
 
37737
37751
  var find = conventions.find;
37738
37752
  var NAMESPACE = conventions.NAMESPACE;
37753
+ var tagNamePattern = conventions.tagNamePattern;
37739
37754
 
37740
37755
  /**
37741
37756
  * A prerequisite for `[].filter`, to drop elements that are empty
@@ -37967,6 +37982,13 @@ function requireDom () {
37967
37982
  * used for attributes or DocumentType entities
37968
37983
  */
37969
37984
  function NamedNodeMap() {
37985
+ // nodeName -> Attr membership index; lets the parse-time de-duplication in
37986
+ // setNamedItem resolve an existing attribute in O(1) instead of scanning the
37987
+ // list, so building an element with M attributes costs O(M) rather than O(M^2).
37988
+ // The numbered entries and length remain the sole authority for attribute order.
37989
+ // Object.create(null) so an attribute named __proto__ or constructor is an
37990
+ // ordinary key.
37991
+ this._nameIndex = Object.create(null);
37970
37992
  }
37971
37993
  function _findNodeIndex(list,node){
37972
37994
  var i = list.length;
@@ -37975,12 +37997,27 @@ function requireDom () {
37975
37997
  }
37976
37998
  }
37977
37999
 
38000
+ function _nnmIndexAdd(list, attr) {
38001
+ list._nameIndex[attr.nodeName] = attr;
38002
+ }
38003
+ function _nnmIndexRemove(list, attr) {
38004
+ // Only drop the entry if it still points at this attribute; a replacement with
38005
+ // a different nodeName may already have re-keyed it.
38006
+ if (list._nameIndex[attr.nodeName] === attr) {
38007
+ delete list._nameIndex[attr.nodeName];
38008
+ }
38009
+ }
38010
+
37978
38011
  function _addNamedNode(el,list,newAttr,oldAttr){
37979
38012
  if(oldAttr){
37980
38013
  list[_findNodeIndex(list,oldAttr)] = newAttr;
38014
+ // oldAttr leaves the list; drop its index entry (its nodeName may differ
38015
+ // from newAttr's when the replacement came via setNamedItemNS).
38016
+ _nnmIndexRemove(list, oldAttr);
37981
38017
  }else {
37982
38018
  list[list.length++] = newAttr;
37983
38019
  }
38020
+ _nnmIndexAdd(list, newAttr);
37984
38021
  if(el){
37985
38022
  newAttr.ownerElement = el;
37986
38023
  var doc = el.ownerDocument;
@@ -37999,6 +38036,7 @@ function requireDom () {
37999
38036
  list[i] = list[++i];
38000
38037
  }
38001
38038
  list.length = lastIndex;
38039
+ _nnmIndexRemove(list, attr);
38002
38040
  if(el){
38003
38041
  var doc = el.ownerDocument;
38004
38042
  if(doc){
@@ -38032,7 +38070,11 @@ function requireDom () {
38032
38070
  if(el && el!=this._ownerElement){
38033
38071
  throw new DOMException(INUSE_ATTRIBUTE_ERR);
38034
38072
  }
38035
- var oldAttr = this.getNamedItem(attr.nodeName);
38073
+ // Resolve any existing attribute with the same nodeName through the O(1)
38074
+ // membership index rather than an O(M) scan — this is the parse-dedup hot
38075
+ // path (setAttributeNode per attribute during parse). Absent -> undefined,
38076
+ // matching getNamedItem's contract.
38077
+ var oldAttr = this._nameIndex[attr.nodeName];
38036
38078
  _addNamedNode(this._ownerElement,this,attr,oldAttr);
38037
38079
  return oldAttr;
38038
38080
  },
@@ -38265,9 +38307,38 @@ function requireDom () {
38265
38307
  while (child) {
38266
38308
  var next = child.nextSibling;
38267
38309
  if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) {
38268
- node.removeChild(next);
38269
- child.appendData(next.data);
38270
- // Do not advance child: re-check new nextSibling for another text run
38310
+ // Merge the whole run of adjacent text nodes at once: gather the
38311
+ // following text siblings' data, unlink them in a single pass, and
38312
+ // re-index the child list a single time. Per-sibling `removeChild`
38313
+ // (each an O(K) re-index) plus per-sibling `appendData` (each an O(K)
38314
+ // string rebuild) is O(K^2) over a long run of single-character text
38315
+ // nodes; this keeps it O(K). The first text node of the run survives
38316
+ // and carries the concatenated data, preserving node identity and
38317
+ // locator semantics.
38318
+ var tail = [];
38319
+ var sibling = next;
38320
+ while (sibling !== null && sibling.nodeType === TEXT_NODE) {
38321
+ tail.push(sibling.data);
38322
+ sibling = sibling.nextSibling;
38323
+ }
38324
+ // `sibling` is now the first non-text node after the run, or null.
38325
+ var removed = child.nextSibling;
38326
+ while (removed !== sibling) {
38327
+ var following = removed.nextSibling;
38328
+ removed.parentNode = null;
38329
+ removed.previousSibling = null;
38330
+ removed.nextSibling = null;
38331
+ removed = following;
38332
+ }
38333
+ child.nextSibling = sibling;
38334
+ if (sibling !== null) {
38335
+ sibling.previousSibling = child;
38336
+ } else {
38337
+ node.lastChild = child;
38338
+ }
38339
+ child.appendData(tail.join('')); // single O(K) string rebuild
38340
+ _onUpdateChild(node.ownerDocument, node); // single O(K) re-index
38341
+ child = sibling;
38271
38342
  } else {
38272
38343
  child = next;
38273
38344
  }
@@ -39078,8 +39149,10 @@ function requireDom () {
39078
39149
  * - it does not do any input validation on the arguments and doesn't throw "InvalidCharacterError".
39079
39150
  *
39080
39151
  * Note: When the resulting document is serialized with `requireWellFormed: true`, the
39081
- * serializer throws with code `INVALID_STATE_ERR` if `.data` contains `?>` (W3C DOM Parsing
39082
- * §3.2.1.7). Without that option the data is emitted verbatim.
39152
+ * serializer throws with code `INVALID_STATE_ERR` if `.target` is not a valid XML `NCName`
39153
+ * (a `Name` with no colon) or is an ASCII case-insensitive match for `"xml"`, or if `.data`
39154
+ * contains `?>` (W3C DOM Parsing §3.2.1.7). Without that option the target and data are
39155
+ * emitted verbatim.
39083
39156
  *
39084
39157
  * @param {string} target
39085
39158
  * @param {string} data
@@ -39104,7 +39177,27 @@ function requireDom () {
39104
39177
  node.specified = true;
39105
39178
  return node;
39106
39179
  },
39180
+ /**
39181
+ * Creates an EntityReference object, serialized as `&name;`.
39182
+ *
39183
+ * The `name` is validated against the XML `Name` production at creation time; an invalid name
39184
+ * throws a `DOMException` with code `INVALID_CHARACTER_ERR`. When the resulting node is
39185
+ * serialized with `requireWellFormed: true`, the serializer re-validates `nodeName` and throws
39186
+ * a `DOMException` with code `INVALID_STATE_ERR` if a later `nodeName` mutation made it invalid;
39187
+ * without that option the name is emitted verbatim.
39188
+ *
39189
+ * Note: xmldom does not expand entities — the parser resolves entity references inline and never
39190
+ * constructs `EntityReference` nodes, so this method is the only producer.
39191
+ *
39192
+ * @param {string} name The name of the entity to reference.
39193
+ * @returns {EntityReference}
39194
+ * @throws {DOMException} With code `INVALID_CHARACTER_ERR` when `name` is not a valid XML `Name`.
39195
+ * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-392B75AE
39196
+ */
39107
39197
  createEntityReference : function(name){
39198
+ if (!tagNamePattern.test(name)) {
39199
+ throw new DOMException(INVALID_CHARACTER_ERR, 'not a valid xml name "' + name + '"');
39200
+ }
39108
39201
  var node = new EntityReference();
39109
39202
  node.ownerDocument = this;
39110
39203
  node.nodeName = name;
@@ -39316,15 +39409,16 @@ function requireDom () {
39316
39409
  /**
39317
39410
  * Represents a DocumentType node (the `<!DOCTYPE ...>` declaration).
39318
39411
  *
39319
- * `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
39412
+ * `name`, `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
39320
39413
  * xmldom does not enforce the `readonly` constraint declared by the WHATWG DOM spec —
39321
39414
  * direct property writes succeed silently. Values are serialized verbatim when
39322
39415
  * `requireWellFormed` is false (the default). When the serializer is invoked with
39323
39416
  * `requireWellFormed: true` (via the 4th-parameter options object), it validates each
39324
- * field and throws `DOMException` with code `INVALID_STATE_ERR` on invalid values.
39417
+ * field — including `name`, which is checked against the XML `Name` production — and throws
39418
+ * `DOMException` with code `INVALID_STATE_ERR` on invalid values.
39325
39419
  *
39326
39420
  * @class
39327
- * @see https://developer.mozilla.org/en-US/docs/Web/API/DocumentType MDN
39421
+ * @see https://developer.mozilla.org/docs/Web/API/DocumentType MDN
39328
39422
  */
39329
39423
  function DocumentType() {
39330
39424
  } DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
@@ -39338,6 +39432,20 @@ function requireDom () {
39338
39432
  } Entity.prototype.nodeType = ENTITY_NODE;
39339
39433
  _extends(Entity,Node);
39340
39434
 
39435
+ /**
39436
+ * Represents an EntityReference node, serialized as `&nodeName;`.
39437
+ *
39438
+ * `nodeName` is the referenced entity's name, stored verbatim. When serialized with
39439
+ * `requireWellFormed: true`, the serializer validates `nodeName` against the XML `Name` production
39440
+ * and throws a `DOMException` with code `INVALID_STATE_ERR` if it does not match; without that
39441
+ * option the name is emitted verbatim between `&` and `;`.
39442
+ *
39443
+ * Note: xmldom does not expand entities — the parser resolves entity references inline and never
39444
+ * constructs `EntityReference` nodes, so the only producer is `Document.createEntityReference`.
39445
+ *
39446
+ * @class
39447
+ * @see https://www.w3.org/TR/xml/#NT-Name
39448
+ */
39341
39449
  function EntityReference() {
39342
39450
  } EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
39343
39451
  _extends(EntityReference,Node);
@@ -39375,14 +39483,20 @@ function requireDom () {
39375
39483
  * @returns {string}
39376
39484
  * @throws {DOMException}
39377
39485
  * With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
39486
+ * - an Element's qualified name (including any namespace prefix) is not a valid XML QName,
39487
+ * - an attribute's qualified name (including a synthesized `xmlns:` namespace declaration) is
39488
+ * not a valid XML QName,
39378
39489
  * - a CDATASection node's data contains `"]]>"`,
39379
39490
  * - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
39380
- * - a ProcessingInstruction's data contains `"?>"`,
39491
+ * - a ProcessingInstruction's target is not a valid XML `NCName` (a `Name` with no colon) or is
39492
+ * an ASCII case-insensitive match for `"xml"`, or its data contains `"?>"`,
39493
+ * - a DocumentType's `name` is not a valid XML `Name` (XML 1.0 production [5]),
39381
39494
  * - a DocumentType's `publicId` is non-empty and does not match the XML `PubidLiteral`
39382
39495
  * production,
39383
39496
  * - a DocumentType's `systemId` is non-empty and does not match the XML `SystemLiteral`
39384
- * production, or
39385
- * - a DocumentType's `internalSubset` contains `"]>"`.
39497
+ * production,
39498
+ * - a DocumentType's `internalSubset` contains `"]>"`, or
39499
+ * - an EntityReference's `nodeName` is not a valid XML `Name` (XML 1.0 production [5]).
39386
39500
  * Note: xmldom does not enforce `readonly` on DocumentType fields — direct property
39387
39501
  * writes succeed and are covered by the serializer-level checks above.
39388
39502
  * @see https://html.spec.whatwg.org/#dom-xmlserializer-serializetostring
@@ -39456,7 +39570,10 @@ function requireDom () {
39456
39570
  * @see https://www.w3.org/TR/xml11/#AVNormalize
39457
39571
  * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
39458
39572
  */
39459
- function addSerializedAttribute(buf, qualifiedName, value) {
39573
+ function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
39574
+ if (requireWellFormed && !tagNamePattern.test(qualifiedName)) {
39575
+ throw new DOMException(INVALID_STATE_ERR, 'The attribute name "' + qualifiedName + '" is not a valid XML QName');
39576
+ }
39460
39577
  buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
39461
39578
  }
39462
39579
 
@@ -39522,6 +39639,9 @@ function requireDom () {
39522
39639
  }
39523
39640
  }
39524
39641
 
39642
+ if (requireWellFormed && !tagNamePattern.test(prefixedNodeName)) {
39643
+ throw new DOMException(INVALID_STATE_ERR, 'The element name "' + prefixedNodeName + '" is not a valid XML QName');
39644
+ }
39525
39645
  buf.push('<', prefixedNodeName);
39526
39646
 
39527
39647
  // Build a fresh namespace snapshot for this element's children.
@@ -39541,7 +39661,7 @@ function requireDom () {
39541
39661
  if (needNamespaceDefine(attr, html, childNs)) {
39542
39662
  var attrPrefix = attr.prefix || '';
39543
39663
  var uri = attr.namespaceURI;
39544
- addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
39664
+ addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri, requireWellFormed);
39545
39665
  childNs.push({ prefix: attrPrefix, namespace: uri });
39546
39666
  }
39547
39667
  // Apply nodeFilter and serialize the attribute.
@@ -39550,7 +39670,7 @@ function requireDom () {
39550
39670
  if (typeof filteredAttr === 'string') {
39551
39671
  buf.push(filteredAttr);
39552
39672
  } else {
39553
- addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
39673
+ addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
39554
39674
  }
39555
39675
  }
39556
39676
  }
@@ -39559,7 +39679,7 @@ function requireDom () {
39559
39679
  if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
39560
39680
  var nodePrefix = n.prefix || '';
39561
39681
  var uri = n.namespaceURI;
39562
- addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
39682
+ addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri, requireWellFormed);
39563
39683
  childNs.push({ prefix: nodePrefix, namespace: uri });
39564
39684
  }
39565
39685
 
@@ -39592,7 +39712,7 @@ function requireDom () {
39592
39712
  return { ns: ns.slice(), isHTML: html, tag: null };
39593
39713
 
39594
39714
  case ATTRIBUTE_NODE:
39595
- addSerializedAttribute(buf, n.name, n.value);
39715
+ addSerializedAttribute(buf, n.name, n.value, requireWellFormed);
39596
39716
  return null;
39597
39717
 
39598
39718
  case TEXT_NODE:
@@ -39631,6 +39751,9 @@ function requireDom () {
39631
39751
 
39632
39752
  case DOCUMENT_TYPE_NODE:
39633
39753
  if (requireWellFormed) {
39754
+ if (!tagNamePattern.test(n.name)) {
39755
+ throw new DOMException(INVALID_STATE_ERR, 'The doctype name "' + n.name + '" is not a valid XML Name');
39756
+ }
39634
39757
  if (n.publicId && !/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(n.publicId)) {
39635
39758
  throw new DOMException(INVALID_STATE_ERR, 'DocumentType publicId is not a valid PubidLiteral');
39636
39759
  }
@@ -39662,13 +39785,27 @@ function requireDom () {
39662
39785
  return null;
39663
39786
 
39664
39787
  case PROCESSING_INSTRUCTION_NODE:
39665
- if (requireWellFormed && n.data.indexOf('?>') !== -1) {
39666
- throw new DOMException(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"');
39788
+ if (requireWellFormed) {
39789
+ if (!tagNamePattern.test(n.target) || n.target.indexOf(':') !== -1 || n.target.toLowerCase() === 'xml') {
39790
+ throw new DOMException(
39791
+ INVALID_STATE_ERR,
39792
+ 'The processing instruction target "' + n.target + '" is not a valid XML NCName or is reserved'
39793
+ );
39794
+ }
39795
+ if (n.data.indexOf('?>') !== -1) {
39796
+ throw new DOMException(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"');
39797
+ }
39667
39798
  }
39668
39799
  buf.push('<?', n.target, ' ', n.data, '?>');
39669
39800
  return null;
39670
39801
 
39671
39802
  case ENTITY_REFERENCE_NODE:
39803
+ if (requireWellFormed && !tagNamePattern.test(n.nodeName)) {
39804
+ throw new DOMException(
39805
+ INVALID_STATE_ERR,
39806
+ 'The entity reference name "' + n.nodeName + '" is not a valid XML Name'
39807
+ );
39808
+ }
39672
39809
  buf.push('&', n.nodeName, ';');
39673
39810
  return null;
39674
39811
 
@@ -42049,14 +42186,8 @@ function requireSax () {
42049
42186
  if (hasRequiredSax) return sax;
42050
42187
  hasRequiredSax = 1;
42051
42188
  var NAMESPACE = requireConventions().NAMESPACE;
42189
+ var tagNamePattern = requireConventions().tagNamePattern;
42052
42190
 
42053
- //[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]
42054
- //[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
42055
- //[5] Name ::= NameStartChar (NameChar)*
42056
- 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
42057
- var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
42058
- var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
42059
- //var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
42060
42191
  //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(',')
42061
42192
 
42062
42193
  //S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
@@ -42167,7 +42298,13 @@ function requireSax () {
42167
42298
  switch(source.charAt(tagStart+1)){
42168
42299
  case '/':
42169
42300
  var end = source.indexOf('>',tagStart+3);
42170
- var tagName = source.substring(tagStart + 2, end).replace(/[ \t\n\r]+$/g, '');
42301
+ // Anchored trailing-whitespace trim. The former `/[ \t\n\r]+$/g` backtracked
42302
+ // quadratically on a name shaped `whitespace-run + non-whitespace char`
42303
+ // (an end tag `</ … x>`): from every start position it extended `[ws]+`
42304
+ // to the end and then failed the `$` anchor. This anchored form matches the
42305
+ // whole string once and captures everything up to the last non-whitespace
42306
+ // character, so it trims in linear time with byte-identical output.
42307
+ var tagName = source.substring(tagStart + 2, end).replace(/^([\s\S]*?[^ \t\n\r])?[ \t\n\r]*$/, '$1');
42171
42308
  var config = parseStack.pop();
42172
42309
  if(end<0){
42173
42310
 
@@ -42178,6 +42315,14 @@ function requireSax () {
42178
42315
  tagName = tagName.replace(/[\s<].*/,'');
42179
42316
  errorHandler.error("end tag name: "+tagName+' maybe not complete');
42180
42317
  end = tagStart+1+tagName.length;
42318
+ }else if(/[ \t\n\r]/.test(tagName) && tagNamePattern.test(tagName.split(/[ \t\n\r]/)[0])){
42319
+ // The XML `ETag` production is `'</' Name S? '>'`: only optional whitespace may follow
42320
+ // the `Name`. A valid `Name` followed by whitespace and non-whitespace residue (e.g.
42321
+ // `</a\nbogus>` or `</a bogus>`) is not well-formed, but historically it was silently
42322
+ // accepted (the malformed end tag ignored, the residue dropped, the element left on the
42323
+ // stack). Report it as a recoverable `error` (which a custom errorHandler may escalate to
42324
+ // fatal) while keeping the existing recovery so the parsed DOM stays byte-identical.
42325
+ errorHandler.error('end tag name is followed by whitespace and trailing content: "'+tagName+'"');
42181
42326
  }
42182
42327
  var localNSMap = config.localNSMap;
42183
42328
  var endMatch = config.tagName == tagName;
@@ -42301,6 +42446,15 @@ function requireSax () {
42301
42446
  var s = S_TAG;//status
42302
42447
  while(true){
42303
42448
  var c = source.charAt(p);
42449
+ if (s === S_TAG && c === '<') {
42450
+ // A `<` can never occur inside a tag name. Without this guard the scan runs
42451
+ // on to the next `>` (or EOF) before the tag name is rejected, so a document
42452
+ // with many `<` inside a malformed tag makes each one-character recovery step
42453
+ // re-scan to the distant `>` — O(n^2). Stopping at the `<` keeps each recovery
42454
+ // step bounded. The candidate scanned so far is reported raw, consistent with
42455
+ // the sibling invalid-tag-name throw below.
42456
+ throw new Error('unexpected < in tag name: ' + source.slice(start, p));
42457
+ }
42304
42458
  switch(c){
42305
42459
  case '=':
42306
42460
  if(s === S_ATTR){//attrName
@@ -42493,9 +42647,13 @@ function requireSax () {
42493
42647
  if(nsPrefix !== false){//hack!!
42494
42648
  if(localNSMap == null){
42495
42649
  localNSMap = {};
42496
- //console.log(currentNSMap,0)
42497
- _copy(currentNSMap,currentNSMap={});
42498
- //console.log(currentNSMap,1)
42650
+ // Derive the child scope's namespace map by prototype-chain inheritance
42651
+ // instead of a flat copy: lookups inherit ancestor prefixes transparently,
42652
+ // so a document nesting N scopes retains O(N) map entries rather than
42653
+ // sum(1..N) = O(N^2). localNSMap stays a flat own-only record of the
42654
+ // prefixes declared at THIS element, so own-property enumeration
42655
+ // (endPrefixMapping below) still reports only local declarations.
42656
+ currentNSMap = Object.create(currentNSMap);
42499
42657
  }
42500
42658
  currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
42501
42659
  a.uri = NAMESPACE.XMLNS;
@@ -49534,7 +49692,7 @@ function requireMomentTimezone () {
49534
49692
  hasRequiredMomentTimezone = 1;
49535
49693
  (function (module) {
49536
49694
  //! moment-timezone.js
49537
- //! version : 0.6.2
49695
+ //! version : 0.6.3
49538
49696
  //! Copyright (c) JS Foundation and other contributors
49539
49697
  //! license : MIT
49540
49698
  //! github.com/moment/moment-timezone
@@ -49560,7 +49718,7 @@ function requireMomentTimezone () {
49560
49718
  // return moment;
49561
49719
  // }
49562
49720
 
49563
- var VERSION = "0.6.2",
49721
+ var VERSION = "0.6.3",
49564
49722
  zones = {},
49565
49723
  links = {},
49566
49724
  countries = {},
@@ -101978,10 +102136,14 @@ const triggerItemAction = (scope, item) => {
101978
102136
  const getDatasourceFromExpr = (expr, scope) => {
101979
102137
  const isBoundToVariable = startsWith(expr, 'Variables.');
101980
102138
  const isBoundToWidget = startsWith(expr, 'Widgets.');
102139
+ const isBoundToActivePageVar = startsWith(expr, 'App.activePage.Variables.');
101981
102140
  const parts = expr.split('.');
101982
102141
  if (isBoundToVariable) {
101983
102142
  return get$1(scope.viewParent.Variables, parts[1]);
101984
102143
  }
102144
+ if (isBoundToActivePageVar) {
102145
+ return get$1(scope.viewParent?.App?.activePage?.Variables, parts[3]);
102146
+ }
101985
102147
  if (isBoundToWidget) {
101986
102148
  const widgetScope = get$1(scope.viewParent.Widgets, parts[1]);
101987
102149
  const widgetDatasetBoundExpr = widgetScope.$attrs.get('datasetboundexpr');