html-react-parser 0.4.6 → 0.4.7
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/CHANGELOG.md +5 -0
- package/README.md +81 -90
- package/dist/html-react-parser.js +144 -2221
- package/dist/html-react-parser.min.js +1 -1
- package/index.js +4 -9
- package/lib/attributes-to-props.js +53 -59
- package/lib/dom-to-react.js +60 -75
- package/lib/property-config.js +16 -28
- package/lib/utilities.js +39 -38
- package/package.json +18 -10
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
exports["HTMLReactParser"] = factory(require("react"));
|
|
8
8
|
else
|
|
9
9
|
root["HTMLReactParser"] = factory(root["React"]);
|
|
10
|
-
})(
|
|
10
|
+
})(window, function(__WEBPACK_EXTERNAL_MODULE_react__) {
|
|
11
11
|
return /******/ (function(modules) { // webpackBootstrap
|
|
12
12
|
/******/ // The module cache
|
|
13
13
|
/******/ var installedModules = {};
|
|
@@ -46,14 +46,34 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
46
46
|
/******/ // define getter function for harmony exports
|
|
47
47
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
48
48
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
49
|
-
/******/ Object.defineProperty(exports, name, {
|
|
50
|
-
/******/ configurable: false,
|
|
51
|
-
/******/ enumerable: true,
|
|
52
|
-
/******/ get: getter
|
|
53
|
-
/******/ });
|
|
49
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
54
50
|
/******/ }
|
|
55
51
|
/******/ };
|
|
56
52
|
/******/
|
|
53
|
+
/******/ // define __esModule on exports
|
|
54
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
55
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
56
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
57
|
+
/******/ }
|
|
58
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
59
|
+
/******/ };
|
|
60
|
+
/******/
|
|
61
|
+
/******/ // create a fake namespace object
|
|
62
|
+
/******/ // mode & 1: value is a module id, require it
|
|
63
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
64
|
+
/******/ // mode & 4: return value when already ns object
|
|
65
|
+
/******/ // mode & 8|1: behave like require
|
|
66
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
67
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
68
|
+
/******/ if(mode & 8) return value;
|
|
69
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
70
|
+
/******/ var ns = Object.create(null);
|
|
71
|
+
/******/ __webpack_require__.r(ns);
|
|
72
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
73
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
74
|
+
/******/ return ns;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
57
77
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
58
78
|
/******/ __webpack_require__.n = function(module) {
|
|
59
79
|
/******/ var getter = module && module.__esModule ?
|
|
@@ -69,2293 +89,196 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
69
89
|
/******/ // __webpack_public_path__
|
|
70
90
|
/******/ __webpack_require__.p = "";
|
|
71
91
|
/******/
|
|
92
|
+
/******/
|
|
72
93
|
/******/ // Load entry module and return exports
|
|
73
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
94
|
+
/******/ return __webpack_require__(__webpack_require__.s = "./index.js");
|
|
74
95
|
/******/ })
|
|
75
96
|
/************************************************************************/
|
|
76
|
-
/******/ (
|
|
77
|
-
/* 0 */
|
|
78
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
79
|
-
|
|
80
|
-
"use strict";
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
var _hyphenPattern = /-(.)/g;
|
|
97
|
+
/******/ ({
|
|
84
98
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*/
|
|
91
|
-
function camelCase(string) {
|
|
92
|
-
if (typeof string !== 'string') { // null is an object
|
|
93
|
-
throw new TypeError('First argument must be a string');
|
|
94
|
-
}
|
|
95
|
-
if(string.indexOf('-') < 0) {
|
|
96
|
-
return string;
|
|
97
|
-
}
|
|
98
|
-
return string.toLowerCase().replace(_hyphenPattern, function(_, character) {
|
|
99
|
-
return character.toUpperCase();
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Swap key with value in an object.
|
|
105
|
-
*
|
|
106
|
-
* @param {Object} obj - The object.
|
|
107
|
-
* @param {Function} [override] - The override method.
|
|
108
|
-
* @return {Object} - The inverted object.
|
|
109
|
-
*/
|
|
110
|
-
function invertObject(obj, override) {
|
|
111
|
-
if (typeof obj !== 'object' || !obj) { // null is an object
|
|
112
|
-
throw new TypeError('First argument must be an object');
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
var key;
|
|
116
|
-
var value;
|
|
117
|
-
var isOverridePresent = typeof override === 'function';
|
|
118
|
-
var overrides = {};
|
|
119
|
-
var result = {};
|
|
120
|
-
|
|
121
|
-
for (key in obj) {
|
|
122
|
-
value = obj[key];
|
|
123
|
-
|
|
124
|
-
if (isOverridePresent) {
|
|
125
|
-
overrides = override(key, value);
|
|
126
|
-
if (overrides && overrides.length === 2) {
|
|
127
|
-
result[overrides[0]] = overrides[1];
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if (typeof value === 'string') {
|
|
133
|
-
result[value] = key;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
return result;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Export utilties.
|
|
142
|
-
*/
|
|
143
|
-
module.exports = {
|
|
144
|
-
camelCase: camelCase,
|
|
145
|
-
invertObject: invertObject
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
/***/ }),
|
|
150
|
-
/* 1 */
|
|
99
|
+
/***/ "./index.js":
|
|
100
|
+
/*!******************!*\
|
|
101
|
+
!*** ./index.js ***!
|
|
102
|
+
\******************/
|
|
103
|
+
/*! no static exports found */
|
|
151
104
|
/***/ (function(module, exports, __webpack_require__) {
|
|
152
105
|
|
|
153
|
-
"
|
|
154
|
-
/**
|
|
155
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
156
|
-
*
|
|
157
|
-
* This source code is licensed under the MIT license found in the
|
|
158
|
-
* LICENSE file in the root directory of this source tree.
|
|
159
|
-
*
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
var _prodInvariant = __webpack_require__(9);
|
|
165
|
-
|
|
166
|
-
var invariant = __webpack_require__(10);
|
|
167
|
-
|
|
168
|
-
function checkMask(value, bitmask) {
|
|
169
|
-
return (value & bitmask) === bitmask;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
var DOMPropertyInjection = {
|
|
173
|
-
/**
|
|
174
|
-
* Mapping from normalized, camelcased property names to a configuration that
|
|
175
|
-
* specifies how the associated DOM property should be accessed or rendered.
|
|
176
|
-
*/
|
|
177
|
-
MUST_USE_PROPERTY: 0x1,
|
|
178
|
-
HAS_BOOLEAN_VALUE: 0x4,
|
|
179
|
-
HAS_NUMERIC_VALUE: 0x8,
|
|
180
|
-
HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
|
|
181
|
-
HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Inject some specialized knowledge about the DOM. This takes a config object
|
|
185
|
-
* with the following properties:
|
|
186
|
-
*
|
|
187
|
-
* isCustomAttribute: function that given an attribute name will return true
|
|
188
|
-
* if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
|
|
189
|
-
* attributes where it's impossible to enumerate all of the possible
|
|
190
|
-
* attribute names,
|
|
191
|
-
*
|
|
192
|
-
* Properties: object mapping DOM property name to one of the
|
|
193
|
-
* DOMPropertyInjection constants or null. If your attribute isn't in here,
|
|
194
|
-
* it won't get written to the DOM.
|
|
195
|
-
*
|
|
196
|
-
* DOMAttributeNames: object mapping React attribute name to the DOM
|
|
197
|
-
* attribute name. Attribute names not specified use the **lowercase**
|
|
198
|
-
* normalized name.
|
|
199
|
-
*
|
|
200
|
-
* DOMAttributeNamespaces: object mapping React attribute name to the DOM
|
|
201
|
-
* attribute namespace URL. (Attribute names not specified use no namespace.)
|
|
202
|
-
*
|
|
203
|
-
* DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
|
|
204
|
-
* Property names not specified use the normalized name.
|
|
205
|
-
*
|
|
206
|
-
* DOMMutationMethods: Properties that require special mutation methods. If
|
|
207
|
-
* `value` is undefined, the mutation method should unset the property.
|
|
208
|
-
*
|
|
209
|
-
* @param {object} domPropertyConfig the config as described above.
|
|
210
|
-
*/
|
|
211
|
-
injectDOMPropertyConfig: function (domPropertyConfig) {
|
|
212
|
-
var Injection = DOMPropertyInjection;
|
|
213
|
-
var Properties = domPropertyConfig.Properties || {};
|
|
214
|
-
var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
|
|
215
|
-
var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
|
|
216
|
-
var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
|
|
217
|
-
var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
|
|
218
|
-
|
|
219
|
-
if (domPropertyConfig.isCustomAttribute) {
|
|
220
|
-
DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
for (var propName in Properties) {
|
|
224
|
-
!!DOMProperty.properties.hasOwnProperty(propName) ? true ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
|
|
225
|
-
|
|
226
|
-
var lowerCased = propName.toLowerCase();
|
|
227
|
-
var propConfig = Properties[propName];
|
|
228
|
-
|
|
229
|
-
var propertyInfo = {
|
|
230
|
-
attributeName: lowerCased,
|
|
231
|
-
attributeNamespace: null,
|
|
232
|
-
propertyName: propName,
|
|
233
|
-
mutationMethod: null,
|
|
234
|
-
|
|
235
|
-
mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
|
|
236
|
-
hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
|
|
237
|
-
hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
|
|
238
|
-
hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
|
|
239
|
-
hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
|
|
240
|
-
};
|
|
241
|
-
!(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? true ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
|
|
242
|
-
|
|
243
|
-
if (true) {
|
|
244
|
-
DOMProperty.getPossibleStandardName[lowerCased] = propName;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
if (DOMAttributeNames.hasOwnProperty(propName)) {
|
|
248
|
-
var attributeName = DOMAttributeNames[propName];
|
|
249
|
-
propertyInfo.attributeName = attributeName;
|
|
250
|
-
if (true) {
|
|
251
|
-
DOMProperty.getPossibleStandardName[attributeName] = propName;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
|
|
256
|
-
propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
if (DOMPropertyNames.hasOwnProperty(propName)) {
|
|
260
|
-
propertyInfo.propertyName = DOMPropertyNames[propName];
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
if (DOMMutationMethods.hasOwnProperty(propName)) {
|
|
264
|
-
propertyInfo.mutationMethod = DOMMutationMethods[propName];
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
DOMProperty.properties[propName] = propertyInfo;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
/* eslint-disable max-len */
|
|
273
|
-
var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
|
|
274
|
-
/* eslint-enable max-len */
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* DOMProperty exports lookup objects that can be used like functions:
|
|
278
|
-
*
|
|
279
|
-
* > DOMProperty.isValid['id']
|
|
280
|
-
* true
|
|
281
|
-
* > DOMProperty.isValid['foobar']
|
|
282
|
-
* undefined
|
|
283
|
-
*
|
|
284
|
-
* Although this may be confusing, it performs better in general.
|
|
285
|
-
*
|
|
286
|
-
* @see http://jsperf.com/key-exists
|
|
287
|
-
* @see http://jsperf.com/key-missing
|
|
288
|
-
*/
|
|
289
|
-
var DOMProperty = {
|
|
290
|
-
ID_ATTRIBUTE_NAME: 'data-reactid',
|
|
291
|
-
ROOT_ATTRIBUTE_NAME: 'data-reactroot',
|
|
292
|
-
|
|
293
|
-
ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
|
|
294
|
-
ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* Map from property "standard name" to an object with info about how to set
|
|
298
|
-
* the property in the DOM. Each object contains:
|
|
299
|
-
*
|
|
300
|
-
* attributeName:
|
|
301
|
-
* Used when rendering markup or with `*Attribute()`.
|
|
302
|
-
* attributeNamespace
|
|
303
|
-
* propertyName:
|
|
304
|
-
* Used on DOM node instances. (This includes properties that mutate due to
|
|
305
|
-
* external factors.)
|
|
306
|
-
* mutationMethod:
|
|
307
|
-
* If non-null, used instead of the property or `setAttribute()` after
|
|
308
|
-
* initial render.
|
|
309
|
-
* mustUseProperty:
|
|
310
|
-
* Whether the property must be accessed and mutated as an object property.
|
|
311
|
-
* hasBooleanValue:
|
|
312
|
-
* Whether the property should be removed when set to a falsey value.
|
|
313
|
-
* hasNumericValue:
|
|
314
|
-
* Whether the property must be numeric or parse as a numeric and should be
|
|
315
|
-
* removed when set to a falsey value.
|
|
316
|
-
* hasPositiveNumericValue:
|
|
317
|
-
* Whether the property must be positive numeric or parse as a positive
|
|
318
|
-
* numeric and should be removed when set to a falsey value.
|
|
319
|
-
* hasOverloadedBooleanValue:
|
|
320
|
-
* Whether the property can be used as a flag as well as with a value.
|
|
321
|
-
* Removed when strictly equal to false; present without a value when
|
|
322
|
-
* strictly equal to true; present with a value otherwise.
|
|
323
|
-
*/
|
|
324
|
-
properties: {},
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* Mapping from lowercase property names to the properly cased version, used
|
|
328
|
-
* to warn in the case of missing properties. Available only in __DEV__.
|
|
329
|
-
*
|
|
330
|
-
* autofocus is predefined, because adding it to the property whitelist
|
|
331
|
-
* causes unintended side effects.
|
|
332
|
-
*
|
|
333
|
-
* @type {Object}
|
|
334
|
-
*/
|
|
335
|
-
getPossibleStandardName: true ? { autofocus: 'autoFocus' } : null,
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* All of the isCustomAttribute() functions that have been injected.
|
|
339
|
-
*/
|
|
340
|
-
_isCustomAttributeFunctions: [],
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Checks whether a property name is a custom attribute.
|
|
344
|
-
* @method
|
|
345
|
-
*/
|
|
346
|
-
isCustomAttribute: function (attributeName) {
|
|
347
|
-
for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
|
|
348
|
-
var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
|
|
349
|
-
if (isCustomAttributeFn(attributeName)) {
|
|
350
|
-
return true;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
return false;
|
|
354
|
-
},
|
|
355
|
-
|
|
356
|
-
injection: DOMPropertyInjection
|
|
357
|
-
};
|
|
358
|
-
|
|
359
|
-
module.exports = DOMProperty;
|
|
106
|
+
eval("var domToReact = __webpack_require__(/*! ./lib/dom-to-react */ \"./lib/dom-to-react.js\");\nvar htmlToDOM = __webpack_require__(/*! html-dom-parser */ \"./node_modules/html-dom-parser/lib/html-to-dom-client.js\");\n\n// decode HTML entities by default for `htmlparser2`\nvar domParserOptions = { decodeEntities: true, lowerCaseAttributeNames: false };\n\n/**\n * Convert HTML string to React elements.\n *\n * @param {String} html - The HTML string.\n * @param {Object} [options] - The additional options.\n * @param {Function} [options.replace] - The replace method.\n * @return {ReactElement|Array}\n */\nfunction HTMLReactParser(html, options) {\n if (typeof html !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n return domToReact(htmlToDOM(html, domParserOptions), options);\n}\n\n/**\n * Export HTML to React parser.\n */\nmodule.exports = HTMLReactParser;\n\n\n//# sourceURL=webpack://HTMLReactParser/./index.js?");
|
|
360
107
|
|
|
361
108
|
/***/ }),
|
|
362
|
-
/* 2 */
|
|
363
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
364
|
-
|
|
365
|
-
"use strict";
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* Format DOM attributes to an associative array.
|
|
370
|
-
*
|
|
371
|
-
* @param {NamedNodeMap} - The list of attributes.
|
|
372
|
-
* @return {Object} - The object of attributes.
|
|
373
|
-
*/
|
|
374
|
-
function formatAttributes(attributes) {
|
|
375
|
-
var result = {};
|
|
376
|
-
var attribute;
|
|
377
|
-
|
|
378
|
-
// NamedNodeMap is array-like
|
|
379
|
-
for (var i = 0, len = attributes.length; i < len; i++) {
|
|
380
|
-
attribute = attributes[i];
|
|
381
|
-
result[attribute.name] = attribute.value;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
return result;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* Format the browser DOM nodes to mimic the output of `htmlparser2.parseDOM()`.
|
|
389
|
-
*
|
|
390
|
-
* @param {NodeList} nodes - The DOM nodes.
|
|
391
|
-
* @param {Object} [parentObj] - The formatted parent node.
|
|
392
|
-
* @param {String} [directive] - The directive.
|
|
393
|
-
* @return {Object} - The formatted DOM object.
|
|
394
|
-
*/
|
|
395
|
-
function formatDOM(nodes, parentObj, directive) {
|
|
396
|
-
parentObj = parentObj || null;
|
|
397
|
-
|
|
398
|
-
var result = [];
|
|
399
|
-
var node;
|
|
400
|
-
var prevNode;
|
|
401
|
-
var nodeObj;
|
|
402
|
-
|
|
403
|
-
// NodeList is array-like
|
|
404
|
-
for (var i = 0, len = nodes.length; i < len; i++) {
|
|
405
|
-
node = nodes[i];
|
|
406
|
-
// reset
|
|
407
|
-
nodeObj = {
|
|
408
|
-
next: null,
|
|
409
|
-
prev: result[i - 1] || null,
|
|
410
|
-
parent: parentObj
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
// set the next node for the previous node (if applicable)
|
|
414
|
-
prevNode = result[i - 1];
|
|
415
|
-
if (prevNode) {
|
|
416
|
-
prevNode.next = nodeObj;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
// set the node name if it's not "#text" or "#comment"
|
|
420
|
-
// e.g., "div"
|
|
421
|
-
if (node.nodeName.indexOf('#') !== 0) {
|
|
422
|
-
nodeObj.name = node.nodeName.toLowerCase();
|
|
423
|
-
|
|
424
|
-
// also, nodes of type "tag" have "attribs"
|
|
425
|
-
nodeObj.attribs = {}; // default
|
|
426
|
-
if (node.attributes && node.attributes.length) {
|
|
427
|
-
nodeObj.attribs = formatAttributes(node.attributes);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
// set the node type
|
|
432
|
-
// e.g., "tag"
|
|
433
|
-
switch (node.nodeType) {
|
|
434
|
-
// 1 = element
|
|
435
|
-
case 1:
|
|
436
|
-
if (nodeObj.name === 'script' || nodeObj.name === 'style') {
|
|
437
|
-
nodeObj.type = nodeObj.name;
|
|
438
|
-
} else {
|
|
439
|
-
nodeObj.type = 'tag';
|
|
440
|
-
}
|
|
441
|
-
// recursively format the children
|
|
442
|
-
nodeObj.children = formatDOM(node.childNodes, nodeObj);
|
|
443
|
-
break;
|
|
444
|
-
// 2 = attribute
|
|
445
|
-
// 3 = text
|
|
446
|
-
case 3:
|
|
447
|
-
nodeObj.type = 'text';
|
|
448
|
-
nodeObj.data = node.nodeValue;
|
|
449
|
-
break;
|
|
450
|
-
// 8 = comment
|
|
451
|
-
case 8:
|
|
452
|
-
nodeObj.type = 'comment';
|
|
453
|
-
nodeObj.data = node.nodeValue;
|
|
454
|
-
break;
|
|
455
|
-
default:
|
|
456
|
-
break;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
result.push(nodeObj);
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
if (directive) {
|
|
463
|
-
result.unshift({
|
|
464
|
-
name: directive.substring(0, directive.indexOf(' ')).toLowerCase(),
|
|
465
|
-
data: directive,
|
|
466
|
-
type: 'directive',
|
|
467
|
-
next: result[0] ? result[0] : null,
|
|
468
|
-
prev: null,
|
|
469
|
-
parent: parentObj
|
|
470
|
-
});
|
|
471
|
-
|
|
472
|
-
if (result[1]) {
|
|
473
|
-
result[1].prev = result[0];
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
109
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
*
|
|
483
|
-
* @param {Number} [version] - The IE version to detect.
|
|
484
|
-
* @return {Boolean} - Whether IE or the version has been detected.
|
|
485
|
-
*/
|
|
486
|
-
function isIE(version) {
|
|
487
|
-
if (version) {
|
|
488
|
-
return document.documentMode === version;
|
|
489
|
-
}
|
|
490
|
-
return /(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent);
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
* Export utilities.
|
|
495
|
-
*/
|
|
496
|
-
module.exports = {
|
|
497
|
-
formatAttributes: formatAttributes,
|
|
498
|
-
formatDOM: formatDOM,
|
|
499
|
-
isIE: isIE
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
/***/ }),
|
|
504
|
-
/* 3 */
|
|
110
|
+
/***/ "./lib/attributes-to-props.js":
|
|
111
|
+
/*!************************************!*\
|
|
112
|
+
!*** ./lib/attributes-to-props.js ***!
|
|
113
|
+
\************************************/
|
|
114
|
+
/*! no static exports found */
|
|
505
115
|
/***/ (function(module, exports, __webpack_require__) {
|
|
506
116
|
|
|
507
|
-
"
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* Module dependencies.
|
|
512
|
-
*/
|
|
513
|
-
var domToReact = __webpack_require__(4);
|
|
514
|
-
var htmlToDOM = __webpack_require__(14);
|
|
515
|
-
|
|
516
|
-
// decode HTML entities by default for `htmlparser2`
|
|
517
|
-
var domParserOptions = { decodeEntities: true, lowerCaseAttributeNames: false };
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* Convert HTML string to React elements.
|
|
521
|
-
*
|
|
522
|
-
* @param {String} html - The HTML string.
|
|
523
|
-
* @param {Object} [options] - The additional options.
|
|
524
|
-
* @param {Function} [options.replace] - The replace method.
|
|
525
|
-
* @return {ReactElement|Array}
|
|
526
|
-
*/
|
|
527
|
-
function HTMLReactParser(html, options) {
|
|
528
|
-
if (typeof html !== 'string') {
|
|
529
|
-
throw new TypeError('First argument must be a string');
|
|
530
|
-
}
|
|
531
|
-
return domToReact(htmlToDOM(html, domParserOptions), options);
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* Export HTML to React parser.
|
|
536
|
-
*/
|
|
537
|
-
module.exports = HTMLReactParser;
|
|
538
|
-
|
|
117
|
+
eval("var DOMProperty = __webpack_require__(/*! react-dom-core/lib/DOMProperty */ \"./node_modules/react-dom-core/lib/DOMProperty.js\");\nvar propertyConfig = __webpack_require__(/*! ./property-config */ \"./lib/property-config.js\");\nvar styleToObject = __webpack_require__(/*! style-to-object */ \"./node_modules/style-to-object/index.js\");\nvar utilities = __webpack_require__(/*! ./utilities */ \"./lib/utilities.js\");\n\nvar config = propertyConfig.config;\nvar isCustomAttribute = propertyConfig.HTMLDOMPropertyConfig.isCustomAttribute;\nDOMProperty.injection.injectDOMPropertyConfig(\n propertyConfig.HTMLDOMPropertyConfig\n);\n\n/**\n * Makes attributes compatible with React props.\n *\n * @param {Object} attributes - The attributes.\n * @return {Object} - The props.\n */\nfunction attributesToProps(attributes) {\n attributes = attributes || {};\n var props = {};\n var propertyName;\n var propertyValue;\n var reactProperty;\n\n for (propertyName in attributes) {\n propertyValue = attributes[propertyName];\n\n // custom attributes (`data-` and `aria-`)\n if (isCustomAttribute(propertyName)) {\n props[propertyName] = propertyValue;\n continue;\n }\n\n // make HTML DOM attribute/property consistent with React attribute/property\n reactProperty = config.html[propertyName.toLowerCase()];\n if (reactProperty) {\n if (\n DOMProperty.properties.hasOwnProperty(reactProperty) &&\n DOMProperty.properties[reactProperty].hasBooleanValue\n ) {\n props[reactProperty] = true;\n } else {\n props[reactProperty] = propertyValue;\n }\n continue;\n }\n\n // make SVG DOM attribute/property consistent with React attribute/property\n reactProperty = config.svg[propertyName];\n if (reactProperty) {\n props[reactProperty] = propertyValue;\n }\n }\n\n // convert inline style to object\n if (attributes.style != null) {\n props.style = cssToJs(attributes.style);\n }\n return props;\n}\n\n/**\n * Converts CSS style string to JS style object.\n *\n * @param {String} style - The CSS style.\n * @return {Object} - The JS style object.\n */\nfunction cssToJs(style) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string.');\n }\n var styleObj = {};\n\n styleToObject(style, function(propName, propValue) {\n // Check if it's not a comment node\n if (propName && propValue) {\n styleObj[utilities.camelCase(propName)] = propValue;\n }\n });\n return styleObj;\n}\n\nmodule.exports = attributesToProps;\n\n\n//# sourceURL=webpack://HTMLReactParser/./lib/attributes-to-props.js?");
|
|
539
118
|
|
|
540
119
|
/***/ }),
|
|
541
|
-
/* 4 */
|
|
542
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
543
|
-
|
|
544
|
-
"use strict";
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
/**
|
|
548
|
-
* Module dependencies.
|
|
549
|
-
*/
|
|
550
|
-
var React = __webpack_require__(5);
|
|
551
|
-
var attributesToProps = __webpack_require__(6);
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* Convert DOM nodes to React elements.
|
|
555
|
-
*
|
|
556
|
-
* @param {Array} nodes - The DOM nodes.
|
|
557
|
-
* @param {Object} [options] - The additional options.
|
|
558
|
-
* @param {Function} [options.replace] - The replace method.
|
|
559
|
-
* @return {ReactElement|Array}
|
|
560
|
-
*/
|
|
561
|
-
function domToReact(nodes, options) {
|
|
562
|
-
options = options || {};
|
|
563
|
-
var result = [];
|
|
564
|
-
var node;
|
|
565
|
-
var isReplacePresent = typeof options.replace === 'function';
|
|
566
|
-
var replacement;
|
|
567
|
-
var props;
|
|
568
|
-
var children;
|
|
569
|
-
|
|
570
|
-
for (var i = 0, len = nodes.length; i < len; i++) {
|
|
571
|
-
node = nodes[i];
|
|
572
|
-
|
|
573
|
-
// replace with custom React element (if applicable)
|
|
574
|
-
if (isReplacePresent) {
|
|
575
|
-
replacement = options.replace(node);
|
|
576
|
-
|
|
577
|
-
if (React.isValidElement(replacement)) {
|
|
578
|
-
// specify a "key" prop if element has siblings
|
|
579
|
-
// https://fb.me/react-warning-keys
|
|
580
|
-
if (len > 1) {
|
|
581
|
-
replacement = React.cloneElement(replacement, { key: i });
|
|
582
|
-
}
|
|
583
|
-
result.push(replacement);
|
|
584
|
-
continue;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
120
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
props = attributesToProps(node.attribs);
|
|
595
|
-
children = null;
|
|
596
|
-
|
|
597
|
-
// node type for <script> is "script"
|
|
598
|
-
// node type for <style> is "style"
|
|
599
|
-
if (node.type === 'script' || node.type === 'style') {
|
|
600
|
-
// prevent text in <script> or <style> from being escaped
|
|
601
|
-
// https://facebook.github.io/react/tips/dangerously-set-inner-html.html
|
|
602
|
-
if (node.children[0]) {
|
|
603
|
-
props.dangerouslySetInnerHTML = {
|
|
604
|
-
__html: node.children[0].data
|
|
605
|
-
};
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
} else if (node.type === 'tag') {
|
|
609
|
-
// setting textarea value in children is an antipattern in React
|
|
610
|
-
// https://facebook.github.io/react/docs/forms.html#why-textarea-value
|
|
611
|
-
if (node.name === 'textarea' && node.children[0]) {
|
|
612
|
-
props.defaultValue = node.children[0].data;
|
|
613
|
-
|
|
614
|
-
// continue recursion of creating React elements (if applicable)
|
|
615
|
-
} else if (node.children && node.children.length) {
|
|
616
|
-
children = domToReact(node.children, options);
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
// skip all other cases (e.g., comment)
|
|
620
|
-
} else {
|
|
621
|
-
continue;
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
// specify a "key" prop if element has siblings
|
|
625
|
-
// https://fb.me/react-warning-keys
|
|
626
|
-
if (len > 1) {
|
|
627
|
-
props.key = i;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
result.push(
|
|
631
|
-
React.createElement(node.name, props, children)
|
|
632
|
-
);
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
if (result.length === 1) {
|
|
636
|
-
return result[0];
|
|
637
|
-
} else {
|
|
638
|
-
return result;
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* Export DOM to React parser.
|
|
644
|
-
*/
|
|
645
|
-
module.exports = domToReact;
|
|
121
|
+
/***/ "./lib/dom-to-react.js":
|
|
122
|
+
/*!*****************************!*\
|
|
123
|
+
!*** ./lib/dom-to-react.js ***!
|
|
124
|
+
\*****************************/
|
|
125
|
+
/*! no static exports found */
|
|
126
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
646
127
|
|
|
128
|
+
eval("var React = __webpack_require__(/*! react */ \"react\");\nvar attributesToProps = __webpack_require__(/*! ./attributes-to-props */ \"./lib/attributes-to-props.js\");\n\n/**\n * Converts DOM nodes to React elements.\n *\n * @param {Array} nodes - The DOM nodes.\n * @param {Object} [options] - The additional options.\n * @param {Function} [options.replace] - The replace method.\n * @return {ReactElement|Array}\n */\nfunction domToReact(nodes, options) {\n options = options || {};\n var result = [];\n var node;\n var isReplacePresent = typeof options.replace === 'function';\n var replacement;\n var props;\n var children;\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n node = nodes[i];\n\n // replace with custom React element (if applicable)\n if (isReplacePresent) {\n replacement = options.replace(node);\n\n if (React.isValidElement(replacement)) {\n // specify a \"key\" prop if element has siblings\n // https://fb.me/react-warning-keys\n if (len > 1) {\n replacement = React.cloneElement(replacement, { key: i });\n }\n result.push(replacement);\n continue;\n }\n }\n\n if (node.type === 'text') {\n result.push(node.data);\n continue;\n }\n\n // update values\n props = attributesToProps(node.attribs);\n children = null;\n\n // node type for <script> is \"script\"\n // node type for <style> is \"style\"\n if (node.type === 'script' || node.type === 'style') {\n // prevent text in <script> or <style> from being escaped\n // https://facebook.github.io/react/tips/dangerously-set-inner-html.html\n if (node.children[0]) {\n props.dangerouslySetInnerHTML = {\n __html: node.children[0].data\n };\n }\n } else if (node.type === 'tag') {\n // setting textarea value in children is an antipattern in React\n // https://reactjs.org/docs/forms.html#the-textarea-tag\n if (node.name === 'textarea' && node.children[0]) {\n props.defaultValue = node.children[0].data;\n\n // continue recursion of creating React elements (if applicable)\n } else if (node.children && node.children.length) {\n children = domToReact(node.children, options);\n }\n\n // skip all other cases (e.g., comment)\n } else {\n continue;\n }\n\n // specify a \"key\" prop if element has siblings\n // https://fb.me/react-warning-keys\n if (len > 1) {\n props.key = i;\n }\n\n result.push(React.createElement(node.name, props, children));\n }\n\n return result.length === 1 ? result[0] : result;\n}\n\nmodule.exports = domToReact;\n\n\n//# sourceURL=webpack://HTMLReactParser/./lib/dom-to-react.js?");
|
|
647
129
|
|
|
648
130
|
/***/ }),
|
|
649
|
-
/* 5 */
|
|
650
|
-
/***/ (function(module, exports) {
|
|
651
131
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
132
|
+
/***/ "./lib/property-config.js":
|
|
133
|
+
/*!********************************!*\
|
|
134
|
+
!*** ./lib/property-config.js ***!
|
|
135
|
+
\********************************/
|
|
136
|
+
/*! no static exports found */
|
|
656
137
|
/***/ (function(module, exports, __webpack_require__) {
|
|
657
138
|
|
|
658
|
-
"
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Module dependencies.
|
|
663
|
-
*/
|
|
664
|
-
var utilities = __webpack_require__(0);
|
|
665
|
-
var propertyConfig = __webpack_require__(7);
|
|
666
|
-
var styleToObject = __webpack_require__(12);
|
|
667
|
-
var config = propertyConfig.config;
|
|
668
|
-
var isCustomAttribute = propertyConfig.HTMLDOMPropertyConfig.isCustomAttribute;
|
|
669
|
-
|
|
670
|
-
var DOMProperty = __webpack_require__(1);
|
|
671
|
-
DOMProperty.injection.injectDOMPropertyConfig(propertyConfig.HTMLDOMPropertyConfig);
|
|
672
|
-
|
|
673
|
-
/**
|
|
674
|
-
* Make attributes compatible with React props.
|
|
675
|
-
*
|
|
676
|
-
* @param {Object} attributes - The attributes.
|
|
677
|
-
* @return {Object} - The props.
|
|
678
|
-
*/
|
|
679
|
-
function attributesToProps(attributes) {
|
|
680
|
-
attributes = attributes || {};
|
|
681
|
-
var props = {};
|
|
682
|
-
var propertyName;
|
|
683
|
-
var propertyValue;
|
|
684
|
-
var reactProperty;
|
|
685
|
-
|
|
686
|
-
for (propertyName in attributes) {
|
|
687
|
-
propertyValue = attributes[propertyName];
|
|
688
|
-
|
|
689
|
-
// custom attributes (`data-` and `aria-`)
|
|
690
|
-
if (isCustomAttribute(propertyName)) {
|
|
691
|
-
props[propertyName] = propertyValue;
|
|
692
|
-
continue;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
// make HTML DOM attribute/property consistent with React attribute/property
|
|
696
|
-
reactProperty = config.html[propertyName.toLowerCase()];
|
|
697
|
-
if (reactProperty) {
|
|
698
|
-
if (DOMProperty.properties.hasOwnProperty(reactProperty) && DOMProperty.properties[reactProperty].hasBooleanValue) {
|
|
699
|
-
props[reactProperty] = true;
|
|
700
|
-
} else {
|
|
701
|
-
props[reactProperty] = propertyValue;
|
|
702
|
-
}
|
|
703
|
-
continue;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
// make SVG DOM attribute/property consistent with React attribute/property
|
|
707
|
-
reactProperty = config.svg[propertyName];
|
|
708
|
-
if (reactProperty) {
|
|
709
|
-
props[reactProperty] = propertyValue;
|
|
710
|
-
}
|
|
711
|
-
}
|
|
139
|
+
eval("var HTMLDOMPropertyConfig = __webpack_require__(/*! react-dom-core/lib/HTMLDOMPropertyConfig */ \"./node_modules/react-dom-core/lib/HTMLDOMPropertyConfig.js\");\nvar SVGDOMPropertyConfig = __webpack_require__(/*! react-dom-core/lib/SVGDOMPropertyConfig */ \"./node_modules/react-dom-core/lib/SVGDOMPropertyConfig.js\");\nvar utilities = __webpack_require__(/*! ./utilities */ \"./lib/utilities.js\");\n\nvar config = {\n html: {},\n svg: {}\n};\n\nvar propertyName;\n\n/**\n * HTML DOM property config.\n *\n * https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/HTMLDOMPropertyConfig.js\n */\n\n// first map out the HTML attribute names\n// e.g., { className: 'class' } => { 'class': 'className' }\nconfig.html = utilities.invertObject(HTMLDOMPropertyConfig.DOMAttributeNames);\n\n// then map out the rest of the HTML properties\n// e.g., { readOnly: 0 } => { readonly: 'readOnly' }\nfor (propertyName in HTMLDOMPropertyConfig.Properties) {\n // lowercase to make matching property names easier\n config.html[propertyName.toLowerCase()] = propertyName;\n}\n\n/**\n * SVG DOM property config.\n *\n * https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/SVGDOMPropertyConfig.js\n */\n\n// first map out the SVG attribute names\n// e.g., { fontSize: 'font-size' } => { 'font-size': 'fontSize' }\nconfig.svg = utilities.invertObject(SVGDOMPropertyConfig.DOMAttributeNames);\n\n// then map out the rest of the SVG properties\n// e.g., { fillRule: 0 } => { fillRule: 'fillRule' }\nfor (propertyName in SVGDOMPropertyConfig.Properties) {\n // do not lowercase as some svg properties are camel cased\n config.html[propertyName] = propertyName;\n}\n\nmodule.exports = {\n config: config,\n HTMLDOMPropertyConfig: HTMLDOMPropertyConfig,\n SVGDOMPropertyConfig: SVGDOMPropertyConfig\n};\n\n\n//# sourceURL=webpack://HTMLReactParser/./lib/property-config.js?");
|
|
712
140
|
|
|
713
|
-
|
|
714
|
-
if (attributes.style != null) {
|
|
715
|
-
props.style = cssToJs(attributes.style);
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
return props;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
* Convert CSS style string to JS style object.
|
|
723
|
-
*
|
|
724
|
-
* @param {String} style - The CSS style.
|
|
725
|
-
* @return {Object} - The JS style object.
|
|
726
|
-
*/
|
|
727
|
-
function cssToJs(style) {
|
|
728
|
-
if (typeof style !== 'string') {
|
|
729
|
-
throw new Error('`cssToJs`: first argument must be a string. ');
|
|
730
|
-
}
|
|
141
|
+
/***/ }),
|
|
731
142
|
|
|
732
|
-
|
|
143
|
+
/***/ "./lib/utilities.js":
|
|
144
|
+
/*!**************************!*\
|
|
145
|
+
!*** ./lib/utilities.js ***!
|
|
146
|
+
\**************************/
|
|
147
|
+
/*! no static exports found */
|
|
148
|
+
/***/ (function(module, exports) {
|
|
733
149
|
|
|
734
|
-
|
|
735
|
-
// Check if it's not a comment node
|
|
736
|
-
if (propName && propValue) {
|
|
737
|
-
styleObj[utilities.camelCase(propName)] = propValue;
|
|
738
|
-
}
|
|
739
|
-
});
|
|
150
|
+
eval("var hyphenPatternRegex = /-([a-z])/g;\n\n/**\n * Converts a string to camelCase.\n *\n * @param {String} string - The string.\n * @return {String}\n */\nfunction camelCase(string) {\n if (typeof string !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n // no hyphen found\n if (string.indexOf('-') === -1) {\n return string;\n }\n\n // convert to camelCase\n return string\n .toLowerCase()\n .replace(hyphenPatternRegex, function(_, character) {\n return character.toUpperCase();\n });\n}\n\n/**\n * Swap key with value in an object.\n *\n * @param {Object} obj - The object.\n * @param {Function} [override] - The override method.\n * @return {Object} - The inverted object.\n */\nfunction invertObject(obj, override) {\n if (!obj || typeof obj !== 'object') {\n throw new TypeError('First argument must be an object');\n }\n\n var key;\n var value;\n var isOverridePresent = typeof override === 'function';\n var overrides = {};\n var result = {};\n\n for (key in obj) {\n value = obj[key];\n\n if (isOverridePresent) {\n overrides = override(key, value);\n if (overrides && overrides.length === 2) {\n result[overrides[0]] = overrides[1];\n continue;\n }\n }\n\n if (typeof value === 'string') {\n result[value] = key;\n }\n }\n\n return result;\n}\n\nmodule.exports = {\n camelCase: camelCase,\n invertObject: invertObject\n};\n\n\n//# sourceURL=webpack://HTMLReactParser/./lib/utilities.js?");
|
|
740
151
|
|
|
741
|
-
|
|
742
|
-
}
|
|
152
|
+
/***/ }),
|
|
743
153
|
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
154
|
+
/***/ "./node_modules/css/lib/parse/index.js":
|
|
155
|
+
/*!*********************************************!*\
|
|
156
|
+
!*** ./node_modules/css/lib/parse/index.js ***!
|
|
157
|
+
\*********************************************/
|
|
158
|
+
/*! no static exports found */
|
|
159
|
+
/***/ (function(module, exports) {
|
|
748
160
|
|
|
161
|
+
eval("// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar commentre = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g\n\nmodule.exports = function(css, options){\n options = options || {};\n\n /**\n * Positional.\n */\n\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n */\n\n function updatePosition(str) {\n var lines = str.match(/\\n/g);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf('\\n');\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n */\n\n function position() {\n var start = { line: lineno, column: column };\n return function(node){\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node\n */\n\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string\n */\n\n Position.prototype.content = css;\n\n /**\n * Error `msg`.\n */\n\n var errorsList = [];\n\n function error(msg) {\n var err = new Error(options.source + ':' + lineno + ':' + column + ': ' + msg);\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = css;\n\n if (options.silent) {\n errorsList.push(err);\n } else {\n throw err;\n }\n }\n\n /**\n * Parse stylesheet.\n */\n\n function stylesheet() {\n var rulesList = rules();\n\n return {\n type: 'stylesheet',\n stylesheet: {\n source: options.source,\n rules: rulesList,\n parsingErrors: errorsList\n }\n };\n }\n\n /**\n * Opening brace.\n */\n\n function open() {\n return match(/^{\\s*/);\n }\n\n /**\n * Closing brace.\n */\n\n function close() {\n return match(/^}/);\n }\n\n /**\n * Parse ruleset.\n */\n\n function rules() {\n var node;\n var rules = [];\n whitespace();\n comments(rules);\n while (css.length && css.charAt(0) != '}' && (node = atrule() || rule())) {\n if (node !== false) {\n rules.push(node);\n comments(rules);\n }\n }\n return rules;\n }\n\n /**\n * Match `re` and return captures.\n */\n\n function match(re) {\n var m = re.exec(css);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n css = css.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n\n function whitespace() {\n match(/^\\s*/);\n }\n\n /**\n * Parse comments;\n */\n\n function comments(rules) {\n var c;\n rules = rules || [];\n while (c = comment()) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n */\n\n function comment() {\n var pos = position();\n if ('/' != css.charAt(0) || '*' != css.charAt(1)) return;\n\n var i = 2;\n while (\"\" != css.charAt(i) && ('*' != css.charAt(i) || '/' != css.charAt(i + 1))) ++i;\n i += 2;\n\n if (\"\" === css.charAt(i-1)) {\n return error('End of comment missing');\n }\n\n var str = css.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n css = css.slice(i);\n column += 2;\n\n return pos({\n type: 'comment',\n comment: str\n });\n }\n\n /**\n * Parse selector.\n */\n\n function selector() {\n var m = match(/^([^{]+)/);\n if (!m) return;\n /* @fix Remove all comments from selectors\n * http://ostermiller.org/findcomment.html */\n return trim(m[0])\n .replace(/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*\\/+/g, '')\n .replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, function(m) {\n return m.replace(/,/g, '\\u200C');\n })\n .split(/\\s*(?![^(]*\\)),\\s*/)\n .map(function(s) {\n return s.replace(/\\u200C/g, ',');\n });\n }\n\n /**\n * Parse declaration.\n */\n\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(/^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);\n if (!prop) return;\n prop = trim(prop[0]);\n\n // :\n if (!match(/^:\\s*/)) return error(\"property missing ':'\");\n\n // val\n var val = match(/^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)/);\n\n var ret = pos({\n type: 'declaration',\n property: prop.replace(commentre, ''),\n value: val ? trim(val[0]).replace(commentre, '') : ''\n });\n\n // ;\n match(/^[;\\s]*/);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n */\n\n function declarations() {\n var decls = [];\n\n if (!open()) return error(\"missing '{'\");\n comments(decls);\n\n // declarations\n var decl;\n while (decl = declaration()) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n if (!close()) return error(\"missing '}'\");\n return decls;\n }\n\n /**\n * Parse keyframe.\n */\n\n function keyframe() {\n var m;\n var vals = [];\n var pos = position();\n\n while (m = match(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/)) {\n vals.push(m[1]);\n match(/^,\\s*/);\n }\n\n if (!vals.length) return;\n\n return pos({\n type: 'keyframe',\n values: vals,\n declarations: declarations()\n });\n }\n\n /**\n * Parse keyframes.\n */\n\n function atkeyframes() {\n var pos = position();\n var m = match(/^@([-\\w]+)?keyframes\\s*/);\n\n if (!m) return;\n var vendor = m[1];\n\n // identifier\n var m = match(/^([-\\w]+)\\s*/);\n if (!m) return error(\"@keyframes missing name\");\n var name = m[1];\n\n if (!open()) return error(\"@keyframes missing '{'\");\n\n var frame;\n var frames = comments();\n while (frame = keyframe()) {\n frames.push(frame);\n frames = frames.concat(comments());\n }\n\n if (!close()) return error(\"@keyframes missing '}'\");\n\n return pos({\n type: 'keyframes',\n name: name,\n vendor: vendor,\n keyframes: frames\n });\n }\n\n /**\n * Parse supports.\n */\n\n function atsupports() {\n var pos = position();\n var m = match(/^@supports *([^{]+)/);\n\n if (!m) return;\n var supports = trim(m[1]);\n\n if (!open()) return error(\"@supports missing '{'\");\n\n var style = comments().concat(rules());\n\n if (!close()) return error(\"@supports missing '}'\");\n\n return pos({\n type: 'supports',\n supports: supports,\n rules: style\n });\n }\n\n /**\n * Parse host.\n */\n\n function athost() {\n var pos = position();\n var m = match(/^@host\\s*/);\n\n if (!m) return;\n\n if (!open()) return error(\"@host missing '{'\");\n\n var style = comments().concat(rules());\n\n if (!close()) return error(\"@host missing '}'\");\n\n return pos({\n type: 'host',\n rules: style\n });\n }\n\n /**\n * Parse media.\n */\n\n function atmedia() {\n var pos = position();\n var m = match(/^@media *([^{]+)/);\n\n if (!m) return;\n var media = trim(m[1]);\n\n if (!open()) return error(\"@media missing '{'\");\n\n var style = comments().concat(rules());\n\n if (!close()) return error(\"@media missing '}'\");\n\n return pos({\n type: 'media',\n media: media,\n rules: style\n });\n }\n\n\n /**\n * Parse custom-media.\n */\n\n function atcustommedia() {\n var pos = position();\n var m = match(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);\n if (!m) return;\n\n return pos({\n type: 'custom-media',\n name: trim(m[1]),\n media: trim(m[2])\n });\n }\n\n /**\n * Parse paged media.\n */\n\n function atpage() {\n var pos = position();\n var m = match(/^@page */);\n if (!m) return;\n\n var sel = selector() || [];\n\n if (!open()) return error(\"@page missing '{'\");\n var decls = comments();\n\n // declarations\n var decl;\n while (decl = declaration()) {\n decls.push(decl);\n decls = decls.concat(comments());\n }\n\n if (!close()) return error(\"@page missing '}'\");\n\n return pos({\n type: 'page',\n selectors: sel,\n declarations: decls\n });\n }\n\n /**\n * Parse document.\n */\n\n function atdocument() {\n var pos = position();\n var m = match(/^@([-\\w]+)?document *([^{]+)/);\n if (!m) return;\n\n var vendor = trim(m[1]);\n var doc = trim(m[2]);\n\n if (!open()) return error(\"@document missing '{'\");\n\n var style = comments().concat(rules());\n\n if (!close()) return error(\"@document missing '}'\");\n\n return pos({\n type: 'document',\n document: doc,\n vendor: vendor,\n rules: style\n });\n }\n\n /**\n * Parse font-face.\n */\n\n function atfontface() {\n var pos = position();\n var m = match(/^@font-face\\s*/);\n if (!m) return;\n\n if (!open()) return error(\"@font-face missing '{'\");\n var decls = comments();\n\n // declarations\n var decl;\n while (decl = declaration()) {\n decls.push(decl);\n decls = decls.concat(comments());\n }\n\n if (!close()) return error(\"@font-face missing '}'\");\n\n return pos({\n type: 'font-face',\n declarations: decls\n });\n }\n\n /**\n * Parse import\n */\n\n var atimport = _compileAtrule('import');\n\n /**\n * Parse charset\n */\n\n var atcharset = _compileAtrule('charset');\n\n /**\n * Parse namespace\n */\n\n var atnamespace = _compileAtrule('namespace');\n\n /**\n * Parse non-block at-rules\n */\n\n\n function _compileAtrule(name) {\n var re = new RegExp('^@' + name + '\\\\s*([^;]+);');\n return function() {\n var pos = position();\n var m = match(re);\n if (!m) return;\n var ret = { type: name };\n ret[name] = m[1].trim();\n return pos(ret);\n }\n }\n\n /**\n * Parse at rule.\n */\n\n function atrule() {\n if (css[0] != '@') return;\n\n return atkeyframes()\n || atmedia()\n || atcustommedia()\n || atsupports()\n || atimport()\n || atcharset()\n || atnamespace()\n || atdocument()\n || atpage()\n || athost()\n || atfontface();\n }\n\n /**\n * Parse rule.\n */\n\n function rule() {\n var pos = position();\n var sel = selector();\n\n if (!sel) return error('selector missing');\n comments();\n\n return pos({\n type: 'rule',\n selectors: sel,\n declarations: declarations()\n });\n }\n\n return addParent(stylesheet());\n};\n\n/**\n * Trim `str`.\n */\n\nfunction trim(str) {\n return str ? str.replace(/^\\s+|\\s+$/g, '') : '';\n}\n\n/**\n * Adds non-enumerable parent node reference to each node.\n */\n\nfunction addParent(obj, parent) {\n var isNode = obj && typeof obj.type === 'string';\n var childParent = isNode ? obj : parent;\n\n for (var k in obj) {\n var value = obj[k];\n if (Array.isArray(value)) {\n value.forEach(function(v) { addParent(v, childParent); });\n } else if (value && typeof value === 'object') {\n addParent(value, childParent);\n }\n }\n\n if (isNode) {\n Object.defineProperty(obj, 'parent', {\n configurable: true,\n writable: true,\n enumerable: false,\n value: parent || null\n });\n }\n\n return obj;\n}\n\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/css/lib/parse/index.js?");
|
|
749
162
|
|
|
750
163
|
/***/ }),
|
|
751
|
-
|
|
164
|
+
|
|
165
|
+
/***/ "./node_modules/fbjs/lib/invariant.js":
|
|
166
|
+
/*!********************************************!*\
|
|
167
|
+
!*** ./node_modules/fbjs/lib/invariant.js ***!
|
|
168
|
+
\********************************************/
|
|
169
|
+
/*! no static exports found */
|
|
752
170
|
/***/ (function(module, exports, __webpack_require__) {
|
|
753
171
|
|
|
754
172
|
"use strict";
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
/**
|
|
758
|
-
* Module dependencies.
|
|
759
|
-
*/
|
|
760
|
-
var utilities = __webpack_require__(0);
|
|
761
|
-
|
|
762
|
-
// HTML and SVG DOM Property Configs
|
|
763
|
-
var HTMLDOMPropertyConfig = __webpack_require__(8);
|
|
764
|
-
var SVGDOMPropertyConfig = __webpack_require__(11);
|
|
765
|
-
|
|
766
|
-
var config = {
|
|
767
|
-
html: {},
|
|
768
|
-
svg: {}
|
|
769
|
-
};
|
|
770
|
-
|
|
771
|
-
var propertyName;
|
|
772
|
-
|
|
773
|
-
/**
|
|
774
|
-
* HTML DOM property config.
|
|
775
|
-
* https://github.com/facebook/react/blob/master/src/renderers/dom/shared/HTMLDOMPropertyConfig.js
|
|
776
|
-
*/
|
|
777
|
-
|
|
778
|
-
// first map out the HTML attribute names
|
|
779
|
-
// e.g., { className: 'class' } => { 'class': 'className' }
|
|
780
|
-
config.html = utilities.invertObject(
|
|
781
|
-
HTMLDOMPropertyConfig.DOMAttributeNames
|
|
782
|
-
);
|
|
783
|
-
|
|
784
|
-
// then map out the rest of the HTML properties
|
|
785
|
-
// e.g., { readOnly: 0 } => { readonly: 'readOnly' }
|
|
786
|
-
for (propertyName in HTMLDOMPropertyConfig.Properties) {
|
|
787
|
-
// lowercase to make matching property names easier
|
|
788
|
-
config.html[propertyName.toLowerCase()] = propertyName;
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
/**
|
|
792
|
-
* SVG DOM property config.
|
|
793
|
-
* https://github.com/facebook/react/blob/master/src/renderers/dom/shared/SVGDOMPropertyConfig.js
|
|
794
|
-
*/
|
|
795
|
-
|
|
796
|
-
// first map out the SVG attribute names
|
|
797
|
-
// e.g., { fontSize: 'font-size' } => { 'font-size': 'fontSize' }
|
|
798
|
-
config.svg = utilities.invertObject(
|
|
799
|
-
SVGDOMPropertyConfig.DOMAttributeNames
|
|
800
|
-
);
|
|
801
|
-
|
|
802
|
-
// then map out the rest of the SVG properties
|
|
803
|
-
// e.g., { fillRule: 0 } => { fillRule: 'fillRule' }
|
|
804
|
-
for (propertyName in SVGDOMPropertyConfig.Properties) {
|
|
805
|
-
// do not lowercase as some svg properties are camel cased
|
|
806
|
-
config.html[propertyName] = propertyName;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
* Export property configs.
|
|
811
|
-
*/
|
|
812
|
-
module.exports = {
|
|
813
|
-
config: config,
|
|
814
|
-
HTMLDOMPropertyConfig: HTMLDOMPropertyConfig,
|
|
815
|
-
SVGDOMPropertyConfig: SVGDOMPropertyConfig
|
|
816
|
-
};
|
|
817
|
-
|
|
173
|
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (true) {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/fbjs/lib/invariant.js?");
|
|
818
174
|
|
|
819
175
|
/***/ }),
|
|
820
|
-
|
|
176
|
+
|
|
177
|
+
/***/ "./node_modules/html-dom-parser/lib/domparser.js":
|
|
178
|
+
/*!*******************************************************!*\
|
|
179
|
+
!*** ./node_modules/html-dom-parser/lib/domparser.js ***!
|
|
180
|
+
\*******************************************************/
|
|
181
|
+
/*! no static exports found */
|
|
821
182
|
/***/ (function(module, exports, __webpack_require__) {
|
|
822
183
|
|
|
823
184
|
"use strict";
|
|
824
|
-
/**
|
|
825
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
826
|
-
*
|
|
827
|
-
* This source code is licensed under the MIT license found in the
|
|
828
|
-
* LICENSE file in the root directory of this source tree.
|
|
829
|
-
*
|
|
830
|
-
*/
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
var DOMProperty = __webpack_require__(1);
|
|
835
|
-
|
|
836
|
-
var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
|
|
837
|
-
var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
|
|
838
|
-
var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
|
|
839
|
-
var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
|
|
840
|
-
var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
|
|
841
|
-
|
|
842
|
-
var HTMLDOMPropertyConfig = {
|
|
843
|
-
isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
|
|
844
|
-
Properties: {
|
|
845
|
-
/**
|
|
846
|
-
* Standard Properties
|
|
847
|
-
*/
|
|
848
|
-
accept: 0,
|
|
849
|
-
acceptCharset: 0,
|
|
850
|
-
accessKey: 0,
|
|
851
|
-
action: 0,
|
|
852
|
-
allowFullScreen: HAS_BOOLEAN_VALUE,
|
|
853
|
-
allowTransparency: 0,
|
|
854
|
-
alt: 0,
|
|
855
|
-
// specifies target context for links with `preload` type
|
|
856
|
-
as: 0,
|
|
857
|
-
async: HAS_BOOLEAN_VALUE,
|
|
858
|
-
autoComplete: 0,
|
|
859
|
-
// autoFocus is polyfilled/normalized by AutoFocusUtils
|
|
860
|
-
// autoFocus: HAS_BOOLEAN_VALUE,
|
|
861
|
-
autoPlay: HAS_BOOLEAN_VALUE,
|
|
862
|
-
capture: HAS_BOOLEAN_VALUE,
|
|
863
|
-
cellPadding: 0,
|
|
864
|
-
cellSpacing: 0,
|
|
865
|
-
charSet: 0,
|
|
866
|
-
challenge: 0,
|
|
867
|
-
checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
868
|
-
cite: 0,
|
|
869
|
-
classID: 0,
|
|
870
|
-
className: 0,
|
|
871
|
-
cols: HAS_POSITIVE_NUMERIC_VALUE,
|
|
872
|
-
colSpan: 0,
|
|
873
|
-
content: 0,
|
|
874
|
-
contentEditable: 0,
|
|
875
|
-
contextMenu: 0,
|
|
876
|
-
controls: HAS_BOOLEAN_VALUE,
|
|
877
|
-
controlsList: 0,
|
|
878
|
-
coords: 0,
|
|
879
|
-
crossOrigin: 0,
|
|
880
|
-
data: 0, // For `<object />` acts as `src`.
|
|
881
|
-
dateTime: 0,
|
|
882
|
-
'default': HAS_BOOLEAN_VALUE,
|
|
883
|
-
defer: HAS_BOOLEAN_VALUE,
|
|
884
|
-
dir: 0,
|
|
885
|
-
disabled: HAS_BOOLEAN_VALUE,
|
|
886
|
-
download: HAS_OVERLOADED_BOOLEAN_VALUE,
|
|
887
|
-
draggable: 0,
|
|
888
|
-
encType: 0,
|
|
889
|
-
form: 0,
|
|
890
|
-
formAction: 0,
|
|
891
|
-
formEncType: 0,
|
|
892
|
-
formMethod: 0,
|
|
893
|
-
formNoValidate: HAS_BOOLEAN_VALUE,
|
|
894
|
-
formTarget: 0,
|
|
895
|
-
frameBorder: 0,
|
|
896
|
-
headers: 0,
|
|
897
|
-
height: 0,
|
|
898
|
-
hidden: HAS_BOOLEAN_VALUE,
|
|
899
|
-
high: 0,
|
|
900
|
-
href: 0,
|
|
901
|
-
hrefLang: 0,
|
|
902
|
-
htmlFor: 0,
|
|
903
|
-
httpEquiv: 0,
|
|
904
|
-
icon: 0,
|
|
905
|
-
id: 0,
|
|
906
|
-
inputMode: 0,
|
|
907
|
-
integrity: 0,
|
|
908
|
-
is: 0,
|
|
909
|
-
keyParams: 0,
|
|
910
|
-
keyType: 0,
|
|
911
|
-
kind: 0,
|
|
912
|
-
label: 0,
|
|
913
|
-
lang: 0,
|
|
914
|
-
list: 0,
|
|
915
|
-
loop: HAS_BOOLEAN_VALUE,
|
|
916
|
-
low: 0,
|
|
917
|
-
manifest: 0,
|
|
918
|
-
marginHeight: 0,
|
|
919
|
-
marginWidth: 0,
|
|
920
|
-
max: 0,
|
|
921
|
-
maxLength: 0,
|
|
922
|
-
media: 0,
|
|
923
|
-
mediaGroup: 0,
|
|
924
|
-
method: 0,
|
|
925
|
-
min: 0,
|
|
926
|
-
minLength: 0,
|
|
927
|
-
// Caution; `option.selected` is not updated if `select.multiple` is
|
|
928
|
-
// disabled with `removeAttribute`.
|
|
929
|
-
multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
930
|
-
muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
931
|
-
name: 0,
|
|
932
|
-
nonce: 0,
|
|
933
|
-
noValidate: HAS_BOOLEAN_VALUE,
|
|
934
|
-
open: HAS_BOOLEAN_VALUE,
|
|
935
|
-
optimum: 0,
|
|
936
|
-
pattern: 0,
|
|
937
|
-
placeholder: 0,
|
|
938
|
-
playsInline: HAS_BOOLEAN_VALUE,
|
|
939
|
-
poster: 0,
|
|
940
|
-
preload: 0,
|
|
941
|
-
profile: 0,
|
|
942
|
-
radioGroup: 0,
|
|
943
|
-
readOnly: HAS_BOOLEAN_VALUE,
|
|
944
|
-
referrerPolicy: 0,
|
|
945
|
-
rel: 0,
|
|
946
|
-
required: HAS_BOOLEAN_VALUE,
|
|
947
|
-
reversed: HAS_BOOLEAN_VALUE,
|
|
948
|
-
role: 0,
|
|
949
|
-
rows: HAS_POSITIVE_NUMERIC_VALUE,
|
|
950
|
-
rowSpan: HAS_NUMERIC_VALUE,
|
|
951
|
-
sandbox: 0,
|
|
952
|
-
scope: 0,
|
|
953
|
-
scoped: HAS_BOOLEAN_VALUE,
|
|
954
|
-
scrolling: 0,
|
|
955
|
-
seamless: HAS_BOOLEAN_VALUE,
|
|
956
|
-
selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
957
|
-
shape: 0,
|
|
958
|
-
size: HAS_POSITIVE_NUMERIC_VALUE,
|
|
959
|
-
sizes: 0,
|
|
960
|
-
span: HAS_POSITIVE_NUMERIC_VALUE,
|
|
961
|
-
spellCheck: 0,
|
|
962
|
-
src: 0,
|
|
963
|
-
srcDoc: 0,
|
|
964
|
-
srcLang: 0,
|
|
965
|
-
srcSet: 0,
|
|
966
|
-
start: HAS_NUMERIC_VALUE,
|
|
967
|
-
step: 0,
|
|
968
|
-
style: 0,
|
|
969
|
-
summary: 0,
|
|
970
|
-
tabIndex: 0,
|
|
971
|
-
target: 0,
|
|
972
|
-
title: 0,
|
|
973
|
-
// Setting .type throws on non-<input> tags
|
|
974
|
-
type: 0,
|
|
975
|
-
useMap: 0,
|
|
976
|
-
value: 0,
|
|
977
|
-
width: 0,
|
|
978
|
-
wmode: 0,
|
|
979
|
-
wrap: 0,
|
|
980
|
-
|
|
981
|
-
/**
|
|
982
|
-
* RDFa Properties
|
|
983
|
-
*/
|
|
984
|
-
about: 0,
|
|
985
|
-
datatype: 0,
|
|
986
|
-
inlist: 0,
|
|
987
|
-
prefix: 0,
|
|
988
|
-
// property is also supported for OpenGraph in meta tags.
|
|
989
|
-
property: 0,
|
|
990
|
-
resource: 0,
|
|
991
|
-
'typeof': 0,
|
|
992
|
-
vocab: 0,
|
|
993
|
-
|
|
994
|
-
/**
|
|
995
|
-
* Non-standard Properties
|
|
996
|
-
*/
|
|
997
|
-
// autoCapitalize and autoCorrect are supported in Mobile Safari for
|
|
998
|
-
// keyboard hints.
|
|
999
|
-
autoCapitalize: 0,
|
|
1000
|
-
autoCorrect: 0,
|
|
1001
|
-
// autoSave allows WebKit/Blink to persist values of input fields on page reloads
|
|
1002
|
-
autoSave: 0,
|
|
1003
|
-
// color is for Safari mask-icon link
|
|
1004
|
-
color: 0,
|
|
1005
|
-
// itemProp, itemScope, itemType are for
|
|
1006
|
-
// Microdata support. See http://schema.org/docs/gs.html
|
|
1007
|
-
itemProp: 0,
|
|
1008
|
-
itemScope: HAS_BOOLEAN_VALUE,
|
|
1009
|
-
itemType: 0,
|
|
1010
|
-
// itemID and itemRef are for Microdata support as well but
|
|
1011
|
-
// only specified in the WHATWG spec document. See
|
|
1012
|
-
// https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
|
|
1013
|
-
itemID: 0,
|
|
1014
|
-
itemRef: 0,
|
|
1015
|
-
// results show looking glass icon and recent searches on input
|
|
1016
|
-
// search fields in WebKit/Blink
|
|
1017
|
-
results: 0,
|
|
1018
|
-
// IE-only attribute that specifies security restrictions on an iframe
|
|
1019
|
-
// as an alternative to the sandbox attribute on IE<10
|
|
1020
|
-
security: 0,
|
|
1021
|
-
// IE-only attribute that controls focus behavior
|
|
1022
|
-
unselectable: 0
|
|
1023
|
-
},
|
|
1024
|
-
DOMAttributeNames: {
|
|
1025
|
-
acceptCharset: 'accept-charset',
|
|
1026
|
-
className: 'class',
|
|
1027
|
-
htmlFor: 'for',
|
|
1028
|
-
httpEquiv: 'http-equiv'
|
|
1029
|
-
},
|
|
1030
|
-
DOMPropertyNames: {},
|
|
1031
|
-
DOMMutationMethods: {
|
|
1032
|
-
value: function (node, value) {
|
|
1033
|
-
if (value == null) {
|
|
1034
|
-
return node.removeAttribute('value');
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
// Number inputs get special treatment due to some edge cases in
|
|
1038
|
-
// Chrome. Let everything else assign the value attribute as normal.
|
|
1039
|
-
// https://github.com/facebook/react/issues/7253#issuecomment-236074326
|
|
1040
|
-
if (node.type !== 'number' || node.hasAttribute('value') === false) {
|
|
1041
|
-
node.setAttribute('value', '' + value);
|
|
1042
|
-
} else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {
|
|
1043
|
-
// Don't assign an attribute if validation reports bad
|
|
1044
|
-
// input. Chrome will clear the value. Additionally, don't
|
|
1045
|
-
// operate on inputs that have focus, otherwise Chrome might
|
|
1046
|
-
// strip off trailing decimal places and cause the user's
|
|
1047
|
-
// cursor position to jump to the beginning of the input.
|
|
1048
|
-
//
|
|
1049
|
-
// In ReactDOMInput, we have an onBlur event that will trigger
|
|
1050
|
-
// this function again when focus is lost.
|
|
1051
|
-
node.setAttribute('value', '' + value);
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
};
|
|
1056
|
-
|
|
1057
|
-
module.exports = HTMLDOMPropertyConfig;
|
|
185
|
+
eval("\n\n/**\n * Module dependencies.\n */\nvar utilities = __webpack_require__(/*! ./utilities */ \"./node_modules/html-dom-parser/lib/utilities.js\");\nvar detectIE = utilities.isIE;\n\n/**\n * Constants.\n */\nvar HTML_TAG_NAME = 'html';\nvar BODY_TAG_NAME = 'body';\nvar HEAD_TAG_NAME = 'head';\nvar FIRST_TAG_REGEX = /<([a-zA-Z]+[0-9]?)/; // e.g., <h1>\nvar HEAD_REGEX = /<\\/head>/i;\nvar BODY_REGEX = /<\\/body>/i;\n// http://www.w3.org/TR/html/syntax.html#void-elements\nvar VOID_ELEMENTS_REGEX = /<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\\/?>/gi;\n\n// browser support\nvar isIE = detectIE();\nvar isIE9 = detectIE(9);\n\n/**\n * DOMParser (performance: slow).\n *\n * https://developer.mozilla.org/docs/Web/API/DOMParser#Parsing_an_SVG_or_HTML_document\n */\nvar parseFromString;\nif (typeof window.DOMParser === 'function') {\n var domParser = new window.DOMParser();\n // IE9 does not support 'text/html' MIME type\n // https://msdn.microsoft.com/en-us/library/ff975278(v=vs.85).aspx\n var MIME_TYPE = isIE9 ? 'text/xml' : 'text/html';\n\n /**\n * Creates an HTML document using `DOMParser.parseFromString`.\n *\n * @param {String} html - The HTML string.\n * @param {String} [tagName] - The element to render the HTML (with 'body' as fallback).\n * @return {HTMLDocument}\n */\n parseFromString = function domStringParser(html, tagName) {\n if (tagName) {\n html = ['<', tagName, '>', html, '</', tagName, '>'].join('');\n }\n // because IE9 only supports MIME type 'text/xml', void elements need to be self-closed\n if (isIE9) {\n html = html.replace(VOID_ELEMENTS_REGEX, '<$1$2$3/>');\n }\n return domParser.parseFromString(html, MIME_TYPE);\n };\n}\n\n/**\n * DOMImplementation (performance: fair).\n *\n * https://developer.mozilla.org/docs/Web/API/DOMImplementation/createHTMLDocument\n */\nvar parseFromDocument;\nif (typeof document.implementation === 'object') {\n // title parameter is required in IE\n // https://msdn.microsoft.com/en-us/library/ff975457(v=vs.85).aspx\n var doc = document.implementation.createHTMLDocument(isIE ? 'HTML_DOM_PARSER_TITLE' : undefined);\n\n /**\n * Use HTML document created by `document.implementation.createHTMLDocument`.\n *\n * @param {String} html - The HTML string.\n * @param {String} [tagName] - The element to render the HTML (with 'body' as fallback).\n * @return {HTMLDocument}\n */\n parseFromDocument = function createHTMLDocument(html, tagName) {\n if (tagName) {\n doc.documentElement.getElementsByTagName(tagName)[0].innerHTML = html;\n return doc;\n }\n\n try {\n doc.documentElement.innerHTML = html;\n return doc;\n // fallback when certain elements in `documentElement` are read-only (IE9)\n } catch (err) {\n if (parseFromString) return parseFromString(html);\n }\n };\n}\n\n/**\n * Template (performance: fast).\n *\n * https://developer.mozilla.org/docs/Web/HTML/Element/template\n */\nvar parseFromTemplate;\nvar template = document.createElement('template');\nif (template.content) {\n\n /**\n * Uses a template element (content fragment) to parse HTML.\n *\n * @param {String} html - The HTML string.\n * @return {NodeList}\n */\n parseFromTemplate = function templateParser(html) {\n template.innerHTML = html;\n return template.content.childNodes;\n };\n}\n\n/** Fallback document parser. */\nvar parseWithFallback = parseFromDocument || parseFromString;\n\n/**\n * Parses HTML string to DOM nodes.\n *\n * @param {String} html - The HTML string.\n * @param {String} [tagName] - The tag name.\n * @return {NodeList|Array}\n */\nmodule.exports = function domparser(html) {\n // try to match first tag\n var tagName;\n var match = html.match(FIRST_TAG_REGEX);\n if (match && match[1]) {\n tagName = match[1].toLowerCase();\n }\n\n var doc;\n var element;\n var elements;\n\n switch (tagName) {\n case HTML_TAG_NAME:\n if (parseFromString) {\n doc = parseFromString(html);\n\n // the created document may come with filler head/body elements,\n // so ake sure to remove them if they don't actually exist\n if (!HEAD_REGEX.test(html)) {\n element = doc.getElementsByTagName(HEAD_TAG_NAME)[0];\n if (element) element.parentNode.removeChild(element);\n }\n if (!BODY_REGEX.test(html)) {\n element = doc.getElementsByTagName(BODY_TAG_NAME)[0];\n if (element) element.parentNode.removeChild(element);\n }\n\n return doc.getElementsByTagName(HTML_TAG_NAME);\n }\n break;\n\n case HEAD_TAG_NAME:\n if (parseWithFallback) {\n elements = parseWithFallback(html).getElementsByTagName(HEAD_TAG_NAME);\n\n // account for possibility of sibling\n if (BODY_REGEX.test(html)) {\n return elements[0].parentNode.childNodes;\n }\n return elements;\n }\n break;\n\n case BODY_TAG_NAME:\n if (parseWithFallback) {\n elements = parseWithFallback(html).getElementsByTagName(BODY_TAG_NAME);\n\n // account for possibility of sibling (return both body and head)\n if (HEAD_REGEX.test(html)) {\n return elements[0].parentNode.childNodes;\n }\n return elements;\n }\n break;\n\n // low-level tag or text\n default:\n if (parseFromTemplate) return parseFromTemplate(html);\n if (parseWithFallback) {\n return parseWithFallback(html, BODY_TAG_NAME).getElementsByTagName(BODY_TAG_NAME)[0].childNodes;\n }\n break;\n }\n\n return [];\n};\n\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/html-dom-parser/lib/domparser.js?");
|
|
1058
186
|
|
|
1059
187
|
/***/ }),
|
|
1060
|
-
|
|
188
|
+
|
|
189
|
+
/***/ "./node_modules/html-dom-parser/lib/html-to-dom-client.js":
|
|
190
|
+
/*!****************************************************************!*\
|
|
191
|
+
!*** ./node_modules/html-dom-parser/lib/html-to-dom-client.js ***!
|
|
192
|
+
\****************************************************************/
|
|
193
|
+
/*! no static exports found */
|
|
1061
194
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1062
195
|
|
|
1063
196
|
"use strict";
|
|
1064
|
-
|
|
1065
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1066
|
-
*
|
|
1067
|
-
* This source code is licensed under the MIT license found in the
|
|
1068
|
-
* LICENSE file in the root directory of this source tree.
|
|
1069
|
-
*
|
|
1070
|
-
*
|
|
1071
|
-
*/
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
/**
|
|
1075
|
-
* WARNING: DO NOT manually require this module.
|
|
1076
|
-
* This is a replacement for `invariant(...)` used by the error code system
|
|
1077
|
-
* and will _only_ be required by the corresponding babel pass.
|
|
1078
|
-
* It always throws.
|
|
1079
|
-
*/
|
|
1080
|
-
|
|
1081
|
-
function reactProdInvariant(code) {
|
|
1082
|
-
var argCount = arguments.length - 1;
|
|
1083
|
-
|
|
1084
|
-
var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
|
|
1085
|
-
|
|
1086
|
-
for (var argIdx = 0; argIdx < argCount; argIdx++) {
|
|
1087
|
-
message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
|
|
1091
|
-
|
|
1092
|
-
var error = new Error(message);
|
|
1093
|
-
error.name = 'Invariant Violation';
|
|
1094
|
-
error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
|
|
1095
|
-
|
|
1096
|
-
throw error;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
module.exports = reactProdInvariant;
|
|
197
|
+
eval("\n\n/**\n * Module dependencies.\n */\nvar domparser = __webpack_require__(/*! ./domparser */ \"./node_modules/html-dom-parser/lib/domparser.js\");\nvar utilities = __webpack_require__(/*! ./utilities */ \"./node_modules/html-dom-parser/lib/utilities.js\");\nvar formatDOM = utilities.formatDOM;\nvar isIE9 = utilities.isIE(9);\n\n/**\n * Constants.\n */\nvar DIRECTIVE_REGEX = /<(![a-zA-Z\\s]+)>/; // e.g., <!doctype html>\n\n/**\n * Parses HTML and reformats DOM nodes output.\n *\n * @param {String} html - The HTML string.\n * @return {Array} - The formatted DOM nodes.\n */\nmodule.exports = function parseDOM(html) {\n if (typeof html !== 'string') {\n throw new TypeError('First argument must be a string.');\n }\n if (!html) return [];\n\n // match directive\n var match = html.match(DIRECTIVE_REGEX);\n var directive;\n if (match && match[1]) {\n directive = match[1];\n\n // remove directive in IE9 because DOMParser uses\n // MIME type 'text/xml' instead of 'text/html'\n if (isIE9) {\n html = html.replace(match[0], '');\n }\n }\n\n return formatDOM(domparser(html), null, directive);\n};\n\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/html-dom-parser/lib/html-to-dom-client.js?");
|
|
1100
198
|
|
|
1101
199
|
/***/ }),
|
|
1102
|
-
|
|
200
|
+
|
|
201
|
+
/***/ "./node_modules/html-dom-parser/lib/utilities.js":
|
|
202
|
+
/*!*******************************************************!*\
|
|
203
|
+
!*** ./node_modules/html-dom-parser/lib/utilities.js ***!
|
|
204
|
+
\*******************************************************/
|
|
205
|
+
/*! no static exports found */
|
|
1103
206
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1104
207
|
|
|
1105
208
|
"use strict";
|
|
1106
|
-
|
|
1107
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1108
|
-
*
|
|
1109
|
-
* This source code is licensed under the MIT license found in the
|
|
1110
|
-
* LICENSE file in the root directory of this source tree.
|
|
1111
|
-
*
|
|
1112
|
-
*/
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
* Use invariant() to assert state which your program assumes to be true.
|
|
1118
|
-
*
|
|
1119
|
-
* Provide sprintf-style format (only %s is supported) and arguments
|
|
1120
|
-
* to provide information about what broke and what you were
|
|
1121
|
-
* expecting.
|
|
1122
|
-
*
|
|
1123
|
-
* The invariant message will be stripped in production, but the invariant
|
|
1124
|
-
* will remain to ensure logic does not differ in production.
|
|
1125
|
-
*/
|
|
1126
|
-
|
|
1127
|
-
var validateFormat = function validateFormat(format) {};
|
|
1128
|
-
|
|
1129
|
-
if (true) {
|
|
1130
|
-
validateFormat = function validateFormat(format) {
|
|
1131
|
-
if (format === undefined) {
|
|
1132
|
-
throw new Error('invariant requires an error message argument');
|
|
1133
|
-
}
|
|
1134
|
-
};
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
function invariant(condition, format, a, b, c, d, e, f) {
|
|
1138
|
-
validateFormat(format);
|
|
1139
|
-
|
|
1140
|
-
if (!condition) {
|
|
1141
|
-
var error;
|
|
1142
|
-
if (format === undefined) {
|
|
1143
|
-
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
|
1144
|
-
} else {
|
|
1145
|
-
var args = [a, b, c, d, e, f];
|
|
1146
|
-
var argIndex = 0;
|
|
1147
|
-
error = new Error(format.replace(/%s/g, function () {
|
|
1148
|
-
return args[argIndex++];
|
|
1149
|
-
}));
|
|
1150
|
-
error.name = 'Invariant Violation';
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
error.framesToPop = 1; // we don't care about invariant's own frame
|
|
1154
|
-
throw error;
|
|
1155
|
-
}
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
module.exports = invariant;
|
|
209
|
+
eval("\n\n/**\n * Format DOM attributes to an associative array.\n *\n * @param {NamedNodeMap} - The list of attributes.\n * @return {Object} - The object of attributes.\n */\nfunction formatAttributes(attributes) {\n var result = {};\n var attribute;\n\n // NamedNodeMap is array-like\n for (var i = 0, len = attributes.length; i < len; i++) {\n attribute = attributes[i];\n result[attribute.name] = attribute.value;\n }\n\n return result;\n}\n\n/**\n * Format the browser DOM nodes to mimic the output of `htmlparser2.parseDOM()`.\n *\n * @param {NodeList} nodes - The DOM nodes.\n * @param {Object} [parentObj] - The formatted parent node.\n * @param {String} [directive] - The directive.\n * @return {Object} - The formatted DOM object.\n */\nfunction formatDOM(nodes, parentObj, directive) {\n parentObj = parentObj || null;\n\n var result = [];\n var node;\n var prevNode;\n var nodeObj;\n\n // NodeList is array-like\n for (var i = 0, len = nodes.length; i < len; i++) {\n node = nodes[i];\n // reset\n nodeObj = {\n next: null,\n prev: result[i - 1] || null,\n parent: parentObj\n };\n\n // set the next node for the previous node (if applicable)\n prevNode = result[i - 1];\n if (prevNode) {\n prevNode.next = nodeObj;\n }\n\n // set the node name if it's not \"#text\" or \"#comment\"\n // e.g., \"div\"\n if (node.nodeName.indexOf('#') !== 0) {\n nodeObj.name = node.nodeName.toLowerCase();\n\n // also, nodes of type \"tag\" have \"attribs\"\n nodeObj.attribs = {}; // default\n if (node.attributes && node.attributes.length) {\n nodeObj.attribs = formatAttributes(node.attributes);\n }\n }\n\n // set the node type\n // e.g., \"tag\"\n switch (node.nodeType) {\n // 1 = element\n case 1:\n if (nodeObj.name === 'script' || nodeObj.name === 'style') {\n nodeObj.type = nodeObj.name;\n } else {\n nodeObj.type = 'tag';\n }\n // recursively format the children\n nodeObj.children = formatDOM(node.childNodes, nodeObj);\n break;\n // 2 = attribute\n // 3 = text\n case 3:\n nodeObj.type = 'text';\n nodeObj.data = node.nodeValue;\n break;\n // 8 = comment\n case 8:\n nodeObj.type = 'comment';\n nodeObj.data = node.nodeValue;\n break;\n default:\n break;\n }\n\n result.push(nodeObj);\n }\n\n if (directive) {\n result.unshift({\n name: directive.substring(0, directive.indexOf(' ')).toLowerCase(),\n data: directive,\n type: 'directive',\n next: result[0] ? result[0] : null,\n prev: null,\n parent: parentObj\n });\n\n if (result[1]) {\n result[1].prev = result[0];\n }\n }\n\n return result;\n}\n\n/**\n * Detect IE with or without version.\n *\n * @param {Number} [version] - The IE version to detect.\n * @return {Boolean} - Whether IE or the version has been detected.\n */\nfunction isIE(version) {\n if (version) {\n return document.documentMode === version;\n }\n return /(MSIE |Trident\\/|Edge\\/)/.test(navigator.userAgent);\n}\n\n/**\n * Export utilities.\n */\nmodule.exports = {\n formatAttributes: formatAttributes,\n formatDOM: formatDOM,\n isIE: isIE\n};\n\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/html-dom-parser/lib/utilities.js?");
|
|
1159
210
|
|
|
1160
211
|
/***/ }),
|
|
1161
|
-
|
|
212
|
+
|
|
213
|
+
/***/ "./node_modules/react-dom-core/lib/DOMProperty.js":
|
|
214
|
+
/*!********************************************************!*\
|
|
215
|
+
!*** ./node_modules/react-dom-core/lib/DOMProperty.js ***!
|
|
216
|
+
\********************************************************/
|
|
217
|
+
/*! no static exports found */
|
|
1162
218
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1163
219
|
|
|
1164
220
|
"use strict";
|
|
1165
|
-
|
|
1166
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1167
|
-
*
|
|
1168
|
-
* This source code is licensed under the MIT license found in the
|
|
1169
|
-
* LICENSE file in the root directory of this source tree.
|
|
1170
|
-
*
|
|
1171
|
-
*/
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
var NS = {
|
|
1176
|
-
xlink: 'http://www.w3.org/1999/xlink',
|
|
1177
|
-
xml: 'http://www.w3.org/XML/1998/namespace'
|
|
1178
|
-
};
|
|
1179
|
-
|
|
1180
|
-
// We use attributes for everything SVG so let's avoid some duplication and run
|
|
1181
|
-
// code instead.
|
|
1182
|
-
// The following are all specified in the HTML config already so we exclude here.
|
|
1183
|
-
// - class (as className)
|
|
1184
|
-
// - color
|
|
1185
|
-
// - height
|
|
1186
|
-
// - id
|
|
1187
|
-
// - lang
|
|
1188
|
-
// - max
|
|
1189
|
-
// - media
|
|
1190
|
-
// - method
|
|
1191
|
-
// - min
|
|
1192
|
-
// - name
|
|
1193
|
-
// - style
|
|
1194
|
-
// - target
|
|
1195
|
-
// - type
|
|
1196
|
-
// - width
|
|
1197
|
-
var ATTRS = {
|
|
1198
|
-
accentHeight: 'accent-height',
|
|
1199
|
-
accumulate: 0,
|
|
1200
|
-
additive: 0,
|
|
1201
|
-
alignmentBaseline: 'alignment-baseline',
|
|
1202
|
-
allowReorder: 'allowReorder',
|
|
1203
|
-
alphabetic: 0,
|
|
1204
|
-
amplitude: 0,
|
|
1205
|
-
arabicForm: 'arabic-form',
|
|
1206
|
-
ascent: 0,
|
|
1207
|
-
attributeName: 'attributeName',
|
|
1208
|
-
attributeType: 'attributeType',
|
|
1209
|
-
autoReverse: 'autoReverse',
|
|
1210
|
-
azimuth: 0,
|
|
1211
|
-
baseFrequency: 'baseFrequency',
|
|
1212
|
-
baseProfile: 'baseProfile',
|
|
1213
|
-
baselineShift: 'baseline-shift',
|
|
1214
|
-
bbox: 0,
|
|
1215
|
-
begin: 0,
|
|
1216
|
-
bias: 0,
|
|
1217
|
-
by: 0,
|
|
1218
|
-
calcMode: 'calcMode',
|
|
1219
|
-
capHeight: 'cap-height',
|
|
1220
|
-
clip: 0,
|
|
1221
|
-
clipPath: 'clip-path',
|
|
1222
|
-
clipRule: 'clip-rule',
|
|
1223
|
-
clipPathUnits: 'clipPathUnits',
|
|
1224
|
-
colorInterpolation: 'color-interpolation',
|
|
1225
|
-
colorInterpolationFilters: 'color-interpolation-filters',
|
|
1226
|
-
colorProfile: 'color-profile',
|
|
1227
|
-
colorRendering: 'color-rendering',
|
|
1228
|
-
contentScriptType: 'contentScriptType',
|
|
1229
|
-
contentStyleType: 'contentStyleType',
|
|
1230
|
-
cursor: 0,
|
|
1231
|
-
cx: 0,
|
|
1232
|
-
cy: 0,
|
|
1233
|
-
d: 0,
|
|
1234
|
-
decelerate: 0,
|
|
1235
|
-
descent: 0,
|
|
1236
|
-
diffuseConstant: 'diffuseConstant',
|
|
1237
|
-
direction: 0,
|
|
1238
|
-
display: 0,
|
|
1239
|
-
divisor: 0,
|
|
1240
|
-
dominantBaseline: 'dominant-baseline',
|
|
1241
|
-
dur: 0,
|
|
1242
|
-
dx: 0,
|
|
1243
|
-
dy: 0,
|
|
1244
|
-
edgeMode: 'edgeMode',
|
|
1245
|
-
elevation: 0,
|
|
1246
|
-
enableBackground: 'enable-background',
|
|
1247
|
-
end: 0,
|
|
1248
|
-
exponent: 0,
|
|
1249
|
-
externalResourcesRequired: 'externalResourcesRequired',
|
|
1250
|
-
fill: 0,
|
|
1251
|
-
fillOpacity: 'fill-opacity',
|
|
1252
|
-
fillRule: 'fill-rule',
|
|
1253
|
-
filter: 0,
|
|
1254
|
-
filterRes: 'filterRes',
|
|
1255
|
-
filterUnits: 'filterUnits',
|
|
1256
|
-
floodColor: 'flood-color',
|
|
1257
|
-
floodOpacity: 'flood-opacity',
|
|
1258
|
-
focusable: 0,
|
|
1259
|
-
fontFamily: 'font-family',
|
|
1260
|
-
fontSize: 'font-size',
|
|
1261
|
-
fontSizeAdjust: 'font-size-adjust',
|
|
1262
|
-
fontStretch: 'font-stretch',
|
|
1263
|
-
fontStyle: 'font-style',
|
|
1264
|
-
fontVariant: 'font-variant',
|
|
1265
|
-
fontWeight: 'font-weight',
|
|
1266
|
-
format: 0,
|
|
1267
|
-
from: 0,
|
|
1268
|
-
fx: 0,
|
|
1269
|
-
fy: 0,
|
|
1270
|
-
g1: 0,
|
|
1271
|
-
g2: 0,
|
|
1272
|
-
glyphName: 'glyph-name',
|
|
1273
|
-
glyphOrientationHorizontal: 'glyph-orientation-horizontal',
|
|
1274
|
-
glyphOrientationVertical: 'glyph-orientation-vertical',
|
|
1275
|
-
glyphRef: 'glyphRef',
|
|
1276
|
-
gradientTransform: 'gradientTransform',
|
|
1277
|
-
gradientUnits: 'gradientUnits',
|
|
1278
|
-
hanging: 0,
|
|
1279
|
-
horizAdvX: 'horiz-adv-x',
|
|
1280
|
-
horizOriginX: 'horiz-origin-x',
|
|
1281
|
-
ideographic: 0,
|
|
1282
|
-
imageRendering: 'image-rendering',
|
|
1283
|
-
'in': 0,
|
|
1284
|
-
in2: 0,
|
|
1285
|
-
intercept: 0,
|
|
1286
|
-
k: 0,
|
|
1287
|
-
k1: 0,
|
|
1288
|
-
k2: 0,
|
|
1289
|
-
k3: 0,
|
|
1290
|
-
k4: 0,
|
|
1291
|
-
kernelMatrix: 'kernelMatrix',
|
|
1292
|
-
kernelUnitLength: 'kernelUnitLength',
|
|
1293
|
-
kerning: 0,
|
|
1294
|
-
keyPoints: 'keyPoints',
|
|
1295
|
-
keySplines: 'keySplines',
|
|
1296
|
-
keyTimes: 'keyTimes',
|
|
1297
|
-
lengthAdjust: 'lengthAdjust',
|
|
1298
|
-
letterSpacing: 'letter-spacing',
|
|
1299
|
-
lightingColor: 'lighting-color',
|
|
1300
|
-
limitingConeAngle: 'limitingConeAngle',
|
|
1301
|
-
local: 0,
|
|
1302
|
-
markerEnd: 'marker-end',
|
|
1303
|
-
markerMid: 'marker-mid',
|
|
1304
|
-
markerStart: 'marker-start',
|
|
1305
|
-
markerHeight: 'markerHeight',
|
|
1306
|
-
markerUnits: 'markerUnits',
|
|
1307
|
-
markerWidth: 'markerWidth',
|
|
1308
|
-
mask: 0,
|
|
1309
|
-
maskContentUnits: 'maskContentUnits',
|
|
1310
|
-
maskUnits: 'maskUnits',
|
|
1311
|
-
mathematical: 0,
|
|
1312
|
-
mode: 0,
|
|
1313
|
-
numOctaves: 'numOctaves',
|
|
1314
|
-
offset: 0,
|
|
1315
|
-
opacity: 0,
|
|
1316
|
-
operator: 0,
|
|
1317
|
-
order: 0,
|
|
1318
|
-
orient: 0,
|
|
1319
|
-
orientation: 0,
|
|
1320
|
-
origin: 0,
|
|
1321
|
-
overflow: 0,
|
|
1322
|
-
overlinePosition: 'overline-position',
|
|
1323
|
-
overlineThickness: 'overline-thickness',
|
|
1324
|
-
paintOrder: 'paint-order',
|
|
1325
|
-
panose1: 'panose-1',
|
|
1326
|
-
pathLength: 'pathLength',
|
|
1327
|
-
patternContentUnits: 'patternContentUnits',
|
|
1328
|
-
patternTransform: 'patternTransform',
|
|
1329
|
-
patternUnits: 'patternUnits',
|
|
1330
|
-
pointerEvents: 'pointer-events',
|
|
1331
|
-
points: 0,
|
|
1332
|
-
pointsAtX: 'pointsAtX',
|
|
1333
|
-
pointsAtY: 'pointsAtY',
|
|
1334
|
-
pointsAtZ: 'pointsAtZ',
|
|
1335
|
-
preserveAlpha: 'preserveAlpha',
|
|
1336
|
-
preserveAspectRatio: 'preserveAspectRatio',
|
|
1337
|
-
primitiveUnits: 'primitiveUnits',
|
|
1338
|
-
r: 0,
|
|
1339
|
-
radius: 0,
|
|
1340
|
-
refX: 'refX',
|
|
1341
|
-
refY: 'refY',
|
|
1342
|
-
renderingIntent: 'rendering-intent',
|
|
1343
|
-
repeatCount: 'repeatCount',
|
|
1344
|
-
repeatDur: 'repeatDur',
|
|
1345
|
-
requiredExtensions: 'requiredExtensions',
|
|
1346
|
-
requiredFeatures: 'requiredFeatures',
|
|
1347
|
-
restart: 0,
|
|
1348
|
-
result: 0,
|
|
1349
|
-
rotate: 0,
|
|
1350
|
-
rx: 0,
|
|
1351
|
-
ry: 0,
|
|
1352
|
-
scale: 0,
|
|
1353
|
-
seed: 0,
|
|
1354
|
-
shapeRendering: 'shape-rendering',
|
|
1355
|
-
slope: 0,
|
|
1356
|
-
spacing: 0,
|
|
1357
|
-
specularConstant: 'specularConstant',
|
|
1358
|
-
specularExponent: 'specularExponent',
|
|
1359
|
-
speed: 0,
|
|
1360
|
-
spreadMethod: 'spreadMethod',
|
|
1361
|
-
startOffset: 'startOffset',
|
|
1362
|
-
stdDeviation: 'stdDeviation',
|
|
1363
|
-
stemh: 0,
|
|
1364
|
-
stemv: 0,
|
|
1365
|
-
stitchTiles: 'stitchTiles',
|
|
1366
|
-
stopColor: 'stop-color',
|
|
1367
|
-
stopOpacity: 'stop-opacity',
|
|
1368
|
-
strikethroughPosition: 'strikethrough-position',
|
|
1369
|
-
strikethroughThickness: 'strikethrough-thickness',
|
|
1370
|
-
string: 0,
|
|
1371
|
-
stroke: 0,
|
|
1372
|
-
strokeDasharray: 'stroke-dasharray',
|
|
1373
|
-
strokeDashoffset: 'stroke-dashoffset',
|
|
1374
|
-
strokeLinecap: 'stroke-linecap',
|
|
1375
|
-
strokeLinejoin: 'stroke-linejoin',
|
|
1376
|
-
strokeMiterlimit: 'stroke-miterlimit',
|
|
1377
|
-
strokeOpacity: 'stroke-opacity',
|
|
1378
|
-
strokeWidth: 'stroke-width',
|
|
1379
|
-
surfaceScale: 'surfaceScale',
|
|
1380
|
-
systemLanguage: 'systemLanguage',
|
|
1381
|
-
tableValues: 'tableValues',
|
|
1382
|
-
targetX: 'targetX',
|
|
1383
|
-
targetY: 'targetY',
|
|
1384
|
-
textAnchor: 'text-anchor',
|
|
1385
|
-
textDecoration: 'text-decoration',
|
|
1386
|
-
textRendering: 'text-rendering',
|
|
1387
|
-
textLength: 'textLength',
|
|
1388
|
-
to: 0,
|
|
1389
|
-
transform: 0,
|
|
1390
|
-
u1: 0,
|
|
1391
|
-
u2: 0,
|
|
1392
|
-
underlinePosition: 'underline-position',
|
|
1393
|
-
underlineThickness: 'underline-thickness',
|
|
1394
|
-
unicode: 0,
|
|
1395
|
-
unicodeBidi: 'unicode-bidi',
|
|
1396
|
-
unicodeRange: 'unicode-range',
|
|
1397
|
-
unitsPerEm: 'units-per-em',
|
|
1398
|
-
vAlphabetic: 'v-alphabetic',
|
|
1399
|
-
vHanging: 'v-hanging',
|
|
1400
|
-
vIdeographic: 'v-ideographic',
|
|
1401
|
-
vMathematical: 'v-mathematical',
|
|
1402
|
-
values: 0,
|
|
1403
|
-
vectorEffect: 'vector-effect',
|
|
1404
|
-
version: 0,
|
|
1405
|
-
vertAdvY: 'vert-adv-y',
|
|
1406
|
-
vertOriginX: 'vert-origin-x',
|
|
1407
|
-
vertOriginY: 'vert-origin-y',
|
|
1408
|
-
viewBox: 'viewBox',
|
|
1409
|
-
viewTarget: 'viewTarget',
|
|
1410
|
-
visibility: 0,
|
|
1411
|
-
widths: 0,
|
|
1412
|
-
wordSpacing: 'word-spacing',
|
|
1413
|
-
writingMode: 'writing-mode',
|
|
1414
|
-
x: 0,
|
|
1415
|
-
xHeight: 'x-height',
|
|
1416
|
-
x1: 0,
|
|
1417
|
-
x2: 0,
|
|
1418
|
-
xChannelSelector: 'xChannelSelector',
|
|
1419
|
-
xlinkActuate: 'xlink:actuate',
|
|
1420
|
-
xlinkArcrole: 'xlink:arcrole',
|
|
1421
|
-
xlinkHref: 'xlink:href',
|
|
1422
|
-
xlinkRole: 'xlink:role',
|
|
1423
|
-
xlinkShow: 'xlink:show',
|
|
1424
|
-
xlinkTitle: 'xlink:title',
|
|
1425
|
-
xlinkType: 'xlink:type',
|
|
1426
|
-
xmlBase: 'xml:base',
|
|
1427
|
-
xmlns: 0,
|
|
1428
|
-
xmlnsXlink: 'xmlns:xlink',
|
|
1429
|
-
xmlLang: 'xml:lang',
|
|
1430
|
-
xmlSpace: 'xml:space',
|
|
1431
|
-
y: 0,
|
|
1432
|
-
y1: 0,
|
|
1433
|
-
y2: 0,
|
|
1434
|
-
yChannelSelector: 'yChannelSelector',
|
|
1435
|
-
z: 0,
|
|
1436
|
-
zoomAndPan: 'zoomAndPan'
|
|
1437
|
-
};
|
|
1438
|
-
|
|
1439
|
-
var SVGDOMPropertyConfig = {
|
|
1440
|
-
Properties: {},
|
|
1441
|
-
DOMAttributeNamespaces: {
|
|
1442
|
-
xlinkActuate: NS.xlink,
|
|
1443
|
-
xlinkArcrole: NS.xlink,
|
|
1444
|
-
xlinkHref: NS.xlink,
|
|
1445
|
-
xlinkRole: NS.xlink,
|
|
1446
|
-
xlinkShow: NS.xlink,
|
|
1447
|
-
xlinkTitle: NS.xlink,
|
|
1448
|
-
xlinkType: NS.xlink,
|
|
1449
|
-
xmlBase: NS.xml,
|
|
1450
|
-
xmlLang: NS.xml,
|
|
1451
|
-
xmlSpace: NS.xml
|
|
1452
|
-
},
|
|
1453
|
-
DOMAttributeNames: {}
|
|
1454
|
-
};
|
|
1455
|
-
|
|
1456
|
-
Object.keys(ATTRS).forEach(function (key) {
|
|
1457
|
-
SVGDOMPropertyConfig.Properties[key] = 0;
|
|
1458
|
-
if (ATTRS[key]) {
|
|
1459
|
-
SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];
|
|
1460
|
-
}
|
|
1461
|
-
});
|
|
1462
|
-
|
|
1463
|
-
module.exports = SVGDOMPropertyConfig;
|
|
221
|
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ \"./node_modules/react-dom-core/lib/reactProdInvariant.js\");\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ \"./node_modules/fbjs/lib/invariant.js\");\n\nfunction checkMask(value, bitmask) {\n return (value & bitmask) === bitmask;\n}\n\nvar DOMPropertyInjection = {\n /**\n * Mapping from normalized, camelcased property names to a configuration that\n * specifies how the associated DOM property should be accessed or rendered.\n */\n MUST_USE_PROPERTY: 0x1,\n HAS_BOOLEAN_VALUE: 0x4,\n HAS_NUMERIC_VALUE: 0x8,\n HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,\n HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,\n\n /**\n * Inject some specialized knowledge about the DOM. This takes a config object\n * with the following properties:\n *\n * isCustomAttribute: function that given an attribute name will return true\n * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*\n * attributes where it's impossible to enumerate all of the possible\n * attribute names,\n *\n * Properties: object mapping DOM property name to one of the\n * DOMPropertyInjection constants or null. If your attribute isn't in here,\n * it won't get written to the DOM.\n *\n * DOMAttributeNames: object mapping React attribute name to the DOM\n * attribute name. Attribute names not specified use the **lowercase**\n * normalized name.\n *\n * DOMAttributeNamespaces: object mapping React attribute name to the DOM\n * attribute namespace URL. (Attribute names not specified use no namespace.)\n *\n * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.\n * Property names not specified use the normalized name.\n *\n * DOMMutationMethods: Properties that require special mutation methods. If\n * `value` is undefined, the mutation method should unset the property.\n *\n * @param {object} domPropertyConfig the config as described above.\n */\n injectDOMPropertyConfig: function (domPropertyConfig) {\n var Injection = DOMPropertyInjection;\n var Properties = domPropertyConfig.Properties || {};\n var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};\n var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};\n var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};\n var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};\n\n if (domPropertyConfig.isCustomAttribute) {\n DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);\n }\n\n for (var propName in Properties) {\n !!DOMProperty.properties.hasOwnProperty(propName) ? true ? invariant(false, 'injectDOMPropertyConfig(...): You\\'re trying to inject DOM property \\'%s\\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : undefined : void 0;\n\n var lowerCased = propName.toLowerCase();\n var propConfig = Properties[propName];\n\n var propertyInfo = {\n attributeName: lowerCased,\n attributeNamespace: null,\n propertyName: propName,\n mutationMethod: null,\n\n mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),\n hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),\n hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),\n hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),\n hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)\n };\n !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? true ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : undefined : void 0;\n\n if (true) {\n DOMProperty.getPossibleStandardName[lowerCased] = propName;\n }\n\n if (DOMAttributeNames.hasOwnProperty(propName)) {\n var attributeName = DOMAttributeNames[propName];\n propertyInfo.attributeName = attributeName;\n if (true) {\n DOMProperty.getPossibleStandardName[attributeName] = propName;\n }\n }\n\n if (DOMAttributeNamespaces.hasOwnProperty(propName)) {\n propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];\n }\n\n if (DOMPropertyNames.hasOwnProperty(propName)) {\n propertyInfo.propertyName = DOMPropertyNames[propName];\n }\n\n if (DOMMutationMethods.hasOwnProperty(propName)) {\n propertyInfo.mutationMethod = DOMMutationMethods[propName];\n }\n\n DOMProperty.properties[propName] = propertyInfo;\n }\n }\n};\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\n/* eslint-enable max-len */\n\n/**\n * DOMProperty exports lookup objects that can be used like functions:\n *\n * > DOMProperty.isValid['id']\n * true\n * > DOMProperty.isValid['foobar']\n * undefined\n *\n * Although this may be confusing, it performs better in general.\n *\n * @see http://jsperf.com/key-exists\n * @see http://jsperf.com/key-missing\n */\nvar DOMProperty = {\n ID_ATTRIBUTE_NAME: 'data-reactid',\n ROOT_ATTRIBUTE_NAME: 'data-reactroot',\n\n ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,\n ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040',\n\n /**\n * Map from property \"standard name\" to an object with info about how to set\n * the property in the DOM. Each object contains:\n *\n * attributeName:\n * Used when rendering markup or with `*Attribute()`.\n * attributeNamespace\n * propertyName:\n * Used on DOM node instances. (This includes properties that mutate due to\n * external factors.)\n * mutationMethod:\n * If non-null, used instead of the property or `setAttribute()` after\n * initial render.\n * mustUseProperty:\n * Whether the property must be accessed and mutated as an object property.\n * hasBooleanValue:\n * Whether the property should be removed when set to a falsey value.\n * hasNumericValue:\n * Whether the property must be numeric or parse as a numeric and should be\n * removed when set to a falsey value.\n * hasPositiveNumericValue:\n * Whether the property must be positive numeric or parse as a positive\n * numeric and should be removed when set to a falsey value.\n * hasOverloadedBooleanValue:\n * Whether the property can be used as a flag as well as with a value.\n * Removed when strictly equal to false; present without a value when\n * strictly equal to true; present with a value otherwise.\n */\n properties: {},\n\n /**\n * Mapping from lowercase property names to the properly cased version, used\n * to warn in the case of missing properties. Available only in __DEV__.\n *\n * autofocus is predefined, because adding it to the property whitelist\n * causes unintended side effects.\n *\n * @type {Object}\n */\n getPossibleStandardName: true ? { autofocus: 'autoFocus' } : undefined,\n\n /**\n * All of the isCustomAttribute() functions that have been injected.\n */\n _isCustomAttributeFunctions: [],\n\n /**\n * Checks whether a property name is a custom attribute.\n * @method\n */\n isCustomAttribute: function (attributeName) {\n for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {\n var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];\n if (isCustomAttributeFn(attributeName)) {\n return true;\n }\n }\n return false;\n },\n\n injection: DOMPropertyInjection\n};\n\nmodule.exports = DOMProperty;\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/react-dom-core/lib/DOMProperty.js?");
|
|
1464
222
|
|
|
1465
223
|
/***/ }),
|
|
1466
|
-
/* 12 */
|
|
1467
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1468
|
-
|
|
1469
|
-
var parse = __webpack_require__(13);
|
|
1470
|
-
|
|
1471
|
-
/**
|
|
1472
|
-
* Parses inline style.
|
|
1473
|
-
*
|
|
1474
|
-
* Example: 'color:red' => { color: 'red' }
|
|
1475
|
-
*
|
|
1476
|
-
* @param {String} style - The inline style.
|
|
1477
|
-
* @param {Function} [iterator] - The iterator function.
|
|
1478
|
-
* @return {null|Object}
|
|
1479
|
-
*/
|
|
1480
|
-
module.exports = function parseInlineStyle(style, iterator) {
|
|
1481
|
-
if (!style || typeof style !== 'string') return null;
|
|
1482
|
-
|
|
1483
|
-
// make sure to wrap declarations in placeholder
|
|
1484
|
-
var declarations = parse('p{' + style + '}').stylesheet.rules[0].declarations;
|
|
1485
|
-
var declaration, property, value;
|
|
1486
|
-
|
|
1487
|
-
var output = null;
|
|
1488
|
-
var hasIterator = typeof iterator === 'function';
|
|
1489
|
-
|
|
1490
|
-
for (var i = 0, len = declarations.length; i < len; i++) {
|
|
1491
|
-
declaration = declarations[i];
|
|
1492
|
-
property = declaration.property;
|
|
1493
|
-
value = declaration.value;
|
|
1494
224
|
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
return output;
|
|
1504
|
-
};
|
|
225
|
+
/***/ "./node_modules/react-dom-core/lib/HTMLDOMPropertyConfig.js":
|
|
226
|
+
/*!******************************************************************!*\
|
|
227
|
+
!*** ./node_modules/react-dom-core/lib/HTMLDOMPropertyConfig.js ***!
|
|
228
|
+
\******************************************************************/
|
|
229
|
+
/*! no static exports found */
|
|
230
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1505
231
|
|
|
232
|
+
"use strict";
|
|
233
|
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar DOMProperty = __webpack_require__(/*! ./DOMProperty */ \"./node_modules/react-dom-core/lib/DOMProperty.js\");\n\nvar MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;\nvar HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;\nvar HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;\nvar HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;\nvar HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;\n\nvar HTMLDOMPropertyConfig = {\n isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),\n Properties: {\n /**\n * Standard Properties\n */\n accept: 0,\n acceptCharset: 0,\n accessKey: 0,\n action: 0,\n allowFullScreen: HAS_BOOLEAN_VALUE,\n allowTransparency: 0,\n alt: 0,\n // specifies target context for links with `preload` type\n as: 0,\n async: HAS_BOOLEAN_VALUE,\n autoComplete: 0,\n // autoFocus is polyfilled/normalized by AutoFocusUtils\n // autoFocus: HAS_BOOLEAN_VALUE,\n autoPlay: HAS_BOOLEAN_VALUE,\n capture: HAS_BOOLEAN_VALUE,\n cellPadding: 0,\n cellSpacing: 0,\n charSet: 0,\n challenge: 0,\n checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n cite: 0,\n classID: 0,\n className: 0,\n cols: HAS_POSITIVE_NUMERIC_VALUE,\n colSpan: 0,\n content: 0,\n contentEditable: 0,\n contextMenu: 0,\n controls: HAS_BOOLEAN_VALUE,\n controlsList: 0,\n coords: 0,\n crossOrigin: 0,\n data: 0, // For `<object />` acts as `src`.\n dateTime: 0,\n 'default': HAS_BOOLEAN_VALUE,\n defer: HAS_BOOLEAN_VALUE,\n dir: 0,\n disabled: HAS_BOOLEAN_VALUE,\n download: HAS_OVERLOADED_BOOLEAN_VALUE,\n draggable: 0,\n encType: 0,\n form: 0,\n formAction: 0,\n formEncType: 0,\n formMethod: 0,\n formNoValidate: HAS_BOOLEAN_VALUE,\n formTarget: 0,\n frameBorder: 0,\n headers: 0,\n height: 0,\n hidden: HAS_BOOLEAN_VALUE,\n high: 0,\n href: 0,\n hrefLang: 0,\n htmlFor: 0,\n httpEquiv: 0,\n icon: 0,\n id: 0,\n inputMode: 0,\n integrity: 0,\n is: 0,\n keyParams: 0,\n keyType: 0,\n kind: 0,\n label: 0,\n lang: 0,\n list: 0,\n loop: HAS_BOOLEAN_VALUE,\n low: 0,\n manifest: 0,\n marginHeight: 0,\n marginWidth: 0,\n max: 0,\n maxLength: 0,\n media: 0,\n mediaGroup: 0,\n method: 0,\n min: 0,\n minLength: 0,\n // Caution; `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`.\n multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n name: 0,\n nonce: 0,\n noValidate: HAS_BOOLEAN_VALUE,\n open: HAS_BOOLEAN_VALUE,\n optimum: 0,\n pattern: 0,\n placeholder: 0,\n playsInline: HAS_BOOLEAN_VALUE,\n poster: 0,\n preload: 0,\n profile: 0,\n radioGroup: 0,\n readOnly: HAS_BOOLEAN_VALUE,\n referrerPolicy: 0,\n rel: 0,\n required: HAS_BOOLEAN_VALUE,\n reversed: HAS_BOOLEAN_VALUE,\n role: 0,\n rows: HAS_POSITIVE_NUMERIC_VALUE,\n rowSpan: HAS_NUMERIC_VALUE,\n sandbox: 0,\n scope: 0,\n scoped: HAS_BOOLEAN_VALUE,\n scrolling: 0,\n seamless: HAS_BOOLEAN_VALUE,\n selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n shape: 0,\n size: HAS_POSITIVE_NUMERIC_VALUE,\n sizes: 0,\n span: HAS_POSITIVE_NUMERIC_VALUE,\n spellCheck: 0,\n src: 0,\n srcDoc: 0,\n srcLang: 0,\n srcSet: 0,\n start: HAS_NUMERIC_VALUE,\n step: 0,\n style: 0,\n summary: 0,\n tabIndex: 0,\n target: 0,\n title: 0,\n // Setting .type throws on non-<input> tags\n type: 0,\n useMap: 0,\n value: 0,\n width: 0,\n wmode: 0,\n wrap: 0,\n\n /**\n * RDFa Properties\n */\n about: 0,\n datatype: 0,\n inlist: 0,\n prefix: 0,\n // property is also supported for OpenGraph in meta tags.\n property: 0,\n resource: 0,\n 'typeof': 0,\n vocab: 0,\n\n /**\n * Non-standard Properties\n */\n // autoCapitalize and autoCorrect are supported in Mobile Safari for\n // keyboard hints.\n autoCapitalize: 0,\n autoCorrect: 0,\n // autoSave allows WebKit/Blink to persist values of input fields on page reloads\n autoSave: 0,\n // color is for Safari mask-icon link\n color: 0,\n // itemProp, itemScope, itemType are for\n // Microdata support. See http://schema.org/docs/gs.html\n itemProp: 0,\n itemScope: HAS_BOOLEAN_VALUE,\n itemType: 0,\n // itemID and itemRef are for Microdata support as well but\n // only specified in the WHATWG spec document. See\n // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api\n itemID: 0,\n itemRef: 0,\n // results show looking glass icon and recent searches on input\n // search fields in WebKit/Blink\n results: 0,\n // IE-only attribute that specifies security restrictions on an iframe\n // as an alternative to the sandbox attribute on IE<10\n security: 0,\n // IE-only attribute that controls focus behavior\n unselectable: 0\n },\n DOMAttributeNames: {\n acceptCharset: 'accept-charset',\n className: 'class',\n htmlFor: 'for',\n httpEquiv: 'http-equiv'\n },\n DOMPropertyNames: {},\n DOMMutationMethods: {\n value: function (node, value) {\n if (value == null) {\n return node.removeAttribute('value');\n }\n\n // Number inputs get special treatment due to some edge cases in\n // Chrome. Let everything else assign the value attribute as normal.\n // https://github.com/facebook/react/issues/7253#issuecomment-236074326\n if (node.type !== 'number' || node.hasAttribute('value') === false) {\n node.setAttribute('value', '' + value);\n } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {\n // Don't assign an attribute if validation reports bad\n // input. Chrome will clear the value. Additionally, don't\n // operate on inputs that have focus, otherwise Chrome might\n // strip off trailing decimal places and cause the user's\n // cursor position to jump to the beginning of the input.\n //\n // In ReactDOMInput, we have an onBlur event that will trigger\n // this function again when focus is lost.\n node.setAttribute('value', '' + value);\n }\n }\n }\n};\n\nmodule.exports = HTMLDOMPropertyConfig;\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/react-dom-core/lib/HTMLDOMPropertyConfig.js?");
|
|
1506
234
|
|
|
1507
235
|
/***/ }),
|
|
1508
|
-
/* 13 */
|
|
1509
|
-
/***/ (function(module, exports) {
|
|
1510
|
-
|
|
1511
|
-
// http://www.w3.org/TR/CSS21/grammar.html
|
|
1512
|
-
// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
|
|
1513
|
-
var commentre = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g
|
|
1514
|
-
|
|
1515
|
-
module.exports = function(css, options){
|
|
1516
|
-
options = options || {};
|
|
1517
|
-
|
|
1518
|
-
/**
|
|
1519
|
-
* Positional.
|
|
1520
|
-
*/
|
|
1521
|
-
|
|
1522
|
-
var lineno = 1;
|
|
1523
|
-
var column = 1;
|
|
1524
|
-
|
|
1525
|
-
/**
|
|
1526
|
-
* Update lineno and column based on `str`.
|
|
1527
|
-
*/
|
|
1528
|
-
|
|
1529
|
-
function updatePosition(str) {
|
|
1530
|
-
var lines = str.match(/\n/g);
|
|
1531
|
-
if (lines) lineno += lines.length;
|
|
1532
|
-
var i = str.lastIndexOf('\n');
|
|
1533
|
-
column = ~i ? str.length - i : column + str.length;
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
/**
|
|
1537
|
-
* Mark position and patch `node.position`.
|
|
1538
|
-
*/
|
|
1539
|
-
|
|
1540
|
-
function position() {
|
|
1541
|
-
var start = { line: lineno, column: column };
|
|
1542
|
-
return function(node){
|
|
1543
|
-
node.position = new Position(start);
|
|
1544
|
-
whitespace();
|
|
1545
|
-
return node;
|
|
1546
|
-
};
|
|
1547
|
-
}
|
|
1548
|
-
|
|
1549
|
-
/**
|
|
1550
|
-
* Store position information for a node
|
|
1551
|
-
*/
|
|
1552
|
-
|
|
1553
|
-
function Position(start) {
|
|
1554
|
-
this.start = start;
|
|
1555
|
-
this.end = { line: lineno, column: column };
|
|
1556
|
-
this.source = options.source;
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
/**
|
|
1560
|
-
* Non-enumerable source string
|
|
1561
|
-
*/
|
|
1562
|
-
|
|
1563
|
-
Position.prototype.content = css;
|
|
1564
|
-
|
|
1565
|
-
/**
|
|
1566
|
-
* Error `msg`.
|
|
1567
|
-
*/
|
|
1568
|
-
|
|
1569
|
-
var errorsList = [];
|
|
1570
|
-
|
|
1571
|
-
function error(msg) {
|
|
1572
|
-
var err = new Error(options.source + ':' + lineno + ':' + column + ': ' + msg);
|
|
1573
|
-
err.reason = msg;
|
|
1574
|
-
err.filename = options.source;
|
|
1575
|
-
err.line = lineno;
|
|
1576
|
-
err.column = column;
|
|
1577
|
-
err.source = css;
|
|
1578
|
-
|
|
1579
|
-
if (options.silent) {
|
|
1580
|
-
errorsList.push(err);
|
|
1581
|
-
} else {
|
|
1582
|
-
throw err;
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
/**
|
|
1587
|
-
* Parse stylesheet.
|
|
1588
|
-
*/
|
|
1589
|
-
|
|
1590
|
-
function stylesheet() {
|
|
1591
|
-
var rulesList = rules();
|
|
1592
|
-
|
|
1593
|
-
return {
|
|
1594
|
-
type: 'stylesheet',
|
|
1595
|
-
stylesheet: {
|
|
1596
|
-
source: options.source,
|
|
1597
|
-
rules: rulesList,
|
|
1598
|
-
parsingErrors: errorsList
|
|
1599
|
-
}
|
|
1600
|
-
};
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
/**
|
|
1604
|
-
* Opening brace.
|
|
1605
|
-
*/
|
|
1606
|
-
|
|
1607
|
-
function open() {
|
|
1608
|
-
return match(/^{\s*/);
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
/**
|
|
1612
|
-
* Closing brace.
|
|
1613
|
-
*/
|
|
1614
|
-
|
|
1615
|
-
function close() {
|
|
1616
|
-
return match(/^}/);
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
/**
|
|
1620
|
-
* Parse ruleset.
|
|
1621
|
-
*/
|
|
1622
|
-
|
|
1623
|
-
function rules() {
|
|
1624
|
-
var node;
|
|
1625
|
-
var rules = [];
|
|
1626
|
-
whitespace();
|
|
1627
|
-
comments(rules);
|
|
1628
|
-
while (css.length && css.charAt(0) != '}' && (node = atrule() || rule())) {
|
|
1629
|
-
if (node !== false) {
|
|
1630
|
-
rules.push(node);
|
|
1631
|
-
comments(rules);
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
return rules;
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
/**
|
|
1638
|
-
* Match `re` and return captures.
|
|
1639
|
-
*/
|
|
1640
|
-
|
|
1641
|
-
function match(re) {
|
|
1642
|
-
var m = re.exec(css);
|
|
1643
|
-
if (!m) return;
|
|
1644
|
-
var str = m[0];
|
|
1645
|
-
updatePosition(str);
|
|
1646
|
-
css = css.slice(str.length);
|
|
1647
|
-
return m;
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1650
|
-
/**
|
|
1651
|
-
* Parse whitespace.
|
|
1652
|
-
*/
|
|
1653
|
-
|
|
1654
|
-
function whitespace() {
|
|
1655
|
-
match(/^\s*/);
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
/**
|
|
1659
|
-
* Parse comments;
|
|
1660
|
-
*/
|
|
1661
|
-
|
|
1662
|
-
function comments(rules) {
|
|
1663
|
-
var c;
|
|
1664
|
-
rules = rules || [];
|
|
1665
|
-
while (c = comment()) {
|
|
1666
|
-
if (c !== false) {
|
|
1667
|
-
rules.push(c);
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1670
|
-
return rules;
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
/**
|
|
1674
|
-
* Parse comment.
|
|
1675
|
-
*/
|
|
1676
|
-
|
|
1677
|
-
function comment() {
|
|
1678
|
-
var pos = position();
|
|
1679
|
-
if ('/' != css.charAt(0) || '*' != css.charAt(1)) return;
|
|
1680
|
-
|
|
1681
|
-
var i = 2;
|
|
1682
|
-
while ("" != css.charAt(i) && ('*' != css.charAt(i) || '/' != css.charAt(i + 1))) ++i;
|
|
1683
|
-
i += 2;
|
|
1684
|
-
|
|
1685
|
-
if ("" === css.charAt(i-1)) {
|
|
1686
|
-
return error('End of comment missing');
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
var str = css.slice(2, i - 2);
|
|
1690
|
-
column += 2;
|
|
1691
|
-
updatePosition(str);
|
|
1692
|
-
css = css.slice(i);
|
|
1693
|
-
column += 2;
|
|
1694
|
-
|
|
1695
|
-
return pos({
|
|
1696
|
-
type: 'comment',
|
|
1697
|
-
comment: str
|
|
1698
|
-
});
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
/**
|
|
1702
|
-
* Parse selector.
|
|
1703
|
-
*/
|
|
1704
|
-
|
|
1705
|
-
function selector() {
|
|
1706
|
-
var m = match(/^([^{]+)/);
|
|
1707
|
-
if (!m) return;
|
|
1708
|
-
/* @fix Remove all comments from selectors
|
|
1709
|
-
* http://ostermiller.org/findcomment.html */
|
|
1710
|
-
return trim(m[0])
|
|
1711
|
-
.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, '')
|
|
1712
|
-
.replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, function(m) {
|
|
1713
|
-
return m.replace(/,/g, '\u200C');
|
|
1714
|
-
})
|
|
1715
|
-
.split(/\s*(?![^(]*\)),\s*/)
|
|
1716
|
-
.map(function(s) {
|
|
1717
|
-
return s.replace(/\u200C/g, ',');
|
|
1718
|
-
});
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
/**
|
|
1722
|
-
* Parse declaration.
|
|
1723
|
-
*/
|
|
1724
|
-
|
|
1725
|
-
function declaration() {
|
|
1726
|
-
var pos = position();
|
|
1727
|
-
|
|
1728
|
-
// prop
|
|
1729
|
-
var prop = match(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
|
|
1730
|
-
if (!prop) return;
|
|
1731
|
-
prop = trim(prop[0]);
|
|
1732
|
-
|
|
1733
|
-
// :
|
|
1734
|
-
if (!match(/^:\s*/)) return error("property missing ':'");
|
|
1735
|
-
|
|
1736
|
-
// val
|
|
1737
|
-
var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/);
|
|
1738
|
-
|
|
1739
|
-
var ret = pos({
|
|
1740
|
-
type: 'declaration',
|
|
1741
|
-
property: prop.replace(commentre, ''),
|
|
1742
|
-
value: val ? trim(val[0]).replace(commentre, '') : ''
|
|
1743
|
-
});
|
|
1744
|
-
|
|
1745
|
-
// ;
|
|
1746
|
-
match(/^[;\s]*/);
|
|
1747
|
-
|
|
1748
|
-
return ret;
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
/**
|
|
1752
|
-
* Parse declarations.
|
|
1753
|
-
*/
|
|
1754
|
-
|
|
1755
|
-
function declarations() {
|
|
1756
|
-
var decls = [];
|
|
1757
|
-
|
|
1758
|
-
if (!open()) return error("missing '{'");
|
|
1759
|
-
comments(decls);
|
|
1760
|
-
|
|
1761
|
-
// declarations
|
|
1762
|
-
var decl;
|
|
1763
|
-
while (decl = declaration()) {
|
|
1764
|
-
if (decl !== false) {
|
|
1765
|
-
decls.push(decl);
|
|
1766
|
-
comments(decls);
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
if (!close()) return error("missing '}'");
|
|
1771
|
-
return decls;
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
/**
|
|
1775
|
-
* Parse keyframe.
|
|
1776
|
-
*/
|
|
1777
|
-
|
|
1778
|
-
function keyframe() {
|
|
1779
|
-
var m;
|
|
1780
|
-
var vals = [];
|
|
1781
|
-
var pos = position();
|
|
1782
|
-
|
|
1783
|
-
while (m = match(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/)) {
|
|
1784
|
-
vals.push(m[1]);
|
|
1785
|
-
match(/^,\s*/);
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
if (!vals.length) return;
|
|
1789
|
-
|
|
1790
|
-
return pos({
|
|
1791
|
-
type: 'keyframe',
|
|
1792
|
-
values: vals,
|
|
1793
|
-
declarations: declarations()
|
|
1794
|
-
});
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
/**
|
|
1798
|
-
* Parse keyframes.
|
|
1799
|
-
*/
|
|
1800
|
-
|
|
1801
|
-
function atkeyframes() {
|
|
1802
|
-
var pos = position();
|
|
1803
|
-
var m = match(/^@([-\w]+)?keyframes\s*/);
|
|
1804
|
-
|
|
1805
|
-
if (!m) return;
|
|
1806
|
-
var vendor = m[1];
|
|
1807
|
-
|
|
1808
|
-
// identifier
|
|
1809
|
-
var m = match(/^([-\w]+)\s*/);
|
|
1810
|
-
if (!m) return error("@keyframes missing name");
|
|
1811
|
-
var name = m[1];
|
|
1812
|
-
|
|
1813
|
-
if (!open()) return error("@keyframes missing '{'");
|
|
1814
|
-
|
|
1815
|
-
var frame;
|
|
1816
|
-
var frames = comments();
|
|
1817
|
-
while (frame = keyframe()) {
|
|
1818
|
-
frames.push(frame);
|
|
1819
|
-
frames = frames.concat(comments());
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
if (!close()) return error("@keyframes missing '}'");
|
|
1823
|
-
|
|
1824
|
-
return pos({
|
|
1825
|
-
type: 'keyframes',
|
|
1826
|
-
name: name,
|
|
1827
|
-
vendor: vendor,
|
|
1828
|
-
keyframes: frames
|
|
1829
|
-
});
|
|
1830
|
-
}
|
|
1831
|
-
|
|
1832
|
-
/**
|
|
1833
|
-
* Parse supports.
|
|
1834
|
-
*/
|
|
1835
|
-
|
|
1836
|
-
function atsupports() {
|
|
1837
|
-
var pos = position();
|
|
1838
|
-
var m = match(/^@supports *([^{]+)/);
|
|
1839
|
-
|
|
1840
|
-
if (!m) return;
|
|
1841
|
-
var supports = trim(m[1]);
|
|
1842
|
-
|
|
1843
|
-
if (!open()) return error("@supports missing '{'");
|
|
1844
|
-
|
|
1845
|
-
var style = comments().concat(rules());
|
|
1846
|
-
|
|
1847
|
-
if (!close()) return error("@supports missing '}'");
|
|
1848
|
-
|
|
1849
|
-
return pos({
|
|
1850
|
-
type: 'supports',
|
|
1851
|
-
supports: supports,
|
|
1852
|
-
rules: style
|
|
1853
|
-
});
|
|
1854
|
-
}
|
|
1855
|
-
|
|
1856
|
-
/**
|
|
1857
|
-
* Parse host.
|
|
1858
|
-
*/
|
|
1859
|
-
|
|
1860
|
-
function athost() {
|
|
1861
|
-
var pos = position();
|
|
1862
|
-
var m = match(/^@host\s*/);
|
|
1863
|
-
|
|
1864
|
-
if (!m) return;
|
|
1865
|
-
|
|
1866
|
-
if (!open()) return error("@host missing '{'");
|
|
1867
|
-
|
|
1868
|
-
var style = comments().concat(rules());
|
|
1869
|
-
|
|
1870
|
-
if (!close()) return error("@host missing '}'");
|
|
1871
|
-
|
|
1872
|
-
return pos({
|
|
1873
|
-
type: 'host',
|
|
1874
|
-
rules: style
|
|
1875
|
-
});
|
|
1876
|
-
}
|
|
1877
|
-
|
|
1878
|
-
/**
|
|
1879
|
-
* Parse media.
|
|
1880
|
-
*/
|
|
1881
|
-
|
|
1882
|
-
function atmedia() {
|
|
1883
|
-
var pos = position();
|
|
1884
|
-
var m = match(/^@media *([^{]+)/);
|
|
1885
|
-
|
|
1886
|
-
if (!m) return;
|
|
1887
|
-
var media = trim(m[1]);
|
|
1888
236
|
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
return pos({
|
|
1896
|
-
type: 'media',
|
|
1897
|
-
media: media,
|
|
1898
|
-
rules: style
|
|
1899
|
-
});
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
/**
|
|
1904
|
-
* Parse custom-media.
|
|
1905
|
-
*/
|
|
1906
|
-
|
|
1907
|
-
function atcustommedia() {
|
|
1908
|
-
var pos = position();
|
|
1909
|
-
var m = match(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);
|
|
1910
|
-
if (!m) return;
|
|
1911
|
-
|
|
1912
|
-
return pos({
|
|
1913
|
-
type: 'custom-media',
|
|
1914
|
-
name: trim(m[1]),
|
|
1915
|
-
media: trim(m[2])
|
|
1916
|
-
});
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
/**
|
|
1920
|
-
* Parse paged media.
|
|
1921
|
-
*/
|
|
1922
|
-
|
|
1923
|
-
function atpage() {
|
|
1924
|
-
var pos = position();
|
|
1925
|
-
var m = match(/^@page */);
|
|
1926
|
-
if (!m) return;
|
|
1927
|
-
|
|
1928
|
-
var sel = selector() || [];
|
|
1929
|
-
|
|
1930
|
-
if (!open()) return error("@page missing '{'");
|
|
1931
|
-
var decls = comments();
|
|
1932
|
-
|
|
1933
|
-
// declarations
|
|
1934
|
-
var decl;
|
|
1935
|
-
while (decl = declaration()) {
|
|
1936
|
-
decls.push(decl);
|
|
1937
|
-
decls = decls.concat(comments());
|
|
1938
|
-
}
|
|
1939
|
-
|
|
1940
|
-
if (!close()) return error("@page missing '}'");
|
|
1941
|
-
|
|
1942
|
-
return pos({
|
|
1943
|
-
type: 'page',
|
|
1944
|
-
selectors: sel,
|
|
1945
|
-
declarations: decls
|
|
1946
|
-
});
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
/**
|
|
1950
|
-
* Parse document.
|
|
1951
|
-
*/
|
|
1952
|
-
|
|
1953
|
-
function atdocument() {
|
|
1954
|
-
var pos = position();
|
|
1955
|
-
var m = match(/^@([-\w]+)?document *([^{]+)/);
|
|
1956
|
-
if (!m) return;
|
|
1957
|
-
|
|
1958
|
-
var vendor = trim(m[1]);
|
|
1959
|
-
var doc = trim(m[2]);
|
|
1960
|
-
|
|
1961
|
-
if (!open()) return error("@document missing '{'");
|
|
1962
|
-
|
|
1963
|
-
var style = comments().concat(rules());
|
|
1964
|
-
|
|
1965
|
-
if (!close()) return error("@document missing '}'");
|
|
1966
|
-
|
|
1967
|
-
return pos({
|
|
1968
|
-
type: 'document',
|
|
1969
|
-
document: doc,
|
|
1970
|
-
vendor: vendor,
|
|
1971
|
-
rules: style
|
|
1972
|
-
});
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
/**
|
|
1976
|
-
* Parse font-face.
|
|
1977
|
-
*/
|
|
1978
|
-
|
|
1979
|
-
function atfontface() {
|
|
1980
|
-
var pos = position();
|
|
1981
|
-
var m = match(/^@font-face\s*/);
|
|
1982
|
-
if (!m) return;
|
|
1983
|
-
|
|
1984
|
-
if (!open()) return error("@font-face missing '{'");
|
|
1985
|
-
var decls = comments();
|
|
1986
|
-
|
|
1987
|
-
// declarations
|
|
1988
|
-
var decl;
|
|
1989
|
-
while (decl = declaration()) {
|
|
1990
|
-
decls.push(decl);
|
|
1991
|
-
decls = decls.concat(comments());
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
if (!close()) return error("@font-face missing '}'");
|
|
1995
|
-
|
|
1996
|
-
return pos({
|
|
1997
|
-
type: 'font-face',
|
|
1998
|
-
declarations: decls
|
|
1999
|
-
});
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
/**
|
|
2003
|
-
* Parse import
|
|
2004
|
-
*/
|
|
2005
|
-
|
|
2006
|
-
var atimport = _compileAtrule('import');
|
|
2007
|
-
|
|
2008
|
-
/**
|
|
2009
|
-
* Parse charset
|
|
2010
|
-
*/
|
|
2011
|
-
|
|
2012
|
-
var atcharset = _compileAtrule('charset');
|
|
2013
|
-
|
|
2014
|
-
/**
|
|
2015
|
-
* Parse namespace
|
|
2016
|
-
*/
|
|
2017
|
-
|
|
2018
|
-
var atnamespace = _compileAtrule('namespace');
|
|
2019
|
-
|
|
2020
|
-
/**
|
|
2021
|
-
* Parse non-block at-rules
|
|
2022
|
-
*/
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
function _compileAtrule(name) {
|
|
2026
|
-
var re = new RegExp('^@' + name + '\\s*([^;]+);');
|
|
2027
|
-
return function() {
|
|
2028
|
-
var pos = position();
|
|
2029
|
-
var m = match(re);
|
|
2030
|
-
if (!m) return;
|
|
2031
|
-
var ret = { type: name };
|
|
2032
|
-
ret[name] = m[1].trim();
|
|
2033
|
-
return pos(ret);
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
|
-
/**
|
|
2038
|
-
* Parse at rule.
|
|
2039
|
-
*/
|
|
2040
|
-
|
|
2041
|
-
function atrule() {
|
|
2042
|
-
if (css[0] != '@') return;
|
|
2043
|
-
|
|
2044
|
-
return atkeyframes()
|
|
2045
|
-
|| atmedia()
|
|
2046
|
-
|| atcustommedia()
|
|
2047
|
-
|| atsupports()
|
|
2048
|
-
|| atimport()
|
|
2049
|
-
|| atcharset()
|
|
2050
|
-
|| atnamespace()
|
|
2051
|
-
|| atdocument()
|
|
2052
|
-
|| atpage()
|
|
2053
|
-
|| athost()
|
|
2054
|
-
|| atfontface();
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
|
-
/**
|
|
2058
|
-
* Parse rule.
|
|
2059
|
-
*/
|
|
2060
|
-
|
|
2061
|
-
function rule() {
|
|
2062
|
-
var pos = position();
|
|
2063
|
-
var sel = selector();
|
|
2064
|
-
|
|
2065
|
-
if (!sel) return error('selector missing');
|
|
2066
|
-
comments();
|
|
2067
|
-
|
|
2068
|
-
return pos({
|
|
2069
|
-
type: 'rule',
|
|
2070
|
-
selectors: sel,
|
|
2071
|
-
declarations: declarations()
|
|
2072
|
-
});
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
|
-
return addParent(stylesheet());
|
|
2076
|
-
};
|
|
2077
|
-
|
|
2078
|
-
/**
|
|
2079
|
-
* Trim `str`.
|
|
2080
|
-
*/
|
|
2081
|
-
|
|
2082
|
-
function trim(str) {
|
|
2083
|
-
return str ? str.replace(/^\s+|\s+$/g, '') : '';
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
|
-
/**
|
|
2087
|
-
* Adds non-enumerable parent node reference to each node.
|
|
2088
|
-
*/
|
|
2089
|
-
|
|
2090
|
-
function addParent(obj, parent) {
|
|
2091
|
-
var isNode = obj && typeof obj.type === 'string';
|
|
2092
|
-
var childParent = isNode ? obj : parent;
|
|
2093
|
-
|
|
2094
|
-
for (var k in obj) {
|
|
2095
|
-
var value = obj[k];
|
|
2096
|
-
if (Array.isArray(value)) {
|
|
2097
|
-
value.forEach(function(v) { addParent(v, childParent); });
|
|
2098
|
-
} else if (value && typeof value === 'object') {
|
|
2099
|
-
addParent(value, childParent);
|
|
2100
|
-
}
|
|
2101
|
-
}
|
|
2102
|
-
|
|
2103
|
-
if (isNode) {
|
|
2104
|
-
Object.defineProperty(obj, 'parent', {
|
|
2105
|
-
configurable: true,
|
|
2106
|
-
writable: true,
|
|
2107
|
-
enumerable: false,
|
|
2108
|
-
value: parent || null
|
|
2109
|
-
});
|
|
2110
|
-
}
|
|
2111
|
-
|
|
2112
|
-
return obj;
|
|
2113
|
-
}
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
/***/ }),
|
|
2117
|
-
/* 14 */
|
|
237
|
+
/***/ "./node_modules/react-dom-core/lib/SVGDOMPropertyConfig.js":
|
|
238
|
+
/*!*****************************************************************!*\
|
|
239
|
+
!*** ./node_modules/react-dom-core/lib/SVGDOMPropertyConfig.js ***!
|
|
240
|
+
\*****************************************************************/
|
|
241
|
+
/*! no static exports found */
|
|
2118
242
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2119
243
|
|
|
2120
244
|
"use strict";
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
/**
|
|
2124
|
-
* Module dependencies.
|
|
2125
|
-
*/
|
|
2126
|
-
var domparser = __webpack_require__(15);
|
|
2127
|
-
var utilities = __webpack_require__(2);
|
|
2128
|
-
var formatDOM = utilities.formatDOM;
|
|
2129
|
-
var isIE9 = utilities.isIE(9);
|
|
2130
|
-
|
|
2131
|
-
/**
|
|
2132
|
-
* Constants.
|
|
2133
|
-
*/
|
|
2134
|
-
var DIRECTIVE_REGEX = /<(![a-zA-Z\s]+)>/; // e.g., <!doctype html>
|
|
2135
|
-
|
|
2136
|
-
/**
|
|
2137
|
-
* Parses HTML and reformats DOM nodes output.
|
|
2138
|
-
*
|
|
2139
|
-
* @param {String} html - The HTML string.
|
|
2140
|
-
* @return {Array} - The formatted DOM nodes.
|
|
2141
|
-
*/
|
|
2142
|
-
module.exports = function parseDOM(html) {
|
|
2143
|
-
if (typeof html !== 'string') {
|
|
2144
|
-
throw new TypeError('First argument must be a string.');
|
|
2145
|
-
}
|
|
2146
|
-
if (!html) return [];
|
|
2147
|
-
|
|
2148
|
-
// match directive
|
|
2149
|
-
var match = html.match(DIRECTIVE_REGEX);
|
|
2150
|
-
var directive;
|
|
2151
|
-
if (match && match[1]) {
|
|
2152
|
-
directive = match[1];
|
|
2153
|
-
|
|
2154
|
-
// remove directive in IE9 because DOMParser uses
|
|
2155
|
-
// MIME type 'text/xml' instead of 'text/html'
|
|
2156
|
-
if (isIE9) {
|
|
2157
|
-
html = html.replace(match[0], '');
|
|
2158
|
-
}
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
return formatDOM(domparser(html), null, directive);
|
|
2162
|
-
};
|
|
2163
|
-
|
|
245
|
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar NS = {\n xlink: 'http://www.w3.org/1999/xlink',\n xml: 'http://www.w3.org/XML/1998/namespace'\n};\n\n// We use attributes for everything SVG so let's avoid some duplication and run\n// code instead.\n// The following are all specified in the HTML config already so we exclude here.\n// - class (as className)\n// - color\n// - height\n// - id\n// - lang\n// - max\n// - media\n// - method\n// - min\n// - name\n// - style\n// - target\n// - type\n// - width\nvar ATTRS = {\n accentHeight: 'accent-height',\n accumulate: 0,\n additive: 0,\n alignmentBaseline: 'alignment-baseline',\n allowReorder: 'allowReorder',\n alphabetic: 0,\n amplitude: 0,\n arabicForm: 'arabic-form',\n ascent: 0,\n attributeName: 'attributeName',\n attributeType: 'attributeType',\n autoReverse: 'autoReverse',\n azimuth: 0,\n baseFrequency: 'baseFrequency',\n baseProfile: 'baseProfile',\n baselineShift: 'baseline-shift',\n bbox: 0,\n begin: 0,\n bias: 0,\n by: 0,\n calcMode: 'calcMode',\n capHeight: 'cap-height',\n clip: 0,\n clipPath: 'clip-path',\n clipRule: 'clip-rule',\n clipPathUnits: 'clipPathUnits',\n colorInterpolation: 'color-interpolation',\n colorInterpolationFilters: 'color-interpolation-filters',\n colorProfile: 'color-profile',\n colorRendering: 'color-rendering',\n contentScriptType: 'contentScriptType',\n contentStyleType: 'contentStyleType',\n cursor: 0,\n cx: 0,\n cy: 0,\n d: 0,\n decelerate: 0,\n descent: 0,\n diffuseConstant: 'diffuseConstant',\n direction: 0,\n display: 0,\n divisor: 0,\n dominantBaseline: 'dominant-baseline',\n dur: 0,\n dx: 0,\n dy: 0,\n edgeMode: 'edgeMode',\n elevation: 0,\n enableBackground: 'enable-background',\n end: 0,\n exponent: 0,\n externalResourcesRequired: 'externalResourcesRequired',\n fill: 0,\n fillOpacity: 'fill-opacity',\n fillRule: 'fill-rule',\n filter: 0,\n filterRes: 'filterRes',\n filterUnits: 'filterUnits',\n floodColor: 'flood-color',\n floodOpacity: 'flood-opacity',\n focusable: 0,\n fontFamily: 'font-family',\n fontSize: 'font-size',\n fontSizeAdjust: 'font-size-adjust',\n fontStretch: 'font-stretch',\n fontStyle: 'font-style',\n fontVariant: 'font-variant',\n fontWeight: 'font-weight',\n format: 0,\n from: 0,\n fx: 0,\n fy: 0,\n g1: 0,\n g2: 0,\n glyphName: 'glyph-name',\n glyphOrientationHorizontal: 'glyph-orientation-horizontal',\n glyphOrientationVertical: 'glyph-orientation-vertical',\n glyphRef: 'glyphRef',\n gradientTransform: 'gradientTransform',\n gradientUnits: 'gradientUnits',\n hanging: 0,\n horizAdvX: 'horiz-adv-x',\n horizOriginX: 'horiz-origin-x',\n ideographic: 0,\n imageRendering: 'image-rendering',\n 'in': 0,\n in2: 0,\n intercept: 0,\n k: 0,\n k1: 0,\n k2: 0,\n k3: 0,\n k4: 0,\n kernelMatrix: 'kernelMatrix',\n kernelUnitLength: 'kernelUnitLength',\n kerning: 0,\n keyPoints: 'keyPoints',\n keySplines: 'keySplines',\n keyTimes: 'keyTimes',\n lengthAdjust: 'lengthAdjust',\n letterSpacing: 'letter-spacing',\n lightingColor: 'lighting-color',\n limitingConeAngle: 'limitingConeAngle',\n local: 0,\n markerEnd: 'marker-end',\n markerMid: 'marker-mid',\n markerStart: 'marker-start',\n markerHeight: 'markerHeight',\n markerUnits: 'markerUnits',\n markerWidth: 'markerWidth',\n mask: 0,\n maskContentUnits: 'maskContentUnits',\n maskUnits: 'maskUnits',\n mathematical: 0,\n mode: 0,\n numOctaves: 'numOctaves',\n offset: 0,\n opacity: 0,\n operator: 0,\n order: 0,\n orient: 0,\n orientation: 0,\n origin: 0,\n overflow: 0,\n overlinePosition: 'overline-position',\n overlineThickness: 'overline-thickness',\n paintOrder: 'paint-order',\n panose1: 'panose-1',\n pathLength: 'pathLength',\n patternContentUnits: 'patternContentUnits',\n patternTransform: 'patternTransform',\n patternUnits: 'patternUnits',\n pointerEvents: 'pointer-events',\n points: 0,\n pointsAtX: 'pointsAtX',\n pointsAtY: 'pointsAtY',\n pointsAtZ: 'pointsAtZ',\n preserveAlpha: 'preserveAlpha',\n preserveAspectRatio: 'preserveAspectRatio',\n primitiveUnits: 'primitiveUnits',\n r: 0,\n radius: 0,\n refX: 'refX',\n refY: 'refY',\n renderingIntent: 'rendering-intent',\n repeatCount: 'repeatCount',\n repeatDur: 'repeatDur',\n requiredExtensions: 'requiredExtensions',\n requiredFeatures: 'requiredFeatures',\n restart: 0,\n result: 0,\n rotate: 0,\n rx: 0,\n ry: 0,\n scale: 0,\n seed: 0,\n shapeRendering: 'shape-rendering',\n slope: 0,\n spacing: 0,\n specularConstant: 'specularConstant',\n specularExponent: 'specularExponent',\n speed: 0,\n spreadMethod: 'spreadMethod',\n startOffset: 'startOffset',\n stdDeviation: 'stdDeviation',\n stemh: 0,\n stemv: 0,\n stitchTiles: 'stitchTiles',\n stopColor: 'stop-color',\n stopOpacity: 'stop-opacity',\n strikethroughPosition: 'strikethrough-position',\n strikethroughThickness: 'strikethrough-thickness',\n string: 0,\n stroke: 0,\n strokeDasharray: 'stroke-dasharray',\n strokeDashoffset: 'stroke-dashoffset',\n strokeLinecap: 'stroke-linecap',\n strokeLinejoin: 'stroke-linejoin',\n strokeMiterlimit: 'stroke-miterlimit',\n strokeOpacity: 'stroke-opacity',\n strokeWidth: 'stroke-width',\n surfaceScale: 'surfaceScale',\n systemLanguage: 'systemLanguage',\n tableValues: 'tableValues',\n targetX: 'targetX',\n targetY: 'targetY',\n textAnchor: 'text-anchor',\n textDecoration: 'text-decoration',\n textRendering: 'text-rendering',\n textLength: 'textLength',\n to: 0,\n transform: 0,\n u1: 0,\n u2: 0,\n underlinePosition: 'underline-position',\n underlineThickness: 'underline-thickness',\n unicode: 0,\n unicodeBidi: 'unicode-bidi',\n unicodeRange: 'unicode-range',\n unitsPerEm: 'units-per-em',\n vAlphabetic: 'v-alphabetic',\n vHanging: 'v-hanging',\n vIdeographic: 'v-ideographic',\n vMathematical: 'v-mathematical',\n values: 0,\n vectorEffect: 'vector-effect',\n version: 0,\n vertAdvY: 'vert-adv-y',\n vertOriginX: 'vert-origin-x',\n vertOriginY: 'vert-origin-y',\n viewBox: 'viewBox',\n viewTarget: 'viewTarget',\n visibility: 0,\n widths: 0,\n wordSpacing: 'word-spacing',\n writingMode: 'writing-mode',\n x: 0,\n xHeight: 'x-height',\n x1: 0,\n x2: 0,\n xChannelSelector: 'xChannelSelector',\n xlinkActuate: 'xlink:actuate',\n xlinkArcrole: 'xlink:arcrole',\n xlinkHref: 'xlink:href',\n xlinkRole: 'xlink:role',\n xlinkShow: 'xlink:show',\n xlinkTitle: 'xlink:title',\n xlinkType: 'xlink:type',\n xmlBase: 'xml:base',\n xmlns: 0,\n xmlnsXlink: 'xmlns:xlink',\n xmlLang: 'xml:lang',\n xmlSpace: 'xml:space',\n y: 0,\n y1: 0,\n y2: 0,\n yChannelSelector: 'yChannelSelector',\n z: 0,\n zoomAndPan: 'zoomAndPan'\n};\n\nvar SVGDOMPropertyConfig = {\n Properties: {},\n DOMAttributeNamespaces: {\n xlinkActuate: NS.xlink,\n xlinkArcrole: NS.xlink,\n xlinkHref: NS.xlink,\n xlinkRole: NS.xlink,\n xlinkShow: NS.xlink,\n xlinkTitle: NS.xlink,\n xlinkType: NS.xlink,\n xmlBase: NS.xml,\n xmlLang: NS.xml,\n xmlSpace: NS.xml\n },\n DOMAttributeNames: {}\n};\n\nObject.keys(ATTRS).forEach(function (key) {\n SVGDOMPropertyConfig.Properties[key] = 0;\n if (ATTRS[key]) {\n SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];\n }\n});\n\nmodule.exports = SVGDOMPropertyConfig;\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/react-dom-core/lib/SVGDOMPropertyConfig.js?");
|
|
2164
246
|
|
|
2165
247
|
/***/ }),
|
|
2166
|
-
|
|
248
|
+
|
|
249
|
+
/***/ "./node_modules/react-dom-core/lib/reactProdInvariant.js":
|
|
250
|
+
/*!***************************************************************!*\
|
|
251
|
+
!*** ./node_modules/react-dom-core/lib/reactProdInvariant.js ***!
|
|
252
|
+
\***************************************************************/
|
|
253
|
+
/*! no static exports found */
|
|
2167
254
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2168
255
|
|
|
2169
256
|
"use strict";
|
|
257
|
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n\n/**\n * WARNING: DO NOT manually require this module.\n * This is a replacement for `invariant(...)` used by the error code system\n * and will _only_ be required by the corresponding babel pass.\n * It always throws.\n */\n\nfunction reactProdInvariant(code) {\n var argCount = arguments.length - 1;\n\n var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;\n\n for (var argIdx = 0; argIdx < argCount; argIdx++) {\n message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);\n }\n\n message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';\n\n var error = new Error(message);\n error.name = 'Invariant Violation';\n error.framesToPop = 1; // we don't care about reactProdInvariant's own frame\n\n throw error;\n}\n\nmodule.exports = reactProdInvariant;\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/react-dom-core/lib/reactProdInvariant.js?");
|
|
2170
258
|
|
|
259
|
+
/***/ }),
|
|
2171
260
|
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
/**
|
|
2179
|
-
* Constants.
|
|
2180
|
-
*/
|
|
2181
|
-
var HTML_TAG_NAME = 'html';
|
|
2182
|
-
var BODY_TAG_NAME = 'body';
|
|
2183
|
-
var HEAD_TAG_NAME = 'head';
|
|
2184
|
-
var FIRST_TAG_REGEX = /<([a-zA-Z]+[0-9]?)/; // e.g., <h1>
|
|
2185
|
-
var HEAD_REGEX = /<\/head>/i;
|
|
2186
|
-
var BODY_REGEX = /<\/body>/i;
|
|
2187
|
-
// http://www.w3.org/TR/html/syntax.html#void-elements
|
|
2188
|
-
var VOID_ELEMENTS_REGEX = /<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi;
|
|
2189
|
-
|
|
2190
|
-
// browser support
|
|
2191
|
-
var isIE = detectIE();
|
|
2192
|
-
var isIE9 = detectIE(9);
|
|
2193
|
-
|
|
2194
|
-
/**
|
|
2195
|
-
* DOMParser (performance: slow).
|
|
2196
|
-
*
|
|
2197
|
-
* https://developer.mozilla.org/docs/Web/API/DOMParser#Parsing_an_SVG_or_HTML_document
|
|
2198
|
-
*/
|
|
2199
|
-
var parseFromString;
|
|
2200
|
-
if (typeof window.DOMParser === 'function') {
|
|
2201
|
-
var domParser = new window.DOMParser();
|
|
2202
|
-
// IE9 does not support 'text/html' MIME type
|
|
2203
|
-
// https://msdn.microsoft.com/en-us/library/ff975278(v=vs.85).aspx
|
|
2204
|
-
var MIME_TYPE = isIE9 ? 'text/xml' : 'text/html';
|
|
2205
|
-
|
|
2206
|
-
/**
|
|
2207
|
-
* Creates an HTML document using `DOMParser.parseFromString`.
|
|
2208
|
-
*
|
|
2209
|
-
* @param {String} html - The HTML string.
|
|
2210
|
-
* @param {String} [tagName] - The element to render the HTML (with 'body' as fallback).
|
|
2211
|
-
* @return {HTMLDocument}
|
|
2212
|
-
*/
|
|
2213
|
-
parseFromString = function domStringParser(html, tagName) {
|
|
2214
|
-
if (tagName) {
|
|
2215
|
-
html = ['<', tagName, '>', html, '</', tagName, '>'].join('');
|
|
2216
|
-
}
|
|
2217
|
-
// because IE9 only supports MIME type 'text/xml', void elements need to be self-closed
|
|
2218
|
-
if (isIE9) {
|
|
2219
|
-
html = html.replace(VOID_ELEMENTS_REGEX, '<$1$2$3/>');
|
|
2220
|
-
}
|
|
2221
|
-
return domParser.parseFromString(html, MIME_TYPE);
|
|
2222
|
-
};
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
/**
|
|
2226
|
-
* DOMImplementation (performance: fair).
|
|
2227
|
-
*
|
|
2228
|
-
* https://developer.mozilla.org/docs/Web/API/DOMImplementation/createHTMLDocument
|
|
2229
|
-
*/
|
|
2230
|
-
var parseFromDocument;
|
|
2231
|
-
if (typeof document.implementation === 'object') {
|
|
2232
|
-
// title parameter is required in IE
|
|
2233
|
-
// https://msdn.microsoft.com/en-us/library/ff975457(v=vs.85).aspx
|
|
2234
|
-
var doc = document.implementation.createHTMLDocument(isIE ? 'HTML_DOM_PARSER_TITLE' : undefined);
|
|
2235
|
-
|
|
2236
|
-
/**
|
|
2237
|
-
* Use HTML document created by `document.implementation.createHTMLDocument`.
|
|
2238
|
-
*
|
|
2239
|
-
* @param {String} html - The HTML string.
|
|
2240
|
-
* @param {String} [tagName] - The element to render the HTML (with 'body' as fallback).
|
|
2241
|
-
* @return {HTMLDocument}
|
|
2242
|
-
*/
|
|
2243
|
-
parseFromDocument = function createHTMLDocument(html, tagName) {
|
|
2244
|
-
if (tagName) {
|
|
2245
|
-
doc.documentElement.getElementsByTagName(tagName)[0].innerHTML = html;
|
|
2246
|
-
return doc;
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
try {
|
|
2250
|
-
doc.documentElement.innerHTML = html;
|
|
2251
|
-
return doc;
|
|
2252
|
-
// fallback when certain elements in `documentElement` are read-only (IE9)
|
|
2253
|
-
} catch (err) {
|
|
2254
|
-
if (parseFromString) return parseFromString(html);
|
|
2255
|
-
}
|
|
2256
|
-
};
|
|
2257
|
-
}
|
|
2258
|
-
|
|
2259
|
-
/**
|
|
2260
|
-
* Template (performance: fast).
|
|
2261
|
-
*
|
|
2262
|
-
* https://developer.mozilla.org/docs/Web/HTML/Element/template
|
|
2263
|
-
*/
|
|
2264
|
-
var parseFromTemplate;
|
|
2265
|
-
var template = document.createElement('template');
|
|
2266
|
-
if (template.content) {
|
|
2267
|
-
|
|
2268
|
-
/**
|
|
2269
|
-
* Uses a template element (content fragment) to parse HTML.
|
|
2270
|
-
*
|
|
2271
|
-
* @param {String} html - The HTML string.
|
|
2272
|
-
* @return {NodeList}
|
|
2273
|
-
*/
|
|
2274
|
-
parseFromTemplate = function templateParser(html) {
|
|
2275
|
-
template.innerHTML = html;
|
|
2276
|
-
return template.content.childNodes;
|
|
2277
|
-
};
|
|
2278
|
-
}
|
|
2279
|
-
|
|
2280
|
-
/** Fallback document parser. */
|
|
2281
|
-
var parseWithFallback = parseFromDocument || parseFromString;
|
|
2282
|
-
|
|
2283
|
-
/**
|
|
2284
|
-
* Parses HTML string to DOM nodes.
|
|
2285
|
-
*
|
|
2286
|
-
* @param {String} html - The HTML string.
|
|
2287
|
-
* @param {String} [tagName] - The tag name.
|
|
2288
|
-
* @return {NodeList|Array}
|
|
2289
|
-
*/
|
|
2290
|
-
module.exports = function domparser(html) {
|
|
2291
|
-
// try to match first tag
|
|
2292
|
-
var tagName;
|
|
2293
|
-
var match = html.match(FIRST_TAG_REGEX);
|
|
2294
|
-
if (match && match[1]) {
|
|
2295
|
-
tagName = match[1].toLowerCase();
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
|
-
var doc;
|
|
2299
|
-
var element;
|
|
2300
|
-
var elements;
|
|
2301
|
-
|
|
2302
|
-
switch (tagName) {
|
|
2303
|
-
case HTML_TAG_NAME:
|
|
2304
|
-
if (parseFromString) {
|
|
2305
|
-
doc = parseFromString(html);
|
|
2306
|
-
|
|
2307
|
-
// the created document may come with filler head/body elements,
|
|
2308
|
-
// so ake sure to remove them if they don't actually exist
|
|
2309
|
-
if (!HEAD_REGEX.test(html)) {
|
|
2310
|
-
element = doc.getElementsByTagName(HEAD_TAG_NAME)[0];
|
|
2311
|
-
if (element) element.parentNode.removeChild(element);
|
|
2312
|
-
}
|
|
2313
|
-
if (!BODY_REGEX.test(html)) {
|
|
2314
|
-
element = doc.getElementsByTagName(BODY_TAG_NAME)[0];
|
|
2315
|
-
if (element) element.parentNode.removeChild(element);
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
return doc.getElementsByTagName(HTML_TAG_NAME);
|
|
2319
|
-
}
|
|
2320
|
-
break;
|
|
2321
|
-
|
|
2322
|
-
case HEAD_TAG_NAME:
|
|
2323
|
-
if (parseWithFallback) {
|
|
2324
|
-
elements = parseWithFallback(html).getElementsByTagName(HEAD_TAG_NAME);
|
|
2325
|
-
|
|
2326
|
-
// account for possibility of sibling
|
|
2327
|
-
if (BODY_REGEX.test(html)) {
|
|
2328
|
-
return elements[0].parentNode.childNodes;
|
|
2329
|
-
}
|
|
2330
|
-
return elements;
|
|
2331
|
-
}
|
|
2332
|
-
break;
|
|
2333
|
-
|
|
2334
|
-
case BODY_TAG_NAME:
|
|
2335
|
-
if (parseWithFallback) {
|
|
2336
|
-
elements = parseWithFallback(html).getElementsByTagName(BODY_TAG_NAME);
|
|
261
|
+
/***/ "./node_modules/style-to-object/index.js":
|
|
262
|
+
/*!***********************************************!*\
|
|
263
|
+
!*** ./node_modules/style-to-object/index.js ***!
|
|
264
|
+
\***********************************************/
|
|
265
|
+
/*! no static exports found */
|
|
266
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2337
267
|
|
|
2338
|
-
|
|
2339
|
-
if (HEAD_REGEX.test(html)) {
|
|
2340
|
-
return elements[0].parentNode.childNodes;
|
|
2341
|
-
}
|
|
2342
|
-
return elements;
|
|
2343
|
-
}
|
|
2344
|
-
break;
|
|
268
|
+
eval("var parse = __webpack_require__(/*! css/lib/parse */ \"./node_modules/css/lib/parse/index.js\");\n\n/**\n * Parses inline style.\n *\n * Example: 'color:red' => { color: 'red' }\n *\n * @param {String} style - The inline style.\n * @param {Function} [iterator] - The iterator function.\n * @return {null|Object}\n */\nmodule.exports = function parseInlineStyle(style, iterator) {\n if (!style || typeof style !== 'string') return null;\n\n // make sure to wrap declarations in placeholder\n var declarations = parse('p{' + style + '}').stylesheet.rules[0].declarations;\n var declaration, property, value;\n\n var output = null;\n var hasIterator = typeof iterator === 'function';\n\n for (var i = 0, len = declarations.length; i < len; i++) {\n declaration = declarations[i];\n property = declaration.property;\n value = declaration.value;\n\n if (hasIterator) {\n iterator(property, value, declaration);\n } else if (value) {\n output || (output = {});\n output[property] = value;\n }\n }\n\n return output;\n};\n\n\n//# sourceURL=webpack://HTMLReactParser/./node_modules/style-to-object/index.js?");
|
|
2345
269
|
|
|
2346
|
-
|
|
2347
|
-
default:
|
|
2348
|
-
if (parseFromTemplate) return parseFromTemplate(html);
|
|
2349
|
-
if (parseWithFallback) {
|
|
2350
|
-
return parseWithFallback(html, BODY_TAG_NAME).getElementsByTagName(BODY_TAG_NAME)[0].childNodes;
|
|
2351
|
-
}
|
|
2352
|
-
break;
|
|
2353
|
-
}
|
|
270
|
+
/***/ }),
|
|
2354
271
|
|
|
2355
|
-
|
|
2356
|
-
|
|
272
|
+
/***/ "react":
|
|
273
|
+
/*!**************************************************************************************!*\
|
|
274
|
+
!*** external {"amd":"react","commonjs":"react","commonjs2":"react","root":"React"} ***!
|
|
275
|
+
\**************************************************************************************/
|
|
276
|
+
/*! no static exports found */
|
|
277
|
+
/***/ (function(module, exports) {
|
|
2357
278
|
|
|
279
|
+
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_react__;\n\n//# sourceURL=webpack://HTMLReactParser/external_%7B%22amd%22:%22react%22,%22commonjs%22:%22react%22,%22commonjs2%22:%22react%22,%22root%22:%22React%22%7D?");
|
|
2358
280
|
|
|
2359
281
|
/***/ })
|
|
2360
|
-
|
|
282
|
+
|
|
283
|
+
/******/ });
|
|
2361
284
|
});
|