@datagouv/components-next 1.4.1-dev.1355.g54710cb7 → 1.4.1-dev.1358.g6d93ccfb
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/assets/json/vector.json +1336 -523
- package/dist/{MapContainer.client-UC7wQOBj.js → MapContainer.client-ZoJqauC6.js} +1 -1
- package/dist/Pmtiles.client-DBaMKSO-.js +41347 -0
- package/dist/assets/maplibre-gl-worker-C24SsKwV.js +10 -0
- package/dist/components-next.css +1 -1
- package/dist/components-next.js +9025 -8715
- package/dist/{france-Ub9ufuh4.js → france-DxksUv5K.js} +4 -4
- package/dist/{purify.es-CeeOHdER.js → purify.es-D6pPunDo.js} +250 -189
- package/dist/{src-C0XyM3eg.js → src-D_UE0st7.js} +33 -29
- package/package.json +4 -4
- package/src/components/ResourceAccordion/Pmtiles.client.vue +6 -2
- package/dist/Pmtiles.client-CTXTfoSy.js +0 -38397
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
//#region ../node_modules/dompurify/dist/purify.es.mjs
|
|
2
2
|
function e(e, t) {
|
|
3
|
+
this.v = e, this.k = t;
|
|
4
|
+
}
|
|
5
|
+
function t(e, t) {
|
|
3
6
|
(t == null || t > e.length) && (t = e.length);
|
|
4
7
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
5
8
|
return r;
|
|
6
9
|
}
|
|
7
|
-
function
|
|
10
|
+
function n(e) {
|
|
8
11
|
if (Array.isArray(e)) return e;
|
|
9
12
|
}
|
|
10
|
-
function
|
|
13
|
+
function r(e, t) {
|
|
11
14
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
12
15
|
if (n != null) {
|
|
13
16
|
var r, i, a, o, s = [], c = !0, l = !1;
|
|
14
17
|
try {
|
|
15
|
-
if (a = (n = n.call(e)).next, t
|
|
18
|
+
if (a = (n = n.call(e)).next, t === 0) {
|
|
19
|
+
if (Object(n) !== n) return;
|
|
20
|
+
c = !1;
|
|
21
|
+
} else for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
|
|
16
22
|
} catch (e) {
|
|
17
23
|
l = !0, i = e;
|
|
18
24
|
} finally {
|
|
@@ -25,77 +31,128 @@ function n(e, t) {
|
|
|
25
31
|
return s;
|
|
26
32
|
}
|
|
27
33
|
}
|
|
28
|
-
function
|
|
34
|
+
function i() {
|
|
29
35
|
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
30
36
|
}
|
|
31
|
-
function
|
|
32
|
-
return
|
|
37
|
+
function a(e, t) {
|
|
38
|
+
return n(e) || r(e, t) || o(e, t) || i();
|
|
39
|
+
}
|
|
40
|
+
function o(e, n) {
|
|
41
|
+
if (e) {
|
|
42
|
+
if (typeof e == "string") return t(e, n);
|
|
43
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
44
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? t(e, n) : void 0;
|
|
45
|
+
}
|
|
33
46
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
47
|
+
function s(t) {
|
|
48
|
+
var n, r;
|
|
49
|
+
function i(n, r) {
|
|
50
|
+
try {
|
|
51
|
+
var o = t[n](r), s = o.value, c = s instanceof e;
|
|
52
|
+
Promise.resolve(c ? s.v : s).then(function(e) {
|
|
53
|
+
if (c) {
|
|
54
|
+
var r = n === "return" && s.k ? n : "next";
|
|
55
|
+
if (!s.k || e.done) return i(r, e);
|
|
56
|
+
e = t[r](e).value;
|
|
57
|
+
}
|
|
58
|
+
a(!!o.done, e);
|
|
59
|
+
}, function(e) {
|
|
60
|
+
i("throw", e);
|
|
61
|
+
});
|
|
62
|
+
} catch (e) {
|
|
63
|
+
a(2, e);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function a(e, t) {
|
|
67
|
+
e === 2 ? n.reject(t) : n.resolve({
|
|
68
|
+
value: t,
|
|
69
|
+
done: e
|
|
70
|
+
}), (n = n.next) ? i(n.key, n.arg) : r = null;
|
|
39
71
|
}
|
|
72
|
+
this._invoke = function(e, t) {
|
|
73
|
+
return new Promise(function(a, o) {
|
|
74
|
+
var s = {
|
|
75
|
+
key: e,
|
|
76
|
+
arg: t,
|
|
77
|
+
resolve: a,
|
|
78
|
+
reject: o,
|
|
79
|
+
next: null
|
|
80
|
+
};
|
|
81
|
+
r ? r = r.next = s : (n = r = s, i(e, t));
|
|
82
|
+
});
|
|
83
|
+
}, typeof t.return != "function" && (this.return = void 0);
|
|
40
84
|
}
|
|
41
|
-
|
|
42
|
-
|
|
85
|
+
s.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
|
|
86
|
+
return this;
|
|
87
|
+
}, s.prototype.next = function(e) {
|
|
88
|
+
return this._invoke("next", e);
|
|
89
|
+
}, s.prototype.throw = function(e) {
|
|
90
|
+
return this._invoke("throw", e);
|
|
91
|
+
}, s.prototype.return = function(e) {
|
|
92
|
+
return this._invoke("return", e);
|
|
93
|
+
};
|
|
94
|
+
var c = Object.entries, l = Object.setPrototypeOf, u = Object.isFrozen, d = Object.getPrototypeOf, f = Object.getOwnPropertyDescriptor, p = Object.freeze, m = Object.seal, h = Object.create, ee = typeof Reflect < "u" && Reflect, te = ee.apply, ne = ee.construct;
|
|
95
|
+
p ||= function(e) {
|
|
43
96
|
return e;
|
|
44
|
-
},
|
|
97
|
+
}, m ||= function(e) {
|
|
45
98
|
return e;
|
|
46
|
-
},
|
|
99
|
+
}, te ||= function(e, t) {
|
|
47
100
|
var n = [...arguments].slice(2);
|
|
48
101
|
return e.apply(t, n);
|
|
49
|
-
},
|
|
102
|
+
}, ne ||= function(e) {
|
|
50
103
|
return new e(...[...arguments].slice(1));
|
|
51
104
|
};
|
|
52
|
-
var g = w(Array.prototype.forEach)
|
|
105
|
+
var g = w(Array.prototype.forEach);
|
|
106
|
+
Array.prototype.indexOf;
|
|
107
|
+
var re = w(Array.prototype.lastIndexOf), ie = w(Array.prototype.pop), ae = w(Array.prototype.push);
|
|
108
|
+
Array.prototype.slice;
|
|
109
|
+
var oe = w(Array.prototype.splice), _ = Array.isArray, se = w(String.prototype.toLowerCase), ce = w(String.prototype.toString), le = w(String.prototype.match), ue = w(String.prototype.replace), de = w(String.prototype.indexOf), fe = w(String.prototype.trim), pe = w(Number.prototype.toString), v = w(Boolean.prototype.toString), y = typeof BigInt > "u" ? null : w(BigInt.prototype.toString), me = typeof Symbol > "u" ? null : w(Symbol.prototype.toString), b = w(Object.prototype.hasOwnProperty), x = w(Object.prototype.toString), S = w(RegExp.prototype.test), C = T(TypeError);
|
|
53
110
|
function w(e) {
|
|
54
111
|
return function(t) {
|
|
55
112
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
56
113
|
var n = [...arguments].slice(1);
|
|
57
|
-
return
|
|
114
|
+
return te(e, t, n);
|
|
58
115
|
};
|
|
59
116
|
}
|
|
60
|
-
function
|
|
117
|
+
function T(e) {
|
|
61
118
|
return function() {
|
|
62
|
-
return
|
|
119
|
+
return ne(e, [...arguments]);
|
|
63
120
|
};
|
|
64
121
|
}
|
|
65
|
-
function
|
|
66
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
67
|
-
if (
|
|
122
|
+
function E(e, t) {
|
|
123
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : se;
|
|
124
|
+
if (l && l(e, null), !_(t)) return e;
|
|
68
125
|
let r = t.length;
|
|
69
126
|
for (; r--;) {
|
|
70
127
|
let i = t[r];
|
|
71
128
|
if (typeof i == "string") {
|
|
72
129
|
let e = n(i);
|
|
73
|
-
e !== i && (
|
|
130
|
+
e !== i && (u(t) || (t[r] = e), i = e);
|
|
74
131
|
}
|
|
75
132
|
e[i] = !0;
|
|
76
133
|
}
|
|
77
134
|
return e;
|
|
78
135
|
}
|
|
79
|
-
function
|
|
136
|
+
function he(e) {
|
|
80
137
|
for (let t = 0; t < e.length; t++) b(e, t) || (e[t] = null);
|
|
81
138
|
return e;
|
|
82
139
|
}
|
|
83
140
|
function D(e) {
|
|
84
|
-
let t =
|
|
85
|
-
for (let r of
|
|
86
|
-
var n =
|
|
87
|
-
let
|
|
88
|
-
b(e,
|
|
141
|
+
let t = h(null);
|
|
142
|
+
for (let r of c(e)) {
|
|
143
|
+
var n = a(r, 2);
|
|
144
|
+
let i = n[0], o = n[1];
|
|
145
|
+
b(e, i) && (t[i] = _(o) ? he(o) : o && typeof o == "object" && o.constructor === Object ? D(o) : o);
|
|
89
146
|
}
|
|
90
147
|
return t;
|
|
91
148
|
}
|
|
92
|
-
function
|
|
149
|
+
function ge(e) {
|
|
93
150
|
switch (typeof e) {
|
|
94
151
|
case "string": return e;
|
|
95
|
-
case "number": return
|
|
96
|
-
case "boolean": return
|
|
97
|
-
case "bigint": return
|
|
98
|
-
case "symbol": return
|
|
152
|
+
case "number": return pe(e);
|
|
153
|
+
case "boolean": return v(e);
|
|
154
|
+
case "bigint": return y ? y(e) : "0";
|
|
155
|
+
case "symbol": return me ? me(e) : "Symbol()";
|
|
99
156
|
case "undefined": return x(e);
|
|
100
157
|
case "function":
|
|
101
158
|
case "object": {
|
|
@@ -112,26 +169,26 @@ function me(e) {
|
|
|
112
169
|
}
|
|
113
170
|
function O(e, t) {
|
|
114
171
|
for (; e !== null;) {
|
|
115
|
-
let n =
|
|
172
|
+
let n = f(e, t);
|
|
116
173
|
if (n) {
|
|
117
174
|
if (n.get) return w(n.get);
|
|
118
175
|
if (typeof n.value == "function") return w(n.value);
|
|
119
176
|
}
|
|
120
|
-
e =
|
|
177
|
+
e = d(e);
|
|
121
178
|
}
|
|
122
179
|
function n() {
|
|
123
180
|
return null;
|
|
124
181
|
}
|
|
125
182
|
return n;
|
|
126
183
|
}
|
|
127
|
-
function
|
|
184
|
+
function _e(e) {
|
|
128
185
|
try {
|
|
129
186
|
return S(e, ""), !0;
|
|
130
187
|
} catch {
|
|
131
188
|
return !1;
|
|
132
189
|
}
|
|
133
190
|
}
|
|
134
|
-
var
|
|
191
|
+
var ve = p(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), ye = p(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), be = p([
|
|
135
192
|
"feBlend",
|
|
136
193
|
"feColorMatrix",
|
|
137
194
|
"feComponentTransfer",
|
|
@@ -157,7 +214,7 @@ var ge = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
157
214
|
"feSpotLight",
|
|
158
215
|
"feTile",
|
|
159
216
|
"feTurbulence"
|
|
160
|
-
]),
|
|
217
|
+
]), xe = p([
|
|
161
218
|
"animate",
|
|
162
219
|
"color-profile",
|
|
163
220
|
"cursor",
|
|
@@ -180,7 +237,7 @@ var ge = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
180
237
|
"solidcolor",
|
|
181
238
|
"unknown",
|
|
182
239
|
"use"
|
|
183
|
-
]),
|
|
240
|
+
]), Se = p(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Ce = p([
|
|
184
241
|
"maction",
|
|
185
242
|
"maligngroup",
|
|
186
243
|
"malignmark",
|
|
@@ -196,13 +253,13 @@ var ge = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
196
253
|
"annotation-xml",
|
|
197
254
|
"mprescripts",
|
|
198
255
|
"none"
|
|
199
|
-
]),
|
|
256
|
+
]), we = p(["#text"]), Te = p(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Ee = p(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), De = p(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Oe = p([
|
|
200
257
|
"xlink:href",
|
|
201
258
|
"xml:id",
|
|
202
259
|
"xlink:title",
|
|
203
260
|
"xml:space",
|
|
204
261
|
"xmlns:xlink"
|
|
205
|
-
]),
|
|
262
|
+
]), ke = m(/{{[\w\W]*|^[\w\W]*}}/g), Ae = m(/<%[\w\W]*|^[\w\W]*%>/g), je = m(/\${[\w\W]*/g), Me = m(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ne = m(/^aria-[\-\w]+$/), Pe = m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Fe = m(/^(?:\w+script|data):/i), Ie = m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Le = m(/^html$/i), Re = m(/^[a-z][.\w]*(-[.\w]+)+$/i), ze = m(/<[/\w!]/g), Be = m(/<[/\w]/g), Ve = m(/<\/no(script|embed|frames)/i), He = m(/\/>/i), k = {
|
|
206
263
|
element: 1,
|
|
207
264
|
attribute: 2,
|
|
208
265
|
text: 3,
|
|
@@ -224,14 +281,14 @@ var ge = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
224
281
|
"noframes",
|
|
225
282
|
"plaintext",
|
|
226
283
|
"noscript"
|
|
227
|
-
],
|
|
284
|
+
], Ue = p(E({}, A)), We = function() {
|
|
228
285
|
let e = {};
|
|
229
286
|
return g(A, (t) => {
|
|
230
|
-
e[t] =
|
|
231
|
-
}),
|
|
232
|
-
}(),
|
|
287
|
+
e[t] = m(RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
288
|
+
}), p(e);
|
|
289
|
+
}(), Ge = function() {
|
|
233
290
|
return typeof window > "u" ? null : window;
|
|
234
|
-
},
|
|
291
|
+
}, Ke = function(e, t) {
|
|
235
292
|
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
236
293
|
let n = null, r = "data-tt-policy-suffix";
|
|
237
294
|
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
@@ -248,7 +305,7 @@ var ge = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
248
305
|
} catch {
|
|
249
306
|
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
250
307
|
}
|
|
251
|
-
},
|
|
308
|
+
}, qe = function() {
|
|
252
309
|
return {
|
|
253
310
|
afterSanitizeAttributes: [],
|
|
254
311
|
afterSanitizeElements: [],
|
|
@@ -261,22 +318,22 @@ var ge = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
261
318
|
uponSanitizeShadowNode: []
|
|
262
319
|
};
|
|
263
320
|
}, j = function(e, t, n, r) {
|
|
264
|
-
return b(e, t) && _(e[t]) ?
|
|
265
|
-
},
|
|
321
|
+
return b(e, t) && _(e[t]) ? E(r.base ? D(r.base) : {}, e[t], r.transform) : n;
|
|
322
|
+
}, Je = function(e, t, n) {
|
|
266
323
|
let r = b(e, t) ? e[t] : void 0;
|
|
267
324
|
return r && typeof r == "object" ? D(r) : n();
|
|
268
325
|
};
|
|
269
|
-
function
|
|
270
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
271
|
-
if (t.version = "3.4.
|
|
326
|
+
function Ye() {
|
|
327
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ge(), t = (e) => Ye(e);
|
|
328
|
+
if (t.version = "3.4.16", t.removed = [], !e || !e.document || e.document.nodeType !== k.document || !e.Element) return t.isSupported = !1, t;
|
|
272
329
|
let n = e.document, r = n, i = r.currentScript;
|
|
273
330
|
e.DocumentFragment;
|
|
274
|
-
let a = e.HTMLTemplateElement,
|
|
331
|
+
let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, l = e.NodeFilter;
|
|
275
332
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
276
|
-
let u = e.DOMParser,
|
|
277
|
-
return
|
|
333
|
+
let u = e.DOMParser, d = e.trustedTypes, f = s.prototype, ee = O(f, "cloneNode"), te = O(f, "remove"), ne = O(f, "removeAttributeNode"), pe = O(f, "nextSibling"), v = O(f, "childNodes"), y = O(f, "parentNode"), me = O(f, "shadowRoot"), x = O(f, "attributes"), w = o && o.prototype ? O(o.prototype, "nodeType") : null, T = o && o.prototype ? O(o.prototype, "nodeName") : null, he = o && o.prototype ? O(o.prototype, "ownerDocument") : null, A = function(e) {
|
|
334
|
+
return w ? w(e) : e.nodeType;
|
|
278
335
|
}, Xe = function(e) {
|
|
279
|
-
return
|
|
336
|
+
return T ? T(e) : e.nodeName;
|
|
280
337
|
};
|
|
281
338
|
if (typeof a == "function") {
|
|
282
339
|
let e = n.createElement("template");
|
|
@@ -299,21 +356,21 @@ function qe() {
|
|
|
299
356
|
$e--;
|
|
300
357
|
}
|
|
301
358
|
}, nt = function() {
|
|
302
|
-
return Qe ||= (Ze =
|
|
303
|
-
}, rt = n, it = rt.implementation, at = rt.createNodeIterator, ot = rt.createDocumentFragment, st = rt.getElementsByTagName, ct = r.importNode, F =
|
|
304
|
-
t.isSupported = typeof
|
|
305
|
-
let lt =
|
|
306
|
-
...ge,
|
|
307
|
-
..._e,
|
|
359
|
+
return Qe ||= (Ze = Ke(d, i), !0), Ze;
|
|
360
|
+
}, rt = n, it = rt.implementation, at = rt.createNodeIterator, ot = rt.createDocumentFragment, st = rt.getElementsByTagName, ct = r.importNode, F = qe();
|
|
361
|
+
t.isSupported = typeof c == "function" && typeof y == "function" && it && it.createHTMLDocument !== void 0;
|
|
362
|
+
let lt = ke, ut = Ae, dt = je, ft = Me, pt = Ne, mt = Fe, ht = Ie, gt = Re, _t = Pe, I = null, vt = E({}, [
|
|
308
363
|
...ve,
|
|
364
|
+
...ye,
|
|
309
365
|
...be,
|
|
310
|
-
...Se
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
...we,
|
|
366
|
+
...Se,
|
|
367
|
+
...we
|
|
368
|
+
]), L = null, yt = E({}, [
|
|
314
369
|
...Te,
|
|
315
|
-
...Ee
|
|
316
|
-
|
|
370
|
+
...Ee,
|
|
371
|
+
...De,
|
|
372
|
+
...Oe
|
|
373
|
+
]), R = Object.seal(h(null, {
|
|
317
374
|
tagNameCheck: {
|
|
318
375
|
writable: !0,
|
|
319
376
|
configurable: !1,
|
|
@@ -332,7 +389,7 @@ function qe() {
|
|
|
332
389
|
enumerable: !0,
|
|
333
390
|
value: !1
|
|
334
391
|
}
|
|
335
|
-
})), bt = null, xt = null, z = Object.seal(
|
|
392
|
+
})), bt = null, xt = null, z = Object.seal(h(null, {
|
|
336
393
|
tagCheck: {
|
|
337
394
|
writable: !0,
|
|
338
395
|
configurable: !1,
|
|
@@ -345,14 +402,14 @@ function qe() {
|
|
|
345
402
|
enumerable: !0,
|
|
346
403
|
value: null
|
|
347
404
|
}
|
|
348
|
-
})), St = !0, Ct = !0, wt = !1, Tt = !0, B = !1, V = !0, H = !1, Et = !1, Dt = null, Ot = null, kt = !1, U = !1, At = !1, jt = !1, Mt = !0, Nt = !1, Pt = "user-content-", Ft = !0, It = !1, W = {}, G = null, Lt =
|
|
405
|
+
})), St = !0, Ct = !0, wt = !1, Tt = !0, B = !1, V = !0, H = !1, Et = !1, Dt = null, Ot = null, kt = !1, U = !1, At = !1, jt = !1, Mt = !0, Nt = !1, Pt = "user-content-", Ft = !0, It = !1, W = {}, G = null, Lt = E({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Rt = null, zt = E({}, [
|
|
349
406
|
"audio",
|
|
350
407
|
"video",
|
|
351
408
|
"img",
|
|
352
409
|
"source",
|
|
353
410
|
"image",
|
|
354
411
|
"track"
|
|
355
|
-
]), Bt = null, Vt =
|
|
412
|
+
]), Bt = null, Vt = E({}, [
|
|
356
413
|
"alt",
|
|
357
414
|
"class",
|
|
358
415
|
"for",
|
|
@@ -367,17 +424,17 @@ function qe() {
|
|
|
367
424
|
"value",
|
|
368
425
|
"style",
|
|
369
426
|
"xmlns"
|
|
370
|
-
]), Ht = "http://www.w3.org/1998/Math/MathML", Ut = "http://www.w3.org/2000/svg", K = "http://www.w3.org/1999/xhtml", q = K, Wt = !1, Gt = null, Kt =
|
|
427
|
+
]), Ht = "http://www.w3.org/1998/Math/MathML", Ut = "http://www.w3.org/2000/svg", K = "http://www.w3.org/1999/xhtml", q = K, Wt = !1, Gt = null, Kt = E({}, [
|
|
371
428
|
Ht,
|
|
372
429
|
Ut,
|
|
373
430
|
K
|
|
374
|
-
],
|
|
431
|
+
], ce), qt = p([
|
|
375
432
|
"mi",
|
|
376
433
|
"mo",
|
|
377
434
|
"mn",
|
|
378
435
|
"ms",
|
|
379
436
|
"mtext"
|
|
380
|
-
]), Jt =
|
|
437
|
+
]), Jt = E({}, qt), Yt = p(["annotation-xml"]), Xt = E({}, Yt), Zt = E({}, [
|
|
381
438
|
"title",
|
|
382
439
|
"style",
|
|
383
440
|
"font",
|
|
@@ -388,19 +445,19 @@ function qe() {
|
|
|
388
445
|
}, nn = function() {
|
|
389
446
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
390
447
|
if (Y && Y === e) return;
|
|
391
|
-
(!e || typeof e != "object") && (e = {}), e = D(e), Qt = $t.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, J = Qt === "application/xhtml+xml" ?
|
|
448
|
+
(!e || typeof e != "object") && (e = {}), e = D(e), Qt = $t.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, J = Qt === "application/xhtml+xml" ? ce : se, I = j(e, "ALLOWED_TAGS", vt, { transform: J }), L = j(e, "ALLOWED_ATTR", yt, { transform: J }), Gt = j(e, "ALLOWED_NAMESPACES", Kt, { transform: ce }), Bt = j(e, "ADD_URI_SAFE_ATTR", Vt, {
|
|
392
449
|
transform: J,
|
|
393
450
|
base: Vt
|
|
394
451
|
}), Rt = j(e, "ADD_DATA_URI_TAGS", zt, {
|
|
395
452
|
transform: J,
|
|
396
453
|
base: zt
|
|
397
|
-
}), G = j(e, "FORBID_CONTENTS", Lt, { transform: J }), bt = j(e, "FORBID_TAGS", D({}), { transform: J }), xt = j(e, "FORBID_ATTR", D({}), { transform: J }), W = b(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? D(e.USE_PROFILES) : e.USE_PROFILES : !1, St = e.ALLOW_ARIA_ATTR !== !1, Ct = e.ALLOW_DATA_ATTR !== !1, wt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Tt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, B = e.SAFE_FOR_TEMPLATES || !1, V = e.SAFE_FOR_XML !== !1, H = e.WHOLE_DOCUMENT || !1, U = e.RETURN_DOM || !1, At = e.RETURN_DOM_FRAGMENT || !1, jt = e.RETURN_TRUSTED_TYPE || !1, kt = e.FORCE_BODY || !1, Mt = e.SANITIZE_DOM !== !1, Nt = e.SANITIZE_NAMED_PROPS || !1, Ft = e.KEEP_CONTENT !== !1, It = e.IN_PLACE || !1, _t =
|
|
398
|
-
let t =
|
|
399
|
-
if (R =
|
|
454
|
+
}), G = j(e, "FORBID_CONTENTS", Lt, { transform: J }), bt = j(e, "FORBID_TAGS", D({}), { transform: J }), xt = j(e, "FORBID_ATTR", D({}), { transform: J }), W = b(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? D(e.USE_PROFILES) : e.USE_PROFILES : !1, St = e.ALLOW_ARIA_ATTR !== !1, Ct = e.ALLOW_DATA_ATTR !== !1, wt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Tt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, B = e.SAFE_FOR_TEMPLATES || !1, V = e.SAFE_FOR_XML !== !1, H = e.WHOLE_DOCUMENT || !1, U = e.RETURN_DOM || !1, At = e.RETURN_DOM_FRAGMENT || !1, jt = e.RETURN_TRUSTED_TYPE || !1, kt = e.FORCE_BODY || !1, Mt = e.SANITIZE_DOM !== !1, Nt = e.SANITIZE_NAMED_PROPS || !1, Ft = e.KEEP_CONTENT !== !1, It = e.IN_PLACE || !1, _t = _e(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Pe, q = typeof e.NAMESPACE == "string" ? e.NAMESPACE : K, Jt = Je(e, "MATHML_TEXT_INTEGRATION_POINTS", () => E({}, qt)), Xt = Je(e, "HTML_INTEGRATION_POINTS", () => E({}, Yt));
|
|
455
|
+
let t = Je(e, "CUSTOM_ELEMENT_HANDLING", () => h(null));
|
|
456
|
+
if (R = h(null), b(t, "tagNameCheck") && tn(t.tagNameCheck) && (R.tagNameCheck = t.tagNameCheck), b(t, "attributeNameCheck") && tn(t.attributeNameCheck) && (R.attributeNameCheck = t.attributeNameCheck), b(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), m(R), B && (Ct = !1), At && (U = !0), W && (I = E({}, we), L = h(null), W.html === !0 && (E(I, ve), E(L, Te)), W.svg === !0 && (E(I, ye), E(L, Ee), E(L, Oe)), W.svgFilters === !0 && (E(I, be), E(L, Ee), E(L, Oe)), W.mathMl === !0 && (E(I, Se), E(L, De), E(L, Oe))), z.tagCheck = null, z.attributeCheck = null, b(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? z.tagCheck = e.ADD_TAGS : _(e.ADD_TAGS) && (I === vt && (I = D(I)), E(I, e.ADD_TAGS, J))), b(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? z.attributeCheck = e.ADD_ATTR : _(e.ADD_ATTR) && (L === yt && (L = D(L)), E(L, e.ADD_ATTR, J))), b(e, "ADD_FORBID_CONTENTS") && _(e.ADD_FORBID_CONTENTS) && (G === Lt && (G = D(G)), E(G, e.ADD_FORBID_CONTENTS, J)), Ft && (I["#text"] = !0), H && E(I, [
|
|
400
457
|
"html",
|
|
401
458
|
"head",
|
|
402
459
|
"body"
|
|
403
|
-
]), I.table && (
|
|
460
|
+
]), I.table && (E(I, ["tbody"]), delete bt.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
404
461
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw C("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
405
462
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw C("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
406
463
|
let t = M;
|
|
@@ -411,35 +468,35 @@ function qe() {
|
|
|
411
468
|
throw M = t, e;
|
|
412
469
|
}
|
|
413
470
|
} else e.TRUSTED_TYPES_POLICY === null ? (M = void 0, N = "") : (M === void 0 && (M = nt()), M && typeof N == "string" && (N = P("")));
|
|
414
|
-
|
|
415
|
-
}, rn =
|
|
416
|
-
...
|
|
417
|
-
...
|
|
418
|
-
...
|
|
419
|
-
]), an =
|
|
471
|
+
p && p(e), Y = e;
|
|
472
|
+
}, rn = E({}, [
|
|
473
|
+
...ye,
|
|
474
|
+
...be,
|
|
475
|
+
...xe
|
|
476
|
+
]), an = E({}, [...Se, ...Ce]), on = function(e, t, n) {
|
|
420
477
|
return t.namespaceURI === K ? e === "svg" : t.namespaceURI === Ht ? e === "svg" && (n === "annotation-xml" || Jt[n]) : !!rn[e];
|
|
421
478
|
}, sn = function(e, t, n) {
|
|
422
479
|
return t.namespaceURI === K ? e === "math" : t.namespaceURI === Ut ? e === "math" && Xt[n] : !!an[e];
|
|
423
480
|
}, cn = function(e, t, n) {
|
|
424
481
|
return t.namespaceURI === Ut && !Xt[n] || t.namespaceURI === Ht && !Jt[n] ? !1 : !an[e] && (Zt[e] || !rn[e]);
|
|
425
482
|
}, ln = function(e) {
|
|
426
|
-
let t =
|
|
483
|
+
let t = y(e);
|
|
427
484
|
(!t || !t.tagName) && (t = {
|
|
428
485
|
namespaceURI: q,
|
|
429
486
|
tagName: "template"
|
|
430
487
|
});
|
|
431
|
-
let n =
|
|
488
|
+
let n = se(e.tagName), r = se(t.tagName);
|
|
432
489
|
return Gt[e.namespaceURI] ? e.namespaceURI === Ut ? on(n, t, r) : e.namespaceURI === Ht ? sn(n, t, r) : e.namespaceURI === K ? cn(n, t, r) : !!(Qt === "application/xhtml+xml" && Gt[e.namespaceURI]) : !1;
|
|
433
490
|
}, X = function(e) {
|
|
434
|
-
|
|
491
|
+
ae(t.removed, { element: e });
|
|
435
492
|
try {
|
|
436
|
-
|
|
493
|
+
y(e).removeChild(e);
|
|
437
494
|
} catch {
|
|
438
|
-
if (
|
|
495
|
+
if (te(e), !y(e)) throw C("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
439
496
|
}
|
|
440
497
|
}, un = function(e, t, n) {
|
|
441
498
|
try {
|
|
442
|
-
|
|
499
|
+
ne(e, t);
|
|
443
500
|
} catch {
|
|
444
501
|
try {
|
|
445
502
|
e.removeAttribute(n);
|
|
@@ -447,18 +504,18 @@ function qe() {
|
|
|
447
504
|
}
|
|
448
505
|
}, dn = function(e) {
|
|
449
506
|
pn(e);
|
|
450
|
-
let t =
|
|
507
|
+
let t = v(e);
|
|
451
508
|
if (t) {
|
|
452
509
|
let e = [];
|
|
453
510
|
g(t, (t) => {
|
|
454
|
-
|
|
511
|
+
ae(e, t);
|
|
455
512
|
}), g(e, (e) => {
|
|
456
513
|
try {
|
|
457
|
-
|
|
514
|
+
te(e);
|
|
458
515
|
} catch {}
|
|
459
516
|
});
|
|
460
517
|
}
|
|
461
|
-
let n =
|
|
518
|
+
let n = x(e);
|
|
462
519
|
if (n) for (let t = n.length - 1; t >= 0; --t) {
|
|
463
520
|
let r = n[t], i = r && r.name;
|
|
464
521
|
typeof i == "string" && un(e, r, i);
|
|
@@ -469,12 +526,12 @@ function qe() {
|
|
|
469
526
|
} catch {
|
|
470
527
|
r = null;
|
|
471
528
|
}
|
|
472
|
-
|
|
529
|
+
ae(t.removed, {
|
|
473
530
|
attribute: r || null,
|
|
474
531
|
from: n
|
|
475
532
|
});
|
|
476
533
|
try {
|
|
477
|
-
r ?
|
|
534
|
+
r ? ne(n, r) : n.removeAttribute(e);
|
|
478
535
|
} catch {
|
|
479
536
|
try {
|
|
480
537
|
n.removeAttribute(e);
|
|
@@ -489,7 +546,7 @@ function qe() {
|
|
|
489
546
|
} catch {}
|
|
490
547
|
}
|
|
491
548
|
}, fn = function(e) {
|
|
492
|
-
let t =
|
|
549
|
+
let t = x(e);
|
|
493
550
|
if (t) for (let n = t.length - 1; n >= 0; --n) {
|
|
494
551
|
let r = t[n], i = r && r.name;
|
|
495
552
|
typeof i != "string" || L[J(i)] || un(e, r, i);
|
|
@@ -498,8 +555,8 @@ function qe() {
|
|
|
498
555
|
let t = [e];
|
|
499
556
|
for (; t.length > 0;) {
|
|
500
557
|
let e = t.pop();
|
|
501
|
-
|
|
502
|
-
let n =
|
|
558
|
+
A(e) === k.element && fn(e);
|
|
559
|
+
let n = v(e);
|
|
503
560
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
504
561
|
}
|
|
505
562
|
}, mn = function(e, t) {
|
|
@@ -508,10 +565,10 @@ function qe() {
|
|
|
508
565
|
if (!V) return;
|
|
509
566
|
let t = [e];
|
|
510
567
|
for (; t.length > 0;) {
|
|
511
|
-
let e = t.pop(), n =
|
|
512
|
-
if (n === k.processingInstruction || n === k.comment && S(
|
|
568
|
+
let e = t.pop(), n = A(e);
|
|
569
|
+
if (n === k.processingInstruction || n === k.comment && S(Be, e.data)) {
|
|
513
570
|
try {
|
|
514
|
-
|
|
571
|
+
te(e);
|
|
515
572
|
} catch {}
|
|
516
573
|
continue;
|
|
517
574
|
}
|
|
@@ -521,14 +578,14 @@ function qe() {
|
|
|
521
578
|
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && mn("for", n) && t.removeAttribute("for");
|
|
522
579
|
} catch {}
|
|
523
580
|
}
|
|
524
|
-
let r =
|
|
581
|
+
let r = v(e);
|
|
525
582
|
if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
|
|
526
583
|
}
|
|
527
584
|
}, gn = function(e) {
|
|
528
585
|
let t = null, r = null;
|
|
529
586
|
if (kt) e = "<remove></remove>" + e;
|
|
530
587
|
else {
|
|
531
|
-
let t =
|
|
588
|
+
let t = le(e, /^[\r\n\t ]+/);
|
|
532
589
|
r = t && t[0];
|
|
533
590
|
}
|
|
534
591
|
Qt === "application/xhtml+xml" && q === K && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
@@ -545,86 +602,86 @@ function qe() {
|
|
|
545
602
|
let a = t.body || t.documentElement;
|
|
546
603
|
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), q === K ? st.call(t, H ? "html" : "body")[0] : H ? t.documentElement : a;
|
|
547
604
|
}, _n = function(e) {
|
|
548
|
-
let t =
|
|
605
|
+
let t = he ? he(e) : e.ownerDocument;
|
|
549
606
|
return at.call(t || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
550
607
|
}, vn = function(e) {
|
|
551
|
-
return e =
|
|
608
|
+
return e = ue(e, lt, " "), e = ue(e, ut, " "), e = ue(e, dt, " "), e;
|
|
552
609
|
}, yn = function(e) {
|
|
553
610
|
e.normalize();
|
|
554
|
-
let t =
|
|
611
|
+
let t = he ? he(e) : e.ownerDocument, n = at.call(t || e, e, l.SHOW_TEXT | l.SHOW_COMMENT | l.SHOW_CDATA_SECTION | l.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
|
|
555
612
|
for (; r;) r.data = vn(r.data), r = n.nextNode();
|
|
556
613
|
let i = e.querySelectorAll?.call(e, "template");
|
|
557
614
|
i && g(i, (e) => {
|
|
558
|
-
|
|
615
|
+
xn(e.content) && yn(e.content);
|
|
559
616
|
});
|
|
560
617
|
}, bn = function(e) {
|
|
561
|
-
let t =
|
|
562
|
-
return typeof t != "string" || J(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !==
|
|
563
|
-
},
|
|
564
|
-
if (!
|
|
618
|
+
let t = T ? T(e) : null;
|
|
619
|
+
return typeof t != "string" || J(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== x(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== w(e) || e.childNodes !== v(e);
|
|
620
|
+
}, xn = function(e) {
|
|
621
|
+
if (!w || typeof e != "object" || !e) return !1;
|
|
565
622
|
try {
|
|
566
|
-
return
|
|
623
|
+
return w(e) === k.documentFragment;
|
|
567
624
|
} catch {
|
|
568
625
|
return !1;
|
|
569
626
|
}
|
|
570
|
-
},
|
|
571
|
-
if (!
|
|
627
|
+
}, Sn = function(e) {
|
|
628
|
+
if (!w || typeof e != "object" || !e) return !1;
|
|
572
629
|
try {
|
|
573
|
-
return typeof
|
|
630
|
+
return typeof w(e) == "number";
|
|
574
631
|
} catch {
|
|
575
632
|
return !1;
|
|
576
633
|
}
|
|
577
634
|
};
|
|
578
|
-
function
|
|
635
|
+
function Q(e, n, r) {
|
|
579
636
|
e.length !== 0 && g(e, (e) => {
|
|
580
637
|
e.call(t, n, r, Y);
|
|
581
638
|
});
|
|
582
639
|
}
|
|
583
|
-
let
|
|
584
|
-
return !!(V && e.hasChildNodes() && !
|
|
585
|
-
},
|
|
640
|
+
let Cn = function(e, t) {
|
|
641
|
+
return !!(V && e.hasChildNodes() && !Sn(e.firstElementChild) && S(ze, e.textContent) && S(ze, e.innerHTML) || V && e.namespaceURI === K && Ue[t] && (Sn(e.firstElementChild) || typeof e.textContent == "string" && S(We[t], e.textContent)) || e.nodeType === k.processingInstruction || V && e.nodeType === k.comment && S(Be, e.data));
|
|
642
|
+
}, wn = function(e, t) {
|
|
586
643
|
return e instanceof RegExp ? S(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
|
|
587
|
-
},
|
|
588
|
-
if (!bt[t] && An(t) &&
|
|
644
|
+
}, Tn = function(e, t, n) {
|
|
645
|
+
if (!bt[t] && An(t) && wn(R.tagNameCheck, t)) return !1;
|
|
589
646
|
if (Ft && !G[t]) {
|
|
590
|
-
let t =
|
|
647
|
+
let t = y(e), r = v(e);
|
|
591
648
|
if (r && t) {
|
|
592
649
|
let i = r.length;
|
|
593
650
|
for (let a = i - 1; a >= 0; --a) {
|
|
594
651
|
let i = e === n ? ee(r[a], !0) : r[a];
|
|
595
|
-
t.insertBefore(i,
|
|
652
|
+
t.insertBefore(i, pe(e));
|
|
596
653
|
}
|
|
597
654
|
}
|
|
598
655
|
}
|
|
599
656
|
return X(e), !0;
|
|
600
|
-
},
|
|
657
|
+
}, En = function(e, t, n, r) {
|
|
601
658
|
return e.length === 0 ? t : t === n || t === r ? D(t) : t;
|
|
602
|
-
},
|
|
603
|
-
return e === t ||
|
|
659
|
+
}, $ = function(e, t) {
|
|
660
|
+
return e === t || y(e) !== null ? !1 : (It && pn(e), !0);
|
|
604
661
|
}, Dn = function(e, n) {
|
|
605
|
-
if (
|
|
662
|
+
if (Q(F.beforeSanitizeElements, e, null), $(e, n)) return !0;
|
|
606
663
|
if (bn(e)) return X(e), !0;
|
|
607
664
|
let r = J(Xe(e));
|
|
608
|
-
if (I =
|
|
665
|
+
if (I = En(F.uponSanitizeElement, I, vt, Dt), Q(F.uponSanitizeElement, e, {
|
|
609
666
|
tagName: r,
|
|
610
667
|
allowedTags: I
|
|
611
|
-
}),
|
|
612
|
-
if (
|
|
668
|
+
}), $(e, n)) return !0;
|
|
669
|
+
if (Cn(e, r)) return X(e), !0;
|
|
613
670
|
if (bt[r] || !(z.tagCheck instanceof Function && z.tagCheck(r)) && !I[r]) {
|
|
614
|
-
let t =
|
|
615
|
-
return t === !1 &&
|
|
671
|
+
let t = Tn(e, r, n);
|
|
672
|
+
return t === !1 && (Q(F.afterSanitizeElements, e, null), $(e, n)) ? !0 : t;
|
|
616
673
|
}
|
|
617
|
-
if (
|
|
674
|
+
if (A(e) === k.element && !ln(e) || (r === "noscript" || r === "noembed" || r === "noframes") && S(Ve, e.innerHTML)) return X(e), !0;
|
|
618
675
|
if (B && e.nodeType === k.text) {
|
|
619
676
|
let n = vn(e.textContent);
|
|
620
|
-
e.textContent !== n && (
|
|
677
|
+
e.textContent !== n && (ae(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
621
678
|
}
|
|
622
|
-
return
|
|
679
|
+
return Q(F.afterSanitizeElements, e, null), $(e, n);
|
|
623
680
|
}, On = function(e, t, r) {
|
|
624
681
|
if (xt[t] || mn(t, e) || Mt && (t === "id" || t === "name") && (r in n || r in en)) return !1;
|
|
625
682
|
let i = L[t] || z.attributeCheck instanceof Function && z.attributeCheck(t, e);
|
|
626
|
-
return Ct && S(ft, t) || St && S(pt, t) ? !0 : i ? Bt[t] || S(_t,
|
|
627
|
-
}, kn =
|
|
683
|
+
return Ct && S(ft, t) || St && S(pt, t) ? !0 : i ? Bt[t] || S(_t, ue(r, ht, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && de(r, "data:") === 0 && Rt[e] || wt && !S(mt, ue(r, ht, "")) ? !0 : !r : An(e) && wn(R.tagNameCheck, e) && wn(R.attributeNameCheck, t, e) || t === "is" && R.allowCustomizedBuiltInElements && wn(R.tagNameCheck, r);
|
|
684
|
+
}, kn = E({}, [
|
|
628
685
|
"annotation-xml",
|
|
629
686
|
"color-profile",
|
|
630
687
|
"font-face",
|
|
@@ -634,9 +691,9 @@ function qe() {
|
|
|
634
691
|
"font-face-uri",
|
|
635
692
|
"missing-glyph"
|
|
636
693
|
]), An = function(e) {
|
|
637
|
-
return !kn[
|
|
694
|
+
return !kn[se(e)] && S(gt, e);
|
|
638
695
|
}, jn = function(e, t, n, r) {
|
|
639
|
-
if (M && typeof
|
|
696
|
+
if (M && typeof d == "object" && typeof d.getAttributeType == "function" && !n) switch (d.getAttributeType(e, t)) {
|
|
640
697
|
case "TrustedHTML": return P(r);
|
|
641
698
|
case "TrustedScriptURL": return tt(r);
|
|
642
699
|
}
|
|
@@ -647,52 +704,52 @@ function qe() {
|
|
|
647
704
|
} catch {
|
|
648
705
|
return Z(t, e), !1;
|
|
649
706
|
}
|
|
650
|
-
}, Nn = function(e) {
|
|
651
|
-
|
|
652
|
-
let
|
|
653
|
-
if (!
|
|
654
|
-
L =
|
|
655
|
-
let
|
|
707
|
+
}, Nn = function(e, n) {
|
|
708
|
+
if (Q(F.beforeSanitizeAttributes, e, null), $(e, n)) return;
|
|
709
|
+
let r = e.attributes;
|
|
710
|
+
if (!r || bn(e)) return;
|
|
711
|
+
L = En(F.uponSanitizeAttribute, L, yt, Ot);
|
|
712
|
+
let i = {
|
|
656
713
|
attrName: "",
|
|
657
714
|
attrValue: "",
|
|
658
715
|
keepAttr: !0,
|
|
659
716
|
allowedAttributes: L,
|
|
660
717
|
forceKeepAttr: void 0
|
|
661
|
-
},
|
|
662
|
-
for (;
|
|
663
|
-
let
|
|
664
|
-
if (
|
|
665
|
-
Z(s, e,
|
|
718
|
+
}, a = r.length, o = J(e.nodeName);
|
|
719
|
+
for (; a--;) {
|
|
720
|
+
let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = J(s), d = l, f = s === "value" ? d : fe(d), p = !1;
|
|
721
|
+
if (i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, Q(F.uponSanitizeAttribute, e, i), f = i.attrValue, Nt && (u === "id" || u === "name") && de(f, Pt) !== 0 && (Z(s, e, n), f = Pt + f, p = !0), V && S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
|
|
722
|
+
Z(s, e, n);
|
|
666
723
|
continue;
|
|
667
724
|
}
|
|
668
|
-
if (u === "attributename" &&
|
|
669
|
-
Z(s, e,
|
|
725
|
+
if (u === "attributename" && le(f, "href")) {
|
|
726
|
+
Z(s, e, n);
|
|
670
727
|
continue;
|
|
671
728
|
}
|
|
672
|
-
if (!
|
|
673
|
-
if (!
|
|
674
|
-
Z(s, e,
|
|
729
|
+
if (!i.forceKeepAttr) {
|
|
730
|
+
if (!i.keepAttr) {
|
|
731
|
+
Z(s, e, n);
|
|
675
732
|
continue;
|
|
676
733
|
}
|
|
677
|
-
if (!Tt && S(
|
|
678
|
-
Z(s, e,
|
|
734
|
+
if (!Tt && S(He, f)) {
|
|
735
|
+
Z(s, e, n);
|
|
679
736
|
continue;
|
|
680
737
|
}
|
|
681
|
-
if (B && (f = vn(f)), !On(
|
|
682
|
-
Z(s, e,
|
|
738
|
+
if (B && (f = vn(f)), !On(o, u, f)) {
|
|
739
|
+
Z(s, e, n);
|
|
683
740
|
continue;
|
|
684
741
|
}
|
|
685
|
-
f = jn(
|
|
742
|
+
f = jn(o, u, c, f), f !== d && Mn(e, s, c, f) && p && ie(t.removed);
|
|
686
743
|
}
|
|
687
744
|
}
|
|
688
|
-
|
|
745
|
+
Q(F.afterSanitizeAttributes, e, null), $(e, n);
|
|
689
746
|
}, Pn = function(e) {
|
|
690
747
|
let t = null, n = _n(e);
|
|
691
|
-
for (
|
|
692
|
-
let e =
|
|
693
|
-
|
|
748
|
+
for (Q(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (Q(F.uponSanitizeShadowNode, t, null), Dn(t, e), Nn(t, e), xn(t.content) && Pn(t.content), A(t) === k.element) {
|
|
749
|
+
let e = me(t);
|
|
750
|
+
xn(e) && (Fn(e), Pn(e));
|
|
694
751
|
}
|
|
695
|
-
|
|
752
|
+
Q(F.afterSanitizeShadowDOM, e, null);
|
|
696
753
|
}, Fn = function(e) {
|
|
697
754
|
let t = [{
|
|
698
755
|
node: e,
|
|
@@ -704,24 +761,24 @@ function qe() {
|
|
|
704
761
|
Pn(e.shadow);
|
|
705
762
|
continue;
|
|
706
763
|
}
|
|
707
|
-
let n = e.node, r =
|
|
764
|
+
let n = e.node, r = A(n) === k.element, i = v(n);
|
|
708
765
|
if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
|
|
709
766
|
node: i[e],
|
|
710
767
|
shadow: null
|
|
711
768
|
});
|
|
712
769
|
if (r) {
|
|
713
|
-
let e =
|
|
770
|
+
let e = T ? T(n) : null;
|
|
714
771
|
if (typeof e == "string" && J(e) === "template") {
|
|
715
772
|
let e = n.content;
|
|
716
|
-
|
|
773
|
+
xn(e) && t.push({
|
|
717
774
|
node: e,
|
|
718
775
|
shadow: null
|
|
719
776
|
});
|
|
720
777
|
}
|
|
721
778
|
}
|
|
722
779
|
if (r) {
|
|
723
|
-
let e =
|
|
724
|
-
|
|
780
|
+
let e = me(n);
|
|
781
|
+
xn(e) && t.push({
|
|
725
782
|
node: null,
|
|
726
783
|
shadow: e
|
|
727
784
|
}, {
|
|
@@ -733,10 +790,10 @@ function qe() {
|
|
|
733
790
|
};
|
|
734
791
|
return t.sanitize = function(e) {
|
|
735
792
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
736
|
-
if (Wt = !e, Wt && (e = "<!-->"), typeof e != "string" && !
|
|
793
|
+
if (Wt = !e, Wt && (e = "<!-->"), typeof e != "string" && !Sn(e) && (e = ge(e), typeof e != "string")) throw C("dirty is not a string, aborting");
|
|
737
794
|
if (!t.isSupported) return e;
|
|
738
795
|
Et ? (I = Dt, L = Ot) : nn(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (I = D(I)), F.uponSanitizeAttribute.length > 0 && (L = D(L)), t.removed = [];
|
|
739
|
-
let c = It && typeof e != "string" &&
|
|
796
|
+
let c = It && typeof e != "string" && Sn(e);
|
|
740
797
|
if (c) {
|
|
741
798
|
hn(e);
|
|
742
799
|
let t = Xe(e);
|
|
@@ -750,7 +807,7 @@ function qe() {
|
|
|
750
807
|
} catch (t) {
|
|
751
808
|
throw dn(e), t;
|
|
752
809
|
}
|
|
753
|
-
} else if (
|
|
810
|
+
} else if (Sn(e)) i = gn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === k.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Fn(i);
|
|
754
811
|
else {
|
|
755
812
|
if (!U && !B && !H && e.indexOf("<") === -1) return M && jt ? P(e) : e;
|
|
756
813
|
if (i = gn(e), !i) return U ? null : jt ? N : "";
|
|
@@ -759,22 +816,26 @@ function qe() {
|
|
|
759
816
|
let l = c ? e : i;
|
|
760
817
|
try {
|
|
761
818
|
let e = _n(l);
|
|
762
|
-
for (; o = e.nextNode();) Dn(o, l), Nn(o),
|
|
819
|
+
for (; o = e.nextNode();) Dn(o, l), Nn(o, l), xn(o.content) && Pn(o.content);
|
|
763
820
|
} catch (n) {
|
|
764
821
|
throw c && (dn(e), g(t.removed, (e) => {
|
|
765
822
|
e.element && pn(e.element);
|
|
766
823
|
})), n;
|
|
767
824
|
}
|
|
768
|
-
if (c)
|
|
769
|
-
|
|
770
|
-
|
|
825
|
+
if (c) {
|
|
826
|
+
let n = !1;
|
|
827
|
+
if (g(t.removed, (t) => {
|
|
828
|
+
t.element && (t.element === e && (n = !0), pn(t.element));
|
|
829
|
+
}), n) throw C("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
830
|
+
return B && yn(e), e;
|
|
831
|
+
}
|
|
771
832
|
if (U) {
|
|
772
833
|
if (B && yn(i), At) for (s = ot.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
773
834
|
else s = i;
|
|
774
835
|
return (L.shadowroot || L.shadowrootmode) && (s = ct.call(r, s, !0)), s;
|
|
775
836
|
}
|
|
776
837
|
let u = H ? i.outerHTML : i.innerHTML;
|
|
777
|
-
return H && I["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && S(
|
|
838
|
+
return H && I["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && S(Le, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), B && (u = vn(u)), M && jt ? P(u) : u;
|
|
778
839
|
}, t.setConfig = function() {
|
|
779
840
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
780
841
|
nn(e), Et = !0, Dt = I, Ot = L;
|
|
@@ -785,21 +846,21 @@ function qe() {
|
|
|
785
846
|
let r = J(e), i = J(t);
|
|
786
847
|
return On(r, i, n);
|
|
787
848
|
}, t.addHook = function(e, t) {
|
|
788
|
-
typeof t == "function" && b(F, e) &&
|
|
849
|
+
typeof t == "function" && b(F, e) && ae(F[e], t);
|
|
789
850
|
}, t.removeHook = function(e, t) {
|
|
790
851
|
if (b(F, e)) {
|
|
791
852
|
if (t !== void 0) {
|
|
792
|
-
let n =
|
|
793
|
-
return n === -1 ? void 0 :
|
|
853
|
+
let n = re(F[e], t);
|
|
854
|
+
return n === -1 ? void 0 : oe(F[e], n, 1)[0];
|
|
794
855
|
}
|
|
795
|
-
return
|
|
856
|
+
return ie(F[e]);
|
|
796
857
|
}
|
|
797
858
|
}, t.removeHooks = function(e) {
|
|
798
859
|
b(F, e) && (F[e] = []);
|
|
799
860
|
}, t.removeAllHooks = function() {
|
|
800
|
-
F =
|
|
861
|
+
F = qe();
|
|
801
862
|
}, t;
|
|
802
863
|
}
|
|
803
|
-
var
|
|
864
|
+
var Xe = Ye();
|
|
804
865
|
//#endregion
|
|
805
|
-
export {
|
|
866
|
+
export { Xe as t };
|