@datagouv/components-next 1.5.1-dev.1397.g7333a397 → 1.5.1-dev.1399.g35c3eb9f

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.
Files changed (59) hide show
  1. package/dist/{Control-DPuXeUqi.js → Control-BbyEe8x_.js} +7 -7
  2. package/dist/{Datafair.client-LlEgG7WU.js → Datafair.client-CQNxPvZt.js} +1 -1
  3. package/dist/{Image-DVWRoLLI.js → Image-umPJvSA8.js} +16 -13
  4. package/dist/{ImagePreview.client-Db5dmxMP.js → ImagePreview.client-DbkBb47d.js} +1 -1
  5. package/dist/{JsonPreview.client-DKy2AexC.js → JsonPreview.client-Ba-_lUCj.js} +2 -2
  6. package/dist/{Layer-D_5tYbVm.js → Layer-CagLskq_.js} +67 -61
  7. package/dist/{Map-CTBJEae_.js → Map-Cek3vwVi.js} +1094 -932
  8. package/dist/{MapContainer.client-DoN1jSzM.js → MapContainer.client-BsJGdnP2.js} +7 -7
  9. package/dist/{OSM-B5Zc3qAf.js → OSM-Bm69tJpi.js} +1 -1
  10. package/dist/{PdfPreview.client-D3wHTDb9.js → PdfPreview.client-CJbZbXds.js} +3 -3
  11. package/dist/{PdfSkeleton-nas5Pmia.js → PdfSkeleton-sY8nI3Lv.js} +1 -1
  12. package/dist/{Pmtiles.client-DncYrZSp.js → Pmtiles.client-Wea3YvTU.js} +9997 -9276
  13. package/dist/{PreviewError-EeaGx3SL.js → PreviewError-BzUvwX47.js} +329 -290
  14. package/dist/{PreviewWrapper-BhldDdXK.js → PreviewWrapper-CwOJqQSn.js} +1 -1
  15. package/dist/{ScaleLine-C_tuJ6VG.js → ScaleLine-C8xmHdEk.js} +15 -8
  16. package/dist/Tile-DfivRbb3.js +479 -0
  17. package/dist/{Tile-8nHSuqcv.js → Tile-DvVc2IeI.js} +220 -151
  18. package/dist/{TileImage-CgO5alXc.js → TileImage-CxC7EP7_.js} +53 -45
  19. package/dist/{View-Dad8DfSD.js → View-44C9US2-.js} +210 -208
  20. package/dist/{XmlPreview.client-CmGbc3c3.js → XmlPreview.client-xXdnrUCW.js} +2 -2
  21. package/dist/assets/maplibre-gl-worker-Dlv-oLtU.js +10 -0
  22. package/dist/components-next.css +1 -1
  23. package/dist/components-next.js +11889 -10504
  24. package/dist/components.css +2 -2
  25. package/dist/{france-BtSQqcqV.js → france-BYzDEL-I.js} +23 -23
  26. package/dist/{proj-COhZ08DR.js → proj-0ED4AWuV.js} +260 -246
  27. package/dist/purify.es-D-UgLNEK.js +848 -0
  28. package/dist/{src-DJJgtynU.js → src-DdUvT8zT.js} +1972 -1306
  29. package/dist/{transform-CNeEnSK9.js → transform-bRfffInI.js} +3 -3
  30. package/package.json +18 -18
  31. package/src/components/AccessTypeBadge.vue +46 -0
  32. package/src/components/Badge.vue +74 -0
  33. package/src/components/ChartBadge.vue +17 -0
  34. package/src/components/ChartCard.vue +4 -17
  35. package/src/components/DataserviceBadge.vue +17 -0
  36. package/src/components/DataserviceCard.vue +12 -31
  37. package/src/components/DatasetBadge.vue +17 -0
  38. package/src/components/DatasetCard.vue +11 -15
  39. package/src/components/DatasetInformation/DatasetInformationSection.vue +3 -7
  40. package/src/components/DatasetInformation/DatasetSchemaSection.vue +1 -4
  41. package/src/components/DatasetLabelTag.vue +4 -15
  42. package/src/components/Form/SelectGroup.vue +0 -2
  43. package/src/components/LicenseBadge.vue +7 -12
  44. package/src/components/ObjectStatusBadge.vue +47 -0
  45. package/src/components/OrganizationBadge.vue +24 -0
  46. package/src/components/OrganizationTypeBadge.vue +5 -4
  47. package/src/components/ResourceAccordion/SchemaBadge.vue +6 -2
  48. package/src/components/ReuseBadge.vue +17 -0
  49. package/src/components/ReuseCard.vue +5 -20
  50. package/src/components/SchemaCard.vue +1 -5
  51. package/src/components/StatBox.vue +5 -3
  52. package/src/components/Tag.vue +61 -15
  53. package/src/functions/objectStatus.ts +34 -0
  54. package/src/main.ts +25 -3
  55. package/src/types/ui.ts +2 -0
  56. package/dist/Tile-Bu5lF4M5.js +0 -463
  57. package/dist/assets/maplibre-gl-worker-CEzvAyZY.js +0 -10
  58. package/dist/purify.es-eElsWhh7.js +0 -876
  59. package/src/components/ObjectCardBadge.vue +0 -33
