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