@prefecthq/prefab-ui 0.10.0 → 0.10.1

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.
@@ -1 +1 @@
1
- export * from "./embed-D3uJNX5r.mjs";
1
+ export * from "./embed-DEzwqwWv.mjs";
@@ -0,0 +1,571 @@
1
+ import { j as Yt, c as jt } from "./embed-DEzwqwWv.mjs";
2
+ import { a as Xt } from "./icons-9tLoEEsf.mjs";
3
+ /*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
4
+ const {
5
+ entries: _t,
6
+ setPrototypeOf: ct,
7
+ isFrozen: Vt,
8
+ getPrototypeOf: $t,
9
+ getOwnPropertyDescriptor: qt
10
+ } = Object;
11
+ let {
12
+ freeze: R,
13
+ seal: D,
14
+ create: ve
15
+ } = Object, {
16
+ apply: ke,
17
+ construct: Ue
18
+ } = typeof Reflect < "u" && Reflect;
19
+ R || (R = function(n) {
20
+ return n;
21
+ });
22
+ D || (D = function(n) {
23
+ return n;
24
+ });
25
+ ke || (ke = function(n, l) {
26
+ for (var a = arguments.length, c = new Array(a > 2 ? a - 2 : 0), _ = 2; _ < a; _++)
27
+ c[_ - 2] = arguments[_];
28
+ return n.apply(l, c);
29
+ });
30
+ Ue || (Ue = function(n) {
31
+ for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
32
+ a[c - 1] = arguments[c];
33
+ return new n(...a);
34
+ });
35
+ const ce = O(Array.prototype.forEach), Kt = O(Array.prototype.lastIndexOf), ft = O(Array.prototype.pop), q = O(Array.prototype.push), Zt = O(Array.prototype.splice), ue = O(String.prototype.toLowerCase), Ie = O(String.prototype.toString), Ce = O(String.prototype.match), K = O(String.prototype.replace), Jt = O(String.prototype.indexOf), Qt = O(String.prototype.trim), b = O(Object.prototype.hasOwnProperty), S = O(RegExp.prototype.test), Z = en(TypeError);
36
+ function O(r) {
37
+ return function(n) {
38
+ n instanceof RegExp && (n.lastIndex = 0);
39
+ for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
40
+ a[c - 1] = arguments[c];
41
+ return ke(r, n, a);
42
+ };
43
+ }
44
+ function en(r) {
45
+ return function() {
46
+ for (var n = arguments.length, l = new Array(n), a = 0; a < n; a++)
47
+ l[a] = arguments[a];
48
+ return Ue(r, l);
49
+ };
50
+ }
51
+ function s(r, n) {
52
+ let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ue;
53
+ ct && ct(r, null);
54
+ let a = n.length;
55
+ for (; a--; ) {
56
+ let c = n[a];
57
+ if (typeof c == "string") {
58
+ const _ = l(c);
59
+ _ !== c && (Vt(n) || (n[a] = _), c = _);
60
+ }
61
+ r[c] = !0;
62
+ }
63
+ return r;
64
+ }
65
+ function tn(r) {
66
+ for (let n = 0; n < r.length; n++)
67
+ b(r, n) || (r[n] = null);
68
+ return r;
69
+ }
70
+ function C(r) {
71
+ const n = ve(null);
72
+ for (const [l, a] of _t(r))
73
+ b(r, l) && (Array.isArray(a) ? n[l] = tn(a) : a && typeof a == "object" && a.constructor === Object ? n[l] = C(a) : n[l] = a);
74
+ return n;
75
+ }
76
+ function J(r, n) {
77
+ for (; r !== null; ) {
78
+ const a = qt(r, n);
79
+ if (a) {
80
+ if (a.get)
81
+ return O(a.get);
82
+ if (typeof a.value == "function")
83
+ return O(a.value);
84
+ }
85
+ r = $t(r);
86
+ }
87
+ function l() {
88
+ return null;
89
+ }
90
+ return l;
91
+ }
92
+ const ut = R(["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"]), Me = R(["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"]), we = R(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), nn = R(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), xe = R(["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"]), on = R(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), mt = R(["#text"]), pt = R(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "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", "slot"]), Pe = R(["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", "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", "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-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "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"]), Tt = R(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "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"]), fe = R(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), an = D(/\{\{[\w\W]*|[\w\W]*\}\}/gm), rn = D(/<%[\w\W]*|[\w\W]*%>/gm), sn = D(/\$\{[\w\W]*/gm), ln = D(/^data-[\-\w.\u00B7-\uFFFF]+$/), cn = D(/^aria-[\-\w]+$/), gt = D(
93
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
94
+ // eslint-disable-line no-useless-escape
95
+ ), fn = D(/^(?:\w+script|data):/i), un = D(
96
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
97
+ // eslint-disable-line no-control-regex
98
+ ), ht = D(/^html$/i), mn = D(/^[a-z][.\w]*(-[.\w]+)+$/i);
99
+ var dt = /* @__PURE__ */ Object.freeze({
100
+ __proto__: null,
101
+ ARIA_ATTR: cn,
102
+ ATTR_WHITESPACE: un,
103
+ CUSTOM_ELEMENT: mn,
104
+ DATA_ATTR: ln,
105
+ DOCTYPE_NAME: ht,
106
+ ERB_EXPR: rn,
107
+ IS_ALLOWED_URI: gt,
108
+ IS_SCRIPT_OR_DATA: fn,
109
+ MUSTACHE_EXPR: an,
110
+ TMPLIT_EXPR: sn
111
+ });
112
+ const Q = {
113
+ element: 1,
114
+ text: 3,
115
+ // Deprecated
116
+ progressingInstruction: 7,
117
+ comment: 8,
118
+ document: 9
119
+ }, pn = function() {
120
+ return typeof window > "u" ? null : window;
121
+ }, Tn = function(n, l) {
122
+ if (typeof n != "object" || typeof n.createPolicy != "function")
123
+ return null;
124
+ let a = null;
125
+ const c = "data-tt-policy-suffix";
126
+ l && l.hasAttribute(c) && (a = l.getAttribute(c));
127
+ const _ = "dompurify" + (a ? "#" + a : "");
128
+ try {
129
+ return n.createPolicy(_, {
130
+ createHTML(L) {
131
+ return L;
132
+ },
133
+ createScriptURL(L) {
134
+ return L;
135
+ }
136
+ });
137
+ } catch {
138
+ return console.warn("TrustedTypes policy " + _ + " could not be created."), null;
139
+ }
140
+ }, Et = function() {
141
+ return {
142
+ afterSanitizeAttributes: [],
143
+ afterSanitizeElements: [],
144
+ afterSanitizeShadowDOM: [],
145
+ beforeSanitizeAttributes: [],
146
+ beforeSanitizeElements: [],
147
+ beforeSanitizeShadowDOM: [],
148
+ uponSanitizeAttribute: [],
149
+ uponSanitizeElement: [],
150
+ uponSanitizeShadowNode: []
151
+ };
152
+ };
153
+ function At() {
154
+ let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : pn();
155
+ const n = (i) => At(i);
156
+ if (n.version = "3.3.1", n.removed = [], !r || !r.document || r.document.nodeType !== Q.document || !r.Element)
157
+ return n.isSupported = !1, n;
158
+ let {
159
+ document: l
160
+ } = r;
161
+ const a = l, c = a.currentScript, {
162
+ DocumentFragment: _,
163
+ HTMLTemplateElement: L,
164
+ Node: me,
165
+ Element: Fe,
166
+ NodeFilter: B,
167
+ NamedNodeMap: St = r.NamedNodeMap || r.MozNamedAttrMap,
168
+ HTMLFormElement: Rt,
169
+ DOMParser: Ot,
170
+ trustedTypes: ee
171
+ } = r, Y = Fe.prototype, yt = J(Y, "cloneNode"), Dt = J(Y, "remove"), Lt = J(Y, "nextSibling"), bt = J(Y, "childNodes"), te = J(Y, "parentNode");
172
+ if (typeof L == "function") {
173
+ const i = l.createElement("template");
174
+ i.content && i.content.ownerDocument && (l = i.content.ownerDocument);
175
+ }
176
+ let h, j = "";
177
+ const {
178
+ implementation: pe,
179
+ createNodeIterator: Nt,
180
+ createDocumentFragment: It,
181
+ getElementsByTagName: Ct
182
+ } = l, {
183
+ importNode: Mt
184
+ } = a;
185
+ let A = Et();
186
+ n.isSupported = typeof _t == "function" && typeof te == "function" && pe && pe.createHTMLDocument !== void 0;
187
+ const {
188
+ MUSTACHE_EXPR: Te,
189
+ ERB_EXPR: de,
190
+ TMPLIT_EXPR: Ee,
191
+ DATA_ATTR: wt,
192
+ ARIA_ATTR: xt,
193
+ IS_SCRIPT_OR_DATA: Pt,
194
+ ATTR_WHITESPACE: He,
195
+ CUSTOM_ELEMENT: vt
196
+ } = dt;
197
+ let {
198
+ IS_ALLOWED_URI: ze
199
+ } = dt, T = null;
200
+ const Ge = s({}, [...ut, ...Me, ...we, ...xe, ...mt]);
201
+ let d = null;
202
+ const We = s({}, [...pt, ...Pe, ...Tt, ...fe]);
203
+ let u = Object.seal(ve(null, {
204
+ tagNameCheck: {
205
+ writable: !0,
206
+ configurable: !1,
207
+ enumerable: !0,
208
+ value: null
209
+ },
210
+ attributeNameCheck: {
211
+ writable: !0,
212
+ configurable: !1,
213
+ enumerable: !0,
214
+ value: null
215
+ },
216
+ allowCustomizedBuiltInElements: {
217
+ writable: !0,
218
+ configurable: !1,
219
+ enumerable: !0,
220
+ value: !1
221
+ }
222
+ })), X = null, _e = null;
223
+ const k = Object.seal(ve(null, {
224
+ tagCheck: {
225
+ writable: !0,
226
+ configurable: !1,
227
+ enumerable: !0,
228
+ value: null
229
+ },
230
+ attributeCheck: {
231
+ writable: !0,
232
+ configurable: !1,
233
+ enumerable: !0,
234
+ value: null
235
+ }
236
+ }));
237
+ let Be = !0, ge = !0, Ye = !1, je = !0, U = !1, ne = !0, P = !1, he = !1, Ae = !1, F = !1, oe = !1, ie = !1, Xe = !0, Ve = !1;
238
+ const kt = "user-content-";
239
+ let Se = !0, V = !1, H = {}, N = null;
240
+ const Re = s({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
241
+ let $e = null;
242
+ const qe = s({}, ["audio", "video", "img", "source", "image", "track"]);
243
+ let Oe = null;
244
+ const Ke = s({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ae = "http://www.w3.org/1998/Math/MathML", re = "http://www.w3.org/2000/svg", M = "http://www.w3.org/1999/xhtml";
245
+ let z = M, ye = !1, De = null;
246
+ const Ut = s({}, [ae, re, M], Ie);
247
+ let se = s({}, ["mi", "mo", "mn", "ms", "mtext"]), le = s({}, ["annotation-xml"]);
248
+ const Ft = s({}, ["title", "style", "font", "a", "script"]);
249
+ let $ = null;
250
+ const Ht = ["application/xhtml+xml", "text/html"], zt = "text/html";
251
+ let p = null, G = null;
252
+ const Gt = l.createElement("form"), Ze = function(e) {
253
+ return e instanceof RegExp || e instanceof Function;
254
+ }, Le = function() {
255
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
256
+ if (!(G && G === e)) {
257
+ if ((!e || typeof e != "object") && (e = {}), e = C(e), $ = // eslint-disable-next-line unicorn/prefer-includes
258
+ Ht.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? zt : e.PARSER_MEDIA_TYPE, p = $ === "application/xhtml+xml" ? Ie : ue, T = b(e, "ALLOWED_TAGS") ? s({}, e.ALLOWED_TAGS, p) : Ge, d = b(e, "ALLOWED_ATTR") ? s({}, e.ALLOWED_ATTR, p) : We, De = b(e, "ALLOWED_NAMESPACES") ? s({}, e.ALLOWED_NAMESPACES, Ie) : Ut, Oe = b(e, "ADD_URI_SAFE_ATTR") ? s(C(Ke), e.ADD_URI_SAFE_ATTR, p) : Ke, $e = b(e, "ADD_DATA_URI_TAGS") ? s(C(qe), e.ADD_DATA_URI_TAGS, p) : qe, N = b(e, "FORBID_CONTENTS") ? s({}, e.FORBID_CONTENTS, p) : Re, X = b(e, "FORBID_TAGS") ? s({}, e.FORBID_TAGS, p) : C({}), _e = b(e, "FORBID_ATTR") ? s({}, e.FORBID_ATTR, p) : C({}), H = b(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Be = e.ALLOW_ARIA_ATTR !== !1, ge = e.ALLOW_DATA_ATTR !== !1, Ye = e.ALLOW_UNKNOWN_PROTOCOLS || !1, je = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, U = e.SAFE_FOR_TEMPLATES || !1, ne = e.SAFE_FOR_XML !== !1, P = e.WHOLE_DOCUMENT || !1, F = e.RETURN_DOM || !1, oe = e.RETURN_DOM_FRAGMENT || !1, ie = e.RETURN_TRUSTED_TYPE || !1, Ae = e.FORCE_BODY || !1, Xe = e.SANITIZE_DOM !== !1, Ve = e.SANITIZE_NAMED_PROPS || !1, Se = e.KEEP_CONTENT !== !1, V = e.IN_PLACE || !1, ze = e.ALLOWED_URI_REGEXP || gt, z = e.NAMESPACE || M, se = e.MATHML_TEXT_INTEGRATION_POINTS || se, le = e.HTML_INTEGRATION_POINTS || le, u = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Ze(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (u.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Ze(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (u.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (u.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), U && (ge = !1), oe && (F = !0), H && (T = s({}, mt), d = [], H.html === !0 && (s(T, ut), s(d, pt)), H.svg === !0 && (s(T, Me), s(d, Pe), s(d, fe)), H.svgFilters === !0 && (s(T, we), s(d, Pe), s(d, fe)), H.mathMl === !0 && (s(T, xe), s(d, Tt), s(d, fe))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? k.tagCheck = e.ADD_TAGS : (T === Ge && (T = C(T)), s(T, e.ADD_TAGS, p))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? k.attributeCheck = e.ADD_ATTR : (d === We && (d = C(d)), s(d, e.ADD_ATTR, p))), e.ADD_URI_SAFE_ATTR && s(Oe, e.ADD_URI_SAFE_ATTR, p), e.FORBID_CONTENTS && (N === Re && (N = C(N)), s(N, e.FORBID_CONTENTS, p)), e.ADD_FORBID_CONTENTS && (N === Re && (N = C(N)), s(N, e.ADD_FORBID_CONTENTS, p)), Se && (T["#text"] = !0), P && s(T, ["html", "head", "body"]), T.table && (s(T, ["tbody"]), delete X.tbody), e.TRUSTED_TYPES_POLICY) {
259
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
260
+ throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
261
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
262
+ throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
263
+ h = e.TRUSTED_TYPES_POLICY, j = h.createHTML("");
264
+ } else
265
+ h === void 0 && (h = Tn(ee, c)), h !== null && typeof j == "string" && (j = h.createHTML(""));
266
+ R && R(e), G = e;
267
+ }
268
+ }, Je = s({}, [...Me, ...we, ...nn]), Qe = s({}, [...xe, ...on]), Wt = function(e) {
269
+ let t = te(e);
270
+ (!t || !t.tagName) && (t = {
271
+ namespaceURI: z,
272
+ tagName: "template"
273
+ });
274
+ const o = ue(e.tagName), f = ue(t.tagName);
275
+ return De[e.namespaceURI] ? e.namespaceURI === re ? t.namespaceURI === M ? o === "svg" : t.namespaceURI === ae ? o === "svg" && (f === "annotation-xml" || se[f]) : !!Je[o] : e.namespaceURI === ae ? t.namespaceURI === M ? o === "math" : t.namespaceURI === re ? o === "math" && le[f] : !!Qe[o] : e.namespaceURI === M ? t.namespaceURI === re && !le[f] || t.namespaceURI === ae && !se[f] ? !1 : !Qe[o] && (Ft[o] || !Je[o]) : !!($ === "application/xhtml+xml" && De[e.namespaceURI]) : !1;
276
+ }, I = function(e) {
277
+ q(n.removed, {
278
+ element: e
279
+ });
280
+ try {
281
+ te(e).removeChild(e);
282
+ } catch {
283
+ Dt(e);
284
+ }
285
+ }, v = function(e, t) {
286
+ try {
287
+ q(n.removed, {
288
+ attribute: t.getAttributeNode(e),
289
+ from: t
290
+ });
291
+ } catch {
292
+ q(n.removed, {
293
+ attribute: null,
294
+ from: t
295
+ });
296
+ }
297
+ if (t.removeAttribute(e), e === "is")
298
+ if (F || oe)
299
+ try {
300
+ I(t);
301
+ } catch {
302
+ }
303
+ else
304
+ try {
305
+ t.setAttribute(e, "");
306
+ } catch {
307
+ }
308
+ }, et = function(e) {
309
+ let t = null, o = null;
310
+ if (Ae)
311
+ e = "<remove></remove>" + e;
312
+ else {
313
+ const m = Ce(e, /^[\r\n\t ]+/);
314
+ o = m && m[0];
315
+ }
316
+ $ === "application/xhtml+xml" && z === M && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
317
+ const f = h ? h.createHTML(e) : e;
318
+ if (z === M)
319
+ try {
320
+ t = new Ot().parseFromString(f, $);
321
+ } catch {
322
+ }
323
+ if (!t || !t.documentElement) {
324
+ t = pe.createDocument(z, "template", null);
325
+ try {
326
+ t.documentElement.innerHTML = ye ? j : f;
327
+ } catch {
328
+ }
329
+ }
330
+ const g = t.body || t.documentElement;
331
+ return e && o && g.insertBefore(l.createTextNode(o), g.childNodes[0] || null), z === M ? Ct.call(t, P ? "html" : "body")[0] : P ? t.documentElement : g;
332
+ }, tt = function(e) {
333
+ return Nt.call(
334
+ e.ownerDocument || e,
335
+ e,
336
+ // eslint-disable-next-line no-bitwise
337
+ B.SHOW_ELEMENT | B.SHOW_COMMENT | B.SHOW_TEXT | B.SHOW_PROCESSING_INSTRUCTION | B.SHOW_CDATA_SECTION,
338
+ null
339
+ );
340
+ }, be = function(e) {
341
+ return e instanceof Rt && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof St) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
342
+ }, nt = function(e) {
343
+ return typeof me == "function" && e instanceof me;
344
+ };
345
+ function w(i, e, t) {
346
+ ce(i, (o) => {
347
+ o.call(n, e, t, G);
348
+ });
349
+ }
350
+ const ot = function(e) {
351
+ let t = null;
352
+ if (w(A.beforeSanitizeElements, e, null), be(e))
353
+ return I(e), !0;
354
+ const o = p(e.nodeName);
355
+ if (w(A.uponSanitizeElement, e, {
356
+ tagName: o,
357
+ allowedTags: T
358
+ }), ne && e.hasChildNodes() && !nt(e.firstElementChild) && S(/<[/\w!]/g, e.innerHTML) && S(/<[/\w!]/g, e.textContent) || e.nodeType === Q.progressingInstruction || ne && e.nodeType === Q.comment && S(/<[/\w]/g, e.data))
359
+ return I(e), !0;
360
+ if (!(k.tagCheck instanceof Function && k.tagCheck(o)) && (!T[o] || X[o])) {
361
+ if (!X[o] && at(o) && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, o) || u.tagNameCheck instanceof Function && u.tagNameCheck(o)))
362
+ return !1;
363
+ if (Se && !N[o]) {
364
+ const f = te(e) || e.parentNode, g = bt(e) || e.childNodes;
365
+ if (g && f) {
366
+ const m = g.length;
367
+ for (let y = m - 1; y >= 0; --y) {
368
+ const x = yt(g[y], !0);
369
+ x.__removalCount = (e.__removalCount || 0) + 1, f.insertBefore(x, Lt(e));
370
+ }
371
+ }
372
+ }
373
+ return I(e), !0;
374
+ }
375
+ return e instanceof Fe && !Wt(e) || (o === "noscript" || o === "noembed" || o === "noframes") && S(/<\/no(script|embed|frames)/i, e.innerHTML) ? (I(e), !0) : (U && e.nodeType === Q.text && (t = e.textContent, ce([Te, de, Ee], (f) => {
376
+ t = K(t, f, " ");
377
+ }), e.textContent !== t && (q(n.removed, {
378
+ element: e.cloneNode()
379
+ }), e.textContent = t)), w(A.afterSanitizeElements, e, null), !1);
380
+ }, it = function(e, t, o) {
381
+ if (Xe && (t === "id" || t === "name") && (o in l || o in Gt))
382
+ return !1;
383
+ if (!(ge && !_e[t] && S(wt, t))) {
384
+ if (!(Be && S(xt, t))) {
385
+ if (!(k.attributeCheck instanceof Function && k.attributeCheck(t, e))) {
386
+ if (!d[t] || _e[t]) {
387
+ if (
388
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
389
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
390
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
391
+ !(at(e) && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, e) || u.tagNameCheck instanceof Function && u.tagNameCheck(e)) && (u.attributeNameCheck instanceof RegExp && S(u.attributeNameCheck, t) || u.attributeNameCheck instanceof Function && u.attributeNameCheck(t, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
392
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
393
+ t === "is" && u.allowCustomizedBuiltInElements && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, o) || u.tagNameCheck instanceof Function && u.tagNameCheck(o)))
394
+ ) return !1;
395
+ } else if (!Oe[t]) {
396
+ if (!S(ze, K(o, He, ""))) {
397
+ if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Jt(o, "data:") === 0 && $e[e])) {
398
+ if (!(Ye && !S(Pt, K(o, He, "")))) {
399
+ if (o)
400
+ return !1;
401
+ }
402
+ }
403
+ }
404
+ }
405
+ }
406
+ }
407
+ }
408
+ return !0;
409
+ }, at = function(e) {
410
+ return e !== "annotation-xml" && Ce(e, vt);
411
+ }, rt = function(e) {
412
+ w(A.beforeSanitizeAttributes, e, null);
413
+ const {
414
+ attributes: t
415
+ } = e;
416
+ if (!t || be(e))
417
+ return;
418
+ const o = {
419
+ attrName: "",
420
+ attrValue: "",
421
+ keepAttr: !0,
422
+ allowedAttributes: d,
423
+ forceKeepAttr: void 0
424
+ };
425
+ let f = t.length;
426
+ for (; f--; ) {
427
+ const g = t[f], {
428
+ name: m,
429
+ namespaceURI: y,
430
+ value: x
431
+ } = g, W = p(m), Ne = x;
432
+ let E = m === "value" ? Ne : Qt(Ne);
433
+ if (o.attrName = W, o.attrValue = E, o.keepAttr = !0, o.forceKeepAttr = void 0, w(A.uponSanitizeAttribute, e, o), E = o.attrValue, Ve && (W === "id" || W === "name") && (v(m, e), E = kt + E), ne && S(/((--!?|])>)|<\/(style|title|textarea)/i, E)) {
434
+ v(m, e);
435
+ continue;
436
+ }
437
+ if (W === "attributename" && Ce(E, "href")) {
438
+ v(m, e);
439
+ continue;
440
+ }
441
+ if (o.forceKeepAttr)
442
+ continue;
443
+ if (!o.keepAttr) {
444
+ v(m, e);
445
+ continue;
446
+ }
447
+ if (!je && S(/\/>/i, E)) {
448
+ v(m, e);
449
+ continue;
450
+ }
451
+ U && ce([Te, de, Ee], (lt) => {
452
+ E = K(E, lt, " ");
453
+ });
454
+ const st = p(e.nodeName);
455
+ if (!it(st, W, E)) {
456
+ v(m, e);
457
+ continue;
458
+ }
459
+ if (h && typeof ee == "object" && typeof ee.getAttributeType == "function" && !y)
460
+ switch (ee.getAttributeType(st, W)) {
461
+ case "TrustedHTML": {
462
+ E = h.createHTML(E);
463
+ break;
464
+ }
465
+ case "TrustedScriptURL": {
466
+ E = h.createScriptURL(E);
467
+ break;
468
+ }
469
+ }
470
+ if (E !== Ne)
471
+ try {
472
+ y ? e.setAttributeNS(y, m, E) : e.setAttribute(m, E), be(e) ? I(e) : ft(n.removed);
473
+ } catch {
474
+ v(m, e);
475
+ }
476
+ }
477
+ w(A.afterSanitizeAttributes, e, null);
478
+ }, Bt = function i(e) {
479
+ let t = null;
480
+ const o = tt(e);
481
+ for (w(A.beforeSanitizeShadowDOM, e, null); t = o.nextNode(); )
482
+ w(A.uponSanitizeShadowNode, t, null), ot(t), rt(t), t.content instanceof _ && i(t.content);
483
+ w(A.afterSanitizeShadowDOM, e, null);
484
+ };
485
+ return n.sanitize = function(i) {
486
+ let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, o = null, f = null, g = null;
487
+ if (ye = !i, ye && (i = "<!-->"), typeof i != "string" && !nt(i))
488
+ if (typeof i.toString == "function") {
489
+ if (i = i.toString(), typeof i != "string")
490
+ throw Z("dirty is not a string, aborting");
491
+ } else
492
+ throw Z("toString is not a function");
493
+ if (!n.isSupported)
494
+ return i;
495
+ if (he || Le(e), n.removed = [], typeof i == "string" && (V = !1), V) {
496
+ if (i.nodeName) {
497
+ const x = p(i.nodeName);
498
+ if (!T[x] || X[x])
499
+ throw Z("root node is forbidden and cannot be sanitized in-place");
500
+ }
501
+ } else if (i instanceof me)
502
+ t = et("<!---->"), o = t.ownerDocument.importNode(i, !0), o.nodeType === Q.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? t = o : t.appendChild(o);
503
+ else {
504
+ if (!F && !U && !P && // eslint-disable-next-line unicorn/prefer-includes
505
+ i.indexOf("<") === -1)
506
+ return h && ie ? h.createHTML(i) : i;
507
+ if (t = et(i), !t)
508
+ return F ? null : ie ? j : "";
509
+ }
510
+ t && Ae && I(t.firstChild);
511
+ const m = tt(V ? i : t);
512
+ for (; f = m.nextNode(); )
513
+ ot(f), rt(f), f.content instanceof _ && Bt(f.content);
514
+ if (V)
515
+ return i;
516
+ if (F) {
517
+ if (oe)
518
+ for (g = It.call(t.ownerDocument); t.firstChild; )
519
+ g.appendChild(t.firstChild);
520
+ else
521
+ g = t;
522
+ return (d.shadowroot || d.shadowrootmode) && (g = Mt.call(a, g, !0)), g;
523
+ }
524
+ let y = P ? t.outerHTML : t.innerHTML;
525
+ return P && T["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && S(ht, t.ownerDocument.doctype.name) && (y = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
526
+ ` + y), U && ce([Te, de, Ee], (x) => {
527
+ y = K(y, x, " ");
528
+ }), h && ie ? h.createHTML(y) : y;
529
+ }, n.setConfig = function() {
530
+ let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
531
+ Le(i), he = !0;
532
+ }, n.clearConfig = function() {
533
+ G = null, he = !1;
534
+ }, n.isValidAttribute = function(i, e, t) {
535
+ G || Le({});
536
+ const o = p(i), f = p(e);
537
+ return it(o, f, t);
538
+ }, n.addHook = function(i, e) {
539
+ typeof e == "function" && q(A[i], e);
540
+ }, n.removeHook = function(i, e) {
541
+ if (e !== void 0) {
542
+ const t = Kt(A[i], e);
543
+ return t === -1 ? void 0 : Zt(A[i], t, 1)[0];
544
+ }
545
+ return ft(A[i]);
546
+ }, n.removeHooks = function(i) {
547
+ A[i] = [];
548
+ }, n.removeAllHooks = function() {
549
+ A = Et();
550
+ }, n;
551
+ }
552
+ var dn = At();
553
+ function gn({ content: r, width: n, height: l, className: a, cssClass: c }) {
554
+ const _ = Xt.useMemo(
555
+ () => dn.sanitize(r, {
556
+ USE_PROFILES: { svg: !0, svgFilters: !0 }
557
+ }),
558
+ [r]
559
+ ), L = {};
560
+ return n && (L.width = n), l && (L.height = l), /* @__PURE__ */ Yt.jsx(
561
+ "div",
562
+ {
563
+ style: Object.keys(L).length > 0 ? L : void 0,
564
+ className: jt(a, c),
565
+ dangerouslySetInnerHTML: { __html: _ }
566
+ }
567
+ );
568
+ }
569
+ export {
570
+ gn as Svg
571
+ };