html-react-parser 1.2.7 → 1.4.0
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 +32 -1
- package/README.md +5 -6
- package/dist/html-react-parser.js +850 -623
- package/dist/html-react-parser.js.map +1 -1
- package/dist/html-react-parser.min.js +1 -1
- package/dist/html-react-parser.min.js.map +1 -1
- package/index.js +1 -0
- package/index.mjs +1 -0
- package/lib/attributes-to-props.js +22 -30
- package/lib/utilities.js +5 -1
- package/package.json +30 -31
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['react'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.HTMLReactParser = factory(global.React));
|
|
5
|
-
}(this, (function (require$$0) { 'use strict';
|
|
5
|
+
})(this, (function (require$$0) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -12,607 +12,819 @@
|
|
|
12
12
|
|
|
13
13
|
var htmlReactParser$1 = {exports: {}};
|
|
14
14
|
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
15
|
+
var lib$1 = {};
|
|
16
|
+
|
|
17
|
+
var possibleStandardNamesOptimized$1 = {};
|
|
18
|
+
|
|
19
|
+
// An attribute in which the DOM/SVG standard name is the same as the React prop name (e.g., 'accept').
|
|
20
|
+
var SAME$1 = 0;
|
|
21
|
+
possibleStandardNamesOptimized$1.SAME = SAME$1;
|
|
22
|
+
|
|
23
|
+
// An attribute in which the React prop name is the camelcased version of the DOM/SVG standard name (e.g., 'acceptCharset').
|
|
24
|
+
var CAMELCASE$1 = 1;
|
|
25
|
+
possibleStandardNamesOptimized$1.CAMELCASE = CAMELCASE$1;
|
|
26
|
+
|
|
27
|
+
possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
28
|
+
accept: 0,
|
|
29
|
+
acceptCharset: 1,
|
|
30
|
+
'accept-charset': 'acceptCharset',
|
|
31
|
+
accessKey: 1,
|
|
32
|
+
action: 0,
|
|
33
|
+
allowFullScreen: 1,
|
|
34
|
+
alt: 0,
|
|
35
|
+
as: 0,
|
|
36
|
+
async: 0,
|
|
37
|
+
autoCapitalize: 1,
|
|
38
|
+
autoComplete: 1,
|
|
39
|
+
autoCorrect: 1,
|
|
40
|
+
autoFocus: 1,
|
|
41
|
+
autoPlay: 1,
|
|
42
|
+
autoSave: 1,
|
|
43
|
+
capture: 0,
|
|
44
|
+
cellPadding: 1,
|
|
45
|
+
cellSpacing: 1,
|
|
46
|
+
challenge: 0,
|
|
47
|
+
charSet: 1,
|
|
48
|
+
checked: 0,
|
|
49
|
+
children: 0,
|
|
50
|
+
cite: 0,
|
|
51
|
+
class: 'className',
|
|
52
|
+
classID: 1,
|
|
53
|
+
className: 1,
|
|
54
|
+
cols: 0,
|
|
55
|
+
colSpan: 1,
|
|
56
|
+
content: 0,
|
|
57
|
+
contentEditable: 1,
|
|
58
|
+
contextMenu: 1,
|
|
59
|
+
controls: 0,
|
|
60
|
+
controlsList: 1,
|
|
61
|
+
coords: 0,
|
|
62
|
+
crossOrigin: 1,
|
|
63
|
+
dangerouslySetInnerHTML: 1,
|
|
64
|
+
data: 0,
|
|
65
|
+
dateTime: 1,
|
|
66
|
+
default: 0,
|
|
67
|
+
defaultChecked: 1,
|
|
68
|
+
defaultValue: 1,
|
|
69
|
+
defer: 0,
|
|
70
|
+
dir: 0,
|
|
71
|
+
disabled: 0,
|
|
72
|
+
disablePictureInPicture: 1,
|
|
73
|
+
disableRemotePlayback: 1,
|
|
74
|
+
download: 0,
|
|
75
|
+
draggable: 0,
|
|
76
|
+
encType: 1,
|
|
77
|
+
enterKeyHint: 1,
|
|
78
|
+
for: 'htmlFor',
|
|
79
|
+
form: 0,
|
|
80
|
+
formMethod: 1,
|
|
81
|
+
formAction: 1,
|
|
82
|
+
formEncType: 1,
|
|
83
|
+
formNoValidate: 1,
|
|
84
|
+
formTarget: 1,
|
|
85
|
+
frameBorder: 1,
|
|
86
|
+
headers: 0,
|
|
87
|
+
height: 0,
|
|
88
|
+
hidden: 0,
|
|
89
|
+
high: 0,
|
|
90
|
+
href: 0,
|
|
91
|
+
hrefLang: 1,
|
|
92
|
+
htmlFor: 1,
|
|
93
|
+
httpEquiv: 1,
|
|
94
|
+
'http-equiv': 'httpEquiv',
|
|
95
|
+
icon: 0,
|
|
96
|
+
id: 0,
|
|
97
|
+
innerHTML: 1,
|
|
98
|
+
inputMode: 1,
|
|
99
|
+
integrity: 0,
|
|
100
|
+
is: 0,
|
|
101
|
+
itemID: 1,
|
|
102
|
+
itemProp: 1,
|
|
103
|
+
itemRef: 1,
|
|
104
|
+
itemScope: 1,
|
|
105
|
+
itemType: 1,
|
|
106
|
+
keyParams: 1,
|
|
107
|
+
keyType: 1,
|
|
108
|
+
kind: 0,
|
|
109
|
+
label: 0,
|
|
110
|
+
lang: 0,
|
|
111
|
+
list: 0,
|
|
112
|
+
loop: 0,
|
|
113
|
+
low: 0,
|
|
114
|
+
manifest: 0,
|
|
115
|
+
marginWidth: 1,
|
|
116
|
+
marginHeight: 1,
|
|
117
|
+
max: 0,
|
|
118
|
+
maxLength: 1,
|
|
119
|
+
media: 0,
|
|
120
|
+
mediaGroup: 1,
|
|
121
|
+
method: 0,
|
|
122
|
+
min: 0,
|
|
123
|
+
minLength: 1,
|
|
124
|
+
multiple: 0,
|
|
125
|
+
muted: 0,
|
|
126
|
+
name: 0,
|
|
127
|
+
noModule: 1,
|
|
128
|
+
nonce: 0,
|
|
129
|
+
noValidate: 1,
|
|
130
|
+
open: 0,
|
|
131
|
+
optimum: 0,
|
|
132
|
+
pattern: 0,
|
|
133
|
+
placeholder: 0,
|
|
134
|
+
playsInline: 1,
|
|
135
|
+
poster: 0,
|
|
136
|
+
preload: 0,
|
|
137
|
+
profile: 0,
|
|
138
|
+
radioGroup: 1,
|
|
139
|
+
readOnly: 1,
|
|
140
|
+
referrerPolicy: 1,
|
|
141
|
+
rel: 0,
|
|
142
|
+
required: 0,
|
|
143
|
+
reversed: 0,
|
|
144
|
+
role: 0,
|
|
145
|
+
rows: 0,
|
|
146
|
+
rowSpan: 1,
|
|
147
|
+
sandbox: 0,
|
|
148
|
+
scope: 0,
|
|
149
|
+
scoped: 0,
|
|
150
|
+
scrolling: 0,
|
|
151
|
+
seamless: 0,
|
|
152
|
+
selected: 0,
|
|
153
|
+
shape: 0,
|
|
154
|
+
size: 0,
|
|
155
|
+
sizes: 0,
|
|
156
|
+
span: 0,
|
|
157
|
+
spellCheck: 1,
|
|
158
|
+
src: 0,
|
|
159
|
+
srcDoc: 1,
|
|
160
|
+
srcLang: 1,
|
|
161
|
+
srcSet: 1,
|
|
162
|
+
start: 0,
|
|
163
|
+
step: 0,
|
|
164
|
+
style: 0,
|
|
165
|
+
summary: 0,
|
|
166
|
+
tabIndex: 1,
|
|
167
|
+
target: 0,
|
|
168
|
+
title: 0,
|
|
169
|
+
type: 0,
|
|
170
|
+
useMap: 1,
|
|
171
|
+
value: 0,
|
|
172
|
+
width: 0,
|
|
173
|
+
wmode: 0,
|
|
174
|
+
wrap: 0,
|
|
175
|
+
about: 0,
|
|
176
|
+
accentHeight: 1,
|
|
177
|
+
'accent-height': 'accentHeight',
|
|
178
|
+
accumulate: 0,
|
|
179
|
+
additive: 0,
|
|
180
|
+
alignmentBaseline: 1,
|
|
181
|
+
'alignment-baseline': 'alignmentBaseline',
|
|
182
|
+
allowReorder: 1,
|
|
183
|
+
alphabetic: 0,
|
|
184
|
+
amplitude: 0,
|
|
185
|
+
arabicForm: 1,
|
|
186
|
+
'arabic-form': 'arabicForm',
|
|
187
|
+
ascent: 0,
|
|
188
|
+
attributeName: 1,
|
|
189
|
+
attributeType: 1,
|
|
190
|
+
autoReverse: 1,
|
|
191
|
+
azimuth: 0,
|
|
192
|
+
baseFrequency: 1,
|
|
193
|
+
baselineShift: 1,
|
|
194
|
+
'baseline-shift': 'baselineShift',
|
|
195
|
+
baseProfile: 1,
|
|
196
|
+
bbox: 0,
|
|
197
|
+
begin: 0,
|
|
198
|
+
bias: 0,
|
|
199
|
+
by: 0,
|
|
200
|
+
calcMode: 1,
|
|
201
|
+
capHeight: 1,
|
|
202
|
+
'cap-height': 'capHeight',
|
|
203
|
+
clip: 0,
|
|
204
|
+
clipPath: 1,
|
|
205
|
+
'clip-path': 'clipPath',
|
|
206
|
+
clipPathUnits: 1,
|
|
207
|
+
clipRule: 1,
|
|
208
|
+
'clip-rule': 'clipRule',
|
|
209
|
+
color: 0,
|
|
210
|
+
colorInterpolation: 1,
|
|
211
|
+
'color-interpolation': 'colorInterpolation',
|
|
212
|
+
colorInterpolationFilters: 1,
|
|
213
|
+
'color-interpolation-filters': 'colorInterpolationFilters',
|
|
214
|
+
colorProfile: 1,
|
|
215
|
+
'color-profile': 'colorProfile',
|
|
216
|
+
colorRendering: 1,
|
|
217
|
+
'color-rendering': 'colorRendering',
|
|
218
|
+
contentScriptType: 1,
|
|
219
|
+
contentStyleType: 1,
|
|
220
|
+
cursor: 0,
|
|
221
|
+
cx: 0,
|
|
222
|
+
cy: 0,
|
|
223
|
+
d: 0,
|
|
224
|
+
datatype: 0,
|
|
225
|
+
decelerate: 0,
|
|
226
|
+
descent: 0,
|
|
227
|
+
diffuseConstant: 1,
|
|
228
|
+
direction: 0,
|
|
229
|
+
display: 0,
|
|
230
|
+
divisor: 0,
|
|
231
|
+
dominantBaseline: 1,
|
|
232
|
+
'dominant-baseline': 'dominantBaseline',
|
|
233
|
+
dur: 0,
|
|
234
|
+
dx: 0,
|
|
235
|
+
dy: 0,
|
|
236
|
+
edgeMode: 1,
|
|
237
|
+
elevation: 0,
|
|
238
|
+
enableBackground: 1,
|
|
239
|
+
'enable-background': 'enableBackground',
|
|
240
|
+
end: 0,
|
|
241
|
+
exponent: 0,
|
|
242
|
+
externalResourcesRequired: 1,
|
|
243
|
+
fill: 0,
|
|
244
|
+
fillOpacity: 1,
|
|
245
|
+
'fill-opacity': 'fillOpacity',
|
|
246
|
+
fillRule: 1,
|
|
247
|
+
'fill-rule': 'fillRule',
|
|
248
|
+
filter: 0,
|
|
249
|
+
filterRes: 1,
|
|
250
|
+
filterUnits: 1,
|
|
251
|
+
floodOpacity: 1,
|
|
252
|
+
'flood-opacity': 'floodOpacity',
|
|
253
|
+
floodColor: 1,
|
|
254
|
+
'flood-color': 'floodColor',
|
|
255
|
+
focusable: 0,
|
|
256
|
+
fontFamily: 1,
|
|
257
|
+
'font-family': 'fontFamily',
|
|
258
|
+
fontSize: 1,
|
|
259
|
+
'font-size': 'fontSize',
|
|
260
|
+
fontSizeAdjust: 1,
|
|
261
|
+
'font-size-adjust': 'fontSizeAdjust',
|
|
262
|
+
fontStretch: 1,
|
|
263
|
+
'font-stretch': 'fontStretch',
|
|
264
|
+
fontStyle: 1,
|
|
265
|
+
'font-style': 'fontStyle',
|
|
266
|
+
fontVariant: 1,
|
|
267
|
+
'font-variant': 'fontVariant',
|
|
268
|
+
fontWeight: 1,
|
|
269
|
+
'font-weight': 'fontWeight',
|
|
270
|
+
format: 0,
|
|
271
|
+
from: 0,
|
|
272
|
+
fx: 0,
|
|
273
|
+
fy: 0,
|
|
274
|
+
g1: 0,
|
|
275
|
+
g2: 0,
|
|
276
|
+
glyphName: 1,
|
|
277
|
+
'glyph-name': 'glyphName',
|
|
278
|
+
glyphOrientationHorizontal: 1,
|
|
279
|
+
'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
|
|
280
|
+
glyphOrientationVertical: 1,
|
|
281
|
+
'glyph-orientation-vertical': 'glyphOrientationVertical',
|
|
282
|
+
glyphRef: 1,
|
|
283
|
+
gradientTransform: 1,
|
|
284
|
+
gradientUnits: 1,
|
|
285
|
+
hanging: 0,
|
|
286
|
+
horizAdvX: 1,
|
|
287
|
+
'horiz-adv-x': 'horizAdvX',
|
|
288
|
+
horizOriginX: 1,
|
|
289
|
+
'horiz-origin-x': 'horizOriginX',
|
|
290
|
+
ideographic: 0,
|
|
291
|
+
imageRendering: 1,
|
|
292
|
+
'image-rendering': 'imageRendering',
|
|
293
|
+
in2: 0,
|
|
294
|
+
in: 0,
|
|
295
|
+
inlist: 0,
|
|
296
|
+
intercept: 0,
|
|
297
|
+
k1: 0,
|
|
298
|
+
k2: 0,
|
|
299
|
+
k3: 0,
|
|
300
|
+
k4: 0,
|
|
301
|
+
k: 0,
|
|
302
|
+
kernelMatrix: 1,
|
|
303
|
+
kernelUnitLength: 1,
|
|
304
|
+
kerning: 0,
|
|
305
|
+
keyPoints: 1,
|
|
306
|
+
keySplines: 1,
|
|
307
|
+
keyTimes: 1,
|
|
308
|
+
lengthAdjust: 1,
|
|
309
|
+
letterSpacing: 1,
|
|
310
|
+
'letter-spacing': 'letterSpacing',
|
|
311
|
+
lightingColor: 1,
|
|
312
|
+
'lighting-color': 'lightingColor',
|
|
313
|
+
limitingConeAngle: 1,
|
|
314
|
+
local: 0,
|
|
315
|
+
markerEnd: 1,
|
|
316
|
+
'marker-end': 'markerEnd',
|
|
317
|
+
markerHeight: 1,
|
|
318
|
+
markerMid: 1,
|
|
319
|
+
'marker-mid': 'markerMid',
|
|
320
|
+
markerStart: 1,
|
|
321
|
+
'marker-start': 'markerStart',
|
|
322
|
+
markerUnits: 1,
|
|
323
|
+
markerWidth: 1,
|
|
324
|
+
mask: 0,
|
|
325
|
+
maskContentUnits: 1,
|
|
326
|
+
maskUnits: 1,
|
|
327
|
+
mathematical: 0,
|
|
328
|
+
mode: 0,
|
|
329
|
+
numOctaves: 1,
|
|
330
|
+
offset: 0,
|
|
331
|
+
opacity: 0,
|
|
332
|
+
operator: 0,
|
|
333
|
+
order: 0,
|
|
334
|
+
orient: 0,
|
|
335
|
+
orientation: 0,
|
|
336
|
+
origin: 0,
|
|
337
|
+
overflow: 0,
|
|
338
|
+
overlinePosition: 1,
|
|
339
|
+
'overline-position': 'overlinePosition',
|
|
340
|
+
overlineThickness: 1,
|
|
341
|
+
'overline-thickness': 'overlineThickness',
|
|
342
|
+
paintOrder: 1,
|
|
343
|
+
'paint-order': 'paintOrder',
|
|
344
|
+
panose1: 0,
|
|
345
|
+
'panose-1': 'panose1',
|
|
346
|
+
pathLength: 1,
|
|
347
|
+
patternContentUnits: 1,
|
|
348
|
+
patternTransform: 1,
|
|
349
|
+
patternUnits: 1,
|
|
350
|
+
pointerEvents: 1,
|
|
351
|
+
'pointer-events': 'pointerEvents',
|
|
352
|
+
points: 0,
|
|
353
|
+
pointsAtX: 1,
|
|
354
|
+
pointsAtY: 1,
|
|
355
|
+
pointsAtZ: 1,
|
|
356
|
+
prefix: 0,
|
|
357
|
+
preserveAlpha: 1,
|
|
358
|
+
preserveAspectRatio: 1,
|
|
359
|
+
primitiveUnits: 1,
|
|
360
|
+
property: 0,
|
|
361
|
+
r: 0,
|
|
362
|
+
radius: 0,
|
|
363
|
+
refX: 1,
|
|
364
|
+
refY: 1,
|
|
365
|
+
renderingIntent: 1,
|
|
366
|
+
'rendering-intent': 'renderingIntent',
|
|
367
|
+
repeatCount: 1,
|
|
368
|
+
repeatDur: 1,
|
|
369
|
+
requiredExtensions: 1,
|
|
370
|
+
requiredFeatures: 1,
|
|
371
|
+
resource: 0,
|
|
372
|
+
restart: 0,
|
|
373
|
+
result: 0,
|
|
374
|
+
results: 0,
|
|
375
|
+
rotate: 0,
|
|
376
|
+
rx: 0,
|
|
377
|
+
ry: 0,
|
|
378
|
+
scale: 0,
|
|
379
|
+
security: 0,
|
|
380
|
+
seed: 0,
|
|
381
|
+
shapeRendering: 1,
|
|
382
|
+
'shape-rendering': 'shapeRendering',
|
|
383
|
+
slope: 0,
|
|
384
|
+
spacing: 0,
|
|
385
|
+
specularConstant: 1,
|
|
386
|
+
specularExponent: 1,
|
|
387
|
+
speed: 0,
|
|
388
|
+
spreadMethod: 1,
|
|
389
|
+
startOffset: 1,
|
|
390
|
+
stdDeviation: 1,
|
|
391
|
+
stemh: 0,
|
|
392
|
+
stemv: 0,
|
|
393
|
+
stitchTiles: 1,
|
|
394
|
+
stopColor: 1,
|
|
395
|
+
'stop-color': 'stopColor',
|
|
396
|
+
stopOpacity: 1,
|
|
397
|
+
'stop-opacity': 'stopOpacity',
|
|
398
|
+
strikethroughPosition: 1,
|
|
399
|
+
'strikethrough-position': 'strikethroughPosition',
|
|
400
|
+
strikethroughThickness: 1,
|
|
401
|
+
'strikethrough-thickness': 'strikethroughThickness',
|
|
402
|
+
string: 0,
|
|
403
|
+
stroke: 0,
|
|
404
|
+
strokeDasharray: 1,
|
|
405
|
+
'stroke-dasharray': 'strokeDasharray',
|
|
406
|
+
strokeDashoffset: 1,
|
|
407
|
+
'stroke-dashoffset': 'strokeDashoffset',
|
|
408
|
+
strokeLinecap: 1,
|
|
409
|
+
'stroke-linecap': 'strokeLinecap',
|
|
410
|
+
strokeLinejoin: 1,
|
|
411
|
+
'stroke-linejoin': 'strokeLinejoin',
|
|
412
|
+
strokeMiterlimit: 1,
|
|
413
|
+
'stroke-miterlimit': 'strokeMiterlimit',
|
|
414
|
+
strokeWidth: 1,
|
|
415
|
+
'stroke-width': 'strokeWidth',
|
|
416
|
+
strokeOpacity: 1,
|
|
417
|
+
'stroke-opacity': 'strokeOpacity',
|
|
418
|
+
suppressContentEditableWarning: 1,
|
|
419
|
+
suppressHydrationWarning: 1,
|
|
420
|
+
surfaceScale: 1,
|
|
421
|
+
systemLanguage: 1,
|
|
422
|
+
tableValues: 1,
|
|
423
|
+
targetX: 1,
|
|
424
|
+
targetY: 1,
|
|
425
|
+
textAnchor: 1,
|
|
426
|
+
'text-anchor': 'textAnchor',
|
|
427
|
+
textDecoration: 1,
|
|
428
|
+
'text-decoration': 'textDecoration',
|
|
429
|
+
textLength: 1,
|
|
430
|
+
textRendering: 1,
|
|
431
|
+
'text-rendering': 'textRendering',
|
|
432
|
+
to: 0,
|
|
433
|
+
transform: 0,
|
|
434
|
+
typeof: 0,
|
|
435
|
+
u1: 0,
|
|
436
|
+
u2: 0,
|
|
437
|
+
underlinePosition: 1,
|
|
438
|
+
'underline-position': 'underlinePosition',
|
|
439
|
+
underlineThickness: 1,
|
|
440
|
+
'underline-thickness': 'underlineThickness',
|
|
441
|
+
unicode: 0,
|
|
442
|
+
unicodeBidi: 1,
|
|
443
|
+
'unicode-bidi': 'unicodeBidi',
|
|
444
|
+
unicodeRange: 1,
|
|
445
|
+
'unicode-range': 'unicodeRange',
|
|
446
|
+
unitsPerEm: 1,
|
|
447
|
+
'units-per-em': 'unitsPerEm',
|
|
448
|
+
unselectable: 0,
|
|
449
|
+
vAlphabetic: 1,
|
|
450
|
+
'v-alphabetic': 'vAlphabetic',
|
|
451
|
+
values: 0,
|
|
452
|
+
vectorEffect: 1,
|
|
453
|
+
'vector-effect': 'vectorEffect',
|
|
454
|
+
version: 0,
|
|
455
|
+
vertAdvY: 1,
|
|
456
|
+
'vert-adv-y': 'vertAdvY',
|
|
457
|
+
vertOriginX: 1,
|
|
458
|
+
'vert-origin-x': 'vertOriginX',
|
|
459
|
+
vertOriginY: 1,
|
|
460
|
+
'vert-origin-y': 'vertOriginY',
|
|
461
|
+
vHanging: 1,
|
|
462
|
+
'v-hanging': 'vHanging',
|
|
463
|
+
vIdeographic: 1,
|
|
464
|
+
'v-ideographic': 'vIdeographic',
|
|
465
|
+
viewBox: 1,
|
|
466
|
+
viewTarget: 1,
|
|
467
|
+
visibility: 0,
|
|
468
|
+
vMathematical: 1,
|
|
469
|
+
'v-mathematical': 'vMathematical',
|
|
470
|
+
vocab: 0,
|
|
471
|
+
widths: 0,
|
|
472
|
+
wordSpacing: 1,
|
|
473
|
+
'word-spacing': 'wordSpacing',
|
|
474
|
+
writingMode: 1,
|
|
475
|
+
'writing-mode': 'writingMode',
|
|
476
|
+
x1: 0,
|
|
477
|
+
x2: 0,
|
|
478
|
+
x: 0,
|
|
479
|
+
xChannelSelector: 1,
|
|
480
|
+
xHeight: 1,
|
|
481
|
+
'x-height': 'xHeight',
|
|
482
|
+
xlinkActuate: 1,
|
|
483
|
+
'xlink:actuate': 'xlinkActuate',
|
|
484
|
+
xlinkArcrole: 1,
|
|
485
|
+
'xlink:arcrole': 'xlinkArcrole',
|
|
486
|
+
xlinkHref: 1,
|
|
487
|
+
'xlink:href': 'xlinkHref',
|
|
488
|
+
xlinkRole: 1,
|
|
489
|
+
'xlink:role': 'xlinkRole',
|
|
490
|
+
xlinkShow: 1,
|
|
491
|
+
'xlink:show': 'xlinkShow',
|
|
492
|
+
xlinkTitle: 1,
|
|
493
|
+
'xlink:title': 'xlinkTitle',
|
|
494
|
+
xlinkType: 1,
|
|
495
|
+
'xlink:type': 'xlinkType',
|
|
496
|
+
xmlBase: 1,
|
|
497
|
+
'xml:base': 'xmlBase',
|
|
498
|
+
xmlLang: 1,
|
|
499
|
+
'xml:lang': 'xmlLang',
|
|
500
|
+
xmlns: 0,
|
|
501
|
+
'xml:space': 'xmlSpace',
|
|
502
|
+
xmlnsXlink: 1,
|
|
503
|
+
'xmlns:xlink': 'xmlnsXlink',
|
|
504
|
+
xmlSpace: 1,
|
|
505
|
+
y1: 0,
|
|
506
|
+
y2: 0,
|
|
507
|
+
y: 0,
|
|
508
|
+
yChannelSelector: 1,
|
|
509
|
+
z: 0,
|
|
510
|
+
zoomAndPan: 1
|
|
171
511
|
};
|
|
172
512
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
cx: 0,
|
|
209
|
-
cy: 0,
|
|
210
|
-
d: 0,
|
|
211
|
-
decelerate: 0,
|
|
212
|
-
descent: 0,
|
|
213
|
-
diffuseConstant: 0,
|
|
214
|
-
direction: 0,
|
|
215
|
-
display: 0,
|
|
216
|
-
divisor: 0,
|
|
217
|
-
dominantBaseline: 0,
|
|
218
|
-
dur: 0,
|
|
219
|
-
dx: 0,
|
|
220
|
-
dy: 0,
|
|
221
|
-
edgeMode: 0,
|
|
222
|
-
elevation: 0,
|
|
223
|
-
enableBackground: 0,
|
|
224
|
-
end: 0,
|
|
225
|
-
exponent: 0,
|
|
226
|
-
externalResourcesRequired: 0,
|
|
227
|
-
fill: 0,
|
|
228
|
-
fillOpacity: 0,
|
|
229
|
-
fillRule: 0,
|
|
230
|
-
filter: 0,
|
|
231
|
-
filterRes: 0,
|
|
232
|
-
filterUnits: 0,
|
|
233
|
-
floodColor: 0,
|
|
234
|
-
floodOpacity: 0,
|
|
235
|
-
focusable: 0,
|
|
236
|
-
fontFamily: 0,
|
|
237
|
-
fontSize: 0,
|
|
238
|
-
fontSizeAdjust: 0,
|
|
239
|
-
fontStretch: 0,
|
|
240
|
-
fontStyle: 0,
|
|
241
|
-
fontVariant: 0,
|
|
242
|
-
fontWeight: 0,
|
|
243
|
-
format: 0,
|
|
244
|
-
from: 0,
|
|
245
|
-
fx: 0,
|
|
246
|
-
fy: 0,
|
|
247
|
-
g1: 0,
|
|
248
|
-
g2: 0,
|
|
249
|
-
glyphName: 0,
|
|
250
|
-
glyphOrientationHorizontal: 0,
|
|
251
|
-
glyphOrientationVertical: 0,
|
|
252
|
-
glyphRef: 0,
|
|
253
|
-
gradientTransform: 0,
|
|
254
|
-
gradientUnits: 0,
|
|
255
|
-
hanging: 0,
|
|
256
|
-
horizAdvX: 0,
|
|
257
|
-
horizOriginX: 0,
|
|
258
|
-
ideographic: 0,
|
|
259
|
-
imageRendering: 0,
|
|
260
|
-
in: 0,
|
|
261
|
-
in2: 0,
|
|
262
|
-
intercept: 0,
|
|
263
|
-
k: 0,
|
|
264
|
-
k1: 0,
|
|
265
|
-
k2: 0,
|
|
266
|
-
k3: 0,
|
|
267
|
-
k4: 0,
|
|
268
|
-
kernelMatrix: 0,
|
|
269
|
-
kernelUnitLength: 0,
|
|
270
|
-
kerning: 0,
|
|
271
|
-
keyPoints: 0,
|
|
272
|
-
keySplines: 0,
|
|
273
|
-
keyTimes: 0,
|
|
274
|
-
lengthAdjust: 0,
|
|
275
|
-
letterSpacing: 0,
|
|
276
|
-
lightingColor: 0,
|
|
277
|
-
limitingConeAngle: 0,
|
|
278
|
-
local: 0,
|
|
279
|
-
markerEnd: 0,
|
|
280
|
-
markerMid: 0,
|
|
281
|
-
markerStart: 0,
|
|
282
|
-
markerHeight: 0,
|
|
283
|
-
markerUnits: 0,
|
|
284
|
-
markerWidth: 0,
|
|
285
|
-
mask: 0,
|
|
286
|
-
maskContentUnits: 0,
|
|
287
|
-
maskUnits: 0,
|
|
288
|
-
mathematical: 0,
|
|
289
|
-
mode: 0,
|
|
290
|
-
numOctaves: 0,
|
|
291
|
-
offset: 0,
|
|
292
|
-
opacity: 0,
|
|
293
|
-
operator: 0,
|
|
294
|
-
order: 0,
|
|
295
|
-
orient: 0,
|
|
296
|
-
orientation: 0,
|
|
297
|
-
origin: 0,
|
|
298
|
-
overflow: 0,
|
|
299
|
-
overlinePosition: 0,
|
|
300
|
-
overlineThickness: 0,
|
|
301
|
-
paintOrder: 0,
|
|
302
|
-
panose1: 0,
|
|
303
|
-
pathLength: 0,
|
|
304
|
-
patternContentUnits: 0,
|
|
305
|
-
patternTransform: 0,
|
|
306
|
-
patternUnits: 0,
|
|
307
|
-
pointerEvents: 0,
|
|
308
|
-
points: 0,
|
|
309
|
-
pointsAtX: 0,
|
|
310
|
-
pointsAtY: 0,
|
|
311
|
-
pointsAtZ: 0,
|
|
312
|
-
preserveAlpha: 0,
|
|
313
|
-
preserveAspectRatio: 0,
|
|
314
|
-
primitiveUnits: 0,
|
|
315
|
-
r: 0,
|
|
316
|
-
radius: 0,
|
|
317
|
-
refX: 0,
|
|
318
|
-
refY: 0,
|
|
319
|
-
renderingIntent: 0,
|
|
320
|
-
repeatCount: 0,
|
|
321
|
-
repeatDur: 0,
|
|
322
|
-
requiredExtensions: 0,
|
|
323
|
-
requiredFeatures: 0,
|
|
324
|
-
restart: 0,
|
|
325
|
-
result: 0,
|
|
326
|
-
rotate: 0,
|
|
327
|
-
rx: 0,
|
|
328
|
-
ry: 0,
|
|
329
|
-
scale: 0,
|
|
330
|
-
seed: 0,
|
|
331
|
-
shapeRendering: 0,
|
|
332
|
-
slope: 0,
|
|
333
|
-
spacing: 0,
|
|
334
|
-
specularConstant: 0,
|
|
335
|
-
specularExponent: 0,
|
|
336
|
-
speed: 0,
|
|
337
|
-
spreadMethod: 0,
|
|
338
|
-
startOffset: 0,
|
|
339
|
-
stdDeviation: 0,
|
|
340
|
-
stemh: 0,
|
|
341
|
-
stemv: 0,
|
|
342
|
-
stitchTiles: 0,
|
|
343
|
-
stopColor: 0,
|
|
344
|
-
stopOpacity: 0,
|
|
345
|
-
strikethroughPosition: 0,
|
|
346
|
-
strikethroughThickness: 0,
|
|
347
|
-
string: 0,
|
|
348
|
-
stroke: 0,
|
|
349
|
-
strokeDasharray: 0,
|
|
350
|
-
strokeDashoffset: 0,
|
|
351
|
-
strokeLinecap: 0,
|
|
352
|
-
strokeLinejoin: 0,
|
|
353
|
-
strokeMiterlimit: 0,
|
|
354
|
-
strokeOpacity: 0,
|
|
355
|
-
strokeWidth: 0,
|
|
356
|
-
surfaceScale: 0,
|
|
357
|
-
systemLanguage: 0,
|
|
358
|
-
tableValues: 0,
|
|
359
|
-
targetX: 0,
|
|
360
|
-
targetY: 0,
|
|
361
|
-
textAnchor: 0,
|
|
362
|
-
textDecoration: 0,
|
|
363
|
-
textRendering: 0,
|
|
364
|
-
textLength: 0,
|
|
365
|
-
to: 0,
|
|
366
|
-
transform: 0,
|
|
367
|
-
u1: 0,
|
|
368
|
-
u2: 0,
|
|
369
|
-
underlinePosition: 0,
|
|
370
|
-
underlineThickness: 0,
|
|
371
|
-
unicode: 0,
|
|
372
|
-
unicodeBidi: 0,
|
|
373
|
-
unicodeRange: 0,
|
|
374
|
-
unitsPerEm: 0,
|
|
375
|
-
vAlphabetic: 0,
|
|
376
|
-
vHanging: 0,
|
|
377
|
-
vIdeographic: 0,
|
|
378
|
-
vMathematical: 0,
|
|
379
|
-
values: 0,
|
|
380
|
-
vectorEffect: 0,
|
|
381
|
-
version: 0,
|
|
382
|
-
vertAdvY: 0,
|
|
383
|
-
vertOriginX: 0,
|
|
384
|
-
vertOriginY: 0,
|
|
385
|
-
viewBox: 0,
|
|
386
|
-
viewTarget: 0,
|
|
387
|
-
visibility: 0,
|
|
388
|
-
widths: 0,
|
|
389
|
-
wordSpacing: 0,
|
|
390
|
-
writingMode: 0,
|
|
391
|
-
x: 0,
|
|
392
|
-
xHeight: 0,
|
|
393
|
-
x1: 0,
|
|
394
|
-
x2: 0,
|
|
395
|
-
xChannelSelector: 0,
|
|
396
|
-
xlinkActuate: 0,
|
|
397
|
-
xlinkArcrole: 0,
|
|
398
|
-
xlinkHref: 0,
|
|
399
|
-
xlinkRole: 0,
|
|
400
|
-
xlinkShow: 0,
|
|
401
|
-
xlinkTitle: 0,
|
|
402
|
-
xlinkType: 0,
|
|
403
|
-
xmlBase: 0,
|
|
404
|
-
xmlns: 0,
|
|
405
|
-
xmlnsXlink: 0,
|
|
406
|
-
xmlLang: 0,
|
|
407
|
-
xmlSpace: 0,
|
|
408
|
-
y: 0,
|
|
409
|
-
y1: 0,
|
|
410
|
-
y2: 0,
|
|
411
|
-
yChannelSelector: 0,
|
|
412
|
-
z: 0,
|
|
413
|
-
zoomAndPan: 0
|
|
414
|
-
},
|
|
415
|
-
DOMAttributeNames: {
|
|
416
|
-
accentHeight: 'accent-height',
|
|
417
|
-
alignmentBaseline: 'alignment-baseline',
|
|
418
|
-
arabicForm: 'arabic-form',
|
|
419
|
-
baselineShift: 'baseline-shift',
|
|
420
|
-
capHeight: 'cap-height',
|
|
421
|
-
clipPath: 'clip-path',
|
|
422
|
-
clipRule: 'clip-rule',
|
|
423
|
-
colorInterpolation: 'color-interpolation',
|
|
424
|
-
colorInterpolationFilters: 'color-interpolation-filters',
|
|
425
|
-
colorProfile: 'color-profile',
|
|
426
|
-
colorRendering: 'color-rendering',
|
|
427
|
-
dominantBaseline: 'dominant-baseline',
|
|
428
|
-
enableBackground: 'enable-background',
|
|
429
|
-
fillOpacity: 'fill-opacity',
|
|
430
|
-
fillRule: 'fill-rule',
|
|
431
|
-
floodColor: 'flood-color',
|
|
432
|
-
floodOpacity: 'flood-opacity',
|
|
433
|
-
fontFamily: 'font-family',
|
|
434
|
-
fontSize: 'font-size',
|
|
435
|
-
fontSizeAdjust: 'font-size-adjust',
|
|
436
|
-
fontStretch: 'font-stretch',
|
|
437
|
-
fontStyle: 'font-style',
|
|
438
|
-
fontVariant: 'font-variant',
|
|
439
|
-
fontWeight: 'font-weight',
|
|
440
|
-
glyphName: 'glyph-name',
|
|
441
|
-
glyphOrientationHorizontal: 'glyph-orientation-horizontal',
|
|
442
|
-
glyphOrientationVertical: 'glyph-orientation-vertical',
|
|
443
|
-
horizAdvX: 'horiz-adv-x',
|
|
444
|
-
horizOriginX: 'horiz-origin-x',
|
|
445
|
-
imageRendering: 'image-rendering',
|
|
446
|
-
letterSpacing: 'letter-spacing',
|
|
447
|
-
lightingColor: 'lighting-color',
|
|
448
|
-
markerEnd: 'marker-end',
|
|
449
|
-
markerMid: 'marker-mid',
|
|
450
|
-
markerStart: 'marker-start',
|
|
451
|
-
overlinePosition: 'overline-position',
|
|
452
|
-
overlineThickness: 'overline-thickness',
|
|
453
|
-
paintOrder: 'paint-order',
|
|
454
|
-
panose1: 'panose-1',
|
|
455
|
-
pointerEvents: 'pointer-events',
|
|
456
|
-
renderingIntent: 'rendering-intent',
|
|
457
|
-
shapeRendering: 'shape-rendering',
|
|
458
|
-
stopColor: 'stop-color',
|
|
459
|
-
stopOpacity: 'stop-opacity',
|
|
460
|
-
strikethroughPosition: 'strikethrough-position',
|
|
461
|
-
strikethroughThickness: 'strikethrough-thickness',
|
|
462
|
-
strokeDasharray: 'stroke-dasharray',
|
|
463
|
-
strokeDashoffset: 'stroke-dashoffset',
|
|
464
|
-
strokeLinecap: 'stroke-linecap',
|
|
465
|
-
strokeLinejoin: 'stroke-linejoin',
|
|
466
|
-
strokeMiterlimit: 'stroke-miterlimit',
|
|
467
|
-
strokeOpacity: 'stroke-opacity',
|
|
468
|
-
strokeWidth: 'stroke-width',
|
|
469
|
-
textAnchor: 'text-anchor',
|
|
470
|
-
textDecoration: 'text-decoration',
|
|
471
|
-
textRendering: 'text-rendering',
|
|
472
|
-
underlinePosition: 'underline-position',
|
|
473
|
-
underlineThickness: 'underline-thickness',
|
|
474
|
-
unicodeBidi: 'unicode-bidi',
|
|
475
|
-
unicodeRange: 'unicode-range',
|
|
476
|
-
unitsPerEm: 'units-per-em',
|
|
477
|
-
vAlphabetic: 'v-alphabetic',
|
|
478
|
-
vHanging: 'v-hanging',
|
|
479
|
-
vIdeographic: 'v-ideographic',
|
|
480
|
-
vMathematical: 'v-mathematical',
|
|
481
|
-
vectorEffect: 'vector-effect',
|
|
482
|
-
vertAdvY: 'vert-adv-y',
|
|
483
|
-
vertOriginX: 'vert-origin-x',
|
|
484
|
-
vertOriginY: 'vert-origin-y',
|
|
485
|
-
wordSpacing: 'word-spacing',
|
|
486
|
-
writingMode: 'writing-mode',
|
|
487
|
-
xHeight: 'x-height',
|
|
488
|
-
xlinkActuate: 'xlink:actuate',
|
|
489
|
-
xlinkArcrole: 'xlink:arcrole',
|
|
490
|
-
xlinkHref: 'xlink:href',
|
|
491
|
-
xlinkRole: 'xlink:role',
|
|
492
|
-
xlinkShow: 'xlink:show',
|
|
493
|
-
xlinkTitle: 'xlink:title',
|
|
494
|
-
xlinkType: 'xlink:type',
|
|
495
|
-
xmlBase: 'xml:base',
|
|
496
|
-
xmlnsXlink: 'xmlns:xlink',
|
|
497
|
-
xmlLang: 'xml:lang',
|
|
498
|
-
xmlSpace: 'xml:space'
|
|
513
|
+
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
514
|
+
|
|
515
|
+
function _slicedToArray(arr, i) {
|
|
516
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
function _arrayWithHoles(arr) {
|
|
520
|
+
if (Array.isArray(arr)) return arr;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
function _iterableToArrayLimit(arr, i) {
|
|
524
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
525
|
+
|
|
526
|
+
if (_i == null) return;
|
|
527
|
+
var _arr = [];
|
|
528
|
+
var _n = true;
|
|
529
|
+
var _d = false;
|
|
530
|
+
|
|
531
|
+
var _s, _e;
|
|
532
|
+
|
|
533
|
+
try {
|
|
534
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
535
|
+
_arr.push(_s.value);
|
|
536
|
+
|
|
537
|
+
if (i && _arr.length === i) break;
|
|
538
|
+
}
|
|
539
|
+
} catch (err) {
|
|
540
|
+
_d = true;
|
|
541
|
+
_e = err;
|
|
542
|
+
} finally {
|
|
543
|
+
try {
|
|
544
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
545
|
+
} finally {
|
|
546
|
+
if (_d) throw _e;
|
|
547
|
+
}
|
|
499
548
|
}
|
|
500
|
-
};
|
|
501
549
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
HAS_BOOLEAN_VALUE: 4,
|
|
505
|
-
HAS_NUMERIC_VALUE: 8,
|
|
506
|
-
HAS_POSITIVE_NUMERIC_VALUE: 24,
|
|
507
|
-
HAS_OVERLOADED_BOOLEAN_VALUE: 32
|
|
508
|
-
};
|
|
550
|
+
return _arr;
|
|
551
|
+
}
|
|
509
552
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
553
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
554
|
+
if (!o) return;
|
|
555
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
556
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
557
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
558
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
559
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
560
|
+
}
|
|
513
561
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
var HAS_NUMERIC_VALUE = injection.HAS_NUMERIC_VALUE;
|
|
517
|
-
var HAS_POSITIVE_NUMERIC_VALUE = injection.HAS_POSITIVE_NUMERIC_VALUE;
|
|
518
|
-
var HAS_OVERLOADED_BOOLEAN_VALUE = injection.HAS_OVERLOADED_BOOLEAN_VALUE;
|
|
562
|
+
function _arrayLikeToArray(arr, len) {
|
|
563
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
519
564
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
* @param {Number} value
|
|
524
|
-
* @param {Number} bitmask
|
|
525
|
-
* @return {Boolean}
|
|
526
|
-
*/
|
|
527
|
-
function checkMask(value, bitmask) {
|
|
528
|
-
return (value & bitmask) === bitmask;
|
|
565
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
566
|
+
|
|
567
|
+
return arr2;
|
|
529
568
|
}
|
|
530
569
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
*
|
|
534
|
-
* @param {Object} domPropertyConfig - HTMLDOMPropertyConfig or SVGDOMPropertyConfig
|
|
535
|
-
* @param {Object} config - The object to be mutated
|
|
536
|
-
* @param {Boolean} isSVG - Whether the injected config is HTML or SVG (it assumes the default is HTML)
|
|
537
|
-
*/
|
|
538
|
-
function injectDOMPropertyConfig(domPropertyConfig, config, isSVG) {
|
|
539
|
-
var Properties = domPropertyConfig.Properties;
|
|
540
|
-
var DOMAttributeNames = domPropertyConfig.DOMAttributeNames;
|
|
541
|
-
var attributeName;
|
|
542
|
-
var propertyName;
|
|
543
|
-
var propConfig;
|
|
544
|
-
|
|
545
|
-
for (propertyName in Properties) {
|
|
546
|
-
attributeName =
|
|
547
|
-
DOMAttributeNames[propertyName] ||
|
|
548
|
-
(isSVG ? propertyName : propertyName.toLowerCase());
|
|
549
|
-
propConfig = Properties[propertyName];
|
|
550
|
-
|
|
551
|
-
config[attributeName] = {
|
|
552
|
-
attributeName: attributeName,
|
|
553
|
-
propertyName: propertyName,
|
|
554
|
-
mustUseProperty: checkMask(propConfig, MUST_USE_PROPERTY),
|
|
555
|
-
hasBooleanValue: checkMask(propConfig, HAS_BOOLEAN_VALUE),
|
|
556
|
-
hasNumericValue: checkMask(propConfig, HAS_NUMERIC_VALUE),
|
|
557
|
-
hasPositiveNumericValue: checkMask(
|
|
558
|
-
propConfig,
|
|
559
|
-
HAS_POSITIVE_NUMERIC_VALUE
|
|
560
|
-
),
|
|
561
|
-
hasOverloadedBooleanValue: checkMask(
|
|
562
|
-
propConfig,
|
|
563
|
-
HAS_OVERLOADED_BOOLEAN_VALUE
|
|
564
|
-
)
|
|
565
|
-
};
|
|
566
|
-
}
|
|
570
|
+
function _nonIterableRest() {
|
|
571
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
567
572
|
}
|
|
568
573
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
*/
|
|
574
|
-
var html = {};
|
|
575
|
-
injectDOMPropertyConfig(HTMLDOMPropertyConfig, html);
|
|
574
|
+
// A reserved attribute.
|
|
575
|
+
// It is handled by React separately and shouldn't be written to the DOM.
|
|
576
|
+
var RESERVED = 0; // A simple string attribute.
|
|
577
|
+
// Attributes that aren't in the filter are presumed to have this type.
|
|
576
578
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
var
|
|
583
|
-
|
|
579
|
+
var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
|
|
580
|
+
// "enumerated" attributes with "true" and "false" as possible values.
|
|
581
|
+
// When true, it should be set to a "true" string.
|
|
582
|
+
// When false, it should be set to a "false" string.
|
|
583
|
+
|
|
584
|
+
var BOOLEANISH_STRING = 2; // A real boolean attribute.
|
|
585
|
+
// When true, it should be present (set either to an empty string or its name).
|
|
586
|
+
// When false, it should be omitted.
|
|
587
|
+
|
|
588
|
+
var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
|
|
589
|
+
// When true, it should be present (set either to an empty string or its name).
|
|
590
|
+
// When false, it should be omitted.
|
|
591
|
+
// For any other value, should be present with that value.
|
|
592
|
+
|
|
593
|
+
var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
|
|
594
|
+
// When falsy, it should be removed.
|
|
584
595
|
|
|
596
|
+
var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
|
|
597
|
+
// When falsy, it should be removed.
|
|
598
|
+
|
|
599
|
+
var POSITIVE_NUMERIC = 6;
|
|
600
|
+
function getPropertyInfo(name) {
|
|
601
|
+
return properties.hasOwnProperty(name) ? properties[name] : null;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
|
|
605
|
+
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
|
|
606
|
+
this.attributeName = attributeName;
|
|
607
|
+
this.attributeNamespace = attributeNamespace;
|
|
608
|
+
this.mustUseProperty = mustUseProperty;
|
|
609
|
+
this.propertyName = name;
|
|
610
|
+
this.type = type;
|
|
611
|
+
this.sanitizeURL = sanitizeURL;
|
|
612
|
+
this.removeEmptyString = removeEmptyString;
|
|
613
|
+
} // When adding attributes to this list, be sure to also add them to
|
|
614
|
+
// the `possibleStandardNames` module to ensure casing and incorrect
|
|
615
|
+
// name warnings.
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
|
|
619
|
+
|
|
620
|
+
var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
|
|
621
|
+
// elements (not just inputs). Now that ReactDOMInput assigns to the
|
|
622
|
+
// defaultValue property -- do we need this?
|
|
623
|
+
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
|
|
624
|
+
reservedProps.forEach(function (name) {
|
|
625
|
+
properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
|
|
626
|
+
name, // attributeName
|
|
627
|
+
null, // attributeNamespace
|
|
628
|
+
false, // sanitizeURL
|
|
629
|
+
false);
|
|
630
|
+
}); // A few React string attributes have a different name.
|
|
631
|
+
// This is a mapping from React prop names to the attribute names.
|
|
632
|
+
|
|
633
|
+
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
634
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
635
|
+
name = _ref2[0],
|
|
636
|
+
attributeName = _ref2[1];
|
|
637
|
+
|
|
638
|
+
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
|
|
639
|
+
attributeName, // attributeName
|
|
640
|
+
null, // attributeNamespace
|
|
641
|
+
false, // sanitizeURL
|
|
642
|
+
false);
|
|
643
|
+
}); // These are "enumerated" HTML attributes that accept "true" and "false".
|
|
644
|
+
// In React, we let users pass `true` and `false` even though technically
|
|
645
|
+
// these aren't boolean attributes (they are coerced to strings).
|
|
646
|
+
|
|
647
|
+
['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
|
|
648
|
+
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
|
|
649
|
+
name.toLowerCase(), // attributeName
|
|
650
|
+
null, // attributeNamespace
|
|
651
|
+
false, // sanitizeURL
|
|
652
|
+
false);
|
|
653
|
+
}); // These are "enumerated" SVG attributes that accept "true" and "false".
|
|
654
|
+
// In React, we let users pass `true` and `false` even though technically
|
|
655
|
+
// these aren't boolean attributes (they are coerced to strings).
|
|
656
|
+
// Since these are SVG attributes, their attribute names are case-sensitive.
|
|
657
|
+
|
|
658
|
+
['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
|
|
659
|
+
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
|
|
660
|
+
name, // attributeName
|
|
661
|
+
null, // attributeNamespace
|
|
662
|
+
false, // sanitizeURL
|
|
663
|
+
false);
|
|
664
|
+
}); // These are HTML boolean attributes.
|
|
665
|
+
|
|
666
|
+
['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
|
|
667
|
+
// on the client side because the browsers are inconsistent. Instead we call focus().
|
|
668
|
+
'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
|
|
669
|
+
'itemScope'].forEach(function (name) {
|
|
670
|
+
properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
|
|
671
|
+
name.toLowerCase(), // attributeName
|
|
672
|
+
null, // attributeNamespace
|
|
673
|
+
false, // sanitizeURL
|
|
674
|
+
false);
|
|
675
|
+
}); // These are the few React props that we set as DOM properties
|
|
676
|
+
// rather than attributes. These are all booleans.
|
|
677
|
+
|
|
678
|
+
['checked', // Note: `option.selected` is not updated if `select.multiple` is
|
|
679
|
+
// disabled with `removeAttribute`. We have special logic for handling this.
|
|
680
|
+
'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
|
|
681
|
+
// you'll need to set attributeName to name.toLowerCase()
|
|
682
|
+
// instead in the assignment below.
|
|
683
|
+
].forEach(function (name) {
|
|
684
|
+
properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
|
|
685
|
+
name, // attributeName
|
|
686
|
+
null, // attributeNamespace
|
|
687
|
+
false, // sanitizeURL
|
|
688
|
+
false);
|
|
689
|
+
}); // These are HTML attributes that are "overloaded booleans": they behave like
|
|
690
|
+
// booleans, but can also accept a string value.
|
|
691
|
+
|
|
692
|
+
['capture', 'download' // NOTE: if you add a camelCased prop to this list,
|
|
693
|
+
// you'll need to set attributeName to name.toLowerCase()
|
|
694
|
+
// instead in the assignment below.
|
|
695
|
+
].forEach(function (name) {
|
|
696
|
+
properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
|
|
697
|
+
name, // attributeName
|
|
698
|
+
null, // attributeNamespace
|
|
699
|
+
false, // sanitizeURL
|
|
700
|
+
false);
|
|
701
|
+
}); // These are HTML attributes that must be positive numbers.
|
|
702
|
+
|
|
703
|
+
['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
|
|
704
|
+
// you'll need to set attributeName to name.toLowerCase()
|
|
705
|
+
// instead in the assignment below.
|
|
706
|
+
].forEach(function (name) {
|
|
707
|
+
properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
|
|
708
|
+
name, // attributeName
|
|
709
|
+
null, // attributeNamespace
|
|
710
|
+
false, // sanitizeURL
|
|
711
|
+
false);
|
|
712
|
+
}); // These are HTML attributes that must be numbers.
|
|
713
|
+
|
|
714
|
+
['rowSpan', 'start'].forEach(function (name) {
|
|
715
|
+
properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
|
|
716
|
+
name.toLowerCase(), // attributeName
|
|
717
|
+
null, // attributeNamespace
|
|
718
|
+
false, // sanitizeURL
|
|
719
|
+
false);
|
|
720
|
+
});
|
|
721
|
+
var CAMELIZE = /[\-\:]([a-z])/g;
|
|
722
|
+
|
|
723
|
+
var capitalize$1 = function capitalize(token) {
|
|
724
|
+
return token[1].toUpperCase();
|
|
725
|
+
}; // This is a list of all SVG attributes that need special casing, namespacing,
|
|
726
|
+
// or boolean value assignment. Regular attributes that just accept strings
|
|
727
|
+
// and have the same names are omitted, just like in the HTML attribute filter.
|
|
728
|
+
// Some of these attributes can be hard to find. This list was created by
|
|
729
|
+
// scraping the MDN documentation.
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,
|
|
733
|
+
// you'll need to set attributeName to name.toLowerCase()
|
|
734
|
+
// instead in the assignment below.
|
|
735
|
+
].forEach(function (attributeName) {
|
|
736
|
+
var name = attributeName.replace(CAMELIZE, capitalize$1);
|
|
737
|
+
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
|
|
738
|
+
attributeName, null, // attributeNamespace
|
|
739
|
+
false, // sanitizeURL
|
|
740
|
+
false);
|
|
741
|
+
}); // String SVG attributes with the xlink namespace.
|
|
742
|
+
|
|
743
|
+
['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
|
|
744
|
+
// you'll need to set attributeName to name.toLowerCase()
|
|
745
|
+
// instead in the assignment below.
|
|
746
|
+
].forEach(function (attributeName) {
|
|
747
|
+
var name = attributeName.replace(CAMELIZE, capitalize$1);
|
|
748
|
+
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
|
|
749
|
+
attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
|
|
750
|
+
false);
|
|
751
|
+
}); // String SVG attributes with the xml namespace.
|
|
752
|
+
|
|
753
|
+
['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
|
|
754
|
+
// you'll need to set attributeName to name.toLowerCase()
|
|
755
|
+
// instead in the assignment below.
|
|
756
|
+
].forEach(function (attributeName) {
|
|
757
|
+
var name = attributeName.replace(CAMELIZE, capitalize$1);
|
|
758
|
+
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
|
|
759
|
+
attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
|
|
760
|
+
false);
|
|
761
|
+
}); // These attribute exists both in HTML and SVG.
|
|
762
|
+
// The attribute name is case-sensitive in SVG so we can't just use
|
|
763
|
+
// the React name like we do for attributes that exist only in HTML.
|
|
764
|
+
|
|
765
|
+
['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
|
|
766
|
+
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
|
|
767
|
+
attributeName.toLowerCase(), // attributeName
|
|
768
|
+
null, // attributeNamespace
|
|
769
|
+
false, // sanitizeURL
|
|
770
|
+
false);
|
|
771
|
+
}); // These attributes accept URLs. These must not allow javascript: URLS.
|
|
772
|
+
// These will also need to accept Trusted Types object in the future.
|
|
773
|
+
|
|
774
|
+
var xlinkHref = 'xlinkHref';
|
|
775
|
+
properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
|
|
776
|
+
'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
|
|
777
|
+
false);
|
|
778
|
+
['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
|
|
779
|
+
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
|
|
780
|
+
attributeName.toLowerCase(), // attributeName
|
|
781
|
+
null, // attributeNamespace
|
|
782
|
+
true, // sanitizeURL
|
|
783
|
+
true);
|
|
784
|
+
});
|
|
785
|
+
|
|
786
|
+
var _require = possibleStandardNamesOptimized$1,
|
|
787
|
+
CAMELCASE = _require.CAMELCASE,
|
|
788
|
+
SAME = _require.SAME,
|
|
789
|
+
possibleStandardNamesOptimized = _require.possibleStandardNames;
|
|
790
|
+
|
|
791
|
+
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";
|
|
792
|
+
var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
|
|
585
793
|
/**
|
|
586
|
-
*
|
|
794
|
+
* Checks whether a property name is a custom attribute.
|
|
587
795
|
*
|
|
588
|
-
* @
|
|
796
|
+
* @see {@link https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/HTMLDOMPropertyConfig.js#L23-L25}
|
|
797
|
+
*
|
|
798
|
+
* @param {string}
|
|
799
|
+
* @return {boolean}
|
|
589
800
|
*/
|
|
590
|
-
var properties = {};
|
|
591
|
-
injectDOMPropertyConfig(HTMLDOMPropertyConfig, properties);
|
|
592
|
-
injectDOMPropertyConfig(SVGDOMPropertyConfig, properties, true);
|
|
593
801
|
|
|
594
|
-
var
|
|
595
|
-
|
|
596
|
-
var
|
|
597
|
-
|
|
802
|
+
var isCustomAttribute = RegExp.prototype.test.bind( // eslint-disable-next-line no-misleading-character-class
|
|
803
|
+
new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'));
|
|
804
|
+
var possibleStandardNames = Object.keys(possibleStandardNamesOptimized).reduce(function (accumulator, standardName) {
|
|
805
|
+
var propName = possibleStandardNamesOptimized[standardName];
|
|
806
|
+
|
|
807
|
+
if (propName === SAME) {
|
|
808
|
+
accumulator[standardName] = standardName;
|
|
809
|
+
} else if (propName === CAMELCASE) {
|
|
810
|
+
accumulator[standardName.toLowerCase()] = standardName;
|
|
811
|
+
} else {
|
|
812
|
+
accumulator[standardName] = propName;
|
|
813
|
+
}
|
|
598
814
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
svg: svg,
|
|
602
|
-
properties: properties,
|
|
815
|
+
return accumulator;
|
|
816
|
+
}, {});
|
|
603
817
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
)
|
|
615
|
-
};
|
|
818
|
+
lib$1.BOOLEAN = BOOLEAN;
|
|
819
|
+
lib$1.BOOLEANISH_STRING = BOOLEANISH_STRING;
|
|
820
|
+
lib$1.NUMERIC = NUMERIC;
|
|
821
|
+
lib$1.OVERLOADED_BOOLEAN = OVERLOADED_BOOLEAN;
|
|
822
|
+
lib$1.POSITIVE_NUMERIC = POSITIVE_NUMERIC;
|
|
823
|
+
lib$1.RESERVED = RESERVED;
|
|
824
|
+
lib$1.STRING = STRING;
|
|
825
|
+
lib$1.getPropertyInfo = getPropertyInfo;
|
|
826
|
+
lib$1.isCustomAttribute = isCustomAttribute;
|
|
827
|
+
lib$1.possibleStandardNames = possibleStandardNames;
|
|
616
828
|
|
|
617
829
|
var cjs = {};
|
|
618
830
|
|
|
@@ -969,7 +1181,7 @@
|
|
|
969
1181
|
exports["default"] = StyleToJS;
|
|
970
1182
|
}(cjs));
|
|
971
1183
|
|
|
972
|
-
var React$1 = require$$0__default[
|
|
1184
|
+
var React$1 = require$$0__default["default"];
|
|
973
1185
|
var styleToJS = cjs.default;
|
|
974
1186
|
|
|
975
1187
|
/**
|
|
@@ -1050,11 +1262,15 @@
|
|
|
1050
1262
|
* @param {null|undefined|string} style
|
|
1051
1263
|
* @param {object} props
|
|
1052
1264
|
*/
|
|
1053
|
-
function setStyleProp$
|
|
1265
|
+
function setStyleProp$1(style, props) {
|
|
1054
1266
|
if (style === null || style === undefined) {
|
|
1055
1267
|
return;
|
|
1056
1268
|
}
|
|
1057
|
-
|
|
1269
|
+
try {
|
|
1270
|
+
props.style = styleToJS(style, styleToJSOptions);
|
|
1271
|
+
} catch (err) {
|
|
1272
|
+
props.style = {};
|
|
1273
|
+
}
|
|
1058
1274
|
}
|
|
1059
1275
|
|
|
1060
1276
|
/**
|
|
@@ -1067,60 +1283,54 @@
|
|
|
1067
1283
|
PRESERVE_CUSTOM_ATTRIBUTES: PRESERVE_CUSTOM_ATTRIBUTES,
|
|
1068
1284
|
invertObject: invertObject,
|
|
1069
1285
|
isCustomComponent: isCustomComponent,
|
|
1070
|
-
setStyleProp: setStyleProp$
|
|
1286
|
+
setStyleProp: setStyleProp$1
|
|
1071
1287
|
};
|
|
1072
1288
|
|
|
1073
|
-
var reactProperty =
|
|
1289
|
+
var reactProperty = lib$1;
|
|
1074
1290
|
var utilities$2 = utilities$3;
|
|
1075
1291
|
|
|
1076
|
-
var setStyleProp$1 = utilities$2.setStyleProp;
|
|
1077
|
-
|
|
1078
|
-
var htmlProperties = reactProperty.html;
|
|
1079
|
-
var svgProperties = reactProperty.svg;
|
|
1080
|
-
var isCustomAttribute = reactProperty.isCustomAttribute;
|
|
1081
|
-
|
|
1082
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1083
|
-
|
|
1084
1292
|
/**
|
|
1085
1293
|
* Converts HTML/SVG DOM attributes to React props.
|
|
1086
1294
|
*
|
|
1087
1295
|
* @param {object} [attributes={}] - HTML/SVG DOM attributes.
|
|
1088
1296
|
* @return {object} - React props.
|
|
1089
1297
|
*/
|
|
1090
|
-
|
|
1298
|
+
var attributesToProps$2 = function attributesToProps(attributes) {
|
|
1091
1299
|
attributes = attributes || {};
|
|
1092
1300
|
|
|
1093
1301
|
var attributeName;
|
|
1094
1302
|
var attributeNameLowerCased;
|
|
1095
1303
|
var attributeValue;
|
|
1096
|
-
var
|
|
1304
|
+
var propName;
|
|
1305
|
+
var propertyInfo;
|
|
1097
1306
|
var props = {};
|
|
1098
1307
|
|
|
1099
1308
|
for (attributeName in attributes) {
|
|
1100
1309
|
attributeValue = attributes[attributeName];
|
|
1101
1310
|
|
|
1102
1311
|
// ARIA (aria-*) or custom data (data-*) attribute
|
|
1103
|
-
if (isCustomAttribute(attributeName)) {
|
|
1312
|
+
if (reactProperty.isCustomAttribute(attributeName)) {
|
|
1104
1313
|
props[attributeName] = attributeValue;
|
|
1105
1314
|
continue;
|
|
1106
1315
|
}
|
|
1107
1316
|
|
|
1108
|
-
// convert HTML attribute to React prop
|
|
1317
|
+
// convert HTML/SVG attribute to React prop
|
|
1109
1318
|
attributeNameLowerCased = attributeName.toLowerCase();
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1319
|
+
propName = reactProperty.possibleStandardNames[attributeNameLowerCased];
|
|
1320
|
+
|
|
1321
|
+
if (propName) {
|
|
1322
|
+
props[propName] = attributeValue;
|
|
1323
|
+
propertyInfo = reactProperty.getPropertyInfo(propName);
|
|
1324
|
+
switch (propertyInfo && propertyInfo.type) {
|
|
1325
|
+
case reactProperty.BOOLEAN:
|
|
1326
|
+
props[propName] = true;
|
|
1327
|
+
break;
|
|
1328
|
+
case reactProperty.OVERLOADED_BOOLEAN:
|
|
1329
|
+
if (attributeValue === '') {
|
|
1330
|
+
props[propName] = true;
|
|
1331
|
+
}
|
|
1332
|
+
break;
|
|
1333
|
+
}
|
|
1124
1334
|
continue;
|
|
1125
1335
|
}
|
|
1126
1336
|
|
|
@@ -1131,15 +1341,13 @@
|
|
|
1131
1341
|
}
|
|
1132
1342
|
|
|
1133
1343
|
// transform inline style to object
|
|
1134
|
-
setStyleProp
|
|
1344
|
+
utilities$2.setStyleProp(attributes.style, props);
|
|
1135
1345
|
|
|
1136
1346
|
return props;
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
var attributesToProps_1 = attributesToProps$2;
|
|
1347
|
+
};
|
|
1140
1348
|
|
|
1141
|
-
var React = require$$0__default[
|
|
1142
|
-
var attributesToProps$1 =
|
|
1349
|
+
var React = require$$0__default["default"];
|
|
1350
|
+
var attributesToProps$1 = attributesToProps$2;
|
|
1143
1351
|
var utilities$1 = utilities$3;
|
|
1144
1352
|
|
|
1145
1353
|
var setStyleProp = utilities$1.setStyleProp;
|
|
@@ -1488,6 +1696,9 @@
|
|
|
1488
1696
|
return Node;
|
|
1489
1697
|
}());
|
|
1490
1698
|
node.Node = Node;
|
|
1699
|
+
/**
|
|
1700
|
+
* A node that contains some data.
|
|
1701
|
+
*/
|
|
1491
1702
|
var DataNode = /** @class */ (function (_super) {
|
|
1492
1703
|
__extends(DataNode, _super);
|
|
1493
1704
|
/**
|
|
@@ -1512,6 +1723,9 @@
|
|
|
1512
1723
|
return DataNode;
|
|
1513
1724
|
}(Node));
|
|
1514
1725
|
node.DataNode = DataNode;
|
|
1726
|
+
/**
|
|
1727
|
+
* Text within the document.
|
|
1728
|
+
*/
|
|
1515
1729
|
var Text$1 = /** @class */ (function (_super) {
|
|
1516
1730
|
__extends(Text, _super);
|
|
1517
1731
|
function Text(data) {
|
|
@@ -1520,6 +1734,9 @@
|
|
|
1520
1734
|
return Text;
|
|
1521
1735
|
}(DataNode));
|
|
1522
1736
|
node.Text = Text$1;
|
|
1737
|
+
/**
|
|
1738
|
+
* Comments within the document.
|
|
1739
|
+
*/
|
|
1523
1740
|
var Comment$1 = /** @class */ (function (_super) {
|
|
1524
1741
|
__extends(Comment, _super);
|
|
1525
1742
|
function Comment(data) {
|
|
@@ -1528,6 +1745,9 @@
|
|
|
1528
1745
|
return Comment;
|
|
1529
1746
|
}(DataNode));
|
|
1530
1747
|
node.Comment = Comment$1;
|
|
1748
|
+
/**
|
|
1749
|
+
* Processing instructions, including doc types.
|
|
1750
|
+
*/
|
|
1531
1751
|
var ProcessingInstruction$1 = /** @class */ (function (_super) {
|
|
1532
1752
|
__extends(ProcessingInstruction, _super);
|
|
1533
1753
|
function ProcessingInstruction(name, data) {
|
|
@@ -1583,6 +1803,9 @@
|
|
|
1583
1803
|
return NodeWithChildren;
|
|
1584
1804
|
}(Node));
|
|
1585
1805
|
node.NodeWithChildren = NodeWithChildren;
|
|
1806
|
+
/**
|
|
1807
|
+
* The root node of the document.
|
|
1808
|
+
*/
|
|
1586
1809
|
var Document = /** @class */ (function (_super) {
|
|
1587
1810
|
__extends(Document, _super);
|
|
1588
1811
|
function Document(children) {
|
|
@@ -1591,6 +1814,9 @@
|
|
|
1591
1814
|
return Document;
|
|
1592
1815
|
}(NodeWithChildren));
|
|
1593
1816
|
node.Document = Document;
|
|
1817
|
+
/**
|
|
1818
|
+
* An element within the DOM.
|
|
1819
|
+
*/
|
|
1594
1820
|
var Element$1 = /** @class */ (function (_super) {
|
|
1595
1821
|
__extends(Element, _super);
|
|
1596
1822
|
/**
|
|
@@ -1645,7 +1871,7 @@
|
|
|
1645
1871
|
* @returns `true` if the node is a `Element`, `false` otherwise.
|
|
1646
1872
|
*/
|
|
1647
1873
|
function isTag(node) {
|
|
1648
|
-
return domelementtype_1.isTag(node);
|
|
1874
|
+
return (0, domelementtype_1.isTag)(node);
|
|
1649
1875
|
}
|
|
1650
1876
|
node.isTag = isTag;
|
|
1651
1877
|
/**
|
|
@@ -2108,7 +2334,7 @@
|
|
|
2108
2334
|
var htmlToDom = HTMLDOMParser;
|
|
2109
2335
|
|
|
2110
2336
|
var domToReact = domToReact_1;
|
|
2111
|
-
var attributesToProps =
|
|
2337
|
+
var attributesToProps = attributesToProps$2;
|
|
2112
2338
|
var htmlToDOM = htmlToDom;
|
|
2113
2339
|
|
|
2114
2340
|
var domParserOptions = { lowerCaseAttributeNames: false };
|
|
@@ -2140,6 +2366,7 @@
|
|
|
2140
2366
|
HTMLReactParser.domToReact = domToReact;
|
|
2141
2367
|
HTMLReactParser.htmlToDOM = htmlToDOM;
|
|
2142
2368
|
HTMLReactParser.attributesToProps = attributesToProps;
|
|
2369
|
+
HTMLReactParser.Element = node.Element;
|
|
2143
2370
|
|
|
2144
2371
|
// support CommonJS and ES Modules
|
|
2145
2372
|
htmlReactParser$1.exports = HTMLReactParser;
|
|
@@ -2149,5 +2376,5 @@
|
|
|
2149
2376
|
|
|
2150
2377
|
return htmlReactParser;
|
|
2151
2378
|
|
|
2152
|
-
}))
|
|
2379
|
+
}));
|
|
2153
2380
|
//# sourceMappingURL=html-react-parser.js.map
|