@wavemaker/angular-codegen 11.14.1-3.6306 → 11.14.1-32.647748
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/angular-app/dependency-report.html +1 -1
- package/angular-app/npm-shrinkwrap.json +2799 -2190
- package/angular-app/package-lock.json +2799 -2190
- package/angular-app/package.json +6 -6
- package/dependencies/custom-widgets-bundle.cjs.js +61 -63
- package/dependencies/expression-parser.cjs.js +2 -2
- package/dependencies/pipe-provider.cjs.js +2108 -1174
- package/dependencies/transpilation-web.cjs.js +1055 -588
- package/npm-shrinkwrap.json +410 -343
- package/package-lock.json +410 -343
- package/package.json +2 -2
- package/src/update-angular-json.js +1 -1
|
@@ -33117,7 +33117,7 @@ function verifySemanticsOfNgModuleDef$1(moduleType, allowDuplicateDeclarationsIn
|
|
|
33117
33117
|
verifySemanticsOfNgModuleImport(modOrStandaloneCmpt, moduleType);
|
|
33118
33118
|
verifySemanticsOfNgModuleDef$1(modOrStandaloneCmpt, false, moduleType);
|
|
33119
33119
|
});
|
|
33120
|
-
const exports
|
|
33120
|
+
const exports = maybeUnwrapFn$1(ngModuleDef.exports);
|
|
33121
33121
|
declarations.forEach(verifyDeclarationsHaveDefinitions);
|
|
33122
33122
|
declarations.forEach(verifyDirectivesHaveSelector);
|
|
33123
33123
|
declarations.forEach((declarationType) => verifyNotStandalone(declarationType, moduleType));
|
|
@@ -33125,7 +33125,7 @@ function verifySemanticsOfNgModuleDef$1(moduleType, allowDuplicateDeclarationsIn
|
|
|
33125
33125
|
...declarations.map(resolveForwardRef$1),
|
|
33126
33126
|
...flatten$3(imports.map(computeCombinedExports$1)).map(resolveForwardRef$1),
|
|
33127
33127
|
];
|
|
33128
|
-
exports
|
|
33128
|
+
exports.forEach(verifyExportsAreDeclaredOrReExported);
|
|
33129
33129
|
declarations.forEach((decl) => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));
|
|
33130
33130
|
const ngModule = getAnnotation$1(moduleType, 'NgModule');
|
|
33131
33131
|
if (ngModule) {
|
|
@@ -81193,7 +81193,7 @@ function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRo
|
|
|
81193
81193
|
verifySemanticsOfNgModuleImport(modOrStandaloneCmpt, moduleType);
|
|
81194
81194
|
verifySemanticsOfNgModuleDef(modOrStandaloneCmpt, false, moduleType);
|
|
81195
81195
|
});
|
|
81196
|
-
const exports
|
|
81196
|
+
const exports = maybeUnwrapFn(ngModuleDef.exports);
|
|
81197
81197
|
declarations.forEach(verifyDeclarationsHaveDefinitions);
|
|
81198
81198
|
declarations.forEach(verifyDirectivesHaveSelector);
|
|
81199
81199
|
declarations.forEach((declarationType) => verifyNotStandalone(declarationType, moduleType));
|
|
@@ -81201,7 +81201,7 @@ function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRo
|
|
|
81201
81201
|
...declarations.map(resolveForwardRef),
|
|
81202
81202
|
...flatten$1(imports.map(computeCombinedExports)).map(resolveForwardRef),
|
|
81203
81203
|
];
|
|
81204
|
-
exports
|
|
81204
|
+
exports.forEach(verifyExportsAreDeclaredOrReExported);
|
|
81205
81205
|
declarations.forEach((decl) => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));
|
|
81206
81206
|
const ngModule = getAnnotation(moduleType, 'NgModule');
|
|
81207
81207
|
if (ngModule) {
|
|
@@ -102019,14 +102019,14 @@ function createNgModuleType$1(meta) {
|
|
|
102019
102019
|
if (meta.kind === R3NgModuleMetadataKind$1.Local) {
|
|
102020
102020
|
return new ExpressionType$1$1(meta.type.value);
|
|
102021
102021
|
}
|
|
102022
|
-
const { type: moduleType, declarations, exports
|
|
102022
|
+
const { type: moduleType, declarations, exports, imports, includeImportTypes, publicDeclarationTypes, } = meta;
|
|
102023
102023
|
return new ExpressionType$1$1(importExpr$1(Identifiers$1.NgModuleDeclaration, [
|
|
102024
102024
|
new ExpressionType$1$1(moduleType.type),
|
|
102025
102025
|
publicDeclarationTypes === null
|
|
102026
102026
|
? tupleTypeOf$1(declarations)
|
|
102027
102027
|
: tupleOfTypes$1(publicDeclarationTypes),
|
|
102028
102028
|
includeImportTypes ? tupleTypeOf$1(imports) : NONE_TYPE$1,
|
|
102029
|
-
tupleTypeOf$1(exports
|
|
102029
|
+
tupleTypeOf$1(exports),
|
|
102030
102030
|
]));
|
|
102031
102031
|
}
|
|
102032
102032
|
/**
|
|
@@ -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$
|
|
124645
|
+
var objectProto$i$1 = Object.prototype;
|
|
124646
124646
|
|
|
124647
124647
|
/** Used to check objects for own properties. */
|
|
124648
|
-
var hasOwnProperty$
|
|
124648
|
+
var hasOwnProperty$f$1 = objectProto$i$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$
|
|
124655
|
+
var nativeObjectToString$1$1 = objectProto$i$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$
|
|
124668
|
+
var isOwn = hasOwnProperty$f$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$
|
|
124688
|
+
var objectProto$h$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$
|
|
124695
|
+
var nativeObjectToString$2 = objectProto$h$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$
|
|
125161
|
+
objectProto$g$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$
|
|
125167
|
+
var hasOwnProperty$e$1 = objectProto$g$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$
|
|
125171
|
+
funcToString$1$1.call(hasOwnProperty$e$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$
|
|
125586
|
+
var objectProto$f$1 = Object.prototype;
|
|
125587
125587
|
|
|
125588
125588
|
/** Used to check objects for own properties. */
|
|
125589
|
-
var hasOwnProperty$
|
|
125589
|
+
var hasOwnProperty$d$1 = objectProto$f$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$c$1 = objectProto$e$1.hasOwnProperty;
|
|
|
125600
125600
|
*/
|
|
125601
125601
|
function assignValue$1(object, key, value) {
|
|
125602
125602
|
var objValue = object[key];
|
|
125603
|
-
if (!(hasOwnProperty$
|
|
125603
|
+
if (!(hasOwnProperty$d$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$
|
|
125809
|
+
var objectProto$e$1 = Object.prototype;
|
|
125810
125810
|
|
|
125811
125811
|
/**
|
|
125812
125812
|
* Checks if `value` is likely a prototype object.
|
|
@@ -125817,7 +125817,7 @@ var objectProto$d$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$
|
|
125820
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$e$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$
|
|
125859
|
+
var objectProto$d$1 = Object.prototype;
|
|
125860
125860
|
|
|
125861
125861
|
/** Used to check objects for own properties. */
|
|
125862
|
-
var hasOwnProperty$
|
|
125862
|
+
var hasOwnProperty$c$1 = objectProto$d$1.hasOwnProperty;
|
|
125863
125863
|
|
|
125864
125864
|
/** Built-in value references. */
|
|
125865
|
-
var propertyIsEnumerable$1$1 = objectProto$
|
|
125865
|
+
var propertyIsEnumerable$1$1 = objectProto$d$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$c$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$
|
|
125886
|
+
return isObjectLike$1(value) && hasOwnProperty$c$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$
|
|
126059
|
+
var objectProto$c$1 = Object.prototype;
|
|
126060
126060
|
|
|
126061
126061
|
/** Used to check objects for own properties. */
|
|
126062
|
-
var hasOwnProperty$
|
|
126062
|
+
var hasOwnProperty$b$1 = objectProto$c$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$
|
|
126082
|
+
if ((inherited || hasOwnProperty$b$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$
|
|
126117
|
+
var objectProto$b$1 = Object.prototype;
|
|
126118
126118
|
|
|
126119
126119
|
/** Used to check objects for own properties. */
|
|
126120
|
-
var hasOwnProperty$
|
|
126120
|
+
var hasOwnProperty$a$1 = objectProto$b$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$
|
|
126135
|
+
if (hasOwnProperty$a$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$
|
|
126175
|
+
var objectProto$a$1 = Object.prototype;
|
|
126176
126176
|
|
|
126177
126177
|
/** Used to check objects for own properties. */
|
|
126178
|
-
var hasOwnProperty$
|
|
126178
|
+
var hasOwnProperty$9$1 = objectProto$a$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$
|
|
126218
|
+
if (hasOwnProperty$9$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$
|
|
126244
|
+
var objectProto$9$1 = Object.prototype;
|
|
126245
126245
|
|
|
126246
126246
|
/** Used to check objects for own properties. */
|
|
126247
|
-
var hasOwnProperty$
|
|
126247
|
+
var hasOwnProperty$8$1 = objectProto$9$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$
|
|
126264
|
+
if (!(key == 'constructor' && (isProto || !hasOwnProperty$8$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$
|
|
126358
|
+
var objectProto$8$1 = Object.prototype;
|
|
126359
126359
|
|
|
126360
126360
|
/** Used to check objects for own properties. */
|
|
126361
|
-
var hasOwnProperty$
|
|
126361
|
+
var hasOwnProperty$7$1 = objectProto$8$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$
|
|
126378
|
+
return hasOwnProperty$7$1.call(data, key) ? data[key] : undefined;
|
|
126379
126379
|
}
|
|
126380
126380
|
|
|
126381
126381
|
/** Used for built-in method references. */
|
|
126382
|
-
var objectProto$
|
|
126382
|
+
var objectProto$7$1 = Object.prototype;
|
|
126383
126383
|
|
|
126384
126384
|
/** Used to check objects for own properties. */
|
|
126385
|
-
var hasOwnProperty$
|
|
126385
|
+
var hasOwnProperty$6$1 = objectProto$7$1.hasOwnProperty;
|
|
126386
126386
|
|
|
126387
126387
|
/**
|
|
126388
126388
|
* Checks if a hash value for `key` exists.
|
|
@@ -126395,7 +126395,7 @@ var hasOwnProperty$5$1 = objectProto$6$1.hasOwnProperty;
|
|
|
126395
126395
|
*/
|
|
126396
126396
|
function hashHas$1(key) {
|
|
126397
126397
|
var data = this.__data__;
|
|
126398
|
-
return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$
|
|
126398
|
+
return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$6$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$
|
|
127043
|
+
objectProto$6$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$
|
|
127049
|
+
var hasOwnProperty$5$1 = objectProto$6$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$
|
|
127090
|
+
var Ctor = hasOwnProperty$5$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$
|
|
127895
|
+
var objectProto$5$1 = Object.prototype;
|
|
127896
127896
|
|
|
127897
127897
|
/** Built-in value references. */
|
|
127898
|
-
var propertyIsEnumerable$2 = objectProto$
|
|
127898
|
+
var propertyIsEnumerable$2 = objectProto$5$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$
|
|
128061
|
+
var objectProto$4$1 = Object.prototype;
|
|
128062
128062
|
|
|
128063
128063
|
/** Used to check objects for own properties. */
|
|
128064
|
-
var hasOwnProperty$
|
|
128064
|
+
var hasOwnProperty$4$1 = objectProto$4$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$
|
|
128078
|
+
if (length && typeof array[0] == 'string' && hasOwnProperty$4$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 {
|
|
128539
|
+
* @returns {boolean} 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$
|
|
128822
|
+
var objectProto$3$1 = Object.prototype;
|
|
128823
128823
|
|
|
128824
128824
|
/** Used to check objects for own properties. */
|
|
128825
|
-
var hasOwnProperty$
|
|
128825
|
+
var hasOwnProperty$3$1 = objectProto$3$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$
|
|
128853
|
+
if (!(isPartial ? key in other : hasOwnProperty$3$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$
|
|
128914
|
+
var objectProto$2$1 = Object.prototype;
|
|
128915
128915
|
|
|
128916
128916
|
/** Used to check objects for own properties. */
|
|
128917
|
-
var hasOwnProperty$
|
|
128917
|
+
var hasOwnProperty$2$1 = objectProto$2$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$
|
|
128961
|
-
othIsWrapped = othIsObj && hasOwnProperty$
|
|
128960
|
+
var objIsWrapped = objIsObj && hasOwnProperty$2$1.call(object, '__wrapped__'),
|
|
128961
|
+
othIsWrapped = othIsObj && hasOwnProperty$2$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$
|
|
130375
|
+
var objectProto$1$1 = Object.prototype;
|
|
130376
130376
|
|
|
130377
130377
|
/** Used to check objects for own properties. */
|
|
130378
|
-
var hasOwnProperty$
|
|
130378
|
+
var hasOwnProperty$1$1 = objectProto$1$1.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$
|
|
130430
|
+
if (hasOwnProperty$1$1.call(value, key)) {
|
|
130431
130431
|
return false;
|
|
130432
130432
|
}
|
|
130433
130433
|
}
|
|
@@ -130651,6 +130651,12 @@ 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
|
+
|
|
130654
130660
|
/**
|
|
130655
130661
|
* The base implementation of `_.unset`.
|
|
130656
130662
|
*
|
|
@@ -130661,8 +130667,34 @@ var merge$2 = createAssigner$1(function(object, source, srcIndex) {
|
|
|
130661
130667
|
*/
|
|
130662
130668
|
function baseUnset$1(object, path) {
|
|
130663
130669
|
path = castPath$1(path, object);
|
|
130664
|
-
|
|
130665
|
-
|
|
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))];
|
|
130666
130698
|
}
|
|
130667
130699
|
|
|
130668
130700
|
/**
|
|
@@ -131162,11 +131194,22 @@ function requireConventions$1 () {
|
|
|
131162
131194
|
XMLNS: 'http://www.w3.org/2000/xmlns/',
|
|
131163
131195
|
});
|
|
131164
131196
|
|
|
131197
|
+
//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
|
131198
|
+
//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
|
|
131199
|
+
//[5] Name ::= NameStartChar (NameChar)*
|
|
131200
|
+
var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
|
|
131201
|
+
var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
|
|
131202
|
+
var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
|
|
131203
|
+
//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
|
|
131204
|
+
|
|
131165
131205
|
conventions$1.assign = assign;
|
|
131166
131206
|
conventions$1.find = find;
|
|
131167
131207
|
conventions$1.freeze = freeze;
|
|
131168
131208
|
conventions$1.MIME_TYPE = MIME_TYPE;
|
|
131169
131209
|
conventions$1.NAMESPACE = NAMESPACE;
|
|
131210
|
+
conventions$1.nameStartChar = nameStartChar;
|
|
131211
|
+
conventions$1.nameChar = nameChar;
|
|
131212
|
+
conventions$1.tagNamePattern = tagNamePattern;
|
|
131170
131213
|
return conventions$1;
|
|
131171
131214
|
}
|
|
131172
131215
|
|
|
@@ -131179,6 +131222,7 @@ function requireDom$1 () {
|
|
|
131179
131222
|
|
|
131180
131223
|
var find = conventions.find;
|
|
131181
131224
|
var NAMESPACE = conventions.NAMESPACE;
|
|
131225
|
+
var tagNamePattern = conventions.tagNamePattern;
|
|
131182
131226
|
|
|
131183
131227
|
/**
|
|
131184
131228
|
* A prerequisite for `[].filter`, to drop elements that are empty
|
|
@@ -131288,14 +131332,14 @@ function requireDom$1 () {
|
|
|
131288
131332
|
ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
|
|
131289
131333
|
var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
|
|
131290
131334
|
ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
|
|
131291
|
-
ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
|
|
131335
|
+
var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
|
|
131292
131336
|
ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
|
|
131293
131337
|
ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
|
|
131294
131338
|
var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
|
|
131295
131339
|
ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
|
|
131296
131340
|
var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
|
|
131297
131341
|
//level2
|
|
131298
|
-
ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
|
|
131342
|
+
var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
|
|
131299
131343
|
ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
|
|
131300
131344
|
ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
|
|
131301
131345
|
ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
|
|
@@ -131345,9 +131389,10 @@ function requireDom$1 () {
|
|
|
131345
131389
|
item: function(index) {
|
|
131346
131390
|
return index >= 0 && index < this.length ? this[index] : null;
|
|
131347
131391
|
},
|
|
131348
|
-
toString:function(isHTML,nodeFilter){
|
|
131392
|
+
toString:function(isHTML,nodeFilter,options){
|
|
131393
|
+
var requireWellFormed = !!options && !!options.requireWellFormed;
|
|
131349
131394
|
for(var buf = [], i = 0;i<this.length;i++){
|
|
131350
|
-
serializeToString(this[i],buf,isHTML,nodeFilter);
|
|
131395
|
+
serializeToString(this[i],buf,isHTML,nodeFilter,null,requireWellFormed);
|
|
131351
131396
|
}
|
|
131352
131397
|
return buf.join('');
|
|
131353
131398
|
},
|
|
@@ -131409,6 +131454,13 @@ function requireDom$1 () {
|
|
|
131409
131454
|
* used for attributes or DocumentType entities
|
|
131410
131455
|
*/
|
|
131411
131456
|
function NamedNodeMap() {
|
|
131457
|
+
// nodeName -> Attr membership index; lets the parse-time de-duplication in
|
|
131458
|
+
// setNamedItem resolve an existing attribute in O(1) instead of scanning the
|
|
131459
|
+
// list, so building an element with M attributes costs O(M) rather than O(M^2).
|
|
131460
|
+
// The numbered entries and length remain the sole authority for attribute order.
|
|
131461
|
+
// Object.create(null) so an attribute named __proto__ or constructor is an
|
|
131462
|
+
// ordinary key.
|
|
131463
|
+
this._nameIndex = Object.create(null);
|
|
131412
131464
|
}
|
|
131413
131465
|
function _findNodeIndex(list,node){
|
|
131414
131466
|
var i = list.length;
|
|
@@ -131417,12 +131469,27 @@ function requireDom$1 () {
|
|
|
131417
131469
|
}
|
|
131418
131470
|
}
|
|
131419
131471
|
|
|
131472
|
+
function _nnmIndexAdd(list, attr) {
|
|
131473
|
+
list._nameIndex[attr.nodeName] = attr;
|
|
131474
|
+
}
|
|
131475
|
+
function _nnmIndexRemove(list, attr) {
|
|
131476
|
+
// Only drop the entry if it still points at this attribute; a replacement with
|
|
131477
|
+
// a different nodeName may already have re-keyed it.
|
|
131478
|
+
if (list._nameIndex[attr.nodeName] === attr) {
|
|
131479
|
+
delete list._nameIndex[attr.nodeName];
|
|
131480
|
+
}
|
|
131481
|
+
}
|
|
131482
|
+
|
|
131420
131483
|
function _addNamedNode(el,list,newAttr,oldAttr){
|
|
131421
131484
|
if(oldAttr){
|
|
131422
131485
|
list[_findNodeIndex(list,oldAttr)] = newAttr;
|
|
131486
|
+
// oldAttr leaves the list; drop its index entry (its nodeName may differ
|
|
131487
|
+
// from newAttr's when the replacement came via setNamedItemNS).
|
|
131488
|
+
_nnmIndexRemove(list, oldAttr);
|
|
131423
131489
|
}else {
|
|
131424
131490
|
list[list.length++] = newAttr;
|
|
131425
131491
|
}
|
|
131492
|
+
_nnmIndexAdd(list, newAttr);
|
|
131426
131493
|
if(el){
|
|
131427
131494
|
newAttr.ownerElement = el;
|
|
131428
131495
|
var doc = el.ownerDocument;
|
|
@@ -131441,6 +131508,7 @@ function requireDom$1 () {
|
|
|
131441
131508
|
list[i] = list[++i];
|
|
131442
131509
|
}
|
|
131443
131510
|
list.length = lastIndex;
|
|
131511
|
+
_nnmIndexRemove(list, attr);
|
|
131444
131512
|
if(el){
|
|
131445
131513
|
var doc = el.ownerDocument;
|
|
131446
131514
|
if(doc){
|
|
@@ -131474,7 +131542,11 @@ function requireDom$1 () {
|
|
|
131474
131542
|
if(el && el!=this._ownerElement){
|
|
131475
131543
|
throw new DOMException(INUSE_ATTRIBUTE_ERR);
|
|
131476
131544
|
}
|
|
131477
|
-
|
|
131545
|
+
// Resolve any existing attribute with the same nodeName through the O(1)
|
|
131546
|
+
// membership index rather than an O(M) scan — this is the parse-dedup hot
|
|
131547
|
+
// path (setAttributeNode per attribute during parse). Absent -> undefined,
|
|
131548
|
+
// matching getNamedItem's contract.
|
|
131549
|
+
var oldAttr = this._nameIndex[attr.nodeName];
|
|
131478
131550
|
_addNamedNode(this._ownerElement,this,attr,oldAttr);
|
|
131479
131551
|
return oldAttr;
|
|
131480
131552
|
},
|
|
@@ -131592,13 +131664,28 @@ function requireDom$1 () {
|
|
|
131592
131664
|
/**
|
|
131593
131665
|
* Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.
|
|
131594
131666
|
*
|
|
131595
|
-
* __This
|
|
131667
|
+
* __This implementation differs from the specification:__
|
|
131596
131668
|
* - this implementation is not validating names or qualified names
|
|
131597
131669
|
* (when parsing XML strings, the SAX parser takes care of that)
|
|
131598
131670
|
*
|
|
131671
|
+
* Note: `internalSubset` can only be introduced via a direct property write to `node.internalSubset` after creation.
|
|
131672
|
+
* Creation-time validation of `publicId`, `systemId` is not enforced.
|
|
131673
|
+
* The serializer-level check covers all mutation vectors, including direct property writes.
|
|
131674
|
+
* `internalSubset` is only serialized as `[ ... ]` when both `publicId` and `systemId` are
|
|
131675
|
+
* absent (empty or `'.'`) — if either external identifier is present, `internalSubset` is
|
|
131676
|
+
* silently omitted from the serialized output.
|
|
131677
|
+
*
|
|
131599
131678
|
* @param {string} qualifiedName
|
|
131600
131679
|
* @param {string} [publicId]
|
|
131680
|
+
* The external subset public identifier. Stored verbatim including surrounding quotes.
|
|
131681
|
+
* When serialized with `requireWellFormed: true` (via the 4th-parameter options object),
|
|
131682
|
+
* throws `DOMException` with code `INVALID_STATE_ERR` if the value is non-empty and does
|
|
131683
|
+
* not match the XML `PubidLiteral` production (W3C DOM Parsing §3.2.1.3; XML 1.0 [12]).
|
|
131601
131684
|
* @param {string} [systemId]
|
|
131685
|
+
* The external subset system identifier. Stored verbatim including surrounding quotes.
|
|
131686
|
+
* When serialized with `requireWellFormed: true`, throws `DOMException` with code
|
|
131687
|
+
* `INVALID_STATE_ERR` if the value is non-empty and does not match the XML `SystemLiteral`
|
|
131688
|
+
* production (W3C DOM Parsing §3.2.1.3; XML 1.0 [11]).
|
|
131602
131689
|
* @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation
|
|
131603
131690
|
* or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`
|
|
131604
131691
|
*
|
|
@@ -131664,18 +131751,73 @@ function requireDom$1 () {
|
|
|
131664
131751
|
return cloneNode(this.ownerDocument||this,this,deep);
|
|
131665
131752
|
},
|
|
131666
131753
|
// Modified in DOM Level 2:
|
|
131667
|
-
|
|
131668
|
-
|
|
131669
|
-
|
|
131670
|
-
|
|
131671
|
-
|
|
131672
|
-
|
|
131673
|
-
|
|
131674
|
-
|
|
131675
|
-
|
|
131676
|
-
|
|
131677
|
-
|
|
131678
|
-
|
|
131754
|
+
/**
|
|
131755
|
+
* Puts the specified node and all of its subtree into a "normalized" form. In a normalized
|
|
131756
|
+
* subtree, no text nodes in the subtree are empty and there are no adjacent text nodes.
|
|
131757
|
+
*
|
|
131758
|
+
* Specifically, this method merges any adjacent text nodes (i.e., nodes for which `nodeType`
|
|
131759
|
+
* is `TEXT_NODE`) into a single node with the combined data. It also removes any empty text
|
|
131760
|
+
* nodes.
|
|
131761
|
+
*
|
|
131762
|
+
* This method iteratively traverses all child nodes to normalize all descendant nodes within
|
|
131763
|
+
* the subtree.
|
|
131764
|
+
*
|
|
131765
|
+
* @throws {DOMException}
|
|
131766
|
+
* May throw a DOMException if operations within removeChild or appendData (which are
|
|
131767
|
+
* potentially invoked in this method) do not meet their specific constraints.
|
|
131768
|
+
* @see {@link Node.removeChild}
|
|
131769
|
+
* @see {@link CharacterData.appendData}
|
|
131770
|
+
* @see ../docs/walk-dom.md.
|
|
131771
|
+
*/
|
|
131772
|
+
normalize: function () {
|
|
131773
|
+
walkDOM(this, null, {
|
|
131774
|
+
enter: function (node) {
|
|
131775
|
+
// Merge adjacent text children of node before walkDOM schedules them.
|
|
131776
|
+
// walkDOM reads lastChild/previousSibling after enter returns, so the
|
|
131777
|
+
// surviving post-merge children are what it descends into.
|
|
131778
|
+
var child = node.firstChild;
|
|
131779
|
+
while (child) {
|
|
131780
|
+
var next = child.nextSibling;
|
|
131781
|
+
if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) {
|
|
131782
|
+
// Merge the whole run of adjacent text nodes at once: gather the
|
|
131783
|
+
// following text siblings' data, unlink them in a single pass, and
|
|
131784
|
+
// re-index the child list a single time. Per-sibling `removeChild`
|
|
131785
|
+
// (each an O(K) re-index) plus per-sibling `appendData` (each an O(K)
|
|
131786
|
+
// string rebuild) is O(K^2) over a long run of single-character text
|
|
131787
|
+
// nodes; this keeps it O(K). The first text node of the run survives
|
|
131788
|
+
// and carries the concatenated data, preserving node identity and
|
|
131789
|
+
// locator semantics.
|
|
131790
|
+
var tail = [];
|
|
131791
|
+
var sibling = next;
|
|
131792
|
+
while (sibling !== null && sibling.nodeType === TEXT_NODE) {
|
|
131793
|
+
tail.push(sibling.data);
|
|
131794
|
+
sibling = sibling.nextSibling;
|
|
131795
|
+
}
|
|
131796
|
+
// `sibling` is now the first non-text node after the run, or null.
|
|
131797
|
+
var removed = child.nextSibling;
|
|
131798
|
+
while (removed !== sibling) {
|
|
131799
|
+
var following = removed.nextSibling;
|
|
131800
|
+
removed.parentNode = null;
|
|
131801
|
+
removed.previousSibling = null;
|
|
131802
|
+
removed.nextSibling = null;
|
|
131803
|
+
removed = following;
|
|
131804
|
+
}
|
|
131805
|
+
child.nextSibling = sibling;
|
|
131806
|
+
if (sibling !== null) {
|
|
131807
|
+
sibling.previousSibling = child;
|
|
131808
|
+
} else {
|
|
131809
|
+
node.lastChild = child;
|
|
131810
|
+
}
|
|
131811
|
+
child.appendData(tail.join('')); // single O(K) string rebuild
|
|
131812
|
+
_onUpdateChild(node.ownerDocument, node); // single O(K) re-index
|
|
131813
|
+
child = sibling;
|
|
131814
|
+
} else {
|
|
131815
|
+
child = next;
|
|
131816
|
+
}
|
|
131817
|
+
}
|
|
131818
|
+
return true; // descend into surviving children
|
|
131819
|
+
},
|
|
131820
|
+
});
|
|
131679
131821
|
},
|
|
131680
131822
|
// Introduced in DOM Level 2:
|
|
131681
131823
|
isSupported:function(feature, version){
|
|
@@ -131751,21 +131893,103 @@ function requireDom$1 () {
|
|
|
131751
131893
|
copy(NodeType,Node.prototype);
|
|
131752
131894
|
|
|
131753
131895
|
/**
|
|
131754
|
-
* @param
|
|
131755
|
-
*
|
|
131896
|
+
* @param {Node} node
|
|
131897
|
+
* Root of the subtree to visit.
|
|
131898
|
+
* @param {function(Node): boolean} callback
|
|
131899
|
+
* Called for each node in depth-first pre-order. Return a truthy value to stop traversal early.
|
|
131900
|
+
* @return {boolean} `true` if traversal was aborted by the callback, `false` otherwise.
|
|
131756
131901
|
*/
|
|
131757
|
-
function _visitNode(node,callback){
|
|
131758
|
-
|
|
131759
|
-
return true;
|
|
131760
|
-
}
|
|
131761
|
-
if(node = node.firstChild){
|
|
131762
|
-
do{
|
|
131763
|
-
if(_visitNode(node,callback)){return true}
|
|
131764
|
-
}while(node=node.nextSibling)
|
|
131765
|
-
}
|
|
131902
|
+
function _visitNode(node, callback) {
|
|
131903
|
+
return walkDOM(node, null, { enter: function (n) { return callback(n) ? walkDOM.STOP : true; } }) === walkDOM.STOP;
|
|
131766
131904
|
}
|
|
131767
131905
|
|
|
131906
|
+
/**
|
|
131907
|
+
* Depth-first pre/post-order DOM tree walker.
|
|
131908
|
+
*
|
|
131909
|
+
* Visits every node in the subtree rooted at `node`. For each node:
|
|
131910
|
+
*
|
|
131911
|
+
* 1. Calls `callbacks.enter(node, context)` before descending into the node's children. The
|
|
131912
|
+
* return value becomes the `context` passed to each child's `enter` call and to the matching
|
|
131913
|
+
* `exit` call.
|
|
131914
|
+
* 2. If `enter` returns `null` or `undefined`, the node's children are skipped;
|
|
131915
|
+
* sibling traversal continues normally.
|
|
131916
|
+
* 3. If `enter` returns `walkDOM.STOP`, the entire traversal is aborted immediately — no
|
|
131917
|
+
* further `enter` or `exit` calls are made.
|
|
131918
|
+
* 4. `lastChild` and `previousSibling` are read **after** `enter` returns, so `enter` may
|
|
131919
|
+
* safely modify the node's own child list before the walker descends. Modifying siblings of
|
|
131920
|
+
* the current node or any other part of the tree produces unpredictable results: nodes already
|
|
131921
|
+
* queued on the stack are visited regardless of DOM changes, and newly inserted nodes outside
|
|
131922
|
+
* the current child list are never visited.
|
|
131923
|
+
* 5. Calls `callbacks.exit(node, context)` (if provided) after all of a node's children have
|
|
131924
|
+
* been visited, passing the same `context` that `enter`
|
|
131925
|
+
* returned for that node.
|
|
131926
|
+
*
|
|
131927
|
+
* This implementation uses an explicit stack and does not recurse — it is safe on arbitrarily
|
|
131928
|
+
* deep trees.
|
|
131929
|
+
*
|
|
131930
|
+
* @param {Node} node
|
|
131931
|
+
* Root of the subtree to walk.
|
|
131932
|
+
* @param {*} context
|
|
131933
|
+
* Initial context value passed to the root node's `enter`.
|
|
131934
|
+
* @param {{ enter: function(Node, *): *, exit?: function(Node, *): void }} callbacks
|
|
131935
|
+
* @returns {void | walkDOM.STOP}
|
|
131936
|
+
* @see ../docs/walk-dom.md.
|
|
131937
|
+
*/
|
|
131938
|
+
function walkDOM(node, context, callbacks) {
|
|
131939
|
+
// Each stack frame is {node, context, phase}:
|
|
131940
|
+
// walkDOM.ENTER — call enter, then push children
|
|
131941
|
+
// walkDOM.EXIT — call exit
|
|
131942
|
+
var stack = [{ node: node, context: context, phase: walkDOM.ENTER }];
|
|
131943
|
+
while (stack.length > 0) {
|
|
131944
|
+
var frame = stack.pop();
|
|
131945
|
+
if (frame.phase === walkDOM.ENTER) {
|
|
131946
|
+
var childContext = callbacks.enter(frame.node, frame.context);
|
|
131947
|
+
if (childContext === walkDOM.STOP) {
|
|
131948
|
+
return walkDOM.STOP;
|
|
131949
|
+
}
|
|
131950
|
+
// Push exit frame before children so it fires after all children are processed (Last In First Out)
|
|
131951
|
+
stack.push({ node: frame.node, context: childContext, phase: walkDOM.EXIT });
|
|
131952
|
+
if (childContext === null || childContext === undefined) {
|
|
131953
|
+
continue; // skip children
|
|
131954
|
+
}
|
|
131955
|
+
// lastChild is read after enter returns, so enter may modify the child list.
|
|
131956
|
+
var child = frame.node.lastChild;
|
|
131957
|
+
// Traverse from lastChild backwards so that pushing onto the stack
|
|
131958
|
+
// naturally yields firstChild on top (processed first).
|
|
131959
|
+
while (child) {
|
|
131960
|
+
stack.push({ node: child, context: childContext, phase: walkDOM.ENTER });
|
|
131961
|
+
child = child.previousSibling;
|
|
131962
|
+
}
|
|
131963
|
+
} else {
|
|
131964
|
+
// frame.phase === walkDOM.EXIT
|
|
131965
|
+
if (callbacks.exit) {
|
|
131966
|
+
callbacks.exit(frame.node, frame.context);
|
|
131967
|
+
}
|
|
131968
|
+
}
|
|
131969
|
+
}
|
|
131970
|
+
}
|
|
131768
131971
|
|
|
131972
|
+
/**
|
|
131973
|
+
* Sentinel value returned from a `walkDOM` `enter` callback to abort the entire traversal
|
|
131974
|
+
* immediately.
|
|
131975
|
+
*
|
|
131976
|
+
* @type {symbol}
|
|
131977
|
+
*/
|
|
131978
|
+
walkDOM.STOP = Symbol('walkDOM.STOP');
|
|
131979
|
+
/**
|
|
131980
|
+
* Phase constant for a stack frame that has not yet been visited.
|
|
131981
|
+
* The `enter` callback is called and children are scheduled.
|
|
131982
|
+
*
|
|
131983
|
+
* @type {number}
|
|
131984
|
+
*/
|
|
131985
|
+
walkDOM.ENTER = 0;
|
|
131986
|
+
/**
|
|
131987
|
+
* Phase constant for a stack frame whose subtree has been fully visited.
|
|
131988
|
+
* The `exit` callback is called.
|
|
131989
|
+
*
|
|
131990
|
+
* @type {number}
|
|
131991
|
+
*/
|
|
131992
|
+
walkDOM.EXIT = 1;
|
|
131769
131993
|
|
|
131770
131994
|
function Document(){
|
|
131771
131995
|
this.ownerDocument = this;
|
|
@@ -132369,12 +132593,46 @@ function requireDom$1 () {
|
|
|
132369
132593
|
node.appendData(data);
|
|
132370
132594
|
return node;
|
|
132371
132595
|
},
|
|
132596
|
+
/**
|
|
132597
|
+
* Returns a new CDATASection node whose data is `data`.
|
|
132598
|
+
*
|
|
132599
|
+
* __This implementation differs from the specification:__
|
|
132600
|
+
* - calling this method on an HTML document does not throw `NotSupportedError`.
|
|
132601
|
+
*
|
|
132602
|
+
* @param {string} data
|
|
132603
|
+
* @returns {CDATASection}
|
|
132604
|
+
* @throws DOMException with code `INVALID_CHARACTER_ERR` if `data` contains `"]]>"`.
|
|
132605
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createCDATASection
|
|
132606
|
+
* @see https://dom.spec.whatwg.org/#dom-document-createcdatasection
|
|
132607
|
+
*/
|
|
132372
132608
|
createCDATASection : function(data){
|
|
132609
|
+
if (data.indexOf(']]>') !== -1) {
|
|
132610
|
+
throw new DOMException(INVALID_CHARACTER_ERR, 'data contains "]]>"');
|
|
132611
|
+
}
|
|
132373
132612
|
var node = new CDATASection();
|
|
132374
132613
|
node.ownerDocument = this;
|
|
132375
132614
|
node.appendData(data);
|
|
132376
132615
|
return node;
|
|
132377
132616
|
},
|
|
132617
|
+
/**
|
|
132618
|
+
* Returns a ProcessingInstruction node whose target is target and data is data.
|
|
132619
|
+
*
|
|
132620
|
+
* __This implementation differs from the specification:__
|
|
132621
|
+
* - it does not do any input validation on the arguments and doesn't throw "InvalidCharacterError".
|
|
132622
|
+
*
|
|
132623
|
+
* Note: When the resulting document is serialized with `requireWellFormed: true`, the
|
|
132624
|
+
* serializer throws with code `INVALID_STATE_ERR` if `.target` is not a valid XML `NCName`
|
|
132625
|
+
* (a `Name` with no colon) or is an ASCII case-insensitive match for `"xml"`, or if `.data`
|
|
132626
|
+
* contains `?>` (W3C DOM Parsing §3.2.1.7). Without that option the target and data are
|
|
132627
|
+
* emitted verbatim.
|
|
132628
|
+
*
|
|
132629
|
+
* @param {string} target
|
|
132630
|
+
* @param {string} data
|
|
132631
|
+
* @returns {ProcessingInstruction}
|
|
132632
|
+
* @see https://developer.mozilla.org/docs/Web/API/Document/createProcessingInstruction
|
|
132633
|
+
* @see https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction
|
|
132634
|
+
* @see https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml §3.2.1.7
|
|
132635
|
+
*/
|
|
132378
132636
|
createProcessingInstruction : function(target,data){
|
|
132379
132637
|
var node = new ProcessingInstruction();
|
|
132380
132638
|
node.ownerDocument = this;
|
|
@@ -132391,7 +132649,27 @@ function requireDom$1 () {
|
|
|
132391
132649
|
node.specified = true;
|
|
132392
132650
|
return node;
|
|
132393
132651
|
},
|
|
132652
|
+
/**
|
|
132653
|
+
* Creates an EntityReference object, serialized as `&name;`.
|
|
132654
|
+
*
|
|
132655
|
+
* The `name` is validated against the XML `Name` production at creation time; an invalid name
|
|
132656
|
+
* throws a `DOMException` with code `INVALID_CHARACTER_ERR`. When the resulting node is
|
|
132657
|
+
* serialized with `requireWellFormed: true`, the serializer re-validates `nodeName` and throws
|
|
132658
|
+
* a `DOMException` with code `INVALID_STATE_ERR` if a later `nodeName` mutation made it invalid;
|
|
132659
|
+
* without that option the name is emitted verbatim.
|
|
132660
|
+
*
|
|
132661
|
+
* Note: xmldom does not expand entities — the parser resolves entity references inline and never
|
|
132662
|
+
* constructs `EntityReference` nodes, so this method is the only producer.
|
|
132663
|
+
*
|
|
132664
|
+
* @param {string} name The name of the entity to reference.
|
|
132665
|
+
* @returns {EntityReference}
|
|
132666
|
+
* @throws {DOMException} With code `INVALID_CHARACTER_ERR` when `name` is not a valid XML `Name`.
|
|
132667
|
+
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-392B75AE
|
|
132668
|
+
*/
|
|
132394
132669
|
createEntityReference : function(name){
|
|
132670
|
+
if (!tagNamePattern.test(name)) {
|
|
132671
|
+
throw new DOMException(INVALID_CHARACTER_ERR, 'not a valid xml name "' + name + '"');
|
|
132672
|
+
}
|
|
132395
132673
|
var node = new EntityReference();
|
|
132396
132674
|
node.ownerDocument = this;
|
|
132397
132675
|
node.nodeName = name;
|
|
@@ -132600,6 +132878,20 @@ function requireDom$1 () {
|
|
|
132600
132878
|
_extends(CDATASection,CharacterData);
|
|
132601
132879
|
|
|
132602
132880
|
|
|
132881
|
+
/**
|
|
132882
|
+
* Represents a DocumentType node (the `<!DOCTYPE ...>` declaration).
|
|
132883
|
+
*
|
|
132884
|
+
* `name`, `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
|
|
132885
|
+
* xmldom does not enforce the `readonly` constraint declared by the WHATWG DOM spec —
|
|
132886
|
+
* direct property writes succeed silently. Values are serialized verbatim when
|
|
132887
|
+
* `requireWellFormed` is false (the default). When the serializer is invoked with
|
|
132888
|
+
* `requireWellFormed: true` (via the 4th-parameter options object), it validates each
|
|
132889
|
+
* field — including `name`, which is checked against the XML `Name` production — and throws
|
|
132890
|
+
* `DOMException` with code `INVALID_STATE_ERR` on invalid values.
|
|
132891
|
+
*
|
|
132892
|
+
* @class
|
|
132893
|
+
* @see https://developer.mozilla.org/docs/Web/API/DocumentType MDN
|
|
132894
|
+
*/
|
|
132603
132895
|
function DocumentType() {
|
|
132604
132896
|
} DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
|
|
132605
132897
|
_extends(DocumentType,Node);
|
|
@@ -132612,6 +132904,20 @@ function requireDom$1 () {
|
|
|
132612
132904
|
} Entity.prototype.nodeType = ENTITY_NODE;
|
|
132613
132905
|
_extends(Entity,Node);
|
|
132614
132906
|
|
|
132907
|
+
/**
|
|
132908
|
+
* Represents an EntityReference node, serialized as `&nodeName;`.
|
|
132909
|
+
*
|
|
132910
|
+
* `nodeName` is the referenced entity's name, stored verbatim. When serialized with
|
|
132911
|
+
* `requireWellFormed: true`, the serializer validates `nodeName` against the XML `Name` production
|
|
132912
|
+
* and throws a `DOMException` with code `INVALID_STATE_ERR` if it does not match; without that
|
|
132913
|
+
* option the name is emitted verbatim between `&` and `;`.
|
|
132914
|
+
*
|
|
132915
|
+
* Note: xmldom does not expand entities — the parser resolves entity references inline and never
|
|
132916
|
+
* constructs `EntityReference` nodes, so the only producer is `Document.createEntityReference`.
|
|
132917
|
+
*
|
|
132918
|
+
* @class
|
|
132919
|
+
* @see https://www.w3.org/TR/xml/#NT-Name
|
|
132920
|
+
*/
|
|
132615
132921
|
function EntityReference() {
|
|
132616
132922
|
} EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
|
|
132617
132923
|
_extends(EntityReference,Node);
|
|
@@ -132627,11 +132933,54 @@ function requireDom$1 () {
|
|
|
132627
132933
|
ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
|
|
132628
132934
|
_extends(ProcessingInstruction,Node);
|
|
132629
132935
|
function XMLSerializer(){}
|
|
132630
|
-
|
|
132631
|
-
|
|
132936
|
+
/**
|
|
132937
|
+
* Returns the result of serializing `node` to XML.
|
|
132938
|
+
*
|
|
132939
|
+
* When `options.requireWellFormed` is `true`, the serializer throws for content that would
|
|
132940
|
+
* produce ill-formed XML.
|
|
132941
|
+
*
|
|
132942
|
+
* __This implementation differs from the specification:__
|
|
132943
|
+
* - CDATASection nodes whose data contains `]]>` are serialized by splitting the section
|
|
132944
|
+
* at each `]]>` occurrence (following W3C DOM Level 3 Core `split-cdata-sections`
|
|
132945
|
+
* default behaviour) unless `requireWellFormed` is `true`.
|
|
132946
|
+
* - when `requireWellFormed` is `true`, `DOMException` with code `INVALID_STATE_ERR`
|
|
132947
|
+
* is only thrown to prevent injection vectors, not for all the spec mandated checks.
|
|
132948
|
+
*
|
|
132949
|
+
* @param {Node} node
|
|
132950
|
+
* @param {boolean} [isHtml]
|
|
132951
|
+
* @param {function} [nodeFilter]
|
|
132952
|
+
* @param {Object} [options]
|
|
132953
|
+
* @param {boolean} [options.requireWellFormed=false]
|
|
132954
|
+
* When `true`, throws for content that would produce ill-formed XML.
|
|
132955
|
+
* @returns {string}
|
|
132956
|
+
* @throws {DOMException}
|
|
132957
|
+
* With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
|
|
132958
|
+
* - an Element's qualified name (including any namespace prefix) is not a valid XML QName,
|
|
132959
|
+
* - an attribute's qualified name (including a synthesized `xmlns:` namespace declaration) is
|
|
132960
|
+
* not a valid XML QName,
|
|
132961
|
+
* - a CDATASection node's data contains `"]]>"`,
|
|
132962
|
+
* - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
|
|
132963
|
+
* - a ProcessingInstruction's target is not a valid XML `NCName` (a `Name` with no colon) or is
|
|
132964
|
+
* an ASCII case-insensitive match for `"xml"`, or its data contains `"?>"`,
|
|
132965
|
+
* - a DocumentType's `name` is not a valid XML `Name` (XML 1.0 production [5]),
|
|
132966
|
+
* - a DocumentType's `publicId` is non-empty and does not match the XML `PubidLiteral`
|
|
132967
|
+
* production,
|
|
132968
|
+
* - a DocumentType's `systemId` is non-empty and does not match the XML `SystemLiteral`
|
|
132969
|
+
* production,
|
|
132970
|
+
* - a DocumentType's `internalSubset` contains `"]>"`, or
|
|
132971
|
+
* - an EntityReference's `nodeName` is not a valid XML `Name` (XML 1.0 production [5]).
|
|
132972
|
+
* Note: xmldom does not enforce `readonly` on DocumentType fields — direct property
|
|
132973
|
+
* writes succeed and are covered by the serializer-level checks above.
|
|
132974
|
+
* @see https://html.spec.whatwg.org/#dom-xmlserializer-serializetostring
|
|
132975
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serialization
|
|
132976
|
+
* @see https://github.com/w3c/DOM-Parsing/issues/84
|
|
132977
|
+
*/
|
|
132978
|
+
XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter,options){
|
|
132979
|
+
return nodeSerializeToString.call(node,isHtml,nodeFilter,options);
|
|
132632
132980
|
};
|
|
132633
132981
|
Node.prototype.toString = nodeSerializeToString;
|
|
132634
|
-
function nodeSerializeToString(isHtml,nodeFilter){
|
|
132982
|
+
function nodeSerializeToString(isHtml,nodeFilter,options){
|
|
132983
|
+
var requireWellFormed = !!options && !!options.requireWellFormed;
|
|
132635
132984
|
var buf = [];
|
|
132636
132985
|
var refNode = this.nodeType == 9 && this.documentElement || this;
|
|
132637
132986
|
var prefix = refNode.prefix;
|
|
@@ -132648,7 +132997,7 @@ function requireDom$1 () {
|
|
|
132648
132997
|
];
|
|
132649
132998
|
}
|
|
132650
132999
|
}
|
|
132651
|
-
serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);
|
|
133000
|
+
serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces,requireWellFormed);
|
|
132652
133001
|
//console.log('###',this.nodeType,uri,prefix,buf.join(''))
|
|
132653
133002
|
return buf.join('');
|
|
132654
133003
|
}
|
|
@@ -132693,275 +133042,350 @@ function requireDom$1 () {
|
|
|
132693
133042
|
* @see https://www.w3.org/TR/xml11/#AVNormalize
|
|
132694
133043
|
* @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
|
|
132695
133044
|
*/
|
|
132696
|
-
function addSerializedAttribute(buf, qualifiedName, value) {
|
|
133045
|
+
function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
|
|
133046
|
+
if (requireWellFormed && !tagNamePattern.test(qualifiedName)) {
|
|
133047
|
+
throw new DOMException(INVALID_STATE_ERR, 'The attribute name "' + qualifiedName + '" is not a valid XML QName');
|
|
133048
|
+
}
|
|
132697
133049
|
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
|
|
132698
133050
|
}
|
|
132699
133051
|
|
|
132700
|
-
function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
|
133052
|
+
function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces, requireWellFormed) {
|
|
132701
133053
|
if (!visibleNamespaces) {
|
|
132702
133054
|
visibleNamespaces = [];
|
|
132703
133055
|
}
|
|
132704
|
-
|
|
132705
|
-
|
|
132706
|
-
|
|
132707
|
-
|
|
132708
|
-
|
|
132709
|
-
|
|
132710
|
-
|
|
132711
|
-
|
|
132712
|
-
|
|
132713
|
-
|
|
132714
|
-
|
|
132715
|
-
//buf.sort.apply(attrs, attributeSorter);
|
|
132716
|
-
}
|
|
132717
|
-
|
|
132718
|
-
switch(node.nodeType){
|
|
132719
|
-
case ELEMENT_NODE:
|
|
132720
|
-
var attrs = node.attributes;
|
|
132721
|
-
var len = attrs.length;
|
|
132722
|
-
var child = node.firstChild;
|
|
132723
|
-
var nodeName = node.tagName;
|
|
132724
|
-
|
|
132725
|
-
isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML;
|
|
132726
|
-
|
|
132727
|
-
var prefixedNodeName = nodeName;
|
|
132728
|
-
if (!isHTML && !node.prefix && node.namespaceURI) {
|
|
132729
|
-
var defaultNS;
|
|
132730
|
-
// lookup current default ns from `xmlns` attribute
|
|
132731
|
-
for (var ai = 0; ai < attrs.length; ai++) {
|
|
132732
|
-
if (attrs.item(ai).name === 'xmlns') {
|
|
132733
|
-
defaultNS = attrs.item(ai).value;
|
|
132734
|
-
break
|
|
132735
|
-
}
|
|
132736
|
-
}
|
|
132737
|
-
if (!defaultNS) {
|
|
132738
|
-
// lookup current default ns in visibleNamespaces
|
|
132739
|
-
for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
|
|
132740
|
-
var namespace = visibleNamespaces[nsi];
|
|
132741
|
-
if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {
|
|
132742
|
-
defaultNS = namespace.namespace;
|
|
132743
|
-
break
|
|
133056
|
+
walkDOM(node, { ns: visibleNamespaces, isHTML: isHTML }, {
|
|
133057
|
+
enter: function (n, ctx) {
|
|
133058
|
+
var ns = ctx.ns;
|
|
133059
|
+
var html = ctx.isHTML;
|
|
133060
|
+
|
|
133061
|
+
if (nodeFilter) {
|
|
133062
|
+
n = nodeFilter(n);
|
|
133063
|
+
if (n) {
|
|
133064
|
+
if (typeof n == 'string') {
|
|
133065
|
+
buf.push(n);
|
|
133066
|
+
return null;
|
|
132744
133067
|
}
|
|
133068
|
+
} else {
|
|
133069
|
+
return null;
|
|
132745
133070
|
}
|
|
132746
133071
|
}
|
|
132747
|
-
|
|
132748
|
-
|
|
132749
|
-
|
|
132750
|
-
|
|
132751
|
-
|
|
132752
|
-
|
|
133072
|
+
|
|
133073
|
+
switch (n.nodeType) {
|
|
133074
|
+
case ELEMENT_NODE:
|
|
133075
|
+
var attrs = n.attributes;
|
|
133076
|
+
var len = attrs.length;
|
|
133077
|
+
var nodeName = n.tagName;
|
|
133078
|
+
|
|
133079
|
+
html = NAMESPACE.isHTML(n.namespaceURI) || html;
|
|
133080
|
+
|
|
133081
|
+
var prefixedNodeName = nodeName;
|
|
133082
|
+
if (!html && !n.prefix && n.namespaceURI) {
|
|
133083
|
+
var defaultNS;
|
|
133084
|
+
// lookup current default ns from `xmlns` attribute
|
|
133085
|
+
for (var ai = 0; ai < attrs.length; ai++) {
|
|
133086
|
+
if (attrs.item(ai).name === 'xmlns') {
|
|
133087
|
+
defaultNS = attrs.item(ai).value;
|
|
133088
|
+
break;
|
|
133089
|
+
}
|
|
133090
|
+
}
|
|
133091
|
+
if (!defaultNS) {
|
|
133092
|
+
// lookup current default ns in visibleNamespaces
|
|
133093
|
+
for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
|
|
133094
|
+
var nsEntry = ns[nsi];
|
|
133095
|
+
if (nsEntry.prefix === '' && nsEntry.namespace === n.namespaceURI) {
|
|
133096
|
+
defaultNS = nsEntry.namespace;
|
|
133097
|
+
break;
|
|
133098
|
+
}
|
|
133099
|
+
}
|
|
133100
|
+
}
|
|
133101
|
+
if (defaultNS !== n.namespaceURI) {
|
|
133102
|
+
for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
|
|
133103
|
+
var nsEntry = ns[nsi];
|
|
133104
|
+
if (nsEntry.namespace === n.namespaceURI) {
|
|
133105
|
+
if (nsEntry.prefix) {
|
|
133106
|
+
prefixedNodeName = nsEntry.prefix + ':' + nodeName;
|
|
133107
|
+
}
|
|
133108
|
+
break;
|
|
133109
|
+
}
|
|
133110
|
+
}
|
|
132753
133111
|
}
|
|
132754
|
-
break
|
|
132755
133112
|
}
|
|
132756
|
-
}
|
|
132757
|
-
}
|
|
132758
|
-
}
|
|
132759
133113
|
|
|
132760
|
-
|
|
133114
|
+
if (requireWellFormed && !tagNamePattern.test(prefixedNodeName)) {
|
|
133115
|
+
throw new DOMException(INVALID_STATE_ERR, 'The element name "' + prefixedNodeName + '" is not a valid XML QName');
|
|
133116
|
+
}
|
|
133117
|
+
buf.push('<', prefixedNodeName);
|
|
133118
|
+
|
|
133119
|
+
// Build a fresh namespace snapshot for this element's children.
|
|
133120
|
+
// The slice prevents sibling elements from inheriting each other's declarations.
|
|
133121
|
+
var childNs = ns.slice();
|
|
133122
|
+
for (var i = 0; i < len; i++) {
|
|
133123
|
+
var attr = attrs.item(i);
|
|
133124
|
+
if (attr.prefix == 'xmlns') {
|
|
133125
|
+
childNs.push({ prefix: attr.localName, namespace: attr.value });
|
|
133126
|
+
} else if (attr.nodeName == 'xmlns') {
|
|
133127
|
+
childNs.push({ prefix: '', namespace: attr.value });
|
|
133128
|
+
}
|
|
133129
|
+
}
|
|
132761
133130
|
|
|
132762
|
-
|
|
132763
|
-
|
|
132764
|
-
|
|
132765
|
-
|
|
132766
|
-
|
|
132767
|
-
|
|
132768
|
-
|
|
132769
|
-
|
|
132770
|
-
|
|
133131
|
+
for (var i = 0; i < len; i++) {
|
|
133132
|
+
var attr = attrs.item(i);
|
|
133133
|
+
if (needNamespaceDefine(attr, html, childNs)) {
|
|
133134
|
+
var attrPrefix = attr.prefix || '';
|
|
133135
|
+
var uri = attr.namespaceURI;
|
|
133136
|
+
addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri, requireWellFormed);
|
|
133137
|
+
childNs.push({ prefix: attrPrefix, namespace: uri });
|
|
133138
|
+
}
|
|
133139
|
+
// Apply nodeFilter and serialize the attribute.
|
|
133140
|
+
var filteredAttr = nodeFilter ? nodeFilter(attr) : attr;
|
|
133141
|
+
if (filteredAttr) {
|
|
133142
|
+
if (typeof filteredAttr === 'string') {
|
|
133143
|
+
buf.push(filteredAttr);
|
|
133144
|
+
} else {
|
|
133145
|
+
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
|
|
133146
|
+
}
|
|
133147
|
+
}
|
|
133148
|
+
}
|
|
132771
133149
|
|
|
132772
|
-
|
|
132773
|
-
|
|
132774
|
-
|
|
132775
|
-
|
|
132776
|
-
|
|
132777
|
-
|
|
132778
|
-
|
|
132779
|
-
}
|
|
132780
|
-
serializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);
|
|
132781
|
-
}
|
|
133150
|
+
// add namespace for current node
|
|
133151
|
+
if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
|
|
133152
|
+
var nodePrefix = n.prefix || '';
|
|
133153
|
+
var uri = n.namespaceURI;
|
|
133154
|
+
addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri, requireWellFormed);
|
|
133155
|
+
childNs.push({ prefix: nodePrefix, namespace: uri });
|
|
133156
|
+
}
|
|
132782
133157
|
|
|
132783
|
-
|
|
132784
|
-
|
|
132785
|
-
|
|
132786
|
-
|
|
132787
|
-
|
|
132788
|
-
|
|
132789
|
-
|
|
133158
|
+
var child = n.firstChild;
|
|
133159
|
+
if (child || html && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) {
|
|
133160
|
+
buf.push('>');
|
|
133161
|
+
if (html && /^script$/i.test(nodeName)) {
|
|
133162
|
+
// Inline serialization for <script> children; return null to skip walkDOM descent.
|
|
133163
|
+
while (child) {
|
|
133164
|
+
if (child.data) {
|
|
133165
|
+
buf.push(child.data);
|
|
133166
|
+
} else {
|
|
133167
|
+
serializeToString(child, buf, html, nodeFilter, childNs.slice(), requireWellFormed);
|
|
133168
|
+
}
|
|
133169
|
+
child = child.nextSibling;
|
|
133170
|
+
}
|
|
133171
|
+
buf.push('</', nodeName, '>');
|
|
133172
|
+
return null;
|
|
133173
|
+
}
|
|
133174
|
+
// Return child context; walkDOM descends and exit emits the closing tag.
|
|
133175
|
+
return { ns: childNs, isHTML: html, tag: prefixedNodeName };
|
|
133176
|
+
} else {
|
|
133177
|
+
buf.push('/>');
|
|
133178
|
+
return null;
|
|
133179
|
+
}
|
|
132790
133180
|
|
|
132791
|
-
|
|
132792
|
-
|
|
132793
|
-
|
|
132794
|
-
|
|
132795
|
-
|
|
132796
|
-
|
|
132797
|
-
|
|
132798
|
-
|
|
132799
|
-
|
|
133181
|
+
case DOCUMENT_NODE:
|
|
133182
|
+
case DOCUMENT_FRAGMENT_NODE:
|
|
133183
|
+
// Descend into children; exit is a no-op (tag is null).
|
|
133184
|
+
return { ns: ns.slice(), isHTML: html, tag: null };
|
|
133185
|
+
|
|
133186
|
+
case ATTRIBUTE_NODE:
|
|
133187
|
+
addSerializedAttribute(buf, n.name, n.value, requireWellFormed);
|
|
133188
|
+
return null;
|
|
133189
|
+
|
|
133190
|
+
case TEXT_NODE:
|
|
133191
|
+
/**
|
|
133192
|
+
* The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
|
|
133193
|
+
* except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
|
|
133194
|
+
* If they are needed elsewhere, they must be escaped using either numeric character references or the strings
|
|
133195
|
+
* `&` and `<` respectively.
|
|
133196
|
+
* The right angle bracket (>) may be represented using the string " > ", and must, for compatibility,
|
|
133197
|
+
* be escaped using either `>` or a character reference when it appears in the string `]]>` in content,
|
|
133198
|
+
* when that string is not marking the end of a CDATA section.
|
|
133199
|
+
*
|
|
133200
|
+
* In the content of elements, character data is any string of characters
|
|
133201
|
+
* which does not contain the start-delimiter of any markup
|
|
133202
|
+
* and does not include the CDATA-section-close delimiter, `]]>`.
|
|
133203
|
+
*
|
|
133204
|
+
* @see https://www.w3.org/TR/xml/#NT-CharData
|
|
133205
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
|
|
133206
|
+
*/
|
|
133207
|
+
buf.push(n.data.replace(/[<&>]/g, _xmlEncoder));
|
|
133208
|
+
return null;
|
|
133209
|
+
|
|
133210
|
+
case CDATA_SECTION_NODE:
|
|
133211
|
+
if (requireWellFormed && n.data.indexOf(']]>') !== -1) {
|
|
133212
|
+
throw new DOMException(INVALID_STATE_ERR, 'The CDATASection data contains "]]>"');
|
|
132800
133213
|
}
|
|
132801
|
-
|
|
132802
|
-
|
|
132803
|
-
|
|
132804
|
-
|
|
132805
|
-
|
|
132806
|
-
|
|
132807
|
-
|
|
132808
|
-
|
|
132809
|
-
|
|
132810
|
-
|
|
132811
|
-
|
|
132812
|
-
|
|
132813
|
-
|
|
132814
|
-
|
|
132815
|
-
|
|
132816
|
-
|
|
132817
|
-
|
|
132818
|
-
|
|
132819
|
-
|
|
132820
|
-
|
|
132821
|
-
|
|
132822
|
-
|
|
132823
|
-
|
|
132824
|
-
|
|
132825
|
-
|
|
132826
|
-
|
|
132827
|
-
|
|
132828
|
-
|
|
132829
|
-
|
|
132830
|
-
|
|
132831
|
-
|
|
132832
|
-
|
|
132833
|
-
|
|
132834
|
-
|
|
132835
|
-
|
|
132836
|
-
|
|
132837
|
-
|
|
132838
|
-
|
|
132839
|
-
|
|
132840
|
-
|
|
132841
|
-
|
|
132842
|
-
|
|
132843
|
-
|
|
132844
|
-
|
|
132845
|
-
|
|
132846
|
-
|
|
132847
|
-
|
|
132848
|
-
|
|
132849
|
-
|
|
132850
|
-
|
|
132851
|
-
|
|
132852
|
-
|
|
132853
|
-
|
|
132854
|
-
|
|
132855
|
-
|
|
132856
|
-
|
|
132857
|
-
|
|
132858
|
-
|
|
133214
|
+
buf.push('<![CDATA[', n.data.replace(/]]>/g, ']]]]><![CDATA[>'), ']]>');
|
|
133215
|
+
return null;
|
|
133216
|
+
|
|
133217
|
+
case COMMENT_NODE:
|
|
133218
|
+
if (requireWellFormed && n.data.indexOf('-->') !== -1) {
|
|
133219
|
+
throw new DOMException(INVALID_STATE_ERR, 'The comment node data contains "-->"');
|
|
133220
|
+
}
|
|
133221
|
+
buf.push('<!--', n.data, '-->');
|
|
133222
|
+
return null;
|
|
133223
|
+
|
|
133224
|
+
case DOCUMENT_TYPE_NODE:
|
|
133225
|
+
if (requireWellFormed) {
|
|
133226
|
+
if (!tagNamePattern.test(n.name)) {
|
|
133227
|
+
throw new DOMException(INVALID_STATE_ERR, 'The doctype name "' + n.name + '" is not a valid XML Name');
|
|
133228
|
+
}
|
|
133229
|
+
if (n.publicId && !/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(n.publicId)) {
|
|
133230
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType publicId is not a valid PubidLiteral');
|
|
133231
|
+
}
|
|
133232
|
+
if (n.systemId && !/^("[^"]*"|'[^']*')$/.test(n.systemId)) {
|
|
133233
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType systemId is not a valid SystemLiteral');
|
|
133234
|
+
}
|
|
133235
|
+
if (n.internalSubset && n.internalSubset.indexOf(']>') !== -1) {
|
|
133236
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType internalSubset contains "]>"');
|
|
133237
|
+
}
|
|
133238
|
+
}
|
|
133239
|
+
var pubid = n.publicId;
|
|
133240
|
+
var sysid = n.systemId;
|
|
133241
|
+
buf.push('<!DOCTYPE ', n.name);
|
|
133242
|
+
if (pubid) {
|
|
133243
|
+
buf.push(' PUBLIC ', pubid);
|
|
133244
|
+
if (sysid && sysid != '.') {
|
|
133245
|
+
buf.push(' ', sysid);
|
|
133246
|
+
}
|
|
133247
|
+
buf.push('>');
|
|
133248
|
+
} else if (sysid && sysid != '.') {
|
|
133249
|
+
buf.push(' SYSTEM ', sysid, '>');
|
|
133250
|
+
} else {
|
|
133251
|
+
var sub = n.internalSubset;
|
|
133252
|
+
if (sub) {
|
|
133253
|
+
buf.push(' [', sub, ']');
|
|
133254
|
+
}
|
|
133255
|
+
buf.push('>');
|
|
133256
|
+
}
|
|
133257
|
+
return null;
|
|
133258
|
+
|
|
133259
|
+
case PROCESSING_INSTRUCTION_NODE:
|
|
133260
|
+
if (requireWellFormed) {
|
|
133261
|
+
if (!tagNamePattern.test(n.target) || n.target.indexOf(':') !== -1 || n.target.toLowerCase() === 'xml') {
|
|
133262
|
+
throw new DOMException(
|
|
133263
|
+
INVALID_STATE_ERR,
|
|
133264
|
+
'The processing instruction target "' + n.target + '" is not a valid XML NCName or is reserved'
|
|
133265
|
+
);
|
|
133266
|
+
}
|
|
133267
|
+
if (n.data.indexOf('?>') !== -1) {
|
|
133268
|
+
throw new DOMException(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"');
|
|
133269
|
+
}
|
|
133270
|
+
}
|
|
133271
|
+
buf.push('<?', n.target, ' ', n.data, '?>');
|
|
133272
|
+
return null;
|
|
133273
|
+
|
|
133274
|
+
case ENTITY_REFERENCE_NODE:
|
|
133275
|
+
if (requireWellFormed && !tagNamePattern.test(n.nodeName)) {
|
|
133276
|
+
throw new DOMException(
|
|
133277
|
+
INVALID_STATE_ERR,
|
|
133278
|
+
'The entity reference name "' + n.nodeName + '" is not a valid XML Name'
|
|
133279
|
+
);
|
|
133280
|
+
}
|
|
133281
|
+
buf.push('&', n.nodeName, ';');
|
|
133282
|
+
return null;
|
|
133283
|
+
|
|
133284
|
+
//case ENTITY_NODE:
|
|
133285
|
+
//case NOTATION_NODE:
|
|
133286
|
+
default:
|
|
133287
|
+
buf.push('??', n.nodeName);
|
|
133288
|
+
return null;
|
|
132859
133289
|
}
|
|
132860
|
-
|
|
132861
|
-
|
|
132862
|
-
|
|
132863
|
-
|
|
132864
|
-
var sub = node.internalSubset;
|
|
132865
|
-
if(sub){
|
|
132866
|
-
buf.push(" [",sub,"]");
|
|
133290
|
+
},
|
|
133291
|
+
exit: function (n, childCtx) {
|
|
133292
|
+
if (childCtx && childCtx.tag) {
|
|
133293
|
+
buf.push('</', childCtx.tag, '>');
|
|
132867
133294
|
}
|
|
132868
|
-
|
|
132869
|
-
|
|
132870
|
-
return;
|
|
132871
|
-
case PROCESSING_INSTRUCTION_NODE:
|
|
132872
|
-
return buf.push( "<?",node.target," ",node.data,"?>");
|
|
132873
|
-
case ENTITY_REFERENCE_NODE:
|
|
132874
|
-
return buf.push( '&',node.nodeName,';');
|
|
132875
|
-
//case ENTITY_NODE:
|
|
132876
|
-
//case NOTATION_NODE:
|
|
132877
|
-
default:
|
|
132878
|
-
buf.push('??',node.nodeName);
|
|
132879
|
-
}
|
|
133295
|
+
},
|
|
133296
|
+
});
|
|
132880
133297
|
}
|
|
132881
|
-
|
|
132882
|
-
|
|
132883
|
-
|
|
132884
|
-
|
|
132885
|
-
|
|
132886
|
-
|
|
132887
|
-
|
|
132888
|
-
|
|
132889
|
-
|
|
132890
|
-
|
|
132891
|
-
|
|
132892
|
-
|
|
132893
|
-
|
|
132894
|
-
|
|
132895
|
-
|
|
132896
|
-
|
|
132897
|
-
|
|
132898
|
-
|
|
132899
|
-
|
|
132900
|
-
|
|
132901
|
-
|
|
132902
|
-
|
|
132903
|
-
|
|
132904
|
-
|
|
132905
|
-
|
|
132906
|
-
|
|
132907
|
-
|
|
132908
|
-
|
|
132909
|
-
|
|
132910
|
-
|
|
132911
|
-
|
|
132912
|
-
|
|
132913
|
-
|
|
132914
|
-
|
|
132915
|
-
|
|
132916
|
-
|
|
132917
|
-
|
|
132918
|
-
var child = node.firstChild;
|
|
132919
|
-
while(child){
|
|
132920
|
-
node2.appendChild(importNode(doc,child,deep));
|
|
132921
|
-
child = child.nextSibling;
|
|
132922
|
-
}
|
|
132923
|
-
}
|
|
132924
|
-
return node2;
|
|
133298
|
+
/**
|
|
133299
|
+
* Imports a node from a different document into `doc`, creating a new copy.
|
|
133300
|
+
* Delegates to {@link walkDOM} for traversal. Each node in the subtree is shallow-cloned,
|
|
133301
|
+
* stamped with `doc` as its `ownerDocument`, and detached (`parentNode` set to `null`).
|
|
133302
|
+
* Children are imported recursively when `deep` is `true`; for {@link Attr} nodes `deep` is
|
|
133303
|
+
* always forced to `true`
|
|
133304
|
+
* because an attribute's value lives in a child text node.
|
|
133305
|
+
*
|
|
133306
|
+
* @param {Document} doc
|
|
133307
|
+
* The document that will own the imported node.
|
|
133308
|
+
* @param {Node} node
|
|
133309
|
+
* The node to import.
|
|
133310
|
+
* @param {boolean} deep
|
|
133311
|
+
* If `true`, descendants are imported recursively.
|
|
133312
|
+
* @returns {Node}
|
|
133313
|
+
* The newly imported node, now owned by `doc`.
|
|
133314
|
+
*/
|
|
133315
|
+
function importNode(doc, node, deep) {
|
|
133316
|
+
var destRoot;
|
|
133317
|
+
walkDOM(node, null, {
|
|
133318
|
+
enter: function (srcNode, destParent) {
|
|
133319
|
+
// Shallow-clone the node and stamp it into the target document.
|
|
133320
|
+
var destNode = srcNode.cloneNode(false);
|
|
133321
|
+
destNode.ownerDocument = doc;
|
|
133322
|
+
destNode.parentNode = null;
|
|
133323
|
+
// capture as the root of the imported subtree or attach to parent.
|
|
133324
|
+
if (destParent === null) {
|
|
133325
|
+
destRoot = destNode;
|
|
133326
|
+
} else {
|
|
133327
|
+
destParent.appendChild(destNode);
|
|
133328
|
+
}
|
|
133329
|
+
// ATTRIBUTE_NODE must always be imported deeply: its value lives in a child text node.
|
|
133330
|
+
var shouldDeep = srcNode.nodeType === ATTRIBUTE_NODE || deep;
|
|
133331
|
+
return shouldDeep ? destNode : null;
|
|
133332
|
+
},
|
|
133333
|
+
});
|
|
133334
|
+
return destRoot;
|
|
132925
133335
|
}
|
|
132926
133336
|
//
|
|
132927
133337
|
//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,
|
|
132928
133338
|
// attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
|
|
132929
|
-
function cloneNode(doc,node,deep){
|
|
132930
|
-
var
|
|
132931
|
-
|
|
132932
|
-
|
|
132933
|
-
|
|
132934
|
-
|
|
132935
|
-
|
|
132936
|
-
|
|
133339
|
+
function cloneNode(doc, node, deep) {
|
|
133340
|
+
var destRoot;
|
|
133341
|
+
walkDOM(node, null, {
|
|
133342
|
+
enter: function (srcNode, destParent) {
|
|
133343
|
+
// 1. Create a blank node of the same type and copy all scalar own properties.
|
|
133344
|
+
var destNode = new srcNode.constructor();
|
|
133345
|
+
for (var n in srcNode) {
|
|
133346
|
+
if (Object.prototype.hasOwnProperty.call(srcNode, n)) {
|
|
133347
|
+
var v = srcNode[n];
|
|
133348
|
+
if (typeof v != 'object') {
|
|
133349
|
+
if (v != destNode[n]) {
|
|
133350
|
+
destNode[n] = v;
|
|
133351
|
+
}
|
|
133352
|
+
}
|
|
132937
133353
|
}
|
|
132938
133354
|
}
|
|
132939
|
-
|
|
132940
|
-
|
|
132941
|
-
|
|
132942
|
-
|
|
132943
|
-
|
|
132944
|
-
|
|
132945
|
-
|
|
132946
|
-
|
|
132947
|
-
|
|
132948
|
-
|
|
132949
|
-
|
|
132950
|
-
|
|
132951
|
-
|
|
132952
|
-
|
|
132953
|
-
|
|
132954
|
-
|
|
132955
|
-
|
|
132956
|
-
|
|
132957
|
-
|
|
132958
|
-
|
|
132959
|
-
|
|
132960
|
-
|
|
132961
|
-
|
|
132962
|
-
|
|
132963
|
-
|
|
132964
|
-
|
|
133355
|
+
if (srcNode.childNodes) {
|
|
133356
|
+
destNode.childNodes = new NodeList();
|
|
133357
|
+
}
|
|
133358
|
+
destNode.ownerDocument = doc;
|
|
133359
|
+
// 2. Handle node-type-specific setup.
|
|
133360
|
+
// Attributes are not DOM children, so they are cloned inline here
|
|
133361
|
+
// rather than by walkDOM descent.
|
|
133362
|
+
// ATTRIBUTE_NODE forces deep=true so its own children are walked.
|
|
133363
|
+
var shouldDeep = deep;
|
|
133364
|
+
switch (destNode.nodeType) {
|
|
133365
|
+
case ELEMENT_NODE:
|
|
133366
|
+
var attrs = srcNode.attributes;
|
|
133367
|
+
var attrs2 = (destNode.attributes = new NamedNodeMap());
|
|
133368
|
+
var len = attrs.length;
|
|
133369
|
+
attrs2._ownerElement = destNode;
|
|
133370
|
+
for (var i = 0; i < len; i++) {
|
|
133371
|
+
destNode.setAttributeNode(cloneNode(doc, attrs.item(i), true));
|
|
133372
|
+
}
|
|
133373
|
+
break;
|
|
133374
|
+
case ATTRIBUTE_NODE:
|
|
133375
|
+
shouldDeep = true;
|
|
133376
|
+
}
|
|
133377
|
+
// 3. Attach to parent, or capture as the root of the cloned subtree.
|
|
133378
|
+
if (destParent !== null) {
|
|
133379
|
+
destParent.appendChild(destNode);
|
|
133380
|
+
} else {
|
|
133381
|
+
destRoot = destNode;
|
|
133382
|
+
}
|
|
133383
|
+
// 4. Return destNode as the context for children (causes walkDOM to descend),
|
|
133384
|
+
// or null to skip children (shallow clone).
|
|
133385
|
+
return shouldDeep ? destNode : null;
|
|
133386
|
+
},
|
|
133387
|
+
});
|
|
133388
|
+
return destRoot;
|
|
132965
133389
|
}
|
|
132966
133390
|
|
|
132967
133391
|
function __set__(object,key,value){
|
|
@@ -132977,49 +133401,55 @@ function requireDom$1 () {
|
|
|
132977
133401
|
}
|
|
132978
133402
|
});
|
|
132979
133403
|
|
|
132980
|
-
|
|
132981
|
-
|
|
132982
|
-
|
|
133404
|
+
/**
|
|
133405
|
+
* The text content of this node and its descendants.
|
|
133406
|
+
*
|
|
133407
|
+
* Setting `textContent` on an element or document fragment replaces all child nodes with a
|
|
133408
|
+
* single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly.
|
|
133409
|
+
*
|
|
133410
|
+
* @type {string | null}
|
|
133411
|
+
* @see {@link https://dom.spec.whatwg.org/#dom-node-textcontent}
|
|
133412
|
+
*/
|
|
133413
|
+
Object.defineProperty(Node.prototype, 'textContent', {
|
|
133414
|
+
get: function () {
|
|
133415
|
+
if (this.nodeType === ELEMENT_NODE || this.nodeType === DOCUMENT_FRAGMENT_NODE) {
|
|
133416
|
+
var buf = [];
|
|
133417
|
+
walkDOM(this, null, {
|
|
133418
|
+
enter: function (n) {
|
|
133419
|
+
if (n.nodeType === ELEMENT_NODE || n.nodeType === DOCUMENT_FRAGMENT_NODE) {
|
|
133420
|
+
return true; // enter children
|
|
133421
|
+
}
|
|
133422
|
+
if (n.nodeType === PROCESSING_INSTRUCTION_NODE || n.nodeType === COMMENT_NODE) {
|
|
133423
|
+
return null; // excluded from text content
|
|
133424
|
+
}
|
|
133425
|
+
buf.push(n.nodeValue);
|
|
133426
|
+
},
|
|
133427
|
+
});
|
|
133428
|
+
return buf.join('');
|
|
133429
|
+
}
|
|
133430
|
+
return this.nodeValue;
|
|
132983
133431
|
},
|
|
132984
133432
|
|
|
132985
|
-
set:function(data){
|
|
132986
|
-
switch(this.nodeType){
|
|
132987
|
-
|
|
132988
|
-
|
|
132989
|
-
|
|
132990
|
-
|
|
132991
|
-
|
|
132992
|
-
|
|
132993
|
-
|
|
132994
|
-
|
|
132995
|
-
|
|
133433
|
+
set: function (data) {
|
|
133434
|
+
switch (this.nodeType) {
|
|
133435
|
+
case ELEMENT_NODE:
|
|
133436
|
+
case DOCUMENT_FRAGMENT_NODE:
|
|
133437
|
+
while (this.firstChild) {
|
|
133438
|
+
this.removeChild(this.firstChild);
|
|
133439
|
+
}
|
|
133440
|
+
if (data || String(data)) {
|
|
133441
|
+
this.appendChild(this.ownerDocument.createTextNode(data));
|
|
133442
|
+
}
|
|
133443
|
+
break;
|
|
132996
133444
|
|
|
132997
|
-
|
|
132998
|
-
|
|
132999
|
-
|
|
133000
|
-
|
|
133445
|
+
default:
|
|
133446
|
+
this.data = data;
|
|
133447
|
+
this.value = data;
|
|
133448
|
+
this.nodeValue = data;
|
|
133001
133449
|
}
|
|
133002
|
-
}
|
|
133450
|
+
},
|
|
133003
133451
|
});
|
|
133004
133452
|
|
|
133005
|
-
function getTextContent(node){
|
|
133006
|
-
switch(node.nodeType){
|
|
133007
|
-
case ELEMENT_NODE:
|
|
133008
|
-
case DOCUMENT_FRAGMENT_NODE:
|
|
133009
|
-
var buf = [];
|
|
133010
|
-
node = node.firstChild;
|
|
133011
|
-
while(node){
|
|
133012
|
-
if(node.nodeType!==7 && node.nodeType !==8){
|
|
133013
|
-
buf.push(getTextContent(node));
|
|
133014
|
-
}
|
|
133015
|
-
node = node.nextSibling;
|
|
133016
|
-
}
|
|
133017
|
-
return buf.join('');
|
|
133018
|
-
default:
|
|
133019
|
-
return node.nodeValue;
|
|
133020
|
-
}
|
|
133021
|
-
}
|
|
133022
|
-
|
|
133023
133453
|
__set__ = function(object,key,value){
|
|
133024
133454
|
//console.log(value)
|
|
133025
133455
|
object['$$'+key] = value;
|
|
@@ -133035,6 +133465,7 @@ function requireDom$1 () {
|
|
|
133035
133465
|
dom$1.Element = Element;
|
|
133036
133466
|
dom$1.Node = Node;
|
|
133037
133467
|
dom$1.NodeList = NodeList;
|
|
133468
|
+
dom$1.walkDOM = walkDOM;
|
|
133038
133469
|
dom$1.XMLSerializer = XMLSerializer;
|
|
133039
133470
|
//}
|
|
133040
133471
|
return dom$1;
|
|
@@ -133049,7 +133480,7 @@ var hasRequiredEntities$1;
|
|
|
133049
133480
|
function requireEntities$1 () {
|
|
133050
133481
|
if (hasRequiredEntities$1) return entities$1;
|
|
133051
133482
|
hasRequiredEntities$1 = 1;
|
|
133052
|
-
(function (exports
|
|
133483
|
+
(function (exports) {
|
|
133053
133484
|
|
|
133054
133485
|
var freeze = requireConventions$1().freeze;
|
|
133055
133486
|
|
|
@@ -133060,7 +133491,7 @@ function requireEntities$1 () {
|
|
|
133060
133491
|
* @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0
|
|
133061
133492
|
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML Wikipedia
|
|
133062
133493
|
*/
|
|
133063
|
-
exports
|
|
133494
|
+
exports.XML_ENTITIES = freeze({
|
|
133064
133495
|
amp: '&',
|
|
133065
133496
|
apos: "'",
|
|
133066
133497
|
gt: '>',
|
|
@@ -133082,7 +133513,7 @@ function requireEntities$1 () {
|
|
|
133082
133513
|
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML)
|
|
133083
133514
|
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML)
|
|
133084
133515
|
*/
|
|
133085
|
-
exports
|
|
133516
|
+
exports.HTML_ENTITIES = freeze({
|
|
133086
133517
|
Aacute: '\u00C1',
|
|
133087
133518
|
aacute: '\u00E1',
|
|
133088
133519
|
Abreve: '\u0102',
|
|
@@ -135214,7 +135645,7 @@ function requireEntities$1 () {
|
|
|
135214
135645
|
* @deprecated use `HTML_ENTITIES` instead
|
|
135215
135646
|
* @see HTML_ENTITIES
|
|
135216
135647
|
*/
|
|
135217
|
-
exports
|
|
135648
|
+
exports.entityMap = exports.HTML_ENTITIES;
|
|
135218
135649
|
} (entities$1));
|
|
135219
135650
|
return entities$1;
|
|
135220
135651
|
}
|
|
@@ -135227,14 +135658,8 @@ function requireSax$1 () {
|
|
|
135227
135658
|
if (hasRequiredSax$1) return sax$1;
|
|
135228
135659
|
hasRequiredSax$1 = 1;
|
|
135229
135660
|
var NAMESPACE = requireConventions$1().NAMESPACE;
|
|
135661
|
+
var tagNamePattern = requireConventions$1().tagNamePattern;
|
|
135230
135662
|
|
|
135231
|
-
//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
|
135232
|
-
//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
|
|
135233
|
-
//[5] Name ::= NameStartChar (NameChar)*
|
|
135234
|
-
var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
|
|
135235
|
-
var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
|
|
135236
|
-
var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
|
|
135237
|
-
//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
|
|
135238
135663
|
//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
|
|
135239
135664
|
|
|
135240
135665
|
//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
|
|
@@ -135345,7 +135770,13 @@ function requireSax$1 () {
|
|
|
135345
135770
|
switch(source.charAt(tagStart+1)){
|
|
135346
135771
|
case '/':
|
|
135347
135772
|
var end = source.indexOf('>',tagStart+3);
|
|
135348
|
-
|
|
135773
|
+
// Anchored trailing-whitespace trim. The former `/[ \t\n\r]+$/g` backtracked
|
|
135774
|
+
// quadratically on a name shaped `whitespace-run + non-whitespace char`
|
|
135775
|
+
// (an end tag `</ … x>`): from every start position it extended `[ws]+`
|
|
135776
|
+
// to the end and then failed the `$` anchor. This anchored form matches the
|
|
135777
|
+
// whole string once and captures everything up to the last non-whitespace
|
|
135778
|
+
// character, so it trims in linear time with byte-identical output.
|
|
135779
|
+
var tagName = source.substring(tagStart + 2, end).replace(/^([\s\S]*?[^ \t\n\r])?[ \t\n\r]*$/, '$1');
|
|
135349
135780
|
var config = parseStack.pop();
|
|
135350
135781
|
if(end<0){
|
|
135351
135782
|
|
|
@@ -135356,6 +135787,14 @@ function requireSax$1 () {
|
|
|
135356
135787
|
tagName = tagName.replace(/[\s<].*/,'');
|
|
135357
135788
|
errorHandler.error("end tag name: "+tagName+' maybe not complete');
|
|
135358
135789
|
end = tagStart+1+tagName.length;
|
|
135790
|
+
}else if(/[ \t\n\r]/.test(tagName) && tagNamePattern.test(tagName.split(/[ \t\n\r]/)[0])){
|
|
135791
|
+
// The XML `ETag` production is `'</' Name S? '>'`: only optional whitespace may follow
|
|
135792
|
+
// the `Name`. A valid `Name` followed by whitespace and non-whitespace residue (e.g.
|
|
135793
|
+
// `</a\nbogus>` or `</a bogus>`) is not well-formed, but historically it was silently
|
|
135794
|
+
// accepted (the malformed end tag ignored, the residue dropped, the element left on the
|
|
135795
|
+
// stack). Report it as a recoverable `error` (which a custom errorHandler may escalate to
|
|
135796
|
+
// fatal) while keeping the existing recovery so the parsed DOM stays byte-identical.
|
|
135797
|
+
errorHandler.error('end tag name is followed by whitespace and trailing content: "'+tagName+'"');
|
|
135359
135798
|
}
|
|
135360
135799
|
var localNSMap = config.localNSMap;
|
|
135361
135800
|
var endMatch = config.tagName == tagName;
|
|
@@ -135479,6 +135918,15 @@ function requireSax$1 () {
|
|
|
135479
135918
|
var s = S_TAG;//status
|
|
135480
135919
|
while(true){
|
|
135481
135920
|
var c = source.charAt(p);
|
|
135921
|
+
if (s === S_TAG && c === '<') {
|
|
135922
|
+
// A `<` can never occur inside a tag name. Without this guard the scan runs
|
|
135923
|
+
// on to the next `>` (or EOF) before the tag name is rejected, so a document
|
|
135924
|
+
// with many `<` inside a malformed tag makes each one-character recovery step
|
|
135925
|
+
// re-scan to the distant `>` — O(n^2). Stopping at the `<` keeps each recovery
|
|
135926
|
+
// step bounded. The candidate scanned so far is reported raw, consistent with
|
|
135927
|
+
// the sibling invalid-tag-name throw below.
|
|
135928
|
+
throw new Error('unexpected < in tag name: ' + source.slice(start, p));
|
|
135929
|
+
}
|
|
135482
135930
|
switch(c){
|
|
135483
135931
|
case '=':
|
|
135484
135932
|
if(s === S_ATTR){//attrName
|
|
@@ -135671,9 +136119,13 @@ function requireSax$1 () {
|
|
|
135671
136119
|
if(nsPrefix !== false){//hack!!
|
|
135672
136120
|
if(localNSMap == null){
|
|
135673
136121
|
localNSMap = {};
|
|
135674
|
-
//
|
|
135675
|
-
|
|
135676
|
-
//
|
|
136122
|
+
// Derive the child scope's namespace map by prototype-chain inheritance
|
|
136123
|
+
// instead of a flat copy: lookups inherit ancestor prefixes transparently,
|
|
136124
|
+
// so a document nesting N scopes retains O(N) map entries rather than
|
|
136125
|
+
// sum(1..N) = O(N^2). localNSMap stays a flat own-only record of the
|
|
136126
|
+
// prefixes declared at THIS element, so own-property enumeration
|
|
136127
|
+
// (endPrefixMapping below) still reports only local declarations.
|
|
136128
|
+
currentNSMap = Object.create(currentNSMap);
|
|
135677
136129
|
}
|
|
135678
136130
|
currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
|
|
135679
136131
|
a.uri = NAMESPACE.XMLNS;
|
|
@@ -135825,7 +136277,7 @@ function requireSax$1 () {
|
|
|
135825
136277
|
function parseInstruction(source,start,domBuilder){
|
|
135826
136278
|
var end = source.indexOf('?>',start);
|
|
135827
136279
|
if(end){
|
|
135828
|
-
var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)
|
|
136280
|
+
var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)$/);
|
|
135829
136281
|
if(match){
|
|
135830
136282
|
match[0].length;
|
|
135831
136283
|
domBuilder.processingInstruction(match[1], match[2]) ;
|
|
@@ -137022,7 +137474,7 @@ var hasRequiredMoment$1;
|
|
|
137022
137474
|
function requireMoment$1 () {
|
|
137023
137475
|
if (hasRequiredMoment$1) return moment$2.exports;
|
|
137024
137476
|
hasRequiredMoment$1 = 1;
|
|
137025
|
-
(function (module, exports
|
|
137477
|
+
(function (module, exports) {
|
|
137026
137478
|
(function (global, factory) {
|
|
137027
137479
|
module.exports = factory() ;
|
|
137028
137480
|
}(this, (function () {
|
|
@@ -142712,7 +143164,7 @@ function requireMomentTimezone$1 () {
|
|
|
142712
143164
|
hasRequiredMomentTimezone$1 = 1;
|
|
142713
143165
|
(function (module) {
|
|
142714
143166
|
//! moment-timezone.js
|
|
142715
|
-
//! version : 0.6.
|
|
143167
|
+
//! version : 0.6.4
|
|
142716
143168
|
//! Copyright (c) JS Foundation and other contributors
|
|
142717
143169
|
//! license : MIT
|
|
142718
143170
|
//! github.com/moment/moment-timezone
|
|
@@ -142738,12 +143190,18 @@ function requireMomentTimezone$1 () {
|
|
|
142738
143190
|
// return moment;
|
|
142739
143191
|
// }
|
|
142740
143192
|
|
|
142741
|
-
var VERSION = "0.6.
|
|
143193
|
+
var VERSION = "0.6.4",
|
|
142742
143194
|
zones = {},
|
|
142743
143195
|
links = {},
|
|
142744
143196
|
countries = {},
|
|
142745
143197
|
names = {},
|
|
142746
143198
|
guesses = {},
|
|
143199
|
+
parsingInZone = false,
|
|
143200
|
+
parsingNow,
|
|
143201
|
+
parsingNowFunction,
|
|
143202
|
+
hasParsingNow = false,
|
|
143203
|
+
ignoreDefaultZoneForInput,
|
|
143204
|
+
hasIgnoredDefaultZoneInput = false,
|
|
142747
143205
|
cachedGuess;
|
|
142748
143206
|
|
|
142749
143207
|
if (!moment || typeof moment.version !== 'string') {
|
|
@@ -142915,17 +143373,16 @@ function requireMomentTimezone$1 () {
|
|
|
142915
143373
|
offsets = this.offsets,
|
|
142916
143374
|
untils = this.untils,
|
|
142917
143375
|
max = untils.length - 1,
|
|
142918
|
-
offset, offsetNext,
|
|
143376
|
+
offset, offsetNext, i;
|
|
142919
143377
|
|
|
142920
143378
|
for (i = 0; i < max; i++) {
|
|
142921
143379
|
offset = offsets[i];
|
|
142922
143380
|
offsetNext = offsets[i + 1];
|
|
142923
|
-
offsetPrev = offsets[i ? i - 1 : i];
|
|
142924
143381
|
|
|
142925
143382
|
if (offset < offsetNext && tz.moveAmbiguousForward) {
|
|
142926
143383
|
offset = offsetNext;
|
|
142927
|
-
} else if (offset >
|
|
142928
|
-
offset =
|
|
143384
|
+
} else if (offset > offsetNext && tz.moveInvalidForward) {
|
|
143385
|
+
offset = offsetNext;
|
|
142929
143386
|
}
|
|
142930
143387
|
|
|
142931
143388
|
if (target < untils[i] - (offset * 60000)) {
|
|
@@ -142950,6 +143407,15 @@ function requireMomentTimezone$1 () {
|
|
|
142950
143407
|
}
|
|
142951
143408
|
};
|
|
142952
143409
|
|
|
143410
|
+
var utcDefaultZone = new Zone();
|
|
143411
|
+
utcDefaultZone._set({
|
|
143412
|
+
name : 'UTC',
|
|
143413
|
+
abbrs : ['UTC'],
|
|
143414
|
+
untils : [Infinity],
|
|
143415
|
+
offsets : [0],
|
|
143416
|
+
population : 0
|
|
143417
|
+
});
|
|
143418
|
+
|
|
142953
143419
|
/************************************
|
|
142954
143420
|
Country object
|
|
142955
143421
|
************************************/
|
|
@@ -143287,6 +143753,85 @@ function requireMomentTimezone$1 () {
|
|
|
143287
143753
|
return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);
|
|
143288
143754
|
}
|
|
143289
143755
|
|
|
143756
|
+
function isObjectInput (input) {
|
|
143757
|
+
var prop;
|
|
143758
|
+
|
|
143759
|
+
if (moment.isMoment(input) || input === null || Object.prototype.toString.call(input) !== '[object Object]') {
|
|
143760
|
+
return false;
|
|
143761
|
+
}
|
|
143762
|
+
if (Object.getOwnPropertyNames) {
|
|
143763
|
+
return Object.getOwnPropertyNames(input).length > 0;
|
|
143764
|
+
}
|
|
143765
|
+
for (prop in input) {
|
|
143766
|
+
if (Object.prototype.hasOwnProperty.call(input, prop)) {
|
|
143767
|
+
return true;
|
|
143768
|
+
}
|
|
143769
|
+
}
|
|
143770
|
+
return false;
|
|
143771
|
+
}
|
|
143772
|
+
|
|
143773
|
+
function parseWithZoneNow (args, name, stringInput) {
|
|
143774
|
+
var savedNow = moment.now,
|
|
143775
|
+
savedDefaultZone = moment.defaultZone,
|
|
143776
|
+
savedParsingInZone = parsingInZone,
|
|
143777
|
+
savedParsingNow = parsingNow,
|
|
143778
|
+
savedParsingNowFunction = parsingNowFunction,
|
|
143779
|
+
savedHasParsingNow = hasParsingNow,
|
|
143780
|
+
now,
|
|
143781
|
+
hasNow = false,
|
|
143782
|
+
zonedNow,
|
|
143783
|
+
wallNow,
|
|
143784
|
+
parsedDateParts,
|
|
143785
|
+
out;
|
|
143786
|
+
|
|
143787
|
+
if (!parsingInZone) {
|
|
143788
|
+
parsingNow = undefined;
|
|
143789
|
+
parsingNowFunction = savedNow;
|
|
143790
|
+
hasParsingNow = false;
|
|
143791
|
+
}
|
|
143792
|
+
parsingInZone = true;
|
|
143793
|
+
moment.now = function () {
|
|
143794
|
+
if (!hasNow) {
|
|
143795
|
+
if (!hasParsingNow) {
|
|
143796
|
+
parsingNow = parsingNowFunction.call(moment);
|
|
143797
|
+
hasParsingNow = true;
|
|
143798
|
+
}
|
|
143799
|
+
now = parsingNow;
|
|
143800
|
+
hasNow = true;
|
|
143801
|
+
zonedNow = moment.tz(now, name);
|
|
143802
|
+
wallNow = zonedNow.valueOf() + zonedNow.utcOffset() * 60000;
|
|
143803
|
+
}
|
|
143804
|
+
return wallNow;
|
|
143805
|
+
};
|
|
143806
|
+
if (stringInput) {
|
|
143807
|
+
moment.defaultZone = utcDefaultZone;
|
|
143808
|
+
}
|
|
143809
|
+
try {
|
|
143810
|
+
out = moment.utc.apply(null, args);
|
|
143811
|
+
if (stringInput && hasNow && out._a && out._tzm !== undefined) {
|
|
143812
|
+
parsedDateParts = out.parsingFlags().parsedDateParts;
|
|
143813
|
+
if (!parsedDateParts || parsedDateParts[0] == null || parsedDateParts[1] == null || parsedDateParts[2] == null) {
|
|
143814
|
+
moment.now = function () {
|
|
143815
|
+
return now;
|
|
143816
|
+
};
|
|
143817
|
+
moment.defaultZone = savedDefaultZone;
|
|
143818
|
+
out = moment.utc.apply(null, args);
|
|
143819
|
+
}
|
|
143820
|
+
}
|
|
143821
|
+
} finally {
|
|
143822
|
+
moment.now = savedNow;
|
|
143823
|
+
moment.defaultZone = savedDefaultZone;
|
|
143824
|
+
parsingInZone = savedParsingInZone;
|
|
143825
|
+
if (!savedParsingInZone) {
|
|
143826
|
+
parsingNow = savedParsingNow;
|
|
143827
|
+
parsingNowFunction = savedParsingNowFunction;
|
|
143828
|
+
hasParsingNow = savedHasParsingNow;
|
|
143829
|
+
}
|
|
143830
|
+
}
|
|
143831
|
+
|
|
143832
|
+
return out;
|
|
143833
|
+
}
|
|
143834
|
+
|
|
143290
143835
|
function logError (message) {
|
|
143291
143836
|
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
|
143292
143837
|
console.error(message);
|
|
@@ -143300,10 +143845,13 @@ function requireMomentTimezone$1 () {
|
|
|
143300
143845
|
function tz (input) {
|
|
143301
143846
|
var args = Array.prototype.slice.call(arguments, 0, -1),
|
|
143302
143847
|
name = arguments[arguments.length - 1],
|
|
143303
|
-
|
|
143304
|
-
|
|
143848
|
+
objectInput = isObjectInput(input),
|
|
143849
|
+
stringInput = args.length > 0 && typeof input === 'string',
|
|
143850
|
+
zone = objectInput || stringInput ? getZone(name) : null,
|
|
143851
|
+
out = objectInput && zone ? parseWithZoneNow(args, name) :
|
|
143852
|
+
stringInput && zone ? parseWithZoneNow(args, name, true) : moment.utc.apply(null, args);
|
|
143305
143853
|
|
|
143306
|
-
if (!moment.isMoment(input) && needsOffset(out) && (zone = getZone(name))) {
|
|
143854
|
+
if (!moment.isMoment(input) && needsOffset(out) && (zone || (!objectInput && (zone = getZone(name))))) {
|
|
143307
143855
|
out.add(zone.parse(out), 'minutes');
|
|
143308
143856
|
}
|
|
143309
143857
|
|
|
@@ -143343,10 +143891,49 @@ function requireMomentTimezone$1 () {
|
|
|
143343
143891
|
moment.tz = tz;
|
|
143344
143892
|
|
|
143345
143893
|
moment.defaultZone = null;
|
|
143894
|
+
var momentGetDefaultDateParts = moment._getDefaultDateParts;
|
|
143895
|
+
if (momentGetDefaultDateParts) {
|
|
143896
|
+
moment._getDefaultDateParts = function (config, now, forWeek) {
|
|
143897
|
+
var zone = moment.defaultZone,
|
|
143898
|
+
zonedNow,
|
|
143899
|
+
dateParts,
|
|
143900
|
+
savedIgnoredInput,
|
|
143901
|
+
savedHasIgnoredInput;
|
|
143902
|
+
forWeek = forWeek || config._isDefaultDatePartsForWeek;
|
|
143903
|
+
|
|
143904
|
+
if (parsingInZone && config._tzm === undefined) {
|
|
143905
|
+
zonedNow = new Date(now);
|
|
143906
|
+
return [zonedNow.getUTCFullYear(), zonedNow.getUTCMonth(), zonedNow.getUTCDate()];
|
|
143907
|
+
}
|
|
143908
|
+
|
|
143909
|
+
if (zone && !config._useUTC && config._tzm === undefined) {
|
|
143910
|
+
zonedNow = new Date(now - zone.utcOffset(now) * 60000);
|
|
143911
|
+
return [zonedNow.getUTCFullYear(), zonedNow.getUTCMonth(), zonedNow.getUTCDate()];
|
|
143912
|
+
}
|
|
143913
|
+
|
|
143914
|
+
if (forWeek && (config._useUTC || config._tzm !== undefined)) {
|
|
143915
|
+
savedIgnoredInput = ignoreDefaultZoneForInput;
|
|
143916
|
+
savedHasIgnoredInput = hasIgnoredDefaultZoneInput;
|
|
143917
|
+
ignoreDefaultZoneForInput = now;
|
|
143918
|
+
hasIgnoredDefaultZoneInput = true;
|
|
143919
|
+
try {
|
|
143920
|
+
dateParts = momentGetDefaultDateParts.call(this, config, now, forWeek);
|
|
143921
|
+
} finally {
|
|
143922
|
+
ignoreDefaultZoneForInput = savedIgnoredInput;
|
|
143923
|
+
hasIgnoredDefaultZoneInput = savedHasIgnoredInput;
|
|
143924
|
+
}
|
|
143925
|
+
return dateParts;
|
|
143926
|
+
}
|
|
143927
|
+
|
|
143928
|
+
return momentGetDefaultDateParts.call(this, config, now, forWeek);
|
|
143929
|
+
};
|
|
143930
|
+
}
|
|
143346
143931
|
|
|
143347
143932
|
moment.updateOffset = function (mom, keepTime) {
|
|
143348
|
-
var zone = moment.defaultZone,
|
|
143349
|
-
offset
|
|
143933
|
+
var zone = hasIgnoredDefaultZoneInput && ignoreDefaultZoneForInput === mom._i ? null : moment.defaultZone,
|
|
143934
|
+
offset,
|
|
143935
|
+
localTimestamp,
|
|
143936
|
+
normalizedTimestamp;
|
|
143350
143937
|
|
|
143351
143938
|
if (mom._z === undefined) {
|
|
143352
143939
|
if (zone && needsOffset(mom) && !mom._isUTC && mom.isValid()) {
|
|
@@ -143357,6 +143944,20 @@ function requireMomentTimezone$1 () {
|
|
|
143357
143944
|
}
|
|
143358
143945
|
if (mom._z) {
|
|
143359
143946
|
offset = mom._z.utcOffset(mom);
|
|
143947
|
+
if (keepTime) {
|
|
143948
|
+
// Resolve local times inside a forward gap using the configured
|
|
143949
|
+
// invalid-input policy before applying the new offset.
|
|
143950
|
+
localTimestamp = mom._d.valueOf();
|
|
143951
|
+
if (!mom._isUTC) {
|
|
143952
|
+
localTimestamp -= mom._d.getTimezoneOffset() * 60000;
|
|
143953
|
+
}
|
|
143954
|
+
if (mom._z.utcOffset(localTimestamp + offset * 60000) !== offset) {
|
|
143955
|
+
offset = mom._z.parse(localTimestamp);
|
|
143956
|
+
localTimestamp += offset * 60000;
|
|
143957
|
+
offset = mom._z.utcOffset(localTimestamp);
|
|
143958
|
+
normalizedTimestamp = localTimestamp - offset * 60000;
|
|
143959
|
+
}
|
|
143960
|
+
}
|
|
143360
143961
|
if (Math.abs(offset) < 16) {
|
|
143361
143962
|
offset = offset / 60;
|
|
143362
143963
|
}
|
|
@@ -143367,6 +143968,9 @@ function requireMomentTimezone$1 () {
|
|
|
143367
143968
|
} else {
|
|
143368
143969
|
mom.zone(offset, keepTime);
|
|
143369
143970
|
}
|
|
143971
|
+
if (normalizedTimestamp != null) {
|
|
143972
|
+
mom._d.setTime(normalizedTimestamp);
|
|
143973
|
+
}
|
|
143370
143974
|
}
|
|
143371
143975
|
};
|
|
143372
143976
|
|
|
@@ -147299,11 +147903,11 @@ const CURRENCY_INFO = {
|
|
|
147299
147903
|
}
|
|
147300
147904
|
};
|
|
147301
147905
|
|
|
147302
|
-
const $RAF$1 = window.requestAnimationFrame;
|
|
147906
|
+
const $RAF$1$1 = window.requestAnimationFrame;
|
|
147303
147907
|
const $RAFQueue$1 = [];
|
|
147304
147908
|
const invokeLater$1 = fn => {
|
|
147305
147909
|
if (!$RAFQueue$1.length) {
|
|
147306
|
-
$RAF$1(() => {
|
|
147910
|
+
$RAF$1$1(() => {
|
|
147307
147911
|
$RAFQueue$1.forEach(f => f());
|
|
147308
147912
|
$RAFQueue$1.length = 0;
|
|
147309
147913
|
});
|
|
@@ -147845,220 +148449,83 @@ const getFnForEventExpr$1 = (expr) => {
|
|
|
147845
148449
|
return fnExecutor$1(expr, ExpressionType$2.Action);
|
|
147846
148450
|
};
|
|
147847
148451
|
|
|
147848
|
-
// Constants
|
|
147849
|
-
const WIDGET_ID_REGEX$1 = /^(widget-[^_]+)/;
|
|
147850
|
-
const WIDGET_PROPERTY_REGEX$1 = /^widget-[^_]+_(.+)$/;
|
|
147851
|
-
const ARRAY_INDEX_PLACEHOLDER$1 = '[$i]';
|
|
147852
|
-
const ARRAY_INDEX_ZERO$1 = '[0]';
|
|
147853
148452
|
const registry$1 = new Map();
|
|
147854
148453
|
const watchIdGenerator$1 = new IDGenerator$1('watch-id-');
|
|
147855
|
-
const FIRST_TIME_WATCH$1 =
|
|
147856
|
-
|
|
147857
|
-
* Extracts widget ID from identifier (e.g., "widget-id23_eventsource" -> "widget-id23")
|
|
147858
|
-
*/
|
|
147859
|
-
const getWidgetId$1 = (identifier) => {
|
|
147860
|
-
if (!identifier || typeof identifier !== 'string') {
|
|
147861
|
-
return null;
|
|
147862
|
-
}
|
|
147863
|
-
const match = identifier.match(WIDGET_ID_REGEX$1);
|
|
147864
|
-
return match ? match[1] : null;
|
|
147865
|
-
};
|
|
147866
|
-
/**
|
|
147867
|
-
* Extracts property name from identifier (e.g., "widget-id23_eventsource" -> "eventsource")
|
|
147868
|
-
*/
|
|
147869
|
-
const getPropertyName$1 = (identifier) => {
|
|
147870
|
-
if (!identifier || typeof identifier !== 'string') {
|
|
147871
|
-
return identifier;
|
|
147872
|
-
}
|
|
147873
|
-
const match = identifier.match(WIDGET_PROPERTY_REGEX$1);
|
|
147874
|
-
return match ? match[1] : identifier;
|
|
147875
|
-
};
|
|
147876
|
-
/**
|
|
147877
|
-
* Array consumer wrapper for array-based expressions
|
|
147878
|
-
*/
|
|
148454
|
+
const FIRST_TIME_WATCH$1 = {};
|
|
148455
|
+
Object.freeze(FIRST_TIME_WATCH$1);
|
|
147879
148456
|
const arrayConsumer$1 = (listenerFn, restExpr, newVal, oldVal) => {
|
|
147880
|
-
|
|
147881
|
-
|
|
147882
|
-
|
|
147883
|
-
|
|
147884
|
-
|
|
147885
|
-
|
|
147886
|
-
|
|
148457
|
+
let data = newVal, formattedData;
|
|
148458
|
+
if (_.isArray(data)) {
|
|
148459
|
+
formattedData = data.map(function (datum) {
|
|
148460
|
+
return findValueOf$1(datum, restExpr);
|
|
148461
|
+
});
|
|
148462
|
+
// If resulting structure is an array of array, flatten it
|
|
148463
|
+
if (_.isArray(formattedData[0])) {
|
|
148464
|
+
formattedData = _.flatten(formattedData);
|
|
148465
|
+
}
|
|
148466
|
+
listenerFn(formattedData, oldVal);
|
|
147887
148467
|
}
|
|
147888
|
-
listenerFn(formattedData, oldVal);
|
|
147889
148468
|
};
|
|
147890
|
-
|
|
147891
|
-
|
|
147892
|
-
|
|
147893
|
-
|
|
147894
|
-
const regex = /\[\$i\]/g;
|
|
148469
|
+
const getUpdatedWatcInfo$1 = (expr, acceptsArray, listener) => {
|
|
148470
|
+
// listener doesn't accept array
|
|
148471
|
+
// replace all `[$i]` with `[0]` and return the expression
|
|
148472
|
+
let regex = /\[\$i\]/g, $I = '[$i]', $0 = '[0]';
|
|
147895
148473
|
if (!acceptsArray) {
|
|
147896
148474
|
return {
|
|
147897
|
-
expr: expr.replace(regex,
|
|
147898
|
-
listener
|
|
148475
|
+
'expr': expr.replace(regex, $0),
|
|
148476
|
+
'listener': listener
|
|
147899
148477
|
};
|
|
147900
148478
|
}
|
|
147901
|
-
|
|
147902
|
-
|
|
147903
|
-
|
|
147904
|
-
|
|
147905
|
-
|
|
147906
|
-
|
|
148479
|
+
// listener accepts array
|
|
148480
|
+
// replace all except the last `[$i]` with `[0]` and return the expression.
|
|
148481
|
+
var index = expr.lastIndexOf($I), _expr = expr.substr(0, index).replace($I, $0), restExpr = expr.substr(index + 5), arrayConsumerFn = listener;
|
|
148482
|
+
if (restExpr) {
|
|
148483
|
+
arrayConsumerFn = arrayConsumer$1.bind(undefined, listener, restExpr);
|
|
148484
|
+
}
|
|
147907
148485
|
return {
|
|
147908
|
-
expr:
|
|
147909
|
-
listener: arrayConsumerFn
|
|
148486
|
+
'expr': _expr,
|
|
148487
|
+
'listener': arrayConsumerFn
|
|
147910
148488
|
};
|
|
147911
148489
|
};
|
|
147912
|
-
/**
|
|
147913
|
-
* Determines if an expression is static (doesn't need to be watched)
|
|
147914
|
-
*/
|
|
147915
|
-
const STATIC_EXPRESSION_NAMES$1 = [
|
|
147916
|
-
"row.getProperty('investment')",
|
|
147917
|
-
"row.getProperty('factsheetLink')",
|
|
147918
|
-
"row.getProperty('isRebalanceEligible')"
|
|
147919
|
-
];
|
|
147920
|
-
const isStaticExpression$1 = (expr) => {
|
|
147921
|
-
if (typeof expr !== 'string') {
|
|
147922
|
-
return false;
|
|
147923
|
-
}
|
|
147924
|
-
const trimmedExpr = expr.trim();
|
|
147925
|
-
// Expressions that always evaluate to localization strings
|
|
147926
|
-
if (trimmedExpr.includes('appLocale')) {
|
|
147927
|
-
return true;
|
|
147928
|
-
}
|
|
147929
|
-
// Hard-coded static expression names
|
|
147930
|
-
if (STATIC_EXPRESSION_NAMES$1.includes(trimmedExpr)) {
|
|
147931
|
-
return true;
|
|
147932
|
-
}
|
|
147933
|
-
return false;
|
|
147934
|
-
};
|
|
147935
|
-
/**
|
|
147936
|
-
* Gets the scope type from the scope object
|
|
147937
|
-
*/
|
|
147938
|
-
const getScopeType$1 = ($scope) => {
|
|
147939
|
-
if (!$scope) {
|
|
147940
|
-
return null;
|
|
147941
|
-
}
|
|
147942
|
-
if ($scope.pageName)
|
|
147943
|
-
return 'Page';
|
|
147944
|
-
if ($scope.prefabName)
|
|
147945
|
-
return 'Prefab';
|
|
147946
|
-
if ($scope.partialName)
|
|
147947
|
-
return 'Partial';
|
|
147948
|
-
// Check for App scope
|
|
147949
|
-
if ($scope.Variables !== undefined &&
|
|
147950
|
-
$scope.Actions !== undefined &&
|
|
147951
|
-
!$scope.pageName &&
|
|
147952
|
-
!$scope.prefabName &&
|
|
147953
|
-
!$scope.partialName) {
|
|
147954
|
-
return 'App';
|
|
147955
|
-
}
|
|
147956
|
-
if ($scope.constructor?.name === 'AppRef') {
|
|
147957
|
-
return 'App';
|
|
147958
|
-
}
|
|
147959
|
-
return null;
|
|
147960
|
-
};
|
|
147961
|
-
/**
|
|
147962
|
-
* Gets scope name based on scope type
|
|
147963
|
-
*/
|
|
147964
|
-
const getScopeName$1 = ($scope, scopeType) => {
|
|
147965
|
-
if (!scopeType || !$scope) {
|
|
147966
|
-
return null;
|
|
147967
|
-
}
|
|
147968
|
-
switch (scopeType) {
|
|
147969
|
-
case 'Prefab': return $scope.prefabName || null;
|
|
147970
|
-
case 'Partial': return $scope.partialName || null;
|
|
147971
|
-
case 'Page': return $scope.pageName || null;
|
|
147972
|
-
default: return null;
|
|
147973
|
-
}
|
|
147974
|
-
};
|
|
147975
|
-
/**
|
|
147976
|
-
* Main watch function
|
|
147977
|
-
*/
|
|
147978
148490
|
const $watch$1 = (expr, $scope, $locals, listener, identifier = watchIdGenerator$1.nextUid(), doNotClone = false, config = {}, isMuted) => {
|
|
147979
|
-
|
|
147980
|
-
|
|
147981
|
-
const watchInfo = getUpdatedWatchInfo$1(expr, config.arrayType || config.isList || false, listener);
|
|
148491
|
+
if (expr.indexOf('[$i]') !== -1) {
|
|
148492
|
+
let watchInfo = getUpdatedWatcInfo$1(expr, config && (config.arrayType || config.isList), listener);
|
|
147982
148493
|
expr = watchInfo.expr;
|
|
147983
148494
|
listener = watchInfo.listener;
|
|
147984
148495
|
}
|
|
147985
|
-
// Handle static expressions
|
|
147986
|
-
if (isStaticExpression$1(expr)) {
|
|
147987
|
-
try {
|
|
147988
|
-
const fn = $parseExpr$1(expr);
|
|
147989
|
-
const staticValue = fn($scope, $locals);
|
|
147990
|
-
listener(staticValue, FIRST_TIME_WATCH$1);
|
|
147991
|
-
}
|
|
147992
|
-
catch (e) {
|
|
147993
|
-
console.warn(`Error evaluating static expression '${expr}':`, e);
|
|
147994
|
-
listener(undefined, FIRST_TIME_WATCH$1);
|
|
147995
|
-
}
|
|
147996
|
-
return () => { }; // No-op unsubscribe
|
|
147997
|
-
}
|
|
147998
148496
|
const fn = $parseExpr$1();
|
|
147999
|
-
|
|
148000
|
-
|
|
148001
|
-
const watchInfo = {
|
|
148002
|
-
fn: fn.bind(null, $scope, $locals),
|
|
148497
|
+
registry$1.set(identifier, {
|
|
148498
|
+
fn: fn.bind(expr, $scope, $locals),
|
|
148003
148499
|
listener,
|
|
148004
148500
|
expr,
|
|
148005
148501
|
last: FIRST_TIME_WATCH$1,
|
|
148006
148502
|
doNotClone,
|
|
148007
|
-
isMuted
|
|
148008
|
-
|
|
148009
|
-
scopeName
|
|
148010
|
-
};
|
|
148011
|
-
// Store in registry
|
|
148012
|
-
const widgetId = getWidgetId$1(identifier);
|
|
148013
|
-
if (widgetId) {
|
|
148014
|
-
const propertyName = getPropertyName$1(identifier);
|
|
148015
|
-
if (!registry$1.has(widgetId)) {
|
|
148016
|
-
registry$1.set(widgetId, {});
|
|
148017
|
-
}
|
|
148018
|
-
const widgetGroup = registry$1.get(widgetId);
|
|
148019
|
-
widgetGroup[propertyName] = watchInfo;
|
|
148020
|
-
}
|
|
148021
|
-
else {
|
|
148022
|
-
registry$1.set(identifier, watchInfo);
|
|
148023
|
-
}
|
|
148503
|
+
isMuted: isMuted
|
|
148504
|
+
});
|
|
148024
148505
|
return () => $unwatch$1(identifier);
|
|
148025
148506
|
};
|
|
148026
|
-
|
|
148027
|
-
|
|
148028
|
-
|
|
148029
|
-
const $
|
|
148030
|
-
|
|
148031
|
-
|
|
148032
|
-
|
|
148033
|
-
|
|
148034
|
-
if (
|
|
148035
|
-
|
|
148036
|
-
|
|
148037
|
-
delete widgetGroup[propertyName];
|
|
148038
|
-
// Clean up empty widget groups
|
|
148039
|
-
if (Object.keys(widgetGroup).length === 0) {
|
|
148040
|
-
registry$1.delete(widgetId);
|
|
148041
|
-
}
|
|
148042
|
-
return true;
|
|
148043
|
-
}
|
|
148507
|
+
const $unwatch$1 = identifier => registry$1.delete(identifier);
|
|
148508
|
+
window.watchRegistry = registry$1;
|
|
148509
|
+
window.__WM_DEBUG_WATCHERS__ = false;
|
|
148510
|
+
/*export const $invokeWatchers = (force?: boolean, ignoreMuted?: boolean) => {
|
|
148511
|
+
if (force) {
|
|
148512
|
+
triggerWatchers(ignoreMuted);
|
|
148513
|
+
} else {
|
|
148514
|
+
|
|
148515
|
+
if (skipWatchers) {
|
|
148516
|
+
skipWatchers = false;
|
|
148517
|
+
return;
|
|
148044
148518
|
}
|
|
148519
|
+
debouncedTriggerWatchers();
|
|
148045
148520
|
}
|
|
148046
|
-
|
|
148047
|
-
if (registry$1.has(identifier)) {
|
|
148048
|
-
registry$1.delete(identifier);
|
|
148049
|
-
return true;
|
|
148050
|
-
}
|
|
148051
|
-
return false;
|
|
148052
|
-
};
|
|
148521
|
+
};*/
|
|
148053
148522
|
const $appDigest$1 = (() => {
|
|
148054
|
-
return (force
|
|
148523
|
+
return (force) => {
|
|
148055
148524
|
{
|
|
148056
148525
|
return;
|
|
148057
148526
|
}
|
|
148058
148527
|
};
|
|
148059
148528
|
})();
|
|
148060
|
-
// Export registry for debugging
|
|
148061
|
-
// (window as any).watchRegistry = registry;
|
|
148062
148529
|
|
|
148063
148530
|
var ComponentType$1;
|
|
148064
148531
|
(function (ComponentType) {
|
|
@@ -158849,14 +159316,14 @@ function createNgModuleType(meta) {
|
|
|
158849
159316
|
if (meta.kind === R3NgModuleMetadataKind.Local) {
|
|
158850
159317
|
return new ExpressionType$1(meta.type.value);
|
|
158851
159318
|
}
|
|
158852
|
-
const { type: moduleType, declarations, exports
|
|
159319
|
+
const { type: moduleType, declarations, exports, imports, includeImportTypes, publicDeclarationTypes, } = meta;
|
|
158853
159320
|
return new ExpressionType$1(importExpr(Identifiers.NgModuleDeclaration, [
|
|
158854
159321
|
new ExpressionType$1(moduleType.type),
|
|
158855
159322
|
publicDeclarationTypes === null
|
|
158856
159323
|
? tupleTypeOf(declarations)
|
|
158857
159324
|
: tupleOfTypes(publicDeclarationTypes),
|
|
158858
159325
|
includeImportTypes ? tupleTypeOf(imports) : NONE_TYPE,
|
|
158859
|
-
tupleTypeOf(exports
|
|
159326
|
+
tupleTypeOf(exports),
|
|
158860
159327
|
]));
|
|
158861
159328
|
}
|
|
158862
159329
|
/**
|
|
@@ -181472,17 +181939,17 @@ var root = freeGlobal || freeSelf || Function('return this')();
|
|
|
181472
181939
|
var Symbol$1 = root.Symbol;
|
|
181473
181940
|
|
|
181474
181941
|
/** Used for built-in method references. */
|
|
181475
|
-
var objectProto$
|
|
181942
|
+
var objectProto$i = Object.prototype;
|
|
181476
181943
|
|
|
181477
181944
|
/** Used to check objects for own properties. */
|
|
181478
|
-
var hasOwnProperty$
|
|
181945
|
+
var hasOwnProperty$f = objectProto$i.hasOwnProperty;
|
|
181479
181946
|
|
|
181480
181947
|
/**
|
|
181481
181948
|
* Used to resolve the
|
|
181482
181949
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
181483
181950
|
* of values.
|
|
181484
181951
|
*/
|
|
181485
|
-
var nativeObjectToString$1 = objectProto$
|
|
181952
|
+
var nativeObjectToString$1 = objectProto$i.toString;
|
|
181486
181953
|
|
|
181487
181954
|
/** Built-in value references. */
|
|
181488
181955
|
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
@@ -181495,7 +181962,7 @@ var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
|
181495
181962
|
* @returns {string} Returns the raw `toStringTag`.
|
|
181496
181963
|
*/
|
|
181497
181964
|
function getRawTag(value) {
|
|
181498
|
-
var isOwn = hasOwnProperty$
|
|
181965
|
+
var isOwn = hasOwnProperty$f.call(value, symToStringTag$1),
|
|
181499
181966
|
tag = value[symToStringTag$1];
|
|
181500
181967
|
|
|
181501
181968
|
try {
|
|
@@ -181515,14 +181982,14 @@ function getRawTag(value) {
|
|
|
181515
181982
|
}
|
|
181516
181983
|
|
|
181517
181984
|
/** Used for built-in method references. */
|
|
181518
|
-
var objectProto$
|
|
181985
|
+
var objectProto$h = Object.prototype;
|
|
181519
181986
|
|
|
181520
181987
|
/**
|
|
181521
181988
|
* Used to resolve the
|
|
181522
181989
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
181523
181990
|
* of values.
|
|
181524
181991
|
*/
|
|
181525
|
-
var nativeObjectToString = objectProto$
|
|
181992
|
+
var nativeObjectToString = objectProto$h.toString;
|
|
181526
181993
|
|
|
181527
181994
|
/**
|
|
181528
181995
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
@@ -181988,17 +182455,17 @@ var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
|
181988
182455
|
|
|
181989
182456
|
/** Used for built-in method references. */
|
|
181990
182457
|
var funcProto$1 = Function.prototype,
|
|
181991
|
-
objectProto$
|
|
182458
|
+
objectProto$g = Object.prototype;
|
|
181992
182459
|
|
|
181993
182460
|
/** Used to resolve the decompiled source of functions. */
|
|
181994
182461
|
var funcToString$1 = funcProto$1.toString;
|
|
181995
182462
|
|
|
181996
182463
|
/** Used to check objects for own properties. */
|
|
181997
|
-
var hasOwnProperty$
|
|
182464
|
+
var hasOwnProperty$e = objectProto$g.hasOwnProperty;
|
|
181998
182465
|
|
|
181999
182466
|
/** Used to detect if a method is native. */
|
|
182000
182467
|
var reIsNative = RegExp('^' +
|
|
182001
|
-
funcToString$1.call(hasOwnProperty$
|
|
182468
|
+
funcToString$1.call(hasOwnProperty$e).replace(reRegExpChar, '\\$&')
|
|
182002
182469
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
182003
182470
|
);
|
|
182004
182471
|
|
|
@@ -182413,10 +182880,10 @@ function eq(value, other) {
|
|
|
182413
182880
|
}
|
|
182414
182881
|
|
|
182415
182882
|
/** Used for built-in method references. */
|
|
182416
|
-
var objectProto$
|
|
182883
|
+
var objectProto$f = Object.prototype;
|
|
182417
182884
|
|
|
182418
182885
|
/** Used to check objects for own properties. */
|
|
182419
|
-
var hasOwnProperty$
|
|
182886
|
+
var hasOwnProperty$d = objectProto$f.hasOwnProperty;
|
|
182420
182887
|
|
|
182421
182888
|
/**
|
|
182422
182889
|
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
@@ -182430,7 +182897,7 @@ var hasOwnProperty$c = objectProto$e.hasOwnProperty;
|
|
|
182430
182897
|
*/
|
|
182431
182898
|
function assignValue(object, key, value) {
|
|
182432
182899
|
var objValue = object[key];
|
|
182433
|
-
if (!(hasOwnProperty$
|
|
182900
|
+
if (!(hasOwnProperty$d.call(object, key) && eq(objValue, value)) ||
|
|
182434
182901
|
(value === undefined && !(key in object))) {
|
|
182435
182902
|
baseAssignValue(object, key, value);
|
|
182436
182903
|
}
|
|
@@ -182636,7 +183103,7 @@ function createAssigner(assigner) {
|
|
|
182636
183103
|
}
|
|
182637
183104
|
|
|
182638
183105
|
/** Used for built-in method references. */
|
|
182639
|
-
var objectProto$
|
|
183106
|
+
var objectProto$e = Object.prototype;
|
|
182640
183107
|
|
|
182641
183108
|
/**
|
|
182642
183109
|
* Checks if `value` is likely a prototype object.
|
|
@@ -182647,7 +183114,7 @@ var objectProto$d = Object.prototype;
|
|
|
182647
183114
|
*/
|
|
182648
183115
|
function isPrototype(value) {
|
|
182649
183116
|
var Ctor = value && value.constructor,
|
|
182650
|
-
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$
|
|
183117
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$e;
|
|
182651
183118
|
|
|
182652
183119
|
return value === proto;
|
|
182653
183120
|
}
|
|
@@ -182686,13 +183153,13 @@ function baseIsArguments(value) {
|
|
|
182686
183153
|
}
|
|
182687
183154
|
|
|
182688
183155
|
/** Used for built-in method references. */
|
|
182689
|
-
var objectProto$
|
|
183156
|
+
var objectProto$d = Object.prototype;
|
|
182690
183157
|
|
|
182691
183158
|
/** Used to check objects for own properties. */
|
|
182692
|
-
var hasOwnProperty$
|
|
183159
|
+
var hasOwnProperty$c = objectProto$d.hasOwnProperty;
|
|
182693
183160
|
|
|
182694
183161
|
/** Built-in value references. */
|
|
182695
|
-
var propertyIsEnumerable$1 = objectProto$
|
|
183162
|
+
var propertyIsEnumerable$1 = objectProto$d.propertyIsEnumerable;
|
|
182696
183163
|
|
|
182697
183164
|
/**
|
|
182698
183165
|
* Checks if `value` is likely an `arguments` object.
|
|
@@ -182713,7 +183180,7 @@ var propertyIsEnumerable$1 = objectProto$c.propertyIsEnumerable;
|
|
|
182713
183180
|
* // => false
|
|
182714
183181
|
*/
|
|
182715
183182
|
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
182716
|
-
return isObjectLike(value) && hasOwnProperty$
|
|
183183
|
+
return isObjectLike(value) && hasOwnProperty$c.call(value, 'callee') &&
|
|
182717
183184
|
!propertyIsEnumerable$1.call(value, 'callee');
|
|
182718
183185
|
};
|
|
182719
183186
|
|
|
@@ -182886,10 +183353,10 @@ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
|
182886
183353
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
182887
183354
|
|
|
182888
183355
|
/** Used for built-in method references. */
|
|
182889
|
-
var objectProto$
|
|
183356
|
+
var objectProto$c = Object.prototype;
|
|
182890
183357
|
|
|
182891
183358
|
/** Used to check objects for own properties. */
|
|
182892
|
-
var hasOwnProperty$
|
|
183359
|
+
var hasOwnProperty$b = objectProto$c.hasOwnProperty;
|
|
182893
183360
|
|
|
182894
183361
|
/**
|
|
182895
183362
|
* Creates an array of the enumerable property names of the array-like `value`.
|
|
@@ -182909,7 +183376,7 @@ function arrayLikeKeys(value, inherited) {
|
|
|
182909
183376
|
length = result.length;
|
|
182910
183377
|
|
|
182911
183378
|
for (var key in value) {
|
|
182912
|
-
if ((inherited || hasOwnProperty$
|
|
183379
|
+
if ((inherited || hasOwnProperty$b.call(value, key)) &&
|
|
182913
183380
|
!(skipIndexes && (
|
|
182914
183381
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
182915
183382
|
key == 'length' ||
|
|
@@ -182944,10 +183411,10 @@ function overArg(func, transform) {
|
|
|
182944
183411
|
var nativeKeys = overArg(Object.keys, Object);
|
|
182945
183412
|
|
|
182946
183413
|
/** Used for built-in method references. */
|
|
182947
|
-
var objectProto$
|
|
183414
|
+
var objectProto$b = Object.prototype;
|
|
182948
183415
|
|
|
182949
183416
|
/** Used to check objects for own properties. */
|
|
182950
|
-
var hasOwnProperty$
|
|
183417
|
+
var hasOwnProperty$a = objectProto$b.hasOwnProperty;
|
|
182951
183418
|
|
|
182952
183419
|
/**
|
|
182953
183420
|
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
@@ -182962,7 +183429,7 @@ function baseKeys(object) {
|
|
|
182962
183429
|
}
|
|
182963
183430
|
var result = [];
|
|
182964
183431
|
for (var key in Object(object)) {
|
|
182965
|
-
if (hasOwnProperty$
|
|
183432
|
+
if (hasOwnProperty$a.call(object, key) && key != 'constructor') {
|
|
182966
183433
|
result.push(key);
|
|
182967
183434
|
}
|
|
182968
183435
|
}
|
|
@@ -183002,10 +183469,10 @@ function keys(object) {
|
|
|
183002
183469
|
}
|
|
183003
183470
|
|
|
183004
183471
|
/** Used for built-in method references. */
|
|
183005
|
-
var objectProto$
|
|
183472
|
+
var objectProto$a = Object.prototype;
|
|
183006
183473
|
|
|
183007
183474
|
/** Used to check objects for own properties. */
|
|
183008
|
-
var hasOwnProperty$
|
|
183475
|
+
var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
|
|
183009
183476
|
|
|
183010
183477
|
/**
|
|
183011
183478
|
* Assigns own enumerable string keyed properties of source objects to the
|
|
@@ -183045,7 +183512,7 @@ var assign = createAssigner(function(object, source) {
|
|
|
183045
183512
|
return;
|
|
183046
183513
|
}
|
|
183047
183514
|
for (var key in source) {
|
|
183048
|
-
if (hasOwnProperty$
|
|
183515
|
+
if (hasOwnProperty$9.call(source, key)) {
|
|
183049
183516
|
assignValue(object, key, source[key]);
|
|
183050
183517
|
}
|
|
183051
183518
|
}
|
|
@@ -183071,10 +183538,10 @@ function nativeKeysIn(object) {
|
|
|
183071
183538
|
}
|
|
183072
183539
|
|
|
183073
183540
|
/** Used for built-in method references. */
|
|
183074
|
-
var objectProto$
|
|
183541
|
+
var objectProto$9 = Object.prototype;
|
|
183075
183542
|
|
|
183076
183543
|
/** Used to check objects for own properties. */
|
|
183077
|
-
var hasOwnProperty$
|
|
183544
|
+
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
183078
183545
|
|
|
183079
183546
|
/**
|
|
183080
183547
|
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
@@ -183091,7 +183558,7 @@ function baseKeysIn(object) {
|
|
|
183091
183558
|
result = [];
|
|
183092
183559
|
|
|
183093
183560
|
for (var key in object) {
|
|
183094
|
-
if (!(key == 'constructor' && (isProto || !hasOwnProperty$
|
|
183561
|
+
if (!(key == 'constructor' && (isProto || !hasOwnProperty$8.call(object, key)))) {
|
|
183095
183562
|
result.push(key);
|
|
183096
183563
|
}
|
|
183097
183564
|
}
|
|
@@ -183185,10 +183652,10 @@ function hashDelete(key) {
|
|
|
183185
183652
|
var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
|
|
183186
183653
|
|
|
183187
183654
|
/** Used for built-in method references. */
|
|
183188
|
-
var objectProto$
|
|
183655
|
+
var objectProto$8 = Object.prototype;
|
|
183189
183656
|
|
|
183190
183657
|
/** Used to check objects for own properties. */
|
|
183191
|
-
var hasOwnProperty$
|
|
183658
|
+
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
183192
183659
|
|
|
183193
183660
|
/**
|
|
183194
183661
|
* Gets the hash value for `key`.
|
|
@@ -183205,14 +183672,14 @@ function hashGet(key) {
|
|
|
183205
183672
|
var result = data[key];
|
|
183206
183673
|
return result === HASH_UNDEFINED$2 ? undefined : result;
|
|
183207
183674
|
}
|
|
183208
|
-
return hasOwnProperty$
|
|
183675
|
+
return hasOwnProperty$7.call(data, key) ? data[key] : undefined;
|
|
183209
183676
|
}
|
|
183210
183677
|
|
|
183211
183678
|
/** Used for built-in method references. */
|
|
183212
|
-
var objectProto$
|
|
183679
|
+
var objectProto$7 = Object.prototype;
|
|
183213
183680
|
|
|
183214
183681
|
/** Used to check objects for own properties. */
|
|
183215
|
-
var hasOwnProperty$
|
|
183682
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
183216
183683
|
|
|
183217
183684
|
/**
|
|
183218
183685
|
* Checks if a hash value for `key` exists.
|
|
@@ -183225,7 +183692,7 @@ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
|
183225
183692
|
*/
|
|
183226
183693
|
function hashHas(key) {
|
|
183227
183694
|
var data = this.__data__;
|
|
183228
|
-
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$
|
|
183695
|
+
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$6.call(data, key);
|
|
183229
183696
|
}
|
|
183230
183697
|
|
|
183231
183698
|
/** Used to stand-in for `undefined` hash values. */
|
|
@@ -183870,13 +184337,13 @@ var objectTag$3 = '[object Object]';
|
|
|
183870
184337
|
|
|
183871
184338
|
/** Used for built-in method references. */
|
|
183872
184339
|
var funcProto = Function.prototype,
|
|
183873
|
-
objectProto$
|
|
184340
|
+
objectProto$6 = Object.prototype;
|
|
183874
184341
|
|
|
183875
184342
|
/** Used to resolve the decompiled source of functions. */
|
|
183876
184343
|
var funcToString = funcProto.toString;
|
|
183877
184344
|
|
|
183878
184345
|
/** Used to check objects for own properties. */
|
|
183879
|
-
var hasOwnProperty$
|
|
184346
|
+
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
183880
184347
|
|
|
183881
184348
|
/** Used to infer the `Object` constructor. */
|
|
183882
184349
|
var objectCtorString = funcToString.call(Object);
|
|
@@ -183917,7 +184384,7 @@ function isPlainObject(value) {
|
|
|
183917
184384
|
if (proto === null) {
|
|
183918
184385
|
return true;
|
|
183919
184386
|
}
|
|
183920
|
-
var Ctor = hasOwnProperty$
|
|
184387
|
+
var Ctor = hasOwnProperty$5.call(proto, 'constructor') && proto.constructor;
|
|
183921
184388
|
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
|
183922
184389
|
funcToString.call(Ctor) == objectCtorString;
|
|
183923
184390
|
}
|
|
@@ -184722,10 +185189,10 @@ function stubArray() {
|
|
|
184722
185189
|
}
|
|
184723
185190
|
|
|
184724
185191
|
/** Used for built-in method references. */
|
|
184725
|
-
var objectProto$
|
|
185192
|
+
var objectProto$5 = Object.prototype;
|
|
184726
185193
|
|
|
184727
185194
|
/** Built-in value references. */
|
|
184728
|
-
var propertyIsEnumerable = objectProto$
|
|
185195
|
+
var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
|
|
184729
185196
|
|
|
184730
185197
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
184731
185198
|
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
|
|
@@ -184888,10 +185355,10 @@ if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3)
|
|
|
184888
185355
|
}
|
|
184889
185356
|
|
|
184890
185357
|
/** Used for built-in method references. */
|
|
184891
|
-
var objectProto$
|
|
185358
|
+
var objectProto$4 = Object.prototype;
|
|
184892
185359
|
|
|
184893
185360
|
/** Used to check objects for own properties. */
|
|
184894
|
-
var hasOwnProperty$
|
|
185361
|
+
var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
|
|
184895
185362
|
|
|
184896
185363
|
/**
|
|
184897
185364
|
* Initializes an array clone.
|
|
@@ -184905,7 +185372,7 @@ function initCloneArray(array) {
|
|
|
184905
185372
|
result = new array.constructor(length);
|
|
184906
185373
|
|
|
184907
185374
|
// Add properties assigned by `RegExp#exec`.
|
|
184908
|
-
if (length && typeof array[0] == 'string' && hasOwnProperty$
|
|
185375
|
+
if (length && typeof array[0] == 'string' && hasOwnProperty$4.call(array, 'index')) {
|
|
184909
185376
|
result.index = array.index;
|
|
184910
185377
|
result.input = array.input;
|
|
184911
185378
|
}
|
|
@@ -185366,7 +185833,7 @@ function setCacheAdd(value) {
|
|
|
185366
185833
|
* @name has
|
|
185367
185834
|
* @memberOf SetCache
|
|
185368
185835
|
* @param {*} value The value to search for.
|
|
185369
|
-
* @returns {
|
|
185836
|
+
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
185370
185837
|
*/
|
|
185371
185838
|
function setCacheHas(value) {
|
|
185372
185839
|
return this.__data__.has(value);
|
|
@@ -185649,10 +186116,10 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
|
185649
186116
|
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
185650
186117
|
|
|
185651
186118
|
/** Used for built-in method references. */
|
|
185652
|
-
var objectProto$
|
|
186119
|
+
var objectProto$3 = Object.prototype;
|
|
185653
186120
|
|
|
185654
186121
|
/** Used to check objects for own properties. */
|
|
185655
|
-
var hasOwnProperty$
|
|
186122
|
+
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
185656
186123
|
|
|
185657
186124
|
/**
|
|
185658
186125
|
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
@@ -185680,7 +186147,7 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
|
185680
186147
|
var index = objLength;
|
|
185681
186148
|
while (index--) {
|
|
185682
186149
|
var key = objProps[index];
|
|
185683
|
-
if (!(isPartial ? key in other : hasOwnProperty$
|
|
186150
|
+
if (!(isPartial ? key in other : hasOwnProperty$3.call(other, key))) {
|
|
185684
186151
|
return false;
|
|
185685
186152
|
}
|
|
185686
186153
|
}
|
|
@@ -185741,10 +186208,10 @@ var argsTag = '[object Arguments]',
|
|
|
185741
186208
|
objectTag = '[object Object]';
|
|
185742
186209
|
|
|
185743
186210
|
/** Used for built-in method references. */
|
|
185744
|
-
var objectProto$
|
|
186211
|
+
var objectProto$2 = Object.prototype;
|
|
185745
186212
|
|
|
185746
186213
|
/** Used to check objects for own properties. */
|
|
185747
|
-
var hasOwnProperty$
|
|
186214
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
185748
186215
|
|
|
185749
186216
|
/**
|
|
185750
186217
|
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
@@ -185787,8 +186254,8 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
|
185787
186254
|
: equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
185788
186255
|
}
|
|
185789
186256
|
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
185790
|
-
var objIsWrapped = objIsObj && hasOwnProperty$
|
|
185791
|
-
othIsWrapped = othIsObj && hasOwnProperty$
|
|
186257
|
+
var objIsWrapped = objIsObj && hasOwnProperty$2.call(object, '__wrapped__'),
|
|
186258
|
+
othIsWrapped = othIsObj && hasOwnProperty$2.call(other, '__wrapped__');
|
|
185792
186259
|
|
|
185793
186260
|
if (objIsWrapped || othIsWrapped) {
|
|
185794
186261
|
var objUnwrapped = objIsWrapped ? object.value() : object,
|
|
@@ -187202,10 +187669,10 @@ var mapTag = '[object Map]',
|
|
|
187202
187669
|
setTag = '[object Set]';
|
|
187203
187670
|
|
|
187204
187671
|
/** Used for built-in method references. */
|
|
187205
|
-
var objectProto = Object.prototype;
|
|
187672
|
+
var objectProto$1 = Object.prototype;
|
|
187206
187673
|
|
|
187207
187674
|
/** Used to check objects for own properties. */
|
|
187208
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
187675
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
187209
187676
|
|
|
187210
187677
|
/**
|
|
187211
187678
|
* Checks if `value` is an empty object, collection, map, or set.
|
|
@@ -187257,7 +187724,7 @@ function isEmpty(value) {
|
|
|
187257
187724
|
return !baseKeys(value).length;
|
|
187258
187725
|
}
|
|
187259
187726
|
for (var key in value) {
|
|
187260
|
-
if (hasOwnProperty.call(value, key)) {
|
|
187727
|
+
if (hasOwnProperty$1.call(value, key)) {
|
|
187261
187728
|
return false;
|
|
187262
187729
|
}
|
|
187263
187730
|
}
|
|
@@ -187481,6 +187948,12 @@ var merge = createAssigner(function(object, source, srcIndex) {
|
|
|
187481
187948
|
baseMerge(object, source, srcIndex);
|
|
187482
187949
|
});
|
|
187483
187950
|
|
|
187951
|
+
/** Used for built-in method references. */
|
|
187952
|
+
var objectProto = Object.prototype;
|
|
187953
|
+
|
|
187954
|
+
/** Used to check objects for own properties. */
|
|
187955
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
187956
|
+
|
|
187484
187957
|
/**
|
|
187485
187958
|
* The base implementation of `_.unset`.
|
|
187486
187959
|
*
|
|
@@ -187491,8 +187964,34 @@ var merge = createAssigner(function(object, source, srcIndex) {
|
|
|
187491
187964
|
*/
|
|
187492
187965
|
function baseUnset(object, path) {
|
|
187493
187966
|
path = castPath(path, object);
|
|
187494
|
-
|
|
187495
|
-
|
|
187967
|
+
|
|
187968
|
+
// Prevent prototype pollution:
|
|
187969
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
|
187970
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh
|
|
187971
|
+
var index = -1,
|
|
187972
|
+
length = path.length;
|
|
187973
|
+
|
|
187974
|
+
if (!length) {
|
|
187975
|
+
return true;
|
|
187976
|
+
}
|
|
187977
|
+
|
|
187978
|
+
while (++index < length) {
|
|
187979
|
+
var key = toKey(path[index]);
|
|
187980
|
+
|
|
187981
|
+
// Always block "__proto__" anywhere in the path if it's not expected
|
|
187982
|
+
if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
|
|
187983
|
+
return false;
|
|
187984
|
+
}
|
|
187985
|
+
|
|
187986
|
+
// Block constructor/prototype as non-terminal traversal keys to prevent
|
|
187987
|
+
// escaping the object graph into built-in constructors and prototypes.
|
|
187988
|
+
if ((key === 'constructor' || key === 'prototype') && index < length - 1) {
|
|
187989
|
+
return false;
|
|
187990
|
+
}
|
|
187991
|
+
}
|
|
187992
|
+
|
|
187993
|
+
var obj = parent$1(object, path);
|
|
187994
|
+
return obj == null || delete obj[toKey(last(path))];
|
|
187496
187995
|
}
|
|
187497
187996
|
|
|
187498
187997
|
/**
|
|
@@ -187992,11 +188491,22 @@ function requireConventions () {
|
|
|
187992
188491
|
XMLNS: 'http://www.w3.org/2000/xmlns/',
|
|
187993
188492
|
});
|
|
187994
188493
|
|
|
188494
|
+
//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
|
188495
|
+
//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
|
|
188496
|
+
//[5] Name ::= NameStartChar (NameChar)*
|
|
188497
|
+
var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
|
|
188498
|
+
var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
|
|
188499
|
+
var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
|
|
188500
|
+
//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
|
|
188501
|
+
|
|
187995
188502
|
conventions.assign = assign;
|
|
187996
188503
|
conventions.find = find;
|
|
187997
188504
|
conventions.freeze = freeze;
|
|
187998
188505
|
conventions.MIME_TYPE = MIME_TYPE;
|
|
187999
188506
|
conventions.NAMESPACE = NAMESPACE;
|
|
188507
|
+
conventions.nameStartChar = nameStartChar;
|
|
188508
|
+
conventions.nameChar = nameChar;
|
|
188509
|
+
conventions.tagNamePattern = tagNamePattern;
|
|
188000
188510
|
return conventions;
|
|
188001
188511
|
}
|
|
188002
188512
|
|
|
@@ -188009,6 +188519,7 @@ function requireDom () {
|
|
|
188009
188519
|
|
|
188010
188520
|
var find = conventions.find;
|
|
188011
188521
|
var NAMESPACE = conventions.NAMESPACE;
|
|
188522
|
+
var tagNamePattern = conventions.tagNamePattern;
|
|
188012
188523
|
|
|
188013
188524
|
/**
|
|
188014
188525
|
* A prerequisite for `[].filter`, to drop elements that are empty
|
|
@@ -188118,14 +188629,14 @@ function requireDom () {
|
|
|
188118
188629
|
ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
|
|
188119
188630
|
var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
|
|
188120
188631
|
ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
|
|
188121
|
-
ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
|
|
188632
|
+
var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
|
|
188122
188633
|
ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
|
|
188123
188634
|
ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
|
|
188124
188635
|
var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
|
|
188125
188636
|
ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
|
|
188126
188637
|
var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
|
|
188127
188638
|
//level2
|
|
188128
|
-
ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
|
|
188639
|
+
var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
|
|
188129
188640
|
ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
|
|
188130
188641
|
ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
|
|
188131
188642
|
ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
|
|
@@ -188175,9 +188686,10 @@ function requireDom () {
|
|
|
188175
188686
|
item: function(index) {
|
|
188176
188687
|
return index >= 0 && index < this.length ? this[index] : null;
|
|
188177
188688
|
},
|
|
188178
|
-
toString:function(isHTML,nodeFilter){
|
|
188689
|
+
toString:function(isHTML,nodeFilter,options){
|
|
188690
|
+
var requireWellFormed = !!options && !!options.requireWellFormed;
|
|
188179
188691
|
for(var buf = [], i = 0;i<this.length;i++){
|
|
188180
|
-
serializeToString(this[i],buf,isHTML,nodeFilter);
|
|
188692
|
+
serializeToString(this[i],buf,isHTML,nodeFilter,null,requireWellFormed);
|
|
188181
188693
|
}
|
|
188182
188694
|
return buf.join('');
|
|
188183
188695
|
},
|
|
@@ -188239,6 +188751,13 @@ function requireDom () {
|
|
|
188239
188751
|
* used for attributes or DocumentType entities
|
|
188240
188752
|
*/
|
|
188241
188753
|
function NamedNodeMap() {
|
|
188754
|
+
// nodeName -> Attr membership index; lets the parse-time de-duplication in
|
|
188755
|
+
// setNamedItem resolve an existing attribute in O(1) instead of scanning the
|
|
188756
|
+
// list, so building an element with M attributes costs O(M) rather than O(M^2).
|
|
188757
|
+
// The numbered entries and length remain the sole authority for attribute order.
|
|
188758
|
+
// Object.create(null) so an attribute named __proto__ or constructor is an
|
|
188759
|
+
// ordinary key.
|
|
188760
|
+
this._nameIndex = Object.create(null);
|
|
188242
188761
|
}
|
|
188243
188762
|
function _findNodeIndex(list,node){
|
|
188244
188763
|
var i = list.length;
|
|
@@ -188247,12 +188766,27 @@ function requireDom () {
|
|
|
188247
188766
|
}
|
|
188248
188767
|
}
|
|
188249
188768
|
|
|
188769
|
+
function _nnmIndexAdd(list, attr) {
|
|
188770
|
+
list._nameIndex[attr.nodeName] = attr;
|
|
188771
|
+
}
|
|
188772
|
+
function _nnmIndexRemove(list, attr) {
|
|
188773
|
+
// Only drop the entry if it still points at this attribute; a replacement with
|
|
188774
|
+
// a different nodeName may already have re-keyed it.
|
|
188775
|
+
if (list._nameIndex[attr.nodeName] === attr) {
|
|
188776
|
+
delete list._nameIndex[attr.nodeName];
|
|
188777
|
+
}
|
|
188778
|
+
}
|
|
188779
|
+
|
|
188250
188780
|
function _addNamedNode(el,list,newAttr,oldAttr){
|
|
188251
188781
|
if(oldAttr){
|
|
188252
188782
|
list[_findNodeIndex(list,oldAttr)] = newAttr;
|
|
188783
|
+
// oldAttr leaves the list; drop its index entry (its nodeName may differ
|
|
188784
|
+
// from newAttr's when the replacement came via setNamedItemNS).
|
|
188785
|
+
_nnmIndexRemove(list, oldAttr);
|
|
188253
188786
|
}else {
|
|
188254
188787
|
list[list.length++] = newAttr;
|
|
188255
188788
|
}
|
|
188789
|
+
_nnmIndexAdd(list, newAttr);
|
|
188256
188790
|
if(el){
|
|
188257
188791
|
newAttr.ownerElement = el;
|
|
188258
188792
|
var doc = el.ownerDocument;
|
|
@@ -188271,6 +188805,7 @@ function requireDom () {
|
|
|
188271
188805
|
list[i] = list[++i];
|
|
188272
188806
|
}
|
|
188273
188807
|
list.length = lastIndex;
|
|
188808
|
+
_nnmIndexRemove(list, attr);
|
|
188274
188809
|
if(el){
|
|
188275
188810
|
var doc = el.ownerDocument;
|
|
188276
188811
|
if(doc){
|
|
@@ -188304,7 +188839,11 @@ function requireDom () {
|
|
|
188304
188839
|
if(el && el!=this._ownerElement){
|
|
188305
188840
|
throw new DOMException(INUSE_ATTRIBUTE_ERR);
|
|
188306
188841
|
}
|
|
188307
|
-
|
|
188842
|
+
// Resolve any existing attribute with the same nodeName through the O(1)
|
|
188843
|
+
// membership index rather than an O(M) scan — this is the parse-dedup hot
|
|
188844
|
+
// path (setAttributeNode per attribute during parse). Absent -> undefined,
|
|
188845
|
+
// matching getNamedItem's contract.
|
|
188846
|
+
var oldAttr = this._nameIndex[attr.nodeName];
|
|
188308
188847
|
_addNamedNode(this._ownerElement,this,attr,oldAttr);
|
|
188309
188848
|
return oldAttr;
|
|
188310
188849
|
},
|
|
@@ -188422,13 +188961,28 @@ function requireDom () {
|
|
|
188422
188961
|
/**
|
|
188423
188962
|
* Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.
|
|
188424
188963
|
*
|
|
188425
|
-
* __This
|
|
188964
|
+
* __This implementation differs from the specification:__
|
|
188426
188965
|
* - this implementation is not validating names or qualified names
|
|
188427
188966
|
* (when parsing XML strings, the SAX parser takes care of that)
|
|
188428
188967
|
*
|
|
188968
|
+
* Note: `internalSubset` can only be introduced via a direct property write to `node.internalSubset` after creation.
|
|
188969
|
+
* Creation-time validation of `publicId`, `systemId` is not enforced.
|
|
188970
|
+
* The serializer-level check covers all mutation vectors, including direct property writes.
|
|
188971
|
+
* `internalSubset` is only serialized as `[ ... ]` when both `publicId` and `systemId` are
|
|
188972
|
+
* absent (empty or `'.'`) — if either external identifier is present, `internalSubset` is
|
|
188973
|
+
* silently omitted from the serialized output.
|
|
188974
|
+
*
|
|
188429
188975
|
* @param {string} qualifiedName
|
|
188430
188976
|
* @param {string} [publicId]
|
|
188977
|
+
* The external subset public identifier. Stored verbatim including surrounding quotes.
|
|
188978
|
+
* When serialized with `requireWellFormed: true` (via the 4th-parameter options object),
|
|
188979
|
+
* throws `DOMException` with code `INVALID_STATE_ERR` if the value is non-empty and does
|
|
188980
|
+
* not match the XML `PubidLiteral` production (W3C DOM Parsing §3.2.1.3; XML 1.0 [12]).
|
|
188431
188981
|
* @param {string} [systemId]
|
|
188982
|
+
* The external subset system identifier. Stored verbatim including surrounding quotes.
|
|
188983
|
+
* When serialized with `requireWellFormed: true`, throws `DOMException` with code
|
|
188984
|
+
* `INVALID_STATE_ERR` if the value is non-empty and does not match the XML `SystemLiteral`
|
|
188985
|
+
* production (W3C DOM Parsing §3.2.1.3; XML 1.0 [11]).
|
|
188432
188986
|
* @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation
|
|
188433
188987
|
* or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`
|
|
188434
188988
|
*
|
|
@@ -188494,18 +189048,73 @@ function requireDom () {
|
|
|
188494
189048
|
return cloneNode(this.ownerDocument||this,this,deep);
|
|
188495
189049
|
},
|
|
188496
189050
|
// Modified in DOM Level 2:
|
|
188497
|
-
|
|
188498
|
-
|
|
188499
|
-
|
|
188500
|
-
|
|
188501
|
-
|
|
188502
|
-
|
|
188503
|
-
|
|
188504
|
-
|
|
188505
|
-
|
|
188506
|
-
|
|
188507
|
-
|
|
188508
|
-
|
|
189051
|
+
/**
|
|
189052
|
+
* Puts the specified node and all of its subtree into a "normalized" form. In a normalized
|
|
189053
|
+
* subtree, no text nodes in the subtree are empty and there are no adjacent text nodes.
|
|
189054
|
+
*
|
|
189055
|
+
* Specifically, this method merges any adjacent text nodes (i.e., nodes for which `nodeType`
|
|
189056
|
+
* is `TEXT_NODE`) into a single node with the combined data. It also removes any empty text
|
|
189057
|
+
* nodes.
|
|
189058
|
+
*
|
|
189059
|
+
* This method iteratively traverses all child nodes to normalize all descendant nodes within
|
|
189060
|
+
* the subtree.
|
|
189061
|
+
*
|
|
189062
|
+
* @throws {DOMException}
|
|
189063
|
+
* May throw a DOMException if operations within removeChild or appendData (which are
|
|
189064
|
+
* potentially invoked in this method) do not meet their specific constraints.
|
|
189065
|
+
* @see {@link Node.removeChild}
|
|
189066
|
+
* @see {@link CharacterData.appendData}
|
|
189067
|
+
* @see ../docs/walk-dom.md.
|
|
189068
|
+
*/
|
|
189069
|
+
normalize: function () {
|
|
189070
|
+
walkDOM(this, null, {
|
|
189071
|
+
enter: function (node) {
|
|
189072
|
+
// Merge adjacent text children of node before walkDOM schedules them.
|
|
189073
|
+
// walkDOM reads lastChild/previousSibling after enter returns, so the
|
|
189074
|
+
// surviving post-merge children are what it descends into.
|
|
189075
|
+
var child = node.firstChild;
|
|
189076
|
+
while (child) {
|
|
189077
|
+
var next = child.nextSibling;
|
|
189078
|
+
if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) {
|
|
189079
|
+
// Merge the whole run of adjacent text nodes at once: gather the
|
|
189080
|
+
// following text siblings' data, unlink them in a single pass, and
|
|
189081
|
+
// re-index the child list a single time. Per-sibling `removeChild`
|
|
189082
|
+
// (each an O(K) re-index) plus per-sibling `appendData` (each an O(K)
|
|
189083
|
+
// string rebuild) is O(K^2) over a long run of single-character text
|
|
189084
|
+
// nodes; this keeps it O(K). The first text node of the run survives
|
|
189085
|
+
// and carries the concatenated data, preserving node identity and
|
|
189086
|
+
// locator semantics.
|
|
189087
|
+
var tail = [];
|
|
189088
|
+
var sibling = next;
|
|
189089
|
+
while (sibling !== null && sibling.nodeType === TEXT_NODE) {
|
|
189090
|
+
tail.push(sibling.data);
|
|
189091
|
+
sibling = sibling.nextSibling;
|
|
189092
|
+
}
|
|
189093
|
+
// `sibling` is now the first non-text node after the run, or null.
|
|
189094
|
+
var removed = child.nextSibling;
|
|
189095
|
+
while (removed !== sibling) {
|
|
189096
|
+
var following = removed.nextSibling;
|
|
189097
|
+
removed.parentNode = null;
|
|
189098
|
+
removed.previousSibling = null;
|
|
189099
|
+
removed.nextSibling = null;
|
|
189100
|
+
removed = following;
|
|
189101
|
+
}
|
|
189102
|
+
child.nextSibling = sibling;
|
|
189103
|
+
if (sibling !== null) {
|
|
189104
|
+
sibling.previousSibling = child;
|
|
189105
|
+
} else {
|
|
189106
|
+
node.lastChild = child;
|
|
189107
|
+
}
|
|
189108
|
+
child.appendData(tail.join('')); // single O(K) string rebuild
|
|
189109
|
+
_onUpdateChild(node.ownerDocument, node); // single O(K) re-index
|
|
189110
|
+
child = sibling;
|
|
189111
|
+
} else {
|
|
189112
|
+
child = next;
|
|
189113
|
+
}
|
|
189114
|
+
}
|
|
189115
|
+
return true; // descend into surviving children
|
|
189116
|
+
},
|
|
189117
|
+
});
|
|
188509
189118
|
},
|
|
188510
189119
|
// Introduced in DOM Level 2:
|
|
188511
189120
|
isSupported:function(feature, version){
|
|
@@ -188581,21 +189190,103 @@ function requireDom () {
|
|
|
188581
189190
|
copy(NodeType,Node.prototype);
|
|
188582
189191
|
|
|
188583
189192
|
/**
|
|
188584
|
-
* @param
|
|
188585
|
-
*
|
|
189193
|
+
* @param {Node} node
|
|
189194
|
+
* Root of the subtree to visit.
|
|
189195
|
+
* @param {function(Node): boolean} callback
|
|
189196
|
+
* Called for each node in depth-first pre-order. Return a truthy value to stop traversal early.
|
|
189197
|
+
* @return {boolean} `true` if traversal was aborted by the callback, `false` otherwise.
|
|
188586
189198
|
*/
|
|
188587
|
-
function _visitNode(node,callback){
|
|
188588
|
-
|
|
188589
|
-
return true;
|
|
188590
|
-
}
|
|
188591
|
-
if(node = node.firstChild){
|
|
188592
|
-
do{
|
|
188593
|
-
if(_visitNode(node,callback)){return true}
|
|
188594
|
-
}while(node=node.nextSibling)
|
|
188595
|
-
}
|
|
189199
|
+
function _visitNode(node, callback) {
|
|
189200
|
+
return walkDOM(node, null, { enter: function (n) { return callback(n) ? walkDOM.STOP : true; } }) === walkDOM.STOP;
|
|
188596
189201
|
}
|
|
188597
189202
|
|
|
189203
|
+
/**
|
|
189204
|
+
* Depth-first pre/post-order DOM tree walker.
|
|
189205
|
+
*
|
|
189206
|
+
* Visits every node in the subtree rooted at `node`. For each node:
|
|
189207
|
+
*
|
|
189208
|
+
* 1. Calls `callbacks.enter(node, context)` before descending into the node's children. The
|
|
189209
|
+
* return value becomes the `context` passed to each child's `enter` call and to the matching
|
|
189210
|
+
* `exit` call.
|
|
189211
|
+
* 2. If `enter` returns `null` or `undefined`, the node's children are skipped;
|
|
189212
|
+
* sibling traversal continues normally.
|
|
189213
|
+
* 3. If `enter` returns `walkDOM.STOP`, the entire traversal is aborted immediately — no
|
|
189214
|
+
* further `enter` or `exit` calls are made.
|
|
189215
|
+
* 4. `lastChild` and `previousSibling` are read **after** `enter` returns, so `enter` may
|
|
189216
|
+
* safely modify the node's own child list before the walker descends. Modifying siblings of
|
|
189217
|
+
* the current node or any other part of the tree produces unpredictable results: nodes already
|
|
189218
|
+
* queued on the stack are visited regardless of DOM changes, and newly inserted nodes outside
|
|
189219
|
+
* the current child list are never visited.
|
|
189220
|
+
* 5. Calls `callbacks.exit(node, context)` (if provided) after all of a node's children have
|
|
189221
|
+
* been visited, passing the same `context` that `enter`
|
|
189222
|
+
* returned for that node.
|
|
189223
|
+
*
|
|
189224
|
+
* This implementation uses an explicit stack and does not recurse — it is safe on arbitrarily
|
|
189225
|
+
* deep trees.
|
|
189226
|
+
*
|
|
189227
|
+
* @param {Node} node
|
|
189228
|
+
* Root of the subtree to walk.
|
|
189229
|
+
* @param {*} context
|
|
189230
|
+
* Initial context value passed to the root node's `enter`.
|
|
189231
|
+
* @param {{ enter: function(Node, *): *, exit?: function(Node, *): void }} callbacks
|
|
189232
|
+
* @returns {void | walkDOM.STOP}
|
|
189233
|
+
* @see ../docs/walk-dom.md.
|
|
189234
|
+
*/
|
|
189235
|
+
function walkDOM(node, context, callbacks) {
|
|
189236
|
+
// Each stack frame is {node, context, phase}:
|
|
189237
|
+
// walkDOM.ENTER — call enter, then push children
|
|
189238
|
+
// walkDOM.EXIT — call exit
|
|
189239
|
+
var stack = [{ node: node, context: context, phase: walkDOM.ENTER }];
|
|
189240
|
+
while (stack.length > 0) {
|
|
189241
|
+
var frame = stack.pop();
|
|
189242
|
+
if (frame.phase === walkDOM.ENTER) {
|
|
189243
|
+
var childContext = callbacks.enter(frame.node, frame.context);
|
|
189244
|
+
if (childContext === walkDOM.STOP) {
|
|
189245
|
+
return walkDOM.STOP;
|
|
189246
|
+
}
|
|
189247
|
+
// Push exit frame before children so it fires after all children are processed (Last In First Out)
|
|
189248
|
+
stack.push({ node: frame.node, context: childContext, phase: walkDOM.EXIT });
|
|
189249
|
+
if (childContext === null || childContext === undefined) {
|
|
189250
|
+
continue; // skip children
|
|
189251
|
+
}
|
|
189252
|
+
// lastChild is read after enter returns, so enter may modify the child list.
|
|
189253
|
+
var child = frame.node.lastChild;
|
|
189254
|
+
// Traverse from lastChild backwards so that pushing onto the stack
|
|
189255
|
+
// naturally yields firstChild on top (processed first).
|
|
189256
|
+
while (child) {
|
|
189257
|
+
stack.push({ node: child, context: childContext, phase: walkDOM.ENTER });
|
|
189258
|
+
child = child.previousSibling;
|
|
189259
|
+
}
|
|
189260
|
+
} else {
|
|
189261
|
+
// frame.phase === walkDOM.EXIT
|
|
189262
|
+
if (callbacks.exit) {
|
|
189263
|
+
callbacks.exit(frame.node, frame.context);
|
|
189264
|
+
}
|
|
189265
|
+
}
|
|
189266
|
+
}
|
|
189267
|
+
}
|
|
188598
189268
|
|
|
189269
|
+
/**
|
|
189270
|
+
* Sentinel value returned from a `walkDOM` `enter` callback to abort the entire traversal
|
|
189271
|
+
* immediately.
|
|
189272
|
+
*
|
|
189273
|
+
* @type {symbol}
|
|
189274
|
+
*/
|
|
189275
|
+
walkDOM.STOP = Symbol('walkDOM.STOP');
|
|
189276
|
+
/**
|
|
189277
|
+
* Phase constant for a stack frame that has not yet been visited.
|
|
189278
|
+
* The `enter` callback is called and children are scheduled.
|
|
189279
|
+
*
|
|
189280
|
+
* @type {number}
|
|
189281
|
+
*/
|
|
189282
|
+
walkDOM.ENTER = 0;
|
|
189283
|
+
/**
|
|
189284
|
+
* Phase constant for a stack frame whose subtree has been fully visited.
|
|
189285
|
+
* The `exit` callback is called.
|
|
189286
|
+
*
|
|
189287
|
+
* @type {number}
|
|
189288
|
+
*/
|
|
189289
|
+
walkDOM.EXIT = 1;
|
|
188599
189290
|
|
|
188600
189291
|
function Document(){
|
|
188601
189292
|
this.ownerDocument = this;
|
|
@@ -189199,12 +189890,46 @@ function requireDom () {
|
|
|
189199
189890
|
node.appendData(data);
|
|
189200
189891
|
return node;
|
|
189201
189892
|
},
|
|
189893
|
+
/**
|
|
189894
|
+
* Returns a new CDATASection node whose data is `data`.
|
|
189895
|
+
*
|
|
189896
|
+
* __This implementation differs from the specification:__
|
|
189897
|
+
* - calling this method on an HTML document does not throw `NotSupportedError`.
|
|
189898
|
+
*
|
|
189899
|
+
* @param {string} data
|
|
189900
|
+
* @returns {CDATASection}
|
|
189901
|
+
* @throws DOMException with code `INVALID_CHARACTER_ERR` if `data` contains `"]]>"`.
|
|
189902
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createCDATASection
|
|
189903
|
+
* @see https://dom.spec.whatwg.org/#dom-document-createcdatasection
|
|
189904
|
+
*/
|
|
189202
189905
|
createCDATASection : function(data){
|
|
189906
|
+
if (data.indexOf(']]>') !== -1) {
|
|
189907
|
+
throw new DOMException(INVALID_CHARACTER_ERR, 'data contains "]]>"');
|
|
189908
|
+
}
|
|
189203
189909
|
var node = new CDATASection();
|
|
189204
189910
|
node.ownerDocument = this;
|
|
189205
189911
|
node.appendData(data);
|
|
189206
189912
|
return node;
|
|
189207
189913
|
},
|
|
189914
|
+
/**
|
|
189915
|
+
* Returns a ProcessingInstruction node whose target is target and data is data.
|
|
189916
|
+
*
|
|
189917
|
+
* __This implementation differs from the specification:__
|
|
189918
|
+
* - it does not do any input validation on the arguments and doesn't throw "InvalidCharacterError".
|
|
189919
|
+
*
|
|
189920
|
+
* Note: When the resulting document is serialized with `requireWellFormed: true`, the
|
|
189921
|
+
* serializer throws with code `INVALID_STATE_ERR` if `.target` is not a valid XML `NCName`
|
|
189922
|
+
* (a `Name` with no colon) or is an ASCII case-insensitive match for `"xml"`, or if `.data`
|
|
189923
|
+
* contains `?>` (W3C DOM Parsing §3.2.1.7). Without that option the target and data are
|
|
189924
|
+
* emitted verbatim.
|
|
189925
|
+
*
|
|
189926
|
+
* @param {string} target
|
|
189927
|
+
* @param {string} data
|
|
189928
|
+
* @returns {ProcessingInstruction}
|
|
189929
|
+
* @see https://developer.mozilla.org/docs/Web/API/Document/createProcessingInstruction
|
|
189930
|
+
* @see https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction
|
|
189931
|
+
* @see https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml §3.2.1.7
|
|
189932
|
+
*/
|
|
189208
189933
|
createProcessingInstruction : function(target,data){
|
|
189209
189934
|
var node = new ProcessingInstruction();
|
|
189210
189935
|
node.ownerDocument = this;
|
|
@@ -189221,7 +189946,27 @@ function requireDom () {
|
|
|
189221
189946
|
node.specified = true;
|
|
189222
189947
|
return node;
|
|
189223
189948
|
},
|
|
189949
|
+
/**
|
|
189950
|
+
* Creates an EntityReference object, serialized as `&name;`.
|
|
189951
|
+
*
|
|
189952
|
+
* The `name` is validated against the XML `Name` production at creation time; an invalid name
|
|
189953
|
+
* throws a `DOMException` with code `INVALID_CHARACTER_ERR`. When the resulting node is
|
|
189954
|
+
* serialized with `requireWellFormed: true`, the serializer re-validates `nodeName` and throws
|
|
189955
|
+
* a `DOMException` with code `INVALID_STATE_ERR` if a later `nodeName` mutation made it invalid;
|
|
189956
|
+
* without that option the name is emitted verbatim.
|
|
189957
|
+
*
|
|
189958
|
+
* Note: xmldom does not expand entities — the parser resolves entity references inline and never
|
|
189959
|
+
* constructs `EntityReference` nodes, so this method is the only producer.
|
|
189960
|
+
*
|
|
189961
|
+
* @param {string} name The name of the entity to reference.
|
|
189962
|
+
* @returns {EntityReference}
|
|
189963
|
+
* @throws {DOMException} With code `INVALID_CHARACTER_ERR` when `name` is not a valid XML `Name`.
|
|
189964
|
+
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-392B75AE
|
|
189965
|
+
*/
|
|
189224
189966
|
createEntityReference : function(name){
|
|
189967
|
+
if (!tagNamePattern.test(name)) {
|
|
189968
|
+
throw new DOMException(INVALID_CHARACTER_ERR, 'not a valid xml name "' + name + '"');
|
|
189969
|
+
}
|
|
189225
189970
|
var node = new EntityReference();
|
|
189226
189971
|
node.ownerDocument = this;
|
|
189227
189972
|
node.nodeName = name;
|
|
@@ -189430,6 +190175,20 @@ function requireDom () {
|
|
|
189430
190175
|
_extends(CDATASection,CharacterData);
|
|
189431
190176
|
|
|
189432
190177
|
|
|
190178
|
+
/**
|
|
190179
|
+
* Represents a DocumentType node (the `<!DOCTYPE ...>` declaration).
|
|
190180
|
+
*
|
|
190181
|
+
* `name`, `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
|
|
190182
|
+
* xmldom does not enforce the `readonly` constraint declared by the WHATWG DOM spec —
|
|
190183
|
+
* direct property writes succeed silently. Values are serialized verbatim when
|
|
190184
|
+
* `requireWellFormed` is false (the default). When the serializer is invoked with
|
|
190185
|
+
* `requireWellFormed: true` (via the 4th-parameter options object), it validates each
|
|
190186
|
+
* field — including `name`, which is checked against the XML `Name` production — and throws
|
|
190187
|
+
* `DOMException` with code `INVALID_STATE_ERR` on invalid values.
|
|
190188
|
+
*
|
|
190189
|
+
* @class
|
|
190190
|
+
* @see https://developer.mozilla.org/docs/Web/API/DocumentType MDN
|
|
190191
|
+
*/
|
|
189433
190192
|
function DocumentType() {
|
|
189434
190193
|
} DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
|
|
189435
190194
|
_extends(DocumentType,Node);
|
|
@@ -189442,6 +190201,20 @@ function requireDom () {
|
|
|
189442
190201
|
} Entity.prototype.nodeType = ENTITY_NODE;
|
|
189443
190202
|
_extends(Entity,Node);
|
|
189444
190203
|
|
|
190204
|
+
/**
|
|
190205
|
+
* Represents an EntityReference node, serialized as `&nodeName;`.
|
|
190206
|
+
*
|
|
190207
|
+
* `nodeName` is the referenced entity's name, stored verbatim. When serialized with
|
|
190208
|
+
* `requireWellFormed: true`, the serializer validates `nodeName` against the XML `Name` production
|
|
190209
|
+
* and throws a `DOMException` with code `INVALID_STATE_ERR` if it does not match; without that
|
|
190210
|
+
* option the name is emitted verbatim between `&` and `;`.
|
|
190211
|
+
*
|
|
190212
|
+
* Note: xmldom does not expand entities — the parser resolves entity references inline and never
|
|
190213
|
+
* constructs `EntityReference` nodes, so the only producer is `Document.createEntityReference`.
|
|
190214
|
+
*
|
|
190215
|
+
* @class
|
|
190216
|
+
* @see https://www.w3.org/TR/xml/#NT-Name
|
|
190217
|
+
*/
|
|
189445
190218
|
function EntityReference() {
|
|
189446
190219
|
} EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
|
|
189447
190220
|
_extends(EntityReference,Node);
|
|
@@ -189457,11 +190230,54 @@ function requireDom () {
|
|
|
189457
190230
|
ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
|
|
189458
190231
|
_extends(ProcessingInstruction,Node);
|
|
189459
190232
|
function XMLSerializer(){}
|
|
189460
|
-
|
|
189461
|
-
|
|
190233
|
+
/**
|
|
190234
|
+
* Returns the result of serializing `node` to XML.
|
|
190235
|
+
*
|
|
190236
|
+
* When `options.requireWellFormed` is `true`, the serializer throws for content that would
|
|
190237
|
+
* produce ill-formed XML.
|
|
190238
|
+
*
|
|
190239
|
+
* __This implementation differs from the specification:__
|
|
190240
|
+
* - CDATASection nodes whose data contains `]]>` are serialized by splitting the section
|
|
190241
|
+
* at each `]]>` occurrence (following W3C DOM Level 3 Core `split-cdata-sections`
|
|
190242
|
+
* default behaviour) unless `requireWellFormed` is `true`.
|
|
190243
|
+
* - when `requireWellFormed` is `true`, `DOMException` with code `INVALID_STATE_ERR`
|
|
190244
|
+
* is only thrown to prevent injection vectors, not for all the spec mandated checks.
|
|
190245
|
+
*
|
|
190246
|
+
* @param {Node} node
|
|
190247
|
+
* @param {boolean} [isHtml]
|
|
190248
|
+
* @param {function} [nodeFilter]
|
|
190249
|
+
* @param {Object} [options]
|
|
190250
|
+
* @param {boolean} [options.requireWellFormed=false]
|
|
190251
|
+
* When `true`, throws for content that would produce ill-formed XML.
|
|
190252
|
+
* @returns {string}
|
|
190253
|
+
* @throws {DOMException}
|
|
190254
|
+
* With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
|
|
190255
|
+
* - an Element's qualified name (including any namespace prefix) is not a valid XML QName,
|
|
190256
|
+
* - an attribute's qualified name (including a synthesized `xmlns:` namespace declaration) is
|
|
190257
|
+
* not a valid XML QName,
|
|
190258
|
+
* - a CDATASection node's data contains `"]]>"`,
|
|
190259
|
+
* - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
|
|
190260
|
+
* - a ProcessingInstruction's target is not a valid XML `NCName` (a `Name` with no colon) or is
|
|
190261
|
+
* an ASCII case-insensitive match for `"xml"`, or its data contains `"?>"`,
|
|
190262
|
+
* - a DocumentType's `name` is not a valid XML `Name` (XML 1.0 production [5]),
|
|
190263
|
+
* - a DocumentType's `publicId` is non-empty and does not match the XML `PubidLiteral`
|
|
190264
|
+
* production,
|
|
190265
|
+
* - a DocumentType's `systemId` is non-empty and does not match the XML `SystemLiteral`
|
|
190266
|
+
* production,
|
|
190267
|
+
* - a DocumentType's `internalSubset` contains `"]>"`, or
|
|
190268
|
+
* - an EntityReference's `nodeName` is not a valid XML `Name` (XML 1.0 production [5]).
|
|
190269
|
+
* Note: xmldom does not enforce `readonly` on DocumentType fields — direct property
|
|
190270
|
+
* writes succeed and are covered by the serializer-level checks above.
|
|
190271
|
+
* @see https://html.spec.whatwg.org/#dom-xmlserializer-serializetostring
|
|
190272
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serialization
|
|
190273
|
+
* @see https://github.com/w3c/DOM-Parsing/issues/84
|
|
190274
|
+
*/
|
|
190275
|
+
XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter,options){
|
|
190276
|
+
return nodeSerializeToString.call(node,isHtml,nodeFilter,options);
|
|
189462
190277
|
};
|
|
189463
190278
|
Node.prototype.toString = nodeSerializeToString;
|
|
189464
|
-
function nodeSerializeToString(isHtml,nodeFilter){
|
|
190279
|
+
function nodeSerializeToString(isHtml,nodeFilter,options){
|
|
190280
|
+
var requireWellFormed = !!options && !!options.requireWellFormed;
|
|
189465
190281
|
var buf = [];
|
|
189466
190282
|
var refNode = this.nodeType == 9 && this.documentElement || this;
|
|
189467
190283
|
var prefix = refNode.prefix;
|
|
@@ -189478,7 +190294,7 @@ function requireDom () {
|
|
|
189478
190294
|
];
|
|
189479
190295
|
}
|
|
189480
190296
|
}
|
|
189481
|
-
serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);
|
|
190297
|
+
serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces,requireWellFormed);
|
|
189482
190298
|
//console.log('###',this.nodeType,uri,prefix,buf.join(''))
|
|
189483
190299
|
return buf.join('');
|
|
189484
190300
|
}
|
|
@@ -189523,275 +190339,350 @@ function requireDom () {
|
|
|
189523
190339
|
* @see https://www.w3.org/TR/xml11/#AVNormalize
|
|
189524
190340
|
* @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
|
|
189525
190341
|
*/
|
|
189526
|
-
function addSerializedAttribute(buf, qualifiedName, value) {
|
|
190342
|
+
function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
|
|
190343
|
+
if (requireWellFormed && !tagNamePattern.test(qualifiedName)) {
|
|
190344
|
+
throw new DOMException(INVALID_STATE_ERR, 'The attribute name "' + qualifiedName + '" is not a valid XML QName');
|
|
190345
|
+
}
|
|
189527
190346
|
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
|
|
189528
190347
|
}
|
|
189529
190348
|
|
|
189530
|
-
function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
|
190349
|
+
function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces, requireWellFormed) {
|
|
189531
190350
|
if (!visibleNamespaces) {
|
|
189532
190351
|
visibleNamespaces = [];
|
|
189533
190352
|
}
|
|
189534
|
-
|
|
189535
|
-
|
|
189536
|
-
|
|
189537
|
-
|
|
189538
|
-
|
|
189539
|
-
|
|
189540
|
-
|
|
189541
|
-
|
|
189542
|
-
|
|
189543
|
-
|
|
189544
|
-
|
|
189545
|
-
//buf.sort.apply(attrs, attributeSorter);
|
|
189546
|
-
}
|
|
189547
|
-
|
|
189548
|
-
switch(node.nodeType){
|
|
189549
|
-
case ELEMENT_NODE:
|
|
189550
|
-
var attrs = node.attributes;
|
|
189551
|
-
var len = attrs.length;
|
|
189552
|
-
var child = node.firstChild;
|
|
189553
|
-
var nodeName = node.tagName;
|
|
189554
|
-
|
|
189555
|
-
isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML;
|
|
189556
|
-
|
|
189557
|
-
var prefixedNodeName = nodeName;
|
|
189558
|
-
if (!isHTML && !node.prefix && node.namespaceURI) {
|
|
189559
|
-
var defaultNS;
|
|
189560
|
-
// lookup current default ns from `xmlns` attribute
|
|
189561
|
-
for (var ai = 0; ai < attrs.length; ai++) {
|
|
189562
|
-
if (attrs.item(ai).name === 'xmlns') {
|
|
189563
|
-
defaultNS = attrs.item(ai).value;
|
|
189564
|
-
break
|
|
189565
|
-
}
|
|
189566
|
-
}
|
|
189567
|
-
if (!defaultNS) {
|
|
189568
|
-
// lookup current default ns in visibleNamespaces
|
|
189569
|
-
for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
|
|
189570
|
-
var namespace = visibleNamespaces[nsi];
|
|
189571
|
-
if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {
|
|
189572
|
-
defaultNS = namespace.namespace;
|
|
189573
|
-
break
|
|
190353
|
+
walkDOM(node, { ns: visibleNamespaces, isHTML: isHTML }, {
|
|
190354
|
+
enter: function (n, ctx) {
|
|
190355
|
+
var ns = ctx.ns;
|
|
190356
|
+
var html = ctx.isHTML;
|
|
190357
|
+
|
|
190358
|
+
if (nodeFilter) {
|
|
190359
|
+
n = nodeFilter(n);
|
|
190360
|
+
if (n) {
|
|
190361
|
+
if (typeof n == 'string') {
|
|
190362
|
+
buf.push(n);
|
|
190363
|
+
return null;
|
|
189574
190364
|
}
|
|
190365
|
+
} else {
|
|
190366
|
+
return null;
|
|
189575
190367
|
}
|
|
189576
190368
|
}
|
|
189577
|
-
|
|
189578
|
-
|
|
189579
|
-
|
|
189580
|
-
|
|
189581
|
-
|
|
189582
|
-
|
|
190369
|
+
|
|
190370
|
+
switch (n.nodeType) {
|
|
190371
|
+
case ELEMENT_NODE:
|
|
190372
|
+
var attrs = n.attributes;
|
|
190373
|
+
var len = attrs.length;
|
|
190374
|
+
var nodeName = n.tagName;
|
|
190375
|
+
|
|
190376
|
+
html = NAMESPACE.isHTML(n.namespaceURI) || html;
|
|
190377
|
+
|
|
190378
|
+
var prefixedNodeName = nodeName;
|
|
190379
|
+
if (!html && !n.prefix && n.namespaceURI) {
|
|
190380
|
+
var defaultNS;
|
|
190381
|
+
// lookup current default ns from `xmlns` attribute
|
|
190382
|
+
for (var ai = 0; ai < attrs.length; ai++) {
|
|
190383
|
+
if (attrs.item(ai).name === 'xmlns') {
|
|
190384
|
+
defaultNS = attrs.item(ai).value;
|
|
190385
|
+
break;
|
|
190386
|
+
}
|
|
190387
|
+
}
|
|
190388
|
+
if (!defaultNS) {
|
|
190389
|
+
// lookup current default ns in visibleNamespaces
|
|
190390
|
+
for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
|
|
190391
|
+
var nsEntry = ns[nsi];
|
|
190392
|
+
if (nsEntry.prefix === '' && nsEntry.namespace === n.namespaceURI) {
|
|
190393
|
+
defaultNS = nsEntry.namespace;
|
|
190394
|
+
break;
|
|
190395
|
+
}
|
|
190396
|
+
}
|
|
190397
|
+
}
|
|
190398
|
+
if (defaultNS !== n.namespaceURI) {
|
|
190399
|
+
for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
|
|
190400
|
+
var nsEntry = ns[nsi];
|
|
190401
|
+
if (nsEntry.namespace === n.namespaceURI) {
|
|
190402
|
+
if (nsEntry.prefix) {
|
|
190403
|
+
prefixedNodeName = nsEntry.prefix + ':' + nodeName;
|
|
190404
|
+
}
|
|
190405
|
+
break;
|
|
190406
|
+
}
|
|
190407
|
+
}
|
|
189583
190408
|
}
|
|
189584
|
-
break
|
|
189585
190409
|
}
|
|
189586
|
-
}
|
|
189587
|
-
}
|
|
189588
|
-
}
|
|
189589
190410
|
|
|
189590
|
-
|
|
190411
|
+
if (requireWellFormed && !tagNamePattern.test(prefixedNodeName)) {
|
|
190412
|
+
throw new DOMException(INVALID_STATE_ERR, 'The element name "' + prefixedNodeName + '" is not a valid XML QName');
|
|
190413
|
+
}
|
|
190414
|
+
buf.push('<', prefixedNodeName);
|
|
190415
|
+
|
|
190416
|
+
// Build a fresh namespace snapshot for this element's children.
|
|
190417
|
+
// The slice prevents sibling elements from inheriting each other's declarations.
|
|
190418
|
+
var childNs = ns.slice();
|
|
190419
|
+
for (var i = 0; i < len; i++) {
|
|
190420
|
+
var attr = attrs.item(i);
|
|
190421
|
+
if (attr.prefix == 'xmlns') {
|
|
190422
|
+
childNs.push({ prefix: attr.localName, namespace: attr.value });
|
|
190423
|
+
} else if (attr.nodeName == 'xmlns') {
|
|
190424
|
+
childNs.push({ prefix: '', namespace: attr.value });
|
|
190425
|
+
}
|
|
190426
|
+
}
|
|
189591
190427
|
|
|
189592
|
-
|
|
189593
|
-
|
|
189594
|
-
|
|
189595
|
-
|
|
189596
|
-
|
|
189597
|
-
|
|
189598
|
-
|
|
189599
|
-
|
|
189600
|
-
|
|
190428
|
+
for (var i = 0; i < len; i++) {
|
|
190429
|
+
var attr = attrs.item(i);
|
|
190430
|
+
if (needNamespaceDefine(attr, html, childNs)) {
|
|
190431
|
+
var attrPrefix = attr.prefix || '';
|
|
190432
|
+
var uri = attr.namespaceURI;
|
|
190433
|
+
addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri, requireWellFormed);
|
|
190434
|
+
childNs.push({ prefix: attrPrefix, namespace: uri });
|
|
190435
|
+
}
|
|
190436
|
+
// Apply nodeFilter and serialize the attribute.
|
|
190437
|
+
var filteredAttr = nodeFilter ? nodeFilter(attr) : attr;
|
|
190438
|
+
if (filteredAttr) {
|
|
190439
|
+
if (typeof filteredAttr === 'string') {
|
|
190440
|
+
buf.push(filteredAttr);
|
|
190441
|
+
} else {
|
|
190442
|
+
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
|
|
190443
|
+
}
|
|
190444
|
+
}
|
|
190445
|
+
}
|
|
189601
190446
|
|
|
189602
|
-
|
|
189603
|
-
|
|
189604
|
-
|
|
189605
|
-
|
|
189606
|
-
|
|
189607
|
-
|
|
189608
|
-
|
|
189609
|
-
}
|
|
189610
|
-
serializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);
|
|
189611
|
-
}
|
|
190447
|
+
// add namespace for current node
|
|
190448
|
+
if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
|
|
190449
|
+
var nodePrefix = n.prefix || '';
|
|
190450
|
+
var uri = n.namespaceURI;
|
|
190451
|
+
addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri, requireWellFormed);
|
|
190452
|
+
childNs.push({ prefix: nodePrefix, namespace: uri });
|
|
190453
|
+
}
|
|
189612
190454
|
|
|
189613
|
-
|
|
189614
|
-
|
|
189615
|
-
|
|
189616
|
-
|
|
189617
|
-
|
|
189618
|
-
|
|
189619
|
-
|
|
190455
|
+
var child = n.firstChild;
|
|
190456
|
+
if (child || html && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) {
|
|
190457
|
+
buf.push('>');
|
|
190458
|
+
if (html && /^script$/i.test(nodeName)) {
|
|
190459
|
+
// Inline serialization for <script> children; return null to skip walkDOM descent.
|
|
190460
|
+
while (child) {
|
|
190461
|
+
if (child.data) {
|
|
190462
|
+
buf.push(child.data);
|
|
190463
|
+
} else {
|
|
190464
|
+
serializeToString(child, buf, html, nodeFilter, childNs.slice(), requireWellFormed);
|
|
190465
|
+
}
|
|
190466
|
+
child = child.nextSibling;
|
|
190467
|
+
}
|
|
190468
|
+
buf.push('</', nodeName, '>');
|
|
190469
|
+
return null;
|
|
190470
|
+
}
|
|
190471
|
+
// Return child context; walkDOM descends and exit emits the closing tag.
|
|
190472
|
+
return { ns: childNs, isHTML: html, tag: prefixedNodeName };
|
|
190473
|
+
} else {
|
|
190474
|
+
buf.push('/>');
|
|
190475
|
+
return null;
|
|
190476
|
+
}
|
|
189620
190477
|
|
|
189621
|
-
|
|
189622
|
-
|
|
189623
|
-
|
|
189624
|
-
|
|
189625
|
-
|
|
189626
|
-
|
|
189627
|
-
|
|
189628
|
-
|
|
189629
|
-
|
|
190478
|
+
case DOCUMENT_NODE:
|
|
190479
|
+
case DOCUMENT_FRAGMENT_NODE:
|
|
190480
|
+
// Descend into children; exit is a no-op (tag is null).
|
|
190481
|
+
return { ns: ns.slice(), isHTML: html, tag: null };
|
|
190482
|
+
|
|
190483
|
+
case ATTRIBUTE_NODE:
|
|
190484
|
+
addSerializedAttribute(buf, n.name, n.value, requireWellFormed);
|
|
190485
|
+
return null;
|
|
190486
|
+
|
|
190487
|
+
case TEXT_NODE:
|
|
190488
|
+
/**
|
|
190489
|
+
* The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
|
|
190490
|
+
* except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
|
|
190491
|
+
* If they are needed elsewhere, they must be escaped using either numeric character references or the strings
|
|
190492
|
+
* `&` and `<` respectively.
|
|
190493
|
+
* The right angle bracket (>) may be represented using the string " > ", and must, for compatibility,
|
|
190494
|
+
* be escaped using either `>` or a character reference when it appears in the string `]]>` in content,
|
|
190495
|
+
* when that string is not marking the end of a CDATA section.
|
|
190496
|
+
*
|
|
190497
|
+
* In the content of elements, character data is any string of characters
|
|
190498
|
+
* which does not contain the start-delimiter of any markup
|
|
190499
|
+
* and does not include the CDATA-section-close delimiter, `]]>`.
|
|
190500
|
+
*
|
|
190501
|
+
* @see https://www.w3.org/TR/xml/#NT-CharData
|
|
190502
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
|
|
190503
|
+
*/
|
|
190504
|
+
buf.push(n.data.replace(/[<&>]/g, _xmlEncoder));
|
|
190505
|
+
return null;
|
|
190506
|
+
|
|
190507
|
+
case CDATA_SECTION_NODE:
|
|
190508
|
+
if (requireWellFormed && n.data.indexOf(']]>') !== -1) {
|
|
190509
|
+
throw new DOMException(INVALID_STATE_ERR, 'The CDATASection data contains "]]>"');
|
|
189630
190510
|
}
|
|
189631
|
-
|
|
189632
|
-
|
|
189633
|
-
|
|
189634
|
-
|
|
189635
|
-
|
|
189636
|
-
|
|
189637
|
-
|
|
189638
|
-
|
|
189639
|
-
|
|
189640
|
-
|
|
189641
|
-
|
|
189642
|
-
|
|
189643
|
-
|
|
189644
|
-
|
|
189645
|
-
|
|
189646
|
-
|
|
189647
|
-
|
|
189648
|
-
|
|
189649
|
-
|
|
189650
|
-
|
|
189651
|
-
|
|
189652
|
-
|
|
189653
|
-
|
|
189654
|
-
|
|
189655
|
-
|
|
189656
|
-
|
|
189657
|
-
|
|
189658
|
-
|
|
189659
|
-
|
|
189660
|
-
|
|
189661
|
-
|
|
189662
|
-
|
|
189663
|
-
|
|
189664
|
-
|
|
189665
|
-
|
|
189666
|
-
|
|
189667
|
-
|
|
189668
|
-
|
|
189669
|
-
|
|
189670
|
-
|
|
189671
|
-
|
|
189672
|
-
|
|
189673
|
-
|
|
189674
|
-
|
|
189675
|
-
|
|
189676
|
-
|
|
189677
|
-
|
|
189678
|
-
|
|
189679
|
-
|
|
189680
|
-
|
|
189681
|
-
|
|
189682
|
-
|
|
189683
|
-
|
|
189684
|
-
|
|
189685
|
-
|
|
189686
|
-
|
|
189687
|
-
|
|
189688
|
-
|
|
190511
|
+
buf.push('<![CDATA[', n.data.replace(/]]>/g, ']]]]><![CDATA[>'), ']]>');
|
|
190512
|
+
return null;
|
|
190513
|
+
|
|
190514
|
+
case COMMENT_NODE:
|
|
190515
|
+
if (requireWellFormed && n.data.indexOf('-->') !== -1) {
|
|
190516
|
+
throw new DOMException(INVALID_STATE_ERR, 'The comment node data contains "-->"');
|
|
190517
|
+
}
|
|
190518
|
+
buf.push('<!--', n.data, '-->');
|
|
190519
|
+
return null;
|
|
190520
|
+
|
|
190521
|
+
case DOCUMENT_TYPE_NODE:
|
|
190522
|
+
if (requireWellFormed) {
|
|
190523
|
+
if (!tagNamePattern.test(n.name)) {
|
|
190524
|
+
throw new DOMException(INVALID_STATE_ERR, 'The doctype name "' + n.name + '" is not a valid XML Name');
|
|
190525
|
+
}
|
|
190526
|
+
if (n.publicId && !/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(n.publicId)) {
|
|
190527
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType publicId is not a valid PubidLiteral');
|
|
190528
|
+
}
|
|
190529
|
+
if (n.systemId && !/^("[^"]*"|'[^']*')$/.test(n.systemId)) {
|
|
190530
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType systemId is not a valid SystemLiteral');
|
|
190531
|
+
}
|
|
190532
|
+
if (n.internalSubset && n.internalSubset.indexOf(']>') !== -1) {
|
|
190533
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType internalSubset contains "]>"');
|
|
190534
|
+
}
|
|
190535
|
+
}
|
|
190536
|
+
var pubid = n.publicId;
|
|
190537
|
+
var sysid = n.systemId;
|
|
190538
|
+
buf.push('<!DOCTYPE ', n.name);
|
|
190539
|
+
if (pubid) {
|
|
190540
|
+
buf.push(' PUBLIC ', pubid);
|
|
190541
|
+
if (sysid && sysid != '.') {
|
|
190542
|
+
buf.push(' ', sysid);
|
|
190543
|
+
}
|
|
190544
|
+
buf.push('>');
|
|
190545
|
+
} else if (sysid && sysid != '.') {
|
|
190546
|
+
buf.push(' SYSTEM ', sysid, '>');
|
|
190547
|
+
} else {
|
|
190548
|
+
var sub = n.internalSubset;
|
|
190549
|
+
if (sub) {
|
|
190550
|
+
buf.push(' [', sub, ']');
|
|
190551
|
+
}
|
|
190552
|
+
buf.push('>');
|
|
190553
|
+
}
|
|
190554
|
+
return null;
|
|
190555
|
+
|
|
190556
|
+
case PROCESSING_INSTRUCTION_NODE:
|
|
190557
|
+
if (requireWellFormed) {
|
|
190558
|
+
if (!tagNamePattern.test(n.target) || n.target.indexOf(':') !== -1 || n.target.toLowerCase() === 'xml') {
|
|
190559
|
+
throw new DOMException(
|
|
190560
|
+
INVALID_STATE_ERR,
|
|
190561
|
+
'The processing instruction target "' + n.target + '" is not a valid XML NCName or is reserved'
|
|
190562
|
+
);
|
|
190563
|
+
}
|
|
190564
|
+
if (n.data.indexOf('?>') !== -1) {
|
|
190565
|
+
throw new DOMException(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"');
|
|
190566
|
+
}
|
|
190567
|
+
}
|
|
190568
|
+
buf.push('<?', n.target, ' ', n.data, '?>');
|
|
190569
|
+
return null;
|
|
190570
|
+
|
|
190571
|
+
case ENTITY_REFERENCE_NODE:
|
|
190572
|
+
if (requireWellFormed && !tagNamePattern.test(n.nodeName)) {
|
|
190573
|
+
throw new DOMException(
|
|
190574
|
+
INVALID_STATE_ERR,
|
|
190575
|
+
'The entity reference name "' + n.nodeName + '" is not a valid XML Name'
|
|
190576
|
+
);
|
|
190577
|
+
}
|
|
190578
|
+
buf.push('&', n.nodeName, ';');
|
|
190579
|
+
return null;
|
|
190580
|
+
|
|
190581
|
+
//case ENTITY_NODE:
|
|
190582
|
+
//case NOTATION_NODE:
|
|
190583
|
+
default:
|
|
190584
|
+
buf.push('??', n.nodeName);
|
|
190585
|
+
return null;
|
|
189689
190586
|
}
|
|
189690
|
-
|
|
189691
|
-
|
|
189692
|
-
|
|
189693
|
-
|
|
189694
|
-
var sub = node.internalSubset;
|
|
189695
|
-
if(sub){
|
|
189696
|
-
buf.push(" [",sub,"]");
|
|
190587
|
+
},
|
|
190588
|
+
exit: function (n, childCtx) {
|
|
190589
|
+
if (childCtx && childCtx.tag) {
|
|
190590
|
+
buf.push('</', childCtx.tag, '>');
|
|
189697
190591
|
}
|
|
189698
|
-
|
|
189699
|
-
|
|
189700
|
-
return;
|
|
189701
|
-
case PROCESSING_INSTRUCTION_NODE:
|
|
189702
|
-
return buf.push( "<?",node.target," ",node.data,"?>");
|
|
189703
|
-
case ENTITY_REFERENCE_NODE:
|
|
189704
|
-
return buf.push( '&',node.nodeName,';');
|
|
189705
|
-
//case ENTITY_NODE:
|
|
189706
|
-
//case NOTATION_NODE:
|
|
189707
|
-
default:
|
|
189708
|
-
buf.push('??',node.nodeName);
|
|
189709
|
-
}
|
|
190592
|
+
},
|
|
190593
|
+
});
|
|
189710
190594
|
}
|
|
189711
|
-
|
|
189712
|
-
|
|
189713
|
-
|
|
189714
|
-
|
|
189715
|
-
|
|
189716
|
-
|
|
189717
|
-
|
|
189718
|
-
|
|
189719
|
-
|
|
189720
|
-
|
|
189721
|
-
|
|
189722
|
-
|
|
189723
|
-
|
|
189724
|
-
|
|
189725
|
-
|
|
189726
|
-
|
|
189727
|
-
|
|
189728
|
-
|
|
189729
|
-
|
|
189730
|
-
|
|
189731
|
-
|
|
189732
|
-
|
|
189733
|
-
|
|
189734
|
-
|
|
189735
|
-
|
|
189736
|
-
|
|
189737
|
-
|
|
189738
|
-
|
|
189739
|
-
|
|
189740
|
-
|
|
189741
|
-
|
|
189742
|
-
|
|
189743
|
-
|
|
189744
|
-
|
|
189745
|
-
|
|
189746
|
-
|
|
189747
|
-
|
|
189748
|
-
var child = node.firstChild;
|
|
189749
|
-
while(child){
|
|
189750
|
-
node2.appendChild(importNode(doc,child,deep));
|
|
189751
|
-
child = child.nextSibling;
|
|
189752
|
-
}
|
|
189753
|
-
}
|
|
189754
|
-
return node2;
|
|
190595
|
+
/**
|
|
190596
|
+
* Imports a node from a different document into `doc`, creating a new copy.
|
|
190597
|
+
* Delegates to {@link walkDOM} for traversal. Each node in the subtree is shallow-cloned,
|
|
190598
|
+
* stamped with `doc` as its `ownerDocument`, and detached (`parentNode` set to `null`).
|
|
190599
|
+
* Children are imported recursively when `deep` is `true`; for {@link Attr} nodes `deep` is
|
|
190600
|
+
* always forced to `true`
|
|
190601
|
+
* because an attribute's value lives in a child text node.
|
|
190602
|
+
*
|
|
190603
|
+
* @param {Document} doc
|
|
190604
|
+
* The document that will own the imported node.
|
|
190605
|
+
* @param {Node} node
|
|
190606
|
+
* The node to import.
|
|
190607
|
+
* @param {boolean} deep
|
|
190608
|
+
* If `true`, descendants are imported recursively.
|
|
190609
|
+
* @returns {Node}
|
|
190610
|
+
* The newly imported node, now owned by `doc`.
|
|
190611
|
+
*/
|
|
190612
|
+
function importNode(doc, node, deep) {
|
|
190613
|
+
var destRoot;
|
|
190614
|
+
walkDOM(node, null, {
|
|
190615
|
+
enter: function (srcNode, destParent) {
|
|
190616
|
+
// Shallow-clone the node and stamp it into the target document.
|
|
190617
|
+
var destNode = srcNode.cloneNode(false);
|
|
190618
|
+
destNode.ownerDocument = doc;
|
|
190619
|
+
destNode.parentNode = null;
|
|
190620
|
+
// capture as the root of the imported subtree or attach to parent.
|
|
190621
|
+
if (destParent === null) {
|
|
190622
|
+
destRoot = destNode;
|
|
190623
|
+
} else {
|
|
190624
|
+
destParent.appendChild(destNode);
|
|
190625
|
+
}
|
|
190626
|
+
// ATTRIBUTE_NODE must always be imported deeply: its value lives in a child text node.
|
|
190627
|
+
var shouldDeep = srcNode.nodeType === ATTRIBUTE_NODE || deep;
|
|
190628
|
+
return shouldDeep ? destNode : null;
|
|
190629
|
+
},
|
|
190630
|
+
});
|
|
190631
|
+
return destRoot;
|
|
189755
190632
|
}
|
|
189756
190633
|
//
|
|
189757
190634
|
//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,
|
|
189758
190635
|
// attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
|
|
189759
|
-
function cloneNode(doc,node,deep){
|
|
189760
|
-
var
|
|
189761
|
-
|
|
189762
|
-
|
|
189763
|
-
|
|
189764
|
-
|
|
189765
|
-
|
|
189766
|
-
|
|
190636
|
+
function cloneNode(doc, node, deep) {
|
|
190637
|
+
var destRoot;
|
|
190638
|
+
walkDOM(node, null, {
|
|
190639
|
+
enter: function (srcNode, destParent) {
|
|
190640
|
+
// 1. Create a blank node of the same type and copy all scalar own properties.
|
|
190641
|
+
var destNode = new srcNode.constructor();
|
|
190642
|
+
for (var n in srcNode) {
|
|
190643
|
+
if (Object.prototype.hasOwnProperty.call(srcNode, n)) {
|
|
190644
|
+
var v = srcNode[n];
|
|
190645
|
+
if (typeof v != 'object') {
|
|
190646
|
+
if (v != destNode[n]) {
|
|
190647
|
+
destNode[n] = v;
|
|
190648
|
+
}
|
|
190649
|
+
}
|
|
189767
190650
|
}
|
|
189768
190651
|
}
|
|
189769
|
-
|
|
189770
|
-
|
|
189771
|
-
|
|
189772
|
-
|
|
189773
|
-
|
|
189774
|
-
|
|
189775
|
-
|
|
189776
|
-
|
|
189777
|
-
|
|
189778
|
-
|
|
189779
|
-
|
|
189780
|
-
|
|
189781
|
-
|
|
189782
|
-
|
|
189783
|
-
|
|
189784
|
-
|
|
189785
|
-
|
|
189786
|
-
|
|
189787
|
-
|
|
189788
|
-
|
|
189789
|
-
|
|
189790
|
-
|
|
189791
|
-
|
|
189792
|
-
|
|
189793
|
-
|
|
189794
|
-
|
|
190652
|
+
if (srcNode.childNodes) {
|
|
190653
|
+
destNode.childNodes = new NodeList();
|
|
190654
|
+
}
|
|
190655
|
+
destNode.ownerDocument = doc;
|
|
190656
|
+
// 2. Handle node-type-specific setup.
|
|
190657
|
+
// Attributes are not DOM children, so they are cloned inline here
|
|
190658
|
+
// rather than by walkDOM descent.
|
|
190659
|
+
// ATTRIBUTE_NODE forces deep=true so its own children are walked.
|
|
190660
|
+
var shouldDeep = deep;
|
|
190661
|
+
switch (destNode.nodeType) {
|
|
190662
|
+
case ELEMENT_NODE:
|
|
190663
|
+
var attrs = srcNode.attributes;
|
|
190664
|
+
var attrs2 = (destNode.attributes = new NamedNodeMap());
|
|
190665
|
+
var len = attrs.length;
|
|
190666
|
+
attrs2._ownerElement = destNode;
|
|
190667
|
+
for (var i = 0; i < len; i++) {
|
|
190668
|
+
destNode.setAttributeNode(cloneNode(doc, attrs.item(i), true));
|
|
190669
|
+
}
|
|
190670
|
+
break;
|
|
190671
|
+
case ATTRIBUTE_NODE:
|
|
190672
|
+
shouldDeep = true;
|
|
190673
|
+
}
|
|
190674
|
+
// 3. Attach to parent, or capture as the root of the cloned subtree.
|
|
190675
|
+
if (destParent !== null) {
|
|
190676
|
+
destParent.appendChild(destNode);
|
|
190677
|
+
} else {
|
|
190678
|
+
destRoot = destNode;
|
|
190679
|
+
}
|
|
190680
|
+
// 4. Return destNode as the context for children (causes walkDOM to descend),
|
|
190681
|
+
// or null to skip children (shallow clone).
|
|
190682
|
+
return shouldDeep ? destNode : null;
|
|
190683
|
+
},
|
|
190684
|
+
});
|
|
190685
|
+
return destRoot;
|
|
189795
190686
|
}
|
|
189796
190687
|
|
|
189797
190688
|
function __set__(object,key,value){
|
|
@@ -189807,49 +190698,55 @@ function requireDom () {
|
|
|
189807
190698
|
}
|
|
189808
190699
|
});
|
|
189809
190700
|
|
|
189810
|
-
|
|
189811
|
-
|
|
189812
|
-
|
|
190701
|
+
/**
|
|
190702
|
+
* The text content of this node and its descendants.
|
|
190703
|
+
*
|
|
190704
|
+
* Setting `textContent` on an element or document fragment replaces all child nodes with a
|
|
190705
|
+
* single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly.
|
|
190706
|
+
*
|
|
190707
|
+
* @type {string | null}
|
|
190708
|
+
* @see {@link https://dom.spec.whatwg.org/#dom-node-textcontent}
|
|
190709
|
+
*/
|
|
190710
|
+
Object.defineProperty(Node.prototype, 'textContent', {
|
|
190711
|
+
get: function () {
|
|
190712
|
+
if (this.nodeType === ELEMENT_NODE || this.nodeType === DOCUMENT_FRAGMENT_NODE) {
|
|
190713
|
+
var buf = [];
|
|
190714
|
+
walkDOM(this, null, {
|
|
190715
|
+
enter: function (n) {
|
|
190716
|
+
if (n.nodeType === ELEMENT_NODE || n.nodeType === DOCUMENT_FRAGMENT_NODE) {
|
|
190717
|
+
return true; // enter children
|
|
190718
|
+
}
|
|
190719
|
+
if (n.nodeType === PROCESSING_INSTRUCTION_NODE || n.nodeType === COMMENT_NODE) {
|
|
190720
|
+
return null; // excluded from text content
|
|
190721
|
+
}
|
|
190722
|
+
buf.push(n.nodeValue);
|
|
190723
|
+
},
|
|
190724
|
+
});
|
|
190725
|
+
return buf.join('');
|
|
190726
|
+
}
|
|
190727
|
+
return this.nodeValue;
|
|
189813
190728
|
},
|
|
189814
190729
|
|
|
189815
|
-
set:function(data){
|
|
189816
|
-
switch(this.nodeType){
|
|
189817
|
-
|
|
189818
|
-
|
|
189819
|
-
|
|
189820
|
-
|
|
189821
|
-
|
|
189822
|
-
|
|
189823
|
-
|
|
189824
|
-
|
|
189825
|
-
|
|
190730
|
+
set: function (data) {
|
|
190731
|
+
switch (this.nodeType) {
|
|
190732
|
+
case ELEMENT_NODE:
|
|
190733
|
+
case DOCUMENT_FRAGMENT_NODE:
|
|
190734
|
+
while (this.firstChild) {
|
|
190735
|
+
this.removeChild(this.firstChild);
|
|
190736
|
+
}
|
|
190737
|
+
if (data || String(data)) {
|
|
190738
|
+
this.appendChild(this.ownerDocument.createTextNode(data));
|
|
190739
|
+
}
|
|
190740
|
+
break;
|
|
189826
190741
|
|
|
189827
|
-
|
|
189828
|
-
|
|
189829
|
-
|
|
189830
|
-
|
|
190742
|
+
default:
|
|
190743
|
+
this.data = data;
|
|
190744
|
+
this.value = data;
|
|
190745
|
+
this.nodeValue = data;
|
|
189831
190746
|
}
|
|
189832
|
-
}
|
|
190747
|
+
},
|
|
189833
190748
|
});
|
|
189834
190749
|
|
|
189835
|
-
function getTextContent(node){
|
|
189836
|
-
switch(node.nodeType){
|
|
189837
|
-
case ELEMENT_NODE:
|
|
189838
|
-
case DOCUMENT_FRAGMENT_NODE:
|
|
189839
|
-
var buf = [];
|
|
189840
|
-
node = node.firstChild;
|
|
189841
|
-
while(node){
|
|
189842
|
-
if(node.nodeType!==7 && node.nodeType !==8){
|
|
189843
|
-
buf.push(getTextContent(node));
|
|
189844
|
-
}
|
|
189845
|
-
node = node.nextSibling;
|
|
189846
|
-
}
|
|
189847
|
-
return buf.join('');
|
|
189848
|
-
default:
|
|
189849
|
-
return node.nodeValue;
|
|
189850
|
-
}
|
|
189851
|
-
}
|
|
189852
|
-
|
|
189853
190750
|
__set__ = function(object,key,value){
|
|
189854
190751
|
//console.log(value)
|
|
189855
190752
|
object['$$'+key] = value;
|
|
@@ -189865,6 +190762,7 @@ function requireDom () {
|
|
|
189865
190762
|
dom.Element = Element;
|
|
189866
190763
|
dom.Node = Node;
|
|
189867
190764
|
dom.NodeList = NodeList;
|
|
190765
|
+
dom.walkDOM = walkDOM;
|
|
189868
190766
|
dom.XMLSerializer = XMLSerializer;
|
|
189869
190767
|
//}
|
|
189870
190768
|
return dom;
|
|
@@ -189879,7 +190777,7 @@ var hasRequiredEntities;
|
|
|
189879
190777
|
function requireEntities () {
|
|
189880
190778
|
if (hasRequiredEntities) return entities;
|
|
189881
190779
|
hasRequiredEntities = 1;
|
|
189882
|
-
(function (exports
|
|
190780
|
+
(function (exports) {
|
|
189883
190781
|
|
|
189884
190782
|
var freeze = requireConventions().freeze;
|
|
189885
190783
|
|
|
@@ -189890,7 +190788,7 @@ function requireEntities () {
|
|
|
189890
190788
|
* @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0
|
|
189891
190789
|
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML Wikipedia
|
|
189892
190790
|
*/
|
|
189893
|
-
exports
|
|
190791
|
+
exports.XML_ENTITIES = freeze({
|
|
189894
190792
|
amp: '&',
|
|
189895
190793
|
apos: "'",
|
|
189896
190794
|
gt: '>',
|
|
@@ -189912,7 +190810,7 @@ function requireEntities () {
|
|
|
189912
190810
|
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML)
|
|
189913
190811
|
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML)
|
|
189914
190812
|
*/
|
|
189915
|
-
exports
|
|
190813
|
+
exports.HTML_ENTITIES = freeze({
|
|
189916
190814
|
Aacute: '\u00C1',
|
|
189917
190815
|
aacute: '\u00E1',
|
|
189918
190816
|
Abreve: '\u0102',
|
|
@@ -192044,7 +192942,7 @@ function requireEntities () {
|
|
|
192044
192942
|
* @deprecated use `HTML_ENTITIES` instead
|
|
192045
192943
|
* @see HTML_ENTITIES
|
|
192046
192944
|
*/
|
|
192047
|
-
exports
|
|
192945
|
+
exports.entityMap = exports.HTML_ENTITIES;
|
|
192048
192946
|
} (entities));
|
|
192049
192947
|
return entities;
|
|
192050
192948
|
}
|
|
@@ -192057,14 +192955,8 @@ function requireSax () {
|
|
|
192057
192955
|
if (hasRequiredSax) return sax;
|
|
192058
192956
|
hasRequiredSax = 1;
|
|
192059
192957
|
var NAMESPACE = requireConventions().NAMESPACE;
|
|
192958
|
+
var tagNamePattern = requireConventions().tagNamePattern;
|
|
192060
192959
|
|
|
192061
|
-
//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
|
192062
|
-
//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
|
|
192063
|
-
//[5] Name ::= NameStartChar (NameChar)*
|
|
192064
|
-
var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
|
|
192065
|
-
var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
|
|
192066
|
-
var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
|
|
192067
|
-
//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
|
|
192068
192960
|
//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
|
|
192069
192961
|
|
|
192070
192962
|
//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
|
|
@@ -192175,7 +193067,13 @@ function requireSax () {
|
|
|
192175
193067
|
switch(source.charAt(tagStart+1)){
|
|
192176
193068
|
case '/':
|
|
192177
193069
|
var end = source.indexOf('>',tagStart+3);
|
|
192178
|
-
|
|
193070
|
+
// Anchored trailing-whitespace trim. The former `/[ \t\n\r]+$/g` backtracked
|
|
193071
|
+
// quadratically on a name shaped `whitespace-run + non-whitespace char`
|
|
193072
|
+
// (an end tag `</ … x>`): from every start position it extended `[ws]+`
|
|
193073
|
+
// to the end and then failed the `$` anchor. This anchored form matches the
|
|
193074
|
+
// whole string once and captures everything up to the last non-whitespace
|
|
193075
|
+
// character, so it trims in linear time with byte-identical output.
|
|
193076
|
+
var tagName = source.substring(tagStart + 2, end).replace(/^([\s\S]*?[^ \t\n\r])?[ \t\n\r]*$/, '$1');
|
|
192179
193077
|
var config = parseStack.pop();
|
|
192180
193078
|
if(end<0){
|
|
192181
193079
|
|
|
@@ -192186,6 +193084,14 @@ function requireSax () {
|
|
|
192186
193084
|
tagName = tagName.replace(/[\s<].*/,'');
|
|
192187
193085
|
errorHandler.error("end tag name: "+tagName+' maybe not complete');
|
|
192188
193086
|
end = tagStart+1+tagName.length;
|
|
193087
|
+
}else if(/[ \t\n\r]/.test(tagName) && tagNamePattern.test(tagName.split(/[ \t\n\r]/)[0])){
|
|
193088
|
+
// The XML `ETag` production is `'</' Name S? '>'`: only optional whitespace may follow
|
|
193089
|
+
// the `Name`. A valid `Name` followed by whitespace and non-whitespace residue (e.g.
|
|
193090
|
+
// `</a\nbogus>` or `</a bogus>`) is not well-formed, but historically it was silently
|
|
193091
|
+
// accepted (the malformed end tag ignored, the residue dropped, the element left on the
|
|
193092
|
+
// stack). Report it as a recoverable `error` (which a custom errorHandler may escalate to
|
|
193093
|
+
// fatal) while keeping the existing recovery so the parsed DOM stays byte-identical.
|
|
193094
|
+
errorHandler.error('end tag name is followed by whitespace and trailing content: "'+tagName+'"');
|
|
192189
193095
|
}
|
|
192190
193096
|
var localNSMap = config.localNSMap;
|
|
192191
193097
|
var endMatch = config.tagName == tagName;
|
|
@@ -192309,6 +193215,15 @@ function requireSax () {
|
|
|
192309
193215
|
var s = S_TAG;//status
|
|
192310
193216
|
while(true){
|
|
192311
193217
|
var c = source.charAt(p);
|
|
193218
|
+
if (s === S_TAG && c === '<') {
|
|
193219
|
+
// A `<` can never occur inside a tag name. Without this guard the scan runs
|
|
193220
|
+
// on to the next `>` (or EOF) before the tag name is rejected, so a document
|
|
193221
|
+
// with many `<` inside a malformed tag makes each one-character recovery step
|
|
193222
|
+
// re-scan to the distant `>` — O(n^2). Stopping at the `<` keeps each recovery
|
|
193223
|
+
// step bounded. The candidate scanned so far is reported raw, consistent with
|
|
193224
|
+
// the sibling invalid-tag-name throw below.
|
|
193225
|
+
throw new Error('unexpected < in tag name: ' + source.slice(start, p));
|
|
193226
|
+
}
|
|
192312
193227
|
switch(c){
|
|
192313
193228
|
case '=':
|
|
192314
193229
|
if(s === S_ATTR){//attrName
|
|
@@ -192501,9 +193416,13 @@ function requireSax () {
|
|
|
192501
193416
|
if(nsPrefix !== false){//hack!!
|
|
192502
193417
|
if(localNSMap == null){
|
|
192503
193418
|
localNSMap = {};
|
|
192504
|
-
//
|
|
192505
|
-
|
|
192506
|
-
//
|
|
193419
|
+
// Derive the child scope's namespace map by prototype-chain inheritance
|
|
193420
|
+
// instead of a flat copy: lookups inherit ancestor prefixes transparently,
|
|
193421
|
+
// so a document nesting N scopes retains O(N) map entries rather than
|
|
193422
|
+
// sum(1..N) = O(N^2). localNSMap stays a flat own-only record of the
|
|
193423
|
+
// prefixes declared at THIS element, so own-property enumeration
|
|
193424
|
+
// (endPrefixMapping below) still reports only local declarations.
|
|
193425
|
+
currentNSMap = Object.create(currentNSMap);
|
|
192507
193426
|
}
|
|
192508
193427
|
currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
|
|
192509
193428
|
a.uri = NAMESPACE.XMLNS;
|
|
@@ -192655,7 +193574,7 @@ function requireSax () {
|
|
|
192655
193574
|
function parseInstruction(source,start,domBuilder){
|
|
192656
193575
|
var end = source.indexOf('?>',start);
|
|
192657
193576
|
if(end){
|
|
192658
|
-
var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)
|
|
193577
|
+
var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)$/);
|
|
192659
193578
|
if(match){
|
|
192660
193579
|
match[0].length;
|
|
192661
193580
|
domBuilder.processingInstruction(match[1], match[2]) ;
|
|
@@ -193852,7 +194771,7 @@ var hasRequiredMoment;
|
|
|
193852
194771
|
function requireMoment () {
|
|
193853
194772
|
if (hasRequiredMoment) return moment$1.exports;
|
|
193854
194773
|
hasRequiredMoment = 1;
|
|
193855
|
-
(function (module, exports
|
|
194774
|
+
(function (module, exports) {
|
|
193856
194775
|
(function (global, factory) {
|
|
193857
194776
|
module.exports = factory() ;
|
|
193858
194777
|
}(this, (function () {
|
|
@@ -199542,7 +200461,7 @@ function requireMomentTimezone () {
|
|
|
199542
200461
|
hasRequiredMomentTimezone = 1;
|
|
199543
200462
|
(function (module) {
|
|
199544
200463
|
//! moment-timezone.js
|
|
199545
|
-
//! version : 0.6.
|
|
200464
|
+
//! version : 0.6.4
|
|
199546
200465
|
//! Copyright (c) JS Foundation and other contributors
|
|
199547
200466
|
//! license : MIT
|
|
199548
200467
|
//! github.com/moment/moment-timezone
|
|
@@ -199568,12 +200487,18 @@ function requireMomentTimezone () {
|
|
|
199568
200487
|
// return moment;
|
|
199569
200488
|
// }
|
|
199570
200489
|
|
|
199571
|
-
var VERSION = "0.6.
|
|
200490
|
+
var VERSION = "0.6.4",
|
|
199572
200491
|
zones = {},
|
|
199573
200492
|
links = {},
|
|
199574
200493
|
countries = {},
|
|
199575
200494
|
names = {},
|
|
199576
200495
|
guesses = {},
|
|
200496
|
+
parsingInZone = false,
|
|
200497
|
+
parsingNow,
|
|
200498
|
+
parsingNowFunction,
|
|
200499
|
+
hasParsingNow = false,
|
|
200500
|
+
ignoreDefaultZoneForInput,
|
|
200501
|
+
hasIgnoredDefaultZoneInput = false,
|
|
199577
200502
|
cachedGuess;
|
|
199578
200503
|
|
|
199579
200504
|
if (!moment || typeof moment.version !== 'string') {
|
|
@@ -199745,17 +200670,16 @@ function requireMomentTimezone () {
|
|
|
199745
200670
|
offsets = this.offsets,
|
|
199746
200671
|
untils = this.untils,
|
|
199747
200672
|
max = untils.length - 1,
|
|
199748
|
-
offset, offsetNext,
|
|
200673
|
+
offset, offsetNext, i;
|
|
199749
200674
|
|
|
199750
200675
|
for (i = 0; i < max; i++) {
|
|
199751
200676
|
offset = offsets[i];
|
|
199752
200677
|
offsetNext = offsets[i + 1];
|
|
199753
|
-
offsetPrev = offsets[i ? i - 1 : i];
|
|
199754
200678
|
|
|
199755
200679
|
if (offset < offsetNext && tz.moveAmbiguousForward) {
|
|
199756
200680
|
offset = offsetNext;
|
|
199757
|
-
} else if (offset >
|
|
199758
|
-
offset =
|
|
200681
|
+
} else if (offset > offsetNext && tz.moveInvalidForward) {
|
|
200682
|
+
offset = offsetNext;
|
|
199759
200683
|
}
|
|
199760
200684
|
|
|
199761
200685
|
if (target < untils[i] - (offset * 60000)) {
|
|
@@ -199780,6 +200704,15 @@ function requireMomentTimezone () {
|
|
|
199780
200704
|
}
|
|
199781
200705
|
};
|
|
199782
200706
|
|
|
200707
|
+
var utcDefaultZone = new Zone();
|
|
200708
|
+
utcDefaultZone._set({
|
|
200709
|
+
name : 'UTC',
|
|
200710
|
+
abbrs : ['UTC'],
|
|
200711
|
+
untils : [Infinity],
|
|
200712
|
+
offsets : [0],
|
|
200713
|
+
population : 0
|
|
200714
|
+
});
|
|
200715
|
+
|
|
199783
200716
|
/************************************
|
|
199784
200717
|
Country object
|
|
199785
200718
|
************************************/
|
|
@@ -200117,6 +201050,85 @@ function requireMomentTimezone () {
|
|
|
200117
201050
|
return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);
|
|
200118
201051
|
}
|
|
200119
201052
|
|
|
201053
|
+
function isObjectInput (input) {
|
|
201054
|
+
var prop;
|
|
201055
|
+
|
|
201056
|
+
if (moment.isMoment(input) || input === null || Object.prototype.toString.call(input) !== '[object Object]') {
|
|
201057
|
+
return false;
|
|
201058
|
+
}
|
|
201059
|
+
if (Object.getOwnPropertyNames) {
|
|
201060
|
+
return Object.getOwnPropertyNames(input).length > 0;
|
|
201061
|
+
}
|
|
201062
|
+
for (prop in input) {
|
|
201063
|
+
if (Object.prototype.hasOwnProperty.call(input, prop)) {
|
|
201064
|
+
return true;
|
|
201065
|
+
}
|
|
201066
|
+
}
|
|
201067
|
+
return false;
|
|
201068
|
+
}
|
|
201069
|
+
|
|
201070
|
+
function parseWithZoneNow (args, name, stringInput) {
|
|
201071
|
+
var savedNow = moment.now,
|
|
201072
|
+
savedDefaultZone = moment.defaultZone,
|
|
201073
|
+
savedParsingInZone = parsingInZone,
|
|
201074
|
+
savedParsingNow = parsingNow,
|
|
201075
|
+
savedParsingNowFunction = parsingNowFunction,
|
|
201076
|
+
savedHasParsingNow = hasParsingNow,
|
|
201077
|
+
now,
|
|
201078
|
+
hasNow = false,
|
|
201079
|
+
zonedNow,
|
|
201080
|
+
wallNow,
|
|
201081
|
+
parsedDateParts,
|
|
201082
|
+
out;
|
|
201083
|
+
|
|
201084
|
+
if (!parsingInZone) {
|
|
201085
|
+
parsingNow = undefined;
|
|
201086
|
+
parsingNowFunction = savedNow;
|
|
201087
|
+
hasParsingNow = false;
|
|
201088
|
+
}
|
|
201089
|
+
parsingInZone = true;
|
|
201090
|
+
moment.now = function () {
|
|
201091
|
+
if (!hasNow) {
|
|
201092
|
+
if (!hasParsingNow) {
|
|
201093
|
+
parsingNow = parsingNowFunction.call(moment);
|
|
201094
|
+
hasParsingNow = true;
|
|
201095
|
+
}
|
|
201096
|
+
now = parsingNow;
|
|
201097
|
+
hasNow = true;
|
|
201098
|
+
zonedNow = moment.tz(now, name);
|
|
201099
|
+
wallNow = zonedNow.valueOf() + zonedNow.utcOffset() * 60000;
|
|
201100
|
+
}
|
|
201101
|
+
return wallNow;
|
|
201102
|
+
};
|
|
201103
|
+
if (stringInput) {
|
|
201104
|
+
moment.defaultZone = utcDefaultZone;
|
|
201105
|
+
}
|
|
201106
|
+
try {
|
|
201107
|
+
out = moment.utc.apply(null, args);
|
|
201108
|
+
if (stringInput && hasNow && out._a && out._tzm !== undefined) {
|
|
201109
|
+
parsedDateParts = out.parsingFlags().parsedDateParts;
|
|
201110
|
+
if (!parsedDateParts || parsedDateParts[0] == null || parsedDateParts[1] == null || parsedDateParts[2] == null) {
|
|
201111
|
+
moment.now = function () {
|
|
201112
|
+
return now;
|
|
201113
|
+
};
|
|
201114
|
+
moment.defaultZone = savedDefaultZone;
|
|
201115
|
+
out = moment.utc.apply(null, args);
|
|
201116
|
+
}
|
|
201117
|
+
}
|
|
201118
|
+
} finally {
|
|
201119
|
+
moment.now = savedNow;
|
|
201120
|
+
moment.defaultZone = savedDefaultZone;
|
|
201121
|
+
parsingInZone = savedParsingInZone;
|
|
201122
|
+
if (!savedParsingInZone) {
|
|
201123
|
+
parsingNow = savedParsingNow;
|
|
201124
|
+
parsingNowFunction = savedParsingNowFunction;
|
|
201125
|
+
hasParsingNow = savedHasParsingNow;
|
|
201126
|
+
}
|
|
201127
|
+
}
|
|
201128
|
+
|
|
201129
|
+
return out;
|
|
201130
|
+
}
|
|
201131
|
+
|
|
200120
201132
|
function logError (message) {
|
|
200121
201133
|
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
|
200122
201134
|
console.error(message);
|
|
@@ -200130,10 +201142,13 @@ function requireMomentTimezone () {
|
|
|
200130
201142
|
function tz (input) {
|
|
200131
201143
|
var args = Array.prototype.slice.call(arguments, 0, -1),
|
|
200132
201144
|
name = arguments[arguments.length - 1],
|
|
200133
|
-
|
|
200134
|
-
|
|
201145
|
+
objectInput = isObjectInput(input),
|
|
201146
|
+
stringInput = args.length > 0 && typeof input === 'string',
|
|
201147
|
+
zone = objectInput || stringInput ? getZone(name) : null,
|
|
201148
|
+
out = objectInput && zone ? parseWithZoneNow(args, name) :
|
|
201149
|
+
stringInput && zone ? parseWithZoneNow(args, name, true) : moment.utc.apply(null, args);
|
|
200135
201150
|
|
|
200136
|
-
if (!moment.isMoment(input) && needsOffset(out) && (zone = getZone(name))) {
|
|
201151
|
+
if (!moment.isMoment(input) && needsOffset(out) && (zone || (!objectInput && (zone = getZone(name))))) {
|
|
200137
201152
|
out.add(zone.parse(out), 'minutes');
|
|
200138
201153
|
}
|
|
200139
201154
|
|
|
@@ -200173,10 +201188,49 @@ function requireMomentTimezone () {
|
|
|
200173
201188
|
moment.tz = tz;
|
|
200174
201189
|
|
|
200175
201190
|
moment.defaultZone = null;
|
|
201191
|
+
var momentGetDefaultDateParts = moment._getDefaultDateParts;
|
|
201192
|
+
if (momentGetDefaultDateParts) {
|
|
201193
|
+
moment._getDefaultDateParts = function (config, now, forWeek) {
|
|
201194
|
+
var zone = moment.defaultZone,
|
|
201195
|
+
zonedNow,
|
|
201196
|
+
dateParts,
|
|
201197
|
+
savedIgnoredInput,
|
|
201198
|
+
savedHasIgnoredInput;
|
|
201199
|
+
forWeek = forWeek || config._isDefaultDatePartsForWeek;
|
|
201200
|
+
|
|
201201
|
+
if (parsingInZone && config._tzm === undefined) {
|
|
201202
|
+
zonedNow = new Date(now);
|
|
201203
|
+
return [zonedNow.getUTCFullYear(), zonedNow.getUTCMonth(), zonedNow.getUTCDate()];
|
|
201204
|
+
}
|
|
201205
|
+
|
|
201206
|
+
if (zone && !config._useUTC && config._tzm === undefined) {
|
|
201207
|
+
zonedNow = new Date(now - zone.utcOffset(now) * 60000);
|
|
201208
|
+
return [zonedNow.getUTCFullYear(), zonedNow.getUTCMonth(), zonedNow.getUTCDate()];
|
|
201209
|
+
}
|
|
201210
|
+
|
|
201211
|
+
if (forWeek && (config._useUTC || config._tzm !== undefined)) {
|
|
201212
|
+
savedIgnoredInput = ignoreDefaultZoneForInput;
|
|
201213
|
+
savedHasIgnoredInput = hasIgnoredDefaultZoneInput;
|
|
201214
|
+
ignoreDefaultZoneForInput = now;
|
|
201215
|
+
hasIgnoredDefaultZoneInput = true;
|
|
201216
|
+
try {
|
|
201217
|
+
dateParts = momentGetDefaultDateParts.call(this, config, now, forWeek);
|
|
201218
|
+
} finally {
|
|
201219
|
+
ignoreDefaultZoneForInput = savedIgnoredInput;
|
|
201220
|
+
hasIgnoredDefaultZoneInput = savedHasIgnoredInput;
|
|
201221
|
+
}
|
|
201222
|
+
return dateParts;
|
|
201223
|
+
}
|
|
201224
|
+
|
|
201225
|
+
return momentGetDefaultDateParts.call(this, config, now, forWeek);
|
|
201226
|
+
};
|
|
201227
|
+
}
|
|
200176
201228
|
|
|
200177
201229
|
moment.updateOffset = function (mom, keepTime) {
|
|
200178
|
-
var zone = moment.defaultZone,
|
|
200179
|
-
offset
|
|
201230
|
+
var zone = hasIgnoredDefaultZoneInput && ignoreDefaultZoneForInput === mom._i ? null : moment.defaultZone,
|
|
201231
|
+
offset,
|
|
201232
|
+
localTimestamp,
|
|
201233
|
+
normalizedTimestamp;
|
|
200180
201234
|
|
|
200181
201235
|
if (mom._z === undefined) {
|
|
200182
201236
|
if (zone && needsOffset(mom) && !mom._isUTC && mom.isValid()) {
|
|
@@ -200187,6 +201241,20 @@ function requireMomentTimezone () {
|
|
|
200187
201241
|
}
|
|
200188
201242
|
if (mom._z) {
|
|
200189
201243
|
offset = mom._z.utcOffset(mom);
|
|
201244
|
+
if (keepTime) {
|
|
201245
|
+
// Resolve local times inside a forward gap using the configured
|
|
201246
|
+
// invalid-input policy before applying the new offset.
|
|
201247
|
+
localTimestamp = mom._d.valueOf();
|
|
201248
|
+
if (!mom._isUTC) {
|
|
201249
|
+
localTimestamp -= mom._d.getTimezoneOffset() * 60000;
|
|
201250
|
+
}
|
|
201251
|
+
if (mom._z.utcOffset(localTimestamp + offset * 60000) !== offset) {
|
|
201252
|
+
offset = mom._z.parse(localTimestamp);
|
|
201253
|
+
localTimestamp += offset * 60000;
|
|
201254
|
+
offset = mom._z.utcOffset(localTimestamp);
|
|
201255
|
+
normalizedTimestamp = localTimestamp - offset * 60000;
|
|
201256
|
+
}
|
|
201257
|
+
}
|
|
200190
201258
|
if (Math.abs(offset) < 16) {
|
|
200191
201259
|
offset = offset / 60;
|
|
200192
201260
|
}
|
|
@@ -200197,6 +201265,9 @@ function requireMomentTimezone () {
|
|
|
200197
201265
|
} else {
|
|
200198
201266
|
mom.zone(offset, keepTime);
|
|
200199
201267
|
}
|
|
201268
|
+
if (normalizedTimestamp != null) {
|
|
201269
|
+
mom._d.setTime(normalizedTimestamp);
|
|
201270
|
+
}
|
|
200200
201271
|
}
|
|
200201
201272
|
};
|
|
200202
201273
|
|
|
@@ -203064,11 +204135,11 @@ var DEFAULT_FORMATS;
|
|
|
203064
204135
|
DEFAULT_FORMATS["DATE_TIME"] = "yyyy-MM-dd HH:mm:ss";
|
|
203065
204136
|
})(DEFAULT_FORMATS || (DEFAULT_FORMATS = {}));
|
|
203066
204137
|
|
|
203067
|
-
const $RAF = window.requestAnimationFrame;
|
|
204138
|
+
const $RAF$1 = window.requestAnimationFrame;
|
|
203068
204139
|
const $RAFQueue = [];
|
|
203069
204140
|
const invokeLater = fn => {
|
|
203070
204141
|
if (!$RAFQueue.length) {
|
|
203071
|
-
$RAF(() => {
|
|
204142
|
+
$RAF$1(() => {
|
|
203072
204143
|
$RAFQueue.forEach(f => f());
|
|
203073
204144
|
$RAFQueue.length = 0;
|
|
203074
204145
|
});
|
|
@@ -203610,220 +204681,83 @@ const getFnForEventExpr = (expr) => {
|
|
|
203610
204681
|
return fnExecutor(expr, ExpressionType.Action);
|
|
203611
204682
|
};
|
|
203612
204683
|
|
|
203613
|
-
// Constants
|
|
203614
|
-
const WIDGET_ID_REGEX = /^(widget-[^_]+)/;
|
|
203615
|
-
const WIDGET_PROPERTY_REGEX = /^widget-[^_]+_(.+)$/;
|
|
203616
|
-
const ARRAY_INDEX_PLACEHOLDER = '[$i]';
|
|
203617
|
-
const ARRAY_INDEX_ZERO = '[0]';
|
|
203618
204684
|
const registry = new Map();
|
|
203619
204685
|
const watchIdGenerator = new IDGenerator('watch-id-');
|
|
203620
|
-
const FIRST_TIME_WATCH =
|
|
203621
|
-
|
|
203622
|
-
* Extracts widget ID from identifier (e.g., "widget-id23_eventsource" -> "widget-id23")
|
|
203623
|
-
*/
|
|
203624
|
-
const getWidgetId = (identifier) => {
|
|
203625
|
-
if (!identifier || typeof identifier !== 'string') {
|
|
203626
|
-
return null;
|
|
203627
|
-
}
|
|
203628
|
-
const match = identifier.match(WIDGET_ID_REGEX);
|
|
203629
|
-
return match ? match[1] : null;
|
|
203630
|
-
};
|
|
203631
|
-
/**
|
|
203632
|
-
* Extracts property name from identifier (e.g., "widget-id23_eventsource" -> "eventsource")
|
|
203633
|
-
*/
|
|
203634
|
-
const getPropertyName = (identifier) => {
|
|
203635
|
-
if (!identifier || typeof identifier !== 'string') {
|
|
203636
|
-
return identifier;
|
|
203637
|
-
}
|
|
203638
|
-
const match = identifier.match(WIDGET_PROPERTY_REGEX);
|
|
203639
|
-
return match ? match[1] : identifier;
|
|
203640
|
-
};
|
|
203641
|
-
/**
|
|
203642
|
-
* Array consumer wrapper for array-based expressions
|
|
203643
|
-
*/
|
|
204686
|
+
const FIRST_TIME_WATCH = {};
|
|
204687
|
+
Object.freeze(FIRST_TIME_WATCH);
|
|
203644
204688
|
const arrayConsumer = (listenerFn, restExpr, newVal, oldVal) => {
|
|
203645
|
-
|
|
203646
|
-
|
|
203647
|
-
|
|
203648
|
-
|
|
203649
|
-
|
|
203650
|
-
|
|
203651
|
-
|
|
204689
|
+
let data = newVal, formattedData;
|
|
204690
|
+
if (_.isArray(data)) {
|
|
204691
|
+
formattedData = data.map(function (datum) {
|
|
204692
|
+
return findValueOf(datum, restExpr);
|
|
204693
|
+
});
|
|
204694
|
+
// If resulting structure is an array of array, flatten it
|
|
204695
|
+
if (_.isArray(formattedData[0])) {
|
|
204696
|
+
formattedData = _.flatten(formattedData);
|
|
204697
|
+
}
|
|
204698
|
+
listenerFn(formattedData, oldVal);
|
|
203652
204699
|
}
|
|
203653
|
-
listenerFn(formattedData, oldVal);
|
|
203654
204700
|
};
|
|
203655
|
-
|
|
203656
|
-
|
|
203657
|
-
|
|
203658
|
-
|
|
203659
|
-
const regex = /\[\$i\]/g;
|
|
204701
|
+
const getUpdatedWatcInfo = (expr, acceptsArray, listener) => {
|
|
204702
|
+
// listener doesn't accept array
|
|
204703
|
+
// replace all `[$i]` with `[0]` and return the expression
|
|
204704
|
+
let regex = /\[\$i\]/g, $I = '[$i]', $0 = '[0]';
|
|
203660
204705
|
if (!acceptsArray) {
|
|
203661
204706
|
return {
|
|
203662
|
-
expr: expr.replace(regex,
|
|
203663
|
-
listener
|
|
204707
|
+
'expr': expr.replace(regex, $0),
|
|
204708
|
+
'listener': listener
|
|
203664
204709
|
};
|
|
203665
204710
|
}
|
|
203666
|
-
|
|
203667
|
-
|
|
203668
|
-
|
|
203669
|
-
|
|
203670
|
-
|
|
203671
|
-
|
|
204711
|
+
// listener accepts array
|
|
204712
|
+
// replace all except the last `[$i]` with `[0]` and return the expression.
|
|
204713
|
+
var index = expr.lastIndexOf($I), _expr = expr.substr(0, index).replace($I, $0), restExpr = expr.substr(index + 5), arrayConsumerFn = listener;
|
|
204714
|
+
if (restExpr) {
|
|
204715
|
+
arrayConsumerFn = arrayConsumer.bind(undefined, listener, restExpr);
|
|
204716
|
+
}
|
|
203672
204717
|
return {
|
|
203673
|
-
expr:
|
|
203674
|
-
listener: arrayConsumerFn
|
|
204718
|
+
'expr': _expr,
|
|
204719
|
+
'listener': arrayConsumerFn
|
|
203675
204720
|
};
|
|
203676
204721
|
};
|
|
203677
|
-
/**
|
|
203678
|
-
* Determines if an expression is static (doesn't need to be watched)
|
|
203679
|
-
*/
|
|
203680
|
-
const STATIC_EXPRESSION_NAMES = [
|
|
203681
|
-
"row.getProperty('investment')",
|
|
203682
|
-
"row.getProperty('factsheetLink')",
|
|
203683
|
-
"row.getProperty('isRebalanceEligible')"
|
|
203684
|
-
];
|
|
203685
|
-
const isStaticExpression = (expr) => {
|
|
203686
|
-
if (typeof expr !== 'string') {
|
|
203687
|
-
return false;
|
|
203688
|
-
}
|
|
203689
|
-
const trimmedExpr = expr.trim();
|
|
203690
|
-
// Expressions that always evaluate to localization strings
|
|
203691
|
-
if (trimmedExpr.includes('appLocale')) {
|
|
203692
|
-
return true;
|
|
203693
|
-
}
|
|
203694
|
-
// Hard-coded static expression names
|
|
203695
|
-
if (STATIC_EXPRESSION_NAMES.includes(trimmedExpr)) {
|
|
203696
|
-
return true;
|
|
203697
|
-
}
|
|
203698
|
-
return false;
|
|
203699
|
-
};
|
|
203700
|
-
/**
|
|
203701
|
-
* Gets the scope type from the scope object
|
|
203702
|
-
*/
|
|
203703
|
-
const getScopeType = ($scope) => {
|
|
203704
|
-
if (!$scope) {
|
|
203705
|
-
return null;
|
|
203706
|
-
}
|
|
203707
|
-
if ($scope.pageName)
|
|
203708
|
-
return 'Page';
|
|
203709
|
-
if ($scope.prefabName)
|
|
203710
|
-
return 'Prefab';
|
|
203711
|
-
if ($scope.partialName)
|
|
203712
|
-
return 'Partial';
|
|
203713
|
-
// Check for App scope
|
|
203714
|
-
if ($scope.Variables !== undefined &&
|
|
203715
|
-
$scope.Actions !== undefined &&
|
|
203716
|
-
!$scope.pageName &&
|
|
203717
|
-
!$scope.prefabName &&
|
|
203718
|
-
!$scope.partialName) {
|
|
203719
|
-
return 'App';
|
|
203720
|
-
}
|
|
203721
|
-
if ($scope.constructor?.name === 'AppRef') {
|
|
203722
|
-
return 'App';
|
|
203723
|
-
}
|
|
203724
|
-
return null;
|
|
203725
|
-
};
|
|
203726
|
-
/**
|
|
203727
|
-
* Gets scope name based on scope type
|
|
203728
|
-
*/
|
|
203729
|
-
const getScopeName = ($scope, scopeType) => {
|
|
203730
|
-
if (!scopeType || !$scope) {
|
|
203731
|
-
return null;
|
|
203732
|
-
}
|
|
203733
|
-
switch (scopeType) {
|
|
203734
|
-
case 'Prefab': return $scope.prefabName || null;
|
|
203735
|
-
case 'Partial': return $scope.partialName || null;
|
|
203736
|
-
case 'Page': return $scope.pageName || null;
|
|
203737
|
-
default: return null;
|
|
203738
|
-
}
|
|
203739
|
-
};
|
|
203740
|
-
/**
|
|
203741
|
-
* Main watch function
|
|
203742
|
-
*/
|
|
203743
204722
|
const $watch = (expr, $scope, $locals, listener, identifier = watchIdGenerator.nextUid(), doNotClone = false, config = {}, isMuted) => {
|
|
203744
|
-
|
|
203745
|
-
|
|
203746
|
-
const watchInfo = getUpdatedWatchInfo(expr, config.arrayType || config.isList || false, listener);
|
|
204723
|
+
if (expr.indexOf('[$i]') !== -1) {
|
|
204724
|
+
let watchInfo = getUpdatedWatcInfo(expr, config && (config.arrayType || config.isList), listener);
|
|
203747
204725
|
expr = watchInfo.expr;
|
|
203748
204726
|
listener = watchInfo.listener;
|
|
203749
204727
|
}
|
|
203750
|
-
// Handle static expressions
|
|
203751
|
-
if (isStaticExpression(expr)) {
|
|
203752
|
-
try {
|
|
203753
|
-
const fn = $parseExpr(expr);
|
|
203754
|
-
const staticValue = fn($scope, $locals);
|
|
203755
|
-
listener(staticValue, FIRST_TIME_WATCH);
|
|
203756
|
-
}
|
|
203757
|
-
catch (e) {
|
|
203758
|
-
console.warn(`Error evaluating static expression '${expr}':`, e);
|
|
203759
|
-
listener(undefined, FIRST_TIME_WATCH);
|
|
203760
|
-
}
|
|
203761
|
-
return () => { }; // No-op unsubscribe
|
|
203762
|
-
}
|
|
203763
204728
|
const fn = $parseExpr();
|
|
203764
|
-
|
|
203765
|
-
|
|
203766
|
-
const watchInfo = {
|
|
203767
|
-
fn: fn.bind(null, $scope, $locals),
|
|
204729
|
+
registry.set(identifier, {
|
|
204730
|
+
fn: fn.bind(expr, $scope, $locals),
|
|
203768
204731
|
listener,
|
|
203769
204732
|
expr,
|
|
203770
204733
|
last: FIRST_TIME_WATCH,
|
|
203771
204734
|
doNotClone,
|
|
203772
|
-
isMuted
|
|
203773
|
-
|
|
203774
|
-
scopeName
|
|
203775
|
-
};
|
|
203776
|
-
// Store in registry
|
|
203777
|
-
const widgetId = getWidgetId(identifier);
|
|
203778
|
-
if (widgetId) {
|
|
203779
|
-
const propertyName = getPropertyName(identifier);
|
|
203780
|
-
if (!registry.has(widgetId)) {
|
|
203781
|
-
registry.set(widgetId, {});
|
|
203782
|
-
}
|
|
203783
|
-
const widgetGroup = registry.get(widgetId);
|
|
203784
|
-
widgetGroup[propertyName] = watchInfo;
|
|
203785
|
-
}
|
|
203786
|
-
else {
|
|
203787
|
-
registry.set(identifier, watchInfo);
|
|
203788
|
-
}
|
|
204735
|
+
isMuted: isMuted
|
|
204736
|
+
});
|
|
203789
204737
|
return () => $unwatch(identifier);
|
|
203790
204738
|
};
|
|
203791
|
-
|
|
203792
|
-
|
|
203793
|
-
|
|
203794
|
-
const $
|
|
203795
|
-
|
|
203796
|
-
|
|
203797
|
-
|
|
203798
|
-
|
|
203799
|
-
if (
|
|
203800
|
-
|
|
203801
|
-
|
|
203802
|
-
delete widgetGroup[propertyName];
|
|
203803
|
-
// Clean up empty widget groups
|
|
203804
|
-
if (Object.keys(widgetGroup).length === 0) {
|
|
203805
|
-
registry.delete(widgetId);
|
|
203806
|
-
}
|
|
203807
|
-
return true;
|
|
203808
|
-
}
|
|
204739
|
+
const $unwatch = identifier => registry.delete(identifier);
|
|
204740
|
+
window.watchRegistry = registry;
|
|
204741
|
+
window.__WM_DEBUG_WATCHERS__ = false;
|
|
204742
|
+
/*export const $invokeWatchers = (force?: boolean, ignoreMuted?: boolean) => {
|
|
204743
|
+
if (force) {
|
|
204744
|
+
triggerWatchers(ignoreMuted);
|
|
204745
|
+
} else {
|
|
204746
|
+
|
|
204747
|
+
if (skipWatchers) {
|
|
204748
|
+
skipWatchers = false;
|
|
204749
|
+
return;
|
|
203809
204750
|
}
|
|
204751
|
+
debouncedTriggerWatchers();
|
|
203810
204752
|
}
|
|
203811
|
-
|
|
203812
|
-
if (registry.has(identifier)) {
|
|
203813
|
-
registry.delete(identifier);
|
|
203814
|
-
return true;
|
|
203815
|
-
}
|
|
203816
|
-
return false;
|
|
203817
|
-
};
|
|
204753
|
+
};*/
|
|
203818
204754
|
const $appDigest = (() => {
|
|
203819
|
-
return (force
|
|
204755
|
+
return (force) => {
|
|
203820
204756
|
{
|
|
203821
204757
|
return;
|
|
203822
204758
|
}
|
|
203823
204759
|
};
|
|
203824
204760
|
})();
|
|
203825
|
-
// Export registry for debugging
|
|
203826
|
-
// (window as any).watchRegistry = registry;
|
|
203827
204761
|
|
|
203828
204762
|
var ComponentType;
|
|
203829
204763
|
(function (ComponentType) {
|