@wavemaker/angular-app 11.14.1-21.64739 → 11.14.1-22.647453

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.
@@ -124642,17 +124642,17 @@ var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')();
124642
124642
  var Symbol$1$1 = root$1.Symbol;
124643
124643
 
124644
124644
  /** Used for built-in method references. */
124645
- var objectProto$i$1 = Object.prototype;
124645
+ var objectProto$h$1 = Object.prototype;
124646
124646
 
124647
124647
  /** Used to check objects for own properties. */
124648
- var hasOwnProperty$f$1 = objectProto$i$1.hasOwnProperty;
124648
+ var hasOwnProperty$e$1 = objectProto$h$1.hasOwnProperty;
124649
124649
 
124650
124650
  /**
124651
124651
  * Used to resolve the
124652
124652
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
124653
124653
  * of values.
124654
124654
  */
124655
- var nativeObjectToString$1$1 = objectProto$i$1.toString;
124655
+ var nativeObjectToString$1$1 = objectProto$h$1.toString;
124656
124656
 
124657
124657
  /** Built-in value references. */
124658
124658
  var symToStringTag$1$1 = Symbol$1$1 ? Symbol$1$1.toStringTag : undefined;
@@ -124665,7 +124665,7 @@ var symToStringTag$1$1 = Symbol$1$1 ? Symbol$1$1.toStringTag : undefined;
124665
124665
  * @returns {string} Returns the raw `toStringTag`.
124666
124666
  */