@@ -0,0 +1,848 @@
1
+ // ../node_modules/dompurify/dist/purify.es.mjs
2
+ function e(e, t) {
3
+ this.v = e, this.k = t;
4
+ }
5
+ function t(e, t) {
6
+ (t == null || t > e.length) && (t = e.length);
7
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
8
+ return r;
9
+ }
10
+ function n(e) {
11
+ if (Array.isArray(e)) return e;
12
+ }
13
+ function r(e, t) {
14
+ var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
15
+ if (n != null) {
16
+ var r, i, a, o, s = [], c = !0, l = !1;
17
+ try {
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);
22
+ } catch (e) {
23
+ l = !0, i = e;
24
+ } finally {
25
+ try {
26
+ if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
27
+ } finally {
28
+ if (l) throw i;
29
+ }
30
+ }
31
+ return s;
32
+ }
33
+ }
34
+ function i() {
35
+ throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
36
+ }
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
+ }
46
+ }
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;
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);
84
+ }
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.keys, u = Object.setPrototypeOf, d = Object.isFrozen, f = Object.getPrototypeOf, p = Object.getOwnPropertyDescriptor, m = Object.freeze, h = Object.seal, g = Object.create, ee = typeof Reflect < "u" && Reflect, te = ee.apply, ne = ee.construct;
95
+ m ||= function(e) {
96
+ return e;
97
+ }, h ||= function(e) {
98
+ return e;
99
+ }, te ||= function(e, t) {
100
+ var n = [...arguments].slice(2);
101
+ return e.apply(t, n);
102
+ }, ne ||= function(e) {
103
+ return new e(...[...arguments].slice(1));
104
+ };
105
+ var _ = D(Array.prototype.forEach), re = D(Array.prototype.lastIndexOf), ie = D(Array.prototype.pop), ae = D(Array.prototype.push), oe = D(Array.prototype.slice), se = D(Array.prototype.splice), v = Array.isArray, ce = O(Set), le = D(Set.prototype.add), ue = D(Set.prototype.has), y = D(String.prototype.toLowerCase), de = D(String.prototype.toString), fe = D(String.prototype.match), pe = D(String.prototype.replace), me = D(String.prototype.indexOf), he = D(String.prototype.trim), b = D(Number.prototype.toString), x = D(Boolean.prototype.toString), ge = typeof BigInt > "u" ? null : D(BigInt.prototype.toString), _e = typeof Symbol > "u" ? null : D(Symbol.prototype.toString), S = D(Object.prototype.hasOwnProperty), C = D(Object.prototype.toString), w = RegExp.prototype.test, T = function(e, t) {
106
+ return e instanceof RegExp && (e.lastIndex = 0), te(w, e, [t]);
107
+ }, E = O(TypeError);
108
+ function D(e) {
109
+ return function(t) {
110
+ var n = [...arguments].slice(1);
111
+ return te(e, t, n);
112
+ };
113
+ }
114
+ function O(e) {
115
+ return function() {
116
+ return ne(e, [...arguments]);
117
+ };
118
+ }
119
+ function k(e, t) {
120
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : y;
121
+ if (u && u(e, null), !v(t)) return e;
122
+ let r = t.length;
123
+ for (; r--;) {
124
+ let i = t[r];
125
+ if (typeof i == "string") {
126
+ let e = n(i);
127
+ e !== i && (d(t) || (t[r] = e), i = e);
128
+ }
129
+ e[i] = !0;
130
+ }
131
+ return e;
132
+ }
133
+ function A(e) {
134
+ for (let t = 0; t < e.length; t++) S(e, t) || (e[t] = null);
135
+ return e;
136
+ }
137
+ function ve(e) {
138
+ let t = g(null);
139
+ for (let r of c(e)) {
140
+ var n = a(r, 2);
141
+ let i = n[0], o = n[1];
142
+ S(e, i) && (t[i] = v(o) ? A(o) : o && typeof o == "object" && o.constructor === Object ? ve(o) : o);
143
+ }
144
+ return t;
145
+ }
146
+ function ye(e) {
147
+ let t = g(null), n = l(e), r = n.length;
148
+ for (; r--;) t[n[r]] = e[n[r]];
149
+ return t;
150
+ }
151
+ function be(e) {
152
+ switch (typeof e) {
153
+ case "string": return e;
154
+ case "number": return b(e);
155
+ case "boolean": return x(e);
156
+ case "bigint": return ge ? ge(e) : "0";
157
+ case "symbol": return _e ? _e(e) : "Symbol()";
158
+ case "undefined": return C(e);
159
+ case "function":
160
+ case "object": {
161
+ if (e === null) return C(e);
162
+ let t = e, n = j(t, "toString");
163
+ if (typeof n == "function") {
164
+ let e = n(t);
165
+ return typeof e == "string" ? e : C(e);
166
+ }
167
+ return C(e);
168
+ }
169
+ default: return C(e);
170
+ }
171
+ }
172
+ function j(e, t) {
173
+ for (; e !== null;) {
174
+ let n = p(e, t);
175
+ if (n) {
176
+ if (n.get) return D(n.get);
177
+ if (typeof n.value == "function") return D(n.value);
178
+ }
179
+ e = f(e);
180
+ }
181
+ function n() {
182
+ return null;
183
+ }
184
+ return n;
185
+ }
186
+ function xe(e, t) {
187
+ for (; e !== null;) {
188
+ let n = p(e, t);
189
+ if (n) return n.get ? D(n.get) : null;
190
+ e = f(e);
191
+ }
192
+ return null;
193
+ }
194
+ function Se(e) {
195
+ if (!e) return !1;
196
+ try {
197
+ return T(e, ""), !0;
198
+ } catch {
199
+ return !1;
200
+ }
201
+ }
202
+ var Ce = m(/* @__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(".")), we = m(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.filter.font.g.glyph.glyphref.hkern.image.line.lineargradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Te = m([
203
+ "feBlend",
204
+ "feColorMatrix",
205
+ "feComponentTransfer",
206
+ "feComposite",
207
+ "feConvolveMatrix",
208
+ "feDiffuseLighting",
209
+ "feDisplacementMap",
210
+ "feDistantLight",
211
+ "feDropShadow",
212
+ "feFlood",
213
+ "feFuncA",
214
+ "feFuncB",
215
+ "feFuncG",
216
+ "feFuncR",
217
+ "feGaussianBlur",
218
+ "feImage",
219
+ "feMerge",
220
+ "feMergeNode",
221
+ "feMorphology",
222
+ "feOffset",
223
+ "fePointLight",
224
+ "feSpecularLighting",
225
+ "feSpotLight",
226
+ "feTile",
227
+ "feTurbulence"
228
+ ]), Ee = m([
229
+ "animate",
230
+ "color-profile",
231
+ "cursor",
232
+ "discard",
233
+ "font-face",
234
+ "font-face-format",
235
+ "font-face-name",
236
+ "font-face-src",
237
+ "font-face-uri",
238
+ "foreignobject",
239
+ "hatch",
240
+ "hatchpath",
241
+ "mesh",
242
+ "meshgradient",
243
+ "meshpatch",
244
+ "meshrow",
245
+ "missing-glyph",
246
+ "script",
247
+ "set",
248
+ "solidcolor",
249
+ "unknown",
250
+ "use"
251
+ ]), De = m(/* @__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(".")), Oe = m([
252
+ "maction",
253
+ "maligngroup",
254
+ "malignmark",
255
+ "mlongdiv",
256
+ "mscarries",
257
+ "mscarry",
258
+ "msgroup",
259
+ "mstack",
260
+ "msline",
261
+ "msrow",
262
+ "semantics",
263
+ "annotation",
264
+ "annotation-xml",
265
+ "mprescripts",
266
+ "none"
267
+ ]), ke = m(["#text"]), Ae = m(/* @__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(".")), je = m(/* @__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(".")), Me = m(/* @__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(".")), Ne = m([
268
+ "xlink:href",
269
+ "xml:id",
270
+ "xlink:title",
271
+ "xml:space",
272
+ "xmlns:xlink"
273
+ ]), Pe = h(/{{[\w\W]*|^[\w\W]*}}/g), Fe = h(/<%[\w\W]*|^[\w\W]*%>/g), Ie = h(/\${[\w\W]*/g), Le = h(/{{|}}|\${|<%|%>|&lt;%|%&gt;/), Re = h(/^data-[\-\w.\u00B7-\uFFFF]+$/), ze = h(/^aria-[\-\w]+$/), Be = h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ve = h(/^(?:\w+script|data):/i), He = h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ue = h(/^html$/i), We = h(/^[a-z][.\w]*(-[.\w]+)+$/i), Ge = h(/<[/\w!]/g), Ke = h(/<[/\w]/g), qe = h(/<\/no(script|embed|frames)/i), Je = h(/\/>/i), Ye = h(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i), Xe = h(/^[\r\n\t ]+/), M = {
274
+ element: 1,
275
+ text: 3,
276
+ processingInstruction: 7,
277
+ comment: 8,
278
+ document: 9,
279
+ documentFragment: 11
280
+ }, Ze = m(k({}, [
281
+ "style",
282
+ "script",
283
+ "xmp",
284
+ "iframe",
285
+ "noembed",
286
+ "noframes",
287
+ "plaintext",
288
+ "noscript"
289
+ ])), Qe = function() {
290
+ return typeof window > "u" ? null : window;
291
+ }, $e = function(e, t) {
292
+ if (typeof e != "object" || typeof e.createPolicy != "function") return null;
293
+ let n = null, r = "data-tt-policy-suffix";
294
+ t && t.hasAttribute(r) && (n = t.getAttribute(r));
295
+ let i = "dompurify" + (n ? "#" + n : "");
296
+ try {
297
+ return e.createPolicy(i, {
298
+ createHTML(e) {
299
+ return e;
300
+ },
301
+ createScriptURL(e) {
302
+ return e;
303
+ }
304
+ });
305
+ } catch {
306
+ return console.warn("TrustedTypes policy " + i + " could not be created."), null;
307
+ }
308
+ }, et = function() {
309
+ return {
310
+ afterSanitizeAttributes: [],
311
+ afterSanitizeElements: [],
312
+ afterSanitizeShadowDOM: [],
313
+ beforeSanitizeAttributes: [],
314
+ beforeSanitizeElements: [],
315
+ beforeSanitizeShadowDOM: [],
316
+ uponSanitizeAttribute: [],
317
+ uponSanitizeElement: [],
318
+ uponSanitizeShadowNode: []
319
+ };
320
+ }, N = function(e, t, n, r) {
321
+ return S(e, t) && v(e[t]) ? k(r.base ? ye(r.base) : {}, e[t], r.transform) : n;
322
+ }, tt = function(e, t, n) {
323
+ let r = S(e, t) ? e[t] : void 0;
324
+ return r && typeof r == "object" ? ve(r) : n;
325
+ };
326
+ function nt() {
327
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Qe(), t = (e) => nt(e);
328
+ if (t.version = "3.4.18", t.removed = [], !e || !e.document || e.document.nodeType !== M.document || !e.Element) return t.isSupported = !1, t;
329
+ let n = e.document, r = n, i = r.currentScript, a = e.HTMLTemplateElement, o = e.Node, s = e.Element, l = e.NodeFilter, u = e.DOMParser, d = e.trustedTypes, f = s.prototype, p = j(f, "cloneNode"), ee = j(f, "remove"), te = j(f, "removeAttributeNode"), ne = j(f, "nextSibling"), b = j(f, "childNodes"), x = j(f, "parentNode"), ge = j(f, "shadowRoot"), _e = j(f, "attributes"), C = o && o.prototype ? j(o.prototype, "nodeType") : null, w = o && o.prototype ? j(o.prototype, "nodeName") : null, D = o && o.prototype ? j(o.prototype, "ownerDocument") : null, O = function(e) {
330
+ return C ? C(e) : e.nodeType;
331
+ }, A = function(e) {
332
+ return w ? w(e) : e.nodeName;
333
+ }, rt = xe(f, "namespaceURI"), it = function(e) {
334
+ return rt ? rt(e) : e.namespaceURI;
335
+ };
336
+ if (typeof a == "function") {
337
+ let e = n.createElement("template");
338
+ e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
339
+ }
340
+ let P, F = "", at, ot = !1, st = 0, ct = function() {
341
+ if (st > 0) throw E("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
342
+ }, lt = function(e) {
343
+ ct(), st++;
344
+ try {
345
+ return P.createHTML(e);
346
+ } finally {
347
+ st--;
348
+ }
349
+ }, ut = function(e) {
350
+ return P && Vt ? lt(e) : e;
351
+ }, dt = function(e) {
352
+ ct(), st++;
353
+ try {
354
+ return P.createScriptURL(e);
355
+ } finally {
356
+ st--;
357
+ }
358
+ }, ft = function() {
359
+ return ot ||= (at = $e(d, i), !0), at;
360
+ }, pt = n, mt = pt.implementation, ht = pt.createNodeIterator, gt = pt.createDocumentFragment, _t = pt.getElementsByTagName, vt = r.importNode, I = et();
361
+ t.isSupported = typeof c == "function" && typeof x == "function" && mt && mt.createHTMLDocument !== void 0;
362
+ let yt = Pe, bt = Fe, xt = Ie, St = Re, Ct = ze, wt = Ve, Tt = He, Et = We, Dt = Be, L = null, Ot = k({}, [
363
+ ...Ce,
364
+ ...we,
365
+ ...Te,
366
+ ...De,
367
+ ...ke
368
+ ]), R = null, kt = k({}, [
369
+ ...Ae,
370
+ ...je,
371
+ ...Me,
372
+ ...Ne
373
+ ]), z = null, At = null, jt = null, B = Object.seal(g(null, {
374
+ tagCheck: {
375
+ writable: !0,
376
+ configurable: !1,
377
+ enumerable: !0,
378
+ value: null
379
+ },
380
+ attributeCheck: {
381
+ writable: !0,
382
+ configurable: !1,
383
+ enumerable: !0,
384
+ value: null
385
+ }
386
+ })), Mt = !0, Nt = !0, Pt = !1, Ft = !0, V = !1, H = !0, U = !1, It = !1, Lt = null, Rt = null, zt = !1, W = !1, Bt = !1, Vt = !1, Ht = !0, Ut = !1, Wt = "user-content-", Gt = !0, Kt = !1, G = null, K = !1, q = null, qt = k({}, /* @__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(".")), Jt = null, Yt = k({}, [
387
+ "audio",
388
+ "video",
389
+ "img",
390
+ "source",
391
+ "image",
392
+ "track"
393
+ ]), Xt = null, Zt = k({}, [
394
+ "alt",
395
+ "class",
396
+ "for",
397
+ "id",
398
+ "label",
399
+ "name",
400
+ "pattern",
401
+ "placeholder",
402
+ "role",
403
+ "summary",
404
+ "title",
405
+ "value",
406
+ "style",
407
+ "xmlns"
408
+ ]), Qt = "http://www.w3.org/1998/Math/MathML", $t = "http://www.w3.org/2000/svg", J = "http://www.w3.org/1999/xhtml", Y = J, en = !1, tn = null, nn = k({}, [
409
+ Qt,
410
+ $t,
411
+ J
412
+ ], de), rn = m(k({}, [
413
+ "mi",
414
+ "mo",
415
+ "mn",
416
+ "ms",
417
+ "mtext"
418
+ ])), an = null, on = m(k({}, ["annotation-xml"])), sn = null, cn = m(g(null)), ln = k({}, [
419
+ "title",
420
+ "style",
421
+ "font",
422
+ "a",
423
+ "script"
424
+ ]), un = null, dn = ["application/xhtml+xml", "text/html"], X = null, fn = null, pn = n.createElement("form"), mn = function(e) {
425
+ return e instanceof RegExp || e instanceof Function;
426
+ }, hn = function() {
427
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
428
+ e && typeof e == "object" || (e = {}), e = ve(e), un = dn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, X = un === "application/xhtml+xml" ? de : y, L = N(e, "ALLOWED_TAGS", Ot, { transform: X }), R = N(e, "ALLOWED_ATTR", kt, { transform: X }), tn = N(e, "ALLOWED_NAMESPACES", nn, { transform: de }), Xt = N(e, "ADD_URI_SAFE_ATTR", Zt, {
429
+ transform: X,
430
+ base: Zt
431
+ }), Jt = N(e, "ADD_DATA_URI_TAGS", Yt, {
432
+ transform: X,
433
+ base: Yt
434
+ }), q = N(e, "FORBID_CONTENTS", qt, { transform: X }), At = N(e, "FORBID_TAGS", g(null), { transform: X }), jt = N(e, "FORBID_ATTR", g(null), { transform: X }), K = S(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? ve(e.USE_PROFILES) : e.USE_PROFILES : !1, Mt = e.ALLOW_ARIA_ATTR !== !1, Nt = e.ALLOW_DATA_ATTR !== !1, Pt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ft = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, V = e.SAFE_FOR_TEMPLATES || !1, H = e.SAFE_FOR_XML !== !1, U = e.WHOLE_DOCUMENT || !1, W = e.RETURN_DOM || !1, Bt = e.RETURN_DOM_FRAGMENT || !1, Vt = e.RETURN_TRUSTED_TYPE || !1, zt = e.FORCE_BODY || !1, Ht = e.SANITIZE_DOM !== !1, Ut = e.SANITIZE_NAMED_PROPS || !1, Gt = e.KEEP_CONTENT !== !1, Kt = e.IN_PLACE || !1, Dt = Se(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Be, Y = typeof e.NAMESPACE == "string" ? e.NAMESPACE : J, an = tt(e, "MATHML_TEXT_INTEGRATION_POINTS", rn), sn = tt(e, "HTML_INTEGRATION_POINTS", on);
435
+ let t = tt(e, "CUSTOM_ELEMENT_HANDLING", cn);
436
+ if (z = g(null), S(t, "tagNameCheck") && mn(t.tagNameCheck) && (z.tagNameCheck = t.tagNameCheck), S(t, "attributeNameCheck") && mn(t.attributeNameCheck) && (z.attributeNameCheck = t.attributeNameCheck), S(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), h(z), V && (Nt = !1), Bt && (W = !0), K && ((S(e, "ALLOWED_TAGS") || S(e, "ALLOWED_ATTR")) && typeof console < "u" && typeof console.warn == "function" && console.warn("DOMPurify: USE_PROFILES overrides ALLOWED_TAGS and ALLOWED_ATTR. Do not use these options together."), L = k({}, ke), R = g(null), K.html === !0 && (k(L, Ce), k(R, Ae)), K.svg === !0 && (k(L, we), k(R, je), k(R, Ne)), K.svgFilters === !0 && (k(L, Te), k(R, je), k(R, Ne)), K.mathMl === !0 && (k(L, De), k(R, Me), k(R, Ne))), B.tagCheck = null, B.attributeCheck = null, S(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? B.tagCheck = e.ADD_TAGS : v(e.ADD_TAGS) && (L === Ot && (L = ye(L)), k(L, e.ADD_TAGS, X))), S(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? B.attributeCheck = e.ADD_ATTR : v(e.ADD_ATTR) && (R === kt && (R = ye(R)), k(R, e.ADD_ATTR, X))), S(e, "ADD_FORBID_CONTENTS") && v(e.ADD_FORBID_CONTENTS) && (q === qt && (q = ye(q)), k(q, e.ADD_FORBID_CONTENTS, X)), Gt && (L["#text"] = !0), U && k(L, [
437
+ "html",
438
+ "head",
439
+ "body"
440
+ ]), L.table && (L.tbody = !0, delete At.tbody), e.TRUSTED_TYPES_POLICY) {
441
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw E("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
442
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw E("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
443
+ let t = P;
444
+ P = e.TRUSTED_TYPES_POLICY;
445
+ try {
446
+ F = lt("");
447
+ } catch (e) {
448
+ throw P = t, e;
449
+ }
450
+ } else e.TRUSTED_TYPES_POLICY === null ? (P = void 0, F = "") : (P === void 0 && (P = ft()), P && typeof F == "string" && (F = lt("")));
451
+ fn = m(e);
452
+ }, gn = k({}, [
453
+ ...we,
454
+ ...Te,
455
+ ...Ee
456
+ ]), _n = k({}, [...De, ...Oe]), vn = function(e, t, n) {
457
+ return t === J ? e === "svg" : t === Qt ? e === "svg" && (n === "annotation-xml" || an[n]) : !!gn[e];
458
+ }, yn = function(e, t, n) {
459
+ return t === J ? e === "math" : t === $t ? e === "math" && sn[n] : !!_n[e];
460
+ }, bn = function(e, t, n) {
461
+ return t === $t && !sn[n] || t === Qt && !an[n] ? !1 : !_n[e] && (ln[e] || !gn[e]);
462
+ }, xn = function(e) {
463
+ let t = it(e), n = y(A(e)), r = x(e), i = Y, a = "template";
464
+ return r && O(r) === M.element && (i = it(r), a = y(A(r))), tn[t] ? t === $t ? vn(n, i, a) : t === Qt ? yn(n, i, a) : t === J ? bn(n, i, a) : un === "application/xhtml+xml" : !1;
465
+ }, Z = function(e) {
466
+ ae(t.removed, { element: e });
467
+ try {
468
+ x(e).removeChild(e);
469
+ } catch {
470
+ if (ee(e), !x(e)) throw E("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
471
+ }
472
+ }, Sn = function(e, t, n) {
473
+ try {
474
+ te(e, t);
475
+ } catch {
476
+ try {
477
+ e.removeAttribute(n);
478
+ } catch {}
479
+ }
480
+ }, Cn = function(e) {
481
+ En(e);
482
+ let t = b(e);
483
+ t && _(oe(t), (e) => {
484
+ try {
485
+ ee(e);
486
+ } catch {}
487
+ }), O(e) === M.element && wn(e, !1);
488
+ }, Q = function(e, n, r) {
489
+ if (!r) try {
490
+ r = n.getAttributeNode(e);
491
+ } catch {
492
+ r = null;
493
+ }
494
+ if (ae(t.removed, {
495
+ attribute: r || null,
496
+ from: n
497
+ }), r) Sn(n, r, e);
498
+ else try {
499
+ n.removeAttribute(e);
500
+ } catch {}
501
+ if (e === "is") {
502
+ if (W || Bt) try {
503
+ Z(n);
504
+ } catch {}
505
+ else try {
506
+ n.setAttribute(e, "");
507
+ } catch {}
508
+ }
509
+ }, wn = function(e, t) {
510
+ let n = _e(e);
511
+ if (n) for (let r = n.length - 1; r >= 0; --r) {
512
+ let i = n[r], a = i && i.name;
513
+ typeof a == "string" && !(t && R[X(a)]) && Sn(e, i, a);
514
+ }
515
+ }, Tn = function(e, t) {
516
+ let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = [e];
517
+ for (; r.length > 0;) {
518
+ let e = r.pop();
519
+ if (t(e) === !1) continue;
520
+ if (n && O(e) === M.element) {
521
+ let t = ge(e);
522
+ Hn(t) && r.push(t);
523
+ }
524
+ let i = b(e);
525
+ if (i) for (let e = i.length - 1; e >= 0; --e) r.push(i[e]);
526
+ }
527
+ }, En = function(e) {
528
+ Tn(e, (e) => {
529
+ O(e) === M.element && wn(e, !0);
530
+ });
531
+ }, Dn = function(e) {
532
+ let t = [];
533
+ return Tn(e, (e) => {
534
+ t.push(e);
535
+ }, !0), t;
536
+ }, On = function(e, t) {
537
+ let n = ce();
538
+ _(Dn(e), (e) => {
539
+ O(e) === M.element && le(n, e);
540
+ }), _(t, (e) => {
541
+ O(e) === M.element && !ue(n, e) && wn(e, !0);
542
+ });
543
+ }, kn = function(e, n) {
544
+ let r = !1;
545
+ return _(t.removed, (t) => {
546
+ t.element && (r ||= t.element === e, En(t.element));
547
+ }), On(e, n), r;
548
+ }, An = function(e, t) {
549
+ let n = G, r = null, i = () => (r || (r = ce(), _(t, (e) => {
550
+ le(r, e);
551
+ })), r);
552
+ for (let t = 0;; t++) {
553
+ let r = Dn(e), a = [e], o = !1;
554
+ if (_(r, (e) => {
555
+ O(e) === M.documentFragment ? ae(a, e) : !o && !ue(n, e) && (o = ue(i(), e));
556
+ }), !o) return;
557
+ if (t >= 8) throw E("the tree kept changing during in-place sanitization; refusing to return it");
558
+ _(a, (t, n) => {
559
+ jn(t, n > 0, e, i());
560
+ });
561
+ }
562
+ }, jn = function(e, t, n, r) {
563
+ let i = In(e), a;
564
+ for (; a = i.nextNode();) ue(r, a) && !ue(G, a) && (t && $(I.uponSanitizeShadowNode, a, null), rr(a, n));
565
+ }, Mn = function(e) {
566
+ G && le(G, e);
567
+ }, Nn = function(e, t) {
568
+ return H ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
569
+ }, Pn = function(e) {
570
+ H && Tn(e, (e) => {
571
+ let t = O(e);
572
+ if (t === M.processingInstruction || t === M.comment && T(Ke, e.data)) {
573
+ try {
574
+ ee(e);
575
+ } catch {}
576
+ return !1;
577
+ }
578
+ if (t === M.element) {
579
+ let t = e, n = X(A(e));
580
+ try {
581
+ t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && Nn("for", n) && t.removeAttribute("for");
582
+ } catch {}
583
+ }
584
+ return !0;
585
+ });
586
+ }, Fn = function(e) {
587
+ let t = null, r = null;
588
+ if (zt) e = "<remove></remove>" + e;
589
+ else {
590
+ let t = fe(e, Xe);
591
+ r = t && t[0];
592
+ }
593
+ un === "application/xhtml+xml" && Y === J && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
594
+ let i = P ? lt(e) : e;
595
+ if (Y === J) try {
596
+ t = new u().parseFromString(i, un);
597
+ } catch {}
598
+ if (!t || !t.documentElement) {
599
+ t = mt.createDocument(Y, "template", null);
600
+ try {
601
+ t.documentElement.innerHTML = en ? F : i;
602
+ } catch {}
603
+ }
604
+ let a = t.body || t.documentElement;
605
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Y === J ? _t.call(t, U ? "html" : "body")[0] : U ? t.documentElement : a;
606
+ }, In = function(e) {
607
+ let t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n = D ? D(e) : e.ownerDocument;
608
+ return ht.call(n || e, e, (t ? 0 : l.SHOW_ELEMENT) | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
609
+ }, Ln = function(e) {
610
+ return e = pe(e, yt, " "), e = pe(e, bt, " "), e = pe(e, xt, " "), e;
611
+ }, Rn = function(e) {
612
+ zn(e);
613
+ let t = e.querySelectorAll?.call(e, "template");
614
+ t && _(t, (e) => {
615
+ Hn(e.content) && Rn(e.content);
616
+ });
617
+ }, zn = function(e) {
618
+ e.normalize();
619
+ let t = In(e, !0), n = t.nextNode();
620
+ for (; n;) n.data = Ln(n.data), n = t.nextNode();
621
+ }, Bn = function(e) {
622
+ let t = w ? w(e) : null;
623
+ return typeof t != "string" || X(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== _e(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 !== C(e) || e.childNodes !== b(e);
624
+ }, Vn = function(e) {
625
+ if (!C || typeof e != "object" || !e) return null;
626
+ try {
627
+ let t = C(e);
628
+ return typeof t == "number" ? t : null;
629
+ } catch {
630
+ return null;
631
+ }
632
+ }, Hn = function(e) {
633
+ return Vn(e) === M.documentFragment;
634
+ }, Un = function(e) {
635
+ return Vn(e) !== null;
636
+ };
637
+ function $(e, n, r) {
638
+ e.length !== 0 && _(e, (e) => {
639
+ e.call(t, n, r, fn);
640
+ });
641
+ }
642
+ let Wn = function(e, t, n) {
643
+ return !!(H && n === M.element && e.hasChildNodes() && !Un(e.firstElementChild) && T(Ge, e.textContent) && T(Ge, e.innerHTML) || H && Ze[t] && n === M.element && it(e) === J && (Un(e.firstElementChild) || typeof e.textContent == "string" && T(Ge, e.textContent)) || n === M.processingInstruction || H && n === M.comment && T(Ke, e.data));
644
+ }, Gn = function(e, t) {
645
+ return e instanceof RegExp ? T(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
646
+ }, Kn = function(e, t, n) {
647
+ if (!At[t] && Qn(t) && Gn(z.tagNameCheck, t)) return !1;
648
+ if (Gt && !q[t] && !q[y(t)]) {
649
+ let t = x(e), r = b(e);
650
+ if (r && t) {
651
+ let i = r.length;
652
+ for (let a = i - 1; a >= 0; --a) {
653
+ let i = e === n ? p(r[a], !0) : r[a];
654
+ t.insertBefore(i, ne(e));
655
+ }
656
+ }
657
+ }
658
+ return Z(e), !0;
659
+ }, qn = function(e, t, n, r) {
660
+ return e.length === 0 ? t : t === n || t === r ? ye(t) : t;
661
+ }, Jn = function(e, t) {
662
+ return e === t || x(e) !== null ? !1 : (Kt && En(e), !0);
663
+ }, Yn = function(e, n) {
664
+ if (Mn(e), $(I.beforeSanitizeElements, e, null), Jn(e, n)) return !0;
665
+ if (Bn(e)) return Z(e), !0;
666
+ let r = X(A(e)), i = O(e);
667
+ if (L = qn(I.uponSanitizeElement, L, Ot, Lt), $(I.uponSanitizeElement, e, {
668
+ tagName: r,
669
+ allowedTags: L
670
+ }), Jn(e, n)) return !0;
671
+ if (Wn(e, r, i)) return Z(e), !0;
672
+ if (At[r] || !(B.tagCheck instanceof Function && B.tagCheck(r)) && !L[r]) {
673
+ let t = Kn(e, r, n);
674
+ return t === !1 && ($(I.afterSanitizeElements, e, null), Jn(e, n)) ? !0 : t;
675
+ }
676
+ if (i === M.element && !xn(e) || (r === "noscript" || r === "noembed" || r === "noframes") && T(qe, e.innerHTML)) return Z(e), !0;
677
+ if (V && i === M.text) {
678
+ let n = e.textContent, r = Ln(n);
679
+ n !== r && (ae(t.removed, { element: e.cloneNode() }), e.textContent = r);
680
+ }
681
+ return $(I.afterSanitizeElements, e, null), Jn(e, n);
682
+ }, Xn = function(e, t, r) {
683
+ if (jt[t] || Nn(t, e) || Ht && (t === "id" || t === "name") && (r in n || r in pn)) return !1;
684
+ let i = R[t] || B.attributeCheck instanceof Function && B.attributeCheck(t, e);
685
+ if (Nt && T(St, t) || Mt && T(Ct, t)) return !0;
686
+ if (!i) return Qn(e) && Gn(z.tagNameCheck, e) && Gn(z.attributeNameCheck, t, e) || t === "is" && z.allowCustomizedBuiltInElements && Gn(z.tagNameCheck, r);
687
+ if (Xt[t]) return !0;
688
+ let a = pe(r, Tt, "");
689
+ return T(Dt, a) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && me(r, "data:") === 0 && Jt[e] || Pt && !T(wt, a) ? !0 : !r;
690
+ }, Zn = k({}, [
691
+ "annotation-xml",
692
+ "color-profile",
693
+ "font-face",
694
+ "font-face-format",
695
+ "font-face-name",
696
+ "font-face-src",
697
+ "font-face-uri",
698
+ "missing-glyph"
699
+ ]), Qn = function(e) {
700
+ return !Zn[y(e)] && T(Et, e);
701
+ }, $n = function(e, t, n, r) {
702
+ if (P && typeof d == "object" && typeof d.getAttributeType == "function" && !n) switch (d.getAttributeType(e, t)) {
703
+ case "TrustedHTML": return lt(r);
704
+ case "TrustedScriptURL": return dt(r);
705
+ }
706
+ return r;
707
+ }, er = function(e, t, n, r) {
708
+ try {
709
+ return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !Bn(e) || (Z(e), !1);
710
+ } catch {
711
+ return Q(t, e), !1;
712
+ }
713
+ }, tr = function(e, t) {
714
+ return H && T(Ye, t) ? !0 : y(e) === "attributename" && me(t, "href") !== -1;
715
+ }, nr = function(e, n) {
716
+ if ($(I.beforeSanitizeAttributes, e, null), Jn(e, n)) return;
717
+ let r = e.attributes;
718
+ if (!r || Bn(e)) return;
719
+ R = qn(I.uponSanitizeAttribute, R, kt, Rt);
720
+ let i = {
721
+ attrName: "",
722
+ attrValue: "",
723
+ keepAttr: !0,
724
+ allowedAttributes: R,
725
+ forceKeepAttr: void 0
726
+ }, a = r.length, o = X(A(e));
727
+ for (; a--;) {
728
+ let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = X(s), d = l, f = s === "value" ? d : he(d), p = !1;
729
+ i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, $(I.uponSanitizeAttribute, e, i), f = i.attrValue, Ut && (u === "id" || u === "name") && me(f, Wt) !== 0 && (Q(s, e, n), f = Wt + f, p = !0), tr(s, f) ? Q(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !Ft && T(Je, f) ? Q(s, e, n) : (V && (f = Ln(f)), Xn(o, u, f) ? (f = $n(o, u, c, f), f !== d && er(e, s, c, f) && p && ie(t.removed)) : Q(s, e, n)) : Q(s, e, n));
730
+ }
731
+ $(I.afterSanitizeAttributes, e, null), Jn(e, n);
732
+ }, rr = function(e, t) {
733
+ Yn(e, t), nr(e, t), Hn(e.content) && ir(e.content);
734
+ }, ir = function(e) {
735
+ let t = null, n = In(e);
736
+ for ($(I.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if ($(I.uponSanitizeShadowNode, t, null), rr(t, e), O(t) === M.element) {
737
+ let e = ge(t);
738
+ Hn(e) && (ar(e), ir(e));
739
+ }
740
+ V && zn(e), $(I.afterSanitizeShadowDOM, e, null);
741
+ }, ar = function(e) {
742
+ let t = [{
743
+ node: e,
744
+ shadow: null
745
+ }];
746
+ for (; t.length > 0;) {
747
+ let e = t.pop();
748
+ if (e.shadow) {
749
+ ir(e.shadow);
750
+ continue;
751
+ }
752
+ let n = e.node, r = O(n) === M.element, i = b(n);
753
+ if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
754
+ node: i[e],
755
+ shadow: null
756
+ });
757
+ if (r) {
758
+ let e = w ? w(n) : null;
759
+ if (typeof e == "string" && X(e) === "template") {
760
+ let e = n.content;
761
+ Hn(e) && t.push({
762
+ node: e,
763
+ shadow: null
764
+ });
765
+ }
766
+ }
767
+ if (r) {
768
+ let e = ge(n);
769
+ Hn(e) && t.push({
770
+ node: null,
771
+ shadow: e
772
+ }, {
773
+ node: e,
774
+ shadow: null
775
+ });
776
+ }
777
+ }
778
+ };
779
+ return t.sanitize = function(e) {
780
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
781
+ if (en = !e, en && (e = "<!-->"), typeof e != "string" && !Un(e) && (e = be(e), typeof e != "string")) throw E("dirty is not a string, aborting");
782
+ if (!t.isSupported) return e;
783
+ It ? (L = Lt, R = Rt) : hn(n), t.removed = [];
784
+ let c = Kt && typeof e != "string" && Un(e), l = [], u = G;
785
+ if (c) {
786
+ Pn(e);
787
+ let t = A(e);
788
+ if (typeof t == "string") {
789
+ let n = X(t);
790
+ if (!L[n] || At[n]) throw Cn(e), E("root node is forbidden and cannot be sanitized in-place");
791
+ }
792
+ if (Bn(e)) throw Cn(e), E("root node is clobbered and cannot be sanitized in-place");
793
+ l = Dn(e), G = ce();
794
+ } else if (Un(e)) i = Fn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === M.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), ar(i);
795
+ else {
796
+ if (!W && !V && !U && e.indexOf("<") === -1) return ut(e);
797
+ if (i = Fn(e), !i) return W ? null : Vt ? F : "";
798
+ }
799
+ i && zt && Z(i.firstChild);
800
+ let d = c ? e : i;
801
+ try {
802
+ c && ar(e);
803
+ let t = In(d);
804
+ for (; o = t.nextNode();) rr(o, d);
805
+ c && An(e, l);
806
+ } catch (t) {
807
+ throw c && (Cn(e), kn(e, l)), t;
808
+ } finally {
809
+ G = u;
810
+ }
811
+ if (c) {
812
+ if (kn(e, l)) throw E("a node selected for removal could not be safely returned; refusing to sanitize in place");
813
+ return V && Rn(e), e;
814
+ }
815
+ if (W) {
816
+ if (V && Rn(i), Bt) for (s = gt.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
817
+ else s = i;
818
+ return (R.shadowroot || R.shadowrootmode) && (s = vt.call(r, s, !0)), s;
819
+ }
820
+ let f = () => U ? i.outerHTML : i.innerHTML, p = f();
821
+ return V && T(Le, p) && (zn(i), p = f()), U && L["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && T(Ue, i.ownerDocument.doctype.name) && (p = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + p), ut(p);
822
+ }, t.setConfig = function() {
823
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
824
+ hn(e), It = !0, Lt = L, Rt = R;
825
+ }, t.clearConfig = function() {
826
+ fn = null, It = !1, Lt = null, Rt = null, P = at, F = "";
827
+ }, t.isValidAttribute = function(e, t, n) {
828
+ fn || hn({});
829
+ let r = X(e), i = X(t);
830
+ return typeof n == "string" && (tr(t, n) || !Ft && T(Je, n)) ? !1 : Xn(r, i, n);
831
+ }, t.addHook = function(e, t) {
832
+ typeof t == "function" && S(I, e) && ae(I[e], t);
833
+ }, t.removeHook = function(e, t) {
834
+ if (S(I, e)) {
835
+ if (t !== void 0) {
836
+ let n = re(I[e], t);
837
+ return n === -1 ? void 0 : se(I[e], n, 1)[0];
838
+ }
839
+ return ie(I[e]);
840
+ }
841
+ }, t.removeHooks = function(e) {
842
+ S(I, e) && (I[e] = []);
843
+ }, t.removeAllHooks = function() {
844
+ I = et();
845
+ }, t;
846
+ }
847
+ var rt = nt();
848
+ export { rt as t };