124667
124667
  function getRawTag$1(value) {
124668
- var isOwn = hasOwnProperty$f$1.call(value, symToStringTag$1$1),
124668
+ var isOwn = hasOwnProperty$e$1.call(value, symToStringTag$1$1),
124669
124669
  tag = value[symToStringTag$1$1];
124670
124670
 
124671
124671
  try {
@@ -124685,14 +124685,14 @@ function getRawTag$1(value) {
124685
124685
  }
124686
124686
 
124687
124687
  /** Used for built-in method references. */
124688
- var objectProto$h$1 = Object.prototype;
124688
+ var objectProto$g$1 = Object.prototype;
124689
124689
 
124690
124690
  /**
124691
124691
  * Used to resolve the
124692
124692
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
124693
124693
  * of values.
124694
124694
  */
124695
- var nativeObjectToString$2 = objectProto$h$1.toString;
124695
+ var nativeObjectToString$2 = objectProto$g$1.toString;
124696
124696
 
124697
124697
  /**
124698
124698
  * Converts `value` to a string using `Object.prototype.toString`.
@@ -125158,17 +125158,17 @@ var reIsHostCtor$1 = /^\[object .+?Constructor\]$/;
125158
125158
 
125159
125159
  /** Used for built-in method references. */
125160
125160
  var funcProto$1$1 = Function.prototype,
125161
- objectProto$g$1 = Object.prototype;
125161
+ objectProto$f$1 = Object.prototype;
125162
125162
 
125163
125163
  /** Used to resolve the decompiled source of functions. */
125164
125164
  var funcToString$1$1 = funcProto$1$1.toString;
125165
125165
 
125166
125166
  /** Used to check objects for own properties. */
125167
- var hasOwnProperty$e$1 = objectProto$g$1.hasOwnProperty;
125167
+ var hasOwnProperty$d$1 = objectProto$f$1.hasOwnProperty;
125168
125168
 
125169
125169
  /** Used to detect if a method is native. */
125170
125170
  var reIsNative$1 = RegExp('^' +
125171
- funcToString$1$1.call(hasOwnProperty$e$1).replace(reRegExpChar$1, '\\$&')
125171
+ funcToString$1$1.call(hasOwnProperty$d$1).replace(reRegExpChar$1, '\\$&')
125172
125172
  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
125173
125173
  );
125174
125174
 
@@ -125583,10 +125583,10 @@ function eq$1(value, other) {
125583
125583
  }
125584
125584
 
125585
125585
  /** Used for built-in method references. */
125586
- var objectProto$f$1 = Object.prototype;
125586
+ var objectProto$e$1 = Object.prototype;
125587
125587
 
125588
125588
  /** Used to check objects for own properties. */
125589
- var hasOwnProperty$d$1 = objectProto$f$1.hasOwnProperty;
125589
+ var hasOwnProperty$c$1 = objectProto$e$1.hasOwnProperty;
125590
125590
 
125591
125591
  /**
125592
125592
  * Assigns `value` to `key` of `object` if the existing value is not equivalent
@@ -125600,7 +125600,7 @@ var hasOwnProperty$d$1 = objectProto$f$1.hasOwnProperty;
125600
125600
  */
125601
125601
  function assignValue$1(object, key, value) {
125602
125602
  var objValue = object[key];
125603
- if (!(hasOwnProperty$d$1.call(object, key) && eq$1(objValue, value)) ||
125603
+ if (!(hasOwnProperty$c$1.call(object, key) && eq$1(objValue, value)) ||
125604
125604
  (value === undefined && !(key in object))) {
125605
125605
  baseAssignValue$1(object, key, value);
125606
125606
  }
@@ -125806,7 +125806,7 @@ function createAssigner$1(assigner) {
125806
125806
  }
125807
125807
 
125808
125808
  /** Used for built-in method references. */
125809
- var objectProto$e$1 = Object.prototype;
125809
+ var objectProto$d$1 = Object.prototype;
125810
125810
 
125811
125811
  /**
125812
125812
  * Checks if `value` is likely a prototype object.
@@ -125817,7 +125817,7 @@ var objectProto$e$1 = Object.prototype;
125817
125817
  */
125818
125818
  function isPrototype$1(value) {
125819
125819
  var Ctor = value && value.constructor,
125820
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$e$1;
125820
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$d$1;
125821
125821
 
125822
125822
  return value === proto;
125823
125823
  }
@@ -125856,13 +125856,13 @@ function baseIsArguments$1(value) {
125856
125856
  }
125857
125857
 
125858
125858
  /** Used for built-in method references. */
125859
- var objectProto$d$1 = Object.prototype;
125859
+ var objectProto$c$1 = Object.prototype;
125860
125860
 
125861
125861
  /** Used to check objects for own properties. */
125862
- var hasOwnProperty$c$1 = objectProto$d$1.hasOwnProperty;
125862
+ var hasOwnProperty$b$1 = objectProto$c$1.hasOwnProperty;
125863
125863
 
125864
125864
  /** Built-in value references. */
125865
- var propertyIsEnumerable$1$1 = objectProto$d$1.propertyIsEnumerable;
125865
+ var propertyIsEnumerable$1$1 = objectProto$c$1.propertyIsEnumerable;
125866
125866
 
125867
125867
  /**
125868
125868
  * Checks if `value` is likely an `arguments` object.
@@ -125883,7 +125883,7 @@ var propertyIsEnumerable$1$1 = objectProto$d$1.propertyIsEnumerable;
125883
125883
  * // => false
125884
125884
  */
125885
125885
  var isArguments$1 = baseIsArguments$1(function() { return arguments; }()) ? baseIsArguments$1 : function(value) {
125886
- return isObjectLike$1(value) && hasOwnProperty$c$1.call(value, 'callee') &&
125886
+ return isObjectLike$1(value) && hasOwnProperty$b$1.call(value, 'callee') &&
125887
125887
  !propertyIsEnumerable$1$1.call(value, 'callee');
125888
125888
  };
125889
125889
 
@@ -126056,10 +126056,10 @@ var nodeIsTypedArray$1 = nodeUtil$1 && nodeUtil$1.isTypedArray;
126056
126056
  var isTypedArray$1 = nodeIsTypedArray$1 ? baseUnary$1(nodeIsTypedArray$1) : baseIsTypedArray$1;
126057
126057
 
126058
126058
  /** Used for built-in method references. */
126059
- var objectProto$c$1 = Object.prototype;
126059
+ var objectProto$b$1 = Object.prototype;
126060
126060
 
126061
126061
  /** Used to check objects for own properties. */
126062
- var hasOwnProperty$b$1 = objectProto$c$1.hasOwnProperty;
126062
+ var hasOwnProperty$a$1 = objectProto$b$1.hasOwnProperty;
126063
126063
 
126064
126064
  /**
126065
126065
  * Creates an array of the enumerable property names of the array-like `value`.
@@ -126079,7 +126079,7 @@ function arrayLikeKeys$1(value, inherited) {
126079
126079
  length = result.length;
126080
126080
 
126081
126081
  for (var key in value) {
126082
- if ((inherited || hasOwnProperty$b$1.call(value, key)) &&
126082
+ if ((inherited || hasOwnProperty$a$1.call(value, key)) &&
126083
126083
  !(skipIndexes && (
126084
126084
  // Safari 9 has enumerable `arguments.length` in strict mode.
126085
126085
  key == 'length' ||
@@ -126114,10 +126114,10 @@ function overArg$1(func, transform) {
126114
126114
  var nativeKeys$1 = overArg$1(Object.keys, Object);
126115
126115
 
126116
126116
  /** Used for built-in method references. */
126117
- var objectProto$b$1 = Object.prototype;
126117
+ var objectProto$a$1 = Object.prototype;
126118
126118
 
126119
126119
  /** Used to check objects for own properties. */
126120
- var hasOwnProperty$a$1 = objectProto$b$1.hasOwnProperty;
126120
+ var hasOwnProperty$9$1 = objectProto$a$1.hasOwnProperty;
126121
126121
 
126122
126122
  /**
126123
126123
  * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
@@ -126132,7 +126132,7 @@ function baseKeys$1(object) {
126132
126132
  }
126133
126133
  var result = [];
126134
126134
  for (var key in Object(object)) {
126135
- if (hasOwnProperty$a$1.call(object, key) && key != 'constructor') {
126135
+ if (hasOwnProperty$9$1.call(object, key) && key != 'constructor') {
126136
126136
  result.push(key);
126137
126137
  }
126138
126138
  }
@@ -126172,10 +126172,10 @@ function keys$1(object) {
126172
126172
  }
126173
126173
 
126174
126174
  /** Used for built-in method references. */
126175
- var objectProto$a$1 = Object.prototype;
126175
+ var objectProto$9$1 = Object.prototype;
126176
126176
 
126177
126177
  /** Used to check objects for own properties. */
126178
- var hasOwnProperty$9$1 = objectProto$a$1.hasOwnProperty;
126178
+ var hasOwnProperty$8$1 = objectProto$9$1.hasOwnProperty;
126179
126179
 
126180
126180
  /**
126181
126181
  * Assigns own enumerable string keyed properties of source objects to the
@@ -126215,7 +126215,7 @@ var assign$1 = createAssigner$1(function(object, source) {
126215
126215
  return;
126216
126216
  }
126217
126217
  for (var key in source) {
126218
- if (hasOwnProperty$9$1.call(source, key)) {
126218
+ if (hasOwnProperty$8$1.call(source, key)) {
126219
126219
  assignValue$1(object, key, source[key]);
126220
126220
  }
126221
126221
  }
@@ -126241,10 +126241,10 @@ function nativeKeysIn$1(object) {
126241
126241
  }
126242
126242
 
126243
126243
  /** Used for built-in method references. */
126244
- var objectProto$9$1 = Object.prototype;
126244
+ var objectProto$8$1 = Object.prototype;
126245
126245
 
126246
126246
  /** Used to check objects for own properties. */
126247
- var hasOwnProperty$8$1 = objectProto$9$1.hasOwnProperty;
126247
+ var hasOwnProperty$7$1 = objectProto$8$1.hasOwnProperty;
126248
126248
 
126249
126249
  /**
126250
126250
  * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
@@ -126261,7 +126261,7 @@ function baseKeysIn$1(object) {
126261
126261
  result = [];
126262
126262
 
126263
126263
  for (var key in object) {
126264
- if (!(key == 'constructor' && (isProto || !hasOwnProperty$8$1.call(object, key)))) {
126264
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty$7$1.call(object, key)))) {
126265
126265
  result.push(key);
126266
126266
  }
126267
126267
  }
@@ -126355,10 +126355,10 @@ function hashDelete$1(key) {
126355
126355
  var HASH_UNDEFINED$2$1 = '__lodash_hash_undefined__';
126356
126356
 
126357
126357
  /** Used for built-in method references. */
126358
- var objectProto$8$1 = Object.prototype;
126358
+ var objectProto$7$1 = Object.prototype;
126359
126359
 
126360
126360
  /** Used to check objects for own properties. */
126361
- var hasOwnProperty$7$1 = objectProto$8$1.hasOwnProperty;
126361
+ var hasOwnProperty$6$1 = objectProto$7$1.hasOwnProperty;
126362
126362
 
126363
126363
  /**
126364
126364
  * Gets the hash value for `key`.
@@ -126375,14 +126375,14 @@ function hashGet$1(key) {
126375
126375
  var result = data[key];
126376
126376
  return result === HASH_UNDEFINED$2$1 ? undefined : result;
126377
126377
  }
126378
- return hasOwnProperty$7$1.call(data, key) ? data[key] : undefined;
126378
+ return hasOwnProperty$6$1.call(data, key) ? data[key] : undefined;
126379
126379
  }
126380
126380
 
126381
126381
  /** Used for built-in method references. */
126382
- var objectProto$7$1 = Object.prototype;
126382
+ var objectProto$6$1 = Object.prototype;
126383
126383
 
126384
126384
  /** Used to check objects for own properties. */
126385
- var hasOwnProperty$6$1 = objectProto$7$1.hasOwnProperty;
126385
+ var hasOwnProperty$5$1 = objectProto$6$1.hasOwnProperty;
126386
126386
 
126387
126387
  /**
126388
126388
  * Checks if a hash value for `key` exists.
@@ -126395,7 +126395,7 @@ var hasOwnProperty$6$1 = objectProto$7$1.hasOwnProperty;
126395
126395
  */
126396
126396
  function hashHas$1(key) {
126397
126397
  var data = this.__data__;
126398
- return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$6$1.call(data, key);
126398
+ return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$5$1.call(data, key);
126399
126399
  }
126400
126400
 
126401
126401
  /** Used to stand-in for `undefined` hash values. */
@@ -127040,13 +127040,13 @@ var objectTag$3$1 = '[object Object]';
127040
127040
 
127041
127041
  /** Used for built-in method references. */
127042
127042
  var funcProto$3 = Function.prototype,
127043
- objectProto$6$1 = Object.prototype;
127043
+ objectProto$5$1 = Object.prototype;
127044
127044
 
127045
127045
  /** Used to resolve the decompiled source of functions. */
127046
127046
  var funcToString$3 = funcProto$3.toString;
127047
127047
 
127048
127048
  /** Used to check objects for own properties. */
127049
- var hasOwnProperty$5$1 = objectProto$6$1.hasOwnProperty;
127049
+ var hasOwnProperty$4$1 = objectProto$5$1.hasOwnProperty;
127050
127050
 
127051
127051
  /** Used to infer the `Object` constructor. */
127052
127052
  var objectCtorString$1 = funcToString$3.call(Object);
@@ -127087,7 +127087,7 @@ function isPlainObject$1(value) {
127087
127087
  if (proto === null) {
127088
127088
  return true;
127089
127089
  }
127090
- var Ctor = hasOwnProperty$5$1.call(proto, 'constructor') && proto.constructor;
127090
+ var Ctor = hasOwnProperty$4$1.call(proto, 'constructor') && proto.constructor;
127091
127091
  return typeof Ctor == 'function' && Ctor instanceof Ctor &&
127092
127092
  funcToString$3.call(Ctor) == objectCtorString$1;
127093
127093
  }
@@ -127892,10 +127892,10 @@ function stubArray$1() {
127892
127892
  }
127893
127893
 
127894
127894
  /** Used for built-in method references. */
127895
- var objectProto$5$1 = Object.prototype;
127895
+ var objectProto$4$1 = Object.prototype;
127896
127896
 
127897
127897
  /** Built-in value references. */
127898
- var propertyIsEnumerable$2 = objectProto$5$1.propertyIsEnumerable;
127898
+ var propertyIsEnumerable$2 = objectProto$4$1.propertyIsEnumerable;
127899
127899
 
127900
127900
  /* Built-in method references for those with the same name as other `lodash` methods. */
127901
127901
  var nativeGetSymbols$1$1 = Object.getOwnPropertySymbols;
@@ -128058,10 +128058,10 @@ if ((DataView$1$1 && getTag$1(new DataView$1$1(new ArrayBuffer(1))) != dataViewT
128058
128058
  }
128059
128059
 
128060
128060
  /** Used for built-in method references. */
128061
- var objectProto$4$1 = Object.prototype;
128061
+ var objectProto$3$1 = Object.prototype;
128062
128062
 
128063
128063
  /** Used to check objects for own properties. */
128064
- var hasOwnProperty$4$1 = objectProto$4$1.hasOwnProperty;
128064
+ var hasOwnProperty$3$1 = objectProto$3$1.hasOwnProperty;
128065
128065
 
128066
128066
  /**
128067
128067
  * Initializes an array clone.
@@ -128075,7 +128075,7 @@ function initCloneArray$1(array) {
128075
128075
  result = new array.constructor(length);
128076
128076
 
128077
128077
  // Add properties assigned by `RegExp#exec`.
128078
- if (length && typeof array[0] == 'string' && hasOwnProperty$4$1.call(array, 'index')) {
128078
+ if (length && typeof array[0] == 'string' && hasOwnProperty$3$1.call(array, 'index')) {
128079
128079
  result.index = array.index;
128080
128080
  result.input = array.input;
128081
128081
  }
@@ -128536,7 +128536,7 @@ function setCacheAdd$1(value) {
128536
128536
  * @name has
128537
128537
  * @memberOf SetCache
128538
128538
  * @param {*} value The value to search for.
128539
- * @returns {boolean} Returns `true` if `value` is found, else `false`.
128539
+ * @returns {number} Returns `true` if `value` is found, else `false`.
128540
128540
  */
128541
128541
  function setCacheHas$1(value) {
128542
128542
  return this.__data__.has(value);
@@ -128819,10 +128819,10 @@ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack)
128819
128819
  var COMPARE_PARTIAL_FLAG$3$1 = 1;
128820
128820
 
128821
128821
  /** Used for built-in method references. */
128822
- var objectProto$3$1 = Object.prototype;
128822
+ var objectProto$2$1 = Object.prototype;
128823
128823
 
128824
128824
  /** Used to check objects for own properties. */
128825
- var hasOwnProperty$3$1 = objectProto$3$1.hasOwnProperty;
128825
+ var hasOwnProperty$2$1 = objectProto$2$1.hasOwnProperty;
128826
128826
 
128827
128827
  /**
128828
128828
  * A specialized version of `baseIsEqualDeep` for objects with support for
@@ -128850,7 +128850,7 @@ function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
128850
128850
  var index = objLength;
128851
128851
  while (index--) {
128852
128852
  var key = objProps[index];
128853
- if (!(isPartial ? key in other : hasOwnProperty$3$1.call(other, key))) {
128853
+ if (!(isPartial ? key in other : hasOwnProperty$2$1.call(other, key))) {
128854
128854
  return false;
128855
128855
  }
128856
128856
  }
@@ -128911,10 +128911,10 @@ var argsTag$4 = '[object Arguments]',
128911
128911
  objectTag$5 = '[object Object]';
128912
128912
 
128913
128913
  /** Used for built-in method references. */
128914
- var objectProto$2$1 = Object.prototype;
128914
+ var objectProto$1$1 = Object.prototype;
128915
128915
 
128916
128916
  /** Used to check objects for own properties. */
128917
- var hasOwnProperty$2$1 = objectProto$2$1.hasOwnProperty;
128917
+ var hasOwnProperty$1$1 = objectProto$1$1.hasOwnProperty;
128918
128918
 
128919
128919
  /**
128920
128920
  * A specialized version of `baseIsEqual` for arrays and objects which performs
@@ -128957,8 +128957,8 @@ function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack)
128957
128957
  : equalByTag$1(object, other, objTag, bitmask, customizer, equalFunc, stack);
128958
128958
  }
128959
128959
  if (!(bitmask & COMPARE_PARTIAL_FLAG$2$1)) {
128960
- var objIsWrapped = objIsObj && hasOwnProperty$2$1.call(object, '__wrapped__'),
128961
- othIsWrapped = othIsObj && hasOwnProperty$2$1.call(other, '__wrapped__');
128960
+ var objIsWrapped = objIsObj && hasOwnProperty$1$1.call(object, '__wrapped__'),
128961
+ othIsWrapped = othIsObj && hasOwnProperty$1$1.call(other, '__wrapped__');
128962
128962
 
128963
128963
  if (objIsWrapped || othIsWrapped) {
128964
128964
  var objUnwrapped = objIsWrapped ? object.value() : object,
@@ -130372,10 +130372,10 @@ var mapTag$7 = '[object Map]',
130372
130372
  setTag$7 = '[object Set]';
130373
130373
 
130374
130374
  /** Used for built-in method references. */
130375
- var objectProto$1$1 = Object.prototype;
130375
+ var objectProto$i = Object.prototype;
130376
130376
 
130377
130377
  /** Used to check objects for own properties. */
130378
- var hasOwnProperty$1$1 = objectProto$1$1.hasOwnProperty;
130378
+ var hasOwnProperty$f = objectProto$i.hasOwnProperty;
130379
130379
 
130380
130380
  /**
130381
130381
  * Checks if `value` is an empty object, collection, map, or set.
@@ -130427,7 +130427,7 @@ function isEmpty$1(value) {
130427
130427
  return !baseKeys$1(value).length;
130428
130428
  }
130429
130429
  for (var key in value) {
130430
- if (hasOwnProperty$1$1.call(value, key)) {
130430
+ if (hasOwnProperty$f.call(value, key)) {
130431
130431
  return false;
130432
130432
  }
130433
130433
  }
@@ -130651,12 +130651,6 @@ var merge$2 = createAssigner$1(function(object, source, srcIndex) {
130651
130651
  baseMerge$1(object, source, srcIndex);
130652
130652
  });
130653
130653
 
130654
- /** Used for built-in method references. */
130655
- var objectProto$j = Object.prototype;
130656
-
130657
- /** Used to check objects for own properties. */
130658
- var hasOwnProperty$g = objectProto$j.hasOwnProperty;
130659
-
130660
130654
  /**
130661
130655
  * The base implementation of `_.unset`.
130662
130656
  *
@@ -130667,34 +130661,8 @@ var hasOwnProperty$g = objectProto$j.hasOwnProperty;
130667
130661
  */
130668
130662
  function baseUnset$1(object, path) {
130669
130663
  path = castPath$1(path, object);
130670
-
130671
- // Prevent prototype pollution:
130672
- // https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
130673
- // https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh
130674
- var index = -1,
130675
- length = path.length;
130676
-
130677
- if (!length) {
130678
- return true;
130679
- }
130680
-
130681
- while (++index < length) {
130682
- var key = toKey$1(path[index]);
130683
-
130684
- // Always block "__proto__" anywhere in the path if it's not expected
130685
- if (key === '__proto__' && !hasOwnProperty$g.call(object, '__proto__')) {
130686
- return false;
130687
- }
130688
-
130689
- // Block constructor/prototype as non-terminal traversal keys to prevent
130690
- // escaping the object graph into built-in constructors and prototypes.
130691
- if ((key === 'constructor' || key === 'prototype') && index < length - 1) {
130692
- return false;
130693
- }
130694
- }
130695
-
130696
- var obj = parent$1$1(object, path);
130697
- return obj == null || delete obj[toKey$1(last$2(path))];
130664
+ object = parent$1$1(object, path);
130665
+ return object == null || delete object[toKey$1(last$2(path))];
130698
130666
  }
130699
130667
 
130700
130668
  /**
@@ -131320,14 +131288,14 @@ function requireDom$1 () {
131320
131288
  ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
131321
131289
  var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
131322
131290
  ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
131323
- ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
131291
+ var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
131324
131292
  ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
131325
131293
  ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
131326
131294
  var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
131327
131295
  ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
131328
131296
  var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
131329
131297
  //level2
131330
- ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
131298
+ var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
131331
131299
  ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
131332
131300
  ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
131333
131301
  ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
@@ -131377,9 +131345,10 @@ function requireDom$1 () {
131377
131345
  item: function(index) {
131378
131346
  return index >= 0 && index < this.length ? this[index] : null;
131379
131347
  },
131380
- toString:function(isHTML,nodeFilter){
131348
+ toString:function(isHTML,nodeFilter,options){
131349
+ var requireWellFormed = !!options && !!options.requireWellFormed;
131381
131350
  for(var buf = [], i = 0;i<this.length;i++){
131382
- serializeToString(this[i],buf,isHTML,nodeFilter);
131351
+ serializeToString(this[i],buf,isHTML,nodeFilter,null,requireWellFormed);
131383
131352
  }
131384
131353
  return buf.join('');
131385
131354
  },
@@ -131624,13 +131593,28 @@ function requireDom$1 () {
131624
131593
  /**
131625
131594
  * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.
131626
131595
  *
131627
- * __This behavior is slightly different from the in the specs__:
131596
+ * __This implementation differs from the specification:__
131628
131597
  * - this implementation is not validating names or qualified names
131629
131598
  * (when parsing XML strings, the SAX parser takes care of that)
131630
131599
  *
131600
+ * Note: `internalSubset` can only be introduced via a direct property write to `node.internalSubset` after creation.
131601
+ * Creation-time validation of `publicId`, `systemId` is not enforced.
131602
+ * The serializer-level check covers all mutation vectors, including direct property writes.
131603
+ * `internalSubset` is only serialized as `[ ... ]` when both `publicId` and `systemId` are
131604
+ * absent (empty or `'.'`) — if either external identifier is present, `internalSubset` is
131605
+ * silently omitted from the serialized output.
131606
+ *
131631
131607
  * @param {string} qualifiedName
131632
131608
  * @param {string} [publicId]
131609
+ * The external subset public identifier. Stored verbatim including surrounding quotes.
131610
+ * When serialized with `requireWellFormed: true` (via the 4th-parameter options object),
131611
+ * throws `DOMException` with code `INVALID_STATE_ERR` if the value is non-empty and does
131612
+ * not match the XML `PubidLiteral` production (W3C DOM Parsing §3.2.1.3; XML 1.0 [12]).
131633
131613
  * @param {string} [systemId]
131614
+ * The external subset system identifier. Stored verbatim including surrounding quotes.
131615
+ * When serialized with `requireWellFormed: true`, throws `DOMException` with code
131616
+ * `INVALID_STATE_ERR` if the value is non-empty and does not match the XML `SystemLiteral`
131617
+ * production (W3C DOM Parsing §3.2.1.3; XML 1.0 [11]).
131634
131618
  * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation
131635
131619
  * or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`
131636
131620
  *
@@ -131696,18 +131680,44 @@ function requireDom$1 () {
131696
131680
  return cloneNode(this.ownerDocument||this,this,deep);
131697
131681
  },
131698
131682
  // Modified in DOM Level 2:
131699
- normalize:function(){
131700
- var child = this.firstChild;
131701
- while(child){
131702
- var next = child.nextSibling;
131703
- if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){
131704
- this.removeChild(next);
131705
- child.appendData(next.data);
131706
- }else {
131707
- child.normalize();
131708
- child = next;
131709
- }
131710
- }
131683
+ /**
131684
+ * Puts the specified node and all of its subtree into a "normalized" form. In a normalized
131685
+ * subtree, no text nodes in the subtree are empty and there are no adjacent text nodes.
131686
+ *
131687
+ * Specifically, this method merges any adjacent text nodes (i.e., nodes for which `nodeType`
131688
+ * is `TEXT_NODE`) into a single node with the combined data. It also removes any empty text
131689
+ * nodes.
131690
+ *
131691
+ * This method iteratively traverses all child nodes to normalize all descendant nodes within
131692
+ * the subtree.
131693
+ *
131694
+ * @throws {DOMException}
131695
+ * May throw a DOMException if operations within removeChild or appendData (which are
131696
+ * potentially invoked in this method) do not meet their specific constraints.
131697
+ * @see {@link Node.removeChild}
131698
+ * @see {@link CharacterData.appendData}
131699
+ * @see ../docs/walk-dom.md.
131700
+ */
131701
+ normalize: function () {
131702
+ walkDOM(this, null, {
131703
+ enter: function (node) {
131704
+ // Merge adjacent text children of node before walkDOM schedules them.
131705
+ // walkDOM reads lastChild/previousSibling after enter returns, so the
131706
+ // surviving post-merge children are what it descends into.
131707
+ var child = node.firstChild;
131708
+ while (child) {
131709
+ var next = child.nextSibling;
131710
+ if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) {
131711
+ node.removeChild(next);
131712
+ child.appendData(next.data);
131713
+ // Do not advance child: re-check new nextSibling for another text run
131714
+ } else {
131715
+ child = next;
131716
+ }
131717
+ }
131718
+ return true; // descend into surviving children
131719
+ },
131720
+ });
131711
131721
  },
131712
131722
  // Introduced in DOM Level 2:
131713
131723
  isSupported:function(feature, version){
@@ -131783,21 +131793,103 @@ function requireDom$1 () {
131783
131793
  copy(NodeType,Node.prototype);
131784
131794
 
131785
131795
  /**
131786
- * @param callback return true for continue,false for break
131787
- * @return boolean true: break visit;
131796
+ * @param {Node} node
131797
+ * Root of the subtree to visit.
131798
+ * @param {function(Node): boolean} callback
131799
+ * Called for each node in depth-first pre-order. Return a truthy value to stop traversal early.
131800
+ * @return {boolean} `true` if traversal was aborted by the callback, `false` otherwise.
131788
131801
  */
131789
- function _visitNode(node,callback){
131790
- if(callback(node)){
131791
- return true;
131792
- }
131793
- if(node = node.firstChild){
131794
- do{
131795
- if(_visitNode(node,callback)){return true}
131796
- }while(node=node.nextSibling)
131797
- }
131802
+ function _visitNode(node, callback) {
131803
+ return walkDOM(node, null, { enter: function (n) { return callback(n) ? walkDOM.STOP : true; } }) === walkDOM.STOP;
131798
131804
  }
131799
131805
 
131806
+ /**
131807
+ * Depth-first pre/post-order DOM tree walker.
131808
+ *
131809
+ * Visits every node in the subtree rooted at `node`. For each node:
131810
+ *
131811
+ * 1. Calls `callbacks.enter(node, context)` before descending into the node's children. The
131812
+ * return value becomes the `context` passed to each child's `enter` call and to the matching
131813
+ * `exit` call.
131814
+ * 2. If `enter` returns `null` or `undefined`, the node's children are skipped;
131815
+ * sibling traversal continues normally.
131816
+ * 3. If `enter` returns `walkDOM.STOP`, the entire traversal is aborted immediately — no
131817
+ * further `enter` or `exit` calls are made.
131818
+ * 4. `lastChild` and `previousSibling` are read **after** `enter` returns, so `enter` may
131819
+ * safely modify the node's own child list before the walker descends. Modifying siblings of
131820
+ * the current node or any other part of the tree produces unpredictable results: nodes already
131821
+ * queued on the stack are visited regardless of DOM changes, and newly inserted nodes outside
131822
+ * the current child list are never visited.
131823
+ * 5. Calls `callbacks.exit(node, context)` (if provided) after all of a node's children have
131824
+ * been visited, passing the same `context` that `enter`
131825
+ * returned for that node.
131826
+ *
131827
+ * This implementation uses an explicit stack and does not recurse — it is safe on arbitrarily
131828
+ * deep trees.
131829
+ *
131830
+ * @param {Node} node
131831
+ * Root of the subtree to walk.
131832
+ * @param {*} context
131833
+ * Initial context value passed to the root node's `enter`.
131834
+ * @param {{ enter: function(Node, *): *, exit?: function(Node, *): void }} callbacks
131835
+ * @returns {void | walkDOM.STOP}
131836
+ * @see ../docs/walk-dom.md.
131837
+ */
131838
+ function walkDOM(node, context, callbacks) {
131839
+ // Each stack frame is {node, context, phase}:
131840
+ // walkDOM.ENTER — call enter, then push children
131841
+ // walkDOM.EXIT — call exit
131842
+ var stack = [{ node: node, context: context, phase: walkDOM.ENTER }];
131843
+ while (stack.length > 0) {
131844
+ var frame = stack.pop();
131845
+ if (frame.phase === walkDOM.ENTER) {
131846
+ var childContext = callbacks.enter(frame.node, frame.context);
131847
+ if (childContext === walkDOM.STOP) {
131848
+ return walkDOM.STOP;
131849
+ }
131850
+ // Push exit frame before children so it fires after all children are processed (Last In First Out)
131851
+ stack.push({ node: frame.node, context: childContext, phase: walkDOM.EXIT });
131852
+ if (childContext === null || childContext === undefined) {
131853
+ continue; // skip children
131854
+ }
131855
+ // lastChild is read after enter returns, so enter may modify the child list.
131856
+ var child = frame.node.lastChild;
131857
+ // Traverse from lastChild backwards so that pushing onto the stack
131858
+ // naturally yields firstChild on top (processed first).
131859
+ while (child) {
131860
+ stack.push({ node: child, context: childContext, phase: walkDOM.ENTER });
131861
+ child = child.previousSibling;
131862
+ }
131863
+ } else {
131864
+ // frame.phase === walkDOM.EXIT
131865
+ if (callbacks.exit) {
131866
+ callbacks.exit(frame.node, frame.context);
131867
+ }
131868
+ }
131869
+ }
131870
+ }
131800
131871
 
131872
+ /**
131873
+ * Sentinel value returned from a `walkDOM` `enter` callback to abort the entire traversal
131874
+ * immediately.
131875
+ *
131876
+ * @type {symbol}
131877
+ */
131878
+ walkDOM.STOP = Symbol('walkDOM.STOP');
131879
+ /**
131880
+ * Phase constant for a stack frame that has not yet been visited.
131881
+ * The `enter` callback is called and children are scheduled.
131882
+ *
131883
+ * @type {number}
131884
+ */
131885
+ walkDOM.ENTER = 0;
131886
+ /**
131887
+ * Phase constant for a stack frame whose subtree has been fully visited.
131888
+ * The `exit` callback is called.
131889
+ *
131890
+ * @type {number}
131891
+ */
131892
+ walkDOM.EXIT = 1;
131801
131893
 
131802
131894
  function Document(){
131803
131895
  this.ownerDocument = this;
@@ -132401,12 +132493,44 @@ function requireDom$1 () {
132401
132493
  node.appendData(data);
132402
132494
  return node;
132403
132495
  },
132496
+ /**
132497
+ * Returns a new CDATASection node whose data is `data`.
132498
+ *
132499
+ * __This implementation differs from the specification:__
132500
+ * - calling this method on an HTML document does not throw `NotSupportedError`.
132501
+ *
132502
+ * @param {string} data
132503
+ * @returns {CDATASection}
132504
+ * @throws DOMException with code `INVALID_CHARACTER_ERR` if `data` contains `"]]>"`.
132505
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createCDATASection
132506
+ * @see https://dom.spec.whatwg.org/#dom-document-createcdatasection
132507
+ */
132404
132508
  createCDATASection : function(data){
132509
+ if (data.indexOf(']]>') !== -1) {
132510
+ throw new DOMException(INVALID_CHARACTER_ERR, 'data contains "]]>"');
132511
+ }
132405
132512
  var node = new CDATASection();
132406
132513
  node.ownerDocument = this;
132407
132514
  node.appendData(data);
132408
132515
  return node;
132409
132516
  },
132517
+ /**
132518
+ * Returns a ProcessingInstruction node whose target is target and data is data.
132519
+ *
132520
+ * __This implementation differs from the specification:__
132521
+ * - it does not do any input validation on the arguments and doesn't throw "InvalidCharacterError".
132522
+ *
132523
+ * Note: When the resulting document is serialized with `requireWellFormed: true`, the
132524
+ * serializer throws with code `INVALID_STATE_ERR` if `.data` contains `?>` (W3C DOM Parsing
132525
+ * §3.2.1.7). Without that option the data is emitted verbatim.
132526
+ *
132527
+ * @param {string} target
132528
+ * @param {string} data
132529
+ * @returns {ProcessingInstruction}
132530
+ * @see https://developer.mozilla.org/docs/Web/API/Document/createProcessingInstruction
132531
+ * @see https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction
132532
+ * @see https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml §3.2.1.7
132533
+ */
132410
132534
  createProcessingInstruction : function(target,data){
132411
132535
  var node = new ProcessingInstruction();
132412
132536
  node.ownerDocument = this;
@@ -132632,6 +132756,19 @@ function requireDom$1 () {
132632
132756
  _extends(CDATASection,CharacterData);
132633
132757
 
132634
132758
 
132759
+ /**
132760
+ * Represents a DocumentType node (the `<!DOCTYPE ...>` declaration).
132761
+ *
132762
+ * `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
132763
+ * xmldom does not enforce the `readonly` constraint declared by the WHATWG DOM spec —
132764
+ * direct property writes succeed silently. Values are serialized verbatim when
132765
+ * `requireWellFormed` is false (the default). When the serializer is invoked with
132766
+ * `requireWellFormed: true` (via the 4th-parameter options object), it validates each
132767
+ * field and throws `DOMException` with code `INVALID_STATE_ERR` on invalid values.
132768
+ *
132769
+ * @class
132770
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/DocumentType MDN
132771
+ */
132635
132772
  function DocumentType() {
132636
132773
  } DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
132637
132774
  _extends(DocumentType,Node);
@@ -132659,11 +132796,48 @@ function requireDom$1 () {
132659
132796
  ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
132660
132797
  _extends(ProcessingInstruction,Node);
132661
132798
  function XMLSerializer(){}
132662
- XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){
132663
- return nodeSerializeToString.call(node,isHtml,nodeFilter);
132799
+ /**
132800
+ * Returns the result of serializing `node` to XML.
132801
+ *
132802
+ * When `options.requireWellFormed` is `true`, the serializer throws for content that would
132803
+ * produce ill-formed XML.
132804
+ *
132805
+ * __This implementation differs from the specification:__
132806
+ * - CDATASection nodes whose data contains `]]>` are serialized by splitting the section
132807
+ * at each `]]>` occurrence (following W3C DOM Level 3 Core `split-cdata-sections`
132808
+ * default behaviour) unless `requireWellFormed` is `true`.
132809
+ * - when `requireWellFormed` is `true`, `DOMException` with code `INVALID_STATE_ERR`
132810
+ * is only thrown to prevent injection vectors, not for all the spec mandated checks.
132811
+ *
132812
+ * @param {Node} node
132813
+ * @param {boolean} [isHtml]
132814
+ * @param {function} [nodeFilter]
132815
+ * @param {Object} [options]
132816
+ * @param {boolean} [options.requireWellFormed=false]
132817
+ * When `true`, throws for content that would produce ill-formed XML.
132818
+ * @returns {string}
132819
+ * @throws {DOMException}
132820
+ * With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
132821
+ * - a CDATASection node's data contains `"]]>"`,
132822
+ * - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
132823
+ * - a ProcessingInstruction's data contains `"?>"`,
132824
+ * - a DocumentType's `publicId` is non-empty and does not match the XML `PubidLiteral`
132825
+ * production,
132826
+ * - a DocumentType's `systemId` is non-empty and does not match the XML `SystemLiteral`
132827
+ * production, or
132828
+ * - a DocumentType's `internalSubset` contains `"]>"`.
132829
+ * Note: xmldom does not enforce `readonly` on DocumentType fields — direct property
132830
+ * writes succeed and are covered by the serializer-level checks above.
132831
+ * @see https://html.spec.whatwg.org/#dom-xmlserializer-serializetostring
132832
+ * @see https://w3c.github.io/DOM-Parsing/#xml-serialization
132833
+ * @see https://github.com/w3c/DOM-Parsing/issues/84
132834
+ */
132835
+ XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter,options){
132836
+ return nodeSerializeToString.call(node,isHtml,nodeFilter,options);
132664
132837
  };
132665
132838
  Node.prototype.toString = nodeSerializeToString;
132666
- function nodeSerializeToString(isHtml,nodeFilter){
132839
+ function nodeSerializeToString(isHtml,nodeFilter,options){
132840
+ var requireWellFormed = !!options && !!options.requireWellFormed;
132667
132841
  var buf = [];
132668
132842
  var refNode = this.nodeType == 9 && this.documentElement || this;
132669
132843
  var prefix = refNode.prefix;
@@ -132680,7 +132854,7 @@ function requireDom$1 () {
132680
132854
  ];
132681
132855
  }
132682
132856
  }
132683
- serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);
132857
+ serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces,requireWellFormed);
132684
132858
  //console.log('###',this.nodeType,uri,prefix,buf.join(''))
132685
132859
  return buf.join('');
132686
132860
  }
@@ -132729,271 +132903,323 @@ function requireDom$1 () {
132729
132903
  buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
132730
132904
  }
132731
132905
 
132732
- function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
132906
+ function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces, requireWellFormed) {
132733
132907
  if (!visibleNamespaces) {
132734
132908
  visibleNamespaces = [];
132735
132909
  }
132736
-
132737
- if(nodeFilter){
132738
- node = nodeFilter(node);
132739
- if(node){
132740
- if(typeof node == 'string'){
132741
- buf.push(node);
132742
- return;
132743
- }
132744
- }else {
132745
- return;
132746
- }
132747
- //buf.sort.apply(attrs, attributeSorter);
132748
- }
132749
-
132750
- switch(node.nodeType){
132751
- case ELEMENT_NODE:
132752
- var attrs = node.attributes;
132753
- var len = attrs.length;
132754
- var child = node.firstChild;
132755
- var nodeName = node.tagName;
132756
-
132757
- isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML;
132758
-
132759
- var prefixedNodeName = nodeName;
132760
- if (!isHTML && !node.prefix && node.namespaceURI) {
132761
- var defaultNS;
132762
- // lookup current default ns from `xmlns` attribute
132763
- for (var ai = 0; ai < attrs.length; ai++) {
132764
- if (attrs.item(ai).name === 'xmlns') {
132765
- defaultNS = attrs.item(ai).value;
132766
- break
132767
- }
132768
- }
132769
- if (!defaultNS) {
132770
- // lookup current default ns in visibleNamespaces
132771
- for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
132772
- var namespace = visibleNamespaces[nsi];
132773
- if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {
132774
- defaultNS = namespace.namespace;
132775
- break
132910
+ walkDOM(node, { ns: visibleNamespaces, isHTML: isHTML }, {
132911
+ enter: function (n, ctx) {
132912
+ var ns = ctx.ns;
132913
+ var html = ctx.isHTML;
132914
+
132915
+ if (nodeFilter) {
132916
+ n = nodeFilter(n);
132917
+ if (n) {
132918
+ if (typeof n == 'string') {
132919
+ buf.push(n);
132920
+ return null;
132776
132921
  }
132922
+ } else {
132923
+ return null;
132777
132924
  }
132778
132925
  }
132779
- if (defaultNS !== node.namespaceURI) {
132780
- for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
132781
- var namespace = visibleNamespaces[nsi];
132782
- if (namespace.namespace === node.namespaceURI) {
132783
- if (namespace.prefix) {
132784
- prefixedNodeName = namespace.prefix + ':' + nodeName;
132926
+
132927
+ switch (n.nodeType) {
132928
+ case ELEMENT_NODE:
132929
+ var attrs = n.attributes;
132930
+ var len = attrs.length;
132931
+ var nodeName = n.tagName;
132932
+
132933
+ html = NAMESPACE.isHTML(n.namespaceURI) || html;
132934
+
132935
+ var prefixedNodeName = nodeName;
132936
+ if (!html && !n.prefix && n.namespaceURI) {
132937
+ var defaultNS;
132938
+ // lookup current default ns from `xmlns` attribute
132939
+ for (var ai = 0; ai < attrs.length; ai++) {
132940
+ if (attrs.item(ai).name === 'xmlns') {
132941
+ defaultNS = attrs.item(ai).value;
132942
+ break;
132943
+ }
132944
+ }
132945
+ if (!defaultNS) {
132946
+ // lookup current default ns in visibleNamespaces
132947
+ for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
132948
+ var nsEntry = ns[nsi];
132949
+ if (nsEntry.prefix === '' && nsEntry.namespace === n.namespaceURI) {
132950
+ defaultNS = nsEntry.namespace;
132951
+ break;
132952
+ }
132953
+ }
132954
+ }
132955
+ if (defaultNS !== n.namespaceURI) {
132956
+ for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
132957
+ var nsEntry = ns[nsi];
132958
+ if (nsEntry.namespace === n.namespaceURI) {
132959
+ if (nsEntry.prefix) {
132960
+ prefixedNodeName = nsEntry.prefix + ':' + nodeName;
132961
+ }
132962
+ break;
132963
+ }
132964
+ }
132785
132965
  }
132786
- break
132787
132966
  }
132788
- }
132789
- }
132790
- }
132791
132967
 
132792
- buf.push('<', prefixedNodeName);
132968
+ buf.push('<', prefixedNodeName);
132969
+
132970
+ // Build a fresh namespace snapshot for this element's children.
132971
+ // The slice prevents sibling elements from inheriting each other's declarations.
132972
+ var childNs = ns.slice();
132973
+ for (var i = 0; i < len; i++) {
132974
+ var attr = attrs.item(i);
132975
+ if (attr.prefix == 'xmlns') {
132976
+ childNs.push({ prefix: attr.localName, namespace: attr.value });
132977
+ } else if (attr.nodeName == 'xmlns') {
132978
+ childNs.push({ prefix: '', namespace: attr.value });
132979
+ }
132980
+ }
132793
132981
 
132794
- for(var i=0;i<len;i++){
132795
- // add namespaces for attributes
132796
- var attr = attrs.item(i);
132797
- if (attr.prefix == 'xmlns') {
132798
- visibleNamespaces.push({ prefix: attr.localName, namespace: attr.value });
132799
- }else if(attr.nodeName == 'xmlns'){
132800
- visibleNamespaces.push({ prefix: '', namespace: attr.value });
132801
- }
132802
- }
132982
+ for (var i = 0; i < len; i++) {
132983
+ var attr = attrs.item(i);
132984
+ if (needNamespaceDefine(attr, html, childNs)) {
132985
+ var attrPrefix = attr.prefix || '';
132986
+ var uri = attr.namespaceURI;
132987
+ addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
132988
+ childNs.push({ prefix: attrPrefix, namespace: uri });
132989
+ }
132990
+ // Apply nodeFilter and serialize the attribute.
132991
+ var filteredAttr = nodeFilter ? nodeFilter(attr) : attr;
132992
+ if (filteredAttr) {
132993
+ if (typeof filteredAttr === 'string') {
132994
+ buf.push(filteredAttr);
132995
+ } else {
132996
+ addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
132997
+ }
132998
+ }
132999
+ }
132803
133000
 
132804
- for(var i=0;i<len;i++){
132805
- var attr = attrs.item(i);
132806
- if (needNamespaceDefine(attr,isHTML, visibleNamespaces)) {
132807
- var prefix = attr.prefix||'';
132808
- var uri = attr.namespaceURI;
132809
- addSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : "xmlns", uri);
132810
- visibleNamespaces.push({ prefix: prefix, namespace:uri });
132811
- }
132812
- serializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);
132813
- }
133001
+ // add namespace for current node
133002
+ if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
133003
+ var nodePrefix = n.prefix || '';
133004
+ var uri = n.namespaceURI;
133005
+ addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
133006
+ childNs.push({ prefix: nodePrefix, namespace: uri });
133007
+ }
132814
133008
 
132815
- // add namespace for current node
132816
- if (nodeName === prefixedNodeName && needNamespaceDefine(node, isHTML, visibleNamespaces)) {
132817
- var prefix = node.prefix||'';
132818
- var uri = node.namespaceURI;
132819
- addSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : "xmlns", uri);
132820
- visibleNamespaces.push({ prefix: prefix, namespace:uri });
132821
- }
133009
+ var child = n.firstChild;
133010
+ if (child || html && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) {
133011
+ buf.push('>');
133012
+ if (html && /^script$/i.test(nodeName)) {
133013
+ // Inline serialization for <script> children; return null to skip walkDOM descent.
133014
+ while (child) {
133015
+ if (child.data) {
133016
+ buf.push(child.data);
133017
+ } else {
133018
+ serializeToString(child, buf, html, nodeFilter, childNs.slice(), requireWellFormed);
133019
+ }
133020
+ child = child.nextSibling;
133021
+ }
133022
+ buf.push('</', nodeName, '>');
133023
+ return null;
133024
+ }
133025
+ // Return child context; walkDOM descends and exit emits the closing tag.
133026
+ return { ns: childNs, isHTML: html, tag: prefixedNodeName };
133027
+ } else {
133028
+ buf.push('/>');
133029
+ return null;
133030
+ }
132822
133031
 
132823
- if(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){
132824
- buf.push('>');
132825
- //if is cdata child node
132826
- if(isHTML && /^script$/i.test(nodeName)){
132827
- while(child){
132828
- if(child.data){
132829
- buf.push(child.data);
132830
- }else {
132831
- serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());
133032
+ case DOCUMENT_NODE:
133033
+ case DOCUMENT_FRAGMENT_NODE:
133034
+ // Descend into children; exit is a no-op (tag is null).
133035
+ return { ns: ns.slice(), isHTML: html, tag: null };
133036
+
133037
+ case ATTRIBUTE_NODE:
133038
+ addSerializedAttribute(buf, n.name, n.value);
133039
+ return null;
133040
+
133041
+ case TEXT_NODE:
133042
+ /**
133043
+ * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
133044
+ * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
133045
+ * If they are needed elsewhere, they must be escaped using either numeric character references or the strings
133046
+ * `&amp;` and `&lt;` respectively.
133047
+ * The right angle bracket (>) may be represented using the string " &gt; ", and must, for compatibility,
133048
+ * be escaped using either `&gt;` or a character reference when it appears in the string `]]>` in content,
133049
+ * when that string is not marking the end of a CDATA section.
133050
+ *
133051
+ * In the content of elements, character data is any string of characters
133052
+ * which does not contain the start-delimiter of any markup
133053
+ * and does not include the CDATA-section-close delimiter, `]]>`.
133054
+ *
133055
+ * @see https://www.w3.org/TR/xml/#NT-CharData
133056
+ * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
133057
+ */
133058
+ buf.push(n.data.replace(/[<&>]/g, _xmlEncoder));
133059
+ return null;
133060
+
133061
+ case CDATA_SECTION_NODE:
133062
+ if (requireWellFormed && n.data.indexOf(']]>') !== -1) {
133063
+ throw new DOMException(INVALID_STATE_ERR, 'The CDATASection data contains "]]>"');
132832
133064
  }
132833
- child = child.nextSibling;
132834
- }
132835
- }else
132836
- {
132837
- while(child){
132838
- serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());
132839
- child = child.nextSibling;
132840
- }
132841
- }
132842
- buf.push('</',prefixedNodeName,'>');
132843
- }else {
132844
- buf.push('/>');
132845
- }
132846
- // remove added visible namespaces
132847
- //visibleNamespaces.length = startVisibleNamespaces;
132848
- return;
132849
- case DOCUMENT_NODE:
132850
- case DOCUMENT_FRAGMENT_NODE:
132851
- var child = node.firstChild;
132852
- while(child){
132853
- serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());
132854
- child = child.nextSibling;
132855
- }
132856
- return;
132857
- case ATTRIBUTE_NODE:
132858
- return addSerializedAttribute(buf, node.name, node.value);
132859
- case TEXT_NODE:
132860
- /**
132861
- * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
132862
- * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
132863
- * If they are needed elsewhere, they must be escaped using either numeric character references or the strings
132864
- * `&amp;` and `&lt;` respectively.
132865
- * The right angle bracket (>) may be represented using the string " &gt; ", and must, for compatibility,
132866
- * be escaped using either `&gt;` or a character reference when it appears in the string `]]>` in content,
132867
- * when that string is not marking the end of a CDATA section.
132868
- *
132869
- * In the content of elements, character data is any string of characters
132870
- * which does not contain the start-delimiter of any markup
132871
- * and does not include the CDATA-section-close delimiter, `]]>`.
132872
- *
132873
- * @see https://www.w3.org/TR/xml/#NT-CharData
132874
- * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
132875
- */
132876
- return buf.push(node.data
132877
- .replace(/[<&>]/g,_xmlEncoder)
132878
- );
132879
- case CDATA_SECTION_NODE:
132880
- return buf.push( '<![CDATA[',node.data,']]>');
132881
- case COMMENT_NODE:
132882
- return buf.push( "<!--",node.data,"-->");
132883
- case DOCUMENT_TYPE_NODE:
132884
- var pubid = node.publicId;
132885
- var sysid = node.systemId;
132886
- buf.push('<!DOCTYPE ',node.name);
132887
- if(pubid){
132888
- buf.push(' PUBLIC ', pubid);
132889
- if (sysid && sysid!='.') {
132890
- buf.push(' ', sysid);
133065
+ buf.push('<![CDATA[', n.data.replace(/]]>/g, ']]]]><![CDATA[>'), ']]>');
133066
+ return null;
133067
+
133068
+ case COMMENT_NODE:
133069
+ if (requireWellFormed && n.data.indexOf('-->') !== -1) {
133070
+ throw new DOMException(INVALID_STATE_ERR, 'The comment node data contains "-->"');
133071
+ }
133072
+ buf.push('<!--', n.data, '-->');
133073
+ return null;
133074
+
133075
+ case DOCUMENT_TYPE_NODE:
133076
+ if (requireWellFormed) {
133077
+ if (n.publicId && !/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(n.publicId)) {
133078
+ throw new DOMException(INVALID_STATE_ERR, 'DocumentType publicId is not a valid PubidLiteral');
133079
+ }
133080
+ if (n.systemId && !/^("[^"]*"|'[^']*')$/.test(n.systemId)) {
133081
+ throw new DOMException(INVALID_STATE_ERR, 'DocumentType systemId is not a valid SystemLiteral');
133082
+ }
133083
+ if (n.internalSubset && n.internalSubset.indexOf(']>') !== -1) {
133084
+ throw new DOMException(INVALID_STATE_ERR, 'DocumentType internalSubset contains "]>"');
133085
+ }
133086
+ }
133087
+ var pubid = n.publicId;
133088
+ var sysid = n.systemId;
133089
+ buf.push('<!DOCTYPE ', n.name);
133090
+ if (pubid) {
133091
+ buf.push(' PUBLIC ', pubid);
133092
+ if (sysid && sysid != '.') {
133093
+ buf.push(' ', sysid);
133094
+ }
133095
+ buf.push('>');
133096
+ } else if (sysid && sysid != '.') {
133097
+ buf.push(' SYSTEM ', sysid, '>');
133098
+ } else {
133099
+ var sub = n.internalSubset;
133100
+ if (sub) {
133101
+ buf.push(' [', sub, ']');
133102
+ }
133103
+ buf.push('>');
133104
+ }
133105
+ return null;
133106
+
133107
+ case PROCESSING_INSTRUCTION_NODE:
133108
+ if (requireWellFormed && n.data.indexOf('?>') !== -1) {
133109
+ throw new DOMException(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"');
133110
+ }
133111
+ buf.push('<?', n.target, ' ', n.data, '?>');
133112
+ return null;
133113
+
133114
+ case ENTITY_REFERENCE_NODE:
133115
+ buf.push('&', n.nodeName, ';');
133116
+ return null;
133117
+
133118
+ //case ENTITY_NODE:
133119
+ //case NOTATION_NODE:
133120
+ default:
133121
+ buf.push('??', n.nodeName);
133122
+ return null;
132891
133123
  }
132892
- buf.push('>');
132893
- }else if(sysid && sysid!='.'){
132894
- buf.push(' SYSTEM ', sysid, '>');
132895
- }else {
132896
- var sub = node.internalSubset;
132897
- if(sub){
132898
- buf.push(" [",sub,"]");
133124
+ },
133125
+ exit: function (n, childCtx) {
133126
+ if (childCtx && childCtx.tag) {
133127
+ buf.push('</', childCtx.tag, '>');
132899
133128
  }
132900
- buf.push(">");
132901
- }
132902
- return;
132903
- case PROCESSING_INSTRUCTION_NODE:
132904
- return buf.push( "<?",node.target," ",node.data,"?>");
132905
- case ENTITY_REFERENCE_NODE:
132906
- return buf.push( '&',node.nodeName,';');
132907
- //case ENTITY_NODE:
132908
- //case NOTATION_NODE:
132909
- default:
132910
- buf.push('??',node.nodeName);
132911
- }
133129
+ },
133130
+ });
132912
133131
  }
132913
- function importNode(doc,node,deep){
132914
- var node2;
132915
- switch (node.nodeType) {
132916
- case ELEMENT_NODE:
132917
- node2 = node.cloneNode(false);
132918
- node2.ownerDocument = doc;
132919
- //var attrs = node2.attributes;
132920
- //var len = attrs.length;
132921
- //for(var i=0;i<len;i++){
132922
- //node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));
132923
- //}
132924
- case DOCUMENT_FRAGMENT_NODE:
132925
- break;
132926
- case ATTRIBUTE_NODE:
132927
- deep = true;
132928
- break;
132929
- //case ENTITY_REFERENCE_NODE:
132930
- //case PROCESSING_INSTRUCTION_NODE:
132931
- ////case TEXT_NODE:
132932
- //case CDATA_SECTION_NODE:
132933
- //case COMMENT_NODE:
132934
- // deep = false;
132935
- // break;
132936
- //case DOCUMENT_NODE:
132937
- //case DOCUMENT_TYPE_NODE:
132938
- //cannot be imported.
132939
- //case ENTITY_NODE:
132940
- //case NOTATION_NODE:
132941
- //can not hit in level3
132942
- //default:throw e;
132943
- }
132944
- if(!node2){
132945
- node2 = node.cloneNode(false);//false
132946
- }
132947
- node2.ownerDocument = doc;
132948
- node2.parentNode = null;
132949
- if(deep){
132950
- var child = node.firstChild;
132951
- while(child){
132952
- node2.appendChild(importNode(doc,child,deep));
132953
- child = child.nextSibling;
132954
- }
132955
- }
132956
- return node2;
133132
+ /**
133133
+ * Imports a node from a different document into `doc`, creating a new copy.
133134
+ * Delegates to {@link walkDOM} for traversal. Each node in the subtree is shallow-cloned,
133135
+ * stamped with `doc` as its `ownerDocument`, and detached (`parentNode` set to `null`).
133136
+ * Children are imported recursively when `deep` is `true`; for {@link Attr} nodes `deep` is
133137
+ * always forced to `true`
133138
+ * because an attribute's value lives in a child text node.
133139
+ *
133140
+ * @param {Document} doc
133141
+ * The document that will own the imported node.
133142
+ * @param {Node} node
133143
+ * The node to import.
133144
+ * @param {boolean} deep
133145
+ * If `true`, descendants are imported recursively.
133146
+ * @returns {Node}
133147
+ * The newly imported node, now owned by `doc`.
133148
+ */
133149
+ function importNode(doc, node, deep) {
133150
+ var destRoot;
133151
+ walkDOM(node, null, {
133152
+ enter: function (srcNode, destParent) {
133153
+ // Shallow-clone the node and stamp it into the target document.
133154
+ var destNode = srcNode.cloneNode(false);
133155
+ destNode.ownerDocument = doc;
133156
+ destNode.parentNode = null;
133157
+ // capture as the root of the imported subtree or attach to parent.
133158
+ if (destParent === null) {
133159
+ destRoot = destNode;
133160
+ } else {
133161
+ destParent.appendChild(destNode);
133162
+ }
133163
+ // ATTRIBUTE_NODE must always be imported deeply: its value lives in a child text node.
133164
+ var shouldDeep = srcNode.nodeType === ATTRIBUTE_NODE || deep;
133165
+ return shouldDeep ? destNode : null;
133166
+ },
133167
+ });
133168
+ return destRoot;
132957
133169
  }
132958
133170
  //
132959
133171
  //var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,
132960
133172
  // attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
132961
- function cloneNode(doc,node,deep){
132962
- var node2 = new node.constructor();
132963
- for (var n in node) {
132964
- if (Object.prototype.hasOwnProperty.call(node, n)) {
132965
- var v = node[n];
132966
- if (typeof v != "object") {
132967
- if (v != node2[n]) {
132968
- node2[n] = v;
133173
+ function cloneNode(doc, node, deep) {
133174
+ var destRoot;
133175
+ walkDOM(node, null, {
133176
+ enter: function (srcNode, destParent) {
133177
+ // 1. Create a blank node of the same type and copy all scalar own properties.
133178
+ var destNode = new srcNode.constructor();
133179
+ for (var n in srcNode) {
133180
+ if (Object.prototype.hasOwnProperty.call(srcNode, n)) {
133181
+ var v = srcNode[n];
133182
+ if (typeof v != 'object') {
133183
+ if (v != destNode[n]) {
133184
+ destNode[n] = v;
133185
+ }
133186
+ }
132969
133187
  }
132970
133188
  }
132971
- }
132972
- }
132973
- if(node.childNodes){
132974
- node2.childNodes = new NodeList();
132975
- }
132976
- node2.ownerDocument = doc;
132977
- switch (node2.nodeType) {
132978
- case ELEMENT_NODE:
132979
- var attrs = node.attributes;
132980
- var attrs2 = node2.attributes = new NamedNodeMap();
132981
- var len = attrs.length;
132982
- attrs2._ownerElement = node2;
132983
- for(var i=0;i<len;i++){
132984
- node2.setAttributeNode(cloneNode(doc,attrs.item(i),true));
132985
- }
132986
- break; case ATTRIBUTE_NODE:
132987
- deep = true;
132988
- }
132989
- if(deep){
132990
- var child = node.firstChild;
132991
- while(child){
132992
- node2.appendChild(cloneNode(doc,child,deep));
132993
- child = child.nextSibling;
132994
- }
132995
- }
132996
- return node2;
133189
+ if (srcNode.childNodes) {
133190
+ destNode.childNodes = new NodeList();
133191
+ }
133192
+ destNode.ownerDocument = doc;
133193
+ // 2. Handle node-type-specific setup.
133194
+ // Attributes are not DOM children, so they are cloned inline here
133195
+ // rather than by walkDOM descent.
133196
+ // ATTRIBUTE_NODE forces deep=true so its own children are walked.
133197
+ var shouldDeep = deep;
133198
+ switch (destNode.nodeType) {
133199
+ case ELEMENT_NODE:
133200
+ var attrs = srcNode.attributes;
133201
+ var attrs2 = (destNode.attributes = new NamedNodeMap());
133202
+ var len = attrs.length;
133203
+ attrs2._ownerElement = destNode;
133204
+ for (var i = 0; i < len; i++) {
133205
+ destNode.setAttributeNode(cloneNode(doc, attrs.item(i), true));
133206
+ }
133207
+ break;
133208
+ case ATTRIBUTE_NODE:
133209
+ shouldDeep = true;
133210
+ }
133211
+ // 3. Attach to parent, or capture as the root of the cloned subtree.
133212
+ if (destParent !== null) {
133213
+ destParent.appendChild(destNode);
133214
+ } else {
133215
+ destRoot = destNode;
133216
+ }
133217
+ // 4. Return destNode as the context for children (causes walkDOM to descend),
133218
+ // or null to skip children (shallow clone).
133219
+ return shouldDeep ? destNode : null;
133220
+ },
133221
+ });
133222
+ return destRoot;
132997
133223
  }
132998
133224
 
132999
133225
  function __set__(object,key,value){
@@ -133009,49 +133235,55 @@ function requireDom$1 () {
133009
133235
  }
133010
133236
  });
133011
133237
 
133012
- Object.defineProperty(Node.prototype,'textContent',{
133013
- get:function(){
133014
- return getTextContent(this);
133238
+ /**
133239
+ * The text content of this node and its descendants.
133240
+ *
133241
+ * Setting `textContent` on an element or document fragment replaces all child nodes with a
133242
+ * single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly.
133243
+ *
133244
+ * @type {string | null}
133245
+ * @see {@link https://dom.spec.whatwg.org/#dom-node-textcontent}
133246
+ */
133247
+ Object.defineProperty(Node.prototype, 'textContent', {
133248
+ get: function () {
133249
+ if (this.nodeType === ELEMENT_NODE || this.nodeType === DOCUMENT_FRAGMENT_NODE) {
133250
+ var buf = [];
133251
+ walkDOM(this, null, {
133252
+ enter: function (n) {
133253
+ if (n.nodeType === ELEMENT_NODE || n.nodeType === DOCUMENT_FRAGMENT_NODE) {
133254
+ return true; // enter children
133255
+ }
133256
+ if (n.nodeType === PROCESSING_INSTRUCTION_NODE || n.nodeType === COMMENT_NODE) {
133257
+ return null; // excluded from text content
133258
+ }
133259
+ buf.push(n.nodeValue);
133260
+ },
133261
+ });
133262
+ return buf.join('');
133263
+ }
133264
+ return this.nodeValue;
133015
133265
  },
133016
133266
 
133017
- set:function(data){
133018
- switch(this.nodeType){
133019
- case ELEMENT_NODE:
133020
- case DOCUMENT_FRAGMENT_NODE:
133021
- while(this.firstChild){
133022
- this.removeChild(this.firstChild);
133023
- }
133024
- if(data || String(data)){
133025
- this.appendChild(this.ownerDocument.createTextNode(data));
133026
- }
133027
- break;
133267
+ set: function (data) {
133268
+ switch (this.nodeType) {
133269
+ case ELEMENT_NODE:
133270
+ case DOCUMENT_FRAGMENT_NODE:
133271
+ while (this.firstChild) {
133272
+ this.removeChild(this.firstChild);
133273
+ }
133274
+ if (data || String(data)) {
133275
+ this.appendChild(this.ownerDocument.createTextNode(data));
133276
+ }
133277
+ break;
133028
133278
 
133029
- default:
133030
- this.data = data;
133031
- this.value = data;
133032
- this.nodeValue = data;
133279
+ default:
133280
+ this.data = data;
133281
+ this.value = data;
133282
+ this.nodeValue = data;
133033
133283
  }
133034
- }
133284
+ },
133035
133285
  });
133036
133286
 
133037
- function getTextContent(node){
133038
- switch(node.nodeType){
133039
- case ELEMENT_NODE:
133040
- case DOCUMENT_FRAGMENT_NODE:
133041
- var buf = [];
133042
- node = node.firstChild;
133043
- while(node){
133044
- if(node.nodeType!==7 && node.nodeType !==8){
133045
- buf.push(getTextContent(node));
133046
- }
133047
- node = node.nextSibling;
133048
- }
133049
- return buf.join('');
133050
- default:
133051
- return node.nodeValue;
133052
- }
133053
- }
133054
-
133055
133287
  __set__ = function(object,key,value){
133056
133288
  //console.log(value)
133057
133289
  object['$$'+key] = value;
@@ -133067,6 +133299,7 @@ function requireDom$1 () {
133067
133299
  dom$1.Element = Element;
133068
133300
  dom$1.Node = Node;
133069
133301
  dom$1.NodeList = NodeList;
133302
+ dom$1.walkDOM = walkDOM;
133070
133303
  dom$1.XMLSerializer = XMLSerializer;
133071
133304
  //}
133072
133305
  return dom$1;
@@ -135857,7 +136090,7 @@ function requireSax$1 () {
135857
136090
  function parseInstruction(source,start,domBuilder){
135858
136091
  var end = source.indexOf('?>',start);
135859
136092
  if(end){
135860
- var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
136093
+ var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)$/);
135861
136094
  if(match){
135862
136095
  match[0].length;
135863
136096
  domBuilder.processingInstruction(match[1], match[2]) ;
@@ -142744,7 +142977,7 @@ function requireMomentTimezone$1 () {
142744
142977
  hasRequiredMomentTimezone$1 = 1;
142745
142978
  (function (module) {
142746
142979
  //! moment-timezone.js
142747
- //! version : 0.6.0
142980
+ //! version : 0.6.2
142748
142981
  //! Copyright (c) JS Foundation and other contributors
142749
142982
  //! license : MIT
142750
142983
  //! github.com/moment/moment-timezone
@@ -142770,7 +143003,7 @@ function requireMomentTimezone$1 () {
142770
143003
  // return moment;
142771
143004
  // }
142772
143005
 
142773
- var VERSION = "0.6.0",
143006
+ var VERSION = "0.6.2",
142774
143007
  zones = {},
142775
143008
  links = {},
142776
143009
  countries = {},
@@ -181367,17 +181600,17 @@ var root = freeGlobal || freeSelf || Function('return this')();
181367
181600
  var Symbol$1 = root.Symbol;
181368
181601
 
181369
181602
  /** Used for built-in method references. */
181370
- var objectProto$i = Object.prototype;
181603
+ var objectProto$h = Object.prototype;
181371
181604
 
181372
181605
  /** Used to check objects for own properties. */
181373
- var hasOwnProperty$f = objectProto$i.hasOwnProperty;
181606
+ var hasOwnProperty$e = objectProto$h.hasOwnProperty;
181374
181607
 
181375
181608
  /**
181376
181609
  * Used to resolve the
181377
181610
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
181378
181611
  * of values.
181379
181612
  */
181380
- var nativeObjectToString$1 = objectProto$i.toString;
181613
+ var nativeObjectToString$1 = objectProto$h.toString;
181381
181614
 
181382
181615
  /** Built-in value references. */
181383
181616
  var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
@@ -181390,7 +181623,7 @@ var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
181390
181623
  * @returns {string} Returns the raw `toStringTag`.
181391
181624
  */
181392
181625
  function getRawTag(value) {
181393
- var isOwn = hasOwnProperty$f.call(value, symToStringTag$1),
181626
+ var isOwn = hasOwnProperty$e.call(value, symToStringTag$1),
181394
181627
  tag = value[symToStringTag$1];
181395
181628
 
181396
181629
  try {
@@ -181410,14 +181643,14 @@ function getRawTag(value) {
181410
181643
  }
181411
181644
 
181412
181645
  /** Used for built-in method references. */
181413
- var objectProto$h = Object.prototype;
181646
+ var objectProto$g = Object.prototype;
181414
181647
 
181415
181648
  /**
181416
181649
  * Used to resolve the
181417
181650
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
181418
181651
  * of values.
181419
181652
  */
181420
- var nativeObjectToString = objectProto$h.toString;
181653
+ var nativeObjectToString = objectProto$g.toString;
181421
181654
 
181422
181655
  /**
181423
181656
  * Converts `value` to a string using `Object.prototype.toString`.
@@ -181883,17 +182116,17 @@ var reIsHostCtor = /^\[object .+?Constructor\]$/;
181883
182116
 
181884
182117
  /** Used for built-in method references. */
181885
182118
  var funcProto$1 = Function.prototype,
181886
- objectProto$g = Object.prototype;
182119
+ objectProto$f = Object.prototype;
181887
182120
 
181888
182121
  /** Used to resolve the decompiled source of functions. */
181889
182122
  var funcToString$1 = funcProto$1.toString;
181890
182123
 
181891
182124
  /** Used to check objects for own properties. */
181892
- var hasOwnProperty$e = objectProto$g.hasOwnProperty;
182125
+ var hasOwnProperty$d = objectProto$f.hasOwnProperty;
181893
182126
 
181894
182127
  /** Used to detect if a method is native. */
181895
182128
  var reIsNative = RegExp('^' +
181896
- funcToString$1.call(hasOwnProperty$e).replace(reRegExpChar, '\\$&')
182129
+ funcToString$1.call(hasOwnProperty$d).replace(reRegExpChar, '\\$&')
181897
182130
  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
181898
182131
  );
181899
182132
 
@@ -182308,10 +182541,10 @@ function eq(value, other) {
182308
182541
  }
182309
182542
 
182310
182543
  /** Used for built-in method references. */
182311
- var objectProto$f = Object.prototype;
182544
+ var objectProto$e = Object.prototype;
182312
182545
 
182313
182546
  /** Used to check objects for own properties. */
182314
- var hasOwnProperty$d = objectProto$f.hasOwnProperty;
182547
+ var hasOwnProperty$c = objectProto$e.hasOwnProperty;
182315
182548
 
182316
182549
  /**
182317
182550
  * Assigns `value` to `key` of `object` if the existing value is not equivalent
@@ -182325,7 +182558,7 @@ var hasOwnProperty$d = objectProto$f.hasOwnProperty;
182325
182558
  */
182326
182559
  function assignValue(object, key, value) {
182327
182560
  var objValue = object[key];
182328
- if (!(hasOwnProperty$d.call(object, key) && eq(objValue, value)) ||
182561
+ if (!(hasOwnProperty$c.call(object, key) && eq(objValue, value)) ||
182329
182562
  (value === undefined && !(key in object))) {
182330
182563
  baseAssignValue(object, key, value);
182331
182564
  }
@@ -182531,7 +182764,7 @@ function createAssigner(assigner) {
182531
182764
  }
182532
182765
 
182533
182766
  /** Used for built-in method references. */
182534
- var objectProto$e = Object.prototype;
182767
+ var objectProto$d = Object.prototype;
182535
182768
 
182536
182769
  /**
182537
182770
  * Checks if `value` is likely a prototype object.
@@ -182542,7 +182775,7 @@ var objectProto$e = Object.prototype;
182542
182775
  */
182543
182776
  function isPrototype(value) {
182544
182777
  var Ctor = value && value.constructor,
182545
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$e;
182778
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$d;
182546
182779
 
182547
182780
  return value === proto;
182548
182781
  }
@@ -182581,13 +182814,13 @@ function baseIsArguments(value) {
182581
182814
  }
182582
182815
 
182583
182816
  /** Used for built-in method references. */
182584
- var objectProto$d = Object.prototype;
182817
+ var objectProto$c = Object.prototype;
182585
182818
 
182586
182819
  /** Used to check objects for own properties. */
182587
- var hasOwnProperty$c = objectProto$d.hasOwnProperty;
182820
+ var hasOwnProperty$b = objectProto$c.hasOwnProperty;
182588
182821
 
182589
182822
  /** Built-in value references. */
182590
- var propertyIsEnumerable$1 = objectProto$d.propertyIsEnumerable;
182823
+ var propertyIsEnumerable$1 = objectProto$c.propertyIsEnumerable;
182591
182824
 
182592
182825
  /**
182593
182826
  * Checks if `value` is likely an `arguments` object.
@@ -182608,7 +182841,7 @@ var propertyIsEnumerable$1 = objectProto$d.propertyIsEnumerable;
182608
182841
  * // => false
182609
182842
  */
182610
182843
  var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
182611
- return isObjectLike(value) && hasOwnProperty$c.call(value, 'callee') &&
182844
+ return isObjectLike(value) && hasOwnProperty$b.call(value, 'callee') &&
182612
182845
  !propertyIsEnumerable$1.call(value, 'callee');
182613
182846
  };
182614
182847
 
@@ -182781,10 +183014,10 @@ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
182781
183014
  var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
182782
183015
 
182783
183016
  /** Used for built-in method references. */
182784
- var objectProto$c = Object.prototype;
183017
+ var objectProto$b = Object.prototype;
182785
183018
 
182786
183019
  /** Used to check objects for own properties. */
182787
- var hasOwnProperty$b = objectProto$c.hasOwnProperty;
183020
+ var hasOwnProperty$a = objectProto$b.hasOwnProperty;
182788
183021
 
182789
183022
  /**
182790
183023
  * Creates an array of the enumerable property names of the array-like `value`.
@@ -182804,7 +183037,7 @@ function arrayLikeKeys(value, inherited) {
182804
183037
  length = result.length;
182805
183038
 
182806
183039
  for (var key in value) {
182807
- if ((inherited || hasOwnProperty$b.call(value, key)) &&
183040
+ if ((inherited || hasOwnProperty$a.call(value, key)) &&
182808
183041
  !(skipIndexes && (
182809
183042
  // Safari 9 has enumerable `arguments.length` in strict mode.
182810
183043
  key == 'length' ||
@@ -182839,10 +183072,10 @@ function overArg(func, transform) {
182839
183072
  var nativeKeys = overArg(Object.keys, Object);
182840
183073
 
182841
183074
  /** Used for built-in method references. */
182842
- var objectProto$b = Object.prototype;
183075
+ var objectProto$a = Object.prototype;
182843
183076
 
182844
183077
  /** Used to check objects for own properties. */
182845
- var hasOwnProperty$a = objectProto$b.hasOwnProperty;
183078
+ var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
182846
183079
 
182847
183080
  /**
182848
183081
  * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
@@ -182857,7 +183090,7 @@ function baseKeys(object) {
182857
183090
  }
182858
183091
  var result = [];
182859
183092
  for (var key in Object(object)) {
182860
- if (hasOwnProperty$a.call(object, key) && key != 'constructor') {
183093
+ if (hasOwnProperty$9.call(object, key) && key != 'constructor') {
182861
183094
  result.push(key);
182862
183095
  }
182863
183096
  }
@@ -182897,10 +183130,10 @@ function keys(object) {
182897
183130
  }
182898
183131
 
182899
183132
  /** Used for built-in method references. */
182900
- var objectProto$a = Object.prototype;
183133
+ var objectProto$9 = Object.prototype;
182901
183134
 
182902
183135
  /** Used to check objects for own properties. */
182903
- var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
183136
+ var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
182904
183137
 
182905
183138
  /**
182906
183139
  * Assigns own enumerable string keyed properties of source objects to the
@@ -182940,7 +183173,7 @@ var assign = createAssigner(function(object, source) {
182940
183173
  return;
182941
183174
  }
182942
183175
  for (var key in source) {
182943
- if (hasOwnProperty$9.call(source, key)) {
183176
+ if (hasOwnProperty$8.call(source, key)) {
182944
183177
  assignValue(object, key, source[key]);
182945
183178
  }
182946
183179
  }
@@ -182966,10 +183199,10 @@ function nativeKeysIn(object) {
182966
183199
  }
182967
183200
 
182968
183201
  /** Used for built-in method references. */
182969
- var objectProto$9 = Object.prototype;
183202
+ var objectProto$8 = Object.prototype;
182970
183203
 
182971
183204
  /** Used to check objects for own properties. */
182972
- var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
183205
+ var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
182973
183206
 
182974
183207
  /**
182975
183208
  * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
@@ -182986,7 +183219,7 @@ function baseKeysIn(object) {
182986
183219
  result = [];
182987
183220
 
182988
183221
  for (var key in object) {
182989
- if (!(key == 'constructor' && (isProto || !hasOwnProperty$8.call(object, key)))) {
183222
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty$7.call(object, key)))) {
182990
183223
  result.push(key);
182991
183224
  }
182992
183225
  }
@@ -183080,10 +183313,10 @@ function hashDelete(key) {
183080
183313
  var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
183081
183314
 
183082
183315
  /** Used for built-in method references. */
183083
- var objectProto$8 = Object.prototype;
183316
+ var objectProto$7 = Object.prototype;
183084
183317
 
183085
183318
  /** Used to check objects for own properties. */
183086
- var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
183319
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
183087
183320
 
183088
183321
  /**
183089
183322
  * Gets the hash value for `key`.
@@ -183100,14 +183333,14 @@ function hashGet(key) {
183100
183333
  var result = data[key];
183101
183334
  return result === HASH_UNDEFINED$2 ? undefined : result;
183102
183335
  }
183103
- return hasOwnProperty$7.call(data, key) ? data[key] : undefined;
183336
+ return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
183104
183337
  }
183105
183338
 
183106
183339
  /** Used for built-in method references. */
183107
- var objectProto$7 = Object.prototype;
183340
+ var objectProto$6 = Object.prototype;
183108
183341
 
183109
183342
  /** Used to check objects for own properties. */
183110
- var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
183343
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
183111
183344
 
183112
183345
  /**
183113
183346
  * Checks if a hash value for `key` exists.
@@ -183120,7 +183353,7 @@ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
183120
183353
  */
183121
183354
  function hashHas(key) {
183122
183355
  var data = this.__data__;
183123
- return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$6.call(data, key);
183356
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$5.call(data, key);
183124
183357
  }
183125
183358
 
183126
183359
  /** Used to stand-in for `undefined` hash values. */
@@ -183765,13 +183998,13 @@ var objectTag$3 = '[object Object]';
183765
183998
 
183766
183999
  /** Used for built-in method references. */
183767
184000
  var funcProto = Function.prototype,
183768
- objectProto$6 = Object.prototype;
184001
+ objectProto$5 = Object.prototype;
183769
184002
 
183770
184003
  /** Used to resolve the decompiled source of functions. */
183771
184004
  var funcToString = funcProto.toString;
183772
184005
 
183773
184006
  /** Used to check objects for own properties. */
183774
- var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
184007
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
183775
184008
 
183776
184009
  /** Used to infer the `Object` constructor. */
183777
184010
  var objectCtorString = funcToString.call(Object);
@@ -183812,7 +184045,7 @@ function isPlainObject(value) {
183812
184045
  if (proto === null) {
183813
184046
  return true;
183814
184047
  }
183815
- var Ctor = hasOwnProperty$5.call(proto, 'constructor') && proto.constructor;
184048
+ var Ctor = hasOwnProperty$4.call(proto, 'constructor') && proto.constructor;
183816
184049
  return typeof Ctor == 'function' && Ctor instanceof Ctor &&
183817
184050
  funcToString.call(Ctor) == objectCtorString;
183818
184051
  }
@@ -184617,10 +184850,10 @@ function stubArray() {
184617
184850
  }
184618
184851
 
184619
184852
  /** Used for built-in method references. */
184620
- var objectProto$5 = Object.prototype;
184853
+ var objectProto$4 = Object.prototype;
184621
184854
 
184622
184855
  /** Built-in value references. */
184623
- var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
184856
+ var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
184624
184857
 
184625
184858
  /* Built-in method references for those with the same name as other `lodash` methods. */
184626
184859
  var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
@@ -184783,10 +185016,10 @@ if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3)
184783
185016
  }
184784
185017
 
184785
185018
  /** Used for built-in method references. */
184786
- var objectProto$4 = Object.prototype;
185019
+ var objectProto$3 = Object.prototype;
184787
185020
 
184788
185021
  /** Used to check objects for own properties. */
184789
- var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
185022
+ var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
184790
185023
 
184791
185024
  /**
184792
185025
  * Initializes an array clone.
@@ -184800,7 +185033,7 @@ function initCloneArray(array) {
184800
185033
  result = new array.constructor(length);
184801
185034
 
184802
185035
  // Add properties assigned by `RegExp#exec`.
184803
- if (length && typeof array[0] == 'string' && hasOwnProperty$4.call(array, 'index')) {
185036
+ if (length && typeof array[0] == 'string' && hasOwnProperty$3.call(array, 'index')) {
184804
185037
  result.index = array.index;
184805
185038
  result.input = array.input;
184806
185039
  }
@@ -185261,7 +185494,7 @@ function setCacheAdd(value) {
185261
185494
  * @name has
185262
185495
  * @memberOf SetCache
185263
185496
  * @param {*} value The value to search for.
185264
- * @returns {boolean} Returns `true` if `value` is found, else `false`.
185497
+ * @returns {number} Returns `true` if `value` is found, else `false`.
185265
185498
  */
185266
185499
  function setCacheHas(value) {
185267
185500
  return this.__data__.has(value);
@@ -185544,10 +185777,10 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
185544
185777
  var COMPARE_PARTIAL_FLAG$3 = 1;
185545
185778
 
185546
185779
  /** Used for built-in method references. */
185547
- var objectProto$3 = Object.prototype;
185780
+ var objectProto$2 = Object.prototype;
185548
185781
 
185549
185782
  /** Used to check objects for own properties. */
185550
- var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
185783
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
185551
185784
 
185552
185785
  /**
185553
185786
  * A specialized version of `baseIsEqualDeep` for objects with support for
@@ -185575,7 +185808,7 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
185575
185808
  var index = objLength;
185576
185809
  while (index--) {
185577
185810
  var key = objProps[index];
185578
- if (!(isPartial ? key in other : hasOwnProperty$3.call(other, key))) {
185811
+ if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) {
185579
185812
  return false;
185580
185813
  }
185581
185814
  }
@@ -185636,10 +185869,10 @@ var argsTag = '[object Arguments]',
185636
185869
  objectTag = '[object Object]';
185637
185870
 
185638
185871
  /** Used for built-in method references. */
185639
- var objectProto$2 = Object.prototype;
185872
+ var objectProto$1 = Object.prototype;
185640
185873
 
185641
185874
  /** Used to check objects for own properties. */
185642
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
185875
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
185643
185876
 
185644
185877
  /**
185645
185878
  * A specialized version of `baseIsEqual` for arrays and objects which performs
@@ -185682,8 +185915,8 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
185682
185915
  : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
185683
185916
  }
185684
185917
  if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
185685
- var objIsWrapped = objIsObj && hasOwnProperty$2.call(object, '__wrapped__'),
185686
- othIsWrapped = othIsObj && hasOwnProperty$2.call(other, '__wrapped__');
185918
+ var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, '__wrapped__'),
185919
+ othIsWrapped = othIsObj && hasOwnProperty$1.call(other, '__wrapped__');
185687
185920
 
185688
185921
  if (objIsWrapped || othIsWrapped) {
185689
185922
  var objUnwrapped = objIsWrapped ? object.value() : object,
@@ -187097,10 +187330,10 @@ var mapTag = '[object Map]',
187097
187330
  setTag = '[object Set]';
187098
187331
 
187099
187332
  /** Used for built-in method references. */
187100
- var objectProto$1 = Object.prototype;
187333
+ var objectProto = Object.prototype;
187101
187334
 
187102
187335
  /** Used to check objects for own properties. */
187103
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
187336
+ var hasOwnProperty = objectProto.hasOwnProperty;
187104
187337
 
187105
187338
  /**
187106
187339
  * Checks if `value` is an empty object, collection, map, or set.
@@ -187152,7 +187385,7 @@ function isEmpty(value) {
187152
187385
  return !baseKeys(value).length;
187153
187386
  }
187154
187387
  for (var key in value) {
187155
- if (hasOwnProperty$1.call(value, key)) {
187388
+ if (hasOwnProperty.call(value, key)) {
187156
187389
  return false;
187157
187390
  }
187158
187391
  }
@@ -187376,12 +187609,6 @@ var merge = createAssigner(function(object, source, srcIndex) {
187376
187609
  baseMerge(object, source, srcIndex);
187377
187610
  });
187378
187611
 
187379
- /** Used for built-in method references. */
187380
- var objectProto = Object.prototype;
187381
-
187382
- /** Used to check objects for own properties. */
187383
- var hasOwnProperty = objectProto.hasOwnProperty;
187384
-
187385
187612
  /**
187386
187613
  * The base implementation of `_.unset`.
187387
187614
  *
@@ -187392,34 +187619,8 @@ var hasOwnProperty = objectProto.hasOwnProperty;
187392
187619
  */
187393
187620
  function baseUnset(object, path) {
187394
187621
  path = castPath(path, object);
187395
-
187396
- // Prevent prototype pollution:
187397
- // https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
187398
- // https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh
187399
- var index = -1,
187400
- length = path.length;
187401
-
187402
- if (!length) {
187403
- return true;
187404
- }
187405
-
187406
- while (++index < length) {
187407
- var key = toKey(path[index]);
187408
-
187409
- // Always block "__proto__" anywhere in the path if it's not expected
187410
- if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
187411
- return false;
187412
- }
187413
-
187414
- // Block constructor/prototype as non-terminal traversal keys to prevent
187415
- // escaping the object graph into built-in constructors and prototypes.
187416
- if ((key === 'constructor' || key === 'prototype') && index < length - 1) {
187417
- return false;
187418
- }
187419
- }
187420
-
187421
- var obj = parent$1(object, path);
187422
- return obj == null || delete obj[toKey(last(path))];
187622
+ object = parent$1(object, path);
187623
+ return object == null || delete object[toKey(last(path))];
187423
187624
  }
187424
187625
 
187425
187626
  /**
@@ -188045,14 +188246,14 @@ function requireDom () {
188045
188246
  ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
188046
188247
  var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
188047
188248
  ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
188048
- ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
188249
+ var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
188049
188250
  ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
188050
188251
  ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
188051
188252
  var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
188052
188253
  ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
188053
188254
  var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
188054
188255
  //level2
188055
- ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
188256
+ var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
188056
188257
  ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
188057
188258
  ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
188058
188259
  ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
@@ -188102,9 +188303,10 @@ function requireDom () {
188102
188303
  item: function(index) {
188103
188304
  return index >= 0 && index < this.length ? this[index] : null;
188104
188305
  },
188105
- toString:function(isHTML,nodeFilter){
188306
+ toString:function(isHTML,nodeFilter,options){
188307
+ var requireWellFormed = !!options && !!options.requireWellFormed;
188106
188308
  for(var buf = [], i = 0;i<this.length;i++){
188107
- serializeToString(this[i],buf,isHTML,nodeFilter);
188309
+ serializeToString(this[i],buf,isHTML,nodeFilter,null,requireWellFormed);
188108
188310
  }
188109
188311
  return buf.join('');
188110
188312
  },
@@ -188349,13 +188551,28 @@ function requireDom () {
188349
188551
  /**
188350
188552
  * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.
188351
188553
  *
188352
- * __This behavior is slightly different from the in the specs__:
188554
+ * __This implementation differs from the specification:__
188353
188555
  * - this implementation is not validating names or qualified names
188354
188556
  * (when parsing XML strings, the SAX parser takes care of that)
188355
188557
  *
188558
+ * Note: `internalSubset` can only be introduced via a direct property write to `node.internalSubset` after creation.
188559
+ * Creation-time validation of `publicId`, `systemId` is not enforced.
188560
+ * The serializer-level check covers all mutation vectors, including direct property writes.
188561
+ * `internalSubset` is only serialized as `[ ... ]` when both `publicId` and `systemId` are
188562
+ * absent (empty or `'.'`) — if either external identifier is present, `internalSubset` is
188563
+ * silently omitted from the serialized output.
188564
+ *
188356
188565
  * @param {string} qualifiedName
188357
188566
  * @param {string} [publicId]
188567
+ * The external subset public identifier. Stored verbatim including surrounding quotes.
188568
+ * When serialized with `requireWellFormed: true` (via the 4th-parameter options object),
188569
+ * throws `DOMException` with code `INVALID_STATE_ERR` if the value is non-empty and does
188570
+ * not match the XML `PubidLiteral` production (W3C DOM Parsing §3.2.1.3; XML 1.0 [12]).
188358
188571
  * @param {string} [systemId]
188572
+ * The external subset system identifier. Stored verbatim including surrounding quotes.
188573
+ * When serialized with `requireWellFormed: true`, throws `DOMException` with code
188574
+ * `INVALID_STATE_ERR` if the value is non-empty and does not match the XML `SystemLiteral`
188575
+ * production (W3C DOM Parsing §3.2.1.3; XML 1.0 [11]).
188359
188576
  * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation
188360
188577
  * or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`
188361
188578
  *
@@ -188421,18 +188638,44 @@ function requireDom () {
188421
188638
  return cloneNode(this.ownerDocument||this,this,deep);
188422
188639
  },
188423
188640
  // Modified in DOM Level 2:
188424
- normalize:function(){
188425
- var child = this.firstChild;
188426
- while(child){
188427
- var next = child.nextSibling;
188428
- if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){
188429
- this.removeChild(next);
188430
- child.appendData(next.data);
188431
- }else {
188432
- child.normalize();
188433
- child = next;
188434
- }
188435
- }
188641
+ /**
188642
+ * Puts the specified node and all of its subtree into a "normalized" form. In a normalized
188643
+ * subtree, no text nodes in the subtree are empty and there are no adjacent text nodes.
188644
+ *
188645
+ * Specifically, this method merges any adjacent text nodes (i.e., nodes for which `nodeType`
188646
+ * is `TEXT_NODE`) into a single node with the combined data. It also removes any empty text
188647
+ * nodes.
188648
+ *
188649
+ * This method iteratively traverses all child nodes to normalize all descendant nodes within
188650
+ * the subtree.
188651
+ *
188652
+ * @throws {DOMException}
188653
+ * May throw a DOMException if operations within removeChild or appendData (which are
188654
+ * potentially invoked in this method) do not meet their specific constraints.
188655
+ * @see {@link Node.removeChild}
188656
+ * @see {@link CharacterData.appendData}
188657
+ * @see ../docs/walk-dom.md.
188658
+ */
188659
+ normalize: function () {
188660
+ walkDOM(this, null, {
188661
+ enter: function (node) {
188662
+ // Merge adjacent text children of node before walkDOM schedules them.
188663
+ // walkDOM reads lastChild/previousSibling after enter returns, so the
188664
+ // surviving post-merge children are what it descends into.
188665
+ var child = node.firstChild;
188666
+ while (child) {
188667
+ var next = child.nextSibling;
188668
+ if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) {
188669
+ node.removeChild(next);
188670
+ child.appendData(next.data);
188671
+ // Do not advance child: re-check new nextSibling for another text run
188672
+ } else {
188673
+ child = next;
188674
+ }
188675
+ }
188676
+ return true; // descend into surviving children
188677
+ },
188678
+ });
188436
188679
  },
188437
188680
  // Introduced in DOM Level 2:
188438
188681
  isSupported:function(feature, version){
@@ -188508,21 +188751,103 @@ function requireDom () {
188508
188751
  copy(NodeType,Node.prototype);
188509
188752
 
188510
188753
  /**
188511
- * @param callback return true for continue,false for break
188512
- * @return boolean true: break visit;
188754
+ * @param {Node} node
188755
+ * Root of the subtree to visit.
188756
+ * @param {function(Node): boolean} callback
188757
+ * Called for each node in depth-first pre-order. Return a truthy value to stop traversal early.
188758
+ * @return {boolean} `true` if traversal was aborted by the callback, `false` otherwise.
188513
188759
  */
188514
- function _visitNode(node,callback){
188515
- if(callback(node)){
188516
- return true;
188517
- }
188518
- if(node = node.firstChild){
188519
- do{
188520
- if(_visitNode(node,callback)){return true}
188521
- }while(node=node.nextSibling)
188522
- }
188760
+ function _visitNode(node, callback) {
188761
+ return walkDOM(node, null, { enter: function (n) { return callback(n) ? walkDOM.STOP : true; } }) === walkDOM.STOP;
188523
188762
  }
188524
188763
 
188764
+ /**
188765
+ * Depth-first pre/post-order DOM tree walker.
188766
+ *
188767
+ * Visits every node in the subtree rooted at `node`. For each node:
188768
+ *
188769
+ * 1. Calls `callbacks.enter(node, context)` before descending into the node's children. The
188770
+ * return value becomes the `context` passed to each child's `enter` call and to the matching
188771
+ * `exit` call.
188772
+ * 2. If `enter` returns `null` or `undefined`, the node's children are skipped;
188773
+ * sibling traversal continues normally.
188774
+ * 3. If `enter` returns `walkDOM.STOP`, the entire traversal is aborted immediately — no
188775
+ * further `enter` or `exit` calls are made.
188776
+ * 4. `lastChild` and `previousSibling` are read **after** `enter` returns, so `enter` may
188777
+ * safely modify the node's own child list before the walker descends. Modifying siblings of
188778
+ * the current node or any other part of the tree produces unpredictable results: nodes already
188779
+ * queued on the stack are visited regardless of DOM changes, and newly inserted nodes outside
188780
+ * the current child list are never visited.
188781
+ * 5. Calls `callbacks.exit(node, context)` (if provided) after all of a node's children have
188782
+ * been visited, passing the same `context` that `enter`
188783
+ * returned for that node.
188784
+ *
188785
+ * This implementation uses an explicit stack and does not recurse — it is safe on arbitrarily
188786
+ * deep trees.
188787
+ *
188788
+ * @param {Node} node
188789
+ * Root of the subtree to walk.
188790
+ * @param {*} context
188791
+ * Initial context value passed to the root node's `enter`.
188792
+ * @param {{ enter: function(Node, *): *, exit?: function(Node, *): void }} callbacks
188793
+ * @returns {void | walkDOM.STOP}
188794
+ * @see ../docs/walk-dom.md.
188795
+ */
188796
+ function walkDOM(node, context, callbacks) {
188797
+ // Each stack frame is {node, context, phase}:
188798
+ // walkDOM.ENTER — call enter, then push children
188799
+ // walkDOM.EXIT — call exit
188800
+ var stack = [{ node: node, context: context, phase: walkDOM.ENTER }];
188801
+ while (stack.length > 0) {
188802
+ var frame = stack.pop();
188803
+ if (frame.phase === walkDOM.ENTER) {
188804
+ var childContext = callbacks.enter(frame.node, frame.context);
188805
+ if (childContext === walkDOM.STOP) {
188806
+ return walkDOM.STOP;
188807
+ }
188808
+ // Push exit frame before children so it fires after all children are processed (Last In First Out)
188809
+ stack.push({ node: frame.node, context: childContext, phase: walkDOM.EXIT });
188810
+ if (childContext === null || childContext === undefined) {
188811
+ continue; // skip children
188812
+ }
188813
+ // lastChild is read after enter returns, so enter may modify the child list.
188814
+ var child = frame.node.lastChild;
188815
+ // Traverse from lastChild backwards so that pushing onto the stack
188816
+ // naturally yields firstChild on top (processed first).
188817
+ while (child) {
188818
+ stack.push({ node: child, context: childContext, phase: walkDOM.ENTER });
188819
+ child = child.previousSibling;
188820
+ }
188821
+ } else {
188822
+ // frame.phase === walkDOM.EXIT
188823
+ if (callbacks.exit) {
188824
+ callbacks.exit(frame.node, frame.context);
188825
+ }
188826
+ }
188827
+ }
188828
+ }
188525
188829
 
188830
+ /**
188831
+ * Sentinel value returned from a `walkDOM` `enter` callback to abort the entire traversal
188832
+ * immediately.
188833
+ *
188834
+ * @type {symbol}
188835
+ */
188836
+ walkDOM.STOP = Symbol('walkDOM.STOP');
188837
+ /**
188838
+ * Phase constant for a stack frame that has not yet been visited.
188839
+ * The `enter` callback is called and children are scheduled.
188840
+ *
188841
+ * @type {number}
188842
+ */
188843
+ walkDOM.ENTER = 0;
188844
+ /**
188845
+ * Phase constant for a stack frame whose subtree has been fully visited.
188846
+ * The `exit` callback is called.
188847
+ *
188848
+ * @type {number}
188849
+ */
188850
+ walkDOM.EXIT = 1;
188526
188851
 
188527
188852
  function Document(){
188528
188853
  this.ownerDocument = this;
@@ -189126,12 +189451,44 @@ function requireDom () {
189126
189451
  node.appendData(data);
189127
189452
  return node;
189128
189453
  },
189454
+ /**
189455
+ * Returns a new CDATASection node whose data is `data`.
189456
+ *
189457
+ * __This implementation differs from the specification:__
189458
+ * - calling this method on an HTML document does not throw `NotSupportedError`.
189459
+ *
189460
+ * @param {string} data
189461
+ * @returns {CDATASection}
189462
+ * @throws DOMException with code `INVALID_CHARACTER_ERR` if `data` contains `"]]>"`.
189463
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createCDATASection
189464
+ * @see https://dom.spec.whatwg.org/#dom-document-createcdatasection
189465
+ */
189129
189466
  createCDATASection : function(data){
189467
+ if (data.indexOf(']]>') !== -1) {
189468
+ throw new DOMException(INVALID_CHARACTER_ERR, 'data contains "]]>"');
189469
+ }
189130
189470
  var node = new CDATASection();
189131
189471
  node.ownerDocument = this;
189132
189472
  node.appendData(data);
189133
189473
  return node;
189134
189474
  },
189475
+ /**
189476
+ * Returns a ProcessingInstruction node whose target is target and data is data.
189477
+ *
189478
+ * __This implementation differs from the specification:__
189479
+ * - it does not do any input validation on the arguments and doesn't throw "InvalidCharacterError".
189480
+ *
189481
+ * Note: When the resulting document is serialized with `requireWellFormed: true`, the
189482
+ * serializer throws with code `INVALID_STATE_ERR` if `.data` contains `?>` (W3C DOM Parsing
189483
+ * §3.2.1.7). Without that option the data is emitted verbatim.
189484
+ *
189485
+ * @param {string} target
189486
+ * @param {string} data
189487
+ * @returns {ProcessingInstruction}
189488
+ * @see https://developer.mozilla.org/docs/Web/API/Document/createProcessingInstruction
189489
+ * @see https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction
189490
+ * @see https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml §3.2.1.7
189491
+ */
189135
189492
  createProcessingInstruction : function(target,data){
189136
189493
  var node = new ProcessingInstruction();
189137
189494
  node.ownerDocument = this;
@@ -189357,6 +189714,19 @@ function requireDom () {
189357
189714
  _extends(CDATASection,CharacterData);
189358
189715
 
189359
189716
 
189717
+ /**
189718
+ * Represents a DocumentType node (the `<!DOCTYPE ...>` declaration).
189719
+ *
189720
+ * `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
189721
+ * xmldom does not enforce the `readonly` constraint declared by the WHATWG DOM spec —
189722
+ * direct property writes succeed silently. Values are serialized verbatim when
189723
+ * `requireWellFormed` is false (the default). When the serializer is invoked with
189724
+ * `requireWellFormed: true` (via the 4th-parameter options object), it validates each
189725
+ * field and throws `DOMException` with code `INVALID_STATE_ERR` on invalid values.
189726
+ *
189727
+ * @class
189728
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/DocumentType MDN
189729
+ */
189360
189730
  function DocumentType() {
189361
189731
  } DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
189362
189732
  _extends(DocumentType,Node);
@@ -189384,11 +189754,48 @@ function requireDom () {
189384
189754
  ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
189385
189755
  _extends(ProcessingInstruction,Node);
189386
189756
  function XMLSerializer(){}
189387
- XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){
189388
- return nodeSerializeToString.call(node,isHtml,nodeFilter);
189757
+ /**
189758
+ * Returns the result of serializing `node` to XML.
189759
+ *
189760
+ * When `options.requireWellFormed` is `true`, the serializer throws for content that would
189761
+ * produce ill-formed XML.
189762
+ *
189763
+ * __This implementation differs from the specification:__
189764
+ * - CDATASection nodes whose data contains `]]>` are serialized by splitting the section
189765
+ * at each `]]>` occurrence (following W3C DOM Level 3 Core `split-cdata-sections`
189766
+ * default behaviour) unless `requireWellFormed` is `true`.
189767
+ * - when `requireWellFormed` is `true`, `DOMException` with code `INVALID_STATE_ERR`
189768
+ * is only thrown to prevent injection vectors, not for all the spec mandated checks.
189769
+ *
189770
+ * @param {Node} node
189771
+ * @param {boolean} [isHtml]
189772
+ * @param {function} [nodeFilter]
189773
+ * @param {Object} [options]
189774
+ * @param {boolean} [options.requireWellFormed=false]
189775
+ * When `true`, throws for content that would produce ill-formed XML.
189776
+ * @returns {string}
189777
+ * @throws {DOMException}
189778
+ * With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
189779
+ * - a CDATASection node's data contains `"]]>"`,
189780
+ * - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
189781
+ * - a ProcessingInstruction's data contains `"?>"`,
189782
+ * - a DocumentType's `publicId` is non-empty and does not match the XML `PubidLiteral`
189783
+ * production,
189784
+ * - a DocumentType's `systemId` is non-empty and does not match the XML `SystemLiteral`
189785
+ * production, or
189786
+ * - a DocumentType's `internalSubset` contains `"]>"`.
189787
+ * Note: xmldom does not enforce `readonly` on DocumentType fields — direct property
189788
+ * writes succeed and are covered by the serializer-level checks above.
189789
+ * @see https://html.spec.whatwg.org/#dom-xmlserializer-serializetostring
189790
+ * @see https://w3c.github.io/DOM-Parsing/#xml-serialization
189791
+ * @see https://github.com/w3c/DOM-Parsing/issues/84
189792
+ */
189793
+ XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter,options){
189794
+ return nodeSerializeToString.call(node,isHtml,nodeFilter,options);
189389
189795
  };
189390
189796
  Node.prototype.toString = nodeSerializeToString;
189391
- function nodeSerializeToString(isHtml,nodeFilter){
189797
+ function nodeSerializeToString(isHtml,nodeFilter,options){
189798
+ var requireWellFormed = !!options && !!options.requireWellFormed;
189392
189799
  var buf = [];
189393
189800
  var refNode = this.nodeType == 9 && this.documentElement || this;
189394
189801
  var prefix = refNode.prefix;
@@ -189405,7 +189812,7 @@ function requireDom () {
189405
189812
  ];
189406
189813
  }
189407
189814
  }
189408
- serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);
189815
+ serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces,requireWellFormed);
189409
189816
  //console.log('###',this.nodeType,uri,prefix,buf.join(''))
189410
189817
  return buf.join('');
189411
189818
  }
@@ -189454,271 +189861,323 @@ function requireDom () {
189454
189861
  buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
189455
189862
  }
189456
189863
 
189457
- function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
189864
+ function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces, requireWellFormed) {
189458
189865
  if (!visibleNamespaces) {
189459
189866
  visibleNamespaces = [];
189460
189867
  }
189461
-
189462
- if(nodeFilter){
189463
- node = nodeFilter(node);
189464
- if(node){
189465
- if(typeof node == 'string'){
189466
- buf.push(node);
189467
- return;
189468
- }
189469
- }else {
189470
- return;
189471
- }
189472
- //buf.sort.apply(attrs, attributeSorter);
189473
- }
189474
-
189475
- switch(node.nodeType){
189476
- case ELEMENT_NODE:
189477
- var attrs = node.attributes;
189478
- var len = attrs.length;
189479
- var child = node.firstChild;
189480
- var nodeName = node.tagName;
189481
-
189482
- isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML;
189483
-
189484
- var prefixedNodeName = nodeName;
189485
- if (!isHTML && !node.prefix && node.namespaceURI) {
189486
- var defaultNS;
189487
- // lookup current default ns from `xmlns` attribute
189488
- for (var ai = 0; ai < attrs.length; ai++) {
189489
- if (attrs.item(ai).name === 'xmlns') {
189490
- defaultNS = attrs.item(ai).value;
189491
- break
189492
- }
189493
- }
189494
- if (!defaultNS) {
189495
- // lookup current default ns in visibleNamespaces
189496
- for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
189497
- var namespace = visibleNamespaces[nsi];
189498
- if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {
189499
- defaultNS = namespace.namespace;
189500
- break
189868
+ walkDOM(node, { ns: visibleNamespaces, isHTML: isHTML }, {
189869
+ enter: function (n, ctx) {
189870
+ var ns = ctx.ns;
189871
+ var html = ctx.isHTML;
189872
+
189873
+ if (nodeFilter) {
189874
+ n = nodeFilter(n);
189875
+ if (n) {
189876
+ if (typeof n == 'string') {
189877
+ buf.push(n);
189878
+ return null;
189501
189879
  }
189880
+ } else {
189881
+ return null;
189502
189882
  }
189503
189883
  }
189504
- if (defaultNS !== node.namespaceURI) {
189505
- for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
189506
- var namespace = visibleNamespaces[nsi];
189507
- if (namespace.namespace === node.namespaceURI) {
189508
- if (namespace.prefix) {
189509
- prefixedNodeName = namespace.prefix + ':' + nodeName;
189884
+
189885
+ switch (n.nodeType) {
189886
+ case ELEMENT_NODE:
189887
+ var attrs = n.attributes;
189888
+ var len = attrs.length;
189889
+ var nodeName = n.tagName;
189890
+
189891
+ html = NAMESPACE.isHTML(n.namespaceURI) || html;
189892
+
189893
+ var prefixedNodeName = nodeName;
189894
+ if (!html && !n.prefix && n.namespaceURI) {
189895
+ var defaultNS;
189896
+ // lookup current default ns from `xmlns` attribute
189897
+ for (var ai = 0; ai < attrs.length; ai++) {
189898
+ if (attrs.item(ai).name === 'xmlns') {
189899
+ defaultNS = attrs.item(ai).value;
189900
+ break;
189901
+ }
189902
+ }
189903
+ if (!defaultNS) {
189904
+ // lookup current default ns in visibleNamespaces
189905
+ for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
189906
+ var nsEntry = ns[nsi];
189907
+ if (nsEntry.prefix === '' && nsEntry.namespace === n.namespaceURI) {
189908
+ defaultNS = nsEntry.namespace;
189909
+ break;
189910
+ }
189911
+ }
189912
+ }
189913
+ if (defaultNS !== n.namespaceURI) {
189914
+ for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
189915
+ var nsEntry = ns[nsi];
189916
+ if (nsEntry.namespace === n.namespaceURI) {
189917
+ if (nsEntry.prefix) {
189918
+ prefixedNodeName = nsEntry.prefix + ':' + nodeName;
189919
+ }
189920
+ break;
189921
+ }
189922
+ }
189510
189923
  }
189511
- break
189512
189924
  }
189513
- }
189514
- }
189515
- }
189516
189925
 
189517
- buf.push('<', prefixedNodeName);
189926
+ buf.push('<', prefixedNodeName);
189927
+
189928
+ // Build a fresh namespace snapshot for this element's children.
189929
+ // The slice prevents sibling elements from inheriting each other's declarations.
189930
+ var childNs = ns.slice();
189931
+ for (var i = 0; i < len; i++) {
189932
+ var attr = attrs.item(i);
189933
+ if (attr.prefix == 'xmlns') {
189934
+ childNs.push({ prefix: attr.localName, namespace: attr.value });
189935
+ } else if (attr.nodeName == 'xmlns') {
189936
+ childNs.push({ prefix: '', namespace: attr.value });
189937
+ }
189938
+ }
189518
189939
 
189519
- for(var i=0;i<len;i++){
189520
- // add namespaces for attributes
189521
- var attr = attrs.item(i);
189522
- if (attr.prefix == 'xmlns') {
189523
- visibleNamespaces.push({ prefix: attr.localName, namespace: attr.value });
189524
- }else if(attr.nodeName == 'xmlns'){
189525
- visibleNamespaces.push({ prefix: '', namespace: attr.value });
189526
- }
189527
- }
189940
+ for (var i = 0; i < len; i++) {
189941
+ var attr = attrs.item(i);
189942
+ if (needNamespaceDefine(attr, html, childNs)) {
189943
+ var attrPrefix = attr.prefix || '';
189944
+ var uri = attr.namespaceURI;
189945
+ addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
189946
+ childNs.push({ prefix: attrPrefix, namespace: uri });
189947
+ }
189948
+ // Apply nodeFilter and serialize the attribute.
189949
+ var filteredAttr = nodeFilter ? nodeFilter(attr) : attr;
189950
+ if (filteredAttr) {
189951
+ if (typeof filteredAttr === 'string') {
189952
+ buf.push(filteredAttr);
189953
+ } else {
189954
+ addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
189955
+ }
189956
+ }
189957
+ }
189528
189958
 
189529
- for(var i=0;i<len;i++){
189530
- var attr = attrs.item(i);
189531
- if (needNamespaceDefine(attr,isHTML, visibleNamespaces)) {
189532
- var prefix = attr.prefix||'';
189533
- var uri = attr.namespaceURI;
189534
- addSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : "xmlns", uri);
189535
- visibleNamespaces.push({ prefix: prefix, namespace:uri });
189536
- }
189537
- serializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);
189538
- }
189959
+ // add namespace for current node
189960
+ if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
189961
+ var nodePrefix = n.prefix || '';
189962
+ var uri = n.namespaceURI;
189963
+ addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
189964
+ childNs.push({ prefix: nodePrefix, namespace: uri });
189965
+ }
189539
189966
 
189540
- // add namespace for current node
189541
- if (nodeName === prefixedNodeName && needNamespaceDefine(node, isHTML, visibleNamespaces)) {
189542
- var prefix = node.prefix||'';
189543
- var uri = node.namespaceURI;
189544
- addSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : "xmlns", uri);
189545
- visibleNamespaces.push({ prefix: prefix, namespace:uri });
189546
- }
189967
+ var child = n.firstChild;
189968
+ if (child || html && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) {
189969
+ buf.push('>');
189970
+ if (html && /^script$/i.test(nodeName)) {
189971
+ // Inline serialization for <script> children; return null to skip walkDOM descent.
189972
+ while (child) {
189973
+ if (child.data) {
189974
+ buf.push(child.data);
189975
+ } else {
189976
+ serializeToString(child, buf, html, nodeFilter, childNs.slice(), requireWellFormed);
189977
+ }
189978
+ child = child.nextSibling;
189979
+ }
189980
+ buf.push('</', nodeName, '>');
189981
+ return null;
189982
+ }
189983
+ // Return child context; walkDOM descends and exit emits the closing tag.
189984
+ return { ns: childNs, isHTML: html, tag: prefixedNodeName };
189985
+ } else {
189986
+ buf.push('/>');
189987
+ return null;
189988
+ }
189547
189989
 
189548
- if(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){
189549
- buf.push('>');
189550
- //if is cdata child node
189551
- if(isHTML && /^script$/i.test(nodeName)){
189552
- while(child){
189553
- if(child.data){
189554
- buf.push(child.data);
189555
- }else {
189556
- serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());
189990
+ case DOCUMENT_NODE:
189991
+ case DOCUMENT_FRAGMENT_NODE:
189992
+ // Descend into children; exit is a no-op (tag is null).
189993
+ return { ns: ns.slice(), isHTML: html, tag: null };
189994
+
189995
+ case ATTRIBUTE_NODE:
189996
+ addSerializedAttribute(buf, n.name, n.value);
189997
+ return null;
189998
+
189999
+ case TEXT_NODE:
190000
+ /**
190001
+ * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
190002
+ * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
190003
+ * If they are needed elsewhere, they must be escaped using either numeric character references or the strings
190004
+ * `&amp;` and `&lt;` respectively.
190005
+ * The right angle bracket (>) may be represented using the string " &gt; ", and must, for compatibility,
190006
+ * be escaped using either `&gt;` or a character reference when it appears in the string `]]>` in content,
190007
+ * when that string is not marking the end of a CDATA section.
190008
+ *
190009
+ * In the content of elements, character data is any string of characters
190010
+ * which does not contain the start-delimiter of any markup
190011
+ * and does not include the CDATA-section-close delimiter, `]]>`.
190012
+ *
190013
+ * @see https://www.w3.org/TR/xml/#NT-CharData
190014
+ * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
190015
+ */
190016
+ buf.push(n.data.replace(/[<&>]/g, _xmlEncoder));
190017
+ return null;
190018
+
190019
+ case CDATA_SECTION_NODE:
190020
+ if (requireWellFormed && n.data.indexOf(']]>') !== -1) {
190021
+ throw new DOMException(INVALID_STATE_ERR, 'The CDATASection data contains "]]>"');
189557
190022
  }
189558
- child = child.nextSibling;
189559
- }
189560
- }else
189561
- {
189562
- while(child){
189563
- serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());
189564
- child = child.nextSibling;
189565
- }
189566
- }
189567
- buf.push('</',prefixedNodeName,'>');
189568
- }else {
189569
- buf.push('/>');
189570
- }
189571
- // remove added visible namespaces
189572
- //visibleNamespaces.length = startVisibleNamespaces;
189573
- return;
189574
- case DOCUMENT_NODE:
189575
- case DOCUMENT_FRAGMENT_NODE:
189576
- var child = node.firstChild;
189577
- while(child){
189578
- serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());
189579
- child = child.nextSibling;
189580
- }
189581
- return;
189582
- case ATTRIBUTE_NODE:
189583
- return addSerializedAttribute(buf, node.name, node.value);
189584
- case TEXT_NODE:
189585
- /**
189586
- * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
189587
- * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
189588
- * If they are needed elsewhere, they must be escaped using either numeric character references or the strings
189589
- * `&amp;` and `&lt;` respectively.
189590
- * The right angle bracket (>) may be represented using the string " &gt; ", and must, for compatibility,
189591
- * be escaped using either `&gt;` or a character reference when it appears in the string `]]>` in content,
189592
- * when that string is not marking the end of a CDATA section.
189593
- *
189594
- * In the content of elements, character data is any string of characters
189595
- * which does not contain the start-delimiter of any markup
189596
- * and does not include the CDATA-section-close delimiter, `]]>`.
189597
- *
189598
- * @see https://www.w3.org/TR/xml/#NT-CharData
189599
- * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
189600
- */
189601
- return buf.push(node.data
189602
- .replace(/[<&>]/g,_xmlEncoder)
189603
- );
189604
- case CDATA_SECTION_NODE:
189605
- return buf.push( '<![CDATA[',node.data,']]>');
189606
- case COMMENT_NODE:
189607
- return buf.push( "<!--",node.data,"-->");
189608
- case DOCUMENT_TYPE_NODE:
189609
- var pubid = node.publicId;
189610
- var sysid = node.systemId;
189611
- buf.push('<!DOCTYPE ',node.name);
189612
- if(pubid){
189613
- buf.push(' PUBLIC ', pubid);
189614
- if (sysid && sysid!='.') {
189615
- buf.push(' ', sysid);
190023
+ buf.push('<![CDATA[', n.data.replace(/]]>/g, ']]]]><![CDATA[>'), ']]>');
190024
+ return null;
190025
+
190026
+ case COMMENT_NODE:
190027
+ if (requireWellFormed && n.data.indexOf('-->') !== -1) {
190028
+ throw new DOMException(INVALID_STATE_ERR, 'The comment node data contains "-->"');
190029
+ }
190030
+ buf.push('<!--', n.data, '-->');
190031
+ return null;
190032
+
190033
+ case DOCUMENT_TYPE_NODE:
190034
+ if (requireWellFormed) {
190035
+ if (n.publicId && !/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(n.publicId)) {
190036
+ throw new DOMException(INVALID_STATE_ERR, 'DocumentType publicId is not a valid PubidLiteral');
190037
+ }
190038
+ if (n.systemId && !/^("[^"]*"|'[^']*')$/.test(n.systemId)) {
190039
+ throw new DOMException(INVALID_STATE_ERR, 'DocumentType systemId is not a valid SystemLiteral');
190040
+ }
190041
+ if (n.internalSubset && n.internalSubset.indexOf(']>') !== -1) {
190042
+ throw new DOMException(INVALID_STATE_ERR, 'DocumentType internalSubset contains "]>"');
190043
+ }
190044
+ }
190045
+ var pubid = n.publicId;
190046
+ var sysid = n.systemId;
190047
+ buf.push('<!DOCTYPE ', n.name);
190048
+ if (pubid) {
190049
+ buf.push(' PUBLIC ', pubid);
190050
+ if (sysid && sysid != '.') {
190051
+ buf.push(' ', sysid);
190052
+ }
190053
+ buf.push('>');
190054
+ } else if (sysid && sysid != '.') {
190055
+ buf.push(' SYSTEM ', sysid, '>');
190056
+ } else {
190057
+ var sub = n.internalSubset;
190058
+ if (sub) {
190059
+ buf.push(' [', sub, ']');
190060
+ }
190061
+ buf.push('>');
190062
+ }
190063
+ return null;
190064
+
190065
+ case PROCESSING_INSTRUCTION_NODE:
190066
+ if (requireWellFormed && n.data.indexOf('?>') !== -1) {
190067
+ throw new DOMException(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"');
190068
+ }
190069
+ buf.push('<?', n.target, ' ', n.data, '?>');
190070
+ return null;
190071
+
190072
+ case ENTITY_REFERENCE_NODE:
190073
+ buf.push('&', n.nodeName, ';');
190074
+ return null;
190075
+
190076
+ //case ENTITY_NODE:
190077
+ //case NOTATION_NODE:
190078
+ default:
190079
+ buf.push('??', n.nodeName);
190080
+ return null;
189616
190081
  }
189617
- buf.push('>');
189618
- }else if(sysid && sysid!='.'){
189619
- buf.push(' SYSTEM ', sysid, '>');
189620
- }else {
189621
- var sub = node.internalSubset;
189622
- if(sub){
189623
- buf.push(" [",sub,"]");
190082
+ },
190083
+ exit: function (n, childCtx) {
190084
+ if (childCtx && childCtx.tag) {
190085
+ buf.push('</', childCtx.tag, '>');
189624
190086
  }
189625
- buf.push(">");
189626
- }
189627
- return;
189628
- case PROCESSING_INSTRUCTION_NODE:
189629
- return buf.push( "<?",node.target," ",node.data,"?>");
189630
- case ENTITY_REFERENCE_NODE:
189631
- return buf.push( '&',node.nodeName,';');
189632
- //case ENTITY_NODE:
189633
- //case NOTATION_NODE:
189634
- default:
189635
- buf.push('??',node.nodeName);
189636
- }
190087
+ },
190088
+ });
189637
190089
  }
189638
- function importNode(doc,node,deep){
189639
- var node2;
189640
- switch (node.nodeType) {
189641
- case ELEMENT_NODE:
189642
- node2 = node.cloneNode(false);
189643
- node2.ownerDocument = doc;
189644
- //var attrs = node2.attributes;
189645
- //var len = attrs.length;
189646
- //for(var i=0;i<len;i++){
189647
- //node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));
189648
- //}
189649
- case DOCUMENT_FRAGMENT_NODE:
189650
- break;
189651
- case ATTRIBUTE_NODE:
189652
- deep = true;
189653
- break;
189654
- //case ENTITY_REFERENCE_NODE:
189655
- //case PROCESSING_INSTRUCTION_NODE:
189656
- ////case TEXT_NODE:
189657
- //case CDATA_SECTION_NODE:
189658
- //case COMMENT_NODE:
189659
- // deep = false;
189660
- // break;
189661
- //case DOCUMENT_NODE:
189662
- //case DOCUMENT_TYPE_NODE:
189663
- //cannot be imported.
189664
- //case ENTITY_NODE:
189665
- //case NOTATION_NODE:
189666
- //can not hit in level3
189667
- //default:throw e;
189668
- }
189669
- if(!node2){
189670
- node2 = node.cloneNode(false);//false
189671
- }
189672
- node2.ownerDocument = doc;
189673
- node2.parentNode = null;
189674
- if(deep){
189675
- var child = node.firstChild;
189676
- while(child){
189677
- node2.appendChild(importNode(doc,child,deep));
189678
- child = child.nextSibling;
189679
- }
189680
- }
189681
- return node2;
190090
+ /**
190091
+ * Imports a node from a different document into `doc`, creating a new copy.
190092
+ * Delegates to {@link walkDOM} for traversal. Each node in the subtree is shallow-cloned,
190093
+ * stamped with `doc` as its `ownerDocument`, and detached (`parentNode` set to `null`).
190094
+ * Children are imported recursively when `deep` is `true`; for {@link Attr} nodes `deep` is
190095
+ * always forced to `true`
190096
+ * because an attribute's value lives in a child text node.
190097
+ *
190098
+ * @param {Document} doc
190099
+ * The document that will own the imported node.
190100
+ * @param {Node} node
190101
+ * The node to import.
190102
+ * @param {boolean} deep
190103
+ * If `true`, descendants are imported recursively.
190104
+ * @returns {Node}
190105
+ * The newly imported node, now owned by `doc`.
190106
+ */
190107
+ function importNode(doc, node, deep) {
190108
+ var destRoot;
190109
+ walkDOM(node, null, {
190110
+ enter: function (srcNode, destParent) {
190111
+ // Shallow-clone the node and stamp it into the target document.
190112
+ var destNode = srcNode.cloneNode(false);
190113
+ destNode.ownerDocument = doc;
190114
+ destNode.parentNode = null;
190115
+ // capture as the root of the imported subtree or attach to parent.
190116
+ if (destParent === null) {
190117
+ destRoot = destNode;
190118
+ } else {
190119
+ destParent.appendChild(destNode);
190120
+ }
190121
+ // ATTRIBUTE_NODE must always be imported deeply: its value lives in a child text node.
190122
+ var shouldDeep = srcNode.nodeType === ATTRIBUTE_NODE || deep;
190123
+ return shouldDeep ? destNode : null;
190124
+ },
190125
+ });
190126
+ return destRoot;
189682
190127
  }
189683
190128
  //
189684
190129
  //var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,
189685
190130
  // attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
189686
- function cloneNode(doc,node,deep){
189687
- var node2 = new node.constructor();
189688
- for (var n in node) {
189689
- if (Object.prototype.hasOwnProperty.call(node, n)) {
189690
- var v = node[n];
189691
- if (typeof v != "object") {
189692
- if (v != node2[n]) {
189693
- node2[n] = v;
190131
+ function cloneNode(doc, node, deep) {
190132
+ var destRoot;
190133
+ walkDOM(node, null, {
190134
+ enter: function (srcNode, destParent) {
190135
+ // 1. Create a blank node of the same type and copy all scalar own properties.
190136
+ var destNode = new srcNode.constructor();
190137
+ for (var n in srcNode) {
190138
+ if (Object.prototype.hasOwnProperty.call(srcNode, n)) {
190139
+ var v = srcNode[n];
190140
+ if (typeof v != 'object') {
190141
+ if (v != destNode[n]) {
190142
+ destNode[n] = v;
190143
+ }
190144
+ }
189694
190145
  }
189695
190146
  }
189696
- }
189697
- }
189698
- if(node.childNodes){
189699
- node2.childNodes = new NodeList();
189700
- }
189701
- node2.ownerDocument = doc;
189702
- switch (node2.nodeType) {
189703
- case ELEMENT_NODE:
189704
- var attrs = node.attributes;
189705
- var attrs2 = node2.attributes = new NamedNodeMap();
189706
- var len = attrs.length;
189707
- attrs2._ownerElement = node2;
189708
- for(var i=0;i<len;i++){
189709
- node2.setAttributeNode(cloneNode(doc,attrs.item(i),true));
189710
- }
189711
- break; case ATTRIBUTE_NODE:
189712
- deep = true;
189713
- }
189714
- if(deep){
189715
- var child = node.firstChild;
189716
- while(child){
189717
- node2.appendChild(cloneNode(doc,child,deep));
189718
- child = child.nextSibling;
189719
- }
189720
- }
189721
- return node2;
190147
+ if (srcNode.childNodes) {
190148
+ destNode.childNodes = new NodeList();
190149
+ }
190150
+ destNode.ownerDocument = doc;
190151
+ // 2. Handle node-type-specific setup.
190152
+ // Attributes are not DOM children, so they are cloned inline here
190153
+ // rather than by walkDOM descent.
190154
+ // ATTRIBUTE_NODE forces deep=true so its own children are walked.
190155
+ var shouldDeep = deep;
190156
+ switch (destNode.nodeType) {
190157
+ case ELEMENT_NODE:
190158
+ var attrs = srcNode.attributes;
190159
+ var attrs2 = (destNode.attributes = new NamedNodeMap());
190160
+ var len = attrs.length;
190161
+ attrs2._ownerElement = destNode;
190162
+ for (var i = 0; i < len; i++) {
190163
+ destNode.setAttributeNode(cloneNode(doc, attrs.item(i), true));
190164
+ }
190165
+ break;
190166
+ case ATTRIBUTE_NODE:
190167
+ shouldDeep = true;
190168
+ }
190169
+ // 3. Attach to parent, or capture as the root of the cloned subtree.
190170
+ if (destParent !== null) {
190171
+ destParent.appendChild(destNode);
190172
+ } else {
190173
+ destRoot = destNode;
190174
+ }
190175
+ // 4. Return destNode as the context for children (causes walkDOM to descend),
190176
+ // or null to skip children (shallow clone).
190177
+ return shouldDeep ? destNode : null;
190178
+ },
190179
+ });
190180
+ return destRoot;
189722
190181
  }
189723
190182
 
189724
190183
  function __set__(object,key,value){
@@ -189734,49 +190193,55 @@ function requireDom () {
189734
190193
  }
189735
190194
  });
189736
190195
 
189737
- Object.defineProperty(Node.prototype,'textContent',{
189738
- get:function(){
189739
- return getTextContent(this);
190196
+ /**
190197
+ * The text content of this node and its descendants.
190198
+ *
190199
+ * Setting `textContent` on an element or document fragment replaces all child nodes with a
190200
+ * single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly.
190201
+ *
190202
+ * @type {string | null}
190203
+ * @see {@link https://dom.spec.whatwg.org/#dom-node-textcontent}
190204
+ */
190205
+ Object.defineProperty(Node.prototype, 'textContent', {
190206
+ get: function () {
190207
+ if (this.nodeType === ELEMENT_NODE || this.nodeType === DOCUMENT_FRAGMENT_NODE) {
190208
+ var buf = [];
190209
+ walkDOM(this, null, {
190210
+ enter: function (n) {
190211
+ if (n.nodeType === ELEMENT_NODE || n.nodeType === DOCUMENT_FRAGMENT_NODE) {
190212
+ return true; // enter children
190213
+ }
190214
+ if (n.nodeType === PROCESSING_INSTRUCTION_NODE || n.nodeType === COMMENT_NODE) {
190215
+ return null; // excluded from text content
190216
+ }
190217
+ buf.push(n.nodeValue);
190218
+ },
190219
+ });
190220
+ return buf.join('');
190221
+ }
190222
+ return this.nodeValue;
189740
190223
  },
189741
190224
 
189742
- set:function(data){
189743
- switch(this.nodeType){
189744
- case ELEMENT_NODE:
189745
- case DOCUMENT_FRAGMENT_NODE:
189746
- while(this.firstChild){
189747
- this.removeChild(this.firstChild);
189748
- }
189749
- if(data || String(data)){
189750
- this.appendChild(this.ownerDocument.createTextNode(data));
189751
- }
189752
- break;
190225
+ set: function (data) {
190226
+ switch (this.nodeType) {
190227
+ case ELEMENT_NODE:
190228
+ case DOCUMENT_FRAGMENT_NODE:
190229
+ while (this.firstChild) {
190230
+ this.removeChild(this.firstChild);
190231
+ }
190232
+ if (data || String(data)) {
190233
+ this.appendChild(this.ownerDocument.createTextNode(data));
190234
+ }
190235
+ break;
189753
190236
 
189754
- default:
189755
- this.data = data;
189756
- this.value = data;
189757
- this.nodeValue = data;
190237
+ default:
190238
+ this.data = data;
190239
+ this.value = data;
190240
+ this.nodeValue = data;
189758
190241
  }
189759
- }
190242
+ },
189760
190243
  });
189761
190244
 
189762
- function getTextContent(node){
189763
- switch(node.nodeType){
189764
- case ELEMENT_NODE:
189765
- case DOCUMENT_FRAGMENT_NODE:
189766
- var buf = [];
189767
- node = node.firstChild;
189768
- while(node){
189769
- if(node.nodeType!==7 && node.nodeType !==8){
189770
- buf.push(getTextContent(node));
189771
- }
189772
- node = node.nextSibling;
189773
- }
189774
- return buf.join('');
189775
- default:
189776
- return node.nodeValue;
189777
- }
189778
- }
189779
-
189780
190245
  __set__ = function(object,key,value){
189781
190246
  //console.log(value)
189782
190247
  object['$$'+key] = value;
@@ -189792,6 +190257,7 @@ function requireDom () {
189792
190257
  dom.Element = Element;
189793
190258
  dom.Node = Node;
189794
190259
  dom.NodeList = NodeList;
190260
+ dom.walkDOM = walkDOM;
189795
190261
  dom.XMLSerializer = XMLSerializer;
189796
190262
  //}
189797
190263
  return dom;
@@ -192582,7 +193048,7 @@ function requireSax () {
192582
193048
  function parseInstruction(source,start,domBuilder){
192583
193049
  var end = source.indexOf('?>',start);
192584
193050
  if(end){
192585
- var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
193051
+ var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)$/);
192586
193052
  if(match){
192587
193053
  match[0].length;
192588
193054
  domBuilder.processingInstruction(match[1], match[2]) ;
@@ -199469,7 +199935,7 @@ function requireMomentTimezone () {
199469
199935
  hasRequiredMomentTimezone = 1;
199470
199936
  (function (module) {
199471
199937
  //! moment-timezone.js
199472
- //! version : 0.6.0
199938
+ //! version : 0.6.2
199473
199939
  //! Copyright (c) JS Foundation and other contributors
199474
199940
  //! license : MIT
199475
199941
  //! github.com/moment/moment-timezone
@@ -199495,7 +199961,7 @@ function requireMomentTimezone () {
199495
199961
  // return moment;
199496
199962
  // }
199497
199963
 
199498
- var VERSION = "0.6.0",
199964
+ var VERSION = "0.6.2",
199499
199965
  zones = {},
199500
199966
  links = {},
199501
199967
  countries = {},